Subversion Repositories Kolibri OS

Rev

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

Rev 2465 Rev 2987
Line 192... Line 192...
192
============ Function 4 - draw text string in the window. ============
192
============ Function 4 - draw text string in the window. ============
193
======================================================================
193
======================================================================
194
Parameters:
194
Parameters:
195
  * eax = 4 - function number
195
  * eax = 4 - function number
196
  * ebx = [coordinate on axis x]*65536 + [coordinate on axis y]
196
  * ebx = [coordinate on axis x]*65536 + [coordinate on axis y]
197
  * ecx = 0xX0RRGGBB, where
197
  * ecx = 0xXYRRGGBB, where
198
    * RR, GG, BB specify text color
198
    * RR, GG, BB specify text color
199
    * X=ABnn (bits):
199
    * X=ABnn (bits):
200
    * nn specifies the used font: 0=system monospaced,
200
    * nn specifies the used font: 0=system monospaced,
201
      1=system font of variable width
201
      1=system font of variable width
202
    * A=0 - output esi characters, A=1 - output ASCIIZ-string
202
    * A=0 - output esi characters, A=1 - output ASCIIZ-string
203
    * B=1 - fill background with the color edi
203
    * B=1 - fill background with the color edi
-
 
204
    * Y = Cnnn
-
 
205
      * C=1 redirect the output to the user area, specified in edi
-
 
206
      * nnn - not used in the current, must be 0 (zero) 
204
  * edx = pointer to the beginning of the string
207
  * edx = pointer to the beginning of the string
205
  * esi = for A=0 length of the string, must not exceed 255;
208
  * esi = for A=0 length of the string, must not exceed 255;
206
          for A=1 is ignored
209
          for A=1 is ignored
-
 
210
  * edi = color to fill background, if B=1
-
 
211
  * edi = pointer to user area, for redirect, if C=1
-
 
212
  
207
Returned value:
213
Returned value:
208
  * function does not return value
214
  * function does not return value
209
Remarks:
215
Remarks:
210
  * First system font is read out at loading from the file char.mt,
216
  * First system font is read out at loading from the file char.mt,
211
    second - from char2.mt.
217
    second - from char2.mt.
212
  * Both fonts have height 9 pixels, width of the monospaced font
218
  * Both fonts have height 9 pixels, width of the monospaced font
213
    is equal to 6 pixels.
219
    is equal to 6 pixels.
-
 
220
  * C=1, pixel depth = 32 bits, user area is as follows:
-
 
221
    dword Xsize
-
 
222
    dword Ysize
-
 
223
    rest of the area = Xsize * Y size * 4
-
 
224
  * You can not use B = 1 and C = 1, at the same time. Since in both
-
 
225
    cases, the register edi is used for different purposes.
Line 214... Line 226...
214
 
226
 
215
======================================================================
227
======================================================================
216
========================= Function 5 - delay. ========================
228
========================= Function 5 - delay. ========================
217
======================================================================
229
======================================================================
Line 323... Line 335...
323
    * +6: word: (has no relation to the specified thread)
335
    * +6: word: (has no relation to the specified thread)
324
      number of the thread slot, which window has in the window stack
336
      number of the thread slot, which window has in the window stack
325
      position ecx
337
      position ecx
326
    * +8: word: reserved
338
    * +8: word: reserved
327
    * +10 = +0xA: 11 bytes: name of the process
339
    * +10 = +0xA: 11 bytes: name of the process
328
      (name of corresponding executable file in the format 8+3)
340
      (name of the started file - executable file without extension)
329
    * +21 = +0x15: byte: reserved, this byte is not changed
341
    * +21 = +0x15: byte: reserved, this byte is not changed
330
    * +22 = +0x16: dword: address of the process in memory
342
    * +22 = +0x16: dword: address of the process in memory
331
    * +26 = +0x1A: dword: size of used memory - 1
343
    * +26 = +0x1A: dword: size of used memory - 1
332
    * +30 = +0x1E: dword: identifier (PID/TID)
344
    * +30 = +0x1E: dword: identifier (PID/TID)
333
    * +34 = +0x22: dword: coordinate of the thread window on axis x
345
    * +34 = +0x22: dword: coordinate of the thread window on axis x
Line 599... Line 611...
599
  * ecx = pointer to mapped data
611
  * ecx = pointer to mapped data
600
Returned value:
612
Returned value:
601
  * eax = 1 - success, 0 - error
613
  * eax = 1 - success, 0 - error
Line 602... Line 614...
602
 
614
 
-
 
615
======================================================================
-
 
616
===================== Function 15, subfunction 8 =====================
-
 
617
============= Get coordinates of last draw the background ============
-
 
618
======================================================================
-
 
619
Parameters:
-
 
620
  * eax = 15 - function number
-
 
621
  * ebx = 8 - subfunction number
-
 
622
Returned value:
-
 
623
  * eax = [left]*65536 + [right]
-
 
624
  * ebx = [top]*65536 + [bottom]
-
 
625
Remarks:
-
 
626
  * (left,top) are coordinates of the left upper corner,
-
 
627
    (right,bottom) are coordinates of the right lower one.
-
 
628
  * For receiving more reliable information, call the function
-
 
629
    immediately after the event:
-
 
630
             5 = kernel finished redrawing of the desktop background
-
 
631
 
-
 
632
======================================================================
-
 
633
===================== Function 15, subfunction 9 =====================
-
 
634
============= Redraws a rectangular part of the background ===========
-
 
635
======================================================================
-
 
636
Parameters:
-
 
637
  * eax = 15 - function number
-
 
638
  * ebx = 9 - subfunction number
-
 
639
  * ecx = [left]*65536 + [right]
-
 
640
  * edx = [top]*65536 + [bottom]
-
 
641
Returned value:
-
 
642
  * function does not return value
-
 
643
Remarks:
-
 
644
  * (left,top) are coordinates of the left upper corner,
-
 
645
    (right,bottom) are coordinates of the right lower one.
-
 
646
  * If parameters are set incorrectly then background is not redrawn.
-
 
647
 
603
======================================================================
648
======================================================================
604
=============== Function 16 - save ramdisk on a floppy. ==============
649
=============== Function 16 - save ramdisk on a floppy. ==============
605
======================================================================
650
======================================================================
606
Parameters:
651
Parameters:
607
  * eax = 16 - function number
652
  * eax = 16 - function number
Line 1062... Line 1107...
1062
  * The thread can minimize its window with subfunction 10.
1107
  * The thread can minimize its window with subfunction 10.
1063
  * One can restore and activate window simultaneously with
1108
  * One can restore and activate window simultaneously with
1064
    subfunction 3 (which requires slot number).
1109
    subfunction 3 (which requires slot number).
Line 1065... Line 1110...
1065
 
1110
 
-
 
1111
======================================================================
-
 
1112
======== Function 18, subfunction 23 - minimize all windows. ==========
-
 
1113
======================================================================
-
 
1114
Parameters:
-
 
1115
  * eax = 18 - function number
-
 
1116
  * ebx = 23 - subfunction number
-
 
1117
Returned value:
-
 
1118
  * eax = 0 - all windows have been minimized before a function call
-
 
1119
  * eax = N - number of windows minimized from function
-
 
1120
Remarks:
-
 
1121
  * Window of special thread (name begin to symbol @) is not minimize.
-
 
1122
 
-
 
1123
======================================================================
-
 
1124
======= Function 18, subfunction 24 - set limits of screen. ==========
-
 
1125
======================================================================
-
 
1126
Parameters:
-
 
1127
  * eax = 18 - function number
-
 
1128
  * ebx = 24 - subfunction number
-
 
1129
  * ecx = new X size
-
 
1130
  * edx = new Y size
-
 
1131
Returned value:
-
 
1132
  * function does not return value
-
 
1133
Remarks:
-
 
1134
  * The function does not change the physical size of the video mode.
-
 
1135
    It is designed for non-standard displays which display the image
-
 
1136
    partially.
-
 
1137
  * The sizes specified in the function should not exceed the sizes
-
 
1138
    of the current video mode, otherwise the function will not change
-
 
1139
    anything.
-
 
1140
 
1066
======================================================================
1141
======================================================================
1067
==================== Function 20 - MIDI interface. ===================
1142
==================== Function 20 - MIDI interface. ===================
Line 1068... Line 1143...
1068
======================================================================
1143
======================================================================
1069
 
1144
 
Line 1491... Line 1566...
1491
Remarks:
1566
Remarks:
1492
  * The function is supported only for ATAPI devices (CD and DVD).
1567
  * The function is supported only for ATAPI devices (CD and DVD).
1493
  * An example of usage of the function is the application CD_tray.
1568
  * An example of usage of the function is the application CD_tray.
Line 1494... Line 1569...
1494
 
1569
 
-
 
1570
======================================================================
-
 
1571
======= Function 25 - put image area on the background layer. ========
-
 
1572
======================================================================
-
 
1573
Paramters:
-
 
1574
  * eax = 25 - function number
-
 
1575
  * ebx = pointer to the previously allocated memory area,
-
 
1576
        where placed the source images in a format BBGGRRTTBBGGRRTT...
-
 
1577
  * ecx = [size on axis x]*65536 + [size on axis y]
-
 
1578
  * edx = [coordinate on axis x]*65536 + [coordinate on axis y]
-
 
1579
Returned value:
-
 
1580
  * function does not return value
-
 
1581
Remarks:
-
 
1582
  * Coordinates of the image are coordinates of the upper left corner
-
 
1583
    of the image relative to the screen.
-
 
1584
  * Size of the image in bytes is 4*xsize*ysize
-
 
1585
  * TT - byte pointer of transparency, at current version:
-
 
1586
         1 to FF - opaque, 0 - transparent.
-
 
1587
  * The function places the image directly to LFB. It is not for
-
 
1588
    background image f.15. Options f.15 to f.25 does not make sense.
-
 
1589
 
1495
======================================================================
1590
======================================================================
1496
======== Function 26, subfunction 1 - get MPU MIDI base port. ========
1591
======== Function 26, subfunction 1 - get MPU MIDI base port. ========
1497
======================================================================
1592
======================================================================
1498
Parameters:
1593
Parameters:
1499
  * eax = 26 - function number
1594
  * eax = 26 - function number
Line 1680... Line 1775...
1680
  * By default, current folder for the thread is "/rd/1".
1775
  * By default, current folder for the thread is "/rd/1".
1681
  * At process/thread creation the current folder will be inherited
1776
  * At process/thread creation the current folder will be inherited
1682
    from the parent.
1777
    from the parent.
Line 1683... Line 1778...
1683
 
1778
 
-
 
1779
======================================================================
-
 
1780
========= Function 34 - who owner the pixel on the screen. ===========
-
 
1781
======================================================================
-
 
1782
Parameters:
-
 
1783
  * eax = 34 - function number
-
 
1784
  * ebx = x-coordinate (relative to the display)
-
 
1785
  * ecx = y-coordinate (relative to the display)
-
 
1786
 
-
 
1787
Returned value:
-
 
1788
  * eax = 0x000000XX - owner of pixel the slot window N
-
 
1789
    If incorrect values ebx and ecx then function returns 0
-
 
1790
  * The function takes the value from the area [_WinMapAddress]
-
 
1791
  
1684
======================================================================
1792
======================================================================
1685
======= Function 35 - read the color of a pixel on the screen. =======
1793
======= Function 35 - read the color of a pixel on the screen. =======
1686
======================================================================
1794
======================================================================
1687
Parameters:
1795
Parameters:
1688
  * eax = 35
1796
  * eax = 35
Line 3219... Line 3327...
3219
Parameters:
3327
Parameters:
3220
  * eax = 65 - function number
3328
  * eax = 65 - function number
3221
  * ebx = pointer to the image
3329
  * ebx = pointer to the image
3222
  * ecx = [size on axis x]*65536 + [size on axis y]
3330
  * ecx = [size on axis x]*65536 + [size on axis y]
3223
  * edx = [coordinate on axis x]*65536 + [coordinate on axis y]
3331
  * edx = [coordinate on axis x]*65536 + [coordinate on axis y]
3224
  * esi = number of bits per pixel, must be 1,2,4,8,15,16,24 or 32
3332
  * esi = number of bits per pixel, must be 1,2,4,8,9,15,16,24 or 32;
3225
  * edi = pointer to palette (2 to the power esi colors 0x00RRGGBB);
3333
  * edi = pointer to palette (2 to the power esi colors 0x00RRGGBB);
3226
          ignored when esi > 8
3334
          ignored when esi > 8
3227
  * ebp = offset of next row data relative to previous row data
3335
  * ebp = offset of next row data relative to previous row data
3228
Returned value:
3336
Returned value:
3229
  * function does not return value
3337
  * function does not return value
Line 3240... Line 3348...
3240
    excluding last bytes in rows (if width is odd) contains
3348
    excluding last bytes in rows (if width is odd) contains
3241
    information on the color of 2 pixels, high-order tetrad
3349
    information on the color of 2 pixels, high-order tetrad
3242
    corresponds to first pixel.
3350
    corresponds to first pixel.
3243
  * Format of image with 8 bits per pixel: each byte of image is
3351
  * Format of image with 8 bits per pixel: each byte of image is
3244
    index in the palette.
3352
    index in the palette.
-
 
3353
  * Format of image with 9 bits per pixel: array of one byte values;
-
 
3354
    each byte (8 bit) represents the intensity of gray for one pixel;
-
 
3355
    this format is equal to 8bpp without palette.
3245
  * Format of image with 15 bits per pixel: the color of each pixel
3356
  * Format of image with 15 bits per pixel: the color of each pixel
3246
    is coded as (bit representation) 0RRRRRGGGGGBBBBB - 5 bits per
3357
    is coded as (bit representation) 0RRRRRGGGGGBBBBB - 5 bits per
3247
    each color.
3358
    each color.
3248
  * Format of image with 16 bits per pixel: the color of each pixel
3359
  * Format of image with 16 bits per pixel: the color of each pixel
3249
    is coded as RRRRRGGGGGGBBBBB (5+6+5).
3360
    is coded as RRRRRGGGGGGBBBBB (5+6+5).
Line 3338... Line 3449...
3338
    deleted.
3449
    deleted.
3339
  * The call to this subfunction does not affect other applications.
3450
  * The call to this subfunction does not affect other applications.
3340
    If other application has defined the same combination, it will
3451
    If other application has defined the same combination, it will
3341
    still receive notices.
3452
    still receive notices.
Line -... Line 3453...
-
 
3453
 
-
 
3454
--------------- Subfunction 6 - block the normal input. --------------
-
 
3455
Parameters:
-
 
3456
  * eax = 66 - function number
-
 
3457
  * ebx = 6 - subfunction number
-
 
3458
Returned value:
-
 
3459
  * function does not return value
-
 
3460
Remarks:
-
 
3461
  * Blocking the normal keyboard input for installed hotkeys
-
 
3462
  * To emulate a mouse via the keyboard, the application MOUSEMUL
-
 
3463
 
-
 
3464
------------ Subfunction 7 - unlock the normal input. ----------------
-
 
3465
Parameters:
-
 
3466
  * eax = 66 - function number
-
 
3467
  * ebx = 7 - subfunction number
-
 
3468
Returned value:
-
 
3469
  * function does not return value
-
 
3470
Remarks:
-
 
3471
  * Unlocking the results of the f. 66.6
-
 
3472
  * To emulate a mouse via the keyboard, the application MOUSEMUL
3342
 
3473
 
3343
======================================================================
3474
======================================================================
3344
========= Function 67 - change position/sizes of the window. =========
3475
========= Function 67 - change position/sizes of the window. =========
3345
======================================================================
3476
======================================================================
3346
Parameters:
3477
Parameters:
Line 3594... Line 3725...
3594
  * If ecx=0, the function frees memory block at edx and returns 0.
3725
  * If ecx=0, the function frees memory block at edx and returns 0.
3595
  * The contents of the block are unchanged up to the shorter of
3726
  * The contents of the block are unchanged up to the shorter of
3596
    the new and old sizes.
3727
    the new and old sizes.
Line 3597... Line 3728...
3597
 
3728
 
-
 
3729
======================================================================
-
 
3730
=========== Function 68, subfunction 21 - load driver PE. ============
-
 
3731
======================================================================
-
 
3732
Parameters:
-
 
3733
  * eax = 68 - function number
-
 
3734
  * ebx = 21 - subfunction number
-
 
3735
  * ecx = pointer to ASCIIZ-string with driver name
-
 
3736
  * edx = pointer to command line
-
 
3737
Returned value:
-
 
3738
  * eax = 0 - failed
-
 
3739
  * otherwise eax = driver handle
-
 
3740
Remarks:
-
 
3741
  * If the driver was not loaded yet, it is loaded;
-
 
3742
    if the driver was loaded yet, nothing happens.
-
 
3743
 
3598
======================================================================
3744
======================================================================
3599
======== Function 68, subfunction 22 - open named memory area. =======
3745
======== Function 68, subfunction 22 - open named memory area. =======
3600
======================================================================
3746
======================================================================
3601
Parameters:
3747
Parameters:
3602
  * eax = 68 - function number
3748
  * eax = 68 - function number
Line 4428... Line 4574...
4428
    acts, only when the window is active;
4574
    acts, only when the window is active;
4429
    is reset when all buttons from the buffer
4575
    is reset when all buttons from the buffer
4430
    are read out by function 17)
4576
    are read out by function 17)
4431
  * 4 = reserved (in current implementation never comes even after
4577
  * 4 = reserved (in current implementation never comes even after
4432
    unmasking by function 40)
4578
    unmasking by function 40)
4433
  * 5 = the desktop background is redrawed (is reset automatically
-
 
4434
    after redraw, so if in redraw time program does not wait and
4579
  * 5 = kernel finished redrawing of the desktop background
4435
    does not check events, it will not remark this event)
-
 
4436
  * 6 = mouse event (something happened - button pressing or moving;
4580
  * 6 = mouse event (something happened - button pressing or moving;
4437
    is reset at reading)
4581
    is reset at reading)
4438
  * 7 = IPC event (see function 60 -
4582
  * 7 = IPC event (see function 60 -
4439
    Inter Process Communication; is reset at reading)
4583
    Inter Process Communication; is reset at reading)
4440
  * 8 = network event (is reset at reading)
4584
  * 8 = network event (is reset at reading)