From: Junseok, Kim Date: Wed, 12 Aug 2020 08:42:10 +0000 (+0900) Subject: DSWaylandServer: replace from std::string to wl_array pointer inside of dswayland... X-Git-Tag: accepted/tizen/unified/20200820.213435~79 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F96%2F241796%2F1;p=platform%2Fcore%2Fuifw%2Flibds.git DSWaylandServer: replace from std::string to wl_array pointer inside of dswayland-server code/header files Change-Id: Ib9c20b6fa76bdb6ae0c6f9c66474f954a14aefb8 Signed-off-by: Junseok, Kim --- diff --git a/src/DSWaylandServer/dswayland-server-input-method.cpp b/src/DSWaylandServer/dswayland-server-input-method.cpp index 59b856c..c556a9c 100644 --- a/src/DSWaylandServer/dswayland-server-input-method.cpp +++ b/src/DSWaylandServer/dswayland-server-input-method.cpp @@ -229,7 +229,7 @@ namespace DSWaylandServer { { } - void wl_input_method_context::input_method_context_modifiers_map(Resource *, wl_array *) + void wl_input_method_context::input_method_context_modifiers_map(Resource *, struct ::wl_array *) { } @@ -409,7 +409,7 @@ namespace DSWaylandServer { void wl_input_method_context::handle_modifiers_map( ::wl_client *client, struct wl_resource *resource, - wl_array *map) + struct ::wl_array *map) { DS_UNUSED(client); Resource *r = Resource::fromResource(resource); diff --git a/src/DSWaylandServer/dswayland-server-input-method.h b/src/DSWaylandServer/dswayland-server-input-method.h index 3e9107c..cea8f8c 100644 --- a/src/DSWaylandServer/dswayland-server-input-method.h +++ b/src/DSWaylandServer/dswayland-server-input-method.h @@ -116,7 +116,7 @@ namespace DSWaylandServer { virtual void input_method_context_preedit_cursor(Resource *resource, int32_t index); virtual void input_method_context_delete_surrounding_text(Resource *resource, int32_t index, uint32_t length); virtual void input_method_context_cursor_position(Resource *resource, int32_t index, int32_t anchor); - virtual void input_method_context_modifiers_map(Resource *resource, wl_array *map); + virtual void input_method_context_modifiers_map(Resource *resource, struct ::wl_array *map); virtual void input_method_context_keysym(Resource *resource, uint32_t serial, uint32_t time, uint32_t sym, uint32_t state, uint32_t modifiers); virtual void input_method_context_grab_keyboard(Resource *resource, uint32_t keyboard); virtual void input_method_context_key(Resource *resource, uint32_t serial, uint32_t time, uint32_t key, uint32_t state); @@ -184,7 +184,7 @@ namespace DSWaylandServer { static void handle_modifiers_map( ::wl_client *client, struct wl_resource *resource, - wl_array *map); + struct ::wl_array *map); static void handle_keysym( ::wl_client *client, struct wl_resource *resource, diff --git a/src/DSWaylandServer/dswayland-server-text.cpp b/src/DSWaylandServer/dswayland-server-text.cpp index c8dcc2f..dd09ddd 100644 --- a/src/DSWaylandServer/dswayland-server-text.cpp +++ b/src/DSWaylandServer/dswayland-server-text.cpp @@ -668,7 +668,7 @@ namespace DSWaylandServer { } - void wl_text_input::send_modifiers_map(const std::string &map) + void wl_text_input::send_modifiers_map(struct ::wl_array *map) { DS_ASSERT_X(m_resource, "wl_text_input::modifiers_map", "Uninitialised resource"); if (DS_UNLIKELY(!m_resource)) { @@ -680,16 +680,11 @@ namespace DSWaylandServer { map); } - void wl_text_input::send_modifiers_map(struct ::wl_resource *resource, const std::string &map) + void wl_text_input::send_modifiers_map(struct ::wl_resource *resource, struct ::wl_array *map) { - struct wl_array map_data; - map_data.size = map.size(); - map_data.data = static_cast(const_cast(map.c_str())); - map_data.alloc = 0; - wl_text_input_send_modifiers_map( resource, - &map_data); + map); } diff --git a/src/DSWaylandServer/dswayland-server-text.h b/src/DSWaylandServer/dswayland-server-text.h index fa36a9f..20c4721 100644 --- a/src/DSWaylandServer/dswayland-server-text.h +++ b/src/DSWaylandServer/dswayland-server-text.h @@ -168,8 +168,8 @@ namespace DSWaylandServer { void send_enter(struct ::wl_resource *resource, struct ::wl_resource *surface); void send_leave(); void send_leave(struct ::wl_resource *resource); - void send_modifiers_map(const std::string &map); - void send_modifiers_map(struct ::wl_resource *resource, const std::string &map); + void send_modifiers_map(struct ::wl_array *map); + void send_modifiers_map(struct ::wl_resource *resource, struct ::wl_array *map); void send_input_panel_state(uint32_t state); void send_input_panel_state(struct ::wl_resource *resource, uint32_t state); void send_preedit_string(uint32_t serial, const std::string &text, const std::string &commit); diff --git a/src/DSWaylandServer/dswayland-server-tizen-extension.cpp b/src/DSWaylandServer/dswayland-server-tizen-extension.cpp index 064c104..5634e9e 100644 --- a/src/DSWaylandServer/dswayland-server-tizen-extension.cpp +++ b/src/DSWaylandServer/dswayland-server-tizen-extension.cpp @@ -1414,7 +1414,7 @@ namespace DSWaylandServer { } - void tizen_policy::send_supported_aux_hints(struct ::wl_resource *surface, const std::string &hints, uint32_t num_hints) + void tizen_policy::send_supported_aux_hints(struct ::wl_resource *surface, struct ::wl_array *hints, uint32_t num_hints) { DS_ASSERT_X(m_resource, "tizen_policy::supported_aux_hints", "Uninitialised resource"); if (DS_UNLIKELY(!m_resource)) { @@ -1428,17 +1428,12 @@ namespace DSWaylandServer { num_hints); } - void tizen_policy::send_supported_aux_hints(struct ::wl_resource *resource, struct ::wl_resource *surface, const std::string &hints, uint32_t num_hints) + void tizen_policy::send_supported_aux_hints(struct ::wl_resource *resource, struct ::wl_resource *surface, struct ::wl_array *hints, uint32_t num_hints) { - struct wl_array hints_data; - hints_data.size = hints.size(); - hints_data.data = static_cast(const_cast(hints.c_str())); - hints_data.alloc = 0; - tizen_policy_send_supported_aux_hints( resource, surface, - &hints_data, + hints, num_hints); } @@ -1465,7 +1460,7 @@ namespace DSWaylandServer { } - void tizen_policy::send_aux_message(struct ::wl_resource *surface, const std::string &key, const std::string &value, const std::string &options) + void tizen_policy::send_aux_message(struct ::wl_resource *surface, const std::string &key, const std::string &value, struct ::wl_array *options) { DS_ASSERT_X(m_resource, "tizen_policy::aux_message", "Uninitialised resource"); if (DS_UNLIKELY(!m_resource)) { @@ -1480,19 +1475,14 @@ namespace DSWaylandServer { options); } - void tizen_policy::send_aux_message(struct ::wl_resource *resource, struct ::wl_resource *surface, const std::string &key, const std::string &value, const std::string &options) + void tizen_policy::send_aux_message(struct ::wl_resource *resource, struct ::wl_resource *surface, const std::string &key, const std::string &value, struct ::wl_array *options) { - struct wl_array options_data; - options_data.size = options.size(); - options_data.data = static_cast(const_cast(options.c_str())); - options_data.alloc = 0; - tizen_policy_send_aux_message( resource, surface, key.c_str(), value.c_str(), - &options_data); + options); } @@ -2965,11 +2955,11 @@ namespace DSWaylandServer { { } - void tizen_keyrouter::tizen_keyrouter_set_keygrab_list(Resource *, struct ::wl_resource *, wl_array *) + void tizen_keyrouter::tizen_keyrouter_set_keygrab_list(Resource *, struct ::wl_resource *, struct ::wl_array *) { } - void tizen_keyrouter::tizen_keyrouter_unset_keygrab_list(Resource *, struct ::wl_resource *, wl_array *) + void tizen_keyrouter::tizen_keyrouter_unset_keygrab_list(Resource *, struct ::wl_resource *, struct ::wl_array *) { } @@ -3042,7 +3032,7 @@ namespace DSWaylandServer { ::wl_client *client, struct wl_resource *resource, struct ::wl_resource *surface, - wl_array *grab_list) + struct ::wl_array *grab_list) { DS_UNUSED(client); Resource *r = Resource::fromResource(resource); @@ -3056,7 +3046,7 @@ namespace DSWaylandServer { ::wl_client *client, struct wl_resource *resource, struct ::wl_resource *surface, - wl_array *ungrab_list) + struct ::wl_array *ungrab_list) { DS_UNUSED(client); Resource *r = Resource::fromResource(resource); @@ -3156,7 +3146,7 @@ namespace DSWaylandServer { } - void tizen_keyrouter::send_keygrab_notify_list(struct ::wl_resource *surface, const std::string &grab_result) + void tizen_keyrouter::send_keygrab_notify_list(struct ::wl_resource *surface, struct ::wl_array *grab_result) { DS_ASSERT_X(m_resource, "tizen_keyrouter::keygrab_notify_list", "Uninitialised resource"); if (DS_UNLIKELY(!m_resource)) { @@ -3169,21 +3159,16 @@ namespace DSWaylandServer { grab_result); } - void tizen_keyrouter::send_keygrab_notify_list(struct ::wl_resource *resource, struct ::wl_resource *surface, const std::string &grab_result) + void tizen_keyrouter::send_keygrab_notify_list(struct ::wl_resource *resource, struct ::wl_resource *surface, struct ::wl_array *grab_result) { - struct wl_array grab_result_data; - grab_result_data.size = grab_result.size(); - grab_result_data.data = static_cast(const_cast(grab_result.c_str())); - grab_result_data.alloc = 0; - tizen_keyrouter_send_keygrab_notify_list( resource, surface, - &grab_result_data); + grab_result); } - void tizen_keyrouter::send_getgrab_notify_list(struct ::wl_resource *surface, const std::string &grab_result) + void tizen_keyrouter::send_getgrab_notify_list(struct ::wl_resource *surface, struct ::wl_array *grab_result) { DS_ASSERT_X(m_resource, "tizen_keyrouter::getgrab_notify_list", "Uninitialised resource"); if (DS_UNLIKELY(!m_resource)) { @@ -3196,17 +3181,12 @@ namespace DSWaylandServer { grab_result); } - void tizen_keyrouter::send_getgrab_notify_list(struct ::wl_resource *resource, struct ::wl_resource *surface, const std::string &grab_result) + void tizen_keyrouter::send_getgrab_notify_list(struct ::wl_resource *resource, struct ::wl_resource *surface, struct ::wl_array *grab_result) { - struct wl_array grab_result_data; - grab_result_data.size = grab_result.size(); - grab_result_data.data = static_cast(const_cast(grab_result.c_str())); - grab_result_data.alloc = 0; - tizen_keyrouter_send_getgrab_notify_list( resource, surface, - &grab_result_data); + grab_result); } @@ -6010,7 +5990,7 @@ namespace DSWaylandServer { tizen_input_device::handle_release }; - void tizen_input_device::tizen_input_device_select_axes(Resource *, wl_array *) + void tizen_input_device::tizen_input_device_select_axes(Resource *, struct ::wl_array *) { } @@ -6022,7 +6002,7 @@ namespace DSWaylandServer { void tizen_input_device::handle_select_axes( ::wl_client *client, struct wl_resource *resource, - wl_array *axes) + struct ::wl_array *axes) { DS_UNUSED(client); Resource *r = Resource::fromResource(resource); @@ -6041,7 +6021,7 @@ namespace DSWaylandServer { r); } - void tizen_input_device::send_device_info(const std::string &name, uint32_t clas, uint32_t subclas, const std::string &axes) + void tizen_input_device::send_device_info(const std::string &name, uint32_t clas, uint32_t subclas, struct ::wl_array *axes) { DS_ASSERT_X(m_resource, "tizen_input_device::device_info", "Uninitialised resource"); if (DS_UNLIKELY(!m_resource)) { @@ -6056,19 +6036,14 @@ namespace DSWaylandServer { axes); } - void tizen_input_device::send_device_info(struct ::wl_resource *resource, const std::string &name, uint32_t clas, uint32_t subclas, const std::string &axes) + void tizen_input_device::send_device_info(struct ::wl_resource *resource, const std::string &name, uint32_t clas, uint32_t subclas, struct ::wl_array *axes) { - struct wl_array axes_data; - axes_data.size = axes.size(); - axes_data.data = static_cast(const_cast(axes.c_str())); - axes_data.alloc = 0; - tizen_input_device_send_device_info( resource, name.c_str(), clas, subclas, - &axes_data); + axes); } @@ -6456,7 +6431,7 @@ namespace DSWaylandServer { { } - void tizen_launch_image::tizen_launch_image_launch(Resource *, const std::string &, uint32_t , uint32_t , uint32_t , uint32_t , wl_array *) + void tizen_launch_image::tizen_launch_image_launch(Resource *, const std::string &, uint32_t , uint32_t , uint32_t , uint32_t , struct ::wl_array *) { } @@ -6491,7 +6466,7 @@ namespace DSWaylandServer { uint32_t color_depth, uint32_t rotation, uint32_t indicator, - wl_array *options) + struct ::wl_array *options) { DS_UNUSED(client); Resource *r = Resource::fromResource(resource); diff --git a/src/DSWaylandServer/dswayland-server-tizen-extension.h b/src/DSWaylandServer/dswayland-server-tizen-extension.h index 10a2dc5..a3172f4 100644 --- a/src/DSWaylandServer/dswayland-server-tizen-extension.h +++ b/src/DSWaylandServer/dswayland-server-tizen-extension.h @@ -298,12 +298,12 @@ namespace DSWaylandServer { void send_window_screen_mode_done(struct ::wl_resource *resource, struct ::wl_resource *surface, uint32_t mode, uint32_t error_state); void send_iconify_state_changed(struct ::wl_resource *surface, uint32_t iconified, uint32_t force); void send_iconify_state_changed(struct ::wl_resource *resource, struct ::wl_resource *surface, uint32_t iconified, uint32_t force); - void send_supported_aux_hints(struct ::wl_resource *surface, const std::string &hints, uint32_t num_hints); - void send_supported_aux_hints(struct ::wl_resource *resource, struct ::wl_resource *surface, const std::string &hints, uint32_t num_hints); + void send_supported_aux_hints(struct ::wl_resource *surface, struct ::wl_array *hints, uint32_t num_hints); + void send_supported_aux_hints(struct ::wl_resource *resource, struct ::wl_resource *surface, struct ::wl_array *hints, uint32_t num_hints); void send_allowed_aux_hint(struct ::wl_resource *surface, int32_t id); void send_allowed_aux_hint(struct ::wl_resource *resource, struct ::wl_resource *surface, int32_t id); - void send_aux_message(struct ::wl_resource *surface, const std::string &key, const std::string &value, const std::string &options); - void send_aux_message(struct ::wl_resource *resource, struct ::wl_resource *surface, const std::string &key, const std::string &value, const std::string &options); + void send_aux_message(struct ::wl_resource *surface, const std::string &key, const std::string &value, struct ::wl_array *options); + void send_aux_message(struct ::wl_resource *resource, struct ::wl_resource *surface, const std::string &key, const std::string &value, struct ::wl_array *options); void send_conformant_region(struct ::wl_resource *surface, uint32_t conformant_part, uint32_t state, int32_t x, int32_t y, int32_t w, int32_t h, uint32_t serial); void send_conformant_region(struct ::wl_resource *resource, struct ::wl_resource *surface, uint32_t conformant_part, uint32_t state, int32_t x, int32_t y, int32_t w, int32_t h, uint32_t serial); @@ -1127,10 +1127,10 @@ namespace DSWaylandServer { void send_keygrab_notify(struct ::wl_resource *surface, uint32_t key, uint32_t mode, uint32_t error); void send_keygrab_notify(struct ::wl_resource *resource, struct ::wl_resource *surface, uint32_t key, uint32_t mode, uint32_t error); - void send_keygrab_notify_list(struct ::wl_resource *surface, const std::string &grab_result); - void send_keygrab_notify_list(struct ::wl_resource *resource, struct ::wl_resource *surface, const std::string &grab_result); - void send_getgrab_notify_list(struct ::wl_resource *surface, const std::string &grab_result); - void send_getgrab_notify_list(struct ::wl_resource *resource, struct ::wl_resource *surface, const std::string &grab_result); + void send_keygrab_notify_list(struct ::wl_resource *surface, struct ::wl_array *grab_result); + void send_keygrab_notify_list(struct ::wl_resource *resource, struct ::wl_resource *surface, struct ::wl_array *grab_result); + void send_getgrab_notify_list(struct ::wl_resource *surface, struct ::wl_array *grab_result); + void send_getgrab_notify_list(struct ::wl_resource *resource, struct ::wl_resource *surface, struct ::wl_array *grab_result); void send_set_register_none_key_notify(struct ::wl_resource *surface, uint32_t mode); void send_set_register_none_key_notify(struct ::wl_resource *resource, struct ::wl_resource *surface, uint32_t mode); void send_keyregister_notify(uint32_t status); @@ -1151,8 +1151,8 @@ namespace DSWaylandServer { virtual void tizen_keyrouter_set_keygrab(Resource *resource, struct ::wl_resource *surface, uint32_t key, uint32_t mode); virtual void tizen_keyrouter_unset_keygrab(Resource *resource, struct ::wl_resource *surface, uint32_t key); virtual void tizen_keyrouter_get_keygrab_status(Resource *resource, struct ::wl_resource *surface, uint32_t key); - virtual void tizen_keyrouter_set_keygrab_list(Resource *resource, struct ::wl_resource *surface, wl_array *grab_list); - virtual void tizen_keyrouter_unset_keygrab_list(Resource *resource, struct ::wl_resource *surface, wl_array *ungrab_list); + virtual void tizen_keyrouter_set_keygrab_list(Resource *resource, struct ::wl_resource *surface, struct ::wl_array *grab_list); + virtual void tizen_keyrouter_unset_keygrab_list(Resource *resource, struct ::wl_resource *surface, struct ::wl_array *ungrab_list); virtual void tizen_keyrouter_get_keygrab_list(Resource *resource, struct ::wl_resource *surface); virtual void tizen_keyrouter_set_register_none_key(Resource *resource, struct ::wl_resource *surface, uint32_t data); virtual void tizen_keyrouter_get_keyregister_status(Resource *resource, uint32_t data); @@ -1189,12 +1189,12 @@ namespace DSWaylandServer { ::wl_client *client, struct wl_resource *resource, struct ::wl_resource *surface, - wl_array *grab_list); + struct ::wl_array *grab_list); static void handle_unset_keygrab_list( ::wl_client *client, struct wl_resource *resource, struct ::wl_resource *surface, - wl_array *ungrab_list); + struct ::wl_array *ungrab_list); static void handle_get_keygrab_list( ::wl_client *client, struct wl_resource *resource, @@ -2346,8 +2346,8 @@ namespace DSWaylandServer { axis_type_detent = 5, // detent value e.g. moved distance with a rotary device }; - void send_device_info(const std::string &name, uint32_t clas, uint32_t subclas, const std::string &axes); - void send_device_info(struct ::wl_resource *resource, const std::string &name, uint32_t clas, uint32_t subclas, const std::string &axes); + void send_device_info(const std::string &name, uint32_t clas, uint32_t subclas, struct ::wl_array *axes); + void send_device_info(struct ::wl_resource *resource, const std::string &name, uint32_t clas, uint32_t subclas, struct ::wl_array *axes); void send_event_device(uint32_t serial, const std::string &name, uint32_t time); void send_event_device(struct ::wl_resource *resource, uint32_t serial, const std::string &name, uint32_t time); void send_axis(uint32_t axis_type, wl_fixed_t value); @@ -2359,7 +2359,7 @@ namespace DSWaylandServer { virtual void tizen_input_device_bind_resource(Resource *resource); virtual void tizen_input_device_destroy_resource(Resource *resource); - virtual void tizen_input_device_select_axes(Resource *resource, wl_array *axes); + virtual void tizen_input_device_select_axes(Resource *resource, struct ::wl_array *axes); virtual void tizen_input_device_release(Resource *resource); private: @@ -2375,7 +2375,7 @@ namespace DSWaylandServer { static void handle_select_axes( ::wl_client *client, struct wl_resource *resource, - wl_array *axes); + struct ::wl_array *axes); static void handle_release( ::wl_client *client, struct wl_resource *resource); @@ -2547,7 +2547,7 @@ namespace DSWaylandServer { virtual void tizen_launch_image_destroy_resource(Resource *resource); virtual void tizen_launch_image_destroy(Resource *resource); - virtual void tizen_launch_image_launch(Resource *resource, const std::string &file, uint32_t file_type, uint32_t color_depth, uint32_t rotation, uint32_t indicator, wl_array *options); + virtual void tizen_launch_image_launch(Resource *resource, const std::string &file, uint32_t file_type, uint32_t color_depth, uint32_t rotation, uint32_t indicator, struct ::wl_array *options); virtual void tizen_launch_image_owner(Resource *resource, uint32_t pid); virtual void tizen_launch_image_show(Resource *resource); virtual void tizen_launch_image_hide(Resource *resource); @@ -2573,7 +2573,7 @@ namespace DSWaylandServer { uint32_t color_depth, uint32_t rotation, uint32_t indicator, - wl_array *options); + struct ::wl_array *options); static void handle_owner( ::wl_client *client, struct wl_resource *resource, diff --git a/src/DSWaylandServer/dswayland-server-tizen-launch.cpp b/src/DSWaylandServer/dswayland-server-tizen-launch.cpp index aad026d..c8af51d 100644 --- a/src/DSWaylandServer/dswayland-server-tizen-launch.cpp +++ b/src/DSWaylandServer/dswayland-server-tizen-launch.cpp @@ -182,7 +182,7 @@ namespace DSWaylandServer { { } - void tizen_launch_effect::tizen_launch_effect_type_set(Resource *, const std::string &, uint32_t , wl_array *) + void tizen_launch_effect::tizen_launch_effect_type_set(Resource *, const std::string &, uint32_t , struct ::wl_array *) { } @@ -212,7 +212,7 @@ namespace DSWaylandServer { struct wl_resource *resource, const char *effect_type, uint32_t pid, - wl_array *options) + struct ::wl_array *options) { DS_UNUSED(client); Resource *r = Resource::fromResource(resource); @@ -401,7 +401,7 @@ namespace DSWaylandServer { { } - void tizen_launch_splash::tizen_launch_splash_launch(Resource *, const std::string &, uint32_t , uint32_t , uint32_t , uint32_t , const std::string &, const std::string &, wl_array *) + void tizen_launch_splash::tizen_launch_splash_launch(Resource *, const std::string &, uint32_t , uint32_t , uint32_t , uint32_t , const std::string &, const std::string &, struct ::wl_array *) { } @@ -409,7 +409,7 @@ namespace DSWaylandServer { { } - void tizen_launch_splash::tizen_launch_splash_launch_v2(Resource *, const std::string &, uint32_t , uint32_t , uint32_t , uint32_t , const std::string &, const std::string &, wl_array *, wl_array *) + void tizen_launch_splash::tizen_launch_splash_launch_v2(Resource *, const std::string &, uint32_t , uint32_t , uint32_t , uint32_t , const std::string &, const std::string &, struct ::wl_array *, struct ::wl_array *) { } @@ -434,7 +434,7 @@ namespace DSWaylandServer { uint32_t indicator, const char *effect_type, const char *theme_type, - wl_array *options) + struct ::wl_array *options) { DS_UNUSED(client); Resource *r = Resource::fromResource(resource); @@ -472,8 +472,8 @@ namespace DSWaylandServer { uint32_t indicator, const char *effect_type, const char *theme_type, - wl_array *options, - wl_array *extra_config) + struct ::wl_array *options, + struct ::wl_array *extra_config) { DS_UNUSED(client); Resource *r = Resource::fromResource(resource); diff --git a/src/DSWaylandServer/dswayland-server-tizen-launch.h b/src/DSWaylandServer/dswayland-server-tizen-launch.h index 516794e..d62a6a9 100644 --- a/src/DSWaylandServer/dswayland-server-tizen-launch.h +++ b/src/DSWaylandServer/dswayland-server-tizen-launch.h @@ -75,7 +75,7 @@ namespace DSWaylandServer { virtual void tizen_launch_effect_destroy_resource(Resource *resource); virtual void tizen_launch_effect_create_splash_img(Resource *resource, uint32_t id); - virtual void tizen_launch_effect_type_set(Resource *resource, const std::string &effect_type, uint32_t pid, wl_array *options); + virtual void tizen_launch_effect_type_set(Resource *resource, const std::string &effect_type, uint32_t pid, struct ::wl_array *options); virtual void tizen_launch_effect_type_unset(Resource *resource, uint32_t pid); virtual void tizen_launch_effect_destroy(Resource *resource); @@ -98,7 +98,7 @@ namespace DSWaylandServer { struct wl_resource *resource, const char *effect_type, uint32_t pid, - wl_array *options); + struct ::wl_array *options); static void handle_type_unset( ::wl_client *client, struct wl_resource *resource, @@ -189,9 +189,9 @@ namespace DSWaylandServer { virtual void tizen_launch_splash_destroy_resource(Resource *resource); virtual void tizen_launch_splash_destroy(Resource *resource); - virtual void tizen_launch_splash_launch(Resource *resource, const std::string &file, uint32_t file_type, uint32_t color_depth, uint32_t rotation, uint32_t indicator, const std::string &effect_type, const std::string &theme_type, wl_array *options); + virtual void tizen_launch_splash_launch(Resource *resource, const std::string &file, uint32_t file_type, uint32_t color_depth, uint32_t rotation, uint32_t indicator, const std::string &effect_type, const std::string &theme_type, struct ::wl_array *options); virtual void tizen_launch_splash_owner(Resource *resource, uint32_t pid); - virtual void tizen_launch_splash_launch_v2(Resource *resource, const std::string &file, uint32_t file_type, uint32_t color_depth, uint32_t rotation, uint32_t indicator, const std::string &effect_type, const std::string &theme_type, wl_array *options, wl_array *extra_config); + virtual void tizen_launch_splash_launch_v2(Resource *resource, const std::string &file, uint32_t file_type, uint32_t color_depth, uint32_t rotation, uint32_t indicator, const std::string &effect_type, const std::string &theme_type, struct ::wl_array *options, struct ::wl_array *extra_config); private: static void bind_func(struct ::wl_client *client, void *data, uint32_t version, uint32_t id); @@ -216,7 +216,7 @@ namespace DSWaylandServer { uint32_t indicator, const char *effect_type, const char *theme_type, - wl_array *options); + struct ::wl_array *options); static void handle_owner( ::wl_client *client, struct wl_resource *resource, @@ -231,8 +231,8 @@ namespace DSWaylandServer { uint32_t indicator, const char *effect_type, const char *theme_type, - wl_array *options, - wl_array *extra_config); + struct ::wl_array *options, + struct ::wl_array *extra_config); std::multimap m_resource_map; Resource *m_resource; diff --git a/src/DSWaylandServer/dswayland-server-tizen-remote-surface.cpp b/src/DSWaylandServer/dswayland-server-tizen-remote-surface.cpp index 037a4cb..005d160 100644 --- a/src/DSWaylandServer/dswayland-server-tizen-remote-surface.cpp +++ b/src/DSWaylandServer/dswayland-server-tizen-remote-surface.cpp @@ -1016,7 +1016,7 @@ namespace DSWaylandServer { } - void tizen_remote_surface::send_changed_buffer(uint32_t type, struct ::wl_resource *tbm, int32_t img_file_fd, uint32_t img_file_size, uint32_t time, const std::string &options) + void tizen_remote_surface::send_changed_buffer(uint32_t type, struct ::wl_resource *tbm, int32_t img_file_fd, uint32_t img_file_size, uint32_t time, struct ::wl_array *options) { DS_ASSERT_X(m_resource, "tizen_remote_surface::changed_buffer", "Uninitialised resource"); if (DS_UNLIKELY(!m_resource)) { @@ -1033,13 +1033,8 @@ namespace DSWaylandServer { options); } - void tizen_remote_surface::send_changed_buffer(struct ::wl_resource *resource, uint32_t type, struct ::wl_resource *tbm, int32_t img_file_fd, uint32_t img_file_size, uint32_t time, const std::string &options) + void tizen_remote_surface::send_changed_buffer(struct ::wl_resource *resource, uint32_t type, struct ::wl_resource *tbm, int32_t img_file_fd, uint32_t img_file_size, uint32_t time, struct ::wl_array *options) { - struct wl_array options_data; - options_data.size = options.size(); - options_data.data = static_cast(const_cast(options.c_str())); - options_data.alloc = 0; - tizen_remote_surface_send_changed_buffer( resource, type, @@ -1047,7 +1042,7 @@ namespace DSWaylandServer { img_file_fd, img_file_size, time, - &options_data); + options); } diff --git a/src/DSWaylandServer/dswayland-server-tizen-remote-surface.h b/src/DSWaylandServer/dswayland-server-tizen-remote-surface.h index 6c95bd8..68467c2 100644 --- a/src/DSWaylandServer/dswayland-server-tizen-remote-surface.h +++ b/src/DSWaylandServer/dswayland-server-tizen-remote-surface.h @@ -342,8 +342,8 @@ namespace DSWaylandServer { void send_update_buffer(struct ::wl_resource *resource, struct ::wl_resource *buffer, uint32_t time); void send_missing(); void send_missing(struct ::wl_resource *resource); - void send_changed_buffer(uint32_t type, struct ::wl_resource *tbm, int32_t img_file_fd, uint32_t img_file_size, uint32_t time, const std::string &options); - void send_changed_buffer(struct ::wl_resource *resource, uint32_t type, struct ::wl_resource *tbm, int32_t img_file_fd, uint32_t img_file_size, uint32_t time, const std::string &options); + void send_changed_buffer(uint32_t type, struct ::wl_resource *tbm, int32_t img_file_fd, uint32_t img_file_size, uint32_t time, struct ::wl_array *options); + void send_changed_buffer(struct ::wl_resource *resource, uint32_t type, struct ::wl_resource *tbm, int32_t img_file_fd, uint32_t img_file_size, uint32_t time, struct ::wl_array *options); void send_input_event_filter(uint32_t event_filter); void send_input_event_filter(struct ::wl_resource *resource, uint32_t event_filter); diff --git a/src/DSWaylandServer/dswayland-server-tzsh.cpp b/src/DSWaylandServer/dswayland-server-tzsh.cpp index a584ec8..7d865d0 100644 --- a/src/DSWaylandServer/dswayland-server-tzsh.cpp +++ b/src/DSWaylandServer/dswayland-server-tzsh.cpp @@ -682,7 +682,7 @@ namespace DSWaylandServer { } - void tws_quickpanel::send_state_changed(const std::string &states) + void tws_quickpanel::send_state_changed(struct ::wl_array *states) { DS_ASSERT_X(m_resource, "tws_quickpanel::state_changed", "Uninitialised resource"); if (DS_UNLIKELY(!m_resource)) { @@ -694,16 +694,11 @@ namespace DSWaylandServer { states); } - void tws_quickpanel::send_state_changed(struct ::wl_resource *resource, const std::string &states) + void tws_quickpanel::send_state_changed(struct ::wl_resource *resource, struct ::wl_array *states) { - struct wl_array states_data; - states_data.size = states.size(); - states_data.data = static_cast(const_cast(states.c_str())); - states_data.alloc = 0; - tws_quickpanel_send_state_changed( resource, - &states_data); + states); } @@ -3636,7 +3631,7 @@ namespace DSWaylandServer { serial); } - void tws_service_launcher::send_prepare(uint32_t target_type, const std::string &target_info, uint32_t direction, int32_t x, int32_t y, const std::string &shared_widget_info, uint32_t serial) + void tws_service_launcher::send_prepare(uint32_t target_type, struct ::wl_array *target_info, uint32_t direction, int32_t x, int32_t y, const std::string &shared_widget_info, uint32_t serial) { DS_ASSERT_X(m_resource, "tws_service_launcher::prepare", "Uninitialised resource"); if (DS_UNLIKELY(!m_resource)) { @@ -3654,17 +3649,12 @@ namespace DSWaylandServer { serial); } - void tws_service_launcher::send_prepare(struct ::wl_resource *resource, uint32_t target_type, const std::string &target_info, uint32_t direction, int32_t x, int32_t y, const std::string &shared_widget_info, uint32_t serial) + void tws_service_launcher::send_prepare(struct ::wl_resource *resource, uint32_t target_type, struct ::wl_array *target_info, uint32_t direction, int32_t x, int32_t y, const std::string &shared_widget_info, uint32_t serial) { - struct wl_array target_info_data; - target_info_data.size = target_info.size(); - target_info_data.data = static_cast(const_cast(target_info.c_str())); - target_info_data.alloc = 0; - tws_service_launcher_send_prepare( resource, target_type, - &target_info_data, + target_info, direction, x, y, diff --git a/src/DSWaylandServer/dswayland-server-tzsh.h b/src/DSWaylandServer/dswayland-server-tzsh.h index ac75c1f..a573556 100644 --- a/src/DSWaylandServer/dswayland-server-tzsh.h +++ b/src/DSWaylandServer/dswayland-server-tzsh.h @@ -238,8 +238,8 @@ namespace DSWaylandServer { void send_state_get_done(int32_t type, int32_t value, uint32_t error_state); void send_state_get_done(struct ::wl_resource *resource, int32_t type, int32_t value, uint32_t error_state); - void send_state_changed(const std::string &states); - void send_state_changed(struct ::wl_resource *resource, const std::string &states); + void send_state_changed(struct ::wl_array *states); + void send_state_changed(struct ::wl_resource *resource, struct ::wl_array *states); protected: virtual Resource *tws_quickpanel_allocate(); @@ -1589,8 +1589,8 @@ namespace DSWaylandServer { error_wrong_request = 2, }; - void send_prepare(uint32_t target_type, const std::string &target_info, uint32_t direction, int32_t x, int32_t y, const std::string &shared_widget_info, uint32_t serial); - void send_prepare(struct ::wl_resource *resource, uint32_t target_type, const std::string &target_info, uint32_t direction, int32_t x, int32_t y, const std::string &shared_widget_info, uint32_t serial); + void send_prepare(uint32_t target_type, struct ::wl_array *target_info, uint32_t direction, int32_t x, int32_t y, const std::string &shared_widget_info, uint32_t serial); + void send_prepare(struct ::wl_resource *resource, uint32_t target_type, struct ::wl_array *target_info, uint32_t direction, int32_t x, int32_t y, const std::string &shared_widget_info, uint32_t serial); void send_stop(uint32_t serial); void send_stop(struct ::wl_resource *resource, uint32_t serial); void send_error(uint32_t code, uint32_t serial); diff --git a/src/DSWaylandServer/dswayland-server-wayland.cpp b/src/DSWaylandServer/dswayland-server-wayland.cpp index a6cb680..d9d66ac 100644 --- a/src/DSWaylandServer/dswayland-server-wayland.cpp +++ b/src/DSWaylandServer/dswayland-server-wayland.cpp @@ -3861,7 +3861,7 @@ namespace DSWaylandServer { } - void wl_keyboard::send_enter(uint32_t serial, struct ::wl_resource *surface, std::string keys) + void wl_keyboard::send_enter(uint32_t serial, struct ::wl_resource *surface, struct ::wl_array *keys) { DS_ASSERT_X(m_resource, "wl_keyboard::enter", "Uninitialised resource"); if (DS_UNLIKELY(!m_resource)) { @@ -3875,16 +3875,13 @@ namespace DSWaylandServer { keys); } - void wl_keyboard::send_enter(struct ::wl_resource *resource, uint32_t serial, struct ::wl_resource *surface, std::string keys) + void wl_keyboard::send_enter(struct ::wl_resource *resource, uint32_t serial, struct ::wl_resource *surface, struct ::wl_array *keys) { - struct wl_array keys_data; - wl_array_init(&keys_data); wl_keyboard_send_enter( resource, serial, surface, - &keys_data); - wl_array_release(&keys_data); + keys); } diff --git a/src/DSWaylandServer/dswayland-server-wayland.h b/src/DSWaylandServer/dswayland-server-wayland.h index 9e54b16..2a1bc52 100644 --- a/src/DSWaylandServer/dswayland-server-wayland.h +++ b/src/DSWaylandServer/dswayland-server-wayland.h @@ -1673,8 +1673,8 @@ namespace DSWaylandServer { void send_keymap(uint32_t format, int32_t fd, uint32_t size); void send_keymap(struct ::wl_resource *resource, uint32_t format, int32_t fd, uint32_t size); - void send_enter(uint32_t serial, struct ::wl_resource *surface, std::string keys); - void send_enter(struct ::wl_resource *resource, uint32_t serial, struct ::wl_resource *surface, std::string keys); + void send_enter(uint32_t serial, struct ::wl_resource *surface, struct ::wl_array *keys); + void send_enter(struct ::wl_resource *resource, uint32_t serial, struct ::wl_resource *surface, struct ::wl_array *keys); void send_leave(uint32_t serial, struct ::wl_resource *surface); void send_leave(struct ::wl_resource *resource, uint32_t serial, struct ::wl_resource *surface); void send_key(uint32_t serial, uint32_t time, uint32_t key, uint32_t state); diff --git a/src/DSWaylandServer/dswayland-server-xdg-shell-unstable-v6.cpp b/src/DSWaylandServer/dswayland-server-xdg-shell-unstable-v6.cpp index ea76829..5758fc4 100644 --- a/src/DSWaylandServer/dswayland-server-xdg-shell-unstable-v6.cpp +++ b/src/DSWaylandServer/dswayland-server-xdg-shell-unstable-v6.cpp @@ -1194,7 +1194,7 @@ namespace DSWaylandServer { r); } - void zxdg_toplevel_v6::send_configure(int32_t width, int32_t height, const std::string &states) + void zxdg_toplevel_v6::send_configure(int32_t width, int32_t height, struct ::wl_array *states) { DS_ASSERT_X(m_resource, "zxdg_toplevel_v6::configure", "Uninitialised resource"); if (DS_UNLIKELY(!m_resource)) { @@ -1208,18 +1208,13 @@ namespace DSWaylandServer { states); } - void zxdg_toplevel_v6::send_configure(struct ::wl_resource *resource, int32_t width, int32_t height, const std::string &states) + void zxdg_toplevel_v6::send_configure(struct ::wl_resource *resource, int32_t width, int32_t height, struct ::wl_array *states) { - struct wl_array states_data; - states_data.size = states.size(); - states_data.data = static_cast(const_cast(states.c_str())); - states_data.alloc = 0; - zxdg_toplevel_v6_send_configure( resource, width, height, - &states_data); + states); } diff --git a/src/DSWaylandServer/dswayland-server-xdg-shell-unstable-v6.h b/src/DSWaylandServer/dswayland-server-xdg-shell-unstable-v6.h index 0881d89..26363d1 100644 --- a/src/DSWaylandServer/dswayland-server-xdg-shell-unstable-v6.h +++ b/src/DSWaylandServer/dswayland-server-xdg-shell-unstable-v6.h @@ -454,8 +454,8 @@ namespace DSWaylandServer { state_activated = 4, // the surface is now activated }; - void send_configure(int32_t width, int32_t height, const std::string &states); - void send_configure(struct ::wl_resource *resource, int32_t width, int32_t height, const std::string &states); + void send_configure(int32_t width, int32_t height, struct ::wl_array *states); + void send_configure(struct ::wl_resource *resource, int32_t width, int32_t height, struct ::wl_array *states); void send_close(); void send_close(struct ::wl_resource *resource); diff --git a/src/DSWaylandServer/dswayland-server-xdg-shell.cpp b/src/DSWaylandServer/dswayland-server-xdg-shell.cpp index 06f76be..8440d58 100644 --- a/src/DSWaylandServer/dswayland-server-xdg-shell.cpp +++ b/src/DSWaylandServer/dswayland-server-xdg-shell.cpp @@ -1194,7 +1194,7 @@ namespace DSWaylandServer { r); } - void xdg_toplevel::send_configure(int32_t width, int32_t height, const std::string &states) + void xdg_toplevel::send_configure(int32_t width, int32_t height, struct ::wl_array *states) { DS_ASSERT_X(m_resource, "xdg_toplevel::configure", "Uninitialised resource"); if (DS_UNLIKELY(!m_resource)) { @@ -1208,18 +1208,13 @@ namespace DSWaylandServer { states); } - void xdg_toplevel::send_configure(struct ::wl_resource *resource, int32_t width, int32_t height, const std::string &states) + void xdg_toplevel::send_configure(struct ::wl_resource *resource, int32_t width, int32_t height, struct ::wl_array *states) { - struct wl_array states_data; - states_data.size = states.size(); - states_data.data = static_cast(const_cast(states.c_str())); - states_data.alloc = 0; - xdg_toplevel_send_configure( resource, width, height, - &states_data); + states); } diff --git a/src/DSWaylandServer/dswayland-server-xdg-shell.h b/src/DSWaylandServer/dswayland-server-xdg-shell.h index d17b98c..ec0494a 100644 --- a/src/DSWaylandServer/dswayland-server-xdg-shell.h +++ b/src/DSWaylandServer/dswayland-server-xdg-shell.h @@ -466,8 +466,8 @@ namespace DSWaylandServer { state_tiled_bottom = 8, }; - void send_configure(int32_t width, int32_t height, const std::string &states); - void send_configure(struct ::wl_resource *resource, int32_t width, int32_t height, const std::string &states); + void send_configure(int32_t width, int32_t height, struct ::wl_array *states); + void send_configure(struct ::wl_resource *resource, int32_t width, int32_t height, struct ::wl_array *states); void send_close(); void send_close(struct ::wl_resource *resource);