ecore_drm: Make struct Ecore_Drm_Device available
authorStefan Schmidt <s.schmidt@samsung.com>
Fri, 27 Jun 2014 14:18:21 +0000 (16:18 +0200)
committerStefan Schmidt <s.schmidt@samsung.com>
Mon, 30 Jun 2014 08:13:43 +0000 (10:13 +0200)
Allow the struct to be used by other parts and not only ecore_drm.
This is needed to use ecore_drm in the evas drm engine.

src/lib/ecore_drm/Ecore_Drm.h
src/lib/ecore_drm/ecore_drm_private.h

index 2fffaa8..899c39f 100644 (file)
@@ -23,6 +23,8 @@
 # endif // ifdef __GNUC__
 #endif // ifdef _MSC_VER
 
+#include <Ecore.h>
+
 typedef enum _Ecore_Drm_Op
 {
    ECORE_DRM_OP_READ_FD_SET,
@@ -89,6 +91,59 @@ typedef struct _Ecore_Drm_Fb
 /* #endif */
 } Ecore_Drm_Fb;
 
+struct _Ecore_Drm_Device
+{
+   int id;
+   const char *seat;
+
+   struct
+     {
+        int fd;
+        const char *name;
+        const char *path;
+        clockid_t clock;
+        Ecore_Fd_Handler *hdlr;
+        Ecore_Idle_Enterer *idler;
+     } drm;
+
+   unsigned int min_width, min_height;
+   unsigned int max_width, max_height;
+
+   unsigned int crtc_count;
+   unsigned int *crtcs;
+   unsigned int crtc_allocator;
+
+   Eina_List *seats;
+   Eina_List *inputs;
+   Eina_List *outputs;
+   Eina_List *sprites;
+
+   struct
+     {
+        int fd;
+        const char *name;
+        Ecore_Event_Handler *event_hdlr;
+     } tty;
+
+   unsigned int format;
+   Eina_Bool use_hw_accel : 1;
+   Eina_Bool cursors_broken : 1;
+
+   struct xkb_context *xkb_ctx;
+
+   unsigned int window;
+
+/* #ifdef HAVE_GBM */
+/*    struct gbm_device *gbm; */
+/*    struct */
+/*      { */
+/*         EGLDisplay disp; */
+/*         EGLContext ctxt; */
+/*         EGLConfig cfg; */
+/*      } egl; */
+/* #endif */
+};
+
 /* opaque structure to represent a drm device */
 typedef struct _Ecore_Drm_Device Ecore_Drm_Device;
 
index 2456d15..16c89f6 100644 (file)
@@ -251,59 +251,6 @@ struct _Ecore_Drm_Sprite
    unsigned int formats[];
 };
 
-struct _Ecore_Drm_Device
-{
-   int id;
-   const char *seat;
-
-   struct 
-     {
-        int fd;
-        const char *name;
-        const char *path;
-        clockid_t clock;
-        Ecore_Fd_Handler *hdlr;
-        Ecore_Idle_Enterer *idler;
-     } drm;
-
-   unsigned int min_width, min_height;
-   unsigned int max_width, max_height;
-
-   unsigned int crtc_count;
-   unsigned int *crtcs;
-   unsigned int crtc_allocator;
-
-   Eina_List *seats;
-   Eina_List *inputs;
-   Eina_List *outputs;
-   Eina_List *sprites;
-
-   struct 
-     {
-        int fd;
-        const char *name;
-        Ecore_Event_Handler *event_hdlr;
-     } tty;
-
-   unsigned int format;
-   Eina_Bool use_hw_accel : 1;
-   Eina_Bool cursors_broken : 1;
-
-   struct xkb_context *xkb_ctx;
-
-   unsigned int window;
-
-/* #ifdef HAVE_GBM */
-/*    struct gbm_device *gbm; */
-/*    struct */
-/*      { */
-/*         EGLDisplay disp; */
-/*         EGLContext ctxt; */
-/*         EGLConfig cfg; */
-/*      } egl; */
-/* #endif */
-};
-
 void _ecore_drm_message_send(int opcode, int fd, void *data, size_t bytes);
 Eina_Bool _ecore_drm_message_receive(int opcode, int *fd, void **data, size_t bytes);