2018-09-17 05:29:50 +00:00
|
|
|
/*
|
|
|
|
* Copyright © 2018 Benjamin Otte
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
* Authors: Benjamin Otte <otte@gnome.org>
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2019-10-08 22:07:07 +00:00
|
|
|
#ifndef __GTK_LIST_ITEM_FACTORY_PRIVATE_H__
|
|
|
|
#define __GTK_LIST_ITEM_FACTORY_PRIVATE_H__
|
2018-09-17 05:29:50 +00:00
|
|
|
|
2018-09-21 03:05:34 +00:00
|
|
|
#include <gtk/gtklistitem.h>
|
2019-11-03 01:23:46 +00:00
|
|
|
#include "gtk/gtklistitemwidgetprivate.h"
|
2018-09-17 05:29:50 +00:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2019-06-09 20:50:46 +00:00
|
|
|
struct _GtkListItemFactory
|
|
|
|
{
|
|
|
|
GObject parent_instance;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _GtkListItemFactoryClass
|
|
|
|
{
|
|
|
|
GObjectClass parent_class;
|
2019-06-09 22:17:44 +00:00
|
|
|
|
|
|
|
/* setup @list_item so it can be bound */
|
|
|
|
void (* setup) (GtkListItemFactory *self,
|
2019-11-03 01:23:46 +00:00
|
|
|
GtkListItemWidget *widget,
|
2019-06-09 22:17:44 +00:00
|
|
|
GtkListItem *list_item);
|
|
|
|
/* undo the effects of GtkListItemFactoryClass::setup() */
|
|
|
|
void (* teardown) (GtkListItemFactory *self,
|
2019-11-03 01:23:46 +00:00
|
|
|
GtkListItemWidget *widget,
|
2019-06-09 22:17:44 +00:00
|
|
|
GtkListItem *list_item);
|
|
|
|
|
2019-11-02 17:56:36 +00:00
|
|
|
/* Update properties on @list_item to the given @item, which is in @position and @selected state.
|
|
|
|
* One or more of those properties might be unchanged. */
|
2019-06-09 22:17:44 +00:00
|
|
|
void (* update) (GtkListItemFactory *self,
|
2019-11-03 01:23:46 +00:00
|
|
|
GtkListItemWidget *widget,
|
2019-06-09 22:17:44 +00:00
|
|
|
GtkListItem *list_item,
|
|
|
|
guint position,
|
2019-11-02 17:56:36 +00:00
|
|
|
gpointer item,
|
2019-06-09 22:17:44 +00:00
|
|
|
gboolean selected);
|
2019-06-09 20:50:46 +00:00
|
|
|
};
|
|
|
|
|
2018-10-05 21:24:18 +00:00
|
|
|
void gtk_list_item_factory_setup (GtkListItemFactory *self,
|
2019-11-03 01:23:46 +00:00
|
|
|
GtkListItemWidget *widget);
|
2019-06-09 20:50:46 +00:00
|
|
|
void gtk_list_item_factory_teardown (GtkListItemFactory *self,
|
2019-11-03 01:23:46 +00:00
|
|
|
GtkListItemWidget *widget);
|
2018-09-17 05:29:50 +00:00
|
|
|
|
2018-09-24 02:01:37 +00:00
|
|
|
void gtk_list_item_factory_update (GtkListItemFactory *self,
|
2019-11-03 01:23:46 +00:00
|
|
|
GtkListItemWidget *widget,
|
2018-09-29 20:34:43 +00:00
|
|
|
guint position,
|
2019-11-02 17:56:36 +00:00
|
|
|
gpointer item,
|
2018-09-29 20:34:43 +00:00
|
|
|
gboolean selected);
|
2018-09-17 05:29:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
2019-10-08 22:07:07 +00:00
|
|
|
#endif /* __GTK_LIST_ITEM_FACTORY_PRIVATE_H__ */
|