Clean up clutter-private.h/3

Move Stage private API to a separate header.
This commit is contained in:
Emmanuele Bassi 2010-10-21 11:29:09 +01:00
parent 999c063784
commit 8613013ab0
28 changed files with 162 additions and 164 deletions

View File

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

View File

@ -303,7 +303,7 @@
#include "clutter-profile.h"
#include "clutter-scriptable.h"
#include "clutter-script-private.h"
#include "clutter-stage.h"
#include "clutter-stage-private.h"
#include "clutter-units.h"
typedef struct _ShaderData ShaderData;

View File

@ -48,6 +48,8 @@
#include "clutter-marshal.h"
#include "clutter-private.h"
#include "clutter-profile.h"
#include "clutter-stage-manager-private.h"
#include "clutter-stage-private.h"
#include <cogl/cogl.h>

View File

@ -40,6 +40,7 @@
#include "clutter-enum-types.h"
#include "clutter-input-device.h"
#include "clutter-private.h"
#include "clutter-stage-private.h"
enum
{

View File

@ -104,7 +104,7 @@
#include "clutter-master-clock.h"
#include "clutter-feature.h"
#include "clutter-actor.h"
#include "clutter-stage.h"
#include "clutter-stage-private.h"
#include "clutter-private.h"
#include "clutter-debug.h"
#include "clutter-version.h" /* For flavour define */

View File

@ -39,6 +39,7 @@
#include "clutter-debug.h"
#include "clutter-private.h"
#include "clutter-profile.h"
#include "clutter-stage-private.h"
#define CLUTTER_MASTER_CLOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_MASTER_CLOCK, ClutterMasterClockClass))
#define CLUTTER_IS_MASTER_CLOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_MASTER_CLOCK))

View File

@ -71,6 +71,7 @@
#include "clutter-debug.h"
#include "clutter-private.h"
#include "clutter-stage-private.h"
struct _ClutterOffscreenEffectPrivate
{

View File

@ -126,13 +126,6 @@ typedef enum
CLUTTER_REDRAW_CLIPPED_TO_ALLOCATION = 1 << 0
} ClutterRedrawFlags;
struct _ClutterStageManager
{
GObject parent_instance;
GSList *stages;
};
struct _ClutterMainContext
{
ClutterBackend *backend; /* holds a pointer to the windowing
@ -281,8 +274,6 @@ typedef enum _ClutterActorTraverseFlags
typedef gboolean (*ClutterForeachCallback) (ClutterActor *actor,
void *user_data);
typedef struct _ClutterStageQueueRedrawEntry ClutterStageQueueRedrawEntry;
#define CLUTTER_CONTEXT() (_clutter_context_get_default ())
ClutterMainContext *_clutter_context_get_default (void);
gboolean _clutter_context_is_initialized (void);
@ -307,66 +298,6 @@ PangoContext *_clutter_context_get_pango_context (ClutterMainContext *self);
G_CONST_RETURN gchar *_clutter_gettext (const gchar *str);
/* stage */
void _clutter_stage_do_paint (ClutterStage *stage,
const ClutterGeometry *clip);
void _clutter_stage_set_window (ClutterStage *stage,
ClutterStageWindow *stage_window);
ClutterStageWindow *_clutter_stage_get_window (ClutterStage *stage);
ClutterStageWindow *_clutter_stage_get_default_window (void);
void _clutter_stage_get_projection_matrix (ClutterStage *stage,
CoglMatrix *projection);
void _clutter_stage_dirty_projection (ClutterStage *stage);
void _clutter_stage_set_viewport (ClutterStage *stage,
int x,
int y,
int width,
int height);
void _clutter_stage_get_viewport (ClutterStage *stage,
int *x,
int *y,
int *width,
int *height);
void _clutter_stage_dirty_viewport (ClutterStage *stage);
void _clutter_stage_maybe_setup_viewport (ClutterStage *stage);
void _clutter_stage_maybe_relayout (ClutterActor *stage);
gboolean _clutter_stage_needs_update (ClutterStage *stage);
gboolean _clutter_stage_do_update (ClutterStage *stage);
void _clutter_stage_queue_event (ClutterStage *stage,
ClutterEvent *event);
gboolean _clutter_stage_has_queued_events (ClutterStage *stage);
void _clutter_stage_process_queued_events (ClutterStage *stage);
void _clutter_stage_update_input_devices (ClutterStage *stage);
int _clutter_stage_get_pending_swaps (ClutterStage *stage);
gboolean _clutter_stage_has_full_redraw_queued (ClutterStage *stage);
void _clutter_stage_set_pick_buffer_valid (ClutterStage *stage,
gboolean valid);
gboolean _clutter_stage_get_pick_buffer_valid (ClutterStage *stage);
void _clutter_stage_increment_picks_per_frame_counter (ClutterStage *stage);
void _clutter_stage_reset_picks_per_frame_counter (ClutterStage *stage);
guint _clutter_stage_get_picks_per_frame_counter (ClutterStage *stage);
ClutterPaintVolume *_clutter_stage_paint_volume_stack_allocate (ClutterStage *stage);
void _clutter_stage_paint_volume_stack_free_all (ClutterStage *stage);
const ClutterGeometry *_clutter_stage_get_clip (ClutterStage *stage);
ClutterStageQueueRedrawEntry *_clutter_stage_queue_actor_redraw (ClutterStage *stage,
ClutterStageQueueRedrawEntry *entry,
ClutterActor *actor,
ClutterPaintVolume *clip);
void _clutter_stage_queue_redraw_entry_invalidate (ClutterStageQueueRedrawEntry *entry);
/* vfuncs implemented by backend */
GType _clutter_backend_impl_get_type (void);

View File

@ -5,6 +5,13 @@
G_BEGIN_DECLS
struct _ClutterStageManager
{
GObject parent_instance;
GSList *stages;
};
/* stage manager */
void _clutter_stage_manager_add_stage (ClutterStageManager *stage_manager,
ClutterStage *stage);

View File

@ -0,0 +1,64 @@
#ifndef __CLUTTER_STAGE_PRIVATE_H__
#define __CLUTTER_STAGE_PRIVATE_H__
#include <clutter/clutter-stage-window.h>
#include <clutter/clutter-stage.h>
G_BEGIN_DECLS
typedef struct _ClutterStageQueueRedrawEntry ClutterStageQueueRedrawEntry;
/* stage */
ClutterStageWindow *_clutter_stage_get_default_window (void);
void _clutter_stage_do_paint (ClutterStage *stage,
const ClutterGeometry *clip);
void _clutter_stage_set_window (ClutterStage *stage,
ClutterStageWindow *stage_window);
ClutterStageWindow *_clutter_stage_get_window (ClutterStage *stage);
void _clutter_stage_get_projection_matrix (ClutterStage *stage,
CoglMatrix *projection);
void _clutter_stage_dirty_projection (ClutterStage *stage);
void _clutter_stage_set_viewport (ClutterStage *stage,
int x,
int y,
int width,
int height);
void _clutter_stage_get_viewport (ClutterStage *stage,
int *x,
int *y,
int *width,
int *height);
void _clutter_stage_dirty_viewport (ClutterStage *stage);
void _clutter_stage_maybe_setup_viewport (ClutterStage *stage);
void _clutter_stage_maybe_relayout (ClutterActor *stage);
gboolean _clutter_stage_needs_update (ClutterStage *stage);
gboolean _clutter_stage_do_update (ClutterStage *stage);
void _clutter_stage_queue_event (ClutterStage *stage,
ClutterEvent *event);
gboolean _clutter_stage_has_queued_events (ClutterStage *stage);
void _clutter_stage_process_queued_events (ClutterStage *stage);
void _clutter_stage_update_input_devices (ClutterStage *stage);
int _clutter_stage_get_pending_swaps (ClutterStage *stage);
gboolean _clutter_stage_has_full_redraw_queued (ClutterStage *stage);
void _clutter_stage_set_pick_buffer_valid (ClutterStage *stage,
gboolean valid);
gboolean _clutter_stage_get_pick_buffer_valid (ClutterStage *stage);
void _clutter_stage_increment_picks_per_frame_counter (ClutterStage *stage);
void _clutter_stage_reset_picks_per_frame_counter (ClutterStage *stage);
guint _clutter_stage_get_picks_per_frame_counter (ClutterStage *stage);
ClutterPaintVolume *_clutter_stage_paint_volume_stack_allocate (ClutterStage *stage);
void _clutter_stage_paint_volume_stack_free_all (ClutterStage *stage);
const ClutterGeometry *_clutter_stage_get_clip (ClutterStage *stage);
ClutterStageQueueRedrawEntry *_clutter_stage_queue_actor_redraw (ClutterStage *stage,
ClutterStageQueueRedrawEntry *entry,
ClutterActor *actor,
ClutterPaintVolume *clip);
void _clutter_stage_queue_redraw_entry_invalidate (ClutterStageQueueRedrawEntry *entry);
G_END_DECLS
#endif /* __CLUTTER_STAGE_PRIVATE_H__ */

View File

@ -65,12 +65,12 @@
#include "clutter-private.h"
#include "clutter-debug.h"
#include "clutter-stage-manager-private.h"
#include "clutter-stage-window.h"
#include "clutter-version.h" /* For flavour */
#include "clutter-id-pool.h"
#include "clutter-container.h"
#include "clutter-profile.h"
#include "clutter-device-manager-private.h"
#include "clutter-stage-private.h"
#include "cogl/cogl.h"

View File

@ -54,6 +54,7 @@
#include "clutter-debug.h"
#include "clutter-fixed.h"
#include "clutter-enum-types.h"
#include "clutter-stage-private.h"
#include "cogl/cogl.h"

View File

@ -40,10 +40,11 @@
#include "clutter-stage-egl.h"
#include "clutter-egl.h"
#include "../clutter-private.h"
#include "../clutter-main.h"
#include "../clutter-debug.h"
#include "../clutter-version.h"
#include "clutter-debug.h"
#include "clutter-private.h"
#include "clutter-main.h"
#include "clutter-stage-private.h"
#include "clutter-version.h"
static ClutterBackendEGL *backend_singleton = NULL;

View File

@ -6,17 +6,14 @@
#include "clutter-egl.h"
#include "clutter-backend-egl.h"
#include "../clutter-main.h"
#include "../clutter-feature.h"
#include "../clutter-color.h"
#include "../clutter-util.h"
#include "../clutter-event.h"
#include "../clutter-enum-types.h"
#include "../clutter-private.h"
#include "../clutter-debug.h"
#include "../clutter-units.h"
#include "../clutter-stage.h"
#include "../clutter-stage-window.h"
#include "clutter-debug.h"
#include "clutter-event.h"
#include "clutter-enum-types.h"
#include "clutter-feature.h"
#include "clutter-main.h"
#include "clutter-private.h"
#include "clutter-stage-private.h"
#include "clutter-util.h"
#ifdef COGL_HAS_X11_SUPPORT
static ClutterStageWindowIface *clutter_stage_egl_parent_iface = NULL;

View File

@ -4,9 +4,11 @@
#include "clutter-backend-fruity.h"
#include "clutter-stage-fruity.h"
#include "../clutter-private.h"
#include "../clutter-main.h"
#include "../clutter-debug.h"
#include "clutter-debug.h"
#include "clutter-main.h"
#include "clutter-stage-private.h"
#include "clutter-private.h"
static ClutterBackendEGL *backend_singleton = NULL;

View File

@ -42,11 +42,12 @@
#include "clutter-glx.h"
#include "clutter-profile.h"
#include "../clutter-event.h"
#include "../clutter-main.h"
#include "../clutter-debug.h"
#include "../clutter-private.h"
#include "../clutter-version.h"
#include "clutter-debug.h"
#include "clutter-event.h"
#include "clutter-main.h"
#include "clutter-private.h"
#include "clutter-stage-private.h"
#include "clutter-version.h"
#include "cogl/cogl.h"

View File

@ -28,7 +28,9 @@
#include "clutter-backend-x11.h"
#include "clutter-stage-glx.h"
#include "clutter-backend-glx.h"
#include "clutter-private.h"
#include "clutter-stage-private.h"
#include <clutter/clutter-backend.h>
#include <clutter/clutter-stage-manager.h>

View File

@ -28,20 +28,13 @@
#include "clutter-glx.h"
#include "clutter-profile.h"
#include "../clutter-main.h"
#include "../clutter-feature.h"
#include "../clutter-color.h"
#include "../clutter-util.h"
#include "../clutter-event.h"
#include "../clutter-enum-types.h"
#include "../clutter-private.h"
#include "../clutter-debug.h"
#include "../clutter-units.h"
#include "../clutter-shader.h"
#include "../clutter-group.h"
#include "../clutter-container.h"
#include "../clutter-stage.h"
#include "../clutter-stage-window.h"
#include "clutter-debug.h"
#include "clutter-event.h"
#include "clutter-enum-types.h"
#include "clutter-feature.h"
#include "clutter-main.h"
#include "clutter-private.h"
#include "clutter-stage-private.h"
#include "cogl/cogl.h"

View File

@ -24,10 +24,13 @@
#include "clutter-osx.h"
#include "clutter-backend-osx.h"
#include "clutter-stage-osx.h"
#include "../clutter-private.h"
#include "clutter-debug.h"
#include "clutter-private.h"
#include "clutter-stage-private.h"
#include "cogl/cogl.h"
#include <clutter/clutter-debug.h>
#import <AppKit/AppKit.h>
G_DEFINE_TYPE (ClutterBackendOSX, clutter_backend_osx, CLUTTER_TYPE_BACKEND)

View File

@ -24,10 +24,12 @@
#include "clutter-osx.h"
#include "clutter-stage-osx.h"
#include "clutter-backend-osx.h"
#import <AppKit/AppKit.h>
#include <clutter/clutter-debug.h>
#include <clutter/clutter-private.h>
#include "clutter-debug.h"
#include "clutter-private.h"
#include "clutter-stage-private.h"
#import <AppKit/AppKit.h>
static void clutter_stage_window_iface_init (ClutterStageWindowIface *iface);

View File

@ -39,15 +39,16 @@
#include <wayland-client.h>
#include <xf86drm.h>
#include "../clutter-private.h"
#include "../clutter-main.h"
#include "../clutter-debug.h"
#include "../clutter-version.h"
#include "clutter-backend-wayland.h"
#include "clutter-stage-wayland.h"
#include "clutter-wayland.h"
#include "clutter-debug.h"
#include "clutter-main.h"
#include "clutter-private.h"
#include "clutter-stage-private.h"
#include "clutter-version.h"
static ClutterBackendWayland *backend_singleton = NULL;
G_DEFINE_TYPE (ClutterBackendWayland, _clutter_backend_wayland, CLUTTER_TYPE_BACKEND);

View File

@ -33,22 +33,18 @@
#include <wayland-client.h>
#include <xf86drm.h>
#include "../clutter-main.h"
#include "../clutter-feature.h"
#include "../clutter-color.h"
#include "../clutter-util.h"
#include "../clutter-event.h"
#include "../clutter-enum-types.h"
#include "../clutter-private.h"
#include "../clutter-debug.h"
#include "../clutter-units.h"
#include "../clutter-stage.h"
#include "../clutter-stage-window.h"
#include "clutter-stage-wayland.h"
#include "clutter-wayland.h"
#include "clutter-backend-wayland.h"
#include "clutter-main.h"
#include "clutter-feature.h"
#include "clutter-event.h"
#include "clutter-enum-types.h"
#include "clutter-private.h"
#include "clutter-debug.h"
#include "clutter-stage-private.h"
#include "cogl/cogl-framebuffer-private.h"
static void

View File

@ -30,12 +30,13 @@
#include "clutter-win32.h"
#include "clutter-device-manager-win32.h"
#include "../clutter-event.h"
#include "../clutter-main.h"
#include "../clutter-input-device.h"
#include "../clutter-debug.h"
#include "../clutter-private.h"
#include "../clutter-version.h"
#include "clutter-event.h"
#include "clutter-main.h"
#include "clutter-device-manager-private.h"
#include "clutter-debug.h"
#include "clutter-private.h"
#include "clutter-stage-private.h"
#include "clutter-version.h"
#include "cogl/cogl.h"

View File

@ -34,6 +34,7 @@
#include "clutter-keysyms.h"
#include "clutter-main.h"
#include "clutter-private.h"
#include "clutter-stage-private.h"
#include <string.h>
#include <glib.h>

View File

@ -27,18 +27,13 @@
#include "clutter-stage-win32.h"
#include "clutter-win32.h"
#include "../clutter-stage-window.h"
#include "../clutter-main.h"
#include "../clutter-feature.h"
#include "../clutter-color.h"
#include "../clutter-util.h"
#include "../clutter-event.h"
#include "../clutter-enum-types.h"
#include "../clutter-private.h"
#include "../clutter-debug.h"
#include "../clutter-units.h"
#include "../clutter-shader.h"
#include "../clutter-stage.h"
#include "clutter-main.h"
#include "clutter-feature.h"
#include "clutter-event.h"
#include "clutter-enum-types.h"
#include "clutter-private.h"
#include "clutter-debug.h"
#include "clutter-stage-private.h"
#include "cogl/cogl.h"

View File

@ -445,11 +445,7 @@ clutter_backend_x11_dispose (GObject *gobject)
CLUTTER_NOTE (BACKEND, "Disposing the of stages");
stage_manager = clutter_stage_manager_get_default ();
/* Destroy all of the stages. g_slist_foreach is used because the
finalizer for the stages will remove the stage from the
stage_manager's list and g_slist_foreach has some basic
protection against this */
g_slist_foreach (stage_manager->stages, (GFunc) clutter_actor_destroy, NULL);
g_object_unref (stage_manager);
CLUTTER_NOTE (BACKEND, "Removing the event source");
_clutter_backend_x11_events_uninit (CLUTTER_BACKEND (backend_x11));

View File

@ -39,6 +39,7 @@
#include "clutter-event.h"
#include "clutter-main.h"
#include "clutter-private.h"
#include "clutter-stage-private.h"
#include "cogl/cogl-internal.h"

View File

@ -31,16 +31,13 @@
#include "clutter-stage-x11.h"
#include "clutter-x11.h"
#include "../clutter-stage-window.h"
#include "../clutter-main.h"
#include "../clutter-feature.h"
#include "../clutter-color.h"
#include "../clutter-util.h"
#include "../clutter-event.h"
#include "../clutter-enum-types.h"
#include "../clutter-private.h"
#include "../clutter-debug.h"
#include "../clutter-units.h"
#include "clutter-debug.h"
#include "clutter-main.h"
#include "clutter-feature.h"
#include "clutter-event.h"
#include "clutter-enum-types.h"
#include "clutter-private.h"
#include "clutter-stage-private.h"
#include "cogl/cogl.h"