You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
implement some stuff to make exaple SDL app run
NOTE: the main addition in this commit is WIP support for apps which render on an EGL surface obtained using ANativeWindow_fromSurface currently, this EGL surface is obtained by creating a 700x700 pixel window with GLFW (the 700x700 size is hardcoded in several places) and only Wayland is supported ideally, we'd want to use a wayland subsurface to position the EGL surface above the Surface widget it's associated with (and do whatever for X11)
This commit is contained in:
@@ -192,7 +192,7 @@ static void draw_function(GtkDrawingArea *area, cairo_t *cr, int width, int heig
|
||||
(*env)->ExceptionDescribe(env);
|
||||
}
|
||||
|
||||
void on_mapped(GtkWidget* self, struct jni_callback_data *d)
|
||||
static void on_mapped(GtkWidget* self, struct jni_callback_data *d)
|
||||
{
|
||||
JNIEnv *env;
|
||||
(*d->jvm)->GetEnv(d->jvm, (void**)&env, JNI_VERSION_1_6);
|
||||
@@ -200,6 +200,7 @@ void on_mapped(GtkWidget* self, struct jni_callback_data *d)
|
||||
(*env)->CallVoidMethod(env, d->this, _METHOD(d->this_class, "onMeasure", "(II)V"), gtk_widget_get_width(self), gtk_widget_get_height(self));
|
||||
}
|
||||
|
||||
// FIXME: this is used in one other place as well, should probably go in util.c or gtk_util.c?
|
||||
gboolean tick_callback(GtkWidget* widget, GdkFrameClock* frame_clock, gpointer user_data)
|
||||
{
|
||||
gtk_widget_queue_draw(widget);
|
||||
|
||||
Reference in New Issue
Block a user