FreeBASIC  0.91.0
fb_gfx_x11.h
Go to the documentation of this file.
1 /* common x11 internal definitions */
2 
3 #ifndef DISABLE_X11
4 
5 #ifndef __FB_GFX_X11_H__
6 #define __FB_GFX_X11_H__
7 
8 #include <X11/Xlib.h>
9 #include <X11/Xutil.h>
10 #include <X11/xpm.h>
11 #include <X11/keysym.h>
12 #include <X11/cursorfont.h>
13 #include <X11/extensions/XShm.h>
14 #include <X11/extensions/Xrandr.h>
15 #include <X11/extensions/shape.h>
16 
17 #define DOUBLE_CLICK_TIME 250
18 
19 typedef struct X11DRIVER
20 {
21  Display *display;
22  Visual *visual;
23  int screen;
24  Window window;
25  Window wmwindow;
26  Window fswindow;
27  GC gc;
28  XRRScreenConfiguration *config;
31  int (*init)(void);
32  void (*exit)(void);
33  void (*update)(void);
35 } X11DRIVER;
36 
37 
38 extern X11DRIVER fb_x11;
41 
42 extern char **fb_program_icon;
43 
44 void fb_hX11WaitUnmapped(Window w);
45 
46 extern void fb_hXlibInit(void);
47 extern int fb_hX11Init(char *title, int w, int h, int depth, int refresh_rate, int flags);
48 extern void fb_hX11Exit(void);
49 extern void fb_hX11Lock(void);
50 extern void fb_hX11Unlock(void);
51 extern void fb_hX11SetPalette(int index, int r, int g, int b);
52 extern void fb_hX11WaitVSync(void);
53 extern int fb_hX11GetMouse(int *x, int *y, int *z, int *buttons, int *clip);
54 extern void fb_hX11SetMouse(int x, int y, int cursor, int clip);
55 extern void fb_hX11SetWindowTitle(char *title);
56 extern int fb_hX11SetWindowPos(int x, int y);
57 extern int *fb_hX11FetchModes(int depth, int *size);
58 extern int fb_hX11EnterFullscreen(int *h);
59 extern void fb_hX11LeaveFullscreen(void);
60 extern void fb_hX11InitWindow(int x, int y);
61 extern int fb_hX11ScreenInfo(ssize_t *width, ssize_t *height, ssize_t *depth, ssize_t *refresh);
62 
63 #endif
64 
65 #endif