Re: [g-a-devel]gnome-mag IDL



On Mon, 2002-09-16 at 12:18, Bill Haneman wrote:
> Hi:
> 
> In response to some requests from the BAUM team regarding gnopernicus
> magnification needs, we are drafting some new/revised IDL for gnome-mag.

Here is my first go at the new gnome-mag IDL.  Major changes:

* ZoomRegions are now objects in their own right, and methods have been
moved to the ZoomRegion API where appropriate, to avoid the use of the
"int" parameter specifying which ZoomRegion a method applies to.

* Magnifier and ZoomRegion now have getProperties(), which returns a
Bonobo::PropertyBag.

* properties now covered by the PropertyBag interface include the old
property "is-managed" (formerly markUnmanaged).

[We might want to move Magnifier::sourceDisplay and
Magnifier::targetDisplay to the PropertyBag set also.]

A number of new properties concerning the cursor, display
contrast/inverse-video/etc, and zoom region alignment and borders are
slated for control via the PropertyBag properties (see the inline
comments below).

Feedback is welcome...

best regards,

-Bill



/* 
 * AT-SPI - Assistive Technology Service Provider Interface 
 * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
 *
 * Copyright 2001 Sun Microsystems Inc.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */

#ifndef _GNOME_MAGNIFIER_IDL
#define _GNOME_MAGNIFIER_IDL

#include <Bonobo_Unknown.idl>

module GNOME {
  
  interface Magnifier : Bonobo::Unknown {

    /**
     * #attribute SourceDisplay: a @string containing the X display name
     *                            containing the region to be magnified.
     **/
    attribute string SourceDisplay;

    /**
     * #attribute TargetDisplay: a @string containing the X display name
     *                           where the magnifier pixels are to be displayed.
     **/
    attribute string TargetDisplay;

    /**
     * PropertyBag getProperties: gets the current property settings for this Magnifier.
     * Properties managed by the magnifier include "cursor-set", "cursor-size", 
     * "cursor-mag-factor"
     * returns: a Bonobo::PropertyBag containing the Magnifier's properties.
     **/
    PropertyBag getProperties ();

    /**
     * boolean getSourceDisplaySize:
     * Return the size of the specified source display.
     * @x1: the minimum X coordinate of the zoomed area bounding box
     * @x2: the maximum X coordinate of the zoomed area bounding box
     * @y1: the minimum Y coordinate of the zoomed area bounding box
     * @y2: the maximum Y coordinate of the zoomed area bounding box
     **/
    boolean getSourceDisplaySize (out long x1, out long y1, 
				  out long x2, out long y2); 

    /**
     * boolean getTargetDisplaySize:
     * Return the size of the specified target display.
     * @x1: the minimum X coordinate of the zoomed area bounding box
     * @x2: the maximum X coordinate of the zoomed area bounding box
     * @y1: the minimum Y coordinate of the zoomed area bounding box
     * @y2: the maximum Y coordinate of the zoomed area bounding box
     **/
    boolean getTargetDisplaySize (out long x1, out long y1, 
				  out long x2, out long y2); 

    /**
     * short createZoomRegion:
     * Creates a new zoom region for the magnifier.
     * The new region is initially unmanaged'.
     * @zx: the scale factor in the x direction for the new zoom region
     * @zy: the scale factor in the y direction for the new zoom region
     * @x1: the minimum X coordinate of the zoomed area bounding box
     * @x2: the maximum X coordinate of the zoomed area bounding box
     * @y1: the minimum Y coordinate of the zoomed area bounding box
     * @y2: the maximum Y coordinate of the zoomed area bounding box
     **/
    short createZoomRegion (in float zx, in float zy,
			    in long x1, in long y1, 
			    in long x2, in long y2); 

    /** 
     * void clearAllZoomRegions: 
     * Clears and destroys all currently defined zoom regions.
     **/
    void clearAllZoomRegions ();

    /** 
     * void exit: 
     * Unmap the current magnifier from the display.
     **/
    void exit ();

  };

  interface ZoomRegion : Bonobo::Unknown {

    /**
     * void setMagFactor: sets the current x and y magnification ratio.
     * @magX: the magnification factor in the x direction for the specified region. 
     * @magY: the magnification factor in the x direction for the specified region. 
     **/
    void setMagFactor (in float magX, in float magY);

    /**
     * void getMagFactor: gets the current x and y magnification ratios.
     * @magX: the magnification factor in the x direction for the specified region. 
     * @magY: the magnification factor in the x direction for the specified region. 
     **/
    void getMagFactor (out float magX, out float magY);


    /**
     * PropertyBag getProperties: 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".
     * returns: a Bonobo::PropertyBag containing the ZoomRegion's properties.
     **/
    PropertyBag getProperties ();

    /**
     * oneway void setROI:
     * Sets the region of interest for the magnifier.
     * @x1: the minimum X coordinate of the ROI bounding box
     * @x2: the maximum X coordinate of the ROI bounding box
     * @y1: the minimum Y coordinate of the ROI bounding box
     * @y2: the maximum Y coordinate of the ROI bounding box
     **/
    oneway void setROI (in long x1, in long y1, in long x2, in long y2);

    /**
     * oneway void setROI:
     * Sets the region of interest for the zoom region.
     * If the zoom region was previously 'unmanaged', this associates
     * it with the ROI.
     * @x1: the minimum X coordinate of the ROI bounding box
     * @x2: the maximum X coordinate of the ROI bounding box
     * @y1: the minimum Y coordinate of the ROI bounding box
     * @y2: the maximum Y coordinate of the ROI bounding box
     **/
    void markDirty (in long x1, in long y1, in long x2, in long y2); 

    /**
     * boolean getBounds:
     * Queries a specific zoom region for its parameters.
     * returns: FALSE if the specified zoom region does not exist.
     * @zx: the scale factor in the x direction for the new zoom region
     * @zy: the scale factor in the y direction for the new zoom region
     * @x1: the minimum X coordinate of the zoomed area bounding box
     * @x2: the maximum X coordinate of the zoomed area bounding box
     * @y1: the minimum Y coordinate of the zoomed area bounding box
     * @y2: the maximum Y coordinate of the zoomed area bounding box
     **/
    boolean getBounds (out long x1,  out long y1,
		       out long x2,  out long y2); 

    /**
     * void resizeZoomRegion:
     * Resizes the specified zoom region on the target display.
     * @x1: the minimum X coordinate of the zoomed area bounding box
     * @x2: the maximum X coordinate of the zoomed area bounding box
     * @y1: the minimum Y coordinate of the zoomed area bounding box
     * @y2: the maximum Y coordinate of the zoomed area bounding box
     **/
    void resizeZoomRegion (in long x1, in long y1, 
			   in long x2, in long y2);

    /** 
     * void destroyZoomRegion:
     * Remove the specified zoom region from the magnifier.
     **/
    void destroyZoomRegion ();

  };
};

#endif



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]