Commit a9f55c46 authored by Huw D M Davies's avatar Huw D M Davies Committed by Alexandre Julliard

Split off wingdi16.h from wingdi.h. Add many more #defines/typedefs

to bring wingdi.h almost upto a complete NT4.0 interface. Fix return value of SetRectRgn().
parent 9d14a001
......@@ -97,7 +97,7 @@ HFONT16 PSDRV_FONT_SelectObject( DC * dc, HFONT16 hfont,
if(physDev->font.tm.tmHeight < 0) {
physDev->font.tm.tmHeight *= - (afm->FullAscender - afm->Descender) /
(afm->Ascender - afm->Descender);
TRACE(psdrv, "Fixed -ve height to %d\n", physDev->font.tm.tmHeight);
TRACE(psdrv, "Fixed -ve height to %ld\n", physDev->font.tm.tmHeight);
}
physDev->font.size = physDev->font.tm.tmHeight * 1000.0 /
(afm->FullAscender - afm->Descender);
......@@ -131,10 +131,10 @@ HFONT16 PSDRV_FONT_SelectObject( DC * dc, HFONT16 hfont,
physDev->font.set = FALSE;
TRACE(psdrv, "Selected PS font '%s' size %d weight %d.\n",
TRACE(psdrv, "Selected PS font '%s' size %d weight %ld.\n",
physDev->font.afm->FontName, physDev->font.size,
physDev->font.tm.tmWeight );
TRACE(psdrv, "H = %d As = %d Des = %d IL = %d EL = %d\n",
TRACE(psdrv, "H = %ld As = %ld Des = %ld IL = %ld EL = %ld\n",
physDev->font.tm.tmHeight, physDev->font.tm.tmAscent,
physDev->font.tm.tmDescent, physDev->font.tm.tmInternalLeading,
physDev->font.tm.tmExternalLeading);
......
......@@ -52,7 +52,8 @@ BOOL WIN16DRV_GetTextMetrics( DC *dc, TEXTMETRICA *metrics )
FONT_TextMetric16to32A( &physDev->tm, metrics );
TRACE(win16drv, "H %d, A %d, D %d, Int %d, Ext %d, AW %d, MW %d, W %d\n",
TRACE(win16drv,
"H %ld, A %ld, D %ld, Int %ld, Ext %ld, AW %ld, MW %ld, W %ld\n",
metrics->tmHeight,
metrics->tmAscent,
metrics->tmDescent,
......
......@@ -7,8 +7,11 @@
#ifndef __WINE_GDI_H
#define __WINE_GDI_H
#include "config.h"
#include "windef.h"
#include "wingdi.h"
#include "wine/wingdi16.h"
#include "ldt.h"
#include "local.h"
#include "path.h"
......@@ -302,7 +305,7 @@ typedef struct tagFLOAT_POINT
* transformation process is done in floating point internally. This function
* is then used to round these coordinates to integer values.
*/
static __inline__ INT WINE_UNUSED GDI_ROUND(FLOAT val)
static inline INT WINE_UNUSED GDI_ROUND(FLOAT val)
{
return (int)floor(val + 0.5);
}
......@@ -310,7 +313,7 @@ static __inline__ INT WINE_UNUSED GDI_ROUND(FLOAT val)
/* Performs a viewport-to-world transformation on the specified point (which
* is in floating point format). Returns TRUE if successful, else FALSE.
*/
static __inline__ BOOL WINE_UNUSED INTERNAL_DPTOLP_FLOAT(DC *dc, FLOAT_POINT *point)
static inline BOOL WINE_UNUSED INTERNAL_DPTOLP_FLOAT(DC *dc, FLOAT_POINT *point)
{
FLOAT x, y;
......@@ -334,7 +337,7 @@ static __inline__ BOOL WINE_UNUSED INTERNAL_DPTOLP_FLOAT(DC *dc, FLOAT_POINT *po
/* Performs a viewport-to-world transformation on the specified point (which
* is in integer format). Returns TRUE if successful, else FALSE.
*/
static __inline__ BOOL WINE_UNUSED INTERNAL_DPTOLP(DC *dc, LPPOINT point)
static inline BOOL WINE_UNUSED INTERNAL_DPTOLP(DC *dc, LPPOINT point)
{
FLOAT_POINT floatPoint;
......@@ -354,7 +357,7 @@ static __inline__ BOOL WINE_UNUSED INTERNAL_DPTOLP(DC *dc, LPPOINT point)
/* Performs a world-to-viewport transformation on the specified point (which
* is in floating point format).
*/
static __inline__ void WINE_UNUSED INTERNAL_LPTODP_FLOAT(DC *dc, FLOAT_POINT *point)
static inline void WINE_UNUSED INTERNAL_LPTODP_FLOAT(DC *dc, FLOAT_POINT *point)
{
FLOAT x, y;
......@@ -372,7 +375,7 @@ static __inline__ void WINE_UNUSED INTERNAL_LPTODP_FLOAT(DC *dc, FLOAT_POINT *po
/* Performs a world-to-viewport transformation on the specified point (which
* is in integer format).
*/
static __inline__ void WINE_UNUSED INTERNAL_LPTODP(DC *dc, LPPOINT point)
static inline void WINE_UNUSED INTERNAL_LPTODP(DC *dc, LPPOINT point)
{
FLOAT_POINT floatPoint;
......
......@@ -299,14 +299,10 @@ typedef LRESULT (CALLBACK *FARPROC16)();
typedef LRESULT (CALLBACK *FARPROC)();
typedef INT16 (CALLBACK *PROC16)();
typedef INT (CALLBACK *PROC)();
typedef INT16 (CALLBACK *GOBJENUMPROC16)(SEGPTR,LPARAM);
typedef INT (CALLBACK *GOBJENUMPROC)(LPVOID,LPARAM);
typedef BOOL16 (CALLBACK *GRAYSTRINGPROC16)(HDC16,LPARAM,INT16);
typedef BOOL (CALLBACK *GRAYSTRINGPROC)(HDC,LPARAM,INT);
typedef LRESULT (CALLBACK *HOOKPROC16)(INT16,WPARAM16,LPARAM);
typedef LRESULT (CALLBACK *HOOKPROC)(INT,WPARAM,LPARAM);
typedef VOID (CALLBACK *LINEDDAPROC16)(INT16,INT16,LPARAM);
typedef VOID (CALLBACK *LINEDDAPROC)(INT,INT,LPARAM);
typedef BOOL16 (CALLBACK *PROPENUMPROC16)(HWND16,SEGPTR,HANDLE16);
typedef BOOL (CALLBACK *PROPENUMPROCA)(HWND,LPCSTR,HANDLE);
typedef BOOL (CALLBACK *PROPENUMPROCW)(HWND,LPCWSTR,HANDLE);
......
......@@ -3,7 +3,7 @@
#include "winuser.h" /* winuser.h needed for MSGBOXCALLBACK */
/* wingdi.h needed for COLORREF */
#include "wine/wingdi16.h"
#include "pshpack1.h"
......@@ -256,6 +256,16 @@ typedef struct
DWORD dwExStyle WINE_PACKED;
} CREATESTRUCT16, *LPCREATESTRUCT16;
typedef struct
{
HDC16 hdc;
BOOL16 fErase;
RECT16 rcPaint;
BOOL16 fRestore;
BOOL16 fIncUpdate;
BYTE rgbReserved[16];
} PAINTSTRUCT16, *LPPAINTSTRUCT16;
typedef struct
{
HMENU16 hWindowMenu;
......@@ -304,6 +314,24 @@ typedef struct
SEGPTR lppos;
} NCCALCSIZE_PARAMS16, *LPNCCALCSIZE_PARAMS16;
typedef struct {
UINT16 cbSize;
INT16 iBorderWidth;
INT16 iScrollWidth;
INT16 iScrollHeight;
INT16 iCaptionWidth;
INT16 iCaptionHeight;
LOGFONT16 lfCaptionFont;
INT16 iSmCaptionWidth;
INT16 iSmCaptionHeight;
LOGFONT16 lfSmCaptionFont;
INT16 iMenuWidth;
INT16 iMenuHeight;
LOGFONT16 lfMenuFont;
LOGFONT16 lfStatusFont;
LOGFONT16 lfMessageFont;
} NONCLIENTMETRICS16,*LPNONCLIENTMETRICS16;
/* Journalling hook structure */
typedef struct
......
......@@ -368,6 +368,53 @@ typedef struct
#define OIC_HDISK 32524
#define OIC_NETWORK 32525
#define COLOR_SCROLLBAR 0
#define COLOR_BACKGROUND 1
#define COLOR_ACTIVECAPTION 2
#define COLOR_INACTIVECAPTION 3
#define COLOR_MENU 4
#define COLOR_WINDOW 5
#define COLOR_WINDOWFRAME 6
#define COLOR_MENUTEXT 7
#define COLOR_WINDOWTEXT 8
#define COLOR_CAPTIONTEXT 9
#define COLOR_ACTIVEBORDER 10
#define COLOR_INACTIVEBORDER 11
#define COLOR_APPWORKSPACE 12
#define COLOR_HIGHLIGHT 13
#define COLOR_HIGHLIGHTTEXT 14
#define COLOR_BTNFACE 15
#define COLOR_BTNSHADOW 16
#define COLOR_GRAYTEXT 17
#define COLOR_BTNTEXT 18
#define COLOR_INACTIVECAPTIONTEXT 19
#define COLOR_BTNHIGHLIGHT 20
/* win95 colors */
#define COLOR_3DDKSHADOW 21
#define COLOR_3DLIGHT 22
#define COLOR_INFOTEXT 23
#define COLOR_INFOBK 24
#define COLOR_DESKTOP COLOR_BACKGROUND
#define COLOR_3DFACE COLOR_BTNFACE
#define COLOR_3DSHADOW COLOR_BTNSHADOW
#define COLOR_3DHIGHLIGHT COLOR_BTNHIGHLIGHT
#define COLOR_3DHILIGHT COLOR_BTNHIGHLIGHT
#define COLOR_BTNHILIGHT COLOR_BTNHIGHLIGHT
/* win98 colors */
#define COLOR_ALTERNATEBTNFACE 25 /* undocumented, constant's name unknown */
#define COLOR_HOTLIGHT 26
#define COLOR_GRADIENTACTIVECAPTION 27
#define COLOR_GRADIENTINACTIVECAPTION 28
/* WM_CTLCOLOR values */
#define CTLCOLOR_MSGBOX 0
#define CTLCOLOR_EDIT 1
#define CTLCOLOR_LISTBOX 2
#define CTLCOLOR_BTN 3
#define CTLCOLOR_DLG 4
#define CTLCOLOR_SCROLLBAR 5
#define CTLCOLOR_STATIC 6
/* Edit control messages */
#define EM_GETSEL 0x00b0
#define EM_SETSEL 0x00b1
......@@ -761,6 +808,16 @@ typedef struct
DECL_WINELIB_TYPE_AW(CREATESTRUCT)
DECL_WINELIB_TYPE_AW(LPCREATESTRUCT)
typedef struct
{
HDC hdc;
BOOL fErase;
RECT rcPaint;
BOOL fRestore;
BOOL fIncUpdate;
BYTE rgbReserved[32];
} PAINTSTRUCT, *PPAINTSTRUCT, *LPPAINTSTRUCT;
typedef struct
{
HMENU hWindowMenu;
......@@ -2110,6 +2167,46 @@ typedef struct
#define SPIF_SENDWININICHANGE 2
#define SPIF_SENDCHANGE SPIF_SENDWININICHANGE
typedef struct {
UINT cbSize;
INT iBorderWidth;
INT iScrollWidth;
INT iScrollHeight;
INT iCaptionWidth;
INT iCaptionHeight;
LOGFONTA lfCaptionFont;
INT iSmCaptionWidth;
INT iSmCaptionHeight;
LOGFONTA lfSmCaptionFont;
INT iMenuWidth;
INT iMenuHeight;
LOGFONTA lfMenuFont;
LOGFONTA lfStatusFont;
LOGFONTA lfMessageFont;
} NONCLIENTMETRICSA,*LPNONCLIENTMETRICSA;
typedef struct {
UINT cbSize;
INT iBorderWidth;
INT iScrollWidth;
INT iScrollHeight;
INT iCaptionWidth;
INT iCaptionHeight;
LOGFONTW lfCaptionFont;
INT iSmCaptionWidth;
INT iSmCaptionHeight;
LOGFONTW lfSmCaptionFont;
INT iMenuWidth;
INT iMenuHeight;
LOGFONTW lfMenuFont;
LOGFONTW lfStatusFont;
LOGFONTW lfMessageFont;
} NONCLIENTMETRICSW,*LPNONCLIENTMETRICSW;
DECL_WINELIB_TYPE_AW(NONCLIENTMETRICS)
DECL_WINELIB_TYPE_AW(LPNONCLIENTMETRICS)
/* Window Styles */
#define WS_OVERLAPPED 0x00000000L
#define WS_POPUP 0x80000000L
......
......@@ -10,6 +10,8 @@
#include <string.h>
#include <ctype.h>
#include "winspool.h"
#include "winbase.h"
#include "wine/wingdi16.h"
#include "ldt.h"
#include "winerror.h"
#include "winreg.h"
......
......@@ -980,16 +980,16 @@ BOOL WINAPI GetTextMetricsA( HDC hdc, TEXTMETRICA *metrics )
metrics->tmOverhang = WDPTOLP(metrics->tmOverhang);
TRACE_(font)("text metrics:\n"
" Weight = %03i\t FirstChar = %03i\t AveCharWidth = %i\n"
" Italic = % 3i\t LastChar = %03i\t\t MaxCharWidth = %i\n"
" UnderLined = %01i\t DefaultChar = %03i\t Overhang = %i\n"
" Weight = %03li\t FirstChar = %03i\t AveCharWidth = %li\n"
" Italic = % 3i\t LastChar = %03i\t\t MaxCharWidth = %li\n"
" UnderLined = %01i\t DefaultChar = %03i\t Overhang = %li\n"
" StruckOut = %01i\t BreakChar = %03i\t CharSet = %i\n"
" PitchAndFamily = %02x\n"
" --------------------\n"
" InternalLeading = %i\n"
" Ascent = %i\n"
" Descent = %i\n"
" Height = %i\n",
" InternalLeading = %li\n"
" Ascent = %li\n"
" Descent = %li\n"
" Height = %li\n",
metrics->tmWeight, metrics->tmFirstChar, metrics->tmAveCharWidth,
metrics->tmItalic, metrics->tmLastChar, metrics->tmMaxCharWidth,
metrics->tmUnderlined, metrics->tmDefaultChar, metrics->tmOverhang,
......
......@@ -6,7 +6,7 @@
#include <stdlib.h>
#include "wingdi.h"
#include "wine/wingdi16.h"
/**********************************************************************
* LineDDA16 (GDI.100)
......
......@@ -333,7 +333,7 @@ VOID WINAPI SetRectRgn16( HRGN16 hrgn, INT16 left, INT16 top,
*
* Allows either or both left and top to be greater than right or bottom.
*/
VOID WINAPI SetRectRgn( HRGN hrgn, INT left, INT top,
BOOL WINAPI SetRectRgn( HRGN hrgn, INT left, INT top,
INT right, INT bottom )
{
RGNOBJ * obj;
......@@ -341,7 +341,7 @@ VOID WINAPI SetRectRgn( HRGN hrgn, INT left, INT top,
TRACE(region, " %04x %d,%d-%d,%d\n",
hrgn, left, top, right, bottom );
if (!(obj = (RGNOBJ *) GDI_GetObjPtr( hrgn, REGION_MAGIC ))) return;
if (!(obj = (RGNOBJ *) GDI_GetObjPtr( hrgn, REGION_MAGIC ))) return FALSE;
if (left > right) { INT tmp = left; left = right; right = tmp; }
if (top > bottom) { INT tmp = top; top = bottom; bottom = tmp; }
......@@ -359,6 +359,7 @@ VOID WINAPI SetRectRgn( HRGN hrgn, INT left, INT top,
EMPTY_REGION(obj->rgn);
GDI_HEAP_UNLOCK( hrgn );
return TRUE;
}
......
......@@ -8,6 +8,7 @@
#include "winuser.h"
#include "module.h"
#include "debug.h"
#include "wine/wingdi16.h"
DEFAULT_DEBUG_CHANNEL(caret)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment