Subversion Repositories Kolibri OS

Rev

Rev 5631 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5631 Rev 5640
Line 54... Line 54...
54
} mouse_cfg;
54
} mouse_cfg;
Line 55... Line 55...
55
 
55
 
56
 
56
 
57
void main() {
-
 
Line 58... Line 57...
58
	char id, old_button_clicked;
57
void main() {
59
	mouse m;
58
	char id, old_button_clicked;
Line 60... Line 59...
60
 
59
 
Line 61... Line 60...
61
	mem_Init();
60
	mem_Init();
62
	load_dll(boxlib, #box_lib_init,0);
61
	load_dll(boxlib, #box_lib_init,0);
63
 
62
 
64
	LoadCfg();
63
	LoadCfg();
65
 
64
 
66
	SetEventMask(0x27);
65
	SetEventMask(0x27);
67
	loop() switch(WaitEvent())
66
	loop() switch(WaitEvent())
68
	{
67
	{
69
		case evMouse:
68
		case evMouse:
70
				m.get();
69
				mouse.get();
71
				if (m.y <= mouse_frame.start_y) || (m.y >= mouse_frame.start_y + mouse_frame.size_y) 
70
				if (mouse.y <= mouse_frame.start_y) || (mouse.y >= mouse_frame.start_y + mouse_frame.size_y) 
72
				|| (m.x >= mouse_frame.start_x + mouse_frame.size_x) || (m.x <= mouse_frame.start_x) break;
71
				|| (mouse.x >= mouse_frame.start_x + mouse_frame.size_x) || (mouse.x <= mouse_frame.start_x) break;
73
				old_button_clicked = mouse_cfg.button_clicked;
72
				old_button_clicked = mouse_cfg.button_clicked;
74
				if (m.lkm) mouse_cfg.button_clicked=1;
73
				if (mouse.lkm) mouse_cfg.button_clicked=1;
Line 75... Line 74...
75
				else if (m.pkm) mouse_cfg.button_clicked=2;
74
				else if (mouse.pkm) mouse_cfg.button_clicked=2;