Subversion Repositories Kolibri OS

Rev

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

  1.  
  2. #pragma once
  3.  
  4. #include "kosSyst.h"
  5. #include "kosFile.h"
  6. #include "mcsmemm.h"
  7.  
  8. #include <stdarg.h>
  9.  
  10.  
  11. #define min(a,b) (((a)<(b))?(a):(b))
  12. #define max(a,b) (((a)>(b))?(a):(b))
  13.  
  14.  
  15. #define ERROR -1
  16. #define ERROR_END -2
  17.  
  18. extern int convert_error;
  19.  
  20. typedef int HDC;
  21. typedef int DWORD;
  22.  
  23. extern int SysColor;
  24. extern char debuf[50];
  25.  
  26. typedef double (*function_t)(double);
  27.  
  28. typedef struct
  29. {
  30.   double x, y;
  31. } TCoord;
  32.  
  33. struct kosBDVK
  34. {
  35.         Dword attrib;
  36.         Dword name_type;
  37.         Dword create_time;
  38.         Dword create_date;
  39.         Dword access_time;
  40.         Dword access_date;
  41.         Dword modify_time;
  42.         Dword modify_date;
  43.         Dword size_low;
  44.         Dword size_high;       
  45. };
  46.  
  47. Dword kos_GetSlotByPID(Dword PID);
  48. Dword kos_GetActiveSlot();
  49. Dword kos_GetSkinHeight();
  50. Dword kos_GetSpecialKeyState();
  51. void kos_GetMouseStateWnd( Dword & buttons, int & cursorX, int & cursorY );
  52. void kos_DrawLine( Word x1, Word y1, Word x2, Word y2, Dword colour, Dword invert);
  53. void DrawRegion(Dword x,Dword y,Dword width,Dword height,Dword color1);
  54. int atoi(const char* string);
  55. void kos_GetScrollInfo(int &vert, int &hor);
  56.  
  57.  
  58. Dword kos_GetSlotByPID(Dword PID);
  59. Dword kos_GetActiveSlot();
  60. Dword kos_GetSkinHeight();
  61. Dword kos_GetSpecialKeyState();
  62.  
  63.  
  64. double fabs(double x);
  65. double cos(double x);
  66. double sin(double x);
  67. bool isalpha(char c);
  68. double convert(char *s, int *len=NULL);
  69. void format( char *Str, int len, char* Format, ... );
  70.  
  71. void line( int x1, int y1, int x2, int y2);
  72.  
  73. void outtextxy( int x, int y, char *s, int len);
  74. void settextstyle( int a1, int a2, int a3);
  75.  
  76.  
  77. double textwidth( char *s, int len);
  78. double textheight( char *s, int len);
  79. void setcolor( DWORD color);
  80. void unsetcolor(HDC hdc);
  81. void rectangle( int x1, int y1, int x2, int y2);
  82.  
  83. typedef struct
  84. {
  85. unsigned        p00 ;
  86. unsigned        p04 ;
  87. unsigned        p08 ;
  88. unsigned        p12 ;
  89. unsigned        p16 ;
  90. char            p20 ;
  91. char            *p21 ;
  92. } kol_struct70 ;
  93.  
  94.  
  95. typedef struct
  96. {
  97. unsigned        p00 ;
  98. char            p04 ;
  99. char            p05[3] ;
  100. unsigned        p08 ;
  101. unsigned        p12 ;
  102. unsigned        p16 ;
  103. unsigned        p20 ;
  104. unsigned        p24 ;
  105. unsigned        p28 ;
  106. unsigned        p32[2] ;
  107. unsigned        p40 ;
  108. } kol_struct_BDVK ;
  109.  
  110. typedef struct
  111. {
  112. char    *name ;
  113. void    *data ;
  114. } kol_struct_import ;
  115.  
  116.  
  117.  
  118. kol_struct_import* kol_cofflib_load(char *name);
  119. void* kol_cofflib_procload (kol_struct_import *imp, char *name);
  120. unsigned kol_cofflib_procnum (kol_struct_import *imp);
  121. void kol_cofflib_procname (kol_struct_import *imp, char *name, unsigned n);
  122. int strcmp(const char* string1, const char* string2);
  123.  
  124. char *ftoa(double d);
  125. double atof(char *s);
  126.  
  127.  
  128. int di(double x);
  129. double id(int x);
  130.  
  131. double atan(double x);
  132. double arccos(double x);
  133. double sqrtd(double x);
  134. double atan2(double x, double y);
  135. int roundInt(double x);
  136.