protocols: update wayland protocols 19/242019/1
authorjeon <jhyuni.kang@samsung.com>
Fri, 21 Aug 2020 06:00:46 +0000 (15:00 +0900)
committerSung-Jin Park <sj76.park@samsung.com>
Fri, 21 Aug 2020 10:11:11 +0000 (19:11 +0900)
Change-Id: Ic1d34e543022fbbccdd7f194cc7b9fc865255588

src/DSWaylandServer/dswayland-server-input-method.cpp
src/DSWaylandServer/dswayland-server-input-method.h
src/DSWaylandServer/dswayland-server-text.cpp
src/DSWaylandServer/dswayland-server-text.h

index 3fcce7a..68351db 100644 (file)
@@ -1090,6 +1090,26 @@ namespace DSWaylandServer {
     }
 
 
+    void wl_input_method_context::send_input_panel_enabled(uint32_t enabled)
+    {
+        DS_ASSERT_X(m_resource, "wl_input_method_context::input_panel_enabled", "Uninitialised resource");
+        if (DS_UNLIKELY(!m_resource)) {
+            WRN("could not call wl_input_method_context::input_panel_enabled as it's not initialised");
+            return;
+        }
+        send_input_panel_enabled(
+            m_resource->handle,
+            enabled);
+    }
+
+    void wl_input_method_context::send_input_panel_enabled(struct ::wl_resource *resource, uint32_t enabled)
+    {
+        wl_input_method_context_send_input_panel_enabled(
+            resource,
+            enabled);
+    }
+
+
     wl_input_method::wl_input_method(struct ::wl_client *client, uint32_t id, int version)
         : m_resource_map()
         , m_resource(NULL)
index 3d2b501..1f800ec 100644 (file)
@@ -102,6 +102,8 @@ namespace DSWaylandServer {
         void send_finalized_content(struct ::wl_resource *resource, const std::string &text, uint32_t cursor_position);
         void send_prediction_hint_data(const std::string &key, const std::string &value);
         void send_prediction_hint_data(struct ::wl_resource *resource, const std::string &key, const std::string &value);
+        void send_input_panel_enabled(uint32_t enabled);
+        void send_input_panel_enabled(struct ::wl_resource *resource, uint32_t enabled);
 
     protected:
         virtual Resource *input_method_context_allocate();
index a5e4d3c..e4bed15 100644 (file)
@@ -204,7 +204,8 @@ namespace DSWaylandServer {
         wl_text_input::handle_set_mime_type,
         wl_text_input::handle_set_input_panel_position,
         wl_text_input::handle_finalize_content,
-        wl_text_input::handle_prediction_hint_data
+        wl_text_input::handle_prediction_hint_data,
+        wl_text_input::handle_input_panel_enabled
     };
 
     void wl_text_input::text_input_destroy(Resource *)
@@ -307,6 +308,10 @@ namespace DSWaylandServer {
     {
     }
 
+    void wl_text_input::text_input_input_panel_enabled(Resource *, uint32_t )
+    {
+    }
+
 
     void wl_text_input::handle_destroy(
         ::wl_client *client,
@@ -638,6 +643,18 @@ namespace DSWaylandServer {
             std::string(value));
     }
 
+    void wl_text_input::handle_input_panel_enabled(
+        ::wl_client *client,
+        struct wl_resource *resource,
+        uint32_t enabled)
+    {
+        DS_UNUSED(client);
+        Resource *r = Resource::fromResource(resource);
+        static_cast<wl_text_input *>(r->text_input_object)->text_input_input_panel_enabled(
+            r,
+            enabled);
+    }
+
     void wl_text_input::send_enter(struct ::wl_resource *surface)
     {
         DS_ASSERT_X(m_resource, "wl_text_input::enter", "Uninitialised resource");
index eb437ef..622f5d6 100644 (file)
@@ -244,6 +244,7 @@ namespace DSWaylandServer {
         virtual void text_input_set_input_panel_position(Resource *resource, uint32_t x, uint32_t y);
         virtual void text_input_finalize_content(Resource *resource, const std::string &text, uint32_t cursor_position);
         virtual void text_input_prediction_hint_data(Resource *resource, const std::string &key, const std::string &value);
+        virtual void text_input_input_panel_enabled(Resource *resource, uint32_t enabled);
 
     private:
         static void bind_func(struct ::wl_client *client, void *data, uint32_t version, uint32_t id);
@@ -370,6 +371,10 @@ namespace DSWaylandServer {
             struct wl_resource *resource,
             const char *key,
             const char *value);
+        static void handle_input_panel_enabled(
+            ::wl_client *client,
+            struct wl_resource *resource,
+            uint32_t enabled);
 
         std::multimap<struct ::wl_client*, Resource*> m_resource_map;
         Resource *m_resource;