source: appstream-generator/build/girepo/gio/DesktopAppInfoLookupT.d @ 4841

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

Initial release

File size: 2.2 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.DesktopAppInfoLookupT;
22
23public  import gi.gio;
24public  import gi.giotypes;
25public  import gio.AppInfo;
26public  import gio.AppInfoIF;
27public  import glib.Str;
28public  import gobject.ObjectG;
29
30
31/**
32 * #GDesktopAppInfoLookup is an opaque data structure and can only be accessed
33 * using the following functions.
34 */
35public template DesktopAppInfoLookupT(TStruct)
36{
37        /** Get the main Gtk struct */
38        public GDesktopAppInfoLookup* getDesktopAppInfoLookupStruct()
39        {
40                return cast(GDesktopAppInfoLookup*)getStruct();
41        }
42
43
44        /**
45         * Gets the default application for launching applications
46         * using this URI scheme for a particular GDesktopAppInfoLookup
47         * implementation.
48         *
49         * The GDesktopAppInfoLookup interface and this function is used
50         * to implement g_app_info_get_default_for_uri_scheme() backends
51         * in a GIO module. There is no reason for applications to use it
52         * directly. Applications should use g_app_info_get_default_for_uri_scheme().
53         *
54         * Deprecated: The #GDesktopAppInfoLookup interface is deprecated and unused by gio.
55         *
56         * Params:
57         *     uriScheme = a string containing a URI scheme.
58         *
59         * Returns: #GAppInfo for given @uri_scheme or %NULL on error.
60         */
61        public AppInfoIF getDefaultForUriScheme(string uriScheme)
62        {
63                auto p = g_desktop_app_info_lookup_get_default_for_uri_scheme(getDesktopAppInfoLookupStruct(), Str.toStringz(uriScheme));
64               
65                if(p is null)
66                {
67                        return null;
68                }
69               
70                return ObjectG.getDObject!(AppInfo, AppInfoIF)(cast(GAppInfo*) p, true);
71        }
72}
Note: See TracBrowser for help on using the repository browser.