Lines Matching refs:disp
99 display_done( ADisplay* disp )
101 disp->data = NULL;
102 disp->qfbuff = NULL;
103 skin_image_unref( &disp->onion );
107 display_init( ADisplay* disp, SkinDisplay* sdisp, SkinLocation* loc, SkinRect* frame )
109 skin_rect_rotate( &disp->rect, &sdisp->rect, loc->rotation );
110 disp->rect.pos.x += loc->anchor.x;
111 disp->rect.pos.y += loc->anchor.y;
113 disp->rotation = (loc->rotation + sdisp->rotation) & 3;
114 switch (disp->rotation) {
116 disp->origin = disp->rect.pos;
120 disp->origin.x = disp->rect.pos.x + disp->rect.size.w;
121 disp->origin.y = disp->rect.pos.y;
125 disp->origin.x = disp->rect.pos.x + disp->rect.size.w;
126 disp->origin.y = disp->rect.pos.y + disp->rect.size.h;
130 disp->origin.x = disp->rect.pos.x;
131 disp->origin.y = disp->rect.pos.y + disp->rect.size.h;
134 skin_size_rotate( &disp->datasize, &sdisp->rect.size, sdisp->rotation );
135 skin_rect_intersect( &disp->rect, &disp->rect, frame );
138 disp->rect.pos.x, disp->rect.pos.y,
139 disp->rect.size.w, disp->rect.size.h,
140 disp->datasize.w, disp->datasize.h);
142 disp->qfbuff = sdisp->qfbuff;
143 disp->data = sdisp->qfbuff->pixels;
144 disp->onion = NULL;
146 disp->brightness = LCD_BRIGHTNESS_DEFAULT;
148 return (disp->data == NULL) ? -1 : 0;
173 display_set_onion( ADisplay* disp, SkinImage* onion, SkinRotation rotation, int blend )
176 SkinRect* rect = &disp->rect;
177 SkinRect* orect = &disp->onion_rect;
179 rotation = (rotation + disp->rotation) & 3;
181 skin_image_unref( &disp->onion );
182 disp->onion = skin_image_clone_full( onion, rotation, blend );
184 onion_w = skin_image_w(disp->onion);
185 onion_h = skin_image_h(disp->onion);
385 display_redraw_rect16( ADisplay* disp, SkinRect* rect, SDL_Surface* surface)
387 int x = rect->pos.x - disp->rect.pos.x;
388 int y = rect->pos.y - disp->rect.pos.y;
391 int disp_w = disp->rect.size.w;
392 int disp_h = disp->rect.size.h;
395 int src_pitch = disp->datasize.w*2;
396 uint8_t* src_line = (uint8_t*)disp->data;
403 switch ( disp->rotation & 3 )
479 display_redraw_rect32( ADisplay* disp, SkinRect* rect,SDL_Surface* surface)
481 int x = rect->pos.x - disp->rect.pos.x;
482 int y = rect->pos.y - disp->rect.pos.y;
485 int disp_w = disp->rect.size.w;
486 int disp_h = disp->rect.size.h;
489 int src_pitch = disp->datasize.w*4;
490 uint8_t* src_line = (uint8_t*)disp->data;
497 switch ( disp->rotation & 3 )
572 display_redraw( ADisplay* disp, SkinRect* rect, SDL_Surface* surface )
576 if (skin_rect_intersect( &r, rect, &disp->rect ))
580 "disp.pos(%d,%d) disp.size(%d,%d) datasize(%d,%d) rect.pos(%d,%d) rect.size(%d,%d)\n",
581 r.pos.x - disp->rect.pos.x, r.pos.y - disp->rect.pos.y,
582 r.size.w, r.size.h, disp->rect.pos.x, disp->rect.pos.y,
583 disp->rect.size.w, disp->rect.size.h, disp->datasize.w, disp->datasize.h,
588 if (disp->brightness == LCD_BRIGHTNESS_OFF)
594 if (disp->qfbuff->bits_per_pixel == 32)
595 display_redraw_rect32(disp, &r, surface);
597 display_redraw_rect16(disp, &r, surface);
602 lcd_brightness_argb32( surface->pixels, &r, surface->pitch, disp->brightness );
607 if (disp->onion != NULL) {
610 if ( skin_rect_intersect( &r2, &r, &disp->onion_rect ) ) {
618 rs.x = rd.x - disp->onion_rect.pos.x;
619 rs.y = rd.y - disp->onion_rect.pos.y;
623 SDL_BlitSurface( skin_image_surface(disp->onion), &rs, surface, &rd );
919 ADisplay* disp = layout->displays + n_displays;
920 display_init( disp, part->display, loc, &layout->rect );
997 LAYOUT_LOOP_DISPLAYS(&window->layout,disp)
998 if ( skin_rect_contains( &disp->rect, x, y ) ) {
1000 finger->display = disp;
1001 finger->pos.x = x - disp->origin.x;
1002 finger->pos.y = y - disp->origin.y;
1004 skin_pos_rotate( &finger->pos, &finger->pos, -disp->rotation );
1019 ADisplay* disp = finger->display;
1021 int dx = x - disp->rect.pos.x;
1022 int dy = y - disp->rect.pos.y;
1028 else if (dx >= disp->rect.size.w) {
1029 dx = disp->rect.size.w - 1;
1035 } else if (dy >= disp->rect.size.h) {
1036 dy = disp->rect.size.h-1;
1040 finger->pos.x = dx + (disp->rect.pos.x - disp->origin.x);
1041 finger->pos.y = dy + (disp->rect.pos.y - disp->origin.y);
1043 skin_pos_rotate( &finger->pos, &finger->pos, -disp->rotation );
1169 ADisplay* disp = window->layout.displays;
1170 SkinRect drect = disp->rect;
1184 drect.size.w, drect.size.h, disp->rotation * -90.);
1431 ADisplay* disp;
1439 disp = window->layout.displays;
1440 if (disp != NULL && window->onion)
1441 display_set_onion( disp,
1481 ADisplay* disp = window->layout.displays;
1483 if (disp != NULL) {
1484 disp->brightness = brightness;
1524 ADisplay* disp;
1533 disp = window->layout.displays;
1535 if (disp != NULL)
1536 display_set_onion( disp, window->onion, onion_rotation, onion_alpha );
1601 ADisplay* disp = layout->displays;
1602 ADisplay* end = disp + layout->num_displays;
1603 for ( ; disp < end; disp++ )
1604 display_redraw( disp, rect, window->surface );
1649 ADisplay* disp = window->layout.displays;
1651 if (disp != NULL) {
1652 info->width = disp->datasize.w;
1653 info->height = disp->datasize.h;
1654 info->rotation = disp->rotation;
1655 info->data = disp->data;
1775 ADisplay* disp = skin_window_display(window);
1780 if (disp != NULL) {
1787 skin_rect_rotate( &r, &r, disp->rotation );
1788 r.pos.x += disp->origin.x;
1789 r.pos.y += disp->origin.y;
1794 display_redraw( disp, &r, window->surface );