Command
Purpose Function: int QisLib_InitLib(const char* ProgramDir,const void* DisplayHandle, const void* AppContext); [Unix/Linux] int QisLib_InitLib(const char* ProgramDir); [Windows] Inputs: ProgramDir : See 'Notes #1' DisplayHandle (Display*) : NULL or a handle to the display object used by the program. [Unix/Linux only] AppContext (XtAppContext): NULL or a handle to the program's application context [Unix/Linux only] Return: success: 0 failure: one of the following values : Errors: -3: License Error. Use QisLib_GetErrorMsg to get the exact license string. -4: The file 'colfill.pat' does not exist in ProgramDir or cannot be opened. -5: Out of system resource, fill pattern bitmaps cannot be created. [Windows only] -6: The file 'gdsfont.shx' does not exist in ProgramDir or cannot be opened. Description: - This function initializes QisLib and should be called once, before any QisLib functionality is used. - No display mode: If DisplayHandle is NULL, QisLib is used to get vector data only, no image drawing functionality is permitted. Since QisLib uses the X server for drawing, if the system has no DISPLAY ($DISPLAY is undefined), no image drawing functionality in QisLib will work, DisplayHandle should be set to NULL in this case. If no display mode is on, various draw functions will do nothing. - If AppContext is not NULL, then QisLib_SetProcessEvents can be used to inform QisLib to process events during a busy loop. If this is NULL, QisLib_SetProcessEvents should not be used or else it will return an error. - For simple applications which don't have an application context, pass NULL for AppContext. - If the program does have an application context but does not want QisLib to process events during a busy loop, pass NULL for AppContext. Notes: 1) ProgramDir is the path of the directory that must contain the following files: 'acs.key', 'colfill.pat', 'gdsfont.shx' and 'libqis32.so [On Unix/Linux] or libqis64.so [On Unix/Linux] or qis.dll [On Windows]'.References: QisLib_GetErrorMsg QisLib_SetProcessEvents |