Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 4438 → Rev 5372

/contrib/media/fplay/winlib/button.c
20,7 → 20,6
ctrl_t *create_control(size_t size, int id, int x, int y,
int w, int h, ctrl_t *parent)
{
 
ctrl_t *ctrl;
 
if( !parent )
126,8 → 125,6
 
ctx = btn->ctrl.ctx;
 
lock_bitmap(ctx->pixmap);
x = btn->ctrl.rc.l - ctx->offset_x;
y = btn->ctrl.rc.t - ctx->offset_y;
 
259,8 → 256,6
 
ctx = prg->ctrl.ctx;
lock_bitmap(ctx->pixmap);
 
x = prg->ctrl.rc.l - ctx->offset_x;
y = prg->ctrl.rc.t - ctx->offset_y;
 
268,8 → 263,8
{
src = res_progress_bar;
 
pixmap = (int*)ctx->pixmap->data;
pixmap+= y * ctx->pixmap->pitch/4 + x;
pixmap = (int*)ctx->pixmap_data;
pixmap+= y * ctx->pixmap_pitch/4 + x;
 
for(i=0; i < 10; i++)
{
276,24 → 271,23
for(j = 0; j < len; j++)
pixmap[j] = *src;
 
pixmap+= ctx->pixmap->pitch/4;
pixmap+= ctx->pixmap_pitch/4;
src++;
};
};
 
 
len = prg->current*prg->ctrl.w/(prg->max - prg->min);
 
src = res_prg_level;
 
pixmap = (int*)ctx->pixmap->data;
pixmap+= y*ctx->pixmap->pitch/4 + x;
pixmap = (int*)ctx->pixmap_data;
pixmap+= y*ctx->pixmap_pitch/4 + x;
 
for(i=0; i < prg->ctrl.h ;i++)
{
for(j=0; j < len; j++)
pixmap[j] = *src;
pixmap+= ctx->pixmap->pitch/4;
pixmap+= ctx->pixmap_pitch/4;
src++;
};
 
363,8 → 357,6
 
ctx = lvl->ctrl.ctx;
 
lock_bitmap(ctx->pixmap);
x = lvl->ctrl.rc.l - ctx->offset_x;
y = lvl->ctrl.rc.t - ctx->offset_y;
 
377,15 → 369,15
if(len > 96)
len = 96;
 
pixmap = (int*)ctx->pixmap->data;
pixmap = (int*)ctx->pixmap_data;
 
pixmap+= y*ctx->pixmap->pitch/4 + x;
pixmap+= y*ctx->pixmap_pitch/4 + x;
 
for(i=0; i < 10; i++)
{
for(j = 0; j < 96; j++)
pixmap[j] = 0xFF1C1C1C;
pixmap+= ctx->pixmap->pitch/4;
pixmap+= ctx->pixmap_pitch/4;
};
 
blit_raw(ctx, lvl->img_level, x, y, len, 10, 96*4);
397,7 → 389,6
int lvl_proc(ctrl_t *ctrl, uint32_t msg, uint32_t arg1, uint32_t arg2)
{
level_t *lvl = (level_t*)ctrl;
// int pos;
 
switch( msg )
{
454,25 → 445,22
 
ctx = sld->ctrl.ctx;
 
lock_bitmap(ctx->pixmap);
x = sld->ctrl.rc.l - ctx->offset_x;
y = sld->ctrl.rc.t - ctx->offset_y;
 
len = 96 + 12;
 
pixmap = (int*)ctx->pixmap->data;
pixmap+= y*ctx->pixmap->pitch/4 + x;
pixmap = (int*)ctx->pixmap_data;
pixmap+= y*ctx->pixmap_pitch/4 + x;
 
for(i=0; i < 11; i++)
{
for(j = 0; j < len; j++)
pixmap[j] = 0xFF1C1C1C;
pixmap+= ctx->pixmap->pitch/4;
pixmap+= ctx->pixmap_pitch/4;
};
 
blit_raw(ctx, sld->img_vol_slider, x+6, y+4, 96, 4, 96*4);
 
blit_raw(ctx, res_slider, x+sld->pos, y, 12, 11, 12*4);
 
return 0;