Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
#include "ecore_xcb_private.h"
|
2011-07-25 22:54:01 -07:00
|
|
|
#include <X11/Xlib-xcb.h>
|
|
|
|
#include <dlfcn.h>
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
/* local function prototypes */
|
2011-10-20 22:40:59 -07:00
|
|
|
static int _ecore_xcb_shutdown(Eina_Bool close_display);
|
|
|
|
static Eina_Bool _ecore_xcb_fd_handle(void *data,
|
|
|
|
Ecore_Fd_Handler *hdlr __UNUSED__);
|
|
|
|
static Eina_Bool _ecore_xcb_fd_handle_buff(void *data,
|
|
|
|
Ecore_Fd_Handler *hdlr __UNUSED__);
|
2011-09-13 09:32:34 -07:00
|
|
|
static Eina_Bool _ecore_xcb_idle_enter(void *data __UNUSED__);
|
2011-07-14 08:35:42 -07:00
|
|
|
|
|
|
|
/* local variables */
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
static int _ecore_xcb_init_count = 0;
|
|
|
|
static int _ecore_xcb_grab_count = 0;
|
2011-07-14 08:35:42 -07:00
|
|
|
static Ecore_Fd_Handler *_ecore_xcb_fd_handler = NULL;
|
|
|
|
static xcb_generic_event_t *_ecore_xcb_event_buffered = NULL;
|
2011-09-13 09:32:34 -07:00
|
|
|
static Ecore_Idle_Enterer *_ecore_xcb_idle_enterer = NULL;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
/* external variables */
|
|
|
|
int _ecore_xcb_log_dom = -1;
|
|
|
|
Ecore_X_Display *_ecore_xcb_display = NULL;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
Ecore_X_Connection *_ecore_xcb_conn = NULL;
|
2010-08-02 11:54:27 -07:00
|
|
|
Ecore_X_Screen *_ecore_xcb_screen = NULL;
|
2011-07-14 08:35:42 -07:00
|
|
|
Ecore_X_Atom _ecore_xcb_atoms_wm_protocol[ECORE_X_WM_PROTOCOL_NUM];
|
2010-08-02 11:54:27 -07:00
|
|
|
double _ecore_xcb_double_click_time = 0.25;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
|
|
|
/**
|
2011-07-14 08:35:42 -07:00
|
|
|
* @defgroup Ecore_X_Init_Group X Library Init and Shutdown Functions
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
*
|
|
|
|
* Functions that start and shut down the Ecore X Library.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initialize the X display connection to the given display.
|
|
|
|
*
|
|
|
|
* @param name Display target name. If @c NULL, the default display is
|
|
|
|
* assumed.
|
|
|
|
* @return The number of times the library has been initialized without
|
|
|
|
* being shut down. 0 is returned if an error occurs.
|
2011-07-14 08:35:42 -07:00
|
|
|
* @ingroup Ecore_X_Init_Group
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
*/
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI int
|
|
|
|
ecore_x_init(const char *name)
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
{
|
2011-07-25 22:54:01 -07:00
|
|
|
char *gl = NULL;
|
2011-07-14 08:35:42 -07:00
|
|
|
uint32_t mask, list[1];
|
2010-08-02 11:54:27 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
/* check if we have initialized already */
|
2011-10-20 22:40:59 -07:00
|
|
|
if (++_ecore_xcb_init_count != 1)
|
2011-07-14 08:35:42 -07:00
|
|
|
return _ecore_xcb_init_count;
|
2010-08-05 06:50:47 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-08-08 13:39:10 -07:00
|
|
|
/* try to initialize eina */
|
2011-10-20 22:40:59 -07:00
|
|
|
if (!eina_init()) return --_ecore_xcb_init_count;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
/* setup ecore_xcb log domain */
|
2011-10-20 22:40:59 -07:00
|
|
|
_ecore_xcb_log_dom =
|
2011-07-14 08:35:42 -07:00
|
|
|
eina_log_domain_register("ecore_x", ECORE_XCB_DEFAULT_LOG_COLOR);
|
2011-10-20 22:40:59 -07:00
|
|
|
if (_ecore_xcb_log_dom < 0)
|
2011-07-14 08:35:42 -07:00
|
|
|
{
|
|
|
|
EINA_LOG_ERR("Cannot create Ecore Xcb log domain");
|
2011-08-08 13:39:10 -07:00
|
|
|
eina_shutdown();
|
|
|
|
return --_ecore_xcb_init_count;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* try to initialize ecore */
|
2011-10-20 22:40:59 -07:00
|
|
|
if (!ecore_init())
|
2011-08-08 13:39:10 -07:00
|
|
|
{
|
|
|
|
/* unregister log domain */
|
2011-10-20 22:40:59 -07:00
|
|
|
eina_log_domain_unregister(_ecore_xcb_log_dom);
|
|
|
|
_ecore_xcb_log_dom = -1;
|
|
|
|
eina_shutdown();
|
|
|
|
return --_ecore_xcb_init_count;
|
2011-07-14 08:35:42 -07:00
|
|
|
}
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
/* try to initialize ecore_event */
|
2011-10-20 22:40:59 -07:00
|
|
|
if (!ecore_event_init())
|
2011-07-14 08:35:42 -07:00
|
|
|
{
|
|
|
|
/* unregister log domain */
|
2011-10-20 22:40:59 -07:00
|
|
|
eina_log_domain_unregister(_ecore_xcb_log_dom);
|
|
|
|
_ecore_xcb_log_dom = -1;
|
|
|
|
ecore_shutdown();
|
|
|
|
eina_shutdown();
|
|
|
|
return --_ecore_xcb_init_count;
|
2011-07-14 08:35:42 -07:00
|
|
|
}
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-08-08 13:39:10 -07:00
|
|
|
/* NB: XLib has XInitThreads */
|
|
|
|
|
2011-07-25 22:54:01 -07:00
|
|
|
/* check for env var which says we are not going to use GL @ all
|
2011-10-20 22:40:59 -07:00
|
|
|
*
|
|
|
|
* NB: This is done because if someone wants a 'pure' xcb implementation
|
|
|
|
* of ecore_x, all they need do is export this variable in the environment
|
|
|
|
* and ecore_x will not use xlib stuff at all.
|
|
|
|
*
|
|
|
|
* The upside is you can get pure xcb-based ecore_x (w/ all the speed), but
|
|
|
|
* there is a down-side here in that you cannot get OpenGL without XLib :(
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
*/
|
2011-07-25 22:54:01 -07:00
|
|
|
if ((gl = getenv("ECORE_X_NO_XLIB")))
|
|
|
|
{
|
2011-10-20 22:40:59 -07:00
|
|
|
/* we found the env var that says 'Yes, we are not ever gonna try
|
2011-07-25 22:54:01 -07:00
|
|
|
* OpenGL so it is safe to not use XLib at all' */
|
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
/* try to connect to the display server */
|
|
|
|
_ecore_xcb_conn = xcb_connect(name, NULL);
|
2011-07-25 22:54:01 -07:00
|
|
|
}
|
2011-10-20 22:40:59 -07:00
|
|
|
else
|
2011-07-25 22:54:01 -07:00
|
|
|
{
|
2011-10-20 22:40:59 -07:00
|
|
|
/* env var was not specified, so we will assume that the user
|
2011-07-25 22:54:01 -07:00
|
|
|
* may want opengl @ some point. connect this way for opengl to work */
|
2011-10-20 22:40:59 -07:00
|
|
|
void *libxcb, *libxlib;
|
|
|
|
Display *(*_real_display)(const char *display);
|
|
|
|
xcb_connection_t *(*_real_connection)(Display * dpy);
|
|
|
|
void (*_real_queue)(Display *dpy,
|
|
|
|
enum XEventQueueOwner owner);
|
|
|
|
int (*_real_close)(Display *dpy);
|
2011-08-08 13:39:10 -07:00
|
|
|
#ifdef EVAS_FRAME_QUEUING
|
2011-10-20 22:40:59 -07:00
|
|
|
Status (*_real_threads)(void);
|
2011-08-08 13:39:10 -07:00
|
|
|
#endif
|
2011-07-25 22:54:01 -07:00
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
/* want to dlopen here to avoid actual library linkage */
|
|
|
|
libxlib = dlopen("libX11.so", (RTLD_LAZY | RTLD_GLOBAL));
|
|
|
|
if (!libxlib)
|
|
|
|
libxlib = dlopen("libX11.so.6", (RTLD_LAZY | RTLD_GLOBAL));
|
|
|
|
if (!libxlib)
|
|
|
|
libxlib = dlopen("libX11.so.6.3.0", (RTLD_LAZY | RTLD_GLOBAL));
|
|
|
|
if (!libxlib)
|
|
|
|
{
|
|
|
|
ERR("Could not dlsym to libX11");
|
|
|
|
/* unregister log domain */
|
|
|
|
eina_log_domain_unregister(_ecore_xcb_log_dom);
|
|
|
|
_ecore_xcb_log_dom = -1;
|
|
|
|
ecore_event_shutdown();
|
|
|
|
ecore_shutdown();
|
|
|
|
eina_shutdown();
|
|
|
|
return --_ecore_xcb_init_count;
|
|
|
|
}
|
|
|
|
|
|
|
|
libxcb = dlopen("libX11-xcb.so", (RTLD_LAZY | RTLD_GLOBAL));
|
|
|
|
if (!libxcb)
|
|
|
|
libxcb = dlopen("libX11-xcb.so.1", (RTLD_LAZY | RTLD_GLOBAL));
|
|
|
|
if (!libxcb)
|
|
|
|
libxcb = dlopen("libX11-xcb.so.1.0.0", (RTLD_LAZY | RTLD_GLOBAL));
|
|
|
|
if (!libxcb)
|
|
|
|
{
|
|
|
|
ERR("Could not dlsym to libX11-xcb");
|
|
|
|
/* unregister log domain */
|
|
|
|
eina_log_domain_unregister(_ecore_xcb_log_dom);
|
|
|
|
_ecore_xcb_log_dom = -1;
|
|
|
|
ecore_event_shutdown();
|
|
|
|
ecore_shutdown();
|
|
|
|
eina_shutdown();
|
|
|
|
return --_ecore_xcb_init_count;
|
|
|
|
}
|
|
|
|
|
|
|
|
_real_display = dlsym(libxlib, "XOpenDisplay");
|
|
|
|
_real_close = dlsym(libxlib, "XCloseDisplay");
|
|
|
|
_real_connection = dlsym(libxcb, "XGetXCBConnection");
|
|
|
|
_real_queue = dlsym(libxcb, "XSetEventQueueOwner");
|
2011-08-08 13:39:10 -07:00
|
|
|
#ifdef EVAS_FRAME_QUEUING
|
2011-10-20 22:40:59 -07:00
|
|
|
_real_threads = dlsym(libxlib, "XInitThreads");
|
2011-08-08 13:39:10 -07:00
|
|
|
#endif
|
2011-07-25 22:54:01 -07:00
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
if (_real_display)
|
|
|
|
{
|
2011-08-08 13:39:10 -07:00
|
|
|
#ifdef EVAS_FRAME_QUEUING
|
2011-10-20 22:40:59 -07:00
|
|
|
if (_real_threads) _real_threads();
|
2011-08-08 13:39:10 -07:00
|
|
|
#endif
|
2011-10-20 22:40:59 -07:00
|
|
|
_ecore_xcb_display = _real_display(name);
|
|
|
|
if (!_ecore_xcb_display)
|
|
|
|
{
|
|
|
|
ERR("Could not open Display via XLib");
|
|
|
|
/* unregister log domain */
|
|
|
|
eina_log_domain_unregister(_ecore_xcb_log_dom);
|
|
|
|
_ecore_xcb_log_dom = -1;
|
|
|
|
ecore_event_shutdown();
|
|
|
|
ecore_shutdown();
|
|
|
|
eina_shutdown();
|
|
|
|
return --_ecore_xcb_init_count;
|
|
|
|
}
|
|
|
|
if (_real_connection)
|
|
|
|
_ecore_xcb_conn = _real_connection(_ecore_xcb_display);
|
|
|
|
if (!_ecore_xcb_conn)
|
|
|
|
{
|
|
|
|
ERR("Could not get XCB Connection from XLib");
|
|
|
|
|
|
|
|
if (_real_close) _real_close(_ecore_xcb_display);
|
|
|
|
|
|
|
|
/* unregister log domain */
|
|
|
|
eina_log_domain_unregister(_ecore_xcb_log_dom);
|
|
|
|
_ecore_xcb_log_dom = -1;
|
|
|
|
ecore_event_shutdown();
|
|
|
|
ecore_shutdown();
|
|
|
|
eina_shutdown();
|
|
|
|
return --_ecore_xcb_init_count;
|
|
|
|
}
|
|
|
|
if (_real_queue)
|
|
|
|
_real_queue(_ecore_xcb_display, XCBOwnsEventQueue);
|
|
|
|
}
|
2011-07-25 22:54:01 -07:00
|
|
|
}
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
if (xcb_connection_has_error(_ecore_xcb_conn))
|
|
|
|
{
|
|
|
|
CRIT("XCB Connection has error");
|
|
|
|
eina_log_domain_unregister(_ecore_xcb_log_dom);
|
|
|
|
_ecore_xcb_log_dom = -1;
|
|
|
|
ecore_event_shutdown();
|
|
|
|
ecore_shutdown();
|
2011-08-08 13:39:10 -07:00
|
|
|
eina_shutdown();
|
2011-07-14 08:35:42 -07:00
|
|
|
return --_ecore_xcb_init_count;
|
|
|
|
}
|
2010-08-02 11:54:27 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
/* grab the default screen */
|
2011-10-20 22:40:59 -07:00
|
|
|
_ecore_xcb_screen =
|
2011-07-14 08:35:42 -07:00
|
|
|
xcb_setup_roots_iterator(xcb_get_setup(_ecore_xcb_conn)).data;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
/* NB: This method of init/finalize extensions first, then atoms
|
2011-10-20 22:40:59 -07:00
|
|
|
* Does end up being 2 round trips to X, BUT if we do extensions init then
|
|
|
|
* atoms init first, and call the 'finalize' functions later, we end up
|
|
|
|
* being slower, so it's a trade-off. This current method clocks in
|
2011-07-14 08:35:42 -07:00
|
|
|
* around 0.003 for fetching atoms VS 0.010 for init both then finalize */
|
2010-08-02 11:54:27 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
/* prefetch extension data */
|
|
|
|
_ecore_xcb_extensions_init();
|
2010-08-02 11:54:27 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
/* finalize extensions */
|
|
|
|
_ecore_xcb_extensions_finalize();
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
/* set keyboard autorepeat */
|
|
|
|
mask = XCB_KB_AUTO_REPEAT_MODE;
|
|
|
|
list[0] = XCB_AUTO_REPEAT_MODE_ON;
|
|
|
|
xcb_change_keyboard_control(_ecore_xcb_conn, mask, list);
|
2010-08-02 11:54:27 -07:00
|
|
|
|
2011-08-08 13:39:10 -07:00
|
|
|
/* setup xcb events */
|
|
|
|
_ecore_xcb_events_init();
|
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
/* setup xcb keymasks */
|
|
|
|
_ecore_xcb_keymap_init();
|
2010-08-02 11:54:27 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
/* finalize xcb keymasks */
|
|
|
|
_ecore_xcb_keymap_finalize();
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
/* setup ecore fd handler */
|
2011-10-20 22:40:59 -07:00
|
|
|
_ecore_xcb_fd_handler =
|
|
|
|
ecore_main_fd_handler_add(xcb_get_file_descriptor(_ecore_xcb_conn),
|
|
|
|
ECORE_FD_READ, _ecore_xcb_fd_handle,
|
|
|
|
_ecore_xcb_conn, _ecore_xcb_fd_handle_buff,
|
2011-07-14 08:35:42 -07:00
|
|
|
_ecore_xcb_conn);
|
2011-08-20 14:14:34 -07:00
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
if (!_ecore_xcb_fd_handler)
|
2011-07-14 08:35:42 -07:00
|
|
|
return _ecore_xcb_shutdown(EINA_TRUE);
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
/* prefetch atoms */
|
|
|
|
_ecore_xcb_atoms_init();
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
/* finalize atoms */
|
|
|
|
_ecore_xcb_atoms_finalize();
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
/* icccm_init: dummy function */
|
|
|
|
ecore_x_icccm_init();
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
/* setup netwm */
|
|
|
|
ecore_x_netwm_init();
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
/* old e hints init: dummy function */
|
|
|
|
ecore_x_e_init();
|
2009-10-09 22:28:43 -07:00
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
_ecore_xcb_atoms_wm_protocol[ECORE_X_WM_PROTOCOL_DELETE_REQUEST] =
|
2011-07-14 08:35:42 -07:00
|
|
|
ECORE_X_ATOM_WM_DELETE_WINDOW;
|
2011-10-20 22:40:59 -07:00
|
|
|
_ecore_xcb_atoms_wm_protocol[ECORE_X_WM_PROTOCOL_TAKE_FOCUS] =
|
2011-07-14 08:35:42 -07:00
|
|
|
ECORE_X_ATOM_WM_TAKE_FOCUS;
|
2011-10-20 22:40:59 -07:00
|
|
|
_ecore_xcb_atoms_wm_protocol[ECORE_X_NET_WM_PROTOCOL_PING] =
|
2011-07-14 08:35:42 -07:00
|
|
|
ECORE_X_ATOM_NET_WM_PING;
|
2011-10-20 22:40:59 -07:00
|
|
|
_ecore_xcb_atoms_wm_protocol[ECORE_X_NET_WM_PROTOCOL_SYNC_REQUEST] =
|
2011-07-14 08:35:42 -07:00
|
|
|
ECORE_X_ATOM_NET_WM_SYNC_REQUEST;
|
2009-10-09 22:28:43 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
/* setup selection */
|
|
|
|
_ecore_xcb_selection_init();
|
2009-10-09 22:28:43 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
/* setup dnd */
|
|
|
|
_ecore_xcb_dnd_init();
|
2010-08-05 06:50:47 -07:00
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
_ecore_xcb_idle_enterer =
|
2011-09-20 00:14:11 -07:00
|
|
|
ecore_idle_enterer_add(_ecore_xcb_idle_enter, NULL);
|
|
|
|
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
return _ecore_xcb_init_count;
|
2011-07-14 08:35:42 -07:00
|
|
|
}
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Shuts down the Ecore X library.
|
|
|
|
*
|
|
|
|
* In shutting down the library, the X display connection is terminated
|
|
|
|
* and any event handlers for it are removed.
|
|
|
|
*
|
|
|
|
* @return The number of times the library has been initialized without
|
|
|
|
* being shut down.
|
2011-07-14 08:35:42 -07:00
|
|
|
* @ingroup Ecore_X_Init_Group
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
*/
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI int
|
|
|
|
ecore_x_shutdown(void)
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
{
|
2011-07-14 08:35:42 -07:00
|
|
|
return _ecore_xcb_shutdown(EINA_TRUE);
|
|
|
|
}
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Shuts down the Ecore X library.
|
|
|
|
*
|
2011-07-14 08:35:42 -07:00
|
|
|
* As ecore_x_shutdown, except do not close Display, only connection.
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
*
|
2011-07-14 08:35:42 -07:00
|
|
|
* @ingroup Ecore_X_Init_Group
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
*/
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI int
|
|
|
|
ecore_x_disconnect(void)
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
{
|
2011-07-14 08:35:42 -07:00
|
|
|
return _ecore_xcb_shutdown(EINA_FALSE);
|
|
|
|
}
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
|
|
|
/**
|
2011-07-14 08:35:42 -07:00
|
|
|
* @defgroup Ecore_X_Flush_Group X Synchronization Functions
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
*
|
2011-07-14 08:35:42 -07:00
|
|
|
* Functions that ensure that all commands that have been issued by the
|
|
|
|
* Ecore X library have been sent to the server.
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2011-07-14 08:35:42 -07:00
|
|
|
* Sends all X commands in the X Display buffer.
|
|
|
|
* @ingroup Ecore_X_Flush_Group
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
*/
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI void
|
|
|
|
ecore_x_flush(void)
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
{
|
2011-08-30 11:34:40 -07:00
|
|
|
// LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
CHECK_XCB_CONN;
|
|
|
|
xcb_flush(_ecore_xcb_conn);
|
2011-07-14 08:35:42 -07:00
|
|
|
}
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Retrieves the Ecore_X_Screen handle used for the current X connection.
|
|
|
|
* @return The current default screen.
|
2011-07-14 08:35:42 -07:00
|
|
|
* @ingroup Ecore_X_Display_Attr_Group
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
*/
|
|
|
|
EAPI Ecore_X_Screen *
|
2011-10-20 22:40:59 -07:00
|
|
|
ecore_x_default_screen_get(void)
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
{
|
2011-07-14 08:35:42 -07:00
|
|
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
|
|
|
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
return (Ecore_X_Screen *)_ecore_xcb_screen;
|
2011-07-14 08:35:42 -07:00
|
|
|
}
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
EAPI Ecore_X_Connection *
|
2011-10-20 22:40:59 -07:00
|
|
|
ecore_x_connection_get(void)
|
2011-05-27 12:17:04 -07:00
|
|
|
{
|
|
|
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
2011-07-14 08:35:42 -07:00
|
|
|
|
2011-09-20 02:12:02 -07:00
|
|
|
CHECK_XCB_CONN;
|
2011-07-14 08:35:42 -07:00
|
|
|
return (Ecore_X_Connection *)_ecore_xcb_conn;
|
2011-05-27 12:17:04 -07:00
|
|
|
}
|
|
|
|
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
/**
|
2011-07-14 08:35:42 -07:00
|
|
|
* Return the last event time
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
*/
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI Ecore_X_Time
|
|
|
|
ecore_x_current_time_get(void)
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
{
|
2011-07-14 08:35:42 -07:00
|
|
|
return _ecore_xcb_events_last_time_get();
|
|
|
|
}
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
|
|
|
/**
|
2011-07-14 08:35:42 -07:00
|
|
|
* Flushes the command buffer and waits until all requests have been
|
|
|
|
* processed by the server.
|
|
|
|
* @ingroup Ecore_X_Flush_Group
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
*/
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI void
|
|
|
|
ecore_x_sync(void)
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
{
|
2011-07-14 08:35:42 -07:00
|
|
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-09-20 02:12:02 -07:00
|
|
|
CHECK_XCB_CONN;
|
2011-10-20 22:40:59 -07:00
|
|
|
free(xcb_get_input_focus_reply(_ecore_xcb_conn,
|
|
|
|
xcb_get_input_focus_unchecked(_ecore_xcb_conn),
|
2011-08-20 04:04:10 -07:00
|
|
|
NULL));
|
2011-07-14 08:35:42 -07:00
|
|
|
}
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI void
|
|
|
|
ecore_x_grab(void)
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
{
|
2011-07-14 08:35:42 -07:00
|
|
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-09-20 02:12:02 -07:00
|
|
|
CHECK_XCB_CONN;
|
2011-07-14 08:35:42 -07:00
|
|
|
_ecore_xcb_grab_count++;
|
2011-10-20 22:40:59 -07:00
|
|
|
if (_ecore_xcb_grab_count == 1)
|
2011-07-14 08:35:42 -07:00
|
|
|
xcb_grab_server(_ecore_xcb_conn);
|
|
|
|
}
|
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI void
|
|
|
|
ecore_x_ungrab(void)
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
{
|
2011-07-14 08:35:42 -07:00
|
|
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
|
|
|
|
2011-09-20 02:12:02 -07:00
|
|
|
CHECK_XCB_CONN;
|
2011-07-14 08:35:42 -07:00
|
|
|
_ecore_xcb_grab_count--;
|
|
|
|
if (_ecore_xcb_grab_count < 0) _ecore_xcb_grab_count = 0;
|
2011-10-20 22:40:59 -07:00
|
|
|
if (_ecore_xcb_grab_count == 0)
|
2011-07-14 08:35:42 -07:00
|
|
|
xcb_ungrab_server(_ecore_xcb_conn);
|
|
|
|
}
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
|
|
|
/**
|
2011-07-14 08:35:42 -07:00
|
|
|
* Send client message with given type and format 32.
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
*
|
2011-07-14 08:35:42 -07:00
|
|
|
* @param win The window the message is sent to.
|
|
|
|
* @param type The client message type.
|
|
|
|
* @param d0 The client message data item 1
|
|
|
|
* @param d1 The client message data item 2
|
|
|
|
* @param d2 The client message data item 3
|
|
|
|
* @param d3 The client message data item 4
|
|
|
|
* @param d4 The client message data item 5
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
*
|
2011-07-14 08:35:42 -07:00
|
|
|
* @return EINA_TRUE on success EINA_FALSE otherwise.
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
*/
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI Eina_Bool
|
|
|
|
ecore_x_client_message32_send(Ecore_X_Window win,
|
|
|
|
Ecore_X_Atom type,
|
|
|
|
Ecore_X_Event_Mask mask,
|
|
|
|
long d0,
|
|
|
|
long d1,
|
|
|
|
long d2,
|
|
|
|
long d3,
|
|
|
|
long d4)
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
{
|
2011-07-14 08:35:42 -07:00
|
|
|
xcb_client_message_event_t ev;
|
|
|
|
xcb_void_cookie_t cookie;
|
|
|
|
xcb_generic_error_t *err;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
2011-09-20 02:12:02 -07:00
|
|
|
CHECK_XCB_CONN;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
memset(&ev, 0, sizeof(xcb_client_message_event_t));
|
2010-08-02 11:54:27 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
ev.response_type = XCB_CLIENT_MESSAGE;
|
|
|
|
ev.format = 32;
|
|
|
|
ev.window = win;
|
|
|
|
ev.type = type;
|
|
|
|
ev.data.data32[0] = (uint32_t)d0;
|
|
|
|
ev.data.data32[1] = (uint32_t)d1;
|
|
|
|
ev.data.data32[2] = (uint32_t)d2;
|
|
|
|
ev.data.data32[3] = (uint32_t)d3;
|
|
|
|
ev.data.data32[4] = (uint32_t)d4;
|
|
|
|
|
2011-09-20 00:14:11 -07:00
|
|
|
cookie = xcb_send_event(_ecore_xcb_conn, 0, win, mask, (const char *)&ev);
|
2011-08-30 11:34:40 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
err = xcb_request_check(_ecore_xcb_conn, cookie);
|
2011-10-20 22:40:59 -07:00
|
|
|
if (err)
|
2011-07-14 08:35:42 -07:00
|
|
|
{
|
|
|
|
DBG("Problem Sending Event");
|
|
|
|
DBG("\tType: %d", type);
|
|
|
|
DBG("\tWin: %d", win);
|
|
|
|
_ecore_xcb_error_handle(err);
|
|
|
|
free(err);
|
|
|
|
return EINA_FALSE;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
}
|
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
|
|
|
/**
|
2011-07-14 08:35:42 -07:00
|
|
|
* Send client message with given type and format 8.
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
*
|
2011-07-14 08:35:42 -07:00
|
|
|
* @param win The window the message is sent to.
|
|
|
|
* @param type The client message type.
|
|
|
|
* @param data Data to be sent.
|
|
|
|
* @param len Number of data bytes, max 20.
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
*
|
2011-07-14 08:35:42 -07:00
|
|
|
* @return EINA_TRUE on success EINA_FALSE otherwise.
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
*/
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI Eina_Bool
|
|
|
|
ecore_x_client_message8_send(Ecore_X_Window win,
|
|
|
|
Ecore_X_Atom type,
|
|
|
|
const void *data,
|
|
|
|
int len)
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
{
|
2011-07-14 08:35:42 -07:00
|
|
|
xcb_client_message_event_t ev;
|
|
|
|
xcb_void_cookie_t cookie;
|
|
|
|
xcb_generic_error_t *err;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
2011-09-20 02:12:02 -07:00
|
|
|
CHECK_XCB_CONN;
|
2010-07-16 13:54:18 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
memset(&ev, 0, sizeof(xcb_client_message_event_t));
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
ev.response_type = XCB_CLIENT_MESSAGE;
|
|
|
|
ev.format = 8;
|
|
|
|
ev.window = win;
|
|
|
|
ev.type = type;
|
|
|
|
if (len > 20) len = 20;
|
|
|
|
memcpy(ev.data.data8, data, len);
|
|
|
|
memset(ev.data.data8 + len, 0, 20 - len);
|
2007-05-12 06:37:16 -07:00
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
cookie = xcb_send_event(_ecore_xcb_conn, 0, win,
|
2011-09-20 00:14:11 -07:00
|
|
|
XCB_EVENT_MASK_NO_EVENT, (const char *)&ev);
|
2011-08-30 11:34:40 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
err = xcb_request_check(_ecore_xcb_conn, cookie);
|
2011-10-20 22:40:59 -07:00
|
|
|
if (err)
|
2007-05-12 06:37:16 -07:00
|
|
|
{
|
2011-07-14 08:35:42 -07:00
|
|
|
DBG("Problem Sending Event");
|
|
|
|
DBG("\tType: %d", type);
|
|
|
|
DBG("\tWin: %d", win);
|
|
|
|
_ecore_xcb_error_handle(err);
|
|
|
|
free(err);
|
|
|
|
return EINA_FALSE;
|
2007-05-12 06:37:16 -07:00
|
|
|
}
|
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI Eina_Bool
|
|
|
|
ecore_x_mouse_down_send(Ecore_X_Window win,
|
|
|
|
int x,
|
|
|
|
int y,
|
|
|
|
int b)
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
{
|
2011-07-14 08:35:42 -07:00
|
|
|
xcb_translate_coordinates_cookie_t cookie;
|
|
|
|
xcb_translate_coordinates_reply_t *reply;
|
|
|
|
xcb_button_press_event_t ev;
|
|
|
|
xcb_void_cookie_t vcookie;
|
|
|
|
xcb_generic_error_t *err;
|
|
|
|
Ecore_X_Window root = 0;
|
|
|
|
|
|
|
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
2011-09-20 02:12:02 -07:00
|
|
|
CHECK_XCB_CONN;
|
2011-07-14 08:35:42 -07:00
|
|
|
|
|
|
|
root = ecore_x_window_root_get(win);
|
|
|
|
cookie = xcb_translate_coordinates(_ecore_xcb_conn, win, root, x, y);
|
|
|
|
reply = xcb_translate_coordinates_reply(_ecore_xcb_conn, cookie, NULL);
|
|
|
|
if (!reply) return EINA_FALSE;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
memset(&ev, 0, sizeof(xcb_button_press_event_t));
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
ev.response_type = XCB_BUTTON_PRESS;
|
2011-07-14 08:35:42 -07:00
|
|
|
ev.event = win;
|
|
|
|
ev.child = win;
|
|
|
|
ev.root = root;
|
|
|
|
ev.event_x = x;
|
|
|
|
ev.event_y = y;
|
|
|
|
ev.same_screen = 1;
|
|
|
|
ev.state = 1 << b;
|
|
|
|
ev.detail = b; // xcb uses detail for button
|
|
|
|
ev.root_x = reply->dst_x;
|
|
|
|
ev.root_y = reply->dst_y;
|
|
|
|
ev.time = ecore_x_current_time_get();
|
|
|
|
free(reply);
|
2007-05-12 06:37:16 -07:00
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
vcookie = xcb_send_event(_ecore_xcb_conn, 1, win,
|
2011-07-14 08:35:42 -07:00
|
|
|
XCB_EVENT_MASK_BUTTON_PRESS, (const char *)&ev);
|
2011-08-30 11:34:40 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
err = xcb_request_check(_ecore_xcb_conn, vcookie);
|
2011-10-20 22:40:59 -07:00
|
|
|
if (err)
|
2010-06-15 15:37:07 -07:00
|
|
|
{
|
2011-07-14 08:35:42 -07:00
|
|
|
_ecore_xcb_error_handle(err);
|
|
|
|
free(err);
|
|
|
|
return EINA_FALSE;
|
2010-06-15 15:37:07 -07:00
|
|
|
}
|
2007-05-12 06:37:16 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI Eina_Bool
|
|
|
|
ecore_x_mouse_up_send(Ecore_X_Window win,
|
|
|
|
int x,
|
|
|
|
int y,
|
|
|
|
int b)
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
{
|
2011-07-14 08:35:42 -07:00
|
|
|
xcb_translate_coordinates_cookie_t cookie;
|
|
|
|
xcb_translate_coordinates_reply_t *reply;
|
|
|
|
xcb_button_release_event_t ev;
|
|
|
|
xcb_void_cookie_t vcookie;
|
|
|
|
xcb_generic_error_t *err;
|
|
|
|
Ecore_X_Window root = 0;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
2011-09-20 02:12:02 -07:00
|
|
|
CHECK_XCB_CONN;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
root = ecore_x_window_root_get(win);
|
|
|
|
cookie = xcb_translate_coordinates(_ecore_xcb_conn, win, root, x, y);
|
|
|
|
reply = xcb_translate_coordinates_reply(_ecore_xcb_conn, cookie, NULL);
|
|
|
|
if (!reply) return EINA_FALSE;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
memset(&ev, 0, sizeof(xcb_button_release_event_t));
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
ev.response_type = XCB_BUTTON_RELEASE;
|
|
|
|
ev.event = win;
|
|
|
|
ev.child = win;
|
|
|
|
ev.root = root;
|
|
|
|
ev.event_x = x;
|
|
|
|
ev.event_y = y;
|
|
|
|
ev.same_screen = 1;
|
|
|
|
ev.state = 0;
|
|
|
|
ev.root_x = reply->dst_x;
|
|
|
|
ev.root_y = reply->dst_y;
|
|
|
|
ev.detail = b; // xcb uses detail for button
|
|
|
|
ev.time = ecore_x_current_time_get();
|
|
|
|
free(reply);
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
vcookie = xcb_send_event(_ecore_xcb_conn, 1, win,
|
2011-07-14 08:35:42 -07:00
|
|
|
XCB_EVENT_MASK_BUTTON_RELEASE, (const char *)&ev);
|
2011-08-30 11:34:40 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
err = xcb_request_check(_ecore_xcb_conn, vcookie);
|
2011-10-20 22:40:59 -07:00
|
|
|
if (err)
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
{
|
2011-07-14 08:35:42 -07:00
|
|
|
_ecore_xcb_error_handle(err);
|
|
|
|
free(err);
|
|
|
|
return EINA_FALSE;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
}
|
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI Eina_Bool
|
|
|
|
ecore_x_mouse_move_send(Ecore_X_Window win,
|
|
|
|
int x,
|
|
|
|
int y)
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
{
|
2011-07-14 08:35:42 -07:00
|
|
|
xcb_translate_coordinates_cookie_t cookie;
|
|
|
|
xcb_translate_coordinates_reply_t *reply;
|
|
|
|
xcb_motion_notify_event_t ev;
|
|
|
|
xcb_void_cookie_t vcookie;
|
|
|
|
xcb_generic_error_t *err;
|
|
|
|
Ecore_X_Window root = 0;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
2011-09-20 02:12:02 -07:00
|
|
|
CHECK_XCB_CONN;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
root = ecore_x_window_root_get(win);
|
|
|
|
cookie = xcb_translate_coordinates(_ecore_xcb_conn, win, root, x, y);
|
|
|
|
reply = xcb_translate_coordinates_reply(_ecore_xcb_conn, cookie, NULL);
|
|
|
|
if (!reply) return EINA_FALSE;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
memset(&ev, 0, sizeof(xcb_motion_notify_event_t));
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
ev.response_type = XCB_MOTION_NOTIFY;
|
|
|
|
ev.event = win;
|
|
|
|
ev.child = win;
|
|
|
|
ev.root = root;
|
|
|
|
ev.event_x = x;
|
|
|
|
ev.event_y = y;
|
|
|
|
ev.same_screen = 1;
|
|
|
|
ev.state = 0;
|
|
|
|
ev.detail = 0; // xcb uses 'detail' for is_hint
|
|
|
|
ev.root_x = reply->dst_x;
|
|
|
|
ev.root_y = reply->dst_y;
|
|
|
|
ev.time = ecore_x_current_time_get();
|
|
|
|
free(reply);
|
2010-08-02 11:54:27 -07:00
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
vcookie = xcb_send_event(_ecore_xcb_conn, 1, win,
|
2011-07-14 08:35:42 -07:00
|
|
|
XCB_EVENT_MASK_POINTER_MOTION, (const char *)&ev);
|
2011-08-30 11:34:40 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
err = xcb_request_check(_ecore_xcb_conn, vcookie);
|
2011-10-20 22:40:59 -07:00
|
|
|
if (err)
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
{
|
2011-07-14 08:35:42 -07:00
|
|
|
_ecore_xcb_error_handle(err);
|
|
|
|
free(err);
|
|
|
|
return EINA_FALSE;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
}
|
2010-08-02 11:54:27 -07:00
|
|
|
|
Fix callback signatures
The change from returning int to Eina_Bool left several call sites with
warnings because they were not updated. Here they are fixed by using
Coccinelle, a tool that allows us to automate tasks like that. This
commit was generated from the following semantic patch:
virtual org
@r1@
identifier fn!=NULL, fn2;
expression E1, E2, E3;
@@
(
ecore_event_handler_add(E1, fn, ...)
|
ecore_event_filter_add(E1, fn, ...)
|
ecore_idler_add(fn, ...)
|
ecore_idle_enterer_add(E1, fn, ...)
|
ecore_idle_enterer_before_add(E1, fn, ...)
|
ecore_idle_exiter_add(E1, fn, ...)
|
ecore_main_fd_handler_add(E1, E2, fn, E3, fn2, ...)
|
ecore_main_win32_handler_add(E1, fn, ...)
|
ecore_timer_add(E1, fn, ...)
|
ecore_timer_loop_add(E1, fn, ...)
|
ecore_animator_add(fn, ...)
|
ecore_poller_add(E1, E2, fn, ...)
)
@r2@
identifier r1.fn;
identifier ret;
typedef Eina_Bool;
position p;
@@
- int
+ Eina_Bool
fn@p(...) {
<...
(
- return 1;
+ return EINA_TRUE;
|
- return 0;
+ return EINA_FALSE;
|
- int
+ Eina_Bool
ret;
...
return <+...ret...+>;
|
return ...;
)
...>
}
@r3@
identifier r1.fn2;
identifier ret;
position p;
@@
- int
+ Eina_Bool
fn2@p(...) {
...
(
- return 1;
+ return EINA_TRUE;
|
- return 0;
+ return EINA_FALSE;
|
- int
+ Eina_Bool
ret;
...
return <+...ret...+>;
|
return ...;
)
...
}
@r4@
identifier r1.fn;
@@
- int
+ Eina_Bool
fn(...);
@r5@
identifier r1.fn2;
@@
- int
+ Eina_Bool
fn2(...);
@script:python depends on org@
p << r2.p;
f << r1.fn;
@@
import sys
msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line)
print >> sys.stderr, msg
@script:python depends on org@
p << r3.p;
f << r1.fn2;
@@
import sys
msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line)
print >> sys.stderr, msg
SVN revision: 49985
2010-07-01 18:38:05 -07:00
|
|
|
return EINA_TRUE;
|
2011-07-14 08:35:42 -07:00
|
|
|
}
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI Eina_Bool
|
|
|
|
ecore_x_keyboard_grab(Ecore_X_Window win)
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
{
|
2011-07-14 08:35:42 -07:00
|
|
|
xcb_grab_keyboard_cookie_t cookie;
|
|
|
|
xcb_grab_keyboard_reply_t *reply;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
2011-09-20 02:12:02 -07:00
|
|
|
CHECK_XCB_CONN;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
cookie =
|
|
|
|
xcb_grab_keyboard_unchecked(_ecore_xcb_conn, 0, win, XCB_CURRENT_TIME,
|
2011-07-14 08:35:42 -07:00
|
|
|
XCB_GRAB_MODE_ASYNC, XCB_GRAB_MODE_ASYNC);
|
|
|
|
reply = xcb_grab_keyboard_reply(_ecore_xcb_conn, cookie, NULL);
|
|
|
|
if (!reply) return EINA_FALSE;
|
|
|
|
free(reply);
|
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI void
|
|
|
|
ecore_x_keyboard_ungrab(void)
|
2011-07-14 08:35:42 -07:00
|
|
|
{
|
|
|
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
2011-09-20 02:12:02 -07:00
|
|
|
CHECK_XCB_CONN;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
xcb_ungrab_keyboard(_ecore_xcb_conn, XCB_CURRENT_TIME);
|
|
|
|
}
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI void
|
|
|
|
ecore_x_pointer_xy_get(Ecore_X_Window win,
|
|
|
|
int *x,
|
|
|
|
int *y)
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
{
|
2011-07-14 08:35:42 -07:00
|
|
|
xcb_query_pointer_cookie_t cookie;
|
|
|
|
xcb_query_pointer_reply_t *reply;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-08-30 11:34:40 -07:00
|
|
|
// LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
2011-09-20 02:12:02 -07:00
|
|
|
CHECK_XCB_CONN;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
// if (!win) win = ((xcb_screen_t *)_ecore_xcb_screen)->root;
|
2010-08-02 11:54:27 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
if (x) *x = -1;
|
|
|
|
if (y) *y = -1;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-08-08 13:39:10 -07:00
|
|
|
cookie = xcb_query_pointer_unchecked(_ecore_xcb_conn, win);
|
2011-07-14 08:35:42 -07:00
|
|
|
reply = xcb_query_pointer_reply(_ecore_xcb_conn, cookie, NULL);
|
|
|
|
if (!reply) return;
|
|
|
|
if (x) *x = reply->win_x;
|
|
|
|
if (y) *y = reply->win_y;
|
|
|
|
free(reply);
|
|
|
|
}
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI Eina_Bool
|
|
|
|
ecore_x_pointer_control_set(int accel_num,
|
|
|
|
int accel_denom,
|
|
|
|
int threshold)
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
{
|
2011-08-22 13:10:53 -07:00
|
|
|
xcb_void_cookie_t vcookie;
|
|
|
|
xcb_generic_error_t *err;
|
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
2011-09-20 02:12:02 -07:00
|
|
|
CHECK_XCB_CONN;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
vcookie =
|
|
|
|
xcb_change_pointer_control(_ecore_xcb_conn,
|
2011-09-20 00:14:11 -07:00
|
|
|
accel_num, accel_denom, threshold, 1, 1);
|
2011-08-22 13:10:53 -07:00
|
|
|
err = xcb_request_check(_ecore_xcb_conn, vcookie);
|
2011-10-20 22:40:59 -07:00
|
|
|
if (err)
|
2011-08-22 13:10:53 -07:00
|
|
|
{
|
|
|
|
_ecore_xcb_error_handle(err);
|
|
|
|
free(err);
|
|
|
|
return EINA_FALSE;
|
|
|
|
}
|
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI Eina_Bool
|
|
|
|
ecore_x_pointer_control_get(int *accel_num,
|
|
|
|
int *accel_denom,
|
|
|
|
int *threshold)
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
{
|
|
|
|
xcb_get_pointer_control_cookie_t cookie;
|
|
|
|
xcb_get_pointer_control_reply_t *reply;
|
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
2011-09-20 02:12:02 -07:00
|
|
|
CHECK_XCB_CONN;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
if (accel_num) *accel_num = 0;
|
|
|
|
if (accel_denom) *accel_denom = 0;
|
|
|
|
if (threshold) *threshold = 0;
|
2010-08-02 11:54:27 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
cookie = xcb_get_pointer_control_unchecked(_ecore_xcb_conn);
|
|
|
|
reply = xcb_get_pointer_control_reply(_ecore_xcb_conn, cookie, NULL);
|
|
|
|
if (!reply) return EINA_FALSE;
|
2010-08-02 11:54:27 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
if (accel_num) *accel_num = reply->acceleration_numerator;
|
|
|
|
if (accel_denom) *accel_denom = reply->acceleration_denominator;
|
|
|
|
if (threshold) *threshold = reply->threshold;
|
|
|
|
free(reply);
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI Eina_Bool
|
|
|
|
ecore_x_pointer_mapping_set(unsigned char *map,
|
|
|
|
int nmap)
|
2008-09-19 19:19:38 -07:00
|
|
|
{
|
2011-07-14 08:35:42 -07:00
|
|
|
xcb_set_pointer_mapping_cookie_t cookie;
|
|
|
|
xcb_set_pointer_mapping_reply_t *reply;
|
|
|
|
Eina_Bool ret = EINA_FALSE;
|
2008-09-19 19:19:38 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
2011-09-20 02:12:02 -07:00
|
|
|
CHECK_XCB_CONN;
|
2008-09-19 19:19:38 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
cookie = xcb_set_pointer_mapping_unchecked(_ecore_xcb_conn, nmap, map);
|
|
|
|
reply = xcb_set_pointer_mapping_reply(_ecore_xcb_conn, cookie, NULL);
|
|
|
|
if (!reply) return EINA_FALSE;
|
2011-10-20 22:40:59 -07:00
|
|
|
ret =
|
2011-07-14 08:35:42 -07:00
|
|
|
(reply->status == XCB_MAPPING_STATUS_SUCCESS) ? EINA_TRUE : EINA_FALSE;
|
2008-09-19 19:19:38 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
free(reply);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI Eina_Bool
|
|
|
|
ecore_x_pointer_mapping_get(unsigned char *map,
|
|
|
|
int nmap)
|
2008-09-19 19:19:38 -07:00
|
|
|
{
|
|
|
|
xcb_get_pointer_mapping_cookie_t cookie;
|
|
|
|
xcb_get_pointer_mapping_reply_t *reply;
|
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
2011-09-20 02:12:02 -07:00
|
|
|
CHECK_XCB_CONN;
|
2008-09-19 19:19:38 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
if (map) *map = 0;
|
|
|
|
nmap = 0;
|
2008-09-19 19:19:38 -07:00
|
|
|
|
2009-04-19 00:16:11 -07:00
|
|
|
cookie = xcb_get_pointer_mapping_unchecked(_ecore_xcb_conn);
|
|
|
|
reply = xcb_get_pointer_mapping_reply(_ecore_xcb_conn, cookie, NULL);
|
2011-07-14 08:35:42 -07:00
|
|
|
if (!reply) return EINA_FALSE;
|
2008-09-19 19:19:38 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
nmap = xcb_get_pointer_mapping_map_length(reply);
|
|
|
|
if (nmap <= 0)
|
|
|
|
{
|
|
|
|
free(reply);
|
|
|
|
return EINA_FALSE;
|
|
|
|
}
|
2008-09-19 19:19:38 -07:00
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
if (map)
|
2011-07-14 08:35:42 -07:00
|
|
|
{
|
|
|
|
uint8_t *tmp;
|
|
|
|
int i = 0;
|
2008-09-19 19:19:38 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
tmp = xcb_get_pointer_mapping_map(reply);
|
|
|
|
for (i = 0; i < nmap; i++)
|
|
|
|
map[i] = tmp[i];
|
|
|
|
}
|
2008-09-19 19:19:38 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
free(reply);
|
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
2008-09-19 19:19:38 -07:00
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI Eina_Bool
|
|
|
|
ecore_x_pointer_grab(Ecore_X_Window win)
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
{
|
|
|
|
xcb_grab_pointer_cookie_t cookie;
|
|
|
|
xcb_grab_pointer_reply_t *reply;
|
2011-07-14 08:35:42 -07:00
|
|
|
uint16_t mask;
|
|
|
|
Eina_Bool ret = EINA_FALSE;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
2011-09-20 02:12:02 -07:00
|
|
|
CHECK_XCB_CONN;
|
2011-07-14 08:35:42 -07:00
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
mask = (XCB_EVENT_MASK_BUTTON_PRESS | XCB_EVENT_MASK_BUTTON_RELEASE |
|
|
|
|
XCB_EVENT_MASK_ENTER_WINDOW | XCB_EVENT_MASK_LEAVE_WINDOW |
|
2011-07-14 08:35:42 -07:00
|
|
|
XCB_EVENT_MASK_POINTER_MOTION);
|
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
cookie = xcb_grab_pointer_unchecked(_ecore_xcb_conn, 0, win, mask,
|
|
|
|
XCB_GRAB_MODE_ASYNC,
|
|
|
|
XCB_GRAB_MODE_ASYNC,
|
2011-07-14 08:35:42 -07:00
|
|
|
XCB_NONE, XCB_NONE, XCB_CURRENT_TIME);
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
reply = xcb_grab_pointer_reply(_ecore_xcb_conn, cookie, NULL);
|
2011-07-14 08:35:42 -07:00
|
|
|
if (!reply) return EINA_FALSE;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
ret = (reply->status == XCB_GRAB_STATUS_SUCCESS) ? EINA_TRUE : EINA_FALSE;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
free(reply);
|
|
|
|
return ret;
|
|
|
|
}
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI Eina_Bool
|
|
|
|
ecore_x_pointer_confine_grab(Ecore_X_Window win)
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
{
|
|
|
|
xcb_grab_pointer_cookie_t cookie;
|
|
|
|
xcb_grab_pointer_reply_t *reply;
|
2011-07-14 08:35:42 -07:00
|
|
|
uint16_t mask;
|
|
|
|
Eina_Bool ret = EINA_FALSE;
|
|
|
|
|
|
|
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
2011-09-20 02:12:02 -07:00
|
|
|
CHECK_XCB_CONN;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
mask = (XCB_EVENT_MASK_BUTTON_PRESS | XCB_EVENT_MASK_BUTTON_RELEASE |
|
|
|
|
XCB_EVENT_MASK_ENTER_WINDOW | XCB_EVENT_MASK_LEAVE_WINDOW |
|
2011-07-14 08:35:42 -07:00
|
|
|
XCB_EVENT_MASK_POINTER_MOTION);
|
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
cookie = xcb_grab_pointer_unchecked(_ecore_xcb_conn, 0, win, mask,
|
|
|
|
XCB_GRAB_MODE_ASYNC,
|
|
|
|
XCB_GRAB_MODE_ASYNC,
|
2011-07-14 08:35:42 -07:00
|
|
|
win, XCB_NONE, XCB_CURRENT_TIME);
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
reply = xcb_grab_pointer_reply(_ecore_xcb_conn, cookie, NULL);
|
2011-07-14 08:35:42 -07:00
|
|
|
if (!reply) return EINA_FALSE;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
ret = (reply->status == XCB_GRAB_STATUS_SUCCESS) ? EINA_TRUE : EINA_FALSE;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
free(reply);
|
|
|
|
return ret;
|
|
|
|
}
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI void
|
|
|
|
ecore_x_pointer_ungrab(void)
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
{
|
2011-07-14 08:35:42 -07:00
|
|
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
2011-09-20 02:12:02 -07:00
|
|
|
CHECK_XCB_CONN;
|
2011-07-14 08:35:42 -07:00
|
|
|
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
xcb_ungrab_pointer(_ecore_xcb_conn, XCB_CURRENT_TIME);
|
2011-07-14 08:35:42 -07:00
|
|
|
}
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI Eina_Bool
|
|
|
|
ecore_x_pointer_warp(Ecore_X_Window win,
|
|
|
|
int x,
|
|
|
|
int y)
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
{
|
2011-08-22 13:10:53 -07:00
|
|
|
xcb_void_cookie_t vcookie;
|
|
|
|
xcb_generic_error_t *err;
|
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
2011-09-20 02:12:02 -07:00
|
|
|
CHECK_XCB_CONN;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
vcookie =
|
2011-08-22 13:10:53 -07:00
|
|
|
xcb_warp_pointer_checked(_ecore_xcb_conn, XCB_NONE, win, 0, 0, 0, 0, x, y);
|
|
|
|
err = xcb_request_check(_ecore_xcb_conn, vcookie);
|
2011-10-20 22:40:59 -07:00
|
|
|
if (err)
|
2011-08-22 13:10:53 -07:00
|
|
|
{
|
|
|
|
_ecore_xcb_error_handle(err);
|
|
|
|
free(err);
|
|
|
|
return EINA_FALSE;
|
|
|
|
}
|
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
/**
|
|
|
|
* Invoke the standard system beep to alert users
|
|
|
|
*
|
|
|
|
* @param percent The volume at which the bell rings. Must be in the range
|
|
|
|
* [-100,+100]. If percent >= 0, the final volume will be:
|
|
|
|
* base - [(base * percent) / 100] + percent
|
|
|
|
* Otherwise, it's calculated as:
|
|
|
|
* base + [(base * percent) / 100]
|
|
|
|
* where @c base is the bell's base volume as set by XChangeKeyboardControl(3).
|
|
|
|
*
|
|
|
|
* @returns EINA_TRUE on success, EINA_FALSE otherwise.
|
|
|
|
*/
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI Eina_Bool
|
|
|
|
ecore_x_bell(int percent)
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
{
|
2011-07-14 08:35:42 -07:00
|
|
|
xcb_void_cookie_t cookie;
|
|
|
|
xcb_generic_error_t *err;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-09-20 02:12:02 -07:00
|
|
|
CHECK_XCB_CONN;
|
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
// FIXME: Use unchecked version after development is ironed out
|
|
|
|
cookie = xcb_bell_checked(_ecore_xcb_conn, percent);
|
|
|
|
err = xcb_request_check(_ecore_xcb_conn, cookie);
|
2011-10-20 22:40:59 -07:00
|
|
|
if (err)
|
2011-07-14 08:35:42 -07:00
|
|
|
{
|
|
|
|
_ecore_xcb_error_handle(err);
|
|
|
|
free(err);
|
|
|
|
return EINA_FALSE;
|
|
|
|
}
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI void
|
|
|
|
ecore_x_display_size_get(Ecore_X_Display *dsp __UNUSED__,
|
|
|
|
int *w,
|
|
|
|
int *h)
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
{
|
2011-07-14 08:35:42 -07:00
|
|
|
xcb_screen_t *screen;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
2011-09-20 02:12:02 -07:00
|
|
|
CHECK_XCB_CONN;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
/* grab the default screen */
|
2011-09-20 00:14:11 -07:00
|
|
|
screen = xcb_setup_roots_iterator(xcb_get_setup(_ecore_xcb_conn)).data;
|
2011-07-14 08:35:42 -07:00
|
|
|
if (w) *w = screen->width_in_pixels;
|
|
|
|
if (h) *h = screen->height_in_pixels;
|
|
|
|
}
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI unsigned long
|
|
|
|
ecore_x_display_black_pixel_get(Ecore_X_Display *dsp __UNUSED__)
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
{
|
2011-07-14 08:35:42 -07:00
|
|
|
xcb_screen_t *screen;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
2011-09-20 02:12:02 -07:00
|
|
|
CHECK_XCB_CONN;
|
2011-07-14 08:35:42 -07:00
|
|
|
|
|
|
|
/* grab the default screen */
|
2011-09-20 00:14:11 -07:00
|
|
|
screen = xcb_setup_roots_iterator(xcb_get_setup(_ecore_xcb_conn)).data;
|
2011-07-14 08:35:42 -07:00
|
|
|
return screen->black_pixel;
|
|
|
|
}
|
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI unsigned long
|
|
|
|
ecore_x_display_white_pixel_get(Ecore_X_Display *dsp __UNUSED__)
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
{
|
2011-07-14 08:35:42 -07:00
|
|
|
xcb_screen_t *screen;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
2011-09-20 02:12:02 -07:00
|
|
|
CHECK_XCB_CONN;
|
2011-07-14 08:35:42 -07:00
|
|
|
|
|
|
|
/* grab the default screen */
|
2011-09-20 00:14:11 -07:00
|
|
|
screen = xcb_setup_roots_iterator(xcb_get_setup(_ecore_xcb_conn)).data;
|
2011-07-14 08:35:42 -07:00
|
|
|
return screen->white_pixel;
|
|
|
|
}
|
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI void
|
|
|
|
ecore_x_pointer_last_xy_get(int *x,
|
|
|
|
int *y)
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
{
|
2011-07-14 08:35:42 -07:00
|
|
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
if (x) *x = _ecore_xcb_event_last_root_x;
|
|
|
|
if (y) *y = _ecore_xcb_event_last_root_y;
|
|
|
|
}
|
2010-08-02 11:54:27 -07:00
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI void
|
|
|
|
ecore_x_focus_reset(void)
|
2011-07-14 08:35:42 -07:00
|
|
|
{
|
|
|
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
2011-09-20 02:12:02 -07:00
|
|
|
CHECK_XCB_CONN;
|
2011-07-14 08:35:42 -07:00
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
xcb_set_input_focus(_ecore_xcb_conn, XCB_INPUT_FOCUS_POINTER_ROOT,
|
|
|
|
((xcb_screen_t *)_ecore_xcb_screen)->root,
|
2011-07-14 08:35:42 -07:00
|
|
|
XCB_CURRENT_TIME);
|
2011-09-13 09:32:34 -07:00
|
|
|
// ecore_x_flush();
|
2011-07-14 08:35:42 -07:00
|
|
|
}
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI void
|
|
|
|
ecore_x_events_allow_all(void)
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
{
|
2011-07-14 08:35:42 -07:00
|
|
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
2011-09-20 02:12:02 -07:00
|
|
|
CHECK_XCB_CONN;
|
2011-07-14 08:35:42 -07:00
|
|
|
|
|
|
|
xcb_allow_events(_ecore_xcb_conn, XCB_ALLOW_ASYNC_BOTH, XCB_CURRENT_TIME);
|
2011-09-13 09:32:34 -07:00
|
|
|
// ecore_x_flush();
|
2011-07-14 08:35:42 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Kill a specific client
|
|
|
|
*
|
|
|
|
* You can kill a specific client owning window @p win
|
|
|
|
*
|
|
|
|
* @param win Window of the client to be killed
|
|
|
|
*/
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI void
|
|
|
|
ecore_x_kill(Ecore_X_Window win)
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
{
|
2011-07-14 08:35:42 -07:00
|
|
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
2011-09-20 02:12:02 -07:00
|
|
|
CHECK_XCB_CONN;
|
2011-07-14 08:35:42 -07:00
|
|
|
|
|
|
|
xcb_kill_client(_ecore_xcb_conn, win);
|
2011-09-13 09:32:34 -07:00
|
|
|
// ecore_x_flush();
|
2011-07-14 08:35:42 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Kill all clients with subwindows under a given window.
|
|
|
|
*
|
|
|
|
* You can kill all clients connected to the X server by using
|
|
|
|
* @ref ecore_x_window_root_list to get a list of root windows, and
|
|
|
|
* then passing each root window to this function.
|
|
|
|
*
|
|
|
|
* @param root The window whose children will be killed.
|
|
|
|
*/
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI void
|
|
|
|
ecore_x_killall(Ecore_X_Window root)
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
{
|
2011-07-14 08:35:42 -07:00
|
|
|
int screens = 0, i = 0;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
2011-09-20 02:12:02 -07:00
|
|
|
CHECK_XCB_CONN;
|
2011-07-14 08:35:42 -07:00
|
|
|
|
|
|
|
ecore_x_grab();
|
|
|
|
|
|
|
|
screens = xcb_setup_roots_iterator(xcb_get_setup(_ecore_xcb_conn)).rem;
|
|
|
|
|
|
|
|
/* Traverse window tree starting from root, and drag each
|
|
|
|
* before the firing squad */
|
|
|
|
for (i = 0; i < screens; ++i)
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
{
|
2011-07-14 08:35:42 -07:00
|
|
|
xcb_query_tree_cookie_t cookie;
|
|
|
|
xcb_query_tree_reply_t *reply;
|
2010-08-02 11:54:27 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
cookie = xcb_query_tree_unchecked(_ecore_xcb_conn, root);
|
|
|
|
reply = xcb_query_tree_reply(_ecore_xcb_conn, cookie, NULL);
|
|
|
|
if (reply)
|
2010-08-02 11:54:27 -07:00
|
|
|
{
|
2011-07-14 08:35:42 -07:00
|
|
|
xcb_window_t *wins = NULL;
|
|
|
|
int tree_c_len, j = 0;
|
|
|
|
|
|
|
|
wins = xcb_query_tree_children(reply);
|
|
|
|
tree_c_len = xcb_query_tree_children_length(reply);
|
|
|
|
for (j = 0; j < tree_c_len; j++)
|
|
|
|
xcb_kill_client(_ecore_xcb_conn, wins[j]);
|
|
|
|
free(reply);
|
2010-08-02 11:54:27 -07:00
|
|
|
}
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
}
|
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
ecore_x_ungrab();
|
|
|
|
ecore_x_sync(); // needed
|
|
|
|
}
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
|
|
|
/**
|
2011-07-14 08:35:42 -07:00
|
|
|
* Return the screen DPI
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
*
|
2011-07-14 08:35:42 -07:00
|
|
|
* This is a simplistic call to get DPI. It does not account for differing
|
2011-08-30 11:34:40 -07:00
|
|
|
* DPI in the x amd y axes nor does it account for multihead or xinerama and
|
2011-07-14 08:35:42 -07:00
|
|
|
* xrander where different parts of the screen may have differen DPI etc.
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
*
|
2011-07-14 08:35:42 -07:00
|
|
|
* @return the general screen DPI (dots/pixels per inch).
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
*/
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI int
|
|
|
|
ecore_x_dpi_get(void)
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
{
|
2011-07-14 08:35:42 -07:00
|
|
|
uint16_t mw = 0, w = 0;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
mw = ((xcb_screen_t *)_ecore_xcb_screen)->width_in_millimeters;
|
|
|
|
if (mw <= 0) return 75;
|
|
|
|
w = ((xcb_screen_t *)_ecore_xcb_screen)->width_in_pixels;
|
2011-10-20 22:40:59 -07:00
|
|
|
return (((w * 254) / mw) + 5) / 10;
|
2011-07-14 08:35:42 -07:00
|
|
|
}
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
|
|
|
/**
|
2011-07-14 08:35:42 -07:00
|
|
|
* @defgroup Ecore_X_Display_Attr_Group X Display Attributes
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
*
|
2011-07-14 08:35:42 -07:00
|
|
|
* Functions that set and retrieve X display attributes.
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
*/
|
2011-07-14 08:35:42 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Retrieves the Ecore_X_Display handle used for the current X connection.
|
|
|
|
* @return The current X display.
|
|
|
|
* @ingroup Ecore_X_Display_Attr_Group
|
|
|
|
*/
|
|
|
|
EAPI Ecore_X_Display *
|
2011-10-20 22:40:59 -07:00
|
|
|
ecore_x_display_get(void)
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
{
|
2011-07-25 22:54:01 -07:00
|
|
|
char *gl = NULL;
|
|
|
|
|
2011-09-20 02:12:02 -07:00
|
|
|
CHECK_XCB_CONN;
|
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
/* if we have the 'dont use xlib' env var, then we are not using
|
2011-07-25 22:54:01 -07:00
|
|
|
* XLib and thus cannot return a real XDisplay.
|
2011-10-20 22:40:59 -07:00
|
|
|
*
|
2011-07-25 22:54:01 -07:00
|
|
|
* NB: This may break EFL in some places and needs lots of testing !!! */
|
2011-10-20 22:40:59 -07:00
|
|
|
if ((gl = getenv("ECORE_X_NO_XLIB")))
|
2011-07-25 22:54:01 -07:00
|
|
|
return (Ecore_X_Display *)_ecore_xcb_conn;
|
2011-10-20 22:40:59 -07:00
|
|
|
else /* we can safely return an XDisplay var */
|
2011-07-25 22:54:01 -07:00
|
|
|
return (Ecore_X_Display *)_ecore_xcb_display;
|
2011-07-14 08:35:42 -07:00
|
|
|
}
|
2010-08-02 11:54:27 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
/**
|
|
|
|
* Retrieves the X display file descriptor.
|
|
|
|
* @return The current X display file descriptor.
|
|
|
|
* @ingroup Ecore_X_Display_Attr_Group
|
|
|
|
*/
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI int
|
|
|
|
ecore_x_fd_get(void)
|
2011-07-14 08:35:42 -07:00
|
|
|
{
|
|
|
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
2011-09-20 02:12:02 -07:00
|
|
|
CHECK_XCB_CONN;
|
2011-07-14 08:35:42 -07:00
|
|
|
return xcb_get_file_descriptor(_ecore_xcb_conn);
|
|
|
|
}
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI void
|
|
|
|
ecore_x_passive_grab_replay_func_set(Eina_Bool (*func)(void *data,
|
|
|
|
int type,
|
|
|
|
void *event),
|
|
|
|
void *data)
|
2011-07-14 08:35:42 -07:00
|
|
|
{
|
|
|
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
_ecore_xcb_window_grab_replay_func = func;
|
|
|
|
_ecore_xcb_window_grab_replay_data = data;
|
|
|
|
}
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
/**
|
|
|
|
* Retrieves the size of an Ecore_X_Screen.
|
|
|
|
* @param screen the handle to the screen to query.
|
|
|
|
* @param w where to return the width. May be NULL. Returns 0 on errors.
|
|
|
|
* @param h where to return the height. May be NULL. Returns 0 on errors.
|
|
|
|
* @ingroup Ecore_X_Display_Attr_Group
|
|
|
|
* @see ecore_x_default_screen_get()
|
|
|
|
*
|
|
|
|
* @since 1.1
|
|
|
|
*/
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI void
|
|
|
|
ecore_x_screen_size_get(const Ecore_X_Screen *screen,
|
|
|
|
int *w,
|
|
|
|
int *h)
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
{
|
2011-07-14 08:35:42 -07:00
|
|
|
xcb_screen_t *s;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
|
|
|
|
|
|
|
if (w) *w = 0;
|
|
|
|
if (h) *h = 0;
|
|
|
|
if (!(s = (xcb_screen_t *)screen)) return;
|
|
|
|
if (w) *w = s->width_in_pixels;
|
|
|
|
if (h) *h = s->height_in_pixels;
|
|
|
|
}
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-25 23:44:12 -07:00
|
|
|
/**
|
2011-07-26 04:19:55 -07:00
|
|
|
* Retrieves the count of screens.
|
2011-10-20 22:40:59 -07:00
|
|
|
*
|
2011-07-26 04:19:55 -07:00
|
|
|
* @return The count of screens.
|
2011-07-25 23:44:12 -07:00
|
|
|
* @ingroup Ecore_X_Display_Attr_Group
|
|
|
|
*
|
|
|
|
* @since 1.1
|
|
|
|
*/
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI int
|
|
|
|
ecore_x_screen_count_get(void)
|
2011-07-14 08:35:42 -07:00
|
|
|
{
|
|
|
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
2011-09-20 02:12:02 -07:00
|
|
|
CHECK_XCB_CONN;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
return xcb_setup_roots_length(xcb_get_setup(_ecore_xcb_conn));
|
|
|
|
}
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-26 04:19:55 -07:00
|
|
|
/**
|
|
|
|
* Retrieves the index number of the given screen.
|
2011-10-20 22:40:59 -07:00
|
|
|
*
|
2011-07-26 04:19:55 -07:00
|
|
|
* @return The index number of the screen.
|
|
|
|
* @ingroup Ecore_X_Display_Attr_Group
|
|
|
|
*
|
|
|
|
* @since 1.1
|
|
|
|
*/
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI int
|
|
|
|
ecore_x_screen_index_get(const Ecore_X_Screen *screen)
|
2011-07-26 04:19:55 -07:00
|
|
|
{
|
|
|
|
xcb_screen_iterator_t iter;
|
2011-09-16 07:16:09 -07:00
|
|
|
int i = 0;
|
2011-07-26 04:19:55 -07:00
|
|
|
|
2011-09-20 02:12:02 -07:00
|
|
|
CHECK_XCB_CONN;
|
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
iter =
|
2011-09-20 00:14:11 -07:00
|
|
|
xcb_setup_roots_iterator(xcb_get_setup(_ecore_xcb_conn));
|
2011-10-20 22:40:59 -07:00
|
|
|
for (; iter.rem; xcb_screen_next(&iter))
|
2011-07-26 04:19:55 -07:00
|
|
|
{
|
2011-10-20 22:40:59 -07:00
|
|
|
if (iter.data == (xcb_screen_t *)screen)
|
2011-09-16 07:16:09 -07:00
|
|
|
return i;
|
|
|
|
i++;
|
2011-07-26 04:19:55 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Retrieves the screen based on index number.
|
2011-10-20 22:40:59 -07:00
|
|
|
*
|
2011-07-26 04:19:55 -07:00
|
|
|
* @return The Ecore_X_Screen at this index.
|
|
|
|
* @ingroup Ecore_X_Display_Attr_Group
|
|
|
|
*
|
|
|
|
* @since 1.1
|
|
|
|
*/
|
|
|
|
EAPI Ecore_X_Screen *
|
2011-10-20 22:40:59 -07:00
|
|
|
ecore_x_screen_get(int index)
|
2011-07-26 04:19:55 -07:00
|
|
|
{
|
|
|
|
xcb_screen_iterator_t iter;
|
2011-10-04 17:52:02 -07:00
|
|
|
int i = 0;
|
2011-07-26 04:19:55 -07:00
|
|
|
|
2011-09-20 02:12:02 -07:00
|
|
|
CHECK_XCB_CONN;
|
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
iter =
|
2011-09-20 00:14:11 -07:00
|
|
|
xcb_setup_roots_iterator(xcb_get_setup(_ecore_xcb_conn));
|
2011-10-20 22:40:59 -07:00
|
|
|
for (i = 0; iter.rem; xcb_screen_next(&iter), i++)
|
2011-10-04 17:52:02 -07:00
|
|
|
if (i == index) return iter.data;
|
2011-07-26 04:19:55 -07:00
|
|
|
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI unsigned int
|
2011-07-14 08:35:42 -07:00
|
|
|
ecore_x_visual_id_get(Ecore_X_Visual visual)
|
|
|
|
{
|
|
|
|
return ((xcb_visualtype_t *)visual)->visual_id;
|
|
|
|
}
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-26 04:19:55 -07:00
|
|
|
/**
|
|
|
|
* Retrieve the default Visual.
|
|
|
|
*
|
|
|
|
* @param disp The Display to get the Default Visual from
|
|
|
|
* @param screen The Screen.
|
|
|
|
*
|
|
|
|
* @return The default visual.
|
|
|
|
* @since 1.1.0
|
|
|
|
*/
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI Ecore_X_Visual
|
|
|
|
ecore_x_default_visual_get(Ecore_X_Display *disp __UNUSED__,
|
|
|
|
Ecore_X_Screen *screen)
|
2011-07-26 04:19:55 -07:00
|
|
|
{
|
|
|
|
xcb_screen_t *s;
|
|
|
|
xcb_depth_iterator_t diter;
|
|
|
|
xcb_visualtype_iterator_t viter;
|
|
|
|
|
2011-09-20 02:12:02 -07:00
|
|
|
CHECK_XCB_CONN;
|
|
|
|
|
2011-07-26 04:19:55 -07:00
|
|
|
s = (xcb_screen_t *)screen;
|
|
|
|
diter = xcb_screen_allowed_depths_iterator(s);
|
2011-10-20 22:40:59 -07:00
|
|
|
for (; diter.rem; xcb_depth_next(&diter))
|
2011-07-26 04:19:55 -07:00
|
|
|
{
|
|
|
|
viter = xcb_depth_visuals_iterator(diter.data);
|
2011-10-20 22:40:59 -07:00
|
|
|
for (; viter.rem; xcb_visualtype_next(&viter))
|
2011-07-26 04:19:55 -07:00
|
|
|
{
|
|
|
|
if (viter.data->visual_id == s->root_visual)
|
|
|
|
return viter.data;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Retrieve the default Colormap.
|
|
|
|
*
|
|
|
|
* @param disp The Display to get the Default Colormap from
|
|
|
|
* @param screen The Screen.
|
|
|
|
*
|
|
|
|
* @return The default colormap.
|
|
|
|
* @since 1.1.0
|
|
|
|
*/
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI Ecore_X_Colormap
|
|
|
|
ecore_x_default_colormap_get(Ecore_X_Display *disp __UNUSED__,
|
|
|
|
Ecore_X_Screen *screen)
|
2011-07-26 04:19:55 -07:00
|
|
|
{
|
|
|
|
xcb_screen_t *s;
|
|
|
|
|
|
|
|
s = (xcb_screen_t *)screen;
|
|
|
|
return s->default_colormap;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Retrieve the default depth.
|
|
|
|
*
|
|
|
|
* @param disp The Display to get the Default Depth from
|
|
|
|
* @param screen The Screen.
|
|
|
|
*
|
|
|
|
* @return The default depth.
|
|
|
|
* @since 1.1.0
|
|
|
|
*/
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI int
|
|
|
|
ecore_x_default_depth_get(Ecore_X_Display *disp __UNUSED__,
|
|
|
|
Ecore_X_Screen *screen)
|
2011-07-26 04:19:55 -07:00
|
|
|
{
|
|
|
|
xcb_screen_t *s;
|
|
|
|
|
|
|
|
s = (xcb_screen_t *)screen;
|
|
|
|
return s->root_depth;
|
|
|
|
}
|
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
/**
|
|
|
|
* Sets the timeout for a double and triple clicks to be flagged.
|
|
|
|
*
|
|
|
|
* This sets the time between clicks before the double_click flag is
|
|
|
|
* set in a button down event. If 3 clicks occur within double this
|
|
|
|
* time, the triple_click flag is also set.
|
|
|
|
*
|
|
|
|
* @param t The time in seconds
|
|
|
|
* @ingroup Ecore_X_Display_Attr_Group
|
|
|
|
*/
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI void
|
|
|
|
ecore_x_double_click_time_set(double t)
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
{
|
2011-07-14 08:35:42 -07:00
|
|
|
if (t < 0.0) t = 0.0;
|
|
|
|
_ecore_xcb_double_click_time = t;
|
|
|
|
}
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
/**
|
|
|
|
* Retrieves the double and triple click flag timeout.
|
|
|
|
*
|
|
|
|
* See @ref ecore_x_double_click_time_set for more information.
|
|
|
|
*
|
|
|
|
* @return The timeout for double clicks in seconds.
|
|
|
|
* @ingroup Ecore_X_Display_Attr_Group
|
|
|
|
*/
|
2011-10-20 22:40:59 -07:00
|
|
|
EAPI double
|
|
|
|
ecore_x_double_click_time_get(void)
|
2011-07-14 08:35:42 -07:00
|
|
|
{
|
|
|
|
return _ecore_xcb_double_click_time;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* local function prototypes */
|
2011-10-20 22:40:59 -07:00
|
|
|
static int
|
|
|
|
_ecore_xcb_shutdown(Eina_Bool close_display)
|
2011-07-14 08:35:42 -07:00
|
|
|
{
|
2011-10-20 22:40:59 -07:00
|
|
|
if (--_ecore_xcb_init_count != 0)
|
2011-08-08 13:39:10 -07:00
|
|
|
return _ecore_xcb_init_count;
|
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
if (!_ecore_xcb_conn)
|
2011-08-08 13:39:10 -07:00
|
|
|
return _ecore_xcb_init_count;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
2011-09-20 02:12:02 -07:00
|
|
|
CHECK_XCB_CONN;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-09-13 09:32:34 -07:00
|
|
|
ecore_idle_enterer_del(_ecore_xcb_idle_enterer);
|
|
|
|
_ecore_xcb_idle_enterer = NULL;
|
|
|
|
|
2011-08-08 13:39:10 -07:00
|
|
|
if (_ecore_xcb_fd_handler)
|
|
|
|
ecore_main_fd_handler_del(_ecore_xcb_fd_handler);
|
|
|
|
|
|
|
|
/* disconnect from display server */
|
2011-10-20 22:40:59 -07:00
|
|
|
if (close_display)
|
2011-08-08 13:39:10 -07:00
|
|
|
xcb_disconnect(_ecore_xcb_conn);
|
2011-10-20 22:40:59 -07:00
|
|
|
else
|
2011-09-20 00:14:11 -07:00
|
|
|
{
|
|
|
|
close(xcb_get_file_descriptor(_ecore_xcb_conn));
|
|
|
|
_ecore_xcb_conn = NULL;
|
|
|
|
}
|
2011-08-08 13:39:10 -07:00
|
|
|
|
|
|
|
/* shutdown events */
|
|
|
|
_ecore_xcb_events_shutdown();
|
|
|
|
|
|
|
|
/* shutdown input extension */
|
|
|
|
_ecore_xcb_input_shutdown();
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
/* shutdown selection */
|
|
|
|
_ecore_xcb_selection_shutdown();
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-08-08 13:39:10 -07:00
|
|
|
/* shutdown dnd */
|
|
|
|
_ecore_xcb_dnd_shutdown();
|
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
/* shutdown netwm */
|
|
|
|
ecore_x_netwm_shutdown();
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-26 22:10:28 -07:00
|
|
|
/* shutdown keymap */
|
|
|
|
_ecore_xcb_keymap_shutdown();
|
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
/* shutdown ecore_event */
|
|
|
|
ecore_event_shutdown();
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-08-08 13:39:10 -07:00
|
|
|
/* shutdown ecore */
|
|
|
|
ecore_shutdown();
|
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
/* unregister log domain */
|
|
|
|
eina_log_domain_unregister(_ecore_xcb_log_dom);
|
|
|
|
_ecore_xcb_log_dom = -1;
|
Here is ecore_x with XCB backend.
* The XCB backend is disabled by default during the
configuration. To enable it, add --enable-ecore-x-xcb. See the
messages that configure displays when it finishes.
* The way XCB is detected, and used in src/lib/ecore_x/Makefile.am
should be improved
* Any program that uses ecore_evas does not need to be modified.
Any program that uses ecore_x may need some changes. That is,
adding some functions (_prefetch and _fetch ones). No other
change is needed. See the documention of any _get functions, as
these are the ones that need those functions.
* There are some missing parts, especially everything that involves
the keyboard, as porting Xlib functions related to strings (utf8
stuff, XKeysymToString, etc...) is an horror. So keyboard events
are not working yet.
* I tried to write as much documentation as I could. But there is
certainly some missing doc here and there.
there are certainly other things that I have forgotten.
Improvements of that backend:
* the creation of an ecore_evas is faster. Especially when done over
an ssh connection (on my computer, 7-10s with Xlib, 1.5s with XCB,
over an ssh)
* A Window Manager should be more responsive. But it's not tomorrow
that e17 will use it :)
Have fun !
SVN revision: 29500
2007-04-13 10:15:19 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
/* shutdown eina */
|
2011-08-08 13:39:10 -07:00
|
|
|
eina_shutdown();
|
2009-03-17 06:34:40 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
return _ecore_xcb_init_count;
|
|
|
|
}
|
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
static Eina_Bool
|
|
|
|
_ecore_xcb_fd_handle(void *data,
|
|
|
|
Ecore_Fd_Handler *hdlr __UNUSED__)
|
2009-03-17 06:34:40 -07:00
|
|
|
{
|
2011-07-14 08:35:42 -07:00
|
|
|
xcb_connection_t *conn;
|
|
|
|
xcb_generic_event_t *ev = NULL;
|
2011-09-24 02:21:17 -07:00
|
|
|
// xcb_generic_event_t *ev_mouse = NULL;
|
2009-03-17 06:34:40 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
conn = (xcb_connection_t *)data;
|
2010-08-02 11:54:27 -07:00
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
if (_ecore_xcb_event_buffered)
|
2011-07-14 08:35:42 -07:00
|
|
|
{
|
|
|
|
_ecore_xcb_events_handle(_ecore_xcb_event_buffered);
|
2011-08-20 14:14:34 -07:00
|
|
|
free(_ecore_xcb_event_buffered);
|
2011-07-14 08:35:42 -07:00
|
|
|
_ecore_xcb_event_buffered = NULL;
|
|
|
|
}
|
2010-08-02 11:54:27 -07:00
|
|
|
|
2011-09-13 09:32:34 -07:00
|
|
|
// xcb_flush(conn);
|
2011-08-20 14:14:34 -07:00
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
while ((ev = xcb_poll_for_event(conn)))
|
2011-07-14 08:35:42 -07:00
|
|
|
{
|
2011-10-20 22:40:59 -07:00
|
|
|
/* NB: Ecore Xlib uses filterevent for xim, but xcb does not support
|
2011-09-08 14:51:08 -07:00
|
|
|
* xim, so no need for it here */
|
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
/* check for errors first */
|
|
|
|
if (xcb_connection_has_error(conn))
|
|
|
|
{
|
|
|
|
xcb_generic_error_t *err;
|
|
|
|
|
|
|
|
err = (xcb_generic_error_t *)ev;
|
|
|
|
_ecore_xcb_io_error_handle(err);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* trap mouse motion events and filter out all but the last one.
|
|
|
|
* we do this because handling every one is fairly cpu intensive
|
|
|
|
* (especially on under-powered devices).
|
|
|
|
*
|
|
|
|
* NB: I've tested this extensively and have found no ill effects,
|
|
|
|
* but if someone notices something, please report it */
|
|
|
|
/* if ((ev->response_type & ~0x80) == XCB_MOTION_NOTIFY) */
|
|
|
|
/* { */
|
|
|
|
/* if (ev_mouse) free(ev_mouse); */
|
|
|
|
/* ev_mouse = ev; */
|
|
|
|
/* } */
|
|
|
|
/* else */
|
|
|
|
/* { */
|
|
|
|
/* FIXME: Filter event for XIM */
|
|
|
|
_ecore_xcb_events_handle(ev);
|
|
|
|
free(ev);
|
|
|
|
/* } */
|
|
|
|
}
|
2011-08-20 14:14:34 -07:00
|
|
|
}
|
2010-08-02 11:54:27 -07:00
|
|
|
|
2011-09-24 02:21:17 -07:00
|
|
|
/* if (ev_mouse) */
|
|
|
|
/* { */
|
|
|
|
/* _ecore_xcb_events_handle(ev_mouse); */
|
|
|
|
/* free(ev_mouse); */
|
|
|
|
/* } */
|
2010-08-02 11:54:27 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
return ECORE_CALLBACK_RENEW;
|
|
|
|
}
|
2009-03-17 06:34:40 -07:00
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
static Eina_Bool
|
|
|
|
_ecore_xcb_fd_handle_buff(void *data,
|
|
|
|
Ecore_Fd_Handler *hdlr __UNUSED__)
|
2011-07-14 08:35:42 -07:00
|
|
|
{
|
|
|
|
xcb_connection_t *conn;
|
2011-08-20 14:14:34 -07:00
|
|
|
xcb_generic_event_t *ev = NULL;
|
2010-08-02 11:54:27 -07:00
|
|
|
|
2011-07-14 08:35:42 -07:00
|
|
|
conn = (xcb_connection_t *)data;
|
2011-08-20 14:14:34 -07:00
|
|
|
ev = xcb_poll_for_event(conn);
|
2011-10-20 22:40:59 -07:00
|
|
|
if (ev)
|
2011-08-20 14:14:34 -07:00
|
|
|
{
|
|
|
|
/* check for errors first */
|
2011-10-20 22:40:59 -07:00
|
|
|
if (xcb_connection_has_error(conn))
|
|
|
|
{
|
|
|
|
xcb_generic_error_t *err;
|
|
|
|
|
|
|
|
err = (xcb_generic_error_t *)ev;
|
|
|
|
_ecore_xcb_io_error_handle(err);
|
|
|
|
return ECORE_CALLBACK_CANCEL;
|
|
|
|
}
|
|
|
|
/* trap mouse motion events and filter out all but the last one.
|
|
|
|
* we do this because handling every one is fairly cpu intensive
|
|
|
|
* (especially on under-powered devices).
|
|
|
|
*
|
|
|
|
* NB: I've tested this extensively and have found no ill effects,
|
|
|
|
* but if someone notices something, please report it */
|
|
|
|
/* else if ((ev->response_type & ~0x80) == XCB_MOTION_NOTIFY) */
|
|
|
|
/* { */
|
|
|
|
/* free(ev); */
|
|
|
|
/* return ECORE_CALLBACK_CANCEL; */
|
|
|
|
/* } */
|
|
|
|
/* else */
|
|
|
|
{
|
|
|
|
_ecore_xcb_event_buffered = ev;
|
|
|
|
return ECORE_CALLBACK_RENEW;
|
|
|
|
}
|
2011-08-20 14:14:34 -07:00
|
|
|
}
|
2011-07-14 08:35:42 -07:00
|
|
|
return ECORE_CALLBACK_CANCEL;
|
|
|
|
}
|
2011-09-13 09:32:34 -07:00
|
|
|
|
2011-10-20 22:40:59 -07:00
|
|
|
static Eina_Bool
|
|
|
|
_ecore_xcb_idle_enter(void *data __UNUSED__)
|
2011-09-13 09:32:34 -07:00
|
|
|
{
|
2011-09-20 22:13:03 -07:00
|
|
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
2011-09-20 02:12:02 -07:00
|
|
|
CHECK_XCB_CONN;
|
|
|
|
|
2011-09-13 09:32:34 -07:00
|
|
|
xcb_flush(_ecore_xcb_conn);
|
|
|
|
return ECORE_CALLBACK_RENEW;
|
|
|
|
}
|
2011-10-20 22:40:59 -07:00
|
|
|
|