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

#include <jni.h>
#include <sys/types.h>
#include <gtk/gtk.h>
#ifdef __cplusplus
extern "C" 
{
#endif

    /*
     * Class:     org.gnu.gtk.Menu
     * Method:    gtk_menu_popup
     * Signature: (I)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gtk_Menu_gtk_1menu_1popup (JNIEnv *env, jclass cls, 
        jint menu) 
    {
        GtkMenu *menu_g = (GtkMenu *)menu;
        gtk_menu_popup(menu_g, NULL, NULL, NULL, NULL, 0, gtk_get_current_event_time());
    }


    /****************************************
     * BEGINNING OF GENERATED CODE
     ****************************************/
    /*
     * Class:     org.gnu.gtk.Menu
     * Method:    gtk_menu_get_type
     * Signature: ()I
     */
    JNIEXPORT jint JNICALL Java_org_gnu_gtk_Menu_gtk_1menu_1get_1type (JNIEnv *env, jclass cls) 
    {
        {
            return (jint)gtk_menu_get_type ();
        }
    }

    /*
     * Class:     org.gnu.gtk.Menu
     * Method:    gtk_menu_new
     * Signature: ()I
     */
    JNIEXPORT jint JNICALL Java_org_gnu_gtk_Menu_gtk_1menu_1new (JNIEnv *env, jclass cls) 
    {
        {
            return (jint)gtk_menu_new ();
        }
    }

    /*
     * Class:     org.gnu.gtk.Menu
     * Method:    gtk_menu_reposition
     * Signature: (I)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gtk_Menu_gtk_1menu_1reposition (JNIEnv *env, jclass cls, 
        jint menu) 
    {
        GtkMenu *menu_g = (GtkMenu *)menu;
        {
            gtk_menu_reposition (menu_g);
        }
    }

    /*
     * Class:     org.gnu.gtk.Menu
     * Method:    gtk_menu_popdown
     * Signature: (I)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gtk_Menu_gtk_1menu_1popdown (JNIEnv *env, jclass cls, jint 
        menu) 
    {
        GtkMenu *menu_g = (GtkMenu *)menu;
        {
            gtk_menu_popdown (menu_g);
        }
    }

    /*
     * Class:     org.gnu.gtk.Menu
     * Method:    gtk_menu_get_active
     * Signature: (I)I
     */
    JNIEXPORT jint JNICALL Java_org_gnu_gtk_Menu_gtk_1menu_1get_1active (JNIEnv *env, jclass cls, 
        jint menu) 
    {
        GtkMenu *menu_g = (GtkMenu *)menu;
        {
            return (jint)gtk_menu_get_active (menu_g);
        }
    }

    /*
     * Class:     org.gnu.gtk.Menu
     * Method:    gtk_menu_set_active
     * Signature: (II)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gtk_Menu_gtk_1menu_1set_1active (JNIEnv *env, jclass cls, 
        jint menu, jint index) 
    {
        GtkMenu *menu_g = (GtkMenu *)menu;
        gint32 index_g = (gint32) index;
        {
            gtk_menu_set_active (menu_g, index_g);
        }
    }

    /*
     * Class:     org.gnu.gtk.Menu
     * Method:    gtk_menu_set_accel_group
     * Signature: (II)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gtk_Menu_gtk_1menu_1set_1accel_1group (JNIEnv *env, jclass 
        cls, jint menu, jint accelGroup) 
    {
        GtkMenu *menu_g = (GtkMenu *)menu;
        GtkAccelGroup *accelGroup_g = (GtkAccelGroup *)accelGroup;
        {
            gtk_menu_set_accel_group (menu_g, accelGroup_g);
        }
    }

    /*
     * Class:     org.gnu.gtk.Menu
     * Method:    gtk_menu_get_accel_group
     * Signature: (I)I
     */
    JNIEXPORT jint JNICALL Java_org_gnu_gtk_Menu_gtk_1menu_1get_1accel_1group (JNIEnv *env, jclass 
        cls, jint menu) 
    {
        GtkMenu *menu_g = (GtkMenu *)menu;
        {
            return (jint)gtk_menu_get_accel_group (menu_g);
        }
    }

    /*
     * Class:     org.gnu.gtk.Menu
     * Method:    gtk_menu_set_accel_path
     * Signature: (Ijava.lang.String;)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gtk_Menu_gtk_1menu_1set_1accel_1path (JNIEnv *env, jclass 
        cls, jint menu, jstring accelPath) 
    {
        gchar* accelPath_g = (gchar*)(*env)->GetStringUTFChars(env, accelPath, 0);
        gtk_menu_set_accel_path ((GtkMenu*)menu, accelPath_g);
        (*env)->ReleaseStringUTFChars(env, accelPath, accelPath_g);
    }

    /*
     * Class:     org.gnu.gtk.Menu
     * Method:    gtk_menu_detach
     * Signature: (I)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gtk_Menu_gtk_1menu_1detach (JNIEnv *env, jclass cls, jint 
        menu) 
    {
        GtkMenu *menu_g = (GtkMenu *)menu;
        {
            gtk_menu_detach (menu_g);
        }
    }

    /*
     * Class:     org.gnu.gtk.Menu
     * Method:    gtk_menu_get_attach_widget
     * Signature: (I)I
     */
    JNIEXPORT jint JNICALL Java_org_gnu_gtk_Menu_gtk_1menu_1get_1attach_1widget (JNIEnv *env, 
        jclass cls, jint menu) 
    {
        GtkMenu *menu_g = (GtkMenu *)menu;
        {
            return (jint)gtk_menu_get_attach_widget (menu_g);
        }
    }

    /*
     * Class:     org.gnu.gtk.Menu
     * Method:    gtk_menu_set_tearoff_state
     * Signature: (IZ)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gtk_Menu_gtk_1menu_1set_1tearoff_1state (JNIEnv *env, 
        jclass cls, jint menu, jboolean tornOff) 
    {
        GtkMenu *menu_g = (GtkMenu *)menu;
        gboolean tornOff_g = (gboolean) tornOff;
        {
            gtk_menu_set_tearoff_state (menu_g, tornOff_g);
        }
    }

    /*
     * Class:     org.gnu.gtk.Menu
     * Method:    gtk_menu_get_tearoff_state
     * Signature: (I)Z
     */
    JNIEXPORT jboolean JNICALL Java_org_gnu_gtk_Menu_gtk_1menu_1get_1tearoff_1state (JNIEnv *env, 
        jclass cls, jint menu) 
    {
        GtkMenu *menu_g = (GtkMenu *)menu;
        {
            jboolean result_j = (jboolean) (gtk_menu_get_tearoff_state (menu_g));
            return result_j;
        }
    }

    /*
     * Class:     org.gnu.gtk.Menu
     * Method:    gtk_menu_set_title
     * Signature: (Ijava.lang.String;)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gtk_Menu_gtk_1menu_1set_1title (JNIEnv *env, jclass cls, 
        jint menu, jstring title) 
    {
        gchar* title_g = (gchar*)(*env)->GetStringUTFChars(env, title, 0);
        gtk_menu_set_title ((GtkMenu*)menu, title_g);
        (*env)->GetStringUTFChars(env, title, title_g);
    }

    /*
     * Class:     org.gnu.gtk.Menu
     * Method:    gtk_menu_get_title
     * Signature: (I)java.lang.String;
     */
    JNIEXPORT jstring JNICALL Java_org_gnu_gtk_Menu_gtk_1menu_1get_1title (JNIEnv *env, jclass 
        cls, jint menu) 
    {
        gchar *result_g = (gchar*)gtk_menu_get_title ((GtkMenu*)menu);
        return (*env)->NewStringUTF(env, result_g);
    }

    /*
     * Class:     org.gnu.gtk.Menu
     * Method:    gtk_menu_reorder_child
     * Signature: (III)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gtk_Menu_gtk_1menu_1reorder_1child (JNIEnv *env, jclass 
        cls, jint menu, jint child, jint position) 
    {
        GtkMenu *menu_g = (GtkMenu *)menu;
        GtkMenuItem *child_g = (GtkMenuItem *)child;
        gint32 position_g = (gint32) position;
        {
            gtk_menu_reorder_child (menu_g, (GtkWidget*)child_g, position_g);
        }
    }

    /****************************************
     * END OF GENERATED CODE
     ****************************************/
     
/*
 * Class:     org_gnu_gtk_Menu
 * Method:    gtk_menu_set_screen
 * Signature: (II)V
 */
JNIEXPORT void JNICALL Java_org_gnu_gtk_Menu_gtk_1menu_1set_1screen
  (JNIEnv *env, jclass cls, jint menu, jint screen)
{
	gtk_menu_set_screen((GtkMenu*)menu, (GdkScreen*)screen);
}
                                                                                
/*
 * Class:     org_gnu_gtk_Menu
 * Method:    gtk_menu_attach
 * Signature: (IIIIII)V
 */
JNIEXPORT void JNICALL Java_org_gnu_gtk_Menu_gtk_1menu_1attach
  (JNIEnv *env, jclass cls, jint menu, jint child, jint left, jint right, jint top, jint bottom)
{
	gtk_menu_attach((GtkMenu*)menu, (GtkWidget*)child, (gint)left, (gint)right, (gint)top, (gint)bottom);
}
                                                                                
/*
 * Class:     org_gnu_gtk_Menu
 * Method:    gtk_menu_set_monitor
 * Signature: (II)V
 */
JNIEXPORT void JNICALL Java_org_gnu_gtk_Menu_gtk_1menu_1set_1monitor
  (JNIEnv *env, jclass cls, jint menu, jint monNum)
{
	gtk_menu_set_monitor((GtkMenu*)menu, (gint)monNum);
}

#ifdef __cplusplus
}

#endif
