/*
 * 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-01 07:00:24 EDT
 */

#include <jni.h>
#include <sys/types.h>
#include <gdk/gdk.h>
#ifdef __cplusplus
extern "C" 
{
#endif
    /****************************************
     * BEGINNING OF GENERATED CODE
     ****************************************/
    /*
     * Class:     org.gnu.gdk.Bitmap
     * Method:    gdk_bitmap_create_from_data
     * Signature: (I[BII)I
     */
    JNIEXPORT jint JNICALL Java_org_gnu_gdk_Bitmap_gdk_1bitmap_1create_1from_1data (JNIEnv *env, 
        jclass cls, jint window, jbyteArray data, jint width, jint height) 
    {
        GdkWindow *window_g = (GdkWindow *)window;
        jint data_len = (*env)->GetArrayLength(env, data);
        gchar* data_g = (gchar*)g_malloc(data_len + 1);
        gint32 width_g = (gint32) width;
        gint32 height_g = (gint32) height;
        (*env)->GetByteArrayRegion(env, data, 0, data_len, (jbyte*)data_g);
        data_g[data_len] = 0;
        {
            return (jint)gdk_bitmap_create_from_data (window_g, data_g, width_g, height_g);
        }
    }

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

#endif
