|
NAMEGtk2::Gdk::Window - wrapper for GdkWindowDESCRIPTION"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). HIERARCHYGlib::Object +----Gtk2::Gdk::Drawable +----Gtk2::Gdk::Window METHODSwindow = Gtk2::Gdk::Window->new ($parent, $attributes_ref)
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. boolean = $window->get_accept_focusSince: gtk+ 2.22$window->set_accept_focus ($accept_focus)
Since: gtk+ 2.4 (window, win_x, win_y) = Gtk2::Gdk::Window->at_pointerReturns window, a Gtk2::Gdk::Window and win_x and win_y, integers.$window->set_back_pixmap ($pixmap, $parent_relative=0)
pattern = $window->get_background_patternSince: gtk+ 2.22$window->set_background ($color)
$window->beepSince: gtk+ 2.12$window->begin_move_drag ($button, $root_x, $root_y, $timestamp)
$window->begin_paint_rect ($rectangle)
$window->begin_paint_region ($region)
$window->begin_resize_drag ($edge, $button, $root_x, $root_y, $timestamp)
$window->set_child_input_shapesSince: gtk+ 2.10$window->set_child_shapeslist = $window->get_childrenReturns the list of children (Gtk2::Gdk::Window's) known to gdk.$window->clear$window->clear_area ($x, $y, $width, $height)
$window->clear_area_e ($x, $y, $width, $height)
boolean = $window->get_compositedSince: gtk+ 2.22$window->set_composited ($composited)
Since: gtk+ 2.12 $window->configure_finishedSince: gtk+ 2.6(x, y) = $window->coords_from_parent ($parent_x, $parent_y)
Since: gtk+ 2.22 (parent_x, parent_y) = $window->coords_to_parent ($x, $y)
Since: gtk+ 2.22 surface = $window->create_similar_surface ($content, $width, $height)
Since: gtk+ 2.22 cursor or undef = $window->get_cursorSince: gtk+ 2.18$window->set_cursor ($cursor)
Gtk2::Gdk::Window->set_debug_updates ($enable)$window->set_debug_updates ($enable)
list = $window->get_decorations$window->set_decorations ($decorations)
$window->deiconify$window->destroywindow = $window->get_effective_parentSince: gtk+ 2.22window = $window->get_effective_toplevelSince: gtk+ 2.22window or undef = $offscreen_window->get_embedderOnly for offscreen "Gtk2::Gdk::Windows".Since: gtk+ 2.18 $offscreen_window->set_embedder ($embedder)
Only for offscreen "Gtk2::Gdk::Windows". Since: gtk+ 2.18 $window->enable_synchronized_configureSince: gtk+ 2.6$window->end_paintboolean = $window->ensure_nativeSince: gtk+ 2.18eventmask = $window->get_events$window->set_events ($event_mask)
$window->flushSince: gtk+ 2.18$window->focus ($timestamp)
boolean = $window->get_focus_on_mapSince: gtk+ 2.22$window->set_focus_on_map ($focus_on_map)
Since: gtk+ 2.6 window = Gtk2::Gdk::Window->foreign_new ($anid)
window = Gtk2::Gdk::Window->foreign_new_for_display ($display, $anid)
Since: gtk+ 2.2 rectangle = $window->get_frame_extents$window->freeze_updates$window->fullscreenSince: gtk+ 2.2$window->set_functions ($functions)
$sm_client_id->gdk_set_sm_client_id$window->geometry_changedOnly useful for offscreen "Gtk2::Gdk::Windows".Since: gtk+ 2.18 (x, y, width, height, depth) = $window->get_geometry$window->set_geometry_hints ($geometry)$window->set_geometry_hints ($geometry, $geom_mask)
$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. window = $window->get_groupSince: gtk+ 2.4$window->set_group ($leader)
boolean = $window->has_nativeSince: gtk+ 2.22$window->hide$window->set_icon_list (...)
$window->set_icon_name ($name)
$window->set_icon ($icon_window, $pixmap, $mask)
$window->iconify$window->input_shape_combine_mask ($mask, $x, $y)
Since: gtk+ 2.10 $window->input_shape_combine_region ($shape, $offset_x, $offset_y)
Since: gtk+ 2.10 list = $window->get_internal_paint_info$window->invalidate_maybe_recurse ($region, $func, $data=undef)
$window->invalidate_rect ($rectangle, $invalidate_children)
$window->invalidate_region ($region, $invalidate_children)
boolean = $window->is_destroyedSince: gtk+ 2.18boolean = $window->is_input_onlySince: gtk+ 2.22boolean = $window->is_shapedSince: gtk+ 2.22boolean = $window->is_viewableboolean = $window->is_visible$window->set_keep_above ($setting)
Since: gtk+ 2.4 $window->set_keep_below ($setting)
Since: gtk+ 2.4 window = Gtk2::Gdk::Window->lookup ($anid)
window = Gtk2::Gdk::Window->lookup_for_display ($display, $anid)
Since: gtk+ 2.2 $window->lower$window->maximize$window->merge_child_input_shapesSince: gtk+ 2.10$window->merge_child_shapesboolean = $window->get_modal_hintSince: gtk+ 2.22$window->set_modal_hint ($modal)
$window->move ($x, $y)
$window->move_region ($region, $dx, $dy)
Since: gtk+ 2.8 $window->move_resize ($x, $y, $width, $height)
$window->move_to_current_desktopSince: gtk+ 2.8$window->set_opacity ($opacity)
Since: gtk+ 2.12 (x, y) = $window->get_origin$window->set_override_redirect ($override_redirect)
window = $window->get_parentlist = $window->peek_childrenAn alias for get_childrenpixmap or undef = $offscreen_window->get_pixmapOnly for offscreen "Gtk2::Gdk::Windows".Since: gtk+ 2.18 (window_at_pointer, x, y, mask) = $window->get_pointerReturns window_at_pointer, a Gtk2::Gdk::Window or undef, x and y, integers, and mask, a Gtk2::Gdk::ModifierType.(x, y) = $window->get_positionGtk2::Gdk::Window->process_all_updates$window->process_all_updates$window->process_updates ($update_children)
$window->property_change ($property, $type, $format, $mode, ...)
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 | +--------------------+------------------------------------+ $window->property_delete ($property)
(property_type, format, data) = $window->property_get ($property, $type, $offset, $length, $pdelete)
See property_change for an explanation of the meaning of format. $window->raise$window->redirect_to_drawable ($drawable, $src_x, $src_y, $dest_x, $dest_y, $width, $height)
Since: gtk+ 2.14 $window->register_dnd$window->remove_redirectionSince: gtk+ 2.14$window->reparent ($new_parent, $x, $y)
$window->resize ($width, $height)
$window->restack ($sibling, $above)
Since: gtk+ 2.18 $window->set_role ($role)
(root_x, root_y) = $window->get_root_coords ($x, $y)
Since: gtk+ 2.18 (x, y) = $window->get_root_origin$window->scroll ($dx, $dy)
$window->shape_combine_mask ($mask, $x, $y)
$window->shape_combine_region ($shape_region, $offset_x, $offset_y)
$window->show$window->show_unraised$window->set_skip_pager_hint ($skips_pager)
Since: gtk+ 2.2 $window->set_skip_taskbar_hint ($skips_taskbar)
Since: gtk+ 2.2 $window->set_startup_id ($startup_id)
Since: gtk+ 2.12 windowstate = $window->get_stateboolean = $window->set_static_gravities ($use_static)
$window->stick$window->thaw_updates$window->set_title ($title)
window = $window->get_toplevellist = Gtk2::Gdk::Window->get_toplevelsReturns 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.$window->set_transient_for ($parent)
windowtypehint = $window->get_type_hintSince: gtk+ 2.10$window->set_type_hint ($hint)
$window->unfullscreenSince: gtk+ 2.2$window->unmaximize$window->unstickregion or undef = $window->get_update_area$window->set_urgency_hint ($urgent)
Since: gtk+ 2.8 unsigned = $window->get_user_data$window->set_user_data ($user_data)
$window->set_user_time ($timestamp)
Since: gtk+ 2.6 windowtype = $window->get_window_type$window->withdrawPROPERTIES
SIGNALS
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. ENUMS AND FLAGSflags Gtk2::Gdk::EventMask
enum Gtk2::Gdk::PropMode
flags Gtk2::Gdk::WMDecoration
flags Gtk2::Gdk::WMFunction
enum Gtk2::Gdk::WindowEdge
flags Gtk2::Gdk::WindowHints
flags Gtk2::Gdk::WindowState
enum Gtk2::Gdk::WindowType
enum Gtk2::Gdk::WindowTypeHint
SEE ALSOGtk2, Glib::Object, Gtk2::Gdk::DrawableCOPYRIGHTCopyright (C) 2003-2011 by the gtk2-perl team.This software is licensed under the LGPL. See Gtk2 for a full notice.
Visit the GSP FreeBSD Man Page Interface. |