1/*
2 * Copyright © 2018 Benjamin Otte
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
16 *
17 * Authors: Benjamin Otte <otte@gnome.org>
18 */
19
20
21#ifndef __GTK_LIST_ITEM_FACTORY_PRIVATE_H__
22#define __GTK_LIST_ITEM_FACTORY_PRIVATE_H__
23
24#include <gtk/gtklistitem.h>
25#include "gtk/gtklistitemwidgetprivate.h"
26
27G_BEGIN_DECLS
28
29struct _GtkListItemFactory
30{
31 GObject parent_instance;
32};
33
34struct _GtkListItemFactoryClass
35{
36 GObjectClass parent_class;
37
38 /* setup @list_item so it can be bound */
39 void (* setup) (GtkListItemFactory *self,
40 GtkListItemWidget *widget,
41 GtkListItem *list_item);
42 /* undo the effects of GtkListItemFactoryClass::setup() */
43 void (* teardown) (GtkListItemFactory *self,
44 GtkListItemWidget *widget,
45 GtkListItem *list_item);
46
47 /* Update properties on @list_item to the given @item, which is in @position and @selected state.
48 * One or more of those properties might be unchanged. */
49 void (* update) (GtkListItemFactory *self,
50 GtkListItemWidget *widget,
51 GtkListItem *list_item,
52 guint position,
53 gpointer item,
54 gboolean selected);
55};
56
57void gtk_list_item_factory_setup (GtkListItemFactory *self,
58 GtkListItemWidget *widget);
59void gtk_list_item_factory_teardown (GtkListItemFactory *self,
60 GtkListItemWidget *widget);
61
62void gtk_list_item_factory_update (GtkListItemFactory *self,
63 GtkListItemWidget *widget,
64 guint position,
65 gpointer item,
66 gboolean selected);
67
68
69G_END_DECLS
70
71#endif /* __GTK_LIST_ITEM_FACTORY_PRIVATE_H__ */
72

source code of gtk/gtk/gtklistitemfactoryprivate.h