]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/gtk/misc2.py
Implemented the first phase of OOR (Original Object Return). See the
[wxWidgets.git] / wxPython / src / gtk / misc2.py
index 60be26b56729eacb4d326a69cf2afce1a89fcfa0..57f0e9de94e3b17a70d395390b5c6618ff1f82fa 100644 (file)
@@ -10,7 +10,9 @@ from gdi import *
 from clip_dnd import *
 
 from events import *
-class wxToolTipPtr :
+
+from streams import *
+class wxToolTipPtr(wxObjectPtr):
     def __init__(self,this):
         self.this = this
         self.thisown = 0
@@ -22,7 +24,6 @@ class wxToolTipPtr :
         return val
     def GetWindow(self, *_args, **_kwargs):
         val = apply(misc2c.wxToolTip_GetWindow,(self,) + _args, _kwargs)
-        if val: val = wxWindowPtr(val) 
         return val
     def __repr__(self):
         return "<C wxToolTip instance at %s>" % (self.this,)
@@ -63,7 +64,6 @@ class wxCaretPtr :
         return val
     def GetWindow(self, *_args, **_kwargs):
         val = apply(misc2c.wxCaret_GetWindow,(self,) + _args, _kwargs)
-        if val: val = wxWindowPtr(val) 
         return val
     def MoveXY(self, *_args, **_kwargs):
         val = apply(misc2c.wxCaret_MoveXY,(self,) + _args, _kwargs)
@@ -143,6 +143,40 @@ class wxBusyCursor(wxBusyCursorPtr):
 
 
 
+class wxWindowDisablerPtr :
+    def __init__(self,this):
+        self.this = this
+        self.thisown = 0
+    def __del__(self,misc2c=misc2c):
+        if self.thisown == 1 :
+            misc2c.delete_wxWindowDisabler(self)
+    def __repr__(self):
+        return "<C wxWindowDisabler instance at %s>" % (self.this,)
+class wxWindowDisabler(wxWindowDisablerPtr):
+    def __init__(self,*_args,**_kwargs):
+        self.this = apply(misc2c.new_wxWindowDisabler,_args,_kwargs)
+        self.thisown = 1
+
+
+
+
+class wxMutexGuiLockerPtr :
+    def __init__(self,this):
+        self.this = this
+        self.thisown = 0
+    def __del__(self,misc2c=misc2c):
+        if self.thisown == 1 :
+            misc2c.delete_wxMutexGuiLocker(self)
+    def __repr__(self):
+        return "<C wxMutexGuiLocker instance at %s>" % (self.this,)
+class wxMutexGuiLocker(wxMutexGuiLockerPtr):
+    def __init__(self,*_args,**_kwargs):
+        self.this = apply(misc2c.new_wxMutexGuiLocker,_args,_kwargs)
+        self.thisown = 1
+
+
+
+
 class wxTipProviderPtr :
     def __init__(self,this):
         self.this = this
@@ -179,7 +213,7 @@ class wxPyTipProvider(wxPyTipProviderPtr):
 
 
 
-class wxDragImagePtr :
+class wxDragImagePtr(wxObjectPtr):
     def __init__(self,this):
         self.this = this
         self.thisown = 0
@@ -221,7 +255,7 @@ class wxDragImage(wxDragImagePtr):
 
 
 
-class wxPyTimerPtr :
+class wxPyTimerPtr(wxObjectPtr):
     def __init__(self,this):
         self.this = this
         self.thisown = 0
@@ -333,7 +367,6 @@ class wxLogWindowPtr(wxLogPtr):
         return val
     def GetFrame(self, *_args, **_kwargs):
         val = apply(misc2c.wxLogWindow_GetFrame,(self,) + _args, _kwargs)
-        if val: val = wxFramePtr(val) 
         return val
     def GetOldLog(self, *_args, **_kwargs):
         val = apply(misc2c.wxLogWindow_GetOldLog,(self,) + _args, _kwargs)
@@ -372,6 +405,86 @@ class wxLogNull(wxLogNullPtr):
 
 
 
+class wxProcessEventPtr(wxEventPtr):
+    def __init__(self,this):
+        self.this = this
+        self.thisown = 0
+    def GetPid(self, *_args, **_kwargs):
+        val = apply(misc2c.wxProcessEvent_GetPid,(self,) + _args, _kwargs)
+        return val
+    def GetExitCode(self, *_args, **_kwargs):
+        val = apply(misc2c.wxProcessEvent_GetExitCode,(self,) + _args, _kwargs)
+        return val
+    def __setattr__(self,name,value):
+        if name == "m_pid" :
+            misc2c.wxProcessEvent_m_pid_set(self,value)
+            return
+        if name == "m_exitcode" :
+            misc2c.wxProcessEvent_m_exitcode_set(self,value)
+            return
+        self.__dict__[name] = value
+    def __getattr__(self,name):
+        if name == "m_pid" : 
+            return misc2c.wxProcessEvent_m_pid_get(self)
+        if name == "m_exitcode" : 
+            return misc2c.wxProcessEvent_m_exitcode_get(self)
+        raise AttributeError,name
+    def __repr__(self):
+        return "<C wxProcessEvent instance at %s>" % (self.this,)
+class wxProcessEvent(wxProcessEventPtr):
+    def __init__(self,*_args,**_kwargs):
+        self.this = apply(misc2c.new_wxProcessEvent,_args,_kwargs)
+        self.thisown = 1
+
+
+
+
+class wxProcessPtr(wxEvtHandlerPtr):
+    def __init__(self,this):
+        self.this = this
+        self.thisown = 0
+    def Destroy(self, *_args, **_kwargs):
+        val = apply(misc2c.wxProcess_Destroy,(self,) + _args, _kwargs)
+        return val
+    def _setSelf(self, *_args, **_kwargs):
+        val = apply(misc2c.wxProcess__setSelf,(self,) + _args, _kwargs)
+        return val
+    def base_OnTerminate(self, *_args, **_kwargs):
+        val = apply(misc2c.wxProcess_base_OnTerminate,(self,) + _args, _kwargs)
+        return val
+    def Redirect(self, *_args, **_kwargs):
+        val = apply(misc2c.wxProcess_Redirect,(self,) + _args, _kwargs)
+        return val
+    def IsRedirected(self, *_args, **_kwargs):
+        val = apply(misc2c.wxProcess_IsRedirected,(self,) + _args, _kwargs)
+        return val
+    def Detach(self, *_args, **_kwargs):
+        val = apply(misc2c.wxProcess_Detach,(self,) + _args, _kwargs)
+        return val
+    def GetInputStream(self, *_args, **_kwargs):
+        val = apply(misc2c.wxProcess_GetInputStream,(self,) + _args, _kwargs)
+        return val
+    def GetErrorStream(self, *_args, **_kwargs):
+        val = apply(misc2c.wxProcess_GetErrorStream,(self,) + _args, _kwargs)
+        return val
+    def GetOutputStream(self, *_args, **_kwargs):
+        val = apply(misc2c.wxProcess_GetOutputStream,(self,) + _args, _kwargs)
+        if val: val = wxOutputStreamPtr(val) 
+        return val
+    def CloseOutput(self, *_args, **_kwargs):
+        val = apply(misc2c.wxProcess_CloseOutput,(self,) + _args, _kwargs)
+        return val
+    def __repr__(self):
+        return "<C wxProcess instance at %s>" % (self.this,)
+class wxProcess(wxProcessPtr):
+    def __init__(self,*_args,**_kwargs):
+        self.this = apply(misc2c.new_wxProcess,_args,_kwargs)
+        self.thisown = 1
+        self._setSelf(self, wxProcess)
+
+
+
+
 
 
 #-------------- FUNCTION WRAPPERS ------------------
@@ -380,6 +493,8 @@ wxFileSelector = misc2c.wxFileSelector
 
 wxGetTextFromUser = misc2c.wxGetTextFromUser
 
+wxGetPasswordFromUser = misc2c.wxGetPasswordFromUser
+
 wxGetSingleChoice = misc2c.wxGetSingleChoice
 
 wxGetSingleChoiceIndex = misc2c.wxGetSingleChoiceIndex
@@ -392,23 +507,43 @@ wxColourDisplay = misc2c.wxColourDisplay
 
 wxDisplayDepth = misc2c.wxDisplayDepth
 
+wxGetDisplayDepth = misc2c.wxGetDisplayDepth
+
+wxDisplaySize = misc2c.wxDisplaySize
+
+def wxGetDisplaySize(*_args, **_kwargs):
+    val = apply(misc2c.wxGetDisplaySize,_args,_kwargs)
+    if val: val = wxSizePtr(val); val.thisown = 1
+    return val
+
+wxDisplaySizeMM = misc2c.wxDisplaySizeMM
+
+def wxGetDisplaySizeMM(*_args, **_kwargs):
+    val = apply(misc2c.wxGetDisplaySizeMM,_args,_kwargs)
+    if val: val = wxSizePtr(val); val.thisown = 1
+    return val
+
+wxClientDisplayRect = misc2c.wxClientDisplayRect
+
+def wxGetClientDisplayRect(*_args, **_kwargs):
+    val = apply(misc2c.wxGetClientDisplayRect,_args,_kwargs)
+    if val: val = wxRectPtr(val); val.thisown = 1
+    return val
+
 wxSetCursor = misc2c.wxSetCursor
 
 def wxFindWindowByLabel(*_args, **_kwargs):
     val = apply(misc2c.wxFindWindowByLabel,_args,_kwargs)
-    if val: val = wxWindowPtr(val)
     return val
 
 def wxFindWindowByName(*_args, **_kwargs):
     val = apply(misc2c.wxFindWindowByName,_args,_kwargs)
-    if val: val = wxWindowPtr(val)
     return val
 
 wxBeginBusyCursor = misc2c.wxBeginBusyCursor
 
 def wxGetActiveWindow(*_args, **_kwargs):
     val = apply(misc2c.wxGetActiveWindow,_args,_kwargs)
-    if val: val = wxWindowPtr(val)
     return val
 
 wxResourceAddIdentifier = misc2c.wxResourceAddIdentifier
@@ -427,7 +562,6 @@ def wxResourceCreateIcon(*_args, **_kwargs):
 
 def wxResourceCreateMenuBar(*_args, **_kwargs):
     val = apply(misc2c.wxResourceCreateMenuBar,_args,_kwargs)
-    if val: val = wxMenuBarPtr(val)
     return val
 
 wxResourceGetIdentifier = misc2c.wxResourceGetIdentifier
@@ -458,10 +592,18 @@ wxCaret_GetBlinkTime = misc2c.wxCaret_GetBlinkTime
 
 wxCaret_SetBlinkTime = misc2c.wxCaret_SetBlinkTime
 
+wxSafeYield = misc2c.wxSafeYield
+
 wxPostEvent = misc2c.wxPostEvent
 
 wxWakeUpIdle = misc2c.wxWakeUpIdle
 
+wxMutexGuiEnter = misc2c.wxMutexGuiEnter
+
+wxMutexGuiLeave = misc2c.wxMutexGuiLeave
+
+wxThread_IsMain = misc2c.wxThread_IsMain
+
 wxShowTip = misc2c.wxShowTip
 
 def wxCreateFileTipProvider(*_args, **_kwargs):
@@ -511,6 +653,8 @@ wxLogStatusFrame = misc2c.wxLogStatusFrame
 
 wxLogSysError = misc2c.wxLogSysError
 
+wxExecute = misc2c.wxExecute
+
 wxLog_IsEnabled = misc2c.wxLog_IsEnabled
 
 wxLog_EnableLogging = misc2c.wxLog_EnableLogging
@@ -645,3 +789,4 @@ wxLOG_Debug = misc2c.wxLOG_Debug
 wxLOG_Trace = misc2c.wxLOG_Trace
 wxLOG_Progress = misc2c.wxLOG_Progress
 wxLOG_User = misc2c.wxLOG_User
+wxEVT_END_PROCESS = misc2c.wxEVT_END_PROCESS