\begin{DoxyDate}{Date}
2008 (created)
\end{DoxyDate}
\hypertarget{eina_main_eina_toc}{}\doxysection{Table of Contents}\label{eina_main_eina_toc}
\begin{DoxyItemize}
\item \mbox{\hyperlink{eina_main_eina_main_intro}{Introduction}} \item \mbox{\hyperlink{eina_main_eina_main_compiling}{How to compile}} \item \mbox{\hyperlink{eina_main_eina_main_next_steps}{Next Steps}} \item \mbox{\hyperlink{eina_main_eina_main_intro_example}{Introductory Example}}\end{DoxyItemize}
\hypertarget{eina_main_eina_main_intro}{}\doxysection{Introduction}\label{eina_main_eina_main_intro}
The Eina library is a library which implements an API for data types in an efficient way. It also provides some useful tools like opening shared libraries, error management, type conversion, time accounting and memory pools.

This library is cross-\/platform and can be compiled and used on Linux, BSD, and Windows.

The data types available are (see \mbox{\hyperlink{group__Eina__Data__Types__Group}{Data Types}})\+: \begin{DoxyItemize}
\item \mbox{\hyperlink{group__Eina__Fp__Group}{Fp}} standard floating point numbers. \item \mbox{\hyperlink{group__Eina__Inline__Array__Group}{Inline Array}} standard array of inlined members. \item \mbox{\hyperlink{group__Eina__Array__Group}{Array}} standard array of {\ttfamily void$\ast$} data. \item \mbox{\hyperlink{group__Eina__Hash__Group}{Hash Table}} standard hash of {\ttfamily void$\ast$} data. \item \mbox{\hyperlink{group__Eina__Inline__List__Group}{Inline List}} list with nodes inlined into user type. \item \mbox{\hyperlink{group__Eina__CList__Group}{Compact List}} Compact List. \item \mbox{\hyperlink{group__Eina__List__Group}{List}} standard list of {\ttfamily void$\ast$} data. \item \mbox{\hyperlink{group__Eina__Iterator__Group}{Iterator Functions}} Iterator functions. \item \mbox{\hyperlink{group__Eina__Matrixsparse__Group}{Sparse Matrix}} sparse matrix of {\ttfamily void$\ast$} data. \item \mbox{\hyperlink{group__Eina__Rbtree__Group}{Red-\/\+Black tree}} red-\/black tree with nodes inlined into user type. \item \mbox{\hyperlink{group__Eina__String__Buffer__Group}{String Buffer}} mutable string to prepend, insert or append strings to a buffer. \item \mbox{\hyperlink{group__Eina__Stringshare__Group}{Stringshare}} saves memory by sharing read-\/only string references. \item \mbox{\hyperlink{group__Eina__Tiler__Group}{Tiler}} split, merge and navigates into 2D tiled regions. \item \mbox{\hyperlink{group__Eina__Trash__Group}{Trash}} container of unused but allocated data. \item \mbox{\hyperlink{group__Eina__Value__Group}{Generic Value Storage}} container for generic value storage and access.\end{DoxyItemize}
The tools available are (see \mbox{\hyperlink{group__Eina__Tools__Group}{Tools}})\+: \begin{DoxyItemize}
\item \mbox{\hyperlink{group__Eina__Benchmark__Group}{Benchmark}} helper to write benchmarks. \item \mbox{\hyperlink{group__Eina__Convert__Group}{Convert}} faster conversion from strings to integers, double, etc. \item \mbox{\hyperlink{group__Eina__Counter__Group}{Counter}} measures number of calls and their time. \item \mbox{\hyperlink{group__Eina__Cpu__Group}{Cpu}} Cpu and architecture related helpers. \item \mbox{\hyperlink{group__Eina__Error__Group}{Error}} error identifiers. \item \mbox{\hyperlink{group__Eina__File__Group}{File}} simple file list and path split. \item \mbox{\hyperlink{group__Eina__Lalloc__Group}{Lazy allocator}} simple lazy allocator. \item \mbox{\hyperlink{group__Eina__Log__Group}{Log}} full-\/featured logging system. \item \mbox{\hyperlink{group__Eina__Magic__Group}{Magic}} provides runtime type checking. \item \mbox{\hyperlink{group__Eina__Memory__Pool__Group}{Memory Pool}} abstraction for various memory allocators. \item \mbox{\hyperlink{group__Eina__Module__Group}{Module}} lists, loads and share modules using Eina\+\_\+\+Module standard. \item \mbox{\hyperlink{group__Eina__Rectangle__Group}{Rectangle}} rectangle structure and standard manipulation methods. \item \mbox{\hyperlink{group__Eina__Safety__Checks__Group}{Safety Checks}} extra checks that will report unexpected conditions and can be disabled at compile time. \item \mbox{\hyperlink{group__Eina__String__Group}{String}} a set of functions that manages C strings.\end{DoxyItemize}
\hypertarget{eina_main_eina_main_compiling}{}\doxysection{How to compile}\label{eina_main_eina_main_compiling}
Eina is a library to which your app can link. The procedure for this is very simple. You simply have to compile your application with the appropriate compiler flags as outputted by the {\ttfamily pkg-\/config} script. For example\+:

Compiling C or C++ files into object files\+:

\begin{DoxyVerb}gcc -c -o main.o main.c `pkg-config --cflags eina`
\end{DoxyVerb}


Linking object files into a binary executable\+:

\begin{DoxyVerb}gcc -o my_application main.o `pkg-config --libs eina`
\end{DoxyVerb}


See \mbox{\hyperlink{pkgconfig}{pkgconfig}}\hypertarget{eina_main_eina_main_next_steps}{}\doxysection{Next Steps}\label{eina_main_eina_main_next_steps}
After you\textquotesingle{}ve understood what Eina is and installed it, you can now learn more about the the programming interface.

Recommended reading\+:

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__Eina__Data__Types__Group}{Data Types}} to find about implemented types and how to use them. \item \mbox{\hyperlink{group__Eina__Tools__Group}{Tools}} to find about helper tools provided by eina.\end{DoxyItemize}
\hypertarget{eina_main_eina_main_intro_example}{}\doxysection{Introductory Example}\label{eina_main_eina_main_intro_example}

\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{comment}{//Compile with:}}
\DoxyCodeLine{\textcolor{comment}{//gcc -\/g eina\_list\_01.c -\/o eina\_list\_01 `pkg-\/config -\/-\/cflags -\/-\/libs eina`}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#include <stdio.h>}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include <\mbox{\hyperlink{Eina_8h}{Eina.h}}>}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{int}}
\DoxyCodeLine{main(\textcolor{keywordtype}{int} argc, \textcolor{keywordtype}{char} **argv)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   (void)argc;}
\DoxyCodeLine{   (void)argv;}
\DoxyCodeLine{   \mbox{\hyperlink{struct__Eina__List}{Eina\_List}} *list = NULL;}
\DoxyCodeLine{   \mbox{\hyperlink{struct__Eina__List}{Eina\_List}} *l;}
\DoxyCodeLine{   \textcolor{keywordtype}{void} *list\_data;}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Main__Group_gafee4bfc0e509b6ffed6598edf6f4b3de}{eina\_init}}();}
\DoxyCodeLine{}
\DoxyCodeLine{   list = \mbox{\hyperlink{group__Eina__List__Group_ga92ec14d1a1040a361c4d8cd0ab7b0ecc}{eina\_list\_append}}(list, \textcolor{stringliteral}{"{}tigh"{}});}
\DoxyCodeLine{   list = \mbox{\hyperlink{group__Eina__List__Group_ga92ec14d1a1040a361c4d8cd0ab7b0ecc}{eina\_list\_append}}(list, \textcolor{stringliteral}{"{}adar"{}});}
\DoxyCodeLine{   list = \mbox{\hyperlink{group__Eina__List__Group_ga92ec14d1a1040a361c4d8cd0ab7b0ecc}{eina\_list\_append}}(list, \textcolor{stringliteral}{"{}baltar"{}});}
\DoxyCodeLine{   list = \mbox{\hyperlink{group__Eina__List__Group_ga92ec14d1a1040a361c4d8cd0ab7b0ecc}{eina\_list\_append}}(list, \textcolor{stringliteral}{"{}roslin"{}});}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__List__Group_gac6efafc19f526d916cdb9757240a8773}{EINA\_LIST\_FOREACH}}(list, l, list\_data)}
\DoxyCodeLine{     printf(\textcolor{stringliteral}{"{}\%s\(\backslash\)n"{}}, (\textcolor{keywordtype}{char}*)list\_data);}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{}
\DoxyCodeLine{   l = \mbox{\hyperlink{group__Eina__List__Group_gad4a1e3b0fdecd8ed4cb2ff592ceeb553}{eina\_list\_nth\_list}}(list, 1);}
\DoxyCodeLine{   list = \mbox{\hyperlink{group__Eina__List__Group_gafa705d4483487e53d1be93a30e43c66d}{eina\_list\_append\_relative\_list}}(list, \textcolor{stringliteral}{"{}cain"{}}, l);}
\DoxyCodeLine{}
\DoxyCodeLine{   list = \mbox{\hyperlink{group__Eina__List__Group_ga4676c189ca4bcfa22d7ecfbcd00200ae}{eina\_list\_append\_relative}}(list, \textcolor{stringliteral}{"{}zarek"{}}, \textcolor{stringliteral}{"{}cain"{}});}
\DoxyCodeLine{}
\DoxyCodeLine{   list = \mbox{\hyperlink{group__Eina__List__Group_ga9f35bfc7c5b798014c3e0a74bc6f39ad}{eina\_list\_prepend}}(list, \textcolor{stringliteral}{"{}adama"{}});}
\DoxyCodeLine{}
\DoxyCodeLine{   list = \mbox{\hyperlink{group__Eina__List__Group_gad44370d18554ff250d2e9ddac4653caf}{eina\_list\_prepend\_relative}}(list, \textcolor{stringliteral}{"{}gaeta"{}}, \textcolor{stringliteral}{"{}cain"{}});}
\DoxyCodeLine{}
\DoxyCodeLine{   list = \mbox{\hyperlink{group__Eina__List__Group_ga03a77b1579ee83bcab4bc3d67375d4b1}{eina\_list\_prepend\_relative\_list}}(list, \textcolor{stringliteral}{"{}lampkin"{}}, l);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__List__Group_gac6efafc19f526d916cdb9757240a8773}{EINA\_LIST\_FOREACH}}(list, l, list\_data)}
\DoxyCodeLine{     printf(\textcolor{stringliteral}{"{}\%s\(\backslash\)n"{}}, (\textcolor{keywordtype}{char}*)list\_data);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__List__Group_ga608bd2fbf06293a1b794648990703ab4}{eina\_list\_free}}(list);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Main__Group_ga2c8b4020427108a30c44707af22c99d3}{eina\_shutdown}}();}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\}}

\end{DoxyCodeInclude}


More examples can be found at \mbox{\hyperlink{eina_examples}{Eina Examples}}. 