gimpfilteredcontainer.h 2.77 KB
Newer Older
1 2 3 4 5
/* GIMP - The GNU Image Manipulation Program
 * Copyright (C) 1995-1997 Spencer Kimball and Peter Mattis
 *
 * gimpfilteredcontainer.h
 * Copyright (C) 2008 Aurimas Juška <aurisj@svn.gnome.org>
6
 *               2011 Michael Natterer <mitch@gimp.org>
7
 *
8
 * This program is free software: you can redistribute it and/or modify
9
 * it under the terms of the GNU General Public License as published by
10
 * the Free Software Foundation; either version 3 of the License, or
11 12 13 14 15 16 17 18
 * (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
19
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 21 22 23 24 25 26 27 28 29 30 31 32
 */

#ifndef __GIMP_FILTERED_CONTAINER_H__
#define __GIMP_FILTERED_CONTAINER_H__


#include "gimplist.h"


#define GIMP_TYPE_FILTERED_CONTAINER            (gimp_filtered_container_get_type ())
#define GIMP_FILTERED_CONTAINER(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_FILTERED_CONTAINER, GimpFilteredContainer))
#define GIMP_FILTERED_CONTAINER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_FILTERED_CONTAINER, GimpFilteredContainerClass))
#define GIMP_IS_FILTERED_CONTAINER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_FILTERED_CONTAINER))
33
#define GIMP_IS_FILTERED_CONTAINER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), GIMP_TYPE_FILTERED_CONTAINER))
34 35 36 37 38 39 40
#define GIMP_FILTERED_CONTAINER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_FILTERED_CONTAINER, GimpFilteredContainerClass))


typedef struct _GimpFilteredContainerClass GimpFilteredContainerClass;

struct _GimpFilteredContainer
{
41
  GimpList              parent_instance;
42

43 44 45
  GimpContainer        *src_container;
  GimpObjectFilterFunc  filter_func;
  gpointer              filter_data;
46 47 48 49 50
};

struct _GimpFilteredContainerClass
{
  GimpContainerClass  parent_class;
51 52 53 54 55 56 57

  void (* src_add)    (GimpFilteredContainer *filtered_container,
                       GimpObject            *object);
  void (* src_remove) (GimpFilteredContainer *filtered_container,
                       GimpObject            *object);
  void (* src_freeze) (GimpFilteredContainer *filtered_container);
  void (* src_thaw)   (GimpFilteredContainer *filtered_container);
58 59 60
};


61
GType           gimp_filtered_container_get_type (void) G_GNUC_CONST;
62

63 64 65
GimpContainer * gimp_filtered_container_new      (GimpContainer        *src_container,
                                                  GimpObjectFilterFunc  filter_func,
                                                  gpointer              filter_data);
66 67 68


#endif  /* __GIMP_FILTERED_CONTAINER_H__ */