Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gtkapplication.h
Go to the documentation of this file.
1/*
2 * Copyright © 2010 Codethink Limited
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the licence, or (at your option) any later version.
8 *
9 * This library 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 GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
16 *
17 * Author: Ryan Lortie <desrt@desrt.ca>
18 */
19
20#pragma once
21
22#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
23#error "Only <gtk/gtk.h> can be included directly."
24#endif
25
26#include <gtk/gtkwidget.h>
27#include <gio/gio.h>
28
30
31#define GTK_TYPE_APPLICATION (gtk_application_get_type ())
32#define GTK_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_APPLICATION, GtkApplication))
33#define GTK_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_APPLICATION, GtkApplicationClass))
34#define GTK_IS_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_APPLICATION))
35#define GTK_IS_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_APPLICATION))
36#define GTK_APPLICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_APPLICATION, GtkApplicationClass))
37
40
45
46/**
47 * GtkApplicationClass:
48 * @parent_class: The parent class.
49 * @window_added: Signal emitted when a `GtkWindow` is added to
50 * application through gtk_application_add_window().
51 * @window_removed: Signal emitted when a `GtkWindow` is removed from
52 * application, either as a side-effect of being destroyed or
53 * explicitly through gtk_application_remove_window().
54 */
56{
58
59 /*< public >*/
60
61 void (*window_added) (GtkApplication *application,
62 GtkWindow *window);
63 void (*window_removed) (GtkApplication *application,
64 GtkWindow *window);
65
66 /*< private >*/
68};
69
72
74GtkApplication * gtk_application_new (const char *application_id,
75 GApplicationFlags flags);
76
79 GtkWindow *window);
80
83 GtkWindow *window);
86
91 GMenuModel *menubar);
92
100
103 GtkWindow *window,
105 const char *reason);
108 guint cookie);
109
112 guint id);
113
116
119
122 const char *detailed_action_name);
125 const char *accel);
126
127
130 const char *detailed_action_name,
131 const char * const *accels);
132
135 const char *id);
136
138
140
#define GDK_AVAILABLE_IN_ALL
GApplicationFlags
Definition gioenums.h:1544
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
struct _GMenu GMenu
Definition gmenu.h:42
GOBJECT_AVAILABLE_IN_ALL void g_object_unref(gpointer object)
GDK_AVAILABLE_IN_ALL GList * gtk_application_get_windows(GtkApplication *application)
GDK_AVAILABLE_IN_ALL void gtk_application_set_menubar(GtkApplication *application, GMenuModel *menubar)
GDK_AVAILABLE_IN_ALL char ** gtk_application_get_accels_for_action(GtkApplication *application, const char *detailed_action_name)
GDK_AVAILABLE_IN_ALL GMenu * gtk_application_get_menu_by_id(GtkApplication *application, const char *id)
GDK_AVAILABLE_IN_ALL void gtk_application_uninhibit(GtkApplication *application, guint cookie)
GtkApplicationInhibitFlags
@ GTK_APPLICATION_INHIBIT_LOGOUT
@ GTK_APPLICATION_INHIBIT_IDLE
@ GTK_APPLICATION_INHIBIT_SUSPEND
@ GTK_APPLICATION_INHIBIT_SWITCH
GDK_AVAILABLE_IN_ALL GtkApplication * gtk_application_new(const char *application_id, GApplicationFlags flags)
GDK_AVAILABLE_IN_ALL void gtk_application_remove_window(GtkApplication *application, GtkWindow *window)
GDK_AVAILABLE_IN_ALL GType gtk_application_get_type(void) G_GNUC_CONST
GDK_AVAILABLE_IN_ALL char ** gtk_application_list_action_descriptions(GtkApplication *application)
GDK_AVAILABLE_IN_ALL void gtk_application_set_accels_for_action(GtkApplication *application, const char *detailed_action_name, const char *const *accels)
GDK_AVAILABLE_IN_ALL GtkWindow * gtk_application_get_active_window(GtkApplication *application)
GDK_AVAILABLE_IN_ALL GMenuModel * gtk_application_get_menubar(GtkApplication *application)
GDK_AVAILABLE_IN_ALL GtkWindow * gtk_application_get_window_by_id(GtkApplication *application, guint id)
GDK_AVAILABLE_IN_ALL char ** gtk_application_get_actions_for_accel(GtkApplication *application, const char *accel)
GDK_AVAILABLE_IN_ALL void gtk_application_add_window(GtkApplication *application, GtkWindow *window)
GDK_AVAILABLE_IN_ALL guint gtk_application_inhibit(GtkApplication *application, GtkWindow *window, GtkApplicationInhibitFlags flags, const char *reason)
gsize GType
Definition gtype.h:427
void * gpointer
Definition gtypes.h:109
unsigned int guint
Definition gtypes.h:61
void(* window_removed)(GtkApplication *application, GtkWindow *window)
void(* window_added)(GtkApplication *application, GtkWindow *window)
GApplicationClass parent_class
GApplication parent_instance