220 lines
12 KiB
C
220 lines
12 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-1997 Spencer Kimball and Peter Mattis
|
|
*
|
|
* 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_GUI_H__
|
|
#define __PIKA_GUI_H__
|
|
|
|
|
|
typedef struct _PikaGui PikaGui;
|
|
|
|
struct _PikaGui
|
|
{
|
|
void (* ungrab) (Pika *pika);
|
|
|
|
void (* set_busy) (Pika *pika);
|
|
void (* unset_busy) (Pika *pika);
|
|
|
|
void (* show_message) (Pika *pika,
|
|
GObject *handler,
|
|
PikaMessageSeverity severity,
|
|
const gchar *domain,
|
|
const gchar *message);
|
|
void (* help) (Pika *pika,
|
|
PikaProgress *progress,
|
|
const gchar *help_domain,
|
|
const gchar *help_id);
|
|
|
|
gboolean (* wait) (Pika *pika,
|
|
PikaWaitable *waitable,
|
|
const gchar *message);
|
|
|
|
const gchar * (* get_program_class) (Pika *pika);
|
|
gchar * (* get_display_name) (Pika *pika,
|
|
gint display_id,
|
|
GObject **monitor,
|
|
gint *monitor_number);
|
|
guint32 (* get_user_time) (Pika *pika);
|
|
|
|
GFile * (* get_theme_dir) (Pika *pika);
|
|
GFile * (* get_icon_theme_dir) (Pika *pika);
|
|
|
|
PikaObject * (* get_window_strategy) (Pika *pika);
|
|
PikaDisplay * (* get_empty_display) (Pika *pika);
|
|
GBytes * (* display_get_window_id) (PikaDisplay *display);
|
|
PikaDisplay * (* display_create) (Pika *pika,
|
|
PikaImage *image,
|
|
PikaUnit unit,
|
|
gdouble scale,
|
|
GObject *monitor);
|
|
void (* display_delete) (PikaDisplay *display);
|
|
void (* displays_reconnect) (Pika *pika,
|
|
PikaImage *old_image,
|
|
PikaImage *new_image);
|
|
|
|
PikaProgress * (* progress_new) (Pika *pika,
|
|
PikaDisplay *display);
|
|
void (* progress_free) (Pika *pika,
|
|
PikaProgress *progress);
|
|
|
|
gboolean (* pdb_dialog_new) (Pika *pika,
|
|
PikaContext *context,
|
|
PikaProgress *progress,
|
|
GType contents_type,
|
|
GBytes *parent_handle,
|
|
const gchar *title,
|
|
const gchar *callback_name,
|
|
PikaObject *object,
|
|
va_list args);
|
|
gboolean (* pdb_dialog_set) (Pika *pika,
|
|
GType contents_type,
|
|
const gchar *callback_name,
|
|
PikaObject *object,
|
|
va_list args);
|
|
gboolean (* pdb_dialog_close) (Pika *pika,
|
|
GType contents_type,
|
|
const gchar *callback_name);
|
|
gboolean (* recent_list_add_file) (Pika *pika,
|
|
GFile *file,
|
|
const gchar *mime_type);
|
|
void (* recent_list_load) (Pika *pika);
|
|
|
|
GMountOperation
|
|
* (* get_mount_operation) (Pika *pika,
|
|
PikaProgress *progress);
|
|
|
|
PikaColorProfilePolicy
|
|
(* query_profile_policy) (Pika *pika,
|
|
PikaImage *image,
|
|
PikaContext *context,
|
|
PikaColorProfile **dest_profile,
|
|
PikaColorRenderingIntent *intent,
|
|
gboolean *bpc,
|
|
gboolean *dont_ask);
|
|
|
|
PikaMetadataRotationPolicy
|
|
(* query_rotation_policy) (Pika *pika,
|
|
PikaImage *image,
|
|
PikaContext *context,
|
|
gboolean *dont_ask);
|
|
};
|
|
|
|
|
|
void pika_gui_init (Pika *pika);
|
|
|
|
void pika_gui_ungrab (Pika *pika);
|
|
|
|
PikaObject * pika_get_window_strategy (Pika *pika);
|
|
PikaDisplay * pika_get_empty_display (Pika *pika);
|
|
PikaDisplay * pika_get_display_by_id (Pika *pika,
|
|
gint ID);
|
|
gint pika_get_display_id (Pika *pika,
|
|
PikaDisplay *display);
|
|
GBytes * pika_get_display_window_id (Pika *pika,
|
|
PikaDisplay *display);
|
|
PikaDisplay * pika_create_display (Pika *pika,
|
|
PikaImage *image,
|
|
PikaUnit unit,
|
|
gdouble scale,
|
|
GObject *monitor);
|
|
void pika_delete_display (Pika *pika,
|
|
PikaDisplay *display);
|
|
void pika_reconnect_displays (Pika *pika,
|
|
PikaImage *old_image,
|
|
PikaImage *new_image);
|
|
|
|
void pika_set_busy (Pika *pika);
|
|
void pika_set_busy_until_idle (Pika *pika);
|
|
void pika_unset_busy (Pika *pika);
|
|
|
|
void pika_show_message (Pika *pika,
|
|
GObject *handler,
|
|
PikaMessageSeverity severity,
|
|
const gchar *domain,
|
|
const gchar *message);
|
|
void pika_help (Pika *pika,
|
|
PikaProgress *progress,
|
|
const gchar *help_domain,
|
|
const gchar *help_id);
|
|
|
|
void pika_wait (Pika *pika,
|
|
PikaWaitable *waitable,
|
|
const gchar *format,
|
|
...) G_GNUC_PRINTF (3, 4);
|
|
|
|
PikaProgress * pika_new_progress (Pika *pika,
|
|
PikaDisplay *display);
|
|
void pika_free_progress (Pika *pika,
|
|
PikaProgress *progress);
|
|
|
|
const gchar * pika_get_program_class (Pika *pika);
|
|
gchar * pika_get_display_name (Pika *pika,
|
|
gint display_id,
|
|
GObject **monitor,
|
|
gint *monitor_number);
|
|
guint32 pika_get_user_time (Pika *pika);
|
|
GFile * pika_get_theme_dir (Pika *pika);
|
|
GFile * pika_get_icon_theme_dir (Pika *pika);
|
|
|
|
gboolean pika_pdb_dialog_new (Pika *pika,
|
|
PikaContext *context,
|
|
PikaProgress *progress,
|
|
GType contents_type,
|
|
GBytes *parent_handle,
|
|
const gchar *title,
|
|
const gchar *callback_name,
|
|
PikaObject *object,
|
|
...) G_GNUC_NULL_TERMINATED;
|
|
gboolean pika_pdb_dialog_set (Pika *pika,
|
|
GType contents_type,
|
|
const gchar *callback_name,
|
|
PikaObject *object,
|
|
...) G_GNUC_NULL_TERMINATED;
|
|
gboolean pika_pdb_dialog_close (Pika *pika,
|
|
GType contents_type,
|
|
const gchar *callback_name);
|
|
|
|
gboolean pika_recent_list_add_file (Pika *pika,
|
|
GFile *file,
|
|
const gchar *mime_type);
|
|
void pika_recent_list_load (Pika *pika);
|
|
|
|
GMountOperation
|
|
* pika_get_mount_operation (Pika *pika,
|
|
PikaProgress *progress);
|
|
|
|
PikaColorProfilePolicy
|
|
pika_query_profile_policy (Pika *pika,
|
|
PikaImage *image,
|
|
PikaContext *context,
|
|
PikaColorProfile **dest_profile,
|
|
PikaColorRenderingIntent *intent,
|
|
gboolean *bpc,
|
|
gboolean *dont_ask);
|
|
|
|
PikaMetadataRotationPolicy
|
|
pika_query_rotation_policy (Pika *pika,
|
|
PikaImage *image,
|
|
PikaContext *context,
|
|
gboolean *dont_ask);
|
|
|
|
|
|
#endif /* __PIKA_GUI_H__ */
|