您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ wl_display_dispatch函数代码示例

51自学网 2021-06-03 10:00:19
  C++
这篇教程C++ wl_display_dispatch函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中wl_display_dispatch函数的典型用法代码示例。如果您正苦于以下问题:C++ wl_display_dispatch函数的具体用法?C++ wl_display_dispatch怎么用?C++ wl_display_dispatch使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了wl_display_dispatch函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: main

int 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, &registry_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,


示例2: initWayland

	xdl_int initWayland() {		//		// Connect to the Wayland server.		//		display = wl_display_connect(nullptr);		if(display == nullptr) {			std::cerr << "## XdevLWindowWayland::wl_display_connect failed" << std::endl;			return xdl::ERR_ERROR;		}		// We get the registry for the window which holds extension		// of the wayland server.		m_registry = wl_display_get_registry(display);		if(m_registry == nullptr) {			std::cerr << "## XdevLWindowWayland::wl_display_get_registry failed" << std::endl;			return ERR_ERROR;		}		// Now we tell the registry that we want to listen to events.		wl_registry_add_listener(m_registry, &registry_listener, nullptr);		wl_display_dispatch(display);		return ERR_OK;	}
开发者ID:houzhenggang,项目名称:XdevLSDK,代码行数:25,


示例3: main

intmain(int argc, char **argv){	struct sigaction sigint;	struct display *display;	struct window *window;	int ret = 0;	display = create_display();	window = create_window(display, 250, 250);	if (!window)		return 1;	sigint.sa_handler = signal_int;	sigemptyset(&sigint.sa_mask);	sigint.sa_flags = SA_RESETHAND;	sigaction(SIGINT, &sigint, NULL);	/* Initialise damage to full surface, so the padding gets painted */	wl_surface_damage(window->surface, 0, 0,			  window->width, window->height);	redraw(window, NULL, 0);	while (running && ret != -1)		ret = wl_display_dispatch(display->display);	fprintf(stderr, "simple-dmabuf exiting/n");	destroy_window(window);	destroy_display(display);	return 0;}
开发者ID:kwm81,项目名称:weston,代码行数:33,


示例4: queue

WaylandEventQueue::WaylandEventQueue(IOLoop &_io_loop, EventQueue &_queue)  :io_loop(_io_loop), queue(_queue),   display(wl_display_connect(nullptr)){  if (display == nullptr) {    fprintf(stderr, "wl_display_connect() failed/n");    exit(EXIT_FAILURE);  }  auto registry = wl_display_get_registry(display);  wl_registry_add_listener(registry, &registry_listener, this);  wl_display_dispatch(display);  wl_display_roundtrip(display);  if (compositor == nullptr) {    fprintf(stderr, "No Wayland compositor found/n");    exit(EXIT_FAILURE);  }  if (seat == nullptr) {    fprintf(stderr, "No Wayland seat found/n");    exit(EXIT_FAILURE);  }  if (shell == nullptr) {    fprintf(stderr, "No Wayland shell found/n");    exit(EXIT_FAILURE);  }  io_loop.Add(FileDescriptor(wl_display_get_fd(display)), io_loop.READ, *this);}
开发者ID:kwtskran,项目名称:XCSoar,代码行数:32,


示例5: main

int main(int argc, char **argv){    Helper helper;    helper.display = wl_display_connect(nullptr);    helper.registry = wl_display_get_registry(helper.display);    static const wl_registry_listener registryListener = {        wrapInterface(&Helper::global),        wrapInterface(&Helper::globalRemove)    };    wl_registry_add_listener(helper.registry, &registryListener, &helper);    wl_display_roundtrip(helper.display);    if (!helper.helper) {        qWarning("No orbital_authorizer_helper interface.");        exit(1);    }    int ret = 0;    while (ret != -1)        ret = wl_display_dispatch(helper.display);    return 0;}
开发者ID:kendling,项目名称:orbital,代码行数:25,


示例6: createWLContext

static int createWLContext(){    t_ilm_bool result = ILM_TRUE;    g_wlContextStruct.wlDisplay = wl_display_connect(NULL);    if (NULL == g_wlContextStruct.wlDisplay)    {        printf("Error: wl_display_connect() failed./n");    }    g_wlContextStruct.wlRegistry = wl_display_get_registry(g_wlContextStruct.wlDisplay);    wl_registry_add_listener(g_wlContextStruct.wlRegistry, &registry_listener, &g_wlContextStruct);    wl_display_dispatch(g_wlContextStruct.wlDisplay);    wl_display_roundtrip(g_wlContextStruct.wlDisplay);    g_wlContextStruct.wlSurface = wl_compositor_create_surface(g_wlContextStruct.wlCompositor);    if (NULL == g_wlContextStruct.wlSurface)    {        printf("Error: wl_compositor_create_surface failed./n");        destroyWLContext();    }    createShmBuffer();    return result;}
开发者ID:Airtau,项目名称:genivi,代码行数:26,


示例7: printf

bool cWaylandInterface::Initialize(void *config){	if (!GLWin.wl_display) {		printf("Error: couldn't open wayland display/n");		return false;	}	GLWin.pointer.wl_pointer = nullptr;	GLWin.keyboard.wl_keyboard = nullptr;	GLWin.keyboard.xkb.context = xkb_context_new((xkb_context_flags) 0);	if (GLWin.keyboard.xkb.context == nullptr) {		fprintf(stderr, "Failed to create XKB context/n");		return nullptr;	}	GLWin.wl_registry = wl_display_get_registry(GLWin.wl_display);	wl_registry_add_listener(GLWin.wl_registry,				 &registry_listener, nullptr);	while (!GLWin.wl_compositor)		wl_display_dispatch(GLWin.wl_display);	GLWin.wl_cursor_surface =		wl_compositor_create_surface(GLWin.wl_compositor);	return true;}
开发者ID:Chiri23,项目名称:dolphin,代码行数:28,


示例8: wl_dispatch_events

void wl_dispatch_events() {	wl_display_flush(registry->display);	if (wl_display_dispatch(registry->display) == -1) {		sway_log(L_ERROR, "failed to run wl_display_dispatch");		exit(1);	}}
开发者ID:Zeirison,项目名称:sway,代码行数:7,


示例9: get_registry_objects

static intget_registry_objects(){	struct wl_registry *registry = wl_display_get_registry(g_wl_display);	wl_registry_add_listener(registry, &registry_listener, NULL);		wl_display_dispatch(g_wl_display);	wl_display_roundtrip(g_wl_display);		if (!g_wl_compositor) {		p_log("Failed to get a proxy compositor (wl_compositor) object./n");		return (-1);	}		if (!g_wl_shm) {		p_log("Failed to get a proxy shared memory (wl_shm) object./n");		return (-1);	}		if (!g_wl_shell) {		p_log("Failed to get a proxy shell (wl_shell) object./n");	}		return (0);}
开发者ID:ipx-tech,项目名称:fluorine-photon,代码行数:25,


示例10: _gdk_wayland_display_open

GdkDisplay *_gdk_wayland_display_open (const gchar *display_name){  struct wl_display *wl_display;  GdkDisplay *display;  GdkWaylandDisplay *display_wayland;  GDK_NOTE (MISC, g_message ("opening display %s", display_name ? display_name : ""));  /* If this variable is unset then wayland initialisation will surely   * fail, logging a fatal error in the process.  Save ourselves from   * that.   */  if (g_getenv ("XDG_RUNTIME_DIR") == NULL)    return NULL;  wl_log_set_handler_client (log_handler);  wl_display = wl_display_connect (display_name);  if (!wl_display)    return NULL;  display = g_object_new (GDK_TYPE_WAYLAND_DISPLAY, NULL);  display->device_manager = _gdk_wayland_device_manager_new (display);  display_wayland = GDK_WAYLAND_DISPLAY (display);  display_wayland->wl_display = wl_display;  display_wayland->screen = _gdk_wayland_screen_new (display);  display_wayland->event_source = _gdk_wayland_display_event_source_new (display);  display_wayland->known_globals =    g_hash_table_new_full (NULL, NULL, NULL, g_free);  _gdk_wayland_display_init_cursors (display_wayland);  _gdk_wayland_display_prepare_cursor_themes (display_wayland);  display_wayland->wl_registry = wl_display_get_registry (display_wayland->wl_display);  wl_registry_add_listener (display_wayland->wl_registry, &registry_listener, display_wayland);  _gdk_wayland_display_async_roundtrip (display_wayland);  /* Wait for initializing to complete. This means waiting for all   * asynchrounous roundtrips that were triggered during initial roundtrip. */  while (g_list_length (display_wayland->async_roundtrips) > 0)    {      if (wl_display_dispatch (display_wayland->wl_display) < 0)        {          g_object_unref (display);          return NULL;        }    }  gdk_input_init (display);  display_wayland->selection = gdk_wayland_selection_new ();  g_signal_emit_by_name (display, "opened");  return display;}
开发者ID:Premangshu2010,项目名称:gtk,代码行数:60,


示例11: frame_callback_wait

voidframe_callback_wait(struct client *client, int *done){	while (!*done) {		assert(wl_display_dispatch(client->wl_display) >= 0);	}}
开发者ID:markbt,项目名称:weston,代码行数:7,


示例12: flush_wayland_fd

void flush_wayland_fd(void *data){   struct pollfd fd = {0};   input_ctx_wayland_data_t *wl = (input_ctx_wayland_data_t*)data;   wl_display_dispatch_pending(wl->dpy);   wl_display_flush(wl->dpy);   fd.fd     = wl->fd;   fd.events = POLLIN | POLLOUT | POLLERR | POLLHUP;   if (poll(&fd, 1, 0) > 0)   {      if (fd.revents & (POLLERR | POLLHUP))      {         close(wl->fd);         frontend_driver_set_signal_handler_state(1);      }      if (fd.revents & POLLIN)         wl_display_dispatch(wl->dpy);      if (fd.revents & POLLOUT)         wl_display_flush(wl->dpy);   }}
开发者ID:Alcaro,项目名称:RetroArch,代码行数:25,


示例13: main

intmain(int argc, char **argv){	struct sigaction sigint;	struct display *display;	struct window *window;	int ret = 0;	display = create_display();	window = create_window(display, 250, 250);	if (!window)		return 1;	sigint.sa_handler = signal_int;	sigemptyset(&sigint.sa_mask);	sigint.sa_flags = SA_RESETHAND;	sigaction(SIGINT, &sigint, NULL);	/* Here we retrieve the linux-dmabuf objects, or error */	wl_display_roundtrip(display->display);	if (!running)		return 1;	redraw(window, NULL, 0);	while (running && ret != -1)		ret = wl_display_dispatch(display->display);	fprintf(stderr, "simple-dmabuf exiting/n");	destroy_window(window);	destroy_display(display);	return 0;}
开发者ID:ChristophHaag,项目名称:weston,代码行数:35,


示例14: main

intmain(int argc, char **argv){  struct nested_client *client;  int ret = 0;  if (getenv("WAYLAND_SOCKET") == NULL) {    fprintf(stderr, "must be run by nested, don't run standalone/n");    return -1;  }  //  printf ("client: program started/n");  client = nested_client_create(400, 300);  while (ret != -1) {    ret = wl_display_dispatch(client->display);  }  nested_client_destroy(client);  //  printf ("client: program finished/n");  return 0;}
开发者ID:Igalia,项目名称:webkitgtk-wayland-proto,代码行数:25,


示例15: bar_run

void bar_run(struct bar *bar) {	int pfds = bar->outputs->length + 2;	struct pollfd *pfd = malloc(pfds * sizeof(struct pollfd));	bool dirty = true;	pfd[0].fd = bar->ipc_event_socketfd;	pfd[0].events = POLLIN;	pfd[1].fd = bar->status_read_fd;	pfd[1].events = POLLIN;	int i;	for (i = 0; i < bar->outputs->length; ++i) {		struct output *output = bar->outputs->items[i];		pfd[i+2].fd = wl_display_get_fd(output->registry->display);		pfd[i+2].events = POLLIN;	}	while (1) {		if (dirty) {			int i;			for (i = 0; i < bar->outputs->length; ++i) {				struct output *output = bar->outputs->items[i];				if (window_prerender(output->window) && output->window->cairo) {					render(output, bar->config, bar->status);					window_render(output->window);					wl_display_flush(output->registry->display);				}			}		}		dirty = false;		poll(pfd, pfds, -1);		if (pfd[0].revents & POLLIN) {			sway_log(L_DEBUG, "Got IPC event.");			dirty = handle_ipc_event(bar);		}		if (bar->config->status_command && pfd[1].revents & POLLIN) {			sway_log(L_DEBUG, "Got update from status command.");			dirty = handle_status_line(bar);		}		// dispatch wl_display events		for (i = 0; i < bar->outputs->length; ++i) {			struct output *output = bar->outputs->items[i];			if (pfd[i+2].revents & POLLIN) {				if (wl_display_dispatch(output->registry->display) == -1) {					sway_log(L_ERROR, "failed to dispatch wl: %d", errno);				}			} else {				wl_display_dispatch_pending(output->registry->display);			}		}	}}
开发者ID:dardevelin,项目名称:sway,代码行数:57,


示例16: display_dispatch_thread

void* display_dispatch_thread(void* p){    int ret = 0;    while (ret != -1) {        ret = wl_display_dispatch(window->p_wl_display);    }        return 0;}
开发者ID:qioixiy,项目名称:notes,代码行数:9,


示例17: readWaylandEvents

void QWaylandEventThread::readWaylandEvents(){    if (wl_display_dispatch(m_display) < 0) {        checkError();        m_readNotifier->setEnabled(false);        emit fatalError();        return;    }    emit newEventsRead();}
开发者ID:Sagaragrawal,项目名称:2gisqt5android,代码行数:11,


示例18: client_create

struct client *client_create(int x, int y, int width, int height){	struct client *client;	struct surface *surface;	wl_log_set_handler_client(log_handler);	/* connect to display */	client = xzalloc(sizeof *client);	client->wl_display = wl_display_connect(NULL);	assert(client->wl_display);	wl_list_init(&client->global_list);	/* setup registry so we can bind to interfaces */	client->wl_registry = wl_display_get_registry(client->wl_display);	wl_registry_add_listener(client->wl_registry, &registry_listener, client);	/* trigger global listener */	wl_display_dispatch(client->wl_display);	wl_display_roundtrip(client->wl_display);	/* must have WL_SHM_FORMAT_ARGB32 */	assert(client->has_argb);	/* must have wl_test interface */	assert(client->test);	/* must have an output */	assert(client->output);	/* initialize the client surface */	surface = xzalloc(sizeof *surface);	surface->wl_surface =		wl_compositor_create_surface(client->wl_compositor);	assert(surface->wl_surface);	wl_surface_add_listener(surface->wl_surface, &surface_listener,				surface);	client->surface = surface;	wl_surface_set_user_data(surface->wl_surface, surface);	surface->width = width;	surface->height = height;	surface->wl_buffer = create_shm_buffer(client, width, height,					       &surface->data);	memset(surface->data, 64, width * height * 4);	move_client(client, x, y);	return client;}
开发者ID:markbt,项目名称:weston,代码行数:54,


示例19: main

int main(int argc, char **argv) {	init_log(L_INFO);	surfaces = create_list();	registry = registry_poll();	if (argc < 4) {		sway_abort("Do not run this program manually. See man 5 sway and look for output options.");	}	if (!registry->desktop_shell) {		sway_abort("swaybg requires the compositor to support the desktop-shell extension.");	}	int desired_output = atoi(argv[1]);	sway_log(L_INFO, "Using output %d of %d", desired_output, registry->outputs->length);	int i;	struct output_state *output = registry->outputs->items[desired_output];	struct window *window = window_setup(registry, 100, 100, false);	if (!window) {		sway_abort("Failed to create surfaces.");	}	window->width = output->width;	window->height = output->height;	desktop_shell_set_background(registry->desktop_shell, output->output, window->surface);	list_add(surfaces, window);	char *scaling_mode = argv[3];	cairo_surface_t *image = cairo_image_surface_create_from_png(argv[2]);	double width = cairo_image_surface_get_width(image);	double height = cairo_image_surface_get_height(image);	for (i = 0; i < surfaces->length; ++i) {		struct window *window = surfaces->items[i];		if (window_prerender(window) && window->cairo) {			cairo_scale(window->cairo, window->width / width, window->height / height);			cairo_set_source_surface(window->cairo, image, 0, 0);			cairo_paint(window->cairo);			window_render(window);		}	}	while (wl_display_dispatch(registry->display) != -1);	for (i = 0; i < surfaces->length; ++i) {		struct window *window = surfaces->items[i];		window_teardown(window);	}	list_free(surfaces);	registry_teardown(registry);	return 0;}
开发者ID:sce,项目名称:sway,代码行数:52,


示例20: main

intmain(int argc, char **argv){	struct touch *touch;	int ret = 0;	touch = touch_create(600, 500);	while (ret != -1)		ret = wl_display_dispatch(touch->display);	return 0;}
开发者ID:RAOF,项目名称:weston,代码行数:13,


示例21: wl_display_dispatch

void WaylandCore::waitEvents() {  if( mDisplay == NULL || mRegistry == NULL ) {    mShouldClose = true;    return;  }  int ret = wl_display_dispatch(mDisplay);  if( ret == -1 ) {    mShouldClose = true;    return;  }    return;}
开发者ID:techlabxe,项目名称:SimpleWindowWayland,代码行数:13,


示例22: Wayland_MainLoop

static 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,


示例23: main

int main(void){        struct sigaction   sigint;        struct my_display *display;        struct my_window  *window;        /* Connect to the display */        printf("Connecting to display/n");        display = create_display();        printf("Connected!/n");        /* Create a window */        printf("Creating a window/n");        window = create_window(display, MIN_WIDTH, MIN_HEIGHT);        if (!window)                return 1;        printf("Window created/n");        /* Set up singal handler. So SIGINT allows us to cleanly die. */        sigint.sa_handler = signal_int;        sigemptyset(&sigint.sa_mask);        sigint.sa_flags = SA_RESETHAND;        sigaction(SIGINT, &sigint, NULL);        printf("Initialising buffers/n");        /* Initialize */        wl_surface_damage(window->surface, 0, 0, window->width, window->height);        /* Draw first screen which allocates buffer(s). */        draw(window, NULL, 0);               printf("Starting loop/n");        /* Main loop */        while (running) {                if (wl_display_dispatch(display->display) == -1) {                        running = 0;                }        }        printf("Loop exited/n");                /* Destroy the display */        printf("Destroying window/n");        destroy_window(window); window = NULL;        printf("Disconnecting display/n");        destroy_display(display); display = NULL;        printf("Done/n");        return 0;}
开发者ID:HornetBlack,项目名称:wl_stupid,代码行数:48,


示例24: touch_create

static struct touch *touch_create(int width, int height){	struct touch *touch;	touch = malloc(sizeof *touch);	if (touch == NULL) {		fprintf(stderr, "out of memory/n");		exit(1);	}	touch->display = wl_display_connect(NULL);	assert(touch->display);	touch->has_argb = 0;	touch->registry = wl_display_get_registry(touch->display);	wl_registry_add_listener(touch->registry, &registry_listener, touch);	wl_display_dispatch(touch->display);	wl_display_roundtrip(touch->display);	if (!touch->has_argb) {		fprintf(stderr, "WL_SHM_FORMAT_ARGB32 not available/n");		exit(1);	}	touch->width = width;	touch->height = height;	touch->surface = wl_compositor_create_surface(touch->compositor);	touch->shell_surface = wl_shell_get_shell_surface(touch->shell,							  touch->surface);	create_shm_buffer(touch);	if (touch->shell_surface) {		wl_shell_surface_add_listener(touch->shell_surface,					      &shell_surface_listener, touch);		wl_shell_surface_set_toplevel(touch->shell_surface);	}	wl_surface_set_user_data(touch->surface, touch);	wl_shell_surface_set_title(touch->shell_surface, "simple-touch");	memset(touch->data, 64, width * height * 4);	wl_surface_attach(touch->surface, touch->buffer, 0, 0);	wl_surface_damage(touch->surface, 0, 0, width, height);	wl_surface_commit(touch->surface);	return touch;}
开发者ID:RAOF,项目名称:weston,代码行数:47,


示例25: _gdk_wayland_display_queue_events

void_gdk_wayland_display_queue_events (GdkDisplay *display){  GdkWaylandDisplay *display_wayland;  GdkWaylandEventSource *source;  display_wayland = GDK_WAYLAND_DISPLAY (display);  source = (GdkWaylandEventSource *) display_wayland->event_source;  if (source->pfd.revents & G_IO_IN)    {	wl_display_dispatch(display_wayland->wl_display);	source->pfd.revents = 0;    }  if (source->pfd.revents & (G_IO_ERR | G_IO_HUP))    g_error ("Lost connection to wayland compositor");}
开发者ID:BoozzyAmdJin,项目名称:gtk-,代码行数:17,


示例26: client_main

static intclient_main(void){   struct client_test client;   client_test_create(&client, "fullscreen", 320, 320);   surface_create(&client);   shell_surface_create(&client);   client_test_roundtrip(&client);   client_test_roundtrip(&client);   struct output *o;   assert((o = chck_iter_pool_get(&client.outputs, 0)));   wl_shell_surface_set_fullscreen(client.view.ssurface, 0, 0, o->output);   wl_surface_commit(client.view.surface);   while (wl_display_dispatch(client.display) != -1);   return client_test_end(&client);}
开发者ID:Cloudef,项目名称:wlc,代码行数:17,


示例27: main

intmain(int argc, char **argv){    int i, ret = 0, cursor_count = argc - 3;    struct sigaction sigint;    struct cursor_viewer *viewer;    struct cursor_surface **cursors;    if (argc < 4) {        printf("Usage: %s CURSOR_THEME SIZE CURSOR_NAMES.../n", argv[0]);        exit(EXIT_FAILURE);    }    sigint.sa_handler = signal_int;    sigemptyset(&sigint.sa_mask);    sigint.sa_flags = SA_RESETHAND;    sigaction(SIGINT, &sigint, NULL);    viewer = cursor_viewer_create();    viewer->cursor_theme =        wl_cursor_theme_load(argv[1], atoi(argv[2]), viewer->shm);    if (!viewer->cursor_theme)        die("Failed to load default cursor theme/n");    cursors = calloc(1, sizeof (struct cursor_surface *) * cursor_count);    for (i = 3; i < argc; ++i) {        struct cursor_surface *cursor =            cursor_viewer_show_cursor(viewer, argv[i]);        cursors[i - 3] = cursor;    }    while (running && ret != -1)        ret = wl_display_dispatch(viewer->display);    for (i = 0; i < cursor_count; ++i)        cursor_surface_destroy(cursors[i]);    free(cursors);    cursor_viewer_destroy(viewer);    exit(EXIT_SUCCESS);}
开发者ID:pfpacket,项目名称:wl_cursor_viewer,代码行数:45,


示例28: wl_display_connect

boolWLContext::InitWLContext(const struct wl_pointer_listener* wlPointerListener,                         const struct wl_keyboard_listener* wlKeyboardListener,                         const struct wl_touch_listener* wlTouchListener){    m_wlPointerListener = const_cast<wl_pointer_listener*>(wlPointerListener);    m_wlKeyboardListener = const_cast<wl_keyboard_listener*>(wlKeyboardListener);    m_wlTouchListener = const_cast<wl_touch_listener*>(wlTouchListener);    m_wlDisplay = wl_display_connect(NULL);    m_wlRegistry = wl_display_get_registry(m_wlDisplay);    wl_registry_add_listener(m_wlRegistry, &registryListener, this);    wl_display_dispatch(m_wlDisplay);    wl_display_roundtrip(m_wlDisplay);    return true;}
开发者ID:ntanibata,项目名称:wayland-ivi-extension,代码行数:18,


示例29: wayland_compositor_handle_event

static intwayland_compositor_handle_event(int fd, uint32_t mask, void *data){	struct wayland_compositor *c = data;	int count = 0;	if (mask & WL_EVENT_READABLE)		count = wl_display_dispatch(c->parent.wl_display);	if (mask & WL_EVENT_WRITABLE)		wl_display_flush(c->parent.wl_display);	if (mask == 0) {		count = wl_display_dispatch_pending(c->parent.wl_display);		wl_display_flush(c->parent.wl_display);	}	return count;}
开发者ID:anderco,项目名称:weston,代码行数:18,



注:本文中的wl_display_dispatch函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ wl_display_flush函数代码示例
C++ wl_display_disconnect函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。