2 // Open Service Platform
3 // Copyright (c) 2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FUiTouchEffect.h
20 * @brief This is the header file for the %TouchEffect class.
22 * This header file contains the declarations of the %TouchEffect class.
25 #ifndef _FUI_TOUCH_EFFECT_H_
26 #define _FUI_TOUCH_EFFECT_H_
28 #include <FBaseObject.h>
29 #include <FBaseDataType.h>
30 #include <FUiTouchEffectTypes.h>
32 namespace Tizen { namespace Ui
35 class _TouchEffectImpl;
39 * @brief This class is used for TouchEffect feature.
43 * The %TouchEffect class is used for accessing device's %TouchEffect feature.
44 * This class also provides features to play effects for input events
45 * such as touch the screen or the keypad.
47 * The following example demonstrates how to use the %TouchEffect class.
50 * #include <unique_ptr.h>
54 * using namespace Tizen::Base;
55 * using namespace Tizen::Ui;
57 * void TouchEffectExample::TouchEffectPlay(void)
59 * unique_ptr<TouchEffect> pTouchEffect(new (std::nothrow) TouchEffect());
61 * result r = pTouchEffect->Construct();
67 * r = pTouchEffect->Play(TOUCH_EFFECT_TAP);
73 * r = pTouchEffect->Play(TOUCH_EFFECT_SIP);
79 * r = pTouchEffect->Play(TOUCH_EFFECT_NO_SOUND);
90 class _OSP_EXPORT_ TouchEffect
91 : public Tizen::Base::Object
96 * The object is not fully constructed after this constructor is called. For full construction, @n
97 * the Construct() method must be called right after calling this constructor.
104 * This destructor overrides Tizen::Base::Object::~Object().
108 virtual ~TouchEffect(void);
111 * Initializes this instance of %TouchEffect. @n
112 * Every application must call %Construct() before calling any other method of %TouchEffect.
114 * @return An error code
115 * @exception E_SUCCESS The method is successful.
116 * @exception E_OPERATION_FAILED The operation has failed.
118 result Construct(void);
121 * Plays a predefined effect.
125 * @return An error code
126 * @param[in] type The type of touch for which effect is to be played e.g. SIP, TAP
127 * @exception E_SUCCESS The method is successful.
128 * @exception E_SYSTEM A system error has occurred.
129 * @exception E_INVALID_ARG The specified @c type is invalid.
131 result Play(TouchEffectType type);
135 * The implementation of this copy constructor is intentionally blank and declared as private @n
136 * to prohibit copying of objects.
140 TouchEffect(const TouchEffect& value);
143 * The implementation of this copy assignment operator is intentionally blank and declared as private @n
144 * to prohibit copying of objects.
148 TouchEffect& operator =(const TouchEffect& value);
151 _TouchEffectImpl* __pTouchEffectImpl;
152 friend class _TouchEffectImpl;
158 #endif // _FUI_TOUCH_EFFECT_H_