summaryrefslogtreecommitdiff
path: root/src/main.c
blob: 80567469af3b6e7249435b38d2a900d5c446cb8b (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#include "e.h"

#ifdef E_PROF
Evas_List __e_profiles = NULL;
#endif

static void cb_exit(void);
static void cb_exit(void)
{
   E_PROF_DUMP;
}

static void ch_col(int val, void *data);
static void ch_col(int val, void *data)
{
   E_Desktop *desk;
   double v;
   
   v = (double)val / 10;
   desk = e_desktops_get(e_desktops_get_current());
   e_desktops_scroll(desk, (int)(8 * sin(v)), (int)(8 * cos(v)));
   e_add_event_timer("time", 0.02, ch_col, val + 1, NULL);
   return;
   UN(data);
}

void setup(void);
void
setup(void)
{
   e_grab();
   e_window_set_events(0, XEV_CHILD_REDIRECT | XEV_PROPERTY | XEV_COLORMAP);
   e_border_adopt_children(0);
   e_ungrab();
/*   e_add_event_timer("timer", 0.02, ch_col, 0, NULL);*/
}

int
main(int argc, char **argv)
{
   atexit(cb_exit);
   e_exec_set_args(argc, argv);
   
   e_config_init();
   e_display_init(NULL);
   e_ev_signal_init();
   e_event_filter_init();
   e_ev_x_init();

   e_pack_object_init();
   e_fs_init();
   e_desktops_init();
   e_border_init();
   e_actions_init();
   e_menu_init();
   e_view_init();
   e_entry_init();
   e_ipc_init();
   e_keys_init();
   
   setup();
   
   e_event_loop();

   return 0;
   UN(argc);
   UN(argv);
}