예제 #1
0
static gboolean
handle_capture_event_cb (ClutterActor *trough,
                         ClutterEvent *event,
                         StScrollBar  *bar)
{
  if (clutter_event_type (event) == CLUTTER_MOTION)
    {
      move_slider (bar,
                   ((ClutterMotionEvent*) event)->x,
                   ((ClutterMotionEvent*) event)->y);
    }
  else if (clutter_event_type (event) == CLUTTER_BUTTON_RELEASE
           && ((ClutterButtonEvent*) event)->button == 1)
    {
      ClutterActor *stage, *target;

      stop_scrolling (bar);

      /* check if the mouse pointer has left the handle during the drag and
       * remove the hover state if it has */
      stage = clutter_actor_get_stage (bar->priv->trough);
      target = clutter_stage_get_actor_at_pos ((ClutterStage*) stage,
                                               CLUTTER_PICK_REACTIVE,
                                               ((ClutterButtonEvent*) event)->x,
                                               ((ClutterButtonEvent*) event)->y);
      if (target != bar->priv->handle)
        {
          st_widget_remove_style_pseudo_class ((StWidget*) bar->priv->handle, "hover");
        }
    }

  return TRUE;
}
예제 #2
0
static void
st_scroll_bar_unmap (ClutterActor *actor)
{
  CLUTTER_ACTOR_CLASS (st_scroll_bar_parent_class)->unmap (actor);

  stop_scrolling (ST_SCROLL_BAR (actor));
}
예제 #3
0
static gboolean
handle_button_release_event_cb (ClutterActor       *trough,
                                ClutterButtonEvent *event,
                                StScrollBar        *bar)
{
  if (event->button != 1)
    return FALSE;

  stop_scrolling (bar);
  return TRUE;
}
예제 #4
0
static void
st_scroll_bar_unmap (ClutterActor *actor)
{
  StScrollBarPrivate *priv = ST_SCROLL_BAR (actor)->priv;

  CLUTTER_ACTOR_CLASS (st_scroll_bar_parent_class)->unmap (actor);

  stop_scrolling (ST_SCROLL_BAR (actor));

  clutter_actor_unmap (priv->bw_stepper);
  clutter_actor_unmap (priv->fw_stepper);
  clutter_actor_unmap (priv->trough);

  if (priv->handle)
    clutter_actor_unmap (priv->handle);
}
예제 #5
0
파일: BKGDBELL.C 프로젝트: Ced2911/umk3
void bell_fall_scan(void)
{
	long a0,a1,a2,a3,a4,a5,a6,a7;
	OBJECT *oa8,*oa0;
	OBJECT *obj=current_proc->pa8;

	if (distance_off_ground(current_proc,current_proc->pa8)<=224)
		return;						// wait to get off screen

	stop_me(current_proc->pa8);
	obj->oxpos.u.intpos=0xb0;		// SCX(600);
	process_sleep(0x50);			// let scroller catch up!

	set_noedge(current_proc->pdata.p_otherguy);		// dont allow otherguy to update position with neew world edges

	obj->oyvel.pos=SCY(0xc0000);
	obj->ograv.pos=0;
	set_x_vel(current_proc->pa8,0);

	/* bfall3 */
	do
	{
		process_sleep(1);
	}
	while(distance_off_ground(current_proc,current_proc->pa8)>SCY(0x10));

	dallprc(PID_BACKG);
	dallprc(PID_SCROLL);
	stop_scrolling();

	a0=worldtlx.pos;
	a1=worldtlx1.pos;
	a2=worldtlx2.pos;
	a3=worldtlx3.pos;
	a4=worldtlx4.pos;
	a5=worldtlx5.pos;
	a6=worldtlx6.pos;
	a7=worldtlx7.pos;

	/* init */
	init_background_module(bell2_module);
	worldtly.u.intpos-=SCY(0x50);
	multi_plane();
	worldtly.u.intpos+=SCY(0x50);

	worldtlx.pos=a0;
	worldtlx1.pos=a1;
	worldtlx2.pos=a2;
	worldtlx3.pos=a3;
	worldtlx4.pos=a4;
	worldtlx5.pos=a5;
	worldtlx6.pos=a6;
	worldtlx7.pos=a7;

	(OBJECT *)a0=baklst8;
	a7=0;
	/* adj8 */
	do
	{
		a1=((OBJECT *)a0)->oypos.u.intpos=((OBJECT *)a0)->oypos.u.intpos+ONE_FLOOR;
		a1+=((OBJECT *)a0)->osize.u.ypos;
		if (a1>=a7)
			a7=a1;				// new lowest point

		(OBJECT *)a0=((OBJECT*)a0)->olink;
	}
	while((OBJECT *)a0!=NULL);

	/* tack on xtra pieces to bottom of floor */
	(long)current_proc->a7=a7;
	(long)current_proc->a6=worldtlx.u.intpos;
	current_proc->a3=0;
	floor_piece();
	broken_floor_a();
	broken_floor_b();
	current_proc->a3^=1;
	floor_piece();

	CREATE(PID_FX,crash_fx)->pa8=(OBJECT *)(current_proc->pdata.p_store7);
	scrolly.pos=SCY(0xc0000);					// dont fall 2 fast

	/* wait_old_offscreen */
	do
	{
		process_sleep(1);
	}
	while(worldtly.u.intpos<SCRBOT);

	current_proc->pa8=(OBJECT*)current_proc->pdata.p_store7;
	clear_shadow_bit(current_proc->pdata.p_otherguy);
	set_inviso(current_proc->pdata.p_otherguy);

	/* get rid of bell tower #1 images */
	f_skew=0;
	delolist(&baklst1);
	delolist(&baklst2);
	delolist(&baklst3);
	delolist(&baklst4);
	delolist(&baklst5);
	delolist(&baklst6);
	delolist(&baklst7);

	/* make another copy of bell2 on list 7 */
	(short)current_proc->a10=worldtly.u.intpos;
	worldtlx7.pos=worldtlx8.pos;
	current_proc->pa8=oa8=baklst8;
	oa0=get_object();
	copy_obj(oa8,oa0);
	baklst7=oa0;
	goto copy81;

	/* copy8 */
	do
	{
		oa0=get_object();
		copy_obj(oa8,oa0);
		((OBJECT *)current_proc->pa9)->olink=oa0;
copy81:
		oa0->oypos.u.intpos+=ONE_FLOOR;
		oa0->olink=NULL;
		(OBJECT *)current_proc->pa9=oa0;
		oa8=oa8->olink;
	}
	while(oa8!=NULL);

	scroll_down_1_floor();
	baklst_down_2_floors(&baklst8);
	scroll_down_1_floor();
	baklst_down_2_floors(&baklst7);

	/* speed up past the guy !! */
	scrolly.pos=SCY(0x100000);				// dont fall to fast
	scroll_down_1_floor();

	/* fix borken pieces !!! */
	fix_broken_pieces(baklst7);
	fix_broken_pieces(baklst8);

	baklst_down_2_floors(&baklst8);
	scroll_down_1_floor();
	baklst_down_2_floors(&baklst7);
	scroll_down_1_floor();

	current_proc->a10=14;
	(short)current_proc->a3=worldtlx.u.intpos;
	/* spike3 */
	do
	{
		oa0=make_a_spike();
		oa0->ozval=0;

		oa0=make_a_spike();
		oa0->ozval=100;

	}
	while(--current_proc->a10>0 );

	process_sleep(5);
	scrolly.pos=0;
	current_proc->pa8=oa8=(OBJECT*)current_proc->pdata.p_store7;

	/* falld3, fall till I meet my maker !!! */
	do
	{
		process_sleep(1);
	}
	while(oa8->oypos.u.intpos<SCY(0xa40) );

	rsnd_stab();
	death_scream;
	find_ani_part2(ANIM_KDOWN);
	do_next_a9_frame(oa8);

	oa8->oyvel.pos=SCY(0xa0000);

	/* falld4 */
	do
	{
		process_sleep(1);
		oa8->oyvel.pos>>=4;
	}
	while(oa8->oyvel.pos>SCY(0x10000) );

	ground_y=oa8->oypos.u.intpos+SCY(0x100);
	create_blood_proc(BLOOD_PIT);

	process_sleep(10);

	death_blow_complete();
	f_no_bonus=0;								// allow bonus routine to do its thing
	stop_a8(oa8);
	wait_forever();
}