1 #ifndef E_MOD_TILING_H 2 # define E_MOD_TILING_H 3 4 # include <e.h> 5 6 # include <stdbool.h> 7 8 # include <assert.h> 9 10 # include "window_tree.h" 11 12 typedef struct _Config Config; 13 typedef struct _Tiling_Info Tiling_Info; 14 15 struct tiling_g 16 { 17 E_Module *module; 18 Config *config; 19 int log_domain; 20 21 Eina_List *gadget_instances; 22 int gadget_number; 23 }; 24 extern struct tiling_g tiling_g; 25 26 # undef ERR 27 # undef DBG 28 # define ERR(...) EINA_LOG_DOM_ERR(tiling_g.log_domain, __VA_ARGS__) 29 # define DBG(...) EINA_LOG_DOM_DBG(tiling_g.log_domain, __VA_ARGS__) 30 31 # define TILING_MAX_PADDING 50 32 33 struct _Config_vdesk 34 { 35 int x, y; 36 unsigned int zone_num; 37 int nb_stacks; 38 }; 39 40 struct _Config 41 { 42 int window_padding; 43 int tile_dialogs; 44 int show_titles; 45 int have_floating_mode; 46 Eina_List *vdesks; 47 }; 48 49 struct _Tiling_Info 50 { 51 /* The desk for which this _Tiling_Info is used. Needed because (for 52 * example) on e restart all desks are shown on all zones but no change 53 * events are triggered */ 54 const E_Desk *desk; 55 56 struct _Config_vdesk *conf; 57 58 Window_Tree *tree; 59 }; 60 61 struct _E_Config_Dialog_Data 62 { 63 struct _Config config; 64 Evas_Object *o_zonelist; 65 Evas_Object *o_desklist; 66 Evas_Object *osf; 67 Evas *evas; 68 }; 69 70 E_Config_Dialog *e_int_config_tiling_module(Evas_Object *parent, const char *params); 71 72 E_API extern E_Module_Api e_modapi; 73 74 E_API void *e_modapi_init(E_Module *m); 75 E_API int e_modapi_shutdown(E_Module *m); 76 E_API int e_modapi_save(E_Module *m); 77 78 void change_desk_conf(struct _Config_vdesk *newconf); 79 80 void e_tiling_update_conf(void); 81 82 struct _Config_vdesk *get_vdesk(Eina_List *vdesks, int x, int y, 83 unsigned int zone_num); 84 85 void tiling_e_client_move_resize_extra(E_Client *ec, int x, int y, int w, 86 int h); 87 void tiling_e_client_does_not_fit(E_Client *ec); 88 # define EINA_LIST_IS_IN(_list, _el) \ 89 (eina_list_data_find(_list, _el) == _el) 90 # define EINA_LIST_APPEND(_list, _el) \ 91 _list = eina_list_append(_list, _el) 92 # define EINA_LIST_REMOVE(_list, _el) \ 93 _list = eina_list_remove(_list, _el) 94 95 # define _TILE_MIN(a, b) (((a) < (b)) ? (a) : (b)) 96 # define _TILE_MAX(a, b) (((a) > (b)) ? (a) : (b)) 97 98 #endif 99