1 /* -*- Mode: C; c-basic-offset: 4 -*- 2 * pygtk- Python bindings for the GTK toolkit. 3 * Copyright (C) 1998-2003 James Henstridge 4 * 5 * pygtktreemodel.h: stub class to help implement tree models. 6 * 7 * This library is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU Lesser General Public 9 * License as published by the Free Software Foundation; either 10 * version 2.1 of the License, or (at your option) any later version. 11 * 12 * This library is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * Lesser General Public License for more details. 16 * 17 * You should have received a copy of the GNU Lesser General Public 18 * License along with this library; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 20 * USA 21 */ 22 23 #include <Python.h> 24 25 #include <gtk/gtk.h> 26 27 #define PYGTK_TYPE_GENERIC_TREE_MODEL (pygtk_generic_tree_model_get_type()) 28 #define PYGTK_GENERIC_TREE_MODEL(object) (G_TYPE_CHECK_INSTANCE_CAST((object), PYGTK_TYPE_GENERIC_TREE_MODEL, PyGtkGenericTreeModel)) 29 #define PYGTK_GENERIC_TREE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PYGTK_TYPE_GENERIC_TREE_MODEL, PyGtkGenericTreeModelClass)) 30 #define PYGTK_IS_GENERIC_TREE_MODEL(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), PYGTK_TYPE_GENERIC_TREE_MODEL)) 31 #define PYGTK_IS_GENERIC_TREE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PYGTK_TYPE_GENERIC_TREE_MODEL)) 32 #define PYGTK_GENERIC_TREE_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PYGTK_TYPE_GENERIC_TREE_MODEL, PyGtkGenericTreeModelClass)) 33 34 typedef struct _PyGtkGenericTreeModel PyGtkGenericTreeModel; 35 typedef struct _PyGtkGenericTreeModelClass PyGtkGenericTreeModelClass; 36 37 struct _PyGtkGenericTreeModel { 38 GObject parent_instance; 39 40 gboolean leak_references; 41 gint stamp; 42 }; 43 44 struct _PyGtkGenericTreeModelClass { 45 GObjectClass parent_class; 46 }; 47 48 GType pygtk_generic_tree_model_get_type (void); 49 PyGtkGenericTreeModel * pygtk_generic_tree_model_new (void); 50 void pygtk_generic_tree_model_invalidate_iters(PyGtkGenericTreeModel *); 51 gboolean pygtk_generic_tree_model_iter_is_valid(PyGtkGenericTreeModel *, 52 GtkTreeIter *); 53 PyObject * pygtk_generic_tree_model_get_user_data(PyGtkGenericTreeModel *, 54 GtkTreeIter *); 55 GtkTreeIter pygtk_generic_tree_model_create_tree_iter(PyGtkGenericTreeModel *, 56 PyObject *); 57