babl r385 - in trunk: . babl
- From: martinn svn gnome org
- To: svn-commits-list gnome org
- Subject: babl r385 - in trunk: . babl
- Date: Sun, 18 Jan 2009 13:33:52 +0000 (UTC)
Author: martinn
Date: Sun Jan 18 13:33:52 2009
New Revision: 385
URL: http://svn.gnome.org/viewvc/babl?rev=385&view=rev
Log:
* babl/babl-classes.h: New file collecting the type constants,
includes and the union for the babl classes. When adding a new
class this is the only installed header file that requires
modification.
* babl/babl-class.h: Move the class type enums to the new file.
* babl/babl.h: Include babl-classes.h instead of each class on its
own, and move the Babl union to the new file.
* babl/Makefile.am: Add the new file.
Added:
trunk/babl/babl-classes.h
Modified:
trunk/ChangeLog
trunk/babl/Makefile.am
trunk/babl/babl-class.h
trunk/babl/babl.h
Modified: trunk/babl/Makefile.am
==============================================================================
--- trunk/babl/Makefile.am (original)
+++ trunk/babl/Makefile.am Sun Jan 18 13:33:52 2009
@@ -35,6 +35,7 @@
h_sources = \
babl-class.h \
+ babl-classes.h \
babl-db.h \
babl-ids.h \
babl-internal.h \
@@ -52,6 +53,7 @@
library_include_HEADERS = \
babl.h \
babl-class.h \
+ babl-classes.h \
babl-component.h \
babl-conversion.h \
babl-extension.h \
Modified: trunk/babl/babl-class.h
==============================================================================
--- trunk/babl/babl-class.h (original)
+++ trunk/babl/babl-class.h Sun Jan 18 13:33:52 2009
@@ -23,38 +23,6 @@
#error this file is only to be included by babl.h
#endif
-
-/* magic number used at the start of all babl objects, used to do
- * differentiation in polymorphic functions. (as well as manual
- * type check assertions).
- */
-#define BABL_MAGIC 0xbab100
-
-enum {
- BABL_INSTANCE = BABL_MAGIC,
- BABL_TYPE,
- BABL_TYPE_INTEGER,
- BABL_TYPE_FLOAT,
- BABL_SAMPLING,
- BABL_COMPONENT,
- BABL_MODEL,
- BABL_FORMAT,
-
- BABL_CONVERSION,
- BABL_CONVERSION_LINEAR,
- BABL_CONVERSION_PLANE,
- BABL_CONVERSION_PLANAR,
-
- BABL_FISH,
- BABL_FISH_REFERENCE,
- BABL_FISH_SIMPLE,
- BABL_FISH_PATH,
- BABL_IMAGE,
-
- BABL_EXTENSION,
-
- BABL_SKY
-};
typedef int BablClassType;
typedef union _Babl Babl;
Added: trunk/babl/babl-classes.h
==============================================================================
--- (empty file)
+++ trunk/babl/babl-classes.h Sun Jan 18 13:33:52 2009
@@ -0,0 +1,94 @@
+/* babl - dynamically extendable universal pixel conversion library.
+ * Copyright (C) 2005-2008, Ãyvind KolÃs and others.
+ *
+ * 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
+ * <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _BABL_CLASSES_H
+#define _BABL_CLASSES_H
+
+#ifndef _BABL_H
+#error this file is only to be included by babl.h
+#endif
+
+
+/* magic number used at the start of all babl objects, used to do
+ * differentiation in polymorphic functions. (as well as manual type
+ * check assertions).
+ */
+#define BABL_MAGIC 0xbab100
+
+/* class types */
+enum {
+ BABL_INSTANCE = BABL_MAGIC,
+ BABL_TYPE,
+ BABL_TYPE_INTEGER,
+ BABL_TYPE_FLOAT,
+ BABL_SAMPLING,
+ BABL_COMPONENT,
+ BABL_MODEL,
+ BABL_FORMAT,
+
+ BABL_CONVERSION,
+ BABL_CONVERSION_LINEAR,
+ BABL_CONVERSION_PLANE,
+ BABL_CONVERSION_PLANAR,
+
+ BABL_FISH,
+ BABL_FISH_REFERENCE,
+ BABL_FISH_SIMPLE,
+ BABL_FISH_PATH,
+ BABL_IMAGE,
+
+ BABL_EXTENSION,
+
+ BABL_SKY
+};
+
+
+#include "babl-type.h"
+#include "babl-sampling.h"
+#include "babl-component.h"
+#include "babl-model.h"
+#include "babl-format.h"
+#include "babl-image.h"
+#include "babl-conversion.h"
+#include "babl-fish.h"
+#include "babl-extension.h"
+
+
+/* This union can be used for convenient access to any field without
+ * the need to case if the variable already is of the type Babl*
+ */
+typedef union _Babl
+{
+ BablClassType class_type;
+ BablInstance instance;
+ BablType type;
+ BablSampling sampling;
+ BablComponent component;
+ BablModel model;
+ BablFormat format;
+ BablConversion conversion;
+ BablImage image;
+ BablFish fish;
+ BablFishReference fish_reference;
+ BablFishSimple fish_simple;
+ BablFishPath fish_path;
+ BablExtension extension;
+} _Babl;
+
+
+#endif
Modified: trunk/babl/babl.h
==============================================================================
--- trunk/babl/babl.h (original)
+++ trunk/babl/babl.h Sun Jan 18 13:33:52 2009
@@ -28,6 +28,7 @@
#error babl.h included after babl-internal.h
#endif
+
typedef struct _BablList BablList;
#include "babl-macros.h"
@@ -35,35 +36,7 @@
#include "babl-class.h"
#include "babl-introspect.h"
#include "babl-version.h"
-#include "babl-type.h"
-#include "babl-sampling.h"
-#include "babl-component.h"
-#include "babl-model.h"
-#include "babl-format.h"
-#include "babl-image.h"
-#include "babl-conversion.h"
-#include "babl-fish.h"
-#include "babl-extension.h"
+#include "babl-classes.h"
-/* This union can be used for convenient access to any field without the need
- * to case if the variable already is of the type Babl *
- */
-typedef union _Babl
-{
- BablClassType class_type;
- BablInstance instance;
- BablType type;
- BablSampling sampling;
- BablComponent component;
- BablModel model;
- BablFormat format;
- BablConversion conversion;
- BablImage image;
- BablFish fish;
- BablFishReference fish_reference;
- BablFishSimple fish_simple;
- BablFishPath fish_path;
- BablExtension extension;
-} _Babl;
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]