about_view.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. /** Gets the type of a about view */
  21. #define RTGUI_ABOUT_VIEW_TYPE (rtgui_about_view_type_get())
  22. /** Casts the object to a about view */
  23. #define RTGUI_ABOUT_VIEW(obj) (RTGUI_OBJECT_CAST((obj), RTGUI_ABOUT_VIEW_TYPE, rtgui_about_view_t))
  24. /** Checks if the object is a about view */
  25. #define RTGUI_IS_ABOUT_VIEW(obj) (RTGUI_OBJECT_CHECK_TYPE((obj), RTGUI_ABOUT_VIEW_TYPE))
  26. struct rtgui_about_view
  27. {
  28. struct rtgui_view parent;
  29. /* widget private data */
  30. rtgui_image_t* logo;
  31. const char* description;
  32. };
  33. typedef struct rtgui_about_view rtgui_about_view_t;
  34. rtgui_type_t *rtgui_about_view_type_get(void);
  35. rtgui_about_view_t* rtgui_about_view_create(rtgui_image_t *logo, const char* description);
  36. rt_bool_t rtgui_about_view_event_handler(struct rtgui_widget* widget, struct rtgui_event* event);
  37. #endif