Download

Support

lib/ewl_popup.h

Go to the documentation of this file.
00001 /* vim: set sw=8 ts=8 sts=8 expandtab: */
00002 #ifndef EWL_POPUP_H
00003 #define EWL_POPUP_H
00004 
00022 #define EWL_POPUP_TYPE "popup"
00023 
00028 #define EWL_POPUP_IS(w) (ewl_widget_type_is(EWL_WIDGET(w), EWL_POPUP_TYPE))
00029 
00033 typedef struct Ewl_Popup Ewl_Popup;
00034 
00039 #define EWL_POPUP(popup) ((Ewl_Popup *) popup)
00040 
00044 struct Ewl_Popup
00045 {
00046         Ewl_Window window; 
00048         Ewl_Popup_Type type;    
00049         Ewl_Widget *follow;        
00050         struct {
00051                 int x;                        
00052                 int y;                        
00053         } mouse, offset;
00054         int fit_to_follow:1;        
00055         int moving:1;                
00056 };
00057 
00058 Ewl_Widget          *ewl_popup_new(void);
00059 int                  ewl_popup_init(Ewl_Popup *p);
00060 void                  ewl_popup_type_set(Ewl_Popup *p, Ewl_Popup_Type type);
00061 Ewl_Popup_Type   ewl_popup_type_get(Ewl_Popup *p);
00062 void                  ewl_popup_follow_set(Ewl_Popup *p, Ewl_Widget *w);
00063 Ewl_Widget        *ewl_popup_follow_get(Ewl_Popup *p);
00064 void                  ewl_popup_fit_to_follow_set(Ewl_Popup *p, int fit);
00065 int                  ewl_popup_fit_to_follow_get(Ewl_Popup *p);
00066 
00067 void                  ewl_popup_mouse_position_set(Ewl_Popup *p, int x, int y);
00068 void                 ewl_popup_offset_set(Ewl_Popup *p, int x, int y);
00069 
00070 /*
00071  * Internal, override at your own risk
00072  */
00073 void ewl_popup_cb_show(Ewl_Widget *w, void *ev_data, void *user_data);
00074 void ewl_popup_cb_mouse_move(Ewl_Widget *w, void *ev_data, void *user_data);
00075 void ewl_popup_cb_destroy(Ewl_Widget *w, void *ev_data, void *user_data);
00076 void ewl_popup_cb_child_resize(Ewl_Container *c, Ewl_Widget *w, int size,
00077                                         Ewl_Orientation o);
00078 void ewl_popup_cb_child_show(Ewl_Container *c, Ewl_Widget *w);
00079 void ewl_popup_cb_follow_destroy(Ewl_Widget *w, void *ev_data, void *user_data);
00080 void ewl_popup_cb_follow_configure(Ewl_Widget *w, void *ev_data,
00081                                         void *user_data);
00082 
00087 #endif

Copyright © Enlightenment.org

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