home *** CD-ROM | disk | FTP | other *** search
/ PC Press 1997 July / Sezamfile97_2.iso / windows / program / activex / axtsamp.exe / TSBRANCH.EXE / INC / IBALL.H < prev    next >
Text File  |  1996-12-27  |  4KB  |  107 lines

  1. /*+==========================================================================
  2.   File:      IBALL.H
  3.  
  4.   Summary:   This is the common include file for the Ball-related COM
  5.              Interfaces.  The Interface abstract base classes are
  6.              declared.
  7.  
  8.              This file is global to all the Tutorial Code Samples (kept in
  9.              the ..\INC directory).  It is a good practice to factor out
  10.              Interface and GUID specifications to reduce the possibility
  11.              of GUID or interface conflicts.
  12.  
  13.   Classes:   IBall, IBallSink.
  14.  
  15.   Functions: none
  16.  
  17.   Origin:    5-30-96: atrent - Revised for the ActiveX Tutorial Samples.
  18.  
  19. ----------------------------------------------------------------------------
  20.   This file is part of the Microsoft ActiveX Tutorial Code Samples.
  21.  
  22.   Copyright (C) Microsoft Corporation, 1997.  All rights reserved.
  23.  
  24.   This source code is intended only as a supplement to Microsoft
  25.   Development Tools and/or on-line documentation.  See these other
  26.   materials for detailed information regarding Microsoft code samples.
  27.  
  28.   THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  29.   KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  30.   IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  31.   PARTICULAR PURPOSE.
  32. ==========================================================================+*/
  33.  
  34. #if !defined(IBALL_H)
  35. #define IBALL_H
  36.  
  37. #if !defined(RC_INCLUDE)
  38.  
  39.  
  40. /*I+I+++I+++I+++I+++I+++I+++I+++I+++I+++I+++I+++I+++I+++I+++I+++I+++I+++I+++I
  41.   Interface: IBall
  42.  
  43.   Summary:   Interface for moving Ball-like COM Objects.
  44.  
  45.   Methods:   Reset
  46.                Init and reset the ball.
  47.              Move
  48.                Move the ball.
  49.              GetBall
  50.                Obtain the ball's current position, extent, and color.
  51. I---I---I---I---I---I---I---I---I---I---I---I---I---I---I---I---I---I---I-I*/
  52. DECLARE_INTERFACE_(IBall, IUnknown)
  53. {
  54.   // IUnknown methods.
  55.   STDMETHOD(QueryInterface) (THIS_ REFIID, PPVOID) PURE;
  56.   STDMETHOD_(ULONG,AddRef)  (THIS) PURE;
  57.   STDMETHOD_(ULONG,Release) (THIS) PURE;
  58.  
  59.   // IBall methods.
  60.   STDMETHOD(Reset)      (THIS_ RECT*, SHORT) PURE;
  61.   STDMETHOD(Move)       (THIS_ BOOL) PURE;
  62.   STDMETHOD(GetBall)    (THIS_ POINT*, POINT*, COLORREF*) PURE;
  63. };
  64.  
  65. typedef IBall* PIBall;
  66.  
  67.  
  68. /*I+I+++I+++I+++I+++I+++I+++I+++I+++I+++I+++I+++I+++I+++I+++I+++I+++I+++I+++I
  69.   Interface: IBallSink
  70.  
  71.   Summary:   Sink Connection Interface for Ball-like COM Objects that
  72.              communicate events back to the client.
  73.  
  74.   Methods:   BounceBottom
  75.                The virtual ball hit the bottom edge of its bounding
  76.                rectangle and bounced.
  77.              BounceLeft
  78.                The virtual ball hit the left edge of its bounding
  79.                rectangle and bounced.
  80.              BounceRight
  81.                The virtual ball hit the right edge of its bounding
  82.                rectangle and bounced.
  83.              BounceTop
  84.                The virtual ball hit the top edge of its bounding
  85.                rectangle and bounced.
  86. I---I---I---I---I---I---I---I---I---I---I---I---I---I---I---I---I---I---I-I*/
  87. DECLARE_INTERFACE_(IBallSink, IUnknown)
  88. {
  89.   // IUnknown methods.
  90.   STDMETHOD(QueryInterface) (THIS_ REFIID, PPVOID) PURE;
  91.   STDMETHOD_(ULONG,AddRef)  (THIS) PURE;
  92.   STDMETHOD_(ULONG,Release) (THIS) PURE;
  93.  
  94.   // IBallSink methods.
  95.   STDMETHOD(BounceBottom)   (THIS) PURE;
  96.   STDMETHOD(BounceLeft)     (THIS) PURE;
  97.   STDMETHOD(BounceRight)    (THIS) PURE;
  98.   STDMETHOD(BounceTop)      (THIS) PURE;
  99. };
  100.  
  101. typedef IBallSink* PIBallSink;
  102.  
  103.  
  104. #endif // RC_INCLUDE
  105.  
  106. #endif // IBALL_H
  107.