changeset 204:eb6ff421da7e

Doc about mb_obj_t
author Thinker K.F. Li <thinker@branda.to>
date Wed, 10 Dec 2008 11:49:39 +0800
parents 1d485bf96480
children e91ba9e197bd
files include/mb_types.h
diffstat 1 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/include/mb_types.h	Wed Dec 10 09:17:16 2008 +0800
+++ b/include/mb_types.h	Wed Dec 10 11:49:39 2008 +0800
@@ -15,8 +15,16 @@
 
 struct _redraw_man;
 
+/*! \brief MadButterfly object.
+ *
+ * All objects (coord and shapes) should have mb_obj_t as first member
+ * variable.  obj_type is used to identify type of an object.  Please,
+ * use MBO_TYPE() to return this value.  MBO_TYPE() will type-casting the
+ * object to mb_obj_t and return obj_type.  MBO_TYPE() is a left-side
+ * value.
+ */
 struct _mb_obj {
-    int obj_type;
+    int obj_type;		/*!< \brief Type of a MadButterfly object. */
 };
 
 enum { MBO_DUMMY,
@@ -28,6 +36,7 @@
 };
 #define MBO_CLASS_MASK 0xf000
 #define MBO_CLASS(x) (((mb_obj_t *)(x))->obj_type & MBO_CLASS_MASK)
+/*! \brief Return type of a MadBufferly object. */
 #define MBO_TYPE(x) (((mb_obj_t *)(x))->obj_type)
 #define IS_MBO_SHAPES(obj) (MBO_CLASS(obj) == MBO_SHAPES)
 #define IS_MBO_COORD(obj) (MBO_TYPE(obj) == MB_COORD)