File indexing completed on 2025-01-18 09:59:54
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022 #ifndef __G_APPLICATION_H__
0023 #define __G_APPLICATION_H__
0024
0025 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
0026 #error "Only <gio/gio.h> can be included directly."
0027 #endif
0028
0029 #include <gio/giotypes.h>
0030
0031 G_BEGIN_DECLS
0032
0033 #define G_TYPE_APPLICATION (g_application_get_type ())
0034 #define G_APPLICATION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
0035 G_TYPE_APPLICATION, GApplication))
0036 #define G_APPLICATION_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \
0037 G_TYPE_APPLICATION, GApplicationClass))
0038 #define G_IS_APPLICATION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), G_TYPE_APPLICATION))
0039 #define G_IS_APPLICATION_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_APPLICATION))
0040 #define G_APPLICATION_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \
0041 G_TYPE_APPLICATION, GApplicationClass))
0042
0043 typedef struct _GApplicationPrivate GApplicationPrivate;
0044 typedef struct _GApplicationClass GApplicationClass;
0045
0046 struct _GApplication
0047 {
0048
0049 GObject parent_instance;
0050
0051 GApplicationPrivate *priv;
0052 };
0053
0054 struct _GApplicationClass
0055 {
0056
0057 GObjectClass parent_class;
0058
0059
0060
0061 void (* startup) (GApplication *application);
0062
0063 void (* activate) (GApplication *application);
0064
0065 void (* open) (GApplication *application,
0066 GFile **files,
0067 gint n_files,
0068 const gchar *hint);
0069
0070 int (* command_line) (GApplication *application,
0071 GApplicationCommandLine *command_line);
0072
0073
0074
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094 gboolean (* local_command_line) (GApplication *application,
0095 gchar ***arguments,
0096 int *exit_status);
0097
0098
0099
0100 void (* before_emit) (GApplication *application,
0101 GVariant *platform_data);
0102
0103 void (* after_emit) (GApplication *application,
0104 GVariant *platform_data);
0105 void (* add_platform_data) (GApplication *application,
0106 GVariantBuilder *builder);
0107 void (* quit_mainloop) (GApplication *application);
0108 void (* run_mainloop) (GApplication *application);
0109 void (* shutdown) (GApplication *application);
0110
0111 gboolean (* dbus_register) (GApplication *application,
0112 GDBusConnection *connection,
0113 const gchar *object_path,
0114 GError **error);
0115 void (* dbus_unregister) (GApplication *application,
0116 GDBusConnection *connection,
0117 const gchar *object_path);
0118 gint (* handle_local_options)(GApplication *application,
0119 GVariantDict *options);
0120 gboolean (* name_lost) (GApplication *application);
0121
0122
0123 gpointer padding[7];
0124 };
0125
0126 GIO_AVAILABLE_IN_ALL
0127 GType g_application_get_type (void) G_GNUC_CONST;
0128
0129 GIO_AVAILABLE_IN_ALL
0130 gboolean g_application_id_is_valid (const gchar *application_id);
0131
0132 GIO_AVAILABLE_IN_ALL
0133 GApplication * g_application_new (const gchar *application_id,
0134 GApplicationFlags flags);
0135
0136 GIO_AVAILABLE_IN_ALL
0137 const gchar * g_application_get_application_id (GApplication *application);
0138 GIO_AVAILABLE_IN_ALL
0139 void g_application_set_application_id (GApplication *application,
0140 const gchar *application_id);
0141
0142 GIO_AVAILABLE_IN_2_80
0143 const gchar * g_application_get_version (GApplication *application);
0144 GIO_AVAILABLE_IN_2_80
0145 void g_application_set_version (GApplication *application,
0146 const gchar *version);
0147
0148 GIO_AVAILABLE_IN_2_34
0149 GDBusConnection * g_application_get_dbus_connection (GApplication *application);
0150 GIO_AVAILABLE_IN_2_34
0151 const gchar * g_application_get_dbus_object_path (GApplication *application);
0152
0153 GIO_AVAILABLE_IN_ALL
0154 guint g_application_get_inactivity_timeout (GApplication *application);
0155 GIO_AVAILABLE_IN_ALL
0156 void g_application_set_inactivity_timeout (GApplication *application,
0157 guint inactivity_timeout);
0158
0159 GIO_AVAILABLE_IN_ALL
0160 GApplicationFlags g_application_get_flags (GApplication *application);
0161 GIO_AVAILABLE_IN_ALL
0162 void g_application_set_flags (GApplication *application,
0163 GApplicationFlags flags);
0164
0165 GIO_AVAILABLE_IN_2_42
0166 const gchar * g_application_get_resource_base_path (GApplication *application);
0167 GIO_AVAILABLE_IN_2_42
0168 void g_application_set_resource_base_path (GApplication *application,
0169 const gchar *resource_path);
0170
0171 GIO_DEPRECATED
0172 void g_application_set_action_group (GApplication *application,
0173 GActionGroup *action_group);
0174
0175 GIO_AVAILABLE_IN_2_40
0176 void g_application_add_main_option_entries (GApplication *application,
0177 const GOptionEntry *entries);
0178
0179 GIO_AVAILABLE_IN_2_42
0180 void g_application_add_main_option (GApplication *application,
0181 const char *long_name,
0182 char short_name,
0183 GOptionFlags flags,
0184 GOptionArg arg,
0185 const char *description,
0186 const char *arg_description);
0187 GIO_AVAILABLE_IN_2_40
0188 void g_application_add_option_group (GApplication *application,
0189 GOptionGroup *group);
0190 GIO_AVAILABLE_IN_2_56
0191 void g_application_set_option_context_parameter_string (GApplication *application,
0192 const gchar *parameter_string);
0193 GIO_AVAILABLE_IN_2_56
0194 void g_application_set_option_context_summary (GApplication *application,
0195 const gchar *summary);
0196 GIO_AVAILABLE_IN_2_56
0197 void g_application_set_option_context_description (GApplication *application,
0198 const gchar *description);
0199 GIO_AVAILABLE_IN_ALL
0200 gboolean g_application_get_is_registered (GApplication *application);
0201 GIO_AVAILABLE_IN_ALL
0202 gboolean g_application_get_is_remote (GApplication *application);
0203
0204 GIO_AVAILABLE_IN_ALL
0205 gboolean g_application_register (GApplication *application,
0206 GCancellable *cancellable,
0207 GError **error);
0208
0209 GIO_AVAILABLE_IN_ALL
0210 void g_application_hold (GApplication *application);
0211 GIO_AVAILABLE_IN_ALL
0212 void g_application_release (GApplication *application);
0213
0214 GIO_AVAILABLE_IN_ALL
0215 void g_application_activate (GApplication *application);
0216
0217 GIO_AVAILABLE_IN_ALL
0218 void g_application_open (GApplication *application,
0219 GFile **files,
0220 gint n_files,
0221 const gchar *hint);
0222
0223 GIO_AVAILABLE_IN_ALL
0224 int g_application_run (GApplication *application,
0225 int argc,
0226 char **argv);
0227
0228 GIO_AVAILABLE_IN_2_32
0229 void g_application_quit (GApplication *application);
0230
0231 GIO_AVAILABLE_IN_2_32
0232 GApplication * g_application_get_default (void);
0233 GIO_AVAILABLE_IN_2_32
0234 void g_application_set_default (GApplication *application);
0235
0236 GIO_AVAILABLE_IN_2_38
0237 void g_application_mark_busy (GApplication *application);
0238 GIO_AVAILABLE_IN_2_38
0239 void g_application_unmark_busy (GApplication *application);
0240 GIO_AVAILABLE_IN_2_44
0241 gboolean g_application_get_is_busy (GApplication *application);
0242
0243 GIO_AVAILABLE_IN_2_40
0244 void g_application_send_notification (GApplication *application,
0245 const gchar *id,
0246 GNotification *notification);
0247 GIO_AVAILABLE_IN_2_40
0248 void g_application_withdraw_notification (GApplication *application,
0249 const gchar *id);
0250
0251 GIO_AVAILABLE_IN_2_44
0252 void g_application_bind_busy_property (GApplication *application,
0253 gpointer object,
0254 const gchar *property);
0255
0256 GIO_AVAILABLE_IN_2_44
0257 void g_application_unbind_busy_property (GApplication *application,
0258 gpointer object,
0259 const gchar *property);
0260
0261 G_END_DECLS
0262
0263 #endif