# zoom-region.h

Go to the documentation of this file.

    00001 /*
    00002  * AT-SPI - Assistive Technology Service Provider Interface
    00003  * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
    00004  *
    00005  * Copyright 2001 Sun Microsystems Inc.
    00006  *
    00007  * This library is free software; you can redistribute it and/or
    00008  * modify it under the terms of the GNU Library General Public
    00009  * License as published by the Free Software Foundation; either
    00010  * version 2 of the License, or (at your option) any later version.
    00011  *
    00012  * This library is distributed in the hope that it will be useful,
    00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00015  * Library General Public License for more details.
    00016  *
    00017  * You should have received a copy of the GNU Library General Public
    00018  * License along with this library; if not, write to the
    00019  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00020  * Boston, MA 02111-1307, USA.
    00021  */
    00022
    00023 #ifndef ZOOM_REGION_H_
    00024 #define ZOOM_REGION_H_
    00025
    00026
    00027 #ifdef __cplusplus
    00028 extern "C" {
    00029 #endif /* __cplusplus */
    00030
    00031 #include <bonobo/bonobo-object.h>
    00032 #include "GNOME_Magnifier.h"
    00033
    00034 #define ZOOM_REGION_TYPE         (zoom_region_get_type ())
    00035 #define ZOOM_REGION(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), ZOOM_REGION_TYPE, ZoomRegion))
    00036 #define ZOOM_REGION_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), ZOOM_REGION_TYPE, ZoomRegionClass))
    00037 #define IS_ZOOM_REGION(o)        (G_TYPE_CHECK__INSTANCE_TYPE ((o), ZOOM_REGION_TYPE))
    00038 #define IS_ZOOM_REGION_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), ZOOM_REGION_TYPE))
    00039 #define ZOOM_REGION_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), ZOOM_REGION_TYPE, ZoomRegionClass))
    00040
    00041 typedef GList * (*CoalesceFunc)(GList *, int);
    00042
    00043 typedef struct _ZoomRegionPrivate ZoomRegionPrivate;
    00044
    00045 typedef struct {
    00046         BonoboObject parent;
    00047         BonoboPropertyBag *properties;
    00048         gboolean invert;
    00049         gboolean is_managed;
    00050         gboolean draw_cursor;
    00051         gboolean cache_source;
    00052         gchar *smoothing;
    00053         gchar *object_path;
    00054         gfloat contrast;
    00055         gdouble xscale;
    00056         gdouble yscale;
    00057         gdouble contrast_r;
    00058         gdouble contrast_g;
    00059         gdouble contrast_b;
    00060         gdouble bright_r;
    00061         gdouble bright_g;
    00062         gdouble bright_b;
    00063         gint border_size_top;
    00064         gint border_size_left;
    00065         gint border_size_right;
    00066         gint border_size_bottom;
    00067         guint32 border_color; /* A-RGB, 8 bits each, MSB==alpha */
    00068         gint x_align_policy;  /* TODO: enums here */
    00069         gint y_align_policy;
    00070         GNOME_Magnifier_ZoomRegion_ScrollingPolicy smooth_scroll_policy;
    00071         GNOME_Magnifier_ZoomRegion_ColorBlindFilter color_blind_filter;
    00072         /* bounds of viewport, in target magnifier window coords */
    00073         GNOME_Magnifier_RectBounds roi;
    00074         GNOME_Magnifier_RectBounds viewport;
    00075         ZoomRegionPrivate *priv;
    00076         CoalesceFunc coalesce_func;
    00077         gint timing_iterations;
    00078         gboolean timing_output;
    00079         gint timing_pan_rate;
    00080         gboolean exit_magnifier;
    00081         gboolean poll_mouse;
    00082 #ifdef ZOOM_REGION_DEBUG
    00083         gboolean alive;
    00084 #endif
    00085 } ZoomRegion;
    00086
    00087 typedef struct {
    00088         BonoboObjectClass                    parent_class;
    00089         POA_GNOME_Magnifier_ZoomRegion__epv  epv;
    00090         DBusGConnection                     *connection;
    00091 } ZoomRegionClass;
    00092
    00093 GType     zoom_region_get_type (void);
    00094 ZoomRegion *zoom_region_new     (void);
    00095
    00096 /* D-BUS methods */
    00097 gboolean        impl_dbus_zoom_region_set_mag_factor (ZoomRegion *zoom_region, const gdouble mag_factor_x,
    00098                         const gdouble mag_factor_y);
    00099 GArray*         impl_dbus_zoom_region_get_mag_factor (ZoomRegion *zoom_region);
    00100 gboolean        impl_dbus_zoom_region_set_roi (ZoomRegion *zoom_region, const gint32 **roi);
    00101 gboolean        impl_dbus_zoom_region_update_pointer (ZoomRegion *zoom_region);
    00102 gboolean        impl_dbus_zoom_region_mark_dirty (ZoomRegion *zoom_region, gint32 **bounds);
    00103 GArray*         impl_dbus_zoom_region_get_roi (ZoomRegion *zoom_region);
    00104 gboolean        impl_dbus_zoom_region_move_resize (ZoomRegion *zoom_region, const gint32 **viewport);
    00105 gboolean        impl_dbus_zoom_region_dispose (ZoomRegion *zoom_region);
    00106 gboolean        impl_dbus_zoom_region_set_pointer_pos (ZoomRegion *zoom_region, gint32 mouse_x, gint32 mouse_y);
    00107 gboolean        impl_dbus_zoom_region_set_contrast (ZoomRegion *zoom_region, gdouble R, gdouble G, gdouble B);
    00108 GArray*         impl_dbus_zoom_region_get_contrast (ZoomRegion *zoom_region);
    00109 gboolean        impl_dbus_zoom_region_set_brightness (ZoomRegion *zoom_region, gdouble R, gdouble G, gdouble B);
    00110 GArray*         impl_dbus_zoom_region_get_brightness (ZoomRegion *zoom_region);
    00111 gboolean        impl_dbus_zoom_region_set_managed (ZoomRegion *zoom_region, gboolean managed);
    00112 gboolean        impl_dbus_zoom_region_get_managed (ZoomRegion *zoom_region);
    00113 gboolean        impl_dbus_zoom_region_set_poll_mouse (ZoomRegion *zoom_region, gboolean poll_mouse);
    00114 gboolean        impl_dbus_zoom_region_get_poll_mouse (ZoomRegion *zoom_region);
    00115 gboolean        impl_dbus_zoom_region_set_draw_cursor (ZoomRegion *zoom_region, gboolean draw_cursor);
    00116 gboolean        impl_dbus_zoom_region_get_draw_cursor (ZoomRegion *zoom_region);
    00117 gboolean        impl_dbus_zoom_region_set_invert (ZoomRegion *zoom_region, gboolean invert);
    00118 gboolean        impl_dbus_zoom_region_get_invert (ZoomRegion *zoom_region);
    00119 gboolean        impl_dbus_zoom_region_set_smoothscroll (ZoomRegion *zoom_region, gshort smoothscroll);
    00120 gshort          impl_dbus_zoom_region_get_smoothscroll (ZoomRegion *zoom_region);
    00121 gboolean        impl_dbus_zoom_region_set_colorblind (ZoomRegion *zoom_region, gshort colorblind);
    00122 gshort          impl_dbus_zoom_region_get_colorblind (ZoomRegion *zoom_region);
    00123 gboolean        impl_dbus_zoom_region_set_smoothing (ZoomRegion *zoom_region, gchar *smoothing);
    00124 gchar*          impl_dbus_zoom_region_get_smoothing (ZoomRegion *zoom_region);
    00125 gboolean        impl_dbus_zoom_region_set_testpattern (ZoomRegion *zoom_region, gboolean test);
    00126 gboolean        impl_dbus_zoom_region_get_testpattern (ZoomRegion *zoom_region);
    00127 gboolean        impl_dbus_zoom_region_set_bordersizes (ZoomRegion *zoom_region, gint32 **bordersizes);
    00128 GArray*         impl_dbus_zoom_region_get_bordersizes (ZoomRegion *zoom_region);
    00129 gboolean        impl_dbus_zoom_region_set_bordercolor (ZoomRegion *zoom_region, guint32 bordercolor);
    00130 guint32         impl_dbus_zoom_region_get_bordercolor (ZoomRegion *zoom_region);
    00131 gboolean        impl_dbus_zoom_region_set_xalign (ZoomRegion *zoom_region, gint32 align);
    00132 gint32          impl_dbus_zoom_region_get_xalign (ZoomRegion *zoom_region);
    00133 gboolean        impl_dbus_zoom_region_set_yalign (ZoomRegion *zoom_region, gint32 align);
    00134 gint32          impl_dbus_zoom_region_get_yalign (ZoomRegion *zoom_region);
    00135 gboolean        impl_dbus_zoom_region_set_viewport (ZoomRegion *zoom_region, gint32 **viewport);
    00136 GArray*         impl_dbus_zoom_region_get_viewport (ZoomRegion *zoom_region);
    00137 gboolean        impl_dbus_zoom_region_set_timing_test (ZoomRegion *zoom_region, gint32 timing_iterations);
    00138 gint32          impl_dbus_zoom_region_get_timing_test (ZoomRegion *zoom_region);
    00139 gboolean        impl_dbus_zoom_region_set_timing_output (ZoomRegion *zoom_region, gboolean timing_output);
    00140 gboolean        impl_dbus_zoom_region_get_timing_output (ZoomRegion *zoom_region);
    00141 gboolean        impl_dbus_zoom_region_set_timing_pan_rate (ZoomRegion *zoom_region, gint32 timing_pan_rate);
    00142 gint32          impl_dbus_zoom_region_get_timing_pan_rate (ZoomRegion *zoom_region);
    00143 gboolean        impl_dbus_zoom_region_set_exit_magnifier (ZoomRegion *zoom_region, gboolean exit_magnifier);
    00144 gboolean        impl_dbus_zoom_region_get_exit_magnifier (ZoomRegion *zoom_region);
    00145
    00146 #ifdef __cplusplus
    00147 }
    00148 #endif /* __cplusplus */
    00149
    00150 #endif /* ZOOM_REGION_H_ */