wlmaker
Loading...
Searching...
No Matches
include
toolkit
button.h
Go to the documentation of this file.
1
/* ========================================================================= */
20
#ifndef __WLMTK_BUTTON_H__
21
#define __WLMTK_BUTTON_H__
22
23
#include <libbase/libbase.h>
24
#include <stdbool.h>
25
#include <wayland-server-core.h>
26
27
#include "
buffer.h
"
28
#include "
element.h
"
29
30
#ifdef __cplusplus
31
extern
"C"
{
32
#endif
// __cplusplus
33
35
typedef
struct
_wlmtk_button_t
wlmtk_button_t
;
36
38
typedef
struct
{
40
void (*clicked)(
wlmtk_button_t
*button_ptr);
41
}
wlmtk_button_vmt_t
;
42
44
struct
_wlmtk_button_t
{
46
wlmtk_buffer_t
super_buffer
;
48
wlmtk_element_vmt_t
orig_super_element_vmt
;
50
wlmtk_button_vmt_t
vmt
;
51
53
struct
wlr_buffer *
released_wlr_buffer_ptr
;
55
struct
wlr_buffer *
pressed_wlr_buffer_ptr
;
56
58
struct
wl_listener
pointer_enter_listener
;
60
struct
wl_listener
pointer_leave_listener
;
61
63
bool
pressed
;
64
};
65
73
bool
wlmtk_button_init
(
wlmtk_button_t
*button_ptr);
74
83
wlmtk_button_vmt_t
wlmtk_button_extend
(
84
wlmtk_button_t
*button_ptr,
85
const
wlmtk_button_vmt_t
*button_vmt_ptr);
86
92
void
wlmtk_button_fini
(
wlmtk_button_t
*button_ptr);
93
101
void
wlmtk_button_set
(
102
wlmtk_button_t
*button_ptr,
103
struct
wlr_buffer *released_wlr_buffer_ptr,
104
struct
wlr_buffer *pressed_wlr_buffer_ptr);
105
107
extern
const
bs_test_case_t
wlmtk_button_test_cases
[];
108
109
#ifdef __cplusplus
110
}
// extern "C"
111
#endif
// __cplusplus
112
113
#endif
/* __WLMTK_BUTTON_H__ */
114
/* == End of button.h ====================================================== */
buffer.h
wlmtk_button_test_cases
const bs_test_case_t wlmtk_button_test_cases[]
Definition
button.c:244
wlmtk_button_extend
wlmtk_button_vmt_t wlmtk_button_extend(wlmtk_button_t *button_ptr, const wlmtk_button_vmt_t *button_vmt_ptr)
Definition
button.c:93
wlmtk_button_fini
void wlmtk_button_fini(wlmtk_button_t *button_ptr)
Definition
button.c:107
wlmtk_button_set
void wlmtk_button_set(wlmtk_button_t *button_ptr, struct wlr_buffer *released_wlr_buffer_ptr, struct wlr_buffer *pressed_wlr_buffer_ptr)
Definition
button.c:127
wlmtk_button_init
bool wlmtk_button_init(wlmtk_button_t *button_ptr)
Definition
button.c:67
element.h
_wlmtk_buffer_t
Definition
buffer.h:38
_wlmtk_button_t
Definition
button.h:44
_wlmtk_button_t::orig_super_element_vmt
wlmtk_element_vmt_t orig_super_element_vmt
Definition
button.h:48
_wlmtk_button_t::pointer_leave_listener
struct wl_listener pointer_leave_listener
Definition
button.h:60
_wlmtk_button_t::pointer_enter_listener
struct wl_listener pointer_enter_listener
Definition
button.h:58
_wlmtk_button_t::pressed_wlr_buffer_ptr
struct wlr_buffer * pressed_wlr_buffer_ptr
Definition
button.h:55
_wlmtk_button_t::super_buffer
wlmtk_buffer_t super_buffer
Definition
button.h:46
_wlmtk_button_t::released_wlr_buffer_ptr
struct wlr_buffer * released_wlr_buffer_ptr
Definition
button.h:53
_wlmtk_button_t::vmt
wlmtk_button_vmt_t vmt
Definition
button.h:50
_wlmtk_button_t::pressed
bool pressed
Definition
button.h:63
_wlmtk_element_vmt_t
Definition
element.h:67
wlmtk_button_vmt_t
Definition
button.h:38
Generated by
1.9.8