• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ clutter_actor_get_height函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中clutter_actor_get_height函数的典型用法代码示例。如果您正苦于以下问题:C++ clutter_actor_get_height函数的具体用法?C++ clutter_actor_get_height怎么用?C++ clutter_actor_get_height使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了clutter_actor_get_height函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: tick

static void
tick (ClutterTimeline *timeline,
      gint             msecs,
      gpointer         data)
{
    Flower **flowers = data;
    gint i = 0;

    for (i = 0; i < N_FLOWERS; i++)
    {
        flowers[i]->y   += flowers[i]->v;
        flowers[i]->rot += flowers[i]->rv;

        if (flowers[i]->y > (gint) clutter_actor_get_height (stage))
            flowers[i]->y = -clutter_actor_get_height (flowers[i]->ctex);

        clutter_actor_set_position (flowers[i]->ctex,
                                    flowers[i]->x, flowers[i]->y);

        clutter_actor_set_rotation (flowers[i]->ctex,
                                    CLUTTER_Z_AXIS,
                                    flowers[i]->rot,
                                    clutter_actor_get_width (flowers[i]->ctex)/2,
                                    clutter_actor_get_height (flowers[i]->ctex)/2,
                                    0);
    }
}
开发者ID:jigpu,项目名称:clutter,代码行数:27,代码来源:test-cairo-flowers.c


示例2: clutter_actor_get_width

void Platform::windowSizeChanged (ClutterStage * stage, gpointer data)
{
    Platform* pThis = static_cast<Platform*>(data);
    gfloat stageWidth = clutter_actor_get_width (pThis->m_stage);
    gfloat stageHeight = clutter_actor_get_height (pThis->m_stage);
    gfloat videoTextureWidth = clutter_actor_get_width (pThis->m_videoTexture);
    gfloat videoTextureHeight = clutter_actor_get_height (pThis->m_videoTexture);

    gfloat width = stageWidth;
    gfloat height = stageHeight;
    gfloat stageAspectRatio = stageWidth / stageHeight;
    gfloat videoTextureAspectRatio = videoTextureWidth / videoTextureHeight;

    if(videoTextureAspectRatio > stageAspectRatio) {
        height = stageWidth / videoTextureAspectRatio;
    }
    else {
        width = stageHeight * videoTextureAspectRatio;
    }

    g_print("stage: %f, %f\n", stageWidth, stageHeight);
    g_print("video texture: %f, %f\n", videoTextureWidth, videoTextureHeight);
    clutter_actor_set_size (pThis->m_videoTexture, width, height);
//		clutter_actor_set_position (pThis->m_videoTexture, w / 2,h / 2);

    videoTextureWidth = clutter_actor_get_width (pThis->m_videoTexture);
    videoTextureHeight = clutter_actor_get_height (pThis->m_videoTexture);
    g_print("stage: %f, %f\n", stageWidth, stageHeight);
    g_print("video texture: %f, %f\n", videoTextureWidth, videoTextureHeight);
}
开发者ID:shakin,项目名称:pheobe,代码行数:30,代码来源:Platform.cpp


示例3: show_helper_text_title

static void
show_helper_text_title (CalibArea *area)
{
  ClutterTransition *transition;

  gfloat height = clutter_actor_get_height (area->helper_text_title);
  clutter_actor_set_y (area->helper_text_title,
                       - clutter_actor_get_height (area->helper_text_title));
  clutter_actor_show (area->helper_text_title);

  transition = clutter_property_transition_new ("y");
  clutter_timeline_set_progress_mode (CLUTTER_TIMELINE (transition),
                                      CLUTTER_EASE_OUT);
  clutter_timeline_set_duration (CLUTTER_TIMELINE (transition),
                                 HELP_TEXT_ANIMATION_DURATION);
  clutter_transition_set_animatable (transition,
                                     CLUTTER_ANIMATABLE (area->helper_text_title));
  clutter_transition_set_from (transition, G_TYPE_FLOAT, -height);
  clutter_transition_set_to (transition, G_TYPE_FLOAT, 0.0);

  g_signal_connect (CLUTTER_TIMELINE (transition),
                    "completed",
                    G_CALLBACK (on_helper_text_title_shown),
                    area);

  clutter_timeline_start (CLUTTER_TIMELINE (transition));

  g_clear_object (&area->helper_msg_timeline);
  area->helper_msg_timeline = transition;
}
开发者ID:Amphiboly,项目名称:gnome-control-center,代码行数:30,代码来源:calibrator-gui.c


示例4: test_texture_quality_main

G_MODULE_EXPORT gint
test_texture_quality_main (int argc, char *argv[])
{
  ClutterTimeline  *timeline;
  ClutterAlpha     *alpha;
  ClutterBehaviour *depth_behavior;
  ClutterActor     *stage;
  ClutterActor     *image;
  ClutterColor      stage_color = { 0x12, 0x34, 0x56, 0xff };
  ClutterFog        stage_fog = { 10.0, -50.0 };
  GError           *error;

  clutter_init (&argc, &argv);

  stage = clutter_stage_get_default ();
  clutter_stage_set_color (CLUTTER_STAGE (stage), &stage_color);
  clutter_stage_set_use_fog (CLUTTER_STAGE (stage), TRUE);
  clutter_stage_set_fog (CLUTTER_STAGE (stage), &stage_fog);

  g_signal_connect (stage,
                    "button-press-event", G_CALLBACK (clutter_main_quit),
                    NULL);

  error = NULL;
  image = clutter_texture_new_from_file (argv[1]?argv[1]:"redhand.png", &error);
  if (error)
    g_error ("Unable to load image: %s", error->message);

  if (!argv[1])
    g_print ("Hint: the redhand.png isn't a good test image for this test.\n"
             "This test can take any clutter loadable image as an argument\n");

  /* center the image */
  clutter_actor_set_position (image, 
    (clutter_actor_get_width (stage) - clutter_actor_get_width (image))/2,
    (clutter_actor_get_height (stage) - clutter_actor_get_height (image))/2);
  clutter_container_add (CLUTTER_CONTAINER (stage), image, NULL);

  timeline = clutter_timeline_new (5000);
  g_signal_connect (timeline,
                    "completed", G_CALLBACK (timeline_completed),
                    NULL);

  alpha = clutter_alpha_new_full (timeline, CLUTTER_LINEAR);
  depth_behavior = clutter_behaviour_depth_new (alpha, -2500, 400);
  clutter_behaviour_apply (depth_behavior, image);

  clutter_actor_show (stage);
  clutter_timeline_start (timeline);

  g_timeout_add (10000, change_filter, image);

  clutter_main ();

  g_object_unref (depth_behavior);
  g_object_unref (timeline);

  return EXIT_SUCCESS;
}
开发者ID:Docworld,项目名称:chromiumos,代码行数:59,代码来源:test-texture-quality.c


示例5: test_clip_main

G_MODULE_EXPORT int
test_clip_main (int argc, char **argv)
{
  CallbackData data;
  ClutterActor *stub_actor, *label;
  gchar *file;

  if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
    return 1;

  data.current_clip.type = CLIP_NONE;
  data.clips = NULL;

  data.stage = clutter_stage_new ();
  clutter_stage_set_title (CLUTTER_STAGE (data.stage), "Clipping");
  g_signal_connect (data.stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);

  stub_actor = clutter_rectangle_new ();
  clutter_container_add (CLUTTER_CONTAINER (data.stage), stub_actor, NULL);

  file = g_build_filename (TESTS_DATADIR, "redhand.png", NULL);
  data.hand = cogl_texture_new_from_file (file,
                                          COGL_TEXTURE_NONE,
                                          COGL_PIXEL_FORMAT_ANY,
                                          NULL);
  g_free (file);

  label = clutter_text_new_with_text ("Sans 12px", instructions);
  clutter_text_set_line_wrap (CLUTTER_TEXT (label), TRUE);
  clutter_actor_set_width (label, clutter_actor_get_width (data.stage) - 310);
  clutter_actor_set_y (label,
                       clutter_actor_get_height (data.stage)
                       - clutter_actor_get_height (label));
  clutter_container_add (CLUTTER_CONTAINER (data.stage), label, NULL);

  g_signal_connect (stub_actor, "paint", G_CALLBACK (on_paint), &data);

  g_signal_connect (data.stage, "button-press-event",
                    G_CALLBACK (on_button_press), &data);
  g_signal_connect (data.stage, "button-release-event",
                    G_CALLBACK (on_button_release), &data);
  g_signal_connect (data.stage, "motion-event",
                    G_CALLBACK (on_motion), &data);
  g_signal_connect (data.stage, "key-press-event",
                    G_CALLBACK (on_key_press), &data);

  clutter_actor_show (data.stage);

  clutter_main ();

  cogl_handle_unref (data.hand);

  free_clips (&data);

  return 0;
}
开发者ID:ChrisCummins,项目名称:clutter,代码行数:56,代码来源:test-clip.c


示例6: size_change

static void
size_change (ClutterStage * stage, UserInterface * ui)
{
  gfloat stage_width, stage_height;
  gfloat new_width, new_height;
  gfloat media_width, media_height;
  gfloat stage_ar, media_ar;

  media_width = clutter_actor_get_width (ui->texture);
  media_height = clutter_actor_get_height (ui->texture);

  stage_width = clutter_actor_get_width (ui->stage);
  stage_height = clutter_actor_get_height (ui->stage);

  ui->stage_width = stage_width;
  ui->stage_height = stage_height;

  stage_ar = stage_width / stage_height;

  new_width = stage_width;
  new_height = stage_height;

  if (media_height > 0.0f && media_width > 0.0f) {
    /* if we're rotated, the media_width and media_height are swapped */
    if (ui->rotated) {
      media_ar = media_height / media_width;
    } else {
      media_ar = media_width / media_height;
    }

    /* calculate new width and height
     * note: when we're done, new_width/new_height should equal media_ar */
    if (media_ar > stage_ar) {
      /* media has wider aspect than stage so use new width as stage width and
       * scale down height */
      new_height = stage_width / media_ar;
    } else {
      new_width = stage_height * media_ar;
    }
  } else {
    g_debug ("Warning: not considering texture dimensions %fx%f\n", media_width,
        media_height);
  }

  clutter_actor_set_size (CLUTTER_ACTOR (ui->texture), new_width, new_height);
  clutter_actor_set_position (CLUTTER_ACTOR (ui->texture), stage_width / 2,
      stage_height / 2);

  update_controls_size (ui);
  center_controls (ui);
  progress_timing (ui);
}
开发者ID:phako,项目名称:snappy,代码行数:52,代码来源:user_interface.c


示例7: _lambda46_

static void _lambda46_ (GObject* _self_, GParamSpec* pspec, EaseSelectionRectangle* self) {
#line 58 "ease-selection-rectangle.vala"
	g_return_if_fail (_self_ != NULL);
#line 58 "ease-selection-rectangle.vala"
	g_return_if_fail (pspec != NULL);
#line 59 "ease-selection-rectangle.vala"
	clutter_actor_set_height ((ClutterActor*) self->priv->left, clutter_actor_get_height ((ClutterActor*) self));
#line 60 "ease-selection-rectangle.vala"
	clutter_actor_set_height ((ClutterActor*) self->priv->right, clutter_actor_get_height ((ClutterActor*) self));
#line 61 "ease-selection-rectangle.vala"
	clutter_actor_set_y ((ClutterActor*) self->priv->bottom, clutter_actor_get_height ((ClutterActor*) self));
#line 115 "ease-selection-rectangle.c"
}
开发者ID:rmujica,项目名称:Nitido,代码行数:13,代码来源:ease-selection-rectangle.c


示例8: on_new_frame

/* rotation */
void
on_new_frame (ClutterTimeline * timeline, gint frame_num, gpointer data)
{
  ClutterActor *rect_actor = CLUTTER_ACTOR (data);
  ClutterActor *texture_actor =
      g_object_get_data (G_OBJECT (timeline), "texture_actor");

  clutter_actor_set_rotation (rect_actor, CLUTTER_Z_AXIS, (gdouble) frame_num,
      clutter_actor_get_width (rect_actor) / 2,
      clutter_actor_get_height (rect_actor) / 2, 0);

  clutter_actor_set_rotation (texture_actor, CLUTTER_Z_AXIS,
      (gdouble) frame_num, clutter_actor_get_width (texture_actor) / 6,
      clutter_actor_get_height (texture_actor) / 6, 0);
}
开发者ID:zsx,项目名称:ossbuild,代码行数:16,代码来源:cluttershare.c


示例9: mex_column_get_allocation

/* MexScrollableContainerInterface */
static void
mex_column_get_allocation (MexScrollableContainer *self,
                           ClutterActor           *child,
                           ClutterActorBox        *box)
{
  MexColumnPrivate *priv = MEX_COLUMN (self)->priv;
  gfloat width, height;
  gfloat child_height;
  gint i;

  box->y1 = 0;

  if (!priv->children)
    return;

  child_height = clutter_actor_get_height (priv->children->data);
  i = g_list_index (priv->children, child);

  if (i >= 0)
    box->y1 += child_height * i;

  clutter_actor_get_size (child, &width, &height);

  box->x1 = 0;
  box->x2 = width;
  box->y2 = box->y1 + height;
}
开发者ID:ocrete,项目名称:media-explorer,代码行数:28,代码来源:mex-column.c


示例10: clarity_cover_set_album_item

void clarity_cover_set_album_item (ClarityCover *self, AlbumItem *item) {
    g_return_if_fail(CLARITY_IS_COVER(self));

    ClarityCoverPrivate *priv = CLARITY_COVER_GET_PRIVATE (self);
    g_return_if_fail(priv);

    GError *error = NULL;
    gint y_offset;

    if (!priv->texture) {
        priv->texture = gtk_clutter_texture_new();
        clutter_container_add_actor(CLUTTER_CONTAINER(self), priv->texture);
    }

    // Set cover artwork
    gtk_clutter_texture_set_from_pixbuf (GTK_CLUTTER_TEXTURE(priv->texture), item->albumart, &error);
    if (error) {
        g_warning("%s", error->message);
        g_error_free(error);
        return;
    }

    // Add reflection
    if (! priv->reflection) {
        y_offset = clutter_actor_get_height (priv->texture) + V_PADDING;

        priv->reflection = clutter_clone_new (priv->texture);
        clutter_actor_add_constraint (priv->reflection, clutter_bind_constraint_new (priv->texture, CLUTTER_BIND_X, 0.0));
        clutter_actor_add_constraint (priv->reflection, clutter_bind_constraint_new (priv->texture, CLUTTER_BIND_Y, y_offset));
        clutter_actor_add_constraint (priv->reflection, clutter_bind_constraint_new (priv->texture, CLUTTER_BIND_WIDTH, 0.0));
        clutter_actor_add_constraint (priv->reflection, clutter_bind_constraint_new (priv->texture, CLUTTER_BIND_HEIGHT, 0.0));
        g_signal_connect (priv->reflection,
                       "paint",
                       G_CALLBACK (_clone_paint_cb),
                       NULL);

        clutter_container_add_actor(CLUTTER_CONTAINER(self), priv->reflection);
    }

    ClutterActorBox box;
    gfloat w, h;
    clutter_actor_get_allocation_box (priv->texture, &box);
    clutter_actor_box_get_size (&box, &w, &h);

    if( h > DEFAULT_IMG_SIZE) {
        gfloat temp = w * DEFAULT_IMG_SIZE / h;
        clutter_actor_set_size(priv->texture, temp, DEFAULT_IMG_SIZE);
    }

    // Add title / artist data
    if (priv->title)
        g_free(priv->title);

    priv->title = g_strdup(item->albumname);

    if (priv->artist)
            g_free(priv->artist);

    priv->artist = g_strdup(item->artist);
}
开发者ID:Sprezzatech,项目名称:gtkpod,代码行数:60,代码来源:clarity_cover.c


示例11: _xfdashboard_stage_interface_get_preferred_height

/* Get preferred width/height */
static void _xfdashboard_stage_interface_get_preferred_height(ClutterActor *inActor,
																gfloat inForWidth,
																gfloat *outMinHeight,
																gfloat *outNaturalHeight)
{
	XfdashboardStageInterface			*self=XFDASHBOARD_STAGE_INTERFACE(inActor);
	XfdashboardStageInterfacePrivate	*priv=self->priv;
	gfloat								minHeight, naturalHeight;
	gint								h;
	ClutterActor						 *stage;

	/* Set up default values */
	minHeight=naturalHeight=0.0f;

	/* Get monitor size if available otherwise get stage size */
	if(priv->monitor)
	{
		xfdashboard_window_tracker_monitor_get_geometry(priv->monitor, NULL, NULL, NULL, &h);
		minHeight=naturalHeight=h;
	}
		else
		{
			stage=clutter_actor_get_stage(inActor);
			minHeight=naturalHeight=clutter_actor_get_height(stage);
		}

	/* Store sizes computed */
	if(outMinHeight) *outMinHeight=minHeight;
	if(outNaturalHeight) *outNaturalHeight=naturalHeight;
}
开发者ID:gmc-holle,项目名称:xfdashboard,代码行数:31,代码来源:stage-interface.c


示例12: make_source

ClutterActor *
make_source (void)
{
  ClutterActor *source, *actor;
  GError *error = NULL;
  gchar *file;

  ClutterColor  yellow = {0xff, 0xff, 0x00, 0xff};

  source  = clutter_group_new ();

  file = g_build_filename (TESTS_DATADIR, "redhand.png", NULL);
  actor = clutter_texture_new_from_file (file, &error);
  if (!actor)
    g_error("pixbuf load failed: %s", error ? error->message : "Unknown");

  g_free (file);

  clutter_group_add (source, actor);

  actor = clutter_text_new_with_text ("Sans Bold 50px", "Clutter");

  clutter_text_set_color (CLUTTER_TEXT (actor), &yellow);
  clutter_actor_set_y (actor, clutter_actor_get_height(source) + 5);
  clutter_group_add (source, actor);

  return source;
}
开发者ID:nobled,项目名称:clutter,代码行数:28,代码来源:test-fbo.c


示例13: test_fullscreen_main

G_MODULE_EXPORT int
test_fullscreen_main (int argc, char *argv[])
{
  ClutterActor *stage;

  clutter_init (&argc, &argv);

  stage = clutter_stage_get_default ();
  g_signal_connect (stage,
                    "fullscreen", G_CALLBACK (on_fullscreen),
                    NULL);
  g_signal_connect (stage,
                    "unfullscreen", G_CALLBACK (on_unfullscreen),
                    NULL);

  clutter_stage_set_fullscreen (CLUTTER_STAGE (stage), TRUE);
  clutter_actor_show (stage);

  g_debug ("stage size: %.2fx%.2f, mapped: %s",
           clutter_actor_get_width (stage),
           clutter_actor_get_height (stage),
           CLUTTER_ACTOR_IS_MAPPED (stage) ? "true" : "false");

  g_timeout_add (1000, toggle_fullscreen, NULL);

  clutter_main ();

  return EXIT_SUCCESS;
}
开发者ID:Docworld,项目名称:chromiumos,代码行数:29,代码来源:test-fullscreen.c


示例14: ease_pdf_actor_draw_page

static void ease_pdf_actor_draw_page (EasePdfActor* self) {
#line 415 "ease-pdf-actor.c"
	PopplerPage* page;
	double width;
	double height;
	cairo_t* cr;
	GError * _inner_error_ = NULL;
#line 58 "ease-pdf-actor.vala"
	g_return_if_fail (self != NULL);
#line 61 "ease-pdf-actor.vala"
	page = _g_object_ref0 (poppler_document_get_page (self->priv->doc, self->priv->current_page));
#line 62 "ease-pdf-actor.vala"
	width = (double) 0;
#line 62 "ease-pdf-actor.vala"
	height = (double) 0;
#line 63 "ease-pdf-actor.vala"
	poppler_page_get_size (page, &width, &height);
#line 66 "ease-pdf-actor.vala"
	if (self->priv->texture == NULL) {
#line 433 "ease-pdf-actor.c"
		ClutterCairoTexture* _tmp0_;
		ClutterActor* _tmp1_;
#line 68 "ease-pdf-actor.vala"
		self->priv->texture = (_tmp0_ = g_object_ref_sink ((ClutterCairoTexture*) clutter_cairo_texture_new ((guint) ((gint) width), (guint) ((gint) height))), _g_object_unref0 (self->priv->texture), _tmp0_);
#line 69 "ease-pdf-actor.vala"
		clutter_container_add_actor ((ClutterContainer*) (_tmp1_ = ((EaseActor*) self)->contents, CLUTTER_IS_GROUP (_tmp1_) ? ((ClutterGroup*) _tmp1_) : NULL), (ClutterActor*) self->priv->texture);
#line 71 "ease-pdf-actor.vala"
		clutter_actor_set_width ((ClutterActor*) self->priv->texture, clutter_actor_get_width (((EaseActor*) self)->contents));
#line 72 "ease-pdf-actor.vala"
		clutter_actor_set_height ((ClutterActor*) self->priv->texture, clutter_actor_get_height (((EaseActor*) self)->contents));
#line 74 "ease-pdf-actor.vala"
		g_signal_connect_object ((GObject*) ((EaseActor*) self)->contents, "notify::width", (GCallback) __lambda53__g_object_notify, self, 0);
#line 78 "ease-pdf-actor.vala"
		g_signal_connect_object ((GObject*) ((EaseActor*) self)->contents, "notify::height", (GCallback) __lambda54__g_object_notify, self, 0);
#line 448 "ease-pdf-actor.c"
	} else {
#line 86 "ease-pdf-actor.vala"
		clutter_cairo_texture_set_surface_size (self->priv->texture, (guint) ((gint) width), (guint) ((gint) height));
#line 452 "ease-pdf-actor.c"
	}
#line 90 "ease-pdf-actor.vala"
	clutter_cairo_texture_clear (self->priv->texture);
#line 91 "ease-pdf-actor.vala"
	cr = clutter_cairo_texture_create (self->priv->texture);
#line 92 "ease-pdf-actor.vala"
	ease_background_cairo_render (self->priv->pdf_element->background, cr, (gint) width, (gint) height, ease_document_get_path (ease_slide_get_parent (ease_element_get_parent (((EaseActor*) self)->element))), &_inner_error_);
#line 460 "ease-pdf-actor.c"
	if (_inner_error_ != NULL) {
		_cairo_destroy0 (cr);
		_g_object_unref0 (page);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
#line 94 "ease-pdf-actor.vala"
	poppler_page_render (page, cr);
#line 470 "ease-pdf-actor.c"
	_cairo_destroy0 (cr);
	_g_object_unref0 (page);
}
开发者ID:rmujica,项目名称:Nitido,代码行数:60,代码来源:ease-pdf-actor.c


示例15: _resize_alpha

static void
_resize_alpha (ClutterBehaviour *behave, 
               guint32           alpha,
               AstroContactRow  *row)
{
  AstroContactRowPrivate *priv;
  gfloat factor;
  gint dest_height = ROW_HEIGHT;
  gint current_height, diff_height;

  g_return_if_fail (ASTRO_IS_CONTACT_ROW (row));
  priv = row->priv;

  factor = (gfloat)alpha/CLUTTER_ALPHA_MAX_ALPHA;

  if (priv->active)
    dest_height = (ROW_HEIGHT * 2) + PADDING;

  current_height = clutter_actor_get_height (priv->bg);

  if (current_height > dest_height)
    diff_height = (current_height - dest_height) * -1;
  else
    diff_height = dest_height - current_height;

  clutter_actor_set_height (priv->bg, 
            current_height + ((diff_height * alpha)/CLUTTER_ALPHA_MAX_ALPHA));
} 
开发者ID:UIKit0,项目名称:toys,代码行数:28,代码来源:astro-contact-row.c


示例16: opt_show_add_slide

void
opt_show_add_slide (OptShow *self, OptSlide *slide)
{
  ClutterActor   *bg, *stage;

  self->priv->slides = g_list_append(self->priv->slides, slide);
  self->priv->num_slides++;

  stage = clutter_stage_get_default();

  bg = CLUTTER_ACTOR(opt_slide_get_background_texture (slide));

  if (bg == NULL)
    bg = clutter_clone_new(self->priv->bg);

  clutter_actor_set_size (bg, 
                          clutter_actor_get_width (stage),
                          clutter_actor_get_height (stage));
  

  clutter_group_add (CLUTTER_GROUP(slide), bg);

  clutter_actor_lower_bottom(bg);
  clutter_actor_show(bg);

  opt_menu_add_slide (self->priv->menu, slide);
}
开发者ID:UIKit0,项目名称:toys,代码行数:27,代码来源:opt-show.c


示例17: 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


示例18: on_fullscreen

static gboolean
on_fullscreen (GtkWindow           *window,
               GdkEventWindowState *event,
               CalibArea           *area)
{
  ClutterRect rect;

  if ((event->changed_mask & GDK_WINDOW_STATE_FULLSCREEN) == 0)
    return FALSE;

  /* Protect against window state multiple changes*/
  if (CLUTTER_ACTOR_IS_VISIBLE (area->action_layer))
    return FALSE;

  clutter_actor_show (area->action_layer);
  clutter_actor_show (area->clock);

  rect.origin.x = 0;
  rect.origin.y = 0;
  clutter_actor_get_size (area->helper_text_title,
                          &rect.size.width,
                          &rect.size.height);
  g_object_set (area->text_title_holder, "clip-rect", &rect, NULL);

  clutter_actor_get_size (area->helper_text_body,
                          &rect.size.width,
                          &rect.size.height);
  g_object_set (area->text_body_holder, "clip-rect", &rect, NULL);
  clutter_actor_set_y (area->helper_text_body,
                       - clutter_actor_get_height (area->helper_text_body));

  show_helper_text_title (area);
  return FALSE;
}
开发者ID:Amphiboly,项目名称:gnome-control-center,代码行数:34,代码来源:calibrator-gui.c


示例19: _xfdashboard_dump_actor_internal

/* Dump actors */
static void _xfdashboard_dump_actor_internal(ClutterActor *inActor, gint inLevel)
{
	ClutterActorIter	iter;
	ClutterActor		*child;
	gint				i;

	g_return_if_fail(CLUTTER_IS_ACTOR(inActor));
	g_return_if_fail(inLevel>=0);

	clutter_actor_iter_init(&iter, CLUTTER_ACTOR(inActor));
	while(clutter_actor_iter_next(&iter, &child))
	{
		for(i=0; i<inLevel; i++) g_print("  ");
		g_print("+- %[email protected]%p - name: %s - geometry: %.2f,%.2f [%.2fx%.2f], mapped: %s, visible: %s, children: %d\n",
					G_OBJECT_TYPE_NAME(child), child,
					clutter_actor_get_name(child),
					clutter_actor_get_x(child),
					clutter_actor_get_y(child),
					clutter_actor_get_width(child),
					clutter_actor_get_height(child),
					clutter_actor_is_mapped(child) ? "yes" : "no",
					clutter_actor_is_visible(child) ? "yes" : "no",
					clutter_actor_get_n_children(child));
		if(clutter_actor_get_n_children(child)>0) _xfdashboard_dump_actor_internal(child, inLevel+1);
	}
}
开发者ID:AtheistSpacePirate,项目名称:xfdashboard,代码行数:27,代码来源:utils.c


示例20: frame_cb

/* Timeline handler */
void
frame_cb (ClutterTimeline *timeline, 
	  gint             msecs,
	  gpointer         data)
{
  SuperOH        *oh = (SuperOH *)data;
  gint            i;
  guint           rotation = clutter_timeline_get_progress (timeline) * 360.0f;

  /* Rotate everything clockwise about stage center*/
  clutter_actor_set_rotation (CLUTTER_ACTOR (oh->group),
                              CLUTTER_Z_AXIS,
                              rotation,
                              WINWIDTH / 2, WINHEIGHT / 2, 0);

  for (i = 0; i < NHANDS; i++)
    {
      /* rotate each hand around there centers */
      clutter_actor_set_rotation (oh->hand[i],
                                  CLUTTER_Z_AXIS,
                                  - 6.0 * rotation,
                                  clutter_actor_get_width (oh->hand[i]) / 2,
                                  clutter_actor_get_height (oh->hand[i]) / 2,
                                  0);
      if (fade == TRUE)
        clutter_actor_set_opacity (oh->hand[i], (255 - (rotation % 255)));
    }
}
开发者ID:bhgv,项目名称:clutter-gtk-0.12-for-cluttersmith-orange-pi-2-lubuntu-tested,代码行数:29,代码来源:gtk-clutter-test.c



注:本文中的clutter_actor_get_height函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ clutter_actor_get_preferred_width函数代码示例发布时间:2022-05-30
下一篇:
C++ clutter_actor_get_allocation_box函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap