wl_list man page on Alpinelinux

Man page or keyword search:  
man Server   18016 pages
apropos Keyword Search (all sections)
Output format
Alpinelinux logo
[printable version]

wl_list(3)			    Wayland			    wl_list(3)

NAME
       wl_list -

       doubly-linked list

SYNOPSIS
       #include <wayland-util.h>

   Public Attributes
       struct wl_list * prev
       struct wl_list * next

Detailed Description
       doubly-linked list

       The list head is of 'struct wl_list' type, and must be initialized
       using wl_list_init(). All entries in the list must be of the same type.
       The item type must have a 'struct wl_list' member. This member will be
       initialized by wl_list_insert(). There is no need to call
       wl_list_init() on the individual item. To query if the list is empty in
       O(1), use wl_list_empty().

       Let's call the list reference 'struct wl_list foo_list', the item type
       as 'item_t', and the item member as 'struct wl_list link'.

       The following code will initialize a list:

	   struct wl_list foo_list;

	   struct item_t {
		   int foo;
		   struct wl_list link;
	   };
	   struct item_t item1, item2, item3;

	wl_list_init(&foo_list);
	wl_list_insert(&foo_list, &item1.link);	   Pushes item1 at the head
	wl_list_insert(&foo_list, &item2.link);	   Pushes item2 at the head
	wl_list_insert(&item2.link, &item3.link); Pushes item3 after item2

       The list now looks like [item2, item3, item1]

       Will iterate the list in ascending order:

	item_t *item;
	wl_list_for_each(item, foo_list, link) {
	   Do_something_with_item(item);
	}

Author
       Generated automatically by Doxygen for Wayland from the source code.

Version 1.4.0			Sat May 17 2014			    wl_list(3)
[top]

List of man pages available for Alpinelinux

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net