\hypertarget{structefl_1_1file}{}\section{efl\+:\+:file Struct Reference}
\label{structefl_1_1file}\index{efl\+::file@{efl\+::file}}


Class file.  


\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{structefl_1_1file_a9cb8126537cac57ccb7e5c5409a1db41}{file} (\hyperlink{group__Eo_ga9f3010a50b61a892d41f4ec2bda73f4c}{Eo} $\ast$eo)
\begin{DoxyCompactList}\small\item\em Eo Constructor. \end{DoxyCompactList}\item 
\hyperlink{structefl_1_1file_a1d9f82c132432f1689a86c1404dda826}{file} (std\+::nullptr\+\_\+t)
\begin{DoxyCompactList}\small\item\em nullptr\+\_\+t Constructor. \end{DoxyCompactList}\item 
\hypertarget{structefl_1_1file_ab212043230d0e612e2729bd4c85dc986}{}\hyperlink{structefl_1_1file_ab212043230d0e612e2729bd4c85dc986}{file} (\hyperlink{structefl_1_1file}{file} const \&other)\label{structefl_1_1file_ab212043230d0e612e2729bd4c85dc986}

\begin{DoxyCompactList}\small\item\em Copy Constructor. \end{DoxyCompactList}\item 
bool \hyperlink{structefl_1_1file_a874b99c9bc553386a1016bdcdb3976c0}{save} (\+::\hyperlink{classefl_1_1eina_1_1basic__string__view}{efl\+::eina\+::string\+\_\+view} file\+\_\+,\+::\hyperlink{classefl_1_1eina_1_1basic__string__view}{efl\+::eina\+::string\+\_\+view} key\+\_\+,\+::\hyperlink{classefl_1_1eina_1_1basic__string__view}{efl\+::eina\+::string\+\_\+view} flags\+\_\+) const 
\begin{DoxyCompactList}\small\item\em Save the given image object\textquotesingle{}s contents to an (image) file. \end{DoxyCompactList}\item 
void \hyperlink{structefl_1_1file_a130cf869a76e2b37d7ca7e44895c0c05}{eject} () const 
\begin{DoxyCompactList}\small\item\em Eject the represented object. \end{DoxyCompactList}\item 
bool \hyperlink{structefl_1_1file_a5a9edf127fd325ea520603ba1a9c7d35}{async\+\_\+wait} () const 
\begin{DoxyCompactList}\small\item\em Block and wait until all asynchronous operations are completed. \end{DoxyCompactList}\item 
void \hyperlink{structefl_1_1file_a883e96d8328642513515a4dedfefec49}{mmap\+\_\+get} (const \hyperlink{group__Eina__File__Group_ga20697123547cbc937c6c9dd845af0403}{Eina\+\_\+\+File} $\ast$$\ast$f\+\_\+, const char $\ast$$\ast$key\+\_\+) const 
\begin{DoxyCompactList}\small\item\em Get the source mmaped file from where an image object must fetch the real image data (it must be an Eina\+\_\+\+File). \end{DoxyCompactList}\item 
bool \hyperlink{structefl_1_1file_a2401a64b812203963e4c541f8d528ec1}{mmap\+\_\+set} (const \hyperlink{group__Eina__File__Group_ga20697123547cbc937c6c9dd845af0403}{Eina\+\_\+\+File} $\ast$f\+\_\+,\+::\hyperlink{classefl_1_1eina_1_1basic__string__view}{efl\+::eina\+::string\+\_\+view} key\+\_\+) const 
\begin{DoxyCompactList}\small\item\em Set the source mmaped file from where an image object must fetch the real image data (it must be an Eina\+\_\+\+File). \end{DoxyCompactList}\item 
void \hyperlink{structefl_1_1file_a2d591b0d3d0295b99f28a6a1d74d8a9b}{file\+\_\+get} (const char $\ast$$\ast$file\+\_\+, const char $\ast$$\ast$key\+\_\+) const 
\begin{DoxyCompactList}\small\item\em Retrieve the source file from where an image object is to fetch the real image data (it may be an Eet file, besides pure image ones). \end{DoxyCompactList}\item 
bool \hyperlink{structefl_1_1file_a2be88c71768efbbf99678a406a79812f}{file\+\_\+set} (\+::\hyperlink{classefl_1_1eina_1_1basic__string__view}{efl\+::eina\+::string\+\_\+view} file\+\_\+,\+::\hyperlink{classefl_1_1eina_1_1basic__string__view}{efl\+::eina\+::string\+\_\+view} key\+\_\+) const 
\begin{DoxyCompactList}\small\item\em Set the source file from where an image object must fetch the real image data (it may be an Eet file, besides pure image ones). \end{DoxyCompactList}\item 
bool \hyperlink{structefl_1_1file_a18cb1fbd08302348f25e382c2c19267d}{async\+\_\+get} () const 
\begin{DoxyCompactList}\small\item\em Retrieves the asynchronous open flag, which will be true only if enabled and supported by the object. \end{DoxyCompactList}\item 
void \hyperlink{structefl_1_1file_a616ddfc5d547cd68848b72293c7afeb5}{async\+\_\+set} (bool async\+\_\+) const 
\begin{DoxyCompactList}\small\item\em If true, file open will happen asynchronously allowing for better performance in some situations. \end{DoxyCompactList}\item 
\hypertarget{structefl_1_1file_ad975603ad375b5e6d94bf27bf4ee2830}{}{\footnotesize template$<$typename F $>$ }\\\+::\hyperlink{structefl_1_1eo_1_1signal__connection}{efl\+::eo\+::signal\+\_\+connection} \hyperlink{structefl_1_1file_ad975603ad375b5e6d94bf27bf4ee2830}{callback\+\_\+async\+\_\+error\+\_\+add} (F \&\&callback\+\_\+,\+::efl\+::eo\+::callback\+\_\+priority priority\+\_\+=\+::efl\+::eo\+::callback\+\_\+priorities\+::default\+\_\+)\label{structefl_1_1file_ad975603ad375b5e6d94bf27bf4ee2830}

\begin{DoxyCompactList}\small\item\em Error occured in asynchronous file operation. \end{DoxyCompactList}\item 
\hypertarget{structefl_1_1file_ad204efe5103d3e5c2bccaad8cb048f41}{}{\footnotesize template$<$typename T $>$ }\\void \hyperlink{structefl_1_1file_ad204efe5103d3e5c2bccaad8cb048f41}{callback\+\_\+async\+\_\+error\+\_\+call} (T $\ast$info)\label{structefl_1_1file_ad204efe5103d3e5c2bccaad8cb048f41}

\begin{DoxyCompactList}\small\item\em Error occured in asynchronous file operation. \end{DoxyCompactList}\item 
\hypertarget{structefl_1_1file_af3168bce1b3f6cf0c14b27b569529cb6}{}{\footnotesize template$<$typename F $>$ }\\\+::\hyperlink{structefl_1_1eo_1_1signal__connection}{efl\+::eo\+::signal\+\_\+connection} \hyperlink{structefl_1_1file_af3168bce1b3f6cf0c14b27b569529cb6}{callback\+\_\+async\+\_\+opened\+\_\+add} (F \&\&callback\+\_\+,\+::efl\+::eo\+::callback\+\_\+priority priority\+\_\+=\+::efl\+::eo\+::callback\+\_\+priorities\+::default\+\_\+)\label{structefl_1_1file_af3168bce1b3f6cf0c14b27b569529cb6}

\begin{DoxyCompactList}\small\item\em The file was successfully opened asynchronously. \end{DoxyCompactList}\item 
\hypertarget{structefl_1_1file_ae7ffa3b7599482b26066df9e79f91a6c}{}{\footnotesize template$<$typename T $>$ }\\void \hyperlink{structefl_1_1file_ae7ffa3b7599482b26066df9e79f91a6c}{callback\+\_\+async\+\_\+opened\+\_\+call} (T $\ast$info)\label{structefl_1_1file_ae7ffa3b7599482b26066df9e79f91a6c}

\begin{DoxyCompactList}\small\item\em The file was successfully opened asynchronously. \end{DoxyCompactList}\end{DoxyCompactItemize}
{\bf }\par
\begin{DoxyCompactItemize}
\item 
\hyperlink{structefl_1_1file_ab1576cbd2f7a69d1b76045217147a02d}{file} (\+::\hyperlink{structefl_1_1eo_1_1parent__type}{efl\+::eo\+::parent\+\_\+type} \+\_\+p)
\begin{DoxyCompactList}\small\item\em Constructs a new \hyperlink{structefl_1_1file}{efl\+::file} object. \end{DoxyCompactList}\end{DoxyCompactItemize}

\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{structefl_1_1file_a03153148bdf444ba57d5fb71f0d88f12}{}static \hyperlink{group__Eo_ga88d29df76a2921aa5478803156d83be5}{Eo\+\_\+\+Class} const $\ast$ {\bfseries \+\_\+eo\+\_\+class} ()\label{structefl_1_1file_a03153148bdf444ba57d5fb71f0d88f12}

\end{DoxyCompactItemize}
\subsection*{Additional Inherited Members}


\subsection{Detailed Description}
Class file. 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{structefl_1_1file_ab1576cbd2f7a69d1b76045217147a02d}{}\index{efl\+::file@{efl\+::file}!file@{file}}
\index{file@{file}!efl\+::file@{efl\+::file}}
\subsubsection[{file}]{\setlength{\rightskip}{0pt plus 5cm}efl\+::file\+::file (
\begin{DoxyParamCaption}
\item[{\+::{\bf efl\+::eo\+::parent\+\_\+type}}]{\+\_\+p}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [explicit]}}\label{structefl_1_1file_ab1576cbd2f7a69d1b76045217147a02d}


Constructs a new \hyperlink{structefl_1_1file}{efl\+::file} object. 

Constructs a new \hyperlink{structefl_1_1file}{efl\+::file} object. If you want this object to be a child of another Eo object, use an efl\+::eo\+::parent expression, like the example.

Example\+: 
\begin{DoxyCode}
\hyperlink{structefl_1_1file}{efl::file} my\_file(\hyperlink{group__Efl__Cxx__API_ga9a67daec890c873d3df9cf33b2ddd187}{efl::eo::parent} = parent\_object);
\end{DoxyCode}


\begin{DoxySeeAlso}{See also}
\hyperlink{structefl_1_1file_a9cb8126537cac57ccb7e5c5409a1db41}{file(\+Eo$\ast$ eo)} 
\end{DoxySeeAlso}
\hypertarget{structefl_1_1file_a9cb8126537cac57ccb7e5c5409a1db41}{}\index{efl\+::file@{efl\+::file}!file@{file}}
\index{file@{file}!efl\+::file@{efl\+::file}}
\subsubsection[{file}]{\setlength{\rightskip}{0pt plus 5cm}efl\+::file\+::file (
\begin{DoxyParamCaption}
\item[{{\bf Eo} $\ast$}]{eo}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [explicit]}}\label{structefl_1_1file_a9cb8126537cac57ccb7e5c5409a1db41}


Eo Constructor. 

Constructs the object from an Eo$\ast$ pointer stealing its ownership.


\begin{DoxyParams}{Parameters}
{\em eo} & The Eo object pointer. \\
\hline
\end{DoxyParams}
\hypertarget{structefl_1_1file_a1d9f82c132432f1689a86c1404dda826}{}\index{efl\+::file@{efl\+::file}!file@{file}}
\index{file@{file}!efl\+::file@{efl\+::file}}
\subsubsection[{file}]{\setlength{\rightskip}{0pt plus 5cm}efl\+::file\+::file (
\begin{DoxyParamCaption}
\item[{std\+::nullptr\+\_\+t}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [explicit]}}\label{structefl_1_1file_a1d9f82c132432f1689a86c1404dda826}


nullptr\+\_\+t Constructor. 

Constructs an empty (null) object. 

\subsection{Member Function Documentation}
\hypertarget{structefl_1_1file_a874b99c9bc553386a1016bdcdb3976c0}{}\index{efl\+::file@{efl\+::file}!save@{save}}
\index{save@{save}!efl\+::file@{efl\+::file}}
\subsubsection[{save}]{\setlength{\rightskip}{0pt plus 5cm}bool efl\+::file\+::save (
\begin{DoxyParamCaption}
\item[{\+::{\bf efl\+::eina\+::string\+\_\+view}}]{file\+\_\+, }
\item[{\+::{\bf efl\+::eina\+::string\+\_\+view}}]{key\+\_\+, }
\item[{\+::{\bf efl\+::eina\+::string\+\_\+view}}]{flags\+\_\+}
\end{DoxyParamCaption}
) const}\label{structefl_1_1file_a874b99c9bc553386a1016bdcdb3976c0}


Save the given image object\textquotesingle{}s contents to an (image) file. 

The extension suffix on {\ttfamily file} will determine which {\bfseries saver module} Evas is to use when saving, thus the final file\textquotesingle{}s format. If the file supports multiple data stored in it (Eet ones), you can specify the key to be used as the index of the image in it.

You can specify some flags when saving the image. Currently acceptable flags are {\ttfamily quality} and {\ttfamily compress}. Eg.\+: {\ttfamily \char`\"{}quality=100 compress=9\char`\"{}} 


\begin{DoxyParams}{Parameters}
{\em file} & The filename to be used to save the image (extension obligatory). \\
\hline
{\em key} & The image key in the file (if an Eet one), or {\ttfamily N\+U\+L\+L}, otherwise. \\
\hline
{\em flags} & String containing the flags to be used ({\ttfamily N\+U\+L\+L} for none). \\
\hline
\end{DoxyParams}
\hypertarget{structefl_1_1file_a130cf869a76e2b37d7ca7e44895c0c05}{}\index{efl\+::file@{efl\+::file}!eject@{eject}}
\index{eject@{eject}!efl\+::file@{efl\+::file}}
\subsubsection[{eject}]{\setlength{\rightskip}{0pt plus 5cm}void efl\+::file\+::eject (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}\label{structefl_1_1file_a130cf869a76e2b37d7ca7e44895c0c05}


Eject the represented object. 

Get rid of and clean the pointed resource. \hypertarget{structefl_1_1file_a5a9edf127fd325ea520603ba1a9c7d35}{}\index{efl\+::file@{efl\+::file}!async\+\_\+wait@{async\+\_\+wait}}
\index{async\+\_\+wait@{async\+\_\+wait}!efl\+::file@{efl\+::file}}
\subsubsection[{async\+\_\+wait}]{\setlength{\rightskip}{0pt plus 5cm}bool efl\+::file\+::async\+\_\+wait (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}\label{structefl_1_1file_a5a9edf127fd325ea520603ba1a9c7d35}


Block and wait until all asynchronous operations are completed. 

Unless the async flag was set on this object, this method has no effect.

Returns false if an error occured. \hypertarget{structefl_1_1file_a883e96d8328642513515a4dedfefec49}{}\index{efl\+::file@{efl\+::file}!mmap\+\_\+get@{mmap\+\_\+get}}
\index{mmap\+\_\+get@{mmap\+\_\+get}!efl\+::file@{efl\+::file}}
\subsubsection[{mmap\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}void efl\+::file\+::mmap\+\_\+get (
\begin{DoxyParamCaption}
\item[{const {\bf Eina\+\_\+\+File} $\ast$$\ast$}]{f\+\_\+, }
\item[{const char $\ast$$\ast$}]{key\+\_\+}
\end{DoxyParamCaption}
) const}\label{structefl_1_1file_a883e96d8328642513515a4dedfefec49}


Get the source mmaped file from where an image object must fetch the real image data (it must be an Eina\+\_\+\+File). 

If the file supports multiple data stored in it (as Eet files do), you can get the key to be used as the index of the image in this file.

\begin{DoxySince}{Since}
1.\+10
\end{DoxySince}

\begin{DoxyParams}{Parameters}
{\em f} & The mmaped file \\
\hline
{\em key} & The image key in {\ttfamily file} (if its an Eet one), or {\ttfamily N\+U\+L\+L}, otherwise. \\
\hline
\end{DoxyParams}
\hypertarget{structefl_1_1file_a2401a64b812203963e4c541f8d528ec1}{}\index{efl\+::file@{efl\+::file}!mmap\+\_\+set@{mmap\+\_\+set}}
\index{mmap\+\_\+set@{mmap\+\_\+set}!efl\+::file@{efl\+::file}}
\subsubsection[{mmap\+\_\+set}]{\setlength{\rightskip}{0pt plus 5cm}bool efl\+::file\+::mmap\+\_\+set (
\begin{DoxyParamCaption}
\item[{const {\bf Eina\+\_\+\+File} $\ast$}]{f\+\_\+, }
\item[{\+::{\bf efl\+::eina\+::string\+\_\+view}}]{key\+\_\+}
\end{DoxyParamCaption}
) const}\label{structefl_1_1file_a2401a64b812203963e4c541f8d528ec1}


Set the source mmaped file from where an image object must fetch the real image data (it must be an Eina\+\_\+\+File). 

If the file supports multiple data stored in it (as Eet files do), you can specify the key to be used as the index of the image in this file.

\begin{DoxySince}{Since}
1.\+8
\end{DoxySince}

\begin{DoxyParams}{Parameters}
{\em f} & The mmaped file \\
\hline
{\em key} & The image key in {\ttfamily file} (if its an Eet one), or {\ttfamily N\+U\+L\+L}, otherwise. \\
\hline
\end{DoxyParams}
\hypertarget{structefl_1_1file_a2d591b0d3d0295b99f28a6a1d74d8a9b}{}\index{efl\+::file@{efl\+::file}!file\+\_\+get@{file\+\_\+get}}
\index{file\+\_\+get@{file\+\_\+get}!efl\+::file@{efl\+::file}}
\subsubsection[{file\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}void efl\+::file\+::file\+\_\+get (
\begin{DoxyParamCaption}
\item[{const char $\ast$$\ast$}]{file\+\_\+, }
\item[{const char $\ast$$\ast$}]{key\+\_\+}
\end{DoxyParamCaption}
) const}\label{structefl_1_1file_a2d591b0d3d0295b99f28a6a1d74d8a9b}


Retrieve the source file from where an image object is to fetch the real image data (it may be an Eet file, besides pure image ones). 

You must {\bfseries not} modify the strings on the returned pointers.

\begin{DoxyNote}{Note}
Use {\ttfamily N\+U\+L\+L} pointers on the file components you\textquotesingle{}re not interested in\+: they\textquotesingle{}ll be ignored by the function.
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em file} & The image file path. \\
\hline
{\em key} & The image key in {\ttfamily file} (if its an Eet one), or {\ttfamily N\+U\+L\+L}, otherwise. \\
\hline
\end{DoxyParams}
\hypertarget{structefl_1_1file_a2be88c71768efbbf99678a406a79812f}{}\index{efl\+::file@{efl\+::file}!file\+\_\+set@{file\+\_\+set}}
\index{file\+\_\+set@{file\+\_\+set}!efl\+::file@{efl\+::file}}
\subsubsection[{file\+\_\+set}]{\setlength{\rightskip}{0pt plus 5cm}bool efl\+::file\+::file\+\_\+set (
\begin{DoxyParamCaption}
\item[{\+::{\bf efl\+::eina\+::string\+\_\+view}}]{file\+\_\+, }
\item[{\+::{\bf efl\+::eina\+::string\+\_\+view}}]{key\+\_\+}
\end{DoxyParamCaption}
) const}\label{structefl_1_1file_a2be88c71768efbbf99678a406a79812f}


Set the source file from where an image object must fetch the real image data (it may be an Eet file, besides pure image ones). 

If the file supports multiple data stored in it (as Eet files do), you can specify the key to be used as the index of the image in this file.

Example\+: 
\begin{DoxyCode}
img = \hyperlink{group__Evas__Object__Image_gadd901a6b181c38dc040537b3fd76fcc6}{evas\_object\_image\_add}(canvas);
\hyperlink{group__Evas__Object__Image_gac27fd0ceabe5f56607b7a86d71577df1}{evas\_object\_image\_file\_set}(img, \textcolor{stringliteral}{"/path/to/img"}, NULL);
err = evas\_object\_image\_load\_error\_get(img);
\textcolor{keywordflow}{if} (err != EVAS\_LOAD\_ERROR\_NONE)
\{
fprintf(stderr, \textcolor{stringliteral}{"could not load image '%s'. error string is \(\backslash\)"%s\(\backslash\)"\(\backslash\)n"},
valid\_path, \hyperlink{group__Evas__Utils_gaca3384642e5ebb32cfeab24c760c739a}{evas\_load\_error\_str}(err));
\}
\textcolor{keywordflow}{else}
\{
\hyperlink{group__Evas__Object__Image_gaf9a32e36b3446f597baf95aab37e33da}{evas\_object\_image\_fill\_set}(img, 0, 0, w, h);
\hyperlink{group__Evas__Font__Group_ga21e8604c0e4a93e469bff4bd069e82b5}{evas\_object\_resize}(img, w, h);
\hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}(img);
\}
\end{DoxyCode}



\begin{DoxyParams}{Parameters}
{\em file} & The image file path. \\
\hline
{\em key} & The image key in {\ttfamily file} (if its an Eet one), or {\ttfamily N\+U\+L\+L}, otherwise. \\
\hline
\end{DoxyParams}
\hypertarget{structefl_1_1file_a18cb1fbd08302348f25e382c2c19267d}{}\index{efl\+::file@{efl\+::file}!async\+\_\+get@{async\+\_\+get}}
\index{async\+\_\+get@{async\+\_\+get}!efl\+::file@{efl\+::file}}
\subsubsection[{async\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}bool efl\+::file\+::async\+\_\+get (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}\label{structefl_1_1file_a18cb1fbd08302348f25e382c2c19267d}


Retrieves the asynchronous open flag, which will be true only if enabled and supported by the object. 


\begin{DoxyParams}{Parameters}
{\em async} & Flag for asynchronous open. \\
\hline
\end{DoxyParams}
\hypertarget{structefl_1_1file_a616ddfc5d547cd68848b72293c7afeb5}{}\index{efl\+::file@{efl\+::file}!async\+\_\+set@{async\+\_\+set}}
\index{async\+\_\+set@{async\+\_\+set}!efl\+::file@{efl\+::file}}
\subsubsection[{async\+\_\+set}]{\setlength{\rightskip}{0pt plus 5cm}void efl\+::file\+::async\+\_\+set (
\begin{DoxyParamCaption}
\item[{bool}]{async\+\_\+}
\end{DoxyParamCaption}
) const}\label{structefl_1_1file_a616ddfc5d547cd68848b72293c7afeb5}


If true, file open will happen asynchronously allowing for better performance in some situations. 

The file will be opened from a different thread. Classes implementing async open might then block and wait when querying information from the file (eg. image size).

Only a few objects implement this feature, and this flag may be ignored by E\+F\+L. In that case, \hyperlink{group__Eina__Cxx__Value__Group_ga8adbb624faa2bf9e084c3b02ab88c0fd}{get()} will always return false.


\begin{DoxyParams}{Parameters}
{\em async} & Flag for asynchronous open. \\
\hline
\end{DoxyParams}
