fix(listeners): 公共头添加 extern "C" 链接说明以支持 C++ 包含

This commit is contained in:
2026-05-17 03:35:11 +08:00
parent 74319e97f1
commit edde023f5a
2 changed files with 8 additions and 2 deletions

View File

@@ -4,6 +4,10 @@
#include <stddef.h>
#include <zdwm/types.h>
#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 */

View File

@@ -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;