// Copyright © 2010-2016 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
namespace CefSharp
{
///
/// Implement this interface to handle events related to focus.
/// The methods of this class will be called on the CEF UI thread.
///
public interface IFocusHandler
{
///
/// Called when the browser component has received focus.
///
void OnGotFocus();
///
/// Called when the browser component is requesting focus.
///
/// Indicates where the focus request is originating from.
/// Return false to allow the focus to be set or true to cancel setting the focus.
bool OnSetFocus(CefFocusSource source);
///
/// Called when the browser component is about to lose focus.
/// For instance, if focus was on the last HTML element and the user pressed the TAB key.
///
/// Will be true if the browser is giving focus to the next component
/// and false if the browser is giving focus to the previous component.
void OnTakeFocus(bool next);
}
}