devilhorns pushed a commit to branch devs/devilhorns/wayland.
commit c20d723927de4b7c8b32425e156d71af54fab86c
Author: Chris Michael <[email protected]>
Date: Thu Mar 7 12:02:36 2013 +0000
Make the E Wayland Compositor variable external so we can access the
compositor from the shell. Add Shell_Surface and Shell_Interface
structures. Move the structure for Compositor to After the above shell
structures are defined.
Signed-off-by: Chris Michael <[email protected]>
---
src/bin/e_comp_wl.c | 4 +--
src/bin/e_comp_wl.h | 81 +++++++++++++++++++++++++++++++++++------------------
2 files changed, 56 insertions(+), 29 deletions(-)
diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index ca23a7d..8d0e551 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -51,8 +51,8 @@ static const struct wl_region_interface
_e_wl_region_interface =
_e_comp_wl_region_cb_subtract
};
-/* local variables */
-static E_Wayland_Compositor *_e_wl_comp = NULL;
+/* external variables */
+E_Wayland_Compositor *_e_wl_comp;
Eina_Bool
e_comp_wl_init(void)
diff --git a/src/bin/e_comp_wl.h b/src/bin/e_comp_wl.h
index 29598cf..5bf06cf 100644
--- a/src/bin/e_comp_wl.h
+++ b/src/bin/e_comp_wl.h
@@ -20,10 +20,12 @@
/* local structures */
typedef enum _E_Wayland_Compositor_State E_Wayland_Compositor_State;
-typedef struct _E_Wayland_Compositor E_Wayland_Compositor;
typedef struct _E_Wayland_Surface E_Wayland_Surface;
+typedef struct _E_Wayland_Shell_Surface E_Wayland_Shell_Surface;
+typedef struct _E_Wayland_Shell_Interface E_Wayland_Shell_Interface;
typedef struct _E_Wayland_Region E_Wayland_Region;
typedef struct _E_Wayland_Frame_Cb E_Wayland_Frame_Cb;
+typedef struct _E_Wayland_Compositor E_Wayland_Compositor;
enum _E_Wayland_Compositor_State
{
@@ -32,32 +34,6 @@ enum _E_Wayland_Compositor_State
E_WAYLAND_COMPOSITOR_STATE_SLEEPING
};
-struct _E_Wayland_Compositor
-{
- struct
- {
- struct wl_display *display;
-
- struct
- {
- struct wl_signal destroy;
- struct wl_signal activate;
- struct wl_signal kill;
- struct wl_signal idle;
- struct wl_signal wake;
- struct wl_signal seat;
- } signals;
-
- struct
- {
- struct wl_list surface;
- } lists;
-
- } wl;
-
- Ecore_Fd_Handler *fd_handler;
-};
-
struct _E_Wayland_Surface
{
struct
@@ -87,6 +63,26 @@ struct _E_Wayland_Surface
} pending;
};
+struct _E_Wayland_Shell_Surface
+{
+ struct
+ {
+ struct wl_resource resource;
+ } wl;
+};
+
+struct _E_Wayland_Shell_Interface
+{
+ void *shell;
+
+ E_Wayland_Shell_Surface *(*shell_surface_create) (void *shell,
E_Wayland_Surface *ews, const void *client);
+ void (*toplevel_set) (E_Wayland_Shell_Surface *ewss);
+ void (*transient_set) (E_Wayland_Shell_Surface *ewss, E_Wayland_Surface
*ews, int x, int y, unsigned int flags);
+ void (*fullscreen_set) (E_Wayland_Shell_Surface *ewss, unsigned int method,
unsigned int framerate, void *output);
+ int (*move) (E_Wayland_Shell_Surface *ewss, void *seat);
+ int (*resize) (E_Wayland_Shell_Surface *ewss, void *seat, unsigned int
edges);
+};
+
struct _E_Wayland_Region
{
struct
@@ -106,6 +102,37 @@ struct _E_Wayland_Frame_Cb
} wl;
};
+struct _E_Wayland_Compositor
+{
+ struct
+ {
+ struct wl_display *display;
+
+ struct
+ {
+ struct wl_signal destroy;
+ struct wl_signal activate;
+ struct wl_signal kill;
+ struct wl_signal idle;
+ struct wl_signal wake;
+ struct wl_signal seat;
+ } signals;
+
+ struct
+ {
+ struct wl_list surface;
+ } lists;
+
+ E_Wayland_Shell_Interface shell_interface;
+
+ } wl;
+
+ Ecore_Fd_Handler *fd_handler;
+};
+
+/* external variables */
+extern E_Wayland_Compositor *_e_wl_comp;
+
/* external function prototypes */
Eina_Bool e_comp_wl_init(void);
void e_comp_wl_shutdown(void);
--
------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the
endpoint security space. For insight on selecting the right partner to
tackle endpoint security challenges, access the full report.
http://p.sf.net/sfu/symantec-dev2dev