topwin.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * File : topwin.h
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2006 - 2009, RT-Thread Development Team
  5. *
  6. * The license and distribution terms for this file may be
  7. * found in the file LICENSE in this distribution or at
  8. * http://www.rt-thread.org/license/LICENSE
  9. *
  10. * Change Logs:
  11. * Date Author Notes
  12. * 2009-10-16 Bernard first version
  13. */
  14. #ifndef __RTGUI_TOPWIN_H__
  15. #define __RTGUI_TOPWIN_H__
  16. #include <rtgui/rtgui.h>
  17. #include <rtgui/region.h>
  18. #include <rtgui/event.h>
  19. #include <rtgui/widgets/title.h>
  20. #include <rtgui/rtgui_server.h>
  21. /* add or remove a top win */
  22. rt_err_t rtgui_topwin_add(struct rtgui_event_win_create* event);
  23. rt_err_t rtgui_topwin_remove(struct rtgui_win* wid);
  24. rt_err_t rtgui_topwin_activate(struct rtgui_event_win_activate* event);
  25. rt_err_t rtgui_topwin_activate_topwin(struct rtgui_topwin* win);
  26. /* show a window */
  27. rt_err_t rtgui_topwin_show(struct rtgui_event_win* event);
  28. /* hide a window */
  29. rt_err_t rtgui_topwin_hide(struct rtgui_event_win* event);
  30. /* move a window */
  31. rt_err_t rtgui_topwin_move(struct rtgui_event_win_move* event);
  32. /* resize a window */
  33. void rtgui_topwin_resize(struct rtgui_win* wid, rtgui_rect_t* r);
  34. /* a window is entering modal mode */
  35. rt_err_t rtgui_topwin_modal_enter(struct rtgui_event_win_modal_enter* event);
  36. /* get window at (x, y) */
  37. struct rtgui_topwin* rtgui_topwin_get_wnd(int x, int y);
  38. struct rtgui_topwin* rtgui_topwin_get_wnd_no_modaled(int x, int y);
  39. //void rtgui_topwin_deactivate_win(struct rtgui_topwin* win);
  40. /* window title */
  41. void rtgui_topwin_title_ondraw(struct rtgui_topwin* win);
  42. void rtgui_topwin_title_onmouse(struct rtgui_topwin* win, struct rtgui_event_mouse* event);
  43. /* monitor rect */
  44. void rtgui_topwin_append_monitor_rect(struct rtgui_win* wid, rtgui_rect_t* rect);
  45. void rtgui_topwin_remove_monitor_rect(struct rtgui_win* wid, rtgui_rect_t* rect);
  46. /* get the topwin that is currently focused */
  47. struct rtgui_topwin* rtgui_topwin_get_focus(void);
  48. #endif