summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Eduardo Rodrigues DiÃgenes <cerdiogenes@gmail.com>2010-02-01 12:25:16 -0200
committerCarlos Eduardo Rodrigues DiÃgenes <cerdiogenes@gmail.com>2010-02-01 12:25:16 -0200
commitb6cdaffd3121f61bc17654ad10fac1e7c2767f60 (patch)
tree1a206d849d99d46b8fb9bec72eadc5e71c85dd4c
parentef530736fec7c45c4853b7d654d7b94a24060d1a (diff)
D-BUS implementation of ZoomRegion properties exposed throw the PropertyBag.
-rw-r--r--configure.in6
-rw-r--r--magnifier/Makefile.am2
-rw-r--r--magnifier/magnifier.c36
-rw-r--r--magnifier/zoom-region.c456
-rw-r--r--magnifier/zoom-region.h78
-rwxr-xr-xxml/org.freedesktop.gnome.ZoomRegion.xml413
-rw-r--r--xml/spec.xml527
7 files changed, 885 insertions, 633 deletions
diff --git a/configure.in b/configure.in
index 73cc787..9255b21 100644
--- a/configure.in
+++ b/configure.in
@@ -13,21 +13,21 @@ AC_CONFIG_MACRO_DIR([m4])
dnl libtool versioning from libgnome
GNOME_MAG_MAJOR_VERSION=0
-GNOME_MAG_MINOR_VERSION=15
+GNOME_MAG_MINOR_VERSION=16
GNOME_MAG_INTERFACE_AGE=10
dnl below should change if the interface has additions, changes, removals.
GNOME_MAG_CURRENT=`expr $GNOME_MAG_MINOR_VERSION - $GNOME_MAG_INTERFACE_AGE`
dnl increment any time the source you release changes; set to
dnl 0 if you increment CURRENT
-GNOME_MAG_REVISION=9
+GNOME_MAG_REVISION=0
GNOME_MAG_MICRO_VERSION=$GNOME_MAG_REVISION
dnl increment if any interfaces have been added; set to 0
dnl if any interfaces have been removed. removals has
dnl precedence over adding, so set to 0 if both happened.
-GNOME_MAG_AGE=3
+GNOME_MAG_AGE=4
AC_SUBST(GNOME_MAG_CURRENT)
AC_SUBST(GNOME_MAG_REVISION)
diff --git a/magnifier/Makefile.am b/magnifier/Makefile.am
index 2828ee7..c757711 100644
--- a/magnifier/Makefile.am
+++ b/magnifier/Makefile.am
@@ -104,7 +104,7 @@ $(IDL_OUT) : $(IDL) $(ORBIT_IDL)
DONT_DIST_SOURCE = $(IDL_OUT)
-CLEANFILES += $(server_in_files) $(serverinfo_DATA)
+CLEANFILES += $(server_in_files) $(serverinfo_DATA) $(service_DATA)
BUILT_SOURCES += magnifier-server.h magnifier-client.h zoom-region-server.h zoom-region-client.h
diff --git a/magnifier/magnifier.c b/magnifier/magnifier.c
index 4c3adba..c7fdfc8 100644
--- a/magnifier/magnifier.c
+++ b/magnifier/magnifier.c
@@ -976,40 +976,6 @@ magnifier_get_property (BonoboPropertyBag *bag,
};
}
-static void
-magnifier_set_target_size (gpointer data)
-{
- Magnifier *magnifier = (Magnifier *) data;
-
- magnifier->target_bounds.x1 = 0;
- magnifier->target_bounds.y1 = 0;
- magnifier->target_bounds.x2 = 150;
- magnifier->target_bounds.y2 = 150;
-
- if (magnifier->priv->overlay)
- gdk_window_move_resize (magnifier->priv->overlay,
- magnifier->target_bounds.x1,
- magnifier->target_bounds.y1,
- magnifier->target_bounds.x2 -
- magnifier->target_bounds.x1,
- magnifier->target_bounds.y2 -
- magnifier->target_bounds.y1);
- else
- gtk_window_move (GTK_WINDOW (magnifier->priv->w),
- magnifier->target_bounds.x1,
- magnifier->target_bounds.y1);
-
- gtk_window_resize (GTK_WINDOW (magnifier->priv->w),
- magnifier->target_bounds.x2 - magnifier->target_bounds.x1,
- magnifier->target_bounds.y2 - magnifier->target_bounds.y1);
- gmag_gs_check_set_struts (magnifier);
- DBG(fprintf (stderr, "Set target size: \t%d,%d to %d,%d\n",
- magnifier->target_bounds.x1, magnifier->target_bounds.y1, magnifier->target_bounds.x2, magnifier->target_bounds.y2));
- if (!strcmp (magnifier->target_display_name, magnifier->source_display_name) &&
- (magnifier->target_screen_num == magnifier->source_screen_num))
- magnifier_adjust_source_size (magnifier);
-}
-
gboolean
impl_dbus_magnifier_set_source_display (Magnifier *magnifier, gchar *source_display)
{
@@ -1738,8 +1704,6 @@ impl_dbus_magnifier_create_zoom_region (Magnifier *magnifier,
const gint32 **roi,
const gint32 **viewport)
{
- magnifier_set_target_size (magnifier);
-
ZoomRegion *zoom_region = zoom_region_new();
DBG (fprintf (stderr, "Create zoom region: \tzoom %f,%f, viewport %d,%d to %d,%d\n", (float) zx, (float) zy, (*viewport)[0]/*x1*/, (*viewport)[1]/*y1*/, (*viewport)[2]/*x2*/, (*viewport)[3]/*y3*/));
diff --git a/magnifier/zoom-region.c b/magnifier/zoom-region.c
index 0c8e12b..9352e17 100644
--- a/magnifier/zoom-region.c
+++ b/magnifier/zoom-region.c
@@ -2550,6 +2550,308 @@ zoom_region_update_borders (ZoomRegion *zoom_region)
gtk_fixed_move (GTK_FIXED (((Magnifier *)zoom_region->priv->parent)->priv->canvas), zoom_region->priv->w, zoom_region->viewport.x1 + zoom_region->border_size_left, zoom_region->viewport.y1 + zoom_region->border_size_top);
}
+gboolean
+impl_dbus_zoom_region_set_managed (ZoomRegion *zoom_region, gboolean managed)
+{
+ zoom_region->is_managed = managed;
+
+ return TRUE;
+}
+
+gboolean
+impl_dbus_zoom_region_get_managed (ZoomRegion *zoom_region)
+{
+ return zoom_region->is_managed;
+}
+
+gboolean
+impl_dbus_zoom_region_set_poll_mouse (ZoomRegion *zoom_region, gboolean poll_mouse)
+{
+ zoom_region->poll_mouse = poll_mouse;
+ if (zoom_region->poll_mouse) {
+ g_message ("Adding polling timer");
+ zoom_region->priv->update_pointer_id = g_timeout_add_full (G_PRIORITY_DEFAULT_IDLE,
+ 200,
+ zoom_region_update_pointer_timeout,
+ zoom_region,
+ NULL);
+ } else if (zoom_region->priv->update_pointer_id) {
+ g_message ("Removing polling time");
+ g_source_remove (zoom_region->priv->update_pointer_id);
+ zoom_region->priv->update_pointer_id = 0;
+ }
+
+ return TRUE;
+}
+
+gboolean
+impl_dbus_zoom_region_get_poll_mouse (ZoomRegion *zoom_region)
+{
+ return zoom_region->poll_mouse;
+}
+
+gboolean
+impl_dbus_zoom_region_set_draw_cursor (ZoomRegion *zoom_region, gboolean draw_cursor)
+{
+ zoom_region->draw_cursor = draw_cursor;
+ if (!zoom_region->draw_cursor) {
+ zoom_region_unpaint_cursor (zoom_region, NULL);
+ }
+
+ return TRUE;
+}
+
+gboolean
+impl_dbus_zoom_region_get_draw_cursor (ZoomRegion *zoom_region)
+{
+ return zoom_region->draw_cursor;
+}
+
+gboolean
+impl_dbus_zoom_region_set_invert (ZoomRegion *zoom_region, gboolean invert)
+{
+ zoom_region->invert = invert;
+ zoom_region_update_current (zoom_region);
+
+ return TRUE;
+}
+
+gboolean
+impl_dbus_zoom_region_get_invert (ZoomRegion *zoom_region)
+{
+ return zoom_region->invert;
+}
+
+gboolean
+impl_dbus_zoom_region_set_smoothscroll (ZoomRegion *zoom_region, gshort smoothscroll)
+{
+ zoom_region->smooth_scroll_policy = smoothscroll;
+
+ return TRUE;
+}
+
+gshort
+impl_dbus_zoom_region_get_smoothscroll (ZoomRegion *zoom_region)
+{
+ return zoom_region->smooth_scroll_policy;
+}
+
+gboolean
+impl_dbus_zoom_region_set_colorblind (ZoomRegion *zoom_region, gshort colorblind)
+{
+ zoom_region->color_blind_filter = colorblind;
+ zoom_region_update_current (zoom_region);
+
+ return TRUE;
+}
+
+gshort
+impl_dbus_zoom_region_get_colorblind (ZoomRegion *zoom_region)
+{
+ return zoom_region->color_blind_filter;
+}
+
+gboolean
+impl_dbus_zoom_region_set_smoothing (ZoomRegion *zoom_region, gchar *smoothing)
+{
+ zoom_region->smoothing = g_strdup (smoothing);
+ if (!strncmp (zoom_region->smoothing, "bilinear", 8)) {
+ zoom_region->priv->gdk_interp_type = GDK_INTERP_BILINEAR;
+ } else {
+ zoom_region->priv->gdk_interp_type = GDK_INTERP_NEAREST;
+ }
+ zoom_region_update_current (zoom_region);
+
+ return TRUE;
+}
+
+gchar*
+impl_dbus_zoom_region_get_smoothing (ZoomRegion *zoom_region)
+{
+ return g_strdup (zoom_region->smoothing);
+}
+
+gboolean
+impl_dbus_zoom_region_set_testpattern (ZoomRegion *zoom_region, gboolean test)
+{
+ zoom_region->priv->test = test;
+ if (zoom_region->priv->source_drawable) {
+ g_object_unref (zoom_region->priv->source_drawable);
+ zoom_region->priv->source_drawable = NULL;
+ }
+ zoom_region_update_current (zoom_region);
+
+ return TRUE;
+}
+
+gboolean
+impl_dbus_zoom_region_get_testpattern (ZoomRegion *zoom_region)
+{
+ return zoom_region->priv->test;
+}
+
+gboolean
+impl_dbus_zoom_region_set_bordersizes (ZoomRegion *zoom_region, gint32 **bordersizes)
+{
+ zoom_region->border_size_left = (*bordersizes)[0];
+ zoom_region->border_size_top = (*bordersizes)[1];
+ zoom_region->border_size_right = (*bordersizes)[2];
+ zoom_region->border_size_bottom = (*bordersizes)[3];
+ zoom_region_update_borders (zoom_region);
+
+ return TRUE;
+}
+
+GArray*
+impl_dbus_zoom_region_get_bordersizes (ZoomRegion *zoom_region)
+{
+ GArray *ret;
+
+ ret = g_array_new (FALSE, FALSE, sizeof (gint32));
+
+ g_array_append_val (ret, zoom_region->border_size_left);
+ g_array_append_val (ret, zoom_region->border_size_top);
+ g_array_append_val (ret, zoom_region->border_size_right);
+ g_array_append_val (ret, zoom_region->border_size_bottom);
+
+ return ret;
+}
+
+gboolean
+impl_dbus_zoom_region_set_bordercolor (ZoomRegion *zoom_region, guint32 bordercolor)
+{
+ zoom_region->border_color = bordercolor;
+ zoom_region_paint_border (zoom_region);
+
+ return TRUE;
+}
+
+guint32
+impl_dbus_zoom_region_get_bordercolor (ZoomRegion *zoom_region)
+{
+ return zoom_region->border_color;
+}
+
+gboolean
+impl_dbus_zoom_region_set_xalign (ZoomRegion *zoom_region, gint32 align)
+{
+ zoom_region->x_align_policy = align;
+ zoom_region_align (zoom_region);
+
+ return TRUE;
+}
+
+gint32
+impl_dbus_zoom_region_get_xalign (ZoomRegion *zoom_region)
+{
+ return zoom_region->x_align_policy;
+}
+
+gboolean
+impl_dbus_zoom_region_set_yalign (ZoomRegion *zoom_region, gint32 align)
+{
+ zoom_region->y_align_policy = align;
+ zoom_region_align (zoom_region);
+
+ return TRUE;
+}
+
+gint32
+impl_dbus_zoom_region_get_yalign (ZoomRegion *zoom_region)
+{
+ return zoom_region->y_align_policy;
+}
+
+gboolean
+impl_dbus_zoom_region_set_viewport (ZoomRegion *zoom_region, gint32 **viewport)
+{
+ GNOME_Magnifier_RectBounds *bounds = g_malloc (sizeof (GNOME_Magnifier_RectBounds));
+
+ bounds->x1 = (*viewport)[0];
+ bounds->y1 = (*viewport)[1];
+ bounds->x2 = (*viewport)[2];
+ bounds->y2 = (*viewport)[3];
+
+ zoom_region_set_viewport (zoom_region, bounds);
+
+ g_free (bounds);
+
+ return TRUE;
+}
+
+GArray*
+impl_dbus_zoom_region_get_viewport (ZoomRegion *zoom_region)
+{
+ GArray *ret;
+
+ ret = g_array_new (FALSE, FALSE, sizeof (gint32));
+
+ g_array_append_val (ret, zoom_region->viewport.x1);
+ g_array_append_val (ret, zoom_region->viewport.y1);
+ g_array_append_val (ret, zoom_region->viewport.x2);
+ g_array_append_val (ret, zoom_region->viewport.y2);
+
+ return ret;
+}
+
+gboolean
+impl_dbus_zoom_region_set_timing_test (ZoomRegion *zoom_region, gint32 timing_iterations)
+{
+ zoom_region->timing_iterations = timing_iterations;
+ timing_test = TRUE;
+
+ return TRUE;
+}
+
+gint32
+impl_dbus_zoom_region_get_timing_test (ZoomRegion *zoom_region)
+{
+ return zoom_region->timing_iterations;
+}
+
+gboolean
+impl_dbus_zoom_region_set_timing_output (ZoomRegion *zoom_region, gboolean timing_output)
+{
+ zoom_region->timing_output = timing_output;
+
+ return TRUE;
+}
+
+gboolean
+impl_dbus_zoom_region_get_timing_output (ZoomRegion *zoom_region)
+{
+ return zoom_region->timing_output;
+}
+
+gboolean
+impl_dbus_zoom_region_set_timing_pan_rate (ZoomRegion *zoom_region, gint32 timing_pan_rate)
+{
+ zoom_region->timing_pan_rate = timing_pan_rate;
+ timing_test = TRUE;
+
+ return TRUE;
+}
+
+gint32
+impl_dbus_zoom_region_get_timing_pan_rate (ZoomRegion *zoom_region)
+{
+ return zoom_region->timing_pan_rate;
+}
+
+gboolean
+impl_dbus_zoom_region_set_exit_magnifier (ZoomRegion *zoom_region, gboolean exit_magnifier)
+{
+ zoom_region->exit_magnifier = exit_magnifier;
+
+ return TRUE;
+}
+
+gboolean
+impl_dbus_zoom_region_get_exit_magnifier (ZoomRegion *zoom_region)
+{
+ return zoom_region->exit_magnifier;
+}
+
static void
zoom_region_set_property (BonoboPropertyBag *bag,
BonoboArg *arg,
@@ -3217,7 +3519,7 @@ impl_dbus_zoom_region_dispose (ZoomRegion *zoom_region)
}
gboolean
-impl_dbus_zoom_region_set_mag_factor (ZoomRegion *zoom_region, const float mag_factor_x, const float mag_factor_y)
+impl_dbus_zoom_region_set_mag_factor (ZoomRegion *zoom_region, const gdouble mag_factor_x, const gdouble mag_factor_y)
{
#ifdef ZOOM_REGION_DEBUG
g_assert (zoom_region->alive);
@@ -3253,10 +3555,17 @@ impl_dbus_zoom_region_set_mag_factor (ZoomRegion *zoom_region, const float mag_f
return retval;
}
-gboolean
+GArray*
impl_dbus_zoom_region_get_mag_factor (ZoomRegion *zoom_region)
{
- return TRUE;
+ GArray *ret;
+
+ ret = g_array_new (FALSE, FALSE, sizeof (gdouble));
+
+ g_array_append_val (ret, zoom_region->xscale);
+ g_array_append_val (ret, zoom_region->yscale);
+
+ return ret;
}
gboolean
@@ -3339,22 +3648,54 @@ impl_dbus_zoom_region_set_roi (ZoomRegion *zoom_region, const gint32 **roi)
return TRUE;
}
+/* TODO: Deprecate this RPC */
gboolean
impl_dbus_zoom_region_update_pointer (ZoomRegion *zoom_region)
{
- return TRUE;
+#ifdef ZOOM_REGION_DEBUG
+ g_assert (zoom_region->alive);
+#endif
+
+ zoom_region_update_cursor (zoom_region, 0, 0, NULL);
}
gboolean
-impl_dbus_zoom_region_mark_dirty (ZoomRegion *zoom_region)
+impl_dbus_zoom_region_mark_dirty (ZoomRegion *zoom_region, gint32 **bounds)
{
+ GNOME_Magnifier_RectBounds *roi_dirty = g_malloc(sizeof(GNOME_Magnifier_RectBounds));
+ roi_dirty->x1 = (*bounds)[0];
+ roi_dirty->y1 = (*bounds)[1];
+ roi_dirty->x2 = (*bounds)[2];
+ roi_dirty->y2 = (*bounds)[3];
+
+#ifdef ZOOM_REGION_DEBUG
+ g_assert (zoom_region->alive);
+#endif
+ DEBUG_RECT ("mark dirty", zoom_region_rect_from_bounds (
+ zoom_region, roi_dirty) );
+
+ zoom_region_update_pointer (zoom_region, TRUE);
+ /* XXX ? should we clip here, or wait till process_updates? */
+ zoom_region_queue_update (zoom_region,
+ zoom_region_clip_to_source (zoom_region,
+ zoom_region_rect_from_bounds (zoom_region, roi_dirty)));
+
return TRUE;
}
-gboolean
+GArray*
impl_dbus_zoom_region_get_roi (ZoomRegion *zoom_region)
{
- return TRUE;
+ GArray *ret;
+
+ ret = g_array_new (FALSE, FALSE, sizeof (gint32));
+
+ g_array_append_val (ret, zoom_region->roi.x1);
+ g_array_append_val (ret, zoom_region->roi.y1);
+ g_array_append_val (ret, zoom_region->roi.x2);
+ g_array_append_val (ret, zoom_region->roi.y2);
+
+ return ret;
}
gboolean
@@ -3375,32 +3716,119 @@ impl_dbus_zoom_region_move_resize (ZoomRegion *zoom_region, const gint32 **viewp
}
gboolean
-impl_dbus_zoom_region_set_pointer_pos (ZoomRegion *zoom_region) {
+impl_dbus_zoom_region_set_pointer_pos (ZoomRegion *zoom_region, gint32 mouse_x, gint32 mouse_y)
+{
+ GdkRectangle paint_area, *clip = NULL;
+
+#ifdef ZOOM_REGION_DEBUG
+ g_assert (zoom_region->alive);
+#endif
+ DBG (fprintf (stderr, "Set Pointer: \t%ld,%ld\n",
+ (long) mouse_x, (long) mouse_y));
+
+ fprintf (stderr, "Set Pointer: \t%ld,%ld\n",
+ (long) mouse_x, (long) mouse_y);
+
+ zoom_region_set_cursor_pos (zoom_region, (int) mouse_x, (int) mouse_y);
+
+ if (GTK_IS_WIDGET (zoom_region->priv->w) &&
+ GDK_IS_DRAWABLE (zoom_region->priv->w->window))
+ {
+ gdk_drawable_get_size (
+ GDK_DRAWABLE (
+ zoom_region->priv->w->window),
+ &paint_area.width, &paint_area.height);
+ paint_area.x = 0;
+ paint_area.y = 0;
+ clip = &paint_area;
+ paint_area = zoom_region_clip_to_source (
+ zoom_region, paint_area);
+ }
+ /*
+ * if we update the cursor now, it causes flicker if the client
+ * subsequently calls setROI, so we wait for a redraw.
+ * Perhaps we should cue a redraw on idle instead?
+ */
+
return TRUE;
}
gboolean
-impl_dbus_zoom_region_set_contrast (ZoomRegion *zoom_region)
+impl_dbus_zoom_region_set_contrast (ZoomRegion *zoom_region, gdouble R, gdouble G, gdouble B)
{
+ gfloat t;
+
+#ifdef ZOOM_REGION_DEBUG
+ g_assert (zoom_region->alive);
+#endif
+ DBG (fprintf (stderr, "Set contrast: \t%f,%f %f\n", R, G, B));
+
+ /* if the contrast values are the same, this is a NOOP */
+ if (zoom_region->contrast_r == R &&
+ zoom_region->contrast_g == G &&
+ zoom_region->contrast_b == B)
+ return TRUE;
+
+ zoom_region->contrast_r = CLAMP_B_C (R);
+ zoom_region->contrast_g = CLAMP_B_C (G);
+ zoom_region->contrast_b = CLAMP_B_C (B);
+
+ zoom_region_update_current (zoom_region);
+
return TRUE;
}
-gboolean
+GArray*
impl_dbus_zoom_region_get_contrast (ZoomRegion *zoom_region)
{
- return TRUE;
+ GArray *ret;
+
+ ret = g_array_new (FALSE, FALSE, sizeof (gdouble));
+
+ g_array_append_val (ret, zoom_region->contrast_r);
+ g_array_append_val (ret, zoom_region->contrast_g);
+ g_array_append_val (ret, zoom_region->contrast_b);
+
+ return ret;
}
gboolean
-impl_dbus_zoom_region_set_brightness (ZoomRegion *zoom_region)
+impl_dbus_zoom_region_set_brightness (ZoomRegion *zoom_region, gdouble R, gdouble G, gdouble B)
{
+ gfloat t;
+
+#ifdef ZOOM_REGION_DEBUG
+ g_assert (zoom_region->alive);
+#endif
+ DBG (fprintf (stderr, "Set brightness: \t%f,%f %f\n", R, G, B));
+
+ /* if the contrast values are the same, this is a NOOP */
+ if (zoom_region->bright_r == R &&
+ zoom_region->bright_g == G &&
+ zoom_region->bright_b == B)
+ return TRUE;
+
+ zoom_region->bright_r = CLAMP_B_C (R);
+ zoom_region->bright_g = CLAMP_B_C (G);
+ zoom_region->bright_b = CLAMP_B_C (B);
+
+ zoom_region_update_current (zoom_region);
+
return TRUE;
}
-gboolean
+GArray*
impl_dbus_zoom_region_get_brightness (ZoomRegion *zoom_region)
{
- return TRUE;
+ GArray *ret;
+
+ ret = g_array_new (FALSE, FALSE, sizeof (gdouble));
+
+ g_array_append_val (ret, zoom_region->bright_r);
+ g_array_append_val (ret, zoom_region->bright_g);
+ g_array_append_val (ret, zoom_region->bright_b);
+
+ return ret;
}
/* could be called multiple times */
diff --git a/magnifier/zoom-region.h b/magnifier/zoom-region.h
index ef22889..f678fcd 100644
--- a/magnifier/zoom-region.h
+++ b/magnifier/zoom-region.h
@@ -52,14 +52,14 @@ typedef struct {
gchar *smoothing;
gchar *object_path;
gfloat contrast;
- gfloat xscale;
- gfloat yscale;
- gfloat contrast_r;
- gfloat contrast_g;
- gfloat contrast_b;
- gfloat bright_r;
- gfloat bright_g;
- gfloat bright_b;
+ gdouble xscale;
+ gdouble yscale;
+ gdouble contrast_r;
+ gdouble contrast_g;
+ gdouble contrast_b;
+ gdouble bright_r;
+ gdouble bright_g;
+ gdouble bright_b;
gint border_size_top;
gint border_size_left;
gint border_size_right;
@@ -94,20 +94,54 @@ GType zoom_region_get_type (void);
ZoomRegion *zoom_region_new (void);
/* D-BUS methods */
-gboolean impl_dbus_zoom_region_set_mag_factor (ZoomRegion *zoom_region, const float mag_factor_x,
- const float mag_factor_y);
-gboolean impl_dbus_zoom_region_get_mag_factor (ZoomRegion *zoom_region);
-gboolean impl_dbus_zoom_region_set_roi (ZoomRegion *zoom_region, const gint32 **roi);
-gboolean impl_dbus_zoom_region_update_pointer (ZoomRegion *zoom_region);
-gboolean impl_dbus_zoom_region_mark_dirty (ZoomRegion *zoom_region);
-gboolean impl_dbus_zoom_region_get_roi (ZoomRegion *zoom_region);
-gboolean impl_dbus_zoom_region_move_resize (ZoomRegion *zoom_region, const gint32 **viewport);
-gboolean impl_dbus_zoom_region_dispose (ZoomRegion *zoom_region);
-gboolean impl_dbus_zoom_region_set_pointer_pos (ZoomRegion *zoom_region);
-gboolean impl_dbus_zoom_region_set_contrast (ZoomRegion *zoom_region);
-gboolean impl_dbus_zoom_region_get_contrast (ZoomRegion *zoom_region);
-gboolean impl_dbus_zoom_region_set_brightness (ZoomRegion *zoom_region);
-gboolean impl_dbus_zoom_region_get_brightness (ZoomRegion *zoom_region);
+gboolean impl_dbus_zoom_region_set_mag_factor (ZoomRegion *zoom_region, const gdouble mag_factor_x,
+ const gdouble mag_factor_y);
+GArray* impl_dbus_zoom_region_get_mag_factor (ZoomRegion *zoom_region);
+gboolean impl_dbus_zoom_region_set_roi (ZoomRegion *zoom_region, const gint32 **roi);
+gboolean impl_dbus_zoom_region_update_pointer (ZoomRegion *zoom_region);
+gboolean impl_dbus_zoom_region_mark_dirty (ZoomRegion *zoom_region, gint32 **bounds);
+GArray* impl_dbus_zoom_region_get_roi (ZoomRegion *zoom_region);
+gboolean impl_dbus_zoom_region_move_resize (ZoomRegion *zoom_region, const gint32 **viewport);
+gboolean impl_dbus_zoom_region_dispose (ZoomRegion *zoom_region);
+gboolean impl_dbus_zoom_region_set_pointer_pos (ZoomRegion *zoom_region, gint32 mouse_x, gint32 mouse_y);
+gboolean impl_dbus_zoom_region_set_contrast (ZoomRegion *zoom_region, gdouble R, gdouble G, gdouble B);
+GArray* impl_dbus_zoom_region_get_contrast (ZoomRegion *zoom_region);
+gboolean impl_dbus_zoom_region_set_brightness (ZoomRegion *zoom_region, gdouble R, gdouble G, gdouble B);
+GArray* impl_dbus_zoom_region_get_brightness (ZoomRegion *zoom_region);
+gboolean impl_dbus_zoom_region_set_managed (ZoomRegion *zoom_region, gboolean managed);
+gboolean impl_dbus_zoom_region_get_managed (ZoomRegion *zoom_region);
+gboolean impl_dbus_zoom_region_set_poll_mouse (ZoomRegion *zoom_region, gboolean poll_mouse);
+gboolean impl_dbus_zoom_region_get_poll_mouse (ZoomRegion *zoom_region);
+gboolean impl_dbus_zoom_region_set_draw_cursor (ZoomRegion *zoom_region, gboolean draw_cursor);
+gboolean impl_dbus_zoom_region_get_draw_cursor (ZoomRegion *zoom_region);
+gboolean impl_dbus_zoom_region_set_invert (ZoomRegion *zoom_region, gboolean invert);
+gboolean impl_dbus_zoom_region_get_invert (ZoomRegion *zoom_region);
+gboolean impl_dbus_zoom_region_set_smoothscroll (ZoomRegion *zoom_region, gshort smoothscroll);
+gshort impl_dbus_zoom_region_get_smoothscroll (ZoomRegion *zoom_region);
+gboolean impl_dbus_zoom_region_set_colorblind (ZoomRegion *zoom_region, gshort colorblind);
+gshort impl_dbus_zoom_region_get_colorblind (ZoomRegion *zoom_region);
+gboolean impl_dbus_zoom_region_set_smoothing (ZoomRegion *zoom_region, gchar *smoothing);
+gchar* impl_dbus_zoom_region_get_smoothing (ZoomRegion *zoom_region);
+gboolean impl_dbus_zoom_region_set_testpattern (ZoomRegion *zoom_region, gboolean test);
+gboolean impl_dbus_zoom_region_get_testpattern (ZoomRegion *zoom_region);
+gboolean impl_dbus_zoom_region_set_bordersizes (ZoomRegion *zoom_region, gint32 **bordersizes);
+GArray* impl_dbus_zoom_region_get_bordersizes (ZoomRegion *zoom_region);
+gboolean impl_dbus_zoom_region_set_bordercolor (ZoomRegion *zoom_region, guint32 bordercolor);
+guint32 impl_dbus_zoom_region_get_bordercolor (ZoomRegion *zoom_region);
+gboolean impl_dbus_zoom_region_set_xalign (ZoomRegion *zoom_region, gint32 align);
+gint32 impl_dbus_zoom_region_get_xalign (ZoomRegion *zoom_region);
+gboolean impl_dbus_zoom_region_set_yalign (ZoomRegion *zoom_region, gint32 align);
+gint32 impl_dbus_zoom_region_get_yalign (ZoomRegion *zoom_region);
+gboolean impl_dbus_zoom_region_set_viewport (ZoomRegion *zoom_region, gint32 **viewport);
+GArray* impl_dbus_zoom_region_get_viewport (ZoomRegion *zoom_region);
+gboolean impl_dbus_zoom_region_set_timing_test (ZoomRegion *zoom_region, gint32 timing_iterations);
+gint32 impl_dbus_zoom_region_get_timing_test (ZoomRegion *zoom_region);
+gboolean impl_dbus_zoom_region_set_timing_output (ZoomRegion *zoom_region, gboolean timing_output);
+gboolean impl_dbus_zoom_region_get_timing_output (ZoomRegion *zoom_region);
+gboolean impl_dbus_zoom_region_set_timing_pan_rate (ZoomRegion *zoom_region, gint32 timing_pan_rate);
+gint32 impl_dbus_zoom_region_get_timing_pan_rate (ZoomRegion *zoom_region);
+gboolean impl_dbus_zoom_region_set_exit_magnifier (ZoomRegion *zoom_region, gboolean exit_magnifier);
+gboolean impl_dbus_zoom_region_get_exit_magnifier (ZoomRegion *zoom_region);
#ifdef __cplusplus
}
diff --git a/xml/org.freedesktop.gnome.ZoomRegion.xml b/xml/org.freedesktop.gnome.ZoomRegion.xml
index c313ff2..38f3aa0 100755
--- a/xml/org.freedesktop.gnome.ZoomRegion.xml
+++ b/xml/org.freedesktop.gnome.ZoomRegion.xml
@@ -78,6 +78,7 @@
</tp:docstring>
</arg>
<arg type="b" name="b_ret" direction="out">
+ <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value="" />
<tp:docstring>
TRUE if operation succeeded, FALSE if the requested mag factor cannot
be set. Returned in the 'b_ret' arg.
@@ -92,15 +93,10 @@
getting mag-factor-x and mag-factor-y properties).
</p>
</tp:docstring>
- <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
- <arg type="d" name="magX" direction="out">
+ <arg type="ad" name="factors" direction="out">
+ <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value="" />
<tp:docstring>
- the magnification factor in the x direction for the specified region.
- </tp:docstring>
- </arg>
- <arg type="d" name="magY" direction="out">
- <tp:docstring>
- the magnification factor in the x direction for the specified region.
+ the magnification factor in the x and y direction for the specified region.
</tp:docstring>
</arg>
</method>
@@ -160,7 +156,7 @@
</tp:docstring>
<annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
<!-- note that 'dirtyRegion' is a RectBounds -->
- <arg type="(iiii)" name="dirtyRegion" tp:type="RectBounds" direction="in">
+ <arg type="ai" name="dirtyRegion" tp:type="RectBounds" direction="in">
<tp:docstring>
the bounding box of the dirty region.
</tp:docstring>
@@ -173,7 +169,8 @@
Query a specific zoom region for its Roi.
</p>
</tp:docstring>
- <arg type="(iiii)" name="Roi-ret" tp:type="RectBounds" direction="out">
+ <arg type="ai" name="Roi-ret" tp:type="RectBounds" direction="out">
+ <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value="" />
<tp:docstring>
Returns the RectBounds bounding box of the zoom Roi.
</tp:docstring>
@@ -264,21 +261,12 @@
</p>
</tp:docstring>
<annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
- <arg type="d" name="R" direction="out">
+ <arg type="ad" name="RGB" direction="out">
+ <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value="" />
<tp:docstring>
the amount of red in the contrasted image
</tp:docstring>
</arg>
- <arg type="d" name="G" direction="out">
- <tp:docstring>
- the amount of green in the contrasted image
- </tp:docstring>
- </arg>
- <arg type="d" name="B" direction="out">
- <tp:docstring>
- the amount of blue in the contrasted image
- </tp:docstring>
- </arg>
</method>
<method name="setBrightness">
@@ -328,20 +316,385 @@
</p>
</tp:docstring>
<annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
- <arg type="d" name="R" direction="out">
+ <arg type="d" name="RGB" direction="out">
+ <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value="" />
<tp:docstring>
the brightness applied to the red component.
</tp:docstring>
</arg>
- <arg type="d" name="G" direction="out">
- <tp:docstring>
- the brightness applied to the green component.
- </tp:docstring>
+ </method>
+
+ <method name="setManaged">
+ <tp:docstring>
+ <p>
+ TODO
+ </p>
+ </tp:docstring>
+ <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
+ <arg type="b" name="managed" direction="in" />
+ </method>
+
+ <method name="getManaged">
+ <tp:docstring>
+ <p>
+ TODO
+ </p>
+ </tp:docstring>
+ <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
+ <arg type="b" name="managed" direction="out">
+ <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value="" />
</arg>
- <arg type="d" name="B" direction="out">
- <tp:docstring>
- the brightness applied to the blue component.
- </tp:docstring>
+ </method>
+
+ <method name="setPollMouse">
+ <tp:docstring>
+ <p>
+ TODO
+ </p>
+ </tp:docstring>
+ <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
+ <arg type="b" name="poll_mouse" direction="in" />
+ </method>
+
+ <method name="getPollMouse">
+ <tp:docstring>
+ <p>
+ TODO
+ </p>
+ </tp:docstring>
+ <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
+ <arg type="b" name="poll_mouse" direction="out">
+ <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value="" />
+ </arg>
+ </method>
+
+ <method name="setDrawCursor">
+ <tp:docstring>
+ <p>
+ TODO
+ </p>
+ </tp:docstring>
+ <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
+ <arg type="b" name="draw_cursor" direction="in" />
+ </method>
+
+ <method name="getDrawCursor">
+ <tp:docstring>
+ <p>
+ TODO
+ </p>
+ </tp:docstring>
+ <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
+ <arg type="b" name="draw_cursor" direction="out">
+ <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value="" />
+ </arg>
+ </method>
+
+ <method name="setInvert">
+ <tp:docstring>
+ <p>
+ TODO
+ </p>
+ </tp:docstring>
+ <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
+ <arg type="b" name="invert" direction="in" />
+ </method>
+
+ <method name="getInvert">
+ <tp:docstring>
+ <p>
+ TODO
+ </p>
+ </tp:docstring>
+ <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
+ <arg type="b" name="invert" direction="out">
+ <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value="" />
+ </arg>
+ </method>
+
+ <method name="setSmoothscroll">
+ <tp:docstring>
+ <p>
+ TODO
+ </p>
+ </tp:docstring>
+ <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
+ <arg type="n" name="smoothscroll" direction="in" />
+ </method>
+
+ <method name="getSmoothscroll">
+ <tp:docstring>
+ <p>
+ TODO
+ </p>
+ </tp:docstring>
+ <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
+ <arg type="n" name="smoothscroll" direction="out">
+ <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value="" />
+ </arg>
+ </method>
+
+ <method name="setColorblind">
+ <tp:docstring>
+ <p>
+ TODO
+ </p>
+ </tp:docstring>
+ <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
+ <arg type="n" name="colorblind" direction="in" />
+ </method>
+
+ <method name="getColorblind">
+ <tp:docstring>
+ <p>
+ TODO
+ </p>
+ </tp:docstring>
+ <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
+ <arg type="n" name="colorblind" direction="out">
+ <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value="" />
+ </arg>
+ </method>
+
+ <method name="setSmoothing">
+ <tp:docstring>
+ <p>
+ TODO
+ </p>
+ </tp:docstring>
+ <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
+ <arg type="s" name="smoothing" direction="in" />
+ </method>
+
+ <method name="getSmoothing">
+ <tp:docstring>
+ <p>
+ TODO
+ </p>
+ </tp:docstring>
+ <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
+ <arg type="s" name="smoothing" direction="out">
+ <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value="" />
+ </arg>
+ </method>
+
+ <method name="setTestpattern">
+ <tp:docstring>
+ <p>
+ TODO
+ </p>
+ </tp:docstring>
+ <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
+ <arg type="b" name="testpattern" direction="in" />
+ </method>
+
+ <method name="getTestpattern">
+ <tp:docstring>
+ <p>
+ TODO
+ </p>
+ </tp:docstring>
+ <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
+ <arg type="b" name="testpattern" direction="out">
+ <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value="" />
+ </arg>
+ </method>
+
+ <method name="setBordersizes">
+ <tp:docstring>
+ <p>
+ TODO
+ </p>
+ </tp:docstring>
+ <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
+ <arg type="ai" name="bordersizes" direction="in" />
+ </method>
+
+ <method name="getBordersizes">
+ <tp:docstring>
+ <p>
+ TODO
+ </p>
+ </tp:docstring>
+ <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
+ <arg type="ai" name="bordersizes" direction="out">
+ <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value="" />
+ </arg>
+ </method>
+
+ <method name="setBordercolor">
+ <tp:docstring>
+ <p>
+ TODO
+ </p>
+ </tp:docstring>
+ <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
+ <arg type="u" name="bordercolor" direction="in" />
+ </method>
+
+ <method name="getBordercolor">
+ <tp:docstring>
+ <p>
+ TODO
+ </p>
+ </tp:docstring>
+ <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
+ <arg type="u" name="bordercolor" direction="out">
+ <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value="" />
+ </arg>
+ </method>
+
+ <method name="setXalign">
+ <tp:docstring>
+ <p>
+ TODO
+ </p>
+ </tp:docstring>
+ <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
+ <arg type="i" name="align" direction="in" />
+ </method>
+
+ <method name="getXalign">
+ <tp:docstring>
+ <p>
+ TODO
+ </p>
+ </tp:docstring>
+ <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
+ <arg type="i" name="align" direction="out">
+ <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value="" />
+ </arg>
+ </method>
+
+ <method name="setYalign">
+ <tp:docstring>
+ <p>
+ TODO
+ </p>
+ </tp:docstring>
+ <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
+ <arg type="i" name="align" direction="in" />
+ </method>
+
+ <method name="getYalign">
+ <tp:docstring>
+ <p>
+ TODO
+ </p>
+ </tp:docstring>
+ <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
+ <arg type="i" name="align" direction="out">
+ <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value="" />
+ </arg>
+ </method>
+
+ <method name="setViewport">
+ <tp:docstring>
+ <p>
+ TODO
+ </p>
+ </tp:docstring>
+ <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
+ <arg type="ai" name="viewport" direction="in" />
+ </method>
+
+ <method name="getViewport">
+ <tp:docstring>
+ <p>
+ TODO
+ </p>
+ </tp:docstring>
+ <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
+ <arg type="ai" name="viewport" direction="out">
+ <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value="" />
+ </arg>
+ </method>
+
+ <method name="setTimingTest">
+ <tp:docstring>
+ <p>
+ TODO
+ </p>
+ </tp:docstring>
+ <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
+ <arg type="i" name="timing_test" direction="in" />
+ </method>
+
+ <method name="getTimingTest">
+ <tp:docstring>
+ <p>
+ TODO
+ </p>
+ </tp:docstring>
+ <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
+ <arg type="i" name="timing_test" direction="out">
+ <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value="" />
+ </arg>
+ </method>
+
+ <method name="setTimingOutput">
+ <tp:docstring>
+ <p>
+ TODO
+ </p>
+ </tp:docstring>
+ <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
+ <arg type="b" name="timing_output" direction="in" />
+ </method>
+
+ <method name="getTimingOutput">
+ <tp:docstring>
+ <p>
+ TODO
+ </p>
+ </tp:docstring>
+ <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
+ <arg type="b" name="timing_output" direction="out">
+ <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value="" />
+ </arg>
+ </method>
+
+ <method name="setTimingPanRate">
+ <tp:docstring>
+ <p>
+ TODO
+ </p>
+ </tp:docstring>
+ <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
+ <arg type="i" name="timing_pan_rate" direction="in" />
+ </method>
+
+ <method name="getTimingPanRate">
+ <tp:docstring>
+ <p>
+ TODO
+ </p>
+ </tp:docstring>
+ <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
+ <arg type="i" name="timing_pan_rate" direction="out">
+ <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value="" />
+ </arg>
+ </method>
+
+ <method name="setExitMagnifier">
+ <tp:docstring>
+ <p>
+ TODO
+ </p>
+ </tp:docstring>
+ <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
+ <arg type="b" name="exit_magnifier" direction="in" />
+ </method>
+
+ <method name="getExitMagnifier">
+ <tp:docstring>
+ <p>
+ TODO
+ </p>
+ </tp:docstring>
+ <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
+ <arg type="b" name="exit_magnifier" direction="out">
+ <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value="" />
</arg>
</method>
diff --git a/xml/spec.xml b/xml/spec.xml
deleted file mode 100644
index e2e9427..0000000
--- a/xml/spec.xml
+++ /dev/null
@@ -1,527 +0,0 @@
-<?xml version="1.0"?>
-<tp:spec xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0" xmlns:xi="http://www.w3.org/2001/XInclude">
-
-
-<tp:version>0.01</tp:version>
-
-<tp:docstring>
- Gnome Magnifier Interfaces and Subinterfaces
-</tp:docstring>
-
-<node name="/org/freedesktop/gnome/Magnifier">
- <interface name="org.freedesktop.gnome.Magnifier">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>
- Properties and methods of Magnifier instance.
- </p>
- </tp:docstring>
-
- <!--
- <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="impl_dbus_magnifier"/>
- -->
-
- <!--
- <property name="SourceDisplay" type="s" access="readwrite">
- <tp:docstring>
- <p>
- a string specifying the name of the display and screen
- (on X Windows systems, as used by XOpenDisplay) on which the "source"
- pixels (e.g. unmagnified image) are located.
- </p>
- </tp:docstring>
- </property>
-
- <property name="TargetDisplay" type="s" access="readwrite">
- <tp:docstring>
- <p>
- a string specifying the name of the display and screen
- onto which the magnified image is to be placed.
- </p>
- </tp:docstring>
- </property>
- -->
-
- <!--
- <method name="getProperties">
- <tp:docstring>
- <p>
- Get the current property settings for this Magnifier.
- Properties managed by the magnifier include "cursor-set",
- "cursor-size", "cursor-mag-factor", "target-display-bounds",
- "source-display-size".
- </p>
- </tp:docstring>
- <arg type="a{ss}" name="propertyBag-ret" direction="out">
- <tp:docstring>
- a DBUS_TYPE_G_STRING_STRING_HASHTABLE containing the Magnifier's
- properties.
- </tp:docstring>
- </arg>
- </method>
- -->
-
- <method name="fullScreenCapable">
- <tp:docstring>
- <p>
- Consult if the Magnifier can magnify in full-screen mode.
- </p>
- </tp:docstring>
- <arg type="b" name="b-ret" direction="out">
- <annotation name="org.freedesktop.DBus.GLib.ReturnVal" value=""/>
- <tp:docstring>TRUE if it can or FALSE otherwise.</tp:docstring>
- </arg>
- </method>
-
- <method name="hideCursor">
- <tp:docstring>
- <p>Hide the original cursor.</p>
- </tp:docstring>
- <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
- </method>
-
- <method name="showCursor">
- <tp:docstring>
- <p>Show the original cursor.</p>
- </tp:docstring>
- <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
- </method>
-
- <method name="supportColorblindFilters">
- <tp:docstring>
- <p>Consult if the Magnifier can apply colorblind image filters.</p>
- </tp:docstring>
- <arg type="b" name="b-ret" direction="out">
- <tp:docstring>TRUE if it can or FALSE otherwise.</tp:docstring>
- </arg>
- </method>
-
- <method name="createZoomRegion">
- <tp:docstring>
- <p>
- Create a new zoom region for the magnifier.
- The new region is initially 'unmanaged'; that is, it is not associated
- with a particular sub-region of the "source" display.
- </p>
- </tp:docstring>
- <arg type="d" name="zx" direction="in">
- <tp:docstring>
- the scale factor in the x direction for the new zoom region
- </tp:docstring>
- </arg>
- <arg type="d" name="zy" direction="in">
- <tp:docstring>
- the scale factor in the y direction for the new zoom region
- </tp:docstring>
- </arg>
- <arg type="ai" name="ROI" tp:type="RectBounds" direction="in">
- <tp:docstring>
- the initial ROI (region of interest) of the zoom region. RectBounds
- of negative width/height indicates that the zoom region has no
- initial ROI.
- </tp:docstring>
- </arg>
- </method>
-
- <method name="getZoomRegions">
- <tp:docstring>
- <p>
- Return a list of ZoomRegion's for this Magnifier.
- </p>
- </tp:docstring>
- <arg type="ao" name="zoomRegionList-ret" direction="out">
- <tp:docstring>
- ZoomRegionList including all currently defined ZoomRegions for this
- Magnifier instance.
- </tp:docstring>
- </arg>
- </method>
-
- <method name="addZoomRegion">
- <tp:docstring>
- <p>
- Add a new ZoomRegion to the list of currently defined ZoomRegions
- for this Magnifier instance.
- </p>
- </tp:docstring>
- <arg type="o" name="region" direction="in">
- <tp:docstring>ZoomRegion to add</tp:docstring>
- </arg>
- <arg type="b" name="b-ret" direction="out">
- <tp:docstring>
- returns True if successful, False if the ZoomRegion cannot be
- added.
- </tp:docstring>
- </arg>
- </method>
-
- <method name="clearAllZoomRegions">
- <tp:docstring>
- <p>
- Clears and destroys all currently defined zoom regions.
- </p>
- </tp:docstring>
- <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
- </method>
-
- <method name="dispose">
- <tp:docstring>
- <p>
- Unmap the current magnifier from the display, destroy its resources,
- and exit.
- </p>
- </tp:docstring>
- <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
- </method>
-
- </interface> <!-- org.freedesktop.gnome.Magnifier -->
-</node><!-- /org/freedesktop/gnome/Magnifier -->
-<node name="/org/freedesktop/gnome/Magnifier/ZoomRegion">
- <!-- Structures and enums for the Magnifier's ZoomRegion object -->
-
- <!-- struct Point -->
- <tp:struct name="Point">
- <tp:member type="i" tp:name="x"/>
- <tp:member type="i" tp:name="y"/>
- </tp:struct>
-
- <!-- struct RectBounds -->
- <tp:struct name="RectBounds">
- <tp:member type="i" tp:name="x1"/>
- <tp:member type="i" tp:name="x2"/>
- <tp:member type="i" tp:name="y1"/>
- <tp:member type="i" tp:name="y2"/>
- </tp:struct>
-
- <!-- Align Policy constants -->
- <tp:enum name="AlignPolicy" type="u">
- <tp:enumvalue suffix="ALIGN_CENTER"/>
- <tp:enumvalue suffix="ALIGN_MIN" value="1"/>
- <tp:enumvalue suffix="ALIGN_MAX" value="2"/>
- </tp:enum>
-
- <!-- Scrolling Policy constants -->
- <tp:enum name="ScrollingPolicy" type="u">
- <tp:enumvalue suffix="SCROLL_FASTEST"/>
- <tp:enumvalue suffix="SCROLL_FAST" value="1"/>
- <tp:enumvalue suffix="SCROLL_NORMAL" value="2"/>
- <tp:enumvalue suffix="SCROLL_SMOOTH" value="3"/>
- <tp:enumvalue suffix="SCROLL_SMOOTHEST" value="4"/>
- </tp:enum>
-
- <!-- Colourblind Filter constants -->
- <tp:enum name="ColorBlindFilter" type="u">
- <tp:enumvalue suffix="COLORBLIND_FILTER_T_NO_FILTER"/>
- <tp:enumvalue suffix="COLORBLIND_FILTER_T_SELECTIVE_SATURATE_RED" value="1"/>
- <tp:enumvalue suffix="COLORBLIND_FILTER_T_SELECTIVE_SATURATE_GREEN" value="2"/>
- <tp:enumvalue suffix="COLORBLIND_FILTER_T_SELECTIVE_SATURATE_BLUE" value="3"/>
- <tp:enumvalue suffix="COLORBLIND_FILTER_T_SELECTIVE_DESSATURATE_RED" value="4"/>
- <tp:enumvalue suffix="COLORBLIND_FILTER_T_SELECTIVE_DESSATURATE_GREEN" value="5"/>
- <tp:enumvalue suffix="COLORBLIND_FILTER_T_SELECTIVE_DESSATURATE_BLUE" value="6"/>
- <tp:enumvalue suffix="COLORBLIND_FILTER_T_HUE_SHIFT_POSITIVE" value="7"/>
- <tp:enumvalue suffix="COLORBLIND_FILTER_T_HUE_SHIFT_NEGATIVE" value="8"/>
- <tp:enumvalue suffix="COLORBLIND_FILTER_T_SELECTIVE_SATURATE" value="9"/>
- <tp:enumvalue suffix="COLORBLIND_FILTER_T_SELECTIVE_DESSATURATE" value="10"/>
- <tp:enumvalue suffix="COLORBLIND_FILTER_T_MONOCHRONE_OTHERS" value="11"/>
- </tp:enum>
-
- <!-- ZoomRegion object -->
- <interface name="org.freedesktop.gnome.Magnifier.ZoomRegion">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>
- Properties and methods of the Magnifier's ZoomRegion object
- </p>
- </tp:docstring>
-
- <method name="setMagFactor">
- <tp:docstring>
- <p>
- Set the current x and y magnification ratio. (Convenience method for
- setting mag-factor-x and mag-factor-y properties). Note that if the
- zoom region's target hasn't yet been realized or mapped to the
- display, we will not be able to detect failure, so a return of %TRUE
- must be taken on advisement if the operation is performed on a
- newly-created zoom region.
- </p>
- </tp:docstring>
- <arg type="d" name="magX" direction="in">
- <tp:docstring>
- the magnification factor in the x direction for the specified region.
- </tp:docstring>
- </arg>
- <arg type="d" name="magY" direction="in">
- <tp:docstring>
- the magnification factor in the x direction for the specified region.
- </tp:docstring>
- </arg>
- <arg type="b" name="b_ret" direction="out">
- <tp:docstring>
- TRUE if operation succeeded, FALSE if the requested mag factor cannot
- be set. Returned in the 'b_ret' arg.
- </tp:docstring>
- </arg>
- </method>
-
- <method name="getMagFactor">
- <tp:docstring>
- <p>
- Get the current x and y magnification ratios. (Convenience method for
- getting mag-factor-x and mag-factor-y properties).
- </p>
- </tp:docstring>
- <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
- <arg type="d" name="magX" direction="out">
- <tp:docstring>
- the magnification factor in the x direction for the specified region.
- </tp:docstring>
- </arg>
- <arg type="d" name="magY" direction="out">
- <tp:docstring>
- the magnification factor in the x direction for the specified region.
- </tp:docstring>
- </arg>
- </method>
-
- <!--
- <method name="getProperties">
- <tp:docstring>
- <p>
- Gets the current property settings for this ZoomRegion. Properties
- managed by the ZoomRegion include "smoothing-type", "contrast",
- "inverse-video", "border-size", "border-color", "x-alignment",
- "y-alignment", "is-managed", "viewport", "mag-factor-x",
- "mag-factor-y".
- </p>
- </tp:docstring>
- <arg type="a{ss}" name="propertyBag-ret" direction="out">
- <tp:docstring>
- Returns a DBUS_TYPE_G_STRING_STRING_HASHTABLE containing the
- ZoomRegion's properties.
- </tp:docstring>
- </arg>
- </method>
- -->
-
- <method name="setRoi">
- <tp:docstring>
- <p>
- Set the region of interest for the magnifier.
- </p>
- </tp:docstring>
- <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
- <arg type="(iiii)" name="Roi" tp:type="RectBounds" direction="in">
- <tp:docstring>
- the Roi (region of interest) bounding box
- </tp:docstring>
- </arg>
- </method>
-
- <method name="updatePointer">
- <tp:docstring>
- <p>
- Update the pointer image. \note This was added due the need to the
- Magnifier object signalize all ZoomRegion objects about a pointer
- image update.
- </p>
- </tp:docstring>
- <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
- </method>
-
- <method name="markDirty">
- <tp:docstring>
- <p>
- Mark the zoom region or a sub-region 'dirty' and in need of updating.
- /note This region will be clipped to the area currently visible in
- the target region.
- </p>
- </tp:docstring>
- <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
- <!-- note that 'dirtyRegion' is a RectBounds -->
- <arg type="(iiii)" name="dirtyRegion" tp:type="RectBounds" direction="in">
- <tp:docstring>
- the bounding box of the dirty region.
- </tp:docstring>
- </arg>
- </method>
-
- <method name="getRoi">
- <tp:docstring>
- <p>
- Query a specific zoom region for its Roi.
- </p>
- </tp:docstring>
- <arg type="(iiii)" name="Roi-ret" tp:type="RectBounds" direction="out">
- <tp:docstring>
- Returns the RectBounds bounding box of the zoom Roi.
- </tp:docstring>
- </arg>
- </method>
-
- <method name="moveResize">
- <tp:docstring>
- <p>
- Move and resize the specified zoom region on the target display.
- (Convenience method for setting "viewport" property).
- </p>
- </tp:docstring>
- <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
- <arg type="(iiii)" name="bounds" tp:type="RectBounds" direction="in">
- <tp:docstring>
- the bounding box, in target display coordinates, of the ZoomRegion's
- display viewport.
- </tp:docstring>
- </arg>
- </method>
-
- <method name="dispose">
- <tp:docstring>
- <p>
- Remove the specified zoom region from the magnifier and destroy it.
- </p>
- </tp:docstring>
- <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
- </method>
-
- <method name="setPointerPos">
- <tp:docstring>
- <p>
- Set the position where the mouse pointer is to be drawn
- in this zoom-region, in screen coordinates.
- </p>
- </tp:docstring>
- <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
- <arg type="i" name="mouse_x" direction="in">
- <tp:docstring>
- the x screen coordinate of the pointer hotspot
- </tp:docstring>
- </arg>
- <arg type="i" name="mouse_y" direction="in">
- <tp:docstring>
- the y screen coordinate of the pointer hotspot
- </tp:docstring>
- </arg>
- </method>
-
- <method name="setContrast">
- <tp:docstring>
- <p>
- Set the zoom region image contrast.
- Set the contrast applied to each image component (red, green and blue).
- The input for each component must be in the range -1 and 1, otherwise
- they will be clamped to this interval. The value -1 means reduce 100%
- the contrast, resulting in a gray image. The value 1 means increase
- 100% the contrast, resulting in the R, G and B values being black or
- white.
- The value 0 means no change in contrast.
- </p>
- </tp:docstring>
- <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
- <arg type="d" name="R" direction="in">
- <tp:docstring>
- the amount of red in the contrasted image
- </tp:docstring>
- </arg>
- <arg type="d" name="G" direction="in">
- <tp:docstring>
- the amount of green in the contrasted image
- </tp:docstring>
- </arg>
- <arg type="d" name="B" direction="in">
- <tp:docstring>
- the amount of blue in the contrasted image
- </tp:docstring>
- </arg>
- </method>
-
- <method name="getContrast">
- <tp:docstring>
- <p>
- Get the zoom region image contrast.
- Get the contrast applied to each image component (red, green and blue).
- </p>
- </tp:docstring>
- <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
- <arg type="d" name="R" direction="out">
- <tp:docstring>
- the amount of red in the contrasted image
- </tp:docstring>
- </arg>
- <arg type="d" name="G" direction="out">
- <tp:docstring>
- the amount of green in the contrasted image
- </tp:docstring>
- </arg>
- <arg type="d" name="B" direction="out">
- <tp:docstring>
- the amount of blue in the contrasted image
- </tp:docstring>
- </arg>
- </method>
-
- <method name="setBrightness">
- <tp:docstring>
- <p>
- Set the zoom region image brightness.
- Set the brightness applied to each image component (reg, green and
- blue). The input for each component must be in the range between -1
- and 1, if the are bigger or lower then this range, the value will be
- clamped to the interval. The value -1 means reduce 100% the
- brightness, resulting in a black image. The value 1 means increase
- 100% the brightness, resulting in a white image.
- </p>
- </tp:docstring>
- <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
- <arg type="d" name="R" direction="in">
- <tp:docstring>
- the brightness applied to the red component.
- </tp:docstring>
- </arg>
- <arg type="d" name="G" direction="in">
- <tp:docstring>
- the brightness applied to the green component.
- </tp:docstring>
- </arg>
- <arg type="d" name="B" direction="in">
- <tp:docstring>
- the brightness applied to the blue component.
- </tp:docstring>
- </arg>
- </method>
-
- <!--
- Get the zoom region image brightness.
- Get the brightness applied to each image component (red, green and
- blue).
- @param R the brightness applied to the red component.
- @param G the brightness applied to the green component.
- @param B the brightness applied to the blue component.
- -->
- <method name="getBrightness">
- <tp:docstring>
- <p>
- Get the zoom region image brightness.
- Get the brightness applied to each image component (red, green and
- blue).
- </p>
- </tp:docstring>
- <annotation name="org.freedesktop.DBus.GLib.NoReply" value="true"/>
- <arg type="d" name="R" direction="out">
- <tp:docstring>
- the brightness applied to the red component.
- </tp:docstring>
- </arg>
- <arg type="d" name="G" direction="out">
- <tp:docstring>
- the brightness applied to the green component.
- </tp:docstring>
- </arg>
- <arg type="d" name="B" direction="out">
- <tp:docstring>
- the brightness applied to the blue component.
- </tp:docstring>
- </arg>
- </method>
-
- </interface> <!-- org.freedesktop.gnome.Magnifier.ZoomRegion -->
-</node><!-- /org/freedesktop/gnome/Magnifier/ZoomRegion -->
-
-</tp:spec>