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

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

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

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

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

示例1: headless_compositor_create_output

static intheadless_compositor_create_output(struct headless_compositor *c,				  struct headless_parameters *param){	struct headless_output *output;	struct wl_event_loop *loop;	output = zalloc(sizeof *output);	if (output == NULL)		return -1;	output->mode.flags =		WL_OUTPUT_MODE_CURRENT | WL_OUTPUT_MODE_PREFERRED;	output->mode.width = param->width;	output->mode.height = param->height;	output->mode.refresh = 60000;	wl_list_init(&output->base.mode_list);	wl_list_insert(&output->base.mode_list, &output->mode.link);	output->base.current_mode = &output->mode;	weston_output_init(&output->base, &c->base, 0, 0, param->width,			   param->height, param->transform, 1);	output->base.make = "weston";	output->base.model = "headless";	loop = wl_display_get_event_loop(c->base.wl_display);	output->finish_frame_timer =		wl_event_loop_add_timer(loop, finish_frame_handler, output);	output->base.start_repaint_loop = headless_output_start_repaint_loop;	output->base.repaint = headless_output_repaint;	output->base.destroy = headless_output_destroy;	output->base.assign_planes = NULL;	output->base.set_backlight = NULL;	output->base.set_dpms = NULL;	output->base.switch_mode = NULL;	if (c->use_pixman) {		output->image_buf = malloc(param->width * param->height * 4);		if (!output->image_buf)			return -1;		output->image = pixman_image_create_bits(PIXMAN_x8r8g8b8,							 param->width,							 param->height,							 output->image_buf,							 param->width * 4);		if (pixman_renderer_output_create(&output->base) < 0)			return -1;		pixman_renderer_output_set_buffer(&output->base,						  output->image);	}	wl_list_insert(c->base.output_list.prev, &output->base.link);	return 0;}
开发者ID:ntanibata,项目名称:weston-ivi-shell,代码行数:60,


示例2: tag_new

struct tag * tag_new(unsigned index, const char * name){    struct tag * tag;    if (!(tag = malloc(sizeof *tag)))        goto error0;    if (!(tag->name = strdup(name)))        goto error1;    tag->mask = TAG_MASK(index);    tag->screen = NULL;    tag->global = wl_global_create(velox.display, &velox_tag_interface, 1,                                   tag, &bind_tag);    if (!tag->global)        goto error2;    tag->config.group.name = strdup(tag->name);    tag->config.group.type = CONFIG_NODE_TYPE_GROUP;    wl_list_init(&tag->config.group.group);    wl_list_insert(&tag_group.group, &tag->config.group.link);    tag->config.name.name = "name";    tag->config.name.type = CONFIG_NODE_TYPE_PROPERTY;    tag->config.name.property.set = &set_name;    wl_list_insert(&tag->config.group.group, &tag->config.name.link);    tag->config.activate.name = "activate";    tag->config.activate.type = CONFIG_NODE_TYPE_ACTION;    tag->config.activate.action.run = &activate;    wl_list_insert(&tag->config.group.group, &tag->config.activate.link);    tag->config.toggle.name = "toggle";    tag->config.toggle.type = CONFIG_NODE_TYPE_ACTION;    tag->config.toggle.action.run = &toggle;    wl_list_insert(&tag->config.group.group, &tag->config.toggle.link);    tag->config.apply.name = "apply";    tag->config.apply.type = CONFIG_NODE_TYPE_ACTION;    tag->config.apply.action.run = &apply;    wl_list_insert(&tag->config.group.group, &tag->config.apply.link);    wl_list_init(&tag->resources);    return tag;  error2:    free(tag->name);  error1:    free(tag);  error0:    return NULL;}
开发者ID:Kinokoio,项目名称:velox,代码行数:54,


示例3: window_add_config_nodes

voidwindow_add_config_nodes(){	wl_list_insert(&window_group.group, &border_width_property.link);	wl_list_insert(&window_group.group, &border_color_active_property.link);	wl_list_insert(&window_group.group, &border_color_inactive_property.link);	wl_list_insert(&window_group.group, &begin_move_action.link);	wl_list_insert(&window_group.group, &end_move_action.link);	wl_list_insert(&window_group.group, &begin_resize_action.link);	wl_list_insert(&window_group.group, &end_resize_action.link);	wl_list_insert(&window_group.group, &switch_layer_action.link);	wl_list_insert(&window_group.group, &close_action.link);	wl_list_insert(config_root, &window_group.link);}
开发者ID:N8Fear,项目名称:velox,代码行数:14,


示例4: wlb_keyboard_create_resource

voidwlb_keyboard_create_resource(struct wlb_keyboard *keyboard,			     struct wl_client *client, uint32_t id){	struct wl_resource *resource;	int null_fd;	resource = wl_resource_create(client, &wl_keyboard_interface, 1, id);	if (!resource) {		wl_client_post_no_memory(client);		return;	}	wl_resource_set_implementation(resource, &keyboard_interface,				       NULL, unlink_resource);	wl_list_insert(&keyboard->resource_list, wl_resource_get_link(resource));	if (keyboard->keymap.data) {		wl_keyboard_send_keymap(resource, keyboard->keymap.format,					keyboard->keymap.fd,					keyboard->keymap.size);	} else {		null_fd = open("/dev/null", O_RDONLY);		wl_keyboard_send_keymap(resource,					WL_KEYBOARD_KEYMAP_FORMAT_NO_KEYMAP,					null_fd, 0);		close(null_fd);	}}
开发者ID:jekstrand,项目名称:libwlb,代码行数:30,


示例5: window_create

struct window *window_create(struct display *display, const char *title,	      int32_t width, int32_t height){	struct window *window;	window = malloc(sizeof *window);	if (window == NULL)		return NULL;	memset(window, 0, sizeof *window);	window->display = display;	window->title = strdup(title);	window->surface = wl_compositor_create_surface(display->compositor);	window->allocation.x = 0;	window->allocation.y = 0;	window->allocation.width = width;	window->allocation.height = height;	window->saved_allocation = window->allocation;	window->margin = 16;	window->decoration = 1;	if (display->drm)		window->buffer_type = WINDOW_BUFFER_TYPE_DRM;	else		window->buffer_type = WINDOW_BUFFER_TYPE_SHM;	wl_surface_set_user_data(window->surface, window);	wl_list_insert(display->window_list.prev, &window->link);	return window;}
开发者ID:CLowcay,项目名称:wayland-terminal,代码行数:32,


示例6: _ecore_wl_input_add

void _ecore_wl_input_add(Ecore_Wl_Display *ewd, unsigned int id){   Ecore_Wl_Input *input;   LOGFN(__FILE__, __LINE__, __FUNCTION__);   if (!(input = malloc(sizeof(Ecore_Wl_Input)))) return;   memset(input, 0, sizeof(Ecore_Wl_Input));   input->display = ewd;   input->pointer_focus = NULL;   input->keyboard_focus = NULL;   input->input_device =      wl_display_bind(ewd->wl.display, id, &wl_input_device_interface);   wl_list_insert(ewd->inputs.prev, &input->link);   wl_input_device_add_listener(input->input_device,                                 &_ecore_wl_input_listener, input);   wl_input_device_set_user_data(input->input_device, input);   input->data_device =      wl_data_device_manager_get_data_device(ewd->wl.data_device_manager,                                             input->input_device);   wl_data_device_add_listener(input->data_device,                                &_ecore_wl_data_listener, input);   ewd->input = input;}
开发者ID:wargio,项目名称:e17,代码行数:29,


示例7: seat_get_pointer

static voidseat_get_pointer (struct wl_client *client,                  struct wl_resource *resource,                  uint32_t id){  ClaylandSeat *seat = wl_resource_get_user_data (resource);  struct wl_resource *cr;  cr = wl_client_add_object (client, &wl_pointer_interface,                             &pointer_interface, id, seat);  wl_list_insert (&seat->pointer.resource_list, wl_resource_get_link (cr));  wl_resource_set_destructor (cr, unbind_resource);  if (seat->pointer.focus &&      wl_resource_get_client (seat->pointer.focus->resource) == client)    {      ClaylandSurface *surface;      wl_fixed_t sx, sy;      surface = (ClaylandSurface *) seat->pointer.focus;      transform_stage_point_fixed (surface,                                   seat->pointer.x,                                   seat->pointer.y,                                   &sx, &sy);      clayland_pointer_set_focus (&seat->pointer,                                  seat->pointer.focus,                                  sx, sy);    }}
开发者ID:clutter-project,项目名称:clayland,代码行数:29,


示例8: drag_grab_focus

static voiddrag_grab_focus(struct wl_grab *grab, uint32_t time,		struct wl_surface *surface, int32_t x, int32_t y){	struct wl_input_device *device =		container_of(grab, struct wl_input_device, drag_grab);	struct wl_resource *resource, *offer;	if (device->drag_focus_resource) {		wl_resource_post_event(device->drag_focus_resource,				       WL_DATA_DEVICE_LEAVE);		wl_list_remove(&device->drag_focus_listener.link);		device->drag_focus_resource = NULL;		device->drag_focus = NULL;	}	if (surface)		resource = find_resource(&device->drag_resource_list, 					 surface->resource.client);	if (surface && resource) {		offer = wl_data_source_send_offer(device->drag_data_source,						  resource);		wl_resource_post_event(resource,				       WL_DATA_DEVICE_ENTER,				       time, surface, x, y, offer);		device->drag_focus = surface;		device->drag_focus_listener.func = destroy_drag_focus;		wl_list_insert(resource->destroy_listener_list.prev,			       &device->drag_focus_listener.link);		device->drag_focus_resource = resource;		grab->focus = surface;	}}
开发者ID:ageric,项目名称:wayland,代码行数:35,


示例9: wldbg_monitor_fd

/** * Monitor filedescriptor for incoming events and * call set-up callbacks */struct wldbg_fd_callback *wldbg_monitor_fd(struct wldbg *wldbg, int fd,                 int (*dispatch)(int fd, void *data),                 void *data){    struct epoll_event ev;    struct wldbg_fd_callback *cb;    cb = malloc(sizeof *cb);    if (!cb)        return NULL;    ev.events = EPOLLIN;    ev.data.ptr = cb;    if (epoll_ctl(wldbg->epoll_fd, EPOLL_CTL_ADD, fd, &ev) == -1) {        perror("Failed adding fd to epoll");        free(cb);        return NULL;    }    cb->fd = fd;    cb->data = data;    cb->dispatch = dispatch;    wl_list_insert(&wldbg->monitored_fds, &cb->link);    return cb;}
开发者ID:jinzhangf,项目名称:wldbg,代码行数:32,


示例10: seat_get_keyboard

static voidseat_get_keyboard (struct wl_client *client,                   struct wl_resource *resource,                   uint32_t id){  ClaylandSeat *seat = wl_resource_get_user_data (resource);  struct wl_resource *cr;  cr = wl_client_add_object (client, &wl_keyboard_interface, NULL, id, seat);  wl_list_insert (&seat->keyboard.resource_list, wl_resource_get_link (cr));  wl_resource_set_destructor (cr, unbind_resource);  wl_keyboard_send_keymap (cr,                           WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1,                           seat->keyboard.xkb_info.keymap_fd,                           seat->keyboard.xkb_info.keymap_size);  if (seat->keyboard.focus &&      wl_resource_get_client (seat->keyboard.focus->resource) == client)    {      clayland_keyboard_set_focus (&seat->keyboard,                                   seat->keyboard.focus);      clayland_data_device_set_keyboard_focus (seat);    }}
开发者ID:clutter-project,项目名称:clayland,代码行数:25,


示例11: cycle

static voidcycle(struct wlc_compositor *compositor){   struct wl_list *l = wlc_space_get_userdata(wlc_compositor_get_focused_space(compositor));   if (!l)      return;   struct wlc_view *v;   uint32_t count = 0;   wlc_view_for_each_user(v, l)      if (is_tiled(v)) ++count;   // Check that we have at least two tiled views   // so we don't get in infinite loop.   if (count <= 1)      return;   // Cycle until we hit next tiled view.   struct wl_list *p;   do {      p = l->prev;      wl_list_remove(l->prev);      wl_list_insert(l, p);   } while (!is_tiled(wlc_view_from_user_link(p)));   relayout(wlc_compositor_get_focused_space(compositor));}
开发者ID:holomorph,项目名称:loliwm,代码行数:28,


示例12: get_shell_surface

static voidget_shell_surface (struct wl_client *client,                   struct wl_resource *resource,                   uint32_t id,                   struct wl_resource *surface_resource){  CoglandSurface *surface = surface_resource->data;  CoglandShellSurface *shell_surface = g_new0 (CoglandShellSurface, 1);  if (surface->has_shell_surface)    {      wl_resource_post_error (surface_resource,                              WL_DISPLAY_ERROR_INVALID_OBJECT,                              "wl_shell::get_shell_surface already requested");      return;    }  shell_surface->resource.destroy = destroy_shell_surface;  shell_surface->resource.object.id = id;  shell_surface->resource.object.interface = &wl_shell_surface_interface;  shell_surface->resource.object.implementation =    (void (**) (void)) &cogl_shell_surface_interface;  shell_surface->resource.data = shell_surface;  shell_surface->surface = surface;  shell_surface->surface_destroy_listener.func = shell_handle_surface_destroy;  wl_list_insert (surface->wayland_surface.resource.destroy_listener_list.prev,                  &shell_surface->surface_destroy_listener.link);  surface->has_shell_surface = TRUE;  wl_client_add_resource (client, &shell_surface->resource);}
开发者ID:recrack,项目名称:cogl-android,代码行数:33,


示例13: weston_desktop_seat_popup_grab_add_surface

voidweston_desktop_seat_popup_grab_add_surface(struct weston_desktop_seat *seat,					   struct wl_list *link){	assert(seat->popup_grab.client != NULL);	wl_list_insert(&seat->popup_grab.surfaces, link);}
开发者ID:dtoartist,项目名称:weston,代码行数:8,


示例14: weston_zoom_transition

static voidweston_zoom_transition(struct weston_output *output, uint32_t type,						wl_fixed_t x, wl_fixed_t y){	if (output->zoom.type != type) {		/* Set from/to points and start animation */		output->zoom.spring_xy.current = 0.0;		output->zoom.spring_xy.previous = 0.0;		output->zoom.spring_xy.target = 1.0;		if (wl_list_empty(&output->zoom.animation_xy.link)) {			output->zoom.animation_xy.frame_counter = 0;			wl_list_insert(output->animation_list.prev,				&output->zoom.animation_xy.link);			output->zoom.from.x = (type == ZOOM_FOCUS_TEXT) ?						x : output->zoom.text_cursor.x;			output->zoom.from.y = (type == ZOOM_FOCUS_TEXT) ?						y : output->zoom.text_cursor.y;		} else {			output->zoom.from.x = output->zoom.current.x;			output->zoom.from.y = output->zoom.current.y;		}		output->zoom.to.x = (type == ZOOM_FOCUS_POINTER) ?						x : output->zoom.text_cursor.x;		output->zoom.to.y = (type == ZOOM_FOCUS_POINTER) ?						y : output->zoom.text_cursor.y;		output->zoom.current.x = output->zoom.from.x;		output->zoom.current.y = output->zoom.from.y;		output->zoom.type = type;	}	if (output->zoom.level != output->zoom.spring_z.current) {		output->zoom.spring_z.target = output->zoom.level;		if (wl_list_empty(&output->zoom.animation_z.link)) {			output->zoom.animation_z.frame_counter = 0;			wl_list_insert(output->animation_list.prev,				&output->zoom.animation_z.link);		}	}	output->dirty = 1;	weston_output_damage(output);}
开发者ID:bpeel,项目名称:weston,代码行数:46,


示例15: headless_compositor_create_output

static intheadless_compositor_create_output(struct headless_compositor *c,				 int width, int height){	struct headless_output *output;	struct wl_event_loop *loop;	output = malloc(sizeof *output);	if (output == NULL)		return -1;	memset(output, 0, sizeof *output);	output->mode.flags =		WL_OUTPUT_MODE_CURRENT | WL_OUTPUT_MODE_PREFERRED;	output->mode.width = width;	output->mode.height = height;	output->mode.refresh = 60;	wl_list_init(&output->base.mode_list);	wl_list_insert(&output->base.mode_list, &output->mode.link);	output->base.current = &output->mode;	weston_output_init(&output->base, &c->base, 0, 0, width, height,			   WL_OUTPUT_TRANSFORM_NORMAL);	output->base.make = "weston";	output->base.model = "headless";	weston_output_move(&output->base, 0, 0);	loop = wl_display_get_event_loop(c->base.wl_display);	output->finish_frame_timer =		wl_event_loop_add_timer(loop, finish_frame_handler, output);	output->base.origin = output->base.current;	output->base.repaint = headless_output_repaint;	output->base.destroy = headless_output_destroy;	output->base.assign_planes = NULL;	output->base.set_backlight = NULL;	output->base.set_dpms = NULL;	output->base.switch_mode = NULL;	wl_list_insert(c->base.output_list.prev, &output->base.link);	return 0;}
开发者ID:anarsoul,项目名称:weston,代码行数:45,


示例16: registerResource

void registerResource(wl_list *list, wl_resource *resource){    wl_list_insert(list, &resource->link);    wl_listener *listener = new wl_listener;    listener->notify = unregisterResourceCallback;    wl_signal_add(&resource->destroy_signal, listener);}
开发者ID:RobinWuDev,项目名称:Qt,代码行数:9,


示例17: queue_event

static intqueue_event(struct wl_display *display, int len){	uint32_t p[2], id;	int opcode, size;	struct wl_proxy *proxy;	struct wl_closure *closure;	const struct wl_message *message;	struct wl_event_queue *queue;	wl_connection_copy(display->connection, p, sizeof p);	id = p[0];	opcode = p[1] & 0xffff;	size = p[1] >> 16;	if (len < size)		return 0;	proxy = wl_map_lookup(&display->objects, id);	if (proxy == WL_ZOMBIE_OBJECT) {		wl_connection_consume(display->connection, size);		return size;	} else if (proxy == NULL) {		wl_connection_consume(display->connection, size);		return size;	}	message = &proxy->object.interface->events[opcode];	closure = wl_connection_demarshal(display->connection, size,					  &display->objects, message);	if (!closure)		return -1;	if (create_proxies(proxy, closure) < 0) {		wl_closure_destroy(closure);		return -1;	}	if (wl_closure_lookup_objects(closure, &display->objects) != 0) {		wl_closure_destroy(closure);		return -1;	}	increase_closure_args_refcount(closure);	proxy->refcount++;	closure->proxy = proxy;	if (proxy == &display->proxy)		queue = &display->display_queue;	else		queue = proxy->queue;	if (wl_list_empty(&queue->event_list))		pthread_cond_signal(&queue->cond);	wl_list_insert(queue->event_list.prev, &closure->link);	return size;}
开发者ID:ifokthenok,项目名称:NBP,代码行数:57,


示例18: screen_add_window

static voidscreen_add_window(struct screen *screen, struct window *window){	window->screen = screen;	wl_list_insert(&screen->windows, &window->link);	++screen->num_windows;	swc_window_show(window->swc);	arrange(screen);}
开发者ID:DmitryHetman,项目名称:swc,代码行数:9,


示例19: swc_drm_create_screens

bool swc_drm_create_screens(struct wl_list * screens){    drmModeRes * resources;    drmModeConnector * connector;    uint32_t index;    struct swc_output * output;    uint32_t taken_crtcs = 0;    if (!(resources = drmModeGetResources(swc.drm->fd)))    {        ERROR("Could not get DRM resources/n");        return false;    }    for (index = 0; index < resources->count_connectors;         ++index, drmModeFreeConnector(connector))    {        connector = drmModeGetConnector(swc.drm->fd,                                        resources->connectors[index]);        if (connector->connection == DRM_MODE_CONNECTED)        {            uint32_t crtc_index;            uint32_t id;            if (!find_available_crtc(resources, connector, taken_crtcs,                                     &crtc_index))            {                WARNING("Could not find CRTC for connector %u/n", index);                continue;            }            if (!find_available_id(&id))            {                WARNING("No more available output IDs/n");                drmModeFreeConnector(connector);                break;            }            if (!(output = swc_output_new(connector)))                continue;            output->screen = screen_new(resources->crtcs[crtc_index], output);            output->screen->id = id;            taken_crtcs |= 1 << crtc_index;            drm.taken_ids |= 1 << id;            wl_list_insert(screens, &output->screen->link);        }    }    drmModeFreeResources(resources);    return true;}
开发者ID:ibab,项目名称:swc,代码行数:56,


示例20: data_device_bind

void data_device_bind(struct data_device * data_device,                          struct wl_client * client, uint32_t id){    struct wl_resource * resource;    resource = wl_resource_create(client, &wl_data_device_interface, 1, id);    wl_resource_set_implementation(resource, &data_device_implementation,                                   data_device, &swc_remove_resource);    wl_list_insert(&data_device->resources, &resource->link);}
开发者ID:jezze,项目名称:swc,代码行数:10,


示例21: buffer_release

static voidbuffer_release(void *data, struct wl_buffer *buffer){	struct wayland_shm_buffer *sb = data;	if (sb->output) {		wl_list_insert(&sb->output->shm.free_buffers, &sb->free_link);	} else {		wayland_shm_buffer_destroy(sb);	}}
开发者ID:antognolli,项目名称:weston,代码行数:11,


示例22: stop

void Animation::run(struct weston_output *output, uint32_t duration, Animation::Flags flags){    stop();    m_duration = duration;    m_runFlags = flags;    m_animation.ani.frame_counter = 0;    wl_list_insert(&output->animation_list, &m_animation.ani.link);    weston_compositor_schedule_repaint(output->compositor);}
开发者ID:CSRedRat,项目名称:orbital,代码行数:11,


示例23: main

int main(void){	struct wl_list list;	wl_list_init(&list);	struct item *i1 = malloc(sizeof *i1);	wl_list_insert(&list, &i1->link);	i1->number = 8;	assert(list.next == &i1->link);	return 0;}
开发者ID:pablo-aledo,项目名称:dg,代码行数:12,


示例24: get_data_device

static voidget_data_device (struct wl_client *client,                 struct wl_resource *manager_resource,                 guint32 id, struct wl_resource *seat_resource){  MetaWaylandSeat *seat = wl_resource_get_user_data (seat_resource);  struct wl_resource *cr;  cr = wl_resource_create (client, &wl_data_device_interface, wl_resource_get_version (manager_resource), id);  wl_resource_set_implementation (cr, &data_device_interface, &seat->data_device, unbind_resource);  wl_list_insert (&seat->data_device.resource_list, wl_resource_get_link (cr));}
开发者ID:mvollmer,项目名称:mutter,代码行数:12,


示例25: move_resources_for_client

static voidmove_resources_for_client(struct wl_list *destination,			  struct wl_list *source,			  struct wl_client *client){	struct wl_resource *resource, *tmp;	wl_resource_for_each_safe(resource, tmp, source) {		if (wl_resource_get_client(resource) == client) {			wl_list_remove(wl_resource_get_link(resource));			wl_list_insert(destination,				       wl_resource_get_link(resource));		}	}}
开发者ID:rzr,项目名称:weston-ivi-shell,代码行数:14,


示例26: handle_global

static voidhandle_global(void *data, struct wl_registry *registry,	      uint32_t id, const char *interface, uint32_t version){	struct client *client = data;	struct input *input;	struct output *output;	struct test *test;	struct global *global;	global = xzalloc(sizeof *global);	global->name = id;	global->interface = strdup(interface);	assert(interface);	global->version = version;	wl_list_insert(client->global_list.prev, &global->link);	if (strcmp(interface, "wl_compositor") == 0) {		client->wl_compositor =			wl_registry_bind(registry, id,					 &wl_compositor_interface, 1);	} else if (strcmp(interface, "wl_seat") == 0) {		input = xzalloc(sizeof *input);		input->wl_seat =			wl_registry_bind(registry, id,					 &wl_seat_interface, 1);		wl_seat_add_listener(input->wl_seat, &seat_listener, input);		client->input = input;	} else if (strcmp(interface, "wl_shm") == 0) {		client->wl_shm =			wl_registry_bind(registry, id,					 &wl_shm_interface, 1);		wl_shm_add_listener(client->wl_shm, &shm_listener, client);	} else if (strcmp(interface, "wl_output") == 0) {		output = xzalloc(sizeof *output);		output->wl_output =			wl_registry_bind(registry, id,					 &wl_output_interface, 1);		wl_output_add_listener(output->wl_output,				       &output_listener, output);		client->output = output;	} else if (strcmp(interface, "wl_test") == 0) {		test = xzalloc(sizeof *test);		test->wl_test =			wl_registry_bind(registry, id,					 &wl_test_interface, 1);		wl_test_add_listener(test->wl_test, &test_listener, test);		client->test = test;	}}
开发者ID:markbt,项目名称:weston,代码行数:50,


示例27: weston_zoom_transition

static voidweston_zoom_transition(struct weston_output *output, wl_fixed_t x, wl_fixed_t y){	if (output->zoom.level != output->zoom.spring_z.current) {		output->zoom.spring_z.target = output->zoom.level;		if (wl_list_empty(&output->zoom.animation_z.link)) {			output->zoom.animation_z.frame_counter = 0;			wl_list_insert(output->animation_list.prev,				&output->zoom.animation_z.link);		}	}	output->dirty = 1;	weston_output_damage(output);}
开发者ID:Nealefelaen,项目名称:weston-rift,代码行数:15,


示例28: weston_compositor_add_debug_binding

WL_EXPORT struct weston_binding *weston_compositor_add_debug_binding(struct weston_compositor *compositor,				    uint32_t key,				    weston_key_binding_handler_t handler,				    void *data){	struct weston_binding *binding;	binding = weston_compositor_add_binding(compositor, key, 0, 0, 0,						handler, data);	wl_list_insert(compositor->debug_binding_list.prev, &binding->link);	return binding;}
开发者ID:Nealefelaen,项目名称:weston-rift,代码行数:15,


示例29: get_data_device

static voidget_data_device(struct wl_client *client,		struct wl_resource *manager_resource,		uint32_t id, struct wl_resource *input_device){	struct wl_input_device *device = input_device->data;	struct wl_resource *resource;	resource =		wl_client_add_object(client, &wl_data_device_interface,				     &data_device_interface, id, device);				     	wl_list_insert(&device->drag_resource_list, &resource->link);	resource->destroy = unbind_data_device;}
开发者ID:ageric,项目名称:wayland,代码行数:15,



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


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