Meta: Add files to repository
This commit is contained in:
parent
80a0428b66
commit
39198164cd
1029 changed files with 78311 additions and 0 deletions
25
Applications/OS/ShutDown.app/Run.HC
Normal file
25
Applications/OS/ShutDown.app/Run.HC
Normal file
|
@ -0,0 +1,25 @@
|
|||
Gui.App();
|
||||
|
||||
U0 @shutdown_callback(U64 o)
|
||||
{
|
||||
if (!o)
|
||||
return;
|
||||
if (o(Window*)->signature == WIN_SIGNATURE) {
|
||||
Compositor.DestroyWindow(o(Window*));
|
||||
Gui.Window.SetFocus(Compositor.GetWindowByTitle("Wallpaper"));
|
||||
return;
|
||||
}
|
||||
switch (o(Widget*)->tag) {
|
||||
case TRUE:
|
||||
System.PowerOff();
|
||||
break;
|
||||
default:
|
||||
Compositor.DestroyWindow(o(Widget*)->parent_win);
|
||||
Gui.Window.SetFocus(Compositor.GetWindowByTitle("Wallpaper"));
|
||||
return;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
MessageBox.Alert("Do you want to shut down this computer?",
|
||||
"[\"OK\",\"Cancel\"]", &@shutdown_callback);
|
Loading…
Add table
Add a link
Reference in a new issue