| Framework | Carbon/Carbon.h |
| Declared in | CarbonUtils.h HIWebView.h |
The Web Kit C API provides a way to embed a web view in a Carbon window. Once you have added the view to a window, you must load information to display URL content using native Cocoa classes.
For more details on how to add web views to your application and how to display and manage content using Objective-C APIs, see Displaying Web Content.
Creates an HIView-based container for web content.
OSStatus HIWebViewCreate ( HIViewRef *outControl );
On return, outControl points to the newly-created web view.
A result code.
The web view is a standard HIView, so you can use any of the standard HIView functions to manipulate it. Note however, that the web view cannot currently be obscured by other views above it.
HIWebView.hObtains the Cocoa NSView associated with the web view.
WebView * HIWebViewGetWebView ( HIViewRef inView );
The web view whose Cocoa equivalent you want to obtain.
The Cocoa equivalent of the web view.
You must obtain the Cocoa web view if you want to make native Cocoa calls to manipulate the view contents.
HIWebView.hCreates a Core Graphics image from a Cocoa NSImage.
CGImageRef WebConvertNSImageToCGImageRef ( NSImage *inImage );
A reference to the Cocoa NSImage to convert.
A reference to the Core Graphics image.
You may need to use this function if you want to display icons for URLs from the history or page icons.
CarbonUtils.hInitializes Web Kit.
void WebInitForCarbon ( void );
You must call this function before making any other Web Kit calls. This function will call NSApplicationLoad, InstallEventLoopIdleTimer, and create a NSAutoreleasePool. This function only needs to be called once. Several calls to this function will do nothing, this is important in the case of plug-in bundles. Lastly, you do not need to call NSApplicationLoad and create a NSAutoreleasePool if you call this function.
CarbonUtils.h
Last updated: 2006-03-08