XfcePanelImage

XfcePanelImage — Scalable image suitable for panel plugins

Functions

Properties

GdkPixbuf * pixbuf Read / Write
int size Read / Write
char * source Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── XfcePanelImage

Implemented Interfaces

XfcePanelImage implements AtkImplementorIface and GtkBuildable.

Includes

#include <libxfce4panel/libxfce4panel.h>

Description

XfcePanelImage has been deprecated since 4.18.1. It was mainly useful with GTK 2, and is not really adapted to GTK 3. Use GtkImage instead, and xfce_panel_set_image_from_source().

The XfcePanelImage is a widgets suitable for for example panel buttons where the developer does not exacly know the size of the image (due to theming and user setting).

The XfcePanelImage widget automatically scales to the allocated size of the widget. Because of that nature it never requests a size, so this will only work if you pack the image in another widget that will expand it. If you want to force an image size you can use xfce_panel_image_set_size() to set a pixel size, in that case the widget will request an fixed size which makes it usefull for usage in dialogs.

Functions

xfce_panel_image_new ()

GtkWidget *
xfce_panel_image_new (void);

xfce_panel_image_new has been deprecated since version 4.18.1 and should not be used in newly-written code.

Use gtk_image_new() instead.

Creates a new empty XfcePanelImage widget.

Returns

a newly created XfcePanelImage widget.

Since: 4.8


xfce_panel_image_new_from_pixbuf ()

GtkWidget *
xfce_panel_image_new_from_pixbuf (GdkPixbuf *pixbuf);

xfce_panel_image_new_from_pixbuf has been deprecated since version 4.18.1 and should not be used in newly-written code.

Use gtk_image_new_from_pixbuf() instead.

Creates a new XfcePanelImage displaying pixbuf . XfcePanelImage will add its own reference rather than adopting yours. You don't need to scale the pixbuf to the correct size, the XfcePanelImage will take care of that based on the allocation of the widget or the size set with xfce_panel_image_set_size().

Parameters

pixbuf

a GdkPixbuf, or NULL.

[allow-none]

Returns

a newly created XfcePanelImage widget.

Since: 4.8


xfce_panel_image_new_from_source ()

GtkWidget *
xfce_panel_image_new_from_source (const gchar *source);

xfce_panel_image_new_from_source has been deprecated since version 4.18.1 and should not be used in newly-written code.

Use gtk_image_new() and xfce_panel_set_image_from_source() instead.

Creates a new XfcePanelImage displaying source . XfcePanelImage will detect if source points to an absolute file or it and icon-name. For icon-names it will also look for files in the pixbuf folder or strip the extensions, which makes it suitable for usage with icon keys in .desktop files.

Parameters

source

source of the image. This can be an absolute path or an icon-name or NULL.

[allow-none]

Returns

a newly created XfcePanelImage widget.

Since: 4.8


xfce_panel_image_set_from_pixbuf ()

void
xfce_panel_image_set_from_pixbuf (XfcePanelImage *image,
                                  GdkPixbuf *pixbuf);

xfce_panel_image_set_from_pixbuf has been deprecated since version 4.18.1 and should not be used in newly-written code.

Use gtk_image_set_from_pixbuf().

See xfce_panel_image_new_from_pixbuf() for details.

Parameters

image

an XfcePanelImage.

 

pixbuf

a GdkPixbuf, or NULL.

[allow-none]

Since: 4.8


xfce_panel_image_set_from_source ()

void
xfce_panel_image_set_from_source (XfcePanelImage *image,
                                  const gchar *source);

xfce_panel_image_set_from_source has been deprecated since version 4.18.1 and should not be used in newly-written code.

Use xfce_panel_set_image_from_source() instead.

See xfce_panel_image_new_from_source() for details.

Parameters

image

an XfcePanelImage.

 

source

source of the image. This can be an absolute path or an icon-name or NULL.

[allow-none]

Since: 4.8


xfce_panel_image_set_size ()

void
xfce_panel_image_set_size (XfcePanelImage *image,
                           gint size);

xfce_panel_image_set_size has been deprecated since version 4.18.1 and should not be used in newly-written code.

Use gtk_image_set_pixel_size() or set the size from the GtkImage storage type instead.

This will force an image size, instead of looking at the allocation size, see introduction for more details. You can set a size of -1 to turn this off.

Parameters

image

an XfcePanelImage.

 

size

a new size in pixels.

 

Since: 4.8


xfce_panel_image_get_size ()

gint
xfce_panel_image_get_size (XfcePanelImage *image);

xfce_panel_image_get_size has been deprecated since version 4.18.1 and should not be used in newly-written code.

Use gtk_image_get_pixel_size() or get the size from the GtkImage storage type instead.

The size of the image, set by xfce_panel_image_set_size() or -1 if no size is forced and the image is scaled to the allocation size.

Parameters

image

an XfcePanelImage.

 

Returns

icon size in pixels of the image or -1.

Since: 4.8


xfce_panel_image_clear ()

void
xfce_panel_image_clear (XfcePanelImage *image);

xfce_panel_image_clear has been deprecated since version 4.18.1 and should not be used in newly-written code.

Use gtk_image_clear() instead.

Resets the image to be empty.

Parameters

image

an XfcePanelImage.

 

Since: 4.8

Types and Values

struct XfcePanelImage

struct XfcePanelImage;

This struct contain private data only and should be accessed by the functions below.

Property Details

The “pixbuf” property

  “pixbuf”                   GdkPixbuf *

Pixbuf image.

XfcePanelImage:pixbuf has been deprecated since version 4.18.1 and should not be used in newly-written code.

Use “pixbuf” instead.

Owner: XfcePanelImage

Flags: Read / Write


The “size” property

  “size”                     int

Pixel size of the image.

XfcePanelImage:size has been deprecated since version 4.18.1 and should not be used in newly-written code.

Use “pixel-size” instead.

Owner: XfcePanelImage

Flags: Read / Write

Allowed values: [-1,128]

Default value: -1


The “source” property

  “source”                   char *

Icon or filename.

XfcePanelImage:source has been deprecated since version 4.18.1 and should not be used in newly-written code.

Use “storage-type” instead.

Owner: XfcePanelImage

Flags: Read / Write

Default value: NULL