Compare commits
6 Commits
87dacf1193
...
ci/update
Author | SHA1 | Date | |
---|---|---|---|
f2f77cb998 | |||
fcb9f49785 | |||
d6c44c6570 | |||
b8a1487bab | |||
00c2cfbcfc | |||
c398a2bbf4 |
@@ -149,18 +149,21 @@ jobs:
|
||||
with:
|
||||
name: kolibrios-en_US-${{ steps.vars.outputs.sha_short }}.img
|
||||
path: build-en_US/data/kolibri.img
|
||||
retention-days: 365
|
||||
|
||||
- name: (en_US) Upload CD image
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: kolibrios-en_US-${{ steps.vars.outputs.sha_short }}.iso
|
||||
path: build-en_US/data/kolibri.iso
|
||||
retention-days: 30
|
||||
|
||||
- name: (en_US) Upload raw image
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: kolibrios-en_US-${{ steps.vars.outputs.sha_short }}.raw
|
||||
path: build-en_US/data/kolibri.raw
|
||||
retention-days: 7
|
||||
|
||||
# -------------------------- Build ru_RU ------------------------- #
|
||||
- name: (ru_RU) Build KolibriOS
|
||||
@@ -174,18 +177,21 @@ jobs:
|
||||
with:
|
||||
name: kolibrios-ru_RU-${{ steps.vars.outputs.sha_short }}.img
|
||||
path: build-ru_RU/data/kolibri.img
|
||||
retention-days: 365
|
||||
|
||||
- name: (ru_RU) Upload CD image
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: kolibrios-ru_RU-${{ steps.vars.outputs.sha_short }}.iso
|
||||
path: build-ru_RU/data/kolibri.iso
|
||||
retention-days: 30
|
||||
|
||||
- name: (ru_RU) Upload raw image
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: kolibrios-ru_RU-${{ steps.vars.outputs.sha_short }}.raw
|
||||
path: build-ru_RU/data/kolibri.raw
|
||||
retention-days: 7
|
||||
|
||||
# -------------------------- Build es_ES ------------------------- #
|
||||
- name: (es_ES) Build KolibriOS
|
||||
@@ -199,15 +205,18 @@ jobs:
|
||||
with:
|
||||
name: kolibrios-es_ES-${{ steps.vars.outputs.sha_short }}.img
|
||||
path: build-es_ES/data/kolibri.img
|
||||
retention-days: 365
|
||||
|
||||
- name: (es_ES) Upload CD image
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: kolibrios-es_ES-${{ steps.vars.outputs.sha_short }}.iso
|
||||
path: build-es_ES/data/kolibri.iso
|
||||
retention-days: 30
|
||||
|
||||
- name: (es_ES) Upload raw image
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: kolibrios-es_ES-${{ steps.vars.outputs.sha_short }}.raw
|
||||
path: build-es_ES/data/kolibri.raw
|
||||
retention-days: 7
|
||||
|
@@ -429,7 +429,7 @@ tup.append_table(img_files, {
|
||||
{"KPACK", VAR_PROGS .. "/other/kpack/trunk/kpack"},
|
||||
{"LAUNCHER", VAR_PROGS .. "/system/launcher/trunk/launcher"},
|
||||
{"LOADDRV", VAR_PROGS .. "/system/loaddrv/loaddrv"},
|
||||
{"MAGNIFY", VAR_PROGS .. "/demos/magnify/magnify"},
|
||||
{"MAGNIFY", VAR_PROGS .. "/demos/magnify/trunk/magnify"},
|
||||
{"MGB", VAR_PROGS .. "/testing/mgb/trunk/mgb"},
|
||||
{"MOUSEMUL", VAR_PROGS .. "/system/mousemul/trunk/mousemul"},
|
||||
{"MADMOUSE", VAR_PROGS .. "/other/madmouse/madmouse"},
|
||||
@@ -635,7 +635,6 @@ tup.append_table(extra_files, {
|
||||
})
|
||||
-- For russian build, add russian-only programs.
|
||||
if build_type == "ru_RU" then tup.append_table(img_files, {
|
||||
{"PERIOD", VAR_PROGS .. "/other/period/trunk/period"},
|
||||
{"GAMES/KLAVISHA", VAR_PROGS .. "/games/klavisha/klavisha"},
|
||||
{"DEVELOP/EXAMPLES/TESTCON2", VAR_PROGS .. "/develop/libraries/console_coff/examples/testcon2_rus"},
|
||||
}) else tup.append_table(img_files, {
|
||||
@@ -643,6 +642,7 @@ if build_type == "ru_RU" then tup.append_table(img_files, {
|
||||
}) end
|
||||
|
||||
if build_type == "ru_RU" then tup.append_table(extra_files, {
|
||||
{"kolibrios/utils/period", VAR_PROGS .. "/other/period/trunk/period"},
|
||||
{"kolibrios/games/Dungeons/Dungeons", VAR_PROGS .. "/games/Dungeons/Dungeons"},
|
||||
}) end
|
||||
|
||||
|
@@ -119,7 +119,7 @@
|
||||
45 <20><><EFBFBD><EFBFBD>⮩ <20><>ਭ<EFBFBD><E0A8AD><EFBFBD><EFBFBD><EFBFBD> |easyshot
|
||||
29 FB2 <20><>⠫<EFBFBD><E2A0AB> |fb2read
|
||||
16 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> |aclock
|
||||
21 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |period
|
||||
21 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |/kolibrios/utils/period
|
||||
59 <20>७<EFBFBD><E0A5AD><EFBFBD><EFBFBD> KJ|ABuIIIA |games/klavisha
|
||||
16 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> |demos/bcdclk
|
||||
53 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> |timer
|
||||
|
@@ -270,11 +270,15 @@ void TWebBrowser::tag_h1234_caption()
|
||||
void TWebBrowser::tag_kosicon()
|
||||
{
|
||||
dword imgbuf[44];
|
||||
dword maxicon;
|
||||
dword shared_i18 = memopen("ICONS18", NULL, SHM_READ);
|
||||
maxicon = EDX / 18 / 18 / 4;
|
||||
if (shared_i18) && (tag.get_number_of("n")) {
|
||||
if (draw_x + 18 > canvas.bufw) NewLine();
|
||||
canvas.DrawImage(draw_x, draw_y-2, 18, 18, 18*18*4*tag.number+shared_i18);
|
||||
draw_x += 22;
|
||||
if (tag.number < maxicon) {
|
||||
if (draw_x + 18 > canvas.bufw) NewLine();
|
||||
canvas.DrawImage(draw_x, draw_y-2, 18, 18, 18*18*4*tag.number+shared_i18);
|
||||
draw_x += 22;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -571,10 +571,10 @@ void OpenPage(dword _open_URL)
|
||||
//INTERNAL PAGE
|
||||
history.add(#new_url);
|
||||
WB1.custom_encoding = -1;
|
||||
if (streq(#new_url, URL_SERVICE_HOMEPAGE)) LoadInternalPage(#buildin_page_home, sizeof(buildin_page_home)-1);
|
||||
else if (streq(#new_url, URL_SERVICE_TEST)) LoadInternalPage(#buildin_page_test, sizeof(buildin_page_test)-1);
|
||||
if (streq(#new_url, URL_SERVICE_HOMEPAGE)) LoadInternalPage(#buildin_page_home, sizeof(buildin_page_home));
|
||||
else if (streq(#new_url, URL_SERVICE_TEST)) LoadInternalPage(#buildin_page_test, sizeof(buildin_page_test));
|
||||
else if (streq(#new_url, URL_SERVICE_HISTORY)) ShowHistory();
|
||||
else LoadInternalPage(#buildin_page_error, sizeof(buildin_page_error)-1);
|
||||
else LoadInternalPage(#buildin_page_error, sizeof(buildin_page_error));
|
||||
|
||||
} else if (!strncmp(#new_url,"http:",5)) || (!strncmp(#new_url,"https:",6)) {
|
||||
//WEB PAGE
|
||||
@@ -589,7 +589,7 @@ void OpenPage(dword _open_URL)
|
||||
|
||||
if (!http.transfer) {
|
||||
history.add(#new_url);
|
||||
LoadInternalPage(#buildin_page_error, sizeof(buildin_page_error)-1);
|
||||
LoadInternalPage(#buildin_page_error, sizeof(buildin_page_error));
|
||||
}
|
||||
} else {
|
||||
//LOCAL PAGE
|
||||
@@ -712,7 +712,7 @@ void EventSubmitOmnibox()
|
||||
|
||||
void LoadInternalPage(dword _bufdata, _in_bufsize){
|
||||
if (!_bufdata) || (!_in_bufsize) {
|
||||
LoadInternalPage(#buildin_page_error, sizeof(buildin_page_error)-1);
|
||||
LoadInternalPage(#buildin_page_error, sizeof(buildin_page_error));
|
||||
} else {
|
||||
WB1.list.first = 0; //scroll page to the top
|
||||
DrawOmnibox();
|
||||
|
@@ -112,4 +112,4 @@ char editbox_icons[] = FROM "res/editbox_icons.raw";
|
||||
|
||||
#define DEFAULT_URL URL_SERVICE_HOMEPAGE
|
||||
|
||||
char version[]="WebView 3.85";
|
||||
char version[]="WebView 3.9";
|
@@ -1,17 +1,49 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Homepage</title>
|
||||
</head>
|
||||
<body><pre>Welcome to WebView a Text-Based Browser.
|
||||
<html><head><title>New tab</title></head>
|
||||
<body bgcolor=#fff>
|
||||
|
||||
KolibriOS Bookmarks:
|
||||
1. <a href=//kolibrios.org>Homepage</a>
|
||||
2. <a href="//builds.kolibrios.org">Night-builds</a>
|
||||
3. <a href="//ftp.kolibrios.org">FTP Server</a>
|
||||
<table><tr><td width=20><td width=210><pre>
|
||||
___________________
|
||||
|# : : #|
|
||||
| : WebView : |
|
||||
| : TextBased : |
|
||||
| : Browser : |
|
||||
| : : |
|
||||
| :_____________: |
|
||||
| ___________ |
|
||||
| | __ | |
|
||||
| || | | |
|
||||
\____||__|_______|__|<font color=#DDD>lc</font>
|
||||
|
||||
<font bg=#F8F15B>By the way,</font>
|
||||
<font bg=#F8F15B> web <font bg=#FF5A7E color=#fff> 1.0 <font bg=#47D018> compatable
|
||||
<font bg=#3CE7FF> </font></font></font></font>
|
||||
<td>
|
||||
|
||||
</pre>
|
||||
<kosicon n=58><a href=//kolibrios.org>Homepage</a>
|
||||
<kosicon n=50><a href="//builds.kolibrios.org">Night-builds</a>
|
||||
<kosicon n=50><a href="//ftp.kolibrios.org">FTP Server</a>
|
||||
<pre>
|
||||
|
||||
By the way,
|
||||
<font color="#555555">• You can check for browser updates from the main menu.
|
||||
• To run a web search, type a text in the adress box and press Ctrl+Enter.
|
||||
• To run a web search, type a text in the adress box and press Ctrl+Enter.
|
||||
• Pressing F6 moves a text cursor to the omnibox.
|
||||
• Click on a label in the bottom right corner to change the encoding of a page.
|
||||
</font>
|
||||
• You can manually change the encoding of a page by clicking on a label in the bottom right corner.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
~+
|
||||
|
||||
* +
|
||||
' |
|
||||
() .-.,="``"=. - o -
|
||||
'=/_ \ |
|
||||
* | '=._ |
|
||||
\ `=./`, '
|
||||
. '=.__.=' `=' *
|
||||
+ +
|
||||
O * ' .<font color=#DDD>jgs</font>
|
@@ -1,15 +1,49 @@
|
||||
<html><head><meta charset="cp-866">
|
||||
<title><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>࠭<EFBFBD><E0A0AD><EFBFBD></title></head>
|
||||
<body><pre><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ⥪<>⮢<EFBFBD><E2AEA2> <20><><EFBFBD>㧥<EFBFBD> WebView!
|
||||
<html><head><title><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></title></head>
|
||||
<body bgcolor=#fff>
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> KolibriOS:<ol>
|
||||
<li><a href=//kolibrios.org><EFBFBD><EFBFBD><EFBFBD>樠<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᠩ<></a>
|
||||
<li><a href="//builds.kolibrios.org"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᡮન</a>
|
||||
<li><a href="//ftp.kolibrios.org">FTP <20><>ࢥ<EFBFBD></a></ol>
|
||||
<table><tr><td width=20><td width=210><pre>
|
||||
___________________
|
||||
|# : : #|
|
||||
| : WebView : |
|
||||
| : <20><><EFBFBD><EFBFBD>⮢<EFBFBD><E2AEA2> : |
|
||||
| : <20><><EFBFBD>㧥<EFBFBD> : |
|
||||
| : : |
|
||||
| :_____________: |
|
||||
| ___________ |
|
||||
| | __ | |
|
||||
| || | | |
|
||||
\____||__|_______|__|<font color=#DDD>lc</font>
|
||||
|
||||
<font bg=#F8F15B><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,</font>
|
||||
<font bg=#F8F15B> web <font bg=#FF5A7E color=#fff> 1.0 <font bg=#47D018> compatable
|
||||
<font bg=#3CE7FF> </font></font></font></font>
|
||||
<td>
|
||||
|
||||
</pre>
|
||||
<kosicon n=58><a href=//kolibrios.org><EFBFBD><EFBFBD><EFBFBD>樠<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᠩ<></a>
|
||||
<kosicon n=50><a href="//builds.kolibrios.org"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᡮન</a>
|
||||
<kosicon n=50><a href="//ftp.kolibrios.org">FTP <20><>ࢥ<EFBFBD></a>
|
||||
<pre>
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
|
||||
<font color="#555555">• <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E0AEA2><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>稥 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
• <20><><EFBFBD> <20><><EFBFBD>᪠ <20> Google <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD>᭮<EFBFBD> <20><>ப<EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ctrl+Enter
|
||||
• <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> F6 <20><>६<EFBFBD>頥<EFBFBD> ⥪<>⮢<EFBFBD><E2AEA2> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
||||
• <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0AEA2> <20><>࠭<EFBFBD><E0A0AD><EFBFBD>, <20><><EFBFBD> <20>⮣<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20>ࠢ<EFBFBD><E0A0A2> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 㣫<> <20><><EFBFBD><EFBFBD>.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
~+
|
||||
|
||||
* +
|
||||
' |
|
||||
() .-.,="``"=. - o -
|
||||
'=/_ \ |
|
||||
* | '=._ |
|
||||
\ `=./`, '
|
||||
. '=.__.=' `=' *
|
||||
+ +
|
||||
O * ' .<font color=#DDD>jgs</font>
|
@@ -1,4 +0,0 @@
|
||||
if tup.getconfig("NO_FASM") ~= "" then return end
|
||||
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HELPERDIR")
|
||||
tup.include(HELPERDIR .. "/use_fasm.lua")
|
||||
tup.rule("magnify.asm", FASM .. " -dlang=" .. tup.getconfig("LANG") .. " %f %o" .. tup.getconfig("KPACK_CMD"), "%B")
|
@@ -1,229 +0,0 @@
|
||||
; SPDX-License-Identifier: GPL-2.0-only
|
||||
;
|
||||
; Magnify - Screen Magnifier
|
||||
; Copyright (C) 2005 MenuetOS
|
||||
; Copyright (C) 2005-2025 KolibriOS team
|
||||
|
||||
;---------------------------------------------------------------------
|
||||
|
||||
use32
|
||||
org 0x0
|
||||
|
||||
db 'MENUET01'
|
||||
dd 1
|
||||
dd START
|
||||
dd I_END
|
||||
dd MEM
|
||||
dd STACKTOP
|
||||
dd 0, 0
|
||||
|
||||
;---------------------------------------------------------------------
|
||||
|
||||
include '../../macros.inc'
|
||||
include "../../KOSfuncs.inc"
|
||||
include "../../encoding.inc"
|
||||
|
||||
;---------------------------------------------------------------------
|
||||
|
||||
START:
|
||||
mcall SF_SET_EVENTS_MASK, EVM_REDRAW or EVM_BUTTON or EVM_MOUSE
|
||||
|
||||
mcall SF_SYS_MISC, SSF_HEAP_INIT
|
||||
|
||||
; initializing MAG_H * MAG_W rect of pixels from screen
|
||||
mcall SF_SYS_MISC, SSF_MEM_ALLOC, MAG_H * MAG_W * 3
|
||||
mov [screen_rect], eax
|
||||
|
||||
call logic_read_screen
|
||||
|
||||
still:
|
||||
mcall SF_WAIT_EVENT_TIMEOUT, DELAY
|
||||
|
||||
cmp eax, EV_REDRAW
|
||||
je redraw
|
||||
|
||||
cmp eax, EV_BUTTON
|
||||
je button
|
||||
|
||||
cmp eax, EV_MOUSE
|
||||
je mouse
|
||||
|
||||
jmp redraw
|
||||
|
||||
redraw:
|
||||
call draw_window
|
||||
call draw_magnify
|
||||
|
||||
jmp still
|
||||
|
||||
;---------------------------------------------------------------------
|
||||
|
||||
button:
|
||||
; we have only one button, close
|
||||
or eax, SF_TERMINATE_PROCESS
|
||||
mcall
|
||||
|
||||
mouse:
|
||||
mcall SF_MOUSE_GET, SSF_BUTTON
|
||||
|
||||
test ax, 0x0001
|
||||
jnz still
|
||||
|
||||
call logic_read_screen
|
||||
call draw_magnify
|
||||
|
||||
jmp still
|
||||
|
||||
;---------------------------------------------------------------------
|
||||
; ******* WINDOW DEFINITIONS AND DRAW ********
|
||||
;---------------------------------------------------------------------
|
||||
|
||||
draw_window:
|
||||
|
||||
mcall SF_REDRAW, SSF_BEGIN_DRAW
|
||||
|
||||
mcall SF_STYLE_SETTINGS, SSF_GET_SKIN_HEIGHT
|
||||
|
||||
mov ecx, eax
|
||||
add ecx, WIN.Y shl 16 + WIN.H
|
||||
|
||||
mcall SF_CREATE_WINDOW, <WIN.X, WIN.W>, , 0x34181818, , labelt
|
||||
|
||||
mcall SF_REDRAW, SSF_END_DRAW
|
||||
|
||||
ret
|
||||
|
||||
|
||||
; MAG_H * MAG_W pixels grid
|
||||
draw_magnify:
|
||||
|
||||
mcall SF_THREAD_INFO, procinfo, -1
|
||||
mov al, byte [procinfo.wnd_state]
|
||||
test al, 0x04
|
||||
jne .du_loop_end
|
||||
|
||||
mov eax, SF_DRAW_RECT
|
||||
mov ebx, MAG_S - 1
|
||||
mov ecx, MAG_S - 1
|
||||
mov esi, [screen_rect]
|
||||
mov edi, MAG_W * MAG_H
|
||||
|
||||
.du_loop_rect:
|
||||
mcall , , , dword [esi]
|
||||
add ebx, MAG_S shl 16
|
||||
cmp ebx, MAG_S * MAG_W shl 16
|
||||
jle .du_loop_rect_row
|
||||
mov ebx, MAG_S - 1
|
||||
add ecx, MAG_S shl 16
|
||||
|
||||
.du_loop_rect_row:
|
||||
add esi, 3
|
||||
dec edi
|
||||
jne .du_loop_rect
|
||||
|
||||
.du_loop_end:
|
||||
ret
|
||||
|
||||
;---------------------------------------------------------------------
|
||||
; LOGIC AREA
|
||||
;---------------------------------------------------------------------
|
||||
|
||||
; read array of pixels from screen by mouse coords
|
||||
logic_read_screen:
|
||||
|
||||
mcall SF_MOUSE_GET, SSF_SCREEN_POSITION
|
||||
mov edx, eax
|
||||
|
||||
; clamping mouse coords to stay within the screen
|
||||
mcall SF_GET_SCREEN_SIZE
|
||||
mov ebx, eax
|
||||
call logic_clamp_pixels
|
||||
|
||||
sub edx, (MAG_W / 2) shl 16 + (MAG_H / 2)
|
||||
mcall SF_GET_IMAGE, [screen_rect], <MAG_W, MAG_H>,
|
||||
|
||||
ret
|
||||
|
||||
|
||||
; clamping mouse coords to stay within the screen
|
||||
logic_clamp_pixels:
|
||||
|
||||
mov eax, edx
|
||||
shr eax, 16
|
||||
mov cx, ax
|
||||
mov ax, dx
|
||||
|
||||
push ax
|
||||
push cx
|
||||
mov ax, bx
|
||||
mov di, ax
|
||||
mov eax, ebx
|
||||
shr eax, 16
|
||||
mov si, ax
|
||||
|
||||
pop cx
|
||||
pop ax
|
||||
|
||||
.check_min_x:
|
||||
cmp cx, MAG_W / 2
|
||||
jge .check_min_y
|
||||
mov cx, MAG_W / 2
|
||||
.check_min_y:
|
||||
cmp ax, MAG_H / 2
|
||||
jge .check_max_x
|
||||
mov ax, MAG_H / 2
|
||||
.check_max_x:
|
||||
mov dx, si
|
||||
sub dx, MAG_W / 2 - 1
|
||||
cmp cx, dx
|
||||
jle .check_max_y
|
||||
mov cx, dx
|
||||
.check_max_y:
|
||||
mov dx, di
|
||||
sub dx, MAG_H / 2 - 1
|
||||
cmp ax, dx
|
||||
jle .combine_coords
|
||||
mov ax, dx
|
||||
|
||||
.combine_coords:
|
||||
mov dx, cx
|
||||
shl edx, 16
|
||||
or dx, ax
|
||||
|
||||
ret
|
||||
|
||||
;---------------------------------------------------------------------
|
||||
; DATA AREA
|
||||
;---------------------------------------------------------------------
|
||||
|
||||
DELAY = 5
|
||||
|
||||
MAG_W = 40
|
||||
MAG_H = 30
|
||||
MAG_S = 8
|
||||
|
||||
WIN RECT 100, 100, MAG_W * MAG_S + 8, MAG_H * MAG_S + 3
|
||||
|
||||
;---------------------------------------------------------------------
|
||||
|
||||
if lang eq ru_RU
|
||||
labelt cp866 'Magnify - Экранная лупа', 0
|
||||
else if lang eq es_ES
|
||||
labelt db 'Magnify - Lupa de Pantalla', 0
|
||||
else
|
||||
labelt db 'Magnify - Screen Magnifier', 0
|
||||
endf
|
||||
|
||||
;---------------------------------------------------------------------
|
||||
|
||||
screen_rect dd 0x00000000
|
||||
|
||||
;---------------------------------------------------------------------
|
||||
|
||||
I_END:
|
||||
rb 512
|
||||
align 512
|
||||
|
||||
STACKTOP:
|
||||
procinfo process_information
|
||||
MEM:
|
7
programs/demos/magnify/trunk/Tupfile.lua
Normal file
7
programs/demos/magnify/trunk/Tupfile.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
if tup.getconfig("NO_FASM") ~= "" then return end
|
||||
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
|
||||
tup.include(HELPERDIR .. "/use_fasm.lua")
|
||||
add_include(tup.getvariantdir())
|
||||
|
||||
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en_US" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
|
||||
tup.rule({"magnify.asm", extra_inputs = {"lang.inc"}}, FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "magnify")
|
6
programs/demos/magnify/trunk/build_en.bat
Normal file
6
programs/demos/magnify/trunk/build_en.bat
Normal file
@@ -0,0 +1,6 @@
|
||||
@erase lang.inc
|
||||
@echo lang fix en_US >lang.inc
|
||||
@fasm magnify.asm magnify
|
||||
@kpack magnify
|
||||
@erase lang.inc
|
||||
@pause
|
6
programs/demos/magnify/trunk/build_ru.bat
Normal file
6
programs/demos/magnify/trunk/build_ru.bat
Normal file
@@ -0,0 +1,6 @@
|
||||
@erase lang.inc
|
||||
@echo lang fix ru_RU >lang.inc
|
||||
@fasm magnify.asm magnify
|
||||
@kpack magnify
|
||||
@erase lang.inc
|
||||
@pause
|
156
programs/demos/magnify/trunk/magnify.asm
Normal file
156
programs/demos/magnify/trunk/magnify.asm
Normal file
@@ -0,0 +1,156 @@
|
||||
;---------------------------------------------------------------------
|
||||
; MAGNIFY SCREEN v1.0
|
||||
;
|
||||
; Version for KolibriOS 2005-2011
|
||||
;
|
||||
; Version for Menuet to 2005
|
||||
;---------------------------------------------------------------------
|
||||
; last update: 08/18/2011
|
||||
; changed by: Marat Zakiyanov aka Mario79, aka Mario
|
||||
; changes: Checking for "rolled up" window
|
||||
;---------------------------------------------------------------------
|
||||
use32
|
||||
org 0x0
|
||||
db 'MENUET01' ; 8 byte id
|
||||
dd 1 ; header version
|
||||
dd START ; program start
|
||||
dd I_END ; program image size
|
||||
dd 0x1000 ; required amount of memory
|
||||
dd 0x1000 ; esp
|
||||
dd 0, 0 ; no parameters, no path
|
||||
;---------------------------------------------------------------------
|
||||
include 'lang.inc' ; Language support for locales: ru_RU (CP866), en_US.
|
||||
include '..\..\..\macros.inc'
|
||||
delay equ 20
|
||||
|
||||
magnify_width = 40
|
||||
magnify_height = 30
|
||||
;---------------------------------------------------------------------
|
||||
START: ; start of execution
|
||||
redraw:
|
||||
call draw_window
|
||||
still:
|
||||
call draw_magnify
|
||||
wtevent:
|
||||
mcall 23,delay ; wait here for event with timeout
|
||||
dec eax
|
||||
js still
|
||||
jz redraw
|
||||
dec eax
|
||||
jnz button
|
||||
; key in buffer
|
||||
mov al, 2
|
||||
mcall
|
||||
jmp wtevent
|
||||
;---------------------------------------------------------------------
|
||||
button:
|
||||
; we have only one button, close
|
||||
or eax, -1
|
||||
mcall
|
||||
;---------------------------------------------------------------------
|
||||
; ******* WINDOW DEFINITIONS AND DRAW ********
|
||||
;---------------------------------------------------------------------
|
||||
draw_window:
|
||||
mcall 12,1
|
||||
|
||||
mov al, 48 ; function 48 : graphics parameters
|
||||
mov bl, 4 ; subfunction 4 : get skin height
|
||||
mcall
|
||||
; DRAW WINDOW
|
||||
mov ebx, 100*65536 + 8*magnify_width + 8
|
||||
lea ecx, [eax + 100*65536 + 8*magnify_height + 3]
|
||||
mov edx, 0x34000000 ; color of work area RRGGBB
|
||||
mov edi, labelt ; header
|
||||
xor eax, eax ; function 0 : define and draw window
|
||||
mcall
|
||||
|
||||
mcall 12,2
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
draw_magnify:
|
||||
mcall 9,procinfo,-1
|
||||
mov eax,[procinfo+70] ;status of window
|
||||
test eax,100b
|
||||
jne .end
|
||||
|
||||
mcall 14 ; get screen size
|
||||
movzx ecx, ax
|
||||
inc ecx
|
||||
mov [size_y], ecx
|
||||
shr eax, 16
|
||||
inc eax
|
||||
mov [size_x], eax
|
||||
|
||||
xor ebx, ebx
|
||||
mcall 37 ; get mouse coordinates
|
||||
mov ecx, eax
|
||||
shr ecx, 16 ; ecx = x
|
||||
movzx edx, ax ; edx = y
|
||||
inc ecx
|
||||
mov [m_xe], ecx
|
||||
inc edx
|
||||
mov [m_ye], edx
|
||||
sub ecx, magnify_width
|
||||
sub edx, magnify_height
|
||||
mov [m_x], ecx
|
||||
mov [m_y], edx
|
||||
.loop_y:
|
||||
.loop_x:
|
||||
xor eax, eax ; assume black color for invalid pixels
|
||||
test ecx, ecx
|
||||
js .nopix
|
||||
cmp ecx, [size_x]
|
||||
jge .nopix
|
||||
test edx, edx
|
||||
js .nopix
|
||||
cmp edx, [size_y]
|
||||
jge .nopix
|
||||
mov ebx, edx
|
||||
imul ebx, [size_x]
|
||||
add ebx, ecx
|
||||
mcall 35 ; read pixel
|
||||
.nopix:
|
||||
push ecx edx
|
||||
sub ecx, [m_x]
|
||||
sub edx, [m_y]
|
||||
mov ebx, ecx
|
||||
shl ebx, 3+16
|
||||
mov bl, 8
|
||||
mov ecx, edx
|
||||
shl ecx, 3+16
|
||||
mov cl, 8
|
||||
mov edx, eax
|
||||
mcall 13
|
||||
pop edx ecx
|
||||
inc ecx
|
||||
cmp ecx, [m_xe]
|
||||
jnz .loop_x
|
||||
mov ecx, [m_x]
|
||||
inc edx
|
||||
cmp edx, [m_ye]
|
||||
jnz .loop_y
|
||||
.end:
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
; DATA AREA
|
||||
;---------------------------------------------------------------------
|
||||
if lang eq ru_RU
|
||||
labelt:
|
||||
db 'Magnifier - <20><>࠭<EFBFBD><E0A0AD><EFBFBD> <20>㯠', 0
|
||||
else ; Default to en_US
|
||||
labelt:
|
||||
db 'Magnifier', 0
|
||||
end if
|
||||
|
||||
I_END:
|
||||
align 4
|
||||
m_x dd ?
|
||||
m_y dd ?
|
||||
m_xe dd ?
|
||||
m_ye dd ?
|
||||
size_x dd ?
|
||||
size_y dd ?
|
||||
;---------------------------------------------------------------------
|
||||
procinfo:
|
||||
rb 1024
|
||||
;---------------------------------------------------------------------
|
@@ -41,6 +41,7 @@ dd 1, start, init_end, end_mem, stack_top, params, 0
|
||||
include 'lang.inc' ; Language support for locales: ru_RU (CP866), es_ES, en_US.
|
||||
include '../../macros.inc'
|
||||
include '../../proc32.inc'
|
||||
include "../../string.inc"
|
||||
include '../../develop/libraries/box_lib/trunk/box_lib.mac'
|
||||
include '../../dll.inc'
|
||||
;include '../../debug.inc'
|
||||
@@ -369,6 +370,12 @@ endl
|
||||
|
||||
mcall 30,4,,1
|
||||
jmp .n
|
||||
@@:
|
||||
stdcall string.length, pathOut
|
||||
add eax, pathOut
|
||||
cmpne [eax - 1], byte '/', @f
|
||||
mov [eax - 1], byte 0
|
||||
dec dword[edtUnpPath.size]
|
||||
@@:
|
||||
mcall 30,4,pathOut,1
|
||||
.n:
|
||||
|
@@ -225,8 +225,10 @@ void draw_window()
|
||||
|
||||
// Main buttons to fill the board
|
||||
#define FILL_BUTTON_SIZE BUTTON_SIZE+8
|
||||
for (i=0;i<6;i++)
|
||||
DefineButton(i%3*FILL_BUTTON_SIZE+17,i/3*FILL_BUTTON_SIZE+15,FILL_BUTTON_SIZE,FILL_BUTTON_SIZE, i+100,FIELD_COLORS[i]);
|
||||
for (i=0;i<6;i++) {
|
||||
DefineButton(i%3*FILL_BUTTON_SIZE+17,calc(i/3)*FILL_BUTTON_SIZE+15,
|
||||
FILL_BUTTON_SIZE,FILL_BUTTON_SIZE, i+100,FIELD_COLORS[i]);
|
||||
}
|
||||
|
||||
// Menu buttons
|
||||
for (i=0;i<3;i++)
|
||||
|
@@ -27,6 +27,8 @@ dword I_Path = 0;
|
||||
#define true 1
|
||||
#define false 0
|
||||
|
||||
inline fastcall dword calc(EAX) { return EAX; }
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user