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 / htmlsample.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-12-02  |  2.6 KB  |  108 lines

  1. /*
  2.     file HTMLSample.h
  3.     
  4.     Description:
  5.     This file contains constant declarations and exported routine prototypes
  6.     used in the HTMLSample application.
  7.     
  8.     HTMLSample is an application illustrating how to use the new
  9.     HTMLRenderingLib services found in Mac OS 9. HTMLRenderingLib
  10.     is Apple's light-weight HTML rendering engine capable of
  11.     displaying HTML files.
  12.  
  13.     Copyright: © 1999 by Apple Computer, Inc.
  14.     all rights reserved.
  15.     
  16.     Disclaimer:
  17.     You may incorporate this sample code into your applications without
  18.     restriction, though the sample code has been provided "AS IS" and the
  19.     responsibility for its operation is 100% yours.  However, what you are
  20.     not permitted to do is to redistribute the source as "DSC Sample Code"
  21.     after having made changes. If you're going to re-distribute the source,
  22.     we require that you make it clear in the source that the code was
  23.     descended from Apple Sample Code, but that you've made changes.
  24.     
  25.     Change History (most recent first):
  26.     10/16/99 created
  27. */
  28.  
  29. #ifndef __HTMLSAMPLE__
  30. #define __HTMLSAMPLE__
  31.  
  32. #include <MacTypes.h>
  33. #include <Events.h>
  34.  
  35.     /* the resource ID of the main menu bar list. */
  36. enum {
  37.     kMenuBarID = 128
  38. };
  39.  
  40.     /* the resource id of the main string list */
  41. enum {
  42.     kMainStringList = 128,
  43.     kNavMessageString = 1
  44. };
  45.  
  46.     /* constants referring to the apple menu */
  47. enum {
  48.     mApple = 128,
  49.     iAbout = 1,
  50.     iFirstAppleItem = 3
  51. };
  52.  
  53.     /* constants referring to the file menu */
  54. enum {
  55.     mFile = 129,
  56.     iOpen = 1,
  57.     iQuit = 3
  58. };
  59.  
  60.     /* constants referring to the edit menu */
  61. enum {
  62.     mEdit = 130,
  63.     iUndo = 1,
  64.     iCut = 3,
  65.     iCopy = 4,
  66.     iPaste = 5,
  67.     iClear = 6
  68. };
  69.  
  70.     /* constants referring to the go menu */
  71. enum {
  72.     mGo = 131,
  73.     iBack = 1,
  74.     iForward = 2,
  75.     iHome = 3,
  76.     iGoSep = 4
  77. };
  78.  
  79.     /* resource ID numbers for alerts that are called
  80.     to report different error conditions. */
  81. enum {
  82.     kOpenFileErrorAlert = 128,
  83.     kOpenApplicationErrorAlert = 130,
  84.     kNoRenderingLibErrorAlert = 131,
  85.     kNoAboutBoxErrorAlert = 132
  86. };
  87.  
  88.     /* resource ID numbers for resources containing
  89.     application relative links to files displayed by the
  90.     application.  These resources contain c-style strings. */
  91. enum {
  92.     kCStyleStringResourceType = 'CSTR',
  93.     kDefaultPageURLString = 128,
  94.     kErrorPageURLString = 129
  95. };
  96.  
  97. /* ParamAlert is a general alert handling routine.  If Apple events exist, then it
  98.     calls AEInteractWithUser to ensure the application is in the forground, and then
  99.     it displays an alert after passing the s1 and s2 parameters to ParamText. */
  100. short ParamAlert(short alertID, StringPtr s1, StringPtr s2);
  101.  
  102. /* HandleEvent is the main event handling routine for the
  103.     application.  ev points to an event record returned by
  104.     WaitNextEvent. */
  105. void HandleEvent(EventRecord *ev);
  106.  
  107. #endif
  108.