/programs/media/Fplay/winlib/alevel.raw |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/programs/media/Fplay/winlib/button.c |
---|
2,8 → 2,14 |
#include "system.h" |
#include <stdlib.h> |
#include <string.h> |
#include <math.h> |
#include "winlib.h" |
extern int res_level[]; |
extern int res_slider[]; |
extern int res_vol_slider[]; |
extern int res_progress_bar[]; |
extern int res_prg_level[]; |
extern ctrl_t *mouse_capture; |
uint32_t main_cursor; |
11,39 → 17,52 |
static int button_proc(ctrl_t *btn, uint32_t msg, uint32_t arg1, uint32_t arg2); |
static int spinbtn_proc(ctrl_t *btn, uint32_t msg, uint32_t arg1, uint32_t arg2); |
button_t *create_button(char *caption, int id, int x, int y, |
ctrl_t *create_control(size_t size, int id, int x, int y, |
int w, int h, ctrl_t *parent) |
{ |
button_t *btn; |
int len; |
ctrl_t *ctrl; |
if( !parent ) |
return NULL; |
btn = (button_t*)malloc(sizeof(button_t)); |
ctrl = (ctrl_t*)malloc(size); |
link_initialize(&btn->link); |
list_initialize(&btn->child); |
link_initialize(&ctrl->link); |
list_initialize(&ctrl->child); |
btn->handler = button_proc; |
btn->parent = parent; |
ctrl->parent = parent; |
btn->ctx = parent->ctx; |
btn->id = id; |
btn->style = 0; |
ctrl->ctx = parent->ctx; |
ctrl->id = id; |
btn->rc.l = x; |
btn->rc.t = y ; |
ctrl->rc.l = x; |
ctrl->rc.t = y ; |
btn->rc.r = x + w; |
btn->rc.b = y + h; |
ctrl->rc.r = x + w; |
ctrl->rc.b = y + h; |
btn->w = w; |
btn->h = h; |
ctrl->w = w; |
ctrl->h = h; |
list_append(&ctrl->link, &parent->child); |
return ctrl; |
}; |
button_t *create_button(char *caption, int id, int x, int y, |
int w, int h, ctrl_t *parent) |
{ |
button_t *btn; |
int len; |
if( !parent ) |
return NULL; |
btn = (button_t*)create_control(sizeof(button_t), id, x, y, w, h, parent); |
btn->ctrl.handler = button_proc; |
btn->state = 0; |
btn->caption = caption; |
if( !caption ) |
62,8 → 81,6 |
btn->img_hilite = NULL; |
btn->img_pressed = NULL; |
list_append(&btn->link, &parent->child); |
return btn; |
}; |
108,10 → 125,10 |
int i, j; |
int x, y; |
ctx = btn->ctx; |
ctx = btn->ctrl.ctx; |
x = btn->rc.l - ctx->offset_x; |
y = btn->rc.t - ctx->offset_y; |
x = btn->ctrl.rc.l - ctx->offset_x; |
y = btn->ctrl.rc.t - ctx->offset_y; |
pixmap = ctx->pixmap; |
124,12 → 141,12 |
else if(btn->state & bHighlight) |
src = btn->img_hilite; |
for(i=0; i < btn->h ;i++) |
for(i=0; i < btn->ctrl.h ;i++) |
{ |
for(j=0; j<btn->w; j++) |
for(j = 0; j < btn->ctrl.w; j++) |
pixmap[j] = src[j]; |
pixmap+= ctx->stride/4; |
src+=btn->w; |
src+= btn->ctrl.w; |
}; |
return 0; |
163,7 → 180,7 |
case MSG_MOUSEENTER: |
// printf("mouse enter\n"); |
btn->state|= bHighlight; |
send_message(btn, MSG_PAINT, 0, 0); |
send_message(&btn->ctrl, MSG_PAINT, 0, 0); |
break; |
case MSG_MOUSELEAVE: |
170,7 → 187,7 |
// printf("mouse leave\n"); |
if( (ctrl_t*)btn != mouse_capture) { |
btn->state &= ~bHighlight; |
send_message(btn, MSG_PAINT, 0, 0); |
send_message(&btn->ctrl, MSG_PAINT, 0, 0); |
}; |
break; |
179,7 → 196,7 |
// printf("push button\n"); |
capture_mouse((ctrl_t*)btn); |
btn->state|= bPressed; |
send_message(btn, MSG_PAINT, 0, 0); |
send_message(&btn->ctrl, MSG_PAINT, 0, 0); |
break; |
case MSG_LBTNUP: |
193,16 → 210,16 |
x = ((pos_t)arg2).x; |
y = ((pos_t)arg2).y; |
if( pt_in_rect( &btn->rc, x, y) ) |
if( pt_in_rect( &btn->ctrl.rc, x, y) ) |
state = bHighlight; |
else |
state = 0; |
if(action) |
send_message(btn->parent,MSG_COMMAND,btn->id,(int)btn); |
send_message(btn->ctrl.parent,MSG_COMMAND,btn->ctrl.id,(int)btn); |
btn->state = state; |
send_message(btn, MSG_PAINT, 0, 0); |
send_message(&btn->ctrl, MSG_PAINT, 0, 0); |
break; |
case MSG_MOUSEMOVE: |
216,7 → 233,7 |
if( ! (btn->state & bHighlight)) |
{ |
btn->state|= bHighlight; |
send_message(btn, MSG_PAINT, 0, 0); |
send_message(&btn->ctrl, MSG_PAINT, 0, 0); |
}; |
if( (ctrl_t*)btn != mouse_capture) |
227,26 → 244,26 |
old_state = btn->state; |
if( pt_in_rect(&btn->rc, x, y) ) |
if( pt_in_rect(&btn->ctrl.rc, x, y) ) |
btn->state |= bPressed; |
else |
btn->state &= ~bPressed; |
if( old_state ^ btn->state) |
send_message(btn, MSG_PAINT, 0, 0); |
send_message(&btn->ctrl, MSG_PAINT, 0, 0); |
} |
return 0; |
}; |
int draw_progress(progress_t *prg) |
int draw_progress(progress_t *prg, int background) |
{ |
int *pixmap, src; |
int *pixmap, *src; |
ctx_t *ctx; |
int i, j; |
int x, y; |
int len; |
int len = prg->ctrl.w; |
ctx = prg->ctrl.ctx; |
253,19 → 270,37 |
x = prg->ctrl.rc.l - ctx->offset_x; |
y = prg->ctrl.rc.t - ctx->offset_y; |
if( background ) |
{ |
src = res_progress_bar; |
pixmap = ctx->pixmap; |
pixmap+= y * ctx->stride/4 + x; |
for(i=0; i < 10; i++) |
{ |
for(j = 0; j < len; j++) |
pixmap[j] = *src; |
pixmap+= ctx->stride/4; |
src++; |
}; |
}; |
len = prg->current*prg->ctrl.w/(prg->max - prg->min); |
src = res_prg_level; |
pixmap = ctx->pixmap; |
pixmap+= y*ctx->stride/4 + x; |
src = 0x32ebfb; //btn->img_default; |
for(i=0; i < prg->ctrl.h ;i++) |
{ |
for(j=0; j < len; j++) |
pixmap[j] = src; |
pixmap[j] = *src; |
pixmap+= ctx->stride/4; |
src++; |
}; |
return 0; |
280,7 → 315,7 |
switch( msg ) |
{ |
case MSG_PAINT: |
draw_progress(prg); |
draw_progress(prg, 1); |
update_rect(ctrl); |
break; |
289,6 → 324,11 |
send_message(ctrl->parent,MSG_COMMAND,ctrl->id,(int)ctrl); |
break; |
case PRG_PROGRESS: |
draw_progress(prg, 0); |
update_rect(ctrl); |
break; |
default: |
break; |
} |
305,33 → 345,273 |
if( !parent ) |
return NULL; |
prg = (progress_t*)malloc(sizeof(progress_t)); |
prg = (progress_t*)create_control(sizeof(progress_t), id, x, y, w, h, parent); |
link_initialize(&prg->ctrl.link); |
list_initialize(&prg->ctrl.child); |
prg->ctrl.handler = prg_proc; |
prg->ctrl.parent = parent; |
prg->ctrl.ctx = parent->ctx; |
prg->ctrl.id = id; |
prg->ctrl.rc.l = x; |
prg->ctrl.rc.t = y ; |
prg->ctrl.rc.r = x + w; |
prg->ctrl.rc.b = y + h; |
prg->ctrl.w = w; |
prg->ctrl.h = h; |
prg->min = 0; |
prg->max = 1; |
prg->current = 0; |
prg->pos = 0; |
list_append(&prg->ctrl.link, &parent->child); |
return prg; |
}; |
int draw_level(level_t *lvl) |
{ |
int *pixmap, *src; |
ctx_t *ctx; |
int i, j; |
int x, y; |
int len; |
double level; |
ctx = lvl->ctrl.ctx; |
x = lvl->ctrl.rc.l - ctx->offset_x; |
y = lvl->ctrl.rc.t - ctx->offset_y; |
level = (log2(lvl->current+1)-7)*12 + lvl->vol/50 ; |
len = level; |
if(len < 0) |
len = 0; |
if(len > 96) |
len = 96; |
pixmap = ctx->pixmap; |
pixmap+= y*ctx->stride/4 + x; |
// for(i=0; i < prg->ctrl.h ;i++) |
// { |
// for(j=0; j < len; j++) |
// pixmap[j] = src; |
// pixmap+= ctx->stride/4; |
// }; |
src = lvl->img_level; |
for(i=0; i < 10; i++) |
{ |
for(j = 0; j < 96; j++) |
pixmap[j] = 0xFF1C1C1C; |
pixmap+= ctx->stride/4; |
}; |
pixmap = ctx->pixmap; |
pixmap+= y*ctx->stride/4 + x; |
for(i=0; i < 10; i++) |
{ |
for(j = 0; j < len; j++) |
pixmap[j] = src[j]; |
pixmap+= ctx->stride/4; |
src+= 96; |
}; |
return 0; |
}; |
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 ) |
{ |
case MSG_PAINT: |
if(lvl->visible) |
{ |
draw_level(lvl); |
update_rect(ctrl); |
}; |
break; |
// case MSG_LBTNDOWN: |
// prg->pos = ((pos_t)arg2).x - ctrl->rc.l; |
// send_message(ctrl->parent,MSG_COMMAND,ctrl->id,(int)ctrl); |
// break; |
default: |
break; |
} |
return 0; |
}; |
level_t *create_level(char *caption, int id, int x, int y, |
int w, int h, ctrl_t *parent) |
{ |
level_t *lvl; |
if( !parent ) |
return NULL; |
lvl = (level_t*)create_control(sizeof(level_t), id, x, y, w, h, parent); |
lvl->ctrl.handler = lvl_proc; |
lvl->min = 0; |
lvl->max = 1; |
lvl->current = 0; |
lvl->pos = 0; |
lvl->visible = 0; |
lvl->img_level = res_level; |
return lvl; |
}; |
int draw_slider(slider_t *sld) |
{ |
int *pixmap, *src; |
ctx_t *ctx; |
int i, j; |
int x, y; |
int32_t len; |
double level; |
ctx = sld->ctrl.ctx; |
x = sld->ctrl.rc.l - ctx->offset_x; |
y = sld->ctrl.rc.t - ctx->offset_y; |
len = 96 + 12; |
pixmap = ctx->pixmap; |
pixmap+= y*ctx->stride/4 + x; |
for(i=0; i < 11; i++) |
{ |
for(j = 0; j < len; j++) |
pixmap[j] = 0xFF1C1C1C; |
pixmap+= ctx->stride/4; |
}; |
pixmap = ctx->pixmap; |
pixmap+= (y+4)*ctx->stride/4 + x + 6; |
src = sld->img_vol_slider; |
for(i = 0; i < 4; i++) |
{ |
for(j = 0; j < 96; j++) |
pixmap[j] = src[j]; |
pixmap+= ctx->stride/4; |
src+= 96; |
}; |
pixmap = ctx->pixmap; |
pixmap+= y*ctx->stride/4 + x + sld->pos; |
src = res_slider; |
for(i = 0; i < 11; i++) |
{ |
for(j = 0; j < 12; j++) |
pixmap[j] = src[j]; |
pixmap+= ctx->stride/4; |
src+= 12; |
}; |
return 0; |
}; |
int sld_proc(ctrl_t *ctrl, uint32_t msg, uint32_t arg1, uint32_t arg2) |
{ |
slider_t *sld = (slider_t*)ctrl; |
int pos; |
switch( msg ) |
{ |
case MSG_PAINT: |
draw_slider(sld); |
update_rect(ctrl); |
break; |
case MSG_LBTNDOWN: |
capture_mouse(ctrl); |
sld->mode = 1; |
pos = ((pos_t)arg2).x - ctrl->rc.l - 6; |
if( pos < 0 ) |
pos = 0; |
else if(pos > 96) |
pos = 96; |
if( sld->pos != pos) |
{ |
sld->pos = pos; |
send_message(ctrl->parent,MSG_COMMAND,ctrl->id,(int)ctrl); |
}; |
break; |
case MSG_LBTNUP: |
if(sld->mode) |
{ |
release_mouse(); |
sld->mode = 0; |
}; |
break; |
case MSG_MOUSEMOVE: |
if(sld->mode) |
{ |
pos = ((pos_t)arg2).x - ctrl->rc.l - 6; |
if( pos < 0 ) |
pos = 0; |
else if(pos > 96) |
pos = 96; |
if( sld->pos != pos) |
{ |
sld->pos = pos; |
// printf("slider pos %d\n", sld->pos); |
send_message(ctrl->parent,MSG_COMMAND,ctrl->id,(int)ctrl); |
} |
}; |
break; |
case MSG_MOUSEENTER: |
panel_set_layout(ctrl->parent, 1); |
// printf("level on\n"); |
break; |
case MSG_MOUSELEAVE: |
panel_set_layout(ctrl->parent, 0); |
// printf("level off\n"); |
break; |
default: |
break; |
} |
return 0; |
}; |
slider_t *create_slider(char *caption, int id, int x, int y, |
int w, int h, ctrl_t *parent) |
{ |
slider_t *sld; |
if( !parent ) |
return NULL; |
sld = (slider_t*)create_control(sizeof(slider_t), id, x, y, w, h, parent); |
sld->ctrl.handler = sld_proc; |
sld->min = -5000; |
sld->max = 0; |
sld->current = 0; |
sld->pos = 60; |
sld->mode = 0; |
sld->img_vol_slider = res_vol_slider; |
return sld; |
}; |
/programs/media/Fplay/winlib/caption.c |
---|
5,7 → 5,6 |
#include <stdio.h> |
#include "winlib.h" |
#define CAPTION_HEIGHT 24 |
#define CAPTION_CORNER_W 8 |
extern int res_caption_left[]; |
20,6 → 19,8 |
extern int res_minimize_btn_hl[]; |
extern int res_minimize_btn_pressed[]; |
extern uint32_t main_cursor; |
void update_caption_size(window_t *win); |
int caption_proc(ctrl_t *ctrl, uint32_t msg, uint32_t arg1, uint32_t arg2); |
38,6 → 39,8 |
cpt->ctrl.handler = caption_proc; |
cpt->ctrl.parent = (ctrl_t*)win; |
cpt->text = win->caption_txt; |
ctx->pixmap = user_alloc(1920*CAPTION_HEIGHT*4); |
if(!ctx->pixmap) |
{ |
102,17 → 105,27 |
cpt->ctrl.h = CAPTION_HEIGHT; |
win->client.t = CAPTION_HEIGHT; |
cpt->close_btn->rc.l = win->w - 25; |
cpt->close_btn->rc.r = cpt->close_btn->rc.l + |
cpt->close_btn->w; |
cpt->close_btn->ctrl.rc.l = win->w - 25; |
cpt->close_btn->ctrl.rc.r = cpt->close_btn->ctrl.rc.l + |
cpt->close_btn->ctrl.w; |
cpt->minimize_btn->rc.l = win->w - 25 - 16 - 5; |
cpt->minimize_btn->rc.r = cpt->minimize_btn->rc.l + |
cpt->minimize_btn->w; |
cpt->minimize_btn->ctrl.rc.l = win->w - 25 - 16 - 5; |
cpt->minimize_btn->ctrl.rc.r = cpt->minimize_btn->ctrl.rc.l + |
cpt->minimize_btn->ctrl.w; |
}; |
typedef struct |
{ |
uint32_t width; |
uint32_t height; |
uint32_t pitch; |
uint32_t handle; |
uint8_t *data; |
}bitmap_t; |
extern int win_font; |
void draw_caption(caption_t *cpt) |
{ |
int *pixmap, *src; |
157,6 → 170,13 |
src+= CAPTION_CORNER_W; |
}; |
bitmap_t bitmap; |
bitmap.data = cpt->ctx.pixmap; |
bitmap.pitch = cpt->ctx.stride; |
draw_text(&bitmap, win_font, cpt->text, 8, 18, 0xFFFFFFFF); |
ctrl_t *child; |
child = (ctrl_t*)cpt->ctrl.child.next; |
193,18 → 213,19 |
send_message(child, msg, 0, arg2); |
else |
send_message(win->child_over, MSG_MOUSELEAVE, 0, arg2); |
} |
else if( child ) |
send_message(child, MSG_MOUSEENTER, 0, arg2); |
}; |
win->child_over = child; |
if( child ) |
{ |
send_message(child, MSG_MOUSEENTER, 0, arg2); |
send_message(child,msg,0,arg2); |
// else if(main_cursor != 0) |
// { |
// set_cursor(0); |
// main_cursor = 0; |
// } |
} |
else if(main_cursor != 0) |
{ |
set_cursor(0); |
main_cursor = 0; |
} |
break; |
/programs/media/Fplay/winlib/caption_body.raw |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/programs/media/Fplay/winlib/caption_left.raw |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/programs/media/Fplay/winlib/caption_right.raw |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/programs/media/Fplay/winlib/close_button.raw |
---|
0,0 → 1,0 |
okhÿokhÿokhÿokhÿnifÿlgdÿjebÿhc_ÿhb_ÿhc_ÿjebÿlgdÿnifÿokhÿokhÿokhÿokhÿlhdÿlhdÿlhdÿidaÿfa]ÿd_[ÿd_[ÿd_[ÿd_[ÿd_[ÿd_[ÿd_[ÿfa]ÿidaÿlhdÿlhdÿlhdÿhdaÿhdaÿe`\ÿa[Wÿa[Wÿa[Wÿa[Wÿa[Wÿa[Wÿa[Wÿa[Wÿa[Wÿa[Wÿa[Wÿe`\ÿhdaÿhdaÿe`]ÿb]Yÿ]WSÿ]WSÿ]WSÿ]WSÿ]WSÿ]WSÿ]WSÿ]WSÿ]WSÿ]WSÿ]WSÿ]WSÿ]WSÿb]Yÿe`]ÿ`[Xÿ[UQÿZTPÿZTPÿª¨¥ÿª¨¥ÿZTPÿZTPÿZTPÿZTPÿZTPÿª¨¥ÿª¨¥ÿZTPÿZTPÿ[UQÿ`[Xÿ[VRÿVPLÿVPLÿVPLÿª¨¥ÿª¨¥ÿª¨¥ÿVPLÿVPLÿVPLÿª¨¥ÿª¨¥ÿª¨¥ÿVPLÿVPLÿVPLÿ[VRÿUOLÿRLHÿRLHÿRLHÿRLHÿª¨¥ÿª¨¥ÿª¨¥ÿRLHÿª¨¥ÿª¨¥ÿª¨¥ÿRLHÿRLHÿRLHÿRLHÿUOLÿPJFÿOIEÿOIEÿOIEÿOIEÿOIEÿª¨¥ÿª¨¥ÿª¨¥ÿª¨¥ÿª¨¥ÿOIEÿOIEÿOIEÿOIEÿOIEÿPJFÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿÿÿÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ81,ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿÿÿÿÿÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ81,ÿ:3/ÿ70+ÿ70+ÿ70+ÿ70+ÿÿÿÿ70+ÿÿÿÿ70+ÿ70+ÿ70+ÿ70+ÿ:3/ÿ=62ÿ70+ÿ70+ÿ70+ÿÿÿÿ70+ÿ70+ÿ70+ÿÿÿÿ70+ÿ70+ÿ70+ÿ=62ÿ?95ÿ92-ÿ70+ÿ70+ÿÿÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿÿÿ70+ÿ70+ÿ92-ÿ?95ÿA;7ÿ=72ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ=72ÿA;7ÿA;7ÿA;7ÿ<61ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ<61ÿA;7ÿA;7ÿA;7ÿA;7ÿA;7ÿ=72ÿ92-ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ92-ÿ=72ÿA;7ÿA;7ÿA;7ÿA;7ÿA;7ÿA;7ÿA;7ÿ?95ÿ=62ÿ:3/ÿ81,ÿ70+ÿ81,ÿ:3/ÿ=62ÿ?95ÿA;7ÿA;7ÿA;7ÿA;7ÿ |
/programs/media/Fplay/winlib/close_button_pressed.raw |
---|
0,0 → 1,0 |
okhÿokhÿokhÿokhÿnifÿlgdÿjebÿhc_ÿhb_ÿhc_ÿjebÿlgdÿnifÿokhÿokhÿokhÿokhÿlhdÿlhdÿlhdÿidaÿfa]ÿd_[ÿd_[ÿd_[ÿd_[ÿd_[ÿd_[ÿd_[ÿfa]ÿidaÿlhdÿlhdÿlhdÿhdaÿhdaÿe`\ÿa[Wÿa[Wÿa[Wÿa[Wÿa[Wÿa[Wÿa[Wÿa[Wÿa[Wÿa[Wÿa[Wÿe`\ÿhdaÿhdaÿe`]ÿb]Yÿ]WSÿ]WSÿ]WSÿ]WSÿ]WSÿ]WSÿ]WSÿ]WSÿ]WSÿ]WSÿ]WSÿ]WSÿ]WSÿb]Yÿe`]ÿ`[Xÿ[UQÿZTPÿZTPÿZTPÿZTPÿZTPÿZTPÿZTPÿZTPÿZTPÿZTPÿZTPÿZTPÿZTPÿ[UQÿ`[Xÿ[VRÿVPLÿVPLÿVPLÿVPLÿ¬©ÿÿXSOÿVPLÿXSOÿÿ¬©ÿVPLÿVPLÿVPLÿVPLÿ[VRÿUOLÿRLHÿRLHÿRLHÿRLHÿÿ«ª§ÿÿWQLÿÿ«ª§ÿÿRLHÿRLHÿRLHÿRLHÿUOLÿPJFÿOIEÿOIEÿOIEÿOIEÿUNJÿÿª¨¥ÿÿª¨¥ÿÿUNJÿOIEÿOIEÿOIEÿOIEÿPJFÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ?83ÿÿÿÿ?83ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ81,ÿ70+ÿ70+ÿ70+ÿ70+ÿ=61ÿ~zÿÿ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
int max; |
int current; |
int pos; |
int mode; |
void *img_slider; |
void *img_vol_slider; |
}slider_t; |
typedef struct |
{ |
link_t link; |
link_t child; |
148,11 → 160,12 |
#define MSG_COMMAND 0x030 |
#define MSG_TIMER 0x031 |
#define LBN_DBLCLK 0x100 |
#define LBOX_READDIR 0x100 |
#define LBOX_GETFILENAME 0x101 |
#define PRG_PROGRESS 0x102 |
#define ID_CLOSE 1 |
#define ID_MINIMIZE 2 |
/programs/media/Fplay/winlib/cptleft.raw |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/programs/media/Fplay/winlib/cptright.raw |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/programs/media/Fplay/winlib/fontlib.c |
---|
0,0 → 1,150 |
#include <stdint.h> |
#include <stdio.h> |
#include <stdlib.h> |
#include <math.h> |
#include <memory.h> |
#include "font_droid.h" |
#include <ft2build.h> |
#include FT_FREETYPE_H |
typedef unsigned int color_t; |
typedef struct |
{ |
uint32_t width; |
uint32_t height; |
uint32_t pitch; |
uint32_t handle; |
uint8_t *data; |
}bitmap_t; |
void my_draw_bitmap(bitmap_t *win, FT_Bitmap *bitmap, int dstx, int dsty, int col) |
{ |
uint8_t *dst; |
uint8_t *src, *tmpsrc; |
uint32_t *tmpdst; |
int i, j; |
dst = win->data + dsty * win->pitch + dstx*4; |
src = bitmap->buffer; |
for( i = 0; i < bitmap->rows; i++ ) |
{ |
tmpdst = (uint32_t*)dst; |
tmpsrc = src; |
dst+= win->pitch; |
src+= bitmap->pitch; |
for( j = 0; j < bitmap->width; j++) |
{ |
int a = *tmpsrc++; |
int sr, sg, sb; |
int dr, dg, db; |
if( a != 0) a++; |
db = *tmpdst & 0xFF; |
dg = (*tmpdst >> 8) & 0xFF; |
dr = (*tmpdst >> 16) &0xFF; |
sb = col & 0xFF; |
sg = (col >> 8) & 0xFF; |
sr = (col >> 16) &0xFF; |
db = (a*sb + db*(256-a))/256; |
dg = (a*sg + dg*(256-a))/256; |
dr = (a*sr + dr*(256-a))/256; |
*tmpdst++ = 0xFF000000|(dr<<16)|(dg<<8)|db; |
}; |
} |
}; |
int draw_text(bitmap_t * winbitmap, FT_Face face, char *text, int x, int y, int color) |
{ |
FT_UInt glyph_index; |
FT_Bool use_kerning = 0; |
FT_UInt previous; |
char ch; |
int err = 0; |
use_kerning = FT_HAS_KERNING( face ); |
previous = 0; |
x <<= 6; |
while( ch = *text++ ) |
{ |
glyph_index = FT_Get_Char_Index( face, ch ); |
if ( use_kerning && previous && glyph_index ) |
{ |
FT_Vector delta; |
FT_Get_Kerning( face, previous, glyph_index, FT_KERNING_DEFAULT, &delta ); |
x += delta.x ; |
} |
err = FT_Load_Glyph( face, glyph_index, FT_LOAD_DEFAULT ); |
if ( err ) |
continue; |
err = FT_Render_Glyph( face->glyph, FT_RENDER_MODE_NORMAL ); |
if ( err ) |
continue; |
my_draw_bitmap(winbitmap, &face->glyph->bitmap, (x >> 6) + face->glyph->bitmap_left, |
y - face->glyph->bitmap_top, color); |
x += face->glyph->advance.x; |
previous = glyph_index; |
}; |
return err; |
}; |
int init_fontlib() |
{ |
int err; |
static FT_Library library; |
FT_Face face = NULL; |
err = FT_Init_FreeType( &library ); |
if ( err ) |
{ |
printf("an error occurred during FreeType initialization\n"); |
goto done; |
} |
err = FT_New_Face( library, "/hd0/1/istokweb.ttf", 0, &face ); |
// err = FT_New_Memory_Face( library, pdf_font_DroidSans, 139280, 0, &face ); |
if ( err == FT_Err_Unknown_File_Format ) |
{ |
printf("font format is unsupported\n"); |
goto done; |
} |
else if ( err ) |
{ |
printf("font file could not be read or broken\n"); |
goto done; |
} |
err = FT_Set_Char_Size( face, 0, 12*64, 96, 96 ); |
// err = FT_Set_Pixel_Sizes( face, 0, 100 ); |
done: |
return (int)face; |
}; |
// draw_text(face,"/hd0/1/demo", 10, 80, 0x00000000); |
/programs/media/Fplay/winlib/frame.c |
---|
5,7 → 5,6 |
#include <stdio.h> |
#include "winlib.h" |
#define CAPTION_HEIGHT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hdaÿe`]ÿb]Yÿ]WSÿ]WSÿ]WSÿ]WSÿ]WSÿ]WSÿ]WSÿ]WSÿ]WSÿ]WSÿ]WSÿ]WSÿ]WSÿb]Yÿe`]ÿ`[Xÿ[UQÿZTPÿZTPÿZTPÿZTPÿZTPÿZTPÿZTPÿZTPÿZTPÿZTPÿZTPÿZTPÿZTPÿ[UQÿ`[Xÿ[VRÿVPLÿVPLÿVPLÿVPLÿVPLÿVPLÿVPLÿVPLÿVPLÿVPLÿVPLÿVPLÿVPLÿVPLÿVPLÿ[VRÿUOLÿRLHÿRLHÿRLHÿRLHÿRLHÿRLHÿRLHÿRLHÿRLHÿRLHÿRLHÿRLHÿRLHÿRLHÿRLHÿUOLÿPJFÿOIEÿOIEÿOIEÿOIEÿOIEÿOIEÿOIEÿOIEÿOIEÿOIEÿOIEÿOIEÿOIEÿOIEÿOIEÿPJFÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ81,ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ81,ÿ:3/ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ:3/ÿ=62ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ=62ÿ?95ÿ92-ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ92-ÿ?95ÿA;7ÿ=72ÿ70+ÿ70+ÿ70+ÿÿÿÿÿÿÿÿ70+ÿ70+ÿ70+ÿ=72ÿA;7ÿA;7ÿA;7ÿ<61ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ<61ÿA;7ÿA;7ÿA;7ÿA;7ÿA;7ÿ=72ÿ92-ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ70+ÿ92-ÿ=72ÿA;7ÿA;7ÿA;7ÿA;7ÿA;7ÿA;7ÿA;7ÿ?95ÿ=62ÿ:3/ÿ81,ÿ70+ÿ81,ÿ:3/ÿ=62ÿ?95ÿA;7ÿA;7ÿA;7ÿA;7ÿ |
/programs/media/Fplay/winlib/panel.c |
---|
4,11 → 4,14 |
#include <stdio.h> |
#include "winlib.h" |
#define PANEL_HEIGHT 55 |
#define PANEL_CORNER_W 16 |
#define PANEL_CORNER_W 8 |
#define FRAME_WIDTH 7 |
#define ID_PLAY 100 |
#define ID_STOP 101 |
#define ID_PROGRESS 102 |
#define ID_VOL_LEVEL 103 |
#define ID_VOL_CTRL 104 |
extern uint32_t main_cursor; |
22,6 → 25,9 |
extern int res_pause_btn[]; |
extern int res_pause_btn_pressed[]; |
extern int res_stop_btn[]; |
extern int res_stop_btn_pressed[]; |
//extern int res_minimize_btn[]; |
//extern int res_minimize_btn_hl[]; |
//extern int res_minimize_btn_pressed[]; |
34,6 → 40,8 |
{ |
button_t *btn; |
progress_t *prg; |
level_t *lvl; |
slider_t *sld; |
panel_t *panel = &win->panel; |
ctx_t *ctx = &panel->ctx; |
44,6 → 52,8 |
panel->ctrl.handler = panel_proc; |
panel->ctrl.parent = (ctrl_t*)win; |
panel->layout = 0; |
ctx->pixmap = user_alloc(1920*PANEL_HEIGHT*4); |
if(!ctx->pixmap) |
{ |
63,9 → 73,23 |
btn->img_hilite = res_pause_btn; |
btn->img_pressed = res_pause_btn_pressed; |
prg = create_progress(NULL,101,0,4,0,8,&panel->ctrl); |
btn = create_button(NULL, ID_STOP,0,19,24,24,&panel->ctrl); |
panel->stop_btn = btn; |
btn->img_default = res_stop_btn; |
btn->img_hilite = res_stop_btn; |
btn->img_pressed = res_stop_btn_pressed; |
prg = create_progress(NULL,ID_PROGRESS,0,4,0,10,&panel->ctrl); |
panel->prg = prg; |
lvl = create_level(NULL, ID_VOL_LEVEL, 0, 20, 96, 10, &panel->ctrl); |
lvl->vol = -1875; |
panel->lvl = lvl; |
sld = create_slider(NULL, ID_VOL_CTRL, 0, 20, 96+12, 12, &panel->ctrl); |
panel->sld = sld; |
// btn = create_button(NULL, ID_MINIMIZE,0,5,16,18,(ctrl_t*)cpt); |
// cpt->minimize_btn = btn; |
73,11 → 97,60 |
// btn->img_hilite = res_minimize_btn_hl; |
// btn->img_pressed = res_minimize_btn_pressed; |
update_panel_size(win); |
return 1; |
}; |
static void panel_update_layout(panel_t *panel) |
{ |
progress_t *prg = panel->prg; |
level_t *lvl = panel->lvl; |
if(panel->layout == 0) |
{ |
prg->ctrl.rc.l = panel->ctrl.rc.l; |
prg->ctrl.rc.t = panel->ctrl.rc.t+7; |
prg->ctrl.rc.r = panel->ctrl.rc.r; |
prg->ctrl.rc.b = prg->ctrl.rc.t + prg->ctrl.h; |
prg->ctrl.w = prg->ctrl.rc.r - prg->ctrl.rc.l; |
lvl->ctrl.rc.l = panel->ctrl.rc.l; |
lvl->ctrl.rc.t = panel->ctrl.rc.t+7; |
lvl->ctrl.rc.r = panel->lvl->ctrl.rc.l + panel->lvl->ctrl.w; |
lvl->ctrl.rc.b = panel->lvl->ctrl.rc.t + panel->lvl->ctrl.h; |
} |
else |
{ |
lvl->ctrl.rc.l = panel->ctrl.rc.l; |
lvl->ctrl.rc.t = panel->ctrl.rc.t+7; |
lvl->ctrl.rc.r = lvl->ctrl.rc.l + lvl->ctrl.w; |
lvl->ctrl.rc.b = lvl->ctrl.rc.t + lvl->ctrl.h; |
prg->ctrl.rc.l = lvl->ctrl.rc.r; |
prg->ctrl.rc.t = panel->ctrl.rc.t+7; |
prg->ctrl.rc.r = panel->ctrl.rc.r; |
prg->ctrl.rc.b = prg->ctrl.rc.t + prg->ctrl.h; |
prg->ctrl.w = prg->ctrl.rc.r - prg->ctrl.rc.l; |
}; |
}; |
void panel_set_layout(panel_t *panel, int layout) |
{ |
panel->layout = layout; |
panel->lvl->visible = layout; |
panel_update_layout(panel); |
send_message(&panel->prg->ctrl, MSG_PAINT, 0, 0); |
if(layout) |
send_message(&panel->lvl->ctrl, MSG_PAINT, 0, 0); |
}; |
void update_panel_size(window_t *win) |
{ |
panel_t *panel = &win->panel; |
115,25 → 188,22 |
panel->ctrl.h = PANEL_HEIGHT; |
win->client.b = win->h-PANEL_HEIGHT; |
panel->play_btn->rc.l = win->w/2 - 16; |
panel->play_btn->rc.t = panel->ctrl.rc.t+19; |
panel->play_btn->rc.r = panel->play_btn->rc.l + panel->play_btn->w; |
panel->play_btn->rc.b = panel->play_btn->rc.t + panel->play_btn->h; |
panel->play_btn->ctrl.rc.l = win->w/2 - 16; |
panel->play_btn->ctrl.rc.t = panel->ctrl.rc.t+19; |
panel->play_btn->ctrl.rc.r = panel->play_btn->ctrl.rc.l + panel->play_btn->ctrl.w; |
panel->play_btn->ctrl.rc.b = panel->play_btn->ctrl.rc.t + panel->play_btn->ctrl.h; |
panel->prg->ctrl.rc.l = 8; |
panel->prg->ctrl.rc.t = panel->ctrl.rc.t+7; |
panel->prg->ctrl.rc.r = panel->ctrl.rc.r-8; |
panel->prg->ctrl.rc.b = panel->prg->ctrl.rc.t+8; |
panel->prg->ctrl.w = panel->prg->ctrl.rc.r - |
panel->prg->ctrl.rc.l; |
panel->stop_btn->ctrl.rc.l = win->w/2 - 44; |
panel->stop_btn->ctrl.rc.t = panel->ctrl.rc.t+23; |
panel->stop_btn->ctrl.rc.r = panel->stop_btn->ctrl.rc.l + panel->stop_btn->ctrl.w; |
panel->stop_btn->ctrl.rc.b = panel->stop_btn->ctrl.rc.t + panel->stop_btn->ctrl.h; |
panel->prg->ctrl.h = panel->prg->ctrl.rc.b - |
panel->prg->ctrl.rc.t; |
panel->sld->ctrl.rc.l = panel->ctrl.rc.l; |
panel->sld->ctrl.rc.t = panel->ctrl.rc.t+28; |
panel->sld->ctrl.rc.r = panel->sld->ctrl.rc.l + panel->sld->ctrl.w; |
panel->sld->ctrl.rc.b = panel->sld->ctrl.rc.t + panel->sld->ctrl.h; |
// cpt->minimize_btn->rc.l = win->w - 25 - 16 - 5; |
// cpt->minimize_btn->rc.r = cpt->minimize_btn->rc.l + |
// cpt->minimize_btn->w; |
panel_update_layout(panel); |
}; |
234,7 → 304,9 |
switch((short)arg1) |
{ |
case ID_PLAY: |
case 101: |
case ID_STOP: |
case ID_PROGRESS: |
case ID_VOL_CTRL: |
win = get_parent_window(ctrl); |
send_message(win, msg, arg1, arg2); |
break; |
/programs/media/Fplay/winlib/panel.raw |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/programs/media/Fplay/winlib/panelleft.raw |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/programs/media/Fplay/winlib/panelright.raw |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/programs/media/Fplay/winlib/pbar.raw |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/programs/media/Fplay/winlib/prg_level.raw |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/programs/media/Fplay/winlib/res2.asm |
---|
25,15 → 25,27 |
public _res_pause_btn |
public _res_pause_btn_pressed |
public _res_stop_btn |
public _res_stop_btn_pressed |
public _res_cursor_ns |
public _res_cursor_we |
public _res_cursor_nwse |
public _res_cursor_nesw |
;public _res_logo |
public _res_level |
public _res_slider |
public _res_vol_slider |
public _res_progress_bar |
public _res_prg_level |
section '.rdata' data readable align 16 |
_res_caption_left: file 'cptleft.raw' |
_res_caption_right: file 'cptright.raw' |
_res_caption_body: file 'cptbody.raw' |
54,7 → 66,10 |
_res_pause_btn: file 'pausebtn.raw' |
_res_pause_btn_pressed: file 'pausebp.raw' |
_res_stop_btn: file 'stopbtn.raw' |
_res_stop_btn_pressed: file 'stopbtnp.raw' |
_res_minimize_btn: file 'minbn.raw' |
_res_minimize_btn_hl: file 'minbhl.raw' |
_res_minimize_btn_pressed: file 'minbp.raw' |
63,3 → 78,12 |
_res_cursor_we: file 'size_we.cur' |
_res_cursor_nwse: file 'size_nwse.cur' |
_res_cursor_nesw: file 'size_nesw.cur' |
;_res_logo: file 'logo.raw' |
_res_level: file 'vol_level.raw' |
_res_vol_slider: file 'vol_slider.raw' |
_res_slider: file 'slider.raw' |
_res_progress_bar: file 'pbar.raw' |
_res_prg_level: file 'prg_level.raw' |
/programs/media/Fplay/winlib/slider.raw |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/programs/media/Fplay/winlib/stopbtn.raw |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/programs/media/Fplay/winlib/stopbtnp.raw |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/programs/media/Fplay/winlib/vol_level.raw |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/programs/media/Fplay/winlib/vol_slider.raw |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/programs/media/Fplay/winlib/window.c |
---|
16,6 → 16,9 |
uint32_t cursor_nwse; |
uint32_t cursor_nesw; |
int win_font; |
static pos_t old_pos; |
ctrl_t *mouse_capture = NULL; |
514,9 → 517,26 |
cursor_we = load_cursor(res_cursor_we, LOAD_FROM_MEM); |
cursor_nwse = load_cursor(res_cursor_nwse, LOAD_FROM_MEM); |
cursor_nesw = load_cursor(res_cursor_nesw, LOAD_FROM_MEM); |
win_font = init_fontlib(); |
return 1; |
} |
int fini_winlib() |
{ |
int ret; |
ret = destroy_cursor(cursor_nesw); |
ret |= destroy_cursor(cursor_nwse); |
ret |= destroy_cursor(cursor_we); |
ret |= destroy_cursor(cursor_ns); |
return ret; |
}; |
void init_winlib(void) |
{ |
__asm__ __volatile__( |
569,7 → 589,7 |
__asm__ __volatile__( |
"int $0x40" |
::"a"(73),"b"(0),"c"(&bc.dstx)); |
::"a"(73),"b"(0x20),"c"(&bc.dstx)); |
}; |
/programs/media/Fplay/winlib/winlib.h |
---|
3,6 → 3,9 |
#include "control.h" |
#define CAPTION_HEIGHT 24 |
#define PANEL_HEIGHT 55 |
typedef struct |
{ |
link_t link; |
31,6 → 34,7 |
{ |
ctrl_t ctrl; |
ctx_t ctx; |
char *text; |
ctrl_t *child_over; |
button_t *close_btn; |
button_t *minimize_btn; |
43,8 → 47,12 |
ctx_t ctx; |
rect_t draw; |
ctrl_t *child_over; |
int layout; |
progress_t *prg; |
level_t *lvl; |
slider_t *sld; |
button_t *play_btn; |
button_t *stop_btn; |
}panel_t; |
typedef struct |
111,7 → 119,8 |
int w, int h, ctrl_t *parent); |
progress_t *create_progress(char *caption, int id, int x, int y, |
int w, int h, ctrl_t *parent); |
level_t *create_level(char *caption, int id, int x, int y, |
int w, int h, ctrl_t *parent); |
scroller_t *create_scroller(uint32_t style, int id, int x, int y, |
int w, int h, ctrl_t *parent); |