[digesting_libdecor] forward declare all of the vtables

main
Allen Webster 2026-02-25 19:38:47 -08:00
parent 429ad60b74
commit 8467af0fd8
2 changed files with 26 additions and 22 deletions

View File

@ -62,6 +62,17 @@ exit 0
#include "digesting_libdecor.h"
//@global vtables
const struct wl_registry_listener wl_registry_listener;
const struct xdg_surface_listener xdg_surface_listener;
const struct xdg_toplevel_listener xdg_toplevel_listener;
const struct zxdg_toplevel_decoration_v1_listener xdg_toplevel_decoration_listener;
const struct xdg_wm_base_listener xdg_wm_base_listener;
const struct wl_callback_listener init_wl_display_callback_listener;
const struct wl_buffer_listener buffer_listener;
const struct wl_callback_listener shm_callback_listener;
const struct wl_registry_listener registry_listener;
const struct wl_callback_listener globals_callback_listener;
// X(N:name,R:return,P:params)
#define GL_FUNCS_XLIST(X)\
@ -77,16 +88,6 @@ GL_FUNCS_XLIST(X)
static Ctx ctx = {0};
typedef struct libdecor_plugin * (* libdecor_plugin_constructor)(void);
enum libdecor_plugin_capabilities {
LIBDECOR_PLUGIN_CAPABILITY_BASE = 1 << 0,
};
const struct wl_registry_listener scrap__registry_listener;
const struct wl_callback_listener init_wl_display_callback_listener;
/* (1) Appendix A: wl_registry::global
** " The event notifies the client that a global object with the given
** name is now available "
@ -205,10 +206,6 @@ libdecorevent__frame_bounds(struct libdecor_frame *frame,
void *user_data){
}
struct libdecor_frame* libdecor_decorate(struct wl_surface *wl_surface, void *user_data);
int libdecor_dispatch(int timeout);
static struct libdecor_plugin * libdecor_plugin_new(void);
int main(){
/*~ NOTE:
**~ initialize Wayland, Libdecor, & EGL
@ -772,7 +769,7 @@ xdg_surface_configure(void *user_data,
libdecor_configuration_free(configuration);
}
static const struct xdg_surface_listener xdg_surface_listener = {
const struct xdg_surface_listener xdg_surface_listener = {
xdg_surface_configure,
};
@ -927,7 +924,7 @@ xdg_toplevel_wm_capabilities(void *user_data,
}
#endif
static const struct xdg_toplevel_listener xdg_toplevel_listener = {
const struct xdg_toplevel_listener xdg_toplevel_listener = {
xdg_toplevel_configure,
xdg_toplevel_close,
#ifdef XDG_TOPLEVEL_CONFIGURE_BOUNDS_SINCE_VERSION
@ -953,7 +950,7 @@ toplevel_decoration_configure(
}
}
static const struct zxdg_toplevel_decoration_v1_listener
const struct zxdg_toplevel_decoration_v1_listener
xdg_toplevel_decoration_listener = {
toplevel_decoration_configure,
};
@ -1742,7 +1739,7 @@ xdg_wm_base_ping(void *user_data,
xdg_wm_base_pong(xdg_wm_base, serial);
}
static const struct xdg_wm_base_listener xdg_wm_base_listener = {
const struct xdg_wm_base_listener xdg_wm_base_listener = {
xdg_wm_base_ping,
};
@ -2750,7 +2747,7 @@ buffer_release(void *user_data,
buffer->in_use = false;
}
static const struct wl_buffer_listener buffer_listener = {
const struct wl_buffer_listener buffer_listener = {
buffer_release
};
@ -4023,7 +4020,7 @@ shm_callback(void *user_data, struct wl_callback *callback, uint32_t time){
libdecor_notify_plugin_ready();
}
static const struct wl_callback_listener shm_callback_listener = {
const struct wl_callback_listener shm_callback_listener = {
shm_callback
};
@ -5039,7 +5036,7 @@ registry_handle_global_remove(void *user_data,
}
}
static const struct wl_registry_listener registry_listener = {
const struct wl_registry_listener registry_listener = {
registry_handle_global,
registry_handle_global_remove
};
@ -5068,7 +5065,7 @@ globals_callback(void *user_data,
plugin_gtk->globals_callback = NULL;
}
static const struct wl_callback_listener globals_callback_listener = {
const struct wl_callback_listener globals_callback_listener = {
globals_callback
};

View File

@ -550,6 +550,9 @@ bool libdecor_configuration_get_content_size(struct libdecor_configuration *conf
bool libdecor_configuration_get_window_state(struct libdecor_configuration *configuration,
enum libdecor_window_state *window_state);
struct libdecor_frame* libdecor_decorate(struct wl_surface *wl_surface, void *user_data);
int libdecor_dispatch(int timeout);
// libdecor-plugin.h
struct wl_surface * libdecor_frame_get_wl_surface(struct libdecor_frame *frame);
@ -603,6 +606,10 @@ enum libdecor_color_scheme libdecor_get_color_scheme();
int libdecor_os_create_anonymous_file(off_t size);
// #include "plugins/gtk/libdecor-gtk.c"
static struct libdecor_plugin * libdecor_plugin_new(void);
// digesting_libdecor
typedef struct Ctx{