Gscope

Name

Gscope -- Object used to maintain a list of GtkScopeApp widgets.

Synopsis



GtkType     gscope_get_type                 (void);
GtkObject*  gscope_new                      (GscopeParameter *parameters,
                                             GtkFunction program,
                                             int period);
gpointer    gscope_get_scope_n              (Gscope *gs,
                                             int n);
gint        gscope_get_scope_position       (Gscope *gs,
                                             gpointer data);
gint        gscope_get_nr_scopes            (Gscope *gs);
gint        gscope_nr_visible_scopes        (Gscope *gs);
int         gscope_start_program            (Gscope *gs);
void        gscope_stop_program             (Gscope *gs);
int         gscope_program_is_stopped       (Gscope *gs);
void        gscope_start_polling            (Gscope *gs);
void        gscope_stop_polling             (Gscope *gs);
int         gscope_get_period               (Gscope *gs);
void        gscope_set_period               (Gscope *gs,
                                             int period);
void        gscope_add_parameter            (Gscope *gs,
                                             GscopeParameter *parameter);
void        gscope_remove_parameter         (Gscope *gs,
                                             gchar *name);
int         gscope_parameter_exists         (Gscope *gs,
                                             gchar *name);
void        gscope_add_scope                (Gscope *gs,
                                             gpointer data);
void        gscope_remove_scope             (Gscope *gs,
                                             gpointer data);
void        gscope_inc_visible_scopes       (Gscope *gs);
void        gscope_dec_visible_scopes       (Gscope *gs);
GtkWidget*  gscope_get_parameter_window     (Gscope *gs);
int         gscope_parse_geometry           (gchar *geometry,
                                             GtkAllocation *geom);

Object Hierarchy


  GtkObject
   +----Gscope

Signal Prototypes


"scopes-hidden"
            void        user_function      (Gscope *gscope,
                                            gpointer user_data);

Description

Th Gscope object is used to store parameters and data that are application-wide and not specific to each GtkScopeApp widget. It is also used to run application-wide functions.

Details

gscope_get_type ()

GtkType     gscope_get_type                 (void);

Returns the Gtk type of Gscope.

Returns :Gtk type.


gscope_new ()

GtkObject*  gscope_new                      (GscopeParameter *parameters,
                                             GtkFunction program,
                                             int period);

Create a new Gscope object.

parameters :Pass an array of parameters to the gscope.
program :Invoke this "program" function every period.
period :Period in milliseconds when program is invoked.
Returns :Gscope object.


gscope_get_scope_n ()

gpointer    gscope_get_scope_n              (Gscope *gs,
                                             int n);

Get the nth GtkScopeApp. Scopes are stored in Gscope in a linked list. Scopes are numbered from 0.

gs :Gscope
n :An integer value.
Returns :GtkScopeApp


gscope_get_scope_position ()

gint        gscope_get_scope_position       (Gscope *gs,
                                             gpointer data);

Get the position of a GtkScopeApp in Gscope. Scopes are stored in Gscope in a linked list. The first scope is numbered 0.

gs :Gscope
data :GtkScopeApp
Returns :Position of GtkScopeApp.


gscope_get_nr_scopes ()

gint        gscope_get_nr_scopes            (Gscope *gs);

Get the number of GtkScopeApp objects in Gscope.

gs :Gscope
Returns :Number of GtkScopeApp.


gscope_nr_visible_scopes ()

gint        gscope_nr_visible_scopes        (Gscope *gs);

Get the number of visible GtkScopeApp objects.

gs :Gscope
Returns :Number of visible GtkScopeApp.


gscope_start_program ()

int         gscope_start_program            (Gscope *gs);

When program and a non-zero period is specified to gscope_new(), the program is run when this function is invoked.

gs :Gscope
Returns :Non-zero value when program is started.


gscope_stop_program ()

void        gscope_stop_program             (Gscope *gs);

Stop the program that was started by gscope_start_program().

gs :Gscope


gscope_program_is_stopped ()

int         gscope_program_is_stopped       (Gscope *gs);

Is the program stopped? (See gscope_start_program() and gscope_stop_program()).

gs :Gscope
Returns :TRUE if program is not running.


gscope_start_polling ()

void        gscope_start_polling            (Gscope *gs);

When the GtkScopeApp scopes are in polling mode, start polling them and displaying the data. Note that the polling (or sampling) period can be different from the program period specified in gscope_new(). The sampling period is specified by calling gtk_scope_app_set_polling_mode().

gs :Gscope


gscope_stop_polling ()

void        gscope_stop_polling             (Gscope *gs);

When the GtkScopeApp scopes are in polling mode, stop polling them. The scopes will stop displaying data.

gs :Gscope


gscope_get_period ()

int         gscope_get_period               (Gscope *gs);

Get the program period specified in gscope_new().

gs :Gscope
Returns :Program period.


gscope_set_period ()

void        gscope_set_period               (Gscope *gs,
                                             int period);

Set or change the program period specified in gscope_new().

gs :Gscope
period :Program period.


gscope_add_parameter ()

void        gscope_add_parameter            (Gscope *gs,
                                             GscopeParameter *parameter);

Add a gscope parameter to the gscope application.

gs :Gscope
parameter :Application parameter.


gscope_remove_parameter ()

void        gscope_remove_parameter         (Gscope *gs,
                                             gchar *name);

Remove a gscope parameter from the gscope application.

gs :Gscope
name :Parameter name. This is the title field in GscopeParameter.


gscope_parameter_exists ()

int         gscope_parameter_exists         (Gscope *gs,
                                             gchar *name);

Does a parameter exist in gscope.

gs :Gscope
name :Parameter name. This is the title field in GscopeParameter.
Returns :TRUE if the parameter exists.


gscope_add_scope ()

void        gscope_add_scope                (Gscope *gs,
                                             gpointer data);

Add a GtkScopeApp to Gscope. Normally, this operation is done when a GtkScopeApp object is created, so users do not have to explicitly call this function.

gs :Gscope
data :GtkScopeApp


gscope_remove_scope ()

void        gscope_remove_scope             (Gscope *gs,
                                             gpointer data);

Remove a GtkScopeApp from Gscope. Normally, this operation is done when a GtkScopeApp object is destroyed, so users do not have to explicitly call this function.

gs :Gscope
data :GtkScopeApp


gscope_inc_visible_scopes ()

void        gscope_inc_visible_scopes       (Gscope *gs);

Increment the number of visible scopes. This function does not actually make any hidden scope visible. This function is used internally by the GtkScopeApp widget.

gs :Gscope


gscope_dec_visible_scopes ()

void        gscope_dec_visible_scopes       (Gscope *gs);

Decrement the number of visible scopes. This function does not actually hide any visible scope. This function is used internally by the GtkScopeApp widget.

gs :Gscope


gscope_get_parameter_window ()

GtkWidget*  gscope_get_parameter_window     (Gscope *gs);

Get the parameter window associated with the application. Used by GtkScopeApp. Users shouldn't have to use it.

gs :Gscope
Returns :Parameter window object.


gscope_parse_geometry ()

int         gscope_parse_geometry           (gchar *geometry,
                                             GtkAllocation *geom);

A utility function that given an X geometry specification returns the x and y coordinates and width and height in geom. Caller of this function should allocate space for geom. This function is similar to gnome_parse_geometry().

geometry :X geometry specification (e.g., 800x200+20+50)
geom :Geometry returned in a GtkAllocation structure. Out variable.
Returns :TRUE if the geometry specification is valid.

Signals

The "scopes-hidden" signal

void        user_function                  (Gscope *gscope,
                                            gpointer user_data);

This signal is generated when all GtkScopeApp scopes are hidden or destroyed or the Gscope object is destroyed. Applications can take appropriate action by connecting to this signal.

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

See Also

GtkScopeApp