# # Copyright (c) 1992-1994 The Regents of the University of California. # Copyright (c) 1994 Sun Microsystems, Inc. # Copyright (c) 1995-2004 Nick Ing-Simmons. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself, subject # to additional disclaimer in Tk/license.terms due to partial # derivation from Tk8.0 sources. # package Tk; require 5.007; use Tk::Event (); use AutoLoader qw(AUTOLOAD); use DynaLoader; use Cwd(); use base qw(Exporter DynaLoader); *fileevent = \&Tk::Event::IO::fileevent; use Encode; $Tk::encodeStopOnError = Encode::FB_QUIET(); $Tk::encodeFallback = Encode::PERLQQ(); # Encode::FB_DEFAULT(); our %font_encoding = ('jis0208' => 'jis0208-raw', 'jis0212' => 'jis0212-raw', 'ksc5601' => 'ksc5601-raw', 'gb2312' => 'gb2312-raw', 'unicode' => 'ucs-2le', ); BEGIN { if($^O eq 'cygwin') { require Tk::Config; $Tk::platform = $Tk::Config::win_arch; $Tk::platform = 'unix' if $Tk::platform eq 'x'; } else { $Tk::platform = ($^O eq 'MSWin32') ? $^O : 'unix'; } }; $Tk::tearoff = 1 if ($Tk::platform eq 'unix'); @EXPORT = qw(Exists Ev exit MainLoop DoOneEvent tkinit); @EXPORT_OK = qw(NoOp after *widget *event lsearch catch $XS_VERSION DONT_WAIT WINDOW_EVENTS FILE_EVENTS TIMER_EVENTS IDLE_EVENTS ALL_EVENTS NORMAL_BG ACTIVE_BG SELECT_BG SELECT_FG TROUGH INDICATOR DISABLED BLACK WHITE); %EXPORT_TAGS = (eventtypes => [qw(DONT_WAIT WINDOW_EVENTS FILE_EVENTS TIMER_EVENTS IDLE_EVENTS ALL_EVENTS)], variables => [qw(*widget *event)], colors => [qw(NORMAL_BG ACTIVE_BG SELECT_BG SELECT_FG TROUGH INDICATOR DISABLED BLACK WHITE)], ); use strict; use Carp; # Record author's perforce depot record $Tk::CHANGE = q$Change: 3279 $; # $tk_version and $tk_patchLevel are reset by pTk when a mainwindow # is created, $VERSION is checked by bootstrap $Tk::version = '8.4'; $Tk::patchLevel = '8.4'; $Tk::VERSION = '804.027'; $Tk::XS_VERSION = $Tk::VERSION; $Tk::strictMotif = 0;