Go to the source code of this file.
Data Structures | |
| struct | PosExpr |
| Type and value of an expression in a parsed sequence. More... | |
Defines | |
| #define | GDK_COLOR_RGBA(color) |
| #define | GDK_COLOR_RGB(color) |
| #define | ALPHA_TO_UCHAR(d) ((unsigned char) ((d) * 255)) |
| #define | DEBUG_FILL_STRUCT(s) memset ((s), 0xef, sizeof (*(s))) |
| #define | CLAMP_UCHAR(v) ((guchar) (CLAMP (((int)v), (int)0, (int)255))) |
| #define | INTENSITY(r, g, b) ((r) * 0.30 + (g) * 0.59 + (b) * 0.11) |
| #define | CHECK_GEOMETRY_VALUE(vname) if (!validate_geometry_value (layout->vname, #vname, error)) return FALSE |
| #define | CHECK_GEOMETRY_BORDER(bname) if (!validate_geometry_border (&layout->bname, #bname, error)) return FALSE |
| #define | IS_VARIABLE_CHAR(c) (g_ascii_isalpha ((c)) || (c) == '_') |
| Whether a variable can validly appear as part of the name of a variable. | |
| #define | MAX_EXPRS 32 |
Enumerations | |
| enum | PosExprType { POS_EXPR_INT, POS_EXPR_DOUBLE, POS_EXPR_OPERATOR } |
| The type of a PosExpr: either integer, double, or an operation. More... | |
Functions | |
| static void | gtk_style_shade (GdkColor *a, GdkColor *b, gdouble k) |
| static void | rgb_to_hls (gdouble *r, gdouble *g, gdouble *b) |
| static void | hls_to_rgb (gdouble *h, gdouble *l, gdouble *s) |
| static GdkPixbuf * | colorize_pixbuf (GdkPixbuf *orig, GdkColor *new_color) |
| static void | color_composite (const GdkColor *bg, const GdkColor *fg, double alpha_d, GdkColor *color) |
| static void | init_border (GtkBorder *border) |
| Sets all the fields of a border to dummy values. | |
| MetaFrameLayout * | meta_frame_layout_new (void) |
| Creates a new, empty MetaFrameLayout. | |
| static gboolean | validate_border (const GtkBorder *border, const char **bad) |
| static gboolean | validate_geometry_value (int val, const char *name, GError **error) |
| Ensures that the theme supplied a particular dimension. | |
| static gboolean | validate_geometry_border (const GtkBorder *border, const char *name, GError **error) |
| gboolean | meta_frame_layout_validate (const MetaFrameLayout *layout, GError **error) |
| MetaFrameLayout * | meta_frame_layout_copy (const MetaFrameLayout *src) |
| void | meta_frame_layout_ref (MetaFrameLayout *layout) |
| void | meta_frame_layout_unref (MetaFrameLayout *layout) |
| void | meta_frame_layout_get_borders (const MetaFrameLayout *layout, int text_height, MetaFrameFlags flags, int *top_height, int *bottom_height, int *left_width, int *right_width) |
| static MetaButtonSpace * | rect_for_function (MetaFrameGeometry *fgeom, MetaFrameFlags flags, MetaButtonFunction function, MetaTheme *theme) |
| static gboolean | strip_button (MetaButtonSpace *func_rects[MAX_BUTTONS_PER_CORNER], GdkRectangle *bg_rects[MAX_BUTTONS_PER_CORNER], int *n_rects, MetaButtonSpace *to_strip) |
| void | meta_frame_layout_calc_geometry (const MetaFrameLayout *layout, int text_height, MetaFrameFlags flags, int client_width, int client_height, const MetaButtonLayout *button_layout, MetaFrameGeometry *fgeom, MetaTheme *theme) |
| MetaGradientSpec * | meta_gradient_spec_new (MetaGradientType type) |
| static void | free_color_spec (gpointer spec, gpointer user_data) |
| void | meta_gradient_spec_free (MetaGradientSpec *spec) |
| GdkPixbuf * | meta_gradient_spec_render (const MetaGradientSpec *spec, GtkWidget *widget, int width, int height) |
| gboolean | meta_gradient_spec_validate (MetaGradientSpec *spec, GError **error) |
| MetaAlphaGradientSpec * | meta_alpha_gradient_spec_new (MetaGradientType type, int n_alphas) |
| void | meta_alpha_gradient_spec_free (MetaAlphaGradientSpec *spec) |
| MetaColorSpec * | meta_color_spec_new (MetaColorSpecType type) |
| void | meta_color_spec_free (MetaColorSpec *spec) |
| MetaColorSpec * | meta_color_spec_new_from_string (const char *str, GError **err) |
| MetaColorSpec * | meta_color_spec_new_gtk (MetaGtkColorComponent component, GtkStateType state) |
| void | meta_color_spec_render (MetaColorSpec *spec, GtkWidget *widget, GdkColor *color) |
| static const char * | op_name (PosOperatorType type) |
| Represents an operation as a string. | |
| static PosOperatorType | op_from_string (const char *p, int *len) |
| Parses a string and returns an operation. | |
| static void | free_tokens (PosToken *tokens, int n_tokens) |
| Frees an array of tokens. | |
| static gboolean | parse_number (const char *p, const char **end_return, PosToken *next, GError **err) |
| Tokenises a number in an expression. | |
| static gboolean | pos_tokenize (const char *expr, PosToken **tokens_p, int *n_tokens_p, GError **err) |
| Tokenises an expression. | |
| static gboolean | do_operation (PosExpr *a, PosExpr *b, PosOperatorType op, GError **err) |
| static gboolean | do_operations (PosExpr *exprs, int *n_exprs, int precedence, GError **err) |
| static gboolean | pos_eval_get_variable (PosToken *t, int *result, const MetaPositionExprEnv *env, GError **err) |
| There is a predefined set of variables which can appear in an expression. | |
| static gboolean | pos_eval_helper (PosToken *tokens, int n_tokens, const MetaPositionExprEnv *env, PosExpr *result, GError **err) |
| Evaluates a sequence of tokens within a particular environment context, and returns the current value. | |
| static gboolean | pos_eval (MetaDrawSpec *spec, const MetaPositionExprEnv *env, int *val_p, GError **err) |
| Evaluates an expression. | |
| gboolean | meta_parse_position_expression (MetaDrawSpec *spec, const MetaPositionExprEnv *env, int *x_return, int *y_return, GError **err) |
| gboolean | meta_parse_size_expression (MetaDrawSpec *spec, const MetaPositionExprEnv *env, int *val_return, GError **err) |
| gboolean | meta_theme_replace_constants (MetaTheme *theme, PosToken *tokens, int n_tokens, GError **err) |
| static int | parse_x_position_unchecked (MetaDrawSpec *spec, const MetaPositionExprEnv *env) |
| static int | parse_y_position_unchecked (MetaDrawSpec *spec, const MetaPositionExprEnv *env) |
| static int | parse_size_unchecked (MetaDrawSpec *spec, MetaPositionExprEnv *env) |
| void | meta_draw_spec_free (MetaDrawSpec *spec) |
| MetaDrawSpec * | meta_draw_spec_new (MetaTheme *theme, const char *expr, GError **error) |
| MetaDrawOp * | meta_draw_op_new (MetaDrawType type) |
| void | meta_draw_op_free (MetaDrawOp *op) |
| static GdkGC * | get_gc_for_primitive (GtkWidget *widget, GdkDrawable *drawable, MetaColorSpec *color_spec, const GdkRectangle *clip, int line_width) |
| static GdkPixbuf * | apply_alpha (GdkPixbuf *pixbuf, MetaAlphaGradientSpec *spec, gboolean force_copy) |
| static void | render_pixbuf (GdkDrawable *drawable, const GdkRectangle *clip, GdkPixbuf *pixbuf, int x, int y) |
| static GdkPixbuf * | pixbuf_tile (GdkPixbuf *tile, int width, int height) |
| static GdkPixbuf * | replicate_rows (GdkPixbuf *src, int src_x, int src_y, int width, int height) |
| static GdkPixbuf * | replicate_cols (GdkPixbuf *src, int src_x, int src_y, int width, int height) |
| static GdkPixbuf * | scale_and_alpha_pixbuf (GdkPixbuf *src, MetaAlphaGradientSpec *alpha_spec, MetaImageFillType fill_type, int width, int height, gboolean vertical_stripes, gboolean horizontal_stripes) |
| static GdkPixbuf * | draw_op_as_pixbuf (const MetaDrawOp *op, GtkWidget *widget, const MetaDrawInfo *info, int width, int height) |
| static void | fill_env (MetaPositionExprEnv *env, const MetaDrawInfo *info, MetaRectangle logical_region) |
| static void | meta_draw_op_draw_with_env (const MetaDrawOp *op, GtkWidget *widget, GdkDrawable *drawable, const GdkRectangle *clip, const MetaDrawInfo *info, MetaRectangle rect, MetaPositionExprEnv *env) |
| void | meta_draw_op_draw (const MetaDrawOp *op, GtkWidget *widget, GdkDrawable *drawable, const GdkRectangle *clip, const MetaDrawInfo *info, MetaRectangle logical_region) |
| MetaDrawOpList * | meta_draw_op_list_new (int n_preallocs) |
| void | meta_draw_op_list_ref (MetaDrawOpList *op_list) |
| void | meta_draw_op_list_unref (MetaDrawOpList *op_list) |
| void | meta_draw_op_list_draw (const MetaDrawOpList *op_list, GtkWidget *widget, GdkDrawable *drawable, const GdkRectangle *clip, const MetaDrawInfo *info, MetaRectangle rect) |
| void | meta_draw_op_list_append (MetaDrawOpList *op_list, MetaDrawOp *op) |
| gboolean | meta_draw_op_list_validate (MetaDrawOpList *op_list, GError **error) |
| gboolean | meta_draw_op_list_contains (MetaDrawOpList *op_list, MetaDrawOpList *child) |
| MetaFrameStyle * | meta_frame_style_new (MetaFrameStyle *parent) |
| Constructor for a MetaFrameStyle. | |
| void | meta_frame_style_ref (MetaFrameStyle *style) |
| Increases the reference count of a frame style. | |
| static void | free_button_ops (MetaDrawOpList *op_lists[META_BUTTON_TYPE_LAST][META_BUTTON_STATE_LAST]) |
| void | meta_frame_style_unref (MetaFrameStyle *style) |
| static MetaDrawOpList * | get_button (MetaFrameStyle *style, MetaButtonType type, MetaButtonState state) |
| gboolean | meta_frame_style_validate (MetaFrameStyle *style, guint current_theme_version, GError **error) |
| static void | button_rect (MetaButtonType type, const MetaFrameGeometry *fgeom, int middle_background_offset, GdkRectangle *rect) |
| void | meta_frame_style_draw (MetaFrameStyle *style, GtkWidget *widget, GdkDrawable *drawable, int x_offset, int y_offset, const GdkRectangle *clip, const MetaFrameGeometry *fgeom, int client_width, int client_height, PangoLayout *title_layout, int text_height, MetaButtonState button_states[META_BUTTON_TYPE_LAST], GdkPixbuf *mini_icon, GdkPixbuf *icon) |
| MetaFrameStyleSet * | meta_frame_style_set_new (MetaFrameStyleSet *parent) |
| static void | free_focus_styles (MetaFrameStyle *focus_styles[META_FRAME_FOCUS_LAST]) |
| void | meta_frame_style_set_ref (MetaFrameStyleSet *style_set) |
| void | meta_frame_style_set_unref (MetaFrameStyleSet *style_set) |
| static MetaFrameStyle * | get_style (MetaFrameStyleSet *style_set, MetaFrameState state, MetaFrameResize resize, MetaFrameFocus focus) |
| static gboolean | check_state (MetaFrameStyleSet *style_set, MetaFrameState state, GError **error) |
| gboolean | meta_frame_style_set_validate (MetaFrameStyleSet *style_set, GError **error) |
| MetaTheme * | meta_theme_get_current (void) |
| void | meta_theme_set_current (const char *name, gboolean force_reload) |
| MetaTheme * | meta_theme_new (void) |
| void | meta_theme_free (MetaTheme *theme) |
| gboolean | meta_theme_validate (MetaTheme *theme, GError **error) |
| GdkPixbuf * | meta_theme_load_image (MetaTheme *theme, const char *filename, guint size_of_theme_icons, GError **error) |
| static MetaFrameStyle * | theme_get_style (MetaTheme *theme, MetaFrameType type, MetaFrameFlags flags) |
| MetaFrameStyle * | meta_theme_get_frame_style (MetaTheme *theme, MetaFrameType type, MetaFrameFlags flags) |
| double | meta_theme_get_title_scale (MetaTheme *theme, MetaFrameType type, MetaFrameFlags flags) |
| void | meta_theme_draw_frame (MetaTheme *theme, GtkWidget *widget, GdkDrawable *drawable, const GdkRectangle *clip, int x_offset, int y_offset, MetaFrameType type, MetaFrameFlags flags, int client_width, int client_height, PangoLayout *title_layout, int text_height, const MetaButtonLayout *button_layout, MetaButtonState button_states[META_BUTTON_TYPE_LAST], GdkPixbuf *mini_icon, GdkPixbuf *icon) |
| void | meta_theme_get_frame_borders (MetaTheme *theme, MetaFrameType type, int text_height, MetaFrameFlags flags, int *top_height, int *bottom_height, int *left_width, int *right_width) |
| void | meta_theme_calc_geometry (MetaTheme *theme, MetaFrameType type, int text_height, MetaFrameFlags flags, int client_width, int client_height, const MetaButtonLayout *button_layout, MetaFrameGeometry *fgeom) |
| MetaFrameLayout * | meta_theme_lookup_layout (MetaTheme *theme, const char *name) |
| void | meta_theme_insert_layout (MetaTheme *theme, const char *name, MetaFrameLayout *layout) |
| MetaDrawOpList * | meta_theme_lookup_draw_op_list (MetaTheme *theme, const char *name) |
| void | meta_theme_insert_draw_op_list (MetaTheme *theme, const char *name, MetaDrawOpList *op_list) |
| MetaFrameStyle * | meta_theme_lookup_style (MetaTheme *theme, const char *name) |
| void | meta_theme_insert_style (MetaTheme *theme, const char *name, MetaFrameStyle *style) |
| MetaFrameStyleSet * | meta_theme_lookup_style_set (MetaTheme *theme, const char *name) |
| void | meta_theme_insert_style_set (MetaTheme *theme, const char *name, MetaFrameStyleSet *style_set) |
| static gboolean | first_uppercase (const char *str) |
| gboolean | meta_theme_define_int_constant (MetaTheme *theme, const char *name, int value, GError **error) |
| gboolean | meta_theme_lookup_int_constant (MetaTheme *theme, const char *name, int *value) |
| gboolean | meta_theme_define_float_constant (MetaTheme *theme, const char *name, double value, GError **error) |
| gboolean | meta_theme_lookup_float_constant (MetaTheme *theme, const char *name, double *value) |
| gboolean | meta_theme_define_color_constant (MetaTheme *theme, const char *name, const char *value, GError **error) |
| gboolean | meta_theme_lookup_color_constant (MetaTheme *theme, const char *name, char **value) |
| PangoFontDescription * | meta_gtk_widget_get_font_desc (GtkWidget *widget, double scale, const PangoFontDescription *override) |
| int | meta_pango_font_desc_get_text_height (const PangoFontDescription *font_desc, PangoContext *context) |
| MetaGtkColorComponent | meta_color_component_from_string (const char *str) |
| const char * | meta_color_component_to_string (MetaGtkColorComponent component) |
| MetaButtonState | meta_button_state_from_string (const char *str) |
| const char * | meta_button_state_to_string (MetaButtonState state) |
| MetaButtonType | meta_button_type_from_string (const char *str, MetaTheme *theme) |
| const char * | meta_button_type_to_string (MetaButtonType type) |
| MetaFramePiece | meta_frame_piece_from_string (const char *str) |
| const char * | meta_frame_piece_to_string (MetaFramePiece piece) |
| MetaFrameState | meta_frame_state_from_string (const char *str) |
| const char * | meta_frame_state_to_string (MetaFrameState state) |
| MetaFrameResize | meta_frame_resize_from_string (const char *str) |
| const char * | meta_frame_resize_to_string (MetaFrameResize resize) |
| MetaFrameFocus | meta_frame_focus_from_string (const char *str) |
| const char * | meta_frame_focus_to_string (MetaFrameFocus focus) |
| MetaFrameType | meta_frame_type_from_string (const char *str) |
| const char * | meta_frame_type_to_string (MetaFrameType type) |
| MetaGradientType | meta_gradient_type_from_string (const char *str) |
| const char * | meta_gradient_type_to_string (MetaGradientType type) |
| GtkStateType | meta_gtk_state_from_string (const char *str) |
| const char * | meta_gtk_state_to_string (GtkStateType state) |
| GtkShadowType | meta_gtk_shadow_from_string (const char *str) |
| const char * | meta_gtk_shadow_to_string (GtkShadowType shadow) |
| GtkArrowType | meta_gtk_arrow_from_string (const char *str) |
| const char * | meta_gtk_arrow_to_string (GtkArrowType arrow) |
| MetaImageFillType | meta_image_fill_type_from_string (const char *str) |
| const char * | meta_image_fill_type_to_string (MetaImageFillType fill_type) |
| guint | meta_theme_earliest_version_with_button (MetaButtonType type) |
Variables | |
| static MetaTheme * | meta_current_theme = NULL |
| The current theme. | |
The window decorations drawn by Metacity are described by files on disk known internally as "themes" (externally as "window border themes" on http://art.gnome.org/themes/metacity/ or "Metacity themes"). This file contains most of the code necessary to support themes; it does not contain the XML parser, which is in theme-parser.c.
Definition in file theme.c.
| #define CHECK_GEOMETRY_BORDER | ( | bname | ) | if (!validate_geometry_border (&layout->bname, #bname, error)) return FALSE |
Referenced by meta_frame_layout_validate().
| #define CHECK_GEOMETRY_VALUE | ( | vname | ) | if (!validate_geometry_value (layout->vname, #vname, error)) return FALSE |
Referenced by meta_frame_layout_validate().
| #define CLAMP_UCHAR | ( | v | ) | ((guchar) (CLAMP (((int)v), (int)0, (int)255))) |
| #define DEBUG_FILL_STRUCT | ( | s | ) | memset ((s), 0xef, sizeof (*(s))) |
Definition at line 80 of file theme.c.
Referenced by meta_color_spec_free(), meta_draw_op_list_unref(), meta_frame_layout_unref(), meta_frame_style_set_unref(), meta_frame_style_unref(), meta_gradient_spec_free(), and meta_theme_free().
| #define GDK_COLOR_RGB | ( | color | ) |
Value:
((guint32) ((((color).red / 256) << 16) | \
(((color).green / 256) << 8) | \
(((color).blue / 256))))
Definition at line 73 of file theme.c.
Referenced by draw_op_as_pixbuf().
| #define GDK_COLOR_RGBA | ( | color | ) |
Value:
((guint32) (0xff | \
(((color).red / 256) << 24) | \
(((color).green / 256) << 16) | \
(((color).blue / 256) << 8)))
Definition at line 67 of file theme.c.
Referenced by draw_op_as_pixbuf().
| #define INTENSITY | ( | r, | |||
| g, | |||||
| b | ) | ((r) * 0.30 + (g) * 0.59 + (b) * 0.11) |
| #define IS_VARIABLE_CHAR | ( | c | ) | (g_ascii_isalpha ((c)) || (c) == '_') |
Whether a variable can validly appear as part of the name of a variable.
Definition at line 1642 of file theme.c.
Referenced by pos_tokenize().
| #define MAX_EXPRS 32 |
Referenced by pos_eval_helper().
| static GdkPixbuf* apply_alpha | ( | GdkPixbuf * | pixbuf, | |
| MetaAlphaGradientSpec * | spec, | |||
| gboolean | force_copy | |||
| ) | [static] |
Definition at line 2941 of file theme.c.
References _MetaAlphaGradientSpec::alphas, FALSE, meta_gradient_add_alpha(), _MetaAlphaGradientSpec::n_alphas, NULL, and _MetaAlphaGradientSpec::type.
Referenced by draw_op_as_pixbuf(), and scale_and_alpha_pixbuf().
| static void button_rect | ( | MetaButtonType | type, | |
| const MetaFrameGeometry * | fgeom, | |||
| int | middle_background_offset, | |||
| GdkRectangle * | rect | |||
| ) | [static] |
Definition at line 4170 of file theme.c.
References _MetaFrameGeometry::above_rect, _MetaFrameGeometry::close_rect, _MetaFrameGeometry::left_left_background, _MetaFrameGeometry::left_middle_backgrounds, _MetaFrameGeometry::left_right_background, _MetaFrameGeometry::max_rect, _MetaFrameGeometry::menu_rect, META_BUTTON_TYPE_ABOVE, META_BUTTON_TYPE_CLOSE, META_BUTTON_TYPE_LAST, META_BUTTON_TYPE_LEFT_LEFT_BACKGROUND, META_BUTTON_TYPE_LEFT_MIDDLE_BACKGROUND, META_BUTTON_TYPE_LEFT_RIGHT_BACKGROUND, META_BUTTON_TYPE_MAXIMIZE, META_BUTTON_TYPE_MENU, META_BUTTON_TYPE_MINIMIZE, META_BUTTON_TYPE_RIGHT_LEFT_BACKGROUND, META_BUTTON_TYPE_RIGHT_MIDDLE_BACKGROUND, META_BUTTON_TYPE_RIGHT_RIGHT_BACKGROUND, META_BUTTON_TYPE_SHADE, META_BUTTON_TYPE_STICK, META_BUTTON_TYPE_UNABOVE, META_BUTTON_TYPE_UNSHADE, META_BUTTON_TYPE_UNSTICK, _MetaFrameGeometry::min_rect, _MetaFrameGeometry::right_left_background, _MetaFrameGeometry::right_middle_backgrounds, _MetaFrameGeometry::right_right_background, _MetaFrameGeometry::shade_rect, _MetaFrameGeometry::stick_rect, _MetaFrameGeometry::unabove_rect, _MetaFrameGeometry::unshade_rect, _MetaFrameGeometry::unstick_rect, and _MetaButtonSpace::visible.
Referenced by meta_frame_style_draw().
| static gboolean check_state | ( | MetaFrameStyleSet * | style_set, | |
| MetaFrameState | state, | |||
| GError ** | error | |||
| ) | [static] |
Definition at line 4620 of file theme.c.
References _, FALSE, get_style(), META_FRAME_FOCUS_LAST, meta_frame_focus_to_string(), META_FRAME_RESIZE_NONE, meta_frame_resize_to_string(), meta_frame_state_to_string(), META_THEME_ERROR, META_THEME_ERROR_FAILED, NULL, and TRUE.
Referenced by meta_frame_style_set_validate().
| static void color_composite | ( | const GdkColor * | bg, | |
| const GdkColor * | fg, | |||
| double | alpha_d, | |||
| GdkColor * | color | |||
| ) | [static] |
| static GdkPixbuf* colorize_pixbuf | ( | GdkPixbuf * | orig, | |
| GdkColor * | new_color | |||
| ) | [static] |
Definition at line 100 of file theme.c.
References CLAMP_UCHAR, INTENSITY, and NULL.
Referenced by draw_op_as_pixbuf().
| static gboolean do_operation | ( | PosExpr * | a, | |
| PosExpr * | b, | |||
| PosOperatorType | op, | |||
| GError ** | err | |||
| ) | [static] |
Definition at line 1880 of file theme.c.
References _, PosExpr::d, PosExpr::double_val, FALSE, PosExpr::int_val, META_THEME_ERROR, META_THEME_ERROR_DIVIDE_BY_ZERO, META_THEME_ERROR_MOD_ON_FLOAT, POS_EXPR_DOUBLE, POS_EXPR_INT, POS_OP_ADD, POS_OP_DIVIDE, POS_OP_MAX, POS_OP_MIN, POS_OP_MOD, POS_OP_MULTIPLY, POS_OP_NONE, POS_OP_SUBTRACT, TRUE, and PosExpr::type.
Referenced by do_operations().
| static gboolean do_operations | ( | PosExpr * | exprs, | |
| int * | n_exprs, | |||
| int | precedence, | |||
| GError ** | err | |||
| ) | [static] |
Definition at line 1993 of file theme.c.
References _, PosExpr::d, do_operation(), FALSE, META_THEME_ERROR, META_THEME_ERROR_FAILED, op_name(), PosExpr::operator, POS_EXPR_OPERATOR, POS_OP_ADD, POS_OP_DIVIDE, POS_OP_MAX, POS_OP_MIN, POS_OP_MOD, POS_OP_MULTIPLY, POS_OP_SUBTRACT, and TRUE.
Referenced by pos_eval_helper().
| static GdkPixbuf* draw_op_as_pixbuf | ( | const MetaDrawOp * | op, | |
| GtkWidget * | widget, | |||
| const MetaDrawInfo * | info, | |||
| int | width, | |||
| int | height | |||
| ) | [static] |
Definition at line 3244 of file theme.c.
References apply_alpha(), colorize_pixbuf(), _MetaDrawOp::data, FALSE, GDK_COLOR_RGB, GDK_COLOR_RGBA, _MetaDrawOp::gradient, _MetaDrawInfo::icon, _MetaDrawOp::icon, _MetaDrawOp::image, meta_color_spec_render(), 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_RECTANGLE, META_DRAW_TILE, META_DRAW_TINT, META_DRAW_TITLE, meta_gradient_add_alpha(), meta_gradient_spec_render(), _MetaDrawInfo::mini_icon, NULL, _MetaDrawOp::rectangle, scale_and_alpha_pixbuf(), _MetaDrawOp::tint, and _MetaDrawOp::type.
Referenced by meta_draw_op_draw_with_env().
| static void fill_env | ( | MetaPositionExprEnv * | env, | |
| const MetaDrawInfo * | info, | |||
| MetaRectangle | logical_region | |||
| ) | [static] |
Definition at line 3426 of file theme.c.
References _MetaFrameGeometry::bottom_height, _MetaPositionExprEnv::bottom_height, _MetaDrawInfo::fgeom, _MetaDrawInfo::icon, _MetaPositionExprEnv::icon_height, _MetaPositionExprEnv::icon_width, _MetaFrameGeometry::left_width, _MetaPositionExprEnv::left_width, _MetaDrawInfo::mini_icon, _MetaPositionExprEnv::mini_icon_height, _MetaPositionExprEnv::mini_icon_width, _MetaPositionExprEnv::object_height, _MetaPositionExprEnv::object_width, _MetaPositionExprEnv::rect, _MetaFrameGeometry::right_width, _MetaPositionExprEnv::right_width, _MetaPositionExprEnv::theme, _MetaPositionExprEnv::title_height, _MetaDrawInfo::title_layout_height, _MetaDrawInfo::title_layout_width, _MetaPositionExprEnv::title_width, _MetaFrameGeometry::top_height, and _MetaPositionExprEnv::top_height.
Referenced by meta_draw_op_draw(), and meta_draw_op_list_draw().
| static gboolean first_uppercase | ( | const char * | str | ) | [static] |
Definition at line 5211 of file theme.c.
Referenced by meta_theme_define_color_constant(), meta_theme_define_float_constant(), and meta_theme_define_int_constant().
| static void free_button_ops | ( | MetaDrawOpList * | op_lists[META_BUTTON_TYPE_LAST][META_BUTTON_STATE_LAST] | ) | [static] |
Definition at line 4051 of file theme.c.
References META_BUTTON_TYPE_LAST, and meta_draw_op_list_unref().
Referenced by meta_frame_style_unref().
| static void free_color_spec | ( | gpointer | spec, | |
| gpointer | user_data | |||
| ) | [static] |
Definition at line 957 of file theme.c.
References meta_color_spec_free().
Referenced by meta_gradient_spec_free().
| static void free_focus_styles | ( | MetaFrameStyle * | focus_styles[META_FRAME_FOCUS_LAST] | ) | [static] |
Definition at line 4510 of file theme.c.
References meta_frame_style_unref().
Referenced by meta_frame_style_set_unref().
| static void free_tokens | ( | PosToken * | tokens, | |
| int | n_tokens | |||
| ) | [static] |
Frees an array of tokens.
All the tokens and their associated memory will be freed.
| tokens | an array of tokens to be freed | |
| n_tokens | how many tokens are in the array. |
Definition at line 1532 of file theme.c.
References POS_TOKEN_VARIABLE, and PosToken::v.
Referenced by meta_draw_spec_free(), and pos_tokenize().
| static MetaDrawOpList* get_button | ( | MetaFrameStyle * | style, | |
| MetaButtonType | type, | |||
| MetaButtonState | state | |||
| ) | [static] |
Definition at line 4095 of file theme.c.
References _MetaFrameStyle::buttons, META_BUTTON_STATE_NORMAL, META_BUTTON_STATE_PRELIGHT, META_BUTTON_TYPE_LEFT_LEFT_BACKGROUND, META_BUTTON_TYPE_LEFT_MIDDLE_BACKGROUND, META_BUTTON_TYPE_LEFT_RIGHT_BACKGROUND, META_BUTTON_TYPE_RIGHT_LEFT_BACKGROUND, META_BUTTON_TYPE_RIGHT_MIDDLE_BACKGROUND, META_BUTTON_TYPE_RIGHT_RIGHT_BACKGROUND, NULL, and _MetaFrameStyle::parent.
Referenced by meta_frame_style_draw(), and meta_frame_style_validate().
| static GdkGC* get_gc_for_primitive | ( | GtkWidget * | widget, | |
| GdkDrawable * | drawable, | |||
| MetaColorSpec * | color_spec, | |||
| const GdkRectangle * | clip, | |||
| int | line_width | |||
| ) | [static] |
Definition at line 2911 of file theme.c.
References meta_color_spec_render().
Referenced by meta_draw_op_draw_with_env().
| static MetaFrameStyle* get_style | ( | MetaFrameStyleSet * | style_set, | |
| MetaFrameState | state, | |||
| MetaFrameResize | resize, | |||
| MetaFrameFocus | focus | |||
| ) | [static] |
Definition at line 4558 of file theme.c.
References _MetaFrameStyleSet::maximized_and_shaded_styles, _MetaFrameStyleSet::maximized_styles, META_FRAME_RESIZE_BOTH, META_FRAME_STATE_LAST, META_FRAME_STATE_MAXIMIZED, META_FRAME_STATE_MAXIMIZED_AND_SHADED, META_FRAME_STATE_NORMAL, META_FRAME_STATE_SHADED, _MetaFrameStyleSet::normal_styles, NULL, _MetaFrameStyleSet::parent, and _MetaFrameStyleSet::shaded_styles.
Referenced by check_state(), meta_frame_style_set_validate(), and theme_get_style().
| static void gtk_style_shade | ( | GdkColor * | a, | |
| GdkColor * | b, | |||
| gdouble | k | |||
| ) | [static] |
Definition at line 5995 of file theme.c.
References hls_to_rgb(), and rgb_to_hls().
Referenced by meta_color_spec_render().
| static void hls_to_rgb | ( | gdouble * | h, | |
| gdouble * | l, | |||
| gdouble * | s | |||
| ) | [static] |
| static void init_border | ( | GtkBorder * | border | ) | [static] |
Sets all the fields of a border to dummy values.
| border | The border whose fields should be reset. |
Definition at line 198 of file theme.c.
Referenced by meta_frame_layout_new().
| void meta_alpha_gradient_spec_free | ( | MetaAlphaGradientSpec * | spec | ) |
Definition at line 1047 of file theme.c.
References _MetaAlphaGradientSpec::alphas, and NULL.
Referenced by meta_draw_op_free(), parse_alpha(), parse_draw_op_element(), and parse_toplevel_element().
| MetaAlphaGradientSpec* meta_alpha_gradient_spec_new | ( | MetaGradientType | type, | |
| int | n_alphas | |||
| ) |
Definition at line 1030 of file theme.c.
References _MetaAlphaGradientSpec::alphas, _MetaAlphaGradientSpec::n_alphas, NULL, and _MetaAlphaGradientSpec::type.
Referenced by parse_alpha().
| MetaButtonState meta_button_state_from_string | ( | const char * | str | ) |
Definition at line 5494 of file theme.c.
References META_BUTTON_STATE_LAST, META_BUTTON_STATE_NORMAL, META_BUTTON_STATE_PRELIGHT, and META_BUTTON_STATE_PRESSED.
Referenced by parse_style_element().
| const char* meta_button_state_to_string | ( | MetaButtonState | state | ) |
Definition at line 5507 of file theme.c.
References META_BUTTON_STATE_LAST, META_BUTTON_STATE_NORMAL, META_BUTTON_STATE_PRELIGHT, and META_BUTTON_STATE_PRESSED.
Referenced by meta_frame_style_validate().
| MetaButtonType meta_button_type_from_string | ( | const char * | str, | |
| MetaTheme * | theme | |||
| ) |
Definition at line 5525 of file theme.c.
References META_BUTTON_TYPE_ABOVE, META_BUTTON_TYPE_CLOSE, META_BUTTON_TYPE_LAST, META_BUTTON_TYPE_LEFT_LEFT_BACKGROUND, META_BUTTON_TYPE_LEFT_MIDDLE_BACKGROUND, META_BUTTON_TYPE_LEFT_RIGHT_BACKGROUND, META_BUTTON_TYPE_MAXIMIZE, META_BUTTON_TYPE_MENU, META_BUTTON_TYPE_MINIMIZE, META_BUTTON_TYPE_RIGHT_LEFT_BACKGROUND, META_BUTTON_TYPE_RIGHT_MIDDLE_BACKGROUND, META_BUTTON_TYPE_RIGHT_RIGHT_BACKGROUND, META_BUTTON_TYPE_SHADE, META_BUTTON_TYPE_STICK, META_BUTTON_TYPE_UNABOVE, META_BUTTON_TYPE_UNSHADE, META_BUTTON_TYPE_UNSTICK, META_THEME_ALLOWS, and META_THEME_SHADE_STICK_ABOVE_BUTTONS.
Referenced by parse_style_element().
| const char* meta_button_type_to_string | ( | MetaButtonType | type | ) |
Definition at line 5568 of file theme.c.
References META_BUTTON_TYPE_ABOVE, META_BUTTON_TYPE_CLOSE, META_BUTTON_TYPE_LAST, META_BUTTON_TYPE_LEFT_LEFT_BACKGROUND, META_BUTTON_TYPE_LEFT_MIDDLE_BACKGROUND, META_BUTTON_TYPE_LEFT_RIGHT_BACKGROUND, META_BUTTON_TYPE_MAXIMIZE, META_BUTTON_TYPE_MENU, META_BUTTON_TYPE_MINIMIZE, META_BUTTON_TYPE_RIGHT_LEFT_BACKGROUND, META_BUTTON_TYPE_RIGHT_MIDDLE_BACKGROUND, META_BUTTON_TYPE_RIGHT_RIGHT_BACKGROUND, META_BUTTON_TYPE_SHADE, META_BUTTON_TYPE_STICK, META_BUTTON_TYPE_UNABOVE, META_BUTTON_TYPE_UNSHADE, and META_BUTTON_TYPE_UNSTICK.
Referenced by meta_frame_style_validate().
| MetaGtkColorComponent meta_color_component_from_string | ( | const char * | str | ) |
Definition at line 5443 of file theme.c.
References META_GTK_COLOR_BASE, META_GTK_COLOR_BG, META_GTK_COLOR_DARK, META_GTK_COLOR_FG, META_GTK_COLOR_LAST, META_GTK_COLOR_LIGHT, META_GTK_COLOR_MID, META_GTK_COLOR_TEXT, and META_GTK_COLOR_TEXT_AA.
Referenced by meta_color_spec_new_from_string().
| const char* meta_color_component_to_string | ( | MetaGtkColorComponent | component | ) |
Definition at line 5466 of file theme.c.
References META_GTK_COLOR_BASE, META_GTK_COLOR_BG, META_GTK_COLOR_DARK, META_GTK_COLOR_FG, META_GTK_COLOR_LAST, META_GTK_COLOR_LIGHT, META_GTK_COLOR_MID, META_GTK_COLOR_TEXT, and META_GTK_COLOR_TEXT_AA.
| void meta_color_spec_free | ( | MetaColorSpec * | spec | ) |
Definition at line 1091 of file theme.c.
References _MetaColorSpec::basic, _MetaColorSpec::blend, _MetaColorSpec::data, DEBUG_FILL_STRUCT, _MetaColorSpec::gtk, META_COLOR_SPEC_BASIC, META_COLOR_SPEC_BLEND, meta_color_spec_free(), META_COLOR_SPEC_GTK, META_COLOR_SPEC_SHADE, NULL, _MetaColorSpec::shade, and _MetaColorSpec::type.
Referenced by free_color_spec(), meta_color_spec_free(), meta_color_spec_new_from_string(), meta_draw_op_free(), and meta_frame_style_unref().
| MetaColorSpec* meta_color_spec_new | ( | MetaColorSpecType | type | ) |
Definition at line 1056 of file theme.c.
References _MetaColorSpec::basic, _MetaColorSpec::blend, _MetaColorSpec::data, _MetaColorSpec::gtk, META_COLOR_SPEC_BASIC, META_COLOR_SPEC_BLEND, META_COLOR_SPEC_GTK, META_COLOR_SPEC_SHADE, _MetaColorSpec::shade, and _MetaColorSpec::type.
Referenced by meta_color_spec_new_from_string(), and meta_color_spec_new_gtk().
| MetaColorSpec* meta_color_spec_new_from_string | ( | const char * | str, | |
| GError ** | err | |||
| ) |
Definition at line 1124 of file theme.c.
References _, _MetaColorSpec::basic, _MetaColorSpec::blend, _MetaColorSpec::data, _MetaColorSpec::gtk, meta_color_component_from_string(), META_COLOR_SPEC_BASIC, META_COLOR_SPEC_BLEND, meta_color_spec_free(), META_COLOR_SPEC_GTK, meta_color_spec_new(), meta_color_spec_new_from_string(), META_COLOR_SPEC_SHADE, META_GTK_COLOR_LAST, meta_gtk_state_from_string(), META_THEME_ERROR, META_THEME_ERROR_FAILED, N_GTK_STATES, NULL, and _MetaColorSpec::shade.
Referenced by meta_color_spec_new_from_string(), parse_color(), and parse_toplevel_element().
| MetaColorSpec* meta_color_spec_new_gtk | ( | MetaGtkColorComponent | component, | |
| GtkStateType | state | |||
| ) |
Definition at line 1347 of file theme.c.
References _MetaColorSpec::data, _MetaColorSpec::gtk, META_COLOR_SPEC_GTK, and meta_color_spec_new().
| void meta_color_spec_render | ( | MetaColorSpec * | spec, | |
| GtkWidget * | widget, | |||
| GdkColor * | color | |||
| ) |
Definition at line 1361 of file theme.c.
References _MetaColorSpec::basic, _MetaColorSpec::blend, color_composite(), _MetaColorSpec::data, _MetaColorSpec::gtk, gtk_style_shade(), META_COLOR_SPEC_BASIC, META_COLOR_SPEC_BLEND, META_COLOR_SPEC_GTK, meta_color_spec_render(), META_COLOR_SPEC_SHADE, META_GTK_COLOR_BASE, META_GTK_COLOR_BG, META_GTK_COLOR_DARK, META_GTK_COLOR_FG, META_GTK_COLOR_LAST, META_GTK_COLOR_LIGHT, META_GTK_COLOR_MID, META_GTK_COLOR_TEXT, META_GTK_COLOR_TEXT_AA, NULL, _MetaColorSpec::shade, and _MetaColorSpec::type.
Referenced by draw_op_as_pixbuf(), get_gc_for_primitive(), meta_color_spec_render(), meta_frames_set_window_background(), and meta_gradient_spec_render().
| void meta_draw_op_draw | ( | const MetaDrawOp * | op, | |
| GtkWidget * | widget, | |||
| GdkDrawable * | drawable, | |||
| const GdkRectangle * | clip, | |||
| const MetaDrawInfo * | info, | |||
| MetaRectangle | logical_region | |||
| ) |
| static void meta_draw_op_draw_with_env | ( | const MetaDrawOp * | op, | |
| GtkWidget * | widget, | |||
| GdkDrawable * | drawable, | |||
| const GdkRectangle * | clip, | |||
| const MetaDrawInfo * | info, | |||
| MetaRectangle | rect, | |||
| MetaPositionExprEnv * | env | |||
| ) | [static] |
Definition at line 3461 of file theme.c.
References _MetaDrawOp::arc, _MetaDrawOp::data, draw_op_as_pixbuf(), get_gc_for_primitive(), _MetaDrawOp::gradient, _MetaDrawOp::gtk_arrow, _MetaDrawOp::gtk_box, _MetaDrawOp::gtk_vline, _MetaRectangle::height, _MetaDrawOp::icon, _MetaDrawOp::image, _MetaDrawOp::line, 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_draw(), META_DRAW_RECTANGLE, META_DRAW_TILE, META_DRAW_TINT, META_DRAW_TITLE, NULL, _MetaPositionExprEnv::object_height, _MetaPositionExprEnv::object_width, _MetaDrawOp::op_list, parse_size_unchecked(), parse_x_position_unchecked(), parse_y_position_unchecked(), _MetaDrawOp::rectangle, render_pixbuf(), _MetaDrawOp::tile, _MetaDrawOp::tint, _MetaDrawOp::title, _MetaDrawInfo::title_layout, TRUE, _MetaDrawOp::type, _MetaRectangle::width, _MetaRectangle::x, and _MetaRectangle::y.
Referenced by meta_draw_op_draw(), and meta_draw_op_list_draw().
| void meta_draw_op_free | ( | MetaDrawOp * | op | ) |
Definition at line 2756 of file theme.c.
References _MetaDrawOp::arc, _MetaDrawOp::clip, _MetaDrawOp::data, _MetaDrawOp::gradient, _MetaDrawOp::gtk_arrow, _MetaDrawOp::gtk_box, _MetaDrawOp::gtk_vline, _MetaDrawOp::icon, _MetaDrawOp::image, _MetaDrawOp::line, meta_alpha_gradient_spec_free(), meta_color_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_unref(), META_DRAW_RECTANGLE, meta_draw_spec_free(), META_DRAW_TILE, META_DRAW_TINT, META_DRAW_TITLE, meta_gradient_spec_free(), NULL, _MetaDrawOp::op_list, _MetaDrawOp::rectangle, _MetaDrawOp::tile, _MetaDrawOp::tint, _MetaDrawOp::title, and _MetaDrawOp::type.
Referenced by end_element_handler(), meta_draw_op_list_unref(), and parse_info_free().
| void meta_draw_op_list_append | ( | MetaDrawOpList * | op_list, | |
| MetaDrawOp * | op | |||
| ) |
Definition at line 3947 of file theme.c.
References _MetaDrawOpList::n_allocated, _MetaDrawOpList::n_ops, and _MetaDrawOpList::ops.
Referenced by end_element_handler(), and parse_draw_op_element().
| gboolean meta_draw_op_list_contains | ( | MetaDrawOpList * | op_list, | |
| MetaDrawOpList * | child | |||
| ) |
Definition at line 3976 of file theme.c.
References _MetaDrawOp::data, FALSE, META_DRAW_OP_LIST, meta_draw_op_list_contains(), META_DRAW_TILE, _MetaDrawOpList::n_ops, _MetaDrawOp::op_list, _MetaDrawOpList::ops, _MetaDrawOp::tile, TRUE, and _MetaDrawOp::type.
Referenced by meta_draw_op_list_contains(), and parse_draw_op_element().
| void meta_draw_op_list_draw | ( | const MetaDrawOpList * | op_list, | |
| GtkWidget * | widget, | |||
| GdkDrawable * | drawable, | |||
| const GdkRectangle * | clip, | |||
| const MetaDrawInfo * | info, | |||
| MetaRectangle | rect | |||
| ) |
Definition at line 3880 of file theme.c.
References _MetaDrawOp::clip, _MetaDrawOp::data, fill_env(), _MetaRectangle::height, META_DRAW_CLIP, meta_draw_op_draw_with_env(), _MetaDrawOpList::n_ops, _MetaDrawOpList::ops, parse_size_unchecked(), parse_x_position_unchecked(), parse_y_position_unchecked(), _MetaDrawOp::type, _MetaRectangle::width, _MetaDrawOp::x, _MetaRectangle::x, and _MetaRectangle::y.
Referenced by meta_draw_op_draw_with_env(), and meta_frame_style_draw().
| MetaDrawOpList* meta_draw_op_list_new | ( | int | n_preallocs | ) |
Definition at line 3833 of file theme.c.
References _MetaDrawOpList::n_allocated, _MetaDrawOpList::n_ops, NULL, _MetaDrawOpList::ops, and _MetaDrawOpList::refcount.
Referenced by parse_button_element(), parse_menu_icon_element(), parse_piece_element(), and parse_toplevel_element().
| void meta_draw_op_list_ref | ( | MetaDrawOpList * | op_list | ) |
Definition at line 3850 of file theme.c.
References NULL, and _MetaDrawOpList::refcount.
Referenced by meta_theme_insert_draw_op_list(), parse_draw_op_element(), and parse_style_element().
| void meta_draw_op_list_unref | ( | MetaDrawOpList * | op_list | ) |
Definition at line 3858 of file theme.c.
References DEBUG_FILL_STRUCT, meta_draw_op_free(), _MetaDrawOpList::n_ops, NULL, _MetaDrawOpList::ops, and _MetaDrawOpList::refcount.
Referenced by end_element_handler(), free_button_ops(), meta_draw_op_free(), meta_frame_style_unref(), meta_theme_new(), and parse_info_free().
| gboolean meta_draw_op_list_validate | ( | MetaDrawOpList * | op_list, | |
| GError ** | error | |||
| ) |
| MetaDrawOp* meta_draw_op_new | ( | MetaDrawType | type | ) |
Definition at line 2683 of file theme.c.
References _MetaDrawOp::arc, _MetaDrawOp::clip, _MetaDrawOp::data, _MetaDrawOp::gradient, _MetaDrawOp::gtk_arrow, _MetaDrawOp::gtk_box, _MetaDrawOp::gtk_vline, _MetaDrawOp::icon, _MetaDrawOp::image, _MetaDrawOp::line, 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_RECTANGLE, META_DRAW_TILE, META_DRAW_TINT, META_DRAW_TITLE, _MetaDrawOp::op_list, _MetaDrawOp::rectangle, _MetaDrawOp::tile, _MetaDrawOp::tint, _MetaDrawOp::title, and _MetaDrawOp::type.
Referenced by parse_draw_op_element().
| void meta_draw_spec_free | ( | MetaDrawSpec * | spec | ) |
Definition at line 2648 of file theme.c.
References free_tokens(), _MetaDrawSpec::n_tokens, and _MetaDrawSpec::tokens.
Referenced by meta_draw_op_free(), and meta_draw_spec_new().
| MetaDrawSpec* meta_draw_spec_new | ( | MetaTheme * | theme, | |
| const char * | expr, | |||
| GError ** | error | |||
| ) |
Definition at line 2655 of file theme.c.
References _MetaDrawSpec::constant, FALSE, meta_draw_spec_free(), meta_theme_replace_constants(), _MetaDrawSpec::n_tokens, NULL, pos_eval(), pos_tokenize(), _MetaDrawSpec::tokens, and _MetaDrawSpec::value.
Referenced by parse_draw_op_element().
| MetaFrameFocus meta_frame_focus_from_string | ( | const char * | str | ) |
Definition at line 5749 of file theme.c.
References META_FRAME_FOCUS_LAST, META_FRAME_FOCUS_NO, and META_FRAME_FOCUS_YES.
Referenced by parse_style_set_element().
| const char* meta_frame_focus_to_string | ( | MetaFrameFocus | focus | ) |
Definition at line 5760 of file theme.c.
References META_FRAME_FOCUS_LAST, META_FRAME_FOCUS_NO, and META_FRAME_FOCUS_YES.
Referenced by check_state(), and meta_frame_style_set_validate().
| void meta_frame_layout_calc_geometry | ( | const MetaFrameLayout * | layout, | |
| int | text_height, | |||
| MetaFrameFlags | flags, | |||
| int | client_width, | |||
| int | client_height, | |||
| const MetaButtonLayout * | button_layout, | |||
| MetaFrameGeometry * | fgeom, | |||
| MetaTheme * | theme | |||
| ) |
Definition at line 586 of file theme.c.
References _MetaFrameGeometry::above_rect, ADDRESS_OF_BUTTON_RECTS, _MetaFrameGeometry::bottom_height, _MetaFrameLayout::bottom_left_corner_rounded_radius, _MetaFrameGeometry::bottom_left_corner_rounded_radius, _MetaFrameLayout::bottom_right_corner_rounded_radius, _MetaFrameGeometry::bottom_right_corner_rounded_radius, _MetaFrameGeometry::bottom_titlebar_edge, _MetaFrameLayout::button_aspect, _MetaFrameLayout::button_border, _MetaFrameLayout::button_height, _MetaFrameLayout::button_sizing, _MetaFrameLayout::button_width, _MetaButtonSpace::clickable, _MetaFrameGeometry::close_rect, FALSE, _MetaFrameGeometry::height, _MetaFrameLayout::hide_buttons, _MetaButtonLayout::left_buttons, _MetaButtonLayout::left_buttons_has_spacer, _MetaFrameGeometry::left_left_background, _MetaFrameGeometry::left_middle_backgrounds, _MetaFrameGeometry::left_right_background, _MetaFrameLayout::left_titlebar_edge, _MetaFrameGeometry::left_titlebar_edge, _MetaFrameGeometry::left_width, LENGTH_OF_BUTTON_RECTS, MAX_BUTTONS_PER_CORNER, _MetaFrameGeometry::max_rect, _MetaFrameGeometry::menu_rect, meta_bug(), META_BUTTON_FUNCTION_LAST, META_BUTTON_SIZING_ASPECT, META_BUTTON_SIZING_FIXED, META_BUTTON_SIZING_LAST, meta_frame_layout_get_borders(), META_FRAME_MAXIMIZED, META_FRAME_SHADED, _MetaFrameGeometry::min_rect, NULL, rect_for_function(), _MetaButtonLayout::right_buttons, _MetaButtonLayout::right_buttons_has_spacer, _MetaFrameGeometry::right_left_background, _MetaFrameGeometry::right_middle_backgrounds, _MetaFrameGeometry::right_right_background, _MetaFrameLayout::right_titlebar_edge, _MetaFrameGeometry::right_titlebar_edge, _MetaFrameLayout::right_width, _MetaFrameGeometry::right_width, _MetaFrameGeometry::shade_rect, _MetaFrameGeometry::stick_rect, strip_button(), _MetaFrameLayout::title_border, _MetaFrameGeometry::title_rect, _MetaFrameGeometry::top_height, _MetaFrameLayout::top_left_corner_rounded_radius, _MetaFrameGeometry::top_left_corner_rounded_radius, _MetaFrameLayout::top_right_corner_rounded_radius, _MetaFrameGeometry::top_right_corner_rounded_radius, _MetaFrameGeometry::top_titlebar_edge, _MetaButtonSpace::visible, and _MetaFrameGeometry::width.
Referenced by meta_theme_calc_geometry(), and meta_theme_draw_frame().
| MetaFrameLayout* meta_frame_layout_copy | ( | const MetaFrameLayout * | src | ) |
Definition at line 367 of file theme.c.
References _MetaFrameLayout::refcount.
Referenced by parse_toplevel_element().
| void meta_frame_layout_get_borders | ( | const MetaFrameLayout * | layout, | |
| int | text_height, | |||
| MetaFrameFlags | flags, | |||
| int * | top_height, | |||
| int * | bottom_height, | |||
| int * | left_width, | |||
| int * | right_width | |||
| ) |
Definition at line 404 of file theme.c.
References _MetaFrameLayout::bottom_height, _MetaFrameLayout::button_border, _MetaFrameLayout::button_height, _MetaFrameLayout::has_title, _MetaFrameLayout::left_width, META_FRAME_FULLSCREEN, META_FRAME_SHADED, NULL, _MetaFrameLayout::right_width, _MetaFrameLayout::title_border, and _MetaFrameLayout::title_vertical_pad.
Referenced by meta_frame_layout_calc_geometry(), and meta_theme_get_frame_borders().
| MetaFrameLayout* meta_frame_layout_new | ( | void | ) |
Creates a new, empty MetaFrameLayout.
The fields will be set to dummy values.
Definition at line 213 of file theme.c.
References _MetaFrameLayout::bottom_height, _MetaFrameLayout::button_aspect, _MetaFrameLayout::button_border, _MetaFrameLayout::button_height, _MetaFrameLayout::button_sizing, _MetaFrameLayout::button_width, _MetaFrameLayout::has_title, init_border(), _MetaFrameLayout::left_titlebar_edge, _MetaFrameLayout::left_width, META_BUTTON_SIZING_LAST, _MetaFrameLayout::refcount, _MetaFrameLayout::right_titlebar_edge, _MetaFrameLayout::right_width, _MetaFrameLayout::title_border, _MetaFrameLayout::title_scale, _MetaFrameLayout::title_vertical_pad, and TRUE.
Referenced by parse_toplevel_element().
| void meta_frame_layout_ref | ( | MetaFrameLayout * | layout | ) |
Definition at line 381 of file theme.c.
References NULL, and _MetaFrameLayout::refcount.
Referenced by meta_theme_insert_layout(), and parse_toplevel_element().
| void meta_frame_layout_unref | ( | MetaFrameLayout * | layout | ) |
Definition at line 389 of file theme.c.
References DEBUG_FILL_STRUCT, NULL, and _MetaFrameLayout::refcount.
Referenced by end_element_handler(), meta_frame_style_unref(), meta_theme_new(), and parse_info_free().
| gboolean meta_frame_layout_validate | ( | const MetaFrameLayout * | layout, | |
| GError ** | error | |||
| ) |
Definition at line 317 of file theme.c.
References _, _MetaFrameLayout::button_aspect, _MetaFrameLayout::button_sizing, CHECK_GEOMETRY_BORDER, CHECK_GEOMETRY_VALUE, FALSE, META_BUTTON_SIZING_ASPECT, META_BUTTON_SIZING_FIXED, META_BUTTON_SIZING_LAST, META_THEME_ERROR, META_THEME_ERROR_FRAME_GEOMETRY, NULL, and TRUE.
Referenced by end_element_handler().
| MetaFramePiece meta_frame_piece_from_string | ( | const char * | str | ) |
Definition at line 5612 of file theme.c.
References META_FRAME_PIECE_BOTTOM_EDGE, META_FRAME_PIECE_BOTTOM_TITLEBAR_EDGE, META_FRAME_PIECE_ENTIRE_BACKGROUND, META_FRAME_PIECE_LAST, META_FRAME_PIECE_LEFT_EDGE, META_FRAME_PIECE_LEFT_TITLEBAR_EDGE, META_FRAME_PIECE_OVERLAY, META_FRAME_PIECE_RIGHT_EDGE, META_FRAME_PIECE_RIGHT_TITLEBAR_EDGE, META_FRAME_PIECE_TITLE, META_FRAME_PIECE_TITLEBAR, META_FRAME_PIECE_TITLEBAR_MIDDLE, and META_FRAME_PIECE_TOP_TITLEBAR_EDGE.
Referenced by parse_style_element().
| const char* meta_frame_piece_to_string | ( | MetaFramePiece | piece | ) |
Definition at line 5643 of file theme.c.
References META_FRAME_PIECE_BOTTOM_EDGE, META_FRAME_PIECE_BOTTOM_TITLEBAR_EDGE, META_FRAME_PIECE_ENTIRE_BACKGROUND, META_FRAME_PIECE_LAST, META_FRAME_PIECE_LEFT_EDGE, META_FRAME_PIECE_LEFT_TITLEBAR_EDGE, META_FRAME_PIECE_OVERLAY, META_FRAME_PIECE_RIGHT_EDGE, META_FRAME_PIECE_RIGHT_TITLEBAR_EDGE, META_FRAME_PIECE_TITLE, META_FRAME_PIECE_TITLEBAR, META_FRAME_PIECE_TITLEBAR_MIDDLE, and META_FRAME_PIECE_TOP_TITLEBAR_EDGE.
| MetaFrameResize meta_frame_resize_from_string | ( | const char * | str | ) |
Definition at line 5714 of file theme.c.
References META_FRAME_RESIZE_BOTH, META_FRAME_RESIZE_HORIZONTAL, META_FRAME_RESIZE_LAST, META_FRAME_RESIZE_NONE, and META_FRAME_RESIZE_VERTICAL.
Referenced by parse_style_set_element().
| const char* meta_frame_resize_to_string | ( | MetaFrameResize | resize | ) |
Definition at line 5729 of file theme.c.
References META_FRAME_RESIZE_BOTH, META_FRAME_RESIZE_HORIZONTAL, META_FRAME_RESIZE_LAST, META_FRAME_RESIZE_NONE, and META_FRAME_RESIZE_VERTICAL.
Referenced by check_state(), and meta_frame_style_set_validate().
| MetaFrameState meta_frame_state_from_string | ( | const char * | str | ) |
Definition at line 5679 of file theme.c.
References META_FRAME_STATE_LAST, META_FRAME_STATE_MAXIMIZED, META_FRAME_STATE_MAXIMIZED_AND_SHADED, META_FRAME_STATE_NORMAL, and META_FRAME_STATE_SHADED.
Referenced by parse_style_set_element().
| const char* meta_frame_state_to_string | ( | MetaFrameState | state | ) |
Definition at line 5694 of file theme.c.
References META_FRAME_STATE_LAST, META_FRAME_STATE_MAXIMIZED, META_FRAME_STATE_MAXIMIZED_AND_SHADED, META_FRAME_STATE_NORMAL, and META_FRAME_STATE_SHADED.
Referenced by check_state(), and meta_frame_style_set_validate().
| void meta_frame_style_draw | ( | MetaFrameStyle * | style, | |
| GtkWidget * | widget, | |||
| GdkDrawable * | drawable, | |||
| int | x_offset, | |||
| int | y_offset, | |||
| const GdkRectangle * | clip, | |||
| const MetaFrameGeometry * | fgeom, | |||
| int | client_width, | |||
| int | client_height, | |||
| PangoLayout * | title_layout, | |||
| int | text_height, | |||
| MetaButtonState | button_states[META_BUTTON_TYPE_LAST], | |||
| GdkPixbuf * | mini_icon, | |||
| GdkPixbuf * | icon | |||
| ) |
Definition at line 4248 of file theme.c.
References _MetaFrameGeometry::bottom_height, _MetaFrameGeometry::bottom_titlebar_edge, button_rect(), _MetaDrawInfo::fgeom, get_button(), _MetaFrameGeometry::height, _MetaDrawInfo::icon, _MetaFrameGeometry::left_titlebar_edge, _MetaFrameGeometry::left_width, MAX_MIDDLE_BACKGROUNDS, META_BUTTON_TYPE_LEFT_MIDDLE_BACKGROUND, META_BUTTON_TYPE_RIGHT_MIDDLE_BACKGROUND, meta_draw_op_list_draw(), META_FRAME_PIECE_BOTTOM_EDGE, META_FRAME_PIECE_BOTTOM_TITLEBAR_EDGE, META_FRAME_PIECE_ENTIRE_BACKGROUND, META_FRAME_PIECE_LAST, META_FRAME_PIECE_LEFT_EDGE, META_FRAME_PIECE_LEFT_TITLEBAR_EDGE, META_FRAME_PIECE_OVERLAY, META_FRAME_PIECE_RIGHT_EDGE, META_FRAME_PIECE_RIGHT_TITLEBAR_EDGE, META_FRAME_PIECE_TITLE, META_FRAME_PIECE_TITLEBAR, META_FRAME_PIECE_TITLEBAR_MIDDLE, META_FRAME_PIECE_TOP_TITLEBAR_EDGE, meta_rect(), _MetaDrawInfo::mini_icon, NULL, _MetaFrameStyle::parent, _MetaFrameStyle::pieces, _MetaFrameGeometry::right_titlebar_edge, _MetaFrameGeometry::right_width, _MetaDrawInfo::title_layout, _MetaDrawInfo::title_layout_height, _MetaDrawInfo::title_layout_width, _MetaFrameGeometry::title_rect, _MetaFrameGeometry::top_height, _MetaFrameGeometry::top_titlebar_edge, and _MetaFrameGeometry::width.
Referenced by meta_theme_draw_frame().
| MetaFrameStyle* meta_frame_style_new | ( | MetaFrameStyle * | parent | ) |
Constructor for a MetaFrameStyle.
| parent | The parent style. Data not filled in here will be looked for in the parent style, and in its parent style, and so on. |
Definition at line 4018 of file theme.c.
References meta_frame_style_ref(), _MetaFrameStyle::parent, _MetaFrameStyle::refcount, and _MetaFrameStyle::window_background_alpha.
Referenced by parse_toplevel_element().
| void meta_frame_style_ref | ( | MetaFrameStyle * | style | ) |
Increases the reference count of a frame style.
If the style is NULL, this is a no-op.
| style | The style. |
Definition at line 4043 of file theme.c.
References NULL, and _MetaFrameStyle::refcount.
Referenced by meta_frame_style_new(), meta_theme_insert_style(), and parse_style_set_element().
| MetaFrameStyleSet* meta_frame_style_set_new | ( | MetaFrameStyleSet * | parent | ) |
Definition at line 4494 of file theme.c.
References meta_frame_style_set_ref(), _MetaFrameStyleSet::parent, and _MetaFrameStyleSet::refcount.
Referenced by parse_toplevel_element().
| void meta_frame_style_set_ref | ( | MetaFrameStyleSet * | style_set | ) |
Definition at line 4520 of file theme.c.
References NULL, and _MetaFrameStyleSet::refcount.
Referenced by meta_frame_style_set_new(), meta_theme_insert_style_set(), and parse_toplevel_element().
| void meta_frame_style_set_unref | ( | MetaFrameStyleSet * | style_set | ) |
Definition at line 4528 of file theme.c.
References DEBUG_FILL_STRUCT, free_focus_styles(), _MetaFrameStyleSet::maximized_and_shaded_styles, _MetaFrameStyleSet::maximized_styles, META_FRAME_RESIZE_LAST, meta_frame_style_set_unref(), _MetaFrameStyleSet::normal_styles, NULL, _MetaFrameStyleSet::parent, _MetaFrameStyleSet::refcount, and _MetaFrameStyleSet::shaded_styles.
Referenced by end_element_handler(), meta_frame_style_set_unref(), meta_theme_free(), meta_theme_new(), and parse_info_free().
| gboolean meta_frame_style_set_validate | ( | MetaFrameStyleSet * | style_set, | |
| GError ** | error | |||
| ) |
Definition at line 4645 of file theme.c.
References _, check_state(), FALSE, get_style(), META_FRAME_FOCUS_LAST, meta_frame_focus_to_string(), META_FRAME_RESIZE_LAST, meta_frame_resize_to_string(), META_FRAME_STATE_MAXIMIZED, META_FRAME_STATE_MAXIMIZED_AND_SHADED, META_FRAME_STATE_NORMAL, META_FRAME_STATE_SHADED, meta_frame_state_to_string(), META_THEME_ERROR, META_THEME_ERROR_FAILED, NULL, and TRUE.
Referenced by end_element_handler().
| void meta_frame_style_unref | ( | MetaFrameStyle * | style | ) |
Definition at line 4062 of file theme.c.
References _MetaFrameStyle::buttons, DEBUG_FILL_STRUCT, free_button_ops(), _MetaFrameStyle::layout, meta_color_spec_free(), meta_draw_op_list_unref(), meta_frame_layout_unref(), META_FRAME_PIECE_LAST, meta_frame_style_unref(), NULL, _MetaFrameStyle::parent, _MetaFrameStyle::pieces, _MetaFrameStyle::refcount, and _MetaFrameStyle::window_background_color.
Referenced by end_element_handler(), free_focus_styles(), meta_frame_style_unref(), meta_theme_new(), and parse_info_free().
| gboolean meta_frame_style_validate | ( | MetaFrameStyle * | style, | |
| guint | current_theme_version, | |||
| GError ** | error | |||
| ) |
Definition at line 4135 of file theme.c.
References _, FALSE, get_button(), _MetaFrameStyle::layout, META_BUTTON_STATE_LAST, meta_button_state_to_string(), META_BUTTON_TYPE_CLOSE, META_BUTTON_TYPE_LAST, meta_button_type_to_string(), meta_theme_earliest_version_with_button(), META_THEME_ERROR, META_THEME_ERROR_FAILED, NULL, and TRUE.
Referenced by end_element_handler().
| MetaFrameType meta_frame_type_from_string | ( | const char * | str | ) |
Definition at line 5776 of file theme.c.
References META_FRAME_TYPE_BORDER, META_FRAME_TYPE_DIALOG, META_FRAME_TYPE_LAST, META_FRAME_TYPE_MENU, META_FRAME_TYPE_MODAL_DIALOG, META_FRAME_TYPE_NORMAL, and META_FRAME_TYPE_UTILITY.
Referenced by parse_toplevel_element().
| const char* meta_frame_type_to_string | ( | MetaFrameType | type | ) |
Definition at line 5799 of file theme.c.
References META_FRAME_TYPE_BORDER, META_FRAME_TYPE_DIALOG, META_FRAME_TYPE_LAST, META_FRAME_TYPE_MENU, META_FRAME_TYPE_MODAL_DIALOG, META_FRAME_TYPE_NORMAL, and META_FRAME_TYPE_UTILITY.
Referenced by meta_theme_validate().
| void meta_gradient_spec_free | ( | MetaGradientSpec * | spec | ) |
Definition at line 963 of file theme.c.
References _MetaGradientSpec::color_specs, DEBUG_FILL_STRUCT, free_color_spec(), and NULL.
Referenced by meta_draw_op_free().
| MetaGradientSpec* meta_gradient_spec_new | ( | MetaGradientType | type | ) |
Definition at line 944 of file theme.c.
References _MetaGradientSpec::color_specs, NULL, and _MetaGradientSpec::type.
Referenced by parse_draw_op_element().
| GdkPixbuf* meta_gradient_spec_render | ( | const MetaGradientSpec * | spec, | |
| GtkWidget * | widget, | |||
| int | width, | |||
| int | height | |||
| ) |
Definition at line 975 of file theme.c.
References _MetaGradientSpec::color_specs, meta_color_spec_render(), meta_gradient_create_multi(), NULL, and _MetaGradientSpec::type.
Referenced by draw_op_as_pixbuf().
| gboolean meta_gradient_spec_validate | ( | MetaGradientSpec * | spec, | |
| GError ** | error | |||
| ) |
Definition at line 1013 of file theme.c.
References _, _MetaGradientSpec::color_specs, FALSE, META_THEME_ERROR, META_THEME_ERROR_FAILED, NULL, and TRUE.
Referenced by end_element_handler().
| MetaGradientType meta_gradient_type_from_string | ( | const char * | str | ) |
Definition at line 5827 of file theme.c.
References META_GRADIENT_DIAGONAL, META_GRADIENT_HORIZONTAL, META_GRADIENT_LAST, and META_GRADIENT_VERTICAL.
Referenced by parse_draw_op_element().
| const char* meta_gradient_type_to_string | ( | MetaGradientType | type | ) |
Definition at line 5840 of file theme.c.
References META_GRADIENT_DIAGONAL, META_GRADIENT_HORIZONTAL, META_GRADIENT_LAST, and META_GRADIENT_VERTICAL.
| GtkArrowType meta_gtk_arrow_from_string | ( | const char * | str | ) |
| const char* meta_gtk_arrow_to_string | ( | GtkArrowType | arrow | ) |
| GtkShadowType meta_gtk_shadow_from_string | ( | const char * | str | ) |
| const char* meta_gtk_shadow_to_string | ( | GtkShadowType | shadow | ) |
| GtkStateType meta_gtk_state_from_string | ( | const char * | str | ) |
Definition at line 5858 of file theme.c.
Referenced by meta_color_spec_new_from_string(), and parse_draw_op_element().
| const char* meta_gtk_state_to_string | ( | GtkStateType | state | ) |
| PangoFontDescription* meta_gtk_widget_get_font_desc | ( | GtkWidget * | widget, | |
| double | scale, | |||
| const PangoFontDescription * | override | |||
| ) |
Definition at line 5404 of file theme.c.
Referenced by ensure_info(), and meta_frames_ensure_layout().
| MetaImageFillType meta_image_fill_type_from_string | ( | const char * | str | ) |
Definition at line 5969 of file theme.c.
References META_IMAGE_FILL_SCALE, and META_IMAGE_FILL_TILE.
Referenced by parse_draw_op_element().
| const char* meta_image_fill_type_to_string | ( | MetaImageFillType | fill_type | ) |
Definition at line 5980 of file theme.c.
References META_IMAGE_FILL_SCALE, and META_IMAGE_FILL_TILE.
| int meta_pango_font_desc_get_text_height | ( | const PangoFontDescription * | font_desc, | |
| PangoContext * | context | |||
| ) |
Definition at line 5424 of file theme.c.
Referenced by ensure_info(), get_text_height(), meta_frames_ensure_layout(), and meta_ui_theme_get_frame_borders().
| gboolean meta_parse_position_expression | ( | MetaDrawSpec * | spec, | |
| const MetaPositionExprEnv * | env, | |||
| int * | x_return, | |||
| int * | y_return, | |||
| GError ** | err | |||
| ) |
Definition at line 2475 of file theme.c.
References _MetaDrawSpec::constant, FALSE, NULL, pos_eval(), _MetaPositionExprEnv::rect, TRUE, _MetaDrawSpec::value, _MetaRectangle::x, and _MetaRectangle::y.
Referenced by parse_x_position_unchecked(), parse_y_position_unchecked(), and run_position_expression_tests().
| gboolean meta_parse_size_expression | ( | MetaDrawSpec * | spec, | |
| const MetaPositionExprEnv * | env, | |||
| int * | val_return, | |||
| GError ** | err | |||
| ) |
Definition at line 2512 of file theme.c.
References _MetaDrawSpec::constant, FALSE, NULL, pos_eval(), TRUE, and _MetaDrawSpec::value.
Referenced by parse_size_unchecked().
| void meta_theme_calc_geometry | ( | MetaTheme * | theme, | |
| MetaFrameType | type, | |||
| int | text_height, | |||
| MetaFrameFlags | flags, | |||
| int | client_width, | |||
| int | client_height, | |||
| const MetaButtonLayout * | button_layout, | |||
| MetaFrameGeometry * | fgeom | |||
| ) |
Definition at line 5118 of file theme.c.
References _MetaFrameStyle::layout, meta_frame_layout_calc_geometry(), META_FRAME_TYPE_LAST, NULL, and theme_get_style().
Referenced by meta_frames_calc_geometry().
| gboolean meta_theme_define_color_constant | ( | MetaTheme * | theme, | |
| const char * | name, | |||
| const char * | value, | |||
| GError ** | error | |||
| ) |
Definition at line 5342 of file theme.c.
References _, _MetaTheme::color_constants, FALSE, first_uppercase(), META_THEME_ERROR, META_THEME_ERROR_FAILED, NULL, and TRUE.
Referenced by parse_toplevel_element().
| gboolean meta_theme_define_float_constant | ( | MetaTheme * | theme, | |
| const char * | name, | |||
| double | value, | |||
| GError ** | error | |||
| ) |
Definition at line 5277 of file theme.c.
References _, FALSE, first_uppercase(), _MetaTheme::float_constants, META_THEME_ERROR, META_THEME_ERROR_FAILED, NULL, and TRUE.
Referenced by parse_toplevel_element().
| gboolean meta_theme_define_int_constant | ( | MetaTheme * | theme, | |
| const char * | name, | |||
| int | value, | |||
| GError ** | error | |||
| ) |
Definition at line 5217 of file theme.c.
References _, FALSE, first_uppercase(), _MetaTheme::integer_constants, META_THEME_ERROR, META_THEME_ERROR_FAILED, NULL, and TRUE.
Referenced by parse_toplevel_element().
| void meta_theme_draw_frame | ( | MetaTheme * | theme, | |
| GtkWidget * | widget, | |||
| GdkDrawable * | drawable, | |||
| const GdkRectangle * | clip, | |||
| int | x_offset, | |||
| int | y_offset, | |||
| MetaFrameType | type, | |||
| MetaFrameFlags | flags, | |||
| int | client_width, | |||
| int | client_height, | |||
| PangoLayout * | title_layout, | |||
| int | text_height, | |||
| const MetaButtonLayout * | button_layout, | |||
| MetaButtonState | button_states[META_BUTTON_TYPE_LAST], | |||
| GdkPixbuf * | mini_icon, | |||
| GdkPixbuf * | icon | |||
| ) |
Definition at line 5032 of file theme.c.
References _MetaFrameStyle::layout, meta_frame_layout_calc_geometry(), meta_frame_style_draw(), META_FRAME_TYPE_LAST, NULL, and theme_get_style().
Referenced by meta_frames_paint_to_drawable(), meta_preview_expose(), and run_theme_benchmark().
| guint meta_theme_earliest_version_with_button | ( | MetaButtonType | type | ) |
Definition at line 6388 of file theme.c.
References META_BUTTON_TYPE_ABOVE, META_BUTTON_TYPE_CLOSE, META_BUTTON_TYPE_LEFT_LEFT_BACKGROUND, META_BUTTON_TYPE_LEFT_MIDDLE_BACKGROUND, META_BUTTON_TYPE_LEFT_RIGHT_BACKGROUND, META_BUTTON_TYPE_MAXIMIZE, META_BUTTON_TYPE_MENU, META_BUTTON_TYPE_MINIMIZE, META_BUTTON_TYPE_RIGHT_LEFT_BACKGROUND, META_BUTTON_TYPE_RIGHT_MIDDLE_BACKGROUND, META_BUTTON_TYPE_RIGHT_RIGHT_BACKGROUND, META_BUTTON_TYPE_SHADE, META_BUTTON_TYPE_STICK, META_BUTTON_TYPE_UNABOVE, META_BUTTON_TYPE_UNSHADE, META_BUTTON_TYPE_UNSTICK, and meta_warning().
Referenced by meta_frame_style_validate(), and parse_style_element().
| void meta_theme_free | ( | MetaTheme * | theme | ) |
Definition at line 4775 of file theme.c.
References _MetaTheme::author, _MetaTheme::copyright, _MetaTheme::date, DEBUG_FILL_STRUCT, _MetaTheme::description, _MetaTheme::dirname, _MetaTheme::draw_op_lists_by_name, _MetaTheme::filename, _MetaTheme::images_by_filename, _MetaTheme::integer_constants, _MetaTheme::layouts_by_name, meta_frame_style_set_unref(), META_FRAME_TYPE_LAST, _MetaTheme::name, NULL, _MetaTheme::readable_name, _MetaTheme::style_sets_by_name, _MetaTheme::style_sets_by_type, and _MetaTheme::styles_by_name.
Referenced by end_element_handler(), meta_theme_set_current(), and parse_info_free().
| MetaTheme* meta_theme_get_current | ( | void | ) |
Definition at line 4678 of file theme.c.
Referenced by meta_frames_calc_geometry(), meta_frames_ensure_layout(), meta_frames_get_geometry(), meta_frames_paint_to_drawable(), meta_frames_set_window_background(), meta_ui_get_fallback_icons(), meta_ui_have_a_theme(), meta_ui_theme_get_frame_borders(), and populate_cache().
| void meta_theme_get_frame_borders | ( | MetaTheme * | theme, | |
| MetaFrameType | type, | |||
| int | text_height, | |||
| MetaFrameFlags | flags, | |||
| int * | top_height, | |||
| int * | bottom_height, | |||
| int * | left_width, | |||
| int * | right_width | |||
| ) |
Definition at line 5082 of file theme.c.
References _MetaFrameStyle::layout, meta_frame_layout_get_borders(), META_FRAME_TYPE_LAST, NULL, and theme_get_style().
Referenced by ensure_info(), meta_frames_get_geometry(), meta_frames_paint_to_drawable(), meta_ui_theme_get_frame_borders(), populate_cache(), and run_theme_benchmark().
| MetaFrameStyle* meta_theme_get_frame_style | ( | MetaTheme * | theme, | |
| MetaFrameType | type, | |||
| MetaFrameFlags | flags | |||
| ) |
Definition at line 5000 of file theme.c.
References META_FRAME_TYPE_LAST, NULL, and theme_get_style().
Referenced by meta_frames_ensure_layout(), meta_frames_set_window_background(), and meta_preview_get_clip_region().
| double meta_theme_get_title_scale | ( | MetaTheme * | theme, | |
| MetaFrameType | type, | |||
| MetaFrameFlags | flags | |||
| ) |
Definition at line 5014 of file theme.c.
References _MetaFrameStyle::layout, META_FRAME_TYPE_LAST, NULL, theme_get_style(), and _MetaFrameLayout::title_scale.
Referenced by ensure_info(), and meta_frames_ensure_layout().
| void meta_theme_insert_draw_op_list | ( | MetaTheme * | theme, | |
| const char * | name, | |||
| MetaDrawOpList * | op_list | |||
| ) |
Definition at line 5170 of file theme.c.
References _MetaTheme::draw_op_lists_by_name, and meta_draw_op_list_ref().
Referenced by parse_toplevel_element().
| void meta_theme_insert_layout | ( | MetaTheme * | theme, | |
| const char * | name, | |||
| MetaFrameLayout * | layout | |||
| ) |
Definition at line 5154 of file theme.c.
References _MetaTheme::layouts_by_name, and meta_frame_layout_ref().
Referenced by parse_toplevel_element().
| void meta_theme_insert_style | ( | MetaTheme * | theme, | |
| const char * | name, | |||
| MetaFrameStyle * | style | |||
| ) |
Definition at line 5186 of file theme.c.
References meta_frame_style_ref(), and _MetaTheme::styles_by_name.
Referenced by parse_toplevel_element().
| void meta_theme_insert_style_set | ( | MetaTheme * | theme, | |
| const char * | name, | |||
| MetaFrameStyleSet * | style_set | |||
| ) |
Definition at line 5202 of file theme.c.
References meta_frame_style_set_ref(), and _MetaTheme::style_sets_by_name.
Referenced by parse_toplevel_element().
| GdkPixbuf* meta_theme_load_image | ( | MetaTheme * | theme, | |
| const char * | filename, | |||
| guint | size_of_theme_icons, | |||
| GError ** | error | |||
| ) |
Definition at line 4876 of file theme.c.
References _MetaTheme::dirname, _MetaTheme::images_by_filename, META_THEME_ALLOWS, META_THEME_IMAGES_FROM_ICON_THEMES, and NULL.
Referenced by parse_draw_op_element(), and parse_toplevel_element().
| gboolean meta_theme_lookup_color_constant | ( | MetaTheme * | theme, | |
| const char * | name, | |||
| char ** | value | |||
| ) |
Definition at line 5378 of file theme.c.
References _MetaTheme::color_constants, FALSE, NULL, and TRUE.
Referenced by parse_color().
| MetaDrawOpList* meta_theme_lookup_draw_op_list | ( | MetaTheme * | theme, | |
| const char * | name | |||
| ) |
Definition at line 5163 of file theme.c.
References _MetaTheme::draw_op_lists_by_name.
Referenced by parse_draw_op_element(), parse_style_element(), and parse_toplevel_element().
| gboolean meta_theme_lookup_float_constant | ( | MetaTheme * | theme, | |
| const char * | name, | |||
| double * | value | |||
| ) |
Definition at line 5317 of file theme.c.
References FALSE, _MetaTheme::float_constants, NULL, and TRUE.
Referenced by meta_theme_replace_constants().
| gboolean meta_theme_lookup_int_constant | ( | MetaTheme * | theme, | |
| const char * | name, | |||
| int * | value | |||
| ) |
Definition at line 5253 of file theme.c.
References FALSE, _MetaTheme::integer_constants, NULL, and TRUE.
Referenced by meta_theme_replace_constants(), and parse_positive_integer().
| MetaFrameLayout* meta_theme_lookup_layout | ( | MetaTheme * | theme, | |
| const char * | name | |||
| ) |
Definition at line 5147 of file theme.c.
References _MetaTheme::layouts_by_name.
Referenced by parse_toplevel_element().
| MetaFrameStyle* meta_theme_lookup_style | ( | MetaTheme * | theme, | |
| const char * | name | |||
| ) |
Definition at line 5179 of file theme.c.
References _MetaTheme::styles_by_name.
Referenced by parse_style_set_element(), and parse_toplevel_element().
| MetaFrameStyleSet* meta_theme_lookup_style_set | ( | MetaTheme * | theme, | |
| const char * | name | |||
| ) |
Definition at line 5195 of file theme.c.
References _MetaTheme::style_sets_by_name.
Referenced by parse_toplevel_element().
| MetaTheme* meta_theme_new | ( | void | ) |
Definition at line 4718 of file theme.c.
References _MetaTheme::draw_op_lists_by_name, _MetaTheme::images_by_filename, _MetaTheme::layouts_by_name, meta_draw_op_list_unref(), meta_frame_layout_unref(), meta_frame_style_set_unref(), meta_frame_style_unref(), _MetaTheme::quark_bottom_height, _MetaTheme::quark_height, _MetaTheme::quark_icon_height, _MetaTheme::quark_icon_width, _MetaTheme::quark_left_width, _MetaTheme::quark_mini_icon_height, _MetaTheme::quark_mini_icon_width, _MetaTheme::quark_object_height, _MetaTheme::quark_object_width, _MetaTheme::quark_right_width, _MetaTheme::quark_title_height, _MetaTheme::quark_title_width, _MetaTheme::quark_top_height, _MetaTheme::quark_width, _MetaTheme::style_sets_by_name, and _MetaTheme::styles_by_name.
Referenced by start_element_handler().
| gboolean meta_theme_replace_constants | ( | MetaTheme * | theme, | |
| PosToken * | tokens, | |||
| int | n_tokens, | |||
| GError ** | err | |||
| ) |
Definition at line 2545 of file theme.c.
References PosToken::d, FALSE, meta_theme_lookup_float_constant(), meta_theme_lookup_int_constant(), POS_TOKEN_DOUBLE, POS_TOKEN_INT, POS_TOKEN_VARIABLE, TRUE, and PosToken::type.
Referenced by meta_draw_spec_new().
| void meta_theme_set_current | ( | const char * | name, | |
| gboolean | force_reload | |||
| ) |
Definition at line 4684 of file theme.c.
References _, META_DEBUG_THEMES, meta_theme_free(), meta_theme_load(), meta_warning(), _MetaTheme::name, and NULL.
Referenced by meta_ui_set_current_theme().
| gboolean meta_theme_validate | ( | MetaTheme * | theme, | |
| GError ** | error | |||
| ) |
Definition at line 4814 of file theme.c.
References _, _MetaTheme::author, _MetaTheme::copyright, _MetaTheme::date, _MetaTheme::description, FALSE, META_FRAME_TYPE_LAST, meta_frame_type_to_string(), META_THEME_ERROR, META_THEME_ERROR_FAILED, _MetaTheme::name, NULL, _MetaTheme::readable_name, _MetaTheme::style_sets_by_type, and TRUE.
Referenced by end_element_handler().
| static PosOperatorType op_from_string | ( | const char * | p, | |
| int * | len | |||
| ) | [static] |
Parses a string and returns an operation.
| p | a pointer into a string representing an operation; part of an expression somewhere, so not null-terminated | |
| len | set to the length of the string found. Set to 0 if none is. |
Definition at line 1477 of file theme.c.
References POS_OP_ADD, POS_OP_DIVIDE, POS_OP_MAX, POS_OP_MIN, POS_OP_MOD, POS_OP_MULTIPLY, POS_OP_NONE, and POS_OP_SUBTRACT.
Referenced by pos_tokenize().
| static const char* op_name | ( | PosOperatorType | type | ) | [static] |
Represents an operation as a string.
| type | an operation, such as addition |
Definition at line 1443 of file theme.c.
References POS_OP_ADD, POS_OP_DIVIDE, POS_OP_MAX, POS_OP_MIN, POS_OP_MOD, POS_OP_MULTIPLY, POS_OP_NONE, and POS_OP_SUBTRACT.
Referenced by do_operations().
| static int parse_size_unchecked | ( | MetaDrawSpec * | spec, | |
| MetaPositionExprEnv * | env | |||
| ) | [static] |
Definition at line 2628 of file theme.c.
References _, meta_parse_size_expression(), meta_warning(), and NULL.
Referenced by meta_draw_op_draw_with_env(), and meta_draw_op_list_draw().
| static int parse_x_position_unchecked | ( | MetaDrawSpec * | spec, | |
| const MetaPositionExprEnv * | env | |||
| ) | [static] |
Definition at line 2588 of file theme.c.
References _, meta_parse_position_expression(), meta_warning(), and NULL.
Referenced by meta_draw_op_draw_with_env(), and meta_draw_op_list_draw().
| static int parse_y_position_unchecked | ( | MetaDrawSpec * | spec, | |
| const MetaPositionExprEnv * | env | |||
| ) | [static] |
Definition at line 2608 of file theme.c.
References _, meta_parse_position_expression(), meta_warning(), and NULL.
Referenced by meta_draw_op_draw_with_env(), and meta_draw_op_list_draw().
| static GdkPixbuf* pixbuf_tile | ( | GdkPixbuf * | tile, | |
| int | width, | |||
| int | height | |||
| ) | [static] |
| static MetaButtonSpace* rect_for_function | ( | MetaFrameGeometry * | fgeom, | |
| MetaFrameFlags | flags, | |||
| MetaButtonFunction | function, | |||
| MetaTheme * | theme | |||
| ) | [static] |
Definition at line 460 of file theme.c.
References _MetaFrameGeometry::above_rect, _MetaFrameGeometry::close_rect, _MetaFrameGeometry::max_rect, _MetaFrameGeometry::menu_rect, META_BUTTON_FUNCTION_ABOVE, META_BUTTON_FUNCTION_CLOSE, META_BUTTON_FUNCTION_LAST, META_BUTTON_FUNCTION_MAXIMIZE, META_BUTTON_FUNCTION_MENU, META_BUTTON_FUNCTION_MINIMIZE, META_BUTTON_FUNCTION_SHADE, META_BUTTON_FUNCTION_STICK, META_BUTTON_FUNCTION_UNABOVE, META_BUTTON_FUNCTION_UNSHADE, META_BUTTON_FUNCTION_UNSTICK, META_FRAME_ABOVE, META_FRAME_ALLOWS_DELETE, META_FRAME_ALLOWS_MAXIMIZE, META_FRAME_ALLOWS_MENU, META_FRAME_ALLOWS_MINIMIZE, META_FRAME_ALLOWS_SHADE, META_FRAME_SHADED, META_FRAME_STUCK, META_THEME_ALLOWS, META_THEME_SHADE_STICK_ABOVE_BUTTONS, _MetaFrameGeometry::min_rect, NULL, _MetaFrameGeometry::shade_rect, _MetaFrameGeometry::stick_rect, _MetaFrameGeometry::unabove_rect, _MetaFrameGeometry::unshade_rect, and _MetaFrameGeometry::unstick_rect.
Referenced by meta_frame_layout_calc_geometry().
| static void render_pixbuf | ( | GdkDrawable * | drawable, | |
| const GdkRectangle * | clip, | |||
| GdkPixbuf * | pixbuf, | |||
| int | x, | |||
| int | y | |||
| ) | [static] |
Definition at line 2977 of file theme.c.
References NULL.
Referenced by meta_draw_op_draw_with_env().
| static GdkPixbuf* replicate_cols | ( | GdkPixbuf * | src, | |
| int | src_x, | |||
| int | src_y, | |||
| int | width, | |||
| int | height | |||
| ) | [static] |
| static GdkPixbuf* replicate_rows | ( | GdkPixbuf * | src, | |
| int | src_x, | |||
| int | src_y, | |||
| int | width, | |||
| int | height | |||
| ) | [static] |
| static void rgb_to_hls | ( | gdouble * | r, | |
| gdouble * | g, | |||
| gdouble * | b | |||
| ) | [static] |
| static GdkPixbuf* scale_and_alpha_pixbuf | ( | GdkPixbuf * | src, | |
| MetaAlphaGradientSpec * | alpha_spec, | |||
| MetaImageFillType | fill_type, | |||
| int | width, | |||
| int | height, | |||
| gboolean | vertical_stripes, | |||
| gboolean | horizontal_stripes | |||
| ) | [static] |
Definition at line 3153 of file theme.c.
References apply_alpha(), META_IMAGE_FILL_TILE, NULL, pixbuf_tile(), replicate_cols(), and replicate_rows().
Referenced by draw_op_as_pixbuf().
| static gboolean strip_button | ( | MetaButtonSpace * | func_rects[MAX_BUTTONS_PER_CORNER], | |
| GdkRectangle * | bg_rects[MAX_BUTTONS_PER_CORNER], | |||
| int * | n_rects, | |||
| MetaButtonSpace * | to_strip | |||
| ) | [static] |
| static MetaFrameStyle* theme_get_style | ( | MetaTheme * | theme, | |
| MetaFrameType | type, | |||
| MetaFrameFlags | flags | |||
| ) | [static] |
Definition at line 4927 of file theme.c.
References get_style(), META_FRAME_ALLOWS_HORIZONTAL_RESIZE, META_FRAME_ALLOWS_VERTICAL_RESIZE, META_FRAME_FOCUS_NO, META_FRAME_FOCUS_YES, META_FRAME_HAS_FOCUS, META_FRAME_IS_FLASHING, META_FRAME_MAXIMIZED, META_FRAME_RESIZE_BOTH, META_FRAME_RESIZE_HORIZONTAL, META_FRAME_RESIZE_LAST, META_FRAME_RESIZE_NONE, META_FRAME_RESIZE_VERTICAL, META_FRAME_SHADED, META_FRAME_STATE_LAST, META_FRAME_STATE_MAXIMIZED, META_FRAME_STATE_MAXIMIZED_AND_SHADED, META_FRAME_STATE_NORMAL, META_FRAME_STATE_SHADED, META_FRAME_TYPE_NORMAL, NULL, and _MetaTheme::style_sets_by_type.
Referenced by meta_theme_calc_geometry(), meta_theme_draw_frame(), meta_theme_get_frame_borders(), meta_theme_get_frame_style(), and meta_theme_get_title_scale().
| static gboolean validate_border | ( | const GtkBorder * | border, | |
| const char ** | bad | |||
| ) | [static] |
| static gboolean validate_geometry_border | ( | const GtkBorder * | border, | |
| const char * | name, | |||
| GError ** | error | |||
| ) | [static] |
Definition at line 298 of file theme.c.
References _, FALSE, META_THEME_ERROR, META_THEME_ERROR_FRAME_GEOMETRY, TRUE, and validate_border().
| static gboolean validate_geometry_value | ( | int | val, | |
| const char * | name, | |||
| GError ** | error | |||
| ) | [static] |
Ensures that the theme supplied a particular dimension.
When a MetaFrameLayout is created, all its integer fields are set to -1 by meta_frame_layout_new(). After an instance of this type should have been initialised, this function checks that a given field is not still at -1. It is never called directly, but rather via the CHECK_GEOMETRY_VALUE and CHECK_GEOMETRY_BORDER macros.
| val | The value to check | |
| name | The name to use in the error message | |
| [out] | error | Set to an error if val was not initialised |
Definition at line 281 of file theme.c.
References _, FALSE, META_THEME_ERROR, META_THEME_ERROR_FRAME_GEOMETRY, and TRUE.
MetaTheme* meta_current_theme = NULL [static] |
1.5.5