Subversion Repositories Kolibri OS

Rev

Rev 7104 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1.  
  2. ; KolibriOS system functions:
  3. SF_TERMINATE_PROCESS=-1
  4. SF_CREATE_WINDOW=0      ; define and draw the window
  5. SF_PUT_PIXEL=1          ; draw pixel to the window
  6. SF_GET_KEY=2            ; get code of the pressed key
  7. SF_GET_SYS_TIME=3
  8. SF_DRAW_TEXT=4
  9. SF_SLEEP=5              ; pause process
  10. SF_PUT_IMAGE=7          ; draw image to the window
  11. SF_DEFINE_BUTTON=8      ; define/delete the button
  12. SF_THREAD_INFO=9        ; information on execution thread
  13. SF_WAIT_EVENT=10        ; wait for event
  14. SF_CHECK_EVENT=11       ; check for event and return
  15. SF_REDRAW=12
  16.   SSF_BEGIN_DRAW=1
  17.   SSF_END_DRAW=2
  18. SF_DRAW_RECT=13         ; draw rectangle to the window
  19. SF_GET_SCREEN_SIZE=14   ; get screen resolution
  20. SF_BACKGROUND_SET=15    ; work with desktop background graphics
  21.   SSF_SIZE_BG=1         ; set a size of the background image
  22.   SSF_PIXEL_BG=2        ; put pixel on the background image
  23.   SSF_REDRAW_BG=3       ; redraw background
  24.   SSF_MODE_BG=4         ; set drawing mode for the background
  25.   SSF_IMAGE_BG=5        ; put block of pixels on the background image
  26.   SSF_MAP_BG=6          ; map background image to the address space of the process
  27.   SSF_UNMAP_BG=7        ; close mapped background data
  28.   SSF_LAST_DRAW=8       ; get coordinates of the last draw to the background
  29.   SSF_REDRAW_RECT=9     ; redraws a rectangular part of the background
  30. SF_RD_TO_FLOPPY=16      ; save ramdisk on the floppy
  31. SF_GET_BUTTON=17        ; get ID of the pressed button
  32. SF_SYSTEM=18
  33.   SSF_UNFOCUS_WINDOW=1          ; take focus from the window of the given thread
  34.   SSF_TERMINATE_THREAD=2        ; terminate process/thread by the slot number
  35.   SSF_FOCUS_WINDOW=3            ; give focus to the window of the given thread
  36.   SSF_GET_IDLE_COUNT=4          ; get counter of idle cycles per second
  37.   SSF_GET_CPU_FREQUENCY=5        ; get CPU clock rate
  38.   SSF_RD_TO_HDD=6               ; save ramdisk to the file on hard disk
  39.   SSF_GET_ACTIVE_WINDOW=7       ; get slot number of the active window
  40.   SSF_SPEAKER=8
  41.     SSSF_GET_STATE=1
  42.     SSSF_TOGGLE=2
  43.   SSF_SHUTDOWN=9                ; system shutdown/reboot
  44.   SSF_MINIMIZE_WINDOW=10        ; minimize active window
  45.   SSF_INFO_DISC_SYS=11          ; get disk subsystem information
  46.   SSF_KERNEL_VERSION=13         ; get kernel version
  47.   SSF_WAIT_RETRACE=14           ; wait for screen retrace
  48.   SSF_CURSOR_CENTER=15          ; center mouse cursor on the screen
  49.   SSF_GET_FREE_RAM=16           ; get size of free RAM
  50.   SSF_GET_TOTAL_RAM=17          ; get total amount of RAM
  51.   SSF_TERMINATE_THREAD_ID=18    ; Terminate process/thread by the ID
  52.   SSF_MOUSE_SETTINGS=19
  53.     SSSF_GET_SPEED=0
  54.     SSSF_SET_SPEED=1
  55.     SSSF_GET_SPEEDUP=2
  56.     SSSF_SET_SPEEDUP=3          ; set mouse acceleration
  57.     SSSF_SET_POS=4              ; set mouse pointer position
  58.     SSSF_SET_BUTTON=5           ; simulate state of mouse buttons
  59.     SSSF_GET_DOUBLE_CLICK_DELAY=6
  60.     SSSF_SET_DOUBLE_CLICK_DELAY=7
  61.   SSF_GET_RAM_INFO=20           ; get information on RAM
  62.   SSF_GET_THREAD_SLOT=21        ; get slot number of process/thread by the ID
  63.   SSF_FOREIGN_WINDOW=22         ; operations with window of another thread by slot/ID
  64.     SSSF_MINIMIZE=0
  65.     SSSF_MINIMIZE_ID=1
  66.     SSSF_RESTORE=2
  67.     SSSF_RESTORE_ID=3
  68.   SSF_MINIMIZE_ALL=23
  69.   SSF_SET_SCREEN_LIMITS=24
  70.   SSF_WINDOW_BEHAVIOR=25        ; window focus relation with other windows
  71.     SSSF_GET_WB=1
  72.     SSSF_SET_WB=2
  73. SF_MIDI=20
  74.   SSF_RESET=1
  75.   SSF_OUTPUT=2
  76. SF_SYSTEM_SET=21
  77.   SSF_MPU_MIDI_BASE=1
  78.   SSF_KEYBOARD_LAYOUT=2
  79.   SSF_SYS_LANG=5
  80.   SSF_ACCESS_HD_LBA=11  ; setting of low-level access to HD
  81.   SSF_ACCESS_PCI=12     ; setting of low-level access to PCI
  82. SF_SET_TIME_DATE=22
  83. SF_WAIT_EVENT_TIMEOUT=23; wait for event with timeout
  84. SF_CD=24
  85.   SSF_EJECT_TRAY=4
  86.   SSF_INSERT_TRAY=5
  87. SF_SCREEN_PUT_IMAGE=25  ; put image on the background layer
  88. SF_SYSTEM_GET=26
  89.   ; Same as SF_SYSTEM_SET, plus:
  90.   SSF_TIME_COUNT=9
  91.   SSF_TIME_COUNT_PRO=10 ; get value of the high precision time counter
  92. SF_GET_SYS_DATE=29
  93. SF_CURRENT_FOLDER=30
  94.   SSF_SET_CF=1          ; set current folder for the thread
  95.   SSF_GET_CF=2
  96.   SSF_ADD_SYS_FOLDER=3  ; install the add.system directory for the kernel
  97. SF_GET_PIXEL_OWNER=34   ; get slot number of the screen pixel owner
  98. SF_GET_PIXEL=35         ; read the screen pixel color
  99. SF_GET_IMAGE=36         ; read the screen area
  100. SF_MOUSE_GET=37
  101.   SSF_SCREEN_POSITION=0
  102.   SSF_WINDOW_POSITION=1
  103.   SSF_BUTTON=2          ; states of the mouse buttons
  104.   SSF_BUTTON_EXT=3      ; states and events of the mouse buttons
  105.   SSF_LOAD_CURSOR=4
  106.   SSF_SET_CURSOR=5
  107.   SSF_DEL_CURSOR=6
  108.   SSF_SCROLL_DATA=7
  109. SF_DRAW_LINE=38
  110. SF_BACKGROUND_GET=39
  111.   ;SSF_SIZE_BG=1
  112.   ;SSF_PIXEL_BG=2
  113.   ;SSF_MODE_BG=4
  114. SF_SET_EVENTS_MASK=40   ; turn on/off desired events
  115. SF_PORT_IN_OUT=43       ; input/output to a port
  116. SF_SET_PORTS=46         ; reserve/free a group of input/output ports
  117. SF_DRAW_NUMBER=47       ; draw number to the window
  118. SF_STYLE_SETTINGS=48
  119.   SSF_APPLY=0           ; apply screen settings
  120.   SSF_SET_BUTTON_STYLE=1
  121.   SSF_SET_COLORS=2
  122.   SSF_GET_COLORS=3      ; get standard window colors
  123.   SSF_GET_SKIN_HEIGHT=4
  124.   SSF_GET_SCREEN_AREA=5 ; get screen working area
  125.   SSF_SET_SCREEN_AREA=6
  126.   SSF_GET_SKIN_MARGINS=7
  127.   SSF_SET_SKIN=8
  128.   SSF_GET_FONT_SMOOTH=9
  129.   SSF_SET_FONT_SMOOTH=10
  130.   SSF_GET_FONT_SIZE=11
  131.   SSF_SET_FONT_SIZE=12
  132. SF_APM=49
  133. SF_SET_WINDOW_SHAPE=50
  134. SF_CREATE_THREAD=51
  135. SF_CLIPBOARD=54
  136.   SSF_GET_SLOT_COUNT=0  ; get the number of slots in the clipboard
  137.   SSF_READ_CB=1
  138.   SSF_WRITE_CB=2
  139.   SSF_DEL_SLOT=3        ; delete the last slot in the clipboard
  140.   SSF_UNLOCK_BUFFER=4   ; emergency buffer unlock
  141. SF_SPEAKER_PLAY=55
  142. SF_PCI_BIOS=57
  143. SF_IPC=60               ; Inter Process Communication
  144.   SSF_SET_AREA=1        ; set area for IPC receiving
  145.   SSF_SEND_MESSAGE=2
  146. SF_GET_GRAPHICAL_PARAMS=61
  147.   SSF_SCREEN_SIZE=1
  148.   SSF_BITS_PER_PIXEL=2
  149.   SSF_BYTES_PER_LINE=3
  150. SF_PCI=62
  151.   SSF_GET_VERSION=0     ; get version of PCI-interface
  152.   SSF_GET_LAST_BUS=1    ; get number of the last PCI-bus
  153.   SSF_GET_ADRR_MODE=2   ; get addressing mode of the PCI configuration space
  154.   SSF_READ_BYTE=4
  155.   SSF_READ_WORD=5
  156.   SSF_READ_DWORD=6
  157.   SSF_WRITE_BYTE=8
  158.   SSF_WRITE_WORD=9
  159.   SSF_WRITE_DWORD=10
  160. SF_BOARD=63
  161.   SSF_DEBUG_WRITE=1
  162.   SSF_DEBUG_READ=2
  163. SF_MEMORY_RESIZE=64     ; resize total application memory
  164. SF_PUT_IMAGE_EXT=65     ; draw image with palette to the window
  165. SF_KEYBOARD=66
  166.   SSF_SET_INPUT_MODE=1
  167.   SSF_GET_INPUT_MODE=2
  168.   SSF_GET_CONTROL_KEYS=3; get status of control keys
  169.   SSF_SET_SYS_HOTKEY=4
  170.   SSF_DEL_SYS_HOTKEY=5
  171.   SSF_LOCK_INPUT=6      ; block normal input
  172.   SSF_UNLOCK_INPUT=7    ; restore normal input
  173. SF_CHANGE_WINDOW=67     ; change position/sizes of the window
  174. SF_SYS_MISC=68
  175.   SSF_GET_TASK_SWITCH_COUNT=0
  176.   SSF_SWITCH_TASK=1
  177.   SSF_PERFORMANCE=2
  178.     SSSF_ALLOW_RDPMC=0
  179.     SSSF_CACHE_STATUS=1
  180.     SSSF_CACHE_ON=2
  181.     SSSF_CACHE_OFF=3
  182.   SSF_READ_MSR=3
  183.   SSF_WRITE_MSR=4
  184.   SSF_HEAP_INIT=11
  185.   SSF_MEM_ALLOC=12
  186.   SSF_MEM_FREE=13
  187.   SSF_WAIT_SIGNAL=14    ; wait for signal from another program/driver
  188.   SSF_LOAD_DRIVER=16
  189.   SSF_CONTROL_DRIVER=17
  190.   SSF_LOAD_DLL=19
  191.   SSF_MEM_REALLOC=20
  192.   SSF_LOAD_DRIVER_PE=21
  193.   SSF_MEM_OPEN=22       ; open named memory area
  194.   SSF_MEM_CLOSE=23
  195.   SSF_SET_EXCEPTION_HANDLER=24
  196.   SSF_SET_EXCEPTION_STATE=25
  197.   SSF_MEM_FREE_EXT=26
  198.   SSF_LOAD_FILE=27
  199. SF_DEBUG=69
  200.   SSF_SET_MESSAGE_AREA=0
  201.   SSF_GET_REGISTERS=1
  202.   SSF_SET_REGISTERS=2
  203.   SSF_DETACH=3
  204.   SSF_SUSPEND=4
  205.   SSF_RESUME=5
  206.   SSF_READ_MEMORY=6
  207.   SSF_WRITE_MEMORY=7
  208.   SSF_TERMINATE=8
  209.   SSF_DEFINE_BREAKPOINT=9
  210. SF_FILE=70
  211.   SSF_READ_FILE=0
  212.   SSF_READ_FOLDER=1
  213.   SSF_CREATE_FILE=2
  214.   SSF_WRITE_FILE=3
  215.   SSF_SET_END=4
  216.   SSF_GET_INFO=5
  217.   SSF_SET_INFO=6
  218.   SSF_START_APP=7
  219.   SSF_DELETE=8
  220.   SSF_CREATE_FOLDER=9
  221. SF_SET_CAPTION=71
  222. SF_SEND_MESSAGE=72
  223. SF_BLITTER=73
  224. SF_NETWORK_DEVICE=74
  225.   SSF_DEVICE_COUNT=255  ; get number of active network devices
  226.   SSF_DEVICE_TYPE=0
  227.   SSF_DEVICE_NAME=1
  228.   SSF_RESET_DEVICE=2
  229.   SSF_STOP_DEVICE=3
  230.   SSF_DEVICE_POINTER=4
  231.   SSF_TX_PACKET_COUNT=6
  232.   SSF_RX_PACKET_COUNT=7
  233.   SSF_TX_BYTE_COUNT=8
  234.   SSF_RX_BYTE_COUNT=9
  235.   SSF_LINK_STATUS=10
  236. SF_NETWORK_SOCKET=75
  237.   SSF_OPEN=0
  238.   SSF_CLOSE=1
  239.   SSF_BIND=2
  240.   SSF_LISTEN=3
  241.   SSF_CONNECT=4
  242.   SSF_ACCEPT=5
  243.   SSF_SEND=6
  244.   SSF_RECEIVE=7
  245.   SSF_SET_OPTIONS=8
  246.   SSF_GET_OPTIONS=9
  247.   SSF_SOCKET_PAIR=10
  248. SF_NETWORK_PROTOCOL=76
  249.   SSF_ETHERNET_READ_MAC=0
  250.   SSF_IP4_PACKETS_SENT=10000h
  251.   SSF_IP4_PACKETS_RECEIVED=10001h
  252.   SSF_IP4_READ_IP=10002h
  253.   SSF_IP4_WRITE_IP=10003h
  254.   SSF_IP4_READ_DNS=10004h
  255.   SSF_IP4_WRITE_DNS=10005h
  256.   SSF_IP4_READ_SUBNET=10006h
  257.   SSF_IP4_WRITE_SUBNET=10007h
  258.   SSF_IP4_READ_GATEWAY=10008h
  259.   SSF_IP4_WRITE_GATEWAY=10009h
  260.   SSF_ICMP_PACKETS_SENT=20000h
  261.   SSF_ICMP_PACKETS_RECEIVED=20001h
  262.   SSF_ICMP_ECHO_REPLY=20003h
  263.   SSF_UDP_PACKETS_SENT=30000h
  264.   SSF_UDP_PACKETS_RECEIVED=30001h
  265.   SSF_TCP_PACKETS_SENT=40000h
  266.   SSF_TCP_PACKETS_RECEIVED=40001h
  267.   SSF_ARP_PACKETS_SENT=50000h
  268.   SSF_ARP_PACKETS_RECEIVED=50001h
  269.   SSF_ARP_GET_ENTRY_COUNT=50002h
  270.   SSF_ARP_READ_ENTRY=50003h
  271.   SSF_ARP_ADD_STATIC_ENTRY=50004h
  272.   SSF_ARP_DEL_ENTRY=50005h
  273.   SSF_ARP_SEND_ANNOUNCE=50006h
  274.   SSF_ARP_CONFLICTS_COUNT=50007h
  275. SF_FUTEX=77
  276.   SSF_CREATE=0
  277.   SSF_DESTROY=1
  278.   SSF_WAIT=2
  279.   SSF_WAKE=3
  280.  
  281. ; File system errors:
  282. FSERR_SUCCESS=0
  283. FSERR_UNSUPPORTED=2
  284. FSERR_UNKNOWN=3
  285. FSERR_FILE_NOT_FOUND=5
  286. FSERR_END_OF_FILE=6
  287. FSERR_INVALID_BUFFER=7
  288. FSERR_DISK_FULL=8
  289. FSERR_FAIL=9
  290. FSERR_ACCESS_DENIED=10
  291. FSERR_DEVICE_FAIL=11
  292. FSERR_OUT_OF_MEMORY=12
  293.