\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}
\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 $\ast$obj, const char $\ast$key, const void $\ast$data)}{evas_object_data_set(Evas_Object *obj, const char *key, const void *data)}}]{\setlength{\rightskip}{0pt plus 5cm}void evas\+\_\+object\+\_\+data\+\_\+set (
\begin{DoxyParamCaption}
\item[{{\bf Evas\+\_\+\+Object} $\ast$}]{obj, }
\item[{const char $\ast$}]{key, }
\item[{const void $\ast$}]{data}
\end{DoxyParamCaption}
)}\hypertarget{group__Evas__Object__Group__Extras_ga70134a7068c9bff4107a761abe0a2ad4}{}\label{group__Evas__Object__Group__Extras_ga70134a7068c9bff4107a761abe0a2ad4}


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}
1 int *my\_data;
2 extern Evas\_Object *obj;
3 
4 my\_data = malloc(500);
5 evas\_object\_data\_set(obj, "name\_of\_data", my\_data);
6 printf("The data that was attached was %p\(\backslash\)n", evas\_object\_data\_get(obj, "name\_of\_data"));
\end{DoxyCode}
 

Referenced by ecore\+\_\+evas\+\_\+ews\+\_\+new(), ecore\+\_\+evas\+\_\+object\+\_\+image\+\_\+new(), edje\+\_\+box\+\_\+layout\+\_\+register(), edje\+\_\+evas\+\_\+global\+\_\+perspective\+\_\+get(), edje\+\_\+external\+\_\+type\+\_\+get(), edje\+\_\+file\+\_\+data\+\_\+get(), and edje\+\_\+perspective\+\_\+new().

\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(const Evas\+\_\+\+Object $\ast$obj, const char $\ast$key)}{evas_object_data_get(const Evas_Object *obj, const char *key)}}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ evas\+\_\+object\+\_\+data\+\_\+get (
\begin{DoxyParamCaption}
\item[{const {\bf Evas\+\_\+\+Object} $\ast$}]{obj, }
\item[{const char $\ast$}]{key}
\end{DoxyParamCaption}
)}\hypertarget{group__Evas__Object__Group__Extras_gafbad43015793eda4ae50202c0ce0e652}{}\label{group__Evas__Object__Group__Extras_gafbad43015793eda4ae50202c0ce0e652}


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}
1 int *my\_data;
2 extern Evas\_Object *obj;
3 
4 my\_data = evas\_object\_data\_get(obj, "name\_of\_my\_data");
5 if (my\_data) printf("Data stored was %p\(\backslash\)n", my\_data);
6 else printf("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\+\_\+buffer\+\_\+ecore\+\_\+evas\+\_\+parent\+\_\+get(), 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\+\_\+file\+\_\+data\+\_\+get(), edje\+\_\+mmap\+\_\+size\+\_\+class\+\_\+iterator\+\_\+new(), edje\+\_\+object\+\_\+part\+\_\+object\+\_\+name\+\_\+get(), and edje\+\_\+object\+\_\+signal\+\_\+callback\+\_\+extra\+\_\+data\+\_\+get().

\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 $\ast$obj, const char $\ast$key)}{evas_object_data_del(Evas_Object *obj, const char *key)}}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ evas\+\_\+object\+\_\+data\+\_\+del (
\begin{DoxyParamCaption}
\item[{{\bf Evas\+\_\+\+Object} $\ast$}]{obj, }
\item[{const char $\ast$}]{key}
\end{DoxyParamCaption}
)}\hypertarget{group__Evas__Object__Group__Extras_gabcd8fb64a5133c6be642fd8770c8a5c9}{}\label{group__Evas__Object__Group__Extras_gabcd8fb64a5133c6be642fd8770c8a5c9}


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}
1 int *my\_data;
2 extern Evas\_Object *obj;
3 
4 my\_data = evas\_object\_data\_del(obj, "name\_of\_my\_data");
\end{DoxyCode}
 

Referenced by edje\+\_\+box\+\_\+layout\+\_\+register(), edje\+\_\+edit\+\_\+object\+\_\+add(), and edje\+\_\+evas\+\_\+global\+\_\+perspective\+\_\+get().

