\hypertarget{group__Eina__Inline__List__Group}{}\section{Inline List}
\label{group__Eina__Inline__List__Group}\index{Inline List@{Inline List}}


These functions provide inline list management.  


\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{struct__Eina__Inlist}{\+\_\+\+Eina\+\_\+\+Inlist}
\begin{DoxyCompactList}\small\item\em Inlined list type. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{group__Eina__Inline__List__Group_gab30a76fcfa50307c797491705d60136a}\label{group__Eina__Inline__List__Group_gab30a76fcfa50307c797491705d60136a}} 
\#define \hyperlink{group__Eina__Inline__List__Group_gab30a76fcfa50307c797491705d60136a}{E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+ST}~\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} \+\_\+\+\_\+in\+\_\+list
\begin{DoxyCompactList}\small\item\em Used for declaring an inlist member in a struct. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Eina__Inline__List__Group_ga5bc991428e75557c6195f6b9e38321fb}\label{group__Eina__Inline__List__Group_ga5bc991428e75557c6195f6b9e38321fb}} 
\#define \hyperlink{group__Eina__Inline__List__Group_ga5bc991428e75557c6195f6b9e38321fb}{E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+G\+ET}(Inlist)~(\& ((Inlist)-\/$>$\+\_\+\+\_\+in\+\_\+list))
\begin{DoxyCompactList}\small\item\em Utility macro to get the inlist object of a struct. \end{DoxyCompactList}\item 
\#define \hyperlink{group__Eina__Inline__List__Group_ga8c4e6011e7caa9ec5c22b003c4950338}{E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+C\+O\+N\+T\+A\+I\+N\+E\+R\+\_\+\+G\+ET}(ptr,  type)
\begin{DoxyCompactList}\small\item\em Utility macro to get the container object of an inlist. \end{DoxyCompactList}\item 
\#define \hyperlink{group__Eina__Inline__List__Group_ga537030c4eea1e4d7cfccd5f4a5c48707}{\+\_\+\+E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+O\+F\+F\+S\+ET}(ref)~((char $\ast$)\&(ref)-\/$>$\+\_\+\+\_\+in\+\_\+list -\/ (char $\ast$)(ref))
\item 
\#define \hyperlink{group__Eina__Inline__List__Group_ga02aaf0449fa7b4e296ebd00005fa1334}{\+\_\+\+E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+C\+O\+N\+T\+A\+I\+N\+ER}(ref,  ptr)
\item 
\#define \hyperlink{group__Eina__Inline__List__Group_ga65e496b9b16d527d23c1d735652b4e62}{E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+F\+O\+R\+E\+A\+CH}(list,  it)
\item 
\#define \hyperlink{group__Eina__Inline__List__Group_ga11145a77c8fabbaa397d33912d0a39c5}{E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+F\+O\+R\+E\+A\+C\+H\+\_\+\+S\+A\+FE}(list,  list2,  it)
\item 
\#define \hyperlink{group__Eina__Inline__List__Group_gafa10a318f6f3c5e734e08bb4d48ca3f6}{E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+R\+E\+V\+E\+R\+S\+E\+\_\+\+F\+O\+R\+E\+A\+CH}(list,  it)
\item 
\#define \hyperlink{group__Eina__Inline__List__Group_gafc3e2cfc56097689afa7007af91d2a7e}{E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+R\+E\+V\+E\+R\+S\+E\+\_\+\+F\+O\+R\+E\+A\+C\+H\+\_\+\+F\+R\+OM}(list,  it)
\item 
\#define \hyperlink{group__Eina__Inline__List__Group_gae31673f53e99c2fc55720b7144e9f293}{E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+F\+R\+EE}(list,  it)~for (it = (\+\_\+\+\_\+typeof\+\_\+\+\_\+(it)) list; list; it = (\+\_\+\+\_\+typeof\+\_\+\+\_\+(it)) list)
\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}\label{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}} 
typedef struct \hyperlink{struct__Eina__Inlist}{\+\_\+\+Eina\+\_\+\+Inlist} \hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist}
\begin{DoxyCompactList}\small\item\em Inlined list type. \end{DoxyCompactList}\item 
typedef struct \+\_\+\+Eina\+\_\+\+Inlist\+\_\+\+Sorted\+\_\+\+State \hyperlink{group__Eina__Inline__List__Group_gae16e1ec496f4f97f74225f070cd09b93}{Eina\+\_\+\+Inlist\+\_\+\+Sorted\+\_\+\+State}
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$ \hyperlink{group__Eina__Inline__List__Group_ga095c6abf8b0122e30271ce98c26c0524}{eina\+\_\+inlist\+\_\+append} (\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$in\+\_\+list, \hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$in\+\_\+item)
\begin{DoxyCompactList}\small\item\em Add a new node to end of a list. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$ \hyperlink{group__Eina__Inline__List__Group_ga9b05113628965ac5865c35c8ace6562d}{eina\+\_\+inlist\+\_\+prepend} (\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$in\+\_\+list, \hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$in\+\_\+item)
\begin{DoxyCompactList}\small\item\em Add a new node to beginning of list. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$ \hyperlink{group__Eina__Inline__List__Group_ga188a035d7159c3856d8b608187064534}{eina\+\_\+inlist\+\_\+append\+\_\+relative} (\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$in\+\_\+list, \hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$in\+\_\+item, \hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$in\+\_\+relative)
\begin{DoxyCompactList}\small\item\em Add a new node after the given relative item in list. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$ \hyperlink{group__Eina__Inline__List__Group_ga85737f237ffe0e0bbecd9e313fcb0fdd}{eina\+\_\+inlist\+\_\+prepend\+\_\+relative} (\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$in\+\_\+list, \hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$in\+\_\+item, \hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$in\+\_\+relative)
\begin{DoxyCompactList}\small\item\em Add a new node before the given relative item in list. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$ \hyperlink{group__Eina__Inline__List__Group_gad84d4a8ad4c3392df4be8278ce10a274}{eina\+\_\+inlist\+\_\+remove} (\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$in\+\_\+list, \hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$in\+\_\+item)
\begin{DoxyCompactList}\small\item\em Remove node from list. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$ \hyperlink{group__Eina__Inline__List__Group_ga2e073030214eaf33c2a0200364ebae5e}{eina\+\_\+inlist\+\_\+find} (\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$in\+\_\+list, \hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$in\+\_\+item)
\begin{DoxyCompactList}\small\item\em Find given node in list, returns itself if found, N\+U\+LL if not. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$ \hyperlink{group__Eina__Inline__List__Group_gaaad2933c1da2d5f11a07d7c259df89fe}{eina\+\_\+inlist\+\_\+promote} (\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$list, \hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$item)
\begin{DoxyCompactList}\small\item\em Move existing node to beginning of list. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$ \hyperlink{group__Eina__Inline__List__Group_gabea5613e6992fb5bc07271c999f439e0}{eina\+\_\+inlist\+\_\+demote} (\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$list, \hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$item)
\begin{DoxyCompactList}\small\item\em Move existing node to end of list. \end{DoxyCompactList}\item 
static \hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$ \hyperlink{group__Eina__Inline__List__Group_ga4577268b3f4190907756c43436fc5e13}{eina\+\_\+inlist\+\_\+first} (const \hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$list)
\begin{DoxyCompactList}\small\item\em Get the first list node in the list. \end{DoxyCompactList}\item 
static \hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$ \hyperlink{group__Eina__Inline__List__Group_ga3de7fc7f671f52f6ed74e20f625d0db7}{eina\+\_\+inlist\+\_\+last} (const \hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$list)
\begin{DoxyCompactList}\small\item\em Get the last list node in the list. \end{DoxyCompactList}\item 
unsigned int \hyperlink{group__Eina__Inline__List__Group_ga20d6e4482cda609591cb504c7f0463f5}{eina\+\_\+inlist\+\_\+count} (const \hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$list)
\begin{DoxyCompactList}\small\item\em Get the count of the number of items in a list. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator} $\ast$ \hyperlink{group__Eina__Inline__List__Group_gae0f5ea787314284b1fe7f46ac1f9be79}{eina\+\_\+inlist\+\_\+iterator\+\_\+new} (const \hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$in\+\_\+list)
\begin{DoxyCompactList}\small\item\em Returns a new iterator associated to {\itshape list}. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor} $\ast$ \hyperlink{group__Eina__Inline__List__Group_ga63426bc6a8d77426a7d6c3882e7756b6}{eina\+\_\+inlist\+\_\+accessor\+\_\+new} (const \hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$in\+\_\+list)
\begin{DoxyCompactList}\small\item\em Returns a new accessor associated to a list. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$ \hyperlink{group__Eina__Inline__List__Group_ga611a4e909fa1fba62147e78825cad4f1}{eina\+\_\+inlist\+\_\+sorted\+\_\+insert} (\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$list, \hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$item, \hyperlink{group__Eina__Types__Group_ga1b31ffcc0d46eed63a2381c5a011b486}{Eina\+\_\+\+Compare\+\_\+\+Cb} func)
\begin{DoxyCompactList}\small\item\em Insert a new node into a sorted list. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Inline__List__Group_gae16e1ec496f4f97f74225f070cd09b93}{Eina\+\_\+\+Inlist\+\_\+\+Sorted\+\_\+\+State} $\ast$ \hyperlink{group__Eina__Inline__List__Group_ga918c48d2b6d572a22004da39d8b9f067}{eina\+\_\+inlist\+\_\+sorted\+\_\+state\+\_\+new} (void)
\begin{DoxyCompactList}\small\item\em Create state with valid data in it. \end{DoxyCompactList}\item 
int \hyperlink{group__Eina__Inline__List__Group_gade14e713e8d4bb5553ac2c56e91c184f}{eina\+\_\+inlist\+\_\+sorted\+\_\+state\+\_\+init} (\hyperlink{group__Eina__Inline__List__Group_gae16e1ec496f4f97f74225f070cd09b93}{Eina\+\_\+\+Inlist\+\_\+\+Sorted\+\_\+\+State} $\ast$state, \hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$list)
\begin{DoxyCompactList}\small\item\em Force an Eina\+\_\+\+Inlist\+\_\+\+Sorted\+\_\+\+State to match the content of a list. \end{DoxyCompactList}\item 
void \hyperlink{group__Eina__Inline__List__Group_gaa1f4771b178fc96790857055504c744b}{eina\+\_\+inlist\+\_\+sorted\+\_\+state\+\_\+free} (\hyperlink{group__Eina__Inline__List__Group_gae16e1ec496f4f97f74225f070cd09b93}{Eina\+\_\+\+Inlist\+\_\+\+Sorted\+\_\+\+State} $\ast$state)
\begin{DoxyCompactList}\small\item\em Free an Eina\+\_\+\+Inlist\+\_\+\+Sorted\+\_\+\+State. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$ \hyperlink{group__Eina__Inline__List__Group_ga81dc1fd407fb491fb69b144890414b6d}{eina\+\_\+inlist\+\_\+sorted\+\_\+state\+\_\+insert} (\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$list, \hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$item, \hyperlink{group__Eina__Types__Group_ga1b31ffcc0d46eed63a2381c5a011b486}{Eina\+\_\+\+Compare\+\_\+\+Cb} func, \hyperlink{group__Eina__Inline__List__Group_gae16e1ec496f4f97f74225f070cd09b93}{Eina\+\_\+\+Inlist\+\_\+\+Sorted\+\_\+\+State} $\ast$state)
\begin{DoxyCompactList}\small\item\em Insert a new node into a sorted list. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$ \hyperlink{group__Eina__Inline__List__Group_gac1132bfed4e77a5b63b0fb81d46f20c9}{eina\+\_\+inlist\+\_\+sort} (\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$head, \hyperlink{group__Eina__Types__Group_ga1b31ffcc0d46eed63a2381c5a011b486}{Eina\+\_\+\+Compare\+\_\+\+Cb} func)
\begin{DoxyCompactList}\small\item\em Sort a list according to the ordering func will return. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
These functions provide inline list management. 

Inline lists mean its nodes pointers are part of same memory as data. This has the benefit of fragmenting memory less and avoiding {\ttfamily node-\/$>$data} indirection, but has the drawback of higher cost for some common operations like count and sort.

It is possible to have inlist nodes to be part of regular lists, created with \hyperlink{group__Eina__List__Group_ga92ec14d1a1040a361c4d8cd0ab7b0ecc}{eina\+\_\+list\+\_\+append()} or \hyperlink{group__Eina__List__Group_ga9f35bfc7c5b798014c3e0a74bc6f39ad}{eina\+\_\+list\+\_\+prepend()}. It\textquotesingle{}s also possible to have a structure with two inlist pointers, thus be part of two different inlists at the same time, but the current convenience macros provided won\textquotesingle{}t work for both of them. Consult \hyperlink{group__Eina__Inline__List__Group_inlist_advanced}{Advanced Usage} for more info.

Inline lists have their purposes, but if you don\textquotesingle{}t know what those purposes are, go with regular lists instead.

Tip\+: When using inlists in more than one place (that is, passing them around functions or keeping a pointer to them in a structure) it\textquotesingle{}s more correct to keep a pointer to the first container, and not a pointer to the first inlist item (mostly they are the same, but that\textquotesingle{}s not always correct). This lets the compiler to do type checking and let the programmer know exactly what type this list is.

A simple example demonstrating the basic usage of an inlist can be found here\+: \hyperlink{eina_inlist_01_example_page}{Eina\+\_\+\+Inlist basic usage}\hypertarget{group__Eina__Inline__List__Group_inlist_algo}{}\subsection{Algorithm}\label{group__Eina__Inline__List__Group_inlist_algo}
The basic structure can be represented by the following picture\+:

  
\begin{DoxyImageNoCaption}
  \mbox{\includegraphics[width=\textwidth,height=\textheight/2,keepaspectratio=true]{eina_inlist-node}}
\end{DoxyImageNoCaption}


One data structure will also have the node information, with three pointers\+: {\itshape prev}, {\itshape next} and {\itshape last}. The {\itshape last} pointer is just valid for the first element (the list head), otherwise each insertion in the list would have to be done updating every node with the correct pointer. This means that it\textquotesingle{}s always very important to keep a pointer to the first element of the list, since it is the only one that has the correct information to allow a proper O(1) append to the list.\hypertarget{group__Eina__Inline__List__Group_inlist_perf}{}\subsection{Performance}\label{group__Eina__Inline__List__Group_inlist_perf}
Due to the nature of the inlist, there\textquotesingle{}s no accounting information, and no easy access to the last element from each list node. This means that \hyperlink{group__Eina__Inline__List__Group_ga20d6e4482cda609591cb504c7f0463f5}{eina\+\_\+inlist\+\_\+count()} is order-\/N, while \hyperlink{group__Eina__List__Group_ga301729054a498a2df09a5f1dd760697e}{eina\+\_\+list\+\_\+count()} is order-\/1 (constant time).\hypertarget{group__Eina__Inline__List__Group_inlist_advanced}{}\subsection{Advanced Usage}\label{group__Eina__Inline__List__Group_inlist_advanced}
The basic usage considers a struct that will have the user data, and also have an inlist node information (prev, next and last pointers) created with \hyperlink{group__Eina__Inline__List__Group_gab30a76fcfa50307c797491705d60136a}{E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+ST} during the struct declaration. This allows one to use the convenience macros \hyperlink{group__Eina__Inline__List__Group_ga5bc991428e75557c6195f6b9e38321fb}{E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+G\+E\+T()}, \hyperlink{group__Eina__Inline__List__Group_ga8c4e6011e7caa9ec5c22b003c4950338}{E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+C\+O\+N\+T\+A\+I\+N\+E\+R\+\_\+\+G\+E\+T()}, \hyperlink{group__Eina__Inline__List__Group_ga65e496b9b16d527d23c1d735652b4e62}{E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+F\+O\+R\+E\+A\+C\+H()} and so. This happens because the \hyperlink{group__Eina__Inline__List__Group_gab30a76fcfa50307c797491705d60136a}{E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+ST} macro declares a struct member with the name {\itshape \+\_\+\+\_\+inlist}, and all the other macros assume that this struct member has this name.

It may be the case that someone needs to have some inlist nodes added to a \hyperlink{group__Eina__List__Group_ga3295e1210efea1fb0fd6acbf3cbc1f29}{Eina\+\_\+\+List} too. If this happens, the inlist nodes can be added to the \hyperlink{group__Eina__List__Group_ga3295e1210efea1fb0fd6acbf3cbc1f29}{Eina\+\_\+\+List} without any problems. This example demonstrates this case\+: \hyperlink{eina_inlist_02_example_page}{Eina\+\_\+\+Inlist advanced usage -\/ lists and inlists}

It\textquotesingle{}s also possible to have some data that is part of two different inlists. If this is the case, then it won\textquotesingle{}t be possible to use the convenience macros to both of the lists. It will be necessary to create a new set of macros that will allow access to the second list node info. An example for this usage can be found here\+: \hyperlink{eina_inlist_03_example_page}{Eina\+\_\+\+Inlist advanced usage -\/ multi-\/inlists}

List of examples\+: \begin{DoxyItemize}
\item \hyperlink{eina_inlist_01_example_page}{Eina\+\_\+\+Inlist basic usage} \item \hyperlink{eina_inlist_02_example_page}{Eina\+\_\+\+Inlist advanced usage -\/ lists and inlists} \item \hyperlink{eina_inlist_03_example_page}{Eina\+\_\+\+Inlist advanced usage -\/ multi-\/inlists} \end{DoxyItemize}


\subsection{Macro Definition Documentation}
\mbox{\Hypertarget{group__Eina__Inline__List__Group_ga8c4e6011e7caa9ec5c22b003c4950338}\label{group__Eina__Inline__List__Group_ga8c4e6011e7caa9ec5c22b003c4950338}} 
\index{Inline List@{Inline List}!E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+C\+O\+N\+T\+A\+I\+N\+E\+R\+\_\+\+G\+ET@{E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+C\+O\+N\+T\+A\+I\+N\+E\+R\+\_\+\+G\+ET}}
\index{E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+C\+O\+N\+T\+A\+I\+N\+E\+R\+\_\+\+G\+ET@{E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+C\+O\+N\+T\+A\+I\+N\+E\+R\+\_\+\+G\+ET}!Inline List@{Inline List}}
\subsubsection{\texorpdfstring{E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+C\+O\+N\+T\+A\+I\+N\+E\+R\+\_\+\+G\+ET}{EINA\_INLIST\_CONTAINER\_GET}}
{\footnotesize\ttfamily \#define E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+C\+O\+N\+T\+A\+I\+N\+E\+R\+\_\+\+G\+ET(\begin{DoxyParamCaption}\item[{}]{ptr,  }\item[{}]{type }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}
((type *)((\textcolor{keywordtype}{char} *)ptr - \(\backslash\)
                                                  offsetof(type, \_\_in\_list)))
\end{DoxyCode}


Utility macro to get the container object of an inlist. 

\begin{Desc}
\item[Examples\+: ]\par
\hyperlink{eina_inlist_01_8c-example}{eina\+\_\+inlist\+\_\+01.\+c}, \hyperlink{eina_inlist_02_8c-example}{eina\+\_\+inlist\+\_\+02.\+c}, and \hyperlink{eina_inlist_03_8c-example}{eina\+\_\+inlist\+\_\+03.\+c}.\end{Desc}


Referenced by eldbus\+\_\+message\+\_\+ref().

\mbox{\Hypertarget{group__Eina__Inline__List__Group_ga537030c4eea1e4d7cfccd5f4a5c48707}\label{group__Eina__Inline__List__Group_ga537030c4eea1e4d7cfccd5f4a5c48707}} 
\index{Inline List@{Inline List}!\+\_\+\+E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+O\+F\+F\+S\+ET@{\+\_\+\+E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+O\+F\+F\+S\+ET}}
\index{\+\_\+\+E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+O\+F\+F\+S\+ET@{\+\_\+\+E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+O\+F\+F\+S\+ET}!Inline List@{Inline List}}
\subsubsection{\texorpdfstring{\+\_\+\+E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+O\+F\+F\+S\+ET}{\_EINA\_INLIST\_OFFSET}}
{\footnotesize\ttfamily \#define \+\_\+\+E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+O\+F\+F\+S\+ET(\begin{DoxyParamCaption}\item[{}]{ref }\end{DoxyParamCaption})~((char $\ast$)\&(ref)-\/$>$\+\_\+\+\_\+in\+\_\+list -\/ (char $\ast$)(ref))}


\begin{DoxyParams}{Parameters}
{\em ref} & The reference to be used. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{group__Eina__Inline__List__Group_ga02aaf0449fa7b4e296ebd00005fa1334}\label{group__Eina__Inline__List__Group_ga02aaf0449fa7b4e296ebd00005fa1334}} 
\index{Inline List@{Inline List}!\+\_\+\+E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+C\+O\+N\+T\+A\+I\+N\+ER@{\+\_\+\+E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+C\+O\+N\+T\+A\+I\+N\+ER}}
\index{\+\_\+\+E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+C\+O\+N\+T\+A\+I\+N\+ER@{\+\_\+\+E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+C\+O\+N\+T\+A\+I\+N\+ER}!Inline List@{Inline List}}
\subsubsection{\texorpdfstring{\+\_\+\+E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+C\+O\+N\+T\+A\+I\+N\+ER}{\_EINA\_INLIST\_CONTAINER}}
{\footnotesize\ttfamily \#define \+\_\+\+E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+C\+O\+N\+T\+A\+I\+N\+ER(\begin{DoxyParamCaption}\item[{}]{ref,  }\item[{}]{ptr }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}
(\textcolor{keywordtype}{void} *)((\textcolor{keywordtype}{char} *)(ptr) - \(\backslash\)
                                                  \hyperlink{group__Eina__Inline__List__Group_ga537030c4eea1e4d7cfccd5f4a5c48707}{\_EINA\_INLIST\_OFFSET}(ref))
\end{DoxyCode}

\begin{DoxyParams}{Parameters}
{\em ref} & The reference to be used. \\
\hline
{\em ptr} & The pointer to be used. \\
\hline
\end{DoxyParams}


Referenced by evas\+\_\+textblock\+\_\+cursor\+\_\+geometry\+\_\+bidi\+\_\+get().

\mbox{\Hypertarget{group__Eina__Inline__List__Group_ga65e496b9b16d527d23c1d735652b4e62}\label{group__Eina__Inline__List__Group_ga65e496b9b16d527d23c1d735652b4e62}} 
\index{Inline List@{Inline List}!E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+F\+O\+R\+E\+A\+CH@{E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+F\+O\+R\+E\+A\+CH}}
\index{E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+F\+O\+R\+E\+A\+CH@{E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+F\+O\+R\+E\+A\+CH}!Inline List@{Inline List}}
\subsubsection{\texorpdfstring{E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+F\+O\+R\+E\+A\+CH}{EINA\_INLIST\_FOREACH}}
{\footnotesize\ttfamily \#define E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+F\+O\+R\+E\+A\+CH(\begin{DoxyParamCaption}\item[{}]{list,  }\item[{}]{it }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}
\textcolor{keywordflow}{for} (it = NULL, it = (list ? \hyperlink{group__Eina__Inline__List__Group_ga02aaf0449fa7b4e296ebd00005fa1334}{\_EINA\_INLIST\_CONTAINER}(it, list) : NULL); it; \(\backslash\)
       it = (\hyperlink{group__Eina__Inline__List__Group_ga5bc991428e75557c6195f6b9e38321fb}{EINA\_INLIST\_GET}(it)->next ? \hyperlink{group__Eina__Inline__List__Group_ga02aaf0449fa7b4e296ebd00005fa1334}{\_EINA\_INLIST\_CONTAINER}(it, 
      \hyperlink{group__Eina__Inline__List__Group_ga5bc991428e75557c6195f6b9e38321fb}{EINA\_INLIST\_GET}(it)->next) : NULL))
\end{DoxyCode}

\begin{DoxyParams}{Parameters}
{\em list} & The list to iterate on. \\
\hline
{\em it} & The pointer to the list item, i.\+e. a pointer to each item that is part of the list. \\
\hline
\end{DoxyParams}
\begin{Desc}
\item[Examples\+: ]\par
\hyperlink{eina_inlist_01_8c-example}{eina\+\_\+inlist\+\_\+01.\+c}, \hyperlink{eina_inlist_02_8c-example}{eina\+\_\+inlist\+\_\+02.\+c}, and \hyperlink{eina_inlist_03_8c-example}{eina\+\_\+inlist\+\_\+03.\+c}.\end{Desc}


Referenced by ecore\+\_\+evas\+\_\+ecore\+\_\+evas\+\_\+list\+\_\+get(), ecore\+\_\+main\+\_\+fd\+\_\+handler\+\_\+active\+\_\+set(), ecore\+\_\+timer\+\_\+dump(), eina\+\_\+benchmark\+\_\+run(), eina\+\_\+threads\+\_\+shutdown(), eldbus\+\_\+init(), eldbus\+\_\+service\+\_\+object\+\_\+manager\+\_\+detach(), eo\+\_\+ref\+\_\+get(), eo\+\_\+xunref(), evas\+\_\+event\+\_\+callback\+\_\+del\+\_\+full(), evas\+\_\+font\+\_\+path\+\_\+global\+\_\+list(), evas\+\_\+free(), evas\+\_\+object\+\_\+event\+\_\+callback\+\_\+del\+\_\+full(), evas\+\_\+object\+\_\+image\+\_\+alpha\+\_\+mask\+\_\+set(), evas\+\_\+object\+\_\+smart\+\_\+callback\+\_\+del(), evas\+\_\+object\+\_\+smart\+\_\+callback\+\_\+del\+\_\+full(), evas\+\_\+object\+\_\+textblock\+\_\+clear(), evas\+\_\+object\+\_\+textblock\+\_\+text\+\_\+markup\+\_\+prepend(), evas\+\_\+render\+\_\+updates\+\_\+free(), evas\+\_\+textblock\+\_\+cursor\+\_\+char\+\_\+coord\+\_\+set(), evas\+\_\+textblock\+\_\+cursor\+\_\+copy(), evas\+\_\+textblock\+\_\+cursor\+\_\+format\+\_\+is\+\_\+visible\+\_\+get(), evas\+\_\+textblock\+\_\+cursor\+\_\+line\+\_\+char\+\_\+last(), evas\+\_\+textblock\+\_\+cursor\+\_\+line\+\_\+coord\+\_\+set(), and evas\+\_\+textblock\+\_\+cursor\+\_\+paragraph\+\_\+char\+\_\+last().

\mbox{\Hypertarget{group__Eina__Inline__List__Group_ga11145a77c8fabbaa397d33912d0a39c5}\label{group__Eina__Inline__List__Group_ga11145a77c8fabbaa397d33912d0a39c5}} 
\index{Inline List@{Inline List}!E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+F\+O\+R\+E\+A\+C\+H\+\_\+\+S\+A\+FE@{E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+F\+O\+R\+E\+A\+C\+H\+\_\+\+S\+A\+FE}}
\index{E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+F\+O\+R\+E\+A\+C\+H\+\_\+\+S\+A\+FE@{E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+F\+O\+R\+E\+A\+C\+H\+\_\+\+S\+A\+FE}!Inline List@{Inline List}}
\subsubsection{\texorpdfstring{E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+F\+O\+R\+E\+A\+C\+H\+\_\+\+S\+A\+FE}{EINA\_INLIST\_FOREACH\_SAFE}}
{\footnotesize\ttfamily \#define E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+F\+O\+R\+E\+A\+C\+H\+\_\+\+S\+A\+FE(\begin{DoxyParamCaption}\item[{}]{list,  }\item[{}]{list2,  }\item[{}]{it }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}
\textcolor{keywordflow}{for} (it = NULL, it = (list ? \hyperlink{group__Eina__Inline__List__Group_ga02aaf0449fa7b4e296ebd00005fa1334}{\_EINA\_INLIST\_CONTAINER}(it, list) : NULL), list2 = it ? 
      \hyperlink{group__Eina__Inline__List__Group_ga5bc991428e75557c6195f6b9e38321fb}{EINA\_INLIST\_GET}(it)->next : NULL; \(\backslash\)
        it; \(\backslash\)
        it = NULL, it = list2 ? \hyperlink{group__Eina__Inline__List__Group_ga02aaf0449fa7b4e296ebd00005fa1334}{\_EINA\_INLIST\_CONTAINER}(it, list2) : NULL, list2 = 
      list2 ? list2->next : NULL)
\end{DoxyCode}

\begin{DoxyParams}{Parameters}
{\em list} & The list to iterate on. \\
\hline
{\em list2} & Auxiliary Eina\+\_\+\+Inlist variable so we can save the pointer to the next element, allowing us to free/remove the current one. Note that this macro is only safe if the next element is not removed. Only the current one is allowed to be removed. \\
\hline
{\em it} & The pointer to the list item, i.\+e. a pointer to each item that is part of the list. \\
\hline
\end{DoxyParams}


Referenced by ecore\+\_\+wl\+\_\+screen\+\_\+size\+\_\+get(), ecore\+\_\+wl\+\_\+server\+\_\+mode\+\_\+set(), and evas\+\_\+smart\+\_\+legacy\+\_\+type\+\_\+register().

\mbox{\Hypertarget{group__Eina__Inline__List__Group_gafa10a318f6f3c5e734e08bb4d48ca3f6}\label{group__Eina__Inline__List__Group_gafa10a318f6f3c5e734e08bb4d48ca3f6}} 
\index{Inline List@{Inline List}!E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+R\+E\+V\+E\+R\+S\+E\+\_\+\+F\+O\+R\+E\+A\+CH@{E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+R\+E\+V\+E\+R\+S\+E\+\_\+\+F\+O\+R\+E\+A\+CH}}
\index{E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+R\+E\+V\+E\+R\+S\+E\+\_\+\+F\+O\+R\+E\+A\+CH@{E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+R\+E\+V\+E\+R\+S\+E\+\_\+\+F\+O\+R\+E\+A\+CH}!Inline List@{Inline List}}
\subsubsection{\texorpdfstring{E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+R\+E\+V\+E\+R\+S\+E\+\_\+\+F\+O\+R\+E\+A\+CH}{EINA\_INLIST\_REVERSE\_FOREACH}}
{\footnotesize\ttfamily \#define E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+R\+E\+V\+E\+R\+S\+E\+\_\+\+F\+O\+R\+E\+A\+CH(\begin{DoxyParamCaption}\item[{}]{list,  }\item[{}]{it }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}
\textcolor{keywordflow}{for} (it = NULL, it = (list ? \hyperlink{group__Eina__Inline__List__Group_ga02aaf0449fa7b4e296ebd00005fa1334}{\_EINA\_INLIST\_CONTAINER}(it, list->last) : NULL); \(\backslash\)
       it; it = (\hyperlink{group__Eina__Inline__List__Group_ga5bc991428e75557c6195f6b9e38321fb}{EINA\_INLIST\_GET}(it)->prev ? 
      \hyperlink{group__Eina__Inline__List__Group_ga02aaf0449fa7b4e296ebd00005fa1334}{\_EINA\_INLIST\_CONTAINER}(it, \hyperlink{group__Eina__Inline__List__Group_ga5bc991428e75557c6195f6b9e38321fb}{EINA\_INLIST\_GET}(it)->prev) : NULL))
\end{DoxyCode}

\begin{DoxyParams}{Parameters}
{\em list} & The list to traversed in reverse order. \\
\hline
{\em it} & The pointer to the list item, i.\+e. a pointer to each item that is part of the list. \\
\hline
\end{DoxyParams}


Referenced by evas\+\_\+event\+\_\+callback\+\_\+del(), and evas\+\_\+object\+\_\+event\+\_\+callback\+\_\+del().

\mbox{\Hypertarget{group__Eina__Inline__List__Group_gafc3e2cfc56097689afa7007af91d2a7e}\label{group__Eina__Inline__List__Group_gafc3e2cfc56097689afa7007af91d2a7e}} 
\index{Inline List@{Inline List}!E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+R\+E\+V\+E\+R\+S\+E\+\_\+\+F\+O\+R\+E\+A\+C\+H\+\_\+\+F\+R\+OM@{E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+R\+E\+V\+E\+R\+S\+E\+\_\+\+F\+O\+R\+E\+A\+C\+H\+\_\+\+F\+R\+OM}}
\index{E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+R\+E\+V\+E\+R\+S\+E\+\_\+\+F\+O\+R\+E\+A\+C\+H\+\_\+\+F\+R\+OM@{E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+R\+E\+V\+E\+R\+S\+E\+\_\+\+F\+O\+R\+E\+A\+C\+H\+\_\+\+F\+R\+OM}!Inline List@{Inline List}}
\subsubsection{\texorpdfstring{E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+R\+E\+V\+E\+R\+S\+E\+\_\+\+F\+O\+R\+E\+A\+C\+H\+\_\+\+F\+R\+OM}{EINA\_INLIST\_REVERSE\_FOREACH\_FROM}}
{\footnotesize\ttfamily \#define E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+R\+E\+V\+E\+R\+S\+E\+\_\+\+F\+O\+R\+E\+A\+C\+H\+\_\+\+F\+R\+OM(\begin{DoxyParamCaption}\item[{}]{list,  }\item[{}]{it }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}
\textcolor{keywordflow}{for} (it = NULL, it = (list ? \hyperlink{group__Eina__Inline__List__Group_ga02aaf0449fa7b4e296ebd00005fa1334}{\_EINA\_INLIST\_CONTAINER}(it, list) : NULL); \(\backslash\)
       it; it = (\hyperlink{group__Eina__Inline__List__Group_ga5bc991428e75557c6195f6b9e38321fb}{EINA\_INLIST\_GET}(it)->prev ? 
      \hyperlink{group__Eina__Inline__List__Group_ga02aaf0449fa7b4e296ebd00005fa1334}{\_EINA\_INLIST\_CONTAINER}(it, \hyperlink{group__Eina__Inline__List__Group_ga5bc991428e75557c6195f6b9e38321fb}{EINA\_INLIST\_GET}(it)->prev) : NULL))
\end{DoxyCode}

\begin{DoxyParams}{Parameters}
{\em list} & The last list to traversed in reverse order. \\
\hline
{\em it} & The pointer to the list item, i.\+e. a pointer to each item that is part of the list. \\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Inline__List__Group_gafa10a318f6f3c5e734e08bb4d48ca3f6}{E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+R\+E\+V\+E\+R\+S\+E\+\_\+\+F\+O\+R\+E\+A\+C\+H()} 
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+8
\end{DoxySince}
\hyperlink{group__Eina__Inline__List__Group_gafa10a318f6f3c5e734e08bb4d48ca3f6}{E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+R\+E\+V\+E\+R\+S\+E\+\_\+\+F\+O\+R\+E\+A\+C\+H()} starts from last list of the given list. This starts from given list, not the last one. \mbox{\Hypertarget{group__Eina__Inline__List__Group_gae31673f53e99c2fc55720b7144e9f293}\label{group__Eina__Inline__List__Group_gae31673f53e99c2fc55720b7144e9f293}} 
\index{Inline List@{Inline List}!E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+F\+R\+EE@{E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+F\+R\+EE}}
\index{E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+F\+R\+EE@{E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+F\+R\+EE}!Inline List@{Inline List}}
\subsubsection{\texorpdfstring{E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+F\+R\+EE}{EINA\_INLIST\_FREE}}
{\footnotesize\ttfamily \#define E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+F\+R\+EE(\begin{DoxyParamCaption}\item[{}]{list,  }\item[{}]{it }\end{DoxyParamCaption})~for (it = (\+\_\+\+\_\+typeof\+\_\+\+\_\+(it)) list; list; it = (\+\_\+\+\_\+typeof\+\_\+\+\_\+(it)) list)}


\begin{DoxyParams}{Parameters}
{\em list} & The list to free. \\
\hline
{\em it} & The pointer to the list item, i.\+e. a pointer to each item that is part of the list.\\
\hline
\end{DoxyParams}
N\+O\+TE\+: it is the duty of the body loop to properly remove the item from the inlist and free it. This function will turn into a infinite loop if you don\textquotesingle{}t remove all items from the list. \begin{DoxySince}{Since}
1.\+8 
\end{DoxySince}


Referenced by ecore\+\_\+wl\+\_\+subsurf\+\_\+del().



\subsection{Typedef Documentation}
\mbox{\Hypertarget{group__Eina__Inline__List__Group_gae16e1ec496f4f97f74225f070cd09b93}\label{group__Eina__Inline__List__Group_gae16e1ec496f4f97f74225f070cd09b93}} 
\index{Inline List@{Inline List}!Eina\+\_\+\+Inlist\+\_\+\+Sorted\+\_\+\+State@{Eina\+\_\+\+Inlist\+\_\+\+Sorted\+\_\+\+State}}
\index{Eina\+\_\+\+Inlist\+\_\+\+Sorted\+\_\+\+State@{Eina\+\_\+\+Inlist\+\_\+\+Sorted\+\_\+\+State}!Inline List@{Inline List}}
\subsubsection{\texorpdfstring{Eina\+\_\+\+Inlist\+\_\+\+Sorted\+\_\+\+State}{Eina\_Inlist\_Sorted\_State}}
{\footnotesize\ttfamily \hyperlink{group__Eina__Inline__List__Group_gae16e1ec496f4f97f74225f070cd09b93}{Eina\+\_\+\+Inlist\+\_\+\+Sorted\+\_\+\+State}}

\begin{DoxySince}{Since}
1.\+1.\+0 State of sorted Eina\+\_\+\+Inlist 
\end{DoxySince}


\subsection{Function Documentation}
\mbox{\Hypertarget{group__Eina__Inline__List__Group_ga095c6abf8b0122e30271ce98c26c0524}\label{group__Eina__Inline__List__Group_ga095c6abf8b0122e30271ce98c26c0524}} 
\index{Inline List@{Inline List}!eina\+\_\+inlist\+\_\+append@{eina\+\_\+inlist\+\_\+append}}
\index{eina\+\_\+inlist\+\_\+append@{eina\+\_\+inlist\+\_\+append}!Inline List@{Inline List}}
\subsubsection{\texorpdfstring{eina\+\_\+inlist\+\_\+append()}{eina\_inlist\_append()}}
{\footnotesize\ttfamily \hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist}$\ast$ eina\+\_\+inlist\+\_\+append (\begin{DoxyParamCaption}\item[{\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$}]{in\+\_\+list,  }\item[{\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$}]{in\+\_\+item }\end{DoxyParamCaption})}



Add a new node to end of a list. 

\begin{DoxyNote}{Note}
this code is meant to be fast\+: appends are O(1) and do not walk {\itshape in\+\_\+list}.

{\itshape in\+\_\+item} is considered to be in no list. If it was in another list before, \hyperlink{group__Eina__Inline__List__Group_gad84d4a8ad4c3392df4be8278ce10a274}{eina\+\_\+inlist\+\_\+remove()} it before adding. No check of {\itshape new\+\_\+l} prev and next pointers is done, so it\textquotesingle{}s safe to have them uninitialized.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em in\+\_\+list} & existing list head or {\ttfamily N\+U\+LL} to create a new list. \\
\hline
{\em in\+\_\+item} & new list node, must not be {\ttfamily N\+U\+LL}.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the new list head. Use it and not {\itshape in\+\_\+list} anymore. 
\end{DoxyReturn}


Referenced by ecore\+\_\+event\+\_\+filter\+\_\+add(), ecore\+\_\+event\+\_\+handler\+\_\+add(), ecore\+\_\+idle\+\_\+enterer\+\_\+add(), ecore\+\_\+idle\+\_\+exiter\+\_\+add(), ecore\+\_\+idler\+\_\+add(), ecore\+\_\+main\+\_\+loop\+\_\+select\+\_\+func\+\_\+get(), ecore\+\_\+wl\+\_\+server\+\_\+mode\+\_\+set(), ecore\+\_\+wl\+\_\+subsurf\+\_\+create(), eina\+\_\+benchmark\+\_\+register(), eina\+\_\+inlist\+\_\+sorted\+\_\+state\+\_\+insert(), eina\+\_\+simple\+\_\+xml\+\_\+attribute\+\_\+new(), evas\+\_\+object\+\_\+smart\+\_\+callback\+\_\+priority\+\_\+add(), evas\+\_\+textblock\+\_\+cursor\+\_\+format\+\_\+append(), evas\+\_\+textblock\+\_\+cursor\+\_\+text\+\_\+append(), evas\+\_\+textblock\+\_\+string\+\_\+escape\+\_\+get(), evas\+\_\+textblock\+\_\+style\+\_\+set(), and efl\+::eina\+::inlist$<$ T, Allocator $>$\+::push\+\_\+back().

\mbox{\Hypertarget{group__Eina__Inline__List__Group_ga9b05113628965ac5865c35c8ace6562d}\label{group__Eina__Inline__List__Group_ga9b05113628965ac5865c35c8ace6562d}} 
\index{Inline List@{Inline List}!eina\+\_\+inlist\+\_\+prepend@{eina\+\_\+inlist\+\_\+prepend}}
\index{eina\+\_\+inlist\+\_\+prepend@{eina\+\_\+inlist\+\_\+prepend}!Inline List@{Inline List}}
\subsubsection{\texorpdfstring{eina\+\_\+inlist\+\_\+prepend()}{eina\_inlist\_prepend()}}
{\footnotesize\ttfamily \hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist}$\ast$ eina\+\_\+inlist\+\_\+prepend (\begin{DoxyParamCaption}\item[{\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$}]{in\+\_\+list,  }\item[{\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$}]{in\+\_\+item }\end{DoxyParamCaption})}



Add a new node to beginning of list. 

\begin{DoxyNote}{Note}
this code is meant to be fast\+: appends are O(1) and do not walk {\itshape in\+\_\+list}.

{\itshape new\+\_\+l} is considered to be in no list. If it was in another list before, \hyperlink{group__Eina__Inline__List__Group_gad84d4a8ad4c3392df4be8278ce10a274}{eina\+\_\+inlist\+\_\+remove()} it before adding. No check of {\itshape new\+\_\+l} prev and next pointers is done, so it\textquotesingle{}s safe to have them uninitialized.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em in\+\_\+list} & existing list head or {\ttfamily N\+U\+LL} to create a new list. \\
\hline
{\em in\+\_\+item} & new list node, must not be {\ttfamily N\+U\+LL}.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the new list head. Use it and not {\itshape in\+\_\+list} anymore. 
\end{DoxyReturn}


Referenced by ecore\+\_\+idle\+\_\+enterer\+\_\+before\+\_\+add(), ecore\+\_\+poller\+\_\+add(), eina\+\_\+inlist\+\_\+sorted\+\_\+state\+\_\+insert(), eo\+\_\+ref\+\_\+get(), eo\+\_\+xref\+\_\+internal(), evas\+\_\+textblock\+\_\+cursor\+\_\+format\+\_\+append(), and efl\+::eina\+::inlist$<$ T, Allocator $>$\+::push\+\_\+front().

\mbox{\Hypertarget{group__Eina__Inline__List__Group_ga188a035d7159c3856d8b608187064534}\label{group__Eina__Inline__List__Group_ga188a035d7159c3856d8b608187064534}} 
\index{Inline List@{Inline List}!eina\+\_\+inlist\+\_\+append\+\_\+relative@{eina\+\_\+inlist\+\_\+append\+\_\+relative}}
\index{eina\+\_\+inlist\+\_\+append\+\_\+relative@{eina\+\_\+inlist\+\_\+append\+\_\+relative}!Inline List@{Inline List}}
\subsubsection{\texorpdfstring{eina\+\_\+inlist\+\_\+append\+\_\+relative()}{eina\_inlist\_append\_relative()}}
{\footnotesize\ttfamily \hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist}$\ast$ eina\+\_\+inlist\+\_\+append\+\_\+relative (\begin{DoxyParamCaption}\item[{\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$}]{in\+\_\+list,  }\item[{\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$}]{in\+\_\+item,  }\item[{\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$}]{in\+\_\+relative }\end{DoxyParamCaption})}



Add a new node after the given relative item in list. 

\begin{DoxyNote}{Note}
this code is meant to be fast\+: appends are O(1) and do not walk {\itshape in\+\_\+list}.

{\itshape in\+\_\+item\+\_\+l} is considered to be in no list. If it was in another list before, \hyperlink{group__Eina__Inline__List__Group_gad84d4a8ad4c3392df4be8278ce10a274}{eina\+\_\+inlist\+\_\+remove()} it before adding. No check of {\itshape in\+\_\+item} prev and next pointers is done, so it\textquotesingle{}s safe to have them uninitialized.

{\itshape in\+\_\+relative} is considered to be inside {\itshape in\+\_\+list}, no checks are done to confirm that and giving nodes from different lists will lead to problems. Giving N\+U\+LL {\itshape in\+\_\+relative} is the same as \hyperlink{group__Eina__List__Group_ga92ec14d1a1040a361c4d8cd0ab7b0ecc}{eina\+\_\+list\+\_\+append()}.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em in\+\_\+list} & existing list head or {\ttfamily N\+U\+LL} to create a new list. \\
\hline
{\em in\+\_\+item} & new list node, must not be {\ttfamily N\+U\+LL}. \\
\hline
{\em in\+\_\+relative} & reference node, {\itshape in\+\_\+item} will be added after it.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the new list head. Use it and not {\itshape list} anymore. 
\end{DoxyReturn}


Referenced by eina\+\_\+inlist\+\_\+sorted\+\_\+state\+\_\+insert(), evas\+\_\+textblock\+\_\+cursor\+\_\+copy(), and evas\+\_\+textblock\+\_\+cursor\+\_\+format\+\_\+append().

\mbox{\Hypertarget{group__Eina__Inline__List__Group_ga85737f237ffe0e0bbecd9e313fcb0fdd}\label{group__Eina__Inline__List__Group_ga85737f237ffe0e0bbecd9e313fcb0fdd}} 
\index{Inline List@{Inline List}!eina\+\_\+inlist\+\_\+prepend\+\_\+relative@{eina\+\_\+inlist\+\_\+prepend\+\_\+relative}}
\index{eina\+\_\+inlist\+\_\+prepend\+\_\+relative@{eina\+\_\+inlist\+\_\+prepend\+\_\+relative}!Inline List@{Inline List}}
\subsubsection{\texorpdfstring{eina\+\_\+inlist\+\_\+prepend\+\_\+relative()}{eina\_inlist\_prepend\_relative()}}
{\footnotesize\ttfamily \hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist}$\ast$ eina\+\_\+inlist\+\_\+prepend\+\_\+relative (\begin{DoxyParamCaption}\item[{\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$}]{in\+\_\+list,  }\item[{\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$}]{in\+\_\+item,  }\item[{\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$}]{in\+\_\+relative }\end{DoxyParamCaption})}



Add a new node before the given relative item in list. 

\begin{DoxyNote}{Note}
this code is meant to be fast\+: appends are O(1) and do not walk {\itshape in\+\_\+list}.

{\itshape in\+\_\+item} is considered to be in no list. If it was in another list before, \hyperlink{group__Eina__Inline__List__Group_gad84d4a8ad4c3392df4be8278ce10a274}{eina\+\_\+inlist\+\_\+remove()} it before adding. No check of {\itshape in\+\_\+item} prev and next pointers is done, so it\textquotesingle{}s safe to have them uninitialized.

{\itshape in\+\_\+relative} is considered to be inside {\itshape in\+\_\+list}, no checks are done to confirm that and giving nodes from different lists will lead to problems. Giving N\+U\+LL {\itshape in\+\_\+relative} is the same as \hyperlink{group__Eina__List__Group_ga9f35bfc7c5b798014c3e0a74bc6f39ad}{eina\+\_\+list\+\_\+prepend()}.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em in\+\_\+list} & existing list head or {\ttfamily N\+U\+LL} to create a new list. \\
\hline
{\em in\+\_\+item} & new list node, must not be {\ttfamily N\+U\+LL}. \\
\hline
{\em in\+\_\+relative} & reference node, {\itshape in\+\_\+item} will be added before it.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the new list head. Use it and not {\itshape in\+\_\+list} anymore. 
\end{DoxyReturn}


Referenced by eina\+\_\+inlist\+\_\+sorted\+\_\+state\+\_\+insert(), and evas\+\_\+textblock\+\_\+cursor\+\_\+format\+\_\+append().

\mbox{\Hypertarget{group__Eina__Inline__List__Group_gad84d4a8ad4c3392df4be8278ce10a274}\label{group__Eina__Inline__List__Group_gad84d4a8ad4c3392df4be8278ce10a274}} 
\index{Inline List@{Inline List}!eina\+\_\+inlist\+\_\+remove@{eina\+\_\+inlist\+\_\+remove}}
\index{eina\+\_\+inlist\+\_\+remove@{eina\+\_\+inlist\+\_\+remove}!Inline List@{Inline List}}
\subsubsection{\texorpdfstring{eina\+\_\+inlist\+\_\+remove()}{eina\_inlist\_remove()}}
{\footnotesize\ttfamily \hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist}$\ast$ eina\+\_\+inlist\+\_\+remove (\begin{DoxyParamCaption}\item[{\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$}]{in\+\_\+list,  }\item[{\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$}]{in\+\_\+item }\end{DoxyParamCaption})}



Remove node from list. 

\begin{DoxyNote}{Note}
this code is meant to be fast\+: appends are O(1) and do not walk {\itshape list}.

{\itshape in\+\_\+item} is considered to be inside {\itshape in\+\_\+list}, no checks are done to confirm that and giving nodes from different lists will lead to problems, especially if {\itshape in\+\_\+item} is the head since it will be different from {\itshape list} and the wrong new head will be returned.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em in\+\_\+list} & existing list head, must not be {\ttfamily N\+U\+LL}. \\
\hline
{\em in\+\_\+item} & existing list node, must not be {\ttfamily N\+U\+LL}.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the new list head. Use it and not {\itshape list} anymore. 
\end{DoxyReturn}


Referenced by ecore\+\_\+animator\+\_\+custom\+\_\+tick(), ecore\+\_\+main\+\_\+fd\+\_\+handler\+\_\+active\+\_\+set(), ecore\+\_\+poller\+\_\+add(), ecore\+\_\+poller\+\_\+del(), ecore\+\_\+wl\+\_\+server\+\_\+mode\+\_\+set(), ecore\+\_\+wl\+\_\+subsurf\+\_\+create(), eina\+\_\+benchmark\+\_\+free(), eina\+\_\+simple\+\_\+xml\+\_\+attribute\+\_\+free(), eo\+\_\+ref\+\_\+get(), eo\+\_\+xunref(), evas\+\_\+textblock\+\_\+cursor\+\_\+line\+\_\+char\+\_\+last(), efl\+::eina\+::inlist$<$ T, Allocator $>$\+::pop\+\_\+back(), and efl\+::eina\+::inlist$<$ T, Allocator $>$\+::pop\+\_\+front().

\mbox{\Hypertarget{group__Eina__Inline__List__Group_ga2e073030214eaf33c2a0200364ebae5e}\label{group__Eina__Inline__List__Group_ga2e073030214eaf33c2a0200364ebae5e}} 
\index{Inline List@{Inline List}!eina\+\_\+inlist\+\_\+find@{eina\+\_\+inlist\+\_\+find}}
\index{eina\+\_\+inlist\+\_\+find@{eina\+\_\+inlist\+\_\+find}!Inline List@{Inline List}}
\subsubsection{\texorpdfstring{eina\+\_\+inlist\+\_\+find()}{eina\_inlist\_find()}}
{\footnotesize\ttfamily \hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist}$\ast$ eina\+\_\+inlist\+\_\+find (\begin{DoxyParamCaption}\item[{\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$}]{in\+\_\+list,  }\item[{\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$}]{in\+\_\+item }\end{DoxyParamCaption})}



Find given node in list, returns itself if found, N\+U\+LL if not. 

\begin{DoxyWarning}{Warning}
this is an expensive call and has O(n) cost, possibly walking the whole list.
\end{DoxyWarning}

\begin{DoxyParams}{Parameters}
{\em in\+\_\+list} & existing list to search {\itshape in\+\_\+item} in, must not be {\ttfamily N\+U\+LL}. \\
\hline
{\em in\+\_\+item} & what to search for, must not be {\ttfamily N\+U\+LL}.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
{\itshape in\+\_\+item} if found, {\ttfamily N\+U\+LL} if not. 
\end{DoxyReturn}
\mbox{\Hypertarget{group__Eina__Inline__List__Group_gaaad2933c1da2d5f11a07d7c259df89fe}\label{group__Eina__Inline__List__Group_gaaad2933c1da2d5f11a07d7c259df89fe}} 
\index{Inline List@{Inline List}!eina\+\_\+inlist\+\_\+promote@{eina\+\_\+inlist\+\_\+promote}}
\index{eina\+\_\+inlist\+\_\+promote@{eina\+\_\+inlist\+\_\+promote}!Inline List@{Inline List}}
\subsubsection{\texorpdfstring{eina\+\_\+inlist\+\_\+promote()}{eina\_inlist\_promote()}}
{\footnotesize\ttfamily \hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist}$\ast$ eina\+\_\+inlist\+\_\+promote (\begin{DoxyParamCaption}\item[{\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$}]{list,  }\item[{\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$}]{item }\end{DoxyParamCaption})}



Move existing node to beginning of list. 

\begin{DoxyNote}{Note}
this code is meant to be fast\+: appends are O(1) and do not walk {\itshape list}.

{\itshape item} is considered to be inside {\itshape list}. No checks are done to confirm this, and giving nodes from different lists will lead to problems.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em list} & existing list head or {\ttfamily N\+U\+LL} to create a new list. \\
\hline
{\em item} & list node to move to beginning (head), must not be {\ttfamily N\+U\+LL}.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the new list head. Use it and not {\itshape list} anymore. 
\end{DoxyReturn}
\mbox{\Hypertarget{group__Eina__Inline__List__Group_gabea5613e6992fb5bc07271c999f439e0}\label{group__Eina__Inline__List__Group_gabea5613e6992fb5bc07271c999f439e0}} 
\index{Inline List@{Inline List}!eina\+\_\+inlist\+\_\+demote@{eina\+\_\+inlist\+\_\+demote}}
\index{eina\+\_\+inlist\+\_\+demote@{eina\+\_\+inlist\+\_\+demote}!Inline List@{Inline List}}
\subsubsection{\texorpdfstring{eina\+\_\+inlist\+\_\+demote()}{eina\_inlist\_demote()}}
{\footnotesize\ttfamily \hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist}$\ast$ eina\+\_\+inlist\+\_\+demote (\begin{DoxyParamCaption}\item[{\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$}]{list,  }\item[{\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$}]{item }\end{DoxyParamCaption})}



Move existing node to end of list. 

\begin{DoxyNote}{Note}
this code is meant to be fast\+: appends are O(1) and do not walk {\itshape list}.

{\itshape item} is considered to be inside {\itshape list}. No checks are done to confirm this, and giving nodes from different lists will lead to problems.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em list} & existing list head or {\ttfamily N\+U\+LL} to create a new list. \\
\hline
{\em item} & list node to move to end (tail), must not be {\ttfamily N\+U\+LL}.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the new list head. Use it and not {\itshape list} anymore. 
\end{DoxyReturn}
\mbox{\Hypertarget{group__Eina__Inline__List__Group_ga4577268b3f4190907756c43436fc5e13}\label{group__Eina__Inline__List__Group_ga4577268b3f4190907756c43436fc5e13}} 
\index{Inline List@{Inline List}!eina\+\_\+inlist\+\_\+first@{eina\+\_\+inlist\+\_\+first}}
\index{eina\+\_\+inlist\+\_\+first@{eina\+\_\+inlist\+\_\+first}!Inline List@{Inline List}}
\subsubsection{\texorpdfstring{eina\+\_\+inlist\+\_\+first()}{eina\_inlist\_first()}}
{\footnotesize\ttfamily static \hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist}$\ast$ eina\+\_\+inlist\+\_\+first (\begin{DoxyParamCaption}\item[{const \hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$}]{list }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Get the first list node in the list. 


\begin{DoxyParams}{Parameters}
{\em list} & The list to get the first list node from. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The first list node in the list.
\end{DoxyReturn}
This function returns the first list node in the list {\ttfamily list}. If {\ttfamily list} is {\ttfamily N\+U\+LL}, {\ttfamily N\+U\+LL} is returned.

This is a O(\+N) operation (it takes time proportional to the length of the list).

\begin{DoxySince}{Since}
1.\+8 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__Inline__List__Group_ga3de7fc7f671f52f6ed74e20f625d0db7}\label{group__Eina__Inline__List__Group_ga3de7fc7f671f52f6ed74e20f625d0db7}} 
\index{Inline List@{Inline List}!eina\+\_\+inlist\+\_\+last@{eina\+\_\+inlist\+\_\+last}}
\index{eina\+\_\+inlist\+\_\+last@{eina\+\_\+inlist\+\_\+last}!Inline List@{Inline List}}
\subsubsection{\texorpdfstring{eina\+\_\+inlist\+\_\+last()}{eina\_inlist\_last()}}
{\footnotesize\ttfamily static \hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist}$\ast$ eina\+\_\+inlist\+\_\+last (\begin{DoxyParamCaption}\item[{const \hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$}]{list }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Get the last list node in the list. 


\begin{DoxyParams}{Parameters}
{\em list} & The list to get the last list node from. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The last list node in the list.
\end{DoxyReturn}
This function returns the last list node in the list {\ttfamily list}. If {\ttfamily list} is {\ttfamily N\+U\+LL}, {\ttfamily N\+U\+LL} is returned.

This is a O(\+N) operation (it takes time proportional to the length of the list).

\begin{DoxySince}{Since}
1.\+8 
\end{DoxySince}
\mbox{\Hypertarget{group__Eina__Inline__List__Group_ga20d6e4482cda609591cb504c7f0463f5}\label{group__Eina__Inline__List__Group_ga20d6e4482cda609591cb504c7f0463f5}} 
\index{Inline List@{Inline List}!eina\+\_\+inlist\+\_\+count@{eina\+\_\+inlist\+\_\+count}}
\index{eina\+\_\+inlist\+\_\+count@{eina\+\_\+inlist\+\_\+count}!Inline List@{Inline List}}
\subsubsection{\texorpdfstring{eina\+\_\+inlist\+\_\+count()}{eina\_inlist\_count()}}
{\footnotesize\ttfamily unsigned int eina\+\_\+inlist\+\_\+count (\begin{DoxyParamCaption}\item[{const \hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$}]{list }\end{DoxyParamCaption})}



Get the count of the number of items in a list. 


\begin{DoxyParams}{Parameters}
{\em list} & The list whose count to return. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The number of members in the list.
\end{DoxyReturn}
This function returns how many members {\ttfamily list} contains. If the list is {\ttfamily N\+U\+LL}, {\ttfamily 0} is returned.

\begin{DoxyWarning}{Warning}
This is an order-\/N operation and so the time will depend on the number of elements on the list, so, it might become slow for big lists! 
\end{DoxyWarning}


References \+\_\+\+Eina\+\_\+\+Inlist\+::next.



Referenced by ecore\+\_\+main\+\_\+fd\+\_\+handler\+\_\+active\+\_\+set().

\mbox{\Hypertarget{group__Eina__Inline__List__Group_gae0f5ea787314284b1fe7f46ac1f9be79}\label{group__Eina__Inline__List__Group_gae0f5ea787314284b1fe7f46ac1f9be79}} 
\index{Inline List@{Inline List}!eina\+\_\+inlist\+\_\+iterator\+\_\+new@{eina\+\_\+inlist\+\_\+iterator\+\_\+new}}
\index{eina\+\_\+inlist\+\_\+iterator\+\_\+new@{eina\+\_\+inlist\+\_\+iterator\+\_\+new}!Inline List@{Inline List}}
\subsubsection{\texorpdfstring{eina\+\_\+inlist\+\_\+iterator\+\_\+new()}{eina\_inlist\_iterator\_new()}}
{\footnotesize\ttfamily \hyperlink{group__Eina__Iterator__Group_ga15b975bb881d955249ce13d4ebc96948}{Eina\+\_\+\+Iterator}$\ast$ eina\+\_\+inlist\+\_\+iterator\+\_\+new (\begin{DoxyParamCaption}\item[{const \hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$}]{in\+\_\+list }\end{DoxyParamCaption})}



Returns a new iterator associated to {\itshape list}. 


\begin{DoxyParams}{Parameters}
{\em in\+\_\+list} & The list. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A new iterator.
\end{DoxyReturn}
This function returns a newly allocated iterator associated to {\ttfamily in\+\_\+list}. If {\ttfamily in\+\_\+list} is {\ttfamily N\+U\+LL} or the count member of {\ttfamily in\+\_\+list} is less or equal than 0, this function still returns a valid iterator that will always return false on \hyperlink{group__Eina__Iterator__Group_ga83346e93c32dbebc8fd66e4f278140c5}{eina\+\_\+iterator\+\_\+next()}, thus keeping A\+PI sane.

If the memory can not be allocated, {\ttfamily N\+U\+LL} is returned. Otherwise, a valid iterator is returned.

\begin{DoxyWarning}{Warning}
if the list structure changes then the iterator becomes invalid, and if you add or remove nodes iterator behavior is undefined, and your program may crash! 
\end{DoxyWarning}


References E\+I\+N\+A\+\_\+\+M\+A\+G\+I\+C\+\_\+\+S\+ET, F\+U\+N\+C\+\_\+\+I\+T\+E\+R\+A\+T\+O\+R\+\_\+\+F\+R\+EE, F\+U\+N\+C\+\_\+\+I\+T\+E\+R\+A\+T\+O\+R\+\_\+\+G\+E\+T\+\_\+\+C\+O\+N\+T\+A\+I\+N\+ER, and F\+U\+N\+C\+\_\+\+I\+T\+E\+R\+A\+T\+O\+R\+\_\+\+N\+E\+XT.

\mbox{\Hypertarget{group__Eina__Inline__List__Group_ga63426bc6a8d77426a7d6c3882e7756b6}\label{group__Eina__Inline__List__Group_ga63426bc6a8d77426a7d6c3882e7756b6}} 
\index{Inline List@{Inline List}!eina\+\_\+inlist\+\_\+accessor\+\_\+new@{eina\+\_\+inlist\+\_\+accessor\+\_\+new}}
\index{eina\+\_\+inlist\+\_\+accessor\+\_\+new@{eina\+\_\+inlist\+\_\+accessor\+\_\+new}!Inline List@{Inline List}}
\subsubsection{\texorpdfstring{eina\+\_\+inlist\+\_\+accessor\+\_\+new()}{eina\_inlist\_accessor\_new()}}
{\footnotesize\ttfamily \hyperlink{group__Eina__Accessor__Group_ga65199ea5201a1867471028477dc26744}{Eina\+\_\+\+Accessor}$\ast$ eina\+\_\+inlist\+\_\+accessor\+\_\+new (\begin{DoxyParamCaption}\item[{const \hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$}]{in\+\_\+list }\end{DoxyParamCaption})}



Returns a new accessor associated to a list. 


\begin{DoxyParams}{Parameters}
{\em in\+\_\+list} & The list. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A new accessor.
\end{DoxyReturn}
This function returns a newly allocated accessor associated to {\ttfamily in\+\_\+list}. If {\ttfamily in\+\_\+list} is {\ttfamily N\+U\+LL} or the count member of {\ttfamily in\+\_\+list} is less or equal than {\ttfamily 0}, this function returns {\ttfamily N\+U\+LL}. If the memory can not be allocated, {\ttfamily N\+U\+LL} is returned and Otherwise, a valid accessor is returned. 

References E\+I\+N\+A\+\_\+\+M\+A\+G\+I\+C\+\_\+\+S\+ET, F\+U\+N\+C\+\_\+\+A\+C\+C\+E\+S\+S\+O\+R\+\_\+\+F\+R\+EE, F\+U\+N\+C\+\_\+\+A\+C\+C\+E\+S\+S\+O\+R\+\_\+\+G\+E\+T\+\_\+\+AT, and F\+U\+N\+C\+\_\+\+A\+C\+C\+E\+S\+S\+O\+R\+\_\+\+G\+E\+T\+\_\+\+C\+O\+N\+T\+A\+I\+N\+ER.



Referenced by efl\+::eina\+::inlist$<$ T, Allocator $>$\+::accessor().

\mbox{\Hypertarget{group__Eina__Inline__List__Group_ga611a4e909fa1fba62147e78825cad4f1}\label{group__Eina__Inline__List__Group_ga611a4e909fa1fba62147e78825cad4f1}} 
\index{Inline List@{Inline List}!eina\+\_\+inlist\+\_\+sorted\+\_\+insert@{eina\+\_\+inlist\+\_\+sorted\+\_\+insert}}
\index{eina\+\_\+inlist\+\_\+sorted\+\_\+insert@{eina\+\_\+inlist\+\_\+sorted\+\_\+insert}!Inline List@{Inline List}}
\subsubsection{\texorpdfstring{eina\+\_\+inlist\+\_\+sorted\+\_\+insert()}{eina\_inlist\_sorted\_insert()}}
{\footnotesize\ttfamily \hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist}$\ast$ eina\+\_\+inlist\+\_\+sorted\+\_\+insert (\begin{DoxyParamCaption}\item[{\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$}]{list,  }\item[{\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$}]{item,  }\item[{\hyperlink{group__Eina__Types__Group_ga1b31ffcc0d46eed63a2381c5a011b486}{Eina\+\_\+\+Compare\+\_\+\+Cb}}]{func }\end{DoxyParamCaption})}



Insert a new node into a sorted list. 


\begin{DoxyParams}{Parameters}
{\em list} & The given linked list, {\bfseries must} be sorted. \\
\hline
{\em item} & list node to insert, must not be {\ttfamily N\+U\+LL}. \\
\hline
{\em func} & The function called for the sort. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A list pointer. 
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+1.\+0
\end{DoxySince}
This function inserts item into a linked list assuming it was sorted and the result will be sorted. If {\ttfamily list} is {\ttfamily N\+U\+LL}, item is returned. On success, a new list pointer that should be used in place of the one given to this function is returned. Otherwise, the old pointer is returned.

\begin{DoxyNote}{Note}
O(log2(n)) comparisons (calls to {\ttfamily func}) average/worst case performance. As said in \hyperlink{group__Eina__List__Group_ga44af3419fd1f66ffefc4998e54c4ca70}{eina\+\_\+list\+\_\+search\+\_\+sorted\+\_\+near\+\_\+list()}, lists do not have O(1) access time, so walking to the correct node can be costly, consider worst case to be almost O(n) pointer dereference (list walk). 
\end{DoxyNote}
\mbox{\Hypertarget{group__Eina__Inline__List__Group_ga918c48d2b6d572a22004da39d8b9f067}\label{group__Eina__Inline__List__Group_ga918c48d2b6d572a22004da39d8b9f067}} 
\index{Inline List@{Inline List}!eina\+\_\+inlist\+\_\+sorted\+\_\+state\+\_\+new@{eina\+\_\+inlist\+\_\+sorted\+\_\+state\+\_\+new}}
\index{eina\+\_\+inlist\+\_\+sorted\+\_\+state\+\_\+new@{eina\+\_\+inlist\+\_\+sorted\+\_\+state\+\_\+new}!Inline List@{Inline List}}
\subsubsection{\texorpdfstring{eina\+\_\+inlist\+\_\+sorted\+\_\+state\+\_\+new()}{eina\_inlist\_sorted\_state\_new()}}
{\footnotesize\ttfamily \hyperlink{group__Eina__Inline__List__Group_gae16e1ec496f4f97f74225f070cd09b93}{Eina\+\_\+\+Inlist\+\_\+\+Sorted\+\_\+\+State}$\ast$ eina\+\_\+inlist\+\_\+sorted\+\_\+state\+\_\+new (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Create state with valid data in it. 

\begin{DoxyReturn}{Returns}
A valid Eina\+\_\+\+Inlist\+\_\+\+Sorted\+\_\+\+State. 
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+1.\+0
\end{DoxySince}
See \hyperlink{group__Eina__Inline__List__Group_ga81dc1fd407fb491fb69b144890414b6d}{eina\+\_\+inlist\+\_\+sorted\+\_\+state\+\_\+insert()} for more information. \mbox{\Hypertarget{group__Eina__Inline__List__Group_gade14e713e8d4bb5553ac2c56e91c184f}\label{group__Eina__Inline__List__Group_gade14e713e8d4bb5553ac2c56e91c184f}} 
\index{Inline List@{Inline List}!eina\+\_\+inlist\+\_\+sorted\+\_\+state\+\_\+init@{eina\+\_\+inlist\+\_\+sorted\+\_\+state\+\_\+init}}
\index{eina\+\_\+inlist\+\_\+sorted\+\_\+state\+\_\+init@{eina\+\_\+inlist\+\_\+sorted\+\_\+state\+\_\+init}!Inline List@{Inline List}}
\subsubsection{\texorpdfstring{eina\+\_\+inlist\+\_\+sorted\+\_\+state\+\_\+init()}{eina\_inlist\_sorted\_state\_init()}}
{\footnotesize\ttfamily int eina\+\_\+inlist\+\_\+sorted\+\_\+state\+\_\+init (\begin{DoxyParamCaption}\item[{\hyperlink{group__Eina__Inline__List__Group_gae16e1ec496f4f97f74225f070cd09b93}{Eina\+\_\+\+Inlist\+\_\+\+Sorted\+\_\+\+State} $\ast$}]{state,  }\item[{\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$}]{list }\end{DoxyParamCaption})}



Force an Eina\+\_\+\+Inlist\+\_\+\+Sorted\+\_\+\+State to match the content of a list. 


\begin{DoxyParams}{Parameters}
{\em state} & The state to update \\
\hline
{\em list} & The list to match \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The number of item in the actually in the list 
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+1.\+0
\end{DoxySince}
See \hyperlink{group__Eina__Inline__List__Group_ga81dc1fd407fb491fb69b144890414b6d}{eina\+\_\+inlist\+\_\+sorted\+\_\+state\+\_\+insert()} for more information. This function is useful if you didn\textquotesingle{}t use \hyperlink{group__Eina__Inline__List__Group_ga81dc1fd407fb491fb69b144890414b6d}{eina\+\_\+inlist\+\_\+sorted\+\_\+state\+\_\+insert()} at some point, but still think you have a sorted list. It will only correctly work on a sorted list. 

References \+\_\+\+Eina\+\_\+\+Inlist\+::next.

\mbox{\Hypertarget{group__Eina__Inline__List__Group_gaa1f4771b178fc96790857055504c744b}\label{group__Eina__Inline__List__Group_gaa1f4771b178fc96790857055504c744b}} 
\index{Inline List@{Inline List}!eina\+\_\+inlist\+\_\+sorted\+\_\+state\+\_\+free@{eina\+\_\+inlist\+\_\+sorted\+\_\+state\+\_\+free}}
\index{eina\+\_\+inlist\+\_\+sorted\+\_\+state\+\_\+free@{eina\+\_\+inlist\+\_\+sorted\+\_\+state\+\_\+free}!Inline List@{Inline List}}
\subsubsection{\texorpdfstring{eina\+\_\+inlist\+\_\+sorted\+\_\+state\+\_\+free()}{eina\_inlist\_sorted\_state\_free()}}
{\footnotesize\ttfamily void eina\+\_\+inlist\+\_\+sorted\+\_\+state\+\_\+free (\begin{DoxyParamCaption}\item[{\hyperlink{group__Eina__Inline__List__Group_gae16e1ec496f4f97f74225f070cd09b93}{Eina\+\_\+\+Inlist\+\_\+\+Sorted\+\_\+\+State} $\ast$}]{state }\end{DoxyParamCaption})}



Free an Eina\+\_\+\+Inlist\+\_\+\+Sorted\+\_\+\+State. 


\begin{DoxyParams}{Parameters}
{\em state} & The state to destroy \\
\hline
\end{DoxyParams}
\begin{DoxySince}{Since}
1.\+1.\+0
\end{DoxySince}
See \hyperlink{group__Eina__Inline__List__Group_ga81dc1fd407fb491fb69b144890414b6d}{eina\+\_\+inlist\+\_\+sorted\+\_\+state\+\_\+insert()} for more information. 

References \+\_\+\+Eina\+\_\+\+Inlist\+::next.

\mbox{\Hypertarget{group__Eina__Inline__List__Group_ga81dc1fd407fb491fb69b144890414b6d}\label{group__Eina__Inline__List__Group_ga81dc1fd407fb491fb69b144890414b6d}} 
\index{Inline List@{Inline List}!eina\+\_\+inlist\+\_\+sorted\+\_\+state\+\_\+insert@{eina\+\_\+inlist\+\_\+sorted\+\_\+state\+\_\+insert}}
\index{eina\+\_\+inlist\+\_\+sorted\+\_\+state\+\_\+insert@{eina\+\_\+inlist\+\_\+sorted\+\_\+state\+\_\+insert}!Inline List@{Inline List}}
\subsubsection{\texorpdfstring{eina\+\_\+inlist\+\_\+sorted\+\_\+state\+\_\+insert()}{eina\_inlist\_sorted\_state\_insert()}}
{\footnotesize\ttfamily \hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist}$\ast$ eina\+\_\+inlist\+\_\+sorted\+\_\+state\+\_\+insert (\begin{DoxyParamCaption}\item[{\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$}]{list,  }\item[{\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$}]{item,  }\item[{\hyperlink{group__Eina__Types__Group_ga1b31ffcc0d46eed63a2381c5a011b486}{Eina\+\_\+\+Compare\+\_\+\+Cb}}]{func,  }\item[{\hyperlink{group__Eina__Inline__List__Group_gae16e1ec496f4f97f74225f070cd09b93}{Eina\+\_\+\+Inlist\+\_\+\+Sorted\+\_\+\+State} $\ast$}]{state }\end{DoxyParamCaption})}



Insert a new node into a sorted list. 


\begin{DoxyParams}{Parameters}
{\em list} & The given linked list, {\bfseries must} be sorted. \\
\hline
{\em item} & list node to insert, must not be {\ttfamily N\+U\+LL}. \\
\hline
{\em func} & The function called for the sort. \\
\hline
{\em state} & The current array for initial dichotomic search \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A list pointer. 
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+1.\+0
\end{DoxySince}
This function inserts item into a linked list assuming {\ttfamily state} match the exact content order of the list. It use {\ttfamily state} to do a fast first step dichotomic search before starting to walk the inlist itself. This make this code much faster than \hyperlink{group__Eina__Inline__List__Group_ga611a4e909fa1fba62147e78825cad4f1}{eina\+\_\+inlist\+\_\+sorted\+\_\+insert()} as it doesn\textquotesingle{}t need to walk the list at all. The result is of course a sorted list with an updated state.. If {\ttfamily list} is {\ttfamily N\+U\+L\+LL}, item is returned. On success, a new list pointer that should be used in place of the one given to this function is returned. Otherwise, the old pointer is returned.

\begin{DoxyNote}{Note}
O(log2(n)) comparisons (calls to {\ttfamily func}) average/worst case performance. As said in \hyperlink{group__Eina__List__Group_ga44af3419fd1f66ffefc4998e54c4ca70}{eina\+\_\+list\+\_\+search\+\_\+sorted\+\_\+near\+\_\+list()}, lists do not have O(1) access time, so walking to the correct node can be costly, but this version try to minimize that by making it a O(log2(n)) for number small number. After n == 256, it start to add a linear cost again. Consider worst case to be almost O(n) pointer dereference (list walk). 
\end{DoxyNote}


References eina\+\_\+inlist\+\_\+append(), eina\+\_\+inlist\+\_\+append\+\_\+relative(), eina\+\_\+inlist\+\_\+prepend(), eina\+\_\+inlist\+\_\+prepend\+\_\+relative(), and \+\_\+\+Eina\+\_\+\+Inlist\+::next.

\mbox{\Hypertarget{group__Eina__Inline__List__Group_gac1132bfed4e77a5b63b0fb81d46f20c9}\label{group__Eina__Inline__List__Group_gac1132bfed4e77a5b63b0fb81d46f20c9}} 
\index{Inline List@{Inline List}!eina\+\_\+inlist\+\_\+sort@{eina\+\_\+inlist\+\_\+sort}}
\index{eina\+\_\+inlist\+\_\+sort@{eina\+\_\+inlist\+\_\+sort}!Inline List@{Inline List}}
\subsubsection{\texorpdfstring{eina\+\_\+inlist\+\_\+sort()}{eina\_inlist\_sort()}}
{\footnotesize\ttfamily \hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist}$\ast$ eina\+\_\+inlist\+\_\+sort (\begin{DoxyParamCaption}\item[{\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist} $\ast$}]{head,  }\item[{\hyperlink{group__Eina__Types__Group_ga1b31ffcc0d46eed63a2381c5a011b486}{Eina\+\_\+\+Compare\+\_\+\+Cb}}]{func }\end{DoxyParamCaption})}



Sort a list according to the ordering func will return. 


\begin{DoxyParams}{Parameters}
{\em head} & The list handle to sort. \\
\hline
{\em func} & A function pointer that can handle comparing the list data nodes. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the new head of list.
\end{DoxyReturn}
This function sorts all the elements of {\ttfamily head}. {\ttfamily func} is used to compare two elements of {\ttfamily head}. If {\ttfamily head} or {\ttfamily func} are {\ttfamily N\+U\+LL}, this function returns {\ttfamily N\+U\+LL}.

\begin{DoxyNote}{Note}
{\bfseries in-\/place}\+: this will change the given list, so you should now point to the new list head that is returned by this function.

Worst case is O(n $\ast$ log2(n)) comparisons (calls to func()). That means that for 1,000,000 list elements, sort will do 20,000,000 comparisons.
\end{DoxyNote}
Example\+: 
\begin{DoxyCode}
\textcolor{keyword}{typedef} \textcolor{keyword}{struct }\_Sort\_Ex Sort\_Ex;
\textcolor{keyword}{struct }\_Sort\_Ex
\{
  \hyperlink{group__Eina__Inline__List__Group_gab30a76fcfa50307c797491705d60136a}{EINA\_INLIST};
  \textcolor{keyword}{const} \textcolor{keywordtype}{char} *text;
\};

\textcolor{keywordtype}{int}
sort\_cb(\textcolor{keyword}{const} Inlist *l1, \textcolor{keyword}{const} Inlist *l2)
\{
   \textcolor{keyword}{const} Sort\_Ex *x1;
   \textcolor{keyword}{const} Sort\_Ex *x2;

   x1 = \hyperlink{group__Eina__Inline__List__Group_ga8c4e6011e7caa9ec5c22b003c4950338}{EINA\_INLIST\_CONTAINER\_GET}(l1, Sort\_Ex);
   x2 = \hyperlink{group__Eina__Inline__List__Group_ga8c4e6011e7caa9ec5c22b003c4950338}{EINA\_INLIST\_CONTAINER\_GET}(l2, Sort\_Ex);

   \textcolor{keywordflow}{return}(strcmp(x1->text, x2->text));
\}
\textcolor{keyword}{extern} \hyperlink{struct__Eina__Inlist}{Eina\_Inlist} *list;

list = \hyperlink{group__Eina__Inline__List__Group_gac1132bfed4e77a5b63b0fb81d46f20c9}{eina\_inlist\_sort}(list, sort\_cb);
\end{DoxyCode}
 