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

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1294 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2013-06-27 17:40:04 +00:00
parent 947a99d592
commit 13af477401
18 changed files with 976 additions and 113 deletions

View File

@@ -109,8 +109,10 @@ struct CefWindowInfoTraits {
static inline void set(const struct_type* src, struct_type* target,
bool copy) {
target->widget = src->widget;
target->parent_widget = src->parent_widget;
target->window_rendering_disabled = src->window_rendering_disabled;
target->transparent_painting = src->transparent_painting;
target->widget = src->widget;
}
};
@@ -126,6 +128,15 @@ class CefWindowInfo : public CefStructBase<CefWindowInfoTraits> {
void SetAsChild(CefWindowHandle ParentWidget) {
parent_widget = ParentWidget;
}
void SetTransparentPainting(bool transparentPainting) {
transparent_painting = transparentPainting;
}
void SetAsOffScreen(CefWindowHandle ParentWidget) {
window_rendering_disabled = true;
parent_widget = ParentWidget;
}
};
#endif // OS_LINUX

View File

@@ -43,7 +43,7 @@ extern "C" {
#endif
// Handle types.
#define cef_cursor_handle_t void*
#define cef_cursor_handle_t GdkCursor*
#define cef_event_handle_t GdkEvent*
#define cef_window_handle_t GtkWidget*
#define cef_text_input_context_t void*
@@ -63,6 +63,14 @@ typedef struct _cef_window_info_t {
// Pointer for the parent GtkBox widget.
cef_window_handle_t parent_widget;
// If window rendering is disabled no browser window will be created. Set
// |parent_widget| to the window that will act as the parent for popup menus,
// dialog boxes, etc.
bool window_rendering_disabled;
// Set to true to enable transparent painting.
bool transparent_painting;
// Pointer for the new browser widget.
cef_window_handle_t widget;
} cef_window_info_t;