Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

Writing an Win32API refence

For general discussion related FlowStone

Writing an Win32API refence

Postby JB_AU » Mon Nov 17, 2014 8:35 am

Writing a time consuming API reference guide in pdf, below is how each page will look, as this will take a long time as im only half way through gdi32, would some like to write the definitions & hopefully, we can build compatible libraries for flowstone ? Any takers ?

CreateDIBitmap
The CreateDIBitmap function creates a device-dependent bitmap (DDB) from a
device-independent bitmap (DIB) and, optionally, sets the bitmap bits.
HBITMAP CreateDIBitmap(
HDC hdc, // handle of device context
CONST BITMAPINFOHEADER * lpbmih, // address of bitmap size and format data
DWORD fdwInit, // initialization flag
CONST VOID *lpbInit, // address of initialization data
CONST BITMAPINFO * lpbmi, // address of bitmap color-format data
UINT fuUsage // color-data usage
);
Parameters
hdc
Identifies a device context.
lpbmih
Points to a BITMAPINFOHEADER structure.
If fdwInit is CBM_INIT, the function uses the BITMAPINFOHEADER structure to obtain the
desired width and height of the bitmap as well as other information. Note that a positive value
for the height indicates a bottom-up DIB while a negative value for the height indicates a
top-down DIB. This scenario is compatible with the CreateDIBitmap function.


CreateCompatibleDC.zip
Example PDF
(5.54 KiB) Downloaded 790 times
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

Albert Einstein
User avatar
JB_AU
 
Posts: 171
Joined: Tue May 21, 2013 11:01 pm

Re: Writing an Win32API refence

Postby JB_AU » Mon Nov 17, 2014 12:46 pm

Win32API is generally a subset of KERNEL32,GDI32,USER32 & COMCTL32 , yet through these there are constructs to DDE,MSVCRT,GDI+,GL,DDK & the list seems to be endless dependent on how the Ruby Win32API is set?
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

Albert Einstein
User avatar
JB_AU
 
Posts: 171
Joined: Tue May 21, 2013 11:01 pm

Re: Writing an Win32API refence

Postby Exo » Mon Nov 17, 2014 11:10 pm

Hi JB_AU, interesting.

What are the benefits to writing a reference guide? This is already covered by Microsoft documentation?

Wouldn't it make more sense to create a Ruby library first and then document that?
Flowstone Guru. Blog and download site for Flowstone.
Best VST Plugins. Initial Audio.
Exo
 
Posts: 426
Joined: Wed Aug 04, 2010 8:58 pm
Location: UK

Re: Writing an Win32API refence

Postby JB_AU » Tue Nov 18, 2014 3:29 am

Yes that is what i am doing now , because it was just too much.

Not all the ms reference/docs are accurate/uptodate/or missing lots of information.
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

Albert Einstein
User avatar
JB_AU
 
Posts: 171
Joined: Tue May 21, 2013 11:01 pm

Re: Writing an Win32API refence

Postby JB_AU » Thu Nov 20, 2014 10:07 am

Have written up as much as i know without help, if someone chimes in would be good, added 68 missing constants, trying to name thm all & describe them. Is a Long Pointer, L or P ? lpNAME ?

This where i am;

Code: Select all
# Binary Raster
R2_BLACK       = 0x0001          #   0
R2_NOTMERGEPEN       = 0x0002    #  DPon
R2_MASKNOTPEN       = 0x0003     #  DPna
R2_NOTCOPYPEN       = 0x0004     #  Pn
R2_MASKPENNOT       = 0x0005     #  PDna
R2_NOT          = 0x0006    #  Dn
R2_XORPEN       = 0x0007         #  DPx
R2_NOTMASKPEN       = 0x0008     #  DPan
R2_MASKPEN       = 0x0009        #  DPa
R2_NOTXORPEN       = 0x000A     #  DPxn
R2_NOP          = 0x000B        #  D
R2_MERGENOTPEN       = 0x000C        #  DPno
R2_COPYPEN       = 0x000D       #  P
R2_MERGEPENNOT       = 0x000E        #  PDno
R2_MERGEPEN       = 0x000F      #  DPo
R2_WHITE       = 0x0010      #   1

#     Ternary Raster
SRCCOPY       = 0x00CC0020       # (DWORD) dest = source
SRCPAINT       = 0x00EE0086           # (DWORD) dest = source OR dest
SRCAND          = 0x008800C6        # (DWORD) dest = source AND dest
SRCINVERT       = 0x00660046          # (DWORD) dest = source XOR dest
SRCERASE       = 0x00440328           # (DWORD) dest = source AND (NOT dest )
NOTSRCCOPY       = 0x00330008         # (DWORD) dest = (NOT source)
NOTSRCERASE       = 0x001100A6        # (DWORD) dest = (NOT src) AND (NOT dest)
MERGECOPY       = 0x00C000CA          # (DWORD) dest = (source AND pattern)
MERGEPAINT       = 0x00BB0226         # (DWORD) dest = (NOT source) OR dest
PATCOPY       = 0x00F00021       # (DWORD) dest = pattern
PATPAINT       = 0x00FB0A09           # (DWORD) dest = DPSnoo
PATINVERT       = 0x005A0049          # (DWORD) dest = pattern XOR dest
DSTINVERT       = 0x00550009          # (DWORD) dest = (NOT dest)
BLACKNESS       = 0x00000042       # (DWORD) dest = BLACK
WHITENESS       = 0x00FF0062          # (DWORD) dest = WHITE

# GDI Error
GDI_ERROR = 0xFFFF
HGDI_ERROR = 0xFFFF

# Region Flags
ERRORAPI = 0
NULLREGION = 1
SIMPLEREGION = 2
COMPLEXREGION = 3

# CombineRgn Styles
RGN_AND = 1
RGN_OR = 2
RGN_XOR = 3
RGN_DIFF = 4
RGN_COPY = 5
RGN_MIN = RGN_AND
RGN_MAX = RGN_COPY

# StretchBlt Modes
BLACKONWHITE = 1
WHITEONBLACK = 2
COLORONCOLOR = 3
HALFTONE = 4
MAXSTRETCHBLTMODE = 4

# PolyFill Modes
ALTERNATE = 1
WINDING = 2
POLYFILL_LAST = 2

# Text Alignment Options (GetTextAlign)
TA_NOUPDATECP = 0
TA_UPDATECP = 1
TA_LEFT = 0
TA_RIGHT = 2
TA_CENTER = 6
TA_TOP = 0
TA_BOTTOM = 8
TA_BASELINE = 24
TA_RTLREADING = 256
TA_MASK = (TA_BASELINE + TA_CENTER + TA_UPDATECP)
VTA_BASELINE = TA_BASELINE
VTA_LEFT = TA_BOTTOM
VTA_RIGHT = TA_TOP
VTA_CENTER = TA_CENTER
VTA_BOTTOM = TA_RIGHT
VTA_TOP = TA_LEFT

# ExtTextOut
ETO_GRAYED = 1
ETO_OPAQUE = 2
ETO_CLIPPED = 4
ETO_GLYPH_INDEX 0x0010
ETO_NUMERICSLATIN 0x0800
ETO_NUMERICSLOCAL 0x0400
ETO_RTLREADING 0x0080
ETO_IGNORELANGUAGE 0x1000
ETO_PDY 0x2000

ASPECT_FILTERING = 1

DCB_RESET = 0x1
DCB_ACCUMULATE = 0x2
DCB_DIRTY = DCB_ACCUMULATE
DCB_SET = (DCB_RESET Or DCB_ACCUMULATE)
DCB_ENABLE = 0x4
DCB_DISABLE = 0x8

# Metafile Functions
META_SETBKCOLOR = 0x201
META_SETBKMODE = 0x102
META_SETMAPMODE = 0x103
META_SETROP2 = 0x104
META_SETRELABS = 0x105
META_SETPOLYFILLMODE = 0x106
META_SETSTRETCHBLTMODE = 0x107
META_SETTEXTCHAREXTRA = 0x108
META_SETTEXTCOLOR = 0x209
META_SETTEXTJUSTIFICATION = 0x20A
META_SETWINDOWORG = 0x20B
META_SETWINDOWEXT = 0x20C
META_SETVIEWPORTORG = 0x20D
META_SETVIEWPORTEXT = 0x20E
META_OFFSETWINDOWORG = 0x20F
META_OFFSETVIEWPORTORG = 0x211
META_SCALEVIEWPORTEXT = 0x412
META_LINETO = 0x213
META_MOVETO = 0x214
META_SCALEWINDOWEXT = 0x410
META_EXCLUDECLIPRECT = 0x415
META_INTERSECTCLIPRECT = 0x416
META_ARC = 0x817
META_ELLIPSE = 0x418
META_FLOODFILL = 0x419
META_PIE = 0x81A
META_RECTANGLE = 0x41B
META_ROUNDRECT = 0x61C
META_PATBLT = 0x61D
META_SAVEDC = 0x1E
META_SETPIXEL = 0x41F
META_OFFSETCLIPRGN = 0x220
META_TEXTOUT = 0x521
META_BITBLT = 0x922
META_STRETCHBLT = 0xB23
META_POLYGON = 0x324
META_POLYLINE = 0x325
META_ESCAPE = 0x626
META_RESTOREDC = 0x127
META_FILLREGION = 0x228
META_FRAMEREGION = 0x429
META_INVERTREGION = 0x12A
META_PAINTREGION = 0x12B
META_SELECTCLIPREGION = 0x12C
META_SELECTOBJECT = 0x12D
META_SETTEXTALIGN = 0x12E
META_CHORD = 0x830
META_SETMAPPERFLAGS = 0x231
META_EXTTEXTOUT = 0xA32
META_SETDIBTODEV = 0xD33
META_SELECTPALETTE = 0x234
META_REALIZEPALETTE = 0x35
META_ANIMATEPALETTE = 0x436
META_SETPALENTRIES = 0x37
META_POLYPOLYGON = 0x538
META_RESIZEPALETTE = 0x139
META_DIBBITBLT = 0x940
META_DIBSTRETCHBLT = 0xB41
META_DIBCREATEPATTERNBRUSH = 0x142
META_STRETCHDIB = 0xF43
META_EXTFLOODFILL = 0x548
META_DELETEOBJECT = 0x1F0
META_CREATEPALETTE = 0xF7
META_CREATEPATTERNBRUSH = 0x1F9
META_CREATEPENINDIRECT = 0x2FA
META_CREATEFONTINDIRECT = 0x2FB
META_CREATEBRUSHINDIRECT = 0x2FC
META_CREATEREGION = 0x6FF


# GDI Escapes
NEWFRAME = 1
AbortDocC = 2
NEXTBAND = 3
SETCOLORTABLE = 4
GETCOLORTABLE = 5
FLUSHOUTPUT = 6
DRAFTMODE = 7
QUERYESCSUPPORT = 8
SETABORTPROC = 9
StartDocC = 10
EndDocC = 11
GETPHYSPAGESIZE = 12
GETPRINTINGOFFSET = 13
GETSCALINGFACTOR = 14
MFCOMMENT = 15
GETPENWIDTH = 16
SETCOPYCOUNT = 17
SELECTPAPERSOURCE = 18
DEVICEDATA = 19
PASSTHROUGH = 19
GETTECHNOLGY = 20
GETTECHNOLOGY = 20
SETLINECAP = 21
SETLINEJOIN = 22
SetMiterLimitC = 23
BANDINFO = 24
DRAWPATTERNRECT = 25
GETVECTORPENSIZE = 26
GETVECTORBRUSHSIZE = 27
ENABLEDUPLEX = 28
GETSETPAPERBINS = 29
GETSETPRINTORIENT = 30
ENUMPAPERBINS = 31
SETDIBSCALING = 32
EPSPRINTING = 33
ENUMPAPERMETRICS = 34
GETSETPAPERMETRICS = 35
POSTSCRIPT_DATA = 37
POSTSCRIPT_IGNORE = 38
MOUSETRAILS = 39
GETDEVICEUNITS = 42

GETEXTENDEDTEXTMETRICS = 256
GETEXTENTTABLE = 257
GETPAIRKERNTABLE = 258
GETTRACKKERNTABLE = 259
ExtTextOutC = 512
GETFACENAME = 513
DOWNLOADFACE = 514
ENABLERELATIVEWIDTHS = 768
ENABLEPAIRKERNING = 769
SETKERNTRACK = 770
SETALLJUSTVALUES = 771
SETCHARSET = 772

StretchBltC = 2048
GETSETSCREENPARAMS = 3072
BEGIN_PATH = 4096
CLIP_TO_PATH = 4097
END_PATH = 4098
ENDDOC = 11
EXT_DEVICE_CAPS = 4099
RESTORE_CTM = 4100
SAVE_CTM = 4101
SET_ARC_DIRECTION = 4102
SET_BACKGROUND_COLOR = 4103
SET_POLY_MODE = 4104
SET_SCREEN_ANGLE = 4105
SET_SPREAD = 4106
TRANSFORM_CTM = 4107
SET_CLIP_BOX = 4108
SET_BOUNDS = 4109
SET_MIRROR_MODE = 4110
OPENCHANNEL = 4110
DOWNLOADHEADER = 4111
CLOSECHANNEL = 4112
POSTSCRIPT_PASSTHROUGH = 4115
ENCAPSULATED_POSTSCRIPT = 4116

# Spooler Error Codes
SP_NOTREPORTED = 0x4000
SP_ERROR = (-1)
SP_APPABORT = (-2)
SP_USERABORT = (-3)
SP_OUTOFDISK = (-4)
SP_OUTOFMEMORY = (-5)

PR_JOBSTATUS = 0x0

#  Object EnumObjects()
OBJ_PEN = 1
OBJ_BRUSH = 2
OBJ_DC = 3
OBJ_METADC = 4
OBJ_PAL = 5
OBJ_FONT = 6
OBJ_BITMAP = 7
OBJ_REGION = 8
OBJ_METAFILE = 9
OBJ_MEMDC = 10
OBJ_EXTPEN = 11
OBJ_ENHMETADC = 12
OBJ_ENHMETAFILE = 13

#  xform stuff
MWT_IDENTITY = 1
MWT_LEFTMULTIPLY = 2
MWT_RIGHTMULTIPLY = 3
MWT_MIN = MWT_IDENTITY
MWT_MAX = MWT_RIGHTMULTIPLY


# BI-Compression
BI_RGB               = 0
BI_RLE8              = 1
BI_RLE4              = 2
BI_BITFIELDS         = 3
BI_JPEG              = 4
BI_PNG               = 5
BI_ALPHABITFIELDS    = 6


# Text Metric Flags
NTM_REGULAR       = 0x00000040
NTM_BOLD       = 0x00000020
NTM_ITALIC       = 0x00000001
NTM_DSIG      = 0x00200000
NTM_MULTIPLEMASTER   = 0x00080000
NTM_NONNEGATIVE_AC   = 0x00010000
NTM_PS_OPENTYPE      = 0x00020000
NTM_TT_OPENTYPE      = 0x00040000
NTM_TYPE1      = 0x00100000

#  tmPitchAndFamily flags
TMPF_FIXED_PITCH = 0x1
TMPF_VECTOR = 0x2
TMPF_DEVICE = 0x8
TMPF_TRUETYPE = 0x4



# Logical Font
LF_FACESIZE = 32
LF_FULLFACESIZE = 64

OUT_DEFAULT_PRECIS = 0
OUT_STRING_PRECIS = 1
OUT_CHARACTER_PRECIS = 2
OUT_STROKE_PRECIS = 3
OUT_TT_PRECIS = 4
OUT_DEVICE_PRECIS = 5
OUT_RASTER_PRECIS = 6
OUT_TT_ONLY_PRECIS = 7
OUT_OUTLINE_PRECIS = 8
OUT_PS_ONLY_PRECIS = 10

CLIP_DEFAULT_PRECIS = 0
CLIP_CHARACTER_PRECIS = 1
CLIP_STROKE_PRECIS = 2
CLIP_MASK = 15
CLIP_LH_ANGLES = 16
CLIP_TT_ALWAYS = 32
CLIP_EMBEDDED = 128

DEFAULT_QUALITY = 0
DRAFT_QUALITY = 1
PROOF_QUALITY = 2
NONANTIALIASED_QUALITY = 3
ANTIALIASED_QUALITY = 4
CLEARTYPE_QUALITY = 5

DEFAULT_PITCH = 0
FIXED_PITCH = 1
VARIABLE_PITCH = 2


# Font Families
FF_DONTCARE = 0       #  Don't care or don't know.
FF_ROMAN = 16         #  Variable stroke width, serifed.
         #  Times Roman, Century Schoolbook, etc.
FF_SWISS = 32         #  Variable stroke width, sans-serifed.
         #  Helvetica, Swiss, etc.
FF_MODERN = 48        #  Constant stroke width, serifed or sans-serifed.
         #  Pica, Elite, Courier, etc.
FF_SCRIPT = 64        #  Cursive, etc.
FF_DECORATIVE = 80    #  Old English, etc.

# Font Weights
FW_DONTCARE = 0
FW_THIN = 100
FW_EXTRALIGHT = 200
FW_LIGHT = 300
FW_NORMAL = 400
FW_MEDIUM = 500
FW_SEMIBOLD = 600
FW_BOLD = 700
FW_EXTRABOLD = 800
FW_HEAVY = 900
FW_ULTRALIGHT = FW_EXTRALIGHT
FW_REGULAR = FW_NORMAL
FW_DEMIBOLD = FW_SEMIBOLD
FW_ULTRABOLD = FW_EXTRABOLD
FW_BLACK = FW_HEAVY

PANOSE_COUNT = 10
PAN_FAMILYTYPE_INDEX = 0
PAN_SERIFSTYLE_INDEX = 1
PAN_WEIGHT_INDEX = 2
PAN_PROPORTION_INDEX = 3
PAN_CONTRAST_INDEX = 4
PAN_STROKEVARIATION_INDEX = 5
PAN_ARMSTYLE_INDEX = 6
PAN_LETTERFORM_INDEX = 7
PAN_MIDLINE_INDEX = 8
PAN_XHEIGHT_INDEX = 9
PAN_CULTURE_LATIN = 0


PAN_ANY = 0  #  Any
PAN_NO_FIT = 1  #  No Fit

PAN_FAMILY_TEXT_DISPLAY = 2  #  Text and Display
PAN_FAMILY_SCRIPT = 3  #  Script
PAN_FAMILY_DECORATIVE = 4  #  Decorative
PAN_FAMILY_PICTORIAL = 5  #  Pictorial

PAN_SERIF_COVE = 2  #  Cove
PAN_SERIF_OBTUSE_COVE = 3  #  Obtuse Cove
PAN_SERIF_SQUARE_COVE = 4  #  Square Cove
PAN_SERIF_OBTUSE_SQUARE_COVE = 5  #  Obtuse Square Cove
PAN_SERIF_SQUARE = 6  #  Square
PAN_SERIF_THIN = 7  #  Thin
PAN_SERIF_BONE = 8  #  Bone
PAN_SERIF_EXAGGERATED = 9  #  Exaggerated
PAN_SERIF_TRIANGLE = 10  #  Triangle
PAN_SERIF_NORMAL_SANS = 11  #  Normal Sans
PAN_SERIF_OBTUSE_SANS = 12  #  Obtuse Sans
PAN_SERIF_PERP_SANS = 13  #  Prep Sans
PAN_SERIF_FLARED = 14  #  Flared
PAN_SERIF_ROUNDED = 15  #  Rounded

PAN_WEIGHT_VERY_LIGHT = 2  #  Very Light
PAN_WEIGHT_LIGHT = 3  #  Light
PAN_WEIGHT_THIN = 4  #  Thin
PAN_WEIGHT_BOOK = 5  #  Book
PAN_WEIGHT_MEDIUM = 6  #  Medium
PAN_WEIGHT_DEMI = 7  #  Demi
PAN_WEIGHT_BOLD = 8  #  Bold
PAN_WEIGHT_HEAVY = 9  #  Heavy
PAN_WEIGHT_BLACK = 10  #  Black
PAN_WEIGHT_NORD = 11  #  Nord

PAN_PROP_OLD_STYLE = 2  #  Old Style
PAN_PROP_MODERN = 3  #  Modern
PAN_PROP_EVEN_WIDTH = 4  #  Even Width
PAN_PROP_EXPANDED = 5  #  Expanded
PAN_PROP_CONDENSED = 6  #  Condensed
PAN_PROP_VERY_EXPANDED = 7  #  Very Expanded
PAN_PROP_VERY_CONDENSED = 8  #  Very Condensed
PAN_PROP_MONOSPACED = 9  #  Monospaced

PAN_CONTRAST_NONE = 2  #  None
PAN_CONTRAST_VERY_LOW = 3  #  Very Low
PAN_CONTRAST_LOW = 4  #  Low
PAN_CONTRAST_MEDIUM_LOW = 5  #  Medium Low
PAN_CONTRAST_MEDIUM = 6  #  Medium
PAN_CONTRAST_MEDIUM_HIGH = 7  #  Mediim High
PAN_CONTRAST_HIGH = 8  #  High
PAN_CONTRAST_VERY_HIGH = 9  #  Very High

PAN_STROKE_GRADUAL_DIAG = 2  #  Gradual/Diagonal
PAN_STROKE_GRADUAL_TRAN = 3  #  Gradual/Transitional
PAN_STROKE_GRADUAL_VERT = 4  #  Gradual/Vertical
PAN_STROKE_GRADUAL_HORZ = 5  #  Gradual/Horizontal
PAN_STROKE_RAPID_VERT = 6  #  Rapid/Vertical
PAN_STROKE_RAPID_HORZ = 7  #  Rapid/Horizontal
PAN_STROKE_INSTANT_VERT = 8  #  Instant/Vertical

PAN_STRAIGHT_ARMS_HORZ = 2  #  Straight Arms/Horizontal
PAN_STRAIGHT_ARMS_WEDGE = 3  #  Straight Arms/Wedge
PAN_STRAIGHT_ARMS_VERT = 4  #  Straight Arms/Vertical
PAN_STRAIGHT_ARMS_SINGLE_SERIF = 5 #  Straight Arms/Single-Serif
PAN_STRAIGHT_ARMS_DOUBLE_SERIF = 6 #  Straight Arms/Double-Serif
PAN_BENT_ARMS_HORZ = 7  #  Non-Straight Arms/Horizontal
PAN_BENT_ARMS_WEDGE = 8  #  Non-Straight Arms/Wedge
PAN_BENT_ARMS_VERT = 9  #  Non-Straight Arms/Vertical
PAN_BENT_ARMS_SINGLE_SERIF = 10  #  Non-Straight Arms/Single-Serif
PAN_BENT_ARMS_DOUBLE_SERIF = 11  #  Non-Straight Arms/Double-Serif

PAN_LETT_NORMAL_CONTACT = 2  #  Normal/Contact
PAN_LETT_NORMAL_WEIGHTED = 3  #  Normal/Weighted
PAN_LETT_NORMAL_BOXED = 4  #  Normal/Boxed
PAN_LETT_NORMAL_FLATTENED = 5  #  Normal/Flattened
PAN_LETT_NORMAL_ROUNDED = 6  #  Normal/Rounded
PAN_LETT_NORMAL_OFF_CENTER = 7  #  Normal/Off Center
PAN_LETT_NORMAL_SQUARE = 8  #  Normal/Square
PAN_LETT_OBLIQUE_CONTACT = 9  #  Oblique/Contact
PAN_LETT_OBLIQUE_WEIGHTED = 10  #  Oblique/Weighted
PAN_LETT_OBLIQUE_BOXED = 11  #  Oblique/Boxed
PAN_LETT_OBLIQUE_FLATTENED = 12  #  Oblique/Flattened
PAN_LETT_OBLIQUE_ROUNDED = 13  #  Oblique/Rounded
PAN_LETT_OBLIQUE_OFF_CENTER = 14  #  Oblique/Off Center
PAN_LETT_OBLIQUE_SQUARE = 15  #  Oblique/Square

PAN_MIDLINE_STANDARD_TRIMMED = 2  #  Standard/Trimmed
PAN_MIDLINE_STANDARD_POINTED = 3  #  Standard/Pointed
PAN_MIDLINE_STANDARD_SERIFED = 4  #  Standard/Serifed
PAN_MIDLINE_HIGH_TRIMMED = 5  #  High/Trimmed
PAN_MIDLINE_HIGH_POINTED = 6  #  High/Pointed
PAN_MIDLINE_HIGH_SERIFED = 7  #  High/Serifed
PAN_MIDLINE_CONSTANT_TRIMMED = 8  #  Constant/Trimmed
PAN_MIDLINE_CONSTANT_POINTED = 9  #  Constant/Pointed
PAN_MIDLINE_CONSTANT_SERIFED = 10  #  Constant/Serifed
PAN_MIDLINE_LOW_TRIMMED = 11  #  Low/Trimmed
PAN_MIDLINE_LOW_POINTED = 12  #  Low/Pointed
PAN_MIDLINE_LOW_SERIFED = 13  #  Low/Serifed

PAN_XHEIGHT_CONSTANT_SMALL = 2  #  Constant/Small
PAN_XHEIGHT_CONSTANT_STD = 3  #  Constant/Standard
PAN_XHEIGHT_CONSTANT_LARGE = 4  #  Constant/Large
PAN_XHEIGHT_DUCKING_SMALL = 5  #  Ducking/Small
PAN_XHEIGHT_DUCKING_STD = 6  #  Ducking/Standard
PAN_XHEIGHT_DUCKING_LARGE = 7  #  Ducking/Large

ELF_VENDOR_SIZE = 4
ELF_VERSION = 0
ELF_CULTURE_LATIN = 0

#  EnumFonts Masks
RASTER_FONTTYPE = 0x1
DEVICE_FONTTYPE = 0x2
TRUETYPE_FONTTYPE = 0x4


# Background Modes
TRANSPARENT = 1
OPAQUE = 2
BKMODE_LAST = 2

#  Graphics Modes
GM_COMPATIBLE = 1
GM_ADVANCED = 2
GM_LAST = 2

#  PolyDraw and GetPath point types
PT_CLOSEFIGURE = 0x1
PT_LINETO = 0x2
PT_BEZIERTO = 0x4
PT_MOVETO = 0x6

#  Mapping Modes
MM_TEXT = 1
MM_LOMETRIC = 2
MM_HIMETRIC = 3
MM_LOENGLISH = 4
MM_HIENGLISH = 5
MM_TWIPS = 6
MM_ISOTROPIC = 7
MM_ANISOTROPIC = 8

#  Min and Max Mapping Mode values
MM_MIN = MM_TEXT
MM_MAX = MM_ANISOTROPIC
MM_MAX_FIXEDSCALE = MM_TWIPS

# Coordinate Modes
ABSOLUTE = 1
RELATIVE = 2

# Stock Logical Objects
WHITE_BRUSH = 0
LTGRAY_BRUSH = 1
GRAY_BRUSH = 2
DKGRAY_BRUSH = 3
BLACK_BRUSH = 4
NULL_BRUSH = 5
HOLLOW_BRUSH = NULL_BRUSH
WHITE_PEN = 6
BLACK_PEN = 7
NULL_PEN = 8
OEM_FIXED_FONT = 10
ANSI_FIXED_FONT = 11
ANSI_VAR_FONT = 12
SYSTEM_FONT = 13
DEVICE_DEFAULT_FONT = 14
DEFAULT_PALETTE = 15
SYSTEM_FIXED_FONT = 16
STOCK_LAST = 16

CLR_INVALID = 0xFFFF
CLR_NONE = 0xFFFFFFFF         # No background color. The image is drawn transparently
CLR_DEFAULT = 0xFF000000      # The default background color. The image is drawn using the background color of the image list.

# Brush Styles
BS_SOLID = 0
BS_NULL = 1
BS_HOLLOW = BS_NULL
BS_HATCHED = 2
BS_PATTERN = 3
BS_INDEXED = 4
BS_DIBPATTERN = 5
BS_DIBPATTERNPT = 6
BS_PATTERN8X8 = 7
BS_DIBPATTERN8X8 = 8

COLORMGMTCAPS = 121
CM_NONE = 0x00
CM_DEVICE_ICM = 0x01
CM_GAMMA_RAMP = 0x02
CM_CMYK_COLOR = 0x04

#UKNOWN
SB_NONE 0x00
SB_CONST_ALPHA 0x01
SB_PIXEL_ALPHA 0x02
SB_PREMULT_ALPHA 0x04
SB_GRAD_RECT 0x10
SB_GRAD_TRI 0x20

#  Hatch Styles
HS_HORIZONTAL = 0              #  -----
HS_VERTICAL = 1                #  |||||
HS_FDIAGONAL = 2               #  \\\\\
HS_BDIAGONAL = 3               #  /////
HS_CROSS = 4                   #  +++++
HS_DIAGCROSS = 5               #  xxxxx
HS_FDIAGONAL1 = 6
HS_BDIAGONAL1 = 7
HS_SOLID = 8
HS_DENSE1 = 9
HS_DENSE2 = 10
HS_DENSE3 = 11
HS_DENSE4 = 12
HS_DENSE5 = 13
HS_DENSE6 = 14
HS_DENSE7 = 15
HS_DENSE8 = 16
HS_NOSHADE = 17
HS_HALFTONE = 18
HS_SOLIDCLR = 19
HS_DITHEREDCLR = 20
HS_SOLIDTEXTCLR = 21
HS_DITHEREDTEXTCLR = 22
HS_SOLIDBKCLR = 23
HS_DITHEREDBKCLR = 24
HS_API_MAX = 25

#UKNOWN
DI_MASK       = 1
DI_IMAGE       = 2
DI_NORMAL       = 3
DI_COMPAT       = 4
DI_DEFAULTSIZE    = 8
#UKNOWN
DI_APPBANDING    = 1

#  Pen Styles
PS_SOLID = 0
PS_DASH = 1                    #  -------
PS_DOT = 2                     #  .......
PS_DASHDOT = 3                 #  _._._._
PS_DASHDOTDOT = 4              #  _.._.._
PS_NULL = 5
PS_INSIDEFRAME = 6
PS_USERSTYLE = 7
PS_ALTERNATE = 8
PS_STYLE_MASK = 0xF

PS_ENDCAP_ROUND = 0x0
PS_ENDCAP_SQUARE = 0x100
PS_ENDCAP_FLAT = 0x200
PS_ENDCAP_MASK = 0xF00

PS_JOIN_ROUND = 0x0
PS_JOIN_BEVEL = 0x1000
PS_JOIN_MITER = 0x2000
PS_JOIN_MASK = 0xF000

PS_COSMETIC = 0x0
PS_GEOMETRIC = 0x10000
PS_TYPE_MASK = 0xF0000

AD_COUNTERCLOCKWISE = 1
AD_CLOCKWISE = 2

#  Device Parameters for GetDeviceCaps()
DRIVERVERSION = 0      #  Device driver version
TECHNOLOGY = 2         #  Device classification
HORZSIZE = 4           #  Horizontal size in millimeters
VERTSIZE = 6           #  Vertical size in millimeters
HORZRES = 8            #  Horizontal width in pixels
VERTRES = 10           #  Vertical width in pixels
BITSPIXEL = 12         #  Number of bits per pixel
PLANES = 14            #  Number of planes
NUMBRUSHES = 16        #  Number of brushes the device has
NUMPENS = 18           #  Number of pens the device has
NUMMARKERS = 20        #  Number of markers the device has
NUMFONTS = 22          #  Number of fonts the device has
NUMCOLORS = 24         #  Number of colors the device supports
PDEVICESIZE = 26       #  Size required for device descriptor
CURVECAPS = 28         #  Curve capabilities
LINECAPS = 30          #  Line capabilities
POLYGONALCAPS = 32     #  Polygonal capabilities
TEXTCAPS = 34          #  Text capabilities
CLIPCAPS = 36          #  Clipping capabilities
RASTERCAPS = 38        #  Bitblt capabilities
ASPECTX = 40           #  Length of the X leg
ASPECTY = 42           #  Length of the Y leg
ASPECTXY = 44          #  Length of the hypotenuse

LOGPIXELSX = 88        #  Logical pixels/inch in X
LOGPIXELSY = 90        #  Logical pixels/inch in Y

SIZEPALETTE = 104      #  Number of entries in physical palette
NUMRESERVED = 106      #  Number of reserved entries in palette
COLORRES = 108         #  Actual color resolution

#  Printing related DeviceCaps. These replace the appropriate Escapes
PHYSICALWIDTH = 110 #  Physical Width in device units
PHYSICALHEIGHT = 111 #  Physical Height in device units
PHYSICALOFFSETX = 112 #  Physical Printable Area x margin
PHYSICALOFFSETY = 113 #  Physical Printable Area y margin
SCALINGFACTORX = 114 #  Scaling factor x
SCALINGFACTORY = 115 #  Scaling factor y

#  Device Technologies
DT_PLOTTER = 0             #  Vector plotter
DT_RASDISPLAY = 1          #  Raster display
DT_RASPRINTER = 2          #  Raster printer
DT_RASCAMERA = 3           #  Raster camera
DT_CHARSTREAM = 4          #  Character-stream, PLP
DT_METAFILE = 5            #  Metafile, VDM
DT_DISPFILE = 6            #  Display-file

#  Curve Capabilities
CC_NONE = 0                #  Curves not supported
CC_CIRCLES = 1             #  Can do circles
CC_PIE = 2                 #  Can do pie wedges
CC_CHORD = 4               #  Can do chord arcs
CC_ELLIPSES = 8            #  Can do ellipese
CC_WIDE = 16               #  Can do wide lines
CC_STYLED = 32             #  Can do styled lines
CC_WIDESTYLED = 64         #  Can do wide styled lines
CC_INTERIORS = 128          #  Can do interiors
CC_ROUNDRECT = 256

#  Line Capabilities
LC_NONE = 0                   #  Lines not supported
LC_POLYLINE = 2               #  Can do polylines
LC_MARKER = 4                 #  Can do markers
LC_POLYMARKER = 8             #  Can do polymarkers
LC_WIDE = 16                  #  Can do wide lines
LC_STYLED = 32                #  Can do styled lines
LC_WIDESTYLED = 64            #  Can do wide styled lines
LC_INTERIORS = 128          #  Can do interiors

#  Polygon Capabilities
PC_NONE = 0                #  Polygonals not supported
PC_POLYGON = 1             #  Can do polygons
PC_RECTANGLE = 2           #  Can do rectangles
PC_WINDPOLYGON = 4         #  Can do winding polygons
PC_TRAPEZOID = 4           #  Can do trapezoids
PC_SCANLINE = 8            #  Can do scanlines
PC_WIDE = 16               #  Can do wide borders
PC_STYLED = 32             #  Can do styled borders
PC_WIDESTYLED = 64         #  Can do wide styled borders
PC_INTERIORS = 128         #  Can do interiors
PC_POLYPOLYGON = 256
PC_PATHS = 512

# palette entry flags
PC_RESERVED = 1  #  palette index used for animation
PC_EXPLICIT = 2  #  palette index is explicit to device
PC_NOCOLLAPSE = 4        #  do not match color to system palette

#  Clip Polygon Capabilities
CP_NONE = 0                #  No clipping of output
CP_RECTANGLE = 1           #  Output clipped to rects
CP_REGION = 2              #

#  Text Capabilities
TC_OP_CHARACTER = 0x1              #  Can do OutputPrecision   CHARACTER
TC_OP_STROKE = 0x2                 #  Can do OutputPrecision   STROKE
TC_CP_STROKE = 0x4                 #  Can do ClipPrecision     STROKE
TC_CR_90 = 0x8                     #  Can do CharRotAbility    90
TC_CR_ANY = 0x10                   #  Can do CharRotAbility    ANY
TC_SF_X_YINDEP = 0x20              #  Can do ScaleFreedom      X_YINDEPENDENT
TC_SA_DOUBLE = 0x40                #  Can do ScaleAbility      DOUBLE
TC_SA_INTEGER = 0x80               #  Can do ScaleAbility      INTEGER
TC_SA_CONTIN = 0x100               #  Can do ScaleAbility      CONTINUOUS
TC_EA_DOUBLE = 0x200               #  Can do EmboldenAbility   DOUBLE
TC_IA_ABLE = 0x400                 #  Can do ItalisizeAbility  ABLE
TC_UA_ABLE = 0x800                 #  Can do UnderlineAbility  ABLE
TC_SO_ABLE = 0x1000                #  Can do StrikeOutAbility  ABLE
TC_RA_ABLE = 0x2000                #  Can do RasterFontAble    ABLE
TC_VA_ABLE = 0x4000                #  Can do VectorFontAble    ABLE
TC_RESERVED = 0x8000
TC_SCROLLBLT = 0x10000             #  do text scroll with blt

#  Raster Capabilities
RC_NONE = 0
RC_BITBLT = 1                        #  Can do standard BLT.
RC_BANDING = 2                       #  Device requires banding support
RC_SCALING = 4                       #  Device requires scaling support
RC_BITMAP64 = 8                      #  Device can support >64K bitmap
RC_GDI20_OUTPUT = 0x10                #  has 2.0 output calls
RC_GDI20_STATE = 0x20
RC_SAVEBITMAP = 0x40
RC_DI_BITMAP = 0x80                #  supports DIB to memory
RC_PALETTE = 0x100                 #  supports a palette
RC_DIBTODEV = 0x200                #  supports DIBitsToDevice
RC_BIGFONT = 0x400                 #  supports >64K fonts
RC_STRETCHBLT = 0x800              #  supports StretchBlt
RC_FLOODFILL = 0x1000              #  supports FloodFill
RC_STRETCHDIB = 0x2000             #  supports StretchDIBits
RC_OP_DX_OUTPUT = 0x4000
RC_DEVBITS = 0x8000

# DIB color table identifiers
DIB_RGB_COLORS = 0                #  color table in RGBs
DIB_PAL_COLORS = 1                #  color table in palette indices
DIB_PAL_INDICES = 2             #  No color table indices into surf palette
DIB_PAL_PHYSINDICES = 2          #  No color table indices into surf palette
DIB_PAL_LOGINDICES = 4             #  No color table indices into DC palette

# constants for Get/SetSystemPaletteUse()
SYSPAL_ERROR = 0
SYSPAL_STATIC = 1
SYSPAL_NOSTATIC = 2
SYSPAL_NOSTATIC256 = 3

# constants for CreateDIBitmap
CBM_CREATEDIB = 0x2               #  create DIB bitmap
CBM_INIT = 0x4                    #  initialize bitmap

# ExtFloodFill style flags
FLOODFILLBORDER = 0
FLOODFILLSURFACE = 1

#  size of a device name string
CCHDEVICENAME = 32

#  size of a form name string
CCHFORMNAME = 32

# DEVMODE Display Flags
DM_GRAYSCALE = 0x00000001
DM_INTERLACED = 0x00000002

# field selection bits
DM_COPY = 2
DM_IN_BUFFER = DM_MODIFY
DM_IN_PROMPT = DM_PROMPT

# DEVMODE Fields
DM_ORIENTATION = 0x00000001
DM_PAPERSIZE = 0x00000002
DM_PAPERLENGTH = 0x00000004
DM_PAPERWIDTH = 0x00000008
DM_SCALE = 0x00000010
DM_COPIES = 0x00000100
DM_DEFAULTSOURCE = 0x00000200
DM_PRINTQUALITY = 0x00000400
DM_COLOR = 0x00000800
DM_DUPLEX = 0x00001000
DM_YRESOLUTION = 0x00002000
DM_TTOPTION = 0x00004000
DM_COLLATE = 0x00008000
DM_FORMNAME = 0x00010000           
DM_LOGPIXELS = 0x00020000
DM_BITSPERPEL = 0x00040000
DM_PELSWIDTH = 0x00080000
DM_PELSHEIGHT = 0x00100000
DM_DISPLAYFLAGS = 0x00200000
DM_DISPLAYFREQUENCY = 0x00400000
DM_ICMMETHOD = 0x00800000
DM_ICMINTENT = 0x01000000
DM_MEDIATYPE = 0x02000000
DM_DITHERTYPE = 0x04000000
DM_PANNINGWIDTH = 0x08000000
DM_PANNINGHEIGHT = 0x10000000

           
DM_PROMPT = 4
DM_UPDATE = 1
DM_MODIFY = 8
DM_OUT_BUFFER = DM_COPY
DM_OUT_DEFAULT = DM_UPDATE
DM_RESERVED1 = 0x800000
DM_RESERVED2 = 0x1000000
DM_ICMMETHOD = 0x2000000
DM_ICMINTENT = 0x4000000
DM_MEDIATYPE = 0x8000000
DM_DITHERTYPE = 0x10000000
DM_SPECVERSION = 0x320


#  DEVMODE Orientation Selections
DMORIENT_PORTRAIT = 1
DMORIENT_LANDSCAPE = 2

#  DEVMODE Paper Selections
DMPAPER_LETTER = 1
DMPAPER_FIRST = DMPAPER_LETTER     #  Letter 8 1/2 x 11 in
DMPAPER_LETTERSMALL = 2            #  Letter Small 8 1/2 x 11 in
DMPAPER_TABLOID = 3                #  Tabloid 11 x 17 in
DMPAPER_LEDGER = 4                 #  Ledger 17 x 11 in
DMPAPER_LEGAL = 5                  #  Legal 8 1/2 x 14 in
DMPAPER_STATEMENT = 6              #  Statement 5 1/2 x 8 1/2 in
DMPAPER_EXECUTIVE = 7              #  Executive 7 1/4 x 10 1/2 in
DMPAPER_A3 = 8                     #  A3 297 x 420 mm
DMPAPER_A4 = 9                     #  A4 210 x 297 mm
DMPAPER_A4SMALL = 10               #  A4 Small 210 x 297 mm
DMPAPER_A5 = 11                    #  A5 148 x 210 mm
DMPAPER_B4 = 12                    #  B4 250 x 354
DMPAPER_B5 = 13                    #  B5 182 x 257 mm
DMPAPER_FOLIO = 14                 #  Folio 8 1/2 x 13 in
DMPAPER_QUARTO = 15                #  Quarto 215 x 275 mm
DMPAPER_10X14 = 16                 #  10x14 in
DMPAPER_11X17 = 17                 #  11x17 in
DMPAPER_NOTE = 18                  #  Note 8 1/2 x 11 in
DMPAPER_ENV_9 = 19                 #  Envelope #9 3 7/8 x 8 7/8
DMPAPER_ENV_10 = 20                #  Envelope #10 4 1/8 x 9 1/2
DMPAPER_ENV_11 = 21                #  Envelope #11 4 1/2 x 10 3/8
DMPAPER_ENV_12 = 22                #  Envelope #12 4 \276 x 11
DMPAPER_ENV_14 = 23                #  Envelope #14 5 x 11 1/2
DMPAPER_CSHEET = 24                #  C size sheet
DMPAPER_DSHEET = 25                #  D size sheet
DMPAPER_ESHEET = 26                #  E size sheet
DMPAPER_ENV_DL = 27                #  Envelope DL 110 x 220mm
DMPAPER_ENV_C5 = 28                #  Envelope C5 162 x 229 mm
DMPAPER_ENV_C3 = 29                #  Envelope C3  324 x 458 mm
DMPAPER_ENV_C4 = 30                #  Envelope C4  229 x 324 mm
DMPAPER_ENV_C6 = 31                #  Envelope C6  114 x 162 mm
DMPAPER_ENV_C65 = 32               #  Envelope C65 114 x 229 mm
DMPAPER_ENV_B4 = 33                #  Envelope B4  250 x 353 mm
DMPAPER_ENV_B5 = 34                #  Envelope B5  176 x 250 mm
DMPAPER_ENV_B6 = 35                #  Envelope B6  176 x 125 mm
DMPAPER_ENV_ITALY = 36             #  Envelope 110 x 230 mm
DMPAPER_ENV_MONARCH = 37           #  Envelope Monarch 3.875 x 7.5 in
DMPAPER_ENV_PERSONAL = 38          #  6 3/4 Envelope 3 5/8 x 6 1/2 in
DMPAPER_FANFOLD_US = 39            #  US Std Fanfold 14 7/8 x 11 in
DMPAPER_FANFOLD_STD_GERMAN = 40    #  German Std Fanfold 8 1/2 x 12 in
DMPAPER_FANFOLD_LGL_GERMAN = 41    #  German Legal Fanfold 8 1/2 x 13 in
DMPAPER_LAST = DMPAPER_FANFOLD_LGL_GERMAN
DMPAPER_USER = 256

#  DEVMODE DefaultSource
DMBIN_UPPER = 1
DMBIN_FIRST = DMBIN_UPPER
DMBIN_ONLYONE = 1
DMBIN_LOWER = 2
DMBIN_MIDDLE = 3
DMBIN_MANUAL = 4
DMBIN_ENVELOPE = 5
DMBIN_ENVMANUAL = 6
DMBIN_AUTO = 7
DMBIN_TRACTOR = 8
DMBIN_SMALLFMT = 9
DMBIN_LARGEFMT = 10
DMBIN_LARGECAPACITY = 11
DMBIN_CASSETTE = 14
DMBIN_FORMSOURCE = 15
DMBIN_LAST = DMBIN_CASSETTE
DMBIN_USER = 256               #  device specific bins start here

#  DEVMODE Print Quality
DMRES_DRAFT = (-1)
DMRES_LOW = (-2)
DMRES_MEDIUM = (-3)
DMRES_HIGH = (-4)

#  DEVMODE_Color (printer)
DMCOLOR_MONOCHROME = 1
DMCOLOR_COLOR = 2

#  DEVMODE Duplex
DMDUP_SIMPLEX = 1
DMDUP_VERTICAL = 2
DMDUP_HORIZONTAL = 3

#  DEVMODE TrueType options
DMTT_BITMAP = 1            #  print TT fonts as graphics
DMTT_DOWNLOAD = 2          #  download TT fonts as soft fonts
DMTT_SUBDEV = 3            #  substitute device fonts for TT fonts
DMTT_DOWNLOAD_OUTLINE = 4

#  Collation selections
DMCOLLATE_FALSE = 0
DMCOLLATE_TRUE = 1

#  GetRegionData/ExtCreateRegion
RDH_RECTANGLES = 1

# bits defined in wFlags of RASTERIZER_STATUS
TT_AVAILABLE = 0x1
TT_ENABLED = 0x2
TT_PRIM_LINE = 1
TT_PRIM_QSPLINE = 2
TT_PRIM_CSPLINE   3
TT_POLYGON_TYPE = 24

#  device capabilities indices
DC_FIELDS = 1
DC_PAPERS = 2
DC_PAPERSIZE = 3
DC_MINEXTENT = 4
DC_MAXEXTENT = 5
DC_BINS = 6
DC_DUPLEX = 7
DC_SIZE = 8
DC_EXTRA = 9
DC_VERSION = 10
DC_DRIVER = 11
DC_BINNAMES = 12
DC_ENUMRESOLUTIONS = 13
DC_FILEDEPENDENCIES = 14
DC_TRUETYPE = 15
DC_PAPERNAMES = 16
DC_ORIENTATION = 17
DC_COPIES = 18
DC_BINADJUST = 19
DC_EMF_COMPLIANT = 20
DC_DATATYPE_PRODUCED = 21
DC_COLLATE = 22
DC_MANUFACTURER = 23
DC_MODEL = 24
DC_PERSONALITY = 25
DC_PRINTRATE = 26
DC_PRINTRATEUNIT = 27
DC_PRINTERMEM = 28
DC_MEDIAREADY = 29
DC_STAPLE = 30
DC_PRINTRATEPPM = 31
DC_COLORDEVICE = 32
DC_NUP = 33
DC_MEDIATYPENAMES = 34
DC_MEDIATYPES = 35


#  bit fields of the return value (DWORD) for DC_TRUETYPE
DCTT_BITMAP = 0x00000001
DCTT_DOWNLOAD = 0x00000002
DCTT_SUBDEV = 0x00000004

# Comment
GDICOMMENT_WINDOWS_METAFILE = (-2147483647)
GDICOMMENT_BEGINGROUP = 2
GDICOMMENT_ENDGROUP = 3
GDICOMMENT_MULTIFORMATS = 1073741828
GDICOMMENT_IDENTIFIER = 1128875079

#  Flags value for COLORADJUSTMENT
CA_NEGATIVE = 0x1
CA_LOG_FILTER = 0x2

#  IlluminantIndex values
ILLUMINANT_DEVICE_DEFAULT = 0
ILLUMINANT_A = 1
ILLUMINANT_B = 2
ILLUMINANT_C = 3
ILLUMINANT_D50 = 4
ILLUMINANT_D55 = 5
ILLUMINANT_D65 = 6
ILLUMINANT_D75 = 7
ILLUMINANT_F2 = 8
ILLUMINANT_MAX_INDEX = ILLUMINANT_F2

ILLUMINANT_TUNGSTEN = ILLUMINANT_A
ILLUMINANT_DAYLIGHT = ILLUMINANT_C
ILLUMINANT_FLUORESCENT = ILLUMINANT_F2
ILLUMINANT_NTSC = ILLUMINANT_C

#  Min and max for RedGamma, GreenGamma, BlueGamma
RGB_GAMMA_MIN = 2500
RGB_GAMMA_MAX = 65000

#  Min and max for ReferenceBlack and ReferenceWhite
REFERENCE_WHITE_MIN = 6000
REFERENCE_WHITE_MAX = 10000
REFERENCE_BLACK_MIN = 0
REFERENCE_BLACK_MAX = 4000

#  Min and max for Contrast, Brightness, Colorfulness, RedGreenTint
COLOR_ADJ_MIN = -100
COLOR_ADJ_MAX = 100

FONTMAPPER_MAX = 10

FR_PRIVATE = 0x10
FR_NOT_ENUM = 0x20

# Enhanced metafile constants

ENHMETA_SIGNATURE = 0x464D4520
EPS_SIGNATURE = 0x46535045
#  Stock object flag used in the object handle
# index in the enhanced metafile records.
#  E.g. The object handle index (META_STOCK_OBJECT Or BLACK_BRUSH)
#  represents the stock object BLACK_BRUSH.

ENHMETA_STOCK_OBJECT = 0x80000000

#  Enhanced Metafile Records
EMR_HEADER = 1
EMR_POLYBEZIER = 2
EMR_POLYGON = 3
EMR_POLYLINE = 4
EMR_POLYBEZIERTO = 5
EMR_POLYLINETO = 6
EMR_POLYPOLYLINE = 7
EMR_POLYPOLYGON = 8
EMR_SETWINDOWEXTEX = 9
EMR_SETWINDOWORGEX = 10
EMR_SETVIEWPORTEXTEX = 11
EMR_SETVIEWPORTORGEX = 12
EMR_SETBRUSHORGEX = 13
EMR_EOF = 14
EMR_SETPIXELV = 15
EMR_SETMAPPERFLAGS = 16
EMR_SETMAPMODE = 17
EMR_SETBKMODE = 18
EMR_SETPOLYFILLMODE = 19
EMR_SETROP2 = 20
EMR_SETSTRETCHBLTMODE = 21
EMR_SETTEXTALIGN = 22
EMR_SETCOLORADJUSTMENT = 23
EMR_SETTEXTCOLOR = 24
EMR_SETBKCOLOR = 25
EMR_OFFSETCLIPRGN = 26
EMR_MOVETOEX = 27
EMR_SETMETARGN = 28
EMR_EXCLUDECLIPRECT = 29
EMR_INTERSECTCLIPRECT = 30
EMR_SCALEVIEWPORTEXTEX = 31
EMR_SCALEWINDOWEXTEX = 32
EMR_SAVEDC = 33
EMR_RESTOREDC = 34
EMR_SETWORLDTRANSFORM = 35
EMR_MODIFYWORLDTRANSFORM = 36
EMR_SELECTOBJECT = 37
EMR_CREATEPEN = 38
EMR_CREATEBRUSHINDIRECT = 39
EMR_DELETEOBJECT = 40
EMR_ANGLEARC = 41
EMR_ELLIPSE = 42
EMR_RECTANGLE = 43
EMR_ROUNDRECT = 44
EMR_ARC = 45
EMR_CHORD = 46
EMR_PIE = 47
EMR_SELECTPALETTE = 48
EMR_CREATEPALETTE = 49
EMR_SETPALETTEENTRIES = 50
EMR_RESIZEPALETTE = 51
EMR_REALIZEPALETTE = 52
EMR_EXTFLOODFILL = 53
EMR_LINETO = 54
EMR_ARCTO = 55
EMR_POLYDRAW = 56
EMR_SETARCDIRECTION = 57
EMR_SETMITERLIMIT = 58
EMR_BEGINPATH = 59
EMR_ENDPATH = 60
EMR_CLOSEFIGURE = 61
EMR_FILLPATH = 62
EMR_STROKEANDFILLPATH = 63
EMR_STROKEPATH = 64
EMR_FLATTENPATH = 65
EMR_WIDENPATH = 66
EMR_SELECTCLIPPATH = 67
EMR_ABORTPATH = 68
EMR_GDICOMMENT = 70
EMR_FILLRGN = 71
EMR_FRAMERGN = 72
EMR_INVERTRGN = 73
EMR_PAINTRGN = 74
EMR_EXTSELECTCLIPRGN = 75
EMR_BITBLT = 76
EMR_STRETCHBLT = 77
EMR_MASKBLT = 78
EMR_PLGBLT = 79
EMR_SETDIBITSTODEVICE = 80
EMR_STRETCHDIBITS = 81
EMR_EXTCREATEFONTINDIRECTW = 82
EMR_EXTTEXTOUTA = 83
EMR_EXTTEXTOUTW = 84
EMR_POLYBEZIER16 = 85
EMR_POLYGON16 = 86
EMR_POLYLINE16 = 87
EMR_POLYBEZIERTO16 = 88
EMR_POLYLINETO16 = 89
EMR_POLYPOLYLINE16 = 90
EMR_POLYPOLYGON16 = 91
EMR_POLYDRAW16 = 92
EMR_CREATEMONOBRUSH = 93
EMR_CREATEDIBPATTERNBRUSHPT = 94
EMR_EXTCREATEPEN = 95
EMR_POLYTEXTOUTA = 96
EMR_POLYTEXTOUTW = 97
EMR_SETICMMODE = 98
EMR_CREATECOLORSPACE = 99
EMR_SETCOLORSPACE = 100
EMR_DELETECOLORSPACE = 101
EMR_GLSRECORD = 102
EMR_GLSBOUNDEDRECORD = 103
EMR_PIXELFORMAT = 104

EMR_MIN = 1
EMR_MAX = 97


#  StretchBlt() Modes
STRETCH_ANDSCANS = 1
STRETCH_ORSCANS = 2
STRETCH_DELETESCANS = 3
STRETCH_HALFTONE = 4


TCI_SRCCHARSET = 1
TCI_SRCCODEPAGE = 2
TCI_SRCFONTSIG = 3
TCI_SRCLOCALE   = 0x100

MONO_FONT = 8

# Character Sets
ANSI_CHARSET = 0
DEFAULT_CHARSET = 1
SYMBOL_CHARSET = 2
MAC_CHARSET = 77
SHIFTJIS_CHARSET = 128
HANGEUL_CHARSET = 129
JOHAB_CHARSET = 130
GB2312_CHARSET   134
CHINESEBIG5_CHARSET = 136
GREEK_CHARSET = 161
TURKISH_CHARSET = 162
VIETNAMESE_CHARSET   163
HEBREW_CHARSET = 177
ARABIC_CHARSET = 178
BALTIC_CHARSET = 186
RUSSIAN_CHARSET = 204
THAI_CHARSET = 222
EASTEUROPE_CHARSET = 238
OEM_CHARSET = 255

FS_LATIN1 = 0x00000001
FS_LATIN2 = 0x00000002
FS_CYRILLIC = 0x00000004
FS_GREEK = 0x00000008
FS_TURKISH = 0x00000010
FS_HEBREW = 0x00000020
FS_ARABIC = 0x00000040
FS_BALTIC = 0x00000080
FS_THAI = 0x10000
FS_JISJAPAN = 0x20000
FS_CHINESESIMP = 0x40000
FS_WANSUNG = 0x80000
FS_CHINESETRAD = 0x100000
FS_JOHAB = 0x200000
FS_SYMBOL = 0x80000000

DEFAULT_GUI_FONT = 17

#  DEVMODE Paper Types
DMPAPER_ISO_B4 = 42                #  B4 (ISO) 250 x 353 mm
DMPAPER_JAPANESE_POSTCARD = 43     #  Japanese Postcard 100 x 148 mm
DMPAPER_9X11 = 44                  #  9 x 11 in
DMPAPER_10X11 = 45                 #  10 x 11 in
DMPAPER_15X11 = 46                 #  15 x 11 in
DMPAPER_ENV_INVITE = 47            #  Envelope Invite 220 x 220 mm
DMPAPER_RESERVED_48 = 48           #  RESERVED--DO NOT USE
DMPAPER_RESERVED_49 = 49           #  RESERVED--DO NOT USE
DMPAPER_LETTER_EXTRA = 50              #  Letter Extra 9 \275 x 12 in
DMPAPER_LEGAL_EXTRA = 51               #  Legal Extra 9 \275 x 15 in
DMPAPER_TABLOID_EXTRA = 52              #  Tabloid Extra 11.69 x 18 in
DMPAPER_A4_EXTRA = 53                   #  A4 Extra 9.27 x 12.69 in
DMPAPER_LETTER_TRANSVERSE = 54     #  Letter Transverse 8 \275 x 11 in
DMPAPER_A4_TRANSVERSE = 55         #  A4 Transverse 210 x 297 mm
DMPAPER_LETTER_EXTRA_TRANSVERSE = 56 #  Letter Extra Transverse 9\275 x 12 in
DMPAPER_A_PLUS = 57                #  SuperA/SuperA/A4 227 x 356 mm
DMPAPER_B_PLUS = 58                #  SuperB/SuperB/A3 305 x 487 mm
DMPAPER_LETTER_PLUS = 59           #  Letter Plus 8.5 x 12.69 in
DMPAPER_A4_PLUS = 60               #  A4 Plus 210 x 330 mm
DMPAPER_A5_TRANSVERSE = 61         #  A5 Transverse 148 x 210 mm
DMPAPER_B5_TRANSVERSE = 62         #  B5 (JIS) Transverse 182 x 257 mm
DMPAPER_A3_EXTRA = 63              #  A3 Extra 322 x 445 mm
DMPAPER_A5_EXTRA = 64              #  A5 Extra 174 x 235 mm
DMPAPER_B5_EXTRA = 65              #  B5 (ISO) Extra 201 x 276 mm
DMPAPER_A2 = 66                    #  A2 420 x 594 mm
DMPAPER_A3_TRANSVERSE = 67         #  A3 Transverse 297 x 420 mm
DMPAPER_A3_EXTRA_TRANSVERSE = 68   #  A3 Extra Transverse 322 x 445 mm

#  DEVMODE ICM Methods
DMICMMETHOD_NONE = 1       #  ICM disabled
DMICMMETHOD_SYSTEM = 2     #  ICM handled by system
DMICMMETHOD_DRIVER = 3     #  ICM handled by driver
DMICMMETHOD_DEVICE = 4     #  ICM handled by device
DMICMMETHOD_USER = 256     #  Device-specific methods start here

#  DEVMODE ICM Intend
DMICM_SATURATE = 1         #  Maximize color saturation
DMICM_CONTRAST = 2         #  Maximize color contrast
DMICM_COLORMETRIC = 3      #  Use specific color metric
DMICM_ABS_COLORIMETRIC = 4
DMICM_USER = 256           #  Device-specific intents start here

#  DEVMODE Media Types
DMMEDIA_STANDARD = 1         #  Standard paper
DMMEDIA_GLOSSY = 2           #  Glossy paper
DMMEDIA_TRANSPARENCY = 3     #  Transparency
DMMEDIA_USER = 256           #  Device-specific media start here

#  DEVMODE Dither types
DMDITHER_NONE = 1          #  No dithering
DMDITHER_COARSE = 2        #  Dither with a coarse brush
DMDITHER_FINE = 3          #  Dither with a fine brush
DMDITHER_LINEART = 4       #  LineArt dithering
DMDITHER_GRAYSCALE = 5     #  Device does grayscaling
#DMDITHER_ERRORDIFFUSION = 5 ;CHECK?
#DMDITHER_GRAYSCALE = 10 ;CHECK?
DMDITHER_USER = 256        #  Device-specific dithers start here

# GetGlyphOutline constants
GGO_METRICS = 0
GGO_BITMAP = 1
GGO_NATIVE = 2
GGO_BEZIER 3
GGO_GRAY2_BITMAP = 4
GGO_GRAY4_BITMAP = 5
GGO_GRAY8_BITMAP = 6
GGO_GLYPH_INDEX = 128
GGO_UNHINTED = 256

GCP_DBCS = 0x1
GCP_REORDER = 0x2
GCP_USEKERNING = 0x8
GCP_GLYPHSHAPE = 0x10
GCP_LIGATE = 0x20
GCP_DIACRITIC = 0x100
GCP_KASHIDA = 0x400
GCP_ERROR = 0x8000
GCP_JUSTIFY = 0x10000
GCP_NODIACRITICS = 0x20000
GCP_CLASSIN = 0x80000
GCP_MAXEXTENT = 0x100000
GCP_JUSTIFYIN = 0x200000
GCP_DISPLAYZWG = 0x400000
GCP_SYMSWAPOFF = 0x800000
GCP_NUMERICOVERRIDE = 0x1000000
GCP_NEUTRALOVERRIDE = 0x2000000
GCP_NUMERICSLATIN = 0x4000000
GCP_NUMERICSLOCAL = 0x8000000

FLI_MASK = 0x103B
FLI_GLYPHS = 0x40000

GCPCLASS_LATIN = 1
GCPCLASS_HEBREW = 2
GCPCLASS_ARABIC = 2
GCPCLASS_NEUTRAL = 3
GCPCLASS_LOCALNUMBER = 4
GCPCLASS_LATINNUMBER = 5
GCPCLASS_LATINNUMERICTERMINATOR = 6
GCPCLASS_LATINNUMERICSEPARATOR = 7
GCPCLASS_NUMERICSEPARATOR = 8
GCPCLASS_PREBOUNDRTL = 0x80
GCPCLASS_PREBOUNDLTR = 0x40
GCPCLASS_POSTBOUNDRTL = 16
GCPCLASS_POSTBOUNDLTR = 32

GCPGLYPH_LINKBEFORE = 0x8000
GCPGLYPH_LINKAFTER = 0x4000

DCTT_DOWNLOAD_OUTLINE = 0x00000008

DCB_RESET = 1
DCB_ACCUMULATE = 2
DCB_DIRTY = 2
DCB_SET = 3
DCB_ENABLE = 4

#  return values for DC_BINADJUST
DCBA_FACEUPNONE = 0x0
DCBA_FACEUPCENTER = 0x1
DCBA_FACEUPLEFT = 0x2
DCBA_FACEUPRIGHT = 0x3
DCBA_FACEDOWNNONE = 0x100
DCBA_FACEDOWNCENTER = 0x101
DCBA_FACEDOWNLEFT = 0x102
DCBA_FACEDOWNRIGHT = 0x103

ICM_OFF = 1
ICM_ON = 2
ICM_QUERY = 3

SHADEBLENDCAPS = 120

AbortDoc = Win32API.new('gdi32', 'AbortDoc', 'L', 'L')
AbortPath = Win32API.new('gdi32',  'AbortPath', 'L', 'L')
AddFontResource = Win32API.new('gdi32',  'AddFontResourceA', 'P', 'L')
AngleArc = Win32API.new('gdi32',  'AngleArc', 'L, L, L, L, ByVal eStartAngle As Double, ByVal eSweepAngle As Double', 'L')
AnimatePalette = Win32API.new('gdi32',  'AnimatePaletteA', 'L, L, L, lpPaletteColors As PALETTEENTRY', 'L')
Arc = Win32API.new('gdi32',  'Arc', 'L, L, L, L, L, L, L, L, L', 'L')
ArcTo = Win32API.new('gdi32',  'ArcTo', 'L, L, L, L, L, L, L, L, L', 'L')
BeginPath = Win32API.new('gdi32',  'BeginPath', 'L', 'L')
BitBlt = Win32API.new('gdi32',  'BitBlt', 'L, L, L, L, L, L, L, L, L', 'L')
CancelDC = Win32API.new('gdi32',  'CancelDC', 'L', 'L')
CheckColorsInGamut = Win32API.new('gdi32',  'CheckColorsInGamut', 'L, lpv As Any, lpv2 As Any, L', 'L')
Chord = Win32API.new('gdi32',  'Chord', 'L, L, L, L, L, L, L, L, L', 'L')
CloseEnhMetaFile = Win32API.new('gdi32',  'CloseEnhMetaFile', 'L', 'L')
CloseFigure = Win32API.new('gdi32',  'CloseFigure', 'L', 'L')
CloseMetaFile = Win32API.new('gdi32',  'CloseMetaFile', 'L', 'L')
ColorMatchToTarget = Win32API.new('gdi32',  'ColorMatchToTarget', 'L, L, L', 'L')
CombineRgn = Win32API.new('gdi32',  'CombineRgn', 'L, L, L, L', 'L')   
CombineTransform = Win32API.new('gdi32',  'CombineTransform', 'lpxformResult As xform, lpxform1 As xform, lpxform2 As xform', 'L')   
CopyEnhMetaFile = Win32API.new('gdi32',  'CopyEnhMetaFileA', 'L, P', 'L')   
CopyMetaFile = Win32API.new('gdi32',  'CopyMetaFileA', 'L, P', 'L')   
CreateBitmap = Win32API.new('gdi32',  'CreateBitmap', 'L, L, L, L, lpBits As Any', 'L')   
CreateBitmapIndirect = Win32API.new('gdi32',  'CreateBitmapIndirect', 'lpBitmap As BITMAP', 'L')   
CreateBrushIndirect = Win32API.new('gdi32',  'CreateBrushIndirect', 'lpLogBrush As LOGBRUSH', 'L')   
CreateColorSpace = Win32API.new('gdi32',  'CreateColorSpaceA', 'lplogcolorspace As LOGCOLORSPACE', 'L')   
CreateCompatibleBitmap = Win32API.new('gdi32',  'CreateCompatibleBitmap', 'L, L, L', 'L')   
CreateCompatibleDC = Win32API.new('gdi32',  'CreateCompatibleDC', 'L', 'L')   
CreateDC = Win32API.new('gdi32',  'CreateDCA', 'P, P, P, lpInitData As DEVMODE', 'L')   
CreateDIBitmap = Win32API.new('gdi32',  'CreateDIBitmap', 'L, lpInfoHeader As BITMAPINFOHEADER, L, lpInitBits As Any, lpInitInfo As BITMAPINFO, L', 'L')
CreateDIBPatternBrush = Win32API.new('gdi32',  'CreateDIBPatternBrush', 'L, L', 'L')   
CreateDIBPatternBrushPt = Win32API.new('gdi32',  'CreateDIBPatternBrushPt', 'lpPackedDIB As Any, L', 'L')   
CreateDiscardableBitmap = Win32API.new('gdi32',  'CreateDiscardableBitmap', 'L, L, L', 'L')   
CreateEllipticRgn = Win32API.new('gdi32',  'CreateEllipticRgn', 'L, L, L, L', 'L')   
CreateEllipticRgnIndirect = Win32API.new('gdi32',  'CreateEllipticRgnIndirect', 'lpRect As Rect', 'L')
CreateEnhMetaFile = Win32API.new('gdi32',  'CreateEnhMetaFileA', 'L, P, lpRect As RECT, P', 'L')
CreateFont = Win32API.new('gdi32',  'CreateFontA', 'L, L, L, L, L, L, L, L, L, L, L, L, L, P', 'L')
CreateFontIndirect = Win32API.new('gdi32',  'CreateFontIndirectA', 'lpLogFont As LOGFONT', 'L')
CreateHalftonePalette = Win32API.new('gdi32',  'CreateHalftonePalette', 'L', 'L')
CreateHatchBrush = Win32API.new('gdi32',  'CreateHatchBrush', 'L, L', 'L')
CreateIC = Win32API.new('gdi32',  'CreateICA', 'P, P, P, lpInitData As DEVMODE', 'L')
CreateMetaFile = Win32API.new('gdi32',  'CreateMetaFileA', 'P', 'L')
CreatePalette = Win32API.new('gdi32',  'CreatePalette', 'lpLogPalette As LOGPALETTE', 'L')
CreatePatternBrush = Win32API.new('gdi32',  'CreatePatternBrush', 'L', 'L')
CreatePen = Win32API.new('gdi32',  'CreatePen', 'L, L, L', 'L')
CreatePenIndirect = Win32API.new('gdi32',  'CreatePenIndirect', 'lpLogPen As LOGPEN', 'L')
CreatePolygonRgn = Win32API.new('gdi32',  'CreatePolygonRgn', 'lpPoint As POINTAPI, L, L', 'L')
CreatePolyPolygonRgn = Win32API.new('gdi32',  'CreatePolyPolygonRgn', 'lpPoint As POINTAPI, L, L, L', 'L')
CreateRectRgn = Win32API.new('gdi32',  'CreateRectRgn', 'L, L, L, L', 'L')
CreateRectRgnIndirect = Win32API.new('gdi32',  'CreateRectRgnIndirect', 'lpRect As RECT', 'L')
CreateRoundRectRgn = Win32API.new('gdi32',  'CreateRoundRectRgn', 'L, L, L, L, L, L', 'L')
CreateScalableFontResource = Win32API.new('gdi32',  'CreateScalableFontResourceA', 'L, P, P, P', 'L')
CreateSolidBrush = Win32API.new('gdi32',  'CreateSolidBrush', 'L', 'L')
DeleteColorSpace = Win32API.new('gdi32',  'DeleteColorSpace', 'L', 'L'
DeleteDC = Win32API.new('gdi32',  'DeleteDC', 'L', 'L')
DeleteEnhMetaFile = Win32API.new('gdi32',  'DeleteEnhMetaFile', 'L', 'L')
DeleteMetaFile = Win32API.new('gdi32',  'DeleteMetaFile', 'L', 'L')
DeleteObject = Win32API.new('gdi32',  'DeleteObject', 'L', 'L')
DeviceCapabilities Lib 'winspool.drv' 'DeviceCapabilitiesA', 'P, P, L, P, lpDevMode As DEVMODE', 'L')
DPtoLP = Win32API.new('gdi32',  'DPtoLP', 'L, lpPoint As POINTAPI, L', 'L')
DrawEscape = Win32API.new('gdi32',  'DrawEscape', 'L, L, L, P', 'L')
Ellipse = Win32API.new('gdi32',  'Ellipse', 'L, L, L, L, L', 'L')
EndDoc = Win32API.new('gdi32',  'EndDoc', 'L', 'L')
EndPage = Win32API.new('gdi32',  'EndPage', 'L', 'L')
EndPath = Win32API.new('gdi32',  'EndPath', 'L', 'L')
EnumEnhMetaFile = Win32API.new('gdi32',  'EnumEnhMetaFile', 'L, L, ByVal L, lpData As Any, lpRect As RECT', 'L')
EnumFontFamilies = Win32API.new('gdi32',  'EnumFontFamiliesA', 'L, P, L, L', 'L')
EnumFontFamiliesEx = Win32API.new('gdi32',  'EnumFontFamiliesExA', 'L, lpLogFont As LOGFONT, L, L, L', 'L')
EnumICMProfiles = Win32API.new('gdi32',  'EnumICMProfilesA', 'L, L, L', 'L')
EqualRgn = Win32API.new('gdi32',  'EqualRgn', 'L, L', 'L')
Escape = Win32API.new('gdi32',  'Escape', 'L, L, L, P, lpOutData As Any', 'L')
ExcludeClipRect = Win32API.new('gdi32',  'ExcludeClipRect', 'L, L, L, L, L', 'L')
ExtCreatePen = Win32API.new('gdi32',  'ExtCreatePen', 'L, L, lplb As LOGBRUSH, L, L', 'L')
ExtCreateRegion = Win32API.new('gdi32',  'ExtCreateRegion', 'lpXform As xform, L, lpRgnData As RGNDATA', 'L')
ExtEscape = Win32API.new('gdi32',  'ExtEscape', 'L, L, L, P, L, P', 'L')
ExtFloodFill = Win32API.new('gdi32',  'ExtFloodFill', 'L, L, L, L, L', 'L')
ExtSelectClipRgn = Win32API.new('gdi32',  'ExtSelectClipRgn', 'L, L, L', 'L')
ExtTextOut = Win32API.new('gdi32',  'ExtTextOutA', 'L, L, L, L, lpRect As Rect, P, L, L', 'L')
FillPath = Win32API.new('gdi32',  'FillPath', 'L', 'L')
FillRgn = Win32API.new('gdi32',  'FillRgn', 'L, L, L', 'L')
FlattenPath = Win32API.new('gdi32',  'FlattenPath', 'L', 'L')
FloodFill = Win32API.new('gdi32',  'FloodFill', 'L, L, L, L', 'L')
FrameRgn = Win32API.new('gdi32',  'FrameRgn', 'L, L, L, L, L', 'L')
GdiComment = Win32API.new('gdi32',  'GdiComment', 'L, L, lpData As Byte', 'L')
GdiFlush = Win32API.new('gdi32',  'GdiFlush', '', 'L')
GdiGetBatchLimit = Win32API.new('gdi32',  'GdiGetBatchLimit', '', 'L')
GdiSetBatchLimit = Win32API.new('gdi32',  'GdiSetBatchLimit', 'L', 'L')
GetArcDirection = Win32API.new('gdi32',  'GetArcDirection', 'L', 'L')
GetAspectRatioFilterEx = Win32API.new('gdi32',  'GetAspectRatioFilterEx', 'L, lpAspectRatio As SIZE', 'L')
GetBitmapBits = Win32API.new('gdi32',  'GetBitmapBits', 'L, L, lpBits As Any', 'L')
GetBitmapDimensionEx = Win32API.new('gdi32',  'GetBitmapDimensionEx', 'L, lpDimension As SIZE', 'L')
GetBkColor = Win32API.new('gdi32',  'GetBkColor', 'L', 'L')
GetBkMode = Win32API.new('gdi32',  'GetBkMode', 'L', 'L')
GetBoundsRect = Win32API.new('gdi32',  'GetBoundsRect', 'L, lprcBounds As RECT, L', 'L')
GetCharABCWidths = Win32API.new('gdi32',  'GetCharABCWidthsA', 'L, L, L, lpabc As ABC', 'L')
GetCharABCWidthsFloat = Win32API.new('gdi32',  'GetCharABCWidthsFloatA', 'L, L, L, lpABCF As ABCFLOAT', 'L')
GetCharacterPlacement = Win32API.new('gdi32',  ' GetCharacterPlacementA', 'L, P, L, L, lpGcpResults As GCP_RESULTS, L', 'L')
GetCharWidth = Win32API.new('gdi32',  'GetCharWidthA', 'L, L, L, L', 'L')
GetCharWidth32 = Win32API.new('gdi32',  'GetCharWidth32A', 'L, L, L, L', 'L')
GetCharWidthFloat = Win32API.new('gdi32',  'GetCharWidthFloatA', 'L, L, L, pxBuffer As Double', 'L')
GetClipBox = Win32API.new('gdi32',  'GetClipBox', 'L, lpRect As RECT', 'L')
GetClipRgn = Win32API.new('gdi32',  'GetClipRgn', 'L, L', 'L')
GetColorAdjustment = Win32API.new('gdi32',  'GetColorAdjustment', 'L, lpca As COLORADJUSTMENT', 'L')
GetColorSpace = Win32API.new('gdi32',  'GetColorSpace', 'L', 'L')
GetCurrentObject = Win32API.new('gdi32',  'GetCurrentObject', 'L, L', 'L')
GetCurrentPositionEx = Win32API.new('gdi32',  'GetCurrentPositionEx', 'L, lpPoint As POINTAPI', 'L')
GetDCOrgEx = Win32API.new('gdi32',  'GetDCOrgEx', 'L, lpPoint As POINTAPI', 'L')
GetDeviceCaps = Win32API.new('gdi32',  'GetDeviceCaps', 'L, L', 'L')
GetDeviceGammaRamp = Win32API.new('gdi32',  'GetDeviceGammaRamp', 'L, lpv As Any', 'L')
GetDIBits = Win32API.new('gdi32',  'GetDIBits', 'L, L, L, L, lpBits As Any, lpBI As BITMAPINFO, L', 'L')
GetEnhMetaFile = Win32API.new('gdi32',  'GetEnhMetaFileA', 'P', 'L')
GetEnhMetaFileBits = Win32API.new('gdi32',  'GetEnhMetaFileBits', 'L, L, lpbBuffer As Byte', 'L')
GetEnhMetaFileDescription = Win32API.new('gdi32',  'GetEnhMetaFileDescriptionA', 'L, L, P', 'L')
GetEnhMetaFileHeader = Win32API.new('gdi32',  'GetEnhMetaFileHeader', 'L, L, lpemh As ENHMETAHEADER', 'L')
GetEnhMetaFilePaletteEntries = Win32API.new('gdi32',  'GetEnhMetaFilePaletteEntries', 'L, L, lppe As PALETTEENTRY', 'L')   
GetFontData = Win32API.new('gdi32',  'GetFontDataA', 'L, L, L, lpvBuffer As Any, L', 'L')   
GetFontLanguageInfo = Win32API.new('gdi32',  'GetFontLanguageInfo', 'L', 'L')   
GetGlyphOutline = Win32API.new('gdi32',  'GetGlyphOutlineA', 'L, L, L, lpgm As GLYPHMETRICS, L, lpBuffer As Any, lpmat2 As MAT2', '   L')
GetGraphicsMode = Win32API.new('gdi32',  'GetGraphicsMode', 'L', 'L')   
GetICMProfile = Win32API.new('gdi32',  'GetICMProfileA', 'L, L, P', 'L')   
GetKerningPairs = Win32API.new('gdi32',  'GetKerningPairsA', 'L, L, lpkrnpair As KERNINGPAIR', 'L')   
GetLogColorSpace = Win32API.new('gdi32',  'GetLogColorSpaceA', 'L, ByVal lplogcolorspace As LOGCOLORSPACE, L', 'L')   
GetMapMode = Win32API.new('gdi32',  'GetMapMode', 'L', 'L')   
GetMetaFile = Win32API.new('gdi32',  'GetMetaFileA', 'P', 'L')   
GetMetaFileBitsEx = Win32API.new('gdi32',  'GetMetaFileBitsEx', 'L, L, lpvData As Any', 'L')   
GetMetaRgn = Win32API.new('gdi32',  'GetMetaRgn', 'L, L', 'L')   
GetMiterLimit = Win32API.new('gdi32',  'GetMiterLimit', 'L, peLimit As Double', 'L')   
GetNearestColor = Win32API.new('gdi32',  'GetNearestColor', 'L, L', 'L')   
GetNearestPaletteIndex = Win32API.new('gdi32',  'GetNearestPaletteIndex', 'L, L', 'L')   
GetObject = Win32API.new('gdi32',  'GetObjectA', 'L, L, lpObject As Any', 'L')   
GetObjectType = Win32API.new('gdi32',  'GetObjectType', 'L', 'L')
GetOutlineTextMetrics = Win32API.new('gdi32',  'GetOutlineTextMetricsA', 'L, L, lpotm As OUTLINETEXTMETRIC', 'L')
GetPaletteEntries = Win32API.new('gdi32',  'GetPaletteEntries', 'L, L, L, lpPaletteEntries As PALETTEENTRY', 'L')
GetPath = Win32API.new('gdi32',  'GetPath', 'L, lpPoint As POINTAPI, lpTypes As Byte, L', 'L')
GetPixel = Win32API.new('gdi32',  'GetPixel', 'L, L, L', 'L')
GetPolyFillMode = Win32API.new('gdi32',  'GetPolyFillMode', 'L', 'L')
GetProcAddress Lib 'kernel32' 'GetProcAddress', 'L, P', 'L')
GetRasterizerCaps = Win32API.new('gdi32',  'GetRasterizerCaps', 'lpraststat As RASTERIZER_STATUS, L', 'L')
GetRegionData = Win32API.new('gdi32',  'GetRegionDataA', 'L, L, lpRgnData As RgnData', 'L')
GetRgnBox = Win32API.new('gdi32',  'GetRgnBox', 'L, lpRect As RECT', 'L')
GetROP2 = Win32API.new('gdi32',  'GetROP2', 'L', 'L')
GetStockObject = Win32API.new('gdi32',  'GetStockObject', 'L', 'L')
GetStretchBltMode = Win32API.new('gdi32',  'GetStretchBltMode', 'L', 'L')
GetSystemPaletteEntries = Win32API.new('gdi32',  'GetSystemPaletteEntries', 'L, L, L, lpPaletteEntries As PALETTEENTRY', 'L')
GetSystemPaletteUse = Win32API.new('gdi32',  'GetSystemPaletteUse', 'L', 'L')
GetTextAlign = Win32API.new('gdi32',  'GetTextAlign', 'L', 'L')
GetTextCharacterExtra = Win32API.new('gdi32',  'GetTextCharacterExtraA', 'L', 'L')
GetTextColor = Win32API.new('gdi32',  'GetTextColor', 'L', 'L')
GetTextExtentExPoint = Win32API.new('gdi32',  'GetTextExtentExPointA', 'L, P, L, L, L, aL, lpSize As SIZE', 'L')
GetTextExtentPoint = Win32API.new('gdi32',  'GetTextExtentPointA', 'L, P, L, lpSize As SIZE', 'L')
GetTextExtentPoint32 = Win32API.new('gdi32',  'GetTextExtentPoint32A', 'L, P, L, lpSize As SIZE', 'L')
GetTextFace = Win32API.new('gdi32',  'GetTextFaceA', 'L, L, P', 'L')
GetTextMetrics = Win32API.new('gdi32',  'GetTextMetricsA', 'L, lpMetrics As TEXTMETRIC', 'L')
GetViewportExtEx = Win32API.new('gdi32',  'GetViewportExtEx', 'L, lpSize As SIZE', 'L')
GetViewportOrgEx = Win32API.new('gdi32',  'GetViewportOrgEx', 'L, lpPoint As POINTAPI', 'L')
GetWindowExtEx = Win32API.new('gdi32',  'GetWindowExtEx', 'L, lpSize As SIZE', 'L')
GetWindowOrgEx = Win32API.new('gdi32',  'GetWindowOrgEx', 'L, lpPoint As POINTAPI', 'L')
GetWinMetaFileBits = Win32API.new('gdi32',  'GetWinMetaFileBits', 'L, L, lpbBuffer As Byte, L, L', 'L')
GetWorldTransform = Win32API.new('gdi32',  'GetWorldTransform', 'L, lpXform As xform', 'L')
IntersectClipRect = Win32API.new('gdi32',  'IntersectClipRect', 'L, L, L, L, L', 'L')
InvertRgn = Win32API.new('gdi32',  'InvertRgn', 'L, L', 'L')
LineTo = Win32API.new('gdi32',  'LineTo', 'L, L, L', 'L')
LPtoDP = Win32API.new('gdi32',  'LPtoDP', 'L, lpPoint As POINTAPI, L', 'L')   
MaskBlt = Win32API.new('gdi32',  'MaskBlt', 'L, L, L, L, L, L, L, L, L, L, L, L', 'L')   
ModifyWorldTransform = Win32API.new('gdi32',  'ModifyWorldTransform', 'L, lpXform As xform, L', 'L')   
MoveToEx = Win32API.new('gdi32',  'MoveToEx', 'L, L, L, lpPoint As POINTAPI', 'L')   
OffsetClipRgn = Win32API.new('gdi32',  'OffsetClipRgn', 'L, L, L', 'L')   
OffsetRgn = Win32API.new('gdi32',  'OffsetRgn', 'L, L, L', 'L')   
OffsetViewportOrgEx = Win32API.new('gdi32',  'OffsetViewportOrgEx', 'L, L, L, lpPoint As POINTAPI', 'L')   
OffsetWindowOrgEx = Win32API.new('gdi32',  'OffsetWindowOrgEx', 'L, L, L, lpPoint As POINTAPI', 'L')   
PaintRgn = Win32API.new('gdi32',  'PaintRgn', 'L, L', 'L')   
PatBlt = Win32API.new('gdi32',  'PatBlt', 'L, L, L, L, L, L', 'L')   
PathToRegion = Win32API.new('gdi32',  'PathToRegion', 'L', 'L')   
Pie = Win32API.new('gdi32',  'Pie', 'L, L, L, L, L, L, L, L, L', 'L')   
PlayEnhMetaFile = Win32API.new('gdi32',  'PlayEnhMetaFile', 'L, L, lpRect As RECT', 'L')   
PlayEnhMetaFileRecord = Win32API.new('gdi32',  'PlayEnhMetaFileRecord', 'L, lpHandletable As HANDLETABLE, lpEnhMetaRecord As ENHMETARECORD, L', 'L')
PlayMetaFile = Win32API.new('gdi32',  'PlayMetaFile', 'L, L', 'L')   
PlayMetaFileRecord = Win32API.new('gdi32',  'PlayMetaFileRecord', 'L, lpHandletable As HANDLETABLE, lpMetaRecord As METARECORD, L',   'L')
PlgBlt = Win32API.new('gdi32',  'PlgBlt', 'L, lpPoint As POINTAPI, L, L, L, L, L, L, L, L', 'L')
PolyBezier = Win32API.new('gdi32',  'PolyBezier', 'L, lppt As POINTAPI, L', 'L')
PolyBezierTo = Win32API.new('gdi32',  'PolyBezierTo', 'L, lppt As POINTAPI, L', 'L')
PolyDraw = Win32API.new('gdi32',  'PolyDraw', 'L, lppt As POINTAPI, lpbTypes As Byte, L', 'L')
Polygon = Win32API.new('gdi32',  'Polygon', 'L, lpPoint As POINTAPI, L', 'L')
Polyline = Win32API.new('gdi32',  'Polyline', 'L, lpPoint As POINTAPI, L', 'L')
PolylineTo = Win32API.new('gdi32',  'PolylineTo', 'L, lppt As POINTAPI, L', 'L')
PolyPolygon = Win32API.new('gdi32',  'PolyPolygon', 'L, lpPoint As POINTAPI, L, L', 'L')
PolyPolyline = Win32API.new('gdi32',  'PolyPolyline', 'L, lppt As POINTAPI, L, L', 'L')
PolyTextOut = Win32API.new('gdi32',  'PolyTextOutA', 'L, pptxt As POLYTEXT, L', 'L')
PtInRegion = Win32API.new('gdi32',  'PtInRegion', 'L, L, L', 'L')
PtVisible = Win32API.new('gdi32',  'PtVisible', 'L, L, L', 'L')
RealizePalette = Win32API.new('gdi32',  'RealizePalette', 'L', 'L')
Rectangle = Win32API.new('gdi32',  'Rectangle', 'L, L, L, L, L', 'L')
RectInRegion = Win32API.new('gdi32',  'RectInRegion', 'L, lpRect As RECT', 'L')
RectVisible = Win32API.new('gdi32',  'RectVisible', 'L, lpRect As RECT', 'L')
RemoveFontResource = Win32API.new('gdi32',  'RemoveFontResourceA', 'P', 'L')
ResetDC = Win32API.new('gdi32',  'ResetDCA', 'L, lpInitData As DEVMODE', 'L')
ResizePalette = Win32API.new('gdi32',  'ResizePalette', 'L, L', 'L')
RestoreDC = Win32API.new('gdi32',  'RestoreDC', 'L, L', 'L')
RoundRect = Win32API.new('gdi32',  'RoundRect', 'L, L, L, L, L, L, L', 'L')
SaveDC = Win32API.new('gdi32',  'SaveDC', 'L', 'L')
ScaleViewportExtEx = Win32API.new('gdi32',  'ScaleViewportExtEx', 'L, L, L, L, L, lpSize As SIZE', 'L')
ScaleWindowExtEx = Win32API.new('gdi32',  'ScaleWindowExtEx', 'L, L, L, L, L, lpSize As SIZE', 'L')
SelectClipPath = Win32API.new('gdi32',  'SelectClipPath', 'L, L', 'L')
SelectClipRgn = Win32API.new('gdi32',  'SelectClipRgn', 'L, L', 'L')
SelectObject Lib 'user32' 'SelectObject', 'L, L', 'L')
SelectPalette = Win32API.new('gdi32',  'SelectPalette', 'L, L, L', 'L')
SetArcDirection = Win32API.new('gdi32',  'SetArcDirection', 'L, L', 'L')
SetBitmapBits = Win32API.new('gdi32',  'SetBitmapBits', 'L, L, lpBits As Any', 'L')
SetBitmapDimensionEx = Win32API.new('gdi32',  'SetBitmapDimensionEx', 'L, L, L, lpSize As SIZE', 'L')
SetBkColor = Win32API.new('gdi32',  'SetBkColor', 'L, L', 'L')
SetBkMode = Win32API.new('gdi32',  'SetBkMode', 'L, L', 'L')   
SetBoundsRect = Win32API.new('gdi32',  'SetBoundsRect', 'L, lprcBounds As RECT, L', 'L')   
SetBrushOrgEx = Win32API.new('gdi32',  'SetBrushOrgEx', 'L, L, L, lppt As POINTAPI', 'L')   
SetColorAdjustment = Win32API.new('gdi32',  'SetColorAdjustment', 'L, lpca As COLORADJUSTMENT', 'L')   
SetColorSpace = Win32API.new('gdi32',  'SetColorSpace', 'L, L', 'L')   
SetDeviceGammaRamp = Win32API.new('gdi32',  'SetDeviceGammaRamp', 'L, lpv As Any', 'L')   
SetDIBits = Win32API.new('gdi32',  'SetDIBits', 'L, L, L, L, lpBits As Any, lpBI As BITMAPINFO, L', 'L')   
SetDIBitsToDevice = Win32API.new('gdi32',  'SetDIBitsToDevice', 'L, L, L, L, L, L, L, L, L, Bits As Any, BitsInfo As BITMAPINFO, L'   , 'L')
SetEnhMetaFileBits = Win32API.new('gdi32',  'SetEnhMetaFileBits', 'L, lpData As Byte', 'L')   
SetGraphicsMode = Win32API.new('gdi32',  'SetGraphicsMode', 'L, L', 'L')   
SetICMMode = Win32API.new('gdi32',  'SetICMMode', 'L, L', 'L')   
SetICMProfile = Win32API.new('gdi32',  'SetICMProfileA', 'L, P', 'L')   
SetMapMode = Win32API.new('gdi32',  'SetMapMode', 'L, L', 'L')   
SetMapperFlags = Win32API.new('gdi32',  'SetMapperFlags', 'L, L', 'L')   
SetMetaFileBitsEx = Win32API.new('gdi32',  'SetMetaFileBitsEx', 'L, lpData As Byte', 'L')   
SetMetaRgn = Win32API.new('gdi32',  'SetMetaRgn', 'L', 'L')   
SetMiterLimit = Win32API.new('gdi32',  'SetMiterLimit', 'L, ByVal eNewLimit As Double, peOldLimit As Double', 'L')
SetPaletteEntries = Win32API.new('gdi32',  'SetPaletteEntries', 'L, L, L, lpPaletteEntries As PALETTEENTRY', 'L')
SetPixel = Win32API.new('gdi32',  'SetPixel', 'L, L, L, L', 'L')
SetPixelV = Win32API.new('gdi32',  'SetPixelV', 'L, L, L, L', 'L')
SetPolyFillMode = Win32API.new('gdi32',  'SetPolyFillMode', 'L, L', 'L')
SetRectRgn = Win32API.new('gdi32',  'SetRectRgn', 'L, L, L, L, L', 'L')
SetROP2 = Win32API.new('gdi32',  'SetROP2', 'L, L', 'L')
SetStretchBltMode = Win32API.new('gdi32',  'SetStretchBltMode', 'L, L', 'L')
SetSystemPaletteUse = Win32API.new('gdi32',  'SetSystemPaletteUse', 'L, L', 'L')
SetTextAlign = Win32API.new('gdi32',  'SetTextAlign', 'L, L', 'L')
SetTextCharacterExtra = Win32API.new('gdi32',  'SetTextCharacterExtraA', 'L, L', 'L')
SetTextColor = Win32API.new('gdi32',  'SetTextColor', 'L, L', 'L')
SetTextJustification = Win32API.new('gdi32',  'SetTextJustification', 'L, L, L', 'L')
SetViewportExtEx = Win32API.new('gdi32',  'SetViewportExtEx', 'L, L, L, lpSize As SIZE', 'L')
SetViewportOrgEx = Win32API.new('gdi32',  'SetViewportOrgEx', 'L, L, L, lpPoint As POINTAPI', 'L')
SetWindowExtEx = Win32API.new('gdi32',  'SetWindowExtEx', 'L, L, L, lpSize As SIZE', 'L')
SetWindowOrgEx = Win32API.new('gdi32',  'SetWindowOrgEx', 'L, L, L, lpPoint As POINTAPI', 'L')   
SetWinMetaFileBits = Win32API.new('gdi32',  'SetWinMetaFileBits', 'L, lpbBuffer As Byte, L, lpmfp As METAFILEPICT', 'L')   
SetWorldTransform = Win32API.new('gdi32',  'SetWorldTransform', 'L, lpXform As xform', 'L')   
StartDoc = Win32API.new('gdi32',  'StartDocA', 'L, lpdi As DOCINFO', 'L')   
StartPage = Win32API.new('gdi32',  'StartPage', 'L', 'L')   
StretchBlt = Win32API.new('gdi32',  'StretchBlt', 'L, L, L, L, L, L, L, L, L, L, L', 'L')   
StretchDIBits = Win32API.new('gdi32',  'StretchDIBits', 'L, L, L, L, L, L, L, L, L, lpBits As Any, lpBitsInfo As BITMAPINFO, L, L',   'L')
StrokeAndFillPath = Win32API.new('gdi32',  'StrokeAndFillPath', 'L', 'L')   
StrokePath = Win32API.new('gdi32',  'StrokePath', 'L', 'L')   
TextOut = Win32API.new('gdi32',  'TextOutA', 'L, L, L, P, L', 'L')   
UnrealizeObject = Win32API.new('gdi32',  'UnrealizeObject', 'L', 'L')   
UpdateColors = Win32API.new('gdi32',  'UpdateColors', 'L', 'L')   
WidenPath = Win32API.new('gdi32',  'WidenPath', 'L', 'L')   



Formatting doesn't look so good here!
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

Albert Einstein
User avatar
JB_AU
 
Posts: 171
Joined: Tue May 21, 2013 11:01 pm

Re: Writing an Win32API refence

Postby JB_AU » Sat Nov 22, 2014 3:32 am

This is where i currently am, it contains the references to gdi32 call (api references) & the gdi32 library, will start adding definitions when the temperature is not 35 degrees celsius :mrgreen: :roll:

gdi32.zip
GDI Library & References beta
(799.86 KiB) Downloaded 805 times
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

Albert Einstein
User avatar
JB_AU
 
Posts: 171
Joined: Tue May 21, 2013 11:01 pm

Re: Writing an Win32API refence

Postby tulamide » Sat Nov 22, 2014 11:00 am

Just had a quick look.

All of us who know a little bit of C/C++ and the Windows API will be thankful for a clear and updated declaration description. I'm just not sure, what its purpose is regarding Flowstone? The Flowstoners would need such thing for the Ruby conversion, they don't have any use for the C declarations. So I think, you're doing too much work. Wouldn't it be better to convert the declarations/definitions to Ruby and just reference the Ruby implementation?
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Writing an Win32API refence

Postby JB_AU » Sun Nov 23, 2014 1:20 am

My thinking is those who are beginning without any knowledge of any language who start with Flowstone & Ruby can and will at some later stage progress to another language will have a greater understanding of how such things are put together. Not this IS & THIS works, but more so HOW.

Maybe longer to put together, maybe too much information, but a path to HOW?
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

Albert Einstein
User avatar
JB_AU
 
Posts: 171
Joined: Tue May 21, 2013 11:01 pm

Re: Writing an Win32API refence

Postby tester » Sun Nov 23, 2014 1:26 am

Doing cross-references is not that bad idea.
Let him finish the prototyping stage. :ugeek:
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
tester
 
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: Writing an Win32API refence

Postby JB_AU » Mon Nov 24, 2014 3:36 am

Thought i was closer to finishing gdi library, until i was shown another 253 missing functions :roll:
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

Albert Einstein
User avatar
JB_AU
 
Posts: 171
Joined: Tue May 21, 2013 11:01 pm

Next

Return to General

Who is online

Users browsing this forum: No registered users and 45 guests