This code places seven Elementary slider widgets on a window, each of them exemplifying a part of the widget\textquotesingle{}s API.

The first of them is the default slider\+:  
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{   sl = \mbox{\hyperlink{group__Elm__Slider_ga58cf356a9343fe07e4977719848e7608}{elm\_slider\_add}}(win);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_gaaf1d3e26e36b316977336066b6f56632}{evas\_object\_size\_hint\_align\_set}}(sl, \mbox{\hyperlink{Evas__Common_8h_aecbac710f36d52911fc34dcdaf8e729c}{EVAS\_HINT\_FILL}}, 0.5);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga9379629ad8ad2860aa786d838a4a106a}{evas\_object\_size\_hint\_weight\_set}}(sl, \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}}, \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Box__Group_ga66a10dd861578521af2ab7b8c2ca65c5}{elm\_box\_pack\_end}}(bx, sl);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(sl);}

\end{DoxyCodeInclude}
 As you see, the defaults for a slider are\+: \begin{DoxyItemize}
\item horizontal \item no label \item no values (on indicator or unit labels)\end{DoxyItemize}
Actually it\textquotesingle{}s pretty useless this way. So let\textquotesingle{}s learn how to improve it.

If some decoration is required, a label can be set, and icon before and after the bar as well. On the second slider will add a {\ttfamily home} icon and a {\ttfamily folder} icon at {\ttfamily end}. 
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{   elm\_object\_text\_set(sl, \textcolor{stringliteral}{"{}Counter"{}});}
\DoxyCodeLine{}
\DoxyCodeLine{   ic = \mbox{\hyperlink{group__Elm__Icon_gac369f2d67be417e5cff81e8f001ff326}{elm\_icon\_add}}(win);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Icon_gab764b4c6c90543f254c013eff6a6db66}{elm\_icon\_standard\_set}}(ic, \textcolor{stringliteral}{"{}home"{}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Image_ga6a389436a18e590fff5b6f6b81c72722}{elm\_image\_resizable\_set}}(ic, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}}, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__General_ga0531ec8867c72def7c780601764ca642}{elm\_object\_part\_content\_set}}(sl, \textcolor{stringliteral}{"{}icon"{}}, ic);}
\DoxyCodeLine{}
\DoxyCodeLine{   ic = \mbox{\hyperlink{group__Elm__Icon_gac369f2d67be417e5cff81e8f001ff326}{elm\_icon\_add}}(win);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Icon_gab764b4c6c90543f254c013eff6a6db66}{elm\_icon\_standard\_set}}(ic, \textcolor{stringliteral}{"{}folder"{}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Image_ga6a389436a18e590fff5b6f6b81c72722}{elm\_image\_resizable\_set}}(ic, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}}, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__General_ga0531ec8867c72def7c780601764ca642}{elm\_object\_part\_content\_set}}(sl, \textcolor{stringliteral}{"{}end"{}}, ic);}

\end{DoxyCodeInclude}
 If the bar size need to be changed, it can be done with span set function, that doesn\textquotesingle{}t accounts other widget\textquotesingle{}s parts size. Also the bar can starts with a not default value (0.\+0), as we done on third slider\+: 
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Slider_ga74e14a46f516a1505242bddc434f938d}{elm\_slider\_value\_set}}(sl, 1);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Slider_ga96b5e8176a6bdb4e932e32329e6fa742}{elm\_slider\_span\_size\_set}}(sl, 200);}

\end{DoxyCodeInclude}
 So far, users won\textquotesingle{}t be able to see the slider value. If it\textquotesingle{}s required, it can be displayed in two different areas, units label or above the indicator.

Let\textquotesingle{}s place a units label on our widget, and also let\textquotesingle{}s set minimum and maximum value (uses 0.\+0 and 1.\+0 by default)\+: 
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Slider_gaa58c280b3916b35f52db525d3d921004}{elm\_slider\_unit\_format\_set}}(sl, \textcolor{stringliteral}{"{}\%1.0f units"{}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Slider_ga5368bb23df3d5253ab388195812e792b}{elm\_slider\_min\_max\_set}}(sl, 0, 100);}

\end{DoxyCodeInclude}
 If above the indicator is the place to display the value, just set it. Also, is possible to invert a bar, as you can see\+: 
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Slider_ga8d90d63bc776df76676b2d4efde094a2}{elm\_slider\_indicator\_format\_set}}(sl, \textcolor{stringliteral}{"{}\%1.2f"{}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Slider_gafb58be6aec6660c443263e6381e49a2b}{elm\_slider\_inverted\_set}}(sl, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}

\end{DoxyCodeInclude}
 But if you require to use a function a bit more customized to show the value, is possible to registry a callback function that will be called to display unit or indicator label. Only the value will be passed to this function, that should return a string. In this case, a function to free this string will be required.

Let\textquotesingle{}s exemplify with indicator label on our sixth slider\+:  
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_indicator\_free(\textcolor{keywordtype}{char} *str)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   free(str);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{EAPI\_MAIN \textcolor{keywordtype}{int}}
\DoxyCodeLine{elm\_main(\textcolor{keywordtype}{int} argc \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}}, \textcolor{keywordtype}{char} **argv \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *win, *bx, *sl, *ic;}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__General_ga7a05f37fd3a019da5e26c5fc91fcd937}{elm\_policy\_set}}(\mbox{\hyperlink{group__Elm__General_ggaa16f3378ecdbf660fa378402e3c5a0a9a02fadb6faada04b19d0fa42c11a8d32a}{ELM\_POLICY\_QUIT}}, \mbox{\hyperlink{group__Elm__General_gga46af37e6ac2c406321060be827117196abbe0962d88ae12afe1a173da881f56cd}{ELM\_POLICY\_QUIT\_LAST\_WINDOW\_CLOSED}});}
\DoxyCodeLine{}
\DoxyCodeLine{   win = \mbox{\hyperlink{group__Elm__Win__Group_ga23d9d1ffa0a65a1a1dd482d570db1ba0}{elm\_win\_util\_standard\_add}}(\textcolor{stringliteral}{"{}slider"{}}, \textcolor{stringliteral}{"{}Slider Example"{}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Win__Group_ga9a16a2f8c9fd5b6e9203ed9dcb53ea8b}{elm\_win\_autodel\_set}}(win, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{}
\DoxyCodeLine{   bx = \mbox{\hyperlink{group__Elm__Box__Group_ga49ec615c90bf8bead2158d5ffab2e445}{elm\_box\_add}}(win);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga9379629ad8ad2860aa786d838a4a106a}{evas\_object\_size\_hint\_weight\_set}}(bx, \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}}, \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Win__Group_ga505d6bd217e5ee01e82b548ec35986eb}{elm\_win\_resize\_object\_add}}(win, bx);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(bx);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{/* default */}}
\DoxyCodeLine{   sl = \mbox{\hyperlink{group__Elm__Slider_ga58cf356a9343fe07e4977719848e7608}{elm\_slider\_add}}(win);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_gaaf1d3e26e36b316977336066b6f56632}{evas\_object\_size\_hint\_align\_set}}(sl, \mbox{\hyperlink{Evas__Common_8h_aecbac710f36d52911fc34dcdaf8e729c}{EVAS\_HINT\_FILL}}, 0.5);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga9379629ad8ad2860aa786d838a4a106a}{evas\_object\_size\_hint\_weight\_set}}(sl, \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}}, \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Box__Group_ga66a10dd861578521af2ab7b8c2ca65c5}{elm\_box\_pack\_end}}(bx, sl);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(sl);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{/* with icon, end and label */}}
\DoxyCodeLine{   sl = \mbox{\hyperlink{group__Elm__Slider_ga58cf356a9343fe07e4977719848e7608}{elm\_slider\_add}}(win);}
\DoxyCodeLine{   elm\_object\_text\_set(sl, \textcolor{stringliteral}{"{}Counter"{}});}
\DoxyCodeLine{}
\DoxyCodeLine{   ic = \mbox{\hyperlink{group__Elm__Icon_gac369f2d67be417e5cff81e8f001ff326}{elm\_icon\_add}}(win);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Icon_gab764b4c6c90543f254c013eff6a6db66}{elm\_icon\_standard\_set}}(ic, \textcolor{stringliteral}{"{}home"{}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Image_ga6a389436a18e590fff5b6f6b81c72722}{elm\_image\_resizable\_set}}(ic, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}}, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__General_ga0531ec8867c72def7c780601764ca642}{elm\_object\_part\_content\_set}}(sl, \textcolor{stringliteral}{"{}icon"{}}, ic);}
\DoxyCodeLine{}
\DoxyCodeLine{   ic = \mbox{\hyperlink{group__Elm__Icon_gac369f2d67be417e5cff81e8f001ff326}{elm\_icon\_add}}(win);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Icon_gab764b4c6c90543f254c013eff6a6db66}{elm\_icon\_standard\_set}}(ic, \textcolor{stringliteral}{"{}folder"{}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Image_ga6a389436a18e590fff5b6f6b81c72722}{elm\_image\_resizable\_set}}(ic, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}}, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__General_ga0531ec8867c72def7c780601764ca642}{elm\_object\_part\_content\_set}}(sl, \textcolor{stringliteral}{"{}end"{}}, ic);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_gaaf1d3e26e36b316977336066b6f56632}{evas\_object\_size\_hint\_align\_set}}(sl, \mbox{\hyperlink{Evas__Common_8h_aecbac710f36d52911fc34dcdaf8e729c}{EVAS\_HINT\_FILL}}, 0.5);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga9379629ad8ad2860aa786d838a4a106a}{evas\_object\_size\_hint\_weight\_set}}(sl, \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}}, \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Box__Group_ga66a10dd861578521af2ab7b8c2ca65c5}{elm\_box\_pack\_end}}(bx, sl);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(sl);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{/* value set and span size */}}
\DoxyCodeLine{   sl = \mbox{\hyperlink{group__Elm__Slider_ga58cf356a9343fe07e4977719848e7608}{elm\_slider\_add}}(win);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Slider_ga74e14a46f516a1505242bddc434f938d}{elm\_slider\_value\_set}}(sl, 1);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Slider_ga96b5e8176a6bdb4e932e32329e6fa742}{elm\_slider\_span\_size\_set}}(sl, 200);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_gaaf1d3e26e36b316977336066b6f56632}{evas\_object\_size\_hint\_align\_set}}(sl, \mbox{\hyperlink{Evas__Common_8h_aecbac710f36d52911fc34dcdaf8e729c}{EVAS\_HINT\_FILL}}, 0.5);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga9379629ad8ad2860aa786d838a4a106a}{evas\_object\_size\_hint\_weight\_set}}(sl, \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}}, \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Box__Group_ga66a10dd861578521af2ab7b8c2ca65c5}{elm\_box\_pack\_end}}(bx, sl);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(sl);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{/* with unit label and min -\/ max */}}
\DoxyCodeLine{   sl = \mbox{\hyperlink{group__Elm__Slider_ga58cf356a9343fe07e4977719848e7608}{elm\_slider\_add}}(win);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Slider_gaa58c280b3916b35f52db525d3d921004}{elm\_slider\_unit\_format\_set}}(sl, \textcolor{stringliteral}{"{}\%1.0f units"{}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Slider_ga5368bb23df3d5253ab388195812e792b}{elm\_slider\_min\_max\_set}}(sl, 0, 100);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_gaaf1d3e26e36b316977336066b6f56632}{evas\_object\_size\_hint\_align\_set}}(sl, \mbox{\hyperlink{Evas__Common_8h_aecbac710f36d52911fc34dcdaf8e729c}{EVAS\_HINT\_FILL}}, 0.5);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga9379629ad8ad2860aa786d838a4a106a}{evas\_object\_size\_hint\_weight\_set}}(sl, \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}}, \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Box__Group_ga66a10dd861578521af2ab7b8c2ca65c5}{elm\_box\_pack\_end}}(bx, sl);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(sl);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{/* with indicator label and inverted */}}
\DoxyCodeLine{   sl = \mbox{\hyperlink{group__Elm__Slider_ga58cf356a9343fe07e4977719848e7608}{elm\_slider\_add}}(win);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Slider_ga8d90d63bc776df76676b2d4efde094a2}{elm\_slider\_indicator\_format\_set}}(sl, \textcolor{stringliteral}{"{}\%1.2f"{}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Slider_gafb58be6aec6660c443263e6381e49a2b}{elm\_slider\_inverted\_set}}(sl, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_gaaf1d3e26e36b316977336066b6f56632}{evas\_object\_size\_hint\_align\_set}}(sl, \mbox{\hyperlink{Evas__Common_8h_aecbac710f36d52911fc34dcdaf8e729c}{EVAS\_HINT\_FILL}}, 0.5);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga9379629ad8ad2860aa786d838a4a106a}{evas\_object\_size\_hint\_weight\_set}}(sl, \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}}, \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Box__Group_ga66a10dd861578521af2ab7b8c2ca65c5}{elm\_box\_pack\_end}}(bx, sl);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(sl);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{/* vertical with indicator format func */}}
\DoxyCodeLine{   sl = \mbox{\hyperlink{group__Elm__Slider_ga58cf356a9343fe07e4977719848e7608}{elm\_slider\_add}}(win);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Slider_gab59b52f2d676ebd59f301ce9e34eaa17}{elm\_slider\_horizontal\_set}}(sl, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Slider_gaf34f35f4dcc1eff5c0bf303500045aaa}{elm\_slider\_indicator\_format\_function\_set}}(sl, \_indicator\_format,}
\DoxyCodeLine{                                            \_indicator\_free);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_gaaf1d3e26e36b316977336066b6f56632}{evas\_object\_size\_hint\_align\_set}}(sl, 0.5, \mbox{\hyperlink{Evas__Common_8h_aecbac710f36d52911fc34dcdaf8e729c}{EVAS\_HINT\_FILL}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga9379629ad8ad2860aa786d838a4a106a}{evas\_object\_size\_hint\_weight\_set}}(sl, 0, \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Box__Group_ga66a10dd861578521af2ab7b8c2ca65c5}{elm\_box\_pack\_end}}(bx, sl);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(sl);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{/* callbacks */}}
\DoxyCodeLine{   sl = \mbox{\hyperlink{group__Elm__Slider_ga58cf356a9343fe07e4977719848e7608}{elm\_slider\_add}}(win);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Slider_gaa58c280b3916b35f52db525d3d921004}{elm\_slider\_unit\_format\_set}}(sl, \textcolor{stringliteral}{"{}\%1.3f units"{}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_gaaf1d3e26e36b316977336066b6f56632}{evas\_object\_size\_hint\_align\_set}}(sl, \mbox{\hyperlink{Evas__Common_8h_aecbac710f36d52911fc34dcdaf8e729c}{EVAS\_HINT\_FILL}}, 0.5);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga9379629ad8ad2860aa786d838a4a106a}{evas\_object\_size\_hint\_weight\_set}}(sl, \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}}, \mbox{\hyperlink{Evas__Common_8h_aa47c85083d3dae0111c21ec49359306a}{EVAS\_HINT\_EXPAND}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Box__Group_ga66a10dd861578521af2ab7b8c2ca65c5}{elm\_box\_pack\_end}}(bx, sl);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(sl);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Smart__Object__Group_gac12dd6655f488cc47ce6cf00eb7d12b2}{evas\_object\_smart\_callback\_add}}(sl, \textcolor{stringliteral}{"{}changed"{}}, \_changed\_cb, NULL);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Smart__Object__Group_gac12dd6655f488cc47ce6cf00eb7d12b2}{evas\_object\_smart\_callback\_add}}(sl, \textcolor{stringliteral}{"{}delay,changed"{}}, \_delay\_changed\_cb, NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(win);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__General_gadf2553f83e6b0b9c7fbe054019a664a1}{elm\_run}}();}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\}}

\end{DoxyCodeInclude}
 Setting callback functions\+: 
\begin{DoxyCodeInclude}{0}

\end{DoxyCodeInclude}
 Also, a slider can be displayed vertically\+:  
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Slider_gab59b52f2d676ebd59f301ce9e34eaa17}{elm\_slider\_horizontal\_set}}(sl, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}});}

\end{DoxyCodeInclude}
 Finally the last widget will exemplify how to listen to widget\textquotesingle{}s signals, {\ttfamily  changed } and {\ttfamily  delay,changed }. First we need to implement callback functions that will simply print slider\textquotesingle{}s value\+:  
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_delay\_changed\_cb(\textcolor{keywordtype}{void} *data \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}}, \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *obj, \textcolor{keywordtype}{void} *event\_info \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{keywordtype}{double} val = \mbox{\hyperlink{group__Elm__Slider_ga2dd3f70cdbcb4a81b5d7a08a18afaa1d}{elm\_slider\_value\_get}}(obj);}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}Delay changed to \%1.2f\(\backslash\)n"{}}, val);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{char}*}
\DoxyCodeLine{\_indicator\_format(\textcolor{keywordtype}{double} val)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{keywordtype}{char} *indicator = malloc(\textcolor{keyword}{sizeof}(\textcolor{keywordtype}{char}) * 32);}
\DoxyCodeLine{   snprintf(indicator, 32, \textcolor{stringliteral}{"{}\%1.2f u"{}}, val);}
\DoxyCodeLine{   \textcolor{keywordflow}{return} indicator;}
\DoxyCodeLine{\}}

\end{DoxyCodeInclude}
 The first callback function should be called everytime value changes, the second one only after user stops to increment or decrement. Try to keep arrows pressed and check the difference. 
\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Smart__Object__Group_gac12dd6655f488cc47ce6cf00eb7d12b2}{evas\_object\_smart\_callback\_add}}(sl, \textcolor{stringliteral}{"{}changed"{}}, \_changed\_cb, NULL);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Smart__Object__Group_gac12dd6655f488cc47ce6cf00eb7d12b2}{evas\_object\_smart\_callback\_add}}(sl, \textcolor{stringliteral}{"{}delay,changed"{}}, \_delay\_changed\_cb, NULL);}

\end{DoxyCodeInclude}
 See the full \mbox{\hyperlink{slider_example_8c-example}{example}}, whose window should look like this picture\+:

 
\begin{DoxyImageNoCaption}
  \mbox{\includegraphics[width=\textwidth]{screenshots/slider_example}}
\end{DoxyImageNoCaption}


See the full \mbox{\hyperlink{slider_example_8c-example}{source code}} for this example. 