home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / winfe / apiimg.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.5 KB  |  110 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. #ifndef __APIIMG_H
  20. #define __APIIMG_H
  21.  
  22. #ifndef __APIAPI_H
  23.     #include "apiapi.h"
  24. #endif
  25. #ifndef __NSGUIDS_H
  26.     #include "nsguids.h"
  27. #endif
  28.  
  29. #define    APICLASS_IMAGEMAP   "ImageMap"
  30.  
  31. class IImageMap 
  32. {
  33. public:
  34.     virtual int Initialize ( 
  35.             unsigned int rcid,
  36.             int width,
  37.             int height
  38.             ) = 0;
  39.  
  40. // Please use these draw functions instead of the MFC ones below
  41.  
  42.     virtual void DrawImage (
  43.             int index,
  44.             int x,
  45.             int y,
  46.             HDC hDestDC,
  47.             BOOL bButton
  48.             ) = 0;
  49.  
  50.     virtual void DrawTransImage (
  51.         int index,
  52.         int x,
  53.         int y,
  54.         HDC hDestDC
  55.         ) = 0;
  56.  
  57. // Please don't use these functions, they are obsolete
  58. // and provided only for compatibility
  59.  
  60.     virtual void DrawImage (
  61.             int index,
  62.             int x,
  63.             int y,
  64.             CDC * hDestDC,
  65.             BOOL bButton
  66.             ) = 0;
  67.  
  68.     virtual void DrawTransImage (
  69.         int index,
  70.         int x,
  71.         int y,
  72.         CDC * hDestDC
  73.         ) = 0;
  74.  
  75.     virtual void ReInitialize (
  76.             void
  77.             ) = 0;
  78.  
  79.     virtual void UseNormal (
  80.             void
  81.             ) = 0;
  82.  
  83.     virtual void UseHighlight (
  84.             void
  85.             ) = 0;
  86.  
  87.     virtual int GetImageHeight (
  88.             void
  89.             ) = 0;
  90.  
  91.     virtual int GetImageWidth (
  92.             void
  93.             ) = 0;
  94.  
  95.     virtual int GetImageCount (
  96.             void
  97.             ) = 0;
  98.  
  99.     virtual unsigned int GetResourceID (
  100.             void
  101.             ) = 0;
  102.  
  103. };
  104.  
  105. typedef IImageMap * LPIMAGEMAP;
  106.  
  107. #define ApiImageMap(v,unk) APIPTRDEF(IID_IImageMap,IImageMap,v,unk)
  108.  
  109. #endif
  110.