gimp/app/patterns.h
BST 1998 Andy Thomas e99f37ab19 app/patterns.c app/pattern_select.c app/internal_procs.c app/patterns.h
Thu Oct  1 22:39:14 BST 1998 Andy Thomas <alt@picnic.demon.co.uk>

	* app/patterns.c app/pattern_select.c app/internal_procs.c
	* app/patterns.h app/pattern_select.h app/plug_in.c
	* libgimp/gimpmenu.h libgimp/gimpmenu.c libgimp/Makefile.am
	* plug-ins/gfig/gfig.c plug-ins/script-fu/scripts/test-sphere.scm
	* plug-ins/script-fu/script-fu.c plug-ins/script-fu/script-fu-enums.h
	* plug-ins/script-fu/script-fu-scripts.c

	* New libgimp/gimppatternmenu.c

	Pattern dialog can now be controlled via the PDB. New widget (not true
	widget) type added to libgimpui (gimp_pattern_select_widget()). Plugins
	should easily be able to control & select patterns. Script-fu
	updated to use new widget. See the test script for example.
1998-10-01 22:09:01 +00:00

55 lines
2.1 KiB
C

/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* 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 __PATTERNS_H__
#define __PATTERNS_H__
#include <glib.h>
#include "temp_buf.h"
#include "procedural_db.h"
typedef struct _GPattern GPattern, * GPatternP;
struct _GPattern
{
char * filename; /* actual filename--pattern's location on disk */
char * name; /* pattern's name--for pattern selection dialog */
int index; /* pattern's index... */
TempBuf * mask; /* the actual mask... */
};
/* function declarations */
void patterns_init (int no_data);
void patterns_free (void);
void pattern_select_dialog_free (void);
void select_pattern (GPatternP);
GPatternP get_pattern_by_index (int);
GPatternP get_active_pattern (void);
GPatternP pattern_list_get_pattern (GSList *list, char *name);
void create_pattern_dialog (void);
/* global variables */
extern GSList * pattern_list;
extern int num_patterns;
/* Pattern procedures */
extern ProcRecord patterns_get_pattern_proc;
extern ProcRecord patterns_set_pattern_proc;
extern ProcRecord patterns_list_proc;
extern ProcRecord patterns_get_pattern_data_proc;
#endif /* __PATTERNS_H__ */