Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(263)

Side by Side Diff: tools/viewer/sk_app/Window.h

Issue 1965013007: Use swipe gesture to switch between slides on Android (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Revision Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 Google Inc.
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 Window_DEFINED 8 #ifndef Window_DEFINED
9 #define Window_DEFINED 9 #define Window_DEFINED
10 10
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 123
124 bool onChar(SkUnichar c, uint32_t modifiers); 124 bool onChar(SkUnichar c, uint32_t modifiers);
125 bool onKey(Key key, InputState state, uint32_t modifiers); 125 bool onKey(Key key, InputState state, uint32_t modifiers);
126 bool onMouse(int x, int y, InputState state, uint32_t modifiers); 126 bool onMouse(int x, int y, InputState state, uint32_t modifiers);
127 void onPaint(); 127 void onPaint();
128 void onResize(uint32_t width, uint32_t height); 128 void onResize(uint32_t width, uint32_t height);
129 129
130 uint32_t width() { return fWidth; } 130 uint32_t width() { return fWidth; }
131 uint32_t height() { return fHeight; } 131 uint32_t height() { return fHeight; }
132 132
133 const DisplayParams& getDisplayParams(); 133 virtual const DisplayParams& getDisplayParams();
134 void setDisplayParams(const DisplayParams& params); 134 void setDisplayParams(const DisplayParams& params);
135 135
136 protected: 136 protected:
137 Window(); 137 Window();
138 138
139 uint32_t fWidth; 139 uint32_t fWidth;
140 uint32_t fHeight; 140 uint32_t fHeight;
141 141
142 OnCharFunc fCharFunc; 142 OnCharFunc fCharFunc;
143 void* fCharUserData; 143 void* fCharUserData;
144 OnKeyFunc fKeyFunc; 144 OnKeyFunc fKeyFunc;
145 void* fKeyUserData; 145 void* fKeyUserData;
146 OnMouseFunc fMouseFunc; 146 OnMouseFunc fMouseFunc;
147 void* fMouseUserData; 147 void* fMouseUserData;
148 OnPaintFunc fPaintFunc; 148 OnPaintFunc fPaintFunc;
149 void* fPaintUserData; 149 void* fPaintUserData;
150 150
151 WindowContext* fWindowContext; 151 WindowContext* fWindowContext;
152 }; 152 };
153 153
154 } // namespace sk_app 154 } // namespace sk_app
155 #endif 155 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698