Lines Matching defs: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;
170 display_set_onion( ADisplay* disp, SkinImage* onion, SkinRotation rotation, int blend )
173 SkinRect* rect = &disp->rect;
174 SkinRect* orect = &disp->onion_rect;
176 rotation = (rotation + disp->rotation) & 3;
178 skin_image_unref( &disp->onion );
179 disp->onion = skin_image_clone_full( onion, rotation, blend );
181 onion_w = skin_image_w(disp->onion);
182 onion_h = skin_image_h(disp->onion);
382 display_redraw_rect16( ADisplay* disp, SkinRect* rect, SDL_Surface* surface)
384 int x = rect->pos.x - disp->rect.pos.x;
385 int y = rect->pos.y - disp->rect.pos.y;
388 int disp_w = disp->rect.size.w;
389 int disp_h = disp->rect.size.h;
392 int src_pitch = disp->datasize.w*2;
393 uint8_t* src_line = (uint8_t*)disp->data;
396 switch ( disp->rotation & 3 )
472 display_redraw_rect32( ADisplay* disp, SkinRect* rect,SDL_Surface* surface)
474 int x = rect->pos.x - disp->rect.pos.x;
475 int y = rect->pos.y - disp->rect.pos.y;
478 int disp_w = disp->rect.size.w;
479 int disp_h = disp->rect.size.h;
482 int src_pitch = disp->datasize.w*4;
483 uint8_t* src_line = (uint8_t*)disp->data;
486 switch ( disp->rotation & 3 )
561 display_redraw( ADisplay* disp, SkinRect* rect, SDL_Surface* surface )
565 if (skin_rect_intersect( &r, rect, &disp->rect ))
569 "disp.pos(%d,%d) disp
570 r.pos.x - disp->rect.pos.x, r.pos.y - disp->rect.pos.y,
571 r.size.w, r.size.h, disp->rect.pos.x, disp->rect.pos.y,
572 disp->rect.size.w, disp->rect.size.h, disp->datasize.w, disp->datasize.h,
577 if (disp->brightness == LCD_BRIGHTNESS_OFF)
583 if (disp->qfbuff->bits_per_pixel == 32)
584 display_redraw_rect32(disp, &r, surface);
586 display_redraw_rect16(disp, &r, surface);
591 lcd_brightness_argb32( surface->pixels, &r, surface->pitch, disp->brightness );
596 if (disp->onion != NULL) {
599 if ( skin_rect_intersect( &r2, &r, &disp->onion_rect ) ) {
607 rs.x = rd.x - disp->onion_rect.pos.x;
608 rs.y = rd.y - disp->onion_rect.pos.y;
612 SDL_BlitSurface( skin_image_surface(disp->onion), &rs, surface, &rd );
908 ADisplay* disp = layout->displays + n_displays;
909 display_init( disp, part->display, loc, &layout->rect );
986 LAYOUT_LOOP_DISPLAYS(&window->layout,disp)
987 if ( skin_rect_contains( &disp->rect, x, y ) ) {
989 finger->display = disp;
990 finger->pos.x = x - disp->origin.x;
991 finger->pos.y = y - disp->origin.y;
993 skin_pos_rotate( &finger->pos, &finger->pos, -disp->rotation );
1008 ADisplay* disp = finger->display;
1010 int dx = x - disp->rect.pos.x;
1011 int dy = y - disp->rect.pos.y;
1017 else if (dx >= disp->rect.size.w) {
1018 dx = disp->rect.size.w - 1;
1024 } else if (dy >= disp->rect.size.h) {
1025 dy = disp->rect.size.h-1;
1029 finger->pos.x = dx + (disp->rect.pos.x - disp->origin.x);
1030 finger->pos.y = dy + (disp->rect.pos.y - disp->origin.y);
1032 skin_pos_rotate( &finger->pos, &finger->pos, -disp->rotation );
1158 ADisplay* disp = window->layout.displays;
1159 SkinRect drect = disp->rect;
1173 drect.size.w, drect.size.h, disp->rotation * -90.);
1420 ADisplay* disp;
1428 disp = window->layout.displays;
1429 if (disp != NULL && window->onion)
1430 display_set_onion( disp,
1470 ADisplay* disp = window->layout.displays;
1472 if (disp != NULL) {
1473 disp->brightness = brightness;
1513 ADisplay* disp;
1522 disp = window->layout.displays;
1524 if (disp != NULL)
1525 display_set_onion( disp, window->onion, onion_rotation, onion_alpha );
1576 ADisplay* disp = layout->displays;
1577 ADisplay* end = disp + layout->num_displays;
1578 for ( ; disp < end; disp++ )
1579 display_redraw( disp, rect, window->surface );
1624 ADisplay* disp = window->layout.displays;
1626 if (disp != NULL) {
1627 info->width = disp->datasize.w;
1628 info->height = disp->datasize.h;
1629 info->rotation = disp->rotation;
1630 info->data = disp->data;
1750 ADisplay* disp = skin_window_display(window);
1755 if (disp != NULL) {
1762 skin_rect_rotate( &r, &r, disp->rotation );
1763 r.pos.x += disp->origin.x;
1764 r.pos.y += disp->origin.y;
1769 display_redraw( disp, &r, window->surface );