Enlightenment CVS committal Author : ningerso Project : e17 Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_x Modified Files: Ecore_X.h ecore_x.c ecore_x_events.c Log Message: Send a selection request event when it occurs and expand the event structure to include useful information. This event handler needs more work to determine when to convert the data automatically and when to defer to the application handler. =================================================================== RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_x/Ecore_X.h,v retrieving revision 1.175 retrieving revision 1.176 diff -u -3 -r1.175 -r1.176 --- Ecore_X.h 5 Nov 2006 15:14:49 -0000 1.175 +++ Ecore_X.h 2 Dec 2006 06:37:51 -0000 1.176 @@ -539,8 +539,11 @@ struct _Ecore_X_Event_Selection_Request { - Ecore_X_Window win; - Ecore_X_Time time; + Ecore_X_Window win; + Ecore_X_Time time; + Ecore_X_Atom selection; + Ecore_X_Atom target; + Ecore_X_Atom property; }; struct _Ecore_X_Event_Selection_Notify =================================================================== RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_x/ecore_x.c,v retrieving revision 1.121 retrieving revision 1.122 diff -u -3 -r1.121 -r1.122 --- ecore_x.c 11 Nov 2006 04:34:51 -0000 1.121 +++ ecore_x.c 2 Dec 2006 06:37:51 -0000 1.122 @@ -1174,14 +1174,15 @@ xci->delay = 0; for (i = 0; i < (w * h); i++) { -// int r, g, b, a; -// -// a = (pixels[i] >> 24) & 0xff; -// r = (((pixels[i] >> 16) & 0xff) * a) / 0xff; -// g = (((pixels[i] >> 8 ) & 0xff) * a) / 0xff; -// b = (((pixels[i] ) & 0xff) * a) / 0xff; - xci->pixels[i] = pixels[i]; -// (a << 24) | (r << 16) | (g << 8) | (b); + int r, g, b, a; + + a = ((pixels[i] >> 24) & 0xff); + r = ((pixels[i] >> 16) & 0xff); + g = ((pixels[i] >> 8 ) & 0xff); + b = ((pixels[i] ) & 0xff); +// xci->pixels[i] = pixels[i]; +// xci->pixels[i] = (a << 24) | (r << 16) | (g << 8) | (b); + xci->pixels[i] = (b << 24) | (g << 16) | (r << 8) | (a); } c = XcursorImageLoadCursor(_ecore_x_disp, xci); XcursorImageDestroy(xci); =================================================================== RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_x/ecore_x_events.c,v retrieving revision 1.88 retrieving revision 1.89 diff -u -3 -r1.88 -r1.89 --- ecore_x_events.c 12 Nov 2006 01:32:30 -0000 1.88 +++ ecore_x_events.c 2 Dec 2006 06:37:51 -0000 1.89 @@ -1108,10 +1108,22 @@ void _ecore_x_event_handle_selection_request(XEvent *xevent) { + Ecore_X_Event_Selection_Request *e; Ecore_X_Selection_Intern *sd; XSelectionEvent xnotify; XEvent xev; void *data; + + /* + * Generate a selection request event. + */ + e = malloc(sizeof(Ecore_X_Event_Selection_Request)); + e->win = xevent->xselectionrequest.requestor; + e->time = xevent->xselectionrequest.time; + e->selection = xevent->xselectionrequest.selection; + e->target = xevent->xselectionrequest.target; + e->property = xevent->xselectionrequest.property; + ecore_event_add(ECORE_X_EVENT_SELECTION_REQUEST, e, NULL, NULL); xnotify.type = SelectionNotify; xnotify.display = xevent->xselectionrequest.display; ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs