2006-12-09 21:33:38 +00:00
|
|
|
/* GIMP - The GNU Image Manipulation Program
|
2003-02-21 19:03:19 +00:00
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
|
|
|
* gimpcontainertreeview.h
|
2004-05-11 10:01:25 +00:00
|
|
|
* Copyright (C) 2003-2004 Michael Natterer <mitch@gimp.org>
|
2003-02-21 19:03:19 +00:00
|
|
|
*
|
2009-01-17 22:28:01 +00:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
2003-02-21 19:03:19 +00:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
2009-01-17 22:28:01 +00:00
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
2003-02-21 19:03:19 +00:00
|
|
|
* (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
|
2018-07-11 23:27:07 +02:00
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
2003-02-21 19:03:19 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GIMP_CONTAINER_TREE_VIEW_H__
|
|
|
|
#define __GIMP_CONTAINER_TREE_VIEW_H__
|
|
|
|
|
|
|
|
|
2004-05-10 11:08:51 +00:00
|
|
|
#include "gimpcontainerbox.h"
|
2003-02-21 19:03:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
#define GIMP_TYPE_CONTAINER_TREE_VIEW (gimp_container_tree_view_get_type ())
|
|
|
|
#define GIMP_CONTAINER_TREE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_CONTAINER_TREE_VIEW, GimpContainerTreeView))
|
|
|
|
#define GIMP_CONTAINER_TREE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_CONTAINER_TREE_VIEW, GimpContainerTreeViewClass))
|
|
|
|
#define GIMP_IS_CONTAINER_TREE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_CONTAINER_TREE_VIEW))
|
|
|
|
#define GIMP_IS_CONTAINER_TREE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_CONTAINER_TREE_VIEW))
|
|
|
|
#define GIMP_CONTAINER_TREE_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_CONTAINER_TREE_VIEW, GimpContainerTreeViewClass))
|
|
|
|
|
|
|
|
|
app, libgimp*, modules: don't use g_type_class_add_private() ...
... and G_TYPE_INSTANCE_GET_PRIVATE()
g_type_class_add_private() and G_TYPE_INSTANCE_GET_PRIVATE() were
deprecated in GLib 2.58. Instead, use
G_DEFINE_[ABSTRACT_]TYPE_WITH_PRIVATE(), and
G_ADD_PRIVATE[_DYNAMIC](), and the implictly-defined
foo_get_instance_private() functions, all of which are available in
the GLib versions we depend on.
This commit only covers types registered using one of the
G_DEFINE_FOO() macros (i.e., most types), but not types with a
custom registration function, of which we still have a few -- GLib
currently only provides a (non-deprecated) public API for adding a
private struct using the G_DEFINE_FOO() macros.
Note that this commit was 99% auto-generated (because I'm not
*that* crazy :), so if there are any style mismatches... we'll have
to live with them for now.
2018-09-18 12:09:39 -04:00
|
|
|
typedef struct _GimpContainerTreeViewClass GimpContainerTreeViewClass;
|
|
|
|
typedef struct _GimpContainerTreeViewPrivate GimpContainerTreeViewPrivate;
|
2003-02-21 19:03:19 +00:00
|
|
|
|
|
|
|
struct _GimpContainerTreeView
|
|
|
|
{
|
app, libgimp*, modules: don't use g_type_class_add_private() ...
... and G_TYPE_INSTANCE_GET_PRIVATE()
g_type_class_add_private() and G_TYPE_INSTANCE_GET_PRIVATE() were
deprecated in GLib 2.58. Instead, use
G_DEFINE_[ABSTRACT_]TYPE_WITH_PRIVATE(), and
G_ADD_PRIVATE[_DYNAMIC](), and the implictly-defined
foo_get_instance_private() functions, all of which are available in
the GLib versions we depend on.
This commit only covers types registered using one of the
G_DEFINE_FOO() macros (i.e., most types), but not types with a
custom registration function, of which we still have a few -- GLib
currently only provides a (non-deprecated) public API for adding a
private struct using the G_DEFINE_FOO() macros.
Note that this commit was 99% auto-generated (because I'm not
*that* crazy :), so if there are any style mismatches... we'll have
to live with them for now.
2018-09-18 12:09:39 -04:00
|
|
|
GimpContainerBox parent_instance;
|
2003-02-21 19:03:19 +00:00
|
|
|
|
app, libgimp*, modules: don't use g_type_class_add_private() ...
... and G_TYPE_INSTANCE_GET_PRIVATE()
g_type_class_add_private() and G_TYPE_INSTANCE_GET_PRIVATE() were
deprecated in GLib 2.58. Instead, use
G_DEFINE_[ABSTRACT_]TYPE_WITH_PRIVATE(), and
G_ADD_PRIVATE[_DYNAMIC](), and the implictly-defined
foo_get_instance_private() functions, all of which are available in
the GLib versions we depend on.
This commit only covers types registered using one of the
G_DEFINE_FOO() macros (i.e., most types), but not types with a
custom registration function, of which we still have a few -- GLib
currently only provides a (non-deprecated) public API for adding a
private struct using the G_DEFINE_FOO() macros.
Note that this commit was 99% auto-generated (because I'm not
*that* crazy :), so if there are any style mismatches... we'll have
to live with them for now.
2018-09-18 12:09:39 -04:00
|
|
|
GtkTreeModel *model;
|
|
|
|
gint n_model_columns;
|
|
|
|
GType model_columns[16];
|
2003-03-16 11:14:29 +00:00
|
|
|
|
app, libgimp*, modules: don't use g_type_class_add_private() ...
... and G_TYPE_INSTANCE_GET_PRIVATE()
g_type_class_add_private() and G_TYPE_INSTANCE_GET_PRIVATE() were
deprecated in GLib 2.58. Instead, use
G_DEFINE_[ABSTRACT_]TYPE_WITH_PRIVATE(), and
G_ADD_PRIVATE[_DYNAMIC](), and the implictly-defined
foo_get_instance_private() functions, all of which are available in
the GLib versions we depend on.
This commit only covers types registered using one of the
G_DEFINE_FOO() macros (i.e., most types), but not types with a
custom registration function, of which we still have a few -- GLib
currently only provides a (non-deprecated) public API for adding a
private struct using the G_DEFINE_FOO() macros.
Note that this commit was 99% auto-generated (because I'm not
*that* crazy :), so if there are any style mismatches... we'll have
to live with them for now.
2018-09-18 12:09:39 -04:00
|
|
|
GtkTreeView *view;
|
2003-02-21 19:03:19 +00:00
|
|
|
|
app, libgimp*, modules: don't use g_type_class_add_private() ...
... and G_TYPE_INSTANCE_GET_PRIVATE()
g_type_class_add_private() and G_TYPE_INSTANCE_GET_PRIVATE() were
deprecated in GLib 2.58. Instead, use
G_DEFINE_[ABSTRACT_]TYPE_WITH_PRIVATE(), and
G_ADD_PRIVATE[_DYNAMIC](), and the implictly-defined
foo_get_instance_private() functions, all of which are available in
the GLib versions we depend on.
This commit only covers types registered using one of the
G_DEFINE_FOO() macros (i.e., most types), but not types with a
custom registration function, of which we still have a few -- GLib
currently only provides a (non-deprecated) public API for adding a
private struct using the G_DEFINE_FOO() macros.
Note that this commit was 99% auto-generated (because I'm not
*that* crazy :), so if there are any style mismatches... we'll have
to live with them for now.
2018-09-18 12:09:39 -04:00
|
|
|
GtkTreeViewColumn *main_column;
|
|
|
|
GtkCellRenderer *renderer_cell;
|
2003-03-16 11:14:29 +00:00
|
|
|
|
app, libgimp*, modules: don't use g_type_class_add_private() ...
... and G_TYPE_INSTANCE_GET_PRIVATE()
g_type_class_add_private() and G_TYPE_INSTANCE_GET_PRIVATE() were
deprecated in GLib 2.58. Instead, use
G_DEFINE_[ABSTRACT_]TYPE_WITH_PRIVATE(), and
G_ADD_PRIVATE[_DYNAMIC](), and the implictly-defined
foo_get_instance_private() functions, all of which are available in
the GLib versions we depend on.
This commit only covers types registered using one of the
G_DEFINE_FOO() macros (i.e., most types), but not types with a
custom registration function, of which we still have a few -- GLib
currently only provides a (non-deprecated) public API for adding a
private struct using the G_DEFINE_FOO() macros.
Note that this commit was 99% auto-generated (because I'm not
*that* crazy :), so if there are any style mismatches... we'll have
to live with them for now.
2018-09-18 12:09:39 -04:00
|
|
|
Gimp *dnd_gimp; /* eek */
|
2003-10-09 22:56:14 +00:00
|
|
|
|
app, libgimp*, modules: don't use g_type_class_add_private() ...
... and G_TYPE_INSTANCE_GET_PRIVATE()
g_type_class_add_private() and G_TYPE_INSTANCE_GET_PRIVATE() were
deprecated in GLib 2.58. Instead, use
G_DEFINE_[ABSTRACT_]TYPE_WITH_PRIVATE(), and
G_ADD_PRIVATE[_DYNAMIC](), and the implictly-defined
foo_get_instance_private() functions, all of which are available in
the GLib versions we depend on.
This commit only covers types registered using one of the
G_DEFINE_FOO() macros (i.e., most types), but not types with a
custom registration function, of which we still have a few -- GLib
currently only provides a (non-deprecated) public API for adding a
private struct using the G_DEFINE_FOO() macros.
Note that this commit was 99% auto-generated (because I'm not
*that* crazy :), so if there are any style mismatches... we'll have
to live with them for now.
2018-09-18 12:09:39 -04:00
|
|
|
GimpContainerTreeViewPrivate *priv;
|
2003-02-21 19:03:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GimpContainerTreeViewClass
|
|
|
|
{
|
2004-05-10 11:08:51 +00:00
|
|
|
GimpContainerBoxClass parent_class;
|
2003-03-19 15:17:13 +00:00
|
|
|
|
2011-02-14 20:01:08 +01:00
|
|
|
/* signals */
|
|
|
|
|
|
|
|
void (* edit_name) (GimpContainerTreeView *tree_view);
|
|
|
|
|
|
|
|
/* virtual functions */
|
|
|
|
|
2005-01-15 17:57:32 +00:00
|
|
|
gboolean (* drop_possible) (GimpContainerTreeView *tree_view,
|
|
|
|
GimpDndType src_type,
|
|
|
|
GimpViewable *src_viewable,
|
|
|
|
GimpViewable *dest_viewable,
|
2009-12-28 21:10:04 +01:00
|
|
|
GtkTreePath *drop_path,
|
2005-01-15 17:57:32 +00:00
|
|
|
GtkTreeViewDropPosition drop_pos,
|
|
|
|
GtkTreeViewDropPosition *return_drop_pos,
|
|
|
|
GdkDragAction *return_drag_action);
|
|
|
|
void (* drop_viewable) (GimpContainerTreeView *tree_view,
|
|
|
|
GimpViewable *src_viewable,
|
|
|
|
GimpViewable *dest_viewable,
|
|
|
|
GtkTreeViewDropPosition drop_pos);
|
|
|
|
void (* drop_color) (GimpContainerTreeView *tree_view,
|
|
|
|
const GimpRGB *src_color,
|
|
|
|
GimpViewable *dest_viewable,
|
|
|
|
GtkTreeViewDropPosition drop_pos);
|
|
|
|
void (* drop_uri_list) (GimpContainerTreeView *tree_view,
|
|
|
|
GList *uri_list,
|
|
|
|
GimpViewable *dest_viewable,
|
|
|
|
GtkTreeViewDropPosition drop_pos);
|
|
|
|
void (* drop_svg) (GimpContainerTreeView *tree_view,
|
|
|
|
const gchar *svg_data,
|
|
|
|
gsize svg_data_length,
|
|
|
|
GimpViewable *dest_viewable,
|
|
|
|
GtkTreeViewDropPosition drop_pos);
|
|
|
|
void (* drop_component) (GimpContainerTreeView *tree_view,
|
|
|
|
GimpImage *image,
|
|
|
|
GimpChannelType component,
|
|
|
|
GimpViewable *dest_viewable,
|
|
|
|
GtkTreeViewDropPosition drop_pos);
|
2005-04-09 17:56:04 +00:00
|
|
|
void (* drop_pixbuf) (GimpContainerTreeView *tree_view,
|
|
|
|
GdkPixbuf *pixbuf,
|
|
|
|
GimpViewable *dest_viewable,
|
|
|
|
GtkTreeViewDropPosition drop_pos);
|
2003-02-21 19:03:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
GType gimp_container_tree_view_get_type (void) G_GNUC_CONST;
|
|
|
|
|
|
|
|
GtkWidget * gimp_container_tree_view_new (GimpContainer *container,
|
2006-04-12 12:49:29 +00:00
|
|
|
GimpContext *context,
|
|
|
|
gint view_size,
|
2010-03-09 21:29:25 +02:00
|
|
|
gint view_border_width);
|
2003-02-21 19:03:19 +00:00
|
|
|
|
2013-11-07 11:32:23 +01:00
|
|
|
GtkCellRenderer *
|
|
|
|
gimp_container_tree_view_get_name_cell
|
|
|
|
(GimpContainerTreeView *tree_view);
|
|
|
|
|
2008-11-16 20:58:53 +00:00
|
|
|
void gimp_container_tree_view_set_main_column_title
|
|
|
|
(GimpContainerTreeView *tree_view,
|
|
|
|
const gchar *title);
|
|
|
|
|
2009-08-28 10:59:27 +02:00
|
|
|
void gimp_container_tree_view_add_toggle_cell
|
2008-11-16 20:58:53 +00:00
|
|
|
(GimpContainerTreeView *tree_view,
|
2009-08-28 10:59:27 +02:00
|
|
|
GtkCellRenderer *cell);
|
2008-11-16 20:58:53 +00:00
|
|
|
|
2009-08-28 10:59:27 +02:00
|
|
|
void gimp_container_tree_view_add_renderer_cell
|
2008-11-16 20:58:53 +00:00
|
|
|
(GimpContainerTreeView *tree_view,
|
2009-08-28 10:59:27 +02:00
|
|
|
GtkCellRenderer *cell);
|
2008-11-16 20:58:53 +00:00
|
|
|
|
2008-11-16 19:48:54 +00:00
|
|
|
void gimp_container_tree_view_set_dnd_drop_to_empty
|
|
|
|
(GimpContainerTreeView *tree_view,
|
|
|
|
gboolean dnd_drop_to_emtpy);
|
2009-08-28 10:59:27 +02:00
|
|
|
void gimp_container_tree_view_connect_name_edited
|
|
|
|
(GimpContainerTreeView *tree_view,
|
2008-06-28 16:05:05 +00:00
|
|
|
GCallback callback,
|
|
|
|
gpointer data);
|
2017-11-14 20:54:38 +01:00
|
|
|
gboolean gimp_container_tree_view_name_edited
|
|
|
|
(GtkCellRendererText *cell,
|
|
|
|
const gchar *path_str,
|
|
|
|
const gchar *new_name,
|
|
|
|
GimpContainerTreeView *tree_view);
|
2008-06-28 16:05:05 +00:00
|
|
|
|
2003-02-21 19:03:19 +00:00
|
|
|
|
|
|
|
#endif /* __GIMP_CONTAINER_TREE_VIEW_H__ */
|