Windows: Add off-screen rendering support (issue #518).

- Popup menus, drag&drop and GPU acceleration are not currently supported.
- Testing is enabled in cefclient by passing the "off-screen-rendering-enabled" command-line flag.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@919 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2012-11-21 00:40:15 +00:00
parent cd32e16c61
commit 6b7716f64b
58 changed files with 4108 additions and 17 deletions

View File

@@ -961,6 +961,23 @@ enum cef_menu_id_t {
MENU_ID_USER_LAST = 28500,
};
///
// Mouse button types.
///
enum cef_mouse_button_type_t {
MBT_LEFT = 0,
MBT_MIDDLE,
MBT_RIGHT,
};
///
// Paint element types.
///
enum cef_paint_element_type_t {
PET_VIEW = 0,
PET_POPUP,
};
///
// Supported event bit flags.
///

View File

@@ -43,7 +43,7 @@ extern "C" {
#endif
// Handle types.
#define cef_cursor_handle_t GtkCursor*
#define cef_cursor_handle_t void*
#define cef_event_handle_t GdkEvent*
#define cef_window_handle_t GtkWidget*

View File

@@ -69,6 +69,12 @@ typedef struct _cef_window_info_t {
cef_window_handle_t parent_window;
HMENU menu;
// If window rendering is disabled no browser window will be created. Set
// |parent_window| to be used for identifying monitor info
// (MonitorFromWindow). If |parent_window| is not provided the main screen
// monitor will be used.
BOOL window_rendering_disabled;
// Set to true to enable transparent painting.
BOOL transparent_painting;

View File

@@ -120,6 +120,7 @@ struct CefWindowInfoTraits {
target->menu = src->menu;
target->window = src->window;
target->transparent_painting = src->transparent_painting;
target->window_rendering_disabled = src->window_rendering_disabled;
}
};
@@ -159,6 +160,11 @@ class CefWindowInfo : public CefStructBase<CefWindowInfoTraits> {
void SetTransparentPainting(BOOL transparentPainting) {
transparent_painting = transparentPainting;
}
void SetAsOffScreen(HWND hWndParent) {
window_rendering_disabled = TRUE;
parent_window = hWndParent;
}
};
#endif // OS_WIN