=head1 NAME

Gtk2::Gdk::Colormap

=for position DESCRIPTION

=head1 DESCRIPTION

Colormaps are used to store the mappings between the RGB values you ask for
and the actual, hardware-dependent values used to display those colors.
The C<< $colormap->alloc_color >> and C<< $colormap->alloc_colors >> methods
do the necessary work to allocate a color within the visual; this actually
has nothing to do with memory management, so it is important that you call
C<< $colormap->free_colors >> to release those spots in the colormap
allocated by C<alloc_color> and C<alloc_colors>.

=cut



=head1 HIERARCHY

  Glib::Object
  +----Gtk2::Gdk::Colormap


=head1 METHODS

=head2 colormap = Gtk2::Gdk::Colormap-E<gt>B<new> ($visual, $allocate)

=over

=over

=item * $visual (Gtk2::Gdk::Visual) 

=item * $allocate (boolean) 

=back

=back

=head2 boolean = $colormap-E<gt>B<alloc_color> ($color, $writeable, $best_match)

=over

=over

=item * $color (Gtk2::Gdk::Color) 

=item * $writeable (boolean) 

=item * $best_match (boolean) 

=back

=back

=head2 list = $colormap-E<gt>B<alloc_colors> ($writeable, $best_match, ...)

=over

=over

=item * $writeable (boolean) 

=item * $best_match (boolean) 

=item * ... (list) of Gtk2::Gdk::Color's to be allocated

=back

Returns a list of boolean values, telling whether the color at the
corresponding spot in I<...> could be allocated.

=back

=head2 $colormap-E<gt>B<free_colors> (...)

=over

=over

=item * ... (list) of Gtk2::Gdk::Color's to be freed

=back



=back

=head2 color = $colormap-E<gt>B<query_color> ($pixel)

=over

=over

=item * $pixel (unsigned) 

=back

=back

=head2 $colormap-E<gt>B<rgb_find_color> ($color)

=over

=over

=item * $color (Gtk2::Gdk::Color) 

=back

=back

=head2 screen = $cmap-E<gt>B<get_screen> 

=over

Since: gtk+ 2.2

=back

=head2 colormap = Gtk2::Gdk::Colormap-E<gt>B<get_system> 

=over

=back

=head2 visual = $colormap-E<gt>B<get_visual> 

=over

=back


=head1 SEE ALSO

L<Gtk2>, L<Glib::Object>

=head1 COPYRIGHT

Copyright (C) 2003-2007 by the gtk2-perl team.

This software is licensed under the LGPL.  See L<Gtk2> for a full notice.


=cut

