marco 1.29.1
Window manager
Loading...
Searching...
No Matches
theme.h File Reference
View source
#include "boxes.h"
#include "gradient.h"
#include "common.h"
#include <gtk/gtk.h>
Include dependency graph for theme.h:
This graph shows which files directly or indirectly include this file:

Data Structures

struct  _MetaFrameLayout
 Various parameters used to calculate the geometry of a frame. More...
 
struct  _MetaButtonSpace
 The computed size of a button (really just a way of tying its visible and clickable areas together). More...
 
struct  _MetaFrameGeometry
 Calculated actual geometry of the frame. More...
 
struct  _MetaColorSpec
 
struct  _MetaGradientSpec
 
struct  _MetaAlphaGradientSpec
 
struct  _MetaDrawInfo
 
struct  PosToken
 A token, as output by the tokeniser. More...
 
struct  _MetaDrawSpec
 A computed expression in our simple vector drawing language. More...
 
struct  _MetaDrawOp
 A single drawing operation in our simple vector drawing language. More...
 
struct  _MetaDrawOpList
 A list of MetaDrawOp objects. More...
 
struct  _MetaFrameStyle
 How to draw a frame in a particular state (say, a focussed, non-maximised, resizable frame). More...
 
struct  _MetaFrameStyleSet
 How to draw frames at different times: when it's maximised or not, shaded or not, when it's focussed or not, and (for non-maximised windows), when it can be horizontally or vertically resized, both, or neither. More...
 
struct  _MetaTheme
 A theme. More...
 
struct  _MetaPositionExprEnv
 

Macros

#define META_THEME_ERROR   (g_quark_from_static_string ("meta-theme-error"))
 
#define ADDRESS_OF_BUTTON_RECTS(fgeom)   (((char*)(fgeom)) + G_STRUCT_OFFSET (MetaFrameGeometry, close_rect))
 
#define LENGTH_OF_BUTTON_RECTS   (G_STRUCT_OFFSET (MetaFrameGeometry, right_single_background) + sizeof (GdkRectangle) - G_STRUCT_OFFSET (MetaFrameGeometry, close_rect))
 
#define MAX_MIDDLE_BACKGROUNDS   (MAX_BUTTONS_PER_CORNER - 2)
 
#define META_THEME_ALLOWS(theme, feature)   (theme->format_version >= feature)
 
#define META_THEME_SHADE_STICK_ABOVE_BUTTONS   2
 
#define META_THEME_UBIQUITOUS_CONSTANTS   2
 
#define META_THEME_VARIED_ROUND_CORNERS   2
 
#define META_THEME_IMAGES_FROM_ICON_THEMES   2
 
#define META_THEME_UNRESIZABLE_SHADED_STYLES   2
 
#define META_THEME_DEGREES_IN_ARCS   2
 
#define META_THEME_HIDDEN_BUTTONS   2
 
#define META_THEME_COLOR_CONSTANTS   2
 
#define META_THEME_FRAME_BACKGROUNDS   2
 

Typedefs

typedef struct _MetaFrameStyle MetaFrameStyle
 
typedef struct _MetaFrameStyleSet MetaFrameStyleSet
 
typedef struct _MetaDrawOp MetaDrawOp
 
typedef struct _MetaDrawOpList MetaDrawOpList
 
typedef struct _MetaGradientSpec MetaGradientSpec
 
typedef struct _MetaAlphaGradientSpec MetaAlphaGradientSpec
 
typedef struct _MetaColorSpec MetaColorSpec
 
typedef struct _MetaFrameLayout MetaFrameLayout
 
typedef struct _MetaButtonSpace MetaButtonSpace
 
typedef struct _MetaFrameGeometry MetaFrameGeometry
 
typedef struct _MetaTheme MetaTheme
 
typedef struct _MetaPositionExprEnv MetaPositionExprEnv
 
typedef struct _MetaDrawInfo MetaDrawInfo
 
typedef struct _MetaDrawSpec MetaDrawSpec
 A computed expression in our simple vector drawing language.
 

Enumerations

enum  MetaThemeError {
  META_THEME_ERROR_FRAME_GEOMETRY , META_THEME_ERROR_BAD_CHARACTER , META_THEME_ERROR_BAD_PARENS , META_THEME_ERROR_UNKNOWN_VARIABLE ,
  META_THEME_ERROR_DIVIDE_BY_ZERO , META_THEME_ERROR_MOD_ON_FLOAT , META_THEME_ERROR_FAILED
}
 
enum  MetaButtonSizing { META_BUTTON_SIZING_ASPECT , META_BUTTON_SIZING_FIXED , META_BUTTON_SIZING_LAST }
 Whether a button's size is calculated from the area around it (aspect sizing) or is given as a fixed height and width in pixels (fixed sizing). More...
 
enum  MetaImageFillType { META_IMAGE_FILL_SCALE , META_IMAGE_FILL_TILE }
 
enum  MetaColorSpecType {
  META_COLOR_SPEC_BASIC , META_COLOR_SPEC_GTK , META_COLOR_SPEC_GTK_CUSTOM , META_COLOR_SPEC_BLEND ,
  META_COLOR_SPEC_SHADE
}
 
enum  MetaGtkColorComponent {
  META_GTK_COLOR_FG , META_GTK_COLOR_BG , META_GTK_COLOR_LIGHT , META_GTK_COLOR_DARK ,
  META_GTK_COLOR_MID , META_GTK_COLOR_TEXT , META_GTK_COLOR_BASE , META_GTK_COLOR_TEXT_AA ,
  META_GTK_COLOR_LAST
}
 
enum  MetaDrawType {
  META_DRAW_LINE , META_DRAW_RECTANGLE , META_DRAW_ARC , META_DRAW_CLIP ,
  META_DRAW_TINT , META_DRAW_GRADIENT , META_DRAW_IMAGE , META_DRAW_GTK_ARROW ,
  META_DRAW_GTK_BOX , META_DRAW_GTK_VLINE , META_DRAW_ICON , META_DRAW_TITLE ,
  META_DRAW_OP_LIST , META_DRAW_TILE
}
 A drawing operation in our simple vector drawing language. More...
 
enum  PosTokenType {
  POS_TOKEN_INT , POS_TOKEN_DOUBLE , POS_TOKEN_OPERATOR , POS_TOKEN_VARIABLE ,
  POS_TOKEN_OPEN_PAREN , POS_TOKEN_CLOSE_PAREN
}
 
enum  PosOperatorType {
  POS_OP_NONE , POS_OP_ADD , POS_OP_SUBTRACT , POS_OP_MULTIPLY ,
  POS_OP_DIVIDE , POS_OP_MOD , POS_OP_MAX , POS_OP_MIN
}
 
enum  MetaButtonState { META_BUTTON_STATE_NORMAL , META_BUTTON_STATE_PRESSED , META_BUTTON_STATE_PRELIGHT , META_BUTTON_STATE_LAST }
 
enum  MetaButtonType {
  META_BUTTON_TYPE_LEFT_LEFT_BACKGROUND , META_BUTTON_TYPE_LEFT_MIDDLE_BACKGROUND , META_BUTTON_TYPE_LEFT_RIGHT_BACKGROUND , META_BUTTON_TYPE_LEFT_SINGLE_BACKGROUND ,
  META_BUTTON_TYPE_RIGHT_LEFT_BACKGROUND , META_BUTTON_TYPE_RIGHT_MIDDLE_BACKGROUND , META_BUTTON_TYPE_RIGHT_RIGHT_BACKGROUND , META_BUTTON_TYPE_RIGHT_SINGLE_BACKGROUND ,
  META_BUTTON_TYPE_CLOSE , META_BUTTON_TYPE_MAXIMIZE , META_BUTTON_TYPE_MINIMIZE , META_BUTTON_TYPE_MENU ,
  META_BUTTON_TYPE_APPMENU , META_BUTTON_TYPE_SHADE , META_BUTTON_TYPE_ABOVE , META_BUTTON_TYPE_STICK ,
  META_BUTTON_TYPE_UNSHADE , META_BUTTON_TYPE_UNABOVE , META_BUTTON_TYPE_UNSTICK , META_BUTTON_TYPE_LAST
}
 
enum  MetaMenuIconType {
  META_MENU_ICON_TYPE_CLOSE , META_MENU_ICON_TYPE_MAXIMIZE , META_MENU_ICON_TYPE_UNMAXIMIZE , META_MENU_ICON_TYPE_MINIMIZE ,
  META_MENU_ICON_TYPE_LAST
}
 
enum  MetaFramePiece {
  META_FRAME_PIECE_ENTIRE_BACKGROUND , META_FRAME_PIECE_TITLEBAR , META_FRAME_PIECE_TITLEBAR_MIDDLE , META_FRAME_PIECE_LEFT_TITLEBAR_EDGE ,
  META_FRAME_PIECE_RIGHT_TITLEBAR_EDGE , META_FRAME_PIECE_TOP_TITLEBAR_EDGE , META_FRAME_PIECE_BOTTOM_TITLEBAR_EDGE , META_FRAME_PIECE_TITLE ,
  META_FRAME_PIECE_LEFT_EDGE , META_FRAME_PIECE_RIGHT_EDGE , META_FRAME_PIECE_BOTTOM_EDGE , META_FRAME_PIECE_OVERLAY ,
  META_FRAME_PIECE_LAST
}
 
enum  MetaFrameState {
  META_FRAME_STATE_NORMAL , META_FRAME_STATE_MAXIMIZED , META_FRAME_STATE_TILED_LEFT , META_FRAME_STATE_TILED_RIGHT ,
  META_FRAME_STATE_SHADED , META_FRAME_STATE_MAXIMIZED_AND_SHADED , META_FRAME_STATE_TILED_LEFT_AND_SHADED , META_FRAME_STATE_TILED_RIGHT_AND_SHADED ,
  META_FRAME_STATE_LAST
}
 
enum  MetaFrameResize {
  META_FRAME_RESIZE_NONE , META_FRAME_RESIZE_VERTICAL , META_FRAME_RESIZE_HORIZONTAL , META_FRAME_RESIZE_BOTH ,
  META_FRAME_RESIZE_LAST
}
 
enum  MetaFrameFocus { META_FRAME_FOCUS_NO , META_FRAME_FOCUS_YES , META_FRAME_FOCUS_LAST }
 

Functions

MetaFrameLayout * meta_frame_layout_new (void)
 Creates a new, empty MetaFrameLayout.
 
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, MetaFrameType type, MetaFrameBorders *borders)
 
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)
 
gboolean meta_frame_layout_validate (const MetaFrameLayout *layout, GError **error)
 
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)
 
MetaDrawSpec * meta_draw_spec_new (MetaTheme *theme, const char *expr, GError **error)
 
void meta_draw_spec_free (MetaDrawSpec *spec)
 
MetaColorSpec * meta_color_spec_new (MetaColorSpecType type)
 
MetaColorSpec * meta_color_spec_new_from_string (const char *str, GError **err)
 
MetaColorSpec * meta_color_spec_new_gtk (MetaGtkColorComponent component, GtkStateFlags state)
 
void meta_color_spec_free (MetaColorSpec *spec)
 
void meta_color_spec_render (MetaColorSpec *spec, GtkStyleContext *style_gtk, GdkRGBA *color)
 
MetaDrawOp * meta_draw_op_new (MetaDrawType type)
 
void meta_draw_op_free (MetaDrawOp *op)
 
void meta_draw_op_draw (const MetaDrawOp *op, GtkWidget *widget, cairo_t *cr, const MetaDrawInfo *info, MetaRectangle logical_region)
 
void meta_draw_op_draw_with_style (const MetaDrawOp *op, GtkStyleContext *style_gtk, cairo_t *cr, 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, cairo_t *cr, const MetaDrawInfo *info, MetaRectangle rect)
 
void meta_draw_op_list_draw_with_style (const MetaDrawOpList *op_list, GtkStyleContext *style_gtk, cairo_t *cr, 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)
 
MetaGradientSpec * meta_gradient_spec_new (MetaGradientType type)
 
void meta_gradient_spec_free (MetaGradientSpec *desc)
 
void meta_gradient_spec_render (const MetaGradientSpec *spec, const MetaAlphaGradientSpec *alpha_spec, cairo_t *cr, GtkStyleContext *context, gint x, gint y, gint width, gint 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)
 
cairo_pattern_t * meta_alpha_gradient_spec_get_mask (const MetaAlphaGradientSpec *spec)
 
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.
 
void meta_frame_style_unref (MetaFrameStyle *style)
 
void meta_frame_style_draw (MetaFrameStyle *style, GtkWidget *widget, cairo_t *cr, 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)
 
void meta_frame_style_draw_with_style (MetaFrameStyle *style, GtkStyleContext *style_gtk, cairo_t *cr, 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)
 
gboolean meta_frame_style_validate (MetaFrameStyle *style, guint current_theme_version, GError **error)
 
MetaFrameStyleSet * meta_frame_style_set_new (MetaFrameStyleSet *parent)
 
void meta_frame_style_set_ref (MetaFrameStyleSet *style_set)
 
void meta_frame_style_set_unref (MetaFrameStyleSet *style_set)
 
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)
 
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, GtkStyleContext *style_gtk, cairo_t *cr, 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_draw_frame_by_name (MetaTheme *theme, GtkWidget *widget, cairo_t *cr, const gchar *style_name, 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, MetaFrameBorders *borders)
 
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)
 
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)
 Looks up a colour constant.
 
gboolean meta_theme_replace_constants (MetaTheme *theme, PosToken *tokens, int n_tokens, GError **err)
 
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)
 Returns the height of the letters in a particular font.
 
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)
 
GtkStateFlags meta_gtk_state_from_string (const char *str)
 
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)
 Returns a fill_type from a string.
 
const char * meta_image_fill_type_to_string (MetaImageFillType fill_type)
 Returns a string representation of a fill_type.
 
void meta_gtk_style_get_light_color (GtkStyleContext *style, GtkStateFlags state, GdkRGBA *color)
 
void meta_gtk_style_get_dark_color (GtkStyleContext *style, GtkStateFlags state, GdkRGBA *color)
 
guint meta_theme_earliest_version_with_button (MetaButtonType type)
 Returns the earliest version of the theme format which required support for a particular button.
 

Macro Definition Documentation

◆ ADDRESS_OF_BUTTON_RECTS

#define ADDRESS_OF_BUTTON_RECTS (   fgeom)    (((char*)(fgeom)) + G_STRUCT_OFFSET (MetaFrameGeometry, close_rect))

◆ LENGTH_OF_BUTTON_RECTS

#define LENGTH_OF_BUTTON_RECTS   (G_STRUCT_OFFSET (MetaFrameGeometry, right_single_background) + sizeof (GdkRectangle) - G_STRUCT_OFFSET (MetaFrameGeometry, close_rect))

◆ MAX_MIDDLE_BACKGROUNDS

#define MAX_MIDDLE_BACKGROUNDS   (MAX_BUTTONS_PER_CORNER - 2)

◆ META_THEME_ALLOWS

#define META_THEME_ALLOWS (   theme,
  feature 
)    (theme->format_version >= feature)

◆ META_THEME_COLOR_CONSTANTS

#define META_THEME_COLOR_CONSTANTS   2

◆ META_THEME_DEGREES_IN_ARCS

#define META_THEME_DEGREES_IN_ARCS   2

◆ META_THEME_ERROR

#define META_THEME_ERROR   (g_quark_from_static_string ("meta-theme-error"))

◆ META_THEME_FRAME_BACKGROUNDS

#define META_THEME_FRAME_BACKGROUNDS   2

◆ META_THEME_HIDDEN_BUTTONS

#define META_THEME_HIDDEN_BUTTONS   2

◆ META_THEME_IMAGES_FROM_ICON_THEMES

#define META_THEME_IMAGES_FROM_ICON_THEMES   2

◆ META_THEME_SHADE_STICK_ABOVE_BUTTONS

#define META_THEME_SHADE_STICK_ABOVE_BUTTONS   2

◆ META_THEME_UBIQUITOUS_CONSTANTS

#define META_THEME_UBIQUITOUS_CONSTANTS   2

◆ META_THEME_UNRESIZABLE_SHADED_STYLES

#define META_THEME_UNRESIZABLE_SHADED_STYLES   2

◆ META_THEME_VARIED_ROUND_CORNERS

#define META_THEME_VARIED_ROUND_CORNERS   2

Typedef Documentation

◆ MetaAlphaGradientSpec

◆ MetaButtonSpace

◆ MetaColorSpec

typedef struct _MetaColorSpec MetaColorSpec

◆ MetaDrawInfo

typedef struct _MetaDrawInfo MetaDrawInfo

◆ MetaDrawOp

typedef struct _MetaDrawOp MetaDrawOp

◆ MetaDrawOpList

◆ MetaFrameGeometry

◆ MetaFrameLayout

◆ MetaFrameStyle

◆ MetaFrameStyleSet

◆ MetaGradientSpec

◆ MetaPositionExprEnv

◆ MetaTheme

typedef struct _MetaTheme MetaTheme

Enumeration Type Documentation

◆ MetaButtonSizing

Whether a button's size is calculated from the area around it (aspect sizing) or is given as a fixed height and width in pixels (fixed sizing).

Bug:
This could be done away with; see the comment at the top of MetaFrameLayout.
Enumerator
META_BUTTON_SIZING_ASPECT 
META_BUTTON_SIZING_FIXED 
META_BUTTON_SIZING_LAST 

◆ MetaButtonState

Enumerator
META_BUTTON_STATE_NORMAL 
META_BUTTON_STATE_PRESSED 
META_BUTTON_STATE_PRELIGHT 
META_BUTTON_STATE_LAST 

◆ MetaButtonType

Enumerator
META_BUTTON_TYPE_LEFT_LEFT_BACKGROUND 
META_BUTTON_TYPE_LEFT_MIDDLE_BACKGROUND 
META_BUTTON_TYPE_LEFT_RIGHT_BACKGROUND 
META_BUTTON_TYPE_LEFT_SINGLE_BACKGROUND 
META_BUTTON_TYPE_RIGHT_LEFT_BACKGROUND 
META_BUTTON_TYPE_RIGHT_MIDDLE_BACKGROUND 
META_BUTTON_TYPE_RIGHT_RIGHT_BACKGROUND 
META_BUTTON_TYPE_RIGHT_SINGLE_BACKGROUND 
META_BUTTON_TYPE_CLOSE 
META_BUTTON_TYPE_MAXIMIZE 
META_BUTTON_TYPE_MINIMIZE 
META_BUTTON_TYPE_MENU 
META_BUTTON_TYPE_APPMENU 
META_BUTTON_TYPE_SHADE 
META_BUTTON_TYPE_ABOVE 
META_BUTTON_TYPE_STICK 
META_BUTTON_TYPE_UNSHADE 
META_BUTTON_TYPE_UNABOVE 
META_BUTTON_TYPE_UNSTICK 
META_BUTTON_TYPE_LAST 

◆ MetaColorSpecType

Enumerator
META_COLOR_SPEC_BASIC 
META_COLOR_SPEC_GTK 
META_COLOR_SPEC_GTK_CUSTOM 
META_COLOR_SPEC_BLEND 
META_COLOR_SPEC_SHADE 

◆ MetaDrawType

A drawing operation in our simple vector drawing language.

Enumerator
META_DRAW_LINE 

Basic drawing– line.

META_DRAW_RECTANGLE 

Basic drawing– rectangle.

META_DRAW_ARC 

Basic drawing– arc.

META_DRAW_CLIP 

Clip to a rectangle.

META_DRAW_TINT 

Just a filled rectangle with alpha.

META_DRAW_GRADIENT 
META_DRAW_IMAGE 
META_DRAW_GTK_ARROW 

GTK theme engine stuff.

META_DRAW_GTK_BOX 
META_DRAW_GTK_VLINE 
META_DRAW_ICON 

App's window icon.

META_DRAW_TITLE 

App's window title.

META_DRAW_OP_LIST 

a draw op list

META_DRAW_TILE 

tiled draw op list

◆ MetaFrameFocus

Enumerator
META_FRAME_FOCUS_NO 
META_FRAME_FOCUS_YES 
META_FRAME_FOCUS_LAST 

◆ MetaFramePiece

Enumerator
META_FRAME_PIECE_ENTIRE_BACKGROUND 
META_FRAME_PIECE_TITLEBAR 
META_FRAME_PIECE_TITLEBAR_MIDDLE 
META_FRAME_PIECE_LEFT_TITLEBAR_EDGE 
META_FRAME_PIECE_RIGHT_TITLEBAR_EDGE 
META_FRAME_PIECE_TOP_TITLEBAR_EDGE 
META_FRAME_PIECE_BOTTOM_TITLEBAR_EDGE 
META_FRAME_PIECE_TITLE 
META_FRAME_PIECE_LEFT_EDGE 
META_FRAME_PIECE_RIGHT_EDGE 
META_FRAME_PIECE_BOTTOM_EDGE 
META_FRAME_PIECE_OVERLAY 
META_FRAME_PIECE_LAST 

◆ MetaFrameResize

Enumerator
META_FRAME_RESIZE_NONE 
META_FRAME_RESIZE_VERTICAL 
META_FRAME_RESIZE_HORIZONTAL 
META_FRAME_RESIZE_BOTH 
META_FRAME_RESIZE_LAST 

◆ MetaFrameState

Enumerator
META_FRAME_STATE_NORMAL 
META_FRAME_STATE_MAXIMIZED 
META_FRAME_STATE_TILED_LEFT 
META_FRAME_STATE_TILED_RIGHT 
META_FRAME_STATE_SHADED 
META_FRAME_STATE_MAXIMIZED_AND_SHADED 
META_FRAME_STATE_TILED_LEFT_AND_SHADED 
META_FRAME_STATE_TILED_RIGHT_AND_SHADED 
META_FRAME_STATE_LAST 

◆ MetaGtkColorComponent

Enumerator
META_GTK_COLOR_FG 
META_GTK_COLOR_BG 
META_GTK_COLOR_LIGHT 
META_GTK_COLOR_DARK 
META_GTK_COLOR_MID 
META_GTK_COLOR_TEXT 
META_GTK_COLOR_BASE 
META_GTK_COLOR_TEXT_AA 
META_GTK_COLOR_LAST 

◆ MetaImageFillType

Enumerator
META_IMAGE_FILL_SCALE 
META_IMAGE_FILL_TILE 

◆ MetaMenuIconType

Enumerator
META_MENU_ICON_TYPE_CLOSE 
META_MENU_ICON_TYPE_MAXIMIZE 
META_MENU_ICON_TYPE_UNMAXIMIZE 
META_MENU_ICON_TYPE_MINIMIZE 
META_MENU_ICON_TYPE_LAST 

◆ MetaThemeError

Enumerator
META_THEME_ERROR_FRAME_GEOMETRY 
META_THEME_ERROR_BAD_CHARACTER 
META_THEME_ERROR_BAD_PARENS 
META_THEME_ERROR_UNKNOWN_VARIABLE 
META_THEME_ERROR_DIVIDE_BY_ZERO 
META_THEME_ERROR_MOD_ON_FLOAT 
META_THEME_ERROR_FAILED 

◆ PosOperatorType

Enumerator
POS_OP_NONE 
POS_OP_ADD 
POS_OP_SUBTRACT 
POS_OP_MULTIPLY 
POS_OP_DIVIDE 
POS_OP_MOD 
POS_OP_MAX 
POS_OP_MIN 

◆ PosTokenType

Enumerator
POS_TOKEN_INT 
POS_TOKEN_DOUBLE 
POS_TOKEN_OPERATOR 
POS_TOKEN_VARIABLE 
POS_TOKEN_OPEN_PAREN 
POS_TOKEN_CLOSE_PAREN 

Function Documentation

◆ meta_alpha_gradient_spec_free()

void meta_alpha_gradient_spec_free ( MetaAlphaGradientSpec *  spec)

◆ meta_alpha_gradient_spec_get_mask()

cairo_pattern_t * meta_alpha_gradient_spec_get_mask ( const MetaAlphaGradientSpec *  spec)

◆ meta_alpha_gradient_spec_new()

MetaAlphaGradientSpec * meta_alpha_gradient_spec_new ( MetaGradientType  type,
int  n_alphas 
)

◆ meta_button_state_from_string()

MetaButtonState meta_button_state_from_string ( const char *  str)

◆ meta_button_state_to_string()

const char * meta_button_state_to_string ( MetaButtonState  state)

◆ meta_button_type_from_string()

◆ meta_button_type_to_string()

◆ meta_color_component_from_string()

◆ meta_color_component_to_string()

◆ meta_color_spec_free()

◆ meta_color_spec_new()

◆ meta_color_spec_new_from_string()

◆ meta_color_spec_new_gtk()

MetaColorSpec * meta_color_spec_new_gtk ( MetaGtkColorComponent  component,
GtkStateFlags  state 
)

References _MetaColorSpec::component, _MetaColorSpec::data, _MetaColorSpec::gtk, META_COLOR_SPEC_GTK, meta_color_spec_new(), and _MetaColorSpec::state.

Here is the call graph for this function:

◆ meta_color_spec_render()

◆ meta_draw_op_draw()

void meta_draw_op_draw ( const MetaDrawOp *  op,
GtkWidget *  widget,
cairo_t *  cr,
const MetaDrawInfo *  info,
MetaRectangle  logical_region 
)

References meta_draw_op_draw_with_style().

Here is the call graph for this function:

◆ meta_draw_op_draw_with_style()

void meta_draw_op_draw_with_style ( const MetaDrawOp *  op,
GtkStyleContext *  style_gtk,
cairo_t *  cr,
const MetaDrawInfo *  info,
MetaRectangle  logical_region 
)

References fill_env(), and meta_draw_op_draw_with_env().

Referenced by meta_draw_op_draw().

Here is the call graph for this function:

◆ meta_draw_op_free()

◆ meta_draw_op_list_append()

void meta_draw_op_list_append ( MetaDrawOpList *  op_list,
MetaDrawOp *  op 
)

◆ meta_draw_op_list_contains()

gboolean meta_draw_op_list_contains ( MetaDrawOpList *  op_list,
MetaDrawOpList *  child 
)

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().

Here is the call graph for this function:

◆ meta_draw_op_list_draw()

void meta_draw_op_list_draw ( const MetaDrawOpList *  op_list,
GtkWidget *  widget,
cairo_t *  cr,
const MetaDrawInfo *  info,
MetaRectangle  rect 
)

References meta_draw_op_list_draw_with_style().

Here is the call graph for this function:

◆ meta_draw_op_list_draw_with_style()

void meta_draw_op_list_draw_with_style ( const MetaDrawOpList *  op_list,
GtkStyleContext *  style_gtk,
cairo_t *  cr,
const MetaDrawInfo *  info,
MetaRectangle  rect 
)

◆ meta_draw_op_list_new()

◆ meta_draw_op_list_ref()

void meta_draw_op_list_ref ( MetaDrawOpList *  op_list)

◆ meta_draw_op_list_unref()

void meta_draw_op_list_unref ( MetaDrawOpList *  op_list)

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().

Here is the call graph for this function:

◆ meta_draw_op_list_validate()

gboolean meta_draw_op_list_validate ( MetaDrawOpList *  op_list,
GError **  error 
)

References FALSE, NULL, and TRUE.

Referenced by end_element_handler().

◆ meta_draw_op_new()

◆ meta_draw_spec_free()

void meta_draw_spec_free ( MetaDrawSpec *  spec)

References free_tokens(), _MetaDrawSpec::n_tokens, and _MetaDrawSpec::tokens.

Referenced by meta_draw_op_free(), and meta_draw_spec_new().

Here is the call graph for this function:

◆ meta_draw_spec_new()

MetaDrawSpec * meta_draw_spec_new ( MetaTheme *  theme,
const char *  expr,
GError **  error 
)

References _MetaDrawSpec::constant, 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().

Here is the call graph for this function:

◆ meta_frame_focus_from_string()

MetaFrameFocus meta_frame_focus_from_string ( const char *  str)

◆ meta_frame_focus_to_string()

const char * meta_frame_focus_to_string ( MetaFrameFocus  focus)

◆ meta_frame_layout_calc_geometry()

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 
)

References _MetaFrameGeometry::above_rect, ADDRESS_OF_BUTTON_RECTS, _MetaFrameGeometry::appmenu_rect, _MetaFrameGeometry::borders, _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, button_layout, _MetaFrameGeometry::button_layout, _MetaFrameLayout::button_sizing, _MetaFrameLayout::button_width, _MetaButtonSpace::clickable, _MetaFrameGeometry::close_rect, FALSE, _MetaFrameGeometry::height, _MetaFrameLayout::hide_buttons, _MetaFrameBorders::invisible, _MetaButtonLayout::left_buttons, _MetaButtonLayout::left_buttons_has_spacer, _MetaFrameGeometry::left_left_background, _MetaFrameGeometry::left_middle_backgrounds, _MetaFrameGeometry::left_right_background, _MetaFrameGeometry::left_single_background, _MetaFrameLayout::left_titlebar_edge, _MetaFrameGeometry::left_titlebar_edge, _MetaFrameLayout::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, META_FRAME_TILED_LEFT, META_FRAME_TILED_RIGHT, META_FRAME_TYPE_NORMAL, _MetaFrameGeometry::min_rect, _MetaFrameGeometry::n_left_buttons, _MetaFrameGeometry::n_right_buttons, NULL, rect_for_function(), _MetaButtonLayout::right_buttons, _MetaButtonLayout::right_buttons_has_spacer, _MetaFrameGeometry::right_left_background, _MetaFrameGeometry::right_middle_backgrounds, _MetaFrameGeometry::right_right_background, _MetaFrameGeometry::right_single_background, _MetaFrameLayout::right_titlebar_edge, _MetaFrameGeometry::right_titlebar_edge, _MetaFrameLayout::right_width, _MetaFrameGeometry::shade_rect, _MetaFrameGeometry::stick_rect, strip_button(), _MetaFrameLayout::title_border, _MetaFrameGeometry::title_rect, _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, _MetaFrameBorders::total, _MetaFrameBorders::visible, _MetaButtonSpace::visible, and _MetaFrameGeometry::width.

Referenced by meta_theme_calc_geometry(), meta_theme_draw_frame(), and meta_theme_draw_frame_by_name().

Here is the call graph for this function:

◆ meta_frame_layout_copy()

MetaFrameLayout * meta_frame_layout_copy ( const MetaFrameLayout *  src)

◆ meta_frame_layout_get_borders()

◆ meta_frame_layout_new()

◆ meta_frame_layout_ref()

void meta_frame_layout_ref ( MetaFrameLayout *  layout)

◆ meta_frame_layout_unref()

◆ meta_frame_layout_validate()

◆ meta_frame_piece_from_string()

◆ meta_frame_piece_to_string()

◆ meta_frame_resize_from_string()

◆ meta_frame_resize_to_string()

◆ meta_frame_state_from_string()

◆ meta_frame_state_to_string()

◆ meta_frame_style_draw()

void meta_frame_style_draw ( MetaFrameStyle *  style,
GtkWidget *  widget,
cairo_t *  cr,
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 
)

References meta_frame_style_draw_with_style().

Referenced by meta_theme_draw_frame_by_name().

Here is the call graph for this function:

◆ meta_frame_style_draw_with_style()

void meta_frame_style_draw_with_style ( MetaFrameStyle *  style,
GtkStyleContext *  style_gtk,
cairo_t *  cr,
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 
)

◆ meta_frame_style_new()

MetaFrameStyle * meta_frame_style_new ( MetaFrameStyle *  parent)

Constructor for a MetaFrameStyle.

Parameters
parentThe parent style. Data not filled in here will be looked for in the parent style, and in its parent style, and so on.
Returns
The newly-constructed style.

References meta_frame_style_ref(), _MetaFrameStyle::parent, _MetaFrameStyle::refcount, and _MetaFrameStyle::window_background_alpha.

Referenced by parse_toplevel_element().

Here is the call graph for this function:

◆ meta_frame_style_ref()

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.

Parameters
styleThe style.

References NULL, and _MetaFrameStyle::refcount.

Referenced by meta_frame_style_new(), meta_theme_insert_style(), and parse_style_set_element().

◆ meta_frame_style_set_new()

MetaFrameStyleSet * meta_frame_style_set_new ( MetaFrameStyleSet *  parent)

References meta_frame_style_set_ref(), _MetaFrameStyleSet::parent, and _MetaFrameStyleSet::refcount.

Referenced by parse_toplevel_element().

Here is the call graph for this function:

◆ meta_frame_style_set_ref()

void meta_frame_style_set_ref ( MetaFrameStyleSet *  style_set)

◆ meta_frame_style_set_unref()

◆ meta_frame_style_set_validate()

gboolean meta_frame_style_set_validate ( MetaFrameStyleSet *  style_set,
GError **  error 
)

◆ meta_frame_style_unref()

◆ meta_frame_style_validate()

gboolean meta_frame_style_validate ( MetaFrameStyle *  style,
guint  current_theme_version,
GError **  error 
)

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().

Here is the call graph for this function:

◆ meta_frame_type_from_string()

◆ meta_frame_type_to_string()

◆ meta_gradient_spec_free()

void meta_gradient_spec_free ( MetaGradientSpec *  desc)

References _MetaGradientSpec::color_specs, DEBUG_FILL_STRUCT, free_color_spec(), and NULL.

Referenced by meta_draw_op_free().

Here is the call graph for this function:

◆ meta_gradient_spec_new()

MetaGradientSpec * meta_gradient_spec_new ( MetaGradientType  type)

◆ meta_gradient_spec_render()

void meta_gradient_spec_render ( const MetaGradientSpec *  spec,
const MetaAlphaGradientSpec *  alpha_spec,
cairo_t *  cr,
GtkStyleContext *  context,
gint  x,
gint  y,
gint  width,
gint  height 
)

References create_cairo_pattern_from_gradient_spec(), and NULL.

Referenced by meta_draw_op_draw_with_env().

Here is the call graph for this function:

◆ meta_gradient_spec_validate()

gboolean meta_gradient_spec_validate ( MetaGradientSpec *  spec,
GError **  error 
)

◆ meta_gradient_type_from_string()

MetaGradientType meta_gradient_type_from_string ( const char *  str)

◆ meta_gradient_type_to_string()

const char * meta_gradient_type_to_string ( MetaGradientType  type)

◆ meta_gtk_arrow_from_string()

GtkArrowType meta_gtk_arrow_from_string ( const char *  str)

Referenced by parse_draw_op_element().

◆ meta_gtk_arrow_to_string()

const char * meta_gtk_arrow_to_string ( GtkArrowType  arrow)

◆ meta_gtk_shadow_from_string()

GtkShadowType meta_gtk_shadow_from_string ( const char *  str)

Referenced by parse_draw_op_element().

◆ meta_gtk_shadow_to_string()

const char * meta_gtk_shadow_to_string ( GtkShadowType  shadow)

◆ meta_gtk_state_from_string()

GtkStateFlags meta_gtk_state_from_string ( const char *  str)

◆ meta_gtk_style_get_dark_color()

void meta_gtk_style_get_dark_color ( GtkStyleContext *  style,
GtkStateFlags  state,
GdkRGBA *  color 
)

References DARKNESS_MULT, get_background_color(), and gtk_style_shade().

Referenced by meta_select_image_draw(), meta_select_workspace_draw(), meta_set_color_from_style(), and wnck_draw_workspace().

Here is the call graph for this function:

◆ meta_gtk_style_get_light_color()

void meta_gtk_style_get_light_color ( GtkStyleContext *  style,
GtkStateFlags  state,
GdkRGBA *  color 
)

References get_background_color(), gtk_style_shade(), and LIGHTNESS_MULT.

Referenced by draw_window(), meta_select_image_draw(), meta_select_workspace_draw(), and meta_set_color_from_style().

Here is the call graph for this function:

◆ meta_gtk_widget_get_font_desc()

PangoFontDescription * meta_gtk_widget_get_font_desc ( GtkWidget *  widget,
double  scale,
const PangoFontDescription *  override 
)

References NULL, and TRUE.

Referenced by ensure_info(), and meta_frames_ensure_layout().

◆ meta_image_fill_type_from_string()

MetaImageFillType meta_image_fill_type_from_string ( const char *  str)

Returns a fill_type from a string.

The inverse of meta_image_fill_type_to_string().

Parameters
stra string representing a fill_type
Returns
the fill_type, or -1 if it represents no fill_type.

References META_IMAGE_FILL_SCALE, and META_IMAGE_FILL_TILE.

Referenced by parse_draw_op_element().

◆ meta_image_fill_type_to_string()

const char * meta_image_fill_type_to_string ( MetaImageFillType  fill_type)

Returns a string representation of a fill_type.

The inverse of meta_image_fill_type_from_string().

Parameters
fill_typethe fill type
Returns
a string representing that type

References META_IMAGE_FILL_SCALE, and META_IMAGE_FILL_TILE.

◆ meta_pango_font_desc_get_text_height()

int meta_pango_font_desc_get_text_height ( const PangoFontDescription *  font_desc,
PangoContext *  context 
)

Returns the height of the letters in a particular font.

Parameters
font_descthe font
contextthe context of the font
Returns
the height of the letters

Referenced by ensure_info(), get_text_height(), meta_frames_ensure_layout(), and meta_ui_theme_get_frame_borders().

◆ meta_parse_position_expression()

gboolean meta_parse_position_expression ( MetaDrawSpec *  spec,
const MetaPositionExprEnv *  env,
int *  x_return,
int *  y_return,
GError **  err 
)

References _MetaDrawSpec::constant, FALSE, NULL, pos_eval(), _MetaPositionExprEnv::rect, TRUE, _MetaDrawSpec::value, _MetaRectangle::x, and _MetaRectangle::y.

Referenced by parse_x_position_unchecked(), and parse_y_position_unchecked().

Here is the call graph for this function:

◆ meta_parse_size_expression()

gboolean meta_parse_size_expression ( MetaDrawSpec *  spec,
const MetaPositionExprEnv *  env,
int *  val_return,
GError **  err 
)

References _MetaDrawSpec::constant, FALSE, NULL, pos_eval(), TRUE, and _MetaDrawSpec::value.

Referenced by parse_size_unchecked().

Here is the call graph for this function:

◆ meta_theme_calc_geometry()

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 
)

References button_layout, _MetaFrameStyle::layout, meta_frame_layout_calc_geometry(), META_FRAME_TYPE_LAST, NULL, and theme_get_style().

Referenced by meta_frames_calc_geometry().

Here is the call graph for this function:

◆ meta_theme_define_color_constant()

gboolean meta_theme_define_color_constant ( MetaTheme *  theme,
const char *  name,
const char *  value,
GError **  error 
)

References _, _MetaTheme::color_constants, FALSE, first_uppercase(), META_THEME_ERROR, META_THEME_ERROR_FAILED, NULL, and TRUE.

Referenced by parse_toplevel_element().

Here is the call graph for this function:

◆ meta_theme_define_float_constant()

gboolean meta_theme_define_float_constant ( MetaTheme *  theme,
const char *  name,
double  value,
GError **  error 
)

References _, FALSE, first_uppercase(), _MetaTheme::float_constants, META_THEME_ERROR, META_THEME_ERROR_FAILED, NULL, and TRUE.

Referenced by parse_toplevel_element().

Here is the call graph for this function:

◆ meta_theme_define_int_constant()

gboolean meta_theme_define_int_constant ( MetaTheme *  theme,
const char *  name,
int  value,
GError **  error 
)

References _, FALSE, first_uppercase(), _MetaTheme::integer_constants, META_THEME_ERROR, META_THEME_ERROR_FAILED, NULL, and TRUE.

Referenced by parse_toplevel_element().

Here is the call graph for this function:

◆ meta_theme_draw_frame()

void meta_theme_draw_frame ( MetaTheme *  theme,
GtkStyleContext *  style_gtk,
cairo_t *  cr,
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 
)

References button_layout, _MetaFrameStyle::layout, meta_frame_layout_calc_geometry(), meta_frame_style_draw_with_style(), META_FRAME_TYPE_LAST, NULL, and theme_get_style().

Referenced by meta_frames_paint_to_drawable(), meta_preview_draw(), and run_theme_benchmark().

Here is the call graph for this function:

◆ meta_theme_draw_frame_by_name()

void meta_theme_draw_frame_by_name ( MetaTheme *  theme,
GtkWidget *  widget,
cairo_t *  cr,
const gchar *  style_name,
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 
)

References button_layout, _MetaFrameStyle::layout, meta_frame_layout_calc_geometry(), meta_frame_style_draw(), meta_theme_lookup_style(), and NULL.

Here is the call graph for this function:

◆ meta_theme_earliest_version_with_button()

guint meta_theme_earliest_version_with_button ( MetaButtonType  type)

Returns the earliest version of the theme format which required support for a particular button.

(For example, "shade" first appeared in v2, and "close" in v1.)

Parameters
typethe button type
Returns
the number of the theme format

References META_BUTTON_TYPE_ABOVE, META_BUTTON_TYPE_APPMENU, 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_LEFT_SINGLE_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_RIGHT_SINGLE_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().

Here is the call graph for this function:

◆ meta_theme_free()

◆ meta_theme_get_current()

◆ meta_theme_get_frame_borders()

void meta_theme_get_frame_borders ( MetaTheme *  theme,
MetaFrameType  type,
int  text_height,
MetaFrameFlags  flags,
MetaFrameBorders *  borders 
)

References _MetaFrameStyle::layout, meta_frame_borders_clear(), meta_frame_layout_get_borders(), META_FRAME_TYPE_LAST, NULL, and theme_get_style().

Referenced by ensure_info(), meta_ui_frame_get_borders(), meta_ui_theme_get_frame_borders(), populate_cache(), run_theme_benchmark(), and subtract_client_area().

Here is the call graph for this function:

◆ meta_theme_get_frame_style()

MetaFrameStyle * meta_theme_get_frame_style ( MetaTheme *  theme,
MetaFrameType  type,
MetaFrameFlags  flags 
)

References META_FRAME_TYPE_LAST, NULL, and theme_get_style().

Referenced by meta_frames_ensure_layout(), and meta_preview_get_clip_region().

Here is the call graph for this function:

◆ meta_theme_get_title_scale()

double meta_theme_get_title_scale ( MetaTheme *  theme,
MetaFrameType  type,
MetaFrameFlags  flags 
)

References _MetaFrameStyle::layout, META_FRAME_TYPE_LAST, NULL, theme_get_style(), and _MetaFrameLayout::title_scale.

Referenced by ensure_info(), and meta_frames_ensure_layout().

Here is the call graph for this function:

◆ meta_theme_insert_draw_op_list()

void meta_theme_insert_draw_op_list ( MetaTheme *  theme,
const char *  name,
MetaDrawOpList *  op_list 
)

References _MetaTheme::draw_op_lists_by_name, and meta_draw_op_list_ref().

Referenced by parse_toplevel_element().

Here is the call graph for this function:

◆ meta_theme_insert_layout()

void meta_theme_insert_layout ( MetaTheme *  theme,
const char *  name,
MetaFrameLayout *  layout 
)

References _MetaTheme::layouts_by_name, and meta_frame_layout_ref().

Referenced by parse_toplevel_element().

Here is the call graph for this function:

◆ meta_theme_insert_style()

void meta_theme_insert_style ( MetaTheme *  theme,
const char *  name,
MetaFrameStyle *  style 
)

References meta_frame_style_ref(), and _MetaTheme::styles_by_name.

Referenced by parse_toplevel_element().

Here is the call graph for this function:

◆ meta_theme_insert_style_set()

void meta_theme_insert_style_set ( MetaTheme *  theme,
const char *  name,
MetaFrameStyleSet *  style_set 
)

References meta_frame_style_set_ref(), and _MetaTheme::style_sets_by_name.

Referenced by parse_toplevel_element().

Here is the call graph for this function:

◆ meta_theme_load_image()

GdkPixbuf * meta_theme_load_image ( MetaTheme *  theme,
const char *  filename,
guint  size_of_theme_icons,
GError **  error 
)

◆ meta_theme_lookup_color_constant()

gboolean meta_theme_lookup_color_constant ( MetaTheme *  theme,
const char *  name,
char **  value 
)

Looks up a colour constant.

Parameters
themethe theme containing the constant
namethe name of the constant
value[out] the string representation of the colour, or NULL if it doesn't exist
Returns
TRUE if it exists, FALSE otherwise

References _MetaTheme::color_constants, FALSE, NULL, and TRUE.

Referenced by parse_color().

◆ meta_theme_lookup_draw_op_list()

MetaDrawOpList * meta_theme_lookup_draw_op_list ( MetaTheme *  theme,
const char *  name 
)

◆ meta_theme_lookup_float_constant()

gboolean meta_theme_lookup_float_constant ( MetaTheme *  theme,
const char *  name,
double *  value 
)

◆ meta_theme_lookup_int_constant()

gboolean meta_theme_lookup_int_constant ( MetaTheme *  theme,
const char *  name,
int *  value 
)

◆ meta_theme_lookup_layout()

MetaFrameLayout * meta_theme_lookup_layout ( MetaTheme *  theme,
const char *  name 
)

◆ meta_theme_lookup_style()

MetaFrameStyle * meta_theme_lookup_style ( MetaTheme *  theme,
const char *  name 
)

◆ meta_theme_lookup_style_set()

MetaFrameStyleSet * meta_theme_lookup_style_set ( MetaTheme *  theme,
const char *  name 
)

◆ meta_theme_new()

◆ meta_theme_replace_constants()

gboolean meta_theme_replace_constants ( MetaTheme *  theme,
PosToken *  tokens,
int  n_tokens,
GError **  err 
)

References PosToken::d, FALSE, PosToken::i, meta_theme_lookup_float_constant(), meta_theme_lookup_int_constant(), PosToken::name, PosToken::name_quark, POS_TOKEN_DOUBLE, POS_TOKEN_INT, POS_TOKEN_VARIABLE, TRUE, PosToken::type, PosToken::v, and PosToken::val.

Referenced by meta_draw_spec_new().

Here is the call graph for this function:

◆ meta_theme_set_current()

void meta_theme_set_current ( const char *  name,
gboolean  force_reload 
)

References _, meta_current_theme, META_DEBUG_THEMES, meta_theme_free(), meta_theme_load(), meta_warning(), _MetaTheme::name, and NULL.

Referenced by meta_ui_set_current_theme().

Here is the call graph for this function:

◆ meta_theme_validate()

gboolean meta_theme_validate ( MetaTheme *  theme,
GError **  error 
)

References _, _MetaTheme::author, _MetaTheme::copyright, _MetaTheme::date, _MetaTheme::description, FALSE, META_FRAME_TYPE_ATTACHED, 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().

Here is the call graph for this function: