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 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012
|
// 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 StatusIcon : GLib.Object {
public StatusIcon (IntPtr raw) : base(raw) {}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_status_icon_new();
public StatusIcon () : base (IntPtr.Zero)
{
if (GetType () != typeof (StatusIcon)) {
CreateNativeObject (new string [0], new GLib.Value[0]);
return;
}
Raw = gtk_status_icon_new();
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_status_icon_new_from_file(IntPtr filename);
public StatusIcon (string filename) : base (IntPtr.Zero)
{
if (GetType () != typeof (StatusIcon)) {
var vals = new List<GLib.Value> ();
var names = new List<string> ();
CreateNativeObject (names.ToArray (), vals.ToArray ());
return;
}
IntPtr native_filename = GLib.Marshaller.StringToPtrGStrdup (filename);
Raw = gtk_status_icon_new_from_file(native_filename);
GLib.Marshaller.Free (native_filename);
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_status_icon_new_from_gicon(IntPtr icon);
public StatusIcon (GLib.IIcon icon) : base (IntPtr.Zero)
{
if (GetType () != typeof (StatusIcon)) {
var vals = new List<GLib.Value> ();
var names = new List<string> ();
if (icon != null) {
names.Add ("icon");
vals.Add (new GLib.Value (icon));
}
CreateNativeObject (names.ToArray (), vals.ToArray ());
return;
}
Raw = gtk_status_icon_new_from_gicon(icon == null ? IntPtr.Zero : ((icon is GLib.Object) ? (icon as GLib.Object).Handle : (icon as GLib.IconAdapter).Handle));
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_status_icon_new_from_icon_name(IntPtr icon_name);
public static StatusIcon NewFromIconName(string icon_name)
{
IntPtr native_icon_name = GLib.Marshaller.StringToPtrGStrdup (icon_name);
StatusIcon result = new StatusIcon (gtk_status_icon_new_from_icon_name(native_icon_name));
GLib.Marshaller.Free (native_icon_name);
return result;
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_status_icon_new_from_pixbuf(IntPtr pixbuf);
public StatusIcon (Gdk.Pixbuf pixbuf) : base (IntPtr.Zero)
{
if (GetType () != typeof (StatusIcon)) {
var vals = new List<GLib.Value> ();
var names = new List<string> ();
if (pixbuf != null) {
names.Add ("pixbuf");
vals.Add (new GLib.Value (pixbuf));
}
CreateNativeObject (names.ToArray (), vals.ToArray ());
return;
}
Raw = gtk_status_icon_new_from_pixbuf(pixbuf == null ? IntPtr.Zero : pixbuf.Handle);
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_status_icon_new_from_stock(IntPtr stock_id);
public static StatusIcon NewFromStock(string stock_id)
{
IntPtr native_stock_id = GLib.Marshaller.StringToPtrGStrdup (stock_id);
StatusIcon result = new StatusIcon (gtk_status_icon_new_from_stock(native_stock_id));
GLib.Marshaller.Free (native_stock_id);
return result;
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_status_icon_get_pixbuf(IntPtr raw);
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_status_icon_set_from_pixbuf(IntPtr raw, IntPtr pixbuf);
[Obsolete]
[GLib.Property ("pixbuf")]
public Gdk.Pixbuf Pixbuf {
get {
IntPtr raw_ret = gtk_status_icon_get_pixbuf(Handle);
Gdk.Pixbuf ret = GLib.Object.GetObject(raw_ret) as Gdk.Pixbuf;
return ret;
}
set {
gtk_status_icon_set_from_pixbuf(Handle, value == null ? IntPtr.Zero : value.Handle);
}
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_status_icon_set_from_file(IntPtr raw, IntPtr filename);
[Obsolete]
[GLib.Property ("file")]
public string File {
set {
IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
gtk_status_icon_set_from_file(Handle, native_value);
GLib.Marshaller.Free (native_value);
}
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_status_icon_get_stock(IntPtr raw);
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_status_icon_set_from_stock(IntPtr raw, IntPtr stock_id);
[Obsolete]
[GLib.Property ("stock")]
public string Stock {
get {
IntPtr raw_ret = gtk_status_icon_get_stock(Handle);
string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
return ret;
}
set {
IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
gtk_status_icon_set_from_stock(Handle, native_value);
GLib.Marshaller.Free (native_value);
}
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_status_icon_get_icon_name(IntPtr raw);
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_status_icon_set_from_icon_name(IntPtr raw, IntPtr icon_name);
[Obsolete]
[GLib.Property ("icon-name")]
public string IconName {
get {
IntPtr raw_ret = gtk_status_icon_get_icon_name(Handle);
string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
return ret;
}
set {
IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
gtk_status_icon_set_from_icon_name(Handle, native_value);
GLib.Marshaller.Free (native_value);
}
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_status_icon_get_gicon(IntPtr raw);
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_status_icon_set_from_gicon(IntPtr raw, IntPtr icon);
[Obsolete]
[GLib.Property ("gicon")]
public GLib.IIcon Icon {
get {
IntPtr raw_ret = gtk_status_icon_get_gicon(Handle);
GLib.IIcon ret = GLib.IconAdapter.GetObject (raw_ret, false);
return ret;
}
set {
gtk_status_icon_set_from_gicon(Handle, value == null ? IntPtr.Zero : ((value is GLib.Object) ? (value as GLib.Object).Handle : (value as GLib.IconAdapter).Handle));
}
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gtk_status_icon_get_storage_type(IntPtr raw);
[Obsolete]
[GLib.Property ("storage-type")]
public Gtk.ImageType StorageType {
get {
int raw_ret = gtk_status_icon_get_storage_type(Handle);
Gtk.ImageType ret = (Gtk.ImageType) raw_ret;
return ret;
}
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gtk_status_icon_get_size(IntPtr raw);
[Obsolete]
[GLib.Property ("size")]
public int Size {
get {
int raw_ret = gtk_status_icon_get_size(Handle);
int ret = raw_ret;
return ret;
}
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_status_icon_get_screen(IntPtr raw);
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_status_icon_set_screen(IntPtr raw, IntPtr screen);
[Obsolete]
[GLib.Property ("screen")]
public Gdk.Screen Screen {
get {
IntPtr raw_ret = gtk_status_icon_get_screen(Handle);
Gdk.Screen ret = GLib.Object.GetObject(raw_ret) as Gdk.Screen;
return ret;
}
set {
gtk_status_icon_set_screen(Handle, value == null ? IntPtr.Zero : value.Handle);
}
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gtk_status_icon_get_visible(IntPtr raw);
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_status_icon_set_visible(IntPtr raw, bool visible);
[Obsolete]
[GLib.Property ("visible")]
public bool Visible {
get {
bool raw_ret = gtk_status_icon_get_visible(Handle);
bool ret = raw_ret;
return ret;
}
set {
gtk_status_icon_set_visible(Handle, value);
}
}
[GLib.Property ("embedded")]
public bool Embedded {
get {
GLib.Value val = GetProperty ("embedded");
bool ret = (bool) val;
val.Dispose ();
return ret;
}
}
[GLib.Property ("orientation")]
public Gtk.Orientation Orientation {
get {
GLib.Value val = GetProperty ("orientation");
Gtk.Orientation ret = (Gtk.Orientation) (Enum) val;
val.Dispose ();
return ret;
}
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gtk_status_icon_get_has_tooltip(IntPtr raw);
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_status_icon_set_has_tooltip(IntPtr raw, bool has_tooltip);
[Obsolete]
[GLib.Property ("has-tooltip")]
public bool HasTooltip {
get {
bool raw_ret = gtk_status_icon_get_has_tooltip(Handle);
bool ret = raw_ret;
return ret;
}
set {
gtk_status_icon_set_has_tooltip(Handle, value);
}
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_status_icon_get_tooltip_text(IntPtr raw);
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_status_icon_set_tooltip_text(IntPtr raw, IntPtr text);
[Obsolete]
[GLib.Property ("tooltip-text")]
public string TooltipText {
get {
IntPtr raw_ret = gtk_status_icon_get_tooltip_text(Handle);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
return ret;
}
set {
IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
gtk_status_icon_set_tooltip_text(Handle, native_value);
GLib.Marshaller.Free (native_value);
}
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_status_icon_get_tooltip_markup(IntPtr raw);
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_status_icon_set_tooltip_markup(IntPtr raw, IntPtr markup);
[Obsolete]
[GLib.Property ("tooltip-markup")]
public string TooltipMarkup {
get {
IntPtr raw_ret = gtk_status_icon_get_tooltip_markup(Handle);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
return ret;
}
set {
IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
gtk_status_icon_set_tooltip_markup(Handle, native_value);
GLib.Marshaller.Free (native_value);
}
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_status_icon_get_title(IntPtr raw);
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_status_icon_set_title(IntPtr raw, IntPtr title);
[Obsolete]
[GLib.Property ("title")]
public string Title {
get {
IntPtr raw_ret = gtk_status_icon_get_title(Handle);
string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
return ret;
}
set {
IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
gtk_status_icon_set_title(Handle, native_value);
GLib.Marshaller.Free (native_value);
}
}
[GLib.Signal("popup-menu")]
public event Gtk.PopupMenuHandler PopupMenu {
add {
this.AddSignalHandler ("popup-menu", value, typeof (Gtk.PopupMenuArgs));
}
remove {
this.RemoveSignalHandler ("popup-menu", value);
}
}
[GLib.Signal("size-changed")]
public event Gtk.SizeChangedHandler SizeChanged {
add {
this.AddSignalHandler ("size-changed", value, typeof (Gtk.SizeChangedArgs));
}
remove {
this.RemoveSignalHandler ("size-changed", value);
}
}
[GLib.Signal("button_release_event")]
public event Gtk.ButtonReleaseEventHandler ButtonReleaseEvent {
add {
this.AddSignalHandler ("button_release_event", value, typeof (Gtk.ButtonReleaseEventArgs));
}
remove {
this.RemoveSignalHandler ("button_release_event", value);
}
}
[GLib.Signal("button_press_event")]
public event Gtk.ButtonPressEventHandler ButtonPressEvent {
add {
this.AddSignalHandler ("button_press_event", value, typeof (Gtk.ButtonPressEventArgs));
}
remove {
this.RemoveSignalHandler ("button_press_event", value);
}
}
[GLib.Signal("activate")]
public event System.EventHandler Activate {
add {
this.AddSignalHandler ("activate", value);
}
remove {
this.RemoveSignalHandler ("activate", value);
}
}
[GLib.Signal("query_tooltip")]
public event Gtk.QueryTooltipHandler QueryTooltip {
add {
this.AddSignalHandler ("query_tooltip", value, typeof (Gtk.QueryTooltipArgs));
}
remove {
this.RemoveSignalHandler ("query_tooltip", value);
}
}
[GLib.Signal("scroll_event")]
public event Gtk.ScrollEventHandler ScrollEvent {
add {
this.AddSignalHandler ("scroll_event", value, typeof (Gtk.ScrollEventArgs));
}
remove {
this.RemoveSignalHandler ("scroll_event", value);
}
}
static ActivateNativeDelegate Activate_cb_delegate;
static ActivateNativeDelegate ActivateVMCallback {
get {
if (Activate_cb_delegate == null)
Activate_cb_delegate = new ActivateNativeDelegate (Activate_cb);
return Activate_cb_delegate;
}
}
static void OverrideActivate (GLib.GType gtype)
{
OverrideActivate (gtype, ActivateVMCallback);
}
static void OverrideActivate (GLib.GType gtype, ActivateNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("activate"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void ActivateNativeDelegate (IntPtr inst);
static void Activate_cb (IntPtr inst)
{
try {
StatusIcon __obj = GLib.Object.GetObject (inst, false) as StatusIcon;
__obj.OnActivate ();
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gtk.StatusIcon), ConnectionMethod="OverrideActivate")]
protected virtual void OnActivate ()
{
InternalActivate ();
}
private void InternalActivate ()
{
ActivateNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("activate"));
unmanaged = (ActivateNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ActivateNativeDelegate));
}
if (unmanaged == null) return;
unmanaged (this.Handle);
}
static PopupMenuNativeDelegate PopupMenu_cb_delegate;
static PopupMenuNativeDelegate PopupMenuVMCallback {
get {
if (PopupMenu_cb_delegate == null)
PopupMenu_cb_delegate = new PopupMenuNativeDelegate (PopupMenu_cb);
return PopupMenu_cb_delegate;
}
}
static void OverridePopupMenu (GLib.GType gtype)
{
OverridePopupMenu (gtype, PopupMenuVMCallback);
}
static void OverridePopupMenu (GLib.GType gtype, PopupMenuNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("popup_menu"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void PopupMenuNativeDelegate (IntPtr inst, uint button, uint activate_time);
static void PopupMenu_cb (IntPtr inst, uint button, uint activate_time)
{
try {
StatusIcon __obj = GLib.Object.GetObject (inst, false) as StatusIcon;
__obj.OnPopupMenu (button, activate_time);
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gtk.StatusIcon), ConnectionMethod="OverridePopupMenu")]
protected virtual void OnPopupMenu (uint button, uint activate_time)
{
InternalPopupMenu (button, activate_time);
}
private void InternalPopupMenu (uint button, uint activate_time)
{
PopupMenuNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("popup_menu"));
unmanaged = (PopupMenuNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PopupMenuNativeDelegate));
}
if (unmanaged == null) return;
unmanaged (this.Handle, button, activate_time);
}
static SizeChangedNativeDelegate SizeChanged_cb_delegate;
static SizeChangedNativeDelegate SizeChangedVMCallback {
get {
if (SizeChanged_cb_delegate == null)
SizeChanged_cb_delegate = new SizeChangedNativeDelegate (SizeChanged_cb);
return SizeChanged_cb_delegate;
}
}
static void OverrideSizeChanged (GLib.GType gtype)
{
OverrideSizeChanged (gtype, SizeChangedVMCallback);
}
static void OverrideSizeChanged (GLib.GType gtype, SizeChangedNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("size_changed"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool SizeChangedNativeDelegate (IntPtr inst, int size);
static bool SizeChanged_cb (IntPtr inst, int size)
{
try {
StatusIcon __obj = GLib.Object.GetObject (inst, false) as StatusIcon;
bool __result;
__result = __obj.OnSizeChanged (size);
return __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gtk.StatusIcon), ConnectionMethod="OverrideSizeChanged")]
protected virtual bool OnSizeChanged (int size)
{
return InternalSizeChanged (size);
}
private bool InternalSizeChanged (int size)
{
SizeChangedNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("size_changed"));
unmanaged = (SizeChangedNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SizeChangedNativeDelegate));
}
if (unmanaged == null) return false;
bool __result = unmanaged (this.Handle, size);
return __result;
}
static ButtonPressEventNativeDelegate ButtonPressEvent_cb_delegate;
static ButtonPressEventNativeDelegate ButtonPressEventVMCallback {
get {
if (ButtonPressEvent_cb_delegate == null)
ButtonPressEvent_cb_delegate = new ButtonPressEventNativeDelegate (ButtonPressEvent_cb);
return ButtonPressEvent_cb_delegate;
}
}
static void OverrideButtonPressEvent (GLib.GType gtype)
{
OverrideButtonPressEvent (gtype, ButtonPressEventVMCallback);
}
static void OverrideButtonPressEvent (GLib.GType gtype, ButtonPressEventNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("button_press_event"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool ButtonPressEventNativeDelegate (IntPtr inst, IntPtr evnt);
static bool ButtonPressEvent_cb (IntPtr inst, IntPtr evnt)
{
try {
StatusIcon __obj = GLib.Object.GetObject (inst, false) as StatusIcon;
bool __result;
__result = __obj.OnButtonPressEvent (new Gdk.EventButton(evnt));
return __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gtk.StatusIcon), ConnectionMethod="OverrideButtonPressEvent")]
protected virtual bool OnButtonPressEvent (Gdk.EventButton evnt)
{
return InternalButtonPressEvent (evnt);
}
private bool InternalButtonPressEvent (Gdk.EventButton evnt)
{
ButtonPressEventNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("button_press_event"));
unmanaged = (ButtonPressEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ButtonPressEventNativeDelegate));
}
if (unmanaged == null) return false;
bool __result = unmanaged (this.Handle, evnt == null ? IntPtr.Zero : evnt.Handle);
return __result;
}
static ButtonReleaseEventNativeDelegate ButtonReleaseEvent_cb_delegate;
static ButtonReleaseEventNativeDelegate ButtonReleaseEventVMCallback {
get {
if (ButtonReleaseEvent_cb_delegate == null)
ButtonReleaseEvent_cb_delegate = new ButtonReleaseEventNativeDelegate (ButtonReleaseEvent_cb);
return ButtonReleaseEvent_cb_delegate;
}
}
static void OverrideButtonReleaseEvent (GLib.GType gtype)
{
OverrideButtonReleaseEvent (gtype, ButtonReleaseEventVMCallback);
}
static void OverrideButtonReleaseEvent (GLib.GType gtype, ButtonReleaseEventNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("button_release_event"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool ButtonReleaseEventNativeDelegate (IntPtr inst, IntPtr evnt);
static bool ButtonReleaseEvent_cb (IntPtr inst, IntPtr evnt)
{
try {
StatusIcon __obj = GLib.Object.GetObject (inst, false) as StatusIcon;
bool __result;
__result = __obj.OnButtonReleaseEvent (new Gdk.EventButton(evnt));
return __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gtk.StatusIcon), ConnectionMethod="OverrideButtonReleaseEvent")]
protected virtual bool OnButtonReleaseEvent (Gdk.EventButton evnt)
{
return InternalButtonReleaseEvent (evnt);
}
private bool InternalButtonReleaseEvent (Gdk.EventButton evnt)
{
ButtonReleaseEventNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("button_release_event"));
unmanaged = (ButtonReleaseEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ButtonReleaseEventNativeDelegate));
}
if (unmanaged == null) return false;
bool __result = unmanaged (this.Handle, evnt == null ? IntPtr.Zero : evnt.Handle);
return __result;
}
static ScrollEventNativeDelegate ScrollEvent_cb_delegate;
static ScrollEventNativeDelegate ScrollEventVMCallback {
get {
if (ScrollEvent_cb_delegate == null)
ScrollEvent_cb_delegate = new ScrollEventNativeDelegate (ScrollEvent_cb);
return ScrollEvent_cb_delegate;
}
}
static void OverrideScrollEvent (GLib.GType gtype)
{
OverrideScrollEvent (gtype, ScrollEventVMCallback);
}
static void OverrideScrollEvent (GLib.GType gtype, ScrollEventNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("scroll_event"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool ScrollEventNativeDelegate (IntPtr inst, IntPtr evnt);
static bool ScrollEvent_cb (IntPtr inst, IntPtr evnt)
{
try {
StatusIcon __obj = GLib.Object.GetObject (inst, false) as StatusIcon;
bool __result;
__result = __obj.OnScrollEvent (new Gdk.EventScroll(evnt));
return __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gtk.StatusIcon), ConnectionMethod="OverrideScrollEvent")]
protected virtual bool OnScrollEvent (Gdk.EventScroll evnt)
{
return InternalScrollEvent (evnt);
}
private bool InternalScrollEvent (Gdk.EventScroll evnt)
{
ScrollEventNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("scroll_event"));
unmanaged = (ScrollEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ScrollEventNativeDelegate));
}
if (unmanaged == null) return false;
bool __result = unmanaged (this.Handle, evnt == null ? IntPtr.Zero : evnt.Handle);
return __result;
}
static QueryTooltipNativeDelegate QueryTooltip_cb_delegate;
static QueryTooltipNativeDelegate QueryTooltipVMCallback {
get {
if (QueryTooltip_cb_delegate == null)
QueryTooltip_cb_delegate = new QueryTooltipNativeDelegate (QueryTooltip_cb);
return QueryTooltip_cb_delegate;
}
}
static void OverrideQueryTooltip (GLib.GType gtype)
{
OverrideQueryTooltip (gtype, QueryTooltipVMCallback);
}
static void OverrideQueryTooltip (GLib.GType gtype, QueryTooltipNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("query_tooltip"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool QueryTooltipNativeDelegate (IntPtr inst, int x, int y, bool keyboard_mode, IntPtr tooltip);
static bool QueryTooltip_cb (IntPtr inst, int x, int y, bool keyboard_mode, IntPtr tooltip)
{
try {
StatusIcon __obj = GLib.Object.GetObject (inst, false) as StatusIcon;
bool __result;
__result = __obj.OnQueryTooltip (x, y, keyboard_mode, GLib.Object.GetObject(tooltip) as Gtk.Tooltip);
return __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw e;
}
}
[GLib.DefaultSignalHandler(Type=typeof(Gtk.StatusIcon), ConnectionMethod="OverrideQueryTooltip")]
protected virtual bool OnQueryTooltip (int x, int y, bool keyboard_mode, Gtk.Tooltip tooltip)
{
return InternalQueryTooltip (x, y, keyboard_mode, tooltip);
}
private bool InternalQueryTooltip (int x, int y, bool keyboard_mode, Gtk.Tooltip tooltip)
{
QueryTooltipNativeDelegate unmanaged = null;
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("query_tooltip"));
unmanaged = (QueryTooltipNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(QueryTooltipNativeDelegate));
}
if (unmanaged == null) return false;
bool __result = unmanaged (this.Handle, x, y, keyboard_mode, tooltip == null ? IntPtr.Zero : tooltip.Handle);
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("activate"
, GLib.Object.class_abi.Fields
, (uint) Marshal.SizeOf(typeof(IntPtr)) // activate
, null
, "popup_menu"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("popup_menu"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // popup_menu
, "activate"
, "size_changed"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("size_changed"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // size_changed
, "popup_menu"
, "button_press_event"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("button_press_event"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // button_press_event
, "size_changed"
, "button_release_event"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("button_release_event"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // button_release_event
, "button_press_event"
, "scroll_event"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("scroll_event"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // scroll_event
, "button_release_event"
, "query_tooltip"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("query_tooltip"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // query_tooltip
, "scroll_event"
, "__gtk_reserved1"
, (uint) Marshal.SizeOf(typeof(IntPtr))
, 0
),
new GLib.AbiField("__gtk_reserved1"
, -1
, (uint) Marshal.SizeOf(typeof(IntPtr)) // __gtk_reserved1
, "query_tooltip"
, "__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 IntPtr gtk_status_icon_get_type();
public static new GLib.GType GType {
get {
IntPtr raw_ret = gtk_status_icon_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern uint gtk_status_icon_get_x11_window_id(IntPtr raw);
[Obsolete]
public uint X11WindowId {
get {
uint raw_ret = gtk_status_icon_get_x11_window_id(Handle);
uint ret = raw_ret;
return ret;
}
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gtk_status_icon_is_embedded(IntPtr raw);
[Obsolete]
public bool IsEmbedded {
get {
bool raw_ret = gtk_status_icon_is_embedded(Handle);
bool ret = raw_ret;
return ret;
}
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_status_icon_position_menu(IntPtr menu, out int x, out int y, out bool push_in, IntPtr user_data);
[Obsolete]
public static void PositionMenu(Gtk.Menu menu, out int x, out int y, out bool push_in, IntPtr user_data) {
gtk_status_icon_position_menu(menu == null ? IntPtr.Zero : menu.Handle, out x, out y, out push_in, user_data);
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_status_icon_set_name(IntPtr raw, IntPtr name);
[Obsolete]
public string Name {
set {
IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
gtk_status_icon_set_name(Handle, native_value);
GLib.Marshaller.Free (native_value);
}
}
// 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"
, GLib.Object.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
}
}
|