GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Gtk2::Gdk::Window(3) User Contributed Perl Documentation Gtk2::Gdk::Window(3)

Gtk2::Gdk::Window - wrapper for GdkWindow

"Gtk2::Gdk::Window" is a low-level window-system window. One of these is created when a widget is "realized".

As of Gtk 2.22 a window can only be created by "Gtk2::Gdk::Window->new()", "foreign_new()", etc. "Glib::Object::new()" doesn't work (segfaults on using the resulting window object). It's not possible to subclass "Gtk2::Gdk::Window" with Glib::Object::Subclass and the "Glib::Type" system, since only "gdk_window_new()" does the actual window creation, and that function always makes a "GdkWindow". (The Perl-Gtk "Gtk2::Gdk::Window->new()" wrapper ignores the class name argument.)

It may work to create a Perl level subclass and re-bless a "Gtk2::Gdk::Window->new()" into that. But like any such re-blessing it's not preserved when the object is returned from a Gtk function etc (that just gives the base Gtk class).

  Glib::Object
  +----Gtk2::Gdk::Drawable
       +----Gtk2::Gdk::Window

  • $parent (Gtk2::Gdk::Window or undef)
  • $attributes_ref (scalar)

Create and return a new window. parent can be undef to mean the root window of the default screen. attributes_ref is a hashref containing some of the following keys,

    title              string
    event_mask         Gtk2::Gdk::EventMask flags
    x                  integer
    y                  integer
    width              integer
    height             integer
    wclass             Gtk2::Gdk::WindowClass enum
    visual             Gtk2::Gdk::Visual
    colormap           Gtk2::Gdk::Colormap
    window_type        Gtk2::Gdk::WindowType enum
    cursor             Gtk2::Gdk::Cursor
    wmclass_name       string
    wmclass_class      string
    override_redirect  boolean (integer 0 or 1)

window_type is mandatory because it defaults to "root" but of course it's not possible to create a new root window. The other fields get default values zero, empty, unset, etc.

    my $win = Gtk2::Gdk::Window->new
                (undef, { window_type => 'toplevel,
                          wclass => 'GDK_INPUT_OUTPUT',
                          x => 0,
                          y => 0,
                          width => 200,
                          height => 100 });

Incidentally, the nicknames for wclass Gtk2::Gdk::WindowClass really are "output" for input-output and "only" for input-only. Those names are a bit odd, but that's what Gtk has. You can, as for any enum, give the full names like "GDK_INPUT_OUTPUT" if desired, for some clarity.

Since: gtk+ 2.22

$accept_focus (boolean)

Since: gtk+ 2.4

Returns window, a Gtk2::Gdk::Window and win_x and win_y, integers.

  • $pixmap (Gtk2::Gdk::Pixmap or undef)
  • $parent_relative (boolean)

Since: gtk+ 2.22

$color (Gtk2::Gdk::Color)

Since: gtk+ 2.12

  • $button (integer)
  • $root_x (integer)
  • $root_y (integer)
  • $timestamp (unsigned)

$rectangle (Gtk2::Gdk::Rectangle)

$region (Gtk2::Gdk::Region)

  • $edge (Gtk2::Gdk::WindowEdge)
  • $button (integer)
  • $root_x (integer)
  • $root_y (integer)
  • $timestamp (unsigned)

Since: gtk+ 2.10

Returns the list of children (Gtk2::Gdk::Window's) known to gdk.

  • $x (integer)
  • $y (integer)
  • $width (integer)
  • $height (integer)

  • $x (integer)
  • $y (integer)
  • $width (integer)
  • $height (integer)

Since: gtk+ 2.22

$composited (boolean)

Since: gtk+ 2.12

Since: gtk+ 2.6

  • $parent_x (double)
  • $parent_y (double)

Since: gtk+ 2.22

  • $x (double)
  • $y (double)

Since: gtk+ 2.22

  • $content (Cairo::Content)
  • $width (integer)
  • $height (integer)

Since: gtk+ 2.22

Since: gtk+ 2.18

$cursor (Gtk2::Gdk::Cursor or undef)

$enable (boolean)

$decorations (Gtk2::Gdk::WMDecoration)

Since: gtk+ 2.22

Since: gtk+ 2.22

Only for offscreen "Gtk2::Gdk::Windows".

Since: gtk+ 2.18

$embedder (Gtk2::Gdk::Window)

Only for offscreen "Gtk2::Gdk::Windows".

Since: gtk+ 2.18

Since: gtk+ 2.6

Since: gtk+ 2.18

$event_mask (Gtk2::Gdk::EventMask)

Since: gtk+ 2.18

$timestamp (unsigned)

Since: gtk+ 2.22

$focus_on_map (boolean)

Since: gtk+ 2.6

$anid (Gtk2::Gdk::NativeWindow)

  • $display (Gtk2::Gdk::Display)
  • $anid (Gtk2::Gdk::NativeWindow)

Since: gtk+ 2.2

Since: gtk+ 2.2

$functions (Gtk2::Gdk::WMFunction)

Only useful for offscreen "Gtk2::Gdk::Windows".

Since: gtk+ 2.18

  • $geom_mask (Gtk2::Gdk::WindowHints) optional, usually inferred from $geometry
  • $geometry (scalar) Gtk2::Gdk::Geometry or hashref

$geometry is either a "Gtk2::Gdk::Geometry" object, or a hashref with the following keys and values,

    min_width     integer \ 'min-size' mask
    min_height    integer /
    max_width     integer \ 'max-size' mask
    max_height    integer /
    base_width    integer \ 'base-size' mask
    base_height   integer /
    width_inc     integer \ 'resize-inc' mask
    height_inc    integer /
    min_aspect    float   \ 'aspect' mask
    max_aspect    float   /
    win_gravity   Gtk2::Gdk::Gravity enum, 'win-gravity' mask

Optional $geom_mask is which fields of $geometry are used. If $geometry is a hashref then $geom_mask defaults to the keys supplied in the hash, so for example

    $win->set_geometry_hints ({ min_width => 20, min_height => 10});

If $geometry is a "Gtk2::Gdk::Geometry" object then you must give $geom_mask explicitly.

The 'pos', 'user-pos' and 'user-size' flags in $geom_mask have no data fields, so cannot be inferred from a $geometry hashref. If you want those flags you must pass $geom_mask explicitly.

Since: gtk+ 2.4

$leader (Gtk2::Gdk::Window or undef)

Since: gtk+ 2.22

... (list) of GdkPixbuf's

$name (string or undef)

  • $icon_window (Gtk2::Gdk::Window or undef)
  • $pixmap (Gtk2::Gdk::Pixmap or undef)
  • $mask (Gtk2::Gdk::Bitmap or undef)

  • $mask (Gtk2::Gdk::Bitmap or undef)
  • $x (integer)
  • $y (integer)

Since: gtk+ 2.10

  • $shape (Gtk2::Gdk::Region or undef)
  • $offset_x (integer)
  • $offset_y (integer)

Since: gtk+ 2.10

  • $region (Gtk2::Gdk::Region)
  • $func (scalar)
  • $data (scalar)

  • $rectangle (Gtk2::Gdk::Rectangle or undef)
  • $invalidate_children (boolean)

  • $region (Gtk2::Gdk::Region)
  • $invalidate_children (boolean)

Since: gtk+ 2.18

Since: gtk+ 2.22

Since: gtk+ 2.22

$setting (boolean)

Since: gtk+ 2.4

$setting (boolean)

Since: gtk+ 2.4

$anid (Gtk2::Gdk::NativeWindow)

  • $display (Gtk2::Gdk::Display)
  • $anid (Gtk2::Gdk::NativeWindow)

Since: gtk+ 2.2

Since: gtk+ 2.10

Since: gtk+ 2.22

$modal (boolean)

  • $x (integer)
  • $y (integer)

  • $region (Gtk2::Gdk::Region)
  • $dx (integer)
  • $dy (integer)

Since: gtk+ 2.8

  • $x (integer)
  • $y (integer)
  • $width (integer)
  • $height (integer)

Since: gtk+ 2.8

$opacity (double)

Since: gtk+ 2.12

$override_redirect (boolean)

An alias for get_children

Only for offscreen "Gtk2::Gdk::Windows".

Since: gtk+ 2.18

Returns window_at_pointer, a Gtk2::Gdk::Window or undef, x and y, integers, and mask, a Gtk2::Gdk::ModifierType.

$update_children (boolean)

  • $property (Gtk2::Gdk::Atom)
  • $type (Gtk2::Gdk::Atom)
  • $format (integer)
  • $mode (Gtk2::Gdk::PropMode)
  • ... (list) property value(s)

Depending on the value of format, the property value(s) can be:

  +--------------------+------------------------------------+
  |      format        |                value               |
  +--------------------+------------------------------------+
  | Gtk2::Gdk::CHARS   | a string                           |
  | Gtk2::Gdk::USHORTS | one or more unsigned short numbers |
  | Gtk2::Gdk::ULONGS  | one or more unsigned long numbers  |
  +--------------------+------------------------------------+

$property (Gtk2::Gdk::Atom)

  • $property (Gtk2::Gdk::Atom)
  • $type (Gtk2::Gdk::Atom)
  • $offset (unsigned)
  • $length (unsigned)
  • $pdelete (integer)

See property_change for an explanation of the meaning of format.

  • $drawable (Gtk2::Gdk::Drawable)
  • $src_x (integer)
  • $src_y (integer)
  • $dest_x (integer)
  • $dest_y (integer)
  • $width (integer)
  • $height (integer)

Since: gtk+ 2.14

Since: gtk+ 2.14

  • $new_parent (Gtk2::Gdk::Window)
  • $x (integer)
  • $y (integer)

  • $width (integer)
  • $height (integer)

  • $sibling (Gtk2::Gdk::Window or undef)
  • $above (boolean)

Since: gtk+ 2.18

$role (string)

  • $x (integer)
  • $y (integer)

Since: gtk+ 2.18

  • $dx (integer)
  • $dy (integer)

  • $mask (Gtk2::Gdk::Bitmap or undef)
  • $x (integer)
  • $y (integer)

  • $shape_region (Gtk2::Gdk::Region or undef)
  • $offset_x (integer)
  • $offset_y (integer)

$skips_pager (boolean)

Since: gtk+ 2.2

$skips_taskbar (boolean)

Since: gtk+ 2.2

$startup_id (string)

Since: gtk+ 2.12

$use_static (boolean)

$title (string)

Returns a list of top level windows (Gtk2::Gdk::Window's) known to gdk, on the default screen. A toplevel window is a child of the root window.

$parent (Gtk2::Gdk::Window)

Since: gtk+ 2.10

$hint (Gtk2::Gdk::WindowTypeHint)

Since: gtk+ 2.2

$urgent (boolean)

Since: gtk+ 2.8

$user_data (unsigned)

$timestamp (unsigned)

Since: gtk+ 2.6

'cursor' (Gtk2::Gdk::Cursor : default undef : readable / writable)
Cursor

from-embedder (Gtk2::Gdk::Window, double, double, gpointer, gpointer)
Gtk2::Gdk::Window = pick-embedded-child (Gtk2::Gdk::Window, double, double)
to-embedder (Gtk2::Gdk::Window, double, double, gpointer, gpointer)

from-embedder, to-embedder and pick-embedded-child signals are for offscreen windows only.

from-embedder and to-embedder receive the x and y coordinates to translate, and must return the translated x and y coordinate.

  • 'exposure-mask' / 'GDK_EXPOSURE_MASK'
  • 'pointer-motion-mask' / 'GDK_POINTER_MOTION_MASK'
  • 'pointer-motion-hint-mask' / 'GDK_POINTER_MOTION_HINT_MASK'
  • 'button-motion-mask' / 'GDK_BUTTON_MOTION_MASK'
  • 'button1-motion-mask' / 'GDK_BUTTON1_MOTION_MASK'
  • 'button2-motion-mask' / 'GDK_BUTTON2_MOTION_MASK'
  • 'button3-motion-mask' / 'GDK_BUTTON3_MOTION_MASK'
  • 'button-press-mask' / 'GDK_BUTTON_PRESS_MASK'
  • 'button-release-mask' / 'GDK_BUTTON_RELEASE_MASK'
  • 'key-press-mask' / 'GDK_KEY_PRESS_MASK'
  • 'key-release-mask' / 'GDK_KEY_RELEASE_MASK'
  • 'enter-notify-mask' / 'GDK_ENTER_NOTIFY_MASK'
  • 'leave-notify-mask' / 'GDK_LEAVE_NOTIFY_MASK'
  • 'focus-change-mask' / 'GDK_FOCUS_CHANGE_MASK'
  • 'structure-mask' / 'GDK_STRUCTURE_MASK'
  • 'property-change-mask' / 'GDK_PROPERTY_CHANGE_MASK'
  • 'visibility-notify-mask' / 'GDK_VISIBILITY_NOTIFY_MASK'
  • 'proximity-in-mask' / 'GDK_PROXIMITY_IN_MASK'
  • 'proximity-out-mask' / 'GDK_PROXIMITY_OUT_MASK'
  • 'substructure-mask' / 'GDK_SUBSTRUCTURE_MASK'
  • 'scroll-mask' / 'GDK_SCROLL_MASK'
  • 'all-events-mask' / 'GDK_ALL_EVENTS_MASK'

  • 'replace' / 'GDK_PROP_MODE_REPLACE'
  • 'prepend' / 'GDK_PROP_MODE_PREPEND'
  • 'append' / 'GDK_PROP_MODE_APPEND'

  • 'all' / 'GDK_DECOR_ALL'
  • 'border' / 'GDK_DECOR_BORDER'
  • 'resizeh' / 'GDK_DECOR_RESIZEH'
  • 'title' / 'GDK_DECOR_TITLE'
  • 'menu' / 'GDK_DECOR_MENU'
  • 'minimize' / 'GDK_DECOR_MINIMIZE'
  • 'maximize' / 'GDK_DECOR_MAXIMIZE'

  • 'all' / 'GDK_FUNC_ALL'
  • 'resize' / 'GDK_FUNC_RESIZE'
  • 'move' / 'GDK_FUNC_MOVE'
  • 'minimize' / 'GDK_FUNC_MINIMIZE'
  • 'maximize' / 'GDK_FUNC_MAXIMIZE'
  • 'close' / 'GDK_FUNC_CLOSE'

  • 'north-west' / 'GDK_WINDOW_EDGE_NORTH_WEST'
  • 'north' / 'GDK_WINDOW_EDGE_NORTH'
  • 'north-east' / 'GDK_WINDOW_EDGE_NORTH_EAST'
  • 'west' / 'GDK_WINDOW_EDGE_WEST'
  • 'east' / 'GDK_WINDOW_EDGE_EAST'
  • 'south-west' / 'GDK_WINDOW_EDGE_SOUTH_WEST'
  • 'south' / 'GDK_WINDOW_EDGE_SOUTH'
  • 'south-east' / 'GDK_WINDOW_EDGE_SOUTH_EAST'

  • 'pos' / 'GDK_HINT_POS'
  • 'min-size' / 'GDK_HINT_MIN_SIZE'
  • 'max-size' / 'GDK_HINT_MAX_SIZE'
  • 'base-size' / 'GDK_HINT_BASE_SIZE'
  • 'aspect' / 'GDK_HINT_ASPECT'
  • 'resize-inc' / 'GDK_HINT_RESIZE_INC'
  • 'win-gravity' / 'GDK_HINT_WIN_GRAVITY'
  • 'user-pos' / 'GDK_HINT_USER_POS'
  • 'user-size' / 'GDK_HINT_USER_SIZE'

  • 'withdrawn' / 'GDK_WINDOW_STATE_WITHDRAWN'
  • 'iconified' / 'GDK_WINDOW_STATE_ICONIFIED'
  • 'maximized' / 'GDK_WINDOW_STATE_MAXIMIZED'
  • 'sticky' / 'GDK_WINDOW_STATE_STICKY'
  • 'fullscreen' / 'GDK_WINDOW_STATE_FULLSCREEN'
  • 'above' / 'GDK_WINDOW_STATE_ABOVE'
  • 'below' / 'GDK_WINDOW_STATE_BELOW'

  • 'root' / 'GDK_WINDOW_ROOT'
  • 'toplevel' / 'GDK_WINDOW_TOPLEVEL'
  • 'child' / 'GDK_WINDOW_CHILD'
  • 'dialog' / 'GDK_WINDOW_DIALOG'
  • 'temp' / 'GDK_WINDOW_TEMP'
  • 'foreign' / 'GDK_WINDOW_FOREIGN'
  • 'offscreen' / 'GDK_WINDOW_OFFSCREEN'

  • 'normal' / 'GDK_WINDOW_TYPE_HINT_NORMAL'
  • 'dialog' / 'GDK_WINDOW_TYPE_HINT_DIALOG'
  • 'menu' / 'GDK_WINDOW_TYPE_HINT_MENU'
  • 'toolbar' / 'GDK_WINDOW_TYPE_HINT_TOOLBAR'
  • 'splashscreen' / 'GDK_WINDOW_TYPE_HINT_SPLASHSCREEN'
  • 'utility' / 'GDK_WINDOW_TYPE_HINT_UTILITY'
  • 'dock' / 'GDK_WINDOW_TYPE_HINT_DOCK'
  • 'desktop' / 'GDK_WINDOW_TYPE_HINT_DESKTOP'
  • 'dropdown-menu' / 'GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU'
  • 'popup-menu' / 'GDK_WINDOW_TYPE_HINT_POPUP_MENU'
  • 'tooltip' / 'GDK_WINDOW_TYPE_HINT_TOOLTIP'
  • 'notification' / 'GDK_WINDOW_TYPE_HINT_NOTIFICATION'
  • 'combo' / 'GDK_WINDOW_TYPE_HINT_COMBO'
  • 'dnd' / 'GDK_WINDOW_TYPE_HINT_DND'

Gtk2, Glib::Object, Gtk2::Gdk::Drawable

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

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

2022-06-07 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.