Use an enum for the backend

SVN revision: 39664
This commit is contained in:
Vincent Torri 2009-03-24 07:36:46 +00:00
parent 309606b2dd
commit 8b7a4fd16e
1 changed files with 21 additions and 17 deletions

View File

@ -3,11 +3,15 @@
#include <X11/Xlib.h> #include <X11/Xlib.h>
typedef enum
{
EVAS_ENGINE_INFO_SOFTWARE_X11_BACKEND_XLIB,
EVAS_ENGINE_INFO_SOFTWARE_X11_BACKEND_XCB
} Evas_Engine_Info_Software_X11_Backend;
typedef struct _Evas_Engine_Info_Software_X11 Evas_Engine_Info_Software_X11; typedef struct _Evas_Engine_Info_Software_X11 Evas_Engine_Info_Software_X11;
/* /*
* backend: 0 == Xlib, 1 == XCB
*
* Xlib | XCB * Xlib | XCB
* connection | Display * | xcb_connection_t * * connection | Display * | xcb_connection_t *
* screen | NULL | xcb_screen_t * * screen | NULL | xcb_screen_t *
@ -25,23 +29,23 @@ struct _Evas_Engine_Info_Software_X11
/* engine specific data & parameters it needs to set up */ /* engine specific data & parameters it needs to set up */
struct { struct {
int backend; Evas_Engine_Info_Software_X11_Backend backend;
void *connection; void *connection;
void *screen; void *screen;
unsigned int drawable; unsigned int drawable;
unsigned int mask; unsigned int mask;
void *visual; void *visual;
unsigned int colormap; unsigned int colormap;
int depth; int depth;
int rotation; int rotation;
int alloc_grayscale : 1; int alloc_grayscale : 1;
int debug : 1; int debug : 1;
int shape_dither : 1; int shape_dither : 1;
int destination_alpha : 1; int destination_alpha : 1;
int track_mask_changes : 1; int track_mask_changes : 1;
int alloc_colors_max; int alloc_colors_max;
} info; } info;
/* engine specific function calls to query stuff about the destination */ /* engine specific function calls to query stuff about the destination */
struct { struct {