2023-09-26 00:35:21 +02:00
|
|
|
/* LIBPIKA - The PIKA Library
|
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
|
|
|
* pikadialog.h
|
|
|
|
* Copyright (C) 2000-2003 Michael Natterer <mitch@gimp.org>
|
|
|
|
*
|
|
|
|
* This library is free software: you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 3 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library. If not, see
|
|
|
|
* <https://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#if !defined (__PIKA_WIDGETS_H_INSIDE__) && !defined (PIKA_WIDGETS_COMPILATION)
|
|
|
|
#error "Only <libpikawidgets/pikawidgets.h> can be included directly."
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef __PIKA_DIALOG_H__
|
|
|
|
#define __PIKA_DIALOG_H__
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
/* For information look into the C source or the html documentation */
|
|
|
|
|
|
|
|
|
|
|
|
#define PIKA_TYPE_DIALOG (pika_dialog_get_type ())
|
|
|
|
#define PIKA_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PIKA_TYPE_DIALOG, PikaDialog))
|
|
|
|
#define PIKA_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PIKA_TYPE_DIALOG, PikaDialogClass))
|
|
|
|
#define PIKA_IS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PIKA_TYPE_DIALOG))
|
|
|
|
#define PIKA_IS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PIKA_TYPE_DIALOG))
|
|
|
|
#define PIKA_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PIKA_TYPE_DIALOG, PikaDialogClass))
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct _PikaDialogPrivate PikaDialogPrivate;
|
|
|
|
typedef struct _PikaDialogClass PikaDialogClass;
|
|
|
|
|
|
|
|
struct _PikaDialog
|
|
|
|
{
|
|
|
|
GtkDialog parent_instance;
|
|
|
|
|
|
|
|
PikaDialogPrivate *priv;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _PikaDialogClass
|
|
|
|
{
|
|
|
|
GtkDialogClass parent_class;
|
|
|
|
|
|
|
|
/* Padding for future expansion */
|
|
|
|
void (* _pika_reserved1) (void);
|
|
|
|
void (* _pika_reserved2) (void);
|
|
|
|
void (* _pika_reserved3) (void);
|
|
|
|
void (* _pika_reserved4) (void);
|
|
|
|
void (* _pika_reserved5) (void);
|
|
|
|
void (* _pika_reserved6) (void);
|
|
|
|
void (* _pika_reserved7) (void);
|
|
|
|
void (* _pika_reserved8) (void);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
GType pika_dialog_get_type (void) G_GNUC_CONST;
|
|
|
|
|
|
|
|
GtkWidget * pika_dialog_new (const gchar *title,
|
|
|
|
const gchar *role,
|
|
|
|
GtkWidget *parent,
|
|
|
|
GtkDialogFlags flags,
|
|
|
|
PikaHelpFunc help_func,
|
|
|
|
const gchar *help_id,
|
|
|
|
...) G_GNUC_NULL_TERMINATED;
|
|
|
|
|
|
|
|
GtkWidget * pika_dialog_new_valist (const gchar *title,
|
|
|
|
const gchar *role,
|
|
|
|
GtkWidget *parent,
|
|
|
|
GtkDialogFlags flags,
|
|
|
|
PikaHelpFunc help_func,
|
|
|
|
const gchar *help_id,
|
|
|
|
va_list args);
|
|
|
|
|
|
|
|
GtkWidget * pika_dialog_add_button (PikaDialog *dialog,
|
|
|
|
const gchar *button_text,
|
|
|
|
gint response_id);
|
|
|
|
void pika_dialog_add_buttons (PikaDialog *dialog,
|
|
|
|
...) G_GNUC_NULL_TERMINATED;
|
|
|
|
void pika_dialog_add_buttons_valist (PikaDialog *dialog,
|
|
|
|
va_list args);
|
|
|
|
|
|
|
|
gint pika_dialog_run (PikaDialog *dialog);
|
|
|
|
|
|
|
|
void pika_dialog_set_alternative_button_order_from_array
|
|
|
|
(PikaDialog *dialog,
|
|
|
|
gint n_buttons,
|
|
|
|
gint *order);
|
|
|
|
|
2023-10-30 23:55:30 +01:00
|
|
|
GBytes * pika_dialog_get_native_handle (PikaDialog *dialog);
|
|
|
|
|
2023-09-26 00:35:21 +02:00
|
|
|
/* for internal use only! */
|
|
|
|
void pika_dialogs_show_help_button (gboolean show);
|
|
|
|
|
|
|
|
/* pika_dialog_set_alternative_button_order() doesn't need a dedicated
|
|
|
|
* wrapper function because anyway it won't be introspectable.
|
|
|
|
* GObject-Introspection bindings will have to use
|
|
|
|
* pika_dialog_set_alternative_button_order_from_array().
|
|
|
|
*/
|
|
|
|
#define pika_dialog_set_alternative_button_order(d,f...) \
|
|
|
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS; \
|
|
|
|
gtk_dialog_set_alternative_button_order(d,f); \
|
|
|
|
G_GNUC_END_IGNORE_DEPRECATIONS;
|
|
|
|
|
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __PIKA_DIALOG_H__ */
|