From edde023f5aa552319dde4b54005fe1272b2e485f Mon Sep 17 00:00:00 2001 From: Zedhugh Chen Date: Sun, 17 May 2026 03:35:11 +0800 Subject: [PATCH] =?UTF-8?q?fix(listeners):=20=E5=85=AC=E5=85=B1=E5=A4=B4?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20extern=20"C"=20=E9=93=BE=E6=8E=A5=E8=AF=B4?= =?UTF-8?q?=E6=98=8E=E4=BB=A5=E6=94=AF=E6=8C=81=20C++=20=E5=8C=85=E5=90=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/zdwm/listeners.h | 8 +++++++- src/core/listeners.h | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/include/zdwm/listeners.h b/include/zdwm/listeners.h index 9cd30e8..42ae4bf 100644 --- a/include/zdwm/listeners.h +++ b/include/zdwm/listeners.h @@ -4,6 +4,10 @@ #include #include +#if defined(__cplusplus) +extern "C" { +#endif + typedef void zdwm_current_output_id_listener(zdwm_output_id_t output_id, void *user_data); @@ -58,6 +62,8 @@ typedef void zdwm_window_added(const zdwm_window_t *window, void *user_data); typedef void zdwm_window_updated(const zdwm_window_t *window, void *user_data); typedef void zdwm_window_removed(zdwm_window_id_t window_id, void *user_data); -typedef struct zdwm_listeners_t zdwm_listeners_t; +#if defined(__cplusplus) +} +#endif #endif /* ZDWM_LISTENERS_H */ diff --git a/src/core/listeners.h b/src/core/listeners.h index 061c6d2..b36b275 100644 --- a/src/core/listeners.h +++ b/src/core/listeners.h @@ -30,7 +30,7 @@ LISTENERS(window_removed, zdwm_window_removed); #undef ITEM #undef LISTENERS -typedef struct zdwm_listeners_t { +typedef struct listeners_t { output_listeners_t output_listeners; initial_workspace_list_listeners_t initial_workspace_listeners; workspace_active_listeners_t active_workspace_listeners;