View Single Post
Old 01-05-2010, 06:18 AM   #162
tango.0309
Junior Member
tango.0309 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Dec 2009
Device: none
Send Xdamage events to xepdmgr

Hi Antartica,

I want to send damage events to "xepdmgr" with (x,y) coordinates and (width,height) of the damaged region.The present "xepdmgrclient.c" is sending only property event. I found in xepdmgr is capable of receiving damage events. I am not clear in sending damage event to xepdmgr, whether any changes required in xepdmgr server side also.
note:
I am exploring "xepdmgr-1.0-iliad" code.

Regards,
tango.



Quote:
Originally Posted by Antartica View Post
xepdmgr works in any X server that supports the DAMAGE extension. TinyX supports it so no problem. To query a X server if it supports the DAMAGE extension, use the following command in a shell:

Code:
$ xdpyinfo | grep DAMAGE
If it says "DAMAGE" it is all right.

About WX widgets: xepdmgr is toolkit-agnostic, so that is also covered. You can use it for wxwidgets applications.

About using xepdmgr in hardware different from the iliad: you will have to adapt the code, as it uses ioctls specific of the iliad to signal the e-ink driver to refresh. The dual screen setup is not a problem. If only one of the screens is e-ink, just have different X servers for each screen (so each has its own display, i.e. :0 and :1).

Specifically you will have to

1. adapt the xepdmgr_einkfb.c file for your e-ink driver

2. insert the following code in xepdmgr.c to omit the dependencies to irex libraries (code taken from the DUMMY_BUILD target):

Code:
/* Setup some macros so that we can build without irex libraries */
static int dummy_var;
#define initServer(ptr_udp_fd,b) ((*(ptr_udp_fd))=0)
#define dmMessageParser(a,b) 1
#define dmDisplay(a,b) dummy_var=0
#define erIpcStartClient(a,b) ((*(b))=0)
#define clDisplayUpdated(a) dummy_var=0
#define busySetBusy(a,b) dummy_var=0
3. Modify the Makefile and delete "-lerdm -Lliberipc -leripc"

4. Build xepdmgr ("make xepdmgr")

5. In the target hardware, use xepdmgr in "server mode", that is, launching it as "./xepdmgr :0".

Hope that helps.

NOTES:
- there is an alternative implementation in lua by Hansel called "xx" elsewhere in the forums. May be worthwhile to take a look at it.
- the "meat" of xepdmgr is just using the damage extension of the X server to have the information of when something has changed in the display and what portion of the display to update. You can roll your own update maanager easily having the code of xepdmgr and xx as a guide.

BTW, out of curiosity, if you are allowed to say it: to what e-reader are you intending to port it?

Happy hacking
tango.0309 is offline   Reply With Quote