Gtk2::AccelMap(3)

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

πŸ’– NAME πŸ’–

Gtk2::AccelMap β€” bestie, it's a wrapper for GtkAccelMap ✨

Like, this is the thing that keeps track of all ur keyboard shortcuts (accelerators) in a GTK app. That's it, that's the whole vibe. πŸŽ€


πŸ¦‹ HIERARCHY πŸ¦‹

ok so here's the family tree, and yes she's an only child:

Glib::Object
+----Gtk2::AccelMap

One ancestor, zero drama. πŸ’…


✨ METHODS ✨

Gtk2::AccelMap->add_entry ($accel_path, $accel_key, $accel_mods)

Adds an entry, obviously. Take these:

  • $accel_path (string) 🌸
  • $accel_key (integer) πŸ”₯
  • $accel_mods (Gtk2::Gdk::ModifierType) ✨

Gtk2::AccelMap->add_filter ($filter_pattern)

  • $filter_pattern (string) πŸ¦‹

boolean = Gtk2::AccelMap->change_entry ($accel_path, $accel_key, $accel_mods, $replace)

Gives u back a boolean, bestie. The deets:

  • $accel_path (string) 🌸
  • $accel_key (integer) πŸ”₯
  • $accel_mods (Gtk2::Gdk::ModifierType) ✨
  • $replace (boolean) πŸ’œ

Gtk2::AccelMap->foreach ($data, $foreach_func)

  • $data (scalar) πŸ“
  • $foreach_func (scalar) 🧚

Gtk2::AccelMap->foreach_unfiltered ($data, $foreach_func)

  • $data (scalar) πŸ“
  • $foreach_func (scalar) 🧚

accelmap = Gtk2::AccelMap->get

Returns u an accelmap. Since: gtk+ 2.4 ⭐

Gtk2::AccelMap->load ($file_name)

  • $file_name (string) πŸ“

Gtk2::AccelMap->load_fd ($fd)

  • $fd (integer) πŸ”’

Gtk2::AccelMap->lock_path ($accel_path)

  • $accel_path (string) 🌸

Since: gtk+ 2.4 ⭐

(accel_key, accel_mods, accel_flags) = Gtk2::AccelMap->lookup_entry ($accel_path)

  • $accel_path (string) 🌸

Heads up: it returns empty if there's no accelerator found for the path u gave it. But if there is one? U get back accel_key (integer), accel_mods (Gtk2::Gdk::ModifierType), and accel_flags (integer). Iconic behaviour honestly. πŸ’…

Gtk2::AccelMap->save ($file_name)

  • $file_name (string) πŸ“

Gtk2::AccelMap->save_fd ($fd)

  • $fd (integer) πŸ”’

Gtk2::AccelMap->unlock_path ($accel_path)

  • $accel_path (string) 🌸

Since: gtk+ 2.4 ⭐


πŸŽ€ FOREACH CALLBACK πŸŽ€

ok so listen: the foreach callbacks ignore any returned values, and the parameters below get passed to the callback β€” and any modifications are ignored. Periodt. πŸ’€

accel_path (string)
accel_key (integer)
GdkModifierType accel_mods (Gtk2::Gdk::ModifierType)
changed (boolean)
user_date (scalar)

πŸ”₯ SIGNALS πŸ”₯

  • changed (Gtk2::AccelMap, string, Glib::UInt, Gtk2::Gdk::ModifierType) πŸ‘‘

🌈 ENUMS AND FLAGS 🌈

flags Gtk2::Gdk::ModifierType

All of them, no skips, no cap:

  • 'shift-mask' / 'GDK_SHIFT_MASK' πŸ’œ
  • 'lock-mask' / 'GDK_LOCK_MASK' πŸ’œ
  • 'control-mask' / 'GDK_CONTROL_MASK' πŸ’œ
  • 'mod1-mask' / 'GDK_MOD1_MASK' πŸ’œ
  • 'mod2-mask' / 'GDK_MOD2_MASK' πŸ’œ
  • 'mod3-mask' / 'GDK_MOD3_MASK' πŸ’œ
  • 'mod4-mask' / 'GDK_MOD4_MASK' πŸ’œ
  • 'mod5-mask' / 'GDK_MOD5_MASK' πŸ’œ
  • 'button1-mask' / 'GDK_BUTTON1_MASK' πŸ’œ
  • 'button2-mask' / 'GDK_BUTTON2_MASK' πŸ’œ
  • 'button3-mask' / 'GDK_BUTTON3_MASK' πŸ’œ
  • 'button4-mask' / 'GDK_BUTTON4_MASK' πŸ’œ
  • 'button5-mask' / 'GDK_BUTTON5_MASK' πŸ’œ
  • 'super-mask' / 'GDK_SUPER_MASK' πŸ’œ
  • 'hyper-mask' / 'GDK_HYPER_MASK' πŸ’œ
  • 'meta-mask' / 'GDK_META_MASK' πŸ’œ
  • 'release-mask' / 'GDK_RELEASE_MASK' πŸ’œ
  • 'modifier-mask' / 'GDK_MODIFIER_MASK' πŸ’œ

πŸ‘€ SEE ALSO πŸ‘€

  • Gtk2 🫢
  • Glib::Object 🫢

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, go forth and bind ur accelerators πŸ’…βœ¨

this one came from perl v5.42.0, dated 2025-07-25 β€” yeah it's giving vintage but she still slays πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from