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
|
// 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 UIManager : GLib.Object {
public UIManager (IntPtr raw) : base(raw) {}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_ui_manager_new();
public UIManager () : base (IntPtr.Zero)
{
if (GetType () != typeof (UIManager)) {
CreateNativeObject (new string [0], new GLib.Value[0]);
return;
}
Raw = gtk_ui_manager_new();
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gtk_ui_manager_get_add_tearoffs(IntPtr raw);
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_ui_manager_set_add_tearoffs(IntPtr raw, bool add_tearoffs);
[Obsolete]
[GLib.Property ("add-tearoffs")]
public bool AddTearoffs {
get {
bool raw_ret = gtk_ui_manager_get_add_tearoffs(Handle);
bool ret = raw_ret;
return ret;
}
set {
gtk_ui_manager_set_add_tearoffs(Handle, value);
}
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_ui_manager_get_ui(IntPtr raw);
[Obsolete]
[GLib.Property ("ui")]
public string Ui {
get {
IntPtr raw_ret = gtk_ui_manager_get_ui(Handle);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
return ret;
}
}
[GLib.Signal("disconnect-proxy")]
public event Gtk.DisconnectProxyHandler DisconnectProxy {
add {
this.AddSignalHandler ("disconnect-proxy", value, typeof (Gtk.DisconnectProxyArgs));
}
remove {
this.RemoveSignalHandler ("disconnect-proxy", value);
}
}
[GLib.Signal("connect-proxy")]
public event Gtk.ConnectProxyHandler ConnectProxy {
add {
this.AddSignalHandler ("connect-proxy", value, typeof (Gtk.ConnectProxyArgs));
}
remove {
this.RemoveSignalHandler ("connect-proxy", value);
}
}
[GLib.Signal("post-activate")]
public event Gtk.PostActivateHandler PostActivate {
add {
this.AddSignalHandler ("post-activate", value, typeof (Gtk.PostActivateArgs));
}
remove {
this.RemoveSignalHandler ("post-activate", value);
}
}
[GLib.Signal("pre-activate")]
public event Gtk.PreActivateHandler PreActivate {
add {
this.AddSignalHandler ("pre-activate", value, typeof (Gtk.PreActivateArgs));
}
remove {
this.RemoveSignalHandler ("pre-activate", value);
}
}
[GLib.Signal("add-widget")]
public event Gtk.AddWidgetHandler AddWidget {
add {
this.AddSignalHandler ("add-widget", value, typeof (Gtk.AddWidgetArgs));
}
remove {
this.RemoveSignalHandler ("add-widget", value);
}
}
[GLib.Signal("actions-changed")]
public event System.EventHandler ActionsChanged {
add {
this.AddSignalHandler ("actions-changed", value);
}
remove {
this.RemoveSignalHandler ("actions-changed", value);
}
}
static AddWidgetNativeDelegate AddWidget_cb_delegate;
static AddWidgetNativeDelegate AddWidgetVMCallback {
get {
if (AddWidget_cb_delegate == null)
AddWidget_cb_delegate = new AddWidgetNativeDelegate (AddWidget_cb);
return AddWidget_cb_delegate;
}
}
static void OverrideAddWidget (GLib.GType gtype)
{
OverrideAddWidget (gtype, AddWidgetVMCallback);
}
static void OverrideAddWidget (GLib.GType gtype, AddWidgetNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("add_widget"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void AddWidgetNativeDelegate (IntPtr inst, IntPtr widget);
static void AddWidget_cb (IntPtr inst, IntPtr widget)
{
try {
UIManager __obj = GLib.Object.GetObject (inst, false) as UIManager;
__obj.OnAddWidget (GLib.Object.GetObject(widget) as Gtk.Widget);
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gtk.UIManager), ConnectionMethod="OverrideAddWidget")]
protected virtual void OnAddWidget (Gtk.Widget widget)
{
InternalAddWidget (widget);
}
private void InternalAddWidget (Gtk.Widget widget)
{
AddWidgetNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("add_widget"));
unmanaged = (AddWidgetNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(AddWidgetNativeDelegate));
}
if (unmanaged == null) return;
unmanaged (this.Handle, widget == null ? IntPtr.Zero : widget.Handle);
}
static ActionsChangedNativeDelegate ActionsChanged_cb_delegate;
static ActionsChangedNativeDelegate ActionsChangedVMCallback {
get {
if (ActionsChanged_cb_delegate == null)
ActionsChanged_cb_delegate = new ActionsChangedNativeDelegate (ActionsChanged_cb);
return ActionsChanged_cb_delegate;
}
}
static void OverrideActionsChanged (GLib.GType gtype)
{
OverrideActionsChanged (gtype, ActionsChangedVMCallback);
}
static void OverrideActionsChanged (GLib.GType gtype, ActionsChangedNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("actions_changed"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void ActionsChangedNativeDelegate (IntPtr inst);
static void ActionsChanged_cb (IntPtr inst)
{
try {
UIManager __obj = GLib.Object.GetObject (inst, false) as UIManager;
__obj.OnActionsChanged ();
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gtk.UIManager), ConnectionMethod="OverrideActionsChanged")]
protected virtual void OnActionsChanged ()
{
InternalActionsChanged ();
}
private void InternalActionsChanged ()
{
ActionsChangedNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("actions_changed"));
unmanaged = (ActionsChangedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ActionsChangedNativeDelegate));
}
if (unmanaged == null) return;
unmanaged (this.Handle);
}
static ConnectProxyNativeDelegate ConnectProxy_cb_delegate;
static ConnectProxyNativeDelegate ConnectProxyVMCallback {
get {
if (ConnectProxy_cb_delegate == null)
ConnectProxy_cb_delegate = new ConnectProxyNativeDelegate (ConnectProxy_cb);
return ConnectProxy_cb_delegate;
}
}
static void OverrideConnectProxy (GLib.GType gtype)
{
OverrideConnectProxy (gtype, ConnectProxyVMCallback);
}
static void OverrideConnectProxy (GLib.GType gtype, ConnectProxyNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("connect_proxy"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void ConnectProxyNativeDelegate (IntPtr inst, IntPtr action, IntPtr proxy);
static void ConnectProxy_cb (IntPtr inst, IntPtr action, IntPtr proxy)
{
try {
UIManager __obj = GLib.Object.GetObject (inst, false) as UIManager;
__obj.OnConnectProxy (GLib.Object.GetObject(action) as Gtk.Action, GLib.Object.GetObject(proxy) as Gtk.Widget);
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gtk.UIManager), ConnectionMethod="OverrideConnectProxy")]
protected virtual void OnConnectProxy (Gtk.Action action, Gtk.Widget proxy)
{
InternalConnectProxy (action, proxy);
}
private void InternalConnectProxy (Gtk.Action action, Gtk.Widget proxy)
{
ConnectProxyNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("connect_proxy"));
unmanaged = (ConnectProxyNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ConnectProxyNativeDelegate));
}
if (unmanaged == null) return;
unmanaged (this.Handle, action == null ? IntPtr.Zero : action.Handle, proxy == null ? IntPtr.Zero : proxy.Handle);
}
static DisconnectProxyNativeDelegate DisconnectProxy_cb_delegate;
static DisconnectProxyNativeDelegate DisconnectProxyVMCallback {
get {
if (DisconnectProxy_cb_delegate == null)
DisconnectProxy_cb_delegate = new DisconnectProxyNativeDelegate (DisconnectProxy_cb);
return DisconnectProxy_cb_delegate;
}
}
static void OverrideDisconnectProxy (GLib.GType gtype)
{
OverrideDisconnectProxy (gtype, DisconnectProxyVMCallback);
}
static void OverrideDisconnectProxy (GLib.GType gtype, DisconnectProxyNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("disconnect_proxy"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void DisconnectProxyNativeDelegate (IntPtr inst, IntPtr action, IntPtr proxy);
static void DisconnectProxy_cb (IntPtr inst, IntPtr action, IntPtr proxy)
{
try {
UIManager __obj = GLib.Object.GetObject (inst, false) as UIManager;
__obj.OnDisconnectProxy (GLib.Object.GetObject(action) as Gtk.Action, GLib.Object.GetObject(proxy) as Gtk.Widget);
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gtk.UIManager), ConnectionMethod="OverrideDisconnectProxy")]
protected virtual void OnDisconnectProxy (Gtk.Action action, Gtk.Widget proxy)
{
InternalDisconnectProxy (action, proxy);
}
private void InternalDisconnectProxy (Gtk.Action action, Gtk.Widget proxy)
{
DisconnectProxyNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("disconnect_proxy"));
unmanaged = (DisconnectProxyNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DisconnectProxyNativeDelegate));
}
if (unmanaged == null) return;
unmanaged (this.Handle, action == null ? IntPtr.Zero : action.Handle, proxy == null ? IntPtr.Zero : proxy.Handle);
}
static PreActivateNativeDelegate PreActivate_cb_delegate;
static PreActivateNativeDelegate PreActivateVMCallback {
get {
if (PreActivate_cb_delegate == null)
PreActivate_cb_delegate = new PreActivateNativeDelegate (PreActivate_cb);
return PreActivate_cb_delegate;
}
}
static void OverridePreActivate (GLib.GType gtype)
{
OverridePreActivate (gtype, PreActivateVMCallback);
}
static void OverridePreActivate (GLib.GType gtype, PreActivateNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("pre_activate"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void PreActivateNativeDelegate (IntPtr inst, IntPtr action);
static void PreActivate_cb (IntPtr inst, IntPtr action)
{
try {
UIManager __obj = GLib.Object.GetObject (inst, false) as UIManager;
__obj.OnPreActivate (GLib.Object.GetObject(action) as Gtk.Action);
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gtk.UIManager), ConnectionMethod="OverridePreActivate")]
protected virtual void OnPreActivate (Gtk.Action action)
{
InternalPreActivate (action);
}
private void InternalPreActivate (Gtk.Action action)
{
PreActivateNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("pre_activate"));
unmanaged = (PreActivateNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PreActivateNativeDelegate));
}
if (unmanaged == null) return;
unmanaged (this.Handle, action == null ? IntPtr.Zero : action.Handle);
}
static PostActivateNativeDelegate PostActivate_cb_delegate;
static PostActivateNativeDelegate PostActivateVMCallback {
get {
if (PostActivate_cb_delegate == null)
PostActivate_cb_delegate = new PostActivateNativeDelegate (PostActivate_cb);
return PostActivate_cb_delegate;
}
}
static void OverridePostActivate (GLib.GType gtype)
{
OverridePostActivate (gtype, PostActivateVMCallback);
}
static void OverridePostActivate (GLib.GType gtype, PostActivateNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("post_activate"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void PostActivateNativeDelegate (IntPtr inst, IntPtr action);
static void PostActivate_cb (IntPtr inst, IntPtr action)
{
try {
UIManager __obj = GLib.Object.GetObject (inst, false) as UIManager;
__obj.OnPostActivate (GLib.Object.GetObject(action) as Gtk.Action);
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gtk.UIManager), ConnectionMethod="OverridePostActivate")]
protected virtual void OnPostActivate (Gtk.Action action)
{
InternalPostActivate (action);
}
private void InternalPostActivate (Gtk.Action action)
{
PostActivateNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("post_activate"));
unmanaged = (PostActivateNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PostActivateNativeDelegate));
}
if (unmanaged == null) return;
unmanaged (this.Handle, action == null ? IntPtr.Zero : action.Handle);
}
static GetWidgetNativeDelegate GetWidget_cb_delegate;
static GetWidgetNativeDelegate GetWidgetVMCallback {
get {
if (GetWidget_cb_delegate == null)
GetWidget_cb_delegate = new GetWidgetNativeDelegate (GetWidget_cb);
return GetWidget_cb_delegate;
}
}
static void OverrideGetWidget (GLib.GType gtype)
{
OverrideGetWidget (gtype, GetWidgetVMCallback);
}
static void OverrideGetWidget (GLib.GType gtype, GetWidgetNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_widget"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr GetWidgetNativeDelegate (IntPtr inst, IntPtr path);
static IntPtr GetWidget_cb (IntPtr inst, IntPtr path)
{
try {
UIManager __obj = GLib.Object.GetObject (inst, false) as UIManager;
Gtk.Widget __result;
__result = __obj.OnGetWidget (GLib.Marshaller.Utf8PtrToString (path));
return __result == null ? IntPtr.Zero : __result.Handle;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gtk.UIManager), ConnectionMethod="OverrideGetWidget")]
protected virtual Gtk.Widget OnGetWidget (string path)
{
return InternalGetWidget (path);
}
private Gtk.Widget InternalGetWidget (string path)
{
GetWidgetNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("get_widget"));
unmanaged = (GetWidgetNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetWidgetNativeDelegate));
}
if (unmanaged == null) return null;
IntPtr native_path = GLib.Marshaller.StringToPtrGStrdup (path);
IntPtr __result = unmanaged (this.Handle, native_path);
GLib.Marshaller.Free (native_path);
return GLib.Object.GetObject(__result) as Gtk.Widget;
}
static GetActionNativeDelegate GetAction_cb_delegate;
static GetActionNativeDelegate GetActionVMCallback {
get {
if (GetAction_cb_delegate == null)
GetAction_cb_delegate = new GetActionNativeDelegate (GetAction_cb);
return GetAction_cb_delegate;
}
}
static void OverrideGetAction (GLib.GType gtype)
{
OverrideGetAction (gtype, GetActionVMCallback);
}
static void OverrideGetAction (GLib.GType gtype, GetActionNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_action"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr GetActionNativeDelegate (IntPtr inst, IntPtr path);
static IntPtr GetAction_cb (IntPtr inst, IntPtr path)
{
try {
UIManager __obj = GLib.Object.GetObject (inst, false) as UIManager;
Gtk.Action __result;
__result = __obj.OnGetAction (GLib.Marshaller.Utf8PtrToString (path));
return __result == null ? IntPtr.Zero : __result.Handle;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gtk.UIManager), ConnectionMethod="OverrideGetAction")]
protected virtual Gtk.Action OnGetAction (string path)
{
return InternalGetAction (path);
}
private Gtk.Action InternalGetAction (string path)
{
GetActionNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("get_action"));
unmanaged = (GetActionNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetActionNativeDelegate));
}
if (unmanaged == null) return null;
IntPtr native_path = GLib.Marshaller.StringToPtrGStrdup (path);
IntPtr __result = unmanaged (this.Handle, native_path);
GLib.Marshaller.Free (native_path);
return GLib.Object.GetObject(__result) as Gtk.Action;
}
// 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("add_widget"
, GLib.Object.class_abi.Fields
, (uint) Marshal.SizeOf(typeof(IntPtr)) // add_widget
, null
, "actions_changed"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("actions_changed"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // actions_changed
, "add_widget"
, "connect_proxy"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("connect_proxy"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // connect_proxy
, "actions_changed"
, "disconnect_proxy"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("disconnect_proxy"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // disconnect_proxy
, "connect_proxy"
, "pre_activate"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("pre_activate"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // pre_activate
, "disconnect_proxy"
, "post_activate"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("post_activate"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // post_activate
, "pre_activate"
, "get_widget"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("get_widget"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // get_widget
, "post_activate"
, "get_action"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("get_action"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // get_action
, "get_widget"
, "_gtk_reserved1"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("_gtk_reserved1"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // _gtk_reserved1
, "get_action"
, "_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_ui_manager_add_ui(IntPtr raw, uint merge_id, IntPtr path, IntPtr name, IntPtr action, int type, bool top);
[Obsolete]
public void AddUi(uint merge_id, string path, string name, string action, Gtk.UIManagerItemType type, bool top) {
IntPtr native_path = GLib.Marshaller.StringToPtrGStrdup (path);
IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
IntPtr native_action = GLib.Marshaller.StringToPtrGStrdup (action);
gtk_ui_manager_add_ui(Handle, merge_id, native_path, native_name, native_action, (int) type, top);
GLib.Marshaller.Free (native_path);
GLib.Marshaller.Free (native_name);
GLib.Marshaller.Free (native_action);
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern unsafe uint gtk_ui_manager_add_ui_from_file(IntPtr raw, IntPtr filename, out IntPtr error);
[Obsolete]
public unsafe uint AddUiFromFile(string filename) {
IntPtr native_filename = GLib.Marshaller.StringToPtrGStrdup (filename);
IntPtr error = IntPtr.Zero;
uint raw_ret = gtk_ui_manager_add_ui_from_file(Handle, native_filename, out error);
uint ret = raw_ret;
GLib.Marshaller.Free (native_filename);
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern unsafe uint gtk_ui_manager_add_ui_from_string(IntPtr raw, IntPtr buffer, IntPtr length, out IntPtr error);
[Obsolete]
public unsafe uint AddUiFromString(string buffer) {
IntPtr native_buffer = GLib.Marshaller.StringToPtrGStrdup (buffer);
IntPtr error = IntPtr.Zero;
uint raw_ret = gtk_ui_manager_add_ui_from_string(Handle, native_buffer, new IntPtr ((long) System.Text.Encoding.UTF8.GetByteCount (buffer)), out error);
uint ret = raw_ret;
GLib.Marshaller.Free (native_buffer);
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_ui_manager_ensure_update(IntPtr raw);
[Obsolete]
public void EnsureUpdate() {
gtk_ui_manager_ensure_update(Handle);
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_ui_manager_get_accel_group(IntPtr raw);
[Obsolete]
public Gtk.AccelGroup AccelGroup {
get {
IntPtr raw_ret = gtk_ui_manager_get_accel_group(Handle);
Gtk.AccelGroup ret = GLib.Object.GetObject(raw_ret) as Gtk.AccelGroup;
return ret;
}
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_ui_manager_get_action(IntPtr raw, IntPtr path);
[Obsolete]
public Gtk.Action GetAction(string path) {
IntPtr native_path = GLib.Marshaller.StringToPtrGStrdup (path);
IntPtr raw_ret = gtk_ui_manager_get_action(Handle, native_path);
Gtk.Action ret = GLib.Object.GetObject(raw_ret) as Gtk.Action;
GLib.Marshaller.Free (native_path);
return ret;
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_ui_manager_get_type();
[Obsolete]
public static new GLib.GType GType {
get {
IntPtr raw_ret = gtk_ui_manager_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_ui_manager_get_widget(IntPtr raw, IntPtr path);
[Obsolete]
public Gtk.Widget GetWidget(string path) {
IntPtr native_path = GLib.Marshaller.StringToPtrGStrdup (path);
IntPtr raw_ret = gtk_ui_manager_get_widget(Handle, native_path);
Gtk.Widget ret = GLib.Object.GetObject(raw_ret) as Gtk.Widget;
GLib.Marshaller.Free (native_path);
return ret;
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_ui_manager_insert_action_group(IntPtr raw, IntPtr action_group, int pos);
[Obsolete]
public void InsertActionGroup(Gtk.ActionGroup action_group, int pos) {
gtk_ui_manager_insert_action_group(Handle, action_group == null ? IntPtr.Zero : action_group.Handle, pos);
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_ui_manager_remove_action_group(IntPtr raw, IntPtr action_group);
[Obsolete]
public void RemoveActionGroup(Gtk.ActionGroup action_group) {
gtk_ui_manager_remove_action_group(Handle, action_group == null ? IntPtr.Zero : action_group.Handle);
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_ui_manager_remove_ui(IntPtr raw, uint merge_id);
[Obsolete]
public void RemoveUi(uint merge_id) {
gtk_ui_manager_remove_ui(Handle, merge_id);
}
// 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("private_data"
, GLib.Object.abi_info.Fields
, (uint) Marshal.SizeOf(typeof(IntPtr)) // private_data
, null
, null
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}
|