adding stuff :)


			
			
				devs/princeamd/enlightenment-0.17-elive
			
			
		
Carsten Haitzler 22 years ago
parent d1c8cc48a4
commit a83333dda1
  1. 1
      src/Makefile.am
  2. 2
      src/border.c
  3. 80
      src/desktops.c
  4. 16
      src/e.h
  5. 113
      src/menu.c

@ -14,6 +14,7 @@ desktops.c \
exec.c \
icccm.c \
main.c \
menu.c \
resist.c \
util.c \
view.c \

@ -866,7 +866,7 @@ e_cb_border_mouse_out(E_Border *b, Eevent *e)
if (border_mouse_buttons) return;
/* pointer focus stuff */
e_focus_to_window(0);
/* e_focus_to_window(0);*/
x = mouse_x;
y = mouse_y;

@ -6,6 +6,8 @@ static int screen_w, screen_h;
static int current_desk = 0;
static void e_idle(void *data);
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_in(Eevent * ev);
@ -29,6 +31,78 @@ e_idle(void *data)
UN(data);
}
/* handling key down events */
static void
e_key_down(Eevent * ev)
{
Ev_Key_Down *e;
e = ev->event;
{
Evas_List l;
for (l = desktops; l; l = l->next)
{
E_Desktop *desk;
desk = l->data;
if (desk->win.desk == e->win)
{
if (!strcmp(e->key, "Up"))
{
}
else if (!strcmp(e->key, "Down"))
{
}
else if (!strcmp(e->key, "Left"))
{
}
else if (!strcmp(e->key, "Right"))
{
}
else if (!strcmp(e->key, "Escape"))
{
}
else
{
/* infact we should pass this onto the view handling */
/* this desktop here */
char *type;
type = e_key_press_translate_into_typeable(e);
if (type)
{
}
}
}
}
}
}
/* handling key up events */
static void
e_key_up(Eevent * ev)
{
Ev_Key_Up *e;
e = ev->event;
{
Evas_List l;
for (l = desktops; l; l = l->next)
{
E_Desktop *desk;
desk = l->data;
if (desk->win.desk == e->win)
{
}
}
}
}
/* handling mouse down events */
static void
e_mouse_down(Eevent * ev)
@ -151,6 +225,8 @@ e_mouse_in(Eevent * ev)
Evas evas;
int x, y;
/* focus handling for desktop */
e_focus_to_window(e->win);
evas = desk->evas.desk;
e_window_get_root_relative_location(evas_get_window(evas),
&x, &y);
@ -238,6 +314,8 @@ e_desktops_init(void)
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_idle_handler_add(e_idle, NULL);
e_icccm_advertise_e_compat();
@ -396,7 +474,7 @@ e_desktops_init_file_display(E_Desktop *desk)
evas_get_visual(desk->evas.desk), evas_get_colormap(desk->evas.desk));
e_window_set_background_pixmap(desk->win.desk, desk->evas.pmap);
/* normal stuff */
e_window_set_events(desk->win.desk, XEV_EXPOSE | XEV_MOUSE_MOVE | XEV_BUTTON | XEV_IN_OUT);
e_window_set_events(desk->win.desk, XEV_EXPOSE | XEV_MOUSE_MOVE | XEV_BUTTON | XEV_IN_OUT | XEV_KEY);
e_window_show(desk->win.desk);
{
Evas_Object o;

@ -130,7 +130,9 @@ typedef struct _E_Desktop E_Desktop;
typedef struct _E_Rect E_Rect;
typedef struct _E_Active_Action_Timer E_Active_Action_Timer;
typedef struct _E_View E_View;
typedef struct _E_Menu E_Menu;
typedef struct _E_Menu_Item E_Menu_Item;
struct _E_Object
{
OBJ_PROPERTIES;
@ -289,6 +291,18 @@ struct _E_View
OBJ_PROPERTIES;
};
struct _E_Menu
{
OBJ_PROPERTIES;
Window win;
};
struct _E_Menu_Item
{
OBJ_PROPERTIES;
};
void e_action_add_proto(char *action,
void (*func_start) (void *o, E_Action *a, void *data, int x, int y, int rx, int ry),
void (*func_stop) (void *o, E_Action *a, void *data, int x, int y, int rx, int ry),

@ -0,0 +1,113 @@
#include "e.h"
static Evas_List open_menus = NULL;
static Evas_list menus = NULL;
static void e_idle(void *data);
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_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 = menus; l; l = l->next)
{
E_Menu *m;
m = l->data;
e_menu_update(m);
}
e_db_runtime_flush();
return;
UN(data);
}
static void
e_key_down(Eevent * ev)
{
Ev_Key_Down *e;
e = ev->event;
{
if (!strcmp(e->key, "Up"))
{
}
else if (!strcmp(e->key, "Down"))
{
}
else if (!strcmp(e->key, "Left"))
{
}
else if (!strcmp(e->key, "Right"))
{
}
else if (!strcmp(e->key, "Escape"))
{
}
else
{
}
}
}
static void
e_key_up(Eevent * ev)
{
Ev_Key_Up *e;
e = ev->event;
{
}
}
E_Menu *
e_menu_new(void)
{
}
void
e_menu_free(E_Menu *m)
{
}
void
e_menu_hide(E_Menu *m)
{
}
void
e_menu_show(E_Menu *m)
{
}
void
e_menu_move_to(E_Menu *m, int x, int y)
{
}
void
e_menu_show_at_mouse(E_Menu *m, int x, int y)
{
}
void
e_menu_add_item(E_Menu *m, E_Menu_Item *mi)
{
}
void
e_menu_del_item(E_Menu *m, E_Menu_Item *mi)
{
}
void
e_menu_update(E_Menu *m)
{
}
Loading…
Cancel
Save