Expose ds_xdg_shell_v6 as ABI 18/295218/1
authorSeunghun Lee <shiin.lee@samsung.com>
Tue, 23 May 2023 01:23:32 +0000 (10:23 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Tue, 4 Jul 2023 01:55:03 +0000 (10:55 +0900)
Change-Id: Icde932664fe639394c2aef2ea22f0a867ca9f7c5

include/libds/types/ds_xdg_shell_v6.h [new file with mode: 0644]
src/xdg_shell_v6/xdg_shell_v6.h

diff --git a/include/libds/types/ds_xdg_shell_v6.h b/include/libds/types/ds_xdg_shell_v6.h
new file mode 100644 (file)
index 0000000..1953f1d
--- /dev/null
@@ -0,0 +1,160 @@
+#ifndef LIBDS_DS_XDG_SHELL_V6_H
+#define LIBDS_DS_XDG_SHELL_V6_H
+
+#include <wayland-server.h>
+#include <libds/output.h>
+#include <libds/xdg_shell_v6.h>
+
+enum ds_xdg_surface_v6_role
+{
+    DS_XDG_SURFACE_V6_ROLE_NONE,
+    DS_XDG_SURFACE_V6_ROLE_TOPLEVEL,
+    DS_XDG_SURFACE_V6_ROLE_POPUP,
+};
+
+struct ds_xdg_shell_v6
+{
+    struct wl_global *global;
+
+    struct wl_list clients;
+
+    struct wl_listener display_destroy;
+
+    struct {
+        struct wl_signal destroy;
+        struct wl_signal new_surface;
+    } events;
+
+    uint32_t ping_timeout;
+};
+
+struct ds_xdg_client_v6
+{
+    struct ds_xdg_shell_v6 *shell;
+
+    struct wl_resource *resource;
+    struct wl_client *wl_client;
+    struct wl_event_source *ping_timer;
+
+    struct wl_list surfaces;
+
+    struct wl_list link; // ds_xdg_shell_v6::clients
+
+    uint32_t ping_serial;
+};
+
+struct ds_xdg_toplevel_v6_state
+{
+    bool maximized, fullscreen, resizing, activated;
+    uint32_t width, height;
+    uint32_t max_width, max_height;
+    uint32_t min_width, min_height;
+};
+
+struct ds_xdg_toplevel_v6_configure
+{
+    bool maximized, fullscreen, resizing, activated;
+    uint32_t width, height;
+};
+
+struct ds_xdg_toplevel_v6_requested
+{
+    bool maximized, minimized, fullscreen;
+    struct ds_output *fullscreen_output;
+    struct wl_listener fullscreen_output_destroy;
+};
+
+struct ds_xdg_toplevel_v6
+{
+    struct wl_resource *resource;
+    struct ds_xdg_surface_v6 *base;
+
+    struct ds_xdg_toplevel_v6 *parent;
+    struct wl_listener parent_unmap;
+
+    struct ds_xdg_toplevel_v6_state current, pending;
+    struct ds_xdg_toplevel_v6_configure scheduled;
+    struct ds_xdg_toplevel_v6_requested requested;
+
+    char *title;
+    char *app_id;
+
+    struct {
+        struct wl_signal request_maximize;
+        struct wl_signal request_fullscreen;
+        struct wl_signal request_minimize;
+        struct wl_signal request_move;
+        struct wl_signal request_resize;
+        struct wl_signal request_show_window_menu;
+        struct wl_signal set_parent;
+        struct wl_signal set_title;
+        struct wl_signal set_app_id;
+    } events;
+
+    bool sent_initial_configure;
+};
+
+struct ds_xdg_popup
+{
+
+};
+
+struct ds_xdg_surface_v6_state
+{
+    uint32_t configure_serial;
+    struct {
+        int x, y;
+        int width, height;
+    } geometry;
+};
+
+struct ds_xdg_surface_v6
+{
+    struct ds_xdg_client_v6 *client;
+    struct ds_surface *ds_surface;
+
+    enum ds_xdg_surface_v6_role role;
+
+    union {
+        struct ds_xdg_toplevel_v6 *toplevel;
+        struct ds_xdg_popup *popup;
+    };
+
+    struct wl_resource *resource;
+
+    struct wl_event_source *configure_idle;
+    uint32_t scheduled_serial;
+    struct wl_list configure_list;
+
+    struct ds_xdg_surface_v6_state current, pending;
+
+    struct wl_list link; // ds_xdg_client_v6::surfaces
+
+    struct {
+        struct wl_listener surface_destroy;
+        struct wl_listener surface_commit;
+    } listener;
+
+    struct {
+        struct wl_signal destroy;
+        struct wl_signal ping_timeout;
+        struct wl_signal new_popup;
+        struct wl_signal map;
+        struct wl_signal unmap;
+        struct wl_signal configure;
+        struct wl_signal ack_configure;
+    } events;
+
+    bool added, configured, mapped;
+};
+
+struct ds_xdg_surface_v6_configure
+{
+    struct ds_xdg_surface_v6 *surface;
+    struct wl_list link;
+    uint32_t serial;
+
+    struct ds_xdg_toplevel_v6_configure *toplevel_configure;
+};
+
+#endif
index 0e2ff52..d05b2bc 100644 (file)
@@ -4,163 +4,9 @@
 #include <wayland-server.h>
 #include <xdg-shell-unstable-v6-server-protocol.h>
 
-#include "libds/output.h"
-#include "libds/xdg_shell_v6.h"
-
+#include "libds/types/ds_xdg_shell_v6.h"
 #include "surface.h"
 
-enum ds_xdg_surface_v6_role
-{
-    DS_XDG_SURFACE_V6_ROLE_NONE,
-    DS_XDG_SURFACE_V6_ROLE_TOPLEVEL,
-    DS_XDG_SURFACE_V6_ROLE_POPUP,
-};
-
-struct ds_xdg_shell_v6
-{
-    struct wl_global *global;
-
-    struct wl_list clients;
-
-    struct wl_listener display_destroy;
-
-    struct {
-        struct wl_signal destroy;
-        struct wl_signal new_surface;
-    } events;
-
-    uint32_t ping_timeout;
-};
-
-struct ds_xdg_client_v6
-{
-    struct ds_xdg_shell_v6 *shell;
-
-    struct wl_resource *resource;
-    struct wl_client *wl_client;
-    struct wl_event_source *ping_timer;
-
-    struct wl_list surfaces;
-
-    struct wl_list link; // ds_xdg_shell_v6::clients
-
-    uint32_t ping_serial;
-};
-
-struct ds_xdg_toplevel_v6_state
-{
-    bool maximized, fullscreen, resizing, activated;
-    uint32_t width, height;
-    uint32_t max_width, max_height;
-    uint32_t min_width, min_height;
-};
-
-struct ds_xdg_toplevel_v6_configure
-{
-    bool maximized, fullscreen, resizing, activated;
-    uint32_t width, height;
-};
-
-struct ds_xdg_toplevel_v6_requested
-{
-    bool maximized, minimized, fullscreen;
-    struct ds_output *fullscreen_output;
-    struct wl_listener fullscreen_output_destroy;
-};
-
-struct ds_xdg_toplevel_v6
-{
-    struct wl_resource *resource;
-    struct ds_xdg_surface_v6 *base;
-
-    struct ds_xdg_toplevel_v6 *parent;
-    struct wl_listener parent_unmap;
-
-    struct ds_xdg_toplevel_v6_state current, pending;
-    struct ds_xdg_toplevel_v6_configure scheduled;
-    struct ds_xdg_toplevel_v6_requested requested;
-
-    char *title;
-    char *app_id;
-
-    struct {
-        struct wl_signal request_maximize;
-        struct wl_signal request_fullscreen;
-        struct wl_signal request_minimize;
-        struct wl_signal request_move;
-        struct wl_signal request_resize;
-        struct wl_signal request_show_window_menu;
-        struct wl_signal set_parent;
-        struct wl_signal set_title;
-        struct wl_signal set_app_id;
-    } events;
-
-    bool sent_initial_configure;
-};
-
-struct ds_xdg_popup
-{
-
-};
-
-struct ds_xdg_surface_v6_state
-{
-    uint32_t configure_serial;
-    struct {
-        int x, y;
-        int width, height;
-    } geometry;
-};
-
-struct ds_xdg_surface_v6
-{
-    struct ds_xdg_client_v6 *client;
-    struct ds_surface *ds_surface;
-
-    enum ds_xdg_surface_v6_role role;
-
-    union {
-        struct ds_xdg_toplevel_v6 *toplevel;
-        struct ds_xdg_popup *popup;
-    };
-
-    struct wl_resource *resource;
-
-    struct wl_event_source *configure_idle;
-    uint32_t scheduled_serial;
-    struct wl_list configure_list;
-
-    struct ds_xdg_surface_v6_state current, pending;
-
-    struct wl_list link; // ds_xdg_client_v6::surfaces
-
-    struct {
-        struct wl_listener surface_destroy;
-        struct wl_listener surface_commit;
-    } listener;
-
-    struct {
-        struct wl_signal destroy;
-        struct wl_signal ping_timeout;
-        struct wl_signal new_popup;
-        struct wl_signal map;
-        struct wl_signal unmap;
-        struct wl_signal configure;
-        struct wl_signal ack_configure;
-    } events;
-
-    bool added, configured, mapped;
-};
-
-struct ds_xdg_surface_v6_configure
-{
-    struct ds_xdg_surface_v6 *surface;
-    struct wl_list link;
-    uint32_t serial;
-
-    struct ds_xdg_toplevel_v6_configure *toplevel_configure;
-};
-
 uint32_t
 ds_xdg_surface_v6_schedule_configure(struct ds_xdg_surface_v6 *surface);