From 8967f52028bda55ffbc9054a679fe85758abed29 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 28 Mar 2013 00:15:30 +0000 Subject: [PATCH] Add GetHFONT, OSXGetCGFont, and GetPangoFontDescription git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73732 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- etg/font.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/etg/font.py b/etg/font.py index c79340d2..1d7bcfa8 100644 --- a/etg/font.py +++ b/etg/font.py @@ -73,6 +73,36 @@ def run(): return self->IsOk(); """) + c.addCppMethod('void*', 'GetHFONT', '()', + doc="Returns the font's native handle.", + body="""\ + #ifdef __WXMSW__ + return self->GetHFONT(); + #else + return 0; + #endif + """) + + c.addCppMethod('void*', 'OSXGetCGFont', '()', + doc="Returns the font's native handle.", + body="""\ + #ifdef __WXMAC__ + return self->OSXGetCGFont(); + #else + return 0; + #endif + """) + + c.addCppMethod('void*', 'GetPangoFontDescription', '()', + doc="Returns the font's native handle.", + body="""\ + #ifdef __WXGTK__ + return self->GetNativeFontInfo()->description; + #else + return 0; + #endif + """) + # The stock Font items are documented as simple pointers, but in reality