Top | ![]() |
![]() |
![]() |
![]() |
GtkWidget * | pt_waveviewer_new () |
void | pt_waveviewer_set_wave () |
void | pt_waveviewer_set_follow_cursor () |
gboolean | pt_waveviewer_get_follow_cursor () |
gboolean | fixed-cursor | Read / Write / Construct |
gboolean | follow-cursor | Read / Write / Construct |
gboolean | has-selection | Read |
gint64 | playback-cursor | Write |
gint64 | selection-end | Read |
gint64 | selection-start | Read |
gboolean | show-ruler | Read / Write / Construct |
GObject ╰── GInitiallyUnowned ╰── GtkWidget ╰── GtkContainer ╰── GtkBin ╰── GtkScrolledWindow ╰── PtWaveviewer
GtkWidget *
pt_waveviewer_new (void
);
Create a new, initially blank waveform viewer widget. Use
pt_waveviewer_set_wave()
to pass wave data.
After use gtk_widget_destroy()
it.
void pt_waveviewer_set_wave (PtWaveviewer *self
,PtWavedata *data
);
Set wave data to show in the widget. The data is copied internally and may
be freed immediately after calling this function. If data
is NULL, a blank
widget is drawn.
void pt_waveviewer_set_follow_cursor (PtWaveviewer *self
,gboolean follow
);
Set follow-cursor option to TRUE or FALSE. See also “follow-cursor”.
gboolean
pt_waveviewer_get_follow_cursor (PtWaveviewer *self
);
Get follow-cursor option.
struct PtWaveviewer;
The PtWaveviewer contains only private fields and should not be directly accessed.
“fixed-cursor”
property “fixed-cursor” gboolean
If TRUE, in follow-cursor mode the cursor is at a fixed position and the waveform is scrolling. If FALSE the cursor is moving.
If “follow-cursor” is FALSE, this has no effect.
Owner: PtWaveviewer
Flags: Read / Write / Construct
Default value: TRUE
“follow-cursor”
property “follow-cursor” gboolean
If the widget follows the cursor, it scrolls automatically to the cursor's position. Note that the widget will change this property to FALSE if the user scrolls the widget manually.
Owner: PtWaveviewer
Flags: Read / Write / Construct
Default value: TRUE
“has-selection”
property “has-selection” gboolean
Whether something is selected (TRUE) or not (FALSE).
Owner: PtWaveviewer
Flags: Read
Default value: FALSE
“playback-cursor”
property “playback-cursor” gint64
Current playback position in milliseconds.
Owner: PtWaveviewer
Flags: Write
Allowed values: >= 0
Default value: 0
“selection-end”
property “selection-end” gint64
End time of selection in milliseconds. If it's equal to the start time, there is no selection. See also “has-selection”.
Owner: PtWaveviewer
Flags: Read
Allowed values: >= 0
Default value: 0
“selection-start”
property “selection-start” gint64
Start time of selection in milliseconds. If it's equal to the end time, there is no selection. See also “has-selection”.
Owner: PtWaveviewer
Flags: Read
Allowed values: >= 0
Default value: 0
“cursor-changed”
signalvoid user_function (PtWaveviewer *viewer, gint64 position, gpointer user_data)
Signals that the cursor's position was changed by the user.
viewer |
the waveviewer emitting the signal |
|
position |
the new position in stream in milliseconds |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
“play-toggled”
signalvoid user_function (PtWaveviewer *viewer, gpointer user_data)
Signals that the user requested to toggle play/pause.
viewer |
the waveviewer emitting the signal |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
“selection-changed”
signalvoid user_function (PtWaveviewer *viewer, gpointer user_data)
Signals that the selection was changed (or unselected) by the user. To query the new selection see “has-selection”, “selection-start” and “selection-end”.
viewer |
the waveviewer emitting the signal |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First