-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRustWidgets.java
More file actions
36 lines (31 loc) · 1.6 KB
/
RustWidgets.java
File metadata and controls
36 lines (31 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Java JNI facade for the rust_widgets native binding.
public final class RustWidgets {
static {
// The host application is responsible for loading the native library.
// Example: System.loadLibrary("rust_widgets");
}
private RustWidgets() {
}
// JNI skeleton methods mapped by examples/java/rust_widgets_jni_bridge.c.
public static native int bindingsApiVersion();
public static native int javaBindingStatus();
public static native int jniSkeletonVersion();
public static native int setRenderAASamplesPerAxis(int samples);
public static native int getRenderAASamplesPerAxis();
public static native int setEmbeddedTargetFps(int fps);
public static native int getEmbeddedTargetFps();
public static native long submitEmbeddedNoopTask(String label);
public static native boolean isEmbeddedEngineInitialized();
public static native boolean isEmbeddedEngineRunning();
public static native long embeddedEngineFrameCount();
public static native long embeddedEnginePendingTaskCount();
public static native long embeddedEngineWindowCount();
public static native long embeddedEngineButtonCount();
public static native void init();
public static native void run();
public static native void quit();
public static native long createWindow(String title, int x, int y, int width, int height);
public static native long createButton(long parent, String text, int x, int y, int width, int height);
public static native void setWidgetText(long widgetId, String text);
public static native String getWidgetText(long widgetId);
}