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. void rtgui_topwin_activate_win(struct rtgui_topwin* win);
  25. /* show a window */
  26. rt_err_t rtgui_topwin_show(struct rtgui_event_win* event);
  27. /* hide a window */
  28. rt_err_t rtgui_topwin_hide(struct rtgui_event_win* event);
  29. /* move a window */
  30. rt_err_t rtgui_topwin_move(struct rtgui_event_win_move* event);
  31. /* resize a window */
  32. void rtgui_topwin_resize(struct rtgui_win* wid, rtgui_rect_t* r);
  33. /* a window is entering modal mode */
  34. rt_err_t rtgui_topwin_modal_enter(struct rtgui_event_win_modal_enter* event);
  35. /* get window at (x, y) */
  36. struct rtgui_topwin* rtgui_topwin_get_wnd(int x, int y);
  37. struct rtgui_topwin* rtgui_topwin_get_wnd_no_modaled(int x, int y);
  38. //void rtgui_topwin_deactivate_win(struct rtgui_topwin* win);
  39. /* window title */
  40. void rtgui_topwin_title_ondraw(struct rtgui_topwin* win);
  41. void rtgui_topwin_title_onmouse(struct rtgui_topwin* win, struct rtgui_event_mouse* event);
  42. /* monitor rect */
  43. void rtgui_topwin_append_monitor_rect(struct rtgui_win* wid, rtgui_rect_t* rect);
  44. void rtgui_topwin_remove_monitor_rect(struct rtgui_win* wid, rtgui_rect_t* rect);
  45. /* get the topwin that is currently focused */
  46. struct rtgui_topwin* rtgui_topwin_get_focus(void);
  47. #endif