GnomePixmap

Name

GnomePixmap -- A widget to display and load images (pixmaps)

Synopsis


#include <gnome.h>


struct      GnomePixmap;
GtkWidget*  gnome_pixmap_new_from_file      (const char *filename);
GtkWidget*  gnome_pixmap_new_from_file_at_size
                                            (const char *filename,
                                             int width,
                                             int height);
GtkWidget*  gnome_pixmap_new_from_xpm_d     (char **xpm_data);
GtkWidget*  gnome_pixmap_new_from_xpm_d_at_size
                                            (char **xpm_data,
                                             int width,
                                             int height);
GtkWidget*  gnome_pixmap_new_from_rgb_d     (unsigned char *data,
                                             unsigned char *alpha,
                                             int rgb_width,
                                             int rgb_height);
GtkWidget*  gnome_pixmap_new_from_rgb_d_shaped
                                            (unsigned char *data,
                                             unsigned char *alpha,
                                             int rgb_width,
                                             int rgb_height,
                                             GdkImlibColor *shape_color);
GtkWidget*  gnome_pixmap_new_from_rgb_d_shaped_at_size
                                            (unsigned char *data,
                                             unsigned char *alpha,
                                             int rgb_width,
                                             int rgb_height,
                                             int width,
                                             int height,
                                             GdkImlibColor *shape_color);
GtkWidget*  gnome_pixmap_new_from_rgb_d_at_size
                                            (unsigned char *data,
                                             unsigned char *alpha,
                                             int rgb_width,
                                             int rgb_height,
                                             int width,
                                             int height);
GtkWidget*  gnome_pixmap_new_from_gnome_pixmap
                                            (GnomePixmap *gpixmap);
GtkWidget*  gnome_pixmap_new_from_imlib     (GdkImlibImage *im);
GtkWidget*  gnome_pixmap_new_from_imlib_at_size
                                            (GdkImlibImage *im,
                                             int width,
                                             int height);
void        gnome_pixmap_load_file          (GnomePixmap *gpixmap,
                                             const char *filename);
void        gnome_pixmap_load_file_at_size  (GnomePixmap *gpixmap,
                                             const char *filename,
                                             int width,
                                             int height);
void        gnome_pixmap_load_xpm_d         (GnomePixmap *gpixmap,
                                             char **xpm_data);
void        gnome_pixmap_load_xpm_d_at_size (GnomePixmap *gpixmap,
                                             char **xpm_data,
                                             int width,
                                             int height);
void        gnome_pixmap_load_rgb_d         (GnomePixmap *gpixmap,
                                             unsigned char *data,
                                             unsigned char *alpha,
                                             int rgb_width,
                                             int rgb_height);
void        gnome_pixmap_load_rgb_d_shaped  (GnomePixmap *gpixmap,
                                             unsigned char *data,
                                             unsigned char *alpha,
                                             int rgb_width,
                                             int rgb_height,
                                             GdkImlibColor *shape_color);
void        gnome_pixmap_load_rgb_d_shaped_at_size
                                            (GnomePixmap *gpixmap,
                                             unsigned char *data,
                                             unsigned char *alpha,
                                             int rgb_width,
                                             int rgb_height,
                                             int width,
                                             int height,
                                             GdkImlibColor *shape_color);
void        gnome_pixmap_load_rgb_d_at_size (GnomePixmap *gpixmap,
                                             unsigned char *data,
                                             unsigned char *alpha,
                                             int rgb_width,
                                             int rgb_height,
                                             int width,
                                             int height);
void        gnome_pixmap_load_imlib         (GnomePixmap *gpixmap,
                                             GdkImlibImage *im);
void        gnome_pixmap_load_imlib_at_size (GnomePixmap *gpixmap,
                                             GdkImlibImage *im,
                                             int width,
                                             int height);

Object Hierarchy


  GtkObject
   +----GtkWidget
         +----GnomePixmap

Description

This widget can display an image created or provided by a number of sources (a file from various supported file formats, memory, in-memory-xpm, Imlib handle, RGB buffer) and it can scale the image during the load process.

The GnomePixmap widget is particularly useful, as it load an image and provides it as a GtkWidget. While doing this, it does also make sure that the visuals and colormaps are correctly set so that the application will work properly on multi-depth display machines.

You should use this widget instead of the less powerful and more error-prone GtkPixmap widget.

Details

struct GnomePixmap

struct GnomePixmap;


gnome_pixmap_new_from_file ()

GtkWidget*  gnome_pixmap_new_from_file      (const char *filename);

Returns a widget that contains the image, or NULL if it fails to load the image.


gnome_pixmap_new_from_file_at_size ()

GtkWidget*  gnome_pixmap_new_from_file_at_size
                                            (const char *filename,
                                             int width,
                                             int height);

Returns a widget that contains the image scaled to width by height pixels, or NULL if it fails to load the image.


gnome_pixmap_new_from_xpm_d ()

GtkWidget*  gnome_pixmap_new_from_xpm_d     (char **xpm_data);

Returns a widget that contains the image, or NULL if it fails to load the image.


gnome_pixmap_new_from_xpm_d_at_size ()

GtkWidget*  gnome_pixmap_new_from_xpm_d_at_size
                                            (char **xpm_data,
                                             int width,
                                             int height);

Returns a widget that contains the image scaled to width by height pixels, or NULL if it fails to load the image.


gnome_pixmap_new_from_rgb_d ()

GtkWidget*  gnome_pixmap_new_from_rgb_d     (unsigned char *data,
                                             unsigned char *alpha,
                                             int rgb_width,
                                             int rgb_height);

Returns a widget that contains the image, or NULL if it fails to load the image.


gnome_pixmap_new_from_rgb_d_shaped ()

GtkWidget*  gnome_pixmap_new_from_rgb_d_shaped
                                            (unsigned char *data,
                                             unsigned char *alpha,
                                             int rgb_width,
                                             int rgb_height,
                                             GdkImlibColor *shape_color);

Returns a widget that contains the image, or NULL if it fails to load the image.


gnome_pixmap_new_from_rgb_d_shaped_at_size ()

GtkWidget*  gnome_pixmap_new_from_rgb_d_shaped_at_size
                                            (unsigned char *data,
                                             unsigned char *alpha,
                                             int rgb_width,
                                             int rgb_height,
                                             int width,
                                             int height,
                                             GdkImlibColor *shape_color);

Returns a widget that contains the image scaled to width by height pixels, or NULL if it fails to load the image.


gnome_pixmap_new_from_rgb_d_at_size ()

GtkWidget*  gnome_pixmap_new_from_rgb_d_at_size
                                            (unsigned char *data,
                                             unsigned char *alpha,
                                             int rgb_width,
                                             int rgb_height,
                                             int width,
                                             int height);

Returns a widget that contains the image scaled to width by height pixels, or NULL if it fails to load the image.


gnome_pixmap_new_from_gnome_pixmap ()

GtkWidget*  gnome_pixmap_new_from_gnome_pixmap
                                            (GnomePixmap *gpixmap);

Returns a widget that contains a copy of gpixmap_old


gnome_pixmap_new_from_imlib ()

GtkWidget*  gnome_pixmap_new_from_imlib     (GdkImlibImage *im);

Returns a widget that contains the image, or NULL if it fails to load the image. Note that im will not be rendered after this call.


gnome_pixmap_new_from_imlib_at_size ()

GtkWidget*  gnome_pixmap_new_from_imlib_at_size
                                            (GdkImlibImage *im,
                                             int width,
                                             int height);

Returns a widget that contains the image scaled to width by height pixels, or NULL if it fails to load the image. Note that im will not be * rendered after this call.


gnome_pixmap_load_file ()

void        gnome_pixmap_load_file          (GnomePixmap *gpixmap,
                                             const char *filename);

Sets the gnome pixmap to image stored in filename.


gnome_pixmap_load_file_at_size ()

void        gnome_pixmap_load_file_at_size  (GnomePixmap *gpixmap,
                                             const char *filename,
                                             int width,
                                             int height);

Sets the gnome pixmap to image stored in filename scaled to width and height pixels.


gnome_pixmap_load_xpm_d ()

void        gnome_pixmap_load_xpm_d         (GnomePixmap *gpixmap,
                                             char **xpm_data);

Sets the gnome pixmap to image stored in xpm_data.


gnome_pixmap_load_xpm_d_at_size ()

void        gnome_pixmap_load_xpm_d_at_size (GnomePixmap *gpixmap,
                                             char **xpm_data,
                                             int width,
                                             int height);

Sets the gnome pixmap to image stored in xpm_data scaled to width and height pixels.


gnome_pixmap_load_rgb_d ()

void        gnome_pixmap_load_rgb_d         (GnomePixmap *gpixmap,
                                             unsigned char *data,
                                             unsigned char *alpha,
                                             int rgb_width,
                                             int rgb_height);

Sets the gnome pixmap to the image.


gnome_pixmap_load_rgb_d_shaped ()

void        gnome_pixmap_load_rgb_d_shaped  (GnomePixmap *gpixmap,
                                             unsigned char *data,
                                             unsigned char *alpha,
                                             int rgb_width,
                                             int rgb_height,
                                             GdkImlibColor *shape_color);

Sets the gnome pixmap to the image.


gnome_pixmap_load_rgb_d_shaped_at_size ()

void        gnome_pixmap_load_rgb_d_shaped_at_size
                                            (GnomePixmap *gpixmap,
                                             unsigned char *data,
                                             unsigned char *alpha,
                                             int rgb_width,
                                             int rgb_height,
                                             int width,
                                             int height,
                                             GdkImlibColor *shape_color);

Sets the gnome pixmap to the image scaled to width and height pixels.


gnome_pixmap_load_rgb_d_at_size ()

void        gnome_pixmap_load_rgb_d_at_size (GnomePixmap *gpixmap,
                                             unsigned char *data,
                                             unsigned char *alpha,
                                             int rgb_width,
                                             int rgb_height,
                                             int width,
                                             int height);

Sets the gnome pixmap to the image scaled to width and height pixels.


gnome_pixmap_load_imlib ()

void        gnome_pixmap_load_imlib         (GnomePixmap *gpixmap,
                                             GdkImlibImage *im);

Sets the gnome pixmap to image stored in im. Note that im will not be rendered after this call.


gnome_pixmap_load_imlib_at_size ()

void        gnome_pixmap_load_imlib_at_size (GnomePixmap *gpixmap,
                                             GdkImlibImage *im,
                                             int width,
                                             int height);

Sets the gnome pixmap to image stored in im scaled to width and height pixels. Note that im will not be rendered after this call.

See Also

GdkImlib