wlmaker
Toggle main menu visibility
Loading...
Searching...
No Matches
include
toolkit
input.h
Go to the documentation of this file.
1
/* ========================================================================= */
20
#ifndef __WLMTK_INPUT_H__
21
#define __WLMTK_INPUT_H__
22
23
#include <stdint.h>
24
25
struct
wlr_cursor;
26
struct
wlr_xcursor_manager;
27
28
#ifdef __cplusplus
29
extern
"C"
{
30
#endif
// __cplusplus
31
33
typedef
struct
_wlmtk_button_event_t
wlmtk_button_event_t
;
34
36
typedef
struct
_wlmtk_pointer_t
wlmtk_pointer_t
;
37
39
typedef
enum
{
40
WLMTK_BUTTON_DOWN,
41
WLMTK_BUTTON_UP,
42
WLMTK_BUTTON_CLICK,
43
WLMTK_BUTTON_DOUBLE_CLICK,
44
}
wlmtk_button_event_type_t
;
45
47
typedef
enum
{
49
WLMTK_POINTER_CURSOR_DEFAULT
= 0,
51
WLMTK_POINTER_CURSOR_RESIZE_S
,
53
WLMTK_POINTER_CURSOR_RESIZE_SE
,
55
WLMTK_POINTER_CURSOR_RESIZE_SW
,
56
58
WLMTK_POINTER_CURSOR_MAX
,
59
}
wlmtk_pointer_cursor_t
;
60
62
struct
_wlmtk_button_event_t
{
64
uint32_t
button
;
66
wlmtk_button_event_type_t
type
;
68
uint32_t
time_msec
;
70
uint32_t
keyboard_modifiers
;
71
};
72
74
typedef
struct
{
76
double
x
;
78
double
y
;
80
uint32_t
time_msec
;
82
wlmtk_pointer_t
*
pointer_ptr
;
83
}
wlmtk_pointer_motion_event_t
;
84
93
wlmtk_pointer_t
*
wlmtk_pointer_create
(
94
struct
wlr_cursor *wlr_cursor_ptr,
95
struct
wlr_xcursor_manager *wlr_xcursor_manager_ptr);
96
102
void
wlmtk_pointer_destroy
(
wlmtk_pointer_t
*pointer_ptr);
103
107
void
wlmtk_pointer_set_cursor
(
108
wlmtk_pointer_t
*pointer_ptr,
109
wlmtk_pointer_cursor_t
cursor);
110
111
#ifdef __cplusplus
112
}
// extern "C"
113
#endif
// __cplusplus
114
115
#endif
/* __WLMTK_INPUT_H__ */
116
/* == End of input.h ======================================================= */
wlmtk_pointer_set_cursor
void wlmtk_pointer_set_cursor(wlmtk_pointer_t *pointer_ptr, wlmtk_pointer_cursor_t cursor)
Definition
input.c:72
wlmtk_pointer_t
struct _wlmtk_pointer_t wlmtk_pointer_t
Definition
input.h:36
wlmtk_button_event_t
struct _wlmtk_button_event_t wlmtk_button_event_t
Definition
input.h:33
wlmtk_pointer_create
wlmtk_pointer_t * wlmtk_pointer_create(struct wlr_cursor *wlr_cursor_ptr, struct wlr_xcursor_manager *wlr_xcursor_manager_ptr)
Definition
input.c:53
wlmtk_pointer_cursor_t
wlmtk_pointer_cursor_t
Definition
input.h:47
WLMTK_POINTER_CURSOR_RESIZE_SE
@ WLMTK_POINTER_CURSOR_RESIZE_SE
Definition
input.h:53
WLMTK_POINTER_CURSOR_MAX
@ WLMTK_POINTER_CURSOR_MAX
Definition
input.h:58
WLMTK_POINTER_CURSOR_DEFAULT
@ WLMTK_POINTER_CURSOR_DEFAULT
Definition
input.h:49
WLMTK_POINTER_CURSOR_RESIZE_S
@ WLMTK_POINTER_CURSOR_RESIZE_S
Definition
input.h:51
WLMTK_POINTER_CURSOR_RESIZE_SW
@ WLMTK_POINTER_CURSOR_RESIZE_SW
Definition
input.h:55
wlmtk_pointer_destroy
void wlmtk_pointer_destroy(wlmtk_pointer_t *pointer_ptr)
Definition
input.c:66
wlmtk_button_event_type_t
wlmtk_button_event_type_t
Definition
input.h:39
_wlmtk_button_event_t
Definition
input.h:62
_wlmtk_button_event_t::time_msec
uint32_t time_msec
Definition
input.h:68
_wlmtk_button_event_t::button
uint32_t button
Definition
input.h:64
_wlmtk_button_event_t::type
wlmtk_button_event_type_t type
Definition
input.h:66
_wlmtk_button_event_t::keyboard_modifiers
uint32_t keyboard_modifiers
Definition
input.h:70
_wlmtk_pointer_t
Definition
input.c:32
wlmtk_pointer_motion_event_t
Definition
input.h:74
wlmtk_pointer_motion_event_t::y
double y
Definition
input.h:78
wlmtk_pointer_motion_event_t::pointer_ptr
wlmtk_pointer_t * pointer_ptr
Definition
input.h:82
wlmtk_pointer_motion_event_t::time_msec
uint32_t time_msec
Definition
input.h:80
wlmtk_pointer_motion_event_t::x
double x
Definition
input.h:76
Generated by
1.17.0