GtkScope

Name

GtkScope -- Canvas widget in which gscope signals are drawn.

Synopsis



struct      GtkScopeSignal;
enum        GtkScopeMode;
void        (*callback_func_t)              (void *arg,
                                             guint64 x,
                                             gfloat y);
GtkWidget*  gtk_scope_new                   (const gchar *title,
                                             gint width,
                                             gint height);
void        gtk_scope_construct             (GtkScope *scope,
                                             const gchar *title,
                                             gint width,
                                             gint height);
gchar*      gtk_scope_get_title             (GtkScope *scope);
void        gtk_scope_set_title             (GtkScope *scope,
                                             const gchar *title);
void        gtk_scope_set_size              (GtkScope *scope,
                                             gint x,
                                             gint y);
void        gtk_scope_set_position          (GtkScope *scope,
                                             gint16 x,
                                             gint16 y);
gfloat      gtk_scope_get_xzoom             (GtkScope *scope);
void        gtk_scope_set_xzoom             (GtkScope *scope,
                                             gfloat xzoom);
gfloat      gtk_scope_get_xbias             (GtkScope *scope);
void        gtk_scope_set_xbias             (GtkScope *scope,
                                             gfloat xbias);
gfloat      gtk_scope_get_yzoom             (GtkScope *scope);
void        gtk_scope_set_yzoom             (GtkScope *scope,
                                             gfloat yzoom);
gfloat      gtk_scope_get_ybias             (GtkScope *scope);
void        gtk_scope_set_ybias             (GtkScope *scope,
                                             gfloat ybias);
GtkScopeMode gtk_scope_get_mode             (GtkScope *scope);
gint        gtk_scope_set_polling_mode      (GtkScope *scope,
                                             int period);
gint        gtk_scope_start_polling         (GtkScope *scope);
void        gtk_scope_stop_polling          (GtkScope *scope);
gint        gtk_scope_is_polling_started    (GtkScope *scope);
gint        gtk_scope_set_playback_mode     (GtkScope *scope,
                                             char *filename,
                                             int period);
gint        gtk_scope_get_sampling_period   (GtkScope *scope);
void        gtk_scope_set_sampling_period   (GtkScope *scope,
                                             int period);
gint        gtk_scope_start_recording       (GtkScope *scope,
                                             char *filename);
void        gtk_scope_stop_recording        (GtkScope *scope);
gint        gtk_scope_is_recording          (GtkScope *scope);
gint        gtk_scope_in_fft_display        (GtkScope *scope);
gint        gtk_scope_set_fft_display       (GtkScope *scope);
gint        gtk_scope_set_time_display      (GtkScope *scope);
void        gtk_scope_set_signal_line_attributes
                                            (GtkScope *scope,
                                             GscopeSignalLine line);
gint        gtk_scope_nr_signals            (GtkScope *scope);
GtkScopeSignal* gtk_scope_get_signal_n      (GtkScope *scope,
                                             gint n);
GtkScopeSignal* gtk_scope_get_signal_byname (GtkScope *scope,
                                             char *name);
void        gtk_scope_set_colors            (GtkScope *scope,
                                             char **colors,
                                             int nr);
void        gtk_scope_clear                 (GtkScope *scope);
GtkScopeSignal* gtk_scope_signal_new        (GtkScope *scope,
                                             GscopeSignal *signal);
void        gtk_scope_signal_free           (GtkScopeSignal *ch);
void        gtk_scope_signal_update         (GtkScopeSignal *ch,
                                             GscopeSignal *signal);
gchar*      gtk_scope_signal_get_name       (GtkScopeSignal *ch);
void        gtk_scope_signal_set_name       (GtkScopeSignal *ch,
                                             gchar *name);
gfloat      gtk_scope_signal_get_min        (GtkScopeSignal *ch);
void        gtk_scope_signal_set_min        (GtkScopeSignal *ch,
                                             gfloat min);
gfloat      gtk_scope_signal_get_max        (GtkScopeSignal *ch);
void        gtk_scope_signal_set_max        (GtkScopeSignal *ch,
                                             gfloat max);
void        gtk_scope_signal_set_range      (GtkScopeSignal *ch,
                                             gfloat min,
                                             gfloat max);
gfloat      gtk_scope_signal_get_filter     (GtkScopeSignal *ch);
void        gtk_scope_signal_set_filter     (GtkScopeSignal *ch,
                                             gfloat filter);
GscopeSignalLine gtk_scope_signal_get_signal_line_attributes
                                            (GtkScopeSignal *ch);
void        gtk_scope_signal_set_signal_line_attributes
                                            (GtkScopeSignal *ch,
                                             GscopeSignalLine line);
gboolean    gtk_scope_signal_get_hidden     (GtkScopeSignal *ch);
void        gtk_scope_signal_toggle_hidden  (GtkScopeSignal *ch);
void        gtk_scope_signal_set_color      (GtkScopeSignal *ch,
                                             gchar *color);
void        gtk_scope_signal_set_gdkcolor   (GtkScopeSignal *ch,
                                             GdkColor color);
GtkStyle*   gtk_scope_signal_get_style      (GtkScopeSignal *gch);
void        gtk_scope_signal_add_callback   (GtkScopeSignal *ch,
                                             callback_func_t callback,
                                             void *arg);

Object Hierarchy


  GtkObject
   +----GtkWidget
         +----GtkContainer
               +----GtkTable
                     +----GtkScope

Signal Prototypes


"size-changed"
            void        user_function      (GtkScope *scope,
                                            gpointer user_data);
"zoom-changed"
            void        user_function      (GtkScope *scope,
                                            gpointer user_data);
"line-changed"
            void        user_function      (GtkScope *scope,
                                            gpointer user_data);
"period-changed"
            void        user_function      (GtkScope *scope,
                                            gpointer user_data);

Description

This widget is generally embedded in the GtkScopeApp widget in which case users do not have to use this widget directly. However, this widget can also be used independently. The documentation of this widget is not complete. If you really need to use this widget directly, you can look at the documentation of GtkScopeApp. Almost all functionality in this widget can be accessed via the GtkScopeApp widget.

Details

struct GtkScopeSignal

struct GtkScopeSignal;

Each GtkScope contains one or more signals. These signals are encapsulated in the opaque GtkScopeSignal data structure.


enum GtkScopeMode

typedef enum {
        NO_SCOPE_MODE = 0x0, POLLING_MODE = 0x1, PLAYBACK_MODE = 0x2 
} GtkScopeMode;

The scope mode.

NO_SCOPE_MODEInvalid mode.
POLLING_MODEScope is in polling mode.
PLAYBACK_MODEScope is in playback mode.


callback_func_t ()

void        (*callback_func_t)              (void *arg,
                                             guint64 x,
                                             gfloat y);

Applications can register a callback function of this type (see gtk_scope_signal_add_callback()). The callback function is invoked when a signal data is plotted in polling mode. Do not depend on this interface. It may go away in the future. It is currently used by GtkScopeApp.

arg :Opaque type.
x :Time value in milliseconds since polling was started.
y :Value read from application.


gtk_scope_new ()

GtkWidget*  gtk_scope_new                   (const gchar *title,
                                             gint width,
                                             gint height);

title : 
width : 
height : 
Returns : 


gtk_scope_construct ()

void        gtk_scope_construct             (GtkScope *scope,
                                             const gchar *title,
                                             gint width,
                                             gint height);

scope : 
title : 
width : 
height : 


gtk_scope_get_title ()

gchar*      gtk_scope_get_title             (GtkScope *scope);

scope : 
Returns : 


gtk_scope_set_title ()

void        gtk_scope_set_title             (GtkScope *scope,
                                             const gchar *title);

scope : 
title : 


gtk_scope_set_size ()

void        gtk_scope_set_size              (GtkScope *scope,
                                             gint x,
                                             gint y);

scope : 
x : 
y : 


gtk_scope_set_position ()

void        gtk_scope_set_position          (GtkScope *scope,
                                             gint16 x,
                                             gint16 y);

scope : 
x : 
y : 


gtk_scope_get_xzoom ()

gfloat      gtk_scope_get_xzoom             (GtkScope *scope);

scope : 
Returns : 


gtk_scope_set_xzoom ()

void        gtk_scope_set_xzoom             (GtkScope *scope,
                                             gfloat xzoom);

scope : 
xzoom : 


gtk_scope_get_xbias ()

gfloat      gtk_scope_get_xbias             (GtkScope *scope);

scope : 
Returns : 


gtk_scope_set_xbias ()

void        gtk_scope_set_xbias             (GtkScope *scope,
                                             gfloat xbias);

scope : 
xbias : 


gtk_scope_get_yzoom ()

gfloat      gtk_scope_get_yzoom             (GtkScope *scope);

scope : 
Returns : 


gtk_scope_set_yzoom ()

void        gtk_scope_set_yzoom             (GtkScope *scope,
                                             gfloat yzoom);

scope : 
yzoom : 


gtk_scope_get_ybias ()

gfloat      gtk_scope_get_ybias             (GtkScope *scope);

scope : 
Returns : 


gtk_scope_set_ybias ()

void        gtk_scope_set_ybias             (GtkScope *scope,
                                             gfloat ybias);

scope : 
ybias : 


gtk_scope_get_mode ()

GtkScopeMode gtk_scope_get_mode             (GtkScope *scope);

scope : 
Returns : 


gtk_scope_set_polling_mode ()

gint        gtk_scope_set_polling_mode      (GtkScope *scope,
                                             int period);

scope : 
period : 
Returns : 


gtk_scope_start_polling ()

gint        gtk_scope_start_polling         (GtkScope *scope);

scope : 
Returns : 


gtk_scope_stop_polling ()

void        gtk_scope_stop_polling          (GtkScope *scope);

scope : 


gtk_scope_is_polling_started ()

gint        gtk_scope_is_polling_started    (GtkScope *scope);

scope : 
Returns : 


gtk_scope_set_playback_mode ()

gint        gtk_scope_set_playback_mode     (GtkScope *scope,
                                             char *filename,
                                             int period);

scope : 
filename : 
period : 
Returns : 


gtk_scope_get_sampling_period ()

gint        gtk_scope_get_sampling_period   (GtkScope *scope);

scope : 
Returns : 


gtk_scope_set_sampling_period ()

void        gtk_scope_set_sampling_period   (GtkScope *scope,
                                             int period);

scope : 
period : 


gtk_scope_start_recording ()

gint        gtk_scope_start_recording       (GtkScope *scope,
                                             char *filename);

scope : 
filename : 
Returns : 


gtk_scope_stop_recording ()

void        gtk_scope_stop_recording        (GtkScope *scope);

scope : 


gtk_scope_is_recording ()

gint        gtk_scope_is_recording          (GtkScope *scope);

scope : 
Returns : 


gtk_scope_in_fft_display ()

gint        gtk_scope_in_fft_display        (GtkScope *scope);

scope : 
Returns : 


gtk_scope_set_fft_display ()

gint        gtk_scope_set_fft_display       (GtkScope *scope);

scope : 
Returns : 


gtk_scope_set_time_display ()

gint        gtk_scope_set_time_display      (GtkScope *scope);

scope : 
Returns : 


gtk_scope_set_signal_line_attributes ()

void        gtk_scope_set_signal_line_attributes
                                            (GtkScope *scope,
                                             GscopeSignalLine line);

scope : 
line : 


gtk_scope_nr_signals ()

gint        gtk_scope_nr_signals            (GtkScope *scope);

scope : 
Returns : 


gtk_scope_get_signal_n ()

GtkScopeSignal* gtk_scope_get_signal_n      (GtkScope *scope,
                                             gint n);

scope : 
n : 
Returns : 


gtk_scope_get_signal_byname ()

GtkScopeSignal* gtk_scope_get_signal_byname (GtkScope *scope,
                                             char *name);

scope : 
name : 
Returns : 


gtk_scope_set_colors ()

void        gtk_scope_set_colors            (GtkScope *scope,
                                             char **colors,
                                             int nr);

scope : 
colors : 
nr : 


gtk_scope_clear ()

void        gtk_scope_clear                 (GtkScope *scope);

scope : 


gtk_scope_signal_new ()

GtkScopeSignal* gtk_scope_signal_new        (GtkScope *scope,
                                             GscopeSignal *signal);

scope : 
signal : 
Returns : 


gtk_scope_signal_free ()

void        gtk_scope_signal_free           (GtkScopeSignal *ch);

ch : 


gtk_scope_signal_update ()

void        gtk_scope_signal_update         (GtkScopeSignal *ch,
                                             GscopeSignal *signal);

ch : 
signal : 


gtk_scope_signal_get_name ()

gchar*      gtk_scope_signal_get_name       (GtkScopeSignal *ch);

ch : 
Returns : 


gtk_scope_signal_set_name ()

void        gtk_scope_signal_set_name       (GtkScopeSignal *ch,
                                             gchar *name);

ch : 
name : 


gtk_scope_signal_get_min ()

gfloat      gtk_scope_signal_get_min        (GtkScopeSignal *ch);

ch : 
Returns : 


gtk_scope_signal_set_min ()

void        gtk_scope_signal_set_min        (GtkScopeSignal *ch,
                                             gfloat min);

ch : 
min : 


gtk_scope_signal_get_max ()

gfloat      gtk_scope_signal_get_max        (GtkScopeSignal *ch);

ch : 
Returns : 


gtk_scope_signal_set_max ()

void        gtk_scope_signal_set_max        (GtkScopeSignal *ch,
                                             gfloat max);

ch : 
max : 


gtk_scope_signal_set_range ()

void        gtk_scope_signal_set_range      (GtkScopeSignal *ch,
                                             gfloat min,
                                             gfloat max);

ch : 
min : 
max : 


gtk_scope_signal_get_filter ()

gfloat      gtk_scope_signal_get_filter     (GtkScopeSignal *ch);

ch : 
Returns : 


gtk_scope_signal_set_filter ()

void        gtk_scope_signal_set_filter     (GtkScopeSignal *ch,
                                             gfloat filter);

ch : 
filter : 


gtk_scope_signal_get_signal_line_attributes ()

GscopeSignalLine gtk_scope_signal_get_signal_line_attributes
                                            (GtkScopeSignal *ch);

ch : 
Returns : 


gtk_scope_signal_set_signal_line_attributes ()

void        gtk_scope_signal_set_signal_line_attributes
                                            (GtkScopeSignal *ch,
                                             GscopeSignalLine line);

ch : 
line : 


gtk_scope_signal_get_hidden ()

gboolean    gtk_scope_signal_get_hidden     (GtkScopeSignal *ch);

ch : 
Returns : 


gtk_scope_signal_toggle_hidden ()

void        gtk_scope_signal_toggle_hidden  (GtkScopeSignal *ch);

ch : 


gtk_scope_signal_set_color ()

void        gtk_scope_signal_set_color      (GtkScopeSignal *ch,
                                             gchar *color);

ch : 
color : 


gtk_scope_signal_set_gdkcolor ()

void        gtk_scope_signal_set_gdkcolor   (GtkScopeSignal *ch,
                                             GdkColor color);

ch : 
color : 


gtk_scope_signal_get_style ()

GtkStyle*   gtk_scope_signal_get_style      (GtkScopeSignal *gch);

gch : 
Returns : 


gtk_scope_signal_add_callback ()

void        gtk_scope_signal_add_callback   (GtkScopeSignal *ch,
                                             callback_func_t callback,
                                             void *arg);

Register a callback function so that the callback is invoked when data is plotted for this signal. See callback_func_t.

ch : 
callback : 
arg : 

Signals

The "size-changed" signal

void        user_function                  (GtkScope *scope,
                                            gpointer user_data);

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


The "zoom-changed" signal

void        user_function                  (GtkScope *scope,
                                            gpointer user_data);

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


The "line-changed" signal

void        user_function                  (GtkScope *scope,
                                            gpointer user_data);

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


The "period-changed" signal

void        user_function                  (GtkScope *scope,
                                            gpointer user_data);

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

See Also

GtkScopeApp