Amiga.org
Operating System Specific Discussions => Amiga OS => Amiga OS -- Development => Topic started by: Wol on September 27, 2006, 09:41:07 PM
-
Hi All,
Just can't get my thick head round the Input Device.:-?
Would some nice guy or gal post a "C" example of Input.Device use..
Say, Open the device, wait for something (Mouse/Key/Disk) etc,
then Quit and clean up.
A basic example would be fine, I only require a template to
work with and experiment.
Wol.
PS: Err, forgot to add, it's OS 3x I am progging for..
-
Why do you want to use input.device ? Usually an application has a window and you can use the window's IDCMP port to wait for input events.
Here is an example for how to use IDCMP for a game: http://thomas-rapp.homepage.t-online.de/examples/KeyJoy.c
And here is an example for drawing with the mouse: http://thomas-rapp.homepage.t-online.de/examples/draw.c
Edit: here is an example which waits for a mouse click using input.device (without a window): http://thomas-rapp.homepage.t-online.de/examples/WaitForClick.c
Bye,
Thomas
-
Hi Thomas,
The reason I want to use the input device is , I have written
a screen blanker which rotates a 3d cube across all my
monitors (4). The program works fine when active, but I
need to monitor for events while it is sleeping and counting
since the last event before becomming active.
Thx for the links, I will follow them..
Regs: Wol.
-
Unless you want to run on Kick 1.3 you should rather use a commodity for that.
Bye,
Thomas
-
>> a screen blanker which ... across all my monitors (4).
Four monitors? Cool! How are you doing it? the Amiga chipset and 3 graphics cards? Or a toaster with it's preview outputs?
-
@ hardlink,
Yes 3 gfx cards + aga (A4000 tower)
Wol.