diff --git a/client/SDL/dialogs/CMakeLists.txt b/client/SDL/dialogs/CMakeLists.txt index 12bf91018..23cdc11b9 100644 --- a/client/SDL/dialogs/CMakeLists.txt +++ b/client/SDL/dialogs/CMakeLists.txt @@ -22,32 +22,39 @@ set(SRCS set(LIBS ${SDL2_LIBRARIES} font + icon winpr ) -find_package(SDL2_ttf COMPONENTS) -if (NOT SDL2_ttf_FOUND) - find_package(PkgConfig REQUIRED) - pkg_check_modules(SDL2_ttf REQUIRED SDL2_ttf) +macro(find_sdl_component name) + find_package(${name}) + if (NOT ${name}_FOUND) + find_package(PkgConfig REQUIRED) + pkg_check_modules(${name} REQUIRED ${name}) - if (BUILD_SHARED_LIBS) - list(APPEND LIBS ${SDL2_ttf_LIBRARIES}) - link_directories(${SDL2_ttf_LIBRARY_DIRS}) - include_directories(${SDL2_ttf_INCLUDE_DIRS}) + if (BUILD_SHARED_LIBS) + list(APPEND LIBS ${${name}_LIBRARIES}) + link_directories(${${name}_LIBRARY_DIRS}) + include_directories(${${name}_INCLUDE_DIRS}) + else() + list(APPEND LIBS ${${name}_STATIC_LIBRARIES}) + link_directories(${${name}_STATIC_LIBRARY_DIRS}) + include_directories(${${name}_STATIC_INCLUDE_DIRS}) + endif() else() - list(APPEND LIBS ${SDL2_ttf_STATIC_LIBRARIES}) - link_directories(${SDL2_ttf_STATIC_LIBRARY_DIRS}) - include_directories(${SDL2_ttf_STATIC_INCLUDE_DIRS}) + if (BUILD_SHARED_LIBS) + list(APPEND LIBS ${name}::${name}) + else() + list(APPEND LIBS ${name}::${name}-static) + endif() endif() -else() - if (BUILD_SHARED_LIBS) - list(APPEND LIBS SDL2_ttf::SDL2_ttf) - else() - list(APPEND LIBS SDL2_ttf::SDL2_ttf-static) - endif() -endif() +endmacro() + +find_sdl_component(SDL2_ttf) +find_sdl_component(SDL2_image) add_subdirectory(font) +add_subdirectory(icon) add_library(dialogs STATIC ${SRCS} diff --git a/client/SDL/dialogs/icon/CMakeLists.txt b/client/SDL/dialogs/icon/CMakeLists.txt new file mode 100644 index 000000000..b16e19389 --- /dev/null +++ b/client/SDL/dialogs/icon/CMakeLists.txt @@ -0,0 +1,5 @@ +add_library(icon OBJECT + FreeRDP_Icon.hpp + FreeRDP_Icon.cpp +) +set_property(TARGET font PROPERTY POSITION_INDEPENDENT_CODE ON) diff --git a/client/SDL/dialogs/icon/FreeRDP_Icon.cpp b/client/SDL/dialogs/icon/FreeRDP_Icon.cpp new file mode 100644 index 000000000..2f788ab0d --- /dev/null +++ b/client/SDL/dialogs/icon/FreeRDP_Icon.cpp @@ -0,0 +1,356 @@ +/* AUTOGENERATED file, do not edit + * + * contains the converted font resources/FreeRDP_Icon.svg + */ +#include +#include "FreeRDP_Icon.hpp" + +const std::string FreeRDP_Icon_buffer_type = "svg"; +static std::vector init(); +const std::vector FreeRDP_Icon_buffer = init(); + +std::vector init() +{ + static const unsigned char data[] = { + 0x3c, 0x3f, 0x78, 0x6d, 0x6c, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3d, 0x22, + 0x31, 0x2e, 0x30, 0x22, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x3d, 0x22, + 0x55, 0x54, 0x46, 0x2d, 0x38, 0x22, 0x20, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x6c, 0x6f, + 0x6e, 0x65, 0x3d, 0x22, 0x6e, 0x6f, 0x22, 0x3f, 0x3e, 0x0a, 0x3c, 0x21, 0x2d, 0x2d, 0x20, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x20, 0x41, 0x64, 0x6f, 0x62, + 0x65, 0x20, 0x49, 0x6c, 0x6c, 0x75, 0x73, 0x74, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x20, 0x31, + 0x35, 0x2e, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x53, 0x56, 0x47, 0x20, 0x45, 0x78, 0x70, 0x6f, + 0x72, 0x74, 0x20, 0x50, 0x6c, 0x75, 0x67, 0x2d, 0x49, 0x6e, 0x20, 0x2e, 0x20, 0x53, 0x56, + 0x47, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x36, 0x2e, 0x30, 0x30, + 0x20, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x20, 0x30, 0x29, 0x20, 0x20, 0x2d, 0x2d, 0x3e, 0x0a, + 0x0a, 0x3c, 0x73, 0x76, 0x67, 0x0a, 0x20, 0x20, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, + 0x64, 0x63, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x70, 0x75, 0x72, 0x6c, + 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x64, 0x63, 0x2f, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x2f, 0x31, 0x2e, 0x31, 0x2f, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x78, 0x6d, 0x6c, 0x6e, + 0x73, 0x3a, 0x63, 0x63, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x69, 0x76, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x73, 0x2e, 0x6f, + 0x72, 0x67, 0x2f, 0x6e, 0x73, 0x23, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x78, 0x6d, 0x6c, 0x6e, + 0x73, 0x3a, 0x72, 0x64, 0x66, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, + 0x77, 0x77, 0x2e, 0x77, 0x33, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x31, 0x39, 0x39, 0x39, 0x2f, + 0x30, 0x32, 0x2f, 0x32, 0x32, 0x2d, 0x72, 0x64, 0x66, 0x2d, 0x73, 0x79, 0x6e, 0x74, 0x61, + 0x78, 0x2d, 0x6e, 0x73, 0x23, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, + 0x3a, 0x73, 0x76, 0x67, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, + 0x77, 0x2e, 0x77, 0x33, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x32, 0x30, 0x30, 0x30, 0x2f, 0x73, + 0x76, 0x67, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3d, 0x22, 0x68, + 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x77, 0x33, 0x2e, 0x6f, 0x72, + 0x67, 0x2f, 0x32, 0x30, 0x30, 0x30, 0x2f, 0x73, 0x76, 0x67, 0x22, 0x0a, 0x20, 0x20, 0x20, + 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3a, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3d, + 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, + 0x69, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x66, 0x6f, 0x72, 0x67, 0x65, 0x2e, 0x6e, + 0x65, 0x74, 0x2f, 0x44, 0x54, 0x44, 0x2f, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, + 0x2d, 0x30, 0x2e, 0x64, 0x74, 0x64, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x78, 0x6d, 0x6c, 0x6e, + 0x73, 0x3a, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3d, 0x22, 0x68, 0x74, 0x74, + 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, + 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x73, 0x2f, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x22, 0x0a, 0x20, 0x20, 0x20, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x31, 0x2e, 0x31, 0x22, 0x0a, 0x20, + 0x20, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x31, 0x22, 0x0a, + 0x20, 0x20, 0x20, 0x78, 0x3d, 0x22, 0x30, 0x70, 0x78, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x79, + 0x3d, 0x22, 0x30, 0x70, 0x78, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x77, 0x69, 0x64, 0x74, 0x68, + 0x3d, 0x22, 0x31, 0x39, 0x39, 0x2e, 0x32, 0x38, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x68, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x3d, 0x22, 0x32, 0x37, 0x37, 0x2e, 0x38, 0x39, 0x30, 0x30, 0x31, + 0x22, 0x0a, 0x20, 0x20, 0x20, 0x76, 0x69, 0x65, 0x77, 0x42, 0x6f, 0x78, 0x3d, 0x22, 0x30, + 0x20, 0x30, 0x20, 0x31, 0x39, 0x39, 0x2e, 0x32, 0x37, 0x39, 0x39, 0x37, 0x20, 0x32, 0x37, + 0x37, 0x2e, 0x38, 0x39, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x2d, 0x62, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x3d, 0x22, 0x6e, 0x65, + 0x77, 0x20, 0x30, 0x20, 0x30, 0x20, 0x35, 0x39, 0x35, 0x2e, 0x32, 0x38, 0x20, 0x38, 0x34, + 0x31, 0x2e, 0x38, 0x39, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x78, 0x6d, 0x6c, 0x3a, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x3d, 0x22, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x22, 0x0a, + 0x20, 0x20, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x30, 0x2e, 0x34, 0x38, 0x2e, 0x32, 0x20, 0x72, 0x39, + 0x38, 0x31, 0x39, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, + 0x69, 0x3a, 0x64, 0x6f, 0x63, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x46, 0x72, 0x65, 0x65, + 0x52, 0x44, 0x50, 0x5f, 0x4c, 0x6f, 0x67, 0x6f, 0x5f, 0x49, 0x63, 0x6f, 0x6e, 0x2e, 0x73, + 0x76, 0x67, 0x22, 0x3e, 0x3c, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x0a, 0x20, + 0x20, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x37, + 0x33, 0x22, 0x3e, 0x3c, 0x72, 0x64, 0x66, 0x3a, 0x52, 0x44, 0x46, 0x3e, 0x3c, 0x63, 0x63, + 0x3a, 0x57, 0x6f, 0x72, 0x6b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x64, + 0x66, 0x3a, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x3d, 0x22, 0x22, 0x3e, 0x3c, 0x64, 0x63, 0x3a, + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x3e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x73, 0x76, + 0x67, 0x2b, 0x78, 0x6d, 0x6c, 0x3c, 0x2f, 0x64, 0x63, 0x3a, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x3e, 0x3c, 0x64, 0x63, 0x3a, 0x74, 0x79, 0x70, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x64, 0x66, 0x3a, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x70, 0x75, 0x72, 0x6c, + 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x64, 0x63, 0x2f, 0x64, 0x63, 0x6d, 0x69, 0x74, 0x79, 0x70, + 0x65, 0x2f, 0x53, 0x74, 0x69, 0x6c, 0x6c, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x22, 0x20, 0x2f, + 0x3e, 0x3c, 0x64, 0x63, 0x3a, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3e, 0x3c, 0x2f, 0x64, 0x63, + 0x3a, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3e, 0x3c, 0x2f, 0x63, 0x63, 0x3a, 0x57, 0x6f, 0x72, + 0x6b, 0x3e, 0x3c, 0x2f, 0x72, 0x64, 0x66, 0x3a, 0x52, 0x44, 0x46, 0x3e, 0x3c, 0x2f, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x3e, 0x3c, 0x64, 0x65, 0x66, 0x73, 0x0a, 0x20, + 0x20, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x64, 0x65, 0x66, 0x73, 0x37, 0x31, 0x22, 0x20, 0x2f, + 0x3e, 0x3c, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x6e, 0x61, 0x6d, 0x65, + 0x64, 0x76, 0x69, 0x65, 0x77, 0x0a, 0x20, 0x20, 0x20, 0x70, 0x61, 0x67, 0x65, 0x63, 0x6f, + 0x6c, 0x6f, 0x72, 0x3d, 0x22, 0x23, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x22, 0x0a, 0x20, + 0x20, 0x20, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3d, 0x22, + 0x23, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x62, 0x6f, 0x72, + 0x64, 0x65, 0x72, 0x6f, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x3d, 0x22, 0x31, 0x22, 0x0a, + 0x20, 0x20, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x74, 0x6f, 0x6c, 0x65, 0x72, 0x61, + 0x6e, 0x63, 0x65, 0x3d, 0x22, 0x31, 0x30, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x67, 0x72, 0x69, + 0x64, 0x74, 0x6f, 0x6c, 0x65, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x3d, 0x22, 0x31, 0x30, 0x22, + 0x0a, 0x20, 0x20, 0x20, 0x67, 0x75, 0x69, 0x64, 0x65, 0x74, 0x6f, 0x6c, 0x65, 0x72, 0x61, + 0x6e, 0x63, 0x65, 0x3d, 0x22, 0x31, 0x30, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x69, 0x6e, 0x6b, + 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x70, 0x61, 0x67, 0x65, 0x6f, 0x70, 0x61, 0x63, 0x69, + 0x74, 0x79, 0x3d, 0x22, 0x30, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, + 0x61, 0x70, 0x65, 0x3a, 0x70, 0x61, 0x67, 0x65, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x3d, + 0x22, 0x32, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, + 0x3a, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2d, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3d, 0x22, + 0x31, 0x36, 0x38, 0x30, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, + 0x70, 0x65, 0x3a, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2d, 0x68, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x3d, 0x22, 0x31, 0x30, 0x32, 0x36, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x69, 0x64, 0x3d, + 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x76, 0x69, 0x65, 0x77, 0x36, 0x39, 0x22, 0x0a, 0x20, + 0x20, 0x20, 0x73, 0x68, 0x6f, 0x77, 0x67, 0x72, 0x69, 0x64, 0x3d, 0x22, 0x66, 0x61, 0x6c, + 0x73, 0x65, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, + 0x3a, 0x7a, 0x6f, 0x6f, 0x6d, 0x3d, 0x22, 0x31, 0x2e, 0x31, 0x32, 0x31, 0x32, 0x38, 0x36, + 0x36, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, + 0x63, 0x78, 0x3d, 0x22, 0x32, 0x39, 0x35, 0x2e, 0x39, 0x31, 0x35, 0x32, 0x34, 0x22, 0x0a, + 0x20, 0x20, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x63, 0x79, 0x3d, + 0x22, 0x33, 0x35, 0x36, 0x2e, 0x33, 0x32, 0x30, 0x30, 0x38, 0x22, 0x0a, 0x20, 0x20, 0x20, + 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, + 0x2d, 0x78, 0x3d, 0x22, 0x30, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, + 0x61, 0x70, 0x65, 0x3a, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2d, 0x79, 0x3d, 0x22, 0x32, + 0x34, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, + 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2d, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x69, 0x7a, 0x65, + 0x64, 0x3d, 0x22, 0x31, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, + 0x70, 0x65, 0x3a, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x61, 0x79, 0x65, + 0x72, 0x3d, 0x22, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x31, 0x22, 0x20, 0x2f, 0x3e, 0x0a, + 0x0a, 0x3c, 0x67, 0x0a, 0x20, 0x20, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x67, 0x34, 0x31, 0x22, + 0x0a, 0x20, 0x20, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x3d, 0x22, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x65, 0x28, 0x2d, 0x32, 0x39, 0x37, 0x2e, + 0x38, 0x37, 0x32, 0x31, 0x2c, 0x2d, 0x32, 0x37, 0x38, 0x2e, 0x36, 0x32, 0x30, 0x33, 0x31, + 0x29, 0x22, 0x3e, 0x0a, 0x09, 0x3c, 0x70, 0x61, 0x74, 0x68, 0x0a, 0x20, 0x20, 0x20, 0x64, + 0x3d, 0x22, 0x6d, 0x20, 0x33, 0x39, 0x39, 0x2e, 0x38, 0x31, 0x2c, 0x33, 0x35, 0x32, 0x2e, + 0x35, 0x36, 0x36, 0x20, 0x63, 0x20, 0x30, 0x2c, 0x30, 0x20, 0x39, 0x2e, 0x39, 0x38, 0x35, + 0x2c, 0x2d, 0x37, 0x2e, 0x37, 0x36, 0x35, 0x20, 0x31, 0x34, 0x2e, 0x34, 0x32, 0x31, 0x2c, + 0x31, 0x2e, 0x31, 0x30, 0x39, 0x20, 0x34, 0x2e, 0x34, 0x33, 0x36, 0x2c, 0x38, 0x2e, 0x38, + 0x37, 0x34, 0x20, 0x31, 0x39, 0x2e, 0x39, 0x36, 0x36, 0x2c, 0x33, 0x33, 0x2e, 0x32, 0x37, + 0x35, 0x20, 0x32, 0x34, 0x2e, 0x34, 0x2c, 0x34, 0x31, 0x2e, 0x30, 0x33, 0x39, 0x20, 0x34, + 0x2e, 0x34, 0x34, 0x2c, 0x37, 0x2e, 0x37, 0x36, 0x34, 0x20, 0x38, 0x2e, 0x32, 0x35, 0x37, + 0x2c, 0x32, 0x30, 0x2e, 0x37, 0x30, 0x32, 0x20, 0x34, 0x2e, 0x34, 0x34, 0x2c, 0x33, 0x34, + 0x2e, 0x33, 0x38, 0x34, 0x20, 0x2d, 0x34, 0x2e, 0x34, 0x34, 0x2c, 0x31, 0x35, 0x2e, 0x39, + 0x20, 0x2d, 0x32, 0x34, 0x2e, 0x34, 0x30, 0x35, 0x2c, 0x32, 0x37, 0x2e, 0x37, 0x33, 0x31, + 0x20, 0x2d, 0x33, 0x36, 0x2e, 0x36, 0x30, 0x33, 0x2c, 0x31, 0x37, 0x2e, 0x37, 0x34, 0x38, + 0x20, 0x2d, 0x31, 0x32, 0x2e, 0x32, 0x30, 0x33, 0x2c, 0x2d, 0x39, 0x2e, 0x39, 0x38, 0x33, + 0x20, 0x2d, 0x36, 0x2e, 0x36, 0x35, 0x38, 0x2c, 0x2d, 0x39, 0x34, 0x2e, 0x32, 0x38, 0x20, + 0x2d, 0x36, 0x2e, 0x36, 0x35, 0x38, 0x2c, 0x2d, 0x39, 0x34, 0x2e, 0x32, 0x38, 0x20, 0x7a, + 0x22, 0x0a, 0x20, 0x20, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x70, 0x61, 0x74, 0x68, 0x34, 0x33, + 0x22, 0x0a, 0x20, 0x20, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2d, 0x63, 0x75, 0x72, 0x76, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x3d, 0x22, 0x30, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x73, 0x74, 0x79, 0x6c, + 0x65, 0x3d, 0x22, 0x66, 0x69, 0x6c, 0x6c, 0x3a, 0x23, 0x36, 0x65, 0x62, 0x37, 0x63, 0x38, + 0x22, 0x20, 0x2f, 0x3e, 0x0a, 0x09, 0x3c, 0x70, 0x61, 0x74, 0x68, 0x0a, 0x20, 0x20, 0x20, + 0x64, 0x3d, 0x22, 0x6d, 0x20, 0x34, 0x30, 0x30, 0x2e, 0x39, 0x39, 0x31, 0x2c, 0x33, 0x35, + 0x35, 0x2e, 0x38, 0x39, 0x39, 0x20, 0x63, 0x20, 0x30, 0x2c, 0x30, 0x20, 0x31, 0x38, 0x2e, + 0x34, 0x39, 0x37, 0x2c, 0x32, 0x38, 0x2e, 0x31, 0x33, 0x35, 0x20, 0x32, 0x32, 0x2e, 0x38, + 0x32, 0x34, 0x2c, 0x33, 0x37, 0x2e, 0x33, 0x34, 0x33, 0x20, 0x31, 0x30, 0x2e, 0x35, 0x34, + 0x37, 0x2c, 0x32, 0x32, 0x2e, 0x34, 0x36, 0x36, 0x20, 0x36, 0x2e, 0x31, 0x36, 0x33, 0x2c, + 0x33, 0x34, 0x2e, 0x39, 0x31, 0x37, 0x20, 0x36, 0x2e, 0x31, 0x36, 0x33, 0x2c, 0x33, 0x34, + 0x2e, 0x39, 0x31, 0x37, 0x20, 0x6c, 0x20, 0x2d, 0x31, 0x34, 0x2e, 0x36, 0x34, 0x2c, 0x38, + 0x2e, 0x34, 0x31, 0x37, 0x20, 0x68, 0x20, 0x2d, 0x32, 0x32, 0x2e, 0x37, 0x35, 0x35, 0x20, + 0x6c, 0x20, 0x38, 0x2e, 0x34, 0x30, 0x38, 0x2c, 0x2d, 0x38, 0x30, 0x2e, 0x36, 0x37, 0x37, + 0x20, 0x7a, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x70, 0x61, 0x74, 0x68, + 0x34, 0x35, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, + 0x3a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2d, 0x63, 0x75, 0x72, 0x76, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x3d, 0x22, 0x30, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x73, 0x74, + 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x66, 0x69, 0x6c, 0x6c, 0x3a, 0x23, 0x30, 0x37, 0x33, 0x36, + 0x35, 0x33, 0x22, 0x20, 0x2f, 0x3e, 0x0a, 0x09, 0x3c, 0x70, 0x61, 0x74, 0x68, 0x0a, 0x20, + 0x20, 0x20, 0x64, 0x3d, 0x22, 0x6d, 0x20, 0x33, 0x32, 0x32, 0x2e, 0x31, 0x37, 0x32, 0x2c, + 0x34, 0x37, 0x35, 0x2e, 0x36, 0x38, 0x36, 0x20, 0x63, 0x20, 0x30, 0x2c, 0x30, 0x20, 0x2d, + 0x34, 0x2e, 0x30, 0x36, 0x31, 0x2c, 0x2d, 0x35, 0x35, 0x2e, 0x31, 0x39, 0x38, 0x20, 0x35, + 0x2e, 0x35, 0x33, 0x39, 0x2c, 0x2d, 0x38, 0x35, 0x2e, 0x35, 0x30, 0x39, 0x20, 0x31, 0x31, + 0x2e, 0x30, 0x39, 0x35, 0x2c, 0x2d, 0x33, 0x35, 0x2e, 0x30, 0x32, 0x33, 0x20, 0x35, 0x36, + 0x2e, 0x39, 0x37, 0x35, 0x2c, 0x2d, 0x31, 0x30, 0x34, 0x2e, 0x35, 0x36, 0x34, 0x20, 0x38, + 0x32, 0x2e, 0x30, 0x38, 0x34, 0x2c, 0x2d, 0x31, 0x30, 0x37, 0x2e, 0x34, 0x38, 0x39, 0x20, + 0x31, 0x38, 0x2e, 0x32, 0x31, 0x31, 0x2c, 0x2d, 0x32, 0x2e, 0x31, 0x32, 0x31, 0x20, 0x31, + 0x33, 0x2e, 0x35, 0x36, 0x36, 0x2c, 0x31, 0x36, 0x2e, 0x33, 0x34, 0x33, 0x20, 0x35, 0x2e, + 0x31, 0x31, 0x37, 0x2c, 0x33, 0x34, 0x2e, 0x37, 0x39, 0x32, 0x20, 0x2d, 0x38, 0x2e, 0x34, + 0x34, 0x33, 0x2c, 0x31, 0x38, 0x2e, 0x34, 0x34, 0x37, 0x20, 0x2d, 0x31, 0x34, 0x2e, 0x33, + 0x34, 0x32, 0x2c, 0x35, 0x39, 0x2e, 0x34, 0x38, 0x33, 0x20, 0x2d, 0x38, 0x2e, 0x30, 0x34, + 0x33, 0x2c, 0x31, 0x30, 0x33, 0x2e, 0x34, 0x38, 0x31, 0x20, 0x37, 0x2e, 0x33, 0x36, 0x31, + 0x2c, 0x35, 0x31, 0x2e, 0x33, 0x39, 0x33, 0x20, 0x2d, 0x38, 0x34, 0x2e, 0x36, 0x39, 0x37, + 0x2c, 0x35, 0x34, 0x2e, 0x37, 0x32, 0x35, 0x20, 0x2d, 0x38, 0x34, 0x2e, 0x36, 0x39, 0x37, + 0x2c, 0x35, 0x34, 0x2e, 0x37, 0x32, 0x35, 0x20, 0x7a, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x69, + 0x64, 0x3d, 0x22, 0x70, 0x61, 0x74, 0x68, 0x34, 0x37, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x69, + 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x2d, 0x63, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3d, 0x22, 0x30, + 0x22, 0x0a, 0x20, 0x20, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x66, 0x69, 0x6c, + 0x6c, 0x3a, 0x23, 0x34, 0x62, 0x38, 0x63, 0x61, 0x31, 0x22, 0x20, 0x2f, 0x3e, 0x0a, 0x09, + 0x3c, 0x70, 0x61, 0x74, 0x68, 0x0a, 0x20, 0x20, 0x20, 0x64, 0x3d, 0x22, 0x6d, 0x20, 0x33, + 0x30, 0x37, 0x2e, 0x31, 0x31, 0x37, 0x2c, 0x35, 0x35, 0x32, 0x2e, 0x32, 0x39, 0x37, 0x20, + 0x68, 0x20, 0x31, 0x38, 0x34, 0x2e, 0x35, 0x31, 0x31, 0x20, 0x63, 0x20, 0x31, 0x2e, 0x34, + 0x34, 0x36, 0x2c, 0x2d, 0x31, 0x34, 0x2e, 0x34, 0x38, 0x36, 0x20, 0x30, 0x2e, 0x35, 0x33, + 0x2c, 0x2d, 0x33, 0x31, 0x2e, 0x38, 0x30, 0x35, 0x20, 0x2d, 0x33, 0x2e, 0x34, 0x30, 0x39, + 0x2c, 0x2d, 0x35, 0x34, 0x2e, 0x36, 0x30, 0x37, 0x20, 0x2d, 0x32, 0x32, 0x2e, 0x39, 0x36, + 0x34, 0x2c, 0x2d, 0x31, 0x33, 0x32, 0x2e, 0x39, 0x32, 0x33, 0x20, 0x2d, 0x32, 0x31, 0x33, + 0x2e, 0x39, 0x34, 0x31, 0x2c, 0x2d, 0x37, 0x32, 0x2e, 0x32, 0x35, 0x32, 0x20, 0x2d, 0x31, + 0x38, 0x32, 0x2e, 0x36, 0x38, 0x35, 0x2c, 0x34, 0x39, 0x2e, 0x33, 0x35, 0x32, 0x20, 0x30, + 0x2e, 0x32, 0x38, 0x2c, 0x31, 0x2e, 0x30, 0x38, 0x38, 0x20, 0x30, 0x2e, 0x38, 0x31, 0x39, + 0x2c, 0x32, 0x2e, 0x39, 0x31, 0x32, 0x20, 0x31, 0x2e, 0x35, 0x38, 0x33, 0x2c, 0x35, 0x2e, + 0x32, 0x35, 0x35, 0x20, 0x7a, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x70, + 0x61, 0x74, 0x68, 0x34, 0x39, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, + 0x61, 0x70, 0x65, 0x3a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2d, 0x63, + 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3d, 0x22, 0x30, 0x22, 0x0a, 0x20, 0x20, + 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x66, 0x69, 0x6c, 0x6c, 0x3a, 0x23, 0x36, + 0x65, 0x62, 0x37, 0x63, 0x38, 0x22, 0x20, 0x2f, 0x3e, 0x0a, 0x09, 0x3c, 0x67, 0x0a, 0x20, + 0x20, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x67, 0x35, 0x31, 0x22, 0x3e, 0x0a, 0x09, 0x09, 0x3c, + 0x70, 0x61, 0x74, 0x68, 0x0a, 0x20, 0x20, 0x20, 0x64, 0x3d, 0x22, 0x6d, 0x20, 0x34, 0x31, + 0x30, 0x2e, 0x36, 0x31, 0x37, 0x2c, 0x35, 0x31, 0x36, 0x2e, 0x37, 0x33, 0x31, 0x20, 0x63, + 0x20, 0x30, 0x2c, 0x31, 0x38, 0x2e, 0x37, 0x37, 0x31, 0x20, 0x2d, 0x31, 0x35, 0x2e, 0x32, + 0x31, 0x37, 0x2c, 0x33, 0x33, 0x2e, 0x39, 0x38, 0x36, 0x20, 0x2d, 0x33, 0x33, 0x2e, 0x39, + 0x38, 0x35, 0x2c, 0x33, 0x33, 0x2e, 0x39, 0x38, 0x36, 0x20, 0x2d, 0x31, 0x38, 0x2e, 0x37, + 0x37, 0x33, 0x2c, 0x30, 0x20, 0x2d, 0x33, 0x33, 0x2e, 0x39, 0x38, 0x39, 0x2c, 0x2d, 0x31, + 0x35, 0x2e, 0x32, 0x31, 0x36, 0x20, 0x2d, 0x33, 0x33, 0x2e, 0x39, 0x38, 0x39, 0x2c, 0x2d, + 0x33, 0x33, 0x2e, 0x39, 0x38, 0x36, 0x20, 0x30, 0x2c, 0x2d, 0x31, 0x38, 0x2e, 0x37, 0x37, + 0x20, 0x31, 0x35, 0x2e, 0x32, 0x31, 0x36, 0x2c, 0x2d, 0x33, 0x33, 0x2e, 0x39, 0x38, 0x36, + 0x20, 0x33, 0x33, 0x2e, 0x39, 0x38, 0x39, 0x2c, 0x2d, 0x33, 0x33, 0x2e, 0x39, 0x38, 0x36, + 0x20, 0x31, 0x38, 0x2e, 0x37, 0x36, 0x38, 0x2c, 0x30, 0x20, 0x33, 0x33, 0x2e, 0x39, 0x38, + 0x35, 0x2c, 0x31, 0x35, 0x2e, 0x32, 0x31, 0x36, 0x20, 0x33, 0x33, 0x2e, 0x39, 0x38, 0x35, + 0x2c, 0x33, 0x33, 0x2e, 0x39, 0x38, 0x36, 0x20, 0x7a, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x69, + 0x64, 0x3d, 0x22, 0x70, 0x61, 0x74, 0x68, 0x35, 0x33, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x69, + 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x2d, 0x63, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3d, 0x22, 0x30, + 0x22, 0x0a, 0x20, 0x20, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x66, 0x69, 0x6c, + 0x6c, 0x3a, 0x23, 0x30, 0x37, 0x33, 0x36, 0x35, 0x33, 0x22, 0x20, 0x2f, 0x3e, 0x0a, 0x09, + 0x09, 0x3c, 0x70, 0x61, 0x74, 0x68, 0x0a, 0x20, 0x20, 0x20, 0x64, 0x3d, 0x22, 0x6d, 0x20, + 0x34, 0x30, 0x32, 0x2e, 0x37, 0x39, 0x38, 0x2c, 0x35, 0x31, 0x39, 0x2e, 0x30, 0x31, 0x32, + 0x20, 0x63, 0x20, 0x30, 0x2c, 0x31, 0x34, 0x2e, 0x37, 0x39, 0x37, 0x20, 0x2d, 0x31, 0x31, + 0x2e, 0x39, 0x39, 0x35, 0x2c, 0x32, 0x36, 0x2e, 0x37, 0x38, 0x36, 0x20, 0x2d, 0x32, 0x36, + 0x2e, 0x37, 0x38, 0x35, 0x2c, 0x32, 0x36, 0x2e, 0x37, 0x38, 0x36, 0x20, 0x2d, 0x31, 0x34, + 0x2e, 0x37, 0x39, 0x35, 0x2c, 0x30, 0x20, 0x2d, 0x32, 0x36, 0x2e, 0x37, 0x38, 0x35, 0x2c, + 0x2d, 0x31, 0x31, 0x2e, 0x39, 0x38, 0x39, 0x20, 0x2d, 0x32, 0x36, 0x2e, 0x37, 0x38, 0x35, + 0x2c, 0x2d, 0x32, 0x36, 0x2e, 0x37, 0x38, 0x36, 0x20, 0x30, 0x2c, 0x2d, 0x31, 0x34, 0x2e, + 0x37, 0x39, 0x34, 0x20, 0x31, 0x31, 0x2e, 0x39, 0x39, 0x2c, 0x2d, 0x32, 0x36, 0x2e, 0x37, + 0x38, 0x37, 0x20, 0x32, 0x36, 0x2e, 0x37, 0x38, 0x35, 0x2c, 0x2d, 0x32, 0x36, 0x2e, 0x37, + 0x38, 0x37, 0x20, 0x31, 0x34, 0x2e, 0x37, 0x39, 0x2c, 0x30, 0x20, 0x32, 0x36, 0x2e, 0x37, + 0x38, 0x35, 0x2c, 0x31, 0x31, 0x2e, 0x39, 0x39, 0x33, 0x20, 0x32, 0x36, 0x2e, 0x37, 0x38, + 0x35, 0x2c, 0x32, 0x36, 0x2e, 0x37, 0x38, 0x37, 0x20, 0x7a, 0x22, 0x0a, 0x20, 0x20, 0x20, + 0x69, 0x64, 0x3d, 0x22, 0x70, 0x61, 0x74, 0x68, 0x35, 0x35, 0x22, 0x0a, 0x20, 0x20, 0x20, + 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x2d, 0x63, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3d, 0x22, + 0x30, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x66, 0x69, + 0x6c, 0x6c, 0x3a, 0x23, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x22, 0x20, 0x2f, 0x3e, 0x0a, + 0x09, 0x09, 0x3c, 0x63, 0x69, 0x72, 0x63, 0x6c, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x63, 0x78, + 0x3d, 0x22, 0x33, 0x38, 0x35, 0x2e, 0x34, 0x36, 0x32, 0x30, 0x31, 0x22, 0x0a, 0x20, 0x20, + 0x20, 0x63, 0x79, 0x3d, 0x22, 0x35, 0x31, 0x30, 0x2e, 0x37, 0x36, 0x39, 0x30, 0x31, 0x22, + 0x0a, 0x20, 0x20, 0x20, 0x72, 0x3d, 0x22, 0x31, 0x32, 0x2e, 0x36, 0x33, 0x35, 0x22, 0x0a, + 0x20, 0x20, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x63, 0x69, 0x72, 0x63, 0x6c, 0x65, 0x35, 0x37, + 0x22, 0x0a, 0x20, 0x20, 0x20, 0x64, 0x3d, 0x22, 0x6d, 0x20, 0x33, 0x39, 0x38, 0x2e, 0x30, + 0x39, 0x37, 0x30, 0x31, 0x2c, 0x35, 0x31, 0x30, 0x2e, 0x37, 0x36, 0x39, 0x30, 0x31, 0x20, + 0x63, 0x20, 0x30, 0x2c, 0x36, 0x2e, 0x39, 0x37, 0x38, 0x31, 0x32, 0x20, 0x2d, 0x35, 0x2e, + 0x36, 0x35, 0x36, 0x38, 0x39, 0x2c, 0x31, 0x32, 0x2e, 0x36, 0x33, 0x35, 0x20, 0x2d, 0x31, + 0x32, 0x2e, 0x36, 0x33, 0x35, 0x2c, 0x31, 0x32, 0x2e, 0x36, 0x33, 0x35, 0x20, 0x2d, 0x36, + 0x2e, 0x39, 0x37, 0x38, 0x31, 0x32, 0x2c, 0x30, 0x20, 0x2d, 0x31, 0x32, 0x2e, 0x36, 0x33, + 0x35, 0x2c, 0x2d, 0x35, 0x2e, 0x36, 0x35, 0x36, 0x38, 0x38, 0x20, 0x2d, 0x31, 0x32, 0x2e, + 0x36, 0x33, 0x35, 0x2c, 0x2d, 0x31, 0x32, 0x2e, 0x36, 0x33, 0x35, 0x20, 0x30, 0x2c, 0x2d, + 0x36, 0x2e, 0x39, 0x37, 0x38, 0x31, 0x32, 0x20, 0x35, 0x2e, 0x36, 0x35, 0x36, 0x38, 0x38, + 0x2c, 0x2d, 0x31, 0x32, 0x2e, 0x36, 0x33, 0x35, 0x20, 0x31, 0x32, 0x2e, 0x36, 0x33, 0x35, + 0x2c, 0x2d, 0x31, 0x32, 0x2e, 0x36, 0x33, 0x35, 0x20, 0x36, 0x2e, 0x39, 0x37, 0x38, 0x31, + 0x31, 0x2c, 0x30, 0x20, 0x31, 0x32, 0x2e, 0x36, 0x33, 0x35, 0x2c, 0x35, 0x2e, 0x36, 0x35, + 0x36, 0x38, 0x38, 0x20, 0x31, 0x32, 0x2e, 0x36, 0x33, 0x35, 0x2c, 0x31, 0x32, 0x2e, 0x36, + 0x33, 0x35, 0x20, 0x7a, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, + 0x64, 0x69, 0x3a, 0x63, 0x78, 0x3d, 0x22, 0x33, 0x38, 0x35, 0x2e, 0x34, 0x36, 0x32, 0x30, + 0x31, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, + 0x63, 0x79, 0x3d, 0x22, 0x35, 0x31, 0x30, 0x2e, 0x37, 0x36, 0x39, 0x30, 0x31, 0x22, 0x0a, + 0x20, 0x20, 0x20, 0x73, 0x6f, 0x64, 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x72, 0x78, 0x3d, + 0x22, 0x31, 0x32, 0x2e, 0x36, 0x33, 0x35, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x73, 0x6f, 0x64, + 0x69, 0x70, 0x6f, 0x64, 0x69, 0x3a, 0x72, 0x79, 0x3d, 0x22, 0x31, 0x32, 0x2e, 0x36, 0x33, + 0x35, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x66, 0x69, + 0x6c, 0x6c, 0x3a, 0x23, 0x30, 0x37, 0x33, 0x36, 0x35, 0x33, 0x22, 0x20, 0x2f, 0x3e, 0x0a, + 0x09, 0x3c, 0x2f, 0x67, 0x3e, 0x0a, 0x09, 0x3c, 0x70, 0x61, 0x74, 0x68, 0x0a, 0x20, 0x20, + 0x20, 0x64, 0x3d, 0x22, 0x6d, 0x20, 0x34, 0x34, 0x34, 0x2e, 0x35, 0x34, 0x35, 0x2c, 0x35, + 0x33, 0x35, 0x2e, 0x36, 0x37, 0x31, 0x20, 0x63, 0x20, 0x30, 0x2c, 0x30, 0x20, 0x39, 0x2e, + 0x32, 0x32, 0x36, 0x2c, 0x2d, 0x31, 0x33, 0x2e, 0x39, 0x32, 0x36, 0x20, 0x33, 0x33, 0x2e, + 0x39, 0x38, 0x35, 0x2c, 0x2d, 0x39, 0x2e, 0x39, 0x35, 0x34, 0x20, 0x36, 0x2e, 0x30, 0x39, + 0x31, 0x2c, 0x30, 0x2e, 0x39, 0x37, 0x35, 0x20, 0x31, 0x2e, 0x38, 0x35, 0x34, 0x2c, 0x38, + 0x2e, 0x31, 0x30, 0x37, 0x20, 0x31, 0x2e, 0x38, 0x35, 0x34, 0x2c, 0x38, 0x2e, 0x31, 0x30, + 0x37, 0x20, 0x6c, 0x20, 0x2d, 0x31, 0x33, 0x2e, 0x31, 0x39, 0x38, 0x2c, 0x31, 0x34, 0x2e, + 0x32, 0x30, 0x37, 0x20, 0x63, 0x20, 0x30, 0x2c, 0x30, 0x20, 0x2d, 0x31, 0x2e, 0x32, 0x37, + 0x34, 0x2c, 0x33, 0x2e, 0x32, 0x38, 0x39, 0x20, 0x2d, 0x34, 0x2e, 0x34, 0x37, 0x32, 0x2c, + 0x30, 0x2e, 0x34, 0x32, 0x38, 0x20, 0x2d, 0x32, 0x2e, 0x32, 0x31, 0x38, 0x2c, 0x2d, 0x31, + 0x2e, 0x39, 0x38, 0x33, 0x20, 0x2d, 0x31, 0x34, 0x2e, 0x39, 0x37, 0x33, 0x2c, 0x2d, 0x34, + 0x2e, 0x37, 0x31, 0x32, 0x20, 0x2d, 0x31, 0x37, 0x2e, 0x34, 0x39, 0x37, 0x2c, 0x2d, 0x36, + 0x2e, 0x38, 0x39, 0x38, 0x20, 0x2d, 0x32, 0x2e, 0x35, 0x32, 0x2c, 0x2d, 0x32, 0x2e, 0x31, + 0x38, 0x37, 0x20, 0x2d, 0x30, 0x2e, 0x36, 0x37, 0x32, 0x2c, 0x2d, 0x35, 0x2e, 0x38, 0x39, + 0x20, 0x2d, 0x30, 0x2e, 0x36, 0x37, 0x32, 0x2c, 0x2d, 0x35, 0x2e, 0x38, 0x39, 0x20, 0x7a, + 0x22, 0x0a, 0x20, 0x20, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x70, 0x61, 0x74, 0x68, 0x35, 0x39, + 0x22, 0x0a, 0x20, 0x20, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2d, 0x63, 0x75, 0x72, 0x76, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x3d, 0x22, 0x30, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x73, 0x74, 0x79, 0x6c, + 0x65, 0x3d, 0x22, 0x66, 0x69, 0x6c, 0x6c, 0x3a, 0x23, 0x30, 0x37, 0x33, 0x36, 0x35, 0x33, + 0x22, 0x20, 0x2f, 0x3e, 0x0a, 0x09, 0x3c, 0x70, 0x61, 0x74, 0x68, 0x0a, 0x20, 0x20, 0x20, + 0x64, 0x3d, 0x22, 0x6d, 0x20, 0x34, 0x36, 0x38, 0x2e, 0x35, 0x32, 0x39, 0x2c, 0x34, 0x37, + 0x35, 0x2e, 0x36, 0x34, 0x38, 0x20, 0x63, 0x20, 0x30, 0x2c, 0x30, 0x20, 0x2d, 0x30, 0x2e, + 0x34, 0x34, 0x31, 0x2c, 0x34, 0x2e, 0x34, 0x30, 0x31, 0x20, 0x32, 0x2e, 0x34, 0x33, 0x37, + 0x2c, 0x37, 0x2e, 0x30, 0x31, 0x33, 0x20, 0x32, 0x2e, 0x38, 0x38, 0x2c, 0x32, 0x2e, 0x36, + 0x30, 0x38, 0x20, 0x31, 0x33, 0x2e, 0x37, 0x34, 0x33, 0x2c, 0x32, 0x2e, 0x33, 0x38, 0x35, + 0x20, 0x31, 0x34, 0x2e, 0x31, 0x30, 0x38, 0x2c, 0x30, 0x2e, 0x35, 0x38, 0x34, 0x20, 0x30, + 0x2e, 0x33, 0x35, 0x39, 0x2c, 0x2d, 0x31, 0x2e, 0x37, 0x39, 0x38, 0x20, 0x2d, 0x30, 0x2e, + 0x39, 0x39, 0x34, 0x2c, 0x2d, 0x39, 0x2e, 0x33, 0x36, 0x20, 0x2d, 0x34, 0x2e, 0x35, 0x39, + 0x32, 0x2c, 0x2d, 0x39, 0x2e, 0x37, 0x32, 0x33, 0x20, 0x2d, 0x33, 0x2e, 0x36, 0x30, 0x33, + 0x2c, 0x2d, 0x30, 0x2e, 0x33, 0x35, 0x39, 0x20, 0x2d, 0x39, 0x2e, 0x35, 0x33, 0x32, 0x2c, + 0x2d, 0x30, 0x2e, 0x31, 0x35, 0x39, 0x20, 0x2d, 0x31, 0x30, 0x2e, 0x35, 0x33, 0x32, 0x2c, + 0x30, 0x20, 0x2d, 0x30, 0x2e, 0x36, 0x38, 0x2c, 0x30, 0x2e, 0x31, 0x31, 0x33, 0x20, 0x2d, + 0x31, 0x2e, 0x34, 0x34, 0x37, 0x2c, 0x30, 0x2e, 0x34, 0x32, 0x37, 0x20, 0x2d, 0x31, 0x2e, + 0x34, 0x32, 0x31, 0x2c, 0x32, 0x2e, 0x31, 0x32, 0x36, 0x20, 0x7a, 0x22, 0x0a, 0x20, 0x20, + 0x20, 0x69, 0x64, 0x3d, 0x22, 0x70, 0x61, 0x74, 0x68, 0x36, 0x31, 0x22, 0x0a, 0x20, 0x20, + 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x2d, 0x63, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3d, + 0x22, 0x30, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x66, + 0x69, 0x6c, 0x6c, 0x3a, 0x23, 0x30, 0x37, 0x33, 0x36, 0x35, 0x33, 0x22, 0x20, 0x2f, 0x3e, + 0x0a, 0x09, 0x3c, 0x70, 0x61, 0x74, 0x68, 0x0a, 0x20, 0x20, 0x20, 0x64, 0x3d, 0x22, 0x6d, + 0x20, 0x33, 0x39, 0x31, 0x2e, 0x30, 0x37, 0x39, 0x2c, 0x34, 0x39, 0x37, 0x2e, 0x33, 0x35, + 0x34, 0x20, 0x63, 0x20, 0x31, 0x2e, 0x37, 0x32, 0x33, 0x2c, 0x32, 0x2e, 0x35, 0x39, 0x39, + 0x20, 0x31, 0x2e, 0x31, 0x30, 0x39, 0x2c, 0x36, 0x2e, 0x30, 0x34, 0x33, 0x20, 0x2d, 0x31, + 0x2e, 0x33, 0x38, 0x2c, 0x37, 0x2e, 0x37, 0x20, 0x2d, 0x32, 0x2e, 0x34, 0x38, 0x33, 0x2c, + 0x31, 0x2e, 0x36, 0x35, 0x35, 0x20, 0x2d, 0x35, 0x2e, 0x39, 0x30, 0x33, 0x2c, 0x30, 0x2e, + 0x38, 0x39, 0x35, 0x20, 0x2d, 0x37, 0x2e, 0x36, 0x33, 0x31, 0x2c, 0x2d, 0x31, 0x2e, 0x37, + 0x30, 0x34, 0x20, 0x2d, 0x31, 0x2e, 0x37, 0x33, 0x34, 0x2c, 0x2d, 0x32, 0x2e, 0x35, 0x39, + 0x38, 0x20, 0x2d, 0x31, 0x2e, 0x31, 0x31, 0x34, 0x2c, 0x2d, 0x36, 0x2e, 0x30, 0x34, 0x36, + 0x20, 0x31, 0x2e, 0x33, 0x37, 0x33, 0x2c, 0x2d, 0x37, 0x2e, 0x37, 0x20, 0x32, 0x2e, 0x34, + 0x38, 0x34, 0x2c, 0x2d, 0x31, 0x2e, 0x36, 0x35, 0x36, 0x20, 0x35, 0x2e, 0x39, 0x30, 0x34, + 0x2c, 0x2d, 0x30, 0x2e, 0x38, 0x39, 0x34, 0x20, 0x37, 0x2e, 0x36, 0x33, 0x38, 0x2c, 0x31, + 0x2e, 0x37, 0x30, 0x34, 0x20, 0x7a, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x69, 0x64, 0x3d, 0x22, + 0x70, 0x61, 0x74, 0x68, 0x36, 0x33, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x69, 0x6e, 0x6b, 0x73, + 0x63, 0x61, 0x70, 0x65, 0x3a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2d, + 0x63, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3d, 0x22, 0x30, 0x22, 0x0a, 0x20, + 0x20, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x66, 0x69, 0x6c, 0x6c, 0x3a, 0x23, + 0x66, 0x66, 0x66, 0x61, 0x65, 0x61, 0x22, 0x20, 0x2f, 0x3e, 0x0a, 0x09, 0x3c, 0x70, 0x61, + 0x74, 0x68, 0x0a, 0x20, 0x20, 0x20, 0x64, 0x3d, 0x22, 0x6d, 0x20, 0x34, 0x37, 0x37, 0x2e, + 0x31, 0x33, 0x35, 0x2c, 0x35, 0x32, 0x38, 0x2e, 0x37, 0x31, 0x34, 0x20, 0x63, 0x20, 0x30, + 0x2e, 0x31, 0x31, 0x2c, 0x31, 0x2e, 0x36, 0x38, 0x31, 0x20, 0x2d, 0x33, 0x2e, 0x31, 0x33, + 0x39, 0x2c, 0x33, 0x2e, 0x32, 0x36, 0x33, 0x20, 0x2d, 0x37, 0x2e, 0x32, 0x36, 0x33, 0x2c, + 0x33, 0x2e, 0x35, 0x34, 0x31, 0x20, 0x2d, 0x34, 0x2e, 0x31, 0x31, 0x31, 0x2c, 0x30, 0x2e, + 0x32, 0x37, 0x39, 0x20, 0x2d, 0x37, 0x2e, 0x35, 0x35, 0x33, 0x2c, 0x2d, 0x30, 0x2e, 0x38, + 0x35, 0x37, 0x20, 0x2d, 0x37, 0x2e, 0x36, 0x36, 0x32, 0x2c, 0x2d, 0x32, 0x2e, 0x35, 0x33, + 0x35, 0x20, 0x2d, 0x30, 0x2e, 0x31, 0x31, 0x35, 0x2c, 0x2d, 0x31, 0x2e, 0x36, 0x37, 0x39, + 0x20, 0x33, 0x2e, 0x31, 0x33, 0x34, 0x2c, 0x2d, 0x33, 0x2e, 0x32, 0x36, 0x36, 0x20, 0x37, + 0x2e, 0x32, 0x35, 0x36, 0x2c, 0x2d, 0x33, 0x2e, 0x35, 0x34, 0x32, 0x20, 0x34, 0x2e, 0x31, + 0x31, 0x39, 0x2c, 0x2d, 0x30, 0x2e, 0x32, 0x37, 0x39, 0x20, 0x37, 0x2e, 0x35, 0x35, 0x35, + 0x2c, 0x30, 0x2e, 0x38, 0x35, 0x37, 0x20, 0x37, 0x2e, 0x36, 0x36, 0x39, 0x2c, 0x32, 0x2e, + 0x35, 0x33, 0x36, 0x20, 0x7a, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x70, + 0x61, 0x74, 0x68, 0x36, 0x35, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x69, 0x6e, 0x6b, 0x73, 0x63, + 0x61, 0x70, 0x65, 0x3a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2d, 0x63, + 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3d, 0x22, 0x30, 0x22, 0x0a, 0x20, 0x20, + 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x66, 0x69, 0x6c, 0x6c, 0x3a, 0x23, 0x66, + 0x66, 0x66, 0x61, 0x65, 0x61, 0x22, 0x20, 0x2f, 0x3e, 0x0a, 0x09, 0x3c, 0x70, 0x61, 0x74, + 0x68, 0x0a, 0x20, 0x20, 0x20, 0x64, 0x3d, 0x22, 0x6d, 0x20, 0x34, 0x36, 0x36, 0x2e, 0x37, + 0x38, 0x32, 0x2c, 0x35, 0x35, 0x32, 0x2e, 0x32, 0x39, 0x37, 0x20, 0x63, 0x20, 0x2d, 0x30, + 0x2e, 0x32, 0x31, 0x34, 0x2c, 0x2d, 0x32, 0x2e, 0x34, 0x39, 0x31, 0x20, 0x2d, 0x30, 0x2e, + 0x32, 0x39, 0x36, 0x2c, 0x2d, 0x34, 0x2e, 0x30, 0x36, 0x33, 0x20, 0x2d, 0x30, 0x2e, 0x39, + 0x37, 0x35, 0x2c, 0x2d, 0x34, 0x2e, 0x33, 0x33, 0x33, 0x20, 0x2d, 0x30, 0x2e, 0x39, 0x32, + 0x33, 0x2c, 0x2d, 0x30, 0x2e, 0x33, 0x36, 0x38, 0x20, 0x2d, 0x32, 0x2e, 0x30, 0x33, 0x32, + 0x2c, 0x31, 0x2e, 0x34, 0x37, 0x39, 0x20, 0x2d, 0x32, 0x2e, 0x30, 0x33, 0x32, 0x2c, 0x31, + 0x2e, 0x34, 0x37, 0x39, 0x20, 0x76, 0x20, 0x32, 0x2e, 0x38, 0x35, 0x34, 0x20, 0x68, 0x20, + 0x33, 0x2e, 0x30, 0x30, 0x37, 0x20, 0x7a, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x69, 0x64, 0x3d, + 0x22, 0x70, 0x61, 0x74, 0x68, 0x36, 0x37, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x69, 0x6e, 0x6b, + 0x73, 0x63, 0x61, 0x70, 0x65, 0x3a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x2d, 0x63, 0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3d, 0x22, 0x30, 0x22, 0x0a, + 0x20, 0x20, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x66, 0x69, 0x6c, 0x6c, 0x3a, + 0x23, 0x30, 0x37, 0x33, 0x36, 0x35, 0x33, 0x22, 0x20, 0x2f, 0x3e, 0x0a, 0x3c, 0x2f, 0x67, + 0x3e, 0x0a, 0x3c, 0x2f, 0x73, 0x76, 0x67, 0x3e + }; + return std::vector(data, data + sizeof(data)); +}; diff --git a/client/SDL/dialogs/icon/FreeRDP_Icon.hpp b/client/SDL/dialogs/icon/FreeRDP_Icon.hpp new file mode 100644 index 000000000..cba8d2125 --- /dev/null +++ b/client/SDL/dialogs/icon/FreeRDP_Icon.hpp @@ -0,0 +1,7 @@ +#pragma once + +#include +#include + +extern const std::vector FreeRDP_Icon_buffer; +extern const std::string FreeRDP_Icon_buffer_type; diff --git a/client/SDL/dialogs/sdl_connection_dialog.cpp b/client/SDL/dialogs/sdl_connection_dialog.cpp index 695c5d393..9ba79aeec 100644 --- a/client/SDL/dialogs/sdl_connection_dialog.cpp +++ b/client/SDL/dialogs/sdl_connection_dialog.cpp @@ -22,6 +22,7 @@ #include "sdl_connection_dialog.hpp" #include "../sdl_utils.hpp" #include "../sdl_freerdp.hpp" +#include "icon/FreeRDP_Icon.hpp" static const SDL_Color backgroundcolor = { 0x38, 0x36, 0x35, 0xff }; static const SDL_Color textcolor = { 0xd1, 0xcf, 0xcd, 0xff }; @@ -335,9 +336,16 @@ bool SDLConnectionDialog::createWindow() return false; } - SDL_Rect rect = { 0, vpadding, widget_width, total_height - 3 * vpadding - widget_height }; + SdlWidget icon = { _renderer, + { 0, vpadding, widget_width / 4, + total_height - 3 * vpadding - widget_height }, + FreeRDP_Icon_buffer, + FreeRDP_Icon_buffer_type }; + _list.emplace_back(std::move(icon)); + SDL_Rect rect = { widget_width / 4, vpadding, widget_width * 3 / 4, + total_height - 3 * vpadding - widget_height }; auto w = SdlWidget(_renderer, rect, false); - w.set_wrap(); + w.set_wrap(true, widget_width); _list.emplace_back(std::move(w)); rect.y += widget_height + vpadding; diff --git a/client/SDL/dialogs/sdl_connection_dialog.hpp b/client/SDL/dialogs/sdl_connection_dialog.hpp index dd63c287f..5223a8ed1 100644 --- a/client/SDL/dialogs/sdl_connection_dialog.hpp +++ b/client/SDL/dialogs/sdl_connection_dialog.hpp @@ -35,6 +35,8 @@ class SDLConnectionDialog { public: SDLConnectionDialog(rdpContext* context); + SDLConnectionDialog(const SDLConnectionDialog& other) = delete; + SDLConnectionDialog(const SDLConnectionDialog&& other) = delete; virtual ~SDLConnectionDialog(); bool visible() const; diff --git a/client/SDL/dialogs/sdl_widget.cpp b/client/SDL/dialogs/sdl_widget.cpp index 28f913f68..294d1248b 100644 --- a/client/SDL/dialogs/sdl_widget.cpp +++ b/client/SDL/dialogs/sdl_widget.cpp @@ -38,25 +38,53 @@ static const SDL_Color backgroundcolor = { 0x38, 0x36, 0x35, 0xff }; static const Uint32 hpadding = 10; SdlWidget::SdlWidget(SDL_Renderer* renderer, const SDL_Rect& rect, bool input) - : _font(nullptr), _rect(rect), _input(input) + : _rect(rect), _input(input) { assert(renderer); - _ops = SDL_RWFromConstMem(font_buffer.data(), static_cast(font_buffer.size())); - if (_ops) - _font = TTF_OpenFontRW(_ops, 0, 64); + auto ops = SDL_RWFromConstMem(font_buffer.data(), static_cast(font_buffer.size())); + if (!ops) + widget_log_error(-1, "SDL_RWFromConstMem"); + else + { + _font = TTF_OpenFontRW(ops, 1, 64); + widget_log_error(-1, "TTF_OpenFontRW"); + } +} + +SdlWidget::SdlWidget(SDL_Renderer* renderer, const SDL_Rect& rect, const std::string& path) + : _rect(rect) +{ + _image = IMG_LoadTexture(renderer, path.c_str()); + if (!_image) + widget_log_error(-1, "SDL_RWFromConstMem"); +} + +SdlWidget::SdlWidget(SDL_Renderer* renderer, const SDL_Rect& rect, + const std::vector& image, const std::string& type) + : _rect(rect) +{ + auto ops = SDL_RWFromConstMem(image.data(), static_cast(image.size())); + if (!ops) + widget_log_error(-1, "SDL_RWFromConstMem"); + else + { + _image = IMG_LoadTextureTyped_RW(renderer, ops, 1, type.c_str()); + if (!_image) + widget_log_error(-1, "IMG_LoadTextureTyped_RW"); + } } SdlWidget::SdlWidget(SdlWidget&& other) noexcept - : _font(std::move(other._font)), _ops(other._ops), _rect(std::move(other._rect)), - _input(other._input), _wrap(other._wrap) + : _font(std::move(other._font)), _rect(std::move(other._rect)), _input(other._input), + _wrap(other._wrap), _text_width(other._text_width), _image(other._image) { other._font = nullptr; - other._ops = nullptr; + other._image = nullptr; } -SDL_Texture* SdlWidget::render(SDL_Renderer* renderer, const std::string& text, SDL_Color fgcolor, - SDL_Rect& src, SDL_Rect& dst) +SDL_Texture* SdlWidget::render_text(SDL_Renderer* renderer, const std::string& text, + SDL_Color fgcolor, SDL_Rect& src, SDL_Rect& dst) { auto surface = TTF_RenderUTF8_Blended(_font, text.c_str(), fgcolor); if (!surface) @@ -96,13 +124,13 @@ SDL_Texture* SdlWidget::render(SDL_Renderer* renderer, const std::string& text, return texture; } -SDL_Texture* SdlWidget::render_wrapped(SDL_Renderer* renderer, const std::string& text, - SDL_Color fgcolor, SDL_Rect& src, SDL_Rect& dst) +SDL_Texture* SdlWidget::render_text_wrapped(SDL_Renderer* renderer, const std::string& text, + SDL_Color fgcolor, SDL_Rect& src, SDL_Rect& dst) { Sint32 w = 0; Sint32 h = 0; TTF_SizeUTF8(_font, " ", &w, &h); - auto surface = TTF_RenderUTF8_Blended_Wrapped(_font, text.c_str(), fgcolor, 40 * w); + auto surface = TTF_RenderUTF8_Blended_Wrapped(_font, text.c_str(), fgcolor, _text_width); if (!surface) { widget_log_error(-1, "TTF_RenderText_Blended"); @@ -139,8 +167,7 @@ SDL_Texture* SdlWidget::render_wrapped(SDL_Renderer* renderer, const std::string SdlWidget::~SdlWidget() { TTF_CloseFont(_font); - if (_ops) - SDL_RWclose(_ops); + SDL_DestroyTexture(_image); } bool SdlWidget::error_ex(Uint32 res, const char* what, const char* file, size_t line, @@ -198,9 +225,10 @@ bool SdlWidget::wrap() const return _wrap; } -bool SdlWidget::set_wrap(bool wrap) +bool SdlWidget::set_wrap(bool wrap, size_t width) { _wrap = wrap; + _text_width = width; return _wrap; } @@ -219,15 +247,24 @@ bool SdlWidget::update_text(SDL_Renderer* renderer, const std::string& text, SDL SDL_Rect dst{}; SDL_Texture* texture = nullptr; - if (_wrap) - texture = render_wrapped(renderer, text, fgcolor, src, dst); + if (_image) + { + texture = _image; + dst = _rect; + auto rc = SDL_QueryTexture(_image, NULL, NULL, &src.w, &src.h); + if (rc < 0) + widget_log_error(rc, "SDL_QueryTexture"); + } + else if (_wrap) + texture = render_text_wrapped(renderer, text, fgcolor, src, dst); else - texture = render(renderer, text, fgcolor, src, dst); + texture = render_text(renderer, text, fgcolor, src, dst); if (!texture) return false; const int rc = SDL_RenderCopy(renderer, texture, &src, &dst); - SDL_DestroyTexture(texture); + if (!_image) + SDL_DestroyTexture(texture); if (rc < 0) return !widget_log_error(rc, "SDL_RenderCopy"); return true; diff --git a/client/SDL/dialogs/sdl_widget.hpp b/client/SDL/dialogs/sdl_widget.hpp index a7885b100..b2d734a92 100644 --- a/client/SDL/dialogs/sdl_widget.hpp +++ b/client/SDL/dialogs/sdl_widget.hpp @@ -26,6 +26,7 @@ #include #include #include +#include #if defined(_MSC_VER) #include @@ -51,6 +52,9 @@ class SdlWidget { public: SdlWidget(SDL_Renderer* renderer, const SDL_Rect& rect, bool input); + SdlWidget(SDL_Renderer* renderer, const SDL_Rect& rect, const std::string& path); + SdlWidget(SDL_Renderer* renderer, const SDL_Rect& rect, const std::vector& image, + const std::string& type = "SVG"); SdlWidget(SdlWidget&& other) noexcept; virtual ~SdlWidget(); @@ -61,7 +65,7 @@ class SdlWidget SDL_Color bgcolor); bool wrap() const; - bool set_wrap(bool wrap = true); + bool set_wrap(bool wrap = true, size_t width = 0); const SDL_Rect& rect() const; public: @@ -72,17 +76,18 @@ class SdlWidget private: SdlWidget(const SdlWidget& other) = delete; - SDL_Texture* render(SDL_Renderer* renderer, const std::string& text, SDL_Color fgcolor, - SDL_Rect& src, SDL_Rect& dst); - SDL_Texture* render_wrapped(SDL_Renderer* renderer, const std::string& text, SDL_Color fgcolor, - SDL_Rect& src, SDL_Rect& dst); + SDL_Texture* render_text(SDL_Renderer* renderer, const std::string& text, SDL_Color fgcolor, + SDL_Rect& src, SDL_Rect& dst); + SDL_Texture* render_text_wrapped(SDL_Renderer* renderer, const std::string& text, + SDL_Color fgcolor, SDL_Rect& src, SDL_Rect& dst); private: TTF_Font* _font = nullptr; - SDL_RWops* _ops = nullptr; + SDL_Texture* _image = nullptr; SDL_Rect _rect; bool _input = false; bool _wrap = false; + size_t _text_width = 0; }; bool clear_window(SDL_Renderer* renderer); diff --git a/client/SDL/sdl_freerdp.cpp b/client/SDL/sdl_freerdp.cpp index be64040a1..56d6c8f31 100644 --- a/client/SDL/sdl_freerdp.cpp +++ b/client/SDL/sdl_freerdp.cpp @@ -602,7 +602,7 @@ static BOOL sdl_pre_connect(freerdp* instance) sdl->connection_dialog->setTitle("Connecting to '%s'", freerdp_settings_get_server_name(settings)); - sdl->connection_dialog->showInfo("Please wait while the connection is being established"); + sdl->connection_dialog->showInfo("The connection is being established\n\nPlease wait..."); if (!sdl_detect_monitors(sdl, &maxWidth, &maxHeight)) return FALSE;