Gtk2::IconSource(3)

πŸ“¦
version 1.24993 Β· 2 versions
, in fedora 43

πŸ’– Gtk2::IconSource πŸ’–

okay bestie, so this is Gtk2::IconSource β€” the little wrapper around GtkIconSource, no cap. It's giving "I hold all the info about where an icon comes from and what it looks like." ✨


🌸 HIERARCHY 🌸

it's a boxed type, so here's the family tree:

Glib::Boxed
+----Gtk2::IconSource

so like, it inherits from Glib::Boxed and that's the whole bloodline. periodt. πŸ’…


πŸŽ€ METHODS πŸŽ€

  • iconsource = Gtk2::IconSource->new β€” makes you a shiny brand-new icon source. fresh out the box, main character energy. πŸ¦‹
  • textdirection = $source->get_direction β€” grab the text direction this source is set to.
  • $source->set_direction ($direction) β€” set that direction, bestie.
    • $direction (Gtk2::TextDirection)
  • boolean = $source->get_direction_wildcarded β€” is the direction being wildcarded? yes/no.
  • $source->set_direction_wildcarded ($setting) β€” toggle the direction wildcarding on or off.
    • $setting (boolean)
  • localized file name = $source->get_filename β€” get the filename, localized and everything. πŸ’«
  • $source->set_filename ($filename) β€” point it at a file.
    • $filename (localized file name)
  • string = $source->get_icon_name β€” get the icon's name. 🏷️
    • Since: gtk+ 2.4
  • $source->set_icon_name ($icon_name) β€” name your icon, icon.
    • $icon_name (string)
    • Since: gtk+ 2.4
  • pixbuf or undef = $source->get_pixbuf β€” grab the pixbuf. heads up, it can literally be undef πŸ‘€
  • $source->set_pixbuf ($pixbuf) β€” hand it an actual pixbuf.
    • $pixbuf (Gtk2::Gdk::Pixbuf)
  • iconsize = $source->get_size β€” what size is this icon? iconic question.
  • $source->set_size ($size) β€” set the size.
    • $size (Gtk2::IconSize)
  • boolean = $source->get_size_wildcarded β€” is the size wildcarded or nah?
  • $source->set_size_wildcarded ($setting) β€” flip the size wildcarding.
    • $setting (boolean)
  • statetype = $source->get_state β€” get the widget state this source is chillin' in.
  • $source->set_state ($state) β€” set that state.
    • $state (Gtk2::StateType)
  • boolean = $source->get_state_wildcarded β€” state wildcarded? enquiring minds wanna know.
  • $source->set_state_wildcarded ($setting) β€” toggle the state wildcarding, boom.
    • $setting (boolean)

🌈 ENUMS AND FLAGS 🌈

πŸ’œ enum Gtk2::IconSize

  • 'invalid' / GTK_ICON_SIZE_INVALID
  • 'menu' / GTK_ICON_SIZE_MENU
  • 'small-toolbar' / GTK_ICON_SIZE_SMALL_TOOLBAR
  • 'large-toolbar' / GTK_ICON_SIZE_LARGE_TOOLBAR
  • 'button' / GTK_ICON_SIZE_BUTTON
  • 'dnd' / GTK_ICON_SIZE_DND
  • 'dialog' / GTK_ICON_SIZE_DIALOG

🧚 enum Gtk2::StateType

  • 'normal' / GTK_STATE_NORMAL
  • 'active' / GTK_STATE_ACTIVE
  • 'prelight' / GTK_STATE_PRELIGHT
  • 'selected' / GTK_STATE_SELECTED
  • 'insensitive' / GTK_STATE_INSENSITIVE

πŸ¦‹ enum Gtk2::TextDirection

  • 'none' / GTK_TEXT_DIR_NONE
  • 'ltr' / GTK_TEXT_DIR_LTR
  • 'rtl' / GTK_TEXT_DIR_RTL

πŸ‘‘ SEE ALSO πŸ‘‘

Gtk2, Glib::Boxed


Copyright (C) 2003-2011 by the gtk2-perl team.

This software is licensed under the LGPL. See Gtk2 for a full notice.


and that's the whole page, bestie!! 🫢 this was pulled from the User Contributed Perl Documentation, running under perl v5.42.0, dated 2025-07-25. slay, go forth and source your icons πŸ’…βœ¨πŸŒΈ

πŸ“¦ where this page comes from