Audio (104) Datatype (15) Demo (56) Development (247) Document (64) Driver (19) Emulation (62) Game (533) Graphics (229) Library (22) Network (63) Office (22) Utility (271) Video (18)
Total files: 1725
Full index file Recent index file
Part of Aros World Exec |
Daysleeper | Description: | Shutdown/reboot at a selected time | Download: | daysleeper.i386-aros.lha (TIPS: Use the right click menu if your browser takes you back here all the time) | Size: | 154kb | Version: | 0.9r2 | Date: | 18 Jul 14 | Author: | r-tea amiga pl (Artur r-tea Ostrowski), AROS Miloslav Martinka | Submitter: | Miloslav Martinka | Requirements: | ABIv0 - i386 | Category: | utility/misc | License: | Other | Distribute: | yes | FileID: | 1400 | | | Snapshots:
| |
| Comments: | 0 | Snapshots: | 1 | Videos: | 0 | Downloads: | 229 (Current version) | | 229 (Accumulated) | Votes: | 0 (0/0) (30 days/7 days) | |
[Show comments] [Show snapshots] [Show videos] [Show content] [Replace file] ** r2:
-- added code so iconify show daysleeper icon on wb, and not default mui one
-- added Mason's icon as well
** r1:
--added forgoten droping of muimasteriface at exit (so expunge will works)
--replaced all %d on %ld (beacuse taking 16bit arguments from stack suck, and
on amiga everything is pushed as 32bit value onto the stack)
--reworked some cycle-buttons related code to make cycle buttons reacts fine
(as it was done by original author there was set and input mode for cycle
buttons, which will cause mui eat all niput events for that button before the
cucle class is able to handle them itself to open the popup menu, so we just use
old macro Cycle(entries) ). Thanks to Thore for all points about.
! AOS4 NOTE: ! "Shutdown" command is not implements currently in aos4. So or you
use "reboot" functionality only, or, if you want shutdown , then just grab
necesary shutdown binary from os4depot (for peg2 its "pegoff", for sam/x1000 its
"poff"). Just rename it to "shutdown" and place somewhere in your system pathes
(like as usuall in C:)
Once upon a time my wife's brother told me he got a nice little proggy which
shuts down his computer (with Windows) while he watches a film, he got asleep
and the film ends. I answered I don't have such a programm but I can create
similar thing.
And that was the purpose of creating this little clock / time utility.The second
(and maybe more important) reason for which I created this program was that I
love MUI as an user and as a "sunday programmer" :-) I consider MUI API as
really cool and easy to use for not very experienced programmers like me. And I
consider MUI GUI and all MUI's environment (from an user point of view) as the
best environment one's ever seen.
A long time had elapsed since my last attempts of programming, so it was a good
opportunity to start it again :-)
Now facts:
Program was compiled on MorphOS 3.3 (MUI 4.2 debug) with GCC compiler. As well
as port to AmigaOS4 done by kas1e for mui4-r3 (http://muidev.de), which have
necessary clock.mcc class.
Source, with lots of comments, included.
NOTE! This is not good exapmle of building proper MUI application. In fact this
is the worst example of it :-) I used the main MUI loop and put there all the
programm handling events. This is the easiest way for "sunday programmers" but
remember: the worst way to buid a serious MUI application, thus consider it as
an example for very beginners.
Feel free to distribute the source code, share with it, do any changes as well
as copy all or parts of it. Just play with it and see how brilliant is MUI :-)
Please, let me know if you found it useful in any way, either if you have any
suggestions or comments. Would be nice to receive a grab of Daysleeper window
with your MUI's favourite prefs :-)
For those who want to play with my lame code :-) This is the command line string
I used to compile the source:
For GCC compiler on AROS:
gcc -DMUI_OBSOLETE -D__AROS__ daysleeper.c -lmui -lintuition
For GCC compiler on morphos:
gcc -noixemul -o executable sourcecode
For compile on amigaos4:
gcc -D__USE_INLINE__ -o executable sourcecode -lauto
-noixemul compiler uses libnix.library instead of ixemul.library.
It makes output code much bigger but saves system recources -
memory, disk operation etc.
executable is the name of output code
souurcecode is your program source code (with path if you need)
For VBCC compiler:
vc exec -+ -lauto -lmieee -o myprogram
some explanatios:
exec name of output code
-+ to make use of C++ like comments
-lauto don't know what for but needed :-)
-lmieee to make use of mathematical standard ANSI C libs
-o your program source code (with path if you need)
MUI's author: Stefan Stuntz. Further developing by MorphOS Team.
AmigaOS4 version of MUI: Stefan Stuntz. Futher developing by Thore and Jens.
Amiga VBCC author: Frank Wille
The clock icon comes from Aminet, from Alpyreicons1 set by Alper Sonmez.
|