1------------------------------------------------------------------------------ 2-- -- 3-- Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet -- 4-- Copyright (C) 2000-2015, AdaCore -- 5-- -- 6-- This library is free software; you can redistribute it and/or modify it -- 7-- under terms of the GNU General Public License as published by the Free -- 8-- Software Foundation; either version 3, or (at your option) any later -- 9-- version. This library is distributed in the hope that it will be useful, -- 10-- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- 11-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. -- 12-- -- 13-- As a special exception under Section 7 of GPL version 3, you are granted -- 14-- additional permissions described in the GCC Runtime Library Exception, -- 15-- version 3.1, as published by the Free Software Foundation. -- 16-- -- 17-- You should have received a copy of the GNU General Public License and -- 18-- a copy of the GCC Runtime Library Exception along with this program; -- 19-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- 20-- <http://www.gnu.org/licenses/>. -- 21-- -- 22------------------------------------------------------------------------------ 23 24pragma Style_Checks (Off); 25pragma Warnings (Off, "*is already use-visible*"); 26with Ada.Unchecked_Conversion; 27with Glib.Type_Conversion_Hooks; use Glib.Type_Conversion_Hooks; 28with Glib.Values; use Glib.Values; 29with Gtk.Arguments; use Gtk.Arguments; 30with Gtkada.Bindings; use Gtkada.Bindings; 31pragma Warnings(Off); -- might be unused 32with Interfaces.C.Strings; use Interfaces.C.Strings; 33pragma Warnings(On); 34 35package body Gtk.Window is 36 37 package Type_Conversion_Gtk_Window is new Glib.Type_Conversion_Hooks.Hook_Registrator 38 (Get_Type'Access, Gtk_Window_Record); 39 pragma Unreferenced (Type_Conversion_Gtk_Window); 40 41 package Type_Conversion_Gtk_Window_Group is new Glib.Type_Conversion_Hooks.Hook_Registrator 42 (Group_Get_Type'Access, Gtk_Window_Group_Record); 43 pragma Unreferenced (Type_Conversion_Gtk_Window_Group); 44 45 ------------- 46 -- Gtk_New -- 47 ------------- 48 49 procedure Gtk_New 50 (Window : out Gtk_Window; 51 The_Type : Gtk.Enums.Gtk_Window_Type := Gtk.Enums.Window_Toplevel) 52 is 53 begin 54 Window := new Gtk_Window_Record; 55 Gtk.Window.Initialize (Window, The_Type); 56 end Gtk_New; 57 58 ------------- 59 -- Gtk_New -- 60 ------------- 61 62 procedure Gtk_New (Window_Group : out Gtk_Window_Group) is 63 begin 64 Window_Group := new Gtk_Window_Group_Record; 65 Gtk.Window.Initialize (Window_Group); 66 end Gtk_New; 67 68 -------------------------- 69 -- Gtk_Window_Group_New -- 70 -------------------------- 71 72 function Gtk_Window_Group_New return Gtk_Window_Group is 73 Window_Group : constant Gtk_Window_Group := new Gtk_Window_Group_Record; 74 begin 75 Gtk.Window.Initialize (Window_Group); 76 return Window_Group; 77 end Gtk_Window_Group_New; 78 79 -------------------- 80 -- Gtk_Window_New -- 81 -------------------- 82 83 function Gtk_Window_New 84 (The_Type : Gtk.Enums.Gtk_Window_Type := Gtk.Enums.Window_Toplevel) 85 return Gtk_Window 86 is 87 Window : constant Gtk_Window := new Gtk_Window_Record; 88 begin 89 Gtk.Window.Initialize (Window, The_Type); 90 return Window; 91 end Gtk_Window_New; 92 93 ---------------- 94 -- Initialize -- 95 ---------------- 96 97 procedure Initialize 98 (Window : not null access Gtk_Window_Record'Class; 99 The_Type : Gtk.Enums.Gtk_Window_Type := Gtk.Enums.Window_Toplevel) 100 is 101 function Internal 102 (The_Type : Gtk.Enums.Gtk_Window_Type) return System.Address; 103 pragma Import (C, Internal, "gtk_window_new"); 104 begin 105 if not Window.Is_Created then 106 Set_Object (Window, Internal (The_Type)); 107 end if; 108 end Initialize; 109 110 ---------------- 111 -- Initialize -- 112 ---------------- 113 114 procedure Initialize 115 (Window_Group : not null access Gtk_Window_Group_Record'Class) 116 is 117 function Internal return System.Address; 118 pragma Import (C, Internal, "gtk_window_group_new"); 119 begin 120 if not Window_Group.Is_Created then 121 Set_Object (Window_Group, Internal); 122 end if; 123 end Initialize; 124 125 ---------------------- 126 -- Activate_Default -- 127 ---------------------- 128 129 function Activate_Default 130 (Window : not null access Gtk_Window_Record) return Boolean 131 is 132 function Internal (Window : System.Address) return Glib.Gboolean; 133 pragma Import (C, Internal, "gtk_window_activate_default"); 134 begin 135 return Internal (Get_Object (Window)) /= 0; 136 end Activate_Default; 137 138 -------------------- 139 -- Activate_Focus -- 140 -------------------- 141 142 function Activate_Focus 143 (Window : not null access Gtk_Window_Record) return Boolean 144 is 145 function Internal (Window : System.Address) return Glib.Gboolean; 146 pragma Import (C, Internal, "gtk_window_activate_focus"); 147 begin 148 return Internal (Get_Object (Window)) /= 0; 149 end Activate_Focus; 150 151 ------------------ 152 -- Activate_Key -- 153 ------------------ 154 155 function Activate_Key 156 (Window : not null access Gtk_Window_Record; 157 Event : Gdk.Event.Gdk_Event_Key) return Boolean 158 is 159 function Internal 160 (Window : System.Address; 161 Event : Gdk.Event.Gdk_Event_Key) return Glib.Gboolean; 162 pragma Import (C, Internal, "gtk_window_activate_key"); 163 begin 164 return Internal (Get_Object (Window), Event) /= 0; 165 end Activate_Key; 166 167 --------------------- 168 -- Add_Accel_Group -- 169 --------------------- 170 171 procedure Add_Accel_Group 172 (Window : not null access Gtk_Window_Record; 173 Accel_Group : not null access Gtk.Accel_Group.Gtk_Accel_Group_Record'Class) 174 is 175 procedure Internal 176 (Window : System.Address; 177 Accel_Group : System.Address); 178 pragma Import (C, Internal, "gtk_window_add_accel_group"); 179 begin 180 Internal (Get_Object (Window), Get_Object (Accel_Group)); 181 end Add_Accel_Group; 182 183 ------------------ 184 -- Add_Mnemonic -- 185 ------------------ 186 187 procedure Add_Mnemonic 188 (Window : not null access Gtk_Window_Record; 189 Keyval : Gdk.Types.Gdk_Key_Type; 190 Target : not null access Gtk.Widget.Gtk_Widget_Record'Class) 191 is 192 procedure Internal 193 (Window : System.Address; 194 Keyval : Gdk.Types.Gdk_Key_Type; 195 Target : System.Address); 196 pragma Import (C, Internal, "gtk_window_add_mnemonic"); 197 begin 198 Internal (Get_Object (Window), Keyval, Get_Object (Target)); 199 end Add_Mnemonic; 200 201 ---------------- 202 -- Add_Window -- 203 ---------------- 204 205 procedure Add_Window 206 (Window_Group : not null access Gtk_Window_Group_Record; 207 Window : not null access Gtk_Window_Record'Class) 208 is 209 procedure Internal 210 (Window_Group : System.Address; 211 Window : System.Address); 212 pragma Import (C, Internal, "gtk_window_group_add_window"); 213 begin 214 Internal (Get_Object (Window_Group), Get_Object (Window)); 215 end Add_Window; 216 217 --------------------- 218 -- Begin_Move_Drag -- 219 --------------------- 220 221 procedure Begin_Move_Drag 222 (Window : not null access Gtk_Window_Record; 223 Button : Gint; 224 Root_X : Gint; 225 Root_Y : Gint; 226 Timestamp : Guint32) 227 is 228 procedure Internal 229 (Window : System.Address; 230 Button : Gint; 231 Root_X : Gint; 232 Root_Y : Gint; 233 Timestamp : Guint32); 234 pragma Import (C, Internal, "gtk_window_begin_move_drag"); 235 begin 236 Internal (Get_Object (Window), Button, Root_X, Root_Y, Timestamp); 237 end Begin_Move_Drag; 238 239 ----------------------- 240 -- Begin_Resize_Drag -- 241 ----------------------- 242 243 procedure Begin_Resize_Drag 244 (Window : not null access Gtk_Window_Record; 245 Edge : Gdk.Window.Gdk_Window_Edge; 246 Button : Gint; 247 Root_X : Gint; 248 Root_Y : Gint; 249 Timestamp : Guint32) 250 is 251 procedure Internal 252 (Window : System.Address; 253 Edge : Gdk.Window.Gdk_Window_Edge; 254 Button : Gint; 255 Root_X : Gint; 256 Root_Y : Gint; 257 Timestamp : Guint32); 258 pragma Import (C, Internal, "gtk_window_begin_resize_drag"); 259 begin 260 Internal (Get_Object (Window), Edge, Button, Root_X, Root_Y, Timestamp); 261 end Begin_Resize_Drag; 262 263 ----------- 264 -- Close -- 265 ----------- 266 267 procedure Close (Window : not null access Gtk_Window_Record) is 268 procedure Internal (Window : System.Address); 269 pragma Import (C, Internal, "gtk_window_close"); 270 begin 271 Internal (Get_Object (Window)); 272 end Close; 273 274 --------------- 275 -- Deiconify -- 276 --------------- 277 278 procedure Deiconify (Window : not null access Gtk_Window_Record) is 279 procedure Internal (Window : System.Address); 280 pragma Import (C, Internal, "gtk_window_deiconify"); 281 begin 282 Internal (Get_Object (Window)); 283 end Deiconify; 284 285 ---------------- 286 -- Fullscreen -- 287 ---------------- 288 289 procedure Fullscreen (Window : not null access Gtk_Window_Record) is 290 procedure Internal (Window : System.Address); 291 pragma Import (C, Internal, "gtk_window_fullscreen"); 292 begin 293 Internal (Get_Object (Window)); 294 end Fullscreen; 295 296 ---------------------- 297 -- Get_Accept_Focus -- 298 ---------------------- 299 300 function Get_Accept_Focus 301 (Window : not null access Gtk_Window_Record) return Boolean 302 is 303 function Internal (Window : System.Address) return Glib.Gboolean; 304 pragma Import (C, Internal, "gtk_window_get_accept_focus"); 305 begin 306 return Internal (Get_Object (Window)) /= 0; 307 end Get_Accept_Focus; 308 309 --------------------- 310 -- Get_Attached_To -- 311 --------------------- 312 313 function Get_Attached_To 314 (Window : not null access Gtk_Window_Record) 315 return Gtk.Widget.Gtk_Widget 316 is 317 function Internal (Window : System.Address) return System.Address; 318 pragma Import (C, Internal, "gtk_window_get_attached_to"); 319 Stub_Gtk_Widget : Gtk.Widget.Gtk_Widget_Record; 320 begin 321 return Gtk.Widget.Gtk_Widget (Get_User_Data (Internal (Get_Object (Window)), Stub_Gtk_Widget)); 322 end Get_Attached_To; 323 324 ----------------------------- 325 -- Get_Current_Device_Grab -- 326 ----------------------------- 327 328 function Get_Current_Device_Grab 329 (Window_Group : not null access Gtk_Window_Group_Record; 330 Device : not null access Gdk.Device.Gdk_Device_Record'Class) 331 return Gtk.Widget.Gtk_Widget 332 is 333 function Internal 334 (Window_Group : System.Address; 335 Device : System.Address) return System.Address; 336 pragma Import (C, Internal, "gtk_window_group_get_current_device_grab"); 337 Stub_Gtk_Widget : Gtk.Widget.Gtk_Widget_Record; 338 begin 339 return Gtk.Widget.Gtk_Widget (Get_User_Data (Internal (Get_Object (Window_Group), Get_Object (Device)), Stub_Gtk_Widget)); 340 end Get_Current_Device_Grab; 341 342 ---------------------- 343 -- Get_Current_Grab -- 344 ---------------------- 345 346 function Get_Current_Grab 347 (Window_Group : not null access Gtk_Window_Group_Record) 348 return Gtk.Widget.Gtk_Widget 349 is 350 function Internal 351 (Window_Group : System.Address) return System.Address; 352 pragma Import (C, Internal, "gtk_window_group_get_current_grab"); 353 Stub_Gtk_Widget : Gtk.Widget.Gtk_Widget_Record; 354 begin 355 return Gtk.Widget.Gtk_Widget (Get_User_Data (Internal (Get_Object (Window_Group)), Stub_Gtk_Widget)); 356 end Get_Current_Grab; 357 358 ------------------- 359 -- Get_Decorated -- 360 ------------------- 361 362 function Get_Decorated 363 (Window : not null access Gtk_Window_Record) return Boolean 364 is 365 function Internal (Window : System.Address) return Glib.Gboolean; 366 pragma Import (C, Internal, "gtk_window_get_decorated"); 367 begin 368 return Internal (Get_Object (Window)) /= 0; 369 end Get_Decorated; 370 371 ---------------------- 372 -- Get_Default_Size -- 373 ---------------------- 374 375 procedure Get_Default_Size 376 (Window : not null access Gtk_Window_Record; 377 Width : out Gint; 378 Height : out Gint) 379 is 380 procedure Internal 381 (Window : System.Address; 382 Width : out Gint; 383 Height : out Gint); 384 pragma Import (C, Internal, "gtk_window_get_default_size"); 385 begin 386 Internal (Get_Object (Window), Width, Height); 387 end Get_Default_Size; 388 389 ------------------------ 390 -- Get_Default_Widget -- 391 ------------------------ 392 393 function Get_Default_Widget 394 (Window : not null access Gtk_Window_Record) 395 return Gtk.Widget.Gtk_Widget 396 is 397 function Internal (Window : System.Address) return System.Address; 398 pragma Import (C, Internal, "gtk_window_get_default_widget"); 399 Stub_Gtk_Widget : Gtk.Widget.Gtk_Widget_Record; 400 begin 401 return Gtk.Widget.Gtk_Widget (Get_User_Data (Internal (Get_Object (Window)), Stub_Gtk_Widget)); 402 end Get_Default_Widget; 403 404 ------------------- 405 -- Get_Deletable -- 406 ------------------- 407 408 function Get_Deletable 409 (Window : not null access Gtk_Window_Record) return Boolean 410 is 411 function Internal (Window : System.Address) return Glib.Gboolean; 412 pragma Import (C, Internal, "gtk_window_get_deletable"); 413 begin 414 return Internal (Get_Object (Window)) /= 0; 415 end Get_Deletable; 416 417 ----------------------------- 418 -- Get_Destroy_With_Parent -- 419 ----------------------------- 420 421 function Get_Destroy_With_Parent 422 (Window : not null access Gtk_Window_Record) return Boolean 423 is 424 function Internal (Window : System.Address) return Glib.Gboolean; 425 pragma Import (C, Internal, "gtk_window_get_destroy_with_parent"); 426 begin 427 return Internal (Get_Object (Window)) /= 0; 428 end Get_Destroy_With_Parent; 429 430 --------------- 431 -- Get_Focus -- 432 --------------- 433 434 function Get_Focus 435 (Window : not null access Gtk_Window_Record) 436 return Gtk.Widget.Gtk_Widget 437 is 438 function Internal (Window : System.Address) return System.Address; 439 pragma Import (C, Internal, "gtk_window_get_focus"); 440 Stub_Gtk_Widget : Gtk.Widget.Gtk_Widget_Record; 441 begin 442 return Gtk.Widget.Gtk_Widget (Get_User_Data (Internal (Get_Object (Window)), Stub_Gtk_Widget)); 443 end Get_Focus; 444 445 ---------------------- 446 -- Get_Focus_On_Map -- 447 ---------------------- 448 449 function Get_Focus_On_Map 450 (Window : not null access Gtk_Window_Record) return Boolean 451 is 452 function Internal (Window : System.Address) return Glib.Gboolean; 453 pragma Import (C, Internal, "gtk_window_get_focus_on_map"); 454 begin 455 return Internal (Get_Object (Window)) /= 0; 456 end Get_Focus_On_Map; 457 458 ----------------------- 459 -- Get_Focus_Visible -- 460 ----------------------- 461 462 function Get_Focus_Visible 463 (Window : not null access Gtk_Window_Record) return Boolean 464 is 465 function Internal (Window : System.Address) return Glib.Gboolean; 466 pragma Import (C, Internal, "gtk_window_get_focus_visible"); 467 begin 468 return Internal (Get_Object (Window)) /= 0; 469 end Get_Focus_Visible; 470 471 ----------------- 472 -- Get_Gravity -- 473 ----------------- 474 475 function Get_Gravity 476 (Window : not null access Gtk_Window_Record) 477 return Gdk.Window.Gdk_Gravity 478 is 479 function Internal 480 (Window : System.Address) return Gdk.Window.Gdk_Gravity; 481 pragma Import (C, Internal, "gtk_window_get_gravity"); 482 begin 483 return Internal (Get_Object (Window)); 484 end Get_Gravity; 485 486 --------------- 487 -- Get_Group -- 488 --------------- 489 490 function Get_Group 491 (Window : not null access Gtk_Window_Record) return Gtk_Window_Group 492 is 493 function Internal (Window : System.Address) return System.Address; 494 pragma Import (C, Internal, "gtk_window_get_group"); 495 Stub_Gtk_Window_Group : Gtk_Window_Group_Record; 496 begin 497 return Gtk.Window.Gtk_Window_Group (Get_User_Data (Internal (Get_Object (Window)), Stub_Gtk_Window_Group)); 498 end Get_Group; 499 500 ------------------------- 501 -- Get_Has_Resize_Grip -- 502 ------------------------- 503 504 function Get_Has_Resize_Grip 505 (Window : not null access Gtk_Window_Record) return Boolean 506 is 507 function Internal (Window : System.Address) return Glib.Gboolean; 508 pragma Import (C, Internal, "gtk_window_get_has_resize_grip"); 509 begin 510 return Internal (Get_Object (Window)) /= 0; 511 end Get_Has_Resize_Grip; 512 513 -------------------------------------- 514 -- Get_Hide_Titlebar_When_Maximized -- 515 -------------------------------------- 516 517 function Get_Hide_Titlebar_When_Maximized 518 (Window : not null access Gtk_Window_Record) return Boolean 519 is 520 function Internal (Window : System.Address) return Glib.Gboolean; 521 pragma Import (C, Internal, "gtk_window_get_hide_titlebar_when_maximized"); 522 begin 523 return Internal (Get_Object (Window)) /= 0; 524 end Get_Hide_Titlebar_When_Maximized; 525 526 -------------- 527 -- Get_Icon -- 528 -------------- 529 530 function Get_Icon 531 (Window : not null access Gtk_Window_Record) 532 return Gdk.Pixbuf.Gdk_Pixbuf 533 is 534 function Internal (Window : System.Address) return System.Address; 535 pragma Import (C, Internal, "gtk_window_get_icon"); 536 Stub_Gdk_Pixbuf : Gdk.Pixbuf.Gdk_Pixbuf_Record; 537 begin 538 return Gdk.Pixbuf.Gdk_Pixbuf (Get_User_Data (Internal (Get_Object (Window)), Stub_Gdk_Pixbuf)); 539 end Get_Icon; 540 541 ------------------- 542 -- Get_Icon_List -- 543 ------------------- 544 545 function Get_Icon_List 546 (Window : not null access Gtk_Window_Record) 547 return Glib.Object.Object_Simple_List.Glist 548 is 549 function Internal (Window : System.Address) return System.Address; 550 pragma Import (C, Internal, "gtk_window_get_icon_list"); 551 Tmp_Return : Glib.Object.Object_Simple_List.Glist; 552 begin 553 Glib.Object.Object_Simple_List.Set_Object (Tmp_Return, Internal (Get_Object (Window))); 554 return Tmp_Return; 555 end Get_Icon_List; 556 557 ------------------- 558 -- Get_Icon_Name -- 559 ------------------- 560 561 function Get_Icon_Name 562 (Window : not null access Gtk_Window_Record) return UTF8_String 563 is 564 function Internal 565 (Window : System.Address) return Interfaces.C.Strings.chars_ptr; 566 pragma Import (C, Internal, "gtk_window_get_icon_name"); 567 begin 568 return Gtkada.Bindings.Value_Allowing_Null (Internal (Get_Object (Window))); 569 end Get_Icon_Name; 570 571 --------------------------- 572 -- Get_Mnemonic_Modifier -- 573 --------------------------- 574 575 function Get_Mnemonic_Modifier 576 (Window : not null access Gtk_Window_Record) 577 return Gdk.Types.Gdk_Modifier_Type 578 is 579 function Internal 580 (Window : System.Address) return Gdk.Types.Gdk_Modifier_Type; 581 pragma Import (C, Internal, "gtk_window_get_mnemonic_modifier"); 582 begin 583 return Internal (Get_Object (Window)); 584 end Get_Mnemonic_Modifier; 585 586 --------------------------- 587 -- Get_Mnemonics_Visible -- 588 --------------------------- 589 590 function Get_Mnemonics_Visible 591 (Window : not null access Gtk_Window_Record) return Boolean 592 is 593 function Internal (Window : System.Address) return Glib.Gboolean; 594 pragma Import (C, Internal, "gtk_window_get_mnemonics_visible"); 595 begin 596 return Internal (Get_Object (Window)) /= 0; 597 end Get_Mnemonics_Visible; 598 599 --------------- 600 -- Get_Modal -- 601 --------------- 602 603 function Get_Modal 604 (Window : not null access Gtk_Window_Record) return Boolean 605 is 606 function Internal (Window : System.Address) return Glib.Gboolean; 607 pragma Import (C, Internal, "gtk_window_get_modal"); 608 begin 609 return Internal (Get_Object (Window)) /= 0; 610 end Get_Modal; 611 612 ------------------ 613 -- Get_Position -- 614 ------------------ 615 616 procedure Get_Position 617 (Window : not null access Gtk_Window_Record; 618 Root_X : out Gint; 619 Root_Y : out Gint) 620 is 621 procedure Internal 622 (Window : System.Address; 623 Root_X : out Gint; 624 Root_Y : out Gint); 625 pragma Import (C, Internal, "gtk_window_get_position"); 626 begin 627 Internal (Get_Object (Window), Root_X, Root_Y); 628 end Get_Position; 629 630 ------------------- 631 -- Get_Resizable -- 632 ------------------- 633 634 function Get_Resizable 635 (Window : not null access Gtk_Window_Record) return Boolean 636 is 637 function Internal (Window : System.Address) return Glib.Gboolean; 638 pragma Import (C, Internal, "gtk_window_get_resizable"); 639 begin 640 return Internal (Get_Object (Window)) /= 0; 641 end Get_Resizable; 642 643 -------------------------- 644 -- Get_Resize_Grip_Area -- 645 -------------------------- 646 647 procedure Get_Resize_Grip_Area 648 (Window : not null access Gtk_Window_Record; 649 Rect : out Gdk.Rectangle.Gdk_Rectangle; 650 retrieved : out Boolean) 651 is 652 function Internal 653 (Window : System.Address; 654 Acc_Rect : access Gdk.Rectangle.Gdk_Rectangle) 655 return Glib.Gboolean; 656 pragma Import (C, Internal, "gtk_window_get_resize_grip_area"); 657 Acc_Rect : aliased Gdk.Rectangle.Gdk_Rectangle; 658 Tmp_Return : Glib.Gboolean; 659 begin 660 Tmp_Return := Internal (Get_Object (Window), Acc_Rect'Access); 661 Rect := Acc_Rect; 662 retrieved := Tmp_Return /= 0; 663 end Get_Resize_Grip_Area; 664 665 -------------- 666 -- Get_Role -- 667 -------------- 668 669 function Get_Role 670 (Window : not null access Gtk_Window_Record) return UTF8_String 671 is 672 function Internal 673 (Window : System.Address) return Interfaces.C.Strings.chars_ptr; 674 pragma Import (C, Internal, "gtk_window_get_role"); 675 begin 676 return Gtkada.Bindings.Value_Allowing_Null (Internal (Get_Object (Window))); 677 end Get_Role; 678 679 ---------------- 680 -- Get_Screen -- 681 ---------------- 682 683 function Get_Screen 684 (Window : not null access Gtk_Window_Record) 685 return Gdk.Screen.Gdk_Screen 686 is 687 function Internal (Window : System.Address) return System.Address; 688 pragma Import (C, Internal, "gtk_window_get_screen"); 689 Stub_Gdk_Screen : Gdk.Screen.Gdk_Screen_Record; 690 begin 691 return Gdk.Screen.Gdk_Screen (Get_User_Data (Internal (Get_Object (Window)), Stub_Gdk_Screen)); 692 end Get_Screen; 693 694 -------------- 695 -- Get_Size -- 696 -------------- 697 698 procedure Get_Size 699 (Window : not null access Gtk_Window_Record; 700 Width : out Gint; 701 Height : out Gint) 702 is 703 procedure Internal 704 (Window : System.Address; 705 Width : out Gint; 706 Height : out Gint); 707 pragma Import (C, Internal, "gtk_window_get_size"); 708 begin 709 Internal (Get_Object (Window), Width, Height); 710 end Get_Size; 711 712 ------------------------- 713 -- Get_Skip_Pager_Hint -- 714 ------------------------- 715 716 function Get_Skip_Pager_Hint 717 (Window : not null access Gtk_Window_Record) return Boolean 718 is 719 function Internal (Window : System.Address) return Glib.Gboolean; 720 pragma Import (C, Internal, "gtk_window_get_skip_pager_hint"); 721 begin 722 return Internal (Get_Object (Window)) /= 0; 723 end Get_Skip_Pager_Hint; 724 725 --------------------------- 726 -- Get_Skip_Taskbar_Hint -- 727 --------------------------- 728 729 function Get_Skip_Taskbar_Hint 730 (Window : not null access Gtk_Window_Record) return Boolean 731 is 732 function Internal (Window : System.Address) return Glib.Gboolean; 733 pragma Import (C, Internal, "gtk_window_get_skip_taskbar_hint"); 734 begin 735 return Internal (Get_Object (Window)) /= 0; 736 end Get_Skip_Taskbar_Hint; 737 738 --------------- 739 -- Get_Title -- 740 --------------- 741 742 function Get_Title 743 (Window : not null access Gtk_Window_Record) return UTF8_String 744 is 745 function Internal 746 (Window : System.Address) return Interfaces.C.Strings.chars_ptr; 747 pragma Import (C, Internal, "gtk_window_get_title"); 748 begin 749 return Gtkada.Bindings.Value_Allowing_Null (Internal (Get_Object (Window))); 750 end Get_Title; 751 752 ----------------------- 753 -- Get_Transient_For -- 754 ----------------------- 755 756 function Get_Transient_For 757 (Window : not null access Gtk_Window_Record) return Gtk_Window 758 is 759 function Internal (Window : System.Address) return System.Address; 760 pragma Import (C, Internal, "gtk_window_get_transient_for"); 761 Stub_Gtk_Window : Gtk_Window_Record; 762 begin 763 return Gtk.Window.Gtk_Window (Get_User_Data (Internal (Get_Object (Window)), Stub_Gtk_Window)); 764 end Get_Transient_For; 765 766 ------------------- 767 -- Get_Type_Hint -- 768 ------------------- 769 770 function Get_Type_Hint 771 (Window : not null access Gtk_Window_Record) 772 return Gdk.Window.Gdk_Window_Type_Hint 773 is 774 function Internal 775 (Window : System.Address) return Gdk.Window.Gdk_Window_Type_Hint; 776 pragma Import (C, Internal, "gtk_window_get_type_hint"); 777 begin 778 return Internal (Get_Object (Window)); 779 end Get_Type_Hint; 780 781 ---------------------- 782 -- Get_Urgency_Hint -- 783 ---------------------- 784 785 function Get_Urgency_Hint 786 (Window : not null access Gtk_Window_Record) return Boolean 787 is 788 function Internal (Window : System.Address) return Glib.Gboolean; 789 pragma Import (C, Internal, "gtk_window_get_urgency_hint"); 790 begin 791 return Internal (Get_Object (Window)) /= 0; 792 end Get_Urgency_Hint; 793 794 --------------------- 795 -- Get_Window_Type -- 796 --------------------- 797 798 function Get_Window_Type 799 (Window : not null access Gtk_Window_Record) 800 return Gtk.Enums.Gtk_Window_Type 801 is 802 function Internal 803 (Window : System.Address) return Gtk.Enums.Gtk_Window_Type; 804 pragma Import (C, Internal, "gtk_window_get_window_type"); 805 begin 806 return Internal (Get_Object (Window)); 807 end Get_Window_Type; 808 809 --------------- 810 -- Has_Group -- 811 --------------- 812 813 function Has_Group 814 (Window : not null access Gtk_Window_Record) return Boolean 815 is 816 function Internal (Window : System.Address) return Glib.Gboolean; 817 pragma Import (C, Internal, "gtk_window_has_group"); 818 begin 819 return Internal (Get_Object (Window)) /= 0; 820 end Has_Group; 821 822 ------------------------ 823 -- Has_Toplevel_Focus -- 824 ------------------------ 825 826 function Has_Toplevel_Focus 827 (Window : not null access Gtk_Window_Record) return Boolean 828 is 829 function Internal (Window : System.Address) return Glib.Gboolean; 830 pragma Import (C, Internal, "gtk_window_has_toplevel_focus"); 831 begin 832 return Internal (Get_Object (Window)) /= 0; 833 end Has_Toplevel_Focus; 834 835 ------------- 836 -- Iconify -- 837 ------------- 838 839 procedure Iconify (Window : not null access Gtk_Window_Record) is 840 procedure Internal (Window : System.Address); 841 pragma Import (C, Internal, "gtk_window_iconify"); 842 begin 843 Internal (Get_Object (Window)); 844 end Iconify; 845 846 --------------- 847 -- Is_Active -- 848 --------------- 849 850 function Is_Active 851 (Window : not null access Gtk_Window_Record) return Boolean 852 is 853 function Internal (Window : System.Address) return Glib.Gboolean; 854 pragma Import (C, Internal, "gtk_window_is_active"); 855 begin 856 return Internal (Get_Object (Window)) /= 0; 857 end Is_Active; 858 859 ------------------ 860 -- Is_Maximized -- 861 ------------------ 862 863 function Is_Maximized 864 (Window : not null access Gtk_Window_Record) return Boolean 865 is 866 function Internal (Window : System.Address) return Glib.Gboolean; 867 pragma Import (C, Internal, "gtk_window_is_maximized"); 868 begin 869 return Internal (Get_Object (Window)) /= 0; 870 end Is_Maximized; 871 872 ------------------ 873 -- List_Windows -- 874 ------------------ 875 876 function List_Windows 877 (Window_Group : not null access Gtk_Window_Group_Record) 878 return Gtk.Widget.Widget_List.Glist 879 is 880 function Internal 881 (Window_Group : System.Address) return System.Address; 882 pragma Import (C, Internal, "gtk_window_group_list_windows"); 883 Tmp_Return : Gtk.Widget.Widget_List.Glist; 884 begin 885 Gtk.Widget.Widget_List.Set_Object (Tmp_Return, Internal (Get_Object (Window_Group))); 886 return Tmp_Return; 887 end List_Windows; 888 889 -------------- 890 -- Maximize -- 891 -------------- 892 893 procedure Maximize (Window : not null access Gtk_Window_Record) is 894 procedure Internal (Window : System.Address); 895 pragma Import (C, Internal, "gtk_window_maximize"); 896 begin 897 Internal (Get_Object (Window)); 898 end Maximize; 899 900 ----------------------- 901 -- Mnemonic_Activate -- 902 ----------------------- 903 904 function Mnemonic_Activate 905 (Window : not null access Gtk_Window_Record; 906 Keyval : Gdk.Types.Gdk_Key_Type; 907 Modifier : Gdk.Types.Gdk_Modifier_Type) return Boolean 908 is 909 function Internal 910 (Window : System.Address; 911 Keyval : Gdk.Types.Gdk_Key_Type; 912 Modifier : Gdk.Types.Gdk_Modifier_Type) return Glib.Gboolean; 913 pragma Import (C, Internal, "gtk_window_mnemonic_activate"); 914 begin 915 return Internal (Get_Object (Window), Keyval, Modifier) /= 0; 916 end Mnemonic_Activate; 917 918 ---------- 919 -- Move -- 920 ---------- 921 922 procedure Move 923 (Window : not null access Gtk_Window_Record; 924 X : Gint; 925 Y : Gint) 926 is 927 procedure Internal (Window : System.Address; X : Gint; Y : Gint); 928 pragma Import (C, Internal, "gtk_window_move"); 929 begin 930 Internal (Get_Object (Window), X, Y); 931 end Move; 932 933 -------------------- 934 -- Parse_Geometry -- 935 -------------------- 936 937 function Parse_Geometry 938 (Window : not null access Gtk_Window_Record; 939 Geometry : UTF8_String) return Boolean 940 is 941 function Internal 942 (Window : System.Address; 943 Geometry : Interfaces.C.Strings.chars_ptr) return Glib.Gboolean; 944 pragma Import (C, Internal, "gtk_window_parse_geometry"); 945 Tmp_Geometry : Interfaces.C.Strings.chars_ptr := New_String (Geometry); 946 Tmp_Return : Glib.Gboolean; 947 begin 948 Tmp_Return := Internal (Get_Object (Window), Tmp_Geometry); 949 Free (Tmp_Geometry); 950 return Tmp_Return /= 0; 951 end Parse_Geometry; 952 953 ------------- 954 -- Present -- 955 ------------- 956 957 procedure Present (Window : not null access Gtk_Window_Record) is 958 procedure Internal (Window : System.Address); 959 pragma Import (C, Internal, "gtk_window_present"); 960 begin 961 Internal (Get_Object (Window)); 962 end Present; 963 964 ----------------------- 965 -- Present_With_Time -- 966 ----------------------- 967 968 procedure Present_With_Time 969 (Window : not null access Gtk_Window_Record; 970 Timestamp : Guint32) 971 is 972 procedure Internal (Window : System.Address; Timestamp : Guint32); 973 pragma Import (C, Internal, "gtk_window_present_with_time"); 974 begin 975 Internal (Get_Object (Window), Timestamp); 976 end Present_With_Time; 977 978 ------------------------- 979 -- Propagate_Key_Event -- 980 ------------------------- 981 982 function Propagate_Key_Event 983 (Window : not null access Gtk_Window_Record; 984 Event : Gdk.Event.Gdk_Event_Key) return Boolean 985 is 986 function Internal 987 (Window : System.Address; 988 Event : Gdk.Event.Gdk_Event_Key) return Glib.Gboolean; 989 pragma Import (C, Internal, "gtk_window_propagate_key_event"); 990 begin 991 return Internal (Get_Object (Window), Event) /= 0; 992 end Propagate_Key_Event; 993 994 ------------------------ 995 -- Remove_Accel_Group -- 996 ------------------------ 997 998 procedure Remove_Accel_Group 999 (Window : not null access Gtk_Window_Record; 1000 Accel_Group : not null access Gtk.Accel_Group.Gtk_Accel_Group_Record'Class) 1001 is 1002 procedure Internal 1003 (Window : System.Address; 1004 Accel_Group : System.Address); 1005 pragma Import (C, Internal, "gtk_window_remove_accel_group"); 1006 begin 1007 Internal (Get_Object (Window), Get_Object (Accel_Group)); 1008 end Remove_Accel_Group; 1009 1010 --------------------- 1011 -- Remove_Mnemonic -- 1012 --------------------- 1013 1014 procedure Remove_Mnemonic 1015 (Window : not null access Gtk_Window_Record; 1016 Keyval : Gdk.Types.Gdk_Key_Type; 1017 Target : not null access Gtk.Widget.Gtk_Widget_Record'Class) 1018 is 1019 procedure Internal 1020 (Window : System.Address; 1021 Keyval : Gdk.Types.Gdk_Key_Type; 1022 Target : System.Address); 1023 pragma Import (C, Internal, "gtk_window_remove_mnemonic"); 1024 begin 1025 Internal (Get_Object (Window), Keyval, Get_Object (Target)); 1026 end Remove_Mnemonic; 1027 1028 ------------------- 1029 -- Remove_Window -- 1030 ------------------- 1031 1032 procedure Remove_Window 1033 (Window_Group : not null access Gtk_Window_Group_Record; 1034 Window : not null access Gtk_Window_Record'Class) 1035 is 1036 procedure Internal 1037 (Window_Group : System.Address; 1038 Window : System.Address); 1039 pragma Import (C, Internal, "gtk_window_group_remove_window"); 1040 begin 1041 Internal (Get_Object (Window_Group), Get_Object (Window)); 1042 end Remove_Window; 1043 1044 ------------------------------ 1045 -- Reshow_With_Initial_Size -- 1046 ------------------------------ 1047 1048 procedure Reshow_With_Initial_Size 1049 (Window : not null access Gtk_Window_Record) 1050 is 1051 procedure Internal (Window : System.Address); 1052 pragma Import (C, Internal, "gtk_window_reshow_with_initial_size"); 1053 begin 1054 Internal (Get_Object (Window)); 1055 end Reshow_With_Initial_Size; 1056 1057 ------------ 1058 -- Resize -- 1059 ------------ 1060 1061 procedure Resize 1062 (Window : not null access Gtk_Window_Record; 1063 Width : Gint; 1064 Height : Gint) 1065 is 1066 procedure Internal 1067 (Window : System.Address; 1068 Width : Gint; 1069 Height : Gint); 1070 pragma Import (C, Internal, "gtk_window_resize"); 1071 begin 1072 Internal (Get_Object (Window), Width, Height); 1073 end Resize; 1074 1075 ---------------------------- 1076 -- Resize_Grip_Is_Visible -- 1077 ---------------------------- 1078 1079 function Resize_Grip_Is_Visible 1080 (Window : not null access Gtk_Window_Record) return Boolean 1081 is 1082 function Internal (Window : System.Address) return Glib.Gboolean; 1083 pragma Import (C, Internal, "gtk_window_resize_grip_is_visible"); 1084 begin 1085 return Internal (Get_Object (Window)) /= 0; 1086 end Resize_Grip_Is_Visible; 1087 1088 ------------------------ 1089 -- Resize_To_Geometry -- 1090 ------------------------ 1091 1092 procedure Resize_To_Geometry 1093 (Window : not null access Gtk_Window_Record; 1094 Width : Gint; 1095 Height : Gint) 1096 is 1097 procedure Internal 1098 (Window : System.Address; 1099 Width : Gint; 1100 Height : Gint); 1101 pragma Import (C, Internal, "gtk_window_resize_to_geometry"); 1102 begin 1103 Internal (Get_Object (Window), Width, Height); 1104 end Resize_To_Geometry; 1105 1106 ---------------------- 1107 -- Set_Accept_Focus -- 1108 ---------------------- 1109 1110 procedure Set_Accept_Focus 1111 (Window : not null access Gtk_Window_Record; 1112 Setting : Boolean) 1113 is 1114 procedure Internal (Window : System.Address; Setting : Glib.Gboolean); 1115 pragma Import (C, Internal, "gtk_window_set_accept_focus"); 1116 begin 1117 Internal (Get_Object (Window), Boolean'Pos (Setting)); 1118 end Set_Accept_Focus; 1119 1120 --------------------- 1121 -- Set_Attached_To -- 1122 --------------------- 1123 1124 procedure Set_Attached_To 1125 (Window : not null access Gtk_Window_Record; 1126 Attach_Widget : access Gtk.Widget.Gtk_Widget_Record'Class) 1127 is 1128 procedure Internal 1129 (Window : System.Address; 1130 Attach_Widget : System.Address); 1131 pragma Import (C, Internal, "gtk_window_set_attached_to"); 1132 begin 1133 Internal (Get_Object (Window), Get_Object_Or_Null (GObject (Attach_Widget))); 1134 end Set_Attached_To; 1135 1136 ------------------- 1137 -- Set_Decorated -- 1138 ------------------- 1139 1140 procedure Set_Decorated 1141 (Window : not null access Gtk_Window_Record; 1142 Setting : Boolean) 1143 is 1144 procedure Internal (Window : System.Address; Setting : Glib.Gboolean); 1145 pragma Import (C, Internal, "gtk_window_set_decorated"); 1146 begin 1147 Internal (Get_Object (Window), Boolean'Pos (Setting)); 1148 end Set_Decorated; 1149 1150 ----------------- 1151 -- Set_Default -- 1152 ----------------- 1153 1154 procedure Set_Default 1155 (Window : not null access Gtk_Window_Record; 1156 Default_Widget : access Gtk.Widget.Gtk_Widget_Record'Class) 1157 is 1158 procedure Internal 1159 (Window : System.Address; 1160 Default_Widget : System.Address); 1161 pragma Import (C, Internal, "gtk_window_set_default"); 1162 begin 1163 Internal (Get_Object (Window), Get_Object_Or_Null (GObject (Default_Widget))); 1164 end Set_Default; 1165 1166 -------------------------- 1167 -- Set_Default_Geometry -- 1168 -------------------------- 1169 1170 procedure Set_Default_Geometry 1171 (Window : not null access Gtk_Window_Record; 1172 Width : Gint; 1173 Height : Gint) 1174 is 1175 procedure Internal 1176 (Window : System.Address; 1177 Width : Gint; 1178 Height : Gint); 1179 pragma Import (C, Internal, "gtk_window_set_default_geometry"); 1180 begin 1181 Internal (Get_Object (Window), Width, Height); 1182 end Set_Default_Geometry; 1183 1184 ---------------------- 1185 -- Set_Default_Size -- 1186 ---------------------- 1187 1188 procedure Set_Default_Size 1189 (Window : not null access Gtk_Window_Record; 1190 Width : Gint; 1191 Height : Gint) 1192 is 1193 procedure Internal 1194 (Window : System.Address; 1195 Width : Gint; 1196 Height : Gint); 1197 pragma Import (C, Internal, "gtk_window_set_default_size"); 1198 begin 1199 Internal (Get_Object (Window), Width, Height); 1200 end Set_Default_Size; 1201 1202 ------------------- 1203 -- Set_Deletable -- 1204 ------------------- 1205 1206 procedure Set_Deletable 1207 (Window : not null access Gtk_Window_Record; 1208 Setting : Boolean) 1209 is 1210 procedure Internal (Window : System.Address; Setting : Glib.Gboolean); 1211 pragma Import (C, Internal, "gtk_window_set_deletable"); 1212 begin 1213 Internal (Get_Object (Window), Boolean'Pos (Setting)); 1214 end Set_Deletable; 1215 1216 ----------------------------- 1217 -- Set_Destroy_With_Parent -- 1218 ----------------------------- 1219 1220 procedure Set_Destroy_With_Parent 1221 (Window : not null access Gtk_Window_Record; 1222 Setting : Boolean) 1223 is 1224 procedure Internal (Window : System.Address; Setting : Glib.Gboolean); 1225 pragma Import (C, Internal, "gtk_window_set_destroy_with_parent"); 1226 begin 1227 Internal (Get_Object (Window), Boolean'Pos (Setting)); 1228 end Set_Destroy_With_Parent; 1229 1230 --------------- 1231 -- Set_Focus -- 1232 --------------- 1233 1234 procedure Set_Focus 1235 (Window : not null access Gtk_Window_Record; 1236 Focus : access Gtk.Widget.Gtk_Widget_Record'Class) 1237 is 1238 procedure Internal (Window : System.Address; Focus : System.Address); 1239 pragma Import (C, Internal, "gtk_window_set_focus"); 1240 begin 1241 Internal (Get_Object (Window), Get_Object_Or_Null (GObject (Focus))); 1242 end Set_Focus; 1243 1244 ---------------------- 1245 -- Set_Focus_On_Map -- 1246 ---------------------- 1247 1248 procedure Set_Focus_On_Map 1249 (Window : not null access Gtk_Window_Record; 1250 Setting : Boolean) 1251 is 1252 procedure Internal (Window : System.Address; Setting : Glib.Gboolean); 1253 pragma Import (C, Internal, "gtk_window_set_focus_on_map"); 1254 begin 1255 Internal (Get_Object (Window), Boolean'Pos (Setting)); 1256 end Set_Focus_On_Map; 1257 1258 ----------------------- 1259 -- Set_Focus_Visible -- 1260 ----------------------- 1261 1262 procedure Set_Focus_Visible 1263 (Window : not null access Gtk_Window_Record; 1264 Setting : Boolean) 1265 is 1266 procedure Internal (Window : System.Address; Setting : Glib.Gboolean); 1267 pragma Import (C, Internal, "gtk_window_set_focus_visible"); 1268 begin 1269 Internal (Get_Object (Window), Boolean'Pos (Setting)); 1270 end Set_Focus_Visible; 1271 1272 ------------------------ 1273 -- Set_Geometry_Hints -- 1274 ------------------------ 1275 1276 procedure Set_Geometry_Hints 1277 (Window : not null access Gtk_Window_Record; 1278 Geometry_Widget : access Gtk.Widget.Gtk_Widget_Record'Class; 1279 Geometry : Gdk.Window.Gdk_Geometry; 1280 Geom_Mask : Gdk.Window.Gdk_Window_Hints) 1281 is 1282 procedure Internal 1283 (Window : System.Address; 1284 Geometry_Widget : System.Address; 1285 Geometry : Gdk.Window.Gdk_Geometry; 1286 Geom_Mask : Gdk.Window.Gdk_Window_Hints); 1287 pragma Import (C, Internal, "gtk_window_set_geometry_hints"); 1288 begin 1289 Internal (Get_Object (Window), Get_Object_Or_Null (GObject (Geometry_Widget)), Geometry, Geom_Mask); 1290 end Set_Geometry_Hints; 1291 1292 ----------------- 1293 -- Set_Gravity -- 1294 ----------------- 1295 1296 procedure Set_Gravity 1297 (Window : not null access Gtk_Window_Record; 1298 Gravity : Gdk.Window.Gdk_Gravity) 1299 is 1300 procedure Internal 1301 (Window : System.Address; 1302 Gravity : Gdk.Window.Gdk_Gravity); 1303 pragma Import (C, Internal, "gtk_window_set_gravity"); 1304 begin 1305 Internal (Get_Object (Window), Gravity); 1306 end Set_Gravity; 1307 1308 ------------------------- 1309 -- Set_Has_Resize_Grip -- 1310 ------------------------- 1311 1312 procedure Set_Has_Resize_Grip 1313 (Window : not null access Gtk_Window_Record; 1314 Value : Boolean) 1315 is 1316 procedure Internal (Window : System.Address; Value : Glib.Gboolean); 1317 pragma Import (C, Internal, "gtk_window_set_has_resize_grip"); 1318 begin 1319 Internal (Get_Object (Window), Boolean'Pos (Value)); 1320 end Set_Has_Resize_Grip; 1321 1322 ---------------------------- 1323 -- Set_Has_User_Ref_Count -- 1324 ---------------------------- 1325 1326 procedure Set_Has_User_Ref_Count 1327 (Window : not null access Gtk_Window_Record; 1328 Setting : Boolean) 1329 is 1330 procedure Internal (Window : System.Address; Setting : Glib.Gboolean); 1331 pragma Import (C, Internal, "gtk_window_set_has_user_ref_count"); 1332 begin 1333 Internal (Get_Object (Window), Boolean'Pos (Setting)); 1334 end Set_Has_User_Ref_Count; 1335 1336 -------------------------------------- 1337 -- Set_Hide_Titlebar_When_Maximized -- 1338 -------------------------------------- 1339 1340 procedure Set_Hide_Titlebar_When_Maximized 1341 (Window : not null access Gtk_Window_Record; 1342 Setting : Boolean) 1343 is 1344 procedure Internal (Window : System.Address; Setting : Glib.Gboolean); 1345 pragma Import (C, Internal, "gtk_window_set_hide_titlebar_when_maximized"); 1346 begin 1347 Internal (Get_Object (Window), Boolean'Pos (Setting)); 1348 end Set_Hide_Titlebar_When_Maximized; 1349 1350 -------------- 1351 -- Set_Icon -- 1352 -------------- 1353 1354 procedure Set_Icon 1355 (Window : not null access Gtk_Window_Record; 1356 Icon : access Gdk.Pixbuf.Gdk_Pixbuf_Record'Class) 1357 is 1358 procedure Internal (Window : System.Address; Icon : System.Address); 1359 pragma Import (C, Internal, "gtk_window_set_icon"); 1360 begin 1361 Internal (Get_Object (Window), Get_Object_Or_Null (GObject (Icon))); 1362 end Set_Icon; 1363 1364 ------------------------ 1365 -- Set_Icon_From_File -- 1366 ------------------------ 1367 1368 function Set_Icon_From_File 1369 (Window : not null access Gtk_Window_Record; 1370 Filename : UTF8_String) return Boolean 1371 is 1372 function Internal 1373 (Window : System.Address; 1374 Filename : Interfaces.C.Strings.chars_ptr) return Glib.Gboolean; 1375 pragma Import (C, Internal, "gtk_window_set_icon_from_file"); 1376 Tmp_Filename : Interfaces.C.Strings.chars_ptr := New_String (Filename); 1377 Tmp_Return : Glib.Gboolean; 1378 begin 1379 Tmp_Return := Internal (Get_Object (Window), Tmp_Filename); 1380 Free (Tmp_Filename); 1381 return Tmp_Return /= 0; 1382 end Set_Icon_From_File; 1383 1384 ------------------- 1385 -- Set_Icon_List -- 1386 ------------------- 1387 1388 procedure Set_Icon_List 1389 (Window : not null access Gtk_Window_Record; 1390 List : Glib.Object.Object_Simple_List.Glist) 1391 is 1392 procedure Internal (Window : System.Address; List : System.Address); 1393 pragma Import (C, Internal, "gtk_window_set_icon_list"); 1394 begin 1395 Internal (Get_Object (Window), Glib.Object.Object_Simple_List.Get_Object (List)); 1396 end Set_Icon_List; 1397 1398 ------------------- 1399 -- Set_Icon_Name -- 1400 ------------------- 1401 1402 procedure Set_Icon_Name 1403 (Window : not null access Gtk_Window_Record; 1404 Name : UTF8_String := "") 1405 is 1406 procedure Internal 1407 (Window : System.Address; 1408 Name : Interfaces.C.Strings.chars_ptr); 1409 pragma Import (C, Internal, "gtk_window_set_icon_name"); 1410 Tmp_Name : Interfaces.C.Strings.chars_ptr; 1411 begin 1412 if Name = "" then 1413 Tmp_Name := Interfaces.C.Strings.Null_Ptr; 1414 else 1415 Tmp_Name := New_String (Name); 1416 end if; 1417 Internal (Get_Object (Window), Tmp_Name); 1418 Free (Tmp_Name); 1419 end Set_Icon_Name; 1420 1421 -------------------- 1422 -- Set_Keep_Above -- 1423 -------------------- 1424 1425 procedure Set_Keep_Above 1426 (Window : not null access Gtk_Window_Record; 1427 Setting : Boolean) 1428 is 1429 procedure Internal (Window : System.Address; Setting : Glib.Gboolean); 1430 pragma Import (C, Internal, "gtk_window_set_keep_above"); 1431 begin 1432 Internal (Get_Object (Window), Boolean'Pos (Setting)); 1433 end Set_Keep_Above; 1434 1435 -------------------- 1436 -- Set_Keep_Below -- 1437 -------------------- 1438 1439 procedure Set_Keep_Below 1440 (Window : not null access Gtk_Window_Record; 1441 Setting : Boolean) 1442 is 1443 procedure Internal (Window : System.Address; Setting : Glib.Gboolean); 1444 pragma Import (C, Internal, "gtk_window_set_keep_below"); 1445 begin 1446 Internal (Get_Object (Window), Boolean'Pos (Setting)); 1447 end Set_Keep_Below; 1448 1449 --------------------------- 1450 -- Set_Mnemonic_Modifier -- 1451 --------------------------- 1452 1453 procedure Set_Mnemonic_Modifier 1454 (Window : not null access Gtk_Window_Record; 1455 Modifier : Gdk.Types.Gdk_Modifier_Type) 1456 is 1457 procedure Internal 1458 (Window : System.Address; 1459 Modifier : Gdk.Types.Gdk_Modifier_Type); 1460 pragma Import (C, Internal, "gtk_window_set_mnemonic_modifier"); 1461 begin 1462 Internal (Get_Object (Window), Modifier); 1463 end Set_Mnemonic_Modifier; 1464 1465 --------------------------- 1466 -- Set_Mnemonics_Visible -- 1467 --------------------------- 1468 1469 procedure Set_Mnemonics_Visible 1470 (Window : not null access Gtk_Window_Record; 1471 Setting : Boolean) 1472 is 1473 procedure Internal (Window : System.Address; Setting : Glib.Gboolean); 1474 pragma Import (C, Internal, "gtk_window_set_mnemonics_visible"); 1475 begin 1476 Internal (Get_Object (Window), Boolean'Pos (Setting)); 1477 end Set_Mnemonics_Visible; 1478 1479 --------------- 1480 -- Set_Modal -- 1481 --------------- 1482 1483 procedure Set_Modal 1484 (Window : not null access Gtk_Window_Record; 1485 Modal : Boolean := True) 1486 is 1487 procedure Internal (Window : System.Address; Modal : Glib.Gboolean); 1488 pragma Import (C, Internal, "gtk_window_set_modal"); 1489 begin 1490 Internal (Get_Object (Window), Boolean'Pos (Modal)); 1491 end Set_Modal; 1492 1493 ------------------ 1494 -- Set_Position -- 1495 ------------------ 1496 1497 procedure Set_Position 1498 (Window : not null access Gtk_Window_Record; 1499 Position : Gtk.Enums.Gtk_Window_Position) 1500 is 1501 procedure Internal 1502 (Window : System.Address; 1503 Position : Gtk.Enums.Gtk_Window_Position); 1504 pragma Import (C, Internal, "gtk_window_set_position"); 1505 begin 1506 Internal (Get_Object (Window), Position); 1507 end Set_Position; 1508 1509 ------------------- 1510 -- Set_Resizable -- 1511 ------------------- 1512 1513 procedure Set_Resizable 1514 (Window : not null access Gtk_Window_Record; 1515 Resizable : Boolean) 1516 is 1517 procedure Internal 1518 (Window : System.Address; 1519 Resizable : Glib.Gboolean); 1520 pragma Import (C, Internal, "gtk_window_set_resizable"); 1521 begin 1522 Internal (Get_Object (Window), Boolean'Pos (Resizable)); 1523 end Set_Resizable; 1524 1525 -------------- 1526 -- Set_Role -- 1527 -------------- 1528 1529 procedure Set_Role 1530 (Window : not null access Gtk_Window_Record; 1531 Role : UTF8_String) 1532 is 1533 procedure Internal 1534 (Window : System.Address; 1535 Role : Interfaces.C.Strings.chars_ptr); 1536 pragma Import (C, Internal, "gtk_window_set_role"); 1537 Tmp_Role : Interfaces.C.Strings.chars_ptr := New_String (Role); 1538 begin 1539 Internal (Get_Object (Window), Tmp_Role); 1540 Free (Tmp_Role); 1541 end Set_Role; 1542 1543 ---------------- 1544 -- Set_Screen -- 1545 ---------------- 1546 1547 procedure Set_Screen 1548 (Window : not null access Gtk_Window_Record; 1549 Screen : not null access Gdk.Screen.Gdk_Screen_Record'Class) 1550 is 1551 procedure Internal (Window : System.Address; Screen : System.Address); 1552 pragma Import (C, Internal, "gtk_window_set_screen"); 1553 begin 1554 Internal (Get_Object (Window), Get_Object (Screen)); 1555 end Set_Screen; 1556 1557 ------------------------- 1558 -- Set_Skip_Pager_Hint -- 1559 ------------------------- 1560 1561 procedure Set_Skip_Pager_Hint 1562 (Window : not null access Gtk_Window_Record; 1563 Setting : Boolean) 1564 is 1565 procedure Internal (Window : System.Address; Setting : Glib.Gboolean); 1566 pragma Import (C, Internal, "gtk_window_set_skip_pager_hint"); 1567 begin 1568 Internal (Get_Object (Window), Boolean'Pos (Setting)); 1569 end Set_Skip_Pager_Hint; 1570 1571 --------------------------- 1572 -- Set_Skip_Taskbar_Hint -- 1573 --------------------------- 1574 1575 procedure Set_Skip_Taskbar_Hint 1576 (Window : not null access Gtk_Window_Record; 1577 Setting : Boolean) 1578 is 1579 procedure Internal (Window : System.Address; Setting : Glib.Gboolean); 1580 pragma Import (C, Internal, "gtk_window_set_skip_taskbar_hint"); 1581 begin 1582 Internal (Get_Object (Window), Boolean'Pos (Setting)); 1583 end Set_Skip_Taskbar_Hint; 1584 1585 -------------------- 1586 -- Set_Startup_Id -- 1587 -------------------- 1588 1589 procedure Set_Startup_Id 1590 (Window : not null access Gtk_Window_Record; 1591 Startup_Id : UTF8_String) 1592 is 1593 procedure Internal 1594 (Window : System.Address; 1595 Startup_Id : Interfaces.C.Strings.chars_ptr); 1596 pragma Import (C, Internal, "gtk_window_set_startup_id"); 1597 Tmp_Startup_Id : Interfaces.C.Strings.chars_ptr := New_String (Startup_Id); 1598 begin 1599 Internal (Get_Object (Window), Tmp_Startup_Id); 1600 Free (Tmp_Startup_Id); 1601 end Set_Startup_Id; 1602 1603 --------------- 1604 -- Set_Title -- 1605 --------------- 1606 1607 procedure Set_Title 1608 (Window : not null access Gtk_Window_Record; 1609 Title : UTF8_String) 1610 is 1611 procedure Internal 1612 (Window : System.Address; 1613 Title : Interfaces.C.Strings.chars_ptr); 1614 pragma Import (C, Internal, "gtk_window_set_title"); 1615 Tmp_Title : Interfaces.C.Strings.chars_ptr := New_String (Title); 1616 begin 1617 Internal (Get_Object (Window), Tmp_Title); 1618 Free (Tmp_Title); 1619 end Set_Title; 1620 1621 ------------------ 1622 -- Set_Titlebar -- 1623 ------------------ 1624 1625 procedure Set_Titlebar 1626 (Window : not null access Gtk_Window_Record; 1627 Titlebar : access Gtk.Widget.Gtk_Widget_Record'Class) 1628 is 1629 procedure Internal 1630 (Window : System.Address; 1631 Titlebar : System.Address); 1632 pragma Import (C, Internal, "gtk_window_set_titlebar"); 1633 begin 1634 Internal (Get_Object (Window), Get_Object_Or_Null (GObject (Titlebar))); 1635 end Set_Titlebar; 1636 1637 ----------------------- 1638 -- Set_Transient_For -- 1639 ----------------------- 1640 1641 procedure Set_Transient_For 1642 (Window : not null access Gtk_Window_Record; 1643 Parent : access Gtk_Window_Record'Class) 1644 is 1645 procedure Internal (Window : System.Address; Parent : System.Address); 1646 pragma Import (C, Internal, "gtk_window_set_transient_for"); 1647 begin 1648 Internal (Get_Object (Window), Get_Object_Or_Null (GObject (Parent))); 1649 end Set_Transient_For; 1650 1651 ------------------- 1652 -- Set_Type_Hint -- 1653 ------------------- 1654 1655 procedure Set_Type_Hint 1656 (Window : not null access Gtk_Window_Record; 1657 Hint : Gdk.Window.Gdk_Window_Type_Hint) 1658 is 1659 procedure Internal 1660 (Window : System.Address; 1661 Hint : Gdk.Window.Gdk_Window_Type_Hint); 1662 pragma Import (C, Internal, "gtk_window_set_type_hint"); 1663 begin 1664 Internal (Get_Object (Window), Hint); 1665 end Set_Type_Hint; 1666 1667 ---------------------- 1668 -- Set_Urgency_Hint -- 1669 ---------------------- 1670 1671 procedure Set_Urgency_Hint 1672 (Window : not null access Gtk_Window_Record; 1673 Setting : Boolean) 1674 is 1675 procedure Internal (Window : System.Address; Setting : Glib.Gboolean); 1676 pragma Import (C, Internal, "gtk_window_set_urgency_hint"); 1677 begin 1678 Internal (Get_Object (Window), Boolean'Pos (Setting)); 1679 end Set_Urgency_Hint; 1680 1681 ----------------- 1682 -- Set_Wmclass -- 1683 ----------------- 1684 1685 procedure Set_Wmclass 1686 (Window : not null access Gtk_Window_Record; 1687 Wmclass_Name : UTF8_String; 1688 Wmclass_Class : UTF8_String) 1689 is 1690 procedure Internal 1691 (Window : System.Address; 1692 Wmclass_Name : Interfaces.C.Strings.chars_ptr; 1693 Wmclass_Class : Interfaces.C.Strings.chars_ptr); 1694 pragma Import (C, Internal, "gtk_window_set_wmclass"); 1695 Tmp_Wmclass_Name : Interfaces.C.Strings.chars_ptr := New_String (Wmclass_Name); 1696 Tmp_Wmclass_Class : Interfaces.C.Strings.chars_ptr := New_String (Wmclass_Class); 1697 begin 1698 Internal (Get_Object (Window), Tmp_Wmclass_Name, Tmp_Wmclass_Class); 1699 Free (Tmp_Wmclass_Class); 1700 Free (Tmp_Wmclass_Name); 1701 end Set_Wmclass; 1702 1703 ----------- 1704 -- Stick -- 1705 ----------- 1706 1707 procedure Stick (Window : not null access Gtk_Window_Record) is 1708 procedure Internal (Window : System.Address); 1709 pragma Import (C, Internal, "gtk_window_stick"); 1710 begin 1711 Internal (Get_Object (Window)); 1712 end Stick; 1713 1714 ------------------ 1715 -- Unfullscreen -- 1716 ------------------ 1717 1718 procedure Unfullscreen (Window : not null access Gtk_Window_Record) is 1719 procedure Internal (Window : System.Address); 1720 pragma Import (C, Internal, "gtk_window_unfullscreen"); 1721 begin 1722 Internal (Get_Object (Window)); 1723 end Unfullscreen; 1724 1725 ---------------- 1726 -- Unmaximize -- 1727 ---------------- 1728 1729 procedure Unmaximize (Window : not null access Gtk_Window_Record) is 1730 procedure Internal (Window : System.Address); 1731 pragma Import (C, Internal, "gtk_window_unmaximize"); 1732 begin 1733 Internal (Get_Object (Window)); 1734 end Unmaximize; 1735 1736 ------------- 1737 -- Unstick -- 1738 ------------- 1739 1740 procedure Unstick (Window : not null access Gtk_Window_Record) is 1741 procedure Internal (Window : System.Address); 1742 pragma Import (C, Internal, "gtk_window_unstick"); 1743 begin 1744 Internal (Get_Object (Window)); 1745 end Unstick; 1746 1747 --------------------------- 1748 -- Get_Default_Icon_List -- 1749 --------------------------- 1750 1751 function Get_Default_Icon_List return Glib.Object.Object_Simple_List.Glist is 1752 function Internal return System.Address; 1753 pragma Import (C, Internal, "gtk_window_get_default_icon_list"); 1754 Tmp_Return : Glib.Object.Object_Simple_List.Glist; 1755 begin 1756 Glib.Object.Object_Simple_List.Set_Object (Tmp_Return, Internal); 1757 return Tmp_Return; 1758 end Get_Default_Icon_List; 1759 1760 --------------------------- 1761 -- Get_Default_Icon_Name -- 1762 --------------------------- 1763 1764 function Get_Default_Icon_Name return UTF8_String is 1765 function Internal return Interfaces.C.Strings.chars_ptr; 1766 pragma Import (C, Internal, "gtk_window_get_default_icon_name"); 1767 begin 1768 return Gtkada.Bindings.Value_Allowing_Null (Internal); 1769 end Get_Default_Icon_Name; 1770 1771 -------------------- 1772 -- List_Toplevels -- 1773 -------------------- 1774 1775 function List_Toplevels return Gtk.Widget.Widget_List.Glist is 1776 function Internal return System.Address; 1777 pragma Import (C, Internal, "gtk_window_list_toplevels"); 1778 Tmp_Return : Gtk.Widget.Widget_List.Glist; 1779 begin 1780 Gtk.Widget.Widget_List.Set_Object (Tmp_Return, Internal); 1781 return Tmp_Return; 1782 end List_Toplevels; 1783 1784 ----------------------------------- 1785 -- Set_Auto_Startup_Notification -- 1786 ----------------------------------- 1787 1788 procedure Set_Auto_Startup_Notification (Setting : Boolean) is 1789 procedure Internal (Setting : Glib.Gboolean); 1790 pragma Import (C, Internal, "gtk_window_set_auto_startup_notification"); 1791 begin 1792 Internal (Boolean'Pos (Setting)); 1793 end Set_Auto_Startup_Notification; 1794 1795 ---------------------- 1796 -- Set_Default_Icon -- 1797 ---------------------- 1798 1799 procedure Set_Default_Icon 1800 (Icon : not null access Gdk.Pixbuf.Gdk_Pixbuf_Record'Class) 1801 is 1802 procedure Internal (Icon : System.Address); 1803 pragma Import (C, Internal, "gtk_window_set_default_icon"); 1804 begin 1805 Internal (Get_Object (Icon)); 1806 end Set_Default_Icon; 1807 1808 -------------------------------- 1809 -- Set_Default_Icon_From_File -- 1810 -------------------------------- 1811 1812 function Set_Default_Icon_From_File 1813 (Filename : UTF8_String) return Boolean 1814 is 1815 function Internal 1816 (Filename : Interfaces.C.Strings.chars_ptr) return Glib.Gboolean; 1817 pragma Import (C, Internal, "gtk_window_set_default_icon_from_file"); 1818 Tmp_Filename : Interfaces.C.Strings.chars_ptr := New_String (Filename); 1819 Tmp_Return : Glib.Gboolean; 1820 begin 1821 Tmp_Return := Internal (Tmp_Filename); 1822 Free (Tmp_Filename); 1823 return Tmp_Return /= 0; 1824 end Set_Default_Icon_From_File; 1825 1826 --------------------------- 1827 -- Set_Default_Icon_List -- 1828 --------------------------- 1829 1830 procedure Set_Default_Icon_List 1831 (List : Glib.Object.Object_Simple_List.Glist) 1832 is 1833 procedure Internal (List : System.Address); 1834 pragma Import (C, Internal, "gtk_window_set_default_icon_list"); 1835 begin 1836 Internal (Glib.Object.Object_Simple_List.Get_Object (List)); 1837 end Set_Default_Icon_List; 1838 1839 --------------------------- 1840 -- Set_Default_Icon_Name -- 1841 --------------------------- 1842 1843 procedure Set_Default_Icon_Name (Name : UTF8_String) is 1844 procedure Internal (Name : Interfaces.C.Strings.chars_ptr); 1845 pragma Import (C, Internal, "gtk_window_set_default_icon_name"); 1846 Tmp_Name : Interfaces.C.Strings.chars_ptr := New_String (Name); 1847 begin 1848 Internal (Tmp_Name); 1849 Free (Tmp_Name); 1850 end Set_Default_Icon_Name; 1851 1852 ------------------------------- 1853 -- Set_Interactive_Debugging -- 1854 ------------------------------- 1855 1856 procedure Set_Interactive_Debugging (Enable : Boolean) is 1857 procedure Internal (Enable : Glib.Gboolean); 1858 pragma Import (C, Internal, "gtk_window_set_interactive_debugging"); 1859 begin 1860 Internal (Boolean'Pos (Enable)); 1861 end Set_Interactive_Debugging; 1862 1863 use type System.Address; 1864 1865 function Cb_To_Address is new Ada.Unchecked_Conversion 1866 (Cb_Gtk_Window_Void, System.Address); 1867 function Address_To_Cb is new Ada.Unchecked_Conversion 1868 (System.Address, Cb_Gtk_Window_Void); 1869 1870 function Cb_To_Address is new Ada.Unchecked_Conversion 1871 (Cb_GObject_Void, System.Address); 1872 function Address_To_Cb is new Ada.Unchecked_Conversion 1873 (System.Address, Cb_GObject_Void); 1874 1875 function Cb_To_Address is new Ada.Unchecked_Conversion 1876 (Cb_Gtk_Window_Boolean_Boolean, System.Address); 1877 function Address_To_Cb is new Ada.Unchecked_Conversion 1878 (System.Address, Cb_Gtk_Window_Boolean_Boolean); 1879 1880 function Cb_To_Address is new Ada.Unchecked_Conversion 1881 (Cb_GObject_Boolean_Boolean, System.Address); 1882 function Address_To_Cb is new Ada.Unchecked_Conversion 1883 (System.Address, Cb_GObject_Boolean_Boolean); 1884 1885 function Cb_To_Address is new Ada.Unchecked_Conversion 1886 (Cb_Gtk_Window_Gtk_Widget_Void, System.Address); 1887 function Address_To_Cb is new Ada.Unchecked_Conversion 1888 (System.Address, Cb_Gtk_Window_Gtk_Widget_Void); 1889 1890 function Cb_To_Address is new Ada.Unchecked_Conversion 1891 (Cb_GObject_Gtk_Widget_Void, System.Address); 1892 function Address_To_Cb is new Ada.Unchecked_Conversion 1893 (System.Address, Cb_GObject_Gtk_Widget_Void); 1894 1895 procedure Connect 1896 (Object : access Gtk_Window_Record'Class; 1897 C_Name : Glib.Signal_Name; 1898 Handler : Cb_Gtk_Window_Void; 1899 After : Boolean); 1900 1901 procedure Connect 1902 (Object : access Gtk_Window_Record'Class; 1903 C_Name : Glib.Signal_Name; 1904 Handler : Cb_Gtk_Window_Boolean_Boolean; 1905 After : Boolean); 1906 1907 procedure Connect 1908 (Object : access Gtk_Window_Record'Class; 1909 C_Name : Glib.Signal_Name; 1910 Handler : Cb_Gtk_Window_Gtk_Widget_Void; 1911 After : Boolean); 1912 1913 procedure Connect_Slot 1914 (Object : access Gtk_Window_Record'Class; 1915 C_Name : Glib.Signal_Name; 1916 Handler : Cb_GObject_Void; 1917 After : Boolean; 1918 Slot : access Glib.Object.GObject_Record'Class := null); 1919 1920 procedure Connect_Slot 1921 (Object : access Gtk_Window_Record'Class; 1922 C_Name : Glib.Signal_Name; 1923 Handler : Cb_GObject_Boolean_Boolean; 1924 After : Boolean; 1925 Slot : access Glib.Object.GObject_Record'Class := null); 1926 1927 procedure Connect_Slot 1928 (Object : access Gtk_Window_Record'Class; 1929 C_Name : Glib.Signal_Name; 1930 Handler : Cb_GObject_Gtk_Widget_Void; 1931 After : Boolean; 1932 Slot : access Glib.Object.GObject_Record'Class := null); 1933 1934 procedure Marsh_GObject_Boolean_Boolean 1935 (Closure : GClosure; 1936 Return_Value : Glib.Values.GValue; 1937 N_Params : Glib.Guint; 1938 Params : Glib.Values.C_GValues; 1939 Invocation_Hint : System.Address; 1940 User_Data : System.Address); 1941 pragma Convention (C, Marsh_GObject_Boolean_Boolean); 1942 1943 procedure Marsh_GObject_Gtk_Widget_Void 1944 (Closure : GClosure; 1945 Return_Value : Glib.Values.GValue; 1946 N_Params : Glib.Guint; 1947 Params : Glib.Values.C_GValues; 1948 Invocation_Hint : System.Address; 1949 User_Data : System.Address); 1950 pragma Convention (C, Marsh_GObject_Gtk_Widget_Void); 1951 1952 procedure Marsh_GObject_Void 1953 (Closure : GClosure; 1954 Return_Value : Glib.Values.GValue; 1955 N_Params : Glib.Guint; 1956 Params : Glib.Values.C_GValues; 1957 Invocation_Hint : System.Address; 1958 User_Data : System.Address); 1959 pragma Convention (C, Marsh_GObject_Void); 1960 1961 procedure Marsh_Gtk_Window_Boolean_Boolean 1962 (Closure : GClosure; 1963 Return_Value : Glib.Values.GValue; 1964 N_Params : Glib.Guint; 1965 Params : Glib.Values.C_GValues; 1966 Invocation_Hint : System.Address; 1967 User_Data : System.Address); 1968 pragma Convention (C, Marsh_Gtk_Window_Boolean_Boolean); 1969 1970 procedure Marsh_Gtk_Window_Gtk_Widget_Void 1971 (Closure : GClosure; 1972 Return_Value : Glib.Values.GValue; 1973 N_Params : Glib.Guint; 1974 Params : Glib.Values.C_GValues; 1975 Invocation_Hint : System.Address; 1976 User_Data : System.Address); 1977 pragma Convention (C, Marsh_Gtk_Window_Gtk_Widget_Void); 1978 1979 procedure Marsh_Gtk_Window_Void 1980 (Closure : GClosure; 1981 Return_Value : Glib.Values.GValue; 1982 N_Params : Glib.Guint; 1983 Params : Glib.Values.C_GValues; 1984 Invocation_Hint : System.Address; 1985 User_Data : System.Address); 1986 pragma Convention (C, Marsh_Gtk_Window_Void); 1987 1988 ------------- 1989 -- Connect -- 1990 ------------- 1991 1992 procedure Connect 1993 (Object : access Gtk_Window_Record'Class; 1994 C_Name : Glib.Signal_Name; 1995 Handler : Cb_Gtk_Window_Void; 1996 After : Boolean) 1997 is 1998 begin 1999 Unchecked_Do_Signal_Connect 2000 (Object => Object, 2001 C_Name => C_Name, 2002 Marshaller => Marsh_Gtk_Window_Void'Access, 2003 Handler => Cb_To_Address (Handler),-- Set in the closure 2004 After => After); 2005 end Connect; 2006 2007 ------------- 2008 -- Connect -- 2009 ------------- 2010 2011 procedure Connect 2012 (Object : access Gtk_Window_Record'Class; 2013 C_Name : Glib.Signal_Name; 2014 Handler : Cb_Gtk_Window_Boolean_Boolean; 2015 After : Boolean) 2016 is 2017 begin 2018 Unchecked_Do_Signal_Connect 2019 (Object => Object, 2020 C_Name => C_Name, 2021 Marshaller => Marsh_Gtk_Window_Boolean_Boolean'Access, 2022 Handler => Cb_To_Address (Handler),-- Set in the closure 2023 After => After); 2024 end Connect; 2025 2026 ------------- 2027 -- Connect -- 2028 ------------- 2029 2030 procedure Connect 2031 (Object : access Gtk_Window_Record'Class; 2032 C_Name : Glib.Signal_Name; 2033 Handler : Cb_Gtk_Window_Gtk_Widget_Void; 2034 After : Boolean) 2035 is 2036 begin 2037 Unchecked_Do_Signal_Connect 2038 (Object => Object, 2039 C_Name => C_Name, 2040 Marshaller => Marsh_Gtk_Window_Gtk_Widget_Void'Access, 2041 Handler => Cb_To_Address (Handler),-- Set in the closure 2042 After => After); 2043 end Connect; 2044 2045 ------------------ 2046 -- Connect_Slot -- 2047 ------------------ 2048 2049 procedure Connect_Slot 2050 (Object : access Gtk_Window_Record'Class; 2051 C_Name : Glib.Signal_Name; 2052 Handler : Cb_GObject_Void; 2053 After : Boolean; 2054 Slot : access Glib.Object.GObject_Record'Class := null) 2055 is 2056 begin 2057 Unchecked_Do_Signal_Connect 2058 (Object => Object, 2059 C_Name => C_Name, 2060 Marshaller => Marsh_GObject_Void'Access, 2061 Handler => Cb_To_Address (Handler),-- Set in the closure 2062 Slot_Object => Slot, 2063 After => After); 2064 end Connect_Slot; 2065 2066 ------------------ 2067 -- Connect_Slot -- 2068 ------------------ 2069 2070 procedure Connect_Slot 2071 (Object : access Gtk_Window_Record'Class; 2072 C_Name : Glib.Signal_Name; 2073 Handler : Cb_GObject_Boolean_Boolean; 2074 After : Boolean; 2075 Slot : access Glib.Object.GObject_Record'Class := null) 2076 is 2077 begin 2078 Unchecked_Do_Signal_Connect 2079 (Object => Object, 2080 C_Name => C_Name, 2081 Marshaller => Marsh_GObject_Boolean_Boolean'Access, 2082 Handler => Cb_To_Address (Handler),-- Set in the closure 2083 Slot_Object => Slot, 2084 After => After); 2085 end Connect_Slot; 2086 2087 ------------------ 2088 -- Connect_Slot -- 2089 ------------------ 2090 2091 procedure Connect_Slot 2092 (Object : access Gtk_Window_Record'Class; 2093 C_Name : Glib.Signal_Name; 2094 Handler : Cb_GObject_Gtk_Widget_Void; 2095 After : Boolean; 2096 Slot : access Glib.Object.GObject_Record'Class := null) 2097 is 2098 begin 2099 Unchecked_Do_Signal_Connect 2100 (Object => Object, 2101 C_Name => C_Name, 2102 Marshaller => Marsh_GObject_Gtk_Widget_Void'Access, 2103 Handler => Cb_To_Address (Handler),-- Set in the closure 2104 Slot_Object => Slot, 2105 After => After); 2106 end Connect_Slot; 2107 2108 ----------------------------------- 2109 -- Marsh_GObject_Boolean_Boolean -- 2110 ----------------------------------- 2111 2112 procedure Marsh_GObject_Boolean_Boolean 2113 (Closure : GClosure; 2114 Return_Value : Glib.Values.GValue; 2115 N_Params : Glib.Guint; 2116 Params : Glib.Values.C_GValues; 2117 Invocation_Hint : System.Address; 2118 User_Data : System.Address) 2119 is 2120 pragma Unreferenced (N_Params, Invocation_Hint, User_Data); 2121 H : constant Cb_GObject_Boolean_Boolean := Address_To_Cb (Get_Callback (Closure)); 2122 Obj : constant Glib.Object.GObject := Glib.Object.Convert (Get_Data (Closure)); 2123 V : aliased Boolean := H (Obj, Unchecked_To_Boolean (Params, 1)); 2124 begin 2125 Set_Value (Return_Value, V'Address); 2126 exception when E : others => Process_Exception (E); 2127 end Marsh_GObject_Boolean_Boolean; 2128 2129 ----------------------------------- 2130 -- Marsh_GObject_Gtk_Widget_Void -- 2131 ----------------------------------- 2132 2133 procedure Marsh_GObject_Gtk_Widget_Void 2134 (Closure : GClosure; 2135 Return_Value : Glib.Values.GValue; 2136 N_Params : Glib.Guint; 2137 Params : Glib.Values.C_GValues; 2138 Invocation_Hint : System.Address; 2139 User_Data : System.Address) 2140 is 2141 pragma Unreferenced (Return_Value, N_Params, Invocation_Hint, User_Data); 2142 H : constant Cb_GObject_Gtk_Widget_Void := Address_To_Cb (Get_Callback (Closure)); 2143 Obj : constant Glib.Object.GObject := Glib.Object.Convert (Get_Data (Closure)); 2144 begin 2145 H (Obj, Gtk.Widget.Gtk_Widget (Unchecked_To_Object (Params, 1))); 2146 exception when E : others => Process_Exception (E); 2147 end Marsh_GObject_Gtk_Widget_Void; 2148 2149 ------------------------ 2150 -- Marsh_GObject_Void -- 2151 ------------------------ 2152 2153 procedure Marsh_GObject_Void 2154 (Closure : GClosure; 2155 Return_Value : Glib.Values.GValue; 2156 N_Params : Glib.Guint; 2157 Params : Glib.Values.C_GValues; 2158 Invocation_Hint : System.Address; 2159 User_Data : System.Address) 2160 is 2161 pragma Unreferenced (Return_Value, N_Params, Params, Invocation_Hint, User_Data); 2162 H : constant Cb_GObject_Void := Address_To_Cb (Get_Callback (Closure)); 2163 Obj : constant Glib.Object.GObject := Glib.Object.Convert (Get_Data (Closure)); 2164 begin 2165 H (Obj); 2166 exception when E : others => Process_Exception (E); 2167 end Marsh_GObject_Void; 2168 2169 -------------------------------------- 2170 -- Marsh_Gtk_Window_Boolean_Boolean -- 2171 -------------------------------------- 2172 2173 procedure Marsh_Gtk_Window_Boolean_Boolean 2174 (Closure : GClosure; 2175 Return_Value : Glib.Values.GValue; 2176 N_Params : Glib.Guint; 2177 Params : Glib.Values.C_GValues; 2178 Invocation_Hint : System.Address; 2179 User_Data : System.Address) 2180 is 2181 pragma Unreferenced (N_Params, Invocation_Hint, User_Data); 2182 H : constant Cb_Gtk_Window_Boolean_Boolean := Address_To_Cb (Get_Callback (Closure)); 2183 Obj : constant Gtk_Window := Gtk_Window (Unchecked_To_Object (Params, 0)); 2184 V : aliased Boolean := H (Obj, Unchecked_To_Boolean (Params, 1)); 2185 begin 2186 Set_Value (Return_Value, V'Address); 2187 exception when E : others => Process_Exception (E); 2188 end Marsh_Gtk_Window_Boolean_Boolean; 2189 2190 -------------------------------------- 2191 -- Marsh_Gtk_Window_Gtk_Widget_Void -- 2192 -------------------------------------- 2193 2194 procedure Marsh_Gtk_Window_Gtk_Widget_Void 2195 (Closure : GClosure; 2196 Return_Value : Glib.Values.GValue; 2197 N_Params : Glib.Guint; 2198 Params : Glib.Values.C_GValues; 2199 Invocation_Hint : System.Address; 2200 User_Data : System.Address) 2201 is 2202 pragma Unreferenced (Return_Value, N_Params, Invocation_Hint, User_Data); 2203 H : constant Cb_Gtk_Window_Gtk_Widget_Void := Address_To_Cb (Get_Callback (Closure)); 2204 Obj : constant Gtk_Window := Gtk_Window (Unchecked_To_Object (Params, 0)); 2205 begin 2206 H (Obj, Gtk.Widget.Gtk_Widget (Unchecked_To_Object (Params, 1))); 2207 exception when E : others => Process_Exception (E); 2208 end Marsh_Gtk_Window_Gtk_Widget_Void; 2209 2210 --------------------------- 2211 -- Marsh_Gtk_Window_Void -- 2212 --------------------------- 2213 2214 procedure Marsh_Gtk_Window_Void 2215 (Closure : GClosure; 2216 Return_Value : Glib.Values.GValue; 2217 N_Params : Glib.Guint; 2218 Params : Glib.Values.C_GValues; 2219 Invocation_Hint : System.Address; 2220 User_Data : System.Address) 2221 is 2222 pragma Unreferenced (Return_Value, N_Params, Invocation_Hint, User_Data); 2223 H : constant Cb_Gtk_Window_Void := Address_To_Cb (Get_Callback (Closure)); 2224 Obj : constant Gtk_Window := Gtk_Window (Unchecked_To_Object (Params, 0)); 2225 begin 2226 H (Obj); 2227 exception when E : others => Process_Exception (E); 2228 end Marsh_Gtk_Window_Void; 2229 2230 ------------------------- 2231 -- On_Activate_Default -- 2232 ------------------------- 2233 2234 procedure On_Activate_Default 2235 (Self : not null access Gtk_Window_Record; 2236 Call : Cb_Gtk_Window_Void; 2237 After : Boolean := False) 2238 is 2239 begin 2240 Connect (Self, "activate-default" & ASCII.NUL, Call, After); 2241 end On_Activate_Default; 2242 2243 ------------------------- 2244 -- On_Activate_Default -- 2245 ------------------------- 2246 2247 procedure On_Activate_Default 2248 (Self : not null access Gtk_Window_Record; 2249 Call : Cb_GObject_Void; 2250 Slot : not null access Glib.Object.GObject_Record'Class; 2251 After : Boolean := False) 2252 is 2253 begin 2254 Connect_Slot (Self, "activate-default" & ASCII.NUL, Call, After, Slot); 2255 end On_Activate_Default; 2256 2257 ----------------------- 2258 -- On_Activate_Focus -- 2259 ----------------------- 2260 2261 procedure On_Activate_Focus 2262 (Self : not null access Gtk_Window_Record; 2263 Call : Cb_Gtk_Window_Void; 2264 After : Boolean := False) 2265 is 2266 begin 2267 Connect (Self, "activate-focus" & ASCII.NUL, Call, After); 2268 end On_Activate_Focus; 2269 2270 ----------------------- 2271 -- On_Activate_Focus -- 2272 ----------------------- 2273 2274 procedure On_Activate_Focus 2275 (Self : not null access Gtk_Window_Record; 2276 Call : Cb_GObject_Void; 2277 Slot : not null access Glib.Object.GObject_Record'Class; 2278 After : Boolean := False) 2279 is 2280 begin 2281 Connect_Slot (Self, "activate-focus" & ASCII.NUL, Call, After, Slot); 2282 end On_Activate_Focus; 2283 2284 ------------------------- 2285 -- On_Enable_Debugging -- 2286 ------------------------- 2287 2288 procedure On_Enable_Debugging 2289 (Self : not null access Gtk_Window_Record; 2290 Call : Cb_Gtk_Window_Boolean_Boolean; 2291 After : Boolean := False) 2292 is 2293 begin 2294 Connect (Self, "enable-debugging" & ASCII.NUL, Call, After); 2295 end On_Enable_Debugging; 2296 2297 ------------------------- 2298 -- On_Enable_Debugging -- 2299 ------------------------- 2300 2301 procedure On_Enable_Debugging 2302 (Self : not null access Gtk_Window_Record; 2303 Call : Cb_GObject_Boolean_Boolean; 2304 Slot : not null access Glib.Object.GObject_Record'Class; 2305 After : Boolean := False) 2306 is 2307 begin 2308 Connect_Slot (Self, "enable-debugging" & ASCII.NUL, Call, After, Slot); 2309 end On_Enable_Debugging; 2310 2311 --------------------- 2312 -- On_Keys_Changed -- 2313 --------------------- 2314 2315 procedure On_Keys_Changed 2316 (Self : not null access Gtk_Window_Record; 2317 Call : Cb_Gtk_Window_Void; 2318 After : Boolean := False) 2319 is 2320 begin 2321 Connect (Self, "keys-changed" & ASCII.NUL, Call, After); 2322 end On_Keys_Changed; 2323 2324 --------------------- 2325 -- On_Keys_Changed -- 2326 --------------------- 2327 2328 procedure On_Keys_Changed 2329 (Self : not null access Gtk_Window_Record; 2330 Call : Cb_GObject_Void; 2331 Slot : not null access Glib.Object.GObject_Record'Class; 2332 After : Boolean := False) 2333 is 2334 begin 2335 Connect_Slot (Self, "keys-changed" & ASCII.NUL, Call, After, Slot); 2336 end On_Keys_Changed; 2337 2338 ------------------ 2339 -- On_Set_Focus -- 2340 ------------------ 2341 2342 procedure On_Set_Focus 2343 (Self : not null access Gtk_Window_Record; 2344 Call : Cb_Gtk_Window_Gtk_Widget_Void; 2345 After : Boolean := False) 2346 is 2347 begin 2348 Connect (Self, "set-focus" & ASCII.NUL, Call, After); 2349 end On_Set_Focus; 2350 2351 ------------------ 2352 -- On_Set_Focus -- 2353 ------------------ 2354 2355 procedure On_Set_Focus 2356 (Self : not null access Gtk_Window_Record; 2357 Call : Cb_GObject_Gtk_Widget_Void; 2358 Slot : not null access Glib.Object.GObject_Record'Class; 2359 After : Boolean := False) 2360 is 2361 begin 2362 Connect_Slot (Self, "set-focus" & ASCII.NUL, Call, After, Slot); 2363 end On_Set_Focus; 2364 2365end Gtk.Window; 2366