PIKApp/app/widgets/pikafiledialog.h

111 lines
4.1 KiB
C

/* PIKA - Photo and Image Kooker Application
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
*
* Original copyright, applying to most contents (license remains unchanged):
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* pikafiledialog.h
* Copyright (C) 2004 Michael Natterer <mitch@gimp.org>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __PIKA_FILE_DIALOG_H__
#define __PIKA_FILE_DIALOG_H__
G_BEGIN_DECLS
#define PIKA_TYPE_FILE_DIALOG (pika_file_dialog_get_type ())
#define PIKA_FILE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PIKA_TYPE_FILE_DIALOG, PikaFileDialog))
#define PIKA_FILE_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PIKA_TYPE_FILE_DIALOG, PikaFileDialogClass))
#define PIKA_IS_FILE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PIKA_TYPE_FILE_DIALOG))
#define PIKA_IS_FILE_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PIKA_TYPE_FILE_DIALOG))
#define PIKA_FILE_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PIKA_TYPE_FILE_DIALOG, PikaFileDialogClass))
typedef struct _PikaFileDialogClass PikaFileDialogClass;
struct _PikaFileDialog
{
GtkFileChooserDialog parent_instance;
GBytes *window_handle;
Pika *pika;
PikaImage *image;
PikaPlugInProcedure *file_proc;
GtkWidget *thumb_box;
GtkWidget *extra_vbox;
GtkWidget *proc_expander;
GtkWidget *proc_view;
GtkWidget *progress;
gboolean busy;
gboolean canceled;
gchar *help_id;
gchar *ok_button_label;
gchar *automatic_help_id;
gchar *automatic_label;
gchar *file_filter_label;
GSList *file_procs;
GSList *file_procs_all_images;
gboolean show_all_files;
};
struct _PikaFileDialogClass
{
GtkFileChooserDialogClass parent_class;
GFile * (* get_default_folder) (PikaFileDialog *dialog);
void (* save_state) (PikaFileDialog *dialog,
const gchar *state_name);
void (* load_state) (PikaFileDialog *dialog,
const gchar *state_name);
};
GType pika_file_dialog_get_type (void) G_GNUC_CONST;
void pika_file_dialog_add_extra_widget (PikaFileDialog *dialog,
GtkWidget *widget,
gboolean expand,
gboolean fill,
guint padding);
void pika_file_dialog_set_sensitive (PikaFileDialog *dialog,
gboolean sensitive);
void pika_file_dialog_set_file_proc (PikaFileDialog *dialog,
PikaPlugInProcedure *file_proc);
GFile * pika_file_dialog_get_default_folder (PikaFileDialog *dialog);
void pika_file_dialog_save_state (PikaFileDialog *dialog,
const gchar *state_name);
void pika_file_dialog_load_state (PikaFileDialog *dialog,
const gchar *state_name);
G_END_DECLS
#endif /* __PIKA_FILE_DIALOG_H__ */