summaryrefslogtreecommitdiff
path: root/magnifier/magnifier.h
diff options
context:
space:
mode:
Diffstat (limited to 'magnifier/magnifier.h')
-rw-r--r--magnifier/magnifier.h109
1 files changed, 70 insertions, 39 deletions
diff --git a/magnifier/magnifier.h b/magnifier/magnifier.h
index fcd8527..0127d10 100644
--- a/magnifier/magnifier.h
+++ b/magnifier/magnifier.h
@@ -38,45 +38,62 @@ extern "C" {
#include <login-helper/login-helper.h>
+#include <dbus/dbus-glib.h>
+
#define MAGNIFIER_TYPE (magnifier_get_type ())
#define MAGNIFIER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MAGNIFIER_TYPE, Magnifier))
#define MAGNIFIER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), MAGNIFIER_TYPE, MagnifierClass))
-#define IS_MAGNIFIER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MAGNIFIER_TYPE))
-#define IS_MAGNIFIER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MAGNIFIER_TYPE))
+#define IS_MAGNIFIER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MAGNIFIER_TYPE))
+#define IS_MAGNIFIER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MAGNIFIER_TYPE))
+#define MAGNIFIER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), MAGNIFIER_TYPE, MagnifierClass))
#define MAGNIFIER_OAFIID "OAFIID:GNOME_Magnifier_Magnifier:0.9"
typedef struct _MagnifierPrivate MagnifierPrivate;
typedef struct {
- BonoboObject parent;
- BonoboPropertyBag *property_bag;
- GdkDisplay *source_display;
- GdkDisplay *target_display;
- gchar *source_display_name;
- gchar *target_display_name;
- int source_screen_num;
- int target_screen_num;
- GList *zoom_regions;
- gboolean source_initialized;
- gint crosswire_size;
- gint crosswire_length;
- guint32 crosswire_color;
- gboolean crosswire_clip;
- gchar *cursor_set;
- gint cursor_size_x;
- gint cursor_size_y;
- guint32 cursor_color;
- float cursor_scale_factor;
+ gint32 x1;
+ gint32 y1;
+ gint32 x2;
+ gint32 y2;
+} RectBounds;
+
+typedef struct {
+ gint32 x;
+ gint32 y;
+} Point;
+
+typedef struct {
+ BonoboObject parent;
+ BonoboPropertyBag *property_bag;
+ GdkDisplay *source_display;
+ GdkDisplay *target_display;
+ gchar *source_display_name;
+ gchar *target_display_name;
+ int source_screen_num;
+ int target_screen_num;
+ GList *zoom_regions;
+ GList *zoom_regions_dbus;
+ gboolean source_initialized;
+ gint crosswire_size;
+ gint crosswire_length;
+ guint32 crosswire_color;
+ gboolean crosswire_clip;
+ gchar *cursor_set;
+ gint cursor_size_x;
+ gint cursor_size_y;
+ guint32 cursor_color;
+ float cursor_scale_factor;
GNOME_Magnifier_RectBounds source_bounds;
GNOME_Magnifier_RectBounds target_bounds;
- GNOME_Magnifier_Point cursor_hotspot;
- MagnifierPrivate *priv;
+ GNOME_Magnifier_Point cursor_hotspot;
+ MagnifierPrivate *priv;
} Magnifier;
typedef struct {
- BonoboObjectClass parent_class;
- POA_GNOME_Magnifier_Magnifier__epv epv;
+ BonoboObjectClass parent_class;
+ POA_GNOME_Magnifier_Magnifier__epv epv;
+ DBusGConnection *connection;
} MagnifierClass;
/*
@@ -129,27 +146,27 @@ typedef struct {
*/
typedef struct timing {
- GTimer *process;
- GTimer *frame;
- GTimer *scale;
- GTimer *idle;
+ GTimer *process;
+ GTimer *frame;
+ GTimer *scale;
+ GTimer *idle;
gdouble scale_val;
gdouble idle_val;
gdouble frame_val;
- int dx;
- int dy;
+ int dx;
+ int dy;
gdouble scale_total;
gdouble idle_total;
gdouble frame_total;
- int dx_total;
- int dy_total;
- long update_pixels_total;
- long num_scale_samples;
- long num_idle_samples;
- long num_frame_samples;
- long num_line_samples;
+ int dx_total;
+ int dy_total;
+ long update_pixels_total;
+ long num_scale_samples;
+ long num_idle_samples;
+ long num_frame_samples;
+ long num_line_samples;
gdouble last_frame_val;
- int last_dy;
+ int last_dy;
} TimingStruct;
TimingStruct mag_timing;
@@ -168,6 +185,20 @@ void magnifier_set_cursor_pixmap_by_name (Magnifier *magnifier,
void magnifier_transform_cursor (Magnifier *magnifier);
void magnifier_zoom_regions_update_pointer (Magnifier *magnifier);
gboolean magnifier_full_screen_capable (Magnifier *magnifier);
+
+/* D-BUS methods */
+gboolean impl_dbus_magnifier_full_screen_capable (Magnifier *magnifier);
+gboolean impl_dbus_magnifier_hide_cursor (Magnifier *magnifier);
+gboolean impl_dbus_magnifier_show_cursor (Magnifier *magnifier);
+gboolean impl_dbus_magnifier_support_colorblind_filters (Magnifier *magnifier);
+gchar* impl_dbus_magnifier_create_zoom_region (Magnifier *magnifier, const double zx, const double zy,
+ const gint32 **roi, const gint32 **viewport);
+gchar** impl_dbus_magnifier_get_zoom_regions (Magnifier *magnifier);
+gboolean impl_dbus_magnifier_add_zoom_region (Magnifier *magnifier, gchar *zoom_region_path);
+gboolean impl_dbus_magnifier_clear_all_zoom_regions (Magnifier *magnifier);
+gboolean impl_dbus_magnifier_dispose (Magnifier *magnifier);
+
+
#ifdef __cplusplus
}
#endif /* __cplusplus */