~ubuntu-branches/ubuntu/trusty/gimp/trusty

« back to all changes in this revision

Viewing changes to devel-docs/libgimpwidgets/xml/gimpcolorarea.xml

  • Committer: Bazaar Package Importer
  • Author(s): Ari Pollak
  • Date: 2009-08-14 09:57:17 UTC
  • mto: (1.1.21 upstream) (0.1.5 squeeze)
  • mto: This revision was merged to the branch mainline in revision 48.
  • Revision ID: james.westby@ubuntu.com-20090814095717-37dh2xqy5t0rurpk
ImportĀ upstreamĀ versionĀ 2.6.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
<refnamediv>
13
13
<refname>GimpColorArea</refname>
14
14
<refpurpose>Displays a GimpRGB color, optionally with alpha-channel.</refpurpose>
15
 
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
16
15
</refnamediv>
17
16
 
18
17
<refsynopsisdiv id="GimpColorArea.synopsis" role="synopsis">
21
20
<synopsis>
22
21
                    <link linkend="GimpColorArea-struct">GimpColorArea</link>;
23
22
enum                <link linkend="GimpColorAreaType">GimpColorAreaType</link>;
24
 
<link linkend="GtkWidget">GtkWidget</link>*          <link linkend="gimp-color-area-new">gimp_color_area_new</link>                 (const <link linkend="GimpRGB">GimpRGB</link> *color,
 
23
<link linkend="GtkWidget">GtkWidget</link> *         <link linkend="gimp-color-area-new">gimp_color_area_new</link>                 (const <link linkend="GimpRGB">GimpRGB</link> *color,
25
24
                                                         <link linkend="GimpColorAreaType">GimpColorAreaType</link> type,
26
25
                                                         <link linkend="GdkModifierType">GdkModifierType</link> drag_mask);
27
26
<link linkend="void">void</link>                <link linkend="gimp-color-area-set-color">gimp_color_area_set_color</link>           (<link linkend="GimpColorArea">GimpColorArea</link> *area,
46
45
                     +----<link linkend="GtkDrawingArea">GtkDrawingArea</link>
47
46
                           +----GimpColorArea
48
47
</synopsis>
49
 
 
50
48
</refsect1>
51
49
 
52
50
 
55
53
<title role="impl_interfaces.title">Implemented Interfaces</title>
56
54
<para>
57
55
GimpColorArea implements
58
 
 <link linkend="AtkImplementorIface">AtkImplementorIface</link> and  <link linkend="GtkBuildable">GtkBuildable</link>.</para>
59
 
 
 
56
 <link linkend="GtkBuildable">GtkBuildable</link> and  <link linkend="AtkImplementorIface">AtkImplementorIface</link>.</para>
60
57
</refsect1>
61
58
 
62
59
 
81
78
<refsect1 id="GimpColorArea.description" role="desc">
82
79
<title role="desc.title">Description</title>
83
80
<para>
84
 
 
85
81
</para>
86
82
</refsect1>
87
83
 
89
85
<title role="details.title">Details</title>
90
86
<refsect2 id="GimpColorArea-struct" role="struct">
91
87
<title>GimpColorArea</title>
92
 
<indexterm zone="GimpColorArea-struct"><primary>GimpColorArea</primary></indexterm><programlisting>typedef struct _GimpColorArea GimpColorArea;</programlisting>
 
88
<indexterm zone="GimpColorArea-struct"><primary sortas="GimpColorArea">GimpColorArea</primary></indexterm><programlisting>typedef struct _GimpColorArea GimpColorArea;</programlisting>
93
89
<para>
94
 
 
95
90
</para></refsect2>
96
91
<refsect2 id="GimpColorAreaType" role="enum">
97
92
<title>enum GimpColorAreaType</title>
98
 
<indexterm zone="GimpColorAreaType"><primary>GimpColorAreaType</primary></indexterm><programlisting>typedef enum
 
93
<indexterm zone="GimpColorAreaType"><primary sortas="GimpColorAreaType">GimpColorAreaType</primary></indexterm><programlisting>typedef enum
99
94
{
100
95
  GIMP_COLOR_AREA_FLAT = 0,
101
96
  GIMP_COLOR_AREA_SMALL_CHECKS,
103
98
} GimpColorAreaType;
104
99
</programlisting>
105
100
<para>
106
 
 
107
101
</para></refsect2>
108
102
<refsect2 id="gimp-color-area-new" role="function">
109
103
<title>gimp_color_area_new ()</title>
110
 
<indexterm zone="gimp-color-area-new"><primary>gimp_color_area_new</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link>*          gimp_color_area_new                 (const <link linkend="GimpRGB">GimpRGB</link> *color,
 
104
<indexterm zone="gimp-color-area-new"><primary sortas="gimp_color_area_new">gimp_color_area_new</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link> *         gimp_color_area_new                 (const <link linkend="GimpRGB">GimpRGB</link> *color,
111
105
                                                         <link linkend="GimpColorAreaType">GimpColorAreaType</link> type,
112
106
                                                         <link linkend="GdkModifierType">GdkModifierType</link> drag_mask);</programlisting>
113
107
<para>
117
111
This returns a preview area showing the color. It handles color
118
112
DND. If the color changes, the "color_changed" signal is emitted.</para>
119
113
<para>
120
 
 
121
114
</para><variablelist role="params">
122
 
<varlistentry><term><parameter>color</parameter>&nbsp;:</term>
 
115
<varlistentry><term><parameter>color</parameter>&#160;:</term>
123
116
<listitem><simpara>     A pointer to a <link linkend="GimpRGB"><type>GimpRGB</type></link> struct.
124
117
</simpara></listitem></varlistentry>
125
 
<varlistentry><term><parameter>type</parameter>&nbsp;:</term>
 
118
<varlistentry><term><parameter>type</parameter>&#160;:</term>
126
119
<listitem><simpara>      The type of color area to create.
127
120
</simpara></listitem></varlistentry>
128
 
<varlistentry><term><parameter>drag_mask</parameter>&nbsp;:</term>
 
121
<varlistentry><term><parameter>drag_mask</parameter>&#160;:</term>
129
122
<listitem><simpara> The event_mask that should trigger drags.
130
123
</simpara></listitem></varlistentry>
131
 
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> Pointer to the new <link linkend="GimpColorArea"><type>GimpColorArea</type></link> widget.
 
124
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> Pointer to the new <link linkend="GimpColorArea"><type>GimpColorArea</type></link> widget.
132
125
</simpara></listitem></varlistentry>
133
126
</variablelist></refsect2>
134
127
<refsect2 id="gimp-color-area-set-color" role="function">
135
128
<title>gimp_color_area_set_color ()</title>
136
 
<indexterm zone="gimp-color-area-set-color"><primary>gimp_color_area_set_color</primary></indexterm><programlisting><link linkend="void">void</link>                gimp_color_area_set_color           (<link linkend="GimpColorArea">GimpColorArea</link> *area,
 
129
<indexterm zone="gimp-color-area-set-color"><primary sortas="gimp_color_area_set_color">gimp_color_area_set_color</primary></indexterm><programlisting><link linkend="void">void</link>                gimp_color_area_set_color           (<link linkend="GimpColorArea">GimpColorArea</link> *area,
137
130
                                                         const <link linkend="GimpRGB">GimpRGB</link> *color);</programlisting>
138
131
<para>
139
132
Sets <parameter>area</parameter> to a different <parameter>color</parameter>.</para>
140
133
<para>
141
 
 
142
134
</para><variablelist role="params">
143
 
<varlistentry><term><parameter>area</parameter>&nbsp;:</term>
 
135
<varlistentry><term><parameter>area</parameter>&#160;:</term>
144
136
<listitem><simpara> Pointer to a <link linkend="GimpColorArea"><type>GimpColorArea</type></link>.
145
137
</simpara></listitem></varlistentry>
146
 
<varlistentry><term><parameter>color</parameter>&nbsp;:</term>
 
138
<varlistentry><term><parameter>color</parameter>&#160;:</term>
147
139
<listitem><simpara> Pointer to a <link linkend="GimpRGB"><type>GimpRGB</type></link> struct that defines the new color.
148
140
</simpara></listitem></varlistentry>
149
141
</variablelist></refsect2>
150
142
<refsect2 id="gimp-color-area-get-color" role="function">
151
143
<title>gimp_color_area_get_color ()</title>
152
 
<indexterm zone="gimp-color-area-get-color"><primary>gimp_color_area_get_color</primary></indexterm><programlisting><link linkend="void">void</link>                gimp_color_area_get_color           (<link linkend="GimpColorArea">GimpColorArea</link> *area,
 
144
<indexterm zone="gimp-color-area-get-color"><primary sortas="gimp_color_area_get_color">gimp_color_area_get_color</primary></indexterm><programlisting><link linkend="void">void</link>                gimp_color_area_get_color           (<link linkend="GimpColorArea">GimpColorArea</link> *area,
153
145
                                                         <link linkend="GimpRGB">GimpRGB</link> *color);</programlisting>
154
146
<para>
155
147
Retrieves the current color of the <parameter>area</parameter>.</para>
156
148
<para>
157
 
 
158
149
</para><variablelist role="params">
159
 
<varlistentry><term><parameter>area</parameter>&nbsp;:</term>
 
150
<varlistentry><term><parameter>area</parameter>&#160;:</term>
160
151
<listitem><simpara> Pointer to a <link linkend="GimpColorArea"><type>GimpColorArea</type></link>.
161
152
</simpara></listitem></varlistentry>
162
 
<varlistentry><term><parameter>color</parameter>&nbsp;:</term>
 
153
<varlistentry><term><parameter>color</parameter>&#160;:</term>
163
154
<listitem><simpara> Pointer to a <link linkend="GimpRGB"><type>GimpRGB</type></link> struct that is used to return the color.
164
155
</simpara></listitem></varlistentry>
165
156
</variablelist></refsect2>
166
157
<refsect2 id="gimp-color-area-has-alpha" role="function">
167
158
<title>gimp_color_area_has_alpha ()</title>
168
 
<indexterm zone="gimp-color-area-has-alpha"><primary>gimp_color_area_has_alpha</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gimp_color_area_has_alpha           (<link linkend="GimpColorArea">GimpColorArea</link> *area);</programlisting>
 
159
<indexterm zone="gimp-color-area-has-alpha"><primary sortas="gimp_color_area_has_alpha">gimp_color_area_has_alpha</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gimp_color_area_has_alpha           (<link linkend="GimpColorArea">GimpColorArea</link> *area);</programlisting>
169
160
<para>
170
161
Checks whether the <parameter>area</parameter> shows transparency information. This is determined
171
162
via the <parameter>area</parameter>'s <link linkend="GimpColorAreaType"><type>GimpColorAreaType</type></link>.</para>
172
163
<para>
173
 
 
174
164
</para><variablelist role="params">
175
 
<varlistentry><term><parameter>area</parameter>&nbsp;:</term>
 
165
<varlistentry><term><parameter>area</parameter>&#160;:</term>
176
166
<listitem><simpara> Pointer to a <link linkend="GimpColorArea"><type>GimpColorArea</type></link>.
177
167
</simpara></listitem></varlistentry>
178
 
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if <parameter>area</parameter> shows transparency information, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> otherwise.
 
168
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if <parameter>area</parameter> shows transparency information, <link linkend="FALSE--CAPS"><literal>FALSE</literal></link> otherwise.
179
169
</simpara></listitem></varlistentry>
180
170
</variablelist></refsect2>
181
171
<refsect2 id="gimp-color-area-set-type" role="function">
182
172
<title>gimp_color_area_set_type ()</title>
183
 
<indexterm zone="gimp-color-area-set-type"><primary>gimp_color_area_set_type</primary></indexterm><programlisting><link linkend="void">void</link>                gimp_color_area_set_type            (<link linkend="GimpColorArea">GimpColorArea</link> *area,
 
173
<indexterm zone="gimp-color-area-set-type"><primary sortas="gimp_color_area_set_type">gimp_color_area_set_type</primary></indexterm><programlisting><link linkend="void">void</link>                gimp_color_area_set_type            (<link linkend="GimpColorArea">GimpColorArea</link> *area,
184
174
                                                         <link linkend="GimpColorAreaType">GimpColorAreaType</link> type);</programlisting>
185
175
<para>
186
176
Allows to change the type of <parameter>area</parameter>. The <link linkend="GimpColorAreaType"><type>GimpColorAreaType</type></link> determines
187
177
whether the widget shows transparency information and chooses the size of
188
178
the checkerboard used to do that.</para>
189
179
<para>
190
 
 
191
180
</para><variablelist role="params">
192
 
<varlistentry><term><parameter>area</parameter>&nbsp;:</term>
 
181
<varlistentry><term><parameter>area</parameter>&#160;:</term>
193
182
<listitem><simpara> Pointer to a <link linkend="GimpColorArea"><type>GimpColorArea</type></link>.
194
183
</simpara></listitem></varlistentry>
195
 
<varlistentry><term><parameter>type</parameter>&nbsp;:</term>
 
184
<varlistentry><term><parameter>type</parameter>&#160;:</term>
196
185
<listitem><simpara> A <link linkend="GimpColorAreaType"><type>GimpColorAreaType</type></link>.
197
186
</simpara></listitem></varlistentry>
198
187
</variablelist></refsect2>
199
188
<refsect2 id="gimp-color-area-set-draw-border" role="function">
200
189
<title>gimp_color_area_set_draw_border ()</title>
201
 
<indexterm zone="gimp-color-area-set-draw-border"><primary>gimp_color_area_set_draw_border</primary></indexterm><programlisting><link linkend="void">void</link>                gimp_color_area_set_draw_border     (<link linkend="GimpColorArea">GimpColorArea</link> *area,
 
190
<indexterm zone="gimp-color-area-set-draw-border"><primary sortas="gimp_color_area_set_draw_border">gimp_color_area_set_draw_border</primary></indexterm><programlisting><link linkend="void">void</link>                gimp_color_area_set_draw_border     (<link linkend="GimpColorArea">GimpColorArea</link> *area,
202
191
                                                         <link linkend="gboolean">gboolean</link> draw_border);</programlisting>
203
192
<para>
204
193
The <parameter>area</parameter> can draw a thin border in the foreground color around
205
194
itself.  This function allows to toggle this behaviour on and
206
195
off. The default is not draw a border.</para>
207
196
<para>
208
 
 
209
197
</para><variablelist role="params">
210
 
<varlistentry><term><parameter>area</parameter>&nbsp;:</term>
 
198
<varlistentry><term><parameter>area</parameter>&#160;:</term>
211
199
<listitem><simpara> Pointer to a <link linkend="GimpColorArea"><type>GimpColorArea</type></link>.
212
200
</simpara></listitem></varlistentry>
213
 
<varlistentry><term><parameter>draw_border</parameter>&nbsp;:</term>
 
201
<varlistentry><term><parameter>draw_border</parameter>&#160;:</term>
214
202
<listitem><simpara> whether to draw a border or not
215
203
</simpara></listitem></varlistentry>
216
204
</variablelist></refsect2>
218
206
</refsect1>
219
207
<refsect1 id="GimpColorArea.property-details" role="property_details">
220
208
<title role="property_details.title">Property Details</title>
221
 
<refsect2 id="GimpColorArea--color"><title>The <literal>&quot;color&quot;</literal> property</title>
222
 
<indexterm zone="GimpColorArea--color" role="GIMP 2.4"><primary>GimpColorArea:color</primary></indexterm><programlisting>  &quot;color&quot;                    <link linkend="GimpRGB">GimpRGB</link>*              : Read / Write / Construct</programlisting>
 
209
<refsect2 id="GimpColorArea--color" role="property"><title>The <literal>&quot;color&quot;</literal> property</title>
 
210
<indexterm zone="GimpColorArea--color" role="GIMP 2.4"><primary sortas="GimpColorArea:color">GimpColorArea:color</primary></indexterm><programlisting>  &quot;color&quot;                    <link linkend="GimpRGB">GimpRGB</link>*              : Read / Write / Construct</programlisting>
223
211
<para>
224
212
The color displayed in the color area.</para>
225
213
<para>
226
 
 
227
 
</para><para>Since  GIMP 2.4
228
 
</para>
 
214
</para><para>Since GIMP 2.4</para>
229
215
</refsect2>
230
 
<refsect2 id="GimpColorArea--drag-mask"><title>The <literal>&quot;drag-mask&quot;</literal> property</title>
231
 
<indexterm zone="GimpColorArea--drag-mask"><primary>GimpColorArea:drag-mask</primary></indexterm><programlisting>  &quot;drag-mask&quot;                <link linkend="GdkModifierType">GdkModifierType</link>       : Write / Construct Only</programlisting>
 
216
<refsect2 id="GimpColorArea--drag-mask" role="property"><title>The <literal>&quot;drag-mask&quot;</literal> property</title>
 
217
<indexterm zone="GimpColorArea--drag-mask"><primary sortas="GimpColorArea:drag-mask">GimpColorArea:drag-mask</primary></indexterm><programlisting>  &quot;drag-mask&quot;                <link linkend="GdkModifierType">GdkModifierType</link>       : Write / Construct Only</programlisting>
232
218
<para></para></refsect2>
233
 
<refsect2 id="GimpColorArea--draw-border"><title>The <literal>&quot;draw-border&quot;</literal> property</title>
234
 
<indexterm zone="GimpColorArea--draw-border" role="GIMP 2.4"><primary>GimpColorArea:draw-border</primary></indexterm><programlisting>  &quot;draw-border&quot;              <link linkend="gboolean">gboolean</link>              : Read / Write</programlisting>
 
219
<refsect2 id="GimpColorArea--draw-border" role="property"><title>The <literal>&quot;draw-border&quot;</literal> property</title>
 
220
<indexterm zone="GimpColorArea--draw-border" role="GIMP 2.4"><primary sortas="GimpColorArea:draw-border">GimpColorArea:draw-border</primary></indexterm><programlisting>  &quot;draw-border&quot;              <link linkend="gboolean">gboolean</link>              : Read / Write</programlisting>
235
221
<para>
236
222
Whether to draw a thin border in the foreground color around the area.</para>
237
223
<para>
238
 
 
239
224
</para><para>Default value: FALSE</para>
240
 
<para>Since  GIMP 2.4
241
 
</para>
 
225
<para>Since GIMP 2.4</para>
242
226
</refsect2>
243
 
<refsect2 id="GimpColorArea--type"><title>The <literal>&quot;type&quot;</literal> property</title>
244
 
<indexterm zone="GimpColorArea--type" role="GIMP 2.4"><primary>GimpColorArea:type</primary></indexterm><programlisting>  &quot;type&quot;                     <link linkend="GimpColorAreaType">GimpColorAreaType</link>     : Read / Write / Construct</programlisting>
 
227
<refsect2 id="GimpColorArea--type" role="property"><title>The <literal>&quot;type&quot;</literal> property</title>
 
228
<indexterm zone="GimpColorArea--type" role="GIMP 2.4"><primary sortas="GimpColorArea:type">GimpColorArea:type</primary></indexterm><programlisting>  &quot;type&quot;                     <link linkend="GimpColorAreaType">GimpColorAreaType</link>     : Read / Write / Construct</programlisting>
245
229
<para>
246
230
The type of the color area.</para>
247
231
<para>
248
 
 
249
232
</para><para>Default value: GIMP_COLOR_AREA_FLAT</para>
250
 
<para>Since  GIMP 2.4
251
 
</para>
 
233
<para>Since GIMP 2.4</para>
252
234
</refsect2>
253
 
 
254
235
</refsect1>
255
236
 
256
237
<refsect1 id="GimpColorArea.signal-details" role="signals">
257
238
<title role="signals.title">Signal Details</title>
258
 
<refsect2 id="GimpColorArea-color-changed"><title>The <literal>&quot;color-changed&quot;</literal> signal</title>
259
 
<indexterm zone="GimpColorArea-color-changed"><primary>GimpColorArea::color-changed</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GimpColorArea">GimpColorArea</link> *gimpcolorarea,
 
239
<refsect2 id="GimpColorArea-color-changed" role="signal"><title>The <literal>&quot;color-changed&quot;</literal> signal</title>
 
240
<indexterm zone="GimpColorArea-color-changed"><primary sortas="GimpColorArea::color-changed">GimpColorArea::color-changed</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GimpColorArea">GimpColorArea</link> *gimpcolorarea,
260
241
                                                        <link linkend="gpointer">gpointer</link>       user_data)          : Run First</programlisting>
261
242
<para>
262
 
 
263
243
</para><variablelist role="params">
264
 
<varlistentry><term><parameter>gimpcolorarea</parameter>&nbsp;:</term>
 
244
<varlistentry><term><parameter>gimpcolorarea</parameter>&#160;:</term>
265
245
<listitem><simpara>the object which received the signal.
266
 
 
267
246
</simpara></listitem></varlistentry>
268
 
<varlistentry><term><parameter>user_data</parameter>&nbsp;:</term>
 
247
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
269
248
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
270
249
</variablelist></refsect2>
271
250
</refsect1>