Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gtkdialog.h
Go to the documentation of this file.
1/* GTK - The GIMP Toolkit
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
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 License, 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
18/*
19 * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
20 * file for a list of people on the GTK+ Team. See the ChangeLog
21 * files for a list of changes. These files are distributed with
22 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
23 */
24
25#pragma once
26
27#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
28#error "Only <gtk/gtk.h> can be included directly."
29#endif
30
31#include <gtk/gtkwindow.h>
32
34
35/**
36 * GtkDialogFlags:
37 * @GTK_DIALOG_MODAL: Make the constructed dialog modal
38 * @GTK_DIALOG_DESTROY_WITH_PARENT: Destroy the dialog when its parent is destroyed
39 * @GTK_DIALOG_USE_HEADER_BAR: Create dialog with actions in header
40 * bar instead of action area
41 *
42 * Flags used to influence dialog construction.
43 */
50
51/**
52 * GtkResponseType:
53 * @GTK_RESPONSE_NONE: Returned if an action widget has no response id,
54 * or if the dialog gets programmatically hidden or destroyed
55 * @GTK_RESPONSE_REJECT: Generic response id, not used by GTK dialogs
56 * @GTK_RESPONSE_ACCEPT: Generic response id, not used by GTK dialogs
57 * @GTK_RESPONSE_DELETE_EVENT: Returned if the dialog is deleted
58 * @GTK_RESPONSE_OK: Returned by OK buttons in GTK dialogs
59 * @GTK_RESPONSE_CANCEL: Returned by Cancel buttons in GTK dialogs
60 * @GTK_RESPONSE_CLOSE: Returned by Close buttons in GTK dialogs
61 * @GTK_RESPONSE_YES: Returned by Yes buttons in GTK dialogs
62 * @GTK_RESPONSE_NO: Returned by No buttons in GTK dialogs
63 * @GTK_RESPONSE_APPLY: Returned by Apply buttons in GTK dialogs
64 * @GTK_RESPONSE_HELP: Returned by Help buttons in GTK dialogs
65 *
66 * Predefined values for use as response ids in gtk_dialog_add_button().
67 *
68 * All predefined values are negative; GTK leaves values of 0 or greater for
69 * application-defined response ids.
70 */
85
86
87#define GTK_TYPE_DIALOG (gtk_dialog_get_type ())
88#define GTK_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_DIALOG, GtkDialog))
89#define GTK_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_DIALOG, GtkDialogClass))
90#define GTK_IS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_DIALOG))
91#define GTK_IS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_DIALOG))
92#define GTK_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_DIALOG, GtkDialogClass))
93
94
95typedef struct _GtkDialog GtkDialog;
97
102
103/**
104 * GtkDialogClass:
105 * @parent_class: The parent class.
106 * @response: Signal emitted when an action widget is activated.
107 * @close: Signal emitted when the user uses a keybinding to close the dialog.
108 */
110{
112
113 /*< public >*/
114
115 void (* response) (GtkDialog *dialog, int response_id);
116
117 /* Keybinding signals */
118
119 void (* close) (GtkDialog *dialog);
120
121 /*< private >*/
122
124};
125
126
131
134 GtkWindow *parent,
135 GtkDialogFlags flags,
136 const char *first_button_text,
138
141 GtkWidget *child,
142 int response_id);
145 const char *button_text,
146 int response_id);
149 const char *first_button_text,
151
154 int response_id,
155 gboolean setting);
158 int response_id);
161 int response_id);
164 GtkWidget *widget);
165
166/* Emit response signal */
169 int response_id);
170
175
177
179
#define GDK_DEPRECATED_IN_4_10
#define GDK_AVAILABLE_IN_ALL
#define G_END_DECLS
Definition gmacros.h:910
#define G_GNUC_NULL_TERMINATED
Definition gmacros.h:326
#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)
GtkResponseType
Definition gtkdialog.h:72
@ GTK_RESPONSE_CANCEL
Definition gtkdialog.h:78
@ GTK_RESPONSE_NO
Definition gtkdialog.h:81
@ GTK_RESPONSE_OK
Definition gtkdialog.h:77
@ GTK_RESPONSE_CLOSE
Definition gtkdialog.h:79
@ GTK_RESPONSE_NONE
Definition gtkdialog.h:73
@ GTK_RESPONSE_DELETE_EVENT
Definition gtkdialog.h:76
@ GTK_RESPONSE_ACCEPT
Definition gtkdialog.h:75
@ GTK_RESPONSE_YES
Definition gtkdialog.h:80
@ GTK_RESPONSE_REJECT
Definition gtkdialog.h:74
@ GTK_RESPONSE_APPLY
Definition gtkdialog.h:82
@ GTK_RESPONSE_HELP
Definition gtkdialog.h:83
GtkDialogFlags
Definition gtkdialog.h:45
@ GTK_DIALOG_DESTROY_WITH_PARENT
Definition gtkdialog.h:47
@ GTK_DIALOG_MODAL
Definition gtkdialog.h:46
@ GTK_DIALOG_USE_HEADER_BAR
Definition gtkdialog.h:48
GDK_DEPRECATED_IN_4_10 void gtk_dialog_set_response_sensitive(GtkDialog *dialog, int response_id, gboolean setting)
GDK_DEPRECATED_IN_4_10 void gtk_dialog_add_action_widget(GtkDialog *dialog, GtkWidget *child, int response_id)
GDK_AVAILABLE_IN_ALL GType gtk_dialog_get_type(void) G_GNUC_CONST
GDK_DEPRECATED_IN_4_10 GtkWidget * gtk_dialog_new_with_buttons(const char *title, GtkWindow *parent, GtkDialogFlags flags, const char *first_button_text,...) G_GNUC_NULL_TERMINATED
GDK_DEPRECATED_IN_4_10 GtkWidget * gtk_dialog_new(void)
GDK_DEPRECATED_IN_4_10 void gtk_dialog_add_buttons(GtkDialog *dialog, const char *first_button_text,...) G_GNUC_NULL_TERMINATED
GDK_DEPRECATED_IN_4_10 int gtk_dialog_get_response_for_widget(GtkDialog *dialog, GtkWidget *widget)
GDK_DEPRECATED_IN_4_10 GtkWidget * gtk_dialog_get_header_bar(GtkDialog *dialog)
GDK_DEPRECATED_IN_4_10 void gtk_dialog_response(GtkDialog *dialog, int response_id)
GDK_DEPRECATED_IN_4_10 GtkWidget * gtk_dialog_get_content_area(GtkDialog *dialog)
GDK_DEPRECATED_IN_4_10 GtkWidget * gtk_dialog_get_widget_for_response(GtkDialog *dialog, int response_id)
GDK_DEPRECATED_IN_4_10 void gtk_dialog_set_default_response(GtkDialog *dialog, int response_id)
GDK_DEPRECATED_IN_4_10 GtkWidget * gtk_dialog_add_button(GtkDialog *dialog, const char *button_text, int response_id)
gsize GType
Definition gtype.h:427
gint gboolean
Definition gtypes.h:56
void * gpointer
Definition gtypes.h:109
GtkWindowClass parent_class
Definition gtkdialog.h:111
void(* response)(GtkDialog *dialog, int response_id)
Definition gtkdialog.h:115
gpointer padding[8]
Definition gtkdialog.h:123
void(* close)(GtkDialog *dialog)
Definition gtkdialog.h:119
GtkWindow parent_instance
Definition gtkdialog.h:100