summaryrefslogtreecommitdiffstats
path: root/WebKit/win/WebKitGraphics.h
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/win/WebKitGraphics.h')
-rw-r--r--WebKit/win/WebKitGraphics.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/WebKit/win/WebKitGraphics.h b/WebKit/win/WebKitGraphics.h
index 1994698..59c874b 100644
--- a/WebKit/win/WebKitGraphics.h
+++ b/WebKit/win/WebKitGraphics.h
@@ -28,6 +28,8 @@
#include <windows.h>
+extern "C" {
+
typedef struct CGColor* CGColorRef;
typedef struct CGContext* CGContextRef;
@@ -39,6 +41,7 @@ struct WebFontDescription {
LPCTSTR family;
unsigned familyLength;
float size;
+ // FIXME: Change to weight.
bool bold;
bool italic;
};
@@ -55,15 +58,22 @@ struct WebTextRenderInfo
int underlinedIndex;
bool drawAsPassword;
int overrideSmoothingLevel; // pass in -1 if caller does not want to override smoothing level
+ SIZE shadowOffset;
+ int shadowBlur;
+ CGColorRef shadowColor;
};
-void DrawTextAtPoint(CGContextRef, LPCTSTR text, int length, POINT, const WebFontDescription&, CGColorRef, int underlinedIndex = -1, bool drawAsPassword = false);
void WebDrawText(WebTextRenderInfo*);
float TextFloatWidth(LPCTSTR text, int length, const WebFontDescription&);
void FontMetrics(const WebFontDescription&, int* ascent, int* descent, int* lineSpacing);
-// buffer must be large enough to hold all of "text", including its null terminator.
-void CenterTruncateStringToWidth(LPCTSTR text, int length, const WebFontDescription&, float width, WCHAR* buffer);
-void RightTruncateStringToWidth(LPCTSTR text, int length, const WebFontDescription&, float width, WCHAR* buffer);
+// buffer must be large enough to hold all of "text", including its null terminator. Returns the number of characters put in buffer (excluding the null terminator).
+unsigned CenterTruncateStringToWidth(LPCTSTR text, int length, const WebFontDescription&, float width, WCHAR* buffer);
+unsigned RightTruncateStringToWidth(LPCTSTR text, int length, const WebFontDescription&, float width, WCHAR* buffer);
+
+void WebKitSetShouldUseFontSmoothing(bool);
+bool WebKitShouldUseFontSmoothing();
+
+}
#endif // !defined(WebKitGraphics_h)