Gtk2::Gdk::Display(3)

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

✨ Gtk2::Gdk::Display β€” bestie edition ✨

okay so. Gtk2::Gdk::Display is literally just a lil wrapper for GdkDisplay 🫢 like the Perl-side bestie for the C-side thing. That's the whole NAME situation, no cap.


🌸 HIERARCHY 🌸

she has ancestors, she has a bloodline, she's royalty:

Glib::Object
+----Gtk2::Gdk::Display

πŸ’… METHODS πŸ’…

okay this is the main character section. every single one of them, in order, because we don't skip.

  • $display->beep β€” makes the display go beep. that's it. that's the method. iconic honestly πŸŽ€
  • $display->close β€” closes the display. shutting her down, closing the tab, logging off πŸ¦‹
  • device = $display->get_core_pointer β€” hands you back the core pointer as a device.
  • $display->set_cursor_theme ($theme, $size) β€” sets the cursor theme and its size.
    • $theme (string) β€” the theme name, as a string.
    • $size (integer) β€” the size, as an integer.
    • Since: gtk+ 2.8 ✨
  • integer = $display->get_default_cursor_size β€” gives you back the default cursor size, as an integer.
    • Since: gtk+ 2.4 ✨
  • display or undef = Gtk2::Gdk::Display->get_default β€” class method! returns the default display, or undef if there isn't one. so you either get a display or you get nothing, very demure πŸ“
  • window = $display->get_default_group β€” returns the default group window.
    • Since: gtk+ 2.4 ✨
  • screen = $display->get_default_screen β€” returns the default screen. defaults on defaults, we love to see it.
  • $display->set_double_click_distance ($distance) β€” sets how far apart two clicks can be and still count as a double click.
    • $distance (integer)
    • Since: gtk+ 2.4 ✨
  • $display->set_double_click_time ($msec) β€” sets how fast two clicks have to be to count as a double click.
    • $msec (integer) β€” in milliseconds, bestie.
  • event = $display->get_event β€” pulls an event off the display.
  • $display->flush β€” flushes the display. get that stuff out there πŸ’¨
    • Since: gtk+ 2.4 ✨
  • $display->grab β€” grabs the display.
  • boolean = $display->is_closed β€” tells you if the display is closed, as a boolean. true = she's gone, false = she's still here πŸ’€
    • Since: gtk+ 2.22 ✨
  • $display->keyboard_ungrab ($time_) β€” releases the keyboard grab.
    • $time_ (unsigned)
  • list = $display->list_devices β€” returns a list of Gtk2::Gdk::Devices. a whole roster. the lineup πŸ‘‘
  • (width, height) = $display->get_maximal_cursor_size β€” returns the biggest cursor size as a (width, height) pair, list context bestie.
    • Since: gtk+ 2.4 ✨
  • integer = $display->get_n_screens β€” how many screens does this display have? an integer, that's how many.
  • string = $display->get_name β€” the display's name, as a string.
  • display or undef = Gtk2::Gdk::Display->open ($display_name) β€” class method! opens a display by name, and you get a display back or undef.
    • $display_name (string or undef) β€” string, or undef, no judgement 🌈
  • event = $display->peek_event β€” peeks at an event. peek, not take. looking respectfully πŸ™ˆ
  • list = $display->get_pointer β€” returns the pointer as a list.
  • boolean = $display->pointer_is_grabbed β€” is the pointer grabbed? boolean says yes or no.
  • $display->pointer_ungrab ($time_) β€” releases the pointer grab.
    • $time_ (unsigned)
  • $display->put_event ($event) β€” shoves an event into the display.
    • $event (Gtk2::Gdk::Event)
  • $display->register_standard_event_type ($event_base, $n_events) β€” registers a standard event type.
    • $event_base (integer)
    • $n_events (integer)
    • Since: gtk+ 2.4 ✨
  • boolean = $display->request_selection_notification ($selection) β€” asks for selection notifications. returns a boolean.
    • $selection (Gtk2::Gdk::Atom)
    • Since: gtk+ 2.6 ✨
  • screen = $display->get_screen ($screen_num) β€” grabs you a screen by number.
    • $screen_num (integer)
  • string = $display->get_startup_notification_id β€” the startup notification id, as a string.
    • Since: gtk+ 2.12 ✨
  • $display->store_clipboard ($clipboard_window, $time_, ...) β€” stores the clipboard. yes there's a ... in there, she takes a whole list of atoms.
    • $clipboard_window (Gtk2::Gdk::Window)
    • $time_ (unsigned)
    • ... (list) of Gtk2::Gdk::Atom's
    • Since: gtk+ 2.6 ✨
  • boolean = $display->supports_clipboard_persistence β€” does this display support clipboard persistence? boolean, fr fr.
    • Since: gtk+ 2.6 ✨
  • boolean = $display->supports_composite β€” does it support composite? boolean.
    • Since: gtk+ 2.12 ✨
  • boolean = $display->supports_cursor_alpha β€” cursor alpha support? boolean.
    • Since: gtk+ 2.4 ✨
  • boolean = $display->supports_cursor_color β€” cursor color support? boolean.
    • Since: gtk+ 2.4 ✨
  • boolean = $display->supports_input_shapes β€” input shapes support? boolean.
    • Since: gtk+ 2.10 ✨
  • boolean = $display->supports_selection_notification β€” selection notification support? boolean.
    • Since: gtk+ 2.6 ✨
  • boolean = $display->supports_shapes β€” shapes support? boolean.
    • Since: gtk+ 2.10 ✨
  • $display->sync β€” syncs the display. get in sync, get in formation πŸ’…
  • $display->ungrab β€” ungrabs the display.
  • unsigned = $display->get_user_time β€” the user time, as an unsigned. returns unsigned.
    • Since: gtk+ 2.8 ✨
  • $display->warp_pointer ($screen, $x, $y) β€” warps the pointer to a spot on a screen. teleportation arc πŸ”₯
    • $screen (Gtk2::Gdk::Screen)
    • $x (integer)
    • $y (integer)
    • Since: gtk+ 2.8 ✨
  • (window, win_x, win_y) = $display->get_window_at_pointer ($display) β€” tells you which window the pointer is over, plus win_x and win_y, all as a list.
    • takes $display as its arg.

πŸ”” SIGNALS πŸ””

  • closed β€” signature is (Gtk2::Gdk::Display, boolean). fires when the display closes. the she's gone moment 😭

πŸ‘€ SEE ALSO πŸ‘€

  • Gtk2
  • Glib::Object

go read those too, iykyk πŸ’–


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, no notes πŸ’œ this was Gtk2::Gdk::Display(3) from perl v5.42.0, dated 2025-07-25 β€” mwah, slay, go write some Perl 🌟

πŸ“¦ where this page comes from