gimpbrushpipe.h 2.17 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
/* The GIMP -- an image manipulation program
 * Copyright (C) 1995 Spencer Kimball and Peter Mattis
 * Copyright (C) 1999 Adrian Likins and Tor Lillqvist
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (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
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

#ifndef __GIMPBRUSHPIPE_H__
#define __GIMPBRUSHPIPE_H__

#include "tools.h"
#include "paint_core.h"
25
#include "gimpbrush.h"
26
#include "temp_buf.h"
27

28 29 30
typedef struct _GimpBrushPixmap GimpBrushPixmap;
typedef struct _GimpBrushPipe GimpBrushPipe;

31 32
#define GIMP_TYPE_BRUSH_PIXMAP    (gimp_brush_pixmap_get_type ())
#define GIMP_BRUSH_PIXMAP(obj)    (GIMP_CHECK_CAST ((obj), GIMP_TYPE_BRUSH_PIXMAP, GimpBrushPixmap))
33
#define GIMP_IS_BRUSH_PIXMAP(obj) (GIMP_CHECK_TYPE ((obj), GIMP_TYPE_BRUSH_PIXMAP))
34

35 36
#define GIMP_TYPE_BRUSH_PIPE    (gimp_brush_pipe_get_type ())
#define GIMP_BRUSH_PIPE(obj)    (GIMP_CHECK_CAST ((obj), GIMP_TYPE_BRUSH_PIPE, GimpBrushPipe))
37 38
#define GIMP_IS_BRUSH_PIPE(obj) (GIMP_CHECK_TYPE ((obj), GIMP_TYPE_BRUSH_PIPE))

39 40
GtkType         gimp_brush_pixmap_get_type (void);
GtkType         gimp_brush_pipe_get_type   (void);
41

42 43
GimpBrushPipe * gimp_brush_pipe_load       (gchar *filename);
GimpBrushPipe * gimp_brush_pixmap_load     (gchar *filename);
44

45
TempBuf       * gimp_brush_pixmap_pixmap   (GimpBrushPixmap *brush);
46

47 48 49 50
/* appearantly GIMP_IS_BRUSH_PIPE () returning TRUE is no indication
 * that you really have a brush_pipe in front of you, so here we introduce
 * a macro that works:
 */
Sven Neumann's avatar
Sven Neumann committed
51 52
#define GIMP_IS_REALLY_A_BRUSH_PIPE(obj) (GIMP_IS_BRUSH_PIPE (obj) && GIMP_BRUSH_PIPE (obj)->nbrushes > 1)

53
#endif  /* __GIMPBRUSHPIPE_H__ */