Diffstat (limited to 'qmake/include/private/qfontdata_p.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | qmake/include/private/qfontdata_p.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/qmake/include/private/qfontdata_p.h b/qmake/include/private/qfontdata_p.h index 917d14f..1eaf80c 100644 --- a/qmake/include/private/qfontdata_p.h +++ b/qmake/include/private/qfontdata_p.h | |||
@@ -141,48 +141,49 @@ public: | |||
141 | 141 | ||
142 | #endif // Q_WS_X11 | 142 | #endif // Q_WS_X11 |
143 | 143 | ||
144 | 144 | ||
145 | #ifdef Q_WS_WIN | 145 | #ifdef Q_WS_WIN |
146 | 146 | ||
147 | class QFontStruct : public QShared | 147 | class QFontStruct : public QShared |
148 | { | 148 | { |
149 | public: | 149 | public: |
150 | QFontStruct( const QString &key ); | 150 | QFontStruct( const QString &key ); |
151 | ~QFontStruct() { reset(); } | 151 | ~QFontStruct() { reset(); } |
152 | bool dirty() const { return hfont == 0; } | 152 | bool dirty() const { return hfont == 0; } |
153 | HDC dc() const; | 153 | HDC dc() const; |
154 | HFONT font() const { return hfont; } | 154 | HFONT font() const { return hfont; } |
155 | const TEXTMETRICA *textMetricA() const { return &tm.a; } | 155 | const TEXTMETRICA *textMetricA() const { return &tm.a; } |
156 | const TEXTMETRICW *textMetricW() const { return &tm.w; } | 156 | const TEXTMETRICW *textMetricW() const { return &tm.w; } |
157 | QString key() const { return k; } | 157 | QString key() const { return k; } |
158 | void reset(); | 158 | void reset(); |
159 | 159 | ||
160 | QStringk; | 160 | QStringk; |
161 | HDC hdc; | 161 | HDC hdc; |
162 | HFONThfont; | 162 | HFONThfont; |
163 | uintstockFont:1; | 163 | uintstockFont:1; |
164 | uintpaintDevice:1; | 164 | uintpaintDevice:1; |
165 | uint useTextOutA:1; | ||
165 | union { | 166 | union { |
166 | TEXTMETRICWw; | 167 | TEXTMETRICWw; |
167 | TEXTMETRICAa; | 168 | TEXTMETRICAa; |
168 | } tm; | 169 | } tm; |
169 | int lw; | 170 | int lw; |
170 | int cache_cost; | 171 | int cache_cost; |
171 | // friend void QFont::initFontInfo() const; | 172 | // friend void QFont::initFontInfo() const; |
172 | }; | 173 | }; |
173 | 174 | ||
174 | #endif // Q_WS_WIN | 175 | #endif // Q_WS_WIN |
175 | 176 | ||
176 | #if defined( Q_WS_MAC ) | 177 | #if defined( Q_WS_MAC ) |
177 | 178 | ||
178 | #if defined( Q_WS_MACX ) | 179 | #if defined( Q_WS_MACX ) |
179 | # define QMAC_FONT_ATSUI | 180 | # define QMAC_FONT_ATSUI |
180 | #endif | 181 | #endif |
181 | #include "qt_mac.h" | 182 | #include "qt_mac.h" |
182 | class QMacFontInfo; | 183 | class QMacFontInfo; |
183 | 184 | ||
184 | class QFontStruct : public QShared | 185 | class QFontStruct : public QShared |
185 | { | 186 | { |
186 | public: | 187 | public: |
187 | inline QFontStruct() : QShared(), info(NULL), fnum(-1), cache_cost(0), internal_fi(NULL) { } | 188 | inline QFontStruct() : QShared(), info(NULL), fnum(-1), cache_cost(0), internal_fi(NULL) { } |
188 | #if defined( QMAC_FONT_ATSUI ) && 0 | 189 | #if defined( QMAC_FONT_ATSUI ) && 0 |
@@ -392,49 +393,49 @@ public: | |||
392 | int x11Screen; | 393 | int x11Screen; |
393 | #endif // Q_WS_X11 | 394 | #endif // Q_WS_X11 |
394 | 395 | ||
395 | QPaintDevice *paintdevice; | 396 | QPaintDevice *paintdevice; |
396 | 397 | ||
397 | #ifdef Q_WS_WIN | 398 | #ifdef Q_WS_WIN |
398 | void load(); | 399 | void load(); |
399 | void initFontInfo(); | 400 | void initFontInfo(); |
400 | HFONT create( bool *stockFont, HDC hdc = 0, bool compatMode = FALSE ); | 401 | HFONT create( bool *stockFont, HDC hdc = 0, bool compatMode = FALSE ); |
401 | QFontStruct *fin; | 402 | QFontStruct *fin; |
402 | 403 | ||
403 | void buildCache( HDC hdc, const QString &str, int pos, int len, TextRun *cache ); | 404 | void buildCache( HDC hdc, const QString &str, int pos, int len, TextRun *cache ); |
404 | void drawText( HDC hdc, int x, int y, TextRun *cache ); | 405 | void drawText( HDC hdc, int x, int y, TextRun *cache ); |
405 | #endif // Q_WS_WIN | 406 | #endif // Q_WS_WIN |
406 | 407 | ||
407 | #ifdef Q_WS_QWS | 408 | #ifdef Q_WS_QWS |
408 | void load(); | 409 | void load(); |
409 | QFontStruct *fin; | 410 | QFontStruct *fin; |
410 | int textWidth( const QString &str, int pos, int len, TextRun *cache ); | 411 | int textWidth( const QString &str, int pos, int len, TextRun *cache ); |
411 | void drawText( QGfx *gfx, int x, int y, const TextRun *cache ); | 412 | void drawText( QGfx *gfx, int x, int y, const TextRun *cache ); |
412 | #endif | 413 | #endif |
413 | 414 | ||
414 | #if defined( Q_WS_MAC ) | 415 | #if defined( Q_WS_MAC ) |
415 | void macSetFont(QPaintDevice *); | 416 | void macSetFont(QPaintDevice *); |
416 | void drawText(int x, int y, QString s, int len, QPaintDevice *dev, const QRegion *rgn); | 417 | void drawText(int x, int y, const QString &s, int from, int len, QPaintDevice *dev, const QRegion *rgn, int dir); |
417 | void computeLineWidth(); | 418 | void computeLineWidth(); |
418 | void load(); | 419 | void load(); |
419 | QFontStruct *fin; | 420 | QFontStruct *fin; |
420 | #endif | 421 | #endif |
421 | 422 | ||
422 | }; | 423 | }; |
423 | 424 | ||
424 | inline QFontPrivate::QFontPrivate() | 425 | inline QFontPrivate::QFontPrivate() |
425 | : QShared(), exactMatch(FALSE), lineWidth(1) | 426 | : QShared(), exactMatch(FALSE), lineWidth(1) |
426 | { | 427 | { |
427 | 428 | ||
428 | #if defined(Q_WS_WIN) || defined(Q_WS_QWS) || defined(Q_WS_MAC) | 429 | #if defined(Q_WS_WIN) || defined(Q_WS_QWS) || defined(Q_WS_MAC) |
429 | fin = 0; | 430 | fin = 0; |
430 | #endif // Q_WS_WIN || Q_WS_QWS | 431 | #endif // Q_WS_WIN || Q_WS_QWS |
431 | #if defined(Q_WS_X11) | 432 | #if defined(Q_WS_X11) |
432 | x11Screen = QPaintDevice::x11AppScreen(); | 433 | x11Screen = QPaintDevice::x11AppScreen(); |
433 | #endif // Q_WS_X11 | 434 | #endif // Q_WS_X11 |
434 | paintdevice = 0; | 435 | paintdevice = 0; |
435 | } | 436 | } |
436 | 437 | ||
437 | inline QFontPrivate::QFontPrivate(const QFontPrivate &fp) | 438 | inline QFontPrivate::QFontPrivate(const QFontPrivate &fp) |
438 | : QShared(), request(fp.request), actual(fp.actual), | 439 | : QShared(), request(fp.request), actual(fp.actual), |
439 | exactMatch(fp.exactMatch), lineWidth(1) | 440 | exactMatch(fp.exactMatch), lineWidth(1) |
440 | { | 441 | { |