Enlightenment CVS committal
Author : codewarrior
Project : e17
Module : proto
Dir : e17/proto/etk/src/lib
Modified Files:
Etk.h Makefile.am etk_dnd.c etk_dnd.h
Added Files:
etk_selection.c etk_selection.h
Log Message:
- move selection functions to etk_selection.[ch]
- begin working on selections (text)
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/Etk.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -3 -r1.20 -r1.21
--- Etk.h 12 Feb 2006 13:13:44 -0000 1.20
+++ Etk.h 13 Feb 2006 00:00:01 -0000 1.21
@@ -64,5 +64,6 @@
#include "etk_spin_button.h"
#include "etk_dnd.h"
#include "etk_clipboard.h"
+#include "etk_selection.h"
#endif
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/Makefile.am,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -3 -r1.24 -r1.25
--- Makefile.am 12 Feb 2006 13:13:45 -0000 1.24
+++ Makefile.am 13 Feb 2006 00:00:01 -0000 1.25
@@ -44,7 +44,8 @@
etk_progress_bar.h \
etk_spin_button.h \
etk_dnd.h \
-etk_clipboard.h
+etk_clipboard.h \
+etk_selection.h
libetk_la_SOURCES = \
etk_main.c etk_utils.c \
@@ -76,6 +77,7 @@
etk_spin_button.c \
etk_dnd.c \
etk_clipboard.c \
+etk_selection.c \
$(ETKHEADERS)
installed_headersdir = $(prefix)/include/etk
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_dnd.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- etk_dnd.c 12 Feb 2006 13:13:45 -0000 1.4
+++ etk_dnd.c 13 Feb 2006 00:00:01 -0000 1.5
@@ -33,7 +33,7 @@
#define ETK_DND_INSIDE(x, y, xx, yy, ww, hh) (((x) < ((xx) + (ww))) && ((y) <
((yy) + (hh))) && ((x) >= (xx)) && ((y) >= (yy)))
-Etk_Widget *_etk_selection_widget = NULL;
+extern Etk_Widget *_etk_selection_widget;
static Etk_Widget *_etk_dnd_widget = NULL;
static Evas_List *_etk_dnd_handlers = NULL;
@@ -253,20 +253,23 @@
*/
}
else
- {
+ {
+ /* emit signal to widget that the clipboard text is sent to it */
+ Etk_Event_Selection_Request event;
+
text = ev->data;
- /* printf("primary: %s %s\n", ev->target, text->text); */
+ event.data = text->text;
+ event.content = ETK_SELECTION_CONTENT_TEXT;
+ etk_widget_selection_received(_etk_selection_widget, &event);
}
break;
case ECORE_X_SELECTION_SECONDARY:
sel = ev->data;
- /* printf("secondary: %s %s\n", ev->target, sel->data); */
+ printf("secondary: %s %s\n", ev->target, sel->data);
break;
case ECORE_X_SELECTION_XDND:
- /* printf("xdnd: %s\n", ev->target); */
-
files = ev->data;
if (!_etk_dnd_widget || files->num_files < 1)
@@ -279,15 +282,10 @@
_etk_dnd_widget->dnd_files = calloc(files->num_files, sizeof(char*));
- /* printf("num_files: %d\n", files->num_files); */
-
/* Fill in the drop data into the widget */
_etk_dnd_widget->dnd_files_num = files->num_files;
- for (i = 0; i < files->num_files; i++)
- {
- /* printf("file: %s\n", files->files[i]); */
- _etk_dnd_widget->dnd_files[i] = strdup(files->files[i]);
- }
+ for (i = 0; i < files->num_files; i++)
+ _etk_dnd_widget->dnd_files[i] = strdup(files->files[i]);
/* emit the drop signal so the widget can react */
etk_widget_drag_drop(_etk_dnd_widget);
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_dnd.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- etk_dnd.h 12 Feb 2006 13:13:45 -0000 1.4
+++ etk_dnd.h 13 Feb 2006 00:00:01 -0000 1.5
@@ -32,9 +32,6 @@
Etk_Bool etk_dnd_init();
void etk_dnd_shutdown();
-
-void etk_selection_text_request(Etk_Widget *widget);
-void etk_selection_text_set(Etk_Widget *widget, const char *data);
/** @} */
-------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs