1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
|
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#ifdef E_TYPEDEFS
typedef enum _E_Zone_Edge
{
E_ZONE_EDGE_NONE,
E_ZONE_EDGE_LEFT,
E_ZONE_EDGE_RIGHT,
E_ZONE_EDGE_TOP,
E_ZONE_EDGE_BOTTOM,
E_ZONE_EDGE_TOP_LEFT,
E_ZONE_EDGE_TOP_RIGHT,
E_ZONE_EDGE_BOTTOM_RIGHT,
E_ZONE_EDGE_BOTTOM_LEFT
} E_Zone_Edge;
typedef struct _E_Zone E_Zone;
typedef struct _E_Event_Zone_Desk_Count_Set E_Event_Zone_Desk_Count_Set;
typedef struct _E_Event_Zone_Move_Resize E_Event_Zone_Move_Resize;
typedef struct _E_Event_Zone_Add E_Event_Zone_Add;
typedef struct _E_Event_Zone_Del E_Event_Zone_Del;
/* TODO: Move this to a general place? */
typedef struct _E_Event_Pointer_Warp E_Event_Pointer_Warp;
typedef struct _E_Event_Zone_Edge E_Event_Zone_Edge;
#else
#ifndef E_ZONE_H
#define E_ZONE_H
#define E_ZONE_TYPE 0xE0b0100d
struct _E_Zone
{
E_Object e_obj_inherit;
int x, y, w, h;
const char *name;
/* num matches the id of the xinerama screen
* this zone belongs to. */
unsigned int num;
E_Container *container;
int fullscreen;
Evas_Object *bg_object;
Evas_Object *bg_event_object;
Evas_Object *bg_clip_object;
Evas_Object *prev_bg_object;
Evas_Object *bg_scrollframe;
Evas_Object *transition_object;
int desk_x_count, desk_y_count;
int desk_x_current, desk_y_current;
E_Desk **desks;
Eina_List *handlers;
struct {
unsigned char switching : 1;
E_Shelf *es;
E_Event_Zone_Edge *ev;
E_Binding_Edge *bind;
} flip;
struct {
Ecore_X_Window top, right, bottom, left;
} edge;
struct {
Ecore_X_Window left_top, top_left, top_right, right_top,
right_bottom, bottom_right, bottom_left, left_bottom;
} corner;
E_Action *cur_mouse_action;
Eina_List *popups;
Ecore_Evas *black_ecore_evas;
Evas *black_evas;
Ecore_X_Window black_win;
int id;
struct {
int x, y, w, h;
Eina_Bool dirty : 1;
} useful_geometry;
};
struct _E_Event_Zone_Desk_Count_Set
{
E_Zone *zone;
};
struct _E_Event_Zone_Move_Resize
{
E_Zone *zone;
};
struct _E_Event_Zone_Add
{
E_Zone *zone;
};
struct _E_Event_Zone_Del
{
E_Zone *zone;
};
struct _E_Event_Pointer_Warp
{
struct {
int x, y;
} prev;
struct {
int x, y;
} curr;
};
struct _E_Event_Zone_Edge
{
E_Zone *zone;
E_Zone_Edge edge;
int x, y;
int modifiers;
};
EAPI int e_zone_init(void);
EAPI int e_zone_shutdown(void);
EAPI E_Zone *e_zone_new(E_Container *con, int num, int id, int x, int y, int w, int h);
EAPI void e_zone_name_set(E_Zone *zone, const char *name);
EAPI void e_zone_move(E_Zone *zone, int x, int y);
EAPI void e_zone_resize(E_Zone *zone, int w, int h);
EAPI void e_zone_move_resize(E_Zone *zone, int x, int y, int w, int h);
EAPI void e_zone_fullscreen_set(E_Zone *zone, int on);
EAPI E_Zone *e_zone_current_get(E_Container *con);
EAPI void e_zone_bg_reconfigure(E_Zone *zone);
EAPI void e_zone_flip_coords_handle(E_Zone *zone, int x, int y);
EAPI void e_zone_desk_count_set(E_Zone *zone, int x_count, int y_count);
EAPI void e_zone_desk_count_get(E_Zone *zone, int *x_count, int *y_count);
EAPI void e_zone_desk_flip_by(E_Zone *zone, int dx, int dy);
EAPI void e_zone_desk_flip_to(E_Zone *zone, int x, int y);
EAPI void e_zone_desk_linear_flip_by(E_Zone *zone, int dx);
EAPI void e_zone_desk_linear_flip_to(E_Zone *zone, int x);
EAPI void e_zone_edge_new(E_Zone_Edge edge);
EAPI void e_zone_edge_free(E_Zone_Edge edge);
EAPI void e_zone_edge_enable(void);
EAPI void e_zone_edge_disable(void);
EAPI void e_zone_edge_win_layer_set(E_Zone *zone, int layer);
EAPI void e_zone_useful_geometry_dirty(E_Zone *zone);
EAPI void e_zone_useful_geometry_get(E_Zone *zone, int *x, int *y, int *w, int *h);
extern EAPI int E_EVENT_ZONE_DESK_COUNT_SET;
extern EAPI int E_EVENT_ZONE_MOVE_RESIZE;
extern EAPI int E_EVENT_ZONE_ADD;
extern EAPI int E_EVENT_ZONE_DEL;
extern EAPI int E_EVENT_POINTER_WARP;
extern EAPI int E_EVENT_ZONE_EDGE_IN;
extern EAPI int E_EVENT_ZONE_EDGE_OUT;
extern EAPI int E_EVENT_ZONE_EDGE_MOVE;
#endif
#endif
|