1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916
|
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gtk {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class MenuShell : Gtk.Container {
public MenuShell (IntPtr raw) : base(raw) {}
protected MenuShell() : base(IntPtr.Zero)
{
CreateNativeObject (new string [0], new GLib.Value [0]);
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gtk_menu_shell_get_take_focus(IntPtr raw);
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_menu_shell_set_take_focus(IntPtr raw, bool take_focus);
[GLib.Property ("take-focus")]
public bool TakeFocus {
get {
bool raw_ret = gtk_menu_shell_get_take_focus(Handle);
bool ret = raw_ret;
return ret;
}
set {
gtk_menu_shell_set_take_focus(Handle, value);
}
}
[GLib.Signal("move-selected")]
public event Gtk.MoveSelectedHandler MoveSelected {
add {
this.AddSignalHandler ("move-selected", value, typeof (Gtk.MoveSelectedArgs));
}
remove {
this.RemoveSignalHandler ("move-selected", value);
}
}
[GLib.Signal("cycle-focus")]
public event Gtk.CycleFocusHandler CycleFocus {
add {
this.AddSignalHandler ("cycle-focus", value, typeof (Gtk.CycleFocusArgs));
}
remove {
this.RemoveSignalHandler ("cycle-focus", value);
}
}
[GLib.Signal("deactivate")]
public event System.EventHandler Deactivated {
add {
this.AddSignalHandler ("deactivate", value);
}
remove {
this.RemoveSignalHandler ("deactivate", value);
}
}
[GLib.Signal("move-current")]
public event Gtk.MoveCurrentHandler MoveCurrent {
add {
this.AddSignalHandler ("move-current", value, typeof (Gtk.MoveCurrentArgs));
}
remove {
this.RemoveSignalHandler ("move-current", value);
}
}
[GLib.Signal("activate-current")]
public event Gtk.ActivateCurrentHandler ActivateCurrent {
add {
this.AddSignalHandler ("activate-current", value, typeof (Gtk.ActivateCurrentArgs));
}
remove {
this.RemoveSignalHandler ("activate-current", value);
}
}
[GLib.Signal("selection-done")]
public event System.EventHandler SelectionDone {
add {
this.AddSignalHandler ("selection-done", value);
}
remove {
this.RemoveSignalHandler ("selection-done", value);
}
}
[GLib.Signal("cancel")]
public event System.EventHandler Canceled {
add {
this.AddSignalHandler ("cancel", value);
}
remove {
this.RemoveSignalHandler ("cancel", value);
}
}
[GLib.Signal("insert")]
public event Gtk.InsertedHandler Inserted {
add {
this.AddSignalHandler ("insert", value, typeof (Gtk.InsertedArgs));
}
remove {
this.RemoveSignalHandler ("insert", value);
}
}
static CycleFocusNativeDelegate CycleFocus_cb_delegate;
static CycleFocusNativeDelegate CycleFocusVMCallback {
get {
if (CycleFocus_cb_delegate == null)
CycleFocus_cb_delegate = new CycleFocusNativeDelegate (CycleFocus_cb);
return CycleFocus_cb_delegate;
}
}
static void OverrideCycleFocus (GLib.GType gtype)
{
OverrideCycleFocus (gtype, CycleFocusVMCallback);
}
static void OverrideCycleFocus (GLib.GType gtype, CycleFocusNativeDelegate callback)
{
OverrideVirtualMethod (gtype, "cycle-focus", callback);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void CycleFocusNativeDelegate (IntPtr inst, int p0);
static void CycleFocus_cb (IntPtr inst, int p0)
{
try {
MenuShell __obj = GLib.Object.GetObject (inst, false) as MenuShell;
__obj.OnCycleFocus ((Gtk.DirectionType) p0);
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gtk.MenuShell), ConnectionMethod="OverrideCycleFocus")]
protected virtual void OnCycleFocus (Gtk.DirectionType p0)
{
InternalCycleFocus (p0);
}
private void InternalCycleFocus (Gtk.DirectionType p0)
{
GLib.Value ret = GLib.Value.Empty;
GLib.ValueArray inst_and_params = new GLib.ValueArray (2);
GLib.Value[] vals = new GLib.Value [2];
vals [0] = new GLib.Value (this);
inst_and_params.Append (vals [0]);
vals [1] = new GLib.Value (p0);
inst_and_params.Append (vals [1]);
g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
foreach (GLib.Value v in vals)
v.Dispose ();
}
static DeactivatedNativeDelegate Deactivated_cb_delegate;
static DeactivatedNativeDelegate DeactivatedVMCallback {
get {
if (Deactivated_cb_delegate == null)
Deactivated_cb_delegate = new DeactivatedNativeDelegate (Deactivated_cb);
return Deactivated_cb_delegate;
}
}
static void OverrideDeactivated (GLib.GType gtype)
{
OverrideDeactivated (gtype, DeactivatedVMCallback);
}
static void OverrideDeactivated (GLib.GType gtype, DeactivatedNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("deactivate"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void DeactivatedNativeDelegate (IntPtr inst);
static void Deactivated_cb (IntPtr inst)
{
try {
MenuShell __obj = GLib.Object.GetObject (inst, false) as MenuShell;
__obj.OnDeactivated ();
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gtk.MenuShell), ConnectionMethod="OverrideDeactivated")]
protected virtual void OnDeactivated ()
{
InternalDeactivated ();
}
private void InternalDeactivated ()
{
DeactivatedNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("deactivate"));
unmanaged = (DeactivatedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DeactivatedNativeDelegate));
}
if (unmanaged == null) return;
unmanaged (this.Handle);
}
static SelectionDoneNativeDelegate SelectionDone_cb_delegate;
static SelectionDoneNativeDelegate SelectionDoneVMCallback {
get {
if (SelectionDone_cb_delegate == null)
SelectionDone_cb_delegate = new SelectionDoneNativeDelegate (SelectionDone_cb);
return SelectionDone_cb_delegate;
}
}
static void OverrideSelectionDone (GLib.GType gtype)
{
OverrideSelectionDone (gtype, SelectionDoneVMCallback);
}
static void OverrideSelectionDone (GLib.GType gtype, SelectionDoneNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("selection_done"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void SelectionDoneNativeDelegate (IntPtr inst);
static void SelectionDone_cb (IntPtr inst)
{
try {
MenuShell __obj = GLib.Object.GetObject (inst, false) as MenuShell;
__obj.OnSelectionDone ();
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gtk.MenuShell), ConnectionMethod="OverrideSelectionDone")]
protected virtual void OnSelectionDone ()
{
InternalSelectionDone ();
}
private void InternalSelectionDone ()
{
SelectionDoneNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("selection_done"));
unmanaged = (SelectionDoneNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SelectionDoneNativeDelegate));
}
if (unmanaged == null) return;
unmanaged (this.Handle);
}
static MoveCurrentNativeDelegate MoveCurrent_cb_delegate;
static MoveCurrentNativeDelegate MoveCurrentVMCallback {
get {
if (MoveCurrent_cb_delegate == null)
MoveCurrent_cb_delegate = new MoveCurrentNativeDelegate (MoveCurrent_cb);
return MoveCurrent_cb_delegate;
}
}
static void OverrideMoveCurrent (GLib.GType gtype)
{
OverrideMoveCurrent (gtype, MoveCurrentVMCallback);
}
static void OverrideMoveCurrent (GLib.GType gtype, MoveCurrentNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("move_current"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void MoveCurrentNativeDelegate (IntPtr inst, int direction);
static void MoveCurrent_cb (IntPtr inst, int direction)
{
try {
MenuShell __obj = GLib.Object.GetObject (inst, false) as MenuShell;
__obj.OnMoveCurrent ((Gtk.MenuDirectionType) direction);
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gtk.MenuShell), ConnectionMethod="OverrideMoveCurrent")]
protected virtual void OnMoveCurrent (Gtk.MenuDirectionType direction)
{
InternalMoveCurrent (direction);
}
private void InternalMoveCurrent (Gtk.MenuDirectionType direction)
{
MoveCurrentNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("move_current"));
unmanaged = (MoveCurrentNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(MoveCurrentNativeDelegate));
}
if (unmanaged == null) return;
unmanaged (this.Handle, (int) direction);
}
static ActivateCurrentNativeDelegate ActivateCurrent_cb_delegate;
static ActivateCurrentNativeDelegate ActivateCurrentVMCallback {
get {
if (ActivateCurrent_cb_delegate == null)
ActivateCurrent_cb_delegate = new ActivateCurrentNativeDelegate (ActivateCurrent_cb);
return ActivateCurrent_cb_delegate;
}
}
static void OverrideActivateCurrent (GLib.GType gtype)
{
OverrideActivateCurrent (gtype, ActivateCurrentVMCallback);
}
static void OverrideActivateCurrent (GLib.GType gtype, ActivateCurrentNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("activate_current"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void ActivateCurrentNativeDelegate (IntPtr inst, bool force_hide);
static void ActivateCurrent_cb (IntPtr inst, bool force_hide)
{
try {
MenuShell __obj = GLib.Object.GetObject (inst, false) as MenuShell;
__obj.OnActivateCurrent (force_hide);
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gtk.MenuShell), ConnectionMethod="OverrideActivateCurrent")]
protected virtual void OnActivateCurrent (bool force_hide)
{
InternalActivateCurrent (force_hide);
}
private void InternalActivateCurrent (bool force_hide)
{
ActivateCurrentNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("activate_current"));
unmanaged = (ActivateCurrentNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ActivateCurrentNativeDelegate));
}
if (unmanaged == null) return;
unmanaged (this.Handle, force_hide);
}
static CanceledNativeDelegate Canceled_cb_delegate;
static CanceledNativeDelegate CanceledVMCallback {
get {
if (Canceled_cb_delegate == null)
Canceled_cb_delegate = new CanceledNativeDelegate (Canceled_cb);
return Canceled_cb_delegate;
}
}
static void OverrideCanceled (GLib.GType gtype)
{
OverrideCanceled (gtype, CanceledVMCallback);
}
static void OverrideCanceled (GLib.GType gtype, CanceledNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("cancel"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void CanceledNativeDelegate (IntPtr inst);
static void Canceled_cb (IntPtr inst)
{
try {
MenuShell __obj = GLib.Object.GetObject (inst, false) as MenuShell;
__obj.OnCanceled ();
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gtk.MenuShell), ConnectionMethod="OverrideCanceled")]
protected virtual void OnCanceled ()
{
InternalCanceled ();
}
private void InternalCanceled ()
{
CanceledNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("cancel"));
unmanaged = (CanceledNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CanceledNativeDelegate));
}
if (unmanaged == null) return;
unmanaged (this.Handle);
}
static SelectItemNativeDelegate SelectItem_cb_delegate;
static SelectItemNativeDelegate SelectItemVMCallback {
get {
if (SelectItem_cb_delegate == null)
SelectItem_cb_delegate = new SelectItemNativeDelegate (SelectItem_cb);
return SelectItem_cb_delegate;
}
}
static void OverrideSelectItem (GLib.GType gtype)
{
OverrideSelectItem (gtype, SelectItemVMCallback);
}
static void OverrideSelectItem (GLib.GType gtype, SelectItemNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("select_item"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void SelectItemNativeDelegate (IntPtr inst, IntPtr menu_item);
static void SelectItem_cb (IntPtr inst, IntPtr menu_item)
{
try {
MenuShell __obj = GLib.Object.GetObject (inst, false) as MenuShell;
__obj.OnSelectItem (GLib.Object.GetObject(menu_item) as Gtk.Widget);
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gtk.MenuShell), ConnectionMethod="OverrideSelectItem")]
protected virtual void OnSelectItem (Gtk.Widget menu_item)
{
InternalSelectItem (menu_item);
}
private void InternalSelectItem (Gtk.Widget menu_item)
{
SelectItemNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("select_item"));
unmanaged = (SelectItemNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SelectItemNativeDelegate));
}
if (unmanaged == null) return;
unmanaged (this.Handle, menu_item == null ? IntPtr.Zero : menu_item.Handle);
}
static InsertedNativeDelegate Inserted_cb_delegate;
static InsertedNativeDelegate InsertedVMCallback {
get {
if (Inserted_cb_delegate == null)
Inserted_cb_delegate = new InsertedNativeDelegate (Inserted_cb);
return Inserted_cb_delegate;
}
}
static void OverrideInserted (GLib.GType gtype)
{
OverrideInserted (gtype, InsertedVMCallback);
}
static void OverrideInserted (GLib.GType gtype, InsertedNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("insert"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void InsertedNativeDelegate (IntPtr inst, IntPtr child, int position);
static void Inserted_cb (IntPtr inst, IntPtr child, int position)
{
try {
MenuShell __obj = GLib.Object.GetObject (inst, false) as MenuShell;
__obj.OnInserted (GLib.Object.GetObject(child) as Gtk.Widget, position);
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gtk.MenuShell), ConnectionMethod="OverrideInserted")]
protected virtual void OnInserted (Gtk.Widget child, int position)
{
InternalInserted (child, position);
}
private void InternalInserted (Gtk.Widget child, int position)
{
InsertedNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("insert"));
unmanaged = (InsertedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(InsertedNativeDelegate));
}
if (unmanaged == null) return;
unmanaged (this.Handle, child == null ? IntPtr.Zero : child.Handle, position);
}
static GetPopupDelayNativeDelegate GetPopupDelay_cb_delegate;
static GetPopupDelayNativeDelegate GetPopupDelayVMCallback {
get {
if (GetPopupDelay_cb_delegate == null)
GetPopupDelay_cb_delegate = new GetPopupDelayNativeDelegate (GetPopupDelay_cb);
return GetPopupDelay_cb_delegate;
}
}
static void OverrideGetPopupDelay (GLib.GType gtype)
{
OverrideGetPopupDelay (gtype, GetPopupDelayVMCallback);
}
static void OverrideGetPopupDelay (GLib.GType gtype, GetPopupDelayNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_popup_delay"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate int GetPopupDelayNativeDelegate (IntPtr inst);
static int GetPopupDelay_cb (IntPtr inst)
{
try {
MenuShell __obj = GLib.Object.GetObject (inst, false) as MenuShell;
int __result;
__result = __obj.OnGetPopupDelay ();
return __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gtk.MenuShell), ConnectionMethod="OverrideGetPopupDelay")]
protected virtual int OnGetPopupDelay ()
{
return InternalGetPopupDelay ();
}
private int InternalGetPopupDelay ()
{
GetPopupDelayNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("get_popup_delay"));
unmanaged = (GetPopupDelayNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetPopupDelayNativeDelegate));
}
if (unmanaged == null) return 0;
int __result = unmanaged (this.Handle);
return __result;
}
static MoveSelectedNativeDelegate MoveSelected_cb_delegate;
static MoveSelectedNativeDelegate MoveSelectedVMCallback {
get {
if (MoveSelected_cb_delegate == null)
MoveSelected_cb_delegate = new MoveSelectedNativeDelegate (MoveSelected_cb);
return MoveSelected_cb_delegate;
}
}
static void OverrideMoveSelected (GLib.GType gtype)
{
OverrideMoveSelected (gtype, MoveSelectedVMCallback);
}
static void OverrideMoveSelected (GLib.GType gtype, MoveSelectedNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("move_selected"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool MoveSelectedNativeDelegate (IntPtr inst, int distance);
static bool MoveSelected_cb (IntPtr inst, int distance)
{
try {
MenuShell __obj = GLib.Object.GetObject (inst, false) as MenuShell;
bool __result;
__result = __obj.OnMoveSelected (distance);
return __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gtk.MenuShell), ConnectionMethod="OverrideMoveSelected")]
protected virtual bool OnMoveSelected (int distance)
{
return InternalMoveSelected (distance);
}
private bool InternalMoveSelected (int distance)
{
MoveSelectedNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("move_selected"));
unmanaged = (MoveSelectedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(MoveSelectedNativeDelegate));
}
if (unmanaged == null) return false;
bool __result = unmanaged (this.Handle, distance);
return __result;
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _class_abi = null;
static public new GLib.AbiStruct class_abi {
get {
if (_class_abi == null)
_class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("submenu_placement"
, Gtk.Container.class_abi.Fields
, (uint) Marshal.SizeOf(typeof(bool)) // submenu_placement
, null
, "deactivate"
, 1
, 1
),
new GLib.AbiField("deactivate"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // deactivate
, "submenu_placement"
, "selection_done"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("selection_done"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // selection_done
, "deactivate"
, "move_current"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("move_current"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // move_current
, "selection_done"
, "activate_current"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("activate_current"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // activate_current
, "move_current"
, "cancel"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("cancel"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // cancel
, "activate_current"
, "select_item"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("select_item"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // select_item
, "cancel"
, "insert"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("insert"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // insert
, "select_item"
, "get_popup_delay"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("get_popup_delay"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // get_popup_delay
, "insert"
, "move_selected"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("move_selected"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // move_selected
, "get_popup_delay"
, "_gtk_reserved1"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("_gtk_reserved1"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // _gtk_reserved1
, "move_selected"
, "_gtk_reserved2"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("_gtk_reserved2"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // _gtk_reserved2
, "_gtk_reserved1"
, "_gtk_reserved3"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("_gtk_reserved3"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // _gtk_reserved3
, "_gtk_reserved2"
, "_gtk_reserved4"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("_gtk_reserved4"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // _gtk_reserved4
, "_gtk_reserved3"
, null
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
});
return _class_abi;
}
}
// End of the ABI representation.
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_menu_shell_activate_item(IntPtr raw, IntPtr menu_item, bool force_deactivate);
public void ActivateItem(Gtk.Widget menu_item, bool force_deactivate) {
gtk_menu_shell_activate_item(Handle, menu_item == null ? IntPtr.Zero : menu_item.Handle, force_deactivate);
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_menu_shell_append(IntPtr raw, IntPtr child);
public void Append(Gtk.Widget child) {
gtk_menu_shell_append(Handle, child == null ? IntPtr.Zero : child.Handle);
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_menu_shell_bind_model(IntPtr raw, IntPtr model, IntPtr action_namespace, bool with_separators);
public void BindModel(GLib.MenuModel model, string action_namespace, bool with_separators) {
IntPtr native_action_namespace = GLib.Marshaller.StringToPtrGStrdup (action_namespace);
gtk_menu_shell_bind_model(Handle, model == null ? IntPtr.Zero : model.Handle, native_action_namespace, with_separators);
GLib.Marshaller.Free (native_action_namespace);
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_menu_shell_cancel(IntPtr raw);
public void Cancel() {
gtk_menu_shell_cancel(Handle);
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_menu_shell_deactivate(IntPtr raw);
public void Deactivate() {
gtk_menu_shell_deactivate(Handle);
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_menu_shell_deselect(IntPtr raw);
public void Deselect() {
gtk_menu_shell_deselect(Handle);
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_menu_shell_get_parent_shell(IntPtr raw);
public Gtk.Widget ParentShell {
get {
IntPtr raw_ret = gtk_menu_shell_get_parent_shell(Handle);
Gtk.Widget ret = GLib.Object.GetObject(raw_ret) as Gtk.Widget;
return ret;
}
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_menu_shell_get_selected_item(IntPtr raw);
public Gtk.Widget SelectedItem {
get {
IntPtr raw_ret = gtk_menu_shell_get_selected_item(Handle);
Gtk.Widget ret = GLib.Object.GetObject(raw_ret) as Gtk.Widget;
return ret;
}
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_menu_shell_get_type();
public static new GLib.GType GType {
get {
IntPtr raw_ret = gtk_menu_shell_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_menu_shell_insert(IntPtr raw, IntPtr child, int position);
public void Insert(Gtk.Widget child, int position) {
gtk_menu_shell_insert(Handle, child == null ? IntPtr.Zero : child.Handle, position);
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_menu_shell_prepend(IntPtr raw, IntPtr child);
public void Prepend(Gtk.Widget child) {
gtk_menu_shell_prepend(Handle, child == null ? IntPtr.Zero : child.Handle);
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_menu_shell_select_first(IntPtr raw, bool search_sensitive);
public void SelectFirst(bool search_sensitive) {
gtk_menu_shell_select_first(Handle, search_sensitive);
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_menu_shell_select_item(IntPtr raw, IntPtr menu_item);
public void SelectItem(Gtk.Widget menu_item) {
gtk_menu_shell_select_item(Handle, menu_item == null ? IntPtr.Zero : menu_item.Handle);
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public new GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("priv"
, Gtk.Container.abi_info.Fields
, (uint) Marshal.SizeOf(typeof(IntPtr)) // priv
, null
, null
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}
|