Commit f4364f1a authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

app/text/Makefile.am app/text/text-types.h new object. Does nothing yet.

2003-03-25  Michael Natterer  <mitch@gimp.org>

	* app/text/Makefile.am
	* app/text/text-types.h
	* app/text/gimpfont.[ch]: new object. Does nothing yet.
parent 4a581d82
2003-03-25 Michael Natterer <mitch@gimp.org>
* app/text/Makefile.am
* app/text/text-types.h
* app/text/gimpfont.[ch]: new object. Does nothing yet.
2003-03-25 Sven Neumann <sven@gimp.org>
 
* libgimptool/Makefile.am
......@@ -17,6 +17,8 @@ noinst_LIBRARIES = libapptext.a
libapptext_a_sources = \
text-types.h \
text-enums.h \
gimpfont.c \
gimpfont.h \
gimptext.c \
gimptext.h \
gimptext-compat.c \
......
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* gimpfont.c
* Copyright (C) 2003 Michael Natterer <mitch@gimp.org>
* Sven Neumann <sven@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 <glib-object.h>
#include "text-types.h"
#include "gimpfont.h"
static void gimp_font_class_init (GimpFontClass *klass);
static void gimp_font_init (GimpFont *font);
static void gimp_font_finalize (GObject *object);
static gsize gimp_font_get_memsize (GimpObject *object);
static GimpViewableClass *parent_class = NULL;
GType
gimp_font_get_type (void)
{
static GType font_type = 0;
if (! font_type)
{
static const GTypeInfo font_info =
{
sizeof (GimpFontClass),
(GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL,
(GClassInitFunc) gimp_font_class_init,
NULL, /* class_finalize */
NULL, /* class_font */
sizeof (GimpFont),
0, /* n_preallocs */
(GInstanceInitFunc) gimp_font_init,
};
font_type = g_type_register_static (GIMP_TYPE_VIEWABLE,
"GimpFont",
&font_info, 0);
}
return font_type;
}
static void
gimp_font_class_init (GimpFontClass *klass)
{
GObjectClass *object_class;
GimpObjectClass *gimp_object_class;
object_class = G_OBJECT_CLASS (klass);
gimp_object_class = GIMP_OBJECT_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
object_class->finalize = gimp_font_finalize;
gimp_object_class->get_memsize = gimp_font_get_memsize;
}
static void
gimp_font_init (GimpFont *font)
{
}
static void
gimp_font_finalize (GObject *object)
{
GimpFont *font;
font = GIMP_FONT (object);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
static gsize
gimp_font_get_memsize (GimpObject *object)
{
GimpFont *font;
gsize memsize = 0;
font = GIMP_FONT (object);
return memsize + GIMP_OBJECT_CLASS (parent_class)->get_memsize (object);
}
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* gimpfont.h
* Copyright (C) 2003 Michael Natterer <mitch@gimp.org>
* Sven Neumann <sven@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_FONT_H__
#define __GIMP_FONT_H__
#include "core/gimpviewable.h"
#define GIMP_TYPE_FONT (gimp_font_get_type ())
#define GIMP_FONT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_FONT, GimpFont))
#define GIMP_FONT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_FONT, GimpFontClass))
#define GIMP_IS_FONT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_FONT))
#define GIMP_IS_FONT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_FONT))
#define GIMP_FONT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_FONT, GimpFontClass))
typedef struct _GimpFontClass GimpFontClass;
struct _GimpFont
{
GimpViewable parent_instance;
};
struct _GimpFontClass
{
GimpViewableClass parent_class;
};
GType gimp_font_get_type (void) G_GNUC_CONST;
#endif /* __GIMP_FONT_H__ */
......@@ -27,6 +27,7 @@
#include "text/text-enums.h"
typedef struct _GimpFont GimpFont;
typedef struct _GimpText GimpText;
typedef struct _GimpTextLayer GimpTextLayer;
typedef struct _GimpTextLayout GimpTextLayout;
......
Supports Markdown
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