1 /* GIMP - The GNU Image Manipulation Program
2  * Copyright (C) 1995 Spencer Kimball and Peter Mattis
3  *
4  * gimpsessioninfo.h
5  * Copyright (C) 2001-2008 Michael Natterer <mitch@gimp.org>
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program 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
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef __GIMP_SESSION_INFO_H__
22 #define __GIMP_SESSION_INFO_H__
23 
24 
25 #include "core/gimpobject.h"
26 
27 
28 #define GIMP_TYPE_SESSION_INFO            (gimp_session_info_get_type ())
29 #define GIMP_SESSION_INFO(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_SESSION_INFO, GimpSessionInfo))
30 #define GIMP_SESSION_INFO_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_SESSION_INFO, GimpSessionInfoClass))
31 #define GIMP_IS_SESSION_INFO(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_SESSION_INFO))
32 #define GIMP_IS_SESSION_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_SESSION_INFO))
33 #define GIMP_SESSION_INFO_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_SESSION_INFO, GimpSessionInfoClass))
34 
35 
36 typedef struct _GimpSessionInfoPrivate  GimpSessionInfoPrivate;
37 typedef struct _GimpSessionInfoClass    GimpSessionInfoClass;
38 
39 /**
40  * GimpSessionInfo:
41  *
42  * Contains session info for one toplevel window in the interface such
43  * as a dock, the empty-image-window, or the open/save dialog.
44  */
45 struct _GimpSessionInfo
46 {
47   GimpObject  parent_instance;
48 
49   GimpSessionInfoPrivate *p;
50 };
51 
52 struct _GimpSessionInfoClass
53 {
54   GimpObjectClass  parent_class;
55 };
56 
57 
58 GType             gimp_session_info_get_type                (void) G_GNUC_CONST;
59 
60 GimpSessionInfo * gimp_session_info_new                     (void);
61 
62 void              gimp_session_info_restore                 (GimpSessionInfo        *info,
63                                                              GimpDialogFactory      *factory,
64                                                              GdkScreen              *screen,
65                                                              gint                    monitor);
66 void              gimp_session_info_apply_geometry          (GimpSessionInfo        *info,
67                                                              GdkScreen              *screen,
68                                                              gint                    current_monitor,
69                                                              gboolean                apply_stored_monitor);
70 void              gimp_session_info_read_geometry           (GimpSessionInfo        *info,
71                                                              GdkEventConfigure      *cevent);
72 void              gimp_session_info_get_info                (GimpSessionInfo        *info);
73 void              gimp_session_info_get_info_with_widget    (GimpSessionInfo        *info,
74                                                              GtkWidget              *widget);
75 void              gimp_session_info_clear_info              (GimpSessionInfo        *info);
76 gboolean          gimp_session_info_is_singleton            (GimpSessionInfo        *info);
77 gboolean          gimp_session_info_is_session_managed      (GimpSessionInfo        *info);
78 gboolean          gimp_session_info_get_remember_size       (GimpSessionInfo        *info);
79 gboolean          gimp_session_info_get_remember_if_open    (GimpSessionInfo        *info);
80 GtkWidget       * gimp_session_info_get_widget              (GimpSessionInfo        *info);
81 void              gimp_session_info_set_widget              (GimpSessionInfo        *info,
82                                                              GtkWidget              *widget);
83 GimpDialogFactoryEntry *
84                   gimp_session_info_get_factory_entry       (GimpSessionInfo        *info);
85 void              gimp_session_info_set_factory_entry       (GimpSessionInfo        *info,
86                                                              GimpDialogFactoryEntry *entry);
87 gboolean          gimp_session_info_get_open                (GimpSessionInfo        *info);
88 void              gimp_session_info_append_book             (GimpSessionInfo        *info,
89                                                              GimpSessionInfoBook    *book);
90 gint              gimp_session_info_get_x                   (GimpSessionInfo        *info);
91 gint              gimp_session_info_get_y                   (GimpSessionInfo        *info);
92 gint              gimp_session_info_get_width               (GimpSessionInfo        *info);
93 gint              gimp_session_info_get_height              (GimpSessionInfo        *info);
94 
95 void              gimp_session_info_set_position_accuracy   (gint                    accuracy);
96 gint              gimp_session_info_apply_position_accuracy (gint                    position);
97 
98 
99 #endif  /* __GIMP_SESSION_INFO_H__ */
100