home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 February: Tool Chest / Dev.CD Feb 00 TC.toast / pc / what's new? / sample code / human interface toolbox / packagetool / sample package / htmlsample sources / sampleutils.h < prev   
Encoding:
C/C++ Source or Header  |  1999-12-02  |  2.6 KB  |  67 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: © 1999 by Apple Computer, Inc.
  15.     all rights reserved.
  16.     
  17.     Disclaimer:
  18.     You may incorporate this sample code into your applications without
  19.     restriction, though the sample code has been provided "AS IS" and the
  20.     responsibility for its operation is 100% yours.  However, what you are
  21.     not permitted to do is to redistribute the source as "DSC Sample Code"
  22.     after having made changes. If you're going to re-distribute the source,
  23.     we require that you make it clear in the source that the code was
  24.     descended from Apple Sample Code, but that you've made changes.
  25.     
  26.     Change History (most recent first):
  27.     10/16/99 created
  28. */
  29.  
  30. #ifndef __SAMPLEUTILS__
  31. #define __SAMPLEUTILS__
  32.  
  33. #include <Types.h>
  34. #include <Windows.h>
  35.  
  36. /* GetApplicationFolder returns the volume reference number and
  37.     directory id of the folder containing the application. */
  38. OSStatus GetApplicationFolder(FSSpec *spec);
  39.  
  40. /* GetApplicationFolder returns a URL referring to the folder
  41.     containing the application.  If successful, *url is set
  42.     to a new handle containing the URL.  It is the caller's
  43.     responsibility to dispose of this handle. */
  44. OSStatus GetApplicationFolderURL(Handle *url);
  45.  
  46. /* DrawGrowIconWithoutScrollLines draws the grow icon in the bottom
  47.     right corner of the frontmost window without drawing the scroll bar
  48.     lines.  It does this by setting the clip region to the bottom right corner
  49.     before calling DrawGrowIcon. */
  50. void DrawGrowIconWithoutScrollLines(WindowPtr window);
  51.  
  52. /* SetWindowStandardStateSize sets the window's standard state rectangle
  53.     to a rectangle of the size suggested in the width and height parameters.
  54.     In the end, it may set the standard size to something smaller than the
  55.     width and height parameters so the entire window remains visible.  The
  56.     standard rectangle is also centered on the main screen.  The window's
  57.     standard state rectangle is used by ZoomWindow whenever when it
  58.     is called with the inZoomOut partcode. */
  59. void SetWindowStandardStateSize(WindowPtr window, short width, short height);
  60.  
  61. /* GrayOutBox grays out an area of the screen in the current grafport.  
  62.     *theBox is in local coordinates in the current grafport. This routine
  63.     is for direct screen drawing only.  */
  64. void GrayOutBox(Rect *theBox);
  65.  
  66. #endif
  67.