home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / modules / libfont / producers / win / src / Pwinrf.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.2 KB  |  75 lines

  1. /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18. /*
  19.  * Private implementation of the RenderableFont.
  20.  */
  21.  
  22. #ifndef _Pwinrf_H_
  23. #define _Pwinrf_H_
  24.  
  25. #include "string.h"            /* Mcf.c uses memcpy, memcmp etc. And it includes
  26.                                only this one header. */
  27.  
  28. #ifndef XP_WIN
  29. #define XP_WIN
  30. #endif
  31.  
  32. #include "Mwinrf.h"            /* Generated header */
  33.  
  34. enum {    encode_notUnicode                = 0x00,
  35.         encode_unicode                    = 0x01,
  36.         encode_needDrawUnderline        = 0x02,    // for work around win95 
  37. };
  38.  
  39. struct winrfImpl {
  40.   winrfImplHeader    header;
  41.  
  42.   /*************************************************************************
  43.    * FONTDISPLAYER Implementors:
  44.    *    Add your private data here. If you are implementing in C++,
  45.    *    then hang off your actual object here.
  46.    *************************************************************************/
  47.  
  48.     //HDC             mRF_hDC;
  49.     HFONT           mRF_hFont;
  50.  
  51.     // cache attributes
  52.     int                mRF_tmDescent;
  53.     int                mRF_tmMaxCharWidth;
  54.     int                mRF_tmAscent;
  55.  
  56.     int                mRF_csID;
  57.     int                mRF_encoding;
  58.     jdouble            mRF_pointSize;
  59. };
  60.  
  61. /* The generated getInterface used the wrong object IDS. So we
  62.  * override them with ours.
  63.  */
  64. #define OVERRIDE_winrf_getInterface
  65.  
  66. /* The generated finalize doesn't have provision to free the
  67.  * private data that we create inside the object. So we
  68.  * override the finalize method and implement destruction
  69.  * of our private data.
  70.  */
  71. #define OVERRIDE_winrf_finalize
  72.  
  73. #endif /* _Pwinrf_H_ */
  74.  
  75.