lib/ewl_scrollbar.h
Go to the documentation of this file.00001 /* vim: set sw=8 ts=8 sts=8 expandtab: */ 00002 #ifndef EWL_SCROLLBAR_H 00003 #define EWL_SCROLLBAR_H 00004 00005 #include "ewl_box.h" 00006 00040 #define EWL_SCROLLBAR_TYPE "scrollbar" 00041 00046 #define EWL_SCROLLBAR_IS(w) (ewl_widget_type_is(EWL_WIDGET(w), EWL_SCROLLBAR_TYPE)) 00047 00052 typedef struct Ewl_Scrollbar Ewl_Scrollbar; 00053 00058 #define EWL_SCROLLBAR(scrollbar) ((Ewl_Scrollbar *) scrollbar) 00059 00063 struct Ewl_Scrollbar 00064 { 00065 Ewl_Box box; 00067 Ewl_Widget *seeker; 00068 Ewl_Widget *decrement; 00069 Ewl_Widget *increment; 00070 unsigned int buttons_alignment; 00072 double fill_percentage; 00073 double start_time; 00074 Ecore_Timer *timer; 00075 signed char direction; 00076 signed char invert; 00077 }; 00078 00079 Ewl_Widget *ewl_scrollbar_new(void); 00080 Ewl_Widget *ewl_hscrollbar_new(void); 00081 Ewl_Widget *ewl_vscrollbar_new(void); 00082 int ewl_scrollbar_init(Ewl_Scrollbar *s); 00083 00084 void ewl_scrollbar_orientation_set(Ewl_Scrollbar *s, 00085 Ewl_Orientation orientation); 00086 Ewl_Orientation ewl_scrollbar_orientation_get(Ewl_Scrollbar *s); 00087 char ewl_scrollbar_inverse_scroll_get(Ewl_Scrollbar *s); 00088 void ewl_scrollbar_inverse_scroll_set(Ewl_Scrollbar *s, char v); 00089 double ewl_scrollbar_value_get(Ewl_Scrollbar *s); 00090 void ewl_scrollbar_value_set(Ewl_Scrollbar *s, double v); 00091 00092 double ewl_scrollbar_step_get(Ewl_Scrollbar *s); 00093 void ewl_scrollbar_step_set(Ewl_Scrollbar *s, double v); 00094 00095 /* 00096 * Internally used callbacks, override at your own risk. 00097 */ 00098 void ewl_scrollbar_cb_scroll_start(Ewl_Widget *w, void *ev_data, 00099 void *user_data); 00100 void ewl_scrollbar_cb_scroll_stop(Ewl_Widget *w, void *ev_data, 00101 void *user_data); 00102 00107 #endif