home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 August: Tool Chest / Dev.CD Aug 00 TC Disk 2.toast / pc / sample code / human interface toolbox / packagetool / sample package / htmlsample sources / sampleutils.h < prev   
Encoding:
C/C++ Source or Header  |  2000-06-23  |  4.7 KB  |  95 lines

  1. /*
  2.     File: SampleUtils.h
  3.     
  4.     Description:
  5.         This file contains routine prototypes that can be used to access
  6.     routines defined in SampleUtils.c.  These routines have been moved
  7.     here to a separate file to simplify the example.
  8.     
  9.     HTMLSample is an application illustrating how to use the new
  10.     HTMLRenderingLib services found in Mac OS 9. HTMLRenderingLib
  11.     is Apple's light-weight HTML rendering engine capable of
  12.     displaying HTML files.
  13.  
  14.     Copyright:
  15.         © Copyright 1999 Apple Computer, Inc. All rights reserved.
  16.     
  17.     Disclaimer:
  18.         IMPORTANT:  This Apple software is supplied to you by Apple Computer, Inc.
  19.         ("Apple") in consideration of your agreement to the following terms, and your
  20.         use, installation, modification or redistribution of this Apple software
  21.         constitutes acceptance of these terms.  If you do not agree with these terms,
  22.         please do not use, install, modify or redistribute this Apple software.
  23.  
  24.         In consideration of your agreement to abide by the following terms, and subject
  25.         to these terms, Apple grants you a personal, non-exclusive license, under Apple’s
  26.         copyrights in this original Apple software (the "Apple Software"), to use,
  27.         reproduce, modify and redistribute the Apple Software, with or without
  28.         modifications, in source and/or binary forms; provided that if you redistribute
  29.         the Apple Software in its entirety and without modifications, you must retain
  30.         this notice and the following text and disclaimers in all such redistributions of
  31.         the Apple Software.  Neither the name, trademarks, service marks or logos of
  32.         Apple Computer, Inc. may be used to endorse or promote products derived from the
  33.         Apple Software without specific prior written permission from Apple.  Except as
  34.         expressly stated in this notice, no other rights or licenses, express or implied,
  35.         are granted by Apple herein, including but not limited to any patent rights that
  36.         may be infringed by your derivative works or by other works in which the Apple
  37.         Software may be incorporated.
  38.  
  39.         The Apple Software is provided by Apple on an "AS IS" basis.  APPLE MAKES NO
  40.         WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
  41.         WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  42.         PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
  43.         COMBINATION WITH YOUR PRODUCTS.
  44.  
  45.         IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
  46.         CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
  47.         GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  48.         ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION
  49.         OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT
  50.         (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
  51.         ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  52.  
  53.     Change History (most recent first):
  54.         Wed, Dec 22, 1999 -- created
  55. */
  56.  
  57.  
  58. #ifndef __SAMPLEUTILS__
  59. #define __SAMPLEUTILS__
  60.  
  61. #include <Types.h>
  62. #include <Windows.h>
  63.  
  64. /* GetApplicationFolder returns the volume reference number and
  65.     directory id of the folder containing the application. */
  66. OSStatus GetApplicationFolder(FSSpec *spec);
  67.  
  68. /* GetApplicationFolder returns a URL referring to the folder
  69.     containing the application.  If successful, *url is set
  70.     to a new handle containing the URL.  It is the caller's
  71.     responsibility to dispose of this handle. */
  72. OSStatus GetApplicationFolderURL(Handle *url);
  73.  
  74. /* DrawGrowIconWithoutScrollLines draws the grow icon in the bottom
  75.     right corner of the frontmost window without drawing the scroll bar
  76.     lines.  It does this by setting the clip region to the bottom right corner
  77.     before calling DrawGrowIcon. */
  78. void DrawGrowIconWithoutScrollLines(WindowPtr window);
  79.  
  80. /* SetWindowStandardStateSize sets the window's standard state rectangle
  81.     to a rectangle of the size suggested in the width and height parameters.
  82.     In the end, it may set the standard size to something smaller than the
  83.     width and height parameters so the entire window remains visible.  The
  84.     standard rectangle is also centered on the main screen.  The window's
  85.     standard state rectangle is used by ZoomWindow whenever when it
  86.     is called with the inZoomOut partcode. */
  87. void SetWindowStandardStateSize(WindowPtr window, short width, short height);
  88.  
  89. /* GrayOutBox grays out an area of the screen in the current grafport.  
  90.     *theBox is in local coordinates in the current grafport. This routine
  91.     is for direct screen drawing only.  */
  92. void GrayOutBox(Rect *theBox);
  93.  
  94. #endif
  95.