2010-10-21 12:13:00 +00:00
|
|
|
/*
|
|
|
|
* Clutter.
|
|
|
|
*
|
|
|
|
* An OpenGL based 'interactive canvas' library.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2010 Intel Corporation.
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* 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, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2010-10-21 10:29:09 +00:00
|
|
|
#ifndef __CLUTTER_STAGE_PRIVATE_H__
|
|
|
|
#define __CLUTTER_STAGE_PRIVATE_H__
|
|
|
|
|
|
|
|
#include <clutter/clutter-stage-window.h>
|
|
|
|
#include <clutter/clutter-stage.h>
|
2011-01-27 17:26:16 +00:00
|
|
|
#include <clutter/clutter-input-device.h>
|
2011-02-01 18:32:08 +00:00
|
|
|
#include <clutter/clutter-private.h>
|
2010-10-21 10:29:09 +00:00
|
|
|
|
2011-03-10 22:05:03 +00:00
|
|
|
#include <cogl/cogl.h>
|
|
|
|
|
2010-10-21 10:29:09 +00:00
|
|
|
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,
|
2011-02-01 16:51:58 +00:00
|
|
|
float x,
|
|
|
|
float y,
|
|
|
|
float width,
|
|
|
|
float height);
|
2010-10-21 10:29:09 +00:00
|
|
|
void _clutter_stage_get_viewport (ClutterStage *stage,
|
2011-02-01 16:51:58 +00:00
|
|
|
float *x,
|
|
|
|
float *y,
|
|
|
|
float *width,
|
|
|
|
float *height);
|
2010-10-21 10:29:09 +00:00
|
|
|
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);
|
2011-03-15 13:17:04 +00:00
|
|
|
|
|
|
|
ClutterActor *_clutter_stage_do_pick (ClutterStage *stage,
|
|
|
|
gint x,
|
|
|
|
gint y,
|
|
|
|
ClutterPickMode mode);
|
2010-10-21 10:29:09 +00:00
|
|
|
|
|
|
|
ClutterPaintVolume *_clutter_stage_paint_volume_stack_allocate (ClutterStage *stage);
|
|
|
|
void _clutter_stage_paint_volume_stack_free_all (ClutterStage *stage);
|
|
|
|
|
2011-02-01 18:32:08 +00:00
|
|
|
const ClutterPlane *_clutter_stage_get_clip (ClutterStage *stage);
|
2010-10-21 10:29:09 +00:00
|
|
|
|
|
|
|
ClutterStageQueueRedrawEntry *_clutter_stage_queue_actor_redraw (ClutterStage *stage,
|
|
|
|
ClutterStageQueueRedrawEntry *entry,
|
|
|
|
ClutterActor *actor,
|
|
|
|
ClutterPaintVolume *clip);
|
|
|
|
void _clutter_stage_queue_redraw_entry_invalidate (ClutterStageQueueRedrawEntry *entry);
|
|
|
|
|
2011-01-27 17:26:16 +00:00
|
|
|
void _clutter_stage_add_device (ClutterStage *stage,
|
|
|
|
ClutterInputDevice *device);
|
|
|
|
void _clutter_stage_remove_device (ClutterStage *stage,
|
|
|
|
ClutterInputDevice *device);
|
|
|
|
gboolean _clutter_stage_has_device (ClutterStage *stage,
|
|
|
|
ClutterInputDevice *device);
|
|
|
|
|
Store the motion event deliver flag in ClutterStage
Once upon a time, the land of Clutter had a stage singleton. It was
created automatically at initialization time and stayed around even
after the main loop was terminated. The singleton was content in
being all there was. There also was a global API to handle the
configuration of the stage singleton that would affect the behaviour
on other classes, signals and properties.
Then, an evil wizard came along and locked the stage singleton in his
black tower, and twisted it until it was possible to create new stages.
These new stages were pesky, and didn't have the same semantics of the
singleton: they didn't stay around when closed, or terminate the main
loop on delete events.
The evil wizard also started moving all the stage-related API from the
global context into class-specific methods.
Finally, the evil wizard cast a spell, and the stage singleton was
demoted to creation on demand - and until somebody called the
clutter_stage_get_default() function, the singleton remained in a limbo
of NULL pointers and undefined memory areas.
There was a last bit - literally - of information still held by the
global API; a tiny, little flag that disabled per-actor motion events.
The evil wizard added private accessors for it, and stored it inside the
stage private structure, in preparation for a deprecation that would
come in a future development cycle.
The evil wizard looked down upon the land of Clutter from the height of
his black tower; the lay of the land had been reshaped into a crucible
of potential, and the last dregs of the original force of creation were
either molted into new, useful shapes, or blasted away by the sheer fury
of his will.
All was good.
2011-02-18 17:19:04 +00:00
|
|
|
void _clutter_stage_set_motion_events_enabled (ClutterStage *stage,
|
|
|
|
gboolean enabled);
|
|
|
|
gboolean _clutter_stage_get_motion_events_enabled (ClutterStage *stage);
|
|
|
|
|
2011-03-10 22:05:03 +00:00
|
|
|
CoglFramebuffer *_clutter_stage_get_active_framebuffer (ClutterStage *stage);
|
|
|
|
|
2011-04-11 13:11:39 +00:00
|
|
|
gint32 _clutter_stage_acquire_pick_id (ClutterStage *stage,
|
|
|
|
ClutterActor *actor);
|
|
|
|
void _clutter_stage_release_pick_id (ClutterStage *stage,
|
|
|
|
gint32 pick_id);
|
|
|
|
ClutterActor * _clutter_stage_get_actor_by_pick_id (ClutterStage *stage,
|
|
|
|
gint32 pick_id);
|
|
|
|
|
2010-10-21 10:29:09 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __CLUTTER_STAGE_PRIVATE_H__ */
|