annotate include/mb_af.h @ 887:8a2d676d9fa3 abs_n_rel_center

Fix bug of clearing COF_TEMP_MARK. draw_shapes_in_dirty_areas() mark COF_TEMP_MARK on coords and clear them before leaving. But, it always clear the same one coord for several times and keep others untouched. It is a logical error. It can be avoided by avoiding to use the variable at mutliple place for different purpose in a function, and compiler will check it out by yelling that the variable is used before assigning a value.
author Thinker K.F. Li <thinker@codemud.net>
date Sun, 26 Sep 2010 14:07:05 +0800
parents 586e50f82c1f
children 5b58e74988bc
rev   line source
822
586e50f82c1f Unify coding style tag for emacs and vim.
Shih-Yuan Lee (FourDollars) <fourdollars@gmail.com>
parents: 456
diff changeset
1 // -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 4; -*-
586e50f82c1f Unify coding style tag for emacs and vim.
Shih-Yuan Lee (FourDollars) <fourdollars@gmail.com>
parents: 456
diff changeset
2 // vim: sw=4:ts=8:sts=4
456
26c302b47de1 Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
3 #ifndef __APP_H
26c302b47de1 Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
4 #define __APP_H
26c302b47de1 Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
5
26c302b47de1 Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
6 typedef struct _mbapp mbaf_t;
26c302b47de1 Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
7 struct _mbapp {
26c302b47de1 Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
8 void *rt;
26c302b47de1 Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
9 redraw_man_t *rdman;
26c302b47de1 Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
10 mb_sprite_t *rootsprite;
26c302b47de1 Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
11 mb_obj_t *root;
26c302b47de1 Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
12 subject_t *kbevents;
26c302b47de1 Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
13 void *private;
26c302b47de1 Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
14 };
26c302b47de1 Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
15 mbaf_t *mbaf_init(const char *module, const char *module_dir);
26c302b47de1 Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
16 void mbaf_set_data(mbaf_t *app,void *data);
26c302b47de1 Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
17 mb_tman_t *mbaf_get_timer(mbaf_t *app);
26c302b47de1 Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
18 void mbaf_loop(mbaf_t *app);
26c302b47de1 Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
19 #define MBAF_DATA(app,type) ((type *) ((app)->private))
26c302b47de1 Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
20 #define MBAF_RDMAN(app) (((mbaf_t *) app)->rdman)
26c302b47de1 Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
21 #define MBAF_KB_SUBJECT(app) ((app)->kbevents)
26c302b47de1 Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
22
26c302b47de1 Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
23 #include "mbbutton.h"
26c302b47de1 Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
24
26c302b47de1 Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
25 #endif /* __MBAF_H_ */