mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-21 18:57:16 +08:00
sync with RTGUI c074ff2898b9e
Full log is in GitHub. git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2222 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
@@ -88,3 +88,7 @@ rt_uint8_t* rtgui_graphic_driver_get_framebuffer(const struct rtgui_graphic_driv
|
||||
return (rt_uint8_t*)driver->framebuffer;
|
||||
}
|
||||
|
||||
rt_uint8_t* rtgui_graphic_driver_get_default_framebuffer(void)
|
||||
{
|
||||
return rtgui_graphic_driver_get_framebuffer(&_driver);
|
||||
}
|
||||
|
||||
@@ -52,9 +52,6 @@ struct rtgui_cursor
|
||||
rt_uint8_t *win_top, *win_bottom;
|
||||
rt_bool_t win_rect_show, win_rect_has_saved;
|
||||
#endif
|
||||
|
||||
/* screen framebuffer */
|
||||
rt_uint8_t* framebuffer;
|
||||
};
|
||||
|
||||
struct rtgui_cursor* _rtgui_cursor;
|
||||
@@ -140,7 +137,6 @@ void rtgui_mouse_init()
|
||||
|
||||
/* init cursor */
|
||||
_rtgui_cursor->bpp = gd->bits_per_pixel/8;
|
||||
_rtgui_cursor->framebuffer = rtgui_graphic_driver_get_framebuffer(gd);
|
||||
_rtgui_cursor->screen_pitch = _rtgui_cursor->bpp * gd->width;
|
||||
|
||||
#ifdef RTGUI_USING_MOUSE_CURSOR
|
||||
@@ -300,7 +296,7 @@ static void rtgui_cursor_restore()
|
||||
rt_base_t idx, height, cursor_pitch;
|
||||
rt_uint8_t *cursor_ptr, *fb_ptr;
|
||||
|
||||
fb_ptr = _rtgui_cursor->framebuffer + _rtgui_cursor->cy * _rtgui_cursor->screen_pitch
|
||||
fb_ptr = rtgui_graphic_driver_get_default_framebuffer() + _rtgui_cursor->cy * _rtgui_cursor->screen_pitch
|
||||
+ _rtgui_cursor->cx * _rtgui_cursor->bpp;
|
||||
cursor_ptr = _rtgui_cursor->cursor_saved;
|
||||
|
||||
@@ -327,7 +323,7 @@ static void rtgui_cursor_save()
|
||||
rt_base_t idx, height, cursor_pitch;
|
||||
rt_uint8_t *cursor_ptr, *fb_ptr;
|
||||
|
||||
fb_ptr = _rtgui_cursor->framebuffer + _rtgui_cursor->cy * _rtgui_cursor->screen_pitch +
|
||||
fb_ptr = _driver_get_default_framebuffer() + _rtgui_cursor->cy * _rtgui_cursor->screen_pitch +
|
||||
_rtgui_cursor->cx * _rtgui_cursor->bpp;
|
||||
cursor_ptr = _rtgui_cursor->cursor_saved;
|
||||
|
||||
@@ -488,10 +484,11 @@ static void rtgui_winrect_show()
|
||||
|
||||
static void rtgui_winrect_restore()
|
||||
{
|
||||
rt_uint8_t *winrect_ptr, *fb_ptr;
|
||||
rt_uint8_t *winrect_ptr, *fb_ptr, *driver_fb;
|
||||
int winrect_pitch, idx;
|
||||
rtgui_rect_t screen_rect, win_rect;
|
||||
|
||||
driver_fb = rtgui_graphic_driver_get_default_framebuffer();
|
||||
win_rect = _rtgui_cursor->win_rect;
|
||||
|
||||
rtgui_graphic_driver_get_rect(rtgui_graphic_driver_get_default(),
|
||||
@@ -499,7 +496,7 @@ static void rtgui_winrect_restore()
|
||||
rtgui_rect_intersect(&screen_rect, &win_rect);
|
||||
|
||||
/* restore winrect left */
|
||||
fb_ptr = _rtgui_cursor->framebuffer + win_rect.y1 * _rtgui_cursor->screen_pitch +
|
||||
fb_ptr = driver_fb + win_rect.y1 * _rtgui_cursor->screen_pitch +
|
||||
win_rect.x1 * _rtgui_cursor->bpp;
|
||||
winrect_ptr = _rtgui_cursor->win_left;
|
||||
winrect_pitch = WIN_MOVE_BORDER * _rtgui_cursor->bpp;
|
||||
@@ -507,7 +504,7 @@ static void rtgui_winrect_restore()
|
||||
(win_rect.y2 - win_rect.y1), winrect_pitch);
|
||||
|
||||
/* restore winrect right */
|
||||
fb_ptr = _rtgui_cursor->framebuffer + win_rect.y1 * _rtgui_cursor->screen_pitch +
|
||||
fb_ptr = driver_fb + win_rect.y1 * _rtgui_cursor->screen_pitch +
|
||||
(win_rect.x2 - WIN_MOVE_BORDER) * _rtgui_cursor->bpp;
|
||||
winrect_ptr = _rtgui_cursor->win_right;
|
||||
winrect_pitch = WIN_MOVE_BORDER * _rtgui_cursor->bpp;
|
||||
@@ -515,7 +512,7 @@ static void rtgui_winrect_restore()
|
||||
(win_rect.y2 - win_rect.y1), winrect_pitch);
|
||||
|
||||
/* restore winrect top */
|
||||
fb_ptr = _rtgui_cursor->framebuffer + win_rect.y1 * _rtgui_cursor->screen_pitch +
|
||||
fb_ptr = driver_fb + win_rect.y1 * _rtgui_cursor->screen_pitch +
|
||||
(win_rect.x1 + WIN_MOVE_BORDER)* _rtgui_cursor->bpp;
|
||||
winrect_ptr = _rtgui_cursor->win_top;
|
||||
winrect_pitch = (win_rect.x2 - win_rect.x1 - 2 * WIN_MOVE_BORDER) * _rtgui_cursor->bpp;
|
||||
@@ -523,7 +520,7 @@ static void rtgui_winrect_restore()
|
||||
WIN_MOVE_BORDER, winrect_pitch);
|
||||
|
||||
/* restore winrect bottom */
|
||||
fb_ptr = _rtgui_cursor->framebuffer + (win_rect.y2 - WIN_MOVE_BORDER) * _rtgui_cursor->screen_pitch +
|
||||
fb_ptr = driver_fb + (win_rect.y2 - WIN_MOVE_BORDER) * _rtgui_cursor->screen_pitch +
|
||||
(win_rect.x1 + WIN_MOVE_BORDER) * _rtgui_cursor->bpp;
|
||||
winrect_ptr = _rtgui_cursor->win_bottom;
|
||||
display_direct_memcpy(winrect_ptr, fb_ptr, winrect_pitch, _rtgui_cursor->screen_pitch,
|
||||
@@ -532,10 +529,11 @@ static void rtgui_winrect_restore()
|
||||
|
||||
static void rtgui_winrect_save()
|
||||
{
|
||||
rt_uint8_t *winrect_ptr, *fb_ptr;
|
||||
rt_uint8_t *winrect_ptr, *fb_ptr, *driver_fb;
|
||||
int winrect_pitch, idx;
|
||||
rtgui_rect_t screen_rect, win_rect;
|
||||
|
||||
driver_fb = rtgui_graphic_driver_get_default_framebuffer();
|
||||
win_rect = _rtgui_cursor->win_rect;
|
||||
|
||||
rtgui_graphic_driver_get_rect(rtgui_graphic_driver_get_default(),
|
||||
@@ -546,7 +544,7 @@ static void rtgui_winrect_save()
|
||||
_rtgui_cursor->win_rect_has_saved = RT_TRUE;
|
||||
|
||||
/* save winrect left */
|
||||
fb_ptr = _rtgui_cursor->framebuffer + win_rect.y1 * _rtgui_cursor->screen_pitch +
|
||||
fb_ptr = driver_fb + win_rect.y1 * _rtgui_cursor->screen_pitch +
|
||||
win_rect.x1 * _rtgui_cursor->bpp;
|
||||
winrect_ptr = _rtgui_cursor->win_left;
|
||||
winrect_pitch = WIN_MOVE_BORDER * _rtgui_cursor->bpp;
|
||||
@@ -554,7 +552,7 @@ static void rtgui_winrect_save()
|
||||
(win_rect.y2 - win_rect.y1), winrect_pitch);
|
||||
|
||||
/* save winrect right */
|
||||
fb_ptr = _rtgui_cursor->framebuffer + win_rect.y1 * _rtgui_cursor->screen_pitch +
|
||||
fb_ptr = driver_fb + win_rect.y1 * _rtgui_cursor->screen_pitch +
|
||||
(win_rect.x2 - WIN_MOVE_BORDER) * _rtgui_cursor->bpp;
|
||||
winrect_ptr = _rtgui_cursor->win_right;
|
||||
winrect_pitch = WIN_MOVE_BORDER * _rtgui_cursor->bpp;
|
||||
@@ -562,7 +560,7 @@ static void rtgui_winrect_save()
|
||||
(win_rect.y2 - win_rect.y1), winrect_pitch);
|
||||
|
||||
/* save winrect top */
|
||||
fb_ptr = _rtgui_cursor->framebuffer + win_rect.y1 * _rtgui_cursor->screen_pitch +
|
||||
fb_ptr = driver_fb + win_rect.y1 * _rtgui_cursor->screen_pitch +
|
||||
(win_rect.x1 + WIN_MOVE_BORDER)* _rtgui_cursor->bpp;
|
||||
winrect_ptr = _rtgui_cursor->win_top;
|
||||
winrect_pitch = (win_rect.x2 - win_rect.x1 - 2 * WIN_MOVE_BORDER) * _rtgui_cursor->bpp;
|
||||
@@ -570,7 +568,7 @@ static void rtgui_winrect_save()
|
||||
WIN_MOVE_BORDER, winrect_pitch);
|
||||
|
||||
/* save winrect bottom */
|
||||
fb_ptr = _rtgui_cursor->framebuffer + (win_rect.y2 - WIN_MOVE_BORDER) * _rtgui_cursor->screen_pitch +
|
||||
fb_ptr = driver_fb + (win_rect.y2 - WIN_MOVE_BORDER) * _rtgui_cursor->screen_pitch +
|
||||
(win_rect.x1 + WIN_MOVE_BORDER) * _rtgui_cursor->bpp;
|
||||
winrect_ptr = _rtgui_cursor->win_bottom;
|
||||
display_direct_memcpy(fb_ptr, winrect_ptr, _rtgui_cursor->screen_pitch, winrect_pitch,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -16,14 +16,16 @@
|
||||
#include <rtgui/event.h>
|
||||
#include <rtgui/rtgui_system.h>
|
||||
#include <rtgui/rtgui_object.h>
|
||||
#include <rtgui/rtgui_application.h>
|
||||
#include <rtgui/rtgui_app.h>
|
||||
#include <rtgui/driver.h>
|
||||
|
||||
#include "mouse.h"
|
||||
#include "topwin.h"
|
||||
|
||||
static struct rt_thread *rtgui_server_tid;
|
||||
static struct rtgui_application *rtgui_server_application;
|
||||
|
||||
static struct rtgui_app *rtgui_server_application = RT_NULL;
|
||||
static struct rtgui_app *rtgui_wm_application = RT_NULL;
|
||||
|
||||
void rtgui_server_handle_update(struct rtgui_event_update_end* event)
|
||||
{
|
||||
@@ -85,7 +87,7 @@ void rtgui_server_handle_mouse_btn(struct rtgui_event_mouse* event)
|
||||
}
|
||||
|
||||
/* send to client thread */
|
||||
rtgui_application_send(topwin->tid, &(ewin.parent), sizeof(ewin));
|
||||
rtgui_send(topwin->tid, &(ewin.parent), sizeof(ewin));
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -101,7 +103,7 @@ void rtgui_server_handle_mouse_btn(struct rtgui_event_mouse* event)
|
||||
if (rtgui_topwin_get_focus() != wnd)
|
||||
{
|
||||
/* raise this window */
|
||||
rtgui_topwin_activate_win(wnd);
|
||||
rtgui_topwin_activate_topwin(wnd);
|
||||
}
|
||||
|
||||
if (wnd->title != RT_NULL &&
|
||||
@@ -112,7 +114,7 @@ void rtgui_server_handle_mouse_btn(struct rtgui_event_mouse* event)
|
||||
else
|
||||
{
|
||||
/* send mouse event to thread */
|
||||
rtgui_application_send(wnd->tid, (struct rtgui_event*)event, sizeof(struct rtgui_event_mouse));
|
||||
rtgui_send(wnd->tid, (struct rtgui_event*)event, sizeof(struct rtgui_event_mouse));
|
||||
}
|
||||
return ;
|
||||
}
|
||||
@@ -144,7 +146,7 @@ void rtgui_server_handle_mouse_motion(struct rtgui_event_mouse* event)
|
||||
{
|
||||
event->wid = last_monitor_topwin->wid;
|
||||
/* send mouse motion event */
|
||||
rtgui_application_send(last_monitor_topwin->tid, &(event->parent), sizeof(struct rtgui_event_mouse));
|
||||
rtgui_send(last_monitor_topwin->tid, &(event->parent), sizeof(struct rtgui_event_mouse));
|
||||
}
|
||||
|
||||
if (last_monitor_topwin != win)
|
||||
@@ -155,7 +157,7 @@ void rtgui_server_handle_mouse_motion(struct rtgui_event_mouse* event)
|
||||
event->wid = last_monitor_topwin->wid;
|
||||
|
||||
/* send mouse motion event */
|
||||
rtgui_application_send(last_monitor_topwin->tid, &(event->parent), sizeof(struct rtgui_event_mouse));
|
||||
rtgui_send(last_monitor_topwin->tid, &(event->parent), sizeof(struct rtgui_event_mouse));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -181,7 +183,7 @@ void rtgui_server_handle_kbd(struct rtgui_event_kbd* event)
|
||||
event->wid = wnd->wid;
|
||||
|
||||
/* send keyboard event to thread */
|
||||
rtgui_application_send(wnd->tid, (struct rtgui_event*)event, sizeof(struct rtgui_event_kbd));
|
||||
rtgui_send(wnd->tid, (struct rtgui_event*)event, sizeof(struct rtgui_event_kbd));
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -200,58 +202,113 @@ static rt_bool_t rtgui_server_event_handler(struct rtgui_object *object,
|
||||
/* dispatch event */
|
||||
switch (event->type)
|
||||
{
|
||||
case RTGUI_EVENT_APP_CREATE:
|
||||
case RTGUI_EVENT_APP_DESTROY:
|
||||
if (rtgui_wm_application != RT_NULL)
|
||||
{
|
||||
/* forward event to wm application */
|
||||
rtgui_send(rtgui_wm_application->tid, event, sizeof(struct rtgui_event_application));
|
||||
}
|
||||
else
|
||||
{
|
||||
/* always ack with OK */
|
||||
rtgui_ack(event, RTGUI_STATUS_OK);
|
||||
}
|
||||
break;
|
||||
|
||||
/* mouse and keyboard event */
|
||||
case RTGUI_EVENT_MOUSE_MOTION:
|
||||
/* handle mouse motion event */
|
||||
rtgui_server_handle_mouse_motion((struct rtgui_event_mouse*)event);
|
||||
break;
|
||||
|
||||
case RTGUI_EVENT_MOUSE_BUTTON:
|
||||
/* handle mouse button */
|
||||
rtgui_server_handle_mouse_btn((struct rtgui_event_mouse*)event);
|
||||
break;
|
||||
|
||||
case RTGUI_EVENT_KBD:
|
||||
/* handle keyboard event */
|
||||
rtgui_server_handle_kbd((struct rtgui_event_kbd*)event);
|
||||
break;
|
||||
|
||||
/* window event */
|
||||
case RTGUI_EVENT_WIN_CREATE:
|
||||
if (rtgui_topwin_add((struct rtgui_event_win_create*)event) == RT_EOK)
|
||||
rtgui_application_ack(event, RTGUI_STATUS_OK);
|
||||
rtgui_ack(event, RTGUI_STATUS_OK);
|
||||
else
|
||||
rtgui_application_ack(event, RTGUI_STATUS_ERROR);
|
||||
rtgui_ack(event, RTGUI_STATUS_ERROR);
|
||||
break;
|
||||
|
||||
case RTGUI_EVENT_WIN_SHOW:
|
||||
if (rtgui_topwin_show((struct rtgui_event_win*)event) == RT_EOK)
|
||||
rtgui_ack(event, RTGUI_STATUS_OK);
|
||||
else
|
||||
rtgui_ack(event, RTGUI_STATUS_ERROR);
|
||||
break;
|
||||
|
||||
case RTGUI_EVENT_WIN_HIDE:
|
||||
if (rtgui_topwin_hide((struct rtgui_event_win*)event) == RT_EOK)
|
||||
rtgui_ack(event, RTGUI_STATUS_OK);
|
||||
else
|
||||
rtgui_ack(event, RTGUI_STATUS_ERROR);
|
||||
break;
|
||||
|
||||
case RTGUI_EVENT_WIN_MOVE:
|
||||
if (rtgui_topwin_move((struct rtgui_event_win_move*)event) == RT_EOK)
|
||||
rtgui_ack(event, RTGUI_STATUS_OK);
|
||||
else
|
||||
rtgui_ack(event, RTGUI_STATUS_ERROR);
|
||||
break;
|
||||
|
||||
case RTGUI_EVENT_WIN_MODAL_ENTER:
|
||||
if (rtgui_topwin_modal_enter((struct rtgui_event_win_modal_enter*)event) == RT_EOK)
|
||||
rtgui_ack(event, RTGUI_STATUS_OK);
|
||||
else
|
||||
rtgui_ack(event, RTGUI_STATUS_ERROR);
|
||||
break;
|
||||
|
||||
case RTGUI_EVENT_WIN_ACTIVATE:
|
||||
if (rtgui_topwin_activate((struct rtgui_event_win_activate*)event) == RT_EOK)
|
||||
rtgui_ack(event, RTGUI_STATUS_OK);
|
||||
else
|
||||
rtgui_ack(event, RTGUI_STATUS_ERROR);
|
||||
break;
|
||||
|
||||
case RTGUI_EVENT_WIN_DESTROY:
|
||||
if (last_monitor_topwin != RT_NULL &&
|
||||
last_monitor_topwin->wid == ((struct rtgui_event_win*)event)->wid)
|
||||
last_monitor_topwin = RT_NULL;
|
||||
if (rtgui_topwin_remove(((struct rtgui_event_win*)event)->wid) == RT_EOK)
|
||||
rtgui_application_ack(event, RTGUI_STATUS_OK);
|
||||
rtgui_ack(event, RTGUI_STATUS_OK);
|
||||
else
|
||||
rtgui_application_ack(event, RTGUI_STATUS_ERROR);
|
||||
rtgui_ack(event, RTGUI_STATUS_ERROR);
|
||||
break;
|
||||
|
||||
case RTGUI_EVENT_WIN_SHOW:
|
||||
if (rtgui_topwin_show((struct rtgui_event_win*)event) == RT_EOK)
|
||||
rtgui_application_ack(event, RTGUI_STATUS_OK);
|
||||
else
|
||||
rtgui_application_ack(event, RTGUI_STATUS_ERROR);
|
||||
break;
|
||||
|
||||
case RTGUI_EVENT_WIN_HIDE:
|
||||
if (rtgui_topwin_hide((struct rtgui_event_win*)event) == RT_EOK)
|
||||
rtgui_application_ack(event, RTGUI_STATUS_OK);
|
||||
else
|
||||
rtgui_application_ack(event, RTGUI_STATUS_ERROR);
|
||||
break;
|
||||
|
||||
case RTGUI_EVENT_WIN_MOVE:
|
||||
if (rtgui_topwin_move((struct rtgui_event_win_move*)event) == RT_EOK)
|
||||
rtgui_application_ack(event, RTGUI_STATUS_OK);
|
||||
else
|
||||
rtgui_application_ack(event, RTGUI_STATUS_ERROR);
|
||||
break;
|
||||
|
||||
case RTGUI_EVENT_WIN_MODAL_ENTER:
|
||||
if (rtgui_topwin_modal_enter((struct rtgui_event_win_modal_enter*)event) == RT_EOK)
|
||||
rtgui_application_ack(event, RTGUI_STATUS_OK);
|
||||
else
|
||||
rtgui_application_ack(event, RTGUI_STATUS_ERROR);
|
||||
break;
|
||||
|
||||
case RTGUI_EVENT_WIN_RESIZE:
|
||||
rtgui_topwin_resize(((struct rtgui_event_win_resize*)event)->wid,
|
||||
&(((struct rtgui_event_win_resize*)event)->rect));
|
||||
break;
|
||||
|
||||
case RTGUI_EVENT_SET_WM:
|
||||
if (rtgui_wm_application != RT_NULL)
|
||||
{
|
||||
rtgui_ack(event, RTGUI_STATUS_ERROR);
|
||||
}
|
||||
else
|
||||
{
|
||||
struct rtgui_event_set_wm *set_wm;
|
||||
|
||||
set_wm = (struct rtgui_event_set_wm*) event;
|
||||
rtgui_wm_application = set_wm->app;
|
||||
rtgui_ack(event, RTGUI_STATUS_OK);
|
||||
}
|
||||
break;
|
||||
|
||||
/* other event */
|
||||
case RTGUI_EVENT_COMMAND:
|
||||
break;
|
||||
|
||||
case RTGUI_EVENT_UPDATE_BEGIN:
|
||||
#ifdef RTGUI_USING_MOUSE_CURSOR
|
||||
/* hide cursor */
|
||||
@@ -272,25 +329,6 @@ static rt_bool_t rtgui_server_event_handler(struct rtgui_object *object,
|
||||
/* handle mouse monitor */
|
||||
rtgui_server_handle_monitor_add((struct rtgui_event_monitor*)event);
|
||||
break;
|
||||
|
||||
/* mouse and keyboard event */
|
||||
case RTGUI_EVENT_MOUSE_MOTION:
|
||||
/* handle mouse motion event */
|
||||
rtgui_server_handle_mouse_motion((struct rtgui_event_mouse*)event);
|
||||
break;
|
||||
|
||||
case RTGUI_EVENT_MOUSE_BUTTON:
|
||||
/* handle mouse button */
|
||||
rtgui_server_handle_mouse_btn((struct rtgui_event_mouse*)event);
|
||||
break;
|
||||
|
||||
case RTGUI_EVENT_KBD:
|
||||
/* handle keyboard event */
|
||||
rtgui_server_handle_kbd((struct rtgui_event_kbd*)event);
|
||||
break;
|
||||
|
||||
case RTGUI_EVENT_COMMAND:
|
||||
break;
|
||||
}
|
||||
|
||||
return RT_TRUE;
|
||||
@@ -307,8 +345,8 @@ static void rtgui_server_entry(void* parameter)
|
||||
SetThreadPriority(hCurrentThread, THREAD_PRIORITY_HIGHEST);
|
||||
#endif
|
||||
|
||||
/* register rtgui server thread */
|
||||
rtgui_server_application = rtgui_application_create(rtgui_server_tid,
|
||||
/* create rtgui server application */
|
||||
rtgui_server_application = rtgui_app_create(rtgui_server_tid,
|
||||
"rtgui");
|
||||
if (rtgui_server_application == RT_NULL)
|
||||
return;
|
||||
@@ -321,16 +359,16 @@ static void rtgui_server_entry(void* parameter)
|
||||
rtgui_mouse_show_cursor();
|
||||
#endif
|
||||
|
||||
rtgui_application_run(rtgui_server_application);
|
||||
rtgui_app_run(rtgui_server_application);
|
||||
|
||||
rtgui_application_destroy(rtgui_server_application);
|
||||
rtgui_app_destroy(rtgui_server_application);
|
||||
rtgui_server_application = RT_NULL;
|
||||
}
|
||||
|
||||
void rtgui_server_post_event(struct rtgui_event* event, rt_size_t size)
|
||||
{
|
||||
if (rtgui_server_tid != RT_NULL)
|
||||
rtgui_application_send(rtgui_server_tid, event, size);
|
||||
rtgui_send(rtgui_server_tid, event, size);
|
||||
else
|
||||
rt_kprintf("post when server is not running\n");
|
||||
}
|
||||
@@ -338,7 +376,7 @@ void rtgui_server_post_event(struct rtgui_event* event, rt_size_t size)
|
||||
rt_err_t rtgui_server_post_event_sync(struct rtgui_event* event, rt_size_t size)
|
||||
{
|
||||
if (rtgui_server_tid != RT_NULL)
|
||||
return rtgui_application_send_sync(rtgui_server_tid, event, size);
|
||||
return rtgui_send_sync(rtgui_server_tid, event, size);
|
||||
else
|
||||
{
|
||||
rt_kprintf("post when server is not running\n");
|
||||
|
||||
+185
-122
File diff suppressed because it is too large
Load Diff
@@ -23,8 +23,8 @@
|
||||
/* add or remove a top win */
|
||||
rt_err_t rtgui_topwin_add(struct rtgui_event_win_create* event);
|
||||
rt_err_t rtgui_topwin_remove(struct rtgui_win* wid);
|
||||
|
||||
void rtgui_topwin_activate_win(struct rtgui_topwin* win);
|
||||
rt_err_t rtgui_topwin_activate(struct rtgui_event_win_activate* event);
|
||||
rt_err_t rtgui_topwin_activate_topwin(struct rtgui_topwin* win);
|
||||
|
||||
/* show a window */
|
||||
rt_err_t rtgui_topwin_show(struct rtgui_event_win* event);
|
||||
|
||||
Reference in New Issue
Block a user