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 AtkImplementorIface and GtkBuildable.

Properties

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

Signals

  "level-changed"                                  : Run Last / Action
  "mute-toggled"                                   : 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.

Note

HildonVolumebar has been deprecated since Hildon 2.2 and should not be used in newly written code. See Migrating Volume Bars section to know how to migrate this deprecated widget.

Details

HildonVolumebar

typedef struct _HildonVolumebar HildonVolumebar;

Warning

HildonVolumebar is deprecated and should not be used in newly-written code.


hildon_volumebar_get_level ()

double              hildon_volumebar_get_level          (HildonVolumebar *self);

Warning

hildon_volumebar_get_level is deprecated and should not be used in newly-written code.

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);

Warning

hildon_volumebar_set_level is deprecated and should not be used in newly-written code.

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);

Warning

hildon_volumebar_get_mute is deprecated and should not be used in newly-written code.

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);

Warning

hildon_volumebar_set_mute is deprecated and should not be used in newly-written code.

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);

Warning

hildon_volumebar_get_adjustment is deprecated and should not be used in newly-written code.

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);

Warning

hildon_volumebar_set_range_insensitive_message is deprecated and should not be used in newly-written code. As of hildon 2.2, it is strongly discouraged to use insensitive messages.

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,
                                                         ...);

Warning

hildon_volumebar_set_range_insensitive_messagef is deprecated and should not be used in newly-written code. As of hildon 2.2, it is strongly discouraged to use insensitive messages.

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