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

Side by Side Diff: runtime/embedders/openglui/android/eventloop.h

Issue 11883013: Refactored OpenGL embedder that works on Android, Mac or Linux. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 #ifndef EMBEDDERS_OPENGLUI_ANDROID_EVENTLOOP_H_
6 #define EMBEDDERS_OPENGLUI_ANDROID_EVENTLOOP_H_
7
8 #include <android_native_app_glue.h>
9 #include "embedders/openglui/common/events.h"
10 #include "embedders/openglui/common/input_handler.h"
11 #include "embedders/openglui/common/lifecycle_handler.h"
12
13 class EventLoop {
14 public:
15 explicit EventLoop(android_app* application);
16 void Run(LifeCycleHandler* activity_handler,
17 InputHandler* input_handler);
18
19 protected:
20 void Activate();
21 void Deactivate();
22 void ProcessActivityEvent(int32_t command);
23 int32_t ProcessInputEvent(AInputEvent* event);
24 bool OnTouchEvent(AInputEvent* event);
25 bool OnKeyEvent(AInputEvent* event);
26
27 static void ActivityCallback(android_app* application, int32_t command);
28 static int32_t InputCallback(android_app* application, AInputEvent* event);
29
30 private:
31 bool enabled_;
32 bool quit_;
33 android_app* application_;
34 LifeCycleHandler* lifecycle_handler_;
35 InputHandler* input_handler_;
36 };
37
38 #endif // EMBEDDERS_OPENGLUI_ANDROID_EVENTLOOP_H_
39
OLDNEW
« no previous file with comments | « runtime/embedders/openglui/android/android_sound_handler.cc ('k') | runtime/embedders/openglui/android/eventloop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698