diff --git a/common/include/kmx_file.h b/common/include/kmx_file.h index fb071ef4e5f..7dbc2261d0d 100644 --- a/common/include/kmx_file.h +++ b/common/include/kmx_file.h @@ -28,7 +28,7 @@ typedef KMX_WORD __attribute__((aligned(1))) KMX_WORD_unaligned; #ifdef KM_CORE_LIBRARY // TODO: move this to a common namespace keyman::common::kmx_file or similar in the future namespace km { -namespace kbp { +namespace core { namespace kmx { #endif @@ -404,6 +404,6 @@ static_assert(sizeof(COMP_KEYBOARD) == KEYBOARDFILEHEADER_SIZE, "COMP_KEYBOARD m #ifdef KM_CORE_LIBRARY } // namespace kmx -} // namespace kbp +} // namespace core } // namespace km #endif diff --git a/core/meson.build b/core/meson.build index 6f5429a7b1a..12f66f32ab0 100644 --- a/core/meson.build +++ b/core/meson.build @@ -25,7 +25,7 @@ py = import('python') python = py.find_installation() # TODO: Shared includes may use namespaces, etc which need future tidyup. -# For now, we use KM_CORE_LIBRARY to inject the km::kbp::kmx namespace +# For now, we use KM_CORE_LIBRARY to inject the km::core::kmx namespace defns += ['-DKM_CORE_LIBRARY'] # #define DEBUG when we are on a debug build diff --git a/core/src/context.hpp b/core/src/context.hpp index 08edc861634..dba7bec0608 100644 --- a/core/src/context.hpp +++ b/core/src/context.hpp @@ -15,7 +15,7 @@ class json; namespace km { -namespace kbp +namespace core { // This will likely be replaced with a class implementing a more space @@ -39,13 +39,13 @@ void context::push_marker(uint32_t marker) { emplace_back(km_core_context_item { KM_CORE_CT_MARKER, {0,}, {marker} }); } -} // namespace kbp +} // namespace core } // namespace km -json & operator << (json &, km::kbp::context const &); +json & operator << (json &, km::core::context const &); json & operator << (json &, km_core_context_item const &); -struct km_core_context : public km::kbp::context +struct km_core_context : public km::core::context { }; diff --git a/core/src/debug.hpp b/core/src/debug.hpp index 935fad155ca..a68d9f1e578 100644 --- a/core/src/debug.hpp +++ b/core/src/debug.hpp @@ -13,7 +13,7 @@ #include namespace km { -namespace kbp +namespace core { class debug_items : public std::vector @@ -66,6 +66,6 @@ void debug_items::set_enabled(bool value) noexcept { _is_enabled = value; } -} // namespace kbp +} // namespace core } // namespace km diff --git a/core/src/debuglog.cpp b/core/src/debuglog.cpp index 9519f3d3bc1..a4f8847892c 100644 --- a/core/src/debuglog.cpp +++ b/core/src/debuglog.cpp @@ -9,7 +9,7 @@ #include "debuglog.h" namespace km { -namespace kbp { +namespace core { namespace kmx { #define TAB "\t" diff --git a/core/src/debuglog.h b/core/src/debuglog.h index 944695d669f..67e6ce601f9 100644 --- a/core/src/debuglog.h +++ b/core/src/debuglog.h @@ -5,7 +5,7 @@ #include namespace km { -namespace kbp { +namespace core { namespace kmx { extern KMX_BOOL g_debug_ToConsole, g_debug_KeymanLog, g_silent; @@ -19,13 +19,13 @@ extern const struct modifier_names s_modifier_names[]; extern const char *s_key_names[]; #ifdef _MSC_VER -#define DebugLog(msg,...) (km::kbp::kmx::ShouldDebug() ? km::kbp::kmx::DebugLog_1(__FILE__, __LINE__, __FUNCTION__, (msg),__VA_ARGS__) : 0) -#define DebugLog2(file,line,function,msg,...) (km::kbp::kmx::ShouldDebug() ? km::kbp::kmx::DebugLog_1(file, line, function, (msg),__VA_ARGS__) : 0) +#define DebugLog(msg,...) (km::core::kmx::ShouldDebug() ? km::core::kmx::DebugLog_1(__FILE__, __LINE__, __FUNCTION__, (msg),__VA_ARGS__) : 0) +#define DebugLog2(file,line,function,msg,...) (km::core::kmx::ShouldDebug() ? km::core::kmx::DebugLog_1(file, line, function, (msg),__VA_ARGS__) : 0) #define console_error(msg,...) write_console(TRUE, (msg), __VA_ARGS__) #define console_log(msg,...) write_console(FALSE, (msg), __VA_ARGS__) #else -#define DebugLog(msg,...) (km::kbp::kmx::ShouldDebug() ? km::kbp::kmx::DebugLog_1(__FILE__, __LINE__, __FUNCTION__, (msg), ##__VA_ARGS__) : 0) -#define DebugLog2(file,line,function,msg,...) (km::kbp::kmx::ShouldDebug() ? km::kbp::kmx::DebugLog_1(file, line, function, (msg), ##__VA_ARGS__) : 0) +#define DebugLog(msg,...) (km::core::kmx::ShouldDebug() ? km::core::kmx::DebugLog_1(__FILE__, __LINE__, __FUNCTION__, (msg), ##__VA_ARGS__) : 0) +#define DebugLog2(file,line,function,msg,...) (km::core::kmx::ShouldDebug() ? km::core::kmx::DebugLog_1(file, line, function, (msg), ##__VA_ARGS__) : 0) #define console_error(msg,...) write_console(TRUE, (msg), ##__VA_ARGS__) #define console_log(msg,...) write_console(FALSE, (msg), ##__VA_ARGS__) #endif diff --git a/core/src/keyboard.cpp b/core/src/keyboard.cpp index 47693b9b664..2c3a0c11b2c 100644 --- a/core/src/keyboard.cpp +++ b/core/src/keyboard.cpp @@ -8,7 +8,7 @@ #include "keyboard.hpp" #include "jsonpp.hpp" -using namespace km::kbp; +using namespace km::core; inline @@ -54,7 +54,7 @@ keyboard_attributes & keyboard_attributes::operator = (keyboard_attributes &&rhs } -json & km::kbp::operator << (json & j, km::kbp::keyboard_attributes const & kb) +json & km::core::operator << (json & j, km::core::keyboard_attributes const & kb) { j << json::object << "id" << kb.id diff --git a/core/src/keyboard.hpp b/core/src/keyboard.hpp index 97329b7e761..6dd8517ce10 100644 --- a/core/src/keyboard.hpp +++ b/core/src/keyboard.hpp @@ -20,13 +20,13 @@ class json; namespace km { -namespace kbp +namespace core { class keyboard_attributes : public km_core_keyboard_attrs { std::u16string _keyboard_id; std::u16string _version_string; - kbp::path _folder_path; + core::path _folder_path; std::vector