-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Improved code base by using PVS Studio static code analyzer. * Improved text rendering for Windows platform. * Significant improvements related to rectangle area clipping for Windows platform. * Several improvements against grabbing events for Windows. * Updated module versions in dependencies.
- Loading branch information
Showing
20 changed files
with
553 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
* Copyright (C) 2020 Linux Studio Plugins Project <https://lsp-plug.in/> | ||
* (C) 2020 Vladimir Sadovnikov <[email protected]> | ||
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/> | ||
* (C) 2023 Vladimir Sadovnikov <[email protected]> | ||
* | ||
* This file is part of lsp-ws-lib | ||
* Created on: 5 июл. 2022 г. | ||
|
@@ -89,8 +89,8 @@ namespace lsp | |
void draw_negative_arc(ID2D1Brush *brush, float x0, float y0, float x1, float y1, float x2, float y2); | ||
void draw_polygon(ID2D1Brush *brush, const float *x, const float *y, size_t n, float width); | ||
|
||
bool try_out_text(IDWriteFontCollection *fc, IDWriteFontFamily *ff, const WCHAR *family, const Font &f, const Color &color, float x, float y, const WCHAR *text, size_t length); | ||
bool try_out_text_relative(IDWriteFontCollection *fc, IDWriteFontFamily *ff, const WCHAR *family, const Font &f, const Color &color, float x, float y, float dx, float dy, const WCHAR *text, size_t length); | ||
bool try_out_text(IDWriteFontCollection *fc, IDWriteFontFamily *ff, const WCHAR *family, const Font &f, const Color &color, float x, float y, const lsp_wchar_t *text, size_t length); | ||
bool try_out_text_relative(IDWriteFontCollection *fc, IDWriteFontFamily *ff, const WCHAR *family, const Font &f, const Color &color, float x, float y, float dx, float dy, const lsp_wchar_t *text, size_t length); | ||
|
||
public: | ||
virtual IDisplay *display() override; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
* Copyright (C) 2020 Linux Studio Plugins Project <https://lsp-plug.in/> | ||
* (C) 2020 Vladimir Sadovnikov <[email protected]> | ||
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/> | ||
* (C) 2023 Vladimir Sadovnikov <[email protected]> | ||
* | ||
* This file is part of lsp-ws-lib | ||
* Created on: 1 июл. 2022 г. | ||
|
@@ -39,6 +39,8 @@ | |
#include <d2d1.h> | ||
#include <dwrite.h> | ||
|
||
#include <private/win/fonts.h> | ||
|
||
//----------------------------------------------------------------------------- | ||
// Some specific definitions | ||
#ifndef WM_MOUSEHWHEEL | ||
|
@@ -102,6 +104,7 @@ namespace lsp | |
ATOM hClipClass; // Window class for the clipboard | ||
LSPString sDflFontFamily; // Default font family name | ||
MSG sPendingMessage; // Currently pending message | ||
MSG sLastMouseMove; // Last mouse move message | ||
HCURSOR vCursors[__MP_COUNT]; // Cursor handles (cached) | ||
lltl::darray<MonitorInfo> vMonitors; // Monitor information | ||
font_cache_t vFontCache; // Font cache | ||
|
@@ -115,6 +118,7 @@ namespace lsp | |
WinWindow *pDragWindow; // Window which is currently acting in Drag&Drop action | ||
ipc::Thread *pPingThread; // Pinger thread | ||
volatile timestamp_t nLastIdleCall; // The time of last idle call | ||
volatile atomic_t nIdlePending; // Number of idle requests pending | ||
LSPString sWindowClassName; // Window class name | ||
LSPString sClipboardClassName; // Clipboard window class name | ||
|
||
|
@@ -126,12 +130,15 @@ namespace lsp | |
IDWriteTextLayout *create_text_layout(const Font &f, const WCHAR *fname, IDWriteFontCollection *fc, IDWriteFontFamily *ff, const WCHAR *string, size_t length); | ||
IDWriteFontFamily *get_font_family(const Font &f, LSPString *name, font_t **custom); | ||
bool get_font_metrics(const Font &f, IDWriteFontFamily *ff, DWRITE_FONT_METRICS *metrics); | ||
IDWriteFont *get_font(const Font &f, IDWriteFontFamily *ff); | ||
IDWriteFontFace *get_font_face(const Font &f, IDWriteFontFamily *ff); | ||
static void drop_font_cache(font_cache_t *cache); | ||
bool create_font_cache(); | ||
void drop_font(font_t *f); | ||
static font_t *alloc_font(const char *name); | ||
font_t *get_custom_font_collection(const char *name); | ||
bool try_get_text_parameters(const Font &f, const WCHAR *fname, IDWriteFontCollection *fc, IDWriteFontFamily *ff, text_parameters_t *tp, const WCHAR *text, ssize_t length); | ||
bool try_get_text_parameters(const Font &f, const WCHAR *fname, IDWriteFontCollection *fc, IDWriteFontFamily *ff, text_parameters_t *tp, const UINT32 *text, size_t length); | ||
win::glyph_run_t *make_glyph_run(const Font &f, IDWriteFontFace *face, const DWRITE_FONT_METRICS *fm, const UINT32 *text, size_t length); | ||
|
||
status_t install_windows_hooks(); | ||
status_t uninstall_windows_hooks(); | ||
|
Oops, something went wrong.