You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(6) |
Nov
(31) |
Dec
(6) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(6) |
Feb
|
Mar
(17) |
Apr
(17) |
May
(27) |
Jun
(67) |
Jul
(26) |
Aug
(15) |
Sep
(2) |
Oct
(24) |
Nov
(6) |
Dec
|
2007 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(28) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
(21) |
Feb
(45) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
(3) |
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Robert M. <rob...@us...> - 2006-04-25 21:38:27
|
Update of /cvsroot/perl-win32-gui/Win32-GUI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2364 Modified Files: CHANGELOG MANIFEST Log Message: Add Win32::GUI::DropFiles Index: CHANGELOG =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/CHANGELOG,v retrieving revision 1.80 retrieving revision 1.81 diff -C2 -d -r1.80 -r1.81 *** CHANGELOG 25 Apr 2006 21:24:51 -0000 1.80 --- CHANGELOG 25 Apr 2006 21:38:18 -0000 1.81 *************** *** 6,9 **** --- 6,13 ---- Win32-GUI ChangeLog =================== + + [Robert May] : 25 Apr 2006 - Add Win32::GUI::DropFiles + - add Win32-GUI-DropFiles directory and new files + - update MANIFEST + + [Robert May] : 25 Apr 2006 - Fix build under cygwin/MSVC7 - RichEdit.xs fix precedence warning under VC7 Index: MANIFEST =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/MANIFEST,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** MANIFEST 16 Mar 2006 21:11:12 -0000 1.14 --- MANIFEST 25 Apr 2006 21:38:18 -0000 1.15 *************** *** 131,134 **** --- 131,135 ---- t/50_Richedit_GetCharFormat.t t/98_Pod.t + t/99_pod_coverage.t TabStrip.xs Textfield.xs *************** *** 141,143 **** --- 142,166 ---- UpDown.xs vsplit.cur + Win32-GUI-DropFiles/demos/DropFilesDemo.pl + Win32-GUI-DropFiles/DropFiles.pm + Win32-GUI-DropFiles/DropFiles.xs + Win32-GUI-DropFiles/DropFilesRC.PL + Win32-GUI-DropFiles/Makefile.PL + Win32-GUI-DropFiles/ppport.h + Win32-GUI-DropFiles/README + Win32-GUI-DropFiles/t/01_load.t + Win32-GUI-DropFiles/t/02_old_callback.t + Win32-GUI-DropFiles/t/03_new_callback.t + Win32-GUI-DropFiles/t/04_GetDroppedFiles.t + Win32-GUI-DropFiles/t/05_GetDroppedFile.t + Win32-GUI-DropFiles/t/06_GetDropPos.t + Win32-GUI-DropFiles/t/07_DragQueryFile.t + Win32-GUI-DropFiles/t/08_DragQueryPoint.t + Win32-GUI-DropFiles/t/09_DragFinish.t + Win32-GUI-DropFiles/t/10_Unicode.t + Win32-GUI-DropFiles/t/11_invalid_handles.t + Win32-GUI-DropFiles/t/98_pod.t + Win32-GUI-DropFiles/t/99_pod_coverage.t + Win32-GUI-DropFiles/t/DropTest.pm + Win32-GUI-DropFiles/TYPEMAP Window.xs |
From: Robert M. <rob...@us...> - 2006-04-25 21:38:27
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-DropFiles/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2364/Win32-GUI-DropFiles/t Added Files: 01_load.t 02_old_callback.t 03_new_callback.t 04_GetDroppedFiles.t 05_GetDroppedFile.t 06_GetDropPos.t 07_DragQueryFile.t 08_DragQueryPoint.t 09_DragFinish.t 10_Unicode.t 11_invalid_handles.t 98_pod.t 99_pod_coverage.t DropTest.pm Log Message: Add Win32::GUI::DropFiles --- NEW FILE: 99_pod_coverage.t --- #!perl -wT # Win32::GUI::DropFiles test suite. # $Id: 99_pod_coverage.t,v 1.1 2006/04/25 21:38:19 robertemay Exp $ # Check the POD covers all method calls use strict; use warnings; use Test::More; eval "use Test::Pod::Coverage 1.04"; plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@; plan skip_all => "Pod Coverage tests for Win32::GUI::DropFiles done by core" if $ENV{W32G_CORE}; all_pod_coverage_ok(); --- NEW FILE: 10_Unicode.t --- #!perl -w # Win32::GUI::DropFiles test suite # $Id: 10_Unicode.t,v 1.1 2006/04/25 21:38:19 robertemay Exp $ # # Test Win32::GUI::DropFiles Unicode support use strict; use warnings; BEGIN { $| = 1 } # Autoflush # We assume that 01_load.t has been run, so we know we have Test::More # and that Win32::GUI and Win32::GUI::DropFiles will load. use Test::More; BEGIN { #No unicode support before WinNT plan skip_all => "No Unicode filename support in Win95/98/ME" if Win32::GetOSVersion() < 2; eval "use Win32::API 0.41"; plan skip_all => "Win32::API 0.41 required for testing Uniocde Support" if $@; eval "use Unicode::String"; plan skip_all => "Unicode::String required for testing Unicode Support" if $@; } # Load our helpers use FindBin; use lib "$FindBin::Bin"; use DropTest; use Win32::GUI 1.03_02; use Win32::GUI::DropFiles; my @tests = ( # Ascii chars only [ "AB", "C", "Longer Name with spaces", ], # Simley face [ "\x{263A}", ], # Hello World - multi-lingual [ "Hello world", "\x{039A}\x{03B1}\x{03BB}\x{3B7}\x{03BC}\x{1F73}\x{03C1}\x{03B1}", "\x{03B1}\x{1F79}\x{03C3}\x{03BC}\x{03B5}, \x{30B3}\x{30F3}\x{30CB}\x{30C1}\x{30CF}", ], # Thai [ "\x{0E4F} \x{0E41}\x{0E1C}\x{0E48}\x{0E19}\x{0E14}\x{0E34}\x{0E19}\x{0E2E}\x{0E31}\x{0E48}\x{0E19}\x{0E40}\x{0E2A}\x{0E37}\x{0E48}\x{0E2D}\x{0E21}\x{0E42}\x{0E17}\x{0E23}\x{0E21}\x{0E41}\x{0E2A}\x{0E19}\x{0E2A}\x{0E31}\x{0E07}\x{0E40}\x{0E27}\x{0E0A}", "\x{0E1E}\x{0E23}\x{0E30}\x{0E1B}\x{0E01}\x{0E40}\x{0E01}\x{0E28}\x{0E01}\x{0E2D}\x{0E07}\x{0E1A}\x{0E39}\x{0E4A}\x{0E01}\x{0E39}\x{0E49}\x{0E02}\x{0E36}\x{0E49}\x{0E19}\x{0E43}\x{0E2B}\x{0E21}\x{0E48}", ], ); plan tests => 1 * scalar @tests; my $W = Win32::GUI::Window->new( -name => 'win', -title => "Win32::GUI DropFiles Test", -size => [400,300], -onDropFiles => \&drop, ); Win32::GUI::DoEvents(); my $files; while($files = shift @tests) { my $dt = DropTest->new(files => $files, wide => 1); $dt->PostDropMessage($W); Win32::GUI::Dialog(); } exit(0); sub drop { my ($self, $dropobj) = @_; my @f = $dropobj->GetDroppedFiles(); ok(eq_set($files,\@f), "Correct set of files found"); return -1; } --- NEW FILE: 98_pod.t --- #!perl -wT # Win32::GUI::DropFiles test suite. # $Id: 98_pod.t,v 1.1 2006/04/25 21:38:19 robertemay Exp $ # Check that our pod documentation has valid syntax use strict; use warnings; BEGIN { $| = 1 } # Autoflush use Test::More; eval "use Test::Pod 1.14"; plan skip_all => "Test::Pod 1.14 required for testing POD" if $@; plan skip_all => "Pod tests for Win32::GUI::DropFiles done by core" if $ENV{W32G_CORE}; all_pod_files_ok(); --- NEW FILE: 03_new_callback.t --- #!perl -w # Win32::GUI::DropFiles test suite # $Id: 03_new_callback.t,v 1.1 2006/04/25 21:38:19 robertemay Exp $ # # Test Win32::GUI DropFiles callback after loading Win32::GUI::DropFiles # - check pre-requsites # - check both OEM and NEM callbacks # - check callback parameter types # - check that DragFinish is called use strict; use warnings; BEGIN { $| = 1 } # Autoflush # We assume that 01_load.t has been run, so we know we have Test::More # and that Win32::GUI and Win32::GUI::DropFiles will load. use Test::More; BEGIN { eval "use Win32::API 0.41"; plan skip_all => "Win32::API 0.41 required for testing New Callback API" if $@; } plan tests => 7; # Load our helpers use FindBin; use lib "$FindBin::Bin"; use DropTest; use Win32::GUI 1.03_02; use Win32::GUI::DropFiles; my $dropobj = DropTest->new(); my $W = Win32::GUI::Window->new( -name => 'win', -title => "Win32::GUI DropFiles Test", -size => [400,300], -onDropFiles => \&drop, -eventmodel => "byname", ); Win32::GUI::DoEvents(); # Do the OEM tests $dropobj->PostDropMessage($W); Win32::GUI::Dialog(); # Check that the receiver freed the handle ok($dropobj->Free(), "OEM frees the drop object"); # Now do the NEM tests: $W->Change(-eventmodel => "byref"); $dropobj->PostDropMessage($W); Win32::GUI::Dialog(); ok($dropobj->Free(), "NEM frees the drop object"); exit(0); sub win_DropFiles { my ($dropobj) = shift; ok(defined $dropobj, "OEM callback, dropobj defined"); isa_ok($dropobj, "Win32::GUI::DropFiles", "OEM dropobj is a Win32::GUI::DropFiles object"); return -1; } sub drop { my ($self, $dropobj) = @_; is($self, $W, "NEM callback gets window object"); ok(defined $dropobj, "NEM callback, dropobj defined"); isa_ok($dropobj, "Win32::GUI::DropFiles","NEM dropobj is a Win32::GUI::DropFiles object"); return -1; } --- NEW FILE: 07_DragQueryFile.t --- #!perl -w # Win32::GUI::DropFiles test suite # $Id: 07_DragQueryFile.t,v 1.1 2006/04/25 21:38:19 robertemay Exp $ # # Test Win32::GUI::DropFiles DragQueryFile() function use strict; use warnings; BEGIN { $| = 1 } # Autoflush # We assume that 01_load.t has been run, so we know we have Test::More # and that Win32::GUI and Win32::GUI::DropFiles will load. use Test::More; BEGIN { eval "use Win32::API 0.41"; plan skip_all => "Win32::API 0.41 required for testing DragQueryFile()" if $@; } plan tests => 33; # Load our helpers use FindBin; use lib "$FindBin::Bin"; use DropTest; use Win32::GUI 1.03_02; use Win32::GUI::DropFiles; # Some Useful constants: sub EINVAL() {22} sub ERROR_INVALID_INDEX() {1413} # Cygwin doesn't provide Win32 extended errors, so $^E == $! my $EXPECTED_E = (lc $^O eq "cygwin") ? EINVAL : ERROR_INVALID_INDEX; my @files = ( "A", "B", "Longer Name with spaces" ); my $dropobj = DropTest->new( files => \@files, ); my $W = Win32::GUI::Window->new( -name => 'win', -title => "Win32::GUI DropFiles Test", -size => [400,300], -onDropFiles => \&drop, ); Win32::GUI::DoEvents(); $dropobj->PostDropMessage($W); Win32::GUI::Dialog(); exit(0); sub drop { my ($self, $dropobj) = @_; # DragQueryFile with no params returns the number of files is(Win32::GUI::DropFiles::DragQueryFile($dropobj), scalar @files, "Correct number of files when passed object"); is(Win32::GUI::DropFiles::DragQueryFile($dropobj->{-handle}), scalar @files, "Correct number of files when passed handle"); is($dropobj->DragQueryFile(), scalar @files, "Correct number of files when called as method"); # DragQueryFile with one param returns file name my $count = $dropobj->GetDroppedFiles(); { my @f; for (0..$count-1) { push @f, Win32::GUI::DropFiles::DragQueryFile($dropobj, $_); } ok(eq_set(\@files,\@f), "Correct set of files found when passed object"); # Test out of range indices for my $index (-1, $count, 1000) { my($r, $e); $!=$^E=0; $r = Win32::GUI::DropFiles::DragQueryFile($dropobj,$index); $e = $^E; # record value of $^E immediately is($r, undef , "Out of range index ($index) returns undef when passed object"); SKIP: { skip "Can't test error values if no error", 2 if defined $r; cmp_ok($!, '==', EINVAL, "errno set to EINVAL"); cmp_ok($^E, '==', $EXPECTED_E, "GetLastError returns ERROR_INVALID_INDEX"); } } } { my @f; for (0..$count-1) { push @f, Win32::GUI::DropFiles::DragQueryFile($dropobj->{-handle}, $_); } ok(eq_set(\@files,\@f), "Correct set of files found when passed handle"); # Test out of range indices for my $index (-1, $count, 1000) { my($r, $e); $!=$^E=0; $r = Win32::GUI::DropFiles::DragQueryFile($dropobj->{-handle},$index); $e = $^E; # record value of $^E immediately is($r, undef , "Out of range index ($index) returns undef when passed handle"); SKIP: { skip "Can't test error values if no error", 2 if defined $r; cmp_ok($!, '==', EINVAL, "errno set to EINVAL"); cmp_ok($^E, '==', $EXPECTED_E, "GetLastError returns ERROR_INVALID_INDEX"); } } } { my @f; for (0..$count-1) { push @f, $dropobj->DragQueryFile($_); } ok(eq_set(\@files,\@f), "Correct set of files found when called as method"); # Test out of range indices for my $index (-1, $count, 1000) { my($r, $e); $!=$^E=0; $r = $dropobj->DragQueryFile($index); $e = $^E; # record value of $^E immediately is($r, undef , "Out of range index ($index) returns undef when called as method"); SKIP: { skip "Can't test error values if no error", 2 if defined $r; cmp_ok($!, '==', EINVAL, "errno set to EINVAL"); cmp_ok($^E, '==', $EXPECTED_E, "GetLastError returns ERROR_INVALID_INDEX"); } } } return -1; } --- NEW FILE: 08_DragQueryPoint.t --- #!perl -w # Win32::GUI::DropFiles test suite # $Id: 08_DragQueryPoint.t,v 1.1 2006/04/25 21:38:19 robertemay Exp $ # # Test Win32::GUI::DropFiles DragQueryPoint() function use strict; use warnings; BEGIN { $| = 1 } # Autoflush # We assume that 01_load.t has been run, so we know we have Test::More # and that Win32::GUI and Win32::GUI::DropFiles will load. use Test::More; BEGIN { eval "use Win32::API 0.41"; plan skip_all => "Win32::API 0.41 required for testing DragQueryPoint()" if $@; } # Load our helpers use FindBin; use lib "$FindBin::Bin"; use DropTest; use Win32::GUI 1.03_02; use Win32::GUI::DropFiles; my @testdata = ( { x => 100, y => 120, c => 1 }, { x => 1, y => -1, c => 0 }, ); my $numtests = scalar @testdata; plan tests => 9 * $numtests; my $W = Win32::GUI::Window->new( -name => 'win', -title => "Win32::GUI DropFiles Test", -size => [400,300], -onDropFiles => \&drop, ); Win32::GUI::DoEvents(); my $testnum; for (0..$numtests-1) { $testnum = $_; my $dropobj = DropTest->new( x => $testdata[$testnum]->{x}, y => $testdata[$testnum]->{y}, client => $testdata[$testnum]->{c}, ); $dropobj->PostDropMessage($W); Win32::GUI::Dialog(); } exit(0); sub drop { my ($self, $dropobj) = @_; # DragQueryPoint returns a list of x, y, client info { my ($x, $y, $c) = Win32::GUI::DropFiles::DragQueryPoint($dropobj); is($x, $testdata[$testnum]->{x}, "X-pos reported correctly when passed object"); is($y, $testdata[$testnum]->{y}, "Y-pos reported correctly when passed object"); is($c, $testdata[$testnum]->{c}, "client pos reported correctly when passed object"); } { my ($x, $y, $c) = Win32::GUI::DropFiles::DragQueryPoint($dropobj->{-handle}); is($x, $testdata[$testnum]->{x}, "X-pos reported correctly when passed handle"); is($y, $testdata[$testnum]->{y}, "Y-pos reported correctly when passed handle"); is($c, $testdata[$testnum]->{c}, "client pos reported correctly when passed handle"); } { my ($x, $y, $c) = $dropobj->DragQueryPoint(); is($x, $testdata[$testnum]->{x}, "X-pos reported correctly when called as method"); is($y, $testdata[$testnum]->{y}, "Y-pos reported correctly when called as method"); is($c, $testdata[$testnum]->{c}, "client pos reported correctly when called as method"); } return -1; } --- NEW FILE: 01_load.t --- #!perl -wT # Win32::GUI::DropFiles test suite # $Id: 01_load.t,v 1.1 2006/04/25 21:38:19 robertemay Exp $ # # - check pre-requsites # - check module loads # - check module has a version # - check we didn't import lots of constants from Win32::GUI use strict; use warnings; BEGIN { $| = 1 } # Autoflush # Pre-requisites: Bail out if we havent got Test::More eval "use Test::More"; if($@) { # As we haven't got Test::More, can't use diag() print "#\n# Test::More required to perform any Win32::GUI::DragDrop test\n"; chomp $@; $@ =~ s/^/# /gm; print "$@\n"; print "Bail Out! Test::More not available\n"; exit(1); } plan( tests => 4 ); # Pre-requisites: Check that we're on windows or cygwin # bail out if we're not if ( not ($^O =~ /MSwin32|cygwin/i)) { diag("\nWin32::GUI can only run on MSWin32 or cygwin, not '$^O'"); print "Bail out! Incompatible Operating System\n"; } pass("Correct OS: $^O"); # Check that Win32::GUI::DropFiles loads, and bail out of all # tests if it doesn't use_ok('Win32::GUI::DropFiles') or print STDOUT "Bail out! Can't load Win32::GUI::DropFiles"; # Check that Win32::GUI::DropFiles has a version ok(defined $Win32::GUI::DropFiles::VERSION, "Win32::GUI::DropFiles version check"); # Check that we didn't accidently import lots of constants from Win32::GUI ok(!defined &Win32::GUI::DropFiles::ES_WANTRETURN, "No Win32::GUI constants"); --- NEW FILE: 05_GetDroppedFile.t --- #!perl -w # Win32::GUI::DropFiles test suite # $Id: 05_GetDroppedFile.t,v 1.1 2006/04/25 21:38:19 robertemay Exp $ # # Test Win32::GUI::DropFiles GetDroppedFile() method use strict; use warnings; BEGIN { $| = 1 } # Autoflush # We assume that 01_load.t has been run, so we know we have Test::More # and that Win32::GUI and Win32::GUI::DropFiles will load. use Test::More; BEGIN { eval "use Win32::API 0.41"; plan skip_all => "Win32::API 0.41 required for testing GetDroppedFile()" if $@; } plan tests => 10; # Load our helpers use FindBin; use lib "$FindBin::Bin"; use DropTest; use Win32::GUI 1.03_02; use Win32::GUI::DropFiles; # Some Useful constants: sub EINVAL() {22} sub ERROR_INVALID_INDEX() {1413} # Cygwin doesn't provide Win32 extended errors, so $^E == $! my $EXPECTED_E = (lc $^O eq "cygwin") ? EINVAL : ERROR_INVALID_INDEX; my @files = ( "A", "B", "Longer Name with spaces" ); my $dropobj = DropTest->new( files => \@files, ); my $W = Win32::GUI::Window->new( -name => 'win', -title => "Win32::GUI DropFiles Test", -size => [400,300], -onDropFiles => \&drop, ); Win32::GUI::DoEvents(); $dropobj->PostDropMessage($W); Win32::GUI::Dialog(); exit(0); sub drop { my ($self, $dropobj) = @_; # GetDroppedFiles in scalar context returns number of files my $count = $dropobj->GetDroppedFiles(); my @f; for (0..$count-1) { push @f, $dropobj->GetDroppedFile($_); } ok(eq_set(\@files,\@f), "Correct set of files found"); # Test out of range indices for my $index (-1, $count, 1000) { my($r, $e); $!=$^E=0; $r = $dropobj->GetDroppedFile($index); $e = $^E; # record value of $^E immediately is($r, undef , "Out of range index ($index) returns undef"); SKIP: { skip "Can't test error values if no error", 2 if defined $r; cmp_ok($!, '==', EINVAL, "errno set to EINVAL"); cmp_ok($^E, '==', $EXPECTED_E, "GetLastError returns ERROR_INVALID_INDEX"); } } return -1; } --- NEW FILE: 04_GetDroppedFiles.t --- #!perl -w # Win32::GUI::DropFiles test suite # $Id: 04_GetDroppedFiles.t,v 1.1 2006/04/25 21:38:19 robertemay Exp $ # # Test Win32::GUI::DropFiles GetDroppedFiles() method use strict; use warnings; BEGIN { $| = 1 } # Autoflush # We assume that 01_load.t has been run, so we know we have Test::More # and that Win32::GUI and Win32::GUI::DropFiles will load. use Test::More; BEGIN { eval "use Win32::API 0.41"; plan skip_all => "Win32::API 0.41 required for testing GetDroppedFiles()" if $@; } # Load our helpers use FindBin; use lib "$FindBin::Bin"; use DropTest; use Win32::GUI 1.03_02; use Win32::GUI::DropFiles; my @tests = ( [ "A", "B", "Longer Name with spaces" ], [], # no files should never happen, but just in case ... ); plan tests => 2 * scalar @tests; my $W = Win32::GUI::Window->new( -name => 'win', -title => "Win32::GUI DropFiles Test", -size => [400,300], -onDropFiles => \&drop, ); Win32::GUI::DoEvents(); my $files; while($files = shift @tests) { my $dt = DropTest->new(files => $files); $dt->PostDropMessage($W); Win32::GUI::Dialog(); } exit(0); sub drop { my ($self, $dropobj) = @_; # GetDroppedFiles in scalar context returns number of files is(scalar $dropobj->GetDroppedFiles(), scalar @{$files}, "Correct number of files"); # GetDroppedFiles in list context returns the list of files my @f = $dropobj->GetDroppedFiles(); ok(eq_set($files,\@f), "Correct set of files found"); return -1; } --- NEW FILE: 11_invalid_handles.t --- #!perl -w # Win32::GUI::DropFiles test suite # $Id: 11_invalid_handles.t,v 1.1 2006/04/25 21:38:19 robertemay Exp $ # # Test Win32::GUI::DropFiles win32 API doesn't barf with invalid handles use strict; use warnings; BEGIN { $| = 1 } # Autoflush # We assume that 01_load.t has been run, so we know we have Test::More # and that Win32::GUI::DropFiles will load. use Test::More; use Win32::GUI::DropFiles; my @handles = (0, int(rand(2**32)),); plan tests => 6 * scalar @handles; # Useful Constants: sub EINVAL() {22} sub ERROR_INVALID_HANDLE() {6} # On cygwin, $^E == $! (no OS extended errors) my $EXPECTED_E = ERROR_INVALID_HANDLE; if(lc $^O eq "cygwin") { $EXPECTED_E = EINVAL; } for my $h (@handles) { my ($r, $e); # DragQueryFile $!=0;$^E=0; $r = Win32::GUI::DropFiles::DragQueryFile($h); $e = $^E; # Record $^E immediately after call is($r , undef, "DragQueryFile: Invalid handle $h returns undef"); SKIP: { skip "DragQueryFiles: Can't test error codes if we didn't get an error", 2 if defined $r; cmp_ok($!, "==", EINVAL, "DragQueryFile: Errno set to EINVAL"); cmp_ok($e, "==", $EXPECTED_E, "DragQueryFile: LastError set to ERROR_INVALID_HANDLE"); } # DragQueryPoint $!=0;$^E=0; $r = Win32::GUI::DropFiles::DragQueryPoint($h); $e = $^E; # Record $^E immediately after call is($r, undef, "DragQueryPoint: Invalid handle $h returns undef"); SKIP: { skip "DragQueryPoint: Can't test error codes if we didn't get an error", 2 if defined $r; cmp_ok($!, "==", EINVAL, "DragQueryPoint: Errno set to EINVAL"); cmp_ok($^E, "==", $EXPECTED_E, "DragQueryPoint: LastError set to ERROR_INVALID_HANDLE"); } # DragFinish # DragFinish sets LastError inconsistently, using ERROR_INVALID_PARAMETER # on win98 and ERROR_INVALID_HANDLE on winNT. Also on WinNT, doesn't # consider 0 to be invalid. As there is no return value from DragFinish, # the user can't tell if there was an error or not, so doen't know if # $^E contains anything useful or not, so we don't need to do the test. } --- NEW FILE: 02_old_callback.t --- #!perl -w # Win32::GUI::DropFiles test suite # $Id: 02_old_callback.t,v 1.1 2006/04/25 21:38:19 robertemay Exp $ # # Test Win32::GUI DropFiles callback without loading Win32::GUI::DropFiles # This is really a Win32::GUI test, not a Win32::GUI::Dropfiles test, # but is here for completeness # This old callback format is kept for backwards compatibility with # The GUI Loft's Win32::GUI::DragDrop package. # - check pre-requsites # - check both OEM and NEM callbacks # - check callback parameter types # - check that DragFinish is called use strict; use warnings; BEGIN { $| = 1 } # Autoflush # We assume that 01_load.t has been run, so we know we have Test::More # and that Win32::GUI and Win32::GUI::DropFiles will load. use Test::More; BEGIN { eval "use Win32::API 0.41"; plan skip_all => "Win32::API 0.41 required for testing Old Callack API" if $@; } plan tests => 7; # Load our helpers use FindBin; use lib "$FindBin::Bin"; use DropTest; use Win32::GUI 1.03_02; my $dropobj = DropTest->new(); my $W = Win32::GUI::Window->new( -name => 'win', -title => "Win32::GUI DropFiles Test", -size => [400,300], -onDropFiles => \&drop, -eventmodel => "byname", ); Win32::GUI::DoEvents(); # Do the OEM tests $dropobj->PostDropMessage($W); Win32::GUI::Dialog(); # Check that the receiver freed the handle ok($dropobj->Free(), "OEM frees the drop object"); # Now do the NEM tests: $W->Change(-eventmodel => "byref"); $dropobj->PostDropMessage($W); Win32::GUI::Dialog(); ok($dropobj->Free(), "NEM frees the drop object"); exit(0); sub win_DropFiles { my ($drophandle) = shift; ok(defined $drophandle, "OEM callback, drophandle defined"); is(ref($drophandle), "", "OEM drophandle is a scalar"); return -1; } sub drop { my ($self, $drophandle) = @_; is($self, $W, "NEM callback gets window object"); ok(defined $drophandle, "NEM callback, drophandle defined"); is(ref($drophandle), "", "NEM drophandle is a scalar"); return -1; } --- NEW FILE: DropTest.pm --- package DropTest; # $Id: DropTest.pm,v 1.1 2006/04/25 21:38:19 robertemay Exp $ # package to hide away the complexity of generating a WM_DROPEVENT on a window. # Written by Robert May, April 2006 # # This would be an ideal candidate for implementing in XS within a Win32::GUI::Test # module # use strict; use warnings; use Win32(); use Win32::GUI(); use Win32::API(); Win32::API->Import('Kernel32', 'GlobalAlloc', 'LL', 'L') || die "No GlobalAlloc: $^E"; Win32::API->Import('Kernel32', 'GlobalLock', 'L', 'L') || die "No GlobalLock: $^E"; Win32::API->Import('Kernel32', 'GlobalUnlock', 'L', 'L') || die "No GlobalUnlock: $^E"; Win32::API->Import('Kernel32', 'GlobalFree', 'L', 'L') || die "No GlobalFree: $^E"; Win32::API->Import('Kernel32', 'GlobalFlags', 'L', 'L') || die "No GlobalFree: $^E"; Win32::API->Import("kernel32", "RtlMoveMemory", "LPI", "V") || die "No RtlMoveMemory: $^E"; sub WM_DROPFILES() {563} sub NO_ERROR() {0} sub GHND() {0x0042} # GHND = GMEM_MOVEABLE|GMEM_ZERO_INIT = 0x0042 sub GMEM_INVALID_HANDLE() {32768} sub new { my $class = shift; my %options = @_; $options{x} ||= 0; $options{y} ||= 0; $options{wide} ||= 0; $options{client} = 1 unless defined $options{client}; my $files = []; if(exists $options{files}) { if(ref($options{files}) eq "ARRAY") { for my $file (@{$options{files}}) { push @{$files}, $file; } } else { die("files option must be an array ref"); } } else { $files = ['File1', 'File2', 'File3',]; } if($options{wide}) { require Unicode::String; # use this in place of Encode, as Encode does not ship with Perl 5.6 for my $file (@{$files}) { $file = Unicode::String::utf8($file)->byteswap->ucs2; } } $options{files} = $files; return bless \%options, $class; } sub PostDropMessage { my ($self,$dest) = @_; # always create a new handle, as the receiver is supposed to free it. my $hdrop = $self->_create_new_drop_handle(); $dest->PostMessage(WM_DROPFILES, $hdrop, 0); # The recieving process should free the hdrop handle, # and the handle should be invalid sometime after this call # Check using isFree before calling PostDropMessage again return; } # return TRUE if the hdrop handle associated with the object is freed (invalid) # if not freed, free it and return false sub Free { my ($self) = @_; my $hdrop = $self->{hdrop}; return 1 unless $hdrop; my $locks = GlobalFlags($hdrop); delete $self->{hdrop}; return 1 if $locks == GMEM_INVALID_HANDLE; GlobalFree($hdrop); return 0; } sub _create_new_drop_handle { my ($self) = @_; # Free any previous handle, and warn us if it wasn't freed if(!$self->Free()) { warn "Old drop handle not freed - check for error"; } # DROPFILES struct: # typedef struct _DROPFILES { # DWORD pFiles; # POINT pt; # BOOL fNC; # BOOL fWide; # } DROPFILES, *LPDROPFILES; # followed by double NULL terminated string structure my $term = "x"; $term = "xx" if $self->{wide}; my $buffer = pack("LLLLL" . "a*$term" x @{$self->{files}} . $term, 20, # sizeof(DROPFILES) - string ptr offset $self->{x}, $self->{y}, $self->{client} ? 0 : 1, $self->{wide} ? 1 : 0, @{$self->{files}}, ); my $size = length($buffer); my $hdrop = GlobalAlloc(GHND, $size) or die "GlobalAlloc failed: $^E"; my $ptr = GlobalLock($hdrop) or die "GlobalLock failed: $^E"; RtlMoveMemory($ptr, $buffer, $size); GlobalUnlock($hdrop); return $self->{hdrop} = $hdrop; } sub dump { my $self = shift; if($self->{hdrop}) { my $hdrop = $self->{hdrop}; print "Dumping handle: $hdrop\n"; my $ptr = GlobalLock($hdrop); die "GlobalLock failed: $^E" unless $ptr; # Get the header (HROPFILES) structure my ($poff, $x, $y, $nc, $fwide) = unpack("LLLLL", unpack("P20", pack("L", $ptr))); print " poff:\t$poff\n"; print " x:\t$x\n"; print " y:\t$y\n"; print " nc:\t$nc\n"; print " wide:\t$fwide\n"; my $count = 0; $ptr += $poff; # This is probably hideously slow, but as it's only for debug ... my $pack_str = "C"; my $char_len = 1; if($fwide) { $pack_str = "v"; $char_len = 2; } my $last_char_null = 0; my $file = ""; while(1) { my $char = unpack($pack_str, unpack("P$char_len", pack("L", $ptr))); $ptr += $char_len; last if $last_char_null && $char == 0; if($char == 0) { $last_char_null = 1; printf " File $count: $file [%vx]\n", $file; $count++; $file = ""; next; } $last_char_null = 0; $file .= chr $char; } GlobalUnlock($hdrop); } else { print "No data to dump\n"; } return; } sub DESTROY { # free the handle if necessary $_[0]->Free(); } # Static function to determine if a drop handle is valid or not sub isValidHandle { my $handle = shift; my $locks = GlobalFlags($handle); return 0 if $locks == GMEM_INVALID_HANDLE; return 1; } 1; # End of DropTest.pm --- NEW FILE: 09_DragFinish.t --- #!perl -w # Win32::GUI::DropFiles test suite # $Id: 09_DragFinish.t,v 1.1 2006/04/25 21:38:19 robertemay Exp $ # # Test Win32::GUI::DropFiles DragFinish() function use strict; use warnings; BEGIN { $| = 1 } # Autoflush # We assume that 01_load.t has been run, so we know we have Test::More # and that Win32::GUI and Win32::GUI::DropFiles will load. use Test::More; BEGIN { eval "use Win32::API 0.41"; plan skip_all => "Win32::API 0.41 required for testing DragFinish()" if $@; } plan tests => 1; # Load our helpers use FindBin; use lib "$FindBin::Bin"; use DropTest; use Win32::GUI 1.03_02; use Win32::GUI::DropFiles; my $dropobj = DropTest->new(); my $W = Win32::GUI::Window->new( -name => 'win', -title => "Win32::GUI DropFiles Test", -size => [400,300], -onDropFiles => \&drop, ); Win32::GUI::DoEvents(); $dropobj->PostDropMessage($W); Win32::GUI::Dialog(); exit(0); sub drop { my ($self, $dropobj) = @_; #Calling DragFinish should make the HDROP handle invalid Win32::GUI::DropFiles::DragFinish($dropobj->{-handle}); is(DropTest::isValidHandle($dropobj->{-handle}), 0, "handle invalidated"); return -1; } --- NEW FILE: 06_GetDropPos.t --- #!perl -w # Win32::GUI::DropFiles test suite # $Id: 06_GetDropPos.t,v 1.1 2006/04/25 21:38:19 robertemay Exp $ # # Test Win32::GUI::DropFiles GetDropPos() method use strict; use warnings; BEGIN { $| = 1 } # Autoflush # We assume that 01_load.t has been run, so we know we have Test::More # and that Win32::GUI and Win32::GUI::DropFiles will load. use Test::More; BEGIN { eval "use Win32::API 0.41"; plan skip_all => "Win32::API 0.41 required for testing GetDropPos()" if $@; } # Load our helpers use FindBin; use lib "$FindBin::Bin"; use DropTest; use Win32::GUI 1.03_02; use Win32::GUI::DropFiles; my @testdata = ( { x => 100, y => 120, c => 1 }, { x => 1, y => -1, c => 0 }, ); my $numtests = scalar @testdata; plan tests => 6 * $numtests; my $W = Win32::GUI::Window->new( -name => 'win', -title => "Win32::GUI DropFiles Test", -size => [400,300], -onDropFiles => \&drop, ); Win32::GUI::DoEvents(); my $testnum; for (0..$numtests-1) { $testnum = $_; my $dropobj = DropTest->new( x => $testdata[$testnum]->{x}, y => $testdata[$testnum]->{y}, client => $testdata[$testnum]->{c}, ); $dropobj->PostDropMessage($W); Win32::GUI::Dialog(); } exit(0); sub drop { my ($self, $dropobj) = @_; # GetDropPos in scalar context returns client area or not is($dropobj->GetDropPos(), $testdata[$testnum]->{c}, "Correct client indication"); # In list context give x, y and client indicators: { my ($x, $y) = $dropobj->GetDropPos(); is($x, $testdata[$testnum]->{x}, "X-pos reported correctly"); is($y, $testdata[$testnum]->{y}, "Y-pos reported correctly"); } { my ($x, $y, $client) = $dropobj->GetDropPos(); is($x, $testdata[$testnum]->{x}, "X-pos reported correctly"); is($y, $testdata[$testnum]->{y}, "Y-pos reported correctly"); is($client, $testdata[$testnum]->{c}, "client pos reported correctly"); } return -1; } |
Update of /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-DropFiles In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2364/Win32-GUI-DropFiles Added Files: DropFiles.pm DropFiles.xs DropFilesRC.PL Makefile Makefile.PL README TYPEMAP ppport.h Log Message: Add Win32::GUI::DropFiles --- NEW FILE: DropFiles.xs --- #define WIN32_MEAN_AND_LEAN /* XS code for Win32::GUI::DropFiles * $Id: DropFiles.xs,v 1.1 2006/04/25 21:38:18 robertemay Exp $ * (c) Robert May, 2006 * Released under the same terms as Perl */ #include "EXTERN.h" #include "perl.h" #include "XSUB.h" #include "ppport.h" #include "Windows.h" #include "shellapi.h" /* void newSVpvnW(SV* s, WCHAR* w, UINT c) * - s [OUT] pointer to SV. Will be set to point to a newly created SV, * with ref count 1. * - w [IN] pointer to WCHAR buffer. * - c [IN] number of characters (NOT bytes) to be copied from WCHAR. Do * not include any NULL termination. If c = -1, then length will be * calculated, assuming w is NULL terminated. */ /* TODO: This macro probably better written as a function that returns the * pointer to the SV, and it is more 'perl like' if c==0 indicates the length * should be calculated. It would be good to get rid of the duplicated SvPVX() calls. */ #define newSVpvnW(s, w, c) \ { UINT b = WideCharToMultiByte(CP_UTF8, 0, w, c, NULL, 0, NULL, NULL); \ s = newSV(b); SvPOK_on(s); SvUTF8_on(s); SvCUR_set(s,b); \ WideCharToMultiByte(CP_UTF8, 0, w, c, SvPVX(s), b, NULL, NULL); \ *(SvPVX(s) + b) = 0; sv_utf8_downgrade(s, 1); } /* BOOL INVALID_HANDLE(HDROP h) * Attempt to determine if a HDROP handle is valid * Returns TRUE if handle is invalid * Returns FALSE if handle is valid * TODO: can we do better than this? */ BOOL INVALID_HANDLE(HDROP h) { if(GlobalLock((HGLOBAL)h)) { GlobalUnlock((HGLOBAL)h); return 0; } return 1; } #ifndef W32G_NO_WIN9X /* BOOL IsWin9X() * Returns TRUE if OS Version is Win95/98/ME * Returns FLASE if OS Version is NT/2K/XP/2003 or higher */ /* TODO: Better to cache the value to prevent the overhead of * GetVersion() on each call. Eventually this needs extracting * somewhere central, so that we don't have repeat implementations * all over the place. ??Can we efficiently access the Win32::IsWin95 * function?? */ BOOL IsWin9X() { return (GetVersion() & 0x80000000); } #endif MODULE = Win32::GUI::DropFiles PACKAGE = Win32::GUI::DropFiles PROTOTYPES: ENABLE ########################################################################## # (@)WIN32API:DragQueryFile(HDROP, [ITEM]) # See Dropfiles.pm for documentation void DragQueryFile(handle, ...) HDROP handle PREINIT: UINT count, item, cch; SV* sv; PPCODE: /* Shell32.dll crashes if we pass an invalid handle * to DragQueryFile, so ensure we have one */ if(INVALID_HANDLE(handle)) { SetLastError(ERROR_INVALID_HANDLE); /* set $^E */ errno = EINVAL; /* set $! */ XSRETURN_UNDEF; /* and return undef */ } #ifndef W32G_NO_WIN9X if(IsWin9X()) count = DragQueryFileA(handle, 0xFFFFFFFF, NULL, 0); else #endif count = DragQueryFileW(handle, 0xFFFFFFFF, NULL, 0); if(items == 1) { mXPUSHu(count); XSRETURN(1); } else if (items == 2) { item = SvIV(ST(1)); if(item < count) { /* item is in range */ #ifndef W32G_NO_WIN9X if(IsWin9X()) { CHAR buffer[MAX_PATH]; cch = DragQueryFileA(handle, item, buffer, MAX_PATH); sv = newSVpvn(buffer,cch); } else { #endif WCHAR wbuffer[MAX_PATH]; cch = DragQueryFileW(handle, item, wbuffer, MAX_PATH); newSVpvnW(sv, wbuffer, cch); #ifndef W32G_NO_WIN9X } #endif XPUSHs(sv_2mortal(sv)); XSRETURN(1); } else { /* item is out of range */ SetLastError(ERROR_INVALID_INDEX); /* set $^E */ errno = EINVAL; /* set $! */ XSRETURN_UNDEF; /* and return undef */ } } else { croak("Usage: DragQueryHandle(handle);\n or: DragQueryHandle(handle, index);"); } ########################################################################## # (@)WIN32API:DragQueryPoint(HDROP) # See Dropfiles.pm for documentation void DragQueryPoint(handle) HDROP handle PREINIT: POINT pt; UV client; PPCODE: /* DragQueryPoint returns garbage if passed * an invalid handle, so ensure we have one */ if(INVALID_HANDLE(handle)) { SetLastError(ERROR_INVALID_HANDLE); /* set $^E */ errno = EINVAL; /* set $! */ XSRETURN_UNDEF; /* and return undef */ } client = (UV)DragQueryPoint(handle, &pt); mXPUSHi(pt.x); mXPUSHi(pt.y); mXPUSHu(client); XSRETURN(3); ########################################################################## # (@)WIN32API:DragFinish(HDROP) # See Dropfiles.pm for documentation void DragFinish(handle) HDROP handle --- NEW FILE: DropFilesRC.PL --- #!perl -w use strict; use warnings; use ExtUtils::MakeMaker; # $Id: DropFilesRC.PL,v 1.1 2006/04/25 21:38:18 robertemay Exp $ # perl script to produce the RC file for # Win32::GUI::DropFiles: create Resource # file with a VERSIONINFO section # The variables: my %info = ( Version => MM->parse_version('DropFiles.pm'), Dllname => 'DropFiles.dll', Years => '2006', Win32GUIVersion => MM->parse_version('../GUI.pm'), ); # Open the target file if ( @ARGV > 0 ) { my $file = $ARGV[0]; open(my $fh, '>', $file) or die qq(Failed to open '$file': $!); select $fh; } { my $fileVersion = $info{Version}; $fileVersion .= "_00" unless $fileVersion =~ m/_/; $info{FileVersion} = sprintf("%02d,%02d,%02d,00", $fileVersion =~ m/^(.*)\.([^_]*)_?(.*)$/); my $prodVersion = $info{Win32GUIVersion}; $prodVersion .= "_00" unless $prodVersion =~ m/_/; $info{ProductVersion} = sprintf("%02d,%02d,%02d,00", $prodVersion =~ m/^(.*)\.([^_]*)_?(.*)$/); } print <<"__RC"; #include "Winver.h" 1 VERSIONINFO FILEVERSION $info{FileVersion} PRODUCTVERSION $info{ProductVersion} FILEOS VOS__WINDOWS32 FILETYPE VFT_DLL { BLOCK "StringFileInfo" { BLOCK "040904E4" { VALUE "Comments" , "Win32::GUI::DropFiles, part of the perl Win32::GUI module." VALUE "CompanyName" , "perl-win32-gui.sourceforge.net" VALUE "FileDescription" , "Win32::GUI::DropFiles perl extension" VALUE "FileVersion" , "$info{Version}" VALUE "InternalName" , "$info{Dllname}" VALUE "LegalCopyright" , "Copyright © Robert May $info{Years}" VALUE "LegalTrademarks" , "GNU and Artistic licences" VALUE "OriginalFilename" , "$info{Dllname}" VALUE "ProductName" , "Win32::GUI perl extension" VALUE "ProductVersion" , "$info{Win32GUIVersion}" } } BLOCK "VarFileInfo" { VALUE "Translation", 0x0409, 0x04E4 } } __RC exit(0); __END__ --- NEW FILE: Makefile.PL --- #!perl -w use strict; use warnings; # Makefile.PL for Win32::GUI::DropFiles # $Id: Makefile.PL,v 1.1 2006/04/25 21:38:18 robertemay Exp $ use 5.006; use Config; use ExtUtils::MakeMaker; my %config = ( NAME => 'Win32::GUI::DropFiles', VERSION_FROM => 'DropFiles.pm', ABSTRACT_FROM => 'DropFiles.pm', AUTHOR => 'Robert May <rob...@us...>', PREREQ_PM => { 'Win32::GUI' => 1.04 }, #DEFINE => '-DW32G_no_WIN9X', PL_FILES => {'DropFilesRC.PL' => '$(BASEEXT).rc', }, OBJECT => '$(BASEEXT)$(OBJ_EXT) $(BASEEXT).res', macro => { RC => 'rc.exe', RCFLAGS => '', INST_DEMODIR => '$(INST_LIB)/Win32/GUI/demos/$(BASEEXT)', DEMOS => 'demos/DropFilesDemo.pl' }, clean => {FILES => '*.rc *.res', }, ); # if building using gcc (MinGW or cygwin) use windres # as the resource compiler if($Config{cc} =~ /gcc/i) { $config{macro}->{RC} = 'windres'; $config{macro}->{RCFLAGS} = '-O coff -o $*.res'; } # if building as part of the Win32::GUI core, then remove # the pre-req of Win32::GUI, as we may not have it until # we finish the build. { no warnings 'once'; delete $config{PREREQ_PM}->{'Win32::GUI'} if $main::W32G_CORE; } WriteMakefile(%config); package MY; # Add rule for .rc to .res conversion # Add rules to install demo scripts sub postamble { return <<'__POSTAMBLE'; .rc.res: $(RC) $(RCFLAGS) $< pure_all :: demo_to_blib $(NOECHO) $(NOOP) demo_to_blib: $(DEMOS) $(NOECHO) $(MKPATH) $(INST_DEMODIR) $(CP) $? $(INST_DEMODIR) $(NOECHO) $(TOUCH) demo_to_blib clean :: -$(RM_F) demo_to_blib __POSTAMBLE } --- NEW FILE: DropFiles.pm --- package Win32::GUI::DropFiles; # $Id: DropFiles.pm,v 1.1 2006/04/25 21:38:18 robertemay Exp $ # Win32::GUI::DropFiles, part of the Win32::GUI package # (c) Robert May, 2006 # released under the same terms as Perl. use 5.006; use strict; use warnings; use Win32::GUI 1.03_02,''; # Check Win32:GUI version, ensure import not called our $VERSION = '0.01'; require XSLoader; XSLoader::load('Win32::GUI::DropFiles', $VERSION); sub DESTROY { my $self = shift; $self->DragFinish(); } sub GetDroppedFiles { # void context - optional warning and do nothing if(!defined wantarray) { if(warnings::enabled('void')) { require Carp; Carp::carp('Useless use of GetDroppedFiles in void context'); } return; } my $self = shift; my $count = $self->DragQueryFile(); # scalar context - return number of files dropped return $count unless wantarray; my @files = (); for my $item (0..$count-1) { push @files, $self->DragQueryFile($item); } # list context - return list of files return(@files); } sub GetDroppedFile { # void context - optional warning and do nothing if(!defined wantarray) { if(warnings::enabled('void')) { require Carp; Carp::carp('Useless use of GetDroppedFile in void context'); } return; } my ($self, $item) = @_; $item ||= 0; # scalar context - return file name return $self->DragQueryFile($item); } sub GetDropPos { # void context - optional warning and do nothing if(!defined wantarray) { if(warnings::enabled('void')) { require Carp; Carp::carp('Useless use of GetDropPos in void context'); } return; } my $self = shift; my ($x, $y, $client) = $self->DragQueryPoint(); # scalar context - return boolean for whether drop is in # client area or not return $client unless wantarray; # list context - return x-pos, y-pos and boolean for # client area or not. return $x, $y, $client; } 1; # End of DropFiles.pm __END__ =head1 NAME Win32::GUI::DropFiles - Extension to Win32::GUI for shell Drag&Drop integration =head1 SYNOPSIS use Win32::GUI; use Win32::GUI::DropFiles; # Create droppable window: my $win = Win32::GUI::Window->new( -name => 'win', ... -acceptfiles => 1, -onDropFiles => \&dropfiles_callback, ... ); # Change the drop state of a window $win->AcceptFiles(1); $win->AcceptFiles(0); # In the DropFiles callback sub win_DropFiles { my ($self, $dropObj) = @_; # Get the number of dropped files my $count = $dropObj->GetDroppedFiles(); # Get a list of the dropped file names my @files = $dropObj->GetDroppedFiles(); # Get a particular file name (0 based index) my $file = $dropObj->GetDroppedFile($index); # determine if the drop happened in the client or # non-client area of the window my $clientarea = $dropObj->GetDropPos(); # get the mouse co-ordinates of the drop point, # in client co-ordinates my ($x, $y) = $dropObj->GetDropPos(); # get the drop point and (non-)client area information my ($x, $y, $client) = $dropObj->GetDropPos(); return 0; } =head1 DESCRIPTION Win32::GUI::DropFiles provides integration with the windows shell, allowing files to be dragged from the shell (e.g. explorer.exe), dropped onto a Win32::GUI window/control, and the path and filename of the dropped files to be retrieved. In order for a window to become a 'drop target' it must be created with the L<Win32::GUI::Reference::Options::acceptfiles|-acceptfiles> option set, or have called its L<Win32::GUI::Reference::Methods::AcceptFiles|AcceptFiles()> method. Once the window has been correctly initialised, then dropping a dragged file on the window results in a L<Win32::GUI::Reference::Events::DropFiles|DropFiles> event being triggered. The parameter to the event callback function is a Win32::GUI::DropFiles object that can be used to retrieve the names and paths of the dropped files. =head1 Drop Object Methods This section documents the public API for Win32::GUI::DropFiles objects. =head2 Constructor The constructor is not public: Win32::GUI creates Win32::GUI::DropFiles object when necessary, to pass to the DropFiles event handler subroutine. =head2 GetDroppedFiles my $count = $dropObj->GetDroppedFiles(); my @files = $dropObj->GetDroppedFiles(); In scalar context returns the number of files dropped. In list context returns a list of fully qualified path/filename for each dropped file. =head2 GetDroppedFile my $file = $dropObj->GetDroppedFile($index); returns the fully qualified path/filename for the file referenced by the zero-based C<index>. If C<index> is out of range, returns undef and sets C<$!> and C<$^E>. =head2 GetDropPos my $client = $dropObj->GetDropPos(); my ($x, $y, $client) = $dropObj->GetDropPos(); In scalar context returns a flag indicating whether the mouse was in the client or non-client area of the window when the files were dropped. In list context returns the x and y co-ordinates of the mouse when the files were dropped (in client co-ordinates), as well as a flag indicating whether the mouse was in the client or non-client area of the window. =head2 Destructor The destructor is called automatically when the object goes out of scope, and releases resources used by the system to store the filnames. Typically the object goes out of scope at the end of the DropFiles callback. Care should be taken to ensure that if a reference is taken to the object that does not go out of scope at that time, that it is eventually released, otherwise a memory leak will occur. =head1 Win32 API functions This section documents the Win32 API wrappers implemented by Win32::GUI::DropFiles. Although these APIs are available, their use is not recommended - the public Object Methods should provide better access to these APIs. See MSDN (L<http://msdn.microsoft.com/> for further details of the Win32 API functions. =head2 DragQueryFile Win32::GUI::DropFiles::DragQueryFile($dropHandle, [$item]); C<dropHandle> is a win32 C<HDROP> handle. C<item> is a zero-based index to the filename to be retrieved. Returns the number of files dropped if C<item> is omitted. Returns the filenmame if C<item> is provided. Returns undef and sets C<$!> and C<$^E> on error. =head2 DragQueryPoint Win32::GUI::DropFiles::DragQueryPoint($dropHandle); C<dropHandle> is a win32 C<HDROP> handle. Returns a 3 element list of the x-position and y-position (in client co-ordinates) and a flag that indicates whether the drop happened in the client or non-client area of the window. =head2 DragFinish Win32::GUI::DropFiles::DragFinish($dropHandle); C<dropHandle> is a win32 C<HDROP> handle. Releases the resources and invalidates C<dropHandle>. Does not return any value. =head1 Unicode filenmame support Supports unicode filenames under WinNT, Win2k, WinXP and higher. =head1 Backwards compatibility with Win32::GUI::DragDrop The GUI Loft includes a Win32::GUI::DragDrop module that exposes similar functionality. If you want to continue to use that module, then ensure that Win32::GUI::DropFiles is not used anywhere in your program (even by other modules that you use). Loading Win32::GUI::DropFiles changes the DropFiles event callback signature, and will result in Win32::GUI::DragDrop failing. It is recommended to upgrade to Win32::GUI::DropFiles. =head1 SEE ALSO MSDN L<http://msdn.microsoft.com> for more information on DragAcceptFiles, DragQueryFiles, DragQueryPos, DragFinish, WS_EX_ACCEPTFILES, WM_DROPFILES L<Win32::GUI|Win32::GUI> =head1 SUPPORT Homepage: L<http://perl-win32-gui.sourceforge.net/>. For further support join the users mailing list (C<per...@li...>) from the website at L<http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users>. There is a searchable list archive at L<http://sourceforge.net/mail/?group_id=16572> =head1 AUTHORS Robert May, E<lt>rob...@us...<gt> Reini Urban, E<lt>ru...@xr...<gt> =head1 COPYRIGHT AND LICENSE Copyright (C) 2006 by Robert May This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut --- NEW FILE: Makefile --- # This Makefile is for the Win32::GUI::DropFiles extension to perl. # # It was generated automatically by MakeMaker version # 6.17 (Revision: 1.133) from the contents of # Makefile.PL. Don't edit this file, edit Makefile.PL instead. # # ANY CHANGES MADE HERE WILL BE LOST! # # MakeMaker ARGV: () # # MakeMaker Parameters: # ABSTRACT_FROM => q[DropFiles.pm] # AUTHOR => q[Robert May <rob...@us...>] # NAME => q[Win32::GUI::DropFiles] # OBJECT => q[$(BASEEXT)$(OBJ_EXT) $(BASEEXT).res] # PL_FILES => { DropFilesRC.PL=>q[$(BASEEXT).rc] } # PREREQ_PM => { } # VERSION_FROM => q[DropFiles.pm] # clean => { FILES=>q[*.rc *.res] } # macro => { DEMOS=>q[demos/DropFilesDemo.pl], INST_DEMODIR=>q[$(INST_LIB)/Win32/GUI/demos/$(BASEEXT)], RC=>q[rc.exe], RCFLAGS=>q[] } # --- MakeMaker post_initialize section: # --- MakeMaker const_config section: # These definitions are from config.sh (via C:/Perl/Perl587/lib/Config.pm) # They may have been overridden via Makefile.PL or on the command line AR = lib CC = cl CCCDLFLAGS = CCDLFLAGS = DLEXT = dll DLSRC = dl_win32.xs LD = link LDDLFLAGS = -dll -nologo -nodefaultlib -debug -opt:ref,icf -libpath:"C:\Perl\Perl587\lib\CORE" -machine:x86 LDFLAGS = -nologo -nodefaultlib -debug -opt:ref,icf -libpath:"C:\Perl\Perl587\lib\CORE" -machine:x86 LIBC = msvcrt.lib LIB_EXT = .lib OBJ_EXT = .obj OSNAME = MSWin32 OSVERS = 5.0 RANLIB = rem SITELIBEXP = C:\Perl\Perl587\site\lib SITEARCHEXP = C:\Perl\Perl587\site\lib SO = dll EXE_EXT = .exe FULL_AR = VENDORARCHEXP = VENDORLIBEXP = # --- MakeMaker constants section: AR_STATIC_ARGS = cr DIRFILESEP = ^\ NAME = Win32::GUI::DropFiles NAME_SYM = Win32_GUI_DropFiles VERSION = 0.01 VERSION_MACRO = VERSION VERSION_SYM = 0_01 DEFINE_VERSION = -D$(VERSION_MACRO)=\"$(VERSION)\" XS_VERSION = 0.01 XS_VERSION_MACRO = XS_VERSION XS_DEFINE_VERSION = -D$(XS_VERSION_MACRO)=\"$(XS_VERSION)\" INST_ARCHLIB = ..\blib\arch INST_SCRIPT = ..\blib\script INST_BIN = ..\blib\bin INST_LIB = ..\blib\lib INST_MAN1DIR = ..\blib\man1 INST_MAN3DIR = ..\blib\man3 MAN1EXT = 1 MAN3EXT = 3 INSTALLDIRS = site DESTDIR = PREFIX = PERLPREFIX = C:\Perl\Perl587 SITEPREFIX = C:\Perl\Perl587\site VENDORPREFIX = INSTALLPRIVLIB = $(PERLPREFIX)\lib DESTINSTALLPRIVLIB = $(DESTDIR)$(INSTALLPRIVLIB) INSTALLSITELIB = $(SITEPREFIX)\lib DESTINSTALLSITELIB = $(DESTDIR)$(INSTALLSITELIB) INSTALLVENDORLIB = DESTINSTALLVENDORLIB = $(DESTDIR)$(INSTALLVENDORLIB) INSTALLARCHLIB = $(PERLPREFIX)\lib DESTINSTALLARCHLIB = $(DESTDIR)$(INSTALLARCHLIB) INSTALLSITEARCH = $(SITEPREFIX)\lib DESTINSTALLSITEARCH = $(DESTDIR)$(INSTALLSITEARCH) INSTALLVENDORARCH = DESTINSTALLVENDORARCH = $(DESTDIR)$(INSTALLVENDORARCH) INSTALLBIN = $(PERLPREFIX)\bin DESTINSTALLBIN = $(DESTDIR)$(INSTALLBIN) INSTALLSITEBIN = C:\Perl\Perl587\bin DESTINSTALLSITEBIN = $(DESTDIR)$(INSTALLSITEBIN) INSTALLVENDORBIN = DESTINSTALLVENDORBIN = $(DESTDIR)$(INSTALLVENDORBIN) INSTALLSCRIPT = $(PERLPREFIX)\bin DESTINSTALLSCRIPT = $(DESTDIR)$(INSTALLSCRIPT) INSTALLMAN1DIR = $(PERLPREFIX)\man\man1 DESTINSTALLMAN1DIR = $(DESTDIR)$(INSTALLMAN1DIR) INSTALLSITEMAN1DIR = $(SITEPREFIX)\man\man1 DESTINSTALLSITEMAN1DIR = $(DESTDIR)$(INSTALLSITEMAN1DIR) INSTALLVENDORMAN1DIR = DESTINSTALLVENDORMAN1DIR = $(DESTDIR)$(INSTALLVENDORMAN1DIR) INSTALLMAN3DIR = $(PERLPREFIX)\man\man3 DESTINSTALLMAN3DIR = $(DESTDIR)$(INSTALLMAN3DIR) INSTALLSITEMAN3DIR = $(SITEPREFIX)\man\man3 DESTINSTALLSITEMAN3DIR = $(DESTDIR)$(INSTALLSITEMAN3DIR) INSTALLVENDORMAN3DIR = DESTINSTALLVENDORMAN3DIR = $(DESTDIR)$(INSTALLVENDORMAN3DIR) PERL_LIB = C:\Perl\Perl587\lib PERL_ARCHLIB = C:\Perl\Perl587\lib LIBPERL_A = libperl.lib FIRST_MAKEFILE = Makefile MAKEFILE_OLD = $(FIRST_MAKEFILE).old MAKE_APERL_FILE = $(FIRST_MAKEFILE).aperl PERLMAINCC = $(CC) PERL_INC = C:\Perl\Perl587\lib\CORE PERL = C:\Perl\Perl587\bin\perl.exe FULLPERL = C:\Perl\Perl587\bin\perl.exe ABSPERL = $(PERL) PERLRUN = $(PERL) FULLPERLRUN = $(FULLPERL) ABSPERLRUN = $(ABSPERL) PERLRUNINST = $(PERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" FULLPERLRUNINST = $(FULLPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" ABSPERLRUNINST = $(ABSPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" PERL_CORE = 0 PERM_RW = 644 PERM_RWX = 755 MAKEMAKER = C:/Perl/Perl587/lib/ExtUtils/MakeMaker.pm MM_VERSION = 6.17 MM_REVISION = 1.133 # FULLEXT = Pathname for extension directory (eg Foo/Bar/Oracle). # BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT. (eg Oracle) # PARENT_NAME = NAME without BASEEXT and no trailing :: (eg Foo::Bar) # DLBASE = Basename part of dynamic library. May be just equal BASEEXT. FULLEXT = Win32\GUI\DropFiles BASEEXT = DropFiles PARENT_NAME = Win32::GUI DLBASE = $(BASEEXT) VERSION_FROM = DropFiles.pm OBJECT = $(BASEEXT)$(OBJ_EXT) $(BASEEXT).res LDFROM = $(OBJECT) LINKTYPE = dynamic # Handy lists of source code files: XS_FILES = DropFiles.xs C_FILES = DropFiles.c O_FILES = DropFiles.obj H_FILES = ppport.h MAN1PODS = MAN3PODS = DropFiles.pm # Where is the Config information that we are using/depend on CONFIGDEP = $(PERL_ARCHLIB)$(DIRFILESEP)Config.pm $(PERL_INC)$(DIRFILESEP)config.h # Where to build things INST_LIBDIR = $(INST_LIB)\Win32\GUI INST_ARCHLIBDIR = $(INST_ARCHLIB)\Win32\GUI INST_AUTODIR = $(INST_LIB)\auto\$(FULLEXT) INST_ARCHAUTODIR = $(INST_ARCHLIB)\auto\$(FULLEXT) INST_STATIC = $(INST_ARCHAUTODIR)\$(BASEEXT)$(LIB_EXT) INST_DYNAMIC = $(INST_ARCHAUTODIR)\$(DLBASE).$(DLEXT) INST_BOOT = $(INST_ARCHAUTODIR)\$(BASEEXT).bs # Extra linker info EXPORT_LIST = $(BASEEXT).def PERL_ARCHIVE = $(PERL_INC)\perl58.lib PERL_ARCHIVE_AFTER = TO_INST_PM = DropFiles.pm PM_TO_BLIB = DropFiles.pm \ $(INST_LIB)\Win32\GUI\DropFiles.pm # --- MakeMaker platform_constants section: MM_Win32_VERSION = 1.09 # --- MakeMaker tool_autosplit section: # Usage: $(AUTOSPLITFILE) FileToSplit AutoDirToSplitInto AUTOSPLITFILE = $(PERLRUN) -e "use AutoSplit; autosplit($$ARGV[0], $$ARGV[1], 0, 1, 1)" # --- MakeMaker tool_xsubpp section: XSUBPPDIR = C:\Perl\Perl587\lib\ExtUtils XSUBPP = $(XSUBPPDIR)/xsubpp XSPROTOARG = XSUBPPDEPS = C:\Perl\Perl587\lib\ExtUtils\typemap typemap $(XSUBPP) XSUBPPARGS = -typemap C:\Perl\Perl587\lib\ExtUtils\typemap -typemap typemap XSUBPP_EXTRA_ARGS = # --- MakeMaker tools_other section: CHMOD = $(PERLRUN) -MExtUtils::Command -e chmod CP = $(PERLRUN) -MExtUtils::Command -e cp MV = $(PERLRUN) -MExtUtils::Command -e mv NOOP = rem NOECHO = @ RM_F = $(PERLRUN) -MExtUtils::Command -e rm_f RM_RF = $(PERLRUN) -MExtUtils::Command -e rm_rf TEST_F = $(PERLRUN) -MExtUtils::Command -e test_f TOUCH = $(PERLRUN) -MExtUtils::Command -e touch UMASK_NULL = umask 0 DEV_NULL = > NUL MKPATH = $(PERLRUN) "-MExtUtils::Command" -e mkpath EQUALIZE_TIMESTAMP = $(PERLRUN) "-MExtUtils::Command" -e eqtime ECHO = $(PERLRUN) -l -e "print qq{@ARGV}" ECHO_N = $(PERLRUN) -e "print qq{@ARGV}" UNINST = 0 VERBINST = 0 MOD_INSTALL = $(PERLRUN) -MExtUtils::Install -e "install({@ARGV}, '$(VERBINST)', 0, '$(UNINST)');" DOC_INSTALL = $(PERLRUN) "-MExtUtils::Command::MM" -e perllocal_install UNINSTALL = $(PERLRUN) "-MExtUtils::Command::MM" -e uninstall WARN_IF_OLD_PACKLIST = $(PERLRUN) "-MExtUtils::Command::MM" -e warn_if_old_packlist # --- MakeMaker makemakerdflt section: makemakerdflt: all $(NOECHO) $(NOOP) # --- MakeMaker dist section skipped. # --- MakeMaker macro section: DEMOS = demos/DropFilesDemo.pl INST_DEMODIR = $(INST_LIB)/Win32/GUI/demos/$(BASEEXT) RC = rc.exe RCFLAGS = # --- MakeMaker depend section: # --- MakeMaker cflags section: CCFLAGS = -nologo -Gf -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DBUILT_BY_ACTIVESTATE -DNO_HASH_SEED -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX OPTIMIZE = -MD -Zi -DNDEBUG -O1 PERLTYPE = MPOLLUTE = # --- MakeMaker const_loadlibs section: # Win32::GUI::DropFiles might depend on some other libraries: # See ExtUtils::Liblist for details # LDLOADLIBS = oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.lib LD_RUN_PATH = # --- MakeMaker const_cccmd section: CCCMD = $(CC) -c $(PASTHRU_INC) $(INC) \ $(CCFLAGS) $(OPTIMIZE) \ $(PERLTYPE) $(MPOLLUTE) $(DEFINE_VERSION) \ $(XS_DEFINE_VERSION) # --- MakeMaker post_constants section: # --- MakeMaker pasthru section: PASTHRU = -nologo # --- MakeMaker special_targets section: .SUFFIXES: .xs .c .C .cpp .i .s .cxx .cc $(OBJ_EXT) .PHONY: all config static dynamic test linkext manifest # --- MakeMaker c_o section: .c.i: cl -nologo -E -c $(PASTHRU_INC) $(INC) \ $(CCFLAGS) $(OPTIMIZE) \ $(PERLTYPE) $(MPOLLUTE) $(DEFINE_VERSION) \ $(XS_DEFINE_VERSION) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c > $*.i .c.s: $(CCCMD) -S $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c .c$(OBJ_EXT): $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c .cpp$(OBJ_EXT): $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.cpp .cxx$(OBJ_EXT): $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.cxx .cc$(OBJ_EXT): $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.cc # --- MakeMaker xs_c section: .xs.c: $(PERLRUN) $(XSUBPP) $(XSPROTOARG) $(XSUBPPARGS) $*.xs > $*.c # --- MakeMaker xs_o section: .xs$(OBJ_EXT): $(PERLRUN) $(XSUBPP) $(XSPROTOARG) $(XSUBPPARGS) $*.xs > $*.c $(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(DEFINE) $*.c # --- MakeMaker top_targets section: all :: pure_all $(NOECHO) $(NOOP) pure_all :: config pm_to_blib subdirs linkext $(NOECHO) $(NOOP) subdirs :: $(MYEXTLIB) $(NOECHO) $(NOOP) config :: $(FIRST_MAKEFILE) $(INST_LIBDIR)$(DIRFILESEP).exists $(NOECHO) $(NOOP) config :: $(INST_ARCHAUTODIR)$(DIRFILESEP).exists $(NOECHO) $(NOOP) config :: $(INST_AUTODIR)$(DIRFILESEP).exists $(NOECHO) $(NOOP) $(INST_AUTODIR)\.exists :: C:\Perl\Perl587\lib\CORE\perl.h $(NOECHO) $(MKPATH) $(INST_AUTODIR) $(NOECHO) $(EQUALIZE_TIMESTAMP) C:\Perl\Perl587\lib\CORE\perl.h $(INST_AUTODIR)\.exists -$(NOECHO) $(CHMOD) $(PERM_RWX) $(INST_AUTODIR) $(INST_LIBDIR)\.exists :: C:\Perl\Perl587\lib\CORE\perl.h $(NOECHO) $(MKPATH) $(INST_LIBDIR) $(NOECHO) $(EQUALIZE_TIMESTAMP) C:\Perl\Perl587\lib\CORE\perl.h $(INST_LIBDIR)\.exists -$(NOECHO) $(CHMOD) $(PERM_RWX) $(INST_LIBDIR) $(INST_ARCHAUTODIR)\.exists :: C:\Perl\Perl587\lib\CORE\perl.h $(NOECHO) $(MKPATH) $(INST_ARCHAUTODIR) $(NOECHO) $(EQUALIZE_TIMESTAMP) C:\Perl\Perl587\lib\CORE\perl.h $(INST_ARCHAUTODIR)\.exists -$(NOECHO) $(CHMOD) $(PERM_RWX) $(INST_ARCHAUTODIR) config :: $(INST_MAN3DIR)$(DIRFILESEP).exists $(NOECHO) $(NOOP) $(INST_MAN3DIR)\.exists :: C:\Perl\Perl587\lib\CORE\perl.h $(NOECHO) $(MKPATH) $(INST_MAN3DIR) $(NOECHO) $(EQUALIZE_TIMESTAMP) C:\Perl\Perl587\lib\CORE\perl.h $(INST_MAN3DIR)\.exists -$(NOECHO) $(CHMOD) $(PERM_RWX) $(INST_MAN3DIR) $(O_FILES): $(H_FILES) help: perldoc ExtUtils::MakeMaker # --- MakeMaker linkext section: linkext :: $(LINKTYPE) $(NOECHO) $(NOOP) # --- MakeMaker dlsyms section: DropFiles.def: Makefile.PL $(PERLRUN) -MExtUtils::Mksymlists \ -e "Mksymlists('NAME'=>\"Win32::GUI::DropFiles\", 'DLBASE' => '$(BASEEXT)', 'DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' => []);" # --- MakeMaker dynamic section: dynamic :: $(FIRST_MAKEFILE) $(INST_DYNAMIC) $(INST_BOOT) $(NOECHO) $(NOOP) # --- MakeMaker dynamic_bs section: BOOTSTRAP = $(BASEEXT).bs # As Mkbootstrap might not write a file (if none is required) # we use touch to prevent make continually trying to remake it. # The DynaLoader only reads a non-empty file. $(BOOTSTRAP): $(FIRST_MAKEFILE) $(BOOTDEP) $(INST_ARCHAUTODIR)$(DIRFILESEP).exists $(NOECHO) $(ECHO) "Running Mkbootstrap for $(NAME) ($(BSLOADLIBS))" $(NOECHO) $(PERLRUN) \ "-MExtUtils::Mkbootstrap" \ -e "Mkbootstrap('$(BASEEXT)','$(BSLOADLIBS)');" $(NOECHO) $(TOUCH) $(BOOTSTRAP) $(CHMOD) $(PERM_RW) $@ $(INST_BOOT): $(BOOTSTRAP) $(INST_ARCHAUTODIR)$(DIRFILESEP).exists $(NOECHO) $(RM_RF) $(INST_BOOT) -$(CP) $(BOOTSTRAP) $(INST_BOOT) $(CHMOD) $(PERM_RW) $@ # --- MakeMaker dynamic_lib section: # This section creates the dynamically loadable $(INST_DYNAMIC) # from $(OBJECT) and possibly $(MYEXTLIB). OTHERLDFLAGS = INST_DYNAMIC_DEP = $(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) $(INST_ARCHAUTODIR)$(DIRFILESEP).exists $(EXPORT_LIST) $(PERL_ARCHIVE) $(INST_DYNAMIC_DEP) $(LD) -out:$@ $(LDDLFLAGS) $(LDFROM) $(OTHERLDFLAGS) $(MYEXTLIB) $(PERL_ARCHIVE) $(LDLOADLIBS) -def:$(EXPORT_LIST) $(CHMOD) $(PERM_RWX) $@ # --- MakeMaker static section: ## $(INST_PM) has been moved to the all: target. ## It remains here for awhile to allow for old usage: "make static" static :: $(FIRST_MAKEFILE) $(INST_STATIC) $(NOECHO) $(NOOP) # --- MakeMaker static_lib section: $(INST_STATIC): $(OBJECT) $(MYEXTLIB) $(INST_ARCHAUTODIR)$(DIRFILESEP).exists $(RM_RF) $@ $(AR) -out:$@ $(OBJECT) $(CHMOD) $(PERM_RWX) $@ $(NOECHO) $(ECHO) "$(EXTRALIBS)" > $(INST_ARCHAUTODIR)\extralibs.ld # --- MakeMaker manifypods section: POD2MAN_EXE = $(PERLRUN) "-MExtUtils::Command::MM" -e pod2man "--" POD2MAN = $(POD2MAN_EXE) manifypods : pure_all \ DropFiles.pm \ DropFiles.pm $(NOECHO) $(POD2MAN) --section=3 --perm_rw=$(PERM_RW)\ DropFiles.pm $(INST_MAN3DIR)\Win32\GUI\DropFiles.$(MAN3EXT) # --- MakeMaker processPL section: all :: $(BASEEXT).rc $(NOECHO) $(NOOP) $(BASEEXT).rc :: DropFilesRC.PL $(PERLRUNINST) DropFilesRC.PL $(BASEEXT).rc # --- MakeMaker installbin section: # --- MakeMaker subdirs section: # none # --- MakeMaker clean_subdirs section: clean_subdirs : $(NOECHO)$(NOOP) # --- MakeMaker clean section: # Delete temporary files but do not touch installed files. We don't delete # the Makefile here so a later make realclean still has a makefile to use. clean :: clean_subdirs -$(RM_RF) DropFiles.c *.rc *.res ./blib $(MAKE_APERL_FILE) $(INST_ARCHAUTODIR)/extralibs.all $(INST_ARCHAUTODIR)/extralibs.ld perlmain.c tmon.out mon.out so_locations pm_to_blib *$(OBJ_EXT) *$(LIB_EXT) perl.exe perl perl$(EXE_EXT) $(BOOTSTRAP) $(BASEEXT).bso $(BASEEXT).def lib$(BASEEXT).def $(BASEEXT).exp $(BASEEXT).x core core.*perl.*.? *perl.core core.[0-9] core.[0-9][0-9] core.[0-9][0-9][0-9] core.[0-9][0-9][0-9][0-9] core.[0-9][0-9][0-9][0-9][0-9] -$(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD) $(DEV_NULL) clean :: -$(RM_F) *.pdb # --- MakeMaker realclean_subdirs section: realclean_subdirs : $(NOECHO)$(NOOP) # --- MakeMaker realclean section: # Delete temporary files (via clean) and also delete installed files realclean purge :: clean realclean_subdirs $(RM_RF) $(INST_AUTODIR) $(INST_ARCHAUTODIR) $(RM_RF) $(DISTVNAME) $(RM_F) $(INST_DYNAMIC) $(INST_BOOT) $(RM_F) $(INST_STATIC) $(RM_F) $(INST_LIB)\Win32\GUI\DropFiles.pm $(MAKEFILE_OLD) $(FIRST_MAKEFILE) # --- MakeMaker metafile section: metafile : $(NOECHO) $(ECHO) "# http://module-build.sourceforge.net/META-spec.html" > META.yml $(NOECHO) $(ECHO) "#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#" >> META.yml $(NOECHO) $(ECHO) "name: Win32-GUI-DropFiles" >> META.yml $(NOECHO) $(ECHO) "version: 0.01" >> META.yml $(NOECHO) $(ECHO) "version_from: DropFiles.pm" >> META.yml $(NOECHO) $(ECHO) "installdirs: site" >> META.yml $(NOECHO) $(ECHO) "requires:" >> META.yml $(NOECHO) $(ECHO) "" >> META.yml $(NOECHO) $(ECHO) "distribution_type: module" >> META.yml $(NOECHO) $(ECHO) "generated_by: ExtUtils::MakeMaker version 6.17" >> META.yml # --- MakeMaker metafile_addtomanifest section: metafile_addtomanifest: $(NOECHO) $(PERLRUN) -MExtUtils::Manifest=maniadd -e "eval { maniadd({q{META.yml} => q{Module meta-data (added by MakeMaker)}}) } \ or print \"Could not add META.yml to MANIFEST: $${'@'}\n\"" # --- MakeMaker dist_basics section skipped. # --- MakeMaker dist_core section skipped. # --- MakeMaker distdir section skipped. # --- MakeMaker dist_test section skipped. # --- MakeMaker dist_ci section skipped. # --- MakeMaker install section skipped. # --- MakeMaker force section: # Phony target to force checking subdirectories. FORCE: $(NOECHO) $(NOOP) # --- MakeMaker perldepend section: PERL_HDRS = \ $(PERL_INC)/EXTERN.h \ $(PERL_INC)/INTERN.h \ $(PERL_INC)/XSUB.h \ $(PERL_INC)/av.h \ $(PERL_INC)/cc_runtime.h \ $(PERL_INC)/config.h \ $(PERL_INC)/cop.h \ $(PERL_INC)/cv.h \ $(PERL_INC)/dosish.h \ $(PERL_INC)/embed.h \ $(PERL_INC)/embedvar.h \ $(PERL_INC)/fakethr.h \ $(PERL_INC)/form.h \ $(PERL_INC)/gv.h \ $(PERL_INC)/handy.h \ $(PERL_INC)/hv.h \ $(PERL_INC)/intrpvar.h \ $(PERL_INC)/iperlsys.h \ $(PERL_INC)/keywords.h \ $(PERL_INC)/mg.h \ $(PERL_INC)/nostdio.h \ $(PERL_INC)/op.h \ $(PERL_INC)/opcode.h \ $(PERL_INC)/patchlevel.h \ $(PERL_INC)/perl.h \ $(PERL_INC)/perlio.h \ $(PERL_INC)/perlsdio.h \ $(PERL_INC)/perlsfio.h \ $(PERL_INC)/perlvars.h \ $(PERL_INC)/perly.h \ $(PERL_INC)/pp.h \ $(PERL_INC)/pp_proto.h \ $(PERL_INC)/proto.h \ $(PERL_INC)/regcomp.h \ $(PERL_INC)/regexp.h \ $(PERL_INC)/regnodes.h \ $(PERL_INC)/scope.h \ $(PERL_INC)/sv.h \ $(PERL_INC)/thrdvar.h \ $(PERL_INC)/thread.h \ $(PERL_INC)/unixish.h \ $(PERL_INC)/util.h $(OBJECT) : $(PERL_HDRS) DropFiles.c : $(XSUBPPDEPS) # --- MakeMaker makefile section: $(OBJECT) : $(FIRST_MAKEFILE) # We take a very conservative approach here, but it's worth it. # We move Makefile to Makefile.old here to avoid gnu make looping. $(FIRST_MAKEFILE) : Makefile.PL $(CONFIGDEP) $(NOECHO) $(ECHO) "Makefile out-of-date with respect to $?" $(NOECHO) $(ECHO) "Cleaning current config before rebuilding Makefile..." $(NOECHO) $(RM_F) $(MAKEFILE_OLD) $(NOECHO) $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD) -$(MAKE) -f $(MAKEFILE_OLD) clean $(DEV_NULL) || $(NOOP) $(PERLRUN) Makefile.PL $(NOECHO) $(ECHO) "==> Your Makefile has been rebuilt. <==" $(NOECHO) $(ECHO) "==> Please rerun the make command. <==" false # --- MakeMaker staticmake section: # --- MakeMaker makeaperl section --- MAP_TARGET = ..\perl FULLPERL = C:\Perl\Perl587\bin\perl.exe # --- MakeMaker test section: TEST_VERBOSE=0 TEST_TYPE=test_$(LINKTYPE) TEST_FILE = test.pl TEST_FILES = t\01_load.t t\02_old_callback.t t\03_new_callback.t t\04_GetDroppedFiles.t t\05_GetDroppedFile.t t\06_GetDropPos.t t\07_DragQueryFile.t t\08_DragQueryPoint.t t\09_DragFinish.t t\10_Unicode.t t\11_invalid_handles.t t\98_pod.t t\99_pod_coverage.t TESTDB_SW = -d testdb :: testdb_$(LINKTYPE) test :: $(TEST_TYPE) test_dynamic :: pure_all $(FULLPERLRUN) "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')" $(TEST_FILES) testdb_dynamic :: pure_all $(FULLPERLRUN) $(TESTDB_SW) "-I$(INST_LIB)" "-I$(INST_ARCHLIB)" $(TEST_FILE) test_ : test_dynamic test_static :: pure_all $(MAP_TARGET) ./$(MAP_TARGET) "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')" $(TEST_FILES) testdb_static :: pure_all $(MAP_TARGET) ./$(MAP_TARGET) $(TESTDB_SW) "-I$(INST_LIB)" "-I$(INST_ARCHLIB)" $(TEST_FILE) # --- MakeMaker ppd section: # Creates a PPD (Perl Package Description) for a binary distribution. ppd: $(NOECHO) $(ECHO) "<SOFTPKG NAME=\"$(DISTNAME)\" VERSION=\"0,01,0,0\">" > $(DISTNAME).ppd $(NOECHO) $(ECHO) " <TITLE>$(DISTNAME)</TITLE>" >> $(DISTNAME).ppd $(NOECHO) $(ECHO) " <ABSTRACT>Extension to Win32::GUI for shell Drag&Drop integration</ABSTRACT>" >> $(DISTNAME).ppd $(NOECHO) $(ECHO) " <AUTHOR>Robert May <rob...@us...></AUTHOR>" >> $(DISTNAME).ppd $(NOECHO) $(ECHO) " <IMPLEMENTATION>" >> $(DISTNAME).ppd $(NOECHO) $(ECHO) " <OS NAME=\"$(OSNAME)\" />" >> $(DISTNAME).ppd $(NOECHO) $(ECHO) " <ARCHITECTURE NAME=\"MSWin32-x86-multi-thread-5.8\" />" >> $(DISTNAME).ppd $(NOECHO) $(ECHO) " <CODEBASE HREF=\"\" />" >> $(DISTNAME).ppd $(NOECHO) $(ECHO) " </IMPLEMENTATION>" >> $(DISTNAME).ppd $(NOECHO) $(ECHO) "</SOFTPKG>" >> $(DISTNAME).ppd # --- MakeMaker pm_to_blib section: pm_to_blib: $(TO_INST_PM) $(NOECHO) $(PERLRUN) -MExtUtils::Install -e "pm_to_blib({@ARGV}, '$(INST_LIB)\auto', '$(PM_FILTER)')"\ DropFiles.pm $(INST_LIB)\Win32\GUI\DropFiles.pm $(NOECHO) $(TOUCH) $@ # --- MakeMaker selfdocument section: # --- MakeMaker postamble section: .rc.res: $(RC) $(RCFLAGS) $< pure_all :: demo_to_blib $(NOECHO) $(NOOP) demo_to_blib: $(DEMOS) $(NOECHO) $(MKPATH) $(INST_DEMODIR) $(CP) $? $(INST_DEMODIR) $(NOECHO) $(TOUCH) demo_to_blib clean :: -$(RM_F) demo_to_blib # End. --- NEW FILE: ppport.h --- #if 0 <<'SKIP'; #endif /* ---------------------------------------------------------------------- ppport.h -- Perl/Pollution/Portability Version 3.06 Automatically created by Devel::PPPort running under perl 5.008007 on Fri Mar 17 15:01:07 2006. Do NOT edit this file directly! -- Edit PPPort_pm.PL and the includes in parts/inc/ instead. Use 'perldoc ppport.h' to view the documentation below. ---------------------------------------------------------------------- SKIP [...4855 lines suppressed...] #ifdef NO_XSLOCKS # ifdef dJMPENV # define dXCPT dJMPENV; int rEtV = 0 # define XCPT_TRY_START JMPENV_PUSH(rEtV); if (rEtV == 0) # define XCPT_TRY_END JMPENV_POP; # define XCPT_CATCH if (rEtV != 0) # define XCPT_RETHROW JMPENV_JUMP(rEtV) # else # define dXCPT Sigjmp_buf oldTOP; int rEtV = 0 # define XCPT_TRY_START Copy(top_env, oldTOP, 1, Sigjmp_buf); rEtV = Sigsetjmp(top_env, 1); if (rEtV == 0) # define XCPT_TRY_END Copy(oldTOP, top_env, 1, Sigjmp_buf); # define XCPT_CATCH if (rEtV != 0) # define XCPT_RETHROW Siglongjmp(top_env, rEtV) # endif #endif #endif /* _P_P_PORTABILITY_H_ */ /* End of File ppport.h */ --- NEW FILE: README --- Win32-GUI-DropFiles =================== Win32::GUI::DropFiles provides integration with the windows shell for Win32::GUI applications, allowing retrieval of the filenames of files dragged from the shell (e.g. explorer) to the application window. INSTALLATION - from source As a source distribution this module is bundled with Win32::GUI, and will be built while makeing Win32::GUI itself. It is possible to build and install this module stand alone: perl Makefile.PL make make test make install INSTALLATION - binary distribution This module will be distributed in binary form (ActiveState PPM) as part of the Win32::GUI module. See the Win32-GUI module README for further details. DEPENDENCIES This module requires these other modules and libraries: perl 5.6.0 or higher (5.8.6 or higher recommended) Win32::GUI 1.04 or higher To fully test this module the following modules and libraries are required. Some tests will be skipped if these modules are not available: Win32::API 0.41 or higher Test::Pod 1.14 or higher Test::Pod::Coverage 1.04 or higher Unicode::String COPYRIGHT AND LICENCE Copyright (C) 2006 by Robert May This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. ---------------------------------------------------------------------- $Id: README,v 1.1 2006/04/25 21:38:18 robertemay Exp $ --- NEW FILE: TYPEMAP --- # $Id: TYPEMAP,v 1.1 2006/04/25 21:38:18 robertemay Exp $ # TYPEMAP for Win32::GUI::DropFiles TYPEMAP HDROP T_HANDLE BOOL T_UV ################################################################################ INPUT T_HANDLE if(SvROK($arg)) { SV** out=hv_fetch((HV*)SvRV($arg), \"-handle\", 7, 0); if(out != NULL) $var = INT2PTR($type,SvIV(*out)); else $var = NULL; } else $var = INT2PTR($type,SvIV($arg)); ################################################################################ OUTPUT |
From: Robert M. <rob...@us...> - 2006-04-25 21:29:45
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-DropFiles/demos In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28229/demos Log Message: Directory /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-DropFiles/demos added to the repository |
From: Robert M. <rob...@us...> - 2006-04-25 21:29:33
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-DropFiles/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28112/t Log Message: Directory /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-DropFiles/t added to the repository |
From: Robert M. <rob...@us...> - 2006-04-25 21:27:08
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-DropFiles In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26065/Win32-GUI-DropFiles Log Message: Directory /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-DropFiles added to the repository |
From: Robert M. <rob...@us...> - 2006-04-25 21:24:59
|
Update of /cvsroot/perl-win32-gui/Win32-GUI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24444 Modified Files: CHANGELOG Makefile.PL RichEdit.xs Log Message: Fix build under cygwin Index: RichEdit.xs =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/RichEdit.xs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** RichEdit.xs 11 Jan 2006 21:26:16 -0000 1.7 --- RichEdit.xs 25 Apr 2006 21:24:52 -0000 1.8 *************** *** 294,298 **** EXTEND(SP, 2); XST_mPV(si++, "-bold"); ! XST_mIV(si++, cf.dwEffects & CFE_BOLD > 0); } if(dwMask & CFM_COLOR) { --- 294,298 ---- EXTEND(SP, 2); XST_mPV(si++, "-bold"); ! XST_mIV(si++, (cf.dwEffects & CFE_BOLD) ? 1 : 0); } if(dwMask & CFM_COLOR) { *************** *** 309,313 **** EXTEND(SP, 2); XST_mPV(si++, "-italic"); ! XST_mIV(si++, cf.dwEffects & CFE_ITALIC > 0); } if(dwMask & CFM_SIZE) { --- 309,313 ---- EXTEND(SP, 2); XST_mPV(si++, "-italic"); ! XST_mIV(si++, (cf.dwEffects & CFE_ITALIC) ? 1 : 0); } if(dwMask & CFM_SIZE) { *************** *** 319,328 **** EXTEND(SP, 2); XST_mPV(si++, "-strikeout"); ! XST_mIV(si++, cf.dwEffects & CFE_STRIKEOUT > 0); } if(dwMask & CFM_UNDERLINE) { EXTEND(SP, 2); XST_mPV(si++, "-underline"); ! XST_mIV(si++, cf.dwEffects & CFE_UNDERLINE > 0); } XSRETURN(si); --- 319,328 ---- EXTEND(SP, 2); XST_mPV(si++, "-strikeout"); ! XST_mIV(si++, (cf.dwEffects & CFE_STRIKEOUT) ? 1 : 0); } if(dwMask & CFM_UNDERLINE) { EXTEND(SP, 2); XST_mPV(si++, "-underline"); ! XST_mIV(si++, (cf.dwEffects & CFE_UNDERLINE) ? 1 : 0); } XSRETURN(si); Index: Makefile.PL =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Makefile.PL,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Makefile.PL 13 Apr 2006 22:17:07 -0000 1.19 --- Makefile.PL 25 Apr 2006 21:24:52 -0000 1.20 *************** *** 3,7 **** use File::Spec(); ! use ExtUtils::MakeMaker; use Config; --- 3,10 ---- use File::Spec(); ! # Bug in ExUtils::MakeMaker 5.45 that ships with ActiveState Perl ! # 5.6.1, writes the subdirs target with dmake syntax, that breaks ! # nmake. Fixed in EU::MM 5.47 ! use ExtUtils::MakeMaker 5.47; use Config; *************** *** 203,207 **** NAME => 'Win32::GUI', VERSION_FROM => 'GUI.pm', ! LIBS => [':nosearch -lcomctl32 -lcomdlg32 -lshell32 -lgdi32 -luser32'], PREREQ_PM => { 'Test::More' => 0, --- 206,210 ---- NAME => 'Win32::GUI', VERSION_FROM => 'GUI.pm', ! LIBS => [':nosearch -lcomctl32 -lcomdlg32 -lshell32 -lgdi32 -luser32 -lversion'], PREREQ_PM => { 'Test::More' => 0, *************** *** 243,247 **** if ($main::BUILDENV eq "cygwin") { ! $MakefileArgs{'LIBS'} = ['-L/usr/lib/w32api -lcomctl32 -lcomdlg32 -lshell32 -lgdi32 -luser32']; $MakefileArgs{'DEFINE'} = '-UWIN32'; $MakefileArgs{'MYEXTLIB'} = './libcyg.a'; --- 246,250 ---- if ($main::BUILDENV eq "cygwin") { ! $MakefileArgs{'LIBS'} = ['-L/usr/lib/w32api -lcomctl32 -lcomdlg32 -lshell32 -lgdi32 -luser32 -lversion']; $MakefileArgs{'DEFINE'} = '-UWIN32'; $MakefileArgs{'MYEXTLIB'} = './libcyg.a'; *************** *** 259,263 **** sub pasthru { my $inherited = shift->SUPER::pasthru(@_); ! return "$inherited W32G_CORE=1"; } --- 262,268 ---- sub pasthru { my $inherited = shift->SUPER::pasthru(@_); ! chomp $inherited; ! $inherited .= "\\\n\tW32G_CORE=1"; ! return $inherited; } Index: CHANGELOG =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/CHANGELOG,v retrieving revision 1.79 retrieving revision 1.80 diff -C2 -d -r1.79 -r1.80 *** CHANGELOG 20 Apr 2006 22:20:20 -0000 1.79 --- CHANGELOG 25 Apr 2006 21:24:51 -0000 1.80 *************** *** 6,9 **** --- 6,14 ---- Win32-GUI ChangeLog =================== + + [Robert May] : 25 Apr 2006 - Fix build under cygwin/MSVC7 + - RichEdit.xs fix precedence warning under VC7 + - Makefile.PL fix LIBS under cygwin (add -lversion); fix + pasthru target under cygwin + + [Robert May] : 20 Apr 2006 - Fix build under MinGW - GUI.xs correct typo in type definition (LPCTSTR vs LPTSTR); |
From: Robert M. <rob...@us...> - 2006-04-20 22:20:26
|
Update of /cvsroot/perl-win32-gui/Win32-GUI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25185 Modified Files: CHANGELOG GUI.xs Log Message: Fix MinGW build errors and warnings Index: GUI.xs =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/GUI.xs,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** GUI.xs 14 Apr 2006 01:52:25 -0000 1.55 --- GUI.xs 20 Apr 2006 22:20:20 -0000 1.56 *************** *** 5586,5595 **** void GetDllVersion(filename) ! LPCTSTR filename PREINIT: HINSTANCE hinstDll; ! DWORD major = -1; ! DWORD minor = -1; ! DWORD build = -1; PPCODE: hinstDll = LoadLibrary(filename); --- 5586,5595 ---- void GetDllVersion(filename) ! LPTSTR filename PREINIT: HINSTANCE hinstDll; ! DWORD major = 0xFFFFFFFF; ! DWORD minor = 0xFFFFFFFF; ! DWORD build = 0xFFFFFFFF; PPCODE: hinstDll = LoadLibrary(filename); *************** *** 5618,5622 **** } ! if(major == -1) { DWORD size; DWORD handle; --- 5618,5622 ---- } ! if(major == 0xFFFFFFFF) { DWORD size; DWORD handle; *************** *** 5642,5646 **** } ! if(major == -1) { XSRETURN_UNDEF; } --- 5642,5646 ---- } ! if(major == 0xFFFFFFFF) { XSRETURN_UNDEF; } Index: CHANGELOG =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/CHANGELOG,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -d -r1.78 -r1.79 *** CHANGELOG 14 Apr 2006 01:52:25 -0000 1.78 --- CHANGELOG 20 Apr 2006 22:20:20 -0000 1.79 *************** *** 6,9 **** --- 6,14 ---- Win32-GUI ChangeLog =================== + + [Robert May] : 20 Apr 2006 - Fix build under MinGW + - GUI.xs correct typo in type definition (LPCTSTR vs LPTSTR); + use 0xFFFFFFFF instead of -1 to avoid gcc warning when assigning + to UINT. + + [Robert May] : 14 Apr 2006 - Fix build/test on Perl 5.6.1 - GUI.h GUI.xs add GetDllVersion call to replace use of |
From: Robert M. <rob...@us...> - 2006-04-14 01:52:33
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/samples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28625/samples Modified Files: NotifyIcon.pl Log Message: Fix build/test on Perl 5.6.1 Index: NotifyIcon.pl =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/NotifyIcon.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NotifyIcon.pl 11 Jan 2006 21:26:16 -0000 1.1 --- NotifyIcon.pl 14 Apr 2006 01:52:28 -0000 1.2 *************** *** 18,22 **** use warnings; ! use Win32; use Win32::GUI 1.03_02, qw(MB_OK MB_ICONHAND ES_WANTRETURN WS_CLIPCHILDREN WS_EX_TOPMOST); use Win32::GUI::BitmapInline(); --- 18,22 ---- use warnings; ! use Win32(); use Win32::GUI 1.03_02, qw(MB_OK MB_ICONHAND ES_WANTRETURN WS_CLIPCHILDREN WS_EX_TOPMOST); use Win32::GUI::BitmapInline(); *************** *** 52,56 **** icon => undef, ni => undef, ! v5 => ($Win32::GUI::NotifyIcon::SHELLDLL_VERSION >= 5), events => [], max_events => 100, --- 52,56 ---- icon => undef, ni => undef, ! 'v5' => ($Win32::GUI::NotifyIcon::SHELLDLL_VERSION >= 5), events => [], max_events => 100, *************** *** 129,133 **** $mw->AddLabel( ! -text => "shell32.dll\t\t" . Win32::GetFileVersion("shell32"), -left => $col1_ctrl_left, -top => $row1_gb_top + (4 * $padding), --- 129,133 ---- $mw->AddLabel( ! -text => "shell32.dll\t\t" . Win32::GUI::GetDllVersion("shell32"), -left => $col1_ctrl_left, -top => $row1_gb_top + (4 * $padding), *************** *** 401,404 **** --- 401,405 ---- Win32::GUI::Dialog(); $mw->Hide(); + undef $mw; exit(0); *************** *** 574,586 **** } ! { ! my $text=''; ! for my $e (@{$cfg{events}}) { ! $text .= "$e\r\n"; ! } ! ! $win->ETF->SetSel(0,-1); ! $win->ETF->ReplaceSel($text); ! } return; --- 575,580 ---- } ! $win->ETF->SetSel(0,-1); ! $win->ETF->ReplaceSel(join("\r\n", @{$cfg{events}})); return; |
From: Robert M. <rob...@us...> - 2006-04-14 01:52:31
|
Update of /cvsroot/perl-win32-gui/Win32-GUI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28625 Modified Files: CHANGELOG GUI.h GUI.pm GUI.xs Log Message: Fix build/test on Perl 5.6.1 Index: GUI.xs =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/GUI.xs,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** GUI.xs 13 Apr 2006 22:17:07 -0000 1.54 --- GUI.xs 14 Apr 2006 01:52:25 -0000 1.55 *************** *** 5577,5580 **** --- 5577,5665 ---- RETVAL + + ########################################################################### + # (@)INTERNAL:GetDllVersion(DLLNAME) + # Replacement for Win32::GetFileVersion, which doesn't exist in perl 5.6 or + # cygwin perl 5.8 + # In scalar contect returns dotted string of dll version + # In list context returns major version, minor version, build + void + GetDllVersion(filename) + LPCTSTR filename + PREINIT: + HINSTANCE hinstDll; + DWORD major = -1; + DWORD minor = -1; + DWORD build = -1; + PPCODE: + hinstDll = LoadLibrary(filename); + + if(hinstDll) { + DLLGETVERSIONPROC pDllGetVersion; + pDllGetVersion = (DLLGETVERSIONPROC)GetProcAddress(hinstDll,"DllGetVersion"); + + if(pDllGetVersion) { + DLLVERSIONINFO dvi; + HRESULT hr; + + ZeroMemory(&dvi, sizeof(dvi)); + dvi.cbSize = sizeof(dvi); + + hr = (*pDllGetVersion)(&dvi); + + if(SUCCEEDED(hr)) { + major = dvi.dwMajorVersion; + minor = dvi.dwMinorVersion; + build = dvi.dwBuildNumber; + } + } + + FreeLibrary(hinstDll); + } + + if(major == -1) { + DWORD size; + DWORD handle; + char *data; + + size = GetFileVersionInfoSize(filename, &handle); + if(size) { + New(0, data, size, char); + if(data) { + if(GetFileVersionInfo(filename, handle, size, data)) { + VS_FIXEDFILEINFO *info; + UINT len; + if(VerQueryValue(data, "\\", (void**)&info, &len)) { + major = (info->dwFileVersionMS>>16); + minor = (info->dwFileVersionMS&0xffff); + build = (info->dwFileVersionLS>>16); + } + } + + Safefree(data); + } + } + } + + if(major == -1) { + XSRETURN_UNDEF; + } + + if (GIMME_V == G_ARRAY) { + EXTEND(SP, 3); + XST_mIV(0, major); + XST_mIV(1, minor); + XST_mIV(2, build); + items = 3; + } + else { + char version[50]; + sprintf(version, "%d.%d.%d", major, minor, build); + XST_mPV(0, version); + items = 1; + } + XSRETURN(items); + + ########################################################################### # (@)PACKAGE:Win32::GUI::Menu Index: GUI.h =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/GUI.h,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** GUI.h 16 Mar 2006 21:11:11 -0000 1.27 --- GUI.h 14 Apr 2006 01:52:25 -0000 1.28 *************** *** 18,21 **** --- 18,22 ---- #include <richedit.h> #include <shellapi.h> + #include <shlwapi.h> #include <shlobj.h> Index: GUI.pm =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/GUI.pm,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** GUI.pm 12 Apr 2006 20:00:05 -0000 1.40 --- GUI.pm 14 Apr 2006 01:52:25 -0000 1.41 *************** *** 469,472 **** --- 469,474 ---- } + bootstrap Win32::GUI; + ############################################################################### # PUBLIC METHODS *************** *** 2785,2793 **** # has been loaded. package Win32::GUI::NotifyIcon; ! use Win32(); ! our $SHELLDLL_VERSION; ! BEGIN { ! $SHELLDLL_VERSION = (Win32::GetFileVersion('shell32'))[0]; ! } ########################################################################### --- 2787,2791 ---- # has been loaded. package Win32::GUI::NotifyIcon; ! our $SHELLDLL_VERSION = (Win32::GUI::GetDllVersion('shell32'))[0]; ########################################################################### *************** *** 3559,3563 **** package Win32::GUI; ! bootstrap Win32::GUI; bootstrap_subpackage 'Animation'; --- 3557,3563 ---- package Win32::GUI; ! # Need to bootstrap Win32::GUI early, so that we can call ! # Win32::GUI::GetDllVersion during use/compile time ! #bootstrap Win32::GUI; bootstrap_subpackage 'Animation'; Index: CHANGELOG =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/CHANGELOG,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -d -r1.77 -r1.78 *** CHANGELOG 13 Apr 2006 22:17:07 -0000 1.77 --- CHANGELOG 14 Apr 2006 01:52:25 -0000 1.78 *************** *** 6,9 **** --- 6,21 ---- Win32-GUI ChangeLog =================== + + [Robert May] : 14 Apr 2006 - Fix build/test on Perl 5.6.1 + - GUI.h GUI.xs add GetDllVersion call to replace use of + Win32::GetFileVersion that is not available in perl 5.6 (or + cygwin perl 5.8) + - GUI.pm Change use of Win32::GetFileVersion to + Win32::GUI::GetDllVersion. Change position of bootstrap for + Win32::GUI so that we can call Win32::GUI::GetDllVersion + - t/05_NotifyIcon_01_Constructor.t add test to ensure that + $Win32::GUI::NotifyIcon::SHELLDLL_VERSION is set + - samples/NotifyIcon.pl Use new Win32::GUI::GetDllVersion and + a couple of minor bug-fixes under perl 5.6 + + [Robert May] : 13 Apr 2006 - Clean build under Cygwin - TYPEMAP corrected various entries to use INT2PTR and PTR2INT |
From: Robert M. <rob...@us...> - 2006-04-14 01:52:31
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28625/t Modified Files: 05_NotifyIcon_01_Constructor.t Log Message: Fix build/test on Perl 5.6.1 Index: 05_NotifyIcon_01_Constructor.t =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/t/05_NotifyIcon_01_Constructor.t,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 05_NotifyIcon_01_Constructor.t 11 Jan 2006 21:26:16 -0000 1.1 --- 05_NotifyIcon_01_Constructor.t 14 Apr 2006 01:52:29 -0000 1.2 *************** *** 10,18 **** BEGIN { $| = 1 } # Autoflush ! use Test::More tests => 15; use Win32::GUI(); use Win32::GUI::BitmapInline(); my $icon = geticon(); --- 10,21 ---- BEGIN { $| = 1 } # Autoflush ! use Test::More tests => 16; use Win32::GUI(); use Win32::GUI::BitmapInline(); + # Test that $Win32::GUI::NotifyIcon::SHELLDLL_VERSION is set + ok(defined $Win32::GUI::NotifyIcon::SHELLDLL_VERSION, "SHELLDLL is set"); + my $icon = geticon(); |
From: Robert M. <rob...@us...> - 2006-04-13 22:17:14
|
Update of /cvsroot/perl-win32-gui/Win32-GUI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1621 Modified Files: CHANGELOG DC.xs GUI.xs GUI_Helpers.cpp GUI_Options.cpp Makefile.PL TYPEMAP TreeView.xs Log Message: Clean build under Cygwin Index: GUI.xs =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/GUI.xs,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** GUI.xs 12 Apr 2006 19:49:21 -0000 1.53 --- GUI.xs 13 Apr 2006 22:17:07 -0000 1.54 *************** *** 478,482 **** if(strcmp(option, "-instance") == 0) { next_i = i + 1; ! hInstance = (HINSTANCE) SvIV(ST(next_i)); } if(strcmp(option, "-data") == 0) { --- 478,482 ---- if(strcmp(option, "-instance") == 0) { next_i = i + 1; ! hInstance = INT2PTR(HINSTANCE,SvIV(ST(next_i))); } if(strcmp(option, "-data") == 0) { *************** *** 705,709 **** t = hv_fetch_mg(NOTXSCALL perlcs.hvParent, "-tooltip", 8, 0); if(t != NULL && SvOK( *t )) { ! perlcs.hTooltip = (HWND) SvIV(*t); } } --- 705,709 ---- t = hv_fetch_mg(NOTXSCALL perlcs.hvParent, "-tooltip", 8, 0); if(t != NULL && SvOK( *t )) { ! perlcs.hTooltip = INT2PTR(HWND,SvIV(*t)); } } *************** *** 1434,1440 **** --- 1434,1443 ---- bitmap = (HBITMAP) LoadImage((HINSTANCE) moduleHandle, filename, iType, iX, iY, LR_DEFAULTCOLOR); // Try OEM ressource + /* Can't use filename (a string pointer) as a resource id - should be able to use + * a filename like '#1' to get resource from EXE - TODO: test this if(bitmap == NULL) { bitmap = (HBITMAP) LoadImage((HINSTANCE) NULL, MAKEINTRESOURCE(filename), iType, iX, iY, LR_DEFAULTCOLOR); } + */ if(bitmap == NULL) { // Ok, that failed. So attempt to load from file: *************** *** 3695,3699 **** RETVAL = -1; } else { ! hdc = (HDC) SvIV(*tmp); if(hmeta = GetEnhMetaFile(filename)) { GetClientRect(handle, &rect); --- 3698,3702 ---- RETVAL = -1; } else { ! hdc = INT2PTR(HDC,SvIV(*tmp)); if(hmeta = GetEnhMetaFile(filename)) { GetClientRect(handle, &rect); *************** *** 3779,3783 **** RETVAL = 0; } else { ! hdc = (HDC) SvIV(*tmp); iWidthMM = GetDeviceCaps(hdc, HORZSIZE); iHeightMM = GetDeviceCaps(hdc, VERTSIZE); --- 3782,3786 ---- RETVAL = 0; } else { ! hdc = INT2PTR(HDC,SvIV(*tmp)); iWidthMM = GetDeviceCaps(hdc, HORZSIZE); iHeightMM = GetDeviceCaps(hdc, VERTSIZE); *************** *** 3921,3925 **** RETVAL = -1; } else { ! hdc = (HDC) SvIV(*tmp); textlen = strlen(text); RETVAL = (long) TextOut(hdc, x, y, text, textlen); --- 3924,3928 ---- RETVAL = -1; } else { ! hdc = INT2PTR(HDC,SvIV(*tmp)); textlen = strlen(text); RETVAL = (long) TextOut(hdc, x, y, text, textlen); *************** *** 3942,3946 **** RETVAL = -1; } else { ! hdc = (HDC) SvIV(*tmp); RETVAL = SetTextColor(hdc, color); } --- 3945,3949 ---- RETVAL = -1; } else { ! hdc = INT2PTR(HDC,SvIV(*tmp)); RETVAL = SetTextColor(hdc, color); } *************** *** 3961,3965 **** RETVAL = -1; } else { ! hdc = (HDC) SvIV(*tmp); RETVAL = GetTextColor(hdc); } --- 3964,3968 ---- RETVAL = -1; } else { ! hdc = INT2PTR(HDC,SvIV(*tmp)); RETVAL = GetTextColor(hdc); } *************** *** 3981,3985 **** RETVAL = -1; } else { ! hdc = (HDC) SvIV(*tmp); RETVAL = (long) SetBkMode(hdc, mode); } --- 3984,3988 ---- RETVAL = -1; } else { ! hdc = INT2PTR(HDC,SvIV(*tmp)); RETVAL = (long) SetBkMode(hdc, mode); } *************** *** 4000,4004 **** RETVAL = -1; } else { ! hdc = (HDC) SvIV(*tmp); RETVAL = GetBkMode(hdc); } --- 4003,4007 ---- RETVAL = -1; } else { ! hdc = INT2PTR(HDC,SvIV(*tmp)); RETVAL = GetBkMode(hdc); } *************** *** 4021,4025 **** RETVAL = -1; } else { ! hdc = (HDC) SvIV(*tmp); RETVAL = MoveToEx(hdc, x, y, NULL); } --- 4024,4028 ---- RETVAL = -1; } else { ! hdc = INT2PTR(HDC,SvIV(*tmp)); RETVAL = MoveToEx(hdc, x, y, NULL); } *************** *** 4044,4048 **** RETVAL = -1; } else { ! hdc = (HDC) SvIV(*tmp); if(height == -1) { width *= 2; --- 4047,4051 ---- RETVAL = -1; } else { ! hdc = INT2PTR(HDC,SvIV(*tmp)); if(height == -1) { width *= 2; *************** *** 4070,4074 **** RETVAL = -1; } else { ! hdc = (HDC) SvIV(*tmp); RETVAL = LineTo(hdc, x, y); } --- 4073,4077 ---- RETVAL = -1; } else { ! hdc = INT2PTR(HDC,SvIV(*tmp)); RETVAL = LineTo(hdc, x, y); } *************** *** 4108,4112 **** char tmprgb[16]; self = (HV*) SvRV(ST(0)); ! hwnd = (HWND) SvIV(*hv_fetch(self, "-handle", 7, 0)); if(hwnd) { if(hdc = BeginPaint(hwnd, &ps)) { --- 4111,4115 ---- char tmprgb[16]; self = (HV*) SvRV(ST(0)); ! hwnd = INT2PTR(HWND,SvIV(*hv_fetch(self, "-handle", 7, 0))); if(hwnd) { if(hdc = BeginPaint(hwnd, &ps)) { *************** *** 4147,4154 **** tmp = hv_fetch(self, "-handle", 7, 0); if(tmp == NULL) XSRETURN_NO; ! hwnd = (HWND) SvIV(*tmp); tmp = hv_fetch(self, "-ps.hdc", 7, 0); if(tmp == NULL) XSRETURN_NO; ! ps.hdc = (HDC) SvIV(*tmp); tmp = hv_fetch(self, "-ps.fErase", 10, 0); if(tmp == NULL) XSRETURN_NO; --- 4150,4157 ---- tmp = hv_fetch(self, "-handle", 7, 0); if(tmp == NULL) XSRETURN_NO; ! hwnd = INT2PTR(HWND,SvIV(*tmp)); tmp = hv_fetch(self, "-ps.hdc", 7, 0); if(tmp == NULL) XSRETURN_NO; ! ps.hdc = INT2PTR(HDC,SvIV(*tmp)); tmp = hv_fetch(self, "-ps.fErase", 10, 0); if(tmp == NULL) XSRETURN_NO; *************** *** 5083,5087 **** next_i = i + 1; if(SvIOK(ST(next_i))) { ! bi.pidlRoot = (LPCITEMIDLIST) SvIV(ST(next_i)); } else { SHGetDesktopFolder(&pDesktopFolder); --- 5086,5090 ---- next_i = i + 1; if(SvIOK(ST(next_i))) { ! bi.pidlRoot = INT2PTR(LPCITEMIDLIST,SvIV(ST(next_i))); } else { SHGetDesktopFolder(&pDesktopFolder); *************** *** 5682,5686 **** parentmenu = hv_fetch((HV*)SvRV((ST(0))), "-menu", 5, 0); if(parentmenu != NULL) { ! hMenu = (HMENU) SvIV(*parentmenu); myItem = SvIV(*(hv_fetch((HV*)SvRV(ST(0)), "-id", 3, 0))); } else { --- 5685,5689 ---- parentmenu = hv_fetch((HV*)SvRV((ST(0))), "-menu", 5, 0); if(parentmenu != NULL) { ! hMenu = INT2PTR(HMENU,SvIV(*parentmenu)); myItem = SvIV(*(hv_fetch((HV*)SvRV(ST(0)), "-id", 3, 0))); } else { *************** *** 5724,5728 **** parentmenu = hv_fetch((HV*)SvRV((ST(0))), "-menu", 5, 0); if(parentmenu != NULL) { ! hMenu = (HMENU) SvIV(*parentmenu); myItem = SvIV(*(hv_fetch((HV*)SvRV(ST(0)), "-id", 3, 0))); i = 1; --- 5727,5731 ---- parentmenu = hv_fetch((HV*)SvRV((ST(0))), "-menu", 5, 0); if(parentmenu != NULL) { ! hMenu = INT2PTR(HMENU,SvIV(*parentmenu)); myItem = SvIV(*(hv_fetch((HV*)SvRV(ST(0)), "-id", 3, 0))); i = 1; *************** *** 5771,5775 **** parentmenu = hv_fetch((HV*)SvRV((ST(0))), "-menu", 5, 0); if(parentmenu != NULL) { ! hMenu = (HMENU) SvIV(*parentmenu); myItem = SvIV(*(hv_fetch((HV*)SvRV(ST(0)), "-id", 3, 0))); i = 1; --- 5774,5778 ---- parentmenu = hv_fetch((HV*)SvRV((ST(0))), "-menu", 5, 0); if(parentmenu != NULL) { ! hMenu = INT2PTR(HMENU,SvIV(*parentmenu)); myItem = SvIV(*(hv_fetch((HV*)SvRV(ST(0)), "-id", 3, 0))); i = 1; Index: Makefile.PL =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Makefile.PL,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Makefile.PL 12 Apr 2006 20:00:06 -0000 1.18 --- Makefile.PL 13 Apr 2006 22:17:07 -0000 1.19 *************** *** 375,378 **** --- 375,382 ---- $(NOECHO) $(PERL) -I$(BUILD_TOOLS) $(BUILD_TOOLS)/doHTMLDocs.pl + demos: + $(MKPATH) $(INST_DEMO) + -$(CP) samples/* $(INST_DEMO) + all:: poddocs demos *************** *** 387,394 **** # -- Win32::GUI ppm section -- - demos: - $(MKPATH) $(INST_DEMO) - $(CP) samples/* $(INST_DEMO) - ppmdist: all htmldocs $(TAR) --exclude="*.pod" -$(TARFLAGS) $(DISTNAME).tar blib --- 391,394 ---- Index: CHANGELOG =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/CHANGELOG,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -d -r1.76 -r1.77 *** CHANGELOG 12 Apr 2006 20:00:05 -0000 1.76 --- CHANGELOG 13 Apr 2006 22:17:07 -0000 1.77 *************** *** 6,9 **** --- 6,19 ---- Win32-GUI ChangeLog =================== + + [Robert May] : 13 Apr 2006 - Clean build under Cygwin + - TYPEMAP corrected various entries to use INT2PTR and PTR2INT + macros to eliminate warnings of casting to/from pointers with + different sizes. + - DC.xs, GUI.xs, GUI_Helpers.cpp, GUI_Options.cpp, TreeView.xs + used INT2PTR and PTR2INT wherever necessary to silence + compiler warnings. + - Makefile.PL corrected location of demos target, so that demos + are installed under cygwin + + [Robert May] : 12 Apr 2006 - Start of DropFiles integration - GUI.pm Add Acceptfiles method and documentation. Index: GUI_Helpers.cpp =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/GUI_Helpers.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** GUI_Helpers.cpp 16 Mar 2006 21:11:11 -0000 1.17 --- GUI_Helpers.cpp 13 Apr 2006 22:17:07 -0000 1.18 *************** *** 166,173 **** pHv = hv_fetch_mg(NOTXSCALL (HV*) SvRV(pSv), "-handle", 7, 0); if(pHv != NULL) { ! hReturn = (HWND) SvIV(*pHv); } } else { ! hReturn = (HWND) SvIV(pSv); } } --- 166,173 ---- pHv = hv_fetch_mg(NOTXSCALL (HV*) SvRV(pSv), "-handle", 7, 0); if(pHv != NULL) { ! hReturn = INT2PTR(HWND,SvIV(*pHv)); } } else { ! hReturn = INT2PTR(HWND,SvIV(pSv)); } } *************** *** 210,214 **** wndproc = hv_fetch_mg(NOTXSCALL hash, (char*) Name, strlen(Name), FALSE); if(wndproc == NULL) return NULL; ! return (WNDPROC) SvIV(*wndproc); } --- 210,214 ---- wndproc = hv_fetch_mg(NOTXSCALL hash, (char*) Name, strlen(Name), FALSE); if(wndproc == NULL) return NULL; ! return INT2PTR(WNDPROC,SvIV(*wndproc)); } *************** *** 294,298 **** t = hv_fetch_mg(NOTXSCALL parent, "-handle", 7, 0); if(t != NULL) { ! hParent = (HWND) SvIV(*t); } else { return NULL; --- 294,298 ---- t = hv_fetch_mg(NOTXSCALL parent, "-handle", 7, 0); if(t != NULL) { ! hParent = INT2PTR(HWND,SvIV(*t)); } else { return NULL; *************** *** 431,435 **** handle = hv_fetch(hash, temp, strlen(temp), FALSE); if(handle == NULL) return NULL; ! return (HMENU) SvIV(*handle); } --- 431,435 ---- handle = hv_fetch(hash, temp, strlen(temp), FALSE); if(handle == NULL) return NULL; ! return INT2PTR(HMENU,SvIV(*handle)); } Index: TreeView.xs =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/TreeView.xs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** TreeView.xs 16 Mar 2006 21:11:12 -0000 1.7 --- TreeView.xs 13 Apr 2006 22:17:07 -0000 1.8 *************** *** 1101,1105 **** else RETVAL = TreeView_Expand(handle, ! (HTREEITEM) SvIV(ST(1)), TVE_COLLAPSE | TVE_COLLAPSERESET); OUTPUT: --- 1101,1105 ---- else RETVAL = TreeView_Expand(handle, ! INT2PTR(HTREEITEM,SvIV(ST(1))), TVE_COLLAPSE | TVE_COLLAPSERESET); OUTPUT: Index: GUI_Options.cpp =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/GUI_Options.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** GUI_Options.cpp 12 Apr 2006 20:00:06 -0000 1.13 --- GUI_Options.cpp 13 Apr 2006 22:17:07 -0000 1.14 *************** *** 181,185 **** } else if(strcmp(option, "-instance") == 0) { next_i = i + 1; ! perlcs->cs.hInstance = (HINSTANCE) SvIV(ST(next_i)); } else if(strcmp(option, "-name") == 0) { next_i = i + 1; --- 181,185 ---- } else if(strcmp(option, "-instance") == 0) { next_i = i + 1; ! perlcs->cs.hInstance = INT2PTR(HINSTANCE,SvIV(ST(next_i))); } else if(strcmp(option, "-name") == 0) { next_i = i + 1; *************** *** 760,764 **** } else if(strcmp(option, "-hinst") == 0) { next_i = i + 1; ! ti->hinst = (HINSTANCE) SvIV(ST(next_i)); } else if(strcmp(option, "-flags") == 0) { next_i = i + 1; --- 760,764 ---- } else if(strcmp(option, "-hinst") == 0) { next_i = i + 1; ! ti->hinst = INT2PTR(HINSTANCE,SvIV(ST(next_i))); } else if(strcmp(option, "-flags") == 0) { next_i = i + 1; Index: TYPEMAP =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/TYPEMAP,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** TYPEMAP 16 Mar 2006 21:11:12 -0000 1.7 --- TYPEMAP 13 Apr 2006 22:17:07 -0000 1.8 *************** *** 13,17 **** HPEN T_HANDLE HRGN T_HANDLE ! HTREEITEM T_IV LONG T_IV LPCTSTR T_PV --- 13,17 ---- HPEN T_HANDLE HRGN T_HANDLE ! HTREEITEM T_PTR LONG T_IV LPCTSTR T_PV *************** *** 23,33 **** LPARAM T_LPARAM LRESULT T_IV ! HINSTANCE T_IV COLORREF T_COLOR LPCSTR T_PV ! HENHMETAFILE T_IV FLOAT T_FLOAT LPVOID T_PV ! HACCEL T_IV ################################################################################ --- 23,33 ---- LPARAM T_LPARAM LRESULT T_IV ! HINSTANCE T_PTR COLORREF T_COLOR LPCSTR T_PV ! HENHMETAFILE T_PTR FLOAT T_FLOAT LPVOID T_PV ! HACCEL T_PTR ################################################################################ *************** *** 37,45 **** SV** out=hv_fetch((HV*)SvRV($arg), \"-handle\", 7, 0); if(out != NULL) ! $var = ($type) SvIV(*out); else $var = NULL; } else ! $var = ($type) SvIV($arg); T_COLOR --- 37,45 ---- SV** out=hv_fetch((HV*)SvRV($arg), \"-handle\", 7, 0); if(out != NULL) ! $var = INT2PTR($type,SvIV(*out)); else $var = NULL; } else ! $var = INT2PTR($type,SvIV($arg)); T_COLOR *************** *** 53,57 **** OUTPUT T_HANDLE ! sv_setiv($arg, (IV) $var); T_COLOR sv_setiv($arg, (IV) $var); --- 53,57 ---- OUTPUT T_HANDLE ! sv_setiv($arg, PTR2IV($var)); T_COLOR sv_setiv($arg, (IV) $var); Index: DC.xs =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/DC.xs,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** DC.xs 25 Aug 2005 19:30:17 -0000 1.12 --- DC.xs 13 Apr 2006 22:17:07 -0000 1.13 *************** *** 949,953 **** window = hv_fetch_mg(NOTXSCALL self, "-window", 7, 0); if(window != NULL) { ! hwnd = (HWND) SvIV(*window); } else { XSRETURN_UNDEF; --- 949,953 ---- window = hv_fetch_mg(NOTXSCALL self, "-window", 7, 0); if(window != NULL) { ! hwnd = INT2PTR(HWND,SvIV(*window)); } else { XSRETURN_UNDEF; *************** *** 1003,1007 **** window = hv_fetch_mg(NOTXSCALL self, szKey, strlen(szKey), 0); if(window != NULL) { ! hwnd = (HWND) SvIV(*window); } else { XSRETURN_NO; --- 1003,1007 ---- window = hv_fetch_mg(NOTXSCALL self, szKey, strlen(szKey), 0); if(window != NULL) { ! hwnd = INT2PTR(HWND,SvIV(*window)); } else { XSRETURN_NO; |
From: Robert M. <rob...@us...> - 2006-04-12 20:00:22
|
Update of /cvsroot/perl-win32-gui/Win32-GUI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22924 Modified Files: CHANGELOG GUI.pm GUI_Events.cpp GUI_MessageLoops.cpp GUI_Options.cpp Makefile.PL Log Message: Start of DropFiles Integration Index: Makefile.PL =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Makefile.PL,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Makefile.PL 16 Mar 2006 21:11:12 -0000 1.17 --- Makefile.PL 12 Apr 2006 20:00:06 -0000 1.18 *************** *** 6,9 **** --- 6,10 ---- use Config; + our $W32G_CORE = 1; $main::USERESOURCE = 1; $main::BUILDENV = ''; *************** *** 256,259 **** --- 257,265 ---- use warnings; + sub pasthru { + my $inherited = shift->SUPER::pasthru(@_); + return "$inherited W32G_CORE=1"; + } + sub xs_c { my $inherited = shift->SUPER::xs_c(@_); Index: GUI.pm =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/GUI.pm,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** GUI.pm 16 Mar 2006 21:11:11 -0000 1.39 --- GUI.pm 12 Apr 2006 20:00:05 -0000 1.40 *************** *** 610,613 **** --- 610,632 ---- } + ########################################################################### + # (@)METHOD:AcceptFiles([FLAG]) + # Gets/sets the L<Win32::GUI::Reference::Options\-acceptfiles|-acceptfiles> + # options on a window. If C<FLAG> is not provided, returns the current + # state. If FLAG is provided it sets or unsets the state, returning the + # previous state. + sub AcceptFiles { + my $win = shift; + my $accept = shift; + + my $old_accept = $win->GetWindowLong(GWL_EXSTYLE) & WS_EX_ACCEPTFILES() ? 1 : 0; + + if(defined $accept) { + $win->Change(-acceptfiles => $accept); + } + + return $old_accept; + } + ############################################################################### # SUB-PACKAGES Index: CHANGELOG =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/CHANGELOG,v retrieving revision 1.75 retrieving revision 1.76 diff -C2 -d -r1.75 -r1.76 *** CHANGELOG 12 Apr 2006 19:49:21 -0000 1.75 --- CHANGELOG 12 Apr 2006 20:00:05 -0000 1.76 *************** *** 6,9 **** --- 6,20 ---- Win32-GUI ChangeLog =================== + + [Robert May] : 12 Apr 2006 - Start of DropFiles integration + - GUI.pm Add Acceptfiles method and documentation. + - GUI_Events.cpp Fix OEM callback to allow passing SV. + - GUI_MessageLoops.cpp modify WM_DROPFILES handling to pass + a Win32::GUI::DropFiles object, and update event documentation. + - GUI_Options.cpp Add -acceptfiles option for windows + - Makefile.PL set up W32G_CORE variable so that sub directories + can know if they arebeing called from a higher level Makefile, + and so that tests know how they are being run. + - docs/GUI/Reference/Options.pod added -acceptfiles documentation + + [Robert May] : 12 Apr 2006 - Fix GetKeyState - GUI.xs Changed stack macros in GetKeyStae to those that exist Index: GUI_Options.cpp =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/GUI_Options.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** GUI_Options.cpp 16 Mar 2006 21:11:11 -0000 1.12 --- GUI_Options.cpp 12 Apr 2006 20:00:06 -0000 1.13 *************** *** 313,316 **** --- 313,317 ---- } else BitmaskOption("-hscroll", perlcs->cs.style, WS_HSCROLL) } else BitmaskOption("-vscroll", perlcs->cs.style, WS_VSCROLL) + } else BitmaskOption("-acceptfiles", perlcs->cs.dwExStyle, WS_EX_ACCEPTFILES) } else BitmaskOption("-container", perlcs->dwPlStyle, PERLWIN32GUI_CONTAINER) } Index: GUI_Events.cpp =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/GUI_Events.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** GUI_Events.cpp 16 Mar 2006 21:11:11 -0000 1.12 --- GUI_Events.cpp 12 Apr 2006 20:00:06 -0000 1.13 *************** *** 142,145 **** --- 142,148 ---- XPUSHs(sv_2mortal(newSVpv(va_arg( args, char * ), 0))); break; + case PERLWIN32GUI_ARGTYPE_SV: + XPUSHs(va_arg( args, SV *)); + break; default: warn("Win32::GUI: WARNING! unknown argument type (%d) to event '%s'", argtype, Name); Index: GUI_MessageLoops.cpp =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/GUI_MessageLoops.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** GUI_MessageLoops.cpp 16 Mar 2006 21:11:11 -0000 1.19 --- GUI_MessageLoops.cpp 12 Apr 2006 20:00:06 -0000 1.20 *************** *** 627,637 **** case WM_DROPFILES: /* ! * (@)EVENT:DropFiles(DROP_HANDLE) ! * Sent when the window receives dropped files. * (@)APPLIES_TO:* */ ! PerlResult = DoEvent(NOTXSCALL perlud, PERLWIN32GUI_NEM_DROPFILE, "DropFiles", ! PERLWIN32GUI_ARGTYPE_LONG, (LONG) wParam, -1); break; } --- 627,653 ---- case WM_DROPFILES: /* ! * (@)EVENT:DropFiles(DROP) ! * Sent when the window receives dropped files. To enable a window to ! * be a target for files dragged from a shell window, you must set the ! * window's L<-acceptfiles|Win32::GUI::Reference::Options\-acceptfiles> ! * option or call C<< $win->AcceptFiles(1) >> on the window (See ! * L<Win32::GUI::AcceptFiles|AccepFiles()>). The DROP parameter is either ! * a Win32 drop handle (see MSDN) or a ! * L<Win32::GUI::DropFiles|Win32::GUI::DropFiles> object if you have done ! * C<use Win32::GUI::DropFiles;> somewhere in your code. * (@)APPLIES_TO:* */ ! { HV *dropfiles_stash = gv_stashpv("Win32::GUI::DropFiles", 0); ! if(dropfiles_stash) { /* Win32::GUI::DropFiles is available */ ! PerlResult = DoEvent(NOTXSCALL perlud, PERLWIN32GUI_NEM_DROPFILE, "DropFiles", ! PERLWIN32GUI_ARGTYPE_SV, CreateObjectWithHandle(NOTXSCALL "Win32::GUI::DropFiles", (HWND)wParam), -1); + } else { /* Win32::GUI::DropFiles is not available */ + PerlResult = DoEvent(NOTXSCALL perlud, PERLWIN32GUI_NEM_DROPFILE, "DropFiles", + PERLWIN32GUI_ARGTYPE_LONG, wParam, + -1); + DragFinish((HDROP)wParam); + } + } break; } *************** *** 966,972 **** break; case WM_DROPFILES: ! PerlResult = DoEvent(NOTXSCALL perlud, PERLWIN32GUI_NEM_DROPFILE, "DropFiles", ! PERLWIN32GUI_ARGTYPE_LONG, (LONG) wParam, -1); } --- 982,997 ---- break; case WM_DROPFILES: ! { HV *dropfiles_stash = gv_stashpv("Win32::GUI::DropFiles", 0); ! if(dropfiles_stash) { /* Win32::GUI::DropFiles is available */ ! PerlResult = DoEvent(NOTXSCALL perlud, PERLWIN32GUI_NEM_DROPFILE, "DropFiles", ! PERLWIN32GUI_ARGTYPE_SV, CreateObjectWithHandle(NOTXSCALL "Win32::GUI::DropFiles", (HWND)wParam), -1); + } else { /* Win32::GUI::DropFiles is not available */ + PerlResult = DoEvent(NOTXSCALL perlud, PERLWIN32GUI_NEM_DROPFILE, "DropFiles", + PERLWIN32GUI_ARGTYPE_LONG, wParam, + -1); + DragFinish((HDROP)wParam); + } + } } |
From: Robert M. <rob...@us...> - 2006-04-12 20:00:16
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/docs/GUI/Reference In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22924/docs/GUI/Reference Modified Files: Options.pod Log Message: Start of DropFiles Integration Index: Options.pod =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/docs/GUI/Reference/Options.pod,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Options.pod 3 Aug 2005 21:45:59 -0000 1.2 --- Options.pod 12 Apr 2006 20:00:06 -0000 1.3 *************** *** 20,23 **** --- 20,34 ---- =head1 OPTIONS + =head2 -acceptfiles + + =over + + =item B<-acceptfiles> => 0/1 + + =back + + Allow the window or control to act as a drop target for files + dragged from the shell. + =head2 -addexstyle |
From: Robert M. <rob...@us...> - 2006-04-12 19:49:28
|
Update of /cvsroot/perl-win32-gui/Win32-GUI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14839 Modified Files: CHANGELOG GUI.xs Log Message: Fix GetKeyState for Perl 5.6 compatability Index: GUI.xs =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/GUI.xs,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** GUI.xs 16 Mar 2006 23:14:31 -0000 1.52 --- GUI.xs 12 Apr 2006 19:49:21 -0000 1.53 *************** *** 79,91 **** result = (USHORT)GetKeyState(key); if(GIMME_V == G_ARRAY) { ! /* list context */ ! mXPUSHu((result & 0x8000) >> 15); ! mXPUSHu(result & 0x0001); ! XSRETURN(2); } else { ! /* scalar(and void) context */ ! mXPUSHu((result & 0x8000) >> 15); ! XSRETURN(1); } --- 79,91 ---- result = (USHORT)GetKeyState(key); if(GIMME_V == G_ARRAY) { ! /* list context */ ! EXTEND(SP, 2); ! XST_mIV(0, (UV) ((result & 0x8000) >> 15)); ! XST_mIV(1, (UV) (result & 0x0001)); ! XSRETURN(2); } else { ! /* scalar(and void) context */ ! XSRETURN_IV((UV) ((result & 0x8000) >> 15)); } Index: CHANGELOG =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/CHANGELOG,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -d -r1.74 -r1.75 *** CHANGELOG 16 Mar 2006 23:14:31 -0000 1.74 --- CHANGELOG 12 Apr 2006 19:49:21 -0000 1.75 *************** *** 6,9 **** --- 6,13 ---- Win32-GUI ChangeLog =================== + + [Robert May] : 12 Apr 2006 - Fix GetKeyState + - GUI.xs Changed stack macros in GetKeyStae to those that exist + in Perl 5.6 + + [Robert May] : 16 Mar 2006 - Changes from Reini Urban - GUI.xs Add more options to DoEvents(). Add SetWindowPos(). |
From: Robert M. <rob...@us...> - 2006-03-16 23:14:35
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27009/docs Modified Files: Documentation.txt Log Message: Enhancements from Reini Urban - Part 1 Index: Documentation.txt =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/docs/Documentation.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Documentation.txt 16 Mar 2006 21:11:12 -0000 1.3 --- Documentation.txt 16 Mar 2006 23:14:32 -0000 1.4 *************** *** 98,102 **** * Packages Introduced by a line containing the text: ! (@)PACJAGE: Win32::GUI::PackageName The first comment line, immediately following such a declaration is taken --- 98,102 ---- * Packages Introduced by a line containing the text: ! (@)PACKAGE: Win32::GUI::PackageName The first comment line, immediately following such a declaration is taken *************** *** 147,151 **** If you wish to provide a link to a page from within the text, please use the form: ! L<descrption|Win32::GUI::PackageName> even if this means that your link looks like: L<Win32::GUI::PackageName|Win32::GUI::PackageName> --- 147,151 ---- If you wish to provide a link to a page from within the text, please use the form: ! L<description|Win32::GUI::PackageName> even if this means that your link looks like: L<Win32::GUI::PackageName|Win32::GUI::PackageName> |
From: Robert M. <rob...@us...> - 2006-03-16 23:14:35
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/build_tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27009/build_tools Modified Files: SrcParser.pm Log Message: Enhancements from Reini Urban - Part 1 Index: SrcParser.pm =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/build_tools/SrcParser.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SrcParser.pm 16 Mar 2006 21:11:12 -0000 1.4 --- SrcParser.pm 16 Mar 2006 23:14:31 -0000 1.5 *************** *** 163,167 **** $pack = "Win32::GUI::" . $pack unless $pack eq '*'; ! # The same evnet has multiple legitimate definitions in different packages # for the same package: # for example, Terminate() is described in both Window.xs and MDI.xs, --- 163,167 ---- $pack = "Win32::GUI::" . $pack unless $pack eq '*'; ! # The same event has multiple legitimate definitions in different packages # for the same package: # for example, Terminate() is described in both Window.xs and MDI.xs, |
From: Robert M. <rob...@us...> - 2006-03-16 23:14:35
|
Update of /cvsroot/perl-win32-gui/Win32-GUI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27009 Modified Files: CHANGELOG GUI.xs ImageList.xs ListView.xs Log Message: Enhancements from Reini Urban - Part 1 Index: ImageList.xs =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/ImageList.xs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ImageList.xs 16 Mar 2006 21:11:11 -0000 1.9 --- ImageList.xs 16 Mar 2006 23:14:31 -0000 1.10 *************** *** 480,483 **** --- 480,484 ---- # if no parameter is given, returns a 2 element array (X, Y), # otherwise sets the size to the given parameters. + # If X and Y is given, also removes all images from the list. void Size(handle,...) Index: GUI.xs =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/GUI.xs,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** GUI.xs 16 Mar 2006 21:31:42 -0000 1.51 --- GUI.xs 16 Mar 2006 23:14:31 -0000 1.52 *************** *** 1001,1005 **** ########################################################################### ! # (@)METHOD:DoEvents() # Performs all pending GUI events and returns the status. If DoEvents() # returns -1, your GUI has normally terminated. --- 1001,1005 ---- ########################################################################### ! # (@)METHOD:DoEvents(hwnd=NULL,wMsgFilterMin=0,wMsgFilterMax=0,wRemoveMsg=PM_REMOVE) # Performs all pending GUI events and returns the status. If DoEvents() # returns -1, your GUI has normally terminated. *************** *** 1011,1016 **** # see also Dialog() DWORD ! DoEvents(hwnd=NULL) HWND hwnd PREINIT: MSG msg; --- 1011,1019 ---- # see also Dialog() DWORD ! DoEvents(hwnd=NULL,wMsgFilterMin=0,wMsgFilterMax=0,wRemoveMsg=PM_REMOVE) HWND hwnd + UINT wMsgFilterMin + UINT wMsgFilterMax + UINT wRemoveMsg PREINIT: MSG msg; *************** *** 1026,1030 **** fIsDialog = FALSE; while(stayhere) { ! stayhere = PeekMessage(&msg, hwnd, 0, 0, PM_REMOVE); #ifdef PERLWIN32GUI_STRONGDEBUG printf("XS(DoEvents): PeekMessage returned %d\n", stayhere); --- 1029,1033 ---- fIsDialog = FALSE; while(stayhere) { ! stayhere = PeekMessage(&msg, hwnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg); #ifdef PERLWIN32GUI_STRONGDEBUG printf("XS(DoEvents): PeekMessage returned %d\n", stayhere); *************** *** 1430,1433 **** --- 1433,1440 ---- // Attempt to load from current EXE: bitmap = (HBITMAP) LoadImage((HINSTANCE) moduleHandle, filename, iType, iX, iY, LR_DEFAULTCOLOR); + // Try OEM ressource + if(bitmap == NULL) { + bitmap = (HBITMAP) LoadImage((HINSTANCE) NULL, MAKEINTRESOURCE(filename), iType, iX, iY, LR_DEFAULTCOLOR); + } if(bitmap == NULL) { // Ok, that failed. So attempt to load from file: *************** *** 1749,1752 **** --- 1756,1802 ---- ########################################################################### + # (@)METHOD:SetWindowPos(INSERTAFTER,X,Y,cx,cy,FLAGS) + # The SetWindowPos function changes the size, position, + # and Z order of a child, pop-up, or top-level + # window. Child, pop-up, and top-level windows are + # ordered according to their appearance on the + # screen. The topmost window receives the highest rank + # and is the first window in the Z order. + # + # INSERTAFTER - window to precede the positioned window + # in the Z order. This parameter must be a window object, + # a window handle or one of the following integer values. + # HWND_BOTTOM + # Places the window at the bottom of the Z order. If + # the WINDOW parameter identifies a topmost window, + # the window loses its topmost status and is placed + # at the bottom of all other windows. + # HWND_NOTOPMOST + # Places the window above all non-topmost windows + # (that is, behind all topmost windows). This flag + # has no effect if the window is already a + # non-topmost window. + # HWND_TOP + # Places the window at the top of the Z order. + # HWND_TOPMOST + # Places the window above all non-topmost + # windows. The window maintains its topmost position + # even when it is deactivated. + BOOL + SetWindowPos(handle,insertafter,X,Y,cx,cy,flags) + HWND handle + HWND insertafter + int X + int Y + int cx + int cy + int flags + CODE: + RETVAL = SetWindowPos(handle, insertafter, X, Y, cx, cy, flags); + OUTPUT: + RETVAL + + + ########################################################################### # (@)METHOD:GetWindow(COMMAND) # Returns handle of the window that has the specified Index: CHANGELOG =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/CHANGELOG,v retrieving revision 1.73 retrieving revision 1.74 diff -C2 -d -r1.73 -r1.74 *** CHANGELOG 16 Mar 2006 21:31:42 -0000 1.73 --- CHANGELOG 16 Mar 2006 23:14:31 -0000 1.74 *************** *** 6,9 **** --- 6,15 ---- Win32-GUI ChangeLog =================== + + [Robert May] : 16 Mar 2006 - Changes from Reini Urban + - GUI.xs Add more options to DoEvents(). Add SetWindowPos(). + - GUI.xs enhance LoadImage to try OEM resources + - ImageList.xs additional documentation + - other documentation typos + + [Robert May] : 16 Mar 2006 - bug fix and addition of GetKeyState - Added Win32::GUI::GetKeyState Index: ListView.xs =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/ListView.xs,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ListView.xs 16 Mar 2006 21:11:11 -0000 1.12 --- ListView.xs 16 Mar 2006 23:14:31 -0000 1.13 *************** *** 866,870 **** ########################################################################### # (@)METHOD:GetNextItem(index,[mask=LVNI_ALL]) ! # Searches for a list view item that has the specified properties and bears the specified relationship to a specified item. UINT GetNextItem(handle,index,mask=LVNI_ALL) --- 866,871 ---- ########################################################################### # (@)METHOD:GetNextItem(index,[mask=LVNI_ALL]) ! # Searches for a list view item that has the specified properties and bears ! # the specified relationship to a specified item. UINT GetNextItem(handle,index,mask=LVNI_ALL) *************** *** 938,942 **** ########################################################################### # (@)METHOD:GetStringWidth(STRING) ! # Determines the width of a specified string using the specified ListView's current font. int GetStringWidth(handle,string) --- 939,944 ---- ########################################################################### # (@)METHOD:GetStringWidth(STRING) ! # Determines the width of a specified string using the specified ListView's ! # current font. int GetStringWidth(handle,string) |
From: Robert M. <rob...@us...> - 2006-03-16 23:14:35
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27009/t Modified Files: 04_cov.t Log Message: Enhancements from Reini Urban - Part 1 Index: 04_cov.t =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/t/04_cov.t,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 04_cov.t 3 Aug 2005 21:46:00 -0000 1.1 --- 04_cov.t 16 Mar 2006 23:14:32 -0000 1.2 *************** *** 20,24 **** Groupbox Header Label ListView Listbox ! Menu MonthCal NotifyIcon ProgressBar RadioButton Rebar RichEdit Slider Splitter StatusBar --- 20,24 ---- Groupbox Header Label ListView Listbox ! Menu MonthCal ProgressBar RadioButton Rebar RichEdit Slider Splitter StatusBar |
From: Robert M. <rob...@us...> - 2006-03-16 21:31:46
|
Update of /cvsroot/perl-win32-gui/Win32-GUI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8883 Modified Files: CHANGELOG GUI.xs Listbox.xs Log Message: bug fix and addition of GetKeyState Index: GUI.xs =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/GUI.xs,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** GUI.xs 16 Mar 2006 21:11:11 -0000 1.50 --- GUI.xs 16 Mar 2006 21:31:42 -0000 1.51 *************** *** 42,46 **** ########################################################################## ! # (@)METHOD:GetAsyncKeyState(key) # Retrieve the status of the specified virtual key at the time the function # is called. The status specifies whether the key is up or down. --- 42,46 ---- ########################################################################## ! # (@)METHOD:GetAsyncKeyState(keyCode) # Retrieve the status of the specified virtual key at the time the function # is called. The status specifies whether the key is up or down. *************** *** 54,62 **** int key CODE: ! RETVAL = (GetAsyncKeyState(key) & 0x8000) >>16; OUTPUT: RETVAL ########################################################################## # (@)METHOD:GetKeyboardState() # Return array ref with the status of the 256 virtual keys. --- 54,94 ---- int key CODE: ! RETVAL = (GetAsyncKeyState(key) & 0x8000) >>15; OUTPUT: RETVAL ########################################################################## + # (@)METHOD:GetKeyState(keyCode) + # Retrieve the status of the specified virtual key at the time the last + # keyboard message was retrieved from the message queue. + # + # In scalar context returns a value specifying whether the key is up(0) + # or down(1). In list context, returns a 2 element list with the first + # element as in scalar context and the second member specifying whether + # the key is toggled(1) or not(0) - this is only meaningful for keys that + # have a toggled state: Caps Lock, Num Lock etc. + # + # keyCode -- If A..Z0..9, use the ASCII code. Otherwise, use + # a virtual key code. Example: VK_SHIFT + void + GetKeyState(key) + int key + PREINIT: + USHORT result; + PPCODE: + result = (USHORT)GetKeyState(key); + if(GIMME_V == G_ARRAY) { + /* list context */ + mXPUSHu((result & 0x8000) >> 15); + mXPUSHu(result & 0x0001); + XSRETURN(2); + } + else { + /* scalar(and void) context */ + mXPUSHu((result & 0x8000) >> 15); + XSRETURN(1); + } + + ########################################################################## # (@)METHOD:GetKeyboardState() # Return array ref with the status of the 256 virtual keys. Index: Listbox.xs =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Listbox.xs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Listbox.xs 3 Dec 2005 01:56:31 -0000 1.5 --- Listbox.xs 16 Mar 2006 21:31:42 -0000 1.6 *************** *** 663,669 **** UINT tab CODE: ! DWORD * pBuf = (DWORD *) safemalloc(items * sizeof(DWORD)); for (int i = 1; i < items; i++) ! pBuf[i] = SvIV(ST(i)); RETVAL = SendMessage(handle, LB_SETTABSTOPS, items-1, (LPARAM) pBuf); safefree(pBuf); --- 663,669 ---- UINT tab CODE: ! DWORD * pBuf = (DWORD *) safemalloc((items-1) * sizeof(DWORD)); for (int i = 1; i < items; i++) ! pBuf[i-1] = SvIV(ST(i)); RETVAL = SendMessage(handle, LB_SETTABSTOPS, items-1, (LPARAM) pBuf); safefree(pBuf); Index: CHANGELOG =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/CHANGELOG,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -d -r1.72 -r1.73 *** CHANGELOG 16 Mar 2006 21:11:11 -0000 1.72 --- CHANGELOG 16 Mar 2006 21:31:42 -0000 1.73 *************** *** 6,9 **** --- 6,13 ---- Win32-GUI ChangeLog =================== + + [Robert May] : 16 Mar 2006 - bug fix and addition of GetKeyState + - Added Win32::GUI::GetKeyState + - Listbox.xs fix to indexing error in SetTabStops(). + + [Robert May] : 11 Jan 2006 - bug fixes and add balloon tips for Notify Icon - Label.xs correct -truncate option processing, as SS_.*ELLIPSIS.* |
From: Robert M. <rob...@us...> - 2006-03-16 21:11:17
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/samples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32127/samples Removed Files: CustomDraw.pl Log Message: Reverted this-mornings changes; They will be re-applied in smaller chunks --- CustomDraw.pl DELETED --- |
From: Robert M. <rob...@us...> - 2006-03-16 21:11:17
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/docs/GUI/Reference In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32127/docs/GUI/Reference Modified Files: Events_event.tpl Packages_package.tpl Log Message: Reverted this-mornings changes; They will be re-applied in smaller chunks Index: Packages_package.tpl =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/docs/GUI/Reference/Packages_package.tpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Packages_package.tpl 16 Mar 2006 08:57:49 -0000 1.3 --- Packages_package.tpl 16 Mar 2006 21:11:13 -0000 1.4 *************** *** 1 **** --- 1,3 ---- =item L<__W32G_PKGNAME__|__W32G_PKGLINK__> + + =for comment $Id$ Index: Events_event.tpl =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/docs/GUI/Reference/Events_event.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Events_event.tpl 16 Mar 2006 08:57:49 -0000 1.2 --- Events_event.tpl 16 Mar 2006 21:11:13 -0000 1.3 *************** *** 1,2 **** --- 1,4 ---- + =for comment $Id$ + =head2 __W32G_EVENTNAME__ |
From: Robert M. <rob...@us...> - 2006-03-16 21:11:17
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/build_tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32127/build_tools Modified Files: SrcParser.pm doPodDocs.pl Log Message: Reverted this-mornings changes; They will be re-applied in smaller chunks Index: doPodDocs.pl =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/build_tools/doPodDocs.pl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** doPodDocs.pl 16 Mar 2006 08:57:48 -0000 1.4 --- doPodDocs.pl 16 Mar 2006 21:11:12 -0000 1.5 *************** *** 41,45 **** # GUI_MessageLoops.cpp push @files, "$src_dir/GUI_MessageLoops.cpp"; - push @files, "$src_dir/CustomDraw.pm"; # and all the XS files --- 41,44 ---- *************** *** 164,168 **** BuildTools::macro_set("EVENTNAME", SrcParser::get_package_event_name($package, $event)); BuildTools::macro_set("EVENTPROTO", SrcParser::get_package_event_prototype($package, $event)); ! BuildTools::macro_set("EVENTDESCR", fix_description( $package, SrcParser::get_package_event_description($package, $event) ) ); --- 163,167 ---- BuildTools::macro_set("EVENTNAME", SrcParser::get_package_event_name($package, $event)); BuildTools::macro_set("EVENTPROTO", SrcParser::get_package_event_prototype($package, $event)); ! BuildTools::macro_set("EVENTDESCR", fix_description( $package, SrcParser::get_package_event_description($package, $event) ) ); Index: SrcParser.pm =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/build_tools/SrcParser.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SrcParser.pm 16 Mar 2006 08:57:48 -0000 1.3 --- SrcParser.pm 16 Mar 2006 21:11:12 -0000 1.4 *************** *** 163,167 **** $pack = "Win32::GUI::" . $pack unless $pack eq '*'; ! # The same event has multiple legitimate definitions in different packages # for the same package: # for example, Terminate() is described in both Window.xs and MDI.xs, --- 163,167 ---- $pack = "Win32::GUI::" . $pack unless $pack eq '*'; ! # The same evnet has multiple legitimate definitions in different packages # for the same package: # for example, Terminate() is described in both Window.xs and MDI.xs, |
Update of /cvsroot/perl-win32-gui/Win32-GUI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32127 Modified Files: Button.xs CHANGELOG GUI.h GUI.pm GUI.rc GUI.xs GUI_Events.cpp GUI_Helpers.cpp GUI_MessageLoops.cpp GUI_Options.cpp Header.xs ImageList.xs ListView.xs MANIFEST Makefile.PL NotifyIcon.xs Readme Readme.html Rebar.xs TYPEMAP Toolbar.xs Tooltip.xs Trackbar.xs TreeView.xs Window.xs Removed Files: CustomDraw.pm Log Message: Reverted this-mornings changes; They will be re-applied in smaller chunks Index: GUI.xs =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/GUI.xs,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** GUI.xs 16 Mar 2006 08:57:45 -0000 1.49 --- GUI.xs 16 Mar 2006 21:11:11 -0000 1.50 *************** *** 19,24 **** #include "GUI.h" - START_MY_CXT - /* ########################################################################### --- 19,22 ---- *************** *** 59,63 **** OUTPUT: [...1021 lines suppressed...] - # - # Note: Called implicitly by DragQueryFiles. So don't use DragQueryFiles - # if you need further information from this object. - void - DESTROY(handle) - HDROP handle - CODE: - DragFinish(handle); - - - ########################################################################### BOOT: { - MY_CXT_INIT; - MY_CXT.count = 0; INITCOMMONCONTROLSEX icce; icce.dwSize = sizeof(INITCOMMONCONTROLSEX); --- 5716,5723 ---- Index: Button.xs =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Button.xs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Button.xs 16 Mar 2006 08:57:42 -0000 1.7 --- Button.xs 16 Mar 2006 21:11:11 -0000 1.8 *************** *** 99,103 **** else if Parse_Event("Disable", PERLWIN32GUI_NEM_CONTROL2) else if Parse_Event("Push", PERLWIN32GUI_NEM_CONTROL3) - else if Parse_Event("CustomDraw", PERLWIN32GUI_NEM_PAINT) else retval = FALSE; --- 99,102 ---- *************** *** 166,217 **** break; - case NM_CUSTOMDRAW: - { - /* - * (@)EVENT:CustomDraw(CUSTOMDRAW) - * Sent by a Button control to notify its parent windows about - * drawing operations. - * - * CUSTOMDRAW - L<Win32::GUI::Button::CustomDraw> object holding - * the NMCUSTOMDRAW structure. - * - * Return Value: - * The value your application must return depends on - * L<-drawstate|Win32::GUI::CustomDraw/DrawState>. - * - * CDRF_NOTIFYPOSTERASE (-drawstage == CDDS_PREERASE) - * The control will notify the parent after erasing an item. - * - * CDRF_NOTIFYPOSTPAINT (-drawstage == CDDS_PREPAINT) - * The control will notify the parent after painting an item. - * - * CDRF_SKIPDEFAULT (-drawstage == CDDS_PREERASE or CDDS_PREPAINT) - * The application drew the item manually. The control will not draw - * the item. - * - * Remarks: - * - * If the button control is marked ownerdraw (BS_OWNERDRAW), the custom draw - * notification is not sent. - * - * Note: To use this API, you must provide a manifest specifying Comclt32.dll - * version 6.0. - * - * (@)APPLIES_TO:Button - */ - char class_name[] = "Win32::GUI::Button::CustomDraw"; - LPPERLWIN32GUI_NMCUSTOMDRAW lpCD = (LPPERLWIN32GUI_NMCUSTOMDRAW) lParam; - SV *obj = CreateNMCustomDraw(NOTXSCALL class_name, lpCD); - PerlResult = DoEvent(NOTXSCALL perlud, PERLWIN32GUI_NEM_PAINT, "CustomDraw", - PERLWIN32GUI_ARGTYPE_SV, obj, - -1); - #ifdef PERLWIN32GUI_STRONGDEBUG - printf("XS(CreateNMCustomDraw %s) => %d\n", class_name, PerlResult); - #endif - perlud->forceResult = PerlResult; - PerlResult = 0; /* MsgLoop return ForceResult */ - } - break; - default: PerlResult = DoEvent(NOTXSCALL perlud, PERLWIN32GUI_NEM_CONTROL1, "Anonymous", --- 165,168 ---- Index: Tooltip.xs =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Tooltip.xs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Tooltip.xs 16 Mar 2006 08:57:48 -0000 1.6 --- Tooltip.xs 16 Mar 2006 21:11:12 -0000 1.7 *************** *** 10,19 **** #include "GUI.h" ! typedef struct tagPERLWIN32GUI_NMTTCUSTOMDRAW { ! NMCUSTOMDRAW nmcd; ! UINT uDrawFlags; ! } PERLWIN32GUI_NMTTCUSTOMDRAW, * LPPERLWIN32GUI_NMTTCUSTOMDRAW; ! ! void Tooltip_onPreCreate(NOTXSPROC LPPERLWIN32GUI_CREATESTRUCT perlcs) { --- 10,14 ---- #include "GUI.h" ! void Tooltip_onPreCreate(NOTXSPROC LPPERLWIN32GUI_CREATESTRUCT perlcs) { *************** *** 56,60 **** else if Parse_Event("Pop", PERLWIN32GUI_NEM_CONTROL2) else if Parse_Event("Show", PERLWIN32GUI_NEM_CONTROL3) - else if Parse_Event("CustomDraw", PERLWIN32GUI_NEM_PAINT) else retval = FALSE; --- 51,54 ---- *************** *** 105,125 **** -1); break; - case NM_CUSTOMDRAW: - { - char class_name[] = "Win32::GUI::Tooltip::CustomDraw"; - LPPERLWIN32GUI_NMTTCUSTOMDRAW lpCD = (LPPERLWIN32GUI_NMTTCUSTOMDRAW) lParam; - SV *obj = CreateNMCustomDraw(NOTXSCALL class_name, lpCD); - HV *hv = (HV *)SvRV(obj); - hv_store_mg(NOTXSCALL hv, "-drawflags",11,newSViv(lpCD->uDrawFlags), 0); - PerlResult = DoEvent(NOTXSCALL perlud, PERLWIN32GUI_NEM_PAINT, "CustomDraw", - PERLWIN32GUI_ARGTYPE_SV, obj, - -1); - #ifdef PERLWIN32GUI_STRONGDEBUG - printf("XS(CreateNMCustomDraw %s) => %d\n", class_name, PerlResult); - #endif - perlud->forceResult = PerlResult; - PerlResult = 0; /* MsgLoop return ForceResult */ - } - break; } } --- 99,102 ---- *************** *** 127,131 **** return PerlResult; } ! MODULE = Win32::GUI::Tooltip PACKAGE = Win32::GUI::Tooltip --- 104,108 ---- return PerlResult; } ! MODULE = Win32::GUI::Tooltip PACKAGE = Win32::GUI::Tooltip Index: Window.xs =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Window.xs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Window.xs 16 Mar 2006 08:57:48 -0000 1.11 --- Window.xs 16 Mar 2006 21:11:12 -0000 1.12 *************** *** 82,89 **** storing = newSViv((LONG) handle_From(NOTXSCALL value)); stored = hv_store_mg(NOTXSCALL perlcs->hvSelf, "-accel", 6, storing, 0); - } else if(strcmp(option, "-dropfiles") == 0) { - perlcs->iDropFiles = (int) SvIV(value); - storing = newSViv((LONG) SvIV(value)); - stored = hv_store_mg(NOTXSCALL perlcs->hvSelf, "-dropfiles", 10, storing, 0); } else if(strcmp(option, "-hasmaximize") == 0 || strcmp(option, "-maximizebox") == 0) { --- 82,85 ---- *************** *** 117,128 **** void Window_onPostCreate(NOTXSPROC HWND myhandle, LPPERLWIN32GUI_CREATESTRUCT perlcs) { - - if (perlcs->iDropFiles) { - #ifdef PERLWIN32GUI_STRONGDEBUG - printf("XS(Window_onPostCreate DragAcceptFiles) (iDropFiles=%d, myhandle=%ud)\n", - perlcs->iDropFiles, myhandle); - #endif - DragAcceptFiles(myhandle, 1); - } } --- 113,116 ---- *************** *** 140,144 **** else if Parse_Event("Scroll", PERLWIN32GUI_NEM_CONTROL7) else if Parse_Event("InitMenu", PERLWIN32GUI_NEM_CONTROL8) - else if Parse_Event("DropFiles", PERLWIN32GUI_NEM_DROPFILE) else if Parse_Event("Paint", PERLWIN32GUI_NEM_PAINT) else retval = FALSE; --- 128,131 ---- *************** *** 273,277 **** * Sent when a menu is about to become active. It occurs when the user clicks * an item on the menu bar or presses a menu key. This allows the application ! * to modify the menu before it is displayed. * (@)APPLIES_TO:Window, DialogBox, MDIFrame */ --- 260,264 ---- * Sent when a menu is about to become active. It occurs when the user clicks * an item on the menu bar or presses a menu key. This allows the application ! * to modify the menu before it is displayed. * (@)APPLIES_TO:Window, DialogBox, MDIFrame */ *************** *** 308,314 **** } ! void DialogBox_onPostCreate(NOTXSPROC HWND myhandle, LPPERLWIN32GUI_CREATESTRUCT perlcs) { ! } --- 295,301 ---- } ! void DialogBox_onPostCreate(NOTXSPROC HWND myhandle, LPPERLWIN32GUI_CREATESTRUCT perlcs) { ! } *************** *** 319,323 **** } ! int DialogBox_onEvent (NOTXSPROC LPPERLWIN32GUI_USERDATA perlud, UINT uMsg, WPARAM wParam, LPARAM lParam) { --- 306,310 ---- } ! int DialogBox_onEvent (NOTXSPROC LPPERLWIN32GUI_USERDATA perlud, UINT uMsg, WPARAM wParam, LPARAM lParam) { *************** *** 351,357 **** } ! void Graphic_onPostCreate(NOTXSPROC HWND myhandle, LPPERLWIN32GUI_CREATESTRUCT perlcs) { ! } --- 338,344 ---- } ! void Graphic_onPostCreate(NOTXSPROC HWND myhandle, LPPERLWIN32GUI_CREATESTRUCT perlcs) { ! } *************** *** 365,369 **** else if Parse_Event("LButtonUp", PERLWIN32GUI_NEM_CONTROL2) else if Parse_Event("RButtonDown", PERLWIN32GUI_NEM_CONTROL3) ! else if Parse_Event("RButtonUp", PERLWIN32GUI_NEM_CONTROL4) else retval = FALSE; --- 352,356 ---- else if Parse_Event("LButtonUp", PERLWIN32GUI_NEM_CONTROL2) else if Parse_Event("RButtonDown", PERLWIN32GUI_NEM_CONTROL3) ! else if Parse_Event("RButtonUp", PERLWIN32GUI_NEM_CONTROL4) else retval = FALSE; *************** *** 371,375 **** } ! int Graphic_onEvent (NOTXSPROC LPPERLWIN32GUI_USERDATA perlud, UINT uMsg, WPARAM wParam, LPARAM lParam) { --- 358,362 ---- } ! int Graphic_onEvent (NOTXSPROC LPPERLWIN32GUI_USERDATA perlud, UINT uMsg, WPARAM wParam, LPARAM lParam) { *************** *** 466,496 **** #pragma message( "*** PACKAGE Win32::GUI::Window..." ) - ########################################################################### - # (@)METHOD:DragAcceptFiles(HANDLE, [ fAccept ] ) - # Set or get the status whether a window or dialogbox accepts dropped files. - # Returns 0 or 1 - # - int - DragAcceptFiles(handle,...) - HWND handle; - CODE: - int fAccept; - HV* self; - SV** tmp; - - RETVAL = 0; - self = (HV*) SvRV(ST(0)); - if (self) { - if ( items > 1 ) { - fAccept = SvIV(ST(1)) ? 1 : 0; - DragAcceptFiles(handle, (BOOL)fAccept); - RETVAL = fAccept; - } else { - if (tmp = hv_fetch_mg(NOTXSCALL self, "-dropfiles", 10, 0)) - RETVAL = SvIV(*tmp);; - } - } - OUTPUT: - RETVAL ########################################################################### --- 453,456 ---- Index: Readme =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Readme,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Readme 16 Mar 2006 08:57:48 -0000 1.5 --- Readme 16 Mar 2006 21:11:12 -0000 1.6 *************** *** 14,21 **** AVAILABILITY ! This is the README file for Win32::GUI v1.03_03 built on 15 Mar 2006. Source and ActiveState Perl PPMs are available from ! <http://sourceforge.net/project/showfiles.php?group_id=16572>. A cygwin distribution (available through cygwin's setup.exe) is --- 14,21 ---- AVAILABILITY ! This is the README file for Win32::GUI v1.03 built on 21 Nov 2005. Source and ActiveState Perl PPMs are available from ! http://sourceforge.net/project/showfiles.php?group_id=16572. A cygwin distribution (available through cygwin's setup.exe) is *************** *** 157,166 **** nmake ppm ! This procedure will generate a PPM for your current perl environment, including the HTML documentation, ready for installation as above. VERSION ! Documentation for Win32::GUI v1.03_03 created 15 Mar 2006 This document is autogenerated by the build process. Edits made here --- 157,166 ---- nmake ppm ! This procedure will generate a PPM for you current perl environment, including the HTML documentation, ready for installation as above. VERSION ! Documentation for Win32::GUI v1.03 created 21 Nov 2005 This document is autogenerated by the build process. Edits made here *************** *** 169,183 **** SUPPORT ! Homepage: <http://perl-win32-gui.sourceforge.net/>. For further support join the users mailing list("per...@li...") from the website at ! <http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users>. ! There is a searchable list archive at ! <http://sourceforge.net/mail/?group_id=16572>. COPYRIGHT and LICENCE ! Copyright (c) 1997..2006 Aldo Calpini. All rights reserved. This program is free software; you can redistribute it and/or modify it --- 169,183 ---- SUPPORT ! Homepage: http://perl-win32-gui.sourceforge.net/. For further support join the users mailing list("per...@li...") from the website at ! http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users. There ! is a searchable list archive at ! http://sourceforge.net/mail/?group_id=16572. COPYRIGHT and LICENCE ! Copyright (c) 1997..2005 Aldo Calpini. All rights reserved. This program is free software; you can redistribute it and/or modify it Index: TreeView.xs =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/TreeView.xs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** TreeView.xs 16 Mar 2006 08:57:48 -0000 1.6 --- TreeView.xs 16 Mar 2006 21:11:12 -0000 1.7 *************** *** 10,23 **** #include "GUI.h" ! typedef struct tagPERLWIN32GUI_NMTVCUSTOMDRAWINFO { ! PERLWIN32GUI_NMCUSTOMDRAW nmcd; ! COLORREF clrText; ! COLORREF clrTextBk; ! #if (_WIN32_IE >= 0x0400) ! int iLevel; ! #endif ! } PERLWIN32GUI_NMTVCUSTOMDRAW, *LPPERLWIN32GUI_NMTVCUSTOMDRAW; ! ! void TreeView_onPreCreate(NOTXSPROC LPPERLWIN32GUI_CREATESTRUCT perlcs) { --- 10,14 ---- #include "GUI.h" ! void TreeView_onPreCreate(NOTXSPROC LPPERLWIN32GUI_CREATESTRUCT perlcs) { *************** *** 31,40 **** BOOL retval = TRUE; ! if(strcmp(option, "-imagelist") == 0) { perlcs->hImageList = (HIMAGELIST) handle_From(NOTXSCALL value); } else if(strcmp(option, "-tooltip") == 0) { perlcs->hTooltip = (HWND) handle_From(NOTXSCALL value); ! SwitchBit(perlcs->cs.style, TVS_NOTOOLTIPS, 0); } else if BitmaskOptionValue("-lines", perlcs->cs.style, TVS_HASLINES) } else if BitmaskOptionValue("-rootlines", perlcs->cs.style, TVS_LINESATROOT) --- 22,31 ---- BOOL retval = TRUE; ! if(strcmp(option, "-imagelist") == 0) { perlcs->hImageList = (HIMAGELIST) handle_From(NOTXSCALL value); } else if(strcmp(option, "-tooltip") == 0) { perlcs->hTooltip = (HWND) handle_From(NOTXSCALL value); ! SwitchBit(perlcs->cs.style, TVS_NOTOOLTIPS, 0); } else if BitmaskOptionValue("-lines", perlcs->cs.style, TVS_HASLINES) } else if BitmaskOptionValue("-rootlines", perlcs->cs.style, TVS_LINESATROOT) *************** *** 61,66 **** if(perlcs->hImageList != NULL) TreeView_SetImageList(myhandle, perlcs->hImageList, TVSIL_NORMAL); ! ! if (perlcs->hTooltip != NULL) TreeView_SetToolTips (myhandle, perlcs->hTooltip); --- 52,57 ---- if(perlcs->hImageList != NULL) TreeView_SetImageList(myhandle, perlcs->hImageList, TVSIL_NORMAL); ! ! if (perlcs->hTooltip != NULL) TreeView_SetToolTips (myhandle, perlcs->hTooltip); *************** *** 89,93 **** else if Parse_Event("EndLabelEdit", PERLWIN32GUI_NEM_CONTROL7) else if Parse_Event("KeyDown", PERLWIN32GUI_NEM_KEYDOWN) - else if Parse_Event("CustomDraw", PERLWIN32GUI_NEM_PAINT) else retval = FALSE; --- 80,83 ---- *************** *** 100,109 **** int PerlResult = 1; TV_ITEM *pItem; ! if ( uMsg == WM_NOTIFY ) { LPNM_TREEVIEW tv_notify = (LPNM_TREEVIEW) lParam; switch(tv_notify->hdr.code) { ! case TVN_BEGINLABELEDIT: /* --- 90,99 ---- int PerlResult = 1; TV_ITEM *pItem; ! if ( uMsg == WM_NOTIFY ) { LPNM_TREEVIEW tv_notify = (LPNM_TREEVIEW) lParam; switch(tv_notify->hdr.code) { ! case TVN_BEGINLABELEDIT: /* *************** *** 114,123 **** * For a treeview to receive this event, -editlabels need to be set to true. * (@)APPLIES_TO:TreeView ! */ pItem = &((TV_DISPINFO*)lParam)->item; PerlResult = DoEvent(NOTXSCALL perlud, PERLWIN32GUI_NEM_CONTROL6, "BeginLabelEdit", PERLWIN32GUI_ARGTYPE_LONG, (LONG) pItem->hItem, -1); ! // Force result if event is handle if (perlud->dwPlStyle & PERLWIN32GUI_EVENTHANDLING) { --- 104,113 ---- * For a treeview to receive this event, -editlabels need to be set to true. * (@)APPLIES_TO:TreeView ! */ pItem = &((TV_DISPINFO*)lParam)->item; PerlResult = DoEvent(NOTXSCALL perlud, PERLWIN32GUI_NEM_CONTROL6, "BeginLabelEdit", PERLWIN32GUI_ARGTYPE_LONG, (LONG) pItem->hItem, -1); ! // Force result if event is handle if (perlud->dwPlStyle & PERLWIN32GUI_EVENTHANDLING) { *************** *** 127,135 **** break; ! case TVN_ENDLABELEDIT: /* * (@)EVENT:EndLabelEdit(NODE,TEXT) * Sent when the user has finished editing a label in the TreeView control. ! * You have explicitly set the text of the node to reflect the new changes. * If the user cancels the edit, the text is undef. * (@)APPLIES_TO:TreeView --- 117,125 ---- break; ! case TVN_ENDLABELEDIT: /* * (@)EVENT:EndLabelEdit(NODE,TEXT) * Sent when the user has finished editing a label in the TreeView control. ! * You have explicitly set the text of the node to reflect the new changes. * If the user cancels the edit, the text is undef. * (@)APPLIES_TO:TreeView *************** *** 145,153 **** PerlResult = DoEvent(NOTXSCALL perlud, PERLWIN32GUI_NEM_CONTROL7, "EndLabelEdit", PERLWIN32GUI_ARGTYPE_LONG, (LONG) pItem->hItem, ! -1); } ! break; ! case TVN_SELCHANGED: /* --- 135,143 ---- PerlResult = DoEvent(NOTXSCALL perlud, PERLWIN32GUI_NEM_CONTROL7, "EndLabelEdit", PERLWIN32GUI_ARGTYPE_LONG, (LONG) pItem->hItem, ! -1); } ! break; ! case TVN_SELCHANGED: /* *************** *** 214,223 **** if (perlud->dwPlStyle & PERLWIN32GUI_EVENTHANDLING) { perlud->forceResult = (PerlResult == 0 ? TRUE : FALSE); ! PerlResult = 0; // MsgLoop return ForceResult } break; case TVN_KEYDOWN: ! { /* * (@)EVENT:KeyDown(KEY) --- 204,213 ---- if (perlud->dwPlStyle & PERLWIN32GUI_EVENTHANDLING) { perlud->forceResult = (PerlResult == 0 ? TRUE : FALSE); ! PerlResult = 0; // MsgLoop return ForceResult } break; case TVN_KEYDOWN: ! /* * (@)EVENT:KeyDown(KEY) *************** *** 231,258 **** PERLWIN32GUI_ARGTYPE_LONG, (LONG) tv_keydown->wVKey, -1); - } - break; ! case NM_CUSTOMDRAW: ! { ! LPPERLWIN32GUI_NMTVCUSTOMDRAW lpCD = (LPPERLWIN32GUI_NMTVCUSTOMDRAW) lParam; ! SV *obj = CreateNMCustomDraw(NOTXSCALL "Win32::GUI::TreeView::CustomDraw", lpCD); ! HV *hv = (HV *)SvRV(obj); ! hv_store_mg(NOTXSCALL hv, "-clrtext", 8, newSVuv((DWORD) lpCD->clrText), 0); ! hv_store_mg(NOTXSCALL hv, "-clrtextbk", 10, newSVuv((DWORD) lpCD->clrTextBk), 0); ! #if (_WIN32_IE >= 0x0400) ! hv_store_mg(NOTXSCALL hv, "-level", 6, newSViv(lpCD->iLevel), 0); ! #endif ! PerlResult = DoEvent(NOTXSCALL perlud, PERLWIN32GUI_NEM_PAINT, "CustomDraw", ! PERLWIN32GUI_ARGTYPE_SV, obj, ! -1); ! #ifdef PERLWIN32GUI_STRONGDEBUG ! printf("XS(CreateNMCustomDraw %s) => %d\n", class_name, PerlResult); ! #endif ! perlud->forceResult = PerlResult; ! PerlResult = 0; /* MsgLoop return ForceResult */ ! } ! break; ! } } --- 221,227 ---- PERLWIN32GUI_ARGTYPE_LONG, (LONG) tv_keydown->wVKey, -1); ! break; ! } } *************** *** 267,270 **** --- 236,240 ---- + ########################################################################### # (@)METHOD:CreateDragImage(NODE) *************** *** 319,324 **** ########################################################################### # (@)METHOD:EndEditLabelNow([FLAG_CANCEL=TRUE]) ! # Ends the editing of a tree view item's label. ! BOOL EndEditLabelNow(handle,flag=TRUE) HWND handle --- 289,294 ---- ########################################################################### # (@)METHOD:EndEditLabelNow([FLAG_CANCEL=TRUE]) ! # Ends the editing of a tree view item's label. ! BOOL EndEditLabelNow(handle,flag=TRUE) HWND handle *************** *** 415,419 **** ########################################################################### # (@)METHOD:GetFirstVisible() ! # Retrieves the first visible item in a TreeView. HTREEITEM GetFirstVisible(handle) --- 385,389 ---- ########################################################################### # (@)METHOD:GetFirstVisible() ! # Retrieves the first visible item in a TreeView. HTREEITEM GetFirstVisible(handle) *************** *** 427,431 **** # (@)METHOD:GetImageList([TYPE=TVSIL_NORMAL]) # Retrieves the handle to the normal or state image list associated with a TreeView. ! # B<TYPE> = TVSIL_NORMAL | TVSIL_STATE HIMAGELIST GetImageList(handle,type=TVSIL_NORMAL ) --- 397,401 ---- # (@)METHOD:GetImageList([TYPE=TVSIL_NORMAL]) # Retrieves the handle to the normal or state image list associated with a TreeView. ! # B<TYPE> = TVSIL_NORMAL | TVSIL_STATE HIMAGELIST GetImageList(handle,type=TVSIL_NORMAL ) *************** *** 439,443 **** ########################################################################### # (@)METHOD:GetIndent() ! # Retrieves the amount, in pixels, that child items are indented relative to their parent items. UINT GetIndent(handle) --- 409,413 ---- ########################################################################### # (@)METHOD:GetIndent() ! # Retrieves the amount, in pixels, that child items are indented relative to their parent items. UINT GetIndent(handle) *************** *** 531,535 **** # (@)METHOD:GetItemRect(NODE,[FLAG=FALSE]) # Retrieves the bounding rectangle for a tree view item and indicates whether the item is visible. ! # If B<FLAG> is TRUE, the bounding rectangle includes only the text of the item. Otherwise, it includes the entire line that the item occupies in the tree view control. void GetItemRect(handle,item,flag=FALSE) --- 501,505 ---- # (@)METHOD:GetItemRect(NODE,[FLAG=FALSE]) # Retrieves the bounding rectangle for a tree view item and indicates whether the item is visible. ! # If B<FLAG> is TRUE, the bounding rectangle includes only the text of the item. Otherwise, it includes the entire line that the item occupies in the tree view control. void GetItemRect(handle,item,flag=FALSE) *************** *** 553,557 **** ########################################################################### # (@)METHOD:GetLastVisible() ! # Retrieves the last expanded item in a tree view control. HTREEITEM GetLastVisible(handle) --- 523,527 ---- ########################################################################### # (@)METHOD:GetLastVisible() ! # Retrieves the last expanded item in a tree view control. HTREEITEM GetLastVisible(handle) *************** *** 566,578 **** # Retrieves the tree view item that bears the specified relationship to a specified item. # ! # B<FLAG> specifying the item to retrieve : # TVGN_CARET = Retrieves the currently selected item. ! # TVGN_CHILD = Retrieves the first child item of the item specified by the hitem parameter. # TVGN_DROPHILITE = Retrieves the item that is the target of a drag-and-drop operation. ! # TVGN_FIRSTVISIBLE = Retrieves the first visible item. # TVGN_NEXT = Retrieves the next sibling item. # TVGN_NEXTVISIBLE = Retrieves the next visible item that follows the specified item. The specified item must be visible. ! # TVGN_PARENT = Retrieves the parent of the specified item. ! # TVGN_PREVIOUS = Retrieves the previous sibling item. # TVGN_PREVIOUSVISIBLE = Retrieves the first visible item that precedes the specified item. The specified item must be visible. # TVGN_ROOT = Retrieves the topmost or very first item of the tree view control. --- 536,548 ---- # Retrieves the tree view item that bears the specified relationship to a specified item. # ! # B<FLAG> specifying the item to retrieve : # TVGN_CARET = Retrieves the currently selected item. ! # TVGN_CHILD = Retrieves the first child item of the item specified by the hitem parameter. # TVGN_DROPHILITE = Retrieves the item that is the target of a drag-and-drop operation. ! # TVGN_FIRSTVISIBLE = Retrieves the first visible item. # TVGN_NEXT = Retrieves the next sibling item. # TVGN_NEXTVISIBLE = Retrieves the next visible item that follows the specified item. The specified item must be visible. ! # TVGN_PARENT = Retrieves the parent of the specified item. ! # TVGN_PREVIOUS = Retrieves the previous sibling item. # TVGN_PREVIOUSVISIBLE = Retrieves the first visible item that precedes the specified item. The specified item must be visible. # TVGN_ROOT = Retrieves the topmost or very first item of the tree view control. *************** *** 853,862 **** ########################################################################### # (@)METHOD:Select(NODE, [FLAG=TVGN_CARET]) ! # Selects the given B<NODE >in the TreeView. # If B<NODE> is 0 (zero), the selected item, if any, is deselected. # # Optional B<FLAG> parameter ! # TVGN_CARET = Sets the selection to the given item. ! # TVGN_DROPHILITE = Redraws the given item in the style used to indicate the target of a drag-and-drop operation. # TVGN_FIRSTVISIBLE = Ensures that the specified item is visible, and, if possible, displays it at the top of the control's window. BOOL --- 823,832 ---- ########################################################################### # (@)METHOD:Select(NODE, [FLAG=TVGN_CARET]) ! # Selects the given B<NODE >in the TreeView. # If B<NODE> is 0 (zero), the selected item, if any, is deselected. # # Optional B<FLAG> parameter ! # TVGN_CARET = Sets the selection to the given item. ! # TVGN_DROPHILITE = Redraws the given item in the style used to indicate the target of a drag-and-drop operation. # TVGN_FIRSTVISIBLE = Ensures that the specified item is visible, and, if possible, displays it at the top of the control's window. BOOL *************** *** 1050,1054 **** ########################################################################### # (@)METHOD:SetScrollTime(TIME) ! # Sets the maximum scroll time for the tree view control. int SetScrollTime(handle,time) --- 1020,1024 ---- ########################################################################### # (@)METHOD:SetScrollTime(TIME) ! # Sets the maximum scroll time for the tree view control. int SetScrollTime(handle,time) *************** *** 1086,1090 **** ########################################################################### # (@)METHOD:SetUnicodeFormat(FLAG) ! # Sets the UNICODE character format flag for the control. BOOL SetUnicodeFormat(handle,flag) --- 1056,1060 ---- ########################################################################### # (@)METHOD:SetUnicodeFormat(FLAG) ! # Sets the UNICODE character format flag for the control. BOOL SetUnicodeFormat(handle,flag) *************** *** 1240,1302 **** RETVAL - - MODULE = Win32::GUI::TreeView PACKAGE = Win32::GUI::TreeView::CustomDraw - - PROTOTYPES: DISABLE - - ########################################################################### - # (@)PACKAGE:Win32::GUI::TreeView::CustomDraw - - #pragma message( "*** PACKAGE Win32::GUI::TreeView::CustomDraw..." ) - - ########################################################################### - # (@)METHOD:TextColor([COLOR]) - # Set or Get the CustomDraw -clrtext property. - # - # COLOR may be either a numerical value, - # or a color expressed as [RR, GG, BB], - # or a color expressed in HTML notation (#RRGGBB) - SV * - TextColor(handle,color=FALSE) - HWND handle - COLORREF color - PREINIT: - HV* hv = (HV*)SvRV(ST(0)); - CODE: - LPPERLWIN32GUI_NMTVCUSTOMDRAW lpCD = (LPPERLWIN32GUI_NMTVCUSTOMDRAW) handle; - if (items == 2) { - RETVAL = newSViv(color); - if(SvROK(ST(0))) - hv_store_mg(NOTXSCALL hv, "-clrtext", 8, RETVAL, 0); - lpCD->clrText = color; - } else { - RETVAL = newSViv(lpCD->clrText); - } - OUTPUT: - RETVAL - - ########################################################################### - # (@)METHOD:BackColor([COLOR]) - # Set or Get the CustomDraw -clrtextbk property. - # - # COLOR may be either a numerical value, - # or a color expressed as [RR, GG, BB], - # or a color expressed in HTML notation (#RRGGBB) - SV * - BackColor(handle,color=FALSE) - HWND handle - COLORREF color - PREINIT: - HV* hv = (HV*)SvRV(ST(0)); - CODE: - LPPERLWIN32GUI_NMTVCUSTOMDRAW lpCD = (LPPERLWIN32GUI_NMTVCUSTOMDRAW) handle; - if (items == 2) { - RETVAL = newSViv(color); - if(SvROK(ST(0))) - hv_store_mg(NOTXSCALL hv, "-clrtextbk", 10, RETVAL, 0); - lpCD->clrTextBk = color; - } else { - RETVAL = newSViv(lpCD->clrTextBk); - } - OUTPUT: - RETVAL --- 1210,1211 ---- Index: GUI_Events.cpp =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/GUI_Events.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** GUI_Events.cpp 16 Mar 2006 08:57:48 -0000 1.11 --- GUI_Events.cpp 16 Mar 2006 21:11:11 -0000 1.12 *************** *** 19,23 **** BOOL ProcessEventError(NOTXSPROC char *Name, int* PerlResult) { if(SvTRUE(ERRSV)) { ! if(strncmp(Name, "main::", 6) == 0) Name += 6; MessageBeep(MB_ICONASTERISK); *PerlResult = MessageBox(NULL, SvPV_nolen(ERRSV), Name, MB_ICONERROR | MB_OKCANCEL); --- 19,23 ---- BOOL ProcessEventError(NOTXSPROC char *Name, int* PerlResult) { if(SvTRUE(ERRSV)) { ! if(strncmp(Name, "main::", 6) == 0) Name += 6; MessageBeep(MB_ICONASTERISK); *PerlResult = MessageBox(NULL, SvPV_nolen(ERRSV), Name, MB_ICONERROR | MB_OKCANCEL); *************** *** 72,76 **** break; case PERLWIN32GUI_ARGTYPE_LONG: ! XPUSHs(sv_2mortal(newSVuv(va_arg( args, long )))); break; case PERLWIN32GUI_ARGTYPE_WORD: --- 72,76 ---- break; case PERLWIN32GUI_ARGTYPE_LONG: ! XPUSHs(sv_2mortal(newSViv(va_arg( args, long )))); break; case PERLWIN32GUI_ARGTYPE_WORD: *************** *** 81,87 **** break; case PERLWIN32GUI_ARGTYPE_SV: - #ifdef PERLWIN32GUI_STRONGDEBUG - printf("XS(DoEvent NEM PERLWIN32GUI_ARGTYPE_SV)\n"); - #endif XPUSHs(va_arg( args, SV *)); break; --- 81,84 ---- *************** *** 145,154 **** XPUSHs(sv_2mortal(newSVpv(va_arg( args, char * ), 0))); break; - case PERLWIN32GUI_ARGTYPE_SV: - #ifdef PERLWIN32GUI_STRONGDEBUG - printf("XS(DoEvent OEM PERLWIN32GUI_ARGTYPE_SV)\n"); - #endif - XPUSHs(va_arg( args, SV *)); - break; default: warn("Win32::GUI: WARNING! unknown argument type (%d) to event '%s'", argtype, Name); --- 142,145 ---- *************** *** 1048,1056 **** //but this is slightly quicker:) if(SvTRUE(ERRSV)) { ! ProcessEventError(NOTXSCALL "Hook", PerlResult); ! } ! else { ! if(count > 0) { *PerlResult = POPi; } ! } PUTBACK; FREETMPS; --- 1039,1047 ---- //but this is slightly quicker:) if(SvTRUE(ERRSV)) { ! ProcessEventError(NOTXSCALL "Hook", PerlResult); ! } ! else { ! if(count > 0) { *PerlResult = POPi; } ! } PUTBACK; FREETMPS; Index: TYPEMAP =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/TYPEMAP,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** TYPEMAP 16 Mar 2006 08:57:48 -0000 1.6 --- TYPEMAP 16 Mar 2006 21:11:12 -0000 1.7 *************** *** 13,17 **** HPEN T_HANDLE HRGN T_HANDLE - HDROP T_HANDLE HTREEITEM T_IV LONG T_IV --- 13,16 ---- *************** *** 57,58 **** --- 56,58 ---- T_COLOR sv_setiv($arg, (IV) $var); + Index: Rebar.xs =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Rebar.xs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Rebar.xs 16 Mar 2006 08:57:48 -0000 1.8 --- Rebar.xs 16 Mar 2006 21:11:12 -0000 1.9 *************** *** 78,82 **** if Parse_Event("HeightChange", PERLWIN32GUI_NEM_CONTROL1) else if Parse_Event("ChevronPushed", PERLWIN32GUI_NEM_CONTROL2) - else if Parse_Event("CustomDraw", PERLWIN32GUI_NEM_PAINT) else retval = FALSE; --- 78,81 ---- *************** *** 119,139 **** } break; - - case NM_CUSTOMDRAW: - { - char class_name[] = "Win32::GUI::Rebar::CustomDraw"; - LPPERLWIN32GUI_NMCUSTOMDRAW lpCD = (LPPERLWIN32GUI_NMCUSTOMDRAW) lParam; - SV *obj = CreateNMCustomDraw(NOTXSCALL class_name, lpCD); - PerlResult = DoEvent(NOTXSCALL perlud, PERLWIN32GUI_NEM_PAINT, "CustomDraw", - PERLWIN32GUI_ARGTYPE_SV, obj, - -1); - #ifdef PERLWIN32GUI_STRONGDEBUG - printf("XS(CreateNMCustomDraw %s) => %d\n", class_name, PerlResult); - #endif - perlud->forceResult = PerlResult; - PerlResult = 0; /* MsgLoop return ForceResult */ - } - break; - } --- 118,121 ---- Index: Trackbar.xs =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Trackbar.xs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Trackbar.xs 16 Mar 2006 08:57:48 -0000 1.7 --- Trackbar.xs 16 Mar 2006 21:11:12 -0000 1.8 *************** *** 10,14 **** #include "GUI.h" ! void Trackbar_onPreCreate(NOTXSPROC LPPERLWIN32GUI_CREATESTRUCT perlcs) { --- 10,14 ---- #include "GUI.h" ! void Trackbar_onPreCreate(NOTXSPROC LPPERLWIN32GUI_CREATESTRUCT perlcs) { *************** *** 24,28 **** if(strcmp(option, "-tooltip") == 0) { perlcs->hTooltip = (HWND) handle_From(NOTXSCALL value); ! SwitchBit(perlcs->cs.style, TBS_TOOLTIPS , 1); } else if BitmaskOptionValue("-vertical", perlcs->cs.style, TBS_VERT) } else if BitmaskOptionValue("-aligntop", perlcs->cs.style, TBS_TOP) --- 24,28 ---- if(strcmp(option, "-tooltip") == 0) { perlcs->hTooltip = (HWND) handle_From(NOTXSCALL value); ! SwitchBit(perlcs->cs.style, TBS_TOOLTIPS , 1); } else if BitmaskOptionValue("-vertical", perlcs->cs.style, TBS_VERT) } else if BitmaskOptionValue("-aligntop", perlcs->cs.style, TBS_TOP) *************** *** 39,46 **** } ! void Trackbar_onPostCreate(NOTXSPROC HWND myhandle, LPPERLWIN32GUI_CREATESTRUCT perlcs) { ! if (perlcs->hTooltip != NULL) SendMessage(myhandle, TBM_SETTOOLTIPS, (WPARAM) perlcs->hTooltip, 0); } --- 39,46 ---- } ! void Trackbar_onPostCreate(NOTXSPROC HWND myhandle, LPPERLWIN32GUI_CREATESTRUCT perlcs) { ! if (perlcs->hTooltip != NULL) SendMessage(myhandle, TBM_SETTOOLTIPS, (WPARAM) perlcs->hTooltip, 0); } *************** *** 83,102 **** PERLWIN32GUI_ARGTYPE_INT, (int) HIWORD(wParam), -1 ); break; - - case NM_CUSTOMDRAW: - { - char class_name[] = "Win32::GUI::Trackbar::CustomDraw"; - LPPERLWIN32GUI_NMCUSTOMDRAW lpCD = (LPPERLWIN32GUI_NMCUSTOMDRAW) lParam; - SV *obj = CreateNMCustomDraw(NOTXSCALL class_name, lpCD); - PerlResult = DoEvent(NOTXSCALL perlud, PERLWIN32GUI_NEM_PAINT, "CustomDraw", - PERLWIN32GUI_ARGTYPE_SV, obj, - -1); - #ifdef PERLWIN32GUI_STRONGDEBUG - printf("XS(CreateNMCustomDraw %s) => %d\n", class_name, PerlResult); - #endif - perlud->forceResult = PerlResult; - PerlResult = 0; - } - break; } --- 83,86 ---- *************** *** 140,144 **** # Retrieves the handle to a trackbar control buddy window at a given location. # ! # The specified location is relative to the control's orientation (horizontal or vertical). # B<LOCATION> = FALSE : Retrieves buddy to the right of the trackbar (or below for vertical trackbar) # B<LOCATION> = TRUE : Retrieves buddy to the left of the trackbar (or above for vertical trackbar) --- 124,128 ---- # Retrieves the handle to a trackbar control buddy window at a given location. # ! # The specified location is relative to the control's orientation (horizontal or vertical). # B<LOCATION> = FALSE : Retrieves buddy to the right of the trackbar (or below for vertical trackbar) # B<LOCATION> = TRUE : Retrieves buddy to the left of the trackbar (or above for vertical trackbar) *************** *** 155,159 **** # (@)METHOD:GetChannelRect() # Retrieves the bounding rectangle for a trackbar's channel. ! # The channel is the area over which the slider moves. It contains the highlight when a range is selected. void --- 139,143 ---- # (@)METHOD:GetChannelRect() # Retrieves the bounding rectangle for a trackbar's channel. ! # The channel is the area over which the slider moves. It contains the highlight when a range is selected. void *************** *** 221,225 **** ########################################################################### # (@)METHOD:GetPics() ! # Retrieves an array of logical positions of the trackbar's tick marks, not including the first and last tick. void --- 205,209 ---- ########################################################################### # (@)METHOD:GetPics() ! # Retrieves an array of logical positions of the trackbar's tick marks, not including the first and last tick. void *************** *** 236,240 **** if (pTics) { EXTEND(SP, nTics); ! for (UINT i = 0; i < nTics; i++) XST_mIV(i, pTics[i]); XSRETURN(nTics); --- 220,224 ---- if (pTics) { EXTEND(SP, nTics); ! for (UINT i = 0; i < nTics; i++) XST_mIV(i, pTics[i]); XSRETURN(nTics); *************** *** 308,312 **** ########################################################################### # (@)METHOD:GetThumbRect() ! # Retrieves the bounding rectangle for the slider in a trackbar. void --- 292,296 ---- ########################################################################### # (@)METHOD:GetThumbRect() ! # Retrieves the bounding rectangle for the slider in a trackbar. void *************** *** 352,356 **** ########################################################################### # (@)METHOD:GetToolTips() ! # Retrieves the handle to the tooltip control assigned to the trackbar, if any. LRESULT --- 336,340 ---- ########################################################################### # (@)METHOD:GetToolTips() ! # Retrieves the handle to the tooltip control assigned to the trackbar, if any. LRESULT *************** *** 364,368 **** ########################################################################### # (@)METHOD:GetUnicodeFormat() ! # Retrieves the UNICODE character format flag for the control. LRESULT --- 348,352 ---- ########################################################################### # (@)METHOD:GetUnicodeFormat() ! # Retrieves the UNICODE character format flag for the control. LRESULT *************** *** 378,382 **** # Assigns a window as the buddy window for a trackbar control # Returns the handle to the window that was previously assigned to the control at that location ! # The specified location is relative to the control's orientation (horizontal or vertical). # LOCATION = FALSE : Retrieves buddy to the right of the trackbar (or below for vertical trackbar) # LOCATION = TRUE : Retrieves buddy to the left of the trackbar (or above for vertical trackbar) --- 362,366 ---- # Assigns a window as the buddy window for a trackbar control # Returns the handle to the window that was previously assigned to the control at that location ! # The specified location is relative to the control's orientation (horizontal or vertical). # LOCATION = FALSE : Retrieves buddy to the right of the trackbar (or below for vertical trackbar) # LOCATION = TRUE : Retrieves buddy to the left of the trackbar (or above for vertical trackbar) *************** *** 406,410 **** ########################################################################### # (@)METHOD:SetPageSize([SIZE=10]) ! # Sets the number of logical positions the trackbar's slider moves in response to keyboard input, such as the PAGE UP or PAGE DOWN keys, or mouse input, such as clicks in the trackbar's channel. LRESULT --- 390,394 ---- ########################################################################### # (@)METHOD:SetPageSize([SIZE=10]) ! # Sets the number of logical positions the trackbar's slider moves in response to keyboard input, such as the PAGE UP or PAGE DOWN keys, or mouse input, such as clicks in the trackbar's channel. LRESULT *************** *** 433,437 **** ########################################################################### # (@)METHOD:SetRange([MIN=0], MAX, [REDRAW=TRUE]) ! # Sets the range of minimum and maximum logical positions for the slider in a trackbar. LRESULT --- 417,421 ---- ########################################################################### # (@)METHOD:SetRange([MIN=0], MAX, [REDRAW=TRUE]) ! # Sets the range of minimum and maximum logical positions for the slider in a trackbar. LRESULT *************** *** 476,480 **** ########################################################################### # (@)METHOD:SetSel([MIN=0], MAX, [REDRAW=TRUE]) ! # Sets the starting and ending logical positions for the current selection range in a trackbar. LRESULT --- 460,464 ---- ########################################################################### # (@)METHOD:SetSel([MIN=0], MAX, [REDRAW=TRUE]) ! # Sets the starting and ending logical positions for the current selection range in a trackbar. LRESULT *************** *** 532,536 **** ########################################################################### # (@)METHOD:SetTic(POSITION) ! # Sets a tick mark in a trackbar at the specified logical position. LRESULT --- 516,520 ---- ########################################################################### # (@)METHOD:SetTic(POSITION) ! # Sets a tick mark in a trackbar at the specified logical position. LRESULT *************** *** 562,568 **** # Positions a tooltip control used by a trackbar control. # TBTS_TOP : The tooltip control will be positioned above the trackbar. This flag is for use with horizontal trackbars. ! # TBTS_LEFT The tooltip control will be positioned to the left of the trackbar. This flag is for use with vertical trackbars. ! # TBTS_BOTTOM The tooltip control will be positioned below the trackbar. This flag is for use with horizontal trackbars. ! # TBTS_RIGHT The tooltip control will be positioned to the right of the trackbar. This flag is for use with vertical trackbars. LRESULT --- 546,552 ---- # Positions a tooltip control used by a trackbar control. # TBTS_TOP : The tooltip control will be positioned above the trackbar. This flag is for use with horizontal trackbars. ! # TBTS_LEFT The tooltip control will be positioned to the left of the trackbar. This flag is for use with vertical trackbars. ! # TBTS_BOTTOM The tooltip control will be positioned below the trackbar. This flag is for use with horizontal trackbars. ! # TBTS_RIGHT The tooltip control will be positioned to the right of the trackbar. This flag is for use with vertical trackbars. LRESULT *************** *** 590,594 **** ########################################################################### # (@)METHOD:SetUnicodeFormat(FLAG) ! # Sets the UNICODE character format flag for the control. LRESULT --- 574,578 ---- ########################################################################### # (@)METHOD:SetUnicodeFormat(FLAG) ! # Sets the UNICODE character format flag for the control. LRESULT *************** *** 613,619 **** HWND handle CODE: ! if(items > 1) { if(items > 2) ! RETVAL = SendMessage(handle, TBM_SETRANGEMIN, (WPARAM) SvIV(ST(2)), (LPARAM) SvIV(ST(1))); else RETVAL = SendMessage(handle, TBM_SETRANGEMIN, 1, (LPARAM) SvIV(ST(1))); --- 597,603 ---- HWND handle CODE: ! if(items > 1) { if(items > 2) ! RETVAL = SendMessage(handle, TBM_SETRANGEMIN, (WPARAM) SvIV(ST(2)), (LPARAM) SvIV(ST(1))); else RETVAL = SendMessage(handle, TBM_SETRANGEMIN, 1, (LPARAM) SvIV(ST(1))); *************** *** 633,639 **** HWND handle CODE: ! if(items > 1) { if(items > 2) ! RETVAL = SendMessage(handle, TBM_SETRANGEMAX, (WPARAM) SvIV(ST(2)), (LPARAM) SvIV(ST(1))); else RETVAL = SendMessage(handle, TBM_SETRANGEMAX, 1, (LPARAM) SvIV(ST(1))); --- 617,623 ---- HWND handle CODE: ! if(items > 1) { if(items > 2) ! RETVAL = SendMessage(handle, TBM_SETRANGEMAX, (WPARAM) SvIV(ST(2)), (LPARAM) SvIV(ST(1))); else RETVAL = SendMessage(handle, TBM_SETRANGEMAX, 1, (LPARAM) SvIV(ST(1))); *************** *** 652,658 **** HWND handle CODE: ! if(items > 1) { if(items > 2) ! RETVAL = SendMessage(handle, TBM_SETPOS, (WPARAM) SvIV(ST(2)), (LPARAM) SvIV(ST(1))); else RETVAL = SendMessage(handle, TBM_SETPOS, 1, (LPARAM) SvIV(ST(1))); --- 636,642 ---- HWND handle CODE: ! if(items > 1) { if(items > 2) ! RETVAL = SendMessage(handle, TBM_SETPOS, (WPARAM) SvIV(ST(2)), (LPARAM) SvIV(ST(1))); else RETVAL = SendMessage(handle, TBM_SETPOS, 1, (LPARAM) SvIV(ST(1))); *************** *** 671,677 **** HWND handle CODE: ! if(items > 1) { if(items > 2) ! RETVAL = SendMessage(handle, TBM_SETSELSTART, (WPARAM) SvIV(ST(2)), (LPARAM) SvIV(ST(1))); else RETVAL = SendMessage(handle, TBM_SETSELSTART, 1, (LPARAM) SvIV(ST(1))); --- 655,661 ---- HWND handle CODE: ! if(items > 1) { if(items > 2) ! RETVAL = SendMessage(handle, TBM_SETSELSTART, (WPARAM) SvIV(ST(2)), (LPARAM) SvIV(ST(1))); else RETVAL = SendMessage(handle, TBM_SETSELSTART, 1, (LPARAM) SvIV(ST(1))); *************** *** 690,696 **** HWND handle CODE: ! if(items > 1) { if(items > 2) ! RETVAL = SendMessage(handle, TBM_SETSELEND, (WPARAM) SvIV(ST(2)), (LPARAM) SvIV(ST(1))); else RETVAL = SendMessage(handle, TBM_SETSELEND, 1, (LPARAM) SvIV(ST(1))); --- 674,680 ---- HWND handle CODE: ! if(items > 1) { if(items > 2) ! RETVAL = SendMessage(handle, TBM_SETSELEND, (WPARAM) SvIV(ST(2)), (LPARAM) SvIV(ST(1))); else RETVAL = SendMessage(handle, TBM_SETSELEND, 1, (LPARAM) SvIV(ST(1))); Index: ListView.xs =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/ListView.xs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ListView.xs 16 Mar 2006 08:57:48 -0000 1.11 --- ListView.xs 16 Mar 2006 21:11:11 -0000 1.12 *************** *** 10,35 **** #include "GUI.h" ! typedef struct tagPERLWIN32GUI_NMLVCUSTOMDRAWINFO { ! PERLWIN32GUI_NMCUSTOMDRAW nmcd; ! COLORREF clrText; ! COLORREF clrTextBk; ! #if (_WIN32_IE >= 0x0400) ! int iSubItem; ! #endif ! #if (_WIN32_IE >= 0x560) ! DWORD dwItemType; ! // Item Custom Draw ! COLORREF clrFace; ! int iIconEffect; ! int iIconPhase; ! int iPartId; ! int iStateId: ! // Group Custom Draw ! RECT rcText; ! UINT uAlign; ! #endif ! } PERLWIN32GUI_NMLVCUSTOMDRAW, *LPPERLWIN32GUI_NMLVCUSTOMDRAW; ! ! void ListView_onPreCreate(NOTXSPROC LPPERLWIN32GUI_CREATESTRUCT perlcs) { --- 10,14 ---- #include "GUI.h" ! void ListView_onPreCreate(NOTXSPROC LPPERLWIN32GUI_CREATESTRUCT perlcs) { *************** *** 56,63 **** } else if(strcmp(option, "-imagelist") == 0) { perlcs->hImageList = (HIMAGELIST) handle_From(NOTXSCALL value); ! } else if BitmaskOptionValue("-report", perlcs->cs.style, LVS_REPORT) } else if BitmaskOptionValue("-list", perlcs->cs.style, LVS_LIST) ! } else if BitmaskOptionValue("-singlesel", perlcs->cs.style, LVS_SINGLESEL) } else if BitmaskOptionValue("-showselalways", perlcs->cs.style, LVS_SHOWSELALWAYS) } else if BitmaskOptionValue("-sortascending", perlcs->cs.style, LVS_SORTASCENDING) --- 35,42 ---- } else if(strcmp(option, "-imagelist") == 0) { perlcs->hImageList = (HIMAGELIST) handle_From(NOTXSCALL value); ! } else if BitmaskOptionValue("-report", perlcs->cs.style, LVS_REPORT) } else if BitmaskOptionValue("-list", perlcs->cs.style, LVS_LIST) ! } else if BitmaskOptionValue("-singlesel", perlcs->cs.style, LVS_SINGLESEL) } else if BitmaskOptionValue("-showselalways", perlcs->cs.style, LVS_SHOWSELALWAYS) } else if BitmaskOptionValue("-sortascending", perlcs->cs.style, LVS_SORTASCENDING) *************** *** 94,99 **** ListView_onPostCreate(NOTXSPROC HWND myhandle, LPPERLWIN32GUI_CREATESTRUCT perlcs) { ! // NOTE: Currently nobody sets this dwFlagsMask ! if (perlcs->dwFlags != 0) //dwFlagsMask ListView_SetExtendedListViewStyleEx(myhandle, perlcs->dwFlagsMask, perlcs->dwFlags); --- 73,77 ---- ListView_onPostCreate(NOTXSPROC HWND myhandle, LPPERLWIN32GUI_CREATESTRUCT perlcs) { ! if (perlcs->dwFlagsMask != 0) ListView_SetExtendedListViewStyleEx(myhandle, perlcs->dwFlagsMask, perlcs->dwFlags); *************** *** 104,108 **** if(perlcs->clrBackground != CLR_INVALID) { SendMessage((HWND)myhandle, LVM_SETBKCOLOR, (WPARAM) 0, (LPARAM) perlcs->clrBackground); ! perlcs->clrBackground = CLR_INVALID; // Don't store } } --- 82,86 ---- if(perlcs->clrBackground != CLR_INVALID) { SendMessage((HWND)myhandle, LVM_SETBKCOLOR, (WPARAM) 0, (LPARAM) perlcs->clrBackground); ! perlcs->clrBackground = CLR_INVALID; // Don't store } } *************** *** 121,134 **** else if Parse_Event("EndLabelEdit", PERLWIN32GUI_NEM_CONTROL7) else if Parse_Event("BeginDrag", PERLWIN32GUI_NEM_CONTROL8) - else if Parse_Event("CustomDraw", PERLWIN32GUI_NEM_PAINT) else if Parse_Event("KeyDown", PERLWIN32GUI_NEM_KEYDOWN) else retval = FALSE; - // TODO: - // InsertItem - // ItemActivate - // HotTrack - // DeleteItem - // CustomDraw - should we use the event name Paint here? return retval; --- 99,105 ---- *************** *** 151,158 **** /* * (@)EVENT:BeginDrag(ITEM) ! * Notifies a list-view control that a drag-and-drop operation involving the left mouse * button is being initiated. Passes the item being dragged. * (@)APPLIES_TO:ListView ! */ PerlResult = DoEvent(NOTXSCALL perlud, PERLWIN32GUI_NEM_CONTROL8, "BeginDrag", PERLWIN32GUI_ARGTYPE_LONG, (LONG) lv_notify->iItem,-1); --- 122,129 ---- /* * (@)EVENT:BeginDrag(ITEM) ! * Notifies a list-view control that a drag-and-drop operation involving the left mouse * button is being initiated. Passes the item being dragged. * (@)APPLIES_TO:ListView ! */ PerlResult = DoEvent(NOTXSCALL perlud, PERLWIN32GUI_NEM_CONTROL8, "BeginDrag", PERLWIN32GUI_ARGTYPE_LONG, (LONG) lv_notify->iItem,-1); *************** *** 167,171 **** * CHANGED specifies the item attributes that have changed (LVIF_). * (@)APPLIES_TO:ListView ! */ case LVN_ITEMCHANGING: --- 138,142 ---- * CHANGED specifies the item attributes that have changed (LVIF_). * (@)APPLIES_TO:ListView ! */ case LVN_ITEMCHANGING: *************** *** 185,189 **** break; ! /* * (@)EVENT:ItemChanged(ITEM, NEWSTATE, OLDSTATE, CHANGED) --- 156,160 ---- break; ! /* * (@)EVENT:ItemChanged(ITEM, NEWSTATE, OLDSTATE, CHANGED) *************** *** 234,238 **** // TODO : LVN_DELETEITEM : // TODO : LVN_ITEMACTIVATE ! case LVN_COLUMNCLICK: /* --- 205,209 ---- // TODO : LVN_DELETEITEM : // TODO : LVN_ITEMACTIVATE ! case LVN_COLUMNCLICK: /* *************** *** 256,260 **** * For a ListView to receive this event, -editlabels need to be set to true. * (@)APPLIES_TO:ListView ! */ case LVN_BEGINLABELEDIT: --- 227,231 ---- * For a ListView to receive this event, -editlabels need to be set to true. * (@)APPLIES_TO:ListView ! */ case LVN_BEGINLABELEDIT: *************** *** 270,283 **** break; ! /* * (@)EVENT:EndLabelEdit(ITEM,TEXT) * Sent when the user has finished editing a label in the ListView control. ! * You have explicitly set the text of the item to reflect the new changes. * If the user cancels the edit, the text is undef. * (@)APPLIES_TO:ListView */ ! case LVN_ENDLABELEDIT: pItem = &((LV_DISPINFO*)lParam)->item; --- 241,254 ---- break; ! /* * (@)EVENT:EndLabelEdit(ITEM,TEXT) * Sent when the user has finished editing a label in the ListView control. ! * You have explicitly set the text of the item to reflect the new changes. * If the user cancels the edit, the text is undef. * (@)APPLIES_TO:ListView */ ! case LVN_ENDLABELEDIT: pItem = &((LV_DISPINFO*)lParam)->item; *************** *** 292,304 **** PerlResult = DoEvent(NOTXSCALL perlud, PERLWIN32GUI_NEM_CONTROL7, "EndLabelEdit", PERLWIN32GUI_ARGTYPE_LONG, (LONG) pItem->iItem, ! -1); } ! break; case LVN_KEYDOWN: { /* ! * (@)EVENT:KeyDown(KEY, hwndFrom, idFrom, CODE) * Sent when the user presses a key while the ListView * control has focus; KEY is the ASCII code of the --- 263,276 ---- PerlResult = DoEvent(NOTXSCALL perlud, PERLWIN32GUI_NEM_CONTROL7, "EndLabelEdit", PERLWIN32GUI_ARGTYPE_LONG, (LONG) pItem->iItem, ! -1); } ! break; case LVN_KEYDOWN: { + LV_KEYDOWN FAR * lv_keydown = (LV_KEYDOWN FAR *) lParam; /* ! * (@)EVENT:KeyDown(KEY) * Sent when the user presses a key while the ListView * control has focus; KEY is the ASCII code of the *************** *** 306,385 **** * (@)APPLIES_TO:ListView */ - //FIXME: on ctrl-keys there is a additional param on the stack - LV_KEYDOWN FAR * lv_keydown = (LV_KEYDOWN FAR *) lParam; - NMHDR lv_NMHDR = lv_keydown->hdr; - if (0 && ((LONG) lv_NMHDR.hwndFrom == 16)) { - PerlResult = DoEvent(NOTXSCALL perlud, PERLWIN32GUI_NEM_KEYDOWN, "KeyDown", - PERLWIN32GUI_ARGTYPE_LONG, (HWND) lv_NMHDR.hwndFrom, - PERLWIN32GUI_ARGTYPE_LONG, (LONG) lv_NMHDR.idFrom, - PERLWIN32GUI_ARGTYPE_LONG, (LONG) lv_NMHDR.code, - -1); - } else { PerlResult = DoEvent(NOTXSCALL perlud, PERLWIN32GUI_NEM_KEYDOWN, "KeyDown", PERLWIN32GUI_ARGTYPE_LONG, (LONG) lv_keydown->wVKey, - PERLWIN32GUI_ARGTYPE_LONG, (HWND) lv_NMHDR.hwndFrom, - PERLWIN32GUI_ARGTYPE_LONG, (LONG) lv_NMHDR.idFrom, - PERLWIN32GUI_ARGTYPE_LONG, (LONG) lv_NMHDR.code, -1); - } } break; // TODO : LVN_HOTTRACK - - case NM_CUSTOMDRAW: - { - SV* obj; - HV* hv; - char class_name[] = "Win32::GUI::ListView::CustomDraw"... [truncated message content] |
From: Robert M. <rob...@us...> - 2006-03-16 21:11:16
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32127/t Modified Files: 01_basic.t 98_Pod.t Removed Files: 07_CustomDraw.t Log Message: Reverted this-mornings changes; They will be re-applied in smaller chunks Index: 01_basic.t =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/t/01_basic.t,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** 01_basic.t 16 Mar 2006 08:57:49 -0000 1.4 --- 01_basic.t 16 Mar 2006 21:11:13 -0000 1.5 *************** *** 1,3 **** ! #!perl -w # Win32::GUI test suite. # $Id$ --- 1,3 ---- ! #!perl -wT # Win32::GUI test suite. # $Id$ --- 07_CustomDraw.t DELETED --- Index: 98_Pod.t =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/t/98_Pod.t,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** 98_Pod.t 16 Mar 2006 08:57:49 -0000 1.2 --- 98_Pod.t 16 Mar 2006 21:11:13 -0000 1.3 *************** *** 3,6 **** --- 3,8 ---- # $Id$ + # Testing RichEdit::GetCharFormat() + use strict; use warnings; |