Пример #1
0
nyx_error_t nyx_display_get_metrics(nyx_device_handle_t handle, nyx_display_metrics_t* out_metrics)
{
	nyx_device_t* d = (nyx_device_t*)handle;
	CHECK_DEVICE(d);
	CHECK_DEVICE_TYPE(d, NYX_DEVICE_DISPLAY);
	nyx_display_device_t* dev = (nyx_display_device_t*)d;
	*out_metrics = dev->display_metrics;
	return NYX_ERROR_NONE;
}
Пример #2
0
nyx_error_t nyx_haptics_get_dampening_factor(nyx_device_handle_t handle,
        int32_t *dampening_factor_out_ptr)
{
	nyx_device_t *d = (nyx_device_t *)handle;
	CHECK_DEVICE(d);
	CHECK_DEVICE_TYPE(d, NYX_DEVICE_HAPTICS);
	nyx_haptics_device_t *a = (nyx_haptics_device_t *)d;
	*dampening_factor_out_ptr = a->dampening_factor;
	return NYX_ERROR_NONE;
}
Пример #3
0
nyx_error_t nyx_haptics_get_effect_id(nyx_device_handle_t handle,
                                      int32_t *haptics_id_out_ptr)
{
	nyx_device_t *d = (nyx_device_t *)handle;
	CHECK_DEVICE(d);
	CHECK_DEVICE_TYPE(d, NYX_DEVICE_HAPTICS);
	nyx_haptics_device_t *a = (nyx_haptics_device_t *)d;
	*haptics_id_out_ptr = a->haptic_effect_id;
	return NYX_ERROR_NONE;

}
Пример #4
0
nyx_error_t nyx_haptics_cancel_all(nyx_device_handle_t handle)
{
	nyx_device_t *d = (nyx_device_t *)handle;
	CHECK_DEVICE(d);
	CHECK_DEVICE_TYPE(d, NYX_DEVICE_HAPTICS);
	nyx_haptics_cancel_all_function_t f_ptr = LOOKUP_METHOD(d,
	        NYX_HAPTICS_CANCEL_ALL_MODULE_METHOD);

	if (f_ptr)
	{
		return f_ptr(d);
	}
	else
	{
		return NYX_ERROR_NOT_IMPLEMENTED;
	}
}