mirror of
https://github.com/gnustep/libs-back.git
synced 2025-04-22 15:31:14 +00:00
Update backend to support headless
This commit is contained in:
parent
49cefc8df9
commit
78a80fe920
2 changed files with 20 additions and 3 deletions
|
@ -35,7 +35,7 @@
|
|||
+ (void) initializeBackend;
|
||||
@end
|
||||
|
||||
#if BUILD_SERVER == SERVER_x11
|
||||
#if (BUILD_SERVER == SERVER_x11) || (BUILD_SERVER == SERVER_xheadless)
|
||||
#include <x11/XGServer.h>
|
||||
@interface XGServer (Initialize)
|
||||
+ (void) initializeBackend;
|
||||
|
@ -70,6 +70,8 @@
|
|||
[WIN32Server initializeBackend];
|
||||
#elif BUILD_SERVER == SERVER_wayland
|
||||
[WaylandServer initializeBackend];
|
||||
#elif BUILD_SERVER == SERVER_xheadless
|
||||
[XGServer initializeBackend];
|
||||
#else
|
||||
[NSException raise: NSInternalInconsistencyException
|
||||
format: @"No Window Server configured in backend"];
|
||||
|
@ -93,9 +95,11 @@
|
|||
#elif (BUILD_GRAPHICS==GRAPHICS_winlib)
|
||||
context = @"WIN32Context";
|
||||
#elif (BUILD_GRAPHICS==GRAPHICS_cairo)
|
||||
context = @"CairoContext";
|
||||
#elif (BUILD_GRAPHICS==GRAPHICS_opal)
|
||||
context = @"CairoContext";
|
||||
#elif (BUILD_GRAPHICS==GRAPHICS_opal)
|
||||
context = @"OpalContext";
|
||||
#elif (BUILD_GRAPHICS==GRAPHICS_headlesslib)
|
||||
context = @"HeadlessContext";
|
||||
#else
|
||||
#error INVALID build graphics type
|
||||
#endif
|
||||
|
|
|
@ -57,6 +57,19 @@
|
|||
# endif /* USE_GLITZ */
|
||||
# include "x11/XGServerWindow.h"
|
||||
# include "x11/XWindowBuffer.h"
|
||||
#elif BUILD_SERVER == SERVER_xheadless
|
||||
# include "cairo/CairoGState.h"
|
||||
# include "x11/XGServer.h"
|
||||
# define _CAIRO_GSTATE_CLASSNAME CairoGState
|
||||
# ifdef USE_GLITZ
|
||||
# define _CAIRO_SURFACE_CLASSNAME XGCairoGlitzSurface
|
||||
# include "cairo/XGCairoGlitzSurface.h"
|
||||
# else
|
||||
# define _CAIRO_SURFACE_CLASSNAME XGCairoModernSurface
|
||||
# include "cairo/XGCairoModernSurface.h"
|
||||
# endif /* USE_GLITZ */
|
||||
# include "x11/XGServerWindow.h"
|
||||
# include "x11/XWindowBuffer.h"
|
||||
#elif BUILD_SERVER == SERVER_win32
|
||||
# include "cairo/Win32CairoGState.h"
|
||||
# include <windows.h>
|
||||
|
|
Loading…
Reference in a new issue