summaryrefslogtreecommitdiff
path: root/components/rtgui/include
diff options
context:
space:
mode:
author[email protected] <[email protected]>2010-08-23 23:33:17 +0000
committer[email protected] <[email protected]>2010-08-23 23:33:17 +0000
commit4f6e6dab8ae1463c13874490077f72b529346692 (patch)
tree16c3e9daceb2c63469cd56020d00f31141a0e9cb /components/rtgui/include
parentc2507af6bc0162bae42b65e6f40a8163c656d4d4 (diff)
rename orientation to orient.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@878 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components/rtgui/include')
-rw-r--r--components/rtgui/include/rtgui/rtgui.h15
-rw-r--r--components/rtgui/include/rtgui/widgets/box.h2
-rw-r--r--components/rtgui/include/rtgui/widgets/button.h1
-rw-r--r--components/rtgui/include/rtgui/widgets/checkbox.h5
-rw-r--r--components/rtgui/include/rtgui/widgets/progressbar.h2
-rw-r--r--components/rtgui/include/rtgui/widgets/staticline.h2
6 files changed, 9 insertions, 18 deletions
diff --git a/components/rtgui/include/rtgui/rtgui.h b/components/rtgui/include/rtgui/rtgui.h
index 3fc9bf3af8..353e3b7656 100644
--- a/components/rtgui/include/rtgui/rtgui.h
+++ b/components/rtgui/include/rtgui/rtgui.h
@@ -31,6 +31,7 @@ typedef struct rtgui_panel rtgui_panel_t;
typedef struct rtgui_win rtgui_win_t;
typedef struct rtgui_workbench rtgui_workbench_t;
typedef rt_bool_t (*rtgui_event_handler_ptr)(struct rtgui_widget* widget, struct rtgui_event* event);
+typedef void (*rtgui_onbutton_func_t)(struct rtgui_widget* widget, rtgui_event_t *event);
struct rtgui_point
{
@@ -105,20 +106,6 @@ enum RTGUI_ALIGN
RTGUI_ALIGN_STRETCH = 0x20,
};
-enum RTGUI_TEXTATTR
-{
- RTGUI_TEXTATTR_NORMAL = 0x0000,
- RTGUI_TEXTATTR_
-};
-
-enum RTGUI_ARRAW
-{
- RTGUI_ARRAW_UP = 0,
- RTGUI_ARRAW_DOWN,
- RTGUI_ARRAW_LEFT,
- RTGUI_ARRAW_RIGHT
-};
-
enum RTGUI_MODAL_CODE
{
RTGUI_MODAL_OK,
diff --git a/components/rtgui/include/rtgui/widgets/box.h b/components/rtgui/include/rtgui/widgets/box.h
index 69a0a01a56..8c963b26f0 100644
--- a/components/rtgui/include/rtgui/widgets/box.h
+++ b/components/rtgui/include/rtgui/widgets/box.h
@@ -33,7 +33,7 @@ struct rtgui_box
{
struct rtgui_container parent;
- rt_uint16_t orientation;
+ rt_uint16_t orient;
rt_uint16_t border_size;
};
typedef struct rtgui_box rtgui_box_t;
diff --git a/components/rtgui/include/rtgui/widgets/button.h b/components/rtgui/include/rtgui/widgets/button.h
index 8b6b18fb73..f5a0c97969 100644
--- a/components/rtgui/include/rtgui/widgets/button.h
+++ b/components/rtgui/include/rtgui/widgets/button.h
@@ -58,7 +58,6 @@ struct rtgui_button
void (*on_button)(struct rtgui_widget* widget, rtgui_event_t *event);
};
typedef struct rtgui_button rtgui_button_t;
-typedef void (*rtgui_onbutton_func_t)(struct rtgui_widget* widget, rtgui_event_t *event);
rtgui_type_t *rtgui_button_type_get(void);
diff --git a/components/rtgui/include/rtgui/widgets/checkbox.h b/components/rtgui/include/rtgui/widgets/checkbox.h
index 65ca03d29c..0cbe7c9e34 100644
--- a/components/rtgui/include/rtgui/widgets/checkbox.h
+++ b/components/rtgui/include/rtgui/widgets/checkbox.h
@@ -22,6 +22,9 @@ struct rtgui_checkbox
/* check box status */
rt_uint8_t status_down;
+
+ /* click button event handler */
+ void (*on_button)(struct rtgui_widget* widget, rtgui_event_t *event);
};
typedef struct rtgui_checkbox rtgui_checkbox_t;
@@ -33,6 +36,8 @@ void rtgui_checkbox_destroy(rtgui_checkbox_t* checkbox);
void rtgui_checkbox_set_checked(rtgui_checkbox_t* checkbox, rt_bool_t checked);
rt_bool_t rtgui_checkbox_get_checked(rtgui_checkbox_t* checkbox);
+void rtgui_checkbox_set_onbutton(rtgui_checkbox_t* checkbox, rtgui_onbutton_func_t func);
+
rt_bool_t rtgui_checkbox_event_handler(struct rtgui_widget* widget, struct rtgui_event* event);
#endif
diff --git a/components/rtgui/include/rtgui/widgets/progressbar.h b/components/rtgui/include/rtgui/widgets/progressbar.h
index cf3c2ce4c5..c56d72dcf4 100644
--- a/components/rtgui/include/rtgui/widgets/progressbar.h
+++ b/components/rtgui/include/rtgui/widgets/progressbar.h
@@ -18,7 +18,7 @@ struct rtgui_progressbar
{
struct rtgui_widget parent;
- int orientation;
+ int orient;
int range;
int position;
diff --git a/components/rtgui/include/rtgui/widgets/staticline.h b/components/rtgui/include/rtgui/widgets/staticline.h
index 287f57410e..7b3c25a798 100644
--- a/components/rtgui/include/rtgui/widgets/staticline.h
+++ b/components/rtgui/include/rtgui/widgets/staticline.h
@@ -20,7 +20,7 @@ struct rtgui_staticline
/* inherit from widget */
struct rtgui_widget parent;
- int orientation;
+ int orient;
};
typedef struct rtgui_staticline rtgui_staticline_t;