Enlightenment CVS committal
Author : titan
Project : e17
Module : proto
Dir : e17/proto/ephoto/src
Modified Files:
ephoto.c ephoto.h ephoto_misc.c
Log Message:
Final step in onefanginizing ephoto. Key events are now included. ctrl + s does
a slideshow, ctrl + p does a presentation and ctrl + q quits.
===================================================================
RCS file: /cvs/e/e17/proto/ephoto/src/ephoto.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -3 -r1.51 -r1.52
--- ephoto.c 22 May 2006 05:08:23 -0000 1.51
+++ ephoto.c 22 May 2006 20:04:00 -0000 1.52
@@ -294,6 +294,8 @@
ewl_window_title_set(EWL_WINDOW(m->win), "ephoto");
ewl_window_name_set(EWL_WINDOW(m->win), "ephoto");
ewl_object_size_request(EWL_OBJECT(m->win), 640, 480);
+ ewl_callback_append(m->win, EWL_CALLBACK_KEY_DOWN,
+ key_cb, NULL);
ewl_callback_append(m->win, EWL_CALLBACK_DELETE_WINDOW,
destroy_cb, NULL);
ewl_widget_show(m->win);
===================================================================
RCS file: /cvs/e/e17/proto/ephoto/src/ephoto.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -3 -r1.24 -r1.25
--- ephoto.h 21 May 2006 16:05:21 -0000 1.24
+++ ephoto.h 22 May 2006 20:04:00 -0000 1.25
@@ -48,6 +48,7 @@
void list_albums_cb(Ewl_Widget *w, void *event, void *data);
void addi(Ewl_Widget *w, void *event, void *data);
void imagerealize_cb(Ewl_Widget *w, void *event, void *data);
+void key_cb(Ewl_Widget *w, void *event, void *data);
Ecore_List *get_images(const char *dir);
typedef struct _Main Main;
===================================================================
RCS file: /cvs/e/e17/proto/ephoto/src/ephoto_misc.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -3 -r1.20 -r1.21
--- ephoto_misc.c 21 May 2006 16:05:21 -0000 1.20
+++ ephoto_misc.c 22 May 2006 20:04:00 -0000 1.21
@@ -624,3 +624,24 @@
event = NULL;
data = NULL;
}
+void key_cb(Ewl_Widget *w, void *event, void *data)
+{
+ Ewl_Event_Key_Down *ev;
+ ev = event;
+ if (ev->modifiers && EWL_KEY_MODIFIER_CTRL) {
+ if (strcmp(ev->keyname, "s") == 0) {
+ ewl_callback_call(m->slideshow, EWL_CALLBACK_CLICKED);
+ }
+ if (strcmp(ev->keyname, "p") == 0) {
+ ewl_callback_call(m->presentation,
+ EWL_CALLBACK_CLICKED);
+ }
+ if (strcmp(ev->keyname, "q") == 0) {
+ ewl_callback_call(m->win, EWL_CALLBACK_DELETE_WINDOW);
+ }
+ }
+ return;
+ w = NULL;
+ event = NULL;
+ data = NULL;
+}
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs