HildonVolumebar

HildonVolumebar — Base class for widgets that display a volume bar.

Synopsis




            HildonVolumebar;
double      hildon_volumebar_get_level      (HildonVolumebar *self);
void        hildon_volumebar_set_level      (HildonVolumebar *self,
                                             gdouble level);
gboolean    hildon_volumebar_get_mute       (HildonVolumebar *self);
void        hildon_volumebar_set_mute       (HildonVolumebar *self,
                                             gboolean mute);
GtkAdjustment* hildon_volumebar_get_adjustment
                                            (HildonVolumebar *self);
void        hildon_volumebar_set_range_insensitive_message
                                            (HildonVolumebar *widget,
                                             const gchar *message);
void        hildon_volumebar_set_range_insensitive_messagef
                                            (HildonVolumebar *widget,
                                             const gchar *format,
                                             ...);

Object Hierarchy


  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----HildonVolumebar
                                 +----HildonHVolumebar
                                 +----HildonVVolumebar

Implemented Interfaces

HildonVolumebar implements GtkBuildable and AtkImplementorIface.

Properties


  "can-focus"            gboolean              : Read / Write / Construct
  "has-mute"             gboolean              : Read / Write / Construct
  "level"                gdouble               : Read / Write
  "mute"                 gboolean              : Read / Write

Signals


"level-changed"
            void        user_function      (HildonVolumebar *hildonvolumebar,
                                            gpointer         user_data)            : Run last / Action
"mute-toggled"
            void        user_function      (HildonVolumebar *hildonvolumebar,
                                            gpointer         user_data)            : Run last / Action

Description

HildonVolumebar is a base class for widgets that display a volume bar that allows increasing or decreasing volume within a predefined range, and muting the volume when users click the mute icon.

Details

HildonVolumebar

typedef struct _HildonVolumebar HildonVolumebar;


hildon_volumebar_get_level ()

double      hildon_volumebar_get_level      (HildonVolumebar *self);

Gets the volume level of this HildonVolumebar.

self : volume bar to query level on
Returns : volume level or -1 on error

hildon_volumebar_set_level ()

void        hildon_volumebar_set_level      (HildonVolumebar *self,
                                             gdouble level);

Sets new volume level for this HildonVolumebar.

self : volume bar to change level on
level : new level

hildon_volumebar_get_mute ()

gboolean    hildon_volumebar_get_mute       (HildonVolumebar *self);

Gets mute status of this HildonVolumebar (ON/OFF).

self : volume bar to query mute status
Returns : Mute status as gboolean value.

hildon_volumebar_set_mute ()

void        hildon_volumebar_set_mute       (HildonVolumebar *self,
                                             gboolean mute);

Sets mute status for this HildonVolumebar.

self : volume bar to work on
mute : mute ON/OFF

hildon_volumebar_get_adjustment ()

GtkAdjustment* hildon_volumebar_get_adjustment
                                            (HildonVolumebar *self);

Gets the GtkAdjustment used in volume bar. This can be handy to pass to hildon_appview_set_connected_adjustment which will allow changing the volume with 'increase' / 'decrease' hardware buttons.

self : a HildonVolumebar
Returns : a GtkAdjustment used by volume bar.

hildon_volumebar_set_range_insensitive_message ()

void        hildon_volumebar_set_range_insensitive_message
                                            (HildonVolumebar *widget,
                                             const gchar *message);

Used to asign an insensitive message to the slider of the given volumebar. It simply calls hildon_helper_set_insensitive_message on the slider/range of the volumebar.

widget : A GtkWidget to assign the banner to
message : A message to display to the user

hildon_volumebar_set_range_insensitive_messagef ()

void        hildon_volumebar_set_range_insensitive_messagef
                                            (HildonVolumebar *widget,
                                             const gchar *format,
                                             ...);

A helper printf-like variant of hildon_helper_set_insensitive_message.

widget : A GtkWidget to assign the banner to
format : a printf-like format string
... : arguments for the format string

Property Details

The "can-focus" property

  "can-focus"            gboolean              : Read / Write / Construct

The widget focusability.

Default value: TRUE


The "has-mute" property

  "has-mute"             gboolean              : Read / Write / Construct

Whether the mute button is visibile.

Default value: TRUE


The "level" property

  "level"                gdouble               : Read / Write

Current volume level.

Allowed values: [0,100]

Default value: 50


The "mute" property

  "mute"                 gboolean              : Read / Write

Whether volume is muted.

Default value: FALSE

Signal Details

The "level-changed" signal

void        user_function                  (HildonVolumebar *hildonvolumebar,
                                            gpointer         user_data)            : Run last / Action

hildonvolumebar : the object which received the signal.
user_data : user data set when the signal handler was connected.

The "mute-toggled" signal

void        user_function                  (HildonVolumebar *hildonvolumebar,
                                            gpointer         user_data)            : Run last / Action

hildonvolumebar : the object which received the signal.
user_data : user data set when the signal handler was connected.

See Also

HildonHVolumebar, HildonVVolumebar