/*
 * Java-Gnome Bindings Library
 *
 * Copyright 1998-2002 the Java-Gnome Team, all rights reserved.
 *
 * The Java-Gnome Team Members:
 *   Jean Van Wyk <jeanvanwyk@iname.com>
 *   Jeffrey S. Morgan <jeffrey.morgan@bristolwest.com>
 *   Dan Bornstein <danfuzz@milk.com>
 *
 * The Java-Gnome bindings library is free software distributed under
 * the terms of the GNU Library General Public License version 2.
 *
 * This file was orriginally generated by the Java-GNOME Code Generator
 * Please do not modify the code that is identified as generated.  Also,
 * please insert your code above the generated code.
 *
 * Generation date: 2002-08-01 07:00:31 EDT
 */

#include <jni.h>
#include <sys/types.h>
#include <gdk/gdk.h>
#ifdef __cplusplus
extern "C" 
{
#endif
    /****************************************
     * BEGINNING OF GENERATED CODE
     ****************************************/

    GdkEventType GdkEvent_get_type (GdkEvent * cptr) 
    {
        return cptr->type;
    }

    /*
     * Class:     org.gnu.gdk.Event
     * Method:    getType
     * Signature: (I)I
     */
    JNIEXPORT jint JNICALL Java_org_gnu_gdk_Event_getType (JNIEnv *env, jclass cls, jint obj) 
    {
        GdkEvent *obj_g = (GdkEvent *)obj;
        {
            jint result_j = (jint) (GdkEvent_get_type (obj_g));
            return result_j;
        }
    }

    /*
     * Class:     org.gnu.gdk.Event
     * Method:    gdk_event_get
     * Signature: ()I
     */
    JNIEXPORT jint JNICALL Java_org_gnu_gdk_Event_gdk_1event_1get (JNIEnv *env, jclass cls) 
    {
        {
            return (jint)gdk_event_get ();
        }
    }

    /*
     * Class:     org.gnu.gdk.Event
     * Method:    gdk_event_peek
     * Signature: ()I
     */
    JNIEXPORT jint JNICALL Java_org_gnu_gdk_Event_gdk_1event_1peek (JNIEnv *env, jclass cls) 
    {
        {
            return (jint)gdk_event_peek ();
        }
    }

    /*
     * Class:     org.gnu.gdk.Event
     * Method:    gdk_event_get_graphics_expose
     * Signature: (I)I
     */
    JNIEXPORT jint JNICALL Java_org_gnu_gdk_Event_gdk_1event_1get_1graphics_1expose (JNIEnv *env, 
        jclass cls, jint window) 
    {
        GdkWindow *window_g = (GdkWindow *)window;
        {
            return (jint)gdk_event_get_graphics_expose (window_g);
        }
    }

    /*
     * Class:     org.gnu.gdk.Event
     * Method:    gdk_event_put
     * Signature: (I)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gdk_Event_gdk_1event_1put (JNIEnv *env, jclass cls, jint 
        event) 
    {
        GdkEvent *event_g = (GdkEvent *)event;
        {
            gdk_event_put (event_g);
        }
    }

    /*
     * Class:     org.gnu.gdk.Event
     * Method:    gdk_event_copy
     * Signature: (I)I
     */
    JNIEXPORT jint JNICALL Java_org_gnu_gdk_Event_gdk_1event_1copy (JNIEnv *env, jclass cls, jint 
        event) 
    {
        GdkEvent *event_g = (GdkEvent *)event;
        {
            return (jint)gdk_event_copy (event_g);
        }
    }

    /*
     * Class:     org.gnu.gdk.Event
     * Method:    gdk_event_free
     * Signature: (I)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gdk_Event_gdk_1event_1free (JNIEnv *env, jclass cls, jint 
        event) 
    {
        GdkEvent *event_g = (GdkEvent *)event;
        {
            gdk_event_free (event_g);
        }
    }

    /*
     * Class:     org.gnu.gdk.Event
     * Method:    gdk_event_get_time
     * Signature: (I)I
     */
    JNIEXPORT jint JNICALL Java_org_gnu_gdk_Event_gdk_1event_1get_1time (JNIEnv *env, jclass cls, 
        jint event) 
    {
        GdkEvent *event_g = (GdkEvent *)event;
        {
            jint result_j = (jint) (gdk_event_get_time (event_g));
            return result_j;
        }
    }

    /*
     * Class:     org.gnu.gdk.Event
     * Method:    gdk_event_get_coords
     * Signature: (I[Ldouble ;[Ldouble ;)Z
     */
    JNIEXPORT jboolean JNICALL Java_org_gnu_gdk_Event_gdk_1event_1get_1coords (JNIEnv *env, jclass 
        cls, jint event, jdoubleArray xWin, jdoubleArray yWin) 
    {
        GdkEvent *event_g = (GdkEvent *)event;
        gdouble *xWin_g = (gdouble *) (*env)->GetDoubleArrayElements (env, xWin, NULL);
        gdouble *yWin_g = (gdouble *) (*env)->GetDoubleArrayElements (env, yWin, NULL);
        {
            jboolean result_j = (jboolean) (gdk_event_get_coords (event_g, xWin_g, yWin_g));
            (*env)->ReleaseDoubleArrayElements (env, xWin, (jdouble *) xWin_g, 0);
            (*env)->ReleaseDoubleArrayElements (env, yWin, (jdouble *) yWin_g, 0);
            return result_j;
        }
    }

    /*
     * Class:     org.gnu.gdk.Event
     * Method:    gdk_event_get_root_coords
     * Signature: (I[Ldouble ;[Ldouble ;)Z
     */
    JNIEXPORT jboolean JNICALL Java_org_gnu_gdk_Event_gdk_1event_1get_1root_1coords (JNIEnv *env, 
        jclass cls, jint event, jdoubleArray xRoot, jdoubleArray yRoot) 
    {
        GdkEvent *event_g = (GdkEvent *)event;
        gdouble *xRoot_g = (gdouble *) (*env)->GetDoubleArrayElements (env, xRoot, NULL);
        gdouble *yRoot_g = (gdouble *) (*env)->GetDoubleArrayElements (env, yRoot, NULL);
        {
            jboolean result_j = (jboolean) (gdk_event_get_root_coords (event_g, xRoot_g, yRoot_g));
            (*env)->ReleaseDoubleArrayElements (env, xRoot, (jdouble *) xRoot_g, 0);
            (*env)->ReleaseDoubleArrayElements (env, yRoot, (jdouble *) yRoot_g, 0);
            return result_j;
        }
    }

    /*
     * Class:     org.gnu.gdk.Event
     * Method:    gdk_event_get_axis
     * Signature: (II[Ldouble ;)Z
     */
    JNIEXPORT jboolean JNICALL Java_org_gnu_gdk_Event_gdk_1event_1get_1axis (JNIEnv *env, jclass 
        cls, jint event, jint axisUse, jdoubleArray value) 
    {
        GdkEvent *event_g = (GdkEvent *)event;
        GdkAxisUse axisUse_g = (GdkAxisUse) axisUse;
        gdouble *value_g = (gdouble *) (*env)->GetDoubleArrayElements (env, value, NULL);
        {
            jboolean result_j = (jboolean) (gdk_event_get_axis (event_g, axisUse_g, value_g));
            (*env)->ReleaseDoubleArrayElements (env, value, (jdouble *) value_g, 0);
            return result_j;
        }
    }

    /****************************************
     * END OF GENERATED CODE
     ****************************************/
#ifdef __cplusplus
}

#endif
