/*
 * Java-Gnome Bindings Library
 *
 * Copyright 1998-2004 the Java-Gnome Team, all rights reserved.
 *
 * The Java-Gnome bindings library is free software distributed under
 * the terms of the GNU Library General Public License version 2.
 */

#include <jni.h>
#include <sys/types.h>
#include <gtk/gtk.h>
#ifdef __cplusplus
extern "C" 
{
#endif


//GtkTreePath * GtkListStore_get_root (GtkListStore * cptr) 
//{
//    return cptr->root;
//}
//
///*
// * Class:     org.gnu.gtk.ListStore
// * Method:    getRoot
// * Signature: (I)I
// */
//JNIEXPORT jint JNICALL Java_org_gnu_gtk_ListStore_getRoot (JNIEnv *env, jclass cls, jint cptr) 
//{
//    GtkListStore *cptr_g = (GtkListStore *)cptr;
//    {
//        return (jint)GtkListStore_get_root (cptr_g);
//    }
//}
//
//void GtkListStore_set_root (GtkListStore * cptr, GtkTreePath * root) 
//{
//    cptr->root = root;
//}
//
///*
// * Class:     org.gnu.gtk.ListStore
// * Method:    setRoot
// * Signature: (II)V
// */
//JNIEXPORT void JNICALL Java_org_gnu_gtk_ListStore_setRoot (JNIEnv *env, jint cptr, jint root) 
//{
//    GtkListStore *cptr_g = (GtkListStore *)cptr;
//    GtkTreePath *root_g = (GtkTreePath *)root;
//    {
//        GtkListStore_set_root (cptr_g, root_g);
//    }
//}
//
//GtkTreePath * GtkListStore_get_tail (GtkListStore * cptr) 
//{
//    return cptr->tail;
//}
//
///*
// * Class:     org.gnu.gtk.ListStore
// * Method:    getTail
// * Signature: (I)I
// */
//JNIEXPORT jint JNICALL Java_org_gnu_gtk_ListStore_getTail (JNIEnv *env, jclass cls, jint cptr) 
//{
//    GtkListStore *cptr_g = (GtkListStore *)cptr;
//    {
//        return (jint)GtkListStore_get_tail (cptr_g);
//    }
//}
//
//void GtkListStore_set_tail (GtkListStore * cptr, GtkTreePath * tail) 
//{
//    cptr->tail = tail;
//}
//
///*
// * Class:     org.gnu.gtk.ListStore
// * Method:    setTail
// * Signature: (II)V
// */
//JNIEXPORT void JNICALL Java_org_gnu_gtk_ListStore_setTail (JNIEnv *env, jint cptr, jint tail) 
//{
//    GtkListStore *cptr_g = (GtkListStore *)cptr;
//    GtkTreePath *tail_g = (GtkTreePath *)tail;
//    {
//        GtkListStore_set_tail (cptr_g, tail_g);
//    }
//}
//
//gint32 GtkListStore_get_n_columns (GtkListStore * cptr) 
//{
//    return cptr->n_columns;
//}
//
///*
// * Class:     org.gnu.gtk.ListStore
// * Method:    getNColumns
// * Signature: (I)I
// */
//JNIEXPORT jint JNICALL Java_org_gnu_gtk_ListStore_getNColumns (JNIEnv *env, jclass cls, jint 
//    cptr) 
//{
//    GtkListStore *cptr_g = (GtkListStore *)cptr;
//    {
//        jint result_j = (jint) (GtkListStore_get_n_columns (cptr_g));
//        return result_j;
//    }
//}
//
//void GtkListStore_set_n_columns (GtkListStore * cptr, gint32 n_columns) 
//{
//    cptr->n_columns = n_columns;
//}
//
///*
// * Class:     org.gnu.gtk.ListStore
// * Method:    setNColumns
// * Signature: (II)V
// */
//JNIEXPORT void JNICALL Java_org_gnu_gtk_ListStore_setNColumns (JNIEnv *env, jint cptr, jint 
//    n_columns) 
//{
//    GtkListStore *cptr_g = (GtkListStore *)cptr;
//    gint32 n_columns_g = (gint32) n_columns;
//    {
//        GtkListStore_set_n_columns (cptr_g, n_columns_g);
//    }
//}

gint32 GtkListStore_get_sort_column_id (GtkListStore * cptr) 
{
    return cptr->sort_column_id;
}

/*
 * Class:     org.gnu.gtk.ListStore
 * Method:    getSortColumnId
 * Signature: (I)I
 */
JNIEXPORT jint JNICALL Java_org_gnu_gtk_ListStore_getSortColumnId (JNIEnv *env, jclass cls, 
    jint cptr) 
{
    GtkListStore *cptr_g = (GtkListStore *)cptr;
    {
        jint result_j = (jint) (GtkListStore_get_sort_column_id (cptr_g));
        return result_j;
    }
}

void GtkListStore_set_sort_column_id (GtkListStore * cptr, gint32 sort_column_id) 
{
    cptr->sort_column_id = sort_column_id;
}

/*
 * Class:     org.gnu.gtk.ListStore
 * Method:    setSortColumnId
 * Signature: (II)V
 */
JNIEXPORT void JNICALL Java_org_gnu_gtk_ListStore_setSortColumnId (JNIEnv *env, jint cptr, jint 
    sort_column_id) 
{
    GtkListStore *cptr_g = (GtkListStore *)cptr;
    gint32 sort_column_id_g = (gint32) sort_column_id;
    {
        GtkListStore_set_sort_column_id (cptr_g, sort_column_id_g);
    }
}

GtkSortType GtkListStore_get_order (GtkListStore * cptr) 
{
    return cptr->order;
}

/*
 * Class:     org.gnu.gtk.ListStore
 * Method:    getOrder
 * Signature: (I)I
 */
JNIEXPORT jint JNICALL Java_org_gnu_gtk_ListStore_getOrder (JNIEnv *env, jclass cls, jint cptr) 
{
    GtkListStore *cptr_g = (GtkListStore *)cptr;
    {
        jint result_j = (jint) (GtkListStore_get_order (cptr_g));
        return result_j;
    }
}

void GtkListStore_set_order (GtkListStore * cptr, GtkSortType order) 
{
    cptr->order = order;
}

/*
 * Class:     org.gnu.gtk.ListStore
 * Method:    setOrder
 * Signature: (II)V
 */
JNIEXPORT void JNICALL Java_org_gnu_gtk_ListStore_setOrder (JNIEnv *env, jint cptr, jint order) 
{
    GtkListStore *cptr_g = (GtkListStore *)cptr;
    GtkSortType order_g = (GtkSortType) order;
    {
        GtkListStore_set_order (cptr_g, order_g);
    }
}

//GType * GtkListStore_get_column_headers (GtkListStore * cptr) 
//{
//    return cptr->column_headers;
//}
//
///*
// * Class:     org.gnu.gtk.ListStore
// * Method:    getColumnHeaders
// * Signature: (I)I
// */
//JNIEXPORT jint JNICALL Java_org_gnu_gtk_ListStore_getColumnHeaders (JNIEnv *env, jclass cls, 
//    jint cptr) 
//{
//    GtkListStore *cptr_g = (GtkListStore *)cptr;
//    {
//        return (jint)GtkListStore_get_column_headers (cptr_g);
//    }
//}
//
//void GtkListStore_set_column_headers (GtkListStore * cptr, GType * column_headers) 
//{
//    cptr->column_headers = column_headers;
//}
//
///*
// * Class:     org.gnu.gtk.ListStore
// * Method:    setColumnHeaders
// * Signature: (II)V
// */
//JNIEXPORT void JNICALL Java_org_gnu_gtk_ListStore_setColumnHeaders (JNIEnv *env, jint cptr, 
//    jint column_headers) 
//{
//    GtkListStore *cptr_g = (GtkListStore *)cptr;
//    GType *column_headers_g = (GType *)column_headers;
//    {
//        GtkListStore_set_column_headers (cptr_g, column_headers_g);
//    }
//}
//
//gint32 GtkListStore_get_length (GtkListStore * cptr) 
//{
//    return cptr->length;
//}
//
///*
// * Class:     org.gnu.gtk.ListStore
// * Method:    getLength
// * Signature: (I)I
// */
//JNIEXPORT jint JNICALL Java_org_gnu_gtk_ListStore_getLength (JNIEnv *env, jclass cls, jint cptr)
//{
//    GtkListStore *cptr_g = (GtkListStore *)cptr;
//    {
//        jint result_j = (jint) (GtkListStore_get_length (cptr_g));
//        return result_j;
//    }
//}
//
//void GtkListStore_set_length (GtkListStore * cptr, gint32 length) 
//{
//    cptr->length = length;
//}
//
///*
// * Class:     org.gnu.gtk.ListStore
// * Method:    setLength
// * Signature: (II)V
// */
//JNIEXPORT void JNICALL Java_org_gnu_gtk_ListStore_setLength (JNIEnv *env, jint cptr, jint 
//    length) 
//{
//    GtkListStore *cptr_g = (GtkListStore *)cptr;
//    gint32 length_g = (gint32) length;
//    {
//        GtkListStore_set_length (cptr_g, length_g);
//    }
//}
//
//gboolean GtkListStore_get_columns_dirty (GtkListStore * cptr) 
//{
//    return cptr->columns_dirty;
//}
//
///*
// * Class:     org.gnu.gtk.ListStore
// * Method:    getColumnsDirty
// * Signature: (I)Z
// */
//JNIEXPORT jboolean JNICALL Java_org_gnu_gtk_ListStore_getColumnsDirty (JNIEnv *env, jclass cls, 
//    jint cptr) 
//{
//    GtkListStore *cptr_g = (GtkListStore *)cptr;
//    {
//        jboolean result_j = (jboolean) (GtkListStore_get_columns_dirty (cptr_g));
//        return result_j;
//    }
//}
//
//void GtkListStore_set_columns_dirty (GtkListStore * cptr, gboolean columns_dirty) 
//{
//    cptr->columns_dirty = columns_dirty;
//}
//
///*
// * Class:     org.gnu.gtk.ListStore
// * Method:    setColumnsDirty
// * Signature: (IZ)V
// */
//JNIEXPORT void JNICALL Java_org_gnu_gtk_ListStore_setColumnsDirty (JNIEnv *env, jint cptr, 
//    jboolean columns_dirty) 
//{
//    GtkListStore *cptr_g = (GtkListStore *)cptr;
//    gboolean columns_dirty_g = (gboolean) columns_dirty;
//    {
//        GtkListStore_set_columns_dirty (cptr_g, columns_dirty_g);
//    }
//}

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

/*
 * Class:     org.gnu.gtk.ListStore
 * Method:    gtk_list_store_newv
 * Signature: (I[Lint ;)I
 */
JNIEXPORT jint JNICALL Java_org_gnu_gtk_ListStore_gtk_1list_1store_1newv (JNIEnv *env, jclass 
    cls, jint numColumns, jintArray types) 
{
    gint32 numColumns_g = (gint32) numColumns;
    gint *types_g_g = (gint *) (*env)->GetIntArrayElements (env, types, NULL);
    GType *types_g = (GType *)types_g_g;
    {
        return (jint)gtk_list_store_newv (numColumns_g, types_g);
    }
}

/*
 * Class:     org.gnu.gtk.ListStore
 * Method:    gtk_list_store_set_column_types
 * Signature: (II[Lint ;)V
 */
JNIEXPORT void JNICALL Java_org_gnu_gtk_ListStore_gtk_1list_1store_1set_1column_1types (JNIEnv 
    *env, jclass cls, jint listStore, jint numColumns, jintArray types) 
{
    GtkListStore *listStore_g = (GtkListStore *)listStore;
    gint32 numColumns_g = (gint32) numColumns;
    gint *types_g_g = (gint *) (*env)->GetIntArrayElements (env, types, NULL);
    GType *types_g = (GType *)types_g_g;
    {
        gtk_list_store_set_column_types (listStore_g, numColumns_g, types_g);
        (*env)->ReleaseIntArrayElements (env, types, (jint*)types_g_g, 0);
    }
}

/*
 * Class:     org.gnu.gtk.ListStore
 * Method:    gtk_list_store_set_value
 * Signature: (IIII)V
 */
JNIEXPORT void JNICALL Java_org_gnu_gtk_ListStore_gtk_1list_1store_1set_1value (JNIEnv *env, 
    jclass cls, jint listStore, jint iter, jint column, jint value) 
{
    GtkListStore *listStore_g = (GtkListStore *)listStore;
    GtkTreeIter *iter_g = (GtkTreeIter *)iter;
    gint32 column_g = (gint32) column;
    GValue *value_g = (GValue *)value;
    {
        gtk_list_store_set_value (listStore_g, iter_g, column_g, value_g);
    }
}

/*
 * Class:     org.gnu.gtk.ListStore
 * Method:    gtk_list_store_remove
 * Signature: (II)B
 */
JNIEXPORT jboolean JNICALL Java_org_gnu_gtk_ListStore_gtk_1list_1store_1remove (JNIEnv *env, jclass 
    cls, jint listStore, jint iter) 
{
    GtkListStore *listStore_g = (GtkListStore *)listStore;
    GtkTreeIter *iter_g = (GtkTreeIter *)iter;
	return gtk_list_store_remove (listStore_g, iter_g);
}

/*
 * Class:     org.gnu.gtk.ListStore
 * Method:    gtk_list_store_insert
 * Signature: (II)I
 */
JNIEXPORT jint JNICALL Java_org_gnu_gtk_ListStore_gtk_1list_1store_1insert (JNIEnv *env, jclass 
    cls, jint listStore, jint position) 
{
    GtkListStore *listStore_g = (GtkListStore *)listStore;
    GtkTreeIter *iter_g = (GtkTreeIter *)g_malloc(sizeof(GtkTreeIter));
    gint32 position_g = (gint32) position;
	gtk_list_store_insert (listStore_g, iter_g, position_g);
	return (jint)iter_g;
}

/*
 * Class:     org.gnu.gtk.ListStore
 * Method:    gtk_list_store_insert_before
 * Signature: (II)I
 */
JNIEXPORT jint JNICALL Java_org_gnu_gtk_ListStore_gtk_1list_1store_1insert_1before (JNIEnv 
    *env, jclass cls, jint listStore, jint sibling) 
{
    GtkListStore *listStore_g = (GtkListStore *)listStore;
    GtkTreeIter *iter_g = (GtkTreeIter *)g_malloc(sizeof(GtkTreeIter));
    GtkTreeIter *sibling_g = (GtkTreeIter *)sibling;
	gtk_list_store_insert_before (listStore_g, iter_g, sibling_g);
	return (jint)iter_g;
}

/*
 * Class:     org.gnu.gtk.ListStore
 * Method:    gtk_list_store_insert_after
 * Signature: (II)I
 */
JNIEXPORT jint JNICALL Java_org_gnu_gtk_ListStore_gtk_1list_1store_1insert_1after (JNIEnv *env, 
    jclass cls, jint listStore, jint sibling) 
{
    GtkListStore *listStore_g = (GtkListStore *)listStore;
    GtkTreeIter *iter_g = (GtkTreeIter *)g_malloc(sizeof(GtkTreeIter));
    GtkTreeIter *sibling_g = (GtkTreeIter *)sibling;
	gtk_list_store_insert_after (listStore_g, iter_g, sibling_g);
	return (jint)iter_g;
}

/*
 * Class:     org.gnu.gtk.ListStore
 * Method:    gtk_list_store_prepend
 * Signature: (I)I
 */
JNIEXPORT jint JNICALL Java_org_gnu_gtk_ListStore_gtk_1list_1store_1prepend (JNIEnv *env, 
    jclass cls, jint listStore) 
{
    GtkListStore *listStore_g = (GtkListStore *)listStore;
    GtkTreeIter *iter_g = (GtkTreeIter *)g_malloc(sizeof(GtkTreeIter));
	gtk_list_store_prepend (listStore_g, iter_g);
	return (jint)iter_g;
}

/*
 * Class:     org.gnu.gtk.ListStore
 * Method:    gtk_list_store_append
 * Signature: (I)I
 */
JNIEXPORT jint JNICALL Java_org_gnu_gtk_ListStore_gtk_1list_1store_1append (JNIEnv *env, jclass 
    cls, jint listStore) 
{
    GtkListStore *listStore_g = (GtkListStore *)listStore;
    GtkTreeIter *iter_g = (GtkTreeIter *)g_malloc(sizeof(GtkTreeIter));
	gtk_list_store_append (listStore_g, iter_g);
	return (jint)iter_g;
}

/*
 * Class:     org.gnu.gtk.ListStore
 * Method:    gtk_list_store_clear
 * Signature: (I)V
 */
JNIEXPORT void JNICALL Java_org_gnu_gtk_ListStore_gtk_1list_1store_1clear (JNIEnv *env, jclass 
    cls, jint listStore) 
{
    GtkListStore *listStore_g = (GtkListStore *)listStore;
    {
        gtk_list_store_clear (listStore_g);
    }
}

/*
 * Class:     org_gnu_gtk_ListStore
 * Method:    gtk_list_store_iter_is_valid
 * Signature: (II)Z
 */
JNIEXPORT jboolean JNICALL Java_org_gnu_gtk_ListStore_gtk_1list_1store_1iter_1is_1valid
  (JNIEnv *env, jclass cls, jint store, jint iter)
{
	return (jboolean)gtk_list_store_iter_is_valid((GtkListStore*)store, (GtkTreeIter*)iter);
}
                                                                                         
/*
 * Class:     org_gnu_gtk_ListStore
 * Method:    gtk_list_store_reorder
 * Signature: (I[I)V
 */
JNIEXPORT void JNICALL Java_org_gnu_gtk_ListStore_gtk_1list_1store_1reorder
  (JNIEnv *env, jclass cls, jint store, jintArray order)
{
	gint* newOrder = (gint*)(*env)->GetIntArrayElements(env, order, NULL);
	gtk_list_store_reorder((GtkListStore*)store, newOrder);
}
                                                                                         
/*
 * Class:     org_gnu_gtk_ListStore
 * Method:    gtk_list_store_swap
 * Signature: (III)V
 */
JNIEXPORT void JNICALL Java_org_gnu_gtk_ListStore_gtk_1list_1store_1swap
  (JNIEnv *env, jclass cls, jint store, jint a, jint b)
{
	gtk_list_store_swap((GtkListStore*)store, (GtkTreeIter*)a, (GtkTreeIter*)b);
}
                                                                                         
/*
 * Class:     org_gnu_gtk_ListStore
 * Method:    gtk_list_store_move_after
 * Signature: (III)V
 */
JNIEXPORT void JNICALL Java_org_gnu_gtk_ListStore_gtk_1list_1store_1move_1after
  (JNIEnv *env, jclass cls, jint store, jint iter, jint pos)
{
	gtk_list_store_move_after((GtkListStore*)store, (GtkTreeIter*)iter, (GtkTreeIter*)pos);
}
                                                                                         
/*
 * Class:     org_gnu_gtk_ListStore
 * Method:    gtk_list_store_move_before
 * Signature: (III)V
 */
JNIEXPORT void JNICALL Java_org_gnu_gtk_ListStore_gtk_1list_1store_1move_1before
  (JNIEnv *env, jclass cls, jint store, jint iter, jint pos)
{
	gtk_list_store_move_before((GtkListStore*)store, (GtkTreeIter*)iter, (GtkTreeIter*)pos);
}

#ifdef __cplusplus
}

#endif
