2006-10-01 18:30:10 -04:00
|
|
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
|
|
|
|
2002-01-05 23:51:53 -05:00
|
|
|
/* Metacity Theme Rendering */
|
2001-05-31 12:18:40 -04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright (C) 2001 Havoc Pennington
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License as
|
|
|
|
* published by the Free Software Foundation; either version 2 of the
|
|
|
|
* License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
|
|
* 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef META_THEME_H
|
|
|
|
#define META_THEME_H
|
|
|
|
|
2006-04-18 13:18:53 -04:00
|
|
|
#include "boxes.h"
|
2002-01-06 12:52:21 -05:00
|
|
|
#include "gradient.h"
|
2002-01-18 22:50:03 -05:00
|
|
|
#include "common.h"
|
2008-11-11 22:43:51 -05:00
|
|
|
#include <gtk/gtk.h>
|
2001-05-31 12:18:40 -04:00
|
|
|
|
2002-01-06 22:26:09 -05:00
|
|
|
typedef struct _MetaFrameStyle MetaFrameStyle;
|
2002-01-08 02:23:35 -05:00
|
|
|
typedef struct _MetaFrameStyleSet MetaFrameStyleSet;
|
2002-02-02 00:09:19 -05:00
|
|
|
typedef struct _MetaDrawOp MetaDrawOp;
|
|
|
|
typedef struct _MetaDrawOpList MetaDrawOpList;
|
2002-01-08 02:23:35 -05:00
|
|
|
typedef struct _MetaGradientSpec MetaGradientSpec;
|
2002-05-31 17:18:11 -04:00
|
|
|
typedef struct _MetaAlphaGradientSpec MetaAlphaGradientSpec;
|
2002-01-08 02:23:35 -05:00
|
|
|
typedef struct _MetaColorSpec MetaColorSpec;
|
2002-01-18 22:50:03 -05:00
|
|
|
typedef struct _MetaFrameLayout MetaFrameLayout;
|
2006-08-07 14:01:21 -04:00
|
|
|
typedef struct _MetaButtonSpace MetaButtonSpace;
|
2002-01-18 22:50:03 -05:00
|
|
|
typedef struct _MetaFrameGeometry MetaFrameGeometry;
|
2002-01-27 03:21:53 -05:00
|
|
|
typedef struct _MetaTheme MetaTheme;
|
2002-02-02 00:09:19 -05:00
|
|
|
typedef struct _MetaPositionExprEnv MetaPositionExprEnv;
|
2002-02-06 22:07:56 -05:00
|
|
|
typedef struct _MetaDrawInfo MetaDrawInfo;
|
|
|
|
|
|
|
|
#define META_THEME_ERROR (g_quark_from_static_string ("meta-theme-error"))
|
2002-01-18 22:50:03 -05:00
|
|
|
|
2002-01-27 21:09:12 -05:00
|
|
|
typedef enum
|
|
|
|
{
|
2002-02-06 22:07:56 -05:00
|
|
|
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
|
|
|
|
} MetaThemeError;
|
|
|
|
|
2008-01-16 22:49:24 -05:00
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*/
|
2002-06-03 22:13:00 -04:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
META_BUTTON_SIZING_ASPECT,
|
|
|
|
META_BUTTON_SIZING_FIXED,
|
|
|
|
META_BUTTON_SIZING_LAST
|
|
|
|
} MetaButtonSizing;
|
2002-01-27 21:09:12 -05:00
|
|
|
|
2008-01-16 22:49:24 -05:00
|
|
|
/**
|
|
|
|
* Various parameters used to calculate the geometry of a frame.
|
2008-01-21 23:00:35 -05:00
|
|
|
* They are used inside a MetaFrameStyle.
|
|
|
|
* This corresponds closely to the <frame_geometry> tag in a theme file.
|
2008-01-16 22:49:24 -05:00
|
|
|
*
|
|
|
|
* \bug button_sizing isn't really necessary, because we could easily say
|
|
|
|
* that if button_aspect is zero, the height and width are fixed values.
|
|
|
|
* This would also mean that MetaButtonSizing didn't need to exist, and
|
|
|
|
* save code.
|
|
|
|
**/
|
2002-01-18 22:50:03 -05:00
|
|
|
struct _MetaFrameLayout
|
|
|
|
{
|
2008-01-16 22:49:24 -05:00
|
|
|
/** Reference count. */
|
2002-02-06 22:07:56 -05:00
|
|
|
int refcount;
|
|
|
|
|
2008-01-16 22:49:24 -05:00
|
|
|
/** Size of left side */
|
2002-01-18 22:50:03 -05:00
|
|
|
int left_width;
|
2008-01-16 22:49:24 -05:00
|
|
|
/** Size of right side */
|
2002-01-18 22:50:03 -05:00
|
|
|
int right_width;
|
2008-01-16 22:49:24 -05:00
|
|
|
/** Size of bottom side */
|
2002-01-18 22:50:03 -05:00
|
|
|
int bottom_height;
|
|
|
|
|
2008-01-16 22:49:24 -05:00
|
|
|
/** Border of blue title region
|
|
|
|
* \bug (blue?!)
|
|
|
|
**/
|
2002-01-18 22:50:03 -05:00
|
|
|
GtkBorder title_border;
|
|
|
|
|
2008-01-16 22:49:24 -05:00
|
|
|
/** Extra height for inside of title region, above the font height */
|
2002-02-06 22:07:56 -05:00
|
|
|
int title_vertical_pad;
|
|
|
|
|
2008-01-16 22:49:24 -05:00
|
|
|
/** Right indent of buttons from edges of frame */
|
2002-02-06 22:07:56 -05:00
|
|
|
int right_titlebar_edge;
|
2008-01-16 22:49:24 -05:00
|
|
|
/** Left indent of buttons from edges of frame */
|
2002-02-06 22:07:56 -05:00
|
|
|
int left_titlebar_edge;
|
2002-01-18 22:50:03 -05:00
|
|
|
|
2008-01-16 22:49:24 -05:00
|
|
|
/**
|
|
|
|
* Sizing rule of buttons, either META_BUTTON_SIZING_ASPECT
|
|
|
|
* (in which case button_aspect will be honoured, and
|
|
|
|
* button_width and button_height set from it), or
|
|
|
|
* META_BUTTON_SIZING_FIXED (in which case we read the width
|
|
|
|
* and height directly).
|
|
|
|
*/
|
2002-06-03 22:13:00 -04:00
|
|
|
MetaButtonSizing button_sizing;
|
|
|
|
|
2008-01-16 22:49:24 -05:00
|
|
|
/**
|
|
|
|
* Ratio of height/width. Honoured only if
|
|
|
|
* button_sizing==META_BUTTON_SIZING_ASPECT.
|
|
|
|
* Otherwise we figure out the height from the button_border.
|
|
|
|
*/
|
|
|
|
double button_aspect;
|
2002-06-03 22:13:00 -04:00
|
|
|
|
2008-01-16 22:49:24 -05:00
|
|
|
/** Width of a button; set even when we are using aspect sizing */
|
2002-01-18 22:50:03 -05:00
|
|
|
int button_width;
|
2008-01-16 22:49:24 -05:00
|
|
|
|
|
|
|
/** Height of a button; set even when we are using aspect sizing */
|
2002-01-18 22:50:03 -05:00
|
|
|
int button_height;
|
|
|
|
|
2008-01-16 22:49:24 -05:00
|
|
|
/** Space around buttons */
|
2002-01-18 22:50:03 -05:00
|
|
|
GtkBorder button_border;
|
2002-02-09 01:54:44 -05:00
|
|
|
|
2008-01-16 22:49:24 -05:00
|
|
|
/** scale factor for title text */
|
2002-02-09 12:02:38 -05:00
|
|
|
double title_scale;
|
|
|
|
|
2008-01-16 22:49:24 -05:00
|
|
|
/** Whether title text will be displayed */
|
2002-02-09 01:54:44 -05:00
|
|
|
guint has_title : 1;
|
2002-05-30 20:02:54 -04:00
|
|
|
|
2008-01-16 22:49:24 -05:00
|
|
|
/** Whether we should hide the buttons */
|
Added "above" to the list of flags a frame can have, so that we know when
* common.h: Added "above" to the list of flags a frame can have, so
that we know when to mark it as always on top. Added six grab ops,
one to do and one to undo each of the three new titlebar buttons
(shade, above, stick). Added six new button functions, similarly.
(#96229)
* frame.c (meta_frame_get_flags): If a frame has the WM_STATE_ABOVE X
attribute, set META_FRAME_ABOVE in its flags.
* frames.c (meta_frames_apply_shapes): Allow variable amounts of
rounding. (#113162)
* frames.c (show_tip_now, meta_frames_paint_to_drawable, control_rect,
get_control): extend handling of existing buttons to the
3*2 new kinds of button. (#96229)
* frames.c (meta_frames_button_press_event): translate clicks on the 3*2
new kinds of button to the new grab ops. (#96229)
* frames.c (meta_frames_button_release_event): implement the various
actions for the 3*2 new kinds of button. (#96229)
* frames.c (meta_frames_update_prelit_control,
meta_frames_motion_notify_event): extend existing motion
notifications for buttons to the 3*2 new kinds of button. (#96229)
* frames.c (meta_frames_set_window_background): handle specified
background colours and alpha transparency. (#151261)
* frames.h (MetaFrameControl): New control types for the 3*2 new kinds
of button. (#96229)
* iconcache.[ch] (meta_read_icons): use theme's fallback icons if a
window has no icon; use metacity's fallback icons only if the theme
does not provide any. (#11363)
* iconcache.[ch] (meta_invalidate_default_icons (new function)): clear
icon cache on windows using default icons, and update them. (#11363)
* main.c (main): added \n to error message.
* prefs.c (button_function_from_string): extend for 3 new button
types. (#96229)
* prefs.c (button_opposite_function (new function)): return a button
function's inverse (shade -> unshade, etc) (#96229)
* prefs.c (update_button_layout): allocate space for a button's
inverse, if it has one. (#96229)
* theme-parser.c (ParseState): add state for fallback icons (#11363)
* theme-parser.c (ParseInfo): add format_version; remove
menu_icon_* (#114305)
* theme-parser.c (parse_positive_integer): add lookup for integer
constants (#331356)
* theme-parser.c (parse_rounding (new function)): parse window
rounding amount (#113162)
* theme-parser.c (parse_alpha): don't set error if the number can't
be parsed since it'll already be set; change tolerance in comparison
from 1e6 to 1e-6
* theme-parser.c (parse_color (new function)): parse colour, including
possible constant lookup.
* theme-parser.c (parse_toplevel_element): allow defining of various
new kinds of constant; allow
hide_buttons (#121639) and more detailed rounding attributes on
<frame_geometry> (#113162); allow background and alpha attributes on
<frame_style>; (#151261) remove support for <menu_icon> except as
stub; (#114305) add support for loading stock images (#113465); add
support for <fallback>. (#11363))
* theme-parser.c (parse_draw_op_element): add from and to attribute
for arcs. (#121603)
* theme-parser.c (parse_style_element): add check for theme version
supporting a button function. (#96229)
* theme-parser.c (parse_style_set_element): add ability for shaded
windows to be resizable (#114304)
* theme-parser.c (meta_theme_load): add theme versioning routine.
* theme.c ( meta_frame_layout_get_borders): return rectangles for
the new 3*2 kinds of button, except where they're
inapplicable. (#96229)
* theme.c (meta_frame_layout_calc_geometry): don't format buttons on
windows with no buttons (#121639); strip the 3*2 new kinds of button
correctly (#96229); allow variable amounts of rounding (#113162).
* theme.c (meta_frame_style_new): set alpha to 255 by
default. (#151261)
* theme.c (meta_frame_style_unref): free colour spec if
allocated. (#151261)
* theme.c (meta_frame_style_validate): it's only an error not to
include a button if that button is valid in the current
theme. (#96229)
* theme.c (button_rect): return rectangles for the new 3*2 kinds
of button. (#96229)
* theme.c (meta_frame_style_set_unref): free differently resizable
shaded styles. (#114304)
* theme.c (get_style): look up differently resizable styles
for shaded windows. (#114304)
* theme.c (free_menu_ops (removed function), get_menu_icon
(removed function), meta_theme_draw_menu_icon (removed function),
meta_menu_icon_type_from_string (removed function),
meta_menu_icon_type_to_string (removed function),
meta_theme_free, meta_theme_validate): removed menu icon code. (#114305)
* theme.c (meta_theme_load_image): add size_of_theme_icons
parameter. (#113465)
* theme.c (meta_theme_define_color_constant (new function),
meta_theme_lookup_color_constant (new function)): allow
definition of colour constants. (#129747)
* theme.c (meta_button_type_from_string, meta_button_type_to_string):
add the 3*2 new kinds of button. (#96229)
* theme.c (meta_theme_earliest_version_with_button (new function)):
return the theme version each button was introduced in. (#96229)
* theme.h ( MetaFrameLayout): add "hide_buttons" flag (#121639) and
corner radiuses. (#113162)
* theme.h (MetaFrameGeometry): add rectangles for the 3*2 new
buttons. (#96229)
* theme.h (MetaButtonType): the 3*2 new buttons. (#96229)
* theme.h (MetaFrameStyle): add window_background_color and
window_background_alpha so that we can specify background on a
<frame_style>. (#151261)
* theme.h (MetaFrameStyleSet): shaded_styles gets resize
dimension. (#114304)
* theme.h (MetaTheme): added format_version, color_constants
hash, (#129747) fallback_icon and fallback_mini_icon, (#11363)
and removed menu_icons. (#114305)
* theme.h (META_THEME_ALLOWS (new macro)): return whether a theme
supports a given feature. Also, several macros representing
new features in v2.
* ui.c (meta_ui_set_current_theme)): also invalidate default
icons. (#11363)
* window.[ch] (meta_window_update_icon_now)): became
non-static. (#11363)
2006-10-07 12:56:47 -04:00
|
|
|
guint hide_buttons : 1;
|
|
|
|
|
2008-01-16 22:49:24 -05:00
|
|
|
/** Radius of the top left-hand corner; 0 if not rounded */
|
Added "above" to the list of flags a frame can have, so that we know when
* common.h: Added "above" to the list of flags a frame can have, so
that we know when to mark it as always on top. Added six grab ops,
one to do and one to undo each of the three new titlebar buttons
(shade, above, stick). Added six new button functions, similarly.
(#96229)
* frame.c (meta_frame_get_flags): If a frame has the WM_STATE_ABOVE X
attribute, set META_FRAME_ABOVE in its flags.
* frames.c (meta_frames_apply_shapes): Allow variable amounts of
rounding. (#113162)
* frames.c (show_tip_now, meta_frames_paint_to_drawable, control_rect,
get_control): extend handling of existing buttons to the
3*2 new kinds of button. (#96229)
* frames.c (meta_frames_button_press_event): translate clicks on the 3*2
new kinds of button to the new grab ops. (#96229)
* frames.c (meta_frames_button_release_event): implement the various
actions for the 3*2 new kinds of button. (#96229)
* frames.c (meta_frames_update_prelit_control,
meta_frames_motion_notify_event): extend existing motion
notifications for buttons to the 3*2 new kinds of button. (#96229)
* frames.c (meta_frames_set_window_background): handle specified
background colours and alpha transparency. (#151261)
* frames.h (MetaFrameControl): New control types for the 3*2 new kinds
of button. (#96229)
* iconcache.[ch] (meta_read_icons): use theme's fallback icons if a
window has no icon; use metacity's fallback icons only if the theme
does not provide any. (#11363)
* iconcache.[ch] (meta_invalidate_default_icons (new function)): clear
icon cache on windows using default icons, and update them. (#11363)
* main.c (main): added \n to error message.
* prefs.c (button_function_from_string): extend for 3 new button
types. (#96229)
* prefs.c (button_opposite_function (new function)): return a button
function's inverse (shade -> unshade, etc) (#96229)
* prefs.c (update_button_layout): allocate space for a button's
inverse, if it has one. (#96229)
* theme-parser.c (ParseState): add state for fallback icons (#11363)
* theme-parser.c (ParseInfo): add format_version; remove
menu_icon_* (#114305)
* theme-parser.c (parse_positive_integer): add lookup for integer
constants (#331356)
* theme-parser.c (parse_rounding (new function)): parse window
rounding amount (#113162)
* theme-parser.c (parse_alpha): don't set error if the number can't
be parsed since it'll already be set; change tolerance in comparison
from 1e6 to 1e-6
* theme-parser.c (parse_color (new function)): parse colour, including
possible constant lookup.
* theme-parser.c (parse_toplevel_element): allow defining of various
new kinds of constant; allow
hide_buttons (#121639) and more detailed rounding attributes on
<frame_geometry> (#113162); allow background and alpha attributes on
<frame_style>; (#151261) remove support for <menu_icon> except as
stub; (#114305) add support for loading stock images (#113465); add
support for <fallback>. (#11363))
* theme-parser.c (parse_draw_op_element): add from and to attribute
for arcs. (#121603)
* theme-parser.c (parse_style_element): add check for theme version
supporting a button function. (#96229)
* theme-parser.c (parse_style_set_element): add ability for shaded
windows to be resizable (#114304)
* theme-parser.c (meta_theme_load): add theme versioning routine.
* theme.c ( meta_frame_layout_get_borders): return rectangles for
the new 3*2 kinds of button, except where they're
inapplicable. (#96229)
* theme.c (meta_frame_layout_calc_geometry): don't format buttons on
windows with no buttons (#121639); strip the 3*2 new kinds of button
correctly (#96229); allow variable amounts of rounding (#113162).
* theme.c (meta_frame_style_new): set alpha to 255 by
default. (#151261)
* theme.c (meta_frame_style_unref): free colour spec if
allocated. (#151261)
* theme.c (meta_frame_style_validate): it's only an error not to
include a button if that button is valid in the current
theme. (#96229)
* theme.c (button_rect): return rectangles for the new 3*2 kinds
of button. (#96229)
* theme.c (meta_frame_style_set_unref): free differently resizable
shaded styles. (#114304)
* theme.c (get_style): look up differently resizable styles
for shaded windows. (#114304)
* theme.c (free_menu_ops (removed function), get_menu_icon
(removed function), meta_theme_draw_menu_icon (removed function),
meta_menu_icon_type_from_string (removed function),
meta_menu_icon_type_to_string (removed function),
meta_theme_free, meta_theme_validate): removed menu icon code. (#114305)
* theme.c (meta_theme_load_image): add size_of_theme_icons
parameter. (#113465)
* theme.c (meta_theme_define_color_constant (new function),
meta_theme_lookup_color_constant (new function)): allow
definition of colour constants. (#129747)
* theme.c (meta_button_type_from_string, meta_button_type_to_string):
add the 3*2 new kinds of button. (#96229)
* theme.c (meta_theme_earliest_version_with_button (new function)):
return the theme version each button was introduced in. (#96229)
* theme.h ( MetaFrameLayout): add "hide_buttons" flag (#121639) and
corner radiuses. (#113162)
* theme.h (MetaFrameGeometry): add rectangles for the 3*2 new
buttons. (#96229)
* theme.h (MetaButtonType): the 3*2 new buttons. (#96229)
* theme.h (MetaFrameStyle): add window_background_color and
window_background_alpha so that we can specify background on a
<frame_style>. (#151261)
* theme.h (MetaFrameStyleSet): shaded_styles gets resize
dimension. (#114304)
* theme.h (MetaTheme): added format_version, color_constants
hash, (#129747) fallback_icon and fallback_mini_icon, (#11363)
and removed menu_icons. (#114305)
* theme.h (META_THEME_ALLOWS (new macro)): return whether a theme
supports a given feature. Also, several macros representing
new features in v2.
* ui.c (meta_ui_set_current_theme)): also invalidate default
icons. (#11363)
* window.[ch] (meta_window_update_icon_now)): became
non-static. (#11363)
2006-10-07 12:56:47 -04:00
|
|
|
guint top_left_corner_rounded_radius;
|
2008-01-16 22:49:24 -05:00
|
|
|
/** Radius of the top right-hand corner; 0 if not rounded */
|
Added "above" to the list of flags a frame can have, so that we know when
* common.h: Added "above" to the list of flags a frame can have, so
that we know when to mark it as always on top. Added six grab ops,
one to do and one to undo each of the three new titlebar buttons
(shade, above, stick). Added six new button functions, similarly.
(#96229)
* frame.c (meta_frame_get_flags): If a frame has the WM_STATE_ABOVE X
attribute, set META_FRAME_ABOVE in its flags.
* frames.c (meta_frames_apply_shapes): Allow variable amounts of
rounding. (#113162)
* frames.c (show_tip_now, meta_frames_paint_to_drawable, control_rect,
get_control): extend handling of existing buttons to the
3*2 new kinds of button. (#96229)
* frames.c (meta_frames_button_press_event): translate clicks on the 3*2
new kinds of button to the new grab ops. (#96229)
* frames.c (meta_frames_button_release_event): implement the various
actions for the 3*2 new kinds of button. (#96229)
* frames.c (meta_frames_update_prelit_control,
meta_frames_motion_notify_event): extend existing motion
notifications for buttons to the 3*2 new kinds of button. (#96229)
* frames.c (meta_frames_set_window_background): handle specified
background colours and alpha transparency. (#151261)
* frames.h (MetaFrameControl): New control types for the 3*2 new kinds
of button. (#96229)
* iconcache.[ch] (meta_read_icons): use theme's fallback icons if a
window has no icon; use metacity's fallback icons only if the theme
does not provide any. (#11363)
* iconcache.[ch] (meta_invalidate_default_icons (new function)): clear
icon cache on windows using default icons, and update them. (#11363)
* main.c (main): added \n to error message.
* prefs.c (button_function_from_string): extend for 3 new button
types. (#96229)
* prefs.c (button_opposite_function (new function)): return a button
function's inverse (shade -> unshade, etc) (#96229)
* prefs.c (update_button_layout): allocate space for a button's
inverse, if it has one. (#96229)
* theme-parser.c (ParseState): add state for fallback icons (#11363)
* theme-parser.c (ParseInfo): add format_version; remove
menu_icon_* (#114305)
* theme-parser.c (parse_positive_integer): add lookup for integer
constants (#331356)
* theme-parser.c (parse_rounding (new function)): parse window
rounding amount (#113162)
* theme-parser.c (parse_alpha): don't set error if the number can't
be parsed since it'll already be set; change tolerance in comparison
from 1e6 to 1e-6
* theme-parser.c (parse_color (new function)): parse colour, including
possible constant lookup.
* theme-parser.c (parse_toplevel_element): allow defining of various
new kinds of constant; allow
hide_buttons (#121639) and more detailed rounding attributes on
<frame_geometry> (#113162); allow background and alpha attributes on
<frame_style>; (#151261) remove support for <menu_icon> except as
stub; (#114305) add support for loading stock images (#113465); add
support for <fallback>. (#11363))
* theme-parser.c (parse_draw_op_element): add from and to attribute
for arcs. (#121603)
* theme-parser.c (parse_style_element): add check for theme version
supporting a button function. (#96229)
* theme-parser.c (parse_style_set_element): add ability for shaded
windows to be resizable (#114304)
* theme-parser.c (meta_theme_load): add theme versioning routine.
* theme.c ( meta_frame_layout_get_borders): return rectangles for
the new 3*2 kinds of button, except where they're
inapplicable. (#96229)
* theme.c (meta_frame_layout_calc_geometry): don't format buttons on
windows with no buttons (#121639); strip the 3*2 new kinds of button
correctly (#96229); allow variable amounts of rounding (#113162).
* theme.c (meta_frame_style_new): set alpha to 255 by
default. (#151261)
* theme.c (meta_frame_style_unref): free colour spec if
allocated. (#151261)
* theme.c (meta_frame_style_validate): it's only an error not to
include a button if that button is valid in the current
theme. (#96229)
* theme.c (button_rect): return rectangles for the new 3*2 kinds
of button. (#96229)
* theme.c (meta_frame_style_set_unref): free differently resizable
shaded styles. (#114304)
* theme.c (get_style): look up differently resizable styles
for shaded windows. (#114304)
* theme.c (free_menu_ops (removed function), get_menu_icon
(removed function), meta_theme_draw_menu_icon (removed function),
meta_menu_icon_type_from_string (removed function),
meta_menu_icon_type_to_string (removed function),
meta_theme_free, meta_theme_validate): removed menu icon code. (#114305)
* theme.c (meta_theme_load_image): add size_of_theme_icons
parameter. (#113465)
* theme.c (meta_theme_define_color_constant (new function),
meta_theme_lookup_color_constant (new function)): allow
definition of colour constants. (#129747)
* theme.c (meta_button_type_from_string, meta_button_type_to_string):
add the 3*2 new kinds of button. (#96229)
* theme.c (meta_theme_earliest_version_with_button (new function)):
return the theme version each button was introduced in. (#96229)
* theme.h ( MetaFrameLayout): add "hide_buttons" flag (#121639) and
corner radiuses. (#113162)
* theme.h (MetaFrameGeometry): add rectangles for the 3*2 new
buttons. (#96229)
* theme.h (MetaButtonType): the 3*2 new buttons. (#96229)
* theme.h (MetaFrameStyle): add window_background_color and
window_background_alpha so that we can specify background on a
<frame_style>. (#151261)
* theme.h (MetaFrameStyleSet): shaded_styles gets resize
dimension. (#114304)
* theme.h (MetaTheme): added format_version, color_constants
hash, (#129747) fallback_icon and fallback_mini_icon, (#11363)
and removed menu_icons. (#114305)
* theme.h (META_THEME_ALLOWS (new macro)): return whether a theme
supports a given feature. Also, several macros representing
new features in v2.
* ui.c (meta_ui_set_current_theme)): also invalidate default
icons. (#11363)
* window.[ch] (meta_window_update_icon_now)): became
non-static. (#11363)
2006-10-07 12:56:47 -04:00
|
|
|
guint top_right_corner_rounded_radius;
|
2008-01-16 22:49:24 -05:00
|
|
|
/** Radius of the bottom left-hand corner; 0 if not rounded */
|
Added "above" to the list of flags a frame can have, so that we know when
* common.h: Added "above" to the list of flags a frame can have, so
that we know when to mark it as always on top. Added six grab ops,
one to do and one to undo each of the three new titlebar buttons
(shade, above, stick). Added six new button functions, similarly.
(#96229)
* frame.c (meta_frame_get_flags): If a frame has the WM_STATE_ABOVE X
attribute, set META_FRAME_ABOVE in its flags.
* frames.c (meta_frames_apply_shapes): Allow variable amounts of
rounding. (#113162)
* frames.c (show_tip_now, meta_frames_paint_to_drawable, control_rect,
get_control): extend handling of existing buttons to the
3*2 new kinds of button. (#96229)
* frames.c (meta_frames_button_press_event): translate clicks on the 3*2
new kinds of button to the new grab ops. (#96229)
* frames.c (meta_frames_button_release_event): implement the various
actions for the 3*2 new kinds of button. (#96229)
* frames.c (meta_frames_update_prelit_control,
meta_frames_motion_notify_event): extend existing motion
notifications for buttons to the 3*2 new kinds of button. (#96229)
* frames.c (meta_frames_set_window_background): handle specified
background colours and alpha transparency. (#151261)
* frames.h (MetaFrameControl): New control types for the 3*2 new kinds
of button. (#96229)
* iconcache.[ch] (meta_read_icons): use theme's fallback icons if a
window has no icon; use metacity's fallback icons only if the theme
does not provide any. (#11363)
* iconcache.[ch] (meta_invalidate_default_icons (new function)): clear
icon cache on windows using default icons, and update them. (#11363)
* main.c (main): added \n to error message.
* prefs.c (button_function_from_string): extend for 3 new button
types. (#96229)
* prefs.c (button_opposite_function (new function)): return a button
function's inverse (shade -> unshade, etc) (#96229)
* prefs.c (update_button_layout): allocate space for a button's
inverse, if it has one. (#96229)
* theme-parser.c (ParseState): add state for fallback icons (#11363)
* theme-parser.c (ParseInfo): add format_version; remove
menu_icon_* (#114305)
* theme-parser.c (parse_positive_integer): add lookup for integer
constants (#331356)
* theme-parser.c (parse_rounding (new function)): parse window
rounding amount (#113162)
* theme-parser.c (parse_alpha): don't set error if the number can't
be parsed since it'll already be set; change tolerance in comparison
from 1e6 to 1e-6
* theme-parser.c (parse_color (new function)): parse colour, including
possible constant lookup.
* theme-parser.c (parse_toplevel_element): allow defining of various
new kinds of constant; allow
hide_buttons (#121639) and more detailed rounding attributes on
<frame_geometry> (#113162); allow background and alpha attributes on
<frame_style>; (#151261) remove support for <menu_icon> except as
stub; (#114305) add support for loading stock images (#113465); add
support for <fallback>. (#11363))
* theme-parser.c (parse_draw_op_element): add from and to attribute
for arcs. (#121603)
* theme-parser.c (parse_style_element): add check for theme version
supporting a button function. (#96229)
* theme-parser.c (parse_style_set_element): add ability for shaded
windows to be resizable (#114304)
* theme-parser.c (meta_theme_load): add theme versioning routine.
* theme.c ( meta_frame_layout_get_borders): return rectangles for
the new 3*2 kinds of button, except where they're
inapplicable. (#96229)
* theme.c (meta_frame_layout_calc_geometry): don't format buttons on
windows with no buttons (#121639); strip the 3*2 new kinds of button
correctly (#96229); allow variable amounts of rounding (#113162).
* theme.c (meta_frame_style_new): set alpha to 255 by
default. (#151261)
* theme.c (meta_frame_style_unref): free colour spec if
allocated. (#151261)
* theme.c (meta_frame_style_validate): it's only an error not to
include a button if that button is valid in the current
theme. (#96229)
* theme.c (button_rect): return rectangles for the new 3*2 kinds
of button. (#96229)
* theme.c (meta_frame_style_set_unref): free differently resizable
shaded styles. (#114304)
* theme.c (get_style): look up differently resizable styles
for shaded windows. (#114304)
* theme.c (free_menu_ops (removed function), get_menu_icon
(removed function), meta_theme_draw_menu_icon (removed function),
meta_menu_icon_type_from_string (removed function),
meta_menu_icon_type_to_string (removed function),
meta_theme_free, meta_theme_validate): removed menu icon code. (#114305)
* theme.c (meta_theme_load_image): add size_of_theme_icons
parameter. (#113465)
* theme.c (meta_theme_define_color_constant (new function),
meta_theme_lookup_color_constant (new function)): allow
definition of colour constants. (#129747)
* theme.c (meta_button_type_from_string, meta_button_type_to_string):
add the 3*2 new kinds of button. (#96229)
* theme.c (meta_theme_earliest_version_with_button (new function)):
return the theme version each button was introduced in. (#96229)
* theme.h ( MetaFrameLayout): add "hide_buttons" flag (#121639) and
corner radiuses. (#113162)
* theme.h (MetaFrameGeometry): add rectangles for the 3*2 new
buttons. (#96229)
* theme.h (MetaButtonType): the 3*2 new buttons. (#96229)
* theme.h (MetaFrameStyle): add window_background_color and
window_background_alpha so that we can specify background on a
<frame_style>. (#151261)
* theme.h (MetaFrameStyleSet): shaded_styles gets resize
dimension. (#114304)
* theme.h (MetaTheme): added format_version, color_constants
hash, (#129747) fallback_icon and fallback_mini_icon, (#11363)
and removed menu_icons. (#114305)
* theme.h (META_THEME_ALLOWS (new macro)): return whether a theme
supports a given feature. Also, several macros representing
new features in v2.
* ui.c (meta_ui_set_current_theme)): also invalidate default
icons. (#11363)
* window.[ch] (meta_window_update_icon_now)): became
non-static. (#11363)
2006-10-07 12:56:47 -04:00
|
|
|
guint bottom_left_corner_rounded_radius;
|
2008-01-16 22:49:24 -05:00
|
|
|
/** Radius of the bottom right-hand corner; 0 if not rounded */
|
Added "above" to the list of flags a frame can have, so that we know when
* common.h: Added "above" to the list of flags a frame can have, so
that we know when to mark it as always on top. Added six grab ops,
one to do and one to undo each of the three new titlebar buttons
(shade, above, stick). Added six new button functions, similarly.
(#96229)
* frame.c (meta_frame_get_flags): If a frame has the WM_STATE_ABOVE X
attribute, set META_FRAME_ABOVE in its flags.
* frames.c (meta_frames_apply_shapes): Allow variable amounts of
rounding. (#113162)
* frames.c (show_tip_now, meta_frames_paint_to_drawable, control_rect,
get_control): extend handling of existing buttons to the
3*2 new kinds of button. (#96229)
* frames.c (meta_frames_button_press_event): translate clicks on the 3*2
new kinds of button to the new grab ops. (#96229)
* frames.c (meta_frames_button_release_event): implement the various
actions for the 3*2 new kinds of button. (#96229)
* frames.c (meta_frames_update_prelit_control,
meta_frames_motion_notify_event): extend existing motion
notifications for buttons to the 3*2 new kinds of button. (#96229)
* frames.c (meta_frames_set_window_background): handle specified
background colours and alpha transparency. (#151261)
* frames.h (MetaFrameControl): New control types for the 3*2 new kinds
of button. (#96229)
* iconcache.[ch] (meta_read_icons): use theme's fallback icons if a
window has no icon; use metacity's fallback icons only if the theme
does not provide any. (#11363)
* iconcache.[ch] (meta_invalidate_default_icons (new function)): clear
icon cache on windows using default icons, and update them. (#11363)
* main.c (main): added \n to error message.
* prefs.c (button_function_from_string): extend for 3 new button
types. (#96229)
* prefs.c (button_opposite_function (new function)): return a button
function's inverse (shade -> unshade, etc) (#96229)
* prefs.c (update_button_layout): allocate space for a button's
inverse, if it has one. (#96229)
* theme-parser.c (ParseState): add state for fallback icons (#11363)
* theme-parser.c (ParseInfo): add format_version; remove
menu_icon_* (#114305)
* theme-parser.c (parse_positive_integer): add lookup for integer
constants (#331356)
* theme-parser.c (parse_rounding (new function)): parse window
rounding amount (#113162)
* theme-parser.c (parse_alpha): don't set error if the number can't
be parsed since it'll already be set; change tolerance in comparison
from 1e6 to 1e-6
* theme-parser.c (parse_color (new function)): parse colour, including
possible constant lookup.
* theme-parser.c (parse_toplevel_element): allow defining of various
new kinds of constant; allow
hide_buttons (#121639) and more detailed rounding attributes on
<frame_geometry> (#113162); allow background and alpha attributes on
<frame_style>; (#151261) remove support for <menu_icon> except as
stub; (#114305) add support for loading stock images (#113465); add
support for <fallback>. (#11363))
* theme-parser.c (parse_draw_op_element): add from and to attribute
for arcs. (#121603)
* theme-parser.c (parse_style_element): add check for theme version
supporting a button function. (#96229)
* theme-parser.c (parse_style_set_element): add ability for shaded
windows to be resizable (#114304)
* theme-parser.c (meta_theme_load): add theme versioning routine.
* theme.c ( meta_frame_layout_get_borders): return rectangles for
the new 3*2 kinds of button, except where they're
inapplicable. (#96229)
* theme.c (meta_frame_layout_calc_geometry): don't format buttons on
windows with no buttons (#121639); strip the 3*2 new kinds of button
correctly (#96229); allow variable amounts of rounding (#113162).
* theme.c (meta_frame_style_new): set alpha to 255 by
default. (#151261)
* theme.c (meta_frame_style_unref): free colour spec if
allocated. (#151261)
* theme.c (meta_frame_style_validate): it's only an error not to
include a button if that button is valid in the current
theme. (#96229)
* theme.c (button_rect): return rectangles for the new 3*2 kinds
of button. (#96229)
* theme.c (meta_frame_style_set_unref): free differently resizable
shaded styles. (#114304)
* theme.c (get_style): look up differently resizable styles
for shaded windows. (#114304)
* theme.c (free_menu_ops (removed function), get_menu_icon
(removed function), meta_theme_draw_menu_icon (removed function),
meta_menu_icon_type_from_string (removed function),
meta_menu_icon_type_to_string (removed function),
meta_theme_free, meta_theme_validate): removed menu icon code. (#114305)
* theme.c (meta_theme_load_image): add size_of_theme_icons
parameter. (#113465)
* theme.c (meta_theme_define_color_constant (new function),
meta_theme_lookup_color_constant (new function)): allow
definition of colour constants. (#129747)
* theme.c (meta_button_type_from_string, meta_button_type_to_string):
add the 3*2 new kinds of button. (#96229)
* theme.c (meta_theme_earliest_version_with_button (new function)):
return the theme version each button was introduced in. (#96229)
* theme.h ( MetaFrameLayout): add "hide_buttons" flag (#121639) and
corner radiuses. (#113162)
* theme.h (MetaFrameGeometry): add rectangles for the 3*2 new
buttons. (#96229)
* theme.h (MetaButtonType): the 3*2 new buttons. (#96229)
* theme.h (MetaFrameStyle): add window_background_color and
window_background_alpha so that we can specify background on a
<frame_style>. (#151261)
* theme.h (MetaFrameStyleSet): shaded_styles gets resize
dimension. (#114304)
* theme.h (MetaTheme): added format_version, color_constants
hash, (#129747) fallback_icon and fallback_mini_icon, (#11363)
and removed menu_icons. (#114305)
* theme.h (META_THEME_ALLOWS (new macro)): return whether a theme
supports a given feature. Also, several macros representing
new features in v2.
* ui.c (meta_ui_set_current_theme)): also invalidate default
icons. (#11363)
* window.[ch] (meta_window_update_icon_now)): became
non-static. (#11363)
2006-10-07 12:56:47 -04:00
|
|
|
guint bottom_right_corner_rounded_radius;
|
2002-01-18 22:50:03 -05:00
|
|
|
};
|
|
|
|
|
2008-01-16 22:49:24 -05:00
|
|
|
/**
|
2008-01-21 23:00:35 -05:00
|
|
|
* The computed size of a button (really just a way of tying its
|
|
|
|
* visible and clickable areas together).
|
2008-01-16 22:49:24 -05:00
|
|
|
* The reason for two different rectangles here is Fitts' law & maximized
|
|
|
|
* windows; see bug #97703 for more details.
|
|
|
|
*/
|
2006-08-07 14:01:21 -04:00
|
|
|
struct _MetaButtonSpace
|
|
|
|
{
|
2008-01-16 22:49:24 -05:00
|
|
|
/** The screen area where the button's image is drawn */
|
2006-08-07 14:20:37 -04:00
|
|
|
GdkRectangle visible;
|
2008-01-16 22:49:24 -05:00
|
|
|
/** The screen area where the button can be activated by clicking */
|
2006-08-07 14:20:37 -04:00
|
|
|
GdkRectangle clickable;
|
2006-08-07 14:01:21 -04:00
|
|
|
};
|
|
|
|
|
2008-01-16 22:49:24 -05:00
|
|
|
/**
|
|
|
|
* Calculated actual geometry of the frame
|
|
|
|
*/
|
2002-01-18 22:50:03 -05:00
|
|
|
struct _MetaFrameGeometry
|
|
|
|
{
|
|
|
|
int left_width;
|
|
|
|
int right_width;
|
|
|
|
int top_height;
|
|
|
|
int bottom_height;
|
|
|
|
|
|
|
|
int width;
|
2002-10-03 22:28:57 -04:00
|
|
|
int height;
|
|
|
|
|
2002-01-18 22:50:03 -05:00
|
|
|
GdkRectangle title_rect;
|
2002-01-28 00:16:04 -05:00
|
|
|
|
|
|
|
int left_titlebar_edge;
|
|
|
|
int right_titlebar_edge;
|
|
|
|
int top_titlebar_edge;
|
|
|
|
int bottom_titlebar_edge;
|
2002-05-30 20:02:54 -04:00
|
|
|
|
2002-10-03 22:28:57 -04:00
|
|
|
/* used for a memset hack */
|
|
|
|
#define ADDRESS_OF_BUTTON_RECTS(fgeom) (((char*)(fgeom)) + G_STRUCT_OFFSET (MetaFrameGeometry, close_rect))
|
|
|
|
#define LENGTH_OF_BUTTON_RECTS (G_STRUCT_OFFSET (MetaFrameGeometry, right_right_background) + sizeof (GdkRectangle) - G_STRUCT_OFFSET (MetaFrameGeometry, close_rect))
|
|
|
|
|
|
|
|
/* The button rects (if changed adjust memset hack) */
|
2006-08-07 14:01:21 -04:00
|
|
|
MetaButtonSpace close_rect;
|
|
|
|
MetaButtonSpace max_rect;
|
|
|
|
MetaButtonSpace min_rect;
|
|
|
|
MetaButtonSpace menu_rect;
|
Added "above" to the list of flags a frame can have, so that we know when
* common.h: Added "above" to the list of flags a frame can have, so
that we know when to mark it as always on top. Added six grab ops,
one to do and one to undo each of the three new titlebar buttons
(shade, above, stick). Added six new button functions, similarly.
(#96229)
* frame.c (meta_frame_get_flags): If a frame has the WM_STATE_ABOVE X
attribute, set META_FRAME_ABOVE in its flags.
* frames.c (meta_frames_apply_shapes): Allow variable amounts of
rounding. (#113162)
* frames.c (show_tip_now, meta_frames_paint_to_drawable, control_rect,
get_control): extend handling of existing buttons to the
3*2 new kinds of button. (#96229)
* frames.c (meta_frames_button_press_event): translate clicks on the 3*2
new kinds of button to the new grab ops. (#96229)
* frames.c (meta_frames_button_release_event): implement the various
actions for the 3*2 new kinds of button. (#96229)
* frames.c (meta_frames_update_prelit_control,
meta_frames_motion_notify_event): extend existing motion
notifications for buttons to the 3*2 new kinds of button. (#96229)
* frames.c (meta_frames_set_window_background): handle specified
background colours and alpha transparency. (#151261)
* frames.h (MetaFrameControl): New control types for the 3*2 new kinds
of button. (#96229)
* iconcache.[ch] (meta_read_icons): use theme's fallback icons if a
window has no icon; use metacity's fallback icons only if the theme
does not provide any. (#11363)
* iconcache.[ch] (meta_invalidate_default_icons (new function)): clear
icon cache on windows using default icons, and update them. (#11363)
* main.c (main): added \n to error message.
* prefs.c (button_function_from_string): extend for 3 new button
types. (#96229)
* prefs.c (button_opposite_function (new function)): return a button
function's inverse (shade -> unshade, etc) (#96229)
* prefs.c (update_button_layout): allocate space for a button's
inverse, if it has one. (#96229)
* theme-parser.c (ParseState): add state for fallback icons (#11363)
* theme-parser.c (ParseInfo): add format_version; remove
menu_icon_* (#114305)
* theme-parser.c (parse_positive_integer): add lookup for integer
constants (#331356)
* theme-parser.c (parse_rounding (new function)): parse window
rounding amount (#113162)
* theme-parser.c (parse_alpha): don't set error if the number can't
be parsed since it'll already be set; change tolerance in comparison
from 1e6 to 1e-6
* theme-parser.c (parse_color (new function)): parse colour, including
possible constant lookup.
* theme-parser.c (parse_toplevel_element): allow defining of various
new kinds of constant; allow
hide_buttons (#121639) and more detailed rounding attributes on
<frame_geometry> (#113162); allow background and alpha attributes on
<frame_style>; (#151261) remove support for <menu_icon> except as
stub; (#114305) add support for loading stock images (#113465); add
support for <fallback>. (#11363))
* theme-parser.c (parse_draw_op_element): add from and to attribute
for arcs. (#121603)
* theme-parser.c (parse_style_element): add check for theme version
supporting a button function. (#96229)
* theme-parser.c (parse_style_set_element): add ability for shaded
windows to be resizable (#114304)
* theme-parser.c (meta_theme_load): add theme versioning routine.
* theme.c ( meta_frame_layout_get_borders): return rectangles for
the new 3*2 kinds of button, except where they're
inapplicable. (#96229)
* theme.c (meta_frame_layout_calc_geometry): don't format buttons on
windows with no buttons (#121639); strip the 3*2 new kinds of button
correctly (#96229); allow variable amounts of rounding (#113162).
* theme.c (meta_frame_style_new): set alpha to 255 by
default. (#151261)
* theme.c (meta_frame_style_unref): free colour spec if
allocated. (#151261)
* theme.c (meta_frame_style_validate): it's only an error not to
include a button if that button is valid in the current
theme. (#96229)
* theme.c (button_rect): return rectangles for the new 3*2 kinds
of button. (#96229)
* theme.c (meta_frame_style_set_unref): free differently resizable
shaded styles. (#114304)
* theme.c (get_style): look up differently resizable styles
for shaded windows. (#114304)
* theme.c (free_menu_ops (removed function), get_menu_icon
(removed function), meta_theme_draw_menu_icon (removed function),
meta_menu_icon_type_from_string (removed function),
meta_menu_icon_type_to_string (removed function),
meta_theme_free, meta_theme_validate): removed menu icon code. (#114305)
* theme.c (meta_theme_load_image): add size_of_theme_icons
parameter. (#113465)
* theme.c (meta_theme_define_color_constant (new function),
meta_theme_lookup_color_constant (new function)): allow
definition of colour constants. (#129747)
* theme.c (meta_button_type_from_string, meta_button_type_to_string):
add the 3*2 new kinds of button. (#96229)
* theme.c (meta_theme_earliest_version_with_button (new function)):
return the theme version each button was introduced in. (#96229)
* theme.h ( MetaFrameLayout): add "hide_buttons" flag (#121639) and
corner radiuses. (#113162)
* theme.h (MetaFrameGeometry): add rectangles for the 3*2 new
buttons. (#96229)
* theme.h (MetaButtonType): the 3*2 new buttons. (#96229)
* theme.h (MetaFrameStyle): add window_background_color and
window_background_alpha so that we can specify background on a
<frame_style>. (#151261)
* theme.h (MetaFrameStyleSet): shaded_styles gets resize
dimension. (#114304)
* theme.h (MetaTheme): added format_version, color_constants
hash, (#129747) fallback_icon and fallback_mini_icon, (#11363)
and removed menu_icons. (#114305)
* theme.h (META_THEME_ALLOWS (new macro)): return whether a theme
supports a given feature. Also, several macros representing
new features in v2.
* ui.c (meta_ui_set_current_theme)): also invalidate default
icons. (#11363)
* window.[ch] (meta_window_update_icon_now)): became
non-static. (#11363)
2006-10-07 12:56:47 -04:00
|
|
|
MetaButtonSpace shade_rect;
|
|
|
|
MetaButtonSpace above_rect;
|
|
|
|
MetaButtonSpace stick_rect;
|
|
|
|
MetaButtonSpace unshade_rect;
|
|
|
|
MetaButtonSpace unabove_rect;
|
|
|
|
MetaButtonSpace unstick_rect;
|
2002-10-03 22:28:57 -04:00
|
|
|
|
|
|
|
#define MAX_MIDDLE_BACKGROUNDS (MAX_BUTTONS_PER_CORNER - 2)
|
|
|
|
GdkRectangle left_left_background;
|
|
|
|
GdkRectangle left_middle_backgrounds[MAX_MIDDLE_BACKGROUNDS];
|
|
|
|
GdkRectangle left_right_background;
|
|
|
|
GdkRectangle right_left_background;
|
|
|
|
GdkRectangle right_middle_backgrounds[MAX_MIDDLE_BACKGROUNDS];
|
|
|
|
GdkRectangle right_right_background;
|
|
|
|
/* End of button rects (if changed adjust memset hack) */
|
|
|
|
|
2002-05-30 20:02:54 -04:00
|
|
|
/* Round corners */
|
Added "above" to the list of flags a frame can have, so that we know when
* common.h: Added "above" to the list of flags a frame can have, so
that we know when to mark it as always on top. Added six grab ops,
one to do and one to undo each of the three new titlebar buttons
(shade, above, stick). Added six new button functions, similarly.
(#96229)
* frame.c (meta_frame_get_flags): If a frame has the WM_STATE_ABOVE X
attribute, set META_FRAME_ABOVE in its flags.
* frames.c (meta_frames_apply_shapes): Allow variable amounts of
rounding. (#113162)
* frames.c (show_tip_now, meta_frames_paint_to_drawable, control_rect,
get_control): extend handling of existing buttons to the
3*2 new kinds of button. (#96229)
* frames.c (meta_frames_button_press_event): translate clicks on the 3*2
new kinds of button to the new grab ops. (#96229)
* frames.c (meta_frames_button_release_event): implement the various
actions for the 3*2 new kinds of button. (#96229)
* frames.c (meta_frames_update_prelit_control,
meta_frames_motion_notify_event): extend existing motion
notifications for buttons to the 3*2 new kinds of button. (#96229)
* frames.c (meta_frames_set_window_background): handle specified
background colours and alpha transparency. (#151261)
* frames.h (MetaFrameControl): New control types for the 3*2 new kinds
of button. (#96229)
* iconcache.[ch] (meta_read_icons): use theme's fallback icons if a
window has no icon; use metacity's fallback icons only if the theme
does not provide any. (#11363)
* iconcache.[ch] (meta_invalidate_default_icons (new function)): clear
icon cache on windows using default icons, and update them. (#11363)
* main.c (main): added \n to error message.
* prefs.c (button_function_from_string): extend for 3 new button
types. (#96229)
* prefs.c (button_opposite_function (new function)): return a button
function's inverse (shade -> unshade, etc) (#96229)
* prefs.c (update_button_layout): allocate space for a button's
inverse, if it has one. (#96229)
* theme-parser.c (ParseState): add state for fallback icons (#11363)
* theme-parser.c (ParseInfo): add format_version; remove
menu_icon_* (#114305)
* theme-parser.c (parse_positive_integer): add lookup for integer
constants (#331356)
* theme-parser.c (parse_rounding (new function)): parse window
rounding amount (#113162)
* theme-parser.c (parse_alpha): don't set error if the number can't
be parsed since it'll already be set; change tolerance in comparison
from 1e6 to 1e-6
* theme-parser.c (parse_color (new function)): parse colour, including
possible constant lookup.
* theme-parser.c (parse_toplevel_element): allow defining of various
new kinds of constant; allow
hide_buttons (#121639) and more detailed rounding attributes on
<frame_geometry> (#113162); allow background and alpha attributes on
<frame_style>; (#151261) remove support for <menu_icon> except as
stub; (#114305) add support for loading stock images (#113465); add
support for <fallback>. (#11363))
* theme-parser.c (parse_draw_op_element): add from and to attribute
for arcs. (#121603)
* theme-parser.c (parse_style_element): add check for theme version
supporting a button function. (#96229)
* theme-parser.c (parse_style_set_element): add ability for shaded
windows to be resizable (#114304)
* theme-parser.c (meta_theme_load): add theme versioning routine.
* theme.c ( meta_frame_layout_get_borders): return rectangles for
the new 3*2 kinds of button, except where they're
inapplicable. (#96229)
* theme.c (meta_frame_layout_calc_geometry): don't format buttons on
windows with no buttons (#121639); strip the 3*2 new kinds of button
correctly (#96229); allow variable amounts of rounding (#113162).
* theme.c (meta_frame_style_new): set alpha to 255 by
default. (#151261)
* theme.c (meta_frame_style_unref): free colour spec if
allocated. (#151261)
* theme.c (meta_frame_style_validate): it's only an error not to
include a button if that button is valid in the current
theme. (#96229)
* theme.c (button_rect): return rectangles for the new 3*2 kinds
of button. (#96229)
* theme.c (meta_frame_style_set_unref): free differently resizable
shaded styles. (#114304)
* theme.c (get_style): look up differently resizable styles
for shaded windows. (#114304)
* theme.c (free_menu_ops (removed function), get_menu_icon
(removed function), meta_theme_draw_menu_icon (removed function),
meta_menu_icon_type_from_string (removed function),
meta_menu_icon_type_to_string (removed function),
meta_theme_free, meta_theme_validate): removed menu icon code. (#114305)
* theme.c (meta_theme_load_image): add size_of_theme_icons
parameter. (#113465)
* theme.c (meta_theme_define_color_constant (new function),
meta_theme_lookup_color_constant (new function)): allow
definition of colour constants. (#129747)
* theme.c (meta_button_type_from_string, meta_button_type_to_string):
add the 3*2 new kinds of button. (#96229)
* theme.c (meta_theme_earliest_version_with_button (new function)):
return the theme version each button was introduced in. (#96229)
* theme.h ( MetaFrameLayout): add "hide_buttons" flag (#121639) and
corner radiuses. (#113162)
* theme.h (MetaFrameGeometry): add rectangles for the 3*2 new
buttons. (#96229)
* theme.h (MetaButtonType): the 3*2 new buttons. (#96229)
* theme.h (MetaFrameStyle): add window_background_color and
window_background_alpha so that we can specify background on a
<frame_style>. (#151261)
* theme.h (MetaFrameStyleSet): shaded_styles gets resize
dimension. (#114304)
* theme.h (MetaTheme): added format_version, color_constants
hash, (#129747) fallback_icon and fallback_mini_icon, (#11363)
and removed menu_icons. (#114305)
* theme.h (META_THEME_ALLOWS (new macro)): return whether a theme
supports a given feature. Also, several macros representing
new features in v2.
* ui.c (meta_ui_set_current_theme)): also invalidate default
icons. (#11363)
* window.[ch] (meta_window_update_icon_now)): became
non-static. (#11363)
2006-10-07 12:56:47 -04:00
|
|
|
guint top_left_corner_rounded_radius;
|
|
|
|
guint top_right_corner_rounded_radius;
|
|
|
|
guint bottom_left_corner_rounded_radius;
|
|
|
|
guint bottom_right_corner_rounded_radius;
|
2002-01-18 22:50:03 -05:00
|
|
|
};
|
|
|
|
|
2002-05-31 18:03:34 -04:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
META_IMAGE_FILL_SCALE, /* default, needs to be all-bits-zero for g_new0 */
|
|
|
|
META_IMAGE_FILL_TILE
|
|
|
|
} MetaImageFillType;
|
2001-05-31 12:18:40 -04:00
|
|
|
|
2002-01-08 02:23:35 -05:00
|
|
|
typedef enum
|
2002-01-06 22:26:09 -05:00
|
|
|
{
|
2002-01-08 02:23:35 -05:00
|
|
|
META_COLOR_SPEC_BASIC,
|
|
|
|
META_COLOR_SPEC_GTK,
|
2002-06-06 00:00:22 -04:00
|
|
|
META_COLOR_SPEC_BLEND,
|
|
|
|
META_COLOR_SPEC_SHADE
|
2002-01-08 02:23:35 -05:00
|
|
|
} MetaColorSpecType;
|
|
|
|
|
2002-01-28 02:30:44 -05:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
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,
|
2002-02-06 22:07:56 -05:00
|
|
|
META_GTK_COLOR_TEXT_AA,
|
|
|
|
META_GTK_COLOR_LAST
|
2002-01-28 02:30:44 -05:00
|
|
|
} MetaGtkColorComponent;
|
|
|
|
|
2002-01-08 02:23:35 -05:00
|
|
|
struct _MetaColorSpec
|
|
|
|
{
|
|
|
|
MetaColorSpecType type;
|
|
|
|
union
|
|
|
|
{
|
|
|
|
struct {
|
|
|
|
GdkColor color;
|
|
|
|
} basic;
|
|
|
|
struct {
|
2002-01-28 02:30:44 -05:00
|
|
|
MetaGtkColorComponent component;
|
2002-01-08 02:23:35 -05:00
|
|
|
GtkStateType state;
|
|
|
|
} gtk;
|
|
|
|
struct {
|
|
|
|
MetaColorSpec *foreground;
|
|
|
|
MetaColorSpec *background;
|
|
|
|
double alpha;
|
Merge compositor branch.
2007-12-18 Iain Holmes <iain@gnome.org>
* configure.in, src/theme.c, src/display.c,
src/theme.h, src/display.h, src/theme-parser.c,
src/compositor.c, src/c-screen.c, src/compositor.h,
src/c-screen.h, src/ui.c, src/screen.c, src/ui.h,
src/screen.h, src/c-window.c, src/c-window.h,
src/theme-viewer.c, src/Makefile.am: Merge compositor branch.
svn path=/trunk/; revision=3483
2007-12-18 22:49:50 -05:00
|
|
|
|
|
|
|
GdkColor color;
|
2002-01-08 02:23:35 -05:00
|
|
|
} blend;
|
2002-06-06 00:00:22 -04:00
|
|
|
struct {
|
|
|
|
MetaColorSpec *base;
|
|
|
|
double factor;
|
Merge compositor branch.
2007-12-18 Iain Holmes <iain@gnome.org>
* configure.in, src/theme.c, src/display.c,
src/theme.h, src/display.h, src/theme-parser.c,
src/compositor.c, src/c-screen.c, src/compositor.h,
src/c-screen.h, src/ui.c, src/screen.c, src/ui.h,
src/screen.h, src/c-window.c, src/c-window.h,
src/theme-viewer.c, src/Makefile.am: Merge compositor branch.
svn path=/trunk/; revision=3483
2007-12-18 22:49:50 -05:00
|
|
|
|
|
|
|
GdkColor color;
|
2002-06-06 00:00:22 -04:00
|
|
|
} shade;
|
2002-01-08 02:23:35 -05:00
|
|
|
} data;
|
|
|
|
};
|
|
|
|
|
2002-02-02 00:09:19 -05:00
|
|
|
struct _MetaGradientSpec
|
|
|
|
{
|
|
|
|
MetaGradientType type;
|
|
|
|
GSList *color_specs;
|
|
|
|
};
|
|
|
|
|
2002-05-31 17:18:11 -04:00
|
|
|
struct _MetaAlphaGradientSpec
|
|
|
|
{
|
|
|
|
MetaGradientType type;
|
|
|
|
unsigned char *alphas;
|
|
|
|
int n_alphas;
|
|
|
|
};
|
|
|
|
|
2002-02-06 22:07:56 -05:00
|
|
|
struct _MetaDrawInfo
|
|
|
|
{
|
|
|
|
GdkPixbuf *mini_icon;
|
|
|
|
GdkPixbuf *icon;
|
|
|
|
PangoLayout *title_layout;
|
|
|
|
int title_layout_width;
|
|
|
|
int title_layout_height;
|
|
|
|
const MetaFrameGeometry *fgeom;
|
|
|
|
};
|
|
|
|
|
2008-01-21 23:00:35 -05:00
|
|
|
/**
|
|
|
|
* A drawing operation in our simple vector drawing language.
|
|
|
|
*/
|
2002-01-27 21:09:12 -05:00
|
|
|
typedef enum
|
|
|
|
{
|
2008-01-21 23:00:35 -05:00
|
|
|
/** Basic drawing-- line */
|
2002-02-02 00:09:19 -05:00
|
|
|
META_DRAW_LINE,
|
2008-01-21 23:00:35 -05:00
|
|
|
/** Basic drawing-- rectangle */
|
2002-02-02 00:09:19 -05:00
|
|
|
META_DRAW_RECTANGLE,
|
2008-01-21 23:00:35 -05:00
|
|
|
/** Basic drawing-- arc */
|
2002-02-02 00:09:19 -05:00
|
|
|
META_DRAW_ARC,
|
|
|
|
|
2008-01-21 23:00:35 -05:00
|
|
|
/** Clip to a rectangle */
|
2002-02-06 22:07:56 -05:00
|
|
|
META_DRAW_CLIP,
|
|
|
|
|
2002-02-02 00:09:19 -05:00
|
|
|
/* Texture thingies */
|
2008-01-21 23:00:35 -05:00
|
|
|
|
|
|
|
/** Just a filled rectangle with alpha */
|
|
|
|
META_DRAW_TINT,
|
2002-02-02 00:09:19 -05:00
|
|
|
META_DRAW_GRADIENT,
|
|
|
|
META_DRAW_IMAGE,
|
2002-01-27 21:09:12 -05:00
|
|
|
|
2008-01-21 23:00:35 -05:00
|
|
|
/** GTK theme engine stuff */
|
2002-02-02 00:09:19 -05:00
|
|
|
META_DRAW_GTK_ARROW,
|
|
|
|
META_DRAW_GTK_BOX,
|
2002-02-06 22:07:56 -05:00
|
|
|
META_DRAW_GTK_VLINE,
|
|
|
|
|
2008-01-21 23:00:35 -05:00
|
|
|
/** App's window icon */
|
2002-02-06 22:07:56 -05:00
|
|
|
META_DRAW_ICON,
|
2008-01-21 23:00:35 -05:00
|
|
|
/** App's window title */
|
2002-02-06 22:07:56 -05:00
|
|
|
META_DRAW_TITLE,
|
2008-01-21 23:00:35 -05:00
|
|
|
/** a draw op list */
|
2002-02-09 20:10:33 -05:00
|
|
|
META_DRAW_OP_LIST,
|
2008-01-21 23:00:35 -05:00
|
|
|
/** tiled draw op list */
|
2002-02-09 20:10:33 -05:00
|
|
|
META_DRAW_TILE
|
2002-02-02 00:09:19 -05:00
|
|
|
} MetaDrawType;
|
2002-01-27 21:09:12 -05:00
|
|
|
|
Merge compositor branch.
2007-12-18 Iain Holmes <iain@gnome.org>
* configure.in, src/theme.c, src/display.c,
src/theme.h, src/display.h, src/theme-parser.c,
src/compositor.c, src/c-screen.c, src/compositor.h,
src/c-screen.h, src/ui.c, src/screen.c, src/ui.h,
src/screen.h, src/c-window.c, src/c-window.h,
src/theme-viewer.c, src/Makefile.am: Merge compositor branch.
svn path=/trunk/; revision=3483
2007-12-18 22:49:50 -05:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
POS_TOKEN_INT,
|
|
|
|
POS_TOKEN_DOUBLE,
|
|
|
|
POS_TOKEN_OPERATOR,
|
|
|
|
POS_TOKEN_VARIABLE,
|
|
|
|
POS_TOKEN_OPEN_PAREN,
|
|
|
|
POS_TOKEN_CLOSE_PAREN
|
|
|
|
} PosTokenType;
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
POS_OP_NONE,
|
|
|
|
POS_OP_ADD,
|
|
|
|
POS_OP_SUBTRACT,
|
|
|
|
POS_OP_MULTIPLY,
|
|
|
|
POS_OP_DIVIDE,
|
|
|
|
POS_OP_MOD,
|
|
|
|
POS_OP_MAX,
|
|
|
|
POS_OP_MIN
|
|
|
|
} PosOperatorType;
|
|
|
|
|
2008-01-21 23:00:35 -05:00
|
|
|
/**
|
|
|
|
* A token, as output by the tokeniser.
|
|
|
|
*
|
|
|
|
* \ingroup tokenizer
|
|
|
|
*/
|
Merge compositor branch.
2007-12-18 Iain Holmes <iain@gnome.org>
* configure.in, src/theme.c, src/display.c,
src/theme.h, src/display.h, src/theme-parser.c,
src/compositor.c, src/c-screen.c, src/compositor.h,
src/c-screen.h, src/ui.c, src/screen.c, src/ui.h,
src/screen.h, src/c-window.c, src/c-window.h,
src/theme-viewer.c, src/Makefile.am: Merge compositor branch.
svn path=/trunk/; revision=3483
2007-12-18 22:49:50 -05:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
PosTokenType type;
|
|
|
|
|
|
|
|
union
|
|
|
|
{
|
|
|
|
struct {
|
|
|
|
int val;
|
|
|
|
} i;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
double val;
|
|
|
|
} d;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
PosOperatorType op;
|
|
|
|
} o;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
char *name;
|
|
|
|
GQuark name_quark;
|
|
|
|
} v;
|
|
|
|
|
|
|
|
} d;
|
|
|
|
} PosToken;
|
|
|
|
|
2008-01-18 00:07:53 -05:00
|
|
|
/**
|
2008-01-21 23:00:35 -05:00
|
|
|
* A computed expression in our simple vector drawing language.
|
|
|
|
* While it appears to take the form of a tree, this is actually
|
|
|
|
* merely a list; concerns such as precedence of operators are
|
|
|
|
* currently recomputed on every recalculation.
|
2008-01-18 00:07:53 -05:00
|
|
|
*
|
|
|
|
* Created by meta_draw_spec_new(), destroyed by meta_draw_spec_free().
|
|
|
|
* pos_eval() fills this with ...FIXME. Are tokens a tree or a list?
|
2008-01-21 23:00:35 -05:00
|
|
|
* \ingroup parser
|
2008-01-18 00:07:53 -05:00
|
|
|
*/
|
Merge compositor branch.
2007-12-18 Iain Holmes <iain@gnome.org>
* configure.in, src/theme.c, src/display.c,
src/theme.h, src/display.h, src/theme-parser.c,
src/compositor.c, src/c-screen.c, src/compositor.h,
src/c-screen.h, src/ui.c, src/screen.c, src/ui.h,
src/screen.h, src/c-window.c, src/c-window.h,
src/theme-viewer.c, src/Makefile.am: Merge compositor branch.
svn path=/trunk/; revision=3483
2007-12-18 22:49:50 -05:00
|
|
|
typedef struct _MetaDrawSpec
|
|
|
|
{
|
2008-01-18 00:07:53 -05:00
|
|
|
/**
|
|
|
|
* If this spec is constant, this is the value of the constant;
|
|
|
|
* otherwise it is zero.
|
|
|
|
*/
|
Merge compositor branch.
2007-12-18 Iain Holmes <iain@gnome.org>
* configure.in, src/theme.c, src/display.c,
src/theme.h, src/display.h, src/theme-parser.c,
src/compositor.c, src/c-screen.c, src/compositor.h,
src/c-screen.h, src/ui.c, src/screen.c, src/ui.h,
src/screen.h, src/c-window.c, src/c-window.h,
src/theme-viewer.c, src/Makefile.am: Merge compositor branch.
svn path=/trunk/; revision=3483
2007-12-18 22:49:50 -05:00
|
|
|
int value;
|
|
|
|
|
2008-01-18 00:07:53 -05:00
|
|
|
/** A list of tokens in the expression. */
|
Merge compositor branch.
2007-12-18 Iain Holmes <iain@gnome.org>
* configure.in, src/theme.c, src/display.c,
src/theme.h, src/display.h, src/theme-parser.c,
src/compositor.c, src/c-screen.c, src/compositor.h,
src/c-screen.h, src/ui.c, src/screen.c, src/ui.h,
src/screen.h, src/c-window.c, src/c-window.h,
src/theme-viewer.c, src/Makefile.am: Merge compositor branch.
svn path=/trunk/; revision=3483
2007-12-18 22:49:50 -05:00
|
|
|
PosToken *tokens;
|
2008-01-18 00:07:53 -05:00
|
|
|
|
|
|
|
/** How many tokens are in the tokens list. */
|
Merge compositor branch.
2007-12-18 Iain Holmes <iain@gnome.org>
* configure.in, src/theme.c, src/display.c,
src/theme.h, src/display.h, src/theme-parser.c,
src/compositor.c, src/c-screen.c, src/compositor.h,
src/c-screen.h, src/ui.c, src/screen.c, src/ui.h,
src/screen.h, src/c-window.c, src/c-window.h,
src/theme-viewer.c, src/Makefile.am: Merge compositor branch.
svn path=/trunk/; revision=3483
2007-12-18 22:49:50 -05:00
|
|
|
int n_tokens;
|
|
|
|
|
2008-01-18 00:07:53 -05:00
|
|
|
/** Does the expression contain any variables? */
|
|
|
|
gboolean constant : 1;
|
Merge compositor branch.
2007-12-18 Iain Holmes <iain@gnome.org>
* configure.in, src/theme.c, src/display.c,
src/theme.h, src/display.h, src/theme-parser.c,
src/compositor.c, src/c-screen.c, src/compositor.h,
src/c-screen.h, src/ui.c, src/screen.c, src/ui.h,
src/screen.h, src/c-window.c, src/c-window.h,
src/theme-viewer.c, src/Makefile.am: Merge compositor branch.
svn path=/trunk/; revision=3483
2007-12-18 22:49:50 -05:00
|
|
|
} MetaDrawSpec;
|
2008-01-21 23:00:35 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
* A single drawing operation in our simple vector drawing language.
|
|
|
|
*/
|
2002-02-02 00:09:19 -05:00
|
|
|
struct _MetaDrawOp
|
2002-01-27 21:09:12 -05:00
|
|
|
{
|
2002-02-02 00:09:19 -05:00
|
|
|
MetaDrawType type;
|
2002-01-27 21:09:12 -05:00
|
|
|
|
|
|
|
/* Positions are strings because they can be expressions */
|
|
|
|
union
|
|
|
|
{
|
|
|
|
struct {
|
|
|
|
MetaColorSpec *color_spec;
|
|
|
|
int dash_on_length;
|
|
|
|
int dash_off_length;
|
|
|
|
int width;
|
Merge compositor branch.
2007-12-18 Iain Holmes <iain@gnome.org>
* configure.in, src/theme.c, src/display.c,
src/theme.h, src/display.h, src/theme-parser.c,
src/compositor.c, src/c-screen.c, src/compositor.h,
src/c-screen.h, src/ui.c, src/screen.c, src/ui.h,
src/screen.h, src/c-window.c, src/c-window.h,
src/theme-viewer.c, src/Makefile.am: Merge compositor branch.
svn path=/trunk/; revision=3483
2007-12-18 22:49:50 -05:00
|
|
|
MetaDrawSpec *x1;
|
|
|
|
MetaDrawSpec *y1;
|
|
|
|
MetaDrawSpec *x2;
|
|
|
|
MetaDrawSpec *y2;
|
2002-01-27 21:09:12 -05:00
|
|
|
} line;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
MetaColorSpec *color_spec;
|
|
|
|
gboolean filled;
|
Merge compositor branch.
2007-12-18 Iain Holmes <iain@gnome.org>
* configure.in, src/theme.c, src/display.c,
src/theme.h, src/display.h, src/theme-parser.c,
src/compositor.c, src/c-screen.c, src/compositor.h,
src/c-screen.h, src/ui.c, src/screen.c, src/ui.h,
src/screen.h, src/c-window.c, src/c-window.h,
src/theme-viewer.c, src/Makefile.am: Merge compositor branch.
svn path=/trunk/; revision=3483
2007-12-18 22:49:50 -05:00
|
|
|
MetaDrawSpec *x;
|
|
|
|
MetaDrawSpec *y;
|
|
|
|
MetaDrawSpec *width;
|
|
|
|
MetaDrawSpec *height;
|
2002-01-27 21:09:12 -05:00
|
|
|
} rectangle;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
MetaColorSpec *color_spec;
|
|
|
|
gboolean filled;
|
Merge compositor branch.
2007-12-18 Iain Holmes <iain@gnome.org>
* configure.in, src/theme.c, src/display.c,
src/theme.h, src/display.h, src/theme-parser.c,
src/compositor.c, src/c-screen.c, src/compositor.h,
src/c-screen.h, src/ui.c, src/screen.c, src/ui.h,
src/screen.h, src/c-window.c, src/c-window.h,
src/theme-viewer.c, src/Makefile.am: Merge compositor branch.
svn path=/trunk/; revision=3483
2007-12-18 22:49:50 -05:00
|
|
|
MetaDrawSpec *x;
|
|
|
|
MetaDrawSpec *y;
|
|
|
|
MetaDrawSpec *width;
|
|
|
|
MetaDrawSpec *height;
|
2002-01-27 21:09:12 -05:00
|
|
|
double start_angle;
|
|
|
|
double extent_angle;
|
|
|
|
} arc;
|
2002-02-06 22:07:56 -05:00
|
|
|
|
|
|
|
struct {
|
Merge compositor branch.
2007-12-18 Iain Holmes <iain@gnome.org>
* configure.in, src/theme.c, src/display.c,
src/theme.h, src/display.h, src/theme-parser.c,
src/compositor.c, src/c-screen.c, src/compositor.h,
src/c-screen.h, src/ui.c, src/screen.c, src/ui.h,
src/screen.h, src/c-window.c, src/c-window.h,
src/theme-viewer.c, src/Makefile.am: Merge compositor branch.
svn path=/trunk/; revision=3483
2007-12-18 22:49:50 -05:00
|
|
|
MetaDrawSpec *x;
|
|
|
|
MetaDrawSpec *y;
|
|
|
|
MetaDrawSpec *width;
|
|
|
|
MetaDrawSpec *height;
|
2002-02-06 22:07:56 -05:00
|
|
|
} clip;
|
2002-02-02 00:09:19 -05:00
|
|
|
|
|
|
|
struct {
|
|
|
|
MetaColorSpec *color_spec;
|
2002-05-31 17:18:11 -04:00
|
|
|
MetaAlphaGradientSpec *alpha_spec;
|
Merge compositor branch.
2007-12-18 Iain Holmes <iain@gnome.org>
* configure.in, src/theme.c, src/display.c,
src/theme.h, src/display.h, src/theme-parser.c,
src/compositor.c, src/c-screen.c, src/compositor.h,
src/c-screen.h, src/ui.c, src/screen.c, src/ui.h,
src/screen.h, src/c-window.c, src/c-window.h,
src/theme-viewer.c, src/Makefile.am: Merge compositor branch.
svn path=/trunk/; revision=3483
2007-12-18 22:49:50 -05:00
|
|
|
MetaDrawSpec *x;
|
|
|
|
MetaDrawSpec *y;
|
|
|
|
MetaDrawSpec *width;
|
|
|
|
MetaDrawSpec *height;
|
2002-02-02 00:09:19 -05:00
|
|
|
} tint;
|
2002-01-27 21:09:12 -05:00
|
|
|
|
|
|
|
struct {
|
2002-02-02 00:09:19 -05:00
|
|
|
MetaGradientSpec *gradient_spec;
|
2002-05-31 17:18:11 -04:00
|
|
|
MetaAlphaGradientSpec *alpha_spec;
|
Merge compositor branch.
2007-12-18 Iain Holmes <iain@gnome.org>
* configure.in, src/theme.c, src/display.c,
src/theme.h, src/display.h, src/theme-parser.c,
src/compositor.c, src/c-screen.c, src/compositor.h,
src/c-screen.h, src/ui.c, src/screen.c, src/ui.h,
src/screen.h, src/c-window.c, src/c-window.h,
src/theme-viewer.c, src/Makefile.am: Merge compositor branch.
svn path=/trunk/; revision=3483
2007-12-18 22:49:50 -05:00
|
|
|
MetaDrawSpec *x;
|
|
|
|
MetaDrawSpec *y;
|
|
|
|
MetaDrawSpec *width;
|
|
|
|
MetaDrawSpec *height;
|
2002-02-02 00:09:19 -05:00
|
|
|
} gradient;
|
2002-01-27 21:09:12 -05:00
|
|
|
|
2002-02-02 00:09:19 -05:00
|
|
|
struct {
|
2002-02-06 22:43:13 -05:00
|
|
|
MetaColorSpec *colorize_spec;
|
2002-05-31 17:18:11 -04:00
|
|
|
MetaAlphaGradientSpec *alpha_spec;
|
2002-02-02 00:09:19 -05:00
|
|
|
GdkPixbuf *pixbuf;
|
Merge compositor branch.
2007-12-18 Iain Holmes <iain@gnome.org>
* configure.in, src/theme.c, src/display.c,
src/theme.h, src/display.h, src/theme-parser.c,
src/compositor.c, src/c-screen.c, src/compositor.h,
src/c-screen.h, src/ui.c, src/screen.c, src/ui.h,
src/screen.h, src/c-window.c, src/c-window.h,
src/theme-viewer.c, src/Makefile.am: Merge compositor branch.
svn path=/trunk/; revision=3483
2007-12-18 22:49:50 -05:00
|
|
|
MetaDrawSpec *x;
|
|
|
|
MetaDrawSpec *y;
|
|
|
|
MetaDrawSpec *width;
|
|
|
|
MetaDrawSpec *height;
|
|
|
|
|
2002-02-06 23:22:57 -05:00
|
|
|
guint32 colorize_cache_pixel;
|
|
|
|
GdkPixbuf *colorize_cache_pixbuf;
|
2002-05-31 18:03:34 -04:00
|
|
|
MetaImageFillType fill_type;
|
2002-11-04 12:55:56 -05:00
|
|
|
unsigned int vertical_stripes : 1;
|
|
|
|
unsigned int horizontal_stripes : 1;
|
2002-02-02 00:09:19 -05:00
|
|
|
} image;
|
|
|
|
|
2002-01-27 21:09:12 -05:00
|
|
|
struct {
|
|
|
|
GtkStateType state;
|
|
|
|
GtkShadowType shadow;
|
|
|
|
GtkArrowType arrow;
|
2002-01-28 00:16:04 -05:00
|
|
|
gboolean filled;
|
Merge compositor branch.
2007-12-18 Iain Holmes <iain@gnome.org>
* configure.in, src/theme.c, src/display.c,
src/theme.h, src/display.h, src/theme-parser.c,
src/compositor.c, src/c-screen.c, src/compositor.h,
src/c-screen.h, src/ui.c, src/screen.c, src/ui.h,
src/screen.h, src/c-window.c, src/c-window.h,
src/theme-viewer.c, src/Makefile.am: Merge compositor branch.
svn path=/trunk/; revision=3483
2007-12-18 22:49:50 -05:00
|
|
|
|
|
|
|
MetaDrawSpec *x;
|
|
|
|
MetaDrawSpec *y;
|
|
|
|
MetaDrawSpec *width;
|
|
|
|
MetaDrawSpec *height;
|
2002-01-27 21:09:12 -05:00
|
|
|
} gtk_arrow;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
GtkStateType state;
|
|
|
|
GtkShadowType shadow;
|
Merge compositor branch.
2007-12-18 Iain Holmes <iain@gnome.org>
* configure.in, src/theme.c, src/display.c,
src/theme.h, src/display.h, src/theme-parser.c,
src/compositor.c, src/c-screen.c, src/compositor.h,
src/c-screen.h, src/ui.c, src/screen.c, src/ui.h,
src/screen.h, src/c-window.c, src/c-window.h,
src/theme-viewer.c, src/Makefile.am: Merge compositor branch.
svn path=/trunk/; revision=3483
2007-12-18 22:49:50 -05:00
|
|
|
MetaDrawSpec *x;
|
|
|
|
MetaDrawSpec *y;
|
|
|
|
MetaDrawSpec *width;
|
|
|
|
MetaDrawSpec *height;
|
2002-01-27 21:09:12 -05:00
|
|
|
} gtk_box;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
GtkStateType state;
|
Merge compositor branch.
2007-12-18 Iain Holmes <iain@gnome.org>
* configure.in, src/theme.c, src/display.c,
src/theme.h, src/display.h, src/theme-parser.c,
src/compositor.c, src/c-screen.c, src/compositor.h,
src/c-screen.h, src/ui.c, src/screen.c, src/ui.h,
src/screen.h, src/c-window.c, src/c-window.h,
src/theme-viewer.c, src/Makefile.am: Merge compositor branch.
svn path=/trunk/; revision=3483
2007-12-18 22:49:50 -05:00
|
|
|
MetaDrawSpec *x;
|
|
|
|
MetaDrawSpec *y1;
|
|
|
|
MetaDrawSpec *y2;
|
2002-01-27 21:09:12 -05:00
|
|
|
} gtk_vline;
|
2002-02-06 22:07:56 -05:00
|
|
|
|
|
|
|
struct {
|
2002-05-31 17:18:11 -04:00
|
|
|
MetaAlphaGradientSpec *alpha_spec;
|
Merge compositor branch.
2007-12-18 Iain Holmes <iain@gnome.org>
* configure.in, src/theme.c, src/display.c,
src/theme.h, src/display.h, src/theme-parser.c,
src/compositor.c, src/c-screen.c, src/compositor.h,
src/c-screen.h, src/ui.c, src/screen.c, src/ui.h,
src/screen.h, src/c-window.c, src/c-window.h,
src/theme-viewer.c, src/Makefile.am: Merge compositor branch.
svn path=/trunk/; revision=3483
2007-12-18 22:49:50 -05:00
|
|
|
MetaDrawSpec *x;
|
|
|
|
MetaDrawSpec *y;
|
|
|
|
MetaDrawSpec *width;
|
|
|
|
MetaDrawSpec *height;
|
2002-05-31 18:03:34 -04:00
|
|
|
MetaImageFillType fill_type;
|
2002-02-06 22:07:56 -05:00
|
|
|
} icon;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
MetaColorSpec *color_spec;
|
Merge compositor branch.
2007-12-18 Iain Holmes <iain@gnome.org>
* configure.in, src/theme.c, src/display.c,
src/theme.h, src/display.h, src/theme-parser.c,
src/compositor.c, src/c-screen.c, src/compositor.h,
src/c-screen.h, src/ui.c, src/screen.c, src/ui.h,
src/screen.h, src/c-window.c, src/c-window.h,
src/theme-viewer.c, src/Makefile.am: Merge compositor branch.
svn path=/trunk/; revision=3483
2007-12-18 22:49:50 -05:00
|
|
|
MetaDrawSpec *x;
|
|
|
|
MetaDrawSpec *y;
|
2002-02-06 22:07:56 -05:00
|
|
|
} title;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
MetaDrawOpList *op_list;
|
Merge compositor branch.
2007-12-18 Iain Holmes <iain@gnome.org>
* configure.in, src/theme.c, src/display.c,
src/theme.h, src/display.h, src/theme-parser.c,
src/compositor.c, src/c-screen.c, src/compositor.h,
src/c-screen.h, src/ui.c, src/screen.c, src/ui.h,
src/screen.h, src/c-window.c, src/c-window.h,
src/theme-viewer.c, src/Makefile.am: Merge compositor branch.
svn path=/trunk/; revision=3483
2007-12-18 22:49:50 -05:00
|
|
|
MetaDrawSpec *x;
|
|
|
|
MetaDrawSpec *y;
|
|
|
|
MetaDrawSpec *width;
|
|
|
|
MetaDrawSpec *height;
|
2002-02-06 22:07:56 -05:00
|
|
|
} op_list;
|
2002-02-09 20:10:33 -05:00
|
|
|
|
|
|
|
struct {
|
|
|
|
MetaDrawOpList *op_list;
|
Merge compositor branch.
2007-12-18 Iain Holmes <iain@gnome.org>
* configure.in, src/theme.c, src/display.c,
src/theme.h, src/display.h, src/theme-parser.c,
src/compositor.c, src/c-screen.c, src/compositor.h,
src/c-screen.h, src/ui.c, src/screen.c, src/ui.h,
src/screen.h, src/c-window.c, src/c-window.h,
src/theme-viewer.c, src/Makefile.am: Merge compositor branch.
svn path=/trunk/; revision=3483
2007-12-18 22:49:50 -05:00
|
|
|
MetaDrawSpec *x;
|
|
|
|
MetaDrawSpec *y;
|
|
|
|
MetaDrawSpec *width;
|
|
|
|
MetaDrawSpec *height;
|
|
|
|
MetaDrawSpec *tile_xoffset;
|
|
|
|
MetaDrawSpec *tile_yoffset;
|
|
|
|
MetaDrawSpec *tile_width;
|
|
|
|
MetaDrawSpec *tile_height;
|
2002-02-09 20:10:33 -05:00
|
|
|
} tile;
|
2002-01-27 21:09:12 -05:00
|
|
|
|
|
|
|
} data;
|
|
|
|
};
|
|
|
|
|
2008-01-21 23:00:35 -05:00
|
|
|
/**
|
|
|
|
* A list of MetaDrawOp objects. Maintains a reference count.
|
|
|
|
* Grows as necessary and allows the allocation of unused spaces
|
|
|
|
* to keep reallocations to a minimum.
|
|
|
|
*
|
|
|
|
* \bug Do we really win anything from not using the equivalent
|
|
|
|
* GLib structures?
|
|
|
|
*/
|
2002-02-02 00:09:19 -05:00
|
|
|
struct _MetaDrawOpList
|
2002-01-08 02:23:35 -05:00
|
|
|
{
|
2002-02-02 00:09:19 -05:00
|
|
|
int refcount;
|
|
|
|
MetaDrawOp **ops;
|
|
|
|
int n_ops;
|
|
|
|
int n_allocated;
|
2002-01-08 02:23:35 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
2002-01-28 00:16:04 -05:00
|
|
|
META_BUTTON_STATE_NORMAL,
|
2002-01-08 02:23:35 -05:00
|
|
|
META_BUTTON_STATE_PRESSED,
|
|
|
|
META_BUTTON_STATE_PRELIGHT,
|
|
|
|
META_BUTTON_STATE_LAST
|
|
|
|
} MetaButtonState;
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
2002-08-04 16:02:45 -04:00
|
|
|
/* Ordered so that background is drawn first */
|
|
|
|
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,
|
2002-01-08 02:23:35 -05:00
|
|
|
META_BUTTON_TYPE_CLOSE,
|
|
|
|
META_BUTTON_TYPE_MAXIMIZE,
|
|
|
|
META_BUTTON_TYPE_MINIMIZE,
|
|
|
|
META_BUTTON_TYPE_MENU,
|
Added "above" to the list of flags a frame can have, so that we know when
* common.h: Added "above" to the list of flags a frame can have, so
that we know when to mark it as always on top. Added six grab ops,
one to do and one to undo each of the three new titlebar buttons
(shade, above, stick). Added six new button functions, similarly.
(#96229)
* frame.c (meta_frame_get_flags): If a frame has the WM_STATE_ABOVE X
attribute, set META_FRAME_ABOVE in its flags.
* frames.c (meta_frames_apply_shapes): Allow variable amounts of
rounding. (#113162)
* frames.c (show_tip_now, meta_frames_paint_to_drawable, control_rect,
get_control): extend handling of existing buttons to the
3*2 new kinds of button. (#96229)
* frames.c (meta_frames_button_press_event): translate clicks on the 3*2
new kinds of button to the new grab ops. (#96229)
* frames.c (meta_frames_button_release_event): implement the various
actions for the 3*2 new kinds of button. (#96229)
* frames.c (meta_frames_update_prelit_control,
meta_frames_motion_notify_event): extend existing motion
notifications for buttons to the 3*2 new kinds of button. (#96229)
* frames.c (meta_frames_set_window_background): handle specified
background colours and alpha transparency. (#151261)
* frames.h (MetaFrameControl): New control types for the 3*2 new kinds
of button. (#96229)
* iconcache.[ch] (meta_read_icons): use theme's fallback icons if a
window has no icon; use metacity's fallback icons only if the theme
does not provide any. (#11363)
* iconcache.[ch] (meta_invalidate_default_icons (new function)): clear
icon cache on windows using default icons, and update them. (#11363)
* main.c (main): added \n to error message.
* prefs.c (button_function_from_string): extend for 3 new button
types. (#96229)
* prefs.c (button_opposite_function (new function)): return a button
function's inverse (shade -> unshade, etc) (#96229)
* prefs.c (update_button_layout): allocate space for a button's
inverse, if it has one. (#96229)
* theme-parser.c (ParseState): add state for fallback icons (#11363)
* theme-parser.c (ParseInfo): add format_version; remove
menu_icon_* (#114305)
* theme-parser.c (parse_positive_integer): add lookup for integer
constants (#331356)
* theme-parser.c (parse_rounding (new function)): parse window
rounding amount (#113162)
* theme-parser.c (parse_alpha): don't set error if the number can't
be parsed since it'll already be set; change tolerance in comparison
from 1e6 to 1e-6
* theme-parser.c (parse_color (new function)): parse colour, including
possible constant lookup.
* theme-parser.c (parse_toplevel_element): allow defining of various
new kinds of constant; allow
hide_buttons (#121639) and more detailed rounding attributes on
<frame_geometry> (#113162); allow background and alpha attributes on
<frame_style>; (#151261) remove support for <menu_icon> except as
stub; (#114305) add support for loading stock images (#113465); add
support for <fallback>. (#11363))
* theme-parser.c (parse_draw_op_element): add from and to attribute
for arcs. (#121603)
* theme-parser.c (parse_style_element): add check for theme version
supporting a button function. (#96229)
* theme-parser.c (parse_style_set_element): add ability for shaded
windows to be resizable (#114304)
* theme-parser.c (meta_theme_load): add theme versioning routine.
* theme.c ( meta_frame_layout_get_borders): return rectangles for
the new 3*2 kinds of button, except where they're
inapplicable. (#96229)
* theme.c (meta_frame_layout_calc_geometry): don't format buttons on
windows with no buttons (#121639); strip the 3*2 new kinds of button
correctly (#96229); allow variable amounts of rounding (#113162).
* theme.c (meta_frame_style_new): set alpha to 255 by
default. (#151261)
* theme.c (meta_frame_style_unref): free colour spec if
allocated. (#151261)
* theme.c (meta_frame_style_validate): it's only an error not to
include a button if that button is valid in the current
theme. (#96229)
* theme.c (button_rect): return rectangles for the new 3*2 kinds
of button. (#96229)
* theme.c (meta_frame_style_set_unref): free differently resizable
shaded styles. (#114304)
* theme.c (get_style): look up differently resizable styles
for shaded windows. (#114304)
* theme.c (free_menu_ops (removed function), get_menu_icon
(removed function), meta_theme_draw_menu_icon (removed function),
meta_menu_icon_type_from_string (removed function),
meta_menu_icon_type_to_string (removed function),
meta_theme_free, meta_theme_validate): removed menu icon code. (#114305)
* theme.c (meta_theme_load_image): add size_of_theme_icons
parameter. (#113465)
* theme.c (meta_theme_define_color_constant (new function),
meta_theme_lookup_color_constant (new function)): allow
definition of colour constants. (#129747)
* theme.c (meta_button_type_from_string, meta_button_type_to_string):
add the 3*2 new kinds of button. (#96229)
* theme.c (meta_theme_earliest_version_with_button (new function)):
return the theme version each button was introduced in. (#96229)
* theme.h ( MetaFrameLayout): add "hide_buttons" flag (#121639) and
corner radiuses. (#113162)
* theme.h (MetaFrameGeometry): add rectangles for the 3*2 new
buttons. (#96229)
* theme.h (MetaButtonType): the 3*2 new buttons. (#96229)
* theme.h (MetaFrameStyle): add window_background_color and
window_background_alpha so that we can specify background on a
<frame_style>. (#151261)
* theme.h (MetaFrameStyleSet): shaded_styles gets resize
dimension. (#114304)
* theme.h (MetaTheme): added format_version, color_constants
hash, (#129747) fallback_icon and fallback_mini_icon, (#11363)
and removed menu_icons. (#114305)
* theme.h (META_THEME_ALLOWS (new macro)): return whether a theme
supports a given feature. Also, several macros representing
new features in v2.
* ui.c (meta_ui_set_current_theme)): also invalidate default
icons. (#11363)
* window.[ch] (meta_window_update_icon_now)): became
non-static. (#11363)
2006-10-07 12:56:47 -04:00
|
|
|
META_BUTTON_TYPE_SHADE,
|
|
|
|
META_BUTTON_TYPE_ABOVE,
|
|
|
|
META_BUTTON_TYPE_STICK,
|
|
|
|
META_BUTTON_TYPE_UNSHADE,
|
|
|
|
META_BUTTON_TYPE_UNABOVE,
|
|
|
|
META_BUTTON_TYPE_UNSTICK,
|
2002-01-08 02:23:35 -05:00
|
|
|
META_BUTTON_TYPE_LAST
|
|
|
|
} MetaButtonType;
|
|
|
|
|
2002-02-06 22:07:56 -05:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
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
|
|
|
|
} MetaMenuIconType;
|
|
|
|
|
2002-01-08 02:23:35 -05:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
/* Listed in the order in which the textures are drawn.
|
|
|
|
* (though this only matters for overlaps of course.)
|
|
|
|
* Buttons are drawn after the frame textures.
|
|
|
|
*
|
|
|
|
* On the corners, horizontal pieces are arbitrarily given the
|
|
|
|
* corner area:
|
|
|
|
*
|
|
|
|
* ===== |====
|
|
|
|
* | |
|
|
|
|
* | rather than |
|
|
|
|
*
|
|
|
|
*/
|
2002-01-06 22:26:09 -05:00
|
|
|
|
2002-02-02 00:09:19 -05:00
|
|
|
/* entire frame */
|
2002-01-08 02:23:35 -05:00
|
|
|
META_FRAME_PIECE_ENTIRE_BACKGROUND,
|
2002-02-02 00:09:19 -05:00
|
|
|
/* entire titlebar background */
|
2002-02-06 22:07:56 -05:00
|
|
|
META_FRAME_PIECE_TITLEBAR,
|
2002-02-02 00:09:19 -05:00
|
|
|
/* portion of the titlebar background inside the titlebar
|
|
|
|
* background edges
|
|
|
|
*/
|
|
|
|
META_FRAME_PIECE_TITLEBAR_MIDDLE,
|
|
|
|
/* left end of titlebar */
|
2002-01-08 02:23:35 -05:00
|
|
|
META_FRAME_PIECE_LEFT_TITLEBAR_EDGE,
|
2002-02-02 00:09:19 -05:00
|
|
|
/* right end of titlebar */
|
2002-01-08 02:23:35 -05:00
|
|
|
META_FRAME_PIECE_RIGHT_TITLEBAR_EDGE,
|
2002-02-02 00:09:19 -05:00
|
|
|
/* top edge of titlebar */
|
2002-01-08 02:23:35 -05:00
|
|
|
META_FRAME_PIECE_TOP_TITLEBAR_EDGE,
|
2002-02-02 00:09:19 -05:00
|
|
|
/* bottom edge of titlebar */
|
2002-01-08 02:23:35 -05:00
|
|
|
META_FRAME_PIECE_BOTTOM_TITLEBAR_EDGE,
|
2002-02-02 00:09:19 -05:00
|
|
|
/* render over title background (text area) */
|
2002-02-06 22:07:56 -05:00
|
|
|
META_FRAME_PIECE_TITLE,
|
2002-02-02 00:09:19 -05:00
|
|
|
/* left edge of the frame */
|
2002-01-08 02:23:35 -05:00
|
|
|
META_FRAME_PIECE_LEFT_EDGE,
|
2002-02-02 00:09:19 -05:00
|
|
|
/* right edge of the frame */
|
2002-01-08 02:23:35 -05:00
|
|
|
META_FRAME_PIECE_RIGHT_EDGE,
|
2002-02-02 00:09:19 -05:00
|
|
|
/* bottom edge of the frame */
|
2002-01-08 02:23:35 -05:00
|
|
|
META_FRAME_PIECE_BOTTOM_EDGE,
|
2002-01-27 21:09:12 -05:00
|
|
|
/* place over entire frame, after drawing everything else */
|
|
|
|
META_FRAME_PIECE_OVERLAY,
|
2002-01-08 02:23:35 -05:00
|
|
|
/* Used to get size of the enum */
|
|
|
|
META_FRAME_PIECE_LAST
|
|
|
|
} MetaFramePiece;
|
|
|
|
|
2002-02-06 22:07:56 -05:00
|
|
|
#define N_GTK_STATES 5
|
2008-01-21 23:00:35 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
* How to draw a frame in a particular state (say, a focussed, non-maximised,
|
|
|
|
* resizable frame). This corresponds closely to the <frame_style> tag
|
|
|
|
* in a theme file.
|
|
|
|
*/
|
2002-01-08 02:23:35 -05:00
|
|
|
struct _MetaFrameStyle
|
|
|
|
{
|
2008-01-21 23:00:35 -05:00
|
|
|
/** Reference count. */
|
2002-01-19 18:59:11 -05:00
|
|
|
int refcount;
|
2008-01-21 23:00:35 -05:00
|
|
|
/**
|
|
|
|
* Parent style.
|
|
|
|
* Settings which are unspecified here will be taken from there.
|
|
|
|
*/
|
2002-01-27 21:09:12 -05:00
|
|
|
MetaFrameStyle *parent;
|
2008-01-21 23:00:35 -05:00
|
|
|
/** Operations for drawing each kind of button in each state. */
|
2002-02-06 22:07:56 -05:00
|
|
|
MetaDrawOpList *buttons[META_BUTTON_TYPE_LAST][META_BUTTON_STATE_LAST];
|
2008-01-21 23:00:35 -05:00
|
|
|
/** Operations for drawing each piece of the frame. */
|
2002-02-02 00:09:19 -05:00
|
|
|
MetaDrawOpList *pieces[META_FRAME_PIECE_LAST];
|
2008-01-21 23:00:35 -05:00
|
|
|
/**
|
|
|
|
* Details such as the height and width of each edge, the corner rounding,
|
|
|
|
* and the aspect ratio of the buttons.
|
|
|
|
*/
|
2002-01-18 22:50:03 -05:00
|
|
|
MetaFrameLayout *layout;
|
2008-01-21 23:00:35 -05:00
|
|
|
/**
|
|
|
|
* Background colour of the window. Only present in theme formats
|
|
|
|
* 2 and above. Can be NULL to use the standard GTK theme engine.
|
|
|
|
*/
|
|
|
|
MetaColorSpec *window_background_color;
|
|
|
|
/**
|
|
|
|
* Transparency of the window background. 0=transparent; 255=opaque.
|
|
|
|
*/
|
|
|
|
guint8 window_background_alpha;
|
2002-01-06 22:26:09 -05:00
|
|
|
};
|
2002-01-05 23:51:53 -05:00
|
|
|
|
2002-01-27 21:09:12 -05:00
|
|
|
/* Kinds of frame...
|
|
|
|
*
|
2002-01-27 03:21:53 -05:00
|
|
|
* normal -> noresize / vert only / horz only / both
|
|
|
|
* focused / unfocused
|
|
|
|
* max -> focused / unfocused
|
|
|
|
* shaded -> focused / unfocused
|
|
|
|
* max/shaded -> focused / unfocused
|
|
|
|
*
|
|
|
|
* so 4 states with 8 sub-states in one, 2 sub-states in the other 3,
|
|
|
|
* meaning 14 total
|
|
|
|
*
|
|
|
|
* 14 window states times 7 or 8 window types. Except some
|
|
|
|
* window types never get a frame so that narrows it down a bit.
|
|
|
|
*
|
|
|
|
*/
|
2002-01-08 02:23:35 -05:00
|
|
|
typedef enum
|
|
|
|
{
|
2002-01-27 21:09:12 -05:00
|
|
|
META_FRAME_STATE_NORMAL,
|
|
|
|
META_FRAME_STATE_MAXIMIZED,
|
|
|
|
META_FRAME_STATE_SHADED,
|
|
|
|
META_FRAME_STATE_MAXIMIZED_AND_SHADED,
|
|
|
|
META_FRAME_STATE_LAST
|
|
|
|
} MetaFrameState;
|
2002-01-19 18:59:11 -05:00
|
|
|
|
2002-01-27 03:21:53 -05:00
|
|
|
typedef enum
|
|
|
|
{
|
2002-01-27 21:09:12 -05:00
|
|
|
META_FRAME_RESIZE_NONE,
|
|
|
|
META_FRAME_RESIZE_VERTICAL,
|
|
|
|
META_FRAME_RESIZE_HORIZONTAL,
|
|
|
|
META_FRAME_RESIZE_BOTH,
|
|
|
|
META_FRAME_RESIZE_LAST
|
|
|
|
} MetaFrameResize;
|
2002-01-27 03:21:53 -05:00
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
2002-01-27 21:09:12 -05:00
|
|
|
META_FRAME_FOCUS_NO,
|
|
|
|
META_FRAME_FOCUS_YES,
|
|
|
|
META_FRAME_FOCUS_LAST
|
|
|
|
} MetaFrameFocus;
|
2002-01-27 03:21:53 -05:00
|
|
|
|
2008-01-21 23:00:35 -05:00
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
* Not all window types actually get a frame.
|
|
|
|
*
|
|
|
|
* A theme contains one of these objects for each type of window (each
|
|
|
|
* MetaFrameType), that is, normal, dialogue (modal and non-modal), etc.
|
|
|
|
*
|
|
|
|
* This corresponds closely to the <frame_style_set> tag in a theme file.
|
|
|
|
*/
|
2002-01-19 18:59:11 -05:00
|
|
|
struct _MetaFrameStyleSet
|
|
|
|
{
|
2002-01-27 21:09:12 -05:00
|
|
|
int refcount;
|
|
|
|
MetaFrameStyleSet *parent;
|
|
|
|
MetaFrameStyle *normal_styles[META_FRAME_RESIZE_LAST][META_FRAME_FOCUS_LAST];
|
|
|
|
MetaFrameStyle *maximized_styles[META_FRAME_FOCUS_LAST];
|
Added "above" to the list of flags a frame can have, so that we know when
* common.h: Added "above" to the list of flags a frame can have, so
that we know when to mark it as always on top. Added six grab ops,
one to do and one to undo each of the three new titlebar buttons
(shade, above, stick). Added six new button functions, similarly.
(#96229)
* frame.c (meta_frame_get_flags): If a frame has the WM_STATE_ABOVE X
attribute, set META_FRAME_ABOVE in its flags.
* frames.c (meta_frames_apply_shapes): Allow variable amounts of
rounding. (#113162)
* frames.c (show_tip_now, meta_frames_paint_to_drawable, control_rect,
get_control): extend handling of existing buttons to the
3*2 new kinds of button. (#96229)
* frames.c (meta_frames_button_press_event): translate clicks on the 3*2
new kinds of button to the new grab ops. (#96229)
* frames.c (meta_frames_button_release_event): implement the various
actions for the 3*2 new kinds of button. (#96229)
* frames.c (meta_frames_update_prelit_control,
meta_frames_motion_notify_event): extend existing motion
notifications for buttons to the 3*2 new kinds of button. (#96229)
* frames.c (meta_frames_set_window_background): handle specified
background colours and alpha transparency. (#151261)
* frames.h (MetaFrameControl): New control types for the 3*2 new kinds
of button. (#96229)
* iconcache.[ch] (meta_read_icons): use theme's fallback icons if a
window has no icon; use metacity's fallback icons only if the theme
does not provide any. (#11363)
* iconcache.[ch] (meta_invalidate_default_icons (new function)): clear
icon cache on windows using default icons, and update them. (#11363)
* main.c (main): added \n to error message.
* prefs.c (button_function_from_string): extend for 3 new button
types. (#96229)
* prefs.c (button_opposite_function (new function)): return a button
function's inverse (shade -> unshade, etc) (#96229)
* prefs.c (update_button_layout): allocate space for a button's
inverse, if it has one. (#96229)
* theme-parser.c (ParseState): add state for fallback icons (#11363)
* theme-parser.c (ParseInfo): add format_version; remove
menu_icon_* (#114305)
* theme-parser.c (parse_positive_integer): add lookup for integer
constants (#331356)
* theme-parser.c (parse_rounding (new function)): parse window
rounding amount (#113162)
* theme-parser.c (parse_alpha): don't set error if the number can't
be parsed since it'll already be set; change tolerance in comparison
from 1e6 to 1e-6
* theme-parser.c (parse_color (new function)): parse colour, including
possible constant lookup.
* theme-parser.c (parse_toplevel_element): allow defining of various
new kinds of constant; allow
hide_buttons (#121639) and more detailed rounding attributes on
<frame_geometry> (#113162); allow background and alpha attributes on
<frame_style>; (#151261) remove support for <menu_icon> except as
stub; (#114305) add support for loading stock images (#113465); add
support for <fallback>. (#11363))
* theme-parser.c (parse_draw_op_element): add from and to attribute
for arcs. (#121603)
* theme-parser.c (parse_style_element): add check for theme version
supporting a button function. (#96229)
* theme-parser.c (parse_style_set_element): add ability for shaded
windows to be resizable (#114304)
* theme-parser.c (meta_theme_load): add theme versioning routine.
* theme.c ( meta_frame_layout_get_borders): return rectangles for
the new 3*2 kinds of button, except where they're
inapplicable. (#96229)
* theme.c (meta_frame_layout_calc_geometry): don't format buttons on
windows with no buttons (#121639); strip the 3*2 new kinds of button
correctly (#96229); allow variable amounts of rounding (#113162).
* theme.c (meta_frame_style_new): set alpha to 255 by
default. (#151261)
* theme.c (meta_frame_style_unref): free colour spec if
allocated. (#151261)
* theme.c (meta_frame_style_validate): it's only an error not to
include a button if that button is valid in the current
theme. (#96229)
* theme.c (button_rect): return rectangles for the new 3*2 kinds
of button. (#96229)
* theme.c (meta_frame_style_set_unref): free differently resizable
shaded styles. (#114304)
* theme.c (get_style): look up differently resizable styles
for shaded windows. (#114304)
* theme.c (free_menu_ops (removed function), get_menu_icon
(removed function), meta_theme_draw_menu_icon (removed function),
meta_menu_icon_type_from_string (removed function),
meta_menu_icon_type_to_string (removed function),
meta_theme_free, meta_theme_validate): removed menu icon code. (#114305)
* theme.c (meta_theme_load_image): add size_of_theme_icons
parameter. (#113465)
* theme.c (meta_theme_define_color_constant (new function),
meta_theme_lookup_color_constant (new function)): allow
definition of colour constants. (#129747)
* theme.c (meta_button_type_from_string, meta_button_type_to_string):
add the 3*2 new kinds of button. (#96229)
* theme.c (meta_theme_earliest_version_with_button (new function)):
return the theme version each button was introduced in. (#96229)
* theme.h ( MetaFrameLayout): add "hide_buttons" flag (#121639) and
corner radiuses. (#113162)
* theme.h (MetaFrameGeometry): add rectangles for the 3*2 new
buttons. (#96229)
* theme.h (MetaButtonType): the 3*2 new buttons. (#96229)
* theme.h (MetaFrameStyle): add window_background_color and
window_background_alpha so that we can specify background on a
<frame_style>. (#151261)
* theme.h (MetaFrameStyleSet): shaded_styles gets resize
dimension. (#114304)
* theme.h (MetaTheme): added format_version, color_constants
hash, (#129747) fallback_icon and fallback_mini_icon, (#11363)
and removed menu_icons. (#114305)
* theme.h (META_THEME_ALLOWS (new macro)): return whether a theme
supports a given feature. Also, several macros representing
new features in v2.
* ui.c (meta_ui_set_current_theme)): also invalidate default
icons. (#11363)
* window.[ch] (meta_window_update_icon_now)): became
non-static. (#11363)
2006-10-07 12:56:47 -04:00
|
|
|
MetaFrameStyle *shaded_styles[META_FRAME_RESIZE_LAST][META_FRAME_FOCUS_LAST];
|
2002-01-27 21:09:12 -05:00
|
|
|
MetaFrameStyle *maximized_and_shaded_styles[META_FRAME_FOCUS_LAST];
|
2002-01-27 03:21:53 -05:00
|
|
|
};
|
|
|
|
|
2008-01-21 23:00:35 -05:00
|
|
|
/**
|
|
|
|
* A theme. This is a singleton class which groups all settings from a theme
|
|
|
|
* on disk together.
|
|
|
|
*
|
|
|
|
* \bug It is rather useless to keep the metadata fields in core, I think.
|
|
|
|
*/
|
2002-01-27 03:21:53 -05:00
|
|
|
struct _MetaTheme
|
|
|
|
{
|
2008-01-21 23:00:35 -05:00
|
|
|
/** Name of the theme (on disk), e.g. "Crux" */
|
2002-01-27 03:21:53 -05:00
|
|
|
char *name;
|
2008-01-21 23:00:35 -05:00
|
|
|
/** Path to the files associated with the theme */
|
2002-02-06 22:07:56 -05:00
|
|
|
char *dirname;
|
2008-01-21 23:00:35 -05:00
|
|
|
/**
|
|
|
|
* Filename of the XML theme file.
|
|
|
|
* \bug Kept lying around for no discernable reason.
|
|
|
|
*/
|
2002-01-27 03:21:53 -05:00
|
|
|
char *filename;
|
2008-01-21 23:00:35 -05:00
|
|
|
/** Metadata: Human-readable name of the theme. */
|
2002-02-06 22:07:56 -05:00
|
|
|
char *readable_name;
|
2008-01-21 23:00:35 -05:00
|
|
|
/** Metadata: Author of the theme. */
|
2002-02-06 22:07:56 -05:00
|
|
|
char *author;
|
2008-01-21 23:00:35 -05:00
|
|
|
/** Metadata: Copyright holder. */
|
2002-02-06 22:07:56 -05:00
|
|
|
char *copyright;
|
2008-01-21 23:00:35 -05:00
|
|
|
/** Metadata: Date of the theme. */
|
2002-02-06 22:07:56 -05:00
|
|
|
char *date;
|
2008-01-21 23:00:35 -05:00
|
|
|
/** Metadata: Description of the theme. */
|
2002-02-06 22:07:56 -05:00
|
|
|
char *description;
|
2008-01-21 23:00:35 -05:00
|
|
|
/** Version of the theme format. Older versions cannot use the features
|
|
|
|
* of newer versions even if they think they can (this is to allow forward
|
|
|
|
* and backward compatibility.
|
|
|
|
*/
|
Added "above" to the list of flags a frame can have, so that we know when
* common.h: Added "above" to the list of flags a frame can have, so
that we know when to mark it as always on top. Added six grab ops,
one to do and one to undo each of the three new titlebar buttons
(shade, above, stick). Added six new button functions, similarly.
(#96229)
* frame.c (meta_frame_get_flags): If a frame has the WM_STATE_ABOVE X
attribute, set META_FRAME_ABOVE in its flags.
* frames.c (meta_frames_apply_shapes): Allow variable amounts of
rounding. (#113162)
* frames.c (show_tip_now, meta_frames_paint_to_drawable, control_rect,
get_control): extend handling of existing buttons to the
3*2 new kinds of button. (#96229)
* frames.c (meta_frames_button_press_event): translate clicks on the 3*2
new kinds of button to the new grab ops. (#96229)
* frames.c (meta_frames_button_release_event): implement the various
actions for the 3*2 new kinds of button. (#96229)
* frames.c (meta_frames_update_prelit_control,
meta_frames_motion_notify_event): extend existing motion
notifications for buttons to the 3*2 new kinds of button. (#96229)
* frames.c (meta_frames_set_window_background): handle specified
background colours and alpha transparency. (#151261)
* frames.h (MetaFrameControl): New control types for the 3*2 new kinds
of button. (#96229)
* iconcache.[ch] (meta_read_icons): use theme's fallback icons if a
window has no icon; use metacity's fallback icons only if the theme
does not provide any. (#11363)
* iconcache.[ch] (meta_invalidate_default_icons (new function)): clear
icon cache on windows using default icons, and update them. (#11363)
* main.c (main): added \n to error message.
* prefs.c (button_function_from_string): extend for 3 new button
types. (#96229)
* prefs.c (button_opposite_function (new function)): return a button
function's inverse (shade -> unshade, etc) (#96229)
* prefs.c (update_button_layout): allocate space for a button's
inverse, if it has one. (#96229)
* theme-parser.c (ParseState): add state for fallback icons (#11363)
* theme-parser.c (ParseInfo): add format_version; remove
menu_icon_* (#114305)
* theme-parser.c (parse_positive_integer): add lookup for integer
constants (#331356)
* theme-parser.c (parse_rounding (new function)): parse window
rounding amount (#113162)
* theme-parser.c (parse_alpha): don't set error if the number can't
be parsed since it'll already be set; change tolerance in comparison
from 1e6 to 1e-6
* theme-parser.c (parse_color (new function)): parse colour, including
possible constant lookup.
* theme-parser.c (parse_toplevel_element): allow defining of various
new kinds of constant; allow
hide_buttons (#121639) and more detailed rounding attributes on
<frame_geometry> (#113162); allow background and alpha attributes on
<frame_style>; (#151261) remove support for <menu_icon> except as
stub; (#114305) add support for loading stock images (#113465); add
support for <fallback>. (#11363))
* theme-parser.c (parse_draw_op_element): add from and to attribute
for arcs. (#121603)
* theme-parser.c (parse_style_element): add check for theme version
supporting a button function. (#96229)
* theme-parser.c (parse_style_set_element): add ability for shaded
windows to be resizable (#114304)
* theme-parser.c (meta_theme_load): add theme versioning routine.
* theme.c ( meta_frame_layout_get_borders): return rectangles for
the new 3*2 kinds of button, except where they're
inapplicable. (#96229)
* theme.c (meta_frame_layout_calc_geometry): don't format buttons on
windows with no buttons (#121639); strip the 3*2 new kinds of button
correctly (#96229); allow variable amounts of rounding (#113162).
* theme.c (meta_frame_style_new): set alpha to 255 by
default. (#151261)
* theme.c (meta_frame_style_unref): free colour spec if
allocated. (#151261)
* theme.c (meta_frame_style_validate): it's only an error not to
include a button if that button is valid in the current
theme. (#96229)
* theme.c (button_rect): return rectangles for the new 3*2 kinds
of button. (#96229)
* theme.c (meta_frame_style_set_unref): free differently resizable
shaded styles. (#114304)
* theme.c (get_style): look up differently resizable styles
for shaded windows. (#114304)
* theme.c (free_menu_ops (removed function), get_menu_icon
(removed function), meta_theme_draw_menu_icon (removed function),
meta_menu_icon_type_from_string (removed function),
meta_menu_icon_type_to_string (removed function),
meta_theme_free, meta_theme_validate): removed menu icon code. (#114305)
* theme.c (meta_theme_load_image): add size_of_theme_icons
parameter. (#113465)
* theme.c (meta_theme_define_color_constant (new function),
meta_theme_lookup_color_constant (new function)): allow
definition of colour constants. (#129747)
* theme.c (meta_button_type_from_string, meta_button_type_to_string):
add the 3*2 new kinds of button. (#96229)
* theme.c (meta_theme_earliest_version_with_button (new function)):
return the theme version each button was introduced in. (#96229)
* theme.h ( MetaFrameLayout): add "hide_buttons" flag (#121639) and
corner radiuses. (#113162)
* theme.h (MetaFrameGeometry): add rectangles for the 3*2 new
buttons. (#96229)
* theme.h (MetaButtonType): the 3*2 new buttons. (#96229)
* theme.h (MetaFrameStyle): add window_background_color and
window_background_alpha so that we can specify background on a
<frame_style>. (#151261)
* theme.h (MetaFrameStyleSet): shaded_styles gets resize
dimension. (#114304)
* theme.h (MetaTheme): added format_version, color_constants
hash, (#129747) fallback_icon and fallback_mini_icon, (#11363)
and removed menu_icons. (#114305)
* theme.h (META_THEME_ALLOWS (new macro)): return whether a theme
supports a given feature. Also, several macros representing
new features in v2.
* ui.c (meta_ui_set_current_theme)): also invalidate default
icons. (#11363)
* window.[ch] (meta_window_update_icon_now)): became
non-static. (#11363)
2006-10-07 12:56:47 -04:00
|
|
|
guint format_version;
|
2002-02-06 22:07:56 -05:00
|
|
|
|
2008-01-21 23:00:35 -05:00
|
|
|
/** Symbol table of integer constants. */
|
2002-02-06 22:07:56 -05:00
|
|
|
GHashTable *integer_constants;
|
2008-01-21 23:00:35 -05:00
|
|
|
/** Symbol table of float constants. */
|
2002-02-06 22:07:56 -05:00
|
|
|
GHashTable *float_constants;
|
2008-01-21 23:00:35 -05:00
|
|
|
/**
|
|
|
|
* Symbol table of colour constants (hex triples, and triples
|
|
|
|
* plus alpha).
|
|
|
|
* */
|
Added "above" to the list of flags a frame can have, so that we know when
* common.h: Added "above" to the list of flags a frame can have, so
that we know when to mark it as always on top. Added six grab ops,
one to do and one to undo each of the three new titlebar buttons
(shade, above, stick). Added six new button functions, similarly.
(#96229)
* frame.c (meta_frame_get_flags): If a frame has the WM_STATE_ABOVE X
attribute, set META_FRAME_ABOVE in its flags.
* frames.c (meta_frames_apply_shapes): Allow variable amounts of
rounding. (#113162)
* frames.c (show_tip_now, meta_frames_paint_to_drawable, control_rect,
get_control): extend handling of existing buttons to the
3*2 new kinds of button. (#96229)
* frames.c (meta_frames_button_press_event): translate clicks on the 3*2
new kinds of button to the new grab ops. (#96229)
* frames.c (meta_frames_button_release_event): implement the various
actions for the 3*2 new kinds of button. (#96229)
* frames.c (meta_frames_update_prelit_control,
meta_frames_motion_notify_event): extend existing motion
notifications for buttons to the 3*2 new kinds of button. (#96229)
* frames.c (meta_frames_set_window_background): handle specified
background colours and alpha transparency. (#151261)
* frames.h (MetaFrameControl): New control types for the 3*2 new kinds
of button. (#96229)
* iconcache.[ch] (meta_read_icons): use theme's fallback icons if a
window has no icon; use metacity's fallback icons only if the theme
does not provide any. (#11363)
* iconcache.[ch] (meta_invalidate_default_icons (new function)): clear
icon cache on windows using default icons, and update them. (#11363)
* main.c (main): added \n to error message.
* prefs.c (button_function_from_string): extend for 3 new button
types. (#96229)
* prefs.c (button_opposite_function (new function)): return a button
function's inverse (shade -> unshade, etc) (#96229)
* prefs.c (update_button_layout): allocate space for a button's
inverse, if it has one. (#96229)
* theme-parser.c (ParseState): add state for fallback icons (#11363)
* theme-parser.c (ParseInfo): add format_version; remove
menu_icon_* (#114305)
* theme-parser.c (parse_positive_integer): add lookup for integer
constants (#331356)
* theme-parser.c (parse_rounding (new function)): parse window
rounding amount (#113162)
* theme-parser.c (parse_alpha): don't set error if the number can't
be parsed since it'll already be set; change tolerance in comparison
from 1e6 to 1e-6
* theme-parser.c (parse_color (new function)): parse colour, including
possible constant lookup.
* theme-parser.c (parse_toplevel_element): allow defining of various
new kinds of constant; allow
hide_buttons (#121639) and more detailed rounding attributes on
<frame_geometry> (#113162); allow background and alpha attributes on
<frame_style>; (#151261) remove support for <menu_icon> except as
stub; (#114305) add support for loading stock images (#113465); add
support for <fallback>. (#11363))
* theme-parser.c (parse_draw_op_element): add from and to attribute
for arcs. (#121603)
* theme-parser.c (parse_style_element): add check for theme version
supporting a button function. (#96229)
* theme-parser.c (parse_style_set_element): add ability for shaded
windows to be resizable (#114304)
* theme-parser.c (meta_theme_load): add theme versioning routine.
* theme.c ( meta_frame_layout_get_borders): return rectangles for
the new 3*2 kinds of button, except where they're
inapplicable. (#96229)
* theme.c (meta_frame_layout_calc_geometry): don't format buttons on
windows with no buttons (#121639); strip the 3*2 new kinds of button
correctly (#96229); allow variable amounts of rounding (#113162).
* theme.c (meta_frame_style_new): set alpha to 255 by
default. (#151261)
* theme.c (meta_frame_style_unref): free colour spec if
allocated. (#151261)
* theme.c (meta_frame_style_validate): it's only an error not to
include a button if that button is valid in the current
theme. (#96229)
* theme.c (button_rect): return rectangles for the new 3*2 kinds
of button. (#96229)
* theme.c (meta_frame_style_set_unref): free differently resizable
shaded styles. (#114304)
* theme.c (get_style): look up differently resizable styles
for shaded windows. (#114304)
* theme.c (free_menu_ops (removed function), get_menu_icon
(removed function), meta_theme_draw_menu_icon (removed function),
meta_menu_icon_type_from_string (removed function),
meta_menu_icon_type_to_string (removed function),
meta_theme_free, meta_theme_validate): removed menu icon code. (#114305)
* theme.c (meta_theme_load_image): add size_of_theme_icons
parameter. (#113465)
* theme.c (meta_theme_define_color_constant (new function),
meta_theme_lookup_color_constant (new function)): allow
definition of colour constants. (#129747)
* theme.c (meta_button_type_from_string, meta_button_type_to_string):
add the 3*2 new kinds of button. (#96229)
* theme.c (meta_theme_earliest_version_with_button (new function)):
return the theme version each button was introduced in. (#96229)
* theme.h ( MetaFrameLayout): add "hide_buttons" flag (#121639) and
corner radiuses. (#113162)
* theme.h (MetaFrameGeometry): add rectangles for the 3*2 new
buttons. (#96229)
* theme.h (MetaButtonType): the 3*2 new buttons. (#96229)
* theme.h (MetaFrameStyle): add window_background_color and
window_background_alpha so that we can specify background on a
<frame_style>. (#151261)
* theme.h (MetaFrameStyleSet): shaded_styles gets resize
dimension. (#114304)
* theme.h (MetaTheme): added format_version, color_constants
hash, (#129747) fallback_icon and fallback_mini_icon, (#11363)
and removed menu_icons. (#114305)
* theme.h (META_THEME_ALLOWS (new macro)): return whether a theme
supports a given feature. Also, several macros representing
new features in v2.
* ui.c (meta_ui_set_current_theme)): also invalidate default
icons. (#11363)
* window.[ch] (meta_window_update_icon_now)): became
non-static. (#11363)
2006-10-07 12:56:47 -04:00
|
|
|
GHashTable *color_constants;
|
2002-02-06 22:07:56 -05:00
|
|
|
GHashTable *images_by_filename;
|
|
|
|
GHashTable *layouts_by_name;
|
|
|
|
GHashTable *draw_op_lists_by_name;
|
2002-01-27 21:09:12 -05:00
|
|
|
GHashTable *styles_by_name;
|
|
|
|
GHashTable *style_sets_by_name;
|
|
|
|
MetaFrameStyleSet *style_sets_by_type[META_FRAME_TYPE_LAST];
|
Added "above" to the list of flags a frame can have, so that we know when
* common.h: Added "above" to the list of flags a frame can have, so
that we know when to mark it as always on top. Added six grab ops,
one to do and one to undo each of the three new titlebar buttons
(shade, above, stick). Added six new button functions, similarly.
(#96229)
* frame.c (meta_frame_get_flags): If a frame has the WM_STATE_ABOVE X
attribute, set META_FRAME_ABOVE in its flags.
* frames.c (meta_frames_apply_shapes): Allow variable amounts of
rounding. (#113162)
* frames.c (show_tip_now, meta_frames_paint_to_drawable, control_rect,
get_control): extend handling of existing buttons to the
3*2 new kinds of button. (#96229)
* frames.c (meta_frames_button_press_event): translate clicks on the 3*2
new kinds of button to the new grab ops. (#96229)
* frames.c (meta_frames_button_release_event): implement the various
actions for the 3*2 new kinds of button. (#96229)
* frames.c (meta_frames_update_prelit_control,
meta_frames_motion_notify_event): extend existing motion
notifications for buttons to the 3*2 new kinds of button. (#96229)
* frames.c (meta_frames_set_window_background): handle specified
background colours and alpha transparency. (#151261)
* frames.h (MetaFrameControl): New control types for the 3*2 new kinds
of button. (#96229)
* iconcache.[ch] (meta_read_icons): use theme's fallback icons if a
window has no icon; use metacity's fallback icons only if the theme
does not provide any. (#11363)
* iconcache.[ch] (meta_invalidate_default_icons (new function)): clear
icon cache on windows using default icons, and update them. (#11363)
* main.c (main): added \n to error message.
* prefs.c (button_function_from_string): extend for 3 new button
types. (#96229)
* prefs.c (button_opposite_function (new function)): return a button
function's inverse (shade -> unshade, etc) (#96229)
* prefs.c (update_button_layout): allocate space for a button's
inverse, if it has one. (#96229)
* theme-parser.c (ParseState): add state for fallback icons (#11363)
* theme-parser.c (ParseInfo): add format_version; remove
menu_icon_* (#114305)
* theme-parser.c (parse_positive_integer): add lookup for integer
constants (#331356)
* theme-parser.c (parse_rounding (new function)): parse window
rounding amount (#113162)
* theme-parser.c (parse_alpha): don't set error if the number can't
be parsed since it'll already be set; change tolerance in comparison
from 1e6 to 1e-6
* theme-parser.c (parse_color (new function)): parse colour, including
possible constant lookup.
* theme-parser.c (parse_toplevel_element): allow defining of various
new kinds of constant; allow
hide_buttons (#121639) and more detailed rounding attributes on
<frame_geometry> (#113162); allow background and alpha attributes on
<frame_style>; (#151261) remove support for <menu_icon> except as
stub; (#114305) add support for loading stock images (#113465); add
support for <fallback>. (#11363))
* theme-parser.c (parse_draw_op_element): add from and to attribute
for arcs. (#121603)
* theme-parser.c (parse_style_element): add check for theme version
supporting a button function. (#96229)
* theme-parser.c (parse_style_set_element): add ability for shaded
windows to be resizable (#114304)
* theme-parser.c (meta_theme_load): add theme versioning routine.
* theme.c ( meta_frame_layout_get_borders): return rectangles for
the new 3*2 kinds of button, except where they're
inapplicable. (#96229)
* theme.c (meta_frame_layout_calc_geometry): don't format buttons on
windows with no buttons (#121639); strip the 3*2 new kinds of button
correctly (#96229); allow variable amounts of rounding (#113162).
* theme.c (meta_frame_style_new): set alpha to 255 by
default. (#151261)
* theme.c (meta_frame_style_unref): free colour spec if
allocated. (#151261)
* theme.c (meta_frame_style_validate): it's only an error not to
include a button if that button is valid in the current
theme. (#96229)
* theme.c (button_rect): return rectangles for the new 3*2 kinds
of button. (#96229)
* theme.c (meta_frame_style_set_unref): free differently resizable
shaded styles. (#114304)
* theme.c (get_style): look up differently resizable styles
for shaded windows. (#114304)
* theme.c (free_menu_ops (removed function), get_menu_icon
(removed function), meta_theme_draw_menu_icon (removed function),
meta_menu_icon_type_from_string (removed function),
meta_menu_icon_type_to_string (removed function),
meta_theme_free, meta_theme_validate): removed menu icon code. (#114305)
* theme.c (meta_theme_load_image): add size_of_theme_icons
parameter. (#113465)
* theme.c (meta_theme_define_color_constant (new function),
meta_theme_lookup_color_constant (new function)): allow
definition of colour constants. (#129747)
* theme.c (meta_button_type_from_string, meta_button_type_to_string):
add the 3*2 new kinds of button. (#96229)
* theme.c (meta_theme_earliest_version_with_button (new function)):
return the theme version each button was introduced in. (#96229)
* theme.h ( MetaFrameLayout): add "hide_buttons" flag (#121639) and
corner radiuses. (#113162)
* theme.h (MetaFrameGeometry): add rectangles for the 3*2 new
buttons. (#96229)
* theme.h (MetaButtonType): the 3*2 new buttons. (#96229)
* theme.h (MetaFrameStyle): add window_background_color and
window_background_alpha so that we can specify background on a
<frame_style>. (#151261)
* theme.h (MetaFrameStyleSet): shaded_styles gets resize
dimension. (#114304)
* theme.h (MetaTheme): added format_version, color_constants
hash, (#129747) fallback_icon and fallback_mini_icon, (#11363)
and removed menu_icons. (#114305)
* theme.h (META_THEME_ALLOWS (new macro)): return whether a theme
supports a given feature. Also, several macros representing
new features in v2.
* ui.c (meta_ui_set_current_theme)): also invalidate default
icons. (#11363)
* window.[ch] (meta_window_update_icon_now)): became
non-static. (#11363)
2006-10-07 12:56:47 -04:00
|
|
|
|
Merge compositor branch.
2007-12-18 Iain Holmes <iain@gnome.org>
* configure.in, src/theme.c, src/display.c,
src/theme.h, src/display.h, src/theme-parser.c,
src/compositor.c, src/c-screen.c, src/compositor.h,
src/c-screen.h, src/ui.c, src/screen.c, src/ui.h,
src/screen.h, src/c-window.c, src/c-window.h,
src/theme-viewer.c, src/Makefile.am: Merge compositor branch.
svn path=/trunk/; revision=3483
2007-12-18 22:49:50 -05:00
|
|
|
GQuark quark_width;
|
|
|
|
GQuark quark_height;
|
|
|
|
GQuark quark_object_width;
|
|
|
|
GQuark quark_object_height;
|
|
|
|
GQuark quark_left_width;
|
|
|
|
GQuark quark_right_width;
|
|
|
|
GQuark quark_top_height;
|
|
|
|
GQuark quark_bottom_height;
|
|
|
|
GQuark quark_mini_icon_width;
|
|
|
|
GQuark quark_mini_icon_height;
|
|
|
|
GQuark quark_icon_width;
|
|
|
|
GQuark quark_icon_height;
|
|
|
|
GQuark quark_title_width;
|
|
|
|
GQuark quark_title_height;
|
2002-01-19 18:59:11 -05:00
|
|
|
};
|
2002-01-08 02:23:35 -05:00
|
|
|
|
2002-02-02 00:09:19 -05:00
|
|
|
struct _MetaPositionExprEnv
|
|
|
|
{
|
2006-04-18 13:18:53 -04:00
|
|
|
MetaRectangle rect;
|
2002-02-06 22:07:56 -05:00
|
|
|
/* size of an object being drawn, if it has a natural size */
|
2002-02-02 00:09:19 -05:00
|
|
|
int object_width;
|
|
|
|
int object_height;
|
2002-02-06 22:07:56 -05:00
|
|
|
/* global object sizes, always available */
|
|
|
|
int left_width;
|
|
|
|
int right_width;
|
|
|
|
int top_height;
|
|
|
|
int bottom_height;
|
|
|
|
int title_width;
|
|
|
|
int title_height;
|
|
|
|
int mini_icon_width;
|
|
|
|
int mini_icon_height;
|
|
|
|
int icon_width;
|
|
|
|
int icon_height;
|
|
|
|
/* Theme so we can look up constants */
|
|
|
|
MetaTheme *theme;
|
2002-02-02 00:09:19 -05:00
|
|
|
};
|
|
|
|
|
2002-01-18 22:50:03 -05:00
|
|
|
MetaFrameLayout* meta_frame_layout_new (void);
|
2002-02-06 22:07:56 -05:00
|
|
|
MetaFrameLayout* meta_frame_layout_copy (const MetaFrameLayout *src);
|
|
|
|
void meta_frame_layout_ref (MetaFrameLayout *layout);
|
|
|
|
void meta_frame_layout_unref (MetaFrameLayout *layout);
|
2002-01-19 18:59:11 -05:00
|
|
|
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);
|
2002-10-03 22:28:57 -04:00
|
|
|
void meta_frame_layout_calc_geometry (const MetaFrameLayout *layout,
|
|
|
|
int text_height,
|
|
|
|
MetaFrameFlags flags,
|
|
|
|
int client_width,
|
|
|
|
int client_height,
|
|
|
|
const MetaButtonLayout *button_layout,
|
Added "above" to the list of flags a frame can have, so that we know when
* common.h: Added "above" to the list of flags a frame can have, so
that we know when to mark it as always on top. Added six grab ops,
one to do and one to undo each of the three new titlebar buttons
(shade, above, stick). Added six new button functions, similarly.
(#96229)
* frame.c (meta_frame_get_flags): If a frame has the WM_STATE_ABOVE X
attribute, set META_FRAME_ABOVE in its flags.
* frames.c (meta_frames_apply_shapes): Allow variable amounts of
rounding. (#113162)
* frames.c (show_tip_now, meta_frames_paint_to_drawable, control_rect,
get_control): extend handling of existing buttons to the
3*2 new kinds of button. (#96229)
* frames.c (meta_frames_button_press_event): translate clicks on the 3*2
new kinds of button to the new grab ops. (#96229)
* frames.c (meta_frames_button_release_event): implement the various
actions for the 3*2 new kinds of button. (#96229)
* frames.c (meta_frames_update_prelit_control,
meta_frames_motion_notify_event): extend existing motion
notifications for buttons to the 3*2 new kinds of button. (#96229)
* frames.c (meta_frames_set_window_background): handle specified
background colours and alpha transparency. (#151261)
* frames.h (MetaFrameControl): New control types for the 3*2 new kinds
of button. (#96229)
* iconcache.[ch] (meta_read_icons): use theme's fallback icons if a
window has no icon; use metacity's fallback icons only if the theme
does not provide any. (#11363)
* iconcache.[ch] (meta_invalidate_default_icons (new function)): clear
icon cache on windows using default icons, and update them. (#11363)
* main.c (main): added \n to error message.
* prefs.c (button_function_from_string): extend for 3 new button
types. (#96229)
* prefs.c (button_opposite_function (new function)): return a button
function's inverse (shade -> unshade, etc) (#96229)
* prefs.c (update_button_layout): allocate space for a button's
inverse, if it has one. (#96229)
* theme-parser.c (ParseState): add state for fallback icons (#11363)
* theme-parser.c (ParseInfo): add format_version; remove
menu_icon_* (#114305)
* theme-parser.c (parse_positive_integer): add lookup for integer
constants (#331356)
* theme-parser.c (parse_rounding (new function)): parse window
rounding amount (#113162)
* theme-parser.c (parse_alpha): don't set error if the number can't
be parsed since it'll already be set; change tolerance in comparison
from 1e6 to 1e-6
* theme-parser.c (parse_color (new function)): parse colour, including
possible constant lookup.
* theme-parser.c (parse_toplevel_element): allow defining of various
new kinds of constant; allow
hide_buttons (#121639) and more detailed rounding attributes on
<frame_geometry> (#113162); allow background and alpha attributes on
<frame_style>; (#151261) remove support for <menu_icon> except as
stub; (#114305) add support for loading stock images (#113465); add
support for <fallback>. (#11363))
* theme-parser.c (parse_draw_op_element): add from and to attribute
for arcs. (#121603)
* theme-parser.c (parse_style_element): add check for theme version
supporting a button function. (#96229)
* theme-parser.c (parse_style_set_element): add ability for shaded
windows to be resizable (#114304)
* theme-parser.c (meta_theme_load): add theme versioning routine.
* theme.c ( meta_frame_layout_get_borders): return rectangles for
the new 3*2 kinds of button, except where they're
inapplicable. (#96229)
* theme.c (meta_frame_layout_calc_geometry): don't format buttons on
windows with no buttons (#121639); strip the 3*2 new kinds of button
correctly (#96229); allow variable amounts of rounding (#113162).
* theme.c (meta_frame_style_new): set alpha to 255 by
default. (#151261)
* theme.c (meta_frame_style_unref): free colour spec if
allocated. (#151261)
* theme.c (meta_frame_style_validate): it's only an error not to
include a button if that button is valid in the current
theme. (#96229)
* theme.c (button_rect): return rectangles for the new 3*2 kinds
of button. (#96229)
* theme.c (meta_frame_style_set_unref): free differently resizable
shaded styles. (#114304)
* theme.c (get_style): look up differently resizable styles
for shaded windows. (#114304)
* theme.c (free_menu_ops (removed function), get_menu_icon
(removed function), meta_theme_draw_menu_icon (removed function),
meta_menu_icon_type_from_string (removed function),
meta_menu_icon_type_to_string (removed function),
meta_theme_free, meta_theme_validate): removed menu icon code. (#114305)
* theme.c (meta_theme_load_image): add size_of_theme_icons
parameter. (#113465)
* theme.c (meta_theme_define_color_constant (new function),
meta_theme_lookup_color_constant (new function)): allow
definition of colour constants. (#129747)
* theme.c (meta_button_type_from_string, meta_button_type_to_string):
add the 3*2 new kinds of button. (#96229)
* theme.c (meta_theme_earliest_version_with_button (new function)):
return the theme version each button was introduced in. (#96229)
* theme.h ( MetaFrameLayout): add "hide_buttons" flag (#121639) and
corner radiuses. (#113162)
* theme.h (MetaFrameGeometry): add rectangles for the 3*2 new
buttons. (#96229)
* theme.h (MetaButtonType): the 3*2 new buttons. (#96229)
* theme.h (MetaFrameStyle): add window_background_color and
window_background_alpha so that we can specify background on a
<frame_style>. (#151261)
* theme.h (MetaFrameStyleSet): shaded_styles gets resize
dimension. (#114304)
* theme.h (MetaTheme): added format_version, color_constants
hash, (#129747) fallback_icon and fallback_mini_icon, (#11363)
and removed menu_icons. (#114305)
* theme.h (META_THEME_ALLOWS (new macro)): return whether a theme
supports a given feature. Also, several macros representing
new features in v2.
* ui.c (meta_ui_set_current_theme)): also invalidate default
icons. (#11363)
* window.[ch] (meta_window_update_icon_now)): became
non-static. (#11363)
2006-10-07 12:56:47 -04:00
|
|
|
MetaFrameGeometry *fgeom,
|
|
|
|
MetaTheme *theme);
|
2002-01-18 22:50:03 -05:00
|
|
|
|
2002-02-06 22:07:56 -05:00
|
|
|
gboolean meta_frame_layout_validate (const MetaFrameLayout *layout,
|
|
|
|
GError **error);
|
|
|
|
|
Merge compositor branch.
2007-12-18 Iain Holmes <iain@gnome.org>
* configure.in, src/theme.c, src/display.c,
src/theme.h, src/display.h, src/theme-parser.c,
src/compositor.c, src/c-screen.c, src/compositor.h,
src/c-screen.h, src/ui.c, src/screen.c, src/ui.h,
src/screen.h, src/c-window.c, src/c-window.h,
src/theme-viewer.c, src/Makefile.am: Merge compositor branch.
svn path=/trunk/; revision=3483
2007-12-18 22:49:50 -05:00
|
|
|
gboolean meta_parse_position_expression (MetaDrawSpec *spec,
|
2002-02-02 00:09:19 -05:00
|
|
|
const MetaPositionExprEnv *env,
|
|
|
|
int *x_return,
|
|
|
|
int *y_return,
|
|
|
|
GError **err);
|
Merge compositor branch.
2007-12-18 Iain Holmes <iain@gnome.org>
* configure.in, src/theme.c, src/display.c,
src/theme.h, src/display.h, src/theme-parser.c,
src/compositor.c, src/c-screen.c, src/compositor.h,
src/c-screen.h, src/ui.c, src/screen.c, src/ui.h,
src/screen.h, src/c-window.c, src/c-window.h,
src/theme-viewer.c, src/Makefile.am: Merge compositor branch.
svn path=/trunk/; revision=3483
2007-12-18 22:49:50 -05:00
|
|
|
gboolean meta_parse_size_expression (MetaDrawSpec *spec,
|
2002-02-02 00:09:19 -05:00
|
|
|
const MetaPositionExprEnv *env,
|
|
|
|
int *val_return,
|
|
|
|
GError **err);
|
2002-01-19 18:59:11 -05:00
|
|
|
|
Merge compositor branch.
2007-12-18 Iain Holmes <iain@gnome.org>
* configure.in, src/theme.c, src/display.c,
src/theme.h, src/display.h, src/theme-parser.c,
src/compositor.c, src/c-screen.c, src/compositor.h,
src/c-screen.h, src/ui.c, src/screen.c, src/ui.h,
src/screen.h, src/c-window.c, src/c-window.h,
src/theme-viewer.c, src/Makefile.am: Merge compositor branch.
svn path=/trunk/; revision=3483
2007-12-18 22:49:50 -05:00
|
|
|
MetaDrawSpec* meta_draw_spec_new (MetaTheme *theme,
|
|
|
|
const char *expr,
|
|
|
|
GError **error);
|
|
|
|
void meta_draw_spec_free (MetaDrawSpec *spec);
|
|
|
|
|
2002-01-28 02:30:44 -05:00
|
|
|
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,
|
|
|
|
GtkStateType state);
|
|
|
|
void meta_color_spec_free (MetaColorSpec *spec);
|
|
|
|
void meta_color_spec_render (MetaColorSpec *spec,
|
|
|
|
GtkWidget *widget,
|
|
|
|
GdkColor *color);
|
|
|
|
|
2002-01-08 02:23:35 -05:00
|
|
|
|
2002-02-02 00:09:19 -05:00
|
|
|
MetaDrawOp* meta_draw_op_new (MetaDrawType type);
|
|
|
|
void meta_draw_op_free (MetaDrawOp *op);
|
|
|
|
void meta_draw_op_draw (const MetaDrawOp *op,
|
|
|
|
GtkWidget *widget,
|
|
|
|
GdkDrawable *drawable,
|
|
|
|
const GdkRectangle *clip,
|
2002-02-06 22:07:56 -05:00
|
|
|
const MetaDrawInfo *info,
|
2002-02-02 00:09:19 -05:00
|
|
|
/* logical region being drawn */
|
2006-04-18 13:18:53 -04:00
|
|
|
MetaRectangle logical_region);
|
2002-02-02 00:09:19 -05:00
|
|
|
|
|
|
|
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,
|
2006-04-18 13:18:53 -04:00
|
|
|
const MetaDrawInfo *info,
|
|
|
|
MetaRectangle rect);
|
2002-02-02 00:09:19 -05:00
|
|
|
void meta_draw_op_list_append (MetaDrawOpList *op_list,
|
|
|
|
MetaDrawOp *op);
|
2002-02-06 22:07:56 -05:00
|
|
|
gboolean meta_draw_op_list_validate (MetaDrawOpList *op_list,
|
|
|
|
GError **error);
|
|
|
|
gboolean meta_draw_op_list_contains (MetaDrawOpList *op_list,
|
|
|
|
MetaDrawOpList *child);
|
2002-01-27 21:09:12 -05:00
|
|
|
|
2002-01-08 02:23:35 -05:00
|
|
|
MetaGradientSpec* meta_gradient_spec_new (MetaGradientType type);
|
|
|
|
void meta_gradient_spec_free (MetaGradientSpec *desc);
|
|
|
|
GdkPixbuf* meta_gradient_spec_render (const MetaGradientSpec *desc,
|
|
|
|
GtkWidget *widget,
|
|
|
|
int width,
|
|
|
|
int height);
|
2002-02-06 22:07:56 -05:00
|
|
|
gboolean meta_gradient_spec_validate (MetaGradientSpec *spec,
|
|
|
|
GError **error);
|
2002-01-08 02:23:35 -05:00
|
|
|
|
2002-05-31 17:18:11 -04:00
|
|
|
MetaAlphaGradientSpec* meta_alpha_gradient_spec_new (MetaGradientType type,
|
|
|
|
int n_alphas);
|
|
|
|
void meta_alpha_gradient_spec_free (MetaAlphaGradientSpec *spec);
|
|
|
|
|
2001-05-31 12:18:40 -04:00
|
|
|
|
2002-01-27 21:09:12 -05:00
|
|
|
MetaFrameStyle* meta_frame_style_new (MetaFrameStyle *parent);
|
2002-01-19 18:59:11 -05:00
|
|
|
void meta_frame_style_ref (MetaFrameStyle *style);
|
|
|
|
void meta_frame_style_unref (MetaFrameStyle *style);
|
|
|
|
|
2002-02-06 22:07:56 -05:00
|
|
|
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);
|
|
|
|
|
|
|
|
|
|
|
|
gboolean meta_frame_style_validate (MetaFrameStyle *style,
|
Added "above" to the list of flags a frame can have, so that we know when
* common.h: Added "above" to the list of flags a frame can have, so
that we know when to mark it as always on top. Added six grab ops,
one to do and one to undo each of the three new titlebar buttons
(shade, above, stick). Added six new button functions, similarly.
(#96229)
* frame.c (meta_frame_get_flags): If a frame has the WM_STATE_ABOVE X
attribute, set META_FRAME_ABOVE in its flags.
* frames.c (meta_frames_apply_shapes): Allow variable amounts of
rounding. (#113162)
* frames.c (show_tip_now, meta_frames_paint_to_drawable, control_rect,
get_control): extend handling of existing buttons to the
3*2 new kinds of button. (#96229)
* frames.c (meta_frames_button_press_event): translate clicks on the 3*2
new kinds of button to the new grab ops. (#96229)
* frames.c (meta_frames_button_release_event): implement the various
actions for the 3*2 new kinds of button. (#96229)
* frames.c (meta_frames_update_prelit_control,
meta_frames_motion_notify_event): extend existing motion
notifications for buttons to the 3*2 new kinds of button. (#96229)
* frames.c (meta_frames_set_window_background): handle specified
background colours and alpha transparency. (#151261)
* frames.h (MetaFrameControl): New control types for the 3*2 new kinds
of button. (#96229)
* iconcache.[ch] (meta_read_icons): use theme's fallback icons if a
window has no icon; use metacity's fallback icons only if the theme
does not provide any. (#11363)
* iconcache.[ch] (meta_invalidate_default_icons (new function)): clear
icon cache on windows using default icons, and update them. (#11363)
* main.c (main): added \n to error message.
* prefs.c (button_function_from_string): extend for 3 new button
types. (#96229)
* prefs.c (button_opposite_function (new function)): return a button
function's inverse (shade -> unshade, etc) (#96229)
* prefs.c (update_button_layout): allocate space for a button's
inverse, if it has one. (#96229)
* theme-parser.c (ParseState): add state for fallback icons (#11363)
* theme-parser.c (ParseInfo): add format_version; remove
menu_icon_* (#114305)
* theme-parser.c (parse_positive_integer): add lookup for integer
constants (#331356)
* theme-parser.c (parse_rounding (new function)): parse window
rounding amount (#113162)
* theme-parser.c (parse_alpha): don't set error if the number can't
be parsed since it'll already be set; change tolerance in comparison
from 1e6 to 1e-6
* theme-parser.c (parse_color (new function)): parse colour, including
possible constant lookup.
* theme-parser.c (parse_toplevel_element): allow defining of various
new kinds of constant; allow
hide_buttons (#121639) and more detailed rounding attributes on
<frame_geometry> (#113162); allow background and alpha attributes on
<frame_style>; (#151261) remove support for <menu_icon> except as
stub; (#114305) add support for loading stock images (#113465); add
support for <fallback>. (#11363))
* theme-parser.c (parse_draw_op_element): add from and to attribute
for arcs. (#121603)
* theme-parser.c (parse_style_element): add check for theme version
supporting a button function. (#96229)
* theme-parser.c (parse_style_set_element): add ability for shaded
windows to be resizable (#114304)
* theme-parser.c (meta_theme_load): add theme versioning routine.
* theme.c ( meta_frame_layout_get_borders): return rectangles for
the new 3*2 kinds of button, except where they're
inapplicable. (#96229)
* theme.c (meta_frame_layout_calc_geometry): don't format buttons on
windows with no buttons (#121639); strip the 3*2 new kinds of button
correctly (#96229); allow variable amounts of rounding (#113162).
* theme.c (meta_frame_style_new): set alpha to 255 by
default. (#151261)
* theme.c (meta_frame_style_unref): free colour spec if
allocated. (#151261)
* theme.c (meta_frame_style_validate): it's only an error not to
include a button if that button is valid in the current
theme. (#96229)
* theme.c (button_rect): return rectangles for the new 3*2 kinds
of button. (#96229)
* theme.c (meta_frame_style_set_unref): free differently resizable
shaded styles. (#114304)
* theme.c (get_style): look up differently resizable styles
for shaded windows. (#114304)
* theme.c (free_menu_ops (removed function), get_menu_icon
(removed function), meta_theme_draw_menu_icon (removed function),
meta_menu_icon_type_from_string (removed function),
meta_menu_icon_type_to_string (removed function),
meta_theme_free, meta_theme_validate): removed menu icon code. (#114305)
* theme.c (meta_theme_load_image): add size_of_theme_icons
parameter. (#113465)
* theme.c (meta_theme_define_color_constant (new function),
meta_theme_lookup_color_constant (new function)): allow
definition of colour constants. (#129747)
* theme.c (meta_button_type_from_string, meta_button_type_to_string):
add the 3*2 new kinds of button. (#96229)
* theme.c (meta_theme_earliest_version_with_button (new function)):
return the theme version each button was introduced in. (#96229)
* theme.h ( MetaFrameLayout): add "hide_buttons" flag (#121639) and
corner radiuses. (#113162)
* theme.h (MetaFrameGeometry): add rectangles for the 3*2 new
buttons. (#96229)
* theme.h (MetaButtonType): the 3*2 new buttons. (#96229)
* theme.h (MetaFrameStyle): add window_background_color and
window_background_alpha so that we can specify background on a
<frame_style>. (#151261)
* theme.h (MetaFrameStyleSet): shaded_styles gets resize
dimension. (#114304)
* theme.h (MetaTheme): added format_version, color_constants
hash, (#129747) fallback_icon and fallback_mini_icon, (#11363)
and removed menu_icons. (#114305)
* theme.h (META_THEME_ALLOWS (new macro)): return whether a theme
supports a given feature. Also, several macros representing
new features in v2.
* ui.c (meta_ui_set_current_theme)): also invalidate default
icons. (#11363)
* window.[ch] (meta_window_update_icon_now)): became
non-static. (#11363)
2006-10-07 12:56:47 -04:00
|
|
|
guint current_theme_version,
|
2002-02-06 22:07:56 -05:00
|
|
|
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,
|
Added "above" to the list of flags a frame can have, so that we know when
* common.h: Added "above" to the list of flags a frame can have, so
that we know when to mark it as always on top. Added six grab ops,
one to do and one to undo each of the three new titlebar buttons
(shade, above, stick). Added six new button functions, similarly.
(#96229)
* frame.c (meta_frame_get_flags): If a frame has the WM_STATE_ABOVE X
attribute, set META_FRAME_ABOVE in its flags.
* frames.c (meta_frames_apply_shapes): Allow variable amounts of
rounding. (#113162)
* frames.c (show_tip_now, meta_frames_paint_to_drawable, control_rect,
get_control): extend handling of existing buttons to the
3*2 new kinds of button. (#96229)
* frames.c (meta_frames_button_press_event): translate clicks on the 3*2
new kinds of button to the new grab ops. (#96229)
* frames.c (meta_frames_button_release_event): implement the various
actions for the 3*2 new kinds of button. (#96229)
* frames.c (meta_frames_update_prelit_control,
meta_frames_motion_notify_event): extend existing motion
notifications for buttons to the 3*2 new kinds of button. (#96229)
* frames.c (meta_frames_set_window_background): handle specified
background colours and alpha transparency. (#151261)
* frames.h (MetaFrameControl): New control types for the 3*2 new kinds
of button. (#96229)
* iconcache.[ch] (meta_read_icons): use theme's fallback icons if a
window has no icon; use metacity's fallback icons only if the theme
does not provide any. (#11363)
* iconcache.[ch] (meta_invalidate_default_icons (new function)): clear
icon cache on windows using default icons, and update them. (#11363)
* main.c (main): added \n to error message.
* prefs.c (button_function_from_string): extend for 3 new button
types. (#96229)
* prefs.c (button_opposite_function (new function)): return a button
function's inverse (shade -> unshade, etc) (#96229)
* prefs.c (update_button_layout): allocate space for a button's
inverse, if it has one. (#96229)
* theme-parser.c (ParseState): add state for fallback icons (#11363)
* theme-parser.c (ParseInfo): add format_version; remove
menu_icon_* (#114305)
* theme-parser.c (parse_positive_integer): add lookup for integer
constants (#331356)
* theme-parser.c (parse_rounding (new function)): parse window
rounding amount (#113162)
* theme-parser.c (parse_alpha): don't set error if the number can't
be parsed since it'll already be set; change tolerance in comparison
from 1e6 to 1e-6
* theme-parser.c (parse_color (new function)): parse colour, including
possible constant lookup.
* theme-parser.c (parse_toplevel_element): allow defining of various
new kinds of constant; allow
hide_buttons (#121639) and more detailed rounding attributes on
<frame_geometry> (#113162); allow background and alpha attributes on
<frame_style>; (#151261) remove support for <menu_icon> except as
stub; (#114305) add support for loading stock images (#113465); add
support for <fallback>. (#11363))
* theme-parser.c (parse_draw_op_element): add from and to attribute
for arcs. (#121603)
* theme-parser.c (parse_style_element): add check for theme version
supporting a button function. (#96229)
* theme-parser.c (parse_style_set_element): add ability for shaded
windows to be resizable (#114304)
* theme-parser.c (meta_theme_load): add theme versioning routine.
* theme.c ( meta_frame_layout_get_borders): return rectangles for
the new 3*2 kinds of button, except where they're
inapplicable. (#96229)
* theme.c (meta_frame_layout_calc_geometry): don't format buttons on
windows with no buttons (#121639); strip the 3*2 new kinds of button
correctly (#96229); allow variable amounts of rounding (#113162).
* theme.c (meta_frame_style_new): set alpha to 255 by
default. (#151261)
* theme.c (meta_frame_style_unref): free colour spec if
allocated. (#151261)
* theme.c (meta_frame_style_validate): it's only an error not to
include a button if that button is valid in the current
theme. (#96229)
* theme.c (button_rect): return rectangles for the new 3*2 kinds
of button. (#96229)
* theme.c (meta_frame_style_set_unref): free differently resizable
shaded styles. (#114304)
* theme.c (get_style): look up differently resizable styles
for shaded windows. (#114304)
* theme.c (free_menu_ops (removed function), get_menu_icon
(removed function), meta_theme_draw_menu_icon (removed function),
meta_menu_icon_type_from_string (removed function),
meta_menu_icon_type_to_string (removed function),
meta_theme_free, meta_theme_validate): removed menu icon code. (#114305)
* theme.c (meta_theme_load_image): add size_of_theme_icons
parameter. (#113465)
* theme.c (meta_theme_define_color_constant (new function),
meta_theme_lookup_color_constant (new function)): allow
definition of colour constants. (#129747)
* theme.c (meta_button_type_from_string, meta_button_type_to_string):
add the 3*2 new kinds of button. (#96229)
* theme.c (meta_theme_earliest_version_with_button (new function)):
return the theme version each button was introduced in. (#96229)
* theme.h ( MetaFrameLayout): add "hide_buttons" flag (#121639) and
corner radiuses. (#113162)
* theme.h (MetaFrameGeometry): add rectangles for the 3*2 new
buttons. (#96229)
* theme.h (MetaButtonType): the 3*2 new buttons. (#96229)
* theme.h (MetaFrameStyle): add window_background_color and
window_background_alpha so that we can specify background on a
<frame_style>. (#151261)
* theme.h (MetaFrameStyleSet): shaded_styles gets resize
dimension. (#114304)
* theme.h (MetaTheme): added format_version, color_constants
hash, (#129747) fallback_icon and fallback_mini_icon, (#11363)
and removed menu_icons. (#114305)
* theme.h (META_THEME_ALLOWS (new macro)): return whether a theme
supports a given feature. Also, several macros representing
new features in v2.
* ui.c (meta_ui_set_current_theme)): also invalidate default
icons. (#11363)
* window.[ch] (meta_window_update_icon_now)): became
non-static. (#11363)
2006-10-07 12:56:47 -04:00
|
|
|
guint size_of_theme_icons,
|
2002-02-06 22:07:56 -05:00
|
|
|
GError **error);
|
|
|
|
|
2002-02-14 21:32:48 -05:00
|
|
|
MetaFrameStyle* meta_theme_get_frame_style (MetaTheme *theme,
|
|
|
|
MetaFrameType type,
|
|
|
|
MetaFrameFlags flags);
|
|
|
|
|
2002-02-09 12:02:38 -05:00
|
|
|
double meta_theme_get_title_scale (MetaTheme *theme,
|
|
|
|
MetaFrameType type,
|
|
|
|
MetaFrameFlags flags);
|
|
|
|
|
2002-10-03 22:28:57 -04:00
|
|
|
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);
|
2002-02-06 22:07:56 -05:00
|
|
|
|
|
|
|
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);
|
2002-10-03 22:28:57 -04:00
|
|
|
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);
|
2002-02-06 22:07:56 -05:00
|
|
|
|
|
|
|
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);
|
|
|
|
|
Added "above" to the list of flags a frame can have, so that we know when
* common.h: Added "above" to the list of flags a frame can have, so
that we know when to mark it as always on top. Added six grab ops,
one to do and one to undo each of the three new titlebar buttons
(shade, above, stick). Added six new button functions, similarly.
(#96229)
* frame.c (meta_frame_get_flags): If a frame has the WM_STATE_ABOVE X
attribute, set META_FRAME_ABOVE in its flags.
* frames.c (meta_frames_apply_shapes): Allow variable amounts of
rounding. (#113162)
* frames.c (show_tip_now, meta_frames_paint_to_drawable, control_rect,
get_control): extend handling of existing buttons to the
3*2 new kinds of button. (#96229)
* frames.c (meta_frames_button_press_event): translate clicks on the 3*2
new kinds of button to the new grab ops. (#96229)
* frames.c (meta_frames_button_release_event): implement the various
actions for the 3*2 new kinds of button. (#96229)
* frames.c (meta_frames_update_prelit_control,
meta_frames_motion_notify_event): extend existing motion
notifications for buttons to the 3*2 new kinds of button. (#96229)
* frames.c (meta_frames_set_window_background): handle specified
background colours and alpha transparency. (#151261)
* frames.h (MetaFrameControl): New control types for the 3*2 new kinds
of button. (#96229)
* iconcache.[ch] (meta_read_icons): use theme's fallback icons if a
window has no icon; use metacity's fallback icons only if the theme
does not provide any. (#11363)
* iconcache.[ch] (meta_invalidate_default_icons (new function)): clear
icon cache on windows using default icons, and update them. (#11363)
* main.c (main): added \n to error message.
* prefs.c (button_function_from_string): extend for 3 new button
types. (#96229)
* prefs.c (button_opposite_function (new function)): return a button
function's inverse (shade -> unshade, etc) (#96229)
* prefs.c (update_button_layout): allocate space for a button's
inverse, if it has one. (#96229)
* theme-parser.c (ParseState): add state for fallback icons (#11363)
* theme-parser.c (ParseInfo): add format_version; remove
menu_icon_* (#114305)
* theme-parser.c (parse_positive_integer): add lookup for integer
constants (#331356)
* theme-parser.c (parse_rounding (new function)): parse window
rounding amount (#113162)
* theme-parser.c (parse_alpha): don't set error if the number can't
be parsed since it'll already be set; change tolerance in comparison
from 1e6 to 1e-6
* theme-parser.c (parse_color (new function)): parse colour, including
possible constant lookup.
* theme-parser.c (parse_toplevel_element): allow defining of various
new kinds of constant; allow
hide_buttons (#121639) and more detailed rounding attributes on
<frame_geometry> (#113162); allow background and alpha attributes on
<frame_style>; (#151261) remove support for <menu_icon> except as
stub; (#114305) add support for loading stock images (#113465); add
support for <fallback>. (#11363))
* theme-parser.c (parse_draw_op_element): add from and to attribute
for arcs. (#121603)
* theme-parser.c (parse_style_element): add check for theme version
supporting a button function. (#96229)
* theme-parser.c (parse_style_set_element): add ability for shaded
windows to be resizable (#114304)
* theme-parser.c (meta_theme_load): add theme versioning routine.
* theme.c ( meta_frame_layout_get_borders): return rectangles for
the new 3*2 kinds of button, except where they're
inapplicable. (#96229)
* theme.c (meta_frame_layout_calc_geometry): don't format buttons on
windows with no buttons (#121639); strip the 3*2 new kinds of button
correctly (#96229); allow variable amounts of rounding (#113162).
* theme.c (meta_frame_style_new): set alpha to 255 by
default. (#151261)
* theme.c (meta_frame_style_unref): free colour spec if
allocated. (#151261)
* theme.c (meta_frame_style_validate): it's only an error not to
include a button if that button is valid in the current
theme. (#96229)
* theme.c (button_rect): return rectangles for the new 3*2 kinds
of button. (#96229)
* theme.c (meta_frame_style_set_unref): free differently resizable
shaded styles. (#114304)
* theme.c (get_style): look up differently resizable styles
for shaded windows. (#114304)
* theme.c (free_menu_ops (removed function), get_menu_icon
(removed function), meta_theme_draw_menu_icon (removed function),
meta_menu_icon_type_from_string (removed function),
meta_menu_icon_type_to_string (removed function),
meta_theme_free, meta_theme_validate): removed menu icon code. (#114305)
* theme.c (meta_theme_load_image): add size_of_theme_icons
parameter. (#113465)
* theme.c (meta_theme_define_color_constant (new function),
meta_theme_lookup_color_constant (new function)): allow
definition of colour constants. (#129747)
* theme.c (meta_button_type_from_string, meta_button_type_to_string):
add the 3*2 new kinds of button. (#96229)
* theme.c (meta_theme_earliest_version_with_button (new function)):
return the theme version each button was introduced in. (#96229)
* theme.h ( MetaFrameLayout): add "hide_buttons" flag (#121639) and
corner radiuses. (#113162)
* theme.h (MetaFrameGeometry): add rectangles for the 3*2 new
buttons. (#96229)
* theme.h (MetaButtonType): the 3*2 new buttons. (#96229)
* theme.h (MetaFrameStyle): add window_background_color and
window_background_alpha so that we can specify background on a
<frame_style>. (#151261)
* theme.h (MetaFrameStyleSet): shaded_styles gets resize
dimension. (#114304)
* theme.h (MetaTheme): added format_version, color_constants
hash, (#129747) fallback_icon and fallback_mini_icon, (#11363)
and removed menu_icons. (#114305)
* theme.h (META_THEME_ALLOWS (new macro)): return whether a theme
supports a given feature. Also, several macros representing
new features in v2.
* ui.c (meta_ui_set_current_theme)): also invalidate default
icons. (#11363)
* window.[ch] (meta_window_update_icon_now)): became
non-static. (#11363)
2006-10-07 12:56:47 -04:00
|
|
|
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);
|
|
|
|
|
Merge compositor branch.
2007-12-18 Iain Holmes <iain@gnome.org>
* configure.in, src/theme.c, src/display.c,
src/theme.h, src/display.h, src/theme-parser.c,
src/compositor.c, src/c-screen.c, src/compositor.h,
src/c-screen.h, src/ui.c, src/screen.c, src/ui.h,
src/screen.h, src/c-window.c, src/c-window.h,
src/theme-viewer.c, src/Makefile.am: Merge compositor branch.
svn path=/trunk/; revision=3483
2007-12-18 22:49:50 -05:00
|
|
|
gboolean meta_theme_replace_constants (MetaTheme *theme,
|
|
|
|
PosToken *tokens,
|
|
|
|
int n_tokens,
|
|
|
|
GError **err);
|
2002-02-06 22:07:56 -05:00
|
|
|
|
|
|
|
/* random stuff */
|
|
|
|
|
2002-02-09 12:02:38 -05:00
|
|
|
PangoFontDescription* meta_gtk_widget_get_font_desc (GtkWidget *widget,
|
2002-05-23 22:55:54 -04:00
|
|
|
double scale,
|
|
|
|
const PangoFontDescription *override);
|
2004-01-10 12:16:07 -05:00
|
|
|
int meta_pango_font_desc_get_text_height (const PangoFontDescription *font_desc,
|
2002-02-09 12:02:38 -05:00
|
|
|
PangoContext *context);
|
|
|
|
|
2002-02-06 22:07:56 -05:00
|
|
|
|
|
|
|
/* Enum converters */
|
|
|
|
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);
|
Added "above" to the list of flags a frame can have, so that we know when
* common.h: Added "above" to the list of flags a frame can have, so
that we know when to mark it as always on top. Added six grab ops,
one to do and one to undo each of the three new titlebar buttons
(shade, above, stick). Added six new button functions, similarly.
(#96229)
* frame.c (meta_frame_get_flags): If a frame has the WM_STATE_ABOVE X
attribute, set META_FRAME_ABOVE in its flags.
* frames.c (meta_frames_apply_shapes): Allow variable amounts of
rounding. (#113162)
* frames.c (show_tip_now, meta_frames_paint_to_drawable, control_rect,
get_control): extend handling of existing buttons to the
3*2 new kinds of button. (#96229)
* frames.c (meta_frames_button_press_event): translate clicks on the 3*2
new kinds of button to the new grab ops. (#96229)
* frames.c (meta_frames_button_release_event): implement the various
actions for the 3*2 new kinds of button. (#96229)
* frames.c (meta_frames_update_prelit_control,
meta_frames_motion_notify_event): extend existing motion
notifications for buttons to the 3*2 new kinds of button. (#96229)
* frames.c (meta_frames_set_window_background): handle specified
background colours and alpha transparency. (#151261)
* frames.h (MetaFrameControl): New control types for the 3*2 new kinds
of button. (#96229)
* iconcache.[ch] (meta_read_icons): use theme's fallback icons if a
window has no icon; use metacity's fallback icons only if the theme
does not provide any. (#11363)
* iconcache.[ch] (meta_invalidate_default_icons (new function)): clear
icon cache on windows using default icons, and update them. (#11363)
* main.c (main): added \n to error message.
* prefs.c (button_function_from_string): extend for 3 new button
types. (#96229)
* prefs.c (button_opposite_function (new function)): return a button
function's inverse (shade -> unshade, etc) (#96229)
* prefs.c (update_button_layout): allocate space for a button's
inverse, if it has one. (#96229)
* theme-parser.c (ParseState): add state for fallback icons (#11363)
* theme-parser.c (ParseInfo): add format_version; remove
menu_icon_* (#114305)
* theme-parser.c (parse_positive_integer): add lookup for integer
constants (#331356)
* theme-parser.c (parse_rounding (new function)): parse window
rounding amount (#113162)
* theme-parser.c (parse_alpha): don't set error if the number can't
be parsed since it'll already be set; change tolerance in comparison
from 1e6 to 1e-6
* theme-parser.c (parse_color (new function)): parse colour, including
possible constant lookup.
* theme-parser.c (parse_toplevel_element): allow defining of various
new kinds of constant; allow
hide_buttons (#121639) and more detailed rounding attributes on
<frame_geometry> (#113162); allow background and alpha attributes on
<frame_style>; (#151261) remove support for <menu_icon> except as
stub; (#114305) add support for loading stock images (#113465); add
support for <fallback>. (#11363))
* theme-parser.c (parse_draw_op_element): add from and to attribute
for arcs. (#121603)
* theme-parser.c (parse_style_element): add check for theme version
supporting a button function. (#96229)
* theme-parser.c (parse_style_set_element): add ability for shaded
windows to be resizable (#114304)
* theme-parser.c (meta_theme_load): add theme versioning routine.
* theme.c ( meta_frame_layout_get_borders): return rectangles for
the new 3*2 kinds of button, except where they're
inapplicable. (#96229)
* theme.c (meta_frame_layout_calc_geometry): don't format buttons on
windows with no buttons (#121639); strip the 3*2 new kinds of button
correctly (#96229); allow variable amounts of rounding (#113162).
* theme.c (meta_frame_style_new): set alpha to 255 by
default. (#151261)
* theme.c (meta_frame_style_unref): free colour spec if
allocated. (#151261)
* theme.c (meta_frame_style_validate): it's only an error not to
include a button if that button is valid in the current
theme. (#96229)
* theme.c (button_rect): return rectangles for the new 3*2 kinds
of button. (#96229)
* theme.c (meta_frame_style_set_unref): free differently resizable
shaded styles. (#114304)
* theme.c (get_style): look up differently resizable styles
for shaded windows. (#114304)
* theme.c (free_menu_ops (removed function), get_menu_icon
(removed function), meta_theme_draw_menu_icon (removed function),
meta_menu_icon_type_from_string (removed function),
meta_menu_icon_type_to_string (removed function),
meta_theme_free, meta_theme_validate): removed menu icon code. (#114305)
* theme.c (meta_theme_load_image): add size_of_theme_icons
parameter. (#113465)
* theme.c (meta_theme_define_color_constant (new function),
meta_theme_lookup_color_constant (new function)): allow
definition of colour constants. (#129747)
* theme.c (meta_button_type_from_string, meta_button_type_to_string):
add the 3*2 new kinds of button. (#96229)
* theme.c (meta_theme_earliest_version_with_button (new function)):
return the theme version each button was introduced in. (#96229)
* theme.h ( MetaFrameLayout): add "hide_buttons" flag (#121639) and
corner radiuses. (#113162)
* theme.h (MetaFrameGeometry): add rectangles for the 3*2 new
buttons. (#96229)
* theme.h (MetaButtonType): the 3*2 new buttons. (#96229)
* theme.h (MetaFrameStyle): add window_background_color and
window_background_alpha so that we can specify background on a
<frame_style>. (#151261)
* theme.h (MetaFrameStyleSet): shaded_styles gets resize
dimension. (#114304)
* theme.h (MetaTheme): added format_version, color_constants
hash, (#129747) fallback_icon and fallback_mini_icon, (#11363)
and removed menu_icons. (#114305)
* theme.h (META_THEME_ALLOWS (new macro)): return whether a theme
supports a given feature. Also, several macros representing
new features in v2.
* ui.c (meta_ui_set_current_theme)): also invalidate default
icons. (#11363)
* window.[ch] (meta_window_update_icon_now)): became
non-static. (#11363)
2006-10-07 12:56:47 -04:00
|
|
|
MetaButtonType meta_button_type_from_string (const char *str,
|
|
|
|
MetaTheme *theme);
|
2002-02-06 22:07:56 -05:00
|
|
|
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);
|
2002-05-31 18:03:34 -04:00
|
|
|
MetaImageFillType meta_image_fill_type_from_string (const char *str);
|
|
|
|
const char* meta_image_fill_type_to_string (MetaImageFillType fill_type);
|
|
|
|
|
Added "above" to the list of flags a frame can have, so that we know when
* common.h: Added "above" to the list of flags a frame can have, so
that we know when to mark it as always on top. Added six grab ops,
one to do and one to undo each of the three new titlebar buttons
(shade, above, stick). Added six new button functions, similarly.
(#96229)
* frame.c (meta_frame_get_flags): If a frame has the WM_STATE_ABOVE X
attribute, set META_FRAME_ABOVE in its flags.
* frames.c (meta_frames_apply_shapes): Allow variable amounts of
rounding. (#113162)
* frames.c (show_tip_now, meta_frames_paint_to_drawable, control_rect,
get_control): extend handling of existing buttons to the
3*2 new kinds of button. (#96229)
* frames.c (meta_frames_button_press_event): translate clicks on the 3*2
new kinds of button to the new grab ops. (#96229)
* frames.c (meta_frames_button_release_event): implement the various
actions for the 3*2 new kinds of button. (#96229)
* frames.c (meta_frames_update_prelit_control,
meta_frames_motion_notify_event): extend existing motion
notifications for buttons to the 3*2 new kinds of button. (#96229)
* frames.c (meta_frames_set_window_background): handle specified
background colours and alpha transparency. (#151261)
* frames.h (MetaFrameControl): New control types for the 3*2 new kinds
of button. (#96229)
* iconcache.[ch] (meta_read_icons): use theme's fallback icons if a
window has no icon; use metacity's fallback icons only if the theme
does not provide any. (#11363)
* iconcache.[ch] (meta_invalidate_default_icons (new function)): clear
icon cache on windows using default icons, and update them. (#11363)
* main.c (main): added \n to error message.
* prefs.c (button_function_from_string): extend for 3 new button
types. (#96229)
* prefs.c (button_opposite_function (new function)): return a button
function's inverse (shade -> unshade, etc) (#96229)
* prefs.c (update_button_layout): allocate space for a button's
inverse, if it has one. (#96229)
* theme-parser.c (ParseState): add state for fallback icons (#11363)
* theme-parser.c (ParseInfo): add format_version; remove
menu_icon_* (#114305)
* theme-parser.c (parse_positive_integer): add lookup for integer
constants (#331356)
* theme-parser.c (parse_rounding (new function)): parse window
rounding amount (#113162)
* theme-parser.c (parse_alpha): don't set error if the number can't
be parsed since it'll already be set; change tolerance in comparison
from 1e6 to 1e-6
* theme-parser.c (parse_color (new function)): parse colour, including
possible constant lookup.
* theme-parser.c (parse_toplevel_element): allow defining of various
new kinds of constant; allow
hide_buttons (#121639) and more detailed rounding attributes on
<frame_geometry> (#113162); allow background and alpha attributes on
<frame_style>; (#151261) remove support for <menu_icon> except as
stub; (#114305) add support for loading stock images (#113465); add
support for <fallback>. (#11363))
* theme-parser.c (parse_draw_op_element): add from and to attribute
for arcs. (#121603)
* theme-parser.c (parse_style_element): add check for theme version
supporting a button function. (#96229)
* theme-parser.c (parse_style_set_element): add ability for shaded
windows to be resizable (#114304)
* theme-parser.c (meta_theme_load): add theme versioning routine.
* theme.c ( meta_frame_layout_get_borders): return rectangles for
the new 3*2 kinds of button, except where they're
inapplicable. (#96229)
* theme.c (meta_frame_layout_calc_geometry): don't format buttons on
windows with no buttons (#121639); strip the 3*2 new kinds of button
correctly (#96229); allow variable amounts of rounding (#113162).
* theme.c (meta_frame_style_new): set alpha to 255 by
default. (#151261)
* theme.c (meta_frame_style_unref): free colour spec if
allocated. (#151261)
* theme.c (meta_frame_style_validate): it's only an error not to
include a button if that button is valid in the current
theme. (#96229)
* theme.c (button_rect): return rectangles for the new 3*2 kinds
of button. (#96229)
* theme.c (meta_frame_style_set_unref): free differently resizable
shaded styles. (#114304)
* theme.c (get_style): look up differently resizable styles
for shaded windows. (#114304)
* theme.c (free_menu_ops (removed function), get_menu_icon
(removed function), meta_theme_draw_menu_icon (removed function),
meta_menu_icon_type_from_string (removed function),
meta_menu_icon_type_to_string (removed function),
meta_theme_free, meta_theme_validate): removed menu icon code. (#114305)
* theme.c (meta_theme_load_image): add size_of_theme_icons
parameter. (#113465)
* theme.c (meta_theme_define_color_constant (new function),
meta_theme_lookup_color_constant (new function)): allow
definition of colour constants. (#129747)
* theme.c (meta_button_type_from_string, meta_button_type_to_string):
add the 3*2 new kinds of button. (#96229)
* theme.c (meta_theme_earliest_version_with_button (new function)):
return the theme version each button was introduced in. (#96229)
* theme.h ( MetaFrameLayout): add "hide_buttons" flag (#121639) and
corner radiuses. (#113162)
* theme.h (MetaFrameGeometry): add rectangles for the 3*2 new
buttons. (#96229)
* theme.h (MetaButtonType): the 3*2 new buttons. (#96229)
* theme.h (MetaFrameStyle): add window_background_color and
window_background_alpha so that we can specify background on a
<frame_style>. (#151261)
* theme.h (MetaFrameStyleSet): shaded_styles gets resize
dimension. (#114304)
* theme.h (MetaTheme): added format_version, color_constants
hash, (#129747) fallback_icon and fallback_mini_icon, (#11363)
and removed menu_icons. (#114305)
* theme.h (META_THEME_ALLOWS (new macro)): return whether a theme
supports a given feature. Also, several macros representing
new features in v2.
* ui.c (meta_ui_set_current_theme)): also invalidate default
icons. (#11363)
* window.[ch] (meta_window_update_icon_now)): became
non-static. (#11363)
2006-10-07 12:56:47 -04:00
|
|
|
guint meta_theme_earliest_version_with_button (MetaButtonType type);
|
|
|
|
|
Merge compositor branch.
2007-12-18 Iain Holmes <iain@gnome.org>
* configure.in, src/theme.c, src/display.c,
src/theme.h, src/display.h, src/theme-parser.c,
src/compositor.c, src/c-screen.c, src/compositor.h,
src/c-screen.h, src/ui.c, src/screen.c, src/ui.h,
src/screen.h, src/c-window.c, src/c-window.h,
src/theme-viewer.c, src/Makefile.am: Merge compositor branch.
svn path=/trunk/; revision=3483
2007-12-18 22:49:50 -05:00
|
|
|
|
Added "above" to the list of flags a frame can have, so that we know when
* common.h: Added "above" to the list of flags a frame can have, so
that we know when to mark it as always on top. Added six grab ops,
one to do and one to undo each of the three new titlebar buttons
(shade, above, stick). Added six new button functions, similarly.
(#96229)
* frame.c (meta_frame_get_flags): If a frame has the WM_STATE_ABOVE X
attribute, set META_FRAME_ABOVE in its flags.
* frames.c (meta_frames_apply_shapes): Allow variable amounts of
rounding. (#113162)
* frames.c (show_tip_now, meta_frames_paint_to_drawable, control_rect,
get_control): extend handling of existing buttons to the
3*2 new kinds of button. (#96229)
* frames.c (meta_frames_button_press_event): translate clicks on the 3*2
new kinds of button to the new grab ops. (#96229)
* frames.c (meta_frames_button_release_event): implement the various
actions for the 3*2 new kinds of button. (#96229)
* frames.c (meta_frames_update_prelit_control,
meta_frames_motion_notify_event): extend existing motion
notifications for buttons to the 3*2 new kinds of button. (#96229)
* frames.c (meta_frames_set_window_background): handle specified
background colours and alpha transparency. (#151261)
* frames.h (MetaFrameControl): New control types for the 3*2 new kinds
of button. (#96229)
* iconcache.[ch] (meta_read_icons): use theme's fallback icons if a
window has no icon; use metacity's fallback icons only if the theme
does not provide any. (#11363)
* iconcache.[ch] (meta_invalidate_default_icons (new function)): clear
icon cache on windows using default icons, and update them. (#11363)
* main.c (main): added \n to error message.
* prefs.c (button_function_from_string): extend for 3 new button
types. (#96229)
* prefs.c (button_opposite_function (new function)): return a button
function's inverse (shade -> unshade, etc) (#96229)
* prefs.c (update_button_layout): allocate space for a button's
inverse, if it has one. (#96229)
* theme-parser.c (ParseState): add state for fallback icons (#11363)
* theme-parser.c (ParseInfo): add format_version; remove
menu_icon_* (#114305)
* theme-parser.c (parse_positive_integer): add lookup for integer
constants (#331356)
* theme-parser.c (parse_rounding (new function)): parse window
rounding amount (#113162)
* theme-parser.c (parse_alpha): don't set error if the number can't
be parsed since it'll already be set; change tolerance in comparison
from 1e6 to 1e-6
* theme-parser.c (parse_color (new function)): parse colour, including
possible constant lookup.
* theme-parser.c (parse_toplevel_element): allow defining of various
new kinds of constant; allow
hide_buttons (#121639) and more detailed rounding attributes on
<frame_geometry> (#113162); allow background and alpha attributes on
<frame_style>; (#151261) remove support for <menu_icon> except as
stub; (#114305) add support for loading stock images (#113465); add
support for <fallback>. (#11363))
* theme-parser.c (parse_draw_op_element): add from and to attribute
for arcs. (#121603)
* theme-parser.c (parse_style_element): add check for theme version
supporting a button function. (#96229)
* theme-parser.c (parse_style_set_element): add ability for shaded
windows to be resizable (#114304)
* theme-parser.c (meta_theme_load): add theme versioning routine.
* theme.c ( meta_frame_layout_get_borders): return rectangles for
the new 3*2 kinds of button, except where they're
inapplicable. (#96229)
* theme.c (meta_frame_layout_calc_geometry): don't format buttons on
windows with no buttons (#121639); strip the 3*2 new kinds of button
correctly (#96229); allow variable amounts of rounding (#113162).
* theme.c (meta_frame_style_new): set alpha to 255 by
default. (#151261)
* theme.c (meta_frame_style_unref): free colour spec if
allocated. (#151261)
* theme.c (meta_frame_style_validate): it's only an error not to
include a button if that button is valid in the current
theme. (#96229)
* theme.c (button_rect): return rectangles for the new 3*2 kinds
of button. (#96229)
* theme.c (meta_frame_style_set_unref): free differently resizable
shaded styles. (#114304)
* theme.c (get_style): look up differently resizable styles
for shaded windows. (#114304)
* theme.c (free_menu_ops (removed function), get_menu_icon
(removed function), meta_theme_draw_menu_icon (removed function),
meta_menu_icon_type_from_string (removed function),
meta_menu_icon_type_to_string (removed function),
meta_theme_free, meta_theme_validate): removed menu icon code. (#114305)
* theme.c (meta_theme_load_image): add size_of_theme_icons
parameter. (#113465)
* theme.c (meta_theme_define_color_constant (new function),
meta_theme_lookup_color_constant (new function)): allow
definition of colour constants. (#129747)
* theme.c (meta_button_type_from_string, meta_button_type_to_string):
add the 3*2 new kinds of button. (#96229)
* theme.c (meta_theme_earliest_version_with_button (new function)):
return the theme version each button was introduced in. (#96229)
* theme.h ( MetaFrameLayout): add "hide_buttons" flag (#121639) and
corner radiuses. (#113162)
* theme.h (MetaFrameGeometry): add rectangles for the 3*2 new
buttons. (#96229)
* theme.h (MetaButtonType): the 3*2 new buttons. (#96229)
* theme.h (MetaFrameStyle): add window_background_color and
window_background_alpha so that we can specify background on a
<frame_style>. (#151261)
* theme.h (MetaFrameStyleSet): shaded_styles gets resize
dimension. (#114304)
* theme.h (MetaTheme): added format_version, color_constants
hash, (#129747) fallback_icon and fallback_mini_icon, (#11363)
and removed menu_icons. (#114305)
* theme.h (META_THEME_ALLOWS (new macro)): return whether a theme
supports a given feature. Also, several macros representing
new features in v2.
* ui.c (meta_ui_set_current_theme)): also invalidate default
icons. (#11363)
* window.[ch] (meta_window_update_icon_now)): became
non-static. (#11363)
2006-10-07 12:56:47 -04:00
|
|
|
#define META_THEME_ALLOWS(theme, feature) (theme->format_version >= feature)
|
|
|
|
|
|
|
|
/* What version of the theme file format were various features introduced in? */
|
|
|
|
#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
|
2002-01-28 02:30:44 -05:00
|
|
|
|
2001-05-31 12:18:40 -04:00
|
|
|
#endif
|