seb's patch...

SVN revision: 13222
This commit is contained in:
Carsten Haitzler 2005-02-07 13:51:09 +00:00
parent f8e536b96e
commit 4f54c588e1
61 changed files with 904 additions and 352 deletions

View File

@ -1,3 +1,3 @@
The Rasterman (Carsten Haitzler) <raster@rasterman.com>
Ibukun Olumuyiwa <ibukun@computer.org>
Sebastian Dransfeld <sebastid@tango.flipp.net>

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#include "e.h"
/* TODO List:
@ -286,13 +289,13 @@ e_app_window_name_class_find(char *name, char *class)
{
Evas_List *l;
if (!name && !class)
return NULL;
for (l = _e_apps_list; l; l = l->next)
{
E_App *a;
if (!name && !class)
return NULL;
a = l->data;
if ((a->win_name) || (a->win_class))
{

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#ifdef E_TYPEDEFS
typedef enum _E_App_Change

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#include "e.h"
/* Atoms */

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#ifdef E_TYPEDEFS
#else
#ifndef E_ATOMS_H

File diff suppressed because it is too large Load Diff

View File

@ -1,19 +1,22 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#ifdef E_TYPEDEFS
typedef enum _E_Direction
{
E_DIRECTION_UP,
E_DIRECTION_DOWN,
E_DIRECTION_LEFT,
E_DIRECTION_RIGHT
E_DIRECTION_UP,
E_DIRECTION_DOWN,
E_DIRECTION_LEFT,
E_DIRECTION_RIGHT
} E_Direction;
typedef enum _E_Transition
{
E_TRANSITION_LINEAR,
E_TRANSITION_SINUSOIDAL,
E_TRANSITION_ACCELERATE,
E_TRANSITION_DECELERATE
E_TRANSITION_LINEAR,
E_TRANSITION_SINUSOIDAL,
E_TRANSITION_ACCELERATE,
E_TRANSITION_DECELERATE
} E_Transition;
typedef struct _E_Border E_Border;
@ -37,20 +40,20 @@ struct _E_Border
E_Object e_obj_inherit;
struct {
struct {
int x, y, w, h;
int mx, my;
} current, last_down[3], last_up[3];
struct {
int x, y, w, h;
int mx, my;
} current, last_down[3], last_up[3];
} mouse;
struct {
struct {
int x, y, w, h;
int mx, my;
int button;
} down;
struct {
int x, y, w, h;
int mx, my;
int button;
} down;
} moveinfo;
Ecore_X_Window win;
int x, y, w, h;
int ref;
@ -58,97 +61,97 @@ struct _E_Border
E_Zone *zone;
E_Desk *desk;
Evas_List *handlers;
struct {
int l, r, t, b;
int l, r, t, b;
} client_inset;
Ecore_Evas *bg_ecore_evas;
Evas *bg_evas;
Ecore_X_Window bg_win;
Evas_Object *bg_object;
Evas_Object *icon_object;
Ecore_X_Window event_win;
struct {
Ecore_X_Window shell_win;
Ecore_X_Window win;
int x, y, w, h;
struct {
unsigned char changed : 1;
char *name;
} border;
struct {
char *title;
char *name;
char *class;
char *icon_name;
char *machine;
int min_w, min_h;
int max_w, max_h;
int base_w, base_h;
int step_w, step_h;
int start_x, start_y;
double min_aspect, max_aspect;
Ecore_X_Window_State_Hint initial_state;
Ecore_X_Pixmap icon_pixmap;
Ecore_X_Pixmap icon_mask;
Ecore_X_Window icon_window;
Ecore_X_Window window_group;
Ecore_X_Gravity gravity;
unsigned char take_focus : 1;
unsigned char accepts_focus : 1;
unsigned char urgent : 1;
unsigned char delete_request : 1;
unsigned char withdrawn : 1;
unsigned char iconic : 1;
unsigned char request_pos : 1;
struct {
unsigned int title : 1;
unsigned int name_class : 1;
unsigned int icon_name : 1;
unsigned int machine : 1;
unsigned int hints : 1;
unsigned int size_pos_hints : 1;
unsigned int protocol : 1;
} fetch;
} icccm;
struct {
Ecore_X_MWM_Hint_Func func;
Ecore_X_MWM_Hint_Decor decor;
Ecore_X_MWM_Hint_Input input;
unsigned char exists : 1;
unsigned char borderless : 1;
struct {
unsigned int hints : 1;
} fetch;
} mwm;
struct {
pid_t pid;
int desktop;
struct {
unsigned int pid : 1;
unsigned int desktop : 1;
} fetch;
/* NetWM Window state */
struct {
unsigned char modal : 1;
unsigned char maximized_v : 1;
unsigned char maximized_h : 1;
unsigned char skip_taskbar : 1;
unsigned char skip_pager : 1;
unsigned char fullscreen : 1;
unsigned char stacking : 2; /* 0 = None, 1 = Above, 2 = Below */
} state;
} netwm;
Ecore_X_Window_Attributes initial_attributes;
Ecore_X_Window shell_win;
Ecore_X_Window win;
int x, y, w, h;
struct {
unsigned char changed : 1;
char *name;
} border;
struct {
char *title;
char *name;
char *class;
char *icon_name;
char *machine;
int min_w, min_h;
int max_w, max_h;
int base_w, base_h;
int step_w, step_h;
int start_x, start_y;
double min_aspect, max_aspect;
Ecore_X_Window_State_Hint initial_state;
Ecore_X_Pixmap icon_pixmap;
Ecore_X_Pixmap icon_mask;
Ecore_X_Window icon_window;
Ecore_X_Window window_group;
Ecore_X_Gravity gravity;
unsigned char take_focus : 1;
unsigned char accepts_focus : 1;
unsigned char urgent : 1;
unsigned char delete_request : 1;
unsigned char withdrawn : 1;
unsigned char iconic : 1;
unsigned char request_pos : 1;
struct {
unsigned int title : 1;
unsigned int name_class : 1;
unsigned int icon_name : 1;
unsigned int machine : 1;
unsigned int hints : 1;
unsigned int size_pos_hints : 1;
unsigned int protocol : 1;
} fetch;
} icccm;
struct {
Ecore_X_MWM_Hint_Func func;
Ecore_X_MWM_Hint_Decor decor;
Ecore_X_MWM_Hint_Input input;
unsigned char exists : 1;
unsigned char borderless : 1;
struct {
unsigned int hints : 1;
} fetch;
} mwm;
struct {
pid_t pid;
int desktop;
struct {
unsigned int pid : 1;
unsigned int desktop : 1;
} fetch;
/* NetWM Window state */
struct {
unsigned char modal : 1;
unsigned char maximized_v : 1;
unsigned char maximized_h : 1;
unsigned char skip_taskbar : 1;
unsigned char skip_pager : 1;
unsigned char fullscreen : 1;
unsigned char stacking : 2; /* 0 = None, 1 = Above, 2 = Below */
} state;
} netwm;
Ecore_X_Window_Attributes initial_attributes;
} client;
E_Container_Shape *shape;
unsigned char visible : 1;
@ -166,17 +169,17 @@ struct _E_Border
unsigned char ignore_first_unmap;
unsigned char resize_mode;
struct {
int x, y, w, h;
int x, y, w, h;
} saved;
struct {
double start;
double val;
int x, y;
E_Direction dir;
Ecore_Animator *anim;
double start;
double val;
int x, y;
E_Direction dir;
Ecore_Animator *anim;
} shade;
Evas_List *stick_desks;
@ -184,15 +187,15 @@ struct _E_Border
Evas_List *pending_move_resize;
struct {
unsigned int visible : 1;
unsigned int pos : 1;
unsigned int size : 1;
unsigned int stack : 1;
unsigned int prop : 1;
unsigned int border : 1;
unsigned int reset_gravity : 1;
unsigned int shading : 1;
unsigned int shaded : 1;
unsigned int visible : 1;
unsigned int pos : 1;
unsigned int size : 1;
unsigned int stack : 1;
unsigned int prop : 1;
unsigned int border : 1;
unsigned int reset_gravity : 1;
unsigned int shading : 1;
unsigned int shaded : 1;
} changes;
};

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#include "e.h"
typedef struct _E_Smart_Data E_Smart_Data;

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#ifdef E_TYPEDEFS
#else
#ifndef E_BOX_H

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#include "e.h"
/* local subsystem functions */

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#ifdef E_TYPEDEFS
#else
#ifndef E_CANVAS_H

View File

@ -5,7 +5,7 @@
#include "config.h"
/* TODO List
*
*
* * setting up a new config value and a listener callback is too long winded - need to have helper funcs and macros do this so it's more like 1 line per new config value or 2
*/
@ -25,6 +25,7 @@ static Ecore_Job *_e_config_save_job = NULL;
static E_Config_DD *_e_config_edd = NULL;
static E_Config_DD *_e_config_module_edd = NULL;
static E_Config_DD *_e_config_binding_edd = NULL;
/* externally accessible functions */
int
@ -37,8 +38,18 @@ e_config_init(void)
#define D _e_config_module_edd
E_CONFIG_VAL(D, T, name, STR);
E_CONFIG_VAL(D, T, enabled, UCHAR);
_e_config_edd = E_CONFIG_DD_NEW("E_Config", E_Config);
_e_config_binding_edd = E_CONFIG_DD_NEW("E_Config_Binding", E_Config_Binding);
#undef T
#undef D
#define T E_Config_Binding
#define D _e_config_binding_edd
E_CONFIG_VAL(D, T, button, INT);
E_CONFIG_VAL(D, T, mask, INT);
E_CONFIG_VAL(D, T, modifiers, INT);
E_CONFIG_VAL(D, T, action, INT);
_e_config_edd = E_CONFIG_DD_NEW("E_Config", E_Config);
#undef T
#undef D
#define T E_Config
@ -56,6 +67,7 @@ e_config_init(void)
E_CONFIG_VAL(D, T, zone_desks_x_count, INT);
E_CONFIG_VAL(D, T, zone_desks_y_count, INT);
E_CONFIG_LIST(D, T, modules, _e_config_module_edd);
E_CONFIG_LIST(D, T, bindings, _e_config_binding_edd);
e_config = e_config_domain_load("e", _e_config_edd);
if (!e_config)
@ -76,7 +88,7 @@ e_config_init(void)
e_config->zone_desks_y_count = 1;
{
E_Config_Module *em;
em = E_NEW(E_Config_Module, 1);
em->name = strdup("ibar");
em->enabled = 1;
@ -102,8 +114,36 @@ e_config_init(void)
em->enabled = 1;
e_config->modules = evas_list_append(e_config->modules, em);
}
{
E_Config_Binding *eb;
eb = E_NEW(E_Config_Binding, 1);
eb->button = 1;
eb->mask = ECORE_X_EVENT_MASK_MOUSE_DOWN |
ECORE_X_EVENT_MASK_MOUSE_UP |
ECORE_X_EVENT_MASK_MOUSE_MOVE;
eb->modifiers = ECORE_X_MODIFIER_ALT;
eb->action = E_BINDING_ACTION_MOVE;
e_config->bindings = evas_list_append(e_config->bindings, eb);
eb = E_NEW(E_Config_Binding, 1);
eb->button = 3;
eb->mask = ECORE_X_EVENT_MASK_MOUSE_DOWN |
ECORE_X_EVENT_MASK_MOUSE_UP |
ECORE_X_EVENT_MASK_MOUSE_MOVE;
eb->modifiers = ECORE_X_MODIFIER_ALT;
eb->action = E_BINDING_ACTION_RESIZE;
e_config->bindings = evas_list_append(e_config->bindings, eb);
eb = E_NEW(E_Config_Binding, 1);
eb->button = 2;
eb->mask = ECORE_X_EVENT_MASK_MOUSE_DOWN;
eb->modifiers = ECORE_X_MODIFIER_ALT;
eb->action = E_BINDING_ACTION_MENU;
e_config->bindings = evas_list_append(e_config->bindings, eb);
}
}
E_CONFIG_LIMIT(e_config->menus_scroll_speed, 1.0, 20000.0);
E_CONFIG_LIMIT(e_config->menus_fast_mouse_move_thresthold, 1.0, 2000.0);
E_CONFIG_LIMIT(e_config->menus_click_drag_timeout, 0.0, 10.0);
@ -124,17 +164,26 @@ e_config_shutdown(void)
while (e_config->modules)
{
E_Config_Module *em;
em = e_config->modules->data;
e_config->modules = evas_list_remove(e_config->modules, em);
E_FREE(em->name);
E_FREE(em);
}
while (e_config->bindings)
{
E_Config_Binding *eb;
eb = e_config->bindings->data;
e_config->bindings = evas_list_remove(e_config->bindings, eb);
E_FREE(eb);
}
E_FREE(e_config->desktop_default_background);
E_FREE(e_config);
}
E_CONFIG_DD_FREE(_e_config_edd);
E_CONFIG_DD_FREE(_e_config_module_edd);
E_CONFIG_DD_FREE(_e_config_binding_edd);
return 1;
}
@ -163,7 +212,7 @@ e_config_domain_load(char *domain, E_Config_DD *edd)
char buf[4096];
char *homedir;
void *data = NULL;
homedir = e_user_homedir_get();
snprintf(buf, sizeof(buf), "%s/.e/e/config/%s.cfg", homedir, domain);
E_FREE(homedir);
@ -183,7 +232,7 @@ e_config_domain_save(char *domain, E_Config_DD *edd, void *data)
char buf[4096];
char *homedir;
int ok = 0;
/* FIXME: check for other sessions fo E runing */
homedir = e_user_homedir_get();
snprintf(buf, sizeof(buf), "%s/.e/e/config/%s.cfg", homedir, domain);

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#ifdef E_TYPEDEFS
#define E_CONFIG_DD_NEW(str, typ) \
@ -30,8 +33,16 @@
typedef struct _E_Config E_Config;
typedef struct _E_Config_Module E_Config_Module;
typedef struct _E_Config_Binding E_Config_Binding;
typedef Eet_Data_Descriptor E_Config_DD;
typedef enum _E_Binding_Action
{
E_BINDING_ACTION_MOVE,
E_BINDING_ACTION_RESIZE,
E_BINDING_ACTION_MENU
} E_Binding_Action;
#else
#ifndef E_CONFIG_H
#define E_CONFIG_H
@ -51,6 +62,7 @@ struct _E_Config
int zone_desks_x_count;
int zone_desks_y_count;
Evas_List *modules;
Evas_List *bindings;
};
struct _E_Config_Module
@ -59,6 +71,15 @@ struct _E_Config_Module
unsigned char enabled;
};
struct _E_Config_Binding
{
int button;
Ecore_X_Event_Mask mask;
int modifiers;
E_Binding_Action action;
};
EAPI int e_config_init(void);
EAPI int e_config_shutdown(void);

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#ifdef E_TYPEDEFS
typedef enum _E_Container_Shape_Change

View File

@ -175,8 +175,6 @@ e_desk_xy_get(E_Desk *desk, int *x, int *y)
void
e_desk_next(E_Zone *zone)
{
Evas_List *l;
E_Desk *desk;
int x, y;
E_OBJECT_CHECK(zone);
@ -203,8 +201,6 @@ e_desk_next(E_Zone *zone)
void
e_desk_prev(E_Zone *zone)
{
Evas_List *l;
E_Desk *desk;
int x, y;
E_OBJECT_CHECK(zone);

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#ifdef E_TYPEDEFS
typedef struct _E_Desk E_Desk;

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#include "e.h"
/* FIXME: handle LANG!!!! */

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#include "e.h"
/* TODO List:

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#ifdef E_TYPEDEFS
#define print0(x, args...) x ,print1(## args)

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#include "e.h"
#include <dirent.h>

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#ifdef E_TYPEDEFS
#else
#ifndef E_FILE_H

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#include "e.h"
/* local subsystem functions */

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#ifdef E_TYPEDEFS
#else
#ifndef E_FOCUS_H

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#ifdef E_TYPEDEFS
typedef enum _E_Gadman_Policy

View File

@ -256,6 +256,94 @@ e_hints_window_state_set(Ecore_X_Window win)
}
}
void
e_hints_window_visible_set(Ecore_X_Window win, int on)
{
int hidden;
hidden = on ? 0 : 1;
ecore_x_netwm_window_state_set(win, ECORE_X_WINDOW_STATE_HIDDEN, hidden);
}
void
e_hints_window_shaded_set(Ecore_X_Window win, int on)
{
ecore_x_netwm_window_state_set(win, ECORE_X_WINDOW_STATE_SHADED, on);
}
int
e_hints_window_shaded_isset(Ecore_X_Window win)
{
return ecore_x_netwm_window_state_isset(win, ECORE_X_WINDOW_STATE_SHADED);
}
void
e_hints_window_maximized_set(Ecore_X_Window win, int on)
{
ecore_x_netwm_window_state_set(win, ECORE_X_WINDOW_STATE_MAXIMIZED_VERT, on);
ecore_x_netwm_window_state_set(win, ECORE_X_WINDOW_STATE_MAXIMIZED_HORZ, on);
}
int
e_hints_window_maximized_isset(Ecore_X_Window win)
{
return ecore_x_netwm_window_state_isset(win, ECORE_X_WINDOW_STATE_MAXIMIZED_VERT)
&& ecore_x_netwm_window_state_isset(win, ECORE_X_WINDOW_STATE_MAXIMIZED_HORZ);
}
void
e_hints_window_sticky_set(Ecore_X_Window win, int on)
{
ecore_x_netwm_window_state_set(win, ECORE_X_WINDOW_STATE_STICKY, on);
}
int
e_hints_window_sticky_isset(Ecore_X_Window win)
{
return ecore_x_netwm_window_state_isset(win, ECORE_X_WINDOW_STATE_STICKY);
}
/*
ecore_x_netwm_window_state_set(win, ECORE_X_WINDOW_STATE_MODAL, on);
ecore_x_netwm_window_state_set(win, ECORE_X_WINDOW_STATE_SKIP_TASKBAR, on);
ecore_x_netwm_window_state_set(win, ECORE_X_WINDOW_STATE_SKIP_PAGER, on);
ecore_x_netwm_window_state_set(win, ECORE_X_WINDOW_STATE_FULLSCREEN, on);
ecore_x_netwm_window_state_set(win, ECORE_X_WINDOW_STATE_ABOVE, on);
ecore_x_netwm_window_state_set(win, ECORE_X_WINDOW_STATE_BELOW, on);
*/
void
e_hints_window_state_get(Ecore_X_Window win)
{
E_Border *bd;
int above, below;
bd = e_border_find_by_client_window(win);
bd->client.netwm.state.modal =
ecore_x_netwm_window_state_isset(win, ECORE_X_WINDOW_STATE_MODAL);
bd->sticky =
ecore_x_netwm_window_state_isset(win, ECORE_X_WINDOW_STATE_STICKY);
bd->client.netwm.state.maximized_v =
ecore_x_netwm_window_state_isset(win, ECORE_X_WINDOW_STATE_MAXIMIZED_VERT);
bd->client.netwm.state.maximized_h =
ecore_x_netwm_window_state_isset(win, ECORE_X_WINDOW_STATE_MAXIMIZED_HORZ);
bd->shaded =
ecore_x_netwm_window_state_isset(win, ECORE_X_WINDOW_STATE_SHADED);
bd->client.netwm.state.skip_taskbar =
ecore_x_netwm_window_state_isset(win, ECORE_X_WINDOW_STATE_SKIP_TASKBAR);
bd->client.netwm.state.skip_pager =
ecore_x_netwm_window_state_isset(win, ECORE_X_WINDOW_STATE_SKIP_PAGER);
bd->visible =
!ecore_x_netwm_window_state_isset(win, ECORE_X_WINDOW_STATE_HIDDEN);
bd->client.netwm.state.fullscreen =
ecore_x_netwm_window_state_isset(win, ECORE_X_WINDOW_STATE_FULLSCREEN);
above = ecore_x_netwm_window_state_isset(win, ECORE_X_WINDOW_STATE_ABOVE);
below = ecore_x_netwm_window_state_isset(win, ECORE_X_WINDOW_STATE_BELOW);
bd->client.netwm.state.stacking = (above << 0) + (below << 1);
}
void
e_hints_window_name_get(Ecore_X_Window win)
{
@ -283,7 +371,3 @@ e_hints_window_icon_name_get(Ecore_X_Window win)
bd->client.icccm.icon_name = name;
bd->changed = 1;
}

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#ifdef E_TYPEDEFS
#else
#ifndef E_HINTS_H
@ -12,6 +15,13 @@ EAPI void e_hints_desktop_config_set(void);
EAPI void e_hints_window_state_set(Ecore_X_Window win);
EAPI void e_hints_window_name_get(Ecore_X_Window win);
EAPI void e_hints_window_icon_name_get(Ecore_X_Window win);
EAPI void e_hints_window_visible_set(Ecore_X_Window win, int on);
EAPI void e_hints_window_shaded_set(Ecore_X_Window win, int on);
EAPI int e_hints_window_shaded_isset(Ecore_X_Window win);
EAPI void e_hints_window_maximized_set(Ecore_X_Window win, int on);
EAPI int e_hints_window_maximized_isset(Ecore_X_Window win);
EAPI void e_hints_window_sticky_set(Ecore_X_Window win, int on);
EAPI int e_hints_window_sticky_isset(Ecore_X_Window win);
#endif
#endif

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#include "e.h"
typedef struct _E_Smart_Data E_Smart_Data;

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#ifdef E_TYPEDEFS
#else
#ifndef E_ICON_H

View File

@ -1,7 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#include "e.h"
static Evas_List *_e_iconic_borders = NULL;

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#ifdef E_TYPEDEFS
#else
#ifndef E_ICONIFY_H

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#include "e_object.h"
#include "e_file.h"
#include "e_user.h"

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#include "e.h"
/* local subsystem globals */
@ -13,7 +16,7 @@ e_init_init(void)
int x, y, w, h;
Ecore_X_Window root;
Ecore_X_Window *roots;
int num, i;
int num;
Evas_Object *o;
int n;

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#ifdef E_TYPEDEFS
#else
#ifndef E_INIT_H

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#ifdef E_TYPEDEFS
#else
#ifndef E_INT_MENUS_H

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#ifdef E_TYPEDEFS
typedef enum _E_Ipc_Domain {

View File

@ -61,7 +61,6 @@ main(int argc, char **argv)
char *s;
/* install the signal handlers. */
struct sigaction sigsegv_action;
struct sigaction sighup_action;
sigsegv_action.sa_sigaction=&e_sigseg_act;
sigsegv_action.sa_flags=0;
sigaction(SIGSEGV, &sigsegv_action, NULL);
@ -454,6 +453,7 @@ _e_main_dirs_init(void)
}
/* FIXME: THIS is a hack to get people started!!! */
/*
snprintf(buf, sizeof(buf), "%s/.e/e/applications/all/eterm.eapp", homedir);
if (!e_file_exists(buf))
{
@ -465,6 +465,7 @@ _e_main_dirs_init(void)
homedir);
system(buf);
}
*/
free(homedir);
return 1;
@ -800,6 +801,7 @@ _e_main_cb_signal_exit(void *data, int ev_type, void *ev)
ecore_main_loop_quit();
return 1;
}
static int
_e_main_cb_signal_hup(void *data, int ev_type, void *ev)
{
@ -807,6 +809,7 @@ _e_main_cb_signal_hup(void *data, int ev_type, void *ev)
printf("RESTART ON!\n");
restart = 1;
ecore_main_loop_quit();
return 1;
}
static int

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#ifdef E_TYPEDEFS
typedef struct _E_Manager E_Manager;

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#include "e.h"
/* TODO List:
@ -253,7 +256,7 @@ e_menu_post_deactivate_callback_set(E_Menu *m, void (*func) (void *data, E_Menu
m->post_deactivate_cb.data = data;
}
E_Menu *
E_Menu *
e_menu_root_get(E_Menu *m)
{
E_Menu *ret;

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#ifdef E_TYPEDEFS
#define E_MENU_POP_DIRECTION_NONE 0

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#include "e.h"
#include "config.h"

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#ifdef E_TYPEDEFS
#define E_MODULE_API_VERSION 1

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#include "e.h"
/* TODO List:

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#ifdef E_TYPEDEFS
/* Object safety/debugging checks */

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#include "e.h"
/* local subsystem functions */

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#ifdef E_TYPEDEFS
typedef struct _E_Path E_Path;

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#include "e.h"
int

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#ifdef E_TYPEDEFS
#else
#ifndef E_PLACE_H

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#include "e.h"
/* externally accessible functions */

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#ifdef E_TYPEDEFS
#else
#ifndef E_POINTER_H

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#include "e.h"
typedef struct _E_IPC_Opt_Handler E_IPC_Opt_Handler;

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#include "e.h"
typedef struct _E_Resist_Rect E_Resist_Rect;
@ -13,14 +16,15 @@ int
e_resist_container_border_position(E_Container *con, Evas_List *skiplist,
int px, int py, int pw, int ph,
int x, int y, int w, int h,
int *rx, int *ry)
int *rx, int *ry, int *rw, int *rh)
{
int resist = 1;
int desk_resist = 32;
int win_resist = 12;
int gad_resist = 32;
int dx, dy, d, pd;
int dx, dy, dw, dh, d, pd;
int resist_x = 0, resist_y = 0;
int resist_w = 0, resist_h = 0;
Evas_List *l, *ll, *rects = NULL;
E_Resist_Rect *r;
@ -30,10 +34,14 @@ e_resist_container_border_position(E_Container *con, Evas_List *skiplist,
{
*rx = x;
*ry = y;
*rw = w;
*rw = h;
return 0;
}
dx = x - px;
dy = y - py;
dw = w - pw;
dh = h - ph;
/* edges of screen */
#define OBSTACLE(_x, _y, _w, _h, _resist) \
@ -136,7 +144,10 @@ e_resist_container_border_position(E_Container *con, Evas_List *skiplist,
if ((d > 0) && (pd <= 0) && (d <= r->v1))
{
if (resist_x < d)
resist_x = d;
{
resist_x = d;
resist_w = -d;
}
}
}
else
@ -147,7 +158,36 @@ e_resist_container_border_position(E_Container *con, Evas_List *skiplist,
if ((d < 0) && (pd >= 0) && (d >= -r->v1))
{
if (-resist_x > d)
resist_x = -d;
{
resist_x = -d;
resist_w = d;
}
}
}
}
if ((dw > 0) && (dx == 0))
{
/* enlarging window by moving lower corner */
if (r->resist_out)
{
/* check right edge of windows against left */
d = x + w - (r->x + r->w);
pd = px + pw - (r->x + r->w);
if ((d > 0) && (pd <= 0) && (d <= r->v1))
{
if (-resist_w < d)
resist_w = -d;
}
}
else
{
/* check left edge of windows against right */
d = r->x - (x + w);
pd = r->x - (px + pw);
if ((d < 0) && (pd >= 0) && (d >= -r->v1))
{
if (resist_w > d)
resist_w = d;
}
}
}
@ -191,7 +231,10 @@ e_resist_container_border_position(E_Container *con, Evas_List *skiplist,
if ((d > 0) && (pd <= 0) && (d <= r->v1))
{
if (resist_y < d)
resist_y = d;
{
resist_y = d;
resist_h = -d;
}
}
}
else
@ -202,7 +245,36 @@ e_resist_container_border_position(E_Container *con, Evas_List *skiplist,
if ((d < 0) && (pd >= 0) && (d >= -r->v1))
{
if (-resist_y > d)
resist_y = -d;
{
resist_y = -d;
resist_h = d;
}
}
}
}
if ((dh > 0) && (dy == 0))
{
/* enlarging window by moving lower corner */
if (r->resist_out)
{
/* check bottom edge of windows against top */
d = y + h - (r->y + r->h);
pd = py + ph - (r->y + r->h);
if ((d > 0) && (pd <= 0) && (d <= r->v1))
{
if (-resist_h < d)
resist_h = -d;
}
}
else
{
/* check top edge of windows against bottom */
d = r->y - (y + h);
pd = r->y - (py + ph);
if ((d < 0) && (pd >= 0) && (d >= -r->v1))
{
if (resist_h > d)
resist_h = d;
}
}
}
@ -224,6 +296,14 @@ e_resist_container_border_position(E_Container *con, Evas_List *skiplist,
*ry = y + resist_y;
else
*ry = y;
if (dh != 0)
*rh = h + resist_h;
else
*rh = h;
if (dw != 0)
*rw = w + resist_w;
else
*rw = w;
return 1;
}

View File

@ -1,9 +1,12 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#ifdef E_TYPEDEFS
#else
#ifndef E_RESIST_H
#define E_RESIST_H
EAPI int e_resist_container_border_position(E_Container *con, Evas_List *skiplist, int px, int py, int pw, int ph, int x, int y, int w, int h, int *rx, int *ry);
EAPI int e_resist_container_border_position(E_Container *con, Evas_List *skiplist, int px, int py, int pw, int ph, int x, int y, int w, int h, int *rx, int *ry, int *rw, int *rh);
EAPI int e_resist_container_gadman_position(E_Container *con, Evas_List *skiplist, int px, int py, int pw, int ph, int x, int y, int w, int h, int *rx, int *ry);
#endif

View File

@ -2,6 +2,7 @@
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#include "e.h"
#include <execinfo.h>
/* a tricky little devil, requires e and it's libs to be built
* with the -rdynamic flag to GCC for any sort of decent output.
@ -10,11 +11,9 @@ void e_sigseg_act(int x, siginfo_t *info, void *data){
void *array[255];
size_t size;
char **strings;
size_t i;
write(2, "**** SEGMENTATION FAULT ****\n", 29);
write(2, "**** Printing Backtrace... *****\n\n", 34);
size = backtrace (array, 255);
size = backtrace(array, 255);
backtrace_symbols_fd(array, size, 2);
exit(-11);
}

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#ifndef E_SIGNALS_H
#define E_SIGNALS_H

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#include "e.h"
/* local subsystem functions */

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#ifdef E_TYPEDEFS
typedef enum _E_Startup_Mode

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#include "e.h"
/* externally accessible functions */

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#ifdef E_TYPEDEFS
#else
#ifndef E_USER_H

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#include "e.h"
typedef struct _E_Util_Fake_Mouse_Up_Info E_Util_Fake_Mouse_Up_Info;

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#ifdef E_TYPEDEFS
#else
#ifndef E_UTILS_H

View File

@ -1,3 +1,6 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#ifdef E_TYPEDEFS
typedef struct _E_Zone E_Zone;