Download

Support

lib/ewl_stock.h

Go to the documentation of this file.
00001 /* vim: set sw=8 ts=8 sts=8 expandtab: */
00002 #ifndef EWL_STOCK_H
00003 #define EWL_STOCK_H
00004 
00005 #include "ewl_box.h"
00006 
00025 typedef struct Ewl_Stock_Funcs Ewl_Stock_Funcs;
00026 
00031 #define EWL_STOCK_TYPE "stock"
00032 
00037 #define EWL_STOCK_IS(w) (ewl_widget_type_is(EWL_WIDGET(w), EWL_STOCK_TYPE))
00038 
00042 typedef struct Ewl_Stock Ewl_Stock;
00043 
00048 #define EWL_STOCK(stock) ((Ewl_Stock *) stock)
00049 
00054 #define EWL_STOCK_LABEL_SET(f) ((Ewl_Stock_Label_Set)f)
00055 
00059 typedef void (*Ewl_Stock_Label_Set)(Ewl_Stock *s, const char *txt);
00060 
00065 #define EWL_STOCK_IMAGE_SET(f) ((Ewl_Stock_Image_Set)f)
00066 
00070 typedef void (*Ewl_Stock_Image_Set)(Ewl_Stock *s, const char *file, const char *key);
00071 
00076 #define EWL_STOCK_TOOLTIP_SET(f) ((Ewl_Stock_Tooltip_set)f)
00077 
00081 typedef void (*Ewl_Stock_Tooltip_Set)(Ewl_Stock *s, const char *tip);
00082 
00087 struct Ewl_Stock
00088 {
00089         Ewl_Box box;                         
00090         Ewl_Stock_Type stock_type;        
00091         const Ewl_Stock_Funcs *stock_funcs;        
00092 };
00093 
00098 struct Ewl_Stock_Funcs
00099 {
00100         Ewl_Stock_Label_Set label_set;                
00101         Ewl_Stock_Image_Set image_set;                 
00102         Ewl_Stock_Tooltip_Set tooltip_set;        
00103 };
00104 
00105 
00106 int                 ewl_stock_init(Ewl_Stock *s);
00107 
00108 void                  ewl_stock_functions_set(Ewl_Stock *s, const Ewl_Stock_Funcs * const funcs);
00109 
00110 void                 ewl_stock_type_set(Ewl_Stock *s, Ewl_Stock_Type stock);
00111 Ewl_Stock_Type         ewl_stock_type_get(Ewl_Stock *s);
00112 
00117 #endif
00118 

Copyright © Enlightenment.org

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