Index

Package: Image

Description

package Gtk.Image is

The Gtk_Image widget displays a graphical image. The image is typically created using Gdk.Image.Gdk_New.

The pixels in a Gtk_Image may be manipulated by the application after creation, as Gtk_Image store the pixel data on the client side. If you wish to store the pixel data on the server side (thus not allowing manipulation of the data after creation) you should use Gtk_Pixmap.

Binding from C File version 2.16.6

Screenshot

gtk-image.png

Packages

Classes

Gtk_Image_Record

type Gtk_Image_Record is new Gtk.Misc.Gtk_Misc_Record with private;

Ancestors:

Primitive operations:

Get_Icon_Name
Get_Pixel_Size
Get_Storage_Type
Glib.Object.Deallocate (Inherited)
Glib.Object.Notify (Inherited)
Glib.Object.Ref (Inherited)
Glib.Object.Unref (Inherited)
Gtk.Misc.Get_Alignment (Inherited)
Gtk.Misc.Get_Padding (Inherited)
Gtk.Misc.Set_Alignment (Inherited)
Gtk.Misc.Set_Padding (Inherited)
Gtk.Object.Destroy (Inherited)
Gtk.Object.Flag_Is_Set (Inherited)
Gtk.Object.Flags (Inherited)
Gtk.Object.Get_Type (Inherited)
Gtk.Object.Set_Flags (Inherited)
Gtk.Object.Sink (Inherited)
Gtk.Object.Unset_Flags (Inherited)
Gtk.Widget.Activate (Inherited)
Gtk.Widget.Add_Accelerator (Inherited)
Gtk.Widget.Add_Events (Inherited)
Gtk.Widget.Add_Mnemonic_Label (Inherited)
Gtk.Widget.Can_Activate_Accel (Inherited)
Gtk.Widget.Child_Notify (Inherited)
Gtk.Widget.Class_Path (Inherited)
Gtk.Widget.Class_Path_Reversed (Inherited)
Gtk.Widget.Create_Pango_Context (Inherited)
Gtk.Widget.Create_Pango_Layout (Inherited)
Gtk.Widget.Draw (Inherited)
Gtk.Widget.Ensure_Style (Inherited)
Gtk.Widget.Error_Bell (Inherited)
Gtk.Widget.Freeze_Child_Notify (Inherited)
Gtk.Widget.Get_Allocation_Height (Inherited)
Gtk.Widget.Get_Allocation_Width (Inherited)
Gtk.Widget.Get_Allocation_X (Inherited)
Gtk.Widget.Get_Allocation_Y (Inherited)
Gtk.Widget.Get_Ancestor (Inherited)
Gtk.Widget.Get_Child_Requisition (Inherited)
Gtk.Widget.Get_Child_Visible (Inherited)
Gtk.Widget.Get_Colormap (Inherited)
Gtk.Widget.Get_Composite_Name (Inherited)
Gtk.Widget.Get_Direction (Inherited)
Gtk.Widget.Get_Events (Inherited)
Gtk.Widget.Get_Extension_Events (Inherited)
Gtk.Widget.Get_Has_Tooltip (Inherited)
Gtk.Widget.Get_Name (Inherited)
Gtk.Widget.Get_No_Show_All (Inherited)
Gtk.Widget.Get_Pango_Context (Inherited)
Gtk.Widget.Get_Parent (Inherited)
Gtk.Widget.Get_Parent_Window (Inherited)
Gtk.Widget.Get_Pointer (Inherited)
Gtk.Widget.Get_Root_Window (Inherited)
Gtk.Widget.Get_Size_Request (Inherited)
Gtk.Widget.Get_Snapshot (Inherited)
Gtk.Widget.Get_State (Inherited)
Gtk.Widget.Get_Style (Inherited)
Gtk.Widget.Get_Tooltip_Markup (Inherited)
Gtk.Widget.Get_Tooltip_Text (Inherited)
Gtk.Widget.Get_Tooltip_Window (Inherited)
Gtk.Widget.Get_Toplevel (Inherited)
Gtk.Widget.Get_Visual (Inherited)
Gtk.Widget.Get_Window (Inherited)
Gtk.Widget.Grab_Default (Inherited)
Gtk.Widget.Grab_Focus (Inherited)
Gtk.Widget.Has_Screen (Inherited)
Gtk.Widget.Hide (Inherited)
Gtk.Widget.Hide_All (Inherited)
Gtk.Widget.Input_Shape_Combine_Mask (Inherited)
Gtk.Widget.Intersect (Inherited)
Gtk.Widget.Is_Ancestor (Inherited)
Gtk.Widget.Is_Composited (Inherited)
Gtk.Widget.Is_Focus (Inherited)
Gtk.Widget.Keynav_Failed (Inherited)
Gtk.Widget.List_Mnemonic_Labels (Inherited)
Gtk.Widget.Map (Inherited)
Gtk.Widget.Mnemonic_Activate (Inherited)
Gtk.Widget.Modify_Base (Inherited)
Gtk.Widget.Modify_Bg (Inherited)
Gtk.Widget.Modify_Cursor (Inherited)
Gtk.Widget.Modify_Fg (Inherited)
Gtk.Widget.Modify_Font (Inherited)
Gtk.Widget.Modify_Text (Inherited)
Gtk.Widget.Path (Inherited)
Gtk.Widget.Path_Reversed (Inherited)
Gtk.Widget.Queue_Clear (Inherited)
Gtk.Widget.Queue_Clear_Area (Inherited)
Gtk.Widget.Queue_Draw (Inherited)
Gtk.Widget.Queue_Draw_Area (Inherited)
Gtk.Widget.Queue_Resize (Inherited)
Gtk.Widget.Queue_Resize_No_Redraw (Inherited)
Gtk.Widget.Realize (Inherited)
Gtk.Widget.Region_Intersect (Inherited)
Gtk.Widget.Remove_Accelerator (Inherited)
Gtk.Widget.Remove_Mnemonic_Label (Inherited)
Gtk.Widget.Render_Icon (Inherited)
Gtk.Widget.Reparent (Inherited)
Gtk.Widget.Reset_Rc_Styles (Inherited)
Gtk.Widget.Reset_Shapes (Inherited)
Gtk.Widget.Restore_Default_Style (Inherited)
Gtk.Widget.Send_Expose (Inherited)
Gtk.Widget.Set_Accel_Path (Inherited)
Gtk.Widget.Set_App_Paintable (Inherited)
Gtk.Widget.Set_Child_Visible (Inherited)
Gtk.Widget.Set_Colormap (Inherited)
Gtk.Widget.Set_Composite_Name (Inherited)
Gtk.Widget.Set_Direction (Inherited)
Gtk.Widget.Set_Double_Buffered (Inherited)
Gtk.Widget.Set_Events (Inherited)
Gtk.Widget.Set_Extension_Events (Inherited)
Gtk.Widget.Set_Has_Tooltip (Inherited)
Gtk.Widget.Set_Name (Inherited)
Gtk.Widget.Set_No_Show_All (Inherited)
Gtk.Widget.Set_Parent (Inherited)
Gtk.Widget.Set_Parent_Window (Inherited)
Gtk.Widget.Set_Redraw_On_Allocate (Inherited)
Gtk.Widget.Set_Scroll_Adjustments (Inherited)
Gtk.Widget.Set_Sensitive (Inherited)
Gtk.Widget.Set_Size_Request (Inherited)
Gtk.Widget.Set_State (Inherited)
Gtk.Widget.Set_Style (Inherited)
Gtk.Widget.Set_Tooltip_Markup (Inherited)
Gtk.Widget.Set_Tooltip_Text (Inherited)
Gtk.Widget.Set_Tooltip_Window (Inherited)
Gtk.Widget.Set_UPosition (Inherited)
Gtk.Widget.Set_USize (Inherited)
Gtk.Widget.Set_Window (Inherited)
Gtk.Widget.Shape_Combine_Mask (Inherited)
Gtk.Widget.Show (Inherited)
Gtk.Widget.Show_All (Inherited)
Gtk.Widget.Show_Now (Inherited)
Gtk.Widget.Size_Allocate (Inherited)
Gtk.Widget.Size_Request (Inherited)
Gtk.Widget.Style_Get_Property (Inherited)
Gtk.Widget.Thaw_Child_Notify (Inherited)
Gtk.Widget.Trigger_Tooltip_Query (Inherited)
Gtk.Widget.Unmap (Inherited)
Gtk.Widget.Unrealize (Inherited)
Set_From_Icon_Name
Set_Pixel_Size

Types

Gtk_Image

type Gtk_Image is access all Gtk_Image_Record'Class;

Gtk_Image_Type

type Gtk_Image_Type is
     (Image_Empty,
      Image_Pixmap,
      Image_Image,
      Image_Pixbuf,
      Image_Stock,
      Image_Icon_Set,
      Image_Animation,
      Image_Icon_Name,
      Image_Gicon);

Property_Image_Type

type Property_Image_Type is new Image_Type_Properties.Property;

Constants & Global variables

Icon_Name_Property (Glib.Properties.Property_String)

Icon_Name_Property        : constant Glib.Properties.Property_String;
Icon_Set_Property : constant Glib.Properties.Property_Boxed;

Icon_Size_Property (Glib.Properties.Property_Int)

Icon_Size_Property        : constant Glib.Properties.Property_Int;
Icon_Set_Property : constant Glib.Properties.Property_Boxed;

Pixbuf_Animation_Property (Glib.Properties.Property_Object)

Pixbuf_Animation_Property : constant Glib.Properties.Property_Object;

Pixel_Size_Property (Glib.Properties.Property_Int)

Pixel_Size_Property       : constant Glib.Properties.Property_Int;

Storage_Type_Property (Property_Image_Type)

Storage_Type_Property     : constant Property_Image_Type;

Subprograms & Entries

Gtk_New

procedure Gtk_New    
(Image: out Gtk_Image);

Initialize

procedure Initialize 
(Image: access Gtk_Image_Record'Class);
Creates a new empty image

Gtk_New

procedure Gtk_New 
(Image: out Gtk_Image;
Val: Gdk.Image.Gdk_Image;
Mask: Gdk.Bitmap.Gdk_Bitmap);

Initialize

procedure Initialize 
(Image: access Gtk_Image_Record'Class;
Val: Gdk.Image.Gdk_Image;
Mask: Gdk.Bitmap.Gdk_Bitmap);
Creates or initializes an image

Gtk_New

procedure Gtk_New 
(Image: out Gtk_Image;
Pixmap: Gdk.Pixmap.Gdk_Pixmap;
Mask: Gdk.Bitmap.Gdk_Bitmap);

Initialize

procedure Initialize 
(Image: access Gtk_Image_Record'Class;
Pixmap: Gdk.Pixmap.Gdk_Pixmap;
Mask: Gdk.Bitmap.Gdk_Bitmap);
Creates or initializes an image from its components

Gtk_New

procedure Gtk_New 
(Image: out Gtk_Image;
Filename: String);

Initialize

procedure Initialize 
(Image: access Gtk_Image_Record'Class;
Filename: String);
Creates or initializes an image from a file

Gtk_New

procedure Gtk_New 
(Image: out Gtk_Image;
Pixbuf: Gdk.Pixbuf.Gdk_Pixbuf);

Initialize

procedure Initialize 
(Image: access Gtk_Image_Record'Class;
Pixbuf: Gdk.Pixbuf.Gdk_Pixbuf);
Creates or initializes an image from an existing pixbuf

Gtk_New

procedure Gtk_New 
(Image: out Gtk_Image;
Stock_Id: String;
Size: Gtk.Enums.Gtk_Icon_Size);

Initialize

procedure Initialize 
(Image: access Gtk_Image_Record'Class;
Stock_Id: String;
Size: Gtk.Enums.Gtk_Icon_Size);
Creates or initializes an image from one of the predefined images of gtk+ (see gtk-stock.ads). The image will be scaled to the appropriate format.

Gtk_New

procedure Gtk_New 
(Image: out Gtk_Image;
Icon_Set: Gtk.Icon_Factory.Gtk_Icon_Set;
Size: Gtk.Enums.Gtk_Icon_Size);

Initialize

procedure Initialize 
(Image: access Gtk_Image_Record'Class;
Icon_Set: Gtk.Icon_Factory.Gtk_Icon_Set;
Size: Gtk.Enums.Gtk_Icon_Size);
Creates or initializes an image from a set of icons

Gtk_New

procedure Gtk_New 
(Image: out Gtk_Image;
Animation: Gdk.Pixbuf.Gdk_Pixbuf_Animation);

Initialize

procedure Initialize 
(Image: access Gtk_Image_Record'Class;
Animation: Gdk.Pixbuf.Gdk_Pixbuf_Animation);
Create or initializes a GtkImage displaying the given animation.

Gtk_New_From_Icon_Name

procedure Gtk_New_From_Icon_Name 
(Image: out Gtk_Image;
Icon_Name: String;
Size: Gtk.Enums.Gtk_Icon_Size);

Initialize_From_Icon_Name

procedure Initialize_From_Icon_Name 
(Image: access Gtk_Image_Record'Class;
Icon_Name: String;
Size: Gtk.Enums.Gtk_Icon_Size);
Creates or initialized an image displaying an icon from the current icon theme. If the icon name isn't known, a "broken image" icon will be displayed instead. If the current icon theme is changed, the icon will be updated appropriately.

Gtk_New_From_Gicon

procedure Gtk_New_From_Gicon 
(Image: out Gtk_Image;
Icon: Glib.G_Icon.G_Icon;
Size: Gtk.Enums.Gtk_Icon_Size);

Initialize_From_Gicon

procedure Initialize_From_Gicon 
(Image: access Gtk_Image_Record'Class;
Icon: Glib.G_Icon.G_Icon;
Size: Gtk.Enums.Gtk_Icon_Size);
Creates a Gtk_Image displaying an icon from the current icon theme. If the icon name isn't known, a "broken image" icon will be displayed instead. If the current icon theme is changed, the icon will be updated appropriately.

Get_Type

function Get_Type return Glib.GType;
Return the internal value associated with a Gtk_Image.

Set

procedure Set 
(Image: access Gtk_Image_Record;
Pixmap: Gdk.Pixmap.Gdk_Pixmap;
Mask: Gdk.Bitmap.Gdk_Bitmap);

Get

procedure Get 
(Image: access Gtk_Image_Record;
Pixmap: out Gdk.Pixmap.Gdk_Pixmap;
Mask: out Gdk.Bitmap.Gdk_Bitmap);
Set or Get the values of a Gtk_Image. Mask indicates which parts of the image should be transparent.

Set

procedure Set 
(Image: access Gtk_Image_Record;
Val: Gdk.Image.Gdk_Image;
Mask: Gdk.Bitmap.Gdk_Bitmap);

Get

procedure Get 
(Image: access Gtk_Image_Record;
Val: out Gdk.Image.Gdk_Image;
Mask: out Gdk.Bitmap.Gdk_Bitmap);
Set or Get the value of a Gtk_Image. Mask indicates which parts of the image should be transparent.

Set

procedure Set 
(Image: access Gtk_Image_Record;
File: String);

Set

procedure Set 
(Image: access Gtk_Image_Record;
Pixbuf: Gdk.Pixbuf.Gdk_Pixbuf);

Get

function Get 
(Image: access Gtk_Image_Record) return Gdk.Pixbuf.Gdk_Pixbuf;
Set or get the image stored in Image

Set

procedure Set 
(Image: access Gtk_Image_Record;
Stock_Id: String;
Size: Gtk.Enums.Gtk_Icon_Size);

Get

function Get 
(Image: access Gtk_Image_Record;
Size: access Gtk.Enums.Gtk_Icon_Size) return String;
Set or get the image stored in Image

Get

procedure Get 
(Image: access Gtk_Image_Record;
Icon_Set: out Gtk.Icon_Factory.Gtk_Icon_Set;
Size: out Gtk.Enums.Gtk_Icon_Size);
Set or get the image stored in Image

Set

procedure Set 
(Image: access Gtk_Image_Record;
Animation: Gdk.Pixbuf.Gdk_Pixbuf_Animation);

Get

function Get 
(Image: access Gtk_Image_Record) return Gdk.Pixbuf.Gdk_Pixbuf_Animation;
Get the Pixbuf Animation being displayed by the given Image. The reference counter for the returned animation is not incremented. This must be done separately if needed.

Set

procedure Set 
(Image: access Gtk_Image_Record;
Icon: Glib.G_Icon.G_Icon;
Size: Gtk.Enums.Gtk_Icon_Size);

Get

procedure Get 
(Image: access Gtk_Image_Record;
Icon: out Glib.G_Icon.G_Icon;
Size: out Gtk.Enums.Gtk_Icon_Size);
Sets/Gets the G_Icon and size being displayed by the Gtk_Image. For Get, the storage type of the image must be Image_Empty or Image_Gicon (see Get_Storage_Type). The caller of the Get subprogram does not own a reference to the returned G_Icon.

Get_Storage_Type

function Get_Storage_Type 
(Image: access Gtk_Image_Record) return Gtk_Image_Type;
Indicates how the image was created

Clear

procedure Clear 
(Image: access Gtk_Image_Record);
Resets the image to be empty.

Set_From_Icon_Name

procedure Set_From_Icon_Name 
(Image: access Gtk_Image_Record;
Icon_Name: String;
Size: Gtk.Enums.Gtk_Icon_Size);

Get_Icon_Name

procedure Get_Icon_Name 
(Image: access Gtk_Image_Record;
Name: out GNAT.Strings.String_Access;
Size: out Gtk.Enums.Gtk_Icon_Size);
Gets the icon name and size being displayed by the image The storage type of the image must be Image_Empty or Image_Icon_Name. The returned string must be freed by the caller.

Set_Pixel_Size

procedure Set_Pixel_Size 
(Image: access Gtk_Image_Record;
Pixel_Size: Gint);

Get_Pixel_Size

function Get_Pixel_Size 
(Image: access Gtk_Image_Record) return Gint;
Sets or Gets the pixel size used for named icons. If the pixel size is set to a value different from -1, it is used instead of the icon size set by Set_From_Icon_Name.