Go to the source code of this file.
Data Structures | |
| struct | ParseInfo |
| struct | LocateAttr |
Defines | |
| #define | ELEMENT_IS(name) (strcmp (element_name, (name)) == 0) |
| #define | MAX_ATTRS 24 |
| #define | MAX_REASONABLE 4096 |
| #define | NO_TEXT(element_name) set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE, _("No text is allowed inside element <%s>"), element_name) |
| #define | THEME_SUBDIR "metacity-1" |
| #define | THEME_VERSION 2 |
| #define | METACITY_THEME_FILENAME_FORMAT "metacity-theme-%d.xml" |
Enumerations | |
| enum | ParseState { STATE_START, STATE_THEME, STATE_INFO, STATE_NAME, STATE_AUTHOR, STATE_COPYRIGHT, STATE_DATE, STATE_DESCRIPTION, STATE_CONSTANT, STATE_FRAME_GEOMETRY, STATE_DISTANCE, STATE_BORDER, STATE_ASPECT_RATIO, STATE_DRAW_OPS, STATE_LINE, STATE_RECTANGLE, STATE_ARC, STATE_CLIP, STATE_TINT, STATE_GRADIENT, STATE_IMAGE, STATE_GTK_ARROW, STATE_GTK_BOX, STATE_GTK_VLINE, STATE_ICON, STATE_TITLE, STATE_INCLUDE, STATE_TILE, STATE_COLOR, STATE_FRAME_STYLE, STATE_PIECE, STATE_BUTTON, STATE_FRAME_STYLE_SET, STATE_FRAME, STATE_WINDOW, STATE_MENU_ICON, STATE_FALLBACK } |
Functions | |
| static void | set_error (GError **err, GMarkupParseContext *context, int error_domain, int error_code, const char *format,...) G_GNUC_PRINTF(5 |
| static void static void | add_context_to_error (GError **err, GMarkupParseContext *context) |
| static void | parse_info_init (ParseInfo *info) |
| static void | parse_info_free (ParseInfo *info) |
| static void | push_state (ParseInfo *info, ParseState state) |
| static void | pop_state (ParseInfo *info) |
| static ParseState | peek_state (ParseInfo *info) |
| static void | parse_toplevel_element (GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, ParseInfo *info, GError **error) |
| static void | parse_info_element (GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, ParseInfo *info, GError **error) |
| static void | parse_geometry_element (GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, ParseInfo *info, GError **error) |
| static void | parse_draw_op_element (GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, ParseInfo *info, GError **error) |
| static void | parse_gradient_element (GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, ParseInfo *info, GError **error) |
| static void | parse_style_element (GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, ParseInfo *info, GError **error) |
| static void | parse_style_set_element (GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, ParseInfo *info, GError **error) |
| static void | parse_piece_element (GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, ParseInfo *info, GError **error) |
| static void | parse_button_element (GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, ParseInfo *info, GError **error) |
| static void | parse_menu_icon_element (GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, ParseInfo *info, GError **error) |
| static void | start_element_handler (GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer user_data, GError **error) |
| static void | end_element_handler (GMarkupParseContext *context, const gchar *element_name, gpointer user_data, GError **error) |
| static void | text_handler (GMarkupParseContext *context, const gchar *text, gsize text_len, gpointer user_data, GError **error) |
| static gboolean | locate_attributes (GMarkupParseContext *context, const char *element_name, const char **attribute_names, const char **attribute_values, GError **error, const char *first_attribute_name, const char **first_attribute_retloc,...) |
| static gboolean | check_no_attributes (GMarkupParseContext *context, const char *element_name, const char **attribute_names, const char **attribute_values, GError **error) |
| static gboolean | parse_positive_integer (const char *str, int *val, GMarkupParseContext *context, MetaTheme *theme, GError **error) |
| static gboolean | parse_double (const char *str, double *val, GMarkupParseContext *context, GError **error) |
| static gboolean | parse_boolean (const char *str, gboolean *val, GMarkupParseContext *context, GError **error) |
| static gboolean | parse_rounding (const char *str, guint *val, GMarkupParseContext *context, MetaTheme *theme, GError **error) |
| static gboolean | parse_angle (const char *str, double *val, GMarkupParseContext *context, GError **error) |
| static gboolean | parse_alpha (const char *str, MetaAlphaGradientSpec **spec_ret, GMarkupParseContext *context, GError **error) |
| static MetaColorSpec * | parse_color (MetaTheme *theme, const char *str, GError **err) |
| static gboolean | parse_title_scale (const char *str, double *val, GMarkupParseContext *context, GError **error) |
| static void | parse_distance (GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, ParseInfo *info, GError **error) |
| static void | parse_aspect_ratio (GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, ParseInfo *info, GError **error) |
| static void | parse_border (GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, ParseInfo *info, GError **error) |
| static gboolean | all_whitespace (const char *text, int text_len) |
| MetaTheme * | meta_theme_load (const char *theme_name, GError **err) |
Variables | |
| static GMarkupParser | metacity_theme_parser |
| #define ELEMENT_IS | ( | name | ) | (strcmp (element_name, (name)) == 0) |
Definition at line 318 of file theme-parser.c.
Referenced by parse_button_element(), parse_draw_op_element(), parse_geometry_element(), parse_gradient_element(), parse_info_element(), parse_menu_icon_element(), parse_piece_element(), parse_style_element(), parse_style_set_element(), and parse_toplevel_element().
| #define MAX_ATTRS 24 |
Referenced by locate_attributes().
| #define MAX_REASONABLE 4096 |
| #define METACITY_THEME_FILENAME_FORMAT "metacity-theme-%d.xml" |
| #define NO_TEXT | ( | element_name | ) | set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE, _("No text is allowed inside element <%s>"), element_name) |
| #define THEME_SUBDIR "metacity-1" |
| #define THEME_VERSION 2 |
| enum ParseState |
Definition at line 30 of file theme-parser.c.
| static void add_context_to_error | ( | GError ** | err, | |
| GMarkupParseContext * | context | |||
| ) | [static] |
Definition at line 234 of file theme-parser.c.
Referenced by end_element_handler(), parse_draw_op_element(), parse_gradient_element(), and parse_toplevel_element().
| static gboolean all_whitespace | ( | const char * | text, | |
| int | text_len | |||
| ) | [static] |
| static gboolean check_no_attributes | ( | GMarkupParseContext * | context, | |
| const char * | element_name, | |||
| const char ** | attribute_names, | |||
| const char ** | attribute_values, | |||
| GError ** | error | |||
| ) | [static] |
Definition at line 428 of file theme-parser.c.
References _, FALSE, NULL, set_error(), and TRUE.
Referenced by parse_button_element(), parse_info_element(), parse_menu_icon_element(), parse_piece_element(), and parse_toplevel_element().
| static void end_element_handler | ( | GMarkupParseContext * | context, | |
| const gchar * | element_name, | |||
| gpointer | user_data, | |||
| GError ** | error | |||
| ) | [static] |
Definition at line 3988 of file theme-parser.c.
References _, add_context_to_error(), ParseInfo::button_state, ParseInfo::button_type, _MetaFrameStyle::buttons, _MetaDrawOp::data, _MetaTheme::format_version, _MetaDrawOp::gradient, ParseInfo::layout, META_DRAW_GRADIENT, meta_draw_op_free(), meta_draw_op_list_append(), meta_draw_op_list_unref(), meta_draw_op_list_validate(), meta_frame_layout_unref(), meta_frame_layout_validate(), meta_frame_style_set_unref(), meta_frame_style_set_validate(), meta_frame_style_unref(), meta_frame_style_validate(), meta_gradient_spec_validate(), meta_theme_free(), meta_theme_validate(), NULL, ParseInfo::op, ParseInfo::op_list, peek_state(), ParseInfo::piece, _MetaFrameStyle::pieces, pop_state(), set_error(), STATE_ARC, STATE_ASPECT_RATIO, STATE_AUTHOR, STATE_BORDER, STATE_BUTTON, STATE_CLIP, STATE_COLOR, STATE_CONSTANT, STATE_COPYRIGHT, STATE_DATE, STATE_DESCRIPTION, STATE_DISTANCE, STATE_DRAW_OPS, STATE_FALLBACK, STATE_FRAME, STATE_FRAME_GEOMETRY, STATE_FRAME_STYLE, STATE_FRAME_STYLE_SET, STATE_GRADIENT, STATE_GTK_ARROW, STATE_GTK_BOX, STATE_GTK_VLINE, STATE_ICON, STATE_IMAGE, STATE_INCLUDE, STATE_INFO, STATE_LINE, STATE_MENU_ICON, STATE_NAME, STATE_PIECE, STATE_RECTANGLE, STATE_START, STATE_THEME, STATE_TILE, STATE_TINT, STATE_TITLE, STATE_WINDOW, ParseInfo::style, ParseInfo::style_set, ParseInfo::theme, and _MetaDrawOp::type.
| static gboolean locate_attributes | ( | GMarkupParseContext * | context, | |
| const char * | element_name, | |||
| const char ** | attribute_names, | |||
| const char ** | attribute_values, | |||
| GError ** | error, | |||
| const char * | first_attribute_name, | |||
| const char ** | first_attribute_retloc, | |||
| ... | ||||
| ) | [static] |
Definition at line 327 of file theme-parser.c.
References _, FALSE, MAX_ATTRS, LocateAttr::name, NULL, LocateAttr::retloc, set_error(), and TRUE.
Referenced by parse_aspect_ratio(), parse_border(), parse_distance(), parse_draw_op_element(), parse_gradient_element(), parse_style_element(), parse_style_set_element(), and parse_toplevel_element().
| MetaTheme* meta_theme_load | ( | const char * | theme_name, | |
| GError ** | err | |||
| ) |
Definition at line 4480 of file theme-parser.c.
References _, _MetaTheme::format_version, ParseInfo::format_version, META_DEBUG_THEMES, meta_is_debugging(), META_THEME_ERROR, META_THEME_ERROR_FAILED, METACITY_THEME_FILENAME_FORMAT, metacity_theme_parser, NULL, parse_info_free(), parse_info_init(), ParseInfo::theme, ParseInfo::theme_dir, ParseInfo::theme_file, ParseInfo::theme_name, THEME_SUBDIR, THEME_VERSION, and version().
Referenced by main(), and meta_theme_set_current().
| static gboolean parse_alpha | ( | const char * | str, | |
| MetaAlphaGradientSpec ** | spec_ret, | |||
| GMarkupParseContext * | context, | |||
| GError ** | error | |||
| ) | [static] |
Definition at line 631 of file theme-parser.c.
References _, _MetaAlphaGradientSpec::alphas, FALSE, meta_alpha_gradient_spec_free(), meta_alpha_gradient_spec_new(), META_GRADIENT_HORIZONTAL, NULL, parse_double(), set_error(), and TRUE.
Referenced by parse_draw_op_element(), and parse_toplevel_element().
| static gboolean parse_angle | ( | const char * | str, | |
| double * | val, | |||
| GMarkupParseContext * | context, | |||
| GError ** | error | |||
| ) | [static] |
Definition at line 611 of file theme-parser.c.
References _, FALSE, parse_double(), set_error(), and TRUE.
Referenced by parse_draw_op_element().
| static void parse_aspect_ratio | ( | GMarkupParseContext * | context, | |
| const gchar * | element_name, | |||
| const gchar ** | attribute_names, | |||
| const gchar ** | attribute_values, | |||
| ParseInfo * | info, | |||
| GError ** | error | |||
| ) | [static] |
Definition at line 1440 of file theme-parser.c.
References _, _MetaFrameLayout::button_aspect, _MetaFrameLayout::button_sizing, ParseInfo::layout, locate_attributes(), META_BUTTON_SIZING_ASPECT, META_BUTTON_SIZING_LAST, NULL, parse_double(), and set_error().
Referenced by parse_geometry_element().
| static gboolean parse_boolean | ( | const char * | str, | |
| gboolean * | val, | |||
| GMarkupParseContext * | context, | |||
| GError ** | error | |||
| ) | [static] |
Definition at line 554 of file theme-parser.c.
References _, FALSE, set_error(), and TRUE.
Referenced by parse_draw_op_element(), and parse_toplevel_element().
| static void parse_border | ( | GMarkupParseContext * | context, | |
| const gchar * | element_name, | |||
| const gchar ** | attribute_names, | |||
| const gchar ** | attribute_values, | |||
| ParseInfo * | info, | |||
| GError ** | error | |||
| ) | [static] |
Definition at line 1499 of file theme-parser.c.
References _, _MetaFrameLayout::button_border, ParseInfo::layout, locate_attributes(), NULL, parse_positive_integer(), set_error(), ParseInfo::theme, and _MetaFrameLayout::title_border.
Referenced by parse_geometry_element().
| static void parse_button_element | ( | GMarkupParseContext * | context, | |
| const gchar * | element_name, | |||
| const gchar ** | attribute_names, | |||
| const gchar ** | attribute_values, | |||
| ParseInfo * | info, | |||
| GError ** | error | |||
| ) | [static] |
Definition at line 3771 of file theme-parser.c.
References _, check_no_attributes(), ELEMENT_IS, meta_draw_op_list_new(), NULL, ParseInfo::op_list, peek_state(), push_state(), set_error(), STATE_BUTTON, and STATE_DRAW_OPS.
Referenced by start_element_handler().
| static MetaColorSpec* parse_color | ( | MetaTheme * | theme, | |
| const char * | str, | |||
| GError ** | err | |||
| ) | [static] |
Definition at line 707 of file theme-parser.c.
References meta_color_spec_new_from_string(), META_THEME_ALLOWS, META_THEME_COLOR_CONSTANTS, and meta_theme_lookup_color_constant().
Referenced by parse_draw_op_element(), and parse_gradient_element().
| static void parse_distance | ( | GMarkupParseContext * | context, | |
| const gchar * | element_name, | |||
| const gchar ** | attribute_names, | |||
| const gchar ** | attribute_values, | |||
| ParseInfo * | info, | |||
| GError ** | error | |||
| ) | [static] |
Definition at line 1353 of file theme-parser.c.
References _, _MetaFrameLayout::bottom_height, _MetaFrameLayout::button_height, _MetaFrameLayout::button_sizing, _MetaFrameLayout::button_width, ParseInfo::layout, _MetaFrameLayout::left_titlebar_edge, _MetaFrameLayout::left_width, locate_attributes(), META_BUTTON_SIZING_FIXED, META_BUTTON_SIZING_LAST, NULL, parse_positive_integer(), _MetaFrameLayout::right_titlebar_edge, _MetaFrameLayout::right_width, set_error(), ParseInfo::theme, and _MetaFrameLayout::title_vertical_pad.
Referenced by parse_geometry_element().
| static gboolean parse_double | ( | const char * | str, | |
| double * | val, | |||
| GMarkupParseContext * | context, | |||
| GError ** | error | |||
| ) | [static] |
Definition at line 519 of file theme-parser.c.
References _, FALSE, NULL, set_error(), and TRUE.
Referenced by parse_alpha(), parse_angle(), parse_aspect_ratio(), and parse_toplevel_element().
| static void parse_draw_op_element | ( | GMarkupParseContext * | context, | |
| const gchar * | element_name, | |||
| const gchar ** | attribute_names, | |||
| const gchar ** | attribute_values, | |||
| ParseInfo * | info, | |||
| GError ** | error | |||
| ) | [static] |
Definition at line 1697 of file theme-parser.c.
References _, add_context_to_error(), _MetaDrawOp::arc, _MetaDrawOp::clip, _MetaDrawOp::data, ELEMENT_IS, FALSE, _MetaDrawOp::gradient, _MetaDrawOp::gtk_arrow, _MetaDrawOp::gtk_box, _MetaDrawOp::gtk_vline, _MetaDrawOp::icon, _MetaDrawOp::image, _MetaDrawOp::line, locate_attributes(), meta_alpha_gradient_spec_free(), META_DRAW_ARC, META_DRAW_CLIP, META_DRAW_GRADIENT, META_DRAW_GTK_ARROW, META_DRAW_GTK_BOX, META_DRAW_GTK_VLINE, META_DRAW_ICON, META_DRAW_IMAGE, META_DRAW_LINE, META_DRAW_OP_LIST, meta_draw_op_list_append(), meta_draw_op_list_contains(), meta_draw_op_list_ref(), meta_draw_op_new(), META_DRAW_RECTANGLE, meta_draw_spec_new(), META_DRAW_TILE, META_DRAW_TINT, META_DRAW_TITLE, META_GRADIENT_LAST, meta_gradient_spec_new(), meta_gradient_type_from_string(), meta_gtk_arrow_from_string(), meta_gtk_shadow_from_string(), meta_gtk_state_from_string(), META_IMAGE_FILL_SCALE, meta_image_fill_type_from_string(), META_THEME_ALLOWS, META_THEME_DEGREES_IN_ARCS, meta_theme_load_image(), meta_theme_lookup_draw_op_list(), NULL, ParseInfo::op, _MetaDrawOp::op_list, ParseInfo::op_list, parse_alpha(), parse_angle(), parse_boolean(), parse_color(), parse_positive_integer(), peek_state(), push_state(), _MetaDrawOp::rectangle, set_error(), STATE_ARC, STATE_CLIP, STATE_DRAW_OPS, STATE_GRADIENT, STATE_GTK_ARROW, STATE_GTK_BOX, STATE_GTK_VLINE, STATE_ICON, STATE_IMAGE, STATE_INCLUDE, STATE_LINE, STATE_RECTANGLE, STATE_TILE, STATE_TINT, STATE_TITLE, ParseInfo::theme, _MetaDrawOp::tile, _MetaDrawOp::tint, _MetaDrawOp::title, and TRUE.
Referenced by start_element_handler().
| static void parse_geometry_element | ( | GMarkupParseContext * | context, | |
| const gchar * | element_name, | |||
| const gchar ** | attribute_names, | |||
| const gchar ** | attribute_values, | |||
| ParseInfo * | info, | |||
| GError ** | error | |||
| ) | [static] |
Definition at line 1601 of file theme-parser.c.
References _, ELEMENT_IS, parse_aspect_ratio(), parse_border(), parse_distance(), peek_state(), push_state(), set_error(), STATE_ASPECT_RATIO, STATE_BORDER, STATE_DISTANCE, and STATE_FRAME_GEOMETRY.
Referenced by start_element_handler().
| static void parse_gradient_element | ( | GMarkupParseContext * | context, | |
| const gchar * | element_name, | |||
| const gchar ** | attribute_names, | |||
| const gchar ** | attribute_values, | |||
| ParseInfo * | info, | |||
| GError ** | error | |||
| ) | [static] |
Definition at line 3291 of file theme-parser.c.
References _, add_context_to_error(), _MetaDrawOp::data, ELEMENT_IS, _MetaDrawOp::gradient, locate_attributes(), META_DRAW_GRADIENT, NULL, ParseInfo::op, parse_color(), peek_state(), push_state(), set_error(), STATE_COLOR, STATE_GRADIENT, ParseInfo::theme, and _MetaDrawOp::type.
Referenced by start_element_handler().
| static void parse_info_element | ( | GMarkupParseContext * | context, | |
| const gchar * | element_name, | |||
| const gchar ** | attribute_names, | |||
| const gchar ** | attribute_values, | |||
| ParseInfo * | info, | |||
| GError ** | error | |||
| ) | [static] |
Definition at line 1289 of file theme-parser.c.
References _, check_no_attributes(), ELEMENT_IS, peek_state(), push_state(), set_error(), STATE_AUTHOR, STATE_COPYRIGHT, STATE_DATE, STATE_DESCRIPTION, STATE_INFO, and STATE_NAME.
Referenced by start_element_handler().
| static void parse_info_free | ( | ParseInfo * | info | ) | [static] |
Definition at line 269 of file theme-parser.c.
References ParseInfo::layout, meta_draw_op_free(), meta_draw_op_list_unref(), meta_frame_layout_unref(), meta_frame_style_set_unref(), meta_frame_style_unref(), meta_theme_free(), ParseInfo::op, ParseInfo::op_list, ParseInfo::states, ParseInfo::style, ParseInfo::style_set, ParseInfo::theme, ParseInfo::theme_dir, and ParseInfo::theme_file.
Referenced by meta_theme_load().
| static void parse_info_init | ( | ParseInfo * | info | ) | [static] |
Definition at line 252 of file theme-parser.c.
References ParseInfo::button_state, ParseInfo::button_type, ParseInfo::layout, META_BUTTON_STATE_LAST, META_BUTTON_TYPE_LAST, META_FRAME_PIECE_LAST, ParseInfo::name, NULL, ParseInfo::op, ParseInfo::op_list, ParseInfo::piece, STATE_START, ParseInfo::states, ParseInfo::style, ParseInfo::style_set, ParseInfo::theme, and ParseInfo::theme_file.
Referenced by meta_theme_load().
| static void parse_menu_icon_element | ( | GMarkupParseContext * | context, | |
| const gchar * | element_name, | |||
| const gchar ** | attribute_names, | |||
| const gchar ** | attribute_values, | |||
| ParseInfo * | info, | |||
| GError ** | error | |||
| ) | [static] |
Definition at line 3809 of file theme-parser.c.
References _, check_no_attributes(), ELEMENT_IS, meta_draw_op_list_new(), NULL, ParseInfo::op_list, peek_state(), push_state(), set_error(), STATE_DRAW_OPS, and STATE_MENU_ICON.
Referenced by start_element_handler().
| static void parse_piece_element | ( | GMarkupParseContext * | context, | |
| const gchar * | element_name, | |||
| const gchar ** | attribute_names, | |||
| const gchar ** | attribute_values, | |||
| ParseInfo * | info, | |||
| GError ** | error | |||
| ) | [static] |
Definition at line 3733 of file theme-parser.c.
References _, check_no_attributes(), ELEMENT_IS, meta_draw_op_list_new(), NULL, ParseInfo::op_list, peek_state(), push_state(), set_error(), STATE_DRAW_OPS, and STATE_PIECE.
Referenced by start_element_handler().
| static gboolean parse_positive_integer | ( | const char * | str, | |
| int * | val, | |||
| GMarkupParseContext * | context, | |||
| MetaTheme * | theme, | |||
| GError ** | error | |||
| ) | [static] |
Definition at line 449 of file theme-parser.c.
References _, FALSE, MAX_REASONABLE, META_THEME_ALLOWS, meta_theme_lookup_int_constant(), META_THEME_UBIQUITOUS_CONSTANTS, NULL, set_error(), and TRUE.
Referenced by parse_border(), parse_distance(), parse_draw_op_element(), parse_rounding(), and parse_toplevel_element().
| static gboolean parse_rounding | ( | const char * | str, | |
| guint * | val, | |||
| GMarkupParseContext * | context, | |||
| MetaTheme * | theme, | |||
| GError ** | error | |||
| ) | [static] |
Definition at line 576 of file theme-parser.c.
References _, FALSE, META_THEME_ALLOWS, META_THEME_VARIED_ROUND_CORNERS, parse_positive_integer(), set_error(), and TRUE.
Referenced by parse_toplevel_element().
| static void parse_style_element | ( | GMarkupParseContext * | context, | |
| const gchar * | element_name, | |||
| const gchar ** | attribute_names, | |||
| const gchar ** | attribute_values, | |||
| ParseInfo * | info, | |||
| GError ** | error | |||
| ) | [static] |
Definition at line 3345 of file theme-parser.c.
References _, ParseInfo::button_state, ParseInfo::button_type, _MetaFrameStyle::buttons, ELEMENT_IS, _MetaTheme::format_version, locate_attributes(), meta_button_state_from_string(), META_BUTTON_STATE_LAST, meta_button_type_from_string(), META_BUTTON_TYPE_LAST, meta_draw_op_list_ref(), meta_frame_piece_from_string(), META_FRAME_PIECE_LAST, meta_theme_earliest_version_with_button(), meta_theme_lookup_draw_op_list(), NULL, ParseInfo::op_list, peek_state(), ParseInfo::piece, _MetaFrameStyle::pieces, push_state(), set_error(), STATE_BUTTON, STATE_FRAME_STYLE, STATE_PIECE, ParseInfo::style, and ParseInfo::theme.
Referenced by start_element_handler().
| static void parse_style_set_element | ( | GMarkupParseContext * | context, | |
| const gchar * | element_name, | |||
| const gchar ** | attribute_names, | |||
| const gchar ** | attribute_values, | |||
| ParseInfo * | info, | |||
| GError ** | error | |||
| ) | [static] |
Definition at line 3517 of file theme-parser.c.
References _, ELEMENT_IS, locate_attributes(), _MetaFrameStyleSet::maximized_and_shaded_styles, _MetaFrameStyleSet::maximized_styles, meta_frame_focus_from_string(), META_FRAME_FOCUS_LAST, META_FRAME_RESIZE_BOTH, meta_frame_resize_from_string(), META_FRAME_RESIZE_LAST, meta_frame_state_from_string(), META_FRAME_STATE_LAST, META_FRAME_STATE_MAXIMIZED, META_FRAME_STATE_MAXIMIZED_AND_SHADED, META_FRAME_STATE_NORMAL, META_FRAME_STATE_SHADED, meta_frame_style_ref(), META_THEME_ALLOWS, meta_theme_lookup_style(), META_THEME_UNRESIZABLE_SHADED_STYLES, _MetaFrameStyleSet::normal_styles, NULL, peek_state(), push_state(), set_error(), _MetaFrameStyleSet::shaded_styles, STATE_FRAME, STATE_FRAME_STYLE_SET, ParseInfo::style_set, and ParseInfo::theme.
Referenced by start_element_handler().
| static gboolean parse_title_scale | ( | const char * | str, | |
| double * | val, | |||
| GMarkupParseContext * | context, | |||
| GError ** | error | |||
| ) | [static] |
Definition at line 726 of file theme-parser.c.
References _, FALSE, set_error(), and TRUE.
Referenced by parse_toplevel_element().
| static void parse_toplevel_element | ( | GMarkupParseContext * | context, | |
| const gchar * | element_name, | |||
| const gchar ** | attribute_names, | |||
| const gchar ** | attribute_values, | |||
| ParseInfo * | info, | |||
| GError ** | error | |||
| ) | [static] |
Definition at line 761 of file theme-parser.c.
References _, add_context_to_error(), _MetaAlphaGradientSpec::alphas, _MetaFrameLayout::bottom_left_corner_rounded_radius, _MetaFrameLayout::bottom_right_corner_rounded_radius, check_no_attributes(), ELEMENT_IS, _MetaTheme::fallback_icon, _MetaTheme::fallback_mini_icon, FALSE, _MetaFrameLayout::has_title, _MetaFrameLayout::hide_buttons, _MetaFrameStyle::layout, ParseInfo::layout, locate_attributes(), meta_alpha_gradient_spec_free(), meta_color_spec_new_from_string(), meta_draw_op_list_new(), meta_frame_layout_copy(), meta_frame_layout_new(), meta_frame_layout_ref(), meta_frame_style_new(), meta_frame_style_set_new(), meta_frame_style_set_ref(), meta_frame_type_from_string(), META_FRAME_TYPE_LAST, META_THEME_ALLOWS, meta_theme_define_color_constant(), meta_theme_define_float_constant(), meta_theme_define_int_constant(), META_THEME_FRAME_BACKGROUNDS, META_THEME_HIDDEN_BUTTONS, meta_theme_insert_draw_op_list(), meta_theme_insert_layout(), meta_theme_insert_style(), meta_theme_insert_style_set(), meta_theme_load_image(), meta_theme_lookup_draw_op_list(), meta_theme_lookup_layout(), meta_theme_lookup_style(), meta_theme_lookup_style_set(), NULL, ParseInfo::op_list, parse_alpha(), parse_boolean(), parse_double(), parse_positive_integer(), parse_rounding(), parse_title_scale(), peek_state(), push_state(), set_error(), STATE_CONSTANT, STATE_DRAW_OPS, STATE_FALLBACK, STATE_FRAME_GEOMETRY, STATE_FRAME_STYLE, STATE_FRAME_STYLE_SET, STATE_INFO, STATE_MENU_ICON, STATE_THEME, STATE_WINDOW, ParseInfo::style, ParseInfo::style_set, _MetaTheme::style_sets_by_type, ParseInfo::theme, _MetaFrameLayout::title_scale, _MetaFrameLayout::top_left_corner_rounded_radius, _MetaFrameLayout::top_right_corner_rounded_radius, TRUE, _MetaFrameStyle::window_background_alpha, and _MetaFrameStyle::window_background_color.
Referenced by start_element_handler().
| static ParseState peek_state | ( | ParseInfo * | info | ) | [static] |
Definition at line 311 of file theme-parser.c.
References NULL, STATE_START, and ParseInfo::states.
Referenced by end_element_handler(), parse_button_element(), parse_draw_op_element(), parse_geometry_element(), parse_gradient_element(), parse_info_element(), parse_menu_icon_element(), parse_piece_element(), parse_style_element(), parse_style_set_element(), parse_toplevel_element(), start_element_handler(), and text_handler().
| static void pop_state | ( | ParseInfo * | info | ) | [static] |
Definition at line 303 of file theme-parser.c.
References NULL, and ParseInfo::states.
Referenced by end_element_handler().
| static void push_state | ( | ParseInfo * | info, | |
| ParseState | state | |||
| ) | [static] |
Definition at line 296 of file theme-parser.c.
References ParseInfo::states.
Referenced by parse_button_element(), parse_draw_op_element(), parse_geometry_element(), parse_gradient_element(), parse_info_element(), parse_menu_icon_element(), parse_piece_element(), parse_style_element(), parse_style_set_element(), parse_toplevel_element(), and start_element_handler().
| static void set_error | ( | GError ** | err, | |
| GMarkupParseContext * | context, | |||
| int | error_domain, | |||
| int | error_code, | |||
| const char * | format, | |||
| ... | ||||
| ) | [static] |
Definition at line 209 of file theme-parser.c.
References _.
Referenced by check_no_attributes(), end_element_handler(), locate_attributes(), parse_alpha(), parse_angle(), parse_aspect_ratio(), parse_boolean(), parse_border(), parse_button_element(), parse_distance(), parse_double(), parse_draw_op_element(), parse_geometry_element(), parse_gradient_element(), parse_info_element(), parse_menu_icon_element(), parse_piece_element(), parse_positive_integer(), parse_rounding(), parse_style_element(), parse_style_set_element(), parse_title_scale(), parse_toplevel_element(), start_element_handler(), and text_handler().
| static void start_element_handler | ( | GMarkupParseContext * | context, | |
| const gchar * | element_name, | |||
| const gchar ** | attribute_names, | |||
| const gchar ** | attribute_values, | |||
| gpointer | user_data, | |||
| GError ** | error | |||
| ) | [static] |
Definition at line 3848 of file theme-parser.c.
References _, _MetaTheme::dirname, _MetaTheme::filename, ParseInfo::format_version, _MetaTheme::format_version, meta_theme_new(), _MetaTheme::name, parse_button_element(), parse_draw_op_element(), parse_geometry_element(), parse_gradient_element(), parse_info_element(), parse_menu_icon_element(), parse_piece_element(), parse_style_element(), parse_style_set_element(), parse_toplevel_element(), peek_state(), push_state(), set_error(), STATE_ARC, STATE_ASPECT_RATIO, STATE_AUTHOR, STATE_BORDER, STATE_BUTTON, STATE_CLIP, STATE_COLOR, STATE_CONSTANT, STATE_COPYRIGHT, STATE_DATE, STATE_DESCRIPTION, STATE_DISTANCE, STATE_DRAW_OPS, STATE_FALLBACK, STATE_FRAME, STATE_FRAME_GEOMETRY, STATE_FRAME_STYLE, STATE_FRAME_STYLE_SET, STATE_GRADIENT, STATE_GTK_ARROW, STATE_GTK_BOX, STATE_GTK_VLINE, STATE_ICON, STATE_IMAGE, STATE_INCLUDE, STATE_INFO, STATE_LINE, STATE_MENU_ICON, STATE_NAME, STATE_PIECE, STATE_RECTANGLE, STATE_START, STATE_THEME, STATE_TILE, STATE_TINT, STATE_TITLE, STATE_WINDOW, ParseInfo::theme, ParseInfo::theme_dir, ParseInfo::theme_file, and ParseInfo::theme_name.
| static void text_handler | ( | GMarkupParseContext * | context, | |
| const gchar * | text, | |||
| gsize | text_len, | |||
| gpointer | user_data, | |||
| GError ** | error | |||
| ) | [static] |
Definition at line 4294 of file theme-parser.c.
References _, all_whitespace(), _MetaTheme::author, _MetaTheme::copyright, _MetaTheme::date, _MetaTheme::description, NO_TEXT, NULL, peek_state(), _MetaTheme::readable_name, set_error(), STATE_ARC, STATE_ASPECT_RATIO, STATE_AUTHOR, STATE_BORDER, STATE_BUTTON, STATE_CLIP, STATE_COLOR, STATE_CONSTANT, STATE_COPYRIGHT, STATE_DATE, STATE_DESCRIPTION, STATE_DISTANCE, STATE_DRAW_OPS, STATE_FALLBACK, STATE_FRAME, STATE_FRAME_GEOMETRY, STATE_FRAME_STYLE, STATE_FRAME_STYLE_SET, STATE_GRADIENT, STATE_GTK_ARROW, STATE_GTK_BOX, STATE_GTK_VLINE, STATE_ICON, STATE_IMAGE, STATE_INCLUDE, STATE_INFO, STATE_LINE, STATE_MENU_ICON, STATE_NAME, STATE_PIECE, STATE_RECTANGLE, STATE_START, STATE_THEME, STATE_TILE, STATE_TINT, STATE_TITLE, STATE_WINDOW, and ParseInfo::theme.
GMarkupParser metacity_theme_parser [static] |
Initial value:
{
start_element_handler,
end_element_handler,
text_handler,
NULL,
NULL
}
Definition at line 200 of file theme-parser.c.
Referenced by meta_theme_load().
1.5.5