lib/ewl_view.h
Go to the documentation of this file.00001 /* vim: set sw=8 ts=8 sts=8 expandtab: */ 00002 #ifndef EWL_VIEW_H 00003 #define EWL_VIEW_H 00004 00018 #define EWL_VIEW_WIDGET_FETCH(f) ((Ewl_View_Widget_Fetch)f) 00019 00023 typedef Ewl_Widget *(*Ewl_View_Widget_Fetch)(void *data, unsigned int row, 00024 unsigned int col, 00025 void *private_data); 00026 00031 #define EWL_VIEW_HEADER_GET(f) ((Ewl_View_Header_Fetch)f) 00032 00036 typedef Ewl_Widget *(*Ewl_View_Header_Fetch)(void *data, unsigned int column, 00037 void *private_data); 00038 00043 #define EWL_VIEW(view) ((Ewl_View *)view) 00044 00048 typedef struct Ewl_View Ewl_View; 00049 00054 #define EWL_VIEW_EXPANSION_VIEW_FETCH_GET(f) ((Ewl_View_Expansion_View_Fetch)f) 00055 00060 typedef Ewl_View *(*Ewl_View_Expansion_View_Fetch)(void *data, 00061 unsigned int row); 00062 00066 struct Ewl_View 00067 { 00068 Ewl_View_Widget_Fetch fetch; 00069 Ewl_View_Header_Fetch header_fetch; 00070 Ewl_View_Expansion_View_Fetch expansion; 00071 }; 00072 00073 Ewl_View *ewl_view_new(void); 00074 int ewl_view_init(Ewl_View *view); 00075 Ewl_View *ewl_view_clone(const Ewl_View *src); 00076 00077 void ewl_view_widget_fetch_set(Ewl_View *view, 00078 Ewl_View_Widget_Fetch construct); 00079 Ewl_View_Widget_Fetch ewl_view_widget_fetch_get(const Ewl_View *view); 00080 00081 void ewl_view_header_fetch_set(Ewl_View *v, 00082 Ewl_View_Header_Fetch f); 00083 Ewl_View_Header_Fetch ewl_view_header_fetch_get(const Ewl_View *v); 00084 00085 void ewl_view_expansion_view_fetch_set(Ewl_View *v, 00086 Ewl_View_Expansion_View_Fetch f); 00087 Ewl_View_Expansion_View_Fetch ewl_view_expansion_view_fetch_get(const Ewl_View *v); 00088 00093 #endif 00094