2 * AT-SPI - Assistive Technology Service Provider Interface
3 * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
5 * Copyright 2001 Sun Microsystems Inc.
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
23 #ifndef __MAGNIFIER_SPI_IMAGE_H__
24 #define __MAGNIFIER_SPI_IMAGE_H__
27 #include <sys/types.h>
28 #include <sys/socket.h>
36 #include <gdk-pixbuf/gdk-pixbuf.h>
37 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
40 typedef struct _point {
45 typedef struct xlib_colormap_struct xlib_colormap;
47 struct xlib_colormap_struct {
64 point center_position;
65 point curpos; /* Position of the magnified cursor */
67 GdkPixbuf* scaled_image;
68 Window spi_image_root_window;
72 xlib_colormap * x_cmap;
74 typedef struct _MagnifierData {
86 GtkWidget *output_window;
94 #define FOLLOW_MOUSE 3
95 #define COLOR_INVERTED 4
101 struct sockaddr_un mag_server;
102 struct sockaddr_un client_sockaddr;
105 GtkWidget *drawing_area;
107 void parse_message(char *msg, MagnifierData *data);
108 void update_image(MagnifierData *data);
109 void expose_event(GtkWidget * w, GdkEventExpose *event, gpointer data);
110 void get_root_image(Window src,GdkPixbuf *dest,int src_x, int src_y, MagnifierData *data);
111 int display_image(gpointer data);