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 ------------------------------------------------------- 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