\hypertarget{group__Evas__Canvas}{\section{Canvas Functions}
\label{group__Evas__Canvas}\index{Canvas Functions@{Canvas Functions}}
}


Low level Evas canvas functions.  


\subsection*{Modules}
\begin{DoxyCompactItemize}
\item 
\hyperlink{group__Evas__Output__Method}{Render Engine Functions}
\begin{DoxyCompactList}\small\item\em Functions that are used to set the render engine for a given function, and then get that engine working. \end{DoxyCompactList}\item 
\hyperlink{group__Evas__Coord__Mapping__Group}{Coordinate Mapping Functions}
\begin{DoxyCompactList}\small\item\em Functions that are used to map coordinates from the canvas to the screen or the screen to the canvas. \end{DoxyCompactList}\item 
\hyperlink{group__Evas__Output__Size}{Output and Viewport Resizing Functions}
\begin{DoxyCompactList}\small\item\em Functions that set and retrieve the output and viewport size of an evas. \end{DoxyCompactList}\item 
\hyperlink{group__Evas__Canvas__Events}{Canvas Events}
\begin{DoxyCompactList}\small\item\em Functions relating to canvas events, which are mainly reports on its internal states changing (an object got focused, the rendering is updated, etc). \end{DoxyCompactList}\item 
\hyperlink{group__Evas__Image__Group}{Image Functions}
\begin{DoxyCompactList}\small\item\em Functions that deals with images at canvas level. \end{DoxyCompactList}\item 
\hyperlink{group__Evas__Font__Group}{Font Functions}
\begin{DoxyCompactList}\small\item\em Functions that deals with fonts. \end{DoxyCompactList}\item 
\hyperlink{group__Evas__Keys}{Key Input Functions}
\begin{DoxyCompactList}\small\item\em Functions which feed key events to the canvas. \end{DoxyCompactList}\item 
\hyperlink{group__Evas__Touch__Point__List}{Touch Point List Functions}
\begin{DoxyCompactList}\small\item\em Functions to get information of touched points in the Evas. \end{DoxyCompactList}\item 
\hyperlink{group__Evas__GL}{Rendering G\+L on Evas}
\begin{DoxyCompactList}\small\item\em This group discusses the functions that are used to do Open\+G\+L rendering on Evas. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef \hyperlink{group__Eo_ga9f3010a50b61a892d41f4ec2bda73f4c}{Eo} \hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}
\begin{DoxyCompactList}\small\item\em An opaque handle to an Evas canvas. \end{DoxyCompactList}\item 
\hypertarget{group__Evas__Canvas_ga247928fced30bd79d1b294371a44add9}{typedef struct \+\_\+\+Evas\+\_\+\+Public\+\_\+\+Data \hyperlink{group__Evas__Canvas_ga247928fced30bd79d1b294371a44add9}{Evas\+\_\+\+Public\+\_\+\+Data}}\label{group__Evas__Canvas_ga247928fced30bd79d1b294371a44add9}

\begin{DoxyCompactList}\small\item\em Public data for an Evas. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
E\+O\+A\+P\+I void \hyperlink{group__Evas__Canvas_gae1875974f138b909dc9cc67f61ee1b65}{evas\+\_\+canvas\+\_\+data\+\_\+attach\+\_\+set} (void $\ast$data)
\begin{DoxyCompactList}\small\item\em Attaches a specific pointer to the evas for fetching later. \end{DoxyCompactList}\item 
E\+O\+A\+P\+I void $\ast$ \hyperlink{group__Evas__Canvas_gab9d13e05906d862120843e1c65552cbe}{evas\+\_\+canvas\+\_\+data\+\_\+attach\+\_\+get} (void)
\begin{DoxyCompactList}\small\item\em Returns the pointer attached by \hyperlink{group__Evas__Canvas_ga8da56cdad5c50530bed8c7ec3d1e5b79}{evas\+\_\+data\+\_\+attach\+\_\+set()} \end{DoxyCompactList}\item 
E\+O\+A\+P\+I \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Evas__Canvas_ga87e71c81bfbe0739d1486eb4cb2020dd}{evas\+\_\+canvas\+\_\+focus\+\_\+state\+\_\+get} (void)
\begin{DoxyCompactList}\small\item\em Get the focus state known by the given evas. \end{DoxyCompactList}\item 
E\+O\+A\+P\+I \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Evas__Canvas_gabe4ca5c513132773183c84f051d1de70}{evas\+\_\+canvas\+\_\+changed\+\_\+get} (void)
\begin{DoxyCompactList}\small\item\em Get the changed marker for the canvas. \end{DoxyCompactList}\item 
E\+O\+A\+P\+I \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Evas__Canvas_ga8af9a2e7e794affb28012fc87ed83e64}{evas\+\_\+canvas\+\_\+render\+\_\+async} (void)
\begin{DoxyCompactList}\small\item\em Render the given Evas canvas asynchronously. \end{DoxyCompactList}\item 
\hypertarget{group__Evas__Canvas_ga1787789784be2750a5e2dccee90900e5}{E\+O\+A\+P\+I void \hyperlink{group__Evas__Canvas_ga1787789784be2750a5e2dccee90900e5}{evas\+\_\+canvas\+\_\+focus\+\_\+out} (void)}\label{group__Evas__Canvas_ga1787789784be2750a5e2dccee90900e5}

\begin{DoxyCompactList}\small\item\em Inform to the evas that it lost the focus. \end{DoxyCompactList}\item 
E\+O\+A\+P\+I void \hyperlink{group__Evas__Canvas_gab75f4b9722fc00dc3a585d4ea428f3c9}{evas\+\_\+canvas\+\_\+norender} (void)
\begin{DoxyCompactList}\small\item\em Update the canvas internal objects but not triggering immediate renderization. \end{DoxyCompactList}\item 
E\+O\+A\+P\+I void \hyperlink{group__Evas__Canvas_gab3e34cf2980b7cddffb42baae5924a87}{evas\+\_\+canvas\+\_\+nochange\+\_\+pop} (void)
\begin{DoxyCompactList}\small\item\em Pop the nochange flag down 1. \end{DoxyCompactList}\item 
E\+O\+A\+P\+I void \hyperlink{group__Evas__Canvas_ga83de8a5a92a33ab91d85ffe309ee6e06}{evas\+\_\+canvas\+\_\+nochange\+\_\+push} (void)
\begin{DoxyCompactList}\small\item\em Push the nochange flag up 1. \end{DoxyCompactList}\item 
E\+O\+A\+P\+I void \hyperlink{group__Evas__Canvas_gaa2f2cd178533fb27c5ef8153edce47e0}{evas\+\_\+canvas\+\_\+damage\+\_\+rectangle\+\_\+add} (int x, int y, int w, int h)
\begin{DoxyCompactList}\small\item\em Add a damage rectangle. \end{DoxyCompactList}\item 
E\+O\+A\+P\+I \hyperlink{group__Eina__List__Group_ga3295e1210efea1fb0fd6acbf3cbc1f29}{Eina\+\_\+\+List} $\ast$ \hyperlink{group__Evas__Canvas_gac3811227836cd31b8182ae820465de6b}{evas\+\_\+canvas\+\_\+render\+\_\+updates} (void)
\begin{DoxyCompactList}\small\item\em Force immediate renderization of the given Evas canvas. \end{DoxyCompactList}\item 
\hypertarget{group__Evas__Canvas_gaf128f652aaadaac131a669a16f3a2db5}{E\+O\+A\+P\+I void \hyperlink{group__Evas__Canvas_gaf128f652aaadaac131a669a16f3a2db5}{evas\+\_\+canvas\+\_\+focus\+\_\+in} (void)}\label{group__Evas__Canvas_gaf128f652aaadaac131a669a16f3a2db5}

\begin{DoxyCompactList}\small\item\em Inform to the evas that it got the focus. \end{DoxyCompactList}\item 
E\+O\+A\+P\+I void \hyperlink{group__Evas__Canvas_ga5fe9087587f296c453ffdac120b1dd58}{evas\+\_\+canvas\+\_\+obscured\+\_\+rectangle\+\_\+add} (int x, int y, int w, int h)
\begin{DoxyCompactList}\small\item\em Add an \char`\"{}obscured region\char`\"{} to an Evas canvas. \end{DoxyCompactList}\item 
E\+O\+A\+P\+I void \hyperlink{group__Evas__Canvas_gac56db8332eb12e269e17fb4777942a96}{evas\+\_\+canvas\+\_\+render\+\_\+dump} (void)
\begin{DoxyCompactList}\small\item\em Make the canvas discard as much data as possible used by the engine at runtime. \end{DoxyCompactList}\item 
\hypertarget{group__Evas__Canvas_ga13b3f65ea7fdc72afffe458086d9b937}{E\+O\+A\+P\+I void \hyperlink{group__Evas__Canvas_ga13b3f65ea7fdc72afffe458086d9b937}{evas\+\_\+canvas\+\_\+render} (void)}\label{group__Evas__Canvas_ga13b3f65ea7fdc72afffe458086d9b937}

\begin{DoxyCompactList}\small\item\em Force renderization of the given canvas. \end{DoxyCompactList}\item 
E\+O\+A\+P\+I void \hyperlink{group__Evas__Canvas_ga59b682d71416471d40fc0ae6c50398c5}{evas\+\_\+canvas\+\_\+obscured\+\_\+clear} (void)
\begin{DoxyCompactList}\small\item\em Remove all \char`\"{}obscured regions\char`\"{} from an Evas canvas. \end{DoxyCompactList}\item 
E\+O\+A\+P\+I void \hyperlink{group__Evas__Canvas_gab47f6ae3a9467ada404b4c33beae3c67}{evas\+\_\+canvas\+\_\+render\+\_\+idle\+\_\+flush} (void)
\begin{DoxyCompactList}\small\item\em Make the canvas discard internally cached data used for rendering. \end{DoxyCompactList}\item 
void $\ast$ \hyperlink{group__Evas__Canvas_gab20293caea46ac9001dd9563e7b09755}{evas\+::canvas\+::data\+\_\+attach\+\_\+get} () const 
\begin{DoxyCompactList}\small\item\em Returns the pointer attached by \hyperlink{group__Evas__Canvas_ga8da56cdad5c50530bed8c7ec3d1e5b79}{evas\+\_\+data\+\_\+attach\+\_\+set()} \end{DoxyCompactList}\item 
void \hyperlink{group__Evas__Canvas_gaedd1670a1ed560150b447777f8381041}{evas\+::canvas\+::data\+\_\+attach\+\_\+set} (void $\ast$data\+\_\+) const 
\begin{DoxyCompactList}\small\item\em Attaches a specific pointer to the evas for fetching later. \end{DoxyCompactList}\item 
bool \hyperlink{group__Evas__Canvas_gafa955f0ac2179dafca1372d199533080}{evas\+::canvas\+::focus\+\_\+state\+\_\+get} () const 
\begin{DoxyCompactList}\small\item\em Get the focus state known by the given evas. \end{DoxyCompactList}\item 
bool \hyperlink{group__Evas__Canvas_ga16b031383ef9b6a328cfb825c4b479aa}{evas\+::canvas\+::changed\+\_\+get} () const 
\begin{DoxyCompactList}\small\item\em Get the changed marker for the canvas. \end{DoxyCompactList}\item 
bool \hyperlink{group__Evas__Canvas_ga1fb3cdec979085d4131a828bd8ccc43a}{evas\+::canvas\+::render\+\_\+async} () const 
\begin{DoxyCompactList}\small\item\em Render the given Evas canvas asynchronously. \end{DoxyCompactList}\item 
\hypertarget{group__Evas__Canvas_ga7d3e2219fc472fc4cf8b5c9ae1398d8d}{void \hyperlink{group__Evas__Canvas_ga7d3e2219fc472fc4cf8b5c9ae1398d8d}{evas\+::canvas\+::focus\+\_\+out} () const }\label{group__Evas__Canvas_ga7d3e2219fc472fc4cf8b5c9ae1398d8d}

\begin{DoxyCompactList}\small\item\em Inform to the evas that it lost the focus. \end{DoxyCompactList}\item 
void \hyperlink{group__Evas__Canvas_ga1de2aa3137254dd6e4753b71ba1c9ebd}{evas\+::canvas\+::norender} () const 
\begin{DoxyCompactList}\small\item\em Update the canvas internal objects but not triggering immediate renderization. \end{DoxyCompactList}\item 
void \hyperlink{group__Evas__Canvas_ga6a93d1a6237fdb4b41ad47fc1858a47c}{evas\+::canvas\+::nochange\+\_\+pop} () const 
\begin{DoxyCompactList}\small\item\em Pop the nochange flag down 1. \end{DoxyCompactList}\item 
void \hyperlink{group__Evas__Canvas_ga99022910b20ad9bd7df55aede07bc191}{evas\+::canvas\+::nochange\+\_\+push} () const 
\begin{DoxyCompactList}\small\item\em Push the nochange flag up 1. \end{DoxyCompactList}\item 
void \hyperlink{group__Evas__Canvas_ga84b4da615e979dfd6be3bad29026ba9b}{evas\+::canvas\+::damage\+\_\+rectangle\+\_\+add} (int x\+\_\+, int y\+\_\+, int w\+\_\+, int h\+\_\+) const 
\begin{DoxyCompactList}\small\item\em Add a damage rectangle. \end{DoxyCompactList}\item 
\hyperlink{classefl_1_1eina_1_1list}{efl\+::eina\+::list}$<$ \hyperlink{group__Eina__Rectangle__Group_gad1f49db9be2cd747f458ebf4718b6228}{Eina\+\_\+\+Rectangle} $\ast$ $>$ \hyperlink{group__Evas__Canvas_gadc92e6b27d26aa4d3fcd5c1ac3af69a0}{evas\+::canvas\+::render\+\_\+updates} () const 
\begin{DoxyCompactList}\small\item\em Force immediate renderization of the given Evas canvas. \end{DoxyCompactList}\item 
\hypertarget{group__Evas__Canvas_gaf0bfbbb34c3abbc092c1afd2452a5777}{void \hyperlink{group__Evas__Canvas_gaf0bfbbb34c3abbc092c1afd2452a5777}{evas\+::canvas\+::focus\+\_\+in} () const }\label{group__Evas__Canvas_gaf0bfbbb34c3abbc092c1afd2452a5777}

\begin{DoxyCompactList}\small\item\em Inform to the evas that it got the focus. \end{DoxyCompactList}\item 
void \hyperlink{group__Evas__Canvas_ga03c37a80f468c165ad41b09160212c83}{evas\+::canvas\+::obscured\+\_\+rectangle\+\_\+add} (int x\+\_\+, int y\+\_\+, int w\+\_\+, int h\+\_\+) const 
\begin{DoxyCompactList}\small\item\em Add an \char`\"{}obscured region\char`\"{} to an Evas canvas. \end{DoxyCompactList}\item 
void \hyperlink{group__Evas__Canvas_gac2250d84fd71ce2035a6bd0ffbaf3fe0}{evas\+::canvas\+::render\+\_\+dump} () const 
\begin{DoxyCompactList}\small\item\em Make the canvas discard as much data as possible used by the engine at runtime. \end{DoxyCompactList}\item 
\hypertarget{group__Evas__Canvas_ga15a1eb25392d6dc60dc89a19c194f627}{void \hyperlink{group__Evas__Canvas_ga15a1eb25392d6dc60dc89a19c194f627}{evas\+::canvas\+::render} () const }\label{group__Evas__Canvas_ga15a1eb25392d6dc60dc89a19c194f627}

\begin{DoxyCompactList}\small\item\em Force renderization of the given canvas. \end{DoxyCompactList}\item 
void \hyperlink{group__Evas__Canvas_ga3a667a566a3cdb2c3c7bc289d090d0b0}{evas\+::canvas\+::obscured\+\_\+clear} () const 
\begin{DoxyCompactList}\small\item\em Remove all \char`\"{}obscured regions\char`\"{} from an Evas canvas. \end{DoxyCompactList}\item 
void \hyperlink{group__Evas__Canvas_ga815c1f3ef23510f15dabf133335f8fdd}{evas\+::canvas\+::render\+\_\+idle\+\_\+flush} () const 
\begin{DoxyCompactList}\small\item\em Make the canvas discard internally cached data used for rendering. \end{DoxyCompactList}\item 
void \hyperlink{group__Evas__Canvas_ga8da56cdad5c50530bed8c7ec3d1e5b79}{evas\+\_\+data\+\_\+attach\+\_\+set} (Evas\+\_\+\+Canvas $\ast$obj, void $\ast$data)
\begin{DoxyCompactList}\small\item\em Attaches a specific pointer to the evas for fetching later. \end{DoxyCompactList}\item 
void $\ast$ \hyperlink{group__Evas__Canvas_ga7a56ceb9252814ed598321597243ca66}{evas\+\_\+data\+\_\+attach\+\_\+get} (const Evas\+\_\+\+Canvas $\ast$obj)
\begin{DoxyCompactList}\small\item\em Returns the pointer attached by \hyperlink{group__Evas__Canvas_ga8da56cdad5c50530bed8c7ec3d1e5b79}{evas\+\_\+data\+\_\+attach\+\_\+set()} \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Evas__Canvas_gaac5e46590dae77b274441e3818ec15b5}{evas\+\_\+focus\+\_\+state\+\_\+get} (const Evas\+\_\+\+Canvas $\ast$obj)
\begin{DoxyCompactList}\small\item\em Get the focus state known by the given evas. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Evas__Canvas_ga9eb0746242422003882fd25034a6a26c}{evas\+\_\+changed\+\_\+get} (const Evas\+\_\+\+Canvas $\ast$obj)
\begin{DoxyCompactList}\small\item\em Get the changed marker for the canvas. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Evas__Canvas_ga1aecb06f555c68f67980e04391f8316e}{evas\+\_\+render\+\_\+async} (Evas\+\_\+\+Canvas $\ast$obj)
\begin{DoxyCompactList}\small\item\em Render the given Evas canvas asynchronously. \end{DoxyCompactList}\item 
\hypertarget{group__Evas__Canvas_ga9ce90b23befb40bbfa594c78b2350331}{void \hyperlink{group__Evas__Canvas_ga9ce90b23befb40bbfa594c78b2350331}{evas\+\_\+focus\+\_\+out} (Evas\+\_\+\+Canvas $\ast$obj)}\label{group__Evas__Canvas_ga9ce90b23befb40bbfa594c78b2350331}

\begin{DoxyCompactList}\small\item\em Inform to the evas that it lost the focus. \end{DoxyCompactList}\item 
void \hyperlink{group__Evas__Canvas_ga3c028508af6c0242c05e24f5e7e6700b}{evas\+\_\+norender} (Evas\+\_\+\+Canvas $\ast$obj)
\begin{DoxyCompactList}\small\item\em Update the canvas internal objects but not triggering immediate renderization. \end{DoxyCompactList}\item 
void \hyperlink{group__Evas__Canvas_ga32829e0d40c75ac20be9ab8215ba4d2f}{evas\+\_\+nochange\+\_\+pop} (Evas\+\_\+\+Canvas $\ast$obj)
\begin{DoxyCompactList}\small\item\em Pop the nochange flag down 1. \end{DoxyCompactList}\item 
void \hyperlink{group__Evas__Canvas_ga1e2de0a18d1a88f46377698870e67998}{evas\+\_\+nochange\+\_\+push} (Evas\+\_\+\+Canvas $\ast$obj)
\begin{DoxyCompactList}\small\item\em Push the nochange flag up 1. \end{DoxyCompactList}\item 
void \hyperlink{group__Evas__Canvas_gab1482931249c640efb25453b54950a16}{evas\+\_\+damage\+\_\+rectangle\+\_\+add} (Evas\+\_\+\+Canvas $\ast$obj, int x, int y, int w, int h)
\begin{DoxyCompactList}\small\item\em Add a damage rectangle. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__List__Group_ga3295e1210efea1fb0fd6acbf3cbc1f29}{Eina\+\_\+\+List} $\ast$ \hyperlink{group__Evas__Canvas_ga1867d9f5f97545418598496af93e4c71}{evas\+\_\+render\+\_\+updates} (Evas\+\_\+\+Canvas $\ast$obj)
\begin{DoxyCompactList}\small\item\em Force immediate renderization of the given Evas canvas. \end{DoxyCompactList}\item 
\hypertarget{group__Evas__Canvas_ga5c2312255a25b887aacc031fb2891b8f}{void \hyperlink{group__Evas__Canvas_ga5c2312255a25b887aacc031fb2891b8f}{evas\+\_\+focus\+\_\+in} (Evas\+\_\+\+Canvas $\ast$obj)}\label{group__Evas__Canvas_ga5c2312255a25b887aacc031fb2891b8f}

\begin{DoxyCompactList}\small\item\em Inform to the evas that it got the focus. \end{DoxyCompactList}\item 
void \hyperlink{group__Evas__Canvas_ga163f9df9ba453f2f731c4bea12bb946b}{evas\+\_\+obscured\+\_\+rectangle\+\_\+add} (Evas\+\_\+\+Canvas $\ast$obj, int x, int y, int w, int h)
\begin{DoxyCompactList}\small\item\em Add an \char`\"{}obscured region\char`\"{} to an Evas canvas. \end{DoxyCompactList}\item 
void \hyperlink{group__Evas__Canvas_ga760916b7e7f579b14da134859ed3fc74}{evas\+\_\+render\+\_\+dump} (Evas\+\_\+\+Canvas $\ast$obj)
\begin{DoxyCompactList}\small\item\em Make the canvas discard as much data as possible used by the engine at runtime. \end{DoxyCompactList}\item 
\hypertarget{group__Evas__Canvas_ga8d339d4eb0acfd55b2af686c67783db1}{void \hyperlink{group__Evas__Canvas_ga8d339d4eb0acfd55b2af686c67783db1}{evas\+\_\+render} (Evas\+\_\+\+Canvas $\ast$obj)}\label{group__Evas__Canvas_ga8d339d4eb0acfd55b2af686c67783db1}

\begin{DoxyCompactList}\small\item\em Force renderization of the given canvas. \end{DoxyCompactList}\item 
void \hyperlink{group__Evas__Canvas_ga6bd5caa330850f63f4e9d91271fefc62}{evas\+\_\+obscured\+\_\+clear} (Evas\+\_\+\+Canvas $\ast$obj)
\begin{DoxyCompactList}\small\item\em Remove all \char`\"{}obscured regions\char`\"{} from an Evas canvas. \end{DoxyCompactList}\item 
void \hyperlink{group__Evas__Canvas_ga7df42300bf552be347fc7a1d8dd245d2}{evas\+\_\+render\+\_\+idle\+\_\+flush} (Evas\+\_\+\+Canvas $\ast$obj)
\begin{DoxyCompactList}\small\item\em Make the canvas discard internally cached data used for rendering. \end{DoxyCompactList}\item 
void \hyperlink{group__Evas__Canvas_ga038d98c7c13a86b6ba4de51f8aba3595}{evas\+\_\+render\+\_\+updates\+\_\+free} (\hyperlink{group__Eina__List__Group_ga3295e1210efea1fb0fd6acbf3cbc1f29}{Eina\+\_\+\+List} $\ast$updates)
\begin{DoxyCompactList}\small\item\em Free the rectangles returned by \hyperlink{group__Evas__Canvas_ga1867d9f5f97545418598496af93e4c71}{evas\+\_\+render\+\_\+updates()}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\begin{DoxyCompactItemize}
\item 
\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas} $\ast$ \hyperlink{group__Evas__Canvas_ga67e8eb17d2a676bfdfb8794fc5f72bc0}{evas\+\_\+new} (void)
\begin{DoxyCompactList}\small\item\em Creates a new empty evas. \end{DoxyCompactList}\item 
void \hyperlink{group__Evas__Canvas_gaa0d5d3f1a1e1ffa3b14b09bb374215b4}{evas\+\_\+free} (\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas} $\ast$e)
\begin{DoxyCompactList}\small\item\em Frees the given evas and any objects created on it. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Low level Evas canvas functions. 

Sub groups will present more high level ones, though.

Most of these functions deal with low level Evas actions, like\+: \begin{DoxyItemize}
\item create/destroy raw canvases, not bound to any displaying engine \item tell a canvas i got focused (in a windowing context, for example) \item tell a canvas a region should not be calculated anymore in rendering \item tell a canvas to render its contents, immediately\end{DoxyItemize}
Most users will be using Evas by means of the {\ttfamily Ecore\+\_\+\+Evas} wrapper, which deals with all the above mentioned issues automatically for them. Thus, you'll be looking at this section only if you're building low level stuff.

The groups within present you functions that deal with the canvas directly, too, and not yet with its {\bfseries objects}. They are the functions you need to use at a minimum to get a working canvas.

Some of the functions in this group are exemplified \hyperlink{Example_Evas_Events}{here}. 

\subsection{Typedef Documentation}
\hypertarget{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{\index{Canvas Functions@{Canvas Functions}!Evas@{Evas}}
\index{Evas@{Evas}!Canvas Functions@{Canvas Functions}}
\subsubsection[{Evas}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Evas}}}\label{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}


An opaque handle to an Evas canvas. 

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Evas__Canvas_ga67e8eb17d2a676bfdfb8794fc5f72bc0}{evas\+\_\+new()} 

\hyperlink{group__Evas__Canvas_gaa0d5d3f1a1e1ffa3b14b09bb374215b4}{evas\+\_\+free()} 
\end{DoxySeeAlso}


\subsection{Function Documentation}
\hypertarget{group__Evas__Canvas_gae1875974f138b909dc9cc67f61ee1b65}{\index{Canvas Functions@{Canvas Functions}!evas\+\_\+canvas\+\_\+data\+\_\+attach\+\_\+set@{evas\+\_\+canvas\+\_\+data\+\_\+attach\+\_\+set}}
\index{evas\+\_\+canvas\+\_\+data\+\_\+attach\+\_\+set@{evas\+\_\+canvas\+\_\+data\+\_\+attach\+\_\+set}!Canvas Functions@{Canvas Functions}}
\subsubsection[{evas\+\_\+canvas\+\_\+data\+\_\+attach\+\_\+set}]{\setlength{\rightskip}{0pt plus 5cm}E\+O\+A\+P\+I void evas\+\_\+canvas\+\_\+data\+\_\+attach\+\_\+set (
\begin{DoxyParamCaption}
\item[{void $\ast$}]{data}
\end{DoxyParamCaption}
)}}\label{group__Evas__Canvas_gae1875974f138b909dc9cc67f61ee1b65}


Attaches a specific pointer to the evas for fetching later. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em data} & The pointer to attach \\
\hline
\end{DoxyParams}


Referenced by evas\+::canvas\+::data\+\_\+attach\+\_\+set(), and evas\+\_\+data\+\_\+attach\+\_\+set().

\hypertarget{group__Evas__Canvas_gab9d13e05906d862120843e1c65552cbe}{\index{Canvas Functions@{Canvas Functions}!evas\+\_\+canvas\+\_\+data\+\_\+attach\+\_\+get@{evas\+\_\+canvas\+\_\+data\+\_\+attach\+\_\+get}}
\index{evas\+\_\+canvas\+\_\+data\+\_\+attach\+\_\+get@{evas\+\_\+canvas\+\_\+data\+\_\+attach\+\_\+get}!Canvas Functions@{Canvas Functions}}
\subsubsection[{evas\+\_\+canvas\+\_\+data\+\_\+attach\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}E\+O\+A\+P\+I void$\ast$ evas\+\_\+canvas\+\_\+data\+\_\+attach\+\_\+get (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{group__Evas__Canvas_gab9d13e05906d862120843e1c65552cbe}


Returns the pointer attached by \hyperlink{group__Evas__Canvas_ga8da56cdad5c50530bed8c7ec3d1e5b79}{evas\+\_\+data\+\_\+attach\+\_\+set()} 

\begin{DoxyReturn}{Returns}
The pointer attached 
\end{DoxyReturn}


Referenced by evas\+::canvas\+::data\+\_\+attach\+\_\+get(), and evas\+\_\+data\+\_\+attach\+\_\+get().

\hypertarget{group__Evas__Canvas_ga87e71c81bfbe0739d1486eb4cb2020dd}{\index{Canvas Functions@{Canvas Functions}!evas\+\_\+canvas\+\_\+focus\+\_\+state\+\_\+get@{evas\+\_\+canvas\+\_\+focus\+\_\+state\+\_\+get}}
\index{evas\+\_\+canvas\+\_\+focus\+\_\+state\+\_\+get@{evas\+\_\+canvas\+\_\+focus\+\_\+state\+\_\+get}!Canvas Functions@{Canvas Functions}}
\subsubsection[{evas\+\_\+canvas\+\_\+focus\+\_\+state\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}E\+O\+A\+P\+I {\bf Eina\+\_\+\+Bool} evas\+\_\+canvas\+\_\+focus\+\_\+state\+\_\+get (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{group__Evas__Canvas_ga87e71c81bfbe0739d1486eb4cb2020dd}


Get the focus state known by the given evas. 

\begin{DoxyReturn}{Returns}
{\ttfamily E\+I\+N\+A\+\_\+\+T\+R\+U\+E} if it got the focus, {\ttfamily E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} otherwise. 
\end{DoxyReturn}


Referenced by evas\+\_\+focus\+\_\+state\+\_\+get(), and evas\+::canvas\+::focus\+\_\+state\+\_\+get().

\hypertarget{group__Evas__Canvas_gabe4ca5c513132773183c84f051d1de70}{\index{Canvas Functions@{Canvas Functions}!evas\+\_\+canvas\+\_\+changed\+\_\+get@{evas\+\_\+canvas\+\_\+changed\+\_\+get}}
\index{evas\+\_\+canvas\+\_\+changed\+\_\+get@{evas\+\_\+canvas\+\_\+changed\+\_\+get}!Canvas Functions@{Canvas Functions}}
\subsubsection[{evas\+\_\+canvas\+\_\+changed\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}E\+O\+A\+P\+I {\bf Eina\+\_\+\+Bool} evas\+\_\+canvas\+\_\+changed\+\_\+get (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{group__Evas__Canvas_gabe4ca5c513132773183c84f051d1de70}


Get the changed marker for the canvas. 

\begin{DoxyReturn}{Returns}
{\ttfamily E\+I\+N\+A\+\_\+\+T\+R\+U\+E} if something has been marked as changed, {\ttfamily E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} otherwise.
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+11 
\end{DoxySince}


Referenced by evas\+::canvas\+::changed\+\_\+get(), and evas\+\_\+changed\+\_\+get().

\hypertarget{group__Evas__Canvas_ga8af9a2e7e794affb28012fc87ed83e64}{\index{Canvas Functions@{Canvas Functions}!evas\+\_\+canvas\+\_\+render\+\_\+async@{evas\+\_\+canvas\+\_\+render\+\_\+async}}
\index{evas\+\_\+canvas\+\_\+render\+\_\+async@{evas\+\_\+canvas\+\_\+render\+\_\+async}!Canvas Functions@{Canvas Functions}}
\subsubsection[{evas\+\_\+canvas\+\_\+render\+\_\+async}]{\setlength{\rightskip}{0pt plus 5cm}E\+O\+A\+P\+I {\bf Eina\+\_\+\+Bool} evas\+\_\+canvas\+\_\+render\+\_\+async (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{group__Evas__Canvas_ga8af9a2e7e794affb28012fc87ed83e64}


Render the given Evas canvas asynchronously. 

\begin{DoxyReturn}{Returns}
E\+I\+N\+A\+\_\+\+T\+R\+U\+E if the canvas will render, E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E otherwise.
\end{DoxyReturn}
This function only returns E\+I\+N\+A\+\_\+\+T\+R\+U\+E when a frame will be rendered. If the previous frame is still rendering, E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E will be returned so the users know not to wait for the updates callback and just return to their main loop.

If a {\ttfamily func} callback is given, a list of updated areas will be generated and the function will be called from the main thread after the rendered frame is flushed to the screen. The resulting list should be freed with  \hyperlink{group__Evas__Canvas_ga038d98c7c13a86b6ba4de51f8aba3595}{evas\+\_\+render\+\_\+updates\+\_\+free()}. The list is given in the {\ttfamily event\+\_\+info} parameter of the callback function.

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


Referenced by evas\+\_\+render\+\_\+async(), and evas\+::canvas\+::render\+\_\+async().

\hypertarget{group__Evas__Canvas_gab75f4b9722fc00dc3a585d4ea428f3c9}{\index{Canvas Functions@{Canvas Functions}!evas\+\_\+canvas\+\_\+norender@{evas\+\_\+canvas\+\_\+norender}}
\index{evas\+\_\+canvas\+\_\+norender@{evas\+\_\+canvas\+\_\+norender}!Canvas Functions@{Canvas Functions}}
\subsubsection[{evas\+\_\+canvas\+\_\+norender}]{\setlength{\rightskip}{0pt plus 5cm}E\+O\+A\+P\+I void evas\+\_\+canvas\+\_\+norender (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{group__Evas__Canvas_gab75f4b9722fc00dc3a585d4ea428f3c9}


Update the canvas internal objects but not triggering immediate renderization. 

This function updates the canvas internal objects not triggering renderization. To force renderization function \hyperlink{group__Evas__Canvas_ga8d339d4eb0acfd55b2af686c67783db1}{evas\+\_\+render()} should be used.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Evas__Canvas_ga8d339d4eb0acfd55b2af686c67783db1}{evas\+\_\+render}. 
\end{DoxySeeAlso}


Referenced by evas\+\_\+norender(), and evas\+::canvas\+::norender().

\hypertarget{group__Evas__Canvas_gab3e34cf2980b7cddffb42baae5924a87}{\index{Canvas Functions@{Canvas Functions}!evas\+\_\+canvas\+\_\+nochange\+\_\+pop@{evas\+\_\+canvas\+\_\+nochange\+\_\+pop}}
\index{evas\+\_\+canvas\+\_\+nochange\+\_\+pop@{evas\+\_\+canvas\+\_\+nochange\+\_\+pop}!Canvas Functions@{Canvas Functions}}
\subsubsection[{evas\+\_\+canvas\+\_\+nochange\+\_\+pop}]{\setlength{\rightskip}{0pt plus 5cm}E\+O\+A\+P\+I void evas\+\_\+canvas\+\_\+nochange\+\_\+pop (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{group__Evas__Canvas_gab3e34cf2980b7cddffb42baae5924a87}


Pop the nochange flag down 1. 

This tells evas, that while the nochange flag is greater than 0, do not mark objects as \char`\"{}changed\char`\"{} when making changes. 

Referenced by evas\+\_\+nochange\+\_\+pop(), and evas\+::canvas\+::nochange\+\_\+pop().

\hypertarget{group__Evas__Canvas_ga83de8a5a92a33ab91d85ffe309ee6e06}{\index{Canvas Functions@{Canvas Functions}!evas\+\_\+canvas\+\_\+nochange\+\_\+push@{evas\+\_\+canvas\+\_\+nochange\+\_\+push}}
\index{evas\+\_\+canvas\+\_\+nochange\+\_\+push@{evas\+\_\+canvas\+\_\+nochange\+\_\+push}!Canvas Functions@{Canvas Functions}}
\subsubsection[{evas\+\_\+canvas\+\_\+nochange\+\_\+push}]{\setlength{\rightskip}{0pt plus 5cm}E\+O\+A\+P\+I void evas\+\_\+canvas\+\_\+nochange\+\_\+push (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{group__Evas__Canvas_ga83de8a5a92a33ab91d85ffe309ee6e06}


Push the nochange flag up 1. 

This tells evas, that while the nochange flag is greater than 0, do not mark objects as \char`\"{}changed\char`\"{} when making changes. 

Referenced by evas\+\_\+nochange\+\_\+push(), and evas\+::canvas\+::nochange\+\_\+push().

\hypertarget{group__Evas__Canvas_gaa2f2cd178533fb27c5ef8153edce47e0}{\index{Canvas Functions@{Canvas Functions}!evas\+\_\+canvas\+\_\+damage\+\_\+rectangle\+\_\+add@{evas\+\_\+canvas\+\_\+damage\+\_\+rectangle\+\_\+add}}
\index{evas\+\_\+canvas\+\_\+damage\+\_\+rectangle\+\_\+add@{evas\+\_\+canvas\+\_\+damage\+\_\+rectangle\+\_\+add}!Canvas Functions@{Canvas Functions}}
\subsubsection[{evas\+\_\+canvas\+\_\+damage\+\_\+rectangle\+\_\+add}]{\setlength{\rightskip}{0pt plus 5cm}E\+O\+A\+P\+I void evas\+\_\+canvas\+\_\+damage\+\_\+rectangle\+\_\+add (
\begin{DoxyParamCaption}
\item[{int}]{x, }
\item[{int}]{y, }
\item[{int}]{w, }
\item[{int}]{h}
\end{DoxyParamCaption}
)}}\label{group__Evas__Canvas_gaa2f2cd178533fb27c5ef8153edce47e0}


Add a damage rectangle. 

This is the function by which one tells evas that a part of the canvas has to be repainted.

\begin{DoxyNote}{Note}
All newly created Evas rectangles get the default color values of 255 255 255 255 (opaque white).
\end{DoxyNote}

\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em x} & The rectangle's left position. \\
\hline
\mbox{\tt in}  & {\em y} & The rectangle's top position. \\
\hline
\mbox{\tt in}  & {\em w} & The rectangle's width. \\
\hline
\mbox{\tt in}  & {\em h} & The rectangle's height. \\
\hline
\end{DoxyParams}


Referenced by evas\+::canvas\+::damage\+\_\+rectangle\+\_\+add(), and evas\+\_\+damage\+\_\+rectangle\+\_\+add().

\hypertarget{group__Evas__Canvas_gac3811227836cd31b8182ae820465de6b}{\index{Canvas Functions@{Canvas Functions}!evas\+\_\+canvas\+\_\+render\+\_\+updates@{evas\+\_\+canvas\+\_\+render\+\_\+updates}}
\index{evas\+\_\+canvas\+\_\+render\+\_\+updates@{evas\+\_\+canvas\+\_\+render\+\_\+updates}!Canvas Functions@{Canvas Functions}}
\subsubsection[{evas\+\_\+canvas\+\_\+render\+\_\+updates}]{\setlength{\rightskip}{0pt plus 5cm}E\+O\+A\+P\+I {\bf Eina\+\_\+\+List}$\ast$ evas\+\_\+canvas\+\_\+render\+\_\+updates (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{group__Evas__Canvas_gac3811227836cd31b8182ae820465de6b}


Force immediate renderization of the given Evas canvas. 

\begin{DoxyReturn}{Returns}
A newly allocated list of updated rectangles of the canvas ({\ttfamily Eina.\+Rectangle} structs). Free this list with \hyperlink{group__Evas__Canvas_ga038d98c7c13a86b6ba4de51f8aba3595}{evas\+\_\+render\+\_\+updates\+\_\+free()}.
\end{DoxyReturn}
This function forces an immediate renderization update of the given canvas {\ttfamily e}.

\begin{DoxyNote}{Note}
This is a {\bfseries very low level function}, which most of Evas' users wouldn't care about. One would use it, for example, to grab an Evas' canvas update regions and paint them back, using the canvas' pixmap, on a displaying system working below Evas.

Evas is a stateful canvas. If no operations changing its state took place since the last rendering action, you won't see no changes and this call will be a no-\/op.
\end{DoxyNote}
Example code follows.  
\begin{DoxyCodeInclude}
1   "\(\backslash\)tControl + o - add an obscured rectangle\(\backslash\)n"
2   "\(\backslash\)th - print help\(\backslash\)n";
3 
4 struct test\_data
5 \{
6    Ecore\_Evas  *ee;
7    Evas        *canvas;
8    Evas\_Object *img, *bg;
9    Ecore\_Timer *resize\_timer, *freeze\_timer;
10    Eina\_Bool    obscured, focus;
11 \};
12 
13 static struct test\_data d = \{0\};
14 
15 /* here to keep our example's window size and background image's
16  * size in synchrony */
17 static void
18 \_canvas\_resize\_cb(Ecore\_Evas *ee)
19 \{
20    int w, h;
21 
22    ecore\_evas\_geometry\_get(ee, NULL, NULL, &w, &h);
23    evas\_object\_resize(d.bg, w, h);
24 \}
25 
26 /* called when our rectangle gets focus */
27 static void
28 \_object\_focus\_in\_cb(void *data EINA\_UNUSED,
29                     Evas *e,
30                     void *event\_info)
31 \{
32    fprintf(stdout, "An object got focused: %s\(\backslash\)n",
33            evas\_object\_name\_get(event\_info));
34 
35    fprintf(stdout, "Let's recheck it: %s\(\backslash\)n",
36            evas\_object\_name\_get(evas\_focus\_get(e)));
37 
38    fprintf(stdout, "And again: %s\(\backslash\)n", evas\_object\_focus\_get(event\_info) ?
39            "OK!" : "Oops, something is bad.");
40 \}
41 
42 /* render flush callback */
43 static void
44 \_render\_flush\_cb(void *data EINA\_UNUSED,
45                  Evas *e EINA\_UNUSED,
46                  void *event\_info EINA\_UNUSED)
47 \{
48    fprintf(stdout, "Canvas is about to flush its rendering pipeline!\(\backslash\)n");
49 \}
50 
51 /* put some action in the canvas */
52 static Eina\_Bool
53 \_resize\_cb(void *data EINA\_UNUSED)
54 \{
55    int w, h, cw, ch;
56 
57    evas\_object\_geometry\_get(d.img, NULL, NULL, &w, &h);
58    ecore\_evas\_geometry\_get(d.ee, NULL, NULL, &cw, &ch);
59 
60    if (w < cw)
61      evas\_object\_resize(d.img, cw, ch);
62    else
63      evas\_object\_resize(d.img, cw / 2, ch / 2);
64 
65    return EINA\_TRUE; /* re-issue the timer */
66 \}
67 
68 /* let's have our events back */
69 static Eina\_Bool
70 \_thaw\_cb(void *data EINA\_UNUSED)
71 \{
72    fprintf(stdout, "Canvas was frozen %d times, now thawing.\(\backslash\)n",
73            evas\_event\_freeze\_get(d.canvas));
74    evas\_event\_thaw(d.canvas);
75    return EINA\_FALSE; /* do not re-issue the timer */
76 \}
77 
78 /* mouse enters the object's area */
79 static void
80 \_on\_mouse\_in(void        *data EINA\_UNUSED,
81              Evas        *evas EINA\_UNUSED,
82              Evas\_Object *o EINA\_UNUSED,
83              void        *einfo EINA\_UNUSED)
84 \{
85    fprintf(stdout, "Enlightenment logo has had the mouse in.\(\backslash\)n");
86 \}
87 
88 static void
89 \_on\_mouse\_out(void        *data EINA\_UNUSED,
90               Evas        *evas EINA\_UNUSED,
91               Evas\_Object *o EINA\_UNUSED,
92               void        *einfo EINA\_UNUSED)
93 \{
94    fprintf(stdout, "Enlightenment logo has had the mouse out.\(\backslash\)n");
95 \} /* mouse exits the object's area */
96 
97 /* examine the keys pressed */
98 static void
99 \_on\_keydown(void        *data EINA\_UNUSED,
100             Evas        *evas,
101             Evas\_Object *o EINA\_UNUSED,
102             void        *einfo)
103 \{
104    const Evas\_Modifier *mods;
105    Evas\_Event\_Key\_Down *ev = einfo;
106 
107    fprintf(stdout, "We've got key input: %s\(\backslash\)n", ev->key);
108    fprintf(stdout, "It actually came from %s\(\backslash\)n", d.focus ?
109            "focus" : "key grab");
110 
111    if (strcmp(ev->key, "h") == 0) /* print help */
112      \{
113         fprintf(stdout, commands);
114         return;
115      \}
116 
117    if (strcmp(ev->key, "a") == 0) /* toggle animation timer */
118      \{
119         if (d.resize\_timer != NULL)
120           \{
121              fprintf(stdout, "Stopping animation timer\(\backslash\)n");
122              ecore\_timer\_del(d.resize\_timer);
123              d.resize\_timer = NULL;
124           \}
125         else
126           \{
127              fprintf(stdout, "Re-issuing animation timer\(\backslash\)n");
128              d.resize\_timer = ecore\_timer\_add(2, \_resize\_cb, NULL);
129           \}
130         return;
131      \}
132 
133    if (strcmp(ev->key, "c") == 0) /* cycle between focus and key
134                                        * grabs for key input */
135      \{
136         Eina\_Bool ret;
137         Evas\_Modifier\_Mask mask =
138           evas\_key\_modifier\_mask\_get(d.canvas, "Control");
139 
140         fprintf(stdout, "Switching to %s for key input\(\backslash\)n", d.focus ?
141                 "key grabs" : "focus");
142 
143         if (d.focus)
144           \{
145              evas\_object\_focus\_set(d.bg, EINA\_FALSE);
146              fprintf(stdout, "Focused object is now %s\(\backslash\)n",
147                      evas\_focus\_get(d.canvas) ?
148                      "still valid! Something went wrong." : "none.");
149 
150              ret = evas\_object\_key\_grab(d.bg, "a", 0, 0, EINA\_TRUE);
151              if (!ret)
152                \{
153                   fprintf(stdout, "Something went wrong with key grabs.\(\backslash\)n");
154                   goto c\_end;
155                \}
156              ret = evas\_object\_key\_grab(d.bg, "c", 0, 0, EINA\_TRUE);
157              if (!ret)
158                \{
159                   fprintf(stdout, "Something went wrong with key grabs.\(\backslash\)n");
160                   goto c\_end;
161                \}
162              ret = evas\_object\_key\_grab(d.bg, "d", 0, 0, EINA\_TRUE);
163              if (!ret)
164                \{
165                   fprintf(stdout, "Something went wrong with key grabs.\(\backslash\)n");
166                   goto c\_end;
167                \}
168              ret = evas\_object\_key\_grab(d.bg, "f", 0, 0, EINA\_TRUE);
169              if (!ret)
170                \{
171                   fprintf(stdout, "Something went wrong with key grabs.\(\backslash\)n");
172                   goto c\_end;
173                \}
174              ret = evas\_object\_key\_grab(d.bg, "p", 0, 0, EINA\_TRUE);
175              if (!ret)
176                \{
177                   fprintf(stdout, "Something went wrong with key grabs.\(\backslash\)n");
178                   goto c\_end;
179                \}
180              ret = evas\_object\_key\_grab(d.bg, "o", mask, 0, EINA\_TRUE);
181              if (!ret)
182                \{
183                   fprintf(stdout, "Something went wrong with key grabs.\(\backslash\)n");
184                   goto c\_end;
185                \}
186              ret = evas\_object\_key\_grab(d.bg, "h", 0, 0, EINA\_TRUE);
187              if (!ret)
188                \{
189                   fprintf(stdout, "Something went wrong with key grabs.\(\backslash\)n");
190                   goto c\_end;
191                \}
192           \}
193         else /* got here by key grabs */
194           \{
195              evas\_object\_key\_ungrab(d.bg, "a", 0, 0);
196              evas\_object\_key\_ungrab(d.bg, "c", 0, 0);
197              evas\_object\_key\_ungrab(d.bg, "d", 0, 0);
198              evas\_object\_key\_ungrab(d.bg, "f", 0, 0);
199              evas\_object\_key\_ungrab(d.bg, "p", 0, 0);
200              evas\_object\_key\_ungrab(d.bg, "o", mask, 0);
201              evas\_object\_key\_ungrab(d.bg, "h", 0, 0);
202 
203              evas\_object\_focus\_set(d.bg, EINA\_TRUE);
204           \}
205 
206 c\_end:
207         d.focus = !d.focus;
208 
209         return;
210      \}
211 
212    if (strcmp(ev->key, "d") == 0) /* delete canvas' callbacks */
213      \{
214         fprintf(stdout, "Deleting canvas event callbacks\(\backslash\)n");
215         evas\_event\_callback\_del\_full(evas, EVAS\_CALLBACK\_RENDER\_FLUSH\_PRE,
216                                      \_render\_flush\_cb, NULL);
217         evas\_event\_callback\_del\_full(
218           evas, EVAS\_CALLBACK\_CANVAS\_OBJECT\_FOCUS\_IN,
219           \_object\_focus\_in\_cb, NULL);
220         return;
221      \}
222 
223    if (strcmp(ev->key, "f") == 0) /* freeze input for 3 seconds */
224      \{
225         fprintf(stdout, "Freezing input for 3 seconds\(\backslash\)n");
226         evas\_event\_freeze(evas);
227         d.freeze\_timer = ecore\_timer\_add(3, \_thaw\_cb, NULL);
228         return;
229      \}
230 
231    if (strcmp(ev->key, "p") == 0) /* toggle precise point
232                                        * collision detection */
233      \{
234         Eina\_Bool precise = evas\_object\_precise\_is\_inside\_get(d.img);
235 
236         fprintf(stdout, "Toggling precise point collision detection %s on"
237                         " Enlightenment logo\(\backslash\)n", precise ? "off" : "on");
238         evas\_object\_precise\_is\_inside\_set(d.img, !precise);
239 
240         return;
241      \}
242 
243    mods = evas\_key\_modifier\_get(evas);
244    if (evas\_key\_modifier\_is\_set(mods, "Control") &&
245        (strcmp(ev->key, "o") == 0)) /* add an obscured
246                                         * rectangle to the middle
247                                         * of the canvas */
248      \{
249         fprintf(stdout, "Toggling obscured rectangle on canvas\(\backslash\)n");
250         if (!d.obscured)
251           \{
252              int w, h;
253              evas\_output\_viewport\_get(evas, NULL, NULL, &w, &h);
254              evas\_obscured\_rectangle\_add(evas, w / 4, h / 4, w / 2, h / 2);
255           \}
256         else
257           \{
258              int w, h;
259              Eina\_Rectangle *rect;
260              Eina\_List *updates, *l;
261 
262              evas\_output\_viewport\_get(evas, NULL, NULL, &w, &h);
263              evas\_obscured\_clear(evas);
264 
265              /* we have to flag a damage region here because
266               * evas\_obscured\_clear() doesn't change the canvas'
267               * state. we'd have to wait for an animation step, for
268               * example, to get the result, without it */
269              evas\_damage\_rectangle\_add(evas, 0, 0, w, h);
270 
271              updates = evas\_render\_updates(evas);
272 
273              EINA\_LIST\_FOREACH(updates, l, rect)
274                \{
275                   fprintf(stdout, "Rectangle (%d, %d, %d, %d) on canvas got a"
276                                   " rendering update.\(\backslash\)n", rect->x, rect->y,
277                           rect->w,
278                           rect->h);
279                \}
280              evas\_render\_updates\_free(updates);
281           \}
282         d.obscured = !d.obscured;

\end{DoxyCodeInclude}


See the full \hyperlink{Example_Evas_Events}{example}. 

Referenced by evas\+\_\+render\+\_\+updates(), and evas\+::canvas\+::render\+\_\+updates().

\hypertarget{group__Evas__Canvas_ga5fe9087587f296c453ffdac120b1dd58}{\index{Canvas Functions@{Canvas Functions}!evas\+\_\+canvas\+\_\+obscured\+\_\+rectangle\+\_\+add@{evas\+\_\+canvas\+\_\+obscured\+\_\+rectangle\+\_\+add}}
\index{evas\+\_\+canvas\+\_\+obscured\+\_\+rectangle\+\_\+add@{evas\+\_\+canvas\+\_\+obscured\+\_\+rectangle\+\_\+add}!Canvas Functions@{Canvas Functions}}
\subsubsection[{evas\+\_\+canvas\+\_\+obscured\+\_\+rectangle\+\_\+add}]{\setlength{\rightskip}{0pt plus 5cm}E\+O\+A\+P\+I void evas\+\_\+canvas\+\_\+obscured\+\_\+rectangle\+\_\+add (
\begin{DoxyParamCaption}
\item[{int}]{x, }
\item[{int}]{y, }
\item[{int}]{w, }
\item[{int}]{h}
\end{DoxyParamCaption}
)}}\label{group__Evas__Canvas_ga5fe9087587f296c453ffdac120b1dd58}


Add an \char`\"{}obscured region\char`\"{} to an Evas canvas. 

This is the function by which one tells an Evas canvas that a part of it {\bfseries must not} be repainted. The region must be rectangular and its coordinates inside the canvas viewport are passed in the call. After this call, the region specified won't participate in any form in Evas' calculations and actions during its rendering updates, having its displaying content frozen as it was just after this function took place.

We call it \char`\"{}obscured region\char`\"{} because the most common use case for this rendering (partial) freeze is something else (most probably other canvas) being on top of the specified rectangular region, thus shading it completely from the user's final scene in a display. To avoid unnecessary processing, one should indicate to the obscured canvas not to bother about the non-\/important area.

The majority of users won't have to worry about this function, as they'll be using just one canvas in their applications, with nothing inset or on top of it in any form.

To make this region one that {\bfseries has} to be repainted again, call the function \hyperlink{group__Evas__Canvas_ga6bd5caa330850f63f4e9d91271fefc62}{evas\+\_\+obscured\+\_\+clear()}.

\begin{DoxyNote}{Note}
This is a {\bfseries very low level function}, which most of Evas' users wouldn't care about.

This function does {\bfseries not} flag the canvas as having its state changed. If you want to re-\/render it afterwards expecting new contents, you have to add \char`\"{}damage\char`\"{} regions yourself (see \hyperlink{group__Evas__Canvas_gab1482931249c640efb25453b54950a16}{evas\+\_\+damage\+\_\+rectangle\+\_\+add()}).
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__Evas__Canvas_ga6bd5caa330850f63f4e9d91271fefc62}{evas\+\_\+obscured\+\_\+clear()} 

\hyperlink{group__Evas__Canvas_ga1867d9f5f97545418598496af93e4c71}{evas\+\_\+render\+\_\+updates()}
\end{DoxySeeAlso}
Example code follows.  
\begin{DoxyCodeInclude}
1   "\(\backslash\)tControl + o - add an obscured rectangle\(\backslash\)n"
2   "\(\backslash\)th - print help\(\backslash\)n";
3 
4 struct test\_data
5 \{
6    Ecore\_Evas  *ee;
7    Evas        *canvas;
8    Evas\_Object *img, *bg;
9    Ecore\_Timer *resize\_timer, *freeze\_timer;
10    Eina\_Bool    obscured, focus;
11 \};
12 
13 static struct test\_data d = \{0\};
14 
15 /* here to keep our example's window size and background image's
16  * size in synchrony */
17 static void
18 \_canvas\_resize\_cb(Ecore\_Evas *ee)
19 \{
20    int w, h;
21 
22    ecore\_evas\_geometry\_get(ee, NULL, NULL, &w, &h);
23    evas\_object\_resize(d.bg, w, h);
24 \}
25 
26 /* called when our rectangle gets focus */
27 static void
28 \_object\_focus\_in\_cb(void *data EINA\_UNUSED,
29                     Evas *e,
30                     void *event\_info)
31 \{
32    fprintf(stdout, "An object got focused: %s\(\backslash\)n",
33            evas\_object\_name\_get(event\_info));
34 
35    fprintf(stdout, "Let's recheck it: %s\(\backslash\)n",
36            evas\_object\_name\_get(evas\_focus\_get(e)));
37 
38    fprintf(stdout, "And again: %s\(\backslash\)n", evas\_object\_focus\_get(event\_info) ?
39            "OK!" : "Oops, something is bad.");
40 \}
41 
42 /* render flush callback */
43 static void
44 \_render\_flush\_cb(void *data EINA\_UNUSED,
45                  Evas *e EINA\_UNUSED,
46                  void *event\_info EINA\_UNUSED)
47 \{
48    fprintf(stdout, "Canvas is about to flush its rendering pipeline!\(\backslash\)n");
49 \}
50 
51 /* put some action in the canvas */
52 static Eina\_Bool
53 \_resize\_cb(void *data EINA\_UNUSED)
54 \{
55    int w, h, cw, ch;
56 
57    evas\_object\_geometry\_get(d.img, NULL, NULL, &w, &h);
58    ecore\_evas\_geometry\_get(d.ee, NULL, NULL, &cw, &ch);
59 
60    if (w < cw)
61      evas\_object\_resize(d.img, cw, ch);
62    else
63      evas\_object\_resize(d.img, cw / 2, ch / 2);
64 
65    return EINA\_TRUE; /* re-issue the timer */
66 \}
67 
68 /* let's have our events back */
69 static Eina\_Bool
70 \_thaw\_cb(void *data EINA\_UNUSED)
71 \{
72    fprintf(stdout, "Canvas was frozen %d times, now thawing.\(\backslash\)n",
73            evas\_event\_freeze\_get(d.canvas));
74    evas\_event\_thaw(d.canvas);
75    return EINA\_FALSE; /* do not re-issue the timer */
76 \}
77 
78 /* mouse enters the object's area */
79 static void
80 \_on\_mouse\_in(void        *data EINA\_UNUSED,
81              Evas        *evas EINA\_UNUSED,
82              Evas\_Object *o EINA\_UNUSED,
83              void        *einfo EINA\_UNUSED)
84 \{
85    fprintf(stdout, "Enlightenment logo has had the mouse in.\(\backslash\)n");
86 \}
87 
88 static void
89 \_on\_mouse\_out(void        *data EINA\_UNUSED,
90               Evas        *evas EINA\_UNUSED,
91               Evas\_Object *o EINA\_UNUSED,
92               void        *einfo EINA\_UNUSED)
93 \{
94    fprintf(stdout, "Enlightenment logo has had the mouse out.\(\backslash\)n");
95 \} /* mouse exits the object's area */
96 
97 /* examine the keys pressed */
98 static void
99 \_on\_keydown(void        *data EINA\_UNUSED,
100             Evas        *evas,
101             Evas\_Object *o EINA\_UNUSED,
102             void        *einfo)
103 \{
104    const Evas\_Modifier *mods;
105    Evas\_Event\_Key\_Down *ev = einfo;
106 
107    fprintf(stdout, "We've got key input: %s\(\backslash\)n", ev->key);
108    fprintf(stdout, "It actually came from %s\(\backslash\)n", d.focus ?
109            "focus" : "key grab");
110 
111    if (strcmp(ev->key, "h") == 0) /* print help */
112      \{
113         fprintf(stdout, commands);
114         return;
115      \}
116 
117    if (strcmp(ev->key, "a") == 0) /* toggle animation timer */
118      \{
119         if (d.resize\_timer != NULL)
120           \{
121              fprintf(stdout, "Stopping animation timer\(\backslash\)n");
122              ecore\_timer\_del(d.resize\_timer);
123              d.resize\_timer = NULL;
124           \}
125         else
126           \{
127              fprintf(stdout, "Re-issuing animation timer\(\backslash\)n");
128              d.resize\_timer = ecore\_timer\_add(2, \_resize\_cb, NULL);
129           \}
130         return;
131      \}
132 
133    if (strcmp(ev->key, "c") == 0) /* cycle between focus and key
134                                        * grabs for key input */
135      \{
136         Eina\_Bool ret;
137         Evas\_Modifier\_Mask mask =
138           evas\_key\_modifier\_mask\_get(d.canvas, "Control");
139 
140         fprintf(stdout, "Switching to %s for key input\(\backslash\)n", d.focus ?
141                 "key grabs" : "focus");
142 
143         if (d.focus)
144           \{
145              evas\_object\_focus\_set(d.bg, EINA\_FALSE);
146              fprintf(stdout, "Focused object is now %s\(\backslash\)n",
147                      evas\_focus\_get(d.canvas) ?
148                      "still valid! Something went wrong." : "none.");
149 
150              ret = evas\_object\_key\_grab(d.bg, "a", 0, 0, EINA\_TRUE);
151              if (!ret)
152                \{
153                   fprintf(stdout, "Something went wrong with key grabs.\(\backslash\)n");
154                   goto c\_end;
155                \}
156              ret = evas\_object\_key\_grab(d.bg, "c", 0, 0, EINA\_TRUE);
157              if (!ret)
158                \{
159                   fprintf(stdout, "Something went wrong with key grabs.\(\backslash\)n");
160                   goto c\_end;
161                \}
162              ret = evas\_object\_key\_grab(d.bg, "d", 0, 0, EINA\_TRUE);
163              if (!ret)
164                \{
165                   fprintf(stdout, "Something went wrong with key grabs.\(\backslash\)n");
166                   goto c\_end;
167                \}
168              ret = evas\_object\_key\_grab(d.bg, "f", 0, 0, EINA\_TRUE);
169              if (!ret)
170                \{
171                   fprintf(stdout, "Something went wrong with key grabs.\(\backslash\)n");
172                   goto c\_end;
173                \}
174              ret = evas\_object\_key\_grab(d.bg, "p", 0, 0, EINA\_TRUE);
175              if (!ret)
176                \{
177                   fprintf(stdout, "Something went wrong with key grabs.\(\backslash\)n");
178                   goto c\_end;
179                \}
180              ret = evas\_object\_key\_grab(d.bg, "o", mask, 0, EINA\_TRUE);
181              if (!ret)
182                \{
183                   fprintf(stdout, "Something went wrong with key grabs.\(\backslash\)n");
184                   goto c\_end;
185                \}
186              ret = evas\_object\_key\_grab(d.bg, "h", 0, 0, EINA\_TRUE);
187              if (!ret)
188                \{
189                   fprintf(stdout, "Something went wrong with key grabs.\(\backslash\)n");
190                   goto c\_end;
191                \}
192           \}
193         else /* got here by key grabs */
194           \{
195              evas\_object\_key\_ungrab(d.bg, "a", 0, 0);
196              evas\_object\_key\_ungrab(d.bg, "c", 0, 0);
197              evas\_object\_key\_ungrab(d.bg, "d", 0, 0);
198              evas\_object\_key\_ungrab(d.bg, "f", 0, 0);
199              evas\_object\_key\_ungrab(d.bg, "p", 0, 0);
200              evas\_object\_key\_ungrab(d.bg, "o", mask, 0);
201              evas\_object\_key\_ungrab(d.bg, "h", 0, 0);
202 
203              evas\_object\_focus\_set(d.bg, EINA\_TRUE);
204           \}
205 
206 c\_end:
207         d.focus = !d.focus;
208 
209         return;
210      \}
211 
212    if (strcmp(ev->key, "d") == 0) /* delete canvas' callbacks */
213      \{
214         fprintf(stdout, "Deleting canvas event callbacks\(\backslash\)n");
215         evas\_event\_callback\_del\_full(evas, EVAS\_CALLBACK\_RENDER\_FLUSH\_PRE,
216                                      \_render\_flush\_cb, NULL);
217         evas\_event\_callback\_del\_full(
218           evas, EVAS\_CALLBACK\_CANVAS\_OBJECT\_FOCUS\_IN,
219           \_object\_focus\_in\_cb, NULL);
220         return;
221      \}
222 
223    if (strcmp(ev->key, "f") == 0) /* freeze input for 3 seconds */
224      \{
225         fprintf(stdout, "Freezing input for 3 seconds\(\backslash\)n");
226         evas\_event\_freeze(evas);
227         d.freeze\_timer = ecore\_timer\_add(3, \_thaw\_cb, NULL);
228         return;
229      \}
230 
231    if (strcmp(ev->key, "p") == 0) /* toggle precise point
232                                        * collision detection */
233      \{
234         Eina\_Bool precise = evas\_object\_precise\_is\_inside\_get(d.img);
235 
236         fprintf(stdout, "Toggling precise point collision detection %s on"
237                         " Enlightenment logo\(\backslash\)n", precise ? "off" : "on");
238         evas\_object\_precise\_is\_inside\_set(d.img, !precise);
239 
240         return;
241      \}
242 
243    mods = evas\_key\_modifier\_get(evas);
244    if (evas\_key\_modifier\_is\_set(mods, "Control") &&
245        (strcmp(ev->key, "o") == 0)) /* add an obscured
246                                         * rectangle to the middle
247                                         * of the canvas */
248      \{
249         fprintf(stdout, "Toggling obscured rectangle on canvas\(\backslash\)n");
250         if (!d.obscured)
251           \{
252              int w, h;
253              evas\_output\_viewport\_get(evas, NULL, NULL, &w, &h);
254              evas\_obscured\_rectangle\_add(evas, w / 4, h / 4, w / 2, h / 2);
255           \}
256         else
257           \{
258              int w, h;
259              Eina\_Rectangle *rect;
260              Eina\_List *updates, *l;
261 
262              evas\_output\_viewport\_get(evas, NULL, NULL, &w, &h);
263              evas\_obscured\_clear(evas);

\end{DoxyCodeInclude}


In that example, pressing the \char`\"{}\+Ctrl\char`\"{} and \char`\"{}o\char`\"{} keys will impose or remove an obscured region in the middle of the canvas. You'll get the same contents at the time the key was pressed, if toggling it on, until you toggle it off again (make sure the animation is running on to get the idea better). See the full \hyperlink{Example_Evas_Events}{example}.


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em x} & The rectangle's top left corner's horizontal coordinate. \\
\hline
\mbox{\tt in}  & {\em y} & The rectangle's top left corner's vertical coordinate \\
\hline
\mbox{\tt in}  & {\em w} & The rectangle's width. \\
\hline
\mbox{\tt in}  & {\em h} & The rectangle's height. \\
\hline
\end{DoxyParams}


Referenced by evas\+\_\+obscured\+\_\+rectangle\+\_\+add(), and evas\+::canvas\+::obscured\+\_\+rectangle\+\_\+add().

\hypertarget{group__Evas__Canvas_gac56db8332eb12e269e17fb4777942a96}{\index{Canvas Functions@{Canvas Functions}!evas\+\_\+canvas\+\_\+render\+\_\+dump@{evas\+\_\+canvas\+\_\+render\+\_\+dump}}
\index{evas\+\_\+canvas\+\_\+render\+\_\+dump@{evas\+\_\+canvas\+\_\+render\+\_\+dump}!Canvas Functions@{Canvas Functions}}
\subsubsection[{evas\+\_\+canvas\+\_\+render\+\_\+dump}]{\setlength{\rightskip}{0pt plus 5cm}E\+O\+A\+P\+I void evas\+\_\+canvas\+\_\+render\+\_\+dump (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{group__Evas__Canvas_gac56db8332eb12e269e17fb4777942a96}


Make the canvas discard as much data as possible used by the engine at runtime. 

This function will unload images, delete textures and much more, where possible. You may also want to call \hyperlink{group__Evas__Canvas_ga7df42300bf552be347fc7a1d8dd245d2}{evas\+\_\+render\+\_\+idle\+\_\+flush()} immediately prior to this to perhaps discard a little more, though \hyperlink{group__Evas__Canvas_ga760916b7e7f579b14da134859ed3fc74}{evas\+\_\+render\+\_\+dump()} should implicitly delete most of what \hyperlink{group__Evas__Canvas_ga7df42300bf552be347fc7a1d8dd245d2}{evas\+\_\+render\+\_\+idle\+\_\+flush()} might discard too. 

Referenced by evas\+\_\+render\+\_\+dump(), and evas\+::canvas\+::render\+\_\+dump().

\hypertarget{group__Evas__Canvas_ga59b682d71416471d40fc0ae6c50398c5}{\index{Canvas Functions@{Canvas Functions}!evas\+\_\+canvas\+\_\+obscured\+\_\+clear@{evas\+\_\+canvas\+\_\+obscured\+\_\+clear}}
\index{evas\+\_\+canvas\+\_\+obscured\+\_\+clear@{evas\+\_\+canvas\+\_\+obscured\+\_\+clear}!Canvas Functions@{Canvas Functions}}
\subsubsection[{evas\+\_\+canvas\+\_\+obscured\+\_\+clear}]{\setlength{\rightskip}{0pt plus 5cm}E\+O\+A\+P\+I void evas\+\_\+canvas\+\_\+obscured\+\_\+clear (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{group__Evas__Canvas_ga59b682d71416471d40fc0ae6c50398c5}


Remove all \char`\"{}obscured regions\char`\"{} from an Evas canvas. 

This function removes all the rectangles from the obscured regions list of the canvas {\ttfamily e}. It takes obscured areas added with \hyperlink{group__Evas__Canvas_ga163f9df9ba453f2f731c4bea12bb946b}{evas\+\_\+obscured\+\_\+rectangle\+\_\+add()} and make them again a regions that {\bfseries have} to be repainted on rendering updates.

\begin{DoxyNote}{Note}
This is a {\bfseries very low level function}, which most of Evas' users wouldn't care about.

This function does {\bfseries not} flag the canvas as having its state changed. If you want to re-\/render it afterwards expecting new contents, you have to add \char`\"{}damage\char`\"{} regions yourself (see \hyperlink{group__Evas__Canvas_gab1482931249c640efb25453b54950a16}{evas\+\_\+damage\+\_\+rectangle\+\_\+add()}).
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__Evas__Canvas_ga163f9df9ba453f2f731c4bea12bb946b}{evas\+\_\+obscured\+\_\+rectangle\+\_\+add()} for an example 

\hyperlink{group__Evas__Canvas_ga1867d9f5f97545418598496af93e4c71}{evas\+\_\+render\+\_\+updates()} 
\end{DoxySeeAlso}


Referenced by evas\+\_\+obscured\+\_\+clear(), and evas\+::canvas\+::obscured\+\_\+clear().

\hypertarget{group__Evas__Canvas_gab47f6ae3a9467ada404b4c33beae3c67}{\index{Canvas Functions@{Canvas Functions}!evas\+\_\+canvas\+\_\+render\+\_\+idle\+\_\+flush@{evas\+\_\+canvas\+\_\+render\+\_\+idle\+\_\+flush}}
\index{evas\+\_\+canvas\+\_\+render\+\_\+idle\+\_\+flush@{evas\+\_\+canvas\+\_\+render\+\_\+idle\+\_\+flush}!Canvas Functions@{Canvas Functions}}
\subsubsection[{evas\+\_\+canvas\+\_\+render\+\_\+idle\+\_\+flush}]{\setlength{\rightskip}{0pt plus 5cm}E\+O\+A\+P\+I void evas\+\_\+canvas\+\_\+render\+\_\+idle\+\_\+flush (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{group__Evas__Canvas_gab47f6ae3a9467ada404b4c33beae3c67}


Make the canvas discard internally cached data used for rendering. 

This function flushes the arrays of delete, active and render objects. Other things it may also discard are\+: shared memory segments, temporary scratch buffers, cached data to avoid re-\/compute of that data etc. 

Referenced by evas\+\_\+render\+\_\+idle\+\_\+flush(), and evas\+::canvas\+::render\+\_\+idle\+\_\+flush().

\hypertarget{group__Evas__Canvas_gab20293caea46ac9001dd9563e7b09755}{\index{Canvas Functions@{Canvas Functions}!data\+\_\+attach\+\_\+get@{data\+\_\+attach\+\_\+get}}
\index{data\+\_\+attach\+\_\+get@{data\+\_\+attach\+\_\+get}!Canvas Functions@{Canvas Functions}}
\subsubsection[{data\+\_\+attach\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ evas\+::canvas\+::data\+\_\+attach\+\_\+get (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}}\label{group__Evas__Canvas_gab20293caea46ac9001dd9563e7b09755}


Returns the pointer attached by \hyperlink{group__Evas__Canvas_ga8da56cdad5c50530bed8c7ec3d1e5b79}{evas\+\_\+data\+\_\+attach\+\_\+set()} 

\begin{DoxyReturn}{Returns}
The pointer attached
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em data} & The pointer to attach \\
\hline
\end{DoxyParams}


References efl\+::eo\+::base\+::\+\_\+eo\+\_\+ptr(), and evas\+\_\+canvas\+\_\+data\+\_\+attach\+\_\+get().

\hypertarget{group__Evas__Canvas_gaedd1670a1ed560150b447777f8381041}{\index{Canvas Functions@{Canvas Functions}!data\+\_\+attach\+\_\+set@{data\+\_\+attach\+\_\+set}}
\index{data\+\_\+attach\+\_\+set@{data\+\_\+attach\+\_\+set}!Canvas Functions@{Canvas Functions}}
\subsubsection[{data\+\_\+attach\+\_\+set}]{\setlength{\rightskip}{0pt plus 5cm}void evas\+::canvas\+::data\+\_\+attach\+\_\+set (
\begin{DoxyParamCaption}
\item[{void $\ast$}]{data\+\_\+}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}}\label{group__Evas__Canvas_gaedd1670a1ed560150b447777f8381041}


Attaches a specific pointer to the evas for fetching later. 


\begin{DoxyParams}{Parameters}
{\em data} & The pointer to attach \\
\hline
\end{DoxyParams}


References efl\+::eo\+::base\+::\+\_\+eo\+\_\+ptr(), and evas\+\_\+canvas\+\_\+data\+\_\+attach\+\_\+set().

\hypertarget{group__Evas__Canvas_gafa955f0ac2179dafca1372d199533080}{\index{Canvas Functions@{Canvas Functions}!focus\+\_\+state\+\_\+get@{focus\+\_\+state\+\_\+get}}
\index{focus\+\_\+state\+\_\+get@{focus\+\_\+state\+\_\+get}!Canvas Functions@{Canvas Functions}}
\subsubsection[{focus\+\_\+state\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}bool evas\+::canvas\+::focus\+\_\+state\+\_\+get (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}}\label{group__Evas__Canvas_gafa955f0ac2179dafca1372d199533080}


Get the focus state known by the given evas. 

\begin{DoxyReturn}{Returns}
{\ttfamily E\+I\+N\+A\+\_\+\+T\+R\+U\+E} if it got the focus, {\ttfamily E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} otherwise. 
\end{DoxyReturn}


References efl\+::eo\+::base\+::\+\_\+eo\+\_\+ptr(), and evas\+\_\+canvas\+\_\+focus\+\_\+state\+\_\+get().

\hypertarget{group__Evas__Canvas_ga16b031383ef9b6a328cfb825c4b479aa}{\index{Canvas Functions@{Canvas Functions}!changed\+\_\+get@{changed\+\_\+get}}
\index{changed\+\_\+get@{changed\+\_\+get}!Canvas Functions@{Canvas Functions}}
\subsubsection[{changed\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}bool evas\+::canvas\+::changed\+\_\+get (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}}\label{group__Evas__Canvas_ga16b031383ef9b6a328cfb825c4b479aa}


Get the changed marker for the canvas. 

\begin{DoxyReturn}{Returns}
{\ttfamily E\+I\+N\+A\+\_\+\+T\+R\+U\+E} if something has been marked as changed, {\ttfamily E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} otherwise.
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+11 
\end{DoxySince}


References efl\+::eo\+::base\+::\+\_\+eo\+\_\+ptr(), and evas\+\_\+canvas\+\_\+changed\+\_\+get().

\hypertarget{group__Evas__Canvas_ga1fb3cdec979085d4131a828bd8ccc43a}{\index{Canvas Functions@{Canvas Functions}!render\+\_\+async@{render\+\_\+async}}
\index{render\+\_\+async@{render\+\_\+async}!Canvas Functions@{Canvas Functions}}
\subsubsection[{render\+\_\+async}]{\setlength{\rightskip}{0pt plus 5cm}bool evas\+::canvas\+::render\+\_\+async (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}}\label{group__Evas__Canvas_ga1fb3cdec979085d4131a828bd8ccc43a}


Render the given Evas canvas asynchronously. 

\begin{DoxyReturn}{Returns}
E\+I\+N\+A\+\_\+\+T\+R\+U\+E if the canvas will render, E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E otherwise.
\end{DoxyReturn}
This function only returns E\+I\+N\+A\+\_\+\+T\+R\+U\+E when a frame will be rendered. If the previous frame is still rendering, E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E will be returned so the users know not to wait for the updates callback and just return to their main loop.

If a {\ttfamily func} callback is given, a list of updated areas will be generated and the function will be called from the main thread after the rendered frame is flushed to the screen. The resulting list should be freed with  \hyperlink{group__Evas__Canvas_ga038d98c7c13a86b6ba4de51f8aba3595}{evas\+\_\+render\+\_\+updates\+\_\+free()}. The list is given in the {\ttfamily event\+\_\+info} parameter of the callback function.

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


References efl\+::eo\+::base\+::\+\_\+eo\+\_\+ptr(), and evas\+\_\+canvas\+\_\+render\+\_\+async().

\hypertarget{group__Evas__Canvas_ga1de2aa3137254dd6e4753b71ba1c9ebd}{\index{Canvas Functions@{Canvas Functions}!norender@{norender}}
\index{norender@{norender}!Canvas Functions@{Canvas Functions}}
\subsubsection[{norender}]{\setlength{\rightskip}{0pt plus 5cm}void evas\+::canvas\+::norender (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}}\label{group__Evas__Canvas_ga1de2aa3137254dd6e4753b71ba1c9ebd}


Update the canvas internal objects but not triggering immediate renderization. 

This function updates the canvas internal objects not triggering renderization. To force renderization function \hyperlink{group__Evas__Canvas_ga8d339d4eb0acfd55b2af686c67783db1}{evas\+\_\+render()} should be used.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Evas__Canvas_ga8d339d4eb0acfd55b2af686c67783db1}{evas\+\_\+render}. 
\end{DoxySeeAlso}


References efl\+::eo\+::base\+::\+\_\+eo\+\_\+ptr(), and evas\+\_\+canvas\+\_\+norender().

\hypertarget{group__Evas__Canvas_ga6a93d1a6237fdb4b41ad47fc1858a47c}{\index{Canvas Functions@{Canvas Functions}!nochange\+\_\+pop@{nochange\+\_\+pop}}
\index{nochange\+\_\+pop@{nochange\+\_\+pop}!Canvas Functions@{Canvas Functions}}
\subsubsection[{nochange\+\_\+pop}]{\setlength{\rightskip}{0pt plus 5cm}void evas\+::canvas\+::nochange\+\_\+pop (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}}\label{group__Evas__Canvas_ga6a93d1a6237fdb4b41ad47fc1858a47c}


Pop the nochange flag down 1. 

This tells evas, that while the nochange flag is greater than 0, do not mark objects as \char`\"{}changed\char`\"{} when making changes. 

References efl\+::eo\+::base\+::\+\_\+eo\+\_\+ptr(), and evas\+\_\+canvas\+\_\+nochange\+\_\+pop().

\hypertarget{group__Evas__Canvas_ga99022910b20ad9bd7df55aede07bc191}{\index{Canvas Functions@{Canvas Functions}!nochange\+\_\+push@{nochange\+\_\+push}}
\index{nochange\+\_\+push@{nochange\+\_\+push}!Canvas Functions@{Canvas Functions}}
\subsubsection[{nochange\+\_\+push}]{\setlength{\rightskip}{0pt plus 5cm}void evas\+::canvas\+::nochange\+\_\+push (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}}\label{group__Evas__Canvas_ga99022910b20ad9bd7df55aede07bc191}


Push the nochange flag up 1. 

This tells evas, that while the nochange flag is greater than 0, do not mark objects as \char`\"{}changed\char`\"{} when making changes. 

References efl\+::eo\+::base\+::\+\_\+eo\+\_\+ptr(), and evas\+\_\+canvas\+\_\+nochange\+\_\+push().

\hypertarget{group__Evas__Canvas_ga84b4da615e979dfd6be3bad29026ba9b}{\index{Canvas Functions@{Canvas Functions}!damage\+\_\+rectangle\+\_\+add@{damage\+\_\+rectangle\+\_\+add}}
\index{damage\+\_\+rectangle\+\_\+add@{damage\+\_\+rectangle\+\_\+add}!Canvas Functions@{Canvas Functions}}
\subsubsection[{damage\+\_\+rectangle\+\_\+add}]{\setlength{\rightskip}{0pt plus 5cm}void evas\+::canvas\+::damage\+\_\+rectangle\+\_\+add (
\begin{DoxyParamCaption}
\item[{int}]{x\+\_\+, }
\item[{int}]{y\+\_\+, }
\item[{int}]{w\+\_\+, }
\item[{int}]{h\+\_\+}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}}\label{group__Evas__Canvas_ga84b4da615e979dfd6be3bad29026ba9b}


Add a damage rectangle. 

This is the function by which one tells evas that a part of the canvas has to be repainted.

\begin{DoxyNote}{Note}
All newly created Evas rectangles get the default color values of 255 255 255 255 (opaque white).
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em x} & The rectangle's left position. \\
\hline
{\em y} & The rectangle's top position. \\
\hline
{\em w} & The rectangle's width. \\
\hline
{\em h} & The rectangle's height. \\
\hline
\end{DoxyParams}


References efl\+::eo\+::base\+::\+\_\+eo\+\_\+ptr(), and evas\+\_\+canvas\+\_\+damage\+\_\+rectangle\+\_\+add().

\hypertarget{group__Evas__Canvas_gadc92e6b27d26aa4d3fcd5c1ac3af69a0}{\index{Canvas Functions@{Canvas Functions}!render\+\_\+updates@{render\+\_\+updates}}
\index{render\+\_\+updates@{render\+\_\+updates}!Canvas Functions@{Canvas Functions}}
\subsubsection[{render\+\_\+updates}]{\setlength{\rightskip}{0pt plus 5cm}{\bf efl\+::eina\+::list}$<$ {\bf Eina\+\_\+\+Rectangle} $\ast$ $>$ evas\+::canvas\+::render\+\_\+updates (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}}\label{group__Evas__Canvas_gadc92e6b27d26aa4d3fcd5c1ac3af69a0}


Force immediate renderization of the given Evas canvas. 

\begin{DoxyReturn}{Returns}
A newly allocated list of updated rectangles of the canvas ({\ttfamily Eina.\+Rectangle} structs). Free this list with \hyperlink{group__Evas__Canvas_ga038d98c7c13a86b6ba4de51f8aba3595}{evas\+\_\+render\+\_\+updates\+\_\+free()}.
\end{DoxyReturn}
This function forces an immediate renderization update of the given canvas {\ttfamily e}.

\begin{DoxyNote}{Note}
This is a {\bfseries very low level function}, which most of Evas' users wouldn't care about. One would use it, for example, to grab an Evas' canvas update regions and paint them back, using the canvas' pixmap, on a displaying system working below Evas.

Evas is a stateful canvas. If no operations changing its state took place since the last rendering action, you won't see no changes and this call will be a no-\/op.
\end{DoxyNote}
Example code follows.  
\begin{DoxyCodeInclude}
  \textcolor{stringliteral}{"\(\backslash\)tControl + o - add an obscured rectangle\(\backslash\)n"}
  \textcolor{stringliteral}{"\(\backslash\)th - print help\(\backslash\)n"};

\textcolor{keyword}{struct }test\_data
\{
   Ecore\_Evas  *ee;
   \hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}        *\hyperlink{structevas_1_1canvas_a52d4b8356120c2f33b385145dcca20d4}{canvas};
   \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *img, *bg;
   \hyperlink{group__Ecore__Timer__Group_gaf96ffb609956658ec038e54bd39f46f0}{Ecore\_Timer} *resize\_timer, *freeze\_timer;
   \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}    obscured, focus;
\};

\textcolor{keyword}{static} \textcolor{keyword}{struct }test\_data d = \{0\};

\textcolor{comment}{/* here to keep our example's window size and background image's}
\textcolor{comment}{ * size in synchrony */}
\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_canvas\_resize\_cb(Ecore\_Evas *ee)
\{
   \textcolor{keywordtype}{int} w, h;

   \hyperlink{group__Ecore__Evas__Group_ga931aadf4603731e73e8a84e4b14f1493}{ecore\_evas\_geometry\_get}(ee, NULL, NULL, &w, &h);
   evas\_object\_resize(d.bg, w, h);
\}

\textcolor{comment}{/* called when our rectangle gets focus */}
\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_object\_focus\_in\_cb(\textcolor{keywordtype}{void} *data EINA\_UNUSED,
                    \hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas} *e,
                    \textcolor{keywordtype}{void} *event\_info)
\{
   fprintf(stdout, \textcolor{stringliteral}{"An object got focused: %s\(\backslash\)n"},
           evas\_object\_name\_get(event\_info));

   fprintf(stdout, \textcolor{stringliteral}{"Let's recheck it: %s\(\backslash\)n"},
           evas\_object\_name\_get(\hyperlink{group__Evas__Object__Group__Find_gaf5a6ebc4c45f1297e816ff809e5d7d0c}{evas\_focus\_get}(e)));

   fprintf(stdout, \textcolor{stringliteral}{"And again: %s\(\backslash\)n"}, evas\_object\_focus\_get(event\_info) ?
           \textcolor{stringliteral}{"OK!"} : \textcolor{stringliteral}{"Oops, something is bad."});
\}

\textcolor{comment}{/* render flush callback */}
\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_render\_flush\_cb(\textcolor{keywordtype}{void} *data EINA\_UNUSED,
                 \hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas} *e EINA\_UNUSED,
                 \textcolor{keywordtype}{void} *event\_info EINA\_UNUSED)
\{
   fprintf(stdout, \textcolor{stringliteral}{"Canvas is about to flush its rendering pipeline!\(\backslash\)n"});
\}

\textcolor{comment}{/* put some action in the canvas */}
\textcolor{keyword}{static} \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}
\_resize\_cb(\textcolor{keywordtype}{void} *data EINA\_UNUSED)
\{
   \textcolor{keywordtype}{int} w, h, cw, ch;

   \hyperlink{group__Evas__Object__Group__Basic_ga6f52fab1a96dc58c85ee481d84bac871}{evas\_object\_geometry\_get}(d.img, NULL, NULL, &w, &h);
   \hyperlink{group__Ecore__Evas__Group_ga931aadf4603731e73e8a84e4b14f1493}{ecore\_evas\_geometry\_get}(d.ee, NULL, NULL, &cw, &ch);

   \textcolor{keywordflow}{if} (w < cw)
     evas\_object\_resize(d.img, cw, ch);
   \textcolor{keywordflow}{else}
     evas\_object\_resize(d.img, cw / 2, ch / 2);

   \textcolor{keywordflow}{return} \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}; \textcolor{comment}{/* re-issue the timer */}
\}

\textcolor{comment}{/* let's have our events back */}
\textcolor{keyword}{static} \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}
\_thaw\_cb(\textcolor{keywordtype}{void} *data EINA\_UNUSED)
\{
   fprintf(stdout, \textcolor{stringliteral}{"Canvas was frozen %d times, now thawing.\(\backslash\)n"},
           \hyperlink{group__Evas__Event__Feeding__Group_gaca66af7f9b72ddbd63104d59c1fdf894}{evas\_event\_freeze\_get}(d.canvas));
   \hyperlink{group__Evas__Event__Feeding__Group_ga376918c56c3dc588a059da7fe8629b70}{evas\_event\_thaw}(d.canvas);
   \textcolor{keywordflow}{return} \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}; \textcolor{comment}{/* do not re-issue the timer */}
\}

\textcolor{comment}{/* mouse enters the object's area */}
\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_on\_mouse\_in(\textcolor{keywordtype}{void}        *data EINA\_UNUSED,
             \hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}        *evas EINA\_UNUSED,
             \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *o EINA\_UNUSED,
             \textcolor{keywordtype}{void}        *einfo EINA\_UNUSED)
\{
   fprintf(stdout, \textcolor{stringliteral}{"Enlightenment logo has had the mouse in.\(\backslash\)n"});
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_on\_mouse\_out(\textcolor{keywordtype}{void}        *data EINA\_UNUSED,
              \hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}        *evas EINA\_UNUSED,
              \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *o EINA\_UNUSED,
              \textcolor{keywordtype}{void}        *einfo EINA\_UNUSED)
\{
   fprintf(stdout, \textcolor{stringliteral}{"Enlightenment logo has had the mouse out.\(\backslash\)n"});
\} \textcolor{comment}{/* mouse exits the object's area */}

\textcolor{comment}{/* examine the keys pressed */}
\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_on\_keydown(\textcolor{keywordtype}{void}        *data EINA\_UNUSED,
            \hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}        *evas,
            \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *o EINA\_UNUSED,
            \textcolor{keywordtype}{void}        *einfo)
\{
   \textcolor{keyword}{const} \hyperlink{Evas__Common_8h_a198d0b10861c1da456004688d3443e96}{Evas\_Modifier} *mods;
   \hyperlink{struct__Evas__Event__Key__Down}{Evas\_Event\_Key\_Down} *ev = einfo;

   fprintf(stdout, \textcolor{stringliteral}{"We've got key input: %s\(\backslash\)n"}, ev->\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key});
   fprintf(stdout, \textcolor{stringliteral}{"It actually came from %s\(\backslash\)n"}, d.focus ?
           \textcolor{stringliteral}{"focus"} : \textcolor{stringliteral}{"key grab"});

   \textcolor{keywordflow}{if} (strcmp(ev->\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}, \textcolor{stringliteral}{"h"}) == 0) \textcolor{comment}{/* print help */}
     \{
        fprintf(stdout, commands);
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (strcmp(ev->\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}, \textcolor{stringliteral}{"a"}) == 0) \textcolor{comment}{/* toggle animation timer */}
     \{
        \textcolor{keywordflow}{if} (d.resize\_timer != NULL)
          \{
             fprintf(stdout, \textcolor{stringliteral}{"Stopping animation timer\(\backslash\)n"});
             \hyperlink{group__Ecore__Timer__Group_gaba2b599c7aabe3ab664dc3d47f62a33a}{ecore\_timer\_del}(d.resize\_timer);
             d.resize\_timer = NULL;
          \}
        \textcolor{keywordflow}{else}
          \{
             fprintf(stdout, \textcolor{stringliteral}{"Re-issuing animation timer\(\backslash\)n"});
             d.resize\_timer = ecore\_timer\_add(2, \_resize\_cb, NULL);
          \}
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (strcmp(ev->\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}, \textcolor{stringliteral}{"c"}) == 0) \textcolor{comment}{/* cycle between focus and key}
\textcolor{comment}{                                       * grabs for key input */}
     \{
        \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool} ret;
        \hyperlink{Evas__Common_8h_a111c7333a7d49e44698bd19dd5bc9059}{Evas\_Modifier\_Mask} mask =
          evas\_key\_modifier\_mask\_get(d.canvas, \textcolor{stringliteral}{"Control"});

        fprintf(stdout, \textcolor{stringliteral}{"Switching to %s for key input\(\backslash\)n"}, d.focus ?
                \textcolor{stringliteral}{"key grabs"} : \textcolor{stringliteral}{"focus"});

        \textcolor{keywordflow}{if} (d.focus)
          \{
             evas\_object\_focus\_set(d.bg, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE});
             fprintf(stdout, \textcolor{stringliteral}{"Focused object is now %s\(\backslash\)n"},
                     \hyperlink{group__Evas__Object__Group__Find_gaf5a6ebc4c45f1297e816ff809e5d7d0c}{evas\_focus\_get}(d.canvas) ?
                     \textcolor{stringliteral}{"still valid! Something went wrong."} : \textcolor{stringliteral}{"none."});

             ret = evas\_object\_key\_grab(d.bg, \textcolor{stringliteral}{"a"}, 0, 0, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE});
             \textcolor{keywordflow}{if} (!ret)
               \{
                  fprintf(stdout, \textcolor{stringliteral}{"Something went wrong with key grabs.\(\backslash\)n"});
                  \textcolor{keywordflow}{goto} c\_end;
               \}
             ret = evas\_object\_key\_grab(d.bg, \textcolor{stringliteral}{"c"}, 0, 0, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE});
             \textcolor{keywordflow}{if} (!ret)
               \{
                  fprintf(stdout, \textcolor{stringliteral}{"Something went wrong with key grabs.\(\backslash\)n"});
                  \textcolor{keywordflow}{goto} c\_end;
               \}
             ret = evas\_object\_key\_grab(d.bg, \textcolor{stringliteral}{"d"}, 0, 0, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE});
             \textcolor{keywordflow}{if} (!ret)
               \{
                  fprintf(stdout, \textcolor{stringliteral}{"Something went wrong with key grabs.\(\backslash\)n"});
                  \textcolor{keywordflow}{goto} c\_end;
               \}
             ret = evas\_object\_key\_grab(d.bg, \textcolor{stringliteral}{"f"}, 0, 0, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE});
             \textcolor{keywordflow}{if} (!ret)
               \{
                  fprintf(stdout, \textcolor{stringliteral}{"Something went wrong with key grabs.\(\backslash\)n"});
                  \textcolor{keywordflow}{goto} c\_end;
               \}
             ret = evas\_object\_key\_grab(d.bg, \textcolor{stringliteral}{"p"}, 0, 0, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE});
             \textcolor{keywordflow}{if} (!ret)
               \{
                  fprintf(stdout, \textcolor{stringliteral}{"Something went wrong with key grabs.\(\backslash\)n"});
                  \textcolor{keywordflow}{goto} c\_end;
               \}
             ret = evas\_object\_key\_grab(d.bg, \textcolor{stringliteral}{"o"}, mask, 0, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE});
             \textcolor{keywordflow}{if} (!ret)
               \{
                  fprintf(stdout, \textcolor{stringliteral}{"Something went wrong with key grabs.\(\backslash\)n"});
                  \textcolor{keywordflow}{goto} c\_end;
               \}
             ret = evas\_object\_key\_grab(d.bg, \textcolor{stringliteral}{"h"}, 0, 0, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE});
             \textcolor{keywordflow}{if} (!ret)
               \{
                  fprintf(stdout, \textcolor{stringliteral}{"Something went wrong with key grabs.\(\backslash\)n"});
                  \textcolor{keywordflow}{goto} c\_end;
               \}
          \}
        \textcolor{keywordflow}{else} \textcolor{comment}{/* got here by key grabs */}
          \{
             evas\_object\_key\_ungrab(d.bg, \textcolor{stringliteral}{"a"}, 0, 0);
             evas\_object\_key\_ungrab(d.bg, \textcolor{stringliteral}{"c"}, 0, 0);
             evas\_object\_key\_ungrab(d.bg, \textcolor{stringliteral}{"d"}, 0, 0);
             evas\_object\_key\_ungrab(d.bg, \textcolor{stringliteral}{"f"}, 0, 0);
             evas\_object\_key\_ungrab(d.bg, \textcolor{stringliteral}{"p"}, 0, 0);
             evas\_object\_key\_ungrab(d.bg, \textcolor{stringliteral}{"o"}, mask, 0);
             evas\_object\_key\_ungrab(d.bg, \textcolor{stringliteral}{"h"}, 0, 0);

             evas\_object\_focus\_set(d.bg, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE});
          \}

c\_end:
        d.focus = !d.focus;

        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (strcmp(ev->\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}, \textcolor{stringliteral}{"d"}) == 0) \textcolor{comment}{/* delete canvas' callbacks */}
     \{
        fprintf(stdout, \textcolor{stringliteral}{"Deleting canvas event callbacks\(\backslash\)n"});
        \hyperlink{group__Evas__Canvas__Events_ga48b6d066830a1350bd5c8770070cd3f9}{evas\_event\_callback\_del\_full}(evas, 
      \hyperlink{Evas__Common_8h_a99e208e463a20499aabe6faac8a8cb8aa5a68e4f5dccdc18a393ef4a4773236c3}{EVAS\_CALLBACK\_RENDER\_FLUSH\_PRE},
                                     \_render\_flush\_cb, NULL);
        \hyperlink{group__Evas__Canvas__Events_ga48b6d066830a1350bd5c8770070cd3f9}{evas\_event\_callback\_del\_full}(
          evas, \hyperlink{Evas__Common_8h_a99e208e463a20499aabe6faac8a8cb8aa7380ca16bf87762e96309473d3d306c5}{EVAS\_CALLBACK\_CANVAS\_OBJECT\_FOCUS\_IN},
          \_object\_focus\_in\_cb, NULL);
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (strcmp(ev->\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}, \textcolor{stringliteral}{"f"}) == 0) \textcolor{comment}{/* freeze input for 3 seconds */}
     \{
        fprintf(stdout, \textcolor{stringliteral}{"Freezing input for 3 seconds\(\backslash\)n"});
        \hyperlink{group__Evas__Event__Feeding__Group_ga4f6046343eab8b062e5509d984100ec8}{evas\_event\_freeze}(evas);
        d.freeze\_timer = ecore\_timer\_add(3, \_thaw\_cb, NULL);
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (strcmp(ev->\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}, \textcolor{stringliteral}{"p"}) == 0) \textcolor{comment}{/* toggle precise point}
\textcolor{comment}{                                       * collision detection */}
     \{
        \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool} precise = \hyperlink{group__Evas__Object__Group__Extras_ga4d2551c3265c013448f2b7cbb6bdf74d}{evas\_object\_precise\_is\_inside\_get}(d.
      img);

        fprintf(stdout, \textcolor{stringliteral}{"Toggling precise point collision detection %s on"}
                        \textcolor{stringliteral}{" Enlightenment logo\(\backslash\)n"}, precise ? \textcolor{stringliteral}{"off"} : \textcolor{stringliteral}{"on"});
        \hyperlink{group__Evas__Object__Group__Extras_ga9a344285f070ad36b899d8819e285579}{evas\_object\_precise\_is\_inside\_set}(d.img, !precise);

        \textcolor{keywordflow}{return};
     \}

   mods = evas\_key\_modifier\_get(evas);
   \textcolor{keywordflow}{if} (\hyperlink{group__Evas__Keys_ga6cc24a5ea4b39b84c7a3e617de3db261}{evas\_key\_modifier\_is\_set}(mods, \textcolor{stringliteral}{"Control"}) &&
       (strcmp(ev->\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}, \textcolor{stringliteral}{"o"}) == 0)) \textcolor{comment}{/* add an obscured}
\textcolor{comment}{                                        * rectangle to the middle}
\textcolor{comment}{                                        * of the canvas */}
     \{
        fprintf(stdout, \textcolor{stringliteral}{"Toggling obscured rectangle on canvas\(\backslash\)n"});
        \textcolor{keywordflow}{if} (!d.obscured)
          \{
             \textcolor{keywordtype}{int} w, h;
             evas\_output\_viewport\_get(evas, NULL, NULL, &w, &h);
             \hyperlink{group__Evas__Canvas_ga163f9df9ba453f2f731c4bea12bb946b}{evas\_obscured\_rectangle\_add}(evas, w / 4, h / 4, w / 2, h / 2);
          \}
        \textcolor{keywordflow}{else}
          \{
             \textcolor{keywordtype}{int} w, h;
             \hyperlink{struct__Eina__Rectangle}{Eina\_Rectangle} *rect;
             \hyperlink{struct__Eina__List}{Eina\_List} *updates, *l;

             evas\_output\_viewport\_get(evas, NULL, NULL, &w, &h);
             \hyperlink{group__Evas__Canvas_ga6bd5caa330850f63f4e9d91271fefc62}{evas\_obscured\_clear}(evas);

             \textcolor{comment}{/* we have to flag a damage region here because}
\textcolor{comment}{              * evas\_obscured\_clear() doesn't change the canvas'}
\textcolor{comment}{              * state. we'd have to wait for an animation step, for}
\textcolor{comment}{              * example, to get the result, without it */}
             \hyperlink{group__Evas__Canvas_gab1482931249c640efb25453b54950a16}{evas\_damage\_rectangle\_add}(evas, 0, 0, w, h);

             updates = \hyperlink{group__Evas__Canvas_ga1867d9f5f97545418598496af93e4c71}{evas\_render\_updates}(evas);

             \hyperlink{group__Eina__List__Group_gad02f746a08ee0b12b7ed66d4bc0d71d8}{EINA\_LIST\_FOREACH}(updates, l, rect)
               \{
                  fprintf(stdout, \textcolor{stringliteral}{"Rectangle (%d, %d, %d, %d) on canvas got a"}
                                  \textcolor{stringliteral}{" rendering update.\(\backslash\)n"}, rect->\hyperlink{struct__Eina__Rectangle_a8358c0791dcf476432687510ca4e5d5c}{x}, rect->\hyperlink{struct__Eina__Rectangle_ae74dc834fb71a1f4cd9e3fe11dec3940}{y},
                          rect->\hyperlink{struct__Eina__Rectangle_af6a92d51ec25ee3464c81297ffc3a330}{w},
                          rect->\hyperlink{struct__Eina__Rectangle_a7570ed17f58fc94be997414a86130074}{h});
               \}
             \hyperlink{group__Evas__Canvas_ga038d98c7c13a86b6ba4de51f8aba3595}{evas\_render\_updates\_free}(updates);
          \}
        d.obscured = !d.obscured;

\end{DoxyCodeInclude}


See the full \hyperlink{Example_Evas_Events}{example}. 

References efl\+::eo\+::base\+::\+\_\+eo\+\_\+ptr(), and evas\+\_\+canvas\+\_\+render\+\_\+updates().

\hypertarget{group__Evas__Canvas_ga03c37a80f468c165ad41b09160212c83}{\index{Canvas Functions@{Canvas Functions}!obscured\+\_\+rectangle\+\_\+add@{obscured\+\_\+rectangle\+\_\+add}}
\index{obscured\+\_\+rectangle\+\_\+add@{obscured\+\_\+rectangle\+\_\+add}!Canvas Functions@{Canvas Functions}}
\subsubsection[{obscured\+\_\+rectangle\+\_\+add}]{\setlength{\rightskip}{0pt plus 5cm}void evas\+::canvas\+::obscured\+\_\+rectangle\+\_\+add (
\begin{DoxyParamCaption}
\item[{int}]{x\+\_\+, }
\item[{int}]{y\+\_\+, }
\item[{int}]{w\+\_\+, }
\item[{int}]{h\+\_\+}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}}\label{group__Evas__Canvas_ga03c37a80f468c165ad41b09160212c83}


Add an \char`\"{}obscured region\char`\"{} to an Evas canvas. 

This is the function by which one tells an Evas canvas that a part of it {\bfseries must not} be repainted. The region must be rectangular and its coordinates inside the canvas viewport are passed in the call. After this call, the region specified won't participate in any form in Evas' calculations and actions during its rendering updates, having its displaying content frozen as it was just after this function took place.

We call it \char`\"{}obscured region\char`\"{} because the most common use case for this rendering (partial) freeze is something else (most probably other canvas) being on top of the specified rectangular region, thus shading it completely from the user's final scene in a display. To avoid unnecessary processing, one should indicate to the obscured canvas not to bother about the non-\/important area.

The majority of users won't have to worry about this function, as they'll be using just one canvas in their applications, with nothing inset or on top of it in any form.

To make this region one that {\bfseries has} to be repainted again, call the function \hyperlink{group__Evas__Canvas_ga6bd5caa330850f63f4e9d91271fefc62}{evas\+\_\+obscured\+\_\+clear()}.

\begin{DoxyNote}{Note}
This is a {\bfseries very low level function}, which most of Evas' users wouldn't care about.

This function does {\bfseries not} flag the canvas as having its state changed. If you want to re-\/render it afterwards expecting new contents, you have to add \char`\"{}damage\char`\"{} regions yourself (see \hyperlink{group__Evas__Canvas_gab1482931249c640efb25453b54950a16}{evas\+\_\+damage\+\_\+rectangle\+\_\+add()}).
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__Evas__Canvas_ga6bd5caa330850f63f4e9d91271fefc62}{evas\+\_\+obscured\+\_\+clear()} 

\hyperlink{group__Evas__Canvas_ga1867d9f5f97545418598496af93e4c71}{evas\+\_\+render\+\_\+updates()}
\end{DoxySeeAlso}
Example code follows.  
\begin{DoxyCodeInclude}
  \textcolor{stringliteral}{"\(\backslash\)tControl + o - add an obscured rectangle\(\backslash\)n"}
  \textcolor{stringliteral}{"\(\backslash\)th - print help\(\backslash\)n"};

\textcolor{keyword}{struct }test\_data
\{
   Ecore\_Evas  *ee;
   \hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}        *\hyperlink{structevas_1_1canvas_a52d4b8356120c2f33b385145dcca20d4}{canvas};
   \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *img, *bg;
   \hyperlink{group__Ecore__Timer__Group_gaf96ffb609956658ec038e54bd39f46f0}{Ecore\_Timer} *resize\_timer, *freeze\_timer;
   \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}    obscured, focus;
\};

\textcolor{keyword}{static} \textcolor{keyword}{struct }test\_data d = \{0\};

\textcolor{comment}{/* here to keep our example's window size and background image's}
\textcolor{comment}{ * size in synchrony */}
\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_canvas\_resize\_cb(Ecore\_Evas *ee)
\{
   \textcolor{keywordtype}{int} w, h;

   \hyperlink{group__Ecore__Evas__Group_ga931aadf4603731e73e8a84e4b14f1493}{ecore\_evas\_geometry\_get}(ee, NULL, NULL, &w, &h);
   evas\_object\_resize(d.bg, w, h);
\}

\textcolor{comment}{/* called when our rectangle gets focus */}
\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_object\_focus\_in\_cb(\textcolor{keywordtype}{void} *data EINA\_UNUSED,
                    \hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas} *e,
                    \textcolor{keywordtype}{void} *event\_info)
\{
   fprintf(stdout, \textcolor{stringliteral}{"An object got focused: %s\(\backslash\)n"},
           evas\_object\_name\_get(event\_info));

   fprintf(stdout, \textcolor{stringliteral}{"Let's recheck it: %s\(\backslash\)n"},
           evas\_object\_name\_get(\hyperlink{group__Evas__Object__Group__Find_gaf5a6ebc4c45f1297e816ff809e5d7d0c}{evas\_focus\_get}(e)));

   fprintf(stdout, \textcolor{stringliteral}{"And again: %s\(\backslash\)n"}, evas\_object\_focus\_get(event\_info) ?
           \textcolor{stringliteral}{"OK!"} : \textcolor{stringliteral}{"Oops, something is bad."});
\}

\textcolor{comment}{/* render flush callback */}
\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_render\_flush\_cb(\textcolor{keywordtype}{void} *data EINA\_UNUSED,
                 \hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas} *e EINA\_UNUSED,
                 \textcolor{keywordtype}{void} *event\_info EINA\_UNUSED)
\{
   fprintf(stdout, \textcolor{stringliteral}{"Canvas is about to flush its rendering pipeline!\(\backslash\)n"});
\}

\textcolor{comment}{/* put some action in the canvas */}
\textcolor{keyword}{static} \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}
\_resize\_cb(\textcolor{keywordtype}{void} *data EINA\_UNUSED)
\{
   \textcolor{keywordtype}{int} w, h, cw, ch;

   \hyperlink{group__Evas__Object__Group__Basic_ga6f52fab1a96dc58c85ee481d84bac871}{evas\_object\_geometry\_get}(d.img, NULL, NULL, &w, &h);
   \hyperlink{group__Ecore__Evas__Group_ga931aadf4603731e73e8a84e4b14f1493}{ecore\_evas\_geometry\_get}(d.ee, NULL, NULL, &cw, &ch);

   \textcolor{keywordflow}{if} (w < cw)
     evas\_object\_resize(d.img, cw, ch);
   \textcolor{keywordflow}{else}
     evas\_object\_resize(d.img, cw / 2, ch / 2);

   \textcolor{keywordflow}{return} \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}; \textcolor{comment}{/* re-issue the timer */}
\}

\textcolor{comment}{/* let's have our events back */}
\textcolor{keyword}{static} \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}
\_thaw\_cb(\textcolor{keywordtype}{void} *data EINA\_UNUSED)
\{
   fprintf(stdout, \textcolor{stringliteral}{"Canvas was frozen %d times, now thawing.\(\backslash\)n"},
           \hyperlink{group__Evas__Event__Feeding__Group_gaca66af7f9b72ddbd63104d59c1fdf894}{evas\_event\_freeze\_get}(d.canvas));
   \hyperlink{group__Evas__Event__Feeding__Group_ga376918c56c3dc588a059da7fe8629b70}{evas\_event\_thaw}(d.canvas);
   \textcolor{keywordflow}{return} \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}; \textcolor{comment}{/* do not re-issue the timer */}
\}

\textcolor{comment}{/* mouse enters the object's area */}
\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_on\_mouse\_in(\textcolor{keywordtype}{void}        *data EINA\_UNUSED,
             \hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}        *evas EINA\_UNUSED,
             \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *o EINA\_UNUSED,
             \textcolor{keywordtype}{void}        *einfo EINA\_UNUSED)
\{
   fprintf(stdout, \textcolor{stringliteral}{"Enlightenment logo has had the mouse in.\(\backslash\)n"});
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_on\_mouse\_out(\textcolor{keywordtype}{void}        *data EINA\_UNUSED,
              \hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}        *evas EINA\_UNUSED,
              \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *o EINA\_UNUSED,
              \textcolor{keywordtype}{void}        *einfo EINA\_UNUSED)
\{
   fprintf(stdout, \textcolor{stringliteral}{"Enlightenment logo has had the mouse out.\(\backslash\)n"});
\} \textcolor{comment}{/* mouse exits the object's area */}

\textcolor{comment}{/* examine the keys pressed */}
\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_on\_keydown(\textcolor{keywordtype}{void}        *data EINA\_UNUSED,
            \hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}        *evas,
            \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *o EINA\_UNUSED,
            \textcolor{keywordtype}{void}        *einfo)
\{
   \textcolor{keyword}{const} \hyperlink{Evas__Common_8h_a198d0b10861c1da456004688d3443e96}{Evas\_Modifier} *mods;
   \hyperlink{struct__Evas__Event__Key__Down}{Evas\_Event\_Key\_Down} *ev = einfo;

   fprintf(stdout, \textcolor{stringliteral}{"We've got key input: %s\(\backslash\)n"}, ev->\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key});
   fprintf(stdout, \textcolor{stringliteral}{"It actually came from %s\(\backslash\)n"}, d.focus ?
           \textcolor{stringliteral}{"focus"} : \textcolor{stringliteral}{"key grab"});

   \textcolor{keywordflow}{if} (strcmp(ev->\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}, \textcolor{stringliteral}{"h"}) == 0) \textcolor{comment}{/* print help */}
     \{
        fprintf(stdout, commands);
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (strcmp(ev->\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}, \textcolor{stringliteral}{"a"}) == 0) \textcolor{comment}{/* toggle animation timer */}
     \{
        \textcolor{keywordflow}{if} (d.resize\_timer != NULL)
          \{
             fprintf(stdout, \textcolor{stringliteral}{"Stopping animation timer\(\backslash\)n"});
             \hyperlink{group__Ecore__Timer__Group_gaba2b599c7aabe3ab664dc3d47f62a33a}{ecore\_timer\_del}(d.resize\_timer);
             d.resize\_timer = NULL;
          \}
        \textcolor{keywordflow}{else}
          \{
             fprintf(stdout, \textcolor{stringliteral}{"Re-issuing animation timer\(\backslash\)n"});
             d.resize\_timer = ecore\_timer\_add(2, \_resize\_cb, NULL);
          \}
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (strcmp(ev->\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}, \textcolor{stringliteral}{"c"}) == 0) \textcolor{comment}{/* cycle between focus and key}
\textcolor{comment}{                                       * grabs for key input */}
     \{
        \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool} ret;
        \hyperlink{Evas__Common_8h_a111c7333a7d49e44698bd19dd5bc9059}{Evas\_Modifier\_Mask} mask =
          evas\_key\_modifier\_mask\_get(d.canvas, \textcolor{stringliteral}{"Control"});

        fprintf(stdout, \textcolor{stringliteral}{"Switching to %s for key input\(\backslash\)n"}, d.focus ?
                \textcolor{stringliteral}{"key grabs"} : \textcolor{stringliteral}{"focus"});

        \textcolor{keywordflow}{if} (d.focus)
          \{
             evas\_object\_focus\_set(d.bg, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE});
             fprintf(stdout, \textcolor{stringliteral}{"Focused object is now %s\(\backslash\)n"},
                     \hyperlink{group__Evas__Object__Group__Find_gaf5a6ebc4c45f1297e816ff809e5d7d0c}{evas\_focus\_get}(d.canvas) ?
                     \textcolor{stringliteral}{"still valid! Something went wrong."} : \textcolor{stringliteral}{"none."});

             ret = evas\_object\_key\_grab(d.bg, \textcolor{stringliteral}{"a"}, 0, 0, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE});
             \textcolor{keywordflow}{if} (!ret)
               \{
                  fprintf(stdout, \textcolor{stringliteral}{"Something went wrong with key grabs.\(\backslash\)n"});
                  \textcolor{keywordflow}{goto} c\_end;
               \}
             ret = evas\_object\_key\_grab(d.bg, \textcolor{stringliteral}{"c"}, 0, 0, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE});
             \textcolor{keywordflow}{if} (!ret)
               \{
                  fprintf(stdout, \textcolor{stringliteral}{"Something went wrong with key grabs.\(\backslash\)n"});
                  \textcolor{keywordflow}{goto} c\_end;
               \}
             ret = evas\_object\_key\_grab(d.bg, \textcolor{stringliteral}{"d"}, 0, 0, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE});
             \textcolor{keywordflow}{if} (!ret)
               \{
                  fprintf(stdout, \textcolor{stringliteral}{"Something went wrong with key grabs.\(\backslash\)n"});
                  \textcolor{keywordflow}{goto} c\_end;
               \}
             ret = evas\_object\_key\_grab(d.bg, \textcolor{stringliteral}{"f"}, 0, 0, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE});
             \textcolor{keywordflow}{if} (!ret)
               \{
                  fprintf(stdout, \textcolor{stringliteral}{"Something went wrong with key grabs.\(\backslash\)n"});
                  \textcolor{keywordflow}{goto} c\_end;
               \}
             ret = evas\_object\_key\_grab(d.bg, \textcolor{stringliteral}{"p"}, 0, 0, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE});
             \textcolor{keywordflow}{if} (!ret)
               \{
                  fprintf(stdout, \textcolor{stringliteral}{"Something went wrong with key grabs.\(\backslash\)n"});
                  \textcolor{keywordflow}{goto} c\_end;
               \}
             ret = evas\_object\_key\_grab(d.bg, \textcolor{stringliteral}{"o"}, mask, 0, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE});
             \textcolor{keywordflow}{if} (!ret)
               \{
                  fprintf(stdout, \textcolor{stringliteral}{"Something went wrong with key grabs.\(\backslash\)n"});
                  \textcolor{keywordflow}{goto} c\_end;
               \}
             ret = evas\_object\_key\_grab(d.bg, \textcolor{stringliteral}{"h"}, 0, 0, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE});
             \textcolor{keywordflow}{if} (!ret)
               \{
                  fprintf(stdout, \textcolor{stringliteral}{"Something went wrong with key grabs.\(\backslash\)n"});
                  \textcolor{keywordflow}{goto} c\_end;
               \}
          \}
        \textcolor{keywordflow}{else} \textcolor{comment}{/* got here by key grabs */}
          \{
             evas\_object\_key\_ungrab(d.bg, \textcolor{stringliteral}{"a"}, 0, 0);
             evas\_object\_key\_ungrab(d.bg, \textcolor{stringliteral}{"c"}, 0, 0);
             evas\_object\_key\_ungrab(d.bg, \textcolor{stringliteral}{"d"}, 0, 0);
             evas\_object\_key\_ungrab(d.bg, \textcolor{stringliteral}{"f"}, 0, 0);
             evas\_object\_key\_ungrab(d.bg, \textcolor{stringliteral}{"p"}, 0, 0);
             evas\_object\_key\_ungrab(d.bg, \textcolor{stringliteral}{"o"}, mask, 0);
             evas\_object\_key\_ungrab(d.bg, \textcolor{stringliteral}{"h"}, 0, 0);

             evas\_object\_focus\_set(d.bg, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE});
          \}

c\_end:
        d.focus = !d.focus;

        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (strcmp(ev->\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}, \textcolor{stringliteral}{"d"}) == 0) \textcolor{comment}{/* delete canvas' callbacks */}
     \{
        fprintf(stdout, \textcolor{stringliteral}{"Deleting canvas event callbacks\(\backslash\)n"});
        \hyperlink{group__Evas__Canvas__Events_ga48b6d066830a1350bd5c8770070cd3f9}{evas\_event\_callback\_del\_full}(evas, 
      \hyperlink{Evas__Common_8h_a99e208e463a20499aabe6faac8a8cb8aa5a68e4f5dccdc18a393ef4a4773236c3}{EVAS\_CALLBACK\_RENDER\_FLUSH\_PRE},
                                     \_render\_flush\_cb, NULL);
        \hyperlink{group__Evas__Canvas__Events_ga48b6d066830a1350bd5c8770070cd3f9}{evas\_event\_callback\_del\_full}(
          evas, \hyperlink{Evas__Common_8h_a99e208e463a20499aabe6faac8a8cb8aa7380ca16bf87762e96309473d3d306c5}{EVAS\_CALLBACK\_CANVAS\_OBJECT\_FOCUS\_IN},
          \_object\_focus\_in\_cb, NULL);
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (strcmp(ev->\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}, \textcolor{stringliteral}{"f"}) == 0) \textcolor{comment}{/* freeze input for 3 seconds */}
     \{
        fprintf(stdout, \textcolor{stringliteral}{"Freezing input for 3 seconds\(\backslash\)n"});
        \hyperlink{group__Evas__Event__Feeding__Group_ga4f6046343eab8b062e5509d984100ec8}{evas\_event\_freeze}(evas);
        d.freeze\_timer = ecore\_timer\_add(3, \_thaw\_cb, NULL);
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (strcmp(ev->\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}, \textcolor{stringliteral}{"p"}) == 0) \textcolor{comment}{/* toggle precise point}
\textcolor{comment}{                                       * collision detection */}
     \{
        \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool} precise = \hyperlink{group__Evas__Object__Group__Extras_ga4d2551c3265c013448f2b7cbb6bdf74d}{evas\_object\_precise\_is\_inside\_get}(d.
      img);

        fprintf(stdout, \textcolor{stringliteral}{"Toggling precise point collision detection %s on"}
                        \textcolor{stringliteral}{" Enlightenment logo\(\backslash\)n"}, precise ? \textcolor{stringliteral}{"off"} : \textcolor{stringliteral}{"on"});
        \hyperlink{group__Evas__Object__Group__Extras_ga9a344285f070ad36b899d8819e285579}{evas\_object\_precise\_is\_inside\_set}(d.img, !precise);

        \textcolor{keywordflow}{return};
     \}

   mods = evas\_key\_modifier\_get(evas);
   \textcolor{keywordflow}{if} (\hyperlink{group__Evas__Keys_ga6cc24a5ea4b39b84c7a3e617de3db261}{evas\_key\_modifier\_is\_set}(mods, \textcolor{stringliteral}{"Control"}) &&
       (strcmp(ev->\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}, \textcolor{stringliteral}{"o"}) == 0)) \textcolor{comment}{/* add an obscured}
\textcolor{comment}{                                        * rectangle to the middle}
\textcolor{comment}{                                        * of the canvas */}
     \{
        fprintf(stdout, \textcolor{stringliteral}{"Toggling obscured rectangle on canvas\(\backslash\)n"});
        \textcolor{keywordflow}{if} (!d.obscured)
          \{
             \textcolor{keywordtype}{int} w, h;
             evas\_output\_viewport\_get(evas, NULL, NULL, &w, &h);
             \hyperlink{group__Evas__Canvas_ga163f9df9ba453f2f731c4bea12bb946b}{evas\_obscured\_rectangle\_add}(evas, w / 4, h / 4, w / 2, h / 2);
          \}
        \textcolor{keywordflow}{else}
          \{
             \textcolor{keywordtype}{int} w, h;
             \hyperlink{struct__Eina__Rectangle}{Eina\_Rectangle} *rect;
             \hyperlink{struct__Eina__List}{Eina\_List} *updates, *l;

             evas\_output\_viewport\_get(evas, NULL, NULL, &w, &h);
             \hyperlink{group__Evas__Canvas_ga6bd5caa330850f63f4e9d91271fefc62}{evas\_obscured\_clear}(evas);

\end{DoxyCodeInclude}


In that example, pressing the \char`\"{}\+Ctrl\char`\"{} and \char`\"{}o\char`\"{} keys will impose or remove an obscured region in the middle of the canvas. You'll get the same contents at the time the key was pressed, if toggling it on, until you toggle it off again (make sure the animation is running on to get the idea better). See the full \hyperlink{Example_Evas_Events}{example}.


\begin{DoxyParams}{Parameters}
{\em x} & The rectangle's top left corner's horizontal coordinate. \\
\hline
{\em y} & The rectangle's top left corner's vertical coordinate \\
\hline
{\em w} & The rectangle's width. \\
\hline
{\em h} & The rectangle's height. \\
\hline
\end{DoxyParams}


References efl\+::eo\+::base\+::\+\_\+eo\+\_\+ptr(), and evas\+\_\+canvas\+\_\+obscured\+\_\+rectangle\+\_\+add().

\hypertarget{group__Evas__Canvas_gac2250d84fd71ce2035a6bd0ffbaf3fe0}{\index{Canvas Functions@{Canvas Functions}!render\+\_\+dump@{render\+\_\+dump}}
\index{render\+\_\+dump@{render\+\_\+dump}!Canvas Functions@{Canvas Functions}}
\subsubsection[{render\+\_\+dump}]{\setlength{\rightskip}{0pt plus 5cm}void evas\+::canvas\+::render\+\_\+dump (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}}\label{group__Evas__Canvas_gac2250d84fd71ce2035a6bd0ffbaf3fe0}


Make the canvas discard as much data as possible used by the engine at runtime. 

This function will unload images, delete textures and much more, where possible. You may also want to call \hyperlink{group__Evas__Canvas_ga7df42300bf552be347fc7a1d8dd245d2}{evas\+\_\+render\+\_\+idle\+\_\+flush()} immediately prior to this to perhaps discard a little more, though \hyperlink{group__Evas__Canvas_ga760916b7e7f579b14da134859ed3fc74}{evas\+\_\+render\+\_\+dump()} should implicitly delete most of what \hyperlink{group__Evas__Canvas_ga7df42300bf552be347fc7a1d8dd245d2}{evas\+\_\+render\+\_\+idle\+\_\+flush()} might discard too. 

References efl\+::eo\+::base\+::\+\_\+eo\+\_\+ptr(), and evas\+\_\+canvas\+\_\+render\+\_\+dump().

\hypertarget{group__Evas__Canvas_ga3a667a566a3cdb2c3c7bc289d090d0b0}{\index{Canvas Functions@{Canvas Functions}!obscured\+\_\+clear@{obscured\+\_\+clear}}
\index{obscured\+\_\+clear@{obscured\+\_\+clear}!Canvas Functions@{Canvas Functions}}
\subsubsection[{obscured\+\_\+clear}]{\setlength{\rightskip}{0pt plus 5cm}void evas\+::canvas\+::obscured\+\_\+clear (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}}\label{group__Evas__Canvas_ga3a667a566a3cdb2c3c7bc289d090d0b0}


Remove all \char`\"{}obscured regions\char`\"{} from an Evas canvas. 

This function removes all the rectangles from the obscured regions list of the canvas {\ttfamily e}. It takes obscured areas added with \hyperlink{group__Evas__Canvas_ga163f9df9ba453f2f731c4bea12bb946b}{evas\+\_\+obscured\+\_\+rectangle\+\_\+add()} and make them again a regions that {\bfseries have} to be repainted on rendering updates.

\begin{DoxyNote}{Note}
This is a {\bfseries very low level function}, which most of Evas' users wouldn't care about.

This function does {\bfseries not} flag the canvas as having its state changed. If you want to re-\/render it afterwards expecting new contents, you have to add \char`\"{}damage\char`\"{} regions yourself (see \hyperlink{group__Evas__Canvas_gab1482931249c640efb25453b54950a16}{evas\+\_\+damage\+\_\+rectangle\+\_\+add()}).
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__Evas__Canvas_ga163f9df9ba453f2f731c4bea12bb946b}{evas\+\_\+obscured\+\_\+rectangle\+\_\+add()} for an example 

\hyperlink{group__Evas__Canvas_ga1867d9f5f97545418598496af93e4c71}{evas\+\_\+render\+\_\+updates()} 
\end{DoxySeeAlso}


References efl\+::eo\+::base\+::\+\_\+eo\+\_\+ptr(), and evas\+\_\+canvas\+\_\+obscured\+\_\+clear().

\hypertarget{group__Evas__Canvas_ga815c1f3ef23510f15dabf133335f8fdd}{\index{Canvas Functions@{Canvas Functions}!render\+\_\+idle\+\_\+flush@{render\+\_\+idle\+\_\+flush}}
\index{render\+\_\+idle\+\_\+flush@{render\+\_\+idle\+\_\+flush}!Canvas Functions@{Canvas Functions}}
\subsubsection[{render\+\_\+idle\+\_\+flush}]{\setlength{\rightskip}{0pt plus 5cm}void evas\+::canvas\+::render\+\_\+idle\+\_\+flush (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}}\label{group__Evas__Canvas_ga815c1f3ef23510f15dabf133335f8fdd}


Make the canvas discard internally cached data used for rendering. 

This function flushes the arrays of delete, active and render objects. Other things it may also discard are\+: shared memory segments, temporary scratch buffers, cached data to avoid re-\/compute of that data etc. 

References efl\+::eo\+::base\+::\+\_\+eo\+\_\+ptr(), and evas\+\_\+canvas\+\_\+render\+\_\+idle\+\_\+flush().

\hypertarget{group__Evas__Canvas_ga8da56cdad5c50530bed8c7ec3d1e5b79}{\index{Canvas Functions@{Canvas Functions}!evas\+\_\+data\+\_\+attach\+\_\+set@{evas\+\_\+data\+\_\+attach\+\_\+set}}
\index{evas\+\_\+data\+\_\+attach\+\_\+set@{evas\+\_\+data\+\_\+attach\+\_\+set}!Canvas Functions@{Canvas Functions}}
\subsubsection[{evas\+\_\+data\+\_\+attach\+\_\+set}]{\setlength{\rightskip}{0pt plus 5cm}void evas\+\_\+data\+\_\+attach\+\_\+set (
\begin{DoxyParamCaption}
\item[{Evas\+\_\+\+Canvas $\ast$}]{obj, }
\item[{void $\ast$}]{data}
\end{DoxyParamCaption}
)}}\label{group__Evas__Canvas_ga8da56cdad5c50530bed8c7ec3d1e5b79}


Attaches a specific pointer to the evas for fetching later. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em data} & The pointer to attach \\
\hline
\end{DoxyParams}


References evas\+\_\+canvas\+\_\+data\+\_\+attach\+\_\+set().



Referenced by ecore\+\_\+evas\+\_\+buffer\+\_\+allocfunc\+\_\+new(), ecore\+\_\+evas\+\_\+ews\+\_\+new(), and ecore\+\_\+evas\+\_\+object\+\_\+image\+\_\+new().

\hypertarget{group__Evas__Canvas_ga7a56ceb9252814ed598321597243ca66}{\index{Canvas Functions@{Canvas Functions}!evas\+\_\+data\+\_\+attach\+\_\+get@{evas\+\_\+data\+\_\+attach\+\_\+get}}
\index{evas\+\_\+data\+\_\+attach\+\_\+get@{evas\+\_\+data\+\_\+attach\+\_\+get}!Canvas Functions@{Canvas Functions}}
\subsubsection[{evas\+\_\+data\+\_\+attach\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ evas\+\_\+data\+\_\+attach\+\_\+get (
\begin{DoxyParamCaption}
\item[{const Evas\+\_\+\+Canvas $\ast$}]{obj}
\end{DoxyParamCaption}
)}}\label{group__Evas__Canvas_ga7a56ceb9252814ed598321597243ca66}


Returns the pointer attached by \hyperlink{group__Evas__Canvas_ga8da56cdad5c50530bed8c7ec3d1e5b79}{evas\+\_\+data\+\_\+attach\+\_\+set()} 

\begin{DoxyReturn}{Returns}
The pointer attached 
\end{DoxyReturn}


References evas\+\_\+canvas\+\_\+data\+\_\+attach\+\_\+get().



Referenced by ecore\+\_\+evas\+\_\+ecore\+\_\+evas\+\_\+get().

\hypertarget{group__Evas__Canvas_gaac5e46590dae77b274441e3818ec15b5}{\index{Canvas Functions@{Canvas Functions}!evas\+\_\+focus\+\_\+state\+\_\+get@{evas\+\_\+focus\+\_\+state\+\_\+get}}
\index{evas\+\_\+focus\+\_\+state\+\_\+get@{evas\+\_\+focus\+\_\+state\+\_\+get}!Canvas Functions@{Canvas Functions}}
\subsubsection[{evas\+\_\+focus\+\_\+state\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Eina\+\_\+\+Bool} evas\+\_\+focus\+\_\+state\+\_\+get (
\begin{DoxyParamCaption}
\item[{const Evas\+\_\+\+Canvas $\ast$}]{obj}
\end{DoxyParamCaption}
)}}\label{group__Evas__Canvas_gaac5e46590dae77b274441e3818ec15b5}


Get the focus state known by the given evas. 

\begin{DoxyReturn}{Returns}
{\ttfamily E\+I\+N\+A\+\_\+\+T\+R\+U\+E} if it got the focus, {\ttfamily E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} otherwise. 
\end{DoxyReturn}


References evas\+\_\+canvas\+\_\+focus\+\_\+state\+\_\+get().

\hypertarget{group__Evas__Canvas_ga9eb0746242422003882fd25034a6a26c}{\index{Canvas Functions@{Canvas Functions}!evas\+\_\+changed\+\_\+get@{evas\+\_\+changed\+\_\+get}}
\index{evas\+\_\+changed\+\_\+get@{evas\+\_\+changed\+\_\+get}!Canvas Functions@{Canvas Functions}}
\subsubsection[{evas\+\_\+changed\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Eina\+\_\+\+Bool} evas\+\_\+changed\+\_\+get (
\begin{DoxyParamCaption}
\item[{const Evas\+\_\+\+Canvas $\ast$}]{obj}
\end{DoxyParamCaption}
)}}\label{group__Evas__Canvas_ga9eb0746242422003882fd25034a6a26c}


Get the changed marker for the canvas. 

\begin{DoxyReturn}{Returns}
{\ttfamily E\+I\+N\+A\+\_\+\+T\+R\+U\+E} if something has been marked as changed, {\ttfamily E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} otherwise.
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+11 
\end{DoxySince}


References evas\+\_\+canvas\+\_\+changed\+\_\+get().

\hypertarget{group__Evas__Canvas_ga1aecb06f555c68f67980e04391f8316e}{\index{Canvas Functions@{Canvas Functions}!evas\+\_\+render\+\_\+async@{evas\+\_\+render\+\_\+async}}
\index{evas\+\_\+render\+\_\+async@{evas\+\_\+render\+\_\+async}!Canvas Functions@{Canvas Functions}}
\subsubsection[{evas\+\_\+render\+\_\+async}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Eina\+\_\+\+Bool} evas\+\_\+render\+\_\+async (
\begin{DoxyParamCaption}
\item[{Evas\+\_\+\+Canvas $\ast$}]{obj}
\end{DoxyParamCaption}
)}}\label{group__Evas__Canvas_ga1aecb06f555c68f67980e04391f8316e}


Render the given Evas canvas asynchronously. 

\begin{DoxyReturn}{Returns}
E\+I\+N\+A\+\_\+\+T\+R\+U\+E if the canvas will render, E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E otherwise.
\end{DoxyReturn}
This function only returns E\+I\+N\+A\+\_\+\+T\+R\+U\+E when a frame will be rendered. If the previous frame is still rendering, E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E will be returned so the users know not to wait for the updates callback and just return to their main loop.

If a {\ttfamily func} callback is given, a list of updated areas will be generated and the function will be called from the main thread after the rendered frame is flushed to the screen. The resulting list should be freed with  \hyperlink{group__Evas__Canvas_ga038d98c7c13a86b6ba4de51f8aba3595}{evas\+\_\+render\+\_\+updates\+\_\+free()}. The list is given in the {\ttfamily event\+\_\+info} parameter of the callback function.

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


References evas\+\_\+canvas\+\_\+render\+\_\+async().

\hypertarget{group__Evas__Canvas_ga3c028508af6c0242c05e24f5e7e6700b}{\index{Canvas Functions@{Canvas Functions}!evas\+\_\+norender@{evas\+\_\+norender}}
\index{evas\+\_\+norender@{evas\+\_\+norender}!Canvas Functions@{Canvas Functions}}
\subsubsection[{evas\+\_\+norender}]{\setlength{\rightskip}{0pt plus 5cm}void evas\+\_\+norender (
\begin{DoxyParamCaption}
\item[{Evas\+\_\+\+Canvas $\ast$}]{obj}
\end{DoxyParamCaption}
)}}\label{group__Evas__Canvas_ga3c028508af6c0242c05e24f5e7e6700b}


Update the canvas internal objects but not triggering immediate renderization. 

This function updates the canvas internal objects not triggering renderization. To force renderization function \hyperlink{group__Evas__Canvas_ga8d339d4eb0acfd55b2af686c67783db1}{evas\+\_\+render()} should be used.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Evas__Canvas_ga8d339d4eb0acfd55b2af686c67783db1}{evas\+\_\+render}. 
\end{DoxySeeAlso}


References evas\+\_\+canvas\+\_\+norender().

\hypertarget{group__Evas__Canvas_ga32829e0d40c75ac20be9ab8215ba4d2f}{\index{Canvas Functions@{Canvas Functions}!evas\+\_\+nochange\+\_\+pop@{evas\+\_\+nochange\+\_\+pop}}
\index{evas\+\_\+nochange\+\_\+pop@{evas\+\_\+nochange\+\_\+pop}!Canvas Functions@{Canvas Functions}}
\subsubsection[{evas\+\_\+nochange\+\_\+pop}]{\setlength{\rightskip}{0pt plus 5cm}void evas\+\_\+nochange\+\_\+pop (
\begin{DoxyParamCaption}
\item[{Evas\+\_\+\+Canvas $\ast$}]{obj}
\end{DoxyParamCaption}
)}}\label{group__Evas__Canvas_ga32829e0d40c75ac20be9ab8215ba4d2f}


Pop the nochange flag down 1. 

This tells evas, that while the nochange flag is greater than 0, do not mark objects as \char`\"{}changed\char`\"{} when making changes. 

References evas\+\_\+canvas\+\_\+nochange\+\_\+pop().

\hypertarget{group__Evas__Canvas_ga1e2de0a18d1a88f46377698870e67998}{\index{Canvas Functions@{Canvas Functions}!evas\+\_\+nochange\+\_\+push@{evas\+\_\+nochange\+\_\+push}}
\index{evas\+\_\+nochange\+\_\+push@{evas\+\_\+nochange\+\_\+push}!Canvas Functions@{Canvas Functions}}
\subsubsection[{evas\+\_\+nochange\+\_\+push}]{\setlength{\rightskip}{0pt plus 5cm}void evas\+\_\+nochange\+\_\+push (
\begin{DoxyParamCaption}
\item[{Evas\+\_\+\+Canvas $\ast$}]{obj}
\end{DoxyParamCaption}
)}}\label{group__Evas__Canvas_ga1e2de0a18d1a88f46377698870e67998}


Push the nochange flag up 1. 

This tells evas, that while the nochange flag is greater than 0, do not mark objects as \char`\"{}changed\char`\"{} when making changes. 

References evas\+\_\+canvas\+\_\+nochange\+\_\+push().

\hypertarget{group__Evas__Canvas_gab1482931249c640efb25453b54950a16}{\index{Canvas Functions@{Canvas Functions}!evas\+\_\+damage\+\_\+rectangle\+\_\+add@{evas\+\_\+damage\+\_\+rectangle\+\_\+add}}
\index{evas\+\_\+damage\+\_\+rectangle\+\_\+add@{evas\+\_\+damage\+\_\+rectangle\+\_\+add}!Canvas Functions@{Canvas Functions}}
\subsubsection[{evas\+\_\+damage\+\_\+rectangle\+\_\+add}]{\setlength{\rightskip}{0pt plus 5cm}void evas\+\_\+damage\+\_\+rectangle\+\_\+add (
\begin{DoxyParamCaption}
\item[{Evas\+\_\+\+Canvas $\ast$}]{obj, }
\item[{int}]{x, }
\item[{int}]{y, }
\item[{int}]{w, }
\item[{int}]{h}
\end{DoxyParamCaption}
)}}\label{group__Evas__Canvas_gab1482931249c640efb25453b54950a16}


Add a damage rectangle. 

This is the function by which one tells evas that a part of the canvas has to be repainted.

\begin{DoxyNote}{Note}
All newly created Evas rectangles get the default color values of 255 255 255 255 (opaque white).
\end{DoxyNote}

\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em x} & The rectangle's left position. \\
\hline
\mbox{\tt in}  & {\em y} & The rectangle's top position. \\
\hline
\mbox{\tt in}  & {\em w} & The rectangle's width. \\
\hline
\mbox{\tt in}  & {\em h} & The rectangle's height. \\
\hline
\end{DoxyParams}


References evas\+\_\+canvas\+\_\+damage\+\_\+rectangle\+\_\+add().



Referenced by ecore\+\_\+evas\+\_\+rotation\+\_\+set(), and ecore\+\_\+evas\+\_\+rotation\+\_\+with\+\_\+resize\+\_\+set().

\hypertarget{group__Evas__Canvas_ga1867d9f5f97545418598496af93e4c71}{\index{Canvas Functions@{Canvas Functions}!evas\+\_\+render\+\_\+updates@{evas\+\_\+render\+\_\+updates}}
\index{evas\+\_\+render\+\_\+updates@{evas\+\_\+render\+\_\+updates}!Canvas Functions@{Canvas Functions}}
\subsubsection[{evas\+\_\+render\+\_\+updates}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Eina\+\_\+\+List}$\ast$ evas\+\_\+render\+\_\+updates (
\begin{DoxyParamCaption}
\item[{Evas\+\_\+\+Canvas $\ast$}]{obj}
\end{DoxyParamCaption}
)}}\label{group__Evas__Canvas_ga1867d9f5f97545418598496af93e4c71}


Force immediate renderization of the given Evas canvas. 

\begin{DoxyReturn}{Returns}
A newly allocated list of updated rectangles of the canvas ({\ttfamily Eina.\+Rectangle} structs). Free this list with \hyperlink{group__Evas__Canvas_ga038d98c7c13a86b6ba4de51f8aba3595}{evas\+\_\+render\+\_\+updates\+\_\+free()}.
\end{DoxyReturn}
This function forces an immediate renderization update of the given canvas {\ttfamily e}.

\begin{DoxyNote}{Note}
This is a {\bfseries very low level function}, which most of Evas' users wouldn't care about. One would use it, for example, to grab an Evas' canvas update regions and paint them back, using the canvas' pixmap, on a displaying system working below Evas.

Evas is a stateful canvas. If no operations changing its state took place since the last rendering action, you won't see no changes and this call will be a no-\/op.
\end{DoxyNote}
Example code follows.  
\begin{DoxyCodeInclude}
1   "\(\backslash\)tControl + o - add an obscured rectangle\(\backslash\)n"
2   "\(\backslash\)th - print help\(\backslash\)n";
3 
4 struct test\_data
5 \{
6    Ecore\_Evas  *ee;
7    Evas        *canvas;
8    Evas\_Object *img, *bg;
9    Ecore\_Timer *resize\_timer, *freeze\_timer;
10    Eina\_Bool    obscured, focus;
11 \};
12 
13 static struct test\_data d = \{0\};
14 
15 /* here to keep our example's window size and background image's
16  * size in synchrony */
17 static void
18 \_canvas\_resize\_cb(Ecore\_Evas *ee)
19 \{
20    int w, h;
21 
22    ecore\_evas\_geometry\_get(ee, NULL, NULL, &w, &h);
23    evas\_object\_resize(d.bg, w, h);
24 \}
25 
26 /* called when our rectangle gets focus */
27 static void
28 \_object\_focus\_in\_cb(void *data EINA\_UNUSED,
29                     Evas *e,
30                     void *event\_info)
31 \{
32    fprintf(stdout, "An object got focused: %s\(\backslash\)n",
33            evas\_object\_name\_get(event\_info));
34 
35    fprintf(stdout, "Let's recheck it: %s\(\backslash\)n",
36            evas\_object\_name\_get(evas\_focus\_get(e)));
37 
38    fprintf(stdout, "And again: %s\(\backslash\)n", evas\_object\_focus\_get(event\_info) ?
39            "OK!" : "Oops, something is bad.");
40 \}
41 
42 /* render flush callback */
43 static void
44 \_render\_flush\_cb(void *data EINA\_UNUSED,
45                  Evas *e EINA\_UNUSED,
46                  void *event\_info EINA\_UNUSED)
47 \{
48    fprintf(stdout, "Canvas is about to flush its rendering pipeline!\(\backslash\)n");
49 \}
50 
51 /* put some action in the canvas */
52 static Eina\_Bool
53 \_resize\_cb(void *data EINA\_UNUSED)
54 \{
55    int w, h, cw, ch;
56 
57    evas\_object\_geometry\_get(d.img, NULL, NULL, &w, &h);
58    ecore\_evas\_geometry\_get(d.ee, NULL, NULL, &cw, &ch);
59 
60    if (w < cw)
61      evas\_object\_resize(d.img, cw, ch);
62    else
63      evas\_object\_resize(d.img, cw / 2, ch / 2);
64 
65    return EINA\_TRUE; /* re-issue the timer */
66 \}
67 
68 /* let's have our events back */
69 static Eina\_Bool
70 \_thaw\_cb(void *data EINA\_UNUSED)
71 \{
72    fprintf(stdout, "Canvas was frozen %d times, now thawing.\(\backslash\)n",
73            evas\_event\_freeze\_get(d.canvas));
74    evas\_event\_thaw(d.canvas);
75    return EINA\_FALSE; /* do not re-issue the timer */
76 \}
77 
78 /* mouse enters the object's area */
79 static void
80 \_on\_mouse\_in(void        *data EINA\_UNUSED,
81              Evas        *evas EINA\_UNUSED,
82              Evas\_Object *o EINA\_UNUSED,
83              void        *einfo EINA\_UNUSED)
84 \{
85    fprintf(stdout, "Enlightenment logo has had the mouse in.\(\backslash\)n");
86 \}
87 
88 static void
89 \_on\_mouse\_out(void        *data EINA\_UNUSED,
90               Evas        *evas EINA\_UNUSED,
91               Evas\_Object *o EINA\_UNUSED,
92               void        *einfo EINA\_UNUSED)
93 \{
94    fprintf(stdout, "Enlightenment logo has had the mouse out.\(\backslash\)n");
95 \} /* mouse exits the object's area */
96 
97 /* examine the keys pressed */
98 static void
99 \_on\_keydown(void        *data EINA\_UNUSED,
100             Evas        *evas,
101             Evas\_Object *o EINA\_UNUSED,
102             void        *einfo)
103 \{
104    const Evas\_Modifier *mods;
105    Evas\_Event\_Key\_Down *ev = einfo;
106 
107    fprintf(stdout, "We've got key input: %s\(\backslash\)n", ev->key);
108    fprintf(stdout, "It actually came from %s\(\backslash\)n", d.focus ?
109            "focus" : "key grab");
110 
111    if (strcmp(ev->key, "h") == 0) /* print help */
112      \{
113         fprintf(stdout, commands);
114         return;
115      \}
116 
117    if (strcmp(ev->key, "a") == 0) /* toggle animation timer */
118      \{
119         if (d.resize\_timer != NULL)
120           \{
121              fprintf(stdout, "Stopping animation timer\(\backslash\)n");
122              ecore\_timer\_del(d.resize\_timer);
123              d.resize\_timer = NULL;
124           \}
125         else
126           \{
127              fprintf(stdout, "Re-issuing animation timer\(\backslash\)n");
128              d.resize\_timer = ecore\_timer\_add(2, \_resize\_cb, NULL);
129           \}
130         return;
131      \}
132 
133    if (strcmp(ev->key, "c") == 0) /* cycle between focus and key
134                                        * grabs for key input */
135      \{
136         Eina\_Bool ret;
137         Evas\_Modifier\_Mask mask =
138           evas\_key\_modifier\_mask\_get(d.canvas, "Control");
139 
140         fprintf(stdout, "Switching to %s for key input\(\backslash\)n", d.focus ?
141                 "key grabs" : "focus");
142 
143         if (d.focus)
144           \{
145              evas\_object\_focus\_set(d.bg, EINA\_FALSE);
146              fprintf(stdout, "Focused object is now %s\(\backslash\)n",
147                      evas\_focus\_get(d.canvas) ?
148                      "still valid! Something went wrong." : "none.");
149 
150              ret = evas\_object\_key\_grab(d.bg, "a", 0, 0, EINA\_TRUE);
151              if (!ret)
152                \{
153                   fprintf(stdout, "Something went wrong with key grabs.\(\backslash\)n");
154                   goto c\_end;
155                \}
156              ret = evas\_object\_key\_grab(d.bg, "c", 0, 0, EINA\_TRUE);
157              if (!ret)
158                \{
159                   fprintf(stdout, "Something went wrong with key grabs.\(\backslash\)n");
160                   goto c\_end;
161                \}
162              ret = evas\_object\_key\_grab(d.bg, "d", 0, 0, EINA\_TRUE);
163              if (!ret)
164                \{
165                   fprintf(stdout, "Something went wrong with key grabs.\(\backslash\)n");
166                   goto c\_end;
167                \}
168              ret = evas\_object\_key\_grab(d.bg, "f", 0, 0, EINA\_TRUE);
169              if (!ret)
170                \{
171                   fprintf(stdout, "Something went wrong with key grabs.\(\backslash\)n");
172                   goto c\_end;
173                \}
174              ret = evas\_object\_key\_grab(d.bg, "p", 0, 0, EINA\_TRUE);
175              if (!ret)
176                \{
177                   fprintf(stdout, "Something went wrong with key grabs.\(\backslash\)n");
178                   goto c\_end;
179                \}
180              ret = evas\_object\_key\_grab(d.bg, "o", mask, 0, EINA\_TRUE);
181              if (!ret)
182                \{
183                   fprintf(stdout, "Something went wrong with key grabs.\(\backslash\)n");
184                   goto c\_end;
185                \}
186              ret = evas\_object\_key\_grab(d.bg, "h", 0, 0, EINA\_TRUE);
187              if (!ret)
188                \{
189                   fprintf(stdout, "Something went wrong with key grabs.\(\backslash\)n");
190                   goto c\_end;
191                \}
192           \}
193         else /* got here by key grabs */
194           \{
195              evas\_object\_key\_ungrab(d.bg, "a", 0, 0);
196              evas\_object\_key\_ungrab(d.bg, "c", 0, 0);
197              evas\_object\_key\_ungrab(d.bg, "d", 0, 0);
198              evas\_object\_key\_ungrab(d.bg, "f", 0, 0);
199              evas\_object\_key\_ungrab(d.bg, "p", 0, 0);
200              evas\_object\_key\_ungrab(d.bg, "o", mask, 0);
201              evas\_object\_key\_ungrab(d.bg, "h", 0, 0);
202 
203              evas\_object\_focus\_set(d.bg, EINA\_TRUE);
204           \}
205 
206 c\_end:
207         d.focus = !d.focus;
208 
209         return;
210      \}
211 
212    if (strcmp(ev->key, "d") == 0) /* delete canvas' callbacks */
213      \{
214         fprintf(stdout, "Deleting canvas event callbacks\(\backslash\)n");
215         evas\_event\_callback\_del\_full(evas, EVAS\_CALLBACK\_RENDER\_FLUSH\_PRE,
216                                      \_render\_flush\_cb, NULL);
217         evas\_event\_callback\_del\_full(
218           evas, EVAS\_CALLBACK\_CANVAS\_OBJECT\_FOCUS\_IN,
219           \_object\_focus\_in\_cb, NULL);
220         return;
221      \}
222 
223    if (strcmp(ev->key, "f") == 0) /* freeze input for 3 seconds */
224      \{
225         fprintf(stdout, "Freezing input for 3 seconds\(\backslash\)n");
226         evas\_event\_freeze(evas);
227         d.freeze\_timer = ecore\_timer\_add(3, \_thaw\_cb, NULL);
228         return;
229      \}
230 
231    if (strcmp(ev->key, "p") == 0) /* toggle precise point
232                                        * collision detection */
233      \{
234         Eina\_Bool precise = evas\_object\_precise\_is\_inside\_get(d.img);
235 
236         fprintf(stdout, "Toggling precise point collision detection %s on"
237                         " Enlightenment logo\(\backslash\)n", precise ? "off" : "on");
238         evas\_object\_precise\_is\_inside\_set(d.img, !precise);
239 
240         return;
241      \}
242 
243    mods = evas\_key\_modifier\_get(evas);
244    if (evas\_key\_modifier\_is\_set(mods, "Control") &&
245        (strcmp(ev->key, "o") == 0)) /* add an obscured
246                                         * rectangle to the middle
247                                         * of the canvas */
248      \{
249         fprintf(stdout, "Toggling obscured rectangle on canvas\(\backslash\)n");
250         if (!d.obscured)
251           \{
252              int w, h;
253              evas\_output\_viewport\_get(evas, NULL, NULL, &w, &h);
254              evas\_obscured\_rectangle\_add(evas, w / 4, h / 4, w / 2, h / 2);
255           \}
256         else
257           \{
258              int w, h;
259              Eina\_Rectangle *rect;
260              Eina\_List *updates, *l;
261 
262              evas\_output\_viewport\_get(evas, NULL, NULL, &w, &h);
263              evas\_obscured\_clear(evas);
264 
265              /* we have to flag a damage region here because
266               * evas\_obscured\_clear() doesn't change the canvas'
267               * state. we'd have to wait for an animation step, for
268               * example, to get the result, without it */
269              evas\_damage\_rectangle\_add(evas, 0, 0, w, h);
270 
271              updates = evas\_render\_updates(evas);
272 
273              EINA\_LIST\_FOREACH(updates, l, rect)
274                \{
275                   fprintf(stdout, "Rectangle (%d, %d, %d, %d) on canvas got a"
276                                   " rendering update.\(\backslash\)n", rect->x, rect->y,
277                           rect->w,
278                           rect->h);
279                \}
280              evas\_render\_updates\_free(updates);
281           \}
282         d.obscured = !d.obscured;

\end{DoxyCodeInclude}


See the full \hyperlink{Example_Evas_Events}{example}. 

References evas\+\_\+canvas\+\_\+render\+\_\+updates().

\hypertarget{group__Evas__Canvas_ga163f9df9ba453f2f731c4bea12bb946b}{\index{Canvas Functions@{Canvas Functions}!evas\+\_\+obscured\+\_\+rectangle\+\_\+add@{evas\+\_\+obscured\+\_\+rectangle\+\_\+add}}
\index{evas\+\_\+obscured\+\_\+rectangle\+\_\+add@{evas\+\_\+obscured\+\_\+rectangle\+\_\+add}!Canvas Functions@{Canvas Functions}}
\subsubsection[{evas\+\_\+obscured\+\_\+rectangle\+\_\+add}]{\setlength{\rightskip}{0pt plus 5cm}void evas\+\_\+obscured\+\_\+rectangle\+\_\+add (
\begin{DoxyParamCaption}
\item[{Evas\+\_\+\+Canvas $\ast$}]{obj, }
\item[{int}]{x, }
\item[{int}]{y, }
\item[{int}]{w, }
\item[{int}]{h}
\end{DoxyParamCaption}
)}}\label{group__Evas__Canvas_ga163f9df9ba453f2f731c4bea12bb946b}


Add an \char`\"{}obscured region\char`\"{} to an Evas canvas. 

This is the function by which one tells an Evas canvas that a part of it {\bfseries must not} be repainted. The region must be rectangular and its coordinates inside the canvas viewport are passed in the call. After this call, the region specified won't participate in any form in Evas' calculations and actions during its rendering updates, having its displaying content frozen as it was just after this function took place.

We call it \char`\"{}obscured region\char`\"{} because the most common use case for this rendering (partial) freeze is something else (most probably other canvas) being on top of the specified rectangular region, thus shading it completely from the user's final scene in a display. To avoid unnecessary processing, one should indicate to the obscured canvas not to bother about the non-\/important area.

The majority of users won't have to worry about this function, as they'll be using just one canvas in their applications, with nothing inset or on top of it in any form.

To make this region one that {\bfseries has} to be repainted again, call the function \hyperlink{group__Evas__Canvas_ga6bd5caa330850f63f4e9d91271fefc62}{evas\+\_\+obscured\+\_\+clear()}.

\begin{DoxyNote}{Note}
This is a {\bfseries very low level function}, which most of Evas' users wouldn't care about.

This function does {\bfseries not} flag the canvas as having its state changed. If you want to re-\/render it afterwards expecting new contents, you have to add \char`\"{}damage\char`\"{} regions yourself (see \hyperlink{group__Evas__Canvas_gab1482931249c640efb25453b54950a16}{evas\+\_\+damage\+\_\+rectangle\+\_\+add()}).
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__Evas__Canvas_ga6bd5caa330850f63f4e9d91271fefc62}{evas\+\_\+obscured\+\_\+clear()} 

\hyperlink{group__Evas__Canvas_ga1867d9f5f97545418598496af93e4c71}{evas\+\_\+render\+\_\+updates()}
\end{DoxySeeAlso}
Example code follows.  
\begin{DoxyCodeInclude}
1   "\(\backslash\)tControl + o - add an obscured rectangle\(\backslash\)n"
2   "\(\backslash\)th - print help\(\backslash\)n";
3 
4 struct test\_data
5 \{
6    Ecore\_Evas  *ee;
7    Evas        *canvas;
8    Evas\_Object *img, *bg;
9    Ecore\_Timer *resize\_timer, *freeze\_timer;
10    Eina\_Bool    obscured, focus;
11 \};
12 
13 static struct test\_data d = \{0\};
14 
15 /* here to keep our example's window size and background image's
16  * size in synchrony */
17 static void
18 \_canvas\_resize\_cb(Ecore\_Evas *ee)
19 \{
20    int w, h;
21 
22    ecore\_evas\_geometry\_get(ee, NULL, NULL, &w, &h);
23    evas\_object\_resize(d.bg, w, h);
24 \}
25 
26 /* called when our rectangle gets focus */
27 static void
28 \_object\_focus\_in\_cb(void *data EINA\_UNUSED,
29                     Evas *e,
30                     void *event\_info)
31 \{
32    fprintf(stdout, "An object got focused: %s\(\backslash\)n",
33            evas\_object\_name\_get(event\_info));
34 
35    fprintf(stdout, "Let's recheck it: %s\(\backslash\)n",
36            evas\_object\_name\_get(evas\_focus\_get(e)));
37 
38    fprintf(stdout, "And again: %s\(\backslash\)n", evas\_object\_focus\_get(event\_info) ?
39            "OK!" : "Oops, something is bad.");
40 \}
41 
42 /* render flush callback */
43 static void
44 \_render\_flush\_cb(void *data EINA\_UNUSED,
45                  Evas *e EINA\_UNUSED,
46                  void *event\_info EINA\_UNUSED)
47 \{
48    fprintf(stdout, "Canvas is about to flush its rendering pipeline!\(\backslash\)n");
49 \}
50 
51 /* put some action in the canvas */
52 static Eina\_Bool
53 \_resize\_cb(void *data EINA\_UNUSED)
54 \{
55    int w, h, cw, ch;
56 
57    evas\_object\_geometry\_get(d.img, NULL, NULL, &w, &h);
58    ecore\_evas\_geometry\_get(d.ee, NULL, NULL, &cw, &ch);
59 
60    if (w < cw)
61      evas\_object\_resize(d.img, cw, ch);
62    else
63      evas\_object\_resize(d.img, cw / 2, ch / 2);
64 
65    return EINA\_TRUE; /* re-issue the timer */
66 \}
67 
68 /* let's have our events back */
69 static Eina\_Bool
70 \_thaw\_cb(void *data EINA\_UNUSED)
71 \{
72    fprintf(stdout, "Canvas was frozen %d times, now thawing.\(\backslash\)n",
73            evas\_event\_freeze\_get(d.canvas));
74    evas\_event\_thaw(d.canvas);
75    return EINA\_FALSE; /* do not re-issue the timer */
76 \}
77 
78 /* mouse enters the object's area */
79 static void
80 \_on\_mouse\_in(void        *data EINA\_UNUSED,
81              Evas        *evas EINA\_UNUSED,
82              Evas\_Object *o EINA\_UNUSED,
83              void        *einfo EINA\_UNUSED)
84 \{
85    fprintf(stdout, "Enlightenment logo has had the mouse in.\(\backslash\)n");
86 \}
87 
88 static void
89 \_on\_mouse\_out(void        *data EINA\_UNUSED,
90               Evas        *evas EINA\_UNUSED,
91               Evas\_Object *o EINA\_UNUSED,
92               void        *einfo EINA\_UNUSED)
93 \{
94    fprintf(stdout, "Enlightenment logo has had the mouse out.\(\backslash\)n");
95 \} /* mouse exits the object's area */
96 
97 /* examine the keys pressed */
98 static void
99 \_on\_keydown(void        *data EINA\_UNUSED,
100             Evas        *evas,
101             Evas\_Object *o EINA\_UNUSED,
102             void        *einfo)
103 \{
104    const Evas\_Modifier *mods;
105    Evas\_Event\_Key\_Down *ev = einfo;
106 
107    fprintf(stdout, "We've got key input: %s\(\backslash\)n", ev->key);
108    fprintf(stdout, "It actually came from %s\(\backslash\)n", d.focus ?
109            "focus" : "key grab");
110 
111    if (strcmp(ev->key, "h") == 0) /* print help */
112      \{
113         fprintf(stdout, commands);
114         return;
115      \}
116 
117    if (strcmp(ev->key, "a") == 0) /* toggle animation timer */
118      \{
119         if (d.resize\_timer != NULL)
120           \{
121              fprintf(stdout, "Stopping animation timer\(\backslash\)n");
122              ecore\_timer\_del(d.resize\_timer);
123              d.resize\_timer = NULL;
124           \}
125         else
126           \{
127              fprintf(stdout, "Re-issuing animation timer\(\backslash\)n");
128              d.resize\_timer = ecore\_timer\_add(2, \_resize\_cb, NULL);
129           \}
130         return;
131      \}
132 
133    if (strcmp(ev->key, "c") == 0) /* cycle between focus and key
134                                        * grabs for key input */
135      \{
136         Eina\_Bool ret;
137         Evas\_Modifier\_Mask mask =
138           evas\_key\_modifier\_mask\_get(d.canvas, "Control");
139 
140         fprintf(stdout, "Switching to %s for key input\(\backslash\)n", d.focus ?
141                 "key grabs" : "focus");
142 
143         if (d.focus)
144           \{
145              evas\_object\_focus\_set(d.bg, EINA\_FALSE);
146              fprintf(stdout, "Focused object is now %s\(\backslash\)n",
147                      evas\_focus\_get(d.canvas) ?
148                      "still valid! Something went wrong." : "none.");
149 
150              ret = evas\_object\_key\_grab(d.bg, "a", 0, 0, EINA\_TRUE);
151              if (!ret)
152                \{
153                   fprintf(stdout, "Something went wrong with key grabs.\(\backslash\)n");
154                   goto c\_end;
155                \}
156              ret = evas\_object\_key\_grab(d.bg, "c", 0, 0, EINA\_TRUE);
157              if (!ret)
158                \{
159                   fprintf(stdout, "Something went wrong with key grabs.\(\backslash\)n");
160                   goto c\_end;
161                \}
162              ret = evas\_object\_key\_grab(d.bg, "d", 0, 0, EINA\_TRUE);
163              if (!ret)
164                \{
165                   fprintf(stdout, "Something went wrong with key grabs.\(\backslash\)n");
166                   goto c\_end;
167                \}
168              ret = evas\_object\_key\_grab(d.bg, "f", 0, 0, EINA\_TRUE);
169              if (!ret)
170                \{
171                   fprintf(stdout, "Something went wrong with key grabs.\(\backslash\)n");
172                   goto c\_end;
173                \}
174              ret = evas\_object\_key\_grab(d.bg, "p", 0, 0, EINA\_TRUE);
175              if (!ret)
176                \{
177                   fprintf(stdout, "Something went wrong with key grabs.\(\backslash\)n");
178                   goto c\_end;
179                \}
180              ret = evas\_object\_key\_grab(d.bg, "o", mask, 0, EINA\_TRUE);
181              if (!ret)
182                \{
183                   fprintf(stdout, "Something went wrong with key grabs.\(\backslash\)n");
184                   goto c\_end;
185                \}
186              ret = evas\_object\_key\_grab(d.bg, "h", 0, 0, EINA\_TRUE);
187              if (!ret)
188                \{
189                   fprintf(stdout, "Something went wrong with key grabs.\(\backslash\)n");
190                   goto c\_end;
191                \}
192           \}
193         else /* got here by key grabs */
194           \{
195              evas\_object\_key\_ungrab(d.bg, "a", 0, 0);
196              evas\_object\_key\_ungrab(d.bg, "c", 0, 0);
197              evas\_object\_key\_ungrab(d.bg, "d", 0, 0);
198              evas\_object\_key\_ungrab(d.bg, "f", 0, 0);
199              evas\_object\_key\_ungrab(d.bg, "p", 0, 0);
200              evas\_object\_key\_ungrab(d.bg, "o", mask, 0);
201              evas\_object\_key\_ungrab(d.bg, "h", 0, 0);
202 
203              evas\_object\_focus\_set(d.bg, EINA\_TRUE);
204           \}
205 
206 c\_end:
207         d.focus = !d.focus;
208 
209         return;
210      \}
211 
212    if (strcmp(ev->key, "d") == 0) /* delete canvas' callbacks */
213      \{
214         fprintf(stdout, "Deleting canvas event callbacks\(\backslash\)n");
215         evas\_event\_callback\_del\_full(evas, EVAS\_CALLBACK\_RENDER\_FLUSH\_PRE,
216                                      \_render\_flush\_cb, NULL);
217         evas\_event\_callback\_del\_full(
218           evas, EVAS\_CALLBACK\_CANVAS\_OBJECT\_FOCUS\_IN,
219           \_object\_focus\_in\_cb, NULL);
220         return;
221      \}
222 
223    if (strcmp(ev->key, "f") == 0) /* freeze input for 3 seconds */
224      \{
225         fprintf(stdout, "Freezing input for 3 seconds\(\backslash\)n");
226         evas\_event\_freeze(evas);
227         d.freeze\_timer = ecore\_timer\_add(3, \_thaw\_cb, NULL);
228         return;
229      \}
230 
231    if (strcmp(ev->key, "p") == 0) /* toggle precise point
232                                        * collision detection */
233      \{
234         Eina\_Bool precise = evas\_object\_precise\_is\_inside\_get(d.img);
235 
236         fprintf(stdout, "Toggling precise point collision detection %s on"
237                         " Enlightenment logo\(\backslash\)n", precise ? "off" : "on");
238         evas\_object\_precise\_is\_inside\_set(d.img, !precise);
239 
240         return;
241      \}
242 
243    mods = evas\_key\_modifier\_get(evas);
244    if (evas\_key\_modifier\_is\_set(mods, "Control") &&
245        (strcmp(ev->key, "o") == 0)) /* add an obscured
246                                         * rectangle to the middle
247                                         * of the canvas */
248      \{
249         fprintf(stdout, "Toggling obscured rectangle on canvas\(\backslash\)n");
250         if (!d.obscured)
251           \{
252              int w, h;
253              evas\_output\_viewport\_get(evas, NULL, NULL, &w, &h);
254              evas\_obscured\_rectangle\_add(evas, w / 4, h / 4, w / 2, h / 2);
255           \}
256         else
257           \{
258              int w, h;
259              Eina\_Rectangle *rect;
260              Eina\_List *updates, *l;
261 
262              evas\_output\_viewport\_get(evas, NULL, NULL, &w, &h);
263              evas\_obscured\_clear(evas);

\end{DoxyCodeInclude}


In that example, pressing the \char`\"{}\+Ctrl\char`\"{} and \char`\"{}o\char`\"{} keys will impose or remove an obscured region in the middle of the canvas. You'll get the same contents at the time the key was pressed, if toggling it on, until you toggle it off again (make sure the animation is running on to get the idea better). See the full \hyperlink{Example_Evas_Events}{example}.


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em x} & The rectangle's top left corner's horizontal coordinate. \\
\hline
\mbox{\tt in}  & {\em y} & The rectangle's top left corner's vertical coordinate \\
\hline
\mbox{\tt in}  & {\em w} & The rectangle's width. \\
\hline
\mbox{\tt in}  & {\em h} & The rectangle's height. \\
\hline
\end{DoxyParams}


References evas\+\_\+canvas\+\_\+obscured\+\_\+rectangle\+\_\+add().

\hypertarget{group__Evas__Canvas_ga760916b7e7f579b14da134859ed3fc74}{\index{Canvas Functions@{Canvas Functions}!evas\+\_\+render\+\_\+dump@{evas\+\_\+render\+\_\+dump}}
\index{evas\+\_\+render\+\_\+dump@{evas\+\_\+render\+\_\+dump}!Canvas Functions@{Canvas Functions}}
\subsubsection[{evas\+\_\+render\+\_\+dump}]{\setlength{\rightskip}{0pt plus 5cm}void evas\+\_\+render\+\_\+dump (
\begin{DoxyParamCaption}
\item[{Evas\+\_\+\+Canvas $\ast$}]{obj}
\end{DoxyParamCaption}
)}}\label{group__Evas__Canvas_ga760916b7e7f579b14da134859ed3fc74}


Make the canvas discard as much data as possible used by the engine at runtime. 

This function will unload images, delete textures and much more, where possible. You may also want to call \hyperlink{group__Evas__Canvas_ga7df42300bf552be347fc7a1d8dd245d2}{evas\+\_\+render\+\_\+idle\+\_\+flush()} immediately prior to this to perhaps discard a little more, though \hyperlink{group__Evas__Canvas_ga760916b7e7f579b14da134859ed3fc74}{evas\+\_\+render\+\_\+dump()} should implicitly delete most of what \hyperlink{group__Evas__Canvas_ga7df42300bf552be347fc7a1d8dd245d2}{evas\+\_\+render\+\_\+idle\+\_\+flush()} might discard too. 

References evas\+\_\+canvas\+\_\+render\+\_\+dump().

\hypertarget{group__Evas__Canvas_ga6bd5caa330850f63f4e9d91271fefc62}{\index{Canvas Functions@{Canvas Functions}!evas\+\_\+obscured\+\_\+clear@{evas\+\_\+obscured\+\_\+clear}}
\index{evas\+\_\+obscured\+\_\+clear@{evas\+\_\+obscured\+\_\+clear}!Canvas Functions@{Canvas Functions}}
\subsubsection[{evas\+\_\+obscured\+\_\+clear}]{\setlength{\rightskip}{0pt plus 5cm}void evas\+\_\+obscured\+\_\+clear (
\begin{DoxyParamCaption}
\item[{Evas\+\_\+\+Canvas $\ast$}]{obj}
\end{DoxyParamCaption}
)}}\label{group__Evas__Canvas_ga6bd5caa330850f63f4e9d91271fefc62}


Remove all \char`\"{}obscured regions\char`\"{} from an Evas canvas. 

This function removes all the rectangles from the obscured regions list of the canvas {\ttfamily e}. It takes obscured areas added with \hyperlink{group__Evas__Canvas_ga163f9df9ba453f2f731c4bea12bb946b}{evas\+\_\+obscured\+\_\+rectangle\+\_\+add()} and make them again a regions that {\bfseries have} to be repainted on rendering updates.

\begin{DoxyNote}{Note}
This is a {\bfseries very low level function}, which most of Evas' users wouldn't care about.

This function does {\bfseries not} flag the canvas as having its state changed. If you want to re-\/render it afterwards expecting new contents, you have to add \char`\"{}damage\char`\"{} regions yourself (see \hyperlink{group__Evas__Canvas_gab1482931249c640efb25453b54950a16}{evas\+\_\+damage\+\_\+rectangle\+\_\+add()}).
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__Evas__Canvas_ga163f9df9ba453f2f731c4bea12bb946b}{evas\+\_\+obscured\+\_\+rectangle\+\_\+add()} for an example 

\hyperlink{group__Evas__Canvas_ga1867d9f5f97545418598496af93e4c71}{evas\+\_\+render\+\_\+updates()} 
\end{DoxySeeAlso}


References evas\+\_\+canvas\+\_\+obscured\+\_\+clear().

\hypertarget{group__Evas__Canvas_ga7df42300bf552be347fc7a1d8dd245d2}{\index{Canvas Functions@{Canvas Functions}!evas\+\_\+render\+\_\+idle\+\_\+flush@{evas\+\_\+render\+\_\+idle\+\_\+flush}}
\index{evas\+\_\+render\+\_\+idle\+\_\+flush@{evas\+\_\+render\+\_\+idle\+\_\+flush}!Canvas Functions@{Canvas Functions}}
\subsubsection[{evas\+\_\+render\+\_\+idle\+\_\+flush}]{\setlength{\rightskip}{0pt plus 5cm}void evas\+\_\+render\+\_\+idle\+\_\+flush (
\begin{DoxyParamCaption}
\item[{Evas\+\_\+\+Canvas $\ast$}]{obj}
\end{DoxyParamCaption}
)}}\label{group__Evas__Canvas_ga7df42300bf552be347fc7a1d8dd245d2}


Make the canvas discard internally cached data used for rendering. 

This function flushes the arrays of delete, active and render objects. Other things it may also discard are\+: shared memory segments, temporary scratch buffers, cached data to avoid re-\/compute of that data etc. 

References evas\+\_\+canvas\+\_\+render\+\_\+idle\+\_\+flush().

\hypertarget{group__Evas__Canvas_ga038d98c7c13a86b6ba4de51f8aba3595}{\index{Canvas Functions@{Canvas Functions}!evas\+\_\+render\+\_\+updates\+\_\+free@{evas\+\_\+render\+\_\+updates\+\_\+free}}
\index{evas\+\_\+render\+\_\+updates\+\_\+free@{evas\+\_\+render\+\_\+updates\+\_\+free}!Canvas Functions@{Canvas Functions}}
\subsubsection[{evas\+\_\+render\+\_\+updates\+\_\+free}]{\setlength{\rightskip}{0pt plus 5cm}void evas\+\_\+render\+\_\+updates\+\_\+free (
\begin{DoxyParamCaption}
\item[{{\bf Eina\+\_\+\+List} $\ast$}]{updates}
\end{DoxyParamCaption}
)}}\label{group__Evas__Canvas_ga038d98c7c13a86b6ba4de51f8aba3595}


Free the rectangles returned by \hyperlink{group__Evas__Canvas_ga1867d9f5f97545418598496af93e4c71}{evas\+\_\+render\+\_\+updates()}. 


\begin{DoxyParams}{Parameters}
{\em updates} & The list of updated rectangles of the canvas.\\
\hline
\end{DoxyParams}
This function removes the region from the render updates list. It makes the region doesn't be render updated anymore.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Evas__Canvas_ga1867d9f5f97545418598496af93e4c71}{evas\+\_\+render\+\_\+updates()} for an example 
\end{DoxySeeAlso}


References E\+I\+N\+A\+\_\+\+L\+I\+S\+T\+\_\+\+F\+R\+E\+E, and eina\+\_\+rectangle\+\_\+free().

\hypertarget{group__Evas__Canvas_ga67e8eb17d2a676bfdfb8794fc5f72bc0}{\index{Canvas Functions@{Canvas Functions}!evas\+\_\+new@{evas\+\_\+new}}
\index{evas\+\_\+new@{evas\+\_\+new}!Canvas Functions@{Canvas Functions}}
\subsubsection[{evas\+\_\+new}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Evas}$\ast$ evas\+\_\+new (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{group__Evas__Canvas_ga67e8eb17d2a676bfdfb8794fc5f72bc0}


Creates a new empty evas. 

Note that before you can use the evas, you will to at a minimum\+: \begin{DoxyItemize}
\item Set its render method with \hyperlink{group__Evas__Output__Method_ga17f2ac9f3bef135cd825774c33762ef2}{evas\+\_\+output\+\_\+method\+\_\+set} . \item Set its viewport size with \hyperlink{group__Evas__Output__Size_ga0a14db31aa30b701688caf67a4649239}{evas\+\_\+output\+\_\+viewport\+\_\+set} . \item Set its size of the canvas with \hyperlink{group__Evas__Output__Size_ga681f2af7d325735af201e18f56f6ef61}{evas\+\_\+output\+\_\+size\+\_\+set} . \item Ensure that the render engine is given the correct settings with \hyperlink{group__Evas__Output__Method_ga7244385cf5bad0591ab82e4437c4694b}{evas\+\_\+engine\+\_\+info\+\_\+set} .\end{DoxyItemize}
This function should only fail if the memory allocation fails

\begin{DoxyNote}{Note}
this function is very low level. Instead of using it directly, consider using the high level functions in \hyperlink{group__Ecore__Evas__Group}{Ecore\+\_\+\+Evas wrapper/helper set of functions} such as {\ttfamily \hyperlink{group__Ecore__Evas__Group_gac7f2cdbcb79635c34317c1183dd04cb0}{ecore\+\_\+evas\+\_\+new()}}. See \hyperlink{group__Ecore}{Ecore}.
\end{DoxyNote}
\begin{DoxyAttention}{Attention}
it is recommended that one calls \hyperlink{group__Evas__Main__Group_ga65b3f060b6dd9e488afd0b8cbe101869}{evas\+\_\+init()} before creating new canvas.
\end{DoxyAttention}
\begin{DoxyReturn}{Returns}
A new uninitialised Evas canvas on success. Otherwise, {\ttfamily N\+U\+L\+L}. 
\end{DoxyReturn}


Referenced by ecore\+\_\+evas\+\_\+buffer\+\_\+allocfunc\+\_\+new(), ecore\+\_\+evas\+\_\+ews\+\_\+new(), and ecore\+\_\+evas\+\_\+object\+\_\+image\+\_\+new().

\hypertarget{group__Evas__Canvas_gaa0d5d3f1a1e1ffa3b14b09bb374215b4}{\index{Canvas Functions@{Canvas Functions}!evas\+\_\+free@{evas\+\_\+free}}
\index{evas\+\_\+free@{evas\+\_\+free}!Canvas Functions@{Canvas Functions}}
\subsubsection[{evas\+\_\+free}]{\setlength{\rightskip}{0pt plus 5cm}void evas\+\_\+free (
\begin{DoxyParamCaption}
\item[{{\bf Evas} $\ast$}]{e}
\end{DoxyParamCaption}
)}}\label{group__Evas__Canvas_gaa0d5d3f1a1e1ffa3b14b09bb374215b4}


Frees the given evas and any objects created on it. 

Any objects with 'free' callbacks will have those callbacks called in this function.


\begin{DoxyParams}{Parameters}
{\em e} & The given evas. \\
\hline
\end{DoxyParams}
