diff --git a/ChangeLog b/ChangeLog index af06dc909..3fc3586e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,36 @@ +2008-10-30 Emmanuele Bassi + + Bug 1212 - Allow only a single include file for Clutter + + * clutter/*.h: Only allow including clutter.h in third + party code. + + * clutter/cogl/cogl-color.h: + * clutter/cogl/cogl-fixed.h: + * clutter/cogl/cogl.h.in: Only allow including cogl.h in + third party code. + + * clutter/cogl/common/Makefile.am: + * clutter/cogl/gl/Makefile.am: + * clutter/cogl/gles/Makefile.am: + * clutter/eglnative/Makefile.am: + * clutter/eglx/Makefile.am: + * clutter/fruity/Makefile.am: + * clutter/glx/Makefile.am: + * clutter/glx/clutter-glx.h: + * clutter/osx/Makefile.am: + * clutter/pango/Makefile.am: + * clutter/sdl/Makefile.am: + * clutter/win32/Makefile.am: + * clutter/x11/Makefile.am: Fix build environment. + + * clutter/x11/clutter-x11-texture-pixmap.h: + * clutter/x11/clutter-x11.h: Fix inclusion rules. + + * tests/test-pixmap.c: Fix inclusion of GdkPixbuf header. + + * README: Update release notes. + 2008-10-30 Emmanuele Bassi Bug 1211 - Drop ClutterFeatureFlags usage from COGL diff --git a/README b/README index 5e7b43aa6..9fc67a482 100644 --- a/README +++ b/README @@ -170,6 +170,12 @@ wanting to port to newer releases (See NEWS for general new feature info). Release Notes for Clutter 1.0 ------------------------------- +* Both Clutter and COGL only allow including + and directly, respectively. This allows avoiding + breaking API every time a type definition is moved across + headers, and improves the reliability of third party code against + internal refactorings. + * COGL has an internal Color type, used to store a color definition that can be efficiently used with the least amount of conversions by both the GL and GLES implementations. The COGL API has been diff --git a/clutter/clutter-actor.h b/clutter/clutter-actor.h index 53b296d6a..371ce20cc 100644 --- a/clutter/clutter-actor.h +++ b/clutter/clutter-actor.h @@ -18,13 +18,15 @@ * 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, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ -#ifndef _HAVE_CLUTTER_ACTOR_H -#define _HAVE_CLUTTER_ACTOR_H +#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + +#ifndef __CLUTTER_ACTOR_H__ +#define __CLUTTER_ACTOR_H__ /* clutter-actor.h */ diff --git a/clutter/clutter-alpha.h b/clutter/clutter-alpha.h index ae30260c8..56991a65a 100644 --- a/clutter/clutter-alpha.h +++ b/clutter/clutter-alpha.h @@ -21,11 +21,13 @@ * 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, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ +#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef __CLUTTER_ALPHA_H__ #define __CLUTTER_ALPHA_H__ diff --git a/clutter/clutter-backend.h b/clutter/clutter-backend.h index dbce71ac8..27f49c46f 100644 --- a/clutter/clutter-backend.h +++ b/clutter/clutter-backend.h @@ -18,11 +18,13 @@ * 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, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ +#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef __CLUTTER_BACKEND_H__ #define __CLUTTER_BACKEND_H__ diff --git a/clutter/clutter-behaviour-bspline.h b/clutter/clutter-behaviour-bspline.h index a344f4b32..644b5883e 100644 --- a/clutter/clutter-behaviour-bspline.h +++ b/clutter/clutter-behaviour-bspline.h @@ -21,6 +21,10 @@ * License along with this library. If not, see . */ +#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef __CLUTTER_BEHAVIOUR_BSPLINE_H__ #define __CLUTTER_BEHAVIOUR_BSPLINE_H__ diff --git a/clutter/clutter-behaviour-depth.h b/clutter/clutter-behaviour-depth.h index 438a3755a..859c90a61 100644 --- a/clutter/clutter-behaviour-depth.h +++ b/clutter/clutter-behaviour-depth.h @@ -20,11 +20,13 @@ * 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, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ +#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef __CLUTTER_BEHAVIOUR_DEPTH__ #define __CLUTTER_BEHAVIOUR_DEPTH__ diff --git a/clutter/clutter-behaviour-ellipse.h b/clutter/clutter-behaviour-ellipse.h index b53f23279..7505e64bc 100644 --- a/clutter/clutter-behaviour-ellipse.h +++ b/clutter/clutter-behaviour-ellipse.h @@ -18,11 +18,13 @@ * 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, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ +#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef __CLUTTER_BEHAVIOUR_ELLIPSE_H__ #define __CLUTTER_BEHAVIOUR_ELLIPSE_H__ diff --git a/clutter/clutter-behaviour-opacity.h b/clutter/clutter-behaviour-opacity.h index a888640d2..51d675e45 100644 --- a/clutter/clutter-behaviour-opacity.h +++ b/clutter/clutter-behaviour-opacity.h @@ -20,11 +20,13 @@ * 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, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ +#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef __CLUTTER_BEHAVIOUR_OPACITY_H__ #define __CLUTTER_BEHAVIOUR_OPACITY_H__ diff --git a/clutter/clutter-behaviour-path.h b/clutter/clutter-behaviour-path.h index 42cef074a..8eb425ff7 100644 --- a/clutter/clutter-behaviour-path.h +++ b/clutter/clutter-behaviour-path.h @@ -20,11 +20,13 @@ * 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, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ +#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef __CLUTTER_BEHAVIOUR_PATH_H__ #define __CLUTTER_BEHAVIOUR_PATH_H__ diff --git a/clutter/clutter-behaviour-rotate.h b/clutter/clutter-behaviour-rotate.h index 59638e675..26928b688 100644 --- a/clutter/clutter-behaviour-rotate.h +++ b/clutter/clutter-behaviour-rotate.h @@ -18,11 +18,13 @@ * 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, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ +#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef __CLUTTER_BEHAVIOUR_ROTATE_H__ #define __CLUTTER_BEHAVIOUR_ROTATE_H__ diff --git a/clutter/clutter-behaviour-scale.h b/clutter/clutter-behaviour-scale.h index c3b2a93dc..2421a2a9c 100644 --- a/clutter/clutter-behaviour-scale.h +++ b/clutter/clutter-behaviour-scale.h @@ -20,11 +20,13 @@ * 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, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ +#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef __CLUTTER_BEHAVIOUR_SCALE_H__ #define __CLUTTER_BEHAVIOUR_SCALE_H__ diff --git a/clutter/clutter-behaviour.h b/clutter/clutter-behaviour.h index b6f23032a..c190961e5 100644 --- a/clutter/clutter-behaviour.h +++ b/clutter/clutter-behaviour.h @@ -23,8 +23,12 @@ * License along with this library. If not, see . */ -#ifndef _HAVE_CLUTTER_BEHAVIOUR_H -#define _HAVE_CLUTTER_BEHAVIOUR_H +#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + +#ifndef __CLUTTER_BEHAVIOUR_H__ +#define __CLUTTER_BEHAVIOUR_H__ #include #include diff --git a/clutter/clutter-child-meta.h b/clutter/clutter-child-meta.h index 881d66cba..2efee32a4 100644 --- a/clutter/clutter-child-meta.h +++ b/clutter/clutter-child-meta.h @@ -22,11 +22,13 @@ * 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, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ +#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef __CLUTTER_CHILD_META_H__ #define __CLUTTER_CHILD_META_H__ diff --git a/clutter/clutter-clone-texture.h b/clutter/clutter-clone-texture.h index f34c7798d..74f297487 100644 --- a/clutter/clutter-clone-texture.h +++ b/clutter/clutter-clone-texture.h @@ -18,40 +18,27 @@ * 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, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ -#ifndef _HAVE_CLUTTER_CLONE_TEXTURE_H -#define _HAVE_CLUTTER_CLONE_TEXTURE_H +#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + +#ifndef __CLUTTER_CLONE_TEXTURE_H__ +#define __CLUTTER_CLONE_TEXTURE_H__ #include #include G_BEGIN_DECLS -#define CLUTTER_TYPE_CLONE_TEXTURE (clutter_clone_texture_get_type ()) - -#define CLUTTER_CLONE_TEXTURE(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ - CLUTTER_TYPE_CLONE_TEXTURE, ClutterCloneTexture)) - -#define CLUTTER_CLONE_TEXTURE_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST ((klass), \ - CLUTTER_TYPE_CLONE_TEXTURE, ClutterCloneTextureClass)) - -#define CLUTTER_IS_CLONE_TEXTURE(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \ - CLUTTER_TYPE_CLONE_TEXTURE)) - -#define CLUTTER_IS_CLONE_TEXTURE_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE ((klass), \ - CLUTTER_TYPE_CLONE_TEXTURE)) - -#define CLUTTER_CLONE_TEXTURE_GET_CLASS(obj) \ - (G_TYPE_INSTANCE_GET_CLASS ((obj), \ - CLUTTER_TYPE_CLONE_TEXTURE, ClutterCloneTextureClass)) +#define CLUTTER_TYPE_CLONE_TEXTURE (clutter_clone_texture_get_type ()) +#define CLUTTER_CLONE_TEXTURE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_CLONE_TEXTURE, ClutterCloneTexture)) +#define CLUTTER_CLONE_TEXTURE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_CLONE_TEXTURE, ClutterCloneTextureClass)) +#define CLUTTER_IS_CLONE_TEXTURE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_CLONE_TEXTURE)) +#define CLUTTER_IS_CLONE_TEXTURE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_CLONE_TEXTURE)) +#define CLUTTER_CLONE_TEXTURE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_CLONE_TEXTURE, ClutterCloneTextureClass)) typedef struct _ClutterCloneTexture ClutterCloneTexture; typedef struct _ClutterCloneTexturePrivate ClutterCloneTexturePrivate; @@ -59,14 +46,15 @@ typedef struct _ClutterCloneTextureClass ClutterCloneTextureClass; struct _ClutterCloneTexture { + /*< private >*/ ClutterActor parent; - - /*< priv >*/ + ClutterCloneTexturePrivate *priv; }; struct _ClutterCloneTextureClass { + /*< private >*/ ClutterActorClass parent_class; /* padding for future expansion */ @@ -85,4 +73,4 @@ void clutter_clone_texture_set_parent_texture (ClutterCloneTexture *c G_END_DECLS -#endif +#endif /* __CLUTTER_CLONE_TEXTURE_H__ */ diff --git a/clutter/clutter-color.h b/clutter/clutter-color.h index e07d8faf0..5b5a3f278 100644 --- a/clutter/clutter-color.h +++ b/clutter/clutter-color.h @@ -18,13 +18,15 @@ * 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, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ -#ifndef _HAVE_CLUTTER_COLOR_H -#define _HAVE_CLUTTER_COLOR_H +#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + +#ifndef __CLUTTER_COLOR_H__ +#define __CLUTTER_COLOR_H__ #include #include diff --git a/clutter/clutter-container.h b/clutter/clutter-container.h index a9f3471cd..68cbd71fd 100644 --- a/clutter/clutter-container.h +++ b/clutter/clutter-container.h @@ -18,14 +18,16 @@ * 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, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . * * ClutterContainer: Generic actor container interface. * Author: Emmanuele Bassi */ +#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef __CLUTTER_CONTAINER_H__ #define __CLUTTER_CONTAINER_H__ diff --git a/clutter/clutter-effect.h b/clutter/clutter-effect.h index 3c59ad45e..0d1fb176d 100644 --- a/clutter/clutter-effect.h +++ b/clutter/clutter-effect.h @@ -18,13 +18,15 @@ * 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, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ -#ifndef _CLUTTER_EFFECT -#define _CLUTTER_EFFECT +#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + +#ifndef __CLUTTER_EFFECT_H__ +#define __CLUTTER_EFFECT_H__ #include #include @@ -157,4 +159,4 @@ ClutterTimeline *clutter_effect_rotate (ClutterEffectTemplate *template_, G_END_DECLS -#endif /* _CLUTTER_EFFECT */ +#endif /* __CLUTTER_EFFECT_H__ */ diff --git a/clutter/clutter-entry.h b/clutter/clutter-entry.h index 65aefbe73..b43408522 100644 --- a/clutter/clutter-entry.h +++ b/clutter/clutter-entry.h @@ -19,13 +19,15 @@ * 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, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ -#ifndef _HAVE_CLUTTER_ENTRY_H -#define _HAVE_CLUTTER_ENTRY_H +#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + +#ifndef __CLUTTER_ENTRY_H__ +#define __CLUTTER_ENTRY_H__ #include #include @@ -160,4 +162,4 @@ void clutter_entry_handle_key_event (ClutterEntry *ent G_END_DECLS -#endif /* _HAVE_CLUTTER_ENTRY_H */ +#endif /* __CLUTTER_ENTRY_H__ */ diff --git a/clutter/clutter-event.h b/clutter/clutter-event.h index 1c2de01d8..7ad6c7ea8 100644 --- a/clutter/clutter-event.h +++ b/clutter/clutter-event.h @@ -21,8 +21,12 @@ * License along with this library. If not, see . */ -#ifndef _HAVE_CLUTTER_EVENT_H -#define _HAVE_CLUTTER_EVENT_H +#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + +#ifndef __CLUTTER_EVENT_H__ +#define __CLUTTER_EVENT_H__ #include #include @@ -443,4 +447,4 @@ ClutterStage* clutter_event_get_stage (ClutterEvent *event); G_END_DECLS -#endif +#endif /* __CLUTTER_EVENT_H__ */ diff --git a/clutter/clutter-feature.h b/clutter/clutter-feature.h index 89be737ea..864606634 100644 --- a/clutter/clutter-feature.h +++ b/clutter/clutter-feature.h @@ -18,10 +18,13 @@ * 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, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ + +#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + /** * SECTION:clutter-main * @short_description: Various 'global' clutter functions. @@ -30,8 +33,8 @@ * functions for mainloops, events and threads */ -#ifndef _HAVE_CLUTTER_FEATURE_H -#define _HAVE_CLUTTER_FEATURE_H +#ifndef __CLUTTER_FEATURE_H__ +#define __CLUTTER_FEATURE_H__ #include @@ -74,5 +77,4 @@ ClutterFeatureFlags clutter_feature_get_all (void); G_END_DECLS -#endif - +#endif /* __CLUTTER_FEATURE_H__ */ diff --git a/clutter/clutter-fixed.h b/clutter/clutter-fixed.h index 9bd2c0fe4..a2412cefc 100644 --- a/clutter/clutter-fixed.h +++ b/clutter/clutter-fixed.h @@ -19,16 +19,18 @@ * 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, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ -#ifndef _HAVE_CLUTTER_FIXED_H -#define _HAVE_CLUTTER_FIXED_H +#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + +#ifndef __CLUTTER_FIXED_H__ +#define __CLUTTER_FIXED_H__ #include -#include +#include G_BEGIN_DECLS @@ -379,4 +381,4 @@ GParamSpec * clutter_param_spec_fixed (const gchar *name, G_END_DECLS -#endif /* _HAVE_CLUTTER_FIXED_H */ +#endif /* __CLUTTER_FIXED_H__ */ diff --git a/clutter/clutter-frame-source.h b/clutter/clutter-frame-source.h index 07c8c958c..522bd15ab 100644 --- a/clutter/clutter-frame-source.h +++ b/clutter/clutter-frame-source.h @@ -18,13 +18,15 @@ * 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, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ -#ifndef _CLUTTER_FRAME_SOURCE_H -#define _CLUTTER_FRAME_SOURCE_H +#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + +#ifndef __CLUTTER_FRAME_SOURCE_H__ +#define __CLUTTER_FRAME_SOURCE_H__ #include @@ -42,4 +44,4 @@ guint clutter_frame_source_add_full (gint priority, G_END_DECLS -#endif /* _CLUTTER_FRAME_SOURCE_H */ +#endif /* __CLUTTER_FRAME_SOURCE_H__ */ diff --git a/clutter/clutter-group.h b/clutter/clutter-group.h index d4a4e6cc1..ac4d37bdd 100644 --- a/clutter/clutter-group.h +++ b/clutter/clutter-group.h @@ -18,11 +18,13 @@ * 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, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ +#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef __CLUTTER_GROUP_H__ #define __CLUTTER_GROUP_H__ @@ -92,6 +94,7 @@ ClutterActor *clutter_group_get_nth_child (ClutterGroup *self, gint clutter_group_get_n_children (ClutterGroup *self); void clutter_group_remove_all (ClutterGroup *group); +/* for Mr. Mallum */ #define clutter_group_add(group,actor) G_STMT_START { \ if (CLUTTER_IS_GROUP ((group)) && CLUTTER_IS_ACTOR ((actor))) \ { \ diff --git a/clutter/clutter-id-pool.h b/clutter/clutter-id-pool.h index 857cf6d07..114f0b68d 100644 --- a/clutter/clutter-id-pool.h +++ b/clutter/clutter-id-pool.h @@ -18,9 +18,7 @@ * 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, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . * * ClutterIDPool: pool of reusable integer ids associated with pointers. * diff --git a/clutter/clutter-label.h b/clutter/clutter-label.h index d8352c1b4..d6021c2f3 100644 --- a/clutter/clutter-label.h +++ b/clutter/clutter-label.h @@ -18,13 +18,15 @@ * 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, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ -#ifndef _HAVE_CLUTTER_LABEL_H -#define _HAVE_CLUTTER_LABEL_H +#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + +#ifndef __CLUTTER_LABEL_H__ +#define __CLUTTER_LABEL_H__ #include #include @@ -123,4 +125,4 @@ gboolean clutter_label_get_justify (ClutterLabel *labe G_END_DECLS -#endif /* _HAVE_CLUTTER_LABEL_H */ +#endif /* __CLUTTER_LABEL_H__ */ diff --git a/clutter/clutter-list-model.h b/clutter/clutter-list-model.h index ed088faf7..f5fd82616 100644 --- a/clutter/clutter-list-model.h +++ b/clutter/clutter-list-model.h @@ -20,13 +20,15 @@ * 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, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . * * NB: Inspiration for column storage taken from GtkListStore */ +#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef __CLUTTER_LIST_MODEL_H__ #define __CLUTTER_LIST_MODEL_H__ diff --git a/clutter/clutter-main.h b/clutter/clutter-main.h index eeef5a273..7a9106f82 100644 --- a/clutter/clutter-main.h +++ b/clutter/clutter-main.h @@ -18,13 +18,15 @@ * 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, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ -#ifndef _HAVE_CLUTTER_MAIN_H -#define _HAVE_CLUTTER_MAIN_H +#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + +#ifndef __CLUTTER_MAIN_H__ +#define __CLUTTER_MAIN_H__ #include #include @@ -165,4 +167,4 @@ void clutter_ungrab_pointer_for_device (gint id); G_END_DECLS -#endif /* _HAVE_CLUTTER_MAIN_H */ +#endif /* _CLUTTER_MAIN_H__ */ diff --git a/clutter/clutter-media.h b/clutter/clutter-media.h index 2f585fa8e..f930e3f49 100644 --- a/clutter/clutter-media.h +++ b/clutter/clutter-media.h @@ -18,38 +18,34 @@ * 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, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ -#ifndef _HAVE_CLUTTER_MEDIA_H -#define _HAVE_CLUTTER_MEDIA_H +#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + +#ifndef __CLUTTER_MEDIA_H__ +#define __CLUTTER_MEDIA_H__ #include G_BEGIN_DECLS -#define CLUTTER_TYPE_MEDIA clutter_media_get_type() +#define CLUTTER_TYPE_MEDIA (clutter_media_get_type ()) +#define CLUTTER_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_MEDIA, ClutterMedia)) +#define CLUTTER_IS_MEDIA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_MEDIA)) +#define CLUTTER_MEDIA_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), CLUTTER_TYPE_MEDIA, ClutterMediaInterface)) -#define CLUTTER_MEDIA(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ - CLUTTER_TYPE_MEDIA, ClutterMedia)) - -#define CLUTTER_IS_MEDIA(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \ - CLUTTER_TYPE_MEDIA)) - -#define CLUTTER_MEDIA_GET_INTERFACE(obj) \ - (G_TYPE_INSTANCE_GET_INTERFACE ((obj), \ - CLUTTER_TYPE_MEDIA, ClutterMediaInterface)) - -typedef struct _ClutterMedia ClutterMedia; +typedef struct _ClutterMedia ClutterMedia; /* dummy typedef */ typedef struct _ClutterMediaInterface ClutterMediaInterface; struct _ClutterMediaInterface { + /*< private >*/ GTypeInterface base_iface; + + /*< public >*/ void (*set_uri) (ClutterMedia *media, const char *uri); const char *(*get_uri) (ClutterMedia *media); @@ -73,7 +69,7 @@ struct _ClutterMediaInterface }; -GType clutter_media_get_type (void); +GType clutter_media_get_type (void) G_GNUC_CONST; void clutter_media_set_uri (ClutterMedia *media, @@ -117,4 +113,4 @@ clutter_media_set_filename (ClutterMedia *media, G_END_DECLS -#endif +#endif /* __CLUTTER_MEDIA_H__ */ diff --git a/clutter/clutter-model.h b/clutter/clutter-model.h index 94c8326e2..d20335f3e 100644 --- a/clutter/clutter-model.h +++ b/clutter/clutter-model.h @@ -20,15 +20,16 @@ * 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, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ +#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef __CLUTTER_MODEL_H__ #define __CLUTTER_MODEL_H__ -#include #include G_BEGIN_DECLS diff --git a/clutter/clutter-rectangle.h b/clutter/clutter-rectangle.h index 385a9b784..4d79e3087 100644 --- a/clutter/clutter-rectangle.h +++ b/clutter/clutter-rectangle.h @@ -18,13 +18,15 @@ * 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, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ -#ifndef _HAVE_CLUTTER_RECTANGLE_H -#define _HAVE_CLUTTER_RECTANGLE_H +#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + +#ifndef __CLUTTER_RECTANGLE_H__ +#define __CLUTTER_RECTANGLE_H__ #include #include @@ -32,27 +34,12 @@ G_BEGIN_DECLS -#define CLUTTER_TYPE_RECTANGLE clutter_rectangle_get_type() - -#define CLUTTER_RECTANGLE(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ - CLUTTER_TYPE_RECTANGLE, ClutterRectangle)) - -#define CLUTTER_RECTANGLE_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST ((klass), \ - CLUTTER_TYPE_RECTANGLE, ClutterRectangleClass)) - -#define CLUTTER_IS_RECTANGLE(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \ - CLUTTER_TYPE_RECTANGLE)) - -#define CLUTTER_IS_RECTANGLE_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE ((klass), \ - CLUTTER_TYPE_RECTANGLE)) - -#define CLUTTER_RECTANGLE_GET_CLASS(obj) \ - (G_TYPE_INSTANCE_GET_CLASS ((obj), \ - CLUTTER_TYPE_RECTANGLE, ClutterRectangleClass)) +#define CLUTTER_TYPE_RECTANGLE (clutter_rectangle_get_type()) +#define CLUTTER_RECTANGLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_RECTANGLE, ClutterRectangle)) +#define CLUTTER_RECTANGLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_RECTANGLE, ClutterRectangleClass)) +#define CLUTTER_IS_RECTANGLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_RECTANGLE)) +#define CLUTTER_IS_RECTANGLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_RECTANGLE)) +#define CLUTTER_RECTANGLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_RECTANGLE, ClutterRectangleClass)) typedef struct _ClutterRectangle ClutterRectangle; typedef struct _ClutterRectangleClass ClutterRectangleClass; @@ -60,14 +47,15 @@ typedef struct _ClutterRectanglePrivate ClutterRectanglePrivate; struct _ClutterRectangle { + /*< private >*/ ClutterActor parent; - /*< private >*/ ClutterRectanglePrivate *priv; }; struct _ClutterRectangleClass { + /*< private >*/ ClutterActorClass parent_class; /* padding for future expansion */ @@ -96,4 +84,4 @@ void clutter_rectangle_set_border_color (ClutterRectangle *rectangle, G_END_DECLS -#endif +#endif /* __CLUTTER_RECTANGLE_H__ */ diff --git a/clutter/clutter-score.h b/clutter/clutter-score.h index 3b5eddc73..1bd648c3c 100644 --- a/clutter/clutter-score.h +++ b/clutter/clutter-score.h @@ -18,11 +18,13 @@ * 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, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ +#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef __CLUTTER_SCORE_H__ #define __CLUTTER_SCORE_H__ diff --git a/clutter/clutter-script.c b/clutter/clutter-script.c index 1a8fc9898..25f66d60a 100644 --- a/clutter/clutter-script.c +++ b/clutter/clutter-script.c @@ -165,6 +165,10 @@ #include #include +#ifdef USE_GDKPIXBUF +#include +#endif + #include "clutter-actor.h" #include "clutter-alpha.h" #include "clutter-behaviour.h" diff --git a/clutter/clutter-script.h b/clutter/clutter-script.h index d53fcef8f..ad94c623e 100644 --- a/clutter/clutter-script.h +++ b/clutter/clutter-script.h @@ -18,11 +18,13 @@ * 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, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ +#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef __CLUTTER_SCRIPT_H__ #define __CLUTTER_SCRIPT_H__ diff --git a/clutter/clutter-scriptable.h b/clutter/clutter-scriptable.h index fe786065a..12cf94296 100644 --- a/clutter/clutter-scriptable.h +++ b/clutter/clutter-scriptable.h @@ -19,11 +19,13 @@ * 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, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ +#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef __CLUTTER_SCRIPTABLE_H__ #define __CLUTTER_SCRIPTABLE_H__ diff --git a/clutter/clutter-shader.h b/clutter/clutter-shader.h index b46ec0c81..f4bdb7c74 100644 --- a/clutter/clutter-shader.h +++ b/clutter/clutter-shader.h @@ -19,11 +19,12 @@ * 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, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ +#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif #ifndef __CLUTTER_SHADER_H__ #define __CLUTTER_SHADER_H__ diff --git a/clutter/clutter-stage-manager.h b/clutter/clutter-stage-manager.h index 1b4a7b590..f2484d7e9 100644 --- a/clutter/clutter-stage-manager.h +++ b/clutter/clutter-stage-manager.h @@ -18,15 +18,16 @@ * 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, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ +#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef __CLUTTER_STAGE_MANAGER_H__ #define __CLUTTER_STAGE_MANAGER_H__ -#include #include #include @@ -44,6 +45,7 @@ typedef struct _ClutterStageManagerClass ClutterStageManagerClass; struct _ClutterStageManagerClass { + /*< private >*/ GObjectClass parent_class; void (* stage_added) (ClutterStageManager *stage_manager, diff --git a/clutter/clutter-stage-window.h b/clutter/clutter-stage-window.h index 641e8fbfb..8efdbd20c 100644 --- a/clutter/clutter-stage-window.h +++ b/clutter/clutter-stage-window.h @@ -2,9 +2,6 @@ #define __CLUTTER_STAGE_WINDOW_H__ #include -#ifdef USE_GDKPIXBUF -#include -#endif G_BEGIN_DECLS diff --git a/clutter/clutter-stage.h b/clutter/clutter-stage.h index 36abf9eb7..cb8ca9063 100644 --- a/clutter/clutter-stage.h +++ b/clutter/clutter-stage.h @@ -18,11 +18,13 @@ * 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, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ +#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef __CLUTTER_STAGE_H__ #define __CLUTTER_STAGE_H__ @@ -31,10 +33,6 @@ #include #include -#ifdef USE_GDKPIXBUF -#include -#endif - G_BEGIN_DECLS #define CLUTTER_TYPE_PERSPECTIVE (clutter_perspective_get_type ()) @@ -64,7 +62,7 @@ G_BEGIN_DECLS /** * CLUTTER_STAGE_WIDTH: * - * Macro that evaluates to the current stage width + * Macro that evaluates to the width of the default stage * * Since: 0.2 */ @@ -74,7 +72,7 @@ G_BEGIN_DECLS /** * CLUTTER_STAGE_HEIGHT: * - * Macro that evaluates to the current stage height + * Macro that evaluates to the height of the default stage * * Since: 0.2 */ diff --git a/clutter/clutter-texture.h b/clutter/clutter-texture.h index b66c21284..84f6889b8 100644 --- a/clutter/clutter-texture.h +++ b/clutter/clutter-texture.h @@ -21,8 +21,12 @@ * License along with this library. If not, see . */ -#ifndef _HAVE_CLUTTER_TEXTURE_H -#define _HAVE_CLUTTER_TEXTURE_H +#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + +#ifndef __CLUTTER_TEXTURE_H__ +#define __CLUTTER_TEXTURE_H__ #include #include @@ -180,4 +184,4 @@ void clutter_texture_set_cogl_texture (ClutterTexture G_END_DECLS -#endif /* _HAVE_CLUTTER_TEXTURE_H */ +#endif /* __CLUTTER_TEXTURE_H__ */ diff --git a/clutter/clutter-timeline.h b/clutter/clutter-timeline.h index 07014d571..948c64194 100644 --- a/clutter/clutter-timeline.h +++ b/clutter/clutter-timeline.h @@ -18,13 +18,15 @@ * 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, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ -#ifndef _HAVE_CLUTTER_TIMELINE_H -#define _HAVE_CLUTTER_TIMELINE_H +#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + +#ifndef __CLUTTER_TIMELINE_H__ +#define __CLUTTER_TIMELINE_H__ #include #include @@ -161,4 +163,4 @@ void clutter_timeline_advance_to_marker (ClutterTimeline *timeli G_END_DECLS -#endif /* _HAVE_CLUTTER_TIMELINE_H */ +#endif /* _CLUTTER_TIMELINE_H__ */ diff --git a/clutter/clutter-timeout-pool.h b/clutter/clutter-timeout-pool.h index d7e5f5dbf..7e07bd21f 100644 --- a/clutter/clutter-timeout-pool.h +++ b/clutter/clutter-timeout-pool.h @@ -18,9 +18,7 @@ * 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, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . * * ClutterTimeoutPool: pool of timeout functions using the same slice of * the GLib main loop @@ -30,6 +28,10 @@ * Based on similar code by Tristan van Berkom */ +#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef __CLUTTER_TIMEOUT_POOL_H__ #define __CLUTTER_TIMEOUT_POOL_H__ diff --git a/clutter/clutter-types.h b/clutter/clutter-types.h index 5ef1e8dbf..34dd12137 100644 --- a/clutter/clutter-types.h +++ b/clutter/clutter-types.h @@ -18,11 +18,13 @@ * 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, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ +#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef __CLUTTER_TYPES_H__ #define __CLUTTER_TYPES_H__ diff --git a/clutter/clutter-units.h b/clutter/clutter-units.h index aa08b9491..8337d19ff 100644 --- a/clutter/clutter-units.h +++ b/clutter/clutter-units.h @@ -19,13 +19,15 @@ * 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, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ -#ifndef _HAVE_CLUTTER_UNITS_H -#define _HAVE_CLUTTER_UNITS_H +#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly.h" +#endif + +#ifndef __CLUTTER_UNITS_H__ +#define __CLUTTER_UNITS_H__ #include #include @@ -213,4 +215,4 @@ GParamSpec *clutter_param_spec_unit (const gchar *name, G_END_DECLS -#endif /* _HAVE_CLUTTER_UNITS_H */ +#endif /* __CLUTTER_UNITS_H__ */ diff --git a/clutter/clutter-util.h b/clutter/clutter-util.h index 7d62d31ea..ab7846c06 100644 --- a/clutter/clutter-util.h +++ b/clutter/clutter-util.h @@ -18,13 +18,15 @@ * 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, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ -#ifndef _HAVE_CLUTTER_UTIL_H -#define _HAVE_CLUTTER_UTIL_H +#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + +#ifndef __CLUTTER_UTIL_H__ +#define __CLUTTER_UTIL_H__ #include diff --git a/clutter/clutter.h b/clutter/clutter.h index 873253437..cb29599e3 100644 --- a/clutter/clutter.h +++ b/clutter/clutter.h @@ -23,8 +23,10 @@ * Boston, MA 02111-1307, USA. */ -#ifndef _HAVE_CLUTTER_H -#define _HAVE_CLUTTER_H +#ifndef __CLUTTER_H__ +#define __CLUTTER_H__ + +#define __CLUTTER_H_INSIDE__ #include "clutter-actor.h" #include "clutter-alpha.h" @@ -70,4 +72,6 @@ #include "clutter-enum-types.h" -#endif +#undef __CLUTTER_H_INSIDE__ + +#endif /* __CLUTTER_H__ */ diff --git a/clutter/cogl/cogl-color.h b/clutter/cogl/cogl-color.h index 14c5d8413..56f75a86b 100644 --- a/clutter/cogl/cogl-color.h +++ b/clutter/cogl/cogl-color.h @@ -1,3 +1,7 @@ +#if !defined(__COGL_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef __COGL_COLOR_H__ #define __COGL_COLOR_H__ diff --git a/clutter/cogl/cogl-fixed.h b/clutter/cogl/cogl-fixed.h index b1542bcc3..1e2709572 100644 --- a/clutter/cogl/cogl-fixed.h +++ b/clutter/cogl/cogl-fixed.h @@ -1,3 +1,7 @@ +#if !defined(__COGL_H_INSIDE__) && !defined(CLUTTER_COMPILATION) +#error "Only can be included directly." +#endif + #ifndef __COGL_FIXED_H__ #define __COGL_FIXED_H__ diff --git a/clutter/cogl/cogl.h.in b/clutter/cogl/cogl.h.in index 3f23621f9..5b57a7e8f 100644 --- a/clutter/cogl/cogl.h.in +++ b/clutter/cogl/cogl.h.in @@ -42,6 +42,8 @@ #ifndef __COGL_H__ #define __COGL_H__ +#define __COGL_H_INSIDE__ + #include #include @@ -1587,4 +1589,6 @@ void cogl_draw_buffer (CoglBufferTarget target, G_END_DECLS +#undef __COGL_H_INSIDE__ + #endif /* __COGL_H__ */ diff --git a/clutter/cogl/common/Makefile.am b/clutter/cogl/common/Makefile.am index 5a52418be..7e3d7dfc0 100644 --- a/clutter/cogl/common/Makefile.am +++ b/clutter/cogl/common/Makefile.am @@ -5,6 +5,7 @@ INCLUDES = \ -I$(top_srcdir)/clutter/cogl/$(CLUTTER_COGL) \ -I$(top_builddir)/clutter \ -I$(top_builddir)/clutter/cogl \ + -DCLUTTER_COMPILATION \ $(CLUTTER_CFLAGS) \ $(CLUTTER_DEBUG_CFLAGS) \ $(GCC_FLAGS) diff --git a/clutter/cogl/gl/Makefile.am b/clutter/cogl/gl/Makefile.am index 2b2273078..d2a1b4a16 100644 --- a/clutter/cogl/gl/Makefile.am +++ b/clutter/cogl/gl/Makefile.am @@ -13,6 +13,7 @@ INCLUDES = \ -I$(top_srcdir)/clutter/cogl/$(CLUTTER_COGL) \ -I$(top_builddir)/clutter \ -I$(top_builddir)/clutter/cogl \ + -DCLUTTER_COMPILATION \ $(CLUTTER_CFLAGS) \ $(CLUTTER_DEBUG_CFLAGS) \ $(GCC_FLAGS) diff --git a/clutter/cogl/gles/Makefile.am b/clutter/cogl/gles/Makefile.am index 1ac969ec3..29e25ddd2 100644 --- a/clutter/cogl/gles/Makefile.am +++ b/clutter/cogl/gles/Makefile.am @@ -13,6 +13,7 @@ INCLUDES = \ -I$(top_srcdir)/clutter/cogl/$(CLUTTER_COGL) \ -I$(top_builddir)/clutter \ -I$(top_builddir)/clutter/cogl \ + -DCLUTTER_COMPILATION \ $(CLUTTER_CFLAGS) \ $(CLUTTER_DEBUG_CFLAGS) \ $(GCC_FLAGS) diff --git a/clutter/eglnative/Makefile.am b/clutter/eglnative/Makefile.am index 6ff070464..f431197e5 100644 --- a/clutter/eglnative/Makefile.am +++ b/clutter/eglnative/Makefile.am @@ -3,6 +3,7 @@ libclutterinclude_HEADERS = clutter-egl.h INCLUDES = \ -DG_LOG_DOMAIN=\"ClutterEGL\" \ + -DCLUTTER_COMPILATION \ -I$(top_srcdir) \ $(CLUTTER_CFLAGS) \ $(CLUTTER_DEBUG_CFLAGS) \ diff --git a/clutter/eglx/Makefile.am b/clutter/eglx/Makefile.am index f988dfcfc..329dc9041 100644 --- a/clutter/eglx/Makefile.am +++ b/clutter/eglx/Makefile.am @@ -3,6 +3,7 @@ libclutterinclude_HEADERS = clutter-eglx.h INCLUDES = \ -DG_LOG_DOMAIN=\"ClutterEGL\" \ + -DCLUTTER_COMPILATION \ -I$(top_srcdir) \ -I$(top_srcdir)/clutter \ -I$(top_srcdir)/clutter/x11 \ diff --git a/clutter/fruity/Makefile.am b/clutter/fruity/Makefile.am index eded38897..7f4d8ec25 100644 --- a/clutter/fruity/Makefile.am +++ b/clutter/fruity/Makefile.am @@ -2,6 +2,7 @@ libclutterincludedir = $(includedir)/clutter-@CLUTTER_MAJORMINOR@/clutter INCLUDES = \ -DG_LOG_DOMAIN=\"ClutterFruity\" \ + -DCLUTTER_COMPILATION \ -I$(top_srcdir) \ -I$(top_srcdir)/clutter \ $(CLUTTER_CFLAGS) \ diff --git a/clutter/glx/Makefile.am b/clutter/glx/Makefile.am index 0db1a161e..6058acbc5 100644 --- a/clutter/glx/Makefile.am +++ b/clutter/glx/Makefile.am @@ -7,6 +7,7 @@ INCLUDES = \ -I$(top_srcdir)/clutter \ -I$(top_srcdir)/clutter/x11 \ -I$(top_builddir)/clutter \ + -DCLUTTER_COMPILATION \ $(CLUTTER_CFLAGS) \ $(CLUTTER_DEBUG_CFLAGS) \ $(GCC_FLAGS) diff --git a/clutter/glx/clutter-glx.h b/clutter/glx/clutter-glx.h index e07b0b610..bb2455b8a 100644 --- a/clutter/glx/clutter-glx.h +++ b/clutter/glx/clutter-glx.h @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include G_BEGIN_DECLS diff --git a/clutter/osx/Makefile.am b/clutter/osx/Makefile.am index 018bd9b6e..762e1a75c 100644 --- a/clutter/osx/Makefile.am +++ b/clutter/osx/Makefile.am @@ -3,6 +3,7 @@ libclutterinclude_HEADERS = clutter-osx.h INCLUDES = \ -DG_LOG_DOMAIN=\"ClutterOSX\" \ + -DCLUTTER_COMPILATION \ -I$(top_srcdir) \ -I$(top_srcdir)/clutter \ -I$(top_builddir)/clutter \ diff --git a/clutter/pango/Makefile.am b/clutter/pango/Makefile.am index 4a4657519..ef052d51e 100644 --- a/clutter/pango/Makefile.am +++ b/clutter/pango/Makefile.am @@ -16,6 +16,7 @@ libpangoclutter_la_SOURCES = $(source_c) \ INCLUDES = \ @GCC_FLAGS@ @CLUTTER_CFLAGS@ \ $(CLUTTER_DEBUG_CFLAGS) \ + -DCLUTTER_COMPILATION \ -I$(top_srcdir) \ -I$(top_srcdir)/clutter \ -I$(top_builddir)/clutter diff --git a/clutter/sdl/Makefile.am b/clutter/sdl/Makefile.am index fb944c568..787bd623a 100644 --- a/clutter/sdl/Makefile.am +++ b/clutter/sdl/Makefile.am @@ -3,6 +3,7 @@ libclutterinclude_HEADERS = clutter-sdl.h INCLUDES = \ -DG_LOG_DOMAIN=\"ClutterSDL\" \ + -DCLUTTER_COMPILATION \ -I$(top_srcdir) \ -I$(top_srcdir)/clutter/ \ -I$(top_builddir)/clutter/ \ diff --git a/clutter/win32/Makefile.am b/clutter/win32/Makefile.am index 43f665c07..4cfff8ac0 100644 --- a/clutter/win32/Makefile.am +++ b/clutter/win32/Makefile.am @@ -9,6 +9,7 @@ pkgconfigdir = $(libdir)/pkgconfig INCLUDES = \ -DG_LOG_DOMAIN=\"ClutterWin32\" \ + -DCLUTTER_COMPILATION \ -I$(top_srcdir) \ -I$(top_srcdir)/clutter \ -I$(top_builddir)/clutter \ diff --git a/clutter/x11/Makefile.am b/clutter/x11/Makefile.am index 52aeb3109..2a55a033d 100644 --- a/clutter/x11/Makefile.am +++ b/clutter/x11/Makefile.am @@ -1,10 +1,11 @@ INCLUDES = \ - -DG_LOG_DOMAIN=\"ClutterX11\" \ - -I$(top_srcdir) \ + -DG_LOG_DOMAIN=\"ClutterX11\" \ + -DCLUTTER_COMPILATION \ + -I$(top_srcdir) \ -I$(top_srcdir)/clutter \ -I$(top_builddir)/clutter \ - $(CLUTTER_CFLAGS) \ - $(CLUTTER_DEBUG_CFLAGS) \ + $(CLUTTER_CFLAGS) \ + $(CLUTTER_DEBUG_CFLAGS) \ $(GCC_FLAGS) LDADD = $(CLUTTER_LIBS) diff --git a/clutter/x11/clutter-x11-texture-pixmap.h b/clutter/x11/clutter-x11-texture-pixmap.h index c24e900f8..76ede4877 100644 --- a/clutter/x11/clutter-x11-texture-pixmap.h +++ b/clutter/x11/clutter-x11-texture-pixmap.h @@ -28,9 +28,7 @@ #include #include - - -#include +#include #include G_BEGIN_DECLS diff --git a/clutter/x11/clutter-x11.h b/clutter/x11/clutter-x11.h index e523bff24..e7161c270 100644 --- a/clutter/x11/clutter-x11.h +++ b/clutter/x11/clutter-x11.h @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include #include diff --git a/tests/test-pixmap.c b/tests/test-pixmap.c index 52664b7ad..262bf839c 100644 --- a/tests/test-pixmap.c +++ b/tests/test-pixmap.c @@ -18,6 +18,8 @@ #define IMAGE "redhand.png" # ifdef USE_GDKPIXBUF +# include + static gboolean disable_x11 = FALSE; static gboolean disable_glx = FALSE;