renamed project

dev
Claudius Holeksa 2021-12-29 20:17:33 +01:00
parent 4ac1ad4740
commit 9f2a6025e0
14 changed files with 31 additions and 31 deletions

View File

@ -1,10 +1,10 @@
# kelgin-window # forstio-window
Window creation and OpenGL context creation library with a little more abstraction compared to other libraries. Window creation and OpenGL context creation library with a little more abstraction compared to other libraries.
# Dependencies # Dependencies
* kelgin * forstio
* C++ compiler (g++/clang++) with std++17 * C++ compiler (g++/clang++) with std++17
* scons * scons

View File

@ -29,11 +29,11 @@ def add_kel_source_files(self, sources, filetype, lib_env=None, shared=False, ta
sources.append( self.StaticObject( target=target_name, source=path ) ) sources.append( self.StaticObject( target=target_name, source=path ) )
pass pass
env=Environment(CPPPATH=['#source','#','#driver'], env=Environment(ENV=os.environ,CPPPATH=['#source','#','#driver'],
CXX='clang++', CXX='clang++',
CPPDEFINES=['GIN_UNIX_XCB'], CPPDEFINES=['SAW_UNIX_XCB'],
CXXFLAGS=['-std=c++17','-g','-Wall','-Wextra'], CXXFLAGS=['-std=c++20','-g','-Wall','-Wextra'],
LIBS=['kelgin','xcb','X11','X11-xcb']) LIBS=['forstio','xcb','X11','X11-xcb'])
env.__class__.add_source_files = add_kel_source_files env.__class__.add_source_files = add_kel_source_files
env.sources = [] env.sources = []
@ -43,7 +43,7 @@ env.gl_sources = []
env.gl_headers = [] env.gl_headers = []
Export('env') Export('env')
SConscript('source/SConscript') SConscript('source/forstio/window/SConscript')
SConscript('driver/SConscript') SConscript('driver/SConscript')
# Library build # Library build
@ -53,12 +53,12 @@ env_library = env.Clone()
env.objects_shared = [] env.objects_shared = []
env_library.add_source_files(env.objects_shared, env.sources, shared=True) env_library.add_source_files(env.objects_shared, env.sources, shared=True)
env_library.add_source_files(env.objects_shared, env.gl_sources, shared=True) env_library.add_source_files(env.objects_shared, env.gl_sources, shared=True)
env.library_shared = env_library.SharedLibrary('#bin/kelgin-window', [env.objects_shared]) env.library_shared = env_library.SharedLibrary('#bin/forstio-window', [env.objects_shared])
env.objects_static = [] env.objects_static = []
env_library.add_source_files(env.objects_static, env.sources) env_library.add_source_files(env.objects_static, env.sources)
env_library.add_source_files(env.objects_static, env.gl_sources) env_library.add_source_files(env.objects_static, env.gl_sources)
env.library_static = env_library.StaticLibrary('#bin/kelgin-window', [env.objects_static]) env.library_static = env_library.StaticLibrary('#bin/forstio-window', [env.objects_static])
env.Alias('library', [env.library_shared, env.library_static]) env.Alias('library', [env.library_shared, env.library_static])
env.Alias('library_shared', env.library_shared) env.Alias('library_shared', env.library_shared)
@ -86,6 +86,6 @@ env.Alias('format', env.format_actions)
env.Alias('all', ['format', 'library_shared', 'library_static']) env.Alias('all', ['format', 'library_shared', 'library_static'])
env.Install('/usr/local/lib/', [env.library_shared, env.library_static]) env.Install('/usr/local/lib/', [env.library_shared, env.library_static])
env.Install('/usr/local/include/kelgin/window/', [env.headers]) env.Install('/usr/local/include/forstio/window/', [env.headers])
env.Install('/usr/local/include/kelgin/window/gl/', [env.gl_headers]) env.Install('/usr/local/include/forstio/window/gl/', [env.gl_headers])
env.Alias('install', '/usr/local/') env.Alias('install', '/usr/local/')

View File

@ -4,7 +4,7 @@
#include "window_xcb.h" #include "window_xcb.h"
namespace gin { namespace saw {
XcbDevice::XcbDevice(::Display *display, int screen, XcbDevice::XcbDevice(::Display *display, int screen,
xcb_connection_t *xcb_connection, xcb_screen_t *xcb_screen, xcb_connection_t *xcb_connection, xcb_screen_t *xcb_screen,
Own<InputStream> &&an) Own<InputStream> &&an)
@ -217,4 +217,4 @@ Own<XcbDevice> createXcbDevice(IoProvider &provider) {
Own<Device> createDevice(IoProvider &provider) { Own<Device> createDevice(IoProvider &provider) {
return createXcbDevice(provider); return createXcbDevice(provider);
} }
} // namespace gin } // namespace saw

View File

@ -2,7 +2,7 @@
#include <X11/Xlib-xcb.h> #include <X11/Xlib-xcb.h>
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <kelgin/io.h> #include <forstio/io.h>
#include <xcb/xcb.h> #include <xcb/xcb.h>
#include <map> #include <map>
@ -11,7 +11,7 @@
#include "device.h" #include "device.h"
#include "window_xcb.h" #include "window_xcb.h"
namespace gin { namespace saw {
class XcbDevice final : public Device { class XcbDevice final : public Device {
public: public:
::Display *display; ::Display *display;
@ -44,4 +44,4 @@ public:
}; };
Own<XcbDevice> createXcbDevice(IoProvider &provider); Own<XcbDevice> createXcbDevice(IoProvider &provider);
} // namespace gin } // namespace saw

View File

@ -10,7 +10,7 @@
#include "../device_xcb.h" #include "../device_xcb.h"
#include "gl_window_xcb.h" #include "gl_window_xcb.h"
namespace gin { namespace saw {
namespace { namespace {
GlxLibraryExtensions glxLibraryExtensions(const char *extension_string) { GlxLibraryExtensions glxLibraryExtensions(const char *extension_string) {
std::string_view extensions_view{extension_string}; std::string_view extensions_view{extension_string};
@ -198,4 +198,4 @@ Own<GlContext> createGlContext(IoProvider &provider,
return nullptr; return nullptr;
} }
} // namespace gin } // namespace saw

View File

@ -7,7 +7,7 @@
#include "gl/gl_context.h" #include "gl/gl_context.h"
namespace gin { namespace saw {
struct GlxLibraryExtensions { struct GlxLibraryExtensions {
public: public:
std::string_view raw_extension_string; std::string_view raw_extension_string;
@ -34,4 +34,4 @@ public:
void flush() override; void flush() override;
}; };
} // namespace gin } // namespace saw

View File

@ -7,7 +7,7 @@
#include <cassert> #include <cassert>
namespace gin { namespace saw {
XcbGlWindow::XcbGlWindow(Own<XcbWindow> &&win, XcbGlContext &ctx, XcbGlWindow::XcbGlWindow(Own<XcbWindow> &&win, XcbGlContext &ctx,
::GLXWindow glx_win) ::GLXWindow glx_win)
: window{std::move(win)}, context{ctx}, glx_window{glx_win} {} : window{std::move(win)}, context{ctx}, glx_window{glx_win} {}
@ -75,4 +75,4 @@ Conveyor<Window::VariantEvent> XcbGlWindow::onEvent() {
assert(window); assert(window);
return window->onEvent(); return window->onEvent();
} }
} // namespace gin } // namespace saw

View File

@ -1,11 +1,11 @@
#pragma once #pragma once
#include <GL/glx.h> #include <GL/glx.h>
#include <kelgin/common.h> #include <forstio/common.h>
#include "gl/gl_window.h" #include "gl/gl_window.h"
namespace gin { namespace saw {
class XcbWindow; class XcbWindow;
class XcbGlContext; class XcbGlContext;
class XcbGlWindow final : public GlWindow { class XcbGlWindow final : public GlWindow {
@ -31,4 +31,4 @@ public:
Conveyor<Window::VariantEvent> onEvent() override; Conveyor<Window::VariantEvent> onEvent() override;
}; };
} // namespace gin } // namespace saw

View File

@ -1,14 +1,14 @@
#pragma once #pragma once
#include <kelgin/async.h> #include <forstio/async.h>
#include <kelgin/common.h> #include <forstio/common.h>
#include <string_view> #include <string_view>
#include <variant> #include <variant>
#include "window.h" #include "window.h"
namespace gin { namespace saw {
class Device { class Device {
public: public:
virtual ~Device() = default; virtual ~Device() = default;
@ -20,4 +20,4 @@ public:
class IoProvider; class IoProvider;
Own<Device> createDevice(IoProvider &provider); Own<Device> createDevice(IoProvider &provider);
} // namespace gin } // namespace saw

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
#include <kelgin/common.h> #include <forstio/common.h>
#include <string_view> #include <string_view>

View File

@ -3,7 +3,7 @@
#include "../video_mode.h" #include "../video_mode.h"
#include "../window.h" #include "../window.h"
#include <kelgin/async.h> #include <forstio/async.h>
#include <string_view> #include <string_view>