frame-mtdev.h   frame-mtdev.h 
skipping to change at line 43 skipping to change at line 43
* \defgroup v1-mtdev MTDev * \defgroup v1-mtdev MTDev
* @{ * @{
*/ */
#define MTDEV_NO_LEGACY_API #define MTDEV_NO_LEGACY_API
#include <utouch/frame.h> #include <utouch/frame.h>
#include <evemu.h> #include <evemu.h>
#include <mtdev.h> #include <mtdev.h>
FRAME_PUBLIC
int utouch_frame_is_supported_mtdev(const struct evemu_device *dev); int utouch_frame_is_supported_mtdev(const struct evemu_device *dev);
FRAME_PUBLIC
int utouch_frame_init_mtdev(utouch_frame_handle fh, int utouch_frame_init_mtdev(utouch_frame_handle fh,
const struct evemu_device *dev); const struct evemu_device *dev);
FRAME_PUBLIC
const struct utouch_frame * const struct utouch_frame *
utouch_frame_pump_mtdev(utouch_frame_handle fh, const struct input_event *e v); utouch_frame_pump_mtdev(utouch_frame_handle fh, const struct input_event *e v);
/** /**
* @} * @}
* *
* @} * @}
*/ */
#ifdef __cplusplus #ifdef __cplusplus
 End of changes. 3 change blocks. 
0 lines changed or deleted 3 lines changed or added


 frame.h   frame.h 
skipping to change at line 30 skipping to change at line 30
************************************************************************** **/ ************************************************************************** **/
/** /**
* @file utouch/frame.h * @file utouch/frame.h
* Definitions of the main and platform-generic API * Definitions of the main and platform-generic API
*/ */
#ifndef UTOUCH_FRAME_UTOUCH_FRAME_H_ #ifndef UTOUCH_FRAME_UTOUCH_FRAME_H_
#define UTOUCH_FRAME_UTOUCH_FRAME_H_ #define UTOUCH_FRAME_UTOUCH_FRAME_H_
/* Macros that set symbol visibilities in shared libraries properly.
* Adapted from http://gcc.gnu.org/wiki/Visibility
*/
#if defined _WIN32 || defined __CYGWIN__
#ifdef BUILDING_FRAME
#define FRAME_PUBLIC __declspec(dllexport)
#else
#define FRAME_PUBLIC __declspec(dllimport)
#endif
#else
#if defined __GNUC__
#define FRAME_PUBLIC __attribute__ ((visibility("default")))
#else
#pragma message ("Compiler does not support symbol visibility.")
#define FRAME_PUBLIC
#endif
#endif
/* Clang provides __has_extension, but GCC does not */ /* Clang provides __has_extension, but GCC does not */
#ifdef __has_extension #ifdef __has_extension
#if __has_extension(c_generic_selections) #if __has_extension(c_generic_selections)
#define HAS_C_GENERIC_SELECTIONS #define HAS_C_GENERIC_SELECTIONS
#endif // __has_extension #endif // __has_extension
#endif // __has_extension(c_generic_selections) #endif // __has_extension(c_generic_selections)
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
skipping to change at line 210 skipping to change at line 229
struct utouch_contact **active; struct utouch_contact **active;
struct utouch_contact **slots; struct utouch_contact **slots;
}; };
/** /**
* utouch_frame_get_version - get library abi version * utouch_frame_get_version - get library abi version
* *
* Returns the version of the library, which may be different * Returns the version of the library, which may be different
* from the api version of the compiled user program. * from the api version of the compiled user program.
*/ */
FRAME_PUBLIC
unsigned int utouch_frame_get_version(void); unsigned int utouch_frame_get_version(void);
/** /**
* utouch_frame_get_num_frames - get number of supported frames * utouch_frame_get_num_frames - get number of supported frames
* *
* Returns the number of frames supported by this engine. * Returns the number of frames supported by this engine.
*/ */
FRAME_PUBLIC
unsigned int utouch_frame_get_num_frames(utouch_frame_handle fh); unsigned int utouch_frame_get_num_frames(utouch_frame_handle fh);
/** /**
* utouch_frame_get_num_slots - get number of supported slots * utouch_frame_get_num_slots - get number of supported slots
* *
* Returns the number of simultaneous contacts supported by this engine. * Returns the number of simultaneous contacts supported by this engine.
*/ */
FRAME_PUBLIC
unsigned int utouch_frame_get_num_slots(utouch_frame_handle fh); unsigned int utouch_frame_get_num_slots(utouch_frame_handle fh);
FRAME_PUBLIC
utouch_frame_handle utouch_frame_new_engine_raw(unsigned int num_frames, utouch_frame_handle utouch_frame_new_engine_raw(unsigned int num_frames,
unsigned int num_slots, unsigned int num_slots,
unsigned int frame_rate, unsigned int frame_rate,
unsigned int version, unsigned int version,
unsigned int surface_size, unsigned int surface_size,
unsigned int frame_size, unsigned int frame_size,
unsigned int slot_size); unsigned int slot_size);
/** /**
* utouch_frame_new_engine - allocate a new frame engine * utouch_frame_new_engine - allocate a new frame engine
skipping to change at line 258 skipping to change at line 281
sizeof(struct utouch_surface), \ sizeof(struct utouch_surface), \
sizeof(struct utouch_frame), \ sizeof(struct utouch_frame), \
sizeof(struct utouch_contact)) sizeof(struct utouch_contact))
/** /**
* utouch_frame_delete_engine - deallocate a frame engine * utouch_frame_delete_engine - deallocate a frame engine
* @fh: frame engine in use * @fh: frame engine in use
* *
* Deallocates all memory associated with the engine. * Deallocates all memory associated with the engine.
*/ */
FRAME_PUBLIC
void utouch_frame_delete_engine(utouch_frame_handle fh); void utouch_frame_delete_engine(utouch_frame_handle fh);
/** /**
* utouch_frame_get_surface - get the mutable device surface information * utouch_frame_get_surface - get the mutable device surface information
* @fh: the frame engine in use * @fh: the frame engine in use
* *
* Returns a pointer to the mutable device surface information. It is * Returns a pointer to the mutable device surface information. It is
* preferrably set up by one of the input handlers. The pointer is ABI * preferrably set up by one of the input handlers. The pointer is ABI
* agnostic, has frame engine scope, and is owned by the engine. * agnostic, has frame engine scope, and is owned by the engine.
*/ */
FRAME_PUBLIC
struct utouch_surface *utouch_frame_get_surface(utouch_frame_handle fh); struct utouch_surface *utouch_frame_get_surface(utouch_frame_handle fh);
/** /**
* utouch_frame_get_current_slot - get the current mutable slot contact * utouch_frame_get_current_slot - get the current mutable slot contact
* @fh: the frame engine in use * @fh: the frame engine in use
* *
* Returns a pointer to the contact current being modified. The * Returns a pointer to the contact current being modified. The
* pointer is ABI agnostic, has frame engine scope, and is owned by * pointer is ABI agnostic, has frame engine scope, and is owned by
* the engine. * the engine.
*/ */
FRAME_PUBLIC
struct utouch_contact *utouch_frame_get_current_slot(utouch_frame_handle fh ); struct utouch_contact *utouch_frame_get_current_slot(utouch_frame_handle fh );
/** /**
* utouch_frame_set_current_slot - set the current slot number * utouch_frame_set_current_slot - set the current slot number
* @fh: the frame engine in use * @fh: the frame engine in use
* @slot: the slot number * @slot: the slot number
* *
* Sets the slot currently being modified. Returns zero if successful, * Sets the slot currently being modified. Returns zero if successful,
* negative error otherwise. * negative error otherwise.
*/ */
FRAME_PUBLIC
int utouch_frame_set_current_slot(utouch_frame_handle fh, int slot); int utouch_frame_set_current_slot(utouch_frame_handle fh, int slot);
/** /**
* utouch_frame_set_current_id - set the current slot by touch id * utouch_frame_set_current_id - set the current slot by touch id
* @fh: the frame engine in use * @fh: the frame engine in use
* @id: the touch id * @id: the touch id
* *
* Sets the slot currently being modified, by touch id. If the id is * Sets the slot currently being modified, by touch id. If the id is
* not currently in use (does not have an active slot), a new slot is * not currently in use (does not have an active slot), a new slot is
* assigned. Returns zero if successful, negative error otherwise. * assigned. Returns zero if successful, negative error otherwise.
*/ */
FRAME_PUBLIC
int utouch_frame_set_current_id(utouch_frame_handle fh, int id); int utouch_frame_set_current_id(utouch_frame_handle fh, int id);
/** /**
* utouch_frame_sync - synchronize and return new frame * utouch_frame_sync - synchronize and return new frame
* @fh: the frame engine in use * @fh: the frame engine in use
* @time: the frame synchronization time (ms) * @time: the frame synchronization time (ms)
* *
* Scans through the updates, and in case the changes make up a new * Scans through the updates, and in case the changes make up a new
* frame, returns the updated frame. * frame, returns the updated frame.
* *
* If time is zero, a time-of-receipt will be used instead. * If time is zero, a time-of-receipt will be used instead.
* *
* The frame returned is always the next in the cyclic list, and * The frame returned is always the next in the cyclic list, and
* always points back at the previous frame returned by this function. * always points back at the previous frame returned by this function.
* *
* The returned pointer is ABI agnostic and owned by the frame * The returned pointer is ABI agnostic and owned by the frame
* engine. It may very well be zero if there is nothing to report or * engine. It may very well be zero if there is nothing to report or
* if the frame rate is limited. * if the frame rate is limited.
*/ */
FRAME_PUBLIC
const struct utouch_frame *utouch_frame_sync(utouch_frame_handle fh, const struct utouch_frame *utouch_frame_sync(utouch_frame_handle fh,
utouch_frame_time_t time); utouch_frame_time_t time);
/** /**
* utouch_coordinate_transform_cb - user-definable callback that transforms a touch point * utouch_coordinate_transform_cb - user-definable callback that transforms a touch point
* @x: pointer to an x coordinate (in, out) * @x: pointer to an x coordinate (in, out)
* @y: pointer to a y coordinate (in, out) * @y: pointer to a y coordinate (in, out)
* @user_data: opaque pointer, passed by the user when setting the callback * @user_data: opaque pointer, passed by the user when setting the callback
*/ */
typedef void (*utouch_coordinate_transform_cb)(float *x, float *y, void *us er_data); typedef void (*utouch_coordinate_transform_cb)(float *x, float *y, void *us er_data);
/** /**
* utouch_frame_set_coordinate_transform_callback - set a callback to obtai n a transformation * utouch_frame_set_coordinate_transform_callback - set a callback to obtai n a transformation
* to apply to every touch point * to apply to every touch point
* @fh: the frame engine in use * @fh: the frame engine in use
* @callback: the callback that transforms x and y * @callback: the callback that transforms x and y
* @user_data: opaque pointer to user data for the callback * @user_data: opaque pointer to user data for the callback
*/ */
FRAME_PUBLIC
void utouch_frame_set_coordinate_transform_callback(utouch_frame_handle fh, void utouch_frame_set_coordinate_transform_callback(utouch_frame_handle fh,
utouch_coordinate_transf orm_cb callback, utouch_coordinate_transf orm_cb callback,
void *user_data); void *user_data);
/** @} */ /** @} */
/** /**
* @defgroup v2 uTouch-Frame 2.x * @defgroup v2 uTouch-Frame 2.x
* @{ * @{
*/ */
skipping to change at line 640 skipping to change at line 670
/** /**
* Get the event file descriptor for the uTouch Frame context * Get the event file descriptor for the uTouch Frame context
* *
* @param [in] handle The uTouch Frame context object * @param [in] handle The uTouch Frame context object
* @return A file descriptor for the context * @return A file descriptor for the context
* *
* When events are available for processing, the file descriptor will be * When events are available for processing, the file descriptor will be
* readable. Perform an 8-byte read from the file descriptor to clear the s tate. * readable. Perform an 8-byte read from the file descriptor to clear the s tate.
* Refer to the EVENTFD(2) man page for more details. * Refer to the EVENTFD(2) man page for more details.
*/ */
FRAME_PUBLIC
int frame_get_fd(UFHandle handle); int frame_get_fd(UFHandle handle);
/** /**
* Get an event from the uTouch Frame context * Get an event from the uTouch Frame context
* *
* @param [in] handle The context object * @param [in] handle The context object
* @param [out] event The retrieved event * @param [out] event The retrieved event
* @return UFStatusSuccess or UFStatusErrorNoEvent * @return UFStatusSuccess or UFStatusErrorNoEvent
* *
* The reference count of the returned event is implicity incremented once. * The reference count of the returned event is implicity incremented once.
*/ */
FRAME_PUBLIC
UFStatus frame_get_event(UFHandle handle, UFEvent *event); UFStatus frame_get_event(UFHandle handle, UFEvent *event);
/** /**
* Get the value of a property of a device * Get the value of a property of a device
* *
* @param [in] device The device object (const) * @param [in] device The device object (const)
* @param [in] property The property to retrieve a value for * @param [in] property The property to retrieve a value for
* @param [out] value The value retrieved * @param [out] value The value retrieved
* @return UFStatusSuccess or UFStatusErrorUnknownProperty * @return UFStatusSuccess or UFStatusErrorUnknownProperty
*/ */
#ifndef HAS_C_GENERIC_SELECTIONS /* See frame_internal.h */ #ifndef HAS_C_GENERIC_SELECTIONS /* See frame_internal.h */
FRAME_PUBLIC
UFStatus frame_device_get_property(UFDevice device, UFDeviceProperty proper ty, UFStatus frame_device_get_property(UFDevice device, UFDeviceProperty proper ty,
void *value); void *value);
#endif #endif
/** /**
* Get a device touch axis by index * Get a device touch axis by index
* *
* @param [in] device The device object (const) * @param [in] device The device object (const)
* @param [in] index The index of the axis to get * @param [in] index The index of the axis to get
* @param [out] axis The axis retrieved * @param [out] axis The axis retrieved
* @return UFStatusSuccess or UFStatusErrorInvalidAxis * @return UFStatusSuccess or UFStatusErrorInvalidAxis
* *
* The index value must be greater than or equal to 0 and less than the num ber * The index value must be greater than or equal to 0 and less than the num ber
* axes of the device. * axes of the device.
*/ */
FRAME_PUBLIC
UFStatus frame_device_get_axis_by_index(UFDevice device, unsigned int index , UFStatus frame_device_get_axis_by_index(UFDevice device, unsigned int index ,
UFAxis *axis); UFAxis *axis);
/** /**
* Get a device touch axis by axis type * Get a device touch axis by axis type
* *
* @param [in] device The device object (const) * @param [in] device The device object (const)
* @param [in] type The axis type * @param [in] type The axis type
* @param [out] axis The axis retrieved * @param [out] axis The axis retrieved
* @return UFStatusSuccess or UFStatusErrorInvalidAxis * @return UFStatusSuccess or UFStatusErrorInvalidAxis
* *
* UFStatusErrorInvalidAxis is returned if the device does not have an axis of * UFStatusErrorInvalidAxis is returned if the device does not have an axis of
* the type requested. * the type requested.
*/ */
FRAME_PUBLIC
UFStatus frame_device_get_axis_by_type(UFDevice device, UFAxisType type, UFStatus frame_device_get_axis_by_type(UFDevice device, UFAxisType type,
UFAxis *axis); UFAxis *axis);
/** /**
* Get the type of a touch device axis * Get the type of a touch device axis
* *
* @param [in] axis The touch device axis (const) * @param [in] axis The touch device axis (const)
* @return The type of the axis * @return The type of the axis
*/ */
FRAME_PUBLIC
UFAxisType frame_axis_get_type(UFAxis axis); UFAxisType frame_axis_get_type(UFAxis axis);
/** /**
* Get the minimum value of a touch device axis * Get the minimum value of a touch device axis
* *
* @param [in] axis The touch device axis (const) * @param [in] axis The touch device axis (const)
* @return The minimum value of the axis * @return The minimum value of the axis
*/ */
FRAME_PUBLIC
float frame_axis_get_minimum(UFAxis axis); float frame_axis_get_minimum(UFAxis axis);
/** /**
* Get the maximum value of a touch device axis * Get the maximum value of a touch device axis
* *
* @param [in] axis The touch device axis (const) * @param [in] axis The touch device axis (const)
* @return The maximum value of the axis * @return The maximum value of the axis
*/ */
FRAME_PUBLIC
float frame_axis_get_maximum(UFAxis axis); float frame_axis_get_maximum(UFAxis axis);
/** /**
* Get the resolution of a touch device axis * Get the resolution of a touch device axis
* *
* @param [in] axis The touch device axis (const) * @param [in] axis The touch device axis (const)
* @return The resolution of the axis * @return The resolution of the axis
*/ */
FRAME_PUBLIC
float frame_axis_get_resolution(UFAxis axis); float frame_axis_get_resolution(UFAxis axis);
/** /**
* Increment the reference count of an event * Increment the reference count of an event
* *
* @param [in] event The event object * @param [in] event The event object
*/ */
FRAME_PUBLIC
void frame_event_ref(UFEvent event); void frame_event_ref(UFEvent event);
/** /**
* Decrement the reference count of an event * Decrement the reference count of an event
* *
* @param [in] event The event object * @param [in] event The event object
* *
* When the reference count reaches zero, the event is freed. * When the reference count reaches zero, the event is freed.
*/ */
FRAME_PUBLIC
void frame_event_unref(UFEvent event); void frame_event_unref(UFEvent event);
/** /**
* Get the value of a property of an event * Get the value of a property of an event
* *
* @param [in] event The event object (const) * @param [in] event The event object (const)
* @param [in] property The property to retrieve a value for * @param [in] property The property to retrieve a value for
* @param [out] value The value retrieved * @param [out] value The value retrieved
* @return UFStatusSuccess or UFStatusErrorUnknownProperty * @return UFStatusSuccess or UFStatusErrorUnknownProperty
*/ */
#ifndef HAS_C_GENERIC_SELECTIONS /* See frame_internal.h */ #ifndef HAS_C_GENERIC_SELECTIONS /* See frame_internal.h */
FRAME_PUBLIC
UFStatus frame_event_get_property(UFEvent event, UFEventProperty property, UFStatus frame_event_get_property(UFEvent event, UFEventProperty property,
void *value); void *value);
#endif #endif
/** /**
* Get the value of a property of a frame * Get the value of a property of a frame
* *
* @param [in] frame The frame object (const) * @param [in] frame The frame object (const)
* @param [in] property The property to retrieve a value for * @param [in] property The property to retrieve a value for
* @param [out] value The value retrieved * @param [out] value The value retrieved
* @return UFStatusSuccess or UFStatusErrorUnknownProperty * @return UFStatusSuccess or UFStatusErrorUnknownProperty
*/ */
#ifndef HAS_C_GENERIC_SELECTIONS /* See frame_internal.h */ #ifndef HAS_C_GENERIC_SELECTIONS /* See frame_internal.h */
FRAME_PUBLIC
UFStatus frame_frame_get_property(UFFrame frame, UFFrameProperty property, UFStatus frame_frame_get_property(UFFrame frame, UFFrameProperty property,
void *value); void *value);
#endif #endif
/** /**
* Get a touch of a frame by index * Get a touch of a frame by index
* *
* @param [in] frame The frame object (const) * @param [in] frame The frame object (const)
* @param [in] index The index of the touch to get * @param [in] index The index of the touch to get
* @param [out] touch The touch retrieved * @param [out] touch The touch retrieved
* @return UFStatusSuccess or UFStatusErrorInvalidTouch * @return UFStatusSuccess or UFStatusErrorInvalidTouch
* *
* The index value must be greater than or equal to 0 and less than the num ber * The index value must be greater than or equal to 0 and less than the num ber
* touches reported in the frame. * touches reported in the frame.
*/ */
FRAME_PUBLIC
UFStatus frame_frame_get_touch_by_index(UFFrame frame, unsigned int index, UFStatus frame_frame_get_touch_by_index(UFFrame frame, unsigned int index,
UFTouch *touch); UFTouch *touch);
/** /**
* Get a touch from a frame by the window server ID * Get a touch from a frame by the window server ID
* *
* @param [in] frame The frame object (const) * @param [in] frame The frame object (const)
* @param [in] touch_id The window server ID of the touch * @param [in] touch_id The window server ID of the touch
* The value type of the touch ID is window server dependent. S ee * The value type of the touch ID is window server dependent. S ee
* UFTouchPropertyId for more details. * UFTouchPropertyId for more details.
* @param [out] touch The touch object * @param [out] touch The touch object
* @return UFStatusSuccess or UFStatusErrorInvalidTouch * @return UFStatusSuccess or UFStatusErrorInvalidTouch
*/ */
FRAME_PUBLIC
UFStatus frame_frame_get_touch_by_id(UFFrame frame, UFTouchId touch_id, UFStatus frame_frame_get_touch_by_id(UFFrame frame, UFTouchId touch_id,
UFTouch* touch); UFTouch* touch);
/** /**
* Get the previous value of a property of a touch * Get the previous value of a property of a touch
* *
* @param [in] frame The current frame object (const) * @param [in] frame The current frame object (const)
* @param [in] touch The current touch object (const) * @param [in] touch The current touch object (const)
* @param [in] property The property to retrieve a value for * @param [in] property The property to retrieve a value for
* @param [out] value The value retrieved * @param [out] value The value retrieved
* @return UFStatusSuccess, UFStatusErrorUnknownProperty, or * @return UFStatusSuccess, UFStatusErrorUnknownProperty, or
* UFStatusErrorInvalidTouch * UFStatusErrorInvalidTouch
* *
* The previous value is the value of the property in the previous frame. * The previous value is the value of the property in the previous frame.
* UFStatusErrorInvalidTouch is returned if the touch did not exist in the * UFStatusErrorInvalidTouch is returned if the touch did not exist in the
* previous frame. * previous frame.
*/ */
FRAME_PUBLIC
UFStatus frame_frame_get_previous_touch_property(UFFrame frame, UFTouch tou ch, UFStatus frame_frame_get_previous_touch_property(UFFrame frame, UFTouch tou ch,
UFTouchProperty property, UFTouchProperty property,
void *value); void *value);
/** /**
* Get the previous value of an axis of a touch * Get the previous value of an axis of a touch
* *
* @param [in] frame The current frame object (const) * @param [in] frame The current frame object (const)
* @param [in] touch The current touch object (const) * @param [in] touch The current touch object (const)
* @param [in] type The axis to retrieve a value for * @param [in] type The axis to retrieve a value for
* @param [out] value The value retrieved * @param [out] value The value retrieved
* @return UFStatusSuccess, UFStatusErrorInvalidAxis, or * @return UFStatusSuccess, UFStatusErrorInvalidAxis, or
* UFStatusErrorInvalidTouch * UFStatusErrorInvalidTouch
* *
* The previous value is the value of the axis in the previous frame. * The previous value is the value of the axis in the previous frame.
* UFStatusErrorInvalidTouch is returned if the touch did not exist in the * UFStatusErrorInvalidTouch is returned if the touch did not exist in the
* previous frame. * previous frame.
*/ */
FRAME_PUBLIC
UFStatus frame_frame_get_previous_touch_value(UFFrame frame, UFTouch touch, UFStatus frame_frame_get_previous_touch_value(UFFrame frame, UFTouch touch,
UFAxisType type, float* value ); UFAxisType type, float* value );
/** /**
* Get the value of a property of a touch * Get the value of a property of a touch
* *
* @param [in] touch The touch object (const) * @param [in] touch The touch object (const)
* @param [in] property The property to retrieve a value for * @param [in] property The property to retrieve a value for
* @param [out] value The value retrieved * @param [out] value The value retrieved
* @return UFStatusSuccess or UFStatusErrorUnknownProperty * @return UFStatusSuccess or UFStatusErrorUnknownProperty
*/ */
#ifndef HAS_C_GENERIC_SELECTIONS /* See frame_internal.h */ #ifndef HAS_C_GENERIC_SELECTIONS /* See frame_internal.h */
FRAME_PUBLIC
UFStatus frame_touch_get_property(UFTouch touch, UFTouchProperty property, UFStatus frame_touch_get_property(UFTouch touch, UFTouchProperty property,
void *value); void *value);
#endif #endif
/** /**
* Get the value of an axis of a touch * Get the value of an axis of a touch
* *
* @param [in] touch The touch object (const) * @param [in] touch The touch object (const)
* @param [in] type The axis to retrieve a value for * @param [in] type The axis to retrieve a value for
* @param [out] value The value retrieved * @param [out] value The value retrieved
* @return UFStatusSuccess or UFStatusErrorInvalidAxis * @return UFStatusSuccess or UFStatusErrorInvalidAxis
*/ */
FRAME_PUBLIC
UFStatus frame_touch_get_value(UFTouch touch, UFAxisType type, float *value ); UFStatus frame_touch_get_value(UFTouch touch, UFAxisType type, float *value );
/** /**
* @defgroup v2-helpers Helper Functions * @defgroup v2-helpers Helper Functions
* These helper functions may be used in place of the generic property gett ers. * These helper functions may be used in place of the generic property gett ers.
* They are limited to properties that are guaranteed to exist in all insta nces * They are limited to properties that are guaranteed to exist in all insta nces
* of the objects. * of the objects.
* @{ * @{
*/ */
/** /**
* Get the type of an event * Get the type of an event
* *
* @param [in] event The event object (const) * @param [in] event The event object (const)
* @return The type of the event * @return The type of the event
*/ */
FRAME_PUBLIC
UFEventType frame_event_get_type(UFEvent event); UFEventType frame_event_get_type(UFEvent event);
/** /**
* Get the time of an event * Get the time of an event
* *
* @param [in] event The event object (const) * @param [in] event The event object (const)
* @return The time of the event * @return The time of the event
*/ */
FRAME_PUBLIC
uint64_t frame_event_get_time(UFEvent event); uint64_t frame_event_get_time(UFEvent event);
/** /**
* Get the number of axes of a device * Get the number of axes of a device
* *
* @param [in] device The device object (const) * @param [in] device The device object (const)
* @return The number of axes * @return The number of axes
*/ */
FRAME_PUBLIC
unsigned int frame_device_get_num_axes(UFDevice device); unsigned int frame_device_get_num_axes(UFDevice device);
/** /**
* Get The resolution of the window coordinates of the device in the X axis * Get The resolution of the window coordinates of the device in the X axis
* *
* @param [in] device The device object (const) * @param [in] device The device object (const)
* @return The resolution in pixels per meter * @return The resolution in pixels per meter
*/ */
FRAME_PUBLIC
float frame_device_get_window_resolution_x(UFDevice device); float frame_device_get_window_resolution_x(UFDevice device);
/** /**
* Get The resolution of the window coordinates of the device in the Y axis * Get The resolution of the window coordinates of the device in the Y axis
* *
* @param [in] device The device object (const) * @param [in] device The device object (const)
* @return The resolution in pixels per meter * @return The resolution in pixels per meter
*/ */
FRAME_PUBLIC
float frame_device_get_window_resolution_y(UFDevice device); float frame_device_get_window_resolution_y(UFDevice device);
/** /**
* Get the number of touches in the frame * Get the number of touches in the frame
* *
* @param [in] frame The frame object (const) * @param [in] frame The frame object (const)
* @return The number of touches * @return The number of touches
*/ */
FRAME_PUBLIC
uint32_t frame_frame_get_num_touches(UFFrame frame); uint32_t frame_frame_get_num_touches(UFFrame frame);
/** /**
* Get the device of a frame * Get the device of a frame
* *
* @param [in] frame The frame context object (const) * @param [in] frame The frame context object (const)
* return The device of the window context * return The device of the window context
*/ */
FRAME_PUBLIC
UFDevice frame_frame_get_device(UFFrame frame); UFDevice frame_frame_get_device(UFFrame frame);
/** /**
* Get the window ID of a frame * Get the window ID of a frame
* *
* @param [in] frame The frame context object (const) * @param [in] frame The frame context object (const)
* @return The window server ID of the window of the frame * @return The window server ID of the window of the frame
*/ */
FRAME_PUBLIC
UFWindowId frame_frame_get_window_id(UFFrame frame); UFWindowId frame_frame_get_window_id(UFFrame frame);
/** /**
* Get the window server ID of a touch * Get the window server ID of a touch
* *
* @param [in] touch The touch context object (const) * @param [in] touch The touch context object (const)
* @return The window server ID of the touch * @return The window server ID of the touch
*/ */
FRAME_PUBLIC
UFTouchId frame_touch_get_id(UFTouch touch); UFTouchId frame_touch_get_id(UFTouch touch);
/** /**
* Get the state of a touch * Get the state of a touch
* *
* @param [in] touch The touch object (const) * @param [in] touch The touch object (const)
* @return The state of the touch * @return The state of the touch
*/ */
FRAME_PUBLIC
UFTouchState frame_touch_get_state(UFTouch touch); UFTouchState frame_touch_get_state(UFTouch touch);
/** /**
* Get the X window coordinate of a touch * Get the X window coordinate of a touch
* *
* @param [in] touch The touch object (const) * @param [in] touch The touch object (const)
* @return The X window coordinate of the touch * @return The X window coordinate of the touch
*/ */
FRAME_PUBLIC
float frame_touch_get_window_x(UFTouch touch); float frame_touch_get_window_x(UFTouch touch);
/** /**
* Get the Y window coordinate of a touch * Get the Y window coordinate of a touch
* *
* @param [in] touch The touch object (const) * @param [in] touch The touch object (const)
* @return The Y window coordinate of the touch * @return The Y window coordinate of the touch
*/ */
FRAME_PUBLIC
float frame_touch_get_window_y(UFTouch touch); float frame_touch_get_window_y(UFTouch touch);
/** /**
* Get the X device coordinate of a touch * Get the X device coordinate of a touch
* *
* @param [in] touch The touch object (const) * @param [in] touch The touch object (const)
* @return The X device coordinate of the touch * @return The X device coordinate of the touch
*/ */
FRAME_PUBLIC
float frame_touch_get_device_x(UFTouch touch); float frame_touch_get_device_x(UFTouch touch);
/** /**
* Get the Y device coordinate of a touch * Get the Y device coordinate of a touch
* *
* @param [in] touch The touch object (const) * @param [in] touch The touch object (const)
* @return The Y device coordinate of the touch * @return The Y device coordinate of the touch
*/ */
FRAME_PUBLIC
float frame_touch_get_device_y(UFTouch touch); float frame_touch_get_device_y(UFTouch touch);
/** /**
* Get the time of a touch state change * Get the time of a touch state change
* *
* @param [in] touch The touch object (const) * @param [in] touch The touch object (const)
* @return The time of the touch state change * @return The time of the touch state change
*/ */
FRAME_PUBLIC
uint64_t frame_touch_get_time(UFTouch touch); uint64_t frame_touch_get_time(UFTouch touch);
/** /**
* Get the start time of a touch * Get the start time of a touch
* *
* @param [in] touch The touch object (const) * @param [in] touch The touch object (const)
* @return The start time of the touch * @return The start time of the touch
*/ */
FRAME_PUBLIC
uint64_t frame_touch_get_start_time(UFTouch touch); uint64_t frame_touch_get_start_time(UFTouch touch);
/** @} */ /** @} */
/** @} */ /** @} */
#include <utouch/frame_internal.h> #include <utouch/frame_internal.h>
#ifdef __cplusplus #ifdef __cplusplus
} }
 End of changes. 47 change blocks. 
0 lines changed or deleted 65 lines changed or added


 frame_internal.h   frame_internal.h 
skipping to change at line 29 skipping to change at line 29
* *
************************************************************************** **/ ************************************************************************** **/
#ifndef UTOUCH_FRAME_UTOUCH_FRAME_INTERNAL_H_ #ifndef UTOUCH_FRAME_UTOUCH_FRAME_INTERNAL_H_
#define UTOUCH_FRAME_UTOUCH_FRAME_INTERNAL_H_ #define UTOUCH_FRAME_UTOUCH_FRAME_INTERNAL_H_
#ifdef HAS_C_GENERIC_SELECTIONS #ifdef HAS_C_GENERIC_SELECTIONS
#include <stdint.h> #include <stdint.h>
FRAME_PUBLIC
UFStatus frame_device_get_property_string_(UFDevice device, UFStatus frame_device_get_property_string_(UFDevice device,
UFDeviceProperty property, UFDeviceProperty property,
char **value); char **value);
FRAME_PUBLIC
UFStatus frame_device_get_property_int_(UFDevice device, UFStatus frame_device_get_property_int_(UFDevice device,
UFDeviceProperty property, int *val ue); UFDeviceProperty property, int *val ue);
FRAME_PUBLIC
UFStatus frame_device_get_property_unsigned_int_(UFDevice device, UFStatus frame_device_get_property_unsigned_int_(UFDevice device,
UFDeviceProperty property, UFDeviceProperty property,
unsigned int *value); unsigned int *value);
#define frame_device_get_property(device, property, value) \ #define frame_device_get_property(device, property, value) \
_Generic((value), \ _Generic((value), \
char **: frame_device_get_property_string_, \ char **: frame_device_get_property_string_, \
int *: frame_device_get_property_int_, \ int *: frame_device_get_property_int_, \
unsigned int *: frame_device_get_property_unsigned_int_) ((dev ice), \ unsigned int *: frame_device_get_property_unsigned_int_) ((dev ice), \
(pro perty), \ (pro perty), \
(val ue)) (val ue))
FRAME_PUBLIC
UFStatus frame_event_get_property_type_(UFEvent event, UFEventProperty prop erty, UFStatus frame_event_get_property_type_(UFEvent event, UFEventProperty prop erty,
UFEventType *value); UFEventType *value);
FRAME_PUBLIC
UFStatus frame_event_get_property_device_(UFEvent event, UFStatus frame_event_get_property_device_(UFEvent event,
UFEventProperty property, UFEventProperty property,
UFDevice *value); UFDevice *value);
FRAME_PUBLIC
UFStatus frame_event_get_property_frame_(UFEvent event, UFStatus frame_event_get_property_frame_(UFEvent event,
UFEventProperty property, UFEventProperty property,
UFFrame *value); UFFrame *value);
FRAME_PUBLIC
UFStatus frame_event_get_property_uint64_(UFEvent event, UFStatus frame_event_get_property_uint64_(UFEvent event,
UFEventProperty property, UFEventProperty property,
uint64_t *value); uint64_t *value);
#define frame_event_get_property(event, property, value) \ #define frame_event_get_property(event, property, value) \
_Generic((value), \ _Generic((value), \
UFEventType *: frame_event_get_property_type_, \ UFEventType *: frame_event_get_property_type_, \
UFDevice *: frame_event_get_property_device_, \ UFDevice *: frame_event_get_property_device_, \
UFFrame *: frame_event_get_property_frame_, \ UFFrame *: frame_event_get_property_frame_, \
uint64_t *: frame_event_get_property_uint64_) ((event), \ uint64_t *: frame_event_get_property_uint64_) ((event), \
(property), (va lue)) (property), (va lue))
FRAME_PUBLIC
UFStatus frame_frame_get_property_device_(UFFrame frame, UFStatus frame_frame_get_property_device_(UFFrame frame,
UFFrameProperty property, UFFrameProperty property,
UFDevice *value); UFDevice *value);
FRAME_PUBLIC
UFStatus frame_frame_get_property_uint64_(UFFrame frame, UFStatus frame_frame_get_property_uint64_(UFFrame frame,
UFFrameProperty property, UFFrameProperty property,
uint64_t *value); uint64_t *value);
FRAME_PUBLIC
UFStatus frame_frame_get_property_unsigned_int_(UFFrame frame, UFStatus frame_frame_get_property_unsigned_int_(UFFrame frame,
UFFrameProperty property, UFFrameProperty property,
unsigned int *value); unsigned int *value);
#define frame_frame_get_property(frame, property, value) \ #define frame_frame_get_property(frame, property, value) \
_Generic((value), \ _Generic((value), \
UFDevice *: frame_frame_get_property_device_, \ UFDevice *: frame_frame_get_property_device_, \
uint64_t *: frame_frame_get_property_window_id_, \ uint64_t *: frame_frame_get_property_window_id_, \
unsigned int *: frame_frame_get_property_unsigned_int_) ( \ unsigned int *: frame_frame_get_property_unsigned_int_) ( \
(frame), \ (frame), \
(property), \ (property), \
(value)) (value))
FRAME_PUBLIC
UFStatus frame_touch_get_property_uint64_(UFTouch touch, UFStatus frame_touch_get_property_uint64_(UFTouch touch,
UFTouchProperty property, UFTouchProperty property,
uint64_t *value); uint64_t *value);
FRAME_PUBLIC
UFStatus frame_touch_get_property_state_(UFTouch touch, UFStatus frame_touch_get_property_state_(UFTouch touch,
UFTouchProperty property, UFTouchProperty property,
UFTouchState *value); UFTouchState *value);
FRAME_PUBLIC
UFStatus frame_touch_get_property_float_(UFTouch touch, UFStatus frame_touch_get_property_float_(UFTouch touch,
UFTouchProperty property, UFTouchProperty property,
float *value); float *value);
FRAME_PUBLIC
UFStatus frame_touch_get_property_int_(UFTouch touch, UFTouchProperty prope rty, UFStatus frame_touch_get_property_int_(UFTouch touch, UFTouchProperty prope rty,
int *value); int *value);
#define frame_touch_get_property(touch, property, value) \ #define frame_touch_get_property(touch, property, value) \
_Generic((value), \ _Generic((value), \
uint64_t *: frame_touch_get_property_uint64_, \ uint64_t *: frame_touch_get_property_uint64_, \
UFTouchState *: frame_touch_get_property_state_, \ UFTouchState *: frame_touch_get_property_state_, \
float *: frame_touch_get_property_float_, \ float *: frame_touch_get_property_float_, \
int *: frame_touch_get_property_int_) ((touch), (property), \ int *: frame_touch_get_property_int_) ((touch), (property), \
(value)) (value))
 End of changes. 14 change blocks. 
0 lines changed or deleted 14 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/