Retired Document
Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
HTMLSample Pages/docs/generalroutines.html
<HTML> |
<HEAD> |
<TITLE>HTMLRenderingLib - General Routines</TITLE> |
</HEAD> |
<BODY BGCOLOR="#FFFFFF"> |
<H4> </H4> |
<H3>HTMLRenderingLib - General routines for accessing |
HTMLRenderingLib's services</H3> |
<H4><A NAME=HRHTMLRenderingLibAvailable></A></H4> |
<P> </P> |
<H4><FONT COLOR="#FF0000">HRHTMLRenderingLibAvailable</FONT></H4> |
<BLOCKQUOTE><PRE>pascal Boolean HRHTMLRenderingLibAvailable()</PRE></BLOCKQUOTE> |
<P>HRHTMLRenderingLibAvailable returns true if the HTMLRenderinLib is |
available for your application to use, false if it is not. If you |
have weak-linked your application to the HTMLRenderingLib, then this |
function can be used to determine if the library was loaded when your |
program was launched.</P> |
<P><A HREF="index.html">return to index</A></P> |
<H4><A NAME=HRGetHTMLRenderingLibVersion></A></H4> |
<P> </P> |
<H4><FONT COLOR="#FF0000">HRGetHTMLRenderingLibVersion</FONT></H4> |
<BLOCKQUOTE><PRE>pascal OSStatus HRGetHTMLRenderingLibVersion( |
NumVersion *returnVers) |
</PRE> |
<P><B>returnVers</B> - A pointer to a NumVersion structure. On |
return, this structure contains a value.</P> |
<P>function result - an error code.</P></BLOCKQUOTE> |
<P>HRGetHTMLRenderingLibVersion returns the version of the |
HTMLRenderingLib that is currently installed.</P> |
<P><A HREF="index.html">return to index</A></P> |
<P><A NAME=HRNewReference></A></P> |
<P> </P> |
<H4><FONT COLOR="#FF0000">HRNewReference</FONT></H4> |
<BLOCKQUOTE><PRE>pascal OSStatus HRNewReference( |
<A HREF="types.html#HRReference">HRReference</A> *hrRef, |
OSType rendererType, |
grafPtr GrafPtr)</PRE> |
<P><B>hrRef</B> - is a pointer to a location to store the newly |
created <A HREF="types.html#HRReference">HRReference</A> when |
HRNewReference is able to run successfully.</P> |
<P><B>rendererType</B> - A value of type OSType identifying the |
type of HTML renderer available. Currently, the constant <A HREF="types.html#kHRRendererHTML32Type">kHRRendererHTML32Type</A> |
is the only value you may pass in this parameter.</P> |
<P><B>grafPtr</B> - the quickdraw grafport where the HTML should |
be drawn.</P></BLOCKQUOTE> |
<P>HRNewReference creates a new reference to a HTML rendering object |
for your application to use in conjunction with other |
HTMLRenderingLib calls.</P> |
<P><A HREF="index.html">return to index</A></P> |
<P><A NAME=HRDisposeReference></A></P> |
<P> </P> |
<H4><FONT COLOR="#FF0000">HRDisposeReference</FONT></H4> |
<BLOCKQUOTE><PRE>pascal OSStatus HRDisposeReference( |
<A HREF="types.html#HRReference">HRReference</A> hrRef)</PRE> |
<P><B>hrRef</B> - a reference to a HTML rendering object |
previously obtained by calling HRNewReference.</P></BLOCKQUOTE> |
<P>HRDisposeReference deallocates the HTML rendering object freeing |
up structures associated with the reference.</P> |
<P>NOTE: HRDisposeReference does not deallocate any files cached in |
the HTMLRenderingLib's memory cache. To deallocate the cache, you |
must make call to HRFreeMemory.</P> |
<P><A HREF="index.html">return to index</A></P> |
<P><A NAME=HRFreeMemory></A></P> |
<P> </P> |
<H4><FONT COLOR="#FF0000">HRFreeMemory</FONT></H4> |
<P>Attempts to release cache memory for use by your application.</P> |
<BLOCKQUOTE><PRE>pascal SInt32 HRFreeMemory( |
Size inBytesNeeded)</PRE> |
<P><B>inBytesNeeded</B> - the total number of bytes needed.</P> |
<P>function result - the number of bytes released from cache |
memory by the HRFreeMemory call.</P></BLOCKQUOTE> |
<P>HRFreeMemory can be called to return memory occupied by the |
HTMLRenderingLib's memory cache to the application. </P> |
<P><A HREF="index.html">return to index</A></P> |
<P><A NAME=HRScreenConfigurationChanged></A></P> |
<P> </P> |
<H4><FONT COLOR="#FF0000">HRScreenConfigurationChanged</FONT></H4> |
<BLOCKQUOTE><PRE>pascal void HRScreenConfigurationChanged()</PRE></BLOCKQUOTE> |
<P>HRScreenConfigurationChanged should be called whenever the depth |
of the screen changes. This allows the HTML Rendering Library to |
adjust its drawing parameters so they are appropriate for the |
screen's depth.</P> |
<P><A HREF="index.html">return to index</A></P> |
<P><A NAME=HRIsHREvent></A></P> |
<P> </P> |
<H4><FONT COLOR="#FF0000">HRIsHREvent</FONT></H4> |
<BLOCKQUOTE><PRE>pascal Boolean HRIsHREvent( |
const EventRecord *eventRecord)</PRE> |
<P>eventRecord - a pointer to an event record returned by |
WaitNextEvent</P></BLOCKQUOTE> |
<P>HRIsHREvent returns true if the HTML Rendering Library handled the |
event. If HRIsHREvent returns false, then the event was not handled |
and your application should go ahead and process the event. You |
should call HRIsHREvent every time after calling WaitNextEvent to |
give the HTML Rendering Library an opportunity to handle the |
event.</P> |
<P><A HREF="index.html">return to index</A></P> |
<P> </P> |
<P></P> |
</BODY> |
</HTML> |
Copyright © 2003 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2003-01-30