Download

Support

lib/ewl_icon.h

Go to the documentation of this file.
00001 /* vim: set sw=8 ts=8 sts=8 expandtab: */
00002 #ifndef EWL_ICON_H
00003 #define EWL_ICON_H
00004 
00005 #include "ewl_stock.h"
00006 
00023 #define EWL_ICON_TYPE "icon"
00024 
00029 #define EWL_ICON_IS(w) (ewl_widget_type_is(EWL_WIDGET(w), EWL_ICON_TYPE))
00030 
00035 #define EWL_ICON(icon) ((Ewl_Icon *)icon)
00036 
00040 typedef struct Ewl_Icon Ewl_Icon;
00041 
00045 struct Ewl_Icon
00046 {
00047         Ewl_Stock stock;        
00048         Ewl_Widget *label;        
00049         Ewl_Widget *image;        
00050         Ewl_Widget *alt;        
00051         Ewl_Widget *extended;        
00053         char *label_text;        
00055         unsigned int constrain;                
00057         Ewl_Icon_Type type;                
00058         Ewl_Icon_Part hidden;                
00059         unsigned char editable:1;        
00060         unsigned char compress_label:1; 
00061         unsigned char complex_label:1;  
00062         unsigned char thumbnailing:1;   
00063 };
00064 
00065 Ewl_Widget        *ewl_icon_new(void);
00066 Ewl_Widget      *ewl_icon_simple_new(void);
00067 int                 ewl_icon_init(Ewl_Icon *icon);
00068 
00069 void                 ewl_icon_type_set(Ewl_Icon *icon, Ewl_Icon_Type type);
00070 Ewl_Icon_Type         ewl_icon_type_get(Ewl_Icon *icon);
00071 
00072 void             ewl_icon_part_hide(Ewl_Icon *icon, Ewl_Icon_Part part);
00073 
00074 void                 ewl_icon_image_set(Ewl_Icon *icon, const char *file,
00075                                                 const char *key);
00076 const char         *ewl_icon_image_file_get(Ewl_Icon *icon);
00077 
00078 void             ewl_icon_thumbnailing_set(Ewl_Icon *icon, unsigned int thumb);
00079 unsigned int     ewl_icon_thumbnailing_get(Ewl_Icon *icon);
00080 
00081 void                 ewl_icon_constrain_set(Ewl_Icon *icon, unsigned int val);
00082 unsigned int         ewl_icon_constrain_get(Ewl_Icon *icon);
00083 
00084 void                 ewl_icon_alt_text_set(Ewl_Icon *icon, const char *txt);
00085 const char        *ewl_icon_alt_text_get(Ewl_Icon *icon);
00086 
00087 void                 ewl_icon_label_set(Ewl_Icon *icon, const char *label);
00088 const char        *ewl_icon_label_get(Ewl_Icon *icon);
00089 
00090 void                 ewl_icon_editable_set(Ewl_Icon *icon, unsigned int e);
00091 unsigned int         ewl_icon_editable_get(Ewl_Icon *icon);
00092 
00093 void                 ewl_icon_label_compressed_set(Ewl_Icon *icon,
00094                                                 unsigned int compress);
00095 unsigned int         ewl_icon_label_compressed_get(Ewl_Icon *icon);
00096 
00097 void             ewl_icon_label_complex_set(Ewl_Icon *icon,
00098                                                 unsigned int complex_label);
00099 unsigned int     ewl_icon_label_complex_get(Ewl_Icon *icon);
00100 
00101 void                 ewl_icon_extended_data_set(Ewl_Icon *icon, Ewl_Widget *ext);
00102 Ewl_Widget        *ewl_icon_extended_data_get(Ewl_Icon *icon);
00103 
00104 /*
00105  * Internal stuff
00106  */
00107 void ewl_icon_cb_destroy(Ewl_Widget *w, void *ev, void *data);
00108 
00113 #endif
00114 

Copyright © Enlightenment.org

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