neuswc

patched neuswc library (tracked)
git clone https://git.daat.foo/neuswc.git
Log | Files | Refs | README | LICENSE

touch.h (1068B)


      1 /* swc: libswc/touch.h
      2  *
      3  * touchscreens: wl_touch for the clients that bind it, and the first finger
      4  * as the pointer for everything else, the window decorations included
      5  */
      6 
      7 #ifndef SWC_TOUCH_H
      8 #define SWC_TOUCH_H
      9 
     10 #include <stdbool.h>
     11 #include <stdint.h>
     12 #include <wayland-server.h>
     13 
     14 struct pointer;
     15 struct touch;
     16 
     17 struct touch *
     18 touch_create(struct pointer *pointer);
     19 void
     20 touch_destroy(struct touch *touch);
     21 
     22 bool
     23 touch_bind(struct touch *touch, struct wl_client *client, uint32_t version,
     24            uint32_t id);
     25 
     26 /* slot tells fingers apart while they are down, x and y are in the global
     27  * space. a frame ends what happened at one time */
     28 void
     29 touch_handle_down(struct touch *touch, uint32_t time, int32_t slot,
     30                   wl_fixed_t x, wl_fixed_t y);
     31 void
     32 touch_handle_motion(struct touch *touch, uint32_t time, int32_t slot,
     33                     wl_fixed_t x, wl_fixed_t y);
     34 void
     35 touch_handle_up(struct touch *touch, uint32_t time, int32_t slot);
     36 void
     37 touch_handle_frame(struct touch *touch);
     38 void
     39 touch_handle_cancel(struct touch *touch);
     40 
     41 #endif