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