Re: [Linuxwacom-devel] libwacom: libwacom_is_builtin() misleading?

2012-10-05 Thread Ping Cheng
On Tue, Oct 2, 2012 at 6:20 AM, Olivier Fourdan ofour...@redhat.com wrote:
 Hi all,

 While reviewing the libwacom API, I realized that
 libwacom_is_builtin() could be misleading:

/**
 * @param device The tablet to query
 * @return non-zero if the device is built-in or zero if the device
 is an
 * external tablet
 */
int libwacom_is_builtin(WacomDevice *device);

  From the description, I would expect built-in tablets (such as the
 one used for Tablet PC) to have that set to true, and all other
 external tablet to have that property set to false.

 Actually, what libwacom_is_builtin() means is that the tablet is a
 screen tablet, so all Cintiq have that property set to true, even
 though these are actually external tablets.

 Problem is in some cases it would interesting to tell if a tablet is
 actually built-in or external (for example to set the TabletPC mode
 automatically) and using libwacom_is_builtin() is not appropriate for
 that. While I understand all built-in tablets are screen tablets, not
 all screen tablets are built-in IMHO.

 Is that my own interpration of the above which is wrong or is it the
 function name/description which is misleading?

 And if it's the function name, any idea on how we could fix this
 nicely? GNOME setttings daemon does use libwacom_is_builtin() to
 determine if a tablet is a screen tablet (e.g. Cintiq).

How about introducing a new keyword and function for Tablet PCs? We
can use  libwacom_is_tabletpc() or libwacom_is_isd(), where isd stands
for Integrated System Device. Then updating the description for
libwacom_is_builtin() to clarify the difference.

Are you going to update libwacom?

Ping

--
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] libwacom: libwacom_is_builtin() misleading?

2012-10-05 Thread Olivier Fourdan

Hi Ping,

Ping Cheng said the following on 10/05/2012 06:14 PM:
 On Tue, Oct 2, 2012 at 6:20 AM, Olivier Fourdanofour...@redhat.com  wrote:
 [...]
 And if it's the function name, any idea on how we could fix this
 nicely? GNOME setttings daemon does use libwacom_is_builtin() to
 determine if a tablet is a screen tablet (e.g. Cintiq).
 How about introducing a new keyword and function for Tablet PCs? We
 can use  libwacom_is_tabletpc() or libwacom_is_isd(), where isd stands
 for Integrated System Device. Then updating the description for
 libwacom_is_builtin() to clarify the difference.

 Are you going to update libwacom?

If we reach a general consensus that this is useful, needed and 
welcome in libwacom, I shall happily submit patches to add that this 
API :-)

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] libwacom: libwacom_is_builtin() misleading?

2012-10-05 Thread Ping Cheng
On Fri, Oct 5, 2012 at 9:20 AM, Olivier Fourdan ofour...@redhat.com wrote:

 Hi Ping,

 Ping Cheng said the following on 10/05/2012 06:14 PM:

 On Tue, Oct 2, 2012 at 6:20 AM, Olivier Fourdanofour...@redhat.com
 wrote:

 [...]

 And if it's the function name, any idea on how we could fix this
 nicely? GNOME setttings daemon does use libwacom_is_builtin() to
 determine if a tablet is a screen tablet (e.g. Cintiq).

 How about introducing a new keyword and function for Tablet PCs? We
 can use  libwacom_is_tabletpc() or libwacom_is_isd(), where isd stands
 for Integrated System Device. Then updating the description for
 libwacom_is_builtin() to clarify the difference.

 Are you going to update libwacom?


 If we reach a general consensus that this is useful, needed and welcome in
 libwacom, I shall happily submit patches to add that this API :-)

Both Jason and I think it is the way to go.

Thank you for asking.

Ping

--
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