scrollbar.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /** \file scrollbar.h
  2. * \brief Header: WScrollBar widget
  3. */
  4. #ifndef MC__WIDGET_SCROLLBAR_H
  5. #define MC__WIDGET_SCROLLBAR_H
  6. /*** typedefs(not structures) and defined constants **********************************************/
  7. #define SCROLLBAR(x) ((WScrollBar *)(x))
  8. /*** enums ***************************************************************************************/
  9. typedef enum
  10. {
  11. SCROLLBAR_VERTICAL,
  12. SCROLLBAR_HORISONTAL
  13. } scrollbar_type_t;
  14. /*** structures declarations (and typedefs of structures)*****************************************/
  15. typedef struct
  16. {
  17. Widget widget;
  18. scrollbar_type_t type;
  19. int *total;
  20. int *current;
  21. int *first_displayed;
  22. Widget *parent;
  23. } WScrollBar;
  24. /*** global variables defined in .c file *********************************************************/
  25. /*** declarations of public functions ************************************************************/
  26. WScrollBar *scrollbar_new (Widget * parent, scrollbar_type_t type);
  27. void scrollbar_set_total (WScrollBar * scrollbar, int *total);
  28. void scrollbar_set_current (WScrollBar * scrollbar, int *current);
  29. void scrollbar_set_first_displayed (WScrollBar * scrollbar, int *first_displayed);
  30. void scrollbar_global_init (void);
  31. void scrollbar_global_deinit (void);
  32. /*** inline functions ****************************************************************************/
  33. #endif /* MC__WIDGET_SCROLLBAR_H */