Mercurial > MadButterfly
comparison src/mbaf/mbobject.c @ 822:586e50f82c1f
Unify coding style tag for emacs and vim.
author | Shih-Yuan Lee (FourDollars) <fourdollars@gmail.com> |
---|---|
date | Tue, 14 Sep 2010 01:08:39 +0800 |
parents | f894b30676e9 |
children | 152bc503dc99 |
comparison
equal
deleted
inserted
replaced
821:bfdc82bbd6e4 | 822:586e50f82c1f |
---|---|
1 // -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 4; -*- | |
2 // vim: sw=4:ts=8:sts=4 | |
1 #include "mb_types.h" | 3 #include "mb_types.h" |
2 #include "mb_obj.h" | 4 #include "mb_obj.h" |
3 | 5 |
4 | 6 |
5 void mb_obj_set_pos(mb_obj_t *obj, co_aix x, co_aix y) | 7 void mb_obj_set_pos(mb_obj_t *obj, co_aix x, co_aix y) |
10 } else if (MBO_TYPE(obj) == MBO_TEXT) { | 12 } else if (MBO_TYPE(obj) == MBO_TEXT) { |
11 sh_text_set_pos((shape_t *) obj, x, y); | 13 sh_text_set_pos((shape_t *) obj, x, y); |
12 } else { | 14 } else { |
13 return; | 15 return; |
14 } | 16 } |
15 | 17 |
16 } | 18 } |
17 | 19 |
18 void mb_obj_get_pos(mb_obj_t *obj, co_aix *x, co_aix *y) | 20 void mb_obj_get_pos(mb_obj_t *obj, co_aix *x, co_aix *y) |
19 { | 21 { |
20 if (MBO_TYPE(obj) == MBO_COORD) { | 22 if (MBO_TYPE(obj) == MBO_COORD) { |
23 } else if (MBO_TYPE(obj) == MBO_TEXT) { | 25 } else if (MBO_TYPE(obj) == MBO_TEXT) { |
24 sh_text_get_pos((shape_t *) obj, x, y); | 26 sh_text_get_pos((shape_t *) obj, x, y); |
25 } else { | 27 } else { |
26 return; | 28 return; |
27 } | 29 } |
28 | 30 |
29 } | 31 } |
30 | 32 |
31 void mb_obj_set_text(mb_obj_t *obj, const char *text) | 33 void mb_obj_set_text(mb_obj_t *obj, const char *text) |
32 { | 34 { |
33 if (MBO_TYPE(obj) == MBO_COORD) { | 35 if (MBO_TYPE(obj) == MBO_COORD) { |
45 } else if (MBO_TYPE(obj) == MBO_TEXT) { | 47 } else if (MBO_TYPE(obj) == MBO_TEXT) { |
46 sh_text_set_text((shape_t *) obj,text); | 48 sh_text_set_text((shape_t *) obj,text); |
47 } else { | 49 } else { |
48 return; | 50 return; |
49 } | 51 } |
50 | 52 |
51 } | 53 } |
52 | 54 |
53 | 55 |
54 void mb_obj_get_text(mb_obj_t *obj, char *text,int size) | 56 void mb_obj_get_text(mb_obj_t *obj, char *text,int size) |
55 { | 57 { |