GtkScopeApp

Name

GtkScopeApp -- Application widget in which the GtkScope canvas widget is embedded.

Synopsis



struct      GtkScopeAppSignal;
GtkWidget*  gtk_scope_app_new               (const gchar *title,
                                             gint width,
                                             gint height,
                                             Gscope *gs);
void        gtk_scope_app_construct         (GtkScopeApp *scope_app,
                                             const gchar *title,
                                             gint width,
                                             gint height,
                                             Gscope *gs);
gchar*      gtk_scope_app_get_title         (GtkScopeApp *scope_app);
void        gtk_scope_app_set_title         (GtkScopeApp *scope_app,
                                             const gchar *title);
void        gtk_scope_app_set_size          (GtkScopeApp *scope_app,
                                             gint16 x,
                                             gint16 y);
void        gtk_scope_app_set_position      (GtkScopeApp *scope_app,
                                             gint16 x,
                                             gint16 y);
gfloat      gtk_scope_app_get_xzoom         (GtkScopeApp *scope_app);
void        gtk_scope_app_set_xzoom         (GtkScopeApp *scope_app,
                                             gfloat xzoom);
gfloat      gtk_scope_app_get_xbias         (GtkScopeApp *scope_app);
void        gtk_scope_app_set_xbias         (GtkScopeApp *scope_app,
                                             gfloat xbias);
gfloat      gtk_scope_app_get_yzoom         (GtkScopeApp *scope_app);
void        gtk_scope_app_set_yzoom         (GtkScopeApp *scope_app,
                                             gfloat yzoom);
gfloat      gtk_scope_app_get_ybias         (GtkScopeApp *scope_app);
void        gtk_scope_app_set_ybias         (GtkScopeApp *scope_app,
                                             gfloat ybias);
void        gtk_scope_app_start_program     (GtkScopeApp *scope_app);
void        gtk_scope_app_stop_program      (GtkScopeApp *scope_app);
GtkScopeMode gtk_scope_app_get_mode         (GtkScopeApp *scope_app);
gint        gtk_scope_app_set_polling_mode  (GtkScopeApp *scope_app,
                                             int period);
gint        gtk_scope_app_start_polling     (GtkScopeApp *scope_app);
void        gtk_scope_app_stop_polling      (GtkScopeApp *scope_app);
gint        gtk_scope_app_is_polling_started
                                            (GtkScopeApp *scope_app);
gint        gtk_scope_app_set_playback_mode (GtkScopeApp *scope_app,
                                             char *filename,
                                             int period);
gint        gtk_scope_app_get_sampling_period
                                            (GtkScopeApp *scope_app);
void        gtk_scope_app_set_sampling_period
                                            (GtkScopeApp *scope_app,
                                             int period);
gint        gtk_scope_app_start_recording   (GtkScopeApp *scope_app,
                                             char *filename);
void        gtk_scope_app_stop_recording    (GtkScopeApp *scope_app);
gint        gtk_scope_app_is_recording      (GtkScopeApp *scope_app);
gchar*      gtk_scope_app_get_recording_file
                                            (GtkScopeApp *scope_app);
void        gtk_scope_app_set_recording_file
                                            (GtkScopeApp *scope_app,
                                             gchar *filename);
gint        gtk_scope_app_in_fft_display    (GtkScopeApp *scope_app);
gint        gtk_scope_app_set_fft_display   (GtkScopeApp *scope_app);
gint        gtk_scope_app_set_time_display  (GtkScopeApp *scope_app);
void        gtk_scope_app_set_signal_line_attribute
                                            (GtkScopeApp *scope_app,
                                             GscopeSignalLine line);
gint        gtk_scope_app_nr_signals        (GtkScopeApp *scope_app);
GtkScopeAppSignal* gtk_scope_app_get_signal_n
                                            (GtkScopeApp *scope_app,
                                             gint n);
GtkScopeAppSignal* gtk_scope_app_get_signal_byname
                                            (GtkScopeApp *scope_app,
                                             char *name);
void        gtk_scope_app_set_colors        (GtkScopeApp *scope_app,
                                             char **colors,
                                             int nr);
void        gtk_scope_app_clear             (GtkScopeApp *scope_app);
void        gtk_scope_app_free_last_signal  (GtkScopeApp *scope_app);
void        gtk_scope_app_free_last_nsignals
                                            (GtkScopeApp *scope_app,
                                             int n);
void        gtk_scope_app_hide_signal_parameters
                                            (GtkScopeApp *scope_app,
                                             int hide);
GtkScopeAppSignal* gtk_scope_app_signal_new (GtkScopeApp *scope_app,
                                             GscopeSignal *signal);
void        gtk_scope_app_signal_free       (GtkScopeAppSignal *gch);
void        gtk_scope_app_signal_update     (GtkScopeAppSignal *gch,
                                             GscopeSignal *signal);
gchar*      gtk_scope_app_signal_get_name   (GtkScopeAppSignal *gch);
void        gtk_scope_app_signal_set_name   (GtkScopeAppSignal *gch,
                                             gchar *name);
gfloat      gtk_scope_app_signal_get_min    (GtkScopeAppSignal *gch);
void        gtk_scope_app_signal_set_min    (GtkScopeAppSignal *gch,
                                             gfloat min);
gfloat      gtk_scope_app_signal_get_max    (GtkScopeAppSignal *gch);
void        gtk_scope_app_signal_set_max    (GtkScopeAppSignal *gch,
                                             gfloat max);
void        gtk_scope_app_signal_set_range  (GtkScopeAppSignal *gch,
                                             gfloat min,
                                             gfloat max);
gfloat      gtk_scope_app_signal_get_filter (GtkScopeAppSignal *gch);
void        gtk_scope_app_signal_set_filter (GtkScopeAppSignal *gch,
                                             gfloat filter);
GscopeSignalLine gtk_scope_app_signal_get_signal_line_attributes
                                            (GtkScopeAppSignal *gch);
void        gtk_scope_app_signal_set_signal_line_attributes
                                            (GtkScopeAppSignal *gch,
                                             GscopeSignalLine line);
gboolean    gtk_scope_app_signal_get_hidden (GtkScopeAppSignal *gch);
void        gtk_scope_app_signal_toggle_hidden
                                            (GtkScopeAppSignal *gch);
void        gtk_scope_app_signal_set_color  (GtkScopeAppSignal *gch,
                                             gchar *color);
void        gtk_scope_app_signal_set_gdkcolor
                                            (GtkScopeAppSignal *gch,
                                             GdkColor color);
GtkStyle*   gtk_scope_app_signal_get_style  (GtkScopeAppSignal *ch);

Object Hierarchy


  GtkObject
   +----GtkWidget
         +----GtkContainer
               +----GtkBin
                     +----GtkWindow
                           +----GnomeApp
                                 +----GtkScopeApp

Description

GtkScopeApp provides a graphical interface for manipulating the GtkScope canvas functionality. Typically, applications that use the GtkScopeApp widget do not directly access the GtkScope widget because the GtkScope API can be accessed via the GtkScopeApp API described below. In addition, directly accessing the the GtkScope functionality can leave the GtkScopeApp widget in an inconsistent state.

Details

struct GtkScopeAppSignal

struct GtkScopeAppSignal;

Each GtkScopeApp contains one or more signals. These signals are encapsulated in the opaque GtkScopeAppSignal data structure.


gtk_scope_app_new ()

GtkWidget*  gtk_scope_app_new               (const gchar *title,
                                             gint width,
                                             gint height,
                                             Gscope *gs);

Create a new GtkScopeApp.

title :Name of the scope application.
width :Width of the scope application.
height :Width of the scope application.
gs :Gscope object. This object should be created before calling this function. This scope application will be added to the Gscope.
Returns :The GtkScopeApp widget.


gtk_scope_app_construct ()

void        gtk_scope_app_construct         (GtkScopeApp *scope_app,
                                             const gchar *title,
                                             gint width,
                                             gint height,
                                             Gscope *gs);

This function is similar to gtk_scope_app_new() but used if this widget is subclassed.

scope_app :A partly initialized GtkScopeApp.
title :Name of the scope application.
width :Width of the scope application.
height :Width of the scope application.
gs :Gscope object. This object should be created before calling this function. This scope application will be added to the Gscope.


gtk_scope_app_get_title ()

gchar*      gtk_scope_app_get_title         (GtkScopeApp *scope_app);

Returns name of the scope application.

scope_app :GtkScopeApp
Returns :Name of scope application.


gtk_scope_app_set_title ()

void        gtk_scope_app_set_title         (GtkScopeApp *scope_app,
                                             const gchar *title);

Sets name of the scope application.

scope_app :GtkScopeApp
title :Name of the scope application.


gtk_scope_app_set_size ()

void        gtk_scope_app_set_size          (GtkScopeApp *scope_app,
                                             gint16 x,
                                             gint16 y);

Sets the size of the scope application.

scope_app :GtkScopeApp
x :Width of the scope application.
y :Height of the scope application.


gtk_scope_app_set_position ()

void        gtk_scope_app_set_position      (GtkScopeApp *scope_app,
                                             gint16 x,
                                             gint16 y);

Sets the position of the scope application.

scope_app :GtkScopeApp
x :X coordinate of the top left corner of the scope application.
y :Y coordinate of the top left corner of the scope application.


gtk_scope_app_get_xzoom ()

gfloat      gtk_scope_app_get_xzoom         (GtkScopeApp *scope_app);

Get the X zoom value. The X zoom value is 1 by default. Larger values stretch the displayed signals along the horizontal axis while smaller values compress the displayed signals.

scope_app :GtkScopeApp
Returns :X zoom value.


gtk_scope_app_set_xzoom ()

void        gtk_scope_app_set_xzoom         (GtkScopeApp *scope_app,
                                             gfloat xzoom);

Set the X zoom value. See gtk_scope_app_get_xzoom().

scope_app :GtkScopeApp
xzoom :X zoom value.


gtk_scope_app_get_xbias ()

gfloat      gtk_scope_app_get_xbias         (GtkScopeApp *scope_app);

Get the X bias value. The X bias value is 0 by default. This function affects the scope behavior only in playback mode (gtk_scope_app_set_playback_mode). When the bias value is greater than 0, the signals are shifted to the right. This value ranges from 0 to 1.

scope_app :GtkScopeApp
Returns :X bias value.


gtk_scope_app_set_xbias ()

void        gtk_scope_app_set_xbias         (GtkScopeApp *scope_app,
                                             gfloat xbias);

Set the X bias value. See gtk_scope_app_get_xbias().

scope_app :GtkScopeApp
xbias :X bias value.


gtk_scope_app_get_yzoom ()

gfloat      gtk_scope_app_get_yzoom         (GtkScopeApp *scope_app);

Get the Y zoom value. The Y zoom value is 1 by default. Larger values stretch the displayed signals along the vertical axis while smaller values compress the displayed signals.

scope_app :GtkScopeApp
Returns :Y zoom value.


gtk_scope_app_set_yzoom ()

void        gtk_scope_app_set_yzoom         (GtkScopeApp *scope_app,
                                             gfloat yzoom);

Set the X zoom value. See gtk_scope_app_get_yzoom().

scope_app :GtkScopeApp
yzoom :Y zoom value.


gtk_scope_app_get_ybias ()

gfloat      gtk_scope_app_get_ybias         (GtkScopeApp *scope_app);

Get the Y bias value. The Y bias value is 0 by default. When the bias value is greater than 0, the signals are shifted up. This value ranges from -1 to 1.

scope_app :GtkScopeApp
Returns :Y bias value.


gtk_scope_app_set_ybias ()

void        gtk_scope_app_set_ybias         (GtkScopeApp *scope_app,
                                             gfloat ybias);

Set the Y bias value. See gtk_scope_app_get_ybias().

scope_app :GtkScopeApp
ybias :Y bias value.


gtk_scope_app_start_program ()

void        gtk_scope_app_start_program     (GtkScopeApp *scope_app);

When a program is associated with this application (see Gscope, gscope_new() and gscope_start_program()), start the program. This program is not specific to each GtkScopeApp but it is application wide. Normally, the program generates signal data for all scopes.

scope_app :GtkScopeApp


gtk_scope_app_stop_program ()

void        gtk_scope_app_stop_program      (GtkScopeApp *scope_app);

When a program is associated with this application (see gtk_scope_app_start_program()), stop the program.

scope_app :GtkScopeApp


gtk_scope_app_get_mode ()

GtkScopeMode gtk_scope_app_get_mode         (GtkScopeApp *scope_app);

Return the scope mode. The scope can be in polling or playback mode. In polling mode, signal data is obtained from a running program. In playback mode, data is plotted from a file. See GtkScopeMode.

scope_app :GtkScopeApp
Returns :Scope mode.


gtk_scope_app_set_polling_mode ()

gint        gtk_scope_app_set_polling_mode  (GtkScopeApp *scope_app,
                                             int period);

Set the mode of the scope to polling mode. Once the mode of the scope is set, it cannot be changed.

scope_app :GtkScopeApp
period :Sampling or polling period in milliseconds. Note that if your application has multiple GtkScopeApp objects, each GtkScopeApp can have a different sampling period.
Returns :TRUE if the operation is successful.


gtk_scope_app_start_polling ()

gint        gtk_scope_app_start_polling     (GtkScopeApp *scope_app);

When the scope is in polling mode (see gtk_scope_app_set_polling_mode()), start polling and displaying signal data.

scope_app :GtkScopeApp
Returns :TRUE if the operation is successful.


gtk_scope_app_stop_polling ()

void        gtk_scope_app_stop_polling      (GtkScopeApp *scope_app);

When the scope is in polling mode, stop polling for signal data.

scope_app :GtkScopeApp


gtk_scope_app_is_polling_started ()

gint        gtk_scope_app_is_polling_started
                                            (GtkScopeApp *scope_app);

Is the scope in polling mode and polling currently?

scope_app :GtkScopeApp
Returns :TRUE if the scope is polling currently.


gtk_scope_app_set_playback_mode ()

gint        gtk_scope_app_set_playback_mode (GtkScopeApp *scope_app,
                                             char *filename,
                                             int period);

Set the mode of the scope to playback mode. Once the mode of the scope is set, it cannot be changed.

scope_app :GtkScopeApp
filename :Filename from which data is plotted. Filename can be NULL in which case, data is read from standard input.
period :Sampling or polling period in milliseconds. The sampling period has a slightly different meaning that the sampling period in polling mode. In the polling mode, data is sampled every period. In playback mode, data is plotted one pixel apart every period.
Returns :TRUE if operation is successful.


gtk_scope_app_get_sampling_period ()

gint        gtk_scope_app_get_sampling_period
                                            (GtkScopeApp *scope_app);

Get the sampling period of the scope. Initially set by gtk_scope_app_set_polling_mode() or gtk_scope_app_set_playback_mode().

scope_app :GtkScopeApp
Returns :Sampling period of the scope in milliseconds.


gtk_scope_app_set_sampling_period ()

void        gtk_scope_app_set_sampling_period
                                            (GtkScopeApp *scope_app,
                                             int period);

Set the sampling period of the scope.

scope_app :GtkScopeApp
period : Sampling period of the scope in milliseconds.


gtk_scope_app_start_recording ()

gint        gtk_scope_app_start_recording   (GtkScopeApp *scope_app,
                                             char *filename);

In polling mode, start recording signal data to filename.

scope_app :GtkScopeApp
filename :Filename into which data is recorded.
Returns :TRUE if operation is successful.


gtk_scope_app_stop_recording ()

void        gtk_scope_app_stop_recording    (GtkScopeApp *scope_app);

In polling mode, if data is being recorded, stop recording signal data.

scope_app :GtkScopeApp


gtk_scope_app_is_recording ()

gint        gtk_scope_app_is_recording      (GtkScopeApp *scope_app);

Is the scope recording data?

scope_app :GtkScopeApp
Returns :TRUE if the scope is recording data.


gtk_scope_app_get_recording_file ()

gchar*      gtk_scope_app_get_recording_file
                                            (GtkScopeApp *scope_app);

Get the filename in which data is being recorded.

scope_app :GtkScopeApp
Returns :Filename.


gtk_scope_app_set_recording_file ()

void        gtk_scope_app_set_recording_file
                                            (GtkScopeApp *scope_app,
                                             gchar *filename);

Set the filename to which data should be recorded.

scope_app :GtkScopeApp
filename :Filename.


gtk_scope_app_in_fft_display ()

gint        gtk_scope_app_in_fft_display    (GtkScopeApp *scope_app);

Is the GtkScopeApp displaying signals in frequency format?

scope_app :GtkScopeApp
Returns :TRUE if the scope is displaying signals in frequency format.


gtk_scope_app_set_fft_display ()

gint        gtk_scope_app_set_fft_display   (GtkScopeApp *scope_app);

Make the scope display signals in frequency format.

scope_app :GtkScopeApp
Returns :TRUE if operation is successful.


gtk_scope_app_set_time_display ()

gint        gtk_scope_app_set_time_display  (GtkScopeApp *scope_app);

Make the scope display signals in time format (the default).

scope_app :GtkScopeApp
Returns : TRUE if operation is successful.


gtk_scope_app_set_signal_line_attribute ()

void        gtk_scope_app_set_signal_line_attribute
                                            (GtkScopeApp *scope_app,
                                             GscopeSignalLine line);

Set the line attribute of all the signals on this scope.

scope_app :GtkScopeApp
line :Line type.


gtk_scope_app_nr_signals ()

gint        gtk_scope_app_nr_signals        (GtkScopeApp *scope_app);

Get the number of signals associated with this scope.

scope_app :GtkScopeApp
Returns :Number of signals associated with this scope.


gtk_scope_app_get_signal_n ()

GtkScopeAppSignal* gtk_scope_app_get_signal_n
                                            (GtkScopeApp *scope_app,
                                             gint n);

Get the nth signal associated with this scope. Signals are stored in GtkScopeApp in a linked list. Signals are numbered from 0.

scope_app :GtkScopeApp
n :An integer value.
Returns :GtkScopeAppSignal


gtk_scope_app_get_signal_byname ()

GtkScopeAppSignal* gtk_scope_app_get_signal_byname
                                            (GtkScopeApp *scope_app,
                                             char *name);

Each signal in the scope has a name associated with it (see GscopeSignal). Returns the signal with name.

scope_app :GtkScopeApp
name :Name of the signal
Returns :GtkScopeAppSignal


gtk_scope_app_set_colors ()

void        gtk_scope_app_set_colors        (GtkScopeApp *scope_app,
                                             char **colors,
                                             int nr);

Provide a set of color strings to the scope. Normally, each signal has a color associated with it (see GscopeSignal). If users don't specify any color, then a color is arbitrarily chosen for the signal by the gscope library. Users can change this behavior by providing a set of colors to the scope with this function.

scope_app :GtkScopeApp
colors :An array of colors (strings).
nr :Number of elements in the array.


gtk_scope_app_clear ()

void        gtk_scope_app_clear             (GtkScopeApp *scope_app);

Clear the scope.

scope_app :GtkScopeApp


gtk_scope_app_free_last_signal ()

void        gtk_scope_app_free_last_signal  (GtkScopeApp *scope_app);

Remove the last signal from the scope.

scope_app :GtkScopeApp


gtk_scope_app_free_last_nsignals ()

void        gtk_scope_app_free_last_nsignals
                                            (GtkScopeApp *scope_app,
                                             int n);

Remove the last n signals from the scope.

scope_app :GtkScopeApp
n :An integer value.


gtk_scope_app_hide_signal_parameters ()

void        gtk_scope_app_hide_signal_parameters
                                            (GtkScopeApp *scope_app,
                                             int hide);

Hide the display of signal parameters from the scope.

scope_app :GtkScopeApp
hide :If hide is TRUE, hide the signal parameters else show the parameters.


gtk_scope_app_signal_new ()

GtkScopeAppSignal* gtk_scope_app_signal_new (GtkScopeApp *scope_app,
                                             GscopeSignal *signal);

Create a new signal and add it to GtkScopeApp.

scope_app :GtkScopeApp
signal :Signal data.
Returns :GtkScopeAppSignal


gtk_scope_app_signal_free ()

void        gtk_scope_app_signal_free       (GtkScopeAppSignal *gch);

Destroy a signal. Removes the signal from the scope.


gtk_scope_app_signal_update ()

void        gtk_scope_app_signal_update     (GtkScopeAppSignal *gch,
                                             GscopeSignal *signal);

Update a scope signal with new signal data.

gch :GtkScopeAppSignal
signal :New signal data.


gtk_scope_app_signal_get_name ()

gchar*      gtk_scope_app_signal_get_name   (GtkScopeAppSignal *gch);

Get the name of the signal.

gch :GtkScopeAppSignal
Returns :Name of the signal.


gtk_scope_app_signal_set_name ()

void        gtk_scope_app_signal_set_name   (GtkScopeAppSignal *gch,
                                             gchar *name);

Set the signal name.

gch :GtkScopeAppSignal
name :Name of the signal.


gtk_scope_app_signal_get_min ()

gfloat      gtk_scope_app_signal_get_min    (GtkScopeAppSignal *gch);

Get the minimum value that is plotted for the signal (when y zoom is 1).

gch :GtkScopeAppSignal
Returns :Minimum value.


gtk_scope_app_signal_set_min ()

void        gtk_scope_app_signal_set_min    (GtkScopeAppSignal *gch,
                                             gfloat min);

Set the minimum value that is plotted for the signal (when y zoom is 1).

gch :GtkScopeAppSignal
min :Minimum value.


gtk_scope_app_signal_get_max ()

gfloat      gtk_scope_app_signal_get_max    (GtkScopeAppSignal *gch);

Get the maximum value that is plotted for the signal (when y zoom is 1).

gch :GtkScopeAppSignal
Returns :Maximum value.


gtk_scope_app_signal_set_max ()

void        gtk_scope_app_signal_set_max    (GtkScopeAppSignal *gch,
                                             gfloat max);

Set the maximum value that is plotted for the signal (when y zoom is 1).

gch :GtkScopeAppSignal
max :Maximum value.


gtk_scope_app_signal_set_range ()

void        gtk_scope_app_signal_set_range  (GtkScopeAppSignal *gch,
                                             gfloat min,
                                             gfloat max);

Set the minimum and maximum value that is plotted for the signal (when y zoom is 1).

gch :GtkScopeAppSignal
min :Minimum value.
max :Maximum value.


gtk_scope_app_signal_get_filter ()

gfloat      gtk_scope_app_signal_get_filter (GtkScopeAppSignal *gch);

Get the filter value of the signal. When the filter value is 0, the signal is not filtered. The filter value ranges from 0 to 1. In between 0 and 1, the signal is low-pass filtered before being displayed.

gch :GtkScopeAppSignal
Returns :Filter value.


gtk_scope_app_signal_set_filter ()

void        gtk_scope_app_signal_set_filter (GtkScopeAppSignal *gch,
                                             gfloat filter);

Set the filter value of the signal. The filter value ranges from 0 to 1.

gch :GtkScopeAppSignal
filter :Filter value.


gtk_scope_app_signal_get_signal_line_attributes ()

GscopeSignalLine gtk_scope_app_signal_get_signal_line_attributes
                                            (GtkScopeAppSignal *gch);

Get the line attribute of this signal.

gch :GtkScopeAppSignal
Returns :Line attribute.


gtk_scope_app_signal_set_signal_line_attributes ()

void        gtk_scope_app_signal_set_signal_line_attributes
                                            (GtkScopeAppSignal *gch,
                                             GscopeSignalLine line);

Set the line attribute of this signal.

gch :GtkScopeAppSignal
line :Line attribute.


gtk_scope_app_signal_get_hidden ()

gboolean    gtk_scope_app_signal_get_hidden (GtkScopeAppSignal *gch);

Is the signal hidden?

gch :GtkScopeAppSignal
Returns :TRUE if the signal is hidden.


gtk_scope_app_signal_toggle_hidden ()

void        gtk_scope_app_signal_toggle_hidden
                                            (GtkScopeAppSignal *gch);

Toggle between hiding and showing the signal.


gtk_scope_app_signal_set_color ()

void        gtk_scope_app_signal_set_color  (GtkScopeAppSignal *gch,
                                             gchar *color);

Set the color of the signal.

gch :GtkScopeAppSignal
color :A color string.


gtk_scope_app_signal_set_gdkcolor ()

void        gtk_scope_app_signal_set_gdkcolor
                                            (GtkScopeAppSignal *gch,
                                             GdkColor color);

Set the color of the signal.

gch :GtkScopeAppSignal
color :A GdkColor structure.


gtk_scope_app_signal_get_style ()

GtkStyle*   gtk_scope_app_signal_get_style  (GtkScopeAppSignal *ch);

Return the Gtk style of this signal.

ch :GtkScopeAppSignal
Returns :Gtk Style.

See Also

Gtkscope, Gscope, gscope_interface.