Commit 1187328d authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

configure.in app/Makefile.am app/paint-funcs/.cvsignore made the

2001-04-07  Michael Natterer  <mitch@gimp.org>

	* configure.in
	* app/Makefile.am
	* app/paint-funcs/.cvsignore
	* app/paint-funcs/Makefile.am: made the paint-funcs directory compile
	so Prof can continue hacking it. The old stuff still needs to be
	removed.

	* app/apptypes.h
	* app/gimpdock.[ch]
	* app/gimpdockable.[ch]: new widgets (not used yet).

	* app/menus.c
	* app/test_commands.[ch]: untested testing code for the new widgets.
parent 11c51fa9
2001-04-07 Michael Natterer <mitch@gimp.org>
* configure.in
* app/Makefile.am
* app/paint-funcs/.cvsignore
* app/paint-funcs/Makefile.am: made the paint-funcs directory compile
so Prof can continue hacking it. The old stuff still needs to be
removed.
* app/apptypes.h
* app/gimpdock.[ch]
* app/gimpdockable.[ch]: new widgets (not used yet).
* app/menus.c
* app/test_commands.[ch]: untested testing code for the new widgets.
2001-04-07 Daniel Egger <egger@suse.de>
* app/paint-funcs/paint-funcs-gray.c:
* app/paint-funcs/paint-funcs-gray.h:
* app/paint-funcs/paint-funcs-graya.c:
* app/paint-funcs/paint-funcs-graya.h:
* app/paint-funcs/paint-funcs-indexed.c:
* app/paint-funcs/paint-funcs-indexed.h:
* app/paint-funcs/paint-funcs-indexeda.c:
* app/paint-funcs/paint-funcs-indexeda.h:
* app/paint-funcs/paint-funcs-rgb.c:
* app/paint-funcs/paint-funcs-rgb.h:
* app/paint-funcs/paint-funcs-rgba.c:
* app/paint-funcs/paint-funcs-rgba.h: Added new files seperated and
specialised from paint_funcs.c. Not used so far.
* app/paint-funcs/paint-funcs-gray.[ch]
* app/paint-funcs/paint-funcs-graya.[ch]
* app/paint-funcs/paint-funcs-indexed.[ch]
* app/paint-funcs/paint-funcs-indexeda.[ch]
* app/paint-funcs/paint-funcs-rgb.[ch]
* app/paint-funcs/paint-funcs-rgba.[ch]: Added new files seperated
and specialised from paint_funcs.c. Not used so far.
2001-04-07 Michael Natterer <mitch@gimp.org>
......
## Process this file with automake to produce Makefile.in
SUBDIRS = pdb tools
SUBDIRS = paint-funcs pdb tools
scriptdata =
......@@ -14,8 +14,7 @@ endif
if HAVE_ASM_MMX
mmx_sources = \
detect_mmx.S \
paint_funcs_simd.S
detect_mmx.S
else
mmx_sources =
endif
......@@ -282,9 +281,7 @@ gimp_SOURCES = \
xcf.h \
$(regex_sources) \
\
paint_funcs.c \
paint_funcs.h \
$(mmx_sources) \
$(mmx_sources) \
pixel_processor.c \
pixel_processor.h \
pixel_region.c \
......@@ -314,6 +311,10 @@ gimp_SOURCES = \
gimpcontainerview.c \
gimpdatafactoryview.h \
gimpdatafactoryview.c \
gimpdock.c \
gimpdock.h \
gimpdockable.c \
gimpdockable.h \
gimpdrawablelistitem.c \
gimpdrawablelistitem.h \
gimpdrawablelistview.c \
......@@ -380,6 +381,7 @@ INCLUDES = \
-I$(includedir)
gimp_LDADD = \
paint-funcs/libapppaint-funcs.la \
pdb/libapppdb.la \
tools/libapptools.la \
$(top_builddir)/libgimpcolor/libgimpcolor-$(LT_RELEASE).la \
......
......@@ -112,6 +112,9 @@ typedef struct _GimpListItem GimpListItem;
typedef struct _GimpDrawableListItem GimpDrawableListItem;
typedef struct _GimpLayerListItem GimpLayerListItem;
typedef struct _GimpDock GimpDock;
typedef struct _GimpDockable GimpDockable;
typedef struct _HistogramWidget HistogramWidget;
......
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* gimpdock.c
* Copyright (C) 2001 Michael Natterer <mitch@gimp.org>
*
* 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.
*/
#include "config.h"
#include <gtk/gtk.h>
#include "apptypes.h"
#include "gimpdock.h"
#include "gimpdockable.h"
static void gimp_dock_class_init (GimpDockClass *klass);
static void gimp_dock_init (GimpDock *dock);
static void gimp_dock_destroy (GtkObject *object);
static GtkWindowClass *parent_class = NULL;
GtkType
gimp_dock_get_type (void)
{
static GtkType dock_type = 0;
if (! dock_type)
{
static const GtkTypeInfo dock_info =
{
"GimpDock",
sizeof (GimpDock),
sizeof (GimpDockClass),
(GtkClassInitFunc) gimp_dock_class_init,
(GtkObjectInitFunc) gimp_dock_init,
/* reserved_1 */ NULL,
/* reserved_2 */ NULL,
(GtkClassInitFunc) NULL,
};
dock_type = gtk_type_unique (GTK_TYPE_WINDOW, &dock_info);
}
return dock_type;
}
static void
gimp_dock_class_init (GimpDockClass *klass)
{
GtkObjectClass *object_class;
object_class = (GtkObjectClass *) klass;
parent_class = gtk_type_class (GTK_TYPE_WINDOW);
object_class->destroy = gimp_dock_destroy;
}
static void
gimp_dock_init (GimpDock *dock)
{
dock->vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (dock), dock->vbox);
gtk_widget_show (dock->vbox);
dock->notebook = gtk_notebook_new ();
gtk_container_add (GTK_CONTAINER (dock->vbox), dock->notebook);
gtk_widget_show (dock->notebook);
}
static void
gimp_dock_destroy (GtkObject *object)
{
if (GTK_OBJECT_CLASS (parent_class))
GTK_OBJECT_CLASS (parent_class)->destroy (object);
}
GtkWidget *
gimp_dock_new (void)
{
return GTK_WIDGET (gtk_type_new (GIMP_TYPE_DOCK));
}
void
gimp_dock_add (GimpDock *dock,
GimpDockable *dockable)
{
g_return_if_fail (dock != NULL);
g_return_if_fail (GIMP_IS_DOCK (dock));
g_return_if_fail (dockable != NULL);
g_return_if_fail (GIMP_IS_DOCKABLE (dockable));
gtk_notebook_append_page_menu (GTK_NOTEBOOK (dock->notebook),
GTK_WIDGET (dockable),
gtk_label_new (dockable->name),
gtk_label_new (dockable->name));
}
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* gimpdock.h
* Copyright (C) 2001 Michael Natterer <mitch@gimp.org>
*
* 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 __GIMP_DOCK_H__
#define __GIMP_DOCK_H__
#include <gtk/gtkwindow.h>
#define GIMP_TYPE_DOCK (gimp_dock_get_type ())
#define GIMP_DOCK(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_DOCK, GimpDock))
#define GIMP_DOCK_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_DOCK, GimpDockClass))
#define GIMP_IS_DOCK(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_DOCK))
#define GIMP_IS_DOCK_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_DOCK))
typedef struct _GimpDockClass GimpDockClass;
struct _GimpDock
{
GtkWindow parent_instance;
GtkWidget *vbox;
GtkWidget *notebook;
};
struct _GimpDockClass
{
GtkWindowClass parent_class;
};
GtkType gimp_dock_get_type (void);
GtkWidget * gimp_dock_new (void);
void gimp_dock_add (GimpDock *dock,
GimpDockable *dockable);
#endif /* __GIMP_DOCK_H__ */
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* gimpdockable.c
* Copyright (C) 2001 Michael Natterer <mitch@gimp.org>
*
* 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.
*/
#include "config.h"
#include <gtk/gtk.h>
#include "apptypes.h"
#include "gimpdockable.h"
static void gimp_dockable_class_init (GimpDockableClass *klass);
static void gimp_dockable_init (GimpDockable *dockable);
static void gimp_dockable_destroy (GtkObject *object);
static GtkVBoxClass *parent_class = NULL;
GtkType
gimp_dockable_get_type (void)
{
static GtkType dockable_type = 0;
if (! dockable_type)
{
static const GtkTypeInfo dockable_info =
{
"GimpDockable",
sizeof (GimpDockable),
sizeof (GimpDockableClass),
(GtkClassInitFunc) gimp_dockable_class_init,
(GtkObjectInitFunc) gimp_dockable_init,
/* reserved_1 */ NULL,
/* reserved_2 */ NULL,
(GtkClassInitFunc) NULL,
};
dockable_type = gtk_type_unique (GTK_TYPE_VBOX, &dockable_info);
}
return dockable_type;
}
static void
gimp_dockable_class_init (GimpDockableClass *klass)
{
GtkObjectClass *object_class;
object_class = (GtkObjectClass *) klass;
parent_class = gtk_type_class (GTK_TYPE_VBOX);
object_class->destroy = gimp_dockable_destroy;
}
static void
gimp_dockable_init (GimpDockable *dockable)
{
dockable->name = NULL;
dockable->dock = NULL;
}
static void
gimp_dockable_destroy (GtkObject *object)
{
GimpDockable *dockable;
dockable = GIMP_DOCKABLE (object);
g_free (dockable->name);
if (GTK_OBJECT_CLASS (parent_class))
GTK_OBJECT_CLASS (parent_class)->destroy (object);
}
GtkWidget *
gimp_dockable_new (const gchar *name)
{
g_return_val_if_fail (name != NULL, NULL);
return GTK_WIDGET (gtk_type_new (GIMP_TYPE_DOCKABLE));
}
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* gimpdockable.h
* Copyright (C) 2001 Michael Natterer <mitch@gimp.org>
*
* 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 __GIMP_DOCKABLE_H__
#define __GIMP_DOCKABLE_H__
#include <gtk/gtkvbox.h>
#define GIMP_TYPE_DOCKABLE (gimp_dockable_get_type ())
#define GIMP_DOCKABLE(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_DOCKABLE, GimpDockable))
#define GIMP_DOCKABLE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_DOCKABLE, GimpDockableClass))
#define GIMP_IS_DOCKABLE(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_DOCKABLE))
#define GIMP_IS_DOCKABLE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_DOCKABLE))
typedef struct _GimpDockableClass GimpDockableClass;
struct _GimpDockable
{
GtkVBox parent_instance;
gchar *name;
GimpDock *dock;
};
struct _GimpDockableClass
{
GtkVBoxClass parent_class;
};
GtkType gimp_dockable_get_type (void);
GtkWidget * gimp_dockable_new (const gchar *name);
#endif /* __GIMP_DOCKABLE_H__ */
......@@ -161,6 +161,12 @@ static GimpItemFactoryEntry toolbox_entries[] =
"file/dialogs/display_filters/display_filters.html", NULL },
#endif /* DISPLAY_FILTERS */
{ { N_("/File/Test Dialogs/Dock..."), NULL, test_dock_cmd_callback, 1 },
NULL, NULL },
{ { "/File/Test Dialogs/---", NULL, NULL, 0, "<Separator>" },
NULL, NULL },
{ { N_("/File/Test Dialogs/Layer List..."), NULL, test_layer_list_cmd_callback, 1 },
NULL, NULL },
{ { N_("/File/Test Dialogs/Channel List..."), NULL, test_channel_list_cmd_callback, 1 },
......
......@@ -34,6 +34,8 @@
#include "gimpcontext.h"
#include "gimpdatafactory.h"
#include "gimpdatafactoryview.h"
#include "gimpdock.h"
#include "gimpdockable.h"
#include "gimpdrawablelistview.h"
#include "gimpimage.h"
#include "gimplayer.h"
......@@ -588,3 +590,24 @@ test_channel_list_cmd_callback (GtkWidget *widget,
drawable_view_new ("Channel List", TRUE,
gimp_context_get_user ());
}
void
test_dock_cmd_callback (GtkWidget *widget,
gpointer client_data)
{
GtkWidget *dock;
GtkWidget *dockable;
dock = gimp_dock_new ();
dockable = gimp_dockable_new ("Test Dockable 1");
gimp_dock_add (dock, dockable);
dockable = gimp_dockable_new ("Test Dockable 2");
gimp_dock_add (dock, dockable);
dockable = gimp_dockable_new ("Test Dockable 3");
gimp_dock_add (dock, dockable);
gtk_widget_show (dock);
}
......@@ -41,5 +41,7 @@ void test_layer_grid_cmd_callback (GtkWidget *, gpointer);
void test_channel_list_cmd_callback (GtkWidget *, gpointer);
void test_channel_grid_cmd_callback (GtkWidget *, gpointer);
void test_dock_cmd_callback (GtkWidget *, gpointer);
#endif /* __TEST_COMMANDS_H__ */
......@@ -161,6 +161,12 @@ static GimpItemFactoryEntry toolbox_entries[] =
"file/dialogs/display_filters/display_filters.html", NULL },
#endif /* DISPLAY_FILTERS */
{ { N_("/File/Test Dialogs/Dock..."), NULL, test_dock_cmd_callback, 1 },
NULL, NULL },
{ { "/File/Test Dialogs/---", NULL, NULL, 0, "<Separator>" },
NULL, NULL },
{ { N_("/File/Test Dialogs/Layer List..."), NULL, test_layer_list_cmd_callback, 1 },
NULL, NULL },
{ { N_("/File/Test Dialogs/Channel List..."), NULL, test_channel_list_cmd_callback, 1 },
......
......@@ -161,6 +161,12 @@ static GimpItemFactoryEntry toolbox_entries[] =
"file/dialogs/display_filters/display_filters.html", NULL },
#endif /* DISPLAY_FILTERS */
{ { N_("/File/Test Dialogs/Dock..."), NULL, test_dock_cmd_callback, 1 },
NULL, NULL },
{ { "/File/Test Dialogs/---", NULL, NULL, 0, "<Separator>" },
NULL, NULL },
{ { N_("/File/Test Dialogs/Layer List..."), NULL, test_layer_list_cmd_callback, 1 },
NULL, NULL },
{ { N_("/File/Test Dialogs/Channel List..."), NULL, test_channel_list_cmd_callback, 1 },
......
Makefile
Makefile.in
.deps
.libs
*.lo
libapppaint-funcs.la
## Process this file with automake to produce Makefile.in
noinst_LTLIBRARIES = libapppaint-funcs.la
if HAVE_ASM_MMX
mmx_sources = \
paint-funcs-simd.S
else
mmx_sources =
endif
libapppaint_funcs_la_SOURCES = \
paint-funcs.c \
paint-funcs.h \
$(mmx_sources)
AM_CPPFLAGS = \
-DG_LOG_DOMAIN=\"Gimp-Paint-Funcs\"
INCLUDES = \
-I$(top_srcdir) \
-I$(top_srcdir)/app \
$(GTK_CFLAGS) \
-I$(includedir)
.PHONY: files
files:
@files=`ls $(DISTFILES) 2> /dev/null`; for p in $$files; do \
echo $$p; \
done
......@@ -34,6 +34,8 @@
#include "gimpcontext.h"
#include "gimpdatafactory.h"
#include "gimpdatafactoryview.h"
#include "gimpdock.h"
#include "gimpdockable.h"
#include "gimpdrawablelistview.h"
#include "gimpimage.h"
#include "gimplayer.h"
......@@ -588,3 +590,24 @@ test_channel_list_cmd_callback (GtkWidget *widget,
drawable_view_new ("Channel List", TRUE,
gimp_context_get_user ());
}
void
test_dock_cmd_callback (GtkWidget *widget,
gpointer client_data)
{
GtkWidget *dock;
GtkWidget *dockable;
dock = gimp_dock_new ();
dockable = gimp_dockable_new ("Test Dockable 1");
gimp_dock_add (dock, dockable);
dockable = gimp_dockable_new ("Test Dockable 2");
gimp_dock_add (dock, dockable);
dockable = gimp_dockable_new ("Test Dockable 3");
gimp_dock_add (dock, dockable);
gtk_widget_show (dock);
}
......@@ -41,5 +41,7 @@ void test_layer_grid_cmd_callback (GtkWidget *, gpointer);
void test_channel_list_cmd_callback (GtkWidget *, gpointer);
void test_channel_grid_cmd_callback (GtkWidget *, gpointer);
void test_dock_cmd_callback (GtkWidget *, gpointer);
#endif /* __TEST_COMMANDS_H__ */
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* gimpdock.c
* Copyright (C) 2001 Michael Natterer <mitch@gimp.org>
*
* 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.
*/
#include "config.h"
#include <gtk/gtk.h>
#include "apptypes.h"
#include "gimpdock.h"
#include "gimpdockable.h"
static void gimp_dock_class_init (GimpDockClass *klass);
static void gimp_dock_init (GimpDock *dock);
static void gimp_dock_destroy (GtkObject *object);
static GtkWindowClass *parent_class = NULL;
GtkType
gimp_dock_get_type (void)
{
static GtkType dock_type = 0;
if (! dock_type)
{
static const GtkTypeInfo dock_info =
{
"GimpDock",
sizeof (GimpDock),
sizeof (GimpDockClass),
(GtkClassInitFunc) gimp_dock_class_init,
(GtkObjectInitFunc) gimp_dock_init,
/* reserved_1 */ NULL,
/* reserved_2 */ NULL,
(GtkClassInitFunc) NULL,
};
dock_type = gtk_type_unique (GTK_TYPE_WINDOW, &dock_info);
}
return dock_type;
}
static void
gimp_dock_class_init (GimpDockClass *klass)
{
GtkObjectClass *object_class;
object_class = (GtkObjectClass *) klass;
parent_class = gtk_type_class (GTK_TYPE_WINDOW);
object_class->destroy = gimp_dock_destroy;
}
static void
gimp_dock_init (GimpDock *dock)
{
dock->vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (dock), dock->vbox);
gtk_widget_show (dock->vbox);
dock->notebook = gtk_notebook_new ();
gtk_container_add (GTK_CONTAINER (dock->vbox), dock->notebook);
gtk_widget_show (dock->notebook);
}
static void
gimp_dock_destroy (GtkObject *object)
{
if (GTK_OBJECT_CLASS (parent_class))
GTK_OBJECT_CLASS (parent_class)->destroy (object);
}
GtkWidget *
gimp_dock_new (void)
{
return GTK_WIDGET (gtk_type_new (GIMP_TYPE_DOCK));
}
void
gimp_dock_add (GimpDock *dock,
GimpDockable *dockable)
{