Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Related Pages

Media: A Multi media widget

Defines a class for displaing video. More...

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...

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)
 Typecasts a pointer to an Ewl_Media pointer.


Functions

Ewl_Widgetewl_media_new (char *media)
 Allocate a new media widget.

void ewl_media_init (Ewl_Media *m, char *media)
 Initialize the fields and callbacks of a media object.

void ewl_media_media_set (Ewl_Media *m, char *media)
 Set the media of a media widget.

char * ewl_media_media_get (Ewl_Media *m)
 Retrieve the media of a media widget.

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.

void ewl_media_play_set (Ewl_Media *m, int p)
 Sets the media widget into the given state.

int ewl_media_seekable_get (Ewl_Media *m)
 Returns if the media area is seekable.

double ewl_media_position_get (Ewl_Media *m)
 Returns the position of the current media.

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.

void ewl_media_position_set (Ewl_Media *m, double p)
 Sets the media widget to the specified position.

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.


Detailed Description

Defines a class for displaing video.


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_init Ewl_Media m,
char *  media
 

Initialize the fields and callbacks of a media object.

Parameters:
m: the media area to be initialized
media: the media to be played or NULL
Returns:
Returns no value.
Sets the internal fields and callbacks of a media object to there defaults.

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

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,
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.
Sets the media of the media widget m

Ewl_Widget* ewl_media_new char *  media  ) 
 

Allocate a new media widget.

Parameters:
media: the media to be played or NULL
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