1 /* LIBGIMP - The GIMP Library
2  * Copyright (C) 1995-1999 Peter Mattis and Spencer Kimball
3  *
4  * gimpexport.h
5  * Copyright (C) 1999-2000 Sven Neumann <sven@gimp.org>
6  *
7  * This library is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 3 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library.  If not, see
19  * <https://www.gnu.org/licenses/>.
20  */
21 
22 #if !defined (__GIMP_UI_H_INSIDE__) && !defined (GIMP_COMPILATION)
23 #error "Only <libgimp/gimpui.h> can be included directly."
24 #endif
25 
26 #ifndef __GIMP_EXPORT_H__
27 #define __GIMP_EXPORT_H__
28 
29 G_BEGIN_DECLS
30 
31 /* For information look into the C source or the html documentation */
32 
33 
34 /**
35  * GimpExportCapabilities:
36  * @GIMP_EXPORT_CAN_HANDLE_RGB:                 Handles RGB images
37  * @GIMP_EXPORT_CAN_HANDLE_GRAY:                Handles grayscale images
38  * @GIMP_EXPORT_CAN_HANDLE_INDEXED:             Handles indexed images
39  * @GIMP_EXPORT_CAN_HANDLE_BITMAP:              Handles two-color indexed images
40  * @GIMP_EXPORT_CAN_HANDLE_ALPHA:               Handles alpha channels
41  * @GIMP_EXPORT_CAN_HANDLE_LAYERS:              Hanldes layers
42  * @GIMP_EXPORT_CAN_HANDLE_LAYERS_AS_ANIMATION: Handles aminations of layers
43  * @GIMP_EXPORT_CAN_HANDLE_LAYER_MASKS:         Handles layer masks
44  * @GIMP_EXPORT_NEEDS_ALPHA:                    Needs alpha channels
45  * @GIMP_EXPORT_NEEDS_CROP:                     Needs to crop content to image bounds
46  *
47  * The types of images and layers an export procedure can handle
48  **/
49 typedef enum
50 {
51   GIMP_EXPORT_CAN_HANDLE_RGB                 = 1 << 0,
52   GIMP_EXPORT_CAN_HANDLE_GRAY                = 1 << 1,
53   GIMP_EXPORT_CAN_HANDLE_INDEXED             = 1 << 2,
54   GIMP_EXPORT_CAN_HANDLE_BITMAP              = 1 << 3,
55   GIMP_EXPORT_CAN_HANDLE_ALPHA               = 1 << 4,
56   GIMP_EXPORT_CAN_HANDLE_LAYERS              = 1 << 5,
57   GIMP_EXPORT_CAN_HANDLE_LAYERS_AS_ANIMATION = 1 << 6,
58   GIMP_EXPORT_CAN_HANDLE_LAYER_MASKS         = 1 << 7,
59   GIMP_EXPORT_NEEDS_ALPHA                    = 1 << 8,
60   GIMP_EXPORT_NEEDS_CROP                     = 1 << 9
61 } GimpExportCapabilities;
62 
63 
64 /**
65  * GimpExportReturn:
66  * @GIMP_EXPORT_CANCEL: The export was cancelled
67  * @GIMP_EXPORT_IGNORE: The image is unmodified but export shall continue anyway
68  * @GIMP_EXPORT_EXPORT: The chosen transforms were applied to the image
69  *
70  * Possible return values of gimp_export_image().
71  **/
72 typedef enum
73 {
74   GIMP_EXPORT_CANCEL,
75   GIMP_EXPORT_IGNORE,
76   GIMP_EXPORT_EXPORT
77 } GimpExportReturn;
78 
79 
80 GimpExportReturn   gimp_export_image                   (gint32                 *image_ID,
81                                                         gint32                 *drawable_ID,
82                                                         const gchar            *format_name,
83                                                         GimpExportCapabilities  capabilities);
84 
85 GtkWidget        * gimp_export_dialog_new              (const gchar            *format_name,
86                                                         const gchar            *role,
87                                                         const gchar            *help_id);
88 GtkWidget        * gimp_export_dialog_get_content_area (GtkWidget              *dialog);
89 
90 
91 G_END_DECLS
92 
93 #endif /* __GIMP_EXPORT_H__ */
94