Added some TODOs and started the work necessary for the Windows text system migration... which is gonna hurt.

This commit is contained in:
Pietro Gagliardi 2017-01-17 23:25:26 -05:00
parent 5444f76bd3
commit f7121774e1
6 changed files with 15 additions and 3 deletions

View File

@ -4,6 +4,7 @@
// TODO
// - test multiple clips
// - test saving and restoring clips
// - copy tests from https://github.com/Microsoft/WinObjC
struct drawtest {
const char *name;

View File

@ -26,8 +26,8 @@ list(APPEND _LIBUI_SOURCES
windows/editablecombo.cpp
windows/entry.cpp
windows/events.cpp
windows/fontbutton.cpp
windows/fontdialog.cpp
# windows/fontbutton.cpp
# windows/fontdialog.cpp
windows/form.cpp
windows/graphemes.cpp
windows/grid.cpp

View File

@ -19,6 +19,7 @@ extern IDWriteFactory *dwfactory;
#endif
extern HRESULT initDrawText(void);
extern void uninitDrawText(void);
#if 0 /* TODO */
#ifdef __cplusplus
struct fontCollection {
IDWriteFontCollection *fonts;
@ -30,8 +31,10 @@ extern WCHAR *fontCollectionFamilyName(fontCollection *fc, IDWriteFontFamily *fa
extern void fontCollectionFree(fontCollection *fc);
extern WCHAR *fontCollectionCorrectString(fontCollection *fc, IDWriteLocalizedStrings *names);
#endif
#endif
// drawtext.cpp
#if 0 /* TODO */
#ifdef __cplusplus
extern uiDrawTextFont *mkTextFont(IDWriteFont *df, BOOL addRef, WCHAR *family, BOOL copyFamily, double size);
struct dwriteAttr {
@ -45,8 +48,10 @@ struct dwriteAttr {
extern void attrToDWriteAttr(struct dwriteAttr *attr);
extern void dwriteAttrToAttr(struct dwriteAttr *attr);
#endif
#endif
// fontdialog.cpp
#if 0 /* TODO */
#ifdef __cplusplus
struct fontDialogParams {
IDWriteFont *font;
@ -59,3 +64,4 @@ extern void loadInitialFontDialogParams(struct fontDialogParams *params);
extern void destroyFontDialogParams(struct fontDialogParams *params);
extern WCHAR *fontDialogParamsToString(struct fontDialogParams *params);
#endif
#endif

View File

@ -66,6 +66,7 @@ void uiDrawPathNewFigure(uiDrawPath *p, double x, double y)
// That is to say, it's NOT THE SWEEP.
// The sweep is defined by the start and end points and whether the arc is "large".
// As a result, this design does not allow for full circles or ellipses with a single arc; they have to be simulated with two.
// TODO https://github.com/Microsoft/WinObjC/blob/develop/Frameworks/CoreGraphics/CGPath.mm#L313
struct arc {
double xCenter;

View File

@ -1,6 +1,6 @@
// 14 april 2016
#include "uipriv_windows.hpp"
// TODO really migrate?
// TODO really migrate? (TODO what did I mean by this?)
IDWriteFactory *dwfactory = NULL;
@ -17,6 +17,8 @@ void uninitDrawText(void)
dwfactory->Release();
}
#if 0 /* TODO */
fontCollection *loadFontCollection(void)
{
fontCollection *fc;
@ -86,3 +88,5 @@ void fontCollectionFree(fontCollection *fc)
fc->fonts->Release();
uiFree(fc);
}
#endif