# magnifier-main.c File Reference

`#include "config.h"`
`#include "magnifier.h"`
`#include "GNOME_Magnifier.h"`
`#include <glib.h>`
`#include <gdk/gdk.h>`
`#include <bonobo/bonobo-object.h>`
`#include <bonobo/bonobo-property-bag.h>`
`#include <login-helper/login-helper.h>`
`#include <dbus/dbus-glib.h>`
`#include <gtk/gtk.h>`
`#include "gmag-graphical-server.h"`
`#include <unistd.h>`
`#include <string.h>`
`#include <stdlib.h>`
`#include <sys/time.h>`
`#include <gdk/gdkx.h>`
`#include <libbonobo.h>`

Go to the source code of this file.

## Data Structures
struct | MagnifierOptions
## Defines
#define | ENV_STRING_MAX_SIZE 128
## Functions
static void | init_rect_bounds (GNOME_Magnifier_RectBounds *bounds, long x1, long y1, long x2, long y2)
static int | magnifier_main_test_image (gpointer data)
static int | magnifier_main_pan_image (gpointer data)
static int | magnifier_main_refresh_all (gpointer data)
int | main (int argc, char **argv)
## Variables
GNOME_Magnifier_ZoomRegion | zoom_region
static MagnifierOptions | global_options
static GOptionEntry | magnifier_options []
static int | target_width
static int | target_height
static int | last_x = 0
static int | last_y = 0

## Define Documentation

#define ENV_STRING_MAX_SIZE 128

Definition at line 42 of file magnifier-main.c.

## Function Documentation

static void init_rect_bounds | ( | GNOME_Magnifier_RectBounds * | bounds,
|  | long | x1,
|  | long | y1,
|  | long | x2,
|  | long | y2 |
| ) |  |  | `[static]`

Definition at line 159 of file magnifier-main.c.

References GNOME_Magnifier_RectBounds_type::x1, GNOME_Magnifier_RectBounds_type::x2, GNOME_Magnifier_RectBounds_type::y1, and GNOME_Magnifier_RectBounds_type::y2.

Referenced by main().

static int magnifier_main_test_image | ( | gpointer | data | ) | `[static]`

Definition at line 171 of file magnifier-main.c.

References CORBA_sequence_CORBA_Object::_buffer, CORBA_sequence_CORBA_Object::_length, _MagnifierPrivate::cursor_x, _MagnifierPrivate::cursor_y, GNOME_Magnifier_Magnifier_getZoomRegions(), GNOME_Magnifier_ZoomRegion_getProperties(), GNOME_Magnifier_ZoomRegion_setROI(), MagnifierOptions::horizontal_split, IS_MAGNIFIER, Magnifier::priv, target_height, target_width, MagnifierOptions::timing_delta_x, MagnifierOptions::timing_delta_y, MagnifierOptions::timing_iterations, GNOME_Magnifier_RectBounds_type::x1, GNOME_Magnifier_RectBounds_type::x2, GNOME_Magnifier_RectBounds_type::y1, GNOME_Magnifier_RectBounds_type::y2, MagnifierOptions::zoom_factor, and zoom_region.

Referenced by main().

static int magnifier_main_pan_image | ( | gpointer | data | ) | `[static]`

Definition at line 260 of file magnifier-main.c.

References CORBA_sequence_CORBA_Object::_buffer, CORBA_sequence_CORBA_Object::_length, GNOME_Magnifier_Magnifier_getZoomRegions(), GNOME_Magnifier_ZoomRegion_setROI(), IS_MAGNIFIER, last_x, last_y, magnifier_get_root(), MagnifierOptions::mouse_follow, Magnifier::target_bounds, GNOME_Magnifier_RectBounds_type::x1, GNOME_Magnifier_RectBounds_type::x2, GNOME_Magnifier_RectBounds_type::y1, GNOME_Magnifier_RectBounds_type::y2, and zoom_region.

Referenced by main().

static int magnifier_main_refresh_all | ( | gpointer | data | ) | `[static]`

Definition at line 321 of file magnifier-main.c.

References CORBA_sequence_CORBA_Object::_buffer, CORBA_sequence_CORBA_Object::_length, Bonobo_PropertyBag_getValue(), GNOME_Magnifier_Magnifier_getProperties(), GNOME_Magnifier_Magnifier_getZoomRegions(), GNOME_Magnifier_ZoomRegion_markDirty(), IS_MAGNIFIER, GNOME_Magnifier_RectBounds_type::x1, GNOME_Magnifier_RectBounds_type::x2, GNOME_Magnifier_RectBounds_type::y1, and GNOME_Magnifier_RectBounds_type::y2.

Referenced by main().

int main | ( | int | argc,
|  | char ** | argv |
| ) |  |  |

slight hack, we set $DISPLAY if --target-display is set. this is because I don't think GTK+ works well with across multiple servers yet.

Definition at line 368 of file magnifier-main.c.

References CORBA_sequence_CORBA_Object::_buffer, CORBA_sequence_CORBA_Object::_length, MagnifierOptions::border_color, MagnifierOptions::border_width, MagnifierOptions::cursor_color, MagnifierOptions::cursor_scale_factor, MagnifierOptions::cursor_set, MagnifierOptions::cursor_size, MagnifierOptions::fullscreen, GNOME_Magnifier_Magnifier_addZoomRegion(), GNOME_Magnifier_Magnifier_createZoomRegion(), GNOME_Magnifier_Magnifier_getProperties(), GNOME_Magnifier_Magnifier_getZoomRegions(), GNOME_Magnifier_RectBounds__alloc, GNOME_Magnifier_ZoomRegion_getProperties(), GNOME_Magnifier_ZoomRegion_SCROLL_FASTEST, GNOME_Magnifier_ZoomRegion_SCROLL_SMOOTHEST, GNOME_Magnifier_ZoomRegion_setROI(), MagnifierOptions::hide_pointer, MagnifierOptions::horizontal_split, MagnifierOptions::ignore_damage, init_rect_bounds(), MagnifierOptions::invert_image, MagnifierOptions::is_override_redirect, magnifier_main_pan_image(), magnifier_main_refresh_all(), magnifier_main_test_image(), magnifier_new(), magnifier_options, MagnifierOptions::mouse_poll_time, MagnifierOptions::print_version, MagnifierOptions::refresh_time, MagnifierOptions::show_crosswires, MagnifierOptions::smooth_scroll, MagnifierOptions::smoothing_type, Magnifier::source_display, MagnifierOptions::source_display, Magnifier::source_screen_num, Magnifier::target_display, MagnifierOptions::target_display, target_height, Magnifier::target_screen_num, target_width, TC_GNOME_Magnifier_RectBounds, MagnifierOptions::test_pattern, MagnifierOptions::timing_iterations, MagnifierOptions::timing_output, MagnifierOptions::timing_pan_rate, MagnifierOptions::vertical_split, GNOME_Magnifier_RectBounds_type::x1, GNOME_Magnifier_RectBounds_type::x2, GNOME_Magnifier_RectBounds_type::y1, GNOME_Magnifier_RectBounds_type::y2, MagnifierOptions::zoom_factor, and zoom_region.

## Variable Documentation

GNOME_Magnifier_ZoomRegion zoom_region

Definition at line 44 of file magnifier-main.c.

Referenced by gdk_timing_idle(), impl_dbus_magnifier_add_zoom_region(), impl_dbus_magnifier_create_zoom_region(), impl_dbus_magnifier_get_zoom_regions(), impl_magnifier_create_zoom_region(), impl_zoom_region_dispose(), impl_zoom_region_get_brightness(), impl_zoom_region_get_contrast(), impl_zoom_region_get_mag_factor(), impl_zoom_region_get_properties(), impl_zoom_region_get_roi(), impl_zoom_region_mark_dirty(), impl_zoom_region_move_resize(), impl_zoom_region_set_brightness(), impl_zoom_region_set_contrast(), impl_zoom_region_set_mag_factor(), impl_zoom_region_set_pointer_pos(), impl_zoom_region_set_roi(), impl_zoom_region_update_pointer(), magnifier_dbus_unref_zoom_region(), magnifier_main_pan_image(), magnifier_main_test_image(), magnifier_unref_zoom_region(), magnifier_zoom_regions_mark_dirty(), magnifier_zoom_regions_save(), magnifier_zoom_regions_update_pointer(), main(), zoom_region_dispose(), zoom_region_expose_handler(), zoom_region_finalize(), zoom_region_get_property(), zoom_region_pan_test(), zoom_region_process_pending(), zoom_region_process_updates(), zoom_region_set_property(), zoom_region_update_pointer_idle(), and zoom_region_update_pointer_timeout().

MagnifierOptions global_options`[static]`

Definition at line 84 of file magnifier-main.c.

GOptionEntry magnifier_options[]`[static]`

Definition at line 121 of file magnifier-main.c.

Referenced by main().

int target_width`[static]`

Definition at line 168 of file magnifier-main.c.

Referenced by magnifier_main_test_image(), and main().

int target_height`[static]`

Definition at line 168 of file magnifier-main.c.

Referenced by magnifier_main_test_image(), and main().

int last_x = 0`[static]`

Definition at line 257 of file magnifier-main.c.

Referenced by magnifier_main_pan_image().

int last_y = 0`[static]`

Definition at line 257 of file magnifier-main.c.

Referenced by magnifier_main_pan_image().