Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gdesktopappinfo.h
Go to the documentation of this file.
1/* GIO - GLib Input, Output and Streaming Library
2 *
3 * Copyright (C) 2006-2007 Red Hat, Inc.
4 *
5 * SPDX-License-Identifier: LGPL-2.1-or-later
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General
18 * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
19 *
20 * Author: Alexander Larsson <alexl@redhat.com>
21 */
22
23#ifndef __G_DESKTOP_APP_INFO_H__
24#define __G_DESKTOP_APP_INFO_H__
25
26#include <gio/gio.h>
27
29
30#define G_TYPE_DESKTOP_APP_INFO (g_desktop_app_info_get_type ())
31#define G_DESKTOP_APP_INFO(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DESKTOP_APP_INFO, GDesktopAppInfo))
32#define G_DESKTOP_APP_INFO_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DESKTOP_APP_INFO, GDesktopAppInfoClass))
33#define G_IS_DESKTOP_APP_INFO(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DESKTOP_APP_INFO))
34#define G_IS_DESKTOP_APP_INFO_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DESKTOP_APP_INFO))
35#define G_DESKTOP_APP_INFO_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DESKTOP_APP_INFO, GDesktopAppInfoClass))
36
37typedef struct _GDesktopAppInfo GDesktopAppInfo;
39
41
46
47
50
55
58
69 const gchar *desktop_env);
72
74GDesktopAppInfo *g_desktop_app_info_new (const char *desktop_id);
77
79void g_desktop_app_info_set_desktop_env (const char *desktop_env);
80
83 const char *key);
86 const char *key);
89 const char *key);
92 const char *key);
93
96 const char *key,
97 gsize *length);
98
101
104 const gchar *action_name,
105 GAppLaunchContext *launch_context);
106
109 const gchar *action_name);
110
111#define G_TYPE_DESKTOP_APP_INFO_LOOKUP (g_desktop_app_info_lookup_get_type ()) GIO_DEPRECATED_MACRO_IN_2_28
112#define G_DESKTOP_APP_INFO_LOOKUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_DESKTOP_APP_INFO_LOOKUP, GDesktopAppInfoLookup)) GIO_DEPRECATED_MACRO_IN_2_28
113#define G_IS_DESKTOP_APP_INFO_LOOKUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_DESKTOP_APP_INFO_LOOKUP)) GIO_DEPRECATED_MACRO_IN_2_28
114#define G_DESKTOP_APP_INFO_LOOKUP_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_DESKTOP_APP_INFO_LOOKUP, GDesktopAppInfoLookupIface)) GIO_DEPRECATED_MACRO_IN_2_28
115
116/**
117 * G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME:
118 *
119 * Extension point for default handler to URI association. See
120 * [Extending GIO][extending-gio].
121 *
122 * Deprecated: 2.28: The #GDesktopAppInfoLookup interface is deprecated and
123 * unused by GIO.
124 */
125#define G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME "gio-desktop-app-info-lookup" GIO_DEPRECATED_MACRO_IN_2_28
126
127/**
128 * GDesktopAppInfoLookupIface:
129 * @get_default_for_uri_scheme: Virtual method for
130 * g_desktop_app_info_lookup_get_default_for_uri_scheme().
131 *
132 * Interface that is used by backends to associate default
133 * handlers with URI schemes.
134 */
135typedef struct _GDesktopAppInfoLookup GDesktopAppInfoLookup;
137
139{
141
142 GAppInfo * (* get_default_for_uri_scheme) (GDesktopAppInfoLookup *lookup,
143 const char *uri_scheme);
144};
145
148
151 const char *uri_scheme);
152
153/**
154 * GDesktopAppLaunchCallback:
155 * @appinfo: a #GDesktopAppInfo
156 * @pid: Process identifier
157 * @user_data: User data
158 *
159 * During invocation, g_desktop_app_info_launch_uris_as_manager() may
160 * create one or more child processes. This callback is invoked once
161 * for each, providing the process ID.
162 */
164 GPid pid,
165 gpointer user_data);
166
169 GList *uris,
170 GAppLaunchContext *launch_context,
171 GSpawnFlags spawn_flags,
172 GSpawnChildSetupFunc user_setup,
173 gpointer user_setup_data,
174 GDesktopAppLaunchCallback pid_callback,
175 gpointer pid_callback_data,
176 GError **error);
177
180 GList *uris,
181 GAppLaunchContext *launch_context,
182 GSpawnFlags spawn_flags,
183 GSpawnChildSetupFunc user_setup,
184 gpointer user_setup_data,
185 GDesktopAppLaunchCallback pid_callback,
186 gpointer pid_callback_data,
187 gint stdin_fd,
188 gint stdout_fd,
189 gint stderr_fd,
190 GError **error);
191
193gchar *** g_desktop_app_info_search (const gchar *search_string);
194
197
199
200#endif /* __G_DESKTOP_APP_INFO_H__ */
GIO_AVAILABLE_IN_2_30 gboolean g_desktop_app_info_get_show_in(GDesktopAppInfo *info, const gchar *desktop_env)
GIO_AVAILABLE_IN_2_60 gchar ** g_desktop_app_info_get_string_list(GDesktopAppInfo *info, const char *key, gsize *length)
GIO_AVAILABLE_IN_2_28 gboolean g_desktop_app_info_launch_uris_as_manager(GDesktopAppInfo *appinfo, GList *uris, GAppLaunchContext *launch_context, GSpawnFlags spawn_flags, GSpawnChildSetupFunc user_setup, gpointer user_setup_data, GDesktopAppLaunchCallback pid_callback, gpointer pid_callback_data, GError **error)
GIO_AVAILABLE_IN_2_30 gboolean g_desktop_app_info_get_nodisplay(GDesktopAppInfo *info)
struct _GDesktopAppInfo GDesktopAppInfo
GIO_AVAILABLE_IN_2_40 gchar *** g_desktop_app_info_search(const gchar *search_string)
GIO_AVAILABLE_IN_2_42 GList * g_desktop_app_info_get_implementations(const gchar *interface)
GIO_AVAILABLE_IN_2_36 gboolean g_desktop_app_info_get_boolean(GDesktopAppInfo *info, const char *key)
GIO_AVAILABLE_IN_ALL gboolean g_desktop_app_info_get_is_hidden(GDesktopAppInfo *info)
GIO_AVAILABLE_IN_2_56 char * g_desktop_app_info_get_locale_string(GDesktopAppInfo *info, const char *key)
GIO_AVAILABLE_IN_ALL GDesktopAppInfo * g_desktop_app_info_new_from_filename(const char *filename)
GIO_AVAILABLE_IN_2_30 const char * g_desktop_app_info_get_categories(GDesktopAppInfo *info)
GIO_AVAILABLE_IN_2_38 gchar * g_desktop_app_info_get_action_name(GDesktopAppInfo *info, const gchar *action_name)
GIO_AVAILABLE_IN_ALL const char * g_desktop_app_info_get_filename(GDesktopAppInfo *info)
GIO_AVAILABLE_IN_2_34 const char * g_desktop_app_info_get_startup_wm_class(GDesktopAppInfo *info)
GIO_AVAILABLE_IN_ALL GDesktopAppInfo * g_desktop_app_info_new_from_keyfile(GKeyFile *key_file)
GIO_DEPRECATED GAppInfo * g_desktop_app_info_lookup_get_default_for_uri_scheme(GDesktopAppInfoLookup *lookup, const char *uri_scheme)
GIO_AVAILABLE_IN_2_38 const gchar *const * g_desktop_app_info_list_actions(GDesktopAppInfo *info)
GIO_AVAILABLE_IN_2_36 char * g_desktop_app_info_get_string(GDesktopAppInfo *info, const char *key)
GIO_DEPRECATED_IN_2_42 void g_desktop_app_info_set_desktop_env(const char *desktop_env)
GIO_AVAILABLE_IN_2_36 gboolean g_desktop_app_info_has_key(GDesktopAppInfo *info, const char *key)
GIO_AVAILABLE_IN_ALL GType g_desktop_app_info_get_type(void) G_GNUC_CONST
void(* GDesktopAppLaunchCallback)(GDesktopAppInfo *appinfo, GPid pid, gpointer user_data)
GIO_AVAILABLE_IN_2_30 const char *const * g_desktop_app_info_get_keywords(GDesktopAppInfo *info)
GIO_AVAILABLE_IN_ALL GDesktopAppInfo * g_desktop_app_info_new(const char *desktop_id)
GIO_DEPRECATED GType g_desktop_app_info_lookup_get_type(void) G_GNUC_CONST
struct _GDesktopAppInfoLookup GDesktopAppInfoLookup
GIO_AVAILABLE_IN_2_58 gboolean g_desktop_app_info_launch_uris_as_manager_with_fds(GDesktopAppInfo *appinfo, GList *uris, GAppLaunchContext *launch_context, GSpawnFlags spawn_flags, GSpawnChildSetupFunc user_setup, gpointer user_setup_data, GDesktopAppLaunchCallback pid_callback, gpointer pid_callback_data, gint stdin_fd, gint stdout_fd, gint stderr_fd, GError **error)
GIO_AVAILABLE_IN_2_38 void g_desktop_app_info_launch_action(GDesktopAppInfo *info, const gchar *action_name, GAppLaunchContext *launch_context)
GIO_AVAILABLE_IN_2_30 const char * g_desktop_app_info_get_generic_name(GDesktopAppInfo *info)
#define GIO_AVAILABLE_IN_ALL
#define GIO_AVAILABLE_IN_2_30
#define GIO_DEPRECATED
#define GIO_AVAILABLE_IN_2_36
#define GIO_AVAILABLE_IN_2_60
#define GIO_AVAILABLE_IN_2_40
#define GIO_AVAILABLE_IN_2_28
#define GIO_AVAILABLE_IN_2_58
#define GIO_AVAILABLE_IN_2_34
#define GIO_DEPRECATED_IN_2_42
#define GIO_AVAILABLE_IN_2_38
#define GIO_AVAILABLE_IN_2_56
#define GIO_AVAILABLE_IN_2_42
typedefG_BEGIN_DECLS struct _GAppLaunchContext GAppLaunchContext
Definition giotypes.h:34
struct _GAppInfo GAppInfo
Definition giotypes.h:35
struct _GKeyFile GKeyFile
Definition gkeyfile.h:50
unsigned long gsize
Definition glibconfig.h:83
int GPid
Definition glibconfig.h:201
typedefG_BEGIN_DECLS struct _GList GList
Definition glist.h:39
#define G_END_DECLS
Definition gmacros.h:910
#define G_BEGIN_DECLS
Definition gmacros.h:909
#define G_GNUC_CONST
Definition gmacros.h:637
#define G_DEFINE_AUTOPTR_CLEANUP_FUNC(TypeName, func)
Definition gmacros.h:1400
GOBJECT_AVAILABLE_IN_ALL void g_object_unref(gpointer object)
GSpawnFlags
Definition gspawn.h:177
void(* GSpawnChildSetupFunc)(gpointer data)
Definition gspawn.h:140
gsize GType
Definition gtype.h:427
gint gboolean
Definition gtypes.h:56
G_BEGIN_DECLS typedef char gchar
Definition gtypes.h:52
void * gpointer
Definition gtypes.h:109
int gint
Definition gtypes.h:55
static void error(LoadState *S, const char *why)