]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/osx/cocoa/private.h
replace TRUE/FALSE with true/false
[wxWidgets.git] / include / wx / osx / cocoa / private.h
index c8adede96941b2c8d78b7a4f9dbad32f55cb5570..d9bf8338d126c65e9be18a5a65940a17d5ad8040 100644 (file)
@@ -23,6 +23,9 @@
 #if wxOSX_USE_ATSU_TEXT
     // we need theming and atsu
     #include <Carbon/Carbon.h>
 #if wxOSX_USE_ATSU_TEXT
     // we need theming and atsu
     #include <Carbon/Carbon.h>
+#else
+    // we only need theming, if we find a better include replace the following
+    #include <Carbon/Carbon.h>
 #endif
 
 #ifdef __OBJC__
 #endif
 
 #ifdef __OBJC__
@@ -33,7 +36,7 @@
 // shared between Cocoa and Carbon
 //
 
 // shared between Cocoa and Carbon
 //
 
-// bring in themeing types without pulling in the headers
+// bring in theming types without pulling in the headers
 
 #if wxUSE_GUI
 typedef SInt16 ThemeBrush;
 
 #if wxUSE_GUI
 typedef SInt16 ThemeBrush;
@@ -43,6 +46,7 @@ OSStatus WXDLLIMPEXP_CORE wxMacDrawCGImage(
                                const CGRect *  inBounds,
                                CGImageRef      inImage) ;
 WX_NSImage WXDLLIMPEXP_CORE wxOSXCreateNSImageFromCGImage( CGImageRef image );
                                const CGRect *  inBounds,
                                CGImageRef      inImage) ;
 WX_NSImage WXDLLIMPEXP_CORE wxOSXCreateNSImageFromCGImage( CGImageRef image );
+CGImageRef WXDLLIMPEXP_CORE wxOSXCreateCGImageFromNSImage( WX_NSImage nsimage );
 #endif
 
 long UMAGetSystemVersion() ;
 #endif
 
 long UMAGetSystemVersion() ;
@@ -69,6 +73,17 @@ public :
     virtual bool        IsVisible() const ;
     virtual void        SetVisibility(bool);
 
     virtual bool        IsVisible() const ;
     virtual void        SetVisibility(bool);
 
+    // we provide a static function which can be reused from
+    // wxNonOwnedWindowCocoaImpl too
+    static bool ShowViewOrWindowWithEffect(wxWindow *win,
+                                           bool show,
+                                           wxShowEffect effect,
+                                           unsigned timeout);
+
+    virtual bool ShowWithEffect(bool show,
+                                wxShowEffect effect,
+                                unsigned timeout);
+
     virtual void        Raise();
 
     virtual void        Lower();
     virtual void        Raise();
 
     virtual void        Lower();
@@ -129,6 +144,10 @@ public :
     virtual bool        DoHandleKeyEvent(NSEvent *event);
     virtual bool        DoHandleCharEvent(NSEvent *event, NSString *text);
     virtual void        DoNotifyFocusEvent(bool receivedFocus, wxWidgetImpl* otherWindow);
     virtual bool        DoHandleKeyEvent(NSEvent *event);
     virtual bool        DoHandleCharEvent(NSEvent *event, NSString *text);
     virtual void        DoNotifyFocusEvent(bool receivedFocus, wxWidgetImpl* otherWindow);
+    
+    virtual void        SetupKeyEvent(wxKeyEvent &wxevent, NSEvent * nsEvent, NSString* charString = NULL);
+    virtual void        SetupMouseEvent(wxMouseEvent &wxevent, NSEvent * nsEvent);
+
 
     void                SetFlipped(bool flipped);
     virtual bool        IsFlipped() const { return m_isFlipped; }
 
     void                SetFlipped(bool flipped);
     virtual bool        IsFlipped() const { return m_isFlipped; }
@@ -182,7 +201,10 @@ public :
     void Raise();
     void Lower();
     bool Show(bool show);
     void Raise();
     void Lower();
     bool Show(bool show);
-    bool ShowWithEffect(bool show, wxShowEffect effect, unsigned timeout);
+
+    virtual bool ShowWithEffect(bool show,
+                                wxShowEffect effect,
+                                unsigned timeout);
 
     void Update();
     bool SetTransparent(wxByte alpha);
 
     void Update();
     bool SetTransparent(wxByte alpha);
@@ -239,6 +261,7 @@ protected :
 
     @interface wxNSButton : NSButton
     {
 
     @interface wxNSButton : NSButton
     {
+        NSTrackingRectTag rectTag;
     }
 
     @end
     }
 
     @end