summaryrefslogtreecommitdiff
path: root/src/gui/macos_trackpad.h
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-04 20:17:40 -0300
committerGabriel Schneider <[email protected]>2026-11-04 20:17:40 -0300
commita41360e3b9699268d73d598c6eb0155875d3a149 (patch)
treeab4a798f198cce4f421af1bd3d6ce9490767a8b6 /src/gui/macos_trackpad.h
parent99d0bf3669a939fb09ac4ae5a0b2ddbace3d3f63 (diff)
downloadpardes-a41360e3b9699268d73d598c6eb0155875d3a149.tar.gz
pardes-a41360e3b9699268d73d598c6eb0155875d3a149.zip
Improve macOS detached client gestures and rendering
Add a thin AppKit input adapter for SDL trackpad momentum, multi-finger and force clicks, deliberate pinch zoom, rotation haptics, and shorter history swipes with early haptic cues. Keep remote cursor motion on the frontend clock, resolve configured fonts locally, follow terminal directories without an authority window, and render live tagline themes without waiting for daemon ticks. Validate with native GUI and TUI release builds, trackpad policy and adapter tests, targeted scroll and replica theme regressions, live remote digest checks, visual theme switching, and user trackpad testing.
Diffstat (limited to 'src/gui/macos_trackpad.h')
-rw-r--r--src/gui/macos_trackpad.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/gui/macos_trackpad.h b/src/gui/macos_trackpad.h
new file mode 100644
index 00000000..f5266084
--- /dev/null
+++ b/src/gui/macos_trackpad.h
@@ -0,0 +1,21 @@
+#ifndef PARDES_MACOS_TRACKPAD_H
+#define PARDES_MACOS_TRACKPAD_H
+#include <SDL3/SDL.h>
+
+enum { UI_TRACKPAD_FINGERS = 1, UI_TRACKPAD_PRESSURE, UI_TRACKPAD_ROTATE,
+ UI_TRACKPAD_PINCH, UI_TRACKPAD_SCROLL, UI_TRACKPAD_HISTORY };
+/* Same prefix as SDL_UserEvent; the rest lives inside SDL_Event's storage. */
+typedef struct {
+ Uint32 type, reserved;
+ Uint64 timestamp;
+ SDL_WindowID windowID;
+ int kind;
+ float x, y, a, b;
+ Uint32 phase;
+ int fingers;
+} UITrackpadEvent;
+
+Uint32 ui_macos_trackpad_event_type(void);
+void ui_macos_trackpad_attach(SDL_Window *window);
+void ui_macos_trackpad_haptic(void);
+#endif