/*
 * 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-02 09:42:23 EDT
 */

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

    /*
     * Class:     org.gnu.gtk.ItemFactory
     * Method:    gtk_item_factory_new
     * Signature: (Ijava.lang.String;I)I
     */
    JNIEXPORT jint JNICALL Java_org_gnu_gtk_ItemFactory_gtk_1item_1factory_1new (JNIEnv *env, 
        jclass cls, jint containerType, jstring path, jint accelGroup) 
    {
        gchar* path_g = (gchar*)(*env)->GetStringUTFChars(env, path, 0);
        GtkAccelGroup *accelGroup_g = (GtkAccelGroup *)accelGroup;
        jint result = (jint)gtk_item_factory_new ((GType)containerType, path_g, accelGroup_g);
        (*env)->ReleaseStringUTFChars(env, path, path_g);
        return result;
    }

    /*
     * Class:     org.gnu.gtk.ItemFactory
     * Method:    gtk_item_factory_construct
     * Signature: (IIjava.lang.String;I)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gtk_ItemFactory_gtk_1item_1factory_1construct (JNIEnv *env, 
        jclass cls, jint ifactory, jint containerType, jstring path, jint accelGroup) 
    {
        GtkItemFactory *ifactory_g = (GtkItemFactory *)ifactory;
        gchar* path_g = (gchar*)(*env)->GetStringUTFChars(env, path, 0);
        gtk_item_factory_construct (ifactory_g, (GType)containerType, path_g, (GtkAccelGroup*)accelGroup);
        (*env)->ReleaseStringUTFChars(env, path, path_g);
    }

    /*
     * Class:     org.gnu.gtk.ItemFactory
     * Method:    gtk_item_factory_add_foreign
     * Signature: (Ijava.lang.String;III)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gtk_ItemFactory_gtk_1item_1factory_1add_1foreign (JNIEnv 
        *env, jclass cls, jint accelWidget, jstring fullPath, jint accelGroup, jint keyval, jint 
        modifiers) 
    {
        gchar* fullPath_g = (gchar*)(*env)->GetStringUTFChars(env, fullPath, 0);
        gtk_item_factory_add_foreign ((GtkWidget *)accelWidget, fullPath_g, (GtkAccelGroup *)accelGroup, (gint32)keyval, 
                (GdkModifierType)modifiers);
      	(*env)->ReleaseStringUTFChars(env, fullPath, fullPath_g);
    }

    /*
     * Class:     org.gnu.gtk.ItemFactory
     * Method:    gtk_item_factory_from_widget
     * Signature: (I)I
     */
    JNIEXPORT jint JNICALL Java_org_gnu_gtk_ItemFactory_gtk_1item_1factory_1from_1widget (JNIEnv 
        *env, jclass cls, jint widget) 
    {
        GtkWidget *widget_g = (GtkWidget *)widget;
        {
            return (jint)gtk_item_factory_from_widget (widget_g);
        }
    }

    /*
     * Class:     org.gnu.gtk.ItemFactory
     * Method:    gtk_item_factory_path_from_widget
     * Signature: (I)java.lang.String;
     */
    JNIEXPORT jstring JNICALL 
    Java_org_gnu_gtk_ItemFactory_gtk_1item_1factory_1path_1from_1widget (JNIEnv *env, jclass cls, 
        jint widget) 
    {
        GtkWidget *widget_g = (GtkWidget *)widget;
        gchar *result_g = (gchar*)gtk_item_factory_path_from_widget (widget_g);
        return (*env)->NewStringUTF(env, result_g);
    }

    /*
     * Class:     org.gnu.gtk.ItemFactory
     * Method:    gtk_item_factory_get_item
     * Signature: (Ijava.lang.String;)I
     */
    JNIEXPORT jint JNICALL Java_org_gnu_gtk_ItemFactory_gtk_1item_1factory_1get_1item (JNIEnv *env, 
        jclass cls, jint ifactory, jstring path) 
    {
        gchar* path_g = (gchar*)(*env)->GetStringUTFChars(env, path, 0);
        jint result = (jint)gtk_item_factory_get_item ((GtkItemFactory*)ifactory, path_g);
        (*env)->ReleaseStringUTFChars(env, path, path_g);
        return result;
    }

    /*
     * Class:     org.gnu.gtk.ItemFactory
     * Method:    gtk_item_factory_get_widget
     * Signature: (Ijava.lang.String;)I
     */
    JNIEXPORT jint JNICALL Java_org_gnu_gtk_ItemFactory_gtk_1item_1factory_1get_1widget (JNIEnv 
        *env, jclass cls, jint ifactory, jstring path) 
    {
        gchar* path_g = (gchar*)(*env)->GetStringUTFChars(env, path, 0);
        jint result = (jint)gtk_item_factory_get_widget ((GtkItemFactory *)ifactory, path_g);
        (*env)->ReleaseStringUTFChars(env, path, path_g);
        return result;
    }

    /*
     * Class:     org.gnu.gtk.ItemFactory
     * Method:    gtk_item_factory_get_widget_by_action
     * Signature: (II)I
     */
    JNIEXPORT jint JNICALL Java_org_gnu_gtk_ItemFactory_gtk_1item_1factory_1get_1widget_1by_1action (
        JNIEnv *env, jclass cls, jint ifactory, jint action) 
    {
        GtkItemFactory *ifactory_g = (GtkItemFactory *)ifactory;
        gint32 action_g = (gint32) action;
        {
            return (jint)gtk_item_factory_get_widget_by_action (ifactory_g, action_g);
        }
    }

    /*
     * Class:     org.gnu.gtk.ItemFactory
     * Method:    gtk_item_factory_get_item_by_action
     * Signature: (II)I
     */
    JNIEXPORT jint JNICALL Java_org_gnu_gtk_ItemFactory_gtk_1item_1factory_1get_1item_1by_1action (
        JNIEnv *env, jclass cls, jint ifactory, jint action) 
    {
        GtkItemFactory *ifactory_g = (GtkItemFactory *)ifactory;
        gint32 action_g = (gint32) action;
        {
            return (jint)gtk_item_factory_get_item_by_action (ifactory_g, action_g);
        }
    }

    /*
     * Class:     org.gnu.gtk.ItemFactory
     * Method:    gtk_item_factory_create_item
     * Signature: (IIII)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gtk_ItemFactory_gtk_1item_1factory_1create_1item (JNIEnv 
        *env, jclass cls, jint ifactory, jint entry, jint callbackData, jint callbackType) 
    {
        GtkItemFactory *ifactory_g = (GtkItemFactory *)ifactory;
        GtkItemFactoryEntry *entry_g = (GtkItemFactoryEntry *)entry;
        gpointer *callbackData_g = (gpointer *)callbackData;
        gint32 callbackType_g = (gint32) callbackType;
        {
            gtk_item_factory_create_item (ifactory_g, entry_g, callbackData_g, callbackType_g);
        }
    }

    /*
     * Class:     org.gnu.gtk.ItemFactory
     * Method:    gtk_item_factory_create_items
     * Signature: (II[Lint ;I)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gtk_ItemFactory_gtk_1item_1factory_1create_1items (JNIEnv 
        *env, jclass cls, jint ifactory, jint numEntries, jintArray entries, jint callbackData) 
    {
        GtkItemFactory *ifactory_g = (GtkItemFactory *)ifactory;
        gint32 numEntries_g = (gint32) numEntries;
        gint *entries_g_g = (gint *) (*env)->GetIntArrayElements (env, entries, NULL);
        GtkItemFactoryEntry *entries_g = (GtkItemFactoryEntry *)entries_g_g;
        gpointer *callbackData_g = (gpointer *)callbackData;
        {
            gtk_item_factory_create_items (ifactory_g, numEntries_g, entries_g, callbackData_g);
            (*env)->ReleaseIntArrayElements (env, entries, (jint*)entries_g_g, 0);
        }
    }

    /*
     * Class:     org.gnu.gtk.ItemFactory
     * Method:    gtk_item_factory_delete_item
     * Signature: (Ijava.lang.String;)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gtk_ItemFactory_gtk_1item_1factory_1delete_1item (JNIEnv 
        *env, jclass cls, jint ifactory, jstring path) 
    {
        gchar* path_g = (gchar*)(*env)->GetStringUTFChars(env, path, 0);
        gtk_item_factory_delete_item ((GtkItemFactory *)ifactory, path_g);
        (*env)->ReleaseStringUTFChars(env, path, path_g);
    }

    /*
     * Class:     org.gnu.gtk.ItemFactory
     * Method:    gtk_item_factory_delete_entry
     * Signature: (II)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gtk_ItemFactory_gtk_1item_1factory_1delete_1entry (JNIEnv 
        *env, jclass cls, jint ifactory, jint entry) 
    {
        GtkItemFactory *ifactory_g = (GtkItemFactory *)ifactory;
        GtkItemFactoryEntry *entry_g = (GtkItemFactoryEntry *)entry;
        {
            gtk_item_factory_delete_entry (ifactory_g, entry_g);
        }
    }

    /*
     * Class:     org.gnu.gtk.ItemFactory
     * Method:    gtk_item_factory_delete_entries
     * Signature: (II[Lint ;)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gtk_ItemFactory_gtk_1item_1factory_1delete_1entries (JNIEnv 
        *env, jclass cls, jint ifactory, jint numEnties, jintArray entries) 
    {
        GtkItemFactory *ifactory_g = (GtkItemFactory *)ifactory;
        gint32 numEnties_g = (gint32) numEnties;
        gint *entries_g_g = (gint *) (*env)->GetIntArrayElements (env, entries, NULL);
        GtkItemFactoryEntry *entries_g = (GtkItemFactoryEntry *)entries_g_g;
        {
            gtk_item_factory_delete_entries (ifactory_g, numEnties_g, entries_g);
            (*env)->ReleaseIntArrayElements (env, entries, (jint*)entries_g_g, 0);
        }
    }

    /*
     * Class:     org.gnu.gtk.ItemFactory
     * Method:    gtk_item_factory_popup
     * Signature: (IIIII)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gtk_ItemFactory_gtk_1item_1factory_1popup (JNIEnv *env, 
        jclass cls, jint ifactory, jint x, jint y, jint mouseButton, jint time) 
    {
        GtkItemFactory *ifactory_g = (GtkItemFactory *)ifactory;
        gint32 x_g = (gint32) x;
        gint32 y_g = (gint32) y;
        gint32 mouseButton_g = (gint32) mouseButton;
        gint32 time_g = (gint32) time;
        {
            gtk_item_factory_popup (ifactory_g, x_g, y_g, mouseButton_g, time_g);
        }
    }

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

#endif
