~ubuntu-branches/debian/experimental/gtk+2.0/experimental

« back to all changes in this revision

Viewing changes to docs/reference/gdk/html/gdk-GdkRGB.html

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2010-08-17 11:44:53 UTC
  • mfrom: (1.10.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20100817114453-7rm28441bqy4ufi2
Tags: 2.21.6-1
* debian/rules:
  + Remove obsolete configure parameter.
* New upstream development release:
  + debian/rules,
    debian/libgtk2.0-0.symbols:
    - Update for new API symbols.
  + debian/patches/009_gtk-export-filechooser.patch,
    debian/patches/042_treeview_single-focus.patch,
    debian/patches/070_mandatory-relibtoolize.patch:
    - Refreshed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
161
161
by setting the GDK_DISABLE_MEDIALIB environment variable.
162
162
</p>
163
163
<div class="example">
164
 
<a name="id488514"></a><p class="title"><b>Example 4. A simple example program using GdkRGB</b></p>
 
164
<a name="id623387"></a><p class="title"><b>Example 4. A simple example program using GdkRGB</b></p>
165
165
<div class="example-contents">
166
166
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
167
167
    <tbody>
290
290
                                                         <em class="parameter"><code><a class="link" href="gdk-GdkRGB.html#GdkRgbDither" title="enum GdkRgbDither"><span class="type">GdkRgbDither</span></a> dith</code></em>,
291
291
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *rgb_buf</code></em>,
292
292
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> rowstride</code></em>);</pre>
 
293
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
 
294
<h3 class="title">Warning</h3>
 
295
<p><code class="literal">gdk_draw_rgb_image</code> is deprecated and should not be used in newly-written code.</p>
 
296
</div>
293
297
<p>
294
298
Draws an RGB image in the drawable. This is the core GdkRGB
295
299
function, and likely the only one you will need to use.
375
379
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> rowstride</code></em>,
376
380
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> xdith</code></em>,
377
381
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> ydith</code></em>);</pre>
 
382
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
 
383
<h3 class="title">Warning</h3>
 
384
<p><code class="literal">gdk_draw_rgb_image_dithalign</code> is deprecated and should not be used in newly-written code.</p>
 
385
</div>
378
386
<p>
379
387
Draws an RGB image in the drawable, with an adjustment for dither alignment.
380
388
</p>
465
473
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *buf</code></em>,
466
474
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> rowstride</code></em>,
467
475
                                                         <em class="parameter"><code><a class="link" href="gdk-GdkRGB.html#GdkRgbCmap" title="GdkRgbCmap"><span class="type">GdkRgbCmap</span></a> *cmap</code></em>);</pre>
 
476
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
 
477
<h3 class="title">Warning</h3>
 
478
<p><code class="literal">gdk_draw_indexed_image</code> is deprecated and should not be used in newly-written code.</p>
 
479
</div>
468
480
<p>
469
481
Draws an indexed image in the drawable, using a <a class="link" href="gdk-GdkRGB.html#GdkRgbCmap" title="GdkRgbCmap"><span class="type">GdkRgbCmap</span></a> to assign
470
482
actual colors to the color indices.
538
550
                                                         <em class="parameter"><code><a class="link" href="gdk-GdkRGB.html#GdkRgbDither" title="enum GdkRgbDither"><span class="type">GdkRgbDither</span></a> dith</code></em>,
539
551
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *buf</code></em>,
540
552
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> rowstride</code></em>);</pre>
 
553
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
 
554
<h3 class="title">Warning</h3>
 
555
<p><code class="literal">gdk_draw_gray_image</code> is deprecated and should not be used in newly-written code.</p>
 
556
</div>
541
557
<p>
542
558
Draws a grayscale image in the drawable.
543
559
</p>
605
621
                                                         <em class="parameter"><code><a class="link" href="gdk-GdkRGB.html#GdkRgbDither" title="enum GdkRgbDither"><span class="type">GdkRgbDither</span></a> dith</code></em>,
606
622
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *buf</code></em>,
607
623
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> rowstride</code></em>);</pre>
 
624
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
 
625
<h3 class="title">Warning</h3>
 
626
<p><code class="literal">gdk_draw_rgb_32_image</code> is deprecated and should not be used in newly-written code.</p>
 
627
</div>
608
628
<p>
609
629
Draws a padded RGB image in the drawable. The image is stored as one
610
630
pixel per 32-bit word. It is laid out as a red byte, a green byte, a
682
702
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> rowstride</code></em>,
683
703
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> xdith</code></em>,
684
704
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> ydith</code></em>);</pre>
 
705
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
 
706
<h3 class="title">Warning</h3>
 
707
<p><code class="literal">gdk_draw_rgb_32_image_dithalign</code> has been deprecated since version 2.22 and should not be used in newly-written code. Cairo handles colors automatically.</p>
 
708
</div>
685
709
<p>
686
710
Like <a class="link" href="gdk-GdkRGB.html#gdk-draw-rgb-32-image" title="gdk_draw_rgb_32_image ()"><code class="function">gdk_draw_rgb_32_image()</code></a>, but allows you to specify the dither
687
711
offsets. See <a class="link" href="gdk-GdkRGB.html#gdk-draw-rgb-image-dithalign" title="gdk_draw_rgb_image_dithalign ()"><code class="function">gdk_draw_rgb_image_dithalign()</code></a> for more details.
792
816
<a name="gdk-rgb-cmap-new"></a><h3>gdk_rgb_cmap_new ()</h3>
793
817
<pre class="programlisting"><a class="link" href="gdk-GdkRGB.html#GdkRgbCmap" title="GdkRgbCmap"><span class="returnvalue">GdkRgbCmap</span></a> *        gdk_rgb_cmap_new                    (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> *colors</code></em>,
794
818
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_colors</code></em>);</pre>
 
819
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
 
820
<h3 class="title">Warning</h3>
 
821
<p><code class="literal">gdk_rgb_cmap_new</code> is deprecated and should not be used in newly-written code.</p>
 
822
</div>
795
823
<p>
796
824
Creates a new <a class="link" href="gdk-GdkRGB.html#GdkRgbCmap" title="GdkRgbCmap"><span class="type">GdkRgbCmap</span></a> structure. The cmap maps color indexes to
797
825
RGB colors. If <em class="parameter"><code>n_colors</code></em> is less than 256, then images containing
823
851
<div class="refsect2" title="gdk_rgb_cmap_free ()">
824
852
<a name="gdk-rgb-cmap-free"></a><h3>gdk_rgb_cmap_free ()</h3>
825
853
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_rgb_cmap_free                   (<em class="parameter"><code><a class="link" href="gdk-GdkRGB.html#GdkRgbCmap" title="GdkRgbCmap"><span class="type">GdkRgbCmap</span></a> *cmap</code></em>);</pre>
 
854
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
 
855
<h3 class="title">Warning</h3>
 
856
<p><code class="literal">gdk_rgb_cmap_free</code> is deprecated and should not be used in newly-written code.</p>
 
857
</div>
826
858
<p>
827
859
Frees the memory associated with a <a class="link" href="gdk-GdkRGB.html#GdkRgbCmap" title="GdkRgbCmap"><span class="type">GdkRgbCmap</span></a> created by <a class="link" href="gdk-GdkRGB.html#gdk-rgb-cmap-new" title="gdk_rgb_cmap_new ()"><code class="function">gdk_rgb_cmap_new()</code></a>.
828
860
</p>
843
875
  gint n_colors;
844
876
} GdkRgbCmap;
845
877
</pre>
 
878
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
 
879
<h3 class="title">Warning</h3>
 
880
<p><code class="literal">GdkRgbCmap</code> is deprecated and should not be used in newly-written code.</p>
 
881
</div>
846
882
<p>
847
883
A private data structure which maps color indices to actual RGB
848
884
colors. This is used only for <a class="link" href="gdk-GdkRGB.html#gdk-draw-indexed-image" title="gdk_draw_indexed_image ()"><code class="function">gdk_draw_indexed_image()</code></a>.
955
991
<a name="gdk-rgb-find-color"></a><h3>gdk_rgb_find_color ()</h3>
956
992
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_rgb_find_color                  (<em class="parameter"><code><a class="link" href="gdk-Colormaps-and-Colors.html#GdkColormap" title="GdkColormap"><span class="type">GdkColormap</span></a> *colormap</code></em>,
957
993
                                                         <em class="parameter"><code><a class="link" href="gdk-Colormaps-and-Colors.html#GdkColor" title="GdkColor"><span class="type">GdkColor</span></a> *color</code></em>);</pre>
 
994
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
 
995
<h3 class="title">Warning</h3>
 
996
<p><code class="literal">gdk_rgb_find_color</code> has been deprecated since version 2.22 and should not be used in newly-written code. Cairo handles colors automatically.</p>
 
997
</div>
958
998
<p>
959
999
<em class="parameter"><code>colormap</code></em> should be the colormap for the graphics context and
960
1000
drawable you're using to draw. If you're drawing to a <a href="http://library.gnome.org/devel/gtk/unstable/GtkWidget.html"><span class="type">GtkWidget</span></a>,
993
1033
<div class="refsect2" title="gdk_rgb_set_install ()">
994
1034
<a name="gdk-rgb-set-install"></a><h3>gdk_rgb_set_install ()</h3>
995
1035
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_rgb_set_install                 (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> install</code></em>);</pre>
 
1036
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
 
1037
<h3 class="title">Warning</h3>
 
1038
<p><code class="literal">gdk_rgb_set_install</code> is deprecated and should not be used in newly-written code.</p>
 
1039
</div>
996
1040
<p>
997
1041
If <em class="parameter"><code>install</code></em> is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, directs GdkRGB to always install a new "private"
998
1042
colormap rather than trying to find a best fit with the colors already
1017
1061
<div class="refsect2" title="gdk_rgb_set_min_colors ()">
1018
1062
<a name="gdk-rgb-set-min-colors"></a><h3>gdk_rgb_set_min_colors ()</h3>
1019
1063
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_rgb_set_min_colors              (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> min_colors</code></em>);</pre>
 
1064
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
 
1065
<h3 class="title">Warning</h3>
 
1066
<p><code class="literal">gdk_rgb_set_min_colors</code> is deprecated and should not be used in newly-written code.</p>
 
1067
</div>
1020
1068
<p>
1021
1069
Sets the minimum number of colors for the color cube. Generally,
1022
1070
GdkRGB tries to allocate the largest color cube it can. If it can't
1036
1084
<div class="refsect2" title="gdk_rgb_get_visual ()">
1037
1085
<a name="gdk-rgb-get-visual"></a><h3>gdk_rgb_get_visual ()</h3>
1038
1086
<pre class="programlisting"><a class="link" href="gdk-Visuals.html#GdkVisual" title="GdkVisual"><span class="returnvalue">GdkVisual</span></a> *         gdk_rgb_get_visual                  (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
 
1087
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
 
1088
<h3 class="title">Warning</h3>
 
1089
<p><code class="literal">gdk_rgb_get_visual</code> has been deprecated since version 2.22 and should not be used in newly-written code. Use <code class="function">gdk_get_system_visual()</code></p>
 
1090
</div>
1039
1091
<p>
1040
1092
Gets a "preferred visual" chosen by GdkRGB for rendering image data
1041
1093
on the default screen. In previous versions of GDK, this was the
1057
1109
<div class="refsect2" title="gdk_rgb_get_colormap ()">
1058
1110
<a name="gdk-rgb-get-colormap"></a><h3>gdk_rgb_get_colormap ()</h3>
1059
1111
<pre class="programlisting"><a class="link" href="gdk-Colormaps-and-Colors.html#GdkColormap" title="GdkColormap"><span class="returnvalue">GdkColormap</span></a> *       gdk_rgb_get_colormap                (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
 
1112
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
 
1113
<h3 class="title">Warning</h3>
 
1114
<p><code class="literal">gdk_rgb_get_colormap</code> has been deprecated since version 2.22 and should not be used in newly-written code. Use <code class="function">gdk_get_system_colormap()</code></p>
 
1115
</div>
1060
1116
<p>
1061
1117
Get the preferred colormap for rendering image data.  Not a
1062
1118
very useful function; historically, GDK could only render RGB image
1099
1155
<div class="refsect2" title="gdk_rgb_ditherable ()">
1100
1156
<a name="gdk-rgb-ditherable"></a><h3>gdk_rgb_ditherable ()</h3>
1101
1157
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gdk_rgb_ditherable                  (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
 
1158
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
 
1159
<h3 class="title">Warning</h3>
 
1160
<p><code class="literal">gdk_rgb_ditherable</code> is deprecated and should not be used in newly-written code.</p>
 
1161
</div>
1102
1162
<p>
1103
1163
Determines whether the preferred visual is ditherable. This function may be
1104
1164
useful for presenting a user interface choice to the user about which
1119
1179
<div class="refsect2" title="gdk_rgb_colormap_ditherable ()">
1120
1180
<a name="gdk-rgb-colormap-ditherable"></a><h3>gdk_rgb_colormap_ditherable ()</h3>
1121
1181
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gdk_rgb_colormap_ditherable         (<em class="parameter"><code><a class="link" href="gdk-Colormaps-and-Colors.html#GdkColormap" title="GdkColormap"><span class="type">GdkColormap</span></a> *cmap</code></em>);</pre>
 
1182
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
 
1183
<h3 class="title">Warning</h3>
 
1184
<p><code class="literal">gdk_rgb_colormap_ditherable</code> is deprecated and should not be used in newly-written code.</p>
 
1185
</div>
1122
1186
<p>
1123
1187
Determines whether the visual associated with <em class="parameter"><code>cmap</code></em> is ditherable. This
1124
1188
function may be useful for presenting a user interface choice to the user
1146
1210
<div class="refsect2" title="gdk_rgb_set_verbose ()">
1147
1211
<a name="gdk-rgb-set-verbose"></a><h3>gdk_rgb_set_verbose ()</h3>
1148
1212
<pre class="programlisting"><span class="returnvalue">void</span>                gdk_rgb_set_verbose                 (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> verbose</code></em>);</pre>
 
1213
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
 
1214
<h3 class="title">Warning</h3>
 
1215
<p><code class="literal">gdk_rgb_set_verbose</code> is deprecated and should not be used in newly-written code.</p>
 
1216
</div>
1149
1217
<p>
1150
1218
Sets the "verbose" flag. This is generally only useful for debugging.
1151
1219
</p>