Ecore_X: Remove recent xcb resource code (we're going to go a

different path with this) ;) Reorder init/shutdown procedures to match
order (first in, last out).



SVN revision: 61788
This commit is contained in:
Christopher Michael 2011-07-27 05:10:28 +00:00
parent 6f8f583abf
commit c3730e9748
6 changed files with 21 additions and 116 deletions

View File

@ -66,8 +66,7 @@ libecore_x_xcb_la_SOURCES = \
ecore_xcb_xinerama.c \
ecore_xcb_error.c \
ecore_xcb_xtest.c \
ecore_xcb_vsync.c \
ecore_xcb_resource.c
ecore_xcb_vsync.c
libecore_x_xcb_la_LIBADD = \
@XCB_DAMAGE_LIBS@ \

View File

@ -1233,11 +1233,8 @@ _ecore_xcb_shutdown(Eina_Bool close_display)
LOGFN(__FILE__, __LINE__, __FUNCTION__);
/* shutdown keymap */
_ecore_xcb_keymap_shutdown();
/* shutdown events */
_ecore_xcb_events_shutdown();
/* shutdown dnd */
_ecore_xcb_dnd_shutdown();
/* shutdown selection */
_ecore_xcb_selection_shutdown();
@ -1245,16 +1242,15 @@ _ecore_xcb_shutdown(Eina_Bool close_display)
/* shutdown netwm */
ecore_x_netwm_shutdown();
/* shutdown dnd */
_ecore_xcb_dnd_shutdown();
#ifdef ECORE_XCB_XINPUT
_ecore_xcb_input_shutdown();
#endif
if (_ecore_xcb_fd_handler)
ecore_main_fd_handler_del(_ecore_xcb_fd_handler);
/* shutdown keymap */
_ecore_xcb_keymap_shutdown();
/* shutdown events */
_ecore_xcb_events_shutdown();
/* disconnect from display server */
if (close_display)
xcb_disconnect(_ecore_xcb_conn);

View File

@ -332,21 +332,21 @@ _ecore_xcb_cursor_image_load_cursor(Ecore_X_Window win, int w, int h, int hot_x,
static void
_ecore_xcb_cursor_default_size_get(void)
{
char *v = NULL;
/* char *v = NULL; */
v = getenv("XCURSOR_SIZE");
if (!v)
v = _ecore_xcb_resource_get_string("Xcursor", "size");
if (v) _ecore_xcb_cursor_size = ((atoi(v) * 16) / 72);
/* v = getenv("XCURSOR_SIZE"); */
/* if (!v) */
/* v = _ecore_xcb_resource_get_string("Xcursor", "size"); */
/* if (v) _ecore_xcb_cursor_size = ((atoi(v) * 16) / 72); */
}
static void
_ecore_xcb_cursor_dpi_size_get(void)
{
int v = 0;
/* int v = 0; */
v = _ecore_xcb_resource_get_int("Xft", "dpi");
if (v) _ecore_xcb_cursor_size = ((v * 16) / 72);
/* v = _ecore_xcb_resource_get_int("Xft", "dpi"); */
/* if (v) _ecore_xcb_cursor_size = ((v * 16) / 72); */
}
static void

View File

@ -334,7 +334,4 @@ Ecore_X_Window_State _ecore_xcb_netwm_window_state_get(Ecore_X_Atom atom);
int _ecore_xcb_error_handle(xcb_generic_error_t *err);
int _ecore_xcb_io_error_handle(xcb_generic_error_t *err);
char *_ecore_xcb_resource_get_string(const char *prog, const char *name);
int _ecore_xcb_resource_get_int(const char *prog, const char *name);
#endif

View File

@ -56,8 +56,8 @@ _ecore_xcb_render_finalize(void)
{
_render_argb = EINA_TRUE;
v = getenv("XCURSOR_CORE");
if (!v)
v = _ecore_xcb_resource_get_string("Xcursor", "core");
/* if (!v) */
/* v = _ecore_xcb_resource_get_string("Xcursor", "core"); */
if ((v) && (_ecore_xcb_render_parse_boolean(v)))
_render_argb = EINA_FALSE;
}
@ -66,8 +66,8 @@ _ecore_xcb_render_finalize(void)
{
_render_anim = EINA_TRUE;
v = getenv("XCURSOR_ANIM");
if (!v)
v = _ecore_xcb_resource_get_string("Xcursor", "anim");
/* if (!v) */
/* v = _ecore_xcb_resource_get_string("Xcursor", "anim"); */
if ((v) && (_ecore_xcb_render_parse_boolean(v)))
_render_anim = EINA_FALSE;
}

View File

@ -1,87 +0,0 @@
/* NB: Reference GetDflt.c, Xresource.h, Xrm.c, Quarks.c */
#include "ecore_xcb_private.h"
#include <ctype.h>
#ifdef NEED_SYS_PARAM_H
# include <sys/param.h>
#endif
#ifdef NEED_NETDB_H
# include <netdb.h>
#endif
/* local structs */
typedef struct _Ecore_Xcb_Resource_Value
{
unsigned int size;
void *addr;
} Ecore_Xcb_Resource_Value;
/* local function prototypes */
static char *_ecore_xcb_resource_get(const char *prog, const char *name);
static int _ecore_xcb_resource_string_to_name(const char *str);
static int _ecore_xcb_resource_string_to_class(const char *str);
static Eina_Bool _ecore_xcb_resource_fetch(int *names, int *klasses, int *type, Ecore_Xcb_Resource_Value value);
char *
_ecore_xcb_resource_get_string(const char *prog, const char *name)
{
char *ret = NULL;
ret = _ecore_xcb_resource_get(prog, name);
return NULL;
// return ret;
}
int
_ecore_xcb_resource_get_int(const char *prog, const char *name)
{
char *ret = NULL;
ret = _ecore_xcb_resource_get(prog, name);
return 0;
// return atoi(ret);
}
/* local functions */
static char *
_ecore_xcb_resource_get(const char *prog, const char *name)
{
char *prog_name = NULL;
int names[3], klasses[3];
int type;
Ecore_Xcb_Resource_Value value;
prog_name = strrchr(prog, '/');
if (prog_name)
prog_name++;
else
prog_name = (char *)prog;
names[0] = _ecore_xcb_resource_string_to_name(prog_name);
names[1] = _ecore_xcb_resource_string_to_name(name);
names[2] = 0;
klasses[0] = _ecore_xcb_resource_string_to_class("Program");
klasses[1] = _ecore_xcb_resource_string_to_class("Name");
klasses[2] = 0;
_ecore_xcb_resource_fetch(names, klasses, &type, value);
return (value.addr);
}
static int
_ecore_xcb_resource_string_to_name(const char *str)
{
return 0;
}
static int
_ecore_xcb_resource_string_to_class(const char *str)
{
return 0;
}
static Eina_Bool
_ecore_xcb_resource_fetch(int *names, int *klasses, int *type, Ecore_Xcb_Resource_Value value)
{
return EINA_FALSE;
}