Download

Support

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 struct 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_Widgetewl_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 ( media   )     ((Ewl_Media *) media)

#define EWL_MEDIA_IS (  )     (ewl_widget_type_is(EWL_WIDGET(w), EWL_MEDIA_TYPE))

Returns TRUE if the widget is an Ewl_Media, FALSE otherwise


Typedef Documentation

typedef struct Ewl_Media Ewl_Media

The Ewl_Media widget


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

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_MEDIA_TYPE, and mute.

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

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_MEDIA_TYPE, mute, and video.

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

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_FLOAT, EWL_MEDIA_TYPE, and 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

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_MEDIA_TYPE, video, and 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.

Parameters:
m,: the media area to be initialized
Returns:
Returns TRUE on success, FALSE on failure. Sets the internal fields and callbacks of a media object to there defaults.

References DCHECK_PARAM_PTR_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, ewl_callback_append(), EWL_CALLBACK_CONFIGURE, EWL_CALLBACK_REALIZE, EWL_CALLBACK_REVEAL, EWL_CALLBACK_UNREALIZE, ewl_media_cb_configure(), ewl_media_cb_realize(), ewl_media_cb_reveal(), ewl_media_cb_unrealize(), EWL_MEDIA_TYPE, EWL_WIDGET, ewl_widget_appearance_set(), ewl_widget_inherit(), and ewl_widget_init().

Referenced by ewl_media_new().

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

References DENTER_FUNCTION, DLEVEL_STABLE, and DRETURN_INT.

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.

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_MEDIA_TYPE, and video.

Referenced by ewl_media_length_time_get().

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

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, ewl_media_length_get(), and EWL_MEDIA_TYPE.

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.

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, EWL_MEDIA_TYPE, and media.

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

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_MEDIA_TYPE, IF_FREE, media, and video.

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

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_MEDIA_MODULE_XINE, EWL_MEDIA_TYPE, and module.

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

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_MEDIA_MODULE_GSTREAMER, EWL_MEDIA_MODULE_XINE, EWL_MEDIA_TYPE, module, and video.

Referenced by ewl_media_cb_realize().

Ewl_Widget* ewl_media_new ( void   ) 

Allocate a new media widget.

Returns:
Returns a pointer to a new media on success, NULL on failure.

References DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, ewl_media_init(), EWL_WIDGET, ewl_widget_destroy(), and NEW.

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

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_MEDIA_TYPE, and video.

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

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_FLOAT, EWL_MEDIA_TYPE, and video.

Referenced by ewl_media_position_time_get().

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

References block_seek, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, ewl_media_seekable_get(), EWL_MEDIA_TYPE, position, and video.

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

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, ewl_media_position_get(), and EWL_MEDIA_TYPE.

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

References block_seek, DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_MEDIA_TYPE, and video.

Referenced by ewl_media_position_set().


Copyright © Enlightenment.org

Enlightened Widget Library Documentation Generated: Sat May 17 16:51:10 2008