Hoogle Search
Within LTS Haskell 24.42 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
module GI.Gtk.Objects.
PasswordEntryBuffer A GtkEntryBuffer that locks the underlying memory to prevent it from being swapped to disk. GtkPasswordEntry uses a GtkPasswordEntryBuffer. Since: 4.4
-
gi-gtk4 GI.Gtk.Objects.PasswordEntryBuffer Memory-managed wrapper type.
PasswordEntryBuffer :: ManagedPtr PasswordEntryBuffer -> PasswordEntryBuffergi-gtk4 GI.Gtk.Objects.PasswordEntryBuffer No documentation available.
-
The GtkPicture widget displays a GdkPaintable. Many convenience functions are provided to make pictures simple to use. For example, if you want to load an image from a file, and then display it, there’s a convenience function to do this:
c code
GtkWidget *widget = gtk_picture_new_for_filename ("myfile.png");If the file isn’t loaded successfully, the picture 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 textureNewFromFile, then create the GtkPicture with pictureNewForPaintable. Sometimes an application will want to avoid depending on external data files, such as image files. See the documentation of GResource for details. In this case, pictureNewForResource and pictureSetResource should be used. GtkPicture displays an image at its natural size. See Image if you want to display a fixed-size image, such as an icon.Sizing the paintable
You can influence how the paintable is displayed inside the GtkPicture by changing Picture:contentFit. See ContentFit for details. Picture:canShrink can be unset to make sure that paintables are never made smaller than their ideal size - but be careful if you do not know the size of the paintable in use (like when displaying user-loaded images). This can easily cause the picture to grow larger than the screen. And Widget:halign and Widget:valign can be used to make sure the paintable doesn't fill all available space but is instead displayed at its original size.CSS nodes
GtkPicture has a single CSS node with the name picture.Accessibility
GtkPicture uses the GTK_ACCESSIBLE_ROLE_IMG role. -
gi-gtk4 GI.Gtk.Objects.Picture Memory-managed wrapper type.
Picture :: ManagedPtr Picture -> Picturegi-gtk4 GI.Gtk.Objects.Picture No documentation available.
-
GtkPopover is a bubble-like context popup. It is primarily meant to provide context-dependent information or options. Popovers are attached to a parent widget. By default, they point to the whole widget area, although this behavior can be changed with popoverSetPointingTo. The position of a popover relative to the widget it is attached to can also be changed with popoverSetPosition By default, GtkPopover performs a grab, in order to ensure input events get redirected to it while it is shown, and also so the popover is dismissed in the expected situations (clicks outside the popover, or the Escape key being pressed). If no such modal behavior is desired on a popover, popoverSetAutohide may be called on it to tweak its behavior.
GtkPopover as menu replacement
GtkPopover is often used to replace menus. The best way to do this is to use the PopoverMenu subclass which supports being populated from a GMenuModel with popoverMenuNewFromModel.xml code
<section> <attribute name="display-hint">horizontal-buttons</attribute> <item> <attribute name="label">Cut</attribute> <attribute name="action">app.cut</attribute> <attribute name="verb-icon">edit-cut-symbolic</attribute> </item> <item> <attribute name="label">Copy</attribute> <attribute name="action">app.copy</attribute> <attribute name="verb-icon">edit-copy-symbolic</attribute> </item> <item> <attribute name="label">Paste</attribute> <attribute name="action">app.paste</attribute> <attribute name="verb-icon">edit-paste-symbolic</attribute> </item> </section>
CSS nodes
popover.background[.menu] ├── arrow ╰── contents ╰── <child>
GtkPopover has a main node with name popover, an arrow with name arrow, and another node for the content named contents. The popover node always gets the .background style class. It also gets the .menu style class if the popover is menu-like, e.g. is a PopoverMenu. Particular uses of GtkPopover, such as touch selection popups or magnifiers in GtkEntry or GtkTextView get style classes like .touch-selection or .magnifier to differentiate from plain popovers. When styling a popover directly, the popover node should usually not have any background. The visible part of the popover can have a shadow. To specify it in CSS, set the box-shadow of the contents node. Note that, in order to accomplish appropriate arrow visuals, GtkPopover uses custom drawing for the arrow node. This makes it possible for the arrow to change its shape dynamically, but it also limits the possibilities of styling it using CSS. In particular, the arrow gets drawn over the content node's border and shadow, so they look like one shape, which means that the border width of the content node and the arrow node should be the same. The arrow also does not support any border shape other than solid, no border-radius, only one border width (border-bottom-width is used) and no box-shadow. -
gi-gtk4 GI.Gtk.Objects.Popover Memory-managed wrapper type.
Popover :: ManagedPtr Popover -> Popovergi-gtk4 GI.Gtk.Objects.Popover No documentation available.
type
PopoverActivateDefaultCallback = IO ()gi-gtk4 GI.Gtk.Objects.Popover Emitted whend the user activates the default widget. This is a keybinding signal.