home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / com / tutsamp / dcdmarsh / papint.idl < prev   
Text File  |  1997-08-30  |  3KB  |  112 lines

  1. /*+==========================================================================
  2.   File:      PAPINT.IDL
  3.  
  4.   Summary:   Interface definition file for use by the MIDL compiler.
  5.              Specifies the following custom interfaces: ISharePaper and
  6.              IPaperSink.
  7.  
  8.              Compilation of this file using the MIDL.EXE compiler
  9.              generates additional source files PAPINT.H, PAPINT_I.C,
  10.              PAPINT_P.C, and DLLDATA.C.  They are in turn compiled in the
  11.              Makefile to produce the marshaling server which is used by
  12.              later code samples to provide standard marshaling for the
  13.              ISharePaper and IPaperSink custom interfaces.
  14.  
  15.   Origin:    8-23-97: atrent - Editor inheritance from MARSHAL sample.
  16.  
  17. ----------------------------------------------------------------------------
  18.   This file is part of the Microsoft COM Tutorial Code Samples.
  19.  
  20.   Copyright (C) Microsoft Corporation, 1997.  All rights reserved.
  21.  
  22.   This source code is intended only as a supplement to Microsoft
  23.   Development Tools and/or on-line documentation.  See these other
  24.   materials for detailed information regarding Microsoft code samples.
  25.  
  26.   THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  27.   KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  28.   IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  29.   PARTICULAR PURPOSE.
  30. ==========================================================================+*/
  31.  
  32.  
  33. [uuid(0002da31-0000-0000-c000-000000000046),
  34.     object
  35. ]
  36. interface ISharePaper : IUnknown
  37. {
  38.   import "unknwn.idl";
  39.  
  40.   HRESULT InitPaper(
  41.             [in,out] RECT* pWinRect,
  42.             [out]    BOOL* pbFirst);
  43.   HRESULT Lock(
  44.             [in] BOOL bLock);
  45.   HRESULT Load(
  46.             [out] RECT* pWinRect);
  47.   HRESULT Save(
  48.             void);
  49.   HRESULT InkStart(
  50.             [in] SHORT nX,
  51.             [in] SHORT nY,
  52.             [in] SHORT nInkWidth,
  53.             [in] COLORREF crInkColor);
  54.   HRESULT InkDraw(
  55.             [in] SHORT nX,
  56.             [in] SHORT nY);
  57.   HRESULT InkStop(
  58.             [in] SHORT nX,
  59.             [in] SHORT nY);
  60.   HRESULT GetInk(
  61.             [in] LONG lIndex,
  62.             [out] SHORT* pnInkType,
  63.             [out] SHORT* pnX,
  64.             [out] SHORT* pnY,
  65.             [out] SHORT* pnInkWidth,
  66.             [out] COLORREF* pcrInkColor);
  67.   HRESULT Erase(
  68.             void);
  69.   HRESULT Resize(
  70.             [in] LONG lWidth,
  71.             [in] LONG lHeight);
  72. }
  73.  
  74. [uuid(0002da34-0000-0000-c000-000000000046),
  75.     object
  76. ]
  77. interface IPaperSink : IUnknown
  78. {
  79.   import "unknwn.idl";
  80.  
  81.   HRESULT Locked(
  82.             void);
  83.   HRESULT Unlocked(
  84.             void);
  85.   HRESULT Loaded(
  86.             void);
  87.   HRESULT Saved(
  88.             void);
  89.   HRESULT InkStart(
  90.             [in] SHORT nX,
  91.             [in] SHORT nY,
  92.             [in] SHORT nInkWidth,
  93.             [in] COLORREF crInkColor);
  94.   HRESULT InkDraw(
  95.             [in] SHORT nX,
  96.             [in] SHORT nY);
  97.   HRESULT InkStop(
  98.             [in] SHORT nX,
  99.             [in] SHORT nY);
  100.   HRESULT Erased(
  101.             void);
  102.   HRESULT Resized(
  103.             [in] LONG lWidth,
  104.             [in] LONG lHeight);
  105. }
  106.  
  107. cpp_quote ("// The types of Ink Data.")
  108. cpp_quote ("#define INKTYPE_NONE  0")
  109. cpp_quote ("#define INKTYPE_START 1")
  110. cpp_quote ("#define INKTYPE_DRAW  2")
  111. cpp_quote ("#define INKTYPE_STOP  3")
  112.