Mercurial > MadButterfly
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 | 1 #ifndef __X_SUPP_H_ |
2 #define __X_SUPP_H_ | |
3 | |
4 #include <X11/Xlib.h> | |
83 | 5 #include "mb_types.h" |
78 | 6 #include "mb_timer.h" |
7 #include "redraw_man.h" | |
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 | 23 typedef struct _X_MB_runtime X_MB_runtime_t; |
24 | |
83 | 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 | 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 | 33 |
34 #endif |