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
|
// 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 Menu : Gtk.MenuShell {
public Menu (IntPtr raw) : base(raw) {}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_menu_new();
public Menu () : base (IntPtr.Zero)
{
if (GetType () != typeof (Menu)) {
CreateNativeObject (new string [0], new GLib.Value[0]);
return;
}
Raw = gtk_menu_new();
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_menu_new_from_model(IntPtr model);
public Menu (GLib.MenuModel model) : base (IntPtr.Zero)
{
if (GetType () != typeof (Menu)) {
var vals = new List<GLib.Value> ();
var names = new List<string> ();
CreateNativeObject (names.ToArray (), vals.ToArray ());
return;
}
Raw = gtk_menu_new_from_model(model == null ? IntPtr.Zero : model.Handle);
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_menu_get_active(IntPtr raw);
[GLib.Property ("active")]
public Gtk.Widget Active {
get {
IntPtr raw_ret = gtk_menu_get_active(Handle);
Gtk.Widget ret = GLib.Object.GetObject(raw_ret) as Gtk.Widget;
return ret;
}
set {
GLib.Value val = new GLib.Value(value);
SetProperty("active", val);
val.Dispose ();
}
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_menu_get_accel_group(IntPtr raw);
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_menu_set_accel_group(IntPtr raw, IntPtr accel_group);
[GLib.Property ("accel-group")]
public Gtk.AccelGroup AccelGroup {
get {
IntPtr raw_ret = gtk_menu_get_accel_group(Handle);
Gtk.AccelGroup ret = GLib.Object.GetObject(raw_ret) as Gtk.AccelGroup;
return ret;
}
set {
gtk_menu_set_accel_group(Handle, value == null ? IntPtr.Zero : value.Handle);
}
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_menu_get_accel_path(IntPtr raw);
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_menu_set_accel_path(IntPtr raw, IntPtr accel_path);
[GLib.Property ("accel-path")]
public string AccelPath {
get {
IntPtr raw_ret = gtk_menu_get_accel_path(Handle);
string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
return ret;
}
set {
IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
gtk_menu_set_accel_path(Handle, native_value);
GLib.Marshaller.Free (native_value);
}
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_menu_get_attach_widget(IntPtr raw);
[GLib.Property ("attach-widget")]
public Gtk.Widget AttachWidget {
get {
IntPtr raw_ret = gtk_menu_get_attach_widget(Handle);
Gtk.Widget ret = GLib.Object.GetObject(raw_ret) as Gtk.Widget;
return ret;
}
set {
GLib.Value val = new GLib.Value(value);
SetProperty("attach-widget", val);
val.Dispose ();
}
}
[GLib.Property ("tearoff-title")]
public string TearoffTitle {
get {
GLib.Value val = GetProperty ("tearoff-title");
string ret = (string) val;
val.Dispose ();
return ret;
}
set {
GLib.Value val = new GLib.Value(value);
SetProperty("tearoff-title", val);
val.Dispose ();
}
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gtk_menu_get_tearoff_state(IntPtr raw);
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_menu_set_tearoff_state(IntPtr raw, bool torn_off);
[Obsolete]
[GLib.Property ("tearoff-state")]
public bool TearoffState {
get {
bool raw_ret = gtk_menu_get_tearoff_state(Handle);
bool ret = raw_ret;
return ret;
}
set {
gtk_menu_set_tearoff_state(Handle, value);
}
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gtk_menu_get_monitor(IntPtr raw);
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_menu_set_monitor(IntPtr raw, int monitor_num);
[GLib.Property ("monitor")]
public int Monitor {
get {
int raw_ret = gtk_menu_get_monitor(Handle);
int ret = raw_ret;
return ret;
}
set {
gtk_menu_set_monitor(Handle, value);
}
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gtk_menu_get_reserve_toggle_size(IntPtr raw);
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_menu_set_reserve_toggle_size(IntPtr raw, bool reserve_toggle_size);
[GLib.Property ("reserve-toggle-size")]
public bool ReserveToggleSize {
get {
bool raw_ret = gtk_menu_get_reserve_toggle_size(Handle);
bool ret = raw_ret;
return ret;
}
set {
gtk_menu_set_reserve_toggle_size(Handle, value);
}
}
[GLib.Property ("anchor-hints")]
public Gdk.AnchorHints AnchorHints {
get {
GLib.Value val = GetProperty ("anchor-hints");
Gdk.AnchorHints ret = (Gdk.AnchorHints) (Enum) val;
val.Dispose ();
return ret;
}
set {
GLib.Value val = new GLib.Value((Enum) value);
SetProperty("anchor-hints", val);
val.Dispose ();
}
}
[GLib.Property ("rect-anchor-dx")]
public int RectAnchorDx {
get {
GLib.Value val = GetProperty ("rect-anchor-dx");
int ret = (int) val;
val.Dispose ();
return ret;
}
set {
GLib.Value val = new GLib.Value(value);
SetProperty("rect-anchor-dx", val);
val.Dispose ();
}
}
[GLib.Property ("rect-anchor-dy")]
public int RectAnchorDy {
get {
GLib.Value val = GetProperty ("rect-anchor-dy");
int ret = (int) val;
val.Dispose ();
return ret;
}
set {
GLib.Value val = new GLib.Value(value);
SetProperty("rect-anchor-dy", val);
val.Dispose ();
}
}
[GLib.Property ("menu-type-hint")]
public Gdk.WindowTypeHint MenuTypeHint {
get {
GLib.Value val = GetProperty ("menu-type-hint");
Gdk.WindowTypeHint ret = (Gdk.WindowTypeHint) (Enum) val;
val.Dispose ();
return ret;
}
set {
GLib.Value val = new GLib.Value((Enum) value);
SetProperty("menu-type-hint", val);
val.Dispose ();
}
}
[GLib.Property ("horizontal-padding")]
public int HorizontalPadding {
get {
GLib.Value val = GetProperty ("horizontal-padding");
int ret = (int) val;
val.Dispose ();
return ret;
}
}
[GLib.Property ("vertical-padding")]
public int VerticalPadding {
get {
GLib.Value val = GetProperty ("vertical-padding");
int ret = (int) val;
val.Dispose ();
return ret;
}
}
[GLib.Property ("vertical-offset")]
public int VerticalOffset {
get {
GLib.Value val = GetProperty ("vertical-offset");
int ret = (int) val;
val.Dispose ();
return ret;
}
}
[GLib.Property ("horizontal-offset")]
public int HorizontalOffset {
get {
GLib.Value val = GetProperty ("horizontal-offset");
int ret = (int) val;
val.Dispose ();
return ret;
}
}
[GLib.Property ("double-arrows")]
public bool DoubleArrows {
get {
GLib.Value val = GetProperty ("double-arrows");
bool ret = (bool) val;
val.Dispose ();
return ret;
}
}
[GLib.Property ("arrow-placement")]
public Gtk.ArrowPlacement ArrowPlacement {
get {
GLib.Value val = GetProperty ("arrow-placement");
Gtk.ArrowPlacement ret = (Gtk.ArrowPlacement) (Enum) val;
val.Dispose ();
return ret;
}
}
[GLib.Property ("arrow-scaling")]
public float ArrowScaling {
get {
GLib.Value val = GetProperty ("arrow-scaling");
float ret = (float) val;
val.Dispose ();
return ret;
}
}
public class MenuChild : Gtk.Container.ContainerChild {
protected internal MenuChild (Gtk.Container parent, Gtk.Widget child) : base (parent, child) {}
[Gtk.ChildProperty ("left-attach")]
public int LeftAttach {
get {
GLib.Value val = parent.ChildGetProperty (child, "left-attach");
int ret = (int) val;
val.Dispose ();
return ret;
}
set {
GLib.Value val = new GLib.Value(value);
parent.ChildSetProperty(child, "left-attach", val);
val.Dispose ();
}
}
[Gtk.ChildProperty ("right-attach")]
public int RightAttach {
get {
GLib.Value val = parent.ChildGetProperty (child, "right-attach");
int ret = (int) val;
val.Dispose ();
return ret;
}
set {
GLib.Value val = new GLib.Value(value);
parent.ChildSetProperty(child, "right-attach", val);
val.Dispose ();
}
}
[Gtk.ChildProperty ("top-attach")]
public int TopAttach {
get {
GLib.Value val = parent.ChildGetProperty (child, "top-attach");
int ret = (int) val;
val.Dispose ();
return ret;
}
set {
GLib.Value val = new GLib.Value(value);
parent.ChildSetProperty(child, "top-attach", val);
val.Dispose ();
}
}
[Gtk.ChildProperty ("bottom-attach")]
public int BottomAttach {
get {
GLib.Value val = parent.ChildGetProperty (child, "bottom-attach");
int ret = (int) val;
val.Dispose ();
return ret;
}
set {
GLib.Value val = new GLib.Value(value);
parent.ChildSetProperty(child, "bottom-attach", val);
val.Dispose ();
}
}
}
public override Gtk.Container.ContainerChild this [Gtk.Widget child] {
get {
return new MenuChild (this, child);
}
}
[GLib.Signal("move-scroll")]
public event Gtk.MoveScrollHandler MoveScroll {
add {
this.AddSignalHandler ("move-scroll", value, typeof (Gtk.MoveScrollArgs));
}
remove {
this.RemoveSignalHandler ("move-scroll", value);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void PoppedUpSignalDelegate (IntPtr inst, IntPtr arg0, IntPtr arg1, bool arg2, bool arg3, IntPtr gch);
static void PoppedUpSignalCallback (IntPtr inst, IntPtr arg0, IntPtr arg1, bool arg2, bool arg3, IntPtr gch)
{
Gtk.PoppedUpArgs args = new Gtk.PoppedUpArgs ();
try {
GLib.Signal sig = ((GCHandle) gch).Target as GLib.Signal;
if (sig == null)
throw new Exception("Unknown signal GC handle received " + gch);
args.Args = new object[4];
args.Args[0] = arg0;
args.Args[1] = arg1;
args.Args[2] = arg2;
args.Args[3] = arg3;
Gtk.PoppedUpHandler handler = (Gtk.PoppedUpHandler) sig.Handler;
handler (GLib.Object.GetObject (inst), args);
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[GLib.Signal("popped-up")]
public event Gtk.PoppedUpHandler PoppedUp {
add {
this.AddSignalHandler ("popped-up", value, new PoppedUpSignalDelegate(PoppedUpSignalCallback));
}
remove {
this.RemoveSignalHandler ("popped-up", value);
}
}
static MoveScrollNativeDelegate MoveScroll_cb_delegate;
static MoveScrollNativeDelegate MoveScrollVMCallback {
get {
if (MoveScroll_cb_delegate == null)
MoveScroll_cb_delegate = new MoveScrollNativeDelegate (MoveScroll_cb);
return MoveScroll_cb_delegate;
}
}
static void OverrideMoveScroll (GLib.GType gtype)
{
OverrideMoveScroll (gtype, MoveScrollVMCallback);
}
static void OverrideMoveScroll (GLib.GType gtype, MoveScrollNativeDelegate callback)
{
OverrideVirtualMethod (gtype, "move-scroll", callback);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void MoveScrollNativeDelegate (IntPtr inst, int p0);
static void MoveScroll_cb (IntPtr inst, int p0)
{
try {
Menu __obj = GLib.Object.GetObject (inst, false) as Menu;
__obj.OnMoveScroll ((Gtk.ScrollType) p0);
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gtk.Menu), ConnectionMethod="OverrideMoveScroll")]
protected virtual void OnMoveScroll (Gtk.ScrollType p0)
{
InternalMoveScroll (p0);
}
private void InternalMoveScroll (Gtk.ScrollType 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 PoppedUpNativeDelegate PoppedUp_cb_delegate;
static PoppedUpNativeDelegate PoppedUpVMCallback {
get {
if (PoppedUp_cb_delegate == null)
PoppedUp_cb_delegate = new PoppedUpNativeDelegate (PoppedUp_cb);
return PoppedUp_cb_delegate;
}
}
static void OverridePoppedUp (GLib.GType gtype)
{
OverridePoppedUp (gtype, PoppedUpVMCallback);
}
static void OverridePoppedUp (GLib.GType gtype, PoppedUpNativeDelegate callback)
{
OverrideVirtualMethod (gtype, "popped-up", callback);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void PoppedUpNativeDelegate (IntPtr inst, IntPtr p0, IntPtr p1, bool p2, bool p3);
static void PoppedUp_cb (IntPtr inst, IntPtr p0, IntPtr p1, bool p2, bool p3)
{
try {
Menu __obj = GLib.Object.GetObject (inst, false) as Menu;
__obj.OnPoppedUp (p0, p1, p2, p3);
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gtk.Menu), ConnectionMethod="OverridePoppedUp")]
protected virtual void OnPoppedUp (IntPtr p0, IntPtr p1, bool p2, bool p3)
{
InternalPoppedUp (p0, p1, p2, p3);
}
private void InternalPoppedUp (IntPtr p0, IntPtr p1, bool p2, bool p3)
{
GLib.Value ret = GLib.Value.Empty;
GLib.ValueArray inst_and_params = new GLib.ValueArray (5);
GLib.Value[] vals = new GLib.Value [5];
vals [0] = new GLib.Value (this);
inst_and_params.Append (vals [0]);
vals [1] = new GLib.Value (p0);
inst_and_params.Append (vals [1]);
vals [2] = new GLib.Value (p1);
inst_and_params.Append (vals [2]);
vals [3] = new GLib.Value (p2);
inst_and_params.Append (vals [3]);
vals [4] = new GLib.Value (p3);
inst_and_params.Append (vals [4]);
g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
foreach (GLib.Value v in vals)
v.Dispose ();
}
// 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("_gtk_reserved1"
, Gtk.MenuShell.class_abi.Fields
, (uint) Marshal.SizeOf(typeof(IntPtr)) // _gtk_reserved1
, null
, "_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_attach(IntPtr raw, IntPtr child, uint left_attach, uint right_attach, uint top_attach, uint bottom_attach);
public void Attach(Gtk.Widget child, uint left_attach, uint right_attach, uint top_attach, uint bottom_attach) {
gtk_menu_attach(Handle, child == null ? IntPtr.Zero : child.Handle, left_attach, right_attach, top_attach, bottom_attach);
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_menu_attach_to_widget(IntPtr raw, IntPtr attach_widget, GtkSharp.MenuDetachFuncNative detacher);
public void AttachToWidget(Gtk.Widget attach_widget, Gtk.MenuDetachFunc detacher) {
GtkSharp.MenuDetachFuncWrapper detacher_wrapper = new GtkSharp.MenuDetachFuncWrapper (detacher);
detacher_wrapper.PersistUntilCalled ();
gtk_menu_attach_to_widget(Handle, attach_widget == null ? IntPtr.Zero : attach_widget.Handle, detacher_wrapper.NativeDelegate);
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_menu_detach(IntPtr raw);
public void Detach() {
gtk_menu_detach(Handle);
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_menu_get_for_attach_widget(IntPtr widget);
public static Gtk.Widget[] GetForAttachWidget(Gtk.Widget widget) {
IntPtr raw_ret = gtk_menu_get_for_attach_widget(widget == null ? IntPtr.Zero : widget.Handle);
Gtk.Widget[] ret = (Gtk.Widget[]) GLib.Marshaller.ListPtrToArray (raw_ret, typeof(GLib.List), false, false, typeof(Gtk.Widget));
return ret;
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_menu_get_title(IntPtr raw);
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_menu_set_title(IntPtr raw, IntPtr title);
[Obsolete]
public string Title {
get {
IntPtr raw_ret = gtk_menu_get_title(Handle);
string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
return ret;
}
set {
IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
gtk_menu_set_title(Handle, native_value);
GLib.Marshaller.Free (native_value);
}
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_menu_get_type();
public static new GLib.GType GType {
get {
IntPtr raw_ret = gtk_menu_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_place_on_monitor(IntPtr raw, IntPtr monitor);
public void PlaceOnMonitor(Gdk.Monitor monitor) {
gtk_menu_place_on_monitor(Handle, monitor == null ? IntPtr.Zero : monitor.Handle);
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_menu_popdown(IntPtr raw);
public void Popdown() {
gtk_menu_popdown(Handle);
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_menu_popup(IntPtr raw, IntPtr parent_menu_shell, IntPtr parent_menu_item, GtkSharp.MenuPositionFuncNative func, IntPtr data, uint button, uint activate_time);
[Obsolete]
public void Popup(Gtk.Widget parent_menu_shell, Gtk.Widget parent_menu_item, Gtk.MenuPositionFunc func, uint button, uint activate_time) {
GtkSharp.MenuPositionFuncWrapper func_wrapper = new GtkSharp.MenuPositionFuncWrapper (func);
func_wrapper.PersistUntilCalled ();
gtk_menu_popup(Handle, parent_menu_shell == null ? IntPtr.Zero : parent_menu_shell.Handle, parent_menu_item == null ? IntPtr.Zero : parent_menu_item.Handle, func_wrapper.NativeDelegate, IntPtr.Zero, button, activate_time);
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_menu_popup_at_pointer(IntPtr raw, IntPtr trigger_event);
public void PopupAtPointer(Gdk.Event trigger_event) {
gtk_menu_popup_at_pointer(Handle, trigger_event == null ? IntPtr.Zero : trigger_event.Handle);
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_menu_popup_at_rect(IntPtr raw, IntPtr rect_window, IntPtr rect, int rect_anchor, int menu_anchor, IntPtr trigger_event);
public void PopupAtRect(Gdk.Window rect_window, Gdk.Rectangle rect, Gdk.Gravity rect_anchor, Gdk.Gravity menu_anchor, Gdk.Event trigger_event) {
IntPtr native_rect = GLib.Marshaller.StructureToPtrAlloc (rect);
gtk_menu_popup_at_rect(Handle, rect_window == null ? IntPtr.Zero : rect_window.Handle, native_rect, (int) rect_anchor, (int) menu_anchor, trigger_event == null ? IntPtr.Zero : trigger_event.Handle);
Marshal.FreeHGlobal (native_rect);
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_menu_popup_at_widget(IntPtr raw, IntPtr widget, int widget_anchor, int menu_anchor, IntPtr trigger_event);
public void PopupAtWidget(Gtk.Widget widget, Gdk.Gravity widget_anchor, Gdk.Gravity menu_anchor, Gdk.Event trigger_event) {
gtk_menu_popup_at_widget(Handle, widget == null ? IntPtr.Zero : widget.Handle, (int) widget_anchor, (int) menu_anchor, trigger_event == null ? IntPtr.Zero : trigger_event.Handle);
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_menu_popup_for_device(IntPtr raw, IntPtr device, IntPtr parent_menu_shell, IntPtr parent_menu_item, GtkSharp.MenuPositionFuncNative func, IntPtr data, GLib.DestroyNotify destroy, uint button, uint activate_time);
[Obsolete]
public void PopupForDevice(Gdk.Device device, Gtk.Widget parent_menu_shell, Gtk.Widget parent_menu_item, Gtk.MenuPositionFunc func, GLib.DestroyNotify destroy, uint button, uint activate_time) {
GtkSharp.MenuPositionFuncWrapper func_wrapper = new GtkSharp.MenuPositionFuncWrapper (func);
func_wrapper.PersistUntilCalled ();
gtk_menu_popup_for_device(Handle, device == null ? IntPtr.Zero : device.Handle, parent_menu_shell == null ? IntPtr.Zero : parent_menu_shell.Handle, parent_menu_item == null ? IntPtr.Zero : parent_menu_item.Handle, func_wrapper.NativeDelegate, IntPtr.Zero, destroy, button, activate_time);
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_menu_reorder_child(IntPtr raw, IntPtr child, int position);
public void ReorderChild(Gtk.Widget child, int position) {
gtk_menu_reorder_child(Handle, child == null ? IntPtr.Zero : child.Handle, position);
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_menu_reposition(IntPtr raw);
public void Reposition() {
gtk_menu_reposition(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.MenuShell.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
}
}
|