staticline.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef __RTGUI_STATICLINE__H__
  2. #define __RTGUI_STATICLINE__H__
  3. #include <rtgui/rtgui.h>
  4. #include <rtgui/widgets/widget.h>
  5. /*
  6. * the static line widget
  7. */
  8. /** Gets the type of a staticline */
  9. #define RTGUI_STATICLINE_TYPE (rtgui_staticline_type_get())
  10. /** Casts the object to an rtgui_staticline */
  11. #define RTGUI_STATICLINE(obj) (RTGUI_OBJECT_CAST((obj), RTGUI_STATICLINE_TYPE, rtgui_staticline_t))
  12. /** Checks if the object is an rtgui_staticline */
  13. #define RTGUI_IS_STATICLINE(obj) (RTGUI_OBJECT_CHECK_TYPE((obj), RTGUI_STATICLINE_TYPE))
  14. struct rtgui_staticline
  15. {
  16. /* inherit from widget */
  17. struct rtgui_widget parent;
  18. int orient;
  19. };
  20. typedef struct rtgui_staticline rtgui_staticline_t;
  21. rtgui_staticline_t *rtgui_staticline_create(int orientation);
  22. void rtgui_staticline_destroy(rtgui_staticline_t* staticline);
  23. rt_bool_t rtgui_staticline_event_handler(struct rtgui_widget* widget, struct rtgui_event* event);
  24. void rtgui_staticline_set_orientation(rtgui_staticline_t* staticline, int orientation);
  25. #endif