2 * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
4 * This program is licensed under the terms and conditions of the
5 * Apache License, version 2.0. The full text of the Apache License is at
6 * http://www.apache.org/licenses/LICENSE-2.0
10 //==========================================================================
12 * @file CicoSCWayland.h
14 * @brief This file is definition of CicoSCWayland class
16 //==========================================================================
17 #ifndef __CICO_SC_WAYLAND_H__
18 #define __CICO_SC_WAYLAND_H__
25 #include <wayland-client.h>
27 //==========================================================================
28 // Forward declaration
29 //==========================================================================
30 class CicoSCWaylandIF;
32 //==========================================================================
34 * @brief This class controls wayland
36 //==========================================================================
39 // get instance of CicoSCWayland
40 static CicoSCWayland* getInstance();
42 // initialize wayland connection
46 void flushDisplay(void);
49 void dispatchDisplay(void);
54 // get wayland file descriptor
57 // app ecore main wayland file descriptor handler
58 int addEcoreMainWlFdHandler(void);
60 // add wayland interface
61 void addWaylandIF(const char *name, CicoSCWaylandIF* interface);
63 // waylnad file descriptor handler
64 static Eina_Bool waylandFdHandler(void *data, Ecore_Fd_Handler *handler);
66 // wayland global callback function
67 void globalCB(void *data,
68 struct wl_registry *registry,
70 const char *interface,
74 // wayland standard callback function
75 static void wlGlobalCB(void *data,
76 struct wl_registry *registry,
78 const char *interface,
82 // default constructor
88 // assignment operator
89 CicoSCWayland& operator=(const CicoSCWayland &object);
92 CicoSCWayland(const CicoSCWayland &object);
96 static CicoSCWayland *ms_myInstance;
99 struct wl_display *m_wlDisplay;
101 /// wayland's registry
102 struct wl_registry *m_wlRegistry;
104 /// wayland's file descriptor
107 /// ecore file descriptor handler
108 Ecore_Fd_Handler *m_ecoreFdHandler;
111 std::map<std::string, CicoSCWaylandIF*> m_wlInterfaceList;
113 // wayland common callbacks
114 struct wl_registry_listener m_wlListener;
116 #endif // __CICO_SC_WAYLAND_H__
117 // vim:set expandtab ts=4 sw=4: