diff --git a/src/api-impl-jni/views/AndroidLayout.c b/src/api-impl-jni/views/AndroidLayout.c index 2bc61a53..dc0333fe 100644 --- a/src/api-impl-jni/views/AndroidLayout.c +++ b/src/api-impl-jni/views/AndroidLayout.c @@ -64,10 +64,24 @@ static void android_layout_allocate(GtkLayoutManager *layout_manager, GtkWidget (*env)->ExceptionDescribe(env); } +static GtkSizeRequestMode android_layout_get_request_mode(GtkLayoutManager *layout_manager, GtkWidget *widget) +{ + AndroidLayout *layout = ATL_ANDROID_LAYOUT(layout_manager); + + if (layout->height == WRAP_CONTENT) { + return GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH; + } else if (layout->width == WRAP_CONTENT) { + return GTK_SIZE_REQUEST_WIDTH_FOR_HEIGHT; + } else { + return GTK_SIZE_REQUEST_CONSTANT_SIZE; + } +} + static void android_layout_class_init(AndroidLayoutClass *klass) { klass->parent_class.measure = android_layout_measure; klass->parent_class.allocate = android_layout_allocate; + klass->parent_class.get_request_mode = android_layout_get_request_mode; } static void android_layout_init(AndroidLayout *self) {} diff --git a/src/api-impl/android/graphics/Matrix.java b/src/api-impl/android/graphics/Matrix.java index 6cf7a22a..d0981fd2 100644 --- a/src/api-impl/android/graphics/Matrix.java +++ b/src/api-impl/android/graphics/Matrix.java @@ -324,7 +324,8 @@ public class Matrix { * M' = M * T(dx, dy) */ public boolean preTranslate(float dx, float dy) { - return native_preTranslate(native_instance, dx, dy); + // return native_preTranslate(native_instance, dx, dy); + return false; } /** * Preconcats the matrix with the specified scale. @@ -630,7 +631,8 @@ public class Matrix { if (dst == null || src == null) { throw new NullPointerException(); } - return native_mapRect(native_instance, dst, src); + // return native_mapRect(native_instance, dst, src); + return false; } /** * Apply this matrix to the rectangle, and write the transformed rectangle diff --git a/src/api-impl/android/graphics/Paint.java b/src/api-impl/android/graphics/Paint.java index e1bc70ef..8e3ce6a6 100644 --- a/src/api-impl/android/graphics/Paint.java +++ b/src/api-impl/android/graphics/Paint.java @@ -163,6 +163,8 @@ public class Paint { public Xfermode setXfermode(Xfermode xfermode) { return xfermode; } + public void setLetterSpacing(float spacing) {} + public enum Cap { /** * The stroke ends with the path, and does not project beyond it.