tablet: rename libinput_tool_type to libinput_tablet_tool_type

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
Peter Hutterer 2015-11-16 15:39:07 +10:00
parent 827abfbb56
commit b85d57fdf8
5 changed files with 13 additions and 13 deletions

View file

@ -186,7 +186,7 @@ tablet_change_to_left_handed(struct evdev_device *device)
static void
tablet_update_tool(struct tablet_dispatch *tablet,
struct evdev_device *device,
enum libinput_tool_type tool,
enum libinput_tablet_tool_type tool,
bool enabled)
{
assert(tool != LIBINPUT_TOOL_NONE);
@ -460,10 +460,10 @@ tablet_update_button(struct tablet_dispatch *tablet,
}
}
static inline enum libinput_tool_type
static inline enum libinput_tablet_tool_type
tablet_evcode_to_tool(int code)
{
enum libinput_tool_type type;
enum libinput_tablet_tool_type type;
switch (code) {
case BTN_TOOL_PEN: type = LIBINPUT_TOOL_TYPE_PEN; break;
@ -670,7 +670,7 @@ static void
tool_set_bits(const struct tablet_dispatch *tablet,
struct libinput_tablet_tool *tool)
{
enum libinput_tool_type type = tool->type;
enum libinput_tablet_tool_type type = tool->type;
#if HAVE_LIBWACOM
if (tool_set_bits_from_libwacom(tablet, tool) == 0)
@ -728,7 +728,7 @@ tool_set_bits(const struct tablet_dispatch *tablet,
static struct libinput_tablet_tool *
tablet_get_tool(struct tablet_dispatch *tablet,
enum libinput_tool_type type,
enum libinput_tablet_tool_type type,
uint32_t tool_id,
uint32_t serial)
{
@ -1020,7 +1020,7 @@ tablet_check_initial_proximity(struct evdev_device *device,
{
bool tool_in_prox = false;
int code, state;
enum libinput_tool_type tool;
enum libinput_tablet_tool_type tool;
struct tablet_dispatch *tablet = (struct tablet_dispatch*)dispatch;
for (tool = LIBINPUT_TOOL_TYPE_PEN; tool <= LIBINPUT_TOOL_TYPE_MAX; tool++) {

View file

@ -62,7 +62,7 @@ struct tablet_dispatch {
struct button_state button_state;
struct button_state prev_button_state;
enum libinput_tool_type current_tool_type;
enum libinput_tablet_tool_type current_tool_type;
uint32_t current_tool_id;
uint32_t current_tool_serial;
};
@ -160,7 +160,7 @@ axis_to_evcode(const enum libinput_tablet_tool_axis axis)
}
static inline int
tablet_tool_to_evcode(enum libinput_tool_type type)
tablet_tool_to_evcode(enum libinput_tablet_tool_type type)
{
int code;

View file

@ -254,7 +254,7 @@ struct libinput_tablet_tool {
struct list link;
uint32_t serial;
uint32_t tool_id;
enum libinput_tool_type type;
enum libinput_tablet_tool_type type;
unsigned char axis_caps[NCHARS(LIBINPUT_TABLET_TOOL_AXIS_MAX + 1)];
unsigned char buttons[NCHARS(KEY_MAX) + 1];
int refcount;

View file

@ -1164,7 +1164,7 @@ libinput_event_tablet_get_seat_button_count(struct libinput_event_tablet *event)
return event->seat_button_count;
}
LIBINPUT_EXPORT enum libinput_tool_type
LIBINPUT_EXPORT enum libinput_tablet_tool_type
libinput_tool_get_type(struct libinput_tablet_tool *tool)
{
return tool->type;

View file

@ -180,12 +180,12 @@ struct libinput_tablet_tool;
* device. On other devices, e.g. MS Surface 3, the eraser is the pen tip
* while a button is held down.
*
* @note The @ref libinput_tool_type can only describe the default physical
* @note The @ref libinput_tablet_tool_type can only describe the default physical
* type of the device. For devices with adjustible physical properties
* the tool type remains the same, i.e. putting a Wacom stroke nib into a
* classic pen leaves the tool type as @ref LIBINPUT_TOOL_TYPE_PEN.
*/
enum libinput_tool_type {
enum libinput_tablet_tool_type {
LIBINPUT_TOOL_TYPE_PEN = 1, /**< A generic pen */
LIBINPUT_TOOL_TYPE_ERASER, /**< Eraser */
LIBINPUT_TOOL_TYPE_BRUSH, /**< A paintbrush-like tool */
@ -1613,7 +1613,7 @@ libinput_event_tablet_get_time_usec(struct libinput_event_tablet *event);
*
* @see libinput_tool_get_tool_id
*/
enum libinput_tool_type
enum libinput_tablet_tool_type
libinput_tool_get_type(struct libinput_tablet_tool *tool);
/**