![]() |
![]() |
![]() |
adg-1 reference manual |
![]() |
---|---|---|---|---|
Top | Description |
#define ADG_DIR_DOWN #define ADG_DIR_LEFT #define ADG_DIR_RIGHT #define ADG_DIR_UP #define ADG_FORWARD_DECL (id) #define ADG_UTF8_DEGREE #define ADG_UTF8_DIAMETER struct AdgClosure;gboolean adg_is_boolean_value ();
gboolean valuegboolean adg_is_enum_value (,
int value);
GType enum_typegboolean adg_is_string_empty (const
);gchar *strgchar * adg_string_replace (const
,gchar *strconst
,gchar *fromconst
);gchar *togint g_strcmp0 (const
,gchar *s1const
);gchar *s2
#define ADG_DIR_DOWN G_PI_2
Symbolic constant for the down direction (in radians).
Since 1.0
#define ADG_DIR_LEFT G_PI
Symbolic constant for the left direction (in radians).
Since 1.0
#define ADG_DIR_RIGHT 0.
Symbolic constant for the right direction (in radians).
Since 1.0
#define ADG_DIR_UP -G_PI_2
Symbolic constant for the up direction (in radians).
Since 1.0
#define ADG_FORWARD_DECL(id) typedef struct _##id id
Forward declaration of struct id
. It is equivalent to a typical
struct forward declaration, for example:
ADG_FORWARD_DECL(test)
will expand to:
typedef struct _test test
This macro is needed to fake gtk-doc, because
up to now (v.1.12) it generates two conflicting links when using
forward declarations: the first in the source with the declaration
and the second where the type is defined. Using ADG_FORWARD_DECL()
instead of the usual typedef avoids the parsing of the declaration
in the first file (gtk-doc is not able to do C
preprocessing).
The same principle can be applied in the definition file. Following the previous example, you can use something like this where struct _type is defined:
#if 0 // This is declared in another file typedef struct _type type; #endif struct _type { ... };
|
The name of a struct |
Since 1.0
#define ADG_UTF8_DEGREE "\xC2\xB0"
String constant that embeds a UTF-8 encoded degree symbol (U+00B0). It is used to suffix by the default implementation of AdgADim to suffix the set value, but can be also used manually:
adg_dim_set_value(dim, "<>" ADG_UTF8_DEGREE);
Since 1.0
#define ADG_UTF8_DIAMETER "\xE2\x8C\x80"
String constant that embeds a UTF-8 encoded diameter (U+2300). It can be used to prefix diameter quotes, such as:
adg_dim_set_value(dim, ADG_UTF8_DIAMETER "<>");
Since 1.0
gboolean adg_is_boolean_value ();
gboolean value
Checks if value
is a valid TRUE
FALSE
|
the gboolean value to check |
Returns : |
TRUE value is a valid FALSE |
Since 1.0
gboolean adg_is_enum_value (,
int value);
GType enum_type
Checks if value
is a valid enum_type
value.
|
the enum value to check |
|
a |
Returns : |
TRUE value is a valid enum_type , FALSE |
Since 1.0
gboolean adg_is_string_empty (const
);gchar *str
Checks if str
is an empty string, that is if is NULL
|
the subject string |
Returns : |
TRUE str is an empty string, FALSE |
Since 1.0
gchar * adg_string_replace (const
,gchar *strconst
,gchar *fromconst
);gchar *to
Replaces from
with to
inside str
and returns the result as a
newly allocated string.
str
and from
must be non-null valid C strings while to
can be
NULL
|
the original string |
|
the substring to replace |
|
the replacement string |
Returns : |
a newly allocated string to be freed with g_free() NULL |
Since 1.0
gint g_strcmp0 (const
,gchar *s1const
);gchar *s2
Compares str1
and str2
like strcmp()
NULL
NULL
|
a C string or NULL |
|
another C string or NULL |
Returns : |
-1, 0 or 1, if str1 is <, == or > than str2 . |
Since 1.0