Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/webkit/dev_guide/gfwindow.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/webkit/dev_guide/gfwindow.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/webkit/dev_guide/gfwindow.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/webkit/dev_guide/gfwindow.html on line 8

GfWindow

Each WebView must be attached to a GFWindow native window. For more Information about GfWindow see GfWindow.h.

Each GfWindow contains a set of callback methods. These methods allow the developer to gather information and display this to the user. You must implement a GfCallbacks class in order to implement this functionality:

// create a callbacks class
MyCallbacks *callbacks = new MyCallbacks();
// set the callbacks class on the window
window->setCallbacks(callbacks);

To set the native window and the size:

webView->setViewWindow(window);
webView->initWithFrame(rect, NULL, NULL);

The following code snippet implements the GFCallbacks class in the sample application.

class MyCallbacks : public GfCallbacks {
   public:
        void updateScreen(gf_surface_t surf, int x, int y, int x2, int y2, int dstX, int dstY)
        {
          if (first_update == 0) {
              first_update = perf_snapshot_time();
          }

           gf_draw_begin(layer_context);
           gf_draw_blit2(layer_context, surf, layer_surface, x, y, x2, y2, dstX, dstY);
           gf_draw_finish(layer_context);
           gf_draw_end(layer_context);
        }

        void newWindow()
        {
        }
};

The GfWindow.h header file contains the GFCallbacks class. The implemented methods of GFCallbacks are described below (listed alphabetically):

createWindow()
runJavaScriptAlert()
runJavaScriptConfirm()
runJavaScriptPrompt()
textFieldBegin()
textFieldEnd()
updateScreen()


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/webkit/dev_guide/gfwindow.html on line 97

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/webkit/dev_guide/gfwindow.html on line 97