Flutter Engine
The Flutter Engine
Namespaces | Functions | Variables
surface_glue_android.cpp File Reference
#include "tools/sk_app/android/surface_glue_android.h"
#include <jni.h>
#include <pthread.h>
#include <stdio.h>
#include <unistd.h>
#include <unordered_map>
#include <android/asset_manager.h>
#include <android/asset_manager_jni.h>
#include <android/input.h>
#include <android/keycodes.h>
#include <android/looper.h>
#include <android/native_window_jni.h>
#include "include/core/SkTypes.h"
#include "include/private/base/SkTo.h"
#include "src/base/SkUTF.h"
#include "tools/ResourceFactory.h"
#include "tools/sk_app/Application.h"
#include "tools/sk_app/android/Window_android.h"

Go to the source code of this file.

Namespaces

namespace  sk_app
 

Functions

static void sk_app::config_resource_mgr (JNIEnv *env, jobject assetManager)
 
static const std::unordered_map< int, skui::Keysk_app::ANDROID_TO_WINDOW_KEYMAP ({ {AKEYCODE_SOFT_LEFT, skui::Key::kLeft }, {AKEYCODE_SOFT_RIGHT, skui::Key::kRight} })
 
static const std::unordered_map< int, skui::InputStatesk_app::ANDROID_TO_WINDOW_STATEMAP ({ {AMOTION_EVENT_ACTION_DOWN, skui::InputState::kDown }, {AMOTION_EVENT_ACTION_POINTER_DOWN, skui::InputState::kDown }, {AMOTION_EVENT_ACTION_UP, skui::InputState::kUp }, {AMOTION_EVENT_ACTION_POINTER_UP, skui::InputState::kUp }, {AMOTION_EVENT_ACTION_MOVE, skui::InputState::kMove }, {AMOTION_EVENT_ACTION_CANCEL, skui::InputState::kUp }, })
 
JNIEXPORT jlong JNICALL sk_app::Java_org_skia_viewer_ViewerApplication_createNativeApp (JNIEnv *env, jobject application, jobject assetManager)
 
JNIEXPORT void JNICALL sk_app::Java_org_skia_viewer_ViewerApplication_destroyNativeApp (JNIEnv *env, jobject application, jlong handle)
 
JNIEXPORT void JNICALL sk_app::Java_org_skia_viewer_ViewerActivity_onSurfaceCreated (JNIEnv *env, jobject activity, jlong handle, jobject surface)
 
JNIEXPORT void JNICALL sk_app::Java_org_skia_viewer_ViewerActivity_onSurfaceChanged (JNIEnv *env, jobject activity, jlong handle, jobject surface)
 
JNIEXPORT void JNICALL sk_app::Java_org_skia_viewer_ViewerActivity_onSurfaceDestroyed (JNIEnv *env, jobject activity, jlong handle)
 
JNIEXPORT void JNICALL sk_app::Java_org_skia_viewer_ViewerActivity_onKeyPressed (JNIEnv *env, jobject activity, jlong handle, jint keycode)
 
JNIEXPORT void JNICALL sk_app::Java_org_skia_viewer_ViewerActivity_onTouched (JNIEnv *env, jobject activity, jlong handle, jint owner, jint state, jfloat x, jfloat y)
 
JNIEXPORT void JNICALL sk_app::Java_org_skia_viewer_ViewerActivity_onUIStateChanged (JNIEnv *env, jobject activity, jlong handle, jstring stateName, jstring stateValue)
 

Variables

static const int sk_app::LOOPER_ID_MESSAGEPIPE = 1