00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef MAGNIFIER_H_
00024 #define MAGNIFIER_H_
00025
00026 #ifdef __cplusplus
00027 extern "C" {
00028 #endif
00029
00030 #include "GNOME_Magnifier.h"
00031
00032 #include <glib.h>
00033
00034 #include <gdk/gdk.h>
00035
00036 #include <bonobo/bonobo-object.h>
00037 #include <bonobo/bonobo-property-bag.h>
00038
00039 #include <login-helper/login-helper.h>
00040
00041 #define MAGNIFIER_TYPE (magnifier_get_type ())
00042 #define MAGNIFIER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MAGNIFIER_TYPE, Magnifier))
00043 #define MAGNIFIER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), MAGNIFIER_TYPE, MagnifierClass))
00044 #define IS_MAGNIFIER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MAGNIFIER_TYPE))
00045 #define IS_MAGNIFIER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MAGNIFIER_TYPE))
00046
00047 #define MAGNIFIER_OAFIID "OAFIID:GNOME_Magnifier_Magnifier:0.9"
00048
00049 typedef struct _MagnifierPrivate MagnifierPrivate;
00050
00051 typedef struct {
00052 BonoboObject parent;
00053 BonoboPropertyBag *property_bag;
00054 GdkDisplay *source_display;
00055 GdkDisplay *target_display;
00056 gchar *source_display_name;
00057 gchar *target_display_name;
00058 int source_screen_num;
00059 int target_screen_num;
00060 GList *zoom_regions;
00061 gboolean source_initialized;
00062 gint crosswire_size;
00063 guint32 crosswire_color;
00064 gboolean crosswire_clip;
00065 gchar *cursor_set;
00066 gint cursor_size_x;
00067 gint cursor_size_y;
00068 guint32 cursor_color;
00069 float cursor_scale_factor;
00070 GNOME_Magnifier_RectBounds source_bounds;
00071 GNOME_Magnifier_RectBounds target_bounds;
00072 GNOME_Magnifier_Point cursor_hotspot;
00073 MagnifierPrivate *priv;
00074 } Magnifier;
00075
00076 typedef struct {
00077 BonoboObjectClass parent_class;
00078 POA_GNOME_Magnifier_Magnifier__epv epv;
00079 } MagnifierClass;
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130 typedef struct timing {
00131 GTimer *process;
00132 GTimer *frame;
00133 GTimer *scale;
00134 GTimer *idle;
00135 gdouble scale_val;
00136 gdouble idle_val;
00137 gdouble frame_val;
00138 int dx;
00139 int dy;
00140 gdouble scale_total;
00141 gdouble idle_total;
00142 gdouble frame_total;
00143 int dx_total;
00144 int dy_total;
00145 long update_pixels_total;
00146 long num_scale_samples;
00147 long num_idle_samples;
00148 long num_frame_samples;
00149 long num_line_samples;
00150 gdouble last_frame_val;
00151 int last_dy;
00152 } TimingStruct;
00153
00154 TimingStruct mag_timing;
00155
00156 GdkDrawable *magnifier_get_cursor (Magnifier *magnifier);
00157 GType magnifier_get_type (void);
00158 GdkWindow *magnifier_get_root (Magnifier *magnifier);
00159 Magnifier *magnifier_new (gboolean override_redirect);
00160 void magnifier_notify_damage (Magnifier *magnifier,
00161 GdkRectangle *rect);
00162 void magnifier_set_cursor_from_pixbuf (Magnifier *magnifier,
00163 GdkPixbuf *pointer_pixbuf);
00164 void magnifier_set_cursor_pixmap_by_name (Magnifier *magnifier,
00165 const gchar *cursor_name,
00166 gboolean source_fallback);
00167 void magnifier_transform_cursor (Magnifier *magnifier);
00168 #ifdef __cplusplus
00169 }
00170 #endif
00171
00172 #endif