Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 5640 → Rev 5639

/programs/cmm/eolite/Eolite.c
142,6 → 142,7
 
proc_info Form;
system_colors sc;
mouse m;
int mouse_dd, scroll_used, sc_slider_h, sorting_arrow_x, kolibrios_drive;
dword buf;
dword file_mas[6898];
151,6 → 152,7
int selected_count;
byte CMD_REFRESH;
 
mouse gestures;
signed x_old, y_old, dif_x, dif_y, adif_x, adif_y;
byte stats;
 
179,6 → 181,7
char IPC_BUF[10];
dword tmp;
rand_n = random(40);
gestures.get();
mem_Init();
load_dll(boxlib, #box_lib_init,0);
load_dll(libini, #lib_init,1);
210,19 → 213,21
break;
}
mouse.get();
m.get();
if (!mouse.mkm) && (stats>0) stats = 0;
if (mouse.mkm) && (stats==0)
gestures.get();
if (!gestures.mkm) && (stats>0) stats = 0;
if (gestures.mkm) && (stats==0)
{
x_old = mouse.x;
y_old = mouse.y;
x_old = gestures.x;
y_old = gestures.y;
stats = 1;
}
if (mouse.mkm) && (stats==1)
if (gestures.mkm) && (stats==1)
{
dif_x = mouse.x-x_old;
dif_y = mouse.y-y_old;
dif_x = gestures.x-x_old;
dif_y = gestures.y-y_old;
adif_x = fabs(dif_x);
adif_y = fabs(dif_y);
252,31 → 257,31
}
}
}
if (files.MouseOver(mouse.x, mouse.y))&&((mouse.up)||(mouse.down)||(mouse.dblclick))
if (files.MouseOver(m.x, m.y))&&((m.up)||(m.down)||(m.dblclick))
{
//select/open file {
if (mouse.key&MOUSE_LEFT)&&((mouse.down)||(mouse.dblclick))
if (m.key&MOUSE_LEFT)&&((m.down)||(m.dblclick))
{
if (mouse.y>=files.y)//&&(mouse.click)
if (m.y>=files.y)//&&(m.click)
{
id = mouse.y - files.y / files.line_h;
id = m.y - files.y / files.line_h;
if (files.current!=id)
{
mouse.clearTime();
m.clearTime();
if (id<files.visible) List_Current(id-files.current);
}
else if(mouse.dblclick)Open(0);
else if(m.dblclick)Open(0);
}
}
// } select/open file
else
//file menu {
if (mouse.key&MOUSE_RIGHT)&&(mouse.up)
if (m.key&MOUSE_RIGHT)&&(m.up)
{
menu_call_mouse = 1;
if (mouse.y>=files.y)//&&(mouse.click)
if (m.y>=files.y)//&&(m.click)
{
id = mouse.y - files.y / files.line_h;
id = m.y - files.y / files.line_h;
if (files.current!=id) List_Current(id-files.current);
//SwitchToAnotherThread();
menu_stak = malloc(4096);
287,48 → 292,48
// } file menu
}
 
if (mouse.vert)
if (m.vert)
{
if (files.MouseScroll(mouse.vert)) List_ReDraw();
if (files.MouseScroll(m.vert)) List_ReDraw();
break;
}
 
if (mouse.x>=Form.width-26) && (mouse.x<=Form.width-6) && (mouse.y>40) && (mouse.y<files.y)
if (m.x>=Form.width-26) && (m.x<=Form.width-6) && (m.y>40) && (m.y<files.y)
{
if (mouse.lkm==1) DrawRectangle3D(Form.cwidth - 17,41,14,14,0xC7C7C7,0xFFFFFF);
WHILE (mouse.lkm==1) && (files.first>0)
if (m.lkm==1) DrawRectangle3D(Form.cwidth - 17,41,14,14,0xC7C7C7,0xFFFFFF);
WHILE (m.lkm==1) && (files.first>0)
{
pause(8);
files.first--;
List_ReDraw();
mouse.get();
m.get();
}
DrawRectangle3D(Form.cwidth - 17,41,14,14,0xFFFFFF,0xC7C7C7);
}
 
if (mouse.x>=Form.width-26) && (mouse.x<=Form.width-6) && (mouse.y>onTop(22,0)+1) && (mouse.y<onTop(22,0)+16)
if (m.x>=Form.width-26) && (m.x<=Form.width-6) && (m.y>onTop(22,0)+1) && (m.y<onTop(22,0)+16)
{
if (mouse.lkm==1) DrawRectangle3D(Form.cwidth - 17,onTop(21,0),14,14,0xC7C7C7,0xFFFFFF);
while (mouse.lkm==1) && (files.first<files.count-files.visible)
if (m.lkm==1) DrawRectangle3D(Form.cwidth - 17,onTop(21,0),14,14,0xC7C7C7,0xFFFFFF);
while (m.lkm==1) && (files.first<files.count-files.visible)
{
pause(8);
files.first++;
List_ReDraw();
mouse.get();
m.get();
}
DrawRectangle3D(Form.cwidth - 17,onTop(21,0),14,14,0xFFFFFF,0xC7C7C7);
}
 
//Scrooll
if (!mouse.lkm) && (scroll_used) { scroll_used=NULL; Scroll(); }
if (mouse.x>=Form.width-26) && (mouse.x<=Form.width-6) && (mouse.y>56) && (mouse.y<Form.height) && (mouse.lkm) && (!scroll_used) {scroll_used=1;Scroll();}
if (!m.lkm) && (scroll_used) { scroll_used=NULL; Scroll(); }
if (m.x>=Form.width-26) && (m.x<=Form.width-6) && (m.y>56) && (m.y<Form.height) && (m.lkm) && (!scroll_used) {scroll_used=1;Scroll();}
if (scroll_used)
{
if (sc_slider_h/2+files.y>mouse.y) || (mouse.y<0) || (mouse.y>4000) mouse.y=sc_slider_h/2+files.y; //anee eo?ni? iaa ieiii
if (sc_slider_h/2+files.y>m.y) || (m.y<0) || (m.y>4000) m.y=sc_slider_h/2+files.y; //anee eo?ni? iaa ieiii
id=files.first;
j= sc_slider_h/2;
files.first = mouse.y -j -files.y * files.count;
files.first = m.y -j -files.y * files.count;
files.first /= onTop(22,files.y);
if (files.visible+files.first>files.count) files.first=files.count-files.visible;
if (id!=files.first) List_ReDraw();
/programs/cmm/eolite/include/menu.h
50,6 → 50,7
 
void FileMenu()
{
mouse mm;
word key;
proc_info MenuForm;
int index;
71,10 → 72,10
loop() switch(WaitEvent())
{
case evMouse:
mouse.get();
mm.get();
if (!CheckActiveProcess(MenuForm.ID)){ cmd_free=1; ExitProcess();}
else if (mouse.move)&&(menu.ProcessMouse(mouse.x, mouse.y)) MenuListRedraw();
else if (mouse.key&MOUSE_LEFT)&&(mouse.up) {action_buf = cur_action_buf; cmd_free=1; ExitProcess(); }
else if (mm.move)&&(menu.ProcessMouse(mm.x, mm.y)) MenuListRedraw();
else if (mm.key&MOUSE_LEFT)&&(mm.up) {action_buf = cur_action_buf; cmd_free=1; ExitProcess(); }
break;
case evKey:
85,7 → 86,7
break;
case evReDraw: _MENU_DRAW:
if (menu_call_mouse) DefineAndDrawWindow(mouse.x+Form.left+5, mouse.y+Form.top+GetSkinHeight(),menu.w+3,menu.h+6,0x01, 0, 0, 0x01fffFFF);
if (menu_call_mouse) DefineAndDrawWindow(m.x+Form.left+5, m.y+Form.top+GetSkinHeight(),menu.w+3,menu.h+6,0x01, 0, 0, 0x01fffFFF);
else DefineAndDrawWindow(Form.left+files.x+15, files.line_h*files.current+files.y+Form.top+30,menu.w+3,menu.h+6,0x01, 0, 0, 0x01fffFFF);
GetProcessInfo(#MenuForm, SelfInfo);
DrawRectangle(0,0,menu.w+1,menu.h+2,sc.work_graph);
/programs/cmm/browser/WebView.c
56,7 → 56,7
int redirected = 0;
 
char stak[4096];
 
mouse m;
int action_buf;
 
dword http_transfer = 0;
149,13 → 149,13
if (!CheckActiveProcess(Form.ID)) break;
//Edit URL
edit_box_mouse stdcall (#address_box);
mouse.get();
m.get();
//Links hover
if (mouse.y>WB1.list.y) PageLinks.Hover(mouse.x, mouse.y, link_color_inactive, link_color_active, bg_color);
if (m.y>WB1.list.y) PageLinks.Hover(m.x, m.y, link_color_inactive, link_color_active, bg_color);
//Menu
if (mouse.y>WB1.list.y) && (mouse.y<Form.height) && (bufsize)
if (m.y>WB1.list.y) && (m.y<Form.height) && (bufsize)
{
if (mouse.pkm) && (mouse.up)
if (m.pkm) && (m.up)
{
SwitchToAnotherThread();
CreateThread(#menu_rmb,#stak+4092);
163,26 → 163,26
}
}
//Mouse scroll
if (mouse.vert)
if (m.vert)
{
if (WB1.list.MouseScroll(mouse.vert)) WB1.Parse();
if (WB1.list.MouseScroll(m.vert)) WB1.Parse();
}
//Drag scroller
scroll_wv.all_redraw = 0;
if (!mouse.lkm) scroll_used=0;
if (mouse.x>=scroll_wv.start_x) && (mouse.x<=scroll_wv.start_x+scroll_wv.size_x)
&& (mouse.y>=scroll_wv.start_y+scroll_wv.btn_height) && (-scroll_wv.btn_height+scroll_wv.start_y+scroll_wv.size_y>mouse.y)
&& (WB1.list.count>WB1.list.visible) && (mouse.lkm)
if (!m.lkm) scroll_used=0;
if (m.x>=scroll_wv.start_x) && (m.x<=scroll_wv.start_x+scroll_wv.size_x)
&& (m.y>=scroll_wv.start_y+scroll_wv.btn_height) && (-scroll_wv.btn_height+scroll_wv.start_y+scroll_wv.size_y>m.y)
&& (WB1.list.count>WB1.list.visible) && (m.lkm)
{
scroll_used=1;
}
if (scroll_used)
{
mouse.y = mouse.y / WB1.DrawBuf.zoomf + 5;
m.y = m.y / WB1.DrawBuf.zoomf + 5;
half_scroll_size = WB1.list.h - 16 * WB1.list.visible / WB1.list.count - 3 /2;
if (half_scroll_size+WB1.list.y>mouse.y) || (mouse.y<0) || (mouse.y>4000) mouse.y=half_scroll_size+WB1.list.y;
if (half_scroll_size+WB1.list.y>m.y) || (m.y<0) || (m.y>4000) m.y=half_scroll_size+WB1.list.y;
btn=WB1.list.first;
WB1.list.first = mouse.y -half_scroll_size -WB1.list.y * WB1.list.count / WB1.list.h;
WB1.list.first = m.y -half_scroll_size -WB1.list.y * WB1.list.count / WB1.list.h;
if (WB1.list.visible+WB1.list.first>WB1.list.count) WB1.list.first=WB1.list.count-WB1.list.visible;
if (btn!=WB1.list.first) WB1.Parse();
}
473,8 → 473,8
return;
case 312:
SwitchToAnotherThread();
mouse.y = TOOLBAR_H-6;
mouse.x = Form.cwidth - 167;
m.y = TOOLBAR_H-6;
m.x = Form.cwidth - 167;
CreateThread(#menu_rmb,#stak+4092);
return;
case 122:
/programs/cmm/browser/menu_rmb.h
26,6 → 26,7
 
void menu_rmb()
{
mouse mm;
proc_info MenuForm;
int key;
 
41,9 → 42,9
GetProcessInfo(#MenuForm, SelfInfo);
if (!CheckActiveProcess(MenuForm.ID)) ExitProcess();
 
mouse.get();
if (menu.ProcessMouse(mouse.x, mouse.y)) DrawMenuList();
if (mouse.lkm)&&(mouse.up) { action_buf = ITEMS_LIST[menu.current*2+1]; ExitProcess(); }
mm.get();
if (menu.ProcessMouse(mm.x, mm.y)) DrawMenuList();
if (mm.lkm)&&(mm.up) { action_buf = ITEMS_LIST[menu.current*2+1]; ExitProcess(); }
break;
case evKey:
58,7 → 59,7
break;
case evReDraw:
DefineAndDrawWindow(Form.left+mouse.x-6,Form.top+mouse.y+GetSkinHeight()+3,menu.w+2,menu.h+4,0x01, 0, 0, 0x01fffFFF);
DefineAndDrawWindow(Form.left+m.x-6,Form.top+m.y+GetSkinHeight()+3,menu.w+2,menu.h+4,0x01, 0, 0, 0x01fffFFF);
DrawPopup(0,0,menu.w,menu.h+3,0, col_bg,border_color);
DrawMenuList();
}
/programs/cmm/browser/downloader.h
38,7 → 38,7
void Downloader()
{
int key, btn;
mouse m;
char notify_message[4296];
if (DL_URL[0]) {
/programs/cmm/lib/io.h
File deleted
\ No newline at end of file
/programs/cmm/lib/date.h
File deleted
\ No newline at end of file
/programs/cmm/lib/math.h
File deleted
\ No newline at end of file
/programs/cmm/lib/file_system.h
1,8 → 1,11
#ifndef INCLUDE_FILESYSTEM_H
#define INCLUDE_FILESYSTEM_H
#ifndef INCLUDE_KOLIBRI_H
#include "../lib/kolibri.h"
#endif
 
#ifndef INCLUDE_DATE_H
#include "../lib/date.h"
#ifndef INCLUDE_STRING_H
#include "../lib/strings.h"
#endif
 
:struct f70{
15,6 → 18,13
dword name;
};
 
:struct date
{
byte day;
byte month;
word year;
};
 
:struct BDVK {
dword readonly:1, hidden:1, system:1, volume_label:1, isfolder:1, notarchived:1, :0;
byte type_name;
31,9 → 41,30
};
 
 
:void DrawDate(dword x, y, color, in_date)
{
//char text[15];
EDI = in_date;
EAX = 47;
EBX = 2<<16;
EDX = x<<16+y;
ESI = 0x80<<24+color;
ECX = EDI.date.day;
$int 0x40;
EDX += 18<<16;
ECX = EDI.date.month;
$int 0x40;
EDX += 18<<16;
EBX = 4<<16;
ECX = EDI.date.year;
$int 0x40;
PutPixel(x+14,y+6,color);
PutPixel(x+32,y+6,color);
//sprintf(#text,"%d",EDI.date.year);
//WriteText(x, y, 0x80, 0x000000, #text);
}
 
 
 
///////////////////////////
// Ïàðàìåòðû ôàéëà //
///////////////////////////
52,9 → 83,9
$int 0x40
}
 
/////////////////////////////////////
///////////////////////////
// Èçìåíåíèå ïàðàìåòðîâ ôàéëà //
/////////////////////////////////////
///////////////////////////
:f70 setinfo_file_70;
:dword SetFileInfo(dword file_path, bdvk_struct)
{
142,9 → 173,9
$int 0x40
}
 
///////////////////////////
////////////////////////////
// Çàïèñàòü ôàéë //
///////////////////////////
////////////////////////////
:f70 write_file_70;
:int WriteFile(dword write_file_size, write_buffer, write_file_path)
{
160,9 → 191,9
$int 0x40
}
 
////////////////////////////////////////
//////////////////////////////////////////
// WriteInFileThatAlredyExists //
////////////////////////////////////////
//////////////////////////////////////////
:f70 write_file_offset_70;
:int WriteFileWithOffset(dword write_data_size, write_buffer, write_file_path, offset)
{
/programs/cmm/lib/kolibri.h
36,7 → 36,7
#define BT_HIDE 0x40000000
#define BT_NOFRAME 0x20000000
 
//Button MOUSE
//Button mouse
#define MOUSE_LEFT 001b
#define MOUSE_RIGHT 010b
#define MOUSE_LR 011b
79,24 → 79,24
};
 
/**
* The structure of the MOUSE
* The structure of the mouse
* x - coordinate X
* y - coordinate Y
* xx and yy - time coordinates
* lkm - left MOUSE button
* pkm - right MOUSE button
* mkm - MOUSE wheel
* lkm - left mouse button
* pkm - right mouse button
* mkm - mouse wheel
* key - keycode button
* tmp - time keycode
* down - key event press
* up - key release events
* move - event MOUSE movements
* move - event mouse movements
* click - when clicked
* dblclick - double-click the default 50 (500 ms)
*/
 
:dword __TMP_TIME,MOUSE_TIME;
:struct MOUSE
:struct mouse
{
signed x,y,xx,yy,lkm,mkm,pkm,key,tmp,tmp_time,hor,vert,down,up,move,click,dblclick,left,top;
dword handle,_;
108,12 → 108,12
dword hide();
void slider();
void show();
} mouse;
:void MOUSE::clearTime()
};
:void mouse::clearTime()
{
tmp_time = GetStartTime()+MOUSE_TIME;
}
:void MOUSE::show()
:void mouse::show()
{
if(!handle)return;
ECX = handle;
121,7 → 121,7
EBX = 5;
$int 0x40;
}
:dword MOUSE::hide()
:dword mouse::hide()
{
if(!_)
{
144,8 → 144,8
handle = EAX;
}
 
//set new attributes MOUSE
:void MOUSE::set()
//set new attributes mouse
:void mouse::set()
{
if((xx!=x)||(yy!=y))
{
167,7 → 167,7
}
}
 
:void MOUSE::center()
:void mouse::center()
{
EAX = 18;
EBX = 15;
174,8 → 174,8
$int 0x40
}
 
//get new attributes MOUSE
:void MOUSE::get()
//get new attributes mouse
:void mouse::get()
{
EAX = 37;
EBX = 1;
202,7 → 202,7
pkm = EBX;
mkm = ECX;
//when you release the MOUSE button
//when you release the mouse button
// Mouse Up Event
if((cmd)&&!(key)){
up = true;
222,7 → 222,7
cmd = false;
}
//when you press the MOUSE button
//when you press the mouse button
// Mouse Down Event/Move Event
else {
up = false;
253,7 → 253,7
 
 
 
:void MOUSE::slider()
:void mouse::slider()
{
signed _x,_y;
if(!handle)hide();
881,29 → 881,6
dword width,height;
} SKIN;
 
:void DrawDate(dword x, y, color, in_date)
{
//char text[15];
EDI = in_date;
EAX = 47;
EBX = 2<<16;
EDX = x<<16+y;
ESI = 0x80<<24+color;
ECX = EDI.date.day;
$int 0x40;
EDX += 18<<16;
ECX = EDI.date.month;
$int 0x40;
EDX += 18<<16;
EBX = 4<<16;
ECX = EDI.date.year;
$int 0x40;
PutPixel(x+14,y+6,color);
PutPixel(x+32,y+6,color);
//sprintf(#text,"%d",EDI.date.year);
//WriteText(x, y, 0x80, 0x000000, #text);
}
 
dword __generator; // random number generator - äëÿ ãåíåðàöèè ñëó÷àéíûõ ÷èñåë
 
:dword program_path_length;
/programs/cmm/lib/strings.h
1,6 → 1,10
#ifndef INCLUDE_STRING_H
#define INCLUDE_STRING_H
 
#ifndef INCLUDE_KOLIBRI_H
#include "../lib/kolibri.h"
#endif
 
#ifndef INCLUDE_MEM_H
#include "../lib/mem.h"
#endif
/programs/cmm/mouse_cfg/mouse_cfg.c
56,6 → 56,7
 
void main() {
char id, old_button_clicked;
mouse m;
 
mem_Init();
load_dll(boxlib, #box_lib_init,0);
66,13 → 67,13
loop() switch(WaitEvent())
{
case evMouse:
mouse.get();
if (mouse.y <= mouse_frame.start_y) || (mouse.y >= mouse_frame.start_y + mouse_frame.size_y)
|| (mouse.x >= mouse_frame.start_x + mouse_frame.size_x) || (mouse.x <= mouse_frame.start_x) break;
m.get();
if (m.y <= mouse_frame.start_y) || (m.y >= mouse_frame.start_y + mouse_frame.size_y)
|| (m.x >= mouse_frame.start_x + mouse_frame.size_x) || (m.x <= mouse_frame.start_x) break;
old_button_clicked = mouse_cfg.button_clicked;
if (mouse.lkm) mouse_cfg.button_clicked=1;
else if (mouse.pkm) mouse_cfg.button_clicked=2;
else if (mouse.mkm) mouse_cfg.button_clicked=3;
if (m.lkm) mouse_cfg.button_clicked=1;
else if (m.pkm) mouse_cfg.button_clicked=2;
else if (m.mkm) mouse_cfg.button_clicked=3;
else mouse_cfg.button_clicked=0;
if (mouse_cfg.button_clicked != old_button_clicked) DrawMouseImage();
break;
/programs/cmm/pixie/pixie.c
73,10 → 73,8
 
void main()
{
int id, key;
byte mouse_clicked;
dword tmp_x,tmp_y;
dword z1,z2;
int id, key, mouse_clicked;
mouse m, drag_mouse;
mem_Init();
SetEventMask(0x27);
114,62 → 112,47
 
loop()
{
WaitEventTimeout(10);
//ActivateWindow(Form.ID);
WaitEventTimeout(60);
switch(EAX & 0xFF) {
case evMouse:
if (!CheckActiveProcess(Form.ID)) break;
mouse.get();
scrollbar_v_mouse (#scroll1);
if (list.first != scroll1.position)
if (list.first <> scroll1.position)
{
list.first = scroll1.position;
DrawPlayList();
break;
}
if(mouse.down)
m.get();
 
if (m.vert) if (list.MouseScroll(m.vert))
{
if (mouse.vert) if (list.MouseScroll(mouse.vert))
{
DrawPlayList();
}
if (list.MouseOver(mouse.x, mouse.y)) mouse_clicked = true;
else if(mouse.y < skin.h) && (mouse.x < 13)
 
if (mouse_clicked)
{
if (!m.lkm) && (list.ProcessMouse(m.x, m.y)) StartPlayingMp3();
mouse_clicked=0;
}
if (m.lkm) && (list.MouseOver(m.x, m.y)) mouse_clicked=1;
//drag window - emulate windows header
tmp_x = mouse.x;
tmp_y = mouse.y;
if (window_mode == WINDOW_MODE_SMALL) && (m.lkm) && (m.y < skin.h) && (m.x < 13)
{
do {
mouse.get();
if (tmp_x!=mouse.x) || (tmp_y!=mouse.y)
drag_mouse.get();
if (drag_mouse.x!=m.x) || (drag_mouse.y!=m.y)
{
z1 = Form.left + mouse.x - tmp_x;
z2 = Form.top + mouse.y - tmp_y;
if(z1<=10)z1=0;
if(z2<=10)z2=0;
if(z1>screen.width-Form.width-10)z1=screen.width-Form.width;
if(z2>screen.height-Form.height-10)z2=screen.height-Form.height;
//if(z2<10)z2=0;
MoveSize(z1 , z2, OLD, OLD);
MoveSize(Form.left + drag_mouse.x - m.x, Form.top + drag_mouse.y - m.y, OLD, OLD);
DrawWindow();
}
pause(1);
} while (mouse.lkm);
if (mouse.pkm) && (mouse.y > skin.h)
pause(2);
} while (drag_mouse.lkm);
}
if (m.pkm) && (m.y > skin.h)
notify("'Pixies Player v1.11\nChange sound volume: Left/Right key\nChange skin: F1/F2\nMute: M key' -St\n");
break;
}
else if(mouse.up)
{
if (mouse_clicked)&&(list.ProcessMouse(mouse.x, mouse.y))
{
StartPlayingMp3();
mouse_clicked = false;
}
break;
}
}
 
case evButton:
id=GetButtonID();
switch(id) {
234,7 → 217,7
if (key==51) SetColorThemeDark();
if (key==ASCII_KEY_LEFT) RunProgram("@VOLUME", "-");
if (key==ASCII_KEY_RIGHT) RunProgram("@VOLUME", "+");
if (key=='mouse') RunProgram("@VOLUME", "mouse");
if (key=='m') RunProgram("@VOLUME", "m");
if (key==ASCII_KEY_ENTER) StartPlayingMp3();
if (key=='p') || (key==ASCII_KEY_SPACE)
{
245,8 → 228,8
break;
 
case evReDraw:
if (window_mode == WINDOW_MODE_NORMAL) DefineAndDrawWindow(win_x_normal, win_y_normal, skin.w - 1, skin.h + list.h, 0x41,0,0,0);
if (window_mode == WINDOW_MODE_SMALL) DefineAndDrawWindow(win_x_small, win_y_small, 99, skin.h - 1, 0x41,0,0,0);
if (window_mode == WINDOW_MODE_NORMAL) DefineAndDrawWindow(win_x_normal, win_y_normal, skin.w - 1, skin.h + list.h, 0x01,0,0,0);
if (window_mode == WINDOW_MODE_SMALL) DefineAndDrawWindow(win_x_small, win_y_small, 99, skin.h - 1, 0x01,0,0,0);
DrawWindow();
break;
 
/programs/cmm/Calypte/Calypte.c
112,6 → 112,7
void main()
{
int id, key;
mouse m;
strcpy(#filter2.ext1, "TXT");
//strcpy(#filter2.ext2, "ASM");
138,8 → 139,8
switch(WaitEvent())
{
case evMouse:
mouse.get();
if (tview.MouseScrollNoSelection(mouse.vert)) DrawText();
m.get();
if (tview.MouseScrollNoSelection(m.vert)) DrawText();
menu_bar_mouse stdcall (#menudata1);
if (menudata1.click)
/programs/cmm/appearance/appearance.c
163,6 → 163,7
void main()
{
int id, key, mouse_clicked;
mouse mm;
 
mem_Init();
SetEventMask(0x27);
186,21 → 187,21
break;
}
mouse.get();
mm.get();
 
if (mouse.vert)
if (mm.vert)
{
if (list[SKINS].active) && (list[SKINS].MouseScroll(mouse.vert)) Draw_List();
if (list[WALLPAPERS].active) && (list[WALLPAPERS].MouseScroll(mouse.vert)) Draw_List();
if (list[SKINS].active) && (list[SKINS].MouseScroll(mm.vert)) Draw_List();
if (list[WALLPAPERS].active) && (list[WALLPAPERS].MouseScroll(mm.vert)) Draw_List();
}
 
if (mouse_clicked)
{
if (!mouse.lkm) && (list[SKINS].active) && (list[SKINS].ProcessMouse(mouse.x, mouse.y)) Apply();
if (!mouse.lkm) && (list[WALLPAPERS].active) && (list[WALLPAPERS].ProcessMouse(mouse.x, mouse.y)) Apply();
if (!mm.lkm) && (list[SKINS].active) && (list[SKINS].ProcessMouse(mm.x, mm.y)) Apply();
if (!mm.lkm) && (list[WALLPAPERS].active) && (list[WALLPAPERS].ProcessMouse(mm.x, mm.y)) Apply();
mouse_clicked=0;
}
if (mouse.lkm) && (list[SKINS].MouseOver(mouse.x, mouse.y)) mouse_clicked=1;
if (mm.lkm) && (list[SKINS].MouseOver(mm.x, mm.y)) mouse_clicked=1;
break;
 
 
/programs/cmm/downloader/Downloader.c
44,7 → 44,7
void main()
{
int key, btn;
 
mouse m;
char filepath[4096];
char notify_message[4296];
/programs/cmm/liza/mail_box.c
141,6 → 141,7
 
void MailBoxLoop() {
int key, id;
mouse m;
int panels_drag=0, clicked_list=0;
dword line_col, text_col;
 
159,20 → 160,20
{
case evMouse:
IF (!CheckActiveProcess(Form.ID)) break;
mouse.get();
m.get();
if (!mouse.lkm) panels_drag=0;
if (mouse.lkm) && (mouse.y>mail_list.y+mail_list.h-1) && (mouse.y<mail_list.y+mail_list.h+6)
if (!m.lkm) panels_drag=0;
if (m.lkm) && (m.y>mail_list.y+mail_list.h-1) && (m.y<mail_list.y+mail_list.h+6)
&& (!scroll1.delta2) && (!scroll_wv.delta2) panels_drag = 1;
if (panels_drag)
{
if (mouse.y<mail_list.y+mail_list.min_h) || (mouse.y>Form.cheight-WB1.list.min_h-status_bar_h-LIST_INFO_H) break;
mail_list.h = mouse.y - mail_list.y-2;
if (m.y<mail_list.y+mail_list.min_h) || (m.y>Form.cheight-WB1.list.min_h-status_bar_h-LIST_INFO_H) break;
mail_list.h = m.y - mail_list.y-2;
DrawMailBox();
break;
}
 
PageLinks.Hover(mouse.x, mouse.y, link_color_inactive, link_color_active, bg_color);
PageLinks.Hover(m.x, m.y, link_color_inactive, link_color_active, bg_color);
 
if (!mail_list.count) break;
if (!panels_drag) { scrollbar_v_mouse (#scroll1); scrollbar_v_mouse (#scroll_wv); }
190,16 → 191,16
break;
};
if (mail_list.y+mail_list.h + 10 > mouse.y)
if (mail_list.y+mail_list.h + 10 > m.y)
{
if (mail_list.MouseScroll(mouse.vert)) DrawMailList();
if (mail_list.MouseScroll(m.vert)) DrawMailList();
}
else
{
if (WB1.list.MouseScroll(mouse.vert)) DrawLetter();
if (WB1.list.MouseScroll(m.vert)) DrawLetter();
}
if (mouse.lkm) && (mail_list.MouseOver(mouse.x, mouse.y)) && (!clicked_list) clicked_list=1;
if (!mouse.lkm) && (clicked_list) if (mail_list.ProcessMouse(mouse.x, mouse.y))
if (m.lkm) && (mail_list.MouseOver(m.x, m.y)) && (!clicked_list) clicked_list=1;
if (!m.lkm) && (clicked_list) if (mail_list.ProcessMouse(m.x, m.y))
{
clicked_list = 0;
if (aim) break;
/programs/cmm/software_widget/software_widget.c
18,6 → 18,7
 
system_colors sc;
proc_info Form;
mouse m;
 
byte kolibrios_mounted;
 
/programs/cmm/example/example.c
1,13 → 1,10
#define MEMSIZE 0x3E80
#include "..\lib\strings.h"
 
#include "../lib/io.h"
#include "../lib/draw.h"
 
void main()
{
int id, key;
mem_Init();
io.set("/sys/RUN",ATR_HIDDEN);
loop()
{
switch(WaitEvent())
30,17 → 27,16
}
}
}
 
 
void draw_window()
{
proc_info Form;
dword pos;
//float zz=0.944,ret;
DefineAndDrawWindow(215,100,250,200,0x34,0xFFFFFF,"Window header");
//draw.gradient(pos,10,10,0x0,20,20,0x0);
GetProcessInfo(#Form, SelfInfo);
draw.circle(60,60,5);
 
WriteText(50,80,0x80,0,"Press Enter");
WriteText(10,110,0x80,0,#param);
}
 
 
stop:
/programs/cmm/end/end.c
80,7 → 80,7
goto _DRAW;
loop()
{
WaitEventTimeout(7);
WaitEventTimeout(330);
switch(EAX & 0xFF)
{
case evButton:
106,10 → 106,14
sc.get();
DefineAndDrawWindow(0,0,WIN_SIZE_X, WIN_SIZE_Y, 0x01, 0, 0, 0x01fffFFF);
//_PutImage(0,0,WIN_SIZE_X,WIN_SIZE_Y,shadow_buf);
if(!i){
_PutImage(0,0,WIN_SIZE_X, PANEL_Y,s1);
_PutImage(0,PANEL_Y,sides_w, PANEL_SIZE_Y+1,s2);
_PutImage(sides_w+PANEL_SIZE_X+1,PANEL_Y,sides_w-1, PANEL_SIZE_Y+1,s3);
_PutImage(0,PANEL_Y+PANEL_SIZE_Y+1,WIN_SIZE_X, PANEL_Y-1,s4);
//i = 1;
}
draw_main_area(PANEL_X, PANEL_Y, PANEL_SIZE_X, PANEL_SIZE_Y);
break;
default: _DRAW: