1 /*         ______   ___    ___
2  *        /\  _  \ /\_ \  /\_ \
3  *        \ \ \L\ \\//\ \ \//\ \      __     __   _ __   ___
4  *         \ \  __ \ \ \ \  \ \ \   /'__`\ /'_ `\/\`'__\/ __`\
5  *          \ \ \/\ \ \_\ \_ \_\ \_/\  __//\ \L\ \ \ \//\ \L\ \
6  *           \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
7  *            \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/
8  *                                           /\____/
9  *                                           \_/__/
10  *
11  *      Wrappers for Xlib functions.
12  *
13  *      By Michael Bukin.
14  *
15  *      See readme.txt for copyright information.
16  */
17 
18 #ifndef __bma_xwin_h
19 #define __bma_xwin_h
20 
21 #include "xalleg.h"
22 
23 /* Defined in xmouse.c */
24 AL_VAR(int, _xwin_mouse_extended_range);
25 
26 /* Defined in xwin.c.  */
27 AL_VAR(int, _xwin_last_line);
28 AL_VAR(int, _xwin_in_gfx_call);
29 
30 /* The allegro X11 icon */
31 AL_VAR(void *, allegro_icon);
32 
33 
34 AL_FUNC(void, _xwin_set_warped_mouse_mode, (int permanent));
35 AL_FUNC(int, _xwin_open_display, (char *name));
36 AL_FUNC(void, _xwin_close_display, (void));
37 AL_FUNC(int, _xwin_create_window, (void));
38 AL_FUNC(void, _xwin_destroy_window, (void));
39 AL_FUNC(BITMAP*, _xwin_create_screen, (GFX_DRIVER *drv, int w, int h,
40 				       int vw, int vh, int depth, int fullscreen));
41 AL_FUNC(void, _xwin_destroy_screen, (void));
42 AL_FUNC(void, _xwin_set_palette_range, (AL_CONST PALETTE p, int from, int to, int vsync));
43 AL_FUNC(void, _xwin_flush_buffers, (void));
44 AL_FUNC(void, _xwin_vsync, (void));
45 AL_FUNC(void, _xwin_handle_input, (void));
46 AL_FUNC(void, _xwin_enable_hardware_cursor, (int mode));
47 AL_FUNC(void, _xwin_redraw_window, (int x, int y, int w, int h));
48 AL_FUNC(int, _xwin_scroll_screen, (int x, int y));
49 AL_FUNC(void, _xwin_update_screen, (int x, int y, int w, int h));
50 AL_FUNC(void, _xwin_set_window_title, (AL_CONST char *name));
51 AL_FUNC(void, _xwin_change_keyboard_control, (int led, int on));
52 AL_FUNC(int, _xwin_get_pointer_mapping, (unsigned char map[], int nmap));
53 AL_FUNC(void, _xwin_init_keyboard_tables, (void));
54 
55 #ifdef ALLEGRO_XWINDOWS_WITH_XCURSOR
56 AL_FUNC(int, _xwin_set_mouse_sprite, (struct BITMAP *sprite, int x, int y));
57 AL_FUNC(int, _xwin_show_mouse, (struct BITMAP *bmp, int x, int y));
58 AL_FUNC(void, _xwin_hide_mouse, (void));
59 AL_FUNC(void, _xwin_move_mouse, (int x, int y));
60 #endif
61 
62 AL_FUNC(BITMAP*, _xdga_create_screen, (GFX_DRIVER *drv, int w, int h,
63 				       int vw, int vh, int depth, int fullscreen));
64 AL_FUNC(void, _xdga_destroy_screen, (void));
65 AL_FUNC(void, _xdga_set_palette_range, (AL_CONST PALETTE p, int from, int to, int vsync));
66 AL_FUNC(int, _xdga_scroll_screen, (int x, int y));
67 
68 AL_FUNC(GFX_MODE_LIST*, _xwin_fetch_mode_list, (void));
69 
70 /* Defined in xvtable.c.  */
71 AL_FUNC(void, _xwin_replace_vtable, (struct GFX_VTABLE *vtable));
72 AL_FUNC(void, _xwin_drawing_mode, (void));
73 AL_FUNC(void, _xwin_lock, (BITMAP *bmp));
74 AL_FUNC(void, _xwin_unlock, (BITMAP *bmp));
75 
76 /* Defined in xkeyboard.c. */
77 AL_FUNC(void, _xwin_keyboard_handler, (XKeyEvent *event, int dga2_hack));
78 AL_FUNC(void, _xwin_get_keyboard_mapping, (void));
79 AL_FUNC(void, _xwin_keyboard_focus_handler, (XFocusChangeEvent *event));
80 
81 /* Defined in xmouse.c. */
82 AL_FUNC(void, _xwin_mouse_leave_notify, (void));
83 AL_FUNC(void, _xwin_mouse_enter_notify, (void));
84 
85 #endif /* !__bma_xwin_h */
86 
87