Download Now

    Reference IWebBrowserEvents

    Declared in Codebot.WebKit.Controls.Gtk3.pas on line 27

    IWebBrowserEvents is used to notify a browser control of changes in its web view. This unit cannot use the unit of the browser control, as the two would then depend on each other, so the events only use simple types.
    LoadEvent, Context, and Dialog are the WEBKIT_LOAD, WEBKIT_HIT_TEST_RESULT, and WEBKIT_SCRIPT_DIALOG values declared in Codebot.Interop.WebKit.
      IWebBrowserEvents = interface
      public
        procedure ViewLoadChange(LoadEvent: Integer);
        procedure ViewError(const Uri: string; ErrorCode: Integer; const ErrorMessage: string; var Handled: Boolean);
        procedure ViewProgress(Progress: Integer);
        procedure ViewLocationChange(const Uri: string);
        procedure ViewTitleChange(const Title: string);
        procedure ViewNavigate(const Uri: string; var Allow: Boolean);
        procedure ViewHitTest(Context: LongWord; const Link, Media: string);
        procedure ViewContextMenu(X, Y: Integer; Context: LongWord; const Link, Media: string; var Handled: Boolean);
        procedure ViewScriptDialog(Dialog: Integer; const Message: string; var Input: string; var Accepted: Boolean);
        { Download identifies a download. FileName is the suggested name of the file
          and is changed to the full name of the file to write. }
        procedure ViewDownloadStart(Download: Pointer; const Uri: string; var FileName: string; var Allow: Boolean);
        procedure ViewDownloadProgress(Download: Pointer; Progress: Integer);
        procedure ViewDownloadFinish(Download: Pointer; Failed: Boolean; const ErrorMessage: string);
      end;