forked from KolibriOS/kolibrios
CMM libraries: fix list_box scroll down, some small changes for other
git-svn-id: svn://kolibrios.org@5421 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
116c711027
commit
7a9fbb1b26
@ -23,19 +23,6 @@ struct BDVK{
|
|||||||
char name[518];
|
char name[518];
|
||||||
};
|
};
|
||||||
|
|
||||||
inline fastcall void SetCurDir( ECX)
|
|
||||||
{
|
|
||||||
$mov eax,30
|
|
||||||
$mov ebx,1
|
|
||||||
$int 0x40
|
|
||||||
}
|
|
||||||
|
|
||||||
inline fastcall void GetCurDir( ECX, EDX)
|
|
||||||
{
|
|
||||||
$mov eax,30
|
|
||||||
$mov ebx,2
|
|
||||||
$int 0x40
|
|
||||||
}
|
|
||||||
|
|
||||||
///////////////////////////
|
///////////////////////////
|
||||||
// Ïàðàìåòðû ôàéëà //
|
// Ïàðàìåòðû ôàéëà //
|
||||||
@ -227,9 +214,9 @@ enum
|
|||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
:void notify(dword notify_param)
|
:dword notify(dword notify_param)
|
||||||
{
|
{
|
||||||
RunProgram("@notify", notify_param);
|
return RunProgram("@notify", notify_param);
|
||||||
}
|
}
|
||||||
|
|
||||||
:dword abspath(dword relative_path) //GetAbsolutePathFromRelative()
|
:dword abspath(dword relative_path) //GetAbsolutePathFromRelative()
|
||||||
|
@ -240,6 +240,13 @@ inline fastcall void ActivateWindow( ECX)
|
|||||||
$int 0x40
|
$int 0x40
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline fastcall int MinimizeWindow()
|
||||||
|
{
|
||||||
|
EAX = 18;
|
||||||
|
EBX = 10;
|
||||||
|
$int 0x40
|
||||||
|
}
|
||||||
|
|
||||||
inline fastcall int CreateThread( ECX,EDX)
|
inline fastcall int CreateThread( ECX,EDX)
|
||||||
{
|
{
|
||||||
$mov eax,51
|
$mov eax,51
|
||||||
@ -324,6 +331,24 @@ inline fastcall int GetScreenHeight()
|
|||||||
$and eax,0x0000FFFF
|
$and eax,0x0000FFFF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline fastcall int GetClientTop()
|
||||||
|
{
|
||||||
|
$mov eax, 48
|
||||||
|
$mov ebx, 5
|
||||||
|
$int 0x40
|
||||||
|
$mov eax, ebx
|
||||||
|
$shr eax, 16
|
||||||
|
}
|
||||||
|
|
||||||
|
inline fastcall int GetClientHeight()
|
||||||
|
{
|
||||||
|
$mov eax, 48
|
||||||
|
$mov ebx, 5
|
||||||
|
$int 0x40
|
||||||
|
$mov eax, ebx
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
inline fastcall dword LoadLibrary( ECX)
|
inline fastcall dword LoadLibrary( ECX)
|
||||||
{
|
{
|
||||||
$mov eax, 68
|
$mov eax, 68
|
||||||
|
@ -16,22 +16,22 @@ struct llist
|
|||||||
int KeyEnd();
|
int KeyEnd();
|
||||||
void SetSizes(int xx, yy, ww, hh, min_hh, line_hh);
|
void SetSizes(int xx, yy, ww, hh, min_hh, line_hh);
|
||||||
int MouseScroll(dword scroll_state);
|
int MouseScroll(dword scroll_state);
|
||||||
//void debug_values();
|
// void debug_values();
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
|
||||||
void llist::debug_values()
|
// void llist::debug_values()
|
||||||
{
|
// {
|
||||||
debug("current: ");
|
// debug("current: ");
|
||||||
debugi(current);
|
// debugi(current);
|
||||||
debug("first: ");
|
// debug("first: ");
|
||||||
debugi(first);
|
// debugi(first);
|
||||||
debug("visible: ");
|
// debug("visible: ");
|
||||||
debugi(visible);
|
// debugi(visible);
|
||||||
debug("count: ");
|
// debug("count: ");
|
||||||
debugi(count);
|
// debugi(count);
|
||||||
}
|
// }
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
void llist::ClearList()
|
void llist::ClearList()
|
||||||
@ -65,7 +65,8 @@ int llist::MouseScroll(dword scroll_state)
|
|||||||
}
|
}
|
||||||
if (scroll_state == 1)
|
if (scroll_state == 1)
|
||||||
{
|
{
|
||||||
if (visible+first+3 >= count) first = count - visible; else first+=2;
|
if (visible + first == count) return 0;
|
||||||
|
if (visible+first+3 > count) first = count - visible; else first+=2;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -6,7 +6,7 @@ struct libimg_image {
|
|||||||
{
|
{
|
||||||
dword image_pointer;
|
dword image_pointer;
|
||||||
image_pointer = load_image(file_path);
|
image_pointer = load_image(file_path);
|
||||||
if (!image_pointer) notify("Error: Image not loaded");
|
if (!image_pointer) notify("'Error: Image not loaded' -E");
|
||||||
ESDWORD[struct_pointer] = image_pointer;
|
ESDWORD[struct_pointer] = image_pointer;
|
||||||
ESDWORD[struct_pointer+4] = DSWORD[image_pointer+4];
|
ESDWORD[struct_pointer+4] = DSWORD[image_pointer+4];
|
||||||
ESDWORD[struct_pointer+8] = DSWORD[image_pointer+8];
|
ESDWORD[struct_pointer+8] = DSWORD[image_pointer+8];
|
||||||
|
Loading…
Reference in New Issue
Block a user