Subversion Repositories Kolibri OS

Rev

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

Rev 127 Rev 131
Line 8... Line 8...
8
 
8
 
9
======================================================================
9
======================================================================
10
============== Function 0 - define and draw the window. ==============
10
============== Function 0 - define and draw the window. ==============
11
======================================================================
11
======================================================================
12
Defines an application window. Draws a frame of the window, header and
12
Defines an application window. Draws a frame of the window, header and
13
working area. For windows with skin defines standard buttons for close
13
working area. For skinned windows defines standard buttons for close
14
and minimize.
14
and minimize.
15
Parameters:
15
Parameters:
16
  * eax = 0 - function number
16
  * eax = 0 - function number
17
  * ebx = [coordinate on axis x]*65536 + [size on axis x]
17
  * ebx = [coordinate on axis x]*65536 + [size on axis x]
18
  * ecx = [coordinate on axis y]*65536 + [size on axis y]
18
  * ecx = [coordinate on axis y]*65536 + [size on axis y]
19
  * edx = 0xXYRRGGBB, where:
19
  * edx = 0xXYRRGGBB, where:
20
    * Y = style of the window:
20
    * Y = style of the window:
21
      * Y=0 - type I - window of the fixed size
21
      * Y=0 - type I - fixed-size window
22
      * Y=1 - only define window area, draw nothing
22
      * Y=1 - only define window area, draw nothing
23
      * Y=2 - type II - window of the variable size
23
      * Y=2 - type II - variable-size window
24
      * Y=3 - window with skin
24
      * Y=3 - skinned window
25
      * other possible values (from 4 up to 15) are reserved,
25
      * other possible values (from 4 up to 15) are reserved,
26
        function call with such Y is ignored
26
        function call with such Y is ignored
27
    * RR, GG, BB = accordingly red, green, blue components of a color
27
    * RR, GG, BB = accordingly red, green, blue components of a color
28
      of the working area of the window (are ignored for style Y=2)
28
      of the working area of the window (are ignored for style Y=2)
Line 59... Line 59...
59
    changed by user. Current position and sizes can be obtained
59
    changed by user. Current position and sizes can be obtained
60
    by function 9.
60
    by function 9.
61
  * The window must fit on the screen. If the transferred
61
  * The window must fit on the screen. If the transferred
62
    coordinates and sizes do not satisfy to this condition,
62
    coordinates and sizes do not satisfy to this condition,
63
    appropriate coordinate (or, probably, both) is considered as zero,
63
    appropriate coordinate (or, probably, both) is considered as zero,
64
    and if also it does not help, the appropriate size
64
    and if it does not help too, the appropriate size
65
    (or, probably, both) is installed in a size of the screen.
65
    (or, probably, both) is installed in a size of the screen.
Line 66... Line 66...
66
    
66
    
67
    Further we shall designate xpos,ypos,xsize,ysize - values
67
    Further let us designate xpos,ypos,xsize,ysize - values passed
68
    transmitted in ebx,ecx. The coordinates are resulted concerning
68
    in ebx,ecx. The coordinates are resulted concerning
69
    the left upper corner of the window, which, thus, is set as (0,0),
69
    the left upper corner of the window, which, thus, is set as (0,0),
70
    coordinates of the right lower corner essence (xsize,ysize).
70
    coordinates of the right lower corner essence (xsize,ysize).
71
  * The sizes of the window are understood in sence of coordinates
71
  * The sizes of the window are understood in sence of coordinates
72
    of the right lower corner. This concerns all other functions too.
72
    of the right lower corner. This concerns all other functions too.
Line 287... Line 287...
287
  * edx = 0x80nnnnnn, where nnnnnn - identifier of the button
287
  * edx = 0x80nnnnnn, where nnnnnn - identifier of the button
288
Returned value:
288
Returned value:
289
  * function does not return value
289
  * function does not return value
290
Remarks:
290
Remarks:
291
  * Sizes of the button must be more than 0 and less than 0x8000.
291
  * Sizes of the button must be more than 0 and less than 0x8000.
292
  * For windows with skin definition of the window
292
  * For skinned windows definition of the window
293
    (call of 0th function) creates two standard buttons -
293
    (call of 0th function) creates two standard buttons -
294
    for close of the window with identifier 1 and
294
    for close of the window with identifier 1 and
295
    for minimize of the window with identifier 0xffff.
295
    for minimize of the window with identifier 0xffff.
296
  * The creation of two buttons with same identifiers is admitted.
296
  * The creation of two buttons with same identifiers is admitted.
297
  * The button with the identifier 0xffff at pressing is interpreted
297
  * The button with the identifier 0xffff at pressing is interpreted
Line 924... Line 924...
924
    1), it is possible to terminate any normal process/thread.
924
    1), it is possible to terminate any normal process/thread.
925
  * See also subfunction 2 - terminate
925
  * See also subfunction 2 - terminate
926
    process/thread by given slot.
926
    process/thread by given slot.
Line 927... Line 927...
927
 
927
 
928
======================================================================
928
======================================================================
929
====================== Function 18, subfunction 19 =====================
-
 
930
======================= Get/set mouse features. ======================
929
======== Function 18, subfunction 19 - get/set mouse features. =======
-
 
930
======================================================================
-
 
931
 
931
======================================================================
932
---------------- Subsubfunction 0 - get mouse speed. -----------------
932
Parameters:
933
Parameters:
933
  * eax = 18 - function number
934
  * eax = 18 - function number
934
  * ebx = 19 - subfunction number
935
  * ebx = 19 - subfunction number
935
  * ecx = subsubfunction number
-
 
936
 
-
 
937
    ecx = 0 - get mouse speed
936
  * ecx = 0 - subsubfunction number
938
    Returned value:
937
Returned value:
Line -... Line 938...
-
 
938
  * eax = current mouse speed
-
 
939
 
-
 
940
---------------- Subsubfunction 1 - set mouse speed. -----------------
-
 
941
Parameters:
939
    * eax = current mouse speed
942
  * eax = 18 - function number
940
 
943
  * ebx = 19 - subfunction number
941
    ecx = 1 - set mouse speed
944
  * ecx = 1 - subsubfunction number
942
    edx = selected value of speed 
945
  * edx = new value for speed
Line -... Line 946...
-
 
946
Returned value:
-
 
947
  * function does not return value
-
 
948
 
-
 
949
---------------- Subsubfunction 2 - get mouse delay. -----------------
943
    Returned value:
950
Parameters:
944
    * function does not return value
951
  * eax = 18 - function number
945
 
952
  * ebx = 19 - subfunction number
Line -... Line 953...
-
 
953
  * ecx = 2 - subsubfunction number
-
 
954
Returned value:
-
 
955
  * eax = current mouse delay
-
 
956
 
946
    ecx = 2 - get mouse delay
957
---------------- Subsubfunction 3 - set mouse delay. -----------------
947
    Returned value:
958
Parameters:
948
    * eax = current mouse delay
959
  * eax = 18 - function number
949
 
960
  * ebx = 19 - subfunction number
Line -... Line 961...
-
 
961
  * ecx = 3 - subsubfunction number
-
 
962
  * edx = new value for mouse delay
-
 
963
Returned value:
-
 
964
  * function does not return value
950
    ecx = 3 - set mouse delay
965
 
951
    edx = selected value of delay
966
----------- Subsubfunction 4 - set mouse pointer position. -----------
952
    Returned value:
967
Parameters:
953
    * function does not return value
968
  * eax = 18 - function number
954
 
-
 
955
    ecx = 4 - set mouse pointer position
969
  * ebx = 19 - subfunction number
956
    edx = [coordinate on axis x]*65536 + [coordinate on axis y]
970
  * ecx = 4 - subsubfunction number
957
    Returned value:
971
  * edx = [coordinate on axis x]*65536 + [coordinate on axis y]
958
    * function does not return value
972
Returned value:
959
 
973
  * function does not return value
-
 
974
Remarks:
960
Remarks:
975
  * It is recommended to set speed of the mouse (in subsubfunction 1)
961
  * Recommended speed of the mouse (in subfunction 1) from 1 up to 9.
976
    from 1 up to 9. The installed value is not inspected by the kernel
962
    The installed value is not inspected by the code of a kernel, on this use
977
    code, so set it carefully, at incorrect value the cursor
963
    cautiously, at incorrect value the cursor can "freeze".
978
    can "freeze". Speed of the mouse can be regulated through the
964
    Speed of mouse can be regulated through the application SETUP.
-
 
965
  * Recommended delay of the mouse (in subfunction 3) = 10. Lower value
979
    application SETUP.
966
    is not handled COM by mice. At the very large values the movement of
980
  * Recommended delay of the mouse (in subsubfunction 3) = 10. Lower
967
    the mouse on 1 pixel is impossible and the cursor will jump
-
 
968
    on the value of the installed speed (subfunction 1).
981
    value is not handled by COM mice. At the very large values the
969
    Delay of mouse can be regulated through the application SETUP.
982
    movement of the mouse on 1 pixel is impossible and the cursor will
970
    The installed value is not inspected by the code of a kernel.
983
    jump on the value of installed speed (subsubfunction 1). The
Line 971... Line 984...
971
  * In subfunction 4 the installed value is not inspected by
984
    installed value is not inspected by the kernel code.
972
    the code of a kernel. Before usage it is necessary to find out current
985
  * The subsubfunction 4 does not check the passed value. Before
973
    screen resolution and at installation of a position to watch,
986
    its call find out current screen resolution (with function 14)
974
    that the value of a position should do not fall outside
987
    and check that the value of position is inside the limits of the
Line 2993... Line 3006...
2993
    given in the general description
3006
    given in the general description
2994
Returned value:
3007
Returned value:
2995
  * eax = 0 - success, otherwise file system error code
3008
  * eax = 0 - success, otherwise file system error code
2996
  * ebx destroyed
3009
  * ebx destroyed
2997
Remarks:
3010
Remarks:
-
 
3011
  * This function is obsolete, use subfunction 3 of function 70.
2998
  * Ramdisk and floppies do not support this function, it is only
3012
  * Ramdisk and floppies do not support this function, it is only
2999
    for hard disks.
3013
    for hard disks.
3000
  * File must already exist (otherwise function returns 5, not found).
3014
  * File must already exist (otherwise function returns 5, not found).
3001
    To create files use subfunction 1.
3015
    To create files use subfunction 1.
3002
  * If the starting position is greater than file size, the function
3016
  * If the starting position is greater than file size, the function
Line 4083... Line 4097...
4083
  * '/hd0/1/Program files/NameOfProgram/SomeFile.SomeExtension',0
4097
  * '/hd0/1/Program files/NameOfProgram/SomeFile.SomeExtension',0
4084
Available subfunctions:
4098
Available subfunctions:
4085
  * subfunction 0 - read file
4099
  * subfunction 0 - read file
4086
  * subfunction 1 - read folder
4100
  * subfunction 1 - read folder
4087
  * subfunction 2 - create/rewrite file
4101
  * subfunction 2 - create/rewrite file
-
 
4102
  * subfunction 3 - write to existing file
4088
  * subfunction 5 - get attributes of file/folder
4103
  * subfunction 5 - get attributes of file/folder
4089
  * subfunction 6 - set attributes of file/folder
4104
  * subfunction 6 - set attributes of file/folder
4090
  * subfunction 7 - start application
4105
  * subfunction 7 - start application
4091
For CD-drives due to hardware limitations only subfunctions
4106
For CD-drives due to hardware limitations only subfunctions
4092
0,1,5 and 7 are available, other subfunctions return error
4107
0,1,5 and 7 are available, other subfunctions return error
Line 4243... Line 4258...
4243
  * If there is not enough free space on disk, the function will
4258
  * If there is not enough free space on disk, the function will
4244
    write as many as can and then return error code 8.
4259
    write as many as can and then return error code 8.
4245
  * The function is not supported for CD (returns error code 2).
4260
  * The function is not supported for CD (returns error code 2).
Line 4246... Line 4261...
4246
 
4261
 
-
 
4262
======================================================================
-
 
4263
===================== Function 70, subfunction 3 =====================
-
 
4264
=========== Write to existing file with long names support. ==========
-
 
4265
======================================================================
-
 
4266
Parameters:
-
 
4267
  * eax = 70 - function number
-
 
4268
  * ebx = pointer to the information structure
-
 
4269
Format of the information structure:
-
 
4270
  * +0: dword: 3 = subfunction number
-
 
4271
  * +4: dword: file offset (in bytes)
-
 
4272
  * +8: dword: high dword of offset (must be 0 for FAT)
-
 
4273
  * +12 = +0xC: dword: number of bytes to write
-
 
4274
  * +16 = +0x10: dword: pointer to data
-
 
4275
  * +20 = +0x14: ASCIIZ-name of file, the rules of names forming are
-
 
4276
    given in the general description
-
 
4277
    or
-
 
4278
  * +20 = +0x14: db 0
-
 
4279
  * +21 = +0x15: dd pointer to ASCIIZ-string with file name
-
 
4280
Returned value:
-
 
4281
  * eax = 0 - success, otherwise file system error code
-
 
4282
  * ebx = number of written bytes (possibly 0)
-
 
4283
Remarks:
-
 
4284
  * The file must already exist, otherwise function returns eax=5.
-
 
4285
  * The only result of write 0 bytes is update in the file attributes
-
 
4286
    date/time of modification and access to the current date/time.
-
 
4287
  * If beginning and/or ending position is greater than file size
-
 
4288
    (except for the previous case), the file is expanded to needed
-
 
4289
    size with zero characters.
-
 
4290
 
4247
======================================================================
4291
======================================================================
4248
==== Function 70, subfunction 5 - get information on file/folder. ====
4292
==== Function 70, subfunction 5 - get information on file/folder. ====
4249
======================================================================
4293
======================================================================
4250
Parameters:
4294
Parameters:
4251
  * eax = 70 - function number
4295
  * eax = 70 - function number
Line 4419... Line 4463...
4419
  * 11 = device error
4463
  * 11 = device error
4420
Application start functions can return also following errors:
4464
Application start functions can return also following errors:
4421
  * 30 = 0x1E = not enough memory
4465
  * 30 = 0x1E = not enough memory
4422
  * 31 = 0x1F = file is not executable
4466
  * 31 = 0x1F = file is not executable
4423
  * 32 = 0x20 = too many processes
4467
  * 32 = 0x20 = too many processes
4424
>
-