mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-06-15 02:09:22 +08:00
49868fc5e4
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@344 bbd45198-f89e-11dd-88c7-29a3b14d5316
31 lines
873 B
C
31 lines
873 B
C
#ifndef __MY_WIDGET_H__
|
|
#define __MY_WIDGET_H__
|
|
|
|
#include <rtgui/rtgui.h>
|
|
#include <rtgui/widgets/widget.h>
|
|
|
|
#define MYWIDGET_STATUS_ON 1
|
|
#define MYWIDGET_STATUS_OFF 0
|
|
|
|
/** Gets the type of a button */
|
|
#define RTGUI_MYWIDGET_TYPE (rtgui_mywidget_type_get())
|
|
/** Casts the object to an rtgui_button */
|
|
#define RTGUI_MYWIDGET(obj) (RTGUI_OBJECT_CAST((obj), RTGUI_MYWIDGET_TYPE, rtgui_mywidget_t))
|
|
/** Checks if the object is an rtgui_button */
|
|
#define RTGUI_IS_MYWIDGET(obj) (RTGUI_OBJECT_CHECK_TYPE((obj), RTGUI_MYWIDGET_TYPE))
|
|
|
|
/* 个性化控件 */
|
|
struct rtgui_mywidget
|
|
{
|
|
struct rtgui_widget parent;
|
|
|
|
/* 状态:ON、OFF */
|
|
rt_uint8_t status;
|
|
};
|
|
typedef struct rtgui_mywidget rtgui_mywidget_t;
|
|
|
|
struct rtgui_mywidget* rtgui_mywidget_create(rtgui_rect_t* r);
|
|
void rtgui_mywidget_destroy(struct rtgui_mywidget* me);
|
|
|
|
#endif
|