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

#include <jni.h>
#include <sys/types.h>
#include <gtk/gtk.h>
#ifdef __cplusplus
extern "C" 
{
#endif
    /****************************************
     * BEGINNING OF GENERATED CODE
     ****************************************/
    gint32 GtkRuler_get_xsrc (GtkRuler * cptr) 
    {
        return cptr->xsrc;
    }

    /*
     * Class:     org.gnu.gtk.Ruler
     * Method:    getXsrc
     * Signature: (I)I
     */
    JNIEXPORT jint JNICALL Java_org_gnu_gtk_Ruler_getXsrc (JNIEnv *env, jclass cls, jint cptr) 
    {
        GtkRuler *cptr_g = (GtkRuler *)cptr;
        {
            jint result_j = (jint) (GtkRuler_get_xsrc (cptr_g));
            return result_j;
        }
    }

    gint32 GtkRuler_get_ysrc (GtkRuler * cptr) 
    {
        return cptr->ysrc;
    }

    /*
     * Class:     org.gnu.gtk.Ruler
     * Method:    getYsrc
     * Signature: (I)I
     */
    JNIEXPORT jint JNICALL Java_org_gnu_gtk_Ruler_getYsrc (JNIEnv *env, jclass cls, jint cptr) 
    {
        GtkRuler *cptr_g = (GtkRuler *)cptr;
        {
            jint result_j = (jint) (GtkRuler_get_ysrc (cptr_g));
            return result_j;
        }
    }

    gint32 GtkRuler_get_slider_size (GtkRuler * cptr) 
    {
        return cptr->slider_size;
    }

    /*
     * Class:     org.gnu.gtk.Ruler
     * Method:    getSliderSize
     * Signature: (I)I
     */
    JNIEXPORT jint JNICALL Java_org_gnu_gtk_Ruler_getSliderSize (JNIEnv *env, jclass cls, jint cptr)
    {
        GtkRuler *cptr_g = (GtkRuler *)cptr;
        {
            jint result_j = (jint) (GtkRuler_get_slider_size (cptr_g));
            return result_j;
        }
    }

    gdouble GtkRuler_get_lower (GtkRuler * cptr) 
    {
        return cptr->lower;
    }

    /*
     * Class:     org.gnu.gtk.Ruler
     * Method:    getLower
     * Signature: (I)D
     */
    JNIEXPORT jdouble JNICALL Java_org_gnu_gtk_Ruler_getLower (JNIEnv *env, jclass cls, jint cptr) 
    {
        GtkRuler *cptr_g = (GtkRuler *)cptr;
        {
            jdouble result_j = (jdouble) (GtkRuler_get_lower (cptr_g));
            return result_j;
        }
    }

    gdouble GtkRuler_get_upper (GtkRuler * cptr) 
    {
        return cptr->upper;
    }

    /*
     * Class:     org.gnu.gtk.Ruler
     * Method:    getUpper
     * Signature: (I)D
     */
    JNIEXPORT jdouble JNICALL Java_org_gnu_gtk_Ruler_getUpper (JNIEnv *env, jclass cls, jint cptr) 
    {
        GtkRuler *cptr_g = (GtkRuler *)cptr;
        {
            jdouble result_j = (jdouble) (GtkRuler_get_upper (cptr_g));
            return result_j;
        }
    }

    gdouble GtkRuler_get_position (GtkRuler * cptr) 
    {
        return cptr->position;
    }

    /*
     * Class:     org.gnu.gtk.Ruler
     * Method:    getPosition
     * Signature: (I)D
     */
    JNIEXPORT jdouble JNICALL Java_org_gnu_gtk_Ruler_getPosition (JNIEnv *env, jclass cls, jint 
        cptr) 
    {
        GtkRuler *cptr_g = (GtkRuler *)cptr;
        {
            jdouble result_j = (jdouble) (GtkRuler_get_position (cptr_g));
            return result_j;
        }
    }

    gdouble GtkRuler_get_max_size (GtkRuler * cptr) 
    {
        return cptr->max_size;
    }

    /*
     * Class:     org.gnu.gtk.Ruler
     * Method:    getMaxSize
     * Signature: (I)D
     */
    JNIEXPORT jdouble JNICALL Java_org_gnu_gtk_Ruler_getMaxSize (JNIEnv *env, jclass cls, jint cptr)
    {
        GtkRuler *cptr_g = (GtkRuler *)cptr;
        {
            jdouble result_j = (jdouble) (GtkRuler_get_max_size (cptr_g));
            return result_j;
        }
    }

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

    /*
     * Class:     org.gnu.gtk.Ruler
     * Method:    gtk_ruler_set_metric
     * Signature: (II)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gtk_Ruler_gtk_1ruler_1set_1metric (JNIEnv *env, jclass cls, 
        jint ruler, jint metric) 
    {
        GtkRuler *ruler_g = (GtkRuler *)ruler;
        GtkMetricType metric_g = (GtkMetricType) metric;
        {
            gtk_ruler_set_metric (ruler_g, metric_g);
        }
    }

    /*
     * Class:     org.gnu.gtk.Ruler
     * Method:    gtk_ruler_set_range
     * Signature: (IDDDD)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gtk_Ruler_gtk_1ruler_1set_1range (JNIEnv *env, jclass cls, 
        jint ruler, jdouble lower, jdouble upper, jdouble position, jdouble maxSize) 
    {
        GtkRuler *ruler_g = (GtkRuler *)ruler;
        gdouble lower_g = (gdouble) lower;
        gdouble upper_g = (gdouble) upper;
        gdouble position_g = (gdouble) position;
        gdouble maxSize_g = (gdouble) maxSize;
        {
            gtk_ruler_set_range (ruler_g, lower_g, upper_g, position_g, maxSize_g);
        }
    }

    /*
     * Class:     org.gnu.gtk.Ruler
     * Method:    gtk_ruler_draw_ticks
     * Signature: (I)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gtk_Ruler_gtk_1ruler_1draw_1ticks (JNIEnv *env, jclass cls, 
        jint ruler) 
    {
        GtkRuler *ruler_g = (GtkRuler *)ruler;
        {
            gtk_ruler_draw_ticks (ruler_g);
        }
    }

    /*
     * Class:     org.gnu.gtk.Ruler
     * Method:    gtk_ruler_draw_pos
     * Signature: (I)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gtk_Ruler_gtk_1ruler_1draw_1pos (JNIEnv *env, jclass cls, 
        jint ruler) 
    {
        GtkRuler *ruler_g = (GtkRuler *)ruler;
        {
            gtk_ruler_draw_pos (ruler_g);
        }
    }

    /*
     * Class:     org.gnu.gtk.Ruler
     * Method:    gtk_ruler_get_metric
     * Signature: (I)I
     */
    JNIEXPORT jint JNICALL Java_org_gnu_gtk_Ruler_gtk_1ruler_1get_1metric (JNIEnv *env, jclass cls, 
        jint ruler) 
    {
        GtkRuler *ruler_g = (GtkRuler *)ruler;
        {
            jint result_j = (jint) (gtk_ruler_get_metric (ruler_g));
            return result_j;
        }
    }

    /*
     * Class:     org.gnu.gtk.Ruler
     * Method:    gtk_ruler_get_range
     * Signature: (I[Ldouble ;[Ldouble ;[Ldouble ;[Ldouble ;)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gtk_Ruler_gtk_1ruler_1get_1range (JNIEnv *env, jclass cls, 
        jint ruler, jdoubleArray lower, jdoubleArray upper, jdoubleArray position, jdoubleArray 
        maxSize) 
    {
        GtkRuler *ruler_g = (GtkRuler *)ruler;
        gdouble *lower_g = (gdouble *) (*env)->GetDoubleArrayElements (env, lower, NULL);
        gdouble *upper_g = (gdouble *) (*env)->GetDoubleArrayElements (env, upper, NULL);
        gdouble *position_g = (gdouble *) (*env)->GetDoubleArrayElements (env, position, NULL);
        gdouble *maxSize_g = (gdouble *) (*env)->GetDoubleArrayElements (env, maxSize, NULL);
        {
            gtk_ruler_get_range (ruler_g, lower_g, upper_g, position_g, maxSize_g);
            (*env)->ReleaseDoubleArrayElements (env, lower, (jdouble *) lower_g, 0);
            (*env)->ReleaseDoubleArrayElements (env, upper, (jdouble *) upper_g, 0);
            (*env)->ReleaseDoubleArrayElements (env, position, (jdouble *) position_g, 0);
            (*env)->ReleaseDoubleArrayElements (env, maxSize, (jdouble *) maxSize_g, 0);
        }
    }

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

#endif
