Kryon's Android device module has brought its text menu widgets since the touch text selection change, so the Android JNI test (which the health, push, wakelock and import tests also run) failed to link their host functions. It now uses the same host stand-ins as the text input test, whose unused parameters are marked for -Werror. The synced record field check now lists "size", the Diary photo entry field read for photo storage sizes. Entries are kept whole on every device, so no record download is needed.
113 lines
2.4 KiB
Ziran
113 lines
2.4 KiB
Ziran
// Host functions for Android tests that draw nothing: the input transport
|
|
// test and the JNI test, whose Kryon device module brings text menu widgets.
|
|
#import "drawing_props"
|
|
#import "geometry"
|
|
|
|
labels: s32;
|
|
|
|
#program_export
|
|
MeasureGlyphWidth :: (value: string, font: s32, typeface: string) -> s32 {
|
|
unused typeface
|
|
return (cast(s32)value.count) * font / 2
|
|
}
|
|
|
|
#program_export
|
|
MeasureGlyphLineHeight :: (font: s32, typeface: string) -> s32 {
|
|
unused typeface
|
|
return font
|
|
}
|
|
|
|
#program_export
|
|
RasterRoundedRectangle :: (bounds: Rectangle, radius: float32,
|
|
segments: s32, color: Color) {
|
|
unused bounds
|
|
unused radius
|
|
unused segments
|
|
unused color
|
|
}
|
|
|
|
#program_export
|
|
RasterRoundedRectangleOutline :: (bounds: Rectangle, radius: float32,
|
|
segments: s32, width: float32, color: Color) {
|
|
unused bounds
|
|
unused radius
|
|
unused segments
|
|
unused width
|
|
unused color
|
|
}
|
|
|
|
#program_export
|
|
RasterLine :: (bounds: Rectangle, color: Color) {
|
|
unused bounds
|
|
unused color
|
|
}
|
|
|
|
#program_export
|
|
RasterText :: (value: string, x: s32, y: s32, font: s32, color: Color) {
|
|
unused value
|
|
unused x
|
|
unused y
|
|
unused font
|
|
unused color
|
|
labels += 1
|
|
}
|
|
|
|
#program_export
|
|
RasterTextClipped :: (value: string, x: s32, y: s32, font: s32,
|
|
color: Color, clip: Rectangle) {
|
|
unused value
|
|
unused x
|
|
unused y
|
|
unused font
|
|
unused color
|
|
unused clip
|
|
labels += 1
|
|
}
|
|
|
|
#program_export
|
|
RasterImage :: (path: string, texture_id: u32, source: Rectangle,
|
|
destination: Rectangle, clip: Rectangle, origin: Vector2,
|
|
rotation: float32, radius: float32, tint: Color) {
|
|
unused path
|
|
unused texture_id
|
|
unused source
|
|
unused destination
|
|
unused clip
|
|
unused origin
|
|
unused rotation
|
|
unused radius
|
|
unused tint
|
|
}
|
|
|
|
#program_export
|
|
RasterImageMesh :: (path: string, texture_id: u32, source: Rectangle,
|
|
points: []Vector2, columns: s32, rows: s32, clip: Rectangle,
|
|
tint: Color) {
|
|
unused path
|
|
unused texture_id
|
|
unused source
|
|
unused points
|
|
unused columns
|
|
unused rows
|
|
unused clip
|
|
unused tint
|
|
}
|
|
|
|
#program_export
|
|
ContextMenuLabelCount :: () -> s32 { return labels }
|
|
|
|
#program_export
|
|
SystemClipboardOpenHost :: () -> s32 {
|
|
return -1
|
|
}
|
|
#program_export
|
|
SystemClipboardByteHost :: (index: s32) -> s32 {
|
|
unused index
|
|
return -1
|
|
}
|
|
#program_export
|
|
SystemClipboardWriteHost :: (text: string) -> bool {
|
|
unused text
|
|
return false
|
|
}
|