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.Gesture is 33 34 function Convert (R : Gtk.Gesture.Gtk_Gesture) return System.Address is 35 begin 36 return Get_Object (R); 37 end Convert; 38 39 function Convert (R : System.Address) return Gtk.Gesture.Gtk_Gesture is 40 Stub : Gtk.Gesture.Gtk_Gesture_Record;begin 41 return Gtk.Gesture.Gtk_Gesture (Glib.Object.Get_User_Data (R, Stub)); 42 end Convert; 43 44 function Convert (R : Gdk.Event.Gdk_Event_Sequence) return System.Address is 45 begin 46 return Glib.To_Address (Glib.C_Proxy (R)); 47 end Convert; 48 49 function Convert (R : System.Address) return Gdk.Event.Gdk_Event_Sequence is 50 begin 51 return Gdk.Event.Gdk_Event_Sequence(Glib.C_Proxy'(Glib.To_Proxy (R))); 52 end Convert; 53 54 package Type_Conversion_Gtk_Gesture is new Glib.Type_Conversion_Hooks.Hook_Registrator 55 (Get_Type'Access, Gtk_Gesture_Record); 56 pragma Unreferenced (Type_Conversion_Gtk_Gesture); 57 58 ---------------------- 59 -- Get_Bounding_Box -- 60 ---------------------- 61 62 function Get_Bounding_Box 63 (Self : not null access Gtk_Gesture_Record; 64 Rect : access Gdk.Rectangle.Gdk_Rectangle) return Boolean 65 is 66 function Internal 67 (Self : System.Address; 68 Acc_Rect : access Gdk.Rectangle.Gdk_Rectangle) 69 return Glib.Gboolean; 70 pragma Import (C, Internal, "gtk_gesture_get_bounding_box"); 71 Acc_Rect : aliased Gdk.Rectangle.Gdk_Rectangle; 72 Tmp_Return : Glib.Gboolean; 73 begin 74 Tmp_Return := Internal (Get_Object (Self), Acc_Rect'Access); 75 Rect.all := Acc_Rect; 76 return Tmp_Return /= 0; 77 end Get_Bounding_Box; 78 79 ----------------------------- 80 -- Get_Bounding_Box_Center -- 81 ----------------------------- 82 83 function Get_Bounding_Box_Center 84 (Self : not null access Gtk_Gesture_Record; 85 X : access Gdouble; 86 Y : access Gdouble) return Boolean 87 is 88 function Internal 89 (Self : System.Address; 90 Acc_X : access Gdouble; 91 Acc_Y : access Gdouble) return Glib.Gboolean; 92 pragma Import (C, Internal, "gtk_gesture_get_bounding_box_center"); 93 Acc_X : aliased Gdouble; 94 Acc_Y : aliased Gdouble; 95 Tmp_Return : Glib.Gboolean; 96 begin 97 Tmp_Return := Internal (Get_Object (Self), Acc_X'Access, Acc_Y'Access); 98 X.all := Acc_X; 99 Y.all := Acc_Y; 100 return Tmp_Return /= 0; 101 end Get_Bounding_Box_Center; 102 103 ---------------- 104 -- Get_Device -- 105 ---------------- 106 107 function Get_Device 108 (Self : not null access Gtk_Gesture_Record) 109 return Gdk.Device.Gdk_Device 110 is 111 function Internal (Self : System.Address) return System.Address; 112 pragma Import (C, Internal, "gtk_gesture_get_device"); 113 Stub_Gdk_Device : Gdk.Device.Gdk_Device_Record; 114 begin 115 return Gdk.Device.Gdk_Device (Get_User_Data (Internal (Get_Object (Self)), Stub_Gdk_Device)); 116 end Get_Device; 117 118 --------------- 119 -- Get_Group -- 120 --------------- 121 122 function Get_Group 123 (Self : not null access Gtk_Gesture_Record) return Gesture_List.Glist 124 is 125 function Internal (Self : System.Address) return System.Address; 126 pragma Import (C, Internal, "gtk_gesture_get_group"); 127 Tmp_Return : Gesture_List.Glist; 128 begin 129 Gtk.Gesture.Gesture_List.Set_Object (Tmp_Return, Internal (Get_Object (Self))); 130 return Tmp_Return; 131 end Get_Group; 132 133 -------------------- 134 -- Get_Last_Event -- 135 -------------------- 136 137 function Get_Last_Event 138 (Self : not null access Gtk_Gesture_Record; 139 Sequence : Gdk.Event.Gdk_Event_Sequence) return Gdk.Event.Gdk_Event 140 is 141 function Internal 142 (Self : System.Address; 143 Sequence : Gdk.Event.Gdk_Event_Sequence) 144 return Gdk.Event.Gdk_Event; 145 pragma Import (C, Internal, "gtk_gesture_get_last_event"); 146 begin 147 return Internal (Get_Object (Self), Sequence); 148 end Get_Last_Event; 149 150 ------------------------------- 151 -- Get_Last_Updated_Sequence -- 152 ------------------------------- 153 154 function Get_Last_Updated_Sequence 155 (Self : not null access Gtk_Gesture_Record) 156 return Gdk.Event.Gdk_Event_Sequence 157 is 158 function Internal 159 (Self : System.Address) return access Gdk.Event.Gdk_Event_Sequence; 160 pragma Import (C, Internal, "gtk_gesture_get_last_updated_sequence"); 161 begin 162 return From_Object_Free (Internal (Get_Object (Self))); 163 end Get_Last_Updated_Sequence; 164 165 --------------- 166 -- Get_Point -- 167 --------------- 168 169 function Get_Point 170 (Self : not null access Gtk_Gesture_Record; 171 Sequence : Gdk.Event.Gdk_Event_Sequence; 172 X : access Gdouble; 173 Y : access Gdouble) return Boolean 174 is 175 function Internal 176 (Self : System.Address; 177 Sequence : Gdk.Event.Gdk_Event_Sequence; 178 Acc_X : access Gdouble; 179 Acc_Y : access Gdouble) return Glib.Gboolean; 180 pragma Import (C, Internal, "gtk_gesture_get_point"); 181 Acc_X : aliased Gdouble; 182 Acc_Y : aliased Gdouble; 183 Tmp_Return : Glib.Gboolean; 184 begin 185 Tmp_Return := Internal (Get_Object (Self), Sequence, Acc_X'Access, Acc_Y'Access); 186 if X /= null then 187 X.all := Acc_X; 188 end if; 189 if Y /= null then 190 Y.all := Acc_Y; 191 end if; 192 return Tmp_Return /= 0; 193 end Get_Point; 194 195 ------------------------ 196 -- Get_Sequence_State -- 197 ------------------------ 198 199 function Get_Sequence_State 200 (Self : not null access Gtk_Gesture_Record; 201 Sequence : Gdk.Event.Gdk_Event_Sequence) 202 return Gtk.Enums.Gtk_Event_Sequence_State 203 is 204 function Internal 205 (Self : System.Address; 206 Sequence : Gdk.Event.Gdk_Event_Sequence) 207 return Gtk.Enums.Gtk_Event_Sequence_State; 208 pragma Import (C, Internal, "gtk_gesture_get_sequence_state"); 209 begin 210 return Internal (Get_Object (Self), Sequence); 211 end Get_Sequence_State; 212 213 ------------------- 214 -- Get_Sequences -- 215 ------------------- 216 217 function Get_Sequences 218 (Self : not null access Gtk_Gesture_Record) 219 return Gdk_Event_Sequence_List.Glist 220 is 221 function Internal (Self : System.Address) return System.Address; 222 pragma Import (C, Internal, "gtk_gesture_get_sequences"); 223 Tmp_Return : Gdk_Event_Sequence_List.Glist; 224 begin 225 Gtk.Gesture.Gdk_Event_Sequence_List.Set_Object (Tmp_Return, Internal (Get_Object (Self))); 226 return Tmp_Return; 227 end Get_Sequences; 228 229 ---------------- 230 -- Get_Window -- 231 ---------------- 232 233 function Get_Window 234 (Self : not null access Gtk_Gesture_Record) return Gdk.Gdk_Window 235 is 236 function Internal (Self : System.Address) return Gdk.Gdk_Window; 237 pragma Import (C, Internal, "gtk_gesture_get_window"); 238 begin 239 return Internal (Get_Object (Self)); 240 end Get_Window; 241 242 ----------- 243 -- Group -- 244 ----------- 245 246 procedure Group 247 (Self : not null access Gtk_Gesture_Record; 248 Gesture : not null access Gtk_Gesture_Record'Class) 249 is 250 procedure Internal (Self : System.Address; Gesture : System.Address); 251 pragma Import (C, Internal, "gtk_gesture_group"); 252 begin 253 Internal (Get_Object (Self), Get_Object (Gesture)); 254 end Group; 255 256 ---------------------- 257 -- Handles_Sequence -- 258 ---------------------- 259 260 function Handles_Sequence 261 (Self : not null access Gtk_Gesture_Record; 262 Sequence : Gdk.Event.Gdk_Event_Sequence) return Boolean 263 is 264 function Internal 265 (Self : System.Address; 266 Sequence : Gdk.Event.Gdk_Event_Sequence) return Glib.Gboolean; 267 pragma Import (C, Internal, "gtk_gesture_handles_sequence"); 268 begin 269 return Internal (Get_Object (Self), Sequence) /= 0; 270 end Handles_Sequence; 271 272 --------------- 273 -- Is_Active -- 274 --------------- 275 276 function Is_Active 277 (Self : not null access Gtk_Gesture_Record) return Boolean 278 is 279 function Internal (Self : System.Address) return Glib.Gboolean; 280 pragma Import (C, Internal, "gtk_gesture_is_active"); 281 begin 282 return Internal (Get_Object (Self)) /= 0; 283 end Is_Active; 284 285 --------------------- 286 -- Is_Grouped_With -- 287 --------------------- 288 289 function Is_Grouped_With 290 (Self : not null access Gtk_Gesture_Record; 291 Other : not null access Gtk_Gesture_Record'Class) return Boolean 292 is 293 function Internal 294 (Self : System.Address; 295 Other : System.Address) return Glib.Gboolean; 296 pragma Import (C, Internal, "gtk_gesture_is_grouped_with"); 297 begin 298 return Internal (Get_Object (Self), Get_Object (Other)) /= 0; 299 end Is_Grouped_With; 300 301 ------------------- 302 -- Is_Recognized -- 303 ------------------- 304 305 function Is_Recognized 306 (Self : not null access Gtk_Gesture_Record) return Boolean 307 is 308 function Internal (Self : System.Address) return Glib.Gboolean; 309 pragma Import (C, Internal, "gtk_gesture_is_recognized"); 310 begin 311 return Internal (Get_Object (Self)) /= 0; 312 end Is_Recognized; 313 314 ------------------------ 315 -- Set_Sequence_State -- 316 ------------------------ 317 318 function Set_Sequence_State 319 (Self : not null access Gtk_Gesture_Record; 320 Sequence : Gdk.Event.Gdk_Event_Sequence; 321 State : Gtk.Enums.Gtk_Event_Sequence_State) return Boolean 322 is 323 function Internal 324 (Self : System.Address; 325 Sequence : Gdk.Event.Gdk_Event_Sequence; 326 State : Gtk.Enums.Gtk_Event_Sequence_State) 327 return Glib.Gboolean; 328 pragma Import (C, Internal, "gtk_gesture_set_sequence_state"); 329 begin 330 return Internal (Get_Object (Self), Sequence, State) /= 0; 331 end Set_Sequence_State; 332 333 --------------- 334 -- Set_State -- 335 --------------- 336 337 function Set_State 338 (Self : not null access Gtk_Gesture_Record; 339 State : Gtk.Enums.Gtk_Event_Sequence_State) return Boolean 340 is 341 function Internal 342 (Self : System.Address; 343 State : Gtk.Enums.Gtk_Event_Sequence_State) return Glib.Gboolean; 344 pragma Import (C, Internal, "gtk_gesture_set_state"); 345 begin 346 return Internal (Get_Object (Self), State) /= 0; 347 end Set_State; 348 349 ---------------- 350 -- Set_Window -- 351 ---------------- 352 353 procedure Set_Window 354 (Self : not null access Gtk_Gesture_Record; 355 Window : Gdk.Gdk_Window) 356 is 357 procedure Internal (Self : System.Address; Window : Gdk.Gdk_Window); 358 pragma Import (C, Internal, "gtk_gesture_set_window"); 359 begin 360 Internal (Get_Object (Self), Window); 361 end Set_Window; 362 363 ------------- 364 -- Ungroup -- 365 ------------- 366 367 procedure Ungroup (Self : not null access Gtk_Gesture_Record) is 368 procedure Internal (Self : System.Address); 369 pragma Import (C, Internal, "gtk_gesture_ungroup"); 370 begin 371 Internal (Get_Object (Self)); 372 end Ungroup; 373 374 use type System.Address; 375 376 function Cb_To_Address is new Ada.Unchecked_Conversion 377 (Cb_Gtk_Gesture_Gdk_Event_Sequence_Void, System.Address); 378 function Address_To_Cb is new Ada.Unchecked_Conversion 379 (System.Address, Cb_Gtk_Gesture_Gdk_Event_Sequence_Void); 380 381 function Cb_To_Address is new Ada.Unchecked_Conversion 382 (Cb_GObject_Gdk_Event_Sequence_Void, System.Address); 383 function Address_To_Cb is new Ada.Unchecked_Conversion 384 (System.Address, Cb_GObject_Gdk_Event_Sequence_Void); 385 386 function Cb_To_Address is new Ada.Unchecked_Conversion 387 (Cb_Gtk_Gesture_Gdk_Event_Sequence_Gtk_Event_Sequence_State_Void, System.Address); 388 function Address_To_Cb is new Ada.Unchecked_Conversion 389 (System.Address, Cb_Gtk_Gesture_Gdk_Event_Sequence_Gtk_Event_Sequence_State_Void); 390 391 function Cb_To_Address is new Ada.Unchecked_Conversion 392 (Cb_GObject_Gdk_Event_Sequence_Gtk_Event_Sequence_State_Void, System.Address); 393 function Address_To_Cb is new Ada.Unchecked_Conversion 394 (System.Address, Cb_GObject_Gdk_Event_Sequence_Gtk_Event_Sequence_State_Void); 395 396 procedure Connect 397 (Object : access Gtk_Gesture_Record'Class; 398 C_Name : Glib.Signal_Name; 399 Handler : Cb_Gtk_Gesture_Gdk_Event_Sequence_Void; 400 After : Boolean); 401 402 procedure Connect 403 (Object : access Gtk_Gesture_Record'Class; 404 C_Name : Glib.Signal_Name; 405 Handler : Cb_Gtk_Gesture_Gdk_Event_Sequence_Gtk_Event_Sequence_State_Void; 406 After : Boolean); 407 408 procedure Connect_Slot 409 (Object : access Gtk_Gesture_Record'Class; 410 C_Name : Glib.Signal_Name; 411 Handler : Cb_GObject_Gdk_Event_Sequence_Void; 412 After : Boolean; 413 Slot : access Glib.Object.GObject_Record'Class := null); 414 415 procedure Connect_Slot 416 (Object : access Gtk_Gesture_Record'Class; 417 C_Name : Glib.Signal_Name; 418 Handler : Cb_GObject_Gdk_Event_Sequence_Gtk_Event_Sequence_State_Void; 419 After : Boolean; 420 Slot : access Glib.Object.GObject_Record'Class := null); 421 422 procedure Marsh_GObject_Gdk_Event_Sequence_Gtk_Event_Sequence_State_Void 423 (Closure : GClosure; 424 Return_Value : Glib.Values.GValue; 425 N_Params : Glib.Guint; 426 Params : Glib.Values.C_GValues; 427 Invocation_Hint : System.Address; 428 User_Data : System.Address); 429 pragma Convention (C, Marsh_GObject_Gdk_Event_Sequence_Gtk_Event_Sequence_State_Void); 430 431 procedure Marsh_GObject_Gdk_Event_Sequence_Void 432 (Closure : GClosure; 433 Return_Value : Glib.Values.GValue; 434 N_Params : Glib.Guint; 435 Params : Glib.Values.C_GValues; 436 Invocation_Hint : System.Address; 437 User_Data : System.Address); 438 pragma Convention (C, Marsh_GObject_Gdk_Event_Sequence_Void); 439 440 procedure Marsh_Gtk_Gesture_Gdk_Event_Sequence_Gtk_Event_Sequence_State_Void 441 (Closure : GClosure; 442 Return_Value : Glib.Values.GValue; 443 N_Params : Glib.Guint; 444 Params : Glib.Values.C_GValues; 445 Invocation_Hint : System.Address; 446 User_Data : System.Address); 447 pragma Convention (C, Marsh_Gtk_Gesture_Gdk_Event_Sequence_Gtk_Event_Sequence_State_Void); 448 449 procedure Marsh_Gtk_Gesture_Gdk_Event_Sequence_Void 450 (Closure : GClosure; 451 Return_Value : Glib.Values.GValue; 452 N_Params : Glib.Guint; 453 Params : Glib.Values.C_GValues; 454 Invocation_Hint : System.Address; 455 User_Data : System.Address); 456 pragma Convention (C, Marsh_Gtk_Gesture_Gdk_Event_Sequence_Void); 457 458 ------------- 459 -- Connect -- 460 ------------- 461 462 procedure Connect 463 (Object : access Gtk_Gesture_Record'Class; 464 C_Name : Glib.Signal_Name; 465 Handler : Cb_Gtk_Gesture_Gdk_Event_Sequence_Void; 466 After : Boolean) 467 is 468 begin 469 Unchecked_Do_Signal_Connect 470 (Object => Object, 471 C_Name => C_Name, 472 Marshaller => Marsh_Gtk_Gesture_Gdk_Event_Sequence_Void'Access, 473 Handler => Cb_To_Address (Handler),-- Set in the closure 474 After => After); 475 end Connect; 476 477 ------------- 478 -- Connect -- 479 ------------- 480 481 procedure Connect 482 (Object : access Gtk_Gesture_Record'Class; 483 C_Name : Glib.Signal_Name; 484 Handler : Cb_Gtk_Gesture_Gdk_Event_Sequence_Gtk_Event_Sequence_State_Void; 485 After : Boolean) 486 is 487 begin 488 Unchecked_Do_Signal_Connect 489 (Object => Object, 490 C_Name => C_Name, 491 Marshaller => Marsh_Gtk_Gesture_Gdk_Event_Sequence_Gtk_Event_Sequence_State_Void'Access, 492 Handler => Cb_To_Address (Handler),-- Set in the closure 493 After => After); 494 end Connect; 495 496 ------------------ 497 -- Connect_Slot -- 498 ------------------ 499 500 procedure Connect_Slot 501 (Object : access Gtk_Gesture_Record'Class; 502 C_Name : Glib.Signal_Name; 503 Handler : Cb_GObject_Gdk_Event_Sequence_Void; 504 After : Boolean; 505 Slot : access Glib.Object.GObject_Record'Class := null) 506 is 507 begin 508 Unchecked_Do_Signal_Connect 509 (Object => Object, 510 C_Name => C_Name, 511 Marshaller => Marsh_GObject_Gdk_Event_Sequence_Void'Access, 512 Handler => Cb_To_Address (Handler),-- Set in the closure 513 Slot_Object => Slot, 514 After => After); 515 end Connect_Slot; 516 517 ------------------ 518 -- Connect_Slot -- 519 ------------------ 520 521 procedure Connect_Slot 522 (Object : access Gtk_Gesture_Record'Class; 523 C_Name : Glib.Signal_Name; 524 Handler : Cb_GObject_Gdk_Event_Sequence_Gtk_Event_Sequence_State_Void; 525 After : Boolean; 526 Slot : access Glib.Object.GObject_Record'Class := null) 527 is 528 begin 529 Unchecked_Do_Signal_Connect 530 (Object => Object, 531 C_Name => C_Name, 532 Marshaller => Marsh_GObject_Gdk_Event_Sequence_Gtk_Event_Sequence_State_Void'Access, 533 Handler => Cb_To_Address (Handler),-- Set in the closure 534 Slot_Object => Slot, 535 After => After); 536 end Connect_Slot; 537 538 -------------------------------------------------------------------- 539 -- Marsh_GObject_Gdk_Event_Sequence_Gtk_Event_Sequence_State_Void -- 540 -------------------------------------------------------------------- 541 542 procedure Marsh_GObject_Gdk_Event_Sequence_Gtk_Event_Sequence_State_Void 543 (Closure : GClosure; 544 Return_Value : Glib.Values.GValue; 545 N_Params : Glib.Guint; 546 Params : Glib.Values.C_GValues; 547 Invocation_Hint : System.Address; 548 User_Data : System.Address) 549 is 550 pragma Unreferenced (Return_Value, N_Params, Invocation_Hint, User_Data); 551 H : constant Cb_GObject_Gdk_Event_Sequence_Gtk_Event_Sequence_State_Void := Address_To_Cb (Get_Callback (Closure)); 552 Obj : constant Glib.Object.GObject := Glib.Object.Convert (Get_Data (Closure)); 553 begin 554 H (Obj, Unchecked_To_Gdk_Event_Sequence (Params, 1), Unchecked_To_Gtk_Event_Sequence_State (Params, 2)); 555 exception when E : others => Process_Exception (E); 556 end Marsh_GObject_Gdk_Event_Sequence_Gtk_Event_Sequence_State_Void; 557 558 ------------------------------------------- 559 -- Marsh_GObject_Gdk_Event_Sequence_Void -- 560 ------------------------------------------- 561 562 procedure Marsh_GObject_Gdk_Event_Sequence_Void 563 (Closure : GClosure; 564 Return_Value : Glib.Values.GValue; 565 N_Params : Glib.Guint; 566 Params : Glib.Values.C_GValues; 567 Invocation_Hint : System.Address; 568 User_Data : System.Address) 569 is 570 pragma Unreferenced (Return_Value, N_Params, Invocation_Hint, User_Data); 571 H : constant Cb_GObject_Gdk_Event_Sequence_Void := Address_To_Cb (Get_Callback (Closure)); 572 Obj : constant Glib.Object.GObject := Glib.Object.Convert (Get_Data (Closure)); 573 begin 574 H (Obj, Unchecked_To_Gdk_Event_Sequence (Params, 1)); 575 exception when E : others => Process_Exception (E); 576 end Marsh_GObject_Gdk_Event_Sequence_Void; 577 578 ------------------------------------------------------------------------ 579 -- Marsh_Gtk_Gesture_Gdk_Event_Sequence_Gtk_Event_Sequence_State_Void -- 580 ------------------------------------------------------------------------ 581 582 procedure Marsh_Gtk_Gesture_Gdk_Event_Sequence_Gtk_Event_Sequence_State_Void 583 (Closure : GClosure; 584 Return_Value : Glib.Values.GValue; 585 N_Params : Glib.Guint; 586 Params : Glib.Values.C_GValues; 587 Invocation_Hint : System.Address; 588 User_Data : System.Address) 589 is 590 pragma Unreferenced (Return_Value, N_Params, Invocation_Hint, User_Data); 591 H : constant Cb_Gtk_Gesture_Gdk_Event_Sequence_Gtk_Event_Sequence_State_Void := Address_To_Cb (Get_Callback (Closure)); 592 Obj : constant Gtk_Gesture := Gtk_Gesture (Unchecked_To_Object (Params, 0)); 593 begin 594 H (Obj, Unchecked_To_Gdk_Event_Sequence (Params, 1), Unchecked_To_Gtk_Event_Sequence_State (Params, 2)); 595 exception when E : others => Process_Exception (E); 596 end Marsh_Gtk_Gesture_Gdk_Event_Sequence_Gtk_Event_Sequence_State_Void; 597 598 ----------------------------------------------- 599 -- Marsh_Gtk_Gesture_Gdk_Event_Sequence_Void -- 600 ----------------------------------------------- 601 602 procedure Marsh_Gtk_Gesture_Gdk_Event_Sequence_Void 603 (Closure : GClosure; 604 Return_Value : Glib.Values.GValue; 605 N_Params : Glib.Guint; 606 Params : Glib.Values.C_GValues; 607 Invocation_Hint : System.Address; 608 User_Data : System.Address) 609 is 610 pragma Unreferenced (Return_Value, N_Params, Invocation_Hint, User_Data); 611 H : constant Cb_Gtk_Gesture_Gdk_Event_Sequence_Void := Address_To_Cb (Get_Callback (Closure)); 612 Obj : constant Gtk_Gesture := Gtk_Gesture (Unchecked_To_Object (Params, 0)); 613 begin 614 H (Obj, Unchecked_To_Gdk_Event_Sequence (Params, 1)); 615 exception when E : others => Process_Exception (E); 616 end Marsh_Gtk_Gesture_Gdk_Event_Sequence_Void; 617 618 -------------- 619 -- On_Begin -- 620 -------------- 621 622 procedure On_Begin 623 (Self : not null access Gtk_Gesture_Record; 624 Call : Cb_Gtk_Gesture_Gdk_Event_Sequence_Void; 625 After : Boolean := False) 626 is 627 begin 628 Connect (Self, "begin" & ASCII.NUL, Call, After); 629 end On_Begin; 630 631 -------------- 632 -- On_Begin -- 633 -------------- 634 635 procedure On_Begin 636 (Self : not null access Gtk_Gesture_Record; 637 Call : Cb_GObject_Gdk_Event_Sequence_Void; 638 Slot : not null access Glib.Object.GObject_Record'Class; 639 After : Boolean := False) 640 is 641 begin 642 Connect_Slot (Self, "begin" & ASCII.NUL, Call, After, Slot); 643 end On_Begin; 644 645 --------------- 646 -- On_Cancel -- 647 --------------- 648 649 procedure On_Cancel 650 (Self : not null access Gtk_Gesture_Record; 651 Call : Cb_Gtk_Gesture_Gdk_Event_Sequence_Void; 652 After : Boolean := False) 653 is 654 begin 655 Connect (Self, "cancel" & ASCII.NUL, Call, After); 656 end On_Cancel; 657 658 --------------- 659 -- On_Cancel -- 660 --------------- 661 662 procedure On_Cancel 663 (Self : not null access Gtk_Gesture_Record; 664 Call : Cb_GObject_Gdk_Event_Sequence_Void; 665 Slot : not null access Glib.Object.GObject_Record'Class; 666 After : Boolean := False) 667 is 668 begin 669 Connect_Slot (Self, "cancel" & ASCII.NUL, Call, After, Slot); 670 end On_Cancel; 671 672 ------------ 673 -- On_End -- 674 ------------ 675 676 procedure On_End 677 (Self : not null access Gtk_Gesture_Record; 678 Call : Cb_Gtk_Gesture_Gdk_Event_Sequence_Void; 679 After : Boolean := False) 680 is 681 begin 682 Connect (Self, "end" & ASCII.NUL, Call, After); 683 end On_End; 684 685 ------------ 686 -- On_End -- 687 ------------ 688 689 procedure On_End 690 (Self : not null access Gtk_Gesture_Record; 691 Call : Cb_GObject_Gdk_Event_Sequence_Void; 692 Slot : not null access Glib.Object.GObject_Record'Class; 693 After : Boolean := False) 694 is 695 begin 696 Connect_Slot (Self, "end" & ASCII.NUL, Call, After, Slot); 697 end On_End; 698 699 ------------------------------- 700 -- On_Sequence_State_Changed -- 701 ------------------------------- 702 703 procedure On_Sequence_State_Changed 704 (Self : not null access Gtk_Gesture_Record; 705 Call : Cb_Gtk_Gesture_Gdk_Event_Sequence_Gtk_Event_Sequence_State_Void; 706 After : Boolean := False) 707 is 708 begin 709 Connect (Self, "sequence-state-changed" & ASCII.NUL, Call, After); 710 end On_Sequence_State_Changed; 711 712 ------------------------------- 713 -- On_Sequence_State_Changed -- 714 ------------------------------- 715 716 procedure On_Sequence_State_Changed 717 (Self : not null access Gtk_Gesture_Record; 718 Call : Cb_GObject_Gdk_Event_Sequence_Gtk_Event_Sequence_State_Void; 719 Slot : not null access Glib.Object.GObject_Record'Class; 720 After : Boolean := False) 721 is 722 begin 723 Connect_Slot (Self, "sequence-state-changed" & ASCII.NUL, Call, After, Slot); 724 end On_Sequence_State_Changed; 725 726 --------------- 727 -- On_Update -- 728 --------------- 729 730 procedure On_Update 731 (Self : not null access Gtk_Gesture_Record; 732 Call : Cb_Gtk_Gesture_Gdk_Event_Sequence_Void; 733 After : Boolean := False) 734 is 735 begin 736 Connect (Self, "update" & ASCII.NUL, Call, After); 737 end On_Update; 738 739 --------------- 740 -- On_Update -- 741 --------------- 742 743 procedure On_Update 744 (Self : not null access Gtk_Gesture_Record; 745 Call : Cb_GObject_Gdk_Event_Sequence_Void; 746 Slot : not null access Glib.Object.GObject_Record'Class; 747 After : Boolean := False) 748 is 749 begin 750 Connect_Slot (Self, "update" & ASCII.NUL, Call, After, Slot); 751 end On_Update; 752 753end Gtk.Gesture; 754