From 9fa0b890d8195192fd0f44058605aa8ce1c3fdd9 Mon Sep 17 00:00:00 2001 From: Sergey Yagovtsev Date: Thu, 3 Mar 2016 15:35:23 +0300 Subject: [PATCH] Add colors header --- include/profiler/color.h | 20 ++++++++++++++++++++ include/profiler/profiler.h | 4 ++-- src/CMakeLists.txt | 1 + 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 include/profiler/color.h diff --git a/include/profiler/color.h b/include/profiler/color.h new file mode 100644 index 0000000..b366f08 --- /dev/null +++ b/include/profiler/color.h @@ -0,0 +1,20 @@ +#ifndef ____PROFILER_____COLOR_____H_____ +#define ____PROFILER_____COLOR_____H_____ + +#include + +namespace profiler{ + typedef uint16_t color_t; //16-bit RGB format (5-6-5) + namespace colors{ + + const color_t Red = 0xF800; + const color_t Green = 0x07E0; + const color_t Blue = 0x001F; + + const color_t White = 0xFFFF; + const color_t Black = 0x0000; + + } +} + +#endif \ No newline at end of file diff --git a/include/profiler/profiler.h b/include/profiler/profiler.h index 8f84019..554ef01 100644 --- a/include/profiler/profiler.h +++ b/include/profiler/profiler.h @@ -160,6 +160,7 @@ void foo() #include #include +#include "profiler/color.h" #ifdef _WIN32 #ifdef _BUILD_PROFILER @@ -172,7 +173,7 @@ void foo() #endif namespace profiler -{ +{ class Block; extern "C"{ @@ -183,7 +184,6 @@ namespace profiler typedef uint8_t block_type_t; typedef uint64_t timestamp_t; - typedef uint16_t color_t; //16-bit RGB format (5-6-5) typedef uint32_t thread_id_t; const block_type_t BLOCK_TYPE_EVENT = 1; diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5b776a1..80bd160 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -9,6 +9,7 @@ set(H_FILES ${ROOT}/include/profiler/profiler.h profile_manager.h spin_lock.h + ${ROOT}/include/profiler/color.h ) set(SOURCES