| 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 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 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); |
| 36 void resize(int width, int height, SkColorType ct = kUnknown_SkColorType)
; | 36 void resize(int width, int height, SkColorType = kUnknown_SkColorType); |
| 37 | 37 |
| 38 bool isDirty() const { return !fDirtyRgn.isEmpty(); } | 38 bool isDirty() const { return !fDirtyRgn.isEmpty(); } |
| 39 bool update(SkIRect* updateArea); | 39 bool update(SkIRect* updateArea); |
| 40 // does not call through to onHandleInval(), but does force the fDirtyRgn | 40 // does not call through to onHandleInval(), but does force the fDirtyRgn |
| 41 // to be wide open. Call before update() to ensure we redraw everything. | 41 // to be wide open. Call before update() to ensure we redraw everything. |
| 42 void forceInvalAll(); | 42 void forceInvalAll(); |
| 43 // return the bounds of the dirty/inval rgn, or [0,0,0,0] if none | 43 // return the bounds of the dirty/inval rgn, or [0,0,0,0] if none |
| 44 const SkIRect& getDirtyBounds() const { return fDirtyRgn.getBounds(); } | 44 const SkIRect& getDirtyBounds() const { return fDirtyRgn.getBounds(); } |
| 45 | 45 |
| 46 bool handleClick(int x, int y, Click::State, void* owner, unsigned modi =
0); | 46 bool handleClick(int x, int y, Click::State, void* owner, unsigned modi =
0); |
| (...skipping 63 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 |