annotate src/gui_dwrite.h @ 6456:fcd5a3207100 v7.4.557

updated for version 7.4.557 Problem: One more small issue. Solution: Update function proto.
author Bram Moolenaar <bram@vim.org>
date Wed, 17 Dec 2014 14:47:56 +0100
parents 1bff71d20262
children 2ebc3df65ca2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6110
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
1 /* vi:set ts=8 sts=4 sw=4 noet: */
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
2 /*
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
3 * Author: MURAOKA Taro <koron.kaoriya@gmail.com>
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
4 *
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
5 * Contributors:
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
6 * - Ken Takata
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
7 *
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8 * Copyright (C) 2013 MURAOKA Taro <koron.kaoriya@gmail.com>
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9 * THIS FILE IS DISTRIBUTED UNDER THE VIM LICENSE.
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10 */
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
12 #ifndef GUI_DWRITE_H
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13 #define GUI_DWRITE_H
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15 #ifdef __cplusplus
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
16 extern "C" {
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
17 #endif
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
18
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19 typedef struct DWriteContext DWriteContext;
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
21 typedef struct DWriteRenderingParams {
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22 float gamma;
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23 float enhancedContrast;
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24 float clearTypeLevel;
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25 /*
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26 * pixelGeometry:
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 * 0 - DWRITE_PIXEL_GEOMETRY_FLAT
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 * 1 - DWRITE_PIXEL_GEOMETRY_RGB
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29 * 2 - DWRITE_PIXEL_GEOMETRY_BGR
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30 */
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
31 int pixelGeometry;
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
32 /*
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
33 * renderingMode:
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
34 * 0 - DWRITE_RENDERING_MODE_DEFAULT
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
35 * 1 - DWRITE_RENDERING_MODE_ALIASED
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
36 * 2 - DWRITE_RENDERING_MODE_CLEARTYPE_GDI_CLASSIC
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
37 * 3 - DWRITE_RENDERING_MODE_CLEARTYPE_GDI_NATURAL
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
38 * 4 - DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
39 * 5 - DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL_SYMMETRIC
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
40 * 6 - DWRITE_RENDERING_MODE_OUTLINE
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
41 */
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
42 int renderingMode;
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
43 /*
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
44 * antialiasMode:
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
45 * 0 - D2D1_TEXT_ANTIALIAS_MODE_DEFAULT
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
46 * 1 - D2D1_TEXT_ANTIALIAS_MODE_CLEARTYPE
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
47 * 2 - D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
48 * 3 - D2D1_TEXT_ANTIALIAS_MODE_ALIASED
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
49 */
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
50 int textAntialiasMode;
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
51 } DWriteRenderingParams;
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
52
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
53 void DWrite_Init(void);
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
54 void DWrite_Final(void);
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
55
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
56 DWriteContext *DWriteContext_Open(void);
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
57 void DWriteContext_BeginDraw(DWriteContext *ctx);
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
58 void DWriteContext_BindDC(DWriteContext *ctx, HDC hdc, RECT *rect);
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
59 void DWriteContext_SetFont(DWriteContext *ctx, HFONT hFont);
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
60 void DWriteContext_DrawText(
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
61 DWriteContext *ctx,
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
62 HDC hdc,
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
63 const WCHAR* text,
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
64 int len,
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
65 int x,
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
66 int y,
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
67 int w,
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
68 int h,
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
69 int cellWidth,
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
70 COLORREF color);
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
71 void DWriteContext_EndDraw(DWriteContext *ctx);
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
72 void DWriteContext_Close(DWriteContext *ctx);
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
73
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
74 void DWriteContext_SetRenderingParams(
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
75 DWriteContext *ctx,
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
76 const DWriteRenderingParams *params);
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
77
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
78 DWriteRenderingParams *DWriteContext_GetRenderingParams(
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
79 DWriteContext *ctx,
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
80 DWriteRenderingParams *params);
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
81
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
82 #ifdef __cplusplus
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
83 }
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
84 #endif
1bff71d20262 updated for version 7.4.393
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
85 #endif/*GUI_DWRITE_H*/