/usr/share/gnome-shell/ShellMenu-0.1.gir is in gnome-shell-common 3.28.1-0ubuntu2.
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 | <?xml version="1.0"?>
<!-- This file was automatically generated from C sources - DO NOT EDIT!
To affect the contents of this file, edit the original C definitions,
and/or use gtk-doc annotations. -->
<repository version="1.2"
xmlns="http://www.gtk.org/introspection/core/1.0"
xmlns:c="http://www.gtk.org/introspection/c/1.0"
xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
<include name="Gio" version="2.0"/>
<include name="St" version="1.0"/>
<namespace name="ShellMenu"
version="0.1"
shared-library="libgnome-shell-menu.so"
c:identifier-prefixes="Gtk"
c:symbol-prefixes="gtk">
<class name="ActionMuxer"
c:symbol-prefix="action_muxer"
c:type="GtkActionMuxer"
parent="GObject.Object"
glib:type-name="GtkActionMuxer"
glib:get-type="gtk_action_muxer_get_type">
<doc xml:space="preserve">#GtkActionMuxer is a #GActionGroup and #GtkActionObservable that is
capable of containing other #GActionGroup instances.
The typical use is aggregating all of the actions applicable to a
particular context into a single action group, with namespacing.
Consider the case of two action groups -- one containing actions
applicable to an entire application (such as 'quit') and one
containing actions applicable to a particular window in the
application (such as 'fullscreen').
In this case, each of these action groups could be added to a
#GtkActionMuxer with the prefixes "app" and "win", respectively. This
would expose the actions as "app.quit" and "win.fullscreen" on the
#GActionGroup interface presented by the #GtkActionMuxer.
Activations and state change requests on the #GtkActionMuxer are wired
through to the underlying action group in the expected way.
This class is typically only used at the site of "consumption" of
actions (eg: when displaying a menu that contains many actions on
different objects).</doc>
<implements name="Gio.ActionGroup"/>
<implements name="ActionObservable"/>
<constructor name="new" c:identifier="gtk_action_muxer_new">
<doc xml:space="preserve">Creates a new #GtkActionMuxer.</doc>
<return-value transfer-ownership="full">
<type name="ActionMuxer" c:type="GtkActionMuxer*"/>
</return-value>
</constructor>
<method name="get_parent" c:identifier="gtk_action_muxer_get_parent">
<return-value transfer-ownership="none">
<doc xml:space="preserve">the parent of @muxer, or NULL.</doc>
<type name="ActionMuxer" c:type="GtkActionMuxer*"/>
</return-value>
<parameters>
<instance-parameter name="muxer" transfer-ownership="none">
<doc xml:space="preserve">a #GtkActionMuxer</doc>
<type name="ActionMuxer" c:type="GtkActionMuxer*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_primary_accel"
c:identifier="gtk_action_muxer_get_primary_accel">
<return-value transfer-ownership="none">
<type name="utf8" c:type="const gchar*"/>
</return-value>
<parameters>
<instance-parameter name="muxer" transfer-ownership="none">
<type name="ActionMuxer" c:type="GtkActionMuxer*"/>
</instance-parameter>
<parameter name="action_and_target" transfer-ownership="none">
<type name="utf8" c:type="const gchar*"/>
</parameter>
</parameters>
</method>
<method name="insert" c:identifier="gtk_action_muxer_insert">
<doc xml:space="preserve">Adds the actions in @action_group to the list of actions provided by
@muxer. @prefix is prefixed to each action name, such that for each
action <varname>x</varname> in @action_group, there is an equivalent
action @prefix<literal>.</literal><varname>x</varname> in @muxer.
For example, if @prefix is "<literal>app</literal>" and @action_group
contains an action called "<literal>quit</literal>", then @muxer will
now contain an action called "<literal>app.quit</literal>".
If any #GtkActionObservers are registered for actions in the group,
"action_added" notifications will be emitted, as appropriate.
@prefix must not contain a dot ('.').</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="muxer" transfer-ownership="none">
<doc xml:space="preserve">a #GtkActionMuxer</doc>
<type name="ActionMuxer" c:type="GtkActionMuxer*"/>
</instance-parameter>
<parameter name="prefix" transfer-ownership="none">
<doc xml:space="preserve">the prefix string for the action group</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="action_group" transfer-ownership="none">
<doc xml:space="preserve">a #GActionGroup</doc>
<type name="Gio.ActionGroup" c:type="GActionGroup*"/>
</parameter>
</parameters>
</method>
<method name="remove" c:identifier="gtk_action_muxer_remove">
<doc xml:space="preserve">Removes a #GActionGroup from the #GtkActionMuxer.
If any #GtkActionObservers are registered for actions in the group,
"action_removed" notifications will be emitted, as appropriate.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="muxer" transfer-ownership="none">
<doc xml:space="preserve">a #GtkActionMuxer</doc>
<type name="ActionMuxer" c:type="GtkActionMuxer*"/>
</instance-parameter>
<parameter name="prefix" transfer-ownership="none">
<doc xml:space="preserve">the prefix of the action group to remove</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
</parameters>
</method>
<method name="set_parent" c:identifier="gtk_action_muxer_set_parent">
<doc xml:space="preserve">Sets the parent of @muxer to @parent.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="muxer" transfer-ownership="none">
<doc xml:space="preserve">a #GtkActionMuxer</doc>
<type name="ActionMuxer" c:type="GtkActionMuxer*"/>
</instance-parameter>
<parameter name="parent"
transfer-ownership="none"
nullable="1"
allow-none="1">
<doc xml:space="preserve">the new parent #GtkActionMuxer</doc>
<type name="ActionMuxer" c:type="GtkActionMuxer*"/>
</parameter>
</parameters>
</method>
<method name="set_primary_accel"
c:identifier="gtk_action_muxer_set_primary_accel">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="muxer" transfer-ownership="none">
<type name="ActionMuxer" c:type="GtkActionMuxer*"/>
</instance-parameter>
<parameter name="action_and_target" transfer-ownership="none">
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="primary_accel" transfer-ownership="none">
<type name="utf8" c:type="const gchar*"/>
</parameter>
</parameters>
</method>
<property name="parent" writable="1" transfer-ownership="none">
<type name="ActionMuxer"/>
</property>
<glib:signal name="primary-accel-changed" when="last">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="object" transfer-ownership="none">
<type name="utf8" c:type="gchar*"/>
</parameter>
<parameter name="p0" transfer-ownership="none">
<type name="utf8" c:type="gchar*"/>
</parameter>
</parameters>
</glib:signal>
</class>
<interface name="ActionObservable"
c:symbol-prefix="action_observable"
c:type="GtkActionObservable"
glib:type-name="GtkActionObservable"
glib:get-type="gtk_action_observable_get_type"
glib:type-struct="ActionObservableInterface">
<virtual-method name="register_observer" invoker="register_observer">
<doc xml:space="preserve">Registers @observer as being interested in changes to @action_name on
@observable.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="observable" transfer-ownership="none">
<doc xml:space="preserve">a #GtkActionObservable</doc>
<type name="ActionObservable" c:type="GtkActionObservable*"/>
</instance-parameter>
<parameter name="action_name" transfer-ownership="none">
<doc xml:space="preserve">the name of the action</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="observer" transfer-ownership="none">
<doc xml:space="preserve">the #GtkActionObserver to which the events will be reported</doc>
<type name="ActionObserver" c:type="GtkActionObserver*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="unregister_observer" invoker="unregister_observer">
<doc xml:space="preserve">Removes the registration of @observer as being interested in changes
to @action_name on @observable.
If the observer was registered multiple times, it must be
unregistered an equal number of times.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="observable" transfer-ownership="none">
<doc xml:space="preserve">a #GtkActionObservable</doc>
<type name="ActionObservable" c:type="GtkActionObservable*"/>
</instance-parameter>
<parameter name="action_name" transfer-ownership="none">
<doc xml:space="preserve">the name of the action</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="observer" transfer-ownership="none">
<doc xml:space="preserve">the #GtkActionObserver to which the events will be reported</doc>
<type name="ActionObserver" c:type="GtkActionObserver*"/>
</parameter>
</parameters>
</virtual-method>
<method name="register_observer"
c:identifier="gtk_action_observable_register_observer">
<doc xml:space="preserve">Registers @observer as being interested in changes to @action_name on
@observable.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="observable" transfer-ownership="none">
<doc xml:space="preserve">a #GtkActionObservable</doc>
<type name="ActionObservable" c:type="GtkActionObservable*"/>
</instance-parameter>
<parameter name="action_name" transfer-ownership="none">
<doc xml:space="preserve">the name of the action</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="observer" transfer-ownership="none">
<doc xml:space="preserve">the #GtkActionObserver to which the events will be reported</doc>
<type name="ActionObserver" c:type="GtkActionObserver*"/>
</parameter>
</parameters>
</method>
<method name="unregister_observer"
c:identifier="gtk_action_observable_unregister_observer">
<doc xml:space="preserve">Removes the registration of @observer as being interested in changes
to @action_name on @observable.
If the observer was registered multiple times, it must be
unregistered an equal number of times.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="observable" transfer-ownership="none">
<doc xml:space="preserve">a #GtkActionObservable</doc>
<type name="ActionObservable" c:type="GtkActionObservable*"/>
</instance-parameter>
<parameter name="action_name" transfer-ownership="none">
<doc xml:space="preserve">the name of the action</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="observer" transfer-ownership="none">
<doc xml:space="preserve">the #GtkActionObserver to which the events will be reported</doc>
<type name="ActionObserver" c:type="GtkActionObserver*"/>
</parameter>
</parameters>
</method>
</interface>
<record name="ActionObservableInterface"
c:type="GtkActionObservableInterface"
glib:is-gtype-struct-for="ActionObservable">
<field name="g_iface">
<type name="GObject.TypeInterface" c:type="GTypeInterface"/>
</field>
<field name="register_observer">
<callback name="register_observer">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="observable" transfer-ownership="none">
<doc xml:space="preserve">a #GtkActionObservable</doc>
<type name="ActionObservable" c:type="GtkActionObservable*"/>
</parameter>
<parameter name="action_name" transfer-ownership="none">
<doc xml:space="preserve">the name of the action</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="observer" transfer-ownership="none">
<doc xml:space="preserve">the #GtkActionObserver to which the events will be reported</doc>
<type name="ActionObserver" c:type="GtkActionObserver*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="unregister_observer">
<callback name="unregister_observer">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="observable" transfer-ownership="none">
<doc xml:space="preserve">a #GtkActionObservable</doc>
<type name="ActionObservable" c:type="GtkActionObservable*"/>
</parameter>
<parameter name="action_name" transfer-ownership="none">
<doc xml:space="preserve">the name of the action</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="observer" transfer-ownership="none">
<doc xml:space="preserve">the #GtkActionObserver to which the events will be reported</doc>
<type name="ActionObserver" c:type="GtkActionObserver*"/>
</parameter>
</parameters>
</callback>
</field>
</record>
<interface name="ActionObserver"
c:symbol-prefix="action_observer"
c:type="GtkActionObserver"
glib:type-name="GtkActionObserver"
glib:get-type="gtk_action_observer_get_type"
glib:type-struct="ActionObserverInterface">
<doc xml:space="preserve">GtkActionObserver is a simple interface allowing objects that wish to
be notified of changes to actions to be notified of those changes.
It is also possible to monitor changes to action groups using
#GObject signals, but there are a number of reasons that this
approach could become problematic:
- there are four separate signals that must be manually connected
and disconnected
- when a large number of different observers wish to monitor a
(usually disjoint) set of actions within the same action group,
there is only one way to avoid having all notifications delivered
to all observers: signal detail. In order to use signal detail,
each action name must be quarked, which is not always practical.
- even if quarking is acceptable, #GObject signal details are
implemented by scanning a linked list, so there is no real
decrease in complexity</doc>
<virtual-method name="action_added" invoker="action_added">
<doc xml:space="preserve">This function is called when an action that the observer is
registered to receive events for is added.
This function should only be called by objects with which the
observer has explicitly registered itself to receive events.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="observer" transfer-ownership="none">
<doc xml:space="preserve">a #GtkActionObserver</doc>
<type name="ActionObserver" c:type="GtkActionObserver*"/>
</instance-parameter>
<parameter name="observable" transfer-ownership="none">
<doc xml:space="preserve">the source of the event</doc>
<type name="ActionObservable" c:type="GtkActionObservable*"/>
</parameter>
<parameter name="action_name" transfer-ownership="none">
<doc xml:space="preserve">the name of the action</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="parameter_type" transfer-ownership="none">
<doc xml:space="preserve">the parameter type for action invocations, or %NULL
if no parameter is required</doc>
<type name="GLib.VariantType" c:type="const GVariantType*"/>
</parameter>
<parameter name="enabled" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the action is now enabled</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="state" transfer-ownership="none">
<doc xml:space="preserve">the current state of the action, or %NULL if the action is
stateless</doc>
<type name="GLib.Variant" c:type="GVariant*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="action_enabled_changed"
invoker="action_enabled_changed">
<doc xml:space="preserve">This function is called when an action that the observer is
registered to receive events for becomes enabled or disabled.
This function should only be called by objects with which the
observer has explicitly registered itself to receive events.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="observer" transfer-ownership="none">
<doc xml:space="preserve">a #GtkActionObserver</doc>
<type name="ActionObserver" c:type="GtkActionObserver*"/>
</instance-parameter>
<parameter name="observable" transfer-ownership="none">
<doc xml:space="preserve">the source of the event</doc>
<type name="ActionObservable" c:type="GtkActionObservable*"/>
</parameter>
<parameter name="action_name" transfer-ownership="none">
<doc xml:space="preserve">the name of the action</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="enabled" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the action is now enabled</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="action_removed" invoker="action_removed">
<doc xml:space="preserve">This function is called when an action that the observer is
registered to receive events for is removed.
This function should only be called by objects with which the
observer has explicitly registered itself to receive events.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="observer" transfer-ownership="none">
<doc xml:space="preserve">a #GtkActionObserver</doc>
<type name="ActionObserver" c:type="GtkActionObserver*"/>
</instance-parameter>
<parameter name="observable" transfer-ownership="none">
<doc xml:space="preserve">the source of the event</doc>
<type name="ActionObservable" c:type="GtkActionObservable*"/>
</parameter>
<parameter name="action_name" transfer-ownership="none">
<doc xml:space="preserve">the name of the action</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="action_state_changed"
invoker="action_state_changed">
<doc xml:space="preserve">This function is called when an action that the observer is
registered to receive events for changes to its state.
This function should only be called by objects with which the
observer has explicitly registered itself to receive events.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="observer" transfer-ownership="none">
<doc xml:space="preserve">a #GtkActionObserver</doc>
<type name="ActionObserver" c:type="GtkActionObserver*"/>
</instance-parameter>
<parameter name="observable" transfer-ownership="none">
<doc xml:space="preserve">the source of the event</doc>
<type name="ActionObservable" c:type="GtkActionObservable*"/>
</parameter>
<parameter name="action_name" transfer-ownership="none">
<doc xml:space="preserve">the name of the action</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="state" transfer-ownership="none">
<doc xml:space="preserve">the new state of the action</doc>
<type name="GLib.Variant" c:type="GVariant*"/>
</parameter>
</parameters>
</virtual-method>
<virtual-method name="primary_accel_changed"
invoker="primary_accel_changed">
<doc xml:space="preserve">This function is called when an action that the observer is
registered to receive events for has one of its accelerators changed.
Accelerator changes are reported for all targets associated with the
action. The @action_and_target string should be used to check if the
reported target is the one that the observer is interested in.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="observer" transfer-ownership="none">
<doc xml:space="preserve">a #GtkActionObserver</doc>
<type name="ActionObserver" c:type="GtkActionObserver*"/>
</instance-parameter>
<parameter name="observable" transfer-ownership="none">
<doc xml:space="preserve">the source of the event</doc>
<type name="ActionObservable" c:type="GtkActionObservable*"/>
</parameter>
<parameter name="action_name" transfer-ownership="none">
<doc xml:space="preserve">the name of the action</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="action_and_target" transfer-ownership="none">
<doc xml:space="preserve">detailed action of the changed accel, in "action and target" format</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
</parameters>
</virtual-method>
<method name="action_added"
c:identifier="gtk_action_observer_action_added">
<doc xml:space="preserve">This function is called when an action that the observer is
registered to receive events for is added.
This function should only be called by objects with which the
observer has explicitly registered itself to receive events.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="observer" transfer-ownership="none">
<doc xml:space="preserve">a #GtkActionObserver</doc>
<type name="ActionObserver" c:type="GtkActionObserver*"/>
</instance-parameter>
<parameter name="observable" transfer-ownership="none">
<doc xml:space="preserve">the source of the event</doc>
<type name="ActionObservable" c:type="GtkActionObservable*"/>
</parameter>
<parameter name="action_name" transfer-ownership="none">
<doc xml:space="preserve">the name of the action</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="parameter_type" transfer-ownership="none">
<doc xml:space="preserve">the parameter type for action invocations, or %NULL
if no parameter is required</doc>
<type name="GLib.VariantType" c:type="const GVariantType*"/>
</parameter>
<parameter name="enabled" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the action is now enabled</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="state" transfer-ownership="none">
<doc xml:space="preserve">the current state of the action, or %NULL if the action is
stateless</doc>
<type name="GLib.Variant" c:type="GVariant*"/>
</parameter>
</parameters>
</method>
<method name="action_enabled_changed"
c:identifier="gtk_action_observer_action_enabled_changed">
<doc xml:space="preserve">This function is called when an action that the observer is
registered to receive events for becomes enabled or disabled.
This function should only be called by objects with which the
observer has explicitly registered itself to receive events.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="observer" transfer-ownership="none">
<doc xml:space="preserve">a #GtkActionObserver</doc>
<type name="ActionObserver" c:type="GtkActionObserver*"/>
</instance-parameter>
<parameter name="observable" transfer-ownership="none">
<doc xml:space="preserve">the source of the event</doc>
<type name="ActionObservable" c:type="GtkActionObservable*"/>
</parameter>
<parameter name="action_name" transfer-ownership="none">
<doc xml:space="preserve">the name of the action</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="enabled" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the action is now enabled</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<method name="action_removed"
c:identifier="gtk_action_observer_action_removed">
<doc xml:space="preserve">This function is called when an action that the observer is
registered to receive events for is removed.
This function should only be called by objects with which the
observer has explicitly registered itself to receive events.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="observer" transfer-ownership="none">
<doc xml:space="preserve">a #GtkActionObserver</doc>
<type name="ActionObserver" c:type="GtkActionObserver*"/>
</instance-parameter>
<parameter name="observable" transfer-ownership="none">
<doc xml:space="preserve">the source of the event</doc>
<type name="ActionObservable" c:type="GtkActionObservable*"/>
</parameter>
<parameter name="action_name" transfer-ownership="none">
<doc xml:space="preserve">the name of the action</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
</parameters>
</method>
<method name="action_state_changed"
c:identifier="gtk_action_observer_action_state_changed">
<doc xml:space="preserve">This function is called when an action that the observer is
registered to receive events for changes to its state.
This function should only be called by objects with which the
observer has explicitly registered itself to receive events.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="observer" transfer-ownership="none">
<doc xml:space="preserve">a #GtkActionObserver</doc>
<type name="ActionObserver" c:type="GtkActionObserver*"/>
</instance-parameter>
<parameter name="observable" transfer-ownership="none">
<doc xml:space="preserve">the source of the event</doc>
<type name="ActionObservable" c:type="GtkActionObservable*"/>
</parameter>
<parameter name="action_name" transfer-ownership="none">
<doc xml:space="preserve">the name of the action</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="state" transfer-ownership="none">
<doc xml:space="preserve">the new state of the action</doc>
<type name="GLib.Variant" c:type="GVariant*"/>
</parameter>
</parameters>
</method>
<method name="primary_accel_changed"
c:identifier="gtk_action_observer_primary_accel_changed">
<doc xml:space="preserve">This function is called when an action that the observer is
registered to receive events for has one of its accelerators changed.
Accelerator changes are reported for all targets associated with the
action. The @action_and_target string should be used to check if the
reported target is the one that the observer is interested in.</doc>
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="observer" transfer-ownership="none">
<doc xml:space="preserve">a #GtkActionObserver</doc>
<type name="ActionObserver" c:type="GtkActionObserver*"/>
</instance-parameter>
<parameter name="observable" transfer-ownership="none">
<doc xml:space="preserve">the source of the event</doc>
<type name="ActionObservable" c:type="GtkActionObservable*"/>
</parameter>
<parameter name="action_name" transfer-ownership="none">
<doc xml:space="preserve">the name of the action</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="action_and_target" transfer-ownership="none">
<doc xml:space="preserve">detailed action of the changed accel, in "action and target" format</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
</parameters>
</method>
</interface>
<record name="ActionObserverInterface"
c:type="GtkActionObserverInterface"
glib:is-gtype-struct-for="ActionObserver">
<field name="g_iface">
<type name="GObject.TypeInterface" c:type="GTypeInterface"/>
</field>
<field name="action_added">
<callback name="action_added">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="observer" transfer-ownership="none">
<doc xml:space="preserve">a #GtkActionObserver</doc>
<type name="ActionObserver" c:type="GtkActionObserver*"/>
</parameter>
<parameter name="observable" transfer-ownership="none">
<doc xml:space="preserve">the source of the event</doc>
<type name="ActionObservable" c:type="GtkActionObservable*"/>
</parameter>
<parameter name="action_name" transfer-ownership="none">
<doc xml:space="preserve">the name of the action</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="parameter_type" transfer-ownership="none">
<doc xml:space="preserve">the parameter type for action invocations, or %NULL
if no parameter is required</doc>
<type name="GLib.VariantType" c:type="const GVariantType*"/>
</parameter>
<parameter name="enabled" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the action is now enabled</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
<parameter name="state" transfer-ownership="none">
<doc xml:space="preserve">the current state of the action, or %NULL if the action is
stateless</doc>
<type name="GLib.Variant" c:type="GVariant*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="action_enabled_changed">
<callback name="action_enabled_changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="observer" transfer-ownership="none">
<doc xml:space="preserve">a #GtkActionObserver</doc>
<type name="ActionObserver" c:type="GtkActionObserver*"/>
</parameter>
<parameter name="observable" transfer-ownership="none">
<doc xml:space="preserve">the source of the event</doc>
<type name="ActionObservable" c:type="GtkActionObservable*"/>
</parameter>
<parameter name="action_name" transfer-ownership="none">
<doc xml:space="preserve">the name of the action</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="enabled" transfer-ownership="none">
<doc xml:space="preserve">%TRUE if the action is now enabled</doc>
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</callback>
</field>
<field name="action_state_changed">
<callback name="action_state_changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="observer" transfer-ownership="none">
<doc xml:space="preserve">a #GtkActionObserver</doc>
<type name="ActionObserver" c:type="GtkActionObserver*"/>
</parameter>
<parameter name="observable" transfer-ownership="none">
<doc xml:space="preserve">the source of the event</doc>
<type name="ActionObservable" c:type="GtkActionObservable*"/>
</parameter>
<parameter name="action_name" transfer-ownership="none">
<doc xml:space="preserve">the name of the action</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="state" transfer-ownership="none">
<doc xml:space="preserve">the new state of the action</doc>
<type name="GLib.Variant" c:type="GVariant*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="action_removed">
<callback name="action_removed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="observer" transfer-ownership="none">
<doc xml:space="preserve">a #GtkActionObserver</doc>
<type name="ActionObserver" c:type="GtkActionObserver*"/>
</parameter>
<parameter name="observable" transfer-ownership="none">
<doc xml:space="preserve">the source of the event</doc>
<type name="ActionObservable" c:type="GtkActionObservable*"/>
</parameter>
<parameter name="action_name" transfer-ownership="none">
<doc xml:space="preserve">the name of the action</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
</parameters>
</callback>
</field>
<field name="primary_accel_changed">
<callback name="primary_accel_changed">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="observer" transfer-ownership="none">
<doc xml:space="preserve">a #GtkActionObserver</doc>
<type name="ActionObserver" c:type="GtkActionObserver*"/>
</parameter>
<parameter name="observable" transfer-ownership="none">
<doc xml:space="preserve">the source of the event</doc>
<type name="ActionObservable" c:type="GtkActionObservable*"/>
</parameter>
<parameter name="action_name" transfer-ownership="none">
<doc xml:space="preserve">the name of the action</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="action_and_target" transfer-ownership="none">
<doc xml:space="preserve">detailed action of the changed accel, in "action and target" format</doc>
<type name="utf8" c:type="const gchar*"/>
</parameter>
</parameters>
</callback>
</field>
</record>
<class name="MenuTrackerItem"
c:symbol-prefix="menu_tracker_item"
c:type="GtkMenuTrackerItem"
parent="GObject.Object"
glib:type-name="GtkMenuTrackerItem"
glib:get-type="gtk_menu_tracker_item_get_type">
<doc xml:space="preserve">A #GtkMenuTrackerItem is a small helper class used by #GtkMenuTracker to
represent menu items. It has one of three classes: normal item, separator,
or submenu.
If an item is one of the non-normal classes (submenu, separator), only the
label of the item needs to be respected. Otherwise, all the properties
of the item contribute to the item's appearance and state.
Implementing the appearance of the menu item is up to toolkits, and certain
toolkits may choose to ignore certain properties, like icon or accel. The
role of the item determines its accessibility role, along with its
decoration if the GtkMenuTrackerItem::toggled property is true. As an
example, if the item has the role %GTK_MENU_TRACKER_ITEM_ROLE_CHECK and
GtkMenuTrackerItem::toggled is %FALSE, its accessible role should be that of
a check menu item, and no decoration should be drawn. But if
GtkMenuTrackerItem::toggled is %TRUE, a checkmark should be drawn.
All properties except for the two class-determining properties,
GtkMenuTrackerItem::is-separator and GtkMenuTrackerItem::has-submenu are
allowed to change, so listen to the notify signals to update your item's
appearance. When using a GObject library, this can conveniently be done
with g_object_bind_property() and #GBinding, and this is how this is
implemented in GTK+; the appearance side is implemented in #GtkModelMenuItem.
When an item is clicked, simply call gtk_menu_tracker_item_activated() in
response. The #GtkMenuTrackerItem will take care of everything related to
activating the item and will itself update the state of all items in
response.
Submenus are a special case of menu item. When an item is a submenu, you
should create a submenu for it with gtk_menu_tracker_new_item_for_submenu(),
and apply the same menu tracking logic you would for a toplevel menu.
Applications using submenus may want to lazily build their submenus in
response to the user clicking on it, as building a submenu may be expensive.
Thus, the submenu has two special controls -- the submenu's visibility
should be controlled by the GtkMenuTrackerItem::submenu-shown property,
and if a user clicks on the submenu, do not immediately show the menu,
but call gtk_menu_tracker_item_request_submenu_shown() and wait for the
GtkMenuTrackerItem::submenu-shown property to update. If the user navigates,
the application may want to be notified so it can cancel the expensive
operation that it was using to build the submenu. Thus,
gtk_menu_tracker_item_request_submenu_shown() takes a boolean parameter.
Use %TRUE when the user wants to open the submenu, and %FALSE when the
user wants to close the submenu.</doc>
<implements name="ActionObserver"/>
<method name="activated" c:identifier="gtk_menu_tracker_item_activated">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<type name="MenuTrackerItem" c:type="GtkMenuTrackerItem*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_accel" c:identifier="gtk_menu_tracker_item_get_accel">
<return-value transfer-ownership="none">
<type name="utf8" c:type="const gchar*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<type name="MenuTrackerItem" c:type="GtkMenuTrackerItem*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_has_submenu"
c:identifier="gtk_menu_tracker_item_get_has_submenu">
<doc xml:space="preserve">Returns whether the menu item has a submenu. If so, only
certain properties may need to be obeyed. See the documentation
for #GtkMenuTrackerItem.</doc>
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">A #GtkMenuTrackerItem instance</doc>
<type name="MenuTrackerItem" c:type="GtkMenuTrackerItem*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_icon" c:identifier="gtk_menu_tracker_item_get_icon">
<return-value transfer-ownership="full">
<type name="Gio.Icon" c:type="GIcon*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<type name="MenuTrackerItem" c:type="GtkMenuTrackerItem*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_is_separator"
c:identifier="gtk_menu_tracker_item_get_is_separator">
<doc xml:space="preserve">Returns whether the menu item is a separator. If so, only
certain properties may need to be obeyed. See the documentation
for #GtkMenuTrackerItem.</doc>
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<doc xml:space="preserve">A #GtkMenuTrackerItem instance</doc>
<type name="MenuTrackerItem" c:type="GtkMenuTrackerItem*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_label" c:identifier="gtk_menu_tracker_item_get_label">
<return-value transfer-ownership="none">
<type name="utf8" c:type="const gchar*"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<type name="MenuTrackerItem" c:type="GtkMenuTrackerItem*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_role" c:identifier="gtk_menu_tracker_item_get_role">
<return-value transfer-ownership="none">
<type name="MenuTrackerItemRole" c:type="GtkMenuTrackerItemRole"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<type name="MenuTrackerItem" c:type="GtkMenuTrackerItem*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_sensitive"
c:identifier="gtk_menu_tracker_item_get_sensitive">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<type name="MenuTrackerItem" c:type="GtkMenuTrackerItem*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_should_request_show"
c:identifier="gtk_menu_tracker_item_get_should_request_show">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<type name="MenuTrackerItem" c:type="GtkMenuTrackerItem*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_submenu_shown"
c:identifier="gtk_menu_tracker_item_get_submenu_shown">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<type name="MenuTrackerItem" c:type="GtkMenuTrackerItem*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_toggled"
c:identifier="gtk_menu_tracker_item_get_toggled">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<type name="MenuTrackerItem" c:type="GtkMenuTrackerItem*"/>
</instance-parameter>
</parameters>
</method>
<method name="get_visible"
c:identifier="gtk_menu_tracker_item_get_visible">
<return-value transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<type name="MenuTrackerItem" c:type="GtkMenuTrackerItem*"/>
</instance-parameter>
</parameters>
</method>
<method name="request_submenu_shown"
c:identifier="gtk_menu_tracker_item_request_submenu_shown">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<instance-parameter name="self" transfer-ownership="none">
<type name="MenuTrackerItem" c:type="GtkMenuTrackerItem*"/>
</instance-parameter>
<parameter name="shown" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</method>
<property name="accel" transfer-ownership="none">
<type name="utf8" c:type="gchar*"/>
</property>
<property name="has-submenu" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="icon" transfer-ownership="none">
<type name="Gio.Icon"/>
</property>
<property name="is-separator" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="label" transfer-ownership="none">
<type name="utf8" c:type="gchar*"/>
</property>
<property name="role" transfer-ownership="none">
<type name="MenuTrackerItemRole"/>
</property>
<property name="sensitive" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="submenu-shown" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="toggled" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<property name="visible" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</property>
<glib:signal name="visibility-changed" when="first">
<return-value transfer-ownership="none">
<type name="none" c:type="void"/>
</return-value>
<parameters>
<parameter name="object" transfer-ownership="none">
<type name="gboolean" c:type="gboolean"/>
</parameter>
</parameters>
</glib:signal>
</class>
<enumeration name="MenuTrackerItemRole"
glib:type-name="GtkMenuTrackerItemRole"
glib:get-type="gtk_menu_tracker_item_role_get_type"
c:type="GtkMenuTrackerItemRole">
<member name="normal"
value="0"
c:identifier="GTK_MENU_TRACKER_ITEM_ROLE_NORMAL"
glib:nick="normal">
</member>
<member name="check"
value="1"
c:identifier="GTK_MENU_TRACKER_ITEM_ROLE_CHECK"
glib:nick="check">
</member>
<member name="radio"
value="2"
c:identifier="GTK_MENU_TRACKER_ITEM_ROLE_RADIO"
glib:nick="radio">
</member>
</enumeration>
<function name="print_action_and_target"
c:identifier="gtk_print_action_and_target">
<return-value transfer-ownership="full">
<type name="utf8" c:type="gchar*"/>
</return-value>
<parameters>
<parameter name="action_namespace" transfer-ownership="none">
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="action_name" transfer-ownership="none">
<type name="utf8" c:type="const gchar*"/>
</parameter>
<parameter name="target" transfer-ownership="none">
<type name="GLib.Variant" c:type="GVariant*"/>
</parameter>
</parameters>
</function>
</namespace>
</repository>
|