Ewl_Media: A Multi media widget
Detailed Description
Defines a class for displaing video.
- Remarks:
- Inherits from Ewl_Widget.
Tutorial
Data Structures | |
struct | Ewl_Media |
Inherits from the Ewl_Widget class and extends it to provide for multi-line media layout, obstacle wrapping, and a variety of formatting. More... | |
Defines | |
#define | EWL_MEDIA(media) ((Ewl_Media *) media) |
#define | EWL_MEDIA_IS(w) (ewl_widget_type_is(EWL_WIDGET(w), EWL_MEDIA_TYPE)) |
#define | EWL_MEDIA_TYPE "media" |
Typedefs | |
typedef Ewl_Media | Ewl_Media |
Functions | |
int | ewl_media_audio_mute_get (Ewl_Media *m) |
Checks if the media widget is muted. | |
void | ewl_media_audio_mute_set (Ewl_Media *m, int mute) |
Mutes the media widget. | |
double | ewl_media_audio_volume_get (Ewl_Media *m) |
Gets the current volume from the media widget. | |
void | ewl_media_audio_volume_set (Ewl_Media *m, double v) |
Sets the media widget to the given volume. | |
void | ewl_media_cb_configure (Ewl_Widget *w, void *ev_data, void *user_data) |
void | ewl_media_cb_realize (Ewl_Widget *w, void *ev_data, void *user_data) |
void | ewl_media_cb_reveal (Ewl_Widget *w, void *ev_data, void *user_data) |
void | ewl_media_cb_unrealize (Ewl_Widget *w, void *ev_data, void *user_data) |
int | ewl_media_init (Ewl_Media *m) |
Initialize the fields and callbacks of a media object. | |
unsigned int | ewl_media_is_available (void) |
This will check if the modules required for the media widget were available at compile time or not. | |
int | ewl_media_length_get (Ewl_Media *m) |
Retrieve the length of the media displayed by the media widget. | |
void | ewl_media_length_time_get (Ewl_Media *m, int *h, int *min, double *s) |
Puts the length of the video into the h, m, s variables. | |
const char * | ewl_media_media_get (Ewl_Media *m) |
Retrieve the media of a media widget. | |
void | ewl_media_media_set (Ewl_Media *m, const char *media) |
Set the media of a media widget. | |
Ewl_Media_Module_Type | ewl_media_module_get (Ewl_Media *m) |
Retrieve the module of a media widget. | |
int | ewl_media_module_set (Ewl_Media *m, Ewl_Media_Module_Type module) |
Set the module of a media widget. | |
Ewl_Widget * | ewl_media_new (void) |
Allocate a new media widget. | |
void | ewl_media_play_set (Ewl_Media *m, int p) |
Sets the media widget into the given state. | |
double | ewl_media_position_get (Ewl_Media *m) |
Returns the position of the current media. | |
void | ewl_media_position_set (Ewl_Media *m, double p) |
Sets the media widget to the specified position. | |
void | ewl_media_position_time_get (Ewl_Media *m, int *h, int *min, double *s) |
Puts the position of the video into the h, m, s variables. | |
int | ewl_media_seekable_get (Ewl_Media *m) |
Returns if the media area is seekable. |
Define Documentation
#define EWL_MEDIA_IS | ( | w | ) | (ewl_widget_type_is(EWL_WIDGET(w), EWL_MEDIA_TYPE)) |
Returns TRUE if the widget is an Ewl_Media, FALSE otherwise
#define EWL_MEDIA_TYPE "media" |
The type name for the Ewl_Media widget
Typedef Documentation
Function Documentation
int ewl_media_audio_mute_get | ( | Ewl_Media * | m | ) |
Checks if the media widget is muted.
- Parameters:
-
m,: the media widget to act upon
- Returns:
- Returns if the media widget is muted
void ewl_media_audio_mute_set | ( | Ewl_Media * | m, | |
int | mute | |||
) |
Mutes the media widget.
- Parameters:
-
m,: the media widget to act upon mute,: boolean to indicate if the sound should be muted
- Returns:
- Returns no value
double ewl_media_audio_volume_get | ( | Ewl_Media * | m | ) |
Gets the current volume from the media widget.
- Parameters:
-
m,: the media widget to act upon
- Returns:
- Returns the media widget volume
void ewl_media_audio_volume_set | ( | Ewl_Media * | m, | |
double | v | |||
) |
Sets the media widget to the given volume.
- Parameters:
-
m,: the media widget to act upon v,: the volume to set the widget too
- Returns:
- Returns no value
void ewl_media_cb_configure | ( | Ewl_Widget * | w, | |
void * | ev_data, | |||
void * | user_data | |||
) |
void ewl_media_cb_realize | ( | Ewl_Widget * | w, | |
void * | ev_data, | |||
void * | user_data | |||
) |
void ewl_media_cb_reveal | ( | Ewl_Widget * | w, | |
void * | ev_data, | |||
void * | user_data | |||
) |
void ewl_media_cb_unrealize | ( | Ewl_Widget * | w, | |
void * | ev_data, | |||
void * | user_data | |||
) |
int ewl_media_init | ( | Ewl_Media * | m | ) |
Initialize the fields and callbacks of a media object.
- Parameters:
-
m,: the media area to be initialized
- Returns:
- Returns TRUE on success, FALSE on failure.
unsigned int ewl_media_is_available | ( | void | ) |
This will check if the modules required for the media widget were available at compile time or not.
- Returns:
- Returns TRUE if the media widget is available, FALSE otherwise
int ewl_media_length_get | ( | Ewl_Media * | m | ) |
Retrieve the length of the media displayed by the media widget.
- Parameters:
-
m,: the media widget to retrieve length from
- Returns:
- Returns the length of the media contained in the widget.
void ewl_media_length_time_get | ( | Ewl_Media * | m, | |
int * | h, | |||
int * | min, | |||
double * | s | |||
) |
Puts the length of the video into the h, m, s variables.
- Parameters:
-
m,: the media widget to act upon h,: hours variable min,: minutes variable s,: seconds variable
const char* ewl_media_media_get | ( | Ewl_Media * | m | ) |
Retrieve the media of a media widget.
- Parameters:
-
m,: the media widget to retrieve media contents
- Returns:
- Returns a copy of the media in m on success, NULL on failure.
void ewl_media_media_set | ( | Ewl_Media * | m, | |
const char * | media | |||
) |
Set the media of a media widget.
- Parameters:
-
m,: the media area widget to set the media media,: the media to set in the media widget m
- Returns:
- Returns no value.
Ewl_Media_Module_Type ewl_media_module_get | ( | Ewl_Media * | m | ) |
Retrieve the module of a media widget.
- Parameters:
-
m,: the media widget to retrieve module contents
- Returns:
- Returns a the module associated with the media object
int ewl_media_module_set | ( | Ewl_Media * | m, | |
Ewl_Media_Module_Type | module | |||
) |
Set the module of a media widget.
- Parameters:
-
m,: the media area widget to set the module module,: the module to set in the media widget m
- Returns:
- Returns FALSE if we failed to load the module, TRUE otherwise.
Ewl_Widget* ewl_media_new | ( | void | ) |
Allocate a new media widget.
- Returns:
- Returns a pointer to a new media on success, NULL on failure.
void ewl_media_play_set | ( | Ewl_Media * | m, | |
int | p | |||
) |
Sets the media widget into the given state.
- Parameters:
-
m,: the media widget to act upon p,: the value to set play too
- Returns:
- Returns no value
double ewl_media_position_get | ( | Ewl_Media * | m | ) |
Returns the position of the current media.
- Parameters:
-
m,: the media widget to act upon
- Returns:
- Returns the current media position
void ewl_media_position_set | ( | Ewl_Media * | m, | |
double | p | |||
) |
Sets the media widget to the specified position.
- Parameters:
-
m,: the media widget to act upon p,: the positon to seek too
- Returns:
- Returns no value
void ewl_media_position_time_get | ( | Ewl_Media * | m, | |
int * | h, | |||
int * | min, | |||
double * | s | |||
) |
Puts the position of the video into the h, m, s variables.
- Parameters:
-
m,: the media widget to act upon h,: hours variable min,: minutes variable s,: seconds variable
int ewl_media_seekable_get | ( | Ewl_Media * | m | ) |
Returns if the media area is seekable.
- Parameters:
-
m,: the media widget to act upon
- Returns:
- Returns if the media area is seekable