Update of /cvsroot/perl-win32-gui/Win32-GUI
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22554
Modified Files:
CHANGELOG Combobox.xs GUI.pm GUI.xs
Log Message:
Bug Fixes
Index: GUI.xs
===================================================================
RCS file: /cvsroot/perl-win32-gui/Win32-GUI/GUI.xs,v
retrieving revision 1.62
retrieving revision 1.63
diff -C2 -d -r1.62 -r1.63
*** GUI.xs 16 Jul 2006 13:02:29 -0000 1.62
--- GUI.xs 31 Oct 2006 22:24:15 -0000 1.63
***************
*** 2882,2886 ****
###########################################################################
# (@)METHOD:AbsLeft([LEFT])
! # Gets or sets the absolute left co-ordinate of an object.
#
# See also Left()
--- 2882,2886 ----
###########################################################################
# (@)METHOD:AbsLeft([LEFT])
! # Gets or sets the absolute left (screen) co-ordinate of a window.
#
# See also Left()
***************
*** 2891,2920 ****
PREINIT:
RECT myRect;
PPCODE:
if(!GetWindowRect(handle, &myRect)) {
XSRETURN_UNDEF;
! } else {
! if(items > 1) {
! if(SetWindowPos(
! handle, (HWND) NULL,
! (int) SvIV(ST(1)), (int) myRect.top, (int) myRect.right,
(int) myRect.bottom,
! SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOSIZE | SWP_DEFERERASE
! )) {
! XSRETURN_YES;
! }
! else {
! XSRETURN_NO;
! }
}
else {
! EXTEND(SP, 1);
! XST_mIV(0, myRect.left);
! XSRETURN(1);
}
}
###########################################################################
# (@)METHOD:AbsTop([TOP])
! # Gets or sets the absolute top co-ordinate of an object.
#
# See also Top()
--- 2891,2926 ----
PREINIT:
RECT myRect;
+ HWND parent;
PPCODE:
if(!GetWindowRect(handle, &myRect)) {
XSRETURN_UNDEF;
! }
!
! /* Set */
! if(items > 1) {
! myRect.left = SvIV(ST(1));
!
! /* If we're a child window convert to parent's client co-ordinates */
! if(parent = GetAncestor(handle, GA_PARENT)) {
! ScreenToClient(parent, (LPPOINT)&myRect);
! }
!
! if(SetWindowPos(handle, NULL, (int)myRect.left, (int)myRect.top,
! 0, 0, SWP_NOZORDER | SWP_NOSIZE)) {
! XSRETURN_YES;
}
else {
! XSRETURN_NO;
}
}
+ /* Get */
+ EXTEND(SP, 1);
+ XST_mIV(0, myRect.left);
+ XSRETURN(1);
+
###########################################################################
# (@)METHOD:AbsTop([TOP])
! # Gets or sets the absolute top (screen) co-ordinate of a window.
#
# See also Top()
***************
*** 2925,2951 ****
PREINIT:
RECT myRect;
PPCODE:
if(!GetWindowRect(handle, &myRect)) {
XSRETURN_UNDEF;
! } else {
! if(items > 1) {
! if(SetWindowPos(
! handle, (HWND) NULL,
! (int) myRect.left, (int) SvIV(ST(1)), (int) myRect.right,
(int) myRect.bottom,
! SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOSIZE | SWP_DEFERERASE
! )) {
! XSRETURN_YES;
! }
! else {
! XSRETURN_NO;
! }
}
else {
! EXTEND(SP, 1);
! XST_mIV(0, myRect.top);
! XSRETURN(1);
}
}
###########################################################################
# (@)METHOD:ScreenToClient(X, Y)
--- 2931,2963 ----
PREINIT:
RECT myRect;
+ HWND parent;
PPCODE:
if(!GetWindowRect(handle, &myRect)) {
XSRETURN_UNDEF;
! }
!
! /* Set */
! if(items > 1) {
! myRect.top = SvIV(ST(1));
!
! /* If we're a child window convert to parent's client co-ordinates */
! if(parent = GetAncestor(handle, GA_PARENT)) {
! ScreenToClient(parent, (LPPOINT)&myRect);
! }
!
! if(SetWindowPos(handle, NULL, (int)myRect.left, (int)myRect.top,
! 0, 0, SWP_NOZORDER | SWP_NOSIZE)) {
! XSRETURN_YES;
}
else {
! XSRETURN_NO;
}
}
+ /* Get */
+ EXTEND(SP, 1);
+ XST_mIV(0, myRect.top);
+ XSRETURN(1);
+
###########################################################################
# (@)METHOD:ScreenToClient(X, Y)
Index: Combobox.xs
===================================================================
RCS file: /cvsroot/perl-win32-gui/Win32-GUI/Combobox.xs,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** Combobox.xs 16 Oct 2005 08:03:20 -0000 1.7
--- Combobox.xs 31 Oct 2006 22:24:15 -0000 1.8
***************
*** 552,563 ****
###########################################################################
# (@)METHOD:SetEditSel(START,END)
! # Select characters in the textfield.
LRESULT
SetEditSel(handle,start,end)
HWND handle
! WPARAM start
! WPARAM end
CODE:
! RETVAL = SendMessage(handle, CB_SETEDITSEL, start, (LPARAM) end);
OUTPUT:
RETVAL
--- 552,576 ----
###########################################################################
# (@)METHOD:SetEditSel(START,END)
! # Select characters in the textfield. START and END are the
! # (zero-based) index of the characters to be selected. START
! # is the index of the first character to be selected, and END
! # is the index of the first character following the selection.
! # For example to select the first 4 characters:
! #
! # $combobox->SetEditSel(0,4);
! #
! # If START is -1, the any selection is removed. If END is -1,
! # then the selection is from START to the last character in the
! # textfield.
! #
! # Returns 1 on success, 0 on failure and -1 if sent to a
! # Combobox that does not have a textfield (C<-dropdownlist => 1>).
LRESULT
SetEditSel(handle,start,end)
HWND handle
! UINT start
! UINT end
CODE:
! RETVAL = SendMessage(handle, CB_SETEDITSEL, 0, MAKELPARAM(start, end));
OUTPUT:
RETVAL
Index: GUI.pm
===================================================================
RCS file: /cvsroot/perl-win32-gui/Win32-GUI/GUI.pm,v
retrieving revision 1.56
retrieving revision 1.57
diff -C2 -d -r1.56 -r1.57
*** GUI.pm 15 Oct 2006 14:07:45 -0000 1.56
--- GUI.pm 31 Oct 2006 22:24:15 -0000 1.57
***************
*** 20,24 ****
# STATIC OBJECT PROPERTIES
#
! $VERSION = "1.04"; # For MakeMaker
$XS_VERSION = $VERSION; # For dynaloader
$VERSION = eval $VERSION; # For Perl (see perldoc perlmodstyle)
--- 20,24 ----
# STATIC OBJECT PROPERTIES
#
! $VERSION = "1.04_01"; # For MakeMaker
$XS_VERSION = $VERSION; # For dynaloader
$VERSION = eval $VERSION; # For Perl (see perldoc perlmodstyle)
***************
*** 2774,2782 ****
$self->{-balloon_icon} = $args{-balloon_icon};
! my $result = Win32::GUI::NotifyIcon::_Add($self->{-handle}, %args);
!
! return undef unless $result;
!
! # Only modify parent if we were created successfully
# Store name in parent's notifyicons hash
$window->{-notifyicons}->{$args{-id}} = $args{-name};
--- 2774,2780 ----
$self->{-balloon_icon} = $args{-balloon_icon};
! # ParseNotifyIconOptions() needs these values to be set in order
! # to correctly sore NEM events, so set them before calling
! # _Add().
# Store name in parent's notifyicons hash
$window->{-notifyicons}->{$args{-id}} = $args{-name};
***************
*** 2784,2788 ****
$window->{$args{-name}} = $self;
! return $self;
}
--- 2782,2794 ----
$window->{$args{-name}} = $self;
! my $result = Win32::GUI::NotifyIcon::_Add($self->{-handle}, %args);
!
! return $self if $result;
!
! # Failed to create the Notfiy Icon, so tidy up parent
! delete $window->{-notifyicons}->{$args{-id}};
! delete $window->{$args{-name}};
!
! return; # return undef or empty list
}
Index: CHANGELOG
===================================================================
RCS file: /cvsroot/perl-win32-gui/Win32-GUI/CHANGELOG,v
retrieving revision 1.103
retrieving revision 1.104
diff -C2 -d -r1.103 -r1.104
*** CHANGELOG 15 Oct 2006 14:07:45 -0000 1.103
--- CHANGELOG 31 Oct 2006 22:24:15 -0000 1.104
***************
*** 6,9 ****
--- 6,18 ----
Win32-GUI ChangeLog
===================
+ + [Robert May] : 30 October 2006 - Bug Fixes
+ - GUI.pm - up version to 1.04_01
+ - GUI.pm - Fix NEM events for NotifyIcon class (Tracker: 1585293)
+ - Combobox.xs - Fix SetEditSel method (Tracker: 1586617)
+ - GUI.xs - Fix AbsLeft and AbsTop method (Tracker: 1578492)
+ --- Win32::GUI::ReleaseNotes ---
+ - RN_1_05.pod - add file
+ - ReleaseNotes.pod - add 1.05 release notes
+
+ [Robert May] : 15 October 2006 - 1.04 Release
- Win32::GUI 1.04 release. Up versions, fix docs etc.