home *** CD-ROM | disk | FTP | other *** search
- /*
- File: RenderingWindow.h
-
- Description:
- This file contains exported routine prototypes that can be used to call
- the routines defined in RenderingWindow.c. These routines used to
- manage the windows displayed by the HTMLSample application.
-
- HTMLSample is an application illustrating how to use the new
- HTMLRenderingLib services found in Mac OS 9. HTMLRenderingLib
- is Apple's light-weight HTML rendering engine capable of
- displaying HTML files.
-
- Copyright:
- © Copyright 1999 Apple Computer, Inc. All rights reserved.
-
- Disclaimer:
- IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc.
- ("Apple") in consideration of your agreement to the following terms, and your
- use, installation, modification or redistribution of this Apple software
- constitutes acceptance of these terms. If you do not agree with these terms,
- please do not use, install, modify or redistribute this Apple software.
-
- In consideration of your agreement to abide by the following terms, and subject
- to these terms, Apple grants you a personal, non-exclusive license, under Apple’s
- copyrights in this original Apple software (the "Apple Software"), to use,
- reproduce, modify and redistribute the Apple Software, with or without
- modifications, in source and/or binary forms; provided that if you redistribute
- the Apple Software in its entirety and without modifications, you must retain
- this notice and the following text and disclaimers in all such redistributions of
- the Apple Software. Neither the name, trademarks, service marks or logos of
- Apple Computer, Inc. may be used to endorse or promote products derived from the
- Apple Software without specific prior written permission from Apple. Except as
- expressly stated in this notice, no other rights or licenses, express or implied,
- are granted by Apple herein, including but not limited to any patent rights that
- may be infringed by your derivative works or by other works in which the Apple
- Software may be incorporated.
-
- The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO
- WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
- WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
- COMBINATION WITH YOUR PRODUCTS.
-
- IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION
- OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT
- (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
- ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- Change History (most recent first):
- Wed, Dec 22, 1999 -- created
- */
-
-
- #ifndef __RENDERINGWINDOW__
- #define __RENDERINGWINDOW__
-
- #include <Types.h>
- #include <Windows.h>
-
-
-
- /* InitRenderingWindows is called to initialize the environment used by
- routines defined in this file. It should be called before any of the
- other routines defined in this file are called. */
- OSStatus InitRenderingWindows(void);
-
- /* CloseRenderingWindows closes any open rendering windows and
- deallocates any structures allocated when InitRenderingWindows
- was called. */
- OSStatus CloseRenderingWindows(void);
-
-
-
- /* RWOpen opens a new, empty rendering window. If successful,
- then *rWindow will contain a pointer to a newly created window. */
- OSStatus RWOpen(WindowPtr *rWindow);
-
- /* RWCloseWindow closes the rendering window pointed to by
- rWin. */
- void RWCloseWindow(WindowPtr rWin);
-
- /* IsARenderingWindow returns true if rWin points to a rendering
- window created by RWOpen. You should not call any of the routines
- below for windows that are not rendering windows. This routine
- provides a convenient way to tell if a windowptr returned by one
- of the toolbox routines is a rendering window. */
- Boolean IsARenderingWindow(WindowPtr rWin);
-
-
-
- /* RWGotoURL displays HTML file referred to by the url in the
- rendering window. if addToHistory is true, then the window
- will be added to the window's history list. */
- OSStatus RWGotoURL(WindowPtr rWin, char* url, Boolean addToHistory);
-
- /* RWGotoAppRelLink displays HTML file referred to by the application
- relative link in the rendering window. if addToHistory is true, then
- the window will be added to the window's history list. */
- OSStatus RWGotoAppRelLink(WindowPtr rWin, char* linkstr, Boolean addToHistory);
-
-
-
- /* RWResetGotoMenu should be called before calling MenuKey or MenuSelect. It
- enables the back, forward, and home menu commands depending on what
- commands are available and it rebuilds the history list at the bottom
- of the go to menu. */
- void RWResetGotoMenu(WindowPtr rWin);
-
- /* RWHandleGotoMenu should be called when an item is chosen from the
- go to menu. item is the number of the item that was chosen. */
- void RWHandleGotoMenu(WindowPtr rWin, short item);
-
-
-
- /* RWUpdate should be called in response to an update event.
- it calls BeginUpdate and EndUpdate redrawing the window's
- contents as necessary. */
- void RWUpdate(WindowPtr rWin);
-
- /* RWActivate should be called in response to activate events.*/
- void RWActivate(WindowPtr rWin, Boolean activate);
-
- /* RWRecalculateSize should be called whenever the size of a rendering
- window changes. This routine resizes and redraws the windows
- contents appropriately. */
- void RWRecalculateSize(WindowPtr rWin);
-
- /* RWHandleMouseDown should be called in response to mouse down
- events occuring inside of a rendering window. This routine responds
- to mouse clicks in the controls at the top of the window. */
- void RWHandleMouseDown(WindowPtr rWin, Point where);
-
- /* RWKeyDown should be called for keydown events when a rendering
- window is the frontmost window. This routine maps the left, up,
- and right arrow keys to the back, home, and forward commands. */
- void RWKeyDown(WindowPtr rWin, char theKey);
-
- #endif
-
-