title.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. DECLARE_CLASS_TYPE(wintitle);
  18. /** Gets the type of a title */
  19. #define RTGUI_WINTITLE_TYPE (RTGUI_TYPE(wintitle))
  20. /** Casts the object to an rtgui_wintitle */
  21. #define RTGUI_WINTITLE(obj) (RTGUI_OBJECT_CAST((obj), RTGUI_WINTITLE_TYPE, rtgui_wintitle_t))
  22. /** Checks if the object is an rtgui_wintitle */
  23. #define RTGUI_IS_WINTITLE(obj) (RTGUI_OBJECT_CHECK_TYPE((obj), RTGUI_WINTITLE_TYPE))
  24. struct rtgui_wintitle
  25. {
  26. struct rtgui_toplevel parent;
  27. /* title */
  28. char* title;
  29. };
  30. typedef struct rtgui_wintitle rtgui_wintitle_t;
  31. rtgui_wintitle_t* rtgui_wintitle_create(const char* 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 char* title);
  35. char *rtgui_wintitle_get_title(rtgui_wintitle_t* wintitle);
  36. #endif