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

#include <jni.h>
#include <sys/types.h>
#include <pango/pango.h>
#include <gtk/gtk.h>
#ifdef __cplusplus
extern "C" 
{
#endif
    JNIEXPORT jboolean JNICALL Java_org_gnu_pango_Context_pango_1context_1load_1fontNULL (JNIEnv *env, 
        jclass cls, jint context, jint desc) 
    {
        PangoContext *context_g = (PangoContext *)context;
        PangoFontDescription *desc_g = (PangoFontDescription *)desc;
        {
            return (jboolean)( NULL == pango_context_load_font (context_g, desc_g));
        }
    }
    /****************************************
     * BEGINNING OF GENERATED CODE
     ****************************************/
    /*
     * Class:     org.gnu.pango.Context
     * Method:    pango_context_get_type
     * Signature: ()I
     */
    JNIEXPORT jint JNICALL Java_org_gnu_pango_Context_pango_1context_1get_1type (JNIEnv *env, 
        jclass cls) 
    {
        {
            return (jint)pango_context_get_type ();
        }
    }

    /*
     * Class:     org.gnu.pango.Context
     * Method:    pango_context_list_families
     * Signature: (I[Lint ;[Lint ;)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_pango_Context_pango_1context_1list_1families (JNIEnv *env, 
        jclass cls, jint context, jintArray families, jintArray numFamilies) 
    {
        PangoContext *context_g = (PangoContext *)context;
        gint *families_g_g = (gint *) (*env)->GetIntArrayElements (env, families, NULL);
        PangoFontFamily ***families_g = (PangoFontFamily ***)families_g_g;
        gint *numFamilies_g = (gint *) (*env)->GetIntArrayElements (env, numFamilies, NULL);
        {
            pango_context_list_families (context_g, families_g, numFamilies_g);
            (*env)->ReleaseIntArrayElements (env, families, (jint*)families_g_g, 0);
            (*env)->ReleaseIntArrayElements (env, numFamilies, (jint *) numFamilies_g, 0);
        }
    }

    /*
     * Class:     org.gnu.pango.Context
     * Method:    pango_context_load_font
     * Signature: (II)I
     */
    JNIEXPORT jint JNICALL Java_org_gnu_pango_Context_pango_1context_1load_1font (JNIEnv *env, 
        jclass cls, jint context, jint desc) 
    {
        PangoContext *context_g = (PangoContext *)context;
        PangoFontDescription *desc_g = (PangoFontDescription *)desc;
        {
            return (jint)pango_context_load_font (context_g, desc_g);
        }
    }

    /*
     * Class:     org.gnu.pango.Context
     * Method:    pango_context_get_metrics
     * Signature: (III)I
     */
    JNIEXPORT jint JNICALL Java_org_gnu_pango_Context_pango_1context_1get_1metrics (JNIEnv *env, 
        jclass cls, jint context, jint desc, jint language) 
    {
        PangoContext *context_g = (PangoContext *)context;
        PangoFontDescription *desc_g = (PangoFontDescription *)desc;
        PangoLanguage *language_g = (PangoLanguage *)language;
        {
            return (jint)pango_context_get_metrics (context_g, desc_g, language_g);
        }
    }

    /*
     * Class:     org.gnu.pango.Context
     * Method:    pango_context_set_font_description
     * Signature: (II)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_pango_Context_pango_1context_1set_1font_1description (
        JNIEnv *env, jclass cls, jint context, jint desc) 
    {
        PangoContext *context_g = (PangoContext *)context;
        PangoFontDescription *desc_g = (PangoFontDescription *)desc;
        {
            pango_context_set_font_description (context_g, desc_g);
        }
    }

    /*
     * Class:     org.gnu.pango.Context
     * Method:    pango_context_get_font_description
     * Signature: (I)I
     */
    JNIEXPORT jint JNICALL Java_org_gnu_pango_Context_pango_1context_1get_1font_1description (
        JNIEnv *env, jclass cls, jint context) 
    {
        PangoContext *context_g = (PangoContext *)context;
        {
            return (jint)pango_context_get_font_description (context_g);
        }
    }

    /*
     * Class:     org.gnu.pango.Context
     * Method:    pango_context_get_language
     * Signature: (I)I
     */
    JNIEXPORT jint JNICALL Java_org_gnu_pango_Context_pango_1context_1get_1language (JNIEnv *env, 
        jclass cls, jint context) 
    {
        PangoContext *context_g = (PangoContext *)context;
        {
            return (jint)pango_context_get_language (context_g);
        }
    }

    /*
     * Class:     org.gnu.pango.Context
     * Method:    pango_context_set_language
     * Signature: (II)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_pango_Context_pango_1context_1set_1language (JNIEnv *env, 
        jclass cls, jint context, jint language) 
    {
        PangoContext *context_g = (PangoContext *)context;
        PangoLanguage *language_g = (PangoLanguage *)language;
        {
            pango_context_set_language (context_g, language_g);
        }
    }

    /*
     * Class:     org.gnu.pango.Context
     * Method:    pango_context_set_base_dir
     * Signature: (II)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_pango_Context_pango_1context_1set_1base_1dir (JNIEnv *env, 
        jclass cls, jint context, jint direction) 
    {
        PangoContext *context_g = (PangoContext *)context;
        PangoDirection direction_g = (PangoDirection) direction;
        {
            pango_context_set_base_dir (context_g, direction_g);
        }
    }

    /*
     * Class:     org.gnu.pango.Context
     * Method:    pango_context_get_base_dir
     * Signature: (I)I
     */
    JNIEXPORT jint JNICALL Java_org_gnu_pango_Context_pango_1context_1get_1base_1dir (JNIEnv *env, 
        jclass cls, jint context) 
    {
        PangoContext *context_g = (PangoContext *)context;
        {
            jint result_j = (jint) (pango_context_get_base_dir (context_g));
            return result_j;
        }
    }

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

#endif
