hildon-libs 0.14.11 Reference Manual |
---|
HildonSeekbarHildonSeekbar — A widget used to identify a place from a content |
GtkWidget* hildon_seekbar_new (void); gint hildon_seekbar_get_total_time (HildonSeekbar *seekbar); void hildon_seekbar_set_total_time (HildonSeekbar *seekbar, gint time); gint hildon_seekbar_get_position (HildonSeekbar *seekbar); void hildon_seekbar_set_position (HildonSeekbar *seekbar, gint time); void hildon_seekbar_set_fraction (HildonSeekbar *seekbar, guint fraction); guint hildon_seekbar_get_fraction (HildonSeekbar *seekbar);
HildonSeekbar allows seeking in media with a range widget. It supports for setting or getting the length (total time) of the media, the position within it and the fraction (maximum position in a stream/the amount currently downloaded). The position is clamped between zero and the total time, or zero and the fraction in case of a stream.
GtkWidget *seekbar = hildon_seekbar_new()
;
hildon_seekbar_set_total_time (GTK_WIDGET(seekbar), 600);
hildon_seekbar_set_position (GTK_WIDGET(seekbar), 300);
static void seekbar_set_tot (GtkWidget *spin, GtkWidget *seek)
{
hildon_seekbar_set_total_time (seek,
(gint)gtk_spin_button_get_value(GTK_SPIN_BUTTON(spin)));
}
static void seekbar_set_pos (GtkWidget *spin, GtkWidget *seek)
{
hildon_seekbar_set_position (seek,
(gint)gtk_spin_button_get_value(GTK_SPIN_BUTTON(spin)));
}
static gint update_spin_button (GtkWidget *seek, GtkWidget *spin)
{
gtk_spin_button_set_value (GTK_SPIN_BUTTON(spin),
hildon_seekbar_get_position(seek));
return TRUE;
}
GtkWidget* hildon_seekbar_new (void);
Create a new HildonSeekbar widget.
Returns : | a GtkWidget pointer of HildonSeekbar widget |
gint hildon_seekbar_get_total_time (HildonSeekbar *seekbar);
seekbar : |
pointer to HildonSeekbar widget |
Returns : | total playing time of media in seconds. |
void hildon_seekbar_set_total_time (HildonSeekbar *seekbar, gint time);
Set total playing time of media in seconds.
seekbar : |
pointer to HildonSeekbar widget |
time : |
integer greater than zero |
gint hildon_seekbar_get_position (HildonSeekbar *seekbar);
Get current position in stream in seconds.
seekbar : |
pointer to HildonSeekbar widget |
Returns : | current position in stream in seconds |
void hildon_seekbar_set_position (HildonSeekbar *seekbar, gint time);
Set current position in stream in seconds.
seekbar : |
pointer to HildonSeekbar widget |
time : |
time within range of >= 0 && < G_MAXINT |
void hildon_seekbar_set_fraction (HildonSeekbar *seekbar, guint fraction);
Set current fraction value of the range. It should be between the minimal and maximal values of the range in seekbar.
seekbar : |
pointer to HildonSeekbar widget |
fraction : |
the new position of the progress indicator |
<< HildonHVolumebar | HildonCalendarPopup >> |