source: appstream-generator/build/girepo/gio/DBusActionGroup.d

Last change on this file was 4841, checked in by Juanma, 2 years ago

Initial release

File size: 4.1 KB
Line 
1/*
2 * Licensed under the GNU Lesser General Public License Version 3
3 *
4 * This library is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation, either version 3 of the license, or
7 * (at your option) any later version.
8 *
9 * This software is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 * GNU Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this library.  If not, see <http://www.gnu.org/licenses/>.
16 */
17
18// generated automatically - do not change
19
20
21module gio.DBusActionGroup;
22
23private import gi.gio;
24public  import gi.giotypes;
25private import gio.ActionGroupIF;
26private import gio.ActionGroupT;
27private import gio.DBusConnection;
28private import gio.RemoteActionGroupIF;
29private import gio.RemoteActionGroupT;
30private import glib.ConstructionException;
31private import glib.Str;
32private import gobject.ObjectG;
33
34
35/**
36 * #GDBusActionGroup is an implementation of the #GActionGroup
37 * interface that can be used as a proxy for an action group
38 * that is exported over D-Bus with g_dbus_connection_export_action_group().
39 */
40public class DBusActionGroup : ObjectG, ActionGroupIF, RemoteActionGroupIF
41{
42        /** the main Gtk struct */
43        protected GDBusActionGroup* gDBusActionGroup;
44
45        /** Get the main Gtk struct */
46        public GDBusActionGroup* getDBusActionGroupStruct()
47        {
48                return gDBusActionGroup;
49        }
50
51        /** the main Gtk struct as a void* */
52        protected override void* getStruct()
53        {
54                return cast(void*)gDBusActionGroup;
55        }
56
57        protected override void setStruct(GObject* obj)
58        {
59                gDBusActionGroup = cast(GDBusActionGroup*)obj;
60                super.setStruct(obj);
61        }
62
63        /**
64         * Sets our main struct and passes it to the parent class.
65         */
66        public this (GDBusActionGroup* gDBusActionGroup, bool ownedRef = false)
67        {
68                this.gDBusActionGroup = gDBusActionGroup;
69                super(cast(GObject*)gDBusActionGroup, ownedRef);
70        }
71
72        // add the ActionGroup capabilities
73        mixin ActionGroupT!(GDBusActionGroup);
74
75        // add the RemoteActionGroup capabilities
76        mixin RemoteActionGroupT!(GDBusActionGroup);
77
78        /**
79         * See_Also: get().
80         */
81        this(DBusConnection connection, string busName, string objectPath)
82        {
83                auto p =  g_dbus_action_group_get((connection is null) ? null : connection.getDBusConnectionStruct(), Str.toStringz(busName), Str.toStringz(objectPath));
84               
85                if(p is null)
86                {
87                        throw new ConstructionException("null returned by g_dbus_action_group_get");
88                }
89                this(cast(GDBusActionGroup*) p, true);
90        }
91
92        /**
93         */
94
95        /** */
96        public static GType getType()
97        {
98                return g_dbus_action_group_get_type();
99        }
100
101        /**
102         * Obtains a #GDBusActionGroup for the action group which is exported at
103         * the given @bus_name and @object_path.
104         *
105         * The thread default main context is taken at the time of this call.
106         * All signals on the menu model (and any linked models) are reported
107         * with respect to this context.  All calls on the returned menu model
108         * (and linked models) must also originate from this same context, with
109         * the thread default main context unchanged.
110         *
111         * This call is non-blocking.  The returned action group may or may not
112         * already be filled in.  The correct thing to do is connect the signals
113         * for the action group to monitor for changes and then to call
114         * g_action_group_list_actions() to get the initial list.
115         *
116         * Params:
117         *     connection = A #GDBusConnection
118         *     busName = the bus name which exports the action group
119         *     objectPath = the object path at which the action group is exported
120         *
121         * Returns: a #GDBusActionGroup
122         *
123         * Since: 2.32
124         */
125        public static DBusActionGroup get(DBusConnection connection, string busName, string objectPath)
126        {
127                auto p = g_dbus_action_group_get((connection is null) ? null : connection.getDBusConnectionStruct(), Str.toStringz(busName), Str.toStringz(objectPath));
128               
129                if(p is null)
130                {
131                        return null;
132                }
133               
134                return ObjectG.getDObject!(DBusActionGroup)(cast(GDBusActionGroup*) p, true);
135        }
136}
Note: See TracBrowser for help on using the repository browser.