diff options
author | Martin Nordholts <martinn@src.gnome.org> | 2009-01-24 08:52:04 +0000 |
---|---|---|
committer | Martin Nordholts <martinn@src.gnome.org> | 2009-01-24 08:52:04 +0000 |
commit | a37c35450bbb8bb1901e617ae90192b666bfa36a (patch) | |
tree | 40be19b9663ba1af6e1a19e02b6e5301e0ff313e /babl/babl-macros.h | |
parent | e74ab814d7ca971ce6842effd38dc805de96b6a9 (diff) |
Do a complete overhaul of the babl API.
* babl/babl.h: Instead of including subsystem headers, declare the
functions part of the API directly in the header. The public
types, macros and the version header is still pulled in as
includes but with inclusion guards that prevent them from being
included separately by clients. Notable things removed from the
API is internal class functions and the class instance structs.
(babl_format_has_alpha)
(babl_format_get_bytes_per_pixel)
(babl_format_get_num_of_components)
(babl_format_get_type): New getters to allow the Babl union to
become opaque for clients.
* babl/babl-types.h: New file with public types. Currently only
the opaque Babl union and the linear and planar conversion
function prototypes (which are not used in the API due to the use
of varags but still part of the API for reference) are there. Make
sure it's only included indirectly through babl.h.
* babl/babl-macros.h
* babl/babl-version.h.in: Make sure these are not included
directly, only indirectly through babl.h.
* babl/babl-main.h: Removed, function declarations are in babl.h
now.
* babl/babl-internal.h: Include the headers we now consider
internal, mostly the different class headers.
* babl/babl-class.h: The "named class" function declarations are
now in the public header so move them away from this internal
header.
* babl/babl-image.h
* babl/babl-format.h
* babl/babl-fish.h
* babl/babl-extension.h
* babl/babl-conversion.h
* babl/babl-component.h
* babl/babl-classes.h
* babl/babl-introspect.h
* babl/babl-sampling.h
* babl/babl-model.h
* babl/babl-type.h: Adapt to above changes, move relevant things to babl.h
* babl/base/formats.c
* babl/base/model-gray.c
* babl/base/model-rgb.c
* babl/base/model-ycbcr.c
* babl/base/type-float.c: Explicitly #include "babl-classes.h".
* babl/babl-internal.c: s/babl_name/babl_get_name/
* babl/babl-format.c
(babl_format_has_alpha)
(babl_format_get_bytes_per_pixel)
(babl_format_get_num_of_components)
(babl_format_get_type): Implement these.
* babl/Makefile.am: Don't install the now internal headers and
add, remove and install the other headers according to above
changes.
svn path=/trunk/; revision=390
Diffstat (limited to 'babl/babl-macros.h')
-rw-r--r-- | babl/babl-macros.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/babl/babl-macros.h b/babl/babl-macros.h index 7eae084..8de6864 100644 --- a/babl/babl-macros.h +++ b/babl/babl-macros.h @@ -19,10 +19,11 @@ #ifndef _BABL_MACROS_H #define _BABL_MACROS_H -#ifndef _BABL_H -#error this file is only to be included by babl.h +#ifndef BABL_INSIDE_BABL_H +#error "babl-version.h must not be included directly, include babl.h instead." #endif + #if __GNUC__ >= 4 #define BABL_ARG_NULL_TERMINATED __attribute__((__sentinel__)) #else |