本文整理汇总了C++中IDirectFBDisplayLayer::GetWindow方法的典型用法代码示例。如果您正苦于以下问题:C++ IDirectFBDisplayLayer::GetWindow方法的具体用法?C++ IDirectFBDisplayLayer::GetWindow怎么用?C++ IDirectFBDisplayLayer::GetWindow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDirectFBDisplayLayer
的用法示例。
在下文中一共展示了IDirectFBDisplayLayer::GetWindow方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setPermanentState
void QDirectFBWindowSurface::setPermanentState(const QByteArray &state)
{
const char *ptr = state.constData();
IDirectFBDisplayLayer *layer = screen->dfbDisplayLayer();
SurfaceFlags flags;
memcpy(&flags, ptr, sizeof(SurfaceFlags));
setSurfaceFlags(flags);
ptr += sizeof(SurfaceFlags);
DFBWindowID id;
memcpy(&id, ptr, sizeof(DFBWindowID));
if (dfbSurface)
dfbSurface->Release(dfbSurface);
if (id != (DFBWindowID)-1) {
IDirectFBWindow *dw;
layer->GetWindow(layer, id, &dw);
if (dw->GetSurface(dw, &dfbSurface) != DFB_OK)
dfbSurface = 0;
dw->Release(dw);
}
else {
dfbSurface = 0;
}
}
示例2: printf
void *BrowserMain(void * argument)
{
printf("%s:%d\n", __func__, __LINE__);
int argc = 0;
char**argv = NULL;
pthread_mutex_init (&mutex, NULL);
g_type_init();
g_thread_init(NULL);
lite_open( &argc, &argv );
WebKitDFB_Initialize( lite_get_dfb_interface() );
IDirectFBDisplayLayer *layer;
DFBDisplayLayerConfig config;
lite_get_layer_interface( &layer );
layer->GetConfiguration( layer, &config );
DFBRectangle windowRect = { 0, 0, config.width, config.height };
DFBRectangle webviewRect = { 0, 0, config.width, config.height };
lite_new_window( NULL, &windowRect, DWCAPS_NONE, liteNoWindowTheme, "WebKitDFB", &g_window );
lite_new_webview( LITE_BOX(g_window), &webviewRect, liteDefaultWebViewTheme, &g_webview);
lite_on_webview_doc_loaded ( g_webview, on_webview_doc_loaded, NULL );
lite_on_raw_window_keyboard(g_window, on_key_press, g_webview );
lite_focus_box( LITE_BOX(g_webview) );
lite_set_window_opacity(g_window, 0xff);
g_window->bg.enabled = DFB_FALSE;
//lite_set_window_background_color(g_window, 0xff, 0, 0, 0xff);
registerJsFunctions(g_webview, g_Callback);
lite_webview_load(g_webview, g_url);
lite_webview_set_transparent(g_webview, true);
// FAKE KEY INTERFACE
//IDirectFB *dfb;
//dfb = lite_get_dfb_interface();
//IDirectFBDisplayLayer *layer = NULL;
//dfb->GetDisplayLayer(dfb, DLID_PRIMARY, &layer);
layer->GetWindow(layer, 1, &g_dfb_window);
lite_enqueue_window_timeout(200, timeout_cb, NULL, &timer_id);
g_run = 1;
while (g_run) {
pthread_mutex_lock(&mutex);
g_main_context_iteration(NULL, FALSE);
lite_window_event_loop(g_window, 1);
pthread_mutex_unlock(&mutex);
}
lite_close();
return NULL;
}