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
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
1
|
2
|
3
|
4
|
5
|
6
|
7
|
8
(1) |
9
|
10
|
11
|
12
|
13
(10) |
14
|
15
|
16
(10) |
17
(3) |
18
(2) |
19
|
20
|
21
|
22
|
23
|
24
|
25
|
26
|
27
|
28
|
29
|
30
(1) |
31
|
|
|
|
From: Robert M. <rob...@us...> - 2006-05-30 18:21:12
|
Update of /cvsroot/perl-win32-gui/Win32-GUI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20384 Modified Files: GUI.pm Log Message: Don't let subclasses of Win32::GUI inherit Win32::GUI::import Index: GUI.pm =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/GUI.pm,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** GUI.pm 18 May 2006 19:40:36 -0000 1.44 --- GUI.pm 30 May 2006 18:20:57 -0000 1.45 *************** *** 47,50 **** --- 47,53 ---- my @imports = @_; + # Don't let this import() get inherited + return unless $pkg eq 'Win32::GUI'; + # use Win32::GUI; currently exports a load of constants for # backwards compatibility with earlier Win32::GUI versions. |
From: Robert M. <rob...@us...> - 2006-05-18 19:40:42
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Constants In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23518/Win32-GUI-Constants Modified Files: Constants.pm Log Message: Fix Win32::GUI::constant() to support old calling method for WIN32__GUI__ constants Index: Constants.pm =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Constants/Constants.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Constants.pm 17 May 2006 22:15:02 -0000 1.3 --- Constants.pm 18 May 2006 19:40:36 -0000 1.4 *************** *** 259,263 **** *{"${callpkg}::$sym"} = \&{"${pkg}::$sym"} if $export; &{"${pkg}::$sym"} if $inline; # force AUTOLOAD ! eval "sub Win32::GUI::$sym();" if $compatibility_win32_gui; } --- 259,263 ---- *{"${callpkg}::$sym"} = \&{"${pkg}::$sym"} if $export; &{"${pkg}::$sym"} if $inline; # force AUTOLOAD ! eval "sub Win32::GUI::$sym();" if $compatibility_win32_gui; } |
From: Robert M. <rob...@us...> - 2006-05-18 19:40:40
|
Update of /cvsroot/perl-win32-gui/Win32-GUI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23518 Modified Files: GUI.pm Log Message: Fix Win32::GUI::constant() to support old calling method for WIN32__GUI__ constants Index: GUI.pm =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/GUI.pm,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** GUI.pm 17 May 2006 21:13:27 -0000 1.43 --- GUI.pm 18 May 2006 19:40:36 -0000 1.44 *************** *** 43,48 **** # The default exports are deprecated, and will be removed in the future sub import { - my ($callpkg, $file, $line) = caller; my $pkg = shift; my @imports = @_; --- 43,48 ---- # The default exports are deprecated, and will be removed in the future sub import { my $pkg = shift; + my $callpkg = caller; my @imports = @_; *************** *** 55,62 **** use warnings; warnings::warnif 'deprecated', ! "use Win32::GUI; is currently exporting constants into ". "the callers scope. This functionality is deprecated. ". ! "Use 'use Win32::GUI();' or list your required exports explicitly instead. ". ! "Used at $file line $line.\n"; @imports = qw(:compatibility_win32_gui); } --- 55,62 ---- use warnings; warnings::warnif 'deprecated', ! "'use Win32::GUI;' is currently exporting constants into ". "the callers scope. This functionality is deprecated. ". ! "Use 'use Win32::GUI();' or list your required exports ". ! "explicitly instead."; @imports = qw(:compatibility_win32_gui); } *************** *** 88,96 **** sub constant { my $constant = shift; - my ($callpkg, $file, $line) = caller; use warnings; warnings::warnif 'deprecated', "Use of Win32::GUI::constant() is deprecated. ". ! "Use Win32::GUI::Constants::constant() instead. ". ! "Used at $file line $line.\n"; require Win32::GUI::Constants; return Win32::GUI::Constants::constant($constant); --- 88,100 ---- sub constant { my $constant = shift; use warnings; + if($constant =~ /^WIN32__GUI__/) { + warnings::warnif 'deprecated', "Use of Win32::GUI::constant() is deprecated. ". + "Use Win32::GUI::_constant() instead for WIN32__GUI__* constants."; + return Win32::GUI::_constant($constant); + } + warnings::warnif 'deprecated', "Use of Win32::GUI::constant() is deprecated. ". ! "Use Win32::GUI::Constants::constant() instead."; require Win32::GUI::Constants; return Win32::GUI::Constants::constant($constant); *************** *** 114,119 **** use warnings; warnings::warnif 'deprecated', ! "Use of '$AUTOLOAD' is deprecated. Use 'Win32::GUI::Constants::$constant' instead. ". ! "Used at $file line $line.\n"; goto &$AUTOLOAD; } --- 118,122 ---- use warnings; warnings::warnif 'deprecated', ! "Use of '$AUTOLOAD' is deprecated. Use 'Win32::GUI::Constants::$constant' instead."; goto &$AUTOLOAD; } |
From: Robert M. <rob...@us...> - 2006-05-17 22:15:10
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Constants In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23602/Win32-GUI-Constants Modified Files: Constants.pm Log Message: Fix for backwards compatibility with CONSTNAME barewords Index: Constants.pm =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Constants/Constants.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Constants.pm 17 May 2006 21:14:54 -0000 1.2 --- Constants.pm 17 May 2006 22:15:02 -0000 1.3 *************** *** 109,112 **** --- 109,113 ---- my $autoload = 0; my $oops = 0; + my $compatibility_win32_gui = 0; =head1 PRAGMATA *************** *** 197,205 **** next; } ! # :compatibility_win32_gui has very special semantics if ! # the calling package is Win32::GUI for backwards compatibility ! if (($spec eq 'compatibility_win32_gui') and (caller eq 'Win32::GUI')) { ! $pkg = 'Win32::GUI'; ! } } elsif ($spec =~ m:^/(.*)/$:){ --- 198,206 ---- next; } ! # :compatibility_win32_gui has very special semantics if ! # the calling package is Win32::GUI for backwards compatibility ! if (($spec eq 'compatibility_win32_gui') and (caller eq 'Win32::GUI')) { ! $compatibility_win32_gui = 1; ! } } elsif ($spec =~ m:^/(.*)/$:){ *************** *** 214,218 **** } ! #XXX warn "Import ".($remove ? "del":"add").": @names " if $Verbose; if ($remove) { --- 215,219 ---- } ! warn "Import ".($remove ? "del":"add").": @names " if $Verbose; if ($remove) { *************** *** 236,241 **** # export @imports to caller's namespace if($Verbose) { ! #XXX my $t = join(", ", sort @imports) . "\n" . scalar(@imports) . " symbols being "; ! my $t = scalar(@imports) . " symbols being "; $t .= "imported into $callpkg from $pkg " if $export; $t .= "and " if $export and $inline; --- 237,241 ---- # export @imports to caller's namespace if($Verbose) { ! my $t = join(", ", sort @imports) . "\n" . scalar(@imports) . " symbols being "; $t .= "imported into $callpkg from $pkg " if $export; $t .= "and " if $export and $inline; *************** *** 259,262 **** --- 259,263 ---- *{"${callpkg}::$sym"} = \&{"${pkg}::$sym"} if $export; &{"${pkg}::$sym"} if $inline; # force AUTOLOAD + eval "sub Win32::GUI::$sym();" if $compatibility_win32_gui; } |
From: Robert M. <rob...@us...> - 2006-05-17 21:14:57
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Constants In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32035/Win32-GUI-Constants Modified Files: Constants.pm Log Message: Fix for backwards compatibility with Win32::GUI::CONSTNAME barewords Index: Constants.pm =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Constants/Constants.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Constants.pm 13 May 2006 15:39:30 -0000 1.1 --- Constants.pm 17 May 2006 21:14:54 -0000 1.2 *************** *** 197,200 **** --- 197,205 ---- next; } + # :compatibility_win32_gui has very special semantics if + # the calling package is Win32::GUI for backwards compatibility + if (($spec eq 'compatibility_win32_gui') and (caller eq 'Win32::GUI')) { + $pkg = 'Win32::GUI'; + } } elsif ($spec =~ m:^/(.*)/$:){ *************** *** 209,213 **** } ! warn "Import ".($remove ? "del":"add").": @names " if $Verbose; if ($remove) { --- 214,218 ---- } ! #XXX warn "Import ".($remove ? "del":"add").": @names " if $Verbose; if ($remove) { *************** *** 231,235 **** # export @imports to caller's namespace if($Verbose) { ! my $t = join(", ", sort @imports) . "\n" . scalar(@imports) . " symbols being "; $t .= "imported into $callpkg from $pkg " if $export; $t .= "and " if $export and $inline; --- 236,241 ---- # export @imports to caller's namespace if($Verbose) { ! #XXX my $t = join(", ", sort @imports) . "\n" . scalar(@imports) . " symbols being "; ! my $t = scalar(@imports) . " symbols being "; $t .= "imported into $callpkg from $pkg " if $export; $t .= "and " if $export and $inline; |
From: Robert M. <rob...@us...> - 2006-05-17 21:13:31
|
Update of /cvsroot/perl-win32-gui/Win32-GUI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31604 Modified Files: GUI.pm Log Message: typo corrected Index: GUI.pm =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/GUI.pm,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** GUI.pm 16 May 2006 18:57:25 -0000 1.42 --- GUI.pm 17 May 2006 21:13:27 -0000 1.43 *************** *** 57,61 **** "use Win32::GUI; is currently exporting constants into ". "the callers scope. This functionality is deprecated. ". ! "Use 'use Win32::GUI();' or list your required exports explicity instead. ". "Used at $file line $line.\n"; @imports = qw(:compatibility_win32_gui); --- 57,61 ---- "use Win32::GUI; is currently exporting constants into ". "the callers scope. This functionality is deprecated. ". ! "Use 'use Win32::GUI();' or list your required exports explicitly instead. ". "Used at $file line $line.\n"; @imports = qw(:compatibility_win32_gui); |
From: Robert M. <rob...@us...> - 2006-05-16 19:18:36
|
Update of /cvsroot/perl-win32-gui/Win32-GUI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8737 Modified Files: CHANGELOG Log Message: added missing comment on new file t\01_constants.t Index: CHANGELOG =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/CHANGELOG,v retrieving revision 1.83 retrieving revision 1.84 diff -C2 -d -r1.83 -r1.84 *** CHANGELOG 16 May 2006 18:57:25 -0000 1.83 --- CHANGELOG 16 May 2006 19:18:30 -0000 1.84 *************** *** 19,22 **** --- 19,23 ---- required removal of unnecessary inheritance on some Win32::GUI::Menu::* classes + - t\01_constants.t new tests that Win32::GUI delegates to Win32::GUI::Constants - samples\* Fix all samples not to warn under new constants support. Fix terrrible resource leaks inDraw.pl and region.pl. |
From: Robert M. <rob...@us...> - 2006-05-16 19:16:24
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7950 Added Files: 02_constants.t Log Message: new tests that Win32::GUI delegates to Win32::GUI::Constants with appropriate warnings --- NEW FILE: 02_constants.t --- #!perl -wT # Win32::GUI test suite. # $Id: 02_constants.t,v 1.1 2006/05/16 19:16:20 robertemay Exp $ # # test coverage of constants. Most of the coverage is provided by the # Win32::GUI::Constants module, here we just want to check that # delegation happens, and warnigs are raised appropriately use strict; use warnings; BEGIN { $| = 1 } # Autoflush use Test::More tests => 14; use Win32::GUI(); # Check warnings from import statements { my $warning; local $SIG{__WARN__} = sub { $warning = $_[0]; }; $warning = ''; eval "use Win32::GUI()"; is($warning, '', "No warning from 'use Win32::GUI()'"); $warning = ''; eval "use Win32::GUI"; like($warning, '/deprecated/i', "Unadorned 'use Win32::GUI' deprecated warning"); $warning = ''; eval "use Win32::GUI 1.03"; like($warning, '/deprecated/i', "Unadorned 'use Win32::GUI 1.03' deprecated warning"); $warning = ''; eval "use Win32::GUI 1.03,''"; is($warning, '', "No warning from 'use Win32::GUI 1.03,'''"); } # Check basic export mechanism ok(!defined &main::CW_USEDEFAULT, "CW_USEDEFAULT not defined in main package"); eval "use Win32::GUI qw(CW_USEDEFAULT)"; ok(!defined &main::CW_USEDEFAULT, "CW_USEDEFAULT still not defined in main package"); is(CW_USEDEFAULT(), 0x80000000, "CW_USEDEFAULT autoloaded"); ok(defined &main::CW_USEDEFAULT, "CW_USEDEFAULT defined in main package after calling it"); # Check warnings from Win32::GUI::constants() { my $warning; local $SIG{__WARN__} = sub { $warning = $_[0]; }; $warning = ''; is(Win32::GUI::constant("CW_USEDEFAULT"), 0x80000000, "Win32::GUI::constant lookup OK"); like($warning, '/deprecated/i', "Win32::GUI::constant() deprecated warning"); } # Check warnings from autoload of Win32::GUI::SOME_CONSTANT { my $warning; local $SIG{__WARN__} = sub { $warning = $_[0]; }; ok(!defined &Win32::GUI::CW_USEDEFAULT, "CW_USEDEFAULT not defined in Win32::GUI package"); $warning = ''; is(Win32::GUI::CW_USEDEFAULT(), 0x80000000, "Win32::GUI constant AUTOLOAD OK"); like($warning, '/deprecated/i', "Win32::GUI constant AUTOLAD deprecated warning"); ok(defined &Win32::GUI::CW_USEDEFAULT, "CW_USEDEFAULT defined in Win32::GUI package after calling it"); } # Check warnings from autoload of Win32::GUI::SOME_CONSTANT |
From: Robert M. <rob...@us...> - 2006-05-16 19:10:52
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/samples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5581/samples Added Files: SPLASH.bmp Log Message: Added bitmap to make SplashScreen sample work --- NEW FILE: SPLASH.bmp --- (This appears to be a binary file; contents omitted.) |
From: Robert M. <rob...@us...> - 2006-05-16 18:57:34
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Constants/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32576/Win32-GUI-Constants/t Modified Files: 52_tags.t 98_pod.t 99_pod_coverage.t Log Message: More Win32::GUI::Constants support Index: 99_pod_coverage.t =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Constants/t/99_pod_coverage.t,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 99_pod_coverage.t 13 May 2006 15:39:30 -0000 1.1 --- 99_pod_coverage.t 16 May 2006 18:57:26 -0000 1.2 *************** *** 13,17 **** 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}; plan tests => 2; --- 13,17 ---- 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::Constants done by core" if $ENV{W32G_CORE}; plan tests => 2; Index: 52_tags.t =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Constants/t/52_tags.t,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 52_tags.t 13 May 2006 15:39:30 -0000 1.1 --- 52_tags.t 16 May 2006 18:57:26 -0000 1.2 *************** *** 158,162 **** LVS_EX_HIDELABELS LVS_EX_SINGLEROW LVS_EX_SNAPTOGRID LVS_EX_SIMPLESELECT LVIS_FOCUSED LVIS_SELECTED LVIS_CUT LVIS_DROPHILITED LVIS_GLOW LVIS_ACTIVATING LVIS_OVERLAYMASK ! LVIS_STATEIMAGEMASK CLR_NONE ) ], mdi => [ qw( ) ], menu => [ --- 158,163 ---- LVS_EX_HIDELABELS LVS_EX_SINGLEROW LVS_EX_SNAPTOGRID LVS_EX_SIMPLESELECT LVIS_FOCUSED LVIS_SELECTED LVIS_CUT LVIS_DROPHILITED LVIS_GLOW LVIS_ACTIVATING LVIS_OVERLAYMASK ! LVIS_STATEIMAGEMASK LVSIL_NORMAL LVSIL_SMALL LVSIL_STATE LVIR_BOUNDS LVIR_ICON ! LVIR_LABEL LVIR_SELECTBOUNDS CLR_NONE ) ], mdi => [ qw( ) ], menu => [ *************** *** 243,247 **** qw( CLR_DEFAULT TVGN_PREVIOUS TVGN_DROPHILITE TVGN_PREVIOUSVISIBLE TVGN_CHILD TVGN_ROOT TVGN_NEXTVISIBLE TVGN_PARENT TVGN_LASTVISIBLE TVGN_FIRSTVISIBLE TVGN_NEXT ! TVGN_CARET ) ], updown => [ qw( ) ], window => [ --- 244,250 ---- qw( CLR_DEFAULT TVGN_PREVIOUS TVGN_DROPHILITE TVGN_PREVIOUSVISIBLE TVGN_CHILD TVGN_ROOT TVGN_NEXTVISIBLE TVGN_PARENT TVGN_LASTVISIBLE TVGN_FIRSTVISIBLE TVGN_NEXT ! TVGN_CARET TVHT_NOWHERE TVHT_ONITEMICON TVHT_ONITEMLABEL TVHT_ONITEM ! TVHT_ONITEMINDENT TVHT_ONITEMBUTTON TVHT_ONITEMRIGHT TVHT_ONITEMSTATEICON ! TVHT_ABOVE TVHT_BELOW TVHT_TORIGHT TVHT_TOLEFT ) ], updown => [ qw( ) ], window => [ Index: 98_pod.t =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Constants/t/98_pod.t,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 98_pod.t 13 May 2006 15:39:30 -0000 1.1 --- 98_pod.t 16 May 2006 18:57:26 -0000 1.2 *************** *** 13,16 **** 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(); --- 13,16 ---- 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::Constants done by core" if $ENV{W32G_CORE}; all_pod_files_ok(); |
From: Robert M. <rob...@us...> - 2006-05-16 18:57:34
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/samples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32576/samples Modified Files: Animation.pl BitmapScroll.pl DateTime.pl Draw.pl EventModel.pl GetOpenFileName.pl MDI.pl MonthCal.pl Notepad.pl NotifyIcon.pl Region.pl SplashScreen.pl listview_drag_drop.pl Log Message: More Win32::GUI::Constants support Index: MDI.pl =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/MDI.pl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MDI.pl 30 Apr 2004 18:05:57 -0000 1.2 --- MDI.pl 16 May 2006 18:57:26 -0000 1.3 *************** *** 1,8 **** ! #! perl # # MDI sample # - use Win32::GUI; use strict; # My child counter for unique name. --- 1,9 ---- ! #! perl -w # # MDI sample # use strict; + use warnings; + use Win32::GUI(); # My child counter for unique name. *************** *** 80,82 **** # TextField take all client aera $self->{Edit}->Resize($width, $height) if exists $self->{Edit}; ! } \ No newline at end of file --- 81,83 ---- # TextField take all client aera $self->{Edit}->Resize($width, $height) if exists $self->{Edit}; ! } Index: Draw.pl =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/Draw.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Draw.pl 2 Oct 2004 12:47:52 -0000 1.1 --- Draw.pl 16 May 2006 18:57:26 -0000 1.2 *************** *** 3,9 **** # Drawing sample # ! use Win32::GUI; ! $Menu = Win32::GUI::MakeMenu( "&Draw" => "&Draw", "> &Dots" => "DrawDots", --- 3,12 ---- # Drawing sample # ! use strict; ! use warnings; ! use Win32::GUI(); ! ! my $Menu = Win32::GUI::MakeMenu( "&Draw" => "&Draw", "> &Dots" => "DrawDots", *************** *** 13,17 **** ); ! $Win = new Win32::GUI::Window( -left => 100, -top => 100, --- 16,20 ---- ); ! my $Win = new Win32::GUI::Window( -left => 100, -top => 100, *************** *** 23,27 **** ); ! $Timer = $Win->AddTimer("Timer1", 1); srand(); --- 26,30 ---- ); ! my $Timer = $Win->AddTimer("Timer1", 1); srand(); *************** *** 75,79 **** --- 78,84 ---- my $bottom; my $P; + my $oldP; my $B; + my $oldB; if($Menu->{DrawDots}->Checked) { *************** *** 93,98 **** [ rand()*255, rand()*255, rand()*255 ] ); ! $DC->SelectObject($P); ! $DC->SelectObject($B); $left = rand()*$W; $top = rand()*$H; --- 98,103 ---- [ rand()*255, rand()*255, rand()*255 ] ); ! $oldP = $DC->SelectObject($P); ! $oldB = $DC->SelectObject($B); $left = rand()*$W; $top = rand()*$H; *************** *** 108,113 **** [ rand()*255, rand()*255, rand()*255 ] ); ! $DC->SelectObject($P); ! $DC->SelectObject($B); $left = rand()*$W; $top = rand()*$H; --- 113,118 ---- [ rand()*255, rand()*255, rand()*255 ] ); ! $oldP = $DC->SelectObject($P); ! $oldB = $DC->SelectObject($B); $left = rand()*$W; $top = rand()*$H; *************** *** 120,124 **** -width => rand()*5, ); ! $DC->SelectObject($P); $DC->BeginPath(); $DC->MoveTo(rand()*$W, rand()*$H); --- 125,129 ---- -width => rand()*5, ); ! $oldP = $DC->SelectObject($P); $DC->BeginPath(); $DC->MoveTo(rand()*$W, rand()*$H); *************** *** 127,132 **** $DC->StrokePath(); } } - - - --- 132,139 ---- $DC->StrokePath(); } + + # put the old brush/pen back, so that the new ones are correctly + # released when their destructors are called + $DC->SelectObject($oldP) if defined $oldP; + $DC->SelectObject($oldB) if defined $oldB; } Index: GetOpenFileName.pl =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/GetOpenFileName.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** GetOpenFileName.pl 17 May 2004 21:23:01 -0000 1.1 --- GetOpenFileName.pl 16 May 2006 18:57:26 -0000 1.2 *************** *** 1,4 **** use strict; ! use Win32::GUI; # This sample demonstrates GetOpenFileName --- 1,6 ---- + #!perl -w use strict; ! use warnings; ! use Win32::GUI(); # This sample demonstrates GetOpenFileName *************** *** 8,11 **** --- 10,14 ---- # single file with graphics file filters + { my ( @file, $file ); my ( @parms ); *************** *** 21,32 **** -title => 'Select a file'; push @parms, -file => $lastfile if $lastfile; ! @file = & Win32::GUI::GetOpenFileName ( @parms ); print "$_\n" for @file; print "index of null:", index( $file[ 0 ], "\0" ), "\n"; print "index of space:", index( $file[ 0 ], " " ), "\n"; ! # allow multiple files, only one filter ! my ( @file, $file ); my ( @parms ); --- 24,35 ---- -title => 'Select a file'; push @parms, -file => $lastfile if $lastfile; ! @file = Win32::GUI::GetOpenFileName ( @parms ); print "$_\n" for @file; print "index of null:", index( $file[ 0 ], "\0" ), "\n"; print "index of space:", index( $file[ 0 ], " " ), "\n"; ! } # allow multiple files, only one filter ! { my ( @file, $file ); my ( @parms ); *************** *** 39,52 **** -title => 'Select a file'; push @parms, -file => $lastfile if $lastfile; ! @file = & Win32::GUI::GetOpenFileName ( @parms ); print "$_\n" for @file; print "index of null:", index( $file[ 0 ], "\0" ), "\n"; print "index of space:", index( $file[ 0 ], " " ), "\n"; ! # old style dialog, multiple file selection enabled, no filters. # User has to type in a filter, to see anything. Always good to have a # filter. But it isn't required.... ! my ( @file, $file ); my ( @parms ); --- 42,55 ---- -title => 'Select a file'; push @parms, -file => $lastfile if $lastfile; ! @file = Win32::GUI::GetOpenFileName ( @parms ); print "$_\n" for @file; print "index of null:", index( $file[ 0 ], "\0" ), "\n"; print "index of space:", index( $file[ 0 ], " " ), "\n"; ! } # old style dialog, multiple file selection enabled, no filters. # User has to type in a filter, to see anything. Always good to have a # filter. But it isn't required.... ! { my ( @file, $file ); my ( @parms ); *************** *** 57,62 **** -title => 'Select a file'; push @parms, -file => $lastfile if $lastfile; ! @file = & Win32::GUI::GetOpenFileName ( @parms ); print "$_\n" for @file; print "index of null:", index( $file[ 0 ], "\0" ), "\n"; print "index of space:", index( $file[ 0 ], " " ), "\n"; --- 60,66 ---- -title => 'Select a file'; push @parms, -file => $lastfile if $lastfile; ! @file = Win32::GUI::GetOpenFileName ( @parms ); print "$_\n" for @file; print "index of null:", index( $file[ 0 ], "\0" ), "\n"; print "index of space:", index( $file[ 0 ], " " ), "\n"; + } Index: NotifyIcon.pl =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/NotifyIcon.pl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NotifyIcon.pl 14 Apr 2006 01:52:28 -0000 1.2 --- NotifyIcon.pl 16 May 2006 18:57:26 -0000 1.3 *************** *** 809,813 **** =item Icon ! Set the system icon that is disaplyed next to the balloon tooltip title. One of: none (no icon), info, warn or error. The icon is not displayed if there is no title. --- 809,813 ---- =item Icon ! Set the system icon that is displyed next to the balloon tooltip title. One of: none (no icon), info, warn or error. The icon is not displayed if there is no title. Index: Region.pl =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/Region.pl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Region.pl 1 May 2004 09:13:19 -0000 1.2 --- Region.pl 16 May 2006 18:57:26 -0000 1.3 *************** *** 1,6 **** #This example uses regions to create clipping areas in an DC. - - use Win32::GUI; use strict; my $regiontype=0; --- 1,10 ---- + #!perl -w #This example uses regions to create clipping areas in an DC. use strict; + use warnings; + + use Win32::GUI 1.03_03, qw( SB_THUMBTRACK SB_LINEDOWN SB_LINEUP + WS_CAPTION WS_SIZEBOX WS_CHILD + WS_CLIPCHILDREN WS_EX_CLIENTEDGE RGN_DIFF); my $regiontype=0; *************** *** 59,63 **** my $H = $ChildWin->ScaleHeight; ! #set the scroll bar range and position based upon the height of the child window. $ChildWin->ScrollRange(0,0,$H); $ChildWin->ScrollPos(0,$H/2); --- 63,68 ---- my $H = $ChildWin->ScaleHeight; ! #set the scroll bar range and position based upon ! #the height of the child window. $ChildWin->ScrollRange(0,0,$H); $ChildWin->ScrollPos(0,$H/2); *************** *** 69,83 **** sub Scroll { ! #scoll handler. ! my($win,$scrollbar, $operation, $position) = @_; ! if($operation == SB_THUMBTRACK) { ! $win->ScrollPos(0,$position); } - elsif($operation == SB_LINEDOWN) { - $win->ScrollPos(0,$win->ScrollPos(0)+1); - } - elsif($operation == SB_LINEUP) { - $win->ScrollPos(0,$win->ScrollPos(0)-1); - } } --- 74,88 ---- sub Scroll { ! #scoll handler. ! my($win,$scrollbar, $operation, $position) = @_; ! if($operation == SB_THUMBTRACK) { ! $win->ScrollPos(0,$position); ! } ! elsif($operation == SB_LINEDOWN) { ! $win->ScrollPos(0,$win->ScrollPos(0)+1); ! } ! elsif($operation == SB_LINEUP) { ! $win->ScrollPos(0,$win->ScrollPos(0)-1); } } *************** *** 87,138 **** my $H = $ChildWin->ScaleHeight; my $DC = $ChildWin->GetDC; ! my ($left,$top,$right,$bottom,$P,$B,$region,$size); ! #We could draw directly to the window, but to remove drawing flicker we ! #create a memory DC and draw to that. Once drawing has been finished, we BitBlt ! #the memory DC direct into the window DC. # ! #For a large amount of GDI drawing, the use of a memory DC can also be quicker. # ! #We create a Compatible DC, and a Compatible Bitmap. To improve performance you would ! #only recreate these objects if the dimentions of the source DC have change. my $DC2=$DC->CreateCompatibleDC(); my $bit=$DC->CreateCompatibleBitmap($W,$H); #Select the bitmap into the new DC ! $DC2->SelectObject($bit); #The size of the region is based upon the scroll bar position ! $size=$ChildWin->ScrollPos(0); if ($regiontype==0) { ! #create a rectangle region ! $region=CreateRectRgn Win32::GUI::Region(0,0,$size,$size); } elsif ($regiontype==1) { ! #create a Elliptic region (in this case a circle) ! $region=CreateEllipticRgn Win32::GUI::Region(0,0,$size,$size); } else { ! $region=CreateRoundRectRgn Win32::GUI::Region(0,0,$size,$size,20,20); } ! #Use the region for clipping for all GDI operations. $DC2->SelectClipRgn($region); for(1..40) { ! #create a randon pen and brush, and select them into the DC ! $P = new Win32::GUI::Pen(-color => [ rand()*255, rand()*255, rand()*255 ], -width => rand()*5); ! $B = new Win32::GUI::Brush([ rand()*255, rand()*255, rand()*255]); ! $DC2->SelectObject($P); ! $DC2->SelectObject($B); ! $left = rand()*$W; ! $top = rand()*$H; ! $right = $left + rand()*($W-$left); ! $bottom = $top + rand()*($H-$top); ! #create a random rectangle ! $DC2->Rectangle($left, $top, $right, $bottom); ! $P = new Win32::GUI::Pen(-color => [ rand()*255, rand()*255, rand()*255 ], -width => rand()*5,); ! $DC2->SelectObject($P); ! #create a random line ! $DC2->Line(rand()*$W,rand()*$H,rand()*$W, rand()*$H ); } #We now update the screen in one action $DC->BitBlt(0, 0, $W,$H,$DC2, 0, 0); ! #We now delete the DC $DC2->DeleteDC(); ! } \ No newline at end of file --- 92,179 ---- my $H = $ChildWin->ScaleHeight; my $DC = $ChildWin->GetDC; ! #We could draw directly to the window, but to remove ! #drawing flicker we create a memory DC and draw to that. ! #Once drawing has been finished, we BitBlt the memory DC ! #direct into the window DC. # ! #For a large amount of GDI drawing, the use of a memory DC ! #can also be quicker. # ! #We create a Compatible DC, and a Compatible Bitmap. To ! #improve performance you would ! #only recreate these objects if the dimentions of the source ! #DC have change. my $DC2=$DC->CreateCompatibleDC(); my $bit=$DC->CreateCompatibleBitmap($W,$H); #Select the bitmap into the new DC ! my $oldbit = $DC2->SelectObject($bit); ! #The size of the region is based upon the scroll bar position ! #Don't allow it to be zero ! my $size=$ChildWin->ScrollPos(0) || 1; ! ! #Create a region ! my $region; if ($regiontype==0) { ! #create a rectangle region ! $region=CreateRectRgn Win32::GUI::Region(0,0,$size,$size); } elsif ($regiontype==1) { ! #create a Elliptic region (in this case a circle) ! $region=CreateEllipticRgn Win32::GUI::Region(0,0,$size,$size); } else { ! #create a rectangle region with rounded corners ! $region=CreateRoundRectRgn Win32::GUI::Region(0,0,$size,$size,20,20); } ! ! #Clear the area outside the region we are painting into: ! my $region2 = CreateRectRgn Win32::GUI::Region(0,0,$W,$H); ! my $region3 = CreateRectRgn Win32::GUI::Region(0,0,$W,$H); ! $region3->CombineRgn($region2,$region,RGN_DIFF); ! $DC2->PaintRgn($region3); ! ! #Use the region for clipping for the rest of the GDI operations. $DC2->SelectClipRgn($region); + for(1..40) { ! #create a randon pen and brush, and select them into the DC ! my $P1 = new Win32::GUI::Pen( ! -color => [ rand()*255, rand()*255, rand()*255 ], ! -width => rand()*5, ! ); ! my $B = new Win32::GUI::Brush([ rand()*255, rand()*255, rand()*255]); ! my $oldP = $DC2->SelectObject($P1); ! my $oldB = $DC2->SelectObject($B); ! my $left = rand()*$W; ! my $top = rand()*$H; ! my $right = $left + rand()*($W-$left); ! my $bottom = $top + rand()*($H-$top); ! #create a random rectangle ! $DC2->Rectangle($left, $top, $right, $bottom); ! ! my $P2 = new Win32::GUI::Pen( ! -color => [ rand()*255, rand()*255, rand()*255 ], ! -width => rand()*5, ! ); ! $DC2->SelectObject($P2); ! #create a random line ! $DC2->Line(rand()*$W,rand()*$H,rand()*$W, rand()*$H ); ! ! #restore the original Pen and Brush so that the new ones ! #are not selected into the DC, and they get destroyed ! #when they go out of scope, otherwise we have a huge ! #resource leak, and quickly stop drawing correctly ! $DC2->SelectObject($oldP); ! $DC2->SelectObject($oldB); } + #We now update the screen in one action $DC->BitBlt(0, 0, $W,$H,$DC2, 0, 0); ! ! #As for the Pen and Brush above, restore the original bitmap ! $DC2->SelectObject($oldbit); ! ! #We now delete the memory DC $DC2->DeleteDC(); ! } Index: Animation.pl =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/Animation.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Animation.pl 2 Oct 2004 12:47:52 -0000 1.1 --- Animation.pl 16 May 2006 18:57:26 -0000 1.2 *************** *** 4,8 **** # use strict; ! use Win32::GUI; # Create your main window --- 4,8 ---- # use strict; ! use Win32::GUI(); # Create your main window *************** *** 40,44 **** ); ! # Add a load button. $Window->AddButton ( -name => "Start", --- 40,44 ---- ); ! # Add a start button. $Window->AddButton ( -name => "Start", *************** *** 49,53 **** ); ! # Add a load button. $Window->AddButton ( -name => "Stop", --- 49,53 ---- ); ! # Add a stop button. $Window->AddButton ( -name => "Stop", Index: Notepad.pl =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/Notepad.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Notepad.pl 31 May 2004 17:41:29 -0000 1.1 --- Notepad.pl 16 May 2006 18:57:26 -0000 1.2 *************** *** 5,9 **** use strict; ! use Win32::GUI; my $CurrentFile = ""; --- 5,11 ---- use strict; ! use warnings; ! use Win32::GUI qw( MB_ICONQUESTION MB_ICONINFORMATION MB_YESNOCANCEL ! MB_OK IDYES IDCANCEL ); my $CurrentFile = ""; Index: EventModel.pl =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/EventModel.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** EventModel.pl 25 Mar 2004 22:46:56 -0000 1.1 --- EventModel.pl 16 May 2006 18:57:26 -0000 1.2 *************** *** 2,6 **** # # This sample show different event model availlabnle in Win32::GUI ! # - OEM (Old Event Model) : Call a function venet based on control name and event name # - NEM (Nem Event Model) : Associate a sub event for a control. # It present how to use both event model for a control. --- 2,6 ---- # # This sample show different event model availlabnle in Win32::GUI ! # - OEM (Old Event Model) : Call a function evnet based on control name and event name # - NEM (Nem Event Model) : Associate a sub event for a control. # It present how to use both event model for a control. *************** *** 11,18 **** # use strict; ! use Win32::GUI; # Load a cursor bitmap ! my $C = new Win32::GUI::Bitmap("harrow.cur", 2); # Register a BUTTON class with cursor --- 11,21 ---- # use strict; ! use warnings; ! ! use Win32::GUI qw(BS_NOTIFY); ! use FindBin(); # Load a cursor bitmap ! my $C = new Win32::GUI::Bitmap("$FindBin::Dir/harrow.cur", 2); # Register a BUTTON class with cursor *************** *** 183,185 **** sub BOTH_MouseMove { print "BOTH_MouseMouve using OEM !!!\n"; ! } \ No newline at end of file --- 186,188 ---- sub BOTH_MouseMove { print "BOTH_MouseMouve using OEM !!!\n"; ! } Index: MonthCal.pl =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/MonthCal.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MonthCal.pl 8 May 2004 17:31:22 -0000 1.1 --- MonthCal.pl 16 May 2006 18:57:26 -0000 1.2 *************** *** 4,8 **** # use strict; ! use Win32::GUI; # main Window --- 4,9 ---- # use strict; ! use warnings; ! use Win32::GUI(); # main Window Index: SplashScreen.pl =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/SplashScreen.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SplashScreen.pl 15 Nov 2004 10:48:58 -0000 1.1 --- SplashScreen.pl 16 May 2006 18:57:26 -0000 1.2 *************** *** 1,17 **** ! use Win32::GUI; use strict; - my ($width,$height); - my $mainwin; - #try to load the splash bitmap from the exe that is running my $splashimage= new Win32::GUI::Bitmap('SPLASH'); unless ($splashimage) { ! #bitmap is not in exe, load from file ! $splashimage= new Win32::GUI::Bitmap('SPLASH.bmp'); ! die 'could not find splash bitmap' unless $splashimage; ! #get the dimensions of the bitmap ! ($width,$height) = $splashimage->Info(); ! } #create the splash window --- 1,26 ---- ! #!perl -w ! ! # Demonstrate how to do a Splash Screen for your application ! # Original code by Jeremy White, modified by Robert May ! # Note that the package Win32::GUI::SplashScreen, available ! # from CPAN and from http://www.robmay.me.uk/win32gui/ can ! # do all this and more for you ! use strict; + use warnings; + use FindBin(); + use Win32::GUI qw( WS_POPUP WS_CAPTION WS_THICKFRAME WS_EX_TOPMOST ); #try to load the splash bitmap from the exe that is running my $splashimage= new Win32::GUI::Bitmap('SPLASH'); + unless ($splashimage) { ! #bitmap is not in exe, load from file ! $splashimage= new Win32::GUI::Bitmap("$FindBin::Dir/SPLASH.bmp"); ! } ! ! die 'could not find splash bitmap' unless $splashimage; ! #get the dimensions of the bitmap ! my ($width,$height) = $splashimage->Info(); #create the splash window *************** *** 37,70 **** -bitmap => $splashimage, ); - $bitmap->SetImage( $splashimage ); #center the splash and show it ! $splash->Center; $splash->Show(); #call do events - not Dialog - this will display the window and let us #build the rest of the application. ! Win32::GUI::DoEvents; ! #A good way of building your application is to keep everything in packages, and eval those ! #into scope in this phase. In this case, we'll create the main window and sleep to simulate ! #some work. ! my $string = q ` ! $mainwin = new Win32::GUI::Window ( ! -name => "Main", ! -text => "Main window", ! -height => 400, ! -width => 400, ! ); ! sleep(2); ! $mainwin->Center(); ! $mainwin->Show(); ! `; ! #eval the code and report any errors ! eval $string; ! if ($@) { ! my $message = $@; ! Win32::GUI::MessageBox($splash, $message ,"Build Error", MB_OK | MB_ICONWARNING); ! } ! #hide the splash and enter the Dialog phase $splash->Hide; ! Win32::GUI::Dialog(); \ No newline at end of file --- 46,76 ---- -bitmap => $splashimage, ); #center the splash and show it ! $splash->Center(); $splash->Show(); #call do events - not Dialog - this will display the window and let us #build the rest of the application. ! Win32::GUI::DoEvents(); ! #In this case, we'll create the main window and ! #sleep to simulate doing some work. ! my $mainwin = new Win32::GUI::Window ( ! -name => "Main", ! -text => "Main window", ! -height => 400, ! -width => 500, ! ); ! $mainwin->Center(); ! ! sleep(2); ! ! #Show the main window ... ! $mainwin->Show(); ! Win32::GUI::DoEvents(); ! ! sleep(1); ! ! # ... hide the splash and enter the Dialog phase $splash->Hide; ! Win32::GUI::Dialog(); Index: listview_drag_drop.pl =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/listview_drag_drop.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** listview_drag_drop.pl 3 Aug 2005 21:45:59 -0000 1.1 --- listview_drag_drop.pl 16 May 2006 18:57:26 -0000 1.2 *************** *** 8,12 **** use warnings; ! use Win32::GUI 1.02; use Win32::GUI::BitmapInline (); --- 8,17 ---- use warnings; ! use Win32::GUI 1.03_03, qw(TPM_LEFTALIGN TPM_TOPALIGN TPM_RIGHTBUTTON ! ILC_COLOR ILC_COLOR24 ILC_MASK ! WM_CONTEXTMENU CW_USEDEFAULT ! LVS_ICON LVS_REPORT LVS_SMALLICON LVS_LIST ! LVIR_SELECTBOUNDS LVSIL_SMALL); ! use Win32::GUI::BitmapInline (); *************** *** 24,55 **** ###################################################################### - # Some Useful Constants - # This style for defining constants is more compatible with older - # versions of Perl than 'use constant', and still gets inlined. - - # ImageList Create - sub ILC_COLOR() {0}; - sub ILC_COLOR24() {24}; - sub ILC_MASK() {1}; - - # Window Message - sub WM_CONTEXTMENU() {123}; - - # Create Window - sub CW_USEDEFAULT() {0x80000000}; - - # ListView Styles - sub LVS_ICON() {0}; - sub LVS_REPORT() {1}; - sub LVS_SMALLICON() {2}; - sub LVS_LIST() {3}; - - # ListView Image Rect - sub LVIR_SELECTBOUNDS() {3}; - - # ListView Set Image List - sub LVSIL_SMALL() {1}; - - ###################################################################### # Cursor for use when dragging my $curDrag = newCursor Win32::GUI::BitmapInline( q( --- 29,32 ---- Index: DateTime.pl =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/DateTime.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DateTime.pl 2 Oct 2004 12:47:52 -0000 1.1 --- DateTime.pl 16 May 2006 18:57:26 -0000 1.2 *************** *** 4,8 **** # use strict; ! use Win32::GUI; # main Window --- 4,10 ---- # use strict; ! use warnings; ! ! use Win32::GUI(); # main Window Index: BitmapScroll.pl =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/samples/BitmapScroll.pl,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** BitmapScroll.pl 1 Oct 2004 02:43:29 -0000 1.5 --- BitmapScroll.pl 16 May 2006 18:57:26 -0000 1.6 *************** *** 2,8 **** #a hooked event to paint to the window directly, rather than using a Graphic #Control. - - use Win32::GUI; use strict; #create a new class which stops the WM_ERASEBKGND message from erasing the background --- 2,11 ---- #a hooked event to paint to the window directly, rather than using a Graphic #Control. use strict; + use warnings; + + use Win32::GUI qw(WS_CLIPCHILDREN WS_CAPTION WS_SIZEBOX + WS_CHILD WS_EX_CLIENTEDGE + SB_ENDSCROLL SB_THUMBPOSITION); #create a new class which stops the WM_ERASEBKGND message from erasing the background |
From: Robert M. <rob...@us...> - 2006-05-16 18:57:32
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32576/t Modified Files: 01_basic.t 02_window.t 03_button.t 04_cov.t 05_AcceleratorTable.t 05_Menu.t 05_Timer_01_OEM.t 05_Timer_02_NEM.t 05_Timer_03_Interval.t 05_Timer_04_Kill.t 05_Timer_05_DESTROY.t 06_Cursor.t 06_Icon.t 50_Font_GetMetrics.t 50_Richedit_GetCharFormat.t Log Message: More Win32::GUI::Constants support Index: 05_Timer_04_Kill.t =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/t/05_Timer_04_Kill.t,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 05_Timer_04_Kill.t 13 Nov 2005 18:57:52 -0000 1.1 --- 05_Timer_04_Kill.t 16 May 2006 18:57:26 -0000 1.2 *************** *** 12,16 **** use Test::More tests => 19; ! use Win32::GUI; my $ctrl = "Timer"; --- 12,16 ---- use Test::More tests => 19; ! use Win32::GUI(); my $ctrl = "Timer"; Index: 03_button.t =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/t/03_button.t,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** 03_button.t 3 Aug 2005 21:46:00 -0000 1.2 --- 03_button.t 16 May 2006 18:57:26 -0000 1.3 *************** *** 12,16 **** use Test::More tests => 19; ! use Win32::GUI; can_ok("Win32::GUI::Window", qw(AddButton)); --- 12,16 ---- use Test::More tests => 19; ! use Win32::GUI(); can_ok("Win32::GUI::Window", qw(AddButton)); Index: 05_Timer_01_OEM.t =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/t/05_Timer_01_OEM.t,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** 05_Timer_01_OEM.t 21 Nov 2005 22:33:34 -0000 1.2 --- 05_Timer_01_OEM.t 16 May 2006 18:57:26 -0000 1.3 *************** *** 12,16 **** use Test::More tests => 14; ! use Win32::GUI; my $ctrl = "Timer"; --- 12,16 ---- use Test::More tests => 14; ! use Win32::GUI(); my $ctrl = "Timer"; Index: 50_Font_GetMetrics.t =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/t/50_Font_GetMetrics.t,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 50_Font_GetMetrics.t 3 Aug 2005 21:46:00 -0000 1.1 --- 50_Font_GetMetrics.t 16 May 2006 18:57:26 -0000 1.2 *************** *** 10,14 **** use Test::More tests => 7; ! use Win32::GUI; my %font_metrics; --- 10,14 ---- use Test::More tests => 7; ! use Win32::GUI(); my %font_metrics; Index: 02_window.t =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/t/02_window.t,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** 02_window.t 3 Aug 2005 21:46:00 -0000 1.2 --- 02_window.t 16 May 2006 18:57:26 -0000 1.3 *************** *** 13,17 **** use Test::More tests => 16; ! use Win32::GUI; # check that the methods we want to use are available --- 13,17 ---- use Test::More tests => 16; ! use Win32::GUI(); # check that the methods we want to use are available Index: 06_Cursor.t =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/t/06_Cursor.t,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 06_Cursor.t 3 Aug 2005 21:46:00 -0000 1.1 --- 06_Cursor.t 16 May 2006 18:57:26 -0000 1.2 *************** *** 12,16 **** use Test::More tests => 1; ! use Win32::GUI; my $filename = "hsplit.cur"; --- 12,16 ---- use Test::More tests => 1; ! use Win32::GUI(); my $filename = "hsplit.cur"; Index: 04_cov.t =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/t/04_cov.t,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** 04_cov.t 16 Mar 2006 23:14:32 -0000 1.2 --- 04_cov.t 16 May 2006 18:57:26 -0000 1.3 *************** *** 12,16 **** use Test::More qw(no_plan); ! use Win32::GUI; my @ControlsAdd = --- 12,16 ---- use Test::More qw(no_plan); ! use Win32::GUI(); my @ControlsAdd = Index: 05_AcceleratorTable.t =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/t/05_AcceleratorTable.t,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 05_AcceleratorTable.t 3 Aug 2005 21:46:00 -0000 1.1 --- 05_AcceleratorTable.t 16 May 2006 18:57:26 -0000 1.2 *************** *** 12,16 **** use Test::More tests => 4; ! use Win32::GUI; my $W = new Win32::GUI::Window( --- 12,16 ---- use Test::More tests => 4; ! use Win32::GUI(); my $W = new Win32::GUI::Window( Index: 06_Icon.t =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/t/06_Icon.t,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 06_Icon.t 3 Aug 2005 21:46:00 -0000 1.1 --- 06_Icon.t 16 May 2006 18:57:26 -0000 1.2 *************** *** 12,16 **** use Test::More tests => 1; ! use Win32::GUI; my $filename = "guiperl.ico"; --- 12,16 ---- use Test::More tests => 1; ! use Win32::GUI(); my $filename = "guiperl.ico"; Index: 05_Timer_02_NEM.t =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/t/05_Timer_02_NEM.t,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** 05_Timer_02_NEM.t 21 Nov 2005 22:33:34 -0000 1.2 --- 05_Timer_02_NEM.t 16 May 2006 18:57:26 -0000 1.3 *************** *** 12,16 **** use Test::More tests => 16; ! use Win32::GUI; my $ctrl = "Timer"; --- 12,16 ---- use Test::More tests => 16; ! use Win32::GUI(); my $ctrl = "Timer"; Index: 50_Richedit_GetCharFormat.t =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/t/50_Richedit_GetCharFormat.t,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 50_Richedit_GetCharFormat.t 3 Aug 2005 21:46:00 -0000 1.1 --- 50_Richedit_GetCharFormat.t 16 May 2006 18:57:26 -0000 1.2 *************** *** 12,16 **** use Test::More tests => 16; ! use Win32::GUI; my %font; --- 12,16 ---- use Test::More tests => 16; ! use Win32::GUI(); my %font; Index: 05_Timer_03_Interval.t =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/t/05_Timer_03_Interval.t,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** 05_Timer_03_Interval.t 21 Nov 2005 22:33:34 -0000 1.2 --- 05_Timer_03_Interval.t 16 May 2006 18:57:26 -0000 1.3 *************** *** 12,16 **** use Test::More tests => 11; ! use Win32::GUI; my $ctrl = "Timer"; --- 12,16 ---- use Test::More tests => 11; ! use Win32::GUI(); my $ctrl = "Timer"; Index: 05_Menu.t =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/t/05_Menu.t,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 05_Menu.t 3 Aug 2005 21:46:00 -0000 1.1 --- 05_Menu.t 16 May 2006 18:57:26 -0000 1.2 *************** *** 12,16 **** use Test::More tests => 4; ! use Win32::GUI; my $ctrl = "Menu"; --- 12,16 ---- use Test::More tests => 4; ! use Win32::GUI(); my $ctrl = "Menu"; Index: 01_basic.t =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/t/01_basic.t,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** 01_basic.t 16 Mar 2006 21:11:13 -0000 1.5 --- 01_basic.t 16 May 2006 18:57:26 -0000 1.6 *************** *** 38,42 **** # Check that Win32::GUI loads, and bail out of all # tests if it doesn't ! use_ok('Win32::GUI') or print STDOUT "Bail out! Can't load Win32::GUI"; ok(defined $Win32::GUI::VERSION, "Win32::GUI version check"); --- 38,46 ---- # Check that Win32::GUI loads, and bail out of all # tests if it doesn't ! eval "use Win32::GUI()"; ! if($@) { ! print STDOUT "Bail out! Can't load Win32::GUI"; ! } ! pass("Win32::GUI loaded OK"); ok(defined $Win32::GUI::VERSION, "Win32::GUI version check"); Index: 05_Timer_05_DESTROY.t =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/t/05_Timer_05_DESTROY.t,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 05_Timer_05_DESTROY.t 13 Nov 2005 18:57:52 -0000 1.1 --- 05_Timer_05_DESTROY.t 16 May 2006 18:57:26 -0000 1.2 *************** *** 12,16 **** use Test::More tests => 11; ! use Win32::GUI; my $ctrl = "Timer"; --- 12,16 ---- use Test::More tests => 11; ! use Win32::GUI(); my $ctrl = "Timer"; |
From: Robert M. <rob...@us...> - 2006-05-16 18:57:32
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-DropFiles/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32576/Win32-GUI-DropFiles/t Modified Files: 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 Log Message: More Win32::GUI::Constants support Index: 04_GetDroppedFiles.t =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-DropFiles/t/04_GetDroppedFiles.t,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 04_GetDroppedFiles.t 25 Apr 2006 21:38:19 -0000 1.1 --- 04_GetDroppedFiles.t 16 May 2006 18:57:26 -0000 1.2 *************** *** 26,30 **** use DropTest; ! use Win32::GUI 1.03_02; use Win32::GUI::DropFiles; --- 26,30 ---- use DropTest; ! use Win32::GUI 1.03_02,''; use Win32::GUI::DropFiles; Index: 10_Unicode.t =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-DropFiles/t/10_Unicode.t,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 10_Unicode.t 25 Apr 2006 21:38:19 -0000 1.1 --- 10_Unicode.t 16 May 2006 18:57:26 -0000 1.2 *************** *** 29,33 **** use DropTest; ! use Win32::GUI 1.03_02; use Win32::GUI::DropFiles; --- 29,33 ---- use DropTest; ! use Win32::GUI 1.03_02,''; use Win32::GUI::DropFiles; Index: 03_new_callback.t =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-DropFiles/t/03_new_callback.t,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 03_new_callback.t 25 Apr 2006 21:38:19 -0000 1.1 --- 03_new_callback.t 16 May 2006 18:57:26 -0000 1.2 *************** *** 32,36 **** use DropTest; ! use Win32::GUI 1.03_02; use Win32::GUI::DropFiles; --- 32,36 ---- use DropTest; ! use Win32::GUI 1.03_02,''; use Win32::GUI::DropFiles; Index: 07_DragQueryFile.t =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-DropFiles/t/07_DragQueryFile.t,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 07_DragQueryFile.t 25 Apr 2006 21:38:19 -0000 1.1 --- 07_DragQueryFile.t 16 May 2006 18:57:26 -0000 1.2 *************** *** 27,31 **** use DropTest; ! use Win32::GUI 1.03_02; use Win32::GUI::DropFiles; --- 27,31 ---- use DropTest; ! use Win32::GUI 1.03_02,''; use Win32::GUI::DropFiles; Index: 08_DragQueryPoint.t =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-DropFiles/t/08_DragQueryPoint.t,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 08_DragQueryPoint.t 25 Apr 2006 21:38:19 -0000 1.1 --- 08_DragQueryPoint.t 16 May 2006 18:57:26 -0000 1.2 *************** *** 25,29 **** use DropTest; ! use Win32::GUI 1.03_02; use Win32::GUI::DropFiles; --- 25,29 ---- use DropTest; ! use Win32::GUI 1.03_02,''; use Win32::GUI::DropFiles; Index: 05_GetDroppedFile.t =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-DropFiles/t/05_GetDroppedFile.t,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 05_GetDroppedFile.t 25 Apr 2006 21:38:19 -0000 1.1 --- 05_GetDroppedFile.t 16 May 2006 18:57:26 -0000 1.2 *************** *** 27,31 **** use DropTest; ! use Win32::GUI 1.03_02; use Win32::GUI::DropFiles; --- 27,31 ---- use DropTest; ! use Win32::GUI 1.03_02,''; use Win32::GUI::DropFiles; Index: 02_old_callback.t =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-DropFiles/t/02_old_callback.t,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 02_old_callback.t 25 Apr 2006 21:38:19 -0000 1.1 --- 02_old_callback.t 16 May 2006 18:57:26 -0000 1.2 *************** *** 37,41 **** use DropTest; ! use Win32::GUI 1.03_02; my $dropobj = DropTest->new(); --- 37,41 ---- use DropTest; ! use Win32::GUI 1.03_02,''; my $dropobj = DropTest->new(); Index: 09_DragFinish.t =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-DropFiles/t/09_DragFinish.t,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 09_DragFinish.t 25 Apr 2006 21:38:19 -0000 1.1 --- 09_DragFinish.t 16 May 2006 18:57:26 -0000 1.2 *************** *** 27,31 **** use DropTest; ! use Win32::GUI 1.03_02; use Win32::GUI::DropFiles; --- 27,31 ---- use DropTest; ! use Win32::GUI 1.03_02,''; use Win32::GUI::DropFiles; Index: 06_GetDropPos.t =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-DropFiles/t/06_GetDropPos.t,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 06_GetDropPos.t 25 Apr 2006 21:38:19 -0000 1.1 --- 06_GetDropPos.t 16 May 2006 18:57:26 -0000 1.2 *************** *** 25,29 **** use DropTest; ! use Win32::GUI 1.03_02; use Win32::GUI::DropFiles; --- 25,29 ---- use DropTest; ! use Win32::GUI 1.03_02,''; use Win32::GUI::DropFiles; |
From: Robert M. <rob...@us...> - 2006-05-16 18:57:32
|
Update of /cvsroot/perl-win32-gui/Win32-GUI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32576 Modified Files: CHANGELOG GUI.pm GUI.xs Makefile.PL Removed Files: GUI_Constants.cpp Log Message: More Win32::GUI::Constants support Index: GUI.xs =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/GUI.xs,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** GUI.xs 20 Apr 2006 22:20:20 -0000 1.56 --- GUI.xs 16 May 2006 18:57:25 -0000 1.57 *************** *** 30,40 **** ########################################################################## ! # (@)INTERNAL:constant(NAME, ARG) DWORD ! constant(name,arg) char *name - int arg CODE: ! RETVAL = constant(NOTXSCALL name, arg); OUTPUT: RETVAL --- 30,102 ---- ########################################################################## ! # (@)INTERNAL:_constant(NAME) DWORD ! _constant(name) char *name CODE: ! if (strEQ(name, "WIN32__GUI__WINDOW")) ! RETVAL = WIN32__GUI__WINDOW; ! else if (strEQ(name, "WIN32__GUI__DIALOG")) ! RETVAL = WIN32__GUI__DIALOG; ! else if (strEQ(name, "WIN32__GUI__STATIC")) ! RETVAL = WIN32__GUI__STATIC; ! else if (strEQ(name, "WIN32__GUI__BUTTON")) ! RETVAL = WIN32__GUI__BUTTON; ! else if (strEQ(name, "WIN32__GUI__EDIT")) ! RETVAL = WIN32__GUI__EDIT; ! else if (strEQ(name, "WIN32__GUI__LISTBOX")) ! RETVAL = WIN32__GUI__LISTBOX; ! else if (strEQ(name, "WIN32__GUI__COMBOBOX")) ! RETVAL = WIN32__GUI__COMBOBOX; ! else if (strEQ(name, "WIN32__GUI__CHECKBOX")) ! RETVAL = WIN32__GUI__CHECKBOX; ! else if (strEQ(name, "WIN32__GUI__RADIOBUTTON")) ! RETVAL = WIN32__GUI__RADIOBUTTON; ! else if (strEQ(name, "WIN32__GUI__TOOLBAR")) ! RETVAL = WIN32__GUI__TOOLBAR; ! else if (strEQ(name, "WIN32__GUI__PROGRESS")) ! RETVAL = WIN32__GUI__PROGRESS; ! else if (strEQ(name, "WIN32__GUI__STATUS")) ! RETVAL = WIN32__GUI__STATUS; ! else if (strEQ(name, "WIN32__GUI__TAB")) ! RETVAL = WIN32__GUI__TAB; ! else if (strEQ(name, "WIN32__GUI__RICHEDIT")) ! RETVAL = WIN32__GUI__RICHEDIT; ! else if (strEQ(name, "WIN32__GUI__LISTVIEW")) ! RETVAL = WIN32__GUI__LISTVIEW; ! else if (strEQ(name, "WIN32__GUI__TREEVIEW")) ! RETVAL = WIN32__GUI__TREEVIEW; ! else if (strEQ(name, "WIN32__GUI__TRACKBAR")) ! RETVAL = WIN32__GUI__TRACKBAR; ! else if (strEQ(name, "WIN32__GUI__UPDOWN")) ! RETVAL = WIN32__GUI__UPDOWN; ! else if (strEQ(name, "WIN32__GUI__TOOLTIP")) ! RETVAL = WIN32__GUI__TOOLTIP; ! else if (strEQ(name, "WIN32__GUI__ANIMATION")) ! RETVAL = WIN32__GUI__ANIMATION; ! else if (strEQ(name, "WIN32__GUI__REBAR")) ! RETVAL = WIN32__GUI__REBAR; ! else if (strEQ(name, "WIN32__GUI__HEADER")) ! RETVAL = WIN32__GUI__HEADER; ! else if (strEQ(name, "WIN32__GUI__COMBOBOXEX")) ! RETVAL = WIN32__GUI__COMBOBOXEX; ! else if (strEQ(name, "WIN32__GUI__DTPICK")) ! RETVAL = WIN32__GUI__DTPICK; ! else if (strEQ(name, "WIN32__GUI__GRAPHIC")) ! RETVAL = WIN32__GUI__GRAPHIC; ! else if (strEQ(name, "WIN32__GUI__GROUPBOX")) ! RETVAL = WIN32__GUI__GROUPBOX; ! else if (strEQ(name, "WIN32__GUI__SPLITTER")) ! RETVAL = WIN32__GUI__SPLITTER; ! else if (strEQ(name, "WIN32__GUI__MDIFRAME")) ! RETVAL = WIN32__GUI__MDIFRAME; ! else if (strEQ(name, "WIN32__GUI__MDICLIENT")) ! RETVAL = WIN32__GUI__MDICLIENT; ! else if (strEQ(name, "WIN32__GUI__MDICHILD")) ! RETVAL = WIN32__GUI__MDICHILD; ! else if (strEQ(name, "WIN32__GUI__MONTHCAL")) ! RETVAL = WIN32__GUI__MONTHCAL; ! else ! RETVAL = 0xFFFFFFFF; OUTPUT: RETVAL Index: CHANGELOG =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/CHANGELOG,v retrieving revision 1.82 retrieving revision 1.83 diff -C2 -d -r1.82 -r1.83 *** CHANGELOG 13 May 2006 15:39:30 -0000 1.82 --- CHANGELOG 16 May 2006 18:57:25 -0000 1.83 *************** *** 6,9 **** --- 6,34 ---- Win32-GUI ChangeLog =================== + + [Robert May] : 16 May 2006 - More Win32::GUI::Constants + --- Win32::GUI core --- + - GUI_constants.cpp removed + - Makefile.PL remove GUI_Constants.cpp + - GUI.xs change constants() to _constants and support only + the Win32__GUI__ constants here + - GUI.pm remove EXPORTER and @EXPORT_OK, replace with import() + that delegates to Win32::GUI::Constants. Fix AUTOLOAD() to + delegate to Win32::GUI::Constants. Introduce + Win32::GUI::constant() that delegates to Win32::GUI::Constants + for backwards compatibility. Changes to Win32::GUI::AUTOLOAD() + required removal of unnecessary inheritance on some + Win32::GUI::Menu::* classes + - samples\* Fix all samples not to warn under new constants + support. Fix terrrible resource leaks inDraw.pl and region.pl. + use $FindBin::Dir where we use local files, so that they are + found even if the samples directory is not the working directory. + Add SPLASH.bmp so that the SplashScreen example does something. + - up version to 1.03_03 + --- Win32::GUI::Constants --- + - Constants.PL add more constants: LVSIL_, LVIR_, THT_ + - Tags.pm add new constants to suitable tags + - t\* fix tests not to warn under new constants support. Minor + typo corrections, add new constants to 52_tags.t + + [Robert May] : 13 May 2006 - Add Win32::GUI::Constants - add Win32-GUI-Constants directory and new files Index: Makefile.PL =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Makefile.PL,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Makefile.PL 25 Apr 2006 21:24:52 -0000 1.20 --- Makefile.PL 16 May 2006 18:57:25 -0000 1.21 *************** *** 175,179 **** my @c_files = qw( GUI - GUI_Constants GUI_Events GUI_Helpers --- 175,178 ---- Index: GUI.pm =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/GUI.pm,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** GUI.pm 14 Apr 2006 01:52:25 -0000 1.41 --- GUI.pm 16 May 2006 18:57:25 -0000 1.42 *************** *** 5,11 **** # 29 Jan 1997 by Aldo Calpini <da...@pe...> # ! # Version: 1.02 (10 July 2005) ! # ! # Copyright (c) 1997..2005 Aldo Calpini. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. --- 5,9 ---- # 29 Jan 1997 by Aldo Calpini <da...@pe...> # [...998 lines suppressed...] ! return Win32::GUI->_new(Win32::GUI::_constant("WIN32__GUI__GRAPHIC"), @_); } *************** *** 2533,2537 **** # package Win32::GUI::MenuButton; - @ISA = qw(Win32::GUI); ########################################################################### --- 2200,2203 ---- *************** *** 2579,2583 **** # package Win32::GUI::MenuItem; - @ISA = qw(Win32::GUI); ########################################################################### --- 2245,2248 ---- --- GUI_Constants.cpp DELETED --- |
From: Robert M. <rob...@us...> - 2006-05-16 18:57:31
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Constants In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32576/Win32-GUI-Constants Modified Files: Constants.PL Tags.pm Log Message: More Win32::GUI::Constants support Index: Constants.PL =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Constants/Constants.PL,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Constants.PL 13 May 2006 15:39:30 -0000 1.1 --- Constants.PL 16 May 2006 18:57:26 -0000 1.2 *************** *** 1070,1073 **** --- 1070,1084 ---- LVIS_STATEIMAGEMASK 0xF000 + # Listview ?? + LVSIL_NORMAL 0 + LVSIL_SMALL 1 + LVSIL_STATE 2 + + # Listview ?? + LVIR_BOUNDS 0 + LVIR_ICON 1 + LVIR_LABEL 2 + LVIR_SELECTBOUNDS 3 + # LoadResource() constants LR_DEFAULTCOLOR 0x0000 *************** *** 1694,1697 **** --- 1705,1722 ---- TVGN_LASTVISIBLE 0x000A + # Treeview hit test regions + TVHT_NOWHERE 0x0001 + TVHT_ONITEMICON 0x0002 + TVHT_ONITEMLABEL 0x0004 + TVHT_ONITEM 0x0046 # (TVHT_ONITEMICON | TVHT_ONITEMLABEL | TVHT_ONITEMSTATEICON) + TVHT_ONITEMINDENT 0x0008 + TVHT_ONITEMBUTTON 0x0010 + TVHT_ONITEMRIGHT 0x0020 + TVHT_ONITEMSTATEICON 0x0040 + TVHT_ABOVE 0x0100 + TVHT_BELOW 0x0200 + TVHT_TORIGHT 0x0400 + TVHT_TOLEFT 0x0800 + # Virtual Keys VK_LBUTTON 0x01 Index: Tags.pm =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Constants/Tags.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Tags.pm 13 May 2006 15:39:30 -0000 1.1 --- Tags.pm 16 May 2006 18:57:26 -0000 1.2 *************** *** 96,100 **** label => [ qw( ^IMAGE_ ) ], listbox => [ qw( ^LBS_ ) ], ! listview => [ qw( ^LVS_ ^LVIS_ ^CLR_NONE$ ) ], mdi => [ qw() ], menu => [ qw( ^MF_ ^SC_ ^TPM_ ) ], --- 96,100 ---- label => [ qw( ^IMAGE_ ) ], listbox => [ qw( ^LBS_ ) ], ! listview => [ qw( ^LVS_ ^LVIS_ ^LVIR_ ^LVSIL_ ^CLR_NONE$ ) ], mdi => [ qw() ], menu => [ qw( ^MF_ ^SC_ ^TPM_ ) ], *************** *** 116,120 **** ^OPAQUE$ ^HINST_COMMCTRL$ ^IBD_ ) ], tooltip => [ qw() ], ! treeview => [ qw( ^CLR_DEFAULT$ ^TVGN_ ) ], updown => [ qw() ], window => [ qw( ^DS_ ^ID.[^_]+ ^MA_ ^MK_ ^NM_ ^RDW_ ^SIZE_ ^SW_ ^WA_ ^WM_ --- 116,120 ---- ^OPAQUE$ ^HINST_COMMCTRL$ ^IBD_ ) ], tooltip => [ qw() ], ! treeview => [ qw( ^CLR_DEFAULT$ ^TVGN_ ^TVHT_ ) ], updown => [ qw() ], window => [ qw( ^DS_ ^ID.[^_]+ ^MA_ ^MK_ ^NM_ ^RDW_ ^SIZE_ ^SW_ ^WA_ ^WM_ |
From: Robert M. <rob...@us...> - 2006-05-16 18:36:19
|
Update of /cvsroot/perl-win32-gui/Win32-GUI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24162 Modified Files: GUI_Helpers.cpp Log Message: Change GetDC to GetDCEx in DrawSplitter to fix problem drawing splitter over windows that would normally be clipped from the DC obtained by GetDC. Index: GUI_Helpers.cpp =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/GUI_Helpers.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** GUI_Helpers.cpp 13 Apr 2006 22:17:07 -0000 1.18 --- GUI_Helpers.cpp 16 May 2006 18:36:11 -0000 1.19 *************** *** 607,611 **** hbr = CreatePatternBrush(hbm); ! hdc = GetDC(hwnd); SetBrushOrgEx(hdc, x, y, NULL); --- 607,615 ---- hbr = CreatePatternBrush(hbm); ! /* get a DC on which we can draw, even if the ! * class has CS_CLIPCHILDREN or the window ! * has WS_CLIPCHILDREN ! */ ! hdc = GetDCEx(hwnd, NULL, DCX_PARENTCLIP); SetBrushOrgEx(hdc, x, y, NULL); |
From: Robert M. <rob...@us...> - 2006-05-13 15:39:35
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Constants In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23641/Win32-GUI-Constants Added Files: Constants.PL Constants.pm Constants.xs ConstantsRC.PL Makefile.PL Tags.pm ppport.h Log Message: Add Win32-GUI-Constants directory and module code --- NEW FILE: Makefile.PL --- #!perl -w use strict; use warnings; # Makefile.PL for Win32::GUI::Constants # $Id: Makefile.PL,v 1.1 2006/05/13 15:39:30 robertemay Exp $ use 5.006; use Config; use ExtUtils::MakeMaker; my %config = ( NAME => 'Win32::GUI::Constants', VERSION_FROM => 'Constants.pm', ABSTRACT_FROM => 'Constants.pm', AUTHOR => 'Robert May <rob...@us...>', PM => {'Constants.pm' => '$(INST_LIBDIR)/Constants.pm', 'Tags.pm' => '$(INST_LIBDIR)/$(BASEEXT)/Tags.pm', }, PL_FILES => {'ConstantsRC.PL' => '$(BASEEXT).rc', 'Constants.PL' => [ 'constants.src', 'constants.h', 't/70_values.def', 'phash.inc'], }, OBJECT => '$(BASEEXT)$(OBJ_EXT) $(BASEEXT).res', macro => {RC => 'rc.exe', RCFLAGS => '', INST_DEMODIR => '$(INST_LIB)/Win32/GUI/demos/$(BASEEXT)', DEMOS => 'demos/ConstantsDemo.pl' }, clean => {FILES => '*.rc *.res constants.src constants.h t/70_values.def phash.inc phash.def', }, depend => {'Constants.c' => 'constants.h phash.def phash.inc', }, ); # 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'; } WriteMakefile(%config); package MY; # Add rule for .rc to .res conversion # Add rules to install demo scripts # Add rules to make the perfect hash code (phash.inc) sub postamble { return <<'__POSTAMBLE'; # Win32::GUI::Constansts RC section .rc.res: $(RC) $(RCFLAGS) $< # Win32::GUI::Constansts demo script section 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 # Win32::GUI::Constansts perfect hash section phash.def :: subdirs phash.def :: constants.src hash\perfect.exe < constants.src __POSTAMBLE } --- NEW FILE: ConstantsRC.PL --- #!perl -w use strict; use warnings; use ExtUtils::MakeMaker; # $Id: ConstantsRC.PL,v 1.1 2006/05/13 15:39:30 robertemay Exp $ # perl script to produce the RC file for # Win32::GUI::Constants: create Resource # file with a VERSIONINFO section # The variables: my %info = ( Version => MM->parse_version('Constants.pm'), Dllname => 'Constants.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::Constants, part of the perl Win32::GUI module." VALUE "CompanyName" , "perl-win32-gui.sourceforge.net" VALUE "FileDescription" , "Win32::GUI::Constants 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: 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: Constants.pm --- package Win32::GUI::Constants; # $Id: Constants.pm,v 1.1 2006/05/13 15:39:30 robertemay Exp $ # Win32::GUI::Constants, part of the Win32::GUI package # (c) Robert May, 2005..2006 # released under the same terms as Perl. use 5.006; use strict; use warnings; use warnings::register; =head1 NAME Win32::GUI::Constants - exporter for Win32 API constants =cut our $VERSION = '0.01'; require XSLoader; XSLoader::load('Win32::GUI::Constants', $VERSION); our ($Verbose, $AUTOLOAD); =head1 SYNOPSIS use Win32:GUI::Constants; or use Win32:GUI::Constants (); or use Win32::GUI::Constansts [@pragmata,] [@symbols]; Win32::GUI::Constants is a module that provides definitions and export capabilities for Win32 API constant values. There is access to more than 1600 Win32 API constants. Nothing is exported by default. =head1 EXPORT SYNTAX Win32::GUI::Constants provides its own 'import' funcion for performance reasons, but follows the L<Exporter|Exporter> module's definition for the syntax, with some additional pragmata to control the export behaviour. =head2 Standard Syntax =over 4 =item C<use Win32::GUI::Constants;> This imports all the default symbols into your namespace. Currently there are no default symbols. =item C<use Win32::GUI::Constants ();> This loads the module without importing any symbols. =item C<use Win32::GUI::Constants qw(...);> This imports only the symbols listed into your namespace. An error occurs if you try to import a symbol that does not exist. The advanced export features are accessed like this, but with list entries that are syntactically distinct from symbol names. =back =head2 Advanced Syntax If any of the entries in an import list begins with !, : or / then the list is treated as a series of specifications which either add to or delete from the list of names to import. They are processed left to right. Specifications are in the form: [!]name This name only [!]:tag All names in class 'tag' [!]/pattern/ All names which match pattern A leading ! indicates that matching names should be deleted from the list of names to import. Remember that most patterns (using //) will need to be anchored with a leading ^, e.g., C</^TPM_/> rather than C</TPM/>. You can say C<BEGIN { $Win32::GUI::Constants::Verbose=1 }> before your C<use Win32::GUI::Constants qw( ... );> line to see how the specifications are being processed and what is actually being imported into your namespace. If any of the entries in an import begins with a - then the entry is treated as a pragma that affects the way in which the exporting is performed. =cut # We're only exporting our own subroutines, write our own import function, simplifying # Exporter::Heavy::heavy_export. This implementation can only export subroutines, and # export list must not pre-pend '&' to the subroutine names. sub import { my $pkg = shift; my $callpkg = caller; my @imports; my $inline = 0; my $export = 1; my $autoload = 0; my $oops = 0; =head1 PRAGMATA The following pragmata ae provided to affect the behaviour of the export capabilities of Win32::GUI::Constants. =over =item B<-inline> Causes the constant subroutine body to be generated at compile time. This sacrifices some compile time speed for the ability for the constants that are listed to be inlined by the compiler, which gains some runtime speed. =item B<-noexport> The same behaviour as B<-inline>, except that the constants that are listed are not exported, and so must be used by their fully qualified package names. (e.g. C<Win32::GUI::Constants::CW_USEDEFAULT>) =item -B<exportpkg>, I<pkgname> Causes exported symbols to be exported to the I<pkgname> namespace, rather than to the caller's namespace. I<pkgname> must appear as the next item in the list. Omitting I<pkgname> from the list is likely to cause behaviour that is difficult to understand. =item B<-autoload> Causes Win32::GUI::Constants' AUTOLOAD subroutine to be exported, making all non-exported constants available in that namespace. =back =head1 EXPORT TAGS See the L<Win32::GUI::Constants::Tags|Win32::GUI::Constants::Tags> documentation for available tag classes. Use of :tag export definitions adds some overhead both in terms of compile-time speed and memory usage. =cut # detect and remove our pragmas from the import list, and do # version checking: my $setpkg = 0; foreach (@_) { # Always expect the export package name immediately after # the -exportpkg pragma $callpkg=$_,$setpkg=0, next if $setpkg; $inline=1, next if /^-inline$/; # Always inline if not exporting, otherwise -noexport does nothing $export=0, $inline=1, next if /^-noexport$/; $setpkg=1, next if /^-exportpkg$/; $autoload=1, next if /^-autoload$/; # warn if we see an unrecognised pragma ++$oops, warnings::warn qq("$_" is not a recognised pragma), next if /^-/; $pkg->VERSION($_), next if /^\d/; # inherit from UNIVERSAL push @imports, $_; } if(@imports) { # expand @imports, if necessary if (grep m{^[/!:]}, @imports) { my %imports; # negated first item implies starting with default set: # our default is empty, so don't add anything #unshift @imports, ':DEFAULT' if $imports[0] =~ m/^!/; foreach my $spec (@imports) { my @names; my $remove = $spec =~ s/^!//; if ($spec =~ s/^://){ # Only require Tags module if we need it require Win32::GUI::Constants::Tags; if(my $namesref = Win32::GUI::Constants::Tags::tag($spec)){ @names = @$namesref; } else { warnings::warn qq(tag ":$spec" is not defined by $pkg); ++$oops; next; } } elsif ($spec =~ m:^/(.*)/$:){ my $patn = $1; # If we expect to see lots of these, then we # may want to store the reference rather than # calling _export_ok() each time @names = grep(/$patn/, @{_export_ok()}); # not anchored by default } else { @names = ($spec); # is a normal symbol name } warn "Import ".($remove ? "del":"add").": @names " if $Verbose; if ($remove) { foreach my $sym (@names) { delete $imports{$sym} } } else { @imports{@names} = (1) x @names; } } @imports = keys %imports; } } # If we did # use Win32::GUI::Constants 0.01, ''; # I.e. a version check with no imports, then imports contains a single entry with value '' if( @imports == 1 and $imports[0] eq '' ) { @imports = (); } # export @imports to caller's namespace if($Verbose) { my $t = join(", ", sort @imports) . "\n" . scalar(@imports) . " symbols being "; $t .= "imported into $callpkg from $pkg " if $export; $t .= "and " if $export and $inline; $t .= "prepared for inlining " if $inline; warn $t; } { no strict 'refs'; # Single loop with statement modifiers is faster than 2 loops, # unless both $export and $inline are false. That doesn't # happen my @export_ok = @{_export_ok()}; foreach my $sym (@imports) { #check that $sym can be exported, and croak if not. if(not grep /^$sym$/, @export_ok) { warnings::warn qq("$sym" is not exported by $pkg); ++$oops; next; } *{"${callpkg}::$sym"} = \&{"${pkg}::$sym"} if $export; &{"${pkg}::$sym"} if $inline; # force AUTOLOAD } *{"${callpkg}::AUTOLOAD"} = \&{"${pkg}::AUTOLOAD"} if $autoload; } if($oops) { # only require Carp if we need it require Carp; Carp::croak qq(Can't continue after import errors); } } sub AUTOLOAD { my $constant = $AUTOLOAD; $constant =~ s/.*:://; my $val = constant($constant); if(defined $val) { { no warnings; # avoid perl 5.6 warning about prototype mismatches eval "sub $AUTOLOAD() {$val}"; } goto &$AUTOLOAD; } #TODO: use Carp? Change to 'Constant $constant is not found by Win32::GUI::Constants' warnings::warnif("AUTOLOAD failed to find '$constant'"); return undef; } 1; # End of Constants.pm __END__ =head1 FUNCTIONS =head2 constant my $value = Win32::GUI::Constants::constant('SOME_CONST'); The C<constant()> function may be used to perform the lookup of a string constant identifier to its numeric value. This has the advantage of not resulting in any memory overhead due to created symbol table entries, at the expense of speed, as the lookup must be performed every time this function is called. Returns the constant's numeric value on success, undef on failure. =head1 REQUIRES No prerequsites other than perl core modules (strict, warnings, warnings::register, Carp). Win32::GUI::Constants may be useful to other Win32::* packages. =head1 SEE ALSO MSDN L<http://msdn.microsoft.com> and individual api documentation for more information on constants required for any particular call. 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 BUGS No all constants are covered. If you find missing constants please raise a feature support at L<http://sourceforge.net/tracker/?group_id=16572&atid=366572> =head1 AUTHORS Robert May, E<lt>rob...@us...E<gt> =head1 ACKNOWLEDGEMENTS Many thanks to the Win32::GUI developers at L<http://perl-win32-gui.sourceforge.net/> for suggestions and assistance. =head1 COPYRIGHT & LICENSE Copyright 2005..2006 Robert May, All Rights Reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut --- NEW FILE: Constants.PL --- #!perl -w # Script to create the Win32::GUI::Constants # definitions # # Creates constants.src, used as input to perfect.exe # Creates constants.h, defining all the values for sub-optimal # sets of system header files # Creates t\70_values.def testing all values # Creates phash.inc, the hash source code # # (c) Robert May 2005, 2006 # # $Id: Constants.PL,v 1.1 2006/05/13 15:39:30 robertemay Exp $ use strict; use warnings; use File::Basename; [...2140 lines suppressed...] WS_EX_WINDOWEDGE 0x00000100 WS_EX_CLIENTEDGE 0x00000200 WS_EX_CONTEXTHELP 0x00000400 WS_EX_RIGHT 0x00001000 WS_EX_LEFT 0x00000000 WS_EX_RTLREADING 0x00002000 WS_EX_LTRREADING 0x00000000 WS_EX_LEFTSCROLLBAR 0x00004000 WS_EX_RIGHTSCROLLBAR 0x00000000 WS_EX_CONTROLPARENT 0x00010000 WS_EX_STATICEDGE 0x00020000 WS_EX_APPWINDOW 0x00040000 WS_EX_OVERLAPPEDWINDOW 0x00000300 # (WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE) WS_EX_PALETTEWINDOW 0x00000188 # (WS_EX_WINDOWEDGE | WS_EX_TOOLWINDOW | WS_EX_TOPMOST) WS_EX_LAYERED 0x00080000 WS_EX_NOINHERITLAYOUT 0x00100000 WS_EX_LAYOUTRTL 0x00400000 WS_EX_COMPOSITED 0x02000000 WS_EX_NOACTIVATE 0x08000000 --- NEW FILE: Constants.xs --- /* $Id: Constants.xs,v 1.1 2006/05/13 15:39:30 robertemay Exp $ * Copyright (c) Robert May 2006 * * Code for the Minimal Perfect Hash algorithm from * http://burtleburtle.net/bob/hash/perfect.html, * modified by Robert May. */ #define _WIN32_IE 0x0501 #define _WIN32_WINNT 0x0501 #define WINVER 0x0501 #include "EXTERN.h" #include "perl.h" #include "XSUB.h" #include "ppport.h" /* Headers to define all the constants that * we want */ #include <windows.h> #include <richedit.h> #include <commctrl.h> #include <shlobj.h> #include "constants.h" /* Perfect Hash implementation for Win32::GUI::Constants */ #include "phash.inc" MODULE = Win32::GUI::Constants PACKAGE = Win32::GUI::Constants PROTOTYPES: ENABLE ########################################################################## # (@)METHOD:constant(key) # Looks up string constant C<key> to its numeric value # See Constants.pm for full documentation void constant(c) SV* c PREINIT: ULONG hash; STRLEN len; LPSTR key; PPCODE: key = SvPV(c,len); hash = phash(key,len); if(hash < PHASHNKEYS) { const LPSTR str = stringpool + const_table[hash].offset; if(*key == *str && !strncmp(key+1, str+1, len-1) && str[len] == '\0') { if(const_table[hash].flags & F_UV) { XSRETURN_UV((UV)const_table[hash].value); } else { XSRETURN_IV((IV)const_table[hash].value); } } } errno = EINVAL; SetLastError(ERROR_INVALID_PARAMETER); XSRETURN_UNDEF; //error - not found ########################################################################## # (@)INTERNAL:_export_ok() # Return an array ref to an array of all possible constants. # Array consists of readonly PV's that point into # our string table: this avoids copying the strings, which # saves memory and is over 3 times faster than the obvious: # INIT: # int i; # AV *list = newAV() # CODE: # for(i=0; i < PHASHNKEYS; ++i) { # av_push(list, newSVpv((stringpool + const_table[i].offset),0); # } # RETVAL = newRV_noinc((SV *)list); # OUTPUT: # RETVAL SV* _export_ok() INIT: int i; AV *list = newAV(); av_extend(list, PHASHNKEYS-1); CODE: for(i=0; i < PHASHNKEYS; ++i) { SV *sv; LPSTR s = (stringpool + const_table[i].offset); sv = newSV(0); /* create new SV */ sv_upgrade(sv, SVt_PV); /* upgrade to PV */ SvPV_set(sv, s); /* set PV string pointer to point into our string table */ SvCUR_set(sv, strlen(s)); /* set the string length in the PV */ SvLEN_set(sv, 0); /* set the allocated length to 0 to prevent perl trying to free it */ SvREADONLY_on(sv); /* set the readonly flag */ SvPOK_on(sv); /* There's a vaild string pointer in the PV */ av_store(list, i, sv); /* store the SV in the array */ } RETVAL = newRV_noinc((SV *)list); /* return an RV referencing the array */ OUTPUT: RETVAL --- NEW FILE: Tags.pm --- package Win32::GUI::Constants::Tags; # $Id: Tags.pm,v 1.1 2006/05/13 15:39:30 robertemay Exp $ use strict; use warnings; # On one line so MakeMaker will see it. require Win32::GUI::Constants; our $VERSION = $Win32::GUI::Constants::VERSION; use AutoLoader 'AUTOLOAD'; =head1 NAME Win32::GUI::Constants::Tags - export :tag definitions for Win32::GUI::Constants =head1 SYNOPSIS use Win32::GUI::Constants qw ( :tag ... ); Win32::GUI::Constants::Tags provide export :tag definitions for use with Win32::GUI::Constants. It is seperated into a seperate module to improve the speed and memory usage of Win32::GUI::Constants if no :tag symbols are used on the import line. =head1 EXPORT TAGS The following tags are defined for use with Win32::GUI::Constants: =head2 General Export Tags =over =item B<:common> A somewhat subjective list of commonly used constants. =item B<:customdraw> Constants related to custom draw handling. =item B<:stockobjects> Constants defining the system objects that can be created with GetStockObject(). =item B<:compatibility_win32_gui> All constants exported by default by Win32::GUI up to v1.03. Note that this is a large list. =item B<:all> All defined constants. Note that this is a very large list. =back =head2 Package Specific Export Tags The following list of export tags is defined, each exporting constant that may be useful with the related Win32::GUI package(s). Note that some currently export nothing. :accelerator, :animation, :bitmap, :brush, :button, :class, :combobox, :cursor, :datetime, :dc, :font, :header, :icon, :imagelist, :label, :listbox, :listview, :mdi, :menu, :monthcal, :notifyicon, :pen, :progressbar, :rebar, :region, :richedit, :scrollbar, :slider, :splitter, :statusbar, :tabstrip, :textfield, :timer, :toolbar, :tooltip, :treeview, :updown, :window =cut # tag spec's # keys are tags, values are array ref containg regex patterns of # constants to match. If value is undef, then the definition will # be the return value of a subroutine named tag_spec(). These # subroutines are defined after the __END__ token in this file, and processed # by AutoSplit and AutoLoader. our %TAG_SPECS = ( common => [ qw( ^CW_USEDEFAULT$ ) ], customdraw => [ qw( ^CDDS_ ^CDRF_ ) ], stockobjects=> undef, all => [ qw( .* ) ], compatibility_win32_gui => undef, accelerator => [ qw( ^VK_ ) ], animation => [ qw( ^ACS_ ) ], bitmap => [ qw() ], brush => [ qw() ], button => undef, class => [ qw( ^COLOR_ ^CS_ ) ], combobox => [ qw( ^CBS_ ^CBES_ ) ], cursor => [ qw( ^IDC_ ) ], datetime => [ qw( ^DTS_ ) ], dc => undef, font => [ qw() ], header => [ qw( ^HDS_ ) ], icon => [ qw( ^IDI_ ) ], imagelist => [ qw( ^ILC_ ^ILD_ ^ILS_ ^CLR_NONE$ ^CLR_DEFAULT$ ^IMAGE_ ) ], label => [ qw( ^IMAGE_ ) ], listbox => [ qw( ^LBS_ ) ], listview => [ qw( ^LVS_ ^LVIS_ ^CLR_NONE$ ) ], mdi => [ qw() ], menu => [ qw( ^MF_ ^SC_ ^TPM_ ) ], monthcal => [ qw( ^MCS_ ^MCSC_ ) ], notifyicon => [ qw() ], pen => [ qw( ^PS_ ) ], progressbar => [ qw( ^CLR_DEFAULT$ ) ], rebar => [ qw( ^CLR_DEFAULT$ ^RBBS_ ) ], region => [ qw( ^RGN_ ) ], richedit => [ qw( ^CP_ ^EM_ ^ENM_ ^ES_ ^GT_ ^SF_ ^SFF_ ) ], scrollbar => [ qw( ^SB_ ) ], slider => [ qw( ^TBTS_ ) ], splitter => [ qw() ], statusbar => [ qw( ^CLR_DEFAULT$ ^SBT_ ) ], tabstrip => [ qw() ], textfield => [ qw( ^EM_ ^ES_ ) ], timer => [ qw() ], toolbar => [ qw( ^BTNS_ ^TBSTATE_ ^TBSTYLE_ ^I_ ^CLR_DEFAULT$ ^TRANSPARENT$ ^OPAQUE$ ^HINST_COMMCTRL$ ^IBD_ ) ], tooltip => [ qw() ], treeview => [ qw( ^CLR_DEFAULT$ ^TVGN_ ) ], updown => [ qw() ], window => [ qw( ^DS_ ^ID.[^_]+ ^MA_ ^MK_ ^NM_ ^RDW_ ^SIZE_ ^SW_ ^WA_ ^WM_ ^WS_ ) ], ); # tag() returns a reference to a list of constant names, # or undef if the tag passed has no definition sub tag { my $spec = shift; if(exists $TAG_SPECS{$spec}) { my $patterns; if(defined($TAG_SPECS{$spec})) { $patterns = $TAG_SPECS{$spec}; } else { no strict 'refs'; $patterns = &{"tag_$spec"}; } my @names = (); my @syms = @{Win32::GUI::Constants::_export_ok()}; foreach my $patn (@$patterns) { push @names, grep(/$patn/, @syms); } return \@names; } return undef; } 1; #End of Tags.pm =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 BUGS No all constants are covered. If you find missing constants please raise a feature support at L<http://sourceforge.net/tracker/?group_id=16572&atid=366572> =head1 AUTHORS Robert May, E<lt>rob...@us...E<gt> =head1 ACKNOWLEDGEMENTS Many thanks to the Win32::GUI developers at L<http://perl-win32-gui.sourceforge.net/> for suggestions and assistance. =head1 COPYRIGHT & LICENSE Copyright 2005..2006 Robert May, All Rights Reserved. =cut #AutoLoaded subs go after the __END__ token # each sub here is the name of a tag, and returns an array ref # to a list of patterns to match __END__ sub tag_stockobjects() { [ qw( ^WHITE_BRUSH$ ^LTGRAY_BRUSH$ ^GRAY_BRUSH$ ^DKGRAY_BRUSH$ ^BLACK_BRUSH$ ^NULL_BRUSH$ ^HOLLOW_BRUSH$ ^WHITE_PEN$ ^BLACK_PEN$ ^NULL_PEN$ ^OEM_FIXED_FONT$ ^ANSI_FIXED_FONT$ ^ANSI_VAR_FONT$ ^SYSTEM_FONT$ ^DEVICE_DEFAULT_FONT$ ^DEFAULT_PALETTE$ ^SYSTEM_FIXED_FONT$ ^DEFAULT_GUI_FONT$ ^DC_BRUSH$ ^DC_PEN$ ) ] } sub tag_button() { [ qw( ^BS_PUSHBUTTON$ ^BS_DEFPUSHBUTTON$ ^BS_CHECKBOX$ ^BS_AUTOCHECKBOX$ ^BS_RADIOBUTTON$ ^BS_3STATE$ ^BS_AUTO3STATE$ ^BS_GROUPBOX$ ^BS_USERBUTTON$ ^BS_AUTORADIOBUTTON$ ^BS_PUSHBOX$ ^BS_OWNERDRAW$ ^BS_TYPEMASK$ ^BS_LEFTTEXT$ ^BS_TEXT$ ^BS_ICON$ ^BS_BITMAP$ ^BS_LEFT$ ^BS_RIGHT$ ^BS_CENTER$ ^BS_TOP$ ^BS_BOTTOM$ ^BS_VCENTER$ ^BS_PUSHLIKE$ ^BS_MULTILINE$ ^BS_NOTIFY$ ^BS_FLAT$ ^BS_RIGHTBUTTON$ ^IMAGE_ ) ] } sub tag_dc() { [ qw( ^OPAQUE$ ^TRANSPARENT$ ^BDR_ ^EDGE_ ^BF_ ^CLR_INVALID$ ^HWND_DESKTOP$ ^DFC_ ^DFCS_ ^DT_ ^FLOODFILL ^OBJ_ ^R2_ ^SRCCOPY$ ^SRCPAINT$ ^SRCAND$ ^SRCINVERT$ ^SRCERASE$ ^NOTSRCCOPY$ ^NOTSRCERASE$ ^MERGECOPY$ ^MERGEPAINT$ ^PATCOPY$ ^PATPAINT$ ^PATINVERT$ ^DSTINVERT$ ^BLACKNESS$ ^WHITENESS$ ^NOMIRRORBITMAP$ ^CAPTUREBLT$ ^ERROR$ ^NULLREGION$ ^SIMPLEREGION$ ^COMPLEXREGION$ ^RGN_ ^BS_SOLID$ ^BS_NULL$ ^BS_HOLLOW$ ^BS_HATCHED$ ^BS_PATTERN$ ^BS_INDEXED$ ^BS_DIBPATTERN$ ^BS_DIBPATTERNPT$ ^BS_PATTERN8X8$ ^BS_DIBPATTERN8X8$ ^BS_MONOPATTERN$ ^HS_ ^PS_ ^BLACKONWHITE$ ^WHITEONBLACK$ ^COLORONCOLOR$ ^HALFTONE$ ^STRETCH_ ) ] } sub tag_compatibility_win32_gui() { [ qw( ^BS_3STATE$ ^BS_AUTO3STATE$ ^BS_AUTOCHECKBOX$ ^BS_AUTORADIOBUTTON$ ^BS_CHECKBOX$ ^BS_DEFPUSHBUTTON$ ^BS_GROUPBOX$ ^BS_LEFTTEXT$ ^BS_NOTIFY$ ^BS_OWNERDRAW$ ^BS_PUSHBUTTON$ ^BS_RADIOBUTTON$ ^BS_USERBUTTON$ ^BS_BITMAP$ ^BS_BOTTOM$ ^BS_CENTER$ ^BS_ICON$ ^BS_LEFT$ ^BS_MULTILINE$ ^BS_RIGHT$ ^BS_RIGHTBUTTON$ ^BS_TEXT$ ^BS_TOP$ ^BS_VCENTER$ ^COLOR_3DFACE$ ^COLOR_ACTIVEBORDER$ ^COLOR_ACTIVECAPTION$ ^COLOR_APPWORKSPACE$ ^COLOR_BACKGROUND$ ^COLOR_BTNFACE$ ^COLOR_BTNSHADOW$ ^COLOR_BTNTEXT$ ^COLOR_CAPTIONTEXT$ ^COLOR_GRAYTEXT$ ^COLOR_HIGHLIGHT$ ^COLOR_HIGHLIGHTTEXT$ ^COLOR_INACTIVEBORDER$ ^COLOR_INACTIVECAPTION$ ^COLOR_MENU$ ^COLOR_MENUTEXT$ ^COLOR_SCROLLBAR$ ^COLOR_WINDOW$ ^COLOR_WINDOWFRAME$ ^COLOR_WINDOWTEXT$ ^DS_3DLOOK$ ^DS_ABSALIGN$ ^DS_CENTER$ ^DS_CENTERMOUSE$ ^DS_CONTEXTHELP$ ^DS_CONTROL$ ^DS_FIXEDSYS$ ^DS_LOCALEDIT$ ^DS_MODALFRAME$ ^DS_NOFAILCREATE$ ^DS_NOIDLEMSG$ ^DS_SETFONT$ ^DS_SETFOREGROUND$ ^DS_SYSMODAL$ ^DTS_UPDOWN$ ^DTS_SHOWNONE$ ^DTS_SHORTDATEFORMAT$ ^DTS_LONGDATEFORMAT$ ^DTS_TIMEFORMAT$ ^DTS_APPCANPARSE$ ^DTS_RIGHTALIGN$ ^ES_AUTOHSCROLL$ ^ES_AUTOVSCROLL$ ^ES_CENTER$ ^ES_LEFT$ ^ES_LOWERCASE$ ^ES_MULTILINE$ ^ES_NOHIDESEL$ ^ES_NUMBER$ ^ES_OEMCONVERT$ ^ES_PASSWORD$ ^ES_READONLY$ ^ES_RIGHT$ ^ES_UPPERCASE$ ^ES_WANTRETURN$ ^GW_CHILD$ ^GW_HWNDFIRST$ ^GW_HWNDLAST$ ^GW_HWNDNEXT$ ^GW_HWNDPREV$ ^GW_OWNER$ ^IMAGE_BITMAP$ ^IMAGE_CURSOR$ ^IMAGE_ICON$ ^IDABORT$ ^IDCANCEL$ ^IDIGNORE$ ^IDNO$ ^IDOK$ ^IDRETRY$ ^IDYES$ ^LR_DEFAULTCOLOR$ ^LR_MONOCHROME$ ^LR_COLOR$ ^LR_COPYRETURNORG$ ^LR_COPYDELETEORG$ ^LR_LOADFROMFILE$ ^LR_LOADTRANSPARENT$ ^LR_DEFAULTSIZE$ ^LR_LOADMAP3DCOLORS$ ^LR_CREATEDIBSECTION$ ^LR_COPYFROMRESOURCE$ ^LR_SHARED$ ^MB_ABORTRETRYIGNORE$ ^MB_OK$ ^MB_OKCANCEL$ ^MB_RETRYCANCEL$ ^MB_YESNO$ ^MB_YESNOCANCEL$ ^MB_ICONEXCLAMATION$ ^MB_ICONWARNING$ ^MB_ICONINFORMATION$ ^MB_ICONASTERISK$ ^MB_ICONQUESTION$ ^MB_ICONSTOP$ ^MB_ICONERROR$ ^MB_ICONHAND$ ^MB_DEFBUTTON1$ ^MB_DEFBUTTON2$ ^MB_DEFBUTTON3$ ^MB_DEFBUTTON4$ ^MB_APPLMODAL$ ^MB_SYSTEMMODAL$ ^MB_TASKMODAL$ ^MB_DEFAULT_DESKTOP_ONLY$ ^MB_HELP$ ^MB_RIGHT$ ^MB_RTLREADING$ ^MB_SETFOREGROUND$ ^MB_TOPMOST$ ^MB_SERVICE_NOTIFICATION$ ^MB_SERVICE_NOTIFICATION_NT3X$ ^MF_STRING$ ^MF_POPUP$ ^RBBS_BREAK$ ^RBBS_CHILDEDGE$ ^RBBS_FIXEDBMP$ ^RBBS_FIXEDSIZE$ ^RBBS_GRIPPERALWAYS$ ^RBBS_HIDDEN$ ^RBBS_NOGRIPPER$ ^RBBS_NOVERT$ ^RBBS_VARIABLEHEIGHT$ ^SB_LINEUP$ ^SB_LINELEFT$ ^SB_LINEDOWN$ ^SB_LINERIGHT$ ^SB_PAGEUP$ ^SB_PAGELEFT$ ^SB_PAGEDOWN$ ^SB_PAGERIGHT$ ^SB_THUMBPOSITION$ ^SB_THUMBTRACK$ ^SB_TOP$ ^SB_LEFT$ ^SB_BOTTOM$ ^SB_RIGHT$ ^SB_ENDSCROLL$ ^SBT_POPOUT$ ^SBT_RTLREADING$ ^SBT_NOBORDERS$ ^SBT_OWNERDRAW$ ^SM_ARRANGE$ ^SM_CLEANBOOT$ ^SM_CMOUSEBUTTONS$ ^SM_CXBORDER$ ^SM_CYBORDER$ ^SM_CXCURSOR$ ^SM_CYCURSOR$ ^SM_CXDLGFRAME$ ^SM_CYDLGFRAME$ ^SM_CXDOUBLECLK$ ^SM_CYDOUBLECLK$ ^SM_CXDRAG$ ^SM_CYDRAG$ ^SM_CXEDGE$ ^SM_CYEDGE$ ^SM_CXFIXEDFRAME$ ^SM_CYFIXEDFRAME$ ^SM_CXFRAME$ ^SM_CYFRAME$ ^SM_CXFULLSCREEN$ ^SM_CYFULLSCREEN$ ^SM_CXHSCROLL$ ^SM_CYHSCROLL$ ^SM_CXHTHUMB$ ^SM_CXICON$ ^SM_CYICON$ ^SM_CXICONSPACING$ ^SM_CYICONSPACING$ ^SM_CXMAXIMIZED$ ^SM_CYMAXIMIZED$ ^SM_CXMAXTRACK$ ^SM_CYMAXTRACK$ ^SM_CXMENUCHECK$ ^SM_CYMENUCHECK$ ^SM_CXMENUSIZE$ ^SM_CYMENUSIZE$ ^SM_CXMIN$ ^SM_CYMIN$ ^SM_CXMINIMIZED$ ^SM_CYMINIMIZED$ ^SM_CXMINSPACING$ ^SM_CYMINSPACING$ ^SM_CXMINTRACK$ ^SM_CYMINTRACK$ ^SM_CXSCREEN$ ^SM_CYSCREEN$ ^SM_CXSIZE$ ^SM_CYSIZE$ ^SM_CXSIZEFRAME$ ^SM_CYSIZEFRAME$ ^SM_CXSMICON$ ^SM_CYSMICON$ ^SM_CXSMSIZE$ ^SM_CYSMSIZE$ ^SM_CXVSCROLL$ ^SM_CYVSCROLL$ ^SM_CYCAPTION$ ^SM_CYKANJIWINDOW$ ^SM_CYMENU$ ^SM_CYSMCAPTION$ ^SM_CYVTHUMB$ ^SM_DBCSENABLED$ ^SM_DEBUG$ ^SM_MENUDROPALIGNMENT$ ^SM_MIDEASTENABLED$ ^SM_MOUSEPRESENT$ ^SM_MOUSEWHEELPRESENT$ ^SM_NETWORK$ ^SM_PENWINDOWS$ ^SM_SECURE$ ^SM_SHOWSOUNDS$ ^SM_SLOWMACHINE$ ^SM_SWAPBUTTON$ ^TPM_LEFTBUTTON$ ^TPM_RIGHTBUTTON$ ^TPM_LEFTALIGN$ ^TPM_CENTERALIGN$ ^TPM_RIGHTALIGN$ ^TPM_TOPALIGN$ ^TPM_VCENTERALIGN$ ^TPM_BOTTOMALIGN$ ^TPM_HORIZONTAL$ ^TPM_VERTICAL$ ^TPM_NONOTIFY$ ^TPM_RETURNCMD$ ^TPM_RECURSE$ ^TBSTATE_CHECKED$ ^TBSTATE_ELLIPSES$ ^TBSTATE_ENABLED$ ^TBSTATE_HIDDEN$ ^TBSTATE_INDETERMINATE$ ^TBSTATE_MARKED$ ^TBSTATE_PRESSED$ ^TBSTATE_WRAP$ ^TBSTYLE_ALTDRAG$ ^TBSTYLE_CUSTOMERASE$ ^TBSTYLE_FLAT$ ^TBSTYLE_LIST$ ^TBSTYLE_REGISTERDROP$ ^TBSTYLE_TOOLTIPS$ ^TBSTYLE_TRANSPARENT$ ^TBSTYLE_WRAPABLE$ ^BTNS_AUTOSIZE$ ^BTNS_BUTTON$ ^BTNS_CHECK$ ^BTNS_CHECKGROUP$ ^BTNS_DROPDOWN$ ^BTNS_GROUP$ ^BTNS_NOPREFIX$ ^BTNS_SEP$ ^BTNS_SHOWTEXT$ ^BTNS_WHOLEDROPDOWN$ ^TBSTYLE_AUTOSIZE$ ^TBSTYLE_BUTTON$ ^TBSTYLE_CHECK$ ^TBSTYLE_CHECKGROUP$ ^TBSTYLE_DROPDOWN$ ^TBSTYLE_GROUP$ ^TBSTYLE_NOPREFIX$ ^TBSTYLE_SEP$ ^TBSTYLE_EX_DRAWDDARROWS$ ^TBSTYLE_EX_HIDECLIPPEDBUTTONS$ ^TBSTYLE_EX_MIXEDBUTTONS$ ^TBTS_TOP$ ^TBTS_LEFT$ ^TBTS_BOTTOM$ ^TBTS_RIGHT$ ^TVGN_CARET$ ^TVGN_CHILD$ ^TVGN_DROPHILITE$ ^TVGN_FIRSTVISIBLE$ ^TVGN_NEXT$ ^TVGN_NEXTVISIBLE$ ^TVGN_PARENT$ ^TVGN_PREVIOUS$ ^TVGN_PREVIOUSVISIBLE$ ^TVGN_ROOT$ ^WM_CREATE$ ^WM_DESTROY$ ^WM_MOVE$ ^WM_SIZE$ ^WM_ACTIVATE$ ^WM_SETFOCUS$ ^WM_KILLFOCUS$ ^WM_ENABLE$ ^WM_SETREDRAW$ ^WM_COMMAND$ ^WM_KEYDOWN$ ^WM_SETCURSOR$ ^WM_KEYUP$ ^WS_BORDER$ ^WS_CAPTION$ ^WS_CHILD$ ^WS_CHILDWINDOW$ ^WS_CLIPCHILDREN$ ^WS_CLIPSIBLINGS$ ^WS_DISABLED$ ^WS_DLGFRAME$ ^WS_GROUP$ ^WS_HSCROLL$ ^WS_ICONIC$ ^WS_MAXIMIZE$ ^WS_MAXIMIZEBOX$ ^WS_MINIMIZE$ ^WS_MINIMIZEBOX$ ^WS_OVERLAPPED$ ^WS_OVERLAPPEDWINDOW$ ^WS_POPUP$ ^WS_POPUPWINDOW$ ^WS_SIZEBOX$ ^WS_SYSMENU$ ^WS_TABSTOP$ ^WS_THICKFRAME$ ^WS_TILED$ ^WS_TILEDWINDOW$ ^WS_VISIBLE$ ^WS_VSCROLL$ ^WS_EX_ACCEPTFILES$ ^WS_EX_APPWINDOW$ ^WS_EX_CLIENTEDGE$ ^WS_EX_CONTEXTHELP$ ^WS_EX_CONTROLPARENT$ ^WS_EX_DLGMODALFRAME$ ^WS_EX_LEFT$ ^WS_EX_LEFTSCROLLBAR$ ^WS_EX_LTRREADING$ ^WS_EX_MDICHILD$ ^WS_EX_NOPARENTNOTIFY$ ^WS_EX_OVERLAPPEDWINDOW$ ^WS_EX_PALETTEWINDOW$ ^WS_EX_RIGHT$ ^WS_EX_RIGHTSCROLLBAR$ ^WS_EX_RTLREADING$ ^WS_EX_STATICEDGE$ ^WS_EX_TOOLWINDOW$ ^WS_EX_TOPMOST$ ^WS_EX_TRANSPARENT$ ^WS_EX_WINDOWEDGE$ ) ] } |
From: Robert M. <rob...@us...> - 2006-05-13 15:39:35
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Constants/hash In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23641/Win32-GUI-Constants/hash Added Files: Makefile.PL README lookupa.c lookupa.h perfect.c perfect.h perfhex.c recycle.c recycle.h standard.h Log Message: Add Win32-GUI-Constants directory and module code --- NEW FILE: lookupa.h --- /* ------------------------------------------------------------------------------ By Bob Jenkins, September 1996. lookupa.h, a hash function for table lookup, same function as lookup.c. Use this code in any way you wish. Public Domain. It has no warranty. Source is http://burtleburtle.net/bob/c/lookupa.h ------------------------------------------------------------------------------ */ #ifndef STANDARD #include "standard.h" #endif #ifndef LOOKUPA #define LOOKUPA #define CHECKSTATE 8 #define hashsize(n) ((ub4)1<<(n)) #define hashmask(n) (hashsize(n)-1) ub4 lookup(/*_ ub1 *k, ub4 length, ub4 level _*/); void checksum(/*_ ub1 *k, ub4 length, ub4 *state _*/); #endif /* LOOKUPA */ --- NEW FILE: Makefile.PL --- #!perl -w use strict; use warnings; # Makefile.PL for perfect.exe # Writes a makefile that supports enough targets to play # nicely with ExtUtils::MakeMaker. # $Id: Makefile.PL,v 1.1 2006/05/13 15:39:30 robertemay Exp $ use 5.006; use Config; print "Writing Makefile for Win32::GUI::Constants - perfect.exe\n"; my $file = 'Makefile'; open my $fh, '>', $file or die "Failed to open $file for writing: $!"; END { close $fh; } select $fh; # Generic configuration my $nologo = ""; my $output = '-o $@'; my $cflags = "-O"; if($Config{cc} =~ /gcc/) { # gcc, e.g. MinGW $cflags .= " -fno-builtin-log2"; } elsif($Config{cc} =~ /cl/) { # MSVC $nologo = "-nologo"; $output = "-Fe\$@"; } print <<MAKEFILE; #Makefile for Win32::GUI::Constants helper #perfect.exe PERL=$Config{perlpath} RM_RF= \$(PERL) -MExtUtils::Command -e rm_rf CC=$Config{cc} CFLAGS=$cflags NOLOGO=$nologo OBJECT= lookupa$Config{obj_ext} recycle$Config{obj_ext} perfhex$Config{obj_ext} perfect$Config{obj_ext} all: perfect.exe perfect.exe: \$(OBJECT) \$(CC) \$(NOLOGO) $output \$(OBJECT) .c$Config{obj_ext}: \$(CC) \$(NOLOGO) \$(CFLAGS) -c \$< # CLEAN clean: \$(RM_RF) perfect.exe \$(OBJECT) realclean: clean \$(RM_RF) $file veryclean: realclean #Test - will be call by parent Makefiles test: # DEPENDENCIES lookupa.o : lookupa.c standard.h lookupa.h recycle.o : recycle.c standard.h recycle.h perfhex.o : perfhex.c standard.h lookupa.h recycle.h perfect.h perfect.o : perfect.c standard.h lookupa.h recycle.h perfect.h MAKEFILE --- NEW FILE: lookupa.c --- /* -------------------------------------------------------------------- lookupa.c, by Bob Jenkins, December 1996. Same as lookup2.c Use this code however you wish. Public Domain. No warranty. Source is http://burtleburtle.net/bob/c/lookupa.c -------------------------------------------------------------------- */ #ifndef STANDARD #include "standard.h" #endif #ifndef LOOKUPA #include "lookupa.h" #endif /* -------------------------------------------------------------------- mix -- mix 3 32-bit values reversibly. For every delta with one or two bit set, and the deltas of all three high bits or all three low bits, whether the original value of a,b,c is almost all zero or is uniformly distributed, * If mix() is run forward or backward, at least 32 bits in a,b,c have at least 1/4 probability of changing. * If mix() is run forward, every bit of c will change between 1/3 and 2/3 of the time. (Well, 22/100 and 78/100 for some 2-bit deltas.) mix() was built out of 36 single-cycle latency instructions in a structure that could supported 2x parallelism, like so: a -= b; a -= c; x = (c>>13); b -= c; a ^= x; b -= a; x = (a<<8); c -= a; b ^= x; c -= b; x = (b>>13); ... Unfortunately, superscalar Pentiums and Sparcs can't take advantage of that parallelism. They've also turned some of those single-cycle latency instructions into multi-cycle latency instructions. Still, this is the fastest good hash I could find. There were about 2^^68 to choose from. I only looked at a billion or so. -------------------------------------------------------------------- */ #define mix(a,b,c) \ { \ a -= b; a -= c; a ^= (c>>13); \ b -= c; b -= a; b ^= (a<<8); \ c -= a; c -= b; c ^= (b>>13); \ a -= b; a -= c; a ^= (c>>12); \ b -= c; b -= a; b ^= (a<<16); \ c -= a; c -= b; c ^= (b>>5); \ a -= b; a -= c; a ^= (c>>3); \ b -= c; b -= a; b ^= (a<<10); \ c -= a; c -= b; c ^= (b>>15); \ } /* -------------------------------------------------------------------- lookup() -- hash a variable-length key into a 32-bit value k : the key (the unaligned variable-length array of bytes) len : the length of the key, counting by bytes level : can be any 4-byte value Returns a 32-bit value. Every bit of the key affects every bit of the return value. Every 1-bit and 2-bit delta achieves avalanche. About 6len+35 instructions. The best hash table sizes are powers of 2. There is no need to do mod a prime (mod is sooo slow!). If you need less than 32 bits, use a bitmask. For example, if you need only 10 bits, do h = (h & hashmask(10)); In which case, the hash table should have hashsize(10) elements. If you are hashing n strings (ub1 **)k, do it like this: for (i=0, h=0; i<n; ++i) h = lookup( k[i], len[i], h); By Bob Jenkins, 1996. bob...@bu.... You may use this code any way you wish, private, educational, or commercial. See http://burtleburtle.net/bob/hash/evahash.html Use for hash table lookup, or anything where one collision in 2^32 is acceptable. Do NOT use for cryptographic purposes. -------------------------------------------------------------------- */ ub4 lookup( k, length, level) register ub1 *k; /* the key */ register ub4 length; /* the length of the key */ register ub4 level; /* the previous hash, or an arbitrary value */ { register ub4 a,b,c,len; /* Set up the internal state */ len = length; a = b = 0x9e3779b9; /* the golden ratio; an arbitrary value */ c = level; /* the previous hash value */ /*---------------------------------------- handle most of the key */ while (len >= 12) { a += (k[0] +((ub4)k[1]<<8) +((ub4)k[2]<<16) +((ub4)k[3]<<24)); b += (k[4] +((ub4)k[5]<<8) +((ub4)k[6]<<16) +((ub4)k[7]<<24)); c += (k[8] +((ub4)k[9]<<8) +((ub4)k[10]<<16)+((ub4)k[11]<<24)); mix(a,b,c); k += 12; len -= 12; } /*------------------------------------- handle the last 11 bytes */ c += length; switch(len) /* all the case statements fall through */ { case 11: c+=((ub4)k[10]<<24); case 10: c+=((ub4)k[9]<<16); case 9 : c+=((ub4)k[8]<<8); /* the first byte of c is reserved for the length */ case 8 : b+=((ub4)k[7]<<24); case 7 : b+=((ub4)k[6]<<16); case 6 : b+=((ub4)k[5]<<8); case 5 : b+=k[4]; case 4 : a+=((ub4)k[3]<<24); case 3 : a+=((ub4)k[2]<<16); case 2 : a+=((ub4)k[1]<<8); case 1 : a+=k[0]; /* case 0: nothing left to add */ } mix(a,b,c); /*-------------------------------------------- report the result */ return c; } /* -------------------------------------------------------------------- mixc -- mixc 8 4-bit values as quickly and thoroughly as possible. Repeating mix() three times achieves avalanche. Repeating mix() four times eliminates all funnels and all characteristics stronger than 2^{-11}. -------------------------------------------------------------------- */ #define mixc(a,b,c,d,e,f,g,h) \ { \ a^=b<<11; d+=a; b+=c; \ b^=c>>2; e+=b; c+=d; \ c^=d<<8; f+=c; d+=e; \ d^=e>>16; g+=d; e+=f; \ e^=f<<10; h+=e; f+=g; \ f^=g>>4; a+=f; g+=h; \ g^=h<<8; b+=g; h+=a; \ h^=a>>9; c+=h; a+=b; \ } /* -------------------------------------------------------------------- checksum() -- hash a variable-length key into a 256-bit value k : the key (the unaligned variable-length array of bytes) len : the length of the key, counting by bytes state : an array of CHECKSTATE 4-byte values (256 bits) The state is the checksum. Every bit of the key affects every bit of the state. There are no funnels. About 112+6.875len instructions. If you are hashing n strings (ub1 **)k, do it like this: for (i=0; i<8; ++i) state[i] = 0x9e3779b9; for (i=0, h=0; i<n; ++i) checksum( k[i], len[i], state); (c) Bob Jenkins, 1996. bob...@bu.... You may use this code any way you wish, private, educational, or commercial, as long as this whole comment accompanies it. See http://burtleburtle.net/bob/hash/evahash.html Use to detect changes between revisions of documents, assuming nobody is trying to cause collisions. Do NOT use for cryptography. -------------------------------------------------------------------- */ void checksum( k, len, state) register ub1 *k; register ub4 len; register ub4 *state; { register ub4 a,b,c,d,e,f,g,h,length; /* Use the length and level; add in the golden ratio. */ length = len; a=state[0]; b=state[1]; c=state[2]; d=state[3]; e=state[4]; f=state[5]; g=state[6]; h=state[7]; /*---------------------------------------- handle most of the key */ while (len >= 32) { a += (k[0] +(k[1]<<8) +(k[2]<<16) +(k[3]<<24)); b += (k[4] +(k[5]<<8) +(k[6]<<16) +(k[7]<<24)); c += (k[8] +(k[9]<<8) +(k[10]<<16)+(k[11]<<24)); d += (k[12]+(k[13]<<8)+(k[14]<<16)+(k[15]<<24)); e += (k[16]+(k[17]<<8)+(k[18]<<16)+(k[19]<<24)); f += (k[20]+(k[21]<<8)+(k[22]<<16)+(k[23]<<24)); g += (k[24]+(k[25]<<8)+(k[26]<<16)+(k[27]<<24)); h += (k[28]+(k[29]<<8)+(k[30]<<16)+(k[31]<<24)); mixc(a,b,c,d,e,f,g,h); mixc(a,b,c,d,e,f,g,h); mixc(a,b,c,d,e,f,g,h); mixc(a,b,c,d,e,f,g,h); k += 32; len -= 32; } /*------------------------------------- handle the last 31 bytes */ h += length; switch(len) { case 31: h+=(k[30]<<24); case 30: h+=(k[29]<<16); case 29: h+=(k[28]<<8); case 28: g+=(k[27]<<24); case 27: g+=(k[26]<<16); case 26: g+=(k[25]<<8); case 25: g+=k[24]; case 24: f+=(k[23]<<24); case 23: f+=(k[22]<<16); case 22: f+=(k[21]<<8); case 21: f+=k[20]; case 20: e+=(k[19]<<24); case 19: e+=(k[18]<<16); case 18: e+=(k[17]<<8); case 17: e+=k[16]; case 16: d+=(k[15]<<24); case 15: d+=(k[14]<<16); case 14: d+=(k[13]<<8); case 13: d+=k[12]; case 12: c+=(k[11]<<24); case 11: c+=(k[10]<<16); case 10: c+=(k[9]<<8); case 9 : c+=k[8]; case 8 : b+=(k[7]<<24); case 7 : b+=(k[6]<<16); case 6 : b+=(k[5]<<8); case 5 : b+=k[4]; case 4 : a+=(k[3]<<24); case 3 : a+=(k[2]<<16); case 2 : a+=(k[1]<<8); case 1 : a+=k[0]; } mixc(a,b,c,d,e,f,g,h); mixc(a,b,c,d,e,f,g,h); mixc(a,b,c,d,e,f,g,h); mixc(a,b,c,d,e,f,g,h); /*-------------------------------------------- report the result */ state[0]=a; state[1]=b; state[2]=c; state[3]=d; state[4]=e; state[5]=f; state[6]=g; state[7]=h; } --- NEW FILE: recycle.c --- /* -------------------------------------------------------------------- By Bob Jenkins, September 1996. recycle.c You may use this code in any way you wish, and it is free. No warranty. This manages memory for commonly-allocated structures. It allocates RESTART to REMAX items at a time. Timings have shown that, if malloc is used for every new structure, malloc will consume about 90% of the time in a program. This module cuts down the number of mallocs by an order of magnitude. This also decreases memory fragmentation, and freeing structures only requires freeing the root. -------------------------------------------------------------------- */ #ifndef STANDARD # include "standard.h" #endif #ifndef RECYCLE # include "recycle.h" #endif reroot *remkroot(size) size_t size; { reroot *r = (reroot *)remalloc(sizeof(reroot), "recycle.c, root"); r->list = (recycle *)0; r->trash = (recycle *)0; r->size = align(size); r->logsize = RESTART; r->numleft = 0; return r; } void refree(r) struct reroot *r; { recycle *temp; if (temp = r->list) while (r->list) { temp = r->list->next; free((char *)r->list); r->list = temp; } free((char *)r); return; } /* to be called from the macro renew only */ char *renewx(r) struct reroot *r; { recycle *temp; if (r->trash) { /* pull a node off the trash heap */ temp = r->trash; r->trash = temp->next; (void)memset((void *)temp, 0, r->size); } else { /* allocate a new block of nodes */ r->numleft = r->size*((ub4)1<<r->logsize); if (r->numleft < REMAX) ++r->logsize; temp = (recycle *)remalloc(sizeof(recycle) + r->numleft, "recycle.c, data"); temp->next = r->list; r->list = temp; r->numleft-=r->size; temp = (recycle *)((char *)(r->list+1)+r->numleft); } return (char *)temp; } char *remalloc(len, purpose) size_t len; char *purpose; { char *x = (char *)malloc(len); if (!x) { fprintf(stderr, "malloc of %d failed for %s\n", len, purpose); exit(SUCCESS); } return x; } --- NEW FILE: perfect.h --- /* ------------------------------------------------------------------------------ perfect.h: code to generate code for a hash for perfect hashing. (c) Bob Jenkins, September 1996 You may use this code in any way you wish, and it is free. No warranty. I hereby place this in the public domain. Source is http://burtleburtle.net/bob/c/perfect.h ------------------------------------------------------------------------------ */ #ifndef STANDARD #include "standard.h" #endif #ifndef PERFECT #define PERFECT #define MAXKEYLEN 32 /* maximum length of a key */ #define USE_SCRAMBLE 4096 /* use scramble if blen >= USE_SCRAMBLE */ #define SCRAMBLE_LEN ((ub4)1<<16) /* length of *scramble* */ #define RETRY_INITKEY 2048 /* number of times to try to find distinct (a,b) */ #define RETRY_PERFECT 1 /* number of times to try to make a perfect hash */ #define RETRY_HEX 200 /* RETRY_PERFECT when hex keys given */ /* the generated code for the final hash, assumes initial hash is done */ struct gencode { char **line; /* array of text lines, 80 bytes apiece */ /* * The code placed here must declare "ub4 rsl" * and assign it the value of the perfect hash using the function inputs. * Later code will be tacked on which returns rsl or manipulates it according * to the user directives. * * This code is at the top of the routine; it may and must declare any * local variables it needs. * * Each way of filling in **line should be given a comment that is a unique * tag. A testcase named with that tag should also be found which tests * the generated code. */ ub4 len; /* number of lines available for final hash */ ub4 used; /* number of lines used by final hash */ ub4 lowbit; /* for HEX, lowest interesting bit */ ub4 highbit; /* for HEX, highest interesting bit */ ub4 diffbits; /* bits which differ for some key */ ub4 i,j,k,l,m,n,o; /* state machine used in hexn() */ }; typedef struct gencode gencode; /* user directives: perfect hash? minimal perfect hash? input is an int? */ struct hashform { enum { NORMAL_HM, /* key is a string */ INLINE_HM, /* user will do initial hash, we must choose salt for them */ HEX_HM, /* key to be hashed is a hexidecimal 4-byte integer */ DECIMAL_HM, /* key to be hashed is a decimal 4-byte integer */ AB_HM, /* key to be hashed is "A B", where A and B are (A,B) in hex */ ABDEC_HM /* like AB_HM, but in decimal */ } mode; enum { STRING_HT, /* key is a string */ INT_HT, /* key is an integer */ AB_HT /* dunno what key is, but input is distinct (A,B) pair */ } hashtype; enum { NORMAL_HP, /* just find a perfect hash */ MINIMAL_HP /* find a minimal perfect hash */ } perfect; enum { FAST_HS, /* fast mode */ SLOW_HS /* slow mode */ } speed; }; typedef struct hashform hashform; /* representation of a key */ struct key { ub1 *name_k; /* the actual key */ ub4 len_k; /* the length of the actual key */ ub4 hash_k; /* the initial hash value for this key */ struct key *next_k; /* next key */ /* beyond this point is mapping-dependent */ ub4 a_k; /* a, of the key maps to (a,b) */ ub4 b_k; /* b, of the key maps to (a,b) */ struct key *nextb_k; /* next key with this b */ }; typedef struct key key; /* things indexed by b of original (a,b) pair */ struct bstuff { ub2 val_b; /* hash=a^tabb[b].val_b */ key *list_b; /* tabb[i].list_b is list of keys with b==i */ ub4 listlen_b; /* length of list_b */ ub4 water_b; /* high watermark of who has visited this map node */ }; typedef struct bstuff bstuff; /* things indexed by final hash value */ struct hstuff { key *key_h; /* tabh[i].key_h is the key with a hash of i */ }; typedef struct hstuff hstuff; /* things indexed by queue position */ struct qstuff { bstuff *b_q; /* b that currently occupies this hash */ ub4 parent_q; /* queue position of parent that could use this hash */ ub2 newval_q; /* what to change parent tab[b] to to use this hash */ ub2 oldval_q; /* original value of tab[b] */ }; typedef struct qstuff qstuff; /* return ceiling(log based 2 of x) */ ub4 log2(/*_ ub4 x _*/); /* Given the keys, scramble[], and hash mode, find the perfect hash */ void findhash(/*_ bstuff **tabb, ub4 *alen, ub4 *blen, ub4 *salt, gencode *final, ub4 *scramble, ub4 smax, key *keys, ub4 nkeys, hashform *form _*/); /* private, but in a different file because it's excessively verbose */ int inithex(/*_ key *keys, ub4 *alen, ub4 *blen, ub4 smax, ub4 nkeys, ub4 salt, gencode *final, gencode *form _*/); #endif /* PERFECT */ --- NEW FILE: README --- This directory contsins code for generating a minimal perfect hash that is used for fast lookup of constants with a relatively small code footprint. The source code in this directory is modified from the original source taken from http://burtleburtle.net/bob/hash/perfect.html Modifications were made by Robert May - most of the functionality that is not required at this time by the Win32::GUI::Constants build process has been disabled. --- NEW FILE: standard.h --- /* ------------------------------------------------------------------------------ Standard definitions and types, Bob Jenkins ------------------------------------------------------------------------------ */ #ifndef STANDARD # define STANDARD # ifndef STDIO # include <stdio.h> # define STDIO # endif # ifndef STDDEF # include <stddef.h> # define STDDEF # endif #ifdef _MSC_VER typedef unsigned __int64 ub8; typedef signed __int64 sb8; #else typedef unsigned long long ub8; typedef signed long long sb8; #endif /* _MSVC */ #define UB8MAXVAL 0xffffffffffffffffLL #define UB8BITS 64 #define SB8MAXVAL 0x7fffffffffffffffLL typedef unsigned long int ub4; /* unsigned 4-byte quantities */ #define UB4MAXVAL 0xffffffff typedef signed long int sb4; #define UB4BITS 32 #define SB4MAXVAL 0x7fffffff typedef unsigned short int ub2; #define UB2MAXVAL 0xffff #define UB2BITS 16 typedef signed short int sb2; #define SB2MAXVAL 0x7fff typedef unsigned char ub1; #define UB1MAXVAL 0xff #define UB1BITS 8 typedef signed char sb1; /* signed 1-byte quantities */ #define SB1MAXVAL 0x7f typedef int word; /* fastest type available */ #define bis(target,mask) ((target) |= (mask)) #define bic(target,mask) ((target) &= ~(mask)) #define bit(target,mask) ((target) & (mask)) #ifndef min # define min(a,b) (((a)<(b)) ? (a) : (b)) #endif /* min */ #ifndef max # define max(a,b) (((a)<(b)) ? (b) : (a)) #endif /* max */ #ifndef align # define align(a) (((ub4)a+(sizeof(void *)-1))&(~(sizeof(void *)-1))) #endif /* align */ #ifndef abs # define abs(a) (((a)>0) ? (a) : -(a)) #endif #define TRUE 1 #define FALSE 0 #define SUCCESS 0 /* 1 on VAX */ #endif /* STANDARD */ --- NEW FILE: recycle.h --- /* -------------------------------------------------------------------- By Bob Jenkins, September 1996. recycle.h You may use this code in any way you wish, and it is free. No warranty. This manages memory for commonly-allocated structures. It allocates RESTART to REMAX items at a time. Timings have shown that, if malloc is used for every new structure, malloc will consume about 90% of the time in a program. This module cuts down the number of mallocs by an order of magnitude. This also decreases memory fragmentation, and freeing all structures only requires freeing the root. -------------------------------------------------------------------- */ #ifndef STANDARD #include "standard.h" #endif #ifndef RECYCLE #define RECYCLE #define RESTART 0 #define REMAX 32000 struct recycle { struct recycle *next; }; typedef struct recycle recycle; struct reroot { struct recycle *list; /* list of malloced blocks */ struct recycle *trash; /* list of deleted items */ size_t size; /* size of an item */ size_t logsize; /* log_2 of number of items in a block */ word numleft; /* number of bytes left in this block */ }; typedef struct reroot reroot; /* make a new recycling root */ reroot *remkroot(/*_ size_t mysize _*/); /* free a recycling root and all the items it has made */ void refree(/*_ struct reroot *r _*/); /* get a new (cleared) item from the root */ #define renew(r) ((r)->numleft ? \ (((char *)((r)->list+1))+((r)->numleft-=(r)->size)) : renewx(r)) char *renewx(/*_ struct reroot *r _*/); /* delete an item; let the root recycle it */ /* void redel(/o_ struct reroot *r, struct recycle *item _o/); */ #define redel(root,item) { \ ((recycle *)item)->next=(root)->trash; \ (root)->trash=(recycle *)(item); \ } /* malloc, but complain to stderr and exit program if no joy */ /* use plain free() to free memory allocated by remalloc() */ char *remalloc(/*_ size_t len, char *purpose _*/); #endif /* RECYCLE */ --- NEW FILE: perfect.c --- /* ------------------------------------------------------------------------------ perfect.c: code to generate code for a hash for perfect hashing. (c) Bob Jenkins, September 1996, December 1999 You may use this code in any way you wish, and it is free. No warranty. I hereby place this in the public domain. Source is http://burtleburtle.net/bob/c/perfect.c Modified by Robert May, May 2006. Changes are in the Public Domain. Alterations are for the Win32::GUI::Constants build process, and result in a new single outputfile that contains the has function and a suitable lookup table. For more information goto http://perl-win32-gui.sourceforge.net/ This generates a minimal perfect hash function. That means, given a set of n keys, this determines a hash function that maps each of those keys into a value in 0..n-1 with no collisions. [...1460 lines suppressed...] form.speed = FAST_HS; break; case 's': case 'S': form.speed = SLOW_HS; break; } speed_given = TRUE; break; default: usage_error(); } break; #endif /* 0 */ default: usage_error(); } /* Generate the [minimal] perfect hash */ driver(&form); return SUCCESS; } --- NEW FILE: perfhex.c --- /* ------------------------------------------------------------------------------ perfhex.c: code to generate code for a hash for perfect hashing. (c) Bob Jenkins, December 31 1999 You may use this code in any way you wish, and it is free. No warranty. I hereby place this in the public domain. Source is http://burtleburtle.net/bob/c/perfhex.c The task of this file is to do the minimal amount of mixing needed to find distinct (a,b) for each key when each key is a distinct ub4. That means trying all possible ways to mix starting with the fastest. The output is those (a,b) pairs and code in the *final* structure for producing those pairs. ------------------------------------------------------------------------------ */ #ifndef STANDARD #include "standard.h" #endif [...1267 lines suppressed...] sprintf(final->line[0], " ub4 a, b, rsl;\n"); sprintf(final->line[1], "\n"); sprintf(final->line[2], "\n"); sprintf(final->line[3], "\n"); sprintf(final->line[4], "\n"); sprintf(final->line[5], "\n"); sprintf(final->line[6], "\n"); if (blen < USE_SCRAMBLE) { /* hns */ sprintf(final->line[7], " rsl = (a^tab[b]);\n"); } else { /* hnt */ sprintf(final->line[7], " rsl = (a^scramble[tab[b]]);\n"); } } hexn(keys, salt, alen, blen, final); return FALSE; } } |
From: Robert M. <rob...@us...> - 2006-05-13 15:39:34
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Constants/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23641/Win32-GUI-Constants/t Added Files: 01_load.t 02_default.t 03_inline.t 04_noexport.t 05_export_byname.t 06_export_bytag.t 07_nothing.t 08_exportpkg.t 09_autoload.t 10_inherit.t 50_tags_compatability_win32_gui.t 51_tags_all.t 52_tags.t 70_values.t 71_invalid_values.t 98_pod.t 99_pod_coverage.t Log Message: Add Win32-GUI-Constants directory and module code --- NEW FILE: 99_pod_coverage.t --- #!perl -wT # Win32::GUI::Constants test suite # $Id: 99_pod_coverage.t,v 1.1 2006/05/13 15:39:30 robertemay Exp $ # # - check we have coverage of all defined functions/methods use strict; use warnings; BEGIN { $| = 1 } # Autoflush 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}; plan tests => 2; pod_coverage_ok( "Win32::GUI::Constants", "Win32::GUI::Constansts covered by POD"); pod_coverage_ok( "Win32::GUI::Constants::Tags", { also_private => [ qr(^tag$) ], }, "Win32::GUI::Constants::Tags covered by POD"); --- NEW FILE: 52_tags.t --- #!perl -wT # Win32::GUI::Constants test suite # $Id: 52_tags.t,v 1.1 2006/05/13 15:39:30 robertemay Exp $ # # - check a single constant export use strict; use warnings; BEGIN { $| = 1 } # Autoflush # Check that the rest of the tags don't change from release to release # without us knowing. IF YOU HAVE CHANGED THE TAG DEFINITIONS, THEN UPDATE # THIS TEST FILE TO REFLECT THE CHANGES. use Test::More; my @tags = qw( common customdraw stockobjects accelerator animation bitmap brush button class combobox cursor datetime dc font header icon imagelist label listbox listview mdi menu monthcal notifyicon pen progressbar rebar region richedit scrollbar slider splitter statusbar tabstrip textfield timer toolbar tooltip treeview updown window ); plan tests => (2 * @tags); my %RESULTS = ( common => [ qw( CW_USEDEFAULT ) ], customdraw => [ qw( CDDS_ITEM CDDS_ITEMPOSTERASE CDDS_PREERASE CDDS_POSTERASE CDDS_ITEMPOSTPAINT CDDS_ITEMPREERASE CDDS_SUBITEM CDDS_ITEMPREPAINT CDDS_POSTPAINT CDDS_PREPAINT CDRF_NOTIFYITEMDRAW CDRF_NEWFONT CDRF_SKIPDEFAULT CDRF_NOTIFYPOSTPAINT CDRF_NOTIFYSUBITEMDRAW CDRF_DODEFAULT CDRF_NOTIFYPOSTERASE ) ], stockobjects => [ qw( WHITE_BRUSH LTGRAY_BRUSH GRAY_BRUSH DKGRAY_BRUSH BLACK_BRUSH NULL_BRUSH HOLLOW_BRUSH WHITE_PEN BLACK_PEN NULL_PEN OEM_FIXED_FONT ANSI_FIXED_FONT ANSI_VAR_FONT SYSTEM_FONT DEVICE_DEFAULT_FONT DEFAULT_PALETTE SYSTEM_FIXED_FONT DEFAULT_GUI_FONT DC_BRUSH DC_PEN ) ], accelerator => [ qw( VK_OEM_PERIOD VK_VOLUME_DOWN VK_NUMLOCK VK_NONAME VK_LMENU VK_KANA VK_OEM_FINISH VK_V VK_F16 VK_ADD VK_OEM_RESET VK_END VK_LCONTROL VK_OEM_FJ_ROYA VK_NUMPAD0 VK_NEXT VK_O VK_OEM_PA1 VK_CANCEL VK_SLEEP VK_RIGHT VK_RETURN VK_F2 VK_LAUNCH_MAIL VK_BACK VK_F20 VK_Z VK_ESCAPE VK_CAPITAL VK_M VK_PRINT VK_NONCONVERT VK_H VK_SHIFT VK_SPACE VK_F19 VK_EREOF VK_3 VK_I VK_EXSEL VK_KANJI VK_LAUNCH_APP2 VK_F9 VK_NUMPAD9 VK_CONTROL VK_RWIN VK_VOLUME_MUTE VK_F10 VK_CRSEL VK_PA1 VK_B VK_F4 VK_PLAY VK_DIVIDE VK_OEM_COPY VK_SUBTRACT VK_DELETE VK_8 VK_NUMPAD5 VK_OEM_WSCTRL VK_NUMPAD2 VK_F24 VK_LAUNCH_MEDIA_SELECT VK_OEM_ATTN VK_OEM_1 VK_JUNJA VK_F17 VK_F12 VK_OEM_CUSEL VK_A VK_HANGUL VK_ICO_HELP VK_R VK_OEM_5 VK_APPS VK_OEM_FJ_TOUROKU VK_OEM_PA2 VK_OEM_NEC_EQUAL VK_F6 VK_LBUTTON VK_PRIOR VK_OEM_3 VK_F8 VK_UP VK_NUMPAD3 VK_C VK_SEPARATOR VK_MENU VK_SELECT VK_HANGEUL VK_X VK_INSERT VK_HELP VK_1 VK_BROWSER_HOME VK_F22 VK_DECIMAL VK_XBUTTON2 VK_F13 VK_OEM_AX VK_F VK_OEM_7 VK_OEM_FJ_LOYA VK_P VK_ZOOM VK_E VK_OEM_COMMA VK_OEM_FJ_MASSHOU VK_RMENU VK_RBUTTON VK_MEDIA_NEXT_TRACK VK_ICO_00 VK_OEM_ENLW VK_EXECUTE VK_F7 VK_OEM_BACKTAB VK_XBUTTON1 VK_F15 VK_BROWSER_FORWARD VK_4 VK_NUMPAD8 VK_6 VK_N VK_T VK_PAUSE VK_LEFT VK_U VK_BROWSER_STOP VK_F3 VK_SNAPSHOT VK_F1 VK_ACCEPT VK_PACKET VK_MULTIPLY VK_G VK_ATTN VK_PROCESSKEY VK_K VK_LWIN VK_BROWSER_FAVORITES VK_NUMPAD1 VK_CONVERT VK_HOME VK_OEM_AUTO VK_RCONTROL VK_SCROLL VK_OEM_FJ_JISHO VK_OEM_6 VK_ICO_CLEAR VK_5 VK_OEM_MINUS VK_L VK_F5 VK_S VK_TAB VK_OEM_CLEAR VK_OEM_PA3 VK_OEM_102 VK_RSHIFT VK_OEM_PLUS VK_LAUNCH_APP1 VK_BROWSER_SEARCH VK_MEDIA_PLAY_PAUSE VK_OEM_2 VK_CLEAR VK_9 VK_NUMPAD7 VK_NUMPAD6 VK_FINAL VK_MEDIA_STOP VK_2 VK_F21 VK_Y VK_F18 VK_Q VK_D VK_DOWN VK_F23 VK_F11 VK_OEM_8 VK_7 VK_0 VK_J VK_MEDIA_PREV_TRACK VK_MBUTTON VK_F14 VK_BROWSER_REFRESH VK_BROWSER_BACK VK_VOLUME_UP VK_OEM_JUMP VK_NUMPAD4 VK_HANJA VK_W VK_LSHIFT VK_OEM_4 VK_MODECHANGE ) ], animation => [ qw( ACS_CENTER ACS_TRANSPARENT ACS_AUTOPLAY ACS_TIMER ) ], bitmap => [ qw( ) ], brush => [ qw( ) ], button => [ qw( BS_PUSHBUTTON BS_DEFPUSHBUTTON BS_CHECKBOX BS_AUTOCHECKBOX BS_RADIOBUTTON BS_3STATE BS_AUTO3STATE BS_GROUPBOX BS_USERBUTTON BS_AUTORADIOBUTTON BS_PUSHBOX BS_OWNERDRAW BS_TYPEMASK BS_LEFTTEXT BS_TEXT BS_ICON BS_BITMAP BS_LEFT BS_RIGHT BS_CENTER BS_TOP BS_BOTTOM BS_VCENTER BS_PUSHLIKE BS_MULTILINE BS_NOTIFY BS_FLAT BS_RIGHTBUTTON IMAGE_CURSOR IMAGE_BITMAP IMAGE_ENHMETAFILE IMAGE_ICON ) ], class => [ qw( COLOR_WINDOW COLOR_BACKGROUND COLOR_3DHIGHLIGHT COLOR_MENUTEXT COLOR_WINDOWTEXT COLOR_BTNSHADOW COLOR_GRAYTEXT COLOR_INACTIVEBORDER COLOR_BTNHIGHLIGHT COLOR_INFOTEXT COLOR_BTNTEXT COLOR_SCROLLBAR COLOR_MENUHILIGHT COLOR_CAPTIONTEXT COLOR_3DSHADOW COLOR_HOTLIGHT COLOR_MENUBAR COLOR_INACTIVECAPTIONTEXT COLOR_HIGHLIGHTTEXT COLOR_BTNHILIGHT COLOR_HIGHLIGHT COLOR_GRADIENTINACTIVECAPTION COLOR_MENU COLOR_BTNFACE COLOR_ACTIVECAPTION COLOR_3DDKSHADOW COLOR_ACTIVEBORDER COLOR_WINDOWFRAME COLOR_INACTIVECAPTION COLOR_INFOBK COLOR_APPWORKSPACE COLOR_GRADIENTACTIVECAPTION COLOR_DESKTOP COLOR_3DFACE COLOR_3DHILIGHT COLOR_3DLIGHT CS_DROPSHADOW CS_PARENTDC CS_NOCLOSE CS_VREDRAW CS_BYTEALIGNCLIENT CS_OWNDC CS_CLASSDC CS_BYTEALIGNWINDOW CS_DBLCLKS CS_IME CS_HREDRAW CS_SAVEBITS CS_GLOBALCLASS ) ], combobox => [ qw( CBS_SIMPLE CBS_DROPDOWN CBS_DROPDOWNLIST CBS_OWNERDRAWFIXED CBS_OWNERDRAWVARIABLE CBS_AUTOHSCROLL CBS_OEMCONVERT CBS_SORT CBS_HASSTRINGS CBS_NOINTEGRALHEIGHT CBS_DISABLENOSCROLL CBS_UPPERCASE CBS_LOWERCASE CBES_EX_NOEDITIMAGE CBES_EX_NOEDITIMAGEINDENT CBES_EX_PATHWORDBREAKPROC CBES_EX_NOSIZELIMIT CBES_EX_CASESENSITIVE ) ], cursor => [ qw( IDC_HAND IDC_IBEAM IDC_CROSS IDC_SIZE IDC_SIZEWE IDC_WAIT IDC_ARROW IDC_APPSTARTING IDC_HELP IDC_SIZENESW IDC_SIZENWSE IDC_ICON IDC_NO IDC_SIZENS IDC_UPARROW IDC_SIZEALL ) ], datetime => [ qw( DTS_LONGDATEFORMAT DTS_APPCANPARSE DTS_TIMEFORMAT DTS_SHORTDATEFORMAT DTS_UPDOWN DTS_RIGHTALIGN DTS_SHORTDATECENTURYFORMAT DTS_SHOWNONE ) ], dc => [ qw( OPAQUE TRANSPARENT BDR_OUTER BDR_INNER BDR_SUNKENOUTER BDR_RAISED BDR_SUNKEN BDR_SUNKENINNER BDR_RAISEDINNER BDR_RAISEDOUTER EDGE_SUNKEN EDGE_ETCHED EDGE_BUMP EDGE_RAISED BF_FLAT BF_DIAGONAL_ENDBOTTOMRIGHT BF_MIDDLE BF_DIAGONAL_ENDTOPLEFT BF_DIAGONAL_ENDTOPRIGHT BF_LEFT BF_DIAGONAL_ENDBOTTOMLEFT BF_SOFT BF_DIAGONAL BF_RECT BF_MONO BF_RIGHT BF_TOPLEFT BF_BOTTOM BF_ADJUST BF_TOP BF_TOPRIGHT BF_BOTTOMRIGHT BF_BOTTOMLEFT CLR_INVALID HWND_DESKTOP DFC_SCROLL DFC_CAPTION DFC_MENU DFC_BUTTON DFC_POPUPMENU DFCS_SCROLLSIZEGRIP DFCS_PUSHED DFCS_SCROLLDOWN DFCS_MENUARROWRIGHT DFCS_SCROLLRIGHT DFCS_SCROLLCOMBOBOX DFCS_FLAT DFCS_BUTTONRADIO DFCS_CAPTIONRESTORE DFCS_CAPTIONCLOSE DFCS_CHECKED DFCS_BUTTONRADIOMASK DFCS_BUTTON3STATE DFCS_BUTTONPUSH DFCS_ADJUSTRECT DFCS_SCROLLUP DFCS_MENUCHECK DFCS_HOT DFCS_CAPTIONHELP DFCS_BUTTONRADIOIMAGE DFCS_INACTIVE DFCS_CAPTIONMAX DFCS_TRANSPARENT DFCS_SCROLLLEFT DFCS_SCROLLSIZEGRIPRIGHT DFCS_MONO DFCS_MENUARROW DFCS_CAPTIONMIN DFCS_BUTTONCHECK DFCS_MENUBULLET DT_WORDBREAK DT_BOTTOM DT_SINGLELINE DT_CALCRECT DT_RIGHT DT_EXPANDTABS DT_TOP DT_INTERNAL DT_EDITCONTROL DT_MODIFYSTRING DT_PREFIXONLY DT_PATH_ELLIPSIS DT_NOPREFIX DT_EXTERNALLEADING DT_RTLREADING DT_NOCLIP DT_TABSTOP DT_HIDEPREFIX DT_WORD_ELLIPSIS DT_CENTER DT_LEFT DT_NOFULLWIDTHCHARBREAK DT_END_ELLIPSIS DT_VCENTER FLOODFILLBORDER FLOODFILLSURFACE OBJ_PEN OBJ_MEMDC OBJ_BRUSH OBJ_DC OBJ_METAFILE OBJ_METADC OBJ_ENHMETADC OBJ_REGION OBJ_COLORSPACE OBJ_BITMAP OBJ_EXTPEN OBJ_PAL OBJ_FONT OBJ_ENHMETAFILE R2_NOT R2_BLACK R2_MERGENOTPEN R2_NOTXORPEN R2_XORPEN R2_WHITE R2_NOTMERGEPEN R2_MASKPEN R2_MASKPENNOT R2_COPYPEN R2_MERGEPENNOT R2_NOTCOPYPEN R2_NOP R2_MASKNOTPEN R2_NOTMASKPEN R2_MERGEPEN SRCCOPY SRCPAINT SRCAND SRCINVERT SRCERASE NOTSRCCOPY NOTSRCERASE MERGECOPY MERGEPAINT PATCOPY PATPAINT PATINVERT DSTINVERT BLACKNESS WHITENESS NOMIRRORBITMAP CAPTUREBLT ERROR NULLREGION SIMPLEREGION COMPLEXREGION RGN_DIFF RGN_AND RGN_MIN RGN_MAX RGN_XOR RGN_COPY RGN_ERROR RGN_OR BS_SOLID BS_NULL BS_HOLLOW BS_HATCHED BS_PATTERN BS_INDEXED BS_DIBPATTERN BS_DIBPATTERNPT BS_PATTERN8X8 BS_DIBPATTERN8X8 BS_MONOPATTERN HS_VERTICAL HS_CROSS HS_HORIZONTAL HS_DIAGCROSS HS_FDIAGONAL HS_BDIAGONAL PS_JOIN_BEVEL PS_ENDCAP_MASK PS_DASHDOT PS_ENDCAP_FLAT PS_STYLE_MASK PS_DASHDOTDOT PS_COSMETIC PS_INSIDEFRAME PS_TYPE_MASK PS_SOLID PS_JOIN_MITER PS_ENDCAP_SQUARE PS_JOIN_ROUND PS_ENDCAP_ROUND PS_DASH PS_JOIN_MASK PS_GEOMETRIC PS_DOT PS_USERSTYLE PS_NULL PS_ALTERNATE BLACKONWHITE WHITEONBLACK COLORONCOLOR HALFTONE STRETCH_ORSCANS STRETCH_HALFTONE STRETCH_DELETESCANS STRETCH_ANDSCANS ) ], font => [ qw( ) ], header => [ qw( HDS_HORZ HDS_BUTTONS HDS_HOTTRACK HDS_HIDDEN HDS_DRAGDROP HDS_FULLDRAG HDS_FILTERBAR HDS_FLAT ) ], icon => [ qw( IDI_EXCLAMATION IDI_ASTERISK IDI_APPLICATION IDI_HAND IDI_INFORMATION IDI_ERROR IDI_QUESTION IDI_WARNING IDI_WINLOGO ) ], imagelist => [ qw( ILC_COLOR16 ILC_MIRROR ILC_COLOR24 ILC_COLORDDB ILC_COLOR8 ILC_COLOR ILC_PERITEMMIRROR ILC_MASK ILC_COLOR32 ILC_PALETTE ILC_COLOR4 ILD_ROP ILD_OVERLAYMASK ILD_BLEND25 ILD_PRESERVEALPHA ILD_DPISCALE ILD_SELECTED ILD_BLEND50 ILD_FOCUS ILD_BLEND ILD_TRANSPARENT ILD_SCALE ILD_NORMAL ILD_IMAGE ILD_MASK ILS_ALPHA ILS_SATURATE ILS_GLOW ILS_NORMAL ILS_SHADOW CLR_NONE CLR_DEFAULT IMAGE_CURSOR IMAGE_BITMAP IMAGE_ENHMETAFILE IMAGE_ICON ) ], label => [ qw( IMAGE_CURSOR IMAGE_BITMAP IMAGE_ENHMETAFILE IMAGE_ICON ) ], listbox => [ qw( LBS_NOTIFY LBS_SORT LBS_NOREDRAW LBS_MULTIPLESEL LBS_OWNERDRAWFIXED LBS_OWNERDRAWVARIABLE LBS_HASSTRINGS LBS_USETABSTOPS LBS_NOINTEGRALHEIGHT LBS_MULTICOLUMN LBS_WANTKEYBOARDINPUT LBS_EXTENDEDSEL LBS_DISABLENOSCROLL LBS_NODATA LBS_NOSEL LBS_COMBOBOX LBS_STANDARD ) ], listview => [ qw( LVS_ICON LVS_REPORT LVS_SMALLICON LVS_LIST LVS_TYPEMASK LVS_SINGLESEL LVS_SHOWSELALWAYS LVS_SORTASCENDING LVS_SORTDESCENDING LVS_SHAREIMAGELISTS LVS_NOLABELWRAP LVS_AUTOARRANGE LVS_EDITLABELS LVS_OWNERDATA LVS_NOSCROLL LVS_TYPESTYLEMASK LVS_ALIGNTOP LVS_ALIGNLEFT LVS_ALIGNMASK LVS_OWNERDRAWFIXED LVS_NOCOLUMNHEADER LVS_NOSORTHEADER LVS_EX_GRIDLINES LVS_EX_SUBITEMIMAGES LVS_EX_CHECKBOXES LVS_EX_TRACKSELECT LVS_EX_HEADERDRAGDROP LVS_EX_FULLROWSELECT LVS_EX_ONECLICKACTIVATE LVS_EX_TWOCLICKACTIVATE LVS_EX_FLATSB LVS_EX_REGIONAL LVS_EX_INFOTIP LVS_EX_UNDERLINEHOT LVS_EX_UNDERLINECOLD LVS_EX_MULTIWORKAREAS LVS_EX_LABELTIP LVS_EX_BORDERSELECT LVS_EX_DOUBLEBUFFER LVS_EX_HIDELABELS LVS_EX_SINGLEROW LVS_EX_SNAPTOGRID LVS_EX_SIMPLESELECT LVIS_FOCUSED LVIS_SELECTED LVIS_CUT LVIS_DROPHILITED LVIS_GLOW LVIS_ACTIVATING LVIS_OVERLAYMASK LVIS_STATEIMAGEMASK CLR_NONE ) ], mdi => [ qw( ) ], menu => [ qw( MF_STRING MF_POPUP MF_BYCOMMAND MF_RIGHTJUSTIFY MF_USECHECKBITMAPS MF_MENUBREAK MF_SEPARATOR MF_BITMAP MF_HILITE MF_BYPOSITION MF_SYSMENU MF_APPEND MF_DELETE MF_DEFAULT MF_CHECKED MF_DISABLED MF_UNCHECKED MF_CHANGE MF_MOUSESELECT MF_GRAYED MF_REMOVE MF_OWNERDRAW MF_MENUBARBREAK MF_HELP MF_UNHILITE MF_ENABLED SC_VSCROLL SC_HOTKEY SC_MOUSEMENU SC_CONTEXTHELP SC_RESTORE SC_NEXTWINDOW SC_KEYMENU SC_MAXIMIZE SC_ARRANGE SC_CLOSE SC_MINIMIZE SC_MONITORPOWER SC_ZOOM SC_MOVE SC_TASKLIST SC_HSCROLL SC_ICON SC_DEFAULT SC_SEPARATOR SC_PREVWINDOW SC_SIZE SC_SCREENSAVE TPM_VERPOSANIMATION TPM_CENTERALIGN TPM_NONOTIFY TPM_HORPOSANIMATION TPM_NOANIMATION TPM_RETURNCMD TPM_HORNEGANIMATION TPM_HORIZONTAL TPM_TOPALIGN TPM_VERTICAL TPM_LAYOUTRTL TPM_RIGHTALIGN TPM_VERNEGANIMATION TPM_VCENTERALIGN TPM_BOTTOMALIGN TPM_LEFTBUTTON TPM_RIGHTBUTTON TPM_LEFTALIGN TPM_RECURSE ) ], monthcal => [ qw( MCS_DAYSTATE MCS_MULTISELECT MCS_WEEKNUMBERS MCS_NOTODAYCIRCLE MCS_NOTODAY MCSC_TITLEBK MCSC_BACKGROUND MCSC_TRAILINGTEXT MCSC_TITLETEXT MCSC_MONTHBK MCSC_TEXT ) ], notifyicon => [ qw( ) ], pen => [ qw( PS_JOIN_BEVEL PS_ENDCAP_MASK PS_DASHDOT PS_ENDCAP_FLAT PS_STYLE_MASK PS_DASHDOTDOT PS_COSMETIC PS_INSIDEFRAME PS_TYPE_MASK PS_SOLID PS_JOIN_MITER PS_ENDCAP_SQUARE PS_JOIN_ROUND PS_ENDCAP_ROUND PS_DASH PS_JOIN_MASK PS_GEOMETRIC PS_DOT PS_USERSTYLE PS_NULL PS_ALTERNATE ) ], progressbar => [ qw( CLR_DEFAULT ) ], rebar => [ qw( CLR_DEFAULT RBBS_GRIPPERALWAYS RBBS_FIXEDBMP RBBS_VARIABLEHEIGHT RBBS_BREAK RBBS_USECHEVRON RBBS_TOPALIGN RBBS_HIDETITLE RBBS_NOVERT RBBS_NOGRIPPER RBBS_FIXEDSIZE RBBS_CHILDEDGE RBBS_HIDDEN ) ], region => [ qw( RGN_DIFF RGN_AND RGN_MIN RGN_MAX RGN_XOR RGN_COPY RGN_ERROR RGN_OR ) ], richedit => [ qw( CP_MACCP CP_UTF8 CP_OEMCP CP_SYMBOL CP_ACP CP_UTF7 CP_THREAD_ACP EM_GETWORDBREAKPROC EM_LINEFROMCHAR EM_GETMARGINS EM_SETIMESTATUS EM_POSFROMCHAR EM_GETSEL EM_SETMODIFY EM_GETFIRSTVISIBLELINE EM_SETHANDLE EM_EMPTYUNDOBUFFER EM_GETMODIFY EM_FMTLINES EM_GETIMESTATUS EM_SETREADONLY EM_GETLIMITTEXT EM_LINESCROLL EM_GETLINE EM_SETSEL EM_LINEINDEX EM_REPLACESEL EM_GETPASSWORDCHAR EM_LIMITTEXT EM_SETPASSWORDCHAR EM_SCROLLCARET EM_UNDO EM_SETTABSTOPS EM_SETRECTNP EM_GETLINECOUNT EM_SETLIMITTEXT EM_GETHANDLE EM_SCROLL EM_LINELENGTH EM_SETWORDBREAKPROC EM_CHARFROMPOS EM_CANUNDO EM_SETMARGINS EM_GETTHUMB EM_GETRECT EM_SETRECT ENM_CHANGE ENM_MOUSEEVENTS ENM_KEYEVENTS ENM_PROTECTED ENM_PARAGRAPHEXPANDED ENM_LANGCHANGE ENM_UPDATE ENM_SCROLLEVENTS ENM_REQUESTRESIZE ENM_LINK ENM_SCROLL ENM_PAGECHANGE ENM_NONE ENM_OBJECTPOSITIONS ENM_CORRECTTEXT ENM_SELCHANGE ENM_LOWFIRTF ENM_DRAGDROPDONE ENM_DROPFILES ENM_IMECHANGE ES_AUTOHSCROLL ES_CENTER ES_OEMCONVERT ES_AUTOVSCROLL ES_NUMBER ES_RIGHT ES_READONLY ES_MULTILINE ES_PASSWORD ES_LOWERCASE ES_LEFT ES_NOHIDESEL ES_UPPERCASE ES_WANTRETURN GT_DEFAULT GT_RAWTEXT GT_NOHIDDENTEXT GT_USECRLF GT_SELECTION SF_NCRFORNONASCII SF_TEXT SF_TEXTIZED SF_RTFVAL SF_UNICODE SF_RTF SF_RTFNOOBJS SF_USECODEPAGE SFF_PLAINRTF SFF_PWD SFF_SELECTION SFF_WRITEXTRAPAR SFF_PERSISTVIEWSCALE SFF_KEEPDOCINFO ) ], scrollbar => [ qw( SB_THUMBTRACK SB_LINEUP SB_BOTTOM SB_LEFT SB_ENDSCROLL SB_PAGEUP SB_HORZ SB_BOTH SB_THUMBPOSITION SB_PAGELEFT SB_LINERIGHT SB_LINELEFT SB_VERT SB_RIGHT SB_CTL SB_PAGEDOWN SB_TOP SB_LINEDOWN SB_PAGERIGHT ) ], slider => [ qw( TBTS_BOTTOM TBTS_LEFT TBTS_RIGHT TBTS_TOP ) ], splitter => [ qw( ) ], statusbar => [ qw( CLR_DEFAULT SBT_NOBORDERS SBT_POPOUT SBT_OWNERDRAW SBT_NOTABPARSING SBT_RTLREADING ) ], tabstrip => [ qw( ) ], textfield => [ qw( EM_GETWORDBREAKPROC EM_LINEFROMCHAR EM_GETMARGINS EM_SETIMESTATUS EM_POSFROMCHAR EM_GETSEL EM_SETMODIFY EM_GETFIRSTVISIBLELINE EM_SETHANDLE EM_EMPTYUNDOBUFFER EM_GETMODIFY EM_FMTLINES EM_GETIMESTATUS EM_SETREADONLY EM_GETLIMITTEXT EM_LINESCROLL EM_GETLINE EM_SETSEL EM_LINEINDEX EM_REPLACESEL EM_GETPASSWORDCHAR EM_LIMITTEXT EM_SETPASSWORDCHAR EM_SCROLLCARET EM_UNDO EM_SETTABSTOPS EM_SETRECTNP EM_GETLINECOUNT EM_SETLIMITTEXT EM_GETHANDLE EM_SCROLL EM_LINELENGTH EM_SETWORDBREAKPROC EM_CHARFROMPOS EM_CANUNDO EM_SETMARGINS EM_GETTHUMB EM_GETRECT EM_SETRECT ES_AUTOHSCROLL ES_CENTER ES_OEMCONVERT ES_AUTOVSCROLL ES_NUMBER ES_RIGHT ES_READONLY ES_MULTILINE ES_PASSWORD ES_LOWERCASE ES_LEFT ES_NOHIDESEL ES_UPPERCASE ES_WANTRETURN ) ], timer => [ qw( ) ], toolbar => [ qw( BTNS_WHOLEDROPDOWN BTNS_DROPDOWN BTNS_NOPREFIX BTNS_GROUP BTNS_SHOWTEXT BTNS_CHECKGROUP BTNS_SEP BTNS_AUTOSIZE BTNS_BUTTON BTNS_CHECK TBSTATE_CHECKED TBSTATE_ELLIPSES TBSTATE_WRAP TBSTATE_MARKED TBSTATE_HIDDEN TBSTATE_PRESSED TBSTATE_ENABLED TBSTATE_INDETERMINATE TBSTYLE_EX_HIDECLIPPEDBUTTONS TBSTYLE_TRANSPARENT TBSTYLE_CHECK TBSTYLE_FLAT TBSTYLE_LIST TBSTYLE_CHECKGROUP TBSTYLE_SEP TBSTYLE_BUTTON TBSTYLE_DROPDOWN TBSTYLE_ALTDRAG TBSTYLE_TOOLTIPS TBSTYLE_EX_DRAWDDARROWS TBSTYLE_REGISTERDROP TBSTYLE_GROUP TBSTYLE_EX_DOUBLEBUFFER TBSTYLE_AUTOSIZE TBSTYLE_NOPREFIX TBSTYLE_EX_MIXEDBUTTONS TBSTYLE_WRAPABLE TBSTYLE_CUSTOMERASE I_IMAGENONE I_IMAGECALLBACK CLR_DEFAULT TRANSPARENT OPAQUE HINST_COMMCTRL ) ], tooltip => [ qw( ) ], treeview => [ qw( CLR_DEFAULT TVGN_PREVIOUS TVGN_DROPHILITE TVGN_PREVIOUSVISIBLE TVGN_CHILD TVGN_ROOT TVGN_NEXTVISIBLE TVGN_PARENT TVGN_LASTVISIBLE TVGN_FIRSTVISIBLE TVGN_NEXT TVGN_CARET ) ], updown => [ qw( ) ], window => [ qw( DS_CENTERMOUSE DS_CENTER DS_FIXEDSYS DS_CONTROL DS_SETFOREGROUND DS_3DLOOK DS_NOIDLEMSG DS_SETFONT DS_LOCALEDIT DS_CONTEXTHELP DS_SHELLFONT DS_MODALFRAME DS_NOFAILCREATE DS_ABSALIGN DS_SYSMODAL IDYES IDABORT IDCONTINUE IDNO IDIGNORE IDTIMEOUT IDTRYAGAIN IDOK IDCLOSE IDHELP IDCANCEL IDRETRY MA_NOACTIVATE MA_NOACTIVATEANDEAT MA_ACTIVATEANDEAT MA_ACTIVATE MK_XBUTTON1 MK_LBUTTON MK_CONTROL MK_XBUTTON2 MK_RBUTTON MK_SHIFT MK_MBUTTON NM_RCLICK NM_RELEASEDCAPTURE NM_RDBLCLK NM_LDOWN NM_KILLFOCUS NM_TOOLTIPSCREATED NM_SETCURSOR NM_SETFOCUS NM_THEMECHANGED NM_OUTOFMEMORY NM_CUSTOMDRAW NM_CLICK NM_RDOWN NM_CHAR NM_HOVER NM_DBLCLK NM_NCHITTEST NM_RETURN NM_KEYDOWN RDW_NOINTERNALPAINT RDW_ERASENOW RDW_UPDATENOW RDW_NOCHILDREN RDW_NOFRAME RDW_VALIDATE RDW_ERASE RDW_INVALIDATE RDW_NOERASE RDW_FRAME RDW_INTERNALPAINT RDW_ALLCHILDREN SIZE_MAXIMIZED SIZE_RESTORED SIZE_MAXSHOW SIZE_MINIMIZED SIZE_MAXHIDE SW_SHOWNORMAL SW_HIDE SW_NORMAL SW_SHOWMINIMIZED SW_SHOWMAXIMIZED SW_SHOW SW_FORCEMINIMIZE SW_RESTORE SW_SHOWDEFAULT SW_MAXIMIZE SW_MINIMIZE SW_SHOWNOACTIVATE SW_SHOWMINNOACTIVE SW_SHOWNA WA_INACTIVE WA_ACTIVE WA_CLICKACTIVE WM_NCACTIVATE WM_SYSKEYUP WM_ERASEBKGND WM_CHANGEUISTATE WM_USERCHANGED WM_NOTIFYFORMAT WM_CHARTOITEM WM_MDIICONARRANGE WM_QUERYENDSESSION WM_APPCOMMAND WM_NCMOUSELEAVE WM_MOUSEMOVE WM_SETCURSOR WM_TIMER WM_WININICHANGE WM_MDINEXT WM_IME_CONTROL WM_COMPACTING WM_DRAWCLIPBOARD WM_FONTCHANGE WM_PRINTCLIENT WM_MDIMAXIMIZE WM_MDISETMENU WM_MDIREFRESHMENU WM_SHOWWINDOW WM_XBUTTONUP WM_SYSCOLORCHANGE WM_UNDO WM_CTLCOLORDLG WM_RBUTTONDBLCLK WM_INPUT WM_CTLCOLORSTATIC WM_MDICREATE WM_PAINTCLIPBOARD WM_CHILDACTIVATE WM_MEASUREITEM WM_DESTROY WM_NCCREATE WM_MOUSEFIRST WM_MOUSELAST WM_TABLET_LAST WM_QUIT WM_MENUCOMMAND WM_IME_STARTCOMPOSITION WM_MDIACTIVATE WM_SYSDEADCHAR WM_USER WM_SYNCPAINT WM_MOVING WM_NCMOUSEHOVER WM_KEYFIRST WM_MBUTTONDOWN WM_SYSCHAR WM_MBUTTONDBLCLK WM_CHANGECBCHAIN WM_PALETTECHANGED WM_GETTEXT WM_CLOSE WM_RENDERFORMAT WM_SETFONT WM_SIZING WM_RBUTTONUP WM_CTLCOLORBTN WM_INPUTLANGCHANGEREQUEST WM_CONTEXTMENU WM_WINDOWPOSCHANGING WM_CTLCOLORSCROLLBAR WM_KILLFOCUS WM_DROPFILES WM_WTSSESSION_CHANGE WM_MDIDESTROY WM_VSCROLLCLIPBOARD WM_NCHITTEST WM_ENDSESSION WM_IME_KEYLAST WM_HELP WM_TABLET_FIRST WM_IME_KEYDOWN WM_ACTIVATE WM_MOUSEHOVER WM_MOUSELEAVE WM_IME_CHAR WM_DISPLAYCHANGE WM_INPUTLANGCHANGE WM_NCLBUTTONUP WM_SETICON WM_NULL WM_AFXLAST WM_KEYUP WM_DELETEITEM WM_RENDERALLFORMATS WM_ICONERASEBKGND WM_MOUSEWHEEL WM_ACTIVATEAPP WM_NOTIFY WM_IME_COMPOSITION WM_THEMECHANGED WM_IME_COMPOSITIONFULL WM_SYSKEYDOWN WM_NCXBUTTONDBLCLK WM_XBUTTONDOWN WM_IME_SETCONTEXT WM_COMMAND WM_SIZE WM_LBUTTONDBLCLK WM_ENABLE WM_NEXTDLGCTL WM_MDITILE WM_KEYLAST WM_GETHOTKEY WM_CTLCOLOREDIT WM_PALETTEISCHANGING WM_DEVMODECHANGE WM_INITMENUPOPUP WM_WINDOWPOSCHANGED WM_SIZECLIPBOARD WM_INITDIALOG WM_PARENTNOTIFY WM_MDIGETACTIVE WM_QUEUESYNC WM_MOVE WM_DEADCHAR WM_NCLBUTTONDBLCLK WM_NCLBUTTONDOWN WM_MENUGETOBJECT WM_NCDESTROY WM_GETDLGCODE WM_HOTKEY WM_DESTROYCLIPBOARD WM_QUERYOPEN WM_IME_ENDCOMPOSITION WM_COPY WM_MENUCHAR WM_TIMECHANGE WM_IME_NOTIFY WM_HANDHELDFIRST WM_NCCALCSIZE WM_CTLCOLORMSGBOX WM_MENURBUTTONUP WM_LBUTTONUP WM_RBUTTONDOWN WM_EXITSIZEMOVE WM_SETTEXT WM_GETOBJECT WM_VKEYTOITEM WM_NCXBUTTONDOWN WM_EXITMENULOOP WM_SYSCOMMAND WM_COPYDATA WM_VSCROLL WM_LBUTTONDOWN WM_NEXTMENU WM_CLEAR WM_KEYDOWN WM_CUT WM_QUERYUISTATE WM_ASKCBFORMATNAME WM_QUERYDRAGICON WM_NCRBUTTONDBLCLK WM_PRINT WM_HSCROLLCLIPBOARD WM_CANCELJOURNAL WM_PENWINFIRST WM_MENUSELECT WM_UNINITMENUPOPUP WM_IME_SELECT WM_CREATE WM_UPDATEUISTATE WM_ENTERMENULOOP WM_SETREDRAW WM_PASTE WM_DRAWITEM WM_MOUSEACTIVATE WM_SETFOCUS WM_NCRBUTTONDOWN WM_ENTERSIZEMOVE WM_STYLECHANGING WM_INITMENU WM_CTLCOLORLISTBOX WM_GETICON WM_AFXFIRST WM_NCMOUSEMOVE WM_SETTINGCHANGE WM_STYLECHANGED WM_PAINT WM_NCMBUTTONUP WM_HSCROLL WM_XBUTTONDBLCLK WM_QUERYNEWPALETTE WM_MBUTTONUP WM_SETHOTKEY WM_APP WM_POWER WM_DEVICECHANGE WM_TCARD WM_GETMINMAXINFO WM_CANCELMODE WM_NCMBUTTONDOWN WM_GETFONT WM_POWERBROADCAST WM_CHAR WM_MDICASCADE WM_IME_KEYUP WM_COMPAREITEM WM_NCPAINT WM_NCMBUTTONDBLCLK WM_CAPTURECHANGED WM_UNICHAR WM_IME_REQUEST WM_NCXBUTTONUP WM_MENUDRAG WM_SPOOLERSTATUS WM_COMMNOTIFY WM_MDIRESTORE WM_PENWINLAST WM_NCRBUTTONUP WM_HANDHELDLAST WM_ENTERIDLE WM_PAINTICON WM_GETTEXTLENGTH WS_EX_TOPMOST WS_EX_ACCEPTFILES WS_CHILDWINDOW WS_EX_RIGHT WS_EX_LAYERED WS_EX_PALETTEWINDOW WS_EX_CLIENTEDGE WS_EX_WINDOWEDGE WS_EX_STATICEDGE WS_MAXIMIZE WS_EX_OVERLAPPEDWINDOW WS_TILEDWINDOW WS_EX_LEFT WS_CHILD WS_POPUP WS_TABSTOP WS_BORDER WS_CLIPSIBLINGS WS_HSCROLL WS_EX_TRANSPARENT WS_EX_LEFTSCROLLBAR WS_SYSMENU WS_DISABLED WS_TILED WS_CLIPCHILDREN WS_EX_CONTEXTHELP WS_EX_LAYOUTRTL WS_EX_NOINHERITLAYOUT WS_EX_APPWINDOW WS_CAPTION WS_EX_DLGMODALFRAME WS_MINIMIZEBOX WS_EX_CONTROLPARENT WS_VSCROLL WS_POPUPWINDOW WS_EX_TOOLWINDOW WS_EX_LTRREADING WS_VISIBLE WS_EX_COMPOSITED WS_EX_NOPARENTNOTIFY WS_EX_RIGHTSCROLLBAR WS_EX_RTLREADING WS_MAXIMIZEBOX WS_EX_NOACTIVATE WS_EX_MDICHILD WS_ICONIC WS_SIZEBOX WS_OVERLAPPEDWINDOW WS_THICKFRAME WS_DLGFRAME WS_OVERLAPPED WS_MINIMIZE WS_GROUP ) ], ); require Win32::GUI::Constants::Tags; for my $tag (@tags) { my @TAGS = @{Win32::GUI::Constants::Tags::tag($tag)}; my @REQUIRED = @{$RESULTS{$tag}}; #both lists the same size? ok(@TAGS == @REQUIRED, ":$tag is correct size"); #both lists contain the same items? my %h; for my $item (@TAGS, @REQUIRED) { $h{$item}++; } my @errors; for my $item (keys %h) { next if $h{$item} == 2; push @errors, $item; } ok(!@errors, "Lists have no differing items (@errors)"); } --- NEW FILE: 04_noexport.t --- #!perl -wT # Win32::GUI::Constants test suite # $Id: 04_noexport.t,v 1.1 2006/05/13 15:39:30 robertemay Exp $ # # - check inlining a single non-exported constant use strict; use warnings; BEGIN { $| = 1 } # Autoflush use Test::More tests => 2; use Win32::GUI::Constants qw(-noexport CW_USEDEFAULT); # Test exporting of constant ok(!main->can("CW_USEDEFAULT"), "Default symbol not exported"); # If the function is defined at this stage it can be inlined ok(defined(&Win32::GUI::Constants::CW_USEDEFAULT),"symbol will be inlined"); --- NEW FILE: 71_invalid_values.t --- #!perl -wT # Win32::GUI::Constants test suite # $Id: 71_invalid_values.t,v 1.1 2006/05/13 15:39:30 robertemay Exp $ # # - test that the constants sub returns undef and sets # $! and $^E on non-existant comstants use strict; use warnings; BEGIN { $| = 1 } # Autoflush use Test::More; use Win32::GUI::Constants(); my @tests = qw(THIS_DOES_NOT_EXITS NOR_DOES_THIS); plan tests => 3 * @tests; # Useful Constants: sub EINVAL() {22} sub ERROR_INVALID_ARGUMENT() {87} # On cygwin, $^E == $! (no OS extended errors) my $EXPECTED_E = ERROR_INVALID_ARGUMENT; if(lc $^O eq "cygwin") { $EXPECTED_E = EINVAL; } for my $c (@tests) { my($r, $e); $!=0;$^E=0; $r = Win32::GUI::Constants::constant($c); $e = $^E; # record $^E immediately is($r , undef, "Constant $c does not exist"); cmp_ok($!, "==", EINVAL, "Errno set to EINVAL"); cmp_ok($e, "==", $EXPECTED_E, "LastError set to ERROR_INVALID_ARGUMENT"); } --- NEW FILE: 98_pod.t --- #!perl -wT # Win32::GUI::Constants test suite # $Id: 98_pod.t,v 1.1 2006/05/13 15:39:30 robertemay Exp $ # # - check POD 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: 05_export_byname.t --- #!perl -wT # Win32::GUI::Constants test suite # $Id: 05_export_byname.t,v 1.1 2006/05/13 15:39:30 robertemay Exp $ # # - check exporting constants by name use strict; use warnings; BEGIN { $| = 1 } # Autoflush use Test::More tests => 8; use Win32::GUI::Constants qw(ES_WANTRETURN ERROR); # Test exporting can_ok("main", "ES_WANTRETURN"); can_ok("main", "ERROR"); ok(!defined(&ES_WANTRETURN), "ES_WANTRETURN constant not defined"); is(ES_WANTRETURN, 4096, "correct value"); ok(defined(&ES_WANTRETURN), "ES_WANTRETURN constant defined after calling it"); ok(!defined(&ERROR), "ERROR constant not defined"); is(ERROR, 0, "correct value"); ok(defined(&ERROR), "ERROR constant defined after calling it"); --- NEW FILE: 50_tags_compatability_win32_gui.t --- #!perl -wT # Win32::GUI::Constants test suite # $Id: 50_tags_compatability_win32_gui.t,v 1.1 2006/05/13 15:39:30 robertemay Exp $ # use strict; use warnings; BEGIN { $| = 1 } # Autoflush # Check that the :compatability_win32_gui export tag actually exports # the same symbols as Win32::GUI currently does. use Test::More tests => 2; require Win32::GUI::Constants::Tags; my @W32G_NEW = @{Win32::GUI::Constants::Tags::tag('compatibility_win32_gui')}; # Copied from GUI.pm, with DS_RECURSE removed, as it doesn't seem to exist my @W32G_ORIG = qw( BS_3STATE BS_AUTO3STATE BS_AUTOCHECKBOX BS_AUTORADIOBUTTON BS_CHECKBOX BS_DEFPUSHBUTTON BS_GROUPBOX BS_LEFTTEXT BS_NOTIFY BS_OWNERDRAW BS_PUSHBUTTON BS_RADIOBUTTON BS_USERBUTTON BS_BITMAP BS_BOTTOM BS_CENTER BS_ICON BS_LEFT BS_MULTILINE BS_RIGHT BS_RIGHTBUTTON BS_TEXT BS_TOP BS_VCENTER COLOR_3DFACE COLOR_ACTIVEBORDER COLOR_ACTIVECAPTION COLOR_APPWORKSPACE COLOR_BACKGROUND COLOR_BTNFACE COLOR_BTNSHADOW COLOR_BTNTEXT COLOR_CAPTIONTEXT COLOR_GRAYTEXT COLOR_HIGHLIGHT COLOR_HIGHLIGHTTEXT COLOR_INACTIVEBORDER COLOR_INACTIVECAPTION COLOR_MENU COLOR_MENUTEXT COLOR_SCROLLBAR COLOR_WINDOW COLOR_WINDOWFRAME COLOR_WINDOWTEXT DS_3DLOOK DS_ABSALIGN DS_CENTER DS_CENTERMOUSE DS_CONTEXTHELP DS_CONTROL DS_FIXEDSYS DS_LOCALEDIT DS_MODALFRAME DS_NOFAILCREATE DS_NOIDLEMSG DS_SETFONT DS_SETFOREGROUND DS_SYSMODAL DTS_UPDOWN DTS_SHOWNONE DTS_SHORTDATEFORMAT DTS_LONGDATEFORMAT DTS_TIMEFORMAT DTS_APPCANPARSE DTS_RIGHTALIGN ES_AUTOHSCROLL ES_AUTOVSCROLL ES_CENTER ES_LEFT ES_LOWERCASE ES_MULTILINE ES_NOHIDESEL ES_NUMBER ES_OEMCONVERT ES_PASSWORD ES_READONLY ES_RIGHT ES_UPPERCASE ES_WANTRETURN GW_CHILD GW_HWNDFIRST GW_HWNDLAST GW_HWNDNEXT GW_HWNDPREV GW_OWNER IMAGE_BITMAP IMAGE_CURSOR IMAGE_ICON IDABORT IDCANCEL IDIGNORE IDNO IDOK IDRETRY IDYES LR_DEFAULTCOLOR LR_MONOCHROME LR_COLOR LR_COPYRETURNORG LR_COPYDELETEORG LR_LOADFROMFILE LR_LOADTRANSPARENT LR_DEFAULTSIZE LR_LOADMAP3DCOLORS LR_CREATEDIBSECTION LR_COPYFROMRESOURCE LR_SHARED MB_ABORTRETRYIGNORE MB_OK MB_OKCANCEL MB_RETRYCANCEL MB_YESNO MB_YESNOCANCEL MB_ICONEXCLAMATION MB_ICONWARNING MB_ICONINFORMATION MB_ICONASTERISK MB_ICONQUESTION MB_ICONSTOP MB_ICONERROR MB_ICONHAND MB_DEFBUTTON1 MB_DEFBUTTON2 MB_DEFBUTTON3 MB_DEFBUTTON4 MB_APPLMODAL MB_SYSTEMMODAL MB_TASKMODAL MB_DEFAULT_DESKTOP_ONLY MB_HELP MB_RIGHT MB_RTLREADING MB_SETFOREGROUND MB_TOPMOST MB_SERVICE_NOTIFICATION MB_SERVICE_NOTIFICATION_NT3X MF_STRING MF_POPUP RBBS_BREAK RBBS_CHILDEDGE RBBS_FIXEDBMP RBBS_FIXEDSIZE RBBS_GRIPPERALWAYS RBBS_HIDDEN RBBS_NOGRIPPER RBBS_NOVERT RBBS_VARIABLEHEIGHT SB_LINEUP SB_LINELEFT SB_LINEDOWN SB_LINERIGHT SB_PAGEUP SB_PAGELEFT SB_PAGEDOWN SB_PAGERIGHT SB_THUMBPOSITION SB_THUMBTRACK SB_TOP SB_LEFT SB_BOTTOM SB_RIGHT SB_ENDSCROLL SBT_POPOUT SBT_RTLREADING SBT_NOBORDERS SBT_OWNERDRAW SM_ARRANGE SM_CLEANBOOT SM_CMOUSEBUTTONS SM_CXBORDER SM_CYBORDER SM_CXCURSOR SM_CYCURSOR SM_CXDLGFRAME SM_CYDLGFRAME SM_CXDOUBLECLK SM_CYDOUBLECLK SM_CXDRAG SM_CYDRAG SM_CXEDGE SM_CYEDGE SM_CXFIXEDFRAME SM_CYFIXEDFRAME SM_CXFRAME SM_CYFRAME SM_CXFULLSCREEN SM_CYFULLSCREEN SM_CXHSCROLL SM_CYHSCROLL SM_CXHTHUMB SM_CXICON SM_CYICON SM_CXICONSPACING SM_CYICONSPACING SM_CXMAXIMIZED SM_CYMAXIMIZED SM_CXMAXTRACK SM_CYMAXTRACK SM_CXMENUCHECK SM_CYMENUCHECK SM_CXMENUSIZE SM_CYMENUSIZE SM_CXMIN SM_CYMIN SM_CXMINIMIZED SM_CYMINIMIZED SM_CXMINSPACING SM_CYMINSPACING SM_CXMINTRACK SM_CYMINTRACK SM_CXSCREEN SM_CYSCREEN SM_CXSIZE SM_CYSIZE SM_CXSIZEFRAME SM_CYSIZEFRAME SM_CXSMICON SM_CYSMICON SM_CXSMSIZE SM_CYSMSIZE SM_CXVSCROLL SM_CYVSCROLL SM_CYCAPTION SM_CYKANJIWINDOW SM_CYMENU SM_CYSMCAPTION SM_CYVTHUMB SM_DBCSENABLED SM_DEBUG SM_MENUDROPALIGNMENT SM_MIDEASTENABLED SM_MOUSEPRESENT SM_MOUSEWHEELPRESENT SM_NETWORK SM_PENWINDOWS SM_SECURE SM_SHOWSOUNDS SM_SLOWMACHINE SM_SWAPBUTTON TPM_LEFTBUTTON TPM_RIGHTBUTTON TPM_LEFTALIGN TPM_CENTERALIGN TPM_RIGHTALIGN TPM_TOPALIGN TPM_VCENTERALIGN TPM_BOTTOMALIGN TPM_HORIZONTAL TPM_VERTICAL TPM_NONOTIFY TPM_RETURNCMD TPM_RECURSE TBSTATE_CHECKED TBSTATE_ELLIPSES TBSTATE_ENABLED TBSTATE_HIDDEN TBSTATE_INDETERMINATE TBSTATE_MARKED TBSTATE_PRESSED TBSTATE_WRAP TBSTYLE_ALTDRAG TBSTYLE_CUSTOMERASE TBSTYLE_FLAT TBSTYLE_LIST TBSTYLE_REGISTERDROP TBSTYLE_TOOLTIPS TBSTYLE_TRANSPARENT TBSTYLE_WRAPABLE BTNS_AUTOSIZE BTNS_BUTTON BTNS_CHECK BTNS_CHECKGROUP BTNS_DROPDOWN BTNS_GROUP BTNS_NOPREFIX BTNS_SEP BTNS_SHOWTEXT BTNS_WHOLEDROPDOWN TBSTYLE_AUTOSIZE TBSTYLE_BUTTON TBSTYLE_CHECK TBSTYLE_CHECKGROUP TBSTYLE_DROPDOWN TBSTYLE_GROUP TBSTYLE_NOPREFIX TBSTYLE_SEP TBSTYLE_EX_DRAWDDARROWS TBSTYLE_EX_HIDECLIPPEDBUTTONS TBSTYLE_EX_MIXEDBUTTONS TBTS_TOP TBTS_LEFT TBTS_BOTTOM TBTS_RIGHT TVGN_CARET TVGN_CHILD TVGN_DROPHILITE TVGN_FIRSTVISIBLE TVGN_NEXT TVGN_NEXTVISIBLE TVGN_PARENT TVGN_PREVIOUS TVGN_PREVIOUSVISIBLE TVGN_ROOT WM_CREATE WM_DESTROY WM_MOVE WM_SIZE WM_ACTIVATE WM_SETFOCUS WM_KILLFOCUS WM_ENABLE WM_SETREDRAW WM_COMMAND WM_KEYDOWN WM_SETCURSOR WM_KEYUP WS_BORDER WS_CAPTION WS_CHILD WS_CHILDWINDOW WS_CLIPCHILDREN WS_CLIPSIBLINGS WS_DISABLED WS_DLGFRAME WS_GROUP WS_HSCROLL WS_ICONIC WS_MAXIMIZE WS_MAXIMIZEBOX WS_MINIMIZE WS_MINIMIZEBOX WS_OVERLAPPED WS_OVERLAPPEDWINDOW WS_POPUP WS_POPUPWINDOW WS_SIZEBOX WS_SYSMENU WS_TABSTOP WS_THICKFRAME WS_TILED WS_TILEDWINDOW WS_VISIBLE WS_VSCROLL WS_EX_ACCEPTFILES WS_EX_APPWINDOW WS_EX_CLIENTEDGE WS_EX_CONTEXTHELP WS_EX_CONTROLPARENT WS_EX_DLGMODALFRAME WS_EX_LEFT WS_EX_LEFTSCROLLBAR WS_EX_LTRREADING WS_EX_MDICHILD WS_EX_NOPARENTNOTIFY WS_EX_OVERLAPPEDWINDOW WS_EX_PALETTEWINDOW WS_EX_RIGHT WS_EX_RIGHTSCROLLBAR WS_EX_RTLREADING WS_EX_STATICEDGE WS_EX_TOOLWINDOW WS_EX_TOPMOST WS_EX_TRANSPARENT WS_EX_WINDOWEDGE ); #both lists the same size? ok(@W32G_ORIG == @W32G_NEW, "Old and new export lists are the same size"); #both lists contain the same items? my %h; for my $item (@W32G_ORIG, @W32G_NEW) { $h{$item}++; } my @errors; for my $item (keys %h) { next if $h{$item} == 2; push @errors, $item; } ok(!@errors, "Lists have no differing items (@errors)"); --- NEW FILE: 03_inline.t --- #!perl -wT # Win32::GUI::Constants test suite # $Id: 03_inline.t,v 1.1 2006/05/13 15:39:30 robertemay Exp $ # # - check inlining a single constant export use strict; use warnings; BEGIN { $| = 1 } # Autoflush use Test::More tests => 3; use Win32::GUI::Constants qw(-inline CW_USEDEFAULT); # Test exporting of constant can_ok("main", "CW_USEDEFAULT"); # If the function is defined at this stage it can be inlined ok(defined(&CW_USEDEFAULT), "exported symbol will be inlined"); ok(defined(&Win32::GUI::Constants::CW_USEDEFAULT),"symbol will be inlined"); --- NEW FILE: 02_default.t --- #!perl -wT # Win32::GUI::Constants test suite # $Id: 02_default.t,v 1.1 2006/05/13 15:39:30 robertemay Exp $ # # - check a single constant export use strict; use warnings; BEGIN { $| = 1 } # Autoflush use Test::More tests => 8; use Win32::GUI::Constants qw(CW_USEDEFAULT); # Test exporting of constant can_ok("main", "CW_USEDEFAULT"); ok(!defined(&CW_USEDEFAULT), "default constant not defined"); is(CW_USEDEFAULT, 2147483648, "correct value"); ok(defined(&CW_USEDEFAULT), "default constant defined after calling it"); # Test other symbol not exported ok(!main->can("ES_WANTRETURN"), "main->can('ES_WANTRETURTN') failed"); # Test autoloading of constant ok(!defined(&Win32::GUI::Constants::ES_WANTRETURN), "constant not defined"); is(Win32::GUI::Constants::ES_WANTRETURN(), 4096, "correct value"); ok(defined(&Win32::GUI::Constants::ES_WANTRETURN),"constant defined after calling it"); --- NEW FILE: 10_inherit.t --- #!perl -wT # Win32::GUI::Constants test suite # $Id: 10_inherit.t,v 1.1 2006/05/13 15:39:30 robertemay Exp $ # # - test that we can inherit from Win32::GUI::Constants use strict; use warnings; BEGIN { $| = 1 } # Autoflush use Test::More tests => 8; package Win32::ABC; # We're not allowed to inherit AUTOLOAD for non-methods, # or we get this warning: # "Use of inherited AUTOLOAD for non-method Win32::ABC::CW_USEDEFAULT() is deprecated ... " # so we explicitly import it. use Win32::GUI::Constants(-autoload); our @ISA = qw(Win32::GUI::Constants); package main; #use Win32::ABC qw(CW_USEDEFAULT); Win32::ABC->import qw(CW_USEDEFAULT); # Equililent to use() when package doesn't come from seperate file # Test exporting of default constant can_ok("main", "CW_USEDEFAULT"); ok(!defined(&CW_USEDEFAULT), "default constant not defined"); is(CW_USEDEFAULT(), 2147483648, "correct value"); ok(defined(&CW_USEDEFAULT), "default constant defined after calling it"); # Test other symbol not exported ok(!main->can("ES_WANTRETURN"), "main->can('ES_WANTRETURTN') failed"); # Test exporting of default constant ok(!defined(&Win32::ABC::ES_WANTRETURN), "constant not defined"); ok(Win32::ABC::ES_WANTRETURN() == 4096, "correct value"); ok(defined(&Win32::ABC::ES_WANTRETURN),"constant defined after calling it"); --- NEW FILE: 07_nothing.t --- #!perl -wT # Win32::GUI::Constants test suite # $Id: 07_nothing.t,v 1.1 2006/05/13 15:39:30 robertemay Exp $ # # - check that we can export nothing use strict; use warnings; BEGIN { $| = 1 } # Autoflush use Test::More tests => 6; use Win32::GUI::Constants (); # Test exporting of constant ok(!main->can("CW_USEDEFAULT"), "a symbol not exported"); # Test calling pkg directly ok(!Win32::GUI::Constants->can("ES_WANTRETURN"), "ES_WANTRETURN not available"); ok(!defined(&Win32::GUI::Constants::ES_WANTRETURN), "constant not defined"); is(Win32::GUI::Constants::ES_WANTRETURN(), 4096, "correct value"); ok(defined(&Win32::GUI::Constants::ES_WANTRETURN),"constant defined after calling it"); can_ok("Win32::GUI::Constants", "ES_WANTRETURN"); --- NEW FILE: 09_autoload.t --- #!perl -wT # Win32::GUI::Constants test suite # $Id: 09_autoload.t,v 1.1 2006/05/13 15:39:30 robertemay Exp $ # # - check exporting of AUTOLOAD use strict; use warnings; BEGIN { $| = 1 } # Autoflush use Test::More tests => 5; use Win32::GUI::Constants qw(-autoload); ok(!main->can('ES_WANTRETURN'), "not autoloaded yet"); ok(!defined(&ES_WANTRETURN), "not defined"); is(ES_WANTRETURN(), 4096, "correct value autoloaded"); ok(defined(&ES_WANTRETURN),"constant defined after calling it"); can_ok('main', 'ES_WANTRETURN'); --- NEW FILE: 70_values.t --- #!perl -w # Win32::GUI::Constants test suite # $Id: 70_values.t,v 1.1 2006/05/13 15:39:30 robertemay Exp $ # # - check that every constant has the expected value use strict; use warnings; BEGIN { $| = 1 } # Autoflush use Test::More; use FindBin; my $file = "$FindBin::Bin/70_values.def"; # See if we have the tests, written by the build process: if(-f $file) { do $file; } else { # The build process should have created the tests plan tests => 1; fail("Missing test definition file: $file"); } --- NEW FILE: 01_load.t --- #!perl -wT # Win32::GUI::Constants test suite # $Id: 01_load.t,v 1.1 2006/05/13 15:39:30 robertemay Exp $ # # - check pre-requsites # - check module loads # - check module has a version 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 => 3 ); # 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::Constants loads, and bail out of all # tests if it doesn't use_ok('Win32::GUI::Constants') or print STDOUT "Bail out! Can't load Win32::GUI::Constants"; # Check that Win32::GUI::Constants has a version ok(defined $Win32::GUI::Constants::VERSION, "Win32::GUI::Constants version check"); --- NEW FILE: 06_export_bytag.t --- #!perl -wT # Win32::GUI::Constants test suite # $Id: 06_export_bytag.t,v 1.1 2006/05/13 15:39:30 robertemay Exp $ # # - check exporting by tag use strict; use warnings; BEGIN { $| = 1 } # Autoflush use Test::More tests => 8; use Win32::GUI::Constants qw(:all); # Test exporting can_ok("main", "ES_WANTRETURN"); can_ok("main", "ERROR"); ok(!defined(&ES_WANTRETURN), "ES_WANTRETURN constant not defined"); is(ES_WANTRETURN, 4096, "correct value"); ok(defined(&ES_WANTRETURN), "ES_WANTRETURN constant defined after calling it"); ok(!defined(&ERROR), "ERROR constant not defined"); is(ERROR, 0, "correct value"); ok(defined(&ERROR), "ERROR constant defined after calling it"); --- NEW FILE: 51_tags_all.t --- #!perl -wT # Win32::GUI::Constants test suite # $Id: 51_tags_all.t,v 1.1 2006/05/13 15:39:30 robertemay Exp $ # use strict; use warnings; BEGIN { $| = 1 } # Autoflush # Check that the :all export tag actually exports all the tags use Test::More tests => 2; require Win32::GUI::Constants::Tags; require Win32::GUI::Constants; my @TAGS = @{Win32::GUI::Constants::Tags::tag('all')}; my @ALL = @{Win32::GUI::Constants::_export_ok()}; #both lists the same size? ok(@TAGS == @ALL, ":all is correct size"); #both lists contain the same items? my %h; for my $item (@TAGS, @ALL) { $h{$item}++; } my @errors; for my $item (keys %h) { next if $h{$item} == 2; push @errors, $item; } ok(!@errors, "Lists have no differing items (@errors)"); --- NEW FILE: 08_exportpkg.t --- #!perl -wT # Win32::GUI::Constants test suite # $Id: 08_exportpkg.t,v 1.1 2006/05/13 15:39:30 robertemay Exp $ # # - check we can export to a specified package use strict; use warnings; BEGIN { $| = 1 } # Autoflush use Test::More tests => 4; use Win32::GUI::Constants (-exportpkg => 'Cnst', 'CW_USEDEFAULT'); # Test exporting of constant can_ok("Cnst", "CW_USEDEFAULT"); ok(!defined(&Cnst::CW_USEDEFAULT), "default constant not defined"); is(Cnst::CW_USEDEFAULT, 2147483648, "correct value"); ok(defined(&Cnst::CW_USEDEFAULT), "default constant defined after calling it"); |
From: Robert M. <rob...@us...> - 2006-05-13 15:39:34
|
Update of /cvsroot/perl-win32-gui/Win32-GUI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23641 Modified Files: CHANGELOG MANIFEST Log Message: Add Win32-GUI-Constants directory and module code Index: CHANGELOG =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/CHANGELOG,v retrieving revision 1.81 retrieving revision 1.82 diff -C2 -d -r1.81 -r1.82 *** CHANGELOG 25 Apr 2006 21:38:18 -0000 1.81 --- CHANGELOG 13 May 2006 15:39:30 -0000 1.82 *************** *** 6,9 **** --- 6,13 ---- Win32-GUI ChangeLog =================== + + [Robert May] : 13 May 2006 - Add Win32::GUI::Constants + - add Win32-GUI-Constants directory and new files + - update MANIFEST + + [Robert May] : 25 Apr 2006 - Add Win32::GUI::DropFiles - add Win32-GUI-DropFiles directory and new files Index: MANIFEST =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI/MANIFEST,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** MANIFEST 25 Apr 2006 21:38:18 -0000 1.15 --- MANIFEST 13 May 2006 15:39:30 -0000 1.16 *************** *** 142,145 **** --- 142,180 ---- UpDown.xs vsplit.cur + Win32-GUI-Constants/Constants.PL + Win32-GUI-Constants/Constants.pm + Win32-GUI-Constants/Constants.xs + Win32-GUI-Constants/ConstantsRC.PL + Win32-GUI-Constants/demos/ConstantsDemo.pl + Win32-GUI-Constants/hash/lookupa.c + Win32-GUI-Constants/hash/lookupa.h + Win32-GUI-Constants/hash/Makefile.PL + Win32-GUI-Constants/hash/perfect.c + Win32-GUI-Constants/hash/perfect.h + Win32-GUI-Constants/hash/perfhex.c + Win32-GUI-Constants/hash/README + Win32-GUI-Constants/hash/recycle.c + Win32-GUI-Constants/hash/recycle.h + Win32-GUI-Constants/hash/standard.h + Win32-GUI-Constants/Makefile.PL + Win32-GUI-Constants/ppport.h + Win32-GUI-Constants/t/01_load.t + Win32-GUI-Constants/t/02_default.t + Win32-GUI-Constants/t/03_inline.t + Win32-GUI-Constants/t/04_noexport.t + Win32-GUI-Constants/t/05_export_byname.t + Win32-GUI-Constants/t/06_export_bytag.t + Win32-GUI-Constants/t/07_nothing.t + Win32-GUI-Constants/t/08_exportpkg.t + Win32-GUI-Constants/t/09_autoload.t + Win32-GUI-Constants/t/10_inherit.t + Win32-GUI-Constants/t/50_tags_compatability_win32_gui.t + Win32-GUI-Constants/t/51_tags_all.t + Win32-GUI-Constants/t/52_tags.t + Win32-GUI-Constants/t/70_values.t + Win32-GUI-Constants/t/71_invalid_values.t + Win32-GUI-Constants/t/98_pod.t + Win32-GUI-Constants/t/99_pod_coverage.t + Win32-GUI-Constants/Tags.pm Win32-GUI-DropFiles/demos/DropFilesDemo.pl Win32-GUI-DropFiles/DropFiles.pm |
From: Robert M. <rob...@us...> - 2006-05-13 15:39:34
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Constants/demos In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23641/Win32-GUI-Constants/demos Added Files: ConstantsDemo.pl Log Message: Add Win32-GUI-Constants directory and module code --- NEW FILE: ConstantsDemo.pl --- #!perl -w use strict; use warnings; use Win32::GUI(); use Win32::GUI::Constants qw(CW_USEDEFAULT); my $num_constants = @{Win32::GUI::Constants::_export_ok()}; my $mw = Win32::GUI::Window->new( -title => "Win32::GUI::Constants", -left => CW_USEDEFAULT, -size => [580,300], -resizable => 0, -maximizebox => 0, ); $mw->AddListbox( -name => 'LB', -pos => [10,10], -size => [230,$mw->ScaleHeight()-10], -vscroll => 1, -onSelChange => \&newSelection, ); $mw->LB->Add(sort @{Win32::GUI::Constants::_export_ok()}); $mw->AddButton( -name => 'BT', -text => 'Exit', -size => [80,25], -left => $mw->ScaleWidth()-90, -top => $mw->LB->Top()+$mw->LB->Height()-25, -onClick => sub{-1;}, ); $mw->AddGroupbox( -name => 'GB', -title => 'Information', -pos => [250,10], -size => [$mw->ScaleWidth()-260, $mw->BT->Top()-20], ); $mw->AddLabel( -name => 'LBL', -left => $mw->GB->Left()+10, -top => $mw->GB->Top()+20, -width => $mw->GB->ScaleWidth()-20, -height => $mw->GB->ScaleHeight()-40, ); $mw->LBL->Text(get_label_text()); $mw->Show(); Win32::GUI::Dialog(); $mw->Hide(); exit(0); sub newSelection { my $lb = shift; # Set the label text to reflect the change my $item = $lb->GetCurSel(); my $text = $lb->GetText($item); $lb->GetParent()->LBL->Text(get_label_text($text)); return 1; } sub get_label_text { my $name = shift; my $text = "Select one of the $num_constants constants from the list to the left to see details about it below.\r\n\r\n"; $name = 'Not selected' unless defined $name; $text .= sprintf("%-*s\t%s\r\n\r\n", 10, "Constant:", $name); my $value = Win32::GUI::Constants::constant($name); if(defined $value) { $text .= sprintf("%-*s\t%d\r\n", 10, "Decimal:", $value); $text .= sprintf("%-*s\t0x%08X\r\n", 10, "Hex:", $value); $text .= sprintf("%-*s\t0b%032b\r\n", 10, "Binary:", $value); } return $text; } |
From: Robert M. <rob...@us...> - 2006-05-13 15:36:48
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Constants/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22652/t Log Message: Directory /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Constants/t added to the repository |
From: Robert M. <rob...@us...> - 2006-05-13 15:36:35
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Constants/hash In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22642/hash Log Message: Directory /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Constants/hash added to the repository |
From: Robert M. <rob...@us...> - 2006-05-13 15:36:24
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Constants/demos In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22627/demos Log Message: Directory /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Constants/demos added to the repository |
From: Robert M. <rob...@us...> - 2006-05-13 15:36:10
|
Update of /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Constants In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22606/Win32-GUI-Constants Log Message: Directory /cvsroot/perl-win32-gui/Win32-GUI/Win32-GUI-Constants added to the repository |