summaryrefslogtreecommitdiffstats
path: root/macosx/tclets.r
diff options
context:
space:
mode:
authordas <das>2005-08-09 07:39:48 (GMT)
committerdas <das>2005-08-09 07:39:48 (GMT)
commitb8c4ee9a5df85da2ac51dfea85177ffa458c2a50 (patch)
treeb77a27b7d580d802ccbfcb5442bba1206c3ff248 /macosx/tclets.r
parentce8d7d22d0f5eb10e00df422dffb587c95481678 (diff)
downloadtk-b8c4ee9a5df85da2ac51dfea85177ffa458c2a50.zip
tk-b8c4ee9a5df85da2ac51dfea85177ffa458c2a50.tar.gz
tk-b8c4ee9a5df85da2ac51dfea85177ffa458c2a50.tar.bz2
* macosx/tkMacOSXCarbonEvents.c (new): moved carbon events code into
* macosx/tkMacOSXHLEvents.c: new file like on HEAD, * macosx/tkMacOSXInit.c (TkpInit): initialize carbon event handlers * macosx/tkMacOSXInt.h: in TkpInit(), add new source * unix/Makefile.in: file to Makefile.in. * macosx/tkMacOSXCarbonEvents.c (AppEventHandlerProc): handle carbon events sent directly to application event target via the general TkMacOSXProcessEvent() in the same way as events posted to the event loop. Moved existing app event handlers to tkMacOSXWindowEvent.c. (TkMacOSXInitCarbonEvents): register our application event handler for kEventWindowExpanded events to deal with uncollapsing from the dock. * macosx/tkMacOSXEvent.h: made TkMacOSXProcessEvent() non-static, added * macosx/tkMacOSXEvent.c: new interp field to TkMacOSXEvent struct for use by app event handler. * macosx/tkMacOSXMouseEvent.c (TkMacOSXProcessMouseEvent): retrieve current window, partCode, modifiers and local cursor position from carbon mouse event if possible. Use new static GenerateButtonEvent() taking a MouseEventData struct instead of TkGenerateButtonEvent() to avoid recomputing already known values. Move process activation on MouseDown into BringWindowForward() to allow clicking on window titlebar widgets without activating process. Move code dealing with clicks in window titelbar into separate function HandleWindowTitlebarMouseDown() to avoid code duplication. Avoid repeated calls to TkMacOSXGetXWindow() by storing result in MouseEventData struct. (TkMacOSXButtonKeyState, XQueryPointer): try to get button and modifier state from currently processed carbon event (to avoid unnecessary IPC with the window server), otherwise use modern carbon API to get this info instead of Button() and GetKeys(); only retrieve info caller asks for (via non-NULL ptr passed to XQueryPointer). (ButtonModifiers2State): new static function converting carbon button and modifier state into tk state, allows detection of more than 3 mouse buttons (tk supports up to 5) and of NumLock and Fn modifier keys (NumLock is mapped to Mod3 and Fn to Mod4). * macosx/tkMacOSXWindowEvent.c (TkMacOSXProcessApplicationEvent): handle kEventWindowExpanded event to deal with window uncollapsing from the dock by generating tk Map event, handle kEventAppHidden and kEventAppShown events (moved here from tkMacOSXCarbonEvents.c). * macosx/tkMacOSXSubwindows.c (XUnmapWindow): only hide window when it is not iconified to avoid window flashing on collapse. * macosx/tkMacOSXWm.c: replaced Tk_DoWhenIdle() by Tcl_DoWhenIdle(). (TkMacOSXZoomToplevel): remove call to TrackBox(), now done in HandleWindowTitlebarMouseDown() in tkMacOSXMouseEvent.c. (TkpWmSetState): avoid window flashing on collapse by unmapping after calling CollapseWindow(); only uncollapse window if it is collapsed. * generic/tkInt.decls: changed TkMacOSXZoomToplevel() signature. * generic/tkIntPlatDecls.h: * macosx/tkMacOSXKeyEvent.c (TkMacOSXProcessKeyboardEvent): only call GetMenuItemCommandID() on KeyDown or KeyRepeat events. * macosx/tkMacOSXMenu.c (ReconfigureMacintoshMenu): remove call to obsolete AppendResMenu() API. * macosx/tkMacOSXKeyEvent.c: replaced all direct uses of expensive * macosx/tkMacOSXMenu.c: GetMouse() and TkMacOSXButtonKeyState() * macosx/tkMacOSXMenus.c: APIs by calls to XQueryPointer() * macosx/tkMacOSXMouseEvent.c: * macosx/tkMacOSXScale.c: * macosx/tkMacOSXScrlbr.c: * macosx/tkMacOSXWm.c: * macosx/tkMacOSXDialog.c: replaced use of FrontNonFloatingWindow() * macosx/tkMacOSXKeyEvent.c: by ActiveNonFloatingWindow() as * macosx/tkMacOSXMenu.c: recommended by Carbon docs. * macosx/tkMacOSXMenus.c: * macosx/tkMacOSXSubwindows.c: * macosx/tkMacOSXWm.c: * macosx/tkMacOSXDialog.c: fixed warnings * macosx/tkMacOSXTest.c: * macosx/tkMacOSXCarbonEvents.c: added CVS Id line to file header. * macosx/tkMacOSXDebug.c: * macosx/tkMacOSXDebug.h: * macosx/tkMacOSXEntry.c: * macosx/tkMacOSXEvent.h: * macosx/tkMacOSXKeyEvent.c: * macosx/tkMacOSXMouseEvent.c: * macosx/tkMacOSXWindowEvent.c: * macosx/tkMacOSXWm.h: * macosx/tkMacOSXEmbed.c: replaced all uses of panic() with Tcl_Panic() * macosx/tkMacOSXFont.c: (sync with HEAD). * macosx/tkMacOSXMenus.c: * macosx/tkMacOSXSubwindows.c: * macosx/tkMacOSXWm.c: * macosx/tkMacOSXXStubs.c: * macosx/tkMacOSXInt.h: sync with HEAD changes of 2005-03-14. * macosx/tkMacOSXSubwindows.c: * macosx/tclets.r (removed): sync with HEAD. * macosx/tkMacOSXScale.c: * macosx/tkMacOSXPort.h: * library/demos/menu.tcl: removed errant '}'.
Diffstat (limited to 'macosx/tclets.r')
-rw-r--r--macosx/tclets.r172
1 files changed, 0 insertions, 172 deletions
diff --git a/macosx/tclets.r b/macosx/tclets.r
deleted file mode 100644
index ce68db4..0000000
--- a/macosx/tclets.r
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * tclets.r --
- *
- */
-
-/*
- * New style DLOG templates have an extra field for the positioning
- * options for the Dialog Box. We will not use this, for now, so we
- * turn it off here.
- */
-
-#define DLOG_RezTemplateVersion 0
-
-#include <Types.r>
-#include <SysTypes.r>
-#include <AEUserTermTypes.r>
-
-/*
- * We now load the Tclets code into the resource fork
- */
-
-#define TK_LIBRARY_RESOURCES 3000
-
-read 'TEXT' (TK_LIBRARY_RESOURCES+114, "tclshrc", purgeable)
- "::mac:tclets.tcl";
-
-data 'icns' (-16455) {
- $"6963 6E73 0000 08F8 6963 7323 0000 0048" /* icns...ics#...H */
- $"0100 02EE 05CE 09EE 13DE 23FF 47CE 86C6" /* .....#GΆ */
- $"4681 22C2 12C4 0888 0410 0220 0140 0080" /* F"..... .@. */
- $"0100 03EE 07CE 0FEE 1FFE 3FFF 7FFE FFFE" /* ......?. */
- $"7FFF 3FFE 1FFC 0FF8 07F0 03E0 01C0 0080" /* .?...... */
- $"6963 7334 0000 0088 0000 000F 0000 0000" /* ics4........... */
- $"0000 00FC F6D0 FFF0 0000 0FC5 DD00 F6F0" /* ....... */
- $"0000 FCCD 66F0 F6F0 000F CC6E 66CE F6F0" /* ..f..nf */
- $"00FC CC6E 67EF F6FF 0FCC CD66 66CC F6F0" /* .ng.ff */
- $"FCCC CDDC 66CC CFA0 0FCC CD6C EDCC CC0F" /* fϠ.l. */
- $"00FC CC6C E6CC CCF0 000F CC6C 66CC CF00" /* .l..lf. */
- $"0000 FCCC 6CCC F000 0000 0FCC DCCF 0000" /* ..l...... */
- $"0000 00FD DCF0 0000 0000 000F CF00 0000" /* ............ */
- $"0000 0000 F000 0000 6963 7338 0000 0108" /* .......ics8.... */
- $"0000 0000 0000 00FF 0000 0000 0000 0000" /* ............... */
- $"0000 0000 0000 FF2B FFEC 7F00 FFFF FF00" /* ......+... */
- $"0000 0000 00FF 2BB0 7F7F 0000 FFEC FF00" /* .....+..... */
- $"0000 0000 FF2B 2B7F ECEC FF00 FFEC FF00" /* ....++... */
- $"0000 00FF 2B2B ECFC ECEC 2BFB FFEC FF00" /* ...+++. */
- $"0000 FF2B 2B2B ECFC ECC0 FBFF FFEC FFFF" /* ..+++ */
- $"00FF 2B2B 2B7F ECEC ECEC 2B2B FFEC FF00" /* .+++.++. */
- $"FF2B 2B2B 2B7F 7FF6 ECEC 2B2B 2BFF FD00" /* ++++..+++. */
- $"00FF 2B2B 2B7F ECF6 FCF9 2B2B 2B2B 00FF" /* .+++.++++. */
- $"0000 FF2B 2B2B ECF6 FCEC 2B2B 2B2B FF00" /* ..+++++++. */
- $"0000 00FF 2B2B ECF6 ECEC 2B2B 2BFF 0000" /* ...+++++.. */
- $"0000 0000 FF2B 2BF6 EC2B 2B2B FF00 0000" /* ....+++++... */
- $"0000 0000 00FF 2BF6 F92B 2BFF 0000 0000" /* .....+++.... */
- $"0000 0000 0000 FFF9 F92B FF00 0000 0000" /* ......+..... */
- $"0000 0000 0000 00FF 2BFF 0000 0000 0000" /* .......+...... */
- $"0000 0000 0000 0000 FF00 0000 0000 0000" /* ............... */
- $"4943 4E23 0000 0108 0001 0000 0002 8000" /* ICN#........... */
- $"0004 78F8 0008 70F8 0010 F0F8 0021 E8F8" /* ..x..p...! */
- $"0043 C4F8 0081 FAF8 0107 F1F8 0207 F0F8" /* .C..... */
- $"0407 F7FF 0807 E3FE 1007 E1FC 200E E0F8" /* ...... . */
- $"4002 E074 800E E022 400E E001 200E C002" /* @.t."@.. .. */
- $"1006 E004 0806 C008 0406 E010 0202 C020" /* ........... */
- $"0102 C040 0080 8080 0040 0100 0020 0200" /* ..@..@... .. */
- $"0010 0400 0008 0800 0004 1000 0002 2000" /* .............. . */
- $"0001 4000 0000 8000 0001 0000 0003 8000" /* ..@........... */
- $"0007 F8F8 000F F0F8 001F F0F8 003F F8F8" /* .......? */
- $"007F FCF8 00FF FEF8 01FF FFF8 03FF FFF8" /* ..... */
- $"07FF FFFF 0FFF FFFE 1FFF FFFC 3FFF FFF8" /* ...? */
- $"7FFF FFFC FFFF FFFE 7FFF FFFF 3FFF FFFE" /* ..? */
- $"1FFF FFFC 0FFF FFF8 07FF FFF0 03FF FFE0" /* .... */
- $"01FF FFC0 00FF FF80 007F FF00 003F FE00" /* ......?. */
- $"001F FC00 000F F800 0007 F000 0003 E000" /* ............ */
- $"0001 C000 0000 8000 6963 6C34 0000 0208" /* ......icl4.... */
- $"0000 0000 0000 000F 0000 0000 0000 0000" /* ................ */
- $"0000 0000 0000 00FC F000 0000 0000 0000" /* .............. */
- $"0000 0000 0000 0FCC CFD6 D000 FFFF F000" /* ......... */
- $"0000 0000 0000 FCCC C556 0000 F767 F000" /* ......V..g. */
- $"0000 0000 000F CCCC 566F 0000 F676 F000" /* ......Vo..v. */
- $"0000 0000 00FC CCC5 6F5C F000 F767 F000" /* .....o\.g. */
- $"0000 0000 0FCC CC66 66CC 0F00 F676 F000" /* .....ff..v. */
- $"0000 0000 FCCC CCD5 5666 FCF0 F767 F000" /* ....Vfg. */
- $"0000 000F CCCC C656 5667 CCCF F676 F000" /* ....VVgv. */
- $"0000 00FC CCCC C6E5 5566 CCCC F767 F000" /* ...Ufg. */
- $"0000 0FCC CCCC C656 5657 CFFF F676 FFFF" /* ...VVWv */
- $"0000 FCCC CCCC C6E5 565C CCF7 6767 67F0" /* ..V\ggg */
- $"000F CCCC CCCC C655 565C CCCF 7676 7F00" /* ..UV\vv.. */
- $"00FC CCCC CCCC 7660 556C CCCC F767 F000" /* .v`Ulg. */
- $"0FCC CCCC CCCC CD5D 567C CCCC CF7F CF00" /* .]V|.. */
- $"FCCC CCCC CCCC 6660 556C CCCC CCFC CCF0" /* f`Ul */
- $"0FCC CCCC CCCC 665C 565C CCCC CCCC CCCF" /* .f\V\ */
- $"00FC CCCC CCCC 6660 E6DC CCCC CCCC CCF0" /* .f` */
- $"000F CCCC CCCC C650 656C CCCC CCCC CF00" /* ..Pel. */
- $"0000 FCCC CCCC C6EC 5ECC CCCC CCCC F000" /* ..^. */
- $"0000 0FCC CCCC C650 566C CCCC CCCF 0000" /* ...PVl.. */
- $"0000 00FC CCCC CC50 D5CC CCCC CCF0 0000" /* ...P.. */
- $"0000 000F CCCC CC50 56CC CCCC CF00 0000" /* ....PV... */
- $"0000 0000 FCCC CCD0 5CCC CCCC F000 0000" /* ....\... */
- $"0000 0000 0FCC CCD0 DCCC CCCF 0000 0000" /* ......... */
- $"0000 0000 00FC CCD0 DCCC CCF0 0000 0000" /* ......... */
- $"0000 0000 000F CCD0 DCCC CF00 0000 0000" /* ........... */
- $"0000 0000 0000 FCC0 CCCC F000 0000 0000" /* ........... */
- $"0000 0000 0000 0FCD CCCF 0000 0000 0000" /* ............. */
- $"0000 0000 0000 00FC CCF0 0000 0000 0000" /* ............. */
- $"0000 0000 0000 000F CF00 0000 0000 0000" /* ............... */
- $"0000 0000 0000 0000 F000 0000 0000 0000" /* ............... */
- $"6963 6C38 0000 0408 0000 0000 0000 0000" /* icl8............ */
- $"0000 0000 0000 00FF 0000 0000 0000 0000" /* ............... */
- $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */
- $"0000 0000 0000 FF2B FF00 0000 0000 0000" /* ......+....... */
- $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */
- $"0000 0000 00FF 2B2B 2BFF 7FEC 7F00 0000" /* .....+++..... */
- $"FFFF FFFF FF00 0000 0000 0000 0000 0000" /* ........... */
- $"0000 0000 FF2B 2B2B 2BB0 B0EC 0000 0000" /* ....++++.... */
- $"FFC0 ECC0 FF00 0000 0000 0000 0000 0000" /* ........... */
- $"0000 00FF 2B2B 2B2B B0EC ECFF 0000 0000" /* ...++++.... */
- $"FFEC C0EC FF00 0000 0000 0000 0000 0000" /* ........... */
- $"0000 FF2B 2B2B 2BB0 ECFF B02B FF00 0000" /* ..+++++... */
- $"FFC0 ECC0 FF00 0000 0000 0000 0000 0000" /* ........... */
- $"00FF 2B2B 2B2B ECEC ECEC 2B2B 00FF 0000" /* .++++++... */
- $"FFEC C0EC FF00 0000 0000 0000 0000 0000" /* ........... */
- $"FF2B 2B2B 2B2B F9B0 B0EC ECEC FF2B FF00" /* ++++++. */
- $"FFC0 ECC0 FF00 0000 0000 0000 0000 00FF" /* .......... */
- $"2B2B 2B2B 2BEC B0EC B0EC ECC0 2B2B 2BFF" /* ++++++++ */
- $"FFEC C0EC FF00 0000 0000 0000 0000 FF2B" /* .........+ */
- $"2B2B 2B2B 2BEC FCB0 B0B0 ECEC 2B2B 2B2B" /* +++++++++ */
- $"FFC0 ECC0 FF00 0000 0000 0000 00FF 2B2B" /* ........++ */
- $"2B2B 2B2B 2BEC B0EC B0EC B0C0 2BFF FFFF" /* ++++++ */
- $"FFEC C0EC FFFF FFFF 0000 0000 FF2B 2B2B" /* ....+++ */
- $"2B2B 2B2B 2BEC FCB0 B0EC B02B 2B2B FFC0" /* ++++++++ */
- $"ECC0 ECC0 ECC0 FF00 0000 00FF 2B2B 2B2B" /* ....++++ */
- $"2B2B 2B2B 2BEC B0B0 B0EC B02B 2B2B 2BFF" /* +++++찰++++ */
- $"C0EC C0EC C0FF 0000 0000 FF2B 2B2B 2B2B" /* ....+++++ */
- $"2B2B 2B2B C0EC EC00 B0B0 EC2B 2B2B 2B2B" /* ++++.+++++ */
- $"FFC0 ECC0 FF00 0000 00FF 2B2B 2B2B 2B2B" /* ....++++++ */
- $"2B2B 2B2B 2BF9 B0F9 B0EC C02B 2B2B 2B2B" /* ++++++++++ */
- $"2BFF C0FF 2BFF 0000 FF2B 2B2B 2B2B 2B2B" /* ++..+++++++ */
- $"2B2B 2B2B ECEC EC00 B0B0 EC2B 2B2B 2B2B" /* ++++.+++++ */
- $"2B2B FF2B 2B2B FF00 00FF 2B2B 2B2B 2B2B" /* +++++..++++++ */
- $"2B2B 2B2B ECEC B02B B0EC B02B 2B2B 2B2B" /* ++++++++++ */
- $"2B2B 2B2B 2B2B 2BFF 0000 FF2B 2B2B 2B2B" /* +++++++..+++++ */
- $"2B2B 2B2B ECEC EC00 FCEC F92B 2B2B 2B2B" /* ++++.+++++ */
- $"2B2B 2B2B 2B2B FF00 0000 00FF 2B2B 2B2B" /* ++++++....++++ */
- $"2B2B 2B2B 2BEC B000 ECB0 EC2B 2B2B 2B2B" /* +++++.+++++ */
- $"2B2B 2B2B 2BFF 0000 0000 0000 FF2B 2B2B" /* +++++......+++ */
- $"2B2B 2B2B 2BEC FC2B B0FC 2B2B 2B2B 2B2B" /* ++++++++++++ */
- $"2B2B 2B2B FF00 0000 0000 0000 00FF 2B2B" /* ++++........++ */
- $"2B2B 2B2B 2BEC B000 B0EC EC2B 2B2B 2B2B" /* +++++.+++++ */
- $"2B2B 2BFF 0000 0000 0000 0000 0000 FF2B" /* +++..........+ */
- $"2B2B 2B2B 2B2B B000 7FB0 2B2B 2B2B 2B2B" /* ++++++..++++++ */
- $"2B2B FF00 0000 0000 0000 0000 0000 00FF" /* ++............ */
- $"2B2B 2B2B 2B2B B000 B0EC 2B2B 2B2B 2B2B" /* ++++++.++++++ */
- $"2BFF 0000 0000 0000 0000 0000 0000 0000" /* +.............. */
- $"FF2B 2B2B 2B2B F900 B02B 2B2B 2B2B 2B2B" /* +++++.+++++++ */
- $"FF00 0000 0000 0000 0000 0000 0000 0000" /* ............... */
- $"00FF 2B2B 2B2B F900 F92B 2B2B 2B2B 2BFF" /* .++++.++++++ */
- $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */
- $"0000 FF2B 2B2B F900 F92B 2B2B 2B2B FF00" /* ..+++.+++++. */
- $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */
- $"0000 00FF 2B2B F900 F92B 2B2B 2BFF 0000" /* ...++.++++.. */
- $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */
- $"0000 0000 FF2B 2B00 2B2B 2B2B FF00 0000" /* ....++.++++... */
- $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */
- $"0000 0000 00FF 2BF9 2B2B 2BFF 0000 0000" /* .....++++.... */
- $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */
- $"0000 0000 0000 FF2B 2B2B FF00 0000 0000" /* ......+++..... */
- $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */
- $"0000 0000 0000 00FF 2BFF 0000 0000 0000" /* .......+...... */
- $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */
- $"0000 0000 0000 0000 FF00 0000 0000 0000" /* ............... */
- $"0000 0000 0000 0000" /* ........ */
-};