| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Skia | 2 * Copyright 2011 Skia |
| 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 SampleApp_DEFINED | 8 #ifndef SampleApp_DEFINED |
| 9 #define SampleApp_DEFINED | 9 #define SampleApp_DEFINED |
| 10 | 10 |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 bool previousSample(); | 136 bool previousSample(); |
| 137 bool goToSample(int i); | 137 bool goToSample(int i); |
| 138 SkString getSampleTitle(int i); | 138 SkString getSampleTitle(int i); |
| 139 int sampleCount(); | 139 int sampleCount(); |
| 140 bool handleTouch(int ownerId, float x, float y, | 140 bool handleTouch(int ownerId, float x, float y, |
| 141 SkView::Click::State state); | 141 SkView::Click::State state); |
| 142 void saveToPdf(); | 142 void saveToPdf(); |
| 143 void postInvalDelay(); | 143 void postInvalDelay(); |
| 144 | 144 |
| 145 DeviceType getDeviceType() const { return fDeviceType; } | 145 DeviceType getDeviceType() const { return fDeviceType; } |
| 146 int getColorConfigIndex() const { return fColorConfigIndex; } |
| 146 | 147 |
| 147 protected: | 148 protected: |
| 148 void onDraw(SkCanvas* canvas) override; | 149 void onDraw(SkCanvas* canvas) override; |
| 149 bool onHandleKey(SkKey key) override; | 150 bool onHandleKey(SkKey key) override; |
| 150 bool onHandleChar(SkUnichar) override; | 151 bool onHandleChar(SkUnichar) override; |
| 151 void onSizeChange() override; | 152 void onSizeChange() override; |
| 152 | 153 |
| 153 SkCanvas* beforeChildren(SkCanvas*) override; | 154 SkCanvas* beforeChildren(SkCanvas*) override; |
| 154 void afterChildren(SkCanvas*) override; | 155 void afterChildren(SkCanvas*) override; |
| 155 void beforeChild(SkView* child, SkCanvas* canvas) override; | 156 void beforeChild(SkView* child, SkCanvas* canvas) override; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 SkOSMenu::TriState fLCDState; | 213 SkOSMenu::TriState fLCDState; |
| 213 SkOSMenu::TriState fAAState; | 214 SkOSMenu::TriState fAAState; |
| 214 SkOSMenu::TriState fSubpixelState; | 215 SkOSMenu::TriState fSubpixelState; |
| 215 int fHintingState; | 216 int fHintingState; |
| 216 int fPixelGeometryIndex; | 217 int fPixelGeometryIndex; |
| 217 int fFilterQualityIndex; | 218 int fFilterQualityIndex; |
| 218 unsigned fFlipAxis; | 219 unsigned fFlipAxis; |
| 219 | 220 |
| 220 int fMSAASampleCount; | 221 int fMSAASampleCount; |
| 221 bool fDeepColor; | 222 bool fDeepColor; |
| 223 int fColorConfigIndex; |
| 222 | 224 |
| 223 SkScalar fZoomCenterX, fZoomCenterY; | 225 SkScalar fZoomCenterX, fZoomCenterY; |
| 224 | 226 |
| 225 //Stores global settings | 227 //Stores global settings |
| 226 SkOSMenu* fAppMenu; // We pass ownership to SkWindow, when we call addMenu | 228 SkOSMenu* fAppMenu; // We pass ownership to SkWindow, when we call addMenu |
| 227 //Stores slide specific settings | 229 //Stores slide specific settings |
| 228 SkOSMenu* fSlideMenu; // We pass ownership to SkWindow, when we call addMenu | 230 SkOSMenu* fSlideMenu; // We pass ownership to SkWindow, when we call addMenu |
| 229 | 231 |
| 230 void loadView(SkView*); | 232 void loadView(SkView*); |
| 231 void updateTitle(); | 233 void updateTitle(); |
| 232 bool getRawTitle(SkString*); | 234 bool getRawTitle(SkString*); |
| 233 | 235 |
| 234 bool zoomIn(); | 236 bool zoomIn(); |
| 235 bool zoomOut(); | 237 bool zoomOut(); |
| 236 void updatePointer(int x, int y); | 238 void updatePointer(int x, int y); |
| 237 void magnify(SkCanvas* canvas); | 239 void magnify(SkCanvas* canvas); |
| 238 void showZoomer(SkCanvas* canvas); | 240 void showZoomer(SkCanvas* canvas); |
| 239 void updateMatrix(); | 241 void updateMatrix(); |
| 240 void postAnimatingEvent(); | 242 void postAnimatingEvent(); |
| 241 int findByTitle(const char*); | 243 int findByTitle(const char*); |
| 242 void listTitles(); | 244 void listTitles(); |
| 243 SkSize tileSize() const; | 245 SkSize tileSize() const; |
| 244 bool sendAnimatePulse(); | 246 bool sendAnimatePulse(); |
| 245 | 247 |
| 246 typedef SkOSWindow INHERITED; | 248 typedef SkOSWindow INHERITED; |
| 247 }; | 249 }; |
| 248 | 250 |
| 249 #endif | 251 #endif |
| OLD | NEW |