idedll.h

来自「开放源码的编译器open watcom 1.6.0版的源代码」· C头文件 代码 · 共 389 行 · 第 1/2 页

H
389
字号
        SymbolErr       symbol;
    };
} IDEMsgInfo2;


typedef struct {
    unsigned            ver;
    unsigned char       ignore_env;
    unsigned char       cmd_line_has_files;     //VERSION 2
    unsigned char       console_output;         //VERSION 3
    unsigned char       progress_messages;      //VERSION 4
    unsigned char       progress_index;         //VERSION 5
} IDEInitInfo;

typedef void IDEDataInfo;

typedef enum {
    IDE_READ
  , IDE_WRITE
} IDEIOOpts;

typedef unsigned        IDEInfoType;
#define IDE_GET_SOURCE_FILE     1
#define IDE_GET_TARGET_FILE     2
#define IDE_GET_OBJ_FILE        3
#define IDE_GET_LIB_FILE        4
#define IDE_GET_RES_FILE        5
#define IDE_GET_ENV_VAR         6
#define IDE_GET_AI              7

// character values passed in the code parameter of IDEJavaSrcDepFile
// callback function
#define IDE_DEP_FILETYPE_SOURCE         'S'
#define IDE_DEP_FILETYPE_TARGET         'T'
#define IDE_DEP_FILETYPE_DEP_CLS        'C'
#define IDE_DEP_FILETYPE_DEP_ZIP        'Z'

typedef unsigned long IDEGetInfoWParam;
typedef unsigned long IDEGetInfoLParam;

typedef IDEBool __stdcall (*IDERunBatchFn)( IDECBHdl hdl, const char *cmdline,
                                BatchFilter cb, void *cookie );
typedef IDEBool __stdcall (*IDEPrintMsgFn)( IDECBHdl hdl, const char *message );
typedef IDEBool __stdcall (*IDEGetInfoFn)( IDECBHdl hdl, IDEInfoType type,
                                IDEGetInfoWParam wparam, IDEGetInfoLParam lparam );
typedef IDEBool __stdcall (*IDEMsgInfoFn)( IDECBHdl hdl, IDEMsgInfo *info );
typedef IDEBool __stdcall (*IDERunDllFn)( IDECBHdl hdl, const char *dllname,
                                const char *cmdline, BatchDllFilter cb,
                                void *cookie );
typedef IDEBool __stdcall (*IDERunBatchCwdFn)( IDECBHdl hdl,
                                const char *cmdline, const char *cwd,
                                BatchFilter cb, void *cookie );
typedef IDEBool __stdcall (*IDEOpenJavaSource)( IDECBHdl hdl, const char *name, IDEIOOpts opt, IDEDataInfo **info );
typedef IDEBool __stdcall (*IDEOpenClassFile)( IDECBHdl hdl, const char *name, IDEIOOpts opt, IDEDataInfo **info );
typedef IDEBool __stdcall (*IDEPackageExists)( IDECBHdl hdl, const char *name );
typedef int     __stdcall (*IDEGetSize)( IDECBHdl hdl, IDEDataInfo *info );
typedef time_t  __stdcall (*IDEGetTimeStamp)( IDECBHdl hdl, IDEDataInfo *info );
typedef IDEBool __stdcall (*IDEIsReadOnly)( IDECBHdl hdl, IDEDataInfo *info );
typedef int     __stdcall (*IDEReadData)( IDECBHdl hdl, IDEDataInfo *info, char *buffer, int max_len );
typedef IDEBool __stdcall (*IDEClose)( IDECBHdl hdl, IDEDataInfo *info );
typedef size_t  __stdcall (*IDEReceiveOutput)( IDECBHdl hdl, IDEDataInfo *info, void const *buffer, size_t len );
typedef void    __stdcall (*IDEReceiveIndex)( IDECBHdl hdl, unsigned index /* 0-99 */ );

typedef IDEBool __stdcall (*IDEJavaSrcDepBegin)( IDECBHdl hdl );
//the values passed in the code parameter of the IDEJavaSrcDepFile are
//defined as the macros IDE_DEP_FILETYPE_...
typedef IDEBool __stdcall (*IDEJavaSrcDepFile)( IDECBHdl hdl, char code, char const *filename );
typedef IDEBool __stdcall (*IDEJavaSrcDepEnd)( IDECBHdl hdl );

// structure used by version 1 DLL's
typedef struct {
    // building functions
    IDERunBatchFn               RunBatch;
    IDEPrintMsgFn               PrintMessage;
    IDEPrintMsgFn               PrintWithCRLF;

    // Query functions
    IDEGetInfoFn                GetInfo;
} IDECallBacks1;

// structure used by current version DLL's
typedef struct {
    // building functions
    IDERunBatchFn               RunBatch;
    IDEPrintMsgFn               PrintMessage;
    IDEPrintMsgFn               PrintWithCRLF;
    IDEMsgInfoFn                PrintWithInfo;

    // Query functions
    IDEGetInfoFn                GetInfo;

    IDEPrintMsgFn               ProgressMessage;
    IDERunDllFn                 RunDll;         // may be NULL
    IDERunBatchCwdFn            RunBatchCWD;    // may be NULL
    IDEOpenJavaSource           OpenJavaSource; // may be NULL
    IDEOpenClassFile            OpenClassFile;  // may be NULL
    IDEPackageExists            PackageExists;  // may be NULL
    IDEGetSize                  GetSize;        // may be NULL
    IDEGetTimeStamp             GetTimeStamp;   // may be NULL
    IDEIsReadOnly               IsReadOnly;     // may be NULL
    IDEReadData                 ReadData;       // may be NULL
    IDEClose                    Close;          // may be NULL
    IDEReceiveOutput            ReceiveOutput;  // may be NULL

    IDEReceiveIndex             ProgressIndex;

    IDEJavaSrcDepBegin          SrcDepBegin;    // may be NULL (begin java src dependencies)
    IDEJavaSrcDepFile           SrcDepFile;     // (java src dependency file)
    IDEJavaSrcDepEnd            SrcDepEnd;      // (end java src dependendency)
} IDECallBacks;

/*********************************************************
 * Routines implemented by the DLL
 *********************************************************/
unsigned IDEDLL_EXPORT IDEGetVersion( void );
IDEBool IDEDLL_EXPORT IDEInitDLL( IDECBHdl hdl, IDECallBacks *cb, IDEDllHdl *info );
IDEBool IDEDLL_EXPORT IDEPassInitInfo( IDEDllHdl hdl, IDEInitInfo *info );
void IDEDLL_EXPORT IDEFiniDLL( IDEDllHdl hdl );
IDEBool IDEDLL_EXPORT IDEDetermineBuildStatus( IDEDllHdl hdl, const char *opts, IDEBool *status );
IDEBool IDEDLL_EXPORT IDERunYourSelf( IDEDllHdl hdl, const char *opts, IDEBool *fatalerr );
IDEBool IDEDLL_EXPORT IDERunYourSelfArgv( IDEDllHdl hdl, int argc, char **argv, IDEBool *fatalerr );
void IDEDLL_EXPORT IDEStopRunning( void );
void IDEDLL_EXPORT IDEFreeHeap( void );

/**********************************************************
 * Routines the DLL should use to fill in the Output Message
 * information structure
 **********************************************************/
void IdeMsgInit                 // INITIALIZE MSG STRUCTURE
    ( IDEMsgInfo *info          // - message information
    , IDEMsgSeverity severity   // - message severity
    , char const *msg )         // - the message
;
void IdeMsgSetHelp              // SET HELP INFORMATION
    ( IDEMsgInfo *info          // - message information
    , char const *file          // - help file
    , unsigned long id )        // - help id
;
void IdeMsgSetLnkFile           // SET LINK FILE
    ( IDEMsgInfo *info          // - message information
    , char const *file )        // - file name
;
void IdeMsgSetLnkSymbol         // SET LINK SYMBOL
    ( IDEMsgInfo *info          // - message information
    , char const *sym )         // - symbol
;
void IdeMsgSetMsgGroup          // SET MESSAGE GROUP
    ( IDEMsgInfo *info          // - message information
    , char const *group )       // - group name
;
void IdeMsgSetMsgNo             // SET MESSAGE NUMBER
    ( IDEMsgInfo *info          // - message information
    , unsigned msg_no )         // - message number
;
void IdeMsgSetReadable          // MARK MSG AS "READABLE"
    ( IDEMsgInfo *info )        // - message information
;
void IdeMsgSetSrcColumn         // SET SOURCE COLUMN
    ( IDEMsgInfo *info          // - message information
    , unsigned col )            // - column number
;
void IdeMsgSetSrcFile           // SET SOURCE FILE
    ( IDEMsgInfo *info          // - message information
    , char const *file )        // - file name
;
void IdeMsgSetSrcLine           // SET SOURCE LINE
    ( IDEMsgInfo *info          // - message information
    , unsigned line )           // - line number
;


/*****************************************************
 * Routines that can be used by drivers to format
 * messages from DLL's
 *****************************************************/
void IdeMsgFormat               // FORMAT A MESSAGE
    ( IDECBHdl handle           // - handle for requestor
    , IDEMsgInfo const *info    // - message information
    , char *buffer              // - buffer
    , unsigned bsize            // - buffer size
    , IDEMsgInfoFn displayer )  // - display function
;
void IdeMsgStartDll             // START OF FORMATING FOR A DLL (EACH TIME)
    ( void )
;

#pragma pack()

#ifdef __cplusplus
}
#endif

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?