Lines Matching refs:button
632 typedef struct Button {
639 } Button;
642 button_done( Button* button )
644 skin_image_unref( &button->image );
645 button->background = NULL;
649 button_init( Button* button, SkinButton* sbutton, SkinLocation* loc, Background* back, SkinRect* frame, SkinLayout* slayout )
653 button->image = skin_image_rotate( sbutton->image, loc->rotation );
654 button->background = back;
655 button->keycode = sbutton->keycode;
656 button->down = 0;
663 button->keycode = android_keycode_rotate( button->keycode, -slayout->dpad_rotation );
669 button->origin = r.pos;
670 skin_rect_intersect( &button->rect, &r, frame );
674 button_redraw( Button* button, SkinRect* rect, SDL_Surface* surface )
678 if (skin_rect_intersect( &r, rect, &button->rect ))
680 if ( button->down && button->image != SKIN_IMAGE_NONE )
684 rs.x = r.pos.x - button->origin.x;
685 rs.y = r.pos.y - button->origin.y;
694 if (button->image != SKIN_IMAGE_NONE) {
695 SDL_BlitSurface( skin_image_surface(button->image), &rs, surface, &rd );
696 if (button->down > 1)
697 SDL_BlitSurface( skin_image_surface(button->image), &rs, surface, &rd );
719 Button* pressed;
720 Button* hover;
724 button_state_reset( ButtonState* button )
726 button->pressed = NULL;
727 button->hover = NULL;
803 Button* buttons;
810 #define LAYOUT_LOOP_BUTTONS(layout,button) \
812 Button* __button = (layout)->buttons; \
813 Button* __button_end = __button + (layout)->num_buttons; \
815 Button* button = __button;
925 Button* button = layout->buttons + n_buttons;
926 button_init( button, sbutton, loc, back, &layout->rect, slayout );
943 ButtonState button;
1016 ButtonState* button = &window->button;
1047 Button* hover = button->hover;
1055 button->hover = NULL;
1115 button->hover = hover;
1449 button_state_reset( &window->button );
1608 Button* button = layout->buttons;
1609 Button* end = button + layout->num_buttons;
1610 for ( ; button < end; button++ )
1611 button_redraw( button, rect, window->surface );
1675 Button* button;
1688 mx = ev->button.x;
1689 my = ev->button.y;
1695 ev->button.x, ev->button.y, window->finger.pos.x,
1702 window->button.pressed = NULL;
1703 button = window->button.hover;
1704 if(button) {
1705 button->down += 1;
1706 skin_window_redraw( window, &button->rect );
1707 window->button.pressed = button;
1708 if(button->keycode) {
1709 button->keycode, 1);
1720 button = window->button.pressed;
1721 mx = ev->button.x;
1722 my = ev->button.y;
1724 if (button)
1726 button->down = 0;
1727 skin_window_redraw( window, &button->rect );
1728 if(button->keycode) {
1729 user_event_key(button->keycode, 0);
1731 window->button.pressed = NULL;
1732 window->button.hover = NULL;
1748 mx = ev->button.x;
1749 my = ev->button.y;
1751 if ( !window->button.pressed )