~ubuntu-branches/ubuntu/hoary/kdemultimedia/hoary

« back to all changes in this revision

Viewing changes to kscd/kscdmagic/xlib.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin Schulze
  • Date: 2003-01-22 15:00:51 UTC
  • Revision ID: james.westby@ubuntu.com-20030122150051-uihwkdoxf15mi1tn
Tags: upstream-2.2.2
ImportĀ upstreamĀ versionĀ 2.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* 
 
2
 *     XaoS, a fast portable realtime fractal zoomer 
 
3
 *                  Copyright (C) 1996,1997 by
 
4
 *
 
5
 *      Jan Hubicka          (hubicka@paru.cas.cz)
 
6
 *      Thomas Marsh         (tmarsh@austin.ibm.com)
 
7
 *
 
8
 * This program is free software; you can redistribute it and/or modify
 
9
 * it under the terms of the GNU General Public License as published by
 
10
 * the Free Software Foundation; either version 2 of the License, or
 
11
 * (at your option) any later version.
 
12
 *
 
13
 * This program is distributed in the hope that it will be useful,
 
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
16
 * GNU General Public License for more details.
 
17
 *
 
18
 * You should have received a copy of the GNU General Public License
 
19
 * along with this program; if not, write to the Free Software
 
20
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
21
 */
 
22
#ifndef XAOS_X11_H
 
23
#define XAOS_X11_H
 
24
 
 
25
#include <X11/Xlib.h>
 
26
#include <X11/Xutil.h>
 
27
#include <X11/keysym.h>
 
28
#include <X11/keysymdef.h>
 
29
/*#include "config.h"*/
 
30
/*#define MITSHM*/
 
31
 
 
32
#ifdef MITSHM
 
33
#include <sys/types.h>
 
34
#include <sys/ipc.h>
 
35
#include <sys/shm.h>
 
36
#include <X11/extensions/XShm.h>
 
37
#endif                          /* MITSHM */
 
38
 
 
39
#ifdef n
 
40
#undef n
 
41
#endif
 
42
 
 
43
typedef struct {
 
44
    int n;
 
45
    XColor c[256];
 
46
} xcol_t;
 
47
 
 
48
typedef struct {
 
49
    int privatecolormap;
 
50
    int usedefault;
 
51
    int nomitshm;
 
52
} xlibparam;
 
53
 
 
54
typedef struct {
 
55
    Colormap colormap;
 
56
    Colormap defaultcolormap;
 
57
    int fixedcolormap;
 
58
    int privatecolormap;
 
59
    xlibparam *params;
 
60
    Display *display;
 
61
    Window parent_window;
 
62
    Window window;
 
63
    unsigned int width, height;
 
64
    unsigned int border_width;
 
65
    unsigned long background;
 
66
    int depth;
 
67
    unsigned int classX;
 
68
    Visual *visual;
 
69
    unsigned long valuemask;
 
70
    XSetWindowAttributes *attributes;
 
71
    unsigned long attr_mask;
 
72
    XSizeHints sizehints;
 
73
    int screen;
 
74
    const char *window_name;
 
75
    int status;
 
76
    GC gc;
 
77
    XGCValues xgcvalues;
 
78
    xcol_t xcolor;
 
79
    Pixmap pixmap;
 
80
    XFontStruct *font_struct;
 
81
    int screen_changed;
 
82
    int lastx, lasty;
 
83
    int mouse_x, mouse_y;
 
84
    unsigned int mouse_buttons;
 
85
    int current;
 
86
    XImage *image[2];
 
87
#ifdef MITSHM
 
88
    XShmSegmentInfo xshminfo[2];
 
89
    int SharedMemOption;
 
90
    int SharedMemFlag;
 
91
#endif                          /* MITSHM */
 
92
    unsigned long pixels[256];
 
93
    char *vbuffs[2];
 
94
    char *data[2];
 
95
    char *vbuff;
 
96
    char *back;
 
97
    int truecolor;
 
98
    int linewidth;
 
99
 
 
100
    Cursor cursor;
 
101
} xdisplay;
 
102
 
 
103
extern int alloc_shm_image(xdisplay * d);
 
104
extern void free_shm_image(xdisplay * d);
 
105
extern int alloc_image(xdisplay * d);
 
106
extern void free_image(xdisplay * d);
 
107
extern int xupdate_size(xdisplay * d);
 
108
extern void xflip_buffers(xdisplay * d);
 
109
extern xdisplay *xalloc_display(const char *n, int x, int y, int width,int height, xlibparam * p);
 
110
extern void xfree_display(xdisplay * d);
 
111
extern void xsetcolor(xdisplay * d, int col);
 
112
extern int xsetfont(xdisplay * d, char *font_name);
 
113
extern int xalloc_color(xdisplay * d, int r, int g, int b, int readwrite);
 
114
extern void xfree_colors(xdisplay * d);
 
115
extern void xline(xdisplay * d, int x1, int y1, int x2, int y2);
 
116
extern void xmoveto(xdisplay * d, int x, int y);
 
117
extern void xlineto(xdisplay * d, int x, int y);
 
118
extern void xrect(xdisplay * d, int x1, int y1, int x2, int y2);
 
119
extern void xfillrect(xdisplay * d, int x1, int y1, int x2, int y2);
 
120
extern void xarc(xdisplay * d, int x, int y, unsigned int w,
 
121
                 unsigned int h, int a1, int a2);
 
122
extern void xfillarc(xdisplay * d, int x, int y, unsigned int w,
 
123
                     unsigned int h, int a1, int a2);
 
124
extern void xpoint(xdisplay * d, int x, int y);
 
125
extern void xflush(xdisplay * d);
 
126
extern void xclear_screen(xdisplay * d);
 
127
extern void xrotate_palette(xdisplay * d, int direction, unsigned char c[3][256], int ncolors);
 
128
extern void draw_screen(xdisplay * d);
 
129
extern void xouttext(xdisplay * d, char *string);
 
130
extern void xresize(xdisplay * d, XEvent * ev);
 
131
extern void xsize_set(xdisplay *d, int width, int height);
 
132
extern int xsize_update(xdisplay *d,int *width,int *height);
 
133
extern int xmouse_x(xdisplay * d);
 
134
extern int xmouse_y(xdisplay * d);
 
135
extern void xmouse_update(xdisplay * d);
 
136
extern char xkeyboard_query(xdisplay * d);
 
137
extern unsigned int xmouse_buttons(xdisplay * d);
 
138
 
 
139
#endif                          /* XAOS_X11_H */