1 #ifdef E_TYPEDEFS 2 3 typedef enum _E_Zone_Edge 4 { 5 E_ZONE_EDGE_NONE, 6 E_ZONE_EDGE_LEFT, 7 E_ZONE_EDGE_RIGHT, 8 E_ZONE_EDGE_TOP, 9 E_ZONE_EDGE_BOTTOM, 10 E_ZONE_EDGE_TOP_LEFT, 11 E_ZONE_EDGE_TOP_RIGHT, 12 E_ZONE_EDGE_BOTTOM_RIGHT, 13 E_ZONE_EDGE_BOTTOM_LEFT 14 } E_Zone_Edge; 15 16 typedef struct _E_Zone E_Zone; 17 18 typedef struct _E_Event_Zone_Generic E_Event_Zone_Desk_Count_Set; 19 typedef struct _E_Event_Zone_Generic E_Event_Zone_Move_Resize; 20 typedef struct _E_Event_Zone_Generic E_Event_Zone_Add; 21 typedef struct _E_Event_Zone_Generic E_Event_Zone_Del; 22 /* TODO: Move this to a general place? */ 23 typedef struct _E_Event_Pointer_Warp E_Event_Pointer_Warp; 24 typedef struct _E_Event_Zone_Edge E_Event_Zone_Edge; 25 typedef struct _E_Event_Zone_Generic E_Event_Zone_Stow; 26 typedef struct _E_Event_Zone_Generic E_Event_Zone_Unstow; 27 28 typedef struct _E_Zone_Obstacle E_Zone_Obstacle; 29 30 #else 31 #ifndef E_ZONE_H 32 #define E_ZONE_H 33 34 #define E_ZONE_TYPE (int)0xE0b0100d 35 #define E_ZONE_OBSTACLE_TYPE (int)0xE0b0110d 36 37 struct _E_Zone 38 { 39 E_Object e_obj_inherit; 40 41 int x, y, w, h; 42 const char *name; 43 /* num matches the id of the xinerama screen 44 * this zone belongs to. */ 45 unsigned int num; 46 int fullscreen; 47 48 Evas_Object *bg_object; 49 Evas_Object *bg_event_object; 50 Evas_Object *bg_clip_object; 51 Evas_Object *prev_bg_object; 52 Evas_Object *transition_object; 53 54 int desk_x_count, desk_y_count; 55 int desk_x_current, desk_y_current; 56 int desk_x_prev, desk_y_prev; 57 E_Desk **desks; 58 Eina_Inlist *obstacles; 59 60 Eina_List *handlers; 61 62 /* formerly E_Comp_Zone */ 63 Evas_Object *base; 64 Evas_Object *over; 65 66 E_Backlight_Mode bl_mode; 67 double bl; 68 Eina_Bool bloff; 69 70 struct 71 { 72 E_Zone_Edge switching; 73 E_Shelf *es; 74 E_Event_Zone_Edge *ev; 75 E_Binding_Edge *bind; 76 } flip; 77 78 struct 79 { 80 Evas_Object *top, *right, *bottom, *left; 81 } edge; 82 struct 83 { 84 Evas_Object *left_top, *top_left, *top_right, *right_top, 85 *right_bottom, *bottom_right, *bottom_left, *left_bottom; 86 } corner; 87 88 E_Action *cur_mouse_action; 89 90 int id; 91 92 void *output; 93 94 Eina_Rectangle useful_geometry[2]; 95 char *randr2_id; // same id we get from randr2 so look it up there 96 Eina_Bool useful_geometry_changed E_BITFIELD; 97 Eina_Bool useful_geometry_dirty E_BITFIELD; 98 Eina_Bool stowed E_BITFIELD; 99 Eina_Bool desk_flip_sync E_BITFIELD; 100 }; 101 102 struct _E_Event_Zone_Generic 103 { 104 E_Zone *zone; 105 }; 106 107 struct _E_Event_Pointer_Warp 108 { 109 struct 110 { 111 int x, y; 112 } prev; 113 struct 114 { 115 int x, y; 116 } curr; 117 }; 118 119 struct _E_Event_Zone_Edge 120 { 121 E_Zone *zone; 122 E_Zone_Edge edge; 123 int x, y; 124 int modifiers; 125 int button; 126 Eina_Bool drag E_BITFIELD; 127 }; 128 129 struct _E_Zone_Obstacle 130 { 131 E_Object e_obj_inherit; 132 EINA_INLIST; 133 int x, y, w, h; 134 E_Object *owner; 135 Eina_Bool vertical E_BITFIELD; 136 }; 137 138 EINTERN int e_zone_init(void); 139 EINTERN int e_zone_shutdown(void); 140 E_API E_Zone *e_zone_new(int num, int id, int x, int y, int w, int h); 141 E_API void e_zone_name_set(E_Zone *zone, const char *name); 142 E_API void e_zone_move(E_Zone *zone, int x, int y); 143 E_API void e_zone_resize(E_Zone *zone, int w, int h); 144 E_API Eina_Bool e_zone_move_resize(E_Zone *zone, int x, int y, int w, int h); 145 E_API E_Zone *e_zone_current_get(void); 146 E_API void e_zone_bg_reconfigure(E_Zone *zone); 147 E_API void e_zone_flip_coords_handle(E_Zone *zone, int x, int y); 148 E_API void e_zone_desk_count_set(E_Zone *zone, int x_count, int y_count); 149 E_API void e_zone_desk_count_get(E_Zone *zone, int *x_count, int *y_count); 150 E_API void e_zone_desk_flip_by(E_Zone *zone, int dx, int dy); 151 E_API void e_zone_desk_flip_to(E_Zone *zone, int x, int y); 152 E_API void e_zone_desk_linear_flip_by(E_Zone *zone, int dx); 153 E_API void e_zone_desk_linear_flip_to(E_Zone *zone, int x); 154 E_API void e_zone_edge_flip_eval(E_Zone *zone); 155 E_API void e_zone_edge_new(E_Zone_Edge edge); 156 E_API void e_zone_edge_free(E_Zone_Edge edge); 157 E_API void e_zone_edge_enable(void); 158 E_API void e_zone_edge_disable(void); 159 E_API void e_zone_edges_desk_flip_capable(E_Zone *zone, Eina_Bool l, Eina_Bool r, Eina_Bool t, Eina_Bool b); 160 E_API Eina_Bool e_zone_exists_direction(E_Zone *zone, E_Zone_Edge edge); 161 E_API void e_zone_edge_win_layer_set(E_Zone *zone, E_Layer layer); 162 163 E_API void e_zone_useful_geometry_dirty(E_Zone *zone); 164 E_API Eina_Bool e_zone_useful_geometry_get(E_Zone *zone, int *x, int *y, int *w, int *h); 165 E_API void e_zone_desk_useful_geometry_get(const E_Zone *zone, const E_Desk *desk, int *x, int *y, int *w, int *h); 166 E_API void e_zone_stow(E_Zone *zone); 167 E_API void e_zone_unstow(E_Zone *zone); 168 169 E_API void e_zone_fade_handle(E_Zone *zone, int out, double tim); 170 171 E_API E_Zone_Obstacle *e_zone_obstacle_add(E_Zone *zone, E_Desk *desk, Eina_Rectangle *geom, Eina_Bool vertical); 172 E_API void e_zone_obstacle_modify(E_Zone_Obstacle *obs, Eina_Rectangle *geom, Eina_Bool vertical); 173 174 E_API E_Zone *e_zone_for_id_get(const char *id); 175 176 extern E_API int E_EVENT_ZONE_DESK_COUNT_SET; 177 extern E_API int E_EVENT_ZONE_MOVE_RESIZE; 178 extern E_API int E_EVENT_ZONE_USEFUL_GEOMETRY_CHANGED; 179 extern E_API int E_EVENT_ZONE_ADD; 180 extern E_API int E_EVENT_ZONE_DEL; 181 extern E_API int E_EVENT_POINTER_WARP; 182 extern E_API int E_EVENT_ZONE_EDGE_IN; 183 extern E_API int E_EVENT_ZONE_EDGE_OUT; 184 extern E_API int E_EVENT_ZONE_EDGE_MOVE; 185 extern E_API int E_EVENT_ZONE_STOW; 186 extern E_API int E_EVENT_ZONE_UNSTOW; 187 188 #endif 189 #endif 190