MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Tools / pointer_handle_button

Function pointer_handle_button

cube/cube.c:3602–3608  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3600static void pointer_handle_motion(void *data, struct wl_pointer *pointer, uint32_t time, wl_fixed_t sx, wl_fixed_t sy) {}
3601
3602static void pointer_handle_button(void *data, struct wl_pointer *wl_pointer, uint32_t serial, uint32_t time, uint32_t button,
3603 uint32_t state) {
3604 struct demo *demo = data;
3605 if (button == BTN_LEFT && state == WL_POINTER_BUTTON_STATE_PRESSED) {
3606 xdg_toplevel_move(demo->xdg_toplevel, demo->seat, serial);
3607 }
3608}
3609
3610static void pointer_handle_axis(void *data, struct wl_pointer *wl_pointer, uint32_t time, uint32_t axis, wl_fixed_t value) {}
3611

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected