home *** CD-ROM | disk | FTP | other *** search
/ Solo Programadores 22 / SOLO_22.iso / packages / win32ada / data.z / bounce.ads < prev    next >
Encoding:
Text File  |  1996-03-15  |  4.8 KB  |  127 lines

  1. -- $Source: /home/harp/1/proto/monoBANK/winnt/bounce.ads,v $ 
  2. -- $Revision: 1.3 $ $Date: 96/03/15 13:51:59 $ $Author: stm $ 
  3. -- $Id: bounce.ads 1.2 1995/01/25 15:49:32 teg Exp teg $
  4.  
  5.  
  6. with Win32;
  7. with Win32.Windef;
  8. with Win32.Winnt;
  9. with Convert;
  10. with Interfaces.C;
  11.  
  12. package Bounce is
  13.  
  14.   bounceclass_str : aliased constant Win32.CHAR_ARRAY := 
  15.       "BOUNCEDEMO";
  16.   bouncetitle_str : aliased constant Win32.CHAR_ARRAY := 
  17.       "Bouncing Ball Demo (xforms)";
  18.   BOUNCECLASS : Win32.LPCSTR := Convert.CP(bounceclass_str);
  19.   BOUNCETITLE : Win32.LPCSTR := Convert.CP(bouncetitle_str); 
  20.  
  21.   type xForm_Matrix is array (0 .. 2, 0 .. 2) of aliased Win32.LONG;
  22.   type MYXFORM is record
  23.     xForm : aliased xForm_Matrix; 
  24.   end record;
  25.   type PMYXFORM is access MYXFORM;
  26.  
  27.   -- ** BALL OBJECT
  28.   type BALLDATA is record
  29.     hWnd          : Win32.WinDef.HWND;
  30.     nWidth        : Win32.LONG;
  31.     nHeight       : Win32.LONG;
  32.     xDirection    : Win32.LONG;
  33.     yDirection    : Win32.LONG;
  34.     bNewPosition  : Win32.BOOL;
  35.     xPosition     : Win32.LONG;
  36.     yPosition     : Win32.LONG;
  37.     crColor       : Win32.WinDef.COLORREF;
  38.     xForm         : MYXFORM;
  39.   end record;
  40.   type PBALLDATA is access BALLDATA;
  41.  
  42.   type BOUNCEDATA is record
  43.     hBall1 : Win32.Winnt.HANDLE;
  44.     hBall2 : Win32.Winnt.HANDLE;
  45.     hBall3 : Win32.Winnt.HANDLE;
  46.     hBall4 : Win32.Winnt.HANDLE;
  47.   end record;
  48.   type PBOUNCEDATA is access BOUNCEDATA;
  49.  
  50.   function ballCreate (hWnd_p  : Win32.WinDef.HWND;
  51.                        nWidth  : Win32.LONG;
  52.                        nHeight : Win32.LONG;
  53.                        crColor : Win32.WinDef.COLORREF) return 
  54.                                                         Win32.Winnt.HANDLE;
  55.  
  56.   function ballDestroy (hBall : Win32.Winnt.HANDLE) return Win32.BOOL;
  57.  
  58.   procedure ballBounce (hBall : Win32.Winnt.HANDLE);
  59.  
  60.   procedure ballGetDimensions (hBall      : Win32.Winnt.HANDLE;
  61.                                pDimension : in out Win32.WinDef.POINT); 
  62.  
  63.   function ballSetDimensions (hBall   : Win32.Winnt.HANDLE;
  64.                               nWidth  : Win32.LONG;
  65.                               nHeight : Win32.LONG) return Win32.BOOL;
  66.   
  67.   procedure ballGetDirection (hBall      : Win32.Winnt.HANDLE;
  68.                               pDirection : in out Win32.WinDef.POINT); 
  69.  
  70.   procedure ballSetDirection (hBall      : Win32.Winnt.HANDLE;
  71.                               xDirection : Win32.LONG;
  72.                               yDirection : Win32.LONG);
  73.  
  74.   procedure ballGetPosition (hBall     : Win32.Winnt.HANDLE;
  75.                              pPosition : in out Win32.WinDef.POINT); 
  76.  
  77.   procedure ballSetPosition (hBall : Win32.Winnt.HANDLE;
  78.                              x     : Win32.LONG;
  79.                              y     : Win32.LONG);
  80.  
  81.   procedure CreateBounceWindow (hWndClient : Win32.WinDef.HWND;
  82.                                 nItem      : Win32.INT);
  83.  
  84.   function BounceProc (hWnd_p   : Win32.WinDef.HWND;
  85.                        wMsg     : Win32.UINT;
  86.                        wParam_p : Win32.WPARAM;
  87.                        lParam_p : Win32.LPARAM) return Win32.LRESULT;
  88.   pragma Convention (Stdcall, BounceProc);
  89.  
  90.   function BounceCreateProc (hWnd_p : Win32.WinDef.HWND) return Win32.BOOL;
  91.  
  92.   procedure BounceDestroyProc (hWnd_p : Win32.WinDef.HWND);
  93.  
  94.   function BounceCommandProc (hWnd_p   : Win32.WinDef.HWND;
  95.                               wParam_p : Win32.WPARAM;
  96.                               lParam_p : Win32.LPARAM) return Win32.BOOL;
  97.  
  98.   procedure BouncePaintProc (hWnd_p : Win32.WinDef.HWND);
  99.  
  100.   procedure BounceObjects (hWnd_p : Win32.WinDef.HWND);
  101.  
  102.   procedure BounceRefresh (hWnd_p : Win32.WinDef.HWND);
  103.  
  104.   procedure CheckEdgePosition (hWnd_p : Win32.WinDef.HWND;
  105.                                hBall  : Win32.Winnt.HANDLE);
  106.  
  107. -------------------------------------------------------------------------------
  108. --
  109. -- THIS FILE AND ANY ASSOCIATED DOCUMENTATION IS PROVIDED WITHOUT CHARGE
  110. -- "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
  111. -- BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR
  112. -- FITNESS FOR A PARTICULAR PURPOSE.  The user assumes the entire risk as to
  113. -- the accuracy and the use of this file.  This file may be used, copied,
  114. -- modified and distributed only by licensees of Microsoft Corporation's
  115. -- WIN32 Software Development Kit in accordance with the terms of the 
  116. -- licensee's End-User License Agreement for Microsoft Software for the
  117. -- WIN32 Development Kit.
  118. --
  119. -- Copyright (c) Intermetrics, Inc. 1995
  120. -- Portions (c) 1985-1994 Microsoft Corporation with permission.
  121. -- Microsoft is a registered trademark and Windows and Windows NT are
  122. -- trademarks of Microsoft Corporation.
  123. --
  124. -------------------------------------------------------------------------------
  125.  
  126. end Bounce;
  127.