From: SooChan Lim Date: Sun, 6 Mar 2022 23:10:09 +0000 (+0900) Subject: Put the extern "C" X-Git-Tag: submit/tizen/20220720.024540~105 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=704347f05007f8b4f204b1bebcc511f949f6c325;p=platform%2Fcore%2Fuifw%2Flibds-tizen.git Put the extern "C" Without this extern "C", C++ program which uses libds does not recognize the symbols in libds header files. Change-Id: I2b9904c6dd9f50eab4c15f66ce3b6d9328b213b2 --- diff --git a/include/libds/allocator.h b/include/libds/allocator.h index d4a6a80..7f26a96 100644 --- a/include/libds/allocator.h +++ b/include/libds/allocator.h @@ -3,6 +3,10 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + struct ds_allocator; void @@ -16,4 +20,8 @@ void ds_allocator_add_destroy_listener(struct ds_allocator *alloc, struct wl_listener *listener); +#ifdef __cplusplus +} +#endif + #endif diff --git a/include/libds/allocator/shm.h b/include/libds/allocator/shm.h index 1a02338..c151183 100644 --- a/include/libds/allocator/shm.h +++ b/include/libds/allocator/shm.h @@ -3,7 +3,15 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + struct ds_allocator * ds_shm_allocator_create(void); +#ifdef __cplusplus +} +#endif + #endif diff --git a/include/libds/allocator/tbm.h b/include/libds/allocator/tbm.h index 1457e3f..c02aee3 100644 --- a/include/libds/allocator/tbm.h +++ b/include/libds/allocator/tbm.h @@ -3,10 +3,18 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + struct ds_allocator * ds_tbm_allocator_create(void); WL_EXPORT void * ds_tbm_buffer_get_surface(struct ds_buffer *ds_buffer); +#ifdef __cplusplus +} +#endif + #endif diff --git a/include/libds/backend/tdm.h b/include/libds/backend/tdm.h index ec5f9cc..e697413 100644 --- a/include/libds/backend/tdm.h +++ b/include/libds/backend/tdm.h @@ -3,7 +3,15 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + struct ds_backend * ds_tdm_backend_create(struct wl_display *display); +#ifdef __cplusplus +} +#endif + #endif diff --git a/include/libds/backend/wayland.h b/include/libds/backend/wayland.h index e7f233a..2be8d76 100644 --- a/include/libds/backend/wayland.h +++ b/include/libds/backend/wayland.h @@ -4,10 +4,18 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif + struct ds_backend * ds_wl_backend_create(struct wl_display *display, const char *server_name); struct ds_output * ds_wl_backend_create_output(struct ds_backend *backend); +#ifdef __cplusplus +} +#endif + #endif diff --git a/include/libds/output.h b/include/libds/output.h index d2454fc..d56690e 100644 --- a/include/libds/output.h +++ b/include/libds/output.h @@ -4,6 +4,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif + struct ds_output; struct ds_output_mode { @@ -41,4 +45,8 @@ void ds_output_add_commit_listener(struct ds_output *output, struct wl_listener *listener); +#ifdef __cplusplus +} +#endif + #endif diff --git a/include/libds/swapchain.h b/include/libds/swapchain.h index d78d428..61d8a68 100644 --- a/include/libds/swapchain.h +++ b/include/libds/swapchain.h @@ -3,6 +3,10 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + struct ds_swapchain; struct ds_swapchain * @@ -19,4 +23,8 @@ void ds_swapchain_set_buffer_submitted(struct ds_swapchain *swapchain, struct ds_buffer *buffer); +#ifdef __cplusplus +} +#endif + #endif diff --git a/include/libds/xdg_shell.h b/include/libds/xdg_shell.h index e3b386f..624c327 100644 --- a/include/libds/xdg_shell.h +++ b/include/libds/xdg_shell.h @@ -6,6 +6,10 @@ #include "surface.h" +#ifdef __cplusplus +extern "C" { +#endif + struct ds_xdg_shell; struct ds_xdg_surface; @@ -47,4 +51,8 @@ uint32_t ds_xdg_toplevel_set_activated(struct ds_xdg_surface *surface, bool activated); +#ifdef __cplusplus +} +#endif + #endif