RetroArch
x11_common.h
Go to the documentation of this file.
1 /* RetroArch - A frontend for libretro.
2  * Copyright (C) 2010-2014 - Hans-Kristian Arntzen
3  * Copyright (C) 2011-2017 - Daniel De Matteis
4  *
5  * RetroArch is free software: you can redistribute it and/or modify it under the terms
6  * of the GNU General Public License as published by the Free Software Found-
7  * ation, either version 3 of the License, or (at your option) any later version.
8  *
9  * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
10  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  * PURPOSE. See the GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License along with RetroArch.
14  * If not, see <http://www.gnu.org/licenses/>.
15  */
16 
17 #ifndef X11_COMMON_H__
18 #define X11_COMMON_H__
19 
20 #include <X11/Xutil.h>
21 
22 #include <boolean.h>
23 
24 #include "../video_driver.h"
25 
26 extern Window g_x11_win;
27 extern Display *g_x11_dpy;
28 extern Colormap g_x11_cmap;
29 extern unsigned g_x11_screen;
30 
31 void x11_show_mouse(Display *dpy, Window win, bool state);
32 void x11_set_net_wm_fullscreen(Display *dpy, Window win);
33 void x11_suspend_screensaver(Window win, bool enable);
35  Display *dpy, unsigned width,
36  unsigned height);
37 
38 void x11_exit_fullscreen(Display *dpy);
39 void x11_move_window(Display *dpy, Window win,
40  int x, int y, unsigned width, unsigned height);
41 
42 /* Set icon, class, default stuff. */
43 void x11_set_window_attr(Display *dpy, Window win);
44 
45 bool x11_create_input_context(Display *dpy, Window win, XIM *xim, XIC *xic);
46 void x11_destroy_input_context(XIM *xim, XIC *xic);
47 
48 bool x11_get_metrics(void *data,
49  enum display_metric_types type, float *value);
50 
51 float x11_get_refresh_rate(void *data);
52 
53 void x11_check_window(void *data, bool *quit,
54  bool *resize, unsigned *width, unsigned *height, bool is_shutdown);
55 
56 void x11_get_video_size(void *data, unsigned *width, unsigned *height);
57 
58 bool x11_has_focus(void *data);
59 
60 bool x11_has_focus_internal(void *data);
61 
62 bool x11_alive(void *data);
63 
64 bool x11_connect(void);
65 
66 void x11_update_title(void *data, void *data2);
67 
68 bool x11_input_ctx_new(bool true_full);
69 
70 void x11_input_ctx_destroy(void);
71 
73 
74 void x11_colormap_destroy(void);
75 
76 void x11_install_quit_atom(void);
77 
78 void x11_event_queue_check(XEvent *event);
79 
80 char *x11_get_wm_name(Display *dpy);
81 
82 bool x11_has_net_wm_fullscreen(Display *dpy);
83 
84 #endif
85 
void x11_input_ctx_destroy(void)
Definition: x11_common.c:667
bool x11_get_metrics(void *data, enum display_metric_types type, float *value)
Definition: x11_common.c:375
bool x11_enter_fullscreen(video_frame_info_t *video_info, Display *dpy, unsigned width, unsigned height)
Definition: x11_common.c:312
float x11_get_refresh_rate(void *data)
Definition: x11_common.c:238
bool x11_alive(void *data)
Definition: x11_common.c:481
void x11_show_mouse(Display *dpy, Window win, bool state)
Definition: x11_common.c:102
void x11_move_window(Display *dpy, Window win, int x, int y, unsigned width, unsigned height)
Definition: x11_common.c:132
Window g_x11_win
Definition: x11_common.c:69
GLboolean enable
Definition: glext.h:12027
static const bool fullscreen
Definition: config.def.h:108
void x11_destroy_input_context(XIM *xim, XIC *xic)
Definition: x11_common.c:360
display_metric_types
Definition: video_driver.h:105
Definition: ibxm.h:9
bool x11_create_input_context(Display *dpy, Window win, XIM *xim, XIC *xic)
Definition: x11_common.c:334
bool x11_has_net_wm_fullscreen(Display *dpy)
Definition: x11_common.c:747
GLenum type
Definition: glext.h:6233
void x11_set_net_wm_fullscreen(Display *dpy, Window win)
Definition: x11_common.c:110
Definition: video_driver.h:405
void x11_get_video_size(void *data, unsigned *width, unsigned *height)
Definition: x11_common.c:581
void x11_suspend_screensaver(Window win, bool enable)
Definition: x11_common.c:229
bool x11_connect(void)
Definition: x11_common.c:622
void x11_set_window_attr(Display *dpy, Window win)
Definition: x11_common.c:189
void x11_event_queue_check(XEvent *event)
Definition: x11_common.c:708
bool x11_has_focus_internal(void *data)
Definition: x11_common.c:607
void x11_update_title(void *data, void *data2)
Definition: x11_common.c:642
static uint64_t state[MAX_PADS]
Definition: xenon360_input.c:33
GLint GLint GLint GLint GLint GLint y
Definition: glext.h:6295
Definition: video_driver.h:332
GLint GLint GLint GLint GLint x
Definition: glext.h:6295
char * x11_get_wm_name(Display *dpy)
Definition: x11_common.c:754
bool x11_has_focus(void *data)
Definition: x11_common.c:612
bool x11_input_ctx_new(bool true_full)
Definition: x11_common.c:654
void x11_colormap_destroy(void)
Definition: x11_common.c:686
GLint GLint GLsizei width
Definition: glext.h:6293
void x11_exit_fullscreen(Display *dpy)
Definition: x11_common.c:328
void x11_check_window(void *data, bool *quit, bool *resize, unsigned *width, unsigned *height, bool is_shutdown)
Definition: x11_common.c:560
struct _cl_event * event
Definition: glext.h:8406
GLsizei const GLfloat * value
Definition: glext.h:6709
void x11_window_destroy(bool fullscreen)
Definition: x11_common.c:672
Colormap g_x11_cmap
Definition: x11_common.c:68
Display * g_x11_dpy
Definition: x11_common.c:64
unsigned g_x11_screen
Definition: x11_common.c:66
void x11_install_quit_atom(void)
Definition: x11_common.c:695
GLint GLint GLsizei GLsizei height
Definition: glext.h:6293