Commit 60273b5b authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

configure.in app/Makefile.am added new directory text.

2003-01-29  Sven Neumann  <sven@gimp.org>

	* configure.in
	* app/Makefile.am
	* app/text/Makefile.am: added new directory text.

	* app/text/text-types.h
	* app/text/gimptext.[ch]: moved GimpText object here.

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpimage-text.c
	* app/tools/gimptexttool.c: changed accordingly.
parent 44278fd4
2003-01-29 Sven Neumann <sven@gimp.org>
* configure.in
* app/Makefile.am
* app/text/Makefile.am: added new directory text.
* app/text/text-types.h
* app/text/gimptext.[ch]: moved GimpText object here.
* app/core/Makefile.am
* app/core/core-types.h
* app/core/gimpimage-text.c
* app/tools/gimptexttool.c: changed accordingly.
2003-01-29 Michael Natterer <mitch@gimp.org>
 
Fixed bug #97449:
......
......@@ -18,9 +18,10 @@ SUBDIRS = \
paint-funcs \
base \
core \
vectors \
config \
paint \
text \
vectors \
xcf \
file \
plug-in \
......@@ -114,8 +115,9 @@ gimp_1_3_LDADD = \
widgets/libappwidgets.a \
core/libappcore.a \
pdb/libapppdb.a \
vectors/libappvectors.a \
paint/libapppaint.a \
text/libapptext.a \
vectors/libappvectors.a \
xcf/libappxcf.a \
file/libappfile.a \
plug-in/libappplug-in.a \
......
......@@ -151,8 +151,6 @@ libappcore_a_sources = \
gimppreviewcache.h \
gimpscanconvert.c \
gimpscanconvert.h \
gimptext.c \
gimptext.h \
gimptoolinfo.c \
gimptoolinfo.h \
gimpunit.c \
......
......@@ -159,8 +159,6 @@ typedef struct _GimpPalette GimpPalette;
typedef struct _GimpImageMap GimpImageMap;
typedef struct _GimpText GimpText;
typedef struct _GimpEnvironTable GimpEnvironTable;
......@@ -221,6 +219,7 @@ struct _GimpCoords
#include "paint/paint-types.h"
#include "text/text-types.h"
#include "vectors/vectors-types.h"
#include "pdb/pdb-types.h"
#include "plug-in/plug-in-types.h"
......
......@@ -29,6 +29,7 @@
#include "base/tile-manager.h"
#include "paint-funcs/paint-funcs.h"
#include "text/gimptext.h"
#include "gimpdrawable.h"
#include "gimpimage.h"
......@@ -36,7 +37,6 @@
#include "gimpimage-text.h"
#include "gimplayer.h"
#include "gimplayer-floating-sel.h"
#include "gimptext.h"
#include "undo.h"
......
/* 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.
*/
#include "config.h"
#include <glib-object.h>
#include "core-types.h"
#include "config/gimpconfig-params.h"
#include "gimptext.h"
enum
{
PROP_0,
PROP_TEXT,
PROP_FONT,
PROP_SIZE,
PROP_BORDER,
PROP_UNIT,
PROP_LETTER_SPACING,
PROP_LINE_SPACING
};
static void gimp_text_class_init (GimpTextClass *klass);
static void gimp_text_finalize (GObject *object);
static void gimp_text_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static GObjectClass *parent_class = NULL;
GType
gimp_text_get_type (void)
{
static GType text_type = 0;
if (! text_type)
{
static const GTypeInfo text_info =
{
sizeof (GimpTextClass),
(GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL,
(GClassInitFunc) gimp_text_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GimpText),
0, /* n_preallocs */
NULL /* instance_init */
};
text_type = g_type_register_static (G_TYPE_OBJECT,
"GimpText", &text_info, 0);
}
return text_type;
}
static void
gimp_text_class_init (GimpTextClass *klass)
{
GObjectClass *object_class;
GParamSpec *param_spec;
object_class = G_OBJECT_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
object_class->finalize = gimp_text_finalize;
object_class->set_property = gimp_text_set_property;
param_spec = g_param_spec_string ("text", NULL, NULL,
NULL,
G_PARAM_CONSTRUCT | G_PARAM_WRITABLE);
g_object_class_install_property (object_class, PROP_TEXT, param_spec);
param_spec = g_param_spec_string ("font", NULL, NULL,
"Sans",
G_PARAM_CONSTRUCT | G_PARAM_WRITABLE);
g_object_class_install_property (object_class, PROP_FONT, param_spec);
param_spec = g_param_spec_double ("size", NULL, NULL,
0.0, G_MAXFLOAT, 18.0,
G_PARAM_CONSTRUCT | G_PARAM_WRITABLE);
g_object_class_install_property (object_class, PROP_SIZE, param_spec);
param_spec = g_param_spec_double ("border", NULL, NULL,
0.0, G_MAXFLOAT, 0.0,
G_PARAM_CONSTRUCT | G_PARAM_WRITABLE);
g_object_class_install_property (object_class, PROP_BORDER, param_spec);
param_spec = gimp_param_spec_unit ("unit", NULL, NULL,
TRUE, GIMP_UNIT_PIXEL,
G_PARAM_CONSTRUCT | G_PARAM_WRITABLE);
g_object_class_install_property (object_class, PROP_UNIT, param_spec);
param_spec = g_param_spec_double ("letter-spacing", NULL, NULL,
0.0, 64.0, 1.0,
G_PARAM_CONSTRUCT | G_PARAM_WRITABLE);
g_object_class_install_property (object_class,
PROP_LETTER_SPACING, param_spec);
param_spec = g_param_spec_double ("line-spacing", NULL, NULL,
0.0, 64.0, 1.0,
G_PARAM_CONSTRUCT | G_PARAM_WRITABLE);
g_object_class_install_property (object_class,
PROP_LINE_SPACING, param_spec);
}
static void
gimp_text_finalize (GObject *object)
{
GimpText *text = GIMP_TEXT (object);
if (text->str)
{
g_free (text->str);
text->str = NULL;
}
if (text->font)
{
g_free (text->font);
text->font = NULL;
}
G_OBJECT_CLASS (parent_class)->finalize (object);
}
static void
gimp_text_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec)
{
GimpText *text = GIMP_TEXT (object);
switch (property_id)
{
case PROP_TEXT:
g_free (text->str);
text->str = g_value_dup_string (value);
break;
case PROP_FONT:
g_free (text->font);
text->font = g_value_dup_string (value);
break;
case PROP_SIZE:
text->size = g_value_get_double (value);
break;
case PROP_BORDER:
text->border = g_value_get_double (value);
break;
case PROP_UNIT:
text->unit = g_value_get_int (value);
break;
case PROP_LETTER_SPACING:
text->letter_spacing = g_value_get_double (value);
break;
case PROP_LINE_SPACING:
text->line_spacing = g_value_get_double (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
Makefile
Makefile.in
.deps
.libs
*.lo
libappvectors.la
## Process this file with automake to produce Makefile.in
AM_CPPFLAGS = \
-DG_LOG_DOMAIN=\"Gimp-Text\" \
@GIMP_THREAD_FLAGS@ \
@GIMP_MP_FLAGS@
INCLUDES = \
-I$(top_srcdir) \
-I$(top_srcdir)/app \
$(GTK_CFLAGS) \
-I$(includedir)
noinst_LIBRARIES = libapptext.a
libapptext_a_SOURCES = \
text-types.h \
gimptext.c \
gimptext.h
......@@ -20,7 +20,7 @@
#include <glib-object.h>
#include "core-types.h"
#include "text/text-types.h"
#include "config/gimpconfig-params.h"
......
......@@ -16,39 +16,13 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __GIMP_TEXT_H__
#define __GIMP_TEXT_H__
#ifndef __TEXT_TYPES_H__
#define __TEXT_TYPES_H__
#define GIMP_TYPE_TEXT (gimp_text_get_type ())
#define GIMP_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_TEXT, GimpText))
#define GIMP_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_TEXT, GimpTextClass))
#define GIMP_IS_TEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_TEXT))
#define GIMP_IS_TEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_TEXT))
#define GIMP_TEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_TEXT, GimpTextClass))
#include "core/core-types.h"
typedef struct _GimpTextClass GimpTextClass;
typedef struct _GimpText GimpText;
struct _GimpText
{
GObject parent_instance;
gchar *str;
gchar *font;
gdouble size;
gdouble border;
GimpUnit unit;
gdouble letter_spacing;
gdouble line_spacing;
};
struct _GimpTextClass
{
GObjectClass parent_class;
};
GType gimp_text_get_type (void) G_GNUC_CONST;
#endif /* __GIMP_TEXT_H__ */
#endif /* __TEXT_TYPES_H__ */
......@@ -38,9 +38,10 @@
#include "core/gimpimage-text.h"
#include "core/gimplayer.h"
#include "core/gimplayer-floating-sel.h"
#include "core/gimptext.h"
#include "core/gimptoolinfo.h"
#include "text/gimptext.h"
#include "widgets/gimpfontselection.h"
#include "widgets/gimpwidgets-utils.h"
......
......@@ -1155,6 +1155,7 @@ app/paint/Makefile
app/paint-funcs/Makefile
app/pdb/Makefile
app/plug-in/Makefile
app/text/Makefile
app/tools/Makefile
app/vectors/Makefile
app/widgets/Makefile
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment