/*
 * 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-18 16:09:17 CDT
 */

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

    /*
     * Class:     org.gnu.gnome.ColorPicker
     * Method:    gnome_color_picker_new
     * Signature: ()I
     */
    JNIEXPORT jint JNICALL Java_org_gnu_gnome_ColorPicker_gnome_1color_1picker_1new (JNIEnv *env, 
        jclass cls) 
    {
        {
            return (jint)gnome_color_picker_new ();
        }
    }

    /*
     * Class:     org.gnu.gnome.ColorPicker
     * Method:    gnome_color_picker_set_d
     * Signature: (IDDDD)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gnome_ColorPicker_gnome_1color_1picker_1set_1d (JNIEnv 
        *env, jclass cls, jint cp, jdouble red, jdouble green, jdouble blue, jdouble alpha) 
    {
        GnomeColorPicker *cp_g = (GnomeColorPicker *)cp;
        gdouble red_g = (gdouble) red;
        gdouble green_g = (gdouble) green;
        gdouble blue_g = (gdouble) blue;
        gdouble alpha_g = (gdouble) alpha;
        {
            gnome_color_picker_set_d (cp_g, red_g, green_g, blue_g, alpha_g);
        }
    }

    /*
     * Class:     org.gnu.gnome.ColorPicker
     * Method:    gnome_color_picker_get_d
     * Signature: (I[Ldouble ;[Ldouble ;[Ldouble ;[Ldouble ;)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gnome_ColorPicker_gnome_1color_1picker_1get_1d (JNIEnv 
        *env, jclass cls, jint cp, jdoubleArray red, jdoubleArray green, jdoubleArray blue, 
        jdoubleArray alpha) 
    {
        GnomeColorPicker *cp_g = (GnomeColorPicker *)cp;
        gdouble *red_g = (gdouble *) (*env)->GetDoubleArrayElements (env, red, NULL);
        gdouble *green_g = (gdouble *) (*env)->GetDoubleArrayElements (env, green, NULL);
        gdouble *blue_g = (gdouble *) (*env)->GetDoubleArrayElements (env, blue, NULL);
        gdouble *alpha_g = (gdouble *) (*env)->GetDoubleArrayElements (env, alpha, NULL);
        {
            gnome_color_picker_get_d (cp_g, red_g, green_g, blue_g, alpha_g);
            (*env)->ReleaseDoubleArrayElements (env, red, (jdouble *) red_g, 0);
            (*env)->ReleaseDoubleArrayElements (env, green, (jdouble *) green_g, 0);
            (*env)->ReleaseDoubleArrayElements (env, blue, (jdouble *) blue_g, 0);
            (*env)->ReleaseDoubleArrayElements (env, alpha, (jdouble *) alpha_g, 0);
        }
    }

    /*
     * Class:     org.gnu.gnome.ColorPicker
     * Method:    gnome_color_picker_set_i8
     * Signature: (IIIII)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gnome_ColorPicker_gnome_1color_1picker_1set_1i8 (JNIEnv 
        *env, jclass cls, jint cp, jint red, jint green, jint blue, jint alpha) 
    {
        GnomeColorPicker *cp_g = (GnomeColorPicker *)cp;
        gint32 red_g = (gint32) red;
        gint32 green_g = (gint32) green;
        gint32 blue_g = (gint32) blue;
        gint32 alpha_g = (gint32) alpha;
        {
            gnome_color_picker_set_i8 (cp_g, red_g, green_g, blue_g, alpha_g);
        }
    }

    /*
     * Class:     org.gnu.gnome.ColorPicker
     * Method:    gnome_color_picker_get_i8
     * Signature: (I[Lint ;[Lint ;[Lint ;[Lint ;)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gnome_ColorPicker_gnome_1color_1picker_1get_1i8 (JNIEnv 
        *env, jclass cls, jint cp, jintArray red, jintArray green, jintArray blue, jintArray alpha) 
    {
        GnomeColorPicker *cp_g = (GnomeColorPicker *)cp;
        guint8 *red_g = (guint8 *) (*env)->GetIntArrayElements (env, red, NULL);
        guint8 *green_g = (guint8 *) (*env)->GetIntArrayElements (env, green, NULL);
        guint8 *blue_g = (guint8 *) (*env)->GetIntArrayElements (env, blue, NULL);
        guint8 *alpha_g = (guint8 *) (*env)->GetIntArrayElements (env, alpha, NULL);
        {
            gnome_color_picker_get_i8 (cp_g, red_g, green_g, blue_g, alpha_g);
            (*env)->ReleaseIntArrayElements (env, red, (jint *) red_g, 0);
            (*env)->ReleaseIntArrayElements (env, green, (jint *) green_g, 0);
            (*env)->ReleaseIntArrayElements (env, blue, (jint *) blue_g, 0);
            (*env)->ReleaseIntArrayElements (env, alpha, (jint *) alpha_g, 0);
        }
    }

    /*
     * Class:     org.gnu.gnome.ColorPicker
     * Method:    gnome_color_picker_set_i16
     * Signature: (IIIII)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gnome_ColorPicker_gnome_1color_1picker_1set_1i16 (JNIEnv 
        *env, jclass cls, jint cp, jint red, jint green, jint blue, jint alpha) 
    {
        GnomeColorPicker *cp_g = (GnomeColorPicker *)cp;
        gint32 red_g = (gint32) red;
        gint32 green_g = (gint32) green;
        gint32 blue_g = (gint32) blue;
        gint32 alpha_g = (gint32) alpha;
        {
            gnome_color_picker_set_i16 (cp_g, red_g, green_g, blue_g, alpha_g);
        }
    }

    /*
     * Class:     org.gnu.gnome.ColorPicker
     * Method:    gnome_color_picker_get_i16
     * Signature: (I[Lint ;[Lint ;[Lint ;[Lint ;)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gnome_ColorPicker_gnome_1color_1picker_1get_1i16 (JNIEnv 
        *env, jclass cls, jint cp, jintArray red, jintArray green, jintArray blue, jintArray alpha) 
    {
        GnomeColorPicker *cp_g = (GnomeColorPicker *)cp;
        gushort *red_g = (gushort *) (*env)->GetIntArrayElements (env, red, NULL);
        gushort *green_g = (gushort *) (*env)->GetIntArrayElements (env, green, NULL);
        gushort *blue_g = (gushort *) (*env)->GetIntArrayElements (env, blue, NULL);
        gushort *alpha_g = (gushort *) (*env)->GetIntArrayElements (env, alpha, NULL);
        {
            gnome_color_picker_get_i16 (cp_g, red_g, green_g, blue_g, alpha_g);
            (*env)->ReleaseIntArrayElements (env, red, (jint *) red_g, 0);
            (*env)->ReleaseIntArrayElements (env, green, (jint *) green_g, 0);
            (*env)->ReleaseIntArrayElements (env, blue, (jint *) blue_g, 0);
            (*env)->ReleaseIntArrayElements (env, alpha, (jint *) alpha_g, 0);
        }
    }

    /*
     * Class:     org.gnu.gnome.ColorPicker
     * Method:    gnome_color_picker_set_dither
     * Signature: (IZ)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gnome_ColorPicker_gnome_1color_1picker_1set_1dither (JNIEnv 
        *env, jclass cls, jint cp, jboolean dither) 
    {
        GnomeColorPicker *cp_g = (GnomeColorPicker *)cp;
        gboolean dither_g = (gboolean) dither;
        {
            gnome_color_picker_set_dither (cp_g, dither_g);
        }
    }

    /*
     * Class:     org.gnu.gnome.ColorPicker
     * Method:    gnome_color_picker_get_dither
     * Signature: (I)Z
     */
    JNIEXPORT jboolean JNICALL Java_org_gnu_gnome_ColorPicker_gnome_1color_1picker_1get_1dither (
        JNIEnv *env, jclass cls, jint cp) 
    {
        GnomeColorPicker *cp_g = (GnomeColorPicker *)cp;
        {
            jboolean result_j = (jboolean) (gnome_color_picker_get_dither (cp_g));
            return result_j;
        }
    }

    /*
     * Class:     org.gnu.gnome.ColorPicker
     * Method:    gnome_color_picker_set_use_alpha
     * Signature: (IZ)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gnome_ColorPicker_gnome_1color_1picker_1set_1use_1alpha (
        JNIEnv *env, jclass cls, jint cp, jboolean useAlpha) 
    {
        GnomeColorPicker *cp_g = (GnomeColorPicker *)cp;
        gboolean useAlpha_g = (gboolean) useAlpha;
        {
            gnome_color_picker_set_use_alpha (cp_g, useAlpha_g);
        }
    }

    /*
     * Class:     org.gnu.gnome.ColorPicker
     * Method:    gnome_color_picker_get_use_alpha
     * Signature: (I)Z
     */
    JNIEXPORT jboolean JNICALL Java_org_gnu_gnome_ColorPicker_gnome_1color_1picker_1get_1use_1alpha (
        JNIEnv *env, jclass cls, jint cp) 
    {
        GnomeColorPicker *cp_g = (GnomeColorPicker *)cp;
        {
            jboolean result_j = (jboolean) (gnome_color_picker_get_use_alpha (cp_g));
            return result_j;
        }
    }

    /*
     * Class:     org.gnu.gnome.ColorPicker
     * Method:    gnome_color_picker_set_title
     * Signature: (Ijava.lang.String)V
     */
    JNIEXPORT void JNICALL Java_org_gnu_gnome_ColorPicker_gnome_1color_1picker_1set_1title (JNIEnv 
        *env, jclass cls, jint cp, jstring title) 
    {
        const gchar* title_g = (*env)->GetStringUTFChars(env, title, 0);
        gnome_color_picker_set_title ((GnomeColorPicker*)cp, title_g);
        if (title) (*env)->ReleaseStringUTFChars(env, title, title_g);
    }

    /*
     * Class:     org.gnu.gnome.ColorPicker
     * Method:    gnome_color_picker_get_title
     * Signature: (I)java.lang.String
     */
    JNIEXPORT jstring JNICALL Java_org_gnu_gnome_ColorPicker_gnome_1color_1picker_1get_1title (
        JNIEnv *env, jclass cls, jint cp) 
    {
        gchar *result_g = (gchar*)gnome_color_picker_get_title ((GnomeColorPicker*)cp);
        return (*env)->NewStringUTF(env, result_g);
    }

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

#endif
