本文整理汇总了C++中clutter_actor_show_all函数的典型用法代码示例。如果您正苦于以下问题:C++ clutter_actor_show_all函数的具体用法?C++ clutter_actor_show_all怎么用?C++ clutter_actor_show_all使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了clutter_actor_show_all函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: test_fbo_main
G_MODULE_EXPORT int
test_fbo_main (int argc, char *argv[])
{
ClutterColor blue = {0x33, 0x44, 0x55, 0xff};
ClutterActor *fbo;
ClutterActor *onscreen_source;
ClutterActor *stage;
ClutterAnimation *animation;
int x_pos = 200;
int y_pos = 100;
clutter_init (&argc, &argv);
if (clutter_feature_available (CLUTTER_FEATURE_OFFSCREEN) == FALSE)
g_error("This test requires CLUTTER_FEATURE_OFFSCREEN");
stage = clutter_stage_get_default ();
clutter_actor_set_size (stage, STAGE_WIDTH, STAGE_HEIGHT);
clutter_stage_set_color (CLUTTER_STAGE (stage), &blue);
/* Create the first source */
onscreen_source = make_source();
clutter_actor_show_all (onscreen_source);
clutter_group_add (stage, onscreen_source);
y_pos = (STAGE_HEIGHT/2.0) -
(clutter_actor_get_height (onscreen_source)/2.0);
clutter_actor_set_position (onscreen_source, x_pos, y_pos);
x_pos += clutter_actor_get_width (onscreen_source);
animation = clutter_actor_animate (onscreen_source,
CLUTTER_LINEAR,
5000, /* 1 second duration */
"rotation-angle-y", 360.0f,
NULL);
clutter_animation_set_loop (animation, TRUE);
/* Second hand = actor from onscreen_source */
if ((fbo = clutter_texture_new_from_actor (onscreen_source)) == NULL)
g_error("onscreen fbo creation failed");
clutter_actor_set_position (fbo, x_pos, y_pos);
x_pos += clutter_actor_get_width (fbo);
clutter_group_add (stage, fbo);
/* Third hand = actor from Second hand */
if ((fbo = clutter_texture_new_from_actor (fbo)) == NULL)
g_error("fbo from fbo creation failed");
clutter_actor_set_position (fbo, x_pos, y_pos);
x_pos += clutter_actor_get_width (fbo);
clutter_group_add (stage, fbo);
clutter_actor_show_all (stage);
clutter_main ();
return 0;
}
开发者ID:nobled,项目名称:clutter,代码行数:59,代码来源:test-fbo.c
示例2: make_ui
static void
make_ui (ClutterActor *stage)
{
ClutterActor *editable = NULL;
ClutterActor *rectangle = NULL;
ClutterActor *label = NULL;
ClutterColor color_stage = { 0x00, 0x00, 0x00, 0xff };
ClutterColor color_text = { 0xff, 0x00, 0x00, 0xff };
ClutterColor color_sel = { 0x00, 0xff, 0x00, 0x55 };
ClutterColor color_label = { 0x00, 0xff, 0x55, 0xff };
ClutterColor color_rect = { 0x00, 0xff, 0xff, 0x55 };
ClutterGeometry editable_geom = {150, 50, 100, 75};
ClutterActor *full_entry = NULL;
ClutterActor *cloned_entry = NULL;
clutter_stage_set_color (CLUTTER_STAGE (stage), &color_stage);
clutter_actor_set_size (stage, WIDTH, HEIGHT);
label = clutter_text_new_full ("Sans Bold 32px",
"Entry",
&color_label);
clutter_actor_set_position (label, 0, 50);
/* editable */
editable = clutter_text_new_full ("Sans Bold 32px",
"ddd",
&color_text);
clutter_actor_set_position (editable, 150, 50);
clutter_text_set_editable (CLUTTER_TEXT (editable), TRUE);
clutter_text_set_selectable (CLUTTER_TEXT (editable), TRUE);
clutter_text_set_selection_color (CLUTTER_TEXT (editable),
&color_sel);
clutter_actor_grab_key_focus (editable);
clutter_actor_set_reactive (editable, TRUE);
/* rectangle: to create a entry "feeling" */
rectangle = clutter_rectangle_new_with_color (&color_rect);
clutter_actor_set_geometry (rectangle, &editable_geom);
full_entry = clutter_group_new ();
clutter_actor_set_position (full_entry, 0, 50);
clutter_actor_set_size (full_entry, 100, 75);
clutter_group_add (CLUTTER_GROUP (full_entry), label);
clutter_group_add (CLUTTER_GROUP (full_entry), editable);
clutter_group_add (CLUTTER_GROUP (full_entry), rectangle);
clutter_actor_show_all (full_entry);
clutter_actor_set_scale (full_entry, 2, 1);
clutter_group_add (CLUTTER_GROUP (stage), full_entry);
/* Cloning! */
cloned_entry = clutter_clone_new (full_entry);
clutter_actor_set_position (cloned_entry, 50, 200);
clutter_actor_set_scale (cloned_entry, 1, 2);
clutter_actor_show_all (cloned_entry);
clutter_actor_set_reactive (cloned_entry, TRUE);
clutter_group_add (CLUTTER_GROUP (stage), cloned_entry);
}
开发者ID:nobled,项目名称:clutter,代码行数:59,代码来源:cally-clone-example.c
示例3: main
int
main (int argc, char *argv[])
{
ClutterActor *stage = NULL;
Data data1, data2,data3;
guint id_2 = 0;
g_set_application_name ("AtkText");
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
return 1;
if (cally_util_a11y_init (&argc, &argv) == FALSE)
{
g_error ("This example requires the accessibility support, "
"especifically AtkUtil implementation loaded, "
"as it tries to register and remove event listeners");
}
data1.value = 10;
data2.value = 20;
data3.value = 30;
/* key event listeners */
atk_add_key_event_listener ((AtkKeySnoopFunc)atk_key_listener, &data1);
id_2 = atk_add_key_event_listener ((AtkKeySnoopFunc)atk_key_listener, &data2);
atk_add_key_event_listener ((AtkKeySnoopFunc)atk_key_listener, &data3);
atk_remove_key_event_listener (id_2);
/* event listeners */
atk_add_global_event_listener (window_event_listener, "window:create");
atk_add_global_event_listener (window_event_listener, "window:destroy");
atk_add_global_event_listener (window_event_listener, "window:activate");
atk_add_global_event_listener (window_event_listener, "window:deactivate");
stage = clutter_stage_get_default ();
make_ui (stage);
clutter_actor_show_all (stage);
if (clutter_feature_available (CLUTTER_FEATURE_STAGE_MULTIPLE))
{
stage = clutter_stage_new ();
make_ui (stage);
clutter_actor_show_all (stage);
}
clutter_main ();
return 0;
}
开发者ID:spatulasnout,项目名称:clutter,代码行数:52,代码来源:cally-atkevents-example.c
示例4: test_cogl_multitexture
void
test_cogl_multitexture (TestConformSimpleFixture *fixture,
gconstpointer data)
{
TestState state;
ClutterActor *stage;
ClutterActor *group;
guint idle_source;
stage = clutter_stage_new ();
clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color);
group = clutter_group_new ();
clutter_container_add_actor (CLUTTER_CONTAINER (stage), group);
/* We force continuous redrawing incase someone comments out the
* clutter_main_quit and wants visual feedback for the test since we
* wont be doing anything else that will trigger redrawing. */
idle_source = clutter_threads_add_idle (queue_redraw, stage);
g_signal_connect (group, "paint", G_CALLBACK (on_paint), &state);
clutter_actor_show_all (stage);
clutter_main ();
g_source_remove (idle_source);
clutter_actor_destroy (stage);
if (g_test_verbose ())
g_print ("OK\n");
}
开发者ID:ChrisCummins,项目名称:clutter,代码行数:34,代码来源:test-cogl-multitexture.c
示例5: main
int
main (int argc,
char **argv)
{
ClutterActor *stage;
ClutterActor *button;
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
{
g_critical ("Could not initialize Clutter");
return EXIT_FAILURE;
}
/* For the icon-theme only. */
gtk_init (&argc, &argv);
stage = clutter_stage_new ();
button = g_object_new (MPD_TYPE_FOLDER_BUTTON,
"label", "Documents",
"uri", "file:///home/robsta/Documents",
NULL);
g_signal_connect (button, "clicked",
G_CALLBACK (_folder_clicked_cb), NULL);
clutter_container_add_actor (CLUTTER_CONTAINER (stage), button);
clutter_actor_show_all (stage);
clutter_main ();
clutter_actor_destroy (stage);
return EXIT_SUCCESS;
}
开发者ID:Cordia,项目名称:dawati-shell,代码行数:30,代码来源:test-folder-button.c
示例6: main
int
main (int argc, char *argv[])
{
ClutterActor *stage;
ClutterActor *coglbox;
clutter_init(&argc, &argv);
stage = clutter_stage_get_default ();
clutter_actor_set_size (stage, 400, 400);
clutter_stage_set_title (CLUTTER_STAGE (stage), "Cogl Test");
coglbox = test_coglbox_new ();
clutter_container_add_actor (CLUTTER_CONTAINER (stage), coglbox);
clutter_actor_set_rotation (coglbox, CLUTTER_Y_AXIS, -30, 200, 0, 0);
clutter_actor_set_position (coglbox, 0, 100);
clutter_actor_show_all (stage);
while (1)
{
clutter_actor_hide (coglbox);
clutter_actor_show (coglbox);
SPIN();
}
return 0;
}
开发者ID:archlinuxarm-n900,项目名称:clutter08,代码行数:29,代码来源:test-cogl-primitives.c
示例7: main
int
main (int argc,
char **argv)
{
ClutterActor *stage;
ClutterActor *pane;
ClutterActor *button;
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
{
g_warning ("Unable to initialise Clutter");
return EXIT_FAILURE;
}
mx_style_load_from_file (mx_style_get_default (),
THEMEDIR "/theme.css", NULL);
stage = clutter_stage_get_default ();
pane = mpl_content_pane_new ("Foo");
clutter_actor_set_size (pane, 480, 320);
clutter_container_add_actor (CLUTTER_CONTAINER (stage), pane);
button = mx_button_new_with_label ("Bar");
mpl_content_pane_set_header_actor (MPL_CONTENT_PANE (pane), button);
button = mx_button_new_with_label ("Baz");
clutter_container_add_actor (CLUTTER_CONTAINER (pane), button);
clutter_actor_show_all (stage);
clutter_main ();
return EXIT_SUCCESS;
}
开发者ID:xclaesse,项目名称:dawati-shell,代码行数:35,代码来源:test-content-pane.c
示例8: main
int
main (int argc, char *argv[])
{
ClutterActor *stage = NULL;
g_set_application_name ("AtkEditableText");
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
return 1;
cally_util_a11y_init (&argc, &argv);
stage = clutter_stage_new ();
g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
make_ui (stage);
clutter_actor_show_all (stage);
test_atk_text (text_actor);
test_atk_text (text_editable_actor);
clutter_main ();
return 0;
}
开发者ID:ChrisCummins,项目名称:clutter,代码行数:26,代码来源:cally-atkeditabletext-example.c
示例9: art_cb
static void
art_cb (RBExtDBKey *key, const char *filename, GValue *data, MxFrame *frame)
{
ClutterActor *image;
GdkPixbuf *pixbuf;
if (data == NULL || G_VALUE_HOLDS (data, GDK_TYPE_PIXBUF) == FALSE) {
return;
}
clutter_threads_enter ();
image = gtk_clutter_texture_new ();
pixbuf = GDK_PIXBUF (g_value_get_object (data));
gtk_clutter_texture_set_from_pixbuf (GTK_CLUTTER_TEXTURE (image), pixbuf, NULL);
if (clutter_actor_get_height (image) > MAX_IMAGE_HEIGHT) {
clutter_actor_set_height (image, MAX_IMAGE_HEIGHT);
clutter_texture_set_keep_aspect_ratio (CLUTTER_TEXTURE (image), TRUE);
}
if (clutter_actor_get_width (image) > MAX_IMAGE_HEIGHT) {
clutter_actor_set_width (image, MAX_IMAGE_HEIGHT);
}
mx_bin_set_child (MX_BIN (frame), image);
clutter_actor_show_all (CLUTTER_ACTOR (frame));
clutter_threads_leave ();
}
开发者ID:hfiguiere,项目名称:rhythmbox,代码行数:27,代码来源:rb-visualizer-fullscreen.c
示例10: test_offscreen_main
G_MODULE_EXPORT int
test_offscreen_main (int argc, char *argv[])
{
ClutterActor *stage;
gboolean offscreen;
clutter_init (&argc, &argv);
stage = clutter_stage_get_default ();
/* Attempt to set up rendering offscreen */
g_object_set (stage, "offscreen", TRUE, NULL);
/* See if it worked */
g_object_get (stage, "offscreen", &offscreen, NULL);
if (offscreen == FALSE)
printf ("FAIL: Unable to setup offscreen rendering\n.");
else
printf ("SUCCESS: Able to setup offscreen rendering\n.");
clutter_actor_show_all (CLUTTER_ACTOR (stage));
clutter_main();
return 0;
}
开发者ID:JackDanger,项目名称:chromiumos,代码行数:27,代码来源:test-offscreen.c
示例11: test_cogl_multitexture
void
test_cogl_multitexture (TestConformSimpleFixture *fixture,
gconstpointer data)
{
TestState state;
ClutterActor *stage;
ClutterActor *group;
guint idle_source;
state.frame = 0;
stage = clutter_stage_get_default ();
clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color);
group = clutter_group_new ();
clutter_container_add_actor (CLUTTER_CONTAINER (stage), group);
/* We force continuous redrawing of the stage, since we need to skip
* the first few frames, and we wont be doing anything else that
* will trigger redrawing. */
idle_source = g_idle_add (queue_redraw, stage);
g_signal_connect (group, "paint", G_CALLBACK (on_paint), &state);
clutter_actor_show_all (stage);
clutter_main ();
g_source_remove (idle_source);
if (g_test_verbose ())
g_print ("OK\n");
}
开发者ID:gramozeka,项目名称:GSB-NEW,代码行数:34,代码来源:test-cogl-multitexture.c
示例12: gtk_container_remove
void AcceleratedCompositingContext::attachRootGraphicsLayer(GraphicsLayer* graphicsLayer)
{
if (!graphicsLayer) {
gtk_container_remove(GTK_CONTAINER(m_webView), m_rootLayerEmbedder);
m_rootLayerEmbedder = 0;
m_rootGraphicsLayer = 0;
return;
}
// Create an instance of GtkClutterEmbed to host actors as web layers.
if (!m_rootLayerEmbedder) {
m_rootLayerEmbedder = gtk_clutter_embed_new();
gtk_container_add(GTK_CONTAINER(m_webView), m_rootLayerEmbedder);
gtk_widget_show(m_rootLayerEmbedder);
}
// Add a root layer to the stage.
if (graphicsLayer) {
m_rootGraphicsLayer = graphicsLayer;
ClutterColor stageColor = { 0xFF, 0xFF, 0xFF, 0xFF };
ClutterActor* stage = gtk_clutter_embed_get_stage(GTK_CLUTTER_EMBED(m_rootLayerEmbedder));
clutter_stage_set_color(CLUTTER_STAGE(stage), &stageColor);
clutter_container_add_actor(CLUTTER_CONTAINER(stage), m_rootGraphicsLayer->platformLayer());
clutter_actor_show_all(stage);
}
}
开发者ID:sohocoke,项目名称:webkit,代码行数:26,代码来源:AcceleratedCompositingContextClutter.cpp
示例13: am_ready_cb
static void
am_ready_cb (GObject *source_object,
GAsyncResult *result,
gpointer userdata)
{
TpAccountManager *account_manager = TP_ACCOUNT_MANAGER (source_object);
AnerleyFeed *feed;
ClutterActor *stage;
ClutterActor *scroll_view;
ClutterActor *icon_view;
ClutterModel *model;
GError *error = NULL;
if (!tp_account_manager_prepare_finish (account_manager, result, &error))
{
g_warning ("Failed to make account manager ready: %s", error->message);
g_error_free (error);
return;
}
feed = ANERLEY_FEED (anerley_aggregate_tp_feed_new ());
model = CLUTTER_MODEL (anerley_feed_model_new (feed));
stage = clutter_stage_get_default ();
icon_view = anerley_tile_view_new (ANERLEY_FEED_MODEL (model));
scroll_view = mx_scroll_view_new ();
clutter_container_add_actor (CLUTTER_CONTAINER (stage),
CLUTTER_ACTOR (scroll_view));
clutter_container_add_actor (CLUTTER_CONTAINER (scroll_view),
CLUTTER_ACTOR (icon_view));
clutter_actor_set_size (CLUTTER_ACTOR (scroll_view), 640, 480);
clutter_actor_show_all (stage);
}
开发者ID:dudochkin-victor,项目名称:anerley,代码行数:34,代码来源:test-aggregate-tp-feed.c
示例14: fade_transition_frame_cb
static void
fade_transition_frame_cb (OptTransition *trans,
gint frame_num,
gpointer data)
{
OptSlide *from, *to;
OptTransitionPrivate *priv;
gint opacity;
priv = trans->priv;
from = opt_transition_get_from (trans);
to = opt_transition_get_to (trans);
if (frame_num == 1)
{
clutter_actor_show_all (CLUTTER_ACTOR(to));
clutter_actor_raise_top (CLUTTER_ACTOR(to));
}
opacity = (frame_num * 255 )
/ clutter_timeline_get_n_frames (CLUTTER_TIMELINE(trans));
clutter_actor_set_opacity (CLUTTER_ACTOR(to), opacity);
/* clutter_actor_set_depth (CLUTTER_ACTOR(from), - opacity/10 ); */
}
开发者ID:UIKit0,项目名称:toys,代码行数:27,代码来源:opt-transition.c
示例15: main
int
main (int argc, char *argv[])
{
ClutterActor *stage = NULL;
Data data1, data2,data3;
guint id_2 = 0;
g_set_application_name ("AtkText");
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
return 1;
cally_util_a11y_init (&argc, &argv);
data1.value = 10;
data2.value = 20;
data3.value = 30;
/* key event listeners */
atk_add_key_event_listener ((AtkKeySnoopFunc)atk_key_listener, &data1);
id_2 = atk_add_key_event_listener ((AtkKeySnoopFunc)atk_key_listener, &data2);
atk_add_key_event_listener ((AtkKeySnoopFunc)atk_key_listener, &data3);
atk_remove_key_event_listener (id_2);
/* event listeners */
atk_add_global_event_listener (window_event_listener, "window:create");
atk_add_global_event_listener (window_event_listener, "window:destroy");
atk_add_global_event_listener (window_event_listener, "window:activate");
atk_add_global_event_listener (window_event_listener, "window:deactivate");
stage = clutter_stage_get_default ();
make_ui (stage);
clutter_actor_show_all (stage);
if (clutter_feature_available (CLUTTER_FEATURE_STAGE_MULTIPLE))
{
stage = clutter_stage_new ();
make_ui (stage);
clutter_actor_show_all (stage);
}
clutter_main ();
return 0;
}
开发者ID:rib,项目名称:clutter,代码行数:47,代码来源:cally-atkevents-example.c
示例16: test_viewport_main
G_MODULE_EXPORT int
test_viewport_main (int argc, char *argv[])
{
ClutterTimeline *timeline;
ClutterAlpha *alpha;
ClutterBehaviour *r_behave;
ClutterActor *stage;
ClutterActor *hand;
ClutterColor stage_color = { 0xcc, 0xcc, 0xcc, 0xff };
gchar *file;
clutter_init (&argc, &argv);
stage = clutter_stage_get_default ();
clutter_stage_set_color (CLUTTER_STAGE (stage),
&stage_color);
/* Make a hand */
file = g_build_filename (TESTS_DATADIR, "redhand.png", NULL);
hand = clutter_texture_new_from_file (file, NULL);
if (!hand)
g_error("Unable to load image '%s'", file);
g_free (file);
clutter_actor_set_position (hand, 300, 200);
clutter_actor_set_clip (hand, 20, 21, 132, 170);
clutter_actor_set_anchor_point (hand, 86, 125);
clutter_actor_show (hand);
clutter_container_add_actor (CLUTTER_CONTAINER (stage), hand);
/* Make a timeline */
timeline = clutter_timeline_new (7692);
clutter_timeline_set_loop (timeline, TRUE);
/* Set an alpha func to power behaviour */
alpha = clutter_alpha_new_full (timeline, CLUTTER_LINEAR);
/* Create a behaviour for that alpha */
r_behave = clutter_behaviour_rotate_new (alpha,
CLUTTER_Z_AXIS,
CLUTTER_ROTATE_CW,
0.0, 360.0);
/* Apply it to our actor */
clutter_behaviour_apply (r_behave, hand);
/* start the timeline and thus the animations */
clutter_timeline_start (timeline);
clutter_actor_show_all (stage);
clutter_main();
g_object_unref (r_behave);
return 0;
}
开发者ID:gramozeka,项目名称:GSB-NEW,代码行数:59,代码来源:test-viewport.c
示例17: main
int
main (int argc, char **argv)
{
ClutterActor *stage, *image, *sub_image;
CoglHandle texture, sub_texture;
gfloat image_width, image_height;
/* Initialize Clutter */
if (clutter_init (NULL, NULL) != CLUTTER_INIT_SUCCESS)
return 1;
/* Get the default stage */
stage = clutter_stage_get_default ();
clutter_stage_set_title (CLUTTER_STAGE (stage), "Sub-texture");
/* Create a new ClutterTexture that shows smiley.png */
image = clutter_texture_new_from_file ("smiley.png", NULL);
clutter_actor_get_size (image, &image_width, &image_height);
clutter_actor_set_size (stage,
image_width * 3 / 2 + 30,
image_height + 20);
/* Grab the CoglHandle of the underlying Cogl texture */
texture = clutter_texture_get_cogl_texture (CLUTTER_TEXTURE (image));
/* Create a new Cogl texture from the handle above. That new texture is a
* rectangular region from image, more precisely the north ouest corner
* of the image */
sub_texture = cogl_texture_new_from_sub_texture (texture,
0, 0,
image_width / 2,
image_height / 2);
/* Finally, use the newly created Cogl texture to feed a new ClutterTexture
* and thus create a new actor that displays sub_texture */
sub_image = clutter_texture_new ();
clutter_texture_set_cogl_texture (CLUTTER_TEXTURE (sub_image), sub_texture);
/*
* You could have used the more straightforward g_object_new() function that
* can create an object and set some properties on it at the same time:
* sub_image = g_object_new (CLUTTER_TYPE_TEXTURE,
* "cogl-texture", sub_texture,
* NULL);
*/
/* Put the original image at (10,10) and the new sub image next to it */
clutter_actor_set_position (image, 10, 10);
clutter_actor_set_position (sub_image, 20 + image_width, 10);
/* Add both ClutterTexture to the stage */
clutter_container_add (CLUTTER_CONTAINER (stage), image, sub_image, NULL);
clutter_actor_show_all (stage);
clutter_main ();
return 0;
}
开发者ID:rib,项目名称:clutter,代码行数:59,代码来源:textures-sub-texture.c
示例18: main
int main(int argc, char *argv[]) {
GstElement *pipeline, *sink;
ClutterTimeline *timeline;
ClutterActor *stage, *texture;
/* clutter-gst takes care of initializing Clutter and GStreamer */
if (clutter_gst_init (&argc, &argv) != CLUTTER_INIT_SUCCESS) {
g_error ("Failed to initialize clutter\n");
return -1;
}
stage = clutter_stage_get_default ();
/* Make a timeline */
timeline = clutter_timeline_new (1000);
g_object_set(timeline, "loop", TRUE, NULL);
/* Create new texture and disable slicing so the video is properly mapped onto it */
texture = CLUTTER_ACTOR (g_object_new (CLUTTER_TYPE_TEXTURE, "disable-slicing", TRUE, NULL));
g_signal_connect (texture, "size-change", G_CALLBACK (size_change), NULL);
/* Build the GStreamer pipeline */
pipeline = gst_parse_launch ("playbin2 uri=http://docs.gstreamer.com/media/sintel_trailer-480p.webm", NULL);
/* Instantiate the Clutter sink */
sink = gst_element_factory_make ("autocluttersink", NULL);
if (sink == NULL) {
/* Revert to the older cluttersink, in case autocluttersink was not found */
sink = gst_element_factory_make ("cluttersink", NULL);
}
if (sink == NULL) {
g_printerr ("Unable to find a Clutter sink.\n");
return -1;
}
/* Link GStreamer with Clutter by passing the Clutter texture to the Clutter sink*/
g_object_set (sink, "texture", texture, NULL);
/* Add the Clutter sink to the pipeline */
g_object_set (pipeline, "video-sink", sink, NULL);
/* Start playing */
gst_element_set_state (pipeline, GST_STATE_PLAYING);
/* start the timeline */
clutter_timeline_start (timeline);
/* Add texture to the stage, and show it */
clutter_group_add (CLUTTER_GROUP (stage), texture);
clutter_actor_show_all (stage);
clutter_main();
/* Free resources */
gst_element_set_state (pipeline, GST_STATE_NULL);
gst_object_unref (pipeline);
return 0;
}
开发者ID:huamulan,项目名称:gst-sdk-tutorial,代码行数:58,代码来源:basic-tutorial-15.c
示例19: cover_art_entry_changed_cb
static void
cover_art_entry_changed_cb (RBShellPlayer *player, RhythmDBEntry *entry, MxFrame *frame)
{
clutter_threads_enter ();
set_blank_image (frame);
clutter_actor_show_all (CLUTTER_ACTOR (frame));
clutter_threads_leave ();
request_cover_art (frame, entry);
}
开发者ID:hfiguiere,项目名称:rhythmbox,代码行数:10,代码来源:rb-visualizer-fullscreen.c
示例20: astro_images_window_init
static void
astro_images_window_init (AstroImagesWindow *window)
{
AstroImagesWindowPrivate *priv;
priv = window->priv = ASTRO_IMAGES_WINDOW_GET_PRIVATE (window);
clutter_actor_set_position (CLUTTER_ACTOR (window), 0, 0);
clutter_actor_show_all (CLUTTER_ACTOR (window));
}
开发者ID:UIKit0,项目名称:toys,代码行数:10,代码来源:astro-images-window.c
注:本文中的clutter_actor_show_all函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论