Lines Matching refs:button
510 typedef struct Button {
517 } Button;
520 button_done( Button* button )
522 skin_image_unref( &button->image );
523 button->background = NULL;
527 button_init( Button* button, SkinButton* sbutton, SkinLocation* loc, Background* back, SkinRect* frame, SkinLayout* slayout )
531 button->image = skin_image_rotate( sbutton->image, loc->rotation );
532 button->background = back;
533 button->keycode = sbutton->keycode;
534 button->down = 0;
541 button->keycode = android_keycode_rotate( button->keycode, -slayout->dpad_rotation );
547 button->origin = r.pos;
548 skin_rect_intersect( &button->rect, &r, frame );
552 button_redraw( Button* button, SkinRect* rect, SDL_Surface* surface )
556 if (skin_rect_intersect( &r, rect, &button->rect ))
558 if ( button->down && button->image != SKIN_IMAGE_NONE )
562 rs.x = r.pos.x - button->origin.x;
563 rs.y = r.pos.y - button->origin.y;
572 if (button->image != SKIN_IMAGE_NONE) {
573 SDL_BlitSurface( skin_image_surface(button->image), &rs, surface, &rd );
574 if (button->down > 1)
575 SDL_BlitSurface( skin_image_surface(button->image), &rs, surface, &rd );
597 Button* pressed;
598 Button* hover;
602 button_state_reset( ButtonState* button )
604 button->pressed = NULL;
605 button->hover = NULL;
681 Button* buttons;
688 #define LAYOUT_LOOP_BUTTONS(layout,button) \
690 Button* __button = (layout)->buttons; \
691 Button* __button_end = __button + (layout)->num_buttons; \
693 Button* button = __button;
803 Button* button = layout->buttons + n_buttons;
804 button_init( button, sbutton, loc, back, &layout->rect, slayout );
821 ButtonState button;
894 ButtonState* button = &window->button;
925 Button* hover = button->hover;
933 button->hover = NULL;
979 button->hover = hover;
1218 button_state_reset( &window->button );
1360 Button* button = layout->buttons;
1361 Button* end = button + layout->num_buttons;
1362 for ( ; button < end; button++ )
1363 button_redraw( button, rect, window->surface );
1426 Button* button;
1439 mx = ev->button.x;
1440 my = ev->button.y;
1446 ev->button.x, ev->button.y, window->finger.pos.x,
1453 window->button.pressed = NULL;
1454 button = window->button.hover;
1455 if(button) {
1456 button->down += 1;
1457 skin_window_redraw( window, &button->rect );
1458 window->button.pressed = button;
1459 if(button->keycode) {
1460 user_event_key(button->keycode, 1);
1471 button = window->button.pressed;
1472 mx = ev->button.x;
1473 my = ev->button.y;
1475 if (button)
1477 button->down = 0;
1478 skin_window_redraw( window, &button->rect );
1479 if(button->keycode) {
1480 user_event_key(button->keycode, 0);
1482 window->button.pressed = NULL;
1483 window->button.hover = NULL;
1499 mx = ev->button.x;
1500 my = ev->button.y;
1502 if ( !window->button.pressed )