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

#include <jni.h>
#include <sys/types.h>
#include <gtk/gtk.h>
#ifdef __cplusplus
extern "C" 
{
#endif
	// TODO: Fix the following properties.
    JNIEXPORT void JNICALL 
    Java_org_gnu_gtk_CellRendererText_gtk_1setAttributes (
        JNIEnv *env, jclass cls, jint renderer, jint attr) 
    {
        GtkCellRendererText *renderer_g = (GtkCellRendererText *)renderer;
		g_object_set(renderer_g, "attributes", attr);
	}

    JNIEXPORT void JNICALL 
    Java_org_gnu_gtk_CellRendererText_gtk_1setFont (
        JNIEnv *env, jclass cls, jint renderer, jint font) 
    {
        GtkCellRendererText *renderer_g = (GtkCellRendererText *)renderer;
		g_object_set( renderer_g, "font-desc", font);
	}

    JNIEXPORT jint JNICALL 
    Java_org_gnu_gtk_CellRendererText_gtk_1getFont (
        JNIEnv *env, jclass cls, jint renderer) 
    {
        GtkCellRendererText *renderer_g = (GtkCellRendererText *)renderer;
		PangoFontDescription *desc = pango_font_description_new();
		g_object_get( renderer_g, "font-desc", desc);
		return (jint) desc;
	}
	

    JNIEXPORT void JNICALL 
    Java_org_gnu_gtk_CellRendererText_gtk_1setProperty (
        JNIEnv *env, jclass cls, jint renderer, jstring property, jboolean setting) 
    {
        GtkCellRendererText *renderer_g = (GtkCellRendererText *)renderer;
		const char* property_utf =  (*env)->GetStringUTFChars(env, property, NULL);
		g_object_set( renderer_g,  property_utf, setting, NULL);
	}

    /****************************************
     * BEGINNING OF GENERATED CODE
     ****************************************/
    /*
     * Class:     org.gnu.gtk.CellRendererText
     * Method:    gtk_cell_renderer_text_get_type
     * Signature: ()I
     */
    JNIEXPORT jint JNICALL Java_org_gnu_gtk_CellRendererText_gtk_1cell_1renderer_1text_1get_1type (
        JNIEnv *env, jclass cls) 
    {
        {
            return (jint)gtk_cell_renderer_text_get_type ();
        }
    }

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

    /*
     * Class:     org.gnu.gtk.CellRendererText
     * Method:    gtk_cell_renderer_text_set_fixed_height_from_font
     * Signature: (II)V
     */
    JNIEXPORT void JNICALL 
    Java_org_gnu_gtk_CellRendererText_gtk_1cell_1renderer_1text_1set_1fixed_1height_1from_1font (
        JNIEnv *env, jclass cls, jint renderer, jint numberOfRows) 
    {
        GtkCellRendererText *renderer_g = (GtkCellRendererText *)renderer;
        gint32 numberOfRows_g = (gint32) numberOfRows;
        {
            gtk_cell_renderer_text_set_fixed_height_from_font (renderer_g, numberOfRows_g);
        }
    }

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

#endif
