/*
 * 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:36 EDT
 */

#include <jni.h>
#include <sys/types.h>
#include <gdk/gdk.h>
#ifdef __cplusplus
extern "C" 
{
#endif
    /****************************************
     * BEGINNING OF GENERATED CODE
     ****************************************/
    /*
     * Class:     org.gnu.gdk.Keymap
     * Method:    gdk_keymap_get_type
     * Signature: ()I
     */
    JNIEXPORT jint JNICALL Java_org_gnu_gdk_Keymap_gdk_1keymap_1get_1type (JNIEnv *env, jclass cls) 
    {
        {
            return (jint)gdk_keymap_get_type ();
        }
    }

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

    /*
     * Class:     org.gnu.gdk.Keymap
     * Method:    gdk_keymap_lookup_key
     * Signature: (II)I
     */
    JNIEXPORT jint JNICALL Java_org_gnu_gdk_Keymap_gdk_1keymap_1lookup_1key (JNIEnv *env, jclass 
        cls, jint keymap, jint key) 
    {
        GdkKeymap *keymap_g = (GdkKeymap *)keymap;
        GdkKeymapKey *key_g = (GdkKeymapKey *)key;
        {
            jint result_j = (jint) (gdk_keymap_lookup_key (keymap_g, key_g));
            return result_j;
        }
    }

    /*
     * Class:     org.gnu.gdk.Keymap
     * Method:    gdk_keymap_get_entries_for_keyval
     * Signature: (II[Lint ;[Lint ;)Z
     */
    JNIEXPORT jboolean JNICALL Java_org_gnu_gdk_Keymap_gdk_1keymap_1get_1entries_1for_1keyval (
        JNIEnv *env, jclass cls, jint keymap, jint keyval, jintArray keys, jintArray numKeys) 
    {
        GdkKeymap *keymap_g = (GdkKeymap *)keymap;
        gint32 keyval_g = (gint32) keyval;
        gint *keys_g_g = (gint *) (*env)->GetIntArrayElements (env, keys, NULL);
        GdkKeymapKey **keys_g = (GdkKeymapKey **)keys_g_g;
        gint *numKeys_g = (gint *) (*env)->GetIntArrayElements (env, numKeys, NULL);
        {
            jboolean result_j = (jboolean) (gdk_keymap_get_entries_for_keyval (keymap_g, keyval_g, 
                    keys_g, numKeys_g));
            (*env)->ReleaseIntArrayElements (env, keys, (jint *)keys_g_g, 0);
            (*env)->ReleaseIntArrayElements (env, numKeys, (jint *) numKeys_g, 0);
            return result_j;
        }
    }

    /*
     * Class:     org.gnu.gdk.Keymap
     * Method:    gdk_keymap_get_entries_for_keycode
     * Signature: (II[Lint ;[Lint ;[Lint ;)Z
     */
    JNIEXPORT jboolean JNICALL Java_org_gnu_gdk_Keymap_gdk_1keymap_1get_1entries_1for_1keycode (
        JNIEnv *env, jclass cls, jint keymap, jint hardwareKeycode, jintArray keys, jintArray 
        keyvals, jintArray numEntries) 
    {
        GdkKeymap *keymap_g = (GdkKeymap *)keymap;
        gint32 hardwareKeycode_g = (gint32) hardwareKeycode;
        gint *keys_g_g = (gint *) (*env)->GetIntArrayElements (env, keys, NULL);
        GdkKeymapKey **keys_g = (GdkKeymapKey **)keys_g_g;
        guint **keyvals_g = (guint **) (*env)->GetIntArrayElements (env, keyvals, NULL);
        gint *numEntries_g = (gint *) (*env)->GetIntArrayElements (env, numEntries, NULL);
        {
            jboolean result_j = (jboolean) (gdk_keymap_get_entries_for_keycode (keymap_g, 
                    hardwareKeycode_g, keys_g, keyvals_g, numEntries_g));
            (*env)->ReleaseIntArrayElements (env, keys, (jint *)keys_g_g, 0);
            (*env)->ReleaseIntArrayElements (env, keyvals, (jint *) keyvals_g, 0);
            (*env)->ReleaseIntArrayElements (env, numEntries, (jint *) numEntries_g, 0);
            return result_j;
        }
    }

    /*
     * Class:     org.gnu.gdk.Keymap
     * Method:    gdk_keymap_get_direction
     * Signature: (I)I
     */
    JNIEXPORT jint JNICALL Java_org_gnu_gdk_Keymap_gdk_1keymap_1get_1direction (JNIEnv *env, jclass 
        cls, jint keymap) 
    {
        GdkKeymap *keymap_g = (GdkKeymap *)keymap;
        {
            jint result_j = (jint) (gdk_keymap_get_direction (keymap_g));
            return result_j;
        }
    }

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

#endif
