/*
 * 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-08 10:21:58 EDT
 */

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

    /*
     * Class:     org.gnu.gnome.Entry
     * Method:    gnome_entry_new
     * Signature: (java.lang.String;)I
     */
    JNIEXPORT jint JNICALL Java_org_gnu_gnome_Entry_gnome_1entry_1new (JNIEnv *env, jclass cls, 
        jstring historyId) 
    {
        gchar* historyId_g = (gchar*)(*env)->GetStringUTFChars(env, historyId, 0);
        jint result = (jint)gnome_entry_new (historyId_g);
        if (historyId) (*env)->ReleaseStringUTFChars(env, historyId, historyId_g);
        return result;
    }

    /*
     * Class:     org.gnu.gnome.Entry
     * Method:    gnome_entry_gtk_entry
     * Signature: (I)I
     */
    JNIEXPORT jint JNICALL Java_org_gnu_gnome_Entry_gnome_1entry_1gtk_1entry (JNIEnv *env, jclass 
        cls, jint gentry) 
    {
        return (jint)gnome_entry_gtk_entry ((GnomeEntry*)gentry);
    }

    /*
     * Class:     org.gnu.gnome.Entry
     * Method:    gnome_entry_set_history_id
     * Signature: (Ijava.lang.String;)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gnome_Entry_gnome_1entry_1set_1history_1id (JNIEnv *env, 
        jclass cls, jint gentry, jstring historyId) 
    {
        gchar* historyId_g = (gchar*)(*env)->GetStringUTFChars(env, historyId, 0);
        gnome_entry_set_history_id ((GnomeEntry*)gentry, historyId_g);
        if (historyId) (*env)->ReleaseStringUTFChars(env, historyId, historyId_g);
    }

    /*
     * Class:     org.gnu.gnome.Entry
     * Method:    gnome_entry_get_history_id
     * Signature: (I)java.lang.String;
     */
    JNIEXPORT jstring JNICALL Java_org_gnu_gnome_Entry_gnome_1entry_1get_1history_1id (JNIEnv 
        *env, jclass cls, jint gentry) 
    {
        gchar *result_g = (gchar*)gnome_entry_get_history_id ((GnomeEntry*)gentry);
        return (*env)->NewStringUTF(env, result_g);
    }

    /*
     * Class:     org.gnu.gnome.Entry
     * Method:    gnome_entry_set_max_saved
     * Signature: (II)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gnome_Entry_gnome_1entry_1set_1max_1saved (JNIEnv *env, 
        jclass cls, jint gentry, jint maxSaved) 
    {
        GnomeEntry *gentry_g = (GnomeEntry *)gentry;
        guint32 maxSaved_g = (guint32) maxSaved;
        {
            gnome_entry_set_max_saved (gentry_g, maxSaved_g);
        }
    }

    /*
     * Class:     org.gnu.gnome.Entry
     * Method:    gnome_entry_get_max_saved
     * Signature: (I)I
     */
    JNIEXPORT jint JNICALL Java_org_gnu_gnome_Entry_gnome_1entry_1get_1max_1saved (JNIEnv *env, 
        jclass cls, jint gentry) 
    {
        GnomeEntry *gentry_g = (GnomeEntry *)gentry;
        {
            jint result_j = (jint) (gnome_entry_get_max_saved (gentry_g));
            return result_j;
        }
    }

    /*
     * Class:     org.gnu.gnome.Entry
     * Method:    gnome_entry_prepend_history
     * Signature: (IZjava.lang.String;)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gnome_Entry_gnome_1entry_1prepend_1history (JNIEnv *env, 
        jclass cls, jint gentry, jboolean save, jstring text) 
    {
        gchar* text_g = (gchar*)(*env)->GetStringUTFChars(env, text, 0);
        gnome_entry_prepend_history ((GnomeEntry*)gentry, (gboolean)save, text_g);
        if (text) (*env)->ReleaseStringUTFChars(env, text, text_g);
    }

    /*
     * Class:     org.gnu.gnome.Entry
     * Method:    gnome_entry_append_history
     * Signature: (IZjava.lang.String;)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gnome_Entry_gnome_1entry_1append_1history (JNIEnv *env, 
        jclass cls, jint gentry, jboolean save, jstring text) 
    {
        gchar* text_g = (gchar*)(*env)->GetStringUTFChars(env, text, 0);
        gnome_entry_append_history ((GnomeEntry*)gentry, (gboolean)save, text_g);
        if (text) (*env)->ReleaseStringUTFChars(env, text, text_g);
    }

    /*
     * Class:     org.gnu.gnome.Entry
     * Method:    gnome_entry_clear_history
     * Signature: (I)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gnome_Entry_gnome_1entry_1clear_1history (JNIEnv *env, 
        jclass cls, jint gentry) 
    {
        GnomeEntry *gentry_g = (GnomeEntry *)gentry;
        {
            gnome_entry_clear_history (gentry_g);
        }
    }

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

#endif
