Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef SkWindow_DEFINED | 8 #ifndef SkWindow_DEFINED |
| 9 #define SkWindow_DEFINED | 9 #define SkWindow_DEFINED |
| 10 | 10 |
| 11 #include "SkView.h" | 11 #include "SkView.h" |
| 12 #include "SkBitmap.h" | 12 #include "SkBitmap.h" |
| 13 #include "SkMatrix.h" | 13 #include "SkMatrix.h" |
| 14 #include "SkRegion.h" | 14 #include "SkRegion.h" |
| 15 #include "SkEvent.h" | 15 #include "SkEvent.h" |
| 16 #include "SkKey.h" | 16 #include "SkKey.h" |
| 17 #include "SkTDArray.h" | 17 #include "SkTDArray.h" |
| 18 | 18 |
| 19 #ifdef SK_BUILD_FOR_WINCEx | 19 #ifdef SK_BUILD_FOR_WINCEx |
| 20 #define SHOW_FPS | 20 #define SHOW_FPS |
| 21 #endif | 21 #endif |
| 22 //#define USE_GX_SCREEN | 22 //#define USE_GX_SCREEN |
| 23 | 23 |
|
robertphillips
2014/09/18 14:52:20
rm SkCanvas ?
reed1
2014/09/18 18:08:12
Done.
| |
| 24 class SkCanvas; | 24 class SkCanvas; |
| 25 | 25 class SkSurface; |
| 26 class SkOSMenu; | 26 class SkOSMenu; |
| 27 | 27 |
| 28 class SkWindow : public SkView { | 28 class SkWindow : public SkView { |
| 29 public: | 29 public: |
| 30 SkWindow(); | 30 SkWindow(); |
| 31 virtual ~SkWindow(); | 31 virtual ~SkWindow(); |
| 32 | 32 |
| 33 const SkBitmap& getBitmap() const { return fBitmap; } | 33 const SkBitmap& getBitmap() const { return fBitmap; } |
| 34 | 34 |
| 35 void setColorType(SkColorType); | 35 void setColorType(SkColorType); |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 52 const SkTDArray<SkOSMenu*>* getMenus() { return &fMenus; } | 52 const SkTDArray<SkOSMenu*>* getMenus() { return &fMenus; } |
| 53 | 53 |
| 54 const char* getTitle() const { return fTitle.c_str(); } | 54 const char* getTitle() const { return fTitle.c_str(); } |
| 55 void setTitle(const char title[]); | 55 void setTitle(const char title[]); |
| 56 | 56 |
| 57 const SkMatrix& getMatrix() const { return fMatrix; } | 57 const SkMatrix& getMatrix() const { return fMatrix; } |
| 58 void setMatrix(const SkMatrix&); | 58 void setMatrix(const SkMatrix&); |
| 59 void preConcat(const SkMatrix&); | 59 void preConcat(const SkMatrix&); |
| 60 void postConcat(const SkMatrix&); | 60 void postConcat(const SkMatrix&); |
| 61 | 61 |
| 62 virtual SkCanvas* createCanvas(); | 62 virtual SkSurface* createSurface(); |
| 63 | 63 |
| 64 virtual void onPDFSaved(const char title[], const char desc[], | 64 virtual void onPDFSaved(const char title[], const char desc[], |
| 65 const char path[]) {} | 65 const char path[]) {} |
| 66 protected: | 66 protected: |
| 67 virtual bool onEvent(const SkEvent&); | 67 virtual bool onEvent(const SkEvent&); |
| 68 virtual bool onDispatchClick(int x, int y, Click::State, void* owner, unsign ed modi); | 68 virtual bool onDispatchClick(int x, int y, Click::State, void* owner, unsign ed modi); |
| 69 // called if part of our bitmap is invalidated | 69 // called if part of our bitmap is invalidated |
| 70 virtual void onHandleInval(const SkIRect&); | 70 virtual void onHandleInval(const SkIRect&); |
| 71 virtual bool onHandleChar(SkUnichar); | 71 virtual bool onHandleChar(SkUnichar); |
| 72 virtual bool onHandleKey(SkKey); | 72 virtual bool onHandleKey(SkKey); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 110 #include "SkOSWindow_Android.h" | 110 #include "SkOSWindow_Android.h" |
| 111 #elif defined(SK_BUILD_FOR_UNIX) | 111 #elif defined(SK_BUILD_FOR_UNIX) |
| 112 #include "SkOSWindow_Unix.h" | 112 #include "SkOSWindow_Unix.h" |
| 113 #elif defined(SK_BUILD_FOR_SDL) | 113 #elif defined(SK_BUILD_FOR_SDL) |
| 114 #include "SkOSWindow_SDL.h" | 114 #include "SkOSWindow_SDL.h" |
| 115 #elif defined(SK_BUILD_FOR_IOS) | 115 #elif defined(SK_BUILD_FOR_IOS) |
| 116 #include "SkOSWindow_iOS.h" | 116 #include "SkOSWindow_iOS.h" |
| 117 #endif | 117 #endif |
| 118 | 118 |
| 119 #endif | 119 #endif |
| OLD | NEW |