clutter-stage-private.h 7.87 KB
Newer Older
Emmanuele Bassi's avatar
Emmanuele Bassi committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
/*
 * 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/>.
 */

22 23 24 25 26
#ifndef __CLUTTER_STAGE_PRIVATE_H__
#define __CLUTTER_STAGE_PRIVATE_H__

#include <clutter/clutter-stage-window.h>
#include <clutter/clutter-stage.h>
27
#include <clutter/clutter-input-device.h>
28
#include <clutter/clutter-private.h>
29

30 31
#include <cogl/cogl.h>

32 33 34 35 36 37
G_BEGIN_DECLS

typedef struct _ClutterStageQueueRedrawEntry ClutterStageQueueRedrawEntry;

/* stage */
ClutterStageWindow *_clutter_stage_get_default_window    (void);
38

39 40
void                _clutter_stage_paint_view            (ClutterStage                *stage,
                                                          ClutterStageView            *view,
41 42
                                                          const cairo_rectangle_int_t *clip);

43 44 45 46 47 48 49
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,
50 51 52 53
                                                          float                  x,
                                                          float                  y,
                                                          float                  width,
                                                          float                  height);
54
void                _clutter_stage_get_viewport          (ClutterStage          *stage,
55 56 57 58
                                                          float                 *x,
                                                          float                 *y,
                                                          float                 *width,
                                                          float                 *height);
59
void                _clutter_stage_dirty_viewport        (ClutterStage          *stage);
60 61
void                _clutter_stage_maybe_setup_viewport  (ClutterStage          *stage,
                                                          ClutterStageView      *view);
62 63 64 65 66
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,
67 68
                                                           ClutterEvent *event,
                                                           gboolean      copy_event);
69 70 71
gboolean _clutter_stage_has_queued_events                 (ClutterStage *stage);
void     _clutter_stage_process_queued_events             (ClutterStage *stage);
void     _clutter_stage_update_input_devices              (ClutterStage *stage);
72 73 74
void     _clutter_stage_schedule_update                   (ClutterStage *stage);
gint64    _clutter_stage_get_update_time                  (ClutterStage *stage);
void     _clutter_stage_clear_update_time                 (ClutterStage *stage);
75
gboolean _clutter_stage_has_full_redraw_queued            (ClutterStage *stage);
76 77 78 79 80

ClutterActor *_clutter_stage_do_pick (ClutterStage    *stage,
                                      gint             x,
                                      gint             y,
                                      ClutterPickMode  mode);
81 82 83 84

ClutterPaintVolume *_clutter_stage_paint_volume_stack_allocate (ClutterStage *stage);
void                _clutter_stage_paint_volume_stack_free_all (ClutterStage *stage);

85
const ClutterPlane *_clutter_stage_get_clip (ClutterStage *stage);
86 87 88 89 90 91 92

ClutterStageQueueRedrawEntry *_clutter_stage_queue_actor_redraw            (ClutterStage                 *stage,
                                                                            ClutterStageQueueRedrawEntry *entry,
                                                                            ClutterActor                 *actor,
                                                                            ClutterPaintVolume           *clip);
void                          _clutter_stage_queue_redraw_entry_invalidate (ClutterStageQueueRedrawEntry *entry);

93 94
CoglFramebuffer *_clutter_stage_get_active_framebuffer (ClutterStage *stage);

95 96 97 98 99 100 101
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);

102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
void            _clutter_stage_add_pointer_drag_actor    (ClutterStage       *stage,
                                                          ClutterInputDevice *device,
                                                          ClutterActor       *actor);
ClutterActor *  _clutter_stage_get_pointer_drag_actor    (ClutterStage       *stage,
                                                          ClutterInputDevice *device);
void            _clutter_stage_remove_pointer_drag_actor (ClutterStage       *stage,
                                                          ClutterInputDevice *device);

void            _clutter_stage_add_touch_drag_actor    (ClutterStage         *stage,
                                                        ClutterEventSequence *sequence,
                                                        ClutterActor         *actor);
ClutterActor *  _clutter_stage_get_touch_drag_actor    (ClutterStage         *stage,
                                                        ClutterEventSequence *sequence);
void            _clutter_stage_remove_touch_drag_actor (ClutterStage         *stage,
                                                        ClutterEventSequence *sequence);
117

118 119 120 121 122 123 124
ClutterStageState       _clutter_stage_get_state        (ClutterStage      *stage);
gboolean                _clutter_stage_is_activated     (ClutterStage      *stage);
gboolean                _clutter_stage_is_fullscreen    (ClutterStage      *stage);
gboolean                _clutter_stage_update_state     (ClutterStage      *stage,
                                                         ClutterStageState  unset_state,
                                                         ClutterStageState  set_state);

125 126 127
void                    _clutter_stage_set_scale_factor (ClutterStage      *stage,
                                                         int                factor);

128 129 130 131
void            _clutter_stage_presented                (ClutterStage      *stage,
                                                         CoglFrameEvent     frame_event,
                                                         ClutterFrameInfo  *frame_info);

132 133 134
G_END_DECLS

#endif /* __CLUTTER_STAGE_PRIVATE_H__ */