X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/24f6c4e8658ae2884f136c15a0ae6ff72ede7e25..70ee369088ef1d54628883a1da7c20b1796d5b94:/wxPython/src/msw/_misc.py diff --git a/wxPython/src/msw/_misc.py b/wxPython/src/msw/_misc.py index dcc269f9a9..b4494a0615 100644 --- a/wxPython/src/msw/_misc.py +++ b/wxPython/src/msw/_misc.py @@ -273,9 +273,6 @@ def SystemOptions_IsFalse(*args, **kwargs): """SystemOptions_IsFalse(String name) -> bool""" return _misc_.SystemOptions_IsFalse(*args, **kwargs) -# Until the new native control for wxMac is up to par, still use the generic one. -SystemOptions.SetOptionInt("mac.listctrl.always_use_generic", 1) - #--------------------------------------------------------------------------- @@ -319,11 +316,6 @@ def EndBusyCursor(*args): """EndBusyCursor()""" return _misc_.EndBusyCursor(*args) -def GetElapsedTime(*args, **kwargs): - """GetElapsedTime(bool resetTimer=True) -> long""" - return _misc_.GetElapsedTime(*args, **kwargs) -GetElapsedTime = wx._deprecated(GetElapsedTime) - def IsBusy(*args): """IsBusy() -> bool""" return _misc_.IsBusy(*args) @@ -336,10 +328,6 @@ def Shell(*args, **kwargs): """Shell(String command=EmptyString) -> bool""" return _misc_.Shell(*args, **kwargs) -def StartTimer(*args): - """StartTimer()""" - return _misc_.StartTimer(*args) - def GetOsVersion(*args): """GetOsVersion() -> (platform, major, minor)""" return _misc_.GetOsVersion(*args) @@ -927,7 +915,7 @@ class BusyInfo(_core.Object): thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') __repr__ = _swig_repr def __init__(self, *args, **kwargs): - """__init__(self, String message) -> BusyInfo""" + """__init__(self, String message, Window parent=None) -> BusyInfo""" _misc_.BusyInfo_swiginit(self,_misc_.new_BusyInfo(*args, **kwargs)) __swig_destroy__ = _misc_.delete_BusyInfo __del__ = lambda self : None; @@ -941,6 +929,8 @@ class StopWatch(object): def __init__(self, *args, **kwargs): """__init__(self) -> StopWatch""" _misc_.StopWatch_swiginit(self,_misc_.new_StopWatch(*args, **kwargs)) + __swig_destroy__ = _misc_.delete_StopWatch + __del__ = lambda self : None; def Start(*args, **kwargs): """Start(self, long t0=0)""" return _misc_.StopWatch_Start(*args, **kwargs) @@ -1250,7 +1240,7 @@ class PyTipProvider(TipProvider): def __init__(self, *args, **kwargs): """__init__(self, size_t currentTip) -> PyTipProvider""" _misc_.PyTipProvider_swiginit(self,_misc_.new_PyTipProvider(*args, **kwargs)) - self._setCallbackInfo(self, PyTipProvider) + PyTipProvider._setCallbackInfo(self, self, PyTipProvider) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -1278,12 +1268,12 @@ class Timer(_core.EvtHandler): def __init__(self, *args, **kwargs): """__init__(self, EvtHandler owner=None, int id=ID_ANY) -> Timer""" _misc_.Timer_swiginit(self,_misc_.new_Timer(*args, **kwargs)) - self._setCallbackInfo(self, Timer, 0); self._setOORInfo(self, 0) + self._setOORInfo(self,0); self.this.own(True); Timer._setCallbackInfo(self, self, Timer) __swig_destroy__ = _misc_.delete_Timer __del__ = lambda self : None; def _setCallbackInfo(*args, **kwargs): - """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=1)""" + """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=0)""" return _misc_.Timer__setCallbackInfo(*args, **kwargs) def SetOwner(*args, **kwargs): @@ -1824,7 +1814,7 @@ class PyLog(Log): def __init__(self, *args, **kwargs): """__init__(self) -> PyLog""" _misc_.PyLog_swiginit(self,_misc_.new_PyLog(*args, **kwargs)) - self._setCallbackInfo(self, PyLog) + PyLog._setCallbackInfo(self, self, PyLog) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -1882,12 +1872,22 @@ class Process(_core.EvtHandler): def __init__(self, *args, **kwargs): """__init__(self, EvtHandler parent=None, int id=-1) -> Process""" _misc_.Process_swiginit(self,_misc_.new_Process(*args, **kwargs)) - self._setCallbackInfo(self, Process) + Process._setCallbackInfo(self, self, Process); self.this.own(False) + __swig_destroy__ = _misc_.delete_Process + __del__ = lambda self : None; def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" return _misc_.Process__setCallbackInfo(*args, **kwargs) + def GetPid(*args, **kwargs): + """ + GetPid(self) -> long + + get the process ID of the process executed by Open() + """ + return _misc_.Process_GetPid(*args, **kwargs) + def OnTerminate(*args, **kwargs): """OnTerminate(self, int pid, int status)""" return _misc_.Process_OnTerminate(*args, **kwargs) @@ -2641,7 +2641,7 @@ class ArtProvider(object): """ _misc_.ArtProvider_swiginit(self,_misc_.new_ArtProvider(*args, **kwargs)) - self._setCallbackInfo(self, ArtProvider) + ArtProvider._setCallbackInfo(self, self, ArtProvider) __swig_destroy__ = _misc_.delete_ArtProvider __del__ = lambda self : None; @@ -3298,8 +3298,26 @@ class FileConfig(ConfigBase): _misc_.FileConfig_swiginit(self,_misc_.new_FileConfig(*args, **kwargs)) __swig_destroy__ = _misc_.delete_FileConfig __del__ = lambda self : None; + def GetGlobalFileName(*args, **kwargs): + """GetGlobalFileName(String szFile) -> String""" + return _misc_.FileConfig_GetGlobalFileName(*args, **kwargs) + + GetGlobalFileName = staticmethod(GetGlobalFileName) + def GetLocalFileName(*args, **kwargs): + """GetLocalFileName(String szFile, int style=0) -> String""" + return _misc_.FileConfig_GetLocalFileName(*args, **kwargs) + + GetLocalFileName = staticmethod(GetLocalFileName) _misc_.FileConfig_swigregister(FileConfig) +def FileConfig_GetGlobalFileName(*args, **kwargs): + """FileConfig_GetGlobalFileName(String szFile) -> String""" + return _misc_.FileConfig_GetGlobalFileName(*args, **kwargs) + +def FileConfig_GetLocalFileName(*args, **kwargs): + """FileConfig_GetLocalFileName(String szFile, int style=0) -> String""" + return _misc_.FileConfig_GetLocalFileName(*args, **kwargs) + class ConfigPathChanger(object): """ A handy little class which changes current path to the path of given @@ -3367,6 +3385,7 @@ class DateTime(object): GMT10 = _misc_.DateTime_GMT10 GMT11 = _misc_.DateTime_GMT11 GMT12 = _misc_.DateTime_GMT12 + GMT13 = _misc_.DateTime_GMT13 WET = _misc_.DateTime_WET WEST = _misc_.DateTime_WEST CET = _misc_.DateTime_CET @@ -3392,6 +3411,8 @@ class DateTime(object): A_CST = _misc_.DateTime_A_CST A_EST = _misc_.DateTime_A_EST A_ESST = _misc_.DateTime_A_ESST + NZST = _misc_.DateTime_NZST + NZDT = _misc_.DateTime_NZDT UTC = _misc_.DateTime_UTC Gregorian = _misc_.DateTime_Gregorian Julian = _misc_.DateTime_Julian @@ -3627,6 +3648,10 @@ class DateTime(object): """ResetTime(self) -> DateTime""" return _misc_.DateTime_ResetTime(*args, **kwargs) + def GetDateOnly(*args, **kwargs): + """GetDateOnly(self) -> DateTime""" + return _misc_.DateTime_GetDateOnly(*args, **kwargs) + def SetYear(*args, **kwargs): """SetYear(self, int year) -> DateTime""" return _misc_.DateTime_SetYear(*args, **kwargs) @@ -3691,17 +3716,6 @@ class DateTime(object): """GetLastWeekDay(self, int weekday, int month=Inv_Month, int year=Inv_Year) -> DateTime""" return _misc_.DateTime_GetLastWeekDay(*args, **kwargs) - def SetToTheWeek(*args, **kwargs): - """SetToTheWeek(self, int numWeek, int weekday=Mon, int flags=Monday_First) -> bool""" - return _misc_.DateTime_SetToTheWeek(*args, **kwargs) - - def GetWeek(*args, **kwargs): - """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) @@ -4020,7 +4034,6 @@ class DateTime(object): RataDie = property(GetRataDie,doc="See `GetRataDie`") Second = property(GetSecond,SetSecond,doc="See `GetSecond` and `SetSecond`") Ticks = property(GetTicks,doc="See `GetTicks`") - Week = property(GetWeek,doc="See `GetWeek`") WeekDay = property(GetWeekDay,doc="See `GetWeekDay`") WeekDayInSameWeek = property(GetWeekDayInSameWeek,doc="See `GetWeekDayInSameWeek`") WeekOfMonth = property(GetWeekOfMonth,doc="See `GetWeekOfMonth`") @@ -4672,14 +4685,15 @@ class DataFormat(object): """ return _misc_.DataFormat_GetType(*args, **kwargs) - def GetId(*args, **kwargs): - """ - GetId(self) -> String + def _GetId(*args, **kwargs): + """_GetId(self) -> String""" + return _misc_.DataFormat__GetId(*args, **kwargs) - Returns the name of a custom format (this function will fail for a - standard format). - """ - return _misc_.DataFormat_GetId(*args, **kwargs) + def GetId(self): + """Returns the name of a custom format (this function will fail for a + format).""" + nolog = wx.LogNull() + return self._GetId() def SetId(*args, **kwargs): """ @@ -4887,7 +4901,7 @@ class PyDataObjectSimple(DataObjectSimple): """ _misc_.PyDataObjectSimple_swiginit(self,_misc_.new_PyDataObjectSimple(*args, **kwargs)) - self._setCallbackInfo(self, PyDataObjectSimple) + PyDataObjectSimple._setCallbackInfo(self, self, PyDataObjectSimple) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -5036,7 +5050,7 @@ class PyTextDataObject(TextDataObject): into the data object. """ _misc_.PyTextDataObject_swiginit(self,_misc_.new_PyTextDataObject(*args, **kwargs)) - self._setCallbackInfo(self, PyTextDataObject) + PyTextDataObject._setCallbackInfo(self, self, PyTextDataObject) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -5105,7 +5119,7 @@ class PyBitmapDataObject(BitmapDataObject): data on demand derive from this class and overload `GetBitmap`. """ _misc_.PyBitmapDataObject_swiginit(self,_misc_.new_PyBitmapDataObject(*args, **kwargs)) - self._setCallbackInfo(self, PyBitmapDataObject) + PyBitmapDataObject._setCallbackInfo(self, self, PyBitmapDataObject) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -5274,10 +5288,10 @@ class DropSource(object): Cursor none=wxNullCursor) -> DropSource """ _misc_.DropSource_swiginit(self,_misc_.new_DropSource(*args, **kwargs)) - self._setCallbackInfo(self, DropSource, 0) + DropSource._setCallbackInfo(self, self, DropSource) def _setCallbackInfo(*args, **kwargs): - """_setCallbackInfo(self, PyObject self, PyObject _class, int incref)""" + """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=0)""" return _misc_.DropSource__setCallbackInfo(*args, **kwargs) __swig_destroy__ = _misc_.delete_DropSource @@ -5329,7 +5343,7 @@ class DropTarget(object): def __init__(self, *args, **kwargs): """__init__(self, DataObject dataObject=None) -> DropTarget""" _misc_.DropTarget_swiginit(self,_misc_.new_DropTarget(*args, **kwargs)) - self._setCallbackInfo(self, DropTarget) + DropTarget._setCallbackInfo(self, self, DropTarget) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -5393,7 +5407,6 @@ class DropTarget(object): """GetDefaultAction(self) -> int""" return _misc_.DropTarget_GetDefaultAction(*args, **kwargs) - Data = property(GetData,doc="See `GetData`") DataObject = property(GetDataObject,SetDataObject,doc="See `GetDataObject` and `SetDataObject`") DefaultAction = property(GetDefaultAction,SetDefaultAction,doc="See `GetDefaultAction` and `SetDefaultAction`") _misc_.DropTarget_swigregister(DropTarget) @@ -5406,7 +5419,7 @@ class TextDropTarget(DropTarget): def __init__(self, *args, **kwargs): """__init__(self) -> TextDropTarget""" _misc_.TextDropTarget_swiginit(self,_misc_.new_TextDropTarget(*args, **kwargs)) - self._setCallbackInfo(self, TextDropTarget) + TextDropTarget._setCallbackInfo(self, self, TextDropTarget) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -5475,7 +5488,7 @@ class FileDropTarget(DropTarget): def __init__(self, *args, **kwargs): """__init__(self) -> FileDropTarget""" _misc_.FileDropTarget_swiginit(self,_misc_.new_FileDropTarget(*args, **kwargs)) - self._setCallbackInfo(self, FileDropTarget) + FileDropTarget._setCallbackInfo(self, self, FileDropTarget) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -5671,7 +5684,6 @@ class Clipboard(_core.Object): return _misc_.Clipboard_Get(*args, **kwargs) Get = staticmethod(Get) - Data = property(GetData,SetData,doc="See `GetData` and `SetData`") _misc_.Clipboard_swigregister(Clipboard) def Clipboard_Get(*args): @@ -6023,6 +6035,16 @@ class StandardPaths(object): return _misc_.StandardPaths_Get(*args, **kwargs) Get = staticmethod(Get) + def GetExecutablePath(*args, **kwargs): + """ + GetExecutablePath(self) -> String + + Return the path (directory+filename) of the running executable or an + empty string if it couldn't be determined. The path is returned as an + absolute path whenever possible. + """ + return _misc_.StandardPaths_GetExecutablePath(*args, **kwargs) + def GetConfigDir(*args, **kwargs): """ GetConfigDir(self) -> String @@ -6137,6 +6159,14 @@ class StandardPaths(object): """ return _misc_.StandardPaths_GetDocumentsDir(*args, **kwargs) + def GetTempDir(*args, **kwargs): + """ + GetTempDir(self) -> String + + Return the user's directory for temporary files. + """ + return _misc_.StandardPaths_GetTempDir(*args, **kwargs) + def SetInstallPrefix(*args, **kwargs): """ SetInstallPrefix(self, String prefix) @@ -6231,11 +6261,11 @@ def GetBatteryState(*args): class AboutDialogInfo(object): """ - `wx.AboutDialogInfo contains information shown in the standard About - dialog displayed by the `wx.AboutBox` function. This class contains - the general information about the program, such as its name, version, - copyright and so on, as well as lists of the program developers, - documentation writers, artists and translators. + `wx.AboutDialogInfo` contains information to be shown in the standard + About dialog displayed by the `wx.AboutBox` function. This class + contains the general information about the program, such as its name, + version, copyright and so on, as well as lists of the program + developers, documentation writers, artists and translators. While all the main platforms have a native implementation of the about dialog, they are often more limited than the generic version provided @@ -6254,11 +6284,11 @@ class AboutDialogInfo(object): """ __init__(self) -> AboutDialogInfo - `wx.AboutDialogInfo contains information shown in the standard About - dialog displayed by the `wx.AboutBox` function. This class contains - the general information about the program, such as its name, version, - copyright and so on, as well as lists of the program developers, - documentation writers, artists and translators. + `wx.AboutDialogInfo` contains information to be shown in the standard + About dialog displayed by the `wx.AboutBox` function. This class + contains the general information about the program, such as its name, + version, copyright and so on, as well as lists of the program + developers, documentation writers, artists and translators. While all the main platforms have a native implementation of the about dialog, they are often more limited than the generic version provided