- Main Page
- Modules
- Files
- Related Pages

# g2_X11_P.h

    00001 /*****************************************************************************
    00002 **  Copyright (C) 1998-2001  Ljubomir Milanovic & Horst Wagner
    00003 **  This file is part of the g2 library
    00004 **
    00005 **  This library is free software; you can redistribute it and/or
    00006 **  modify it under the terms of the GNU Lesser General Public
    00007 **  License as published by the Free Software Foundation; either
    00008 **  version 2.1 of the License, or (at your option) any later version.
    00009 **
    00010 **  This library is distributed in the hope that it will be useful,
    00011 **  but WITHOUT ANY WARRANTY; without even the implied warranty of
    00012 **  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00013 **  Lesser General Public License for more details.
    00014 **
    00015 **  You should have received a copy of the GNU Lesser General Public
    00016 **  License along with this library; if not, write to the Free Software
    00017 **  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    00018 ******************************************************************************/
    00019 #ifndef _G2_X11_P_H
    00020 #define _G2_X11_P_H
    00021
    00022 #include <X11/Xlib.h>
    00023
    00024 #include "g2.h"
    00025
    00026 typedef struct {
    00027     Display     *display;
    00028     Window      window;
    00029     Window      root;
    00030     Colormap    colormap;
    00031     GC          gc;
    00032     Drawable    dest;
    00033     Pixmap      backing_pixmap;
    00034
    00035
    00036     unsigned long  *inks;                         /* allocated colors*/
    00037     int            NofInks;                       /* N of allocated colors */
    00038     int            width;                         /* window dimensions */
    00039     int            height;
    00040     int            background;
    00041 } g2_X11_device;
    00042
    00043
    00044 int g2_X11_init_X11X(int pid, int width, int height,
    00045                      int xposition, int yposition,
    00046                      char *window_name, char *icon_name,
    00047                      char *icon_data,
    00048                      unsigned int icon_width, unsigned int icon_height);
    00049 int g2_X11_delete(int pid, void *pdp);
    00050 int g2_X11_clear(int pid, void *pdp);
    00051 int g2_X11_flush(int pid, void *pdp);
    00052 int g2_X11_ink(int pid, void *pdp,
    00053                double red, double green, double blue);
    00054 int g2_X11_clear_palette(int pid, void *pdp);
    00055 int g2_X11_reset_palette(int pid, void *pdp);
    00056 int g2_X11_set_background(int pid, void *pdp, int color);
    00057 int g2_X11_pen(int pid, void *pdp, int color);
    00058 int g2_X11_paper(int pid, void *pdp, int color);
    00059 int g2_X11_set_line_width(int pid, void *pdp, int w);
    00060 int g2_X11_set_dash(int pid, void *pdp, int n, int *data);
    00061 int g2_X11_set_font_size(int pid, void *pdp, int size);
    00062 int g2_X11_plot(int pid, void *pdp, int x, int y);
    00063 int g2_X11_line(int pid, void *pdp, int x1, int y1, int x2, int y2);
    00064 int g2_X11_poly_line(int pid, void *pdp, int N, int *p);
    00065 int g2_X11_polygon(int pid, void *pdp, int N, int *p);
    00066 int g2_X11_filled_polygon(int pid, void *pdp, int N, int *p);
    00067 int g2_X11_triangle(int pid, void *pdp,
    00068                     int x1, int y1,
    00069                     int x2, int y2,
    00070                     int x3, int y3);
    00071 int g2_X11_filled_triangle(int pid, void *pdp, int x1, int y1,
    00072                            int x2, int y2,
    00073                            int x3, int y3);
    00074 int g2_X11_rectangle(int pid, void *pdp, int x1, int y1, int x2, int y2);
    00075 int g2_X11_filled_rectangle(int pid, void *pdp,
    00076                             int x1, int y1, int x2, int y2);
    00077 int g2_X11_arc(int pid, void *pdp, int x, int y,
    00078                int r1, int r2, double a1, double a2);
    00079 int g2_X11_filled_arc(int pid, void *pdp, int x, int y,
    00080                       int r1, int r2, double a1, double a2);
    00081 int g2_X11_ellipse(int pid, void *pdp, int x, int y, int r1, int r2);
    00082 int g2_X11_filled_ellipse(int pid, void *pdp, int x, int y, int r1, int r2);
    00083 int g2_X11_draw_string(int pid, void *pdp, int x, int y, const char *text);
    00084 int g2_X11_image(int pid, void *pdp,
    00085                  int x, int y, int width, int height, int *pen_array);
    00086 int g2_X11_query_pointer(int pid, void *pdp,
    00087                          int *x, int *y, unsigned int *button);
    00088 int g2_X11_get_pd_handles(int pid, void *pdp, void *handles[G2_PD_HANDLES_SIZE]);
    00089
    00090 #endif /* _G2_X11_P_H */