Package: gtk
Class gtk:image
Superclassesgtk:widget, gobject:initially-unowned, gtk:accessible, gtk:buildable, gtk:constraint-target, gobject:object, common-lisp:standard-object, common-lisp:t Documented Subclasses
None
Direct SlotsDetails The gtk:image widget displays an image.
Various kinds of objects can be displayed as an image. Most typically, you would load a gdk:texture object from a file, and then display that. ![]() There is a convenience gtk:image-new-from-file function to do this, used as follows: (let ((image (gtk:image-new-from-file "myfile.png"))) ... )If the file is not loaded successfully, the image will contain a "broken image" icon similar to that used in many web browsers. If you want to handle errors in loading the file yourself, for example by displaying an error message, then load the image with the gdk:texture-new-from-file function, then create the gtk:image widget with the gtk:image-new-from-paintable function. Sometimes an application will want to avoid depending on external data files, such as image files. See the documentation of the g:resource API for details. In this case, the resource property, the gtk:image-new-from-resource and gtk:image-set-from-resource functions should be used. The gtk:image widget displays its image as an icon, with a size that is determined by the application. See the gtk:picture widget if you want to show an image at is actual size. CSS nodesAccessibility | Returned by
Slot Access Functions
Inherited Slot Access FunctionsSee also |
2024-10-29