Subversion Repositories Kolibri OS

Rev

Rev 5061 | Rev 6133 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5061 Rev 5372
Line 77... Line 77...
77
 
77
 
Line 78... Line 78...
78
    if(handler==0) return 0;
78
    if(handler==0) return 0;
Line 79... Line 79...
79
 
79
 
80
    BeginDraw();
80
    BeginDraw();
81
    DrawWindow(x, y, w-1, h-1,
81
    DrawWindow(x, y, w, h,
82
               NULL,0,0x41);
82
               NULL,0,0x41);
Line 83... Line 83...
83
    EndDraw();
83
    EndDraw();
Line 211... Line 211...
211
};
211
};
212
 
212
 
Line 213... Line 213...
213
void blit_client(window_t *win)
213
void blit_client(window_t *win)
214
{
214
{
-
 
215
    ctx_t  *ctx = &win->ctx;
215
    int w, h;
216
    int w, h;
Line 216... Line 217...
216
 
217
 
217
    w = win->client.r - win->client.l;
218
    w = win->client.r - win->client.l;
Line 218... Line 219...
218
    h = win->client.b - win->client.t;
219
    h = win->client.b - win->client.t;
219
 
220
 
220
    Blit(win->ctx->pixmap->data, win->client.l, win->client.t,
221
    Blit(ctx->pixmap_data, win->client.l, win->client.t,
Line 221... Line 222...
221
         0, 0, w, h, w, h,win->ctx->pixmap->pitch);
222
         0, 0, w, h, w, h, ctx->pixmap_pitch);
222
};
223
};
Line 364... Line 365...
364
    window_update_layout(win);
365
    window_update_layout(win);
Line 365... Line 366...
365
 
366
 
366
    BeginDraw();
367
    BeginDraw();
367
    DrawWindow(0,0,0,0, NULL, 0x000000,0x41);
-
 
368
//    DefineButton(15, 15, 0x00000001, 0);
368
    DrawWindow(0,0,0,0, NULL, 0x000000,0x41);
Line 369... Line 369...
369
    EndDraw();
369
    EndDraw();
Line 370... Line 370...
370
 
370
 
Line 626... Line 626...
626
//};
626
//};
627
 
627
 
Line 628... Line 628...
628
void update_rect(ctrl_t *ctrl)
628
void update_rect(ctrl_t *ctrl)
629
{
629
{
-
 
630
    ctx_t  *ctx = ctrl->ctx;
-
 
631
 
630
    int ctx_w, ctx_h;
632
    int ctx_w, ctx_h;
631
    int src_x, src_y;
633
    int src_x, src_y;
Line 632... Line 634...
632
 
634
 
633
    src_x = ctrl->rc.l - ctrl->ctx->offset_x;
635
    src_x = ctrl->rc.l - ctrl->ctx->offset_x;
Line 634... Line 636...
634
    src_y = ctrl->rc.t - ctrl->ctx->offset_y;
636
    src_y = ctrl->rc.t - ctrl->ctx->offset_y;
635
 
637
 
Line 636... Line 638...
636
    ctx_w = ctrl->parent->w;
638
    ctx_w = ctrl->parent->w;
637
    ctx_h = ctrl->parent->h;
639
    ctx_h = ctrl->parent->h;
Line 638... Line 640...
638
 
640
 
639
    Blit(ctrl->ctx->pixmap->data, ctrl->rc.l, ctrl->rc.t, src_x, src_y,
641
    Blit(ctx->pixmap_data, ctrl->rc.l, ctrl->rc.t, src_x, src_y,
Line 640... Line -...
640
         ctrl->w, ctrl->h, ctx_w, ctx_h, ctrl->ctx->pixmap->pitch);
-
 
641
 
-
 
642
//    need_update++;
-
 
643
};
-
 
644
 
-
 
645
 
-
 
646
void Blit(void *bitmap, int dst_x, int dst_y,
-
 
647
                        int src_x, int src_y, int w, int h,
-
 
648
                        int src_w, int src_h, int stride)
-
 
649
{
-
 
650
    volatile struct blit_call bc;
-
 
651
 
-
 
652
    bc.dstx = dst_x;
-
 
653
    bc.dsty = dst_y;
-
 
654
    bc.w    = w;
-
 
655
    bc.h    = h;
-
 
656
    bc.srcx = src_x;
-
 
657
    bc.srcy = src_y;
-
 
658
    bc.srcw = src_w;
-
 
659
    bc.srch = src_h;
-
 
660
    bc.stride = stride;
-
 
661
    bc.bitmap = bitmap;
-
 
662
 
-
 
663
    __asm__ __volatile__(
-
 
664
    "int $0x40"
642
         ctrl->w, ctrl->h, ctx_w, ctx_h, ctx->pixmap_pitch);
665
    ::"a"(73),"b"(0x20),"c"(&bc.dstx));
643
 
666
 
644
//    need_update++;
Line 667... Line 645...
667
};
645
};