home *** CD-ROM | disk | FTP | other *** search
- /*-------------------------- Parallax Standard H_File ----------------------------
-
- H_File : inapiobj.h
-
- Scope : Windows
-
- Purpose : Header file for the API
-
-
- --------------------------------------------------------------------------------
- Copyright (c)1996 Parallax Software , All rights reserved.
- ------------------------------------------------------------------------------*/
-
- #ifndef INC_INAPIOBJ
- #define INC_INAPIOBJ
-
-
-
- /* Types of objects that are accessable through the API
- * NOTE: These are different than the IN_TOOL_* values in INAPIDEF.H
- */
- #define IN_OBJECT_TYPE USHORT
- typedef IN_OBJECT_TYPE FAR *IN_OBJECT_TYPE_PTR;
- #define IN_OBJTYPE_GROUP 1
- #define IN_OBJTYPE_ARC 2
- #define IN_OBJTYPE_LINE 3
- #define IN_OBJTYPE_POLYLINE 4
- #define IN_OBJTYPE_POLYGON 5
- #define IN_OBJTYPE_TEXT 6
- #define IN_OBJTYPE_ELLIPSE 7
- #define IN_OBJTYPE_CIRCLE 8
- #define IN_OBJTYPE_BOX 9
- #define IN_OBJTYPE_HIGHLIGHT_BOX 10
- #define IN_OBJTYPE_ANNOTATION 11
-
-
-
- /* Object flags (ORed together) */
- #define IN_OBJFLAG_MODIFIED 0x0001
- #define IN_OBJFLAG_DELETED 0x0002
- #define IN_OBJFLAG_NEW 0x0004
- #define IN_OBJFLAG_SELECTED 0x0008
- #define IN_OBJFLAG_VISIBLE 0x0010
-
-
-
- /* Units that are acceptable (see INAPIDEF.H for unit types) */
- #define IN_UNITS USHORT
- typedef IN_UNITS FAR *IN_UNITS_PTR;
-
-
-
- /* Measurements are made up of units and a value */
- typedef struct tagApiMeasurement {
- IN_UNITS units;
- DOUBLE value;
- } IN_MEASUREMENT, FAR *IN_MEASUREMENT_PTR;
-
-
-
- /* Color is an RGB long unsigned integer in the format 0x00RRGGBB */
- #define IN_RGB ULONG
- typedef IN_RGB FAR *IN_RGB_PTR;
- #define IN_ColorsToRGB(r,g,b) ((IN_RGB) ((((IN_RGB)(r)) << 16) | (((IN_RGB)(g)) << 8) | ((IN_RGB)(b))))
- #define IN_GetRed(rgb) ((USHORT) (((rgb) >> 16) & 0xFF))
- #define IN_GetGreen(rgb) ((USHORT) (((rgb) >> 8) & 0xFF))
- #define IN_GetBlue(rgb) ((USHORT) ((rgb) & 0xFF))
-
-
-
- /* Line style that are available. If the number is not from the list below,
- * then it is a custom-defined line style
- */
- #define IN_LINESTYLE USHORT
- typedef IN_LINESTYLE FAR *IN_LINESTYLE_PTR;
- #define IN_LINE_SOLID 1
- #define IN_LINE_DASH 2
- #define IN_LINE_DOT 3
- #define IN_LINE_NULL 4 /* Invisible */
-
-
-
- /* Fill styles */
- #define IN_FILLSTYLE USHORT
- typedef IN_FILLSTYLE FAR *IN_FILLSTYLE_PTR;
- #define IN_FILL_TRANSPARENT 1
- #define IN_FILL_OPAQUE 2
- #define IN_FILL_ERASE 3
- #define IN_FILL_TRANSLUCENT 4
- #define IN_FILL_HATCH 5
- #define IN_FILL_SKETCH 6
-
-
-
- /* Join styles */
- #define IN_JOINSTYLE USHORT
- typedef IN_JOINSTYLE FAR *IN_JOINSTYLE_PTR;
- #define IN_JOIN_ROUND 1
- #define IN_JOIN_MITER 2
-
-
-
- /* Polygon fill modes */
- #define IN_POLYFILLMODE USHORT
- typedef IN_POLYFILLMODE FAR *IN_POLYFILLMODE_PTR;
- #define IN_POLYFILL_WINDING 1
- #define IN_POLYFILL_ALTERNATE 2
-
-
-
- /* Curve styles */
- #define IN_CURVESTYLE USHORT
- typedef IN_CURVESTYLE FAR *IN_CURVESTYLE_PTR;
- #define IN_CURVE_NONE 1
- #define IN_CURVE_BSPLINE 2
-
-
-
- /* Raster operations control how the object is placed on the layer */
- #define IN_RASTEROP USHORT
- typedef IN_RASTEROP FAR *IN_RASTEROP_PTR;
- #define IN_ROP_OPAQUE 1
- #define IN_ROP_TRANSLUCENT 2
- #define IN_ROP_SKETCH 3
-
-
-
- /* Cap styles appear at the ends of lines */
- #define IN_CAPSTYLE USHORT
- typedef IN_CAPSTYLE FAR *IN_CAPSTYLE_PTR;
- #define IN_CAP_ROUND 1
- #define IN_CAP_SQUARE 2
-
-
-
- /* Typefaces for text */
- #define IN_TYPEFACE USHORT
- typedef IN_TYPEFACE FAR *IN_TYPEFACE_PTR;
- #define IN_TYPEFACE_NORMAL 1
- #define IN_TYPEFACE_BOLD 2
- #define IN_TYPEFACE_FINE 3
- #define IN_TYPEFACE_ITALIC 0x10 /* This can be ORed in */
- #define IN_TYPEFACE_UNDERLINE 0x20 /* This can be ORed in */
- #define IN_TYPEFACE_STRIKEOUT 0x40 /* This can be ORed in */
-
-
-
- /* Text justification */
- #define IN_JUSTIFICATION USHORT
- typedef IN_JUSTIFICATION FAR *IN_JUSTIFICATION_PTR;
- #define IN_JUST_LEFT 1
- #define IN_JUST_CENTER 2
- #define IN_JUST_RIGHT 3
- #define IN_JUST_ALIGNED 4
- #define IN_JUST_MIDDLEH 5
- #define IN_JUST_FIT 6
- #define IN_JUST_BASELINE 0x00 /* This can be ORed in */
- #define IN_JUST_BOTTOM 0x10 /* This can be ORed in */
- #define IN_JUST_TOP 0x20 /* This can be ORed in */
- #define IN_JUST_MIDDLEV 0x30 /* This can be ORed in */
-
-
-
- /* Mirroring definitions */
- #define IN_MIRROR USHORT
- typedef IN_MIRROR FAR *IN_MIRROR_PTR;
- #define IN_MIRROR_NONE 1
- #define IN_MIRROR_HORIZONTAL 2
- #define IN_MIRROR_VERTICAL 3
-
-
-
- /* Angle definition (in degrees) */
- #define IN_ANGLE DOUBLE
- typedef IN_ANGLE FAR *IN_ANGLE_PTR;
-
-
-
- /* Styles for dimensions */
- #define IN_DIMSTYLE USHORT
- typedef IN_DIMSTYLE FAR *IN_DIMSTYLE_PTR;
- #define IN_DIM_LINEAR_EXT 1
- #define IN_DIM_LINEAR_INT 2
- #define IN_DIM_LEADER_TXT 3
-
-
-
- /* Group flags */
- #define IN_GROUPFLAGS USHORT
- typedef IN_GROUPFLAGS FAR *IN_GROUPFLAGS_PTR;
- #define IN_GROUP_UNBINDABLE 0x0001
- #define IN_GROUP_MOVEABLE 0x0002
- #define IN_GROUP_SCALEABLE 0x0004
-
-
-
- /* Dimension orientations */
- #define IN_DIM_ORIENTATION USHORT
- typedef IN_DIM_ORIENTATION FAR *IN_DIM_ORIENTATION_PTR;
- #define IN_DIM_HORIZONTAL 1
- #define IN_DIM_VERTICAL 2
- #define IN_DIM_ROTATED 3
-
-
-
- /* Icon sizes for annotations */
- #define IN_ICON_SIZE USHORT
- typedef IN_ICON_SIZE FAR *IN_ICON_SIZE_PTR;
- #define IN_ICON_LARGE 1
- #define IN_ICON_MEDIUM 2
- #define IN_ICON_SMALL 3
- #define IN_ICON_AUTO 4
-
-
-
- /* Annotation types */
- #define IN_ANNOTATION_TYPE USHORT
- typedef IN_ANNOTATION_TYPE FAR *IN_ANNOTATION_TYPE_PTR;
- #define IN_ANNOTYPE_ANNOTATION 1
- #define IN_ANNOTYPE_HOTSPOT 2
-
-
-
- /* This structure appears at the head of all API objects */
- typedef struct tagApiObjectHeader {
- IN_OBJECT_TYPE objectType;
- USHORT version;
- USHORT size;
- USHORT flags;
- ULONG objectID;
- ULONG parentID;
- } IN_OBJECT_HEADER, FAR *IN_OBJECT_HEADER_PTR;
-
-
-
- /* Points are two doubles with implied units of inches */
- typedef struct tagApiPoint {
- DOUBLE x;
- DOUBLE y;
- } IN_POINT, FAR *IN_POINT_PTR;
-
-
-
- /* IN_V1_LINE_PARMS: Version 1 definition
- */
- typedef struct tagApiLineParmsV1 {
- IN_MEASUREMENT thickness;
- IN_RGB lineColor;
- IN_LINESTYLE lineStyle;
- IN_RASTEROP rasterOp;
- IN_CAPSTYLE capStyle;
- } IN_V1_LINE_PARMS, FAR *IN_V1_LINE_PARMS_PTR;
-
-
-
- /* IN_V1_ARC_PARMS: Version 1 definition
- */
- typedef struct tagApiArcParmsV1 {
- IN_MEASUREMENT thickness;
- IN_RGB lineColor;
- IN_LINESTYLE lineStyle;
- IN_RASTEROP rasterOp;
- IN_CAPSTYLE capStyle;
- } IN_V1_ARC_PARMS, FAR *IN_V1_ARC_PARMS_PTR;
-
-
-
- /* IN_V1_ARROW_PARMS: Version 1 definition
- */
- typedef struct tagApiArrowParmsV1 {
- IN_MEASUREMENT thickness;
- IN_MEASUREMENT arrowHeadSize;
- IN_RGB lineColor;
- IN_LINESTYLE lineStyle;
- IN_RASTEROP rasterOp;
- IN_CAPSTYLE capStyle;
- IN_BOOL arrowsProp;
- IN_BOOL arrowsSolid;
- IN_BOOL arrowsDualHeaded;
- } IN_V1_ARROW_PARMS, FAR *IN_V1_ARROW_PARMS_PTR;
-
-
-
- /* IN_V1_POLYLINE_PARMS: Version 1 definition
- */
- typedef struct tagApiPolylineParmsV1 {
- IN_MEASUREMENT thickness;
- IN_RGB lineColor;
- IN_LINESTYLE lineStyle;
- IN_RASTEROP rasterOp;
- IN_CAPSTYLE capStyle;
- IN_JOINSTYLE joinStyle;
- } IN_V1_POLYLINE_PARMS, FAR *IN_V1_POLYLINE_PARMS_PTR;
-
-
-
- /* IN_V1_ELLIPSE_PARMS: Version 1 definition
- */
- typedef struct tagApiEllipseParmsV1 {
- IN_MEASUREMENT thickness;
- IN_RGB lineColor;
- IN_RGB fillColor;
- IN_LINESTYLE lineStyle;
- IN_FILLSTYLE fillStyle;
- IN_ANGLE rotation;
- } IN_V1_ELLIPSE_PARMS, FAR *IN_V1_ELLIPSE_PARMS_PTR;
-
-
-
- /* IN_V1_POLYGON_PARMS: Version 1 definition
- */
- typedef struct tagApiPolygonParmsV1 {
- IN_MEASUREMENT thickness;
- IN_RGB lineColor;
- IN_RGB fillColor;
- IN_LINESTYLE lineStyle;
- IN_FILLSTYLE fillStyle;
- IN_JOINSTYLE joinStyle;
- IN_POLYFILLMODE polyFillMode;
- IN_CURVESTYLE curveStyle;
- } IN_V1_POLYGON_PARMS, FAR *IN_V1_POLYGON_PARMS_PTR;
-
-
-
- /* IN_V1_AREA_PARMS: Version 1 definition
- */
- typedef struct tagApiAreaParmsV1 {
- IN_OBJECT_TYPE objectType;
- IN_V1_POLYGON_PARMS fillParms;
- } IN_V1_AREA_PARMS, FAR *IN_V1_AREA_PARMS_PTR;
-
-
-
- /* IN_V1_ICON_PARMS: Version 1 definition
- */
- typedef struct tagApiIconParmsV1 {
- USHORT iconIndex;
- } IN_V1_ICON_PARMS, FAR *IN_V1_ICON_PARMS_PTR;
-
-
-
- /* IN_V1_SYMBOL_PARMS: Version 1 definition
- */
- typedef struct tagApiSymbolParmsV1 {
- char symbolFilename[256];
- } IN_V1_SYMBOL_PARMS, FAR *IN_V1_SYMBOL_PARMS_PTR;
-
-
-
- /* IN_V1_TEXT_PARMS: Version 1 definition
- */
- typedef struct tagApiTextParmsV1 {
- IN_RGB color;
- IN_TYPEFACE typeface;
- char fontName[82];
- IN_MEASUREMENT height;
- IN_MEASUREMENT width;
- IN_ANGLE rotation;
- IN_JUSTIFICATION justification;
- IN_MIRROR mirror;
- IN_ANGLE orientation;
- IN_ANGLE shear;
- } IN_V1_TEXT_PARMS, FAR *IN_V1_TEXT_PARMS_PTR;
-
-
-
- /* IN_V1_ANNOTATION_PARMS: Version 1 definition
- */
- typedef struct tagApiAnnotationParmsV1 {
- IN_RGB color;
- IN_TYPEFACE typeface;
- char fontName[82];
- IN_MEASUREMENT height;
- IN_MEASUREMENT width;
- IN_ANGLE rotation;
- IN_JUSTIFICATION justification;
- IN_MIRROR mirror;
- IN_BOOL iconized;
- IN_BOOL centered;
- IN_ANGLE orientation;
- IN_ANGLE shear;
- USHORT iconNumber;
- IN_ICON_SIZE iconSize;
- } IN_V1_ANNOTATION_PARMS, FAR *IN_V1_ANNOTATION_PARMS_PTR;
-
-
-
- /* IN_V1_HOTSPOT_PARMS: Version 1 definition
- */
- typedef struct tagApiHotspotParmsV1 {
- IN_V1_AREA_PARMS areaParms;
- IN_V1_ICON_PARMS iconParms;
- } IN_V1_HOTSPOT_PARMS, FAR *IN_V1_HOTSPOT_PARMS_PTR;
-
-
-
- /* IN_V1_DIMENSION_PARMS: Version 1 definition
- */
- typedef struct tagApiDimensionParmsV1 {
- IN_MEASUREMENT thickness;
- IN_MEASUREMENT arrowHeadSize;
- IN_RGB color;
- IN_LINESTYLE lineStyle;
- IN_RASTEROP rasterOp;
- IN_CAPSTYLE capStyle;
- IN_BOOL arrowsProp;
- IN_BOOL arrowsSolid;
- IN_BOOL arrowsDualHeaded;
- IN_JUSTIFICATION justification;
- IN_MIRROR mirror;
- IN_TYPEFACE typeface;
- char fontName[82];
- IN_MEASUREMENT height;
- IN_MEASUREMENT width;
- IN_ANGLE rotation;
- IN_DIMSTYLE dimensionStyle;
- } IN_V1_DIMENSION_PARMS, FAR *IN_V1_DIMENSION_PARMS_PTR;
-
-
-
- /* IN_V1_GROUP_OBJECT: Version 1 definition
- *
- * NOTE: The groupId[] string is dynamically allocated based on
- * the group identifier
- *
- * This structure is used for the following object types:
- * IN_OBJTYPE_GROUP
- */
- typedef struct tagApiGroupObjectV1 {
- IN_OBJECT_HEADER header;
- IN_GROUPFLAGS flags;
- char groupId[1];
- } IN_V1_GROUP_OBJECT, FAR *IN_V1_GROUP_OBJECT_PTR;
-
-
-
- /* IN_V1_LINE_OBJECT: Version 1 definition
- *
- * This structure is used for the following object types:
- * IN_OBJTYPE_LINE
- */
- typedef struct tagApiLineObjectV1 {
- IN_OBJECT_HEADER header;
- IN_V1_LINE_PARMS parms;
- IN_POINT points[2];
- } IN_V1_LINE_OBJECT, FAR *IN_V1_LINE_OBJECT_PTR;
-
-
-
- /* IN_V1_ARC_OBJECT: Version 1 definition
- *
- * This structure is used for the following object types:
- * IN_OBJTYPE_ARC
- */
- typedef struct tagApiArcObjectV1 {
- IN_OBJECT_HEADER header;
- IN_V1_ARC_PARMS parms;
- IN_ANGLE startAngle;
- IN_ANGLE endAngle;
- IN_POINT points[2];
- } IN_V1_ARC_OBJECT, FAR *IN_V1_ARC_OBJECT_PTR;
-
-
-
- /* IN_V1_ELLIPSE_OBJECT: Version 1 definition
- *
- * This structure is used for the following object types:
- * IN_OBJTYPE_ELLIPSE
- */
- typedef struct tagApiEllipseObjectV1 {
- IN_OBJECT_HEADER header;
- IN_V1_ELLIPSE_PARMS parms;
- IN_POINT points[2];
- } IN_V1_ELLIPSE_OBJECT, FAR *IN_V1_ELLIPSE_OBJECT_PTR;
-
-
-
- /* IN_V1_ARROW_OBJECT: Version 1 definition
- *
- * This structure is used for the following object types:
- * IN_OBJTYPE_ARROW
- */
- typedef struct tagApiArrowObjectV1 {
- IN_OBJECT_HEADER header;
- IN_V1_ARROW_PARMS parms;
- IN_POINT points[6];
- } IN_V1_ARROW_OBJECT, FAR *IN_V1_ARROW_OBJECT_PTR;
-
-
-
- /* IN_V1_POLYLINE_OBJECT: Version 1 definition
- *
- * NOTE: The points[] array is dynamically allocated based on
- * the number of points in the object
- *
- * This structure is used for the following object types:
- * IN_OBJTYPE_POLYLINE
- */
- typedef struct tagApiPolylineObjectV1 {
- IN_OBJECT_HEADER header;
- IN_V1_POLYLINE_PARMS parms;
- USHORT pointCount;
- IN_POINT points[1];
- } IN_V1_POLYLINE_OBJECT, FAR *IN_V1_POLYLINE_OBJECT_PTR;
-
-
-
- /* IN_V1_POLYGON_OBJECT: Version 1 definition
- *
- * NOTE: The points[] array is dynamically allocated based on
- * the number of points in the object
- *
- * This structure is used for the following object types:
- * IN_OBJTYPE_POLYLINE
- */
- typedef struct tagApiPolygonObjectV1 {
- IN_OBJECT_HEADER header;
- IN_V1_POLYGON_PARMS parms;
- USHORT pointCount;
- IN_POINT points[1];
- } IN_V1_POLYGON_OBJECT, FAR *IN_V1_POLYGON_OBJECT_PTR;
-
-
-
- /* IN_V1_TEXT_OBJECT: Version 1 definition
- *
- * NOTE: The str[] array is dynamically allocated based on
- * the number of characters in the text
- *
- * This structure is used for the following object types:
- * IN_OBJTYPE_TEXT
- */
- typedef struct tagApiTextObjectV1 {
- IN_OBJECT_HEADER header;
- IN_V1_TEXT_PARMS parms;
- IN_POINT point;
- char str[1];
- } IN_V1_TEXT_OBJECT, FAR *IN_V1_TEXT_OBJECT_PTR;
-
-
-
- /* IN_V1_ANNOTATION_OBJECT: Version 1 definition
- *
- * NOTE: The str[] array is dynamically allocated based on
- * the number of characters in the text
- *
- * This structure is used for the following object types:
- * IN_OBJTYPE_ANNOTATION
- */
- typedef struct tagApiAnnotationObjectV1 {
- IN_OBJECT_HEADER header;
- IN_V1_ANNOTATION_PARMS parms;
- IN_POINT point;
- IN_ANNOTATION_TYPE type;
- char str[1];
- } IN_V1_ANNOTATION_OBJECT, FAR *IN_V1_ANNOTATION_OBJECT_PTR;
-
-
-
- /* IN_V1_HOTSPOT_OBJECT: Version 1 definition
- *
- * NOTE: The data[] array is dynamically allocated based on
- * the number of bytes of data
- *
- * This structure is used for the following object types:
- * IN_OBJTYPE_HOTSPOT
- */
- typedef struct tagApiHotspotObjectV1 {
- IN_OBJECT_HEADER header;
- IN_V1_HOTSPOT_PARMS parms;
- ULONG dataSize;
- char data[1];
- } IN_V1_HOTSPOT_OBJECT, FAR *IN_V1_HOTSPOT_OBJECT_PTR;
-
-
-
- /* IN_V1_ICON_OBJECT: Version 1 definition
- *
- * This structure is used for the following object types:
- * IN_OBJTYPE_ICON
- */
- typedef struct tagApiIconObjectV1 {
- IN_OBJECT_HEADER header;
- IN_V1_ICON_PARMS parms;
- IN_POINT point;
- } IN_V1_ICON_OBJECT, FAR *IN_V1_ICON_OBJECT_PTR;
-
-
-
- /* IN_V1_DIMENSION_OBJECT: Version 1 definition
- *
- * This structure is used for the following object types:
- * IN_OBJTYPE_DIMENSION
- */
- typedef struct tagApiDimensionObjectV1 {
- IN_OBJECT_HEADER header;
- IN_V1_DIMENSION_PARMS parms;
- IN_DIM_ORIENTATION orientation;
- IN_POINT points[3];
- } IN_V1_DIMENSION_OBJECT, FAR *IN_V1_DIMENSION_OBJECT_PTR;
-
-
- #endif
-
-
- /* INAPIOBJ.H */
- /* end of file */
-
-