<HTML ><HEAD ><TITLE >Bitmaps and Pixmaps</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.61 "><LINK REL="HOME" TITLE="GDK Reference Manual" HREF="index.html"><LINK REL="UP" TITLE="GDK" HREF="gdk.html"><LINK REL="PREVIOUS" TITLE="Drawing Primitives" HREF="gdk-drawing-primitives.html"><LINK REL="NEXT" TITLE="GdkRGB" HREF="gdk-gdkrgb.html"></HEAD ><BODY CLASS="REFENTRY" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE WIDTH="100%" BORDER="0" BGCOLOR="#000000" CELLPADDING="1" CELLSPACING="0" ><TR ><TH COLSPAN="4" ALIGN="center" ><FONT COLOR="#FFFFFF" SIZE="5" >GDK Reference Manual</FONT ></TH ></TR ><TR ><TD WIDTH="25%" BGCOLOR="#C00000" ALIGN="left" ><A HREF="gdk-drawing-primitives.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B ><<< Previous Page</B ></FONT ></A ></TD ><TD WIDTH="25%" BGCOLOR="#0000C0" ALIGN="center" ><FONT COLOR="#FFFFFF" SIZE="3" ><B ><A HREF="index.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Home</B ></FONT ></A ></B ></FONT ></TD ><TD WIDTH="25%" BGCOLOR="#00C000" ALIGN="center" ><FONT COLOR="#FFFFFF" SIZE="3" ><B ><A HREF="gdk.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Up</B ></FONT ></A ></B ></FONT ></TD ><TD WIDTH="25%" BGCOLOR="#C00000" ALIGN="right" ><A HREF="gdk-gdkrgb.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Next Page >>></B ></FONT ></A ></TD ></TR ></TABLE ></DIV ><H1 ><A NAME="GDK-BITMAPS-AND-PIXMAPS" >Bitmaps and Pixmaps</A ></H1 ><DIV CLASS="REFNAMEDIV" ><A NAME="AEN2795" ></A ><H2 >Name</H2 >Bitmaps and Pixmaps -- Offscreen drawables.</DIV ><DIV CLASS="REFSYNOPSISDIV" ><A NAME="AEN2798" ></A ><H2 >Synopsis</H2 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="SYNOPSIS" > #include <gdk/gdk.h> struct <A HREF="gdk-bitmaps-and-pixmaps.html#GDKPIXMAP" >GdkPixmap</A >; <A HREF="gdk-bitmaps-and-pixmaps.html#GDKPIXMAP" >GdkPixmap</A >* <A HREF="gdk-bitmaps-and-pixmaps.html#GDK-PIXMAP-NEW" >gdk_pixmap_new</A > (<A HREF="gdk-windows.html#GDKWINDOW" >GdkWindow</A > *window, <A HREF=../glib/glib-basic-types.html#GINT >gint</A> width, <A HREF=../glib/glib-basic-types.html#GINT >gint</A> height, <A HREF=../glib/glib-basic-types.html#GINT >gint</A> depth); <A HREF="gdk-bitmaps-and-pixmaps.html#GDKBITMAP" >GdkBitmap</A >* <A HREF="gdk-bitmaps-and-pixmaps.html#GDK-BITMAP-CREATE-FROM-DATA" >gdk_bitmap_create_from_data</A > (<A HREF="gdk-windows.html#GDKWINDOW" >GdkWindow</A > *window, const <A HREF=../glib/glib-basic-types.html#GCHAR >gchar</A> *data, <A HREF=../glib/glib-basic-types.html#GINT >gint</A> width, <A HREF=../glib/glib-basic-types.html#GINT >gint</A> height); <A HREF="gdk-bitmaps-and-pixmaps.html#GDKPIXMAP" >GdkPixmap</A >* <A HREF="gdk-bitmaps-and-pixmaps.html#GDK-PIXMAP-CREATE-FROM-DATA" >gdk_pixmap_create_from_data</A > (<A HREF="gdk-windows.html#GDKWINDOW" >GdkWindow</A > *window, const <A HREF=../glib/glib-basic-types.html#GCHAR >gchar</A> *data, <A HREF=../glib/glib-basic-types.html#GINT >gint</A> width, <A HREF=../glib/glib-basic-types.html#GINT >gint</A> height, <A HREF=../glib/glib-basic-types.html#GINT >gint</A> depth, <A HREF="gdk-colormaps-and-colors.html#GDKCOLOR" >GdkColor</A > *fg, <A HREF="gdk-colormaps-and-colors.html#GDKCOLOR" >GdkColor</A > *bg); <A HREF="gdk-bitmaps-and-pixmaps.html#GDKPIXMAP" >GdkPixmap</A >* <A HREF="gdk-bitmaps-and-pixmaps.html#GDK-PIXMAP-CREATE-FROM-XPM" >gdk_pixmap_create_from_xpm</A > (<A HREF="gdk-windows.html#GDKWINDOW" >GdkWindow</A > *window, <A HREF="gdk-bitmaps-and-pixmaps.html#GDKBITMAP" >GdkBitmap</A > **mask, <A HREF="gdk-colormaps-and-colors.html#GDKCOLOR" >GdkColor</A > *transparent_color, const <A HREF=../glib/glib-basic-types.html#GCHAR >gchar</A> *filename); <A HREF="gdk-bitmaps-and-pixmaps.html#GDKPIXMAP" >GdkPixmap</A >* <A HREF="gdk-bitmaps-and-pixmaps.html#GDK-PIXMAP-COLORMAP-CREATE-FROM-XPM" >gdk_pixmap_colormap_create_from_xpm</A > (<A HREF="gdk-windows.html#GDKWINDOW" >GdkWindow</A > *window, <A HREF="gdk-colormaps-and-colors.html#GDKCOLORMAP" >GdkColormap</A > *colormap, <A HREF="gdk-bitmaps-and-pixmaps.html#GDKBITMAP" >GdkBitmap</A > **mask, <A HREF="gdk-colormaps-and-colors.html#GDKCOLOR" >GdkColor</A > *transparent_color, const <A HREF=../glib/glib-basic-types.html#GCHAR >gchar</A> *filename); <A HREF="gdk-bitmaps-and-pixmaps.html#GDKPIXMAP" >GdkPixmap</A >* <A HREF="gdk-bitmaps-and-pixmaps.html#GDK-PIXMAP-CREATE-FROM-XPM-D" >gdk_pixmap_create_from_xpm_d</A > (<A HREF="gdk-windows.html#GDKWINDOW" >GdkWindow</A > *window, <A HREF="gdk-bitmaps-and-pixmaps.html#GDKBITMAP" >GdkBitmap</A > **mask, <A HREF="gdk-colormaps-and-colors.html#GDKCOLOR" >GdkColor</A > *transparent_color, <A HREF=../glib/glib-basic-types.html#GCHAR >gchar</A> **data); <A HREF="gdk-bitmaps-and-pixmaps.html#GDKPIXMAP" >GdkPixmap</A >* <A HREF="gdk-bitmaps-and-pixmaps.html#GDK-PIXMAP-COLORMAP-CREATE-FROM-XPM-D" >gdk_pixmap_colormap_create_from_xpm_d</A > (<A HREF="gdk-windows.html#GDKWINDOW" >GdkWindow</A > *window, <A HREF="gdk-colormaps-and-colors.html#GDKCOLORMAP" >GdkColormap</A > *colormap, <A HREF="gdk-bitmaps-and-pixmaps.html#GDKBITMAP" >GdkBitmap</A > **mask, <A HREF="gdk-colormaps-and-colors.html#GDKCOLOR" >GdkColor</A > *transparent_color, <A HREF=../glib/glib-basic-types.html#GCHAR >gchar</A> **data); <A HREF="gdk-bitmaps-and-pixmaps.html#GDKPIXMAP" >GdkPixmap</A >* <A HREF="gdk-bitmaps-and-pixmaps.html#GDK-PIXMAP-REF" >gdk_pixmap_ref</A > (<A HREF="gdk-bitmaps-and-pixmaps.html#GDKPIXMAP" >GdkPixmap</A > *pixmap); void <A HREF="gdk-bitmaps-and-pixmaps.html#GDK-PIXMAP-UNREF" >gdk_pixmap_unref</A > (<A HREF="gdk-bitmaps-and-pixmaps.html#GDKPIXMAP" >GdkPixmap</A > *pixmap); struct <A HREF="gdk-bitmaps-and-pixmaps.html#GDKBITMAP" >GdkBitmap</A >; <A HREF="gdk-bitmaps-and-pixmaps.html#GDKBITMAP" >GdkBitmap</A >* <A HREF="gdk-bitmaps-and-pixmaps.html#GDK-BITMAP-REF" >gdk_bitmap_ref</A > (<A HREF="gdk-bitmaps-and-pixmaps.html#GDKBITMAP" >GdkBitmap</A > *pixmap); void <A HREF="gdk-bitmaps-and-pixmaps.html#GDK-BITMAP-UNREF" >gdk_bitmap_unref</A > (<A HREF="gdk-bitmaps-and-pixmaps.html#GDKBITMAP" >GdkBitmap</A > *pixmap);</PRE ></TD ></TR ></TABLE ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN2860" ></A ><H2 >Description</H2 ><P >Pixmaps are offscreen drawables. They can be drawn upon with the standard drawing primitives, then copied to another drawable (such as a <A HREF="gdk-windows.html#GDKWINDOW" >GdkWindow</A >) with gdk_pixmap_draw(). The depth of a pixmap is the number of bits per pixels. Bitmaps are simply pixmaps with a depth of 1. (That is, they are monochrome bitmaps - each pixel can be either on or off).</P ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN2865" ></A ><H2 >Details</H2 ><DIV CLASS="REFSECT2" ><A NAME="AEN2867" ></A ><H3 ><A NAME="GDKPIXMAP" ></A >struct GdkPixmap</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >struct GdkPixmap { gpointer user_data; };</PRE ></TD ></TR ></TABLE ><P >An opaque structure representing an offscreen drawable. Pointers to structures of type <A HREF="gdk-bitmaps-and-pixmaps.html#GDKPIXMAP" >GdkPixmap</A >, <A HREF="gdk-bitmaps-and-pixmaps.html#GDKBITMAP" >GdkBitmap</A >, and <A HREF="gdk-windows.html#GDKWINDOW" >GdkWindow</A >, can often be used interchangeably. The type <A HREF="gdk-windows.html#GDKDRAWABLE" >GdkDrawable</A > refers generically to any of these types.</P ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN2876" ></A ><H3 ><A NAME="GDK-PIXMAP-NEW" ></A >gdk_pixmap_new ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" ><A HREF="gdk-bitmaps-and-pixmaps.html#GDKPIXMAP" >GdkPixmap</A >* gdk_pixmap_new (<A HREF="gdk-windows.html#GDKWINDOW" >GdkWindow</A > *window, <A HREF=../glib/glib-basic-types.html#GINT >gint</A> width, <A HREF=../glib/glib-basic-types.html#GINT >gint</A> height, <A HREF=../glib/glib-basic-types.html#GINT >gint</A> depth);</PRE ></TD ></TR ></TABLE ><P >Create a new pixmap with a given size and depth.</P ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN2886" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >window</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >a <A HREF="gdk-windows.html#GDKWINDOW" >GdkWindow</A >, used to determine default values for the new pixmap. Can be <TT CLASS="LITERAL" >NULL</TT > if <TT CLASS="PARAMETER" ><I >depth</I ></TT > is specified,</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >width</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >The width of the new pixmap in pixels.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >height</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >The height of the new pixmap in pixels.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >depth</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >The depth (number of bits per pixel) of the new pixmap. If -1, and <TT CLASS="PARAMETER" ><I >window</I ></TT > is not <TT CLASS="LITERAL" >NULL</TT >, the depth of the new pixmap will be equal to that of <TT CLASS="PARAMETER" ><I >window</I ></TT >.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><I CLASS="EMPHASIS" >Returns</I > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the <A HREF="gdk-bitmaps-and-pixmaps.html#GDKBITMAP" >GdkBitmap</A > </TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN2918" ></A ><H3 ><A NAME="GDK-BITMAP-CREATE-FROM-DATA" ></A >gdk_bitmap_create_from_data ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" ><A HREF="gdk-bitmaps-and-pixmaps.html#GDKBITMAP" >GdkBitmap</A >* gdk_bitmap_create_from_data (<A HREF="gdk-windows.html#GDKWINDOW" >GdkWindow</A > *window, const <A HREF=../glib/glib-basic-types.html#GCHAR >gchar</A> *data, <A HREF=../glib/glib-basic-types.html#GINT >gint</A> width, <A HREF=../glib/glib-basic-types.html#GINT >gint</A> height);</PRE ></TD ></TR ></TABLE ><P >Creates a new bitmap from data in XBM format.</P ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN2928" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >window</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >a <A HREF="gdk-windows.html#GDKWINDOW" >GdkWindow</A >, used to determine default values for the new pixmap. Can be <TT CLASS="LITERAL" >NULL</TT >, in which case the root window is used.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >data</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >a pointer to the XBM data.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >width</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the width of the new pixmap in pixels.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >height</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the height of the new pixmap in pixels.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><I CLASS="EMPHASIS" >Returns</I > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the <A HREF="gdk-bitmaps-and-pixmaps.html#GDKBITMAP" >GdkBitmap</A > </TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN2956" ></A ><H3 ><A NAME="GDK-PIXMAP-CREATE-FROM-DATA" ></A >gdk_pixmap_create_from_data ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" ><A HREF="gdk-bitmaps-and-pixmaps.html#GDKPIXMAP" >GdkPixmap</A >* gdk_pixmap_create_from_data (<A HREF="gdk-windows.html#GDKWINDOW" >GdkWindow</A > *window, const <A HREF=../glib/glib-basic-types.html#GCHAR >gchar</A> *data, <A HREF=../glib/glib-basic-types.html#GINT >gint</A> width, <A HREF=../glib/glib-basic-types.html#GINT >gint</A> height, <A HREF=../glib/glib-basic-types.html#GINT >gint</A> depth, <A HREF="gdk-colormaps-and-colors.html#GDKCOLOR" >GdkColor</A > *fg, <A HREF="gdk-colormaps-and-colors.html#GDKCOLOR" >GdkColor</A > *bg);</PRE ></TD ></TR ></TABLE ><P >Create a two-color pixmap from data in XBM data.</P ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN2969" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >window</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >a <A HREF="gdk-windows.html#GDKWINDOW" >GdkWindow</A >, used to determine default values for the new pixmap. Can be <TT CLASS="LITERAL" >NULL</TT >, if the depth is given.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >data</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >a pointer to the data.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >width</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the width of the new pixmap in pixels.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >height</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the height of the new pixmap in pixels.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >depth</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the depth (number of bits per pixel) of the new pixmap.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >fg</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the foreground color.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >bg</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the background color.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><I CLASS="EMPHASIS" >Returns</I > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the <A HREF="gdk-bitmaps-and-pixmaps.html#GDKPIXMAP" >GdkPixmap</A > </TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN3009" ></A ><H3 ><A NAME="GDK-PIXMAP-CREATE-FROM-XPM" ></A >gdk_pixmap_create_from_xpm ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" ><A HREF="gdk-bitmaps-and-pixmaps.html#GDKPIXMAP" >GdkPixmap</A >* gdk_pixmap_create_from_xpm (<A HREF="gdk-windows.html#GDKWINDOW" >GdkWindow</A > *window, <A HREF="gdk-bitmaps-and-pixmaps.html#GDKBITMAP" >GdkBitmap</A > **mask, <A HREF="gdk-colormaps-and-colors.html#GDKCOLOR" >GdkColor</A > *transparent_color, const <A HREF=../glib/glib-basic-types.html#GCHAR >gchar</A> *filename);</PRE ></TD ></TR ></TABLE ><P >Create a pixmap from a XPM file.</P ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN3019" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >window</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >a <A HREF="gdk-windows.html#GDKWINDOW" >GdkWindow</A >, used to determine default values for the new pixmap.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >mask</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >a pointer to a place to store a bitmap representing the transparency mask of the XPM file. Can be <TT CLASS="LITERAL" >NULL</TT >, in which case transparency will be ignored.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >transparent_color</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the color to be used for the pixels that are transparent in the input file. Can be <TT CLASS="LITERAL" >NULL</TT >, in which case a default color will be used.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >filename</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the filename of a file containing XPM data.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><I CLASS="EMPHASIS" >Returns</I > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the <A HREF="gdk-bitmaps-and-pixmaps.html#GDKPIXMAP" >GdkPixmap</A > </TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN3048" ></A ><H3 ><A NAME="GDK-PIXMAP-COLORMAP-CREATE-FROM-XPM" ></A >gdk_pixmap_colormap_create_from_xpm ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" ><A HREF="gdk-bitmaps-and-pixmaps.html#GDKPIXMAP" >GdkPixmap</A >* gdk_pixmap_colormap_create_from_xpm (<A HREF="gdk-windows.html#GDKWINDOW" >GdkWindow</A > *window, <A HREF="gdk-colormaps-and-colors.html#GDKCOLORMAP" >GdkColormap</A > *colormap, <A HREF="gdk-bitmaps-and-pixmaps.html#GDKBITMAP" >GdkBitmap</A > **mask, <A HREF="gdk-colormaps-and-colors.html#GDKCOLOR" >GdkColor</A > *transparent_color, const <A HREF=../glib/glib-basic-types.html#GCHAR >gchar</A> *filename);</PRE ></TD ></TR ></TABLE ><P >Create a pixmap from a XPM file using a particular colormap.</P ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN3059" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >window</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >a <A HREF="gdk-windows.html#GDKWINDOW" >GdkWindow</A >, used to determine default values for the new pixmap. Can be <TT CLASS="LITERAL" >NULL</TT > if <TT CLASS="PARAMETER" ><I >colormap</I ></TT > is given.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >colormap</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the <A HREF="gdk-colormaps-and-colors.html#GDKCOLORMAP" >GdkColormap</A > that the new pixmap will be use. If omitted, the colormap for <TT CLASS="PARAMETER" ><I >window</I ></TT > will be used.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >mask</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >a pointer to a place to store a bitmap representing the transparency mask of the XPM file. Can be <TT CLASS="LITERAL" >NULL</TT >, in which case transparency will be ignored.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >transparent_color</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the color to be used for the pixels that are transparent in the input file. Can be <TT CLASS="LITERAL" >NULL</TT >, in which case a default color will be used.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >filename</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the filename of a file containing XPM data.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><I CLASS="EMPHASIS" >Returns</I > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the <A HREF="gdk-bitmaps-and-pixmaps.html#GDKPIXMAP" >GdkPixmap</A >. </TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN3096" ></A ><H3 ><A NAME="GDK-PIXMAP-CREATE-FROM-XPM-D" ></A >gdk_pixmap_create_from_xpm_d ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" ><A HREF="gdk-bitmaps-and-pixmaps.html#GDKPIXMAP" >GdkPixmap</A >* gdk_pixmap_create_from_xpm_d (<A HREF="gdk-windows.html#GDKWINDOW" >GdkWindow</A > *window, <A HREF="gdk-bitmaps-and-pixmaps.html#GDKBITMAP" >GdkBitmap</A > **mask, <A HREF="gdk-colormaps-and-colors.html#GDKCOLOR" >GdkColor</A > *transparent_color, <A HREF=../glib/glib-basic-types.html#GCHAR >gchar</A> **data);</PRE ></TD ></TR ></TABLE ><P >Create a pixmap from data in XPM format.</P ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN3106" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >window</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >a <A HREF="gdk-windows.html#GDKWINDOW" >GdkWindow</A >, used to determine default values for the new pixmap.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >mask</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >Pointer to a place to store a bitmap representing the transparency mask of the XPM file. Can be <TT CLASS="LITERAL" >NULL</TT >, in which case transparency will be ignored.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >transparent_color</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >This color will be used for the pixels that are transparent in the input file. Can be <TT CLASS="LITERAL" >NULL</TT > in which case a default color will be used.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >data</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >Pointer to a string containing the XPM data.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><I CLASS="EMPHASIS" >Returns</I > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the <A HREF="gdk-bitmaps-and-pixmaps.html#GDKPIXMAP" >GdkPixmap</A > </TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN3135" ></A ><H3 ><A NAME="GDK-PIXMAP-COLORMAP-CREATE-FROM-XPM-D" ></A >gdk_pixmap_colormap_create_from_xpm_d ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" ><A HREF="gdk-bitmaps-and-pixmaps.html#GDKPIXMAP" >GdkPixmap</A >* gdk_pixmap_colormap_create_from_xpm_d (<A HREF="gdk-windows.html#GDKWINDOW" >GdkWindow</A > *window, <A HREF="gdk-colormaps-and-colors.html#GDKCOLORMAP" >GdkColormap</A > *colormap, <A HREF="gdk-bitmaps-and-pixmaps.html#GDKBITMAP" >GdkBitmap</A > **mask, <A HREF="gdk-colormaps-and-colors.html#GDKCOLOR" >GdkColor</A > *transparent_color, <A HREF=../glib/glib-basic-types.html#GCHAR >gchar</A> **data);</PRE ></TD ></TR ></TABLE ><P >Create a pixmap from data in XPM format using a particular colormap.</P ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN3146" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >window</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >a <A HREF="gdk-windows.html#GDKWINDOW" >GdkWindow</A >, used to determine default values for the new pixmap. Can be <TT CLASS="LITERAL" >NULL</TT > if <TT CLASS="PARAMETER" ><I >colormap</I ></TT > is given.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >colormap</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the <A HREF="gdk-colormaps-and-colors.html#GDKCOLORMAP" >GdkColormap</A > that the new pixmap will be use. If omitted, the colormap for <TT CLASS="PARAMETER" ><I >window</I ></TT > will be used.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >mask</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >a pointer to a place to store a bitmap representing the transparency mask of the XPM file. Can be <TT CLASS="LITERAL" >NULL</TT >, in which case transparency will be ignored.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >transparent_color</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the color to be used for the pixels that are transparent in the input file. Can be <TT CLASS="LITERAL" >NULL</TT >, in which case a default color will be used.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >data</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >Pointer to a string containing the XPM data.</TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><I CLASS="EMPHASIS" >Returns</I > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >the <A HREF="gdk-bitmaps-and-pixmaps.html#GDKPIXMAP" >GdkPixmap</A >. </TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN3183" ></A ><H3 ><A NAME="GDK-PIXMAP-REF" ></A >gdk_pixmap_ref ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" ><A HREF="gdk-bitmaps-and-pixmaps.html#GDKPIXMAP" >GdkPixmap</A >* gdk_pixmap_ref (<A HREF="gdk-bitmaps-and-pixmaps.html#GDKPIXMAP" >GdkPixmap</A > *pixmap);</PRE ></TD ></TR ></TABLE ><P >Increase the reference count of a pixmap.</P ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN3190" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >pixmap</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >a <A HREF="gdk-bitmaps-and-pixmaps.html#GDKPIXMAP" >GdkPixmap</A ></TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><I CLASS="EMPHASIS" >Returns</I > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >pixmap</I ></TT > </TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN3205" ></A ><H3 ><A NAME="GDK-PIXMAP-UNREF" ></A >gdk_pixmap_unref ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >void gdk_pixmap_unref (<A HREF="gdk-bitmaps-and-pixmaps.html#GDKPIXMAP" >GdkPixmap</A > *pixmap);</PRE ></TD ></TR ></TABLE ><P >Decrease the reference count of a pixmap. If the resulting reference count is zero, destroy the pixmap.</P ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN3211" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >pixmap</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" >a <A HREF="gdk-bitmaps-and-pixmaps.html#GDKPIXMAP" >GdkPixmap</A > </TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN3221" ></A ><H3 ><A NAME="GDKBITMAP" ></A >struct GdkBitmap</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >struct GdkBitmap { gpointer user_data; };</PRE ></TD ></TR ></TABLE ><P >An opaque structure representing an offscreen drawable of depth 1. Pointers to structures of type GdkPixmap, <A HREF="gdk-bitmaps-and-pixmaps.html#GDKBITMAP" >GdkBitmap</A >, and <A HREF="gdk-windows.html#GDKWINDOW" >GdkWindow</A >, can often be used interchangeably. The type <A HREF="gdk-windows.html#GDKDRAWABLE" >GdkDrawable</A > refers generically to any of these types.</P ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN3229" ></A ><H3 ><A NAME="GDK-BITMAP-REF" ></A >gdk_bitmap_ref ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" ><A HREF="gdk-bitmaps-and-pixmaps.html#GDKBITMAP" >GdkBitmap</A >* gdk_bitmap_ref (<A HREF="gdk-bitmaps-and-pixmaps.html#GDKBITMAP" >GdkBitmap</A > *pixmap);</PRE ></TD ></TR ></TABLE ><P >Increase the reference count of a bitmap. An alias for <A HREF="gdk-bitmaps-and-pixmaps.html#GDK-PIXMAP-REF" >gdk_pixmap_ref</A >().</P ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN3237" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >pixmap</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" > </TD ></TR ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><I CLASS="EMPHASIS" >Returns</I > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" > </TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ><HR><DIV CLASS="REFSECT2" ><A NAME="AEN3250" ></A ><H3 ><A NAME="GDK-BITMAP-UNREF" ></A >gdk_bitmap_unref ()</H3 ><TABLE BORDER="0" BGCOLOR="#D6E8FF" WIDTH="100%" CELLPADDING="6" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >void gdk_bitmap_unref (<A HREF="gdk-bitmaps-and-pixmaps.html#GDKBITMAP" >GdkBitmap</A > *pixmap);</PRE ></TD ></TR ></TABLE ><P >Decrease the reference count of a bitmap. An alias for <A HREF="gdk-bitmaps-and-pixmaps.html#GDK-PIXMAP-UNREF" >gdk_pixmap_unref</A >().</P ><DIV CLASS="INFORMALTABLE" ><A NAME="AEN3257" ></A ><P ></P ><TABLE BORDER="0" WIDTH="100%" BGCOLOR="#FFD0D0" CELLSPACING="0" CELLPADDING="4" CLASS="CALSTABLE" ><TBODY ><TR ><TD WIDTH="20%" ALIGN="RIGHT" VALIGN="TOP" ><TT CLASS="PARAMETER" ><I >pixmap</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" > </TD ></TR ></TBODY ></TABLE ><P ></P ></DIV ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><BR CLEAR="all"><BR><TABLE WIDTH="100%" BORDER="0" BGCOLOR="#000000" CELLPADDING="1" CELLSPACING="0" ><TR ><TD WIDTH="25%" BGCOLOR="#C00000" ALIGN="left" ><A HREF="gdk-drawing-primitives.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B ><<< Previous Page</B ></FONT ></A ></TD ><TD WIDTH="25%" BGCOLOR="#0000C0" ALIGN="center" ><FONT COLOR="#FFFFFF" SIZE="3" ><B ><A HREF="index.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Home</B ></FONT ></A ></B ></FONT ></TD ><TD WIDTH="25%" BGCOLOR="#00C000" ALIGN="center" ><FONT COLOR="#FFFFFF" SIZE="3" ><B ><A HREF="gdk.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Up</B ></FONT ></A ></B ></FONT ></TD ><TD WIDTH="25%" BGCOLOR="#C00000" ALIGN="right" ><A HREF="gdk-gdkrgb.html" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Next Page >>></B ></FONT ></A ></TD ></TR ><TR ><TD COLSPAN="2" ALIGN="left" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >Drawing Primitives</B ></FONT ></TD ><TD COLSPAN="2" ALIGN="right" ><FONT COLOR="#FFFFFF" SIZE="3" ><B >GdkRGB</B ></FONT ></TD ></TR ></TABLE ></DIV ></BODY ></HTML >