Skip to content

fruitsamples/BasicInputMethod

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 

Repository files navigation

{\rtf1\mac\ansicpg10000\cocoartf100
{\fonttbl\f0\fswiss\fcharset77 Helvetica-Bold;\f1\fswiss\fcharset77 Helvetica;\f2\fmodern\fcharset77 Courier;
}
{\colortbl;\red255\green255\blue255;}
\vieww14860\viewh17580\viewkind0
\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural

\f0\b\fs32 \cf0 BasicInputMethod\

\fs16 \

\fs24 Version 1.0\
April 20, 2001
\f1\b0 \
\
BasicInputMethod is a simple input method, implemented as a text service component for Mac OS X. It demonstrates the principles of writing a text service component, including factoring text services into client/server components, sending and receiving text input Carbon events, and interprocess communication. For more information on input methods and text services, see the Text Services Manager documentation at <http://developer.apple.com/techpubs/macosx/Carbon/carbon.html>.\
\

\f0\b\fs26 Quick Install
\f1\b0\fs24 \
\
\pard\tx360\tx2880\tx4320\tx5760\tx7200\li360\fi-360\ql\qnatural
\cf0 1)	Copy 
\f2 BasicInputMethod.component
\f1  to your 
\f2 /Library/Components/
\f1  components directory. For example,\
\
	
\f2 cp -r BasicInputMethod/build/BasicInputMethod.component /Library/Components/
\f1 \
\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
\cf0 \
\pard\tx360\tx2880\tx4320\tx5760\tx7200\li360\fi-360\ql\qnatural
\cf0 2)	Log out and log in again.\
3)	Open System Preferences, select International and select the Keyboard Menu pane.\
4)	Click the check box next to \'d2Basic Input Method\'d3 to enable the input method in the keyboard menu.\
\
\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural

\f0\b\fs26 \cf0 About BasicInputMethod
\f1\b0\fs24 \
\
BasicInputMethod is a simple input method for Mac OS X. It is implemented in 2 parts\'d1(1) a text service component (
\f2 BasicInputMethod.component
\f1 ) and (2) a server application (
\f2 BasicServer.app
\f1 ). The server application is contained inside the text service component bundle so it is not directly visible from the Finder.\
\
BasicInputMethod accepts roman keyboard input in its conversion buffer. Pressing return \'d2fixes\'d3 the text. \'d2Convert To Lowercase\'d3 and \'d2Convert To Uppercase\'d3 menu commands allow you to modify text in the inline hole.\
\
The server implements a keyboard palette and a send event palette. Clicking keys on the keyboard palette will send the corresponding text into the current inline hole. \'d2Show Keyboard Palette\'d3 and \'d2Hide Keyboard Palette\'d3\'cain the input method\'d5s text service (pencil) menu reveal or hide the keyboard palette. The send event allows to you to send text input events to the client application and observe the results. Currently OffsetToPos is the only event supported.\
\
Communication between the text service component and the server uses the CFMessagePort API.\
\

\f0\b\fs26 Building BasicInputMethod
\f1\b0\fs24 \
\
BasicInputMethod is implemented as a Project Builder project (
\f2 BasicInputMethod.pbproj
\f1 ). The project contains 2 targets, one for the text service component itself (
\f2 BasicInputMethod.component
\f1 ) and one for the server application (
\f2 BasicServer.app
\f1 ). You just need to build the 
\f2 BasicInputMethod
\f1  target. The 
\f2 BasicServer
\f1  target will be built automatically and the output copied into the 
\f2 SharedSupport
\f1  directory of the 
\f2 BasicInputMethod
\f1  text service component bundle.\
\

\f0\b\fs26 Installing BasicInputMethod
\f1\b0\fs24 \
\
Copy the text service component into 
\f2 /Library/Components
\f1 . For example,\
\
\pard\tx360\tx2880\tx4320\tx5760\tx7200\li360\fi-360\ql\qnatural
\cf0 	
\f2 cd BasicInputMethod/build\
	cp -r BasicInputMethod.component /Library/Components/
\f1 \
\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
\cf0 \
After installing the input method for the first time, you must log out once for the Text Services Manager to \'d2see\'d3 the new text services component.\
\

\f0\b\fs26 Running BasicInputMethod
\f1\b0\fs24 \
\
BasicInputMethod appears as "Basic Input Method" in the keyboard menu. Currently BasicInputMethod identifies itself as a Japanese input method so it will appear among other Japanese input methods, if any, in the keyboard menu. You can change the input method script to languages other than Japanese by changing the script, language, and base resource ID in BIMScript.h.\
\
To test text input features, run an application such as TextEdit and select BasicInputMethod from the keyboard menu. When BasicInputMethod is activated, the server process (
\f2 BasicServer.app
\f1 ) is automatically launched if it is not already running.\
\

\f0\b\fs26 BasicInputMethod.component Sources
\f1\b0\fs24 \
\
\pard\tx3240\li3240\fi-2880\ql\qnatural
\cf0 BIM.c	Core functionality of the input method.\
\
BIMComponent.c	Main entry point for our text service and the direct interface to the Component Manager. Contains BIMComponentDispatch and the selector-based functions that are called by the Text Services Manager. Most functions call directly into corresponding functions in BIM.c.\
\
BIMInputEvents.c	Functions to talk to the host application and the Text Services Manager using Carbon events (includes UpdateActiveInputArea).\
\
BIMLaunchServer.c	Functions to detect and launch the server.\
\
BIMMessageReceive.c	Functions to initialize a server CFMessagePort and handle incoming messages from the server.\
\
BIMMessageSend.c	Functions to send messages to the server.\
\
BIM.r	Resources incorporated by the Basic Input Method, including the \'d4thng\'d5 resource and icons.\
\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
\cf0 \

\f0\b\fs26 BasicServer.app Sources
\f1\b0\fs24 \
\
\pard\tx3240\li3240\fi-2880\ql\qnatural
\cf0 BS.c	Main entry point for the server.\
\
BSDebugPalette.c	Not implemented. Functions to implement a debug palette are in-progress.\
\
BSKeyboardPalette.c	Functions to implement the keyboard palette.\
\
BSMessageReceive.c	Functions to initialize a server CFMessagePort, register and track our client text service components, and handle incoming messages.\
\
BSMessageSend.c	Functions to send messages to our client text service components.\
\
BSPreferences.c	Functions to manage user preferences. Preferences are not currently saved on disk.\
\
BSSendEventPalette.c	Functions to manage the send event palette.\
\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
\cf0 \

\f0\b\fs26 Shared Headers
\f1\b0\fs24 \
\
\pard\tx3240\li3240\fi-2880\ql\qnatural
\cf0 BIMClientServer.h	Constants and data structures shared between the text service component and the server application.\
\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
\cf0 \
\pard\tx3240\li3240\fi-2880\ql\qnatural
\cf0 BIMScript.h	The script and language this input method supports.\
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published