Current section
Files
Jump to
Current section
Files
src/examples@color_selection.erl
-module(examples@color_selection).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]).
-export([main/0]).
-spec main() -> gleam@option:option({integer(), binary()}).
main() ->
Answer = begin
_pipe = [<<"zenity"/utf8>>],
_pipe@1 = gu:new_color_selection(_pipe, none, false),
_pipe@2 = gu:set_title(_pipe@1, <<"Color Selection"/utf8>>),
gu:run(_pipe@2, false)
end,
Answer@1 = case Answer of
{some, {_, Val}} ->
gu:parse(Val);
none ->
<<"No color selected"/utf8>>
end,
_pipe@3 = [<<"zenity"/utf8>>],
_pipe@4 = gu:new_info(_pipe@3),
_pipe@5 = gu:set_text(_pipe@4, Answer@1),
_pipe@6 = gu:set_timeout(_pipe@5, 10),
gu:run(_pipe@6, false).