Skip to content

Commit

Permalink
Initial import from private repository
Browse files Browse the repository at this point in the history
This corresponds to commit 6c2eb65 in the private repo.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
  • Loading branch information
wincent committed Aug 19, 2009
0 parents commit e12e3e5
Show file tree
Hide file tree
Showing 134 changed files with 13,586 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.bak
*.temp
index
1 change: 1 addition & 0 deletions CREDITS.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Norwegian localization: Sjur N�rsteb� Moshagen
237 changes: 237 additions & 0 deletions Doxyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,237 @@
# Doxyfile 1.5.1

#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = WOHotKey
PROJECT_NUMBER = 1.4
OUTPUT_DIRECTORY = ../../build/WOHotKey-Documentation
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
USE_WINDOWS_ENCODING = NO
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ABBREVIATE_BRIEF = "The $name class" \
"The $name widget" \
"The $name file" \
is \
provides \
specifies \
contains \
represents \
a \
an \
the
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = NO
STRIP_FROM_PATH =
STRIP_FROM_INC_PATH =
SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = YES
MULTILINE_CPP_IS_BRIEF = NO
DETAILS_AT_TOP = NO
INHERIT_DOCS = YES
SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 8
ALIASES = startgroup=@{ \
endgroup=@}
OPTIMIZE_OUTPUT_FOR_C = YES
OPTIMIZE_OUTPUT_JAVA = NO
BUILTIN_STL_SUPPORT = NO
DISTRIBUTE_GROUP_DOC = NO
SUBGROUPING = YES
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
EXTRACT_ALL = YES
EXTRACT_PRIVATE = YES
EXTRACT_STATIC = YES
EXTRACT_LOCAL_CLASSES = YES
EXTRACT_LOCAL_METHODS = NO
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO
HIDE_FRIEND_COMPOUNDS = NO
HIDE_IN_BODY_DOCS = NO
INTERNAL_DOCS = NO
CASE_SENSE_NAMES = NO
HIDE_SCOPE_NAMES = NO
SHOW_INCLUDE_FILES = YES
INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
SORT_BRIEF_DOCS = NO
SORT_BY_SCOPE_NAME = NO
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
SHOW_DIRECTORIES = YES
FILE_VERSION_FILTER =
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = NO
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = NO
WARN_FORMAT = "$file:$line: $text"
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = .
FILE_PATTERNS = *.h \
*.H
RECURSIVE = YES
EXCLUDE = WOCommon
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS = *
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_PATTERNS =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = YES
INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
REFERENCES_LINK_SOURCE = YES
USE_HTAGS = NO
VERBATIM_HEADERS = YES
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = YES
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = html
HTML_FILE_EXTENSION = .html
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
CHM_FILE =
HHC_LOCATION =
GENERATE_CHI = NO
BINARY_TOC = NO
TOC_EXPAND = NO
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = NO
TREEVIEW_WIDTH = 250
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = NO
LATEX_OUTPUT = latex
LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
COMPACT_LATEX = NO
PAPER_TYPE = a4wide
EXTRA_PACKAGES =
LATEX_HEADER =
PDF_HYPERLINKS = YES
USE_PDFLATEX = YES
LATEX_BATCHMODE = NO
LATEX_HIDE_INDICES = NO
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = NO
RTF_OUTPUT = rtf
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = NO
MAN_OUTPUT = man
MAN_EXTENSION = .3
MAN_LINKS = NO
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
XML_OUTPUT = xml
XML_SCHEMA =
XML_DTD =
XML_PROGRAMLISTING = YES
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# configuration options related to the Perl module output
#---------------------------------------------------------------------------
GENERATE_PERLMOD = NO
PERLMOD_LATEX = NO
PERLMOD_PRETTY = YES
PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::additions related to external references
#---------------------------------------------------------------------------
TAGFILES =
GENERATE_TAGFILE =
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = NO
HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = YES
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
GROUP_GRAPHS = YES
UML_LOOK = NO
TEMPLATE_RELATIONS = NO
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
CALL_GRAPH = NO
CALLER_GRAPH = NO
GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES
DOT_IMAGE_FORMAT = png
DOT_PATH = /usr/local/bin
DOTFILE_DIRS =
MAX_DOT_GRAPH_WIDTH = 1024
MAX_DOT_GRAPH_HEIGHT = 1024
MAX_DOT_GRAPH_DEPTH = 1000
DOT_TRANSPARENT = NO
DOT_MULTI_TARGETS = NO
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::additions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = NO
22 changes: 22 additions & 0 deletions Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>WOHotKey</string>
<key>CFBundleIdentifier</key>
<string>com.wincent.WOHotKey</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>WO_INFO_PLIST_VERSION (WO_BUILDNUMBER)</string>
<key>WOCopyrightYear</key>
<string>WO_COPYRIGHT_YEAR</string>
</dict>
</plist>
Binary file added KeyCaps.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions Localization.notes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
About WOHotKey

WOHotKey is a framework that provides hot key functionality. There are three important files in the framework for localization purposes: "Keys.strings", "Localizable.strings" and "InfoPlist.strings".


(1) "Keys.strings"

This file contains strings that are displayed in the preferences user interface when setting or displaying hot key combinations.

For example, when the user presses the space bar the word "Space" is displayed in the English user interface.

Most of the common modifier keys do not appear in the Keys.strings file because a symbolic (non-textual) representation already exists for them. This means that symbols are used to represent keys like "Escape", "Up cursor", "Down cursor", "Left cursor", "Right cursor", "Page up", "Page down", "Home", "End", "Delete", "Backspace", "Shift", "Command", "Alt", "Control", "Tab", "Return", "Enter", and so forth.

There are many keys, however, for which there is no symbolic representation. Most of these keys are rare and do not appear on the majority of Macintosh keyboards; for example, "Insert Line", "Mode Switch" and many others.

It is not necessary to localize these uncommon keys and the truth is that in many cases the country-specific keyboards which have these keys will use the English label anyway. You should only localize the keys which are likely to appear on most Macintosh users' keyboards. The strings which you should most definitely localize are "Space", "fn"/"fn-" (the "Function" modifier key that appears on most PowerBooks and iBooks; in most cases I suspect that it will be labelled as "fn" even on non-English keyboads), and "Pad-" (the modifier string used to indicate that a key belongs to the numeric keypad; in this way the software can differentiate between "9" and "Pad-9", for example).

WOHotKey supports all of these common keys as well as the very rare keys because Cocoa supports them. For more information on the possible keys that Cocoa supports, see this document:

http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/ObjC_classic/Classes/NSEvent.html


(2) "Localizable.strings"

This file contains the text that is used in the tool-tips that are shown when the user hovers the mouse of the hot key field editor when setting hot keys.


(3) "InfoPlist.strings"

You should localize this file, substituting the appropriate words for "Copyright" and "version". You should not translate the name of the framework nor the name of the copyright holder.

Binary file added MinusTextField.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
When adding WOHotKeyCaptureTextField to a window, make sure the window's initialFirstResponder is set to some other control in the window (doesn't have to be a text-based control) so that typing when the window first appears onscreen won't inadvertently set a hot key.

This also enables the "tick" button to correctly resign first responder.

Possibly interesting definitions in system headers/documentation:

- typeEventHotKeyID (10.0+)
- CopySymbolicHotKeys (10.3+)
- kHISymbolicHotKeyCode (10.3+)
- kHISymbolicHotKeyModifiers (10.3+)
- kHISymbolicHotKeyEnabled (10.3+)
- kHIHotKeyModeAllEnabled (10.4+)
- kHIHotKeyModeAllDisabled (10.4+)
- kHIHotKeyModeAllDisabledExceptUniversalAccess (10.4+)
- eventHotKeyExistsErr
Binary file added PlusTextField.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
75 changes: 75 additions & 0 deletions RunTests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
#!/bin/sh
#
# RunTests.sh
# WOHotKey
#
# Created by Wincent Colaiuta on 01 March 2006.
# Copyright 2006-2007 Wincent Colaiuta.
#

#
# Defaults
#

# test bundle path relative to this script
TEST_BUNDLE="WOHotKeyTests.bundle"

# WOTest.framework path relative to this script
TEST_FRAMEWORK="../../../../WOTest.framework"

#
# Functions
#

check_error_status()
{
ERR=$?
if [ $ERR -ne 0 ]; then
FAILURE=$ERR
fi
}

#
# Main
#

set -e

STARTING_DIRECTORY=`/bin/pwd`
builtin echo "Saved current working directory: ${STARTING_DIRECTORY}"

SCRIPT_DIRECTORY=$(/usr/bin/dirname "$0")
builtin echo "Changing to script directory: ${SCRIPT_DIRECTORY}"
cd "${SCRIPT_DIRECTORY}"
SCRIPT_DIRECTORY=$(/bin/pwd)
builtin echo "Script directory with symlinks resolved: ${SCRIPT_DIRECTORY}"

if [ "${DYLD_FRAMEWORK_PATH}" != "" ]; then
SAVE_DLYD_FRAMEWORK_PATH=`declare -p DYLD_FRAMEWORK_PATH`
builtin echo "Saved old DYLD_FRAMEWORK_PATH: ${SAVE_DLYD_FRAMEWORK_PATH}"
else
SAVE_DLYD_FRAMEWORK_PATH=""
fi

DYLD_FRAMEWORK_PATH=$(/usr/bin/dirname "${SCRIPT_DIRECTORY}/${TEST_FRAMEWORK}")
cd "${DYLD_FRAMEWORK_PATH}"
export DYLD_FRAMEWORK_PATH=$(/bin/pwd)
cd -
builtin echo "DYLD_FRAMEWORK_PATH set to ${DYLD_FRAMEWORK_PATH}"

builtin echo "Launching test runner for bundle: ${SCRIPT_DIRECTORY}/${TEST_BUNDLE}"
"${SCRIPT_DIRECTORY}/${TEST_FRAMEWORK}/Versions/A/Resources/WOTestRunner" --test-bundle="${SCRIPT_DIRECTORY}/${TEST_BUNDLE}"
check_error_status
builtin echo "Test run complete"

builtin echo "Restoring old DYLD_FRAMEWORK_PATH"
eval "${SAVE_DLYD_FRAMEWORK_PATH}"

builtin echo "Returning to old working directory"
cd "${STARTING_DIRECTORY}"

if [ $FAILURE ]; then
exit $FAILURE
else
exit 0
fi
5 changes: 5 additions & 0 deletions TODO.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
The WOHotKeyValueTransformer class is currently unused. The Cocoa Bindings code might be a bit more elegant if I started using it.

In other words, instead of having setValue/value (which uses an NSArray of NSDictionary objects) and a separate setHotKeys/hotKeys set of methods (which uses an NSArray of WOHotKey objects), I could simply always pass WOHotKey arrays, and use the transformer to convert as I move back and forth with NSUserDefaultsController.

The current system works and don't want to break it, but it's worth thinking about.
Binary file added TickTextField.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit e12e3e5

Please sign in to comment.