Ecore_X: Remove recent xcb resource code (we're going to go a
authordevilhorns <devilhorns@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 27 Jul 2011 05:10:28 +0000 (05:10 +0000)
committerdevilhorns <devilhorns@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 27 Jul 2011 05:10:28 +0000 (05:10 +0000)
different path with this) ;) Reorder init/shutdown procedures to match
order (first in, last out).

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@61788 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/ecore_x/xcb/Makefile.am
src/lib/ecore_x/xcb/ecore_xcb.c
src/lib/ecore_x/xcb/ecore_xcb_cursor.c
src/lib/ecore_x/xcb/ecore_xcb_private.h
src/lib/ecore_x/xcb/ecore_xcb_render.c
src/lib/ecore_x/xcb/ecore_xcb_resource.c [deleted file]

index bcdd6b2..203bfe0 100644 (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@ \
index dcddd26..633a42e 100644 (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);
index e374a08..f82e1f1 100644 (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 
index 926e13b..5330de2 100644 (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
index 212e5c5..a332754 100644 (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;
                     }
diff --git a/src/lib/ecore_x/xcb/ecore_xcb_resource.c b/src/lib/ecore_x/xcb/ecore_xcb_resource.c
deleted file mode 100644 (file)
index 77a7ece..0000000
+++ /dev/null
@@ -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;
-}