add DTD for themes from Ross Burton

2002-11-20  Havoc Pennington  <hp@pobox.com>

	* doc/metacity-theme.dtd: add DTD for themes from Ross Burton

	* doc/Makefile.am: doc subdir

	* doc/theme-format.txt: move to doc subdir
This commit is contained in:
Havoc Pennington 2002-11-20 04:57:25 +00:00 committed by Havoc Pennington
parent b8788e9c0d
commit e9999aa93c
5 changed files with 284 additions and 1 deletions

View File

@ -1,3 +1,11 @@
2002-11-20 Havoc Pennington <hp@pobox.com>
* doc/metacity-theme.dtd: add DTD for themes from Ross Burton
* doc/Makefile.am: doc subdir
* doc/theme-format.txt: move to doc subdir
2002-11-19 Havoc Pennington <hp@pobox.com>
Should really fix #98303

View File

@ -1,5 +1,5 @@
SUBDIRS=src po
SUBDIRS=src po doc
EXTRA_DIST=HACKING theme-format.txt metacity.spec.in metacity.spec \
intltool-extract.in intltool-merge.in intltool-update.in

2
doc/Makefile.am Normal file
View File

@ -0,0 +1,2 @@
EXTRA_DIST=theme-format.txt metacity-theme.dtd

273
doc/metacity-theme.dtd Normal file
View File

@ -0,0 +1,273 @@
<!--
DTD for Metacity themes, as of Metacity 2.4.1
Author: Ross Burton <ross@burtonini.com>
Copyright (C) 2002 Ross Burton
Licensed under the GPL, version 2
-->
<!-- Top-level element -->
<!ELEMENT metacity_theme (info,(window|frame_style_set|frame_style|frame_geometry|constant|draw_ops|menu_icon)+)>
<!-- Theme metadata -->
<!ELEMENT info (name?|author?|copyright?|date?|description?)*>
<!ELEMENT name (#PCDATA)>
<!ELEMENT author (#PCDATA)>
<!ELEMENT copyright (#PCDATA)>
<!ELEMENT date (#PCDATA)>
<!ELEMENT description (#PCDATA)>
<!ENTITY % xyrequired "
x CDATA #REQUIRED
y CDATA #REQUIRED
">
<!ENTITY % xyimplied "
x CDATA #IMPLIED
y CDATA #IMPLIED
">
<!ENTITY % widthheightrequired "
width CDATA #REQUIRED
height CDATA #REQUIRED
">
<!ENTITY % widthheightimplied "
width CDATA #IMPLIED
height CDATA #IMPLIED
">
<!ENTITY % boolean "(true|false)">
<!ENTITY % piece_positions "
(entire_background|titlebar|titlebar_middle|left_titlebar_edge|right_titlebar_edge|top_titlebar_edge|bottom_titlebar_edge|title|left_edge|right_edge|bottom_edge|overlay)
">
<!ENTITY % gtk-state "
state (normal|prelight|active|selected|insensitive) #REQUIRED
">
<!ENTITY % gtk-shadow "
shadow (none|in|out|etched_in|etched_out) #REQUIRED
">
<!-- The actual theme -->
<!ELEMENT window EMPTY>
<!ATTLIST window
type (normal|dialog|modal_dialog|menu|utility|border) #REQUIRED
style_set CDATA #REQUIRED
>
<!ELEMENT frame_style_set (frame+)>
<!ATTLIST frame_style_set
name CDATA #REQUIRED
parent CDATA #IMPLIED
>
<!ELEMENT frame EMPTY>
<!ATTLIST frame
focus (yes|no) #REQUIRED
state (normal|maximized|shaded|maximized_and_shaded) #REQUIRED
resize (both|horizontal|vertical|none) #REQUIRED
style CDATA #REQUIRED
>
<!ELEMENT frame_style (piece|button)*>
<!ATTLIST frame_style
name CDATA #REQUIRED
geometry CDATA #REQUIRED
parent CDATA #IMPLIED
>
<!ELEMENT piece (draw_ops?)>
<!ATTLIST piece
position %piece_positions; #REQUIRED
draw_ops CDATA #IMPLIED
>
<!ELEMENT button (draw_ops?)>
<!ATTLIST button
function (menu|minimize|maximize|close|left_left_background|left_middle_background|left_right_background|right_left_background|right_middle_background|right_right_background) #REQUIRED
state (normal|prelight|pressed) #REQUIRED
draw_ops CDATA #IMPLIED
>
<!ELEMENT frame_geometry (border|(aspect_ratio|distance))+>
<!ATTLIST frame_geometry
name CDATA #REQUIRED
parent CDATA #IMPLIED
title_scale (xx-small|x-small|small|medium|large|x-large|xx-large) #IMPLIED
has_title (true|false) 'true'
rounded_top_left %boolean; #IMPLIED
rounded_top_right %boolean; #IMPLIED
rounded_bottom_left %boolean; #IMPLIED
rounded_bottom_right %boolean; #IMPLIED
>
<!ELEMENT distance EMPTY>
<!ATTLIST distance
name (left_width|right_width|bottom_height|title_vertical_pad|right_titlebar_edge|left_titlebar_edge|button_width|button_height) #REQUIRED
value CDATA #REQUIRED
>
<!ELEMENT border EMPTY>
<!ATTLIST border
name CDATA #REQUIRED
top CDATA #REQUIRED
bottom CDATA #REQUIRED
left CDATA #REQUIRED
right CDATA #REQUIRED
>
<!ELEMENT aspect_ratio EMPTY>
<!ATTLIST aspect_ratio
name CDATA #REQUIRED
value CDATA #REQUIRED
>
<!ELEMENT draw_ops (line|rectangle|arc|tint|gradient|image|gtk_arrow|gtk_box|gtk_vline|icon|title|clip|include|tile)*>
<!-- not sure about this.. maybe it should be removed. see #3478 in theme-parser.c -->
<!ATTLIST draw_ops
name CDATA #IMPLIED
>
<!ELEMENT line EMPTY>
<!ATTLIST line
color CDATA #REQUIRED
x1 CDATA #REQUIRED
y1 CDATA #REQUIRED
x2 CDATA #REQUIRED
y2 CDATA #REQUIRED
width CDATA #IMPLIED
dash_on_length CDATA #IMPLIED
dash_off_length CDATA #IMPLIED
>
<!ELEMENT rectangle EMPTY>
<!ATTLIST rectangle
color CDATA #REQUIRED
%xyrequired;
%widthheightrequired;
filled %boolean; 'false'
>
<!ELEMENT arc EMTPY>
<!ATTLIST arc
color CDATA #REQUIRED
%xyrequired;
%widthheightrequired;
start_angle CDATA #REQUIRED
extent_angle CDATA #REQUIRED
filled %boolean; 'false'
>
<!ELEMENT icon EMPTY>
<!ATTLIST icon
%xyrequired;
width CDATA #REQUIRED
height CDATA #REQUIRED
alpha CDATA #IMPLIED
fill_type (tile|scale) 'scale'
>
<!ELEMENT image EMPTY>
<!ATTLIST image
filename CDATA #REQUIRED
colorize CDATA #IMPLIED
%xyrequired;
%widthheightrequired;
alpha CDATA #IMPLIED
fill_type (tile|scale) 'scale'
>
<!ELEMENT tile EMPTY>
<!ATTLIST tile
name CDATA #REQUIRED
%xyrequired;
%widthheightrequired;
tile_xoffset CDATA #IMPLIED
tile_yoffset CDATA #IMPLIED
tile_width CDATA #REQUIRED
tile_height CDATA #REQUIRED
>
<!ELEMENT clip EMPTY>
<!ATTLIST clip
%xyrequired;
%widthheightrequired;
>
<!ELEMENT title EMPTY>
<!ATTLIST title
color CDATA #REQUIRED
%xyrequired;
>
<!ELEMENT tint EMPTY>
<!ATTLIST tint
color CDATA #REQUIRED
%xyrequired;
%widthheightrequired;
alpha CDATA #REQUIRED
>
<!ELEMENT gtk_box EMPTY>
<!ATTLIST gtk_box
%gtk-state;
%gtk-shadow;
%xyrequired;
%widthheightrequired;
>
<!ELEMENT gtk_arrow EMPTY>
<!ATTLIST gtk_arrow
%gtk-state;
%gtk-shadow;
arrow (up|down|left|right) #REQUIRED
%xyrequired;
%widthheightrequired;
filed CDATA #IMPLIED
>
<!ELEMENT gtk_vline EMPTY>
<!ATTLIST gtk_vline
%gtk-state;
x CDATA #REQUIRED
y1 CDATA #REQUIRED
y2 CDATA #REQUIRED
>
<!ELEMENT gradient (color)+>
<!ATTLIST gradient
type (vertical|horizontal|diagonal) #REQUIRED
%xyrequired;
%widthheightrequired;
alpha CDATA #IMPLIED
>
<!ELEMENT color EMPTY>
<!ATTLIST color
value CDATA #REQUIRED
>
<!ELEMENT include EMPTY>
<!ATTLIST include
name CDATA #REQUIRED
%xyimplied;
%widthheightimplied;
>
<!ELEMENT constant EMPTY>
<!ATTLIST constant
name CDATA #REQUIRED
value CDATA #REQUIRED
>
<!ELEMENT menu_icon (draw_ops?)>
<!ATTLIST menu_icon
function (close|maximize|minimize|unmaximize) #REQUIRED
%gtk-state;
draw_ops CDATA #IMPLIED
>