
                              Wine Documentation                               
Prev                                                                       Next
-------------------------------------------------------------------------------

Chapter 3. Documenting Wine

Table of Contents
Writing Wine API Documentation
The Wine DocBook System


How to help out with the Wine documentation effort...

Writing Wine API Documentation

Written by Douglas Ridgway <ridgway@winehq.com>

(Extracted from wine/documentation/README.documentation)

To improve the documentation of the Wine API, just add comments to the existing
source. For example,
/******************************************************************            
 *         CopyMetaFileA   (GDI32.23)                                          
 *                                                                             
 *  Copies the metafile corresponding to hSrcMetaFile to either                
 *  a disk file, if a filename is given, or to a new memory based              
 *  metafile, if lpFileName is NULL.                                           
 *                                                                             
 * RETURNS                                                                     
 *                                                                             
 *  Handle to metafile copy on success, NULL on failure.                       
 *                                                                             
 * BUGS                                                                        
 *                                                                             
 *  Copying to disk returns NULL even if successful.                           
 */                                                                            
HMETAFILE WINAPI CopyMetaFileA(                                                
                   HMETAFILE hSrcMetaFile, /* handle of metafile to copy */    
                   LPCSTR lpFilename /* filename if copying to a file */       
) { ... }                                                                      
                                                                               

becomes, after processing with c2man and nroff -man,
CopyMetaFileA(3w)                               CopyMetaFileA(3w)              
                                                                               
                                                                               
NAME                                                                           
       CopyMetaFileA   (GDI32.23)                                              
                                                                               
SYNOPSIS                                                                       
       HMETAFILE CopyMetaFileA                                                 
       (                                                                       
            HMETAFILE hSrcMetaFile,                                            
            LPCSTR lpFilename                                                  
       );                                                                      
                                                                               
PARAMETERS                                                                     
       HMETAFILE hSrcMetaFile                                                  
              Handle of metafile to copy.                                      
                                                                               
       LPCSTR lpFilename                                                       
              Filename if copying to a file.                                   
                                                                               
DESCRIPTION                                                                    
       Copies  the  metafile  corresponding  to  hSrcMetaFile  to              
       either a disk file, if a filename is given, or  to  a  new              
       memory based metafile, if lpFileName is NULL.                           
                                                                               
RETURNS                                                                        
       Handle to metafile copy on success, NULL on failure.                    
                                                                               
BUGS                                                                           
       Copying to disk returns NULL even if successful.                        
                                                                               
SEE ALSO                                                                       
       GetMetaFileA(3w),   GetMetaFileW(3w),   CopyMetaFileW(3w),              
       PlayMetaFile(3w),  SetMetaFileBitsEx(3w),  GetMetaFileBit-              
       sEx(3w)                                                                 
                                                                               
-------------------------------------------------------------------------------
Prev                                 Home                                  Next
Limitations                           Up                The Wine DocBook System
