Expedite initialize.
[framework/uifw/expedite.git] / src / bin / .svn / text-base / main.h.svn-base
1 #ifndef MAIN_H
2 #define MAIN_H
3
4 #ifdef HAVE_CONFIG_H
5 # include "config.h"
6 #endif
7
8 #include <stdio.h>
9 #include <stdlib.h>
10 #include <string.h>
11 #include <math.h>
12 #include <time.h>
13
14 #ifndef _MSC_VER
15 # include <sys/time.h>
16 #endif
17
18 #ifdef _WIN32
19 # include <windows.h>
20 #endif
21
22 #ifdef HAVE_EVIL
23 # include <Evil.h>
24 #endif
25
26 #include <Evas.h>
27 #if HAVE_EVAS_SOFTWARE_XLIB
28 #include "engine_software_xlib.h"
29 #endif
30 #if HAVE_EVAS_XRENDER_X11
31 #include "engine_xrender_x11.h"
32 #endif
33 #if HAVE_EVAS_OPENGL_X11
34 #include "engine_gl_x11.h"
35 #endif
36 #if HAVE_EVAS_SOFTWARE_XCB
37 #include "engine_software_xcb.h"
38 #endif
39 #if HAVE_EVAS_XRENDER_XCB
40 #include "engine_xrender_xcb.h"
41 #endif
42 #if HAVE_EVAS_SOFTWARE_GDI
43 #include "engine_software_gdi.h"
44 #endif
45 #if HAVE_EVAS_SOFTWARE_DDRAW
46 #include "engine_software_ddraw.h"
47 #endif
48 #if HAVE_EVAS_DIRECT3D
49 #include "engine_direct3d.h"
50 #endif
51 #if HAVE_EVAS_OPENGL_GLEW
52 #include "engine_gl_glew.h"
53 #endif
54 #if HAVE_EVAS_SOFTWARE_SDL
55 #include "engine_software_sdl.h"
56 #endif
57 #if HAVE_EVAS_OPENGL_SDL
58 #include "engine_gl_sdl.h"
59 #endif
60 #if HAVE_EVAS_FB
61 #include "engine_fb.h"
62 #endif
63 #if HAVE_EVAS_DIRECTFB
64 #include "engine_directfb.h"
65 #endif
66 #if HAVE_EVAS_QUARTZ
67 #include "engine_quartz.h"
68 #endif
69 #if HAVE_EVAS_SOFTWARE_16_X11
70 #include "engine_software_16_x11.h"
71 #endif
72 #if HAVE_EVAS_SOFTWARE_16_DDRAW
73 #include "engine_software_16_ddraw.h"
74 #endif
75 #if HAVE_EVAS_SOFTWARE_16_WINCE
76 #include "engine_software_16_wince.h"
77 #endif
78
79 #ifdef __cplusplus
80 extern "C"
81 {
82 #endif
83
84 #include "ui.h"
85 #include "about.h"
86
87 #define EVAS_FRAME_QUEUING      // for test
88
89 #define OBNUM 128
90 #define LOOPS 128
91
92 extern Evas *evas;
93 extern int   win_w, win_h;
94 extern int   loops;
95 extern int   fullscreen;
96
97 typedef struct _Expedite_Resolution Expedite_Resolution;
98 typedef struct _Expedite_Engine Expedite_Engine;
99
100 struct _Expedite_Resolution
101 {
102    const char *name;
103    int width;
104    int height;
105 };
106
107 struct _Expedite_Engine
108 {
109    const char *name;
110    Eina_Bool (*init)(const char *engine, int width, int height);
111    void (*loop)(void);
112    void (*shutdown)(void);
113 };
114
115 void         srnd(void);
116 unsigned int rnd(void);
117 double       get_time(void);
118 const char  *build_path(const char *filename);
119 void         engine_loop(void);
120 int          engine_abort(void);
121
122 #ifdef __cplusplus
123 }
124 #endif
125
126 #define KEY_STD \
127    if ((!strcmp(key, "Escape")) || (!strcmp(key, "q")) || (!strcmp(key, "Q")) || (!strcmp(key, "Return"))) \
128        { \
129           _cleanup(); \
130           ui_menu(); \
131        }
132
133 #define FPS_STD(x) \
134    if ((f >= loops) && (!done)) \
135        { \
136           double fps; \
137           fps = (double)f / t; \
138           ui_fps(fps); \
139           printf("%4.2f , %s\n", fps, x); \
140           done = 1; \
141        }
142
143 #define SLOW 5.0
144
145 #endif