fix mac problems

This commit is contained in:
Peter Mueller 2015-02-15 22:58:25 +01:00
parent 1340ac2f48
commit 384ad886e4
6 changed files with 175 additions and 51 deletions

Binary file not shown.

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="" vcs="" />
</component>
</project>

View File

@ -11,26 +11,7 @@
</ADDITIONAL_GENERATION_ENVIRONMENT>
</component>
<component name="ChangeListManager">
<list default="true" id="f00b9f57-887a-46f7-b28b-2cb0df5a921d" name="Default" comment="">
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/COPYING.LESSER" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/COPYING" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/XInputSimulator.pro" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/main.cpp" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/notimplementedexception.cpp" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/notimplementedexception.h" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/xinputsimulator.cpp" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/xinputsimulator.h" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/xinputsimulatorimpl.cpp" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/xinputsimulatorimpl.h" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/xinputsimulatorimpllinux.cpp" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/xinputsimulatorimpllinux.h" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/xinputsimulatorimplmacos.cpp" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/xinputsimulatorimplmacos.h" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/xinputsimulatorimplwin.cpp" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/xinputsimulatorimplwin.h" />
<change type="DELETED" beforePath="$PROJECT_DIR$/XInputSimulator/main.cpp" afterPath="" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/XInputSimulator.xcodeproj/project.pbxproj" afterPath="$PROJECT_DIR$/XInputSimulator.xcodeproj/project.pbxproj" />
</list>
<list default="true" id="f00b9f57-887a-46f7-b28b-2cb0df5a921d" name="Default" comment="" />
<ignored path="XInputSimulator.iws" />
<ignored path=".idea/workspace.xml" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
@ -54,20 +35,18 @@
<entry file="file://$PROJECT_DIR$/CMakeLists.txt">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="26" column="63" selection-start-line="26" selection-start-column="63" selection-end-line="26" selection-end-column="63" />
<caret line="26" column="0" selection-start-line="26" selection-start-column="0" selection-end-line="26" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="main.cpp" pinned="false" current-in-tab="true">
<file leaf-file-name="main.cpp" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/main.cpp">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-1.5854839">
<caret line="33" column="49" selection-start-line="33" selection-start-column="49" selection-end-line="33" selection-end-column="49" />
<folding>
<element signature="e#744#763#0" expanded="true" />
</folding>
<state vertical-scroll-proportion="0.0">
<caret line="33" column="29" selection-start-line="33" selection-start-column="29" selection-end-line="33" selection-end-column="29" />
<folding />
</state>
</provider>
</entry>
@ -96,7 +75,19 @@
<entry file="file://$PROJECT_DIR$/xinputsimulatorimplmacos.cpp">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="138" column="31" selection-start-line="138" selection-start-column="31" selection-end-line="138" selection-end-column="31" />
<caret line="216" column="21" selection-start-line="216" selection-start-column="21" selection-end-line="216" selection-end-column="21" />
<folding>
<element signature="e#792#811#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="xinputsimulatorimpllinux.h" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/xinputsimulatorimpllinux.h">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
@ -122,12 +113,14 @@
</provider>
</entry>
</file>
<file leaf-file-name="xinputsimulatorimplmacos.h" pinned="false" current-in-tab="false">
<file leaf-file-name="xinputsimulatorimplmacos.h" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/xinputsimulatorimplmacos.h">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="40" column="17" selection-start-line="40" selection-start-column="17" selection-end-line="40" selection-end-column="17" />
<folding />
<state vertical-scroll-proportion="0.3016129">
<caret line="20" column="34" selection-start-line="20" selection-start-column="34" selection-end-line="20" selection-end-column="34" />
<folding>
<element signature="e#834#876#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
@ -142,6 +135,7 @@
<list>
<option value="$PROJECT_DIR$/CMakeLists.txt" />
<option value="$PROJECT_DIR$/main.cpp" />
<option value="$PROJECT_DIR$/xinputsimulatorimplmacos.h" />
</list>
</option>
</component>
@ -156,7 +150,7 @@
<option name="width" value="1916" />
<option name="height" value="1057" />
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
<component name="ProjectLevelVcsManager" settingsEditedManually="true">
<OptionsSetting value="true" id="Add" />
<OptionsSetting value="true" id="Remove" />
<OptionsSetting value="true" id="Checkout" />
@ -203,7 +197,7 @@
</component>
<component name="PropertiesComponent">
<property name="recentsLimit" value="5" />
<property name="settings.editor.selected.configurable" value="preferences.keymap" />
<property name="settings.editor.selected.configurable" value="project.propVCSSupport.Mappings" />
<property name="settings.editor.splitter.proportion" value="0.2" />
</component>
<component name="RunManager" selected="Application.XInputSimulator">
@ -212,6 +206,12 @@
<method />
</configuration>
<configuration default="true" type="js.build_tools.gulp" factoryName="Gulp.js">
<node-options />
<gulpfile />
<tasks />
<arguments />
<pass-parent-envs>true</pass-parent-envs>
<envs />
<method />
</configuration>
<configuration default="false" name="XInputSimulator" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS="FALSE" PROJECT_NAME="XInputSimulator" TARGET_NAME="XInputSimulator" CONFIG_NAME="Debug">
@ -236,24 +236,24 @@
<frame x="0" y="23" width="1916" height="1057" extended-state="0" />
<editor active="true" />
<layout>
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.55751294" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.18031088" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.24940239" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="CMake" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="CMake" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.13931398" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.3284974" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
</layout>
</component>
<component name="VcsContentAnnotationSettings">
@ -269,6 +269,30 @@
<watches-manager />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/CMakeLists.txt">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="26" column="0" selection-start-line="26" selection-start-column="0" selection-end-line="26" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/main.cpp">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file:///Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/Carbon.framework/Headers/Carbon.h">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/xinputsimulatorimpllinux.cpp">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
@ -277,10 +301,20 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/xinputsimulatorimplmacos.h">
<entry file="file://$PROJECT_DIR$/xinputsimulatorimplmacos.cpp">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="40" column="17" selection-start-line="40" selection-start-column="17" selection-end-line="40" selection-end-column="17" />
<caret line="138" column="0" selection-start-line="138" selection-start-column="0" selection-end-line="138" selection-end-column="0" />
<folding>
<element signature="e#792#811#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/notimplementedexception.cpp">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
@ -293,10 +327,28 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/xinputsimulatorimplmacos.cpp">
<entry file="file://$PROJECT_DIR$/xinputsimulatorimplmacos.h">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="138" column="31" selection-start-line="138" selection-start-column="31" selection-end-line="138" selection-end-column="31" />
<caret line="40" column="17" selection-start-line="40" selection-start-column="17" selection-end-line="40" selection-end-column="17" />
<folding>
<element signature="e#834#876#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/xinputsimulatorimpllinux.cpp">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/xinputsimulatorimpl.h">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="28" column="17" selection-start-line="28" selection-start-column="17" selection-end-line="28" selection-end-column="17" />
<folding />
</state>
</provider>
@ -312,7 +364,7 @@
<entry file="file://$PROJECT_DIR$/CMakeLists.txt">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="26" column="63" selection-start-line="26" selection-start-column="63" selection-end-line="26" selection-end-column="63" />
<caret line="26" column="0" selection-start-line="26" selection-start-column="0" selection-end-line="26" selection-end-column="0" />
<folding />
</state>
</provider>
@ -327,10 +379,36 @@
</entry>
<entry file="file://$PROJECT_DIR$/main.cpp">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-1.5854839">
<caret line="33" column="49" selection-start-line="33" selection-start-column="49" selection-end-line="33" selection-end-column="49" />
<state vertical-scroll-proportion="0.0">
<caret line="33" column="29" selection-start-line="33" selection-start-column="29" selection-end-line="33" selection-end-column="29" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/xinputsimulatorimpllinux.h">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/xinputsimulatorimplmacos.cpp">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="216" column="21" selection-start-line="216" selection-start-column="21" selection-end-line="216" selection-end-column="21" />
<folding>
<element signature="e#744#763#0" expanded="true" />
<element signature="e#792#811#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/xinputsimulatorimplmacos.h">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.3016129">
<caret line="20" column="34" selection-start-line="20" selection-start-column="34" selection-end-line="20" selection-end-column="34" />
<folding>
<element signature="e#834#876#0" expanded="true" />
</folding>
</state>
</provider>

View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDESourceControlProjectFavoriteDictionaryKey</key>
<false/>
<key>IDESourceControlProjectIdentifier</key>
<string>433BB087-93D1-44C5-9CDA-8B830D581EEC</string>
<key>IDESourceControlProjectName</key>
<string>XInputSimulator</string>
<key>IDESourceControlProjectOriginsDictionary</key>
<dict>
<key>5B66F958621F83B860CA07FA4EF8EDA03E54E763</key>
<string>https://github.com/pythoneer/XInputSimulator.git</string>
</dict>
<key>IDESourceControlProjectPath</key>
<string>XInputSimulator/XInputSimulator.xcodeproj</string>
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
<dict>
<key>5B66F958621F83B860CA07FA4EF8EDA03E54E763</key>
<string>../../..</string>
</dict>
<key>IDESourceControlProjectURL</key>
<string>https://github.com/pythoneer/XInputSimulator.git</string>
<key>IDESourceControlProjectVersion</key>
<integer>111</integer>
<key>IDESourceControlProjectWCCIdentifier</key>
<string>5B66F958621F83B860CA07FA4EF8EDA03E54E763</string>
<key>IDESourceControlProjectWCConfigurations</key>
<array>
<dict>
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
<string>public.vcs.git</string>
<key>IDESourceControlWCCIdentifierKey</key>
<string>5B66F958621F83B860CA07FA4EF8EDA03E54E763</string>
<key>IDESourceControlWCCName</key>
<string>XInputSimulator</string>
</dict>
</array>
</dict>
</plist>

View File

@ -21,6 +21,10 @@
#ifndef XINPUTSIMULATORIMPLMACOS_H
#define XINPUTSIMULATORIMPLMACOS_H
#include <CoreFoundation/CoreFoundation.h>
#include <CoreGraphics/CoreGraphics.h>
#include <Carbon/Carbon.h> /* For kVK_ constants, and TIS functions. */
#include "xinputsimulatorimpl.h"
class XInputSimulatorImplMacOs : public XInputSimulatorImpl
@ -33,6 +37,7 @@ private:
size_t displayY;
void initCurrentMousePosition();
CFStringRef createStringForKey(CGKeyCode keyCode);
public:
XInputSimulatorImplMacOs();