package ocgtk

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Wrappers.Image

type t = [ `image | `widget | `initially_unowned | `object_ ] Gobject.obj
val new_ : unit -> t

Create a new Image

val new_from_file : string -> t

Create a new Image

val new_from_gicon : Ocgtk_gio.Gio.Wrappers.Icon.t -> t

Create a new Image

val new_from_icon_name : string option -> t

Create a new Image

val new_from_paintable : Ocgtk_gdk.Gdk.Wrappers.Paintable.t option -> t

Create a new Image

val new_from_pixbuf : Ocgtk_gdkpixbuf.GdkPixbuf.Wrappers.Pixbuf.t option -> t

Create a new Image

val new_from_resource : string -> t

Create a new Image

val set_pixel_size : t -> int -> unit

Sets the pixel size to use for named icons.

If the pixel size is set to a value != -1, it is used instead of the icon size set by method@Gtk.Image.set_from_icon_name.

val set_icon_size : t -> Gtk_enums.iconsize -> unit

Suggests an icon size to the theme for named icons.

val set_from_resource : t -> string option -> unit

Sets a `GtkImage` to show a resource.

See ctor@Gtk.Image.new_from_resource for details.

val set_from_pixbuf : t -> Ocgtk_gdkpixbuf.GdkPixbuf.Wrappers.Pixbuf.t option -> unit

Sets a `GtkImage` to show a `GdkPixbuf`.

See ctor@Gtk.Image.new_from_pixbuf for details.

Note: This is a helper for method@Gtk.Image.set_from_paintable, and you can't get back the exact pixbuf once this is called, only a paintable.

val set_from_paintable : t -> Ocgtk_gdk.Gdk.Wrappers.Paintable.t option -> unit

Sets a `GtkImage` to show a `GdkPaintable`.

See ctor@Gtk.Image.new_from_paintable for details.

val set_from_icon_name : t -> string option -> unit

Sets a `GtkImage` to show a named icon.

See ctor@Gtk.Image.new_from_icon_name for details.

val set_from_gicon : t -> Ocgtk_gio.Gio.Wrappers.Icon.t -> unit

Sets a `GtkImage` to show a `GIcon`.

See ctor@Gtk.Image.new_from_gicon for details.

val set_from_file : t -> string option -> unit

Sets a `GtkImage` to show a file.

See ctor@Gtk.Image.new_from_file for details.

val get_storage_type : t -> Gtk_enums.imagetype

Gets the type of representation being used by the `GtkImage` to store image data.

If the `GtkImage` has no image data, the return value will be %GTK_IMAGE_EMPTY.

val get_pixel_size : t -> int

Gets the pixel size used for named icons.

val get_paintable : t -> Ocgtk_gdk.Gdk.Wrappers.Paintable.t option

Gets the image `GdkPaintable` being displayed by the `GtkImage`.

The storage type of the image must be %GTK_IMAGE_EMPTY or %GTK_IMAGE_PAINTABLE (see method@Gtk.Image.get_storage_type). The caller of this function does not own a reference to the returned paintable.

val get_icon_size : t -> Gtk_enums.iconsize

Gets the icon size used by the @image when rendering icons.

val get_icon_name : t -> string option

Gets the icon name and size being displayed by the `GtkImage`.

The storage type of the image must be %GTK_IMAGE_EMPTY or %GTK_IMAGE_ICON_NAME (see method@Gtk.Image.get_storage_type). The returned string is owned by the `GtkImage` and should not be freed.

val get_gicon : t -> Ocgtk_gio.Gio.Wrappers.Icon.t option

Gets the `GIcon` being displayed by the `GtkImage`.

The storage type of the image must be %GTK_IMAGE_EMPTY or %GTK_IMAGE_GICON (see method@Gtk.Image.get_storage_type). The caller of this function does not own a reference to the returned `GIcon`.

val clear : t -> unit

Resets the image to be empty.

val get_file : t -> string

Get property: file

val set_file : t -> string -> unit

Set property: file

val get_resource : t -> string

Get property: resource

val set_resource : t -> string -> unit

Set property: resource

val get_use_fallback : t -> bool

Get property: use-fallback

val set_use_fallback : t -> bool -> unit

Set property: use-fallback