clean code.. star work on views code - will have to modify desktop code a


			
			
				devs/princeamd/enlightenment-0.17-elive
			
			
		
Carsten Haitzler 22 years ago
parent 7fe641df37
commit 337d961729
  1. BIN
      data/config/behavior/default/apps_menu.db
  2. 4
      data/scripts/build_app_menu_db.sh
  3. 4
      src/desktops.c
  4. 25
      src/e.h
  5. 1
      src/main.c
  6. 5
      src/menu.c
  7. 2
      src/menudb.c
  8. 121
      src/view.c

@ -97,8 +97,8 @@ entry text 'System' 'sub' 2
end_menu
menu 1
entry text 'Ethernet On' 'sudo -S /sbin/ifup eth0'
entry text 'Ethernet Off' 'sudo -S /sbin/ifdown eth0'
entry text 'Ethernet On' '/sbin/ifup eth0'
entry text 'Ethernet Off' '/sbin/ifdown eth0'
end_menu
menu 2

@ -132,7 +132,6 @@ e_mouse_down(Eevent * ev)
evas_event_button_down(evas, x, y, e->button);
if (e->button == 1)
{
static E_Menu *menu = NULL;
static E_Build_Menu *buildmenu = NULL;
if (!buildmenu)
@ -144,13 +143,12 @@ e_mouse_down(Eevent * ev)
}
if (buildmenu)
{
static E_Menu *menu = NULL;
menu = buildmenu->menu;
if (menu)
e_menu_show_at_mouse(menu, e->rx, e->ry, e->time);
}
}
if (e->button == 3)
e_exec_restart();
return;
}
}

@ -300,6 +300,31 @@ struct _E_Active_Action_Timer
struct _E_View
{
OBJ_PROPERTIES;
char *directory;
struct {
Evas_Render_Method render_method;
int back_pixmap;
} options;
Evas evas;
struct {
Window base;
Window main;
} win;
Pixmap pmap;
struct {
int w, h;
} size;
struct {
int x, y;
} viewport;
struct {
int x, y;
} location;
Evas_List icons;
};
struct _E_Menu

@ -51,6 +51,7 @@ main(int argc, char **argv)
e_border_init();
e_actions_init();
e_menu_init();
e_view_init();
setup();

@ -8,10 +8,12 @@ static int mouse_x, mouse_y;
static int keyboard_nav = 0;
static void e_idle(void *data);
static void e_wheel(Eevent * ev);
static void e_key_down(Eevent * ev);
static void e_key_up(Eevent * ev);
static void e_mouse_down(Eevent * ev);
static void e_mouse_up(Eevent * ev);
static void e_mouse_move(Eevent * ev);
static void e_mouse_in(Eevent * ev);
static void e_mouse_out(Eevent * ev);
static void e_window_expose(Eevent * ev);
@ -127,6 +129,7 @@ e_scroller_timer(int val, void *data)
}
if (ok)
e_add_event_timer("menu_scroller", 0.02, e_scroller_timer, val + 1, NULL);
return;
UN(data);
}
@ -466,6 +469,7 @@ e_menu_item_in_cb(void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y)
mi->menu->current.y + mi->y - mi->menu->border.t);
e_menu_show(mi->submenu);
}
return;
UN(_e);
UN(_o);
UN(_b);
@ -483,6 +487,7 @@ e_menu_item_out_cb(void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y)
mi->selected = 0;
mi->menu->redo_sel = 1;
mi->menu->changed = 1;
return;
UN(_e);
UN(_o);
UN(_b);

@ -24,6 +24,7 @@ e_build_menu_poll(int val, void *data)
if (!bm->menu) bm->mod_time = 0;
e_add_event_timer(bm->file, 1.0, e_build_menu_poll, 0, data);
return;
UN(val);
}
@ -34,6 +35,7 @@ e_build_menu_cb_exec(E_Menu *m, E_Menu_Item *mi, void *data)
exe = data;
e_exec_run(exe);
return;
UN(m);
UN(mi);
}

@ -2,6 +2,103 @@
static Evas_List views = NULL;
static void e_idle(void *data);
static void e_wheel(Eevent * ev);
static void e_key_down(Eevent * ev);
static void e_key_up(Eevent * ev);
static void e_mouse_down(Eevent * ev);
static void e_mouse_up(Eevent * ev);
static void e_mouse_move(Eevent * ev);
static void e_mouse_in(Eevent * ev);
static void e_mouse_out(Eevent * ev);
static void e_window_expose(Eevent * ev);
static void
e_idle(void *data)
{
Evas_List l;
for (l = views; l; l = l->next)
{
E_View *v;
v = l->data;
evas_render(v->evas);
}
}
static void
e_wheel(Eevent * ev)
{
Ev_Wheel *e;
e = ev->event;
}
static void
e_key_down(Eevent * ev)
{
Ev_Key_Down *e;
e = ev->event;
}
static void
e_key_up(Eevent * ev)
{
Ev_Key_Up *e;
e = ev->event;
}
static void
e_mouse_down(Eevent * ev)
{
Ev_Mouse_Down *e;
e = ev->event;
}
static void
e_mouse_up(Eevent * ev)
{
Ev_Mouse_Up *e;
e = ev->event;
}
static void
e_mouse_move(Eevent * ev)
{
Ev_Mouse_Move *e;
e = ev->event;
}
static void
e_mouse_in(Eevent * ev)
{
Ev_Window_Enter *e;
e = ev->event;
}
static void
e_mouse_out(Eevent * ev)
{
Ev_Window_Leave *e;
e = ev->event;
}
static void
e_window_expose(Eevent * ev)
{
Ev_Window_Expose *e;
e = ev->event;
}
void
e_view_free(E_View *v)
{
@ -18,11 +115,33 @@ e_view_new(void)
ZERO(v, E_View, 1);
OBJ_INIT(v, e_view_free);
views = evas_list_append(views, v);
views = evas_list_append(views, v);
return v;
}
void
e_view_realize(void)
{
}
void
e_view_unrealize(void)
{
}
void
e_view_init(void)
{
e_event_filter_handler_add(EV_MOUSE_DOWN, e_mouse_down);
e_event_filter_handler_add(EV_MOUSE_UP, e_mouse_up);
e_event_filter_handler_add(EV_MOUSE_MOVE, e_mouse_move);
e_event_filter_handler_add(EV_MOUSE_IN, e_mouse_in);
e_event_filter_handler_add(EV_MOUSE_OUT, e_mouse_out);
e_event_filter_handler_add(EV_WINDOW_EXPOSE, e_window_expose);
e_event_filter_handler_add(EV_KEY_DOWN, e_key_down);
e_event_filter_handler_add(EV_KEY_UP, e_key_up);
e_event_filter_handler_add(EV_MOUSE_WHEEL, e_wheel);
e_event_filter_idle_handler_add(e_idle, NULL);
}

Loading…
Cancel
Save