/usr/include/gtkmm-3.0/gtkmm/statusicon.h is in libgtkmm-3.0-dev 3.22.2-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 | // Generated by gmmproc 2.54.0 -- DO NOT MODIFY!
#ifndef _GTKMM_STATUSICON_H
#define _GTKMM_STATUSICON_H
#include <gtkmmconfig.h>
#ifndef GTKMM_DISABLE_DEPRECATED
#include <glibmm/ustring.h>
#include <sigc++/sigc++.h>
/* Copyright (C) 2005 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <gtkmm/image.h>
//Deprecated: #include <gtkmm/stockid.h>
#include <gtkmm/menu.h>
#include <gdkmm/pixbuf.h>
#include <gdkmm/types.h>
#include <gtkmm/tooltip.h>
// This whole file is deprecated.
#ifndef DOXYGEN_SHOULD_SKIP_THIS
using GtkStatusIcon = struct _GtkStatusIcon;
using GtkStatusIconClass = struct _GtkStatusIconClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
#ifndef DOXYGEN_SHOULD_SKIP_THIS
namespace Gtk
{ class StatusIcon_Class; } // namespace Gtk
#endif //DOXYGEN_SHOULD_SKIP_THIS
namespace Gtk
{
/** The "system tray" or notification area is normally used for transient icons that indicate some
* special state. For example, a system tray icon might appear to tell the user that they have new
* mail, or have an incoming instant message, or something along those lines. The basic idea is
* that creating an icon in the notification area is less annoying than popping up a dialog.
*
* A StatusIcon object can be used to display an icon in a "system tray". The icon can have a
* tooltip, and the user can interact with it by activating it or popping up a context menu.
* Critical information should not solely be displayed in a StatusIcon, since it may not be
* visible (e.g. when the user doesn't have a notification area on his panel). This can be checked
* with is_embedded().
*
* On X11, the implementation follows the freedesktop.org "System Tray" specification.
* Implementations of the "tray" side of this specification can be found e.g. in the GNOME and KDE
* panel applications.
*
* Note that a StatusIcon is not a widget, but just a Glib::Object.
* Making it a widget would be impractical, since the system tray
* on Win32 doesn’t allow to embed arbitrary widgets.
*
* @newin{2,10}
*
* @deprecated You should consider using notifications or more modern platform-specific APIs instead.
*/
class StatusIcon : public Glib::Object
{
#ifndef DOXYGEN_SHOULD_SKIP_THIS
public:
using CppObjectType = StatusIcon;
using CppClassType = StatusIcon_Class;
using BaseObjectType = GtkStatusIcon;
using BaseClassType = GtkStatusIconClass;
// noncopyable
StatusIcon(const StatusIcon&) = delete;
StatusIcon& operator=(const StatusIcon&) = delete;
private: friend class StatusIcon_Class;
static CppClassType statusicon_class_;
protected:
explicit StatusIcon(const Glib::ConstructParams& construct_params);
explicit StatusIcon(GtkStatusIcon* castitem);
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
public:
StatusIcon(StatusIcon&& src) noexcept;
StatusIcon& operator=(StatusIcon&& src) noexcept;
~StatusIcon() noexcept override;
/** Get the GType for this class, for use with the underlying GObject type system.
*/
static GType get_type() G_GNUC_CONST;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
static GType get_base_type() G_GNUC_CONST;
#endif
///Provides access to the underlying C GObject.
GtkStatusIcon* gobj() { return reinterpret_cast<GtkStatusIcon*>(gobject_); }
///Provides access to the underlying C GObject.
const GtkStatusIcon* gobj() const { return reinterpret_cast<GtkStatusIcon*>(gobject_); }
///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
GtkStatusIcon* gobj_copy();
private:
protected:
StatusIcon();
explicit StatusIcon(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf);
// _WRAP_CTOR does not take a 'deprecated' parameter.
// _WRAP_CTOR(StatusIcon(const StockID& stock), gtk_status_icon_new_from_stock)
#ifndef GTKMM_DISABLE_DEPRECATED
/** @deprecated Use the constructor with the @a icon_name parameter instead.
*/
explicit StatusIcon(const StockID& stock);
#endif // GTKMM_DISABLE_DEPRECATED
explicit StatusIcon(const Glib::ustring& icon_name);
explicit StatusIcon(const Glib::RefPtr<const Gio::Icon>& icon);
public:
/** Creates a new Gtk::StatusIcon object.
* @return A Glib::RefPtr<> to a newly created Gtk::StatusIcon object.
*/
static Glib::RefPtr<StatusIcon> create(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf);
// _WRAP_CREATE does not take a 'deprecated' parameter.
// _WRAP_CREATE(const StockID& stock_id)
#ifndef GTKMM_DISABLE_DEPRECATED
/** @deprecated Use create() with the @a icon_name parameter instead.
*/
static Glib::RefPtr<StatusIcon> create(const StockID& stock_id);
#endif // GTKMM_DISABLE_DEPRECATED
static Glib::RefPtr<StatusIcon> create(const Glib::ustring& icon_name);
/** Creates a status icon displaying the file @a filename.
* The image will be scaled down to fit in the available
* space in the notification area, if necessary.
*
* @param filename A filename.
* @result A new StatusIcon
*
* @newin{2,10}
*/
static Glib::RefPtr<StatusIcon> create_from_file(const std::string& filename);
/** Makes @a status_icon display @a pixbuf.
* See new_from_pixbuf() for details.
*
* @newin{2,10}
*
* Deprecated: 3.14: Use notifications
*
* @param pixbuf A Gdk::Pixbuf or <tt>nullptr</tt>.
*/
void set(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf);
/** Makes @a status_icon display the file @a filename.
* See new_from_file() for details.
*
* @newin{2,10}
*
* Deprecated: 3.14: Use notifications
*
* @param filename A filename.
*/
void set_from_file(const Glib::ustring& filename);
#ifndef GTKMM_DISABLE_DEPRECATED
/** Makes @a status_icon display the stock icon with the id @a stock_id.
* See new_from_stock() for details.
*
* @newin{2,10}
*
* Deprecated: 3.10: Use set_from_icon_name() instead.
*
* @deprecated Use the set() with the @a icon_name parameter instead.
*
* @param stock_id A stock icon id.
*/
void set(const StockID& stock_id);
#endif // GTKMM_DISABLE_DEPRECATED
/** Makes @a status_icon display the icon named @a icon_name from the
* current icon theme.
* See new_from_icon_name() for details.
*
* @newin{2,10}
*
* Deprecated: 3.14: Use notifications
*
* @param icon_name An icon name.
*/
void set(const Glib::ustring& icon_name);
/** Makes @a status_icon display the Icon.
* See new_from_gicon() for details.
*
* @newin{2,14}
*
* Deprecated: 3.14: Use notifications
*
* @param icon A GIcon.
*/
void set(const Glib::RefPtr<const Gio::Icon>& icon);
/** Gets the type of representation being used by the Gtk::StatusIcon
* to store image data. If the Gtk::StatusIcon has no image data,
* the return value will be Gtk::IMAGE_EMPTY.
*
* @newin{2,10}
*
* Deprecated: 3.14: Use notifications
*
* @return The image representation being used.
*/
ImageType get_storage_type() const;
/** Gets the Gdk::Pixbuf being displayed by the Gtk::StatusIcon.
* The storage type of the status icon must be Gtk::IMAGE_EMPTY or
* Gtk::IMAGE_PIXBUF (see get_storage_type()).
* The caller of this function does not own a reference to the
* returned pixbuf.
*
* @newin{2,10}
*
* Deprecated: 3.14: Use notifications
*
* @return The displayed pixbuf,
* or <tt>nullptr</tt> if the image is empty.
*/
Glib::RefPtr<Gdk::Pixbuf> get_pixbuf();
/** Gets the Gdk::Pixbuf being displayed by the Gtk::StatusIcon.
* The storage type of the status icon must be Gtk::IMAGE_EMPTY or
* Gtk::IMAGE_PIXBUF (see get_storage_type()).
* The caller of this function does not own a reference to the
* returned pixbuf.
*
* @newin{2,10}
*
* Deprecated: 3.14: Use notifications
*
* @return The displayed pixbuf,
* or <tt>nullptr</tt> if the image is empty.
*/
Glib::RefPtr<const Gdk::Pixbuf> get_pixbuf() const;
#ifndef GTKMM_DISABLE_DEPRECATED
/** Gets the id of the stock icon being displayed by the Gtk::StatusIcon.
* The storage type of the status icon must be Gtk::IMAGE_EMPTY or
* Gtk::IMAGE_STOCK (see get_storage_type()).
* The returned string is owned by the Gtk::StatusIcon and should not
* be freed or modified.
*
* @newin{2,10}
*
* Deprecated: 3.10: Use get_icon_name() instead.
*
* @deprecated Use the get_icon_name() instead.
*
* @return Stock id of the displayed stock icon,
* or <tt>nullptr</tt> if the image is empty.
*/
StockID get_stock() const;
#endif // GTKMM_DISABLE_DEPRECATED
/** Gets the name of the icon being displayed by the Gtk::StatusIcon.
* The storage type of the status icon must be Gtk::IMAGE_EMPTY or
* Gtk::IMAGE_ICON_NAME (see get_storage_type()).
* The returned string is owned by the Gtk::StatusIcon and should not
* be freed or modified.
*
* @newin{2,10}
*
* Deprecated: 3.14: Use notifications
*
* @return Name of the displayed icon, or <tt>nullptr</tt> if the image is empty.
*/
Glib::ustring get_icon_name() const;
/** Retrieves the Icon being displayed by the Gtk::StatusIcon.
* The storage type of the status icon must be Gtk::IMAGE_EMPTY or
* Gtk::IMAGE_GICON (see get_storage_type()).
* The caller of this function does not own a reference to the
* returned Icon.
*
* If this function fails, @a icon is left unchanged;
*
* @newin{2,14}
*
* Deprecated: 3.14: Use notifications
*
* @return The displayed icon, or <tt>nullptr</tt> if the image is empty.
*/
Glib::RefPtr<Gio::Icon> get_icon();
/** Retrieves the Icon being displayed by the Gtk::StatusIcon.
* The storage type of the status icon must be Gtk::IMAGE_EMPTY or
* Gtk::IMAGE_GICON (see get_storage_type()).
* The caller of this function does not own a reference to the
* returned Icon.
*
* If this function fails, @a icon is left unchanged;
*
* @newin{2,14}
*
* Deprecated: 3.14: Use notifications
*
* @return The displayed icon, or <tt>nullptr</tt> if the image is empty.
*/
Glib::RefPtr<const Gio::Icon> get_icon() const;
/** Gets the size in pixels that is available for the image.
* Stock icons and named icons adapt their size automatically
* if the size of the notification area changes. For other
* storage types, the size-changed signal can be used to
* react to size changes.
*
* Note that the returned size is only meaningful while the
* status icon is embedded (see is_embedded()).
*
* @newin{2,10}
*
* Deprecated: 3.14: Use notifications
*
* @return The size that is available for the image.
*/
int get_size() const;
/** Sets the Gdk::Screen where @a status_icon is displayed; if
* the icon is already mapped, it will be unmapped, and
* then remapped on the new screen.
*
* @newin{2,12}
*
* Deprecated: 3.14: Use notifications
*
* @param screen A Gdk::Screen.
*/
void set_screen(const Glib::RefPtr<Gdk::Screen>& screen);
/** Returns the Gdk::Screen associated with @a status_icon.
*
* @newin{2,12}
*
* Deprecated: 3.14: Use notifications
*
* @return A Gdk::Screen.
*/
Glib::RefPtr<Gdk::Screen> get_screen();
/** Returns the Gdk::Screen associated with @a status_icon.
*
* @newin{2,12}
*
* Deprecated: 3.14: Use notifications
*
* @return A Gdk::Screen.
*/
Glib::RefPtr<const Gdk::Screen> get_screen() const;
/** Shows or hides a status icon.
*
* @newin{2,10}
*
* Deprecated: 3.14: Use notifications
*
* @param visible <tt>true</tt> to show the status icon, <tt>false</tt> to hide it.
*/
void set_visible(bool visible = true);
/** Returns whether the status icon is visible or not.
* Note that being visible does not guarantee that
* the user can actually see the icon, see also
* is_embedded().
*
* @newin{2,10}
*
* Deprecated: 3.14: Use notifications
*
* @return <tt>true</tt> if the status icon is visible.
*/
bool get_visible() const;
/** Returns whether the status icon is embedded in a notification
* area.
*
* @newin{2,10}
*
* Deprecated: 3.14: Use notifications
*
* @return <tt>true</tt> if the status icon is embedded in
* a notification area.
*/
bool is_embedded() const;
/** Displays a menu aligned to the status icon, and makes it available for selection.
* Applications can use this function to display context-sensitive menus.
*
* This is equivalent to the gtk_status_icon_position_menu() helper callback in GTK+,
* which can be provided to gtk_menu_popup().
*
* See Gtk::Menu::popup() for more details.
*
* @param menu The menu to popup for the status icon.
* @param button The mouse button which was pressed to initiate the event.
* @param activate_time The time at which the activation event occurred.
*
* @newin{2,12}
*/
void popup_menu_at_position(Menu& menu, guint button, guint32 activate_time);
//Note that gtk_status_icon_position_menu() is meant to be used as a helpful callback when calling gtk_menu_popup().
//We make it easier by just providing a popup method that uses it.
//In gtk_status_icon_get_geometry(), any of the parameters may be NULL,
//but we don't need 6 different overloads, with different parameters.
//But we can add some if there are common cases.
/** Obtains information about the location of the status icon
* on screen. This information can be used to e.g. position
* popups like notification bubbles.
* See popup_menu_at_position() for a more convenient
* alternative for positioning menus.
*
* Note that some platforms do not allow GTK+ to provide
* this information.
*
* @param screen: The screen.
* @param area The area occupied by the status icon.
* @param orientation The orientation of the panel in which the status icon is embedded. A panel
* at the top or bottom of the screen is horizontal, a panel at the left or right is vertical.
* @result true if the location information has been filled in.
*
* @newin{2,10}
*/
bool get_geometry(Glib::RefPtr<Gdk::Screen>& screen, Gdk::Rectangle& area, Orientation& orientation);
/** Returns the current value of the has-tooltip property.
* See Gtk::StatusIcon::property_has_tooltip() for more information.
*
* @newin{2,16}
*
* Deprecated: 3.14: Use notifications
*
* @return Current value of has-tooltip on @a status_icon.
*/
bool get_has_tooltip() const;
/** Sets the has-tooltip property on @a status_icon to @a has_tooltip.
* See Gtk::StatusIcon::property_has_tooltip() for more information.
*
* @newin{2,16}
*
* Deprecated: 3.14: Use notifications
*
* @param has_tooltip Whether or not @a status_icon has a tooltip.
*/
void set_has_tooltip(bool has_tooltip = true);
/** Gets the contents of the tooltip for @a status_icon.
*
* @newin{2,16}
*
* Deprecated: 3.14: Use notifications
*
* @return The tooltip text, or <tt>nullptr</tt>.
*/
Glib::ustring get_tooltip_text() const;
/** Sets @a text as the contents of the tooltip.
*
* This function will take care of setting Gtk::StatusIcon::property_has_tooltip() to
* <tt>true</tt> and of the default handler for the Gtk::StatusIcon::signal_query_tooltip()
* signal.
*
* See also the Gtk::StatusIcon::property_tooltip_text() property and
* Gtk::Tooltip::set_text().
*
* @newin{2,16}
*
* Deprecated: 3.14: Use notifications
*
* @param text The contents of the tooltip for @a status_icon.
*/
void set_tooltip_text(const Glib::ustring& text);
/** Gets the contents of the tooltip for @a status_icon.
*
* @newin{2,16}
*
* Deprecated: 3.14: Use notifications
*
* @return The tooltip text, or <tt>nullptr</tt>.
*/
Glib::ustring get_tooltip_markup() const;
/** Sets @a markup as the contents of the tooltip, which is marked up with
* the [Pango text markup language][PangoMarkupFormat].
*
* This function will take care of setting Gtk::StatusIcon::property_has_tooltip() to <tt>true</tt>
* and of the default handler for the Gtk::StatusIcon::signal_query_tooltip() signal.
*
* See also the Gtk::StatusIcon::property_tooltip_markup() property and
* Gtk::Tooltip::set_markup().
*
* @newin{2,16}
*
* Deprecated: 3.14: Use notifications
*
* @param markup The contents of the tooltip for @a status_icon, or <tt>nullptr</tt>.
*/
void set_tooltip_markup(const Glib::ustring& markup);
/** Sets the title of this tray icon.
* This should be a short, human-readable, localized string
* describing the tray icon. It may be used by tools like screen
* readers to render the tray icon.
*
* @newin{2,18}
*
* Deprecated: 3.14: Use notifications
*
* @param title The title.
*/
void set_title(const Glib::ustring& title);
/** Gets the title of this tray icon. See set_title().
*
* @newin{2,18}
*
* Deprecated: 3.14: Use notifications
*
* @return The title of the status icon.
*/
Glib::ustring get_title() const;
/** Sets the name of this tray icon.
* This should be a string identifying this icon. It is may be
* used for sorting the icons in the tray and will not be shown to
* the user.
*
* @newin{2,20}
*
* Deprecated: 3.14: Use notifications
*
* @param name The name.
*/
void set_name(const Glib::ustring& name);
/** This function is only useful on the X11/freedesktop.org platform.
* It returns a window ID for the widget in the underlying
* status icon implementation. This is useful for the Galago
* notification service, which can send a window ID in the protocol
* in order for the server to position notification windows
* pointing to a status icon reliably.
*
* This function is not intended for other use cases which are
* more likely to be met by one of the non-X11 specific methods, such
* as position_menu().
*
* @newin{2,14}
*
* Deprecated: 3.14: Use notifications
*
* @return An 32 bit unsigned integer identifier for the
* underlying X11 Window.
*/
guint32 get_x11_window_id() const;
/** A GdkPixbuf to display.
*
* @return A PropertyProxy that allows you to get or set the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> > property_pixbuf() ;
/** A GdkPixbuf to display.
*
* @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> > property_pixbuf() const;
/** Filename to load and display.
*
* @return A PropertyProxy_WriteOnly that allows you to set the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy_WriteOnly< std::string > property_file() ;
#ifndef GTKMM_DISABLE_DEPRECATED
/** Stock ID for a stock image to display.
*
* Deprecated: 3.10: Use Gtk::StatusIcon::property_icon_name() instead.
*
* @deprecated Use property_icon_name() instead.
*
* @return A PropertyProxy that allows you to get or set the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy< StockID > property_stock() ;
/** Stock ID for a stock image to display.
*
* Deprecated: 3.10: Use Gtk::StatusIcon::property_icon_name() instead.
*
* @deprecated Use property_icon_name() instead.
*
* @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< StockID > property_stock() const;
#endif // GTKMM_DISABLE_DEPRECATED
/** The name of the icon from the icon theme.
*
* @return A PropertyProxy that allows you to get or set the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy< Glib::ustring > property_icon_name() ;
/** The name of the icon from the icon theme.
*
* @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< Glib::ustring > property_icon_name() const;
/** The Icon displayed in the Gtk::StatusIcon. For themed icons,
* the image will be updated automatically if the theme changes.
*
* @newin{2,14}
*
* @return A PropertyProxy that allows you to get or set the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy< Glib::RefPtr<Gio::Icon> > property_gicon() ;
/** The Icon displayed in the Gtk::StatusIcon. For themed icons,
* the image will be updated automatically if the theme changes.
*
* @newin{2,14}
*
* @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gio::Icon> > property_gicon() const;
/** The representation being used for image data.
*
* @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< ImageType > property_storage_type() const;
/** The size of the icon.
*
* @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< int > property_size() const;
/** The screen where this status icon will be displayed.
*
* @return A PropertyProxy that allows you to get or set the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy< Glib::RefPtr<Gdk::Screen> > property_screen() ;
/** The screen where this status icon will be displayed.
*
* @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Screen> > property_screen() const;
/** Whether the status icon is visible.
*
* @return A PropertyProxy that allows you to get or set the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy< bool > property_visible() ;
/** Whether the status icon is visible.
*
* @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< bool > property_visible() const;
/** <tt>true</tt> if the statusicon is embedded in a notification area.
*
* @newin{2,12}
*
* @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< bool > property_embedded() const;
/** The orientation of the tray in which the statusicon
* is embedded.
*
* @newin{2,12}
*
* @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< Orientation > property_orientation() const;
/** Enables or disables the emission of Gtk::StatusIcon::signal_query_tooltip() on
* @a status_icon. A value of <tt>true</tt> indicates that @a status_icon can have a
* tooltip, in this case the status icon will be queried using
* Gtk::StatusIcon::signal_query_tooltip() to determine whether it will provide a
* tooltip or not.
*
* Note that setting this property to <tt>true</tt> for the first time will change
* the event masks of the windows of this status icon to include leave-notify
* and motion-notify events. This will not be undone when the property is set
* to <tt>false</tt> again.
*
* Whether this property is respected is platform dependent.
* For plain text tooltips, use Gtk::StatusIcon::property_tooltip_text() in preference.
*
* @newin{2,16}
*
* @return A PropertyProxy that allows you to get or set the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy< bool > property_has_tooltip() ;
/** Enables or disables the emission of Gtk::StatusIcon::signal_query_tooltip() on
* @a status_icon. A value of <tt>true</tt> indicates that @a status_icon can have a
* tooltip, in this case the status icon will be queried using
* Gtk::StatusIcon::signal_query_tooltip() to determine whether it will provide a
* tooltip or not.
*
* Note that setting this property to <tt>true</tt> for the first time will change
* the event masks of the windows of this status icon to include leave-notify
* and motion-notify events. This will not be undone when the property is set
* to <tt>false</tt> again.
*
* Whether this property is respected is platform dependent.
* For plain text tooltips, use Gtk::StatusIcon::property_tooltip_text() in preference.
*
* @newin{2,16}
*
* @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< bool > property_has_tooltip() const;
/** Sets the text of tooltip to be the given string.
*
* Also see Gtk::Tooltip::set_text().
*
* This is a convenience property which will take care of getting the
* tooltip shown if the given string is not <tt>nullptr</tt>.
* Gtk::StatusIcon::property_has_tooltip() will automatically be set to <tt>true</tt> and
* the default handler for the Gtk::StatusIcon::signal_query_tooltip() signal
* will take care of displaying the tooltip.
*
* Note that some platforms have limitations on the length of tooltips
* that they allow on status icons, e.g. Windows only shows the first
* 64 characters.
*
* @newin{2,16}
*
* @return A PropertyProxy that allows you to get or set the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy< Glib::ustring > property_tooltip_text() ;
/** Sets the text of tooltip to be the given string.
*
* Also see Gtk::Tooltip::set_text().
*
* This is a convenience property which will take care of getting the
* tooltip shown if the given string is not <tt>nullptr</tt>.
* Gtk::StatusIcon::property_has_tooltip() will automatically be set to <tt>true</tt> and
* the default handler for the Gtk::StatusIcon::signal_query_tooltip() signal
* will take care of displaying the tooltip.
*
* Note that some platforms have limitations on the length of tooltips
* that they allow on status icons, e.g. Windows only shows the first
* 64 characters.
*
* @newin{2,16}
*
* @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< Glib::ustring > property_tooltip_text() const;
/** Sets the text of tooltip to be the given string, which is marked up
* with the [Pango text markup language][PangoMarkupFormat].
* Also see Gtk::Tooltip::set_markup().
*
* This is a convenience property which will take care of getting the
* tooltip shown if the given string is not <tt>nullptr</tt>.
* Gtk::StatusIcon::property_has_tooltip() will automatically be set to <tt>true</tt> and
* the default handler for the Gtk::StatusIcon::signal_query_tooltip() signal
* will take care of displaying the tooltip.
*
* On some platforms, embedded markup will be ignored.
*
* @newin{2,16}
*
* @return A PropertyProxy that allows you to get or set the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy< Glib::ustring > property_tooltip_markup() ;
/** Sets the text of tooltip to be the given string, which is marked up
* with the [Pango text markup language][PangoMarkupFormat].
* Also see Gtk::Tooltip::set_markup().
*
* This is a convenience property which will take care of getting the
* tooltip shown if the given string is not <tt>nullptr</tt>.
* Gtk::StatusIcon::property_has_tooltip() will automatically be set to <tt>true</tt> and
* the default handler for the Gtk::StatusIcon::signal_query_tooltip() signal
* will take care of displaying the tooltip.
*
* On some platforms, embedded markup will be ignored.
*
* @newin{2,16}
*
* @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< Glib::ustring > property_tooltip_markup() const;
/** The title of this tray icon. This should be a short, human-readable,
* localized string describing the tray icon. It may be used by tools
* like screen readers to render the tray icon.
*
* @newin{2,18}
*
* @return A PropertyProxy that allows you to get or set the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy< Glib::ustring > property_title() ;
/** The title of this tray icon. This should be a short, human-readable,
* localized string describing the tray icon. It may be used by tools
* like screen readers to render the tray icon.
*
* @newin{2,18}
*
* @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
* or receive notification when the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< Glib::ustring > property_title() const;
/**
* @par Slot Prototype:
* <tt>bool on_my_%size_changed(int size)</tt>
*
* Flags: Run Last
*
* Gets emitted when the size available for the image
* changes, e.g.\ because the notification area got resized.
*
* @newin{2,10}
*
* @param size The new size.
* @return <tt>true</tt> if the icon was updated for the new
* size. Otherwise, GTK+ will scale the icon as necessary.
*/
Glib::SignalProxy< bool,int > signal_size_changed();
/**
* @par Slot Prototype:
* <tt>void on_my_%activate()</tt>
*
* Flags: Run First
*
* Gets emitted when the user activates the status icon.
* If and how status icons can activated is platform-dependent.
*
* Unlike most G_SIGNAL_ACTION signals, this signal is meant to
* be used by applications and should be wrapped by language bindings.
*
* @newin{2,10}
*/
Glib::SignalProxy< void > signal_activate();
/**
* @par Slot Prototype:
* <tt>void on_my_%popup_menu(guint button, guint32 activate_time)</tt>
*
* Flags: Run First
*
* Gets emitted when the user brings up the context menu
* of the status icon. Whether status icons can have context
* menus and how these are activated is platform-dependent.
*
* The @a button and @a activate_time parameters should be
* passed as the last to arguments to Gtk::Menu::popup().
*
* Unlike most G_SIGNAL_ACTION signals, this signal is meant to
* be used by applications and should be wrapped by language bindings.
*
* @newin{2,10}
*
* @param button The button that was pressed, or 0 if the
* signal is not emitted in response to a button press event.
* @param activate_time The timestamp of the event that
* triggered the signal emission.
*/
Glib::SignalProxy< void,guint,guint32 > signal_popup_menu();
/**
* @par Slot Prototype:
* <tt>bool on_my_%button_press_event(GdkEventButton* event)</tt>
*
* Flags: Run Last
*
* The signal_button_press_event() signal will be emitted when a button
* (typically from a mouse) is pressed.
*
* Whether this event is emitted is platform-dependent. Use the signal_activate()
* and signal_popup_menu() signals in preference.
*
* @newin{2,14}
*
* @param event The Gdk::EventButton which triggered
* this signal.
* @return <tt>true</tt> to stop other handlers from being invoked
* for the event. <tt>false</tt> to propagate the event further.
*/
Glib::SignalProxy< bool,GdkEventButton* > signal_button_press_event();
/**
* @par Slot Prototype:
* <tt>bool on_my_%button_release_event(GdkEventButton* event)</tt>
*
* Flags: Run Last
*
* The signal_button_release_event() signal will be emitted when a button
* (typically from a mouse) is released.
*
* Whether this event is emitted is platform-dependent. Use the signal_activate()
* and signal_popup_menu() signals in preference.
*
* @newin{2,14}
*
* @param event The Gdk::EventButton which triggered
* this signal.
* @return <tt>true</tt> to stop other handlers from being invoked
* for the event. <tt>false</tt> to propagate the event further.
*/
Glib::SignalProxy< bool,GdkEventButton* > signal_button_release_event();
/**
* @par Slot Prototype:
* <tt>bool on_my_%scroll_event(GdkEventScroll* event)</tt>
*
* Flags: Run Last
*
* The signal_scroll_event() signal is emitted when a button in the 4 to 7
* range is pressed. Wheel mice are usually configured to generate
* button press events for buttons 4 and 5 when the wheel is turned.
*
* Whether this event is emitted is platform-dependent.
*
* @newin{2,16}
*
* @param event The Gdk::EventScroll which triggered
* this signal.
* @return <tt>true</tt> to stop other handlers from being invoked for the event.
* <tt>false</tt> to propagate the event further.
*/
Glib::SignalProxy< bool,GdkEventScroll* > signal_scroll_event();
/**
* @par Slot Prototype:
* <tt>bool on_my_%query_tooltip(int x, int y, bool keyboard_mode, const Glib::RefPtr<Tooltip>& tooltip)</tt>
*
* Flags: Run Last
*
* Emitted when the hover timeout has expired with the
* cursor hovering above @a status_icon; or emitted when @a status_icon got
* focus in keyboard mode.
*
* Using the given coordinates, the signal handler should determine
* whether a tooltip should be shown for @a status_icon. If this is
* the case <tt>true</tt> should be returned, <tt>false</tt> otherwise. Note that if
* @a keyboard_mode is <tt>true</tt>, the values of @a x and @a y are undefined and
* should not be used.
*
* The signal handler is free to manipulate @a tooltip with the therefore
* destined function calls.
*
* Whether this signal is emitted is platform-dependent.
* For plain text tooltips, use Gtk::StatusIcon::property_tooltip_text() in preference.
*
* @newin{2,16}
*
* @param x The x coordinate of the cursor position where the request has been
* emitted, relative to @a status_icon.
* @param y The y coordinate of the cursor position where the request has been
* emitted, relative to @a status_icon.
* @param keyboard_mode <tt>true</tt> if the tooltip was trigged using the keyboard.
* @param tooltip A Gtk::Tooltip.
* @return <tt>true</tt> if @a tooltip should be shown right now, <tt>false</tt> otherwise.
*/
Glib::SignalProxy< bool,int,int,bool,const Glib::RefPtr<Tooltip>& > signal_query_tooltip();
public:
public:
//C++ methods used to invoke GTK+ virtual functions:
protected:
//GTK+ Virtual Functions (override these to change behaviour):
//Default Signal Handlers::
/// This is a default handler for the signal signal_size_changed().
virtual bool on_size_changed(int size);
/// This is a default handler for the signal signal_activate().
virtual void on_activate();
/// This is a default handler for the signal signal_popup_menu().
virtual void on_popup_menu(guint button, guint32 activate_time);
/// This is a default handler for the signal signal_button_press_event().
virtual bool on_button_press_event(GdkEventButton* event);
/// This is a default handler for the signal signal_button_release_event().
virtual bool on_button_release_event(GdkEventButton* event);
/// This is a default handler for the signal signal_scroll_event().
virtual bool on_scroll_event(GdkEventScroll* event);
/// This is a default handler for the signal signal_query_tooltip().
virtual bool on_query_tooltip(int x, int y, bool keyboard_mode, const Glib::RefPtr<Tooltip>& tooltip);
};
} // namespace Gtk
namespace Glib
{
/** A Glib::wrap() method for this object.
*
* @param object The C instance.
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
* @result A C++ instance that wraps this C instance.
*
* @relates Gtk::StatusIcon
*/
Glib::RefPtr<Gtk::StatusIcon> wrap(GtkStatusIcon* object, bool take_copy = false);
}
#endif // GTKMM_DISABLE_DEPRECATED
#endif /* _GTKMM_STATUSICON_H */
|