summaryrefslogtreecommitdiff
path: root/lib-phone/ph-dialer/inc/PhDialerKey.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib-phone/ph-dialer/inc/PhDialerKey.h')
-rw-r--r--lib-phone/ph-dialer/inc/PhDialerKey.h68
1 files changed, 68 insertions, 0 deletions
diff --git a/lib-phone/ph-dialer/inc/PhDialerKey.h b/lib-phone/ph-dialer/inc/PhDialerKey.h
new file mode 100644
index 0000000..b085ffb
--- /dev/null
+++ b/lib-phone/ph-dialer/inc/PhDialerKey.h
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef _PH_DIALER_KEY_H_
+#define _PH_DIALER_KEY_H_
+
+#include "WButton.h"
+
+class PhDialerKey : public WButton
+{
+public:
+ enum Id
+ {
+ ID_1,
+ ID_2,
+ ID_3,
+ ID_4,
+ ID_5,
+ ID_6,
+ ID_7,
+ ID_8,
+ ID_9,
+ ID_STAR,
+ ID_0,
+ ID_SHARP,
+ };
+
+ /**
+ * @brief Create dialer key.
+ * @param id Key ID
+ */
+ PhDialerKey(Id id);
+
+ /**
+ * @return Key character value.
+ */
+ char getValue() const;
+
+ /**
+ * @return Key ID.
+ */
+ Id getId() const;
+
+private:
+ virtual Evas_Object *onCreate(Evas_Object *parent, void *param);
+ static void onMouseDown(void *data, Evas *e, Evas_Object *obj, void *event_info);
+ static void onMouseUp(void *data, Evas *e, Evas_Object *obj, void *event_info);
+
+ Id m_Id;
+ char m_Value;
+ int m_Tone;
+};
+
+#endif /* _PH_DIALER_KEY_H_ */