|
@@ -39,10 +39,14 @@ struct rtgui_thread
|
|
struct rtgui_widget* widget;
|
|
struct rtgui_widget* widget;
|
|
/* event buffer */
|
|
/* event buffer */
|
|
rt_uint8_t event_buffer[RTGUI_EVENT_BUFFER_SIZE];
|
|
rt_uint8_t event_buffer[RTGUI_EVENT_BUFFER_SIZE];
|
|
|
|
+
|
|
|
|
+ /* on idle event handler */
|
|
|
|
+ void (*on_idle)(struct rtgui_widget* widget, struct rtgui_event *event);
|
|
};
|
|
};
|
|
typedef struct rtgui_thread rtgui_thread_t;
|
|
typedef struct rtgui_thread rtgui_thread_t;
|
|
struct rtgui_timer;
|
|
struct rtgui_timer;
|
|
typedef void (*rtgui_timeout_func)(struct rtgui_timer* timer, void* parameter);
|
|
typedef void (*rtgui_timeout_func)(struct rtgui_timer* timer, void* parameter);
|
|
|
|
+typedef void (*rtgui_idle_func)(struct rtgui_widget* widget, struct rtgui_event *event);
|
|
|
|
|
|
struct rtgui_timer
|
|
struct rtgui_timer
|
|
{
|
|
{
|
|
@@ -65,6 +69,8 @@ void rtgui_timer_stop (rtgui_timer_t* timer);
|
|
|
|
|
|
rtgui_thread_t* rtgui_thread_register(rt_thread_t tid, rt_mq_t mq);
|
|
rtgui_thread_t* rtgui_thread_register(rt_thread_t tid, rt_mq_t mq);
|
|
void rtgui_thread_deregister(rt_thread_t tid);
|
|
void rtgui_thread_deregister(rt_thread_t tid);
|
|
|
|
+void rtgui_thread_set_onidle(rtgui_idle_func onidle);
|
|
|
|
+rtgui_idle_func rtgui_thread_get_onidle();
|
|
rtgui_thread_t* rtgui_thread_self(void);
|
|
rtgui_thread_t* rtgui_thread_self(void);
|
|
|
|
|
|
rt_thread_t rtgui_thread_get_server(void);
|
|
rt_thread_t rtgui_thread_get_server(void);
|
|
@@ -76,6 +82,7 @@ rt_err_t rtgui_thread_send(rt_thread_t tid, struct rtgui_event* event, rt_size_t
|
|
rt_err_t rtgui_thread_send_urgent(rt_thread_t tid, struct rtgui_event* event, rt_size_t event_size);
|
|
rt_err_t rtgui_thread_send_urgent(rt_thread_t tid, struct rtgui_event* event, rt_size_t event_size);
|
|
rt_err_t rtgui_thread_send_sync(rt_thread_t tid, struct rtgui_event* event, rt_size_t event_size);
|
|
rt_err_t rtgui_thread_send_sync(rt_thread_t tid, struct rtgui_event* event, rt_size_t event_size);
|
|
rt_err_t rtgui_thread_recv(struct rtgui_event* event, rt_size_t event_size);
|
|
rt_err_t rtgui_thread_recv(struct rtgui_event* event, rt_size_t event_size);
|
|
|
|
+rt_err_t rtgui_thread_recv_nosuspend(struct rtgui_event* event, rt_size_t event_size);
|
|
rt_err_t rtgui_thread_recv_filter(rt_uint32_t type, struct rtgui_event* event, rt_size_t event_size);
|
|
rt_err_t rtgui_thread_recv_filter(rt_uint32_t type, struct rtgui_event* event, rt_size_t event_size);
|
|
rt_err_t rtgui_thread_ack(struct rtgui_event* event, rt_int32_t status);
|
|
rt_err_t rtgui_thread_ack(struct rtgui_event* event, rt_int32_t status);
|
|
|
|
|