Cleanups of API docs in GDI
Dimitrie O. Paun
dpaun at rogers.com
Sat Apr 2 17:09:18 CST 2005
ChangeLog
Cleanup the API docs. Few indentation/formatting fixes.
Index: dlls/gdi/metafile.c
===================================================================
RCS file: /var/cvs/wine/dlls/gdi/metafile.c,v
retrieving revision 1.5
diff -u -r1.5 metafile.c
--- dlls/gdi/metafile.c 14 Mar 2005 10:06:54 -0000 1.5
+++ dlls/gdi/metafile.c 2 Apr 2005 21:56:58 -0000
@@ -2,7 +2,9 @@
* Metafile functions
*
* Copyright David W. Metcalfe, 1994
- * Niels de Carpentier, Albrecht Kleine, Huw Davies 1996
+ * Copyright Niels de Carpentier, 1996
+ * Copyright Albrecht Kleine, 1996
+ * Copyright Huw Davies, 1996
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -17,9 +19,9 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-/*
+ *
+ * NOTES
+ *
* These functions are primarily involved with metafile playback or anything
* that touches a HMETAFILE.
* For recording of metafiles look in graphics/metafiledrv/
@@ -113,7 +115,7 @@
(HGDIOBJ *)&hmf, NULL );
if (metaObj)
{
- metaObj->mh = mh;
+ metaObj->mh = mh;
GDI_ReleaseObj( hmf );
}
return hmf;
@@ -437,17 +439,17 @@
* a disk file, if a filename is given, or to a new memory based
* metafile, if lpFileName is NULL.
*
- * RETURNS
+ * PARAMS
+ * hSrcMetaFile [I] handle of metafile to copy
+ * lpFilename [I] filename if copying to a file
*
+ * RETURNS
* Handle to metafile copy on success, NULL on failure.
*
* BUGS
- *
* Copying to disk returns NULL even if successful.
*/
-HMETAFILE WINAPI CopyMetaFileW(
- HMETAFILE hSrcMetaFile, /* [in] handle of metafile to copy */
- LPCWSTR lpFilename /* [in] filename if copying to a file */)
+HMETAFILE WINAPI CopyMetaFileW( HMETAFILE hSrcMetaFile, LPCWSTR lpFilename )
{
METAHEADER *mh = MF_GetMetaHeader( hSrcMetaFile );
METAHEADER *mh2 = NULL;
@@ -483,8 +485,7 @@
/******************************************************************
* CopyMetaFileA (GDI32.@)
*/
-HMETAFILE WINAPI CopyMetaFileA( HMETAFILE hSrcMetaFile,
- LPCSTR lpFilename )
+HMETAFILE WINAPI CopyMetaFileA( HMETAFILE hSrcMetaFile, LPCSTR lpFilename )
{
UNICODE_STRING lpFilenameW;
HMETAFILE ret = 0;
@@ -614,11 +615,12 @@
*
* Renders the metafile specified by hmf in the DC specified by
* hdc. Returns FALSE on failure, TRUE on success.
+ *
+ * PARAMS
+ * hdc [I] handle of DC to render in
+ * hmf [I] handle of metafile to render
*/
-BOOL WINAPI PlayMetaFile(
- HDC hdc, /* [in] handle of DC to render in */
- HMETAFILE hmf /* [in] handle of metafile to render */
-)
+BOOL WINAPI PlayMetaFile( HDC hdc, HMETAFILE hmf )
{
METAHEADER *mh = MF_GetMetaHeader( hmf );
return MF_PlayMetaFile( hdc, mh );
@@ -727,15 +729,8 @@
*
* RETURNS
* TRUE on success, FALSE on failure.
- *
- * HISTORY
- * Niels de carpentier, april 1996
*/
-BOOL WINAPI EnumMetaFile(
- HDC hdc,
- HMETAFILE hmf,
- MFENUMPROC lpEnumFunc,
- LPARAM lpData)
+BOOL WINAPI EnumMetaFile(HDC hdc, HMETAFILE hmf, MFENUMPROC lpEnumFunc, LPARAM lpData)
{
METAHEADER *mhTemp = NULL, *mh = MF_GetMetaHeader(hmf);
METARECORD *mr;
@@ -1309,11 +1304,11 @@
*
* Trade in a metafile object handle for a handle to the metafile memory.
*
+ * PARAMS
+ * hmf [I] metafile handle
*/
-HGLOBAL16 WINAPI GetMetaFileBits16(
- HMETAFILE16 hmf /* [in] metafile handle */
- )
+HGLOBAL16 WINAPI GetMetaFileBits16( HMETAFILE16 hmf )
{
TRACE("hMem out: %04x\n", hmf);
return hmf;
@@ -1326,11 +1321,11 @@
* The memory region should hold a proper metafile, otherwise
* problems will occur when it is used. Validity of the memory is not
* checked. The function is essentially just the identity function.
+ *
+ * PARAMS
+ * hMem [I] handle to a memory region holding a metafile
*/
-HMETAFILE16 WINAPI SetMetaFileBits16(
- HGLOBAL16 hMem
- /* [in] handle to a memory region holding a metafile */
-)
+HMETAFILE16 WINAPI SetMetaFileBits16( HGLOBAL16 hMem )
{
TRACE("hmf out: %04x\n", hMem);
@@ -1359,12 +1354,13 @@
* SetMetaFileBitsEx (GDI32.@)
*
* Create a metafile from raw data. No checking of the data is performed.
- * Use _GetMetaFileBitsEx_ to get raw data from a metafile.
+ * Use GetMetaFileBitsEx() to get raw data from a metafile.
+ *
+ * PARAMS
+ * size [I] size of metafile, in bytes
+ * lpData [I] pointer to metafile data
*/
-HMETAFILE WINAPI SetMetaFileBitsEx(
- UINT size, /* [in] size of metafile, in bytes */
- const BYTE *lpData /* [in] pointer to metafile data */
- )
+HMETAFILE WINAPI SetMetaFileBitsEx( UINT size, const BYTE *lpData )
{
METAHEADER *mh = HeapAlloc( GetProcessHeap(), 0, size );
if (!mh) return 0;
@@ -1380,11 +1376,13 @@
* Copies the data from metafile _hmf_ into the buffer _buf_.
* If _buf_ is zero, returns size of buffer required. Otherwise,
* returns number of bytes copied.
+ *
+ * PARAMS
+ * hmf [I] metafile
+ * nSize [I] size of buf
+ * buf [O] buffer to receive raw metafile data
*/
-UINT WINAPI GetMetaFileBitsEx(
- HMETAFILE hmf, /* [in] metafile */
- UINT nSize, /* [in] size of buf */
- LPVOID buf /* [out] buffer to receive raw metafile data */)
+UINT WINAPI GetMetaFileBitsEx( HMETAFILE hmf, UINT nSize, LPVOID buf )
{
METAHEADER *mh = MF_GetMetaHeader(hmf);
UINT mfSize;
@@ -1437,9 +1435,7 @@
* MF_Play_MetaCreateRegion
*
* Handles META_CREATEREGION for PlayMetaFileRecord().
- */
-
-/*
+ *
* The layout of the record looks something like this:
*
* rdParm meaning
@@ -1549,8 +1545,7 @@
}
else {
TRACE("%s len: %ld\n", sot, mr->rdSize);
- WARN(
- "Please report: ExtTextOut len=%ld slen=%d rdSize=%ld opt=%04x\n",
+ WARN("Please report: ExtTextOut len=%ld slen=%d rdSize=%ld opt=%04x\n",
len, s1, mr->rdSize, mr->rdParm[3]);
dxx = NULL; /* should't happen -- but if, we continue with NULL */
}
@@ -1560,7 +1555,7 @@
mr->rdParm[3], /* options */
&rect, /* rectangle */
sot, /* string */
- s1, dx); /* length, dx array */
+ s1, dx); /* length, dx array */
if (dx)
{
TRACE("%s len: %ld dx0: %d\n", sot, mr->rdSize, dx[0]);
Index: dlls/gdi/mfdrv/init.c
===================================================================
RCS file: /var/cvs/wine/dlls/gdi/mfdrv/init.c,v
retrieving revision 1.33
diff -u -r1.33 init.c
--- dlls/gdi/mfdrv/init.c 24 Mar 2005 21:01:38 -0000 1.33
+++ dlls/gdi/mfdrv/init.c 2 Apr 2005 21:29:19 -0000
@@ -228,10 +228,13 @@
* Create a new DC and associate it with a metafile. Pass a filename
* to create a disk-based metafile, NULL to create a memory metafile.
*
+ * PARAMS
+ * filename [I] Filename of disk metafile
+ *
* RETURNS
* A handle to the metafile DC if successful, NULL on failure.
*/
-HDC WINAPI CreateMetaFileW( LPCWSTR filename ) /* [in] Filename of disk metafile */
+HDC WINAPI CreateMetaFileW( LPCWSTR filename )
{
HDC ret;
DC *dc;
@@ -338,10 +341,11 @@
/******************************************************************
* CloseMetaFile (GDI.126)
+ *
+ * PARAMS
+ * hdc [I] Metafile DC to close
*/
-HMETAFILE16 WINAPI CloseMetaFile16(
- HDC16 hdc /* [in] Metafile DC to close */
-)
+HMETAFILE16 WINAPI CloseMetaFile16(HDC16 hdc)
{
HMETAFILE16 hmf;
METAFILEDRV_PDEVICE *physDev;
@@ -364,12 +368,13 @@
* Stop recording graphics operations in metafile associated with
* hdc and retrieve metafile.
*
+ * PARAMS
+ * hdc [I] Metafile DC to close
+ *
* RETURNS
* Handle of newly created metafile on success, NULL on failure.
*/
-HMETAFILE WINAPI CloseMetaFile(
- HDC hdc /* [in] Metafile DC to close */
-)
+HMETAFILE WINAPI CloseMetaFile(HDC hdc)
{
HMETAFILE hmf;
METAFILEDRV_PDEVICE *physDev;
--
Dimi.
More information about the wine-patches
mailing list