============================================================= APILib Library SDK (c) NeXO Software - Benoit SCHERRER / Ibrahim Tutorial : The Interface Engine Difficulty : [X][X][ ][ ][ ] ============================================================= I......... What is it II........ How does it work III....... The api92_IEPipe structure IV........ Examples V......... Conclusion I. What is it ------------- The Interface Engine is a very powerful tool that is used to draw very nice graphical interfaces using a minimum of memory. II. How does it work -------------------- What is amazing is that you use only one library call to draw your interface. It requires only one parameter : the address of an api92_IEPipe structure. III. The api92_IEPipe structure ------------------------------- The api92_IEPipe structure is a buffer of bytes that describes your interface. Here is the current functions supported : IE_END : Very important : it is used to announce the end of the api92_IEPipe structure IE_NOP : No Operation : Used to make a word-alignement It uses only one byte. Syntax : IE_NOP IE_SETFONT : Set current the font Syntax : IE_SETFONT,[font] IE_SAVEFONT : Save the font Syntax : IE_SAVEFONT IE_RESTOREFONT : Restore the saved font Syntax : IE_RESTOREFONT IE_STRING : Draw a string, using the current font Syntax : IE_STRING,[x],[y],[0-terminated string] IE_STRINGADDR : Draw a string, giving in parameter its address Be careful : the address of the string must be word aligned (using IE_NOP before IE_STRINGADDR) else you will get an address error. Syntax : IE_STRINGADDR,[x],[y],[address of string] IE_CHAR : Draw a char, using the current font Syntax : IE_CHAR,[x],[y],[char] IE_WIN : Draw a normal window Syntax : IE_WIN,[x1],[y1],[x2],[y2],[0-termined string] IE_WIN2 : Draw an advanced window Syntax : IE_WIN2,[x1],[y1],[x2],[y2],[0-termined string] IE_ANIMEDWIN : Draw a normal animed window Syntax : IE_ANIMEDWIN,[speed value],[x1],[y1],[x2] [y2],[0-termined string] IE_ANIMEDWIN2 : Draw an advanced animed window Syntax : IE_ANIMEDWIN2,[speed value],[x1],[y1],[x2] [y2],[0-termined string] IE_SOLIDRECT : Draw a framed solid rectangle Syntax : IE_SOLIDRECT,[x1],[y1],[x2],[y2] IE_INVERTAREA : Invert a part of the screen Syntax : IE_INVERTAREA,[x],[y],[width],[height] IE_CLRSCR : Clear the screen Syntax : CLR_SCR IE_WAITKEY : Wait for a key hit from the user IV. Examples ------------ The Interface Engine is very often used in the examples of this SDK. It is really a powerful tool. You will find it slctfil2 and slctfil3 for example, and in other examples, specially in graphics\iengine.asm. V. Conclusion ------------- The Interface Engine is a tool that can be used in a lot of programs. It makes them really smaller, since the buffer used is a buffer of bytes, and you have only one library function to call. If you have any suggestion, comments (like functions to add to the Interface Engine), don't hesitate ! mail me at : p.c.scherrer@wanadoo.fr Ibrahim - Benoit SCHERRER NeXO Software