Permalink
Browse files

The big 2.1 overhaul.

  • Loading branch information...
1 parent 3e4f9e4 commit f6726d461be65ba96ac7efd09bf4e3954d992af7 @K8TIY committed Dec 13, 2011
Showing with 12,276 additions and 5,272 deletions.
  1. +2 −0 Alts.strings
  2. +0 −72 IPAClientServer.h
  3. +0 −2 IPAInstallRegister.h
  4. +0 −28 IPAInstallRegister.m
  5. +263 −735 IPAPalette.xcodeproj/project.pbxproj
  6. +0 −170 IPAPaletteCM/IPAIM.c
  7. +0 −38 IPAPaletteCM/IPAIM.h
  8. +0 −58 IPAPaletteCM/IPAIM.r
  9. +0 −316 IPAPaletteCM/IPAIMComponent.c
  10. +0 −210 IPAPaletteCM/IPAIMMessageReceive.c
  11. +0 −79 IPAPaletteCM/IPAIMMessageSend.c
  12. +0 −32 IPAPaletteCM/Info.plist
  13. BIN IPAPaletteIM/English.lproj/InfoPlist.strings
  14. +0 −19 IPAPaletteIM/English.lproj/MainMenu.nib/classes.nib
  15. +0 −18 IPAPaletteIM/English.lproj/MainMenu.nib/info.nib
  16. BIN IPAPaletteIM/English.lproj/MainMenu.nib/keyedobjects.nib
  17. +0 −157 IPAPaletteIM/IPAInputController.m
  18. +0 −27 IPAPaletteIM/IPAMessager.h
  19. +0 −154 IPAPaletteIM/IPAMessager.m
  20. BIN IPAServer/ImageMaps/Cons.pdf
  21. BIN IPAServer/ImageMaps/Diacritic.pdf
  22. BIN IPAServer/ImageMaps/ExtIPA.pdf
  23. +0 −830 IPAServer/ImageMaps/MapData.plist
  24. BIN IPAServer/ImageMaps/Other.pdf
  25. BIN IPAServer/ImageMaps/SupraTone.pdf
  26. BIN IPAServer/ImageMaps/Vow.pdf
  27. BIN IPAServer/ImageMaps/VowDrag.pdf
  28. +0 −34 IPAServer/Info-CM.plist
  29. +0 −189 IPAServer/MainMenu.nib/classes.nib
  30. +0 −18 IPAServer/MainMenu.nib/info.nib
  31. BIN IPAServer/MainMenu.nib/keyedobjects.nib
  32. +2 −2 ImageMapGen/AppController.h
  33. +153 −725 ImageMapGen/AppController.m
  34. BIN ImageMapGen/HackedDoulos-Regular.ttf
  35. +965 −0 ImageMapGen/HackedDoulos-Regular.ttx
  36. +3 −1 ImageMapGen/Info.plist
  37. +0 −3 ImageMapGen/InfoPlist.strings
  38. +0 −36 ImageMapGen/MainMenu.nib/classes.nib
  39. +0 −18 ImageMapGen/MainMenu.nib/info.nib
  40. BIN ImageMapGen/MainMenu.nib/keyedobjects.nib
  41. +1,501 −0 ImageMapGen/MainMenu.xib
  42. +4 −4 { → ImageMapGen}/main.m
  43. BIN ImageMaps/Cons.pdf
  44. BIN ImageMaps/Diacritic.pdf
  45. BIN ImageMaps/ExtIPA.pdf
  46. +1,219 −0 ImageMaps/MapData.plist
  47. BIN ImageMaps/Other.pdf
  48. BIN ImageMaps/Pal.pdf
  49. BIN ImageMaps/Retro.pdf
  50. BIN ImageMaps/SupraTone.pdf
  51. BIN ImageMaps/VPh.pdf
  52. BIN ImageMaps/Vow.pdf
  53. BIN ImageMaps/VowDrag.pdf
  54. +0 −1 Installer.pmdoc/01ipapalette-contents.xml
  55. +0 −1 Installer.pmdoc/01ipapalette.xml
  56. +0 −1 Installer.pmdoc/index.xml
  57. +156 −0 Installer/IPAPalette.dmged
  58. +53 −0 Installer/IPAPalettePostinstall.m
  59. +1 −0 Installer/Installer.pmdoc/01ipapalette-contents.xml
  60. +1 −0 Installer/Installer.pmdoc/01ipapalette.xml
  61. +3 −0 Installer/Installer.pmdoc/index.xml
  62. 0 { → Installer}/VowLight.ai
  63. BIN { → Installer}/VowLight.png
  64. +6 −0 Installer/sign.sh
  65. +4 −16 IPAServer/Info.plist → KeyboardParser/KeyboardParser-Info.plist
  66. +39 −0 KeyboardParser/KeylayoutParser.h
  67. +684 −0 KeyboardParser/KeylayoutParser.m
  68. +74 −0 KeyboardParser/main.m
  69. +174 −53 { → Localization}/chardata.txt
  70. +12 −4 {IPAServer → Localization}/de.lproj/Localizable.strings
  71. +13 −5 {IPAServer/English.lproj → Localization/en.lproj}/Localizable.strings
  72. +1 −0 {IPAServer → Localization}/en_GB.lproj/localizable.strings
  73. +12 −4 {IPAServer → Localization}/es.lproj/localizable.strings
  74. 0 { → Localization}/es.tmpl
  75. +12 −4 {IPAServer → Localization}/fi.lproj/localizable.strings
  76. +12 −4 {IPAServer → Localization}/fr.lproj/localizable.strings
  77. +12 −4 {IPAServer → Localization}/it.lproj/localizable.strings
  78. 0 { → Localization}/it.tmpl
  79. +12 −4 {IPAServer → Localization}/ja.lproj/Localizable.strings
  80. +12 −4 {IPAServer → Localization}/ko.lproj/Localizable.strings
  81. +12 −4 {IPAServer → Localization}/nl.lproj/localizable.strings
  82. +12 −4 {IPAServer → Localization}/ru.lproj/localizable.strings
  83. +68 −24 { → Localization}/translator.py
  84. +12 −4 {IPAServer → Localization}/vi.lproj/localizable.strings
  85. +12 −4 {IPAServer → Localization}/zh_CN.lproj/localizable.strings
  86. +12 −4 {IPAServer → Localization}/zh_TW.lproj/localizable.strings
  87. +1 −1 Onizuka
  88. +33 −15 PDFImageMapCreator.h
  89. +286 −134 PDFImageMapCreator.m
  90. +1 −1 {IPAServer → Palette}/CMAPParser.c
  91. +1 −1 {IPAServer → Palette}/CMAPParser.h
  92. +3 −4 {IPAServer → Palette}/GlyphView.h
  93. +49 −52 {IPAServer → Palette}/GlyphView.m
  94. BIN ipapalette.tif → Palette/IPAIcon.tif
  95. BIN Palette/IPAIconTemplate.pdf
  96. +7 −7 {IPAPaletteIM → Palette}/IPAInputController.h
  97. +117 −0 Palette/IPAInputController.m
  98. +29 −28 {IPAServer → Palette}/IPAServer.h
  99. +340 −448 {IPAServer → Palette}/IPAServer.m
  100. +14 −5 {IPAPaletteIM → Palette}/Info.plist
  101. +230 −0 Palette/Keyboard.plist
  102. +184 −0 Palette/MAAttachedWindow.h
  103. +951 −0 Palette/MAAttachedWindow.m
  104. +3,965 −0 Palette/MainMenu.xib
  105. +12 −31 {IPAServer → Palette}/PDFImageMap.h
  106. +129 −47 {IPAServer → Palette}/PDFImageMap.m
  107. +4 −3 {IPAServer → Palette}/Placeholder.c
  108. +2 −2 {IPAServer → Palette}/Placeholder.h
  109. +7 −10 { → Palette}/UserGlyphsController.h
  110. +94 −43 { → Palette}/UserGlyphsController.m
  111. +26 −0 Palette/defaults.plist
  112. +22 −4 {IPAPaletteIM → Palette}/main.m
  113. BIN {IPAServer → Palette}/plus.icns
  114. +57 −0 README.markdown
  115. +0 −8 README.txt
  116. +45 −165 TextRenderer.c
  117. +17 −35 TextRenderer.h
  118. BIN doc/IMMenu.jpg
  119. BIN doc/International.jpg
  120. BIN doc/New.png
  121. +117 −104 doc/index.html
View
@@ -87,4 +87,6 @@
"\U0346" = "\U032A"; // combining bridge A/B
"\U0306" = "\U032E"; // combining breve; combining breve below
"\U0303" = "\U0330"; // combining tilde; combining tilde below (inverted from above)
+// Here's the Unicode 6.1 draft oe digraph superscript
+"\U0153" = "\UA7F9"; // MODIFIER LETTER SMALL LIGATURE OE
View
@@ -1,72 +0,0 @@
-/*
-Copyright © 2005-2010 Brian S. Hall
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License version 2 as
-published by the Free Software Foundation.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-#ifndef IPAClientServer_h
-#define IPAClientServer_h
-
-#ifndef NSINTEGER_DEFINED
-#if __LP64__ || NS_BUILD_32_LIKE_64
-typedef long NSInteger;
-typedef unsigned long NSUInteger;
-#else
-typedef int NSInteger;
-typedef unsigned int NSUInteger;
-#endif
-#define NSINTEGER_DEFINED 1
-#endif
-
-#define kIPAClientListenPortName @"com.blugs.IPAPalette.client"
-#if __IPA_CM__
-#define kIPAServerPortName "com.blugs.IPAServer"
-#define kIPAServerListenPortName CFSTR("com.blugs.IPAServer")
-#define kServerName CFSTR("IPAServerCM.app")
-#define kBundleIdentifier CFSTR("com.blugs.IPAPalette")
-#else
-#define kIPAServerListenPortName @"com.blugs.IPAPalette.server"
-#define kServerName CFSTR("IPAServer.app")
-#define kBundleIdentifier CFSTR("com.blugs.inputmethod.IPAPalette")
-#endif
-
-
-
-typedef SInt32 IPAMessage;
-enum
-{
- ipaActivatedMsg = 100, // Notify server that a text service was activated
- ipaActivatedShowOnlyMsg, // (CM only) Notify server that a text service was activated,
- // but tell it not to send input to SystemUIServer
- ipaHidePaletteMsg, // Notify server that TSM sent a hide palettes request
- ipaWindowLevelMsg, // (CM only) Set the window level above the Dashboard level
- ipaErrorMsg // Send the text of an error message
-};
-
-enum
-{
- ipaPaletteHiddenMsg = 201, // Notify IM that palette is hidden
- ipaFontMsg, // Notify IM that next input should be in this font
- ipaInputMsg, // Notify IM that a symbol was clicked
- ipaDebugMsg // Notify IM of debug level
-};
-
-// Shared debug levels
-enum
-{
- ipaSilentDebugLevel,
- ipaDebugDebugLevel,
- ipaVerboseDebugLevel,
- ipaInsaneDebugLevel
-};
-
-#endif
View
@@ -1,2 +0,0 @@
-#include <Cocoa/Cocoa.h>
-
View
@@ -1,28 +0,0 @@
-#include <Cocoa/Cocoa.h>
-#include <Carbon/Carbon.h>
-
-int main(int argc, char *argv[])
-{
- NSAutoreleasePool* arp = [[NSAutoreleasePool alloc] init];
- NSString* path = @"/Library/Input Methods/IPAPalette.app";
- CFURLRef url = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, (CFStringRef)path, kCFURLPOSIXPathStyle, true);
- OSStatus status = noErr;
- if (url)
- {
- status = TISRegisterInputSource(url);
- NSLog(@"TISRegisterInputSource(%@): %d", url, status);
- CFRelease(url);
- }
- path = [NSHomeDirectory() stringByAppendingPathComponent:@"Library/Input Methods/IPAPalette.app"];
- url = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, (CFStringRef)path, kCFURLPOSIXPathStyle, true);
- if (url)
- {
- status = TISRegisterInputSource(url);
- NSLog(@"TISRegisterInputSource(%@): %d", url, status);
- CFRelease(url);
- }
- [arp release];
- system("killall IPAServer");
- system("killall IPAPalette");
- return status;
-}

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -1,170 +0,0 @@
-/*
-Copyright © 2005-2010 Brian S. Hall
-Portions may be Copyright © 2000-2001 Apple Computer, Inc.
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License version 2 as
-published by the Free Software Foundation.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-#include "IPAIM.h"
-#include <unistd.h>
-
-IPAIMSessionHandle gActiveSession;
-static OSStatus IPAIMLaunchWithFSSpec(FSSpec *fileSpec);
-/************************************************************************************************
-* Called via NewTSMDocument the first time our text service component is instantiated.
-*
-* Initialize our global state (initialize global variables, launch the
-* server process). We only initialize global data
-* here. All per-session context initialization is handled in IPAIMSessionOpen().
-************************************************************************************************/
-ComponentResult IPAIMInitialize(ComponentInstance inComponentInstance)
-{
- ComponentResult result;
-
- gActiveSession = nil;
- result = IPAIMLaunchServer();
- if (!result) result = IPAInitMessageReceiving();
- return result;
-}
-
-/************************************************************************************************
-* Called via NewTSMDocument. Initialize a new session context. Create a session handle to store all
-* of the information pertinent to the session and initialize all its data structures. We do not
-* handle initialize global data (data that is shared across sessions); that is taken care of by
-* IPAIMInitialize().
-************************************************************************************************/
-ComponentResult IPAIMSessionOpen(ComponentInstance inComponentInstance,
- IPAIMSessionHandle *outSessionHandle)
-{
- ComponentResult result = noErr;
- IPAIMSessionHandle h = *outSessionHandle;
- // If per-session storage is not set up yet, do so now.
- if (h == nil) h = (IPAIMSessionHandle)NewHandleClear(sizeof(IPAIMSessionRecord));
- if (h) (*h)->_comp = inComponentInstance;
- else result = memFullErr;
- *outSessionHandle = h;
- return result;
-}
-
-/************************************************************************************************
-* Checks to see if the server is running. If not, it is launched. Control does not return from
-* this function until the launch is complete.
-************************************************************************************************/
-OSStatus IPAIMLaunchServer(void)
-{
- OSStatus result = noErr;
- CFMessagePortRef serverPortRef;
-
- // Obtain a reference to the server port. If it exists, then the server is already running.
- serverPortRef = CFMessagePortCreateRemote(NULL, CFSTR(kIPAServerPortName));
- if (!serverPortRef)
- {
- // The server is not running, so launch it now.
- // Obtain a reference to our text service component bundle. Can't use CFBundleGetMainBundle
- // because we are running inside another application's context so we find our bundle using the
- // bundle identifier in our Info.plist file.
- CFURLRef sharedSupportURL = NULL;
- CFURLRef serverURL = NULL;
- FSRef serverFSRef;
- FSSpec serverFileSpec;
- CFBundleRef myComponentBundle = CFBundleGetBundleWithIdentifier(kBundleIdentifier);
-
- // If we got a reference to the bundle, locate the "SharedSupport" directory inside the bundle.
- if (myComponentBundle) sharedSupportURL = CFBundleCopySharedSupportURL(myComponentBundle);
- // If we found the "SharedSupport" directory, append the name of our server application to the
- // URL so we can identify it.
- if (sharedSupportURL)
- serverURL = CFURLCreateCopyAppendingPathComponent(nil, sharedSupportURL,
- kServerName, false);
- // We need to do some extra work here. Since LaunchApplication only takes an FSSpec as a parameter,
- // me must convert the server URL into an FSRef and then convert it into an FSSpec. Whew!
- if (!serverURL) result = -2;
- else
- {
- if (!CFURLGetFSRef(serverURL, &serverFSRef)) result = -2;
- else
- {
- result = FSGetCatalogInfo(&serverFSRef, kFSCatInfoNone, nil, nil, &serverFileSpec, nil);
- if (result == noErr)
- {
- // Wait for the server to come up (timeout in 20 seconds -- this is arbitrary and may need
- // adjusting for certain situations such as launching over a network)
- long timeout = TickCount() + 1200;
- // Launch the server application.
- result = IPAIMLaunchWithFSSpec(&serverFileSpec);
- while (result == noErr)
- {
- struct timespec ts = {0,90000000};
- // Get a reference to the server port.
- serverPortRef = CFMessagePortCreateRemote(nil, CFSTR(kIPAServerPortName));
- if (serverPortRef) break;
- if (TickCount() > timeout)
- {
- result = -1;
- break;
- }
- // Sleep a little to give time to the server.
- // Don't just keep pounding on it.
- (void)nanosleep(&ts, NULL);
- }
- }
- }
- CFRelease(serverURL);
- }
- if (sharedSupportURL) CFRelease(sharedSupportURL);
- if (result == -1) IPALog("IPAIMLaunchServer: timeout occured while trying to launch UI server.");
- else if (result == -2) IPALog("IPAIMLaunchServer: unable to locate the Shared Support directory.");
- else if (result) IPALog("IPAIMLaunchServer: error %ld occured while trying to launch the UI.", result);
- }
- if (serverPortRef) CFRelease(serverPortRef);
- return result;
-}
-
-static LaunchParamBlockRec lpbr =
- {0,0,extendedBlock,extendedBlockLen, //reserved1,reserved2,launchBlockID,launchEPBLength
- 0,launchNoFileFlags + launchContinue + launchDontSwitch, //launchFileFlags, launchControlFlags
- NULL, {0,0}, //launchAppSpec, launchProcessSN
- 0, 0, 0, NULL}; //launchPreferredSize, launchMinimumSize, launchAvailableSize, launchAppParameters
-
-
-static OSStatus IPAIMLaunchWithFSSpec(FSSpec* fileSpec)
-{
- lpbr.launchAppSpec = fileSpec;
- return LaunchApplication(&lpbr);
-}
-
-// A logger that gives us info about the process id and process name.
-void IPALog(char* fmt, ...)
-{
- va_list ap;
- ProcessSerialNumber psn = {0, kCurrentProcess};
- CFStringRef myName = nil;
- CFDataRef utf8 = nil;
- OSErr err = CopyProcessName(&psn, &myName);
- ProcessInfoRec pir;
- pir.processInfoLength = sizeof(pir);
- pir.processName = nil;
- pir.processAppSpec = nil;
- (void)GetProcessInformation(&psn, &pir);
- if (!err) utf8 = CFStringCreateExternalRepresentation(NULL, myName, kCFStringEncodingUTF8, 0);
- if (utf8) printf("IPA Palette (%d:[%ld,%ld]:%.*s): ", getpid(),
- pir.processNumber.highLongOfPSN, pir.processNumber.lowLongOfPSN,
- (int)CFDataGetLength(utf8), CFDataGetBytePtr(utf8));
- else printf("IPA Palette (%d): ", getpid());
- if (myName) CFRelease(myName);
- if (utf8) CFRelease(utf8);
- va_start(ap, fmt);
- vprintf(fmt, ap);
- va_end(ap);
- printf("\n");
- fflush(stdout);
-}
View
@@ -1,38 +0,0 @@
-/*
-Copyright © 2005-2010 Brian S. Hall
-Portions may be Copyright © 2000-2001 Apple Computer, Inc.
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License version 2 as
-published by the Free Software Foundation.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-#ifndef IPAIM_h
-#define IPAIM_h
-#include <Carbon/Carbon.h>
-#include "IPAClientServer.h"
-
-typedef struct
-{
- ComponentInstance _comp;
- ATSUFontID _font;
-} IPAIMSessionRecord, **IPAIMSessionHandle;
-extern IPAIMSessionHandle gActiveSession;
-extern unsigned gDebugLevel;
-
-
-ComponentResult IPAIMInitialize(ComponentInstance inComponentInstance);
-ComponentResult IPAIMSessionOpen(ComponentInstance inComponentInstance,
- IPAIMSessionHandle *outSessionHandle);
-OSStatus IPAInitMessageReceiving(void);
-OSStatus IPAIMLaunchServer(void);
-OSStatus IPASendMessage(IPAMessage inMessage, CFDataRef inData);
-void IPALog(char* fmt, ...);
-#endif
View
@@ -1,58 +0,0 @@
-/*
-Copyright © 2005-2010 Brian S. Hall
-Portions may be Copyright © 2000-2001 Apple Computer, Inc.
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License version 2 as
-published by the Free Software Foundation.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-#define UseExtendedThingResource 1
-#include <Carbon/Carbon.r>
-
-type 'cbnm'
-{
- pstring;
-};
-
-resource 'thng' (128)
-{
- 'tsvc',
- 'cplt',
- 'blug',
- 0x0,
- kAnyComponentFlagsMask,
- 'dlle', -1,
- 'STR ', -1,
- 'STR ', -1,
- 'ICON', -1,
- 0x00010000,
- componentHasMultiplePlatforms | componentDoAutoVersion | componentWantsUnregister,
- -1,
- {
- 0xFE00, 'dlle', -1, platformPowerPCNativeEntryPoint,
- 0xFE00, 'dlle', -1, platformIA32NativeEntryPoint
- }
-};
-
-resource 'dlle' (-1)
-{
- "IPAIMComponentDispatch"
-};
-
-resource 'STR ' (-1)
-{
- "IPA Palette"
-};
-
-resource 'cbnm' (0, "Component Bundle Name", sysheap, purgeable)
-{
- "com.blugs.IPAPalette"
-};
Oops, something went wrong.

0 comments on commit f6726d4

Please sign in to comment.