Re: [Linuxwacom-devel] [PATCH 0/2] add IntegratedIn feature for ISD

2012-10-11 Thread Olivier Fourdan
Updated patchset which also includes the use of kernel flags 
INPUT_PROP_POINTER/INPUT_PROP_DIRECT if available (ie applies on top 
of [PATCH] lib: use kernel flags if available and [PATCH 0/2] 
libwacom status LED helper functions - take 2

This also changes the enum to use -1 for WACOM_DEVICE_INTEGRATED_UNSET 
and 0 for WACOM_DEVICE_INTEGRATED_NONE as requested by Bastien 
(although I am still not convinced).

Also udpated the database entries as a , was used as separator in 
place of a ; as expected (thus breaking parsing for devices with 
IntegratedIn=Display;System


--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


Re: [Linuxwacom-devel] [PATCH 0/2] add IntegratedIn feature for ISD

2012-10-09 Thread Bastien Nocera
On Tue, 2012-10-09 at 16:23 +0200, Olivier Fourdan wrote:
 Bastien Nocera said the following on 10/08/2012 06:24 PM:
  [...]
  Looks to me like builtin is tablet is integrated with the display
  and ISD is tablet is integrated with the computer.
 
  I'm sure we could deprecate the _is_builtin() function, and use a
  bitmask for this support instead?
 
  LIBWACOM_DEVICE_INTEGRATED_WITH_NONE = 0,
  LIBWACOM_DEVICE_INTEGRATED_WITH_DISPLAY = 1  0,
  LIBWACOM_DEVICE_INTEGRATED_WITH_COMPUTER = 1  2
 
 
 I am no big fan of integrated with computer either, why limiting us 
 to computer, I would rather see integrated with system (system 
 being a computer, a handhelp device, etc.) Additionally that matches 
 the ISD definition, integrated system device..
 
 I would like to keep things simple (as always) for both the developer 
 and user of the API, and also avoid complicated or convoluted 
 functions names.
 
 IMHO we should keep the database format similar enough to the function 
 names accessing it, ie if we deprecate _is_builtin() in the API it 
 should be also replaced in the database.
 
 In a nutshell what I a would do instead is:
 
 database definition use something like:
 
 IntegratedIn=Display;System
 
 for a tablet PC and
 
 IntegratedIn=Display
 
 for a screen tablet such as a Cintiq.
 
 This is now set in the Device section as it's not really a feature 
 (but a characteristic of the device).
 
 Now for the API:
 
 libwacom_is_builtin() is deprecated in favor of the WacomIntegrationFlags
 
 One pain point is the BuiltIn replacement, because BuiltIn is also 
 automatically set from the sysfs device/properties (see my other email 
 about the flags in sysfs), so we need an additional flag 
 WACOM_DEVICE_INTEGRATED_UNSET indicating that the database do not 
 provide the information. In that case,

WACOM_DEVICE_INTEGRATED_UNSET = -1
Then. The compiler will make it an int instead of an unsigned int.


--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


Re: [Linuxwacom-devel] [PATCH 0/2] add IntegratedIn feature for ISD

2012-10-09 Thread Olivier Fourdan
Bastien Nocera said the following on 10/09/2012 05:18 PM:
 WACOM_DEVICE_INTEGRATED_UNSET = -1 Then. The compiler will make it 
 an int instead of an unsigned int. 

Humm, nope, not what I want.

-1 will have all bits set to 1 if I a not mistaken, so that means all 
the bits mask will return true, which is not suited. Of course we 
could test specifically for -1, but using a specific bit for UNSET has 
an additional benefit imhop, it indicates that the info is not from 
the database itself.

Cheers,
Olivier.

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


Re: [Linuxwacom-devel] [PATCH 0/2] add IntegratedIn feature for ISD

2012-10-09 Thread Bastien Nocera
On Tue, 2012-10-09 at 17:23 +0200, Olivier Fourdan wrote:
 Bastien Nocera said the following on 10/09/2012 05:18 PM:
  WACOM_DEVICE_INTEGRATED_UNSET = -1 Then. The compiler will make it 
  an int instead of an unsigned int. 
 
 Humm, nope, not what I want.
 
 -1 will have all bits set to 1 if I a not mistaken, so that means all 
 the bits mask will return true, which is not suited. Of course we 
 could test specifically for -1, but using a specific bit for UNSET has 
 an additional benefit imhop, it indicates that the info is not from 
 the database itself.

Then use 0 for unset, and something else for none...


--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


Re: [Linuxwacom-devel] [PATCH 0/2] add IntegratedIn feature for ISD

2012-10-09 Thread Olivier Fourdan
Bastien Nocera said the following on 10/09/2012 05:37 PM:
 On Tue, 2012-10-09 at 17:23 +0200, Olivier Fourdan wrote:
 Bastien Nocera said the following on 10/09/2012 05:18 PM:
 WACOM_DEVICE_INTEGRATED_UNSET = -1 Then. The compiler will make it
 an int instead of an unsigned int.
 Humm, nope, not what I want.

 -1 will have all bits set to 1 if I a not mistaken, so that means all
 the bits mask will return true, which is not suited. Of course we
 could test specifically for -1, but using a specific bit for UNSET has
 an additional benefit imhop, it indicates that the info is not from
 the database itself.
 Then use 0 for unset, and something else for none...

What would be the benefit of that?

0 is not a bit, so we loose the additional benefit of being able to 
tell the info is not from the database (even if that's not a crucial 
feature, I fail to understand why it needs to be changed).

Cheers,
Olivier.


--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel