blob: ea47c7e87db952bc6345692dd10d526bc79c501c [file] [log] [blame]
/*
* (c) Copyright IBM Corp., 2000, 2001
* All Rights Reserved.
*/
/**
* SWT OS natives implementation.
*/
/* #define PRINT_FAILED_RCODES */
#define NDEBUG
#include "swt.h"
#include "structs.h"
#include <stdio.h>
#include <assert.h>
#include <langinfo.h>
#include <iconv.h>
#include <stdlib.h>
static int RESOURCES_START;
static int RESOURCES_END;
JNIEXPORT int JNICALL Java_org_eclipse_swt_internal_motif_OS_getSharedLibraryMajorVersionNumber
(JNIEnv *env, jclass that)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "getSharedLibraryMajorVersionNumber\n");
#endif
return SWT_VERSION / 1000;
}
JNIEXPORT int JNICALL Java_org_eclipse_swt_internal_motif_OS_getSharedLibraryMinorVersionNumber
(JNIEnv *env, jclass that)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "getSharedLibraryMinorVersionNumber\n");
#endif
return SWT_VERSION % 1000;
}
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_setResourceMem
(JNIEnv *env, jclass that, jint start, jint end)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "setResourceMem\n");
#endif
RESOURCES_START = start;
RESOURCES_END = end;
}
/*************************************************************************
Name : sleep_ms( unsigned int nmsecs)
Purpose : sleep for a given number of milli seconds
Parms : the number of milli seconds to sleep
Returns :
*************************************************************************/
/*
void sleep_ms( unsigned int nmsecs)
{
struct timeval tval;
tval.tv_sec = (nmsecs * 1000) / 1000000;
tval.tv_usec = (nmsecs * 1000) % 1000000;
select(0, NULL, NULL, NULL, &tval);
}
*/
/* ------------------------------------- */
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XInitThreads
* Signature: ()I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XInitThreads
(JNIEnv *env, jclass that)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XInitThreads\n");
#endif
return (jint) XInitThreads();
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: OverrideShellWidgetClass
* Signature: ()I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_OverrideShellWidgetClass
(JNIEnv *env, jclass that)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "OverrideShellWidgetClass\n");
#endif
return (jint) (overrideShellWidgetClass);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: ShellWidgetClass
* Signature: ()I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_ShellWidgetClass
(JNIEnv *env, jclass that)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "ShellWidgetClass\n");
#endif
return (jint) (shellWidgetClass);
}
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_TopLevelShellWidgetClass
(JNIEnv *env, jclass that)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "TopLevelShellWidgetClass\n");
#endif
return (jint) (topLevelShellWidgetClass);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: TransientShellWidgetClass
* Signature: ()I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_TransientShellWidgetClass
(JNIEnv *env, jclass that)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "TransientShellWidgetClass\n");
#endif
return (jint) (transientShellWidgetClass);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: memmove
* Signature: (ILorg/eclipse/swt/internal/motif/XButtonEvent;I)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_memmove__ILorg_eclipse_swt_internal_motif_XButtonEvent_2I
(JNIEnv *env, jclass that, jint dest, jobject src, jint count)
{
DECL_GLOB(pGlob)
XEvent xEvent, *src1=NULL;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "memmove__ILorg_eclipse_swt_internal_motif_XButtonEvent_2I\n");
#endif
if (src) {
src1=&xEvent;
cacheXbuttoneventFids(env, src, &PGLOB(XbuttoneventFc));
getXbuttoneventFields(env, src, src1, &PGLOB(XbuttoneventFc));
}
memmove((void *)dest, (void *)src1, count);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: memmove
* Signature: (ILorg/eclipse/swt/internal/motif/XImage;I)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_memmove__ILorg_eclipse_swt_internal_motif_XImage_2I
(JNIEnv *env, jclass that, jint dest, jobject src, jint count)
{
DECL_GLOB(pGlob)
XImage image, *src1=NULL;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "memmove__ILorg_eclipse_swt_internal_motif_XImage_2I\n");
#endif
if (src) {
src1=&image;
cacheXimageFids(env, src, &PGLOB(XimageFc));
getXimageFields(env, src, src1, &PGLOB(XimageFc));
}
memmove((void *)dest, (void *)src1, count);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: memmove
* Signature: (ILorg/eclipse/swt/internal/motif/XmTextBlockRec;I)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_memmove__ILorg_eclipse_swt_internal_motif_XmTextBlockRec_2I
(JNIEnv *env, jclass that, jint dest, jobject src, jint count)
{
DECL_GLOB(pGlob)
XmTextBlockRec xmtextblockrec, *src1=NULL;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "memmove__ILorg_eclipse_swt_internal_motif_XmTextBlockRec_2I\n");
#endif
if (src) {
src1=&xmtextblockrec;
cacheXmtextblockrecFids(env, src, &PGLOB(XmtextblockrecFc));
getXmtextblockrecFields(env, src, src1, &PGLOB(XmtextblockrecFc));
}
memmove((void *)dest, (void *)src1, count);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: memmove
* Signature: (ILorg/eclipse/swt/internal/motif/XmTextVerifyCallbackStruct;I)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_memmove__ILorg_eclipse_swt_internal_motif_XmTextVerifyCallbackStruct_2I
(JNIEnv *env, jclass that, jint dest, jobject src, jint count)
{
DECL_GLOB(pGlob)
XmTextVerifyCallbackStruct xmtextverifycallbackstruct, *src1=NULL;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "memmove__ILorg_eclipse_swt_internal_motif_XmTextVerifyCallbackStruct_2I\n");
#endif
if (src) {
src1=&xmtextverifycallbackstruct;
cacheXmtextverifycallbackstructFids(env, src, &PGLOB(XmtextverifycallbackstructFc));
getXmtextverifycallbackstructFields(env, src, src1, &PGLOB(XmtextverifycallbackstructFc));
}
memmove((void *)dest, (void *)src1, count);
}
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_memmove__I_3BI
(JNIEnv *env, jclass that, jint dest, jbyteArray src, jint count)
{
jbyte *src1;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "memmove__I_3BI\n");
#endif
/* don't do anything if src pointer is NULL */
if (src) {
src1 = (*env)->GetByteArrayElements(env, src, NULL);
memmove((void *)dest, (void *)src1, count);
(*env)->ReleaseByteArrayElements(env, src, src1, 0);
}
}
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_memmove__I_3CI
(JNIEnv *env, jclass that, jint dest, jcharArray src, jint count)
{
jchar *src1;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "memmove__I_3CI\n");
#endif
/* don't do anything if src pointer is NULL */
if (src) {
src1 = (*env)->GetCharArrayElements(env, src, NULL);
memmove((void *)dest, (void *)src1, count);
(*env)->ReleaseCharArrayElements(env, src, src1, 0);
}
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: memmove
* Signature: (I[II)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_memmove__I_3II
(JNIEnv *env, jclass that, jint dest, jintArray src, jint count)
{
jint *src1;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "memmove__I_3II\n");
#endif
/* don't do anything if src pointer is NULL */
if (src) {
src1 = (*env)->GetIntArrayElements(env, src, NULL);
memmove((void *)dest, (void *)src1, count);
(*env)->ReleaseIntArrayElements(env, src, src1, 0);
}
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: memmove
* Signature: (Lorg/eclipse/swt/internal/motif/Visual;II)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_memmove__Lorg_eclipse_swt_internal_motif_Visual_2II
(JNIEnv *env, jclass that, jobject dest, jint src, jint count)
{
DECL_GLOB(pGlob)
Visual visual, *lpxVisual=NULL;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "memmove__Lorg_eclipse_swt_internal_motif_Visual_2II\n");
#endif
memmove((void *)&visual, (void *)src, count);
if (dest) {
lpxVisual=&visual;
cacheVisualFids(env, dest, &PGLOB(VisualFc));
setVisualFields(env, dest, lpxVisual, &PGLOB(VisualFc));
}
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: memmove
* Signature: (Lorg/eclipse/swt/internal/motif/XButtonEvent;II)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_memmove__Lorg_eclipse_swt_internal_motif_XButtonEvent_2II
(JNIEnv *env, jclass that, jobject dest, jint src, jint count)
{
DECL_GLOB(pGlob)
XEvent xEvent, *lpxEvent=NULL;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "memmove__Lorg_eclipse_swt_internal_motif_XButtonEvent_2II\n");
#endif
memmove((void *)&xEvent, (void *)src, count);
if (dest) {
lpxEvent=&xEvent;
cacheXbuttoneventFids(env, dest, &PGLOB(XbuttoneventFc));
setXbuttoneventFields(env, dest, lpxEvent, &PGLOB(XbuttoneventFc));
}
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: memmove
* Signature: (Lorg/eclipse/swt/internal/motif/XCharStruct;II)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_memmove__Lorg_eclipse_swt_internal_motif_XCharStruct_2II
(JNIEnv *env, jclass that, jobject dest, jint src, jint count)
{
DECL_GLOB(pGlob)
XCharStruct xCharstruct, *lpxCharstruct=NULL;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "memmove__Lorg_eclipse_swt_internal_motif_XCharStruct_2II\n");
#endif
memmove((void *)&xCharstruct, (void *)src, count);
if (dest) {
lpxCharstruct=&xCharstruct;
cacheXcharstructFids(env, dest, &PGLOB(XcharstructFc));
setXcharstructFields(env, dest, lpxCharstruct, &PGLOB(XcharstructFc));
}
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: memmove
* Signature: (Lorg/eclipse/swt/internal/motif/XConfigureEvent;II)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_memmove__Lorg_eclipse_swt_internal_motif_XConfigureEvent_2II
(JNIEnv *env, jclass that, jobject dest, jint src, jint count)
{
DECL_GLOB(pGlob)
XEvent xEvent, *lpxEvent=NULL;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "memmove__Lorg_eclipse_swt_internal_motif_XConfigureEvent_2II\n");
#endif
memmove((void *)&xEvent, (void *)src, count);
if (dest) {
lpxEvent=&xEvent;
cacheXconfigureeventFids(env, dest, &PGLOB(XconfigureeventFc));
setXconfigureeventFields(env, dest, lpxEvent, &PGLOB(XconfigureeventFc));
}
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: memmove
* Signature: (Lorg/eclipse/swt/internal/motif/XCrossingEvent;II)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_memmove__Lorg_eclipse_swt_internal_motif_XCrossingEvent_2II
(JNIEnv *env, jclass that, jobject dest, jint src, jint count)
{
DECL_GLOB(pGlob)
XEvent xEvent, *lpxEvent=NULL;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "memmove__Lorg_eclipse_swt_internal_motif_XCrossingEvent_2II\n");
#endif
memmove((void *)&xEvent, (void *)src, count);
if (dest) {
lpxEvent=&xEvent;
cacheXcrossingeventFids(env, dest, &PGLOB(XcrossingeventFc));
setXcrossingeventFields(env, dest, lpxEvent, &PGLOB(XcrossingeventFc));
}
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: memmove
* Signature: (Lorg/eclipse/swt/internal/motif/XExposeEvent;II)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_memmove__Lorg_eclipse_swt_internal_motif_XExposeEvent_2II
(JNIEnv *env, jclass that, jobject dest, jint src, jint count)
{
DECL_GLOB(pGlob)
XEvent xEvent, *lpxEvent=NULL;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "memmove__Lorg_eclipse_swt_internal_motif_XExposeEvent_2II\n");
#endif
memmove((void *)&xEvent, (void *)src, count);
if (dest) {
lpxEvent=&xEvent;
cacheXexposeeventFids(env, dest, &PGLOB(XexposeeventFc));
setXexposeeventFields(env, dest, lpxEvent, &PGLOB(XexposeeventFc));
}
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: memmove
* Signature: (Lorg/eclipse/swt/internal/motif/XFocusChangeEvent;II)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_memmove__Lorg_eclipse_swt_internal_motif_XFocusChangeEvent_2II
(JNIEnv *env, jclass that, jobject dest, jint src, jint count)
{
DECL_GLOB(pGlob)
XEvent xEvent, *lpxEvent=NULL;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "memmove__Lorg_eclipse_swt_internal_motif_XFocusChangeEvent_2II\n");
#endif
assert(count <= sizeof(XEvent));
memmove((void *)&xEvent, (void *)src, count);
if (dest) {
lpxEvent=&xEvent;
cacheXfocuschangeeventFids(env, dest, &PGLOB(XfocuschangeeventFc));
setXfocuschangeeventFields(env, dest, lpxEvent, &PGLOB(XfocuschangeeventFc));
}
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: memmove
* Signature: (Lorg/eclipse/swt/internal/motif/XFontStruct;II)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_memmove__Lorg_eclipse_swt_internal_motif_XFontStruct_2II
(JNIEnv *env, jclass that, jobject dest, jint src, jint count)
{
DECL_GLOB(pGlob)
XFontStruct fontStruct, *lpxFontStruct=NULL;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "memmove__Lorg_eclipse_swt_internal_motif_XFontStruct_2II\n");
#endif
memmove((void *)&fontStruct, (void *)src, count);
if (dest) {
lpxFontStruct=&fontStruct;
cacheXfontstructFids(env, dest, &PGLOB(XfontstructFc));
setXfontstructFields(env, dest, lpxFontStruct, &PGLOB(XfontstructFc));
}
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: memmove
* Signature: (Lorg/eclipse/swt/internal/motif/XImage;II)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_memmove__Lorg_eclipse_swt_internal_motif_XImage_2II
(JNIEnv *env, jclass that, jobject dest, jint src, jint count)
{
DECL_GLOB(pGlob)
XImage image, *dest1=NULL;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "memmove__Lorg_eclipse_swt_internal_motif_XImage_2II\n");
#endif
memmove((void *)&image, (void *)src, count);
if (dest) {
dest1=&image;
cacheXimageFids(env, dest, &PGLOB(XimageFc));
setXimageFields(env, dest, dest1, &PGLOB(XimageFc));
}
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: memmove
* Signature: (Lorg/eclipse/swt/internal/motif/XKeyEvent;II)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_memmove__Lorg_eclipse_swt_internal_motif_XKeyEvent_2II
(JNIEnv *env, jclass that, jobject dest, jint src, jint count)
{
DECL_GLOB(pGlob)
XEvent xEvent, *lpxEvent=NULL;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "memmove__Lorg_eclipse_swt_internal_motif_XKeyEvent_2II\n");
#endif
memmove((void *)&xEvent, (void *)src, count);
if (dest) {
lpxEvent=&xEvent;
cacheXkeyeventFids(env, dest, &PGLOB(XkeyeventFc));
setXkeyeventFields(env, dest, lpxEvent, &PGLOB(XkeyeventFc));
}
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: memmove
* Signature: (Lorg/eclipse/swt/internal/motif/XKeyEvent;Lorg/eclipse/swt/internal/motif/XAnyEvent;I)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_memmove__Lorg_eclipse_swt_internal_motif_XKeyEvent_2Lorg_eclipse_swt_internal_motif_XAnyEvent_2I
(JNIEnv *env, jclass that, jobject dest, jobject src, jint count)
{
DECL_GLOB(pGlob)
XEvent xEvent1, *src1=NULL, xEvent2, *dest1=NULL;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "memmove__Lorg_eclipse_swt_internal_motif_XKeyEvent_2Lorg_eclipse_swt_internal_motif_XAnyEvent_2I\n");
#endif
if (src) {
src1=&xEvent1;
cacheXanyeventFids(env, src, &PGLOB(XanyeventFc));
getXanyeventFields(env, src, src1, &PGLOB(XanyeventFc));
}
memmove((void *)&xEvent2, (void *)src1, count);
if (dest) {
dest1=&xEvent2;
cacheXkeyeventFids(env, dest, &PGLOB(XkeyeventFc));
setXkeyeventFields(env, dest, dest1, &PGLOB(XkeyeventFc));
}
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: memmove
* Signature: (Lorg/eclipse/swt/internal/motif/XMotionEvent;II)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_memmove__Lorg_eclipse_swt_internal_motif_XMotionEvent_2II
(JNIEnv *env, jclass that, jobject dest, jint src, jint count)
{
DECL_GLOB(pGlob)
XEvent xEvent, *lpxEvent=NULL;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "memmove__Lorg_eclipse_swt_internal_motif_XMotionEvent_2II\n");
#endif
memmove((void *)&xEvent, (void *)src, count);
if (dest) {
lpxEvent=&xEvent;
cacheXmotioneventFids(env, dest, &PGLOB(XmotioneventFc));
setXmotioneventFields(env, dest, lpxEvent, &PGLOB(XmotioneventFc));
}
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: memmove
* Signature: (Lorg/eclipse/swt/internal/motif/XmAnyCallbackStruct;II)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_memmove__Lorg_eclipse_swt_internal_motif_XmAnyCallbackStruct_2II
(JNIEnv *env, jclass that, jobject dest, jint src, jint count)
{
DECL_GLOB(pGlob)
XmAnyCallbackStruct xmanycallbackstruct, *dest1=NULL;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "memmove__Lorg_eclipse_swt_internal_motif_XmAnyCallbackStruct_2II\n");
#endif
memmove((void *)&xmanycallbackstruct, (void *)src, count);
if (dest) {
dest1=&xmanycallbackstruct;
cacheXmanycallbackstructFids(env, dest, &PGLOB(XmanycallbackstructFc));
setXmanycallbackstructFields(env, dest, dest1, &PGLOB(XmanycallbackstructFc));
}
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: memmove
* Signature: (ILorg/eclipse/swt/internal/motif/XmDragProcCallback;I)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_memmove__ILorg_eclipse_swt_internal_motif_XmDragProcCallback_2I
(JNIEnv *env, jclass that, jint dest, jobject src, jint count)
{
DECL_GLOB(pGlob)
XmDragProcCallbackStruct xmdragproccallback, *src1=NULL;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "memmove__ILorg_eclipse_swt_internal_motif_XmDragProcCallback_2I\n");
#endif
if (src) {
src1=&xmdragproccallback;
cacheXmdragproccallbackFids(env, src, &PGLOB(XmdragproccallbackFc));
getXmdragproccallbackFields(env, src, src1, &PGLOB(XmdragproccallbackFc));
}
memmove((void *)dest, (void *)src1, count);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: memmove
* Signature: (Lorg/eclipse/swt/internal/motif/XmDragProcCallback;II)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_memmove__Lorg_eclipse_swt_internal_motif_XmDragProcCallback_2II
(JNIEnv *env, jclass that, jobject dest, jint src, jint count)
{
DECL_GLOB(pGlob)
XmDragProcCallbackStruct xmdragproccallback, *dest1=NULL;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "memmove__Lorg_eclipse_swt_internal_motif_XmDragProcCallback_2II\n");
#endif
memmove((void *)&xmdragproccallback, (void *)src, count);
if (dest) {
dest1=&xmdragproccallback;
cacheXmdragproccallbackFids(env, dest, &PGLOB(XmdragproccallbackFc));
setXmdragproccallbackFields(env, dest, dest1, &PGLOB(XmdragproccallbackFc));
}
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: memmove
* Signature: (Lorg/eclipse/swt/internal/motif/XmDropProcCallback;II)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_memmove__Lorg_eclipse_swt_internal_motif_XmDropProcCallback_2II
(JNIEnv *env, jclass that, jobject dest, jint src, jint count)
{
DECL_GLOB(pGlob)
XmDropProcCallbackStruct xmdropproccallback, *dest1=NULL;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "memmove__Lorg_eclipse_swt_internal_motif_XmDropProcCallback_2II\n");
#endif
memmove((void *)&xmdropproccallback, (void *)src, count);
if (dest) {
dest1=&xmdropproccallback;
cacheXmdropproccallbackFids(env, dest, &PGLOB(XmdropproccallbackFc));
setXmdropproccallbackFields(env, dest, dest1, &PGLOB(XmdropproccallbackFc));
}
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: memmove
* Signature: (Lorg/eclipse/swt/internal/motif/XmDropFinishCallback;II)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_memmove__Lorg_eclipse_swt_internal_motif_XmDropFinishCallback_2II
(JNIEnv *env, jclass that, jobject dest, jint src, jint count)
{
DECL_GLOB(pGlob)
XmDropFinishCallbackStruct xmdropfinishcallback, *dest1=NULL;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "memmove__Lorg_eclipse_swt_internal_motif_XmDropFinishCallback_2II\n");
#endif
memmove((void *)&xmdropfinishcallback, (void *)src, count);
if (dest) {
dest1=&xmdropfinishcallback;
cacheXmdropfinishcallbackFids(env, dest, &PGLOB(XmdropfinishcallbackFc));
setXmdropfinishcallbackFields(env, dest, dest1, &PGLOB(XmdropfinishcallbackFc));
}
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: memmove
* Signature: (Lorg/eclipse/swt/internal/motif/XmTextBlockRec;II)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_memmove__Lorg_eclipse_swt_internal_motif_XmTextBlockRec_2II
(JNIEnv *env, jclass that, jobject dest, jint src, jint count)
{
DECL_GLOB(pGlob)
XmTextBlockRec xmTextBlockRec, *dest1=NULL;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "memmove__Lorg_eclipse_swt_internal_motif_XmTextBlockRec_2II\n");
#endif
memmove((void *)&xmTextBlockRec, (void *)src, count);
if (dest) {
dest1=&xmTextBlockRec;
cacheXmtextblockrecFids(env, dest, &PGLOB(XmtextblockrecFc));
setXmtextblockrecFields(env, dest, dest1, &PGLOB(XmtextblockrecFc));
}
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: memmove
* Signature: (Lorg/eclipse/swt/internal/motif/XmTextVerifyCallbackStruct;II)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_memmove__Lorg_eclipse_swt_internal_motif_XmTextVerifyCallbackStruct_2II
(JNIEnv *env, jclass that, jobject dest, jint src, jint count)
{
DECL_GLOB(pGlob)
XmTextVerifyCallbackStruct xmtextverifycallbackstruct, *dest1=NULL;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "memmove__Lorg_eclipse_swt_internal_motif_XmTextVerifyCallbackStruct_2II\n");
#endif
memmove((void *)&xmtextverifycallbackstruct, (void *)src, count);
if (dest) {
dest1=&xmtextverifycallbackstruct;
cacheXmtextverifycallbackstructFids(env, dest, &PGLOB(XmtextverifycallbackstructFc));
setXmtextverifycallbackstructFields(env, dest, dest1, &PGLOB(XmtextverifycallbackstructFc));
}
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: memmove
* Signature: ([BII)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_memmove___3BII
(JNIEnv *env, jclass that, jbyteArray dest, jint src, jint count)
{
jbyte *dest1;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "memmove___3BII\n");
#endif
/* don't do anything if dest pointer is NULL */
if (dest) {
dest1 = (*env)->GetByteArrayElements(env, dest, NULL);
memmove((void *)dest1, (void *)src, count);
(*env)->ReleaseByteArrayElements(env, dest, dest1, 0);
}
}
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_memmove___3CII
(JNIEnv *env, jclass that, jcharArray dest, jint src, jint count)
{
jchar *dest1;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "memmove___3CII\n");
#endif
/* don't do anything if dest pointer is NULL */
if (dest) {
dest1 = (*env)->GetCharArrayElements(env, dest, NULL);
memmove((void *)dest1, (void *)src, count);
(*env)->ReleaseCharArrayElements(env, dest, dest1, 0);
}
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: memmove
* Signature: ([III)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_memmove___3III
(JNIEnv *env, jclass that, jintArray dest, jint src, jint count)
{
jint *dest1;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "memmove___3III\n");
#endif
/* don't do anything if dest pointer is NULL */
if (dest) {
dest1 = (*env)->GetIntArrayElements(env, dest, NULL);
memmove((void *)dest1, (void *)src, count);
(*env)->ReleaseIntArrayElements(env, dest, dest1, 0);
}
}
/* end of custom built crap */
/* ------------------------------------------------------------------------- */
/* the following map directly to X calls */
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XAllocColor
* Signature: (IILorg/eclipse/swt/internal/motif/XColor;)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XAllocColor
(JNIEnv *env, jclass that, jint display, jint colormap, jobject color)
{
DECL_GLOB(pGlob)
XColor xColor, *lpColor=NULL;
jint rc;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XAllocColor\n");
#endif
assert (color != 0);
if (color) {
lpColor = &xColor;
cacheXcolorFids(env, color, &PGLOB(XcolorFc));
getXcolorFields(env, color, lpColor, &PGLOB(XcolorFc));
}
rc = (jint) XAllocColor ((Display *)display, colormap, lpColor);
#ifdef PRINT_FAILED_RCODES
if (rc == 0)
fprintf(stderr, "XAllocColor: call failed rc = %d\n", rc);
#endif
if (color) {
setXcolorFields(env, color, lpColor, &PGLOB(XcolorFc));
}
return rc;
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XBell
* Signature: (II)I
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XBell
(JNIEnv *env, jclass that, jint display, jint ms)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XBell\n");
#endif
XBell ((Display *)display, ms);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XBitmapBitOrder
* Signature: (I)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XBitmapBitOrder
(JNIEnv *env, jclass that, jint display)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XBitmapBitOrder\n");
#endif
return (jint) XBitmapBitOrder((Display *) display);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XBlackPixel
* Signature: (II)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XBlackPixel
(JNIEnv *env, jclass that, jint display, jint screen_number)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XBlackPixel\n");
#endif
return (jint) XBlackPixel((Display *)display, screen_number);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XChangeGC
* Signature: (IIILorg/eclipse/swt/internal/motif/XGCValues;)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XChangeGC
(JNIEnv *env, jclass that, jint display, jint gc, jint valuemask, jobject values)
{
DECL_GLOB(pGlob)
XGCValues xgcValues, *lpxgcValues=NULL;
jint rc;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XChangeGC\n");
#endif
if (values) {
lpxgcValues = &xgcValues;
cacheXgcvaluesFids(env, values, &PGLOB(XgcvaluesFc));
getXgcvaluesFields(env, values, lpxgcValues, &PGLOB(XgcvaluesFc));
}
rc = (jint) XChangeGC((Display *)display, (GC)gc, valuemask, lpxgcValues);
if (values) {
setXgcvaluesFields(env, values, lpxgcValues, &PGLOB(XgcvaluesFc));
}
return rc;
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XChangeWindowAttributes
* Signature: (IIILorg/eclipse/swt/internal/motif/XSetWindowAttributes;)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XChangeWindowAttributes
(JNIEnv *env, jclass that, jint display, jint window, jint mask, jobject attributes)
{
DECL_GLOB(pGlob)
XSetWindowAttributes xSetWindowAttributes, *lpxSetWindowAttributes;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XChangeWindowAttributes\n");
#endif
if (attributes) {
lpxSetWindowAttributes = &xSetWindowAttributes;
cacheXsetwindowattributesFids(env, attributes, &PGLOB(XsetwindowattributesFc));
getXsetwindowattributesFields(env, attributes, lpxSetWindowAttributes, &PGLOB(XsetwindowattributesFc));
}
XChangeWindowAttributes((Display *)display, window, mask, lpxSetWindowAttributes);
if (attributes) {
setXsetwindowattributesFields(env, attributes, lpxSetWindowAttributes, &PGLOB(XsetwindowattributesFc));
}
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XCheckMaskEvent
* Signature: (IILorg/eclipse/swt/internal/motif/XAnyEvent;)Z
*/
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_motif_OS_XCheckMaskEvent
(JNIEnv *env, jclass that, jint display, jint mask, jobject event)
{
DECL_GLOB(pGlob)
XEvent xEvent, *lpxEvent=NULL;
jboolean rc;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XCheckMaskEvent\n");
#endif
if (event) {
lpxEvent = &xEvent;
cacheXanyeventFids(env, event, &PGLOB(XanyeventFc));
getXanyeventFields(env, event, lpxEvent, &PGLOB(XanyeventFc));
}
rc = (jboolean) XCheckMaskEvent((Display *)display, mask, lpxEvent);
#ifdef PRINT_FAILED_RCODES
if (rc != True && rc != False)
fprintf(stderr, "XCheckMaskEvent: call failed rc = %d\n", rc);
#endif
if (event) {
setXanyeventFields(env, event, lpxEvent, &PGLOB(XanyeventFc));
}
return rc;
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XCheckWindowEvent
* Signature: (IIILorg/eclipse/swt/internal/motif/XAnyEvent;)Z
*/
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_motif_OS_XCheckWindowEvent
(JNIEnv *env, jclass that, jint display, jint window, jint mask, jobject event)
{
DECL_GLOB(pGlob)
XEvent xEvent, *lpxEvent=NULL;
jboolean rc;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XCheckWindowEvent\n");
#endif
if (event) {
lpxEvent = &xEvent;
cacheXanyeventFids(env, event, &PGLOB(XanyeventFc));
getXanyeventFields(env, event, lpxEvent, &PGLOB(XanyeventFc));
}
rc = (jboolean)XCheckWindowEvent((Display *)display, window, mask, lpxEvent);
#ifdef PRINT_FAILED_RCODES
if (rc != True && rc != False)
fprintf(stderr, "XCheckWindowEvent: call failed rc = %d\n", rc);
#endif
if (event) {
setXanyeventFields(env, event, lpxEvent, &PGLOB(XanyeventFc));
}
return rc;
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XClearArea
* Signature: (IIIIIIZ)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XClearArea
(JNIEnv *env, jclass that, jint display, jint window, jint x, jint y, jint width, jint height, jboolean exposures)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XClearArea\n");
#endif
XClearArea((Display *)display, window, x, y, width, height, exposures);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XClipBox
* Signature: (ILorg/eclipse/swt/internal/motif/XRectangle;)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XClipBox
(JNIEnv *env, jclass that, jint region, jobject rectangle)
{
DECL_GLOB(pGlob)
XRectangle xRect, *lpxRect=NULL;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XClipBox\n");
#endif
if (rectangle) {
lpxRect = &xRect;
cacheXrectangleFids(env, rectangle, &PGLOB(XrectangleFc));
getXrectangleFields(env, rectangle, lpxRect, &PGLOB(XrectangleFc));
}
XClipBox((Region)region, (XRectangle *)lpxRect);
if (rectangle) {
setXrectangleFields(env, rectangle, lpxRect, &PGLOB(XrectangleFc));
}
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XCopyArea
* Signature: (IIIIIIIIII)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XCopyArea
(JNIEnv *env, jclass that, jint display, jint src, jint dest, jint gc, jint src_x, jint src_y, jint width, jint height, jint dest_x, jint dest_y)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XCopyArea\n");
#endif
XCopyArea((Display *)display, src, dest, (GC)gc, src_x, src_y, width, height, dest_x, dest_y);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XCopyPlane
* Signature: (IIIIIIIIIII)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XCopyPlane
(JNIEnv *env, jclass that, jint display, jint src, jint dest, jint gc, jint src_x, jint src_y, jint width, jint height, jint dest_x, jint dest_y, jint plane)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XCopyPlane\n");
#endif
XCopyPlane((Display *)display, src, dest, (GC)gc, src_x, src_y, width, height, dest_x, dest_y, plane);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XCreateBitmapFromData
* Signature: (II[BII)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XCreateBitmapFromData
(JNIEnv *env, jclass that, jint display, jint drawable, jbyteArray data, jint width, jint height)
{
jbyte *data1=NULL;
jint rc;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XCreateBitmapFromData\n");
#endif
if (data)
data1 = (*env)->GetByteArrayElements(env, data, NULL);
rc = (jint) XCreateBitmapFromData((Display *)display, drawable, (char *)data1, width, height);
#ifdef PRINT_FAILED_RCODES
if (rc == 0)
fprintf(stderr, "XCreateBitmapFromData: call failed rc = %d\n", rc);
#endif
if (data)
(*env)->ReleaseByteArrayElements(env, data, data1, 0);
return rc;
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XCreateFontCursor
* Signature: (II)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XCreateFontCursor
(JNIEnv *env, jclass that, jint display, jint shape)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XCreateFontCursor\n");
#endif
return (jint) XCreateFontCursor((Display *)display, shape);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XCreateGC
* Signature: (IIILorg/eclipse/swt/internal/motif/XGCValues;)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XCreateGC
(JNIEnv *env, jclass that, jint display, jint window, jint mask, jobject values)
{
DECL_GLOB(pGlob)
XGCValues xgcValues, *lpxgcValues=NULL;
jint rc;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XCreateGC\n");
#endif
if (values) {
lpxgcValues = &xgcValues;
cacheXgcvaluesFids(env, values, &PGLOB(XgcvaluesFc));
getXgcvaluesFields(env, values, lpxgcValues, &PGLOB(XgcvaluesFc));
}
rc = (jint) XCreateGC((Display *)display, window, mask, lpxgcValues);
#ifdef PRINT_FAILED_RCODES
if (rc == 0)
fprintf(stderr, "XCreateGC: call failed rc = %d\n", rc);
#endif
if (values) {
setXgcvaluesFields(env, values, lpxgcValues, &PGLOB(XgcvaluesFc));
}
return rc;
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XCreateImage
* Signature: (IIIIIIIIII)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XCreateImage
(JNIEnv *env, jclass that, jint display, jint visual, jint depth, jint format, jint offset, jint data, jint width, jint height, jint bitmap_pad, jint bytes_per_line)
{
jint rc;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XCreateImage\n");
#endif
rc = (jint) XCreateImage((Display *)display, (Visual *)visual, depth, format, offset, (char *)data, width, height, bitmap_pad, bytes_per_line);
#ifdef PRINT_FAILED_RCODES
if (rc == 0)
fprintf(stderr, "XCreateImage: call failed rc = %d\n", rc);
#endif
return rc;
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XCreatePixmap
* Signature: (IIIII)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XCreatePixmap
(JNIEnv *env, jclass that, jint display, jint drawable, jint width, jint height, jint depth)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XCreatePixmap\n");
#endif
return (jint) XCreatePixmap((Display *)display, drawable, width, height, depth);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XCreatePixmapCursor
* Signature: (IIILorg/eclipse/swt/internal/motif/XColor;Lorg/eclipse/swt/internal/motif/XColor;II)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XCreatePixmapCursor
(JNIEnv *env, jclass that, jint display, jint source, jint mask, jobject foreground_color, jobject background_color, jint x, jint y)
{
DECL_GLOB(pGlob)
XColor background_color1, foreground_color1;
XColor *lp_background_color = NULL, *lp_foreground_color = NULL;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XCreatePixmapCursor\n");
#endif
assert(foreground_color != 0);
if (foreground_color) {
lp_foreground_color = &foreground_color1;
cacheXcolorFids(env, foreground_color, &PGLOB(XcolorFc));
getXcolorFields(env, foreground_color, lp_foreground_color, &PGLOB(XcolorFc));
}
if (background_color) {
lp_background_color = &background_color1;
cacheXcolorFids(env, background_color, &PGLOB(XcolorFc));
getXcolorFields(env, background_color, lp_background_color, &PGLOB(XcolorFc));
}
return (jint) XCreatePixmapCursor((Display *)display, (Pixmap)source, (Pixmap)mask, lp_foreground_color, lp_background_color, x, y);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XCreateRegion
* Signature: ()I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XCreateRegion
(JNIEnv *env, jclass that)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XCreateRegion\n");
#endif
return (jint) XCreateRegion();
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XDefaultColormap
* Signature: (II)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XDefaultColormap
(JNIEnv *env, jclass that, jint display, jint screen_number)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XDefaultColormap\n");
#endif
return (jint) XDefaultColormap((Display *)display, screen_number);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XDefaultDepthOfScreen
* Signature: (I)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XDefaultDepthOfScreen
(JNIEnv *env, jclass that, jint screen)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XDefaultDepthOfScreen\n");
#endif
return (jint) XDefaultDepthOfScreen((Screen *)screen);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XDefaultRootWindow
* Signature: (I)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XDefaultRootWindow
(JNIEnv *env, jclass that, jint display)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XDefaultRootWindow\n");
#endif
return (jint) XDefaultRootWindow((Display *)display);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XDefaultScreen
* Signature: (I)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XDefaultScreen
(JNIEnv *env, jclass that, jint display)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XDefaultScreen\n");
#endif
return (jint) XDefaultScreen((Display *)display);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XDefaultScreenOfDisplay
* Signature: (I)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XDefaultScreenOfDisplay
(JNIEnv *env, jclass that, jint display)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XDefaultScreenOfDisplay\n");
#endif
return (jint) XDefaultScreenOfDisplay((Display *)display);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XDefaultVisual
* Signature: (II)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XDefaultVisual
(JNIEnv *env, jclass that, jint display, jint screen_number)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XDefaultVisual\n");
#endif
return (jint) XDefaultVisual((Display *)display, screen_number);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XDefineCursor
* Signature: (III)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XDefineCursor
(JNIEnv *env, jclass that, jint display, jint window, jint cursor)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XDefineCursor\n");
#endif
XDefineCursor((Display *)display, window, cursor);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XDestroyImage
* Signature: (I)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XDestroyImage
(JNIEnv *env, jclass that, jint ximage)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XDestroyImage\n");
#endif
return (jint) XDestroyImage((XImage *)ximage);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XDestroyRegion
* Signature: (I)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XDestroyRegion
(JNIEnv *env, jclass that, jint region)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XDestroyRegion\n");
#endif
XDestroyRegion((Region)region);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XDisplayHeight
* Signature: (II)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XDisplayHeight
(JNIEnv *env, jclass that, jint display, jint screen)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XDisplayHeight\n");
#endif
return (jint) XDisplayHeight((Display *)display, screen);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XDisplayHeightMM
* Signature: (II)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XDisplayHeightMM
(JNIEnv *env, jclass that, jint display, jint screen)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XDisplayHeightMM\n");
#endif
return (jint) XDisplayHeightMM((Display *)display, screen);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XDisplayWidth
* Signature: (II)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XDisplayWidth
(JNIEnv *env, jclass that, jint display, jint screen)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XDisplayWidth\n");
#endif
return (jint) XDisplayWidth((Display *)display, screen);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XDisplayWidthMM
* Signature: (II)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XDisplayWidthMM
(JNIEnv *env, jclass that, jint display, jint screen)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XDisplayWidthMM\n");
#endif
return (jint) XDisplayWidthMM((Display *)display, screen);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XDrawArc
* Signature: (IIIIIIIII)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XDrawArc
(JNIEnv *env, jclass that, jint display, jint drawable, jint gc, jint x1, jint y1, jint x2, jint y2, jint a1, jint a2)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XDrawArc\n");
#endif
XDrawArc((Display *)display, drawable, (GC)gc, x1, y1, x2, y2, a1, a2);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XDrawLine
* Signature: (IIIIIII)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XDrawLine
(JNIEnv *env, jclass that, jint display, jint drawable, jint gc, jint x1, jint y1, jint x2, jint y2)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XDrawLine\n");
#endif
XDrawLine((Display *)display, drawable, (GC)gc, x1, y1, x2, y2);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XDrawLines
* Signature: (III[SII)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XDrawLines
(JNIEnv *env, jclass that, jint display, jint drawable, jint gc, jshortArray xPoints, jint nPoints, jint mode)
{
jshort *xPoints1=NULL;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XDrawLines\n");
#endif
if (xPoints)
xPoints1 = (*env)->GetShortArrayElements(env, xPoints, NULL);
XDrawLines((Display *)display, drawable, (GC)gc, (XPoint *)xPoints1, nPoints, mode);
if (xPoints)
(*env)->ReleaseShortArrayElements(env, xPoints, xPoints1, 0);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XDrawRectangle
* Signature: (IIIIIII)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XDrawRectangle
(JNIEnv *env, jclass that, jint display, jint drawable, jint gc, jint x, jint y, jint width, jint height)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "\n");
#endif
XDrawRectangle((Display *)display, drawable, (GC)gc, x, y, width, height);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XEmptyRegion
* Signature: (I)Z
*/
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_motif_OS_XEmptyRegion
(JNIEnv *env, jclass that, jint region)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XEmptyRegion\n");
#endif
return (jboolean) XEmptyRegion((Region)region);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XEqualRegion
* Signature: (II)Z
*/
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_motif_OS_XEqualRegion
(JNIEnv *env, jclass that, jint region1, jint region2)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XEqualRegion\n");
#endif
return (jboolean) XEqualRegion((Region)region1, (Region)region2);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XFillArc
* Signature: (IIIIIIIII)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XFillArc
(JNIEnv *env, jclass that, jint display, jint drawable, jint gc, jint x1, jint y1, jint x2, jint y2, jint a1, jint a2)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XFillArc\n");
#endif
XFillArc((Display *)display, drawable, (GC)gc, x1, y1, x2, y2, a1, a2);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XFillPolygon
* Signature: (III[SIII)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XFillPolygon
(JNIEnv *env, jclass that, jint display, jint drawable, jint gc, jshortArray xPoints, jint nPoints, jint mode, jint style)
{
jshort *xPoints1=NULL;
jint rc;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XFillPolygon\n");
#endif
if (xPoints)
xPoints1 = (*env)->GetShortArrayElements(env, xPoints, NULL);
rc = XFillPolygon((Display *)display, drawable, (GC)gc, (XPoint *)xPoints1, nPoints, mode, style);
if (xPoints)
(*env)->ReleaseShortArrayElements(env, xPoints, xPoints1, 0);
return rc;
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XFillRectangle
* Signature: (IIIIIII)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XFillRectangle
(JNIEnv *env, jclass that, jint display, jint drawable, jint gc, jint x, jint y, jint width, jint height)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XFillRectangle\n");
#endif
XFillRectangle((Display *)display, drawable, (GC)gc, x, y, width, height);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XFilterEvent
* Signature: (Lorg/eclipse/swt/internal/motif/XAnyEvent;I)Z
*/
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_motif_OS_XFilterEvent
(JNIEnv *env, jclass that, jobject event, jint window)
{
DECL_GLOB(pGlob)
XEvent xanyevent, *event1;
jboolean rc;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XFilterEvent\n");
#endif
if (event) {
event1=&xanyevent;
cacheXanyeventFids(env, event, &PGLOB(XanyeventFc));
getXanyeventFields(env, event, event1, &PGLOB(XanyeventFc));
}
rc = (jboolean) XFilterEvent(event1, (Window)window);
if (event) {
setXanyeventFields(env, event, event1, &PGLOB(XanyeventFc));
}
return rc;
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XFlush
* Signature: (I)I
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XFlush
(JNIEnv *env, jclass that, jint display)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XFlush\n");
#endif
XFlush((Display *)display);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XFontsOfFontSet
* Signature: (I[I[I)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XFontsOfFontSet
(JNIEnv *env, jclass that, jint fontSet, jintArray fontStructs, jintArray fontNames)
{
jint *fontStructs1=NULL,*fontNames1=NULL;
jint rc;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XFontsOfFontSet\n");
#endif
if (fontStructs)
fontStructs1 = (*env)->GetIntArrayElements(env, fontStructs, NULL);
if (fontNames)
fontNames1 = (*env)->GetIntArrayElements(env, fontNames, NULL);
rc = (jint) XFontsOfFontSet((XFontSet)fontSet, (XFontStruct ***)fontStructs1, (char ***)fontNames1);
if (fontStructs)
(*env)->ReleaseIntArrayElements(env, fontStructs, fontStructs1, 0);
if (fontNames)
(*env)->ReleaseIntArrayElements(env, fontNames, fontNames1, 0);
return rc;
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XFree
* Signature: (I)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XFree
(JNIEnv *env, jclass that, jint address)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XFree\n");
#endif
return (jint) XFree((char *)address);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XFreeColors
* Signature: (II[III)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XFreeColors
(JNIEnv *env, jclass that, jint display, jint colormap, jintArray pixels, jint npixels, jint planes)
{
jint *pixels1=NULL;
jint rc;
jint intArr[2]={250, 250};
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XFreeColors\n");
#endif
assert(pixels != 0);
assert(npixels > 0);
assert(npixels < 20);
if (pixels) {
pixels1 = (jint *)&intArr;
(*env)->GetIntArrayRegion(env, pixels, 0, npixels, pixels1);
}
assert(*pixels1 >= 0);
assert(*pixels1 < 65536);
assert(*(pixels1+1) >= 0);
assert(*(pixels1+1) < 65536);
rc = (jint) XFreeColors((Display *)display, colormap, (unsigned long *)pixels1, npixels, planes);
#ifdef PRINT_FAILED_RCODES
if (rc == 0)
fprintf(stderr, "XCreateGC: call failed rc = %d\n", rc);
#endif
assert(rc > 0);
if (pixels) {
(*env)->SetIntArrayRegion(env, pixels, 0, npixels, pixels1);
}
return rc;
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XFreeCursor
* Signature: (II)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XFreeCursor
(JNIEnv *env, jclass that, jint display, jint pixmap)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XFreeCursor\n");
#endif
XFreeCursor((Display *)display, pixmap);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XFreeFont
* Signature: (II)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XFreeFont
(JNIEnv *env, jclass that, jint display, jint font_struct)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XFreeFont\n");
#endif
XFreeFont((Display *)display, (XFontStruct *)font_struct);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XFreeFontSet
* Signature: (II)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XFreeFontSet
(JNIEnv *env, jclass that, jint display, jint font_set)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XFreeFontSet\n");
#endif
XFreeFontSet((Display *)display, (XFontSet)font_set);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XFreeFontNames
* Signature: (I)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XFreeFontNames
(JNIEnv *env, jclass that, jint list)
{
XFreeFontNames((char **)list);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XFreeGC
* Signature: (II)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XFreeGC
(JNIEnv *env, jclass that, jint display, jint gc)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XFreeGC\n");
#endif
XFreeGC((Display *)display, (GC)gc);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XFreePixmap
* Signature: (II)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XFreePixmap
(JNIEnv *env, jclass that, jint display, jint pixmap)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XFreePixmap\n");
#endif
XFreePixmap((Display *)display, pixmap);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XGetGCValues
* Signature: (IIILorg/eclipse/swt/internal/motif/XGCValues;)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XGetGCValues
(JNIEnv *env, jclass that, jint display, jint gc, jint valuemask, jobject values)
{
DECL_GLOB(pGlob)
XGCValues xgcValues, *lpxgcValues=NULL;
jint rc;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XGetGCValues\n");
#endif
if (values) {
lpxgcValues = &xgcValues;
cacheXgcvaluesFids(env, values, &PGLOB(XgcvaluesFc));
getXgcvaluesFields(env, values, lpxgcValues, &PGLOB(XgcvaluesFc));
}
rc = (jint) XGetGCValues((Display *)display, (GC)gc, valuemask, lpxgcValues);
#ifdef PRINT_FAILED_RCODES
if (rc == 0)
fprintf(stderr, "XGetGCValues: call failed rc = %d\n", rc);
#endif
if (values) {
setXgcvaluesFields(env, values, lpxgcValues, &PGLOB(XgcvaluesFc));
}
return rc;
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XGetGeometry
* Signature: (II[I[I[I[I[I[I[I)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XGetGeometry
(JNIEnv *env, jclass that, jint display, jint drawable, jintArray root_return, jintArray x_return, jintArray y_return, jintArray width_return, jintArray height_return, jintArray border_width_return, jintArray depth_return)
{
jint *root_return1=NULL, *x_return1=NULL, *y_return1=NULL, *width_return1=NULL, *height_return1=NULL, *border_width_return1=NULL, *depth_return1=NULL;
jint rc;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XGetGeometry\n");
#endif
if (root_return)
root_return1 = (*env)->GetIntArrayElements(env, root_return, NULL);
if (x_return)
x_return1 = (*env)->GetIntArrayElements(env, x_return, NULL);
if (y_return)
y_return1 = (*env)->GetIntArrayElements(env, y_return, NULL);
if (width_return)
width_return1 = (*env)->GetIntArrayElements(env, width_return, NULL);
if (height_return)
height_return1 = (*env)->GetIntArrayElements(env, height_return, NULL);
if (border_width_return)
border_width_return1 = (*env)->GetIntArrayElements(env, border_width_return, NULL);
if (depth_return)
depth_return1 = (*env)->GetIntArrayElements(env, depth_return, NULL);
rc = (jint) XGetGeometry((Display *)display, drawable, (Window *)root_return1, (int *)x_return1, (int *)y_return1, (unsigned int *)width_return1, (unsigned int *)height_return1, (unsigned int *)border_width_return1, (unsigned int *)depth_return1);
#ifdef PRINT_FAILED_RCODES
if (rc == 0)
fprintf(stderr, "XGetGeometry: call failed rc = %d\n", rc);
#endif
if (root_return)
(*env)->ReleaseIntArrayElements(env, root_return, root_return1, 0);
if (x_return)
(*env)->ReleaseIntArrayElements(env, x_return, x_return1, 0);
if (y_return)
(*env)->ReleaseIntArrayElements(env, y_return, y_return1, 0);
if (width_return)
(*env)->ReleaseIntArrayElements(env, width_return, width_return1, 0);
if (height_return)
(*env)->ReleaseIntArrayElements(env, height_return, height_return1, 0);
if (border_width_return)
(*env)->ReleaseIntArrayElements(env, border_width_return, border_width_return1, 0);
if (depth_return)
(*env)->ReleaseIntArrayElements(env, depth_return, depth_return1, 0);
return rc;
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XGetImage
* Signature: (IIIIIIII)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XGetImage
(JNIEnv *env, jclass that, jint display, jint drawable, jint x, jint y, jint width, jint height, jint plane_mask, jint format)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XGetImage\n");
#endif
return (jint) XGetImage((Display *)display, (Drawable)drawable, x, y, width, height, plane_mask, format);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XGetInputFocus
* Signature: (I[I[I)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XGetInputFocus
(JNIEnv *env, jclass that, jint display, jintArray window, jintArray revert)
{
jint *window1, *revert1;
jint rc;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XGetInputFocus\n");
#endif
if (window)
window1 = (*env)->GetIntArrayElements(env, window, NULL);
if (revert)
revert1 = (*env)->GetIntArrayElements(env, revert, NULL);
rc = (jint) XGetInputFocus((Display *)display, (Window *)window1, (int *)revert1);
#ifdef PRINT_FAILED_RCODES
if (rc == 0)
fprintf(stderr, "XGetInputFocus: call failed rc = %d\n", rc);
#endif
if (window)
(*env)->ReleaseIntArrayElements(env, window, window1, 0);
if (revert)
(*env)->ReleaseIntArrayElements(env, revert, revert1, 0);
return rc;
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XGetWindowAttributes
* Signature: (IILorg/eclipse/swt/internal/motif/XWindowAttributes;)Z
*/
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_motif_OS_XGetWindowAttributes
(JNIEnv *env, jclass that, jint display, jint window, jobject attributes)
{
DECL_GLOB(pGlob)
XWindowAttributes xWindowAttributes, *lpxWindowAttributes;
jboolean rc;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XGetWindowAttributes\n");
#endif
if (attributes) {
lpxWindowAttributes = &xWindowAttributes;
cacheXwindowattributesFids(env, attributes, &PGLOB(XwindowattributesFc));
getXwindowattributesFields(env, attributes, lpxWindowAttributes, &PGLOB(XwindowattributesFc));
}
rc = (jboolean) XGetWindowAttributes((Display *)display, window, lpxWindowAttributes);
#ifdef PRINT_FAILED_RCODES
if (rc == 0)
fprintf(stderr, "XGetWindowAttributes: call failed rc = %d\n", rc);
#endif
if (attributes) {
setXwindowattributesFields(env, attributes, lpxWindowAttributes, &PGLOB(XwindowattributesFc));
}
return rc;
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XGrabPointer
* Signature: (IIIIIIIII)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XGrabPointer
(JNIEnv *env, jclass that, jint display, jint grabWindow, jint ownerEvents, jint eventMask,
jint PointerMode, jint KeyboardMode, jint confineToWindow, jint cursor, jint time)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XGrabPointer\n");
#endif
return (jint) XGrabPointer((Display *)display, grabWindow, ownerEvents, eventMask, PointerMode,
KeyboardMode, confineToWindow, cursor, time);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XInternAtom
* Signature: (I[BZ)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XInternAtom
(JNIEnv *env, jclass that, jint display, jbyteArray name, jboolean ifExists)
{
jbyte *name1 = NULL;
jint rc;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XInternAtom\n");
#endif
if (name)
name1 = (*env)->GetByteArrayElements(env, name, NULL);
rc = (jint) XInternAtom((Display *)display, (char *)name1, ifExists);
#ifdef PRINT_FAILED_RCODES
if (rc == 0)
fprintf(stderr, "XInternAtom: call failed rc = %d\n", rc);
#endif
if (name)
(*env)->ReleaseByteArrayElements(env, name, name1, 0);
return rc;
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XKeysymToString
* Signature: (I)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XKeysymToString
(JNIEnv *env, jclass that, jint keysym)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XKeysymToString\n");
#endif
return (jint) XKeysymToString(keysym);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XListFonts
* Signature: (I[BI[I)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XListFonts
(JNIEnv *env, jclass that, jint display, jbyteArray pattern, jint maxnames, jintArray actual_count_return)
{
jbyte *pattern1 = NULL;
jint *actual_count_return1=NULL;
jint rc;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XListFonts\n");
#endif
if (pattern)
pattern1 = (*env)->GetByteArrayElements(env, pattern, NULL);
if (actual_count_return)
actual_count_return1 = (*env)->GetIntArrayElements(env, actual_count_return, NULL);
rc = (jint) XListFonts((Display *)display, (char *)pattern1, maxnames, (int *)actual_count_return1);
#ifdef PRINT_FAILED_RCODES
if (rc == 0)
fprintf(stderr, "XListFonts: call failed rc = %d\n", rc);
#endif
if (pattern)
(*env)->ReleaseByteArrayElements(env, pattern, pattern1, 0);
if (actual_count_return)
(*env)->ReleaseIntArrayElements(env, actual_count_return, actual_count_return1, 0);
return rc;
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XListProperties
* Signature: (II[I)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XListProperties
(JNIEnv *env, jclass that, jint display, jint window, jintArray num_prop_return)
{
jint *num_prop_return1=NULL;
jint rc;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XListProperties\n");
#endif
if (num_prop_return)
num_prop_return1 = (*env)->GetIntArrayElements(env, num_prop_return, NULL);
rc = (jint) XListProperties((Display *)display, (Window)window, (int *)num_prop_return1);
#ifdef PRINT_FAILED_RCODES
if (rc == 0)
fprintf(stderr, "XListProperties: call failed rc = %d\n", rc);
#endif
if (num_prop_return)
(*env)->ReleaseIntArrayElements(env, num_prop_return, num_prop_return1, 0);
return rc;
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XLookupString
* Signature: (Lorg/eclipse/swt/internal/motif/XKeyEvent;[BI[I[I)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XLookupString
(JNIEnv *env, jclass that, jobject keyEvent, jbyteArray string, jint size, jintArray keysym, jintArray status)
{
DECL_GLOB(pGlob)
XEvent xEvent, *lpxEvent=NULL;
jint *keysym1=NULL, *status1=NULL;
jbyte *string1=NULL;
jint rc;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XLookupString\n");
#endif
if (keyEvent) {
lpxEvent = &xEvent;
cacheXkeyeventFids(env, keyEvent, &PGLOB(XkeyeventFc));
getXkeyeventFields(env, keyEvent, lpxEvent, &PGLOB(XkeyeventFc));
}
if (string)
string1 = (*env)->GetByteArrayElements(env, string, NULL);
if (keysym)
keysym1 = (*env)->GetIntArrayElements(env, keysym, NULL);
if (status)
status1 = (*env)->GetIntArrayElements(env, status, NULL);
rc = (jint) XLookupString((XKeyEvent *)lpxEvent, (char *)string1, size, (KeySym *)keysym1, (XComposeStatus *)status1);
#ifdef PRINT_FAILED_RCODES
if (rc < 0)
fprintf(stderr, "XLookupString: call failed rc = %d\n", rc);
#endif
if (string)
(*env)->ReleaseByteArrayElements(env, string, string1, 0);
if (keysym)
(*env)->ReleaseIntArrayElements(env, keysym, keysym1, 0);
if (status)
(*env)->ReleaseIntArrayElements(env, status, status1, 0);
if (keyEvent) {
setXkeyeventFields(env, keyEvent, lpxEvent, &PGLOB(XkeyeventFc));
}
return rc;
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XLowerWindow
* Signature: (II)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XLowerWindow
(JNIEnv *env, jclass that, jint display, jint window)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XLowerWindow\n");
#endif
return (jint) XLowerWindow((Display *)display, window);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XPointInRegion
* Signature: (III)Z
*/
JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_motif_OS_XPointInRegion
(JNIEnv *env, jclass that, jint region, jint x, jint y)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XPointInRegion\n");
#endif
return (jboolean) XPointInRegion((Region)region, x, y);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XPutImage
* Signature: (IIIIIIIIII)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XPutImage
(JNIEnv *env, jclass that, jint display, jint drawable, jint gc, jint image, jint srcX, jint srcY, jint destX, jint destY, jint width, jint height)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XPutImage\n");
#endif
return (jint) XPutImage((Display *)display, drawable, (GC)gc, (XImage *)image, srcX, srcY, destX, destY, width, height);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XQueryColor
* Signature: (IILorg/eclipse/swt/internal/motif/XColor;)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XQueryColor
(JNIEnv *env, jclass that, jint display, jint colormap, jobject color)
{
DECL_GLOB(pGlob)
XColor xColor, *lpColor=NULL;
jint rc;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XQueryColor\n");
#endif
if (color) {
lpColor = &xColor;
cacheXcolorFids(env, color, &PGLOB(XcolorFc));
getXcolorFields(env, color, lpColor, &PGLOB(XcolorFc));
}
rc = (jint) XQueryColor((Display *)display, colormap, lpColor);
#ifdef PRINT_FAILED_RCODES
if (rc == 0)
fprintf(stderr, "XQueryColor: call failed rc = %d\n", rc);
#endif
if (color) {
setXcolorFields(env, color, lpColor, &PGLOB(XcolorFc));
}
return rc;
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XQueryPointer
* Signature: (II[I[I[I[I[I[I[I)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XQueryPointer
(JNIEnv *env, jclass that, jint display, jint window, jintArray root, jintArray child,
jintArray rootX, jintArray rootY, jintArray windowX, jintArray windowY, jintArray mask)
{
jint *root1=NULL, *child1=NULL, *rootX1=NULL, *rootY1=NULL, *windowX1=NULL, *windowY1=NULL, *mask1=NULL;
jint rc;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XQueryPointer\n");
#endif
if (root)
root1 = (*env)->GetIntArrayElements(env, root, NULL);
if (child)
child1 = (*env)->GetIntArrayElements(env, child, NULL);
if (rootX)
rootX1 = (*env)->GetIntArrayElements(env, rootX, NULL);
if (rootY)
rootY1 = (*env)->GetIntArrayElements(env, rootY, NULL);
if (windowX)
windowX1 = (*env)->GetIntArrayElements(env, windowX, NULL);
if (windowY)
windowY1 = (*env)->GetIntArrayElements(env, windowY, NULL);
if (mask)
mask1 = (*env)->GetIntArrayElements(env, mask, NULL);
rc = (jint) XQueryPointer((Display *)display, window, (Window *)root1, (Window *)child1, (int *)rootX1, (int *)rootY1, (int *)windowX1, (int *)windowY1, (unsigned int *)mask1);
#ifdef PRINT_FAILED_RCODES
if (rc == 0)
fprintf(stderr, "XQueryPointer: call failed rc = %d\n", rc);
#endif
if (root)
(*env)->ReleaseIntArrayElements(env, root, root1, 0);
if (child)
(*env)->ReleaseIntArrayElements(env, child, child1, 0);
if (rootX)
(*env)->ReleaseIntArrayElements(env, rootX, rootX1, 0);
if (rootY)
(*env)->ReleaseIntArrayElements(env, rootY, rootY1, 0);
if (windowX)
(*env)->ReleaseIntArrayElements(env, windowX, windowX1, 0);
if (windowY)
(*env)->ReleaseIntArrayElements(env, windowY, windowY1, 0);
if (mask)
(*env)->ReleaseIntArrayElements(env, mask, mask1, 0);
return rc;
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XQueryTree
* Signature: (II[I[I[I[I)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XQueryTree
(JNIEnv *env, jclass that, jint display, jint window, jintArray root_return, jintArray parent_return, jintArray children_return, jintArray nChildren_return)
{
jint *root_return1=NULL, *parent_return1=NULL, *children_return1=NULL, *nChildren_return1=NULL;
jint rc;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XQueryTree\n");
#endif
if (root_return)
root_return1 = (*env)->GetIntArrayElements(env, root_return, NULL);
if (parent_return)
parent_return1 = (*env)->GetIntArrayElements(env, parent_return, NULL);
if (children_return)
children_return1 = (*env)->GetIntArrayElements(env, children_return, NULL);
if (nChildren_return)
nChildren_return1 = (*env)->GetIntArrayElements(env, nChildren_return, NULL);
rc = (jint) XQueryTree((Display *)display, window, (Window *)root_return1, (Window *)parent_return1, (Window **)children_return1, (unsigned int *)nChildren_return1);
#ifdef PRINT_FAILED_RCODES
if (rc == 0)
fprintf(stderr, "XQueryTree: call failed rc = %d\n", rc);
#endif
if (root_return)
(*env)->ReleaseIntArrayElements(env, root_return, root_return1, 0);
if (parent_return)
(*env)->ReleaseIntArrayElements(env, parent_return, parent_return1, 0);
if (children_return)
(*env)->ReleaseIntArrayElements(env, children_return, children_return1, 0);
if (nChildren_return)
(*env)->ReleaseIntArrayElements(env, nChildren_return, nChildren_return1, 0);
return rc;
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XRaiseWindow
* Signature: (II)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XRaiseWindow
(JNIEnv *env, jclass that, jint display, jint window)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XRaiseWindow\n");
#endif
return (jint) XRaiseWindow((Display *)display, window);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XReconfigureWMWindow
* Signature: (IIIILorg/eclipse/swt/internal/motif/XWindowChanges;)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XReconfigureWMWindow
(JNIEnv *env, jclass that, jint display, jint window, jint screen, jint valueMask, jobject values)
{
DECL_GLOB(pGlob)
XWindowChanges xWindowChanges, *lpWindowChanges1=NULL;
jint rc;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XReconfigureWMWindow\n");
#endif
if (values) {
lpWindowChanges1 = &xWindowChanges;
cacheXwindowchangesFids(env, values, &PGLOB(XwindowchangesFc));
getXwindowchangesFields(env, values, lpWindowChanges1, &PGLOB(XwindowchangesFc));
}
rc = (jint) XReconfigureWMWindow((Display *)display, window, screen, valueMask, lpWindowChanges1);
#ifdef PRINT_FAILED_RCODES
if (rc == 0)
fprintf(stderr, "XReconfigureWMWindow: call failed rc = %d\n", rc);
#endif
if (values) {
setXwindowchangesFields(env, values, lpWindowChanges1, &PGLOB(XwindowchangesFc));
}
return rc;
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XRectInRegion
* Signature: (IIIII)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XRectInRegion
(JNIEnv *env, jclass that, jint region, jint x, jint y, jint width, jint height)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XRectInRegion\n");
#endif
return (jint) XRectInRegion((Region)region, x, y, width, height);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XSetBackground
* Signature: (III)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XSetBackground
(JNIEnv *env, jclass that, jint display, jint gc, jint background)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XSetBackground\n");
#endif
XSetBackground((Display *)display, (GC)gc, background);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XSetClipMask
* Signature: (III)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XSetClipMask
(JNIEnv *env, jclass that, jint display, jint gc, jint pixmap)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XSetClipMask\n");
#endif
XSetClipMask((Display *)display, (GC)gc, pixmap);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XSetClipRectangles
* Signature: (IIIILorg/eclipse/swt/internal/motif/XRectangle;II)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XSetClipRectangles
(JNIEnv *env, jclass that, jint display, jint gc, jint clip_x_origin, jint clip_y_origin, jobject rectangle, jint n, jint ordering)
{
DECL_GLOB(pGlob)
XRectangle xRect, *lpxRect=NULL;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XSetClipRectangles\n");
#endif
if (rectangle) {
lpxRect = &xRect;
cacheXrectangleFids(env, rectangle, &PGLOB(XrectangleFc));
getXrectangleFields(env, rectangle, lpxRect, &PGLOB(XrectangleFc));
}
XSetClipRectangles((Display *)display, (GC)gc, clip_x_origin, clip_y_origin, lpxRect, n, ordering);
if (rectangle) {
setXrectangleFields(env, rectangle, lpxRect, &PGLOB(XrectangleFc));
}
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XSetDashes
* Signature: (III[BI)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XSetDashes
(JNIEnv *env, jclass that, jint display, jint gc, jint dash_offset, jbyteArray dash_list, jint n)
{
jbyte *dash_list1=NULL;
jint rc;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XSetDashes\n");
#endif
if (dash_list)
dash_list1 = (*env)->GetByteArrayElements(env, dash_list, NULL);
rc = (jint) XSetDashes((Display *)display, (GC)gc, dash_offset, (char *)dash_list1, n);
#ifdef PRINT_FAILED_RCODES
if (rc == 0)
fprintf(stderr, "XSetDashes: call failed rc = %d\n", rc);
#endif
if (dash_list)
(*env)->ReleaseByteArrayElements(env, dash_list, dash_list1, 0);
return rc;
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XSetErrorHandler
* Signature: (I)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XSetErrorHandler
(JNIEnv *env, jclass that, jint handler)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XSetErrorHandler\n");
#endif
return (jint) XSetErrorHandler((XErrorHandler)handler);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XSetFillStyle
* Signature: (III)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XSetFillStyle
(JNIEnv *env, jclass that, jint display, jint gc, jint fill_style)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XSetFillStyle\n");
#endif
XSetFillStyle((Display*)display, (GC)gc, fill_style);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XSetFont
* Signature: (III)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XSetFont
(JNIEnv *env, jclass that, jint display, jint gc, jint font)
{
return (jint) XSetFont((Display *)display, (GC)gc, (Font)font);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XSetForeground
* Signature: (III)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XSetForeground
(JNIEnv *env, jclass that, jint display, jint gc, jint foreground)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XSetForeground\n");
#endif
XSetForeground((Display *)display, (GC)gc, foreground);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XSetFunction
* Signature: (III)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XSetFunction
(JNIEnv *env, jclass that, jint display, jint gc, jint function)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XSetFunction\n");
#endif
XSetFunction((Display *)display, (GC)gc, function);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XSetGraphicsExposures
* Signature: (IIZ)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XSetGraphicsExposures
(JNIEnv *env, jclass that, jint display, jint gc, jboolean graphics_exposures)
{
XSetGraphicsExposures((Display *)display, (GC)gc, (Bool) graphics_exposures);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XSetInputFocus
* Signature: (IIII)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XSetInputFocus
(JNIEnv *env, jclass that, jint display, jint window, jint revert, jint time)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XSetInputFocus\n");
#endif
return (jint) XSetInputFocus((Display *)display, window, revert, time);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XSetLineAttributes
* Signature: (IIIIII)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XSetLineAttributes
(JNIEnv *env, jclass that, jint display, jint gc, jint lineWidth, jint lineStyle, jint capStyle, jint joinStyle)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XSetLineAttributes\n");
#endif
return (jint) XSetLineAttributes((Display *)display, (GC)gc, lineWidth, lineStyle, capStyle, joinStyle);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XSetRegion
* Signature: (III)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XSetRegion
(JNIEnv *env, jclass that, jint display, jint gc, jint region)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XSetRegion\n");
#endif
XSetRegion((Display *)display, (GC)gc, (Region)region);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XSetStipple
* Signature: (III)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XSetStipple
(JNIEnv *env, jclass that, jint display, jint gc, jint pixmap)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XSetStipple\n");
#endif
XSetStipple((Display*)display, (GC)gc, pixmap);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XSetSubwindowMode
* Signature: (III)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XSetSubwindowMode
(JNIEnv *env, jclass that, jint display, jint gc, jint subwindow_mode)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XSetSubwindowMode\n");
#endif
XSetSubwindowMode((Display*)display, (GC)gc, subwindow_mode);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XSetWindowBorderWidth
* Signature: (III)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XSetWindowBorderWidth
(JNIEnv *env, jclass that, jint display, jint window, jint width)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XSetWindowBorderWidth\n");
#endif
XSetWindowBorderWidth((Display *)display, window, width);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XSubtractRegion
* Signature: (III)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XSubtractRegion
(JNIEnv *env, jclass that, jint sra, jint srb, jint da_return)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XSubtractRegion\n");
#endif
XSubtractRegion((Region)sra, (Region)srb, (Region)da_return);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XSync
* Signature: (IZ)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XSync
(JNIEnv *env, jclass that, jint display, jboolean discard)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XSync\n");
#endif
XSync((Display *)display, (Bool)discard);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XSynchronize
* Signature: (IZ)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XSynchronize
(JNIEnv *env, jclass that, jint display, jboolean onoff)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XSynchronize\n");
#endif
return (jint) XSynchronize((Display *)display, (Bool)onoff);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XUndefineCursor
* Signature: (II)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XUndefineCursor
(JNIEnv *env, jclass that, jint display, jint window)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XUndefineCursor\n");
#endif
XUndefineCursor((Display *)display, window);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XUngrabPointer
* Signature: (II)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XUngrabPointer
(JNIEnv *env, jclass that, jint display, jint time)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XUngrabPointer\n");
#endif
return (jint) XUngrabPointer((Display *)display, time);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XUnionRectWithRegion
* Signature: (Lorg/eclipse/swt/internal/motif/XRectangle;II)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XUnionRectWithRegion
(JNIEnv *env, jclass that, jobject rectangle, jint src_region, jint dest_region)
{
DECL_GLOB(pGlob)
XRectangle xRect, *lpxRect=NULL;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XUnionRectWithRegion\n");
#endif
if (rectangle) {
lpxRect = &xRect;
cacheXrectangleFids(env, rectangle, &PGLOB(XrectangleFc));
getXrectangleFields(env, rectangle, lpxRect, &PGLOB(XrectangleFc));
}
XUnionRectWithRegion(lpxRect, (Region)src_region, (Region)dest_region);
if (rectangle) {
setXrectangleFields(env, rectangle, lpxRect, &PGLOB(XrectangleFc));
}
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XUnionRegion
* Signature: (III)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XUnionRegion
(JNIEnv *env, jclass that, jint sra, jint srb, jint dr_return)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XUnionRegion\n");
#endif
XUnionRegion((Region)sra, (Region)srb, (Region)dr_return);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XWarpPointer
* Signature: (IIIIIIIII)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XWarpPointer
(JNIEnv *env, jclass that, jint display, jint src_w, jint dest_w, jint src_x, jint src_y, jint src_width, jint src_height, jint dest_x, jint dest_y)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XWarpPointer\n");
#endif
XWarpPointer((Display *)display, src_w, dest_w, src_x, src_y, src_width, src_height, dest_x, dest_y);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XWhitePixel
* Signature: (II)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XWhitePixel
(JNIEnv *env, jclass that, jint display, jint screenNum)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XWhitePixel\n");
#endif
return (jint) XWhitePixel((Display *)display, screenNum);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XWithdrawWindow
* Signature: (III)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XWithdrawWindow
(JNIEnv *env, jclass that, jint display, jint window, jint screen)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XWithdrawWindow\n");
#endif
XWithdrawWindow((Display *)display, (Window)window, screen);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XmAddWMProtocolCallback
* Signature: (IIII)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XmAddWMProtocolCallback
(JNIEnv *env, jclass that, jint shell, jint protocol, jint callback, jint closure)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XmAddWMProtocolCallback\n");
#endif
XmAddWMProtocolCallback((Widget)shell, (Atom)protocol, (XtCallbackProc)callback, (XtPointer)closure);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XmChangeColor
* Signature: (II)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XmChangeColor
(JNIEnv *env, jclass that, jint widget, jint pixel)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XmChangeColor\n");
#endif
XmChangeColor((Widget)widget, pixel);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XmComboBoxAddItem
* Signature: (IIIZ)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XmComboBoxAddItem
(JNIEnv *env, jclass that, jint combo, jint xmString, jint position, jboolean unique)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XmComboBoxAddItem\n");
#endif
XmComboBoxAddItem((Widget)combo, (XmString) xmString, position, unique);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XmComboBoxDeletePos
* Signature: (II)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XmComboBoxDeletePos
(JNIEnv *env, jclass that, jint combo, jint position)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XmComboBoxDeletePos\n");
#endif
XmComboBoxDeletePos((Widget)combo, position);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XmComboBoxSelectItem
* Signature: (II)V
*/
JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_motif_OS_XmComboBoxSelectItem
(JNIEnv *env, jclass that, jint combo, jint xmString)
{
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XmComboBoxSelectItem\n");
#endif
XmComboBoxSelectItem((Widget)combo, (XmString) xmString);
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XmCreateArrowButton
* Signature: (I[B[II)I
*/
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_motif_OS_XmCreateArrowButton
(JNIEnv *env, jclass that, jint parent, jbyteArray name, jintArray argList, jint argcount)
{
jint *name1=NULL, *argList1=NULL;
jint rc;
#ifdef DEBUG_CALL_PRINTS
fprintf(stderr, "XmCreateArrowButton\n");
#endif
if (name)
name1 = (*env)->GetIntArrayElements(env, name, NULL);
if (argList)
argList1 = (*env)->GetIntArrayElements(env, argList, NULL);
rc = (jint) XmCreateArrowButton((Widget)parent, (char *)name1, (ArgList)argList1, argcount);
#ifdef PRINT_FAILED_RCODES
if (rc == 0)
fprintf(stderr, "XmCreateArrowButton: call failed rc = %d\n", rc);
#endif
if (name)
(*env)->ReleaseIntArrayElements(env, name, name1, 0);
if (argList)
(*env)->ReleaseIntArrayElements(env, argList, argList1, 0);
return rc;
}
/*
* Class: org_eclipse_swt_internal_motif_OS
* Method: XmCreateCascadeButtonGadget
* Signature: (I[B[II)I
*/