X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a001823c80ceb1e9ac518350e1e9467299b66950..bc50a2ae95f2ab36b16ceedc7902a9cbfb2f70ea:/wxPython/src/msw/_misc.py diff --git a/wxPython/src/msw/_misc.py b/wxPython/src/msw/_misc.py index 40b0cd7a8c..de9b5c03ea 100644 --- a/wxPython/src/msw/_misc.py +++ b/wxPython/src/msw/_misc.py @@ -1,8 +1,49 @@ -# This file was created automatically by SWIG. +# This file was created automatically by SWIG 1.3.27. # Don't modify this file, modify the SWIG interface instead. import _misc_ +def _swig_setattr_nondynamic(self,class_type,name,value,static=1): + if (name == "this"): + if isinstance(value, class_type): + self.__dict__[name] = value.this + if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown + del value.thisown + return + method = class_type.__swig_setmethods__.get(name,None) + if method: return method(self,value) + if (not static) or hasattr(self,name) or (name == "thisown"): + self.__dict__[name] = value + else: + raise AttributeError("You cannot add attributes to %s" % self) + +def _swig_setattr(self,class_type,name,value): + return _swig_setattr_nondynamic(self,class_type,name,value,0) + +def _swig_getattr(self,class_type,name): + method = class_type.__swig_getmethods__.get(name,None) + if method: return method(self) + raise AttributeError,name + +import types +try: + _object = types.ObjectType + _newclass = 1 +except AttributeError: + class _object : pass + _newclass = 0 +del types + + +def _swig_setattr_nondynamic_method(set): + def set_attr(self,name,value): + if hasattr(self,name) or (name in ("this", "thisown")): + set(self,name,value) + else: + raise AttributeError("You cannot add attributes to %s" % self) + return set_attr + + import _core wx = _core #--------------------------------------------------------------------------- @@ -93,12 +134,14 @@ SYS_SHOW_SOUNDS = _misc_.SYS_SHOW_SOUNDS SYS_SWAP_BUTTONS = _misc_.SYS_SWAP_BUTTONS SYS_CAN_DRAW_FRAME_DECORATIONS = _misc_.SYS_CAN_DRAW_FRAME_DECORATIONS SYS_CAN_ICONIZE_FRAME = _misc_.SYS_CAN_ICONIZE_FRAME +SYS_TABLET_PRESENT = _misc_.SYS_TABLET_PRESENT SYS_SCREEN_NONE = _misc_.SYS_SCREEN_NONE SYS_SCREEN_TINY = _misc_.SYS_SCREEN_TINY SYS_SCREEN_PDA = _misc_.SYS_SCREEN_PDA SYS_SCREEN_SMALL = _misc_.SYS_SCREEN_SMALL SYS_SCREEN_DESKTOP = _misc_.SYS_SCREEN_DESKTOP class SystemSettings(object): + """Proxy of C++ SystemSettings class""" def __init__(self): raise RuntimeError, "No constructor defined" def __repr__(self): return "<%s.%s; proxy of C++ wxSystemSettings instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) @@ -113,7 +156,7 @@ class SystemSettings(object): GetFont = staticmethod(GetFont) def GetMetric(*args, **kwargs): - """GetMetric(int index) -> int""" + """GetMetric(int index, Window win=None) -> int""" return _misc_.SystemSettings_GetMetric(*args, **kwargs) GetMetric = staticmethod(GetMetric) @@ -149,7 +192,7 @@ def SystemSettings_GetFont(*args, **kwargs): return _misc_.SystemSettings_GetFont(*args, **kwargs) def SystemSettings_GetMetric(*args, **kwargs): - """SystemSettings_GetMetric(int index) -> int""" + """SystemSettings_GetMetric(int index, Window win=None) -> int""" return _misc_.SystemSettings_GetMetric(*args, **kwargs) def SystemSettings_HasFeature(*args, **kwargs): @@ -165,6 +208,7 @@ def SystemSettings_SetScreenType(*args, **kwargs): return _misc_.SystemSettings_SetScreenType(*args, **kwargs) class SystemOptions(_core.Object): + """Proxy of C++ SystemOptions class""" def __repr__(self): return "<%s.%s; proxy of C++ wxSystemOptions instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -198,6 +242,11 @@ class SystemOptions(_core.Object): return _misc_.SystemOptions_HasOption(*args, **kwargs) HasOption = staticmethod(HasOption) + def IsFalse(*args, **kwargs): + """IsFalse(String name) -> bool""" + return _misc_.SystemOptions_IsFalse(*args, **kwargs) + + IsFalse = staticmethod(IsFalse) class SystemOptionsPtr(SystemOptions): def __init__(self, this): @@ -205,6 +254,8 @@ class SystemOptionsPtr(SystemOptions): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = SystemOptions _misc_.SystemOptions_swigregister(SystemOptionsPtr) +cvar = _misc_.cvar +WINDOW_DEFAULT_VARIANT = cvar.WINDOW_DEFAULT_VARIANT def SystemOptions_SetOption(*args, **kwargs): """SystemOptions_SetOption(String name, String value)""" @@ -226,6 +277,10 @@ def SystemOptions_HasOption(*args, **kwargs): """SystemOptions_HasOption(String name) -> bool""" return _misc_.SystemOptions_HasOption(*args, **kwargs) +def SystemOptions_IsFalse(*args, **kwargs): + """SystemOptions_IsFalse(String name) -> bool""" + return _misc_.SystemOptions_IsFalse(*args, **kwargs) + #--------------------------------------------------------------------------- @@ -241,6 +296,18 @@ def GetCurrentId(*args, **kwargs): """GetCurrentId() -> long""" return _misc_.GetCurrentId(*args, **kwargs) +def IsStockID(*args, **kwargs): + """IsStockID(int id) -> bool""" + return _misc_.IsStockID(*args, **kwargs) + +def IsStockLabel(*args, **kwargs): + """IsStockLabel(int id, String label) -> bool""" + return _misc_.IsStockLabel(*args, **kwargs) + +def GetStockLabel(*args, **kwargs): + """GetStockLabel(int id, bool withCodes=True, String accelerator=EmptyString) -> String""" + return _misc_.GetStockLabel(*args, **kwargs) + def Bell(*args, **kwargs): """Bell()""" return _misc_.Bell(*args, **kwargs) @@ -253,10 +320,6 @@ def GetElapsedTime(*args, **kwargs): """GetElapsedTime(bool resetTimer=True) -> long""" return _misc_.GetElapsedTime(*args, **kwargs) -def GetMousePosition(*args, **kwargs): - """GetMousePosition() -> (x,y)""" - return _misc_.GetMousePosition(*args, **kwargs) - def IsBusy(*args, **kwargs): """IsBusy() -> bool""" return _misc_.IsBusy(*args, **kwargs) @@ -282,7 +345,7 @@ def GetOsDescription(*args, **kwargs): return _misc_.GetOsDescription(*args, **kwargs) def GetFreeMemory(*args, **kwargs): - """GetFreeMemory() -> long""" + """GetFreeMemory() -> wxMemorySize""" return _misc_.GetFreeMemory(*args, **kwargs) SHUTDOWN_POWEROFF = _misc_.SHUTDOWN_POWEROFF SHUTDOWN_REBOOT = _misc_.SHUTDOWN_REBOOT @@ -295,9 +358,14 @@ def Sleep(*args, **kwargs): """Sleep(int secs)""" return _misc_.Sleep(*args, **kwargs) -def Usleep(*args, **kwargs): - """Usleep(unsigned long milliseconds)""" - return _misc_.Usleep(*args, **kwargs) +def MilliSleep(*args, **kwargs): + """MilliSleep(unsigned long milliseconds)""" + return _misc_.MilliSleep(*args, **kwargs) + +def MicroSleep(*args, **kwargs): + """MicroSleep(unsigned long microseconds)""" + return _misc_.MicroSleep(*args, **kwargs) +Usleep = MilliSleep def EnableTopLevelWindows(*args, **kwargs): """EnableTopLevelWindows(bool enable)""" @@ -393,17 +461,17 @@ def GetPasswordFromUser(*args, **kwargs): def GetSingleChoice(*args, **kwargs): """ - GetSingleChoice(String message, String caption, int choices, String choices_array, - Window parent=None, int x=-1, - int y=-1, bool centre=True, int width=150, int height=200) -> String + GetSingleChoice(String message, String caption, int choices, Window parent=None, + int x=-1, int y=-1, bool centre=True, + int width=150, int height=200) -> String """ return _misc_.GetSingleChoice(*args, **kwargs) def GetSingleChoiceIndex(*args, **kwargs): """ - GetSingleChoiceIndex(String message, String caption, int choices, String choices_array, - Window parent=None, int x=-1, - int y=-1, bool centre=True, int width=150, int height=200) -> int + GetSingleChoiceIndex(String message, String caption, int choices, Window parent=None, + int x=-1, int y=-1, bool centre=True, + int width=150, int height=200) -> int """ return _misc_.GetSingleChoiceIndex(*args, **kwargs) @@ -415,14 +483,6 @@ def MessageBox(*args, **kwargs): """ return _misc_.MessageBox(*args, **kwargs) -def GetNumberFromUser(*args, **kwargs): - """ - GetNumberFromUser(String message, String prompt, String caption, long value, - long min=0, long max=100, Window parent=None, - Point pos=DefaultPosition) -> long - """ - return _misc_.GetNumberFromUser(*args, **kwargs) - def ColourDisplay(*args, **kwargs): """ColourDisplay() -> bool""" return _misc_.ColourDisplay(*args, **kwargs) @@ -463,12 +523,42 @@ def SetCursor(*args, **kwargs): """SetCursor(Cursor cursor)""" return _misc_.SetCursor(*args, **kwargs) +def GetXDisplay(*args, **kwargs): + """ + GetXDisplay() -> void + + Returns a swigified pointer to the X11 display. Returns None on + other platforms. + """ + return _misc_.GetXDisplay(*args, **kwargs) + def BeginBusyCursor(*args, **kwargs): """BeginBusyCursor(Cursor cursor=wxHOURGLASS_CURSOR)""" return _misc_.BeginBusyCursor(*args, **kwargs) +def GetMousePosition(*args, **kwargs): + """ + GetMousePosition() -> Point + + Get the current mouse position on the screen. + """ + return _misc_.GetMousePosition(*args, **kwargs) + +def FindWindowAtPointer(*args, **kwargs): + """ + FindWindowAtPointer() -> Window + + Returns the window currently under the mouse pointer, if it belongs to + this application. Otherwise it returns None. + """ + return _misc_.FindWindowAtPointer(*args, **kwargs) + def GetActiveWindow(*args, **kwargs): - """GetActiveWindow() -> Window""" + """ + GetActiveWindow() -> Window + + Get the currently active window of this application, or None + """ return _misc_.GetActiveWindow(*args, **kwargs) def GenericFindWindowAtPoint(*args, **kwargs): @@ -483,16 +573,160 @@ def GetTopLevelParent(*args, **kwargs): """GetTopLevelParent(Window win) -> Window""" return _misc_.GetTopLevelParent(*args, **kwargs) +def LaunchDefaultBrowser(*args, **kwargs): + """ + LaunchDefaultBrowser(String url) -> bool + + Launches the user's default browser and tells it to open the location + at ``url``. Returns ``True`` if the application was successfully + launched. + """ + return _misc_.LaunchDefaultBrowser(*args, **kwargs) + def GetKeyState(*args, **kwargs): """ GetKeyState(int key) -> bool Get the state of a key (true if pressed or toggled on, false if not.) This is generally most useful getting the state of the modifier or - toggle keys. On some platforms those may be the only keys that work. + toggle keys. On some platforms those may be the only keys that this + function is able to detect. """ return _misc_.GetKeyState(*args, **kwargs) +class MouseState(object): + """ + `wx.MouseState` is used to hold information about mouse button and + modifier key states and is what is returned from `wx.GetMouseState`. + """ + def __repr__(self): + return "<%s.%s; proxy of C++ wxMouseState instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) + def __init__(self, *args, **kwargs): + """ + __init__(self) -> MouseState + + `wx.MouseState` is used to hold information about mouse button and + modifier key states and is what is returned from `wx.GetMouseState`. + """ + newobj = _misc_.new_MouseState(*args, **kwargs) + self.this = newobj.this + self.thisown = 1 + del newobj.thisown + def __del__(self, destroy=_misc_.delete_MouseState): + """__del__(self)""" + try: + if self.thisown: destroy(self) + except: pass + + def GetX(*args, **kwargs): + """GetX(self) -> int""" + return _misc_.MouseState_GetX(*args, **kwargs) + + def GetY(*args, **kwargs): + """GetY(self) -> int""" + return _misc_.MouseState_GetY(*args, **kwargs) + + def LeftDown(*args, **kwargs): + """LeftDown(self) -> bool""" + return _misc_.MouseState_LeftDown(*args, **kwargs) + + def MiddleDown(*args, **kwargs): + """MiddleDown(self) -> bool""" + return _misc_.MouseState_MiddleDown(*args, **kwargs) + + def RightDown(*args, **kwargs): + """RightDown(self) -> bool""" + return _misc_.MouseState_RightDown(*args, **kwargs) + + def ControlDown(*args, **kwargs): + """ControlDown(self) -> bool""" + return _misc_.MouseState_ControlDown(*args, **kwargs) + + def ShiftDown(*args, **kwargs): + """ShiftDown(self) -> bool""" + return _misc_.MouseState_ShiftDown(*args, **kwargs) + + def AltDown(*args, **kwargs): + """AltDown(self) -> bool""" + return _misc_.MouseState_AltDown(*args, **kwargs) + + def MetaDown(*args, **kwargs): + """MetaDown(self) -> bool""" + return _misc_.MouseState_MetaDown(*args, **kwargs) + + def CmdDown(*args, **kwargs): + """CmdDown(self) -> bool""" + return _misc_.MouseState_CmdDown(*args, **kwargs) + + def SetX(*args, **kwargs): + """SetX(self, int x)""" + return _misc_.MouseState_SetX(*args, **kwargs) + + def SetY(*args, **kwargs): + """SetY(self, int y)""" + return _misc_.MouseState_SetY(*args, **kwargs) + + def SetLeftDown(*args, **kwargs): + """SetLeftDown(self, bool down)""" + return _misc_.MouseState_SetLeftDown(*args, **kwargs) + + def SetMiddleDown(*args, **kwargs): + """SetMiddleDown(self, bool down)""" + return _misc_.MouseState_SetMiddleDown(*args, **kwargs) + + def SetRightDown(*args, **kwargs): + """SetRightDown(self, bool down)""" + return _misc_.MouseState_SetRightDown(*args, **kwargs) + + def SetControlDown(*args, **kwargs): + """SetControlDown(self, bool down)""" + return _misc_.MouseState_SetControlDown(*args, **kwargs) + + def SetShiftDown(*args, **kwargs): + """SetShiftDown(self, bool down)""" + return _misc_.MouseState_SetShiftDown(*args, **kwargs) + + def SetAltDown(*args, **kwargs): + """SetAltDown(self, bool down)""" + return _misc_.MouseState_SetAltDown(*args, **kwargs) + + def SetMetaDown(*args, **kwargs): + """SetMetaDown(self, bool down)""" + return _misc_.MouseState_SetMetaDown(*args, **kwargs) + + x = property(GetX, SetX) + y = property(GetY, SetY) + leftDown = property(LeftDown, SetLeftDown) + middleDown = property(MiddleDown, SetMiddleDown) + rightDown = property(RightDown, SetRightDown) + controlDown = property(ControlDown, SetControlDown) + shiftDown = property(ShiftDown, SetShiftDown) + altDown = property(AltDown, SetAltDown) + metaDown = property(MetaDown, SetMetaDown) + cmdDown = property(CmdDown) + + +class MouseStatePtr(MouseState): + def __init__(self, this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = MouseState +_misc_.MouseState_swigregister(MouseStatePtr) +FileSelectorPromptStr = cvar.FileSelectorPromptStr +FileSelectorDefaultWildcardStr = cvar.FileSelectorDefaultWildcardStr +DirSelectorPromptStr = cvar.DirSelectorPromptStr + + +def GetMouseState(*args, **kwargs): + """ + GetMouseState() -> MouseState + + Returns the current state of the mouse. Returns an instance of a + `wx.MouseState` object that contains the current position of the mouse + pointer in screen coordinants, as well as boolean values indicating + the up/down status of the mouse buttons and the modifier keys. + """ + return _misc_.GetMouseState(*args, **kwargs) def WakeUpMainThread(*args, **kwargs): """WakeUpMainThread()""" @@ -506,6 +740,7 @@ def MutexGuiLeave(*args, **kwargs): """MutexGuiLeave()""" return _misc_.MutexGuiLeave(*args, **kwargs) class MutexGuiLocker(object): + """Proxy of C++ MutexGuiLocker class""" def __repr__(self): return "<%s.%s; proxy of C++ wxMutexGuiLocker instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -527,10 +762,6 @@ class MutexGuiLockerPtr(MutexGuiLocker): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = MutexGuiLocker _misc_.MutexGuiLocker_swigregister(MutexGuiLockerPtr) -cvar = _misc_.cvar -FileSelectorPromptStr = cvar.FileSelectorPromptStr -FileSelectorDefaultWildcardStr = cvar.FileSelectorDefaultWildcardStr -DirSelectorPromptStr = cvar.DirSelectorPromptStr def Thread_IsMain(*args, **kwargs): @@ -539,6 +770,7 @@ def Thread_IsMain(*args, **kwargs): #--------------------------------------------------------------------------- class ToolTip(_core.Object): + """Proxy of C++ ToolTip class""" def __repr__(self): return "<%s.%s; proxy of C++ wxToolTip instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -547,6 +779,12 @@ class ToolTip(_core.Object): self.this = newobj.this self.thisown = 1 del newobj.thisown + def __del__(self, destroy=_misc_.delete_ToolTip): + """__del__(self)""" + try: + if self.thisown: destroy(self) + except: pass + def SetTip(*args, **kwargs): """SetTip(self, String tip)""" return _misc_.ToolTip_SetTip(*args, **kwargs) @@ -586,6 +824,7 @@ def ToolTip_SetDelay(*args, **kwargs): return _misc_.ToolTip_SetDelay(*args, **kwargs) class Caret(object): + """Proxy of C++ Caret class""" def __repr__(self): return "<%s.%s; proxy of C++ wxCaret instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -600,6 +839,16 @@ class Caret(object): if self.thisown: destroy(self) except: pass + def Destroy(*args, **kwargs): + """ + Destroy(self) + + Deletes the C++ object this Python object is a proxy for. + """ + val = _misc_.Caret_Destroy(*args, **kwargs) + args[0].thisown = 0 + return val + def IsOk(*args, **kwargs): """IsOk(self) -> bool""" return _misc_.Caret_IsOk(*args, **kwargs) @@ -653,6 +902,16 @@ class Caret(object): return _misc_.Caret_Hide(*args, **kwargs) def __nonzero__(self): return self.IsOk() + def GetBlinkTime(*args, **kwargs): + """GetBlinkTime() -> int""" + return _misc_.Caret_GetBlinkTime(*args, **kwargs) + + GetBlinkTime = staticmethod(GetBlinkTime) + def SetBlinkTime(*args, **kwargs): + """SetBlinkTime(int milliseconds)""" + return _misc_.Caret_SetBlinkTime(*args, **kwargs) + + SetBlinkTime = staticmethod(SetBlinkTime) class CaretPtr(Caret): def __init__(self, this): @@ -661,7 +920,6 @@ class CaretPtr(Caret): self.__class__ = Caret _misc_.Caret_swigregister(CaretPtr) - def Caret_GetBlinkTime(*args, **kwargs): """Caret_GetBlinkTime() -> int""" return _misc_.Caret_GetBlinkTime(*args, **kwargs) @@ -669,7 +927,9 @@ def Caret_GetBlinkTime(*args, **kwargs): def Caret_SetBlinkTime(*args, **kwargs): """Caret_SetBlinkTime(int milliseconds)""" return _misc_.Caret_SetBlinkTime(*args, **kwargs) + class BusyCursor(object): + """Proxy of C++ BusyCursor class""" def __repr__(self): return "<%s.%s; proxy of C++ wxBusyCursor instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -693,6 +953,7 @@ class BusyCursorPtr(BusyCursor): _misc_.BusyCursor_swigregister(BusyCursorPtr) class WindowDisabler(object): + """Proxy of C++ WindowDisabler class""" def __repr__(self): return "<%s.%s; proxy of C++ wxWindowDisabler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -716,6 +977,7 @@ class WindowDisablerPtr(WindowDisabler): _misc_.WindowDisabler_swigregister(WindowDisablerPtr) class BusyInfo(_core.Object): + """Proxy of C++ BusyInfo class""" def __repr__(self): return "<%s.%s; proxy of C++ wxBusyInfo instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -739,6 +1001,7 @@ class BusyInfoPtr(BusyInfo): _misc_.BusyInfo_swigregister(BusyInfoPtr) class StopWatch(object): + """Proxy of C++ StopWatch class""" def __repr__(self): return "<%s.%s; proxy of C++ wxStopWatch instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -772,10 +1035,11 @@ class StopWatchPtr(StopWatch): _misc_.StopWatch_swigregister(StopWatchPtr) class FileHistory(_core.Object): + """Proxy of C++ FileHistory class""" def __repr__(self): return "<%s.%s; proxy of C++ wxFileHistory instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): - """__init__(self, int maxFiles=9) -> FileHistory""" + """__init__(self, int maxFiles=9, int idBase=ID_FILE1) -> FileHistory""" newobj = _misc_.new_FileHistory(*args, **kwargs) self.this = newobj.this self.thisown = 1 @@ -840,6 +1104,7 @@ class FileHistoryPtr(FileHistory): _misc_.FileHistory_swigregister(FileHistoryPtr) class SingleInstanceChecker(object): + """Proxy of C++ SingleInstanceChecker class""" def __repr__(self): return "<%s.%s; proxy of C++ wxSingleInstanceChecker instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -878,11 +1143,12 @@ def PreSingleInstanceChecker(*args, **kwargs): def DrawWindowOnDC(*args, **kwargs): - """DrawWindowOnDC(Window window, DC dc, int method)""" + """DrawWindowOnDC(Window window, DC dc) -> bool""" return _misc_.DrawWindowOnDC(*args, **kwargs) #--------------------------------------------------------------------------- class TipProvider(object): + """Proxy of C++ TipProvider class""" def __init__(self): raise RuntimeError, "No constructor defined" def __repr__(self): return "<%s.%s; proxy of C++ wxTipProvider instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) @@ -913,6 +1179,7 @@ class TipProviderPtr(TipProvider): _misc_.TipProvider_swigregister(TipProviderPtr) class PyTipProvider(TipProvider): + """Proxy of C++ PyTipProvider class""" def __repr__(self): return "<%s.%s; proxy of C++ wxPyTipProvider instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -949,6 +1216,7 @@ TIMER_CONTINUOUS = _misc_.TIMER_CONTINUOUS TIMER_ONE_SHOT = _misc_.TIMER_ONE_SHOT wxEVT_TIMER = _misc_.wxEVT_TIMER class Timer(_core.EvtHandler): + """Proxy of C++ Timer class""" def __repr__(self): return "<%s.%s; proxy of C++ wxPyTimer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -957,7 +1225,7 @@ class Timer(_core.EvtHandler): self.this = newobj.this self.thisown = 1 del newobj.thisown - self._setCallbackInfo(self, Timer, 0); self._setOORInfo(self) + self._setCallbackInfo(self, Timer, 0); self._setOORInfo(self, 0) def __del__(self, destroy=_misc_.delete_Timer): """__del__(self)""" @@ -985,6 +1253,10 @@ class Timer(_core.EvtHandler): """Stop(self)""" return _misc_.Timer_Stop(*args, **kwargs) + def Notify(*args, **kwargs): + """Notify(self)""" + return _misc_.Timer_Notify(*args, **kwargs) + def IsRunning(*args, **kwargs): """IsRunning(self) -> bool""" return _misc_.Timer_IsRunning(*args, **kwargs) @@ -1001,6 +1273,10 @@ class Timer(_core.EvtHandler): """GetId(self) -> int""" return _misc_.Timer_GetId(*args, **kwargs) + def Destroy(self): + """NO-OP: Timers must be destroyed by normal refrence counting""" + pass + class TimerPtr(Timer): def __init__(self, this): @@ -1024,6 +1300,7 @@ EVT_TIMER = wx.PyEventBinder( wxEVT_TIMER, 1 ) class TimerEvent(_core.Event): + """Proxy of C++ TimerEvent class""" def __repr__(self): return "<%s.%s; proxy of C++ wxTimerEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -1045,6 +1322,7 @@ class TimerEventPtr(TimerEvent): _misc_.TimerEvent_swigregister(TimerEventPtr) class TimerRunner(object): + """Proxy of C++ TimerRunner class""" def __repr__(self): return "<%s.%s; proxy of C++ wxTimerRunner instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args): @@ -1098,6 +1376,7 @@ TraceResAlloc = _misc_.TraceResAlloc TraceRefCount = _misc_.TraceRefCount TraceOleCalls = _misc_.TraceOleCalls class Log(object): + """Proxy of C++ Log class""" def __repr__(self): return "<%s.%s; proxy of C++ wxLog instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -1106,6 +1385,12 @@ class Log(object): self.this = newobj.this self.thisown = 1 del newobj.thisown + def __del__(self, destroy=_misc_.delete_Log): + """__del__(self)""" + try: + if self.thisown: destroy(self) + except: pass + def IsEnabled(*args, **kwargs): """IsEnabled() -> bool""" return _misc_.Log_IsEnabled(*args, **kwargs) @@ -1227,7 +1512,9 @@ class Log(object): TimeStamp = staticmethod(TimeStamp) def Destroy(*args, **kwargs): """Destroy(self)""" - return _misc_.Log_Destroy(*args, **kwargs) + val = _misc_.Log_Destroy(*args, **kwargs) + args[0].thisown = 0 + return val class LogPtr(Log): @@ -1330,6 +1617,7 @@ def Log_TimeStamp(*args, **kwargs): return _misc_.Log_TimeStamp(*args, **kwargs) class LogStderr(Log): + """Proxy of C++ LogStderr class""" def __repr__(self): return "<%s.%s; proxy of C++ wxLogStderr instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -1347,6 +1635,7 @@ class LogStderrPtr(LogStderr): _misc_.LogStderr_swigregister(LogStderrPtr) class LogTextCtrl(Log): + """Proxy of C++ LogTextCtrl class""" def __repr__(self): return "<%s.%s; proxy of C++ wxLogTextCtrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -1364,6 +1653,7 @@ class LogTextCtrlPtr(LogTextCtrl): _misc_.LogTextCtrl_swigregister(LogTextCtrlPtr) class LogGui(Log): + """Proxy of C++ LogGui class""" def __repr__(self): return "<%s.%s; proxy of C++ wxLogGui instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -1381,6 +1671,7 @@ class LogGuiPtr(LogGui): _misc_.LogGui_swigregister(LogGuiPtr) class LogWindow(Log): + """Proxy of C++ LogWindow class""" def __repr__(self): return "<%s.%s; proxy of C++ wxLogWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -1418,6 +1709,7 @@ class LogWindowPtr(LogWindow): _misc_.LogWindow_swigregister(LogWindowPtr) class LogChain(Log): + """Proxy of C++ LogChain class""" def __repr__(self): return "<%s.%s; proxy of C++ wxLogChain instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -1450,6 +1742,32 @@ class LogChainPtr(LogChain): self.__class__ = LogChain _misc_.LogChain_swigregister(LogChainPtr) +class LogBuffer(Log): + """Proxy of C++ LogBuffer class""" + def __repr__(self): + return "<%s.%s; proxy of C++ wxLogBuffer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) + def __init__(self, *args, **kwargs): + """__init__(self) -> LogBuffer""" + newobj = _misc_.new_LogBuffer(*args, **kwargs) + self.this = newobj.this + self.thisown = 1 + del newobj.thisown + def GetBuffer(*args, **kwargs): + """GetBuffer(self) -> String""" + return _misc_.LogBuffer_GetBuffer(*args, **kwargs) + + def Flush(*args, **kwargs): + """Flush(self)""" + return _misc_.LogBuffer_Flush(*args, **kwargs) + + +class LogBufferPtr(LogBuffer): + def __init__(self, this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = LogBuffer +_misc_.LogBuffer_swigregister(LogBufferPtr) + def SysErrorCode(*args, **kwargs): """SysErrorCode() -> unsigned long""" @@ -1507,6 +1825,7 @@ def SafeShowMessage(*args, **kwargs): """SafeShowMessage(String title, String text)""" return _misc_.SafeShowMessage(*args, **kwargs) class LogNull(object): + """Proxy of C++ LogNull class""" def __repr__(self): return "<%s.%s; proxy of C++ wxLogNull instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -1537,6 +1856,7 @@ def LogTrace(*args): return _misc_.LogTrace(*args) class PyLog(Log): + """Proxy of C++ PyLog class""" def __repr__(self): return "<%s.%s; proxy of C++ wxPyLog instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -1568,6 +1888,8 @@ KILL_BAD_SIGNAL = _misc_.KILL_BAD_SIGNAL KILL_ACCESS_DENIED = _misc_.KILL_ACCESS_DENIED KILL_NO_PROCESS = _misc_.KILL_NO_PROCESS KILL_ERROR = _misc_.KILL_ERROR +KILL_NOCHILDREN = _misc_.KILL_NOCHILDREN +KILL_CHILDREN = _misc_.KILL_CHILDREN SIGNONE = _misc_.SIGNONE SIGHUP = _misc_.SIGHUP SIGINT = _misc_.SIGINT @@ -1586,10 +1908,11 @@ SIGPIPE = _misc_.SIGPIPE SIGALRM = _misc_.SIGALRM SIGTERM = _misc_.SIGTERM class Process(_core.EvtHandler): + """Proxy of C++ Process class""" def __repr__(self): return "<%s.%s; proxy of C++ wxPyProcess instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def Kill(*args, **kwargs): - """Kill(int pid, int sig=SIGTERM) -> int""" + """Kill(int pid, int sig=SIGTERM, int flags=KILL_NOCHILDREN) -> int""" return _misc_.Process_Kill(*args, **kwargs) Kill = staticmethod(Kill) @@ -1615,9 +1938,14 @@ class Process(_core.EvtHandler): """_setCallbackInfo(self, PyObject self, PyObject _class)""" return _misc_.Process__setCallbackInfo(*args, **kwargs) - def base_OnTerminate(*args, **kwargs): - """base_OnTerminate(self, int pid, int status)""" - return _misc_.Process_base_OnTerminate(*args, **kwargs) + def OnTerminate(*args, **kwargs): + """OnTerminate(self, int pid, int status)""" + return _misc_.Process_OnTerminate(*args, **kwargs) + + def base_OnTerminate(*args, **kw): + return Process.OnTerminate(*args, **kw) + base_OnTerminate = wx._deprecated(base_OnTerminate, + "Please use Process.OnTerminate instead.") def Redirect(*args, **kwargs): """Redirect(self)""" @@ -1668,7 +1996,7 @@ class ProcessPtr(Process): _misc_.Process_swigregister(ProcessPtr) def Process_Kill(*args, **kwargs): - """Process_Kill(int pid, int sig=SIGTERM) -> int""" + """Process_Kill(int pid, int sig=SIGTERM, int flags=KILL_NOCHILDREN) -> int""" return _misc_.Process_Kill(*args, **kwargs) def Process_Exists(*args, **kwargs): @@ -1680,6 +2008,7 @@ def Process_Open(*args, **kwargs): return _misc_.Process_Open(*args, **kwargs) class ProcessEvent(_core.Event): + """Proxy of C++ ProcessEvent class""" def __repr__(self): return "<%s.%s; proxy of C++ wxProcessEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -1713,10 +2042,15 @@ EXEC_ASYNC = _misc_.EXEC_ASYNC EXEC_SYNC = _misc_.EXEC_SYNC EXEC_NOHIDE = _misc_.EXEC_NOHIDE EXEC_MAKE_GROUP_LEADER = _misc_.EXEC_MAKE_GROUP_LEADER +EXEC_NODISABLE = _misc_.EXEC_NODISABLE def Execute(*args, **kwargs): """Execute(String command, int flags=EXEC_ASYNC, Process process=None) -> long""" return _misc_.Execute(*args, **kwargs) + +def Kill(*args, **kwargs): + """Kill(long pid, int sig=SIGTERM, int rc, int flags=KILL_NOCHILDREN) -> int""" + return _misc_.Kill(*args, **kwargs) #--------------------------------------------------------------------------- JOYSTICK1 = _misc_.JOYSTICK1 @@ -1727,6 +2061,7 @@ JOY_BUTTON2 = _misc_.JOY_BUTTON2 JOY_BUTTON3 = _misc_.JOY_BUTTON3 JOY_BUTTON4 = _misc_.JOY_BUTTON4 class Joystick(object): + """Proxy of C++ Joystick class""" def __repr__(self): return "<%s.%s; proxy of C++ wxJoystick instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -1923,13 +2258,9 @@ wxEVT_JOY_BUTTON_UP = _misc_.wxEVT_JOY_BUTTON_UP wxEVT_JOY_MOVE = _misc_.wxEVT_JOY_MOVE wxEVT_JOY_ZMOVE = _misc_.wxEVT_JOY_ZMOVE class JoystickEvent(_core.Event): + """Proxy of C++ JoystickEvent class""" def __repr__(self): return "<%s.%s; proxy of C++ wxJoystickEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - m_pos = property(_misc_.JoystickEvent_m_pos_get, _misc_.JoystickEvent_m_pos_set) - m_zPosition = property(_misc_.JoystickEvent_m_zPosition_get, _misc_.JoystickEvent_m_zPosition_set) - m_buttonChange = property(_misc_.JoystickEvent_m_buttonChange_get, _misc_.JoystickEvent_m_buttonChange_set) - m_buttonState = property(_misc_.JoystickEvent_m_buttonState_get, _misc_.JoystickEvent_m_buttonState_set) - m_joyStick = property(_misc_.JoystickEvent_m_joyStick_get, _misc_.JoystickEvent_m_joyStick_set) def __init__(self, *args, **kwargs): """ __init__(self, wxEventType type=wxEVT_NULL, int state=0, int joystick=JOYSTICK1, @@ -2003,6 +2334,12 @@ class JoystickEvent(_core.Event): """ButtonIsDown(self, int but=JOY_BUTTON_ANY) -> bool""" return _misc_.JoystickEvent_ButtonIsDown(*args, **kwargs) + m_pos = property(GetPosition, SetPosition) + m_zPosition = property(GetZPosition, SetZPosition) + m_buttonChange = property(GetButtonChange, SetButtonChange) + m_buttonState = property(GetButtonState, SetButtonState) + m_joyStick = property(GetJoystick, SetJoystick) + class JoystickEventPtr(JoystickEvent): def __init__(self, this): @@ -2029,6 +2366,7 @@ SOUND_SYNC = _misc_.SOUND_SYNC SOUND_ASYNC = _misc_.SOUND_ASYNC SOUND_LOOP = _misc_.SOUND_LOOP class Sound(object): + """Proxy of C++ Sound class""" def __repr__(self): return "<%s.%s; proxy of C++ wxSound instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -2100,6 +2438,7 @@ MAILCAP_KDE = _misc_.MAILCAP_KDE MAILCAP_GNOME = _misc_.MAILCAP_GNOME MAILCAP_ALL = _misc_.MAILCAP_ALL class FileTypeInfo(object): + """Proxy of C++ FileTypeInfo class""" def __repr__(self): return "<%s.%s; proxy of C++ wxFileTypeInfo instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -2177,6 +2516,7 @@ def NullFileTypeInfo(*args, **kwargs): return val class FileType(object): + """Proxy of C++ FileType class""" def __repr__(self): return "<%s.%s; proxy of C++ wxFileType instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -2257,6 +2597,7 @@ def FileType_ExpandCommand(*args, **kwargs): return _misc_.FileType_ExpandCommand(*args, **kwargs) class MimeTypesManager(object): + """Proxy of C++ MimeTypesManager class""" def __repr__(self): return "<%s.%s; proxy of C++ wxMimeTypesManager instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def IsOfType(*args, **kwargs): @@ -2381,6 +2722,12 @@ class ArtProvider(object): del newobj.thisown self._setCallbackInfo(self, ArtProvider) + def __del__(self, destroy=_misc_.delete_ArtProvider): + """__del__(self)""" + try: + if self.thisown: destroy(self) + except: pass + def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" return _misc_.ArtProvider__setCallbackInfo(*args, **kwargs) @@ -2410,7 +2757,9 @@ class ArtProvider(object): Remove provider. The provider must have been added previously! The provider is _not_ deleted. """ - return _misc_.ArtProvider_RemoveProvider(*args, **kwargs) + val = _misc_.ArtProvider_RemoveProvider(*args, **kwargs) + args[1].thisown = 1 + return val RemoveProvider = staticmethod(RemoveProvider) def GetBitmap(*args, **kwargs): @@ -2433,9 +2782,21 @@ class ArtProvider(object): return _misc_.ArtProvider_GetIcon(*args, **kwargs) GetIcon = staticmethod(GetIcon) + def GetSizeHint(*args, **kwargs): + """ + GetSizeHint(String client, bool platform_dependent=False) -> Size + + Get the size hint of an icon from a specific Art Client, queries the + topmost provider if platform_dependent = false + """ + return _misc_.ArtProvider_GetSizeHint(*args, **kwargs) + + GetSizeHint = staticmethod(GetSizeHint) def Destroy(*args, **kwargs): """Destroy(self)""" - return _misc_.ArtProvider_Destroy(*args, **kwargs) + val = _misc_.ArtProvider_Destroy(*args, **kwargs) + args[0].thisown = 0 + return val class ArtProviderPtr(ArtProvider): @@ -2450,6 +2811,7 @@ ART_FRAME_ICON = cvar.ART_FRAME_ICON ART_CMN_DIALOG = cvar.ART_CMN_DIALOG ART_HELP_BROWSER = cvar.ART_HELP_BROWSER ART_MESSAGE_BOX = cvar.ART_MESSAGE_BOX +ART_BUTTON = cvar.ART_BUTTON ART_OTHER = cvar.ART_OTHER ART_ADD_BOOKMARK = cvar.ART_ADD_BOOKMARK ART_DEL_BOOKMARK = cvar.ART_DEL_BOOKMARK @@ -2465,13 +2827,20 @@ ART_GO_DOWN = cvar.ART_GO_DOWN ART_GO_TO_PARENT = cvar.ART_GO_TO_PARENT ART_GO_HOME = cvar.ART_GO_HOME ART_FILE_OPEN = cvar.ART_FILE_OPEN +ART_FILE_SAVE = cvar.ART_FILE_SAVE +ART_FILE_SAVE_AS = cvar.ART_FILE_SAVE_AS ART_PRINT = cvar.ART_PRINT ART_HELP = cvar.ART_HELP ART_TIP = cvar.ART_TIP ART_REPORT_VIEW = cvar.ART_REPORT_VIEW ART_LIST_VIEW = cvar.ART_LIST_VIEW ART_NEW_DIR = cvar.ART_NEW_DIR +ART_HARDDISK = cvar.ART_HARDDISK +ART_FLOPPY = cvar.ART_FLOPPY +ART_CDROM = cvar.ART_CDROM +ART_REMOVABLE = cvar.ART_REMOVABLE ART_FOLDER = cvar.ART_FOLDER +ART_FOLDER_OPEN = cvar.ART_FOLDER_OPEN ART_GO_DIR_UP = cvar.ART_GO_DIR_UP ART_EXECUTABLE_FILE = cvar.ART_EXECUTABLE_FILE ART_NORMAL_FILE = cvar.ART_NORMAL_FILE @@ -2482,6 +2851,16 @@ ART_QUESTION = cvar.ART_QUESTION ART_WARNING = cvar.ART_WARNING ART_INFORMATION = cvar.ART_INFORMATION ART_MISSING_IMAGE = cvar.ART_MISSING_IMAGE +ART_COPY = cvar.ART_COPY +ART_CUT = cvar.ART_CUT +ART_PASTE = cvar.ART_PASTE +ART_DELETE = cvar.ART_DELETE +ART_NEW = cvar.ART_NEW +ART_UNDO = cvar.ART_UNDO +ART_REDO = cvar.ART_REDO +ART_QUIT = cvar.ART_QUIT +ART_FIND = cvar.ART_FIND +ART_FIND_AND_REPLACE = cvar.ART_FIND_AND_REPLACE def ArtProvider_PushProvider(*args, **kwargs): """ @@ -2506,7 +2885,9 @@ def ArtProvider_RemoveProvider(*args, **kwargs): Remove provider. The provider must have been added previously! The provider is _not_ deleted. """ - return _misc_.ArtProvider_RemoveProvider(*args, **kwargs) + val = _misc_.ArtProvider_RemoveProvider(*args, **kwargs) + args[1].thisown = 1 + return val def ArtProvider_GetBitmap(*args, **kwargs): """ @@ -2526,6 +2907,15 @@ def ArtProvider_GetIcon(*args, **kwargs): """ return _misc_.ArtProvider_GetIcon(*args, **kwargs) +def ArtProvider_GetSizeHint(*args, **kwargs): + """ + ArtProvider_GetSizeHint(String client, bool platform_dependent=False) -> Size + + Get the size hint of an icon from a specific Art Client, queries the + topmost provider if platform_dependent = false + """ + return _misc_.ArtProvider_GetSizeHint(*args, **kwargs) + #--------------------------------------------------------------------------- CONFIG_USE_LOCAL_FILE = _misc_.CONFIG_USE_LOCAL_FILE @@ -3055,6 +3445,7 @@ def ExpandEnvVars(*args, **kwargs): #--------------------------------------------------------------------------- class DateTime(object): + """Proxy of C++ DateTime class""" def __repr__(self): return "<%s.%s; proxy of C++ wxDateTime instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) Local = _misc_.DateTime_Local @@ -3422,6 +3813,14 @@ class DateTime(object): """GetWeek(self, int numWeek, int weekday=Mon, int flags=Monday_First) -> DateTime""" return _misc_.DateTime_GetWeek(*args, **kwargs) + SetToTheWeek = wx._deprecated(SetToTheWeek, "SetToTheWeek is deprecated, use (static) SetToWeekOfYear instead") + GetWeek = wx._deprecated(GetWeek, "GetWeek is deprecated, use GetWeekOfYear instead") + + def SetToWeekOfYear(*args, **kwargs): + """SetToWeekOfYear(int year, int numWeek, int weekday=Mon) -> DateTime""" + return _misc_.DateTime_SetToWeekOfYear(*args, **kwargs) + + SetToWeekOfYear = staticmethod(SetToWeekOfYear) def SetToLastMonthDay(*args, **kwargs): """SetToLastMonthDay(self, int month=Inv_Month, int year=Inv_Year) -> DateTime""" return _misc_.DateTime_SetToLastMonthDay(*args, **kwargs) @@ -3466,6 +3865,22 @@ class DateTime(object): """MakeTimezone(self, wxDateTime::TimeZone tz, bool noDST=False) -> DateTime""" return _misc_.DateTime_MakeTimezone(*args, **kwargs) + def FromTimezone(*args, **kwargs): + """FromTimezone(self, wxDateTime::TimeZone tz, bool noDST=False) -> DateTime""" + return _misc_.DateTime_FromTimezone(*args, **kwargs) + + def MakeFromTimezone(*args, **kwargs): + """MakeFromTimezone(self, wxDateTime::TimeZone tz, bool noDST=False) -> DateTime""" + return _misc_.DateTime_MakeFromTimezone(*args, **kwargs) + + def ToUTC(*args, **kwargs): + """ToUTC(self, bool noDST=False) -> DateTime""" + return _misc_.DateTime_ToUTC(*args, **kwargs) + + def MakeUTC(*args, **kwargs): + """MakeUTC(self, bool noDST=False) -> DateTime""" + return _misc_.DateTime_MakeUTC(*args, **kwargs) + def ToGMT(*args, **kwargs): """ToGMT(self, bool noDST=False) -> DateTime""" return _misc_.DateTime_ToGMT(*args, **kwargs) @@ -3474,6 +3889,14 @@ class DateTime(object): """MakeGMT(self, bool noDST=False) -> DateTime""" return _misc_.DateTime_MakeGMT(*args, **kwargs) + def FromUTC(*args, **kwargs): + """FromUTC(self, bool noDST=False) -> DateTime""" + return _misc_.DateTime_FromUTC(*args, **kwargs) + + def MakeFromUTC(*args, **kwargs): + """MakeFromUTC(self, bool noDST=False) -> DateTime""" + return _misc_.DateTime_MakeFromUTC(*args, **kwargs) + def IsDST(*args, **kwargs): """IsDST(self, int country=Country_Default) -> int""" return _misc_.DateTime_IsDST(*args, **kwargs) @@ -3617,36 +4040,36 @@ class DateTime(object): """ return _misc_.DateTime___sub__(*args) - def __lt__(*args): + def __lt__(*args, **kwargs): """__lt__(self, DateTime other) -> bool""" - return _misc_.DateTime___lt__(*args) + return _misc_.DateTime___lt__(*args, **kwargs) - def __le__(*args): + def __le__(*args, **kwargs): """__le__(self, DateTime other) -> bool""" - return _misc_.DateTime___le__(*args) + return _misc_.DateTime___le__(*args, **kwargs) - def __gt__(*args): + def __gt__(*args, **kwargs): """__gt__(self, DateTime other) -> bool""" - return _misc_.DateTime___gt__(*args) + return _misc_.DateTime___gt__(*args, **kwargs) - def __ge__(*args): + def __ge__(*args, **kwargs): """__ge__(self, DateTime other) -> bool""" - return _misc_.DateTime___ge__(*args) + return _misc_.DateTime___ge__(*args, **kwargs) - def __eq__(*args): + def __eq__(*args, **kwargs): """__eq__(self, DateTime other) -> bool""" - return _misc_.DateTime___eq__(*args) + return _misc_.DateTime___eq__(*args, **kwargs) - def __ne__(*args): + def __ne__(*args, **kwargs): """__ne__(self, DateTime other) -> bool""" - return _misc_.DateTime___ne__(*args) + return _misc_.DateTime___ne__(*args, **kwargs) def ParseRfc822Date(*args, **kwargs): """ParseRfc822Date(self, String date) -> int""" return _misc_.DateTime_ParseRfc822Date(*args, **kwargs) def ParseFormat(*args, **kwargs): - """ParseFormat(self, String date, String format=DateFormatStr, DateTime dateDef=DefaultDateTime) -> int""" + """ParseFormat(self, String date, String format=DefaultDateTimeFormat, DateTime dateDef=DefaultDateTime) -> int""" return _misc_.DateTime_ParseFormat(*args, **kwargs) def ParseDateTime(*args, **kwargs): @@ -3662,7 +4085,7 @@ class DateTime(object): return _misc_.DateTime_ParseTime(*args, **kwargs) def Format(*args, **kwargs): - """Format(self, String format=DateFormatStr, wxDateTime::TimeZone tz=LOCAL_TZ) -> String""" + """Format(self, String format=DefaultDateTimeFormat, wxDateTime::TimeZone tz=LOCAL_TZ) -> String""" return _misc_.DateTime_Format(*args, **kwargs) def FormatDate(*args, **kwargs): @@ -3683,12 +4106,13 @@ class DateTime(object): def __repr__(self): if self.IsValid(): - return '' % ( self.Format(), self.this) + f = self.Format().encode(wx.GetDefaultPyEncoding()) + return '' % ( f, self.this) else: return '' % self.this def __str__(self): if self.IsValid(): - return self.Format() + return self.Format().encode(wx.GetDefaultPyEncoding()) else: return "INVALID DateTime" @@ -3699,8 +4123,8 @@ class DateTimePtr(DateTime): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = DateTime _misc_.DateTime_swigregister(DateTimePtr) -DateFormatStr = cvar.DateFormatStr -TimeSpanFormatStr = cvar.TimeSpanFormatStr +DefaultDateTimeFormat = cvar.DefaultDateTimeFormat +DefaultTimeSpanFormat = cvar.DefaultTimeSpanFormat def DateTime_SetCountry(*args, **kwargs): """DateTime_SetCountry(int country)""" @@ -3809,7 +4233,12 @@ def DateTimeFromDMY(*args, **kwargs): val.thisown = 1 return val +def DateTime_SetToWeekOfYear(*args, **kwargs): + """DateTime_SetToWeekOfYear(int year, int numWeek, int weekday=Mon) -> DateTime""" + return _misc_.DateTime_SetToWeekOfYear(*args, **kwargs) + class TimeSpan(object): + """Proxy of C++ TimeSpan class""" def __repr__(self): return "<%s.%s; proxy of C++ wxTimeSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def Seconds(*args, **kwargs): @@ -3999,13 +4428,14 @@ class TimeSpan(object): return _misc_.TimeSpan_GetMilliseconds(*args, **kwargs) def Format(*args, **kwargs): - """Format(self, String format=TimeSpanFormatStr) -> String""" + """Format(self, String format=DefaultTimeSpanFormat) -> String""" return _misc_.TimeSpan_Format(*args, **kwargs) def __repr__(self): - return '' % ( self.Format(), self.this) + f = self.Format().encode(wx.GetDefaultPyEncoding()) + return '' % ( f, self.this) def __str__(self): - return self.Format() + return self.Format().encode(wx.GetDefaultPyEncoding()) class TimeSpanPtr(TimeSpan): @@ -4056,6 +4486,7 @@ def TimeSpan_Week(*args, **kwargs): return _misc_.TimeSpan_Week(*args, **kwargs) class DateSpan(object): + """Proxy of C++ DateSpan class""" def __repr__(self): return "<%s.%s; proxy of C++ wxDateSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -4452,7 +4883,6 @@ class DataObject(object): GetDataHere(self, DataFormat format) -> String Get the data bytes in the specified format, returns None on failure. - """ return _misc_.DataObject_GetDataHere(*args, **kwargs) @@ -4846,12 +5276,6 @@ class FileDataObject(DataObjectSimple): Explorer and other compatible programs under Windows or GNOME/KDE filemanager under Unix which makes it possible to receive files from them using this class. - - :Warning: Under all non-Windows platforms this class is currently - "input-only", i.e. you can receive the files from another - application, but copying (or dragging) file(s) from a wxWidgets - application is not currently supported. - """ def __repr__(self): return "<%s.%s; proxy of C++ wxFileDataObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) @@ -4895,9 +5319,11 @@ class CustomDataObject(DataObjectSimple): """ def __repr__(self): return "<%s.%s; proxy of C++ wxCustomDataObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) - def __init__(self, *args, **kwargs): + def __init__(self, *args): """ - __init__(self, DataFormat format=FormatInvalid) -> CustomDataObject + __init__(self, DataFormat format) -> CustomDataObject + __init__(self, String formatName) -> CustomDataObject + __init__(self) -> CustomDataObject wx.CustomDataObject is a specialization of `wx.DataObjectSimple` for some application-specific data in arbitrary format. Python strings @@ -4905,7 +5331,7 @@ class CustomDataObject(DataObjectSimple): easily be transfered via strings. A copy of the data is stored in the data object. """ - newobj = _misc_.new_CustomDataObject(*args, **kwargs) + newobj = _misc_.new_CustomDataObject(*args) self.this = newobj.this self.thisown = 1 del newobj.thisown @@ -4942,7 +5368,7 @@ class CustomDataObjectPtr(CustomDataObject): self.__class__ = CustomDataObject _misc_.CustomDataObject_swigregister(CustomDataObjectPtr) -class URLDataObject(DataObjectComposite): +class URLDataObject(DataObject): """ This data object holds a URL in a format that is compatible with some browsers such that it is able to be dragged to or from them. @@ -4985,6 +5411,7 @@ class URLDataObjectPtr(URLDataObject): _misc_.URLDataObject_swigregister(URLDataObjectPtr) class MetafileDataObject(DataObjectSimple): + """Proxy of C++ MetafileDataObject class""" def __repr__(self): return "<%s.%s; proxy of C++ wxMetafileDataObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -5025,6 +5452,7 @@ def IsDragResultOk(*args, **kwargs): """IsDragResultOk(int res) -> bool""" return _misc_.IsDragResultOk(*args, **kwargs) class DropSource(object): + """Proxy of C++ DropSource class""" def __repr__(self): return "<%s.%s; proxy of C++ wxPyDropSource instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -5064,9 +5492,14 @@ class DropSource(object): """DoDragDrop(self, int flags=Drag_CopyOnly) -> int""" return _misc_.DropSource_DoDragDrop(*args, **kwargs) - def base_GiveFeedback(*args, **kwargs): - """base_GiveFeedback(self, int effect) -> bool""" - return _misc_.DropSource_base_GiveFeedback(*args, **kwargs) + def GiveFeedback(*args, **kwargs): + """GiveFeedback(self, int effect) -> bool""" + return _misc_.DropSource_GiveFeedback(*args, **kwargs) + + def base_GiveFeedback(*args, **kw): + return DropSource.GiveFeedback(*args, **kw) + base_GiveFeedback = wx._deprecated(base_GiveFeedback, + "Please use DropSource.GiveFeedback instead.") class DropSourcePtr(DropSource): @@ -5076,7 +5509,20 @@ class DropSourcePtr(DropSource): self.__class__ = DropSource _misc_.DropSource_swigregister(DropSourcePtr) +def DROP_ICON(filename): + """ + Returns either a `wx.Cursor` or `wx.Icon` created from the image file + ``filename``. This function is useful with the `wx.DropSource` class + which, depending on platform accepts either a icon or a cursor. + """ + img = wx.Image(filename) + if wx.Platform == '__WXGTK__': + return wx.IconFromBitmap(wx.BitmapFromImage(img)) + else: + return wx.CursorFromImage(img) + class DropTarget(object): + """Proxy of C++ DropTarget class""" def __repr__(self): return "<%s.%s; proxy of C++ wxPyDropTarget instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -5105,26 +5551,54 @@ class DropTarget(object): """SetDataObject(self, DataObject dataObject)""" return _misc_.DropTarget_SetDataObject(*args, **kwargs) - def base_OnEnter(*args, **kwargs): - """base_OnEnter(self, int x, int y, int def) -> int""" - return _misc_.DropTarget_base_OnEnter(*args, **kwargs) + def OnEnter(*args, **kwargs): + """OnEnter(self, int x, int y, int def) -> int""" + return _misc_.DropTarget_OnEnter(*args, **kwargs) + + def OnDragOver(*args, **kwargs): + """OnDragOver(self, int x, int y, int def) -> int""" + return _misc_.DropTarget_OnDragOver(*args, **kwargs) - def base_OnDragOver(*args, **kwargs): - """base_OnDragOver(self, int x, int y, int def) -> int""" - return _misc_.DropTarget_base_OnDragOver(*args, **kwargs) + def OnLeave(*args, **kwargs): + """OnLeave(self)""" + return _misc_.DropTarget_OnLeave(*args, **kwargs) - def base_OnLeave(*args, **kwargs): - """base_OnLeave(self)""" - return _misc_.DropTarget_base_OnLeave(*args, **kwargs) + def OnDrop(*args, **kwargs): + """OnDrop(self, int x, int y) -> bool""" + return _misc_.DropTarget_OnDrop(*args, **kwargs) - def base_OnDrop(*args, **kwargs): - """base_OnDrop(self, int x, int y) -> bool""" - return _misc_.DropTarget_base_OnDrop(*args, **kwargs) + def base_OnEnter(*args, **kw): + return DropTarget.OnEnter(*args, **kw) + base_OnEnter = wx._deprecated(base_OnEnter, + "Please use DropTarget.OnEnter instead.") + + def base_OnDragOver(*args, **kw): + return DropTarget.OnDragOver(*args, **kw) + base_OnDragOver = wx._deprecated(base_OnDragOver, + "Please use DropTarget.OnDragOver instead.") + + def base_OnLeave(*args, **kw): + return DropTarget.OnLeave(*args, **kw) + base_OnLeave = wx._deprecated(base_OnLeave, + "Please use DropTarget.OnLeave instead.") + + def base_OnDrop(*args, **kw): + return DropTarget.OnDrop(*args, **kw) + base_OnDrop = wx._deprecated(base_OnDrop, + "Please use DropTarget.OnDrop instead.") def GetData(*args, **kwargs): """GetData(self) -> bool""" return _misc_.DropTarget_GetData(*args, **kwargs) + def SetDefaultAction(*args, **kwargs): + """SetDefaultAction(self, int action)""" + return _misc_.DropTarget_SetDefaultAction(*args, **kwargs) + + def GetDefaultAction(*args, **kwargs): + """GetDefaultAction(self) -> int""" + return _misc_.DropTarget_GetDefaultAction(*args, **kwargs) + class DropTargetPtr(DropTarget): def __init__(self, this): @@ -5135,6 +5609,7 @@ _misc_.DropTarget_swigregister(DropTargetPtr) PyDropTarget = DropTarget class TextDropTarget(DropTarget): + """Proxy of C++ TextDropTarget class""" def __repr__(self): return "<%s.%s; proxy of C++ wxPyTextDropTarget instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -5149,25 +5624,59 @@ class TextDropTarget(DropTarget): """_setCallbackInfo(self, PyObject self, PyObject _class)""" return _misc_.TextDropTarget__setCallbackInfo(*args, **kwargs) - def base_OnEnter(*args, **kwargs): - """base_OnEnter(self, int x, int y, int def) -> int""" - return _misc_.TextDropTarget_base_OnEnter(*args, **kwargs) + def OnDropText(*args, **kwargs): + """OnDropText(self, int x, int y, String text) -> bool""" + return _misc_.TextDropTarget_OnDropText(*args, **kwargs) + + def OnEnter(*args, **kwargs): + """OnEnter(self, int x, int y, int def) -> int""" + return _misc_.TextDropTarget_OnEnter(*args, **kwargs) + + def OnDragOver(*args, **kwargs): + """OnDragOver(self, int x, int y, int def) -> int""" + return _misc_.TextDropTarget_OnDragOver(*args, **kwargs) + + def OnLeave(*args, **kwargs): + """OnLeave(self)""" + return _misc_.TextDropTarget_OnLeave(*args, **kwargs) + + def OnDrop(*args, **kwargs): + """OnDrop(self, int x, int y) -> bool""" + return _misc_.TextDropTarget_OnDrop(*args, **kwargs) + + def OnData(*args, **kwargs): + """OnData(self, int x, int y, int def) -> int""" + return _misc_.TextDropTarget_OnData(*args, **kwargs) + + def base_OnDropText(*args, **kw): + return TextDropTarget.OnDropText(*args, **kw) + base_OnDropText = wx._deprecated(base_OnDropText, + "Please use TextDropTarget.OnDropText instead.") + + def base_OnEnter(*args, **kw): + return TextDropTarget.OnEnter(*args, **kw) + base_OnEnter = wx._deprecated(base_OnEnter, + "Please use TextDropTarget.OnEnter instead.") - def base_OnDragOver(*args, **kwargs): - """base_OnDragOver(self, int x, int y, int def) -> int""" - return _misc_.TextDropTarget_base_OnDragOver(*args, **kwargs) + def base_OnDragOver(*args, **kw): + return TextDropTarget.OnDragOver(*args, **kw) + base_OnDragOver = wx._deprecated(base_OnDragOver, + "Please use TextDropTarget.OnDragOver instead.") - def base_OnLeave(*args, **kwargs): - """base_OnLeave(self)""" - return _misc_.TextDropTarget_base_OnLeave(*args, **kwargs) + def base_OnLeave(*args, **kw): + return TextDropTarget.OnLeave(*args, **kw) + base_OnLeave = wx._deprecated(base_OnLeave, + "Please use TextDropTarget.OnLeave instead.") - def base_OnDrop(*args, **kwargs): - """base_OnDrop(self, int x, int y) -> bool""" - return _misc_.TextDropTarget_base_OnDrop(*args, **kwargs) + def base_OnDrop(*args, **kw): + return TextDropTarget.OnDrop(*args, **kw) + base_OnDrop = wx._deprecated(base_OnDrop, + "Please use TextDropTarget.OnDrop instead.") - def base_OnData(*args, **kwargs): - """base_OnData(self, int x, int y, int def) -> int""" - return _misc_.TextDropTarget_base_OnData(*args, **kwargs) + def base_OnData(*args, **kw): + return TextDropTarget.OnData(*args, **kw) + base_OnData = wx._deprecated(base_OnData, + "Please use TextDropTarget.OnData instead.") class TextDropTargetPtr(TextDropTarget): @@ -5178,6 +5687,7 @@ class TextDropTargetPtr(TextDropTarget): _misc_.TextDropTarget_swigregister(TextDropTargetPtr) class FileDropTarget(DropTarget): + """Proxy of C++ FileDropTarget class""" def __repr__(self): return "<%s.%s; proxy of C++ wxPyFileDropTarget instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -5192,25 +5702,59 @@ class FileDropTarget(DropTarget): """_setCallbackInfo(self, PyObject self, PyObject _class)""" return _misc_.FileDropTarget__setCallbackInfo(*args, **kwargs) - def base_OnEnter(*args, **kwargs): - """base_OnEnter(self, int x, int y, int def) -> int""" - return _misc_.FileDropTarget_base_OnEnter(*args, **kwargs) + def OnDropFiles(*args, **kwargs): + """OnDropFiles(self, int x, int y, wxArrayString filenames) -> bool""" + return _misc_.FileDropTarget_OnDropFiles(*args, **kwargs) + + def OnEnter(*args, **kwargs): + """OnEnter(self, int x, int y, int def) -> int""" + return _misc_.FileDropTarget_OnEnter(*args, **kwargs) + + def OnDragOver(*args, **kwargs): + """OnDragOver(self, int x, int y, int def) -> int""" + return _misc_.FileDropTarget_OnDragOver(*args, **kwargs) + + def OnLeave(*args, **kwargs): + """OnLeave(self)""" + return _misc_.FileDropTarget_OnLeave(*args, **kwargs) + + def OnDrop(*args, **kwargs): + """OnDrop(self, int x, int y) -> bool""" + return _misc_.FileDropTarget_OnDrop(*args, **kwargs) + + def OnData(*args, **kwargs): + """OnData(self, int x, int y, int def) -> int""" + return _misc_.FileDropTarget_OnData(*args, **kwargs) + + def base_OnDropFiles(*args, **kw): + return FileDropTarget.OnDropFiles(*args, **kw) + base_OnDropFiles = wx._deprecated(base_OnDropFiles, + "Please use FileDropTarget.OnDropFiles instead.") + + def base_OnEnter(*args, **kw): + return FileDropTarget.OnEnter(*args, **kw) + base_OnEnter = wx._deprecated(base_OnEnter, + "Please use FileDropTarget.OnEnter instead.") - def base_OnDragOver(*args, **kwargs): - """base_OnDragOver(self, int x, int y, int def) -> int""" - return _misc_.FileDropTarget_base_OnDragOver(*args, **kwargs) + def base_OnDragOver(*args, **kw): + return FileDropTarget.OnDragOver(*args, **kw) + base_OnDragOver = wx._deprecated(base_OnDragOver, + "Please use FileDropTarget.OnDragOver instead.") - def base_OnLeave(*args, **kwargs): - """base_OnLeave(self)""" - return _misc_.FileDropTarget_base_OnLeave(*args, **kwargs) + def base_OnLeave(*args, **kw): + return FileDropTarget.OnLeave(*args, **kw) + base_OnLeave = wx._deprecated(base_OnLeave, + "Please use FileDropTarget.OnLeave instead.") - def base_OnDrop(*args, **kwargs): - """base_OnDrop(self, int x, int y) -> bool""" - return _misc_.FileDropTarget_base_OnDrop(*args, **kwargs) + def base_OnDrop(*args, **kw): + return FileDropTarget.OnDrop(*args, **kw) + base_OnDrop = wx._deprecated(base_OnDrop, + "Please use FileDropTarget.OnDrop instead.") - def base_OnData(*args, **kwargs): - """base_OnData(self, int x, int y, int def) -> int""" - return _misc_.FileDropTarget_base_OnData(*args, **kwargs) + def base_OnData(*args, **kw): + return FileDropTarget.OnData(*args, **kw) + base_OnData = wx._deprecated(base_OnData, + "Please use FileDropTarget.OnData instead.") class FileDropTargetPtr(FileDropTarget): @@ -5385,7 +5929,8 @@ class _wxPyDelayedInitWrapper(object): self._instance = None def _checkInstance(self): if self._instance is None: - self._instance = self._initfunc(*self._args, **self._kwargs) + if wx.GetApp(): + self._instance = self._initfunc(*self._args, **self._kwargs) def __getattr__(self, name): self._checkInstance() return getattr(self._instance, name) @@ -5634,7 +6179,22 @@ class Display(object): """ ChangeMode(self, VideoMode mode=DefaultVideoMode) -> bool - Change current mode, return true if succeeded, false otherwise + Changes the video mode of this display to the mode specified in the + mode parameter. + + If wx.DefaultVideoMode is passed in as the mode parameter, the defined + behaviour is that wx.Display will reset the video mode to the default + mode used by the display. On Windows, the behavior is normal. + However, there are differences on other platforms. On Unix variations + using X11 extensions it should behave as defined, but some + irregularities may occur. + + On wxMac passing in wx.DefaultVideoMode as the mode parameter does + nothing. This happens because Carbon no longer has access to + DMUseScreenPrefs, an undocumented function that changed the video mode + to the system default by using the system's 'scrn' resource. + + Returns True if succeeded, False otherwise """ return _misc_.Display_ChangeMode(*args, **kwargs) @@ -5681,4 +6241,160 @@ def Display_GetFromWindow(*args, **kwargs): """ return _misc_.Display_GetFromWindow(*args, **kwargs) +#--------------------------------------------------------------------------- + +class StandardPaths(object): + """ + wx.StandardPaths returns the standard locations in the file system and + should be used by the programs to find their data files in a portable + way. + + In the description of the methods below, the example return values are + given for the Unix, Windows and Mac OS X systems, however please note + that these are just the examples and the actual values may differ. For + example, under Windows: the system administrator may change the + standard directories locations, i.e. the Windows directory may be + named W:\Win2003 instead of the default C:\Windows. + + The strings appname and username should be replaced with the value + returned by `wx.App.GetAppName` and the name of the currently logged + in user, respectively. The string prefix is only used under Unix and + is /usr/local by default but may be changed using `SetInstallPrefix`. + + The directories returned by the methods of this class may or may not + exist. If they don't exist, it's up to the caller to create them, + wxStandardPaths doesn't do it. + + Finally note that these functions only work with standardly packaged + applications. I.e. under Unix you should follow the standard + installation conventions and under Mac you should create your + application bundle according to the Apple guidelines. Again, this + class doesn't help you to do it. + """ + def __init__(self): raise RuntimeError, "No constructor defined" + def __repr__(self): + return "<%s.%s; proxy of C++ wxStandardPaths instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) + def Get(*args, **kwargs): + """ + Get() -> StandardPaths + + Return the global standard paths singleton + """ + return _misc_.StandardPaths_Get(*args, **kwargs) + + Get = staticmethod(Get) + def GetConfigDir(*args, **kwargs): + """ + GetConfigDir(self) -> String + + Return the directory with system config files: /etc under Unix, + 'c:\Documents and Settings\All Users\Application Data' under Windows, + /Library/Preferences for Mac + """ + return _misc_.StandardPaths_GetConfigDir(*args, **kwargs) + + def GetUserConfigDir(*args, **kwargs): + """ + GetUserConfigDir(self) -> String + + Return the directory for the user config files: $HOME under Unix, + 'c:\Documents and Settings\username' under Windows, and + ~/Library/Preferences under Mac + + Only use this if you have a single file to put there, otherwise + `GetUserDataDir` is more appropriate + """ + return _misc_.StandardPaths_GetUserConfigDir(*args, **kwargs) + + def GetDataDir(*args, **kwargs): + """ + GetDataDir(self) -> String + + Return the location of the application's global, (i.e. not + user-specific,) data files: prefix/share/appname under Unix, + 'c:\Program Files\appname' under Windows, + appname.app/Contents/SharedSupport app bundle directory under Mac. + """ + return _misc_.StandardPaths_GetDataDir(*args, **kwargs) + + def GetLocalDataDir(*args, **kwargs): + """ + GetLocalDataDir(self) -> String + + Return the location for application data files which are + host-specific. Same as `GetDataDir` except under Unix where it is + /etc/appname + """ + return _misc_.StandardPaths_GetLocalDataDir(*args, **kwargs) + + def GetUserDataDir(*args, **kwargs): + """ + GetUserDataDir(self) -> String + + Return the directory for the user-dependent application data files: + $HOME/.appname under Unix, c:\Documents and + Settings\username\Application Data\appname under Windows and + ~/Library/Application Support/appname under Mac + """ + return _misc_.StandardPaths_GetUserDataDir(*args, **kwargs) + + def GetUserLocalDataDir(*args, **kwargs): + """ + GetUserLocalDataDir(self) -> String + + Return the directory for user data files which shouldn't be shared + with the other machines + + Same as `GetUserDataDir` for all platforms except Windows where it is + the 'Local Settings\Application Data\appname' directory. + """ + return _misc_.StandardPaths_GetUserLocalDataDir(*args, **kwargs) + + def GetPluginsDir(*args, **kwargs): + """ + GetPluginsDir(self) -> String + + Return the directory where the loadable modules (plugins) live: + prefix/lib/appname under Unix, program directory under Windows and + Contents/Plugins app bundle subdirectory under Mac + """ + return _misc_.StandardPaths_GetPluginsDir(*args, **kwargs) + + def SetInstallPrefix(*args, **kwargs): + """ + SetInstallPrefix(self, String prefix) + + Set the program installation directory which is /usr/local by default. + This value will be used by other methods such as `GetDataDir` and + `GetPluginsDir` as the prefix for what they return. (This function + only has meaning on Unix systems.) + """ + return _misc_.StandardPaths_SetInstallPrefix(*args, **kwargs) + + def GetInstallPrefix(*args, **kwargs): + """ + GetInstallPrefix(self) -> String + + Get the program installation prefix. The default is the prefix where + Python is installed. (This function only has meaning on Unix systems.) + """ + return _misc_.StandardPaths_GetInstallPrefix(*args, **kwargs) + + +class StandardPathsPtr(StandardPaths): + def __init__(self, this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = StandardPaths +_misc_.StandardPaths_swigregister(StandardPathsPtr) + +def StandardPaths_Get(*args, **kwargs): + """ + StandardPaths_Get() -> StandardPaths + + Return the global standard paths singleton + """ + return _misc_.StandardPaths_Get(*args, **kwargs) + +