X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;ds=sidebyside;f=glib%2Fgslist.h;h=9d6e50a360c3f159e7bd88106882fca92146e119;hb=2a53b4d0e2c98a14aedf31e38f0ad1fb2e8fe26f;hp=8ef540882c3041a2809def0f9d93d7310a3ffb08;hpb=dd1878cd757c8d65a349f54a4acb40e07308437a;p=platform%2Fupstream%2Fglib.git diff --git a/glib/gslist.h b/glib/gslist.h index 8ef5408..9d6e50a 100644 --- a/glib/gslist.h +++ b/glib/gslist.h @@ -12,22 +12,25 @@ * 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, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library; if not, see . */ /* * Modified by the GLib Team and others 1997-2000. See the AUTHORS * file for a list of people on the GLib Team. See the ChangeLog * files for a list of changes. These files are distributed with - * GLib at ftp://ftp.gtk.org/pub/gtk/. + * GLib at ftp://ftp.gtk.org/pub/gtk/. */ #ifndef __G_SLIST_H__ #define __G_SLIST_H__ +#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) +#error "Only can be included directly." +#endif + #include +#include G_BEGIN_DECLS @@ -41,70 +44,100 @@ struct _GSList /* Singly linked lists */ +GLIB_AVAILABLE_IN_ALL GSList* g_slist_alloc (void) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL void g_slist_free (GSList *list); +GLIB_AVAILABLE_IN_ALL void g_slist_free_1 (GSList *list); #define g_slist_free1 g_slist_free_1 +GLIB_AVAILABLE_IN_ALL +void g_slist_free_full (GSList *list, + GDestroyNotify free_func); +GLIB_AVAILABLE_IN_ALL GSList* g_slist_append (GSList *list, gpointer data) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL GSList* g_slist_prepend (GSList *list, gpointer data) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL GSList* g_slist_insert (GSList *list, gpointer data, gint position) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL GSList* g_slist_insert_sorted (GSList *list, gpointer data, GCompareFunc func) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL GSList* g_slist_insert_sorted_with_data (GSList *list, gpointer data, GCompareDataFunc func, gpointer user_data) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL GSList* g_slist_insert_before (GSList *slist, GSList *sibling, gpointer data) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL GSList* g_slist_concat (GSList *list1, GSList *list2) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL GSList* g_slist_remove (GSList *list, gconstpointer data) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL GSList* g_slist_remove_all (GSList *list, gconstpointer data) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL GSList* g_slist_remove_link (GSList *list, GSList *link_) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL GSList* g_slist_delete_link (GSList *list, GSList *link_) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL GSList* g_slist_reverse (GSList *list) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL GSList* g_slist_copy (GSList *list) G_GNUC_WARN_UNUSED_RESULT; + +GLIB_AVAILABLE_IN_2_34 +GSList* g_slist_copy_deep (GSList *list, + GCopyFunc func, + gpointer user_data) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL GSList* g_slist_nth (GSList *list, guint n); +GLIB_AVAILABLE_IN_ALL GSList* g_slist_find (GSList *list, gconstpointer data); +GLIB_AVAILABLE_IN_ALL GSList* g_slist_find_custom (GSList *list, gconstpointer data, GCompareFunc func); +GLIB_AVAILABLE_IN_ALL gint g_slist_position (GSList *list, GSList *llink); +GLIB_AVAILABLE_IN_ALL gint g_slist_index (GSList *list, gconstpointer data); +GLIB_AVAILABLE_IN_ALL GSList* g_slist_last (GSList *list); +GLIB_AVAILABLE_IN_ALL guint g_slist_length (GSList *list); +GLIB_AVAILABLE_IN_ALL void g_slist_foreach (GSList *list, GFunc func, gpointer user_data); +GLIB_AVAILABLE_IN_ALL GSList* g_slist_sort (GSList *list, GCompareFunc compare_func) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL GSList* g_slist_sort_with_data (GSList *list, GCompareDataFunc compare_func, gpointer user_data) G_GNUC_WARN_UNUSED_RESULT; +GLIB_AVAILABLE_IN_ALL gpointer g_slist_nth_data (GSList *list, guint n); #define g_slist_next(slist) ((slist) ? (((GSList *)(slist))->next) : NULL) -#ifndef G_DISABLE_DEPRECATED -void g_slist_push_allocator (gpointer dummy); -void g_slist_pop_allocator (void); -#endif G_END_DECLS #endif /* __G_SLIST_H__ */ -