mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
views: Add support for absolute positioned overlay views.
To test: Run `cefclient.exe --use-views --hide-frame --hide-controls` Add `--enable-chrome-runtime` for the same behavior using the Chrome location bar instead of a text field.
This commit is contained in:
@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=0884539e94e09316a9e516d93d77743c6287fe9a$
|
||||
// $hash=df095c7377045f70561ee276a15fd0c13769851c$
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/views/view_cpptoc.h"
|
||||
@ -449,6 +449,43 @@ cef_point_t CEF_CALLBACK view_get_position(struct _cef_view_t* self) {
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK view_set_insets(struct _cef_view_t* self,
|
||||
const cef_insets_t* insets) {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: insets; type: simple_byref_const
|
||||
DCHECK(insets);
|
||||
if (!insets)
|
||||
return;
|
||||
|
||||
// Translate param: insets; type: simple_byref_const
|
||||
CefInsets insetsVal = insets ? *insets : CefInsets();
|
||||
|
||||
// Execute
|
||||
CefViewCppToC::Get(self)->SetInsets(insetsVal);
|
||||
}
|
||||
|
||||
cef_insets_t CEF_CALLBACK view_get_insets(struct _cef_view_t* self) {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefInsets();
|
||||
|
||||
// Execute
|
||||
cef_insets_t _retval = CefViewCppToC::Get(self)->GetInsets();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
cef_size_t CEF_CALLBACK view_get_preferred_size(struct _cef_view_t* self) {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
|
||||
@ -912,6 +949,8 @@ CefViewCppToC::CefViewCppToC() {
|
||||
GetStruct()->get_size = view_get_size;
|
||||
GetStruct()->set_position = view_set_position;
|
||||
GetStruct()->get_position = view_get_position;
|
||||
GetStruct()->set_insets = view_set_insets;
|
||||
GetStruct()->get_insets = view_get_insets;
|
||||
GetStruct()->get_preferred_size = view_get_preferred_size;
|
||||
GetStruct()->size_to_preferred_size = view_size_to_preferred_size;
|
||||
GetStruct()->get_minimum_size = view_get_minimum_size;
|
||||
|
Reference in New Issue
Block a user