home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BUG 15
/
BUGCD1998_06.ISO
/
aplic
/
felixcad
/
fcaddata.z
/
FDT_HOOK.H
< prev
next >
Wrap
C/C++ Source or Header
|
1997-11-13
|
4KB
|
120 lines
/****************************************************************************
(C) FELIX Computer Aided Technologies GmbH 1995-96
Module: Hook functions: data types, structures and functions
File: fdt_hook.h
Author: R. Nuernberger
Created: Oct. 18, 1994
Changed:
****************************************************************************/
/* Data types / Prototypes for FDT */
/* Byte Alignment 2 */
#pragma pack(2)
#ifdef _WIN32
#define FDT_DLLEXPORT __declspec(dllexport)
#define EXPORT
#else
#define FDT_DLLEXPORT
#define EXPORT __far __pascal __export
#endif
typedef struct fdt_Vport_Ext_Info_Tag {
HWND hWnd; /* Window Handle */
HDC hDc; /* Device Context Handle of the window */
fdt_matrix MatWcsToVcs; /* Transformation matrix WCS to VCS */
fdt_matrix MatVcsToWcs; /* Transformation matrix VCS to WCS */
fdt_point VportMin; /* min. X- and Y-Koordinate of the VPORT */
fdt_point VportMax; /* max. X- and Y-Koordinate of the VPORT */
int WinWidth; /* Width of the window in Pixel */
int WinHeight; /* Height of the window in Pixel */
HPALETTE hPalette; /* Handle color palette (for 256 colors only, otherwise NULL) */
} fdt_VPORT_EXT_INFO;
/* Reason parameters for Redraw-Hook-Function */
#define RH_REGEN_VPORT 0
#define RH_REDRAW_VPORT 1
#define RH_CLOSE_VPORT 2
#define RH_OPEN_VPORT 3
#define RH_REGEN_VWPENT 4
#define RH_REDRAW_VWPENT 5
#define RH_HIDE_VWPENT 6
/* Data type defintions for the print data structure PRINTREC */
#define PR_REQ_INIT 0
#define PR_REQ_POINT 1
#define PR_REQ_LINE 2
#define PR_REQ_AREA 3
#define PR_REQ_END 4
#define PR_REQ_VIEWPENT 5
/* Data type defintions for angels of rotation on printing */
#define PR_ROT_0 0
#define PR_ROT_90 1
#define PR_ROT_180 2
#define PR_ROT_270 3
#ifndef FDT_KERNEL
/* Data types for printing (in device units) */
typedef struct P_POINT{ // Pixel point
POINT Pnt;
}P_POINT;
typedef struct P_LINE{ // Line
POINT Pnt1;
POINT Pnt2;
}P_LINE;
typedef struct P_FILL_AREA{ // Filled area
short nPnts;
POINT *Pnts;
}P_FILL_AREA;
typedef struct { // Data structure for Print-Callback-Function
char Type; // Data type
short nColor; // FCAD color index
union {
P_LINE Line;
P_POINT Point;
P_FILL_AREA FillArea;
} Data;
}PRINTREC;
#endif
typedef struct fdt_Print_Ext_Info_Tag{
fdt_real LowLeCorn[2]; // Lower left corner of area to be printed (in VCS)
fdt_real UppRiCorn[2]; // Upper right corner of area to be printed (in VCS)
short DevWidth; // Width of the print area in device units
short DevHeight; // Height of the print area in device units
}PRINT_EXT_INFO;
#ifdef _WIN32
FDT_DLLEXPORT typedef int (WINAPI * PRINTHOOKPROC)(PRINTREC *);
FDT_DLLEXPORT typedef int (WINAPI * REDRAWHOOKPROC)(short, short, short, short);
#else
typedef int (EXPORT * PRINTHOOKPROC)(PRINTREC *);
typedef int (EXPORT * REDRAWHOOKPROC)(short, short, short, short);
#endif
FDT_DLLEXPORT int EXPORT fdt_SetRedrawHook(REDRAWHOOKPROC);
FDT_DLLEXPORT void EXPORT fdt_DelRedrawHook(void);
FDT_DLLEXPORT int EXPORT fdt_GetVportExtInfo(short, short, fdt_VPORT_EXT_INFO *);
FDT_DLLEXPORT short EXPORT fdt_SetPrintHook(PRINTHOOKPROC PrintHook);
FDT_DLLEXPORT void EXPORT fdt_DelPrintHook(void);
FDT_DLLEXPORT int EXPORT fdt_CallPrintCallBack(PRINTREC * PrintRec);
FDT_DLLEXPORT int EXPORT fdt_GetPrintExtInfo(PRINT_EXT_INFO *PrintExtInfo);
FDT_DLLEXPORT int EXPORT fdt_Vcs2PrinterPnt(fdt_real, fdt_real, int *, int *);
FDT_DLLEXPORT int EXPORT fdt_GetLastViewportEntId(void);
/* Reset Byte Alignment 2 */
#pragma pack()
/* end of file */