diff options
| author | Grissiom <[email protected]> | 2013-02-01 10:27:10 +0800 |
|---|---|---|
| committer | Grissiom <[email protected]> | 2013-02-01 10:27:10 +0800 |
| commit | f06c70feed0941b5bceedcecf89e9aa22034aca8 (patch) | |
| tree | 89fd3a989b4d88fc72b39eaad6567de3a3d23874 /components/rtgui/server/mouse.c | |
| parent | 4f02e67bef7eacee5102d7730356663d9c889e15 (diff) | |
sync with rtgui-0.6
Diffstat (limited to 'components/rtgui/server/mouse.c')
| -rw-r--r-- | components/rtgui/server/mouse.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/components/rtgui/server/mouse.c b/components/rtgui/server/mouse.c index 27972af2b2..0fff8f101c 100644 --- a/components/rtgui/server/mouse.c +++ b/components/rtgui/server/mouse.c @@ -255,6 +255,10 @@ void rtgui_mouse_moveto(int x, int y) rtgui_mouse_show_cursor(); #endif } + +#ifdef RTGUI_USING_HW_CURSOR + rtgui_cursor_set_position(_rtgui_cursor->cx, _rtgui_cursor->cy); +#endif } #ifdef RTGUI_USING_MOUSE_CURSOR @@ -262,6 +266,17 @@ void rtgui_mouse_moveto(int x, int y) #endif } +void rtgui_mouse_set_position(int x, int y) +{ + /* move current cursor */ + _rtgui_cursor->cx = x; + _rtgui_cursor->cy = y; + +#ifdef RTGUI_USING_HW_CURSOR + rtgui_cursor_set_position(_rtgui_cursor->cx, _rtgui_cursor->cy); +#endif +} + #ifdef RTGUI_USING_MOUSE_CURSOR void rtgui_mouse_set_cursor_enable(rt_bool_t enable) { |
