Tk-OS2src

 view release on metacpan or  search on metacpan

INSTALL  view on Meta::CPAN

 
+#if defined(__EMX__) && (defined(__WIN32__) || defined(__PM__))
+extern int (*Tcl_WaitForEventProc)(int, fd_mask *, Tcl_Time *);
+#  define get_pEvenProc()		((IV)&Tcl_WaitForEventProc)
+#else
+#  define get_pEvenProc()		0
+#endif
+
 extern XSdec(XS_Tk__Event_INIT);
 XS(XS_Tk__Event_INIT)
 {
@@ -1318,6 +1325,9 @@ void
 Event_CleanupGlue()
 
 MODULE = Tk::Event	PACKAGE = Tk::Event
+
+IV
+get_pEvenProc()
 
 PROTOTYPES: DISABLE
 
--- ./Tk.xs-pre	Mon May 28 00:01:44 2001
+++ ./Tk.xs	Mon May 28 00:01:54 2001
@@ -127,6 +127,14 @@ PointToWindow(Tk_Window tkwin, int x, in
  return (IV) win;
 }
 
+#if defined(__EMX__) && (defined(__WIN32__) || defined(__PM__))
+typedef int (**WaitForEventProc_p)(int, fd_mask *, Tcl_Time *);
+extern WaitForEventProc_p Tcl_WaitForEventProc_p;
+#define set_pEvenProc(addr)	(Tcl_WaitForEventProc_p = (WaitForEventProc_p)(void*)(addr))
+#else
+#define set_pEvenProc(addr)
+#endif
+
 
 MODULE = Tk	PACKAGE = Tk	PREFIX = Const_
 PROTOTYPES: ENABLE
@@ -861,6 +869,10 @@ SV *	arg
 void
 ClearErrorInfo(win)
 SV *	win
+
+void
+set_pEvenProc(addr)
+IV	addr
 
 BOOT:
  {
--- ./Tk.pm-pre	Tue May 15 06:43:00 2001
+++ ./Tk.pm	Mon May 28 00:04:00 2001
@@ -73,6 +73,10 @@ my $boot_time = timeofday();
 Preload(DynaLoader::dl_findfile('-L/usr/openwin/lib','-lX11'))
   if (NeedPreload() && -d '/usr/openwin/lib');
 
+# OS/2 PM uses different event loops in presense and absense of windows
+# Allow window creation code to substitute 
+set_pEvenProc(Tk::Event::get_pEvenProc()) if $^O eq 'os2';
+
 use Tk::Submethods ('option'    =>  [qw(add get clear readfile)],
                     'clipboard' =>  [qw(clear append)]
                    );
--- ./pTk/mTk/unix/tkUnixPort.h~	Thu Mar 25 16:51:56 1999
+++ ./pTk/mTk/unix/tkUnixPort.h	Fri Apr 16 01:28:50 1999
@@ -93,7 +93,9 @@
 #include <X11/cursorfont.h>
 #include <X11/keysym.h>
 #include <X11/Xatom.h>
-#include <X11/Xproto.h>
+#ifndef __PM__
+#  include <X11/Xproto.h>
+#endif
 #include <X11/Xresource.h>
 #include <X11/Xutil.h>
 
--- ./pTk/mTk/tixGeneric/tixMwm.c~	Sat Aug  1 05:22:56 1998
+++ ./pTk/mTk/tixGeneric/tixMwm.c	Fri Apr 16 01:28:42 1999
@@ -17,7 +17,9 @@
 #include "tkVMacro.h"
 #include <X11/Xlib.h>
 #include <X11/Xatom.h>
-#include <X11/Xproto.h>
+#ifndef __PM__
+#  include <X11/Xproto.h>
+#endif
 #include <X11/Xutil.h>
 
 
--- ./pTk/mTk/additions/imgWindow.c~	Sat Apr  3 12:26:44 1999
+++ ./pTk/mTk/additions/imgWindow.c	Fri Apr 16 01:30:06 1999
@@ -15,7 +15,9 @@
 #include "imgInt.h"
 #include "X11/Xutil.h"
 #ifndef	__WIN32__
-#   include "X11/Xproto.h"
+#   ifndef __PM__
+#      include "X11/Xproto.h"
+#   endif
 #else
 #   include <windows.h>
 #   include "X11/Xlib.h"
--- ./Tk/MMutil.pm~	Fri Apr 16 01:33:34 1999
+++ ./Tk/MMutil.pm	Fri Apr 16 01:24:16 1999
@@ -406,6 +406,14 @@ sub find_subdir
       {
        warn "Skip $dir on $win_arch\n"
       }
+     elsif (($win_arch ne 'x') and -f "$dir/OnlyUnix.exc")
+      {
+       warn "Skip $dir on $win_arch\n"
+      }
+     elsif (($win_arch !~ /win/) and -f "$dir/OnlyWin.exc")
+      {
+       warn "Skip $dir on $win_arch\n"
+      }
      else
       {
        $dir{$dir} = 1
--- ./MANIFEST~	Mon Apr  5 14:58:52 1999
+++ ./MANIFEST	Fri Apr 16 01:38:06 1999
@@ -31,7 +31,7 @@ DragDrop/DragDrop/SunSite.pm



( run in 2.093 seconds using v1.01-cache-2.11-cpan-84e82930d8c )