Re: Knowing whether a tablet is connected and switching modes
Re: Knowing whether a tablet is connected and switching modes
- Subject: Re: Knowing whether a tablet is connected and switching modes
- From: Ricky Sharp <email@hidden>
- Date: Thu, 26 Jan 2006 06:47:14 -0600
On Thursday, January 26, 2006, at 06:10AM, Gideon King <email@hidden> wrote:
>Thanks Ricky, this gave me a bit of a clue - so far I know:
>- if InkUserWritingMode returns kInkWriteNowhere, the ink recognition is off completely.
>- if it returns kInkWriteAnywhere, the application will be in writing mode unless we have overridden this for the application
>- if it returns kInkWriteInInkAwareAppsOnly, the events will be interpreted as mouse moves etc. unless we have overridden it for the application
>
>So I know what state the system is in.
That's cool; glad one doesn't have to mess with sensing tablet connection/removal.
>
>Then it appears that I can switch my application to writing recognition by using:
> InkSetApplicationWritingMode (kInkWriteAnywhereInApp);
> InkSetApplicationRecognitionMode (kInkRecognitionDefault);
>and switch it to mouse mode by using:
> InkSetApplicationWritingMode (kInkWriteInInkAwareAppsOnly);
> InkSetApplicationRecognitionMode (kInkRecognitionNone);
>
>However this appears to be something that affects only my application (the ink window doesn't change state), so it makes my application independent of the system settings, or so you would think. So I could read the system settings on startup, and explicitly set the editing mode in my application, and manage it myself from there - not what I wanted to do, but it would suffice.
>
>But it only works until the user switches modes in the ink window or system prefs or ink menu - then my application settings are thrown away, and replaced with the system setting. So I now have no idea what state we are in because I can only query the system setting and not my own application's drawing mode, as far as I can see.
>
>I really would have thought that swapping from recognition to mousing and back would have been trivial, but this is not so as far as I can see.
Hmm... So you want to have the situation where your app's initial default always matches the system? And, whenever you change the setting in the app, you want that change written through to the system as well? Unfortunately, I wouldn't know how to do the latter via an API. It may be possible to find out what key is used to store the settings and use NSUserDefaults to keep things in sync?
--
Rick Sharp
Instant Interactive(tm)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden