tizen_policy: change get_surface to new_surface 77/280977/1
authorSooChan Lim <sc1.lim@samsung.com>
Wed, 7 Sep 2022 06:15:22 +0000 (15:15 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Wed, 7 Sep 2022 08:11:55 +0000 (17:11 +0900)
change the symbol name

Change-Id: Icc7e8193d85abed07f2b1306f2e69ed3ffd384b2

examples/tinyds-tdm.c
include/libds-tizen/policy.h
src/policy/policy.c
tests/tc_policy.cpp

index 0c9c968..30102fe 100644 (file)
@@ -90,7 +90,7 @@ struct tinyds_policy
     struct ds_tizen_policy *policy;
 
     struct wl_listener destroy;
-    struct wl_listener get_surface;
+    struct wl_listener new_surface;
     struct wl_listener activate_below_by_univeral_id;
     struct wl_listener lower_by_universal_id;
     struct wl_listener set_transient_for;
@@ -3065,16 +3065,16 @@ policy_handle_destroy(struct wl_listener *listener, void *data)
 }
 
 static void
-policy_handle_get_surface(struct wl_listener *listener, void *data)
+policy_handle_new_surface(struct wl_listener *listener, void *data)
 {
     struct tinyds_policy *policy;
     struct tinyds_policy_surface *policy_surface;
-    struct ds_tizen_event_policy_get_surface *event;
+    struct ds_tizen_event_policy_new_surface *event;
 
-    policy = wl_container_of(listener, policy, get_surface);
-    event = (struct ds_tizen_event_policy_get_surface *)data;
+    policy = wl_container_of(listener, policy, new_surface);
+    event = (struct ds_tizen_event_policy_new_surface *)data;
 
-    ds_inf("Policy(%p) get_surface", policy);
+    ds_inf("Policy(%p) new_surface", policy);
 
     policy_surface = calloc(1, sizeof *policy_surface);
     if (!policy_surface)
@@ -3377,8 +3377,8 @@ new_policy(struct tinyds_server *server)
     policy->destroy.notify = policy_handle_destroy;
     ds_tizen_policy_add_destroy_listener(policy->policy, &policy->destroy);
 
-    policy->get_surface.notify = policy_handle_get_surface;
-    ds_tizen_policy_add_get_surface_listener(policy->policy, &policy->get_surface);
+    policy->new_surface.notify = policy_handle_new_surface;
+    ds_tizen_policy_add_new_surface_listener(policy->policy, &policy->new_surface);
 
     policy->activate_below_by_univeral_id.notify =
         policy_handle_activate_below_by_univeral_id;
index f95e7cf..4d27c1f 100644 (file)
@@ -83,7 +83,7 @@ enum ds_tizen_policy_visibility_type
 };
 
 // policy event structures
-struct ds_tizen_event_policy_get_surface
+struct ds_tizen_event_policy_new_surface
 {
     struct ds_tizen_policy *policy;
     struct ds_tizen_policy_surface *policy_surface;
@@ -352,7 +352,7 @@ ds_tizen_policy_add_destroy_listener(struct ds_tizen_policy *policy,
         struct wl_listener *listener);
 
 void
-ds_tizen_policy_add_get_surface_listener(
+ds_tizen_policy_add_new_surface_listener(
         struct ds_tizen_policy *policy,
         struct wl_listener *listener);
 
index b349d8b..057b4f0 100644 (file)
@@ -27,7 +27,7 @@ struct ds_tizen_policy
 
     struct {
         struct wl_signal destroy;
-        struct wl_signal get_surface;
+        struct wl_signal new_surface;
         struct wl_signal activate_below_by_univeral_id;
         struct wl_signal lower_by_universal_id;
         struct wl_signal set_transient_for;
@@ -198,7 +198,7 @@ ds_tizen_policy_create(struct wl_display *display)
     }
 
     wl_signal_init(&policy->events.destroy);
-    wl_signal_init(&policy->events.get_surface);
+    wl_signal_init(&policy->events.new_surface);
     wl_signal_init(&policy->events.activate_below_by_univeral_id);
     wl_signal_init(&policy->events.lower_by_universal_id);
     wl_signal_init(&policy->events.set_transient_for);
@@ -225,11 +225,11 @@ ds_tizen_policy_add_destroy_listener(
 }
 
 WL_EXPORT void
-ds_tizen_policy_add_get_surface_listener(
+ds_tizen_policy_add_new_surface_listener(
         struct ds_tizen_policy *policy,
         struct wl_listener *listener)
 {
-    wl_signal_add(&policy->events.get_surface, listener);
+    wl_signal_add(&policy->events.new_surface, listener);
 }
 
 WL_EXPORT void
@@ -981,11 +981,11 @@ tizen_policy_client_get_surface(struct wl_resource *resource,
 
     wl_list_insert(&client->policy_surfaces, &policy_surface->link);
 
-    struct ds_tizen_event_policy_get_surface event = {
+    struct ds_tizen_event_policy_new_surface event = {
         .policy = client->policy,
         .policy_surface = policy_surface,
     };
-    wl_signal_emit(&client->policy->events.get_surface, &event);
+    wl_signal_emit(&client->policy->events.new_surface, &event);
 
     return policy_surface;
 }
index e099014..dc3da43 100644 (file)
@@ -1151,7 +1151,7 @@ public:
 
         // initialize the flags to check
         bDestroyed = false;
-        bGetPolicySurface = false;
+        bNewPolicySurface = false;
     }
 
     ~MockPolicyCompositor()
@@ -1195,12 +1195,12 @@ public:
             &mockComp->mDestroyListener);
 
         // policy listeners
-        mockComp->mGetPolicySurfaceListener.notify =
-            MockPolicyCompositor::GetPolicySurfaceCallback;
-        mockComp->mGetPolicySurfaceListener.parent = mockComp;
-        ds_tizen_policy_add_get_surface_listener(
+        mockComp->mNewPolicySurfaceListener.notify =
+            MockPolicyCompositor::NewPolicySurfaceCallback;
+        mockComp->mNewPolicySurfaceListener.parent = mockComp;
+        ds_tizen_policy_add_new_surface_listener(
             mockComp->mPolicy,
-            &mockComp->mGetPolicySurfaceListener);
+            &mockComp->mNewPolicySurfaceListener);
 
         mockComp->mActivateBelowByUniversalIdListener.notify =
             MockPolicyCompositor::ActivateBelowByUniversalIdCallback;
@@ -1302,21 +1302,21 @@ public:
         mockComp->bDestroyed = true;
     }
 
-    static void GetPolicySurfaceCallback(struct wl_listener *listener,
+    static void NewPolicySurfaceCallback(struct wl_listener *listener,
         void *data)
     {
         ds_inf("%s", __func__);
 
         MockPolicyCompositor *mockComp =
-            reinterpret_cast<GetPolicySurfaceListener *>(listener)->parent;
-        struct ds_tizen_event_policy_get_surface *event =
-            static_cast<struct ds_tizen_event_policy_get_surface *>(data);
+            reinterpret_cast<NewPolicySurfaceListener *>(listener)->parent;
+        struct ds_tizen_event_policy_new_surface *event =
+            static_cast<struct ds_tizen_event_policy_new_surface *>(data);
 
         struct ds_tizen_policy_surface *policy_surface = event->policy_surface;
 
         ds_inf("%s: mockComp(%p), policy_surface(%p)", __func__, mockComp, policy_surface);
 
-        mockComp->bGetPolicySurface = true;
+        mockComp->bNewPolicySurface = true;
 
         MockPolicySurface *policySurface = new MockPolicySurface(event->policy_surface);
         mockComp->mPolicySurfaces.push_back(policySurface);
@@ -1490,7 +1490,7 @@ public:
 
 public:
     bool bDestroyed;
-    bool bGetPolicySurface;
+    bool bNewPolicySurface;
     int32_t mPid;
     std::string mAppId;
     uint32_t mUniversalId;
@@ -1518,10 +1518,10 @@ private:
     DestroyListener mDestroyListener;
 
     // policy listener structure
-    struct GetPolicySurfaceListener : ::wl_listener {
+    struct NewPolicySurfaceListener : ::wl_listener {
         MockPolicyCompositor *parent;
     };
-    GetPolicySurfaceListener mGetPolicySurfaceListener;
+    NewPolicySurfaceListener mNewPolicySurfaceListener;
 
     struct ActivateBelowByUniversalIdListener: ::wl_listener {
         MockPolicyCompositor *parent;