wlmaker
Loading...
Searching...
No Matches
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
31extern "C" {
32#endif // __cplusplus
33
36
38typedef struct {
40 void (*clicked)(wlmtk_button_t *button_ptr);
42
65
73bool wlmtk_button_init(wlmtk_button_t *button_ptr);
74
84 wlmtk_button_t *button_ptr,
85 const wlmtk_button_vmt_t *button_vmt_ptr);
86
92void wlmtk_button_fini(wlmtk_button_t *button_ptr);
93
102 wlmtk_button_t *button_ptr,
103 struct wlr_buffer *released_wlr_buffer_ptr,
104 struct wlr_buffer *pressed_wlr_buffer_ptr);
105
107extern 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 ====================================================== */
const bs_test_case_t wlmtk_button_test_cases[]
Definition button.c:244
wlmtk_button_vmt_t wlmtk_button_extend(wlmtk_button_t *button_ptr, const wlmtk_button_vmt_t *button_vmt_ptr)
Definition button.c:93
void wlmtk_button_fini(wlmtk_button_t *button_ptr)
Definition button.c:107
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
bool wlmtk_button_init(wlmtk_button_t *button_ptr)
Definition button.c:67
Definition buffer.h:38
Definition button.h:44
wlmtk_element_vmt_t orig_super_element_vmt
Definition button.h:48
struct wl_listener pointer_leave_listener
Definition button.h:60
struct wl_listener pointer_enter_listener
Definition button.h:58
struct wlr_buffer * pressed_wlr_buffer_ptr
Definition button.h:55
wlmtk_buffer_t super_buffer
Definition button.h:46
struct wlr_buffer * released_wlr_buffer_ptr
Definition button.h:53
wlmtk_button_vmt_t vmt
Definition button.h:50
bool pressed
Definition button.h:63
Definition element.h:67
Definition button.h:38