PageRenderTime 64ms CodeModel.GetById 27ms app.highlight 16ms RepoModel.GetById 1ms app.codeStats 1ms

/src/wrappers/gtk/library/gtk_window.e

http://github.com/tybor/Liberty
Specman e | 1677 lines | 242 code | 410 blank | 1025 comment | 4 complexity | eedc264f14419f76251dcc950a8ed4a7 MD5 | raw file

Large files files are truncated, but you can click here to view the full file

   1indexing
   2	copyright: "[
   3					Copyright (C) 2006 eiffel-libraries team, GTK+ team
   4					
   5					This library is free software; you can redistribute it and/or
   6					modify it under the terms of the GNU Lesser General Public License
   7					as published by the Free Software Foundation; either version 2.1 of
   8					the License, or (at your option) any later version.
   9					
  10					This library is distributed in the hope that it will be useful, but
  11					WITHOUT ANY WARRANTY; without even the implied warranty of
  12					MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  13					Lesser General Public License for more details.
  14
  15					You should have received a copy of the GNU Lesser General Public
  16					License along with this library; if not, write to the Free Software
  17					Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  18					02110-1301 USA
  19					]"
  20
  21					
  22				license: "LGPL v2 or later"
  23	date: "$Date:$"
  24	revision "$REvision:$"
  25
  26class GTK_WINDOW
  27
  28inherit
  29	GTK_BIN
  30
  31insert
  32	GTK
  33	GTK_WINDOW_EXTERNALS
  34	GTK_WINDOW_TYPE
  35
  36creation
  37	make, make_toplevel, from_external_pointer
  38
  39feature {} -- Creation
  40
  41	make, make_toplevel is
  42			-- Create a new window managed by the window manager, having
  43			-- a frame by default
  44		require
  45			gtk_initialized: gtk.is_initialized
  46		do
  47			from_external_pointer (gtk_window_new (gtk_window_toplevel))
  48		end
  49
  50feature
  51
  52	set_title (a_title: STRING) is
  53		require
  54			a_title_not_void: a_title/=Void
  55		do
  56			gtk_window_set_title (handle, a_title.to_external)
  57		end
  58
  59	-- TODO: wrap gtk_window_set_wmclass ()
  60
  61feature -- Resizability
  62
  63	set_resizable is
  64			-- Makes current window resizable by the user.
  65		do
  66			gtk_window_set_resizable (handle, 1)
  67		end
  68
  69	unset_resizable is
  70			-- Makes current window not resizable by the user.
  71		do
  72			gtk_window_set_resizable (handle, 0)
  73		end
  74		
  75	is_resizable: BOOLEAN is
  76			-- Is Current window resizable by the user?
  77		do
  78			Result:=gtk_window_get_resizable (handle).to_boolean
  79		end
  80
  81	-- TODO: wrap gtk_window_add_accel_group (window,accel_group: POINTER)
  82	-- TODO: wrap gtk_window_remove_accel_group (window,accel_group: POINTER)
  83
  84	is_focus_activated: BOOLEAN
  85			-- Has the current focused widget been activated by `activate_focus'?
  86	
  87	activate_focus is
  88			-- Try to activate the current focused widget within the
  89			-- window. `is_focus_activated' will be true if a widget got
  90			-- activated.
  91		do
  92			is_focus_activated:=gtk_window_activate_focus (handle).to_boolean
  93		end
  94
  95	is_default_activated: BOOLEAN
  96			-- Has the default widget been activated by `activate_default'?
  97
  98	activate_default: INTEGER is
  99			-- Activates the default widget for the window, unless the
 100			-- current focused widget has been configured to receive the
 101			-- default action (see GTK_RECEIVES_DEFAULT in
 102			-- GtkWidgetFlags), in which case the focused widget is
 103			-- activated.
 104		do
 105			is_default_activated := gtk_window_activate_default (handle).to_boolean
 106		end
 107
 108feature -- Window modal mode
 109
 110	set_modal is
 111			-- Sets a window modal. Modal windows prevent interaction
 112			-- with other windows in the same application. To keep modal
 113			-- dialogs on top of main application windows, use
 114			-- `set_transient_for' to make the dialog transient for the
 115			-- parent; most window managers will then disallow lowering
 116			-- the dialog below the parent.
 117		do
 118			gtk_window_set_modal (handle,1)
 119		end
 120
 121	unset_modal is
 122			-- Sets a window non-modal.
 123		do
 124			gtk_window_set_modal (handle,0)
 125		end
 126
 127	is_modal: BOOLEAN is
 128			-- Is Current window modal? See `set_modal'
 129		do
 130			Result:=gtk_window_get_modal (handle).to_boolean
 131		end
 132
 133feature -- Window size
 134
 135	set_default_size (a_width, an_height: INTEGER) is
 136			-- Sets the default size of a window. If the window's
 137			-- "natural" size (its size request) is larger than the
 138			-- default, the default will be ignored. More generally, if
 139			-- the default size does not obey the geometry hints for the
 140			-- window (`set_geometry_hints' can be used to set these
 141			-- explicitly), the default size will be clamped to the
 142			-- nearest permitted size.
 143
 144			-- Unlike `set_size_request', which sets a size request for a
 145			-- widget and thus would keep users from shrinking the
 146			-- window, this function only sets the initial size, just as
 147			-- if the user had resized the window themselves. Users can
 148			-- still shrink the window again as they normally
 149			-- would. Setting a default size of -1 means to use the
 150			-- "natural" default size (the size request of the window).
 151
 152			-- For more control over a window's initial size and how
 153			-- resizing works, investigate `set_geometry_hints'.
 154
 155			-- For some uses, `resize' is a more appropriate
 156			-- function. `resize' changes the current size of the window,
 157			-- rather than the size to be used on initial
 158			-- display. `resize' always affects the window itself, not
 159			-- the geometry widget.
 160
 161			-- The default size of a window only affects the first time a
 162			-- window is shown; if a window is hidden and re-shown, it
 163			-- will remember the size it had prior to hiding, rather than
 164			-- using the default size.
 165
 166			-- Windows can't actually be 0x0 in size, they must be at
 167			-- least 1x1, but passing 0 for width and height is OK,
 168			-- resulting in a 1x1 default size.
 169
 170			-- `a_width': 	width in pixels, or -1 to unset the default width
 171			-- `an_height': 	height in pixels, or -1 to unset the default height
 172		do
 173			gtk_window_set_default_size (handle,a_width,an_height)
 174		end
 175
 176	-- TODO: wrap gtk_window_set_geometry_hints (window,
 177	-- geometry_widget, geometry: POINTER; gdkwindowhints_geom_mask:
 178	-- INTEGER) which require wrapping of GdkGeometry
 179
 180feature -- Window "gravity"
 181
 182	-- TODO implement set_gravity_[north/south/east/west] etc
 183
 184	set_gravity (a_gravity: INTEGER) is
 185			-- Window gravity defines the meaning of coordinates passed
 186			-- to `move'. See GDK_GRAVITY for more details.  The default
 187			-- window gravity is `gdk_gravity_north_west' which will
 188			-- typically "do what you mean."
 189		
 190			-- `a_gravity': window gravity
 191		require valid_gravity: is_valid_gravity (a_gravity)
 192		do
 193			gtk_window_set_gravity (handle, a_gravity)
 194		end
 195
 196	gravity: INTEGER is
 197			-- Window gravity; it defines the meaning of coordinates
 198			-- passed to `move'. See GDK_GRAVITY for more details.
 199		do
 200			Result := gtk_window_get_gravity (handle)
 201		ensure  valid_gravity: is_valid_gravity (Result)
 202		end
 203
 204feature -- Window position
 205
 206	no_position is
 207			-- No influence is made on placement.
 208		do
 209			gtk_window_set_position (handle,gtk_win_pos_none)
 210		end
 211
 212	midscreen is
 213			-- Window should be placed in the center of the screen.
 214		do
 215			gtk_window_set_position (handle, gtk_win_pos_center)
 216		end
 217
 218	at_mouse is
 219			-- Window should be placed at the current mouse position.
 220		do
 221			gtk_window_set_position (handle, gtk_win_pos_mouse)
 222		end
 223
 224	always_centered is
 225			-- Keep window centered as it changes size, etc.
 226		do
 227			gtk_window_set_position (handle, gtk_win_pos_center_always)
 228		end
 229
 230	center_on_parent is
 231			-- Center the window on its transient parent (see `set_transient_for').
 232		do
 233			gtk_window_set_position (handle, gtk_win_pos_center_on_parent)
 234		end
 235
 236	set_position (a_position: INTEGER) is
 237			-- Sets position constraint for this window to
 238			-- `a_position'. If the old or new constraint is
 239			-- `gtk_win_pos_center_always', this will also cause the
 240			-- window to be repositioned to satisfy the new constraint.
 241			-- `a_position': a position constraint.
 242		require valid_position: is_valid_gtk_window_position (a_position)
 243		do
 244			gtk_window_set_position (handle,a_position)
 245		end
 246
 247feature -- Transiency
 248
 249	set_transient_for (a_parent: GTK_WINDOW) is
 250			-- Dialog windows should be set transient for the main
 251			-- application window they were spawned from. This allows
 252			-- window managers to e.g. keep the dialog on top of the main
 253			-- window, or center the dialog over the main
 254			-- window. `GTK_DIALOG.make_with_buttons' and other convenience
 255			-- functions in GTK+ will sometimes call `set_transient_for' on
 256			-- your behalf.
 257
 258			-- On Windows, this function will and put the child window on
 259			-- top of the parent, much as the window manager would have
 260			-- done on X.
 261
 262			-- parent : 	parent window
 263		require valid_parent: a_parent/=Void
 264		do
 265			gtk_window_set_transient_for (handle,a_parent.handle)
 266		end
 267
 268feature -- window lifecycle
 269
 270	set_destroy_with_parent is
 271			-- destroying the transient parent of Current window will
 272			-- also destroy window itself. This is useful for dialogs
 273			-- that shouldn't persist beyond the lifetime of the main
 274			-- window they're associated with, for example.
 275		do
 276			gtk_window_set_destroy_with_parent (handle, 1)
 277		end
 278
 279	unset_destroy_with_parent is
 280			-- opposite of `set_destroy_with_parent'
 281		do
 282			gtk_window_set_destroy_with_parent (handle, 0)
 283		end
 284
 285	-- TODO: wrap void gtk_window_set_screen (GtkWindow *window,
 286	-- GdkScreen *screen);
 287	
 288	-- TODO: wrap GdkScreen* gtk_window_get_screen (GtkWindow *window);
 289
 290feature -- various queries
 291
 292	is_active: BOOLEAN is
 293			-- Is current window part of the current active toplevel?
 294			-- (That is, the toplevel window receiving keystrokes.) The
 295			-- return value is TRUE if the window is active toplevel
 296			-- itself, but also if it is, say, a GTK_PLUG embedded in the
 297			-- active toplevel. You might use this function if you wanted
 298			-- to draw a widget differently in an active window from a
 299			-- widget in an inactive window. See `has_toplevel_focus'
 300		do
 301			Result:=(gtk_window_is_active (handle)).to_boolean
 302		end
 303
 304	has_toplevel_focus: BOOLEAN is
 305			-- Is the input focus within Current GTK_WINDOW? For real
 306			-- toplevel windows, this is identical to `is_active', but
 307			-- for embedded windows, like GTK_PLUG, the results will
 308			-- differ.
 309		do
 310			Result:=gtk_window_has_toplevel_focus (handle).to_boolean
 311		end
 312
 313	-- TODO: wrap gtk_window_list_toplevels: POINTER (GList *) needs
 314	-- G_LIST[WRAPPED]. Returns a list of all existing toplevel
 315	-- windows. The widgets in the list are not individually
 316	-- referenced. If you want to iterate through the list and perform
 317	-- actions involving callbacks that might destroy the widgets, you
 318	-- must call g_list_foreach (result, (GFunc)g_object_ref, NULL)
 319	-- first, and then unref all the widgets afterwards.
 320
 321	-- TODO: wrap void gtk_window_add_mnemonic (GtkWindow *window, guint keyval,
 322	-- GtkWidget *target);
 323
 324	-- TODO: wrap void gtk_window_remove_mnemonic (GtkWindow *window,
 325	-- guint keyval, GtkWidget *target);
 326	
 327	-- TODO: wrap gboolean gtk_window_mnemonic_activate (GtkWindow
 328	-- *window, guint keyval, GdkModifierType modifier);
 329
 330	-- TODO: wrap gboolean gtk_window_activate_key (GtkWindow *window,
 331	-- GdkEventKey *event);
 332
 333	-- TODO: wrap gboolean gtk_window_propagate_key_event (GtkWindow
 334	-- *window, GdkEventKey *event);
 335
 336	focus: GTK_WIDGET is
 337			-- the current focused widget within the window. Note that
 338			-- this is the widget that would have the focus if the
 339			-- toplevel window focused; if the toplevel window is not
 340			-- focused then `has_focus' will be False.
 341		local ptr: POINTER
 342		do
 343			ptr:=gtk_window_get_focus (handle)
 344			if ptr.is_not_null then
 345				-- TODO: black magic to retrieve the Eiffel wrapper object
 346				-- if it exists or to create the correct Eiffel object
 347				-- from it!  If it has already been wrapped it can be
 348				-- stored as a property. If it hasn't been already wrapped
 349				-- things get misty; a possible implementation of it is to
 350				-- link each GtkClass to its Eiffel counterpart.
 351				not_yet_implemented
 352			else
 353				Result := Void
 354			end
 355		end
 356
 357feature -- Focusing
 358	unset_focus is
 359			-- Unsets the focus widget for this window. 
 360		do
 361			gtk_window_set_focus (handle, default_pointer)
 362		ensure focus_unset: -- TODO
 363		end
 364
 365	set_focus (a_widget: GTK_WIDGET) is
 366			-- If `a_widget' is not the current focus widget, and is focusable,
 367			-- sets it as the focus widget for the window. To set the focus to
 368			-- a particular widget in the toplevel, it is usually more
 369			-- convenient to use `GTK_WIDGET.grab_focus' instead of this
 370			-- function.
 371		require 
 372			widget_not_void: a_widget /= Void
 373			widget_is_contained_in_window: -- TODO
 374		do
 375			gtk_window_set_focus (handle, a_widget.handle)
 376		end
 377
 378	set_default (a_default: GTK_WIDGET) is
 379			-- Sets the default widget for Current GtkWindow.  The
 380			-- default widget is the widget that's activated when the
 381			-- user presses Enter in a dialog (for example). When setting
 382			-- the default widget it's generally easier to call
 383			-- `GTK_WIDGET.grab_focus' on the widget. Before making a
 384			-- widget the default widget, you must set the
 385			-- `gtk_can_default' flag on the widget you'd like to make
 386			-- the default using `set_flags' (TODO?).
 387		require 
 388			default_not_void: a_default /= Void
 389		do
 390			gtk_window_set_default (handle,a_default.handle)
 391		end
 392
 393	unset_default  is
 394			-- Unsets the default widget. See also `set_default'
 395		do
 396			gtk_window_set_default (handle, default_pointer)
 397		end
 398
 399	present is
 400			-- Presents a window to the user. This may mean raising the
 401			-- window in the stacking order, deiconifying it, moving it
 402			-- to the current desktop, and/or giving it the keyboard
 403			-- focus, possibly dependent on the user's platform, window
 404			-- manager, and preferences.
 405
 406			-- If window is hidden, this function calls `show' as well.
 407
 408			-- This feature should be used when the user tries to open a
 409			-- window that's already open. Say for example the
 410			-- preferences dialog is currently open, and the user chooses
 411			-- Preferences from the menu a second time; use `present' to
 412			-- move the already-open dialog where the user can see it.
 413
 414			-- If you are calling this feature in response to a user
 415			-- interaction, it is preferable to use `present_with_time'.
 416		do
 417			gtk_window_present (handle)
 418		end
 419
 420	present_with_time (a_timestamp: INTEGER_32) is
 421			-- Presents a window to the user in response to a user
 422			-- interaction. If you need to present a window without a
 423			-- timestamp, use `present'; see `present' for details.
 424
 425			-- `a_timestamp' is usually derived from the user interaction
 426			-- (typically a button or key press event) which triggered
 427			-- this call.
 428			-- TODO: a_timestamp shall be NATURAL_32
 429		require positive_stamp: a_timestamp >= 0
 430		do 
 431			gtk_window_present_with_time(handle,a_timestamp)
 432		end
 433
 434	iconify  is
 435			-- Asks to iconify (i.e. minimize) the specified window. Note
 436			-- that you shouldn't assume the window is definitely
 437			-- iconified afterward, because other entities (e.g. the user
 438			-- or window manager) could deiconify it again, or there may
 439			-- not be a window manager in which case iconification isn't
 440			-- possible, etc. But normally the window will end up
 441			-- iconified. Just don't write code that crashes if not.
 442
 443			-- It's permitted to call this function before showing a
 444			-- window, in which case the window will be iconified before
 445			-- it ever appears onscreen.
 446
 447			-- You can track iconification via the "window_state_event"
 448			-- signal on GtkWidget.
 449		do
 450			gtk_window_iconify (handle)
 451		end
 452
 453	deiconify is
 454			-- Asks to deiconify (i.e. unminimize) the specified
 455			-- window. Note that you shouldn't assume the window is
 456			-- definitely deiconified afterward, because other entities
 457			-- (e.g. the user or window manager) could iconify it again
 458			-- before your code which assumes deiconification gets to
 459			-- run.
 460		
 461			-- You can track iconification via the "window_state_event"
 462			-- signal on GtkWidget.
 463		do
 464			gtk_window_deiconify (handle)
 465		end
 466
 467	stick is
 468			-- Asks to stick the window, which means that it will appear
 469			-- on all user desktops. Note that you shouldn't assume the
 470			-- window is definitely stuck afterward, because other
 471			-- entities (e.g. the user or window manager) could unstick
 472			-- it again, and some window managers do not support sticking
 473			-- windows. But normally the window will end up stuck. Just
 474			-- don't write code that crashes if not.
 475
 476			-- It's permitted to call this function before showing a
 477			-- window.
 478
 479			-- You can track stickiness via the "window_state_event"
 480			-- signal on GtkWidget.
 481		do
 482			gtk_window_stick (handle)
 483		end
 484
 485	unstick is
 486			-- Asks to unstick window, which means that it will appear on
 487			-- only one of the user's desktops. Note that you shouldn't
 488			-- assume the window is definitely unstuck afterward, because
 489			-- other entities (e.g. the user or window manager) could
 490			-- stick it again. But normally the window will end up
 491			-- stuck. Just don't write code that crashes if not.
 492
 493			-- You can track stickiness via the "window_state_event" signal on GtkWidget.
 494		do
 495			gtk_window_unstick (handle)
 496		end
 497
 498	maximize is
 499			-- Asks to maximize window, so that it becomes
 500			-- full-screen. Note that you shouldn't assume the window is
 501			-- definitely maximized afterward, because other entities
 502			-- (e.g. the user or window manager) could unmaximize it
 503			-- again, and not all window managers support
 504			-- maximization. But normally the window will end up
 505			-- maximized. Just don't write code that crashes if not.
 506
 507			-- It's permitted to call this function before showing a
 508			-- window, in which case the window will be maximized when it
 509			-- appears onscreen initially.
 510
 511			-- You can track maximization via the "window_state_event"
 512			-- signal on GtkWidget.
 513		do
 514			gtk_window_maximize (handle)
 515		end
 516
 517	unmaximize is
 518			-- Asks to unmaximize window. Note that you shouldn't assume
 519			-- the window is definitely unmaximized afterward, because
 520			-- other entities (e.g. the user or window manager) could
 521			-- maximize it again, and not all window managers honor
 522			-- requests to unmaximize. But normally the window will end
 523			-- up unmaximized. Just don't write code that crashes if not.
 524
 525			-- You can track maximization via the "window_state_event"
 526			-- signal on GtkWidget.
 527		do
 528			gtk_window_unmaximize (handle)
 529		end
 530
 531
 532	fullscreen  is
 533			-- Asks to place window in the fullscreen state. Note that
 534			-- you shouldn't assume the window is definitely full screen
 535			-- afterward, because other entities (e.g. the user or window
 536			-- manager) could unfullscreen it again, and not all window
 537			-- managers honor requests to fullscreen windows. But
 538			-- normally the window will end up fullscreen. Just don't
 539			-- write code that crashes if not.
 540
 541			-- You can track the fullscreen state via the
 542			-- "window_state_event" signal on GtkWidget.
 543		do
 544			gtk_window_fullscreen (handle)
 545		end
 546
 547
 548	unfullscreen is
 549			-- Asks to toggle off the fullscreen state for window. Note
 550			-- that you shouldn't assume the window is definitely not
 551			-- full screen afterward, because other entities (e.g. the
 552			-- user or window manager) could fullscreen it again, and not
 553			-- all window managers honor requests to unfullscreen
 554			-- windows. But normally the window will end up restored to
 555			-- its normal state. Just don't write code that crashes if
 556			-- not.
 557
 558			-- You can track the fullscreen state via the
 559			-- "window_state_event" signal on GtkWidget.
 560		do
 561			gtk_window_unfullscreen (handle)
 562		end
 563
 564
 565	
 566-- 	gtk_window_set_keep_above (window: POINTER; setting: INTEGER) is 
 567-- 			-- Asks to keep window above, so that it stays on top. Note
 568-- 			-- that you shouldn't assume the window is definitely above
 569-- 			-- afterward, because other entities (e.g. the user or window
 570-- 			-- manager) could not keep it above, and not all window
 571-- 			-- managers support keeping windows above. But normally the
 572-- 			-- window will end kept above. Just don't write code that
 573-- 			-- crashes if not.
 574
 575-- 			-- It's permitted to call this function before showing a
 576-- 			-- window, in which case the window will be kept above when
 577-- 			-- it appears onscreen initially.
 578
 579-- 			-- You can track the above state via the "window_state_event"
 580-- 			-- signal on GtkWidget.
 581
 582-- 			-- Note that, according to the Extended Window Manager Hints
 583-- 			-- specification, the above state is mainly meant for user
 584-- 			-- preferences and should not be used by applications
 585-- 			-- e.g. for drawing attention to their dialogs.
 586
 587-- 			-- window : 	a GtkWindow
 588-- 			-- setting : 	whether to keep window above other windows
 589-- 		external "C use <gtk/gtk.h>"
 590-- 		end
 591
 592
 593-- TODO: 	gtk_window_set_keep_below (window:POINTER; setting: INTEGER) is
 594-- 			-- Asks to keep window below, so that it stays in
 595-- 			-- bottom. Note that you shouldn't assume the window is
 596-- 			-- definitely below afterward, because other entities
 597-- 			-- (e.g. the user or window manager) could not keep it below,
 598-- 			-- and not all window managers support putting windows
 599-- 			-- below. But normally the window will be kept below. Just
 600-- 			-- don't write code that crashes if not.
 601
 602-- 			-- It's permitted to call this function before showing a
 603-- 			-- window, in which case the window will be kept below when
 604-- 			-- it appears onscreen initially.
 605
 606-- 			-- You can track the below state via the "window_state_event"
 607-- 			-- signal on GtkWidget.
 608
 609-- 			-- Note that, according to the Extended Window Manager Hints
 610-- 			-- specification, the above state is mainly meant for user
 611-- 			-- preferences and should not be used by applications
 612-- 			-- e.g. for drawing attention to their dialogs.
 613
 614-- 			-- window : 	a GtkWindow
 615-- 			-- setting : 	whether to keep window below other windows
 616-- 		external "C use <gtk/gtk.h>"
 617-- 		end
 618
 619
 620-- TODO:	gtk_window_begin_resize_drag (window: POINTER;
 621-- 											edge, button, root_x, root_y: INTEGER;
 622-- 											guint32_timestamp: INTEGER) is
 623-- 			-- Starts resizing a window. This function is used if an
 624-- 			-- application has window resizing controls. When GDK can
 625-- 			-- support it, the resize will be done using the standard
 626-- 			-- mechanism for the window manager or windowing
 627-- 			-- system. Otherwise, GDK will try to emulate window
 628-- 			-- resizing, potentially not all that well, depending on the
 629-- 			-- windowing system.
 630
 631-- 			-- window : 	a GtkWindow
 632-- 			-- edge : 	(GdkWindowEdge) position of the resize control
 633-- 			-- button : 	mouse button that initiated the drag
 634-- 			-- root_x : 	X position where the user clicked to initiate the drag, in root window coordinates
 635-- 			-- root_y : 	Y position where the user clicked to initiate the drag
 636-- 			-- timestamp : 	timestamp from the click event that initiated the drag
 637-- 		external "C use <gtk/gtk.h>"
 638-- 		end
 639
 640-- TODO:	gtk_window_begin_move_drag      (GtkWindow *window,
 641-- 												button, root_x, root_y: INTEGER;
 642-- 												guint32_timestamp: INTEGER_32) is
 643-- 			-- Starts moving a window. This function is used if an
 644-- 			-- application has window movement grips. When GDK can support
 645-- 			-- it, the window movement will be done using the standard
 646-- 			-- mechanism for the window manager or windowing
 647-- 			-- system. Otherwise, GDK will try to emulate window movement,
 648-- 			-- potentially not all that well, depending on the windowing
 649-- 			-- system.
 650
 651-- 			-- window : 	a GtkWindow
 652-- 			-- button : 	mouse button that initiated the drag
 653-- 			-- root_x : X position where the user clicked to initiate the
 654-- 			-- drag, in root window coordinates
 655-- 			-- root_y : 	Y position where the user clicked to initiate the drag
 656-- 			-- timestamp : 	timestamp from the click event that initiated the drag
 657-- 		external "C use <gtk/gtk.h>"
 658-- 		end
 659
 660-- TODO:	gtk_window_set_decorated (window: POINTER; setting: INTEGER) is
 661-- 			-- By default, windows are decorated with a title bar, resize
 662-- 			-- controls, etc. Some window managers allow GTK+ to disable
 663-- 			-- these decorations, creating a borderless window. If you
 664-- 			-- set the decorated property to FALSE using this function,
 665-- 			-- GTK+ will do its best to convince the window manager not
 666-- 			-- to decorate the window. Depending on the system, this
 667-- 			-- function may not have any effect when called on a window
 668-- 			-- that is already visible, so you should call it before
 669-- 			-- calling gtk_window_show().
 670
 671-- 			-- On Windows, this function always works, since there's no
 672-- 			-- window manager policy involved.
 673
 674-- 			-- window : 	a GtkWindow
 675-- 			-- setting : 	TRUE to decorate the window
 676-- 		external "C use <gtk/gtk.h>"
 677-- 		end
 678
 679
 680-- TODO:	gtk_window_set_frame_dimensions (window: POINTER; left,top,right,bottom: INTEGER) is
 681-- 			-- (Note: this is a special-purpose function intended for the
 682-- 			-- framebuffer port; see gtk_window_set_has_frame(). It will
 683-- 			-- have no effect on the window border drawn by the window
 684-- 			-- manager, which is the normal case when using the X Window
 685-- 			-- system.)
 686
 687-- 			-- For windows with frames (see gtk_window_set_has_frame()) this function can be used to change the size of the frame border.
 688		
 689-- 			-- window : 	a GtkWindow that has a frame
 690-- 			-- left : 	The width of the left border
 691-- 			-- top : 	The height of the top border
 692-- 			-- right : 	The width of the right border
 693-- 			-- bottom : 	The height of the bottom border
 694-- 		external "C use <gtk/gtk.h>"
 695-- 		end
 696
 697
 698-- 	gtk_window_set_has_frame (window: POINTER; setting: INTEGER) is
 699-- 			-- (Note: this is a special-purpose function for the
 700-- 			-- framebuffer port, that causes GTK+ to draw its own window
 701-- 			-- border. For most applications, you want
 702-- 			-- gtk_window_set_decorated() instead, which tells the window
 703-- 			-- manager whether to draw the window border.)
 704
 705-- 			-- If this function is called on a window with setting of
 706-- 			-- TRUE, before it is realized or showed, it will have a
 707-- 			-- "frame" window around window->window, accessible in
 708-- 			-- window->frame. Using the signal frame_event you can
 709-- 			-- receive all events targeted at the frame.
 710
 711-- 			-- This function is used by the linux-fb port to implement
 712-- 			-- managed windows, but it could concievably be used by
 713-- 			-- X-programs that want to do their own window decorations.
 714
 715-- 			-- window : 	a GtkWindow
 716-- 			-- setting : 	a boolean
 717-- 		external "C use <gtk/gtk.h>"
 718-- 		end
 719
 720
 721-- -- void        gtk_window_set_mnemonic_modifier
 722-- --                                             (GtkWindow *window,
 723-- --                                              GdkModifierType modifier);
 724
 725-- -- Sets the mnemonic modifier for this window.
 726
 727-- -- window : 	a GtkWindow
 728-- -- modifier : 	the modifier mask used to activate mnemonics on this window.
 729-- --		external "C use <gtk/gtk.h>"
 730-- --		end
 731
 732
 733-- -- void        gtk_window_set_role             (GtkWindow *window,
 734-- --                                              const gchar *role);
 735
 736-- -- This function is only useful on X11, not with other GTK+ targets.
 737
 738-- -- In combination with the window title, the window role allows a window manager to identify "the same" window when an application is restarted. So for example you might set the "toolbox" role on your app's toolbox window, so that when the user restarts their session, the window manager can put the toolbox back in the same place.
 739
 740-- -- If a window already has a unique title, you don't need to set the role, since the WM can use the title to identify the window when restoring the session.
 741
 742-- -- window : 	a GtkWindow
 743-- -- role : 	unique identifier for the window to be used when restoring a session
 744-- --		external "C use <gtk/gtk.h>"
 745-- --		end
 746
 747
 748-- 	gtk_window_set_type_hint (window: POINTER; a_hint: INTEGER) is
 749-- 			-- By setting the type hint for the window, you allow the window
 750-- 			-- manager to decorate and handle the window in a way which is
 751-- 			-- suitable to the function of the window in your application.
 752
 753-- 			-- This function should be called before the window becomes visible.
 754
 755-- 			-- gtk_dialog_new_with_buttons() and other convenience functions in GTK+ will sometimes call gtk_window_set_type_hint() on your behalf.
 756		
 757-- 			-- window : 	a GtkWindow
 758-- 			-- hint : 	(GDKWINDOWTYPEHINT) the window type
 759-- 		require valid_hint: is_valid_window_type_hint (a_hint)
 760-- 		external "C use <gtk/gtk.h>"
 761-- 		end
 762
 763
 764-- 	gtk_window_set_skip_taskbar_hint (window: POINTER; setting: INTEGER) is
 765-- 			-- Windows may set a hint asking the desktop environment not
 766-- 			-- to display the window in the task bar. This function sets
 767-- 			-- this hint.
 768
 769-- 			-- window : 	a GtkWindow
 770-- 			-- setting : 	TRUE to keep this window from appearing in the task bar
 771-- 		external "C use <gtk/gtk.h>"
 772-- 		end
 773
 774
 775-- 	gtk_window_set_skip_pager_hint (window: POINTER; setting: INTEGER) is
 776-- 			-- Windows may set a hint asking the desktop environment not to display the window in the pager. This function sets this hint. (A "pager" is any desktop navigation tool such as a workspace switcher that displays a thumbnail representation of the windows on the screen.)
 777
 778-- 			-- window : 	a GtkWindow
 779-- 			-- setting : 	TRUE to keep this window from appearing in the pager
 780-- 		external "C use <gtk/gtk.h>"
 781-- 		end
 782
 783
 784-- 	gtk_window_set_urgency_hint (window: POINTER; setting: INTEGER) is
 785-- 			-- Windows may set a hint asking the desktop environment to
 786-- 			-- draw the users attention to the window. This function sets
 787-- 			-- this hint.
 788
 789-- 			-- window : 	a GtkWindow
 790-- 			-- setting : 	TRUE to mark this window as urgent
 791-- 		external "C use <gtk/gtk.h>"
 792-- 		end
 793
 794
 795-- 	gtk_window_set_accept_focus (window: POINTER; setting: INTEGER) is
 796-- 			-- Windows may set a hint asking the desktop environment not
 797-- 			-- to receive the input focus. This function sets this hint.
 798
 799-- 			-- window : 	a GtkWindow
 800-- 			-- setting : 	TRUE to let this window receive input focus
 801-- 		external "C use <gtk/gtk.h>"
 802-- 		end
 803
 804-- 	gtk_window_set_focus_on_map (window: POINTER; setting: INTEGER) is
 805-- 			-- Windows may set a hint asking the desktop environment not
 806-- 			-- to receive the input focus when the window is mapped. This
 807-- 			-- function sets this hint.
 808
 809-- 			-- window : 	a GtkWindow
 810-- 			-- setting : 	TRUE to let this window receive input focus on map
 811-- 		external "C use <gtk/gtk.h>"
 812-- 		end
 813
 814
 815-- 	gtk_window_get_decorated (window: POINTER): INTEGER is
 816-- 			-- Returns whether the window has been set to have
 817-- 			-- decorations such as a title bar via
 818-- 			-- gtk_window_set_decorated().
 819
 820-- 			-- window : 	a GtkWindow
 821-- 			-- Returns : 	TRUE if the window has been set to have decorations
 822-- 		external "C use <gtk/gtk.h>"
 823-- 		end
 824
 825
 826-- 	-- GList*      gtk_window_get_default_icon_list
 827-- 	--                                             (void);
 828	
 829-- 	-- Gets the value set by gtk_window_set_default_icon_list(). The list is a copy and should be freed with g_list_free(), but the pixbufs in the list have not had their reference count incremented.
 830	
 831-- 	-- Returns : 	copy of default icon list
 832-- 	--external "C use <gtk/gtk.h>"
 833-- 	--end
 834
 835
 836-- 	gtk_window_get_default_size (window, gint_width, gint_height: POINTER) is
 837-- 			-- Gets the default size of the window. A value of -1 for the
 838-- 			-- width or height indicates that a default size has not been
 839-- 			-- explicitly set for that dimension, so the "natural" size
 840-- 			-- of the window will be used.
 841
 842-- 			-- window : 	a GtkWindow
 843-- 			-- width : 	(gint *) location to store the default width, or NULL
 844-- 			-- height : (gint *) location to store the default height, or NULL
 845-- 		external "C use <gtk/gtk.h>"
 846-- 		end
 847
 848
 849-- 	gtk_window_get_destroy_with_parent (window: POINTER): INTEGER is
 850-- 			-- Returns whether the window will be destroyed with its
 851-- 			-- transient parent. See
 852-- 			-- gtk_window_set_destroy_with_parent().
 853		
 854-- 			-- window : 	a GtkWindow
 855-- 			-- Returns : 	TRUE if the window will be destroyed with its transient parent.
 856-- 		external "C use <gtk/gtk.h>"
 857-- 		end
 858
 859
 860-- 	gtk_window_get_frame_dimensions (window,left,top,right,bottom: POINTER) is
 861-- 			-- (Note: this is a special-purpose function intended for the
 862-- 			-- framebuffer port; see gtk_window_set_has_frame(). It will
 863-- 			-- not return the size of the window border drawn by the
 864-- 			-- window manager, which is the normal case when using a
 865-- 			-- windowing system. See gdk_window_get_frame_extents() to
 866-- 			-- get the standard window border extents.)
 867
 868-- 			-- Retrieves the dimensions of the frame window for this
 869-- 			-- toplevel. See gtk_window_set_has_frame(),
 870-- 			-- gtk_window_set_frame_dimensions().
 871		
 872-- 			-- window : 	a GtkWindow
 873-- 			-- left: (gint*) location to store the width of the frame at the left, or NULL
 874-- 			-- top : (gint*) location to store the height of the frame at the top, or NULL
 875-- 			-- right :(gint*) location to store the width of the frame at the returns, or NULL
 876-- 			-- bottom :(gint*) location to store the height of the frame at the bottom, or NULL
 877-- 		external "C use <gtk/gtk.h>"
 878-- 		end
 879
 880
 881-- 	gtk_window_get_has_frame (window: POINTER): INTEGER is
 882-- 			-- Accessor for whether the window has a frame window
 883-- 			-- exterior to window->window. Gets the value set by
 884-- 			-- gtk_window_set_has_frame().
 885
 886-- 			-- window : 	a GtkWindow
 887-- 			-- Returns : 	TRUE if a frame has been added to the window via gtk_window_set_has_frame().
 888-- 		external "C use <gtk/gtk.h>"
 889-- 		end
 890
 891
 892-- 	gtk_window_get_icon (window: POINTER): POINTER is
 893-- 		-- Gets the value set by gtk_window_set_icon() (or if you've
 894-- 		-- called gtk_window_set_icon_list(), gets the first icon in the
 895-- 		-- icon list).
 896		
 897-- 			-- window : 	a GtkWindow
 898-- 			-- Returns : 	icon for window (GdkPixbuf*)
 899-- 		external "C use <gtk/gtk.h>"
 900-- 		end
 901
 902
 903-- 	gtk_window_get_icon_list (window: POINTER): POINTER is
 904-- 			-- Retrieves the list of icons set by
 905-- 			-- gtk_window_set_icon_list(). The list is copied, but the
 906-- 			-- reference count on each member won't be incremented.
 907
 908-- 			-- window : 	a GtkWindow
 909-- 			-- Returns : 	copy of window's icon list (GList*)
 910-- 		external "C use <gtk/gtk.h>"
 911-- 		end
 912
 913
 914-- 	gtk_window_get_icon_name (window: POINTER): POINTER is
 915-- 			-- Returns the name of the themed icon for the window, see
 916-- 			-- gtk_window_set_icon_name().
 917-- 			-- window : a GtkWindow
 918-- 			-- Returns : the icon name or NULL if the window has no
 919-- 			-- themed icon (gchar *)
 920-- 		external "C use <gtk/gtk.h>"
 921-- 		end
 922
 923
 924-- -- GdkModifierType gtk_window_get_mnemonic_modifier
 925-- --                                             (GtkWindow *window);
 926
 927-- -- Returns the mnemonic modifier for this window. See gtk_window_set_mnemonic_modifier().
 928
 929-- -- window : 	a GtkWindow
 930-- -- Returns : 	the modifier mask used to activate mnemonics on this window.
 931-- --		external "C use <gtk/gtk.h>"
 932-- --		end
 933
 934
 935-- 	gtk_window_get_position (window, root_x, root_y: POINTER) is
 936-- 			-- This function returns the position you need to pass to
 937-- 			-- gtk_window_move() to keep window in its current
 938-- 			-- position. This means that the meaning of the returned
 939-- 			-- value varies with window gravity. See gtk_window_move()
 940-- 			-- for more details.
 941
 942-- 			-- If you haven't changed the window gravity, its gravity
 943-- 			-- will be GDK_GRAVITY_NORTH_WEST. This means that
 944-- 			-- gtk_window_get_position() gets the position of the
 945-- 			-- top-left corner of the window manager frame for the
 946-- 			-- window. gtk_window_move() sets the position of this same
 947-- 			-- top-left corner.
 948
 949-- 			-- gtk_window_get_position() is not 100% reliable because the
 950-- 			-- X Window System does not specify a way to obtain the
 951-- 			-- geometry of the decorations placed on a window by the
 952-- 			-- window manager. Thus GTK+ is using a "best guess" that
 953-- 			-- works with most window managers.
 954
 955-- 			-- Moreover, nearly all window managers are historically
 956-- 			-- broken with respect to their handling of window
 957-- 			-- gravity. So moving a window to its current position as
 958-- 			-- returned by gtk_window_get_position() tends to result in
 959-- 			-- moving the window slightly. Window managers are slowly
 960-- 			-- getting better over time.
 961
 962-- 			-- If a window has gravity GDK_GRAVITY_STATIC the window
 963-- 			-- manager frame is not relevant, and thus
 964-- 			-- gtk_window_get_position() will always produce accurate
 965-- 			-- results. However you can't use static gravity to do things
 966-- 			-- like place a window in a corner of the screen, because
 967-- 			-- static gravity ignores the window manager decorations.
 968
 969-- 			-- If you are saving and restoring your application's window
 970-- 			-- positions, you should know that it's impossible for
 971-- 			-- applications to do this without getting it somewhat wrong
 972-- 			-- because applications do not have sufficient knowledge of
 973-- 			-- window manager state. The Correct Mechanism is to support
 974-- 			-- the session management protocol (see the "GnomeClient"
 975-- 			-- object in the GNOME libraries for example) and allow the
 976-- 			-- window manager to save your window sizes and positions.
 977		
 978-- 			-- window : 	a GtkWindow
 979		
 980-- 			-- root_x : (gint*) return location for X coordinate of
 981-- 			-- gravity-determined reference p\oint
 982		
 983-- 			-- root_y : (gint*) return location for Y coordinate of
 984-- 			-- gravity-determined reference p\oint
 985-- 		external "C use <gtk/gtk.h>"
 986-- 		end
 987
 988
 989-- 	-- const gchar* gtk_window_get_role            (GtkWindow *window);
 990	
 991-- 	-- Returns the role of the window. See gtk_window_set_role() for further explanation.
 992	
 993-- 	-- window : 	a GtkWindow
 994-- 	-- Returns : 	the role of the window if set, or NULL. The returned is owned by the widget and must not be modified or freed.
 995-- 	--external "C use <gtk/gtk.h>"
 996-- 	--end
 997
 998
 999-- 	gtk_window_get_size (window, width, height: POINTER) is
1000-- 			-- Obtains the current size of window. If window is not
1001-- 			-- onscreen, it returns the size GTK+ will suggest to the
1002-- 			-- window manager for the initial window size (but this is
1003-- 			-- not reliably the same as the size the window manager will
1004-- 			-- actually select). The size obtained by
1005-- 			-- gtk_window_get_size() is the last size received in a
1006-- 			-- GdkEventConfigure, that is, GTK+ uses its locally-stored
1007-- 			-- size, rather than querying the X server for the size. As a
1008-- 			-- result, if you call gtk_window_resize() then immediately
1009-- 			-- call gtk_window_get_size(), the size won't have taken
1010-- 			-- effect yet. After the window manager processes the resize
1011-- 			-- request, GTK+ receives notification that the size has
1012-- 			-- changed via a configure event, and the size of the window
1013-- 			-- gets updated.
1014
1015-- 			-- Note 1: Nearly any use of this function creates a race
1016-- 			-- condition, because the size of the window may change
1017-- 			-- between the time that you get the size and the time that
1018-- 			-- you perform some action assuming that size is the current
1019-- 			-- size. To avoid race conditions, connect to
1020-- 			-- "configure_event" on the window and adjust your
1021-- 			-- size-dependent state to match the size delivered in the
1022-- 			-- GdkEventConfigure.
1023		
1024-- 			-- Note 2: The returned size does not include the size of the
1025-- 			-- window manager decorations (aka the window frame or
1026-- 			-- border). Those are not drawn by GTK+ and GTK+ has no
1027-- 			-- reliable method of determining their size.
1028
1029-- 			-- Note 3: If you are getting a window size in order to
1030-- 			-- position the window onscreen, there may be a better
1031-- 			-- way. The preferred way is to simply set the window's
1032-- 			-- semantic type with gtk_window_set_type_hint(), which
1033-- 			-- allows the window manager to e.g. center dialogs. Also, if
1034-- 			-- you set the transient parent of dialogs with
1035-- 			-- gtk_window_set_transient_for() window managers will often
1036-- 			-- center the dialog over its parent window. It's much
1037-- 			-- preferred to let the window manager handle these things
1038-- 			-- rather than doing it yourself, because all apps will
1039-- 			-- behave consistently and according to user prefs if the
1040-- 			-- window manager handles it. Also, the window manager can
1041-- 			-- take the size of the window decorations/border into
1042-- 			-- account, while your application cannot.
1043
1044-- 			-- In any case, if you insist on application-specified window
1045-- 			-- positioning, there's still a better way than doing it
1046-- 			-- yourself - gtk_window_set_position() will frequently
1047-- 			-- handle the details for you.
1048
1049-- 			-- window : 	a GtkWindow
1050-- 			-- width : (gint*) return location for width, or NULL
1051-- 			-- height : (gint *) return location for height, or NULL
1052-- 		external "C use <gtk/gtk.h>"
1053-- 		end
1054
1055
1056	title: CONST_STRING is
1057		-- The title of the window, or Void if none has been set explicitely. 
1058	local p: POINTER
1059	do
1060		p:=gtk_window_get_title (handle)
1061		if p.is_not_null then 
1062			create Result.from_external(p) 
1063		end
1064	end
1065
1066-- 	gtk_window_get_transient_for (window: POINTER): POINTER is
1067-- 			-- Fetches the transient parent for this window. See
1068-- 			-- gtk_window_set_transient_for().
1069
1070-- 			-- window : a GtkWindow; Returns: (GtkWindow*) the transient
1071-- 			-- parent for this window, or NULL if no transient parent has
1072-- 			-- been set.
1073-- 		external "C use <gtk/gtk.h>"
1074-- 		end
1075
1076
1077-- 	gtk_window_get_type_hint  (window: POINTER): INTEGER is
1078-- 			-- Gets the type hint for this window. See gtk_window_set_type_hint().
1079
1080-- 			-- window : 	a GtkWindow
1081-- 			-- Returns : 	the type hint for window. GdkWindowTypeHint
1082-- 		external "C use <gtk/gtk.h>"
1083-- 		ensure valid_type_hint: is_valid_window_type_hint (Result)
1084-- 		end
1085
1086
1087-- 	gtk_window_get_skip_taskbar_hint (window: POINTER): INTEGER is
1088-- 			-- Gets the value set by gtk_window_set_skip_taskbar_hint()
1089-- 			-- window : a GtkWindow Returns : TRUE if window shouldn't be
1090-- 			-- in taskbar
1091-- 		external "C use <gtk/gtk.h>"
1092-- 		end
1093
1094
1095-- 	gtk_window_get_skip_pager_hint (window: POINTER): INTEGER is
1096-- 			-- Gets the value set by gtk_window_set_skip_pager_hint().
1097-- 			-- window : 	a GtkWindow
1098-- 			-- Returns : 	TRUE if window shouldn't be in pager
1099-- 		external "C use <gtk/gtk.h>"
1100-- 		end
1101
1102-- 	gtk_window_get_urgency_hint (window: POINTER): INTEGER is
1103-- 			-- Gets the value set by gtk_window_set_urgency_hint()
1104-- 			-- window : 	a GtkWindow
1105-- 			-- Returns : 	TRUE if window is urgent
1106-- 		external "C use <gtk/gtk.h>"
1107-- 		end
1108
1109
1110-- 	gtk_window_get_accept_focus     (window: POINTER): INTEGER
1111-- 		-- Gets the value set by gtk_window_set_accept_focus().  window
1112-- 		-- : a GtkWindow Returns : TRUE if window should receive the
1113-- 		-- input focus
1114-- 		external "C use <gtk/gtk.h>"
1115-- 		end
1116
1117
1118-- -- gboolean    gtk_window_get_focus_on_map     (GtkWindow *window);
1119
1120-- -- Gets the value set by gtk_window_set_focus_on_map().
1121
1122-- -- window : 	a GtkWindow
1123-- -- Returns : 	TRUE if window should receive the input focus when mapped.
1124
1125-- -- Since 2.6
1126-- 		--external "C use <gtk/gtk.h>"
1127-- 		--end
1128
1129
1130	move (an_x, an_y: INTEGER) is
1131			-- Asks the window manager to move window to the given position.
1132			-- Window managers are free to ignore this; most window managers
1133			-- ignore requests for initial window positions (instead using a
1134			-- user-defined placement algorithm) and honor requests after the
1135			-- window has already been shown.
1136			--
1137			-- Note: the position is the position of the gravity-determined
1138			-- reference point for the window. The gravity determines two
1139			-- things: first, the location of the reference point in root
1140			-- window coordinates; and second, which point on the window is
1141			-- positioned at the reference point.
1142			--
1143			-- By default the gravity is GDK_GRAVITY_NORTH_WEST, so the
1144			-- reference point is simply the x, y supplied to `move'.
1145			-- The top-left corner of the window decorations (aka window
1146			-- frame or border) will be placed at x, y. Therefore, to
1147			-- position a window at the top left of the screen, you want to
1148			-- use the default gravity (which is GDK_GRAVITY_NORTH_WEST)
1149			-- and move the window to 0,0.
1150			--
1151			-- To position a window at the bottom right corner of the screen,
1152			-- you would set GDK_GRAVITY_SOUTH_EAST, which means that the
1153			-- reference point is at x + the window width and y + the window
1154			-- height, and the bottom-right corner of the window border will
1155			-- be placed at that reference point. So, to place a window in
1156			-- the bottom right corner you would first set gravity to south
1157			-- east, then write:
1158			-- gtk_window_move (window, gdk_screen_width() - window_width, gdk_screen_height() - window_height).
1159			--
1160			-- The Extended Window Manager Hints specification at
1161			-- http://www.freedesktop.org/Standards/wm-spec has a nice table
1162			-- of gravities in the "implementation notes" section.
1163			--
1164			-- The gtk_window_get_position() documentation may also be relevant.
1165			--
1166			-- an_x : X coordinate to move window to
1167			-- an_y : Y coordinate to move window to
1168		do
1169			gtk_window_move (handle, an_x, an_y)
1170		end
1171
1172
1173-- -- gboolean    gtk_window_parse_geometry       (GtkWindow *window,
1174-- --                                              const gchar *geometry);
1175
1176-- -- Parses a standard X Window System geometry string - see the manual page for X (type 'man X') for details on this. gtk_window_parse_geometry() does work on all GTK+ ports including Win32 but is primarily intended for an X environment.
1177
1178-- -- If either a size or a position can be extracted from the geometry string, gtk_window_parse_geometry() returns TRUE and calls gtk_window_set_default_size() and/or gtk_window_move() to resize/move the window.
1179
1180-- -- If gtk_window_parse_geometry() returns TRUE, it will also set the GDK_HINT_USER_POS and/or GDK_HINT_USER_SIZE hints indicating to the window manager that the size/position of the window was user-specified. This causes most window managers to honor the geometry.
1181
1182-- -- Note that for gtk_window_parse_geometry() to work as expected, it has to be called when the window has its "final" size, i.e. after calling gtk_widget_show_all() on the contents and gtk_window_set_geometry_hints() on the window.
1183
1184-- -- include <gtk/gtk.h>
1185	
1186-- -- static void
1187-- -- fill_with_content (GtkWidget *vbox)
1188-- -- {
1189-- --   /* fill with content... */
1190-- -- }
1191	
1192-- -- int
1193-- -- main (int argc, char *argv[])
1194-- -- {
1195-- --   GtkWidget *window, *vbox;
1196-- --   GdkGeometry size_hints = {
1197-- --     100, 50, 0, 0, 100, 50, 10, 10, 0.0, 0.0, GDK_GRAVITY_NORTH_WEST  
1198-- --   };
1199	
1200-- --   gtk_init (&argc, &argv);
1201  
1202-- --   window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
1203-- --   vbox = gtk_vbox_new (FALSE, 0);
1204  
1205-- --   gtk_container_add (GTK_CONTAINER (window), vbox);
1206-- --   fill_with_content (vbox);
1207-- --   gtk_widget_show_all (vbox);
1208  
1209-- --   gtk_window_set_geometry_hints (GTK_WINDOW (window),
1210-- -- 	  			    window,
1211-- -- 				    &size_hints,
1212-- -- 				    GDK_HINT_MIN_SIZE | 
1213-- -- 				    GDK_HINT_BASE_SIZE | 
1214-- -- 				    GDK_HINT_RESIZE_INC);
1215  
1216-- --   if (argc > 1)
1217-- --     {
1218-- --       if (!gtk_window_parse_geometry (GTK_WINDOW (window), argv[1]))
1219-- --         fprintf (stderr, "Failed to parse '%s'\n", argv[1]);
1220-- --     }
1221	
1222-- --   gtk_widget_show_all (window);
1223-- --   gtk_main();
1224	
1225-- --   return 0;
1226-- -- }
1227
1228-- -- window : 	a GtkWindow
1229-- -- geometry : 	geometry string
1230-- -- Returns : 	TRUE if string was parsed successfully
1231-- 		--external "C use <gtk/gtk.h>"
1232-- 		--end
1233
1234
1235-- -- void        gtk_window_reshow_with_initial_size
1236-- --                                             (GtkWindow *window);
1237
1238-- -- Hides window, then reshows it, resetting the default size and position of the window. Used by GUI builders only.
1239
1240-- -- window : 	a GtkWindow
1241-- 		--external "C use <gtk/gtk.h>"
1242-- 		--end
1243
1244
1245-- -- void        gtk_window_resize               (GtkWindow *window,
1246-- --                                              gint width,
1247-- --                                              gint height);
1248
1249-- -- Resizes the window as if the user had done so, obeying geometry constraints. The default geometry constraint is that windows may not be smaller than their size request; to override this constraint, call gtk_widget_set_size_request() to set the window's request to a smaller value.
1250
1251-- -- If gtk_window_resize() is called before showing a window for the first time, it overrides any default size set with gtk_window_set_default_size().
1252
1253-- -- Windows may not be resized smaller than 1 by 1 pixels.
1254
1255-- -- window : 	a GtkWindow
1256-- -- width : 	width in pixels to resize the window to
1257-- -- height : 	height in pixels to resize the window to
1258-- 		--external "C use <gtk/gtk.h>"
1259-- 		--end
1260
1261
1262-- -- void        gtk_window_set_default_icon_list
1263-- --                                             (GList *list);
1264
1265-- -- Sets an icon list to be used as fallback for windows that haven't had gtk_window_set_icon_list() called on them to set up a window-specific icon list. This function allows you to set up the icon for all windows in your app at once.
1266
1267-- -- See gtk_window_set_icon_list() for more details.
1268
1269-- -- list : 	a list of GdkPixbuf
1270-- 		--external "C use <gtk/gtk.h>"
1271-- 		--end
1272
1273
1274-- -- void        gtk_window_set_default_icon     (GdkPixbuf *icon);
1275
1276-- -- Sets an icon to be used as fallback for windows that haven't had gtk_window_set_icon() called on them from a pixbuf.
1277
1278-- -- icon : 	the icon
1279
1280-- -- Since 2.4
1281-- 		--external "C use <gtk/gtk.h>"
1282-- 		--end
1283
1284
1285-- -- gboolean    gtk_window_set_default_icon_from_file
1286-- --                                             (const gchar *filename,
1287-- --                                              GError **err);
1288
1289-- -- Sets an icon to be used as fallback for windows that haven't had gtk_window_set_icon_list() called on them from a file on disk. Warns on failure if err is NULL.
1290
1291-- -- filename : 	location of icon file
1292-- -- err : 	location to store error, or NULL.
1293-- -- Returns : 	TRUE if setting the icon succeeded.
1294
1295-- -- Since 2.2
1296-- 		--external "C use <gtk/gtk.h>"
1297-- 		--end
1298
1299
1300-- -- void        gtk_window_set_default_icon_name
1301-- --                                             (const gchar *name);
1302
1303-- -- Sets an icon to be used as fallback for windows that haven't had gtk_window_set_icon_list() called on them from a named themed icon, see gtk_window_set_icon_name().
1304
1305-- -- name : 	the name of the themed icon
1306
1307-- -- Since 2.6
1308-- 		--external "C use <gtk/gtk.h>"
1309-- 		--end
1310
1311
1312	set_icon (icon: GDK_PIXBUF) is
1313			-- Sets up the icon representing Current. This icon is
1314			-- used when the window is minimized (also known as iconified).
1315			-- Some window managers or desktop environments…

Large files files are truncated, but you can click here to view the full file