1 /* GIMP - The GNU Image Manipulation Program
2  * Copyright (C) 1995-1997 Spencer Kimball and Peter Mattis
3  *
4  * gimpdocked.h
5  * Copyright (C) 2003  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_DOCKED_H__
22 #define __GIMP_DOCKED_H__
23 
24 
25 #define GIMP_TYPE_DOCKED               (gimp_docked_get_type ())
26 #define GIMP_IS_DOCKED(obj)            (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_DOCKED))
27 #define GIMP_DOCKED(obj)               (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_DOCKED, GimpDocked))
28 #define GIMP_DOCKED_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GIMP_TYPE_DOCKED, GimpDockedInterface))
29 
30 
31 typedef struct _GimpDockedInterface GimpDockedInterface;
32 
33 /**
34  * GimpDockedInterface:
35  *
36  * Interface with common methods for stuff that is docked.
37  */
38 struct _GimpDockedInterface
39 {
40   GTypeInterface base_iface;
41 
42   /*  signals  */
43   void            (* title_changed)       (GimpDocked   *docked);
44 
45   /*  virtual functions  */
46   void            (* set_aux_info)        (GimpDocked   *docked,
47                                            GList        *aux_info);
48   GList         * (* get_aux_info)        (GimpDocked   *docked);
49 
50   GtkWidget     * (* get_preview)         (GimpDocked   *docked,
51                                            GimpContext  *context,
52                                            GtkIconSize   size);
53   gboolean        (* get_prefer_icon)     (GimpDocked   *docked);
54   GimpUIManager * (* get_menu)            (GimpDocked   *docked,
55                                            const gchar **ui_path,
56                                            gpointer     *popup_data);
57   gchar         * (* get_title)           (GimpDocked   *docked);
58 
59   void            (* set_context)         (GimpDocked   *docked,
60                                            GimpContext  *context);
61 
62   gboolean        (* has_button_bar)      (GimpDocked   *docked);
63   void            (* set_show_button_bar) (GimpDocked   *docked,
64                                            gboolean      show);
65   gboolean        (* get_show_button_bar) (GimpDocked   *docked);
66 };
67 
68 
69 GType           gimp_docked_get_type            (void) G_GNUC_CONST;
70 
71 void            gimp_docked_title_changed       (GimpDocked   *docked);
72 
73 void            gimp_docked_set_aux_info        (GimpDocked   *docked,
74                                                  GList        *aux_info);
75 GList         * gimp_docked_get_aux_info        (GimpDocked   *docked);
76 
77 GtkWidget     * gimp_docked_get_preview         (GimpDocked   *docked,
78                                                  GimpContext  *context,
79                                                  GtkIconSize   size);
80 gboolean        gimp_docked_get_prefer_icon     (GimpDocked   *docked);
81 GimpUIManager * gimp_docked_get_menu            (GimpDocked   *docked,
82                                                  const gchar **ui_path,
83                                                  gpointer     *popup_data);
84 gchar         * gimp_docked_get_title           (GimpDocked   *docked);
85 
86 void            gimp_docked_set_context         (GimpDocked   *docked,
87                                                  GimpContext  *context);
88 
89 gboolean        gimp_docked_has_button_bar      (GimpDocked   *docked);
90 void            gimp_docked_set_show_button_bar (GimpDocked   *docked,
91                                                  gboolean      show);
92 gboolean        gimp_docked_get_show_button_bar (GimpDocked   *docked);
93 
94 
95 #endif  /* __GIMP_DOCKED_H__ */
96