cef/libcef_dll/cpptoc/views/window_cpptoc.cc

1632 lines
42 KiB
C++
Raw Normal View History

// Copyright (c) 2017 The Chromium Embedded Framework Authors. All rights
Implement Views framework on Windows and Linux (issue #1749). - Add Views header files in a new include/views directory. - Add initial top-level window (CefWindow), control (CefBrowserView, CefLabelButton, CefMenuButton, CefPanel, CefScrollView, CefTextfield) and layout (CefBoxLayout, CefFlowLayout) support. See libcef/browser/views/view_impl.h comments for implementation details. - Add Views example usage in cefclient and cefsimple and Views unit tests in cef_unittests. Pass the `--use-views` command-line flag to cefclient, cefsimple and cef_unittests to run using the Views framework instead of platform APIs. For cefclient and cefsimple this will create the browser window and all related functionality using the Views framework. For cef_unittests this will run all tests (except OSR tests) in a Views-based browser window. Views- specific unit tests (`--gtest_filter=Views*`) will be run even if the the `--use-views` flag is not specified. - Pass the `--hide-frame` command-line flag to cefclient to demo a frameless Views-based browser window. - Pass the `--hide-controls` command-line flag to cefclient to demo a browser window without top controls. This also works in non-Views mode. - Pass the `--enable-high-dpi-support` command-line flag to cef_unittests on Windows to test high-DPI support on a display that supports it. - Add CefImage for reading/writing image file formats. - Add CefBrowser::DownloadImage() for downloading image URLs as a CefImage representation. This is primarily for loading favicons. - Add CefMenuModel::CreateMenuModel() and CefMenuModelDelegate for creating custom menus. This is primarily for use with CefMenuButton. - Add CefBrowser::TryCloseBrowser() helper for closing a browser. Also improve related documentation in cef_life_span_handler.h. - Rename cef_page_range_t to cef_range_t. It is now also used by CefTextfield. - Remove CefLifeSpanHandler::RunModal() which is never called. - Add draggable regions example to cefclient.
2016-01-19 21:09:01 +01:00
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/views/box_layout_cpptoc.h"
#include "libcef_dll/cpptoc/views/browser_view_cpptoc.h"
#include "libcef_dll/cpptoc/views/button_cpptoc.h"
#include "libcef_dll/cpptoc/views/display_cpptoc.h"
#include "libcef_dll/cpptoc/views/fill_layout_cpptoc.h"
#include "libcef_dll/cpptoc/image_cpptoc.h"
#include "libcef_dll/cpptoc/views/layout_cpptoc.h"
#include "libcef_dll/cpptoc/menu_model_cpptoc.h"
#include "libcef_dll/cpptoc/views/panel_cpptoc.h"
#include "libcef_dll/cpptoc/views/scroll_view_cpptoc.h"
#include "libcef_dll/cpptoc/views/textfield_cpptoc.h"
#include "libcef_dll/cpptoc/views/view_cpptoc.h"
#include "libcef_dll/cpptoc/views/window_cpptoc.h"
#include "libcef_dll/ctocpp/views/view_delegate_ctocpp.h"
#include "libcef_dll/ctocpp/views/window_delegate_ctocpp.h"
// GLOBAL FUNCTIONS - Body may be edited by hand.
CEF_EXPORT cef_window_t* cef_window_create_top_level(
struct _cef_window_delegate_t* delegate) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Unverified params: delegate
// Execute
CefRefPtr<CefWindow> _retval = CefWindow::CreateTopLevelWindow(
CefWindowDelegateCToCpp::Wrap(delegate));
// Return type: refptr_same
return CefWindowCppToC::Wrap(_retval);
}
namespace {
// MEMBER FUNCTIONS - Body may be edited by hand.
void CEF_CALLBACK window_show(struct _cef_window_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefWindowCppToC::Get(self)->Show();
}
void CEF_CALLBACK window_hide(struct _cef_window_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefWindowCppToC::Get(self)->Hide();
}
void CEF_CALLBACK window_center_window(struct _cef_window_t* self,
const cef_size_t* size) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: size; type: simple_byref_const
DCHECK(size);
if (!size)
return;
// Translate param: size; type: simple_byref_const
CefSize sizeVal = size?*size:CefSize();
// Execute
CefWindowCppToC::Get(self)->CenterWindow(
sizeVal);
}
void CEF_CALLBACK window_close(struct _cef_window_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefWindowCppToC::Get(self)->Close();
}
int CEF_CALLBACK window_is_closed(struct _cef_window_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefWindowCppToC::Get(self)->IsClosed();
// Return type: bool
return _retval;
}
void CEF_CALLBACK window_activate(struct _cef_window_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefWindowCppToC::Get(self)->Activate();
}
void CEF_CALLBACK window_deactivate(struct _cef_window_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefWindowCppToC::Get(self)->Deactivate();
}
int CEF_CALLBACK window_is_active(struct _cef_window_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefWindowCppToC::Get(self)->IsActive();
// Return type: bool
return _retval;
}
void CEF_CALLBACK window_bring_to_top(struct _cef_window_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefWindowCppToC::Get(self)->BringToTop();
}
void CEF_CALLBACK window_set_always_on_top(struct _cef_window_t* self,
int on_top) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefWindowCppToC::Get(self)->SetAlwaysOnTop(
on_top?true:false);
}
int CEF_CALLBACK window_is_always_on_top(struct _cef_window_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefWindowCppToC::Get(self)->IsAlwaysOnTop();
// Return type: bool
return _retval;
}
void CEF_CALLBACK window_maximize(struct _cef_window_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefWindowCppToC::Get(self)->Maximize();
}
void CEF_CALLBACK window_minimize(struct _cef_window_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefWindowCppToC::Get(self)->Minimize();
}
void CEF_CALLBACK window_restore(struct _cef_window_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefWindowCppToC::Get(self)->Restore();
}
void CEF_CALLBACK window_set_fullscreen(struct _cef_window_t* self,
int fullscreen) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefWindowCppToC::Get(self)->SetFullscreen(
fullscreen?true:false);
}
int CEF_CALLBACK window_is_maximized(struct _cef_window_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefWindowCppToC::Get(self)->IsMaximized();
// Return type: bool
return _retval;
}
int CEF_CALLBACK window_is_minimized(struct _cef_window_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefWindowCppToC::Get(self)->IsMinimized();
// Return type: bool
return _retval;
}
int CEF_CALLBACK window_is_fullscreen(struct _cef_window_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefWindowCppToC::Get(self)->IsFullscreen();
// Return type: bool
return _retval;
}
void CEF_CALLBACK window_set_title(struct _cef_window_t* self,
const cef_string_t* title) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Unverified params: title
// Execute
CefWindowCppToC::Get(self)->SetTitle(
CefString(title));
}
cef_string_userfree_t CEF_CALLBACK window_get_title(
struct _cef_window_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefWindowCppToC::Get(self)->GetTitle();
// Return type: string
return _retval.DetachToUserFree();
}
void CEF_CALLBACK window_set_window_icon(struct _cef_window_t* self,
cef_image_t* image) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: image; type: refptr_same
DCHECK(image);
if (!image)
return;
// Execute
CefWindowCppToC::Get(self)->SetWindowIcon(
CefImageCppToC::Unwrap(image));
}
cef_image_t* CEF_CALLBACK window_get_window_icon(struct _cef_window_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefImage> _retval = CefWindowCppToC::Get(self)->GetWindowIcon();
// Return type: refptr_same
return CefImageCppToC::Wrap(_retval);
}
void CEF_CALLBACK window_set_window_app_icon(struct _cef_window_t* self,
cef_image_t* image) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: image; type: refptr_same
DCHECK(image);
if (!image)
return;
// Execute
CefWindowCppToC::Get(self)->SetWindowAppIcon(
CefImageCppToC::Unwrap(image));
}
cef_image_t* CEF_CALLBACK window_get_window_app_icon(
struct _cef_window_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefImage> _retval = CefWindowCppToC::Get(self)->GetWindowAppIcon();
// Return type: refptr_same
return CefImageCppToC::Wrap(_retval);
}
void CEF_CALLBACK window_show_menu(struct _cef_window_t* self,
cef_menu_model_t* menu_model, const cef_point_t* screen_point,
cef_menu_anchor_position_t anchor_position) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: menu_model; type: refptr_same
DCHECK(menu_model);
if (!menu_model)
return;
// Verify param: screen_point; type: simple_byref_const
DCHECK(screen_point);
if (!screen_point)
return;
// Translate param: screen_point; type: simple_byref_const
CefPoint screen_pointVal = screen_point?*screen_point:CefPoint();
// Execute
CefWindowCppToC::Get(self)->ShowMenu(
CefMenuModelCppToC::Unwrap(menu_model),
screen_pointVal,
anchor_position);
}
void CEF_CALLBACK window_cancel_menu(struct _cef_window_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefWindowCppToC::Get(self)->CancelMenu();
}
cef_display_t* CEF_CALLBACK window_get_display(struct _cef_window_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefDisplay> _retval = CefWindowCppToC::Get(self)->GetDisplay();
// Return type: refptr_same
return CefDisplayCppToC::Wrap(_retval);
}
cef_rect_t CEF_CALLBACK window_get_client_area_bounds_in_screen(
struct _cef_window_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return CefRect();
// Execute
cef_rect_t _retval = CefWindowCppToC::Get(self)->GetClientAreaBoundsInScreen(
);
// Return type: simple
return _retval;
}
void CEF_CALLBACK window_set_draggable_regions(struct _cef_window_t* self,
size_t regionsCount, cef_draggable_region_t const* regions) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Unverified params: regions
// Translate param: regions; type: simple_vec_byref_const
std::vector<CefDraggableRegion > regionsList;
if (regionsCount > 0) {
for (size_t i = 0; i < regionsCount; ++i) {
CefDraggableRegion regionsVal = regions[i];
regionsList.push_back(regionsVal);
}
}
// Execute
CefWindowCppToC::Get(self)->SetDraggableRegions(
regionsList);
}
cef_window_handle_t CEF_CALLBACK window_get_window_handle(
struct _cef_window_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return kNullWindowHandle;
// Execute
cef_window_handle_t _retval = CefWindowCppToC::Get(self)->GetWindowHandle();
// Return type: simple
return _retval;
}
void CEF_CALLBACK window_send_key_press(struct _cef_window_t* self,
int key_code, uint32 event_flags) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefWindowCppToC::Get(self)->SendKeyPress(
key_code,
event_flags);
}
void CEF_CALLBACK window_send_mouse_move(struct _cef_window_t* self,
int screen_x, int screen_y) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefWindowCppToC::Get(self)->SendMouseMove(
screen_x,
screen_y);
}
void CEF_CALLBACK window_send_mouse_events(struct _cef_window_t* self,
cef_mouse_button_type_t button, int mouse_down, int mouse_up) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefWindowCppToC::Get(self)->SendMouseEvents(
button,
mouse_down?true:false,
mouse_up?true:false);
}
struct _cef_window_t* CEF_CALLBACK window_as_window(struct _cef_panel_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefWindow> _retval = CefWindowCppToC::Get(
reinterpret_cast<cef_window_t*>(self))->AsWindow();
// Return type: refptr_same
return CefWindowCppToC::Wrap(_retval);
}
cef_fill_layout_t* CEF_CALLBACK window_set_to_fill_layout(
struct _cef_panel_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefFillLayout> _retval = CefWindowCppToC::Get(
reinterpret_cast<cef_window_t*>(self))->SetToFillLayout();
// Return type: refptr_same
return CefFillLayoutCppToC::Wrap(_retval);
}
cef_box_layout_t* CEF_CALLBACK window_set_to_box_layout(
struct _cef_panel_t* self,
const struct _cef_box_layout_settings_t* settings) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Verify param: settings; type: struct_byref_const
DCHECK(settings);
if (!settings)
return NULL;
// Translate param: settings; type: struct_byref_const
CefBoxLayoutSettings settingsObj;
if (settings)
settingsObj.Set(*settings, false);
// Execute
CefRefPtr<CefBoxLayout> _retval = CefWindowCppToC::Get(
reinterpret_cast<cef_window_t*>(self))->SetToBoxLayout(
settingsObj);
// Return type: refptr_same
return CefBoxLayoutCppToC::Wrap(_retval);
}
cef_layout_t* CEF_CALLBACK window_get_layout(struct _cef_panel_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefLayout> _retval = CefWindowCppToC::Get(
reinterpret_cast<cef_window_t*>(self))->GetLayout();
// Return type: refptr_same
return CefLayoutCppToC::Wrap(_retval);
}
void CEF_CALLBACK window_layout(struct _cef_panel_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))->Layout();
}
void CEF_CALLBACK window_add_child_view(struct _cef_panel_t* self,
cef_view_t* view) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: view; type: refptr_same
DCHECK(view);
if (!view)
return;
// Execute
CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))->AddChildView(
CefViewCppToC::Unwrap(view));
}
void CEF_CALLBACK window_add_child_view_at(struct _cef_panel_t* self,
cef_view_t* view, int index) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: view; type: refptr_same
DCHECK(view);
if (!view)
return;
// Verify param: index; type: simple_byval
DCHECK_GE(index, 0);
if (index < 0)
return;
// Execute
CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))->AddChildViewAt(
CefViewCppToC::Unwrap(view),
index);
}
void CEF_CALLBACK window_reorder_child_view(struct _cef_panel_t* self,
cef_view_t* view, int index) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: view; type: refptr_same
DCHECK(view);
if (!view)
return;
// Execute
CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))->ReorderChildView(
CefViewCppToC::Unwrap(view),
index);
}
void CEF_CALLBACK window_remove_child_view(struct _cef_panel_t* self,
cef_view_t* view) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: view; type: refptr_same
DCHECK(view);
if (!view)
return;
// Execute
CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))->RemoveChildView(
CefViewCppToC::Unwrap(view));
}
void CEF_CALLBACK window_remove_all_child_views(struct _cef_panel_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(
self))->RemoveAllChildViews();
}
size_t CEF_CALLBACK window_get_child_view_count(struct _cef_panel_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
size_t _retval = CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(
self))->GetChildViewCount();
// Return type: simple
return _retval;
}
cef_view_t* CEF_CALLBACK window_get_child_view_at(struct _cef_panel_t* self,
int index) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Verify param: index; type: simple_byval
DCHECK_GE(index, 0);
if (index < 0)
return NULL;
// Execute
CefRefPtr<CefView> _retval = CefWindowCppToC::Get(
reinterpret_cast<cef_window_t*>(self))->GetChildViewAt(
index);
// Return type: refptr_same
return CefViewCppToC::Wrap(_retval);
}
cef_browser_view_t* CEF_CALLBACK window_as_browser_view(
struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefBrowserView> _retval = CefWindowCppToC::Get(
reinterpret_cast<cef_window_t*>(self))->AsBrowserView();
// Return type: refptr_same
return CefBrowserViewCppToC::Wrap(_retval);
}
cef_button_t* CEF_CALLBACK window_as_button(struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefButton> _retval = CefWindowCppToC::Get(
reinterpret_cast<cef_window_t*>(self))->AsButton();
// Return type: refptr_same
return CefButtonCppToC::Wrap(_retval);
}
cef_panel_t* CEF_CALLBACK window_as_panel(struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefPanel> _retval = CefWindowCppToC::Get(
reinterpret_cast<cef_window_t*>(self))->AsPanel();
// Return type: refptr_same
return CefPanelCppToC::Wrap(_retval);
}
cef_scroll_view_t* CEF_CALLBACK window_as_scroll_view(
struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefScrollView> _retval = CefWindowCppToC::Get(
reinterpret_cast<cef_window_t*>(self))->AsScrollView();
// Return type: refptr_same
return CefScrollViewCppToC::Wrap(_retval);
}
cef_textfield_t* CEF_CALLBACK window_as_textfield(struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefTextfield> _retval = CefWindowCppToC::Get(
reinterpret_cast<cef_window_t*>(self))->AsTextfield();
// Return type: refptr_same
return CefTextfieldCppToC::Wrap(_retval);
}
cef_string_userfree_t CEF_CALLBACK window_get_type_string(
struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(
self))->GetTypeString();
// Return type: string
return _retval.DetachToUserFree();
}
cef_string_userfree_t CEF_CALLBACK window_to_string(struct _cef_view_t* self,
int include_children) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefString _retval = CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(
self))->ToString(
include_children?true:false);
// Return type: string
return _retval.DetachToUserFree();
}
int CEF_CALLBACK window_is_valid(struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(
self))->IsValid();
// Return type: bool
return _retval;
}
int CEF_CALLBACK window_is_attached(struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(
self))->IsAttached();
// Return type: bool
return _retval;
}
int CEF_CALLBACK window_is_same(struct _cef_view_t* self, cef_view_t* that) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: that; type: refptr_same
DCHECK(that);
if (!that)
return 0;
// Execute
bool _retval = CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(
self))->IsSame(
CefViewCppToC::Unwrap(that));
// Return type: bool
return _retval;
}
cef_view_delegate_t* CEF_CALLBACK window_get_delegate(
struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefViewDelegate> _retval = CefWindowCppToC::Get(
reinterpret_cast<cef_window_t*>(self))->GetDelegate();
// Return type: refptr_diff
return CefViewDelegateCToCpp::Unwrap(_retval);
}
struct _cef_window_t* CEF_CALLBACK window_get_window(struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefWindow> _retval = CefWindowCppToC::Get(
reinterpret_cast<cef_window_t*>(self))->GetWindow();
// Return type: refptr_same
return CefWindowCppToC::Wrap(_retval);
}
int CEF_CALLBACK window_get_id(struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(
self))->GetID();
// Return type: simple
return _retval;
}
void CEF_CALLBACK window_set_id(struct _cef_view_t* self, int id) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))->SetID(
id);
}
cef_view_t* CEF_CALLBACK window_get_parent_view(struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefView> _retval = CefWindowCppToC::Get(
reinterpret_cast<cef_window_t*>(self))->GetParentView();
// Return type: refptr_same
return CefViewCppToC::Wrap(_retval);
}
cef_view_t* CEF_CALLBACK window_get_view_for_id(struct _cef_view_t* self,
int id) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefView> _retval = CefWindowCppToC::Get(
reinterpret_cast<cef_window_t*>(self))->GetViewForID(
id);
// Return type: refptr_same
return CefViewCppToC::Wrap(_retval);
}
void CEF_CALLBACK window_set_bounds(struct _cef_view_t* self,
const cef_rect_t* bounds) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: bounds; type: simple_byref_const
DCHECK(bounds);
if (!bounds)
return;
// Translate param: bounds; type: simple_byref_const
CefRect boundsVal = bounds?*bounds:CefRect();
// Execute
CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))->SetBounds(
boundsVal);
}
cef_rect_t CEF_CALLBACK window_get_bounds(struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return CefRect();
// Execute
cef_rect_t _retval = CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(
self))->GetBounds();
// Return type: simple
return _retval;
}
cef_rect_t CEF_CALLBACK window_get_bounds_in_screen(struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return CefRect();
// Execute
cef_rect_t _retval = CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(
self))->GetBoundsInScreen();
// Return type: simple
return _retval;
}
void CEF_CALLBACK window_set_size(struct _cef_view_t* self,
const cef_size_t* size) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: size; type: simple_byref_const
DCHECK(size);
if (!size)
return;
// Translate param: size; type: simple_byref_const
CefSize sizeVal = size?*size:CefSize();
// Execute
CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))->SetSize(
sizeVal);
}
cef_size_t CEF_CALLBACK window_get_size(struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return CefSize();
// Execute
cef_size_t _retval = CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(
self))->GetSize();
// Return type: simple
return _retval;
}
void CEF_CALLBACK window_set_position(struct _cef_view_t* self,
const cef_point_t* position) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: position; type: simple_byref_const
DCHECK(position);
if (!position)
return;
// Translate param: position; type: simple_byref_const
CefPoint positionVal = position?*position:CefPoint();
// Execute
CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))->SetPosition(
positionVal);
}
cef_point_t CEF_CALLBACK window_get_position(struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return CefPoint();
// Execute
cef_point_t _retval = CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(
self))->GetPosition();
// Return type: simple
return _retval;
}
cef_size_t CEF_CALLBACK window_get_preferred_size(struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return CefSize();
// Execute
cef_size_t _retval = CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(
self))->GetPreferredSize();
// Return type: simple
return _retval;
}
void CEF_CALLBACK window_size_to_preferred_size(struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(
self))->SizeToPreferredSize();
}
cef_size_t CEF_CALLBACK window_get_minimum_size(struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return CefSize();
// Execute
cef_size_t _retval = CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(
self))->GetMinimumSize();
// Return type: simple
return _retval;
}
cef_size_t CEF_CALLBACK window_get_maximum_size(struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return CefSize();
// Execute
cef_size_t _retval = CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(
self))->GetMaximumSize();
// Return type: simple
return _retval;
}
int CEF_CALLBACK window_get_height_for_width(struct _cef_view_t* self,
int width) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
int _retval = CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(
self))->GetHeightForWidth(
width);
// Return type: simple
return _retval;
}
void CEF_CALLBACK window_invalidate_layout(struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))->InvalidateLayout(
);
}
void CEF_CALLBACK window_set_visible(struct _cef_view_t* self, int visible) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))->SetVisible(
visible?true:false);
}
int CEF_CALLBACK window_is_visible(struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(
self))->IsVisible();
// Return type: bool
return _retval;
}
int CEF_CALLBACK window_is_drawn(struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(
self))->IsDrawn();
// Return type: bool
return _retval;
}
void CEF_CALLBACK window_set_enabled(struct _cef_view_t* self, int enabled) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))->SetEnabled(
enabled?true:false);
}
int CEF_CALLBACK window_is_enabled(struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(
self))->IsEnabled();
// Return type: bool
return _retval;
}
void CEF_CALLBACK window_set_focusable(struct _cef_view_t* self,
int focusable) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))->SetFocusable(
focusable?true:false);
}
int CEF_CALLBACK window_is_focusable(struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(
self))->IsFocusable();
// Return type: bool
return _retval;
}
int CEF_CALLBACK window_is_accessibility_focusable(struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
bool _retval = CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(
self))->IsAccessibilityFocusable();
// Return type: bool
return _retval;
}
void CEF_CALLBACK window_request_focus(struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))->RequestFocus();
}
void CEF_CALLBACK window_set_background_color(struct _cef_view_t* self,
cef_color_t color) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Execute
CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(
self))->SetBackgroundColor(
color);
}
cef_color_t CEF_CALLBACK window_get_background_color(struct _cef_view_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Execute
cef_color_t _retval = CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(
self))->GetBackgroundColor();
// Return type: simple
return _retval;
}
int CEF_CALLBACK window_convert_point_to_screen(struct _cef_view_t* self,
cef_point_t* point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: point; type: simple_byref
DCHECK(point);
if (!point)
return 0;
// Translate param: point; type: simple_byref
CefPoint pointVal = point?*point:CefPoint();
// Execute
bool _retval = CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(
self))->ConvertPointToScreen(
pointVal);
// Restore param: point; type: simple_byref
if (point)
*point = pointVal;
// Return type: bool
return _retval;
}
int CEF_CALLBACK window_convert_point_from_screen(struct _cef_view_t* self,
cef_point_t* point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: point; type: simple_byref
DCHECK(point);
if (!point)
return 0;
// Translate param: point; type: simple_byref
CefPoint pointVal = point?*point:CefPoint();
// Execute
bool _retval = CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(
self))->ConvertPointFromScreen(
pointVal);
// Restore param: point; type: simple_byref
if (point)
*point = pointVal;
// Return type: bool
return _retval;
}
int CEF_CALLBACK window_convert_point_to_window(struct _cef_view_t* self,
cef_point_t* point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: point; type: simple_byref
DCHECK(point);
if (!point)
return 0;
// Translate param: point; type: simple_byref
CefPoint pointVal = point?*point:CefPoint();
// Execute
bool _retval = CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(
self))->ConvertPointToWindow(
pointVal);
// Restore param: point; type: simple_byref
if (point)
*point = pointVal;
// Return type: bool
return _retval;
}
int CEF_CALLBACK window_convert_point_from_window(struct _cef_view_t* self,
cef_point_t* point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: point; type: simple_byref
DCHECK(point);
if (!point)
return 0;
// Translate param: point; type: simple_byref
CefPoint pointVal = point?*point:CefPoint();
// Execute
bool _retval = CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(
self))->ConvertPointFromWindow(
pointVal);
// Restore param: point; type: simple_byref
if (point)
*point = pointVal;
// Return type: bool
return _retval;
}
int CEF_CALLBACK window_convert_point_to_view(struct _cef_view_t* self,
cef_view_t* view, cef_point_t* point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: view; type: refptr_same
DCHECK(view);
if (!view)
return 0;
// Verify param: point; type: simple_byref
DCHECK(point);
if (!point)
return 0;
// Translate param: point; type: simple_byref
CefPoint pointVal = point?*point:CefPoint();
// Execute
bool _retval = CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(
self))->ConvertPointToView(
CefViewCppToC::Unwrap(view),
pointVal);
// Restore param: point; type: simple_byref
if (point)
*point = pointVal;
// Return type: bool
return _retval;
}
int CEF_CALLBACK window_convert_point_from_view(struct _cef_view_t* self,
cef_view_t* view, cef_point_t* point) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return 0;
// Verify param: view; type: refptr_same
DCHECK(view);
if (!view)
return 0;
// Verify param: point; type: simple_byref
DCHECK(point);
if (!point)
return 0;
// Translate param: point; type: simple_byref
CefPoint pointVal = point?*point:CefPoint();
// Execute
bool _retval = CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(
self))->ConvertPointFromView(
CefViewCppToC::Unwrap(view),
pointVal);
// Restore param: point; type: simple_byref
if (point)
*point = pointVal;
// Return type: bool
return _retval;
}
} // namespace
// CONSTRUCTOR - Do not edit by hand.
CefWindowCppToC::CefWindowCppToC() {
GetStruct()->show = window_show;
GetStruct()->hide = window_hide;
GetStruct()->center_window = window_center_window;
GetStruct()->close = window_close;
GetStruct()->is_closed = window_is_closed;
GetStruct()->activate = window_activate;
GetStruct()->deactivate = window_deactivate;
GetStruct()->is_active = window_is_active;
GetStruct()->bring_to_top = window_bring_to_top;
GetStruct()->set_always_on_top = window_set_always_on_top;
GetStruct()->is_always_on_top = window_is_always_on_top;
GetStruct()->maximize = window_maximize;
GetStruct()->minimize = window_minimize;
GetStruct()->restore = window_restore;
GetStruct()->set_fullscreen = window_set_fullscreen;
GetStruct()->is_maximized = window_is_maximized;
GetStruct()->is_minimized = window_is_minimized;
GetStruct()->is_fullscreen = window_is_fullscreen;
GetStruct()->set_title = window_set_title;
GetStruct()->get_title = window_get_title;
GetStruct()->set_window_icon = window_set_window_icon;
GetStruct()->get_window_icon = window_get_window_icon;
GetStruct()->set_window_app_icon = window_set_window_app_icon;
GetStruct()->get_window_app_icon = window_get_window_app_icon;
GetStruct()->show_menu = window_show_menu;
GetStruct()->cancel_menu = window_cancel_menu;
GetStruct()->get_display = window_get_display;
GetStruct()->get_client_area_bounds_in_screen =
window_get_client_area_bounds_in_screen;
GetStruct()->set_draggable_regions = window_set_draggable_regions;
GetStruct()->get_window_handle = window_get_window_handle;
GetStruct()->send_key_press = window_send_key_press;
GetStruct()->send_mouse_move = window_send_mouse_move;
GetStruct()->send_mouse_events = window_send_mouse_events;
GetStruct()->base.as_window = window_as_window;
GetStruct()->base.set_to_fill_layout = window_set_to_fill_layout;
GetStruct()->base.set_to_box_layout = window_set_to_box_layout;
GetStruct()->base.get_layout = window_get_layout;
GetStruct()->base.layout = window_layout;
GetStruct()->base.add_child_view = window_add_child_view;
GetStruct()->base.add_child_view_at = window_add_child_view_at;
GetStruct()->base.reorder_child_view = window_reorder_child_view;
GetStruct()->base.remove_child_view = window_remove_child_view;
GetStruct()->base.remove_all_child_views = window_remove_all_child_views;
GetStruct()->base.get_child_view_count = window_get_child_view_count;
GetStruct()->base.get_child_view_at = window_get_child_view_at;
GetStruct()->base.base.as_browser_view = window_as_browser_view;
GetStruct()->base.base.as_button = window_as_button;
GetStruct()->base.base.as_panel = window_as_panel;
GetStruct()->base.base.as_scroll_view = window_as_scroll_view;
GetStruct()->base.base.as_textfield = window_as_textfield;
GetStruct()->base.base.get_type_string = window_get_type_string;
GetStruct()->base.base.to_string = window_to_string;
GetStruct()->base.base.is_valid = window_is_valid;
GetStruct()->base.base.is_attached = window_is_attached;
GetStruct()->base.base.is_same = window_is_same;
GetStruct()->base.base.get_delegate = window_get_delegate;
GetStruct()->base.base.get_window = window_get_window;
GetStruct()->base.base.get_id = window_get_id;
GetStruct()->base.base.set_id = window_set_id;
GetStruct()->base.base.get_parent_view = window_get_parent_view;
GetStruct()->base.base.get_view_for_id = window_get_view_for_id;
GetStruct()->base.base.set_bounds = window_set_bounds;
GetStruct()->base.base.get_bounds = window_get_bounds;
GetStruct()->base.base.get_bounds_in_screen = window_get_bounds_in_screen;
GetStruct()->base.base.set_size = window_set_size;
GetStruct()->base.base.get_size = window_get_size;
GetStruct()->base.base.set_position = window_set_position;
GetStruct()->base.base.get_position = window_get_position;
GetStruct()->base.base.get_preferred_size = window_get_preferred_size;
GetStruct()->base.base.size_to_preferred_size = window_size_to_preferred_size;
GetStruct()->base.base.get_minimum_size = window_get_minimum_size;
GetStruct()->base.base.get_maximum_size = window_get_maximum_size;
GetStruct()->base.base.get_height_for_width = window_get_height_for_width;
GetStruct()->base.base.invalidate_layout = window_invalidate_layout;
GetStruct()->base.base.set_visible = window_set_visible;
GetStruct()->base.base.is_visible = window_is_visible;
GetStruct()->base.base.is_drawn = window_is_drawn;
GetStruct()->base.base.set_enabled = window_set_enabled;
GetStruct()->base.base.is_enabled = window_is_enabled;
GetStruct()->base.base.set_focusable = window_set_focusable;
GetStruct()->base.base.is_focusable = window_is_focusable;
GetStruct()->base.base.is_accessibility_focusable =
window_is_accessibility_focusable;
GetStruct()->base.base.request_focus = window_request_focus;
GetStruct()->base.base.set_background_color = window_set_background_color;
GetStruct()->base.base.get_background_color = window_get_background_color;
GetStruct()->base.base.convert_point_to_screen =
window_convert_point_to_screen;
GetStruct()->base.base.convert_point_from_screen =
window_convert_point_from_screen;
GetStruct()->base.base.convert_point_to_window =
window_convert_point_to_window;
GetStruct()->base.base.convert_point_from_window =
window_convert_point_from_window;
GetStruct()->base.base.convert_point_to_view = window_convert_point_to_view;
GetStruct()->base.base.convert_point_from_view =
window_convert_point_from_view;
}
template<> CefRefPtr<CefWindow> CefCppToC<CefWindowCppToC, CefWindow,
cef_window_t>::UnwrapDerived(CefWrapperType type, cef_window_t* s) {
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#if DCHECK_IS_ON()
Implement Views framework on Windows and Linux (issue #1749). - Add Views header files in a new include/views directory. - Add initial top-level window (CefWindow), control (CefBrowserView, CefLabelButton, CefMenuButton, CefPanel, CefScrollView, CefTextfield) and layout (CefBoxLayout, CefFlowLayout) support. See libcef/browser/views/view_impl.h comments for implementation details. - Add Views example usage in cefclient and cefsimple and Views unit tests in cef_unittests. Pass the `--use-views` command-line flag to cefclient, cefsimple and cef_unittests to run using the Views framework instead of platform APIs. For cefclient and cefsimple this will create the browser window and all related functionality using the Views framework. For cef_unittests this will run all tests (except OSR tests) in a Views-based browser window. Views- specific unit tests (`--gtest_filter=Views*`) will be run even if the the `--use-views` flag is not specified. - Pass the `--hide-frame` command-line flag to cefclient to demo a frameless Views-based browser window. - Pass the `--hide-controls` command-line flag to cefclient to demo a browser window without top controls. This also works in non-Views mode. - Pass the `--enable-high-dpi-support` command-line flag to cef_unittests on Windows to test high-DPI support on a display that supports it. - Add CefImage for reading/writing image file formats. - Add CefBrowser::DownloadImage() for downloading image URLs as a CefImage representation. This is primarily for loading favicons. - Add CefMenuModel::CreateMenuModel() and CefMenuModelDelegate for creating custom menus. This is primarily for use with CefMenuButton. - Add CefBrowser::TryCloseBrowser() helper for closing a browser. Also improve related documentation in cef_life_span_handler.h. - Rename cef_page_range_t to cef_range_t. It is now also used by CefTextfield. - Remove CefLifeSpanHandler::RunModal() which is never called. - Add draggable regions example to cefclient.
2016-01-19 21:09:01 +01:00
template<> base::AtomicRefCount CefCppToC<CefWindowCppToC, CefWindow,
cef_window_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCppToC<CefWindowCppToC, CefWindow,
cef_window_t>::kWrapperType = WT_WINDOW;