summaryrefslogtreecommitdiff
path: root/components/rtgui_win/include/rtgui/widgets/progressbar.h
diff options
context:
space:
mode:
author[email protected] <[email protected]>2011-03-24 14:00:19 +0000
committer[email protected] <[email protected]>2011-03-24 14:00:19 +0000
commit0e93e6809c7beac4597148edc1dc09bcdf9a2ab3 (patch)
tree113765e7f8351d84226a3de04f13daf86ddd82f9 /components/rtgui_win/include/rtgui/widgets/progressbar.h
parent96c53b49571adadd957df804f4f5e6698c14e3b3 (diff)
add rtgui_win subfield,Highlight the ease of use
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1345 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components/rtgui_win/include/rtgui/widgets/progressbar.h')
-rw-r--r--components/rtgui_win/include/rtgui/widgets/progressbar.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/components/rtgui_win/include/rtgui/widgets/progressbar.h b/components/rtgui_win/include/rtgui/widgets/progressbar.h
new file mode 100644
index 0000000000..c2133a93dd
--- /dev/null
+++ b/components/rtgui_win/include/rtgui/widgets/progressbar.h
@@ -0,0 +1,40 @@
+#ifndef __RTGUI_PROGRESSBAR_H__
+#define __RTGUI_PROGRESSBAR_H__
+
+#include <rtgui/rtgui.h>
+
+typedef struct rtgui_progressbar rtgui_progressbar_t;
+
+/** Gets the type of a progressbar */
+#define RTGUI_PROGRESSBAR_TYPE (rtgui_progressbar_type_get())
+/** Casts the object to a rtgui_progressbar */
+#define RTGUI_PROGRESSBAR(obj) (RTGUI_OBJECT_CAST((obj), RTGUI_PROGRESSBAR_TYPE, rtgui_progressbar_t))
+/** Checks if the object is a rtgui_progressbar */
+#define RTGUI_IS_PROGRESSBAR(obj) (RTGUI_OBJECT_CHECK_TYPE((obj), RTGUI_PROGRESSBAR_TYPE))
+
+#define DEFAULT_WIDTH 100
+#define DEFAULT_HEIGHT 20
+
+struct rtgui_progressbar
+{
+ rtgui_widget_t parent;
+
+ int orient;
+
+ int range;
+ int position;
+};
+
+rtgui_type_t *rtgui_progressbar_type_get(void);
+
+rtgui_progressbar_t* rtgui_progressbar_create(PVOID parent, int orient, int range, int left, int top, int w, int h);
+void rtgui_progressbar_destroy(rtgui_progressbar_t* p_bar);
+
+rt_bool_t rtgui_progressbar_event_handler(PVOID wdt, rtgui_event_t* event);
+
+void rtgui_progressbar_set_value(rtgui_progressbar_t *p_bar, int value);
+int rtgui_progressbar_get_value(rtgui_progressbar_t *p_bar);
+void rtgui_progressbar_set_range(rtgui_progressbar_t *p_bar, int range);
+int rtgui_progressbar_get_range(rtgui_progressbar_t *p_bar);
+
+#endif