summaryrefslogtreecommitdiffstats
path: root/lib/tty/x11conn.h
blob: fbfe15ae23c4f60b8f8ffafa51b8eb5d53b73c6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/** \file x11conn.h
 *  \brief Header: X11 support
 *  \warning This code uses setjmp() and longjmp(). Before you modify _anything_ here,
 *  please read the relevant sections of the C standard.
 */

#ifndef MC__X11CONN_H
#define MC__X11CONN_H

/*
   This module provides support for some X11 functions.  The functions
   are loaded dynamically if GModule is available, and statically if
   not.  X11 session handling is somewhat robust.  If there is an X11
   error or a connection error, all further traffic to the X server
   will be suppressed, and the functions will return reasonable default
   values.
 */

#include <X11/Xlib.h>

/*** typedefs(not structures) and defined constants **********************************************/

/*** enums ***************************************************************************************/

/*** structures declarations (and typedefs of structures)*****************************************/

/*** global variables defined in .c file *********************************************************/

/*** declarations of public functions ************************************************************/

extern Display *mc_XOpenDisplay (const char *displayname);
extern int mc_XCloseDisplay (Display * display);

extern Bool mc_XQueryPointer (Display * display, Window win, Window * root_return,
                              Window * child_return, int *root_x_return, int *root_y_return,
                              int *win_x_return, int *win_y_return, unsigned int *mask_return);

/*** inline functions ****************************************************************************/

#endif /* MC__X11CONN_H */