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 SkEvent_DEFINED | 8 #ifndef SkEvent_DEFINED |
9 #define SkEvent_DEFINED | 9 #define SkEvent_DEFINED |
10 | 10 |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 /////////////////////////////////////////////// | 216 /////////////////////////////////////////////// |
217 /** Porting layer must call these functions **/ | 217 /** Porting layer must call these functions **/ |
218 /////////////////////////////////////////////// | 218 /////////////////////////////////////////////// |
219 | 219 |
220 /** Global initialization function for the SkEvent system. Should be called
exactly | 220 /** Global initialization function for the SkEvent system. Should be called
exactly |
221 once before any other event method is called, and should be called after
the | 221 once before any other event method is called, and should be called after
the |
222 call to SkGraphics::Init(). | 222 call to SkGraphics::Init(). |
223 */ | 223 */ |
224 static void Init(); | 224 static void Init(); |
225 /** Global cleanup function for the SkEvent system. Should be called exactly
once after | 225 /** Global cleanup function for the SkEvent system. Should be called exactly
once after |
226 all event methods have been called, and should be called before calling
SkGraphics::Term(). | 226 all event methods have been called. |
227 */ | 227 */ |
228 static void Term(); | 228 static void Term(); |
229 | 229 |
230 /** Call this to process one event from the queue. If it returns true, there
are more events | 230 /** Call this to process one event from the queue. If it returns true, there
are more events |
231 to process. | 231 to process. |
232 */ | 232 */ |
233 static bool ProcessEvent(); | 233 static bool ProcessEvent(); |
234 /** Call this whenever the requested timer has expired (requested by a call
to SetQueueTimer). | 234 /** Call this whenever the requested timer has expired (requested by a call
to SetQueueTimer). |
235 It will post any delayed events whose time as "expired" onto the event q
ueue. | 235 It will post any delayed events whose time as "expired" onto the event q
ueue. |
236 It may also call SignalQueueTimer() and SignalNonEmptyQueue(). | 236 It may also call SignalQueueTimer() and SignalNonEmptyQueue(). |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 | 275 |
276 void initialize(const char* type, size_t typeLen, SkEventSinkID); | 276 void initialize(const char* type, size_t typeLen, SkEventSinkID); |
277 | 277 |
278 static bool Enqueue(SkEvent* evt); | 278 static bool Enqueue(SkEvent* evt); |
279 static SkMSec EnqueueTime(SkEvent* evt, SkMSec time); | 279 static SkMSec EnqueueTime(SkEvent* evt, SkMSec time); |
280 static SkEvent* Dequeue(); | 280 static SkEvent* Dequeue(); |
281 static bool QHasEvents(); | 281 static bool QHasEvents(); |
282 }; | 282 }; |
283 | 283 |
284 #endif | 284 #endif |
OLD | NEW |