Download

Support

lib/ewl_attach.h

Go to the documentation of this file.
00001 /* vim: set sw=8 ts=8 sts=8 expandtab: */
00002 #ifndef EWL_ATTACH_H
00003 #define EWL_ATTACH_H
00004 
00016 #define EWL_ATTACH_TOOLTIP_TYPE "tooltip"
00017 
00022 #define EWL_ATTACH_IS(w) (ewl_widget_type_is(EWL_WIDGET(w)), EWL_ATTACH_TYPE)
00023 
00028 #define EWL_ATTACH(attach) ((Ewl_Attach *) attach)
00029 
00033 typedef struct Ewl_Attach Ewl_Attach;
00034 
00038 struct Ewl_Attach
00039 {
00040         Ewl_Attach_Type type;                
00041         Ewl_Attach_Data_Type data_type; 
00043         void *data;                        
00044         void *priv_data;                
00045 };
00046 
00050 typedef struct Ewl_Attach_Dnd Ewl_Attach_Dnd;
00051 
00055 struct Ewl_Attach_Dnd
00056 {
00057         Ewl_Widget *cursor;        
00058         void *data;                
00059         int size;                
00060 };
00061 
00066 #define ewl_attach_tooltip_text_set(w, data) \
00067         ewl_attach_text_set(EWL_WIDGET(w), EWL_ATTACH_TYPE_TOOLTIP, data)
00068 
00073 #define ewl_attach_tooltip_widget_set(w, data) \
00074         ewl_attach_widget_set(EWL_WIDGET(w), EWL_ATTACH_TYPE_TOOLTIP, data)
00075 
00076 
00081 #define ewl_attach_mouse_cursor_set(w, data) \
00082         ewl_attach_other_set(EWL_WIDGET(w), EWL_ATTACH_TYPE_MOUSE_CURSOR, \
00083                         (int *)data)
00084 
00089 #define ewl_attach_mouse_argb_cursor_set(w, cursor) \
00090         ewl_attach_other_set(EWL_WIDGET(w), \
00091                         EWL_ATTACH_TYPE_MOUSE_ARGB_CURSOR, cursor)
00092 
00097 #define ewl_attach_color_set(w, data) \
00098         ewl_attach_other_set(EWL_WIDGET(w), EWL_ATTACH_TYPE_COLOR, data)
00099 
00104 #define ewl_attach_color_get(w) \
00105         ewl_attach_get(EWL_WIDGET(w), EWL_ATTACH_TYPE_COLOR)
00106 
00111 #define ewl_attach_name_set(w, data) \
00112         ewl_attach_text_set(EWL_WIDGET(w), EWL_ATTACH_TYPE_NAME, data)
00113 
00118 #define ewl_attach_name_get(w) \
00119         ewl_attach_get(EWL_WIDGET(w), EWL_ATTACH_TYPE_NAME)
00120 
00125 #define ewl_attach_widget_association_set(w, data) \
00126         ewl_attach_other_set(EWL_WIDGET(w), \
00127                         EWL_ATTACH_TYPE_WIDGET_ASSOCIATION, data)
00128 
00133 #define ewl_attach_widget_association_get(w) \
00134         ewl_attach_get(EWL_WIDGET(w), EWL_ATTACH_TYPE_WIDGET_ASSOCIATION)
00135 
00136 void ewl_attach_text_set(Ewl_Widget *w, Ewl_Attach_Type t, const char *data);
00137 void ewl_attach_widget_set(Ewl_Widget *w, Ewl_Attach_Type t, Ewl_Widget *data);
00138 void ewl_attach_other_set(Ewl_Widget *w, Ewl_Attach_Type t, void *data);
00139 void *ewl_attach_get(Ewl_Widget *w, Ewl_Attach_Type t);
00140 
00141 void ewl_attach_list_del(Ewl_Attach_List *list, Ewl_Attach_Type type);
00142 
00147 #endif
00148 

Copyright © Enlightenment.org

Enlightened Widget Library Documentation Generated: Sat May 17 16:49:03 2008