mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-10 13:57:08 +01:00
Merge branch 'master' into fix-issue394
This commit is contained in:
@@ -1183,6 +1183,7 @@
|
||||
"GBSpan":"wx.",
|
||||
"GCDC":"wx.",
|
||||
"GDIObject":"wx.",
|
||||
"GIFHandler":"wx.",
|
||||
"GLCanvas":"wx.glcanvas.",
|
||||
"GLContext":"wx.glcanvas.",
|
||||
"GREEN":"wx.",
|
||||
@@ -1670,6 +1671,7 @@
|
||||
"ID_ZOOM_FIT":"wx.",
|
||||
"ID_ZOOM_IN":"wx.",
|
||||
"ID_ZOOM_OUT":"wx.",
|
||||
"IFFHandler":"wx.",
|
||||
"IMAGELIST_DRAW_FOCUSED":"wx.",
|
||||
"IMAGELIST_DRAW_NORMAL":"wx.",
|
||||
"IMAGELIST_DRAW_SELECTED":"wx.",
|
||||
@@ -1796,6 +1798,7 @@
|
||||
"JOY_BUTTON3":"wx.",
|
||||
"JOY_BUTTON4":"wx.",
|
||||
"JOY_BUTTON_ANY":"wx.",
|
||||
"JPEGHandler":"wx.",
|
||||
"Joystick":"wx.adv.",
|
||||
"JoystickEvent":"wx.",
|
||||
"KILL_ACCESS_DENIED":"wx.",
|
||||
@@ -2536,6 +2539,7 @@
|
||||
"PAPER_TABLOID_EXTRA":"wx.",
|
||||
"PB_SMALL":"wx.",
|
||||
"PB_USE_TEXTCTRL":"wx.",
|
||||
"PCXHandler":"wx.",
|
||||
"PD_APP_MODAL":"wx.",
|
||||
"PD_AUTO_HIDE":"wx.",
|
||||
"PD_CAN_ABORT":"wx.",
|
||||
@@ -2741,10 +2745,12 @@
|
||||
"PG_VFB_SHOW_MESSAGE_ON_STATUSBAR":"wx.propgrid.",
|
||||
"PG_VFB_STAY_IN_PROPERTY":"wx.propgrid.",
|
||||
"PG_WINDOW_STYLES":"wx.propgrid.",
|
||||
"PNGHandler":"wx.",
|
||||
"PNG_TYPE_COLOUR":"wx.",
|
||||
"PNG_TYPE_GREY":"wx.",
|
||||
"PNG_TYPE_GREY_RED":"wx.",
|
||||
"PNG_TYPE_PALETTE":"wx.",
|
||||
"PNMHandler":"wx.",
|
||||
"POPUP_WINDOW":"wx.",
|
||||
"PORTRAIT":"wx.",
|
||||
"PORT_BASE":"wx.",
|
||||
@@ -5746,6 +5752,8 @@
|
||||
"TE_RICH2":"wx.",
|
||||
"TE_RIGHT":"wx.",
|
||||
"TE_WORDWRAP":"wx.",
|
||||
"TGAHandler":"wx.",
|
||||
"TIFFHandler":"wx.",
|
||||
"TILE":"wx.",
|
||||
"TIMER_CONTINUOUS":"wx.",
|
||||
"TIMER_ONE_SHOT":"wx.",
|
||||
@@ -6261,6 +6269,7 @@
|
||||
"XML_PI_NODE":"wx.xml.",
|
||||
"XML_TEXT_NODE":"wx.xml.",
|
||||
"XOR":"wx.",
|
||||
"XPMHandler":"wx.",
|
||||
"XRCCTRL":"wx.xrc.",
|
||||
"XRCID":"wx.xrc.",
|
||||
"XRC_NO_RELOADING":"wx.xrc.",
|
||||
|
||||
59
etg/image.py
59
etg/image.py
@@ -22,6 +22,15 @@ DOCSTRING = ""
|
||||
ITEMS = [ 'wxImage',
|
||||
'wxImageHistogram',
|
||||
'wxImageHandler',
|
||||
'wxTIFFHandler',
|
||||
'wxGIFHandler',
|
||||
"wxIFFHandler",
|
||||
"wxJPEGHandler",
|
||||
"wxPCXHandler",
|
||||
"wxPNGHandler",
|
||||
"wxPNMHandler",
|
||||
"wxTGAHandler",
|
||||
"wxXPMHandler"
|
||||
#'wxQuantize',
|
||||
#'wxPalette',
|
||||
]
|
||||
@@ -574,6 +583,56 @@ def run():
|
||||
c.find('DoGetImageCount').ignore(False)
|
||||
c.find('DoCanRead').ignore(False)
|
||||
|
||||
#-------------------------------------------------------
|
||||
# tweak for GIFHandler
|
||||
# need to include anidecod.h, otherwise use of forward declared class
|
||||
# compilation errors will occur.
|
||||
c = module.find('wxGIFHandler')
|
||||
c.find('DoCanRead').ignore(False)
|
||||
|
||||
module.addHeaderCode("#include <wx/anidecod.h>")
|
||||
module.addItem(tools.wxArrayWrapperTemplate('wxImageArray', 'wxImage', module))
|
||||
|
||||
#-------------------------------------------------------
|
||||
# tweak for IFFHandler
|
||||
c = module.find('wxIFFHandler')
|
||||
c.find('DoCanRead').ignore(False)
|
||||
|
||||
#-------------------------------------------------------
|
||||
# tweak for JPEGHandler
|
||||
c = module.find('wxJPEGHandler')
|
||||
c.find('DoCanRead').ignore(False)
|
||||
|
||||
#-------------------------------------------------------
|
||||
# tweak for PCXHandler
|
||||
c = module.find('wxPCXHandler')
|
||||
c.find('DoCanRead').ignore(False)
|
||||
|
||||
#-------------------------------------------------------
|
||||
# tweak for PNGHandler
|
||||
c = module.find('wxPNGHandler')
|
||||
c.find('DoCanRead').ignore(False)
|
||||
|
||||
#-------------------------------------------------------
|
||||
# tweak for PNMHandler
|
||||
c = module.find('wxPNMHandler')
|
||||
c.find('DoCanRead').ignore(False)
|
||||
|
||||
#-------------------------------------------------------
|
||||
# tweak for TGAHandler
|
||||
c = module.find('wxTGAHandler')
|
||||
c.find('DoCanRead').ignore(False)
|
||||
|
||||
#-------------------------------------------------------
|
||||
# tweak for TIFFHandler
|
||||
c = module.find('wxTIFFHandler')
|
||||
c.find('GetLibraryVersionInfo').ignore()
|
||||
c.find('DoCanRead').ignore(False)
|
||||
|
||||
#-------------------------------------------------------
|
||||
# tweak for XPMHandler
|
||||
c = module.find('wxXPMHandler')
|
||||
c.find('DoCanRead').ignore(False)
|
||||
|
||||
#-------------------------------------------------------
|
||||
|
||||
|
||||
Submodule ext/wxWidgets updated: 8df55d69dd...74605c8e0e
@@ -260,6 +260,38 @@ class image_Tests(wtc.WidgetTestCase):
|
||||
imghndlr = TestImageHandler()
|
||||
wx.Image.AddHandler(imghndlr)
|
||||
|
||||
def test_imageHandlerStandardDerivations(self):
|
||||
# checks that all of the standard wx derivations are available.
|
||||
wx.GIFHandler()
|
||||
wx.IFFHandler()
|
||||
wx.JPEGHandler()
|
||||
wx.PCXHandler()
|
||||
wx.PNGHandler()
|
||||
wx.PNMHandler()
|
||||
wx.TGAHandler()
|
||||
wx.TIFFHandler()
|
||||
wx.XPMHandler()
|
||||
|
||||
def test_imageHandlerStandardDerivationsDerivation(self):
|
||||
for cls in (wx.GIFHandler, wx.IFFHandler, wx.JPEGHandler,
|
||||
wx.PCXHandler, wx.PNGHandler, wx.PNMHandler,
|
||||
wx.TGAHandler, wx.TIFFHandler,wx.XPMHandler):
|
||||
|
||||
class TestImageHandler(cls):
|
||||
def __init__(self):
|
||||
cls.__init__(self)
|
||||
ext = cls.__name__.replace("Handler", "")
|
||||
self.Name = "%s File" % ext
|
||||
self.Extension = ext
|
||||
self.MimeType = 'image/ext'
|
||||
|
||||
self.Type = getattr(wx, "BITMAP_TYPE_%s" % ext)
|
||||
|
||||
def DoCanRead(self, stream):
|
||||
return True
|
||||
|
||||
imghndlr = TestImageHandler()
|
||||
wx.Image.AddHandler(imghndlr)
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user