mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-20 07:38:54 +02:00
Add new function g_markup_collect_attributes (bug #496847).
2007-11-26 Ryan Lortie <desrt@desrt.ca> Add new function g_markup_collect_attributes (bug #496847). * glib/glib.symbols: add g_markup_collect_attributes * docs/reference/glib/glib-sections.txt: * glib/gmarkup.h: * glib/gmarkup.c: add g_markup_collect_attributes and new enumerated type GMarkupCollectType. Add new error code G_MARKUP_ERROR_MISSING_ATTRIBUTE that is thrown by the attribute collector. svn path=/trunk/; revision=5947
This commit is contained in:
@@ -38,7 +38,8 @@ typedef enum
|
||||
*/
|
||||
G_MARKUP_ERROR_UNKNOWN_ELEMENT,
|
||||
G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE,
|
||||
G_MARKUP_ERROR_INVALID_CONTENT
|
||||
G_MARKUP_ERROR_INVALID_CONTENT,
|
||||
G_MARKUP_ERROR_MISSING_ATTRIBUTE
|
||||
} GMarkupError;
|
||||
|
||||
#define G_MARKUP_ERROR g_markup_error_quark ()
|
||||
@@ -127,6 +128,27 @@ gchar *g_markup_printf_escaped (const char *format,
|
||||
gchar *g_markup_vprintf_escaped (const char *format,
|
||||
va_list args);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
G_MARKUP_COLLECT_INVALID,
|
||||
G_MARKUP_COLLECT_STRING,
|
||||
G_MARKUP_COLLECT_STRDUP,
|
||||
G_MARKUP_COLLECT_BOOLEAN,
|
||||
G_MARKUP_COLLECT_TRISTATE,
|
||||
|
||||
G_MARKUP_COLLECT_OPTIONAL = (1 << 16)
|
||||
} GMarkupCollectType;
|
||||
|
||||
|
||||
/* useful from start_element */
|
||||
gboolean g_markup_collect_attributes (const gchar *element_name,
|
||||
const gchar **attribute_names,
|
||||
const gchar **attribute_values,
|
||||
GError **error,
|
||||
GMarkupCollectType first_type,
|
||||
const gchar *first_attr,
|
||||
...);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_MARKUP_H__ */
|
||||
|
Reference in New Issue
Block a user