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

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

    /*
     * Class:     org.gnu.gnome.HRef
     * Method:    gnome_href_new
     * Signature: ([B[B)I
     */
    JNIEXPORT jint JNICALL Java_org_gnu_gnome_HRef_gnome_1href_1new (JNIEnv *env, jclass cls, 
        jstring url, jstring lable) 
    {
        const gchar* url_g = (*env)->GetStringUTFChars(env, url, NULL);
        const gchar* lable_g = (*env)->GetStringUTFChars(env, lable, NULL);
		jint retval =  (jint)gnome_href_new (url_g, lable_g);
		(*env)->ReleaseStringUTFChars( env, url, url_g);
		(*env)->ReleaseStringUTFChars( env, lable, lable_g );
		return retval;
    }

    /*
     * Class:     org.gnu.gnome.HRef
     * Method:    gnome_href_set_url
     * Signature: (I[B)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gnome_HRef_gnome_1href_1set_1url (JNIEnv *env, jclass cls, 
        jint href, jstring url) 
    {
        GnomeHRef *href_g = (GnomeHRef *)href;
        const gchar* url_g = (*env)->GetStringUTFChars(env, url, NULL);
		gnome_href_set_url (href_g, url_g);
		(*env)->ReleaseStringUTFChars(env, url, url_g );
    }

    /*
     * Class:     org.gnu.gnome.HRef
     * Method:    gnome_href_get_url
     * Signature: (I)[B
     */
    JNIEXPORT jstring JNICALL Java_org_gnu_gnome_HRef_gnome_1href_1get_1url (JNIEnv *env, jclass 
        cls, jint href) 
    {
        GnomeHRef *href_g = (GnomeHRef *)href;
		return (*env)->NewStringUTF(env, (gchar*)gnome_href_get_url (href_g));
    }

    /*
     * Class:     org.gnu.gnome.HRef
     * Method:    gnome_href_set_text
     * Signature: (I[B)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gnome_HRef_gnome_1href_1set_1text (JNIEnv *env, jclass cls, 
        jint href, jstring text) 
    {
        GnomeHRef *href_g = (GnomeHRef *)href;
        const gchar* text_g = (*env)->GetStringUTFChars(env, text, NULL);
		gnome_href_set_text (href_g, text_g);
		(*env)->ReleaseStringUTFChars(env, text, text_g);
    }

    /*
     * Class:     org.gnu.gnome.HRef
     * Method:    gnome_href_get_text
     * Signature: (I)[B
     */
    JNIEXPORT jstring JNICALL Java_org_gnu_gnome_HRef_gnome_1href_1get_1text (JNIEnv *env, 
        jclass cls, jint label) 
    {
        GnomeHRef *label_g = (GnomeHRef *)label;
		return (*env)->NewStringUTF(env, (gchar*)gnome_href_get_text (label_g));
    }

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

#endif
