package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/Image/index.html
Module Wrappers.Image
type t = [ `image | `widget | `initially_unowned | `object_ ] Gobject.objval new_ : unit -> tCreate a new Image
val new_from_file : string -> tCreate a new Image
val new_from_gicon : Ocgtk_gio.Gio.Wrappers.Icon.t -> tCreate a new Image
val new_from_icon_name : string option -> tCreate a new Image
val new_from_paintable : Ocgtk_gdk.Gdk.Wrappers.Paintable.t option -> tCreate a new Image
val new_from_pixbuf : Ocgtk_gdkpixbuf.GdkPixbuf.Wrappers.Pixbuf.t option -> tCreate a new Image
val new_from_resource : string -> tCreate a new Image
val set_pixel_size : t -> int -> unitSets 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 -> unitSuggests an icon size to the theme for named icons.
val set_from_resource : t -> string option -> unitSets 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 ->
unitSets 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 -> unitSets a `GtkImage` to show a `GdkPaintable`.
See ctor@Gtk.Image.new_from_paintable for details.
val set_from_icon_name : t -> string option -> unitSets 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 -> unitSets a `GtkImage` to show a `GIcon`.
See ctor@Gtk.Image.new_from_gicon for details.
val set_from_file : t -> string option -> unitSets a `GtkImage` to show a file.
See ctor@Gtk.Image.new_from_file for details.
val get_storage_type : t -> Gtk_enums.imagetypeGets 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 -> intGets the pixel size used for named icons.
val get_paintable : t -> Ocgtk_gdk.Gdk.Wrappers.Paintable.t optionGets 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.iconsizeGets the icon size used by the @image when rendering icons.
val get_icon_name : t -> string optionGets 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 optionGets 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 -> unitResets the image to be empty.
val get_file : t -> stringGet property: file
val set_file : t -> string -> unitSet property: file
val get_resource : t -> stringGet property: resource
val set_resource : t -> string -> unitSet property: resource
val get_use_fallback : t -> boolGet property: use-fallback
val set_use_fallback : t -> bool -> unitSet property: use-fallback