2012-05-02 01:20:53 -07:00
|
|
|
#ifndef E_MOD_TILING_H
|
2014-02-04 08:24:44 -08:00
|
|
|
# define E_MOD_TILING_H
|
2012-05-02 01:20:53 -07:00
|
|
|
|
2014-02-04 08:24:44 -08:00
|
|
|
# include <e.h>
|
2012-05-02 01:20:53 -07:00
|
|
|
|
2014-02-04 08:24:44 -08:00
|
|
|
# include <stdbool.h>
|
2012-05-02 01:20:53 -07:00
|
|
|
|
2014-02-04 08:24:44 -08:00
|
|
|
# include <assert.h>
|
2012-09-01 10:15:27 -07:00
|
|
|
|
2014-02-04 08:24:44 -08:00
|
|
|
# include "window_tree.h"
|
2014-01-13 04:18:48 -08:00
|
|
|
|
2014-02-10 01:27:57 -08:00
|
|
|
typedef struct _Config Config;
|
2012-05-02 01:20:53 -07:00
|
|
|
typedef struct _Tiling_Info Tiling_Info;
|
|
|
|
|
|
|
|
struct tiling_g
|
|
|
|
{
|
2014-02-10 01:27:57 -08:00
|
|
|
E_Module *module;
|
|
|
|
Config *config;
|
|
|
|
int log_domain;
|
2014-02-06 08:06:32 -08:00
|
|
|
|
|
|
|
Eina_List *gadget_instances;
|
2014-02-10 01:27:57 -08:00
|
|
|
int gadget_number;
|
2012-05-02 01:20:53 -07:00
|
|
|
};
|
|
|
|
extern struct tiling_g tiling_g;
|
|
|
|
|
2014-02-04 08:24:44 -08:00
|
|
|
# undef ERR
|
|
|
|
# undef DBG
|
|
|
|
# define ERR(...) EINA_LOG_DOM_ERR(tiling_g.log_domain, __VA_ARGS__)
|
|
|
|
# define DBG(...) EINA_LOG_DOM_DBG(tiling_g.log_domain, __VA_ARGS__)
|
2012-05-02 01:20:53 -07:00
|
|
|
|
2014-02-07 01:55:47 -08:00
|
|
|
# define TILING_MAX_PADDING 50
|
|
|
|
|
2012-05-02 01:20:53 -07:00
|
|
|
struct _Config_vdesk
|
|
|
|
{
|
2014-02-10 01:27:57 -08:00
|
|
|
int x, y;
|
2014-02-04 08:24:44 -08:00
|
|
|
unsigned int zone_num;
|
2014-02-10 01:27:57 -08:00
|
|
|
int nb_stacks;
|
2012-05-02 01:20:53 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _Config
|
|
|
|
{
|
2014-02-10 01:27:57 -08:00
|
|
|
int window_padding;
|
|
|
|
int tile_dialogs;
|
|
|
|
int show_titles;
|
|
|
|
int have_floating_mode;
|
2014-02-04 08:24:44 -08:00
|
|
|
Eina_List *vdesks;
|
2012-05-02 01:20:53 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _Tiling_Info
|
|
|
|
{
|
2014-02-04 08:24:44 -08:00
|
|
|
/* The desk for which this _Tiling_Info is used. Needed because (for
|
|
|
|
* example) on e restart all desks are shown on all zones but no change
|
|
|
|
* events are triggered */
|
2014-02-10 01:27:57 -08:00
|
|
|
const E_Desk *desk;
|
2012-05-02 01:20:53 -07:00
|
|
|
|
2014-02-04 08:24:44 -08:00
|
|
|
struct _Config_vdesk *conf;
|
2012-05-02 01:20:53 -07:00
|
|
|
|
2014-02-10 01:27:57 -08:00
|
|
|
Window_Tree *tree;
|
2012-05-02 01:20:53 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _E_Config_Dialog_Data
|
|
|
|
{
|
|
|
|
struct _Config config;
|
2014-02-10 01:27:57 -08:00
|
|
|
Evas_Object *o_zonelist;
|
|
|
|
Evas_Object *o_desklist;
|
|
|
|
Evas_Object *osf;
|
|
|
|
Evas *evas;
|
2012-05-02 01:20:53 -07:00
|
|
|
};
|
|
|
|
|
2014-11-02 18:35:13 -08:00
|
|
|
E_Config_Dialog *e_int_config_tiling_module(Evas_Object *parent, const char *params);
|
2012-05-02 01:20:53 -07:00
|
|
|
|
2015-05-07 12:13:10 -07:00
|
|
|
E_API extern E_Module_Api e_modapi;
|
2012-05-02 01:20:53 -07:00
|
|
|
|
2015-05-07 12:13:10 -07:00
|
|
|
E_API void *e_modapi_init(E_Module *m);
|
|
|
|
E_API int e_modapi_shutdown(E_Module *m);
|
|
|
|
E_API int e_modapi_save(E_Module *m);
|
2012-05-02 01:20:53 -07:00
|
|
|
|
2014-02-10 01:27:57 -08:00
|
|
|
void change_desk_conf(struct _Config_vdesk *newconf);
|
2012-05-02 01:20:53 -07:00
|
|
|
|
2014-02-10 01:27:57 -08:00
|
|
|
void e_tiling_update_conf(void);
|
2012-05-02 01:20:53 -07:00
|
|
|
|
2014-02-10 01:27:57 -08:00
|
|
|
struct _Config_vdesk *get_vdesk(Eina_List *vdesks, int x, int y,
|
|
|
|
unsigned int zone_num);
|
2014-02-04 08:24:44 -08:00
|
|
|
|
2014-02-10 01:27:57 -08:00
|
|
|
void tiling_e_client_move_resize_extra(E_Client *ec, int x, int y, int w,
|
|
|
|
int h);
|
2014-08-28 08:30:17 -07:00
|
|
|
void tiling_e_client_does_not_fit(E_Client *ec);
|
2014-02-04 08:24:44 -08:00
|
|
|
# define EINA_LIST_IS_IN(_list, _el) \
|
2014-02-10 01:27:57 -08:00
|
|
|
(eina_list_data_find(_list, _el) == _el)
|
2014-02-04 08:24:44 -08:00
|
|
|
# define EINA_LIST_APPEND(_list, _el) \
|
2014-02-10 01:27:57 -08:00
|
|
|
_list = eina_list_append(_list, _el)
|
2014-02-04 08:24:44 -08:00
|
|
|
# define EINA_LIST_REMOVE(_list, _el) \
|
2014-02-10 01:27:57 -08:00
|
|
|
_list = eina_list_remove(_list, _el)
|
2012-05-02 01:20:53 -07:00
|
|
|
|
2014-02-04 08:24:44 -08:00
|
|
|
# define _TILE_MIN(a, b) (((a) < (b)) ? (a) : (b))
|
|
|
|
# define _TILE_MAX(a, b) (((a) > (b)) ? (a) : (b))
|
2014-01-20 04:08:12 -08:00
|
|
|
|
2012-05-02 01:20:53 -07:00
|
|
|
#endif
|