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
handle overwritten onDraw function in WrapperWidget
This makes it easy to support for example ImageView with custom onDraw function
This commit is contained in:
@@ -1,11 +1,18 @@
|
||||
#ifndef WRAPPER_WIDGET_H
|
||||
#define WRAPPER_WIDGET_H
|
||||
|
||||
#include <jni.h>
|
||||
|
||||
G_DECLARE_FINAL_TYPE (WrapperWidget, wrapper_widget, WRAPPER, WIDGET, GtkWidget)
|
||||
|
||||
struct _WrapperWidget
|
||||
{
|
||||
GtkWidget parent_instance;
|
||||
JavaVM *jvm;
|
||||
jobject jobj;
|
||||
jobject canvas;
|
||||
jmethodID draw_method;
|
||||
jmethodID measure_method;
|
||||
};
|
||||
|
||||
struct _WrapperWidgetClass
|
||||
@@ -15,5 +22,6 @@ struct _WrapperWidgetClass
|
||||
|
||||
GtkWidget * wrapper_widget_new(void);
|
||||
void wrapper_widget_set_child(WrapperWidget *parent, GtkWidget *child);
|
||||
void wrapper_widget_set_jobject(WrapperWidget *wrapper, JNIEnv *env, jobject jobj);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user