From 0f40c7fd5346b9f673b580b193ceaed1e4740239 Mon Sep 17 00:00:00 2001 From: SooChan Lim Date: Wed, 7 Sep 2022 15:20:02 +0900 Subject: [PATCH] change get_subsurface_watcher to new_subsurface_watcher change the symbol names Change-Id: I05c21fedb75ebdc4fca9f23bad62df0a022de6c8 --- examples/tinyds-tdm.c | 20 ++++++++++---------- include/libds-tizen/policy.h | 4 ++-- src/policy/policy.c | 12 ++++++------ tests/tc_policy.cpp | 30 +++++++++++++++--------------- 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/examples/tinyds-tdm.c b/examples/tinyds-tdm.c index d0cac7d..2108efc 100644 --- a/examples/tinyds-tdm.c +++ b/examples/tinyds-tdm.c @@ -135,7 +135,7 @@ struct tinyds_policy_surface struct wl_listener set_floating_mode; struct wl_listener unset_floating_mode; struct wl_listener set_stack_mode; - struct wl_listener get_subsurface_watcher; + struct wl_listener new_subsurface_watcher; struct wl_listener set_parent; struct wl_listener ack_conformant_region; struct wl_listener set_video; @@ -2956,16 +2956,16 @@ policy_surface_handle_set_stack_mode(struct wl_listener *listener, void *data) } static void -policy_surface_handle_get_subsurface_watcher(struct wl_listener *listener, void *data) +policy_surface_handle_new_subsurface_watcher(struct wl_listener *listener, void *data) { struct tinyds_policy_surface *policy_surface; struct tinyds_policy_subsurface_watcher*subsurface_watcher; - struct ds_tizen_event_policy_surface_get_subsurface_watcher *event; + struct ds_tizen_event_policy_surface_new_subsurface_watcher *event; - policy_surface = wl_container_of(listener, policy_surface, get_subsurface_watcher); - event = (struct ds_tizen_event_policy_surface_get_subsurface_watcher *)data; + policy_surface = wl_container_of(listener, policy_surface, new_subsurface_watcher); + event = (struct ds_tizen_event_policy_surface_new_subsurface_watcher *)data; - ds_inf("Policy Info(%p) get_subsurface_watcher", policy_surface); + ds_inf("Policy Info(%p) new_subsurface_watcher", policy_surface); subsurface_watcher = calloc(1, sizeof *subsurface_watcher); if (!subsurface_watcher) @@ -3187,10 +3187,10 @@ policy_handle_new_surface(struct wl_listener *listener, void *data) ds_tizen_policy_surface_add_set_stack_mode_listener(policy_surface->policy_surface, &policy_surface->set_stack_mode); - policy_surface->get_subsurface_watcher.notify = - policy_surface_handle_get_subsurface_watcher; - ds_tizen_policy_surface_add_get_subsurface_watcher_listener( - policy_surface->policy_surface, &policy_surface->get_subsurface_watcher); + policy_surface->new_subsurface_watcher.notify = + policy_surface_handle_new_subsurface_watcher; + ds_tizen_policy_surface_add_new_subsurface_watcher_listener( + policy_surface->policy_surface, &policy_surface->new_subsurface_watcher); policy_surface->set_parent.notify = policy_surface_handle_set_parent; ds_tizen_policy_surface_add_set_parent_listener(policy_surface->policy_surface, diff --git a/include/libds-tizen/policy.h b/include/libds-tizen/policy.h index dd3d313..5066e41 100644 --- a/include/libds-tizen/policy.h +++ b/include/libds-tizen/policy.h @@ -295,7 +295,7 @@ struct ds_tizen_event_policy_surface_set_stack_mode enum ds_tizen_policy_stack_mode mode; }; -struct ds_tizen_event_policy_surface_get_subsurface_watcher +struct ds_tizen_event_policy_surface_new_subsurface_watcher { struct ds_tizen_policy_surface *policy_surface; struct ds_tizen_policy_subsurface_watcher *subsurface_watcher; @@ -538,7 +538,7 @@ ds_tizen_policy_surface_add_set_stack_mode_listener( struct wl_listener *listener); void -ds_tizen_policy_surface_add_get_subsurface_watcher_listener( +ds_tizen_policy_surface_add_new_subsurface_watcher_listener( struct ds_tizen_policy_surface *policy_surface, struct wl_listener *listener); diff --git a/src/policy/policy.c b/src/policy/policy.c index 87cd4a1..c2acb39 100644 --- a/src/policy/policy.c +++ b/src/policy/policy.c @@ -101,7 +101,7 @@ struct ds_tizen_policy_surface struct wl_signal set_floating_mode; struct wl_signal unset_floating_mode; struct wl_signal set_stack_mode; - struct wl_signal get_subsurface_watcher; + struct wl_signal new_subsurface_watcher; struct wl_signal set_parent; struct wl_signal ack_conformant_region; struct wl_signal set_video; @@ -521,11 +521,11 @@ ds_tizen_policy_surface_add_set_stack_mode_listener( } WL_EXPORT void -ds_tizen_policy_surface_add_get_subsurface_watcher_listener( +ds_tizen_policy_surface_add_new_subsurface_watcher_listener( struct ds_tizen_policy_surface *policy_surface, struct wl_listener *listener) { - wl_signal_add(&policy_surface->events.get_subsurface_watcher, listener); + wl_signal_add(&policy_surface->events.new_subsurface_watcher, listener); } WL_EXPORT void @@ -971,7 +971,7 @@ tizen_policy_client_get_surface(struct wl_resource *resource, wl_signal_init(&policy_surface->events.set_floating_mode); wl_signal_init(&policy_surface->events.unset_floating_mode); wl_signal_init(&policy_surface->events.set_stack_mode); - wl_signal_init(&policy_surface->events.get_subsurface_watcher); + wl_signal_init(&policy_surface->events.new_subsurface_watcher); wl_signal_init(&policy_surface->events.set_parent); wl_signal_init(&policy_surface->events.ack_conformant_region); wl_signal_init(&policy_surface->events.set_video); @@ -2018,11 +2018,11 @@ policy_handle_get_subsurface_watcher(struct wl_client *wl_client, &subsurface_watcher_impl, subsurface_watcher, _tizen_policy_subsurface_watcher_handle_destroy); - struct ds_tizen_event_policy_surface_get_subsurface_watcher event = { + struct ds_tizen_event_policy_surface_new_subsurface_watcher event = { .policy_surface = policy_surface, .subsurface_watcher = subsurface_watcher, }; - wl_signal_emit(&policy_surface->events.get_subsurface_watcher, &event); + wl_signal_emit(&policy_surface->events.new_subsurface_watcher, &event); } static void diff --git a/tests/tc_policy.cpp b/tests/tc_policy.cpp index dd2296f..d38152e 100644 --- a/tests/tc_policy.cpp +++ b/tests/tc_policy.cpp @@ -366,10 +366,10 @@ public: ds_tizen_policy_surface_add_set_stack_mode_listener(policy_surface, &mSetStackModeListener); - mGetSubsurfaceWatcherListener.notify = MockPolicySurface::GetSubsurfaceWatcherCallback; - mGetSubsurfaceWatcherListener.parent = this; - ds_tizen_policy_surface_add_get_subsurface_watcher_listener(policy_surface, - &mGetSubsurfaceWatcherListener); + mNewSubsurfaceWatcherListener.notify = MockPolicySurface::NewSubsurfaceWatcherCallback; + mNewSubsurfaceWatcherListener.parent = this; + ds_tizen_policy_surface_add_new_subsurface_watcher_listener(policy_surface, + &mNewSubsurfaceWatcherListener); mSetParentListener.notify = MockPolicySurface::SetParentCallback; mSetParentListener.parent = this; @@ -742,17 +742,17 @@ public: policySurface->mStackMode = event->mode; } - static void GetSubsurfaceWatcherCallback(struct wl_listener *listener, void *data) + static void NewSubsurfaceWatcherCallback(struct wl_listener *listener, void *data) { MockPolicySurface *policySurface = - reinterpret_cast(listener)->parent; - struct ds_tizen_event_policy_surface_get_subsurface_watcher *event = - static_cast(data); + reinterpret_cast(listener)->parent; + struct ds_tizen_event_policy_surface_new_subsurface_watcher *event = + static_cast(data); EXPECT_TRUE(policySurface->mPolicySurface == event->policy_surface); EXPECT_TRUE(event->subsurface_watcher != NULL); - policySurface->bGetSubsurfaceWatcher = true; + policySurface->bNewSubsurfaceWatcher = true; MockPolicySubsurfaceWatcher *policySubsurfaceWatcher = new MockPolicySubsurfaceWatcher(event->subsurface_watcher); @@ -850,7 +850,7 @@ public: return mPolicyPosition; } - MockPolicySubsurfaceWatcher*GetSubsurfaceWatcher() + MockPolicySubsurfaceWatcher*NewSubsurfaceWatcher() { return mPolicySubsurfaceWatcher; } @@ -922,7 +922,7 @@ public: bool bGetSupportedAuxHints; bool bSetFloatingMode; enum ds_tizen_policy_stack_mode mStackMode; - bool bGetSubsurfaceWatcher; + bool bNewSubsurfaceWatcher; struct ds_surface *mParentSurface; uint32_t mSerial; bool bVideo; @@ -1061,10 +1061,10 @@ private: }; SetStackModeListener mSetStackModeListener; - struct GetSubsurfaceWatcherListener : ::wl_listener { + struct NewSubsurfaceWatcherListener : ::wl_listener { MockPolicySurface *parent; }; - GetSubsurfaceWatcherListener mGetSubsurfaceWatcherListener; + NewSubsurfaceWatcherListener mNewSubsurfaceWatcherListener; struct SetParentListener : ::wl_listener { MockPolicySurface *parent; @@ -2718,7 +2718,7 @@ TEST_F(PolicyTest, Req_PolicySurfaceSetStackMode) EXPECT_TRUE(policy_surface->bSetFloatingMode == true); } -TEST_F(PolicyTest, Req_PolicySurfaceGetSubsurfaceWatcher) +TEST_F(PolicyTest, Req_PolicySurfaceNewSubsurfaceWatcher) { MockPolicySurface *policy_surface; uint32_t surface_res_id; @@ -2732,7 +2732,7 @@ TEST_F(PolicyTest, Req_PolicySurfaceGetSubsurfaceWatcher) surface_res_id = wl_proxy_get_id((struct wl_proxy *)surface_res); policy_surface = comp->FindPolicySurfaceWidthResId(surface_res_id); - EXPECT_TRUE(policy_surface->bGetSubsurfaceWatcher == true); + EXPECT_TRUE(policy_surface->bNewSubsurfaceWatcher == true); tizen_subsurface_watcher_destroy(subsuface_watcher_res); } -- 2.7.4