Add a font

This commit is contained in:
Jaime Thomas 2008-08-06 23:09:30 +00:00
parent e5c7506da7
commit 7c662dae4d
4 changed files with 27 additions and 2 deletions

View File

@ -1,4 +1,5 @@
#include "images/images.edc" #include "images/images.edc"
#include "fonts/fonts.edc"
collections { collections {
#include "groups/window.edc" #include "groups/window.edc"

View File

@ -0,0 +1,3 @@
fonts {
font: "DejaVuSans.ttf" "ecdb/default";
}

View File

@ -28,7 +28,8 @@ ecdb_cb_resize(Ecore_Evas *ee)
} }
static void static void
_cb_filelist_mouse_in(Ewl_Widget *w, void *ev __UNUSED__, void *data) _cb_filelist_mouse_in(Ewl_Widget *w __UNUSED__, void *ev __UNUSED__,
void *data)
{ {
Evas_Object *gui = data; Evas_Object *gui = data;
edje_object_signal_emit(gui, "ecdb,filelist,in", "ecdb"); edje_object_signal_emit(gui, "ecdb,filelist,in", "ecdb");
@ -36,13 +37,29 @@ _cb_filelist_mouse_in(Ewl_Widget *w, void *ev __UNUSED__, void *data)
} }
static void static void
_cb_filelist_mouse_out(Ewl_Widget *w, void *ev __UNUSED__, void *data) _cb_filelist_mouse_out(Ewl_Widget *w __UNUSED__, void *ev __UNUSED__,
void *data)
{ {
Evas_Object *gui = data; Evas_Object *gui = data;
edje_object_signal_emit(gui, "ecdb,filelist,out", "ecdb"); edje_object_signal_emit(gui, "ecdb,filelist,out", "ecdb");
printf("Emitting signal\n"); printf("Emitting signal\n");
} }
static void
_cb_filelist_mouse_down(void *data __UNUSED__, Evas *e __UNUSED__,
Evas_Object *eo, void *ev_data __UNUSED__)
{
evas_object_focus_set(eo, TRUE);
}
static void
_cb_filelist_key_down(void *data, Evas *e, Evas_Object *eo, void *ev_data)
{
Evas_Event_Key_Down *ek = ev_data;
printf("key pressed: %s\n", ek->key);
}
int int
ecdb_create_main_gui(void) ecdb_create_main_gui(void)
{ {
@ -103,6 +120,10 @@ ecdb_create_main_gui(void)
evas_object_move(swallow, x, y); evas_object_move(swallow, x, y);
evas_object_resize(swallow, x, y); evas_object_resize(swallow, x, y);
edje_object_part_swallow(gui, "filelist", swallow); edje_object_part_swallow(gui, "filelist", swallow);
evas_object_event_callback_add(swallow, EVAS_CALLBACK_MOUSE_DOWN,
_cb_filelist_mouse_down, gui);
evas_object_event_callback_add(swallow, EVAS_CALLBACK_KEY_DOWN,
_cb_filelist_key_down, gui);
evas_object_show(swallow); evas_object_show(swallow);
return TRUE; return TRUE;