in reply to Win32::API
There are two drawbacks to Win32::API that I've noticed so far. One could be easily remedied, while the other is probably not something I should hold my breath for...
hold your breath instead :-)
I'm working on a new release of Win32::API which will make your life a lot easier by supporting not only named types (eg. WORD, DWORD et al.) but structures too.
soon (I hope) you'll be able to say:
...and callbacks will be there. I'm still cleaning things up, but I bet you'll be surprised :-)use Win32::API 0.40; Win32::API::Struct->typedef 'POINT', qw( LONG x LONG y ); Win32::API->Import( 'user32', 'BOOL GetCursorPos(LPPOINT lpPoint)' ); my $point = Win32::API::Struct->new('POINT'); my $retval = GetCursorPos($point); print "Cursor is at $point->{x}, $point->{y}\n";
oh, and BTW:
One example I'm thinking of is placing icons in the system tray. To be able to respond to mouse clicks, the function call that places the icon there must specify a callback that gets executed on a mouse click. AFAIK, there is no way to do this yet in Perl, and it may be impossible at the present.
well, there's Win32::GUI for this.
cheers,
Aldo
__END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Win32::API (finally)
by dada (Chaplain) on Mar 07, 2003 at 14:17 UTC | |
by SyN/AcK (Scribe) on Jul 16, 2003 at 04:13 UTC | |
by neauva (Initiate) on Aug 19, 2003 at 22:01 UTC | |
by BrowserUk (Patriarch) on Aug 20, 2003 at 00:09 UTC |