Enlightenment CVS committal Author : codewarrior Project : e17 Module : proto
Dir : e17/proto/etk/src/lib Modified Files: etk_dnd.c etk_dnd.h etk_widget.c Log Message: - support for text copying to the clipboard. now you can copy / paste text in etk. =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_dnd.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- etk_dnd.c 9 Feb 2006 22:41:20 -0000 1.1 +++ etk_dnd.c 10 Feb 2006 00:59:08 -0000 1.2 @@ -101,6 +101,18 @@ ecore_x_selection_clipboard_request(win, ECORE_X_SELECTION_TARGET_UTF8_STRING); } +void etk_selection_text_set(Etk_Widget *widget, char *data) +{ + Ecore_X_Window win; + + if(!ETK_IS_WINDOW(widget->toplevel_parent)) + return; + + win = ETK_WINDOW(widget->toplevel_parent)->x_window; + + ecore_x_selection_clipboard_set(win, data, strlen(data) + 1); +} + /* Search the container recursively for the widget that accepts xdnd */ static void _etk_xdnd_container_get_widgets_at(Etk_Toplevel_Widget *top, int x, int y, int offx, int offy, Evas_List **list) { @@ -129,7 +141,7 @@ ev = event; - printf("enter window!\n"); +// printf("enter window!\n"); // for (i = 0; i < ev->num_types; i++) // printf("type: %s\n", ev->types[i]); @@ -213,7 +225,7 @@ { Ecore_X_Event_Xdnd_Drop *ev; - printf("drop\n"); + //printf("drop\n"); ev = event; ecore_x_selection_xdnd_request(ev->win, "text/uri-list"); @@ -222,7 +234,7 @@ static int _etk_xdnd_leave_handler(void *data, int type, void *event) { - printf("leave window\n"); + //printf("leave window\n"); return 1; } @@ -236,7 +248,7 @@ Ecore_X_Selection_Data_Targets *targets; int i; - printf("selection\n"); + //printf("selection\n"); ev = event; switch (ev->selection) { =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_dnd.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- etk_dnd.h 9 Feb 2006 22:41:20 -0000 1.1 +++ etk_dnd.h 10 Feb 2006 00:59:08 -0000 1.2 @@ -33,7 +33,8 @@ int etk_dnd_init(); int etk_dnd_shutdown(); void etk_selection_text_request(Etk_Widget *widget); - +void etk_selection_text_set(Etk_Widget *widget, char *data); + /** @} */ #endif =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_widget.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -3 -r1.21 -r1.22 --- etk_widget.c 9 Feb 2006 22:41:20 -0000 1.21 +++ etk_widget.c 10 Feb 2006 00:59:08 -0000 1.22 @@ -1456,8 +1456,6 @@ { if (!widget) return; - - printf("%s <=-\n", (char*)event->data); etk_signal_emit(_etk_widget_signals[ETK_WIDGET_SELECTION_GET_SIGNAL], ETK_OBJECT(widget), NULL, event); } ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs