summaryrefslogtreecommitdiff
path: root/src/e_mod_main.h
blob: 96247e4d981b7254fcf9dc246976fe896b96e265 (plain)
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
#ifndef E_MOD_MAIN_H
#define E_MOD_MAIN_H

#ifdef HAVE_CONFIG_H
# include "config.h"
#endif

#include <e.h>
#include <Efx.h>

#ifdef ENABLE_NLS
# include <libintl.h>
# define D_(str) dgettext(PACKAGE, str)
# define DP_(str, str_p, n) dngettext(PACKAGE, str, str_p, n)
#else
# define bindtextdomain(domain,dir)
# define bind_textdomain_codeset(domain,codeset)
# define D_(str) (str)
# define DP_(str, str_p, n) (str_p)
#endif

#define N_(str) (str)

#define MOD_CONFIG_FILE_EPOCH 0
#define MOD_CONFIG_FILE_GENERATION 1
#define MOD_CONFIG_FILE_VERSION ((MOD_CONFIG_FILE_EPOCH * 1000000) + MOD_CONFIG_FILE_GENERATION)

typedef enum
{
   DS_PAN, //slide desk in direction of flip
   DS_FADE_OUT, //current desk fades to transparent
   DS_FADE_IN, //new desk fades in from transparent
   DS_BATMAN, //adam west is calling
   DS_ZOOM_IN, //zoom in to new desk
   DS_ZOOM_OUT, //zoom out from old desk
   DS_GROW, //grow the view of the new desk based on flip direction
   DS_ROTATE_OUT, //spiral current desk out while shrinking
   DS_ROTATE_IN, //spiral new desk in while growing
   DS_SLIDE_SPLIT, //split screen in X parts and slide away based on flip direction
   DS_QUAD_SPLIT, //split screen into quads and move towards corners
   DS_QUAD_MERGE, //split screen into quads and move towards center
   DS_BLINK, //like blinking your eye
   DS_VIEWPORT, //current desk viewport shrinks towards 1x1 at center
   DS_LAST,
} DS_Type;

typedef struct Mod
{
   E_Config_Dialog *cfd;
   E_Module *module;
   Eina_Stringshare *edje_file;
} Mod;

typedef struct Config_Types
{
   Eina_Bool disable_PAN;
   Eina_Bool disable_FADE_OUT;
   Eina_Bool disable_FADE_IN;
   Eina_Bool disable_BATMAN;
   Eina_Bool disable_ZOOM_IN;
   Eina_Bool disable_ZOOM_OUT;
   Eina_Bool disable_GROW;
   Eina_Bool disable_ROTATE_OUT;
   Eina_Bool disable_ROTATE_IN;
   Eina_Bool disable_SLIDE_SPLIT;
   Eina_Bool disable_QUAD_SPLIT;
   Eina_Bool disable_QUAD_MERGE;
   Eina_Bool disable_BLINK;
   Eina_Bool disable_VIEWPORT;
} Config_Types;

typedef struct Config
{
   unsigned int config_version;
   Eina_Bool disable_ruler;
   Eina_Bool disable_maximize;
   Eina_Bool disable_transitions;
   unsigned int disabled_transition_count;
   Config_Types types;
} Config;


extern Mod *mod;
extern Config *ds_config;

EINTERN void ds_fade_setup(E_Comp *comp);
EINTERN void ds_fade_end(Ecore_Cb cb);

EINTERN void ds_init(void);
EINTERN void ds_shutdown(void);

EINTERN void mr_shutdown(void);
EINTERN void mr_init(void);

EINTERN void maximize_init(void);
EINTERN void maximize_shutdown(void);

EINTERN void pip_init(void);
EINTERN void pip_shutdown(void);

EINTERN void ds_config_init(void);
EINTERN void ds_config_shutdown(void);

EINTERN void zoom_init(void);
EINTERN void zoom_shutdown(void);
#endif