epoc32/include/stdapis/glib-2.0/gobject/gboxed.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:27:01 +0100
branchSymbian2
changeset 3 e1b950c65cb4
parent 0 061f57f2323e
permissions -rw-r--r--
Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
     1 /* GObject - GLib Type, Object, Parameter and Signal Library
     2  * Copyright (C) 2000-2001 Red Hat, Inc.
     3  * Portions copyright (c) 2006 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 #if !defined (__GLIB_GOBJECT_H_INSIDE__) && !defined (GOBJECT_COMPILATION)
    21 #error "Only <glib-object.h> can be included directly."
    22 #endif
    23 
    24 #ifndef __G_BOXED_H__
    25 #define __G_BOXED_H__
    26 
    27 #include <_ansi.h>
    28 #include        <gobject/gtype.h>
    29 
    30 G_BEGIN_DECLS
    31 
    32 /* --- type macros --- */
    33 #define G_TYPE_IS_BOXED(type)	   (G_TYPE_FUNDAMENTAL (type) == G_TYPE_BOXED)
    34 #define G_VALUE_HOLDS_BOXED(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_BOXED))
    35 
    36 
    37 /* --- typedefs --- */
    38 typedef gpointer (*GBoxedCopyFunc)	(gpointer	 boxed);
    39 typedef void     (*GBoxedFreeFunc)	(gpointer	 boxed);
    40 
    41 
    42 /* --- prototypes --- */
    43 IMPORT_C gpointer	g_boxed_copy			(GType		 boxed_type,
    44 						 gconstpointer	 src_boxed);
    45 IMPORT_C void		g_boxed_free			(GType		 boxed_type,
    46 						 gpointer	 boxed);
    47 IMPORT_C void		g_value_set_boxed		(GValue		*value,
    48 						 gconstpointer	 v_boxed);
    49 IMPORT_C void		g_value_set_static_boxed	(GValue		*value,
    50 						 gconstpointer	 v_boxed);
    51 IMPORT_C gpointer	g_value_get_boxed		(const GValue	*value);
    52 IMPORT_C gpointer	g_value_dup_boxed		(const GValue	*value);
    53 
    54 
    55 /* --- convenience --- */
    56 IMPORT_C GType	g_boxed_type_register_static		(const gchar	*name,
    57 						 GBoxedCopyFunc	 boxed_copy,
    58 						 GBoxedFreeFunc	 boxed_free);
    59 
    60 
    61 /* --- GLib boxed types --- */
    62 #define	G_TYPE_CLOSURE		(g_closure_get_type ())
    63 #define	G_TYPE_VALUE		(g_value_get_type ())
    64 #define	G_TYPE_VALUE_ARRAY	(g_value_array_get_type ())
    65 #define	G_TYPE_DATE	        (g_date_get_type ())
    66 #define	G_TYPE_STRV	        (g_strv_get_type ())
    67 #define	G_TYPE_GSTRING		(g_gstring_get_type ())
    68 #define	G_TYPE_HASH_TABLE	(g_hash_table_get_type ())
    69 
    70 
    71 IMPORT_C void    g_value_take_boxed      (GValue		*value,
    72 				 gconstpointer	 v_boxed);
    73 #ifndef G_DISABLE_DEPRECATED
    74 IMPORT_C void	g_value_set_boxed_take_ownership	(GValue		*value,
    75 						 gconstpointer	 v_boxed);
    76 #endif
    77 IMPORT_C GType	g_closure_get_type	(void)	G_GNUC_CONST;
    78 IMPORT_C GType	g_value_get_type	(void)	G_GNUC_CONST;
    79 IMPORT_C GType	g_value_array_get_type	(void)	G_GNUC_CONST;
    80 IMPORT_C GType	g_date_get_type	        (void)	G_GNUC_CONST;
    81 IMPORT_C GType	g_strv_get_type	        (void)	G_GNUC_CONST;
    82 IMPORT_C GType	g_gstring_get_type      (void)	G_GNUC_CONST;
    83 IMPORT_C GType   g_hash_table_get_type   (void)  G_GNUC_CONST;
    84 
    85 typedef gchar** GStrv;
    86      
    87 G_END_DECLS
    88 
    89 #endif	/* __G_BOXED_H__ */