1 #ifndef __MAGNIFIER_SPI_IMAGE_H__
2 #define __MAGNIFIER_SPI_IMAGE_H__
6 #include <sys/socket.h>
14 #include <gdk-pixbuf/gdk-pixbuf.h>
15 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
18 typedef struct _point {
23 typedef struct xlib_colormap_struct xlib_colormap;
25 struct xlib_colormap_struct {
32 point center_position;
33 point curpos; /* Position of the magnified cursor */
35 GdkPixbuf* scaled_image;
36 Window spi_image_root_window;
40 xlib_colormap * x_cmap;
42 typedef struct _MagnifierData {
54 GtkWidget *output_window;
61 #define FOLLOW_MOUSE 3
62 #define COLOR_INVERTED 4
68 struct sockaddr_un mag_server;
69 struct sockaddr_un client_sockaddr;
72 GtkWidget *drawing_area;
74 void parse_message(char *msg, MagnifierData *data);
75 void update_image(MagnifierData *data);
76 void expose_event(GtkWidget * w, GdkEventExpose *event, gpointer data);
77 void get_root_image(Window src,GdkPixbuf *dest,int src_x, int src_y, MagnifierData *data);
78 int display_image(gpointer data);