glib/gobject/gvaluearray.h
changeset 18 47c74d1534e1
equal deleted inserted replaced
0:e4d67989cc36 18:47c74d1534e1
       
     1 /* GObject - GLib Type, Object, Parameter and Signal Library
       
     2  * Copyright (C) 2001 Red Hat, Inc.
       
     3  * Portions copyright (c) 2006-2009 Nokia Corporation.  All rights reserved.
       
     4  *
       
     5  * This library is free software; you can redistribute it and/or
       
     6  * modify it under the terms of the GNU Lesser General Public
       
     7  * License as published by the Free Software Foundation; either
       
     8  * version 2 of the License, or (at your option) any later version.
       
     9  *
       
    10  * This library is distributed in the hope that it will be useful,
       
    11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
       
    13  * Lesser General Public License for more details.
       
    14  *
       
    15  * You should have received a copy of the GNU Lesser General
       
    16  * Public License along with this library; if not, write to the
       
    17  * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
       
    18  * Boston, MA 02111-1307, USA.
       
    19  *
       
    20  * gvaluearray.h: GLib array type holding GValues
       
    21  */
       
    22 #if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
       
    23 #error "Only <glib-object.h> can be included directly."
       
    24 #endif
       
    25 
       
    26 #ifndef __G_VALUE_ARRAY_H__
       
    27 #define __G_VALUE_ARRAY_H__
       
    28 
       
    29 #include	<gobject/gvalue.h>
       
    30 
       
    31 
       
    32 G_BEGIN_DECLS
       
    33 
       
    34 
       
    35 /* --- typedefs & structs --- */
       
    36 typedef struct _GValueArray GValueArray;
       
    37 /**
       
    38  * GValueArray:
       
    39  * @n_values: number of values contained in the array
       
    40  * @values: array of values
       
    41  * 
       
    42  * A #GValueArray contains an array of #GValue elements.
       
    43  */
       
    44 struct _GValueArray
       
    45 {
       
    46   guint   n_values;
       
    47   GValue *values;
       
    48 
       
    49   /*< private >*/
       
    50   guint   n_prealloced;
       
    51 };
       
    52 
       
    53 
       
    54 /* --- prototypes --- */
       
    55 IMPORT_C GValue*		g_value_array_get_nth	     (GValueArray	*value_array,
       
    56 					      guint		 index_);
       
    57 IMPORT_C GValueArray*	g_value_array_new	     (guint		 n_prealloced);
       
    58 IMPORT_C void		g_value_array_free	     (GValueArray	*value_array);
       
    59 IMPORT_C GValueArray*	g_value_array_copy	     (const GValueArray *value_array);
       
    60 IMPORT_C GValueArray*	g_value_array_prepend	     (GValueArray	*value_array,
       
    61 					      const GValue	*value);
       
    62 IMPORT_C GValueArray*	g_value_array_append	     (GValueArray	*value_array,
       
    63 					      const GValue	*value);
       
    64 IMPORT_C GValueArray*	g_value_array_insert	     (GValueArray	*value_array,
       
    65 					      guint		 index_,
       
    66 					      const GValue	*value);
       
    67 IMPORT_C GValueArray*	g_value_array_remove	     (GValueArray	*value_array,
       
    68 					      guint		 index_);
       
    69 IMPORT_C GValueArray*	g_value_array_sort	     (GValueArray	*value_array,
       
    70 					      GCompareFunc	 compare_func);
       
    71 IMPORT_C GValueArray*	g_value_array_sort_with_data (GValueArray	*value_array,
       
    72 					      GCompareDataFunc	 compare_func,
       
    73 					      gpointer		 user_data);
       
    74 
       
    75 
       
    76 G_END_DECLS
       
    77 
       
    78 #endif /* __G_VALUE_ARRAY_H__ */