![]() |
![]() |
![]() |
Seed Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <seed/seed.h> typedef SeedValue; void seed_value_unprotect (SeedContext ctx, SeedValue value); void seed_value_protect (SeedContext ctx, SeedValue value); gboolean seed_value_is_null (SeedContext ctx, SeedValue value); gboolean seed_value_is_function (SeedContext ctx, SeedObject value); gboolean seed_value_is_object (SeedContext ctx, SeedValue value); gboolean seed_value_to_boolean (SeedContext ctx, SeedValue val, SeedException *exception); SeedValue seed_value_from_boolean (SeedContext ctx, gboolean val, SeedException *exception); guint seed_value_to_uint (SeedContext ctx, SeedValue val, SeedException *exception); SeedValue seed_value_from_uint (SeedContext ctx, guint val, SeedException *exception); gint seed_value_to_int (SeedContext ctx, SeedValue val, SeedException *exception); SeedValue seed_value_from_int (SeedContext ctx, gint val, SeedException *exception); gchar seed_value_to_char (SeedContext ctx, SeedValue val, SeedException *exception); SeedValue seed_value_from_char (SeedContext ctx, gchar val, SeedException *exception); guchar seed_value_to_uchar (SeedContext ctx, SeedValue val, SeedException *exception); SeedValue seed_value_from_uchar (SeedContext ctx, guchar val, SeedException *exception); glong seed_value_to_long (SeedContext ctx, SeedValue val, SeedException *exception); SeedValue seed_value_from_long (SeedContext ctx, glong val, SeedException *exception); gulong seed_value_to_ulong (SeedContext ctx, SeedValue val, SeedException *exception); SeedValue seed_value_from_ulong (SeedContext ctx, gulong val, SeedException *exception); gint64 seed_value_to_int64 (SeedContext ctx, SeedValue val, SeedException *exception); SeedValue seed_value_from_int64 (SeedContext ctx, gint64 val, SeedException *exception); guint64 seed_value_to_uint64 (SeedContext ctx, SeedValue val, SeedException *exception); SeedValue seed_value_from_uint64 (SeedContext ctx, guint64 val, SeedException *exception); gfloat seed_value_to_float (SeedContext ctx, SeedValue val, SeedException *exception); SeedValue seed_value_from_float (SeedContext ctx, gfloat val, SeedException *exception); gdouble seed_value_to_double (SeedContext ctx, SeedValue val, SeedException *exception); SeedValue seed_value_from_double (SeedContext ctx, gdouble val, SeedException *exception); gchar * seed_value_to_string (SeedContext ctx, SeedValue val, SeedException *exception); SeedValue seed_value_from_string (SeedContext ctx, gchar *val, SeedException *exception); GObject * seed_value_to_object (SeedContext ctx, SeedValue val, SeedException *exception); SeedValue seed_value_from_object (SeedContext ctx, GObject *val, SeedException *exception); gchar * seed_value_to_filename (SeedContext ctx, SeedValue val, SeedValue *exception); SeedValue seed_value_from_filename (SeedContext ctx, const gchar *filename, SeedValue *exception);
void seed_value_unprotect (SeedContext ctx, SeedValue value);
Decrements the "protection count" of value
, as explained in
seed_value_protect()
.
|
A SeedContext. |
|
The SeedValue to unprotect. |
void seed_value_protect (SeedContext ctx, SeedValue value);
Increments the "protection count" of value
, in case you want to store
a reference somewhere where the garbage collector won't be able to find it,
and don't want it to be collected!
In order for value
to be collected afterwards, it will need to be
unprotected the same number of times with seed_value_unprotect()
.
|
A SeedContext. |
|
The SeedValue to protect. |
gboolean seed_value_is_null (SeedContext ctx, SeedValue value);
|
A SeedContext. |
|
A SeedValue. |
Returns : |
true if value represents NULL , false otherwise.
|
gboolean seed_value_is_function (SeedContext ctx, SeedObject value);
|
A SeedContext. |
|
A SeedObject. |
Returns : |
true if value is a function (and therefore, an object),
false otherwise.
|
gboolean seed_value_is_object (SeedContext ctx, SeedValue value);
|
A SeedContext. |
|
A SeedValue. |
Returns : |
true if value is an object, false otherwise.
|
gboolean seed_value_to_boolean (SeedContext ctx, SeedValue val, SeedException *exception);
|
A SeedContext. |
|
The SeedValue to convert. |
|
A reference to a SeedValue in which to store any exceptions.
Pass NULL to ignore exceptions.
|
Returns : |
The gboolean represented by val , or NULL if an exception
is raised during the conversion.
|
SeedValue seed_value_from_boolean (SeedContext ctx, gboolean val, SeedException *exception);
|
A SeedContext. |
|
The gboolean to represent. |
|
A reference to a SeedValue in which to store any exceptions.
Pass NULL to ignore exceptions.
|
Returns : |
A SeedValue which represents val , or NULL if an exception
is raised during the conversion.
|
guint seed_value_to_uint (SeedContext ctx, SeedValue val, SeedException *exception);
|
A SeedContext. |
|
The SeedValue to convert. |
|
A reference to a SeedValue in which to store any exceptions.
Pass NULL to ignore exceptions.
|
Returns : |
The guint represented by val , or NULL if an exception
is raised during the conversion.
|
SeedValue seed_value_from_uint (SeedContext ctx, guint val, SeedException *exception);
|
A SeedContext. |
|
The guint to represent. |
|
A reference to a SeedValue in which to store any exceptions.
Pass NULL to ignore exceptions.
|
Returns : |
A SeedValue which represents val , or NULL if an exception
is raised during the conversion.
|
gint seed_value_to_int (SeedContext ctx, SeedValue val, SeedException *exception);
|
A SeedContext. |
|
The SeedValue to convert. |
|
A reference to a SeedValue in which to store any exceptions.
Pass NULL to ignore exceptions.
|
Returns : |
The gint represented by val , or NULL if an exception
is raised during the conversion.
|
SeedValue seed_value_from_int (SeedContext ctx, gint val, SeedException *exception);
|
A SeedContext. |
|
The gint to represent. |
|
A reference to a SeedValue in which to store any exceptions.
Pass NULL to ignore exceptions.
|
Returns : |
A SeedValue which represents val , or NULL if an exception
is raised during the conversion.
|
gchar seed_value_to_char (SeedContext ctx, SeedValue val, SeedException *exception);
|
A SeedContext. |
|
The SeedValue to convert. |
|
A reference to a SeedValue in which to store any exceptions.
Pass NULL to ignore exceptions.
|
Returns : |
The gchar represented by val , or NULL if an exception
is raised during the conversion.
|
SeedValue seed_value_from_char (SeedContext ctx, gchar val, SeedException *exception);
|
A SeedContext. |
|
The gchar to represent. |
|
A reference to a SeedValue in which to store any exceptions.
Pass NULL to ignore exceptions.
|
Returns : |
A SeedValue which represents val , or NULL if an exception
is raised during the conversion.
|
guchar seed_value_to_uchar (SeedContext ctx, SeedValue val, SeedException *exception);
|
A SeedContext. |
|
The SeedValue to convert. |
|
A reference to a SeedValue in which to store any exceptions.
Pass NULL to ignore exceptions.
|
Returns : |
The guchar represented by val , or NULL if an exception
is raised during the conversion.
|
SeedValue seed_value_from_uchar (SeedContext ctx, guchar val, SeedException *exception);
|
A SeedContext. |
|
The guchar to represent. |
|
A reference to a SeedValue in which to store any exceptions.
Pass NULL to ignore exceptions.
|
Returns : |
A SeedValue which represents val , or NULL if an exception
is raised during the conversion.
|
glong seed_value_to_long (SeedContext ctx, SeedValue val, SeedException *exception);
|
A SeedContext. |
|
The SeedValue to convert. |
|
A reference to a SeedValue in which to store any exceptions.
Pass NULL to ignore exceptions.
|
Returns : |
The glong represented by val , or NULL if an exception
is raised during the conversion.
|
SeedValue seed_value_from_long (SeedContext ctx, glong val, SeedException *exception);
|
A SeedContext. |
|
The glong to represent. |
|
A reference to a SeedValue in which to store any exceptions.
Pass NULL to ignore exceptions.
|
Returns : |
A SeedValue which represents val , or NULL if an exception
is raised during the conversion.
|
gulong seed_value_to_ulong (SeedContext ctx, SeedValue val, SeedException *exception);
|
A SeedContext. |
|
The SeedValue to convert. |
|
A reference to a SeedValue in which to store any exceptions.
Pass NULL to ignore exceptions.
|
Returns : |
The gulong represented by val , or NULL if an exception
is raised during the conversion.
|
SeedValue seed_value_from_ulong (SeedContext ctx, gulong val, SeedException *exception);
|
A SeedContext. |
|
The gulong to represent. |
|
A reference to a SeedValue in which to store any exceptions.
Pass NULL to ignore exceptions.
|
Returns : |
A SeedValue which represents val , or NULL if an exception
is raised during the conversion.
|
gint64 seed_value_to_int64 (SeedContext ctx, SeedValue val, SeedException *exception);
|
A SeedContext. |
|
The SeedValue to convert. |
|
A reference to a SeedValue in which to store any exceptions.
Pass NULL to ignore exceptions.
|
Returns : |
The gint64 represented by val , or NULL if an exception
is raised during the conversion.
|
SeedValue seed_value_from_int64 (SeedContext ctx, gint64 val, SeedException *exception);
|
A SeedContext. |
|
The gint64 to represent. |
|
A reference to a SeedValue in which to store any exceptions.
Pass NULL to ignore exceptions.
|
Returns : |
A SeedValue which represents val , or NULL if an exception
is raised during the conversion.
|
guint64 seed_value_to_uint64 (SeedContext ctx, SeedValue val, SeedException *exception);
|
A SeedContext. |
|
The SeedValue to convert. |
|
A reference to a SeedValue in which to store any exceptions.
Pass NULL to ignore exceptions.
|
Returns : |
The guint64 represented by val , or NULL if an exception
is raised during the conversion.
|
SeedValue seed_value_from_uint64 (SeedContext ctx, guint64 val, SeedException *exception);
|
A SeedContext. |
|
The guint64 to represent. |
|
A reference to a SeedValue in which to store any exceptions.
Pass NULL to ignore exceptions.
|
Returns : |
A SeedValue which represents val , or NULL if an exception
is raised during the conversion.
|
gfloat seed_value_to_float (SeedContext ctx, SeedValue val, SeedException *exception);
|
A SeedContext. |
|
The SeedValue to convert. |
|
A reference to a SeedValue in which to store any exceptions.
Pass NULL to ignore exceptions.
|
Returns : |
The gfloat represented by val , or NULL if an exception
is raised during the conversion.
|
SeedValue seed_value_from_float (SeedContext ctx, gfloat val, SeedException *exception);
|
A SeedContext. |
|
The gfloat to represent. |
|
A reference to a SeedValue in which to store any exceptions.
Pass NULL to ignore exceptions.
|
Returns : |
A SeedValue which represents val , or NULL if an exception
is raised during the conversion.
|
gdouble seed_value_to_double (SeedContext ctx, SeedValue val, SeedException *exception);
|
A SeedContext. |
|
The SeedValue to convert. |
|
A reference to a SeedValue in which to store any exceptions.
Pass NULL to ignore exceptions.
|
Returns : |
The gdouble represented by val , or NULL if an exception
is raised during the conversion.
|
SeedValue seed_value_from_double (SeedContext ctx, gdouble val, SeedException *exception);
|
A SeedContext. |
|
The gdouble to represent. |
|
A reference to a SeedValue in which to store any exceptions.
Pass NULL to ignore exceptions.
|
Returns : |
A SeedValue which represents val , or NULL if an exception
is raised during the conversion.
|
gchar * seed_value_to_string (SeedContext ctx, SeedValue val, SeedException *exception);
|
A SeedContext. |
|
The SeedValue to convert. |
|
A reference to a SeedValue in which to store any exceptions.
Pass NULL to ignore exceptions.
|
Returns : |
The gchar * represented by val , or NULL if an exception
is raised during the conversion.
|
SeedValue seed_value_from_string (SeedContext ctx, gchar *val, SeedException *exception);
|
A SeedContext. |
|
The gchar* to represent. |
|
A reference to a SeedValue in which to store any exceptions.
Pass NULL to ignore exceptions.
|
Returns : |
A SeedValue which represents val , or NULL if an exception
is raised during the conversion.
|
GObject * seed_value_to_object (SeedContext ctx, SeedValue val, SeedException *exception);
|
|
|
|
|
|
Returns : |
SeedValue seed_value_from_object (SeedContext ctx, GObject *val, SeedException *exception);
|
|
|
|
|
|
Returns : |
gchar * seed_value_to_filename (SeedContext ctx, SeedValue val, SeedValue *exception);
|
|
|
|
|
|
Returns : |
SeedValue seed_value_from_filename (SeedContext ctx, const gchar *filename, SeedValue *exception);
|
|
|
|
|
|
Returns : |