fix(listeners): 公共头添加 extern "C" 链接说明以支持 C++ 包含
This commit is contained in:
@@ -4,6 +4,10 @@
|
|||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <zdwm/types.h>
|
#include <zdwm/types.h>
|
||||||
|
|
||||||
|
#if defined(__cplusplus)
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef void
|
typedef void
|
||||||
zdwm_current_output_id_listener(zdwm_output_id_t output_id, void *user_data);
|
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_updated(const zdwm_window_t *window, void *user_data);
|
||||||
typedef void zdwm_window_removed(zdwm_window_id_t window_id, 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 */
|
#endif /* ZDWM_LISTENERS_H */
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ LISTENERS(window_removed, zdwm_window_removed);
|
|||||||
#undef ITEM
|
#undef ITEM
|
||||||
#undef LISTENERS
|
#undef LISTENERS
|
||||||
|
|
||||||
typedef struct zdwm_listeners_t {
|
typedef struct listeners_t {
|
||||||
output_listeners_t output_listeners;
|
output_listeners_t output_listeners;
|
||||||
initial_workspace_list_listeners_t initial_workspace_listeners;
|
initial_workspace_list_listeners_t initial_workspace_listeners;
|
||||||
workspace_active_listeners_t active_workspace_listeners;
|
workspace_active_listeners_t active_workspace_listeners;
|
||||||
|
|||||||
Reference in New Issue
Block a user