mirror of https://github.com/GNOME/gimp.git
libgimp: move GimpFont, GimpGradient and GimpPalette to their own file.
Even though we don't have specific additional functions right now, it's just much more cleaner this way.
This commit is contained in:
parent
457f52a6d1
commit
55d6f6c26e
|
@ -41,7 +41,9 @@
|
|||
#include <libgimp/gimpchannel.h>
|
||||
#include <libgimp/gimpdisplay.h>
|
||||
#include <libgimp/gimpdrawable.h>
|
||||
#include <libgimp/gimpfont.h>
|
||||
#include <libgimp/gimpgimprc.h>
|
||||
#include <libgimp/gimpgradient.h>
|
||||
#include <libgimp/gimpimage.h>
|
||||
#include <libgimp/gimpimagecolorprofile.h>
|
||||
#include <libgimp/gimpimagemetadata.h>
|
||||
|
@ -50,6 +52,7 @@
|
|||
#include <libgimp/gimplayer.h>
|
||||
#include <libgimp/gimplayermask.h>
|
||||
#include <libgimp/gimploadprocedure.h>
|
||||
#include <libgimp/gimppalette.h>
|
||||
#include <libgimp/gimpparamspecs.h>
|
||||
#include <libgimp/gimppattern.h>
|
||||
#include <libgimp/gimppdb.h>
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
/* LIBGIMP - The GIMP Library
|
||||
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
|
||||
*
|
||||
* gimpfont.c
|
||||
* Copyright (C) 2023 Jehan
|
||||
*
|
||||
* This library is free software: you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see
|
||||
* <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "gimp.h"
|
||||
|
||||
#include "gimpfont.h"
|
||||
|
||||
struct _GimpFont
|
||||
{
|
||||
GimpResource parent_instance;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (GimpFont, gimp_font, GIMP_TYPE_RESOURCE);
|
||||
|
||||
|
||||
static void gimp_font_class_init (GimpFontClass *klass)
|
||||
{
|
||||
}
|
||||
|
||||
static void gimp_font_init (GimpFont *font)
|
||||
{
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
/* LIBGIMP - The GIMP Library
|
||||
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
|
||||
*
|
||||
* gimpfont.h
|
||||
* Copyright (C) 2023 Jehan
|
||||
*
|
||||
* This library is free software: you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see
|
||||
* <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION)
|
||||
#error "Only <libgimp/gimp.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __GIMP_FONT_H__
|
||||
#define __GIMP_FONT_H__
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* For information look into the C source or the html documentation */
|
||||
|
||||
|
||||
#include <libgimp/gimpresource.h>
|
||||
|
||||
|
||||
#define GIMP_TYPE_FONT (gimp_font_get_type ())
|
||||
G_DECLARE_FINAL_TYPE (GimpFont, gimp_font, GIMP, FONT, GimpResource)
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GIMP_FONT_H__ */
|
|
@ -0,0 +1,42 @@
|
|||
/* LIBGIMP - The GIMP Library
|
||||
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
|
||||
*
|
||||
* gimpgradient.c
|
||||
* Copyright (C) 2023 Jehan
|
||||
*
|
||||
* This library is free software: you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see
|
||||
* <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "gimp.h"
|
||||
|
||||
#include "gimpgradient.h"
|
||||
|
||||
struct _GimpGradient
|
||||
{
|
||||
GimpResource parent_instance;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (GimpGradient, gimp_gradient, GIMP_TYPE_RESOURCE);
|
||||
|
||||
|
||||
static void gimp_gradient_class_init (GimpGradientClass *klass)
|
||||
{
|
||||
}
|
||||
|
||||
static void gimp_gradient_init (GimpGradient *gradient)
|
||||
{
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
/* LIBGIMP - The GIMP Library
|
||||
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
|
||||
*
|
||||
* gimpgradient.h
|
||||
* Copyright (C) 2023 Jehan
|
||||
*
|
||||
* This library is free software: you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see
|
||||
* <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION)
|
||||
#error "Only <libgimp/gimp.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __GIMP_GRADIENT_H__
|
||||
#define __GIMP_GRADIENT_H__
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* For information look into the C source or the html documentation */
|
||||
|
||||
|
||||
#include <libgimp/gimpresource.h>
|
||||
|
||||
|
||||
#define GIMP_TYPE_GRADIENT (gimp_gradient_get_type ())
|
||||
G_DECLARE_FINAL_TYPE (GimpGradient, gimp_gradient, GIMP, GRADIENT, GimpResource)
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GIMP_GRADIENT_H__ */
|
|
@ -0,0 +1,42 @@
|
|||
/* LIBGIMP - The GIMP Library
|
||||
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
|
||||
*
|
||||
* gimppalette.c
|
||||
* Copyright (C) 2023 Jehan
|
||||
*
|
||||
* This library is free software: you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see
|
||||
* <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "gimp.h"
|
||||
|
||||
#include "gimppalette.h"
|
||||
|
||||
struct _GimpPalette
|
||||
{
|
||||
GimpResource parent_instance;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (GimpPalette, gimp_palette, GIMP_TYPE_RESOURCE);
|
||||
|
||||
|
||||
static void gimp_palette_class_init (GimpPaletteClass *klass)
|
||||
{
|
||||
}
|
||||
|
||||
static void gimp_palette_init (GimpPalette *palette)
|
||||
{
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
/* LIBGIMP - The GIMP Library
|
||||
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
|
||||
*
|
||||
* gimppalette.h
|
||||
* Copyright (C) 2023 Jehan
|
||||
*
|
||||
* This library is free software: you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see
|
||||
* <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION)
|
||||
#error "Only <libgimp/gimp.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __GIMP_PALETTE_H__
|
||||
#define __GIMP_PALETTE_H__
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* For information look into the C source or the html documentation */
|
||||
|
||||
|
||||
#include <libgimp/gimpresource.h>
|
||||
|
||||
|
||||
#define GIMP_TYPE_PALETTE (gimp_palette_get_type ())
|
||||
G_DECLARE_FINAL_TYPE (GimpPalette, gimp_palette, GIMP, PALETTE, GimpResource)
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GIMP_PALETTE_H__ */
|
|
@ -458,36 +458,3 @@ gimp_resource_is_font (GimpResource *resource)
|
|||
{
|
||||
return gimp_resource_id_is_font (gimp_resource_get_id (resource));
|
||||
}
|
||||
|
||||
|
||||
struct _GimpGradient
|
||||
{
|
||||
GimpResource parent_instance;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (GimpGradient, gimp_gradient, GIMP_TYPE_RESOURCE);
|
||||
|
||||
static void gimp_gradient_class_init (GimpGradientClass *klass) {}
|
||||
static void gimp_gradient_init (GimpGradient *self) {}
|
||||
|
||||
|
||||
struct _GimpPalette
|
||||
{
|
||||
GimpResource parent_instance;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (GimpPalette, gimp_palette, GIMP_TYPE_RESOURCE);
|
||||
|
||||
static void gimp_palette_class_init (GimpPaletteClass *klass) {}
|
||||
static void gimp_palette_init (GimpPalette *self) {}
|
||||
|
||||
|
||||
struct _GimpFont
|
||||
{
|
||||
GimpResource parent_instance;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (GimpFont, gimp_font, GIMP_TYPE_RESOURCE);
|
||||
|
||||
static void gimp_font_class_init (GimpFontClass *klass) {}
|
||||
static void gimp_font_init (GimpFont *self) {}
|
||||
|
|
|
@ -60,16 +60,6 @@ gboolean gimp_resource_is_palette (GimpResource *resource);
|
|||
gboolean gimp_resource_is_font (GimpResource *resource);
|
||||
|
||||
|
||||
#define GIMP_TYPE_GRADIENT (gimp_gradient_get_type ())
|
||||
G_DECLARE_FINAL_TYPE (GimpGradient, gimp_gradient, GIMP, GRADIENT, GimpResource)
|
||||
|
||||
#define GIMP_TYPE_PALETTE (gimp_palette_get_type ())
|
||||
G_DECLARE_FINAL_TYPE (GimpPalette, gimp_palette, GIMP, PALETTE, GimpResource)
|
||||
|
||||
#define GIMP_TYPE_FONT (gimp_font_get_type ())
|
||||
G_DECLARE_FINAL_TYPE (GimpFont, gimp_font, GIMP, FONT, GimpResource)
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GIMP_RESOURCE_H__ */
|
||||
|
|
|
@ -173,7 +173,9 @@ libgimp_sources_introspectable = [
|
|||
'gimpdisplay.c',
|
||||
'gimpdrawable.c',
|
||||
'gimpfileprocedure.c',
|
||||
'gimpfont.c',
|
||||
'gimpgimprc.c',
|
||||
'gimpgradient.c',
|
||||
'gimpimage.c',
|
||||
'gimpimagecolorprofile.c',
|
||||
'gimpimagemetadata.c',
|
||||
|
@ -183,6 +185,7 @@ libgimp_sources_introspectable = [
|
|||
'gimplayer.c',
|
||||
'gimplayermask.c',
|
||||
'gimploadprocedure.c',
|
||||
'gimppalette.c',
|
||||
'gimpparamspecs.c',
|
||||
'gimppattern.c',
|
||||
'gimppdb.c',
|
||||
|
@ -229,7 +232,9 @@ libgimp_headers_introspectable = [
|
|||
'gimpdisplay.h',
|
||||
'gimpdrawable.h',
|
||||
'gimpfileprocedure.h',
|
||||
'gimpfont.h',
|
||||
'gimpgimprc.h',
|
||||
'gimpgradient.h',
|
||||
'gimpimage.h',
|
||||
'gimpimagecolorprofile.h',
|
||||
'gimpimagemetadata.h',
|
||||
|
@ -238,6 +243,7 @@ libgimp_headers_introspectable = [
|
|||
'gimplayer.h',
|
||||
'gimplayermask.h',
|
||||
'gimploadprocedure.h',
|
||||
'gimppalette.h',
|
||||
'gimpparamspecs.h',
|
||||
'gimppattern.h',
|
||||
'gimppdb.h',
|
||||
|
|
Loading…
Reference in New Issue