Fixed Windows build issues and resolved a question in libui that I need to enshrine in documentation next.

This commit is contained in:
Pietro Gagliardi 2017-11-04 21:44:28 -04:00
parent ca5a5f1f72
commit 1f33ca14d8
3 changed files with 5 additions and 4 deletions

View File

@ -27,7 +27,7 @@ typedef struct uiAttributedString uiAttributedString;
_UI_ENUM(uiAttribute) {
// uiAttributeFamily changes the font family of the text it is
// applied to. Use the Family field of uiAttributeSpec.
// TODO case-sensitive?
// TODO this is case-insensitive on all platforms; codify this
uiAttributeFamily,
// uiAttributeSize changes the size of the text it is applied to,
// in typographical points. Use the Double field of

View File

@ -61,8 +61,9 @@ static uiForEach processAttribute(const uiAttributedString *s, const uiAttribute
ostart = start;
oend = end;
start = attrstrUTF8ToUTF16(s, start);
end = attrstrUTF8ToUTF16(s, end);
// TODO fix const correctness
start = attrstrUTF8ToUTF16((uiAttributedString *) s, start);
end = attrstrUTF8ToUTF16((uiAttributedString *) s, end);
range.startPosition = start;
range.length = end - start;
switch (spec->Type) {

View File

@ -381,7 +381,7 @@ public:
return E_UNEXPECTED;
}
virtual HRESULT DrawUnderline(void *clientDrawingContext, FLOAT baselineOriginX, FLOAT baselineOriginY, const DWRITE_UNDERLINE *underline, IUnknown *clientDrawingEffect)
virtual HRESULT STDMETHODCALLTYPE DrawUnderline(void *clientDrawingContext, FLOAT baselineOriginX, FLOAT baselineOriginY, const DWRITE_UNDERLINE *underline, IUnknown *clientDrawingEffect)
{
textDrawingEffect *t = (textDrawingEffect *) clientDrawingEffect;
ID2D1SolidColorBrush *brush;