EGL - User Manual

xiaoxiao2021-03-06  61

GEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEGG GG EASY GRAPHICS LIBRARY FUNCTIONS User's Manual GG GGEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEG

Basic function

///Key.incint getKey () accepts the input return value of the keyboard: if it is a normal ASCII code, return directly; if it is an extended ASCII code, return the expansion code * 100 basic code. INT GETSTATUSKEY (INT CMD) Judging the trigger status of Ctrl, Alt, SHIFT button If the specified key is pressed, return the true specified key CMD includes: r_shift l_shift ctrl alt kbhit () determines whether there is a keyboard in the keyboard has been pressed There is data in the buffer, then returns to directly read the keyboard buffer, to replace TC-supplied button judgment KBHIS mode KBHIT () Void ClearKeyBuffer () Clear keyboard buffer adopts direct access Keyboard buffer mode

Mouse.incvoid Pascal Set_Event_Handler ()) Sets the Mouse Driver Response Function CALL_MASK: Mask of Mouse Event Request, Location Response Function The address location is written, compiled into the target code Void Near Event_Processor (int event_status, int _status, int x, int y) Mouse Event Process Function is called by the mouse event response function, interprets the passed event mask as a variable form int reset_mouse (void) reset mouse driver or detects the mouse presence For example, the mouse does not exist, returns the mouse counter to -1 position as the screen center mouse event response function is the air cursor shape for the default shape cursor void mouse_off (void) Show VOID MOUSE_ON (VOID) Open the cursor Void Mouse_Shape INT Shape [32], INT HotX, INTY) Change the shape cursor of the cursor is a 16 * 16 point matrix map, the first 16 elements are shape code, and the post 16 element must turn off the cursor before the mask change, otherwise The background will destroy the background shape shape mask, hotX, hoty cursor hotspot void set_mouse_position (int x, int y) Move cursor to new position int GET_DOUBLE_PRESS (VOID) Double click if you create double-click event, return true attention: call *** Double-click on the condition *** is for the left button, only the hit button is checked. Double-click when the left mouse button is not double-click, this time is a click event: After each call, you must call a click, Otherwise it is possible to lose key-strike status if (lbutton_down) {if (get_double_press ()) ... Double-click on how Else ... Click How LButton_Down = 0} Void Installevent (Void) Install the Mouse Event Response Function to use message notification, Effective method void reset_event_status (void) is provided with a non-query to access the mouser status: mouse_moved = 0; lbutton_down = 0; lbutton_up = 0; RBUT TON_UP = 0; bstate = 0; Void set_mousex (int minx, int maxx) Sets the extreme value Void set_mousey (int min, int maxy) in the cursor position X direction Sets the value of the cursor position Y direction

/////Xms.inchar * XMS_2_BASEMEM_Buffer The pointer INT XMS_INIT () expansion memory server initialization detection himem.sys exists in the expansive memory and basic memory buffer allocation of the memory and basic memory buffers. Himem.sys is not loaded, or cannot allocate buffers, return fake int end_xms () End the expansion memory service, such as the extended memory service in the program, before the program exits, end the expansion memory service program INT XMS_Free (int xms_handle) release by the handle Excoucharge Memory XMS_Handle: The expansion memory block handle is not successfully released to the extended memory block, return fake int XMS_MOVEDATA (STRUCT XMS_MOVE * M) Transfer data between expansion memory and basic memory to return to the fake XMS_Move structure definition as follows: Struct XMS_MOVE {long Byte_count; / * How many bytes are transferred each time * / unsigned source_handle; / * Source section handle * / long source_offset; / * Source area offset * / unsigned destination_handle; / * Destination area handle * / long destination_offset ; / * Destination zone offset * /}; int XMS_Malloc (unsigned MEMKB) Assigning the expansion memory allocation to successfully return the handle, allocate the failure to return the fake MEMKB required to expand memory capacity, with KB-based Void XMS_Interface (Union Regs * INREGS, UNION Regs * outregs) Provides an interface function of the extended memory service / / / / d /. ccvoid initTimer () initializes the entire delay system function Modify the clock interrupt 0x08, so this function can only be called once in the program, try not to modify the clock interrupt. Endtimer must be called before the end of the program, to restore 0x08 Interrupt INT CreateTimer (int Dida, unsigned int id) Creating a request delay request, if the application is successful, return false; reason as an example array is full DIDA: Total number ID: This example ID, ID is a positive integer, used to identify different example INT CheckTimeout (unsigned Int i d) Determine whether or not the specified ID is delayed, return to the true, indicating that the delay is not arriving, or the specified ID error void delay (int DIDA) is used to replace the DELAY function, so that different models Delayed DIDA: Specified delay unit, pay attention to a decrease: When the required titer is small, it is possible to generate delays less than required, which is a deficiencies inherent in the clock interruption. When the drop is required, this situation may ignore the example of the VOID RELESetIMer (INT ID) to release the specified ID. When the required example is not used, it should be released to save resource void endtimer () end the delay service, restore the system status After the delay is completed, it should be called, otherwise the system may crash after the program is exited.

转载请注明原文地址:https://www.9cbs.com/read-88737.html

New Post(0)