summaryrefslogtreecommitdiff
path: root/src/modules/physics/e_mod_physics_cfdata.c
blob: 8ef86d7bd9abedd430072259eaf2298b4d5a84ea (plain) (blame)
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
#include "e.h"
#include "e_mod_main.h"
#include "e_mod_physics_cfdata.h"

EAPI E_Config_DD *
e_mod_physics_cfdata_edd_init(void)
{
   E_Config_DD *conf_edd;

   conf_edd = E_CONFIG_DD_NEW("Physics_Config", Config);
#undef T
#undef D
#define T Config
#define D conf_edd
   E_CONFIG_VAL(D, T, config_version, INT);
   E_CONFIG_VAL(D, T, delay, UINT);
   E_CONFIG_VAL(D, T, max_mass, DOUBLE);
   E_CONFIG_VAL(D, T, gravity, DOUBLE);
   E_CONFIG_VAL(D, T, ignore_fullscreen, UCHAR);
   E_CONFIG_VAL(D, T, ignore_maximized, UCHAR);
   E_CONFIG_VAL(D, T, ignore_shelves, UCHAR);
   E_CONFIG_VAL(D, T, shelf.disable_move, UCHAR);
   E_CONFIG_VAL(D, T, shelf.disable_rotate, UCHAR);
   return conf_edd;
}

EAPI Config *
e_mod_physics_cfdata_config_new(void)
{
   Config *cfg;

   cfg = E_NEW(Config, 1);
   cfg->delay = 10;
   cfg->max_mass = 3.0;
   cfg->gravity = 0.0;
   cfg->ignore_fullscreen = EINA_TRUE;
   cfg->ignore_maximized = EINA_TRUE;
   cfg->ignore_shelves = EINA_TRUE;

   return cfg;
}

EAPI void
e_mod_cfdata_config_free(Config *cfg)
{
   free(cfg);
}