devilhorns pushed a commit to branch master.

commit 6653eccd177784c911ecc39864ffe66210b41c5f
Author: Chris Michael <[email protected]>
Date:   Tue Apr 9 13:20:43 2013 +0100

    Add start of desktop shell code.
    
    Signed-off-by: Chris Michael <[email protected]>
---
 src/modules/wl_desktop_shell/e_mod_main.c | 41 +++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/src/modules/wl_desktop_shell/e_mod_main.c 
b/src/modules/wl_desktop_shell/e_mod_main.c
new file mode 100644
index 0000000..4100531
--- /dev/null
+++ b/src/modules/wl_desktop_shell/e_mod_main.c
@@ -0,0 +1,41 @@
+#include "e.h"
+#include "e_comp_wl.h"
+#include "e_mod_main.h"
+#include "e_desktop_shell_protocol.h"
+
+EAPI E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Wl_Desktop_Shell" };
+
+EAPI void *
+e_modapi_init(E_Module *m)
+{
+   E_Wayland_Desktop_Shell *shell = NULL;
+
+   /* try to allocate space for the shell structure */
+   if (!(shell = E_NEW(E_Wayland_Desktop_Shell, 1)))
+     return NULL;
+
+   /* tell the shell what compositor to use */
+   shell->compositor = _e_wl_comp;
+
+   /* setup compositor shell interface functions */
+   _e_wl_comp->shell_interface.shell = shell;
+
+   return m;
+
+err:
+   /* reset compositor shell interface */
+   _e_wl_comp->shell_interface.shell = NULL;
+
+   /* free the allocated shell structure */
+   E_FREE(shell);
+
+   return NULL;
+}
+
+EAPI int 
+e_modapi_shutdown(E_Module *m EINA_UNUSED)
+{
+   /* nothing to do here as shell will get the destroy callback from 
+    * the compositor and we can cleanup there */
+   return 1;
+}

-- 

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter

Reply via email to