diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/render/gles2.h | 2 | ||||
-rw-r--r-- | include/wlr/types/wlr_compositor.h | 8 | ||||
-rw-r--r-- | include/wlr/types/wlr_data_device.h | 2 | ||||
-rw-r--r-- | include/wlr/types/wlr_gamma_control.h | 2 | ||||
-rw-r--r-- | include/wlr/types/wlr_idle.h | 2 | ||||
-rw-r--r-- | include/wlr/types/wlr_idle_inhibit_v1.h | 2 | ||||
-rw-r--r-- | include/wlr/types/wlr_input_inhibitor.h | 2 | ||||
-rw-r--r-- | include/wlr/types/wlr_layer_shell.h | 2 | ||||
-rw-r--r-- | include/wlr/types/wlr_linux_dmabuf.h | 4 | ||||
-rw-r--r-- | include/wlr/types/wlr_output.h | 4 | ||||
-rw-r--r-- | include/wlr/types/wlr_screenshooter.h | 2 | ||||
-rw-r--r-- | include/wlr/types/wlr_seat.h | 4 | ||||
-rw-r--r-- | include/wlr/types/wlr_server_decoration.h | 4 | ||||
-rw-r--r-- | include/wlr/types/wlr_wl_shell.h | 4 | ||||
-rw-r--r-- | include/wlr/types/wlr_xdg_output.h | 3 | ||||
-rw-r--r-- | include/wlr/types/wlr_xdg_shell.h | 2 | ||||
-rw-r--r-- | include/wlr/types/wlr_xdg_shell_v6.h | 2 | ||||
-rw-r--r-- | include/wlr/util/log.h | 33 |
18 files changed, 44 insertions, 40 deletions
diff --git a/include/render/gles2.h b/include/render/gles2.h index 67d4e9f5..8b036f80 100644 --- a/include/render/gles2.h +++ b/include/render/gles2.h @@ -93,7 +93,7 @@ struct wlr_gles2_texture *get_gles2_texture_in_context( void push_gles2_marker(const char *file, const char *func); void pop_gles2_marker(void); -#define PUSH_GLES2_DEBUG push_gles2_marker(wlr_strip_path(__FILE__), __func__) +#define PUSH_GLES2_DEBUG push_gles2_marker(_wlr_strip_path(__FILE__), __func__) #define POP_GLES2_DEBUG pop_gles2_marker() #endif diff --git a/include/wlr/types/wlr_compositor.h b/include/wlr/types/wlr_compositor.h index 51702884..0d79b0bb 100644 --- a/include/wlr/types/wlr_compositor.h +++ b/include/wlr/types/wlr_compositor.h @@ -7,14 +7,14 @@ struct wlr_surface; struct wlr_subcompositor { - struct wl_global *wl_global; - struct wl_list wl_resources; + struct wl_global *global; + struct wl_list resources; struct wl_list subsurface_resources; }; struct wlr_compositor { - struct wl_global *wl_global; - struct wl_list wl_resources; + struct wl_global *global; + struct wl_list resources; struct wlr_renderer *renderer; struct wl_list surface_resources; struct wl_list region_resources; diff --git a/include/wlr/types/wlr_data_device.h b/include/wlr/types/wlr_data_device.h index 4de4d610..8b7b374c 100644 --- a/include/wlr/types/wlr_data_device.h +++ b/include/wlr/types/wlr_data_device.h @@ -15,7 +15,7 @@ wlr_touch_grab_interface wlr_data_device_touch_drag_interface; struct wlr_data_device_manager { struct wl_global *global; - struct wl_list wl_resources; + struct wl_list resources; struct wl_list data_sources; struct wl_listener display_destroy; diff --git a/include/wlr/types/wlr_gamma_control.h b/include/wlr/types/wlr_gamma_control.h index d3f4b8e5..f195c8ef 100644 --- a/include/wlr/types/wlr_gamma_control.h +++ b/include/wlr/types/wlr_gamma_control.h @@ -4,7 +4,7 @@ #include <wayland-server.h> struct wlr_gamma_control_manager { - struct wl_global *wl_global; + struct wl_global *global; struct wl_list controls; // wlr_gamma_control::link struct wl_listener display_destroy; diff --git a/include/wlr/types/wlr_idle.h b/include/wlr/types/wlr_idle.h index aca9146c..53fc6b98 100644 --- a/include/wlr/types/wlr_idle.h +++ b/include/wlr/types/wlr_idle.h @@ -14,7 +14,7 @@ struct wlr_idle { - struct wl_global *wl_global; + struct wl_global *global; struct wl_list idle_timers; // wlr_idle_timeout::link struct wl_event_loop *event_loop; bool enabled; diff --git a/include/wlr/types/wlr_idle_inhibit_v1.h b/include/wlr/types/wlr_idle_inhibit_v1.h index 8c20d2c8..011abbe5 100644 --- a/include/wlr/types/wlr_idle_inhibit_v1.h +++ b/include/wlr/types/wlr_idle_inhibit_v1.h @@ -16,7 +16,7 @@ */ struct wlr_idle_inhibit_manager_v1 { - struct wl_list wl_resources; // wl_resource_get_link + struct wl_list resources; // wl_resource_get_link struct wl_list inhibitors; // wlr_idle_inhibit_inhibitor_v1::link struct wl_global *global; diff --git a/include/wlr/types/wlr_input_inhibitor.h b/include/wlr/types/wlr_input_inhibitor.h index 4416c18f..2f333f3b 100644 --- a/include/wlr/types/wlr_input_inhibitor.h +++ b/include/wlr/types/wlr_input_inhibitor.h @@ -3,7 +3,7 @@ #include <wayland-server.h> struct wlr_input_inhibit_manager { - struct wl_global *wl_global; + struct wl_global *global; struct wl_client *active_client; struct wl_resource *active_inhibitor; diff --git a/include/wlr/types/wlr_layer_shell.h b/include/wlr/types/wlr_layer_shell.h index 8f69cbbb..2848a115 100644 --- a/include/wlr/types/wlr_layer_shell.h +++ b/include/wlr/types/wlr_layer_shell.h @@ -20,7 +20,7 @@ * the compositor should begin rendering the surface. */ struct wlr_layer_shell { - struct wl_global *wl_global; + struct wl_global *global; struct wl_list client_resources; // wl_resource struct wl_list surfaces; // wl_layer_surface diff --git a/include/wlr/types/wlr_linux_dmabuf.h b/include/wlr/types/wlr_linux_dmabuf.h index ea219020..4a03170c 100644 --- a/include/wlr/types/wlr_linux_dmabuf.h +++ b/include/wlr/types/wlr_linux_dmabuf.h @@ -35,9 +35,9 @@ struct wlr_dmabuf_buffer *wlr_dmabuf_buffer_from_params_resource( /* the protocol interface */ struct wlr_linux_dmabuf { - struct wl_global *wl_global; + struct wl_global *global; struct wlr_renderer *renderer; - struct wl_list wl_resources; + struct wl_list resources; struct { struct wl_signal destroy; diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h index 158d174e..5084eb5a 100644 --- a/include/wlr/types/wlr_output.h +++ b/include/wlr/types/wlr_output.h @@ -53,8 +53,8 @@ struct wlr_output { struct wlr_backend *backend; struct wl_display *display; - struct wl_global *wl_global; - struct wl_list wl_resources; + struct wl_global *global; + struct wl_list resources; char name[24]; char make[48]; diff --git a/include/wlr/types/wlr_screenshooter.h b/include/wlr/types/wlr_screenshooter.h index 680d86f0..916c8942 100644 --- a/include/wlr/types/wlr_screenshooter.h +++ b/include/wlr/types/wlr_screenshooter.h @@ -4,7 +4,7 @@ #include <wayland-server.h> struct wlr_screenshooter { - struct wl_global *wl_global; + struct wl_global *global; struct wl_list screenshots; // wlr_screenshot::link struct wl_listener display_destroy; diff --git a/include/wlr/types/wlr_seat.h b/include/wlr/types/wlr_seat.h index 11fd9e15..1c7a1472 100644 --- a/include/wlr/types/wlr_seat.h +++ b/include/wlr/types/wlr_seat.h @@ -17,7 +17,7 @@ struct wlr_seat_client { struct wlr_seat *seat; // lists of wl_resource - struct wl_list wl_resources; + struct wl_list resources; struct wl_list pointers; struct wl_list keyboards; struct wl_list touches; @@ -170,7 +170,7 @@ struct wlr_seat_touch_state { }; struct wlr_seat { - struct wl_global *wl_global; + struct wl_global *global; struct wl_display *display; struct wl_list clients; struct wl_list drag_icons; // wlr_drag_icon::link diff --git a/include/wlr/types/wlr_server_decoration.h b/include/wlr/types/wlr_server_decoration.h index e457a0aa..23387968 100644 --- a/include/wlr/types/wlr_server_decoration.h +++ b/include/wlr/types/wlr_server_decoration.h @@ -27,8 +27,8 @@ enum wlr_server_decoration_manager_mode { }; struct wlr_server_decoration_manager { - struct wl_global *wl_global; - struct wl_list wl_resources; + struct wl_global *global; + struct wl_list resources; struct wl_list decorations; // wlr_server_decoration::link uint32_t default_mode; // enum wlr_server_decoration_manager_mode diff --git a/include/wlr/types/wlr_wl_shell.h b/include/wlr/types/wlr_wl_shell.h index 226b27a0..c4cc1999 100644 --- a/include/wlr/types/wlr_wl_shell.h +++ b/include/wlr/types/wlr_wl_shell.h @@ -6,8 +6,8 @@ #include <wlr/types/wlr_seat.h> struct wlr_wl_shell { - struct wl_global *wl_global; - struct wl_list wl_resources; + struct wl_global *global; + struct wl_list resources; struct wl_list surfaces; struct wl_list popup_grabs; uint32_t ping_timeout; diff --git a/include/wlr/types/wlr_xdg_output.h b/include/wlr/types/wlr_xdg_output.h index 5e6a0780..81566ab9 100644 --- a/include/wlr/types/wlr_xdg_output.h +++ b/include/wlr/types/wlr_xdg_output.h @@ -10,6 +10,9 @@ struct wlr_xdg_output { struct wlr_output_layout_output *layout_output; + int32_t x, y; + int32_t width, height; + struct wl_listener destroy; }; diff --git a/include/wlr/types/wlr_xdg_shell.h b/include/wlr/types/wlr_xdg_shell.h index 7b1c8f13..9c0e6adc 100644 --- a/include/wlr/types/wlr_xdg_shell.h +++ b/include/wlr/types/wlr_xdg_shell.h @@ -6,7 +6,7 @@ #include "xdg-shell-protocol.h" struct wlr_xdg_shell { - struct wl_global *wl_global; + struct wl_global *global; struct wl_list clients; struct wl_list popup_grabs; uint32_t ping_timeout; diff --git a/include/wlr/types/wlr_xdg_shell_v6.h b/include/wlr/types/wlr_xdg_shell_v6.h index dfefb58b..2e1b6f11 100644 --- a/include/wlr/types/wlr_xdg_shell_v6.h +++ b/include/wlr/types/wlr_xdg_shell_v6.h @@ -7,7 +7,7 @@ #include "xdg-shell-unstable-v6-protocol.h" struct wlr_xdg_shell_v6 { - struct wl_global *wl_global; + struct wl_global *global; struct wl_list clients; struct wl_list popup_grabs; uint32_t ping_timeout; diff --git a/include/wlr/util/log.h b/include/wlr/util/log.h index 5528664b..098a020d 100644 --- a/include/wlr/util/log.h +++ b/include/wlr/util/log.h @@ -6,35 +6,36 @@ #include <string.h> #include <errno.h> -typedef enum { - L_SILENT = 0, - L_ERROR = 1, - L_INFO = 2, - L_DEBUG = 3, - L_LAST, -} log_importance_t; +enum wlr_log_importance { + WLR_SILENT = 0, + WLR_ERROR = 1, + WLR_INFO = 2, + WLR_DEBUG = 3, + WLR_LOG_IMPORTANCE_LAST, +}; -typedef void (*log_callback_t)(log_importance_t importance, const char *fmt, va_list args); +typedef void (*wlr_log_func_t)(enum wlr_log_importance importance, + const char *fmt, va_list args); // Will log all messages less than or equal to `verbosity` // If `callback` is NULL, wlr will use its default logger. -void wlr_log_init(log_importance_t verbosity, log_callback_t callback); +void wlr_log_init(enum wlr_log_importance verbosity, wlr_log_func_t callback); #ifdef __GNUC__ -#define ATTRIB_PRINTF(start, end) __attribute__((format(printf, start, end))) +#define _WLR_ATTRIB_PRINTF(start, end) __attribute__((format(printf, start, end))) #else -#define ATTRIB_PRINTF(start, end) +#define _WLR_ATTRIB_PRINTF(start, end) #endif -void _wlr_log(log_importance_t verbosity, const char *format, ...) ATTRIB_PRINTF(2, 3); -void _wlr_vlog(log_importance_t verbosity, const char *format, va_list args) ATTRIB_PRINTF(2, 0); -const char *wlr_strip_path(const char *filepath); +void _wlr_log(enum wlr_log_importance verbosity, const char *format, ...) _WLR_ATTRIB_PRINTF(2, 3); +void _wlr_vlog(enum wlr_log_importance verbosity, const char *format, va_list args) _WLR_ATTRIB_PRINTF(2, 0); +const char *_wlr_strip_path(const char *filepath); #define wlr_log(verb, fmt, ...) \ - _wlr_log(verb, "[%s:%d] " fmt, wlr_strip_path(__FILE__), __LINE__, ##__VA_ARGS__) + _wlr_log(verb, "[%s:%d] " fmt, _wlr_strip_path(__FILE__), __LINE__, ##__VA_ARGS__) #define wlr_vlog(verb, fmt, args) \ - _wlr_vlog(verb, "[%s:%d] " fmt, wlr_strip_path(__FILE__), __LINE__, args) + _wlr_vlog(verb, "[%s:%d] " fmt, _wlr_strip_path(__FILE__), __LINE__, args) #define wlr_log_errno(verb, fmt, ...) \ wlr_log(verb, fmt ": %s", ##__VA_ARGS__, strerror(errno)) |