Gtk2::Rc(3)

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

πŸ’– Gtk2::Rc πŸ’–

okay bestie, so this is Gtk2::Rc β€” the part of gtk2-perl that handles your GTK+ resource files (rc files, the little style sheets of the GTK+ world πŸŽ€). It lives in the User Contributed Perl Documentation section of your man pages, and it's giving "quietly holding the whole look together" energy. πŸ‘‘


✨ METHODS ✨

🌸 Gtk2::Rc->add_default_file ($filename)

adds a file to the default list, no biggie πŸ’…

  • $filename β€” a localized file name (yes, that's the type, we don't make the rules)

πŸ¦‹ list = Gtk2::Rc->get_default_files

hands you back the list of files that GTK+ is gonna read at the very end of Gtk2->init. it's the guest list, basically. ✨

πŸŽ€ Gtk2::Rc->set_default_files (file1, ...)

  • ... β€” a list of strings, the rc files to be parsed πŸ—‚οΈ
  • $file1 β€” a localized file name

this one sets the list of files that GTK+ will read at the end of Gtk2->init. you're rewriting the guest list. main character move. πŸ‘‘

🧚 string = Gtk2::Rc->get_im_module_file

returns a string, that's the whole vibe πŸ’œ

🌈 string = Gtk2::Rc->get_im_module_path

also a string. we love a consistent queen. ✨

πŸ’– string = Gtk2::Rc->get_module_dir

yep. string. πŸ’…

πŸ“ Gtk2::Rc->parse ($filename)

  • $filename β€” a localized file name

feed it a file, it parses it. simple as. 🫢

⭐ Gtk2::Rc->parse_string ($rc_string)

  • $rc_string β€” a string

same energy as parse, except you're handing over the actual string instead of a file. iconic flexibility. πŸ’–

πŸ”₯ boolean = Gtk2::Rc->reparse_all

returns a boolean. it's a yes-or-no situation and it's giving yes. βœ…

πŸ’€ boolean = Gtk2::Rc->reparse_all_for_settings ($settings, $force_load)

  • $settings β€” a Gtk2::Settings
  • $force_load β€” a boolean

returns a boolean too. the $force_load is literally the "no like actually do it" flag. 😀

🌸 Gtk2::Rc->reset_styles ($settings)

  • $settings β€” a Gtk2::Settings
Since: gtk+ 2.4 β€” so if you're on something ancient, this isn't for you bestie πŸ™ˆ

πŸ‘‘ style = Gtk2::Rc->get_style_by_paths ($settings, $widget_path, $class_path, $package)

the ✨deluxe✨ version, where you tell it exactly where to look:

  • $settings β€” a Gtk2::Settings
  • $widget_path β€” a string
  • $class_path β€” a string
  • $package β€” a string

πŸ¦‹ style = Gtk2::Rc->get_style ($widget)

  • $widget β€” a Gtk2::Widget

just hand over a widget and get its style back. no paths required, we're keeping it simple. πŸŽ€

πŸ’œ string = Gtk2::Rc->get_theme_dir

string. theme dir. that's it, that's the method. ✨


🌟 SEE ALSO 🌟

  • Gtk2 β€” go read that one too, it's the whole universe this little page lives in 🌈

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 Gtk2::Rc(3) from the User Contributed Perl Documentation, sitting pretty at perl v5.42.0, dated 2025-07-25 πŸŽ€πŸ¦‹ go forth and style responsibly, ily, bye!! πŸ’–πŸ‘‘

πŸ“¦ where this page comes from