1#![allow(non_upper_case_globals)]
2#![allow(non_camel_case_types)]
3#![allow(non_snake_case)]
4#![allow(dead_code)]
5
6use crate::jni::*;
7
8pub const JAWT_LOCK_ERROR: u32 = 1;
9pub const JAWT_LOCK_CLIP_CHANGED: u32 = 2;
10pub const JAWT_LOCK_BOUNDS_CHANGED: u32 = 4;
11pub const JAWT_LOCK_SURFACE_CHANGED: u32 = 8;
12pub const JAWT_VERSION_1_3: u32 = 65539;
13pub const JAWT_VERSION_1_4: u32 = 65540;
14pub const JAWT_VERSION_1_7: u32 = 65543;
15pub const JAWT_VERSION_9: u32 = 589824;
16#[repr(C)]
17#[derive(Debug, Copy, Clone)]
18pub struct jawt_Rectangle {
19 pub x: jint,
20 pub y: jint,
21 pub width: jint,
22 pub height: jint,
23}
24pub type JAWT_Rectangle = jawt_Rectangle;
25#[repr(C)]
26#[derive(Debug, Copy, Clone)]
27pub struct jawt_DrawingSurfaceInfo {
28 pub platformInfo: *mut ::std::os::raw::c_void,
29 pub ds: *mut jawt_DrawingSurface,
30 pub bounds: JAWT_Rectangle,
31 pub clipSize: jint,
32 pub clip: *mut JAWT_Rectangle,
33}
34pub type JAWT_DrawingSurfaceInfo = jawt_DrawingSurfaceInfo;
35#[repr(C)]
36#[derive(Debug, Copy, Clone)]
37pub struct jawt_DrawingSurface {
38 pub env: *mut JNIEnv,
39 pub target: jobject,
40 pub Lock: ::std::option::Option<unsafe extern "C" fn(ds: *mut jawt_DrawingSurface) -> jint>,
41 pub GetDrawingSurfaceInfo: ::std::option::Option<
42 unsafe extern "C" fn(ds: *mut jawt_DrawingSurface) -> *mut JAWT_DrawingSurfaceInfo,
43 >,
44 pub FreeDrawingSurfaceInfo:
45 ::std::option::Option<unsafe extern "C" fn(dsi: *mut JAWT_DrawingSurfaceInfo)>,
46 pub Unlock: ::std::option::Option<unsafe extern "C" fn(ds: *mut jawt_DrawingSurface)>,
47}
48pub type JAWT_DrawingSurface = jawt_DrawingSurface;
49#[repr(C)]
50#[derive(Debug, Copy, Clone)]
51pub struct jawt {
52 pub version: jint,
53 pub GetDrawingSurface: ::std::option::Option<
54 unsafe extern "C" fn(env: *mut JNIEnv, target: jobject) -> *mut JAWT_DrawingSurface,
55 >,
56 pub FreeDrawingSurface:
57 ::std::option::Option<unsafe extern "C" fn(ds: *mut JAWT_DrawingSurface)>,
58 pub Lock: ::std::option::Option<unsafe extern "C" fn(env: *mut JNIEnv)>,
59 pub Unlock: ::std::option::Option<unsafe extern "C" fn(env: *mut JNIEnv)>,
60 pub GetComponent: ::std::option::Option<
61 unsafe extern "C" fn(
62 env: *mut JNIEnv,
63 platformInfo: *mut ::std::os::raw::c_void,
64 ) -> jobject,
65 >,
66 #[doc = " Since 9"]
67 #[doc = " Creates a java.awt.Frame placed in a native container. Container is"]
68 #[doc = " referenced by the native platform handle. For example on Windows this"]
69 #[doc = " corresponds to an HWND. For other platforms, see the appropriate"]
70 #[doc = " machine-dependent header file for a description. The reference returned"]
71 #[doc = " by this function is a local reference that is only valid in this"]
72 #[doc = " environment. This function returns a NULL reference if no frame could be"]
73 #[doc = " created with matching platform information."]
74 pub CreateEmbeddedFrame: ::std::option::Option<
75 unsafe extern "C" fn(
76 env: *mut JNIEnv,
77 platformInfo: *mut ::std::os::raw::c_void,
78 ) -> jobject,
79 >,
80 #[doc = " Since 9"]
81 #[doc = " Moves and resizes the embedded frame. The new location of the top-left"]
82 #[doc = " corner is specified by x and y parameters relative to the native parent"]
83 #[doc = " component. The new size is specified by width and height."]
84 #[doc = ""]
85 #[doc = " The embedded frame should be created by CreateEmbeddedFrame() method, or"]
86 #[doc = " this function will not have any effect."]
87 #[doc = ""]
88 #[doc = " java.awt.Component.setLocation() and java.awt.Component.setBounds() for"]
89 #[doc = " EmbeddedFrame really don't move it within the native parent. These"]
90 #[doc = " methods always locate the embedded frame at (0, 0) for backward"]
91 #[doc = " compatibility. To allow moving embedded frames this method was"]
92 #[doc = " introduced, and it works just the same way as setLocation() and"]
93 #[doc = " setBounds() for usual, non-embedded components."]
94 #[doc = ""]
95 #[doc = " Using usual get/setLocation() and get/setBounds() together with this new"]
96 #[doc = " method is not recommended."]
97 pub SetBounds: ::std::option::Option<
98 unsafe extern "C" fn(
99 env: *mut JNIEnv,
100 embeddedFrame: jobject,
101 x: jint,
102 y: jint,
103 w: jint,
104 h: jint,
105 ),
106 >,
107 #[doc = " Since 9"]
108 #[doc = " Synthesize a native message to activate or deactivate an EmbeddedFrame"]
109 #[doc = " window depending on the value of parameter doActivate, if \"true\""]
110 #[doc = " activates the window; otherwise, deactivates the window."]
111 #[doc = ""]
112 #[doc = " The embedded frame should be created by CreateEmbeddedFrame() method, or"]
113 #[doc = " this function will not have any effect."]
114 pub SynthesizeWindowActivation: ::std::option::Option<
115 unsafe extern "C" fn(env: *mut JNIEnv, embeddedFrame: jobject, doActivate: jboolean),
116 >,
117}
118pub type JAWT = jawt;
119extern "C" {
120 pub fn JAWT_GetAWT(env: *mut JNIEnv, awt: *mut JAWT) -> jboolean;
121}