/*
* 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.
*/
#include "SurfaceData.h"
#include "awt_p.h"
#include "awt_GraphicsEnv.h"
#include <jdga.h>
/**
* This include file contains support declarations for loops using the
* X11 extended SurfaceData interface to talk to an X11 drawable from
* native code.
*/
#ifdef HEADLESS
#define X11SDOps void
#else /* HEADLESS */
/*
* This function returns an X11 Drawable which transparent pixels
* (if there are any) were set to the specified color.
*
* The env parameter should be the JNIEnv of the surrounding JNI context.
*
* The xsdo parameter should be a pointer to the ops object upon which
* this function is being invoked.
*
* The pixel parameter should be a color to which the transparent
* pixels of the image should be se set to.
*/
/*
* This function releases the lock set by GetPixmapBg
* function of the indicated X11SDOps structure.
*
* The env parameter should be the JNIEnv of the surrounding JNI context.
*
* The ops parameter should be a pointer to the ops object upon which
* this function is being invoked.
*/
#ifdef MITSHM
typedef struct {
#endif /* MITSHM */
struct _X11SDOps {
void *dgaDev;
#ifdef MITSHM
#endif /* MITSHM */
};
#ifdef MITSHM
#endif /* MITSHM */
#endif /* !HEADLESS */
jboolean XShared_initSurface(JNIEnv *env, X11SDOps *xsdo, jint depth, jint width, jint height, jlong drawable);
/*
* This function returns a pointer to a native X11SDOps structure
* for accessing the indicated X11 SurfaceData Java object. It
* verifies that the indicated SurfaceData object is an instance
* of X11SurfaceData before returning and will return NULL if the
* wrong SurfaceData object is being accessed. This function will
* throw the appropriate Java exception if it returns NULL so that
* the caller can simply return.
*
* Note to callers:
* This function uses JNI methods so it is important that the
* caller not have any outstanding GetPrimitiveArrayCritical or
* GetStringCritical locks which have not been released.
*
* The caller may continue to use JNI methods after this method
* is called since this function will not leave any outstanding
* JNI Critical locks unreleased.
*/