wlmaker
Toggle main menu visibility
Loading...
Searching...
No Matches
include
toolkit
input.h
Go to the documentation of this file.
1
/* ========================================================================= */
21
#ifndef __WLMTK_INPUT_H__
22
#define __WLMTK_INPUT_H__
23
24
#include <stdint.h>
25
26
struct
wlr_cursor;
27
struct
wlr_xcursor_manager;
28
29
#ifdef __cplusplus
30
extern
"C"
{
31
#endif
// __cplusplus
32
34
typedef
struct
_wlmtk_button_event_t
wlmtk_button_event_t
;
35
37
typedef
struct
_wlmtk_pointer_t
wlmtk_pointer_t
;
38
40
typedef
enum
{
41
WLMTK_BUTTON_DOWN,
42
WLMTK_BUTTON_UP,
43
WLMTK_BUTTON_CLICK,
44
WLMTK_BUTTON_DOUBLE_CLICK,
45
}
wlmtk_button_event_type_t
;
46
48
typedef
enum
{
50
WLMTK_POINTER_CURSOR_DEFAULT
= 0,
52
WLMTK_POINTER_CURSOR_RESIZE_S
,
54
WLMTK_POINTER_CURSOR_RESIZE_SE
,
56
WLMTK_POINTER_CURSOR_RESIZE_SW
,
57
59
WLMTK_POINTER_CURSOR_MAX
,
60
}
wlmtk_pointer_cursor_t
;
61
63
struct
_wlmtk_button_event_t
{
65
uint32_t
button
;
67
wlmtk_button_event_type_t
type
;
69
uint32_t
time_msec
;
71
uint32_t
keyboard_modifiers
;
72
};
73
75
typedef
struct
{
77
double
x
;
79
double
y
;
81
uint32_t
time_msec
;
83
wlmtk_pointer_t
*
pointer_ptr
;
84
}
wlmtk_pointer_motion_event_t
;
85
94
wlmtk_pointer_t
*
wlmtk_pointer_create
(
95
struct
wlr_cursor *wlr_cursor_ptr,
96
struct
wlr_xcursor_manager *wlr_xcursor_manager_ptr);
97
103
void
wlmtk_pointer_destroy
(
wlmtk_pointer_t
*pointer_ptr);
104
111
void
wlmtk_pointer_set_xcursor_manager
(
112
wlmtk_pointer_t
*pointer_ptr,
113
struct
wlr_xcursor_manager *wlr_xcursor_manager_ptr);
114
118
void
wlmtk_pointer_set_cursor
(
119
wlmtk_pointer_t
*pointer_ptr,
120
wlmtk_pointer_cursor_t
cursor);
121
122
#ifdef __cplusplus
123
}
// extern "C"
124
#endif
// __cplusplus
125
126
#endif
/* __WLMTK_INPUT_H__ */
127
/* == 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:77
wlmtk_pointer_t
struct _wlmtk_pointer_t wlmtk_pointer_t
Definition
input.h:37
wlmtk_button_event_t
struct _wlmtk_button_event_t wlmtk_button_event_t
Definition
input.h:34
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:57
wlmtk_pointer_set_xcursor_manager
void wlmtk_pointer_set_xcursor_manager(wlmtk_pointer_t *pointer_ptr, struct wlr_xcursor_manager *wlr_xcursor_manager_ptr)
Definition
input.c:95
wlmtk_pointer_cursor_t
wlmtk_pointer_cursor_t
Definition
input.h:48
WLMTK_POINTER_CURSOR_RESIZE_SE
@ WLMTK_POINTER_CURSOR_RESIZE_SE
Definition
input.h:54
WLMTK_POINTER_CURSOR_MAX
@ WLMTK_POINTER_CURSOR_MAX
Definition
input.h:59
WLMTK_POINTER_CURSOR_DEFAULT
@ WLMTK_POINTER_CURSOR_DEFAULT
Definition
input.h:50
WLMTK_POINTER_CURSOR_RESIZE_S
@ WLMTK_POINTER_CURSOR_RESIZE_S
Definition
input.h:52
WLMTK_POINTER_CURSOR_RESIZE_SW
@ WLMTK_POINTER_CURSOR_RESIZE_SW
Definition
input.h:56
wlmtk_pointer_destroy
void wlmtk_pointer_destroy(wlmtk_pointer_t *pointer_ptr)
Definition
input.c:71
wlmtk_button_event_type_t
wlmtk_button_event_type_t
Definition
input.h:40
_wlmtk_button_event_t
Definition
input.h:63
_wlmtk_button_event_t::time_msec
uint32_t time_msec
Definition
input.h:69
_wlmtk_button_event_t::button
uint32_t button
Definition
input.h:65
_wlmtk_button_event_t::type
wlmtk_button_event_type_t type
Definition
input.h:67
_wlmtk_button_event_t::keyboard_modifiers
uint32_t keyboard_modifiers
Definition
input.h:71
_wlmtk_pointer_t
Definition
input.c:34
wlmtk_pointer_motion_event_t
Definition
input.h:75
wlmtk_pointer_motion_event_t::y
double y
Definition
input.h:79
wlmtk_pointer_motion_event_t::pointer_ptr
wlmtk_pointer_t * pointer_ptr
Definition
input.h:83
wlmtk_pointer_motion_event_t::time_msec
uint32_t time_msec
Definition
input.h:81
wlmtk_pointer_motion_event_t::x
double x
Definition
input.h:77
Generated by
1.17.0