Module Wingdi.pkg

     1//************************************************************************
     2//--- WinGDI.pkg   Symbolic Constants
     3//
     4// Copyright (c) 1983-1997 Data Access Corporation, Miami Florida,
     5// All rights reserved.
     6// DataFlex is a registered trademark of Data Access Corporation.
     7//
     8//************************************************************************
     9//  Description:
    10//      Windows' GDI API related functions and symbols
    11//
    12//  Author: Stuart W. Booth
    13//************************************************************************
    14
    15Use DLL.pkg
    16Use RGB.pkg
    17
    18External_Function GetTextExtent "GetTextExtentPoint32A" Gdi32.dll ;
    19    Handle hDC ;
    20    Pointer lpString ;
    21    DWord cbString ;
    22    Pointer lpSize ;
    23    Returns Integer
    24
    25External_Function MoveTo "MoveToEx" GDI32.dll ;
    26    Handle  hDC ;
    27    Integer x Integer y;
    28    Pointer lpPoint;
    29    Returns Dword
    30
    31External_Function LineTo "LineTo" GDI32.dll ;
    32    Handle  hDC ;
    33    Integer X ;
    34    Integer Y ;
    35    Returns Integer
    36
    37External_Function Rectangle "Rectangle" GDI32.dll ;
    38    Handle  hDC ;
    39    Integer X1 ;
    40    Integer Y1 ;
    41    Integer X2 ;
    42    Integer Y2 ;
    43    Returns Integer
    44
    45External_Function Ellipse "Ellipse" GDI32.dll ;
    46    Handle hWnd ;
    47    DWORD x DWORD y ;
    48    DWORD xx DWORD yy ;
    49    Returns Integer
    50
    51External_Function RoundRect "RoundRect" GDI32.dll ;
    52    Handle hWnd ;
    53    DWORD  x   DWORD y   ;
    54    DWORD  xx  DWORD yy  ;
    55    DWORD  xCE DWORD yCE ;
    56    Returns Integer
    57
    58// Polyline draws multiple lines with the given coordinates. the first point is a starting
    59// point and there is no line drawn to this point.
    60External_Function Polyline "Polyline" GDI32.DLL ;
    61    HANDLE hDC POINTER lpPolyRect DWORD dwPoints RETURNS Integer
    62
    63
    64External_Function GetStockObject "GetStockObject" GDI32.dll ;
    65    Integer nIndex ;
    66    Returns Integer
    67
    68External_Function SelectObject "SelectObject" GDI32.dll ;
    69    Handle  hDC ;
    70    Handle  hObject ;
    71    Returns Integer
    72
    73External_Function DeleteObject "DeleteObject" GDI32.dll ;
    74    Handle  hObject ;
    75    Returns Integer
    76
    77External_Function CreatePen "CreatePen" GDI32.dll ;
    78    DWORD   nPenStyle ;
    79    DWORD   nWidth ;
    80    Dword   crColor ;
    81    Returns Integer
    82
    83External_Function CreateSolidBrush "CreateSolidBrush" GDI32.dll ;
    84    Dword   crColor ;
    85    Returns Integer
    86
    87
    88External_Function SetROP2 "SetROP2" GDI32.dll ;
    89   Handle hDC ;
    90   Integer fuFlag ;
    91   Returns Integer
    92
    93External_Function TextOut "TextOutA" GDI32.dll ;
    94   Handle hDC ;
    95   DWord X ;
    96   Dword Y ;
    97   POINTER lpszText ;
    98   integer num_bytes ;
    99   RETURNS integer
   100
   101External_Function SetBkMode "SetBkMode" GDI32.dll ;
   102   Handle hDC ;
   103   integer fuMode ;
   104   RETURNS integer
   105
   106External_Function SetTextColor "SetTextColor" GDI32.dll ;
   107   Handle hDC ;
   108   DWORD  crColor ;
   109   RETURNS DWord
   110
   111External_Function GetDeviceCaps "GetDeviceCaps" Gdi32.dll ;
   112    Handle hdc ;         // handle to the device context
   113    Integer nIndex ;     // item to be returned
   114    Returns Integer      // returns the value of the desired item 
   115
   116External_Function GetMapMode "GetMapMode" Gdi32.dll ;
   117    Handle hdc ;
   118    Returns Integer    // One of MM_TEXT, MM_HIMETRIC etc.    
   119
   120External_Function GetTextMetrics "GetTextMetricsA" Gdi32.dll ;
   121  Handle hdc ;
   122  Pointer lptm ; 
   123  Returns Boolean  
   124
   125External_Function CreateFontIndirect "CreateFontIndirectA" Gdi32.dll ;
   126  Pointer lplf ;
   127  Returns Handle
   128
   129// Pen Styles
   130#REPLACE PS_SOLID            0
   131#REPLACE PS_DASH             1
   132#REPLACE PS_DOT              2
   133#REPLACE PS_DASHDOT          3
   134#REPLACE PS_DASHDOTDOT       4
   135#REPLACE PS_NULL             5
   136#REPLACE PS_INSIDEFRAME      6
   137
   138// Stock pens for use with GetStockObject()
   139#REPLACE WHITE_PEN          6
   140#REPLACE BLACK_PEN          7
   141#REPLACE NULL_PEN           8
   142
   143// Stock brushes for use with GetStockObject()
   144#REPLACE WHITE_BRUSH        0
   145#REPLACE LTGRAY_BRUSH       1
   146#REPLACE GRAY_BRUSH         2
   147#REPLACE DKGRAY_BRUSH       3
   148#REPLACE BLACK_BRUSH        4
   149#REPLACE NULL_BRUSH         5
   150#REPLACE HOLLOW_BRUSH       NULL_BRUSH
   151
   152// Stock fonts for use with GetStockObject()
   153#REPLACE OEM_FIXED_FONT      10
   154#REPLACE ANSI_FIXED_FONT     11
   155#REPLACE ANSI_VAR_FONT       12
   156#REPLACE SYSTEM_FONT         13
   157#REPLACE DEVICE_DEFAULT_FONT 14
   158#REPLACE DEFAULT_PALETTE     15
   159#REPLACE SYSTEM_FIXED_FONT   16
   160
   161// SetBkMode's
   162#REPLACE TRANSPARENT 1
   163#REPLACE OPAQUE      2
   164
   165Define LOGPIXELSX for 88    // Logical pixels/inch in X
   166Define LOGPIXELSY for 90    // Logical pixels/inch in Y
   167
   168Define LF_FACESIZE for 32   // Logical Font
   169
   170// Mapping Modes
   171Define MM_TEXT        for 1
   172Define MM_LOMETRIC    for 2
   173Define MM_HIMETRIC    for 3
   174Define MM_LOENGLISH   for 4
   175Define MM_HIENGLISH   for 5
   176Define MM_TWIPS       for 6
   177Define MM_ISOTROPIC   for 7
   178Define MM_ANISOTROPIC for 8
   179