00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00027 #ifndef __FRAME_COMMON_H
00028 #define __FRAME_COMMON_H
00029 #ifdef __cplusplus
00030 extern "C" {
00031 #endif
00032
00033 #include <dlfcn.h>
00034 #include <gtk/gtk.h>
00035
00036 #include "data-types.h"
00037 #include "frame-signals.h"
00038 #include "func-list.h"
00039 #include "machine.h"
00040 #include "time-period.h"
00041
00043 struct __frame_table_t;
00053 typedef enum __frame_error_t {
00054 ERROR_NONE=0,
00055 ERROR_MACHINE,
00056 ERROR_PERIOD,
00057 ERROR_SIZE,
00058 ERROR_PLUGIN
00059 } frame_error_t;
00060
00061
00073 typedef struct __frame_t {
00074 gchar *type;
00077 size_ratio_t size;
00078 machine_t *display_machine;
00079 time_period_t display_period;
00082 gdouble avg_refresh_time;
00083 gdouble avg_refresh_timeout;
00084 struct __frame_table_t *parent;
00085 gboolean hidden;
00086 guint id;
00087 frame_error_t last_err;
00091 GtkBuilder *builder;
00092 GObject *signal_box;
00093 gboolean compute;
00094 gboolean computing_requested;
00095 GThread *computing_thread;
00096 GMutex *mutex;
00097 GCond *cond;
00098 GtkWidget *computing_spinner;
00099 gboolean show_spinner;
00100 guint spinner_start_src;
00101 guint spinner_stop_src;
00102 GtkToolItem *hidden_item;
00106 void *priv;
00126 GList *(*build_func_list)();
00127
00128
00143 GList *(*build_time_periods)();
00144
00145
00153 int (*init_private)(struct __frame_t *);
00154
00155
00156
00168 int (*restore_private)(struct __frame_t *, GKeyFile *);
00169
00170
00171
00182 int (*save_private)(struct __frame_t *, GKeyFile *);
00183
00184
00185
00195 int (*free_private)(struct __frame_t *);
00196
00197
00207 int (*is_refreshing_needed)(struct __frame_t *);
00208
00209
00222 int (*refresh_content)(struct __frame_t *);
00223
00224
00238 int (*draw_area)(struct __frame_t *, cairo_t *);
00239
00240
00248 char *(*get_display_name)(struct __frame_t *);
00249
00250
00263 int (*frame_size_changed)(struct __frame_t *);
00264
00265
00277 int (*display_machine_changed)(struct __frame_t *);
00278
00279
00291 int (*time_period_changed)(struct __frame_t *);
00292
00293
00316 int (*button_press_handler)(struct __frame_t *, GdkEventButton *);
00317
00318
00340 int (*button_release_handler)(struct __frame_t *, GdkEventButton *);
00341 } frame_t;
00342
00343
00344 #ifdef __cplusplus
00345 }
00346 #endif
00347 #endif