From ea092f3fe72ef88db36498a9744f4bc7218924e7 Mon Sep 17 00:00:00 2001 From: Akyltist Date: Tue, 8 Apr 2014 05:31:08 +0000 Subject: [PATCH] add new skin "loggy" git-svn-id: svn://kolibrios.org@4794 a494cfbc-eb01-0410-851d-a64ba20cac60 --- skins/loggy/build.bat | 4 + skins/loggy/default.asm | 32 +++++ skins/loggy/dtp.asm | 60 +++++++++ skins/loggy/loggy.inc | 47 +++++++ skins/loggy/parse.inc | 235 +++++++++++++++++++++++++++++++++++ skins/loggy/pic_center_a.bmp | Bin 0 -> 138 bytes skins/loggy/pic_center_b.bmp | Bin 0 -> 138 bytes skins/loggy/pic_left_a.bmp | Bin 0 -> 222 bytes skins/loggy/pic_left_b.bmp | Bin 0 -> 222 bytes skins/loggy/pic_right_a.bmp | Bin 0 -> 2238 bytes skins/loggy/pic_right_b.bmp | Bin 0 -> 2322 bytes 11 files changed, 378 insertions(+) create mode 100644 skins/loggy/build.bat create mode 100644 skins/loggy/default.asm create mode 100644 skins/loggy/dtp.asm create mode 100644 skins/loggy/loggy.inc create mode 100644 skins/loggy/parse.inc create mode 100644 skins/loggy/pic_center_a.bmp create mode 100644 skins/loggy/pic_center_b.bmp create mode 100644 skins/loggy/pic_left_a.bmp create mode 100644 skins/loggy/pic_left_b.bmp create mode 100644 skins/loggy/pic_right_a.bmp create mode 100644 skins/loggy/pic_right_b.bmp diff --git a/skins/loggy/build.bat b/skins/loggy/build.bat new file mode 100644 index 0000000000..a2a3469320 --- /dev/null +++ b/skins/loggy/build.bat @@ -0,0 +1,4 @@ +@fasm dtp.asm dtp.dtp +@fasm default.asm default.skn +@kpack default.skn +@pause \ No newline at end of file diff --git a/skins/loggy/default.asm b/skins/loggy/default.asm new file mode 100644 index 0000000000..8359ee4be3 --- /dev/null +++ b/skins/loggy/default.asm @@ -0,0 +1,32 @@ +include 'loggy.inc' ; Color Table +include 'parse.inc' + +SKIN_PARAMS \ + height = bmp_center1.height,\ ; skin height + margins = [5:1:43:1],\ ; margins [left:top:right:bottom] + colors active = [binner=win_border:\ + bouter=win_frame:\ + bframe=win_face],\ + colors inactive = [binner=win_inborder:\ + bouter=win_inframe:\ + bframe=win_inface],\ + dtp = 'dtp.dtp' ; dtp colors + +SKIN_BUTTONS \ + close = [-20:3][14:14],\ ; buttons coordinates + minimize = [-37:3][14:14] ; [left:top][width:height] + +SKIN_BITMAPS \ + left active = bmp_left1,\ ; skin bitmaps pointers + left inactive = bmp_left2,\ + oper active = bmp_right1,\ + oper inactive = bmp_right2,\ + base active = bmp_center1,\ + base inactive = bmp_center2 + +BITMAP bmp_left1, 'pic_left_a.bmp' ; skin bitmaps +BITMAP bmp_left2, 'pic_left_b.bmp' +BITMAP bmp_right1, 'pic_right_a.bmp' +BITMAP bmp_right2, 'pic_right_b.bmp' +BITMAP bmp_center1,'pic_center_a.bmp' +BITMAP bmp_center2,'pic_center_b.bmp' diff --git a/skins/loggy/dtp.asm b/skins/loggy/dtp.asm new file mode 100644 index 0000000000..64c725461d --- /dev/null +++ b/skins/loggy/dtp.asm @@ -0,0 +1,60 @@ +; [ DTP ] Common Colors +include 'loggy.inc' +; set table +struc system_colors +{ +__menu_body dd menu_body +__3d_face dd 3d_face +__3d_dark dd 3d_dark +__3d_light dd 3d_light +__win_title dd win_title +__win_body dd win_body +__btn_face dd btn_face +__btn_text dd btn_text + +__win_text dd win_text +__panel_frame dd panel_frame +__win_face dd win_face +__win_inface dd win_inface +__win_frame dd win_frame +__win_inframe dd win_inframe +__win_border dd win_border +__win_inborder dd win_inborder + +__win_graytext dd win_graytext +__menu_frame dd menu_frame +__menu_text dd menu_text +__panel_body dd panel_body +__panel_text dd panel_text +__hint_frame dd hint_frame +__hint_body dd hint_body +__hint_text dd hint_text + +__btn_inface dd btn_inface +__btn_fcface dd btn_fcface +__btn_frame dd btn_frame +__btn_inframe dd btn_inframe +__btn_fcframe dd btn_fcframe +__btn_intext dd btn_intext +__btn_fctext dd btn_fctext +__gui_shadow dd gui_shadow + +__gui_face dd gui_face +__gui_inface dd gui_inface +__gui_fcface dd gui_fcface +__gui_frame dd gui_frame +__gui_inframe dd gui_inframe +__gui_fcframe dd gui_fcframe +__gui_text dd gui_text +__gui_intext dd gui_intext + +__gui_fctext dd gui_fctext +__gui_select dd gui_select +__res_var_a dd reserved +__res_var_b dd reserved +__res_var_c dd reserved +__res_var_d dd reserved +__res_var_e dd reserved +__res_var_f dd reserved +} +struct system_colors diff --git a/skins/loggy/loggy.inc b/skins/loggy/loggy.inc new file mode 100644 index 0000000000..1af7125bce --- /dev/null +++ b/skins/loggy/loggy.inc @@ -0,0 +1,47 @@ + win_face equ 0xE1E1E1 ; - Фон обводки активного окна. ; 1 + win_inface equ 0xE1E1E1 ; - Фон обводки неактивного окна. ; 2 + win_frame equ 0x204962 ; - Цвет внешней рамки активного окна. ; 3 + win_inframe equ 0xA1A1A1 ; - Цвет внешней рамки неактивного окна. ; 4 + win_border equ 0xE1E1E1 ; - Цвет внутренней рамки активного окна. ; 5 + win_inborder equ 0xE1E1E1 ; - Цвет внутренней рамки неактивного окна. ; 6 + win_body equ 0xE4DFE1 ; - Фон клиентской части активного окна. ; 7 + win_title equ 0x2F2F2F ; - Цвет текста полосы заголовка. ; 8 + win_text equ 0x000000 ; - Цвет текста в рабочей области окна. ; 9 + win_graytext equ 0x666666 ; - Цвет неактивного текста. ; 0 + menu_frame equ 0x204962 ; - Цвет внешней рамки дочерних потоков ; 1 + menu_body equ 0xD4D4D4 ; - Фон дочерних потоков и меню приложения. ; 2 + menu_text equ 0x3C415B ; - Цвет текста дочерних потоков и меню. ; 3 + panel_frame equ 0x94AECE ; - Цвет внешней рамки панелей ; 4 + panel_body equ 0xE4DFE1 ; - Фон панелей приложения. ; 5 + panel_text equ 0x2F2F2F ; - Цвет текста панелей приложения. ; 6 + hint_frame equ 0x94AECE ; - Цвет внешней рамки подсказок ; 7 + hint_body equ 0xFAF8FA ; - Фон подсказки. ; 8 + hint_text equ 0x3C415B ; - Цвет текста подсказки. ; 9 + btn_face equ 0x677B9C ; - Фон кнопки. ; 0 + btn_inface equ 0x7D8EAA ; - Фон неактивной кнопки. ; 1 + btn_fcface equ 0x5C708F ; - Фон кнопки при наведении. ; 2 + btn_frame equ 0x9F9F9F ; - Цвет рамки кнопки. ; 3 + btn_inframe equ 0xB1B1B1 ; - Цвет рамки неактивной кнопки. ; 4 + btn_fcframe equ 0x797979 ; - Цвет рамки кнопки при наведении. ; 5 + btn_text equ 0xFFFFFF ; - Цвет текста кнопки. ; 6 + btn_intext equ 0xD0D9E8 ; - Цвет текста неактивной кнопки. ; 7 + btn_fctext equ 0xFFFFFF ; - Цвет текста кнопки при наведении. ; 8 + 3d_face equ 0xCED0D0 ; - Основной цвет наложения тени (скролл). ; 9 + 3d_dark equ 0xEFEFEF ; - Теневая обводка. ; 0 + 3d_light equ 0xFCFCFC ; - Световая обводка. ; 1 + gui_shadow equ 0xFFFFFF ; - Цвет тени для неактивных элементов. ; 2 + gui_face equ 0xFAF8FA ; - Фон элементов. ; 3 + gui_inface equ 0xF6F3F6 ; - Фон неактивных элементов. ; 4 + gui_fcface equ 0xFAF8FA ; - Фон элементов при наведении. ; 5 + gui_frame equ 0x9F9F9F ; - Рамка элемента. ; 6 + gui_inframe equ 0xACACAC ; - Рамка неактивного элемента. ; 7 + gui_fcframe equ 0x94AECE ; - Рамка элемента при наведении. ; 8 + gui_text equ 0x2F2F2F ; - Цвет текста элемента. ; 9 + gui_intext equ 0x5F5F5F ; - Цвет текста неактивного элемента. ; 0 + gui_fctext equ 0x2F2F2F ; - Цвет текста элемента при наведении. ; 1 + gui_select equ 0xC7C9C9 ; - Цвет фона полосы выделения текста . ; 2 + reserved equ 0x000000 ; - Зарезервированно. ; 3 + + + + diff --git a/skins/loggy/parse.inc b/skins/loggy/parse.inc new file mode 100644 index 0000000000..ccbb3c191c --- /dev/null +++ b/skins/loggy/parse.inc @@ -0,0 +1,235 @@ +;============================================================================ +; This file should be used to generate skins of new standard +;============================================================================ +; skin file structure: +;---------------------------------------------------------------------------- +; header: +; dd 'SKIN' +; dd = version (1 for now) +; dd @ params +; dd @ buttons +; dd @ bitmaps +; ... +;---------------------------------------------------------------------------- +; NOTE: order of sections listed below is insignificant +; since they're identified by pointer in above header +;---------------------------------------------------------------------------- +; ... +; params: +; dd = skin height +; dw = right margin +; dw = left margin +; dw = bottom margin +; dw = top margin +; dd = inner line color +; dd = outer line color +; dd = frame color +; dd = dtp file size +; ?? = dtp file itself +; ... +;---------------------------------------------------------------------------- +; ... +; buttons: +; dd = button type (1 = close, 2 = minimize) +; dw = left button coord (could be negative) +; dw = top button coord (could be negative) +; dw = button width +; dw = button height +; ... etc for all buttons +; dd = 0 (end of buttons list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmaps: +; dw = bitmap kind (1 = left, 2 = oper, 3 = base) +; dw = bitmap type (1 = active, 0 = inactive) +; dd @ bitmap +; ... etc for all bitmaps +; dd 0 (end of bitmaps list) +; ... +;---------------------------------------------------------------------------- +; ... +; bitmap: +; dd = bitmap width +; dd = bitmap height +; ?? = raw bitmap data +; ... etc for all bitmaps +; ... +;============================================================================ + +dd 'SKIN',1,__params__,__buttons__,__bitmaps__ + +struc BITMAPFILEHEADER { + .bfType dw ? ; WORD + .bfSize dd ? ; DWORD + .bfReserved1 dw ? ; WORD + .bfReserved2 dw ? ; WORD + .bfOffBits dd ? ; DWORD +} + +struc BITMAPINFOHEADER { + .biSize dd ? ; DWORD + .biWidth dd ? ; LONG + .biHeight dd ? ; LONG + .biPlanes dw ? ; WORD + .biBitCount dw ? ; WORD + .biCompression dd ? ; DWORD + .biSizeImage dd ? ; DWORD + .biXPelsPerMeter dd ? ; LONG + .biYPelsPerMeter dd ? ; LONG + .biClrUsed dd ? ; DWORD + .biClrImportant dd ? ; DWORD +} + +struc _bmp { + .h BITMAPFILEHEADER + .i BITMAPINFOHEADER +} +virtual at 0 + _bmp _bmp +end virtual + +macro BITMAP _name*,_fname* +{ + local w,h,a,r,g,b + virtual at 0 + file _fname + load w dword from _bmp.i.biWidth + load h dword from _bmp.i.biHeight + end virtual + align 4 + label _name + .width = w + .height = h + dd w,h + a=54+(w*3+(w mod 4))*(h-1) + size = $ + repeat h + repeat w + virtual at 0 + file _fname + load r from a+0 + load g from a+1 + load b from a+2 + end virtual + db r,g,b + a=a+3 + end repeat + a=a-w*3*2-(w mod 4) + end repeat +} + +macro define_colors name,[col,val] +{ + common + local a,b,c + forward + match =binner,col \{ a = val \} + match =bouter,col \{ b = val \} + match =bframe,col \{ c = val \} + common + name equ a,b,c +} + +macro SKIN_PARAMS [a] +{ + common + local _height,_margins,_colors,_colors_1,_dtp,_dtp_sz + __params__: + forward + match qq == ww,a + \{ + match =height,qq \\{ _height = ww \\} + match =margins,qq \\{ + match [q1:q2:q3:q4],ww + \\\{ + _margins equ q3,q1,q4,q2 + \\\} + \\} + match =colors =active,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =colors =inactive,qq + \\{ + match [q10==q11:q20==q21:q30==q31],ww + \\\{ + define_colors _colors_1,q10,q11,q20,q21,q30,q31 + \\\} + \\} + match =dtp,qq \\{ _dtp equ ww \\} + \} + common + dd _height + dw _margins + dd _colors,_colors_1 + virtual at 0 + file _dtp + _dtp_sz = $ + end virtual + dd _dtp_sz + file _dtp +} + +macro SKIN_BUTTONS [a] +{ + common + local btn + __buttons__: + forward + match qq == ww,a + \{ + btn = 0 + match =close,qq \\{ btn = 1 \\} + match =minimize,qq \\{ btn = 2 \\} + match [q1:q2][q3:q4],ww + \\{ + if btn <> 0 + dd btn + dw q1,q2,q3,q4 + end if + \\} + \} + common + dd 0 +} + +macro SKIN_BITMAPS [a] +{ + common + local bmp + __bitmaps__: + forward + match qq == ww,a + \{ + bmp=-1 + match qqq =active,qq \\{ bmp = 1 \\} + match qqq =inactive,qq \\{ bmp = 0 \\} + match =left qqq,qq + \\{ + if bmp >= 0 + dw 1,bmp + dd ww + end if + \\} + match =oper qqq,qq + \\{ + if bmp >= 0 + dw 2,bmp + dd ww + end if + \\} + match =base qqq,qq + \\{ + if bmp >= 0 + dw 3,bmp + dd ww + end if + \\} + \} + common + dd 0 +} \ No newline at end of file diff --git a/skins/loggy/pic_center_a.bmp b/skins/loggy/pic_center_a.bmp new file mode 100644 index 0000000000000000000000000000000000000000..bd3913a83ca59ed1a39d54a4444aa093c5ff4081 GIT binary patch literal 138 zcmXwqK?(vP005_Rw;<@)u^04!ZXNnWY@g{}$|8b@2#bgy3+fxZWi1WN%R=);GepFx3RD$i47~pyA1XNP literal 0 HcmV?d00001 diff --git a/skins/loggy/pic_left_a.bmp b/skins/loggy/pic_left_a.bmp new file mode 100644 index 0000000000000000000000000000000000000000..bb75b4c11f840f3baf271fdb08b6179f9ee6189b GIT binary patch literal 222 zcmY+;K?*`46ouhidk7jfYz1!tjheKG;I+5*B&LX>D58j>!!D;$7yk22@9puS-)+p5 zJ8~!PKxbZ}H}-#?_seVFiC7^7lu|;a6x3QnV+^#`LgyUx-op?Aj4{HL63jWnQVOiK U!qyt>y~8mEoO8mp7Ub86zE2oQD*ylh literal 0 HcmV?d00001 diff --git a/skins/loggy/pic_left_b.bmp b/skins/loggy/pic_left_b.bmp new file mode 100644 index 0000000000000000000000000000000000000000..575d5e477088d5d6a2676e859f6c1f81fd326da2 GIT binary patch literal 222 ycmZ?ry~h9nWEp*iNduk6zyJV%sbj?e literal 0 HcmV?d00001 diff --git a/skins/loggy/pic_right_a.bmp b/skins/loggy/pic_right_a.bmp new file mode 100644 index 0000000000000000000000000000000000000000..6daaefb6585d99f34d5656f30366a67ae637432b GIT binary patch literal 2238 zcmchXze~eF6vxlae?V|-Ern82NB;mP7ypPt9UR=;T%5$sKR|GFcM>EXM$<+Sq&C&I zNlI!=f6!7|N=xhJmv=>^y$T)95APoDy}aBvxw~Y0m#;En3qFCdfw6|M!q(v#JDpyq zWa{=Z8P%5Fi7;j=#&uoN$ttE=t&)zV7~l6v=SeZOT8(s`6%zyj>AWltmg0kWBSeg% zbfz#2NhhDrzs`Z86w#Q=eI^o?l?&^{qg6)=FTDjVq=QF#p94kPwhIf0MlUtZO(u(` z8Dz5o0;DKP+ndcM>0tfvYBQh+?cxINjdCn@l}h=V=D`pkH6I*ld#lwVotxuB>*Q$0 zP^?rcr3HANXWW(W4x5_|7y`p6qbO}}x7(z1wx2#f$jlguj^jW|3YLO%_qPt`9*WZD zPNzdU_%8rF%@3mThu8HA_5{lnk6*(OAm!YV-qP)MNeBOhWfA89d%|yR7y@w)r1SK8 zJ<`GVx-7b0h(s=Q-NtbN2t+EKr{C|Bj_6hA2ZI6Wh;L1u9}b74(@@N4G$I|GN2QF% SW77Fj%w#el9k_om#=ZdpSw-9c literal 0 HcmV?d00001 diff --git a/skins/loggy/pic_right_b.bmp b/skins/loggy/pic_right_b.bmp new file mode 100644 index 0000000000000000000000000000000000000000..aa31033e70c89767d265bfcd3b39c9b546e70077 GIT binary patch literal 2322 zcmc(hy-vbV6vykPtBHxbi%;MKxVy73kr)=k#y|*h@j-kU5L!%V!HE|70sVj)>gMLp zHeQOCm^7q#^1qjJPH)eTdv4S8_U`;lN$rODnsLRrV4NtI%!)ESO@DT#=VKYv`D|9U zK9YnD9hqg%=VeRm%dzdU^)D>faf-@w-6#y-<9HQC_y}jS*<_(yP3$XMTxbr1z%YzP zqhaVeKAMcjgm05c^h3`VJcJblLA6?KwOY+)b2J+1x{gCga0?B#z^S=gDHRrmD4Ct=(>ez;Fm(heLn4l-CQEWm%n0=Seb>a4EZ2uIs9U z0hGtoa8y-=vUjmynbT>#UVo5`Bs<=FFMpm^P(07lG>s&e*fuK4(Ph?o-1dRMi3JA+Hy#!1s%awr9@