Gtk2::RecentFilter(3)

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

πŸ’– Gtk2::RecentFilter β€” NAME πŸ’–

okay bestie, so this is Gtk2::RecentFilter β€” it's the wrapper for GtkRecentFilter πŸŽ€ like, it's the lil bouncer at the door of your recent-files list deciding who gets in and who gets left on read πŸ’…

(this page lives in the User Contributed Perl Documentation section, so you know it's the real deal ✨)


🌸 HIERARCHY 🌸

the family tree, and yes she has main character energy:

Glib::Object
+----Glib::InitiallyUnowned
     +----Gtk2::Object
          +----Gtk2::RecentFilter

so she's a Glib::Object, she's a Glib::InitiallyUnowned, she's a Gtk2::Object, and then she's her πŸ¦‹ iconic lineage ngl


✨ METHODS ✨

🫢 constructors and adding stuff

  • recentfilter = Gtk2::RecentFilter->new β€” boom, brand new filter, fresh out the box 🌈
  • $filter->add_age ($days) β€” adds an age rule to the filter, so only recent things within a certain age get through ⏳
    • $days (integer) β€” how many days back we're talking
  • $filter->add_application ($application) β€” only let stuff from a specific app pass πŸ“
    • $application (string) β€” the application name
  • $filter->add_custom ($needed, $func, $data=undef) β€” you get to write your own lil rule, custom vibes only πŸ’…
    • $needed (Gtk2::RecentFilterFlags) β€” which flags your custom check needs
    • $func (scalar) β€” your callback
    • $data (scalar) β€” optional extra data you wanna pass along, defaults to undef
  • $filter->add_group ($group) β€” filters by group πŸŽ€
    • $group (string)
  • $filter->add_mime_type ($mime_type) β€” only let a certain MIME type through, like text/plain or whatever πŸ¦‹
    • $mime_type (string)
  • $filter->add_pattern ($pattern) β€” adds a glob pattern rule, like *.png bestie 🌸
    • $pattern (string)
  • $filter->add_pixbuf_formats β€” adds a rule so anything GdkPixbuf can actually load gets through, no args needed, she just knows πŸ”₯

πŸ’œ using it and naming it

  • boolean = $filter->filter ($filter_info) β€” runs the filter against some info and tells you yes or no, true or false, in or out πŸ‘‘
    • $filter_info (scalar)
  • string = $filter->get_name β€” grabs the filter's name 🏷️
  • $filter->set_name ($name) β€” sets the filter's name ✨
    • $name (string)
  • recentfilterflags = $filter->get_needed β€” tells you which flags this filter actually needs πŸ’«

🌈 ENUMS AND FLAGS 🌈

flags Gtk2::RecentFilterFlags

all the flag options, every single one, no skipping:

  • 'uri' / GTK_RECENT_FILTER_URI β€” πŸ’–
  • 'display-name' / GTK_RECENT_FILTER_DISPLAY_NAME β€” πŸŽ€
  • 'mime-type' / GTK_RECENT_FILTER_MIME_TYPE β€” πŸ¦‹
  • 'application' / GTK_RECENT_FILTER_APPLICATION β€” πŸ“
  • 'group' / GTK_RECENT_FILTER_GROUP β€” 🌸
  • 'age' / GTK_RECENT_FILTER_AGE β€” ⏳

πŸ‘€ SEE ALSO πŸ‘€

go read these too, they're all in the friend group:

  • Gtk2
  • Glib::Object
  • Glib::InitiallyUnowned
  • Gtk2::Object

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

This software is licensed under the LGPL. See Gtk2 for a full notice. πŸ“œ


ok that's the whole page bestie, you ate that fr fr πŸ’…βœ¨

this was perl v5.42.0, dated 2025-07-25, from Gtk2::RecentFilter(3) β€” mwah, go slay some recent files πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from