From: <enl...@li...> - 2006-02-07 01:35:20
|
Enlightenment CVS committal Author : codewarrior Project : e17 Module : proto Dir : e17/proto/extrackt/data/etk_fe/images Added Files: back.png cd.png cddb.png check.png discdb0.png discdb1.png edit.png eject.png enc0.png enc1.png enc2.png enc3.png forward.png gcd.png grip.png gripicon.png griptray.png list.png loop.png lowleft.png lowright.png mail.png menunext.png menupause.png menuplay.png menuprev.png menustop.png minmax.png mute.png next.png noloop.png play.png playlist.png playnorm.png random.png rewind.png rip0.png rip1.png rip2.png rip3.png rotate.png save.png shutdown.png smile1.png smile2.png smile3.png smile4.png smile5.png smile6.png smile7.png smile8.png stop.png test.png upleft.png upright.png Log Message: cat grip.tar.gz | etkify > extrackt.tar.gz ============================================ Extrackt ======== Extrackt is essentially an audio CD ripper and encoder. It allows you to choose your ripper and encoder based on templates which give Extrackt the ability to use multiple built in and user defined ones. Extrackt is logically split into a frontend (gui) and a backend (ripping / encoding / cddb etc.) and allows for frontends to be written using any toolkit like Etk, Ewl, Gtk, or even pure Evas / Edje (not to mention ncurses or simlpe shell ones). Main developers: ================ Hisham 'CodeWarrior' Mardam Bey Jorge Luis 'turran' Zapata Thanks: ======= Etk Simon 'MoOm' Treny <sim...@fr...> Misc EFL Casten 'The Rasterman' Haitzler <ra...@ra...> + team App Name Sara 'Maieve' Ashour <ma...@gm...> |
From: <enl...@li...> - 2006-02-07 01:35:20
|
Enlightenment CVS committal Author : codewarrior Project : e17 Module : proto Dir : e17/proto/extrackt/data Added Files: Makefile.am Log Message: cat grip.tar.gz | etkify > extrackt.tar.gz ============================================ Extrackt ======== Extrackt is essentially an audio CD ripper and encoder. It allows you to choose your ripper and encoder based on templates which give Extrackt the ability to use multiple built in and user defined ones. Extrackt is logically split into a frontend (gui) and a backend (ripping / encoding / cddb etc.) and allows for frontends to be written using any toolkit like Etk, Ewl, Gtk, or even pure Evas / Edje (not to mention ncurses or simlpe shell ones). Main developers: ================ Hisham 'CodeWarrior' Mardam Bey Jorge Luis 'turran' Zapata Thanks: ======= Etk Simon 'MoOm' Treny <sim...@fr...> Misc EFL Casten 'The Rasterman' Haitzler <ra...@ra...> + team App Name Sara 'Maieve' Ashour <ma...@gm...> |
From: <enl...@li...> - 2006-02-07 01:35:23
|
Enlightenment CVS committal Author : codewarrior Project : e17 Module : proto Dir : e17/proto/extrackt/src/bin Added Files: Extrackt.h Makefile.am cddb.c cddb.h cddev.c cddev.h command.c command.h conf.c conf.h http.c http.h main.c main.h oldfunctions.c protocol.c protocol.h util.c util.h Log Message: cat grip.tar.gz | etkify > extrackt.tar.gz ============================================ Extrackt ======== Extrackt is essentially an audio CD ripper and encoder. It allows you to choose your ripper and encoder based on templates which give Extrackt the ability to use multiple built in and user defined ones. Extrackt is logically split into a frontend (gui) and a backend (ripping / encoding / cddb etc.) and allows for frontends to be written using any toolkit like Etk, Ewl, Gtk, or even pure Evas / Edje (not to mention ncurses or simlpe shell ones). Main developers: ================ Hisham 'CodeWarrior' Mardam Bey Jorge Luis 'turran' Zapata Thanks: ======= Etk Simon 'MoOm' Treny <sim...@fr...> Misc EFL Casten 'The Rasterman' Haitzler <ra...@ra...> + team App Name Sara 'Maieve' Ashour <ma...@gm...> |
From: <enl...@li...> - 2006-02-07 01:35:23
|
Enlightenment CVS committal Author : codewarrior Project : e17 Module : proto Dir : e17/proto/extrackt/src Added Files: Makefile.am Log Message: cat grip.tar.gz | etkify > extrackt.tar.gz ============================================ Extrackt ======== Extrackt is essentially an audio CD ripper and encoder. It allows you to choose your ripper and encoder based on templates which give Extrackt the ability to use multiple built in and user defined ones. Extrackt is logically split into a frontend (gui) and a backend (ripping / encoding / cddb etc.) and allows for frontends to be written using any toolkit like Etk, Ewl, Gtk, or even pure Evas / Edje (not to mention ncurses or simlpe shell ones). Main developers: ================ Hisham 'CodeWarrior' Mardam Bey Jorge Luis 'turran' Zapata Thanks: ======= Etk Simon 'MoOm' Treny <sim...@fr...> Misc EFL Casten 'The Rasterman' Haitzler <ra...@ra...> + team App Name Sara 'Maieve' Ashour <ma...@gm...> |
From: <enl...@li...> - 2006-02-07 01:36:56
|
Enlightenment CVS committal Author : codewarrior Project : e17 Module : proto Dir : e17/proto/extrackt/data/images Added Files: Makefile.am extrackt_icon.png Log Message: cat grip.tar.gz | etkify > extrackt.tar.gz |
From: <enl...@li...> - 2006-02-07 01:36:56
|
Enlightenment CVS committal Author : codewarrior Project : e17 Module : proto Dir : e17/proto/extrackt Modified Files: AUTHORS Added Files: .cvsignore Log Message: cat grip.tar.gz | etkify > extrackt.tar.gz =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/extrackt/AUTHORS,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- AUTHORS 7 Feb 2006 01:35:13 -0000 1.1 +++ AUTHORS 7 Feb 2006 01:36:47 -0000 1.2 @@ -8,7 +8,7 @@ Thanks: ======= Etk Simon 'MoOm' Treny <sim...@fr...> -Misc EFL Casten 'The Rasterman' Haitzler <ra...@ra...> + team +Misc EFL Carsten 'The Rasterman' Haitzler <ra...@ra...> + team App Name Sara 'Maieve' Ashour <ma...@gm...> |
From: <enl...@li...> - 2006-02-07 01:51:04
|
Enlightenment CVS committal Author : codewarrior Project : e17 Module : proto Dir : e17/proto/extrackt Modified Files: TODO Log Message: todo++ =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/extrackt/TODO,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- TODO 7 Feb 2006 01:35:13 -0000 1.1 +++ TODO 7 Feb 2006 01:50:49 -0000 1.2 @@ -1,4 +1,6 @@ TODO: +- add code to properly select a frontend and fail otherwise + - remove all warnings - search for rippers / encoders and display erros if none are found |
From: <enl...@li...> - 2006-02-07 01:54:26
|
Enlightenment CVS committal Author : codewarrior Project : e17 Module : proto Dir : e17/proto/extrackt Modified Files: TODO Log Message: todo++ =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/extrackt/TODO,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- TODO 7 Feb 2006 01:50:49 -0000 1.2 +++ TODO 7 Feb 2006 01:54:18 -0000 1.3 @@ -1,4 +1,6 @@ TODO: +- segv when rippers / encoders are not installed + - add code to properly select a frontend and fail otherwise - remove all warnings |
From: <enl...@li...> - 2006-02-07 02:34:12
|
Enlightenment CVS committal Author : codewarrior Project : e17 Module : proto Dir : e17/proto/extrackt/src/bin/etk_fe Modified Files: gui.c Log Message: save ripper + encoder options with rest of config =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/extrackt/src/bin/etk_fe/gui.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- gui.c 7 Feb 2006 01:35:14 -0000 1.1 +++ gui.c 7 Feb 2006 02:34:01 -0000 1.2 @@ -742,6 +742,49 @@ else gui->ex->config.cd->poll_interval = 1; + /*** Save config for Config->Rip - Ripper ***/ +#define EXE_SAVE_STR(cfg, str) SAVE_STR(cfg, etk_entry_text_get(ETK_ENTRY(gui->str))) + { + Evas_List *l; + Ex_Config_Exe *exe; + + for(l = gui->ex->config.rippers; l; l = l->next) + { + exe = l->data; + if(!strcmp(exe->name, etk_button_label_get(ETK_BUTTON(gui->ripper_combo)))) + break; + exe = NULL; + } + + if(exe) + { + EXE_SAVE_STR(exe->exe, ripper_executable_entry); + EXE_SAVE_STR(exe->command_line_opts, ripper_command_line_entry); + EXE_SAVE_STR(exe->file_format, ripper_file_format_entry); + } + } + + /*** Save config for Config->Encoder - Encoder ***/ + { + Evas_List *l; + Ex_Config_Exe *exe; + + for(l = gui->ex->config.encode->encoders; l; l = l->next) + { + exe = l->data; + if(!strcmp(exe->name, etk_button_label_get(ETK_BUTTON(gui->encoder_combo)))) + break; + exe = NULL; + } + + if(exe) + { + EXE_SAVE_STR(exe->exe, encoder_executable_entry); + EXE_SAVE_STR(exe->command_line_opts, encoder_command_line_entry); + EXE_SAVE_STR(exe->file_format, encoder_file_format_entry); + } + } + ex_config_write(gui->ex); } |
From: <enl...@li...> - 2006-02-07 02:34:12
|
Enlightenment CVS committal Author : codewarrior Project : e17 Module : proto Dir : e17/proto/extrackt Modified Files: TODO Log Message: save ripper + encoder options with rest of config =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/extrackt/TODO,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- TODO 7 Feb 2006 01:54:18 -0000 1.3 +++ TODO 7 Feb 2006 02:34:01 -0000 1.4 @@ -1,4 +1,6 @@ TODO: +- make sure we save ALL config + - segv when rippers / encoders are not installed - add code to properly select a frontend and fail otherwise |
From: <enl...@li...> - 2006-02-07 09:51:34
|
Enlightenment CVS committal Author : codewarrior Project : e17 Module : proto Dir : e17/proto/enhance/examples Modified Files: enhance_test.c Log Message: dont bother freeing, use extrackt.glade, better demo =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/enhance/examples/enhance_test.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- enhance_test.c 7 Feb 2006 00:34:31 -0000 1.1 +++ enhance_test.c 7 Feb 2006 09:51:26 -0000 1.2 @@ -14,7 +14,6 @@ on_window1_delete_event(void *data) { etk_main_quit(); - enhance_free(en); enhance_shutdown(); return 1; } @@ -37,7 +36,7 @@ en = enhance_new(); enhance_callback_data_set(en, "rip_only_clicked", &data); - enhance_file_load(en, "window1", "email.glade"); + enhance_file_load(en, "window1", "extrackt.glade"); data2 = enhance_callback_data_get(en, "rip_only_clicked"); *data2 = string2; |
From: <enl...@li...> - 2006-02-08 12:49:43
|
Enlightenment CVS committal Author : codewarrior Project : e17 Module : proto Dir : e17/proto/etk/data/themes/default/widgets Added Files: spinner.edc Log Message: - add skeleton for spin button widget (doesnt work yet!) - add xdnd drop support per widget - see test. |
From: <enl...@li...> - 2006-02-08 12:49:44
|
Enlightenment CVS committal Author : codewarrior Project : e17 Module : proto Dir : e17/proto/etk/src/lib Modified Files: Etk.h Makefile.am etk_main.c etk_types.h etk_widget.c etk_widget.h etk_window.c Added Files: etk_spin_button.c etk_spin_button.h Log Message: - add skeleton for spin button widget (doesnt work yet!) - add xdnd drop support per widget - see test. =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/Etk.h,v retrieving revision 1.16 retrieving revision 1.17 diff -u -3 -r1.16 -r1.17 --- Etk.h 19 Jan 2006 13:56:10 -0000 1.16 +++ Etk.h 8 Feb 2006 12:49:38 -0000 1.17 @@ -57,5 +57,6 @@ #include "etk_filechooser_widget.h" #include "etk_notebook.h" #include "etk_progress_bar.h" +#include "etk_spin_button.h" #endif =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/Makefile.am,v retrieving revision 1.19 retrieving revision 1.20 diff -u -3 -r1.19 -r1.20 --- Makefile.am 19 Jan 2006 13:56:10 -0000 1.19 +++ Makefile.am 8 Feb 2006 12:49:38 -0000 1.20 @@ -40,7 +40,8 @@ etk_statusbar.h \ etk_filechooser_widget.h \ etk_notebook.h \ -etk_progress_bar.h +etk_progress_bar.h \ +etk_spin_button.h libetk_la_SOURCES = \ etk_main.c etk_utils.c \ @@ -68,6 +69,7 @@ etk_filechooser_widget.c \ etk_notebook.c \ etk_progress_bar.c \ +etk_spin_button.c \ $(ETKHEADERS) installed_headersdir = $(prefix)/include/etk =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_main.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -3 -r1.10 -r1.11 --- etk_main.c 15 Jan 2006 11:07:16 -0000 1.10 +++ etk_main.c 8 Feb 2006 12:49:38 -0000 1.11 @@ -1,7 +1,10 @@ /** @file etk_main.c */ #include "etk_main.h" #include <locale.h> +#include <string.h> +#include <stdlib.h> #include <Ecore.h> +#include <Ecore_X.h> #include <Ecore_Job.h> #include <Ecore_Evas.h> #include <Evas.h> @@ -12,6 +15,7 @@ #include "etk_toplevel_widget.h" #include "etk_utils.h" #include "etk_theme.h" +#include "etk_window.h" #include "config.h" /** @@ -23,10 +27,19 @@ static void _etk_main_size_request_recursive(Etk_Widget *widget); static void _etk_main_size_allocate_recursive(Etk_Widget *widget, Etk_Bool is_top_level); +#if HAVE_ECORE_X +static int _etk_xdnd_enter_handler(void *data, int type, void *event); +static int _etk_xdnd_position_handler(void *data, int type, void *event); +static int _etk_xdnd_drop_handler(void *data, int type, void *event); +static int _etk_xdnd_leave_handler(void *data, int type, void *event); +static int _etk_xdnd_selection_handler(void *data, int type, void *event); +#endif + static Evas_List *_etk_main_toplevel_widgets = NULL; static Etk_Bool _etk_main_running = ETK_FALSE; static Etk_Bool _etk_main_initialized = ETK_FALSE; static Ecore_Job *_etk_main_iterate_job = NULL; +static Etk_Widget *_etk_dnd_widget = NULL; /************************** * @@ -63,6 +76,15 @@ ETK_WARNING("Edje initialization failed!"); return ETK_FALSE; } + +#if HAVE_ECORE_X + if (!ecore_x_init(NULL)) + { + ETK_WARNING("Ecore_X initialzation failed!"); + return ETK_FALSE; + } +#endif + etk_theme_init(); /* Gettext */ @@ -70,6 +92,14 @@ bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); +#if HAVE_ECORE_X + ecore_event_handler_add(ECORE_X_EVENT_XDND_ENTER, _etk_xdnd_enter_handler, NULL); + ecore_event_handler_add(ECORE_X_EVENT_XDND_POSITION, _etk_xdnd_position_handler, NULL); + ecore_event_handler_add(ECORE_X_EVENT_XDND_DROP, _etk_xdnd_drop_handler, NULL); + ecore_event_handler_add(ECORE_X_EVENT_XDND_LEAVE, _etk_xdnd_leave_handler, NULL); + ecore_event_handler_add(ECORE_X_EVENT_SELECTION_NOTIFY, _etk_xdnd_selection_handler, NULL); +#endif + _etk_main_initialized = ETK_TRUE; return ETK_TRUE; } @@ -214,4 +244,205 @@ } } + +#if HAVE_ECORE_X +#define E_INSIDE(x, y, xx, yy, ww, hh) (((x) < ((xx) + (ww))) && ((y) < ((yy) + (hh))) && ((x) >= (xx)) && ((y) >= (yy))) +static int _etk_xdnd_enter_handler(void *data, int type, void *event) +{ + Ecore_X_Event_Xdnd_Enter *ev; + int i; + + /* printf("enter\n"); */ + ev = event; + /* + for (i = 0; i < ev->num_types; i++) + printf("type: %s\n", ev->types[i]); + */ + return 1; +} + +/* Search the container recursively for the widget that accepts xdnd */ +static void _etk_xdnd_container_get_widgets_at(Etk_Container *cont, int x, int y, int offx, int offy, Evas_List **list) +{ + Evas_List *child; + + for(child = etk_container_children_get(cont); child; child = child->next) + { + Etk_Widget *widget; + + if(!(widget = ETK_WIDGET(child->data))) + continue; + + if(E_INSIDE(x, y, + widget->inner_geometry.x + offx, + widget->inner_geometry.y + offy, + widget->inner_geometry.w, + widget->inner_geometry.h)) + { + if(widget->accepts_xdnd) + { + *list = evas_list_append(*list, widget); + } + + if(ETK_IS_CONTAINER(widget)) + _etk_xdnd_container_get_widgets_at(ETK_CONTAINER(widget), x, y, offx, offy, list); + } + } +} + +static int _etk_xdnd_position_handler(void *data, int type, void *event) +{ + Ecore_X_Event_Xdnd_Position *ev; + Etk_Window *window; + Evas_List *l; + Evas_List *children = NULL; + Etk_Widget *widget; + ev = event; + + /* loop top level widgets (windows) */ + for(l = _etk_main_toplevel_widgets; l; l = l->next) + { + int x, y; + + if (!(window = ETK_WINDOW(l->data))) + continue; + + /* if this isnt the active window, dont waste time */ + if(ev->win != window->x_window) + continue; + + ecore_evas_geometry_get(window->ecore_evas, &x, &y, NULL, NULL); + + /* find the widget we want to drop on */ + _etk_xdnd_container_get_widgets_at(ETK_CONTAINER(window), ev->position.x, ev->position.y, x, y, &children); + } + + /* if we found a widget, emit signals */ + if(children != NULL) + { + Ecore_X_Rectangle rect; + widget = (evas_list_last(children))->data; + _etk_dnd_widget = widget; + /* TODO: filter types according to what widget wants */ + rect.x = widget->inner_geometry.x; + rect.y = widget->inner_geometry.y; + rect.width = widget->inner_geometry.w; + rect.height = widget->inner_geometry.h; + ecore_x_dnd_send_status(1, 1, rect, ECORE_X_DND_ACTION_PRIVATE); + } + + return 1; +} + +static int _etk_xdnd_drop_handler(void *data, int type, void *event) +{ + Ecore_X_Event_Xdnd_Drop *ev; + + /* printf("drop\n"); */ + ev = event; + + ecore_x_selection_xdnd_request(ev->win, "text/uri-list"); + return 1; +} + +static int _etk_xdnd_leave_handler(void *data, int type, void *event) +{ + /* printf("leave\n"); */ + return 1; +} + +static int _etk_xdnd_selection_handler(void *data, int type, void *event) +{ + Ecore_X_Event_Selection_Notify *ev; + Ecore_X_Selection_Data *sel; + Ecore_X_Selection_Data_Files *files; + Ecore_X_Selection_Data_Text *text; + Ecore_X_Selection_Data_Targets *targets; + int i; + + /* printf("selection\n"); */ + ev = event; + switch (ev->selection) + { + case ECORE_X_SELECTION_PRIMARY: + if (!strcmp(ev->target, ECORE_X_SELECTION_TARGET_TARGETS)) + { + /* printf("primary: %s\n", ev->target); */ + targets = ev->data; + /* + for (i = 0; i < targets->num_targets; i++) + printf("target: %s\n", targets->targets[i]); + */ + } + else + { + text = ev->data; + /* printf("primary: %s %s\n", ev->target, text->text); */ + } + break; + + case ECORE_X_SELECTION_SECONDARY: + sel = ev->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) + break; + + /* free old data, should this be done here? */ + for (i = 0; i < _etk_dnd_widget->xdnd_files_num; i++) + { + if(_etk_dnd_widget->xdnd_files[i]) + free(_etk_dnd_widget->xdnd_files[i]); + } + + if(_etk_dnd_widget->xdnd_files) + free(_etk_dnd_widget->xdnd_files); + + _etk_dnd_widget->xdnd_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->xdnd_files_num = files->num_files; + for (i = 0; i < files->num_files; i++) + { + /* printf("file: %s\n", files->files[i]); */ + _etk_dnd_widget->xdnd_files[i] = strdup(files->files[i]); + } + + /* emit the drop signal so the widget can react */ + etk_widget_drag_drop(_etk_dnd_widget); + + ecore_x_dnd_send_finished(); + break; + + case ECORE_X_SELECTION_CLIPBOARD: + if (!strcmp(ev->target, ECORE_X_SELECTION_TARGET_TARGETS)) + { + printf("clipboard: %s\n", ev->target); + targets = ev->data; + /* + for (i = 0; i < targets->num_targets; i++) + printf("target: %s\n", targets->targets[i]); + */ + } + else + { + text = ev->data; + /* printf("clipboard: %s %s\n", ev->target, text->text); */ + } + break; + } + + return 1; +} + +#endif + /** @} */ =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_types.h,v retrieving revision 1.22 retrieving revision 1.23 diff -u -3 -r1.22 -r1.23 --- etk_types.h 19 Jan 2006 23:09:24 -0000 1.22 +++ etk_types.h 8 Feb 2006 12:49:38 -0000 1.23 @@ -105,6 +105,7 @@ typedef struct _Etk_Notebook Etk_Notebook; typedef struct _Etk_Progress_Bar Etk_Progress_Bar; typedef enum _Etk_Progress_Bar_Orientation Etk_Progress_Bar_Orientation; +typedef struct _Etk_Spin_Button Etk_Spin_Button; /** * @enum Etk_Fill_Policy_Flags =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_widget.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -3 -r1.18 -r1.19 --- etk_widget.c 15 Jan 2006 11:07:17 -0000 1.18 +++ etk_widget.c 8 Feb 2006 12:49:38 -0000 1.19 @@ -13,6 +13,7 @@ #include "etk_marshallers.h" #include "etk_signal.h" #include "etk_signal_callback.h" +#include "config.h" /** * @addtogroup Etk_Widget @@ -60,6 +61,7 @@ ETK_WIDGET_FOCUS_SIGNAL, ETK_WIDGET_UNFOCUS_SIGNAL, ETK_WIDGET_SCROLL_SIZE_CHANGED_SIGNAL, + ETK_WIDGET_DRAG_DROP_SIGNAL, ETK_WIDGET_NUM_SIGNALS }; @@ -90,6 +92,7 @@ static void _etk_widget_leave_handler(Etk_Widget *widget); static void _etk_widget_focus_handler(Etk_Widget *widget); static void _etk_widget_unfocus_handler(Etk_Widget *widget); +static void _etk_widget_drag_drop_handler(Etk_Widget *widget); static void _etk_widget_mouse_in_cb(void *data, Evas *evas, Evas_Object *object, void *event_info); static void _etk_widget_signal_mouse_in_cb(Etk_Object *object, Etk_Event_Mouse_In_Out *event, void *data); @@ -167,6 +170,7 @@ _etk_widget_signals[ETK_WIDGET_FOCUS_SIGNAL] = etk_signal_new("focus", widget_type, ETK_MEMBER_OFFSET(Etk_Widget, focus), etk_marshaller_VOID__VOID, NULL, NULL); _etk_widget_signals[ETK_WIDGET_UNFOCUS_SIGNAL] = etk_signal_new("unfocus", widget_type, ETK_MEMBER_OFFSET(Etk_Widget, unfocus), etk_marshaller_VOID__VOID, NULL, NULL); _etk_widget_signals[ETK_WIDGET_SCROLL_SIZE_CHANGED_SIGNAL] = etk_signal_new("scroll_size_changed", widget_type, -1, etk_marshaller_VOID__VOID, NULL, NULL); + _etk_widget_signals[ETK_WIDGET_DRAG_DROP_SIGNAL] = etk_signal_new("drag_drop", widget_type, ETK_MEMBER_OFFSET(Etk_Widget, drag_drop),etk_marshaller_VOID__VOID, NULL, NULL); etk_type_property_add(widget_type, "name", ETK_WIDGET_NAME_PROPERTY, ETK_PROPERTY_STRING, ETK_PROPERTY_READABLE_WRITABLE, etk_property_value_string(NULL)); etk_type_property_add(widget_type, "parent", ETK_WIDGET_PARENT_PROPERTY, ETK_PROPERTY_POINTER, ETK_PROPERTY_READABLE_WRITABLE, etk_property_value_pointer(NULL)); @@ -1395,6 +1399,19 @@ return widget->clip; } +#if HAVE_ECORE_X +/** + * @brief Sends the "drag_drop" signal + * @param widget a widget + */ +void etk_widget_drag_drop(Etk_Widget *widget) +{ + if (!widget) + return; + etk_signal_emit(_etk_widget_signals[ETK_WIDGET_DRAG_DROP_SIGNAL], ETK_OBJECT(widget), NULL); +} + +#endif /************************** * @@ -1429,7 +1446,8 @@ widget->leave = _etk_widget_leave_handler; widget->focus = _etk_widget_focus_handler; widget->unfocus = _etk_widget_unfocus_handler; - + widget->drag_drop = _etk_widget_drag_drop_handler; + widget->left_inset = 0; widget->right_inset = 0; widget->top_inset = 0; @@ -1460,7 +1478,12 @@ widget->need_redraw = ETK_FALSE; widget->need_theme_min_size_recalc = ETK_FALSE; widget->swallowed = ETK_FALSE; - +#if HAVE_ECORE_X + widget->accepts_xdnd = ETK_FALSE; + widget->xdnd_files = NULL; + widget->xdnd_files_num = 0; +#endif + etk_signal_connect_full(_etk_widget_signals[ETK_WIDGET_MOUSE_IN_SIGNAL], ETK_OBJECT(widget), ETK_CALLBACK(_etk_widget_signal_mouse_in_cb), NULL, ETK_FALSE, ETK_FALSE); etk_signal_connect_full(_etk_widget_signals[ETK_WIDGET_MOUSE_OUT_SIGNAL], ETK_OBJECT(widget), ETK_CALLBACK(_etk_widget_signal_mouse_out_cb), NULL, ETK_FALSE, ETK_FALSE); etk_signal_connect_full(_etk_widget_signals[ETK_WIDGET_MOUSE_DOWN_SIGNAL], ETK_OBJECT(widget), ETK_CALLBACK(_etk_widget_signal_mouse_down_cb), NULL, ETK_FALSE, ETK_FALSE); @@ -1633,6 +1656,15 @@ etk_widget_theme_object_signal_emit(widget, "unfocus"); } +/* Default handler for the "drag_drop" signal */ +static void _etk_widget_drag_drop_handler(Etk_Widget *widget) +{ + if (!widget) + return; + etk_widget_theme_object_signal_emit(widget, "drag_drop"); +} + + /* Sets the widget as visible and queues a visibility update */ static void _etk_widget_show_handler(Etk_Widget *widget) { @@ -1926,6 +1958,35 @@ _etk_widget_key_up_cb(widget->parent, evas, NULL, event_info); } +#if HAVE_ECORE_X +void etk_widget_xdnd_set(Etk_Widget *widget, Etk_Bool on) +{ + if(on) + widget->accepts_xdnd = 1; + else + widget->accepts_xdnd = 0; +} + +Etk_Bool etk_widget_xdnd_get(Etk_Widget *widget) +{ + if(widget->accepts_xdnd) return ETK_TRUE; + + return ETK_FALSE; +} + +const char ** etk_widget_xdnd_files_get(Etk_Widget *widget, int *num_files) +{ + if(!widget->accepts_xdnd || widget->xdnd_files == NULL) + return NULL; + + if(num_files) + *num_files = widget->xdnd_files_num; + + return widget->xdnd_files; +} +#endif + + /************************** * * Private functions @@ -2164,8 +2225,8 @@ evas_object_move(widget->theme_object, widget->geometry.x, widget->geometry.y); evas_object_resize(widget->theme_object, widget->geometry.w, widget->geometry.h); } - if (widget->size_allocate) - widget->size_allocate(widget, widget->inner_geometry); + if (widget->size_allocate) + widget->size_allocate(widget, widget->inner_geometry); widget->need_redraw = ETK_FALSE; } =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_widget.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -3 -r1.12 -r1.13 --- etk_widget.h 19 Dec 2005 13:30:32 -0000 1.12 +++ etk_widget.h 8 Feb 2006 12:49:38 -0000 1.13 @@ -3,6 +3,7 @@ #define _ETK_WIDGET_H_ #include <Evas.h> +#include <Ecore_X.h> #include <stdarg.h> #include "etk_object.h" #include "etk_types.h" @@ -165,7 +166,8 @@ void (*scroll_size_get)(Etk_Widget *widget, Etk_Size *scroll_size); void (*scroll_margins_get)(Etk_Widget *widget, Etk_Size *margin_size); void (*scroll)(Etk_Widget *widget, int x, int y); - + void (*drag_drop)(Etk_Widget *widget); + void (*show)(Etk_Widget *widget); void (*enter)(Etk_Widget *widget); void (*leave)(Etk_Widget *widget); @@ -184,6 +186,12 @@ unsigned char need_redraw : 1; unsigned char need_theme_min_size_recalc : 1; unsigned char swallowed : 1; +//#if HAVE_ECORE_X + unsigned char accepts_xdnd : 1; + + char **xdnd_files; + int xdnd_files_num; +//#endif }; Etk_Type *etk_widget_type_get(); @@ -255,6 +263,13 @@ void etk_widget_clip_unset(Etk_Widget *widget); Evas_Object *etk_widget_clip_get(Etk_Widget *widget); +//#if HAVE_ECORE_X +void etk_widget_xdnd_set(Etk_Widget *widget, Etk_Bool on); +Etk_Bool etk_widget_xdnd_get(Etk_Widget *widget); +const char **etk_widget_xdnd_files_get(Etk_Widget *e, int *num_files); +void etk_widget_drag_drop(Etk_Widget *widget); +//#endif + /** @} */ #endif =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_window.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -3 -r1.9 -r1.10 --- etk_window.c 15 Jan 2006 11:07:17 -0000 1.9 +++ etk_window.c 8 Feb 2006 12:49:38 -0000 1.10 @@ -1,6 +1,7 @@ /** @file etk_window.c */ #include "etk_window.h" #include <stdlib.h> +#include <string.h> #include <Ecore_X.h> #include <Ecore_X_Cursor.h> #include "etk_main.h" @@ -447,6 +448,22 @@ return ETK_TRUE; } +#if HAVE_ECORE_X +/** + * @brief A utility function to use as a callback for the "delete_event" signal. It will hide the window and return ETK_TRUE to prevent the program to quit + * @param window the window to hide + * @param data the data passed when the signal is emitted - unused + * @return Return ETK_TRUE so the the program won't quit + */ +void etk_window_xdnd_aware_set(Etk_Window *window, Etk_Bool on) +{ + if(on) + ecore_x_dnd_aware_set(window->x_window, 1); + else + ecore_x_dnd_aware_set(window->x_window, 0); +} +#endif + /************************** * * Etk specific functions @@ -463,6 +480,25 @@ window->ecore_evas = ecore_evas_software_x11_new(NULL, 0, 0, 0, 0, 0); window->x_window = ecore_evas_software_x11_window_get(window->ecore_evas); + +#if HAVE_ECORE_X + { + const char *types[] = { "*" }; + char **drop_types; + int i; + + ecore_x_dnd_aware_set(window->x_window, 1); + + drop_types = calloc(1, sizeof(char *)); + + for (i = 0; i < 1; i++) + drop_types[i] = strdup(types[i]); + + ecore_x_dnd_types_set(window->x_window, drop_types , 1); + } + +#endif + ETK_TOPLEVEL_WIDGET(window)->evas = ecore_evas_get(window->ecore_evas); ETK_TOPLEVEL_WIDGET(window)->pointer_set = _etk_window_pointer_set; ETK_TOPLEVEL_WIDGET(window)->geometry_get = _etk_window_toplevel_geometry_get; |
From: <enl...@li...> - 2006-02-08 12:50:15
|
Enlightenment CVS committal Author : codewarrior Project : e17 Module : proto Dir : e17/proto/etk/data/themes/default/images Modified Files: images.edc Added Files: spinner_button_down1.png spinner_button_down2.png spinner_button_up1.png spinner_button_up2.png Log Message: - add skeleton for spin button widget (doesnt work yet!) - add xdnd drop support per widget - see test. =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/data/themes/default/images/images.edc,v retrieving revision 1.16 retrieving revision 1.17 diff -u -3 -r1.16 -r1.17 --- images.edc 26 Dec 2005 15:11:49 -0000 1.16 +++ images.edc 8 Feb 2006 12:49:38 -0000 1.17 @@ -41,6 +41,10 @@ image: "scrollbar_vdrag2.png" COMP; image: "scrollbar_hdrag_thumb.png" COMP; image: "scrollbar_vdrag_thumb.png" COMP; + image: "spinner_button_up1.png" COMP; + image: "spinner_button_up2.png" COMP; + image: "spinner_button_down1.png" COMP; + image: "spinner_button_down2.png" COMP; image: "tree.png" COMP; image: "tree_header_inactive.png" COMP; image: "tree_header_active.png" COMP; |
From: <enl...@li...> - 2006-02-08 12:50:17
|
Enlightenment CVS committal Author : codewarrior Project : e17 Module : proto Dir : e17/proto/etk/src/bin Modified Files: Makefile.am etk_button_test.c etk_test.c etk_test.h Added Files: etk_spin_button_test.c etk_xdnd_test.c Log Message: - add skeleton for spin button widget (doesnt work yet!) - add xdnd drop support per widget - see test. =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/bin/Makefile.am,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- Makefile.am 19 Jan 2006 13:56:10 -0000 1.8 +++ Makefile.am 8 Feb 2006 12:49:38 -0000 1.9 @@ -33,7 +33,9 @@ etk_menu_test.c \ etk_filechooser_test.c \ etk_notebook_test.c \ -etk_progress_bar_test.c +etk_progress_bar_test.c \ +etk_spin_button_test.c \ +etk_xdnd_test.c etk_test_LDADD = $(top_builddir)/src/lib/libetk.la \ @ecore_libs@ @evas_libs@ @edje_libs@ =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/bin/etk_button_test.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- etk_button_test.c 15 Jan 2006 11:07:16 -0000 1.6 +++ etk_button_test.c 8 Feb 2006 12:49:38 -0000 1.7 @@ -2,6 +2,22 @@ #include "config.h" /* Creates the window for the button test */ + +static void _etk_test_button_drag_drop_cb(Etk_Object *object, void *data) +{ + int num_files, i; + char **files; + + files = etk_widget_xdnd_files_get(ETK_WIDGET(object), &num_files); + printf("Our test widget got a drop with %d files\n", num_files); + + for (i = 0; i < num_files; i++) + { + printf("Widget got: file: %s\n", files[i]); + } +} + + void etk_test_button_window_create(void *data) { static Etk_Widget *win = NULL; @@ -50,6 +66,8 @@ etk_box_pack_start(ETK_BOX(vbox), button_radio, ETK_FALSE, ETK_FALSE, 0); button_toggle = etk_toggle_button_new_with_label(_("Toggle button")); + etk_widget_xdnd_set(button_toggle, ETK_TRUE); + etk_signal_connect("drag_drop", ETK_OBJECT(button_toggle), ETK_CALLBACK(_etk_test_button_drag_drop_cb), button_toggle); etk_box_pack_start(ETK_BOX(vbox), button_toggle, ETK_FALSE, ETK_FALSE, 0); button_toggle = etk_toggle_button_new(); =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/bin/etk_test.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -3 -r1.12 -r1.13 --- etk_test.c 19 Jan 2006 13:56:10 -0000 1.12 +++ etk_test.c 8 Feb 2006 12:49:38 -0000 1.13 @@ -60,6 +60,14 @@ { "Progress Bar", etk_test_progress_bar_window_create + }, + { + "Spin Button", + etk_test_spin_button_window_create + }, + { + "X Drag / Drop", + etk_test_xdnd_window_create } }; static int num_tests = sizeof(tests) / sizeof (tests[0]); =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/bin/etk_test.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -3 -r1.9 -r1.10 --- etk_test.h 19 Jan 2006 13:56:10 -0000 1.9 +++ etk_test.h 8 Feb 2006 12:49:38 -0000 1.10 @@ -24,5 +24,7 @@ void etk_test_filechooser_window_create(void *data); void etk_test_notebook_window_create(void *data); void etk_test_progress_bar_window_create(void *data); +void etk_test_spin_button_window_create(void *data); +void etk_test_xdnd_window_create(void *data); #endif |
From: <enl...@li...> - 2006-02-08 12:50:17
|
Enlightenment CVS committal Author : codewarrior Project : e17 Module : proto Dir : e17/proto/etk Modified Files: configure.in Log Message: - add skeleton for spin button widget (doesnt work yet!) - add xdnd drop support per widget - see test. =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/configure.in,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- configure.in 15 Jan 2006 11:07:11 -0000 1.6 +++ configure.in 8 Feb 2006 12:49:37 -0000 1.7 @@ -180,6 +180,23 @@ fi ##################################################################### +## Ecore_X +AC_CHECK_HEADER(Ecore_X.h, [ ecore_x_includes="yes" ]) +AC_CHECK_LIB(ecore_x, ecore_x_init, ecore_x_libs="yes", ecore_x_libs="no") +if test "x{ecore_x_includes}" != "xno" -a "x${ecore_x_includes}" != "x"; then + if test "x{ecore_x_libs}" != "xno" -a "x${ecore_x_libs}" != "x"; then + have_ecore_x="yes" + AC_DEFINE(HAVE_ECORE_X, 1, [Define to 1 if you have the Ecore_X headers and libraries]) + else + have_ecore_x="no" + AC_DEFINE(HAVE_ECORE_X, 0, [Define to 1 if you have the Ecore_X headers and libraries]) + fi +else + have_ecore_x="no" + AC_DEFINE(HAVE_ECORE_X, 0, [Define to 1 if you have the Ecore_X headers and libraries]) +fi + +##################################################################### ## Gettext ALL_LINGUAS="fr" AC_SUBST(ALL_LINGUAS) @@ -251,6 +268,13 @@ echo "$PACKAGE $VERSION" echo "------------------------------------------------------------------------" echo +echo +echo "Configuration Options Summary:" +echo +echo " Ecore_X support..............: $have_ecore_x" +echo +echo "Installation Path.........: $prefix" +echo echo "Now type 'make' ('gmake' on some systems) to compile $PACKAGE," echo "and then afterwards as root (or the user who will install this), type" echo "'make install'. Change users with 'su' or 'sudo' appropriately." |
From: <enl...@li...> - 2006-02-08 12:50:17
|
Enlightenment CVS committal Author : codewarrior Project : e17 Module : proto Dir : e17/proto/etk/data/themes/default Modified Files: default.edc Log Message: - add skeleton for spin button widget (doesnt work yet!) - add xdnd drop support per widget - see test. =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/data/themes/default/default.edc,v retrieving revision 1.12 retrieving revision 1.13 diff -u -3 -r1.12 -r1.13 --- default.edc 19 Jan 2006 13:56:09 -0000 1.12 +++ default.edc 8 Feb 2006 12:49:37 -0000 1.13 @@ -22,5 +22,6 @@ #include "widgets/menu.edc" #include "widgets/statusbar.edc" #include "widgets/notebook.edc" - #include "widgets/progress_bar.edc" + #include "widgets/progress_bar.edc" + #include "widgets/spinner.edc" } |
From: <enl...@li...> - 2006-02-09 01:52:29
|
Enlightenment CVS committal Author : codewarrior Project : e17 Module : proto Dir : e17/proto/etk/src/lib Modified Files: etk_main.c etk_widget.c etk_widget.h Log Message: - per widget drag_motion events - per widget drag_leave events - make dnd widget search faster =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_main.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -3 -r1.11 -r1.12 --- etk_main.c 8 Feb 2006 12:49:38 -0000 1.11 +++ etk_main.c 9 Feb 2006 01:52:19 -0000 1.12 @@ -33,13 +33,15 @@ static int _etk_xdnd_drop_handler(void *data, int type, void *event); static int _etk_xdnd_leave_handler(void *data, int type, void *event); static int _etk_xdnd_selection_handler(void *data, int type, void *event); + +static Etk_Widget *_etk_dnd_widget = NULL; +Evas_List *_etk_dnd_widgets = NULL; #endif static Evas_List *_etk_main_toplevel_widgets = NULL; static Etk_Bool _etk_main_running = ETK_FALSE; static Etk_Bool _etk_main_initialized = ETK_FALSE; static Ecore_Job *_etk_main_iterate_job = NULL; -static Etk_Widget *_etk_dnd_widget = NULL; /************************** * @@ -247,49 +249,42 @@ #if HAVE_ECORE_X #define E_INSIDE(x, y, xx, yy, ww, hh) (((x) < ((xx) + (ww))) && ((y) < ((yy) + (hh))) && ((x) >= (xx)) && ((y) >= (yy))) -static int _etk_xdnd_enter_handler(void *data, int type, void *event) -{ - Ecore_X_Event_Xdnd_Enter *ev; - int i; - - /* printf("enter\n"); */ - ev = event; - /* - for (i = 0; i < ev->num_types; i++) - printf("type: %s\n", ev->types[i]); - */ - return 1; -} /* Search the container recursively for the widget that accepts xdnd */ -static void _etk_xdnd_container_get_widgets_at(Etk_Container *cont, int x, int y, int offx, int offy, Evas_List **list) +static void _etk_xdnd_container_get_widgets_at(Etk_Toplevel_Widget *top, int x, int y, int offx, int offy, Evas_List **list) { - Evas_List *child; + Evas_List *l; - for(child = etk_container_children_get(cont); child; child = child->next) + for(l = _etk_dnd_widgets; l; l = l->next) { Etk_Widget *widget; - if(!(widget = ETK_WIDGET(child->data))) + if(!(widget = ETK_WIDGET(l->data))) continue; if(E_INSIDE(x, y, widget->inner_geometry.x + offx, widget->inner_geometry.y + offy, widget->inner_geometry.w, - widget->inner_geometry.h)) - { - if(widget->accepts_xdnd) - { - *list = evas_list_append(*list, widget); - } - - if(ETK_IS_CONTAINER(widget)) - _etk_xdnd_container_get_widgets_at(ETK_CONTAINER(widget), x, y, offx, offy, list); - } + widget->inner_geometry.h)) + *list = evas_list_append(*list, widget); } } +static int _etk_xdnd_enter_handler(void *data, int type, void *event) +{ + Ecore_X_Event_Xdnd_Enter *ev; + int i; + + ev = event; + +// printf("enter window!\n"); +// for (i = 0; i < ev->num_types; i++) +// printf("type: %s\n", ev->types[i]); + + return 1; +} + static int _etk_xdnd_position_handler(void *data, int type, void *event) { Ecore_X_Event_Xdnd_Position *ev; @@ -297,13 +292,13 @@ Evas_List *l; Evas_List *children = NULL; Etk_Widget *widget; + int x = 0, y = 0; + ev = event; /* loop top level widgets (windows) */ for(l = _etk_main_toplevel_widgets; l; l = l->next) - { - int x, y; - + { if (!(window = ETK_WINDOW(l->data))) continue; @@ -312,15 +307,30 @@ continue; ecore_evas_geometry_get(window->ecore_evas, &x, &y, NULL, NULL); - + /* find the widget we want to drop on */ - _etk_xdnd_container_get_widgets_at(ETK_CONTAINER(window), ev->position.x, ev->position.y, x, y, &children); - } + _etk_xdnd_container_get_widgets_at(ETK_TOPLEVEL_WIDGET(window), ev->position.x, ev->position.y, x, y, &children); + + /* check if we're leaving a widget */ + if(_etk_dnd_widget) + { + if(!E_INSIDE(ev->position.x, ev->position.y, + _etk_dnd_widget->geometry.x + x, _etk_dnd_widget->geometry.y + y, + _etk_dnd_widget->geometry.w, _etk_dnd_widget->geometry.h)) + { + etk_widget_drag_leave(_etk_dnd_widget); + _etk_dnd_widget = NULL; + } + } + + break; + } /* if we found a widget, emit signals */ if(children != NULL) - { + { Ecore_X_Rectangle rect; + widget = (evas_list_last(children))->data; _etk_dnd_widget = widget; /* TODO: filter types according to what widget wants */ @@ -329,6 +339,8 @@ rect.width = widget->inner_geometry.w; rect.height = widget->inner_geometry.h; ecore_x_dnd_send_status(1, 1, rect, ECORE_X_DND_ACTION_PRIVATE); + + etk_widget_drag_motion(widget); } return 1; @@ -340,14 +352,15 @@ /* printf("drop\n"); */ ev = event; - + ecore_x_selection_xdnd_request(ev->win, "text/uri-list"); return 1; } static int _etk_xdnd_leave_handler(void *data, int type, void *event) { - /* printf("leave\n"); */ + //printf("leave window\n"); + return 1; } @@ -360,7 +373,7 @@ Ecore_X_Selection_Data_Targets *targets; int i; - /* printf("selection\n"); */ + //printf("selection\n"); ev = event; switch (ev->selection) { @@ -425,7 +438,7 @@ case ECORE_X_SELECTION_CLIPBOARD: if (!strcmp(ev->target, ECORE_X_SELECTION_TARGET_TARGETS)) { - printf("clipboard: %s\n", ev->target); + //printf("clipboard: %s\n", ev->target); targets = ev->data; /* for (i = 0; i < targets->num_targets; i++) =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_widget.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -3 -r1.19 -r1.20 --- etk_widget.c 8 Feb 2006 12:49:38 -0000 1.19 +++ etk_widget.c 9 Feb 2006 01:52:20 -0000 1.20 @@ -20,6 +20,8 @@ * @{ */ +extern Evas_List *_etk_dnd_widgets; + typedef struct _Etk_Widget_Smart_Data { Etk_Widget *widget; @@ -62,6 +64,8 @@ ETK_WIDGET_UNFOCUS_SIGNAL, ETK_WIDGET_SCROLL_SIZE_CHANGED_SIGNAL, ETK_WIDGET_DRAG_DROP_SIGNAL, + ETK_WIDGET_DRAG_MOTION_SIGNAL, + ETK_WIDGET_DRAG_LEAVE_SIGNAL, ETK_WIDGET_NUM_SIGNALS }; @@ -93,6 +97,8 @@ static void _etk_widget_focus_handler(Etk_Widget *widget); static void _etk_widget_unfocus_handler(Etk_Widget *widget); static void _etk_widget_drag_drop_handler(Etk_Widget *widget); +static void _etk_widget_drag_motion_handler(Etk_Widget *widget); +static void _etk_widget_drag_leave_handler(Etk_Widget *widget); static void _etk_widget_mouse_in_cb(void *data, Evas *evas, Evas_Object *object, void *event_info); static void _etk_widget_signal_mouse_in_cb(Etk_Object *object, Etk_Event_Mouse_In_Out *event, void *data); @@ -171,6 +177,8 @@ _etk_widget_signals[ETK_WIDGET_UNFOCUS_SIGNAL] = etk_signal_new("unfocus", widget_type, ETK_MEMBER_OFFSET(Etk_Widget, unfocus), etk_marshaller_VOID__VOID, NULL, NULL); _etk_widget_signals[ETK_WIDGET_SCROLL_SIZE_CHANGED_SIGNAL] = etk_signal_new("scroll_size_changed", widget_type, -1, etk_marshaller_VOID__VOID, NULL, NULL); _etk_widget_signals[ETK_WIDGET_DRAG_DROP_SIGNAL] = etk_signal_new("drag_drop", widget_type, ETK_MEMBER_OFFSET(Etk_Widget, drag_drop),etk_marshaller_VOID__VOID, NULL, NULL); + _etk_widget_signals[ETK_WIDGET_DRAG_MOTION_SIGNAL] = etk_signal_new("drag_motion", widget_type, ETK_MEMBER_OFFSET(Etk_Widget, drag_motion),etk_marshaller_VOID__VOID, NULL, NULL); + _etk_widget_signals[ETK_WIDGET_DRAG_LEAVE_SIGNAL] = etk_signal_new("drag_leave", widget_type, ETK_MEMBER_OFFSET(Etk_Widget, drag_leave),etk_marshaller_VOID__VOID, NULL, NULL); etk_type_property_add(widget_type, "name", ETK_WIDGET_NAME_PROPERTY, ETK_PROPERTY_STRING, ETK_PROPERTY_READABLE_WRITABLE, etk_property_value_string(NULL)); etk_type_property_add(widget_type, "parent", ETK_WIDGET_PARENT_PROPERTY, ETK_PROPERTY_POINTER, ETK_PROPERTY_READABLE_WRITABLE, etk_property_value_pointer(NULL)); @@ -1411,6 +1419,28 @@ etk_signal_emit(_etk_widget_signals[ETK_WIDGET_DRAG_DROP_SIGNAL], ETK_OBJECT(widget), NULL); } +/** + * @brief Sends the "drag_motion" signal + * @param widget a widget + */ +void etk_widget_drag_motion(Etk_Widget *widget) +{ + if (!widget) + return; + etk_signal_emit(_etk_widget_signals[ETK_WIDGET_DRAG_MOTION_SIGNAL], ETK_OBJECT(widget), NULL); +} + +/** + * @brief Sends the "drag_motion" signal + * @param widget a widget + */ +void etk_widget_drag_leave(Etk_Widget *widget) +{ + if (!widget) + return; + etk_signal_emit(_etk_widget_signals[ETK_WIDGET_DRAG_LEAVE_SIGNAL], ETK_OBJECT(widget), NULL); +} + #endif /************************** @@ -1447,6 +1477,8 @@ widget->focus = _etk_widget_focus_handler; widget->unfocus = _etk_widget_unfocus_handler; widget->drag_drop = _etk_widget_drag_drop_handler; + widget->drag_motion = _etk_widget_drag_motion_handler; + widget->drag_leave = _etk_widget_drag_leave_handler; widget->left_inset = 0; widget->right_inset = 0; @@ -1664,6 +1696,22 @@ etk_widget_theme_object_signal_emit(widget, "drag_drop"); } +/* Default handler for the "drag_motion" signal */ +static void _etk_widget_drag_motion_handler(Etk_Widget *widget) +{ + if (!widget) + return; + etk_widget_theme_object_signal_emit(widget, "drag_motion"); +} + +/* Default handler for the "drag_leave" signal */ +static void _etk_widget_drag_leave_handler(Etk_Widget *widget) +{ + if (!widget) + return; + etk_widget_theme_object_signal_emit(widget, "drag_leave"); +} + /* Sets the widget as visible and queues a visibility update */ static void _etk_widget_show_handler(Etk_Widget *widget) @@ -1962,9 +2010,15 @@ void etk_widget_xdnd_set(Etk_Widget *widget, Etk_Bool on) { if(on) - widget->accepts_xdnd = 1; + { + widget->accepts_xdnd = 1; + _etk_dnd_widgets = evas_list_append(_etk_dnd_widgets, widget); + } else - widget->accepts_xdnd = 0; + { + widget->accepts_xdnd = 0; + _etk_dnd_widgets = evas_list_remove(_etk_dnd_widgets, widget); + } } Etk_Bool etk_widget_xdnd_get(Etk_Widget *widget) @@ -1982,7 +2036,7 @@ if(num_files) *num_files = widget->xdnd_files_num; - return widget->xdnd_files; + return (const char **)widget->xdnd_files; } #endif =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_widget.h,v retrieving revision 1.13 retrieving revision 1.14 diff -u -3 -r1.13 -r1.14 --- etk_widget.h 8 Feb 2006 12:49:38 -0000 1.13 +++ etk_widget.h 9 Feb 2006 01:52:21 -0000 1.14 @@ -167,6 +167,8 @@ void (*scroll_margins_get)(Etk_Widget *widget, Etk_Size *margin_size); void (*scroll)(Etk_Widget *widget, int x, int y); void (*drag_drop)(Etk_Widget *widget); + void (*drag_motion)(Etk_Widget *widget); + void (*drag_leave)(Etk_Widget *widget); void (*show)(Etk_Widget *widget); void (*enter)(Etk_Widget *widget); @@ -268,6 +270,8 @@ Etk_Bool etk_widget_xdnd_get(Etk_Widget *widget); const char **etk_widget_xdnd_files_get(Etk_Widget *e, int *num_files); void etk_widget_drag_drop(Etk_Widget *widget); +void etk_widget_drag_motion(Etk_Widget *widget); +void etk_widget_drag_leave(Etk_Widget *widget); //#endif /** @} */ |
From: <enl...@li...> - 2006-02-09 22:41:30
|
Enlightenment CVS committal Author : codewarrior Project : e17 Module : proto Dir : e17/proto/etk/src/lib Modified Files: Etk.h Makefile.am etk_main.c etk_types.h etk_widget.c etk_widget.h Added Files: etk_dnd.c etk_dnd.h Log Message: create new files for xdnd stuff and implement paste support for selections. =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/Etk.h,v retrieving revision 1.17 retrieving revision 1.18 diff -u -3 -r1.17 -r1.18 --- Etk.h 8 Feb 2006 12:49:38 -0000 1.17 +++ Etk.h 9 Feb 2006 22:41:20 -0000 1.18 @@ -58,5 +58,6 @@ #include "etk_notebook.h" #include "etk_progress_bar.h" #include "etk_spin_button.h" +#include "etk_dnd.h" #endif =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/Makefile.am,v retrieving revision 1.20 retrieving revision 1.21 diff -u -3 -r1.20 -r1.21 --- Makefile.am 8 Feb 2006 12:49:38 -0000 1.20 +++ Makefile.am 9 Feb 2006 22:41:20 -0000 1.21 @@ -41,7 +41,8 @@ etk_filechooser_widget.h \ etk_notebook.h \ etk_progress_bar.h \ -etk_spin_button.h +etk_spin_button.h \ +etk_dnd.h libetk_la_SOURCES = \ etk_main.c etk_utils.c \ @@ -70,6 +71,7 @@ etk_notebook.c \ etk_progress_bar.c \ etk_spin_button.c \ +etk_dnd.c \ $(ETKHEADERS) installed_headersdir = $(prefix)/include/etk =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_main.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -3 -r1.12 -r1.13 --- etk_main.c 9 Feb 2006 01:52:19 -0000 1.12 +++ etk_main.c 9 Feb 2006 22:41:20 -0000 1.13 @@ -1,5 +1,6 @@ /** @file etk_main.c */ #include "etk_main.h" +#include "etk_dnd.h" #include <locale.h> #include <string.h> #include <stdlib.h> @@ -27,18 +28,9 @@ static void _etk_main_size_request_recursive(Etk_Widget *widget); static void _etk_main_size_allocate_recursive(Etk_Widget *widget, Etk_Bool is_top_level); -#if HAVE_ECORE_X -static int _etk_xdnd_enter_handler(void *data, int type, void *event); -static int _etk_xdnd_position_handler(void *data, int type, void *event); -static int _etk_xdnd_drop_handler(void *data, int type, void *event); -static int _etk_xdnd_leave_handler(void *data, int type, void *event); -static int _etk_xdnd_selection_handler(void *data, int type, void *event); - -static Etk_Widget *_etk_dnd_widget = NULL; -Evas_List *_etk_dnd_widgets = NULL; -#endif +/* we need this in etk_dnd */ +Evas_List *_etk_main_toplevel_widgets = NULL; -static Evas_List *_etk_main_toplevel_widgets = NULL; static Etk_Bool _etk_main_running = ETK_FALSE; static Etk_Bool _etk_main_initialized = ETK_FALSE; static Ecore_Job *_etk_main_iterate_job = NULL; @@ -80,9 +72,9 @@ } #if HAVE_ECORE_X - if (!ecore_x_init(NULL)) + if (!etk_dnd_init()) { - ETK_WARNING("Ecore_X initialzation failed!"); + ETK_WARNING("Etk_dnd and Ecore_X initialzation failed!"); return ETK_FALSE; } #endif @@ -93,14 +85,6 @@ setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); - -#if HAVE_ECORE_X - ecore_event_handler_add(ECORE_X_EVENT_XDND_ENTER, _etk_xdnd_enter_handler, NULL); - ecore_event_handler_add(ECORE_X_EVENT_XDND_POSITION, _etk_xdnd_position_handler, NULL); - ecore_event_handler_add(ECORE_X_EVENT_XDND_DROP, _etk_xdnd_drop_handler, NULL); - ecore_event_handler_add(ECORE_X_EVENT_XDND_LEAVE, _etk_xdnd_leave_handler, NULL); - ecore_event_handler_add(ECORE_X_EVENT_SELECTION_NOTIFY, _etk_xdnd_selection_handler, NULL); -#endif _etk_main_initialized = ETK_TRUE; return ETK_TRUE; @@ -116,6 +100,7 @@ etk_signal_shutdown(); etk_type_shutdown(); etk_theme_shutdown(); + etk_dnd_shutdown(); edje_shutdown(); ecore_evas_shutdown(); ecore_shutdown(); @@ -246,216 +231,4 @@ } } - -#if HAVE_ECORE_X -#define E_INSIDE(x, y, xx, yy, ww, hh) (((x) < ((xx) + (ww))) && ((y) < ((yy) + (hh))) && ((x) >= (xx)) && ((y) >= (yy))) - -/* 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) -{ - Evas_List *l; - - for(l = _etk_dnd_widgets; l; l = l->next) - { - Etk_Widget *widget; - - if(!(widget = ETK_WIDGET(l->data))) - continue; - - if(E_INSIDE(x, y, - widget->inner_geometry.x + offx, - widget->inner_geometry.y + offy, - widget->inner_geometry.w, - widget->inner_geometry.h)) - *list = evas_list_append(*list, widget); - } -} - -static int _etk_xdnd_enter_handler(void *data, int type, void *event) -{ - Ecore_X_Event_Xdnd_Enter *ev; - int i; - - ev = event; - -// printf("enter window!\n"); -// for (i = 0; i < ev->num_types; i++) -// printf("type: %s\n", ev->types[i]); - - return 1; -} - -static int _etk_xdnd_position_handler(void *data, int type, void *event) -{ - Ecore_X_Event_Xdnd_Position *ev; - Etk_Window *window; - Evas_List *l; - Evas_List *children = NULL; - Etk_Widget *widget; - int x = 0, y = 0; - - ev = event; - - /* loop top level widgets (windows) */ - for(l = _etk_main_toplevel_widgets; l; l = l->next) - { - if (!(window = ETK_WINDOW(l->data))) - continue; - - /* if this isnt the active window, dont waste time */ - if(ev->win != window->x_window) - continue; - - ecore_evas_geometry_get(window->ecore_evas, &x, &y, NULL, NULL); - - /* find the widget we want to drop on */ - _etk_xdnd_container_get_widgets_at(ETK_TOPLEVEL_WIDGET(window), ev->position.x, ev->position.y, x, y, &children); - - /* check if we're leaving a widget */ - if(_etk_dnd_widget) - { - if(!E_INSIDE(ev->position.x, ev->position.y, - _etk_dnd_widget->geometry.x + x, _etk_dnd_widget->geometry.y + y, - _etk_dnd_widget->geometry.w, _etk_dnd_widget->geometry.h)) - { - etk_widget_drag_leave(_etk_dnd_widget); - _etk_dnd_widget = NULL; - } - } - - break; - } - - /* if we found a widget, emit signals */ - if(children != NULL) - { - Ecore_X_Rectangle rect; - - widget = (evas_list_last(children))->data; - _etk_dnd_widget = widget; - /* TODO: filter types according to what widget wants */ - rect.x = widget->inner_geometry.x; - rect.y = widget->inner_geometry.y; - rect.width = widget->inner_geometry.w; - rect.height = widget->inner_geometry.h; - ecore_x_dnd_send_status(1, 1, rect, ECORE_X_DND_ACTION_PRIVATE); - - etk_widget_drag_motion(widget); - } - - return 1; -} - -static int _etk_xdnd_drop_handler(void *data, int type, void *event) -{ - Ecore_X_Event_Xdnd_Drop *ev; - - /* printf("drop\n"); */ - ev = event; - - ecore_x_selection_xdnd_request(ev->win, "text/uri-list"); - return 1; -} - -static int _etk_xdnd_leave_handler(void *data, int type, void *event) -{ - //printf("leave window\n"); - - return 1; -} - -static int _etk_xdnd_selection_handler(void *data, int type, void *event) -{ - Ecore_X_Event_Selection_Notify *ev; - Ecore_X_Selection_Data *sel; - Ecore_X_Selection_Data_Files *files; - Ecore_X_Selection_Data_Text *text; - Ecore_X_Selection_Data_Targets *targets; - int i; - - //printf("selection\n"); - ev = event; - switch (ev->selection) - { - case ECORE_X_SELECTION_PRIMARY: - if (!strcmp(ev->target, ECORE_X_SELECTION_TARGET_TARGETS)) - { - /* printf("primary: %s\n", ev->target); */ - targets = ev->data; - /* - for (i = 0; i < targets->num_targets; i++) - printf("target: %s\n", targets->targets[i]); - */ - } - else - { - text = ev->data; - /* printf("primary: %s %s\n", ev->target, text->text); */ - } - break; - - case ECORE_X_SELECTION_SECONDARY: - sel = ev->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) - break; - - /* free old data, should this be done here? */ - for (i = 0; i < _etk_dnd_widget->xdnd_files_num; i++) - { - if(_etk_dnd_widget->xdnd_files[i]) - free(_etk_dnd_widget->xdnd_files[i]); - } - - if(_etk_dnd_widget->xdnd_files) - free(_etk_dnd_widget->xdnd_files); - - _etk_dnd_widget->xdnd_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->xdnd_files_num = files->num_files; - for (i = 0; i < files->num_files; i++) - { - /* printf("file: %s\n", files->files[i]); */ - _etk_dnd_widget->xdnd_files[i] = strdup(files->files[i]); - } - - /* emit the drop signal so the widget can react */ - etk_widget_drag_drop(_etk_dnd_widget); - - ecore_x_dnd_send_finished(); - break; - - case ECORE_X_SELECTION_CLIPBOARD: - if (!strcmp(ev->target, ECORE_X_SELECTION_TARGET_TARGETS)) - { - //printf("clipboard: %s\n", ev->target); - targets = ev->data; - /* - for (i = 0; i < targets->num_targets; i++) - printf("target: %s\n", targets->targets[i]); - */ - } - else - { - text = ev->data; - /* printf("clipboard: %s %s\n", ev->target, text->text); */ - } - break; - } - - return 1; -} - -#endif - /** @} */ =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_types.h,v retrieving revision 1.23 retrieving revision 1.24 diff -u -3 -r1.23 -r1.24 --- etk_types.h 8 Feb 2006 12:49:38 -0000 1.23 +++ etk_types.h 9 Feb 2006 22:41:20 -0000 1.24 @@ -106,6 +106,8 @@ typedef struct _Etk_Progress_Bar Etk_Progress_Bar; typedef enum _Etk_Progress_Bar_Orientation Etk_Progress_Bar_Orientation; typedef struct _Etk_Spin_Button Etk_Spin_Button; +typedef struct _Etk_Event_Selection_Get Etk_Event_Selection_Get; +typedef struct _Etk_Selection_Data_Targets Etk_Selection_Data_Targets; /** * @enum Etk_Fill_Policy_Flags =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_widget.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -3 -r1.20 -r1.21 --- etk_widget.c 9 Feb 2006 01:52:20 -0000 1.20 +++ etk_widget.c 9 Feb 2006 22:41:20 -0000 1.21 @@ -13,6 +13,7 @@ #include "etk_marshallers.h" #include "etk_signal.h" #include "etk_signal_callback.h" +#include "etk_dnd.h" #include "config.h" /** @@ -63,9 +64,12 @@ ETK_WIDGET_FOCUS_SIGNAL, ETK_WIDGET_UNFOCUS_SIGNAL, ETK_WIDGET_SCROLL_SIZE_CHANGED_SIGNAL, +#if HAVE_ECORE_X ETK_WIDGET_DRAG_DROP_SIGNAL, ETK_WIDGET_DRAG_MOTION_SIGNAL, - ETK_WIDGET_DRAG_LEAVE_SIGNAL, + ETK_WIDGET_DRAG_LEAVE_SIGNAL, + ETK_WIDGET_SELECTION_GET_SIGNAL, +#endif ETK_WIDGET_NUM_SIGNALS }; @@ -176,9 +180,12 @@ _etk_widget_signals[ETK_WIDGET_FOCUS_SIGNAL] = etk_signal_new("focus", widget_type, ETK_MEMBER_OFFSET(Etk_Widget, focus), etk_marshaller_VOID__VOID, NULL, NULL); _etk_widget_signals[ETK_WIDGET_UNFOCUS_SIGNAL] = etk_signal_new("unfocus", widget_type, ETK_MEMBER_OFFSET(Etk_Widget, unfocus), etk_marshaller_VOID__VOID, NULL, NULL); _etk_widget_signals[ETK_WIDGET_SCROLL_SIZE_CHANGED_SIGNAL] = etk_signal_new("scroll_size_changed", widget_type, -1, etk_marshaller_VOID__VOID, NULL, NULL); - _etk_widget_signals[ETK_WIDGET_DRAG_DROP_SIGNAL] = etk_signal_new("drag_drop", widget_type, ETK_MEMBER_OFFSET(Etk_Widget, drag_drop),etk_marshaller_VOID__VOID, NULL, NULL); - _etk_widget_signals[ETK_WIDGET_DRAG_MOTION_SIGNAL] = etk_signal_new("drag_motion", widget_type, ETK_MEMBER_OFFSET(Etk_Widget, drag_motion),etk_marshaller_VOID__VOID, NULL, NULL); - _etk_widget_signals[ETK_WIDGET_DRAG_LEAVE_SIGNAL] = etk_signal_new("drag_leave", widget_type, ETK_MEMBER_OFFSET(Etk_Widget, drag_leave),etk_marshaller_VOID__VOID, NULL, NULL); +#if HAVE_ECORE_X + _etk_widget_signals[ETK_WIDGET_DRAG_DROP_SIGNAL] = etk_signal_new("drag_drop", widget_type, ETK_MEMBER_OFFSET(Etk_Widget, drag_drop), etk_marshaller_VOID__VOID, NULL, NULL); + _etk_widget_signals[ETK_WIDGET_DRAG_MOTION_SIGNAL] = etk_signal_new("drag_motion", widget_type, ETK_MEMBER_OFFSET(Etk_Widget, drag_motion), etk_marshaller_VOID__VOID, NULL, NULL); + _etk_widget_signals[ETK_WIDGET_DRAG_LEAVE_SIGNAL] = etk_signal_new("drag_leave", widget_type, ETK_MEMBER_OFFSET(Etk_Widget, drag_leave), etk_marshaller_VOID__VOID, NULL, NULL); + _etk_widget_signals[ETK_WIDGET_SELECTION_GET_SIGNAL] = etk_signal_new("selection_get", widget_type, -1, etk_marshaller_VOID__POINTER, NULL, NULL); +#endif etk_type_property_add(widget_type, "name", ETK_WIDGET_NAME_PROPERTY, ETK_PROPERTY_STRING, ETK_PROPERTY_READABLE_WRITABLE, etk_property_value_string(NULL)); etk_type_property_add(widget_type, "parent", ETK_WIDGET_PARENT_PROPERTY, ETK_PROPERTY_POINTER, ETK_PROPERTY_READABLE_WRITABLE, etk_property_value_pointer(NULL)); @@ -1441,6 +1448,20 @@ etk_signal_emit(_etk_widget_signals[ETK_WIDGET_DRAG_LEAVE_SIGNAL], ETK_OBJECT(widget), NULL); } +/** + * @brief Sends the "selection_get" signal + * @param widget a widget + */ +void etk_widget_selection_get(Etk_Widget *widget, Etk_Event_Selection_Get *event) +{ + 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); +} + #endif /************************** @@ -1712,7 +1733,6 @@ etk_widget_theme_object_signal_emit(widget, "drag_leave"); } - /* Sets the widget as visible and queues a visibility update */ static void _etk_widget_show_handler(Etk_Widget *widget) { @@ -2028,7 +2048,7 @@ return ETK_FALSE; } -const char ** etk_widget_xdnd_files_get(Etk_Widget *widget, int *num_files) +const char **etk_widget_xdnd_files_get(Etk_Widget *widget, int *num_files) { if(!widget->accepts_xdnd || widget->xdnd_files == NULL) return NULL; =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_widget.h,v retrieving revision 1.14 retrieving revision 1.15 diff -u -3 -r1.14 -r1.15 --- etk_widget.h 9 Feb 2006 01:52:21 -0000 1.14 +++ etk_widget.h 9 Feb 2006 22:41:20 -0000 1.15 @@ -272,6 +272,8 @@ void etk_widget_drag_drop(Etk_Widget *widget); void etk_widget_drag_motion(Etk_Widget *widget); void etk_widget_drag_leave(Etk_Widget *widget); + +void etk_widget_selection_get(Etk_Widget *widget, Etk_Event_Selection_Get *event); //#endif /** @} */ |
From: <enl...@li...> - 2006-02-09 22:41:56
|
Enlightenment CVS committal Author : codewarrior Project : e17 Module : proto Dir : e17/proto/etk/src/bin Modified Files: etk_xdnd_test.c Log Message: create new files for xdnd stuff and implement paste support for selections. =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/bin/etk_xdnd_test.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- etk_xdnd_test.c 8 Feb 2006 12:49:38 -0000 1.1 +++ etk_xdnd_test.c 9 Feb 2006 22:41:19 -0000 1.2 @@ -18,6 +18,16 @@ } } +static void _etk_test_xdnd_drag_motion_cb(Etk_Object *object, void *data) +{ + printf("You're on top of me!\n"); +} + +static void _etk_test_xdnd_drag_leave_cb(Etk_Object *object, void *data) +{ + printf("You're leaving me!\n"); +} + static void _etk_test_xdnd_drag_drop_cb2(Etk_Object *object, void *data) { int num_files, i; @@ -33,12 +43,26 @@ printf("Widget got: file: %s\n", files[i]); if((image = strstr(files[i], "file://")) != NULL) etk_image_set_from_file(ETK_IMAGE(data), image + strlen("file://")); - } + } +} + +static void _etk_test_xdnd_clipboard_text_request_cb(Etk_Object *object, void *event, void *data) +{ + Etk_Event_Selection_Get *ev; + + ev = event; + etk_label_set(ETK_LABEL(object), (char *)ev->data); } -/* Creates the window for the xdnd test */ +static void _etk_test_xdnd_button_paste_cb(Etk_Object *object, void *data) +{ + Etk_Label *label; + + etk_selection_text_request(ETK_WIDGET(data)); +} +/* Creates the window for the xdnd test */ void etk_test_xdnd_window_create(void *data) { static Etk_Widget *win = NULL; @@ -46,6 +70,7 @@ Etk_Widget *button; Etk_Widget *label; Etk_Widget *image; + Etk_Widget *entry; if (win) { @@ -66,6 +91,8 @@ button = etk_button_new_with_label(_("Drag Any File Onto Me")); etk_widget_xdnd_set(button, ETK_TRUE); etk_signal_connect("drag_drop", ETK_OBJECT(button), ETK_CALLBACK(_etk_test_xdnd_drag_drop_cb), label); + etk_signal_connect("drag_motion", ETK_OBJECT(button), ETK_CALLBACK(_etk_test_xdnd_drag_motion_cb), NULL); + etk_signal_connect("drag_leave", ETK_OBJECT(button), ETK_CALLBACK(_etk_test_xdnd_drag_leave_cb), NULL); etk_box_pack_start(ETK_BOX(vbox), button, ETK_FALSE, ETK_FALSE, 0); etk_box_pack_start(ETK_BOX(vbox), label, ETK_FALSE, ETK_FALSE, 0); @@ -75,9 +102,25 @@ button = etk_button_new_with_label(_("Drag Any Image Onto Me")); etk_widget_xdnd_set(button, ETK_TRUE); etk_signal_connect("drag_drop", ETK_OBJECT(button), ETK_CALLBACK(_etk_test_xdnd_drag_drop_cb2), image); - etk_box_pack_start(ETK_BOX(vbox), button, ETK_FALSE, ETK_FALSE, 0); + etk_box_pack_start(ETK_BOX(vbox), button, ETK_FALSE, ETK_FALSE, 0); + etk_box_pack_start(ETK_BOX(vbox), image, ETK_FALSE, ETK_FALSE, 0); - etk_box_pack_start(ETK_BOX(vbox), image, ETK_FALSE, ETK_FALSE, 0); + label = etk_label_new(""); + etk_signal_connect("selection_get", ETK_OBJECT(label), ETK_CALLBACK(_etk_test_xdnd_clipboard_text_request_cb), NULL); + + button = etk_button_new_with_label(_("Press me to paste text")); + etk_signal_connect("clicked", ETK_OBJECT(button), ETK_CALLBACK(_etk_test_xdnd_button_paste_cb), label); + etk_box_pack_start(ETK_BOX(vbox), button, ETK_FALSE, ETK_FALSE, 0); + etk_box_pack_start(ETK_BOX(vbox), label, ETK_FALSE, ETK_FALSE, 0); +/* + label = etk_label_new(_("Control+V on entry to paste")); + etk_box_pack_start(ETK_BOX(vbox), label, ETK_FALSE, ETK_FALSE, 0); + + entry = etk_entry_new(); + etk_widget_xdnd_set(entry, ETK_TRUE); + etk_signal_connect("drag_drop", ETK_OBJECT(button), ETK_CALLBACK(_etk_test_xdnd_drag_drop_cb), entry); + etk_box_pack_start(ETK_BOX(vbox), label, ETK_FALSE, ETK_FALSE, 0); +*/ etk_widget_show_all(win); } |
From: <enl...@li...> - 2006-02-10 00:59:14
|
Enlightenment CVS committal Author : codewarrior Project : e17 Module : proto Dir : e17/proto/etk/src/bin Modified Files: etk_xdnd_test.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/bin/etk_xdnd_test.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- etk_xdnd_test.c 9 Feb 2006 22:41:19 -0000 1.2 +++ etk_xdnd_test.c 10 Feb 2006 00:59:07 -0000 1.3 @@ -62,6 +62,13 @@ etk_selection_text_request(ETK_WIDGET(data)); } +static void _etk_test_xdnd_button_copy_cb(Etk_Object *object, void *data) +{ + Etk_Label *label; + + etk_selection_text_set(ETK_WIDGET(data), etk_entry_text_get(ETK_ENTRY(data))); +} + /* Creates the window for the xdnd test */ void etk_test_xdnd_window_create(void *data) { @@ -112,15 +119,12 @@ etk_signal_connect("clicked", ETK_OBJECT(button), ETK_CALLBACK(_etk_test_xdnd_button_paste_cb), label); etk_box_pack_start(ETK_BOX(vbox), button, ETK_FALSE, ETK_FALSE, 0); etk_box_pack_start(ETK_BOX(vbox), label, ETK_FALSE, ETK_FALSE, 0); -/* - label = etk_label_new(_("Control+V on entry to paste")); - etk_box_pack_start(ETK_BOX(vbox), label, ETK_FALSE, ETK_FALSE, 0); entry = etk_entry_new(); - etk_widget_xdnd_set(entry, ETK_TRUE); - etk_signal_connect("drag_drop", ETK_OBJECT(button), ETK_CALLBACK(_etk_test_xdnd_drag_drop_cb), entry); - etk_box_pack_start(ETK_BOX(vbox), label, ETK_FALSE, ETK_FALSE, 0); -*/ + button = etk_button_new_with_label(_("Click me to copy text below")); + etk_signal_connect("clicked", ETK_OBJECT(button), ETK_CALLBACK(_etk_test_xdnd_button_copy_cb), entry); + etk_box_pack_start(ETK_BOX(vbox), button, ETK_FALSE, ETK_FALSE, 0); + etk_box_pack_start(ETK_BOX(vbox), entry, ETK_FALSE, ETK_FALSE, 0); etk_widget_show_all(win); } |
From: <enl...@li...> - 2006-02-10 00:59:15
|
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); } |
From: <enl...@li...> - 2006-02-11 22:41:33
|
Enlightenment CVS committal Author : codewarrior Project : e17 Module : proto Dir : e17/proto/exhibit/src/bin Modified Files: exhibit_main.c Log Message: fix spank error =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/exhibit/src/bin/exhibit_main.c,v retrieving revision 1.37 retrieving revision 1.38 diff -u -3 -r1.37 -r1.38 --- exhibit_main.c 24 Jan 2006 22:09:30 -0000 1.37 +++ exhibit_main.c 11 Feb 2006 22:41:25 -0000 1.38 @@ -576,7 +576,8 @@ e = data; ev = event; - evas = ecore_evas_get(ETK_WINDOW(e->win)->ecore_evas); + + evas = ecore_evas_get((ETK_WINDOW(e->win))->ecore_evas); if(evas_key_modifier_is_set(evas_key_modifier_get(evas), "Control")) { |
From: <enl...@li...> - 2006-02-11 23:39:04
|
Enlightenment CVS committal Author : codewarrior Project : e17 Module : proto Dir : e17/proto/exhibit/src/bin Modified Files: exhibit_main.c Log Message: dont go out into evas, everything is available through etk =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/exhibit/src/bin/exhibit_main.c,v retrieving revision 1.38 retrieving revision 1.39 diff -u -3 -r1.38 -r1.39 --- exhibit_main.c 11 Feb 2006 22:41:25 -0000 1.38 +++ exhibit_main.c 11 Feb 2006 23:38:54 -0000 1.39 @@ -572,14 +572,11 @@ { Etk_Event_Key_Up_Down *ev; Exhibit *e; - Evas *evas; - + e = data; ev = event; - evas = ecore_evas_get((ETK_WINDOW(e->win))->ecore_evas); - - if(evas_key_modifier_is_set(evas_key_modifier_get(evas), "Control")) + if(evas_key_modifier_is_set(ev->modifiers, "Control")) { if(!strcmp(ev->key, "t")) { |
From: <enl...@li...> - 2006-02-12 13:13:57
|
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 etk_types.h etk_widget.c etk_widget.h Added Files: etk_clipboard.c etk_clipboard.h Log Message: - seperate selections and clipboard stuff. for now, we have an etk_clipboard_* API that handles text copy / paste. Next up is finished selection support for text, then image/* for clipboard and dnd. =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/Etk.h,v retrieving revision 1.19 retrieving revision 1.20 diff -u -3 -r1.19 -r1.20 --- Etk.h 11 Feb 2006 00:28:32 -0000 1.19 +++ Etk.h 12 Feb 2006 13:13:44 -0000 1.20 @@ -63,5 +63,6 @@ #include "etk_progress_bar.h" #include "etk_spin_button.h" #include "etk_dnd.h" +#include "etk_clipboard.h" #endif =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/Makefile.am,v retrieving revision 1.23 retrieving revision 1.24 diff -u -3 -r1.23 -r1.24 --- Makefile.am 11 Feb 2006 20:35:49 -0000 1.23 +++ Makefile.am 12 Feb 2006 13:13:45 -0000 1.24 @@ -43,7 +43,8 @@ etk_notebook.h \ etk_progress_bar.h \ etk_spin_button.h \ -etk_dnd.h +etk_dnd.h \ +etk_clipboard.h libetk_la_SOURCES = \ etk_main.c etk_utils.c \ @@ -74,6 +75,7 @@ etk_progress_bar.c \ etk_spin_button.c \ etk_dnd.c \ +etk_clipboard.c \ $(ETKHEADERS) installed_headersdir = $(prefix)/include/etk =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_dnd.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- etk_dnd.c 11 Feb 2006 10:27:14 -0000 1.3 +++ etk_dnd.c 12 Feb 2006 13:13:45 -0000 1.4 @@ -20,12 +20,22 @@ * drag_motion: mouse is moving on widget * drag_drop: object dropped on widget * + * selection_received: when our widget gets the selection it has asked for + * (ie, we want to get a selection) + * selection_get: when a request for a selection has been made to our widget + * (ie, someone is getting our selection from us) + * selection_clear_event: the selection has been cleared + * + * clipboard_received: when our widget gets the clipboard data it has asked for + * (ie, we want to get a clipboard's text / image) + * */ #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; + static Etk_Widget *_etk_dnd_widget = NULL; -static Etk_Widget *_etk_selection_widget = NULL; static Evas_List *_etk_dnd_handlers = NULL; #if HAVE_ECORE_X @@ -60,7 +70,7 @@ _etk_dnd_handlers = evas_list_append(_etk_dnd_handlers, ecore_event_handler_add(ECORE_X_EVENT_SELECTION_NOTIFY, _etk_xdnd_selection_handler, NULL)); #endif - return 1; + return ETK_TRUE; } /** @@ -74,35 +84,7 @@ ecore_event_handler_del(_etk_dnd_handlers->data); _etk_dnd_handlers = evas_list_remove(_etk_dnd_handlers, _etk_dnd_handlers->data); } -} - -/* TODO: doc */ -void etk_selection_text_request(Etk_Widget *widget) -{ -#if HAVE_ECORE_X - Ecore_X_Window win; - - if (!widget || !ETK_IS_WINDOW(widget->toplevel_parent)) - return; - - win = ETK_WINDOW(widget->toplevel_parent)->x_window; - _etk_selection_widget = widget; - ecore_x_selection_clipboard_request(win, ECORE_X_SELECTION_TARGET_UTF8_STRING); -#endif -} - -/* TODO: doc */ -void etk_selection_text_set(Etk_Widget *widget, const char *data) -{ -#if HAVE_ECORE_X - Ecore_X_Window win; - - if (!widget || !ETK_IS_WINDOW(widget->toplevel_parent) || !data) - return; - - win = ETK_WINDOW(widget->toplevel_parent)->x_window; - ecore_x_selection_clipboard_set(win, (char *)data, strlen(data) + 1); -#endif +#endif } /************************** @@ -115,6 +97,7 @@ /* 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) { + Evas_List *l; int wx, wy, ww, wh; @@ -316,6 +299,8 @@ case ECORE_X_SELECTION_CLIPBOARD: if (!strcmp(ev->target, ECORE_X_SELECTION_TARGET_TARGETS)) { + /* REDO THIS CODE!!! + Etk_Event_Selection_Get event; Etk_Selection_Data_Targets _targets; @@ -329,16 +314,18 @@ //printf("clipboard: %s\n", ev->target); //for (i = 0; i < targets->num_targets; i++) // printf("target: %s\n", targets->targets[i]); + + */ } else { - Etk_Event_Selection_Get event; + /* emit signal to widget that the clipboard text is sent to it */ + Etk_Event_Selection_Request event; text = ev->data; - //printf("clipboard: %s %s\n", ev->target, text->text); event.data = text->text; event.content = ETK_SELECTION_CONTENT_TEXT; - etk_widget_selection_get(_etk_selection_widget, &event); + etk_widget_clipboard_received(_etk_selection_widget, &event); } break; @@ -350,4 +337,3 @@ } #endif -#endif =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_dnd.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- etk_dnd.h 11 Feb 2006 10:27:14 -0000 1.3 +++ etk_dnd.h 12 Feb 2006 13:13:45 -0000 1.4 @@ -11,7 +11,7 @@ #define ETK_SELECTION_TARGET_UTF8_STRING "UTF8_STRING" #define ETK_SELECTION_TARGET_FILENAME "FILENAME" -struct _Etk_Event_Selection_Get +struct _Etk_Event_Selection_Request { void *data; enum =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_types.h,v retrieving revision 1.25 retrieving revision 1.26 diff -u -3 -r1.25 -r1.26 --- etk_types.h 11 Feb 2006 00:28:35 -0000 1.25 +++ etk_types.h 12 Feb 2006 13:13:45 -0000 1.26 @@ -105,7 +105,7 @@ typedef struct _Etk_Progress_Bar Etk_Progress_Bar; typedef enum _Etk_Progress_Bar_Orientation Etk_Progress_Bar_Orientation; typedef struct _Etk_Spin_Button Etk_Spin_Button; -typedef struct _Etk_Event_Selection_Get Etk_Event_Selection_Get; +typedef struct _Etk_Event_Selection_Request Etk_Event_Selection_Request; typedef struct _Etk_Selection_Data_Targets Etk_Selection_Data_Targets; /** =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_widget.c,v retrieving revision 1.28 retrieving revision 1.29 diff -u -3 -r1.28 -r1.29 --- etk_widget.c 11 Feb 2006 16:33:38 -0000 1.28 +++ etk_widget.c 12 Feb 2006 13:13:45 -0000 1.29 @@ -58,7 +58,8 @@ ETK_WIDGET_DRAG_DROP_SIGNAL, ETK_WIDGET_DRAG_MOTION_SIGNAL, ETK_WIDGET_DRAG_LEAVE_SIGNAL, - ETK_WIDGET_SELECTION_GET_SIGNAL, + ETK_WIDGET_SELECTION_RECEIVED_SIGNAL, + ETK_WIDGET_CLIPBOARD_RECEIVED_SIGNAL, ETK_WIDGET_NUM_SIGNALS }; @@ -177,7 +178,8 @@ _etk_widget_signals[ETK_WIDGET_DRAG_DROP_SIGNAL] = etk_signal_new("drag_drop", widget_type, ETK_MEMBER_OFFSET(Etk_Widget, drag_drop), etk_marshaller_VOID__VOID, NULL, NULL); _etk_widget_signals[ETK_WIDGET_DRAG_MOTION_SIGNAL] = etk_signal_new("drag_motion", widget_type, ETK_MEMBER_OFFSET(Etk_Widget, drag_motion), etk_marshaller_VOID__VOID, NULL, NULL); _etk_widget_signals[ETK_WIDGET_DRAG_LEAVE_SIGNAL] = etk_signal_new("drag_leave", widget_type, ETK_MEMBER_OFFSET(Etk_Widget, drag_leave), etk_marshaller_VOID__VOID, NULL, NULL); - _etk_widget_signals[ETK_WIDGET_SELECTION_GET_SIGNAL] = etk_signal_new("selection_get", widget_type, -1, etk_marshaller_VOID__POINTER, NULL, NULL); + _etk_widget_signals[ETK_WIDGET_SELECTION_RECEIVED_SIGNAL] = etk_signal_new("selection_received", widget_type, -1, etk_marshaller_VOID__POINTER, NULL, NULL); + _etk_widget_signals[ETK_WIDGET_CLIPBOARD_RECEIVED_SIGNAL] = etk_signal_new("clipboard_received", widget_type, -1, etk_marshaller_VOID__POINTER, NULL, NULL); etk_type_property_add(widget_type, "name", ETK_WIDGET_NAME_PROPERTY, ETK_PROPERTY_STRING, ETK_PROPERTY_READABLE_WRITABLE, etk_property_value_string(NULL)); etk_type_property_add(widget_type, "parent", ETK_WIDGET_PARENT_PROPERTY, ETK_PROPERTY_POINTER, ETK_PROPERTY_READABLE, etk_property_value_pointer(NULL)); @@ -1487,14 +1489,25 @@ } /** - * @brief Sends the "selection_get" signal + * @brief Sends the "selection_received" signal * @param widget a widget */ -void etk_widget_selection_get(Etk_Widget *widget, Etk_Event_Selection_Get *event) +void etk_widget_selection_received(Etk_Widget *widget, Etk_Event_Selection_Request *event) { if (!widget) return; - etk_signal_emit(_etk_widget_signals[ETK_WIDGET_SELECTION_GET_SIGNAL], ETK_OBJECT(widget), NULL, event); + etk_signal_emit(_etk_widget_signals[ETK_WIDGET_SELECTION_RECEIVED_SIGNAL], ETK_OBJECT(widget), NULL, event); +} + +/** + * @brief Sends the "clipboard_received" signal + * @param widget a widget + */ +void etk_widget_clipboard_received(Etk_Widget *widget, Etk_Event_Selection_Request *event) +{ + if (!widget) + return; + etk_signal_emit(_etk_widget_signals[ETK_WIDGET_CLIPBOARD_RECEIVED_SIGNAL], ETK_OBJECT(widget), NULL, event); } /************************** =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_widget.h,v retrieving revision 1.17 retrieving revision 1.18 diff -u -3 -r1.17 -r1.18 --- etk_widget.h 11 Feb 2006 10:27:14 -0000 1.17 +++ etk_widget.h 12 Feb 2006 13:13:45 -0000 1.18 @@ -275,7 +275,9 @@ void etk_widget_drag_motion(Etk_Widget *widget); void etk_widget_drag_leave(Etk_Widget *widget); -void etk_widget_selection_get(Etk_Widget *widget, Etk_Event_Selection_Get *event); +void etk_widget_selection_received(Etk_Widget *widget, Etk_Event_Selection_Request *event); + +void etk_widget_clipboard_received(Etk_Widget *widget, Etk_Event_Selection_Request *event); /** @} */ |