mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-06-15 10:38:22 +08:00
db06460208
The full log is at https://github.com/RTGUI/RTGUI/commits/merge_1 and it's difficult to merge the new tree commit by commit. I also converted all the file into unix eol so there are many fake diff. Big changes are noted in rtgui/doc/road_map.txt and rtgui/doc/attention.txt. Keep an eye on them if you want to migrate your old code. Note that the work is still in progress and the bsp is not prepared in trunk so far. git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2092 bbd45198-f89e-11dd-88c7-29a3b14d5316
41 lines
1.4 KiB
C
41 lines
1.4 KiB
C
#ifndef __RTGUI_PROGRESSBAR_H__
|
|
#define __RTGUI_PROGRESSBAR_H__
|
|
|
|
#include <rtgui/rtgui.h>
|
|
#include <rtgui/widgets/widget.h>
|
|
|
|
DECLARE_CLASS_TYPE(progressbar);
|
|
/** Gets the type of a progressbar */
|
|
#define RTGUI_PROGRESSBAR_TYPE (RTGUI_TYPE(progressbar))
|
|
/** 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
|
|
{
|
|
struct rtgui_widget parent;
|
|
|
|
int orient;
|
|
|
|
int range;
|
|
int position;
|
|
};
|
|
typedef struct rtgui_progressbar rtgui_progressbar_t;
|
|
|
|
struct rtgui_progressbar* rtgui_progressbar_create(int orientation, int range, rtgui_rect_t* r);
|
|
void rtgui_progressbar_destroy(struct rtgui_progressbar* p_bar);
|
|
|
|
rt_bool_t rtgui_progressbar_event_handler(struct rtgui_object* object,
|
|
struct rtgui_event* event);
|
|
|
|
void rtgui_progressbar_set_value(struct rtgui_progressbar *p_bar, int value);
|
|
int rtgui_progressbar_get_value(struct rtgui_progressbar *p_bar);
|
|
void rtgui_progressbar_set_range(struct rtgui_progressbar *p_bar, int range);
|
|
int rtgui_progressbar_get_range(struct rtgui_progressbar *p_bar);
|
|
|
|
#endif
|