/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#ifdef HEADLESS
#endif
#include "awt_p.h"
#include "java_awt_Component.h"
//#include "sun_awt_motif_MComponentPeer.h"
#include "awt_Component.h"
#include <jni.h>
#include <jni_util.h>
#include <jawt_md.h>
extern struct MComponentPeerIDs mComponentPeerIDs;
extern struct ComponentIDs componentIDs;
#ifndef XAWT
extern AwtGraphicsConfigDataPtr
#endif
#ifdef XAWT
#include "awt_GraphicsEnv.h"
extern jfieldID graphicsConfigID;
extern jfieldID drawStateID;
extern struct X11GraphicsConfigIDs x11GraphicsConfigIDs;
#endif
/*
* Lock the surface of the target component for native rendering.
* When finished drawing, the surface must be unlocked with
* Unlock(). This function returns a bitmask with one or more of the
* following values:
*
* JAWT_LOCK_ERROR - When an error has occurred and the surface could not
* be locked.
*
* JAWT_LOCK_CLIP_CHANGED - When the clip region has changed.
*
* JAWT_LOCK_BOUNDS_CHANGED - When the bounds of the surface have changed.
*
* JAWT_LOCK_SURFACE_CHANGED - When the surface itself has changed
*/
{
#ifdef DEBUG
#endif
return (jint)JAWT_LOCK_ERROR;
}
/* Make sure the target is a java.awt.Component */
#ifdef DEBUG
#endif
return (jint)JAWT_LOCK_ERROR;
}
if (!awtLockInited) {
return (jint)JAWT_LOCK_ERROR;
}
AWT_LOCK();
/* Get the peer of the target component */
#ifdef DEBUG
#endif
return (jint)JAWT_LOCK_ERROR;
}
#ifndef XAWT
#else
#endif
return drawState;
}
{
#ifdef XAWT
#endif
#ifdef DEBUG
#endif
return (int32_t) 0;
}
/* Make sure the target is a java.awt.Component */
#ifdef DEBUG
#endif
return (int32_t) 0;
}
if (!awtLockInited) {
return (int32_t) 0;
}
AWT_LOCK();
/* Get the peer of the target component */
#ifdef DEBUG
#endif
AWT_UNLOCK();
return (int32_t) 0;
}
#ifndef XAWT
#else
/* GraphicsConfiguration object of MComponentPeer */
} else {
}
#endif
AWT_UNLOCK();
return result;
}
/*
* Get the drawing surface info.
* The value returned may be cached, but the values may change if
* additional calls to Lock() or Unlock() are made.
* Lock() must be called before this can return a valid value.
* Returns NULL if an error has occurred.
* When finished with the returned value, FreeDrawingSurfaceInfo must be
* called.
*/
{
#ifndef XAWT
#endif
#ifdef DEBUG
#endif
return NULL;
}
/* Make sure the target is a java.awt.Component */
#ifdef DEBUG
#endif
return NULL;
}
if (!awtLockInited) {
return NULL;
}
AWT_LOCK();
/* Get the peer of the target component */
#ifdef DEBUG
#endif
AWT_UNLOCK();
return NULL;
}
#ifndef XAWT
/* Get the component data from the peer */
cdata = (struct ComponentData *)
#ifdef DEBUG
#endif
AWT_UNLOCK();
return NULL;
}
#endif
AWT_UNLOCK();
/* Allocate platform-specific data */
malloc(sizeof(JAWT_X11DrawingSurfaceInfo));
/* Set drawable and display */
#ifndef XAWT
#else
#endif
/* Get window attributes to set other values */
/* Set the other values */
/* Allocate and initialize platform-independent data */
p->platformInfo = px;
p->clipSize = 1;
/* Return our new structure */
return p;
}
/*
* Free the drawing surface info.
*/
{
#ifdef DEBUG
#endif
return;
}
}
/*
* Unlock the drawing surface of the target component for native rendering.
*/
{
#ifdef DEBUG
#endif
return;
}
}
{
/* Make sure the target component is a java.awt.Component */
#ifdef DEBUG
"GetDrawingSurface target must be a java.awt.Component\n");
#endif
return NULL;
}
p->Lock = awt_DrawingSurface_Lock;
return p;
}
{
#ifdef DEBUG
#endif
return;
}
}
{
if (awtLockInited) {
AWT_LOCK();
}
}
{
if (awtLockInited) {
}
}
{
AWT_LOCK();
#ifndef XAWT
}
}
}
#else
#endif
AWT_UNLOCK();
}
AWT_UNLOCK();
return target;
}