Update of /cvsroot/perl-win32-gui/Win32-GUI-Scintilla In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7886
Modified Files: Changes README Scintilla.pm Scintilla.pm.begin Scintilla.xs Log Message: Fixed bugs which caused crashes and no events firing in perl 5.8.x. Use Scintilla 1.66 Index: Scintilla.xs =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI-Scintilla/Scintilla.xs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Scintilla.xs 1 Nov 2005 10:36:51 -0000 1.1 --- Scintilla.xs 5 Dec 2005 10:37:56 -0000 1.2 *************** *** 3,71 **** /**********************************************************************/ ! #include "EXTERN.h" ! #include "perl.h" ! #include "XSUB.h" ! ! #include <windows.h> ! #include "./include/Scintilla.h" ! ! /*====================================================================*/ ! /* W I N 3 2 : : G U I */ ! /*====================================================================*/ ! ! #define MAX_WINDOW_NAME 128 ! ! /* ! * Various definitions to accomodate the different Perl versions around ! */ ! ! #ifdef PERL_OBJECT ! # ifdef _INC_WIN32_PERL5 ! # pragma message( "\n*** Using the 5.005 Perl Object CPerlObj class.\n" ) ! # define NOTXSPROC CPerlObj *pPerl, ! # define NOTXSCALL pPerl, ! # define CPerl CPerlObj ! # else // not _INC_WIN32_PERL5 ! # pragma message( "\n*** Using the 5.004 Perl Object CPerl class.\n" ) ! # define NOTXSPROC CPerl *pPerl, ! # define NOTXSCALL pPerl, ! # endif // _INC_WIN32_PERL5 ! #else ! # pragma message( "\n*** Using a non-Object Core Perl.\n" ) ! # define NOTXSPROC ! # define NOTXSCALL ! #endif ! /* ! * what we'll store in GWL_USERDATA ! */ ! typedef struct tagPERLWIN32GUI_USERDATA { ! DWORD dwSize; // struct size (our signature) ! #ifdef PERL_OBJECT ! CPerl *pPerl; // a pointer to the Perl Object ! #endif ! SV* svSelf; // a pointer to ourself ! char szWindowName[MAX_WINDOW_NAME]; // our -name ! BOOL fDialogUI; // are we to intercept dialog messages? ! int iClass; // our (Perl) class ! HACCEL hAcc; // our accelerator table ! HWND hTooltip; ! HCURSOR hCursor; ! DWORD dwPlStyle; ! int iMinWidth; ! int iMaxWidth; ! int iMinHeight; ! int iMaxHeight; ! COLORREF clrForeground; ! COLORREF clrBackground; ! HBRUSH hBackgroundBrush; ! WNDPROC wndprocPreContainer; ! WNDPROC wndprocPreNEM; ! int iEventModel; ! HV* hvEvents; ! DWORD dwEventMask; ! HWND Modal; ! } PERLWIN32GUI_USERDATA, *LPPERLWIN32GUI_USERDATA; BOOL ProcessEventError(NOTXSPROC char *Name, int* PerlResult) { --- 3,13 ---- /**********************************************************************/ ! #define PERL_NO_GET_CONTEXT /* we want efficiency */ ! //Bring in the Win32-GUI header files, this defines common structures that ! //we will need/use + #include "../Win32-GUI/GUI.h" + #include "./include/Scintilla.h" BOOL ProcessEventError(NOTXSPROC char *Name, int* PerlResult) { *************** *** 119,123 **** ! int DoEvent (NOTXSPROC char *Name, UINT code, pSCNotification evt) { int PerlResult; int count; --- 61,65 ---- ! int DoEvent_Scintilla (NOTXSPROC char *Name, UINT code, pSCNotification evt) { int PerlResult; int count; *************** *** 257,265 **** if (memcmp (Name, "Scintilla", 9) == 0) { - - // Perl contexte - #ifdef PERL_OBJECT - CPerl *pPerl; - #endif LPPERLWIN32GUI_USERDATA perlud = (LPPERLWIN32GUI_USERDATA) GetWindowLong(lpnmhdr->hwndFrom, GWL_USERDATA); --- 199,202 ---- *************** *** 267,274 **** { ! #ifdef PERL_OBJECT ! pPerl = perlud->pPerl; ! #endif ! // Build name strcpy(Name, "main::"); --- 204,209 ---- { ! //fetch the perl context from perlud ! PERLUD_FETCH; // Build name strcpy(Name, "main::"); *************** *** 276,280 **** strcat(Name, "_Notify"); ! DoEvent(NOTXSCALL Name, lpnmhdr->code, (pSCNotification) msg->lParam); } } --- 211,215 ---- strcat(Name, "_Notify"); ! DoEvent_Scintilla(NOTXSCALL Name, lpnmhdr->code, (pSCNotification) msg->lParam); } } *************** *** 289,311 **** if (memcmp (Name, "Scintilla", 9) == 0) { ! // Perl contexte ! #ifdef PERL_OBJECT ! CPerl *pPerl; ! #endif LPPERLWIN32GUI_USERDATA perlud = (LPPERLWIN32GUI_USERDATA) GetWindowLong((HWND) msg->lParam, GWL_USERDATA); if (perlud != NULL) { ! ! #ifdef PERL_OBJECT ! pPerl = perlud->pPerl; ! #endif // Build name strcpy(Name, "main::"); strcat(Name, (char *) perlud->szWindowName); - switch (HIWORD(msg->wParam)) { case SCEN_CHANGE : ! strcat(Name, "_Change"); DoEvent_Generic (NOTXSCALL Name); break; --- 224,240 ---- if (memcmp (Name, "Scintilla", 9) == 0) { ! // Perl contexte LPPERLWIN32GUI_USERDATA perlud = (LPPERLWIN32GUI_USERDATA) GetWindowLong((HWND) msg->lParam, GWL_USERDATA); if (perlud != NULL) { ! //fetch the perl context from perlud ! PERLUD_FETCH; // Build name strcpy(Name, "main::"); strcat(Name, (char *) perlud->szWindowName); switch (HIWORD(msg->wParam)) { case SCEN_CHANGE : ! strcat(Name, "_Change"); DoEvent_Generic (NOTXSCALL Name); break; Index: README =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI-Scintilla/README,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** README 1 Nov 2005 10:36:51 -0000 1.1 --- README 5 Dec 2005 10:37:56 -0000 1.2 *************** *** 1,3 **** ! Win32::GUI::Scintilla version 1.7 ================================= --- 1,3 ---- ! Win32::GUI::Scintilla version 1.8 ================================= *************** *** 21,25 **** This module requires these other modules and libraries: ! Win32::GUI Scintilla (http:/www.scintilla.org/) --- 21,25 ---- This module requires these other modules and libraries: ! Win32::GUI (http://sourceforge.net/projects/perl-win32-gui) Scintilla (http:/www.scintilla.org/) *************** *** 27,30 **** --- 27,31 ---- See: http://perso.club-internet.fr/rocherl/Win32GUI.html + See: http://sourceforge.net/projects/perl-win32-gui COPYRIGHT AND LICENCE Index: Changes =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI-Scintilla/Changes,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Changes 1 Nov 2005 10:36:51 -0000 1.1 --- Changes 5 Dec 2005 10:37:56 -0000 1.2 *************** *** 1,4 **** --- 1,8 ---- Revision history for Perl extension Scintilla. + 1.8 05/12/2005 + - Fixed bugs which caused crashes and no events firing in perl 5.8.x + - Use Scintilla 1.66 + 1.7 28/02/2004 - Use Scintilla 1.59 Index: Scintilla.pm.begin =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI-Scintilla/Scintilla.pm.begin,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Scintilla.pm.begin 1 Nov 2005 10:36:51 -0000 1.1 --- Scintilla.pm.begin 5 Dec 2005 10:37:56 -0000 1.2 *************** *** 17,21 **** @ISA = qw(Exporter DynaLoader Win32::GUI::Window); ! $VERSION = '1.7'; bootstrap Win32::GUI::Scintilla $VERSION; --- 17,21 ---- @ISA = qw(Exporter DynaLoader Win32::GUI::Window); ! $VERSION = '1.8'; bootstrap Win32::GUI::Scintilla $VERSION; *************** *** 31,36 **** END { # Free Scintilla DLL - Win32::GUI::FreeLibrary($SCINTILLA_DLL); Win32::GUI::Scintilla::_UnInitialise(); } --- 31,37 ---- END { # Free Scintilla DLL Win32::GUI::Scintilla::_UnInitialise(); + #Win32::GUI::FreeLibrary($SCINTILLA_DLL); + #The above line causes some scripts to crash - such as test2.pl in the samples when running under 5.8.7 } Index: Scintilla.pm =================================================================== RCS file: /cvsroot/perl-win32-gui/Win32-GUI-Scintilla/Scintilla.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Scintilla.pm 1 Nov 2005 10:36:51 -0000 1.1 --- Scintilla.pm 5 Dec 2005 10:37:56 -0000 1.2 *************** *** 17,21 **** @ISA = qw(Exporter DynaLoader Win32::GUI::Window); ! $VERSION = '1.7'; bootstrap Win32::GUI::Scintilla $VERSION; --- 17,21 ---- @ISA = qw(Exporter DynaLoader Win32::GUI::Window); ! $VERSION = '1.8'; bootstrap Win32::GUI::Scintilla $VERSION; *************** *** 31,36 **** END { # Free Scintilla DLL - Win32::GUI::FreeLibrary($SCINTILLA_DLL); Win32::GUI::Scintilla::_UnInitialise(); } --- 31,37 ---- END { # Free Scintilla DLL Win32::GUI::Scintilla::_UnInitialise(); + #Win32::GUI::FreeLibrary($SCINTILLA_DLL); + #The above line causes some scripts to crash - such as test2.pl in the samples when running under 5.8.7 }