<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://wiki.lostsouls.org/w/skins/common/feed.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>Man color pattern - Revision history</title>
		<link>http://wiki.lostsouls.org/w/index.php?title=Man_color_pattern&amp;action=history</link>
		<description>Revision history for this page on the wiki</description>
		<language>en</language>
		<generator>MediaWiki 1.8.2</generator>
		<lastBuildDate>Wed, 06 May 2026 03:06:57 GMT</lastBuildDate>
		<item>
			<title>Laine at 20:07, 11 June 2007</title>
			<link>http://wiki.lostsouls.org/w/index.php?title=Man_color_pattern&amp;diff=3961&amp;oldid=prev</link>
			<description>&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Files==&lt;br /&gt;
&lt;br /&gt;
 /def/descriptor/color_pattern.c&lt;br /&gt;
 /lib/descriptors/color_pattern.h&lt;br /&gt;
 /std/def/term.c&lt;br /&gt;
 /mod/definition/ansi_term.c&lt;br /&gt;
 /daemon/color.c&lt;br /&gt;
 /std/def/color_texture.c&lt;br /&gt;
 /std/def/color_template.c&lt;br /&gt;
 /def/color_texture&lt;br /&gt;
 /def/color_template&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
Color pattern descriptors are used internally by the terminal processing&lt;br /&gt;
code.  There is no need for user code to interact with them, and only core&lt;br /&gt;
systems developers working on the terminal processing system will need to&lt;br /&gt;
know about them.  The most likely scenario for someone needing to work with&lt;br /&gt;
them is if a new definition needs to be added to /def/color_texture or&lt;br /&gt;
/def/color_template, though working from example should usually suffice.&lt;br /&gt;
&lt;br /&gt;
The term &amp;quot;color&amp;quot;, as used below, means one of four things.  First, it may&lt;br /&gt;
be a string color as normally handled by the terminal system.  Second, it&lt;br /&gt;
may be a color pattern descriptor.  Third, in the case of patterns used by&lt;br /&gt;
color templates, it may be one of the integer macros which is used to&lt;br /&gt;
specify where color template arguments should be substituted, these macros&lt;br /&gt;
being Color_Pattern_Template_Argument_1 through 8.  Fourth, when color&lt;br /&gt;
patterns are converted and cached by /mod/definition/ansi_term.c, the&lt;br /&gt;
colors in them are rewritten to ANSI escape sequences; this is not normally&lt;br /&gt;
something anyone needs to be concerned about.&lt;br /&gt;
&lt;br /&gt;
===Public Fields===&lt;br /&gt;
&lt;br /&gt;
Color_Pattern_Type: The type of color pattern.  The types are:&lt;br /&gt;
&lt;br /&gt;
    Color_Pattern_Solid: A simple color block.  The pattern content is the&lt;br /&gt;
    color to apply.  Any of the various meanings of &amp;quot;color&amp;quot; will be handled&lt;br /&gt;
    correctly, though in the case where the pattern content is another&lt;br /&gt;
    color pattern descriptor, the descriptor enclosing it is redundant.&lt;br /&gt;
&lt;br /&gt;
    Color_Pattern_Alternation: A set of colors which will be &amp;quot;stretched&amp;quot;&lt;br /&gt;
    across their affected area so that the set is passed through no more&lt;br /&gt;
    than once.  The pattern content is an array of two or more colors.&lt;br /&gt;
&lt;br /&gt;
    Color_Pattern_Sequence: A set of colors which is processed at a rate of&lt;br /&gt;
    one character per element, so the sequence is followed exactly and is&lt;br /&gt;
    repeated as necessary to cover the area affected.  The pattern content&lt;br /&gt;
    is an array of two or more colors.&lt;br /&gt;
&lt;br /&gt;
    Color_Pattern_Centered: Two colors, a middle color and an edge color;&lt;br /&gt;
    the middle color is spread over a specific percentage of the affected&lt;br /&gt;
    area, with the edge color for the remainder.  The pattern content is&lt;br /&gt;
    an array of exactly two colors; the first is the middle color and the&lt;br /&gt;
    second is the edge color.  Color_Pattern_Spec is the percentage to&lt;br /&gt;
    cover with the middle color.&lt;br /&gt;
&lt;br /&gt;
Color_Pattern_Content: The pattern content.  The exact interpretation of&lt;br /&gt;
the pattern content depends on the pattern type, as described under each&lt;br /&gt;
individual type.&lt;br /&gt;
&lt;br /&gt;
Color_Pattern_Spec: A value specification for the color pattern.  Used by&lt;br /&gt;
centered color patterns for the percentage of affected area to cover with&lt;br /&gt;
the &amp;quot;middle&amp;quot; color.&lt;br /&gt;
&lt;br /&gt;
===Internal Fields===&lt;br /&gt;
&lt;br /&gt;
Color_Pattern_Pos: The position within the pattern that the descriptor is&lt;br /&gt;
currently on.  The terminal processing internals use this field, and it is&lt;br /&gt;
not relevant to someone defining a color texture or color template.&lt;br /&gt;
&lt;br /&gt;
Color_Pattern_Tag: The tag for the descriptor system.&lt;br /&gt;
&lt;br /&gt;
===Support Functions===&lt;br /&gt;
&lt;br /&gt;
'''void Color_Pattern_Reset(descriptor dxr)'''&lt;br /&gt;
&lt;br /&gt;
Resets the Color_Pattern_Pos of the specified descriptor, and any further&lt;br /&gt;
descriptors contained in its Color_Pattern_Content, to 0.&lt;br /&gt;
&lt;br /&gt;
'''string Color_Pattern_Code(descriptor dxr)'''&lt;br /&gt;
&lt;br /&gt;
Attempts to return the terminal-control string that would produce the&lt;br /&gt;
color pattern given in the descriptor.  It is possible to construct color&lt;br /&gt;
pattern descriptors as abstract data that are impossible to produce from&lt;br /&gt;
a terminal-control string, so it is safest to only use this function with&lt;br /&gt;
color patterns which are known to have been derived originally from&lt;br /&gt;
terminal-control strings.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
[[man descriptors|descriptors(mechanisms)]]&lt;/div&gt;</description>
			<pubDate>Mon, 11 Jun 2007 20:07:54 GMT</pubDate>			<dc:creator>Laine</dc:creator>			<comments>http://wiki.lostsouls.org/Talk:Man_color_pattern</comments>		</item>
	</channel>
</rss>