2006-05-29 04:59:36 -04:00
|
|
|
/*
|
|
|
|
* Clutter.
|
|
|
|
*
|
|
|
|
* An OpenGL based 'interactive canvas' library.
|
|
|
|
*
|
|
|
|
* Authored By Matthew Allum <mallum@openedhand.com>
|
|
|
|
*
|
|
|
|
* Copyright (C) 2006 OpenedHand
|
|
|
|
*
|
|
|
|
* 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, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
2006-06-21 18:34:25 -04:00
|
|
|
/**
|
|
|
|
* SECTION:clutter-stage
|
|
|
|
* @short_description: Top level visual element to which actors are placed.
|
|
|
|
*
|
|
|
|
* #ClutterStage is a top level 'window' on which child actors are placed
|
|
|
|
* and manipulated.
|
|
|
|
*/
|
|
|
|
|
2006-06-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter-color.h:
* clutter-color.c: Reimplement ClutterColor as a boxed type;
add convenience API for color handling, like: add, subtract,
shade, HSL color-space conversion, packing and unpacking.
* clutter-private.h: Update ClutterMainContext, and export the
main context pointer here.
* clutter-rectangle.h:
* clutter-rectangle.c: Update the color-related code; make
clutter_rectangle_new() and empty constructor and provide
clutter_rectangle_new_with_color(); provide color setter
and getter API.
* clutter-label.h:
* clutter-label.c: Rename the "font" property to "font-name";
update the color-related code to the new ClutterColor object;
rename clutter_label_new() to clutter_label_new_with_text(),
and add setters and getters for the properties.
* clutter-marshal.list: Add VOID:OBJECT and VOID:BOXED marshallers
generators.
* clutter-stage.h:
* clutter-stage.c: Rework the API: provide a default constructor
for a singleton object, named clutter_stage_get_default(), which
supercedes the clutter_stage() function in clutter-main; provide
new events: button-press-event, button-release-event,
key-press-event and key-release-event; update the color-related
code;
(clutter_stage_snapshot): Allow negative width and height when
taking a snapshot (meaning: use full width/height).
(clutter_stage_get_element_at_pos): Rename clutter_stage_pick().
* clutter-element.c (clutter_element_paint): Clean up the
stage and color related code.
* clutter-event.h:
* clutter-event.c: Add generic ClutterAnyEvent type; add
clutter_event_new(), clutter_event_copy() and clutter_event_free();
make ClutterEvent a boxed type.
* clutter-main.h:
* clutter-main.c: Remove clutter_stage(); add clutter_main_quit(),
for cleanly quitting from clutter_main(); add multiple mainloops
support; allocate the ClutterCntx instead of adding it to the
stack; re-work the ClutterEvent dispatching.
* clutter-group.c (clutter_group_add), (clutter_group_remove): Keep
a reference on the element when added to a ClutterGroup.
* examples/rects.py
* examples/test.c:
* examples/test-text.c:
* examples/video-cube.c:
* examples/super-oh.c:
* examples/test-video.c: Update.
2006-06-05 09:38:31 -04:00
|
|
|
#include "config.h"
|
|
|
|
|
2007-03-22 14:21:59 -04:00
|
|
|
#include "clutter-backend.h"
|
2006-05-29 04:59:36 -04:00
|
|
|
#include "clutter-stage.h"
|
|
|
|
#include "clutter-main.h"
|
|
|
|
#include "clutter-color.h"
|
2006-06-15 18:04:19 -04:00
|
|
|
#include "clutter-util.h"
|
2006-06-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter-color.h:
* clutter-color.c: Reimplement ClutterColor as a boxed type;
add convenience API for color handling, like: add, subtract,
shade, HSL color-space conversion, packing and unpacking.
* clutter-private.h: Update ClutterMainContext, and export the
main context pointer here.
* clutter-rectangle.h:
* clutter-rectangle.c: Update the color-related code; make
clutter_rectangle_new() and empty constructor and provide
clutter_rectangle_new_with_color(); provide color setter
and getter API.
* clutter-label.h:
* clutter-label.c: Rename the "font" property to "font-name";
update the color-related code to the new ClutterColor object;
rename clutter_label_new() to clutter_label_new_with_text(),
and add setters and getters for the properties.
* clutter-marshal.list: Add VOID:OBJECT and VOID:BOXED marshallers
generators.
* clutter-stage.h:
* clutter-stage.c: Rework the API: provide a default constructor
for a singleton object, named clutter_stage_get_default(), which
supercedes the clutter_stage() function in clutter-main; provide
new events: button-press-event, button-release-event,
key-press-event and key-release-event; update the color-related
code;
(clutter_stage_snapshot): Allow negative width and height when
taking a snapshot (meaning: use full width/height).
(clutter_stage_get_element_at_pos): Rename clutter_stage_pick().
* clutter-element.c (clutter_element_paint): Clean up the
stage and color related code.
* clutter-event.h:
* clutter-event.c: Add generic ClutterAnyEvent type; add
clutter_event_new(), clutter_event_copy() and clutter_event_free();
make ClutterEvent a boxed type.
* clutter-main.h:
* clutter-main.c: Remove clutter_stage(); add clutter_main_quit(),
for cleanly quitting from clutter_main(); add multiple mainloops
support; allocate the ClutterCntx instead of adding it to the
stack; re-work the ClutterEvent dispatching.
* clutter-group.c (clutter_group_add), (clutter_group_remove): Keep
a reference on the element when added to a ClutterGroup.
* examples/rects.py
* examples/test.c:
* examples/test-text.c:
* examples/video-cube.c:
* examples/super-oh.c:
* examples/test-video.c: Update.
2006-06-05 09:38:31 -04:00
|
|
|
#include "clutter-marshal.h"
|
|
|
|
#include "clutter-enum-types.h"
|
2006-11-21 Emmanuele Bassi <ebassi@openedhand.com>
* configure.ac: Enable debug messages also when
--enable-debug is set to "minimum".
* clutter/Makefile.am:
* clutter/clutter-debug.h: Move all debugging macros inside
this private header; make all debug macros depend on the
CLUTTER_ENABLE_DEBUG compile time define, controlled by
the --enable-debug configure switch; add G_LOG_DOMAIN define.
* clutter/clutter-main.c: Clean up the debug stuff; add
command line argument parsing using GOption; the debug
messages now are triggered like this:
CLUTTER_DEBUG=section:section:... clutter-app
or like this:
clutter-app --clutter-debug=section:section:...
where "section" is one of the sections listed in clutter-main.c,
or "all", for all sections; each section is bound to a flag,
which can be used to define a domain when adding a debug note
using the CLUTTER_NOTE() macro; the old CLUTTER_DBG() macro is
just a wrapper around that, under the CLUTTER_DEBUG_MISC domain;
CLUTTER_NOTE() is used like this:
CLUTTER_NOTE (DOMAIN, log-function);
where log function is g_printerr(), g_message(), g_warning(),
g_critical() or directly g_log() - for instance:
CLUTTER_NOTE (PANGO, g_warning ("Cache miss: %d", glyph));
will print the warning only if the "pango" flag has been
set to the CLUTTER_DEBUG envvar or passed to the --clutter-debug
command line argument.
similar to CLUTTER_SHOW_FPS, there's also the --clutter-show-fps
command line switch; also, the --display and --screen command
line switches have been added: the first overrides the DISPLAY
envvar and the second controls the X screen used by Clutter to
get the root window on the display.
* clutter/clutter-main.h:
* clutter/clutter-main.c: Add extended support for GOption
in Clutter; use clutter_init_with_args() to let Clutter
parse your own command line arguments; use instead
clutter_get_option_group() to get the GOptionGroup used by
Clutter if you want to do the parsing yourself with
g_option_context_parse(). The init sequence has been verified,
updated and moved into common functions where possible.
* clutter/pango/pangoclutter-render.c:
* clutter/*.c: Include "clutter-debug.h" where needed; use
CLUTTER_NOTE() instead of CLUTTER_DBG().
* examples/super-oh.c: Use the new clutter_init_with_args()
function, and add a --num-hands command line switch to
the SuperOH example code controlling the number of hands at
runtime.
2006-11-21 16:27:53 -05:00
|
|
|
#include "clutter-private.h"
|
|
|
|
#include "clutter-debug.h"
|
2007-02-13 18:31:57 -05:00
|
|
|
#include "clutter-version.h" /* For flavour */
|
2006-05-29 04:59:36 -04:00
|
|
|
|
2007-04-27 17:13:06 -04:00
|
|
|
#include "cogl.h"
|
2007-03-25 07:47:30 -04:00
|
|
|
|
2006-06-08 17:28:05 -04:00
|
|
|
#include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
|
|
|
|
|
2007-03-22 14:21:59 -04:00
|
|
|
G_DEFINE_ABSTRACT_TYPE (ClutterStage, clutter_stage, CLUTTER_TYPE_GROUP);
|
2006-05-29 04:59:36 -04:00
|
|
|
|
2006-06-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter-color.h:
* clutter-color.c: Reimplement ClutterColor as a boxed type;
add convenience API for color handling, like: add, subtract,
shade, HSL color-space conversion, packing and unpacking.
* clutter-private.h: Update ClutterMainContext, and export the
main context pointer here.
* clutter-rectangle.h:
* clutter-rectangle.c: Update the color-related code; make
clutter_rectangle_new() and empty constructor and provide
clutter_rectangle_new_with_color(); provide color setter
and getter API.
* clutter-label.h:
* clutter-label.c: Rename the "font" property to "font-name";
update the color-related code to the new ClutterColor object;
rename clutter_label_new() to clutter_label_new_with_text(),
and add setters and getters for the properties.
* clutter-marshal.list: Add VOID:OBJECT and VOID:BOXED marshallers
generators.
* clutter-stage.h:
* clutter-stage.c: Rework the API: provide a default constructor
for a singleton object, named clutter_stage_get_default(), which
supercedes the clutter_stage() function in clutter-main; provide
new events: button-press-event, button-release-event,
key-press-event and key-release-event; update the color-related
code;
(clutter_stage_snapshot): Allow negative width and height when
taking a snapshot (meaning: use full width/height).
(clutter_stage_get_element_at_pos): Rename clutter_stage_pick().
* clutter-element.c (clutter_element_paint): Clean up the
stage and color related code.
* clutter-event.h:
* clutter-event.c: Add generic ClutterAnyEvent type; add
clutter_event_new(), clutter_event_copy() and clutter_event_free();
make ClutterEvent a boxed type.
* clutter-main.h:
* clutter-main.c: Remove clutter_stage(); add clutter_main_quit(),
for cleanly quitting from clutter_main(); add multiple mainloops
support; allocate the ClutterCntx instead of adding it to the
stack; re-work the ClutterEvent dispatching.
* clutter-group.c (clutter_group_add), (clutter_group_remove): Keep
a reference on the element when added to a ClutterGroup.
* examples/rects.py
* examples/test.c:
* examples/test-text.c:
* examples/video-cube.c:
* examples/super-oh.c:
* examples/test-video.c: Update.
2006-06-05 09:38:31 -04:00
|
|
|
#define CLUTTER_STAGE_GET_PRIVATE(obj) \
|
|
|
|
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), CLUTTER_TYPE_STAGE, ClutterStagePrivate))
|
2006-05-29 04:59:36 -04:00
|
|
|
|
2006-06-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter-color.h:
* clutter-color.c: Reimplement ClutterColor as a boxed type;
add convenience API for color handling, like: add, subtract,
shade, HSL color-space conversion, packing and unpacking.
* clutter-private.h: Update ClutterMainContext, and export the
main context pointer here.
* clutter-rectangle.h:
* clutter-rectangle.c: Update the color-related code; make
clutter_rectangle_new() and empty constructor and provide
clutter_rectangle_new_with_color(); provide color setter
and getter API.
* clutter-label.h:
* clutter-label.c: Rename the "font" property to "font-name";
update the color-related code to the new ClutterColor object;
rename clutter_label_new() to clutter_label_new_with_text(),
and add setters and getters for the properties.
* clutter-marshal.list: Add VOID:OBJECT and VOID:BOXED marshallers
generators.
* clutter-stage.h:
* clutter-stage.c: Rework the API: provide a default constructor
for a singleton object, named clutter_stage_get_default(), which
supercedes the clutter_stage() function in clutter-main; provide
new events: button-press-event, button-release-event,
key-press-event and key-release-event; update the color-related
code;
(clutter_stage_snapshot): Allow negative width and height when
taking a snapshot (meaning: use full width/height).
(clutter_stage_get_element_at_pos): Rename clutter_stage_pick().
* clutter-element.c (clutter_element_paint): Clean up the
stage and color related code.
* clutter-event.h:
* clutter-event.c: Add generic ClutterAnyEvent type; add
clutter_event_new(), clutter_event_copy() and clutter_event_free();
make ClutterEvent a boxed type.
* clutter-main.h:
* clutter-main.c: Remove clutter_stage(); add clutter_main_quit(),
for cleanly quitting from clutter_main(); add multiple mainloops
support; allocate the ClutterCntx instead of adding it to the
stack; re-work the ClutterEvent dispatching.
* clutter-group.c (clutter_group_add), (clutter_group_remove): Keep
a reference on the element when added to a ClutterGroup.
* examples/rects.py
* examples/test.c:
* examples/test-text.c:
* examples/video-cube.c:
* examples/super-oh.c:
* examples/test-video.c: Update.
2006-06-05 09:38:31 -04:00
|
|
|
struct _ClutterStagePrivate
|
2006-05-29 04:59:36 -04:00
|
|
|
{
|
2007-05-25 06:56:09 -04:00
|
|
|
ClutterColor color;
|
|
|
|
ClutterPerspective perspective;
|
2007-03-22 14:21:59 -04:00
|
|
|
|
|
|
|
guint is_fullscreen : 1;
|
|
|
|
guint is_offscreen : 1;
|
|
|
|
guint is_cursor_visible : 1;
|
2007-06-19 05:10:37 -04:00
|
|
|
|
|
|
|
gchar *title;
|
2006-05-29 04:59:36 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
PROP_0,
|
2006-06-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter-color.h:
* clutter-color.c: Reimplement ClutterColor as a boxed type;
add convenience API for color handling, like: add, subtract,
shade, HSL color-space conversion, packing and unpacking.
* clutter-private.h: Update ClutterMainContext, and export the
main context pointer here.
* clutter-rectangle.h:
* clutter-rectangle.c: Update the color-related code; make
clutter_rectangle_new() and empty constructor and provide
clutter_rectangle_new_with_color(); provide color setter
and getter API.
* clutter-label.h:
* clutter-label.c: Rename the "font" property to "font-name";
update the color-related code to the new ClutterColor object;
rename clutter_label_new() to clutter_label_new_with_text(),
and add setters and getters for the properties.
* clutter-marshal.list: Add VOID:OBJECT and VOID:BOXED marshallers
generators.
* clutter-stage.h:
* clutter-stage.c: Rework the API: provide a default constructor
for a singleton object, named clutter_stage_get_default(), which
supercedes the clutter_stage() function in clutter-main; provide
new events: button-press-event, button-release-event,
key-press-event and key-release-event; update the color-related
code;
(clutter_stage_snapshot): Allow negative width and height when
taking a snapshot (meaning: use full width/height).
(clutter_stage_get_element_at_pos): Rename clutter_stage_pick().
* clutter-element.c (clutter_element_paint): Clean up the
stage and color related code.
* clutter-event.h:
* clutter-event.c: Add generic ClutterAnyEvent type; add
clutter_event_new(), clutter_event_copy() and clutter_event_free();
make ClutterEvent a boxed type.
* clutter-main.h:
* clutter-main.c: Remove clutter_stage(); add clutter_main_quit(),
for cleanly quitting from clutter_main(); add multiple mainloops
support; allocate the ClutterCntx instead of adding it to the
stack; re-work the ClutterEvent dispatching.
* clutter-group.c (clutter_group_add), (clutter_group_remove): Keep
a reference on the element when added to a ClutterGroup.
* examples/rects.py
* examples/test.c:
* examples/test-text.c:
* examples/video-cube.c:
* examples/super-oh.c:
* examples/test-video.c: Update.
2006-06-05 09:38:31 -04:00
|
|
|
|
|
|
|
PROP_COLOR,
|
2006-05-29 04:59:36 -04:00
|
|
|
PROP_FULLSCREEN,
|
2006-06-02 16:24:55 -04:00
|
|
|
PROP_OFFSCREEN,
|
2007-05-25 06:56:09 -04:00
|
|
|
PROP_CURSOR_VISIBLE,
|
|
|
|
PROP_PERSPECTIVE,
|
2007-06-19 05:10:37 -04:00
|
|
|
PROP_TITLE,
|
2006-05-29 04:59:36 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
2007-03-23 05:59:02 -04:00
|
|
|
EVENT,
|
2007-04-25 10:22:24 -04:00
|
|
|
EVENT_AFTER,
|
2006-06-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter-color.h:
* clutter-color.c: Reimplement ClutterColor as a boxed type;
add convenience API for color handling, like: add, subtract,
shade, HSL color-space conversion, packing and unpacking.
* clutter-private.h: Update ClutterMainContext, and export the
main context pointer here.
* clutter-rectangle.h:
* clutter-rectangle.c: Update the color-related code; make
clutter_rectangle_new() and empty constructor and provide
clutter_rectangle_new_with_color(); provide color setter
and getter API.
* clutter-label.h:
* clutter-label.c: Rename the "font" property to "font-name";
update the color-related code to the new ClutterColor object;
rename clutter_label_new() to clutter_label_new_with_text(),
and add setters and getters for the properties.
* clutter-marshal.list: Add VOID:OBJECT and VOID:BOXED marshallers
generators.
* clutter-stage.h:
* clutter-stage.c: Rework the API: provide a default constructor
for a singleton object, named clutter_stage_get_default(), which
supercedes the clutter_stage() function in clutter-main; provide
new events: button-press-event, button-release-event,
key-press-event and key-release-event; update the color-related
code;
(clutter_stage_snapshot): Allow negative width and height when
taking a snapshot (meaning: use full width/height).
(clutter_stage_get_element_at_pos): Rename clutter_stage_pick().
* clutter-element.c (clutter_element_paint): Clean up the
stage and color related code.
* clutter-event.h:
* clutter-event.c: Add generic ClutterAnyEvent type; add
clutter_event_new(), clutter_event_copy() and clutter_event_free();
make ClutterEvent a boxed type.
* clutter-main.h:
* clutter-main.c: Remove clutter_stage(); add clutter_main_quit(),
for cleanly quitting from clutter_main(); add multiple mainloops
support; allocate the ClutterCntx instead of adding it to the
stack; re-work the ClutterEvent dispatching.
* clutter-group.c (clutter_group_add), (clutter_group_remove): Keep
a reference on the element when added to a ClutterGroup.
* examples/rects.py
* examples/test.c:
* examples/test-text.c:
* examples/video-cube.c:
* examples/super-oh.c:
* examples/test-video.c: Update.
2006-06-05 09:38:31 -04:00
|
|
|
BUTTON_PRESS_EVENT,
|
|
|
|
BUTTON_RELEASE_EVENT,
|
2007-03-22 14:21:59 -04:00
|
|
|
SCROLL_EVENT,
|
2006-06-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter-color.h:
* clutter-color.c: Reimplement ClutterColor as a boxed type;
add convenience API for color handling, like: add, subtract,
shade, HSL color-space conversion, packing and unpacking.
* clutter-private.h: Update ClutterMainContext, and export the
main context pointer here.
* clutter-rectangle.h:
* clutter-rectangle.c: Update the color-related code; make
clutter_rectangle_new() and empty constructor and provide
clutter_rectangle_new_with_color(); provide color setter
and getter API.
* clutter-label.h:
* clutter-label.c: Rename the "font" property to "font-name";
update the color-related code to the new ClutterColor object;
rename clutter_label_new() to clutter_label_new_with_text(),
and add setters and getters for the properties.
* clutter-marshal.list: Add VOID:OBJECT and VOID:BOXED marshallers
generators.
* clutter-stage.h:
* clutter-stage.c: Rework the API: provide a default constructor
for a singleton object, named clutter_stage_get_default(), which
supercedes the clutter_stage() function in clutter-main; provide
new events: button-press-event, button-release-event,
key-press-event and key-release-event; update the color-related
code;
(clutter_stage_snapshot): Allow negative width and height when
taking a snapshot (meaning: use full width/height).
(clutter_stage_get_element_at_pos): Rename clutter_stage_pick().
* clutter-element.c (clutter_element_paint): Clean up the
stage and color related code.
* clutter-event.h:
* clutter-event.c: Add generic ClutterAnyEvent type; add
clutter_event_new(), clutter_event_copy() and clutter_event_free();
make ClutterEvent a boxed type.
* clutter-main.h:
* clutter-main.c: Remove clutter_stage(); add clutter_main_quit(),
for cleanly quitting from clutter_main(); add multiple mainloops
support; allocate the ClutterCntx instead of adding it to the
stack; re-work the ClutterEvent dispatching.
* clutter-group.c (clutter_group_add), (clutter_group_remove): Keep
a reference on the element when added to a ClutterGroup.
* examples/rects.py
* examples/test.c:
* examples/test-text.c:
* examples/video-cube.c:
* examples/super-oh.c:
* examples/test-video.c: Update.
2006-06-05 09:38:31 -04:00
|
|
|
KEY_PRESS_EVENT,
|
|
|
|
KEY_RELEASE_EVENT,
|
|
|
|
MOTION_EVENT,
|
2007-03-22 14:21:59 -04:00
|
|
|
STAGE_STATE_EVENT,
|
2006-06-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter-color.h:
* clutter-color.c: Reimplement ClutterColor as a boxed type;
add convenience API for color handling, like: add, subtract,
shade, HSL color-space conversion, packing and unpacking.
* clutter-private.h: Update ClutterMainContext, and export the
main context pointer here.
* clutter-rectangle.h:
* clutter-rectangle.c: Update the color-related code; make
clutter_rectangle_new() and empty constructor and provide
clutter_rectangle_new_with_color(); provide color setter
and getter API.
* clutter-label.h:
* clutter-label.c: Rename the "font" property to "font-name";
update the color-related code to the new ClutterColor object;
rename clutter_label_new() to clutter_label_new_with_text(),
and add setters and getters for the properties.
* clutter-marshal.list: Add VOID:OBJECT and VOID:BOXED marshallers
generators.
* clutter-stage.h:
* clutter-stage.c: Rework the API: provide a default constructor
for a singleton object, named clutter_stage_get_default(), which
supercedes the clutter_stage() function in clutter-main; provide
new events: button-press-event, button-release-event,
key-press-event and key-release-event; update the color-related
code;
(clutter_stage_snapshot): Allow negative width and height when
taking a snapshot (meaning: use full width/height).
(clutter_stage_get_element_at_pos): Rename clutter_stage_pick().
* clutter-element.c (clutter_element_paint): Clean up the
stage and color related code.
* clutter-event.h:
* clutter-event.c: Add generic ClutterAnyEvent type; add
clutter_event_new(), clutter_event_copy() and clutter_event_free();
make ClutterEvent a boxed type.
* clutter-main.h:
* clutter-main.c: Remove clutter_stage(); add clutter_main_quit(),
for cleanly quitting from clutter_main(); add multiple mainloops
support; allocate the ClutterCntx instead of adding it to the
stack; re-work the ClutterEvent dispatching.
* clutter-group.c (clutter_group_add), (clutter_group_remove): Keep
a reference on the element when added to a ClutterGroup.
* examples/rects.py
* examples/test.c:
* examples/test-text.c:
* examples/video-cube.c:
* examples/super-oh.c:
* examples/test-video.c: Update.
2006-06-05 09:38:31 -04:00
|
|
|
|
2006-05-29 04:59:36 -04:00
|
|
|
LAST_SIGNAL
|
|
|
|
};
|
|
|
|
|
2007-04-25 10:22:24 -04:00
|
|
|
static guint stage_signals[LAST_SIGNAL] = { 0, };
|
2006-06-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter-color.h:
* clutter-color.c: Reimplement ClutterColor as a boxed type;
add convenience API for color handling, like: add, subtract,
shade, HSL color-space conversion, packing and unpacking.
* clutter-private.h: Update ClutterMainContext, and export the
main context pointer here.
* clutter-rectangle.h:
* clutter-rectangle.c: Update the color-related code; make
clutter_rectangle_new() and empty constructor and provide
clutter_rectangle_new_with_color(); provide color setter
and getter API.
* clutter-label.h:
* clutter-label.c: Rename the "font" property to "font-name";
update the color-related code to the new ClutterColor object;
rename clutter_label_new() to clutter_label_new_with_text(),
and add setters and getters for the properties.
* clutter-marshal.list: Add VOID:OBJECT and VOID:BOXED marshallers
generators.
* clutter-stage.h:
* clutter-stage.c: Rework the API: provide a default constructor
for a singleton object, named clutter_stage_get_default(), which
supercedes the clutter_stage() function in clutter-main; provide
new events: button-press-event, button-release-event,
key-press-event and key-release-event; update the color-related
code;
(clutter_stage_snapshot): Allow negative width and height when
taking a snapshot (meaning: use full width/height).
(clutter_stage_get_element_at_pos): Rename clutter_stage_pick().
* clutter-element.c (clutter_element_paint): Clean up the
stage and color related code.
* clutter-event.h:
* clutter-event.c: Add generic ClutterAnyEvent type; add
clutter_event_new(), clutter_event_copy() and clutter_event_free();
make ClutterEvent a boxed type.
* clutter-main.h:
* clutter-main.c: Remove clutter_stage(); add clutter_main_quit(),
for cleanly quitting from clutter_main(); add multiple mainloops
support; allocate the ClutterCntx instead of adding it to the
stack; re-work the ClutterEvent dispatching.
* clutter-group.c (clutter_group_add), (clutter_group_remove): Keep
a reference on the element when added to a ClutterGroup.
* examples/rects.py
* examples/test.c:
* examples/test-text.c:
* examples/video-cube.c:
* examples/super-oh.c:
* examples/test-video.c: Update.
2006-06-05 09:38:31 -04:00
|
|
|
|
2007-03-23 12:37:56 -04:00
|
|
|
static void
|
2007-05-28 14:49:34 -04:00
|
|
|
clutter_stage_paint (ClutterActor *self)
|
2007-03-23 12:37:56 -04:00
|
|
|
{
|
2007-07-04 05:36:44 -04:00
|
|
|
ClutterStagePrivate *priv = CLUTTER_STAGE (self)->priv;
|
|
|
|
|
|
|
|
cogl_paint_init (&priv->color);
|
|
|
|
|
2007-05-28 14:49:34 -04:00
|
|
|
CLUTTER_ACTOR_CLASS (clutter_stage_parent_class)->paint (self);
|
2007-03-23 12:37:56 -04:00
|
|
|
}
|
|
|
|
|
2006-05-29 04:59:36 -04:00
|
|
|
static void
|
|
|
|
clutter_stage_set_property (GObject *object,
|
|
|
|
guint prop_id,
|
|
|
|
const GValue *value,
|
|
|
|
GParamSpec *pspec)
|
|
|
|
{
|
2007-05-25 06:56:09 -04:00
|
|
|
ClutterStage *stage;
|
2006-05-29 04:59:36 -04:00
|
|
|
ClutterStagePrivate *priv;
|
2007-05-25 06:56:09 -04:00
|
|
|
ClutterActor *actor;
|
2006-05-29 04:59:36 -04:00
|
|
|
|
2007-03-22 14:21:59 -04:00
|
|
|
stage = CLUTTER_STAGE (object);
|
|
|
|
actor = CLUTTER_ACTOR (stage);
|
2006-05-29 04:59:36 -04:00
|
|
|
priv = stage->priv;
|
|
|
|
|
|
|
|
switch (prop_id)
|
|
|
|
{
|
2006-06-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter-color.h:
* clutter-color.c: Reimplement ClutterColor as a boxed type;
add convenience API for color handling, like: add, subtract,
shade, HSL color-space conversion, packing and unpacking.
* clutter-private.h: Update ClutterMainContext, and export the
main context pointer here.
* clutter-rectangle.h:
* clutter-rectangle.c: Update the color-related code; make
clutter_rectangle_new() and empty constructor and provide
clutter_rectangle_new_with_color(); provide color setter
and getter API.
* clutter-label.h:
* clutter-label.c: Rename the "font" property to "font-name";
update the color-related code to the new ClutterColor object;
rename clutter_label_new() to clutter_label_new_with_text(),
and add setters and getters for the properties.
* clutter-marshal.list: Add VOID:OBJECT and VOID:BOXED marshallers
generators.
* clutter-stage.h:
* clutter-stage.c: Rework the API: provide a default constructor
for a singleton object, named clutter_stage_get_default(), which
supercedes the clutter_stage() function in clutter-main; provide
new events: button-press-event, button-release-event,
key-press-event and key-release-event; update the color-related
code;
(clutter_stage_snapshot): Allow negative width and height when
taking a snapshot (meaning: use full width/height).
(clutter_stage_get_element_at_pos): Rename clutter_stage_pick().
* clutter-element.c (clutter_element_paint): Clean up the
stage and color related code.
* clutter-event.h:
* clutter-event.c: Add generic ClutterAnyEvent type; add
clutter_event_new(), clutter_event_copy() and clutter_event_free();
make ClutterEvent a boxed type.
* clutter-main.h:
* clutter-main.c: Remove clutter_stage(); add clutter_main_quit(),
for cleanly quitting from clutter_main(); add multiple mainloops
support; allocate the ClutterCntx instead of adding it to the
stack; re-work the ClutterEvent dispatching.
* clutter-group.c (clutter_group_add), (clutter_group_remove): Keep
a reference on the element when added to a ClutterGroup.
* examples/rects.py
* examples/test.c:
* examples/test-text.c:
* examples/video-cube.c:
* examples/super-oh.c:
* examples/test-video.c: Update.
2006-06-05 09:38:31 -04:00
|
|
|
case PROP_COLOR:
|
|
|
|
clutter_stage_set_color (stage, g_value_get_boxed (value));
|
|
|
|
break;
|
2006-06-02 16:24:55 -04:00
|
|
|
case PROP_OFFSCREEN:
|
2007-05-25 06:56:09 -04:00
|
|
|
if (priv->is_offscreen == g_value_get_boolean (value))
|
|
|
|
return;
|
|
|
|
|
2007-03-22 14:21:59 -04:00
|
|
|
if (CLUTTER_ACTOR_IS_REALIZED (actor))
|
|
|
|
{
|
|
|
|
clutter_actor_unrealize (actor);
|
|
|
|
priv->is_offscreen = g_value_get_boolean (value);
|
|
|
|
clutter_actor_realize (actor);
|
2007-05-25 06:56:09 -04:00
|
|
|
|
|
|
|
if (!CLUTTER_ACTOR_IS_REALIZED (actor))
|
|
|
|
priv->is_offscreen = ~g_value_get_boolean (value);
|
2007-03-22 14:21:59 -04:00
|
|
|
}
|
|
|
|
else
|
|
|
|
priv->is_offscreen = g_value_get_boolean (value);
|
2006-06-02 16:24:55 -04:00
|
|
|
break;
|
2006-05-29 04:59:36 -04:00
|
|
|
case PROP_FULLSCREEN:
|
2007-03-22 14:21:59 -04:00
|
|
|
if (g_value_get_boolean (value))
|
|
|
|
clutter_stage_fullscreen (stage);
|
|
|
|
else
|
|
|
|
clutter_stage_unfullscreen (stage);
|
2006-05-29 04:59:36 -04:00
|
|
|
break;
|
2007-03-22 14:21:59 -04:00
|
|
|
case PROP_CURSOR_VISIBLE:
|
|
|
|
if (g_value_get_boolean (value))
|
|
|
|
clutter_stage_show_cursor (stage);
|
|
|
|
else
|
|
|
|
clutter_stage_hide_cursor (stage);
|
2006-05-29 04:59:36 -04:00
|
|
|
break;
|
2007-05-25 06:56:09 -04:00
|
|
|
case PROP_PERSPECTIVE:
|
|
|
|
clutter_stage_set_perspectivex (stage, g_value_get_boxed (value));
|
|
|
|
break;
|
2007-06-19 05:10:37 -04:00
|
|
|
case PROP_TITLE:
|
|
|
|
clutter_stage_set_title (stage, g_value_get_string (value));
|
|
|
|
break;
|
2006-05-29 04:59:36 -04:00
|
|
|
default:
|
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
clutter_stage_get_property (GObject *object,
|
2007-05-16 05:08:30 -04:00
|
|
|
guint prop_id,
|
|
|
|
GValue *value,
|
|
|
|
GParamSpec *pspec)
|
2006-05-29 04:59:36 -04:00
|
|
|
{
|
|
|
|
ClutterStage *stage;
|
|
|
|
ClutterStagePrivate *priv;
|
2006-06-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter-color.h:
* clutter-color.c: Reimplement ClutterColor as a boxed type;
add convenience API for color handling, like: add, subtract,
shade, HSL color-space conversion, packing and unpacking.
* clutter-private.h: Update ClutterMainContext, and export the
main context pointer here.
* clutter-rectangle.h:
* clutter-rectangle.c: Update the color-related code; make
clutter_rectangle_new() and empty constructor and provide
clutter_rectangle_new_with_color(); provide color setter
and getter API.
* clutter-label.h:
* clutter-label.c: Rename the "font" property to "font-name";
update the color-related code to the new ClutterColor object;
rename clutter_label_new() to clutter_label_new_with_text(),
and add setters and getters for the properties.
* clutter-marshal.list: Add VOID:OBJECT and VOID:BOXED marshallers
generators.
* clutter-stage.h:
* clutter-stage.c: Rework the API: provide a default constructor
for a singleton object, named clutter_stage_get_default(), which
supercedes the clutter_stage() function in clutter-main; provide
new events: button-press-event, button-release-event,
key-press-event and key-release-event; update the color-related
code;
(clutter_stage_snapshot): Allow negative width and height when
taking a snapshot (meaning: use full width/height).
(clutter_stage_get_element_at_pos): Rename clutter_stage_pick().
* clutter-element.c (clutter_element_paint): Clean up the
stage and color related code.
* clutter-event.h:
* clutter-event.c: Add generic ClutterAnyEvent type; add
clutter_event_new(), clutter_event_copy() and clutter_event_free();
make ClutterEvent a boxed type.
* clutter-main.h:
* clutter-main.c: Remove clutter_stage(); add clutter_main_quit(),
for cleanly quitting from clutter_main(); add multiple mainloops
support; allocate the ClutterCntx instead of adding it to the
stack; re-work the ClutterEvent dispatching.
* clutter-group.c (clutter_group_add), (clutter_group_remove): Keep
a reference on the element when added to a ClutterGroup.
* examples/rects.py
* examples/test.c:
* examples/test-text.c:
* examples/video-cube.c:
* examples/super-oh.c:
* examples/test-video.c: Update.
2006-06-05 09:38:31 -04:00
|
|
|
ClutterColor color;
|
2007-05-25 06:56:09 -04:00
|
|
|
ClutterPerspective perspective;
|
2006-05-29 04:59:36 -04:00
|
|
|
|
|
|
|
stage = CLUTTER_STAGE(object);
|
|
|
|
priv = stage->priv;
|
|
|
|
|
|
|
|
switch (prop_id)
|
|
|
|
{
|
2006-06-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter-color.h:
* clutter-color.c: Reimplement ClutterColor as a boxed type;
add convenience API for color handling, like: add, subtract,
shade, HSL color-space conversion, packing and unpacking.
* clutter-private.h: Update ClutterMainContext, and export the
main context pointer here.
* clutter-rectangle.h:
* clutter-rectangle.c: Update the color-related code; make
clutter_rectangle_new() and empty constructor and provide
clutter_rectangle_new_with_color(); provide color setter
and getter API.
* clutter-label.h:
* clutter-label.c: Rename the "font" property to "font-name";
update the color-related code to the new ClutterColor object;
rename clutter_label_new() to clutter_label_new_with_text(),
and add setters and getters for the properties.
* clutter-marshal.list: Add VOID:OBJECT and VOID:BOXED marshallers
generators.
* clutter-stage.h:
* clutter-stage.c: Rework the API: provide a default constructor
for a singleton object, named clutter_stage_get_default(), which
supercedes the clutter_stage() function in clutter-main; provide
new events: button-press-event, button-release-event,
key-press-event and key-release-event; update the color-related
code;
(clutter_stage_snapshot): Allow negative width and height when
taking a snapshot (meaning: use full width/height).
(clutter_stage_get_element_at_pos): Rename clutter_stage_pick().
* clutter-element.c (clutter_element_paint): Clean up the
stage and color related code.
* clutter-event.h:
* clutter-event.c: Add generic ClutterAnyEvent type; add
clutter_event_new(), clutter_event_copy() and clutter_event_free();
make ClutterEvent a boxed type.
* clutter-main.h:
* clutter-main.c: Remove clutter_stage(); add clutter_main_quit(),
for cleanly quitting from clutter_main(); add multiple mainloops
support; allocate the ClutterCntx instead of adding it to the
stack; re-work the ClutterEvent dispatching.
* clutter-group.c (clutter_group_add), (clutter_group_remove): Keep
a reference on the element when added to a ClutterGroup.
* examples/rects.py
* examples/test.c:
* examples/test-text.c:
* examples/video-cube.c:
* examples/super-oh.c:
* examples/test-video.c: Update.
2006-06-05 09:38:31 -04:00
|
|
|
case PROP_COLOR:
|
|
|
|
clutter_stage_get_color (stage, &color);
|
|
|
|
g_value_set_boxed (value, &color);
|
|
|
|
break;
|
2006-06-02 16:24:55 -04:00
|
|
|
case PROP_OFFSCREEN:
|
2007-03-22 14:21:59 -04:00
|
|
|
g_value_set_boolean (value, priv->is_offscreen);
|
2006-06-02 16:24:55 -04:00
|
|
|
break;
|
2006-05-29 04:59:36 -04:00
|
|
|
case PROP_FULLSCREEN:
|
2007-03-22 14:21:59 -04:00
|
|
|
g_value_set_boolean (value, priv->is_fullscreen);
|
2006-05-29 04:59:36 -04:00
|
|
|
break;
|
2007-03-22 14:21:59 -04:00
|
|
|
case PROP_CURSOR_VISIBLE:
|
|
|
|
g_value_set_boolean (value, priv->is_cursor_visible);
|
2006-05-29 04:59:36 -04:00
|
|
|
break;
|
2007-05-25 06:56:09 -04:00
|
|
|
case PROP_PERSPECTIVE:
|
|
|
|
clutter_stage_get_perspectivex (stage, &perspective);
|
|
|
|
g_value_set_boxed (value, &perspective);
|
|
|
|
break;
|
2007-06-19 05:10:37 -04:00
|
|
|
case PROP_TITLE:
|
|
|
|
g_value_set_string (value, priv->title);
|
|
|
|
break;
|
2006-05-29 04:59:36 -04:00
|
|
|
default:
|
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
clutter_stage_class_init (ClutterStageClass *klass)
|
|
|
|
{
|
2007-03-22 14:21:59 -04:00
|
|
|
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
2007-03-23 12:37:56 -04:00
|
|
|
ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass);
|
2006-05-29 04:59:36 -04:00
|
|
|
|
|
|
|
gobject_class->set_property = clutter_stage_set_property;
|
|
|
|
gobject_class->get_property = clutter_stage_get_property;
|
2007-03-22 14:21:59 -04:00
|
|
|
|
2007-03-23 12:37:56 -04:00
|
|
|
actor_class->paint = clutter_stage_paint;
|
|
|
|
|
2006-06-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter-color.h:
* clutter-color.c: Reimplement ClutterColor as a boxed type;
add convenience API for color handling, like: add, subtract,
shade, HSL color-space conversion, packing and unpacking.
* clutter-private.h: Update ClutterMainContext, and export the
main context pointer here.
* clutter-rectangle.h:
* clutter-rectangle.c: Update the color-related code; make
clutter_rectangle_new() and empty constructor and provide
clutter_rectangle_new_with_color(); provide color setter
and getter API.
* clutter-label.h:
* clutter-label.c: Rename the "font" property to "font-name";
update the color-related code to the new ClutterColor object;
rename clutter_label_new() to clutter_label_new_with_text(),
and add setters and getters for the properties.
* clutter-marshal.list: Add VOID:OBJECT and VOID:BOXED marshallers
generators.
* clutter-stage.h:
* clutter-stage.c: Rework the API: provide a default constructor
for a singleton object, named clutter_stage_get_default(), which
supercedes the clutter_stage() function in clutter-main; provide
new events: button-press-event, button-release-event,
key-press-event and key-release-event; update the color-related
code;
(clutter_stage_snapshot): Allow negative width and height when
taking a snapshot (meaning: use full width/height).
(clutter_stage_get_element_at_pos): Rename clutter_stage_pick().
* clutter-element.c (clutter_element_paint): Clean up the
stage and color related code.
* clutter-event.h:
* clutter-event.c: Add generic ClutterAnyEvent type; add
clutter_event_new(), clutter_event_copy() and clutter_event_free();
make ClutterEvent a boxed type.
* clutter-main.h:
* clutter-main.c: Remove clutter_stage(); add clutter_main_quit(),
for cleanly quitting from clutter_main(); add multiple mainloops
support; allocate the ClutterCntx instead of adding it to the
stack; re-work the ClutterEvent dispatching.
* clutter-group.c (clutter_group_add), (clutter_group_remove): Keep
a reference on the element when added to a ClutterGroup.
* examples/rects.py
* examples/test.c:
* examples/test-text.c:
* examples/video-cube.c:
* examples/super-oh.c:
* examples/test-video.c: Update.
2006-06-05 09:38:31 -04:00
|
|
|
/**
|
|
|
|
* ClutterStage:fullscreen
|
|
|
|
*
|
|
|
|
* Whether the stage should be fullscreen or not.
|
|
|
|
*/
|
2006-05-29 04:59:36 -04:00
|
|
|
g_object_class_install_property
|
|
|
|
(gobject_class, PROP_FULLSCREEN,
|
|
|
|
g_param_spec_boolean ("fullscreen",
|
|
|
|
"Fullscreen",
|
2007-03-22 14:21:59 -04:00
|
|
|
"Whether the main stage is fullscreen",
|
2006-05-29 04:59:36 -04:00
|
|
|
FALSE,
|
2006-12-04 11:26:35 -05:00
|
|
|
G_PARAM_CONSTRUCT | CLUTTER_PARAM_READWRITE));
|
2006-05-29 04:59:36 -04:00
|
|
|
|
2006-06-02 16:24:55 -04:00
|
|
|
g_object_class_install_property
|
|
|
|
(gobject_class, PROP_OFFSCREEN,
|
|
|
|
g_param_spec_boolean ("offscreen",
|
|
|
|
"Offscreen",
|
2007-03-22 14:21:59 -04:00
|
|
|
"Whether the main stage is renderer offscreen",
|
2006-06-02 16:24:55 -04:00
|
|
|
FALSE,
|
2006-12-04 11:26:35 -05:00
|
|
|
G_PARAM_CONSTRUCT | CLUTTER_PARAM_READWRITE));
|
2006-06-02 16:24:55 -04:00
|
|
|
|
|
|
|
|
2006-05-29 04:59:36 -04:00
|
|
|
g_object_class_install_property
|
2007-03-22 14:21:59 -04:00
|
|
|
(gobject_class, PROP_CURSOR_VISIBLE,
|
|
|
|
g_param_spec_boolean ("cursor-visible",
|
|
|
|
"Cursor Visible",
|
|
|
|
"Whether the mouse pointer is visible on the main stage ",
|
2007-07-09 18:59:52 -04:00
|
|
|
TRUE,
|
2006-12-04 11:26:35 -05:00
|
|
|
G_PARAM_CONSTRUCT | CLUTTER_PARAM_READWRITE));
|
2006-05-29 04:59:36 -04:00
|
|
|
|
2006-06-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter-color.h:
* clutter-color.c: Reimplement ClutterColor as a boxed type;
add convenience API for color handling, like: add, subtract,
shade, HSL color-space conversion, packing and unpacking.
* clutter-private.h: Update ClutterMainContext, and export the
main context pointer here.
* clutter-rectangle.h:
* clutter-rectangle.c: Update the color-related code; make
clutter_rectangle_new() and empty constructor and provide
clutter_rectangle_new_with_color(); provide color setter
and getter API.
* clutter-label.h:
* clutter-label.c: Rename the "font" property to "font-name";
update the color-related code to the new ClutterColor object;
rename clutter_label_new() to clutter_label_new_with_text(),
and add setters and getters for the properties.
* clutter-marshal.list: Add VOID:OBJECT and VOID:BOXED marshallers
generators.
* clutter-stage.h:
* clutter-stage.c: Rework the API: provide a default constructor
for a singleton object, named clutter_stage_get_default(), which
supercedes the clutter_stage() function in clutter-main; provide
new events: button-press-event, button-release-event,
key-press-event and key-release-event; update the color-related
code;
(clutter_stage_snapshot): Allow negative width and height when
taking a snapshot (meaning: use full width/height).
(clutter_stage_get_element_at_pos): Rename clutter_stage_pick().
* clutter-element.c (clutter_element_paint): Clean up the
stage and color related code.
* clutter-event.h:
* clutter-event.c: Add generic ClutterAnyEvent type; add
clutter_event_new(), clutter_event_copy() and clutter_event_free();
make ClutterEvent a boxed type.
* clutter-main.h:
* clutter-main.c: Remove clutter_stage(); add clutter_main_quit(),
for cleanly quitting from clutter_main(); add multiple mainloops
support; allocate the ClutterCntx instead of adding it to the
stack; re-work the ClutterEvent dispatching.
* clutter-group.c (clutter_group_add), (clutter_group_remove): Keep
a reference on the element when added to a ClutterGroup.
* examples/rects.py
* examples/test.c:
* examples/test-text.c:
* examples/video-cube.c:
* examples/super-oh.c:
* examples/test-video.c: Update.
2006-06-05 09:38:31 -04:00
|
|
|
g_object_class_install_property
|
|
|
|
(gobject_class, PROP_COLOR,
|
|
|
|
g_param_spec_boxed ("color",
|
|
|
|
"Color",
|
2007-03-22 14:21:59 -04:00
|
|
|
"The color of the main stage",
|
2006-06-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter-color.h:
* clutter-color.c: Reimplement ClutterColor as a boxed type;
add convenience API for color handling, like: add, subtract,
shade, HSL color-space conversion, packing and unpacking.
* clutter-private.h: Update ClutterMainContext, and export the
main context pointer here.
* clutter-rectangle.h:
* clutter-rectangle.c: Update the color-related code; make
clutter_rectangle_new() and empty constructor and provide
clutter_rectangle_new_with_color(); provide color setter
and getter API.
* clutter-label.h:
* clutter-label.c: Rename the "font" property to "font-name";
update the color-related code to the new ClutterColor object;
rename clutter_label_new() to clutter_label_new_with_text(),
and add setters and getters for the properties.
* clutter-marshal.list: Add VOID:OBJECT and VOID:BOXED marshallers
generators.
* clutter-stage.h:
* clutter-stage.c: Rework the API: provide a default constructor
for a singleton object, named clutter_stage_get_default(), which
supercedes the clutter_stage() function in clutter-main; provide
new events: button-press-event, button-release-event,
key-press-event and key-release-event; update the color-related
code;
(clutter_stage_snapshot): Allow negative width and height when
taking a snapshot (meaning: use full width/height).
(clutter_stage_get_element_at_pos): Rename clutter_stage_pick().
* clutter-element.c (clutter_element_paint): Clean up the
stage and color related code.
* clutter-event.h:
* clutter-event.c: Add generic ClutterAnyEvent type; add
clutter_event_new(), clutter_event_copy() and clutter_event_free();
make ClutterEvent a boxed type.
* clutter-main.h:
* clutter-main.c: Remove clutter_stage(); add clutter_main_quit(),
for cleanly quitting from clutter_main(); add multiple mainloops
support; allocate the ClutterCntx instead of adding it to the
stack; re-work the ClutterEvent dispatching.
* clutter-group.c (clutter_group_add), (clutter_group_remove): Keep
a reference on the element when added to a ClutterGroup.
* examples/rects.py
* examples/test.c:
* examples/test-text.c:
* examples/video-cube.c:
* examples/super-oh.c:
* examples/test-video.c: Update.
2006-06-05 09:38:31 -04:00
|
|
|
CLUTTER_TYPE_COLOR,
|
2006-12-04 11:26:35 -05:00
|
|
|
CLUTTER_PARAM_READWRITE));
|
2007-06-19 05:10:37 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* ClutterStage:title:
|
|
|
|
*
|
|
|
|
* The stages title - usually displayed in stage windows title decorations.
|
|
|
|
*
|
|
|
|
* Since: 0.4
|
|
|
|
*/
|
|
|
|
g_object_class_install_property
|
|
|
|
(gobject_class, PROP_TITLE,
|
|
|
|
g_param_spec_string ("title",
|
|
|
|
"Title",
|
|
|
|
"Stage Title",
|
|
|
|
NULL,
|
|
|
|
CLUTTER_PARAM_READWRITE));
|
|
|
|
|
2007-03-23 05:59:02 -04:00
|
|
|
/**
|
|
|
|
* ClutterStage::event:
|
|
|
|
* @stage: the actor which received the event
|
|
|
|
* @event: a #ClutterEvent
|
|
|
|
*
|
|
|
|
* The ::event signal is emitted each time and event is received
|
|
|
|
* by the @stage.
|
|
|
|
*/
|
|
|
|
stage_signals[EVENT] =
|
|
|
|
g_signal_new ("event",
|
|
|
|
G_TYPE_FROM_CLASS (gobject_class),
|
|
|
|
G_SIGNAL_RUN_LAST,
|
|
|
|
G_STRUCT_OFFSET (ClutterStageClass, event),
|
|
|
|
NULL, NULL,
|
|
|
|
clutter_marshal_VOID__BOXED,
|
|
|
|
G_TYPE_NONE, 1,
|
|
|
|
CLUTTER_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
|
2007-04-25 10:22:24 -04:00
|
|
|
/**
|
|
|
|
* ClutterStage::event-after:
|
|
|
|
* @stage: the actor which received the event
|
|
|
|
* @event: a #ClutterEvent
|
|
|
|
*
|
|
|
|
* The ::event-after signal is emitted after each event, except for
|
|
|
|
* the "delete-event" is received by @stage.
|
|
|
|
*/
|
|
|
|
stage_signals[EVENT_AFTER] =
|
|
|
|
g_signal_new ("event-after",
|
|
|
|
G_TYPE_FROM_CLASS (gobject_class),
|
|
|
|
G_SIGNAL_RUN_LAST,
|
|
|
|
G_STRUCT_OFFSET (ClutterStageClass, event_after),
|
|
|
|
NULL, NULL,
|
|
|
|
clutter_marshal_VOID__BOXED,
|
|
|
|
G_TYPE_NONE, 1,
|
|
|
|
CLUTTER_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
|
2006-12-13 13:12:09 -05:00
|
|
|
/**
|
|
|
|
* ClutterStage::button-press-event:
|
|
|
|
* @stage: the actor which received the event
|
|
|
|
* @event: a #ClutterButtonEvent
|
|
|
|
*
|
2007-03-22 14:21:59 -04:00
|
|
|
* The ::button-press-event signal is emitted each time a mouse button
|
2006-12-13 13:12:09 -05:00
|
|
|
* is pressed on @stage.
|
|
|
|
*/
|
2006-06-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter-color.h:
* clutter-color.c: Reimplement ClutterColor as a boxed type;
add convenience API for color handling, like: add, subtract,
shade, HSL color-space conversion, packing and unpacking.
* clutter-private.h: Update ClutterMainContext, and export the
main context pointer here.
* clutter-rectangle.h:
* clutter-rectangle.c: Update the color-related code; make
clutter_rectangle_new() and empty constructor and provide
clutter_rectangle_new_with_color(); provide color setter
and getter API.
* clutter-label.h:
* clutter-label.c: Rename the "font" property to "font-name";
update the color-related code to the new ClutterColor object;
rename clutter_label_new() to clutter_label_new_with_text(),
and add setters and getters for the properties.
* clutter-marshal.list: Add VOID:OBJECT and VOID:BOXED marshallers
generators.
* clutter-stage.h:
* clutter-stage.c: Rework the API: provide a default constructor
for a singleton object, named clutter_stage_get_default(), which
supercedes the clutter_stage() function in clutter-main; provide
new events: button-press-event, button-release-event,
key-press-event and key-release-event; update the color-related
code;
(clutter_stage_snapshot): Allow negative width and height when
taking a snapshot (meaning: use full width/height).
(clutter_stage_get_element_at_pos): Rename clutter_stage_pick().
* clutter-element.c (clutter_element_paint): Clean up the
stage and color related code.
* clutter-event.h:
* clutter-event.c: Add generic ClutterAnyEvent type; add
clutter_event_new(), clutter_event_copy() and clutter_event_free();
make ClutterEvent a boxed type.
* clutter-main.h:
* clutter-main.c: Remove clutter_stage(); add clutter_main_quit(),
for cleanly quitting from clutter_main(); add multiple mainloops
support; allocate the ClutterCntx instead of adding it to the
stack; re-work the ClutterEvent dispatching.
* clutter-group.c (clutter_group_add), (clutter_group_remove): Keep
a reference on the element when added to a ClutterGroup.
* examples/rects.py
* examples/test.c:
* examples/test-text.c:
* examples/video-cube.c:
* examples/super-oh.c:
* examples/test-video.c: Update.
2006-06-05 09:38:31 -04:00
|
|
|
stage_signals[BUTTON_PRESS_EVENT] =
|
|
|
|
g_signal_new ("button-press-event",
|
|
|
|
G_TYPE_FROM_CLASS (gobject_class),
|
|
|
|
G_SIGNAL_RUN_LAST,
|
|
|
|
G_STRUCT_OFFSET (ClutterStageClass, button_press_event),
|
|
|
|
NULL, NULL,
|
|
|
|
clutter_marshal_VOID__BOXED,
|
|
|
|
G_TYPE_NONE, 1,
|
2007-03-23 05:44:21 -04:00
|
|
|
CLUTTER_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
|
2006-12-13 13:12:09 -05:00
|
|
|
/**
|
|
|
|
* ClutterStage::button-release-event:
|
|
|
|
* @stage: the actor which received the event
|
|
|
|
* @event: a #ClutterButtonEvent
|
|
|
|
*
|
2007-03-22 14:21:59 -04:00
|
|
|
* The ::button-release-event signal is emitted each time a mouse button
|
2006-12-13 13:12:09 -05:00
|
|
|
* is released on @stage.
|
|
|
|
*/
|
2006-06-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter-color.h:
* clutter-color.c: Reimplement ClutterColor as a boxed type;
add convenience API for color handling, like: add, subtract,
shade, HSL color-space conversion, packing and unpacking.
* clutter-private.h: Update ClutterMainContext, and export the
main context pointer here.
* clutter-rectangle.h:
* clutter-rectangle.c: Update the color-related code; make
clutter_rectangle_new() and empty constructor and provide
clutter_rectangle_new_with_color(); provide color setter
and getter API.
* clutter-label.h:
* clutter-label.c: Rename the "font" property to "font-name";
update the color-related code to the new ClutterColor object;
rename clutter_label_new() to clutter_label_new_with_text(),
and add setters and getters for the properties.
* clutter-marshal.list: Add VOID:OBJECT and VOID:BOXED marshallers
generators.
* clutter-stage.h:
* clutter-stage.c: Rework the API: provide a default constructor
for a singleton object, named clutter_stage_get_default(), which
supercedes the clutter_stage() function in clutter-main; provide
new events: button-press-event, button-release-event,
key-press-event and key-release-event; update the color-related
code;
(clutter_stage_snapshot): Allow negative width and height when
taking a snapshot (meaning: use full width/height).
(clutter_stage_get_element_at_pos): Rename clutter_stage_pick().
* clutter-element.c (clutter_element_paint): Clean up the
stage and color related code.
* clutter-event.h:
* clutter-event.c: Add generic ClutterAnyEvent type; add
clutter_event_new(), clutter_event_copy() and clutter_event_free();
make ClutterEvent a boxed type.
* clutter-main.h:
* clutter-main.c: Remove clutter_stage(); add clutter_main_quit(),
for cleanly quitting from clutter_main(); add multiple mainloops
support; allocate the ClutterCntx instead of adding it to the
stack; re-work the ClutterEvent dispatching.
* clutter-group.c (clutter_group_add), (clutter_group_remove): Keep
a reference on the element when added to a ClutterGroup.
* examples/rects.py
* examples/test.c:
* examples/test-text.c:
* examples/video-cube.c:
* examples/super-oh.c:
* examples/test-video.c: Update.
2006-06-05 09:38:31 -04:00
|
|
|
stage_signals[BUTTON_RELEASE_EVENT] =
|
|
|
|
g_signal_new ("button-release-event",
|
|
|
|
G_TYPE_FROM_CLASS (gobject_class),
|
|
|
|
G_SIGNAL_RUN_LAST,
|
|
|
|
G_STRUCT_OFFSET (ClutterStageClass, button_release_event),
|
|
|
|
NULL, NULL,
|
|
|
|
clutter_marshal_VOID__BOXED,
|
|
|
|
G_TYPE_NONE, 1,
|
2007-03-23 05:44:21 -04:00
|
|
|
CLUTTER_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
|
2007-03-22 14:21:59 -04:00
|
|
|
/**
|
|
|
|
* ClutterStage::scroll-event:
|
|
|
|
* @stage: the actor which received the event
|
|
|
|
* @event: a #ClutterScrollEvent
|
|
|
|
*
|
|
|
|
* The ::scroll-event signal is emitted each time a the mouse is
|
|
|
|
* scrolled on @stage
|
|
|
|
*
|
|
|
|
* Since: 0.4
|
|
|
|
*/
|
|
|
|
stage_signals[SCROLL_EVENT] =
|
|
|
|
g_signal_new ("scroll-event",
|
|
|
|
G_TYPE_FROM_CLASS (gobject_class),
|
|
|
|
G_SIGNAL_RUN_LAST,
|
|
|
|
G_STRUCT_OFFSET (ClutterStageClass, scroll_event),
|
|
|
|
NULL, NULL,
|
|
|
|
clutter_marshal_VOID__BOXED,
|
|
|
|
G_TYPE_NONE, 1,
|
2007-03-23 05:44:21 -04:00
|
|
|
CLUTTER_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
|
2006-12-13 13:12:09 -05:00
|
|
|
/**
|
|
|
|
* ClutterStage::key-press-event:
|
|
|
|
* @stage: the actor which received the event
|
|
|
|
* @event: a #ClutterKeyEvent
|
|
|
|
*
|
2007-03-22 14:21:59 -04:00
|
|
|
* The ::key-press-event signal is emitted each time a keyboard button
|
2006-12-13 13:12:09 -05:00
|
|
|
* is pressed on @stage.
|
|
|
|
*/
|
|
|
|
stage_signals[KEY_PRESS_EVENT] =
|
2006-06-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter-color.h:
* clutter-color.c: Reimplement ClutterColor as a boxed type;
add convenience API for color handling, like: add, subtract,
shade, HSL color-space conversion, packing and unpacking.
* clutter-private.h: Update ClutterMainContext, and export the
main context pointer here.
* clutter-rectangle.h:
* clutter-rectangle.c: Update the color-related code; make
clutter_rectangle_new() and empty constructor and provide
clutter_rectangle_new_with_color(); provide color setter
and getter API.
* clutter-label.h:
* clutter-label.c: Rename the "font" property to "font-name";
update the color-related code to the new ClutterColor object;
rename clutter_label_new() to clutter_label_new_with_text(),
and add setters and getters for the properties.
* clutter-marshal.list: Add VOID:OBJECT and VOID:BOXED marshallers
generators.
* clutter-stage.h:
* clutter-stage.c: Rework the API: provide a default constructor
for a singleton object, named clutter_stage_get_default(), which
supercedes the clutter_stage() function in clutter-main; provide
new events: button-press-event, button-release-event,
key-press-event and key-release-event; update the color-related
code;
(clutter_stage_snapshot): Allow negative width and height when
taking a snapshot (meaning: use full width/height).
(clutter_stage_get_element_at_pos): Rename clutter_stage_pick().
* clutter-element.c (clutter_element_paint): Clean up the
stage and color related code.
* clutter-event.h:
* clutter-event.c: Add generic ClutterAnyEvent type; add
clutter_event_new(), clutter_event_copy() and clutter_event_free();
make ClutterEvent a boxed type.
* clutter-main.h:
* clutter-main.c: Remove clutter_stage(); add clutter_main_quit(),
for cleanly quitting from clutter_main(); add multiple mainloops
support; allocate the ClutterCntx instead of adding it to the
stack; re-work the ClutterEvent dispatching.
* clutter-group.c (clutter_group_add), (clutter_group_remove): Keep
a reference on the element when added to a ClutterGroup.
* examples/rects.py
* examples/test.c:
* examples/test-text.c:
* examples/video-cube.c:
* examples/super-oh.c:
* examples/test-video.c: Update.
2006-06-05 09:38:31 -04:00
|
|
|
g_signal_new ("key-press-event",
|
|
|
|
G_TYPE_FROM_CLASS (gobject_class),
|
|
|
|
G_SIGNAL_RUN_LAST,
|
|
|
|
G_STRUCT_OFFSET (ClutterStageClass, key_press_event),
|
|
|
|
NULL, NULL,
|
|
|
|
clutter_marshal_VOID__BOXED,
|
|
|
|
G_TYPE_NONE, 1,
|
2007-03-23 05:44:21 -04:00
|
|
|
CLUTTER_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
|
2006-12-13 13:12:09 -05:00
|
|
|
/**
|
|
|
|
* ClutterStage::key-release-event:
|
|
|
|
* @stage: the actor which received the event
|
|
|
|
* @event: a #ClutterKeyEvent
|
|
|
|
*
|
2007-03-22 14:21:59 -04:00
|
|
|
* The ::key-release-event signal is emitted each time a keyboard button
|
2006-12-13 13:12:09 -05:00
|
|
|
* is released on @stage.
|
|
|
|
*/
|
|
|
|
stage_signals[KEY_RELEASE_EVENT] =
|
2006-06-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter-color.h:
* clutter-color.c: Reimplement ClutterColor as a boxed type;
add convenience API for color handling, like: add, subtract,
shade, HSL color-space conversion, packing and unpacking.
* clutter-private.h: Update ClutterMainContext, and export the
main context pointer here.
* clutter-rectangle.h:
* clutter-rectangle.c: Update the color-related code; make
clutter_rectangle_new() and empty constructor and provide
clutter_rectangle_new_with_color(); provide color setter
and getter API.
* clutter-label.h:
* clutter-label.c: Rename the "font" property to "font-name";
update the color-related code to the new ClutterColor object;
rename clutter_label_new() to clutter_label_new_with_text(),
and add setters and getters for the properties.
* clutter-marshal.list: Add VOID:OBJECT and VOID:BOXED marshallers
generators.
* clutter-stage.h:
* clutter-stage.c: Rework the API: provide a default constructor
for a singleton object, named clutter_stage_get_default(), which
supercedes the clutter_stage() function in clutter-main; provide
new events: button-press-event, button-release-event,
key-press-event and key-release-event; update the color-related
code;
(clutter_stage_snapshot): Allow negative width and height when
taking a snapshot (meaning: use full width/height).
(clutter_stage_get_element_at_pos): Rename clutter_stage_pick().
* clutter-element.c (clutter_element_paint): Clean up the
stage and color related code.
* clutter-event.h:
* clutter-event.c: Add generic ClutterAnyEvent type; add
clutter_event_new(), clutter_event_copy() and clutter_event_free();
make ClutterEvent a boxed type.
* clutter-main.h:
* clutter-main.c: Remove clutter_stage(); add clutter_main_quit(),
for cleanly quitting from clutter_main(); add multiple mainloops
support; allocate the ClutterCntx instead of adding it to the
stack; re-work the ClutterEvent dispatching.
* clutter-group.c (clutter_group_add), (clutter_group_remove): Keep
a reference on the element when added to a ClutterGroup.
* examples/rects.py
* examples/test.c:
* examples/test-text.c:
* examples/video-cube.c:
* examples/super-oh.c:
* examples/test-video.c: Update.
2006-06-05 09:38:31 -04:00
|
|
|
g_signal_new ("key-release-event",
|
|
|
|
G_TYPE_FROM_CLASS (gobject_class),
|
|
|
|
G_SIGNAL_RUN_LAST,
|
|
|
|
G_STRUCT_OFFSET (ClutterStageClass, key_release_event),
|
|
|
|
NULL, NULL,
|
|
|
|
clutter_marshal_VOID__BOXED,
|
|
|
|
G_TYPE_NONE, 1,
|
2007-03-23 05:44:21 -04:00
|
|
|
CLUTTER_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
|
2006-12-13 13:12:09 -05:00
|
|
|
/**
|
|
|
|
* ClutterStage::motion-event:
|
|
|
|
* @stage: the actor which received the event
|
|
|
|
* @event: a #ClutterMotionEvent
|
|
|
|
*
|
2007-03-22 14:21:59 -04:00
|
|
|
* The ::motion-event signal is emitted each time the mouse pointer is
|
2006-12-13 13:12:09 -05:00
|
|
|
* moved on @stage.
|
|
|
|
*/
|
2006-06-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter-color.h:
* clutter-color.c: Reimplement ClutterColor as a boxed type;
add convenience API for color handling, like: add, subtract,
shade, HSL color-space conversion, packing and unpacking.
* clutter-private.h: Update ClutterMainContext, and export the
main context pointer here.
* clutter-rectangle.h:
* clutter-rectangle.c: Update the color-related code; make
clutter_rectangle_new() and empty constructor and provide
clutter_rectangle_new_with_color(); provide color setter
and getter API.
* clutter-label.h:
* clutter-label.c: Rename the "font" property to "font-name";
update the color-related code to the new ClutterColor object;
rename clutter_label_new() to clutter_label_new_with_text(),
and add setters and getters for the properties.
* clutter-marshal.list: Add VOID:OBJECT and VOID:BOXED marshallers
generators.
* clutter-stage.h:
* clutter-stage.c: Rework the API: provide a default constructor
for a singleton object, named clutter_stage_get_default(), which
supercedes the clutter_stage() function in clutter-main; provide
new events: button-press-event, button-release-event,
key-press-event and key-release-event; update the color-related
code;
(clutter_stage_snapshot): Allow negative width and height when
taking a snapshot (meaning: use full width/height).
(clutter_stage_get_element_at_pos): Rename clutter_stage_pick().
* clutter-element.c (clutter_element_paint): Clean up the
stage and color related code.
* clutter-event.h:
* clutter-event.c: Add generic ClutterAnyEvent type; add
clutter_event_new(), clutter_event_copy() and clutter_event_free();
make ClutterEvent a boxed type.
* clutter-main.h:
* clutter-main.c: Remove clutter_stage(); add clutter_main_quit(),
for cleanly quitting from clutter_main(); add multiple mainloops
support; allocate the ClutterCntx instead of adding it to the
stack; re-work the ClutterEvent dispatching.
* clutter-group.c (clutter_group_add), (clutter_group_remove): Keep
a reference on the element when added to a ClutterGroup.
* examples/rects.py
* examples/test.c:
* examples/test-text.c:
* examples/video-cube.c:
* examples/super-oh.c:
* examples/test-video.c: Update.
2006-06-05 09:38:31 -04:00
|
|
|
stage_signals[MOTION_EVENT] =
|
|
|
|
g_signal_new ("motion-event",
|
|
|
|
G_TYPE_FROM_CLASS (gobject_class),
|
|
|
|
G_SIGNAL_RUN_LAST,
|
|
|
|
G_STRUCT_OFFSET (ClutterStageClass, motion_event),
|
|
|
|
NULL, NULL,
|
|
|
|
clutter_marshal_VOID__BOXED,
|
|
|
|
G_TYPE_NONE, 1,
|
2007-03-23 05:44:21 -04:00
|
|
|
CLUTTER_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
|
2006-12-27 13:25:43 -05:00
|
|
|
|
2006-06-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter-color.h:
* clutter-color.c: Reimplement ClutterColor as a boxed type;
add convenience API for color handling, like: add, subtract,
shade, HSL color-space conversion, packing and unpacking.
* clutter-private.h: Update ClutterMainContext, and export the
main context pointer here.
* clutter-rectangle.h:
* clutter-rectangle.c: Update the color-related code; make
clutter_rectangle_new() and empty constructor and provide
clutter_rectangle_new_with_color(); provide color setter
and getter API.
* clutter-label.h:
* clutter-label.c: Rename the "font" property to "font-name";
update the color-related code to the new ClutterColor object;
rename clutter_label_new() to clutter_label_new_with_text(),
and add setters and getters for the properties.
* clutter-marshal.list: Add VOID:OBJECT and VOID:BOXED marshallers
generators.
* clutter-stage.h:
* clutter-stage.c: Rework the API: provide a default constructor
for a singleton object, named clutter_stage_get_default(), which
supercedes the clutter_stage() function in clutter-main; provide
new events: button-press-event, button-release-event,
key-press-event and key-release-event; update the color-related
code;
(clutter_stage_snapshot): Allow negative width and height when
taking a snapshot (meaning: use full width/height).
(clutter_stage_get_element_at_pos): Rename clutter_stage_pick().
* clutter-element.c (clutter_element_paint): Clean up the
stage and color related code.
* clutter-event.h:
* clutter-event.c: Add generic ClutterAnyEvent type; add
clutter_event_new(), clutter_event_copy() and clutter_event_free();
make ClutterEvent a boxed type.
* clutter-main.h:
* clutter-main.c: Remove clutter_stage(); add clutter_main_quit(),
for cleanly quitting from clutter_main(); add multiple mainloops
support; allocate the ClutterCntx instead of adding it to the
stack; re-work the ClutterEvent dispatching.
* clutter-group.c (clutter_group_add), (clutter_group_remove): Keep
a reference on the element when added to a ClutterGroup.
* examples/rects.py
* examples/test.c:
* examples/test-text.c:
* examples/video-cube.c:
* examples/super-oh.c:
* examples/test-video.c: Update.
2006-06-05 09:38:31 -04:00
|
|
|
g_type_class_add_private (gobject_class, sizeof (ClutterStagePrivate));
|
2006-05-29 04:59:36 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
clutter_stage_init (ClutterStage *self)
|
|
|
|
{
|
|
|
|
ClutterStagePrivate *priv;
|
2006-07-06 Emmanuele Bassi <ebassi@openedhand.com>
Big rework of the actor management semantics: now ClutterActor
objects behave like GtkObjects - that is they have an initial
"floating" reference that gets "sunk" when they are added to
a ClutterGroup. This makes a group responsible of de-allocating
each actor inside it, so you just have to destroy the group to
get every child actor destroyed. Also, now you can do:
clutter_group_add (group, clutter_video_texture_new ());
without having to care about reference counting and explicit
unreffing.
* clutter/clutter-private.h: Add private flags setter and
getter macros.
* clutter/clutter-actor.h:
* clutter/clutter-actor.c: Clean up; inherit from GInitiallyUnowned;
add a "visible" property; add the "destroy", "show" and "hide"
signals to ClutterActorClass.
(clutter_actor_show), (clutter_actor_hide): Refactor a bit; emit
the "show" and "hide" signals.
(clutter_actor_set_property), (clutter_actor_get_property),
(clutter_actor_class_init): Implement the "visible" property; add
signals.
(clutter_actor_finalize): Do not leak the actor's name, if it is
set.
(clutter_actor_dispose): Emit the "destroy" signal here.
(clutter_actor_init): Sink the initial floating flag if needed.
(clutter_actor_destroy): Add a function to explicitely destroy
a ClutterActor.
(clutter_actor_set_parent), (clutter_actor_get_parent),
(clutter_actor_unparent): Make set_parent require a valid parent;
add unparent; check on get_parent; ref_sink the actor when
setting its parent and unref it when unsetting it. Probably we'll
need a function that does reparenting as unparent+set_parent in
a single shot.
* clutter/clutter-group.h:
* clutter/clutter-group.c (clutter_group_dispose),
(clutter_group_finalize), (clutter_group_add),
(clutter_group_remove): Make the group destroy its children when
disposing it; clean up, and use the newly-available
clutter_actor_unparent().
* clutter/clutter-stage.h:
* clutter/clutter-stage.c (clutter_stage_init): ClutterStage is
a top-level actor; clean up.
* clutter/clutter-video-texture.h:
* clutter/clutter-video-texture.c: Clean up.
* examples/super-oh.c:
* examples/test.c:
* examples/video-player.c:
* examples/test-text.c:
* examples/video-cube.c: Remove the g_object_unref() call, as the
ClutterStage object is destroyed on clutter_main_quit().
2006-07-06 13:52:57 -04:00
|
|
|
|
|
|
|
/* a stage is a top-level object */
|
|
|
|
CLUTTER_SET_PRIVATE_FLAGS (self, CLUTTER_ACTOR_IS_TOPLEVEL);
|
2006-06-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter-color.h:
* clutter-color.c: Reimplement ClutterColor as a boxed type;
add convenience API for color handling, like: add, subtract,
shade, HSL color-space conversion, packing and unpacking.
* clutter-private.h: Update ClutterMainContext, and export the
main context pointer here.
* clutter-rectangle.h:
* clutter-rectangle.c: Update the color-related code; make
clutter_rectangle_new() and empty constructor and provide
clutter_rectangle_new_with_color(); provide color setter
and getter API.
* clutter-label.h:
* clutter-label.c: Rename the "font" property to "font-name";
update the color-related code to the new ClutterColor object;
rename clutter_label_new() to clutter_label_new_with_text(),
and add setters and getters for the properties.
* clutter-marshal.list: Add VOID:OBJECT and VOID:BOXED marshallers
generators.
* clutter-stage.h:
* clutter-stage.c: Rework the API: provide a default constructor
for a singleton object, named clutter_stage_get_default(), which
supercedes the clutter_stage() function in clutter-main; provide
new events: button-press-event, button-release-event,
key-press-event and key-release-event; update the color-related
code;
(clutter_stage_snapshot): Allow negative width and height when
taking a snapshot (meaning: use full width/height).
(clutter_stage_get_element_at_pos): Rename clutter_stage_pick().
* clutter-element.c (clutter_element_paint): Clean up the
stage and color related code.
* clutter-event.h:
* clutter-event.c: Add generic ClutterAnyEvent type; add
clutter_event_new(), clutter_event_copy() and clutter_event_free();
make ClutterEvent a boxed type.
* clutter-main.h:
* clutter-main.c: Remove clutter_stage(); add clutter_main_quit(),
for cleanly quitting from clutter_main(); add multiple mainloops
support; allocate the ClutterCntx instead of adding it to the
stack; re-work the ClutterEvent dispatching.
* clutter-group.c (clutter_group_add), (clutter_group_remove): Keep
a reference on the element when added to a ClutterGroup.
* examples/rects.py
* examples/test.c:
* examples/test-text.c:
* examples/video-cube.c:
* examples/super-oh.c:
* examples/test-video.c: Update.
2006-06-05 09:38:31 -04:00
|
|
|
|
|
|
|
self->priv = priv = CLUTTER_STAGE_GET_PRIVATE (self);
|
2006-05-29 04:59:36 -04:00
|
|
|
|
2007-03-22 14:21:59 -04:00
|
|
|
priv->is_offscreen = FALSE;
|
|
|
|
priv->is_fullscreen = FALSE;
|
2007-07-09 18:59:52 -04:00
|
|
|
priv->is_cursor_visible = TRUE;
|
2006-05-29 04:59:36 -04:00
|
|
|
|
2006-06-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter-color.h:
* clutter-color.c: Reimplement ClutterColor as a boxed type;
add convenience API for color handling, like: add, subtract,
shade, HSL color-space conversion, packing and unpacking.
* clutter-private.h: Update ClutterMainContext, and export the
main context pointer here.
* clutter-rectangle.h:
* clutter-rectangle.c: Update the color-related code; make
clutter_rectangle_new() and empty constructor and provide
clutter_rectangle_new_with_color(); provide color setter
and getter API.
* clutter-label.h:
* clutter-label.c: Rename the "font" property to "font-name";
update the color-related code to the new ClutterColor object;
rename clutter_label_new() to clutter_label_new_with_text(),
and add setters and getters for the properties.
* clutter-marshal.list: Add VOID:OBJECT and VOID:BOXED marshallers
generators.
* clutter-stage.h:
* clutter-stage.c: Rework the API: provide a default constructor
for a singleton object, named clutter_stage_get_default(), which
supercedes the clutter_stage() function in clutter-main; provide
new events: button-press-event, button-release-event,
key-press-event and key-release-event; update the color-related
code;
(clutter_stage_snapshot): Allow negative width and height when
taking a snapshot (meaning: use full width/height).
(clutter_stage_get_element_at_pos): Rename clutter_stage_pick().
* clutter-element.c (clutter_element_paint): Clean up the
stage and color related code.
* clutter-event.h:
* clutter-event.c: Add generic ClutterAnyEvent type; add
clutter_event_new(), clutter_event_copy() and clutter_event_free();
make ClutterEvent a boxed type.
* clutter-main.h:
* clutter-main.c: Remove clutter_stage(); add clutter_main_quit(),
for cleanly quitting from clutter_main(); add multiple mainloops
support; allocate the ClutterCntx instead of adding it to the
stack; re-work the ClutterEvent dispatching.
* clutter-group.c (clutter_group_add), (clutter_group_remove): Keep
a reference on the element when added to a ClutterGroup.
* examples/rects.py
* examples/test.c:
* examples/test-text.c:
* examples/video-cube.c:
* examples/super-oh.c:
* examples/test-video.c: Update.
2006-06-05 09:38:31 -04:00
|
|
|
priv->color.red = 0xff;
|
|
|
|
priv->color.green = 0xff;
|
|
|
|
priv->color.blue = 0xff;
|
|
|
|
priv->color.alpha = 0xff;
|
2007-05-31 13:11:09 -04:00
|
|
|
|
2007-06-25 09:43:13 -04:00
|
|
|
priv->perspective.fovy = CFX_60; /* 60 Degrees */
|
2007-05-31 13:11:09 -04:00
|
|
|
priv->perspective.aspect = CFX_ONE;
|
|
|
|
priv->perspective.z_near = CLUTTER_FLOAT_TO_FIXED (0.1);
|
|
|
|
priv->perspective.z_far = CLUTTER_FLOAT_TO_FIXED (100.0);
|
2007-06-01 07:30:52 -04:00
|
|
|
|
2006-06-13 09:17:45 -04:00
|
|
|
clutter_actor_set_size (CLUTTER_ACTOR (self), 640, 480);
|
2006-06-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter-color.h:
* clutter-color.c: Reimplement ClutterColor as a boxed type;
add convenience API for color handling, like: add, subtract,
shade, HSL color-space conversion, packing and unpacking.
* clutter-private.h: Update ClutterMainContext, and export the
main context pointer here.
* clutter-rectangle.h:
* clutter-rectangle.c: Update the color-related code; make
clutter_rectangle_new() and empty constructor and provide
clutter_rectangle_new_with_color(); provide color setter
and getter API.
* clutter-label.h:
* clutter-label.c: Rename the "font" property to "font-name";
update the color-related code to the new ClutterColor object;
rename clutter_label_new() to clutter_label_new_with_text(),
and add setters and getters for the properties.
* clutter-marshal.list: Add VOID:OBJECT and VOID:BOXED marshallers
generators.
* clutter-stage.h:
* clutter-stage.c: Rework the API: provide a default constructor
for a singleton object, named clutter_stage_get_default(), which
supercedes the clutter_stage() function in clutter-main; provide
new events: button-press-event, button-release-event,
key-press-event and key-release-event; update the color-related
code;
(clutter_stage_snapshot): Allow negative width and height when
taking a snapshot (meaning: use full width/height).
(clutter_stage_get_element_at_pos): Rename clutter_stage_pick().
* clutter-element.c (clutter_element_paint): Clean up the
stage and color related code.
* clutter-event.h:
* clutter-event.c: Add generic ClutterAnyEvent type; add
clutter_event_new(), clutter_event_copy() and clutter_event_free();
make ClutterEvent a boxed type.
* clutter-main.h:
* clutter-main.c: Remove clutter_stage(); add clutter_main_quit(),
for cleanly quitting from clutter_main(); add multiple mainloops
support; allocate the ClutterCntx instead of adding it to the
stack; re-work the ClutterEvent dispatching.
* clutter-group.c (clutter_group_add), (clutter_group_remove): Keep
a reference on the element when added to a ClutterGroup.
* examples/rects.py
* examples/test.c:
* examples/test-text.c:
* examples/video-cube.c:
* examples/super-oh.c:
* examples/test-video.c: Update.
2006-06-05 09:38:31 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* clutter_stage_get_default:
|
|
|
|
*
|
|
|
|
* Returns the main stage. #ClutterStage is a singleton, so
|
|
|
|
* the stage will be created the first time this function is
|
|
|
|
* called (typically, inside clutter_init()); all the subsequent
|
|
|
|
* calls to clutter_stage_get_default() will return the same
|
2007-03-22 14:21:59 -04:00
|
|
|
* instance.
|
2006-06-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter-color.h:
* clutter-color.c: Reimplement ClutterColor as a boxed type;
add convenience API for color handling, like: add, subtract,
shade, HSL color-space conversion, packing and unpacking.
* clutter-private.h: Update ClutterMainContext, and export the
main context pointer here.
* clutter-rectangle.h:
* clutter-rectangle.c: Update the color-related code; make
clutter_rectangle_new() and empty constructor and provide
clutter_rectangle_new_with_color(); provide color setter
and getter API.
* clutter-label.h:
* clutter-label.c: Rename the "font" property to "font-name";
update the color-related code to the new ClutterColor object;
rename clutter_label_new() to clutter_label_new_with_text(),
and add setters and getters for the properties.
* clutter-marshal.list: Add VOID:OBJECT and VOID:BOXED marshallers
generators.
* clutter-stage.h:
* clutter-stage.c: Rework the API: provide a default constructor
for a singleton object, named clutter_stage_get_default(), which
supercedes the clutter_stage() function in clutter-main; provide
new events: button-press-event, button-release-event,
key-press-event and key-release-event; update the color-related
code;
(clutter_stage_snapshot): Allow negative width and height when
taking a snapshot (meaning: use full width/height).
(clutter_stage_get_element_at_pos): Rename clutter_stage_pick().
* clutter-element.c (clutter_element_paint): Clean up the
stage and color related code.
* clutter-event.h:
* clutter-event.c: Add generic ClutterAnyEvent type; add
clutter_event_new(), clutter_event_copy() and clutter_event_free();
make ClutterEvent a boxed type.
* clutter-main.h:
* clutter-main.c: Remove clutter_stage(); add clutter_main_quit(),
for cleanly quitting from clutter_main(); add multiple mainloops
support; allocate the ClutterCntx instead of adding it to the
stack; re-work the ClutterEvent dispatching.
* clutter-group.c (clutter_group_add), (clutter_group_remove): Keep
a reference on the element when added to a ClutterGroup.
* examples/rects.py
* examples/test.c:
* examples/test-text.c:
* examples/video-cube.c:
* examples/super-oh.c:
* examples/test-video.c: Update.
2006-06-05 09:38:31 -04:00
|
|
|
*
|
2006-07-17 05:10:08 -04:00
|
|
|
* Return value: the main #ClutterStage. You should never
|
2007-03-22 14:21:59 -04:00
|
|
|
* destroy or unref the returned actor.
|
2006-06-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter-color.h:
* clutter-color.c: Reimplement ClutterColor as a boxed type;
add convenience API for color handling, like: add, subtract,
shade, HSL color-space conversion, packing and unpacking.
* clutter-private.h: Update ClutterMainContext, and export the
main context pointer here.
* clutter-rectangle.h:
* clutter-rectangle.c: Update the color-related code; make
clutter_rectangle_new() and empty constructor and provide
clutter_rectangle_new_with_color(); provide color setter
and getter API.
* clutter-label.h:
* clutter-label.c: Rename the "font" property to "font-name";
update the color-related code to the new ClutterColor object;
rename clutter_label_new() to clutter_label_new_with_text(),
and add setters and getters for the properties.
* clutter-marshal.list: Add VOID:OBJECT and VOID:BOXED marshallers
generators.
* clutter-stage.h:
* clutter-stage.c: Rework the API: provide a default constructor
for a singleton object, named clutter_stage_get_default(), which
supercedes the clutter_stage() function in clutter-main; provide
new events: button-press-event, button-release-event,
key-press-event and key-release-event; update the color-related
code;
(clutter_stage_snapshot): Allow negative width and height when
taking a snapshot (meaning: use full width/height).
(clutter_stage_get_element_at_pos): Rename clutter_stage_pick().
* clutter-element.c (clutter_element_paint): Clean up the
stage and color related code.
* clutter-event.h:
* clutter-event.c: Add generic ClutterAnyEvent type; add
clutter_event_new(), clutter_event_copy() and clutter_event_free();
make ClutterEvent a boxed type.
* clutter-main.h:
* clutter-main.c: Remove clutter_stage(); add clutter_main_quit(),
for cleanly quitting from clutter_main(); add multiple mainloops
support; allocate the ClutterCntx instead of adding it to the
stack; re-work the ClutterEvent dispatching.
* clutter-group.c (clutter_group_add), (clutter_group_remove): Keep
a reference on the element when added to a ClutterGroup.
* examples/rects.py
* examples/test.c:
* examples/test-text.c:
* examples/video-cube.c:
* examples/super-oh.c:
* examples/test-video.c: Update.
2006-06-05 09:38:31 -04:00
|
|
|
*/
|
2006-06-13 09:17:45 -04:00
|
|
|
ClutterActor *
|
2006-06-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter-color.h:
* clutter-color.c: Reimplement ClutterColor as a boxed type;
add convenience API for color handling, like: add, subtract,
shade, HSL color-space conversion, packing and unpacking.
* clutter-private.h: Update ClutterMainContext, and export the
main context pointer here.
* clutter-rectangle.h:
* clutter-rectangle.c: Update the color-related code; make
clutter_rectangle_new() and empty constructor and provide
clutter_rectangle_new_with_color(); provide color setter
and getter API.
* clutter-label.h:
* clutter-label.c: Rename the "font" property to "font-name";
update the color-related code to the new ClutterColor object;
rename clutter_label_new() to clutter_label_new_with_text(),
and add setters and getters for the properties.
* clutter-marshal.list: Add VOID:OBJECT and VOID:BOXED marshallers
generators.
* clutter-stage.h:
* clutter-stage.c: Rework the API: provide a default constructor
for a singleton object, named clutter_stage_get_default(), which
supercedes the clutter_stage() function in clutter-main; provide
new events: button-press-event, button-release-event,
key-press-event and key-release-event; update the color-related
code;
(clutter_stage_snapshot): Allow negative width and height when
taking a snapshot (meaning: use full width/height).
(clutter_stage_get_element_at_pos): Rename clutter_stage_pick().
* clutter-element.c (clutter_element_paint): Clean up the
stage and color related code.
* clutter-event.h:
* clutter-event.c: Add generic ClutterAnyEvent type; add
clutter_event_new(), clutter_event_copy() and clutter_event_free();
make ClutterEvent a boxed type.
* clutter-main.h:
* clutter-main.c: Remove clutter_stage(); add clutter_main_quit(),
for cleanly quitting from clutter_main(); add multiple mainloops
support; allocate the ClutterCntx instead of adding it to the
stack; re-work the ClutterEvent dispatching.
* clutter-group.c (clutter_group_add), (clutter_group_remove): Keep
a reference on the element when added to a ClutterGroup.
* examples/rects.py
* examples/test.c:
* examples/test-text.c:
* examples/video-cube.c:
* examples/super-oh.c:
* examples/test-video.c: Update.
2006-06-05 09:38:31 -04:00
|
|
|
clutter_stage_get_default (void)
|
|
|
|
{
|
2007-03-22 14:21:59 -04:00
|
|
|
ClutterMainContext *context;
|
|
|
|
|
|
|
|
context = clutter_context_get_default ();
|
|
|
|
g_assert (context != NULL);
|
2006-06-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter-color.h:
* clutter-color.c: Reimplement ClutterColor as a boxed type;
add convenience API for color handling, like: add, subtract,
shade, HSL color-space conversion, packing and unpacking.
* clutter-private.h: Update ClutterMainContext, and export the
main context pointer here.
* clutter-rectangle.h:
* clutter-rectangle.c: Update the color-related code; make
clutter_rectangle_new() and empty constructor and provide
clutter_rectangle_new_with_color(); provide color setter
and getter API.
* clutter-label.h:
* clutter-label.c: Rename the "font" property to "font-name";
update the color-related code to the new ClutterColor object;
rename clutter_label_new() to clutter_label_new_with_text(),
and add setters and getters for the properties.
* clutter-marshal.list: Add VOID:OBJECT and VOID:BOXED marshallers
generators.
* clutter-stage.h:
* clutter-stage.c: Rework the API: provide a default constructor
for a singleton object, named clutter_stage_get_default(), which
supercedes the clutter_stage() function in clutter-main; provide
new events: button-press-event, button-release-event,
key-press-event and key-release-event; update the color-related
code;
(clutter_stage_snapshot): Allow negative width and height when
taking a snapshot (meaning: use full width/height).
(clutter_stage_get_element_at_pos): Rename clutter_stage_pick().
* clutter-element.c (clutter_element_paint): Clean up the
stage and color related code.
* clutter-event.h:
* clutter-event.c: Add generic ClutterAnyEvent type; add
clutter_event_new(), clutter_event_copy() and clutter_event_free();
make ClutterEvent a boxed type.
* clutter-main.h:
* clutter-main.c: Remove clutter_stage(); add clutter_main_quit(),
for cleanly quitting from clutter_main(); add multiple mainloops
support; allocate the ClutterCntx instead of adding it to the
stack; re-work the ClutterEvent dispatching.
* clutter-group.c (clutter_group_add), (clutter_group_remove): Keep
a reference on the element when added to a ClutterGroup.
* examples/rects.py
* examples/test.c:
* examples/test-text.c:
* examples/video-cube.c:
* examples/super-oh.c:
* examples/test-video.c: Update.
2006-06-05 09:38:31 -04:00
|
|
|
|
2007-03-23 13:55:13 -04:00
|
|
|
return _clutter_backend_get_stage (context->backend);
|
2006-05-29 04:59:36 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* clutter_stage_set_color
|
|
|
|
* @stage: A #ClutterStage
|
|
|
|
* @color: A #ClutterColor
|
|
|
|
*
|
|
|
|
* Set the stage color.
|
|
|
|
**/
|
|
|
|
void
|
2006-06-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter-color.h:
* clutter-color.c: Reimplement ClutterColor as a boxed type;
add convenience API for color handling, like: add, subtract,
shade, HSL color-space conversion, packing and unpacking.
* clutter-private.h: Update ClutterMainContext, and export the
main context pointer here.
* clutter-rectangle.h:
* clutter-rectangle.c: Update the color-related code; make
clutter_rectangle_new() and empty constructor and provide
clutter_rectangle_new_with_color(); provide color setter
and getter API.
* clutter-label.h:
* clutter-label.c: Rename the "font" property to "font-name";
update the color-related code to the new ClutterColor object;
rename clutter_label_new() to clutter_label_new_with_text(),
and add setters and getters for the properties.
* clutter-marshal.list: Add VOID:OBJECT and VOID:BOXED marshallers
generators.
* clutter-stage.h:
* clutter-stage.c: Rework the API: provide a default constructor
for a singleton object, named clutter_stage_get_default(), which
supercedes the clutter_stage() function in clutter-main; provide
new events: button-press-event, button-release-event,
key-press-event and key-release-event; update the color-related
code;
(clutter_stage_snapshot): Allow negative width and height when
taking a snapshot (meaning: use full width/height).
(clutter_stage_get_element_at_pos): Rename clutter_stage_pick().
* clutter-element.c (clutter_element_paint): Clean up the
stage and color related code.
* clutter-event.h:
* clutter-event.c: Add generic ClutterAnyEvent type; add
clutter_event_new(), clutter_event_copy() and clutter_event_free();
make ClutterEvent a boxed type.
* clutter-main.h:
* clutter-main.c: Remove clutter_stage(); add clutter_main_quit(),
for cleanly quitting from clutter_main(); add multiple mainloops
support; allocate the ClutterCntx instead of adding it to the
stack; re-work the ClutterEvent dispatching.
* clutter-group.c (clutter_group_add), (clutter_group_remove): Keep
a reference on the element when added to a ClutterGroup.
* examples/rects.py
* examples/test.c:
* examples/test-text.c:
* examples/video-cube.c:
* examples/super-oh.c:
* examples/test-video.c: Update.
2006-06-05 09:38:31 -04:00
|
|
|
clutter_stage_set_color (ClutterStage *stage,
|
|
|
|
const ClutterColor *color)
|
2006-05-29 04:59:36 -04:00
|
|
|
{
|
2006-06-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter-color.h:
* clutter-color.c: Reimplement ClutterColor as a boxed type;
add convenience API for color handling, like: add, subtract,
shade, HSL color-space conversion, packing and unpacking.
* clutter-private.h: Update ClutterMainContext, and export the
main context pointer here.
* clutter-rectangle.h:
* clutter-rectangle.c: Update the color-related code; make
clutter_rectangle_new() and empty constructor and provide
clutter_rectangle_new_with_color(); provide color setter
and getter API.
* clutter-label.h:
* clutter-label.c: Rename the "font" property to "font-name";
update the color-related code to the new ClutterColor object;
rename clutter_label_new() to clutter_label_new_with_text(),
and add setters and getters for the properties.
* clutter-marshal.list: Add VOID:OBJECT and VOID:BOXED marshallers
generators.
* clutter-stage.h:
* clutter-stage.c: Rework the API: provide a default constructor
for a singleton object, named clutter_stage_get_default(), which
supercedes the clutter_stage() function in clutter-main; provide
new events: button-press-event, button-release-event,
key-press-event and key-release-event; update the color-related
code;
(clutter_stage_snapshot): Allow negative width and height when
taking a snapshot (meaning: use full width/height).
(clutter_stage_get_element_at_pos): Rename clutter_stage_pick().
* clutter-element.c (clutter_element_paint): Clean up the
stage and color related code.
* clutter-event.h:
* clutter-event.c: Add generic ClutterAnyEvent type; add
clutter_event_new(), clutter_event_copy() and clutter_event_free();
make ClutterEvent a boxed type.
* clutter-main.h:
* clutter-main.c: Remove clutter_stage(); add clutter_main_quit(),
for cleanly quitting from clutter_main(); add multiple mainloops
support; allocate the ClutterCntx instead of adding it to the
stack; re-work the ClutterEvent dispatching.
* clutter-group.c (clutter_group_add), (clutter_group_remove): Keep
a reference on the element when added to a ClutterGroup.
* examples/rects.py
* examples/test.c:
* examples/test-text.c:
* examples/video-cube.c:
* examples/super-oh.c:
* examples/test-video.c: Update.
2006-06-05 09:38:31 -04:00
|
|
|
ClutterStagePrivate *priv;
|
|
|
|
|
|
|
|
g_return_if_fail (CLUTTER_IS_STAGE (stage));
|
|
|
|
g_return_if_fail (color != NULL);
|
|
|
|
|
|
|
|
priv = stage->priv;
|
|
|
|
priv->color.red = color->red;
|
|
|
|
priv->color.green = color->green;
|
|
|
|
priv->color.blue = color->blue;
|
|
|
|
priv->color.alpha = color->alpha;
|
2006-05-29 04:59:36 -04:00
|
|
|
|
2006-06-13 09:17:45 -04:00
|
|
|
if (CLUTTER_ACTOR_IS_VISIBLE (CLUTTER_ACTOR (stage)))
|
|
|
|
clutter_actor_queue_redraw (CLUTTER_ACTOR (stage));
|
2006-06-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter-color.h:
* clutter-color.c: Reimplement ClutterColor as a boxed type;
add convenience API for color handling, like: add, subtract,
shade, HSL color-space conversion, packing and unpacking.
* clutter-private.h: Update ClutterMainContext, and export the
main context pointer here.
* clutter-rectangle.h:
* clutter-rectangle.c: Update the color-related code; make
clutter_rectangle_new() and empty constructor and provide
clutter_rectangle_new_with_color(); provide color setter
and getter API.
* clutter-label.h:
* clutter-label.c: Rename the "font" property to "font-name";
update the color-related code to the new ClutterColor object;
rename clutter_label_new() to clutter_label_new_with_text(),
and add setters and getters for the properties.
* clutter-marshal.list: Add VOID:OBJECT and VOID:BOXED marshallers
generators.
* clutter-stage.h:
* clutter-stage.c: Rework the API: provide a default constructor
for a singleton object, named clutter_stage_get_default(), which
supercedes the clutter_stage() function in clutter-main; provide
new events: button-press-event, button-release-event,
key-press-event and key-release-event; update the color-related
code;
(clutter_stage_snapshot): Allow negative width and height when
taking a snapshot (meaning: use full width/height).
(clutter_stage_get_element_at_pos): Rename clutter_stage_pick().
* clutter-element.c (clutter_element_paint): Clean up the
stage and color related code.
* clutter-event.h:
* clutter-event.c: Add generic ClutterAnyEvent type; add
clutter_event_new(), clutter_event_copy() and clutter_event_free();
make ClutterEvent a boxed type.
* clutter-main.h:
* clutter-main.c: Remove clutter_stage(); add clutter_main_quit(),
for cleanly quitting from clutter_main(); add multiple mainloops
support; allocate the ClutterCntx instead of adding it to the
stack; re-work the ClutterEvent dispatching.
* clutter-group.c (clutter_group_add), (clutter_group_remove): Keep
a reference on the element when added to a ClutterGroup.
* examples/rects.py
* examples/test.c:
* examples/test-text.c:
* examples/video-cube.c:
* examples/super-oh.c:
* examples/test-video.c: Update.
2006-06-05 09:38:31 -04:00
|
|
|
|
|
|
|
g_object_notify (G_OBJECT (stage), "color");
|
2006-05-29 04:59:36 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2006-06-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter-color.h:
* clutter-color.c: Reimplement ClutterColor as a boxed type;
add convenience API for color handling, like: add, subtract,
shade, HSL color-space conversion, packing and unpacking.
* clutter-private.h: Update ClutterMainContext, and export the
main context pointer here.
* clutter-rectangle.h:
* clutter-rectangle.c: Update the color-related code; make
clutter_rectangle_new() and empty constructor and provide
clutter_rectangle_new_with_color(); provide color setter
and getter API.
* clutter-label.h:
* clutter-label.c: Rename the "font" property to "font-name";
update the color-related code to the new ClutterColor object;
rename clutter_label_new() to clutter_label_new_with_text(),
and add setters and getters for the properties.
* clutter-marshal.list: Add VOID:OBJECT and VOID:BOXED marshallers
generators.
* clutter-stage.h:
* clutter-stage.c: Rework the API: provide a default constructor
for a singleton object, named clutter_stage_get_default(), which
supercedes the clutter_stage() function in clutter-main; provide
new events: button-press-event, button-release-event,
key-press-event and key-release-event; update the color-related
code;
(clutter_stage_snapshot): Allow negative width and height when
taking a snapshot (meaning: use full width/height).
(clutter_stage_get_element_at_pos): Rename clutter_stage_pick().
* clutter-element.c (clutter_element_paint): Clean up the
stage and color related code.
* clutter-event.h:
* clutter-event.c: Add generic ClutterAnyEvent type; add
clutter_event_new(), clutter_event_copy() and clutter_event_free();
make ClutterEvent a boxed type.
* clutter-main.h:
* clutter-main.c: Remove clutter_stage(); add clutter_main_quit(),
for cleanly quitting from clutter_main(); add multiple mainloops
support; allocate the ClutterCntx instead of adding it to the
stack; re-work the ClutterEvent dispatching.
* clutter-group.c (clutter_group_add), (clutter_group_remove): Keep
a reference on the element when added to a ClutterGroup.
* examples/rects.py
* examples/test.c:
* examples/test-text.c:
* examples/video-cube.c:
* examples/super-oh.c:
* examples/test-video.c: Update.
2006-06-05 09:38:31 -04:00
|
|
|
* clutter_stage_get_color
|
2006-05-29 04:59:36 -04:00
|
|
|
* @stage: A #ClutterStage
|
2006-06-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter-color.h:
* clutter-color.c: Reimplement ClutterColor as a boxed type;
add convenience API for color handling, like: add, subtract,
shade, HSL color-space conversion, packing and unpacking.
* clutter-private.h: Update ClutterMainContext, and export the
main context pointer here.
* clutter-rectangle.h:
* clutter-rectangle.c: Update the color-related code; make
clutter_rectangle_new() and empty constructor and provide
clutter_rectangle_new_with_color(); provide color setter
and getter API.
* clutter-label.h:
* clutter-label.c: Rename the "font" property to "font-name";
update the color-related code to the new ClutterColor object;
rename clutter_label_new() to clutter_label_new_with_text(),
and add setters and getters for the properties.
* clutter-marshal.list: Add VOID:OBJECT and VOID:BOXED marshallers
generators.
* clutter-stage.h:
* clutter-stage.c: Rework the API: provide a default constructor
for a singleton object, named clutter_stage_get_default(), which
supercedes the clutter_stage() function in clutter-main; provide
new events: button-press-event, button-release-event,
key-press-event and key-release-event; update the color-related
code;
(clutter_stage_snapshot): Allow negative width and height when
taking a snapshot (meaning: use full width/height).
(clutter_stage_get_element_at_pos): Rename clutter_stage_pick().
* clutter-element.c (clutter_element_paint): Clean up the
stage and color related code.
* clutter-event.h:
* clutter-event.c: Add generic ClutterAnyEvent type; add
clutter_event_new(), clutter_event_copy() and clutter_event_free();
make ClutterEvent a boxed type.
* clutter-main.h:
* clutter-main.c: Remove clutter_stage(); add clutter_main_quit(),
for cleanly quitting from clutter_main(); add multiple mainloops
support; allocate the ClutterCntx instead of adding it to the
stack; re-work the ClutterEvent dispatching.
* clutter-group.c (clutter_group_add), (clutter_group_remove): Keep
a reference on the element when added to a ClutterGroup.
* examples/rects.py
* examples/test.c:
* examples/test-text.c:
* examples/video-cube.c:
* examples/super-oh.c:
* examples/test-video.c: Update.
2006-06-05 09:38:31 -04:00
|
|
|
* @color: return location for a #ClutterColor
|
2006-05-29 04:59:36 -04:00
|
|
|
*
|
2006-06-21 19:19:59 -04:00
|
|
|
* Retrieves the stage color.
|
2006-06-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter-color.h:
* clutter-color.c: Reimplement ClutterColor as a boxed type;
add convenience API for color handling, like: add, subtract,
shade, HSL color-space conversion, packing and unpacking.
* clutter-private.h: Update ClutterMainContext, and export the
main context pointer here.
* clutter-rectangle.h:
* clutter-rectangle.c: Update the color-related code; make
clutter_rectangle_new() and empty constructor and provide
clutter_rectangle_new_with_color(); provide color setter
and getter API.
* clutter-label.h:
* clutter-label.c: Rename the "font" property to "font-name";
update the color-related code to the new ClutterColor object;
rename clutter_label_new() to clutter_label_new_with_text(),
and add setters and getters for the properties.
* clutter-marshal.list: Add VOID:OBJECT and VOID:BOXED marshallers
generators.
* clutter-stage.h:
* clutter-stage.c: Rework the API: provide a default constructor
for a singleton object, named clutter_stage_get_default(), which
supercedes the clutter_stage() function in clutter-main; provide
new events: button-press-event, button-release-event,
key-press-event and key-release-event; update the color-related
code;
(clutter_stage_snapshot): Allow negative width and height when
taking a snapshot (meaning: use full width/height).
(clutter_stage_get_element_at_pos): Rename clutter_stage_pick().
* clutter-element.c (clutter_element_paint): Clean up the
stage and color related code.
* clutter-event.h:
* clutter-event.c: Add generic ClutterAnyEvent type; add
clutter_event_new(), clutter_event_copy() and clutter_event_free();
make ClutterEvent a boxed type.
* clutter-main.h:
* clutter-main.c: Remove clutter_stage(); add clutter_main_quit(),
for cleanly quitting from clutter_main(); add multiple mainloops
support; allocate the ClutterCntx instead of adding it to the
stack; re-work the ClutterEvent dispatching.
* clutter-group.c (clutter_group_add), (clutter_group_remove): Keep
a reference on the element when added to a ClutterGroup.
* examples/rects.py
* examples/test.c:
* examples/test-text.c:
* examples/video-cube.c:
* examples/super-oh.c:
* examples/test-video.c: Update.
2006-06-05 09:38:31 -04:00
|
|
|
*/
|
|
|
|
void
|
|
|
|
clutter_stage_get_color (ClutterStage *stage,
|
|
|
|
ClutterColor *color)
|
2006-05-29 04:59:36 -04:00
|
|
|
{
|
2006-06-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter-color.h:
* clutter-color.c: Reimplement ClutterColor as a boxed type;
add convenience API for color handling, like: add, subtract,
shade, HSL color-space conversion, packing and unpacking.
* clutter-private.h: Update ClutterMainContext, and export the
main context pointer here.
* clutter-rectangle.h:
* clutter-rectangle.c: Update the color-related code; make
clutter_rectangle_new() and empty constructor and provide
clutter_rectangle_new_with_color(); provide color setter
and getter API.
* clutter-label.h:
* clutter-label.c: Rename the "font" property to "font-name";
update the color-related code to the new ClutterColor object;
rename clutter_label_new() to clutter_label_new_with_text(),
and add setters and getters for the properties.
* clutter-marshal.list: Add VOID:OBJECT and VOID:BOXED marshallers
generators.
* clutter-stage.h:
* clutter-stage.c: Rework the API: provide a default constructor
for a singleton object, named clutter_stage_get_default(), which
supercedes the clutter_stage() function in clutter-main; provide
new events: button-press-event, button-release-event,
key-press-event and key-release-event; update the color-related
code;
(clutter_stage_snapshot): Allow negative width and height when
taking a snapshot (meaning: use full width/height).
(clutter_stage_get_element_at_pos): Rename clutter_stage_pick().
* clutter-element.c (clutter_element_paint): Clean up the
stage and color related code.
* clutter-event.h:
* clutter-event.c: Add generic ClutterAnyEvent type; add
clutter_event_new(), clutter_event_copy() and clutter_event_free();
make ClutterEvent a boxed type.
* clutter-main.h:
* clutter-main.c: Remove clutter_stage(); add clutter_main_quit(),
for cleanly quitting from clutter_main(); add multiple mainloops
support; allocate the ClutterCntx instead of adding it to the
stack; re-work the ClutterEvent dispatching.
* clutter-group.c (clutter_group_add), (clutter_group_remove): Keep
a reference on the element when added to a ClutterGroup.
* examples/rects.py
* examples/test.c:
* examples/test-text.c:
* examples/video-cube.c:
* examples/super-oh.c:
* examples/test-video.c: Update.
2006-06-05 09:38:31 -04:00
|
|
|
ClutterStagePrivate *priv;
|
|
|
|
|
|
|
|
g_return_if_fail (CLUTTER_IS_STAGE (stage));
|
|
|
|
g_return_if_fail (color != NULL);
|
|
|
|
|
|
|
|
priv = stage->priv;
|
|
|
|
|
|
|
|
color->red = priv->color.red;
|
|
|
|
color->green = priv->color.green;
|
|
|
|
color->blue = priv->color.blue;
|
|
|
|
color->alpha = priv->color.alpha;
|
2006-05-29 04:59:36 -04:00
|
|
|
}
|
|
|
|
|
2007-05-25 06:56:09 -04:00
|
|
|
/**
|
|
|
|
* clutter_stage_set_perspectivex
|
|
|
|
* @stage: A #ClutterStage
|
|
|
|
* @perspective: A #ClutterPerspective
|
|
|
|
*
|
|
|
|
* Set the stage perspective.
|
|
|
|
**/
|
|
|
|
void
|
|
|
|
clutter_stage_set_perspectivex (ClutterStage *stage,
|
|
|
|
ClutterPerspective *perspective)
|
|
|
|
{
|
|
|
|
ClutterStagePrivate *priv;
|
|
|
|
|
|
|
|
g_return_if_fail (CLUTTER_IS_STAGE (stage));
|
|
|
|
|
|
|
|
priv = stage->priv;
|
|
|
|
priv->perspective.fovy = perspective->fovy;
|
|
|
|
priv->perspective.aspect = perspective->aspect;
|
|
|
|
priv->perspective.z_near = perspective->z_near;
|
|
|
|
priv->perspective.z_far = perspective->z_far;
|
|
|
|
|
|
|
|
CLUTTER_SET_PRIVATE_FLAGS(stage, CLUTTER_ACTOR_SYNC_MATRICES);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* clutter_stage_get_perspectivex
|
|
|
|
* @stage: A #ClutterStage
|
|
|
|
* @perspective: return location for a #ClutterPerspective
|
|
|
|
*
|
|
|
|
* Retrieves the stage perspective.
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
clutter_stage_get_perspectivex (ClutterStage *stage,
|
|
|
|
ClutterPerspective *perspective)
|
|
|
|
{
|
|
|
|
ClutterStagePrivate *priv;
|
|
|
|
|
|
|
|
g_return_if_fail (CLUTTER_IS_STAGE (stage));
|
|
|
|
|
|
|
|
priv = stage->priv;
|
|
|
|
perspective->fovy = priv->perspective.fovy;
|
|
|
|
perspective->aspect = priv->perspective.aspect;
|
|
|
|
perspective->z_near = priv->perspective.z_near;
|
|
|
|
perspective->z_far = priv->perspective.z_far;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* clutter_stage_set_perspective
|
|
|
|
* @stage: A #ClutterStage
|
2007-07-24 13:34:06 -04:00
|
|
|
* @fovy: FIXME
|
|
|
|
* @aspect: FIXME
|
|
|
|
* @z_near: FIXME
|
|
|
|
* @z_far: FIXME
|
2007-05-25 06:56:09 -04:00
|
|
|
*
|
|
|
|
* Set the stage perspective.
|
2007-07-24 13:34:06 -04:00
|
|
|
*
|
|
|
|
* Since: 0.4
|
|
|
|
*/
|
2007-05-25 06:56:09 -04:00
|
|
|
void
|
2007-07-24 13:34:06 -04:00
|
|
|
clutter_stage_set_perspective (ClutterStage *stage,
|
|
|
|
gfloat fovy,
|
|
|
|
gfloat aspect,
|
|
|
|
gfloat z_near,
|
|
|
|
gfloat z_far)
|
2007-05-25 06:56:09 -04:00
|
|
|
{
|
|
|
|
ClutterStagePrivate *priv;
|
|
|
|
|
|
|
|
g_return_if_fail (CLUTTER_IS_STAGE (stage));
|
|
|
|
|
|
|
|
priv = stage->priv;
|
2007-06-25 09:43:13 -04:00
|
|
|
priv->perspective.fovy = CLUTTER_FLOAT_TO_FIXED(fovy);
|
2007-05-25 06:56:09 -04:00
|
|
|
priv->perspective.aspect = CLUTTER_FLOAT_TO_FIXED(aspect);
|
|
|
|
priv->perspective.z_near = CLUTTER_FLOAT_TO_FIXED(z_near);
|
|
|
|
priv->perspective.z_far = CLUTTER_FLOAT_TO_FIXED(z_far);
|
|
|
|
|
|
|
|
CLUTTER_SET_PRIVATE_FLAGS(stage, CLUTTER_ACTOR_SYNC_MATRICES);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* clutter_stage_get_perspective
|
|
|
|
* @stage: A #ClutterStage
|
2007-07-04 10:00:41 -04:00
|
|
|
* @fovy: FIXME
|
|
|
|
* @aspect: FIXME
|
|
|
|
* @z_near: FIXME
|
|
|
|
* @z_far: FIXME
|
2007-05-25 06:56:09 -04:00
|
|
|
*
|
|
|
|
* Retrieves the stage perspective.
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
clutter_stage_get_perspective (ClutterStage *stage,
|
|
|
|
gfloat *fovy,
|
|
|
|
gfloat *aspect,
|
|
|
|
gfloat *z_near,
|
|
|
|
gfloat *z_far)
|
|
|
|
{
|
|
|
|
ClutterStagePrivate *priv;
|
|
|
|
|
|
|
|
g_return_if_fail (CLUTTER_IS_STAGE (stage));
|
|
|
|
|
|
|
|
priv = stage->priv;
|
2007-07-04 10:00:41 -04:00
|
|
|
|
|
|
|
if (fovy)
|
|
|
|
*fovy = CLUTTER_FIXED_TO_FLOAT (priv->perspective.fovy);
|
|
|
|
|
|
|
|
if (aspect)
|
|
|
|
*aspect = CLUTTER_FIXED_TO_FLOAT (priv->perspective.aspect);
|
|
|
|
|
|
|
|
if (z_near)
|
|
|
|
*z_near = CLUTTER_FIXED_TO_FLOAT (priv->perspective.z_near);
|
|
|
|
|
|
|
|
if (z_far)
|
|
|
|
*z_far = CLUTTER_FIXED_TO_FLOAT (priv->perspective.z_far);
|
2007-05-25 06:56:09 -04:00
|
|
|
}
|
|
|
|
|
2007-03-22 14:21:59 -04:00
|
|
|
/**
|
|
|
|
* clutter_stage_fullscreen:
|
|
|
|
* @stage: a #ClutterStage
|
|
|
|
*
|
|
|
|
* Asks to place the stage window in the fullscreen state. Note that you
|
|
|
|
* shouldn't assume the window is definitely full screen afterward, because
|
|
|
|
* other entities (e.g. the user or window manager) could unfullscreen it
|
|
|
|
* again, and not all window managers honor requests to fullscreen windows.
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
clutter_stage_fullscreen (ClutterStage *stage)
|
2006-05-29 04:59:36 -04:00
|
|
|
{
|
2007-03-22 14:21:59 -04:00
|
|
|
ClutterStagePrivate *priv;
|
|
|
|
|
|
|
|
g_return_if_fail (CLUTTER_IS_STAGE (stage));
|
|
|
|
|
|
|
|
priv = stage->priv;
|
|
|
|
if (!priv->is_fullscreen)
|
|
|
|
{
|
|
|
|
priv->is_fullscreen = TRUE;
|
|
|
|
|
|
|
|
if (CLUTTER_STAGE_GET_CLASS (stage)->set_fullscreen)
|
|
|
|
CLUTTER_STAGE_GET_CLASS (stage)->set_fullscreen (stage, TRUE);
|
|
|
|
|
|
|
|
g_object_notify (G_OBJECT (stage), "fullscreen");
|
|
|
|
}
|
2006-05-29 04:59:36 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2007-03-22 14:21:59 -04:00
|
|
|
* clutter_stage_unfullscreen:
|
|
|
|
* @stage: a #ClutterStage
|
2006-05-29 04:59:36 -04:00
|
|
|
*
|
2007-03-22 14:21:59 -04:00
|
|
|
* Asks to toggle off the fullscreen state for the stage window. Note that
|
|
|
|
* you shouldn't assume the window is definitely not full screen afterward,
|
|
|
|
* because other entities (e.g. the user or window manager) could fullscreen
|
|
|
|
* it again, and not all window managers honor requests to unfullscreen
|
|
|
|
* windows.
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
clutter_stage_unfullscreen (ClutterStage *stage)
|
2006-05-29 04:59:36 -04:00
|
|
|
{
|
2006-06-08 17:28:05 -04:00
|
|
|
ClutterStagePrivate *priv;
|
2006-06-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter-color.h:
* clutter-color.c: Reimplement ClutterColor as a boxed type;
add convenience API for color handling, like: add, subtract,
shade, HSL color-space conversion, packing and unpacking.
* clutter-private.h: Update ClutterMainContext, and export the
main context pointer here.
* clutter-rectangle.h:
* clutter-rectangle.c: Update the color-related code; make
clutter_rectangle_new() and empty constructor and provide
clutter_rectangle_new_with_color(); provide color setter
and getter API.
* clutter-label.h:
* clutter-label.c: Rename the "font" property to "font-name";
update the color-related code to the new ClutterColor object;
rename clutter_label_new() to clutter_label_new_with_text(),
and add setters and getters for the properties.
* clutter-marshal.list: Add VOID:OBJECT and VOID:BOXED marshallers
generators.
* clutter-stage.h:
* clutter-stage.c: Rework the API: provide a default constructor
for a singleton object, named clutter_stage_get_default(), which
supercedes the clutter_stage() function in clutter-main; provide
new events: button-press-event, button-release-event,
key-press-event and key-release-event; update the color-related
code;
(clutter_stage_snapshot): Allow negative width and height when
taking a snapshot (meaning: use full width/height).
(clutter_stage_get_element_at_pos): Rename clutter_stage_pick().
* clutter-element.c (clutter_element_paint): Clean up the
stage and color related code.
* clutter-event.h:
* clutter-event.c: Add generic ClutterAnyEvent type; add
clutter_event_new(), clutter_event_copy() and clutter_event_free();
make ClutterEvent a boxed type.
* clutter-main.h:
* clutter-main.c: Remove clutter_stage(); add clutter_main_quit(),
for cleanly quitting from clutter_main(); add multiple mainloops
support; allocate the ClutterCntx instead of adding it to the
stack; re-work the ClutterEvent dispatching.
* clutter-group.c (clutter_group_add), (clutter_group_remove): Keep
a reference on the element when added to a ClutterGroup.
* examples/rects.py
* examples/test.c:
* examples/test-text.c:
* examples/video-cube.c:
* examples/super-oh.c:
* examples/test-video.c: Update.
2006-06-05 09:38:31 -04:00
|
|
|
|
2007-03-22 14:21:59 -04:00
|
|
|
g_return_if_fail (CLUTTER_IS_STAGE (stage));
|
2006-05-29 04:59:36 -04:00
|
|
|
|
2006-06-08 17:28:05 -04:00
|
|
|
priv = stage->priv;
|
2007-03-22 14:21:59 -04:00
|
|
|
if (priv->is_fullscreen)
|
|
|
|
{
|
|
|
|
priv->is_fullscreen = FALSE;
|
2006-06-08 17:28:05 -04:00
|
|
|
|
2007-03-22 14:21:59 -04:00
|
|
|
if (CLUTTER_STAGE_GET_CLASS (stage)->set_fullscreen)
|
|
|
|
CLUTTER_STAGE_GET_CLASS (stage)->set_fullscreen (stage, FALSE);
|
2006-06-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter-color.h:
* clutter-color.c: Reimplement ClutterColor as a boxed type;
add convenience API for color handling, like: add, subtract,
shade, HSL color-space conversion, packing and unpacking.
* clutter-private.h: Update ClutterMainContext, and export the
main context pointer here.
* clutter-rectangle.h:
* clutter-rectangle.c: Update the color-related code; make
clutter_rectangle_new() and empty constructor and provide
clutter_rectangle_new_with_color(); provide color setter
and getter API.
* clutter-label.h:
* clutter-label.c: Rename the "font" property to "font-name";
update the color-related code to the new ClutterColor object;
rename clutter_label_new() to clutter_label_new_with_text(),
and add setters and getters for the properties.
* clutter-marshal.list: Add VOID:OBJECT and VOID:BOXED marshallers
generators.
* clutter-stage.h:
* clutter-stage.c: Rework the API: provide a default constructor
for a singleton object, named clutter_stage_get_default(), which
supercedes the clutter_stage() function in clutter-main; provide
new events: button-press-event, button-release-event,
key-press-event and key-release-event; update the color-related
code;
(clutter_stage_snapshot): Allow negative width and height when
taking a snapshot (meaning: use full width/height).
(clutter_stage_get_element_at_pos): Rename clutter_stage_pick().
* clutter-element.c (clutter_element_paint): Clean up the
stage and color related code.
* clutter-event.h:
* clutter-event.c: Add generic ClutterAnyEvent type; add
clutter_event_new(), clutter_event_copy() and clutter_event_free();
make ClutterEvent a boxed type.
* clutter-main.h:
* clutter-main.c: Remove clutter_stage(); add clutter_main_quit(),
for cleanly quitting from clutter_main(); add multiple mainloops
support; allocate the ClutterCntx instead of adding it to the
stack; re-work the ClutterEvent dispatching.
* clutter-group.c (clutter_group_add), (clutter_group_remove): Keep
a reference on the element when added to a ClutterGroup.
* examples/rects.py
* examples/test.c:
* examples/test-text.c:
* examples/video-cube.c:
* examples/super-oh.c:
* examples/test-video.c: Update.
2006-06-05 09:38:31 -04:00
|
|
|
|
2007-03-22 14:21:59 -04:00
|
|
|
g_object_notify (G_OBJECT (stage), "fullscreen");
|
|
|
|
}
|
|
|
|
}
|
2006-06-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter-color.h:
* clutter-color.c: Reimplement ClutterColor as a boxed type;
add convenience API for color handling, like: add, subtract,
shade, HSL color-space conversion, packing and unpacking.
* clutter-private.h: Update ClutterMainContext, and export the
main context pointer here.
* clutter-rectangle.h:
* clutter-rectangle.c: Update the color-related code; make
clutter_rectangle_new() and empty constructor and provide
clutter_rectangle_new_with_color(); provide color setter
and getter API.
* clutter-label.h:
* clutter-label.c: Rename the "font" property to "font-name";
update the color-related code to the new ClutterColor object;
rename clutter_label_new() to clutter_label_new_with_text(),
and add setters and getters for the properties.
* clutter-marshal.list: Add VOID:OBJECT and VOID:BOXED marshallers
generators.
* clutter-stage.h:
* clutter-stage.c: Rework the API: provide a default constructor
for a singleton object, named clutter_stage_get_default(), which
supercedes the clutter_stage() function in clutter-main; provide
new events: button-press-event, button-release-event,
key-press-event and key-release-event; update the color-related
code;
(clutter_stage_snapshot): Allow negative width and height when
taking a snapshot (meaning: use full width/height).
(clutter_stage_get_element_at_pos): Rename clutter_stage_pick().
* clutter-element.c (clutter_element_paint): Clean up the
stage and color related code.
* clutter-event.h:
* clutter-event.c: Add generic ClutterAnyEvent type; add
clutter_event_new(), clutter_event_copy() and clutter_event_free();
make ClutterEvent a boxed type.
* clutter-main.h:
* clutter-main.c: Remove clutter_stage(); add clutter_main_quit(),
for cleanly quitting from clutter_main(); add multiple mainloops
support; allocate the ClutterCntx instead of adding it to the
stack; re-work the ClutterEvent dispatching.
* clutter-group.c (clutter_group_add), (clutter_group_remove): Keep
a reference on the element when added to a ClutterGroup.
* examples/rects.py
* examples/test.c:
* examples/test-text.c:
* examples/video-cube.c:
* examples/super-oh.c:
* examples/test-video.c: Update.
2006-06-05 09:38:31 -04:00
|
|
|
|
2007-03-22 14:21:59 -04:00
|
|
|
/**
|
|
|
|
* clutter_stage_show_cursor:
|
|
|
|
* @stage: a #ClutterStage
|
|
|
|
*
|
|
|
|
* Shows the cursor on the stage window
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
clutter_stage_show_cursor (ClutterStage *stage)
|
|
|
|
{
|
|
|
|
ClutterStagePrivate *priv;
|
2006-06-05 Emmanuele Bassi <ebassi@openedhand.com>
* clutter-color.h:
* clutter-color.c: Reimplement ClutterColor as a boxed type;
add convenience API for color handling, like: add, subtract,
shade, HSL color-space conversion, packing and unpacking.
* clutter-private.h: Update ClutterMainContext, and export the
main context pointer here.
* clutter-rectangle.h:
* clutter-rectangle.c: Update the color-related code; make
clutter_rectangle_new() and empty constructor and provide
clutter_rectangle_new_with_color(); provide color setter
and getter API.
* clutter-label.h:
* clutter-label.c: Rename the "font" property to "font-name";
update the color-related code to the new ClutterColor object;
rename clutter_label_new() to clutter_label_new_with_text(),
and add setters and getters for the properties.
* clutter-marshal.list: Add VOID:OBJECT and VOID:BOXED marshallers
generators.
* clutter-stage.h:
* clutter-stage.c: Rework the API: provide a default constructor
for a singleton object, named clutter_stage_get_default(), which
supercedes the clutter_stage() function in clutter-main; provide
new events: button-press-event, button-release-event,
key-press-event and key-release-event; update the color-related
code;
(clutter_stage_snapshot): Allow negative width and height when
taking a snapshot (meaning: use full width/height).
(clutter_stage_get_element_at_pos): Rename clutter_stage_pick().
* clutter-element.c (clutter_element_paint): Clean up the
stage and color related code.
* clutter-event.h:
* clutter-event.c: Add generic ClutterAnyEvent type; add
clutter_event_new(), clutter_event_copy() and clutter_event_free();
make ClutterEvent a boxed type.
* clutter-main.h:
* clutter-main.c: Remove clutter_stage(); add clutter_main_quit(),
for cleanly quitting from clutter_main(); add multiple mainloops
support; allocate the ClutterCntx instead of adding it to the
stack; re-work the ClutterEvent dispatching.
* clutter-group.c (clutter_group_add), (clutter_group_remove): Keep
a reference on the element when added to a ClutterGroup.
* examples/rects.py
* examples/test.c:
* examples/test-text.c:
* examples/video-cube.c:
* examples/super-oh.c:
* examples/test-video.c: Update.
2006-06-05 09:38:31 -04:00
|
|
|
|
2007-03-22 14:21:59 -04:00
|
|
|
g_return_if_fail (CLUTTER_IS_STAGE (stage));
|
2006-05-29 04:59:36 -04:00
|
|
|
|
2007-03-22 14:21:59 -04:00
|
|
|
priv = stage->priv;
|
|
|
|
if (!priv->is_cursor_visible)
|
2006-06-08 17:28:05 -04:00
|
|
|
{
|
2007-03-22 14:21:59 -04:00
|
|
|
priv->is_cursor_visible = TRUE;
|
2006-05-29 04:59:36 -04:00
|
|
|
|
2007-03-22 14:21:59 -04:00
|
|
|
if (CLUTTER_STAGE_GET_CLASS (stage)->set_cursor_visible)
|
|
|
|
CLUTTER_STAGE_GET_CLASS (stage)->set_cursor_visible (stage, TRUE);
|
2006-05-29 04:59:36 -04:00
|
|
|
|
2007-03-22 14:21:59 -04:00
|
|
|
g_object_notify (G_OBJECT (stage), "cursor-visible");
|
2006-06-08 17:28:05 -04:00
|
|
|
}
|
2006-05-29 04:59:36 -04:00
|
|
|
}
|
|
|
|
|
2007-03-22 14:21:59 -04:00
|
|
|
/**
|
|
|
|
* clutter_stage_hide_cursor:
|
2007-07-24 13:34:06 -04:00
|
|
|
* @stage: a #ClutterStage
|
|
|
|
*
|
|
|
|
* Makes the cursor invisible on the stage window
|
2007-03-22 14:21:59 -04:00
|
|
|
*
|
2007-07-24 13:34:06 -04:00
|
|
|
* Since: 0.4
|
2007-03-22 14:21:59 -04:00
|
|
|
*/
|
|
|
|
void
|
|
|
|
clutter_stage_hide_cursor (ClutterStage *stage)
|
2007-01-23 15:29:11 -05:00
|
|
|
{
|
2007-03-22 14:21:59 -04:00
|
|
|
ClutterStagePrivate *priv;
|
2007-01-23 15:29:11 -05:00
|
|
|
|
2007-03-22 14:21:59 -04:00
|
|
|
g_return_if_fail (CLUTTER_IS_STAGE (stage));
|
2007-01-23 15:29:11 -05:00
|
|
|
|
2007-03-22 14:21:59 -04:00
|
|
|
priv = stage->priv;
|
|
|
|
if (priv->is_cursor_visible)
|
|
|
|
{
|
|
|
|
priv->is_cursor_visible = FALSE;
|
2007-01-23 15:29:11 -05:00
|
|
|
|
2007-03-22 14:21:59 -04:00
|
|
|
if (CLUTTER_STAGE_GET_CLASS (stage)->set_cursor_visible)
|
2007-07-09 18:59:52 -04:00
|
|
|
CLUTTER_STAGE_GET_CLASS (stage)->set_cursor_visible (stage, FALSE);
|
2007-01-23 15:29:11 -05:00
|
|
|
|
2007-03-22 14:21:59 -04:00
|
|
|
g_object_notify (G_OBJECT (stage), "cursor-visible");
|
|
|
|
}
|
|
|
|
}
|
2007-01-23 15:29:11 -05:00
|
|
|
|
2007-03-22 14:21:59 -04:00
|
|
|
/**
|
|
|
|
* clutter_stage_snapshot
|
|
|
|
* @stage: A #ClutterStage
|
|
|
|
* @x: x coordinate of the first pixel that is read from stage
|
|
|
|
* @y: y coordinate of the first pixel that is read from stage
|
|
|
|
* @width: Width dimention of pixels to be read, or -1 for the
|
|
|
|
* entire stage width
|
|
|
|
* @height: Height dimention of pixels to be read, or -1 for the
|
|
|
|
* entire stage height
|
|
|
|
*
|
|
|
|
* Gets a pixel based representation of the current rendered stage.
|
|
|
|
*
|
|
|
|
* Return value: pixel representation as a #GdkPixbuf
|
|
|
|
**/
|
|
|
|
GdkPixbuf *
|
|
|
|
clutter_stage_snapshot (ClutterStage *stage,
|
|
|
|
gint x,
|
|
|
|
gint y,
|
|
|
|
gint width,
|
|
|
|
gint height)
|
|
|
|
{
|
|
|
|
ClutterStageClass *klass;
|
2006-05-29 04:59:36 -04:00
|
|
|
|
2007-03-22 14:21:59 -04:00
|
|
|
g_return_val_if_fail (CLUTTER_IS_STAGE (stage), NULL);
|
|
|
|
g_return_val_if_fail (x >= 0 && y >= 0, NULL);
|
2006-05-29 04:59:36 -04:00
|
|
|
|
2007-03-22 14:21:59 -04:00
|
|
|
klass = CLUTTER_STAGE_GET_CLASS (stage);
|
|
|
|
if (klass->draw_to_pixbuf)
|
2007-06-19 10:10:25 -04:00
|
|
|
return klass->draw_to_pixbuf (stage, x, y, width, height);
|
2006-05-29 04:59:36 -04:00
|
|
|
|
2007-03-22 14:21:59 -04:00
|
|
|
return NULL;
|
|
|
|
}
|
2006-05-29 04:59:36 -04:00
|
|
|
|
2007-03-25 07:47:30 -04:00
|
|
|
/**
|
|
|
|
* clutter_stage_get_actor_at_pos:
|
2007-07-01 12:44:24 -04:00
|
|
|
* @stage: a #ClutterStage
|
|
|
|
* @x: X coordinate to check
|
|
|
|
* @y: Y coordinate to check
|
2007-03-25 07:47:30 -04:00
|
|
|
*
|
2007-07-01 12:44:24 -04:00
|
|
|
* Checks the scene at the coordinates @x and @y and returns a pointer
|
|
|
|
* to the #ClutterActor at those coordinates.
|
2007-03-25 07:47:30 -04:00
|
|
|
*
|
|
|
|
* Return value: the actor at the specified coordinates, if any
|
|
|
|
*/
|
2007-03-22 14:21:59 -04:00
|
|
|
ClutterActor *
|
|
|
|
clutter_stage_get_actor_at_pos (ClutterStage *stage,
|
|
|
|
gint x,
|
|
|
|
gint y)
|
|
|
|
{
|
2007-05-28 14:49:34 -04:00
|
|
|
ClutterMainContext *context;
|
2007-05-28 15:14:40 -04:00
|
|
|
guchar pixel[4];
|
2007-05-28 14:49:34 -04:00
|
|
|
GLint viewport[4];
|
|
|
|
ClutterColor white = { 0xff, 0xff, 0xff, 0xff };
|
|
|
|
guint32 id;
|
2007-07-12 06:15:19 -04:00
|
|
|
gint r,g,b;
|
2007-04-27 17:13:06 -04:00
|
|
|
|
2007-05-28 14:49:34 -04:00
|
|
|
context = clutter_context_get_default ();
|
2007-04-27 17:13:06 -04:00
|
|
|
|
2007-05-28 14:49:34 -04:00
|
|
|
cogl_paint_init (&white);
|
|
|
|
cogl_enable (0);
|
2006-05-29 04:59:36 -04:00
|
|
|
|
2007-05-28 14:49:34 -04:00
|
|
|
/* Render the entire scence in pick mode - just single colored silhouette's
|
|
|
|
* are drawn offscreen (as we never swap buffers)
|
|
|
|
*/
|
|
|
|
context->pick_mode = TRUE;
|
2007-03-25 07:47:30 -04:00
|
|
|
clutter_actor_paint (CLUTTER_ACTOR (stage));
|
2007-05-28 14:49:34 -04:00
|
|
|
context->pick_mode = FALSE;
|
2007-03-25 07:47:30 -04:00
|
|
|
|
2007-07-12 06:15:19 -04:00
|
|
|
/* Calls should work under both GL and GLES, note GLES needs RGBA */
|
2007-05-28 14:49:34 -04:00
|
|
|
glGetIntegerv(GL_VIEWPORT, viewport);
|
2007-05-28 15:14:40 -04:00
|
|
|
glReadPixels(x, viewport[3] - y, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, pixel);
|
2007-03-25 07:47:30 -04:00
|
|
|
|
2007-05-28 14:49:34 -04:00
|
|
|
if (pixel[0] == 0xff && pixel[1] == 0xff && pixel[2] == 0xff)
|
|
|
|
return CLUTTER_ACTOR(stage);
|
2006-05-29 04:59:36 -04:00
|
|
|
|
2007-07-12 06:15:19 -04:00
|
|
|
cogl_get_bitmasks (&r, &g, &b, NULL);
|
|
|
|
|
|
|
|
/* Decode color back into an ID, taking into account fb depth */
|
|
|
|
id = pixel[2]>>(8-b) | pixel[1]<<b>>(8-g) | pixel[0]<<(g+b)>>(8-r);
|
2007-03-25 07:47:30 -04:00
|
|
|
|
2007-05-28 14:49:34 -04:00
|
|
|
return clutter_group_find_child_by_id (CLUTTER_GROUP (stage), id);
|
2006-05-29 04:59:36 -04:00
|
|
|
}
|
2007-03-26 19:18:39 -04:00
|
|
|
|
2007-04-25 10:22:24 -04:00
|
|
|
/**
|
|
|
|
* clutter_stage_event:
|
|
|
|
* @stage: a #ClutterStage
|
|
|
|
* @event: a #ClutterEvent
|
|
|
|
*
|
|
|
|
* This function is used to emit an event on the main stage.
|
|
|
|
* You should rarely need to use this function, except for
|
|
|
|
* synthetising events.
|
|
|
|
*
|
|
|
|
* Return value: the return value from the signal emission
|
|
|
|
*
|
|
|
|
* Since: 0.4
|
|
|
|
*/
|
|
|
|
gboolean
|
|
|
|
clutter_stage_event (ClutterStage *stage,
|
|
|
|
ClutterEvent *event)
|
|
|
|
{
|
|
|
|
gboolean res = TRUE;
|
|
|
|
gint signal_num = -1;
|
|
|
|
|
|
|
|
g_return_val_if_fail (CLUTTER_IS_STAGE (stage), FALSE);
|
|
|
|
g_return_val_if_fail (event != NULL, FALSE);
|
|
|
|
|
|
|
|
g_object_ref (stage);
|
|
|
|
|
|
|
|
g_signal_emit (stage, stage_signals[EVENT], 0, event);
|
|
|
|
|
|
|
|
switch (event->type)
|
|
|
|
{
|
|
|
|
case CLUTTER_NOTHING:
|
|
|
|
break;
|
|
|
|
case CLUTTER_BUTTON_PRESS:
|
|
|
|
case CLUTTER_2BUTTON_PRESS:
|
|
|
|
case CLUTTER_3BUTTON_PRESS:
|
|
|
|
signal_num = BUTTON_PRESS_EVENT;
|
|
|
|
break;
|
|
|
|
case CLUTTER_BUTTON_RELEASE:
|
|
|
|
signal_num = BUTTON_RELEASE_EVENT;
|
|
|
|
break;
|
|
|
|
case CLUTTER_SCROLL:
|
|
|
|
signal_num = SCROLL_EVENT;
|
|
|
|
break;
|
|
|
|
case CLUTTER_KEY_PRESS:
|
|
|
|
signal_num = KEY_PRESS_EVENT;
|
|
|
|
break;
|
|
|
|
case CLUTTER_KEY_RELEASE:
|
|
|
|
signal_num = KEY_RELEASE_EVENT;
|
|
|
|
break;
|
|
|
|
case CLUTTER_MOTION:
|
|
|
|
signal_num = MOTION_EVENT;
|
|
|
|
break;
|
|
|
|
case CLUTTER_DELETE:
|
|
|
|
signal_num = -1;
|
|
|
|
break;
|
|
|
|
case CLUTTER_STAGE_STATE:
|
|
|
|
signal_num = -1;
|
|
|
|
break;
|
|
|
|
case CLUTTER_DESTROY_NOTIFY:
|
|
|
|
signal_num = -1;
|
|
|
|
break;
|
|
|
|
case CLUTTER_CLIENT_MESSAGE:
|
|
|
|
signal_num = -1;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (signal_num != -1)
|
|
|
|
{
|
|
|
|
g_signal_emit (stage, stage_signals[signal_num], 0, event);
|
|
|
|
g_signal_emit (stage, stage_signals[EVENT_AFTER], 0, event);
|
|
|
|
res = TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
g_object_unref (stage);
|
|
|
|
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
2007-06-19 05:10:37 -04:00
|
|
|
/**
|
|
|
|
* clutter_stage_set_title
|
|
|
|
* @stage: A #ClutterStage
|
|
|
|
* @title: A utf8 string for the stage windows title.
|
|
|
|
*
|
|
|
|
* Sets the stage title.
|
|
|
|
*
|
|
|
|
* Since 0.4
|
|
|
|
**/
|
|
|
|
void
|
|
|
|
clutter_stage_set_title (ClutterStage *stage,
|
|
|
|
const gchar *title)
|
|
|
|
{
|
|
|
|
ClutterStagePrivate *priv;
|
|
|
|
|
|
|
|
g_return_if_fail (CLUTTER_IS_STAGE (stage));
|
|
|
|
|
|
|
|
priv = stage->priv;
|
|
|
|
|
|
|
|
g_free (priv->title);
|
|
|
|
priv->title = g_strdup (title);
|
|
|
|
|
|
|
|
if (CLUTTER_STAGE_GET_CLASS (stage)->set_title)
|
|
|
|
CLUTTER_STAGE_GET_CLASS (stage)->set_title (stage, priv->title);
|
|
|
|
|
|
|
|
g_object_notify (G_OBJECT (stage), "title");
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* clutter_stage_get_title
|
|
|
|
* @stage: A #ClutterStage
|
|
|
|
*
|
|
|
|
* Gets the stage title.
|
|
|
|
*
|
|
|
|
* Return value: pointer to the title string for the stage. The
|
|
|
|
* returned string is owned by the actor and should not
|
|
|
|
* be modified or freed.
|
|
|
|
*
|
|
|
|
* Since: 0.4
|
|
|
|
**/
|
|
|
|
G_CONST_RETURN gchar *
|
|
|
|
clutter_stage_get_title (ClutterStage *stage)
|
|
|
|
{
|
|
|
|
g_return_val_if_fail (CLUTTER_IS_STAGE (stage), NULL);
|
|
|
|
|
|
|
|
return stage->priv->title;
|
|
|
|
}
|
|
|
|
|
2007-03-26 19:18:39 -04:00
|
|
|
/*** Perspective boxed type ******/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* clutter_perspective_copy:
|
|
|
|
* @perspective: a #ClutterPerspective
|
|
|
|
*
|
|
|
|
* Makes a copy of the perspective structure. The result must be
|
|
|
|
* freed using clutter_perspective_free().
|
|
|
|
*
|
|
|
|
* Return value: an allocated copy of @perspective.
|
|
|
|
*
|
2007-05-25 06:56:09 -04:00
|
|
|
* Since: 0.4
|
2007-03-26 19:18:39 -04:00
|
|
|
*/
|
|
|
|
ClutterPerspective *
|
|
|
|
clutter_perspective_copy (const ClutterPerspective *perspective)
|
|
|
|
{
|
|
|
|
ClutterPerspective *result;
|
|
|
|
|
|
|
|
g_return_val_if_fail (perspective != NULL, NULL);
|
|
|
|
|
|
|
|
result = g_slice_new (ClutterPerspective);
|
|
|
|
*result = *perspective;
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* clutter_perspective_free:
|
|
|
|
* @perspective: a #ClutterPerspective
|
|
|
|
*
|
|
|
|
* Frees a perspective structure created with clutter_perspective_copy().
|
|
|
|
*
|
2007-03-27 06:46:40 -04:00
|
|
|
* Since: 0.4
|
2007-03-26 19:18:39 -04:00
|
|
|
*/
|
|
|
|
void
|
|
|
|
clutter_perspective_free (ClutterPerspective *perspective)
|
|
|
|
{
|
|
|
|
g_return_if_fail (perspective != NULL);
|
|
|
|
|
|
|
|
g_slice_free (ClutterPerspective, perspective);
|
|
|
|
}
|
|
|
|
|
|
|
|
GType
|
|
|
|
clutter_perspective_get_type (void)
|
|
|
|
{
|
|
|
|
static GType our_type = 0;
|
|
|
|
|
|
|
|
if (!our_type)
|
|
|
|
our_type = g_boxed_type_register_static
|
|
|
|
("ClutterPerspective",
|
|
|
|
(GBoxedCopyFunc) clutter_perspective_copy,
|
|
|
|
(GBoxedFreeFunc) clutter_perspective_free);
|
|
|
|
return our_type;
|
|
|
|
}
|
2007-05-25 06:56:09 -04:00
|
|
|
|