Download

Support

lib/ewl_media.h

Go to the documentation of this file.
00001 /* vim: set sw=8 ts=8 sts=8 expandtab: */
00002 #ifndef EWL_MEDIA_H
00003 #define EWL_MEDIA_H
00004 
00026 #define EWL_MEDIA_TYPE "media"
00027 
00032 #define EWL_MEDIA_IS(w) (ewl_widget_type_is(EWL_WIDGET(w), EWL_MEDIA_TYPE))
00033 
00037 typedef struct Ewl_Media Ewl_Media;
00038 
00043 #define EWL_MEDIA(media) ((Ewl_Media *) media)
00044 
00049 struct Ewl_Media
00050 {
00051         Ewl_Widget widget;         
00052         void *video;          
00053         Ewl_Media_Module_Type module; 
00054         char *media;                 
00055         int block_seek;         
00057         double volume;                
00058         double position;        
00059         unsigned char mute:1;        
00060 };
00061 
00062 Ewl_Widget                *ewl_media_new(void);
00063 int                          ewl_media_init(Ewl_Media *m);
00064 
00065 unsigned int                 ewl_media_is_available(void);
00066 
00067 int                         ewl_media_module_set(Ewl_Media *m,
00068                                                 Ewl_Media_Module_Type module);
00069 Ewl_Media_Module_Type          ewl_media_module_get(Ewl_Media *m);
00070 
00071 void                         ewl_media_media_set(Ewl_Media *m, const char *media);
00072 const char                 *ewl_media_media_get(Ewl_Media *m);
00073 
00074 int                         ewl_media_length_get(Ewl_Media *m);
00075 void                         ewl_media_length_time_get(Ewl_Media *m, int *h,
00076                                                         int *min, double *s);
00077 
00078 void                         ewl_media_play_set(Ewl_Media *m, int p);
00079 int                         ewl_media_seekable_get(Ewl_Media *m);
00080 double                         ewl_media_position_get(Ewl_Media *m);
00081 void                         ewl_media_position_time_get(Ewl_Media *m, int *h,
00082                                                         int *min, double *s);
00083 void                         ewl_media_position_set(Ewl_Media *m, double p);
00084 
00085 int                         ewl_media_audio_mute_get(Ewl_Media *m);
00086 void                         ewl_media_audio_mute_set(Ewl_Media *m, int mute);
00087 double                         ewl_media_audio_volume_get(Ewl_Media *m);
00088 void                         ewl_media_audio_volume_set(Ewl_Media *m, double v);
00089 
00090 /*
00091  * Internally used callbacks, override at your own risk.
00092  */
00093 void ewl_media_cb_realize(Ewl_Widget *w, void *ev_data, void *user_data);
00094 void ewl_media_cb_reveal(Ewl_Widget *w, void *ev_data, void *user_data);
00095 void ewl_media_cb_unrealize(Ewl_Widget *w, void *ev_data, void *user_data);
00096 void ewl_media_cb_configure(Ewl_Widget *w, void *ev_data, void *user_data);
00097 
00102 #endif

Copyright © Enlightenment.org

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