mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
stage: Move the deprecated macros to a separate header
The clutter-stage.h header still has a bunch of macros that have, for reasons unknown[*], survived the 1.0 API cut and have long since been deprecated. Let's hide them under the deprecated/ carpet and let us never speak of them ever again. [*] pretty sure alcohol or other psychotropic substances were involved but I take the 5th on that.
This commit is contained in:
parent
0157615fae
commit
98b467f9b8
@ -247,6 +247,7 @@ deprecated_h = \
|
||||
$(srcdir)/deprecated/clutter-timeout-pool.h \
|
||||
$(srcdir)/deprecated/clutter-score.h \
|
||||
$(srcdir)/deprecated/clutter-shader.h \
|
||||
$(srcdir)/deprecated/clutter-stage.h \
|
||||
$(NULL)
|
||||
|
||||
# deprecated source code
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "deprecated/clutter-main.h"
|
||||
#include "deprecated/clutter-score.h"
|
||||
#include "deprecated/clutter-shader.h"
|
||||
#include "deprecated/clutter-stage.h"
|
||||
#include "deprecated/clutter-timeout-pool.h"
|
||||
|
||||
#undef __CLUTTER_DEPRECATED_H_INSIDE__
|
||||
|
@ -46,32 +46,6 @@ G_BEGIN_DECLS
|
||||
#define CLUTTER_IS_STAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_STAGE))
|
||||
#define CLUTTER_STAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_STAGE, ClutterStageClass))
|
||||
|
||||
#ifndef CLUTTER_DISABLE_DEPRECATED
|
||||
|
||||
/**
|
||||
* CLUTTER_STAGE_WIDTH:
|
||||
*
|
||||
* Macro that evaluates to the width of the default stage
|
||||
*
|
||||
* Since: 0.2
|
||||
*
|
||||
* Deprecated: 1.2: Use clutter_actor_get_width() instead
|
||||
*/
|
||||
#define CLUTTER_STAGE_WIDTH() (clutter_actor_get_width (clutter_stage_get_default ()))
|
||||
|
||||
/**
|
||||
* CLUTTER_STAGE_HEIGHT:
|
||||
*
|
||||
* Macro that evaluates to the height of the default stage
|
||||
*
|
||||
* Since: 0.2
|
||||
*
|
||||
* Deprecated: 1.2: use clutter_actor_get_height() instead
|
||||
*/
|
||||
#define CLUTTER_STAGE_HEIGHT() (clutter_actor_get_height (clutter_stage_get_default ()))
|
||||
|
||||
#endif /* !CLUTTER_DISABLE_DEPRECATED */
|
||||
|
||||
typedef struct _ClutterPerspective ClutterPerspective;
|
||||
typedef struct _ClutterFog ClutterFog;
|
||||
|
||||
@ -255,19 +229,6 @@ void clutter_stage_set_motion_events_enabled (ClutterStage *sta
|
||||
gboolean enabled);
|
||||
gboolean clutter_stage_get_motion_events_enabled (ClutterStage *stage);
|
||||
|
||||
#ifndef CLUTTER_DISABLE_DEPRECATED
|
||||
|
||||
/* Commodity macro, for mallum only */
|
||||
#define clutter_stage_add(stage,actor) G_STMT_START { \
|
||||
if (CLUTTER_IS_STAGE ((stage)) && CLUTTER_IS_ACTOR ((actor))) \
|
||||
{ \
|
||||
ClutterContainer *_container = (ClutterContainer *) (stage); \
|
||||
ClutterActor *_actor = (ClutterActor *) (actor); \
|
||||
clutter_container_add_actor (_container, _actor); \
|
||||
} } G_STMT_END
|
||||
|
||||
#endif /* CLUTTER_DISABLE_DEPRECATED */
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __CLUTTER_STAGE_H__ */
|
||||
|
45
clutter/deprecated/clutter-stage.h
Normal file
45
clutter/deprecated/clutter-stage.h
Normal file
@ -0,0 +1,45 @@
|
||||
#ifndef __CLUTTER_STAGE_DEPRECATED_H__
|
||||
#define __CLUTTER_STAGE_DEPRECATED_H__
|
||||
|
||||
#include <clutter/clutter-types.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#ifndef CLUTTER_DISABLE_DEPRECATED
|
||||
|
||||
/**
|
||||
* CLUTTER_STAGE_WIDTH:
|
||||
*
|
||||
* Macro that evaluates to the width of the default stage
|
||||
*
|
||||
* Since: 0.2
|
||||
*
|
||||
* Deprecated: 1.2: Use clutter_actor_get_width() instead
|
||||
*/
|
||||
#define CLUTTER_STAGE_WIDTH() (clutter_actor_get_width (clutter_stage_get_default ()))
|
||||
|
||||
/**
|
||||
* CLUTTER_STAGE_HEIGHT:
|
||||
*
|
||||
* Macro that evaluates to the height of the default stage
|
||||
*
|
||||
* Since: 0.2
|
||||
*
|
||||
* Deprecated: 1.2: use clutter_actor_get_height() instead
|
||||
*/
|
||||
#define CLUTTER_STAGE_HEIGHT() (clutter_actor_get_height (clutter_stage_get_default ()))
|
||||
|
||||
/* Commodity macro, for mallum only */
|
||||
#define clutter_stage_add(stage,actor) G_STMT_START { \
|
||||
if (CLUTTER_IS_STAGE ((stage)) && CLUTTER_IS_ACTOR ((actor))) \
|
||||
{ \
|
||||
ClutterContainer *_container = (ClutterContainer *) (stage); \
|
||||
ClutterActor *_actor = (ClutterActor *) (actor); \
|
||||
clutter_container_add_actor (_container, _actor); \
|
||||
} } G_STMT_END
|
||||
|
||||
#endif /* CLUTTER_DISABLE_DEPRECATED */
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __CLUTTER_STAGE_DEPRECATED_H__ */
|
Loading…
Reference in New Issue
Block a user