Commit graph

2,205 commits

Author SHA1 Message Date
Admin
cf22b515c8 fix script mods 2026-03-08 18:20:07 +01:00
Admin
eba48ce826 live reloading 2026-03-08 17:25:27 +01:00
Admin
ef6255c291 bootstrap change 2026-03-08 13:36:58 +01:00
Admin
c1780ca9ef undo integer attribute change 2026-03-08 13:11:57 +01:00
offline-ant
642a929e5f platform: video/camera subsystem with media plugin architecture (#929)
Video playback: extended API with volume, playback rate, seek ranges,
buffered ranges, can_play_type, audio-only mode. Unified player wrapping
native backend (AVPlayer/GStreamer/MediaFoundation) with software fallback.
YUV shader pipeline (BT.601/709/2020, NV12 biplanar, rotation).

Camera: V4L2 backend (Linux), expanded NDK Camera2 (Android), AVCapture
stream refactor (iOS/macOS) with shared session architecture. NV12
zero-copy paths on iOS (CVMetalTextureCache) and Android (AImage planes).
Camera preview modes (texture/native/auto).

Video encoding: H264 hardware encode on Apple (VideoToolbox) and Android
(MediaCodec). Camera-to-encoder pipeline with pixel buffer passthrough.

Media plugin system: externalized codec implementation via MediaPlugin
trait. MsePlayer, VideoFrameDecoder, MediaVideoEncoder, SoftwareVideoPlayer
interfaces. Runtime codec capability query and merge.

Includes camera example app.

Co-authored-by: ant <ant@offline.click>
2026-03-08 13:10:58 +01:00
offline-ant
3dafa35ed8 platform: popup window API with X11/Wayland support (#911)
- Add popup window type for context menus and dropdowns
- Wayland: xdg_popup with grab for compositor-driven dismiss
- X11: override-redirect windows with pointer grab
- Explicit-close semantics: app must handle PopupDismissed
- Fix Wayland crash on repeated context menu open/close
- Emit WindowClosed before PopupDismissed in PopupDone

Co-authored-by: ant <ant@offline.click>
2026-03-08 13:10:45 +01:00
offline-ant
744f45db3e platform: native mobile selection handles (#930)
* platform: popup window API with X11/Wayland support

- Add popup window type for context menus and dropdowns
- Wayland: xdg_popup with grab for compositor-driven dismiss
- X11: override-redirect windows with pointer grab
- Explicit-close semantics: app must handle PopupDismissed
- Fix Wayland crash on repeated context menu open/close
- Emit WindowClosed before PopupDismissed in PopupDone

* platform: native mobile selection handles

iOS: custom UIView selection handles with UIPanGestureRecognizer (all versions),
UITextSelectionDisplayInteraction for native highlights (iOS 16+),
MakepadSelectionRect for UITextInput protocol.

Android: custom SelectionHandleView with GradientDrawable oval, touch drag
listeners, JNI bridge for handle drag events.

Widgets: TextFlow clipboard action integration (show on touch up with selection,
hide on touch down/focus lost, TextCut handler), PortalList select-all and
clipboard actions, selection bounding rect computation for popup positioning.

Includes text_selection example app.

---------

Co-authored-by: ant <ant@offline.click>
2026-03-08 12:15:31 +01:00
Admin
77ef442425 terminal selection 2026-03-08 11:53:36 +01:00
Admin
bdd54ef7ce remove dep 2026-03-08 11:43:23 +01:00
Lutz
619f364d20 fix: Single-slot UInt/SInt instance attributes render incorrectly (#922)
Co-authored-by: Lutz Paelike <lutz.paelike@ehealthafrica.org>
2026-03-08 11:26:52 +01:00
offline-ant
dd83d4b759 platform: small fixes and quality improvements (#928)
- Android log levels: map log! macro levels to Android log priorities
  (ERROR=6, WARN=5, INFO=4). Some devices suppress DEBUG by default.
- cargo-makepad android: show help text instead of panicking on missing
  or invalid subcommand.
- Android build: discover .class files dynamically instead of hardcoding
  ~25 individual paths. Add Java 8 source/target flags.
- Remove deprecated AsyncTask import from MakepadNetwork.java.
- Studio stdout: add newline after JSON messages for JSON-lines parsing.
- Studio stdout: skip profiler timing in stdout mode to avoid overhead.
- Script thread: fix panic on empty call stack in call_has_me/call_has_try.
- Cursor: reset to Default on FingerHoverOut in TextFlow and TextInput.

Co-authored-by: ant <ant@offline.click>
2026-03-08 11:24:18 +01:00
offline-ant
bdb9911614 platform: cycle tap count after triple-click so fast double-clicks keep working (#931)
process_tap_count incremented without bound. TextInput handles
tap_count 2 (select word) and 3 (select all) but ignored counts
>= 4. Rapid repeated double-clicks produced tap counts of 4, 5, 6...
hitting the _ => {} fallthrough and doing nothing.

Cycle the counter back to 1 after reaching 3 (1->2->3->1->2->3).

Co-authored-by: ant <ant@offline.click>
2026-03-08 11:22:12 +01:00
Admin
9e4f24977a script api for slide panel 2026-03-08 10:57:03 +01:00
Admin
59da641980 fix physics stability 2026-03-08 10:44:56 +01:00
Admin
af3995b33b remove apprs 2026-03-08 10:28:40 +01:00
Admin
d758d6d95e fixing 2026-03-08 09:20:34 +01:00
Admin
c8412703b0 oops. uids 2026-03-08 08:42:49 +01:00
Jason Yau
5f3e13d3bc Add IME Support for Linux (X11) (#926)
* regenerate windows-rs to export ImmAssociateContext

* fix ime popup window still shown when TextInput has no focus

* fix ime popup window still shown when TextInput has no focus for macos

* fix ime himc state

* IME support for linux

---------

Co-authored-by: jasonqiu <jasonqiuchen@outlook.com>
2026-03-07 15:50:05 +01:00
Admin
8d73f700e6 exr 2026-03-07 15:01:34 +01:00
Admin
1cb8ce2347 fix 2026-03-07 11:54:59 +01:00
Admin
73035bcdd9 Harden widget tree refresh and require explicit widget uids 2026-03-07 11:23:22 +01:00
Kevin Boos
97bb42e439 TextInput: actually use color_empty_hover/focus in draw_text shader (#927) 2026-03-07 09:46:44 +01:00
Admin
614e214e9a fix ime runview 2026-03-07 02:07:44 +01:00
Admin
b30abb351e oops 2026-03-06 19:15:09 +01:00
Admin
8c5987039d fix shader compiler 2026-03-06 18:49:24 +01:00
Admin
0e1fe0b994 fix ime 2026-03-06 17:24:51 +01:00
Admin
2aad6a6aa9 drumroll 2026-03-06 17:21:17 +01:00
Admin
ed062cb224 fix shader compiler state clobber 2026-03-06 17:21:17 +01:00
Admin
2dd6c85753 almost sshader 2026-03-06 17:21:17 +01:00
Admin
ad658b40ad cleanup ds 2026-03-06 17:21:17 +01:00
Admin
bb331d0eb3 split f32 + uniformbuffers 2026-03-06 17:21:17 +01:00
Jason Yau
77709bb766 Fix: IME Popup Window Appears Without TextInput Focus (#924)
* regenerate windows-rs to export ImmAssociateContext

* fix ime popup window still shown when TextInput has no focus

* fix ime popup window still shown when TextInput has no focus for macos

---------

Co-authored-by: jasonqiu <jasonqiuchen@outlook.com>
2026-03-06 16:50:01 +01:00
Sabin Regmi
3905ae4d1c Load script resources per-handle (avoid global loads) (#923)
Replace broad cx.load_all_script_resources() calls with a targeted cx.load_script_resource(handle) to only request the specific resource needed. Refactor script resource loading (platform/src/script/res.rs) by extracting load_script_resource_impl(handle, crate_manifests) and exposing load_script_resource(handle); keep load_all_script_resources() by iterating per-handle. Improve wasm handling: resolve web_url per-resource, set explicit error states when missing, and fire async HTTP requests safely. Remove an early call to load_all_script_resources() from web startup. Additional changes: serve precompressed .br files in the local wasm dev server (with COOP/COEP headers when threaded), add wasm-specific font/theme script entries for widgets, and update various callers (draw shaders, widgets, math_view, gltf/view_splat, image) to use the per-handle loader. These changes reduce unnecessary global loads and limit network/file operations to only required resources.
2026-03-06 16:01:07 +01:00
offline-ant
abb71be0e0 selection: clipboard delegate, primary selection, mobile handles (#912)
* selection: clipboard delegate, primary selection, mobile UI, handles, accessibility

Level 0: Route clipboard through Makepad instead of arboard. Custom
ClipboardDelegate in havishell forwards set_text/get_text/clear through
Makepad's CopyToClipboard and pending paste state. Fix Wayland serial
constraint by queuing CopyToClipboard when no serial is available.

Level 1: Primary selection (Linux). Add CxOsOp::SetPrimarySelection,
Wayland zwp_primary_selection_device_manager_v1 protocol bindings, X11
PRIMARY atom handling. HAVI stores selection text in SharedDocumentSelection
and calls set_primary_selection on change.

Level 2: Mobile clipboard actions UI. Long-press selects word and shows
native clipboard toolbar. TextCopy/TextCut events return selection text.

Level 3: Selection handle API. Add CxOsOp Show/Update/HideSelectionHandles,
Event::SelectionHandleDrag, and HAVI integration for handle drag events.
Platform stubs for all backends.

Level 4: Accessibility plumbing. Add CxOsOp::AccessibilityUpdate with
type-erased Box<dyn Any + Send> payload. HAVI implements
notify_accessibility_tree_update to forward accesskit::TreeUpdate through
Makepad. Platform no-op stubs.

* wayland: handle primary selection data_offer child objects

---------

Co-authored-by: ant <ant@offline.click>
2026-03-06 12:17:25 +01:00
Sabin Regmi
78f8c52c90 Remove debug title update in redraw handler (#919)
Remove a leftover debug call that set the document title when handling ToWasmRedrawAll in platform/src/os/web/web.rs. This avoids an unnecessary DOM update used only for debugging and cleans up the redraw handler.
2026-03-06 12:16:24 +01:00
Sabin Regmi
a2d4cf68fe Consider Logo or Control primary on wasm32 (#921)
Add a wasm32-specific branch in KeyModifiers::is_primary so the primary modifier is treated as true when either `logo` or `control` is set on WebAssembly targets. This preserves expected web behavior where Meta/Command or Control can act as the primary key. Also tighten the non-Apple cfg to exclude wasm32 explicitly to avoid overlapping cfg matches.
2026-03-06 12:16:08 +01:00
Lutz
16c3bc1c33 fix: iOS app crashes on device rotation (#920) 2026-03-06 12:15:52 +01:00
Admin
4be806a7ae fix 2026-03-06 09:27:43 +01:00
Admin
3ed6de6cac fix 2026-03-06 09:26:02 +01:00
Admin
3d3e51fe26 mb3d test scene 2026-03-05 23:47:21 +01:00
Admin
12b4f4f53c m3d concluded 2026-03-05 23:45:21 +01:00
Admin
d057e9a46a optimisation adaptive ao 2026-03-05 23:45:21 +01:00
Admin
2895460208 baseline 2026-03-05 23:45:21 +01:00
Admin
1f2c52acad cleanup 2026-03-05 23:45:21 +01:00
Admin
2c3d091f2e parity! 2026-03-05 23:45:21 +01:00
Admin
8eede680b6 nearly there 2026-03-05 23:45:21 +01:00
Admin
1d4b873633 almost 2026-03-05 23:45:21 +01:00
Admin
ff01d0c07f shadows 2026-03-05 23:45:21 +01:00
Admin
3846b2ec35 base correct 2026-03-05 23:45:21 +01:00
Admin
e4b5334260 improving.. 2026-03-05 23:45:21 +01:00