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; 31 32package body Gtk.Flow_Box is 33 34 procedure C_Gtk_Flow_Box_Selected_Foreach 35 (Self : System.Address; 36 Func : System.Address; 37 Data : System.Address); 38 pragma Import (C, C_Gtk_Flow_Box_Selected_Foreach, "gtk_flow_box_selected_foreach"); 39 -- Calls a function for each selected child. 40 -- Note that the selection cannot be modified from within this function. 41 -- Since: gtk+ 3.12 42 -- "func": the function to call for each selected child 43 -- "data": user data to pass to the function 44 45 procedure C_Gtk_Flow_Box_Set_Filter_Func 46 (Self : System.Address; 47 Filter_Func : System.Address; 48 User_Data : System.Address; 49 Destroy : System.Address); 50 pragma Import (C, C_Gtk_Flow_Box_Set_Filter_Func, "gtk_flow_box_set_filter_func"); 51 -- By setting a filter function on the Box one can decide dynamically 52 -- which of the children to show. For instance, to implement a search 53 -- function that only shows the children matching the search terms. 54 -- The Filter_Func will be called for each child after the call, and it 55 -- will continue to be called each time a child changes (via 56 -- Gtk.Flow_Box_Child.Changed) or when Gtk.Flow_Box.Invalidate_Filter is 57 -- called. 58 -- Since: gtk+ 3.12 59 -- "filter_func": callback that lets you filter which children to show 60 -- "user_data": user data passed to Filter_Func 61 -- "destroy": destroy notifier for User_Data 62 63 procedure C_Gtk_Flow_Box_Set_Sort_Func 64 (Self : System.Address; 65 Sort_Func : System.Address; 66 User_Data : System.Address; 67 Destroy : System.Address); 68 pragma Import (C, C_Gtk_Flow_Box_Set_Sort_Func, "gtk_flow_box_set_sort_func"); 69 -- By setting a sort function on the Box, one can dynamically reorder the 70 -- children of the box, based on the contents of the children. 71 -- The Sort_Func will be called for each child after the call, and will 72 -- continue to be called each time a child changes (via 73 -- Gtk.Flow_Box_Child.Changed) and when Gtk.Flow_Box.Invalidate_Sort is 74 -- called. 75 -- Since: gtk+ 3.12 76 -- "sort_func": the sort function 77 -- "user_data": user data passed to Sort_Func 78 -- "destroy": destroy notifier for User_Data 79 80 function To_Gtk_Flow_Box_Foreach_Func is new Ada.Unchecked_Conversion 81 (System.Address, Gtk_Flow_Box_Foreach_Func); 82 83 function To_Address is new Ada.Unchecked_Conversion 84 (Gtk_Flow_Box_Foreach_Func, System.Address); 85 86 function To_Gtk_Flow_Box_Filter_Func is new Ada.Unchecked_Conversion 87 (System.Address, Gtk_Flow_Box_Filter_Func); 88 89 function To_Address is new Ada.Unchecked_Conversion 90 (Gtk_Flow_Box_Filter_Func, System.Address); 91 92 function To_Gtk_Flow_Box_Sort_Func is new Ada.Unchecked_Conversion 93 (System.Address, Gtk_Flow_Box_Sort_Func); 94 95 function To_Address is new Ada.Unchecked_Conversion 96 (Gtk_Flow_Box_Sort_Func, System.Address); 97 98 function Internal_Gtk_Flow_Box_Filter_Func 99 (Child : System.Address; 100 User_Data : System.Address) return Glib.Gboolean; 101 pragma Convention (C, Internal_Gtk_Flow_Box_Filter_Func); 102 -- "child": a Gtk.Flow_Box_Child.Gtk_Flow_Box_Child that may be filtered 103 -- "user_data": user data 104 105 procedure Internal_Gtk_Flow_Box_Foreach_Func 106 (Box : System.Address; 107 Child : System.Address; 108 User_Data : System.Address); 109 pragma Convention (C, Internal_Gtk_Flow_Box_Foreach_Func); 110 -- "box": a Gtk.Flow_Box.Gtk_Flow_Box 111 -- "child": a Gtk.Flow_Box_Child.Gtk_Flow_Box_Child 112 -- "user_data": user data 113 114 function Internal_Gtk_Flow_Box_Sort_Func 115 (Child1 : System.Address; 116 Child2 : System.Address; 117 User_Data : System.Address) return Gint; 118 pragma Convention (C, Internal_Gtk_Flow_Box_Sort_Func); 119 -- "child1": the first child 120 -- "child2": the second child 121 -- "user_data": user data 122 123 --------------------------------------- 124 -- Internal_Gtk_Flow_Box_Filter_Func -- 125 --------------------------------------- 126 127 function Internal_Gtk_Flow_Box_Filter_Func 128 (Child : System.Address; 129 User_Data : System.Address) return Glib.Gboolean 130 is 131 Func : constant Gtk_Flow_Box_Filter_Func := To_Gtk_Flow_Box_Filter_Func (User_Data); 132 Stub_Gtk_Flow_Box_Child : Gtk.Flow_Box_Child.Gtk_Flow_Box_Child_Record; 133 begin 134 return Boolean'Pos (Func (Gtk.Flow_Box_Child.Gtk_Flow_Box_Child (Get_User_Data (Child, Stub_Gtk_Flow_Box_Child)))); 135 end Internal_Gtk_Flow_Box_Filter_Func; 136 137 ---------------------------------------- 138 -- Internal_Gtk_Flow_Box_Foreach_Func -- 139 ---------------------------------------- 140 141 procedure Internal_Gtk_Flow_Box_Foreach_Func 142 (Box : System.Address; 143 Child : System.Address; 144 User_Data : System.Address) 145 is 146 Func : constant Gtk_Flow_Box_Foreach_Func := To_Gtk_Flow_Box_Foreach_Func (User_Data); 147 Stub_Gtk_Flow_Box : Gtk_Flow_Box_Record; 148 Stub_Gtk_Flow_Box_Child : Gtk.Flow_Box_Child.Gtk_Flow_Box_Child_Record; 149 begin 150 Func (Gtk.Flow_Box.Gtk_Flow_Box (Get_User_Data (Box, Stub_Gtk_Flow_Box)), Gtk.Flow_Box_Child.Gtk_Flow_Box_Child (Get_User_Data (Child, Stub_Gtk_Flow_Box_Child))); 151 end Internal_Gtk_Flow_Box_Foreach_Func; 152 153 ------------------------------------- 154 -- Internal_Gtk_Flow_Box_Sort_Func -- 155 ------------------------------------- 156 157 function Internal_Gtk_Flow_Box_Sort_Func 158 (Child1 : System.Address; 159 Child2 : System.Address; 160 User_Data : System.Address) return Gint 161 is 162 Func : constant Gtk_Flow_Box_Sort_Func := To_Gtk_Flow_Box_Sort_Func (User_Data); 163 Stub_Gtk_Flow_Box_Child : Gtk.Flow_Box_Child.Gtk_Flow_Box_Child_Record; 164 begin 165 return Func (Gtk.Flow_Box_Child.Gtk_Flow_Box_Child (Get_User_Data (Child1, Stub_Gtk_Flow_Box_Child)), Gtk.Flow_Box_Child.Gtk_Flow_Box_Child (Get_User_Data (Child2, Stub_Gtk_Flow_Box_Child))); 166 end Internal_Gtk_Flow_Box_Sort_Func; 167 168 package Type_Conversion_Gtk_Flow_Box is new Glib.Type_Conversion_Hooks.Hook_Registrator 169 (Get_Type'Access, Gtk_Flow_Box_Record); 170 pragma Unreferenced (Type_Conversion_Gtk_Flow_Box); 171 172 ---------------------- 173 -- Gtk_Flow_Box_New -- 174 ---------------------- 175 176 function Gtk_Flow_Box_New return Gtk_Flow_Box is 177 Self : constant Gtk_Flow_Box := new Gtk_Flow_Box_Record; 178 begin 179 Gtk.Flow_Box.Initialize (Self); 180 return Self; 181 end Gtk_Flow_Box_New; 182 183 ------------- 184 -- Gtk_New -- 185 ------------- 186 187 procedure Gtk_New (Self : out Gtk_Flow_Box) is 188 begin 189 Self := new Gtk_Flow_Box_Record; 190 Gtk.Flow_Box.Initialize (Self); 191 end Gtk_New; 192 193 ---------------- 194 -- Initialize -- 195 ---------------- 196 197 procedure Initialize (Self : not null access Gtk_Flow_Box_Record'Class) is 198 function Internal return System.Address; 199 pragma Import (C, Internal, "gtk_flow_box_new"); 200 begin 201 if not Self.Is_Created then 202 Set_Object (Self, Internal); 203 end if; 204 end Initialize; 205 206 ---------------------------------- 207 -- Get_Activate_On_Single_Click -- 208 ---------------------------------- 209 210 function Get_Activate_On_Single_Click 211 (Self : not null access Gtk_Flow_Box_Record) return Boolean 212 is 213 function Internal (Self : System.Address) return Glib.Gboolean; 214 pragma Import (C, Internal, "gtk_flow_box_get_activate_on_single_click"); 215 begin 216 return Internal (Get_Object (Self)) /= 0; 217 end Get_Activate_On_Single_Click; 218 219 ------------------------ 220 -- Get_Child_At_Index -- 221 ------------------------ 222 223 function Get_Child_At_Index 224 (Self : not null access Gtk_Flow_Box_Record; 225 Idx : Gint) return Gtk.Flow_Box_Child.Gtk_Flow_Box_Child 226 is 227 function Internal 228 (Self : System.Address; 229 Idx : Gint) return System.Address; 230 pragma Import (C, Internal, "gtk_flow_box_get_child_at_index"); 231 Stub_Gtk_Flow_Box_Child : Gtk.Flow_Box_Child.Gtk_Flow_Box_Child_Record; 232 begin 233 return Gtk.Flow_Box_Child.Gtk_Flow_Box_Child (Get_User_Data (Internal (Get_Object (Self), Idx), Stub_Gtk_Flow_Box_Child)); 234 end Get_Child_At_Index; 235 236 ------------------------ 237 -- Get_Column_Spacing -- 238 ------------------------ 239 240 function Get_Column_Spacing 241 (Self : not null access Gtk_Flow_Box_Record) return Guint 242 is 243 function Internal (Self : System.Address) return Guint; 244 pragma Import (C, Internal, "gtk_flow_box_get_column_spacing"); 245 begin 246 return Internal (Get_Object (Self)); 247 end Get_Column_Spacing; 248 249 --------------------- 250 -- Get_Homogeneous -- 251 --------------------- 252 253 function Get_Homogeneous 254 (Self : not null access Gtk_Flow_Box_Record) return Boolean 255 is 256 function Internal (Self : System.Address) return Glib.Gboolean; 257 pragma Import (C, Internal, "gtk_flow_box_get_homogeneous"); 258 begin 259 return Internal (Get_Object (Self)) /= 0; 260 end Get_Homogeneous; 261 262 ------------------------------- 263 -- Get_Max_Children_Per_Line -- 264 ------------------------------- 265 266 function Get_Max_Children_Per_Line 267 (Self : not null access Gtk_Flow_Box_Record) return Guint 268 is 269 function Internal (Self : System.Address) return Guint; 270 pragma Import (C, Internal, "gtk_flow_box_get_max_children_per_line"); 271 begin 272 return Internal (Get_Object (Self)); 273 end Get_Max_Children_Per_Line; 274 275 ------------------------------- 276 -- Get_Min_Children_Per_Line -- 277 ------------------------------- 278 279 function Get_Min_Children_Per_Line 280 (Self : not null access Gtk_Flow_Box_Record) return Guint 281 is 282 function Internal (Self : System.Address) return Guint; 283 pragma Import (C, Internal, "gtk_flow_box_get_min_children_per_line"); 284 begin 285 return Internal (Get_Object (Self)); 286 end Get_Min_Children_Per_Line; 287 288 --------------------- 289 -- Get_Row_Spacing -- 290 --------------------- 291 292 function Get_Row_Spacing 293 (Self : not null access Gtk_Flow_Box_Record) return Guint 294 is 295 function Internal (Self : System.Address) return Guint; 296 pragma Import (C, Internal, "gtk_flow_box_get_row_spacing"); 297 begin 298 return Internal (Get_Object (Self)); 299 end Get_Row_Spacing; 300 301 --------------------------- 302 -- Get_Selected_Children -- 303 --------------------------- 304 305 function Get_Selected_Children 306 (Self : not null access Gtk_Flow_Box_Record) 307 return Gtk.Widget.Widget_List.Glist 308 is 309 function Internal (Self : System.Address) return System.Address; 310 pragma Import (C, Internal, "gtk_flow_box_get_selected_children"); 311 Tmp_Return : Gtk.Widget.Widget_List.Glist; 312 begin 313 Gtk.Widget.Widget_List.Set_Object (Tmp_Return, Internal (Get_Object (Self))); 314 return Tmp_Return; 315 end Get_Selected_Children; 316 317 ------------------------ 318 -- Get_Selection_Mode -- 319 ------------------------ 320 321 function Get_Selection_Mode 322 (Self : not null access Gtk_Flow_Box_Record) 323 return Gtk.Enums.Gtk_Selection_Mode 324 is 325 function Internal 326 (Self : System.Address) return Gtk.Enums.Gtk_Selection_Mode; 327 pragma Import (C, Internal, "gtk_flow_box_get_selection_mode"); 328 begin 329 return Internal (Get_Object (Self)); 330 end Get_Selection_Mode; 331 332 ------------ 333 -- Insert -- 334 ------------ 335 336 procedure Insert 337 (Self : not null access Gtk_Flow_Box_Record; 338 Widget : not null access Gtk.Widget.Gtk_Widget_Record'Class; 339 Position : Gint) 340 is 341 procedure Internal 342 (Self : System.Address; 343 Widget : System.Address; 344 Position : Gint); 345 pragma Import (C, Internal, "gtk_flow_box_insert"); 346 begin 347 Internal (Get_Object (Self), Get_Object (Widget), Position); 348 end Insert; 349 350 ----------------------- 351 -- Invalidate_Filter -- 352 ----------------------- 353 354 procedure Invalidate_Filter (Self : not null access Gtk_Flow_Box_Record) is 355 procedure Internal (Self : System.Address); 356 pragma Import (C, Internal, "gtk_flow_box_invalidate_filter"); 357 begin 358 Internal (Get_Object (Self)); 359 end Invalidate_Filter; 360 361 --------------------- 362 -- Invalidate_Sort -- 363 --------------------- 364 365 procedure Invalidate_Sort (Self : not null access Gtk_Flow_Box_Record) is 366 procedure Internal (Self : System.Address); 367 pragma Import (C, Internal, "gtk_flow_box_invalidate_sort"); 368 begin 369 Internal (Get_Object (Self)); 370 end Invalidate_Sort; 371 372 ---------------- 373 -- Select_All -- 374 ---------------- 375 376 procedure Select_All (Self : not null access Gtk_Flow_Box_Record) is 377 procedure Internal (Self : System.Address); 378 pragma Import (C, Internal, "gtk_flow_box_select_all"); 379 begin 380 Internal (Get_Object (Self)); 381 end Select_All; 382 383 ------------------ 384 -- Select_Child -- 385 ------------------ 386 387 procedure Select_Child 388 (Self : not null access Gtk_Flow_Box_Record; 389 Child : not null access Gtk.Flow_Box_Child.Gtk_Flow_Box_Child_Record'Class) 390 is 391 procedure Internal (Self : System.Address; Child : System.Address); 392 pragma Import (C, Internal, "gtk_flow_box_select_child"); 393 begin 394 Internal (Get_Object (Self), Get_Object (Child)); 395 end Select_Child; 396 397 ---------------------- 398 -- Selected_Foreach -- 399 ---------------------- 400 401 procedure Selected_Foreach 402 (Self : not null access Gtk_Flow_Box_Record; 403 Func : Gtk_Flow_Box_Foreach_Func) 404 is 405 begin 406 if Func = null then 407 C_Gtk_Flow_Box_Selected_Foreach (Get_Object (Self), System.Null_Address, System.Null_Address); 408 else 409 C_Gtk_Flow_Box_Selected_Foreach (Get_Object (Self), Internal_Gtk_Flow_Box_Foreach_Func'Address, To_Address (Func)); 410 end if; 411 end Selected_Foreach; 412 413 package body Selected_Foreach_User_Data is 414 415 package Users is new Glib.Object.User_Data_Closure 416 (User_Data_Type, Destroy); 417 418 function To_Gtk_Flow_Box_Foreach_Func is new Ada.Unchecked_Conversion 419 (System.Address, Gtk_Flow_Box_Foreach_Func); 420 421 function To_Address is new Ada.Unchecked_Conversion 422 (Gtk_Flow_Box_Foreach_Func, System.Address); 423 424 procedure Internal_Cb 425 (Box : System.Address; 426 Child : System.Address; 427 User_Data : System.Address); 428 pragma Convention (C, Internal_Cb); 429 -- A function used by Gtk.Flow_Box.Selected_Foreach. It will be called 430 -- on every selected child of the Box. 431 -- Since: gtk+ 3.12 432 -- "box": a Gtk.Flow_Box.Gtk_Flow_Box 433 -- "child": a Gtk.Flow_Box_Child.Gtk_Flow_Box_Child 434 -- "user_data": user data 435 436 ----------------- 437 -- Internal_Cb -- 438 ----------------- 439 440 procedure Internal_Cb 441 (Box : System.Address; 442 Child : System.Address; 443 User_Data : System.Address) 444 is 445 D : constant Users.Internal_Data_Access := Users.Convert (User_Data); 446 Stub_Gtk_Flow_Box : Gtk.Flow_Box.Gtk_Flow_Box_Record; 447 Stub_Gtk_Flow_Box_Child : Gtk.Flow_Box_Child.Gtk_Flow_Box_Child_Record; 448 begin 449 To_Gtk_Flow_Box_Foreach_Func (D.Func) (Gtk.Flow_Box.Gtk_Flow_Box (Get_User_Data (Box, Stub_Gtk_Flow_Box)), Gtk.Flow_Box_Child.Gtk_Flow_Box_Child (Get_User_Data (Child, Stub_Gtk_Flow_Box_Child)), D.Data.all); 450 end Internal_Cb; 451 452 ---------------------- 453 -- Selected_Foreach -- 454 ---------------------- 455 456 procedure Selected_Foreach 457 (Self : not null access Gtk.Flow_Box.Gtk_Flow_Box_Record'Class; 458 Func : Gtk_Flow_Box_Foreach_Func; 459 Data : User_Data_Type) 460 is 461 begin 462 if Func = null then 463 C_Gtk_Flow_Box_Selected_Foreach (Get_Object (Self), System.Null_Address, System.Null_Address); 464 else 465 C_Gtk_Flow_Box_Selected_Foreach (Get_Object (Self), Internal_Cb'Address, Users.Build (To_Address (Func), Data)); 466 end if; 467 end Selected_Foreach; 468 469 end Selected_Foreach_User_Data; 470 471 ---------------------------------- 472 -- Set_Activate_On_Single_Click -- 473 ---------------------------------- 474 475 procedure Set_Activate_On_Single_Click 476 (Self : not null access Gtk_Flow_Box_Record; 477 Single : Boolean) 478 is 479 procedure Internal (Self : System.Address; Single : Glib.Gboolean); 480 pragma Import (C, Internal, "gtk_flow_box_set_activate_on_single_click"); 481 begin 482 Internal (Get_Object (Self), Boolean'Pos (Single)); 483 end Set_Activate_On_Single_Click; 484 485 ------------------------ 486 -- Set_Column_Spacing -- 487 ------------------------ 488 489 procedure Set_Column_Spacing 490 (Self : not null access Gtk_Flow_Box_Record; 491 Spacing : Guint) 492 is 493 procedure Internal (Self : System.Address; Spacing : Guint); 494 pragma Import (C, Internal, "gtk_flow_box_set_column_spacing"); 495 begin 496 Internal (Get_Object (Self), Spacing); 497 end Set_Column_Spacing; 498 499 --------------------- 500 -- Set_Filter_Func -- 501 --------------------- 502 503 procedure Set_Filter_Func 504 (Self : not null access Gtk_Flow_Box_Record; 505 Filter_Func : Gtk_Flow_Box_Filter_Func) 506 is 507 begin 508 if Filter_Func = null then 509 C_Gtk_Flow_Box_Set_Filter_Func (Get_Object (Self), System.Null_Address, System.Null_Address, System.Null_Address); 510 else 511 C_Gtk_Flow_Box_Set_Filter_Func (Get_Object (Self), Internal_Gtk_Flow_Box_Filter_Func'Address, To_Address (Filter_Func), System.Null_Address); 512 end if; 513 end Set_Filter_Func; 514 515 package body Set_Filter_Func_User_Data is 516 517 package Users is new Glib.Object.User_Data_Closure 518 (User_Data_Type, Destroy); 519 520 function To_Gtk_Flow_Box_Filter_Func is new Ada.Unchecked_Conversion 521 (System.Address, Gtk_Flow_Box_Filter_Func); 522 523 function To_Address is new Ada.Unchecked_Conversion 524 (Gtk_Flow_Box_Filter_Func, System.Address); 525 526 function Internal_Cb 527 (Child : System.Address; 528 User_Data : System.Address) return Glib.Gboolean; 529 pragma Convention (C, Internal_Cb); 530 -- A function that will be called whenrever a child changes or is 531 -- added. It lets you control if the child should be visible or not. 532 -- Since: gtk+ 3.12 533 -- "child": a Gtk.Flow_Box_Child.Gtk_Flow_Box_Child that may be 534 -- filtered 535 -- "user_data": user data 536 537 ----------------- 538 -- Internal_Cb -- 539 ----------------- 540 541 function Internal_Cb 542 (Child : System.Address; 543 User_Data : System.Address) return Glib.Gboolean 544 is 545 D : constant Users.Internal_Data_Access := Users.Convert (User_Data); 546 Stub_Gtk_Flow_Box_Child : Gtk.Flow_Box_Child.Gtk_Flow_Box_Child_Record; 547 begin 548 return Boolean'Pos (To_Gtk_Flow_Box_Filter_Func (D.Func) (Gtk.Flow_Box_Child.Gtk_Flow_Box_Child (Get_User_Data (Child, Stub_Gtk_Flow_Box_Child)), D.Data.all)); 549 end Internal_Cb; 550 551 --------------------- 552 -- Set_Filter_Func -- 553 --------------------- 554 555 procedure Set_Filter_Func 556 (Self : not null access Gtk.Flow_Box.Gtk_Flow_Box_Record'Class; 557 Filter_Func : Gtk_Flow_Box_Filter_Func; 558 User_Data : User_Data_Type) 559 is 560 begin 561 if Filter_Func = null then 562 C_Gtk_Flow_Box_Set_Filter_Func (Get_Object (Self), System.Null_Address, System.Null_Address, Users.Free_Data'Address); 563 else 564 C_Gtk_Flow_Box_Set_Filter_Func (Get_Object (Self), Internal_Cb'Address, Users.Build (To_Address (Filter_Func), User_Data), Users.Free_Data'Address); 565 end if; 566 end Set_Filter_Func; 567 568 end Set_Filter_Func_User_Data; 569 570 --------------------- 571 -- Set_Hadjustment -- 572 --------------------- 573 574 procedure Set_Hadjustment 575 (Self : not null access Gtk_Flow_Box_Record; 576 Adjustment : not null access Gtk.Adjustment.Gtk_Adjustment_Record'Class) 577 is 578 procedure Internal 579 (Self : System.Address; 580 Adjustment : System.Address); 581 pragma Import (C, Internal, "gtk_flow_box_set_hadjustment"); 582 begin 583 Internal (Get_Object (Self), Get_Object (Adjustment)); 584 end Set_Hadjustment; 585 586 --------------------- 587 -- Set_Homogeneous -- 588 --------------------- 589 590 procedure Set_Homogeneous 591 (Self : not null access Gtk_Flow_Box_Record; 592 Homogeneous : Boolean) 593 is 594 procedure Internal 595 (Self : System.Address; 596 Homogeneous : Glib.Gboolean); 597 pragma Import (C, Internal, "gtk_flow_box_set_homogeneous"); 598 begin 599 Internal (Get_Object (Self), Boolean'Pos (Homogeneous)); 600 end Set_Homogeneous; 601 602 ------------------------------- 603 -- Set_Max_Children_Per_Line -- 604 ------------------------------- 605 606 procedure Set_Max_Children_Per_Line 607 (Self : not null access Gtk_Flow_Box_Record; 608 N_Children : Guint) 609 is 610 procedure Internal (Self : System.Address; N_Children : Guint); 611 pragma Import (C, Internal, "gtk_flow_box_set_max_children_per_line"); 612 begin 613 Internal (Get_Object (Self), N_Children); 614 end Set_Max_Children_Per_Line; 615 616 ------------------------------- 617 -- Set_Min_Children_Per_Line -- 618 ------------------------------- 619 620 procedure Set_Min_Children_Per_Line 621 (Self : not null access Gtk_Flow_Box_Record; 622 N_Children : Guint) 623 is 624 procedure Internal (Self : System.Address; N_Children : Guint); 625 pragma Import (C, Internal, "gtk_flow_box_set_min_children_per_line"); 626 begin 627 Internal (Get_Object (Self), N_Children); 628 end Set_Min_Children_Per_Line; 629 630 --------------------- 631 -- Set_Row_Spacing -- 632 --------------------- 633 634 procedure Set_Row_Spacing 635 (Self : not null access Gtk_Flow_Box_Record; 636 Spacing : Guint) 637 is 638 procedure Internal (Self : System.Address; Spacing : Guint); 639 pragma Import (C, Internal, "gtk_flow_box_set_row_spacing"); 640 begin 641 Internal (Get_Object (Self), Spacing); 642 end Set_Row_Spacing; 643 644 ------------------------ 645 -- Set_Selection_Mode -- 646 ------------------------ 647 648 procedure Set_Selection_Mode 649 (Self : not null access Gtk_Flow_Box_Record; 650 Mode : Gtk.Enums.Gtk_Selection_Mode) 651 is 652 procedure Internal 653 (Self : System.Address; 654 Mode : Gtk.Enums.Gtk_Selection_Mode); 655 pragma Import (C, Internal, "gtk_flow_box_set_selection_mode"); 656 begin 657 Internal (Get_Object (Self), Mode); 658 end Set_Selection_Mode; 659 660 ------------------- 661 -- Set_Sort_Func -- 662 ------------------- 663 664 procedure Set_Sort_Func 665 (Self : not null access Gtk_Flow_Box_Record; 666 Sort_Func : Gtk_Flow_Box_Sort_Func) 667 is 668 begin 669 if Sort_Func = null then 670 C_Gtk_Flow_Box_Set_Sort_Func (Get_Object (Self), System.Null_Address, System.Null_Address, System.Null_Address); 671 else 672 C_Gtk_Flow_Box_Set_Sort_Func (Get_Object (Self), Internal_Gtk_Flow_Box_Sort_Func'Address, To_Address (Sort_Func), System.Null_Address); 673 end if; 674 end Set_Sort_Func; 675 676 package body Set_Sort_Func_User_Data is 677 678 package Users is new Glib.Object.User_Data_Closure 679 (User_Data_Type, Destroy); 680 681 function To_Gtk_Flow_Box_Sort_Func is new Ada.Unchecked_Conversion 682 (System.Address, Gtk_Flow_Box_Sort_Func); 683 684 function To_Address is new Ada.Unchecked_Conversion 685 (Gtk_Flow_Box_Sort_Func, System.Address); 686 687 function Internal_Cb 688 (Child1 : System.Address; 689 Child2 : System.Address; 690 User_Data : System.Address) return Gint; 691 pragma Convention (C, Internal_Cb); 692 -- A function to compare two children to determine which should come 693 -- first. 694 -- Since: gtk+ 3.12 695 -- "child1": the first child 696 -- "child2": the second child 697 -- "user_data": user data 698 699 ----------------- 700 -- Internal_Cb -- 701 ----------------- 702 703 function Internal_Cb 704 (Child1 : System.Address; 705 Child2 : System.Address; 706 User_Data : System.Address) return Gint 707 is 708 D : constant Users.Internal_Data_Access := Users.Convert (User_Data); 709 Stub_Gtk_Flow_Box_Child : Gtk.Flow_Box_Child.Gtk_Flow_Box_Child_Record; 710 begin 711 return To_Gtk_Flow_Box_Sort_Func (D.Func) (Gtk.Flow_Box_Child.Gtk_Flow_Box_Child (Get_User_Data (Child1, Stub_Gtk_Flow_Box_Child)), Gtk.Flow_Box_Child.Gtk_Flow_Box_Child (Get_User_Data (Child2, Stub_Gtk_Flow_Box_Child)), D.Data.all); 712 end Internal_Cb; 713 714 ------------------- 715 -- Set_Sort_Func -- 716 ------------------- 717 718 procedure Set_Sort_Func 719 (Self : not null access Gtk.Flow_Box.Gtk_Flow_Box_Record'Class; 720 Sort_Func : Gtk_Flow_Box_Sort_Func; 721 User_Data : User_Data_Type) 722 is 723 begin 724 if Sort_Func = null then 725 C_Gtk_Flow_Box_Set_Sort_Func (Get_Object (Self), System.Null_Address, System.Null_Address, Users.Free_Data'Address); 726 else 727 C_Gtk_Flow_Box_Set_Sort_Func (Get_Object (Self), Internal_Cb'Address, Users.Build (To_Address (Sort_Func), User_Data), Users.Free_Data'Address); 728 end if; 729 end Set_Sort_Func; 730 731 end Set_Sort_Func_User_Data; 732 733 --------------------- 734 -- Set_Vadjustment -- 735 --------------------- 736 737 procedure Set_Vadjustment 738 (Self : not null access Gtk_Flow_Box_Record; 739 Adjustment : not null access Gtk.Adjustment.Gtk_Adjustment_Record'Class) 740 is 741 procedure Internal 742 (Self : System.Address; 743 Adjustment : System.Address); 744 pragma Import (C, Internal, "gtk_flow_box_set_vadjustment"); 745 begin 746 Internal (Get_Object (Self), Get_Object (Adjustment)); 747 end Set_Vadjustment; 748 749 ------------------ 750 -- Unselect_All -- 751 ------------------ 752 753 procedure Unselect_All (Self : not null access Gtk_Flow_Box_Record) is 754 procedure Internal (Self : System.Address); 755 pragma Import (C, Internal, "gtk_flow_box_unselect_all"); 756 begin 757 Internal (Get_Object (Self)); 758 end Unselect_All; 759 760 -------------------- 761 -- Unselect_Child -- 762 -------------------- 763 764 procedure Unselect_Child 765 (Self : not null access Gtk_Flow_Box_Record; 766 Child : not null access Gtk.Flow_Box_Child.Gtk_Flow_Box_Child_Record'Class) 767 is 768 procedure Internal (Self : System.Address; Child : System.Address); 769 pragma Import (C, Internal, "gtk_flow_box_unselect_child"); 770 begin 771 Internal (Get_Object (Self), Get_Object (Child)); 772 end Unselect_Child; 773 774 --------------------- 775 -- Get_Orientation -- 776 --------------------- 777 778 function Get_Orientation 779 (Self : not null access Gtk_Flow_Box_Record) 780 return Gtk.Enums.Gtk_Orientation 781 is 782 function Internal 783 (Self : System.Address) return Gtk.Enums.Gtk_Orientation; 784 pragma Import (C, Internal, "gtk_orientable_get_orientation"); 785 begin 786 return Internal (Get_Object (Self)); 787 end Get_Orientation; 788 789 --------------------- 790 -- Set_Orientation -- 791 --------------------- 792 793 procedure Set_Orientation 794 (Self : not null access Gtk_Flow_Box_Record; 795 Orientation : Gtk.Enums.Gtk_Orientation) 796 is 797 procedure Internal 798 (Self : System.Address; 799 Orientation : Gtk.Enums.Gtk_Orientation); 800 pragma Import (C, Internal, "gtk_orientable_set_orientation"); 801 begin 802 Internal (Get_Object (Self), Orientation); 803 end Set_Orientation; 804 805 use type System.Address; 806 807 function Cb_To_Address is new Ada.Unchecked_Conversion 808 (Cb_Gtk_Flow_Box_Void, System.Address); 809 function Address_To_Cb is new Ada.Unchecked_Conversion 810 (System.Address, Cb_Gtk_Flow_Box_Void); 811 812 function Cb_To_Address is new Ada.Unchecked_Conversion 813 (Cb_GObject_Void, System.Address); 814 function Address_To_Cb is new Ada.Unchecked_Conversion 815 (System.Address, Cb_GObject_Void); 816 817 function Cb_To_Address is new Ada.Unchecked_Conversion 818 (Cb_Gtk_Flow_Box_Gtk_Flow_Box_Child_Void, System.Address); 819 function Address_To_Cb is new Ada.Unchecked_Conversion 820 (System.Address, Cb_Gtk_Flow_Box_Gtk_Flow_Box_Child_Void); 821 822 function Cb_To_Address is new Ada.Unchecked_Conversion 823 (Cb_GObject_Gtk_Flow_Box_Child_Void, System.Address); 824 function Address_To_Cb is new Ada.Unchecked_Conversion 825 (System.Address, Cb_GObject_Gtk_Flow_Box_Child_Void); 826 827 function Cb_To_Address is new Ada.Unchecked_Conversion 828 (Cb_Gtk_Flow_Box_Gtk_Movement_Step_Gint_Void, System.Address); 829 function Address_To_Cb is new Ada.Unchecked_Conversion 830 (System.Address, Cb_Gtk_Flow_Box_Gtk_Movement_Step_Gint_Void); 831 832 function Cb_To_Address is new Ada.Unchecked_Conversion 833 (Cb_GObject_Gtk_Movement_Step_Gint_Void, System.Address); 834 function Address_To_Cb is new Ada.Unchecked_Conversion 835 (System.Address, Cb_GObject_Gtk_Movement_Step_Gint_Void); 836 837 procedure Connect 838 (Object : access Gtk_Flow_Box_Record'Class; 839 C_Name : Glib.Signal_Name; 840 Handler : Cb_Gtk_Flow_Box_Void; 841 After : Boolean); 842 843 procedure Connect 844 (Object : access Gtk_Flow_Box_Record'Class; 845 C_Name : Glib.Signal_Name; 846 Handler : Cb_Gtk_Flow_Box_Gtk_Flow_Box_Child_Void; 847 After : Boolean); 848 849 procedure Connect 850 (Object : access Gtk_Flow_Box_Record'Class; 851 C_Name : Glib.Signal_Name; 852 Handler : Cb_Gtk_Flow_Box_Gtk_Movement_Step_Gint_Void; 853 After : Boolean); 854 855 procedure Connect_Slot 856 (Object : access Gtk_Flow_Box_Record'Class; 857 C_Name : Glib.Signal_Name; 858 Handler : Cb_GObject_Void; 859 After : Boolean; 860 Slot : access Glib.Object.GObject_Record'Class := null); 861 862 procedure Connect_Slot 863 (Object : access Gtk_Flow_Box_Record'Class; 864 C_Name : Glib.Signal_Name; 865 Handler : Cb_GObject_Gtk_Flow_Box_Child_Void; 866 After : Boolean; 867 Slot : access Glib.Object.GObject_Record'Class := null); 868 869 procedure Connect_Slot 870 (Object : access Gtk_Flow_Box_Record'Class; 871 C_Name : Glib.Signal_Name; 872 Handler : Cb_GObject_Gtk_Movement_Step_Gint_Void; 873 After : Boolean; 874 Slot : access Glib.Object.GObject_Record'Class := null); 875 876 procedure Marsh_GObject_Gtk_Flow_Box_Child_Void 877 (Closure : GClosure; 878 Return_Value : Glib.Values.GValue; 879 N_Params : Glib.Guint; 880 Params : Glib.Values.C_GValues; 881 Invocation_Hint : System.Address; 882 User_Data : System.Address); 883 pragma Convention (C, Marsh_GObject_Gtk_Flow_Box_Child_Void); 884 885 procedure Marsh_GObject_Gtk_Movement_Step_Gint_Void 886 (Closure : GClosure; 887 Return_Value : Glib.Values.GValue; 888 N_Params : Glib.Guint; 889 Params : Glib.Values.C_GValues; 890 Invocation_Hint : System.Address; 891 User_Data : System.Address); 892 pragma Convention (C, Marsh_GObject_Gtk_Movement_Step_Gint_Void); 893 894 procedure Marsh_GObject_Void 895 (Closure : GClosure; 896 Return_Value : Glib.Values.GValue; 897 N_Params : Glib.Guint; 898 Params : Glib.Values.C_GValues; 899 Invocation_Hint : System.Address; 900 User_Data : System.Address); 901 pragma Convention (C, Marsh_GObject_Void); 902 903 procedure Marsh_Gtk_Flow_Box_Gtk_Flow_Box_Child_Void 904 (Closure : GClosure; 905 Return_Value : Glib.Values.GValue; 906 N_Params : Glib.Guint; 907 Params : Glib.Values.C_GValues; 908 Invocation_Hint : System.Address; 909 User_Data : System.Address); 910 pragma Convention (C, Marsh_Gtk_Flow_Box_Gtk_Flow_Box_Child_Void); 911 912 procedure Marsh_Gtk_Flow_Box_Gtk_Movement_Step_Gint_Void 913 (Closure : GClosure; 914 Return_Value : Glib.Values.GValue; 915 N_Params : Glib.Guint; 916 Params : Glib.Values.C_GValues; 917 Invocation_Hint : System.Address; 918 User_Data : System.Address); 919 pragma Convention (C, Marsh_Gtk_Flow_Box_Gtk_Movement_Step_Gint_Void); 920 921 procedure Marsh_Gtk_Flow_Box_Void 922 (Closure : GClosure; 923 Return_Value : Glib.Values.GValue; 924 N_Params : Glib.Guint; 925 Params : Glib.Values.C_GValues; 926 Invocation_Hint : System.Address; 927 User_Data : System.Address); 928 pragma Convention (C, Marsh_Gtk_Flow_Box_Void); 929 930 ------------- 931 -- Connect -- 932 ------------- 933 934 procedure Connect 935 (Object : access Gtk_Flow_Box_Record'Class; 936 C_Name : Glib.Signal_Name; 937 Handler : Cb_Gtk_Flow_Box_Void; 938 After : Boolean) 939 is 940 begin 941 Unchecked_Do_Signal_Connect 942 (Object => Object, 943 C_Name => C_Name, 944 Marshaller => Marsh_Gtk_Flow_Box_Void'Access, 945 Handler => Cb_To_Address (Handler),-- Set in the closure 946 After => After); 947 end Connect; 948 949 ------------- 950 -- Connect -- 951 ------------- 952 953 procedure Connect 954 (Object : access Gtk_Flow_Box_Record'Class; 955 C_Name : Glib.Signal_Name; 956 Handler : Cb_Gtk_Flow_Box_Gtk_Flow_Box_Child_Void; 957 After : Boolean) 958 is 959 begin 960 Unchecked_Do_Signal_Connect 961 (Object => Object, 962 C_Name => C_Name, 963 Marshaller => Marsh_Gtk_Flow_Box_Gtk_Flow_Box_Child_Void'Access, 964 Handler => Cb_To_Address (Handler),-- Set in the closure 965 After => After); 966 end Connect; 967 968 ------------- 969 -- Connect -- 970 ------------- 971 972 procedure Connect 973 (Object : access Gtk_Flow_Box_Record'Class; 974 C_Name : Glib.Signal_Name; 975 Handler : Cb_Gtk_Flow_Box_Gtk_Movement_Step_Gint_Void; 976 After : Boolean) 977 is 978 begin 979 Unchecked_Do_Signal_Connect 980 (Object => Object, 981 C_Name => C_Name, 982 Marshaller => Marsh_Gtk_Flow_Box_Gtk_Movement_Step_Gint_Void'Access, 983 Handler => Cb_To_Address (Handler),-- Set in the closure 984 After => After); 985 end Connect; 986 987 ------------------ 988 -- Connect_Slot -- 989 ------------------ 990 991 procedure Connect_Slot 992 (Object : access Gtk_Flow_Box_Record'Class; 993 C_Name : Glib.Signal_Name; 994 Handler : Cb_GObject_Void; 995 After : Boolean; 996 Slot : access Glib.Object.GObject_Record'Class := null) 997 is 998 begin 999 Unchecked_Do_Signal_Connect 1000 (Object => Object, 1001 C_Name => C_Name, 1002 Marshaller => Marsh_GObject_Void'Access, 1003 Handler => Cb_To_Address (Handler),-- Set in the closure 1004 Slot_Object => Slot, 1005 After => After); 1006 end Connect_Slot; 1007 1008 ------------------ 1009 -- Connect_Slot -- 1010 ------------------ 1011 1012 procedure Connect_Slot 1013 (Object : access Gtk_Flow_Box_Record'Class; 1014 C_Name : Glib.Signal_Name; 1015 Handler : Cb_GObject_Gtk_Flow_Box_Child_Void; 1016 After : Boolean; 1017 Slot : access Glib.Object.GObject_Record'Class := null) 1018 is 1019 begin 1020 Unchecked_Do_Signal_Connect 1021 (Object => Object, 1022 C_Name => C_Name, 1023 Marshaller => Marsh_GObject_Gtk_Flow_Box_Child_Void'Access, 1024 Handler => Cb_To_Address (Handler),-- Set in the closure 1025 Slot_Object => Slot, 1026 After => After); 1027 end Connect_Slot; 1028 1029 ------------------ 1030 -- Connect_Slot -- 1031 ------------------ 1032 1033 procedure Connect_Slot 1034 (Object : access Gtk_Flow_Box_Record'Class; 1035 C_Name : Glib.Signal_Name; 1036 Handler : Cb_GObject_Gtk_Movement_Step_Gint_Void; 1037 After : Boolean; 1038 Slot : access Glib.Object.GObject_Record'Class := null) 1039 is 1040 begin 1041 Unchecked_Do_Signal_Connect 1042 (Object => Object, 1043 C_Name => C_Name, 1044 Marshaller => Marsh_GObject_Gtk_Movement_Step_Gint_Void'Access, 1045 Handler => Cb_To_Address (Handler),-- Set in the closure 1046 Slot_Object => Slot, 1047 After => After); 1048 end Connect_Slot; 1049 1050 ------------------------------------------- 1051 -- Marsh_GObject_Gtk_Flow_Box_Child_Void -- 1052 ------------------------------------------- 1053 1054 procedure Marsh_GObject_Gtk_Flow_Box_Child_Void 1055 (Closure : GClosure; 1056 Return_Value : Glib.Values.GValue; 1057 N_Params : Glib.Guint; 1058 Params : Glib.Values.C_GValues; 1059 Invocation_Hint : System.Address; 1060 User_Data : System.Address) 1061 is 1062 pragma Unreferenced (Return_Value, N_Params, Invocation_Hint, User_Data); 1063 H : constant Cb_GObject_Gtk_Flow_Box_Child_Void := Address_To_Cb (Get_Callback (Closure)); 1064 Obj : constant Glib.Object.GObject := Glib.Object.Convert (Get_Data (Closure)); 1065 begin 1066 H (Obj, Gtk.Flow_Box_Child.Gtk_Flow_Box_Child (Unchecked_To_Object (Params, 1))); 1067 exception when E : others => Process_Exception (E); 1068 end Marsh_GObject_Gtk_Flow_Box_Child_Void; 1069 1070 ----------------------------------------------- 1071 -- Marsh_GObject_Gtk_Movement_Step_Gint_Void -- 1072 ----------------------------------------------- 1073 1074 procedure Marsh_GObject_Gtk_Movement_Step_Gint_Void 1075 (Closure : GClosure; 1076 Return_Value : Glib.Values.GValue; 1077 N_Params : Glib.Guint; 1078 Params : Glib.Values.C_GValues; 1079 Invocation_Hint : System.Address; 1080 User_Data : System.Address) 1081 is 1082 pragma Unreferenced (Return_Value, N_Params, Invocation_Hint, User_Data); 1083 H : constant Cb_GObject_Gtk_Movement_Step_Gint_Void := Address_To_Cb (Get_Callback (Closure)); 1084 Obj : constant Glib.Object.GObject := Glib.Object.Convert (Get_Data (Closure)); 1085 begin 1086 H (Obj, Unchecked_To_Gtk_Movement_Step (Params, 1), Unchecked_To_Gint (Params, 2)); 1087 exception when E : others => Process_Exception (E); 1088 end Marsh_GObject_Gtk_Movement_Step_Gint_Void; 1089 1090 ------------------------ 1091 -- Marsh_GObject_Void -- 1092 ------------------------ 1093 1094 procedure Marsh_GObject_Void 1095 (Closure : GClosure; 1096 Return_Value : Glib.Values.GValue; 1097 N_Params : Glib.Guint; 1098 Params : Glib.Values.C_GValues; 1099 Invocation_Hint : System.Address; 1100 User_Data : System.Address) 1101 is 1102 pragma Unreferenced (Return_Value, N_Params, Params, Invocation_Hint, User_Data); 1103 H : constant Cb_GObject_Void := Address_To_Cb (Get_Callback (Closure)); 1104 Obj : constant Glib.Object.GObject := Glib.Object.Convert (Get_Data (Closure)); 1105 begin 1106 H (Obj); 1107 exception when E : others => Process_Exception (E); 1108 end Marsh_GObject_Void; 1109 1110 ------------------------------------------------ 1111 -- Marsh_Gtk_Flow_Box_Gtk_Flow_Box_Child_Void -- 1112 ------------------------------------------------ 1113 1114 procedure Marsh_Gtk_Flow_Box_Gtk_Flow_Box_Child_Void 1115 (Closure : GClosure; 1116 Return_Value : Glib.Values.GValue; 1117 N_Params : Glib.Guint; 1118 Params : Glib.Values.C_GValues; 1119 Invocation_Hint : System.Address; 1120 User_Data : System.Address) 1121 is 1122 pragma Unreferenced (Return_Value, N_Params, Invocation_Hint, User_Data); 1123 H : constant Cb_Gtk_Flow_Box_Gtk_Flow_Box_Child_Void := Address_To_Cb (Get_Callback (Closure)); 1124 Obj : constant Gtk_Flow_Box := Gtk_Flow_Box (Unchecked_To_Object (Params, 0)); 1125 begin 1126 H (Obj, Gtk.Flow_Box_Child.Gtk_Flow_Box_Child (Unchecked_To_Object (Params, 1))); 1127 exception when E : others => Process_Exception (E); 1128 end Marsh_Gtk_Flow_Box_Gtk_Flow_Box_Child_Void; 1129 1130 ---------------------------------------------------- 1131 -- Marsh_Gtk_Flow_Box_Gtk_Movement_Step_Gint_Void -- 1132 ---------------------------------------------------- 1133 1134 procedure Marsh_Gtk_Flow_Box_Gtk_Movement_Step_Gint_Void 1135 (Closure : GClosure; 1136 Return_Value : Glib.Values.GValue; 1137 N_Params : Glib.Guint; 1138 Params : Glib.Values.C_GValues; 1139 Invocation_Hint : System.Address; 1140 User_Data : System.Address) 1141 is 1142 pragma Unreferenced (Return_Value, N_Params, Invocation_Hint, User_Data); 1143 H : constant Cb_Gtk_Flow_Box_Gtk_Movement_Step_Gint_Void := Address_To_Cb (Get_Callback (Closure)); 1144 Obj : constant Gtk_Flow_Box := Gtk_Flow_Box (Unchecked_To_Object (Params, 0)); 1145 begin 1146 H (Obj, Unchecked_To_Gtk_Movement_Step (Params, 1), Unchecked_To_Gint (Params, 2)); 1147 exception when E : others => Process_Exception (E); 1148 end Marsh_Gtk_Flow_Box_Gtk_Movement_Step_Gint_Void; 1149 1150 ----------------------------- 1151 -- Marsh_Gtk_Flow_Box_Void -- 1152 ----------------------------- 1153 1154 procedure Marsh_Gtk_Flow_Box_Void 1155 (Closure : GClosure; 1156 Return_Value : Glib.Values.GValue; 1157 N_Params : Glib.Guint; 1158 Params : Glib.Values.C_GValues; 1159 Invocation_Hint : System.Address; 1160 User_Data : System.Address) 1161 is 1162 pragma Unreferenced (Return_Value, N_Params, Invocation_Hint, User_Data); 1163 H : constant Cb_Gtk_Flow_Box_Void := Address_To_Cb (Get_Callback (Closure)); 1164 Obj : constant Gtk_Flow_Box := Gtk_Flow_Box (Unchecked_To_Object (Params, 0)); 1165 begin 1166 H (Obj); 1167 exception when E : others => Process_Exception (E); 1168 end Marsh_Gtk_Flow_Box_Void; 1169 1170 ------------------------------ 1171 -- On_Activate_Cursor_Child -- 1172 ------------------------------ 1173 1174 procedure On_Activate_Cursor_Child 1175 (Self : not null access Gtk_Flow_Box_Record; 1176 Call : Cb_Gtk_Flow_Box_Void; 1177 After : Boolean := False) 1178 is 1179 begin 1180 Connect (Self, "activate-cursor-child" & ASCII.NUL, Call, After); 1181 end On_Activate_Cursor_Child; 1182 1183 ------------------------------ 1184 -- On_Activate_Cursor_Child -- 1185 ------------------------------ 1186 1187 procedure On_Activate_Cursor_Child 1188 (Self : not null access Gtk_Flow_Box_Record; 1189 Call : Cb_GObject_Void; 1190 Slot : not null access Glib.Object.GObject_Record'Class; 1191 After : Boolean := False) 1192 is 1193 begin 1194 Connect_Slot (Self, "activate-cursor-child" & ASCII.NUL, Call, After, Slot); 1195 end On_Activate_Cursor_Child; 1196 1197 ------------------------ 1198 -- On_Child_Activated -- 1199 ------------------------ 1200 1201 procedure On_Child_Activated 1202 (Self : not null access Gtk_Flow_Box_Record; 1203 Call : Cb_Gtk_Flow_Box_Gtk_Flow_Box_Child_Void; 1204 After : Boolean := False) 1205 is 1206 begin 1207 Connect (Self, "child-activated" & ASCII.NUL, Call, After); 1208 end On_Child_Activated; 1209 1210 ------------------------ 1211 -- On_Child_Activated -- 1212 ------------------------ 1213 1214 procedure On_Child_Activated 1215 (Self : not null access Gtk_Flow_Box_Record; 1216 Call : Cb_GObject_Gtk_Flow_Box_Child_Void; 1217 Slot : not null access Glib.Object.GObject_Record'Class; 1218 After : Boolean := False) 1219 is 1220 begin 1221 Connect_Slot (Self, "child-activated" & ASCII.NUL, Call, After, Slot); 1222 end On_Child_Activated; 1223 1224 -------------------- 1225 -- On_Move_Cursor -- 1226 -------------------- 1227 1228 procedure On_Move_Cursor 1229 (Self : not null access Gtk_Flow_Box_Record; 1230 Call : Cb_Gtk_Flow_Box_Gtk_Movement_Step_Gint_Void; 1231 After : Boolean := False) 1232 is 1233 begin 1234 Connect (Self, "move-cursor" & ASCII.NUL, Call, After); 1235 end On_Move_Cursor; 1236 1237 -------------------- 1238 -- On_Move_Cursor -- 1239 -------------------- 1240 1241 procedure On_Move_Cursor 1242 (Self : not null access Gtk_Flow_Box_Record; 1243 Call : Cb_GObject_Gtk_Movement_Step_Gint_Void; 1244 Slot : not null access Glib.Object.GObject_Record'Class; 1245 After : Boolean := False) 1246 is 1247 begin 1248 Connect_Slot (Self, "move-cursor" & ASCII.NUL, Call, After, Slot); 1249 end On_Move_Cursor; 1250 1251 ------------------- 1252 -- On_Select_All -- 1253 ------------------- 1254 1255 procedure On_Select_All 1256 (Self : not null access Gtk_Flow_Box_Record; 1257 Call : Cb_Gtk_Flow_Box_Void; 1258 After : Boolean := False) 1259 is 1260 begin 1261 Connect (Self, "select-all" & ASCII.NUL, Call, After); 1262 end On_Select_All; 1263 1264 ------------------- 1265 -- On_Select_All -- 1266 ------------------- 1267 1268 procedure On_Select_All 1269 (Self : not null access Gtk_Flow_Box_Record; 1270 Call : Cb_GObject_Void; 1271 Slot : not null access Glib.Object.GObject_Record'Class; 1272 After : Boolean := False) 1273 is 1274 begin 1275 Connect_Slot (Self, "select-all" & ASCII.NUL, Call, After, Slot); 1276 end On_Select_All; 1277 1278 ---------------------------------- 1279 -- On_Selected_Children_Changed -- 1280 ---------------------------------- 1281 1282 procedure On_Selected_Children_Changed 1283 (Self : not null access Gtk_Flow_Box_Record; 1284 Call : Cb_Gtk_Flow_Box_Void; 1285 After : Boolean := False) 1286 is 1287 begin 1288 Connect (Self, "selected-children-changed" & ASCII.NUL, Call, After); 1289 end On_Selected_Children_Changed; 1290 1291 ---------------------------------- 1292 -- On_Selected_Children_Changed -- 1293 ---------------------------------- 1294 1295 procedure On_Selected_Children_Changed 1296 (Self : not null access Gtk_Flow_Box_Record; 1297 Call : Cb_GObject_Void; 1298 Slot : not null access Glib.Object.GObject_Record'Class; 1299 After : Boolean := False) 1300 is 1301 begin 1302 Connect_Slot (Self, "selected-children-changed" & ASCII.NUL, Call, After, Slot); 1303 end On_Selected_Children_Changed; 1304 1305 ---------------------------- 1306 -- On_Toggle_Cursor_Child -- 1307 ---------------------------- 1308 1309 procedure On_Toggle_Cursor_Child 1310 (Self : not null access Gtk_Flow_Box_Record; 1311 Call : Cb_Gtk_Flow_Box_Void; 1312 After : Boolean := False) 1313 is 1314 begin 1315 Connect (Self, "toggle-cursor-child" & ASCII.NUL, Call, After); 1316 end On_Toggle_Cursor_Child; 1317 1318 ---------------------------- 1319 -- On_Toggle_Cursor_Child -- 1320 ---------------------------- 1321 1322 procedure On_Toggle_Cursor_Child 1323 (Self : not null access Gtk_Flow_Box_Record; 1324 Call : Cb_GObject_Void; 1325 Slot : not null access Glib.Object.GObject_Record'Class; 1326 After : Boolean := False) 1327 is 1328 begin 1329 Connect_Slot (Self, "toggle-cursor-child" & ASCII.NUL, Call, After, Slot); 1330 end On_Toggle_Cursor_Child; 1331 1332 --------------------- 1333 -- On_Unselect_All -- 1334 --------------------- 1335 1336 procedure On_Unselect_All 1337 (Self : not null access Gtk_Flow_Box_Record; 1338 Call : Cb_Gtk_Flow_Box_Void; 1339 After : Boolean := False) 1340 is 1341 begin 1342 Connect (Self, "unselect-all" & ASCII.NUL, Call, After); 1343 end On_Unselect_All; 1344 1345 --------------------- 1346 -- On_Unselect_All -- 1347 --------------------- 1348 1349 procedure On_Unselect_All 1350 (Self : not null access Gtk_Flow_Box_Record; 1351 Call : Cb_GObject_Void; 1352 Slot : not null access Glib.Object.GObject_Record'Class; 1353 After : Boolean := False) 1354 is 1355 begin 1356 Connect_Slot (Self, "unselect-all" & ASCII.NUL, Call, After, Slot); 1357 end On_Unselect_All; 1358 1359end Gtk.Flow_Box; 1360