grim/gplate
Clone
Summary
Browse
Changes
Graph
I thought I already added this.. my bad
trying_to_get_includes_working
2008-02-20, grim
545b7214a0de
I thought I already added this.. my bad
/*
* Copyright (C) 2007-2008 Gary Kramlich <grim@reaperworld.com>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc., 51
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#ifndef GPLATE_COLLECTION_H
#define GPLATE_COLLECTION_H
#include
<glib.h>
#include
<glib-object.h>
#include
<gplate/gplate-variable.h>
#define GPLATE_TYPE_COLLECTION (gplate_collection_get_gtype())
#define GPLATE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GPLATE_TYPE_COLLECTION, GPlateCollection))
#define GPLATE_IS_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GPLATE_TYPE_COLLECTION))
#define GPLATE_COLLECTION_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), GPLATE_TYPE_COLLECTION, GPlateCollectionIface))
typedef
struct
_GPlateCollection
GPlateCollection
;
typedef
struct
_GPlateCollectionIface
GPlateCollectionIface
;
struct
_GPlateCollectionIface
{
GTypeInterface
gparent
;
GPlateVariable
*
(
*
find_variable
)(
const
GPlateCollection
*
collection
,
const
gchar
*
name
);
gboolean
(
*
add_variable
)(
GPlateCollection
*
collection
,
GPlateVariable
*
variable
);
void
(
*
_gplate_reserved1
)(
void
);
void
(
*
_gplate_reserved2
)(
void
);
void
(
*
_gplate_reserved3
)(
void
);
void
(
*
_gplate_reserved4
)(
void
);
};
G_BEGIN_DECLS
#define gplate_collection_add(collection, type, name, value) { \
GPlateVariable *var = NULL; \
\
var = gplate_variable_new_from_##type((name), (value)); \
gplate_collection_add_variable(GPLATE_COLLECTION(collection), (var));\
}
#define gplate_collection_add_string(collection, name, value) \
gplate_collection_add((collection), string, (name), (value));
#define gplate_collection_add_boolean(collection, name, value) \
gplate_collection_add((collection), boolean, (name), (value));
#define gplate_collection_add_integer(collection, name, value) \
gplate_collection_add((collection), integer, (name), (value));
#define gplate_collection_add_float(collection, name, value) \
gplate_collection_add((collection), float, (name), (value));
#define gplate_collection_add_double(collection, name, value) \
gplate_collection_add((collection), double, (name), (value));
GType
gplate_collection_get_gtype
(
void
);
GPlateVariable
*
gplate_collection_find_variable
(
const
GPlateCollection
*
collection
,
const
gchar
*
name
);
gboolean
gplate_collection_add_variable
(
GPlateCollection
*
collection
,
GPlateVariable
*
variable
);
G_END_DECLS
#endif
/* GPLATE_COLLECTION_H */