os/ossrv/ossrv_pub/gboxed/inc/stdapis/glib-2.0/gobject/gboxed.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
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) 2000-2001 Red Hat, Inc.
sl@0
     3
 * Portions copyright (c) 2006 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
#if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
sl@0
    21
#error "Only <glib-object.h> can be included directly."
sl@0
    22
#endif
sl@0
    23
sl@0
    24
#ifndef __G_BOXED_H__
sl@0
    25
#define __G_BOXED_H__
sl@0
    26
sl@0
    27
#include <_ansi.h>
sl@0
    28
#include        <gobject/gtype.h>
sl@0
    29
sl@0
    30
G_BEGIN_DECLS
sl@0
    31
sl@0
    32
/* --- type macros --- */
sl@0
    33
#define G_TYPE_IS_BOXED(type)	   (G_TYPE_FUNDAMENTAL (type) == G_TYPE_BOXED)
sl@0
    34
#define G_VALUE_HOLDS_BOXED(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_BOXED))
sl@0
    35
sl@0
    36
sl@0
    37
/* --- typedefs --- */
sl@0
    38
typedef gpointer (*GBoxedCopyFunc)	(gpointer	 boxed);
sl@0
    39
typedef void     (*GBoxedFreeFunc)	(gpointer	 boxed);
sl@0
    40
sl@0
    41
sl@0
    42
/* --- prototypes --- */
sl@0
    43
IMPORT_C gpointer	g_boxed_copy			(GType		 boxed_type,
sl@0
    44
						 gconstpointer	 src_boxed);
sl@0
    45
IMPORT_C void		g_boxed_free			(GType		 boxed_type,
sl@0
    46
						 gpointer	 boxed);
sl@0
    47
IMPORT_C void		g_value_set_boxed		(GValue		*value,
sl@0
    48
						 gconstpointer	 v_boxed);
sl@0
    49
IMPORT_C void		g_value_set_static_boxed	(GValue		*value,
sl@0
    50
						 gconstpointer	 v_boxed);
sl@0
    51
IMPORT_C gpointer	g_value_get_boxed		(const GValue	*value);
sl@0
    52
IMPORT_C gpointer	g_value_dup_boxed		(const GValue	*value);
sl@0
    53
sl@0
    54
sl@0
    55
/* --- convenience --- */
sl@0
    56
IMPORT_C GType	g_boxed_type_register_static		(const gchar	*name,
sl@0
    57
						 GBoxedCopyFunc	 boxed_copy,
sl@0
    58
						 GBoxedFreeFunc	 boxed_free);
sl@0
    59
sl@0
    60
sl@0
    61
/* --- GLib boxed types --- */
sl@0
    62
#define	G_TYPE_CLOSURE		(g_closure_get_type ())
sl@0
    63
#define	G_TYPE_VALUE		(g_value_get_type ())
sl@0
    64
#define	G_TYPE_VALUE_ARRAY	(g_value_array_get_type ())
sl@0
    65
#define	G_TYPE_DATE	        (g_date_get_type ())
sl@0
    66
#define	G_TYPE_STRV	        (g_strv_get_type ())
sl@0
    67
#define	G_TYPE_GSTRING		(g_gstring_get_type ())
sl@0
    68
#define	G_TYPE_HASH_TABLE	(g_hash_table_get_type ())
sl@0
    69
sl@0
    70
sl@0
    71
IMPORT_C void    g_value_take_boxed      (GValue		*value,
sl@0
    72
				 gconstpointer	 v_boxed);
sl@0
    73
#ifndef G_DISABLE_DEPRECATED
sl@0
    74
IMPORT_C void	g_value_set_boxed_take_ownership	(GValue		*value,
sl@0
    75
						 gconstpointer	 v_boxed);
sl@0
    76
#endif
sl@0
    77
IMPORT_C GType	g_closure_get_type	(void)	G_GNUC_CONST;
sl@0
    78
IMPORT_C GType	g_value_get_type	(void)	G_GNUC_CONST;
sl@0
    79
IMPORT_C GType	g_value_array_get_type	(void)	G_GNUC_CONST;
sl@0
    80
IMPORT_C GType	g_date_get_type	        (void)	G_GNUC_CONST;
sl@0
    81
IMPORT_C GType	g_strv_get_type	        (void)	G_GNUC_CONST;
sl@0
    82
IMPORT_C GType	g_gstring_get_type      (void)	G_GNUC_CONST;
sl@0
    83
IMPORT_C GType   g_hash_table_get_type   (void)  G_GNUC_CONST;
sl@0
    84
sl@0
    85
typedef gchar** GStrv;
sl@0
    86
     
sl@0
    87
G_END_DECLS
sl@0
    88
sl@0
    89
#endif	/* __G_BOXED_H__ */