Added regedit unit test, a couple minor changes to regedit.
[wine] / dlls / gdi / mfdrv / mapping.c
1 /*
2  * Metafile GDI mapping mode functions
3  *
4  * Copyright 1996 Alexandre Julliard
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20
21 #include "gdi.h"
22 #include "mfdrv/metafiledrv.h"
23
24
25 /***********************************************************************
26  *           MFDRV_SetMapMode
27  */
28 INT MFDRV_SetMapMode( PHYSDEV dev, INT mode )
29 {
30     METAFILEDRV_PDEVICE *physDev = (METAFILEDRV_PDEVICE *)dev;
31     INT prevMode = GetMapMode( physDev->hdc );
32     MFDRV_MetaParam1( dev, META_SETMAPMODE, mode );
33     return prevMode;
34 }
35
36
37 /***********************************************************************
38  *           MFDRV_SetViewportExt
39  */
40 BOOL MFDRV_SetViewportExt( PHYSDEV dev, INT x, INT y )
41 {
42     MFDRV_MetaParam2( dev, META_SETVIEWPORTEXT, x, y );
43     return TRUE;
44 }
45
46
47 /***********************************************************************
48  *           MFDRV_SetViewportOrg
49  */
50 BOOL MFDRV_SetViewportOrg( PHYSDEV dev, INT x, INT y )
51 {
52     MFDRV_MetaParam2( dev, META_SETVIEWPORTORG, x, y );
53     return TRUE;
54 }
55
56
57 /***********************************************************************
58  *           MFDRV_SetWindowExt
59  */
60 BOOL MFDRV_SetWindowExt( PHYSDEV dev, INT x, INT y )
61 {
62     MFDRV_MetaParam2( dev, META_SETWINDOWEXT, x, y );
63     return TRUE;
64 }
65
66
67 /***********************************************************************
68  *           MFDRV_SetWindowOrg
69  */
70 BOOL MFDRV_SetWindowOrg( PHYSDEV dev, INT x, INT y )
71 {
72     MFDRV_MetaParam2( dev, META_SETWINDOWORG, x, y );
73     return TRUE;
74 }
75
76
77 /***********************************************************************
78  *           MFDRV_OffsetViewportOrg
79  */
80 BOOL MFDRV_OffsetViewportOrg( PHYSDEV dev, INT x, INT y )
81 {
82     MFDRV_MetaParam2( dev, META_OFFSETVIEWPORTORG, x, y );
83     return TRUE;
84 }
85
86
87 /***********************************************************************
88  *           MFDRV_OffsetWindowOrg
89  */
90 BOOL MFDRV_OffsetWindowOrg( PHYSDEV dev, INT x, INT y )
91 {
92     MFDRV_MetaParam2( dev, META_OFFSETWINDOWORG, x, y );
93     return TRUE;
94 }
95
96
97 /***********************************************************************
98  *           MFDRV_ScaleViewportExt
99  */
100 BOOL MFDRV_ScaleViewportExt( PHYSDEV dev, INT xNum, INT xDenom, INT yNum, INT yDenom )
101 {
102     MFDRV_MetaParam4( dev, META_SCALEVIEWPORTEXT, xNum, xDenom, yNum, yDenom );
103     return TRUE;
104 }
105
106
107 /***********************************************************************
108  *           MFDRV_ScaleWindowExt
109  */
110 BOOL MFDRV_ScaleWindowExt( PHYSDEV dev, INT xNum, INT xDenom, INT yNum, INT yDenom )
111 {
112     MFDRV_MetaParam4( dev, META_SCALEWINDOWEXT, xNum, xDenom, yNum, yDenom );
113     return TRUE;
114 }
115