| Index: tools/viewer/sk_app/android/surface_glue_android.h
|
| diff --git a/tools/viewer/sk_app/android/surface_glue_android.h b/tools/viewer/sk_app/android/surface_glue_android.h
|
| index a4698336f04b4ea1489eb7a1caaf70b84b5b4f92..3bbf3af9c3cfec437fb7b016ac24343de504b5ae 100644
|
| --- a/tools/viewer/sk_app/android/surface_glue_android.h
|
| +++ b/tools/viewer/sk_app/android/surface_glue_android.h
|
| @@ -12,6 +12,8 @@
|
|
|
| #include <android/native_window_jni.h>
|
|
|
| +#include "SkString.h"
|
| +
|
| #include "../Application.h"
|
| #include "../Window.h"
|
|
|
| @@ -25,7 +27,8 @@ enum MessageType {
|
| kDestroyApp,
|
| kContentInvalidated,
|
| kKeyPressed,
|
| - kTouched
|
| + kTouched,
|
| + kUIStateChanged,
|
| };
|
|
|
| struct Message {
|
| @@ -35,6 +38,9 @@ struct Message {
|
| int fTouchOwner, fTouchState;
|
| float fTouchX, fTouchY;
|
|
|
| + SkString* stateName;
|
| + SkString* stateValue;
|
| +
|
| Message() {}
|
| Message(MessageType t) : fType(t) {}
|
| };
|
| @@ -49,8 +55,9 @@ struct SkiaAndroidApp {
|
| void postMessage(const Message& message) const;
|
| void readMessage(Message* message) const;
|
|
|
| - // This must be called in SkiaAndroidApp's own pthread because the JNIEnv is thread sensitive
|
| + // These must be called in SkiaAndroidApp's own pthread because the JNIEnv is thread sensitive
|
| void setTitle(const char* title) const;
|
| + void setUIState(const Json::Value& state) const;
|
|
|
| private:
|
| pthread_t fThread;
|
| @@ -58,7 +65,7 @@ private:
|
| int fPipes[2]; // 0 is the read message pipe, 1 is the write message pipe
|
| JavaVM* fJavaVM;
|
| JNIEnv* fPThreadEnv;
|
| - jmethodID fSetTitleMethodID;
|
| + jmethodID fSetTitleMethodID, fSetStateMethodID;
|
|
|
| // This must be called in SkiaAndroidApp's own pthread because the JNIEnv is thread sensitive
|
| ~SkiaAndroidApp();
|
|
|