glib (2.79.0)

(root)/
include/
glib-2.0/
gio/
gliststore.h
       1  /*
       2   * Copyright 2015 Lars Uebernickel
       3   * Copyright 2015 Ryan Lortie
       4   *
       5   * SPDX-License-Identifier: LGPL-2.1-or-later
       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
      18   * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
      19   *
      20   * Authors:
      21   *     Lars Uebernickel <lars@uebernic.de>
      22   *     Ryan Lortie <desrt@desrt.ca>
      23   */
      24  
      25  #ifndef __G_LIST_STORE_H__
      26  #define __G_LIST_STORE_H__
      27  
      28  #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
      29  #error "Only <gio/gio.h> can be included directly."
      30  #endif
      31  
      32  #include <gio/giotypes.h>
      33  
      34  G_BEGIN_DECLS
      35  
      36  #define G_TYPE_LIST_STORE (g_list_store_get_type ())
      37  GIO_AVAILABLE_IN_2_44
      38  G_DECLARE_FINAL_TYPE(GListStore, g_list_store, G, LIST_STORE, GObject)
      39  
      40  GIO_AVAILABLE_IN_2_44
      41  GListStore *            g_list_store_new                                (GType       item_type);
      42  
      43  GIO_AVAILABLE_IN_2_44
      44  void                    g_list_store_insert                             (GListStore *store,
      45                                                                           guint       position,
      46                                                                           gpointer    item);
      47  
      48  GIO_AVAILABLE_IN_2_44
      49  guint                   g_list_store_insert_sorted                      (GListStore       *store,
      50                                                                           gpointer          item,
      51                                                                           GCompareDataFunc  compare_func,
      52                                                                           gpointer          user_data);
      53  
      54  GIO_AVAILABLE_IN_2_46
      55  void                   g_list_store_sort                                (GListStore       *store,
      56                                                                           GCompareDataFunc  compare_func,
      57                                                                           gpointer          user_data);
      58  
      59  GIO_AVAILABLE_IN_2_44
      60  void                    g_list_store_append                             (GListStore *store,
      61                                                                           gpointer    item);
      62  
      63  GIO_AVAILABLE_IN_2_44
      64  void                    g_list_store_remove                             (GListStore *store,
      65                                                                           guint       position);
      66  
      67  GIO_AVAILABLE_IN_2_44
      68  void                    g_list_store_remove_all                         (GListStore *store);
      69  
      70  GIO_AVAILABLE_IN_2_44
      71  void                    g_list_store_splice                             (GListStore *store,
      72                                                                           guint       position,
      73                                                                           guint       n_removals,
      74                                                                           gpointer   *additions,
      75                                                                           guint       n_additions);
      76  
      77  GIO_AVAILABLE_IN_2_64
      78  gboolean                g_list_store_find                               (GListStore *store,
      79                                                                           gpointer    item,
      80                                                                           guint      *position);
      81  
      82  GIO_AVAILABLE_IN_2_64
      83  gboolean                g_list_store_find_with_equal_func               (GListStore *store,
      84                                                                           gpointer    item,
      85                                                                           GEqualFunc  equal_func,
      86                                                                           guint      *position);
      87  
      88  GIO_AVAILABLE_IN_2_74
      89  gboolean                g_list_store_find_with_equal_func_full          (GListStore     *store,
      90                                                                           gpointer        item,
      91                                                                           GEqualFuncFull  equal_func,
      92                                                                           gpointer        user_data,
      93                                                                           guint          *position);
      94  
      95  G_END_DECLS
      96  
      97  #endif /* __G_LIST_STORE_H__ */