title.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * File : title.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_TITLE__
  15. #define __RTGUI_TITLE__
  16. #include <rtgui/widgets/toplevel.h>
  17. /** Gets the type of a top win */
  18. #define RTGUI_WINTITLE_TYPE (rtgui_wintitle_type_get())
  19. /** Casts the object to an rtgui_wintitle */
  20. #define RTGUI_WINTITLE(obj) (RTGUI_OBJECT_CAST((obj), RTGUI_WINTITLE_TYPE, rtgui_wintitle_t))
  21. /** Checks if the object is an rtgui_wintitle */
  22. #define RTGUI_IS_WINTITLE(obj) (RTGUI_OBJECT_CHECK_TYPE((obj), RTGUI_WINTITLE_TYPE))
  23. struct rtgui_wintitle
  24. {
  25. struct rtgui_toplevel parent;
  26. /* title */
  27. rt_uint8_t* title;
  28. };
  29. typedef struct rtgui_wintitle rtgui_wintitle_t;
  30. rtgui_type_t* rtgui_wintitle_type_get(void);
  31. rtgui_wintitle_t* rtgui_wintitle_create(const rt_uint8_t* title);
  32. void rtgui_wintitle_destroy(rtgui_wintitle_t* wintitle);
  33. rt_bool_t rtgui_wintile_event_handler(rtgui_widget_t* widget, rtgui_event_t* event);
  34. void rtgui_wintitle_set_title(rtgui_wintitle_t* wintitle, const rt_uint8_t* title);
  35. rt_uint8_t *rtgui_wintitle_get_title(rtgui_wintitle_t* wintitle);
  36. #endif