aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/views
diff options
context:
space:
mode:
authorGravatar yangsu@google.com <yangsu@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-08-30 14:40:49 +0000
committerGravatar yangsu@google.com <yangsu@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-08-30 14:40:49 +0000
commita8540416f65b55aadbe68cdef9fece5a23257d5e (patch)
tree8d2c9362b35ccfda2781c82dd4a21424f7877de3 /include/views
parent1d388d7e279fcd9b2afb2a33137a40eddebdf7c8 (diff)
Switched Mac SampleApp to use Cocoa, removed the seperate CocoaSampleApp, moved dependencies out of experimental
git-svn-id: http://skia.googlecode.com/svn/trunk@2190 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/views')
-rw-r--r--include/views/SkOSWindow_Mac.h41
-rw-r--r--include/views/SkOSWindow_Mac_Cocoa.h36
-rw-r--r--include/views/SkWindow.h4
3 files changed, 15 insertions, 66 deletions
diff --git a/include/views/SkOSWindow_Mac.h b/include/views/SkOSWindow_Mac.h
index 90f3d9e776..e27e7562f0 100644
--- a/include/views/SkOSWindow_Mac.h
+++ b/include/views/SkOSWindow_Mac.h
@@ -6,33 +6,23 @@
* found in the LICENSE file.
*/
+#ifndef SkOSWindow_MacCocoa_DEFINED
+#define SkOSWindow_MacCocoa_DEFINED
-#ifndef SkOSWindow_Mac_DEFINED
-#define SkOSWindow_Mac_DEFINED
-
-#include <Carbon/Carbon.h>
#include "SkWindow.h"
class SkOSWindow : public SkWindow {
public:
SkOSWindow(void* hwnd);
-
+ ~SkOSWindow();
void* getHWND() const { return fHWND; }
- void* getHVIEW() const { return fHVIEW; }
- void updateSize();
-
- static bool PostEvent(SkEvent* evt, SkEventSinkID, SkMSec delay);
-
- static OSStatus EventHandler(EventHandlerCallRef inHandler,
- EventRef inEvent, void* userData);
-
- void doPaint(void* ctx);
-
-
- bool attachGL();
- void detachGL();
- void presentGL();
-
+
+ virtual bool onDispatchClick(int x, int y, Click::State state,
+ void* owner);
+ void detachGL();
+ bool attachGL();
+ void presentGL();
+
protected:
// overrides from SkEventSink
virtual bool onEvent(const SkEvent& evt);
@@ -40,16 +30,15 @@ protected:
virtual void onHandleInval(const SkIRect&);
// overrides from SkView
virtual void onAddMenu(const SkOSMenu*);
+ virtual void onUpdateMenu(const SkOSMenu*);
virtual void onSetTitle(const char[]);
-
private:
void* fHWND;
- void* fHVIEW;
- void* fAGLCtx;
-
+ bool fInvalEventIsPending;
+ void* fNotifier;
+ void* fGLContext;
typedef SkWindow INHERITED;
};
-#endif
-
+#endif \ No newline at end of file
diff --git a/include/views/SkOSWindow_Mac_Cocoa.h b/include/views/SkOSWindow_Mac_Cocoa.h
deleted file mode 100644
index 612edc3e48..0000000000
--- a/include/views/SkOSWindow_Mac_Cocoa.h
+++ /dev/null
@@ -1,36 +0,0 @@
-#ifndef SkOSWindow_MacCocoa_DEFINED
-#define SkOSWindow_MacCocoa_DEFINED
-
-#include "SkWindow.h"
-
-class SkOSWindow : public SkWindow {
-public:
- SkOSWindow(void* hwnd);
- ~SkOSWindow();
- void* getHWND() const { return fHWND; }
-
- virtual bool onDispatchClick(int x, int y, Click::State state,
- void* owner);
- void detachGL();
- bool attachGL();
- void presentGL();
-
-protected:
- // overrides from SkEventSink
- virtual bool onEvent(const SkEvent& evt);
- // overrides from SkWindow
- virtual void onHandleInval(const SkIRect&);
- // overrides from SkView
- virtual void onAddMenu(const SkOSMenu*);
- virtual void onUpdateMenu(const SkOSMenu*);
- virtual void onSetTitle(const char[]);
-
-private:
- void* fHWND;
- bool fInvalEventIsPending;
- void* fNotifier;
- void* fGLContext;
- typedef SkWindow INHERITED;
-};
-
-#endif \ No newline at end of file
diff --git a/include/views/SkWindow.h b/include/views/SkWindow.h
index 6fc72cb912..eda928c948 100644
--- a/include/views/SkWindow.h
+++ b/include/views/SkWindow.h
@@ -105,11 +105,7 @@ private:
#ifdef SK_USE_WXWIDGETS
#include "SkOSWindow_wxwidgets.h"
#elif defined(SK_BUILD_FOR_MAC)
-#ifdef Sk_MAC_COCOA
- #include "SkOSWindow_Mac_Cocoa.h"
-#else
#include "SkOSWindow_Mac.h"
-#endif
#elif defined(SK_BUILD_FOR_WIN)
#include "SkOSWindow_Win.h"
#elif defined(ANDROID)