这篇教程C++ wl_display_disconnect函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中wl_display_disconnect函数的典型用法代码示例。如果您正苦于以下问题:C++ wl_display_disconnect函数的具体用法?C++ wl_display_disconnect怎么用?C++ wl_display_disconnect使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了wl_display_disconnect函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: gfx_ctx_wl_destroy_resourcesstatic void gfx_ctx_wl_destroy_resources(gfx_ctx_wayland_data_t *wl){ if (!wl) return; switch (wl_api) { case GFX_CTX_OPENGL_API: case GFX_CTX_OPENGL_ES_API: case GFX_CTX_OPENVG_API:#ifdef HAVE_EGL egl_destroy(&wl->egl); if (wl->win) wl_egl_window_destroy(wl->win);#endif break; case GFX_CTX_VULKAN_API:#ifdef HAVE_VULKAN vulkan_context_destroy(&wl->vk, wl->surface); if (wl->fd >= 0) close(wl->fd);#endif break; case GFX_CTX_NONE: default: break; } if (wl->shell) wl_shell_destroy(wl->shell); if (wl->compositor) wl_compositor_destroy(wl->compositor); if (wl->registry) wl_registry_destroy(wl->registry); if (wl->shell_surf) wl_shell_surface_destroy(wl->shell_surf); if (wl->surface) wl_surface_destroy(wl->surface); if (wl->dpy) { wl_display_flush(wl->dpy); wl_display_disconnect(wl->dpy); }#ifdef HAVE_EGL wl->win = NULL;#endif wl->shell = NULL; wl->compositor = NULL; wl->registry = NULL; wl->dpy = NULL; wl->shell_surf = NULL; wl->surface = NULL; wl->width = 0; wl->height = 0;}
开发者ID:frangarcj,项目名称:RetroArch,代码行数:60,
示例2: wl_display_connectbool WaylandBackend::available() const{ wl_display* dpy = wl_display_connect(nullptr); if(!dpy) return false; wl_display_disconnect(dpy); return true;}
开发者ID:nyorain,项目名称:ny,代码行数:7,
示例3: wl_shell_surface_destroyNativeStateWayland::~NativeStateWayland(){ if (window_) { if (window_->shell_surface) wl_shell_surface_destroy(window_->shell_surface); if (window_->opaque_reqion) wl_region_destroy(window_->opaque_reqion); if (window_->surface) wl_surface_destroy(window_->surface); if (window_->native) wl_egl_window_destroy(window_->native); delete window_; } if (display_) { if (display_->shell) wl_shell_destroy(display_->shell); for (OutputsVector::iterator it = display_->outputs.begin(); it != display_->outputs.end(); ++it) { wl_output_destroy((*it)->output); delete *it; } if (display_->compositor) wl_compositor_destroy(display_->compositor); if (display_->registry) wl_registry_destroy(display_->registry); if (display_->display) { wl_display_flush(display_->display); wl_display_disconnect(display_->display); } delete display_; }}
开发者ID:Gnurou,项目名称:glmark2,代码行数:35,
示例4: gst_gl_window_wayland_egl_closestatic voidgst_gl_window_wayland_egl_close (GstGLWindow * window){ GstGLWindowWaylandEGL *window_egl; window_egl = GST_GL_WINDOW_WAYLAND_EGL (window); destroy_surface (window_egl); if (window_egl->display.cursor_surface) wl_surface_destroy (window_egl->display.cursor_surface); if (window_egl->display.cursor_theme) wl_cursor_theme_destroy (window_egl->display.cursor_theme); if (window_egl->display.shell) wl_shell_destroy (window_egl->display.shell); if (window_egl->display.compositor) wl_compositor_destroy (window_egl->display.compositor); if (window_egl->display.display) { wl_display_flush (window_egl->display.display); wl_display_disconnect (window_egl->display.display); }}
开发者ID:ego5710,项目名称:gst-plugins-bad,代码行数:26,
示例5: g_source_unrefWaylandDisplay::~WaylandDisplay(){ if (m_eventSource) g_source_unref(m_eventSource); m_eventSource = nullptr; if (m_interfaces.compositor) wl_compositor_destroy(m_interfaces.compositor); if (m_interfaces.drm) wl_drm_destroy(m_interfaces.drm); if (m_interfaces.seat) wl_seat_destroy(m_interfaces.seat); if (m_interfaces.xdg) xdg_shell_destroy(m_interfaces.xdg); if (m_interfaces.ivi_application) ivi_application_destroy(m_interfaces.ivi_application); m_interfaces = { nullptr, nullptr, nullptr, nullptr, nullptr }; if (m_registry) wl_registry_destroy(m_registry); m_registry = nullptr; if (m_display) wl_display_disconnect(m_display); m_display = nullptr;}
开发者ID:robvogelaar,项目名称:WebKitForWayland,代码行数:25,
示例6: mainint main(int argc, char **argv){ get_server_references(); surface = wl_compositor_create_surface(compositor); if (surface == NULL) { fprintf(stderr, "Can't create surface/n"); exit(1); } else { fprintf(stderr, "Created surface/n"); } shell_surface = wl_shell_get_shell_surface(shell, surface); wl_shell_surface_set_toplevel(shell_surface);// create_opaque_region(); init_egl(); create_window(); init_gl(); while (1) { draw(); if (eglSwapBuffers(egl_display, egl_surface)) { fprintf(stderr, "Swapped buffers/n"); } else { fprintf(stderr, "Swapped buffers failed/n"); } } wl_display_disconnect(display); printf("disconnected from display/n"); exit(0);}
开发者ID:techhhuang,项目名称:bookmark,代码行数:35,
示例7: sanity_client_no_leakstatic voidsanity_client_no_leak(void){ struct wl_display *display = wl_display_connect(NULL); assert(display); wl_display_disconnect(display);}
开发者ID:DaRamirezSoto,项目名称:wayland,代码行数:8,
示例8: WL_destroybool WL_destroy() { wl_registry_destroy(_WL_display.registry); NWMan_events_destroy(); wl_display_flush(_WL_display.display); wl_display_disconnect(_WL_display.display); return true;}
开发者ID:AnonymousMeerkat,项目名称:nightmare,代码行数:8,
示例9: client_finalizevoid client_finalize(struct registry *reg){ wl_shm_destroy(reg->shm); wl_compositor_destroy(reg->compositor); wl_display_disconnect(reg->display); free(reg); //the last memory management is users job}
开发者ID:xeechou,项目名称:taiwins,代码行数:8,
示例10: xkb_context_unref/*virtual*/ Display::~Display(){ if (xkbContext_) { xkb_context_unref(xkbContext_); } wl_registry_destroy(wl_registry_); wl_display_disconnect(*this);}
开发者ID:01org,项目名称:wayland-fits,代码行数:9,
示例11: wl_compositor_destroyPlatformDisplayWayland::~PlatformDisplayWayland(){ if (m_compositor) wl_compositor_destroy(m_compositor); if (m_registry) wl_registry_destroy(m_registry); if (m_display) wl_display_disconnect(m_display);}
开发者ID:robvogelaar,项目名称:WebKitForWayland,代码行数:9,
示例12: p_cleanupvoidp_cleanup(){ assert(g_wl_compositor != NULL); assert(g_wl_shell != NULL); assert(g_wl_shm != NULL); assert(g_wl_display != NULL); wl_display_disconnect(g_wl_display);}
开发者ID:ipx-tech,项目名称:fluorine-photon,代码行数:9,
示例13: hello_cleanup_waylandvoid hello_cleanup_wayland(void){ wl_pointer_destroy(pointer); wl_seat_destroy(seat); wl_shell_destroy(shell); wl_shm_destroy(shm); wl_compositor_destroy(compositor); wl_display_disconnect(display);}
开发者ID:fooishbar,项目名称:hello_wayland,代码行数:9,
示例14: gst_wl_display_finalizestatic voidgst_wl_display_finalize (GObject * gobject){ GstWlDisplay *self = GST_WL_DISPLAY (gobject); gst_poll_set_flushing (self->wl_fd_poll, TRUE); if (self->thread) g_thread_join (self->thread); /* to avoid buffers being unregistered from another thread * at the same time, take their ownership */ g_mutex_lock (&self->buffers_mutex); self->shutting_down = TRUE; g_hash_table_foreach (self->buffers, (GHFunc) g_object_ref, NULL); g_mutex_unlock (&self->buffers_mutex); g_hash_table_foreach (self->buffers, (GHFunc) gst_wl_buffer_force_release_and_unref, NULL); g_hash_table_remove_all (self->buffers); g_array_unref (self->shm_formats); g_array_unref (self->dmabuf_formats); gst_poll_free (self->wl_fd_poll); g_hash_table_unref (self->buffers); g_mutex_clear (&self->buffers_mutex); if (self->viewporter) wp_viewporter_destroy (self->viewporter); if (self->shm) wl_shm_destroy (self->shm); if (self->dmabuf) zwp_linux_dmabuf_v1_destroy (self->dmabuf); if (self->shell) wl_shell_destroy (self->shell); if (self->compositor) wl_compositor_destroy (self->compositor); if (self->subcompositor) wl_subcompositor_destroy (self->subcompositor); if (self->registry) wl_registry_destroy (self->registry); if (self->queue) wl_event_queue_destroy (self->queue); if (self->own_display) { wl_display_flush (self->display); wl_display_disconnect (self->display); } G_OBJECT_CLASS (gst_wl_display_parent_class)->finalize (gobject);}
开发者ID:luisbg,项目名称:gst-plugins-bad,代码行数:57,
示例15: mainint main(int argc, char **argv) { display = wl_display_connect(NULL); if (display == NULL) { fprintf(stderr, "Can't connect to display/n"); exit(1); } printf("connected to display/n"); struct wl_registry *registry = wl_display_get_registry(display); wl_registry_add_listener(registry, ®istry_listener, NULL); wl_display_dispatch(display); wl_display_roundtrip(display); if (compositor == NULL) { fprintf(stderr, "Can't find compositor/n"); exit(1); } else { fprintf(stderr, "Found compositor/n"); } surface = wl_compositor_create_surface(compositor); if (surface == NULL) { fprintf(stderr, "Can't create surface/n"); exit(1); } else { fprintf(stderr, "Created surface/n"); } shell_surface = wl_shell_get_shell_surface(shell, surface); if (shell_surface == NULL) { fprintf(stderr, "Can't create shell surface/n"); exit(1); } else { fprintf(stderr, "Created shell surface/n"); } wl_shell_surface_set_toplevel(shell_surface); wl_shell_surface_add_listener(shell_surface, &shell_surface_listener, NULL); create_window(); paint_pixels(); while (wl_display_dispatch(display) != -1) { ; } wl_display_disconnect(display); printf("disconnected from display/n"); exit(0);}
开发者ID:darkenk,项目名称:wayland-test,代码行数:55,
示例16: fgPlatformCloseDisplayvoid fgPlatformCloseDisplay ( void ){ wl_cursor_theme_destroy( fgDisplay.pDisplay.cursor_theme ); wl_shm_destroy( fgDisplay.pDisplay.shm ); wl_seat_destroy( fgDisplay.pDisplay.seat ); wl_shell_destroy( fgDisplay.pDisplay.shell ); wl_compositor_destroy( fgDisplay.pDisplay.compositor ); wl_registry_destroy( fgDisplay.pDisplay.registry ); wl_display_disconnect( fgDisplay.pDisplay.display );}
开发者ID:Enseed,项目名称:FreeGLUT,代码行数:12,
示例17: wl_surface_destroyTestBase::~TestBase(){ for (std::vector<wl_surface *>::reverse_iterator it = wlSurfaces.rbegin(); it != wlSurfaces.rend(); ++it) { wl_surface_destroy(*it); } wlSurfaces.clear(); wl_compositor_destroy(wlCompositor); wl_registry_destroy(wlRegistry); wl_display_disconnect(wlDisplay);}
开发者ID:ntanibata,项目名称:wayland-ivi-extension,代码行数:13,
示例18: mainint main(int argc, char **argv) { display = wl_display_connect(NULL); if (display == NULL) { fprintf(stderr, "Can't connect to display/n"); exit(1); } printf("connected to display/n"); wl_display_disconnect(display); printf("disconnected from display/n"); exit(0);}
开发者ID:acklinr,项目名称:hello_wayland,代码行数:14,
示例19: mainintmain(int argc, char **argv){ struct sigaction sigint; struct display display = { 0 }; struct window window = { 0 }; window.display = &display; window.geometry.width = 250; window.geometry.height = 250; display.display = wl_display_connect(NULL); assert(display.display); wl_display_add_global_listener(display.display, display_handle_global, &display); wl_display_get_fd(display.display, event_mask_update, &display); wl_display_iterate(display.display, WL_DISPLAY_READABLE); init_egl(&display); create_surface(&window); init_gl(&window); sigint.sa_handler = signal_int; sigemptyset(&sigint.sa_mask); sigint.sa_flags = SA_RESETHAND; sigaction(SIGINT, &sigint, NULL); redraw(&window, NULL, 0); while (running) wl_display_iterate(display.display, display.mask); fprintf(stderr, "simple-egl exiting/n"); destroy_surface(&window); fini_egl(&display); if (display.shell) wl_shell_destroy(display.shell); if (display.compositor) wl_compositor_destroy(display.compositor); wl_display_flush(display.display); wl_display_disconnect(display.display); return 0;}
开发者ID:N8Fear,项目名称:adwc,代码行数:50,
示例20: Closestatic void Close(vlc_object_t *obj){ demux_t *demux = (demux_t *)obj; demux_sys_t *sys = demux->p_sys; vlc_cancel(sys->thread); vlc_join(sys->thread, NULL); screenshooter_destroy(sys->screenshooter); wl_shm_destroy(sys->shm); wl_output_destroy(sys->output); wl_display_disconnect(sys->display); free(sys);}
开发者ID:mstorsjo,项目名称:vlc,代码行数:14,
示例21: Wayland_MainLoopstatic void Wayland_MainLoop(){ // Wait for display to be initialized while (!GLWin.wl_display) usleep(20000); GLWin.running = 1; while (GLWin.running) wl_display_dispatch(GLWin.wl_display); if (GLWin.wl_display) wl_display_disconnect(GLWin.wl_display);}
开发者ID:TrinityBlow,项目名称:dolphin,代码行数:14,
示例22: _glfwPlatformTerminatevoid _glfwPlatformTerminate(void){ _glfwTerminateContextAPI(); if (_glfw.wl.cursorTheme) wl_cursor_theme_destroy(_glfw.wl.cursorTheme); if (_glfw.wl.cursorSurface) wl_surface_destroy(_glfw.wl.cursorSurface); if (_glfw.wl.registry) wl_registry_destroy(_glfw.wl.registry); if (_glfw.wl.display) wl_display_flush(_glfw.wl.display); if (_glfw.wl.display) wl_display_disconnect(_glfw.wl.display);}
开发者ID:Zeken,项目名称:glfw,代码行数:15,
示例23: is_wayland_sessionstatic gpointeris_wayland_session (gpointer user_data){#if HAVE_WAYLAND struct wl_display *display; display = wl_display_connect (NULL); if (!display) return GUINT_TO_POINTER(FALSE); wl_display_disconnect (display); return GUINT_TO_POINTER(TRUE);#else return GUINT_TO_POINTER(FALSE);#endif}
开发者ID:EvaSDK,项目名称:gnome-settings-daemon,代码行数:15,
示例24: destroy_displaystatic voiddestroy_display (struct display *display){ if (display->shm) wl_shm_destroy (display->shm); if (display->shell) wl_shell_destroy (display->shell); if (display->compositor) wl_compositor_destroy (display->compositor); wl_display_flush (display->display); wl_display_disconnect (display->display); free (display);}
开发者ID:collects,项目名称:gst-plugins-bad,代码行数:16,
示例25: g_source_unrefWaylandDisplay::~WaylandDisplay(){ if (m_eventSource) g_source_unref(m_eventSource); m_eventSource = nullptr; if (m_interfaces.compositor) wl_compositor_destroy(m_interfaces.compositor); if (m_interfaces.data_device_manager) wl_data_device_manager_destroy(m_interfaces.data_device_manager); if (m_interfaces.drm) wl_drm_destroy(m_interfaces.drm); if (m_interfaces.seat) wl_seat_destroy(m_interfaces.seat); if (m_interfaces.xdg) xdg_shell_destroy(m_interfaces.xdg); if (m_interfaces.ivi_application) ivi_application_destroy(m_interfaces.ivi_application); m_interfaces = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr }; if (m_registry) wl_registry_destroy(m_registry); m_registry = nullptr; if (m_display) wl_display_disconnect(m_display); m_display = nullptr; if (m_seatData.pointer.object) wl_pointer_destroy(m_seatData.pointer.object); if (m_seatData.keyboard.object) wl_keyboard_destroy(m_seatData.keyboard.object); if (m_seatData.touch.object) wl_touch_destroy(m_seatData.touch.object); if (m_seatData.xkb.context) xkb_context_unref(m_seatData.xkb.context); if (m_seatData.xkb.keymap) xkb_keymap_unref(m_seatData.xkb.keymap); if (m_seatData.xkb.state) xkb_state_unref(m_seatData.xkb.state); if (m_seatData.xkb.composeTable) xkb_compose_table_unref(m_seatData.xkb.composeTable); if (m_seatData.xkb.composeState) xkb_compose_state_unref(m_seatData.xkb.composeState); if (m_seatData.repeatData.eventSource) g_source_remove(m_seatData.repeatData.eventSource); m_seatData = SeatData{ };}
开发者ID:valbok,项目名称:WebKitForWayland,代码行数:47,
示例26: cursor_viewer_destroystatic voidcursor_viewer_destroy(struct cursor_viewer *viewer){ if (viewer->cursor_theme) wl_cursor_theme_destroy(viewer->cursor_theme); if (viewer->shell) wl_shell_destroy(viewer->shell); if (viewer->compositor) wl_compositor_destroy(viewer->compositor); if (viewer->shm) wl_shm_destroy(viewer->shm); if (viewer->registry) wl_registry_destroy(viewer->registry); if (viewer->display) wl_display_disconnect(viewer->display); free(viewer);}
开发者ID:pfpacket,项目名称:wl_cursor_viewer,代码行数:17,
示例27: Close/** * Destroys a Wayland shell surface. */static void Close(vout_window_t *wnd){ vout_window_sys_t *sys = wnd->sys; vlc_cancel(sys->thread); vlc_join(sys->thread, NULL); wl_shell_surface_destroy(sys->shell_surface); wl_surface_destroy(wnd->handle.wl); wl_shell_destroy(sys->shell); if (sys->output != NULL) wl_output_destroy(sys->output); wl_compositor_destroy(sys->compositor); wl_display_disconnect(wnd->display.wl); vlc_mutex_destroy(&sys->lock); free(sys);}
开发者ID:Aakash-729,项目名称:vlc,代码行数:20,
示例28: nested_client_destroystatic voidnested_client_destroy(struct nested_client *client){ eglMakeCurrent(client->egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); wl_egl_window_destroy(client->native); wl_surface_destroy(client->surface); if (client->compositor) wl_compositor_destroy(client->compositor); wl_registry_destroy(client->registry); wl_display_flush(client->display); wl_display_disconnect(client->display);}
开发者ID:Igalia,项目名称:webkitgtk-wayland-proto,代码行数:18,
示例29: leak_after_errorstatic voidleak_after_error(void){ struct client *c = client_connect(); /* this should return -1, because we'll send error * from server. */ assert(stop_display(c, 1) == -1); assert(wl_display_dispatch_pending(c->wl_display) == -1); assert(wl_display_get_error(c->wl_display) == ENOMEM); /* after we got error, we have display_resume event * in the queue. It should be freed in wl_display_disconnect(). * Let's see! */ wl_proxy_destroy((struct wl_proxy *) c->tc); wl_display_disconnect(c->wl_display); free(c);}
开发者ID:ybakos,项目名称:wayland,代码行数:19,
示例30: destroy_displaystatic voiddestroy_display(struct display *display){ if (display->dmabuf) zwp_linux_dmabuf_v1_destroy(display->dmabuf); if (display->shell) xdg_shell_destroy(display->shell); if (display->fshell) zwp_fullscreen_shell_v1_release(display->fshell); if (display->compositor) wl_compositor_destroy(display->compositor); wl_registry_destroy(display->registry); wl_display_flush(display->display); wl_display_disconnect(display->display); free(display);}
开发者ID:ChristophHaag,项目名称:weston,代码行数:20,
注:本文中的wl_display_disconnect函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ wl_display_dispatch函数代码示例 C++ wl_container_of函数代码示例 |