< prev index next >
src/java.desktop/share/native/include/jawt.h
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 31,41 ****
#ifdef __cplusplus
extern "C" {
#endif
/*
! * AWT native interface (new in JDK 1.3)
*
* The AWT native interface allows a native C or C++ application a means
* by which to access native structures in AWT. This is to facilitate moving
* legacy C and C++ applications to Java and to target the needs of the
* community who, at present, wish to do their own native rendering to canvases
--- 31,41 ----
#ifdef __cplusplus
extern "C" {
#endif
/*
! * AWT native interface.
*
* The AWT native interface allows a native C or C++ application a means
* by which to access native structures in AWT. This is to facilitate moving
* legacy C and C++ applications to Java and to target the needs of the
* community who, at present, wish to do their own native rendering to canvases
*** 277,286 ****
--- 277,329 ----
* This function returns a NULL reference if no component could be
* found with matching platform information.
*/
jobject (JNICALL *GetComponent)(JNIEnv* env, void* platformInfo);
+ /**
+ * Since 9
+ * Creates a java.awt.Frame placed in a native container. Container is
+ * referenced by the native platform handle. For example on Windows this
+ * corresponds to an HWND. For other platforms, see the appropriate
+ * machine-dependent header file for a description. The reference returned
+ * by this function is a local reference that is only valid in this
+ * environment. This function returns a NULL reference if no frame could be
+ * creates with matching platform information.
+ */
+ jobject (JNICALL *CreateEmbeddedFrame) (JNIEnv *env, void* platformInfo);
+
+ /**
+ * Since 9
+ * Moves and resize the embedded frame. The new location of the top-left
+ * corner is specified by x and y parameters relative to the native parent
+ * component. The new size is specified by width and height.
+ *
+ * The embedded frame should be created by CreateEmbeddedFrame() method, or
+ * this function will not have any effect.
+ *
+ * setLocation() and setBounds() for EmbeddedFrame really don't move it
+ * within the native parent. These methods always put embedded frame to
+ * (0, 0) for backward compatibility. To allow moving embedded frames
+ * this method was introduced, and it work just the same way as
+ * setLocation() and setBounds() for usual, non-embedded components.
+ *
+ * Using usual get/setLocation() and get/setBounds() together with this new
+ * method is not recommended.
+ */
+ void (JNICALL *SetBounds) (JNIEnv *env, jobject embeddedFrame,
+ jint x, jint y, jint w, jint h);
+ /**
+ * Since 9
+ * Synthesize native message to activate or deactivate EmbeddedFrame window
+ * depending on the value of parameter doActivate, if "true" activates the
+ * window; otherwise, deactivates the window.
+ *
+ * The embedded frame should be created by CreateEmbeddedFrame() method, or
+ * this function will not have any effect.
+ */
+ void (JNICALL *SynthesizeWindowActivation) (JNIEnv *env,
+ jobject embeddedFrame, jboolean doActivate);
} JAWT;
/*
* Get the AWT native structure. This function returns JNI_FALSE if
* an error occurs.
*** 289,298 ****
--- 332,342 ----
jboolean JNICALL JAWT_GetAWT(JNIEnv* env, JAWT* awt);
#define JAWT_VERSION_1_3 0x00010003
#define JAWT_VERSION_1_4 0x00010004
#define JAWT_VERSION_1_7 0x00010007
+ #define JAWT_VERSION_9 0x00010009
#ifdef __cplusplus
} /* extern "C" */
#endif
< prev index next >