wlmaker
Loading...
Searching...
No Matches
util.h
Go to the documentation of this file.
1/* ========================================================================= */
20#ifndef __WLMTK_UTIL_H__
21#define __WLMTK_UTIL_H__
22
23#include <libbase/libbase.h>
24#include <stdbool.h>
25#include <stddef.h>
26#include <sys/types.h>
27#include <wayland-server-core.h>
28#include <wlr/util/box.h>
29
30struct wl_list;
31
32#ifdef __cplusplus
33extern "C" {
34#endif // __cplusplus
35
37typedef struct {
39 pid_t pid;
41 uid_t uid;
43 gid_t gid;
45
47typedef struct {
49 struct wl_listener listener;
51 size_t calls;
55
57typedef struct {
59 struct wl_listener listener;
61 size_t calls;
63 struct wlr_box box;
65
75 struct wl_list *list_ptr,
76 bool (*func)(struct wl_list *link_ptr, void *ud_ptr),
77 void *ud_ptr);
78
91// TODO(kaeser@gubbe.ch): Either swap arguments (listener first) or rename,
92// eg. . wlm_util_connect_signal_to_listener(...).
94 struct wl_signal *signal_ptr,
95 struct wl_listener *listener_ptr,
96 void (*notifier_func)(struct wl_listener *, void *));
97
106 struct wl_listener *listener_ptr);
107
115 struct wl_signal *signal_ptr,
116 wlmtk_util_test_listener_t *test_listener_ptr);
117
125 wlmtk_util_test_listener_t *test_listener_ptr);
126
133 wlmtk_util_test_listener_t *test_listener_ptr);
134
142 struct wl_signal *signal_ptr,
143 wlmtk_util_test_wlr_box_listener_t *test_wlr_box_listener_ptr);
144
151 wlmtk_util_test_wlr_box_listener_t *test_wlr_box_listener_ptr);
152
154extern const bs_test_case_t wlmtk_util_test_cases[];
155
156#ifdef __cplusplus
157} // extern "C"
158#endif // __cplusplus
159
160#endif /* __WLMTK_UTIL_H__ */
161/* == End of util.h ======================================================== */
Definition util.h:37
gid_t gid
Definition util.h:43
uid_t uid
Definition util.h:41
pid_t pid
Definition util.h:39
Definition util.h:47
void * last_data_ptr
Definition util.h:53
size_t calls
Definition util.h:51
size_t calls
Definition util.h:61
void wlmtk_util_connect_listener_signal(struct wl_signal *signal_ptr, struct wl_listener *listener_ptr, void(*notifier_func)(struct wl_listener *, void *))
Definition util.c:60
void wlmtk_util_disconnect_listener(struct wl_listener *listener_ptr)
Definition util.c:70
void wlmtk_util_connect_test_listener(struct wl_signal *signal_ptr, wlmtk_util_test_listener_t *test_listener_ptr)
Definition util.c:80
void wlmtk_util_clear_test_listener(wlmtk_util_test_listener_t *test_listener_ptr)
Definition util.c:92
bool wlmtk_util_wl_list_for_each(struct wl_list *list_ptr, bool(*func)(struct wl_list *link_ptr, void *ud_ptr), void *ud_ptr)
Definition util.c:41
void wlmtk_util_connect_test_wlr_box_listener(struct wl_signal *signal_ptr, wlmtk_util_test_wlr_box_listener_t *test_wlr_box_listener_ptr)
Definition util.c:107
void wlmtk_util_clear_test_wlr_box_listener(wlmtk_util_test_wlr_box_listener_t *test_wlr_box_listener_ptr)
Definition util.c:119
const bs_test_case_t wlmtk_util_test_cases[]
Definition util.c:168
void wlmtk_util_disconnect_test_listener(wlmtk_util_test_listener_t *test_listener_ptr)
Definition util.c:100