Commit ab0f6afc authored by Manish Singh's avatar Manish Singh

Upgraded to libtool 1.2b

* Upgraded to libtool 1.2b

* Reversioned libgimp to use gtk-style without a funky soname

* configure.in: craft GLIB_CFLAGS and GLIB_LIBS

* Makefile.am (pretty much all of em): changed to use new library
naming scheme. Only link libgimpui and libgtk et al to the plugins
that actually need them.

* app/gimage_cmds.c: corrected typo that resulted in corrupt PDB
record

* libgimp/gimp.h
* libgimp/gimpwire.h
* libgimp/gimpmenu.[ch]: clean up the callback code

* Removed unecessary inclusion of gtk headers for plugins that
don't use em

* plug-ins/zealouscrop/zealouscrop.c: use gint8 instead of gboolean,
save some mem

* plugged some warnings in animationplay, flame, fp, gee, gfig

* gimptool.in: changes for library reversioning, added --nogimpui
option for not linking in libgimpui

* configure.in: added finnish translation

-Yosh
parent 9b0eb2ae
Sun Sep 20 15:52:21 PDT 1998 Manish Singh <yosh@gimp.org>
* Upgraded to libtool 1.2b
* Reversioned libgimp to use gtk-style without a funky soname
* configure.in: craft GLIB_CFLAGS and GLIB_LIBS
* Makefile.am (pretty much all of em): changed to use new library
naming scheme. Only link libgimpui and libgtk et al to the plugins
that actually need them.
* app/gimage_cmds.c: corrected typo that resulted in corrupt PDB
record
* libgimp/gimp.h
* libgimp/gimpwire.h
* libgimp/gimpmenu.[ch]: clean up the callback code
* Removed unecessary inclusion of gtk headers for plugins that
don't use em
* plug-ins/zealouscrop/zealouscrop.c: use gint8 instead of gboolean,
save some mem
* plugged some warnings in animationplay, flame, fp, gee, gfig
* gimptool.in: changes for library reversioning, added --nogimpui
option for not linking in libgimpui
* configure.in: added finnish translation
Sun Sep 20 12:57:00 CST 1998 Seth Burgess <sjburges@gimp.org>
* plug-ins/gauss_iir/gauss_iir.c: Fixed segfault if neither
horizontal nor vertical was selected (as reported by Marc Lehman).
......
......@@ -1804,7 +1804,7 @@ ProcArg gimage_merge_down_args[] =
"The image"
},
{ PDB_LAYER,
"layer"
"layer",
"The layer to merge down from"
},
{ PDB_INT32,
......
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
# Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
......@@ -478,10 +478,10 @@ EOF
echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
exit 0 ;;
i*:CYGWIN*:*)
echo i386-pc-cygwin32
echo ${UNAME_MACHINE}-pc-cygwin32
exit 0 ;;
i*:MINGW*:*)
echo i386-pc-mingw32
echo ${UNAME_MACHINE}-pc-mingw32
exit 0 ;;
p*:CYGWIN*:*)
echo powerpcle-unknown-cygwin32
......@@ -493,6 +493,12 @@ EOF
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit 0 ;;
*:Linux:*:*)
# uname on the ARM produces all sorts of strangeness, and we need to
# filter it out.
case "$UNAME_MACHINE" in
arm* | sa110*) UNAME_MACHINE="arm" ;;
esac
# The BFD linker knows what the default object file format is, so
# first see if it will tell us.
ld_help_string=`ld --help 2>&1`
......@@ -506,6 +512,7 @@ EOF
i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;;
i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;;
sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;;
esac
......
#! /bin/sh
# Configuration validation subroutine script, version 1.1.
# Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
# Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc.
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
# can handle that machine. It does not imply ALL GNU software can.
......@@ -162,7 +162,7 @@ case $basic_machine in
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
# (2) the word "unknown" tends to confuse beginning users.
i[3456]86)
i[34567]86)
basic_machine=$basic_machine-pc
;;
# Object if more than one company name word.
......@@ -171,7 +171,7 @@ case $basic_machine in
exit 1
;;
# Recognize the basic CPU types with company name.
vax-* | tahoe-* | i[3456]86-* | i860-* | m32r-* | m68k-* | m68000-* \
vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \
| m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
| power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
......@@ -350,19 +350,19 @@ case $basic_machine in
os=-mvs
;;
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
i[3456]86v32)
i[34567]86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv32
;;
i[3456]86v4*)
i[34567]86v4*)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv4
;;
i[3456]86v)
i[34567]86v)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv
;;
i[3456]86sol2)
i[34567]86sol2)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-solaris2
;;
......@@ -469,25 +469,23 @@ case $basic_machine in
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
pentium | p5)
basic_machine=i586-intel
pentium | p5 | k5 | nexen)
basic_machine=i586-pc
;;
pentiumpro | p6)
basic_machine=i686-intel
pentiumpro | p6 | k6 | 6x86)
basic_machine=i686-pc
;;
pentium-* | p5-*)
pentiumii | pentium2)
basic_machine=i786-pc
;;
pentium-* | p5-* | k5-* | nexen-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-*)
pentiumpro-* | p6-* | k6-* | 6x86-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
k5)
# We don't have specific support for AMD's K5 yet, so just call it a Pentium
basic_machine=i586-amd
;;
nexen)
# We don't have specific support for Nexgen yet, so just call it a Pentium
basic_machine=i586-nexgen
pentiumii-* | pentium2-*)
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pn)
basic_machine=pn-gould
......
......@@ -62,13 +62,22 @@ AC_PROG_MAKE_SET
AC_PROG_CPP
dnl i18n stuff
ALL_LINGUAS="sv ja it"
ALL_LINGUAS="sv ja it fi"
AM_GNU_GETTEXT
dnl Check for GTK+
AM_PATH_GTK(1.1.0,,
AM_PATH_GTK(1.1.2,,
AC_MSG_ERROR(Test for GTK failed. See the file 'INSTALL' for help.))
dnl Evil stuff to extract GLIB stuff from gtk-config output
dnl (we want to make sure it matches with the gtk we're using)
GLIB_CFLAGS=`echo $GTK_CFLAGS | sed 's/^.*\(-I[[^ ]]*glib[[^ ]]* *-I[[^ ]]*\).*$/\1/'`
GLIB_LDFLAGS=`echo $gtk_libs | sed -e 's/^.*-lgdk[[^ ]]* *\(-L[[^ ]]*\).*$/\1/' -e 's/^.* -lgdk[[^ ]]* .*$//'`
if test -z "$glib_ldflags" ; then
GLIB_LDFLAGS=`echo $GTK_LIBS | sed 's/^ *\(-L[[^ ]]*\) .*$/\1/'`
fi
GLIB_LIBS="$GLIB_LDFLAGS `echo $GTK_LIBS | sed 's/^.*\(-lglib[[^ ]]*\).*$/\1/'`"
if eval "test x$GCC = xyes"; then
if echo "$CFLAGS" | grep "\-Wall" > /dev/null 2> /dev/null; then
CFLAGS="$CFLAGS"
......@@ -457,6 +466,9 @@ AC_SUBST(LT_CURRENT)
AC_SUBST(LT_REVISION)
AC_SUBST(LT_AGE)
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
AC_SUBST(gimpdir)
AC_SUBST(gimpdatadir)
AC_SUBST(gimpplugindir)
......
......@@ -43,7 +43,8 @@ The --install options can be prefixed with --install-admin instead to install
a plug-in or script in the site directory instead of a user directory.
For plug-ins which do not use GTK+, the --build and --install options can be
appended with -noui for appropriate settings.
appended with -noui for appropriate settings. For plug-ins that use GTK+ but
not libgumpui, append -nogimpui.
All binary build and install options can be appended with -strip to discard
debugging information.
......@@ -137,9 +138,9 @@ while test $# -gt 0; do
--exec-prefix)
echo $exec_prefix
;;
--cflags | --cflags-noui)
--cflags | --cflags-noui | --cflags-nogimpui)
case $1 in
--cflags)
--cflags | --cflags-nogimpui)
my_gtk_cflags=$gtk_cflags ;;
--cflags-noui)
my_gtk_cflags=`echo $gtk_cflags | sed 's/^.*\(-I[^ ]*glib[^ ]* *-I[^ ]*\).*$/\1/'` ;;
......@@ -154,7 +155,7 @@ while test $# -gt 0; do
fi
echo $includes $my_gtk_cflags
;;
--libs)
--libs | --libs-nogimpui)
my_gtk_libs=
libdirs=-L@libdir@
for i in $gtk_libs ; do
......@@ -166,7 +167,12 @@ while test $# -gt 0; do
fi
fi
done
echo $libdirs -lgimpui-@LT_RELEASE@ -lgimp-@LT_RELEASE@ $my_gtk_libs
case $1 in
--libs)
echo $libdirs -lgimpui -lgimp $my_gtk_libs ;;
--libs-nogimpui)
echo $libdirs -lgimp $my_gtk_libs ;;
esac
;;
--libs-noui)
glib_ldflags=`echo $gtk_libs | sed -e 's/^.*-lgdk[^ ]* *\(-L[^ ]*\).*$/\1/' -e 's/^.* -lgdk[^ ]* .*$//'`
......@@ -185,7 +191,7 @@ while test $# -gt 0; do
fi
fi
done
echo -L@libdir@ -lgimp-@LT_RELEASE@ $my_glib_libs
echo -L@libdir@ -lgimp $my_glib_libs
;;
--install-bin | --install-admin-bin \
| --install-bin-strip | --install-admin-bin-strip \
......@@ -231,8 +237,10 @@ while test $# -gt 0; do
exit 1
fi
;;
--build | --install | --install-admin \
| --build-strip | --install-strip | --install-admin-strip \
--build | --install | --install-admin | --build-strip | --install-strip \
| --install-admin-strip | --build-nogimpui | --install-nogimpui \
| --install-admin-nogimpui | --build-nogimpui-strip \
| --install-nogimpui-strip | --install-admin-nogimpui-strip \
| --build-noui | --install-noui | --install-admin-noui \
| --build-noui-strip | --install-noui-strip | --install-admin-noui-strip)
opt=`echo $1 | sed 's/-strip$//'`
......@@ -240,17 +248,21 @@ while test $# -gt 0; do
cflags=`echo $cflags | sed -e 's/-g //g' -e 's/ -g//g'`
fi
case $opt in
--build | --build-noui)
--build | --build-noui | --build-nogimpui)
install_dir=. ;;
--install | --install-noui)
--install | --install-noui | --install-nogimpui)
install_dir="$HOME/@gimpdir@/plug-ins" ;;
--install-admin | --install-admin-noui)
--install-admin | --install-admin-noui | --install-admin-nogimpui)
install_dir="$plug_in_dir/plug-ins" ;;
esac
noui=`echo $opt | sed 's/^.*\(noui\)$/\1/'`
nogimpui=`echo $opt | sed 's/^.*\(nogimpui\)$/\1/'`
if test "$noui" = "noui" ; then
gimp_cflags=`$0 --cflags-noui`
gimp_libs=`$0 --libs-noui`
elif test "$nogimpui" = "nogimpui" ; then
gimp_cflags=`$0 --cflags-nogimpui`
gimp_libs=`$0 --libs-nogimpui`
else
gimp_cflags=`$0 --cflags`
gimp_libs=`$0 --libs`
......
......@@ -43,7 +43,8 @@ The --install options can be prefixed with --install-admin instead to install
a plug-in or script in the site directory instead of a user directory.
For plug-ins which do not use GTK+, the --build and --install options can be
appended with -noui for appropriate settings.
appended with -noui for appropriate settings. For plug-ins that use GTK+ but
not libgumpui, append -nogimpui.
All binary build and install options can be appended with -strip to discard
debugging information.
......@@ -137,9 +138,9 @@ while test $# -gt 0; do
--exec-prefix)
echo $exec_prefix
;;
--cflags | --cflags-noui)
--cflags | --cflags-noui | --cflags-nogimpui)
case $1 in
--cflags)
--cflags | --cflags-nogimpui)
my_gtk_cflags=$gtk_cflags ;;
--cflags-noui)
my_gtk_cflags=`echo $gtk_cflags | sed 's/^.*\(-I[^ ]*glib[^ ]* *-I[^ ]*\).*$/\1/'` ;;
......@@ -154,7 +155,7 @@ while test $# -gt 0; do
fi
echo $includes $my_gtk_cflags
;;
--libs)
--libs | --libs-nogimpui)
my_gtk_libs=
libdirs=-L@libdir@
for i in $gtk_libs ; do
......@@ -166,7 +167,12 @@ while test $# -gt 0; do
fi
fi
done
echo $libdirs -lgimpui-@LT_RELEASE@ -lgimp-@LT_RELEASE@ $my_gtk_libs
case $1 in
--libs)
echo $libdirs -lgimpui -lgimp $my_gtk_libs ;;
--libs-nogimpui)
echo $libdirs -lgimp $my_gtk_libs ;;
esac
;;
--libs-noui)
glib_ldflags=`echo $gtk_libs | sed -e 's/^.*-lgdk[^ ]* *\(-L[^ ]*\).*$/\1/' -e 's/^.* -lgdk[^ ]* .*$//'`
......@@ -185,7 +191,7 @@ while test $# -gt 0; do
fi
fi
done
echo -L@libdir@ -lgimp-@LT_RELEASE@ $my_glib_libs
echo -L@libdir@ -lgimp $my_glib_libs
;;
--install-bin | --install-admin-bin \
| --install-bin-strip | --install-admin-bin-strip \
......@@ -231,8 +237,10 @@ while test $# -gt 0; do
exit 1
fi
;;
--build | --install | --install-admin \
| --build-strip | --install-strip | --install-admin-strip \
--build | --install | --install-admin | --build-strip | --install-strip \
| --install-admin-strip | --build-nogimpui | --install-nogimpui \
| --install-admin-nogimpui | --build-nogimpui-strip \
| --install-nogimpui-strip | --install-admin-nogimpui-strip \
| --build-noui | --install-noui | --install-admin-noui \
| --build-noui-strip | --install-noui-strip | --install-admin-noui-strip)
opt=`echo $1 | sed 's/-strip$//'`
......@@ -240,17 +248,21 @@ while test $# -gt 0; do
cflags=`echo $cflags | sed -e 's/-g //g' -e 's/ -g//g'`
fi
case $opt in
--build | --build-noui)
--build | --build-noui | --build-nogimpui)
install_dir=. ;;
--install | --install-noui)
--install | --install-noui | --install-nogimpui)
install_dir="$HOME/@gimpdir@/plug-ins" ;;
--install-admin | --install-admin-noui)
--install-admin | --install-admin-noui | --install-admin-nogimpui)
install_dir="$plug_in_dir/plug-ins" ;;
esac
noui=`echo $opt | sed 's/^.*\(noui\)$/\1/'`
nogimpui=`echo $opt | sed 's/^.*\(nogimpui\)$/\1/'`
if test "$noui" = "noui" ; then
gimp_cflags=`$0 --cflags-noui`
gimp_libs=`$0 --libs-noui`
elif test "$nogimpui" = "nogimpui" ; then
gimp_cflags=`$0 --cflags-nogimpui`
gimp_libs=`$0 --libs-nogimpui`
else
gimp_cflags=`$0 --cflags`
gimp_libs=`$0 --libs`
......
......@@ -6,7 +6,7 @@ scriptdata =
EXTRA_DIST = gimpfeatures.h.in
lib_LTLIBRARIES = libgimp-1.1.la libgimpui-1.1.la
lib_LTLIBRARIES = libgimp.la libgimpui.la
noinst_LIBRARIES = libgimpi.a
libgimpi_a_SOURCES = \
......@@ -16,9 +16,9 @@ libgimpi_a_SOURCES = \
gimpwire.h
## Evil hack to insure all deps are satisfied on first-run make
libgimpi_a_DEPENDENCIES = libgimp-1.1.la
libgimpi_a_DEPENDENCIES = libgimp.la
libgimp_1_1_la_SOURCES = \
libgimp_la_SOURCES = \
gimp.c \
gimpchannel.c \
gimpdisplay.c \
......@@ -34,7 +34,7 @@ libgimp_1_1_la_SOURCES = \
gimpwire.c \
gimpwire.h
libgimpui_1_1_la_SOURCES = \
libgimpui_la_SOURCES = \
gimpmenu.c
gimpinclude_HEADERS = \
......@@ -45,8 +45,10 @@ gimpinclude_HEADERS = \
gimpui.h \
gimpintl.h
libgimp_1_1_la_LDFLAGS = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
libgimpui_1_1_la_LDFLAGS = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
libgimp_la_LDFLAGS = \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -release $(LT_RELEASE)
libgimpui_la_LDFLAGS = \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -release $(LT_RELEASE)
CPPFLAGS = \
-DGIMPDIR=\""$(gimpdir)"\"
......@@ -58,12 +60,6 @@ INCLUDES = \
$(GTK_CFLAGS) \
-I$(includedir)
libgimpui_1_1_la_INCLUDES = \
-I$(top_srcdir) \
-I$(top_srcdir)/intl \
$(GTK_CFLAGS) \
-I$(includedir)
.PHONY: files
files:
......
......@@ -345,19 +345,6 @@ guchar* gimp_color_cube (void);
gchar* gimp_gtkrc (void);
/* Popup the brush dialog interactively */
typedef void (* GRunBrushCallback) (gchar *, /* Name */
gdouble, /* opacity */
gint, /* spacing */
gint, /* paint_mode */
gint, /* width */
gint, /* height */
gchar *, /* mask data */
gint /* dialog closing */);
void
gimp_interactive_selection_brush(gchar *dialogname, gchar *brush_name,GRunBrushCallback callback);
/****************************************
* Images *
****************************************/
......
......@@ -23,9 +23,43 @@
#include "gimpui.h"
static char* gimp_base_name (char *str);
static void gimp_menu_callback (GtkWidget *w,
gint32 *id);
/* Copy data from temp_PDB call */
struct _GBrushData {
gint busy;
gchar *bname;
gdouble opacity;
gint spacing;
gint paint_mode;
gint width;
gint height;
gchar *brush_mask_data;
GRunBrushCallback callback;
gint closing;
};
typedef struct _GBrushData GBrushData;
static void gimp_menu_callback (GtkWidget *w,
gint32 *id);
static void do_brush_callback (GBrushData *bdata);
static gint idle_test (GBrushData *bdata);
static void temp_brush_invoker (char *name,
int nparams,
GParam *param,
int *nreturn_vals,
GParam **return_vals);
static void input_callback (gpointer data,
gint source,
GdkInputCondition condition);
static void gimp_setup_callbacks (void);
static gchar* gen_temp_plugin_name (void);
/* From gimp.c */
void gimp_run_temp (void);
static GHashTable *gbrush_ht = NULL;
static GBrushData *active_brush_pdb = NULL;
GtkWidget*
......@@ -52,7 +86,7 @@ gimp_image_menu_new (GimpConstraintFunc constraint,
{
filename = gimp_image_get_filename (images[i]);
label = g_new (char, strlen (filename) + 16);
sprintf (label, "%s-%d", gimp_base_name (filename), images[i]);
sprintf (label, "%s-%d", g_basename (filename), images[i]);
g_free (filename);
menuitem = gtk_menu_item_new_with_label (label);
......@@ -118,7 +152,7 @@ gimp_layer_menu_new (GimpConstraintFunc constraint,
{
name = gimp_image_get_filename (images[i]);
image_label = g_new (char, strlen (name) + 16);
sprintf (image_label, "%s-%d", gimp_base_name (name), images[i]);
sprintf (image_label, "%s-%d", g_basename (name), images[i]);
g_free (name);
layers = gimp_image_get_layers (images[i], &nlayers);
......@@ -198,7 +232,7 @@ gimp_channel_menu_new (GimpConstraintFunc constraint,
{
name = gimp_image_get_filename (images[i]);
image_label = g_new (char, strlen (name) + 16);
sprintf (image_label, "%s-%d", gimp_base_name (name), images[i]);
sprintf (image_label, "%s-%d", g_basename (name), images[i]);
g_free (name);
channels = gimp_image_get_channels (images[i], &nchannels);
......@@ -280,7 +314,7 @@ gimp_drawable_menu_new (GimpConstraintFunc constraint,
{
name = gimp_image_get_filename (images[i]);
image_label = g_new (char, strlen (name) + 16);
sprintf (image_label, "%s-%d", gimp_base_name (name), images[i]);
sprintf (image_label, "%s-%d", g_basename (name), images[i]);
g_free (name);
layers = gimp_image_get_layers (images[i], &nlayers);
......@@ -360,17 +394,6 @@ gimp_drawable_menu_new (GimpConstraintFunc constraint,
}
static char*
gimp_base_name (char *str)
{
char *t;
t = strrchr (str, '/');
if (!t)
return str;
return t+1;
}
static void
gimp_menu_callback (GtkWidget *w,
gint32 *id)
......@@ -394,27 +417,8 @@ gimp_menu_callback (GtkWidget *w,
* we will restrict this to a temp PDB function we have registered.
*/
/* Copy data from temp_PDB call */
struct _GBrush_data {
gint busy;
gchar * bname;
gdouble opacity;
gint spacing;
gint paint_mode;
gint width;
gint height;
gchar * brush_mask_data;
GRunBrushCallback callback;
gint closing;
};
typedef struct _GBrush_data GBrush_data;
static GHashTable * gbrush_ht = NULL;
static GBrush_data * active_brush_pdb = NULL;
static void
do_brush_callback(GBrush_data * bdata)
do_brush_callback(GBrushData * bdata)
{
if(!bdata->busy)
return;
......@@ -440,10 +444,9 @@ do_brush_callback(GBrush_data * bdata)
}
static gint
idle_test (GBrush_data * bd)
idle_test (GBrushData * bdata)
{
do_brush_callback(bd);
do_brush_callback(bdata);
return FALSE;
}
......@@ -457,7 +460,7 @@ temp_brush_invoker(char *name,
{
static GParam values[1];
GStatusType status = STATUS_SUCCESS;
GBrush_data *bdata = (GBrush_data *)g_hash_table_lookup(gbrush_ht,name);
GBrushData *bdata = (GBrushData *)g_hash_table_lookup(gbrush_ht,name);
if(!bdata)
{
......@@ -501,20 +504,18 @@ temp_brush_invoker(char *name,
values[0].data.d_status = status;
}
extern void gimp_run_temp(); /* gimp.c */
void input_callback( gpointer data,
gint source,
GdkInputCondition condition )
static void
input_callback (gpointer data,
gint source,
GdkInputCondition condition)
{
/* We have some data in the wire - read it */
/* The below will only ever run a single proc */
gimp_run_temp();
}
static void
gimp_setup_callbacks()
gimp_setup_callbacks (void)
{
static int first_time = TRUE;
extern int _readfd;
......@@ -528,7 +529,7 @@ gimp_setup_callbacks()
}
static gchar *
gen_temp_plugin_name()
gen_temp_plugin_name (void)
{
GParam *return_vals;
int nreturn_vals;
......@@ -572,7 +573,7 @@ gimp_interactive_selection_brush(gchar *dialogname, gchar *brush_name,GRunBrushC
gint bnreturn_vals;
GParam *pdbreturn_vals;
gchar *pdbname = gen_temp_plugin_name();
GBrush_data *bdata = g_malloc0(sizeof(struct _GBrush_data));
GBrushData *bdata = g_malloc0(sizeof(struct _GBrushData));
gimp_install_temp_proc (pdbname,
"Temp PDB for interactive popups",
......@@ -618,7 +619,4 @@ gimp_interactive_selection_brush(gchar *dialogname, gchar *brush_name,GRunBrushC
bdata->callback = callback;
g_hash_table_insert(gbrush_ht,pdbname,bdata);
}
......@@ -34,6 +34,16 @@ typedef gint (*GimpConstraintFunc) (gint32 image_id,
typedef void (*GimpMenuCallback) (gint32 id,
gpointer data);
/* Popup the brush dialog interactively */
typedef void (* GRunBrushCallback) (gchar *, /* Name */
gdouble, /* opacity */
gint, /* spacing */
gint, /* paint_mode */
gint, /* width */
gint, /* height */
gchar *, /* mask data */
gint /* dialog closing */);
GtkWidget* gimp_image_menu_new (GimpConstraintFunc constraint,
GimpMenuCallback callback,
gpointer data,
......@@ -51,6 +61,9 @@ GtkWidget* gimp_drawable_menu_new (GimpConstraintFunc constraint,
gpointer data,
gint32 active_drawable);
void gimp_interactive_selection_brush (gchar *dialogname,
gchar *brush_name,
GRunBrushCallback callback);
#ifdef __cplusplus