Gnome2:...Factory(3)

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

✨ NAME ✨

Gnome2::ThumbnailFactory β€” bestie, it's literally just a wrapper for GnomeThumbnailFactory πŸ’…

This is a page from the User Contributed Perl Documentation, and it lives at Gnome2:...Factory(3), iykyk.


🌸 HIERARCHY 🌸

Okay so here's the family tree, and yes it's giving very much inheritance-core:

Glib::Object
+----Gnome2::ThumbnailFactory

So Gnome2::ThumbnailFactory is a Glib::Object at heart. It said "I get it from my parent" and honestly? Same. πŸ‘‘


πŸŽ€ METHODS πŸŽ€

thumbnailfactory = Gnome2::ThumbnailFactory->new ($size)

Make a whole new factory, no cap. You gotta hand it a size:

  • $size β€” a Gnome2::ThumbnailSize. Pick your vibe from the enum down below, bestie.

boolean = $factory->can_thumbnail ($uri, $mime_type, $mtime)

Asks the universe: "can I even make a thumbnail out of this??" Returns a boolean, so it's a yes or a no, periodt.

  • $uri β€” a string
  • $mime_type β€” a string
  • $mtime β€” a timestamp

$factory->create_failed_thumbnail ($uri, $mtime)

Making the "nope, couldn't do it" thumbnail and writing it down for later. Lowkey petty, highkey useful. 🫢

  • $uri β€” a string
  • $mtime β€” a timestamp

pixbuf = $factory->generate_thumbnail ($uri, $mime_type)

The main character moment ✨ β€” actually generates a thumbnail and gives you back a pixbuf.

  • $uri β€” a string
  • $mime_type β€” a string

boolean = $factory->has_valid_failed_thumbnail ($uri, $mtime)

Checks whether that failed-thumbnail record you made earlier is still valid. Returns a boolean β€” so, yes or no bestie.

  • $uri β€” a string
  • $mtime β€” a timestamp

string = $factory->lookup ($uri, $mtime)

Goes looking for a thumbnail and hands you back a string if it finds one.

  • $uri β€” a string
  • $mtime β€” a timestamp

$factory->save_thumbnail ($thumbnail, $uri, $original_mtime)

Saves the thumbnail you already made. No return value, it just does the thing πŸ’–

  • $thumbnail β€” a Gtk2::Gdk::Pixbuf
  • $uri β€” a string
  • $original_mtime β€” a timestamp

🌈 ENUMS AND FLAGS 🌈

enum Gnome2::ThumbnailSize

Only two options and both of them ate, honestly:

  • 'normal' / 'GNOME_THUMBNAIL_SIZE_NORMAL' β€” the standard-size vibe
  • 'large' / 'GNOME_THUMBNAIL_SIZE_LARGE' β€” the big-size vibe, main character energy fr fr

πŸ’œ SEE ALSO πŸ’œ

Go read these next, bestie, they're iconic:

  • Gnome2
  • Glib::Object

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

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


🌟 bestie reminder: that's the whole page, every flag, every arg, every type β€” nothing skipped, no cap.

Okurrr, that's a wrap! πŸŽ€ This lil' page came from perl v5.42.0 and got dated 2025-07-25, and it's the Gnome2:...Factory(3) page from the User Contributed Perl Documentation. Slay, bye! πŸ‘‘πŸ’–

πŸ“¦ where this page comes from