about_view.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * File : list_view.h
  3. * This file is part of RTGUI in RT-Thread RTOS
  4. * COPYRIGHT (C) 2010, 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. * 2010-01-06 Bernard first version
  13. */
  14. #ifndef __RTGUI_ABOUT_VIEW_H__
  15. #define __RTGUI_ABOUT_VIEW_H__
  16. #include <rtgui/rtgui.h>
  17. #include <rtgui/image.h>
  18. #include <rtgui/rtgui_system.h>
  19. #include <rtgui/widgets/view.h>
  20. DECLARE_CLASS_TYPE(aboutview);
  21. /** Gets the type of a about view */
  22. #define RTGUI_ABOUT_VIEW_TYPE (RTGUI_TYPE(aboutview))
  23. /** Casts the object to a about view */
  24. #define RTGUI_ABOUT_VIEW(obj) (RTGUI_OBJECT_CAST((obj), RTGUI_ABOUT_VIEW_TYPE, rtgui_about_view_t))
  25. /** Checks if the object is a about view */
  26. #define RTGUI_IS_ABOUT_VIEW(obj) (RTGUI_OBJECT_CHECK_TYPE((obj), RTGUI_ABOUT_VIEW_TYPE))
  27. struct rtgui_about_view
  28. {
  29. struct rtgui_view parent;
  30. /* widget private data */
  31. rtgui_image_t* logo;
  32. const char* description;
  33. };
  34. typedef struct rtgui_about_view rtgui_about_view_t;
  35. rtgui_type_t *rtgui_about_view_type_get(void);
  36. rtgui_about_view_t* rtgui_about_view_create(rtgui_image_t *logo, const char* description);
  37. rt_bool_t rtgui_about_view_event_handler(struct rtgui_widget* widget, struct rtgui_event* event);
  38. #endif