1 #ifndef __MAGNIFIER_IMAGE_H__
2 #define __MAGNIFIER_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 image_root_window;
40 xlib_colormap * x_cmap;
42 typedef struct _MagnifierData {
52 GtkWidget *output_window;
59 #define FOLLOW_MOUSE 3
60 #define COLOR_INVERTED 4
66 struct sockaddr_un mag_server;
67 struct sockaddr_un client_sockaddr;
70 GtkWidget *drawing_area;
72 void parse_message(char *msg, MagnifierData *data);
73 void update_image(MagnifierData *data);
74 void expose_event(GtkWidget * w, GdkEventExpose *event, gpointer data);
75 void get_root_image(Window src,GdkPixbuf *dest,int src_x, int src_y, MagnifierData *data);
76 int display_image(gpointer data);