\hypertarget{group__Evas__Output__Method}{}\section{Render Engine Functions}
\label{group__Evas__Output__Method}\index{Render Engine Functions@{Render Engine Functions}}


Functions that are used to set the render engine for a given function, and then get that engine working.  


\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \mbox{\hyperlink{group__Evas__Output__Method_ga9f9871fdcc40ce1062d6565308020eb8}{evas\+\_\+render\+\_\+method\+\_\+lookup}} (const char $\ast$name)
\begin{DoxyCompactList}\small\item\em Look up a numeric ID from a string name of a rendering engine. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__List__Group_ga3295e1210efea1fb0fd6acbf3cbc1f29}{Eina\+\_\+\+List}} $\ast$ \mbox{\hyperlink{group__Evas__Output__Method_gad7deab8facaa4be521fbdec6dd19e122}{evas\+\_\+render\+\_\+method\+\_\+list}} (void)
\begin{DoxyCompactList}\small\item\em List all the rendering engines compiled into the copy of the Evas library. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__Evas__Output__Method_ga5bcc5a2165647f855c389bd58e77f608}{evas\+\_\+render\+\_\+method\+\_\+list\+\_\+free}} (\mbox{\hyperlink{group__Eina__List__Group_ga3295e1210efea1fb0fd6acbf3cbc1f29}{Eina\+\_\+\+List}} $\ast$list)
\begin{DoxyCompactList}\small\item\em This function should be called to free a list of engine names. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Functions that are used to set the render engine for a given function, and then get that engine working. 

The following code snippet shows how they can be used to initialise an evas that uses the X11 software engine\+: 
\begin{DoxyCode}
\mbox{\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}} *evas;
Evas\_Engine\_Info\_Software\_X11 *einfo;
\textcolor{keyword}{extern} Display *display;
\textcolor{keyword}{extern} Window win;

\mbox{\hyperlink{group__Evas__Main__Group_ga65b3f060b6dd9e488afd0b8cbe101869}{evas\_init}}();

evas = \mbox{\hyperlink{group__Evas__Canvas_ga67e8eb17d2a676bfdfb8794fc5f72bc0}{evas\_new}}();
\mbox{\hyperlink{group__Evas__Canvas_ga15b85dc673baa6aa40f91f8bfcd3cbaa}{evas\_output\_method\_set}}(evas, \mbox{\hyperlink{group__Evas__Output__Method_ga9f9871fdcc40ce1062d6565308020eb8}{evas\_render\_method\_lookup}}(\textcolor{stringliteral}{"
      software\_x11"}));
\mbox{\hyperlink{group__Evas__Canvas_gaf6478cb249ed09fa0fe961085773fe1e}{evas\_output\_size\_set}}(evas, 640, 480);
\mbox{\hyperlink{group__Evas__Canvas_ga6dcd13997f7825f03807dc0ec38dd38e}{evas\_output\_viewport\_set}}(evas, 0, 0, 640, 480);
einfo = (Evas\_Engine\_Info\_Software\_X11 *)\mbox{\hyperlink{group__Evas__Canvas_gaf396b44e1b97ec0d9dce49fcf9ad54b7}{evas\_engine\_info\_get}}(evas);
einfo->info.display = display;
einfo->info.visual = DefaultVisual(display, DefaultScreen(display));
einfo->info.colormap = DefaultColormap(display, DefaultScreen(display));
einfo->info.drawable = win;
einfo->info.depth = DefaultDepth(display, DefaultScreen(display));
\mbox{\hyperlink{group__Evas__Canvas_gae917a8b0d52df622498bbf55357c1af3}{evas\_engine\_info\_set}}(evas, (\mbox{\hyperlink{struct__Evas__Engine__Info}{Evas\_Engine\_Info}} *)einfo);
\end{DoxyCode}
 

\subsection{Function Documentation}
\mbox{\Hypertarget{group__Evas__Output__Method_ga9f9871fdcc40ce1062d6565308020eb8}\label{group__Evas__Output__Method_ga9f9871fdcc40ce1062d6565308020eb8}} 
\index{Render Engine Functions@{Render Engine Functions}!evas\+\_\+render\+\_\+method\+\_\+lookup@{evas\+\_\+render\+\_\+method\+\_\+lookup}}
\index{evas\+\_\+render\+\_\+method\+\_\+lookup@{evas\+\_\+render\+\_\+method\+\_\+lookup}!Render Engine Functions@{Render Engine Functions}}
\subsubsection{\texorpdfstring{evas\+\_\+render\+\_\+method\+\_\+lookup()}{evas\_render\_method\_lookup()}}
{\footnotesize\ttfamily int evas\+\_\+render\+\_\+method\+\_\+lookup (\begin{DoxyParamCaption}\item[{const char $\ast$}]{name }\end{DoxyParamCaption})}



Look up a numeric ID from a string name of a rendering engine. 


\begin{DoxyParams}{Parameters}
{\em name} & the name string of an engine \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A numeric (opaque) ID for the rendering engine
\end{DoxyReturn}
This function looks up a numeric return value for the named engine in the string {\ttfamily name}. This is a normal C string, N\+UL byte terminated. The name is case sensitive. If the rendering engine is available, a numeric ID for that engine is returned that is not 0. If the engine is not available, 0 is returned, indicating an invalid engine.

The programmer should N\+E\+V\+ER rely on the numeric ID of an engine unless it is returned by this function. Programs should N\+OT be written accessing render method ID\textquotesingle{}s directly, without first obtaining it from this function.

\begin{DoxyAttention}{Attention}
it is mandatory that one calls \mbox{\hyperlink{group__Evas__Main__Group_ga65b3f060b6dd9e488afd0b8cbe101869}{evas\+\_\+init()}} before looking up the render method.
\end{DoxyAttention}
Example\+: 
\begin{DoxyCode}
\textcolor{keywordtype}{int} engine\_id;
\mbox{\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}} *evas;

\mbox{\hyperlink{group__Evas__Main__Group_ga65b3f060b6dd9e488afd0b8cbe101869}{evas\_init}}();

evas = \mbox{\hyperlink{group__Evas__Canvas_ga67e8eb17d2a676bfdfb8794fc5f72bc0}{evas\_new}}();
\textcolor{keywordflow}{if} (!evas)
  \{
    fprintf(stderr, \textcolor{stringliteral}{"ERROR: Canvas creation failed. Fatal error.\(\backslash\)n"});
    exit(-1);
  \}
engine\_id = \mbox{\hyperlink{group__Evas__Output__Method_ga9f9871fdcc40ce1062d6565308020eb8}{evas\_render\_method\_lookup}}(\textcolor{stringliteral}{"software\_x11"});
\textcolor{keywordflow}{if} (!engine\_id)
  \{
    fprintf(stderr, \textcolor{stringliteral}{"ERROR: Requested rendering engine is absent.\(\backslash\)n"});
    exit(-1);
  \}
\mbox{\hyperlink{group__Evas__Canvas_ga15b85dc673baa6aa40f91f8bfcd3cbaa}{evas\_output\_method\_set}}(evas, engine\_id);
\end{DoxyCode}
 

Referenced by ecore\+\_\+evas\+\_\+ews\+\_\+new().

\mbox{\Hypertarget{group__Evas__Output__Method_gad7deab8facaa4be521fbdec6dd19e122}\label{group__Evas__Output__Method_gad7deab8facaa4be521fbdec6dd19e122}} 
\index{Render Engine Functions@{Render Engine Functions}!evas\+\_\+render\+\_\+method\+\_\+list@{evas\+\_\+render\+\_\+method\+\_\+list}}
\index{evas\+\_\+render\+\_\+method\+\_\+list@{evas\+\_\+render\+\_\+method\+\_\+list}!Render Engine Functions@{Render Engine Functions}}
\subsubsection{\texorpdfstring{evas\+\_\+render\+\_\+method\+\_\+list()}{evas\_render\_method\_list()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__List__Group_ga3295e1210efea1fb0fd6acbf3cbc1f29}{Eina\+\_\+\+List}}$\ast$ evas\+\_\+render\+\_\+method\+\_\+list (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



List all the rendering engines compiled into the copy of the Evas library. 

\begin{DoxyReturn}{Returns}
A linked list whose data members are C strings of engine names
\end{DoxyReturn}
Calling this will return a handle (pointer) to an Evas linked list. Each node in the linked list will have the data pointer be a (char $\ast$) pointer to the name string of the rendering engine available. The strings should never be modified, neither should the list be modified. This list should be cleaned up as soon as the program no longer needs it using \mbox{\hyperlink{group__Evas__Output__Method_ga5bcc5a2165647f855c389bd58e77f608}{evas\+\_\+render\+\_\+method\+\_\+list\+\_\+free()}}. If no engines are available from Evas, {\ttfamily N\+U\+LL} will be returned.

Example\+: 
\begin{DoxyCode}
\mbox{\hyperlink{struct__Eina__List}{Eina\_List}} *engine\_list, *l;
\textcolor{keywordtype}{char} *engine\_name;

engine\_list = \mbox{\hyperlink{group__Evas__Output__Method_gad7deab8facaa4be521fbdec6dd19e122}{evas\_render\_method\_list}}();
\textcolor{keywordflow}{if} (!engine\_list)
  \{
    fprintf(stderr, \textcolor{stringliteral}{"ERROR: Evas supports no engines! Exit.\(\backslash\)n"});
    exit(-1);
  \}
printf(\textcolor{stringliteral}{"Available Evas Engines:\(\backslash\)n"});
\mbox{\hyperlink{group__Eina__List__Group_gac6efafc19f526d916cdb9757240a8773}{EINA\_LIST\_FOREACH}}(engine\_list, l, engine\_name)
  printf(\textcolor{stringliteral}{"%s\(\backslash\)n"}, engine\_name);
\mbox{\hyperlink{group__Evas__Output__Method_ga5bcc5a2165647f855c389bd58e77f608}{evas\_render\_method\_list\_free}}(engine\_list);
\end{DoxyCode}
 \mbox{\Hypertarget{group__Evas__Output__Method_ga5bcc5a2165647f855c389bd58e77f608}\label{group__Evas__Output__Method_ga5bcc5a2165647f855c389bd58e77f608}} 
\index{Render Engine Functions@{Render Engine Functions}!evas\+\_\+render\+\_\+method\+\_\+list\+\_\+free@{evas\+\_\+render\+\_\+method\+\_\+list\+\_\+free}}
\index{evas\+\_\+render\+\_\+method\+\_\+list\+\_\+free@{evas\+\_\+render\+\_\+method\+\_\+list\+\_\+free}!Render Engine Functions@{Render Engine Functions}}
\subsubsection{\texorpdfstring{evas\+\_\+render\+\_\+method\+\_\+list\+\_\+free()}{evas\_render\_method\_list\_free()}}
{\footnotesize\ttfamily void evas\+\_\+render\+\_\+method\+\_\+list\+\_\+free (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__List__Group_ga3295e1210efea1fb0fd6acbf3cbc1f29}{Eina\+\_\+\+List}} $\ast$}]{list }\end{DoxyParamCaption})}



This function should be called to free a list of engine names. 


\begin{DoxyParams}{Parameters}
{\em list} & The Eina\+\_\+\+List base pointer for the engine list to be freed\\
\hline
\end{DoxyParams}
When this function is called it will free the engine list passed in as {\ttfamily list}. The list should only be a list of engines generated by calling \mbox{\hyperlink{group__Evas__Output__Method_gad7deab8facaa4be521fbdec6dd19e122}{evas\+\_\+render\+\_\+method\+\_\+list()}}. If {\ttfamily list} is N\+U\+LL, nothing will happen.

Example\+: 
\begin{DoxyCode}
\mbox{\hyperlink{struct__Eina__List}{Eina\_List}} *engine\_list, *l;
\textcolor{keywordtype}{char} *engine\_name;

engine\_list = \mbox{\hyperlink{group__Evas__Output__Method_gad7deab8facaa4be521fbdec6dd19e122}{evas\_render\_method\_list}}();
\textcolor{keywordflow}{if} (!engine\_list)
  \{
    fprintf(stderr, \textcolor{stringliteral}{"ERROR: Evas supports no engines! Exit.\(\backslash\)n"});
    exit(-1);
  \}
printf(\textcolor{stringliteral}{"Available Evas Engines:\(\backslash\)n"});
\mbox{\hyperlink{group__Eina__List__Group_gac6efafc19f526d916cdb9757240a8773}{EINA\_LIST\_FOREACH}}(engine\_list, l, engine\_name)
  printf(\textcolor{stringliteral}{"%s\(\backslash\)n"}, engine\_name);
\mbox{\hyperlink{group__Evas__Output__Method_ga5bcc5a2165647f855c389bd58e77f608}{evas\_render\_method\_list\_free}}(engine\_list);
\end{DoxyCode}
 

References E\+I\+N\+A\+\_\+\+L\+I\+S\+T\+\_\+\+F\+R\+EE, and eina\+\_\+stringshare\+\_\+del().

