diff --git a/libgimp/gimp.h b/libgimp/gimp.h index c36cf89ebe..4123fc1d94 100644 --- a/libgimp/gimp.h +++ b/libgimp/gimp.h @@ -41,7 +41,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -50,6 +52,7 @@ #include #include #include +#include #include #include #include diff --git a/libgimp/gimpfont.c b/libgimp/gimpfont.c new file mode 100644 index 0000000000..e38187ee3b --- /dev/null +++ b/libgimp/gimpfont.c @@ -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 + * . + */ + +#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) +{ +} diff --git a/libgimp/gimpfont.h b/libgimp/gimpfont.h new file mode 100644 index 0000000000..2b4fbdfa08 --- /dev/null +++ b/libgimp/gimpfont.h @@ -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 + * . + */ + +#if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION) +#error "Only 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 + + +#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__ */ diff --git a/libgimp/gimpgradient.c b/libgimp/gimpgradient.c new file mode 100644 index 0000000000..27f137316f --- /dev/null +++ b/libgimp/gimpgradient.c @@ -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 + * . + */ + +#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) +{ +} diff --git a/libgimp/gimpgradient.h b/libgimp/gimpgradient.h new file mode 100644 index 0000000000..1dbe989de5 --- /dev/null +++ b/libgimp/gimpgradient.h @@ -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 + * . + */ + +#if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION) +#error "Only 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 + + +#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__ */ diff --git a/libgimp/gimppalette.c b/libgimp/gimppalette.c new file mode 100644 index 0000000000..759401fc46 --- /dev/null +++ b/libgimp/gimppalette.c @@ -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 + * . + */ + +#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) +{ +} diff --git a/libgimp/gimppalette.h b/libgimp/gimppalette.h new file mode 100644 index 0000000000..5941e6b114 --- /dev/null +++ b/libgimp/gimppalette.h @@ -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 + * . + */ + +#if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION) +#error "Only 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 + + +#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__ */ diff --git a/libgimp/gimpresource.c b/libgimp/gimpresource.c index 9040aa4302..763fa8f846 100644 --- a/libgimp/gimpresource.c +++ b/libgimp/gimpresource.c @@ -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) {} diff --git a/libgimp/gimpresource.h b/libgimp/gimpresource.h index 1bc0003dcd..d37e9f736f 100644 --- a/libgimp/gimpresource.h +++ b/libgimp/gimpresource.h @@ -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__ */ diff --git a/libgimp/meson.build b/libgimp/meson.build index 4fab457751..3a29607f14 100644 --- a/libgimp/meson.build +++ b/libgimp/meson.build @@ -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',