\hypertarget{group__Evas__Object__Group__Extras}{}\section{Extra Object Manipulation}
\label{group__Evas__Object__Group__Extras}\index{Extra Object Manipulation@{Extra Object Manipulation}}


Miscellaneous functions that also apply to any object, but are less used or not implemented by all objects.  


\begin{DoxyCompactItemize}
\item 
void \hyperlink{group__Evas__Object__Group__Extras_ga70134a7068c9bff4107a761abe0a2ad4}{evas\+\_\+object\+\_\+data\+\_\+set} (\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\+\_\+\+Object} $\ast$obj, const char $\ast$key, const void $\ast$data)
\begin{DoxyCompactList}\small\item\em Set an attached data pointer to an object with a given string key. \end{DoxyCompactList}\item 
void $\ast$ \hyperlink{group__Evas__Object__Group__Extras_gafbad43015793eda4ae50202c0ce0e652}{evas\+\_\+object\+\_\+data\+\_\+get} (const \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\+\_\+\+Object} $\ast$obj, const char $\ast$key)
\begin{DoxyCompactList}\small\item\em Return an attached data pointer on an Evas object by its given string key. \end{DoxyCompactList}\item 
void $\ast$ \hyperlink{group__Evas__Object__Group__Extras_gabcd8fb64a5133c6be642fd8770c8a5c9}{evas\+\_\+object\+\_\+data\+\_\+del} (\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\+\_\+\+Object} $\ast$obj, const char $\ast$key)
\begin{DoxyCompactList}\small\item\em Delete an attached data pointer from an object. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Miscellaneous functions that also apply to any object, but are less used or not implemented by all objects. 

Examples on this group of functions can be found \hyperlink{Example_Evas_Stacking}{here} and \hyperlink{Example_Evas_Events}{here}. 

\subsection{Function Documentation}
\hypertarget{group__Evas__Object__Group__Extras_ga70134a7068c9bff4107a761abe0a2ad4}{}\label{group__Evas__Object__Group__Extras_ga70134a7068c9bff4107a761abe0a2ad4} 
\index{Extra Object Manipulation@{Extra Object Manipulation}!evas\+\_\+object\+\_\+data\+\_\+set@{evas\+\_\+object\+\_\+data\+\_\+set}}
\index{evas\+\_\+object\+\_\+data\+\_\+set@{evas\+\_\+object\+\_\+data\+\_\+set}!Extra Object Manipulation@{Extra Object Manipulation}}
\subsubsection{\texorpdfstring{evas\+\_\+object\+\_\+data\+\_\+set()}{evas\_object\_data\_set()}}
{\footnotesize\ttfamily void evas\+\_\+object\+\_\+data\+\_\+set (\begin{DoxyParamCaption}\item[{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\+\_\+\+Object} $\ast$}]{obj,  }\item[{const char $\ast$}]{key,  }\item[{const void $\ast$}]{data }\end{DoxyParamCaption})}



Set an attached data pointer to an object with a given string key. 


\begin{DoxyParams}{Parameters}
{\em obj} & The object to attach the data pointer to \\
\hline
{\em key} & The string key for the data to access it \\
\hline
{\em data} & The pointer to the data to be attached\\
\hline
\end{DoxyParams}
This attaches the pointer {\ttfamily data} to the object {\ttfamily obj}, given the access string {\ttfamily key}. This pointer will stay \char`\"{}hooked\char`\"{} to the object until a new pointer with the same string key is attached with \hyperlink{group__Evas__Object__Group__Extras_ga70134a7068c9bff4107a761abe0a2ad4}{evas\+\_\+object\+\_\+data\+\_\+set()} or it is deleted with \hyperlink{group__Evas__Object__Group__Extras_gabcd8fb64a5133c6be642fd8770c8a5c9}{evas\+\_\+object\+\_\+data\+\_\+del()}. On deletion of the object {\ttfamily obj}, the pointers will not be accessible from the object anymore.

You can find the pointer attached under a string key using \hyperlink{group__Evas__Object__Group__Extras_gafbad43015793eda4ae50202c0ce0e652}{evas\+\_\+object\+\_\+data\+\_\+get()}. It is the job of the calling application to free any data pointed to by {\ttfamily data} when it is no longer required.

If {\ttfamily data} is {\ttfamily N\+U\+LL}, the old value stored at {\ttfamily key} will be removed but no new value will be stored. This is synonymous with calling \hyperlink{group__Evas__Object__Group__Extras_gabcd8fb64a5133c6be642fd8770c8a5c9}{evas\+\_\+object\+\_\+data\+\_\+del()} with {\ttfamily obj} and {\ttfamily key}.

\begin{DoxyNote}{Note}
This function is very handy when you have data associated specifically to an Evas object, being of use only when dealing with it. Than you don\textquotesingle{}t have the burden to a pointer to it elsewhere, using this family of functions.
\end{DoxyNote}
Example\+:


\begin{DoxyCode}
\textcolor{keywordtype}{int} *my\_data;
\textcolor{keyword}{extern} \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *obj;

my\_data = malloc(500);
\hyperlink{group__Evas__Object__Group__Extras_ga70134a7068c9bff4107a761abe0a2ad4}{evas\_object\_data\_set}(obj, \textcolor{stringliteral}{"name\_of\_data"}, my\_data);
printf(\textcolor{stringliteral}{"The data that was attached was %p\(\backslash\)n"}, \hyperlink{group__Evas__Object__Group__Extras_gafbad43015793eda4ae50202c0ce0e652}{evas\_object\_data\_get}(obj, \textcolor{stringliteral}{"name\_of\_data"})
      );
\end{DoxyCode}
 

Referenced by edje\+\_\+external\+\_\+type\+\_\+get(), edje\+\_\+perspective\+\_\+new(), elm\+\_\+access\+\_\+action\+\_\+cb\+\_\+set(), and elm\+\_\+flip\+\_\+perspective\+\_\+set().

\hypertarget{group__Evas__Object__Group__Extras_gafbad43015793eda4ae50202c0ce0e652}{}\label{group__Evas__Object__Group__Extras_gafbad43015793eda4ae50202c0ce0e652} 
\index{Extra Object Manipulation@{Extra Object Manipulation}!evas\+\_\+object\+\_\+data\+\_\+get@{evas\+\_\+object\+\_\+data\+\_\+get}}
\index{evas\+\_\+object\+\_\+data\+\_\+get@{evas\+\_\+object\+\_\+data\+\_\+get}!Extra Object Manipulation@{Extra Object Manipulation}}
\subsubsection{\texorpdfstring{evas\+\_\+object\+\_\+data\+\_\+get()}{evas\_object\_data\_get()}}
{\footnotesize\ttfamily void$\ast$ evas\+\_\+object\+\_\+data\+\_\+get (\begin{DoxyParamCaption}\item[{const \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\+\_\+\+Object} $\ast$}]{obj,  }\item[{const char $\ast$}]{key }\end{DoxyParamCaption})}



Return an attached data pointer on an Evas object by its given string key. 


\begin{DoxyParams}{Parameters}
{\em obj} & The object to which the data was attached \\
\hline
{\em key} & The string key the data was stored under \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The data pointer stored, or {\ttfamily N\+U\+LL} if none was stored
\end{DoxyReturn}
This function will return the data pointer attached to the object {\ttfamily obj}, stored using the string key {\ttfamily key}. If the object is valid and a data pointer was stored under the given key, that pointer will be returned. If this is not the case, {\ttfamily N\+U\+LL} will be returned, signifying an invalid object or a non-\/existent key. It is possible that a {\ttfamily N\+U\+LL} pointer was stored given that key, but this situation is non-\/sensical and thus can be considered an error as well. {\ttfamily N\+U\+LL} pointers are never stored as this is the return value if an error occurs.

Example\+:


\begin{DoxyCode}
\textcolor{keywordtype}{int} *my\_data;
\textcolor{keyword}{extern} \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *obj;

my\_data = \hyperlink{group__Evas__Object__Group__Extras_gafbad43015793eda4ae50202c0ce0e652}{evas\_object\_data\_get}(obj, \textcolor{stringliteral}{"name\_of\_my\_data"});
\textcolor{keywordflow}{if} (my\_data) printf(\textcolor{stringliteral}{"Data stored was %p\(\backslash\)n"}, my\_data);
\textcolor{keywordflow}{else} printf(\textcolor{stringliteral}{"No data was stored on the object\(\backslash\)n"});
\end{DoxyCode}
 \begin{Desc}
\item[Examples\+: ]\par
\hyperlink{ecore_imf_example_8c-example}{ecore\+\_\+imf\+\_\+example.\+c}, \hyperlink{ephysics_logo_8c-example}{ephysics\+\_\+logo.\+c}, \hyperlink{evas-smart-interface_8c-example}{evas-\/smart-\/interface.\+c}, \hyperlink{evas-smart-object_8c-example}{evas-\/smart-\/object.\+c}, \hyperlink{test_camera_8c-example}{test\+\_\+camera.\+c}, \hyperlink{test_camera_track_8c-example}{test\+\_\+camera\+\_\+track.\+c}, \hyperlink{test_delete_8c-example}{test\+\_\+delete.\+c}, and \hyperlink{test_rotating_forever_8c-example}{test\+\_\+rotating\+\_\+forever.\+c}.\end{Desc}


Referenced by ecore\+\_\+evas\+\_\+object\+\_\+ecore\+\_\+evas\+\_\+get(), ecore\+\_\+evas\+\_\+object\+\_\+evas\+\_\+get(), edje\+\_\+box\+\_\+layout\+\_\+register(), edje\+\_\+evas\+\_\+global\+\_\+perspective\+\_\+get(), edje\+\_\+external\+\_\+param\+\_\+type\+\_\+str(), edje\+\_\+external\+\_\+type\+\_\+get(), edje\+\_\+object\+\_\+part\+\_\+object\+\_\+name\+\_\+get(), edje\+\_\+object\+\_\+signal\+\_\+callback\+\_\+extra\+\_\+data\+\_\+get(), elm\+\_\+access\+\_\+action\+\_\+cb\+\_\+set(), elm\+\_\+access\+\_\+object\+\_\+get(), and elm\+\_\+prefs\+\_\+page\+\_\+iface\+\_\+unregister().

\hypertarget{group__Evas__Object__Group__Extras_gabcd8fb64a5133c6be642fd8770c8a5c9}{}\label{group__Evas__Object__Group__Extras_gabcd8fb64a5133c6be642fd8770c8a5c9} 
\index{Extra Object Manipulation@{Extra Object Manipulation}!evas\+\_\+object\+\_\+data\+\_\+del@{evas\+\_\+object\+\_\+data\+\_\+del}}
\index{evas\+\_\+object\+\_\+data\+\_\+del@{evas\+\_\+object\+\_\+data\+\_\+del}!Extra Object Manipulation@{Extra Object Manipulation}}
\subsubsection{\texorpdfstring{evas\+\_\+object\+\_\+data\+\_\+del()}{evas\_object\_data\_del()}}
{\footnotesize\ttfamily void$\ast$ evas\+\_\+object\+\_\+data\+\_\+del (\begin{DoxyParamCaption}\item[{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\+\_\+\+Object} $\ast$}]{obj,  }\item[{const char $\ast$}]{key }\end{DoxyParamCaption})}



Delete an attached data pointer from an object. 


\begin{DoxyParams}{Parameters}
{\em obj} & The object to delete the data pointer from \\
\hline
{\em key} & The string key the data was stored under \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The original data pointer stored at {\ttfamily key} on {\ttfamily obj} 
\end{DoxyReturn}
This will remove the stored data pointer from {\ttfamily obj} stored under {\ttfamily key} and return this same pointer, if actually there was data there, or {\ttfamily N\+U\+LL}, if nothing was stored under that key.

Example\+:


\begin{DoxyCode}
\textcolor{keywordtype}{int} *my\_data;
\textcolor{keyword}{extern} \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *obj;

my\_data = \hyperlink{group__Evas__Object__Group__Extras_gabcd8fb64a5133c6be642fd8770c8a5c9}{evas\_object\_data\_del}(obj, \textcolor{stringliteral}{"name\_of\_my\_data"});
\end{DoxyCode}
 

Referenced by elm\+\_\+prefs\+\_\+page\+\_\+iface\+\_\+unregister().

