format
This commit is contained in:
parent
b7e2c85f47
commit
2656f8a181
2
.clang-format
Normal file → Executable file
2
.clang-format
Normal file → Executable file
@ -10,6 +10,7 @@ AllowShortFunctionsOnASingleLine: None
|
|||||||
AllowShortIfStatementsOnASingleLine: 'false'
|
AllowShortIfStatementsOnASingleLine: 'false'
|
||||||
AllowShortLoopsOnASingleLine: 'false'
|
AllowShortLoopsOnASingleLine: 'false'
|
||||||
BreakBeforeBraces: Allman
|
BreakBeforeBraces: Allman
|
||||||
|
ColumnLimit: 0
|
||||||
ConstructorInitializerAllOnOneLineOrOnePerLine: 'false'
|
ConstructorInitializerAllOnOneLineOrOnePerLine: 'false'
|
||||||
Cpp11BracedListStyle: 'false'
|
Cpp11BracedListStyle: 'false'
|
||||||
IndentCaseLabels: 'false'
|
IndentCaseLabels: 'false'
|
||||||
@ -31,4 +32,5 @@ Standard: Auto
|
|||||||
TabWidth: '4'
|
TabWidth: '4'
|
||||||
UseTab: Never
|
UseTab: Never
|
||||||
|
|
||||||
|
|
||||||
...
|
...
|
||||||
|
@ -15,43 +15,43 @@ extern "C"
|
|||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <X11/XKBlib.h>
|
#include <X11/XKBlib.h>
|
||||||
|
|
||||||
struct xoverlay_library
|
struct xoverlay_library
|
||||||
{
|
|
||||||
Display *display;
|
|
||||||
Window window;
|
|
||||||
Colormap colormap;
|
|
||||||
GC gc;
|
|
||||||
XGCValues gcvalues;
|
|
||||||
XFontStruct font;
|
|
||||||
int screen;
|
|
||||||
|
|
||||||
int width;
|
|
||||||
int height;
|
|
||||||
|
|
||||||
struct
|
|
||||||
{
|
{
|
||||||
int x;
|
Display *display;
|
||||||
int y;
|
Window window;
|
||||||
} mouse;
|
Colormap colormap;
|
||||||
|
GC gc;
|
||||||
|
XGCValues gcvalues;
|
||||||
|
XFontStruct font;
|
||||||
|
int screen;
|
||||||
|
|
||||||
char init;
|
int width;
|
||||||
char drawing;
|
int height;
|
||||||
char mapped;
|
|
||||||
};
|
|
||||||
|
|
||||||
extern struct xoverlay_library xoverlay_library;
|
struct
|
||||||
|
{
|
||||||
|
int x;
|
||||||
|
int y;
|
||||||
|
} mouse;
|
||||||
|
|
||||||
int xoverlay_init();
|
char init;
|
||||||
|
char drawing;
|
||||||
|
char mapped;
|
||||||
|
};
|
||||||
|
|
||||||
void xoverlay_destroy();
|
extern struct xoverlay_library xoverlay_library;
|
||||||
|
|
||||||
void xoverlay_show();
|
int xoverlay_init();
|
||||||
|
|
||||||
void xoverlay_hide();
|
void xoverlay_destroy();
|
||||||
|
|
||||||
void xoverlay_draw_begin();
|
void xoverlay_show();
|
||||||
|
|
||||||
void xoverlay_draw_end();
|
void xoverlay_hide();
|
||||||
|
|
||||||
|
void xoverlay_draw_begin();
|
||||||
|
|
||||||
|
void xoverlay_draw_end();
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -193,7 +193,8 @@ int xoverlay_glx_create_window()
|
|||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (!glXIsDirect(xoverlay_library.display, glx_state.context));
|
if (!glXIsDirect(xoverlay_library.display, glx_state.context))
|
||||||
|
;
|
||||||
glXMakeCurrent(xoverlay_library.display, xoverlay_library.window,
|
glXMakeCurrent(xoverlay_library.display, xoverlay_library.window,
|
||||||
glx_state.context);
|
glx_state.context);
|
||||||
glewExperimental = GL_TRUE;
|
glewExperimental = GL_TRUE;
|
||||||
@ -207,7 +208,8 @@ int xoverlay_glx_create_window()
|
|||||||
(PFNGLXSWAPINTERVALEXTPROC) glXGetProcAddressARB(
|
(PFNGLXSWAPINTERVALEXTPROC) glXGetProcAddressARB(
|
||||||
(const GLubyte *) "glXSwapIntervalEXT");
|
(const GLubyte *) "glXSwapIntervalEXT");
|
||||||
if (glXSwapIntervalEXT)
|
if (glXSwapIntervalEXT)
|
||||||
glXSwapIntervalEXT(xoverlay_library.display, xoverlay_library.window, 0);
|
glXSwapIntervalEXT(xoverlay_library.display, xoverlay_library.window,
|
||||||
|
0);
|
||||||
glXSwapBuffers(xoverlay_library.display, xoverlay_library.window);
|
glXSwapBuffers(xoverlay_library.display, xoverlay_library.window);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user