summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJinkun Jang <jinkun.jang@samsung.com>2013-03-13 01:38:14 +0900
committerJinkun Jang <jinkun.jang@samsung.com>2013-03-13 01:38:14 +0900
commit969f37c04504a239fbf276b77de7fca382dac8ed (patch)
tree13cadb204f1bfaa573f00432e9c13b06d38d309f /include
parentceed46babf13948ca94e19d0047c991fc861a549 (diff)
downloadsat-ui-969f37c04504a239fbf276b77de7fca382dac8ed.tar.gz
sat-ui-969f37c04504a239fbf276b77de7fca382dac8ed.tar.bz2
sat-ui-969f37c04504a239fbf276b77de7fca382dac8ed.zip
Tizen 2.1 base
Diffstat (limited to 'include')
-rw-r--r--include/common_string.h32
-rw-r--r--include/display-text-view.h33
-rw-r--r--include/get-inkey-view.h23
-rw-r--r--include/get-input-view.h24
-rw-r--r--include/sat-ui-debug.h104
-rw-r--r--include/sat-ui-icon.h36
-rwxr-xr-xinclude/sat-ui.h141
-rw-r--r--include/select-item-view.h25
-rw-r--r--include/setup-menu-view.h26
-rw-r--r--include/tel-request.h29
-rw-r--r--include/winset.h28
11 files changed, 501 insertions, 0 deletions
diff --git a/include/common_string.h b/include/common_string.h
new file mode 100644
index 0000000..0d6a030
--- /dev/null
+++ b/include/common_string.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Flora License, Version 1.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://floralicense.org/license/
+ *
+ * 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.
+ */
+
+#define SAT_STR_CALL_UNAVAILABLE _("IDS_SIM_POP_CALL_UNAVAILABLE")
+#define SAT_STR_CONFIRM_CALL _("IDS_SIM_POP_CONFIRM_CALL")
+#define SAT_STR_LAUNCH_BROWSER_Q _("IDS_SIM_POP_LAUNCH_BROWSERQ")
+#define SAT_STR_PLAYING_TONE _("IDS_SIM_POP_PLAYTONE")
+#define SAT_STR_SIM_REFRESHING _("IDS_SIM_POP_REFRESHING")
+#define SAT_STR_PLEASE_WAIT _("IDS_SIM_POP_INTERMEDIATE")
+#define SAT_STR_TAP_TO_ENTER _("IDS_SIM_BODY_TAP_TO_ENTER_ABB")
+
+#define SAT_STR_OK dgettext("sys_string", "IDS_COM_SK_OK")
+#define SAT_STR_CANCEL dgettext("sys_string", "IDS_IDLE_BUTTON_CANCEL")
+#define SAT_STR_YES dgettext("sys_string", "IDS_COM_SK_YES")
+#define SAT_STR_NO dgettext("sys_string", "IDS_COM_SK_NO")
+#define SAT_STR_NEW dgettext("sys_string", "IDS_COM_SK_NEW")
+#define SAT_STR_SENDING dgettext("sys_string", "IDS_COM_POP_SENDING")
+
+
diff --git a/include/display-text-view.h b/include/display-text-view.h
new file mode 100644
index 0000000..0cfb298
--- /dev/null
+++ b/include/display-text-view.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Flora License, Version 1.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://floralicense.org/license/
+ *
+ * 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 __DISPLAY_TEXT_VIEW_H_
+#define __DISPLAY_TEXT_VIEW_H_
+
+#include <Elementary.h>
+
+enum {
+ RESP_OK_CANCEL = 0,
+ RESP_CANCEL = 1,
+ RESP_IMMEDIATELY = 2,
+ RESP_NONE = 3,
+};
+
+int draw_popup_text(Evas_Object* win, char *text, int user_resp_required, int duration, Evas_Smart_Cb ok_cb, Evas_Smart_Cb cancel_cb, Evas_Smart_Cb timeout_cb,void *data);
+int draw_popup_text_with_icon(Evas_Object* win, char *text,Evas_Object *icon, int user_resp_required, int duration, Evas_Smart_Cb ok_cb, Evas_Smart_Cb cancel_cb, Evas_Smart_Cb timeout_cb, void *data);
+
+#endif
+
diff --git a/include/get-inkey-view.h b/include/get-inkey-view.h
new file mode 100644
index 0000000..f8aa3cf
--- /dev/null
+++ b/include/get-inkey-view.h
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Flora License, Version 1.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://floralicense.org/license/
+ *
+ * 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 __GET_INKEY_VIEW_H_
+#define __GET_INKEY_VIEW_H_
+
+int draw_content_get_inkey(Evas_Object* content, void *tapi_data, void *data);
+
+#endif
+
diff --git a/include/get-input-view.h b/include/get-input-view.h
new file mode 100644
index 0000000..cb9e444
--- /dev/null
+++ b/include/get-input-view.h
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Flora License, Version 1.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://floralicense.org/license/
+ *
+ * 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 __GET_INPUT_VIEW_H_
+#define __GET_INPUT_VIEW_H_
+#include <Elementary.h>
+
+int draw_content_get_input(Evas_Object* content, void *tapi_data, void *data);
+
+#endif
+
diff --git a/include/sat-ui-debug.h b/include/sat-ui-debug.h
new file mode 100644
index 0000000..db90c65
--- /dev/null
+++ b/include/sat-ui-debug.h
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Flora License, Version 1.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://floralicense.org/license/
+ *
+ * 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 __SATUI_DEBUG_H__
+#define __SATUI_DEBUG_H__
+
+/*
+ * SYSLOG_INFO(), SYSLOG_ERR(), SYSLOG_DBG() are syslog() wrappers.
+ * PRT_INFO(), PRT_ERR(), PRT_DBG() are fprintf() wrappers.
+ *
+ * If SLP_DEBUG is not defined, SYSLOG_DBG() and PRT_DBG() is ignored.
+ *
+ * IF SLP_SYSLOG_OUT or SLP_DAEMON is defined,
+ * INFO(), ERR(), DBG() are SYSLOG_XXX()
+ * Otherwise,
+ * They are PRT_XXX()
+ *
+ *
+ * warn_if(exrp, fmt, ...)
+ * If expr is true, The fmt string is printed using ERR().
+ *
+ * ret_if(), retv_if(), retm_if(), retvm_if()
+ * If expr is true, current function return.
+ * Postfix 'v' means that it has a return value and 'm' means that it has output message.
+ *
+ */
+
+#define SAT_UI_LOG_TAG "SAT_UI"
+#include <dlog.h>
+#include <stdio.h>
+
+#if 0
+#define DBG(fmt, arg...) \
+ do { \
+ LOGD(""fmt"\n", ##arg); \
+ } while(0)
+#endif
+
+
+#define DBG(fmt, arg...) \
+ do { \
+ LOG(LOG_INFO, SAT_UI_LOG_TAG, "[SAT_UI][%s:%d] "fmt"\n", __func__, __LINE__, ##arg); \
+ } while(0)
+/*
+#define DBG(fmt, arg...) \
+ do { \
+ FILE *fp; \
+ fp = fopen("/opt/media/sat_log.txt","a"); \
+ fprintf(fp,"[SAT-UI][%s:%d]"fmt"\n",__func__,__LINE__, ##arg); \
+ fclose(fp); \
+ } while(0)
+*/
+
+#define ERR(fmt, arg...) \
+ do { \
+ LOGE(""fmt"\n", ##arg); \
+ } while(0)
+
+# define warn_if(expr, fmt, arg...) do { \
+ if(expr) { \
+ DBG("(%s) -> "fmt, #expr, ##arg); \
+ } \
+ } while (0)
+# define ret_if(expr) do { \
+ if(expr) { \
+ DBG("(%s) -> %s() return", #expr, __FUNCTION__); \
+ return; \
+ } \
+ } while (0)
+# define retv_if(expr, val) do { \
+ if(expr) { \
+ DBG("(%s) -> %s() return", #expr, __FUNCTION__); \
+ return (val); \
+ } \
+ } while (0)
+# define retm_if(expr, fmt, arg...) do { \
+ if(expr) { \
+ ERR(fmt, ##arg); \
+ DBG("(%s) -> %s() return", #expr, __FUNCTION__); \
+ return; \
+ } \
+ } while (0)
+# define retvm_if(expr, val, fmt, arg...) do { \
+ if(expr) { \
+ ERR(fmt, ##arg); \
+ DBG("(%s) -> %s() return", #expr, __FUNCTION__); \
+ return (val); \
+ } \
+ } while (0)
+
+#endif /* __SATUI_DEBUG_H__ */
diff --git a/include/sat-ui-icon.h b/include/sat-ui-icon.h
new file mode 100644
index 0000000..dfb90fd
--- /dev/null
+++ b/include/sat-ui-icon.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Flora License, Version 1.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://floralicense.org/license/
+ *
+ * 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 __SAT_UI_ICON_H__
+#define __SAT_UI_ICON_H__
+
+#include <TelSat.h>
+#include <Evas.h>
+
+#define EIGTH_BIT 0x80
+#define SEVENTH_BIT 0x40
+#define SIXTH_BIT 0x20
+#define FIFTH_BIT 0x10
+#define FOURTH_BIT 0x08
+#define THIRD_BIT 0x04
+#define SECOND_BIT 0x02
+#define FIRST_BIT 0x01
+#define MAX_STRING_SIZE 256
+
+Evas_Object *convert_iconinfo_to_evas_object(void *data,TelSatIconInfo_t* icon_id);
+
+#endif
+
diff --git a/include/sat-ui.h b/include/sat-ui.h
new file mode 100755
index 0000000..9233829
--- /dev/null
+++ b/include/sat-ui.h
@@ -0,0 +1,141 @@
+/*
+ * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Flora License, Version 1.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://floralicense.org/license/
+ *
+ * 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 __SAT_UI_H_
+#define __SAT_UI_H_
+#include <stdbool.h>
+#include <Elementary.h>
+#include <Ecore_IMF.h>
+#include <glib.h>
+#include <tapi_common.h>
+#include <ITapiSat.h>
+#include <TapiUtility.h>
+
+#ifndef PREFIX
+#define PREFIX "/usr/apps/org.tizen.sat-ui"
+#endif
+
+
+#ifdef _
+#undef _
+#endif
+
+#ifdef N_
+#undef N_
+#endif
+
+#define PKGNAME "sat-ui"
+#define SAT_UI_PKG "org.tizen.sat-ui"
+
+#define _(string) gettext(string)
+#define dgettext_noop(s) (s)
+#define N_(s) dgettext_noop(s)
+#define _EDJ(o) elm_layout_edje_get(o)
+#define PACKAGE PKGNAME
+#define LOCALEDIR PREFIX"/res/locale"
+
+#define ICON_PATH PREFIX"/res/images"
+#define EDJ_PATH PREFIX"/res/edje"
+#define EDJ_NAME EDJ_PATH"/sat-ui.edj"
+
+#define NORMAL_LAYOUT "normal_layout"
+
+#define TONE_FILE_PATH PREFIX"/res/media"
+#define STK_BEEP_TONE TONE_FILE_PATH"/stk_tone_beep.wav"
+#define STK_BUSY_TONE TONE_FILE_PATH"/stk_tone_call_busy.wav"
+#define STK_DROPPED_TONE TONE_FILE_PATH"/stk_tone_call_dropped.wav"
+#define STK_WAITING_TONE TONE_FILE_PATH"/stk_tone_call_waiting.wav"
+#define STK_CONGESTION_TONE TONE_FILE_PATH"/stk_tone_congestion.wav"
+#define STK_DIAL_TONE TONE_FILE_PATH"/stk_tone_dial.wav"
+#define STK_ERROR_TONE TONE_FILE_PATH"/stk_tone_error.wav"
+#define STK_NEG_ACK_TONE TONE_FILE_PATH"/stk_tone_negative_ack.wav"
+#define STK_POS_ACK_TONE TONE_FILE_PATH"/stk_tone_positve_ack.wav"
+#define STK_RADIO_ACK_TONE TONE_FILE_PATH"/stk_tone_radio_ack.wav"
+#define STK_RINGING_TONE TONE_FILE_PATH"/stk_tone_ringing.wav"
+
+#define HELP_ICON_FILE ICON_PATH"/67_SAT_button_icon_question.png"
+
+#define SAT_UI_MAIN_W 720
+#define SAT_UI_MAIN_H 1280
+
+#define GET_INPUT_DURATION 30.0
+#define GET_INKEY_DURATION 30.0
+#define SELECT_MENU_DURATION 30.0
+
+#define LAUNCHED_BY_MENU 0
+#define LAUNCHED_BY_TELEPHONY 1
+
+#define MAX_TEXT_LENGTH 255
+#define MAX_LOCAL_BUF_SIZE 10
+
+typedef struct {
+ Evas *evas;
+
+ Evas_Object *win_main;
+ Elm_Object_Item *navi_it;
+ Evas_Object *nf;
+ Evas_Object *layout_main;
+ Evas_Object *content;
+ Evas_Object *r_button;
+ Evas_Object *back_btn;
+ Evas_Object *help_btn;
+ Evas_Object *waiting_bar;
+ Evas_Object *popup;
+ Evas_Object *entry;
+ Eina_Bool repeat_sound;
+ char tone_file[100];
+ Ecore_Timer *timer;
+ Ecore_IMF_Context *imf_context;
+ int exec_type;
+
+ /*Handle*/
+ int sound_handle;
+ TapiHandle *tapi_handle;
+
+ /* Event Data */
+ void *tapi_data;
+ int cmd_type;
+ int cmd_id;
+ int is_immediately_resp;
+
+ /* GET INPUT */
+ unsigned int min;
+
+ /* Genlist item class*/
+ Elm_Genlist_Item_Class *itc_text_icon;
+ Elm_Genlist_Item_Class *itc_no_edit_text;
+ Elm_Genlist_Item_Class *itc_editfield_icon;
+ Elm_Genlist_Item_Class *itc_ok_icon;
+ Elm_Genlist_Item_Class *itc_help_icon;
+ Elm_Genlist_Item_Class *itc_2icon;
+} SatUiAppData_t;
+
+typedef struct _menu_item
+{
+ int index;
+ char *text;
+ Evas_Object *icon;
+ Eina_Bool icon_is_present;
+ Eina_Bool help_is_present;
+ SatUiAppData_t *ad;
+ struct _menu_item *next;
+} menu_item;
+
+Evas_Object* load_edj(Evas_Object *parent, const char *file, const char *group);
+char *strip_control_char(const char *src_str);
+void create_popup_progressbar(SatUiAppData_t *ad);
+
+#endif /* __SAT_UI_H_ */
diff --git a/include/select-item-view.h b/include/select-item-view.h
new file mode 100644
index 0000000..0799b17
--- /dev/null
+++ b/include/select-item-view.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Flora License, Version 1.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://floralicense.org/license/
+ *
+ * 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 __SELECT_ITEM_VIEW_H_
+#define __SELECT_ITEM_VIEW_H_
+
+#include <Elementary.h>
+int draw_content_select_item(Evas_Object *content, void *tapi_data, void *data);
+
+
+#endif
+
diff --git a/include/setup-menu-view.h b/include/setup-menu-view.h
new file mode 100644
index 0000000..a7b2c22
--- /dev/null
+++ b/include/setup-menu-view.h
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Flora License, Version 1.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://floralicense.org/license/
+ *
+ * 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 __SETUP_MENU_VIEW_H_
+#define __SETUP_MENU_VIEW_H_
+
+#include <Elementary.h>
+
+int draw_content_setup_menu(Evas_Object* content, void *tapi_data, void *data);
+
+
+#endif
+
diff --git a/include/tel-request.h b/include/tel-request.h
new file mode 100644
index 0000000..d34e046
--- /dev/null
+++ b/include/tel-request.h
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Flora License, Version 1.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://floralicense.org/license/
+ *
+ * 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 _SAT_UI_TEL_REQUEST_H_
+#define _SAT_UI_TEL_REQUEST_H_
+#include "sat-ui.h"
+
+int setup_tapi_init(void *data);
+int send_ui_user_confirm(int cmd_id, int cmd_type, int key_type, int data_len, void *data, void *app_data);
+int send_app_execution_result(TelSatAppsRetInfo_t *app_ret_info, void *data);
+int send_ui_display_status(int cmd_id, TelSatUiDisplayStatusType_t ui_display_status_info, void *data);
+int satui_send_menu_selection_env(TapiHandle *handle, TelSatMenuSelectionReqInfo_t *menu_selection_req_info);
+int send_menu_selection_info(TapiHandle *handle, char item_id, int bIsRequestingHelpText);
+
+#endif
+
diff --git a/include/winset.h b/include/winset.h
new file mode 100644
index 0000000..0bb26ab
--- /dev/null
+++ b/include/winset.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Flora License, Version 1.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://floralicense.org/license/
+ *
+ * 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 _SAT_UI_WINSET_H_
+#define _SAT_UI_WINSET_H_
+#include <Elementary.h>
+
+Evas_Object *create_waiting_notify(Evas_Object *parent);
+void _satui_geinlist_item_class_new(void *data);
+void _satui_geinlist_item_class_free(void *data);
+int _satui_create_notification(const char *string);
+int _satui_delete_notification(void);
+
+#endif
+