Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:59:58

0001 /*
0002  * Copyright 2015 Lars Uebernickel
0003  * Copyright 2015 Ryan Lortie
0004  *
0005  * SPDX-License-Identifier: LGPL-2.1-or-later
0006  *
0007  * This library is free software; you can redistribute it and/or
0008  * modify it under the terms of the GNU Lesser General Public
0009  * License as published by the Free Software Foundation; either
0010  * version 2.1 of the License, or (at your option) any later version.
0011  *
0012  * This library is distributed in the hope that it will be useful,
0013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0015  * Lesser General Public License for more details.
0016  *
0017  * You should have received a copy of the GNU Lesser General
0018  * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
0019  *
0020  * Authors:
0021  *     Lars Uebernickel <lars@uebernic.de>
0022  *     Ryan Lortie <desrt@desrt.ca>
0023  */
0024 
0025 #ifndef __G_LIST_MODEL_H__
0026 #define __G_LIST_MODEL_H__
0027 
0028 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
0029 #error "Only <gio/gio.h> can be included directly."
0030 #endif
0031 
0032 #include <gio/giotypes.h>
0033 
0034 G_BEGIN_DECLS
0035 
0036 #define G_TYPE_LIST_MODEL g_list_model_get_type ()
0037 GIO_AVAILABLE_IN_2_44
0038 G_DECLARE_INTERFACE(GListModel, g_list_model, G, LIST_MODEL, GObject)
0039 
0040 struct _GListModelInterface
0041 {
0042   GTypeInterface g_iface;
0043 
0044   GType     (* get_item_type)   (GListModel *list);
0045 
0046   guint     (* get_n_items)     (GListModel *list);
0047 
0048   gpointer  (* get_item)        (GListModel *list,
0049                                  guint       position);
0050 };
0051 
0052 GIO_AVAILABLE_IN_2_44
0053 GType                   g_list_model_get_item_type                      (GListModel *list);
0054 
0055 GIO_AVAILABLE_IN_2_44
0056 guint                   g_list_model_get_n_items                        (GListModel *list);
0057 
0058 GIO_AVAILABLE_IN_2_44
0059 gpointer                g_list_model_get_item                           (GListModel *list,
0060                                                                          guint       position);
0061 
0062 GIO_AVAILABLE_IN_2_44
0063 GObject *               g_list_model_get_object                         (GListModel *list,
0064                                                                          guint       position);
0065 
0066 GIO_AVAILABLE_IN_2_44
0067 void                    g_list_model_items_changed                      (GListModel *list,
0068                                                                          guint       position,
0069                                                                          guint       removed,
0070                                                                          guint       added);
0071 
0072 G_END_DECLS
0073 
0074 #endif /* __G_LIST_MODEL_H__ */