Mercurial > vim
annotate src/gui_dwrite.h @ 32996:dd8da8f1c2bc v9.0.1790
patch 9.0.1790: Redundant LSP Content-Type header
Commit: https://github.com/vim/vim/commit/8fbd9449e71f2ad93e594be575209a7424eb093e
Author: Magnus Gro? <magnus@mggross.com>
Date: Sun Aug 27 00:49:51 2023 +0200
patch 9.0.1790: Redundant LSP Content-Type header
Problem: The Content-Type header is an optional header that some LSP
servers struggle with and may crash when encountering it.
Solution: Drop the Content-Type header from all messages, because we use
the default value anyway.
Because pretty much all popular LSP clients (e.g. coc.nvim, VSCode) do
not send the Content-Type header, the LSP server ecosystem has developed
such that some LSP servers may even crash when encountering it.
To improve compatibility with these misbehaving LSP servers, we drop
this header as well.
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Magnus Gro? <magnus@mggross.com>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 27 Aug 2023 11:15:03 +0200 |
parents | 808625d4b71b |
children |
rev | line source |
---|---|
6110 | 1 /* vi:set ts=8 sts=4 sw=4 noet: */ |
2 /* | |
3 * Author: MURAOKA Taro <koron.kaoriya@gmail.com> | |
4 * | |
5 * Contributors: | |
6 * - Ken Takata | |
12934
2ebc3df65ca2
patch 8.0.1343: MS-Windows: does not show colored emojis
Christian Brabandt <cb@256bit.org>
parents:
6110
diff
changeset
|
7 * - Yasuhiro Matsumoto |
6110 | 8 * |
9 * Copyright (C) 2013 MURAOKA Taro <koron.kaoriya@gmail.com> | |
10 * THIS FILE IS DISTRIBUTED UNDER THE VIM LICENSE. | |
11 */ | |
12 | |
13 #ifndef GUI_DWRITE_H | |
14 #define GUI_DWRITE_H | |
15 | |
16 #ifdef __cplusplus | |
17 extern "C" { | |
18 #endif | |
19 | |
20 typedef struct DWriteContext DWriteContext; | |
21 | |
22 typedef struct DWriteRenderingParams { | |
23 float gamma; | |
24 float enhancedContrast; | |
25 float clearTypeLevel; | |
26 /* | |
27 * pixelGeometry: | |
28 * 0 - DWRITE_PIXEL_GEOMETRY_FLAT | |
29 * 1 - DWRITE_PIXEL_GEOMETRY_RGB | |
30 * 2 - DWRITE_PIXEL_GEOMETRY_BGR | |
31 */ | |
32 int pixelGeometry; | |
33 /* | |
34 * renderingMode: | |
35 * 0 - DWRITE_RENDERING_MODE_DEFAULT | |
36 * 1 - DWRITE_RENDERING_MODE_ALIASED | |
37 * 2 - DWRITE_RENDERING_MODE_CLEARTYPE_GDI_CLASSIC | |
38 * 3 - DWRITE_RENDERING_MODE_CLEARTYPE_GDI_NATURAL | |
39 * 4 - DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL | |
40 * 5 - DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL_SYMMETRIC | |
41 * 6 - DWRITE_RENDERING_MODE_OUTLINE | |
42 */ | |
43 int renderingMode; | |
44 /* | |
45 * antialiasMode: | |
46 * 0 - D2D1_TEXT_ANTIALIAS_MODE_DEFAULT | |
47 * 1 - D2D1_TEXT_ANTIALIAS_MODE_CLEARTYPE | |
48 * 2 - D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE | |
49 * 3 - D2D1_TEXT_ANTIALIAS_MODE_ALIASED | |
50 */ | |
51 int textAntialiasMode; | |
52 } DWriteRenderingParams; | |
53 | |
54 void DWrite_Init(void); | |
55 void DWrite_Final(void); | |
56 | |
57 DWriteContext *DWriteContext_Open(void); | |
12986
18e6f4addce9
patch 8.0.1369: MS-Windows: drawing underline slow, mFallbackDC not updated
Christian Brabandt <cb@256bit.org>
parents:
12934
diff
changeset
|
58 void DWriteContext_BindDC(DWriteContext *ctx, HDC hdc, const RECT *rect); |
6110 | 59 void DWriteContext_SetFont(DWriteContext *ctx, HFONT hFont); |
60 void DWriteContext_DrawText( | |
61 DWriteContext *ctx, | |
12986
18e6f4addce9
patch 8.0.1369: MS-Windows: drawing underline slow, mFallbackDC not updated
Christian Brabandt <cb@256bit.org>
parents:
12934
diff
changeset
|
62 const WCHAR *text, |
6110 | 63 int len, |
64 int x, | |
65 int y, | |
66 int w, | |
67 int h, | |
68 int cellWidth, | |
12934
2ebc3df65ca2
patch 8.0.1343: MS-Windows: does not show colored emojis
Christian Brabandt <cb@256bit.org>
parents:
6110
diff
changeset
|
69 COLORREF color, |
2ebc3df65ca2
patch 8.0.1343: MS-Windows: does not show colored emojis
Christian Brabandt <cb@256bit.org>
parents:
6110
diff
changeset
|
70 UINT fuOptions, |
12986
18e6f4addce9
patch 8.0.1369: MS-Windows: drawing underline slow, mFallbackDC not updated
Christian Brabandt <cb@256bit.org>
parents:
12934
diff
changeset
|
71 const RECT *lprc, |
18e6f4addce9
patch 8.0.1369: MS-Windows: drawing underline slow, mFallbackDC not updated
Christian Brabandt <cb@256bit.org>
parents:
12934
diff
changeset
|
72 const INT *lpDx); |
18e6f4addce9
patch 8.0.1369: MS-Windows: drawing underline slow, mFallbackDC not updated
Christian Brabandt <cb@256bit.org>
parents:
12934
diff
changeset
|
73 void DWriteContext_FillRect(DWriteContext *ctx, const RECT *rc, COLORREF color); |
18e6f4addce9
patch 8.0.1369: MS-Windows: drawing underline slow, mFallbackDC not updated
Christian Brabandt <cb@256bit.org>
parents:
12934
diff
changeset
|
74 void DWriteContext_DrawLine(DWriteContext *ctx, int x1, int y1, int x2, int y2, |
18e6f4addce9
patch 8.0.1369: MS-Windows: drawing underline slow, mFallbackDC not updated
Christian Brabandt <cb@256bit.org>
parents:
12934
diff
changeset
|
75 COLORREF color); |
18e6f4addce9
patch 8.0.1369: MS-Windows: drawing underline slow, mFallbackDC not updated
Christian Brabandt <cb@256bit.org>
parents:
12934
diff
changeset
|
76 void DWriteContext_SetPixel(DWriteContext *ctx, int x, int y, COLORREF color); |
13150
808625d4b71b
patch 8.0.1449: slow redrawing with DirectX
Christian Brabandt <cb@256bit.org>
parents:
12986
diff
changeset
|
77 void DWriteContext_Scroll(DWriteContext *ctx, int x, int y, const RECT *rc); |
12934
2ebc3df65ca2
patch 8.0.1343: MS-Windows: does not show colored emojis
Christian Brabandt <cb@256bit.org>
parents:
6110
diff
changeset
|
78 void DWriteContext_Flush(DWriteContext *ctx); |
6110 | 79 void DWriteContext_Close(DWriteContext *ctx); |
80 | |
81 void DWriteContext_SetRenderingParams( | |
82 DWriteContext *ctx, | |
83 const DWriteRenderingParams *params); | |
84 | |
85 DWriteRenderingParams *DWriteContext_GetRenderingParams( | |
86 DWriteContext *ctx, | |
87 DWriteRenderingParams *params); | |
88 | |
89 #ifdef __cplusplus | |
90 } | |
91 #endif | |
92 #endif/*GUI_DWRITE_H*/ |