Clean up clutter-private.h/2

Move StageManager private API to a different header.
This commit is contained in:
Emmanuele Bassi 2010-10-21 10:59:49 +01:00
parent c1771d152e
commit 999c063784
5 changed files with 22 additions and 20 deletions

View File

@ -230,6 +230,7 @@ source_h_priv = \
$(srcdir)/clutter-private.h \ $(srcdir)/clutter-private.h \
$(srcdir)/clutter-profile.h \ $(srcdir)/clutter-profile.h \
$(srcdir)/clutter-script-private.h \ $(srcdir)/clutter-script-private.h \
$(srcdir)/clutter-stage-manager-private.h \
$(srcdir)/clutter-timeout-interval.h \ $(srcdir)/clutter-timeout-interval.h \
$(NULL) $(NULL)

View File

@ -307,14 +307,6 @@ PangoContext *_clutter_context_get_pango_context (ClutterMainContext *self);
G_CONST_RETURN gchar *_clutter_gettext (const gchar *str); G_CONST_RETURN gchar *_clutter_gettext (const gchar *str);
/* stage manager */
void _clutter_stage_manager_add_stage (ClutterStageManager *stage_manager,
ClutterStage *stage);
void _clutter_stage_manager_remove_stage (ClutterStageManager *stage_manager,
ClutterStage *stage);
void _clutter_stage_manager_set_default_stage (ClutterStageManager *stage_manager,
ClutterStage *stage);
/* stage */ /* stage */
void _clutter_stage_do_paint (ClutterStage *stage, void _clutter_stage_do_paint (ClutterStage *stage,
const ClutterGeometry *clip); const ClutterGeometry *clip);

View File

@ -0,0 +1,18 @@
#ifndef __CLUTTER_STAGE_MANAGER_PRIVATE_H__
#define __CLUTTER_STAGE_MANAGER_PRIVATE_H__
#include <clutter/clutter-stage-manager.h>
G_BEGIN_DECLS
/* stage manager */
void _clutter_stage_manager_add_stage (ClutterStageManager *stage_manager,
ClutterStage *stage);
void _clutter_stage_manager_remove_stage (ClutterStageManager *stage_manager,
ClutterStage *stage);
void _clutter_stage_manager_set_default_stage (ClutterStageManager *stage_manager,
ClutterStage *stage);
G_END_DECLS
#endif /* __CLUTTER_STAGE_MANAGER_PRIVATE_H__ */

View File

@ -40,12 +40,12 @@
#include "config.h" #include "config.h"
#endif #endif
#include "clutter-stage-manager-private.h"
#include "clutter-marshal.h" #include "clutter-marshal.h"
#include "clutter-debug.h" #include "clutter-debug.h"
#include "clutter-private.h" #include "clutter-private.h"
#include "clutter-version.h" #include "clutter-version.h"
#include "clutter-stage-manager.h"
enum enum
{ {
@ -87,19 +87,10 @@ static void
clutter_stage_manager_dispose (GObject *gobject) clutter_stage_manager_dispose (GObject *gobject)
{ {
ClutterStageManager *stage_manager; ClutterStageManager *stage_manager;
GSList *l, *next;
stage_manager = CLUTTER_STAGE_MANAGER (gobject); stage_manager = CLUTTER_STAGE_MANAGER (gobject);
for (l = stage_manager->stages; l; l = next) g_slist_foreach (stage_manager->stages, (GFunc) clutter_actor_destroy, NULL);
{
ClutterActor *stage = l->data;
next = l->next;
if (stage)
clutter_actor_destroy (stage);
}
g_slist_free (stage_manager->stages); g_slist_free (stage_manager->stages);
stage_manager->stages = NULL; stage_manager->stages = NULL;

View File

@ -64,7 +64,7 @@
#include "clutter-enum-types.h" #include "clutter-enum-types.h"
#include "clutter-private.h" #include "clutter-private.h"
#include "clutter-debug.h" #include "clutter-debug.h"
#include "clutter-stage-manager.h" #include "clutter-stage-manager-private.h"
#include "clutter-stage-window.h" #include "clutter-stage-window.h"
#include "clutter-version.h" /* For flavour */ #include "clutter-version.h" /* For flavour */
#include "clutter-id-pool.h" #include "clutter-id-pool.h"