Magnification: This page provides magnifier information related to GNOME Accessibility. |
Magnification in GnomeShell
Overiew
Magnification is an adaptive technology used primarily by persons with poor vision. It is currently offered through GnomeMag. GnomeMag is a CORBA service that any desktop application can call upon to magnify and otherwise enhance the desktop. CORBA is being deprecated in favour of D-Bus. There are two ways to proceed to insure that magnification remains available. One of these is to replace the current CORBA-based GnomeMag with a D-Bus version.
Another promising approach is to build magnifier functionality into GnomeShell. This has some advantages:
GnomeShell is (has) a compositing manager, and magnification can the thought of as a kind of compositing. This also opens the door to other graphics manipulations that may benefit users with low vision.
Magnifier functions can still be offered as a desktop service by using GObject Introspection to publish, via D-bus, important functions that other applications may wish to use. A obvious candidate is Orca.
This page is about a magnifier for the Gnome desktop built into GnomeShell.
Current Status
This version of the magnifier is in its infancy. The latest patch to GnomeShell can be found in bugzilla at 595507. The newest improvement is an option for the magnified view to overlay the mouse and follow the mouse as it moves around the screen. The mouse is in the centre of the magnified view. The experience is similar to moving a magnifying glass over the screen.
There is a very preliminary preferences UI. Magnifier functions yet to be connected to the preferences UI can be invoked by dropping into the GnomeShell debugger and invoking them there.
The preferences UI supports:
- toggling show/hide of the magnifier view.
- adjusting the magnification factor (a slider ranging from 1x - 10x).
- setting the position of the magnified view (e.g., top half of screen).
- toggling whether the magnified view overlays the mouse.
Features
- Magnified view optionally positioned to the:
- top half of the screen,
- bottom half,
- left half,
- right half,
- full screen, or
- a smaller view scaled to the size of the screen in the bottom left hand corner.
- Magnification tracks mouse position. As the user moves the mouse, the magnified view scrolls such that the point under the mouse is centred within the magnified view.
- "Magnified" mouse cursor. A large mouse cursor is shown within the magnified view to show what the mouse is over.
- currently, only one cursor is supported, namely, the arrow cursor.
- Magnified view optionally overlays the mouse and acts like a movable lens.
- Preliminary DBus support for a 'org.gnome.Shell.Magnifier' service.
The magnifier is a property of the shell's global object: global.magnifier. It offers these functions:
setActive (true|false);
isActive();
set|getMagFactor();
set|getSize();
set|getPosition();
set|getScreenPosition();
- possibilities include top half of screen, bottom half, left half, right half, full screen, and smaller view scaled to size of screen.
setFullScreenMode();
isFullScreenMode();
resetFullScreenMode();
- reset the magnified view to the size it had before full screen mode was put into effect.
scrollToPosition();
- general function to move the given coordinate to the the center of the magnified view.
- optionally hides the magnified version of the mouse cursor image.
scrollToMousePos();
- scroll the magnified view such that its centre is what is currently under the mouse.
setMouseCursor();
- sets the image used to represent the mouse cursor in the magnified view.
set|isOverlayMouse();
- magnifier behaves as a movable magnifying glass.
start|stop|isTrackingMouse();
- start/stop and check if the magnified view is updated as the mouse moves. If the magnifier is tracking the mouse position, the center of the magnified view is the contents under the mouse.
getROI();
return a rectangle that is the region of the desktop magnified and shown in the mangified view. The rectangle is returned as an array: [top, left, width, height].
D-Bus
The magnifier is published as a dbus service, namely "org.gnome.Shell.Magnifier". At present, the only method supported is:
shiftContentsTo (x, y)
given a desktop coordinate (non-magnified space), this is a relay to Magnifier.scrollContentsTo(), explicitly hiding the magnified mouse cursor image. The result is the contents of the magnified view are centered on the given point.
getROI()
return the region of the desktop as a dbus.Struct(dbus.Int32, dbus.Int32, dbus.Int32, dbus.Int32) representing the top, left, width, and height of the part of the desktop visible in the magnified view.
Future Directions
The next steps, in no particular order, are:
- True magnification of the current mouse cursor within the magnified view. That is, the magnified mouse cursor changes in concert with the actual mouse pointer.
- Magnification follows focus. As the user moves keyboard focus, the focused window, menu item, button, in short, the focussed widget is placed in the centre of the magnified view.
Publish more of the magnifier functions through D-Bus so that other applications, such as Orca, can make use of them.
- Fancier graphic manipulations, such as font changes, colour changes, and/or lens effects that may enhance the user experience.

