annotate src/X_supp.h @ 159:b90abd31a281

Postponse free of coords, shapes, and paints when the rdman is dirty. - Life-cycle of shapes and paints are managed by rdman. - Add redraw_man_t::free_objs to collect objects their freeing are postonsed. Know Issue: - Bullet of tank are not removed from screen when it is go out the range of the map.
author Thinker K.F. Li <thinker@branda.to>
date Sun, 05 Oct 2008 23:32:58 +0800
parents 6a8588df68af
children
rev   line source
78
3645e29e4986 Add runtime for Xlib.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
1 #ifndef __X_SUPP_H_
3645e29e4986 Add runtime for Xlib.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
2 #define __X_SUPP_H_
3645e29e4986 Add runtime for Xlib.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
3
3645e29e4986 Add runtime for Xlib.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
4 #include <X11/Xlib.h>
83
ea758bb3bbe2 example
Thinker K.F. Li <thinker@branda.to>
parents: 78
diff changeset
5 #include "mb_types.h"
78
3645e29e4986 Add runtime for Xlib.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
6 #include "mb_timer.h"
3645e29e4986 Add runtime for Xlib.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
7 #include "redraw_man.h"
3645e29e4986 Add runtime for Xlib.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
8
122
17e97e92b76e Encapsulate X_MB_runtime_t and support X keyboard events.
Thinker K.F. Li <thinker@branda.to>
parents: 83
diff changeset
9 /*! \ingroup xkb
17e97e92b76e Encapsulate X_MB_runtime_t and support X keyboard events.
Thinker K.F. Li <thinker@branda.to>
parents: 83
diff changeset
10 * @{
17e97e92b76e Encapsulate X_MB_runtime_t and support X keyboard events.
Thinker K.F. Li <thinker@branda.to>
parents: 83
diff changeset
11 */
17e97e92b76e Encapsulate X_MB_runtime_t and support X keyboard events.
Thinker K.F. Li <thinker@branda.to>
parents: 83
diff changeset
12 typedef struct _X_kb_info X_kb_info_t;
17e97e92b76e Encapsulate X_MB_runtime_t and support X keyboard events.
Thinker K.F. Li <thinker@branda.to>
parents: 83
diff changeset
13
17e97e92b76e Encapsulate X_MB_runtime_t and support X keyboard events.
Thinker K.F. Li <thinker@branda.to>
parents: 83
diff changeset
14 struct _X_kb_event {
17e97e92b76e Encapsulate X_MB_runtime_t and support X keyboard events.
Thinker K.F. Li <thinker@branda.to>
parents: 83
diff changeset
15 event_t event;
17e97e92b76e Encapsulate X_MB_runtime_t and support X keyboard events.
Thinker K.F. Li <thinker@branda.to>
parents: 83
diff changeset
16 int keycode;
17e97e92b76e Encapsulate X_MB_runtime_t and support X keyboard events.
Thinker K.F. Li <thinker@branda.to>
parents: 83
diff changeset
17 int sym;
17e97e92b76e Encapsulate X_MB_runtime_t and support X keyboard events.
Thinker K.F. Li <thinker@branda.to>
parents: 83
diff changeset
18 };
17e97e92b76e Encapsulate X_MB_runtime_t and support X keyboard events.
Thinker K.F. Li <thinker@branda.to>
parents: 83
diff changeset
19 typedef struct _X_kb_event X_kb_event_t;
17e97e92b76e Encapsulate X_MB_runtime_t and support X keyboard events.
Thinker K.F. Li <thinker@branda.to>
parents: 83
diff changeset
20
17e97e92b76e Encapsulate X_MB_runtime_t and support X keyboard events.
Thinker K.F. Li <thinker@branda.to>
parents: 83
diff changeset
21 /* @} */
17e97e92b76e Encapsulate X_MB_runtime_t and support X keyboard events.
Thinker K.F. Li <thinker@branda.to>
parents: 83
diff changeset
22
78
3645e29e4986 Add runtime for Xlib.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
23 typedef struct _X_MB_runtime X_MB_runtime_t;
3645e29e4986 Add runtime for Xlib.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
24
83
ea758bb3bbe2 example
Thinker K.F. Li <thinker@branda.to>
parents: 78
diff changeset
25 extern void X_MB_handle_connection(X_MB_runtime_t *rt);
122
17e97e92b76e Encapsulate X_MB_runtime_t and support X keyboard events.
Thinker K.F. Li <thinker@branda.to>
parents: 83
diff changeset
26 extern X_MB_runtime_t *X_MB_new(const char *display_name, int w, int h);
17e97e92b76e Encapsulate X_MB_runtime_t and support X keyboard events.
Thinker K.F. Li <thinker@branda.to>
parents: 83
diff changeset
27 extern void X_MB_free(X_MB_runtime_t *xmb_rt);
78
3645e29e4986 Add runtime for Xlib.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
28
122
17e97e92b76e Encapsulate X_MB_runtime_t and support X keyboard events.
Thinker K.F. Li <thinker@branda.to>
parents: 83
diff changeset
29 extern subject_t *X_MB_kbevents(X_MB_runtime_t *xmb_rt);
17e97e92b76e Encapsulate X_MB_runtime_t and support X keyboard events.
Thinker K.F. Li <thinker@branda.to>
parents: 83
diff changeset
30 extern redraw_man_t *X_MB_rdman(X_MB_runtime_t *xmb_rt);
17e97e92b76e Encapsulate X_MB_runtime_t and support X keyboard events.
Thinker K.F. Li <thinker@branda.to>
parents: 83
diff changeset
31 extern mb_tman_t *X_MB_tman(X_MB_runtime_t *xmb_rt);
131
6a8588df68af Tank can change direction and navigate on the mud area
Thinker K.F. Li <thinker@branda.to>
parents: 122
diff changeset
32 extern ob_factory_t *X_MB_ob_factory(X_MB_runtime_t *xmb_rt);
78
3645e29e4986 Add runtime for Xlib.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
33
3645e29e4986 Add runtime for Xlib.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
34 #endif