1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
\r
3 ;; Copyright (C) KolibriOS team 2004-2017. All rights reserved. ;;
\r
4 ;; Distributed under terms of the GNU General Public License ;;
\r
6 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
\r
8 ;============================================================================
\r
9 ; This file should be used to generate skins of new standard
\r
10 ;============================================================================
\r
11 ; skin file structure:
\r
12 ;----------------------------------------------------------------------------
\r
15 ; dd = version (1 for now)
\r
20 ;----------------------------------------------------------------------------
\r
21 ; NOTE: order of sections listed below is insignificant
\r
22 ; since they're identified by pointer in above header
\r
23 ;----------------------------------------------------------------------------
\r
29 ; dw = bottom margin
\r
31 ; dd = inner line color
\r
32 ; dd = outer line color
\r
34 ; dd = dtp file size
\r
35 ; ?? = dtp file itself
\r
37 ;----------------------------------------------------------------------------
\r
40 ; dd = button type (1 = close, 2 = minimize)
\r
41 ; dw = left button coord (could be negative)
\r
42 ; dw = top button coord (could be negative)
\r
44 ; dw = button height
\r
45 ; ... etc for all buttons
\r
46 ; dd = 0 (end of buttons list)
\r
48 ;----------------------------------------------------------------------------
\r
51 ; dw = bitmap kind (1 = left, 2 = oper, 3 = base)
\r
52 ; dw = bitmap type (1 = active, 0 = inactive)
\r
54 ; ... etc for all bitmaps
\r
55 ; dd 0 (end of bitmaps list)
\r
57 ;----------------------------------------------------------------------------
\r
61 ; dd = bitmap height
\r
62 ; ?? = raw bitmap data
\r
63 ; ... etc for all bitmaps
\r
65 ;============================================================================
\r
67 dd 'SKIN',1,__params__,__buttons__,__bitmaps__
\r
69 struc BITMAPFILEHEADER {
\r
71 .bfSize dd ? ; DWORD
\r
72 .bfReserved1 dw ? ; WORD
\r
73 .bfReserved2 dw ? ; WORD
\r
74 .bfOffBits dd ? ; DWORD
\r
77 struc BITMAPINFOHEADER {
\r
78 .biSize dd ? ; DWORD
\r
79 .biWidth dd ? ; LONG
\r
80 .biHeight dd ? ; LONG
\r
81 .biPlanes dw ? ; WORD
\r
82 .biBitCount dw ? ; WORD
\r
83 .biCompression dd ? ; DWORD
\r
84 .biSizeImage dd ? ; DWORD
\r
85 .biXPelsPerMeter dd ? ; LONG
\r
86 .biYPelsPerMeter dd ? ; LONG
\r
87 .biClrUsed dd ? ; DWORD
\r
88 .biClrImportant dd ? ; DWORD
\r
99 macro BITMAP _name*,_fname*
\r
107 load w dword from _file:_bmp.i.biWidth
\r
108 load h dword from _file:_bmp.i.biHeight
\r
109 load hsize dword from _file:_bmp.h.bfOffBits
\r
115 a=hsize+(w*3+(w mod 4))*(h-1)
\r
119 load r from _file:a+0
\r
120 load g from _file:a+1
\r
121 load b from _file:a+2
\r
125 a=a-w*3*2-(w mod 4)
\r
129 macro define_colors name,[col,val]
\r
134 match =binner,col \{ a = val \}
\r
135 match =bouter,col \{ b = val \}
\r
136 match =bframe,col \{ c = val \}
\r
141 macro SKIN_PARAMS [a]
\r
144 local _height,_margins,_colors,_colors_1,_dtp
\r
149 match =height,qq \\{ _height = ww \\}
\r
150 match =margins,qq \\{
\r
151 match [q1:q2:q3:q4],ww
\r
153 _margins equ q3,q1,q4,q2
\r
156 match =colors =active,qq
\r
158 match [q10==q11:q20==q21:q30==q31],ww
\r
160 define_colors _colors,q10,q11,q20,q21,q30,q31
\r
163 match =colors =inactive,qq
\r
165 match [q10==q11:q20==q21:q30==q31],ww
\r
167 define_colors _colors_1,q10,q11,q20,q21,q30,q31
\r
170 match =dtp,qq \\{ _dtp equ ww \\}
\r
175 dd _colors,_colors_1
\r
181 macro SKIN_BUTTONS [a]
\r
190 match =close,qq \\{ btn = 1 \\}
\r
191 match =minimize,qq \\{ btn = 2 \\}
\r
192 match [q1:q2][q3:q4],ww
\r
204 macro SKIN_BITMAPS [a]
\r
213 match qqq =active,qq \\{ bmp = 1 \\}
\r
214 match qqq =inactive,qq \\{ bmp = 0 \\}
\r