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
android_layout_measure(): refactor to respect LayoutParams
This is needed when a Java widget gets measured from GTK
This commit is contained in:
committed by
Julian Winkler
parent
8b6de0e83a
commit
3c03223085
@@ -4,13 +4,24 @@
|
||||
#include <jni.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#define MEASURE_SPEC_UNSPECIFIED (0 << 30)
|
||||
#define MEASURE_SPEC_EXACTLY (1 << 30)
|
||||
#define MEASURE_SPEC_AT_MOST (2 << 30)
|
||||
#define MEASURE_SPEC_MASK (0x3 << 30)
|
||||
|
||||
#define MATCH_PARENT (-1)
|
||||
#define WRAP_CONTENT (-2)
|
||||
|
||||
G_DECLARE_FINAL_TYPE(AndroidLayout, android_layout, ATL, ANDROID_LAYOUT, GtkLayoutManager);
|
||||
|
||||
struct _AndroidLayout {
|
||||
GtkLayoutManager parent_instance;
|
||||
jobject view;
|
||||
int width;
|
||||
int height;
|
||||
};
|
||||
|
||||
GtkLayoutManager *android_layout_new(jobject view);
|
||||
void android_layout_set_params(AndroidLayout *layout, int width, int height);
|
||||
|
||||
#endif // ANDROID_LAYOUT_H
|
||||
Reference in New Issue
Block a user