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

#include <jni.h>
#include <sys/types.h>
#include <pango/pango.h>
#include <gtk/gtk.h>
#ifdef __cplusplus
extern "C" 
{
#endif
    /****************************************
     * BEGINNING OF GENERATED CODE
     ****************************************/
    /*
     * Class:     org.gnu.pango.LayoutLine
     * Method:    pango_layout_line_ref
     * Signature: (I)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_pango_LayoutLine_pango_1layout_1line_1ref (JNIEnv *env, 
        jclass cls, jint line) 
    {
        PangoLayoutLine *line_g = (PangoLayoutLine *)line;
        {
            pango_layout_line_ref (line_g);
        }
    }

    /*
     * Class:     org.gnu.pango.LayoutLine
     * Method:    pango_layout_line_unref
     * Signature: (I)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_pango_LayoutLine_pango_1layout_1line_1unref (JNIEnv *env, 
        jclass cls, jint line) 
    {
        PangoLayoutLine *line_g = (PangoLayoutLine *)line;
        {
            pango_layout_line_unref (line_g);
        }
    }

    /*
     * Class:     org.gnu.pango.LayoutLine
     * Method:    pango_layout_line_x_to_index
     * Signature: (II[Lint ;[Lint ;)Z
     */
    JNIEXPORT jboolean JNICALL Java_org_gnu_pango_LayoutLine_pango_1layout_1line_1x_1to_1index (
        JNIEnv *env, jclass cls, jint line, jint xPos, jintArray index, jintArray trailing) 
    {
        PangoLayoutLine *line_g = (PangoLayoutLine *)line;
        gint32 xPos_g = (gint32) xPos;
        gint *index_g = (gint *) (*env)->GetIntArrayElements (env, index, NULL);
        gint *trailing_g = (gint *) (*env)->GetIntArrayElements (env, trailing, NULL);
        {
            jboolean result_j = (jboolean) (pango_layout_line_x_to_index (line_g, xPos_g, index_g, 
                    trailing_g));
            (*env)->ReleaseIntArrayElements (env, index, (jint *) index_g, 0);
            (*env)->ReleaseIntArrayElements (env, trailing, (jint *) trailing_g, 0);
            return result_j;
        }
    }

    /*
     * Class:     org.gnu.pango.LayoutLine
     * Method:    pango_layout_line_index_to_x
     * Signature: (IIZ[Lint ;)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_pango_LayoutLine_pango_1layout_1line_1index_1to_1x (JNIEnv 
        *env, jclass cls, jint line, jint index, jboolean trailing, jintArray xPos) 
    {
        PangoLayoutLine *line_g = (PangoLayoutLine *)line;
        gint32 index_g = (gint32) index;
        gboolean trailing_g = (gboolean) trailing;
        gint *xPos_g = (gint *) (*env)->GetIntArrayElements (env, xPos, NULL);
        {
            pango_layout_line_index_to_x (line_g, index_g, trailing_g, xPos_g);
            (*env)->ReleaseIntArrayElements (env, xPos, (jint *) xPos_g, 0);
        }
    }

    /*
     * Class:     org.gnu.pango.LayoutLine
     * Method:    pango_layout_line_get_x_ranges
     * Signature: (III[Lint ;[Lint ;)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_pango_LayoutLine_pango_1layout_1line_1get_1x_1ranges (
        JNIEnv *env, jclass cls, jint line, jint startIndex, jint endIndex, jintArray ranges, 
        jintArray numRanges) 
    {
        PangoLayoutLine *line_g = (PangoLayoutLine *)line;
        gint32 startIndex_g = (gint32) startIndex;
        gint32 endIndex_g = (gint32) endIndex;
        gint **ranges_g = (gint **) (*env)->GetIntArrayElements (env, ranges, NULL);
        gint *numRanges_g = (gint *) (*env)->GetIntArrayElements (env, numRanges, NULL);
        {
            pango_layout_line_get_x_ranges (line_g, startIndex_g, 
					    endIndex_g, ranges_g, numRanges_g);
            (*env)->ReleaseIntArrayElements (env, ranges, (jint *) ranges_g, 0);
            (*env)->ReleaseIntArrayElements (env, numRanges, (jint *) numRanges_g, 0);
        }
    }

    /*
     * Class:     org.gnu.pango.LayoutLine
     * Method:    pango_layout_line_get_extents
     * Signature: (I[Lint ;[Lint ;)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_pango_LayoutLine_pango_1layout_1line_1get_1extents (JNIEnv 
        *env, jclass cls, jint line, jintArray inkRect, jintArray logicalRect) 
    {
        PangoLayoutLine *line_g = (PangoLayoutLine *)line;
        gint *inkRect_g_g = (gint *) (*env)->GetIntArrayElements (env, inkRect, NULL);
        PangoRectangle *inkRect_g = (PangoRectangle *)inkRect_g_g;
        gint *logicalRect_g_g = (gint *) (*env)->GetIntArrayElements (env, logicalRect, NULL);
        PangoRectangle *logicalRect_g = (PangoRectangle *)logicalRect_g_g;
        {
	  pango_layout_line_get_extents (line_g, inkRect_g, logicalRect_g);
	  (*env)->ReleaseIntArrayElements (env, inkRect, (jint *)inkRect_g_g, 0);
	  (*env)->ReleaseIntArrayElements (env, logicalRect, (jint *)logicalRect_g_g, 0);
        }
    }

    /*
     * Class:     org.gnu.pango.LayoutLine
     * Method:    pango_layout_line_get_pixel_extents
     * Signature: (I[Lint ;[Lint ;)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_pango_LayoutLine_pango_1layout_1line_1get_1pixel_1extents (
        JNIEnv *env, jclass cls, jint line, jintArray inkRect, jintArray logicalRect) 
    {
        PangoLayoutLine *line_g = (PangoLayoutLine *)line;
        gint *inkRect_g_g = (gint *) (*env)->GetIntArrayElements (env, inkRect, NULL);
        PangoRectangle *inkRect_g = (PangoRectangle *)inkRect_g_g;
        gint *logicalRect_g_g = (gint *) (*env)->GetIntArrayElements (env, logicalRect, NULL);
        PangoRectangle *logicalRect_g = (PangoRectangle *)logicalRect_g_g;
        {
            pango_layout_line_get_pixel_extents (line_g, inkRect_g, logicalRect_g);
            (*env)->ReleaseIntArrayElements (env, inkRect, (jint *)inkRect_g_g, 0);
            (*env)->ReleaseIntArrayElements (env, logicalRect, (jint *)logicalRect_g_g, 0);
        }
    }

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

#endif
