From 9f2a6025e0326d6c4a72c182754a5e81064d67e2 Mon Sep 17 00:00:00 2001 From: Claudius Holeksa Date: Wed, 29 Dec 2021 20:17:33 +0100 Subject: [PATCH] renamed project --- README.md | 4 ++-- SConstruct | 18 +++++++++--------- driver/device_xcb.cpp | 4 ++-- driver/device_xcb.h | 6 +++--- driver/gl/gl_context_xcb.cpp | 4 ++-- driver/gl/gl_context_xcb.h | 4 ++-- driver/gl/gl_window_xcb.cpp | 4 ++-- driver/gl/gl_window_xcb.h | 6 +++--- source/{ => forstio/window}/SConscript | 0 source/{ => forstio/window}/device.h | 8 ++++---- source/{ => forstio/window}/gl/gl_context.h | 2 +- source/{ => forstio/window}/gl/gl_window.h | 2 +- source/{ => forstio/window}/video_mode.h | 0 source/{ => forstio/window}/window.h | 0 14 files changed, 31 insertions(+), 31 deletions(-) rename source/{ => forstio/window}/SConscript (100%) rename source/{ => forstio/window}/device.h (78%) rename source/{ => forstio/window}/gl/gl_context.h (97%) rename source/{ => forstio/window}/gl/gl_window.h (96%) rename source/{ => forstio/window}/video_mode.h (100%) rename source/{ => forstio/window}/window.h (100%) diff --git a/README.md b/README.md index 21ac19e..291d445 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# kelgin-window +# forstio-window Window creation and OpenGL context creation library with a little more abstraction compared to other libraries. # Dependencies -* kelgin +* forstio * C++ compiler (g++/clang++) with std++17 * scons diff --git a/SConstruct b/SConstruct index 0360c0e..0ba0b18 100644 --- a/SConstruct +++ b/SConstruct @@ -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 ) ) pass -env=Environment(CPPPATH=['#source','#','#driver'], +env=Environment(ENV=os.environ,CPPPATH=['#source','#','#driver'], CXX='clang++', - CPPDEFINES=['GIN_UNIX_XCB'], - CXXFLAGS=['-std=c++17','-g','-Wall','-Wextra'], - LIBS=['kelgin','xcb','X11','X11-xcb']) + CPPDEFINES=['SAW_UNIX_XCB'], + CXXFLAGS=['-std=c++20','-g','-Wall','-Wextra'], + LIBS=['forstio','xcb','X11','X11-xcb']) env.__class__.add_source_files = add_kel_source_files env.sources = [] @@ -43,7 +43,7 @@ env.gl_sources = [] env.gl_headers = [] Export('env') -SConscript('source/SConscript') +SConscript('source/forstio/window/SConscript') SConscript('driver/SConscript') # Library build @@ -53,12 +53,12 @@ env_library = env.Clone() env.objects_shared = [] 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_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_library.add_source_files(env.objects_static, env.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_shared', env.library_shared) @@ -86,6 +86,6 @@ env.Alias('format', env.format_actions) env.Alias('all', ['format', 'library_shared', '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/kelgin/window/gl/', [env.gl_headers]) +env.Install('/usr/local/include/forstio/window/', [env.headers]) +env.Install('/usr/local/include/forstio/window/gl/', [env.gl_headers]) env.Alias('install', '/usr/local/') diff --git a/driver/device_xcb.cpp b/driver/device_xcb.cpp index 1a9e98d..7bf5398 100644 --- a/driver/device_xcb.cpp +++ b/driver/device_xcb.cpp @@ -4,7 +4,7 @@ #include "window_xcb.h" -namespace gin { +namespace saw { XcbDevice::XcbDevice(::Display *display, int screen, xcb_connection_t *xcb_connection, xcb_screen_t *xcb_screen, Own &&an) @@ -217,4 +217,4 @@ Own createXcbDevice(IoProvider &provider) { Own createDevice(IoProvider &provider) { return createXcbDevice(provider); } -} // namespace gin +} // namespace saw diff --git a/driver/device_xcb.h b/driver/device_xcb.h index 2faf181..58c666e 100644 --- a/driver/device_xcb.h +++ b/driver/device_xcb.h @@ -2,7 +2,7 @@ #include #include -#include +#include #include #include @@ -11,7 +11,7 @@ #include "device.h" #include "window_xcb.h" -namespace gin { +namespace saw { class XcbDevice final : public Device { public: ::Display *display; @@ -44,4 +44,4 @@ public: }; Own createXcbDevice(IoProvider &provider); -} // namespace gin +} // namespace saw diff --git a/driver/gl/gl_context_xcb.cpp b/driver/gl/gl_context_xcb.cpp index 9bcd0b1..171ffce 100644 --- a/driver/gl/gl_context_xcb.cpp +++ b/driver/gl/gl_context_xcb.cpp @@ -10,7 +10,7 @@ #include "../device_xcb.h" #include "gl_window_xcb.h" -namespace gin { +namespace saw { namespace { GlxLibraryExtensions glxLibraryExtensions(const char *extension_string) { std::string_view extensions_view{extension_string}; @@ -198,4 +198,4 @@ Own createGlContext(IoProvider &provider, return nullptr; } -} // namespace gin +} // namespace saw diff --git a/driver/gl/gl_context_xcb.h b/driver/gl/gl_context_xcb.h index 94bcc49..4c2a8aa 100644 --- a/driver/gl/gl_context_xcb.h +++ b/driver/gl/gl_context_xcb.h @@ -7,7 +7,7 @@ #include "gl/gl_context.h" -namespace gin { +namespace saw { struct GlxLibraryExtensions { public: std::string_view raw_extension_string; @@ -34,4 +34,4 @@ public: void flush() override; }; -} // namespace gin +} // namespace saw diff --git a/driver/gl/gl_window_xcb.cpp b/driver/gl/gl_window_xcb.cpp index 3e2b1f6..6973098 100644 --- a/driver/gl/gl_window_xcb.cpp +++ b/driver/gl/gl_window_xcb.cpp @@ -7,7 +7,7 @@ #include -namespace gin { +namespace saw { XcbGlWindow::XcbGlWindow(Own &&win, XcbGlContext &ctx, ::GLXWindow glx_win) : window{std::move(win)}, context{ctx}, glx_window{glx_win} {} @@ -75,4 +75,4 @@ Conveyor XcbGlWindow::onEvent() { assert(window); return window->onEvent(); } -} // namespace gin +} // namespace saw diff --git a/driver/gl/gl_window_xcb.h b/driver/gl/gl_window_xcb.h index 8a8c5e8..7c3716c 100644 --- a/driver/gl/gl_window_xcb.h +++ b/driver/gl/gl_window_xcb.h @@ -1,11 +1,11 @@ #pragma once #include -#include +#include #include "gl/gl_window.h" -namespace gin { +namespace saw { class XcbWindow; class XcbGlContext; class XcbGlWindow final : public GlWindow { @@ -31,4 +31,4 @@ public: Conveyor onEvent() override; }; -} // namespace gin \ No newline at end of file +} // namespace saw \ No newline at end of file diff --git a/source/SConscript b/source/forstio/window/SConscript similarity index 100% rename from source/SConscript rename to source/forstio/window/SConscript diff --git a/source/device.h b/source/forstio/window/device.h similarity index 78% rename from source/device.h rename to source/forstio/window/device.h index 4d0317c..d2e5c5d 100644 --- a/source/device.h +++ b/source/forstio/window/device.h @@ -1,14 +1,14 @@ #pragma once -#include -#include +#include +#include #include #include #include "window.h" -namespace gin { +namespace saw { class Device { public: virtual ~Device() = default; @@ -20,4 +20,4 @@ public: class IoProvider; Own createDevice(IoProvider &provider); -} // namespace gin +} // namespace saw diff --git a/source/gl/gl_context.h b/source/forstio/window/gl/gl_context.h similarity index 97% rename from source/gl/gl_context.h rename to source/forstio/window/gl/gl_context.h index 194e9b8..74a1683 100644 --- a/source/gl/gl_context.h +++ b/source/forstio/window/gl/gl_context.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include diff --git a/source/gl/gl_window.h b/source/forstio/window/gl/gl_window.h similarity index 96% rename from source/gl/gl_window.h rename to source/forstio/window/gl/gl_window.h index 70cb1eb..4edc16f 100644 --- a/source/gl/gl_window.h +++ b/source/forstio/window/gl/gl_window.h @@ -3,7 +3,7 @@ #include "../video_mode.h" #include "../window.h" -#include +#include #include diff --git a/source/video_mode.h b/source/forstio/window/video_mode.h similarity index 100% rename from source/video_mode.h rename to source/forstio/window/video_mode.h diff --git a/source/window.h b/source/forstio/window/window.h similarity index 100% rename from source/window.h rename to source/forstio/window/window.h