2 * Text format and layout
4 * Copyright 2012 Nikolay Sivov for CodeWeavers
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
29 #include "dwrite_private.h"
31 #include "wine/debug.h"
33 WINE_DEFAULT_DEBUG_CHANNEL(dwrite);
35 struct dwrite_textlayout {
36 IDWriteTextLayout IDWriteTextLayout_iface;
40 static inline struct dwrite_textlayout *impl_from_IDWriteTextLayout(IDWriteTextLayout *iface)
42 return CONTAINING_RECORD(iface, struct dwrite_textlayout, IDWriteTextLayout_iface);
45 static HRESULT WINAPI dwritetextlayout_QueryInterface(IDWriteTextLayout *iface, REFIID riid, void **obj)
47 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
49 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), obj);
51 if (IsEqualIID(riid, &IID_IUnknown) ||
52 IsEqualIID(riid, &IID_IDWriteTextFormat) ||
53 IsEqualIID(riid, &IID_IDWriteTextLayout))
56 IDWriteTextLayout_AddRef(iface);
65 static ULONG WINAPI dwritetextlayout_AddRef(IDWriteTextLayout *iface)
67 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
68 ULONG ref = InterlockedIncrement(&This->ref);
69 TRACE("(%p)->(%d)\n", This, ref);
73 static ULONG WINAPI dwritetextlayout_Release(IDWriteTextLayout *iface)
75 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
76 ULONG ref = InterlockedDecrement(&This->ref);
78 TRACE("(%p)->(%d)\n", This, ref);
86 static HRESULT WINAPI dwritetextlayout_SetTextAlignment(IDWriteTextLayout *iface, DWRITE_TEXT_ALIGNMENT alignment)
88 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
89 FIXME("(%p)->(%d): stub\n", This, alignment);
93 static HRESULT WINAPI dwritetextlayout_SetParagraphAlignment(IDWriteTextLayout *iface, DWRITE_PARAGRAPH_ALIGNMENT alignment)
95 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
96 FIXME("(%p)->(%d): stub\n", This, alignment);
100 static HRESULT WINAPI dwritetextlayout_SetWordWrapping(IDWriteTextLayout *iface, DWRITE_WORD_WRAPPING wrapping)
102 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
103 FIXME("(%p)->(%d): stub\n", This, wrapping);
107 static HRESULT WINAPI dwritetextlayout_SetReadingDirection(IDWriteTextLayout *iface, DWRITE_READING_DIRECTION direction)
109 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
110 FIXME("(%p)->(%d): stub\n", This, direction);
114 static HRESULT WINAPI dwritetextlayout_SetFlowDirection(IDWriteTextLayout *iface, DWRITE_FLOW_DIRECTION direction)
116 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
117 FIXME("(%p)->(%d): stub\n", This, direction);
121 static HRESULT WINAPI dwritetextlayout_SetIncrementalTabStop(IDWriteTextLayout *iface, FLOAT tabstop)
123 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
124 FIXME("(%p)->(%f): stub\n", This, tabstop);
128 static HRESULT WINAPI dwritetextlayout_SetTrimming(IDWriteTextLayout *iface, DWRITE_TRIMMING const *trimming,
129 IDWriteInlineObject *trimming_sign)
131 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
132 FIXME("(%p)->(%p %p): stub\n", This, trimming, trimming_sign);
136 static HRESULT WINAPI dwritetextlayout_SetLineSpacing(IDWriteTextLayout *iface, DWRITE_LINE_SPACING_METHOD spacing,
137 FLOAT line_spacing, FLOAT baseline)
139 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
140 FIXME("(%p)->(%d %f %f): stub\n", This, spacing, line_spacing, baseline);
144 static DWRITE_TEXT_ALIGNMENT WINAPI dwritetextlayout_GetTextAlignment(IDWriteTextLayout *iface)
146 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
147 FIXME("(%p): stub\n", This);
148 return DWRITE_TEXT_ALIGNMENT_LEADING;
151 static DWRITE_PARAGRAPH_ALIGNMENT WINAPI dwritetextlayout_GetParagraphAlignment(IDWriteTextLayout *iface)
153 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
154 FIXME("(%p): stub\n", This);
155 return DWRITE_PARAGRAPH_ALIGNMENT_NEAR;
158 static DWRITE_WORD_WRAPPING WINAPI dwritetextlayout_GetWordWrapping(IDWriteTextLayout *iface)
160 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
161 FIXME("(%p): stub\n", This);
162 return DWRITE_WORD_WRAPPING_NO_WRAP;
165 static DWRITE_READING_DIRECTION WINAPI dwritetextlayout_GetReadingDirection(IDWriteTextLayout *iface)
167 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
168 FIXME("(%p): stub\n", This);
169 return DWRITE_READING_DIRECTION_LEFT_TO_RIGHT;
172 static DWRITE_FLOW_DIRECTION WINAPI dwritetextlayout_GetFlowDirection(IDWriteTextLayout *iface)
174 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
175 FIXME("(%p): stub\n", This);
176 return DWRITE_FLOW_DIRECTION_TOP_TO_BOTTOM;
179 static FLOAT WINAPI dwritetextlayout_GetIncrementalTabStop(IDWriteTextLayout *iface)
181 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
182 FIXME("(%p): stub\n", This);
186 static HRESULT WINAPI dwritetextlayout_GetTrimming(IDWriteTextLayout *iface, DWRITE_TRIMMING *options,
187 IDWriteInlineObject **trimming_sign)
189 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
190 FIXME("(%p)->(%p %p): stub\n", This, options, trimming_sign);
194 static HRESULT WINAPI dwritetextlayout_GetLineSpacing(IDWriteTextLayout *iface, DWRITE_LINE_SPACING_METHOD *method,
195 FLOAT *spacing, FLOAT *baseline)
197 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
198 FIXME("(%p)->(%p %p %p): stub\n", This, method, spacing, baseline);
202 static HRESULT WINAPI dwritetextlayout_GetFontCollection(IDWriteTextLayout *iface, IDWriteFontCollection **collection)
204 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
205 FIXME("(%p)->(%p): stub\n", This, collection);
209 static UINT32 WINAPI dwritetextlayout_GetFontFamilyNameLength(IDWriteTextLayout *iface)
211 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
212 FIXME("(%p): stub\n", This);
216 static HRESULT WINAPI dwritetextlayout_GetFontFamilyName(IDWriteTextLayout *iface, WCHAR *name, UINT32 size)
218 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
219 FIXME("(%p)->(%p %u): stub\n", This, name, size);
223 static DWRITE_FONT_WEIGHT WINAPI dwritetextlayout_GetFontWeight(IDWriteTextLayout *iface)
225 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
226 FIXME("(%p): stub\n", This);
227 return DWRITE_FONT_WEIGHT_NORMAL;
230 static DWRITE_FONT_STYLE WINAPI dwritetextlayout_GetFontStyle(IDWriteTextLayout *iface)
232 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
233 FIXME("(%p): stub\n", This);
234 return DWRITE_FONT_STYLE_NORMAL;
237 static DWRITE_FONT_STRETCH WINAPI dwritetextlayout_GetFontStretch(IDWriteTextLayout *iface)
239 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
240 FIXME("(%p): stub\n", This);
241 return DWRITE_FONT_STRETCH_NORMAL;
244 static FLOAT WINAPI dwritetextlayout_GetFontSize(IDWriteTextLayout *iface)
246 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
247 FIXME("(%p): stub\n", This);
251 static UINT32 WINAPI dwritetextlayout_GetLocaleNameLength(IDWriteTextLayout *iface)
253 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
254 FIXME("(%p): stub\n", This);
258 static HRESULT WINAPI dwritetextlayout_GetLocaleName(IDWriteTextLayout *iface, WCHAR *name, UINT32 size)
260 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
261 FIXME("(%p)->(%p %u): stub\n", This, name, size);
265 static HRESULT WINAPI dwritetextlayout_SetMaxWidth(IDWriteTextLayout *iface, FLOAT maxWidth)
267 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
268 FIXME("(%p)->(%f): stub\n", This, maxWidth);
272 static HRESULT WINAPI dwritetextlayout_SetMaxHeight(IDWriteTextLayout *iface, FLOAT maxHeight)
274 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
275 FIXME("(%p)->(%f): stub\n", This, maxHeight);
279 static HRESULT WINAPI dwritetextlayout_SetFontCollection(IDWriteTextLayout *iface, IDWriteFontCollection* collection, DWRITE_TEXT_RANGE range)
281 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
282 FIXME("(%p)->(%p %u:%u): stub\n", This, collection, range.startPosition, range.length);
286 static HRESULT WINAPI dwritetextlayout_SetFontFamilyName(IDWriteTextLayout *iface, WCHAR const *name, DWRITE_TEXT_RANGE range)
288 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
289 FIXME("(%p)->(%s %u:%u): stub\n", This, debugstr_w(name), range.startPosition, range.length);
293 static HRESULT WINAPI dwritetextlayout_SetFontWeight(IDWriteTextLayout *iface, DWRITE_FONT_WEIGHT weight, DWRITE_TEXT_RANGE range)
295 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
296 FIXME("(%p)->(%d %u:%u): stub\n", This, weight, range.startPosition, range.length);
300 static HRESULT WINAPI dwritetextlayout_SetFontStyle(IDWriteTextLayout *iface, DWRITE_FONT_STYLE style, DWRITE_TEXT_RANGE range)
302 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
303 FIXME("(%p)->(%d %u:%u): stub\n", This, style, range.startPosition, range.length);
307 static HRESULT WINAPI dwritetextlayout_SetFontStretch(IDWriteTextLayout *iface, DWRITE_FONT_STRETCH stretch, DWRITE_TEXT_RANGE range)
309 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
310 FIXME("(%p)->(%d %u:%u): stub\n", This, stretch, range.startPosition, range.length);
314 static HRESULT WINAPI dwritetextlayout_SetFontSize(IDWriteTextLayout *iface, FLOAT size, DWRITE_TEXT_RANGE range)
316 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
317 FIXME("(%p)->(%f %u:%u): stub\n", This, size, range.startPosition, range.length);
321 static HRESULT WINAPI dwritetextlayout_SetUnderline(IDWriteTextLayout *iface, BOOL underline, DWRITE_TEXT_RANGE range)
323 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
324 FIXME("(%p)->(%d %u:%u): stub\n", This, underline, range.startPosition, range.length);
328 static HRESULT WINAPI dwritetextlayout_SetStrikethrough(IDWriteTextLayout *iface, BOOL strikethrough, DWRITE_TEXT_RANGE range)
330 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
331 FIXME("(%p)->(%d %u:%u): stub\n", This, strikethrough, range.startPosition, range.length);
335 static HRESULT WINAPI dwritetextlayout_SetDrawingEffect(IDWriteTextLayout *iface, IUnknown* effect, DWRITE_TEXT_RANGE range)
337 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
338 FIXME("(%p)->(%p %u:%u): stub\n", This, effect, range.startPosition, range.length);
342 static HRESULT WINAPI dwritetextlayout_SetInlineObject(IDWriteTextLayout *iface, IDWriteInlineObject *object, DWRITE_TEXT_RANGE range)
344 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
345 FIXME("(%p)->(%p %u:%u): stub\n", This, object, range.startPosition, range.length);
349 static HRESULT WINAPI dwritetextlayout_SetTypography(IDWriteTextLayout *iface, IDWriteTypography* typography, DWRITE_TEXT_RANGE range)
351 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
352 FIXME("(%p)->(%p %u:%u): stub\n", This, typography, range.startPosition, range.length);
356 static HRESULT WINAPI dwritetextlayout_SetLocaleName(IDWriteTextLayout *iface, WCHAR const* locale, DWRITE_TEXT_RANGE range)
358 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
359 FIXME("(%p)->(%s %u:%u): stub\n", This, debugstr_w(locale), range.startPosition, range.length);
363 static FLOAT WINAPI dwritetextlayout_GetMaxWidth(IDWriteTextLayout *iface)
365 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
366 FIXME("(%p): stub\n", This);
370 static FLOAT WINAPI dwritetextlayout_GetMaxHeight(IDWriteTextLayout *iface)
372 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
373 FIXME("(%p): stub\n", This);
377 static HRESULT WINAPI dwritetextlayout_layout_GetFontCollection(IDWriteTextLayout *iface, UINT32 pos,
378 IDWriteFontCollection** collection, DWRITE_TEXT_RANGE *range)
380 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
381 FIXME("(%p)->(%p %p): stub\n", This, collection, range);
385 static HRESULT WINAPI dwritetextlayout_layout_GetFontFamilyNameLength(IDWriteTextLayout *iface,
386 UINT32 pos, UINT32* len, DWRITE_TEXT_RANGE *range)
388 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
389 FIXME("(%p)->(%d %p %p): stub\n", This, pos, len, range);
393 static HRESULT WINAPI dwritetextlayout_layout_GetFontFamilyName(IDWriteTextLayout *iface,
394 UINT32 position, WCHAR* name, UINT32 name_size, DWRITE_TEXT_RANGE *range)
396 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
397 FIXME("(%p)->(%u %p %u %p): stub\n", This, position, name, name_size, range);
401 static HRESULT WINAPI dwritetextlayout_layout_GetFontWeight(IDWriteTextLayout *iface,
402 UINT32 position, DWRITE_FONT_WEIGHT *weight, DWRITE_TEXT_RANGE *range)
404 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
405 FIXME("(%p)->(%u %p %p): stub\n", This, position, weight, range);
409 static HRESULT WINAPI dwritetextlayout_layout_GetFontStyle(IDWriteTextLayout *iface,
410 UINT32 currentPosition, DWRITE_FONT_STYLE *style, DWRITE_TEXT_RANGE *range)
412 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
413 FIXME("(%p)->(%u %p %p): stub\n", This, currentPosition, style, range);
417 static HRESULT WINAPI dwritetextlayout_layout_GetFontStretch(IDWriteTextLayout *iface,
418 UINT32 position, DWRITE_FONT_STRETCH *stretch, DWRITE_TEXT_RANGE *range)
420 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
421 FIXME("(%p)->(%u %p %p): stub\n", This, position, stretch, range);
425 static HRESULT WINAPI dwritetextlayout_layout_GetFontSize(IDWriteTextLayout *iface,
426 UINT32 position, FLOAT *size, DWRITE_TEXT_RANGE *range)
428 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
429 FIXME("(%p)->(%u %p %p): stub\n", This, position, size, range);
433 static HRESULT WINAPI dwritetextlayout_GetUnderline(IDWriteTextLayout *iface,
434 UINT32 position, BOOL *has_underline, DWRITE_TEXT_RANGE *range)
436 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
437 FIXME("(%p)->(%u %p %p): stub\n", This, position, has_underline, range);
441 static HRESULT WINAPI dwritetextlayout_GetStrikethrough(IDWriteTextLayout *iface,
442 UINT32 position, BOOL *has_strikethrough, DWRITE_TEXT_RANGE *range)
444 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
445 FIXME("(%p)->(%u %p %p): stub\n", This, position, has_strikethrough, range);
449 static HRESULT WINAPI dwritetextlayout_GetDrawingEffect(IDWriteTextLayout *iface,
450 UINT32 position, IUnknown **effect, DWRITE_TEXT_RANGE *range)
452 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
453 FIXME("(%p)->(%u %p %p): stub\n", This, position, effect, range);
457 static HRESULT WINAPI dwritetextlayout_GetInlineObject(IDWriteTextLayout *iface,
458 UINT32 position, IDWriteInlineObject **object, DWRITE_TEXT_RANGE *range)
460 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
461 FIXME("(%p)->(%u %p %p): stub\n", This, position, object, range);
465 static HRESULT WINAPI dwritetextlayout_GetTypography(IDWriteTextLayout *iface,
466 UINT32 position, IDWriteTypography** typography, DWRITE_TEXT_RANGE *range)
468 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
469 FIXME("(%p)->(%u %p %p): stub\n", This, position, typography, range);
473 static HRESULT WINAPI dwritetextlayout_layout_GetLocaleNameLength(IDWriteTextLayout *iface,
474 UINT32 position, UINT32* length, DWRITE_TEXT_RANGE *range)
476 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
477 FIXME("(%p)->(%u %p %p): stub\n", This, position, length, range);
481 static HRESULT WINAPI dwritetextlayout_layout_GetLocaleName(IDWriteTextLayout *iface,
482 UINT32 position, WCHAR* name, UINT32 name_size, DWRITE_TEXT_RANGE *range)
484 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
485 FIXME("(%p)->(%u %p %u %p): stub\n", This, position, name, name_size, range);
489 static HRESULT WINAPI dwritetextlayout_Draw(IDWriteTextLayout *iface,
490 void *context, IDWriteTextRenderer* renderer, FLOAT originX, FLOAT originY)
492 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
493 FIXME("(%p)->(%p %p %f %f): stub\n", This, context, renderer, originX, originY);
497 static HRESULT WINAPI dwritetextlayout_GetLineMetrics(IDWriteTextLayout *iface,
498 DWRITE_LINE_METRICS *metrics, UINT32 max_count, UINT32 *actual_count)
500 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
501 FIXME("(%p)->(%p %u %p): stub\n", This, metrics, max_count, actual_count);
505 static HRESULT WINAPI dwritetextlayout_GetMetrics(IDWriteTextLayout *iface, DWRITE_TEXT_METRICS *metrics)
507 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
508 FIXME("(%p)->(%p): stub\n", This, metrics);
512 static HRESULT WINAPI dwritetextlayout_GetOverhangMetrics(IDWriteTextLayout *iface, DWRITE_OVERHANG_METRICS *overhangs)
514 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
515 FIXME("(%p)->(%p): stub\n", This, overhangs);
519 static HRESULT WINAPI dwritetextlayout_GetClusterMetrics(IDWriteTextLayout *iface,
520 DWRITE_CLUSTER_METRICS *metrics, UINT32 max_count, UINT32* act_count)
522 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
523 FIXME("(%p)->(%p %u %p): stub\n", This, metrics, max_count, act_count);
527 static HRESULT WINAPI dwritetextlayout_DetermineMinWidth(IDWriteTextLayout *iface, FLOAT* min_width)
529 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
530 FIXME("(%p)->(%p): stub\n", This, min_width);
534 static HRESULT WINAPI dwritetextlayout_HitTestPoint(IDWriteTextLayout *iface,
535 FLOAT pointX, FLOAT pointY, BOOL* is_trailinghit, BOOL* is_inside, DWRITE_HIT_TEST_METRICS *metrics)
537 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
538 FIXME("(%p)->(%f %f %p %p %p): stub\n", This, pointX, pointY, is_trailinghit, is_inside, metrics);
542 static HRESULT WINAPI dwritetextlayout_HitTestTextPosition(IDWriteTextLayout *iface,
543 UINT32 textPosition, BOOL is_trailinghit, FLOAT* pointX, FLOAT* pointY, DWRITE_HIT_TEST_METRICS *metrics)
545 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
546 FIXME("(%p)->(%u %d %p %p %p): stub\n", This, textPosition, is_trailinghit, pointX, pointY, metrics);
550 static HRESULT WINAPI dwritetextlayout_HitTestTextRange(IDWriteTextLayout *iface,
551 UINT32 textPosition, UINT32 textLength, FLOAT originX, FLOAT originY,
552 DWRITE_HIT_TEST_METRICS *metrics, UINT32 max_metricscount, UINT32* actual_metricscount)
554 struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
555 FIXME("(%p)->(%u %u %f %f %p %u %p): stub\n", This, textPosition, textLength, originX, originY, metrics,
556 max_metricscount, actual_metricscount);
560 static const IDWriteTextLayoutVtbl dwritetextlayoutvtbl = {
561 dwritetextlayout_QueryInterface,
562 dwritetextlayout_AddRef,
563 dwritetextlayout_Release,
564 dwritetextlayout_SetTextAlignment,
565 dwritetextlayout_SetParagraphAlignment,
566 dwritetextlayout_SetWordWrapping,
567 dwritetextlayout_SetReadingDirection,
568 dwritetextlayout_SetFlowDirection,
569 dwritetextlayout_SetIncrementalTabStop,
570 dwritetextlayout_SetTrimming,
571 dwritetextlayout_SetLineSpacing,
572 dwritetextlayout_GetTextAlignment,
573 dwritetextlayout_GetParagraphAlignment,
574 dwritetextlayout_GetWordWrapping,
575 dwritetextlayout_GetReadingDirection,
576 dwritetextlayout_GetFlowDirection,
577 dwritetextlayout_GetIncrementalTabStop,
578 dwritetextlayout_GetTrimming,
579 dwritetextlayout_GetLineSpacing,
580 dwritetextlayout_GetFontCollection,
581 dwritetextlayout_GetFontFamilyNameLength,
582 dwritetextlayout_GetFontFamilyName,
583 dwritetextlayout_GetFontWeight,
584 dwritetextlayout_GetFontStyle,
585 dwritetextlayout_GetFontStretch,
586 dwritetextlayout_GetFontSize,
587 dwritetextlayout_GetLocaleNameLength,
588 dwritetextlayout_GetLocaleName,
589 dwritetextlayout_SetMaxWidth,
590 dwritetextlayout_SetMaxHeight,
591 dwritetextlayout_SetFontCollection,
592 dwritetextlayout_SetFontFamilyName,
593 dwritetextlayout_SetFontWeight,
594 dwritetextlayout_SetFontStyle,
595 dwritetextlayout_SetFontStretch,
596 dwritetextlayout_SetFontSize,
597 dwritetextlayout_SetUnderline,
598 dwritetextlayout_SetStrikethrough,
599 dwritetextlayout_SetDrawingEffect,
600 dwritetextlayout_SetInlineObject,
601 dwritetextlayout_SetTypography,
602 dwritetextlayout_SetLocaleName,
603 dwritetextlayout_GetMaxWidth,
604 dwritetextlayout_GetMaxHeight,
605 dwritetextlayout_layout_GetFontCollection,
606 dwritetextlayout_layout_GetFontFamilyNameLength,
607 dwritetextlayout_layout_GetFontFamilyName,
608 dwritetextlayout_layout_GetFontWeight,
609 dwritetextlayout_layout_GetFontStyle,
610 dwritetextlayout_layout_GetFontStretch,
611 dwritetextlayout_layout_GetFontSize,
612 dwritetextlayout_GetUnderline,
613 dwritetextlayout_GetStrikethrough,
614 dwritetextlayout_GetDrawingEffect,
615 dwritetextlayout_GetInlineObject,
616 dwritetextlayout_GetTypography,
617 dwritetextlayout_layout_GetLocaleNameLength,
618 dwritetextlayout_layout_GetLocaleName,
619 dwritetextlayout_Draw,
620 dwritetextlayout_GetLineMetrics,
621 dwritetextlayout_GetMetrics,
622 dwritetextlayout_GetOverhangMetrics,
623 dwritetextlayout_GetClusterMetrics,
624 dwritetextlayout_DetermineMinWidth,
625 dwritetextlayout_HitTestPoint,
626 dwritetextlayout_HitTestTextPosition,
627 dwritetextlayout_HitTestTextRange
630 HRESULT create_textlayout(IDWriteTextLayout **layout)
632 struct dwrite_textlayout *This;
636 This = heap_alloc(sizeof(struct dwrite_textlayout));
637 if (!This) return E_OUTOFMEMORY;
639 This->IDWriteTextLayout_iface.lpVtbl = &dwritetextlayoutvtbl;
642 *layout = &This->IDWriteTextLayout_iface;