/*
 * 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-07-31 12:41:27 EDT
 */

#include <jni.h>
#include <sys/types.h>
#include <string.h>
#include <atk/atk.h>
#include <gtk/gtk.h>
#ifdef __cplusplus
extern "C" 
{
#endif
    /****************************************
     * BEGINNING OF GENERATED CODE
     ****************************************/
    /*
     * Class:     org.gnu.atk.RelationType
     * Method:    atk_relation_type_register
     * Signature: ([B)I
     */
    JNIEXPORT jint JNICALL Java_org_gnu_atk_RelationType_atk_1relation_1type_1register (JNIEnv 
        *env, jclass cls, jbyteArray name) 
    {
        jint name_len = (*env)->GetArrayLength(env, name);
        gchar* name_g = (gchar*)g_malloc(name_len + 1);
        (*env)->GetByteArrayRegion(env, name, 0, name_len, (jbyte*)name_g);
        name_g[name_len] = 0;
        {
            jint result_j = (jint) (atk_relation_type_register (name_g));
            return result_j;
        }
    }

    /*
     * Class:     org.gnu.atk.RelationType
     * Method:    atk_relation_type_get_name
     * Signature: (I)[B
     */
    JNIEXPORT jbyteArray JNICALL Java_org_gnu_atk_RelationType_atk_1relation_1type_1get_1name (
        JNIEnv *env, jclass cls, jint type) 
    {
        AtkRelationType type_g = (AtkRelationType) type;
        {
            gchar *result_g = (gchar *)atk_relation_type_get_name (type_g);
            jsize result_len = result_g ? strlen (result_g) : 0;
            jbyteArray result_j = result_g ? (*env)->NewByteArray (env, result_len) : NULL;
            if (result_g) (*env)->SetByteArrayRegion (env, result_j, 0, result_len, result_g);
            return result_j;
        }
    }

    /*
     * Class:     org.gnu.atk.RelationType
     * Method:    atk_relation_type_for_name
     * Signature: ([B)I
     */
    JNIEXPORT jint JNICALL Java_org_gnu_atk_RelationType_atk_1relation_1type_1for_1name (JNIEnv 
        *env, jclass cls, jbyteArray name) 
    {
        jint name_len = (*env)->GetArrayLength(env, name);
        gchar* name_g = (gchar*)g_malloc(name_len + 1);
        (*env)->GetByteArrayRegion(env, name, 0, name_len, (jbyte*)name_g);
        name_g[name_len] = 0;
        {
            jint result_j = (jint) (atk_relation_type_for_name (name_g));
            return result_j;
        }
    }

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

#endif
