Jin Yoon <jinny.yoon at samsung dot com>
+Junkyu Han <junkyu.han at samsung dot com>
Youngjoo Park <yjoo93.part at samsung dot com>
SET(LIBDIR "${PREFIX}/lib")
SET(DATADIR "/opt${PREFIX}/data")
SET(RESDIR "${PREFIX}/res")
+SET(ICONDIR "/usr/share/icons/default/small")
SET(IMAGEDIR "${RESDIR}/images")
SET(EDJEDIR "${RESDIR}/edje")
SET(LOCALEDIR "${RESDIR}/locale")
SET(VERSION 0.1.0)
+#IF("${ARCH}" STREQUAL "arm")
+# OPTION(USE_ARM "Use Arm" ON)
+# ADD_DEFINITIONS("-DARM_TYPE")
+#ELSE()
+# OPTION(USE_EMULATOR "Use Emulator" ON)
+# ADD_DEFINITIONS("-DEMULATOR_TYPE")
+#ENDIF()
+#MESSAGE("ARCH: ${ARCH}")
+
INCLUDE(FindPkgConfig)
pkg_check_modules(MENU_PKGS REQUIRED
ail
+ appcore-efl
appsvc
aul
badge
eina
elementary
evas
- heynoti
pkgmgr
pkgmgr-info
shortcut
- sysman
syspopup-caller
utilX
)
+IF(USE_ARM)
+pkg_check_modules(ARM_PKGS REQUIRED
+ bincfg
+ factory
+)
+ENDIF()
+
ADD_DEFINITIONS("-DENABLE_BGIMAGE")
ADD_DEFINITIONS("-DLOG_TAG=\"MENU_SCREEN\"")
ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
ENDFOREACH(flag)
+FOREACH(flag ${ARM_PKGS_CFLAGS})
+ SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fdata-sections -ffunction-sections -Wl,--gc-sections")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
src/all_apps/shortcut.c
)
-TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} -lm)
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${ARM_PKGS_LDFLAGS})
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${MENU_PKGS_LDFLAGS})
-# Install
+# Install
INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${EXEC_PREFIX})
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.Flora DESTINATION /usr/share/license RENAME ${PACKAGE_NAME})
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${PACKAGE_NAME}.rule DESTINATION /opt/etc/smack/accesses.d)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${PACKAGE_NAME}.efl DESTINATION /etc/smack/accesses.d)
ADD_SUBDIRECTORY(data)
+++ /dev/null
-Flora License
-
-Version 1.1, April, 2013
-
-http://floralicense.org/license/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
-"License" shall mean the terms and conditions for use, reproduction,
-and distribution as defined by Sections 1 through 9 of this document.
-
-"Licensor" shall mean the copyright owner or entity authorized by
-the copyright owner that is granting the License.
-
-"Legal Entity" shall mean the union of the acting entity and
-all other entities that control, are controlled by, or are
-under common control with that entity. For the purposes of
-this definition, "control" means (i) the power, direct or indirect,
-to cause the direction or management of such entity,
-whether by contract or otherwise, or (ii) ownership of fifty percent (50%)
-or more of the outstanding shares, or (iii) beneficial ownership of
-such entity.
-
-"You" (or "Your") shall mean an individual or Legal Entity
-exercising permissions granted by this License.
-
-"Source" form shall mean the preferred form for making modifications,
-including but not limited to software source code, documentation source,
-and configuration files.
-
-"Object" form shall mean any form resulting from mechanical
-transformation or translation of a Source form, including but
-not limited to compiled object code, generated documentation,
-and conversions to other media types.
-
-"Work" shall mean the work of authorship, whether in Source or Object form,
-made available under the License, as indicated by a copyright notice
-that is included in or attached to the work (an example is provided
-in the Appendix below).
-
-"Derivative Works" shall mean any work, whether in Source or Object form,
-that is based on (or derived from) the Work and for which the editorial
-revisions, annotations, elaborations, or other modifications represent,
-as a whole, an original work of authorship. For the purposes of this License,
-Derivative Works shall not include works that remain separable from,
-or merely link (or bind by name) to the interfaces of, the Work and
-Derivative Works thereof.
-
-"Contribution" shall mean any work of authorship, including the original
-version of the Work and any modifications or additions to that Work or
-Derivative Works thereof, that is intentionally submitted to Licensor
-for inclusion in the Work by the copyright owner or by an individual or
-Legal Entity authorized to submit on behalf of the copyright owner.
-For the purposes of this definition, "submitted" means any form of
-electronic, verbal, or written communication sent to the Licensor or
-its representatives, including but not limited to communication on
-electronic mailing lists, source code control systems, and issue
-tracking systems that are managed by, or on behalf of, the Licensor
-for the purpose of discussing and improving the Work, but excluding
-communication that is conspicuously marked or otherwise designated
-in writing by the copyright owner as "Not a Contribution."
-
-"Contributor" shall mean Licensor and any individual or Legal Entity
-on behalf of whom a Contribution has been received by Licensor and
-subsequently incorporated within the Work.
-
-"Tizen Certified Platform" shall mean a software platform that complies
-with the standards set forth in the Tizen Compliance Specification
-and passes the Tizen Compliance Tests as defined from time to time
-by the Tizen Technical Steering Group and certified by the Tizen
-Association or its designated agent.
-
-2. Grant of Copyright License. Subject to the terms and conditions of
-this License, each Contributor hereby grants to You a perpetual,
-worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-copyright license to reproduce, prepare Derivative Works of,
-publicly display, publicly perform, sublicense, and distribute the
-Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of
-this License, each Contributor hereby grants to You a perpetual,
-worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-(except as stated in this section) patent license to make, have made,
-use, offer to sell, sell, import, and otherwise transfer the Work
-solely as incorporated into a Tizen Certified Platform, where such
-license applies only to those patent claims licensable by such
-Contributor that are necessarily infringed by their Contribution(s)
-alone or by combination of their Contribution(s) with the Work solely
-as incorporated into a Tizen Certified Platform to which such
-Contribution(s) was submitted. If You institute patent litigation
-against any entity (including a cross-claim or counterclaim
-in a lawsuit) alleging that the Work or a Contribution incorporated
-within the Work constitutes direct or contributory patent infringement,
-then any patent licenses granted to You under this License for that
-Work shall terminate as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the
-Work or Derivative Works thereof pursuant to the copyright license
-above, in any medium, with or without modifications, and in Source or
-Object form, provided that You meet the following conditions:
-
- 1. You must give any other recipients of the Work or Derivative Works
- a copy of this License; and
- 2. You must cause any modified files to carry prominent notices stating
- that You changed the files; and
- 3. You must retain, in the Source form of any Derivative Works that
- You distribute, all copyright, patent, trademark, and attribution
- notices from the Source form of the Work, excluding those notices
- that do not pertain to any part of the Derivative Works; and
- 4. If the Work includes a "NOTICE" text file as part of its distribution,
- then any Derivative Works that You distribute must include a readable
- copy of the attribution notices contained within such NOTICE file,
- excluding those notices that do not pertain to any part of
- the Derivative Works, in at least one of the following places:
- within a NOTICE text file distributed as part of the Derivative Works;
- within the Source form or documentation, if provided along with the
- Derivative Works; or, within a display generated by the Derivative Works,
- if and wherever such third-party notices normally appear.
- The contents of the NOTICE file are for informational purposes only
- and do not modify the License. You may add Your own attribution notices
- within Derivative Works that You distribute, alongside or as an addendum
- to the NOTICE text from the Work, provided that such additional attribution
- notices cannot be construed as modifying the License. You may add Your own
- copyright statement to Your modifications and may provide additional or
- different license terms and conditions for use, reproduction, or
- distribution of Your modifications, or for any such Derivative Works
- as a whole, provided Your use, reproduction, and distribution of
- the Work otherwise complies with the conditions stated in this License
- and your own copyright statement or terms and conditions do not conflict
- the conditions stated in the License including section 3.
-
-5. Submission of Contributions. Unless You explicitly state otherwise,
-any Contribution intentionally submitted for inclusion in the Work
-by You to the Licensor shall be under the terms and conditions of
-this License, without any additional terms or conditions.
-Notwithstanding the above, nothing herein shall supersede or modify
-the terms of any separate license agreement you may have executed
-with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade
-names, trademarks, service marks, or product names of the Licensor,
-except as required for reasonable and customary use in describing the
-origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or
-agreed to in writing, Licensor provides the Work (and each
-Contributor provides its Contributions) on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-implied, including, without limitation, any warranties or conditions
-of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-PARTICULAR PURPOSE. You are solely responsible for determining the
-appropriateness of using or redistributing the Work and assume any
-risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory,
-whether in tort (including negligence), contract, or otherwise,
-unless required by applicable law (such as deliberate and grossly
-negligent acts) or agreed to in writing, shall any Contributor be
-liable to You for damages, including any direct, indirect, special,
-incidental, or consequential damages of any character arising as a
-result of this License or out of the use or inability to use the
-Work (including but not limited to damages for loss of goodwill,
-work stoppage, computer failure or malfunction, or any and all
-other commercial damages or losses), even if such Contributor
-has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing
-the Work or Derivative Works thereof, You may choose to offer,
-and charge a fee for, acceptance of support, warranty, indemnity,
-or other liability obligations and/or rights consistent with this
-License. However, in accepting such obligations, You may act only
-on Your own behalf and on Your sole responsibility, not on behalf
-of any other Contributor, and only if You agree to indemnify,
-defend, and hold each Contributor harmless for any liability
-incurred by, or claims asserted against, such Contributor by reason
-of your accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS
-
-APPENDIX: How to apply the Flora License to your work
-
-To apply the Flora License to your work, attach the following
-boilerplate notice, with the fields enclosed by brackets "[]"
-replaced with your own identifying information. (Don't include
-the brackets!) The text should be enclosed in the appropriate
-comment syntax for the file format. We also recommend that a
-file or class name and description of purpose be included on the
-same "printed page" as the copyright notice for easier
-identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Flora License, Version 1.1 (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.
-
+++ /dev/null
-Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
-Except as noted, this software is licensed under the Flora License, Version 1.1.
-Please, see the LICENCE.Flora file for the Flora License, Version 1.1 terms and conditions.
CONFIGURE_FILE(${PACKAGE_NAME}.xml.in ${CMAKE_BINARY_DIR}/${PACKAGE_NAME}.xml)
INSTALL(FILES ${CMAKE_BINARY_DIR}/${PACKAGE_NAME}.xml DESTINATION ${MANIFESTDIR})
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/main_operation.launch DESTINATION ${RESDIR}/data)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/icons/${PACKAGE_NAME}.png DESTINATION /usr/share/icons/default/small)
+
ADD_SUBDIRECTORY(edje)
ADD_SUBDIRECTORY(images)
ADD_SUBDIRECTORY(po)
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+ * 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.
+ *
+ */
+#include "conf.edc"
+
+#define _BASE_HEIGHT 1280
collections {
+ base_scale: 1.8;
group {
name: "all_apps";
parts {
part {
name: "bg";
- type: RECT;
+ type: SWALLOW;
scale: 1;
mouse_events: 1;
description {
visible: 0;
}
}
-
+ part {
+ name: "indicator_spacer";
+ type: SPACER;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ rel1 { relative: 0.0 0.0; to, "bg"; }
+ rel2 { relative: 1.0 INDICATOR_HEIGHT_PROP; to, "bg"; }
+ }
+ }
part {
name: "index_bg";
type: RECT;
mouse_events: 0;
description {
state: "default" 0.0;
- rel1 { relative: 0.0 20/1210; to, "bg";} // 1280 - 70(indicator)
- rel2 { relative: 1.0 124/1210; to, "bg";} // 174 - 70
- color: 0 0 0 255;
+ rel1 { relative: 0.0 80/_BASE_HEIGHT; to, "bg";} // 1280 - 70(indicator)
+ rel2 { relative: 1.0 184/_BASE_HEIGHT; to, "bg";} // 174 - 70
visible: 0;
}
}
mouse_events: 1;
description {
state: "default" 0.0;
- rel1 { relative: 0.0 134/1210; to, "bg"; } // 154 - 70
- rel2 { relative: 1.0 1164/1210; to, "bg"; }
+ rel1 { relative: 0.0 194/_BASE_HEIGHT; to, "bg"; } // 154 - 70
+ rel2 { relative: 1.0 1224/_BASE_HEIGHT; to, "bg"; }
color: 34 34 34 255;
visible: 0;
}
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+ * 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.
+ *
+ */
#define BUTTON_EDIT_BG_SIZE 98 56
+#define BUTTON_EDIT_BG_SIZE_MIN 45 30
#define BUTTON_EDIT_IMAGE_SIZE 35 35
+#define BUTTON_EDIT_IMAGE_SIZE_MIN 17 17
+#define BUTTON_EDIT_W 128
+#define BUTTON_EDIT_H 80
collections {
+ base_scale: 1.8;
group {
name: "button_edit";
parts {
mouse_events: 1;
description {
state: "default" 0.0;
- rel1 { relative: 0.5 0.5; to, "edit_button"; }
- rel2 { relative: 0.5 0.5; to, "edit_button"; }
- min: BUTTON_EDIT_BG_SIZE;
- max: BUTTON_EDIT_BG_SIZE;
+ rel1 { relative: 15/BUTTON_EDIT_W 12/BUTTON_EDIT_H; to, "edit_button"; }
+ rel2 { relative: 113/BUTTON_EDIT_W 68/BUTTON_EDIT_H; to, "edit_button"; }
+ min: BUTTON_EDIT_BG_SIZE_MIN;
fixed: 1 1;
image {
normal: "../images/btn_edit_nor.9.png";
- border: 30 30 0 0;
+ border: 15 15 0 0;
middle: DEFAULT;
border_scale: 1;
}
description {
state: "default" 0.0;
align: 0.5 0.5;
- rel1 { relative: 0.5 0.5; to, "edit_button_bg";}
- rel2 { relative: 0.5 0.5; to, "edit_button_bg";}
+ rel1 { relative: 46/BUTTON_EDIT_W 22/BUTTON_EDIT_H; to, "edit_button_bg";}
+ rel2 { relative: 81/BUTTON_EDIT_W 57/BUTTON_EDIT_H; to, "edit_button_bg";}
image {
normal: "../images/icon_btn_edit_nor.png";
}
- min: BUTTON_EDIT_IMAGE_SIZE;
- max: BUTTON_EDIT_IMAGE_SIZE;
+ min: BUTTON_EDIT_IMAGE_SIZE_MIN;
fixed: 1 1;
visible: 1;
}
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+ * 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.
+ *
+ */
#define MENU(part_name, p_relx, p_rely, relx, rely, n_relx, n_rely) \
part { \
#define ITEM_15_Y ITEM_12_Y
collections {
+ base_scale: 1.8;
group {
name: "menu_bg";
parts {
/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+
+ * 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.
+ *
+ */
#define INDEX_PAGECONTROL_IND_INC 35 35
#define INDEX_PAGECONTROL_IND_MIN_INC 35 35
#define INDEX_PAGECONTROL_FONT_SIZE_INC 18
collections {
+ base_scale: 1.8;
group {
name: "elm/index/base/vertical/menuscreen/index";
alias: "elm/index/base/horizontal/menuscreen/index";
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+ * 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.
+ *
+ */
#include "conf.edc"
-
+#define _ITEM_HEIGHT 180.0
+#define _ITEM_WIDTH 198.0
styles {
style {
collections {
+ base_scale: 1.8;
group {
name: "icon";
mouse_events: 1;
description {
state: "default" 0.0;
- rel1 { relative: 0.5 60/ITEM_HEIGHT; to: "bg"; }
- rel2 { relative: 0.5 60/ITEM_HEIGHT; to: "bg"; }
+ rel1 { relative: 31/_ITEM_WIDTH 0.0; to: "bg"; }
+ rel2 { relative: 148/_ITEM_WIDTH 117/_ITEM_HEIGHT; to: "bg"; }
align: 0.5 0.5;
- min: 117 117;
+ //min: 117 117;
fixed: 1 1;
}
}
description {
state: "default" 0.0;
visible: 0;
- rel1 { relative: 110/ITEM_WIDTH 0.0; to, "bg"; }
- rel2 { relative: 170/ITEM_WIDTH 60/ITEM_HEIGHT; to, "bg"; }
+ rel1 { relative: 110/_ITEM_WIDTH 0.0; to, "bg"; }
+ rel2 { relative: 170/_ITEM_WIDTH 60/_ITEM_HEIGHT; to, "bg"; }
image {
normal: "../images/menu_badge_01.png";
}
mouse_events: 1;
description {
state: "default" 0.0;
- rel1 { relative: 40/ITEM_WIDTH 30/ITEM_HEIGHT; to, "bg"; }
- rel2 { relative: 40/ITEM_WIDTH 30/ITEM_HEIGHT; to, "bg"; }
+ rel1 { relative: 13/_ITEM_WIDTH 3/_ITEM_HEIGHT; to, "bg"; }
+ rel2 { relative: 67/_ITEM_WIDTH 57/_ITEM_HEIGHT; to, "bg"; }
image {
normal: "../images/RM06_App tray_Btn_Uninstall.png";
}
- min: 54 54;
+ //min: 54 54;
fixed: 1 1;
visible: 0;
}
text {
text_class: "tizen";
font: "TIZEN:style=medium";
- size: 16;
+ size: 24;
align: 0.5 0.1;
}
+ visible: 1;
}
description
{
source: "icon_image_event";
action: SIGNAL_EMIT "item,up" "menu";
}
+ program {
+ name: "text,on";
+ signal: "text,on";
+ source: "menu";
+ action: STATE_SET "default" 0.0;
+ target: "txt";
+ }
+ program {
+ name: "text,off";
+ signal: "text,off";
+ source: "menu";
+ action: STATE_SET "hide" 0.0;
+ target: "txt";
+ }
+
// Badge
program {
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+
+ * 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.
+ *
+ */
+
+styles {
+ style {
+ name: "factory_text_style_big";
+ base: "font=TIZEN:style=MEDIUM font_size=28 align=left valign=top color=#FFFFFF style=soft_shadow shadow_color=#00000060 ellipsis=1";
+
+ tag: "b" "+ font_weight=Bold";
+ tag: "u" "+ underline=on underline_color=#FFFFFF";
+ }
+ style {
+ name: "factory_text_style_small";
+ base: "font=TIZEN:style=MEDIUM font_size=10 align=left valign=top color=#FFFFFF style=soft_shadow shadow_color=#00000060 ellipsis=1";
+
+ tag: "b" "+ font_weight=Bold";
+ tag: "u" "+ underline=on underline_color=#FFFFFF";
+ }
+ style {
+ name: "factory_text_style_middle";
+ base: "font=TIZEN:style=MEDIUM font_size=17 align=left valign=top color=#FFFFFF style=soft_shadow shadow_color=#00000060 ellipsis=1";
+
+ tag: "b" "+ font_weight=Bold";
+ tag: "u" "+ underline=on underline_color=#FFFFFF";
+ }
+}
collections {
+ base_scale: 1.8;
group {
name: "layout";
parts {
part {
name: "bg";
- type: RECT;
+ type: SWALLOW;
scale: 1;
mouse_events: 1;
description {
state: "default" 0.0;
rel1 { relative: 0.0 0.0; }
rel2 { relative: 1.0 1.0; }
- color: 0 0 0 0;
visible: 0;
}
}
visible: 1;
}
}
+
+ part {
+ name: "factory_bg";
+ type: RECT;
+ scale: 1;
+ mouse_events: 1;
+ repeat_events: 1;
+ description {
+ state: "default" 0.0;
+ rel1 { relative: 0.05 0.0;
+ to_x: "bg";
+ to_y: "factory_text";
+ offset: 0 -15;
+ }
+ rel2 { relative: 0.95 1.0;
+ to_x: "bg";
+ to_y: "factory_text";
+ offset: 0 15;
+ }
+ color: 0 0 0 125;
+ visible: 0;
+ }
+ description {
+ state: "show" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description {
+ state: "show_small" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description {
+ state: "show_middle" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+ part {
+ name: "factory_text";
+ type: TEXTBLOCK;
+ scale: 1;
+ mouse_events: 1;
+ repeat_events: 1;
+ description {
+ state: "default" 0.0;
+ rel1 { relative: 0.1 0.9; to, "bg"; }
+ rel2 { relative: 0.1 0.9; to, "bg"; }
+ text {
+ style: "factory_text_style_big";
+ align: 0.0 0.5;
+ min: 1 1;
+ }
+ align: 0.0 1.0;
+ visible: 0;
+ }
+ description {
+ state: "show_big" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description {
+ state: "show_small" 0.0;
+ inherit: "default" 0.0;
+ text {
+ style: "factory_text_style_small";
+ }
+ visible: 1;
+ }
+ description {
+ state: "show_middle" 0.0;
+ inherit: "default" 0.0;
+ text {
+ style: "factory_text_style_middle";
+ }
+ visible: 1;
+ }
+ }
part {
name: "content,blocker";
type: RECT;
action: STATE_SET "default" 0.0;
target: "content,blocker";
}
+ program {
+ name: "factory_text,hide";
+ signal: "hide";
+ source: "factory_text";
+ action: STATE_SET "default" 0.0;
+ target: "factory_bg";
+ target: "factory_text";
+ }
+ program {
+ name: "factory_text,show";
+ signal: "show";
+ source: "factory_text";
+ action: STATE_SET "show" 0.0;
+ target: "factory_bg";
+ target: "factory_text";
+ }
+ program {
+ name: "factory_text,show_small";
+ signal: "show_small";
+ source: "factory_text";
+ action: STATE_SET "show_small" 0.0;
+ target: "factory_bg";
+ target: "factory_text";
+ }
+ program {
+ name: "factory_text,show_middle";
+ signal: "show_middle";
+ source: "factory_text";
+ action: STATE_SET "show_middle" 0.0;
+ target: "factory_bg";
+ target: "factory_text";
+ }
}
} // group
} // collections
--- /dev/null
+org.tizen.phone
+org.tizen.contacts
+++ /dev/null
-Name=Simple Menu Screen
-Type=Application
-Exec=@EXEC_PREFIX@/@PROJECT_NAME@
-Icon=@PACKAGE_NAME@.png
-NoDisplay=True
-X-Tizen-TaskManage=False
-X-Tizen-Removable=False
<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" package="@PACKAGE_NAME@" version="1.2.7" install-location="internal-only">
+<manifest xmlns="http://tizen.org/ns/packages" package="@PACKAGE_NAME@" version="1.2.5" install-location="internal-only">
<label>Simple Menu-screen</label>
<author email="jinny.yoon@samsung.com" href="www.samsung.com">Jin Yoon</author>
+ <author email="junkyu.han@samsung.com" href="www.samsung.com">Junkyu Han</author>
<author email="yjoo93.park@samsung.com" href="www.samsung.com">Youngjoo Park</author>
<description>Simple Menu-screen Application</description>
<ui-application appid="@PACKAGE_NAME@" exec="@EXEC_PREFIX@/@PROJECT_NAME@" nodisplay="true" multiple="false" type="capp" taskmanage="false">
<label>Simple Menu-screen</label>
<category name="http://tizen.org/category/homeapp"/>
+ <icon>/usr/share/icons/default/small/org.tizen.menu-screen.png</icon>
</ui-application>
</manifest>
ca.po
cs.po
da.po
- de_DE.po
+ de.po
el_GR.po
en.po
en_PH.po
en_US.po
es_ES.po
- es_MX.po
+ es_US.po
et.po
eu.po
- fa.po
fi.po
fr_CA.po
- fr_FR.po
+ fr.po
ga.po
gl.po
hi.po
lv.po
mk.po
nb.po
- nl_NL.po
+ nl.po
pl.po
pt_BR.po
pt_PT.po
sl.po
sr.po
sv.po
- th.po
tr_TR.po
uk.po
- ur.po
uz.po
zh_CN.po
zh_HK.po
- zh_SG.po
zh_TW.po
+ zh_SG.po
)
SET(MSGFMT "/usr/bin/msgfmt")
msgstr "هل تريد إلغاء تثبيت %s؟"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "إلغاء التثبيت"
\ No newline at end of file
+msgstr "إلغاء التثبيت"
+
msgstr "%s silinsin?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Quraşdırılma ləğv edilsin"
\ No newline at end of file
+msgstr "Quraşdırılma ləğv edilsin"
+
msgstr "Деинсталиране на %s?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Деинсталиране"
\ No newline at end of file
+msgstr "Деинсталиране"
+
msgid "IDS_HS_BUTTON_DONE"
-msgstr "Realit"
+msgstr "Fet"
msgid "IDS_AT_POP_UNINSTALL_PS_Q"
msgstr "Desinstal·lar %s?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Desinstal·lar"
\ No newline at end of file
+msgstr "Desinstal·lar"
+
msgstr "Odinstalovat %s?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Odinstalovat"
\ No newline at end of file
+msgstr "Odinstalovat"
+
msgstr "Afinstallér %s?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Afinstallér"
\ No newline at end of file
+msgstr "Afinstallér"
+
--- /dev/null
+msgid "IDS_HS_BUTTON_DONE"
+msgstr "Fertig"
+
+msgid "IDS_AT_POP_UNINSTALL_PS_Q"
+msgstr "%s deinstallieren?"
+
+msgid "IDS_AT_BODY_UNINSTALL"
+msgstr "Deinstallieren"
+
msgstr "Κατάργηση της εγκατάστασης του %s;"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Κατάργηση εγκατάστασης"
\ No newline at end of file
+msgstr "Κατάργηση εγκατάστασης"
+
msgstr "Uninstall %s?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Uninstall"
\ No newline at end of file
+msgstr "Uninstall"
+
msgstr "Uninstall %s?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Uninstall"
\ No newline at end of file
+msgstr "Uninstall"
+
msgstr "Uninstall %s?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Uninstall"
\ No newline at end of file
+msgstr "Uninstall"
+
msgid "IDS_HS_BUTTON_DONE"
-msgstr "Finalizado"
+msgstr "Hecho"
msgid "IDS_AT_POP_UNINSTALL_PS_Q"
msgstr "¿Desinstalar %s?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Desinstalar"
\ No newline at end of file
+msgstr "Desinstalar"
+
--- /dev/null
+msgid "IDS_HS_BUTTON_DONE"
+msgstr "Aceptar"
+
+msgid "IDS_AT_POP_UNINSTALL_PS_Q"
+msgstr "¿Desinstalar %s?"
+
+msgid "IDS_AT_BODY_UNINSTALL"
+msgstr "Desinstalar"
+
msgstr "Kas desinstallida %s?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Deinstalli"
\ No newline at end of file
+msgstr "Deinstalli"
+
msgstr "Desinstalatu %s?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Desinstalatu"
\ No newline at end of file
+msgstr "Desinstalatu"
+
msgstr "Poistetaanko kohteen %s asennus?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Poista asennus"
\ No newline at end of file
+msgstr "Poista asennus"
+
--- /dev/null
+msgid "IDS_HS_BUTTON_DONE"
+msgstr "OK"
+
+msgid "IDS_AT_POP_UNINSTALL_PS_Q"
+msgstr "Désinstaller %s ?"
+
+msgid "IDS_AT_BODY_UNINSTALL"
+msgstr "Désinstaller"
+
msgstr "Désinstaller %s ?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Désinstaller"
\ No newline at end of file
+msgstr "Désinstaller"
+
msgstr "Díshuiteáil %s?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Díshuiteáil"
\ No newline at end of file
+msgstr "Díshuiteáil"
+
msgstr "Desexas desinstalar %s?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Desinstalar"
\ No newline at end of file
+msgstr "Desinstalar"
+
msgid "IDS_HS_BUTTON_DONE"
-msgstr "पà¥\82रा हà¥\81à¤\86"
+msgstr "पà¥\82रà¥\8dण"
msgid "IDS_AT_POP_UNINSTALL_PS_Q"
msgstr "%s की स्थापना रद्द करें?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "à¤\85सà¥\8dथापित करें"
\ No newline at end of file
+msgstr "सà¥\8dथापना रदà¥\8dद करें"
+
msgid "IDS_HS_BUTTON_DONE"
-msgstr "Kraj"
+msgstr "OK"
msgid "IDS_AT_POP_UNINSTALL_PS_Q"
msgstr "Deinstalirati %s?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Deinstaliraj"
\ No newline at end of file
+msgstr "Deinstaliraj"
+
msgstr "Eltávolítja a(z) %s animált emotikont?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Eltávolítás"
\ No newline at end of file
+msgstr "Eltávolítás"
+
msgstr "Ապատեղադրե՞լ %s-ը:"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Ապատեղադրել"
\ No newline at end of file
+msgstr "Ապատեղադրել"
+
msgstr "Fjarlægja %s?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Fjarlægja"
\ No newline at end of file
+msgstr "Fjarlægja"
+
msgstr "Disinstallare %s?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Disinstalla"
\ No newline at end of file
+msgstr "Disinstalla"
+
msgstr "%sをアンインストールしますか?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "アンインストール"
\ No newline at end of file
+msgstr "アンインストール"
+
msgstr "ამოინსტალირდეს %s?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "ინსტალაციის გაუქმება"
\ No newline at end of file
+msgstr "ინსტალაციის გაუქმება"
+
msgstr "%s жою керек пе?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Жою"
\ No newline at end of file
+msgstr "Жою"
+
msgstr "%s을(를) 삭제할까요?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "삭제"
\ No newline at end of file
+msgstr "삭제"
+
msgstr "Pašalinti „%s“?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Pašalinti"
\ No newline at end of file
+msgstr "Pašalinti"
+
msgstr "Vai atinstalēt %s?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Atinstalēt"
\ No newline at end of file
+msgstr "Atinstalēt"
+
msgstr "Да се деинсталира %s?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Деинсталирај"
\ No newline at end of file
+msgstr "Деинсталирај"
+
--- /dev/null
+msgid "IDS_HS_BUTTON_DONE"
+msgstr "Gereed"
+
+msgid "IDS_AT_POP_UNINSTALL_PS_Q"
+msgstr "%s verwijderen?"
+
+msgid "IDS_AT_BODY_UNINSTALL"
+msgstr "Verwijderen"
+
msgstr "Odinstalować %s?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Odinstaluj"
\ No newline at end of file
+msgstr "Odinstaluj"
+
msgid "IDS_HS_BUTTON_DONE"
-msgstr "Concluído"
+msgstr "OK"
msgid "IDS_AT_POP_UNINSTALL_PS_Q"
msgstr "Desinstalar %s?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Desinstalar"
\ No newline at end of file
+msgstr "Desinstalar"
+
msgstr "Desinstalar %s?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Desinstalar"
\ No newline at end of file
+msgstr "Desinstalar"
+
msgstr "Dezinstalaţi %s?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Dezinstalare"
\ No newline at end of file
+msgstr "Dezinstalare"
+
msgstr "Удалить %s?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Удалить"
\ No newline at end of file
+msgstr "Удалить"
+
msgstr "Odinštalovať program %s?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Odinštalovať"
\ No newline at end of file
+msgstr "Odinštalovať"
+
msgstr "Želite odstraniti %s?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Odstrani"
\ No newline at end of file
+msgstr "Odstrani"
+
msgstr "Deinstalirati %s?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Deinstaliraj"
\ No newline at end of file
+msgstr "Deinstaliraj"
+
msgstr "Avinstallera %s?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Avinstallera"
\ No newline at end of file
+msgstr "Avinstallera"
+
msgstr "%s kaldırılsın mı?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Kaldır"
\ No newline at end of file
+msgstr "Kaldır"
+
msgstr "Видалити %s?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Видалити"
\ No newline at end of file
+msgstr "Видалити"
+
msgid "IDS_HS_BUTTON_DONE"
-msgstr "Qilindi"
+msgstr "OK"
msgid "IDS_AT_POP_UNINSTALL_PS_Q"
msgstr "%s olib tashlansinmi?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "Olib tashlash"
\ No newline at end of file
+msgstr "Olib tashlash"
+
msgstr "是否卸载 %s?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "卸载"
\ No newline at end of file
+msgstr "卸载"
+
msgstr "解除安裝 %s 嗎?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "解除安裝"
\ No newline at end of file
+msgstr "解除安裝"
+
msgid "IDS_HS_BUTTON_DONE"
-msgstr "完成"
+msgstr "確定"
msgid "IDS_AT_POP_UNINSTALL_PS_Q"
msgstr "解除安裝 %s 嗎?"
msgid "IDS_AT_BODY_UNINSTALL"
-msgstr "解除安裝"
\ No newline at end of file
+msgstr "解除安裝"
+
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 __MENU_SCREEN_ALL_APPS_DB_H__
#define __MENU_SCREEN_ALL_APPS_DB_H__
typedef struct _db_info {
long long rowid;
int type;
-
char *appid;
char *name;
char *content_info;
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 _MENU_SCREEN_CONTROLBAR_ALL_APPS_H_
#define _MENU_SCREEN_CONTROLBAR_ALL_APPS_H_
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+ * 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 __MENU_SCREEN_LIST_ALL_APPS_H__
#define __MENU_SCREEN_LIST_ALL_APPS_H__
extern app_list *all_apps_list_create(void);
+extern int all_apps_list_find_installed_time(const char *id);
extern void all_apps_list_destroy(app_list *list);
#endif //__MENU_SCREEN_LIST_ALL_APPS_H__
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 _MENU_SCREEN_ALL_APPS_SHORTCUT_H_
#define _MENU_SCREEN_ALL_APPS_SHORTCUT_H_
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 _MENU_SCREEN_CONF_H_
#define _MENU_SCREEN_CONF_H_
-#define MAX_PAGE_NO 9
+#define MAX_PAGE_NO 10
#define BASE_HEIGHT 1280.0f
#define BASE_WIDTH 720.0f
+#define INDICATOR_PORT_HEIGHT 70
+#define INDICATOR_HEIGHT_PROP (INDICATOR_PORT_HEIGHT/BASE_HEIGHT)
+
#define PAGE_PORTRAIT_HEIGHT 1030.0f
#define INDEX_HEIGHT 70
-#define ITEM_WIDTH 180.0
+#define ITEM_WIDTH 180.0 //180.0
+#define LITE_ITEM_WIDTH 90.0
#define ITEM_WIDTH_PROP (ITEM_WIDTH/BASE_WIDTH)
-#define ITEM_HEIGHT 198.0
+#define ITEM_HEIGHT 198.0 //198.0
+#define LITE_ITEM_HEIGHT 99.0
#define ITEM_HEIGHT_PROP (ITEM_HEIGHT/BASE_HEIGHT)
#endif // _MENU_SCREEN_CONF_H_
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 __MENU_SCREEN_DB_H__
#define __MENU_SCREEN_DB_H__
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 __MENU_SCREEN_PAGE_CONTROL_H__
#define __MENU_SCREEN_PAGE_CONTROL_H__
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 __MENU_SCREEN_ITEM_H__
#define __MENU_SCREEN_ITEM_H__
extern char *item_get_name(Evas_Object *item);
extern void item_set_name(Evas_Object *item, char *name, int sync);
+extern void item_set_pkgid(Evas_Object *edje, char *package, int sync);
+extern char *item_get_pkgid(Evas_Object *edje);
+
extern char *item_get_package(Evas_Object *item);
extern void item_set_package(Evas_Object *item, char *package, int sync);
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 __MENU_SCREEN_BADGE_H__
#define __MENU_SCREEN_BADGE_H__
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+ * 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 __MENU_SCREEN_ITEM_EVENT_H__
#define __MENU_SCREEN_ITEM_EVENT_H__
/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 __MENU_SCREEN_INPUT_KEY_H__
#define __MENU_SCREEN_INPUT_KEY_H__
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 __MENU_SCREEN_LAYOUT_H__
#define __MENU_SCREEN_LAYOUT_H__
extern Evas_Object* layout_load_edj(Evas_Object *parent, const char *edjname, const char *grpname);
extern void layout_unload_edj(Evas_Object *layout);
+HAPI void layout_create_package(Evas_Object *layout, const char *package);
+HAPI void layout_update_package(Evas_Object *layout, const char *package);
+HAPI void layout_delete_package(Evas_Object *layout, const char *package);
+
#endif //__MENU_SCREEN_LAYOUT_H__
// End of a file
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+ * 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 __MENU_SCREEN_LIST_H__
#define __MENU_SCREEN_LIST_H__
typedef struct
{
- char *package;
+ char *pkgid;
+ char *package; /* appid */
char *exec;
char *name;
char *icon;
char *package;
pid_t pid;
time_t launch_time;
- long long installed_time;
+ int installed_time;
void *data;
} app_list_item;
extern menu_screen_error_e list_append_item(app_list *list, app_list_item *item);
extern menu_screen_error_e list_remove_item(app_list *list, app_list_item *item);
extern menu_screen_error_e list_sort(app_list *list, int (*_sort_cb)(const void *d1, const void *d2));
+extern app_list_item *list_nth(app_list *parent, unsigned int nth);
#endif //__MENU_SCREEN_LIST_H__
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 __MENU_SCREEN_MAPBUF_H__
#define __MENU_SCREEN_MAPBUF_H__
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+ * 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 __MENU_SCREEN_H__
#define __MENU_SCREEN_H__
extern int menu_screen_get_state(void);
extern int menu_screen_is_tts(void);
+extern void menu_screen_inc_booting_state(void);
+extern void menu_screen_dec_booting_state(void);
+extern int menu_screen_get_booting_state(void);
+
#endif //__MENU_SCREEN_H__
// End of a file
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 __MENU_SCREEN_EVENT_H__
#define __MENU_SCREEN_EVENT_H__
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 __MENU_SCREEN_PAGE_H__
#define __MENU_SCREEN_PAGE_H__
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 __MENU_SCREEN_PAGE_SCROLLER_H__
#define __MENU_SCREEN_PAGE_SCROLLER_H__
extern int page_scroller_get_page_no(Evas_Object* scroller, Evas_Object *page);
extern Evas_Object *page_scroller_push_item(Evas_Object *scroller, app_info_t *ai);
+extern Evas_Object *page_scroller_push_item_by_order(Evas_Object *scroller, app_info_t *ai);
extern int page_scroller_get_current_page_no(Evas_Object *scroller);
extern Evas_Object *page_scroller_find_item_by_package(Evas_Object *scroller, const char *package, int *page_no);
extern void page_scroller_trim_items(Evas_Object *scroller);
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 __MENU_SCREEN_PKGMGR_H__
#define __MENU_SCREEN_PKGMGR_H__
-#include <Evas.h>
-
-#include "list.h"
-#include "util.h"
-
-
-
-enum package_install_status {
- UNKNOWN = 0x00,
- DOWNLOAD_BEGIN,
- DOWNLOADING,
- DOWNLOAD_END,
- INSTALL_BEGIN,
- INSTALLING,
- INSTALL_END,
- UNINSTALL_BEGIN,
- UNINSTALLING,
- UNINSTALL_END,
- UPDATE_BEGIN,
- UPDATING,
- UPDATE_END,
- MAX_STATUS,
-};
-
+HAPI menu_screen_error_e pkgmgr_item_list_append_item(const char *pkg_id, const char *app_id, Evas_Object *item);
+HAPI menu_screen_error_e pkgmgr_item_list_remove_item(const char *pkg_id, const char *app_id, Evas_Object *item);
-struct package_info {
- enum package_install_status status;
- app_info_t ai;
- Evas_Object *item;
- Evas_Object *page;
- Eina_Bool desktop_file_found;
- int error_count;
-};
+HAPI void pkgmgr_item_list_affect_pkgid(const char *pkg_id, Eina_Bool (*_affected_cb)(const char *, Evas_Object *, void *), void *data);
+HAPI void pkgmgr_item_list_affect_appid(const char *app_id, Eina_Bool (*_affected_cb)(const char *, Evas_Object *, void *), void *data);
+HAPI inline menu_screen_error_e pkgmgr_uninstall(Evas_Object *item);
+HAPI menu_screen_error_e pkgmgr_reserve_list_push_request(const char *package, const char *key, const char *val);
+HAPI menu_screen_error_e pkgmgr_reserve_list_pop_request(void);
-extern menu_screen_error_e pkgmgr_init(Evas_Object *scroller);
-extern void pkgmgr_fini(void);
-extern Evas_Object *pkgmgr_find_pended_object(const char *package, int with_desktop_file, Evas_Object *scroller, Evas_Object **page);
-extern menu_screen_error_e pkgmgr_uninstall(Evas_Object *obj);
+HAPI menu_screen_error_e pkgmgr_init(void);
+HAPI void pkgmgr_fini(void);
#endif //__MENU_SCREEN_PKGMGR_H__
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+ * 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 __MENU_SCREEN_POPUP_H__
#define __MENU_SCREEN_POPUP_H__
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+
+ * 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 __MENU_SCREEN_UTIL_H__
#define __MENU_SCREEN_UTIL_H__
#define STR_ENV_MAPBUF "BEATUX_MAPBUF"
#define ALL_APPS_TABLE "all_apps"
+#define BOOTING_STATE_DONE 1
+
+/* Data key */
+#define DATA_KEY_MAIN_OPERATION_LIST "ma_op_li"
/* Accessibility */
#define ACCESS_BUTTON "button"
--- /dev/null
+org.tizen.menu-screen app-svc rwx--- ------
+org.tizen.menu-screen pkgmgr::db rw---l ------
+org.tizen.menu-screen ail::db rw---- ------
+org.tizen.menu-screen system::use_internet r----- ------
+org.tizen.menu-screen device::app_logging -w---- ------
+org.tizen.menu-screen net-config r-x--- ------
+org.tizen.menu-screen xorg rwx--- ------
+org.tizen.menu-screen isf rwx--- ------
+org.tizen.menu-screen dbus rwx--- ------
+org.tizen.menu-screen ug-image-viewer-efl r-x--- ------
+org.tizen.menu-screen cbhm r-x--- ------
+org.tizen.menu-screen sound_server rwx--- ------
+org.tizen.menu-screen svi-data r-x--- ------
+org.tizen.menu-screen data-provider-master rwx--- ------
+org.tizen.menu-screen org.tizen.indicator rwx--- ------
+org.tizen.menu-screen org.tizen.setting r-x--- ------
+org.tizen.menu-screen sqlfs r-x--- ------
+org.tizen.menu-screen e17 rwx--- ------
+org.tizen.menu-screen dlogutil r-x--- ------
+org.tizen.menu-screen immvibed rwx--- ------
+org.tizen.menu-screen rua::db rw---- ------
+org.tizen.menu-screen org.tizen.clock -w---- ------
+org.tizen.menu-screen badge::db rw---- ------
+org.tizen.menu-screen aul rwx--- ------
+org.tizen.menu-screen system-server r-x--- ------
+org.tizen.menu-screen deviced r-x--- ------
+org.tizen.menu-screen sensor-framework r-x--- ------
+org.tizen.menu-screen secure-storage r-x--- ------
+org.tizen.menu-screen pkgmgr-client r-x--- ------
+org.tizen.menu-screen syslogd -w---- ------
+org.tizen.indicator org.tizen.menu-screen rwx--- ------
+org.tizen.browser org.tizen.menu-screen rw---- ------
+org.tizen.contact org.tizen.menu-screen rw---- ------
+org.tizen.youtube-shortcut org.tizen.menu-screen rw---- ------
+org.tizen.message org.tizen.menu-screen rw---- ------
+org.tizen.voicerecorder org.tizen.menu-screen rw---- ------
+org.tizen.calendar org.tizen.menu-screen rw---- ------
+org.tizen.episode org.tizen.menu-screen rw---- ------
+org.tizen.keepit org.tizen.menu-screen rw---- ------
+org.tizen.calculator org.tizen.menu-screen rw---- ------
+org.tizen.clock org.tizen.menu-screen rw---- ------
+org.tizen.camera-app org.tizen.menu-screen rw---- ------
+org.tizen.svoice org.tizen.menu-screen rw---- ------
+org.tizen.group-cast org.tizen.menu-screen rw---- ------
+org.tizen.phone org.tizen.menu-screen rw---- ------
+org.tizen.smartsearch org.tizen.menu-screen rw---- ------
+org.tizen.setting org.tizen.menu-screen rw---- ------
+org.tizen.myfile org.tizen.menu-screen rw---- ------
+org.tizen.rcs-im org.tizen.menu-screen rw---- ------
+org.tizen.smemo org.tizen.menu-screen rw---- ------
+org.tizen.facebook org.tizen.menu-screen rw---- ------
+org.tizen.gallery org.tizen.menu-screen rw---- ------
+org.tizen.email org.tizen.menu-screen rw---- ------
+org.tizen.music-player org.tizen.menu-screen rw---- ------
+org.tizen.nfc-app org.tizen.menu-screen rw---- ------
+org.tizen.video-player org.tizen.menu-screen rw---- ------
+org.tizen.contacts org.tizen.menu-screen rw---- ------
+dbus org.tizen.menu-screen rwx--- ------
+stest-service org.tizen.menu-screen r-x--- ------
+org.tizen.menu-screen stest-service -w---- ------
+org.tizen.menu-screen org.tizen.setting::default-resources r-x--- ------
+org.tizen.menu-screen pkgmgr::svc r-x--- ------
+org.tizen.menu-screen pkgmgr::info r----- ------
+org.tizen.menu-screen system::vconf_system rw---- ------
+org.tizen.menu-screen system::vconf_inhouse rw---- ------
+org.tizen.menu-screen aul::launch --x--- ------
+org.tizen.menu-screen data-provider-master::shortcut rw---- ------
+org.tizen.menu-screen data-provider-master::shortcut.shortcut -w---- ------
+org.tizen.menu-screen data-provider-master::notification rw---- ------
+org.tizen.menu-screen data-provider-master::notification.client -w---- ------
+org.tizen.menu-screen data-provider-master::badge rw---- ------
+org.tizen.menu-screen data-provider-master::badge.client -w---- ------
+org.tizen.menu-screen tts-server rwx--- ------
+org.tizen.menu-screen idlescreen::vconf rwx--- ------
+org.tizen.app-tray org.tizen.menu-screen r-x--- ------
+org.tizen.menu-screen factory-15 r-x--- ------
+org.tizen.menu-screen telephony_framework::api_manager r----- ------
+org.tizen.menu-screen telephony_framework::api_modem r-x--- ------
+org.tizen.menu-screen telephony_framework::api_network r-x--- ------
+org.tizen.menu-screen atd-server r----- ------
+org.tizen.menu-screen factory::vconf rw---- ------
+org.tizen.menu-screen dfms-kernel r----- ------
+org.tizen.menu-screen system::homedir rwxat- ------
+org.tizen.menu-screen system::vconf rwxat- ------
+org.tizen.menu-screen system::media rwxat- ------
+org.tizen.menu-screen system::share rwxat- ------
+org.tizen.menu-screen pulseaudio rwxat- ------
+e17 org.tizen.menu-screen -w---- ------
+org.tizen.menu-screen sys-assert::core rwxat- ------
+org.tizen.menu-screen privacy-manager::db r----l ------
+org.tizen.menu-screen system::vconf_setting rw---- ------
+org.tizen.menu-screen system::vconf_privacy rw---- ------
+org.tizen.menu-screen system::vconf_multimedia rw---- ------
+org.tizen.menu-screen system::vconf_network rw---- ------
+org.tizen.menu-screen system::vconf_misc rw---- ------
+org.tizen.menu-screen ecore::lock rwxat- ------
+org.tizen.menu-screen org.tizen.wallpaper-ui-service rwxat- ------
+org.tizen.menu-screen system::storage rwxat- ------
</request>
<assign>
<filesystem path="/usr/share/packages/org.tizen.menu-screen.xml" label="_" />
+ <filesystem path="/usr/share/icons/default/small/org.tizen.menu-screen.png" label="_" />
</assign>
-</manifest>
\ No newline at end of file
+</manifest>
+++ /dev/null
-org.tizen.menu-screen pkgmgr::db rw
-org.tizen.menu-screen ail::db rw
-org.tizen.menu-screen system::homedir rwxat
-org.tizen.menu-screen system::vconf rwxat
-org.tizen.menu-screen system::media rwxat
-org.tizen.menu-screen system::share rwxat
-org.tizen.menu-screen system::use_internet r
-org.tizen.menu-screen device::app_logging w
-org.tizen.menu-screen device::camera rwx
-org.tizen.menu-screen sys-assert::core rwxat
-org.tizen.menu-screen pulseaudio rwxat
-org.tizen.menu-screen net-config rx
-org.tizen.menu-screen xorg rwx
-org.tizen.menu-screen isf rwx
-org.tizen.menu-screen dbus rwx
-org.tizen.menu-screen ug-image-viewer-efl rx
-org.tizen.menu-screen cbhm rx
-org.tizen.menu-screen sound_server rwx
-org.tizen.menu-screen svi-data rx
-org.tizen.menu-screen data-provider-master rwx
-org.tizen.menu-screen org.tizen.indicator rwx
-org.tizen.menu-screen org.tizen.setting rx
-org.tizen.menu-screen sqlfs rx
-org.tizen.menu-screen e17 rwx
-org.tizen.menu-screen dlogutil rx
-org.tizen.menu-screen immvibed rwx
-org.tizen.menu-screen rua::db rw
-org.tizen.menu-screen org.tizen.clock w
-org.tizen.menu-screen badge::db rw
-org.tizen.menu-screen aul rwx
-org.tizen.menu-screen system-server rx
-org.tizen.menu-screen deviced rx
-org.tizen.menu-screen sensor-framework rx
-org.tizen.menu-screen secure-storage rx
-org.tizen.menu-screen pkgmgr-client rx
-org.tizen.menu-screen syslogd w
-org.tizen.menu-screen system::vconf_multimedia rw
-org.tizen.indicator org.tizen.menu-screen rwx
-org.tizen.browser org.tizen.menu-screen rw
-org.tizen.contact org.tizen.menu-screen rw
-org.tizen.youtube-shortcut org.tizen.menu-screen rw
-org.tizen.message org.tizen.menu-screen rw
-org.tizen.voicerecorder org.tizen.menu-screen rw
-org.tizen.calendar org.tizen.menu-screen rw
-org.tizen.episode org.tizen.menu-screen rw
-org.tizen.keepit org.tizen.menu-screen rw
-org.tizen.calculator org.tizen.menu-screen rw
-org.tizen.clock org.tizen.menu-screen rw
-org.tizen.camera-app org.tizen.menu-screen rw
-org.tizen.svoice org.tizen.menu-screen rw
-org.tizen.group-cast org.tizen.menu-screen rw
-org.tizen.phone org.tizen.menu-screen rw
-org.tizen.smartsearch org.tizen.menu-screen rw
-org.tizen.setting org.tizen.menu-screen rw
-org.tizen.myfile org.tizen.menu-screen rw
-org.tizen.rcs-im org.tizen.menu-screen rw
-org.tizen.smemo org.tizen.menu-screen rw
-org.tizen.facebook org.tizen.menu-screen rw
-org.tizen.dailybriefing-ynews org.tizen.menu-screen rw
-org.tizen.gallery org.tizen.menu-screen rw
-org.tizen.email org.tizen.menu-screen rw
-org.tizen.dailybriefing-yfinance org.tizen.menu-screen rw
-org.tizen.music-player org.tizen.menu-screen rw
-org.tizen.nfc-app org.tizen.menu-screen rw
-org.tizen.dailybriefing-accuweather org.tizen.menu-screen rw
-org.tizen.video-player org.tizen.menu-screen rw
-org.tizen.contacts org.tizen.menu-screen rw
-dbus org.tizen.menu-screen rwx
-e17 org.tizen.menu-screen rwx
-stest-service org.tizen.menu-screen rx
-org.tizen.menu-screen stest-service w
-org.tizen.menu-screen org.tizen.setting::default-resources rx
-org.tizen.menu-screen pkgmgr::svc rx
-org.tizen.menu-screen pkgmgr::info r
-org.tizen.menu-screen system::vconf_system rw
-org.tizen.menu-screen system::vconf_inhouse rw
-org.tizen.menu-screen aul::launch x
-org.tizen.menu-screen data-provider-master::shortcut rw
-org.tizen.menu-screen data-provider-master::shortcut.shortcut w
-org.tizen.menu-screen data-provider-master::notification rw
-org.tizen.menu-screen data-provider-master::notification.client w
-org.tizen.menu-screen data-provider-master::badge rw
-org.tizen.menu-screen data-provider-master::badge.client w
-org.tizen.menu-screen tts-server rwx
-org.tizen.menu-screen idlescreen::vconf rwx
-org.tizen.app-tray org.tizen.menu-screen rx
-org.tizen.menu-screen factory-15 rx
-org.tizen.menu-screen telephony_framework::api_manager r
-org.tizen.menu-screen telephony_framework::api_modem r
-org.tizen.menu-screen telephony_framework::api_network r
-org.tizen.menu-screen atd-server r
-org.tizen.menu-screen factory::vconf rw
-org.tizen.menu-screen mobileprint x
-org.tizen.menu-screen _ wx
Name: org.tizen.menu-screen
Summary: An utility library of the menu screen
-Version: 1.2.7
+Version: 1.2.5
Release: 1.1
Group: TO_BE/FILLED_IN
-License: Flora Software License
+License: Apache
Source0: %{name}-%{version}.tar.gz
BuildRequires: pkgconfig(ail)
BuildRequires: pkgconfig(appcore-efl)
BuildRequires: pkgconfig(eina)
BuildRequires: pkgconfig(elementary)
BuildRequires: pkgconfig(evas)
-BuildRequires: pkgconfig(heynoti)
BuildRequires: pkgconfig(pkgmgr)
BuildRequires: pkgconfig(pkgmgr-info)
BuildRequires: pkgconfig(shortcut)
-BuildRequires: pkgconfig(sysman)
BuildRequires: pkgconfig(syspopup-caller)
BuildRequires: pkgconfig(utilX)
BuildRequires: cmake
BuildRequires: edje-tools
BuildRequires: gettext-tools
-
+BuildRequires: hash-signer
+# %ifarch %{arm}
+# %define ARCH arm
+# BuildRequires: pkgconfig(bincfg)
+# BuildRequires: pkgconfig(factory)
+# %else
+# %define ARCH emulator
+# %endif
%description
An utility library for developers of the menu screen.
%setup -q
%build
-cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
-CFLAGS="${CFLAGS} -Wall" LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--as-needed"
+CFLAGS+=" -fPIC -fPIE ";export CFLAGS
+CXXFLAGS+=" -fPIC -fPIE -fvisibility=hidden -fvisibility-inlines-hidden ";export CXXFLAGS
+LDFLAGS+=" -Wl,--hash-style=both -Wl,--as-needed -pie ";export LDFLAGS
+
+%if 0%{?sec_build_binary_debug_enable}
+export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
+export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
+export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
+%endif
+
+%if 0%{?tizen_build_binary_release_type_eng}
+export CFLAGS="${CFLAGS} -DTIZEN_ENGINEER_MODE"
+export CXXFLAGS="${CXXFLAGS} -DTIZEN_ENGINEER_MODE"
+export FFLAGS="${FFLAGS} -DTIZEN_ENGINEER_MODE"
+%endif
+
+cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DARCH=%{ARCH}
make %{?jobs:-j%jobs}
%install
%make_install
+%define tizen_sign 1
+%define tizen_sign_base %{_packagedir}
+%define tizen_sign_level platform
+%define tizen_author_sign 1
+%define tizen_dist_sign 1
+
mkdir -p %{buildroot}%{_datadir}
mkdir -p %{buildroot}/usr/share/license
%post
-INHOUSE_ID="5000"
+/usr/bin/signing-client/hash-signer-client.sh -a -d -p platform %{_packagedir}
+
+VCONF_OPTION="-f -u 5000"
+PRIVATE_OPTION="-s org.tizen.menu-screen"
+INHOUSE_OPTION="-s idlescreen::vconf"
init_vconf()
{
- vconftool set -t int memory/idle-screen/top 0 -i -u 5000 -f
- vconftool set -t string file/private/org.tizen.menu-screen/engine "gl" -i -u 5000 -f
- vconftool set -t string db/setting/menuscreen/package_name "org.tizen.menu-screen" -i -u 5000 -f
+ vconftool set -t int memory/idle-screen/top 0 -i $VCONF_OPTION $INHOUSE_OPTION
+ vconftool set -t string file/private/org.tizen.menu-screen/engine "gl" $VCONF_OPTION $PRIVATE_OPTION
}
init_vconf
%{_resdir}/edje/layout_portrait.edj
%{_resdir}/edje/index.edj
%{_resdir}/images/default.png
+%{_resdir}/data/main_operation.launch
%{_localedir}/*/*/*.mo
+%{_usr_datadir}/icons/default/small/org.tizen.menu-screen.png
%{_usr_datadir}/packages/org.tizen.menu-screen.xml
-%{_usr_datadir}/license/%{name}
-/opt/etc/smack/accesses.d/%{_package_name}.rule
+%{_packagedir}/*.xml
+/etc/smack/accesses.d/%{_package_name}.efl
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+
+ * 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.
+ *
+ */
#include <sys/stat.h>
#include <string.h>
#define QUERY_LEN 1024
-#define MENU_SCREEN_DB_FILE "/opt/usr/apps/com.samsung.menu-screen/data/dbspace/.menu_screen.db"
+#define MENU_SCREEN_DB_FILE "/opt/usr/apps/org.tizen.menu-screen/data/dbspace/.menu_screen.db"
#define SHORTCUT_TABLE "shortcut"
#define QUERY_INSERT_SHORTCUT "INSERT INTO "SHORTCUT_TABLE" ("\
"appid,"\
HAPI int all_apps_db_count_shortcut(const char *appid, const char *name)
{
+ int count = -1;
+ char q[QUERY_LEN];
+ menu_screen_error_e ret = MENU_SCREEN_ERROR_FAIL;
+
retv_if(MENU_SCREEN_ERROR_OK != db_open(MENU_SCREEN_DB_FILE), -1);
- char q[QUERY_LEN];
snprintf(q, sizeof(q), QUERY_COUNT_SHORTCUT, appid, name);
stmt_h *st;
st = db_prepare(q);
retv_if(NULL == st, -1);
- menu_screen_error_e ret = MENU_SCREEN_ERROR_FAIL;
ret = db_next(st);
- retv_if(MENU_SCREEN_ERROR_FAIL == ret, -1);
+ if (MENU_SCREEN_ERROR_FAIL == ret) {
+ db_finalize(st);
+ return -1;
+ }
- int count = -1;
count = db_get_int(st, 0);
db_finalize(st);
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+
+ * 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.
+ *
+ */
#include <Elementary.h>
return MENU_SCREEN_ERROR_OK;
}
- retv_if(NULL == page_scroller_push_item(scroller, ai), MENU_SCREEN_ERROR_FAIL);
+ retv_if(NULL == page_scroller_push_item_by_order(scroller, ai), MENU_SCREEN_ERROR_FAIL);
return MENU_SCREEN_ERROR_OK;
page_scroller_bring_in(scroller, 0);
page_scroller_focus(scroller);
menu_screen_set_done(true);
+ menu_screen_inc_booting_state();
return ECORE_CALLBACK_CANCEL;
}
Evas_Object *all_apps;
Evas_Object *index;
Evas_Object *scroller;
+ Evas_Object *bg;
+ Evas *evas;
static const char item_edje[] = EDJEDIR"/item_4x4.edj";
static const char *page_edje;
all_apps_edje = ALL_APPS_EDJE_PORTRAIT;
page_edje = GROUP_4X4_EDJE_PORTRAIT;
width = menu_screen_get_root_width();
- height = menu_screen_get_root_height() - INDEX_HEIGHT;
+ height = menu_screen_get_root_height();
item_width = ITEM_WIDTH_PROP * menu_screen_get_root_width();
item_height = ITEM_HEIGHT_PROP * menu_screen_get_root_height();
return NULL;
}
+ evas = menu_screen_get_evas();
+ bg = evas_object_rectangle_add(evas);
+ evas_object_size_hint_min_set(bg, width, height);
+ evas_object_size_hint_max_set(bg, width, height);
+ evas_object_resize(bg, width, height);
+ elm_object_part_content_set(all_apps, "bg", bg);
+ evas_object_show(bg);
+
evas_object_data_set(all_apps, "win", evas_object_data_get(controlbar, "win"));
evas_object_data_set(all_apps, "layout", evas_object_data_get(controlbar, "layout"));
evas_object_data_set(all_apps, "controlbar", controlbar);
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+
+ * 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.
+ *
+ */
#include <Elementary.h>
+#include <pkgmgr-info.h>
#include <ail.h>
#include "menu_screen.h"
#include "conf.h"
#include "list.h"
+#include "all_apps/layout.h"
+
+
+HAPI int all_apps_list_find_installed_time(const char *id)
+{
+ pkgmgrinfo_pkginfo_h handle = NULL;
+ pkgmgrinfo_appinfo_h appinfo_h = NULL;
+
+ int ret = 0;
+ int installed_time = 0;
+
+ goto_if(0> pkgmgrinfo_appinfo_get_appinfo(id, &appinfo_h), ERROR);
+
+ char *pkgid = NULL;
+ goto_if(PMINFO_R_OK != pkgmgrinfo_appinfo_get_pkgid(appinfo_h, &pkgid), ERROR);
+ goto_if (NULL == pkgid, ERROR);
+
+ goto_if (0>pkgmgrinfo_pkginfo_get_pkginfo(pkgid, &handle), ERROR);
+
+ ret = pkgmgrinfo_pkginfo_get_installed_time(handle, &installed_time);
+ goto_if (ret != PMINFO_R_OK, ERROR);
+
+ pkgmgrinfo_appinfo_destroy_appinfo(appinfo_h);
+ pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
+
+ return installed_time;
+
+ERROR:
+ if (appinfo_h) pkgmgrinfo_appinfo_destroy_appinfo(appinfo_h);
+ if (handle) pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
+ return 0;
+}
{
app_list *list = data;
app_list_item *item;
+ app_info_t *item_info;
+ int installed_time = 0;
char *value;
retv_if(ail_appinfo_get_str(ai, AIL_PROP_PACKAGE_STR, &value) == AIL_ERROR_FAIL, AIL_CB_RET_CANCEL);
return AIL_CB_RET_CANCEL;
}
+ item_info = item->data;
+ if (NULL == item_info) {
+ free(item->data);
+ free(item->package);
+ free(item);
+ return AIL_CB_RET_CANCEL;
+ }
+
+ if (item_info->nodisplay || !item_info->enabled) {
+ free(item->data);
+ free(item->package);
+ free(item);
+ return AIL_CB_RET_CONTINUE;
+ }
+
+ installed_time = all_apps_list_find_installed_time(item->package);
+ item->installed_time = installed_time;
+
+ if (0 == item->installed_time) {
+ free(item->data);
+ free(item->package);
+ free(item);
+ return AIL_CB_RET_CANCEL;
+ }
+
if (list_append_item(list, item) != MENU_SCREEN_ERROR_OK) {
free(item->data);
free(item->package);
+static int _all_apps_installed_time_sort_cb(const void *d1, const void *d2)
+{
+ app_list_item *item[2];
+
+ retv_if(NULL == d1, 0);
+ retv_if(NULL == d2, 0);
+
+ item[0] = (app_list_item *) d1;
+ item[1] = (app_list_item *) d2;
+
+
+ if (item[0]->installed_time > item[1]->installed_time) return (1);
+ if (item[0]->installed_time < item[1]->installed_time) return (-1);
+ else return (0);
+}
+
+
+
static int _all_apps_sort_cb(const void *d1, const void *d2)
{
app_info_t *ai[2];
+HAPI void all_apps_list_destroy(app_list *list)
+{
+ app_list_item *item;
+
+ ret_if(NULL == list);
+ ret_if(NULL == list->list);
+
+ EINA_LIST_FREE(list->list, item) {
+ if (NULL == item) break;
+ if (item->package) free(item->package);
+ if (item->data) {
+ list_free_values(item->data);
+ free(item->data);
+ }
+ free(item);
+ }
+
+ eina_list_free(list->list);
+ free(list);
+}
+
+
+
HAPI app_list *all_apps_list_create(void)
{
int count = 0;
ail_filter_list_appinfo_foreach(f, _all_apps_cb, list);
ail_filter_destroy(f);
- if(MENU_SCREEN_ERROR_FAIL == list_sort(list, _all_apps_sort_cb)) {
- _D("Cannot sort apps.");
- }
-
- if(MENU_SCREEN_ERROR_FAIL == list_count(list, &count)) {
+ if (MENU_SCREEN_ERROR_FAIL == list_count(list, &count)) {
_D("Cannot count apps.");
}
+
_D("Total package count = %d", count);
- return list;
-}
+ if (count > (MAX_PAGE_NO * PAGE_MAX_APP)) {
+ int i;
+ if (MENU_SCREEN_ERROR_FAIL == list_sort(list, _all_apps_installed_time_sort_cb)) {
+ _E("Cannot sort installed_time");
+ }
-HAPI void all_apps_list_destroy(app_list *list)
-{
- app_list_item *item;
+ for(i = (MAX_PAGE_NO * PAGE_MAX_APP); i<count; i++) {
+ app_list_item *item = list_nth(list, (MAX_PAGE_NO * PAGE_MAX_APP));
+ if(!item)
+ continue;
- ret_if(NULL == list);
- ret_if(NULL == list->list);
+ _D("%d: %s will be removed", i, item->package);
- EINA_LIST_FREE(list->list, item) {
- if (NULL == item) break;
- if (item->package) free(item->package);
- if (item->data) {
- list_free_values(item->data);
- free(item->data);
+ retv_if(MENU_SCREEN_ERROR_FAIL == list_remove_item(list, item), NULL);
}
- free(item);
}
- eina_list_free(list->list);
- free(list);
+ if (MENU_SCREEN_ERROR_FAIL == list_sort(list, _all_apps_sort_cb)) {
+ _D("Cannot sort apps.");
+ }
+
+ return list;
}
/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
-
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+
+ * 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.
+ *
+ */
#include <shortcut.h>
#include <stdbool.h>
ai.x_slp_removable = 1;
ai.x_slp_taskmanage = 0;
- if (ADD_TO_HOME_IS_LIVEBOX(type)) {
- _D("This is a livebox");
+ if (ADD_TO_HOME_IS_DYNAMICBOX(type)) {
+ _D("This is a dynamic box");
return NULL;
}
/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
-
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+
+ * 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.
+ *
+ */
#include <db-util.h>
#include <sqlite3.h>
retv_if(NULL == handle->stmt, MENU_SCREEN_ERROR_INVALID_PARAMETER);
ret = sqlite3_finalize(handle->stmt);
- retv_with_dbmsg_if(ret != SQLITE_OK, MENU_SCREEN_ERROR_FAIL);
+ if(ret != SQLITE_OK) {
+ _E("Cannot finalize handle");
+ }
free(handle);
return MENU_SCREEN_ERROR_OK;
HAPI menu_screen_error_e db_exec(const char *query)
{
- int ret;
- char *errmsg;
-
retv_if(NULL == query, MENU_SCREEN_ERROR_INVALID_PARAMETER);
retv_if(NULL == db_info.db, MENU_SCREEN_ERROR_FAIL);
- ret = sqlite3_exec(db_info.db, query, NULL, NULL, &errmsg);
- if (ret != SQLITE_OK) {
- _E("Cannot execute this query - %s. because %s",
- query, errmsg? errmsg:"uncatched error");
- sqlite3_free(errmsg);
- return MENU_SCREEN_ERROR_FAIL;
- }
+ stmt_h *handle = db_prepare(query);
+ retv_if(NULL == handle, MENU_SCREEN_ERROR_FAIL);
+
+ goto_if(MENU_SCREEN_ERROR_FAIL == db_next(handle), ERROR);
+ if (MENU_SCREEN_ERROR_OK != db_finalize(handle)) return MENU_SCREEN_ERROR_FAIL;
return MENU_SCREEN_ERROR_OK;
+
+ERROR:
+ if (handle) db_finalize(handle);
+ return MENU_SCREEN_ERROR_FAIL;
}
}
}
} else {
- sqlite3_exec(db_info.db, "ROLLBACK TRANSACTION", NULL, NULL, NULL);
+ ret = sqlite3_exec(db_info.db, "ROLLBACK TRANSACTION", NULL, NULL, NULL);
+ if (SQLITE_OK != ret) {
+ _E("sqlite3_exec() Faild(%d)", ret);
+
+ return MENU_SCREEN_ERROR_FAIL;
+ }
}
return MENU_SCREEN_ERROR_OK;
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+
+ * 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.
+ *
+ */
#include <Elementary.h>
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+
+ * 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.
+ *
+ */
#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
#include <Elementary.h>
#include <ail.h>
#include <appsvc.h>
+#include <app_control.h>
#include <aul.h>
#include "menu_screen.h"
#define LAYOUT_BLOCK_INTERVAL 1.0
#define ITEM_GROUP_NAME "icon"
+#define DATA_KEY_ITEM_LAUNCH_MAIN_OPERATION "dk_it_launch"
+#define STR_ATTRIBUTE_PKGID "pkgid"
#define STR_ATTRIBUTE_NAME "name"
#define STR_ATTRIBUTE_ICON "icon"
#define STR_ATTRIBUTE_PKG_NAME "package"
ret_if(NULL == tmp);
evas_object_data_set(edje, STR_ATTRIBUTE_NAME, tmp);
if (edje_object_part_text_set(_EDJ(edje), "txt", tmp) == EINA_FALSE){
- //_E("Failed to set text on the part");
+ _E("Failed to set text on the part");
}
+ elm_object_signal_emit(edje, "text,on", "menu");
}
}
+HAPI void item_set_pkgid(Evas_Object *edje, char *package, int sync)
+{
+ char *tmp;
+ int changed;
+
+ tmp = evas_object_data_get(edje, STR_ATTRIBUTE_PKGID);
+ changed = (package && tmp) ? strcmp(tmp, package) : 1;
+
+ if (!changed) {
+ return;
+ }
+
+ free(tmp);
+ evas_object_data_del(edje, STR_ATTRIBUTE_PKGID);
+
+ if (package) {
+ tmp = strdup(package);
+ if (!tmp) {
+ _E("No more space for string \"%s\"", package);
+ } else {
+ evas_object_data_set(edje, STR_ATTRIBUTE_PKGID, tmp);
+ }
+ }
+}
+
+
+
+HAPI char *item_get_pkgid(Evas_Object *edje)
+{
+ return evas_object_data_get(edje, STR_ATTRIBUTE_PKGID);
+}
+
+
+
HAPI void item_set_removable(Evas_Object *edje, int removable, int sync)
{
int value;
+static int _is_main_operation_launch(Evas_Object *scroller, const char *package)
+{
+ Eina_List *main_operation_list;
+
+ retv_if(!package, 0);
+
+ main_operation_list = evas_object_data_get(scroller, DATA_KEY_MAIN_OPERATION_LIST);
+ if (!main_operation_list) {
+ _D("main operation list is NULL");
+ return 0;
+ }
+
+ const Eina_List *l, *l_next;
+ char *data;
+ EINA_LIST_FOREACH_SAFE(main_operation_list, l, l_next, data) {
+ continue_if(!data);
+ if (!strcmp(package, data)) {
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
+
+
HAPI void item_update(Evas_Object *item, app_info_t *ai)
{
Evas_Object *icon = NULL;
evas_object_data_set(item, "icon_image", icon);
}
+ item_set_pkgid(item, ai->pkgid, 0);
item_set_package(item, ai->package, 0);
item_set_desktop(item, ai->desktop, 0);
item_set_name(item, ai->name, 0);
static void _uninstall_focus_clicked_cb(void *data, Evas_Object *obj, void *event_info)
{
Evas_Object *win;
- Evas_Object *scroller;
char *package;
win = menu_screen_get_win();
_D("Uninstall button is up");
Evas_Object *item = data;
- scroller = evas_object_data_get(item, "scroller");
-
package = item_get_package(item);
ret_if(!package || strlen(package) == 0);
- ret_if(pkgmgr_find_pended_object(package, 0, scroller, NULL));
_D("Uninstalling... [%s]", package);
evas_object_size_hint_max_set(bg, item_width, item_height);
elm_object_part_content_set(item, "bg", bg);
- edje_object_text_class_set(_EDJ(item), "tizen", "TIZEN:style=medium", 24);
-
evas_object_data_set(item, "win", evas_object_data_get(scroller, "win"));
evas_object_data_set(item, "layout", evas_object_data_get(scroller, "layout"));
evas_object_data_set(item, "controlbar", evas_object_data_get(scroller, "controlbar"));
evas_object_data_set(item, "x", (void *) 0);
evas_object_data_set(item, "y", (void *) 0);
evas_object_data_set(item, "dirty", (void *) 0);
+ if (_is_main_operation_launch(scroller, ai->package)) {
+ evas_object_data_set(item, DATA_KEY_ITEM_LAUNCH_MAIN_OPERATION, (void *) 1);
+ }
item_update(item, ai);
item_event_register(item);
+ if (MENU_SCREEN_ERROR_OK !=
+ pkgmgr_item_list_append_item(ai->pkgid, ai->package, item))
+ {
+ _E("Cannot append an item into the item list");
+ }
return item;
}
Eina_List *n;
Eina_List *t;
Evas_Object *pend_item;
- int pending_idx;
const char *icon_image_type;
+ char *pkgid = NULL;
+ char *package= NULL;
ret_if(NULL == item);
+ pkgid = item_get_pkgid(item);
+ package = item_get_package(item);
+
+ if (pkgid
+ && package
+ && MENU_SCREEN_ERROR_OK !=
+ pkgmgr_item_list_remove_item(pkgid, package, item))
+ {
+ _E("Cannot remove an item in the item list");
+ }
+
page = item_get_page(item);
pending_list = evas_object_data_get(page, "pending,list");
EINA_LIST_FOREACH_SAFE(pending_list, n, t, pend_item) {
if (pend_item == item) {
- pending_idx = (int)evas_object_data_get(pend_item, "pending,idx");
pending_list = eina_list_remove(pending_list, pend_item);
evas_object_data_set(page, "pending,list", pending_list);
evas_object_data_del(pend_item, "pending,idx");
}
item_event_unregister(item);
+ item_set_pkgid(item, NULL, 0);
item_set_package(item, NULL, 1);
item_set_desktop(item, NULL, 1);
item_set_name(item, NULL, 1);
evas_object_data_del(item, "x");
evas_object_data_del(item, "y");
evas_object_data_del(item, "dirty");
+ evas_object_data_del(item, DATA_KEY_ITEM_LAUNCH_MAIN_OPERATION);
do {
Evas_Object *focus = NULL;
}
-
+#define BUNDLE_KEY_OPERATION "__APP_SVC_OP_TYPE__"
HAPI void item_launch(Evas_Object *obj)
{
char *package;
char *name;
- int ret_aul;
- Evas_Object *layout;
+ bundle *b = NULL;
+ Evas_Object *layout = NULL;
- ret_if(NULL == obj);
+ Evas_Object *item = obj;
+ ret_if(NULL == item);
- name = item_get_name(obj);
- package = item_get_package(obj);
+ name = item_get_name(item);
+ package = item_get_package(item);
ret_if(NULL == package);
layout = evas_object_data_get(menu_screen_get_win(), "layout");
layout_enable_block(layout);
- bool is_shortcut = (bool) evas_object_data_get(obj, "is_shortcut");
- bool shortcut_launch_package = (bool) evas_object_data_get(obj, "shortcut_launch_package");
+ bool is_shortcut = (bool) evas_object_data_get(item, "is_shortcut");
+ bool shortcut_launch_package = (bool) evas_object_data_get(item, "shortcut_launch_package");
if (is_shortcut && !shortcut_launch_package) {
- bundle *b = NULL;
b = bundle_create();
ret_if(NULL == b);
appsvc_set_operation(b, APPSVC_OPERATION_VIEW);
- appsvc_set_uri(b, evas_object_data_get(obj, "content_info"));
+ appsvc_set_uri(b, evas_object_data_get(item, "content_info"));
int ret = -1;
ret = appsvc_run_service(b, 0, _run_cb, NULL);
bundle_free(b);
} else {
- ret_aul = aul_open_app(package);
- if (ret_aul == AUL_R_EINVAL) {
- char* sinform;
- int len;
+ int ret_aul = AUL_R_OK;
+ if (evas_object_data_get(item, DATA_KEY_ITEM_LAUNCH_MAIN_OPERATION)) {
+ b = bundle_create();
+ ret_if(NULL == b);
+
+ if (0 != bundle_add(b, BUNDLE_KEY_OPERATION, APP_CONTROL_OPERATION_MAIN)) {
+ _E("Cannot add to a bundle");
+ bundle_free(b);
+ return;
+ }
- if (!name) {
- name = package;
+ if (b) {
+ ret_aul = aul_launch_app(package, b);
+ if (AUL_R_EINVAL == ret_aul) {
+ _E("cannot launch app");
+ }
+ bundle_free(b);
}
+ } else {
+ ret_aul = aul_open_app(package);
+ if (AUL_R_EINVAL == ret_aul) {
+ char* sinform;
+ int len;
- // IDS_IDLE_POP_UNABLE_TO_LAUNCH_PS : "Unable to launch %s"
- len = strlen(D_("IDS_IDLE_POP_UNABLE_TO_LAUNCH_PS")) + strlen(name) + 1;
+ if (!name) {
+ name = package;
+ }
- sinform = calloc(len, sizeof(char));
- if (!sinform) {
- _E("cannot calloc for popup.");
- return;
- }
+ // IDS_IDLE_POP_UNABLE_TO_LAUNCH_PS : "Unable to launch %s"
+ len = strlen(D_("IDS_IDLE_POP_UNABLE_TO_LAUNCH_PS")) + strlen(name) + 1;
- snprintf(sinform, len, D_("IDS_IDLE_POP_UNABLE_TO_LAUNCH_PS"), name);
- popup_create_confirm(layout, sinform);
+ sinform = calloc(len, sizeof(char));
+ if (!sinform) {
+ _E("cannot calloc for popup.");
+ return;
+ }
- free(sinform);
- layout_disable_block(layout);
- } else {
- _D("Launch app's ret : [%d]", ret_aul);
- _T(package);
- ecore_timer_add(LAYOUT_BLOCK_INTERVAL, _unblock_cb, NULL);
+ snprintf(sinform, len, D_("IDS_IDLE_POP_UNABLE_TO_LAUNCH_PS"), name);
+ popup_create_confirm(layout, sinform);
+
+ free(sinform);
+ layout_disable_block(layout);
+ }
}
+
+ _D("Launch app's ret : [%d]", ret_aul);
+
+ _T(package);
+ ecore_timer_add(LAYOUT_BLOCK_INTERVAL, _unblock_cb, NULL);
}
}
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+
+ * 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.
+ *
+ */
#include <badge.h>
#include <Elementary.h>
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+
+ * 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.
+ *
+ */
#include <Elementary.h>
#include <string.h>
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+
+ * 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.
+ *
+ */
#include <stdlib.h>
#include <Elementary.h>
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+
+ * 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.
+ *
+ */
#include <Elementary.h>
#include <Ecore_X.h>
#include "layout.h"
#include "mapbuf.h"
#include "page.h"
+#include "page_scroller.h"
#include "item.h"
#include "util.h"
#include "all_apps/layout.h"
HAPI Evas_Object *layout_create(Evas_Object *conformant, const char *file, const char *group, int rotate)
{
Evas_Object *layout;
+ Evas_Object *bg;
+ Evas *evas;
do {
int width;
retv_if(NULL == layout, NULL);
width = menu_screen_get_root_width();
- height = menu_screen_get_root_height() - INDEX_HEIGHT;
+ height = menu_screen_get_root_height();
evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_min_set(layout, width, height);
evas_object_resize(layout, width, height);
evas_object_show(layout);
+ evas = evas_object_evas_get(layout);
+ bg = evas_object_rectangle_add(evas);
+ evas_object_size_hint_min_set(bg, width, height);
+ evas_object_size_hint_max_set(bg, width, height);
+ evas_object_resize(bg, width, height);
+ elm_object_part_content_set(layout, "bg", bg);
+ evas_object_show(bg);
+
evas_object_data_set(layout, "win", menu_screen_get_win());
evas_object_data_set(layout, "rotate", (void *) rotate);
evas_object_data_set(layout, "width", (void *) width);
+HAPI void layout_create_package(Evas_Object *layout, const char *package)
+{
+ app_info_t ai = {0,};
+ Evas_Object *all_apps = NULL;
+ Evas_Object *scroller = NULL;
+ Evas_Object *item = NULL;
+
+ if (MENU_SCREEN_ERROR_FAIL == list_get_values(package, &ai)) {
+ list_free_values(&ai);
+ return;
+ }
+
+ if (ai.nodisplay) {
+ _D("This app(%s) is nodisplay", ai.package);
+ list_free_values(&ai);
+ return;
+ }
+
+
+ all_apps = evas_object_data_get(layout, "all_apps");
+ goto_if(!all_apps, EXIT);
+
+ scroller = evas_object_data_get(all_apps, "scroller");
+ goto_if(!scroller, EXIT);
+
+ /* Update the package */
+ item = page_scroller_find_item_by_package(scroller, ai.package, NULL);
+ if (item) {
+ _D("Package %s is found, update it!", package);
+ item_update(item, &ai);
+ goto EXIT;
+ }
+
+ /* Create the package */
+ _D("package %s is installed directly", package);
+ item = page_scroller_push_item_by_order(scroller, &ai);
+ if (!item) _E("item is NULL");
+
+EXIT:
+ list_free_values(&ai);
+ return;
+}
+
+
+
+HAPI void layout_update_package(Evas_Object *layout, const char *package)
+{
+ layout_create_package(layout, package);
+}
+
+
+
+static Evas_Object *_animated_unpack_item(Evas_Object *scroller, Evas_Object *page, unsigned int pos)
+{
+ Evas_Object *out = NULL;
+ Evas_Object *item;
+ Evas_Object *next_page;
+
+ char buf[32];
+ unsigned int page_max_app;
+ unsigned int page_no;
+ page_scroller_sort_type_e sort_type;
+
+ out = page_unpack_item_at(page, pos);
+ retv_if(NULL == out, NULL);
+
+ page_no = page_scroller_get_page_no(scroller, page);
+ page_max_app = (unsigned int) evas_object_data_get(scroller, "page_max_app");
+ sort_type = (page_scroller_sort_type_e) evas_object_data_get(scroller, "sort_type");
+
+ pos ++;
+ while (page && page_no < MAX_PAGE_NO) {
+ if (0 == page_count_item(page)) {
+ page_destroy(scroller, page);
+ break;
+ }
+
+ for (; pos < page_max_app; pos ++) {
+ item = page_unpack_item_at(page, pos);
+ if (NULL == item) continue;
+
+ page_pack_item(page, pos - 1, item);
+ snprintf(buf, 32, "menu%d", pos - 1);
+ edje_object_signal_emit(_EDJ(page), STR_MOVE_NEXT, buf);
+ edje_object_signal_emit(_EDJ(page), STR_ANI_RETURN, buf);
+ }
+
+ if (sort_type == PAGE_SCROLLER_SORT_MAX) {
+ return NULL;
+ }
+
+ page_no ++;
+ next_page = page_scroller_get_page_at(scroller, page_no);
+ if (next_page) {
+ item = page_unpack_item_at(next_page, 0);
+ if (NULL == item) continue;
+
+ page_pack_item(page, page_max_app - 1, item);
+ } else break;
+
+ pos = 1;
+ page = next_page;
+ }
+
+ return out;
+}
+
+
+
+HAPI void layout_delete_package(Evas_Object *layout, const char *package)
+{
+ Evas_Object *all_apps = NULL;
+ Evas_Object *scroller = NULL;
+ Evas_Object *page = NULL;
+ Evas_Object *item = NULL;
+ int page_no = 0;
+ register unsigned int i;
+ unsigned int page_max_app;
+
+ all_apps = evas_object_data_get(layout, "all_apps");
+ ret_if(!all_apps);
+
+ scroller = evas_object_data_get(all_apps, "scroller");
+ ret_if(!scroller);
+
+ item = page_scroller_find_item_by_package(scroller, package, &page_no);
+ if (!item) return;
+
+ page = page_scroller_get_page_at(scroller, page_no);
+ ret_if(!page);
+
+ page_max_app = (unsigned int) evas_object_data_get(scroller, "page_max_app");
+ for (i = 0; i < page_max_app; i++) {
+ if (item == page_get_item_at(page, i)) {
+ break;
+ }
+ }
+ if (i == page_max_app) return;
+
+ item = _animated_unpack_item(scroller, page, i);
+ ret_if(!item);
+ item_destroy(item);
+}
+
+
+
// End of file
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+
+ * 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.
+ *
+ */
#include <stdbool.h>
#include <stdlib.h>
-
+/* FIXME : package -> appid */
HAPI menu_screen_error_e list_get_values(const char *package, app_info_t *ai)
{
ail_appinfo_h appinfo_h;
+ char *pkgid;
char *exec;
char *name;
char *icon;
ret = ail_get_appinfo(ai->package, &appinfo_h);
if (AIL_ERROR_OK == ret) {
do {
+ /* FIXME : Please check this */
+ break_if(ail_appinfo_get_str(appinfo_h, AIL_PROP_X_SLP_PKGID_STR, &pkgid) < 0);
break_if(ail_appinfo_get_str(appinfo_h, AIL_PROP_EXEC_STR, &exec) < 0);
break_if(ail_appinfo_get_str(appinfo_h, AIL_PROP_NAME_STR, &name) < 0);
break_if(ail_appinfo_get_str(appinfo_h, AIL_PROP_ICON_STR, &icon) < 0);
break_if(ail_appinfo_get_bool(appinfo_h, AIL_PROP_X_SLP_REMOVABLE_BOOL, &ai->x_slp_removable) < 0);
break_if(ail_appinfo_get_bool(appinfo_h, AIL_PROP_X_SLP_TASKMANAGE_BOOL, &ai->x_slp_taskmanage) < 0);
+ break_if(NULL == pkgid || NULL == (ai->pkgid = strdup(pkgid)));
break_if(NULL == exec || NULL == (ai->exec = strdup(exec)));
break_if(NULL == name || NULL == (ai->name = strdup(name)));
break_if(NULL == icon || NULL == (ai->icon = strdup(icon)));
return MENU_SCREEN_ERROR_OK;
}
+ if (appinfo_h) ail_destroy_appinfo(appinfo_h);
+
return MENU_SCREEN_ERROR_FAIL;
}
ret_if(NULL == ai);
/* Origin field */
+ if (ai->pkgid) {
+ free(ai->pkgid);
+ ai->pkgid = NULL;
+ }
+
if (ai->package) {
free(ai->package);
ai->package = NULL;
+HAPI app_list_item *list_nth(app_list *parent, unsigned int nth)
+{
+ Eina_List *list;
+
+ retv_if(NULL == parent, NULL);
+
+ list = parent->list;
+ retv_if(NULL == list, NULL);
+
+ return eina_list_nth(list, nth);
+}
+
+
+
// End of a file
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+
+ * 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.
+ *
+ */
#include <Elementary.h>
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+
+ * 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.
+ *
+ */
#include <ail.h>
#include <app.h>
+#include <appcore-efl.h>
#include <aul.h>
#include <Ecore_X.h>
#include <Elementary.h>
#include "mouse.h"
#include "page.h"
#include "page_scroller.h"
+#include "pkgmgr.h"
#include "util.h"
#define MENU_SCREEN_ENGINE "file/private/org.tizen.menu-screen/engine"
int root_width;
int root_height;
int is_tts;
+ int booting_state;
Evas *evas;
Ecore_Evas *ee;
Evas_Object *win;
} menu_screen_info = {
.state = APP_STATE_PAUSE,
.is_tts = false,
+ .booting_state = 0,
.evas = NULL,
.ee = NULL,
.win = NULL,
}
+static Eina_Bool _appcore_flush_cb(void *data)
+{
+ if (APP_STATE_PAUSE != menu_screen_info.state) return ECORE_CALLBACK_CANCEL;
+ if (0 != appcore_flush_memory()) _E("Cannot flush memory");
+ return ECORE_CALLBACK_CANCEL;
+}
+
+
+
+HAPI void menu_screen_inc_booting_state(void)
+{
+ menu_screen_info.booting_state++;
+ if (BOOTING_STATE_DONE > menu_screen_info.booting_state) return;
+
+ menu_screen_error_e ret = MENU_SCREEN_ERROR_OK;
+ do {
+ ret = pkgmgr_reserve_list_pop_request();
+ } while (MENU_SCREEN_ERROR_OK == ret);
+
+ /* Cache memory is cleared when the application paused (every time, after 5 seconds (in appcore)),
+ * but after running in a minimized mode (HIDE_LAUNCH) application have status AS_RUNNING.
+ * Application have status AS_PAUSED only after change of visibility to hidden condition by user (on hiding window)
+ * Cleaning must be performed only once after application loading in hidden condition
+ * (and stay in a hidden condition at time of cleaning).
+ */
+ if (APP_STATE_PAUSE == menu_screen_info.state)
+ ecore_timer_add(5, _appcore_flush_cb, NULL);
+}
+
+
+
+HAPI void menu_screen_dec_booting_state(void)
+{
+ menu_screen_info.booting_state --;
+}
+
+
+
+HAPI int menu_screen_get_booting_state(void)
+{
+ return menu_screen_info.booting_state;
+}
+
+
+
+
static menu_screen_error_e _create_canvas(char *name, char *title)
{
elm_object_style_set(conformant, "nokeypad");
evas_object_size_hint_weight_set(conformant, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_object_signal_emit(conformant, "elm,state,indicator,overlap", "elm");
+ elm_win_indicator_mode_set(menu_screen_info.win, ELM_WIN_INDICATOR_SHOW);
evas_object_data_set(conformant, "win", win);
evas_object_show(conformant);
}
+static char *_replace_str(char *str, const char *before, const char *after)
+{
+ retv_if(NULL == str, NULL);
+ retv_if(NULL == before, NULL);
+ retv_if(NULL == after, NULL);
+
+ size_t before_len = strlen(before);
+ retv_if(before_len < 1, str);
+
+ size_t after_len = strlen(after);
+ size_t i, count = 0;
+ if (after_len != before_len) {
+ for (i = 0; str[i] != '\0';) {
+ if (0 == memcmp(&str[i], before, before_len)) {
+ count++;
+ i += before_len;
+ } else {
+ i++;
+ }
+ }
+ } else {
+ i = strlen(str);
+ }
+
+ char *result;
+ result = malloc(i + 1 + count * (after_len - before_len));
+ retv_if(result == NULL, NULL);
+
+ char *sr;
+ sr = result;
+ while (*str) {
+ if (0 == memcmp(str, before, before_len)) {
+ memcpy(sr, after, after_len);
+ sr += after_len;
+ str += before_len;
+ } else {
+ *sr++ = *str++;
+ }
+ }
+ *sr = '\0';
+
+ return result;
+}
+
static void _tts_cb(keynode_t *node, void *data)
{
_get_window_size();
_init_theme();
retv_if(MENU_SCREEN_ERROR_FAIL == _create_canvas(PACKAGE, PACKAGE), false);
- elm_win_indicator_mode_set(menu_screen_info.win, ELM_WIN_INDICATOR_SHOW);
if (vconf_notify_key_changed(VCONFKEY_BGSET, _change_bg_cb, NULL) < 0) {
_E("Failed to register a vconf cb for %s\n", VCONFKEY_BGSET);
}
evas_object_data_set(menu_screen_info.win, "layout", layout);
-if (vconf_notify_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, _tts_cb, NULL) < 0) {
+ if (vconf_notify_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, _tts_cb, NULL) < 0) {
_E("Failed to register the tts callback");
}
retv_if(vconf_get_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, &menu_screen_info.is_tts) < 0, MENU_SCREEN_ERROR_FAIL);
aul_listen_app_dead_signal(_dead_cb, NULL);
key_register();
+ // FIXME : This will be enabled after rebuilding the routine for appid <-> pkgid.
+ pkgmgr_init();
+
return true;
}
Evas_Object *conformant;
Evas_Object *layout;
+ // FIXME : This will be enabled after rebuilding the routine for appid <-> pkgid.
+ pkgmgr_fini();
+
if (vconf_ignore_key_changed(VCONFKEY_BGSET, _change_bg_cb) < 0) {
_E("Failed to remove bgset [%s]\n", VCONFKEY_BGSET);
}
{
_D("Pause start");
- if (vconf_set_int(VCONFKEY_IDLE_SCREEN_TOP, VCONFKEY_IDLE_SCREEN_TOP_FALSE) < 0) {
- _E("Failed to set %s to 0", VCONFKEY_IDLE_SCREEN_TOP);
- }
-
menu_screen_info.state = APP_STATE_PAUSE;
}
{
_D("START RESUME");
- if (vconf_set_int(VCONFKEY_IDLE_SCREEN_TOP, VCONFKEY_IDLE_SCREEN_TOP_TRUE) < 0) {
- _E("Failed to set %s to 1", VCONFKEY_IDLE_SCREEN_TOP);
- }
-
do { // Focus
Evas_Object *layout = evas_object_data_get(menu_screen_info.win, "layout");
break_if(NULL == layout);
-static void _service_cb(service_h service, void *data)
+static void _app_control_cb(app_control_h service, void *data)
{
_D("START RESET : %d", menu_screen_info.state);
- if (vconf_set_int(VCONFKEY_IDLE_SCREEN_TOP, VCONFKEY_IDLE_SCREEN_TOP_TRUE) < 0) {
- _E("Failed to set %s to 1", VCONFKEY_IDLE_SCREEN_TOP);
- }
-
do { // Focus
Evas_Object *layout = evas_object_data_get(menu_screen_info.win, "layout");
break_if(NULL == layout);
item = page_get_item_at(page, j);
if (!item) continue;
- if (ail_get_appinfo(item_get_package(item), &ai) < 0) continue;
+ if (ail_get_appinfo(item_get_package(item), &ai) < 0) {
+ ail_destroy_appinfo(ai);
+ continue;
+ }
if (ail_appinfo_get_str(ai, AIL_PROP_NAME_STR, &name) < 0) {
ail_destroy_appinfo(ai);
continue;
event_callback->terminate = _terminate_cb;
event_callback->pause = _pause_cb;
event_callback->resume = _resume_cb;
- event_callback->service = _service_cb;
+ event_callback->app_control = _app_control_cb;
event_callback->low_memory = NULL;
event_callback->low_battery = NULL;
event_callback->device_orientation = NULL;
-#define QP_EMUL_STR "Emulator"
static bool _is_emulator_on(void)
{
- char *info;
+ int ret;
+ char *model;
- if (system_info_get_value_string(SYSTEM_INFO_KEY_MODEL, &info) == 0) {
- if (info == NULL) return false;
- if (!strncmp(QP_EMUL_STR, info, strlen(info))) {
- return true;
+ ret = system_info_get_platform_string("tizen.org/system/model_name", &model);
+ if (SYSTEM_INFO_ERROR_NONE != ret) {
+ if (model) {
+ free(model);
}
+ return false;
+ }
+
+ if (!strncmp(model, "Emulator", strlen(model))) {
+ _D("This model is on Emulator");
+ free(model);
+ return true;
}
+ _D("This model is NOT on Emulator");
+ free(model);
return false;
}
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+
+ * 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.
+ *
+ */
#include <stdio.h>
#include <stdlib.h>
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+
+ * 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.
+ *
+ */
#include <Elementary.h>
Evas_Object *box;
char *page_edje;
- bool enable_bg_image;
-
unsigned int count;
int page_height;
int page_width;
_D("Create a new page[%d]", idx);
page_edje = evas_object_data_get(scroller, "page_edje");
- enable_bg_image = (bool) evas_object_data_get(scroller, "enable_bg_image");
page = layout_load_edj(scroller, page_edje, PAGE_GROUP_NAME);
retv_if(!page, NULL);
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+
+ * 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.
+ *
+ */
#include <Elementary.h>
+#include <stdio.h>
#include <vconf.h>
#include "item_badge.h"
+static menu_screen_error_e _find_position_all_page(Evas_Object *scroller, int *candidate_page, int *candidate_pos, void *data)
+{
+ Evas_Object *page;
+ Evas_Object *item;
+ register unsigned int page_no;
+ register unsigned int position_no;
+ int nr_of_pages;
+ int page_max_app;
+
+ retv_if(NULL == scroller, MENU_SCREEN_ERROR_INVALID_PARAMETER);
+ retv_if(NULL == candidate_page, MENU_SCREEN_ERROR_INVALID_PARAMETER);
+ retv_if(NULL == candidate_pos, MENU_SCREEN_ERROR_INVALID_PARAMETER);
+
+ *candidate_page = -1;
+ *candidate_pos = -1;
+ nr_of_pages = page_scroller_count_page(scroller);
+ page_max_app = (int) evas_object_data_get(scroller, "page_max_app");
+
+ page = page_scroller_get_page_at(scroller, nr_of_pages-1);
+ page_no = nr_of_pages-1;
+ for (position_no = 0; position_no < page_max_app; position_no ++) {
+ item = page_get_item_at(page, position_no);
+ if (!item) {
+ *candidate_page = page_no;
+ *candidate_pos = position_no;
+ return MENU_SCREEN_ERROR_OK;
+ }
+ }
+
+ for (page_no = 0; page_no < nr_of_pages -1; page_no ++) {
+ page = page_scroller_get_page_at(scroller, page_no);
+ if(!page) {
+ return MENU_SCREEN_ERROR_FAIL;
+ }
+
+ for (position_no = 0; position_no < page_max_app; position_no ++) {
+ item = page_get_item_at(page, position_no);
+ if (!item) {
+ *candidate_page = page_no;
+ *candidate_pos = position_no;
+ return MENU_SCREEN_ERROR_OK;
+ }
+ }
+ }
+
+ return MENU_SCREEN_ERROR_OK;
+}
+
+
+
static menu_screen_error_e _find_position_by_default(Evas_Object *scroller, int *candidate_page, int *candidate_pos, void *data)
{
Evas_Object *page;
-static Evas_Object *_animated_unpack_item(Evas_Object *scroller, Evas_Object *page, unsigned int pos)
-{
- Evas_Object *out = NULL;
- Evas_Object *item;
- Evas_Object *next_page;
-
- char buf[32];
- unsigned int page_max_app;
- unsigned int page_no;
- page_scroller_sort_type_e sort_type;
-
- out = page_unpack_item_at(page, pos);
- retv_if(NULL == out, NULL);
-
- page_no = page_scroller_get_page_no(scroller, page);
- page_max_app = (unsigned int) evas_object_data_get(scroller, "page_max_app");
- sort_type = (page_scroller_sort_type_e) evas_object_data_get(scroller, "sort_type");
-
- pos ++;
- while (page && page_no < MAX_PAGE_NO) {
- if (0 == page_count_item(page)) {
- page_destroy(scroller, page);
- break;
- }
-
- for (; pos < page_max_app; pos ++) {
- item = page_unpack_item_at(page, pos);
- if (NULL == item) continue;
-
- page_pack_item(page, pos - 1, item);
- snprintf(buf, 32, "menu%d", pos - 1);
- edje_object_signal_emit(_EDJ(page), STR_MOVE_NEXT, buf);
- edje_object_signal_emit(_EDJ(page), STR_ANI_RETURN, buf);
- }
-
- if (sort_type == PAGE_SCROLLER_SORT_MAX) {
- return NULL;
- }
-
- page_no ++;
- next_page = page_scroller_get_page_at(scroller, page_no);
- if (next_page) {
- item = page_unpack_item_at(next_page, 0);
- if (NULL == item) continue;
-
- page_pack_item(page, page_max_app - 1, item);
- } else break;
-
- pos = 1;
- page = next_page;
- }
-
- return out;
-}
-
-
-
HAPI Evas_Object *page_scroller_push_item(Evas_Object *scroller, app_info_t *ai)
{
Evas_Object *page;
-static inline menu_screen_error_e _create_cb(const char *package, void *data)
+HAPI Evas_Object *page_scroller_push_item_by_order(Evas_Object *scroller, app_info_t *ai)
{
- app_info_t ai = {0,};
- Evas_Object *item;
- Evas_Object *scroller = data;
-
- if (MENU_SCREEN_ERROR_FAIL == list_get_values(package, &ai)) {
- list_free_values(&ai);
- return MENU_SCREEN_ERROR_FAIL;
- }
-
- do {
- if (!scroller) {
- _D("Scroller is NULL.");
- break;
- }
-
- if (ai.nodisplay || !ai.enabled)
- {
- Evas_Object *page;
-
- _D("package %s is not visible", package);
- item = pkgmgr_find_pended_object(ai.package, 1, scroller, &page);
- if (item) {
- if (page) {
- page_unpack_item(page, item);
- page_scroller_trim_items(scroller);
- }
-
- item_destroy(item);
- }
-
- break;
- }
-
- item = pkgmgr_find_pended_object(ai.package, 1, scroller, NULL);
- if (!item) {
- item = page_scroller_find_item_by_package(scroller, ai.package, NULL);
- if (!item) {
- Evas_Object *item;
- _D("package %s is installed directly", package);
- item = page_scroller_push_item(scroller, &ai);
- if (item) {
- break;
- } else {
- list_free_values(&ai);
- retv_if(1, MENU_SCREEN_ERROR_FAIL);
- }
- }
- }
-
- _D("Package %s is found, update it!", package);
- item_update(item, &ai);
- } while(0);
-
- list_free_values(&ai);
- return MENU_SCREEN_ERROR_OK;
-}
-
-
-
-static inline menu_screen_error_e _update_cb(const char *package, void *data)
-{
- Evas_Object *scroller = data;
- Evas_Object *item;
- int page_no = 0;
- app_info_t ai = {0,};
-
- if (MENU_SCREEN_ERROR_FAIL == list_get_values(package, &ai)) {
- list_free_values(&ai);
- return MENU_SCREEN_ERROR_FAIL;
- }
-
- do {
- if (!scroller) {
- _D("Scroller is NULL.");
- break;
- }
-
- item = page_scroller_find_item_by_package(scroller, package, &page_no);
- if (!item) {
- Evas_Object *page;
- _D("There is no loaded item is found");
- item = pkgmgr_find_pended_object(package, 1, scroller, &page);
- if (item) {
- if (!ai.nodisplay && ai.enabled) {
- _D("Item is found for updating from the install list, Ignore this.");
- item_update(item, &ai);
- } else {
- _D("Item is found for updating from the install list, But nodisplay");
- if (page) {
- page_unpack_item(page, item);
- page_scroller_trim_items(scroller);
- }
- item_destroy(item);
- }
- } else {
- Evas_Object *item;
- _D("Item is not found. Create a new one");
- item = ((!ai.nodisplay && ai.enabled) ? page_scroller_push_item(scroller, &ai) : NULL);
- if (item) {
- break;
- } else {
- list_free_values(&ai);
- retv_if(1, MENU_SCREEN_ERROR_FAIL);
- }
- }
- } else {
- Evas_Object *page;
- Evas_Object *pended_item;
-
- pended_item = pkgmgr_find_pended_object(package, 1, scroller, &page);
- if (!pended_item ) {
- _D("Cannot find package in the install list");
- }
-
- if (!ai.nodisplay && ai.enabled) {
- item_update(item, &ai);
- break;
- }
-
- page = page_scroller_get_page_at(scroller, page_no);
- if (page) {
- page_unpack_item(page, item);
- page_scroller_trim_items(scroller);
- }
- item_destroy(item);
- }
- } while (0);
-
- list_free_values(&ai);
- return MENU_SCREEN_ERROR_OK;
-}
-
-
-
-static inline menu_screen_error_e _delete_cb(const char *package, void *data)
-{
- Evas_Object *item;
- Evas_Object *page;
- Evas_Object *scroller = data;
- Evas_Object *tmp;
- int page_no = 0;
- register unsigned int i;
- unsigned int page_max_app;
-
- do {
- if (!scroller) {
- _D("Scroller is NULL.");
- break;
- }
-
- tmp = pkgmgr_find_pended_object(package, 1, scroller, NULL);
-
- item = page_scroller_find_item_by_package(scroller, package, &page_no);
- retv_if(NULL == item, MENU_SCREEN_ERROR_FAIL);
-
- if (tmp != item) {
- _D("Pended item is %p, Found item is %p", tmp, item);
- }
-
- page = page_scroller_get_page_at(scroller, page_no);
- retv_if(NULL == page, MENU_SCREEN_ERROR_FAIL);
-
- page_max_app = (unsigned int) evas_object_data_get(scroller, "page_max_app");
- for (i = 0; i < page_max_app; i++) {
- if (item == page_get_item_at(page, i)) {
- break;
- }
- }
-
- item = _animated_unpack_item(scroller, page, i);
- retv_if(NULL == item, MENU_SCREEN_ERROR_FAIL);
- item_destroy(item);
- } while (0);
-
- return MENU_SCREEN_ERROR_OK;
-}
-
-
-
-static struct pkg_event_handler {
- const char *event_name;
- int (*event_handler)(const char *package, void *data);
-} event_table[] = {
- {
- .event_name = "create",
- .event_handler = _create_cb,
- },
- {
- .event_name = "update",
- .event_handler = _update_cb,
- },
- {
- .event_name = "delete",
- .event_handler = _delete_cb,
- },
- {
- .event_name = NULL,
- .event_handler = NULL,
- },
-};
-
-
-
-static void _desktop_cb(keynode_t *node, void *data)
-{
- char *event;
- char type[10];
- char package[BUFSZE];
- register int i;
-
- event = vconf_get_str(vconf_keynode_get_name(node));
- ret_if(NULL == event);
-
- if (sscanf(event, "%10[^:]:%1023s", type, package) != 2) {
- _D("Failed to parse the event format : [%s], [%s]", type, package);
- }
-
- _D("command[%s], package[%s]", type, package);
-
- for (i = 0; event_table[i].event_name; i ++) {
- if (!strcasecmp(type, event_table[i].event_name)) {
- if (event_table[i].event_handler(package, data) == MENU_SCREEN_ERROR_FAIL) {
- _E("Failed to handles the desktop notification event");
- }
+ int candidate_page = -1;
+ int candidate_pos = -1;
+ Evas_Object *item = NULL;
- free(event);
- return;
+ if (MAX_PAGE_NO == page_scroller_count_page(scroller)) {
+ _find_position_all_page(scroller, &candidate_page, &candidate_pos, &ai);
+ if (-1 != candidate_page || -1 != candidate_pos) {
+ item = page_scroller_push_item(scroller, ai);
}
}
+ else item = page_scroller_push_item(scroller, ai);
- _E("Failed to find a proper event handler");
- free(event);
+ return item;
}
+static inline char *_ltrim(char *str)
+{
+ retv_if(NULL == str, NULL);
+ while (*str && (*str == ' ' || *str == '\t' || *str == '\n')) str ++;
+ return str;
+}
+
+
+
+static inline int _rtrim(char *str)
+{
+ int len;
+
+ retv_if(NULL == str, 0);
+
+ len = strlen(str);
+ while (--len >= 0 && (str[len] == ' ' || str[len] == '\n' || str[len] == '\t')) {
+ str[len] = '\0';
+ }
+
+ return len;
+}
+
+
+
+static int _create_main_operation_list(Evas_Object *scroller)
+{
+ FILE *fp;
+ const char *filename = RESDIR"/data/main_operation.launch";
+ char *line = NULL;
+ size_t size = 0;
+ ssize_t read;
+ char *data = NULL;
+ Eina_List *main_operation_list = NULL;
+
+ fp = fopen(filename, "r");
+ if (!fp) {
+ _D("cannot open fp");
+ return 0;
+ }
+
+ while ((read = getline(&line, &size, fp)) != -1) {
+ char *begin;
+
+ if (size <= 0) {
+ free(line);
+ line = NULL;
+ break;
+ }
+
+ begin = _ltrim(line);
+ _rtrim(line);
+
+ if (*begin == '#' || *begin == '\0') {
+ free(line);
+ line = NULL;
+ continue;
+ }
+
+ data = strdup(begin);
+ main_operation_list = eina_list_append(main_operation_list, data);
+
+ if (line) {
+ free(line);
+ line = NULL;
+ }
+ }
+
+ fclose(fp);
+ evas_object_data_set(scroller, DATA_KEY_MAIN_OPERATION_LIST, main_operation_list);
+
+ return 1;
+}
+
+
+
+static void _destroy_main_operation_list(Evas_Object *scroller)
+{
+ char *data = NULL;
+ Eina_List *main_operation_list = NULL;
+
+ main_operation_list = evas_object_data_del(scroller, DATA_KEY_MAIN_OPERATION_LIST);
+ ret_if(!main_operation_list);
+
+ EINA_LIST_FREE(main_operation_list, data) {
+ free(data);
+ }
+}
+
+
+
HAPI Evas_Object *page_scroller_create(Evas_Object *tab, Evas_Object *index, page_scroller_sort_type_e sort_type, int rotate)
{
Evas_Object *box;
evas_object_show(box);
evas_object_show(scroller);
- if (vconf_notify_key_changed(VCONFKEY_AIL_INFO_STATE, _desktop_cb, scroller) < 0) {
- _E("Failed to register a desktop change event handler");
- }
-
if (vconf_notify_key_changed("memory/menuscreen/mapbuf", _mapbuf_cb, scroller) < 0) {
_E("Failed to register a vconf cb for %s", "memory/menuscreen/mapbuf");
}
- // FIXME : This will be enabled after rebuilding the routine for appid <-> pkgid.
- //pkgmgr_init(scroller);
item_badge_register_changed_cb(scroller);
+ if (!_create_main_operation_list(scroller)) {
+ _E("Cannot create the main operation list");
+ }
return scroller;
}
ret_if(NULL == (box = evas_object_data_get(scroller, "box")));
ret_if(NULL == (page_list = elm_box_children_get(box)));
+ _destroy_main_operation_list(scroller);
item_badge_unregister_changed_cb();
- // FIXME : This will be enabled after rebuilding the routine for appid <-> pkgid.
- //pkgmgr_fini();
-
EINA_LIST_FOREACH_SAFE(page_list, l, ln, page) {
int count;
evas_object_del(scroller);
- if (vconf_ignore_key_changed(VCONFKEY_AIL_INFO_STATE, _desktop_cb) < 0) {
- _E("Failed to ignore the desktop event");
- }
-
if (vconf_ignore_key_changed("memory/menuscreen/mapbuf", _mapbuf_cb) < 0) {
_E("Failed to remove vconf %s", "memory/menuscreen/mapbuf");
}
Evas_Object *item;
Evas_Object *box;
- retv_if(idx >= MAX_PAGE_NO, NULL);
+ retv_if(idx > MAX_PAGE_NO, NULL);
box = evas_object_data_get(scroller, "box");
retv_if(NULL == box, NULL);
page_max_app = (int) evas_object_data_get(scroller, "page_max_app");
for (page_no = 0; page_no < nr_of_pages; page_no ++) {
page = page_scroller_get_page_at(scroller, page_no);
- ret_if(NULL == page);
+ if(!page) continue;
for (position_no = 0; position_no < page_max_app; position_no ++) {
item = page_get_item_at(page, position_no);
page_max_app = (int) evas_object_data_get(scroller, "page_max_app");
for (page_no = nr_of_pages - 1; page_no >= 0; page_no --) {
- int count;
-
page = page_scroller_get_page_at(scroller, page_no);
- if (NULL == page) break;
- count = page_count_item(page);
+ if(NULL == page) continue;
page_scroller_trim_items(scroller);
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+
+ * 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.
+ *
+ */
#include <Elementary.h>
#include <package-manager.h>
#include <pkgmgr-info.h>
#include "conf.h"
-#include "index.h"
+#include "menu_screen.h"
#include "item.h"
+#include "layout.h"
#include "list.h"
#include "page.h"
#include "page_scroller.h"
-#include "mapbuf.h"
#include "pkgmgr.h"
#include "util.h"
int (*func)(const char *package, const char *val, void *data);
};
+typedef struct {
+ char* package;
+ char* key;
+ char* val;
+} pkgmgr_reserve_s;
+
+typedef struct {
+ char* package;
+ char* status;
+} pkgmgr_request_s;
+typedef struct {
+ char* pkg_id;
+ char* app_id;
+ Evas_Object *item;
+} pkgmgr_install_s;
static struct {
pkgmgr_client *listen_pc;
+ Eina_List *reserve_list;
+ Eina_List *request_list;
+ Eina_List *item_list;
} pkg_mgr_info = {
.listen_pc = NULL,
+ .reserve_list = NULL,
+ .request_list = NULL,
+ .item_list = NULL,
};
-HAPI inline menu_screen_error_e pkgmgr_uninstall(Evas_Object *item)
+static menu_screen_error_e _append_request_in_list(const char *package, const char *status)
{
- int ret = MENU_SCREEN_ERROR_OK;
+ retv_if(NULL == package, MENU_SCREEN_ERROR_INVALID_PARAMETER);
+ retv_if(NULL == status, MENU_SCREEN_ERROR_INVALID_PARAMETER);
- retv_if(NULL == item, MENU_SCREEN_ERROR_FAIL);
+ pkgmgr_request_s *rt = calloc(1, sizeof(pkgmgr_request_s));
+ retv_if(NULL == rt, MENU_SCREEN_ERROR_FAIL);
- char *pkgid = NULL;
- char *appid = item_get_package(item);
- retv_if(NULL == appid, MENU_SCREEN_ERROR_FAIL);
+ rt->package = strdup(package);
+ goto_if(NULL == rt->package, ERROR);
- pkgmgr_client *req_pc = NULL;
- req_pc = pkgmgr_client_new(PC_REQUEST);
- retv_if(NULL == req_pc, MENU_SCREEN_ERROR_FAIL);
+ rt->status = strdup(status);
+ goto_if(NULL == rt->status, ERROR);
- pkgmgrinfo_appinfo_h handle;
- if (PMINFO_R_OK != pkgmgrinfo_appinfo_get_appinfo(appid, &handle)) {
- if (PKGMGR_R_OK != pkgmgr_client_free(req_pc)) {
- _E("cannot free pkgmgr_client for request.");
- }
- return MENU_SCREEN_ERROR_FAIL;
- }
+ pkg_mgr_info.request_list = eina_list_append(pkg_mgr_info.request_list, rt);
+ goto_if(NULL == pkg_mgr_info.request_list, ERROR);
- if (PMINFO_R_OK != pkgmgrinfo_appinfo_get_pkgid(handle, &pkgid)) {
- if (PMINFO_R_OK != pkgmgrinfo_appinfo_destroy_appinfo(handle)) {
- _E("cannot destroy the appinfo");
- }
+ return MENU_SCREEN_ERROR_OK;
- if (PKGMGR_R_OK != pkgmgr_client_free(req_pc)) {
- _E("cannot free pkgmgr_client for request.");
- }
+ERROR:
+ if (rt->status) free(rt->status);
+ if (rt->package) free(rt->package);
+ if (rt) free(rt);
- return MENU_SCREEN_ERROR_FAIL;
- }
+ return MENU_SCREEN_ERROR_FAIL;
+}
- if (!pkgid) pkgid = appid;
- _D("Uninstall a package[%s] from an app[%s]", pkgid, appid);
- if (pkgmgr_client_uninstall(req_pc, NULL, pkgid, PM_QUIET, NULL, NULL) < 0) {
- _E("cannot uninstall %s.", item_get_package(item));
- ret = MENU_SCREEN_ERROR_FAIL;
+
+static menu_screen_error_e _remove_request_in_list(const char *package)
+{
+ retv_if(NULL == package, MENU_SCREEN_ERROR_INVALID_PARAMETER);
+
+ if (NULL == pkg_mgr_info.request_list) return MENU_SCREEN_ERROR_OK;
+
+ const Eina_List *l = NULL;
+ const Eina_List *ln = NULL;
+ pkgmgr_request_s *rt = NULL;
+ EINA_LIST_FOREACH_SAFE(pkg_mgr_info.request_list, l, ln, rt) {
+ if (!rt) continue;
+ if (!rt->package) continue;
+ if (strcmp(rt->package, package)) continue;
+
+ pkg_mgr_info.request_list = eina_list_remove(pkg_mgr_info.request_list, rt);
+ free(rt->package);
+ if (rt->status) free(rt->status);
+ free(rt);
+ return MENU_SCREEN_ERROR_OK;
}
- if (PMINFO_R_OK != pkgmgrinfo_appinfo_destroy_appinfo(handle)) {
- _E("cannot destroy the appinfo");
- ret = MENU_SCREEN_ERROR_FAIL;
+ return MENU_SCREEN_ERROR_FAIL;
+}
+
+
+
+static int _exist_request_in_list(const char *package)
+{
+ retv_if(NULL == package, 0);
+
+ if (NULL == pkg_mgr_info.request_list) return 0;
+
+ const Eina_List *l = NULL;
+ const Eina_List *ln = NULL;
+ pkgmgr_request_s *rt = NULL;
+ EINA_LIST_FOREACH_SAFE(pkg_mgr_info.request_list, l, ln, rt) {
+ if (!rt) continue;
+ if (!rt->package) continue;
+ if (strcmp(rt->package, package)) continue;
+ return 1;
}
- if (PMINFO_R_OK != pkgmgr_client_free(req_pc)) {
- _E("cannot free pkgmgr_client");
- ret = MENU_SCREEN_ERROR_FAIL;
+ return 0;
+}
+
+
+
+static pkgmgr_request_s *_get_request_in_list(const char *package)
+{
+ retv_if(NULL == package, NULL);
+
+ if (NULL == pkg_mgr_info.request_list) return NULL;
+
+ const Eina_List *l = NULL;
+ const Eina_List *ln = NULL;
+ pkgmgr_request_s *rt = NULL;
+ EINA_LIST_FOREACH_SAFE(pkg_mgr_info.request_list, l, ln, rt) {
+ if (!rt) continue;
+ if (!rt->package) continue;
+ if (strcmp(rt->package, package)) continue;
+ return rt;
}
- return ret;
+ return NULL;
}
-static menu_screen_error_e _start_download(const char *package, void *scroller)
+HAPI menu_screen_error_e pkgmgr_item_list_append_item(const char *pkg_id, const char *app_id, Evas_Object *item)
{
- struct package_info *pi;
- Eina_List *install_list;
+ retv_if(NULL == pkg_id, MENU_SCREEN_ERROR_INVALID_PARAMETER);
+ retv_if(NULL == app_id, MENU_SCREEN_ERROR_INVALID_PARAMETER);
+ retv_if(NULL == item, MENU_SCREEN_ERROR_INVALID_PARAMETER);
+
+ char *tmp_pkg_id = NULL;
+ char *tmp_app_id = NULL;
- install_list = evas_object_data_get(scroller, "install_list");
- pi = calloc(1, sizeof(struct package_info));
- retv_if(NULL == pi, MENU_SCREEN_ERROR_FAIL);
+ pkgmgr_install_s *pi = calloc(1, sizeof(pkgmgr_install_s));
+ goto_if(NULL == pi, ERROR);
- pi->status = DOWNLOAD_BEGIN;
- pi->ai.package = strdup(package);
- pi->ai.name = strdup("Download");
+ tmp_pkg_id = strdup(pkg_id);
+ goto_if(NULL == tmp_pkg_id, ERROR);
- install_list = eina_list_append(install_list, pi);
- evas_object_data_set(scroller, "install_list", install_list);
- _D("Package [%s] is jump into the downloading phase", package);
+ tmp_app_id = strdup(app_id);
+ goto_if(NULL == tmp_app_id, ERROR);
+
+ pi->pkg_id = tmp_pkg_id;
+ pi->app_id = tmp_app_id;
+ pi->item = item;
+
+ pkg_mgr_info.item_list = eina_list_append(pkg_mgr_info.item_list, pi);
+ goto_if(NULL == pkg_mgr_info.item_list, ERROR);
return MENU_SCREEN_ERROR_OK;
+
+ERROR:
+ if (tmp_app_id) free(tmp_app_id);
+ if (tmp_pkg_id) free(tmp_pkg_id);
+ free(pi);
+
+ return MENU_SCREEN_ERROR_FAIL;
}
-static menu_screen_error_e _start_uninstall(const char *package, void *scroller)
+HAPI menu_screen_error_e pkgmgr_item_list_remove_item(const char *pkg_id, const char *app_id, Evas_Object *item)
{
- Eina_List *l;
- Eina_List *tmp;
- int page_no = 0;
- struct package_info *pi = NULL;
- Eina_List *install_list;
-
- install_list = evas_object_data_get(scroller, "install_list");
- EINA_LIST_FOREACH_SAFE(install_list, l, tmp, pi) {
- if (pi->ai.package && !strcmp(pi->ai.package, package)) {
- break;
- }
- pi = NULL;
- }
+ retv_if(NULL == pkg_id, MENU_SCREEN_ERROR_INVALID_PARAMETER);
+ retv_if(NULL == app_id, MENU_SCREEN_ERROR_INVALID_PARAMETER);
+ retv_if(NULL == item, MENU_SCREEN_ERROR_INVALID_PARAMETER);
+
+ const Eina_List *l = NULL;
+ const Eina_List *ln = NULL;
+ pkgmgr_install_s *pi = NULL;
+ EINA_LIST_FOREACH_SAFE(pkg_mgr_info.item_list, l, ln, pi) {
+ continue_if(NULL == pi);
+ continue_if(NULL == pi->pkg_id);
+ continue_if(NULL == pi->app_id);
+ continue_if(NULL == pi->item);
+
+ if (strcmp(pi->pkg_id, pkg_id)) continue;
+ if (strcmp(pi->app_id, app_id)) continue;
+ if (pi->item != item) continue;
+
+ pkg_mgr_info.item_list = eina_list_remove(pkg_mgr_info.item_list, pi);
+
+ free(pi->app_id);
+ free(pi->pkg_id);
+ free(pi);
- retv_if(pi, MENU_SCREEN_ERROR_FAIL);
+ return MENU_SCREEN_ERROR_OK;
+ }
- pi = calloc(1, sizeof(struct package_info));
- retv_if(NULL == pi, MENU_SCREEN_ERROR_FAIL);
+ return MENU_SCREEN_ERROR_FAIL;
+}
- pi->status = UNINSTALL_BEGIN;
- pi->ai.package = strdup(package);
- pi->ai.nodisplay = false;
- pi->ai.enabled = true;
- pi->item = page_scroller_find_item_by_package(scroller, package, &page_no);
- pi->page = page_scroller_get_page_at(scroller, page_no);
- install_list = eina_list_append(install_list, pi);
- evas_object_data_set(scroller, "install_list", install_list);
- return MENU_SCREEN_ERROR_OK;
+HAPI void pkgmgr_item_list_affect_pkgid(const char *pkg_id, Eina_Bool (*_affected_cb)(const char *, Evas_Object *, void *), void *data)
+{
+ ret_if(NULL == pkg_mgr_info.item_list);
+ ret_if(NULL == pkg_id);
+ ret_if(NULL == _affected_cb);
+
+ const Eina_List *l;
+ const Eina_List *ln;
+ pkgmgr_install_s *pi;
+ EINA_LIST_FOREACH_SAFE(pkg_mgr_info.item_list, l, ln, pi) {
+ continue_if(NULL == pi);
+ continue_if(NULL == pi->app_id);
+ continue_if(NULL == pi->item);
+
+ if (strcmp(pkg_id, pi->pkg_id)) continue;
+ /* It's possible that many items with the same package name are in the install list */
+ continue_if(EINA_TRUE != _affected_cb(pi->app_id, pi->item, data));
+ }
}
-static menu_screen_error_e _start_update(const char *package, void *scroller)
+HAPI void pkgmgr_item_list_affect_appid(const char *app_id, Eina_Bool (*_affected_cb)(const char *, Evas_Object *, void *), void *data)
{
- Eina_List *l;
- Eina_List *tmp;
- struct package_info *pi = NULL;
- Eina_List *install_list;
-
- install_list = evas_object_data_get(scroller, "install_list");
- EINA_LIST_FOREACH_SAFE(install_list, l, tmp, pi) {
- if (pi->ai.package && !strcmp(pi->ai.package, package)) {
- break;
- }
- pi = NULL;
+ ret_if(NULL == pkg_mgr_info.item_list);
+ ret_if(NULL == app_id);
+ ret_if(NULL == _affected_cb);
+
+ const Eina_List *l;
+ const Eina_List *ln;
+ pkgmgr_install_s *pi;
+ EINA_LIST_FOREACH_SAFE(pkg_mgr_info.item_list, l, ln, pi) {
+ continue_if(NULL == pi);
+ continue_if(NULL == pi->app_id);
+ continue_if(NULL == pi->item);
+
+ if (strcmp(app_id, pi->app_id)) continue;
+ /* It's possible that many items with the same package name are in the install list */
+ if (EINA_FALSE == _affected_cb(pi->app_id, pi->item, data)) break;
}
+}
- if (!pi) {
- int page_no = 0;
- _D("Package [%s] is starting update phase directly (without downloading phase)", package);
- pi = calloc(1, sizeof(struct package_info));
- retv_if(NULL == pi, MENU_SCREEN_ERROR_FAIL);
- pi->ai.package = strdup(package);
- pi->item = page_scroller_find_item_by_package(scroller, package, &page_no);
- if (pi->item) {
- pi->page = page_scroller_get_page_at(scroller, page_no);
- }
+HAPI inline menu_screen_error_e pkgmgr_uninstall(Evas_Object *item)
+{
+ char *pkgid = NULL;
+ char *appid = NULL;
+ pkgmgr_client *req_pc = NULL;
+ pkgmgrinfo_appinfo_h handle = NULL;
+ int ret = MENU_SCREEN_ERROR_OK;
- if (pi->item && pi->page) {
- pi->ai.nodisplay = false;
- pi->ai.enabled = true;
- }
+ retv_if(NULL == item, MENU_SCREEN_ERROR_FAIL);
- install_list = eina_list_append(install_list, pi);
- evas_object_data_set(scroller, "install_list", install_list);
- } else {
- if (pi->status != DOWNLOAD_END && pi->status != INSTALL_END) {
- _D("Package [%s] is in invalid state (%d), cancel this", package, pi->status);
- install_list = eina_list_remove(install_list, pi);
- evas_object_data_set(scroller, "install_list", install_list);
- if (pi->item) {
- page_unpack_item(pi->page, pi->item);
- page_scroller_trim_items(scroller);
- item_destroy(pi->item);
- }
-
- list_free_values(&pi->ai);
- free(pi);
- return MENU_SCREEN_ERROR_FAIL;
+ pkgid = item_get_pkgid(item);
+ retv_if(NULL == pkgid, MENU_SCREEN_ERROR_FAIL);
+
+ appid = item_get_package(item);
+ retv_if(NULL == appid, MENU_SCREEN_ERROR_FAIL);
+
+ req_pc = pkgmgr_client_new(PC_REQUEST);
+ retv_if(NULL == req_pc, MENU_SCREEN_ERROR_FAIL);
+
+ if (PMINFO_R_OK != pkgmgrinfo_appinfo_get_appinfo(appid, &handle)) {
+ if (PKGMGR_R_OK != pkgmgr_client_free(req_pc)) {
+ _E("cannot free pkgmgr_client for request.");
}
+ return MENU_SCREEN_ERROR_FAIL;
}
- pi->status = UPDATE_BEGIN;
- pi->ai.name = strdup("Update");
- if (pi->item) {
- item_set_name(pi->item, pi->ai.name, 0);
+ if (PMINFO_R_OK != pkgmgrinfo_appinfo_destroy_appinfo(handle)) {
+ _E("cannot destroy the appinfo");
+ ret = MENU_SCREEN_ERROR_FAIL;
}
- _D("Package [%s] is jump into the updating phase", package);
+ _D("Uninstall a package[%s] from an app[%s]", pkgid, appid);
+ if (pkgmgr_client_uninstall(req_pc, NULL, pkgid, PM_QUIET, NULL, NULL) < 0) {
+ _E("cannot uninstall %s.", item_get_package(item));
+ ret = MENU_SCREEN_ERROR_FAIL;
+ }
- return MENU_SCREEN_ERROR_OK;
+ if (PMINFO_R_OK != pkgmgr_client_free(req_pc)) {
+ _E("cannot free pkgmgr_client");
+ ret = MENU_SCREEN_ERROR_FAIL;
+ }
+
+ return ret;
}
-static menu_screen_error_e _start_recover(const char *package, void *scroller)
+static menu_screen_error_e _start_download(const char *package, void *scroller)
{
+ _D("Start downloading for the package(%s)", package);
return MENU_SCREEN_ERROR_OK;
}
-static menu_screen_error_e _start_install(const char *package, void *scroller)
+static menu_screen_error_e _start_uninstall(const char *package, void *scroller)
{
- Eina_List *l;
- Eina_List *tmp;
- struct package_info *pi = NULL;
- Eina_List *install_list;
-
- install_list = evas_object_data_get(scroller, "install_list");
- EINA_LIST_FOREACH_SAFE(install_list, l, tmp, pi) {
- if (pi->ai.package && !strcmp(pi->ai.package, package)) {
- break;
- }
- pi = NULL;
- }
+ _D("Start uninstalling for the package(%s)", package);
+ return MENU_SCREEN_ERROR_OK;
+}
- if (!pi) {
- int page_no = 0;
- _D("Package [%s] is starting install phase directly (without downloading phase)", package);
- pi = calloc(1, sizeof(struct package_info));
- retv_if(NULL == pi, MENU_SCREEN_ERROR_FAIL);
- pi->ai.package = strdup(package);
- if (!pi->ai.package) {
- free(pi);
- return MENU_SCREEN_ERROR_FAIL;
- }
- pi->ai.icon = strdup(DEFAULT_ICON);
- if (!pi->ai.icon) {
- free(pi->ai.package);
- free(pi);
- return MENU_SCREEN_ERROR_FAIL;
- }
+static menu_screen_error_e _start_update(const char *package, void *scroller)
+{
+ _D("Start updating for the package(%s)", package);
+ return MENU_SCREEN_ERROR_OK;
+}
- pi->item = page_scroller_find_item_by_package(scroller, package, &page_no);
- if (!pi->item) {
- if (NULL == page_scroller_push_item(scroller, &pi->ai)) _E("Cannot push an item");
- }
- pi->item = page_scroller_find_item_by_package(scroller, package, &page_no);
- pi->page = page_scroller_get_page_at(scroller, page_no);
- if (pi->item && pi->page) {
- pi->ai.nodisplay = false;
- pi->ai.enabled = true;
- }
- install_list = eina_list_append(install_list, pi);
- evas_object_data_set(scroller, "install_list", install_list);
- } else {
- if (pi->status != DOWNLOAD_END && pi->status != INSTALL_END) {
- _D("Package [%s] is in invalid state (%d), cancel this", package, pi->status);
- install_list = eina_list_remove(install_list, pi);
- evas_object_data_set(scroller, "install_list", install_list);
- if (pi->item) {
- page_unpack_item(pi->page, pi->item);
- page_scroller_trim_items(scroller);
- item_destroy(pi->item);
- }
-
- list_free_values(&pi->ai);
- free(pi);
- return MENU_SCREEN_ERROR_FAIL;
- }
- }
+static menu_screen_error_e _start_recover(const char *package, void *scroller)
+{
+ _D("Start recovering for the package(%s)", package);
+ return MENU_SCREEN_ERROR_OK;
+}
- pi->status = INSTALL_BEGIN;
- pi->ai.name = strdup("Install");
- if (pi->item) {
- // Update app name to install
- item_set_name(pi->item, pi->ai.name, 0);
- }
- _D("Package [%s] is jump into the installing phase", package);
+
+static menu_screen_error_e _start_install(const char *package, void *scroller)
+{
+ _D("Start installing for the package(%s)", package);
return MENU_SCREEN_ERROR_OK;
}
},
};
- register unsigned int i;
-
- _D("package [%s]", package);
+ _D("package [%s], val [%s]", package, val);
+ retv_if(_exist_request_in_list(package), MENU_SCREEN_ERROR_FAIL);
+ retv_if(MENU_SCREEN_ERROR_OK != _append_request_in_list(package, val), MENU_SCREEN_ERROR_FAIL);
+ register unsigned int i;
for (i = 0; start_cb[i].name; i ++) {
- if (!strcasecmp(val, start_cb[i].name) && start_cb[i].handler) {
- return start_cb[i].handler(package, scroller);
- }
+ if (strcasecmp(val, start_cb[i].name)) continue;
+ break_if(NULL == start_cb[i].handler);
+ return start_cb[i].handler(package, scroller);
}
- _D("Unknown status for starting phase signal'd from package manager");
-
+ _E("Unknown status for starting phase signal'd from package manager");
return MENU_SCREEN_ERROR_OK;
}
static menu_screen_error_e _icon_path(const char *package, const char *val, void *scroller)
{
- Eina_List *l;
- Eina_List *tmp;
- struct package_info *pi = NULL;
- Eina_List *install_list;
-
- install_list = evas_object_data_get(scroller, "install_list");
- retv_if(!package, MENU_SCREEN_ERROR_FAIL);
- retv_if(!val, MENU_SCREEN_ERROR_FAIL);
-
- _D("package [%s] with %s", package, val);
-
- EINA_LIST_FOREACH_SAFE(install_list, l, tmp, pi) {
- if (pi->ai.package && !strcmp(pi->ai.package, package)) {
- break;
- }
- pi = NULL;
- }
- retv_if(NULL == pi, MENU_SCREEN_ERROR_FAIL);
-
- if (strlen(val)) {
- pi->ai.icon = strdup(val);
- retv_if (NULL == pi->ai.icon, MENU_SCREEN_ERROR_OUT_OF_MEMORY);
-
- if (!pi->item) {
- _D("There is no item for [%s]", package);
- pi->ai.nodisplay = false;
- pi->ai.enabled = true;
-
- if (NULL == page_scroller_push_item(scroller, &pi->ai)) {
- _E("Failed to create a new item, remove this package from the installing list");
- list_free_values(&pi->ai);
- install_list = eina_list_remove(install_list, pi);
- evas_object_data_set(scroller, "install_list", install_list);
- free(pi);
- }
- } else {
- _D("There is an item for [%s:%p]", package, pi->item);
- item_update(pi->item, &pi->ai);
- }
- }
-
+ _D("package(%s) with %s", package, val);
return MENU_SCREEN_ERROR_OK;
}
static menu_screen_error_e _download_percent(const char *package, const char *val, void *scroller)
{
- Eina_List *l;
- Eina_List *tmp;
- struct package_info *pi = NULL;
- Eina_List *install_list;
-
- _D("package [%s] with %s", package, val);
-
- install_list = evas_object_data_get(scroller, "install_list");
- EINA_LIST_FOREACH_SAFE(install_list, l, tmp, pi) {
- if (pi->ai.package && !strcmp(pi->ai.package, package)) {
- break;
- }
- pi = NULL;
- }
-
- retv_if(NULL == pi, MENU_SCREEN_ERROR_FAIL);
-
- if (pi->status == DOWNLOAD_BEGIN) {
- pi->status = DOWNLOADING;
- } else if (pi->status == DOWNLOADING) {
- // Do nothing, just we are in proper state
- } else {
- _D("Invalid state for %s, This is not started from the download_begin state(%s)", package, val);
- }
-
- if (!pi->ai.nodisplay && pi->ai.enabled && pi->item) {
- if (!item_is_enabled_progress(pi->item)) {
- item_enable_progress(pi->item);
- }
-
- item_update_progress(pi->item, atoi(val));
- }
-
+ _D("package(%s) with %s", package, val);
return MENU_SCREEN_ERROR_OK;
}
static menu_screen_error_e _install_percent(const char *package, const char *val, void *scroller)
{
- Eina_List *l;
- Eina_List *tmp;
- struct package_info *pi;
- int progress;
- Eina_List *install_list;
-
- _D("package [%s] with %s", package, val);
-
- pi = NULL;
- install_list = evas_object_data_get(scroller, "install_list");
- EINA_LIST_FOREACH_SAFE(install_list, l, tmp, pi) {
- if (pi->ai.package && !strcmp(pi->ai.package, package)) {
- break;
- }
-
- pi = NULL;
- }
-
- retv_if(NULL == pi, MENU_SCREEN_ERROR_FAIL);
-
- progress = atoi(val);
-
- if (pi->status == INSTALL_BEGIN) {
- pi->status = INSTALLING;
- } else if (pi->status == UNINSTALL_BEGIN) {
- progress = 100 - progress;
- pi->status = UNINSTALLING;
- } else if (pi->status == UPDATE_BEGIN) {
- pi->status = UPDATING;
- } else if (pi->status == INSTALLING) {
- } else if (pi->status == UNINSTALLING) {
- progress = 100 - progress;
- } else if (pi->status == UPDATING) {
- } else {
- _D("Invalid state for %s, This is not the uninstall or install_begin state(%s)", package, val);
- }
-
- if (!pi->ai.nodisplay && pi->ai.enabled && pi->item) {
- if (!item_is_enabled_progress(pi->item)) {
- item_enable_progress(pi->item);
- }
-
- item_update_progress(pi->item, progress);
- }
-
+ _D("package(%s) with %s", package, val);
+ if (_exist_request_in_list(package)) return MENU_SCREEN_ERROR_OK;
+ retv_if(MENU_SCREEN_ERROR_OK != _append_request_in_list(package, "install"), MENU_SCREEN_ERROR_FAIL);
return MENU_SCREEN_ERROR_OK;
}
static menu_screen_error_e _error(const char *package, const char *val, void *scroller)
{
- struct package_info *pi = NULL;
- Eina_List *l;
- Eina_List *tmp;
- Eina_List *install_list;
-
- _D("package [%s] with %s", package, val);
-
- install_list = evas_object_data_get(scroller, "install_list");
- EINA_LIST_FOREACH_SAFE(install_list, l, tmp, pi) {
- if (pi->ai.package && !strcmp(pi->ai.package, package)) {
- break;
- }
-
- pi = NULL;
- }
-
- retv_if(NULL == pi, MENU_SCREEN_ERROR_FAIL);
-
- pi->error_count ++;
+ _D("package(%s) with %s", package, val);
return MENU_SCREEN_ERROR_OK;
}
-static menu_screen_error_e _end_downloading(const char *package, struct package_info *pi, void *scroller)
+static int _end_cb(pkgmgrinfo_appinfo_h handle, void *user_data)
{
- pi->status = DOWNLOAD_END;
- _D("Package downloading is complete, waiting install progress");
- return MENU_SCREEN_ERROR_OK;
-}
+ retv_if(NULL == handle, -1);
+ retv_if(NULL == user_data, -1);
+ char *appid = NULL;
+ pkgmgrinfo_appinfo_get_appid(handle, &appid);
+ Evas_Object *layout = evas_object_data_get(menu_screen_get_win(), "layout");
+ retv_if(NULL == layout, MENU_SCREEN_ERROR_FAIL);
-static menu_screen_error_e _end_installing(const char *package, struct package_info *pi, void *scroller)
-{
- // This status will not be referenced from the others.
- // because it will be freed right after set it. ;)
- Eina_List *install_list;
-
- pi->status = INSTALL_END;
- _D("Package installing is complete");
-
- install_list = evas_object_data_get(scroller, "install_list");
- if (pi->desktop_file_found == 1) {
- install_list = eina_list_remove(install_list, pi);
- evas_object_data_set(scroller, "install_list", install_list);
- list_free_values(&pi->ai);
- free(pi);
+ pkgmgr_request_s *rt = user_data;
+ if (!strcmp(rt->status, "install")) {
+ layout_create_package(layout, appid);
+ } else if (!strcmp(rt->status, "update")) {
+ layout_update_package(layout, appid);
+ } else {
+ _E("No routines for this status (%s:%s)", rt->package, rt->status);
}
-
- // TODO: Need to register a timer callback
- return MENU_SCREEN_ERROR_OK;
+ return 0;
}
-static menu_screen_error_e _end_updating(const char *package, struct package_info *pi, void *scroller)
+static Eina_Bool _uninstall_cb(const char *app_id, Evas_Object *item, void *data)
{
- // This status will not be referenced from the others.
- // because it will be freed right after set it. ;)
- Eina_List *install_list;
-
- pi->status = UPDATE_END;
- _D("Package updating is complete");
-
- install_list = evas_object_data_get(scroller, "install_list");
- if (pi->desktop_file_found == 1) {
- install_list = eina_list_remove(install_list, pi);
- evas_object_data_set(scroller, "install_list", install_list);
- list_free_values(&pi->ai);
- free(pi);
- }
+ retv_if(NULL == data, EINA_FALSE);
+ Evas_Object *layout = data;
+ layout_delete_package(layout, app_id);
- // TODO: Need to register a timer callback
- return MENU_SCREEN_ERROR_OK;
+ return EINA_TRUE;
}
-static menu_screen_error_e _end_uninstalling(const char *package, struct package_info *pi, void *scroller)
+static Eina_Bool _set_removable_cb(const char *app_id, Evas_Object *item, void *data)
{
- Eina_List *install_list;
+ retv_if(NULL == item, EINA_FALSE);
- pi->status = UNINSTALL_END;
- _D("Package uninstalling is complete");
+ item_set_removable(item, 1, 0);
+ elm_object_signal_emit(item, "uninstall,on", "menu");
- install_list = evas_object_data_get(scroller, "install_list");
- if (pi->desktop_file_found == 1) {
- install_list = eina_list_remove(install_list, pi);
- evas_object_data_set(scroller, "install_list", install_list);
- list_free_values(&pi->ai);
- free(pi);
- }
-
- return MENU_SCREEN_ERROR_OK;
+ return EINA_TRUE;
}
-static menu_screen_error_e _end_unknown(const char *package, struct package_info *pi, void *scroller)
+static menu_screen_error_e _end(const char *package, const char *val, void *data)
{
- Eina_List *install_list;
-
- install_list = evas_object_data_get(scroller, "install_list");
- install_list = eina_list_remove(install_list, pi);
- evas_object_data_set(scroller, "install_list", install_list);
-
- if (pi->item) {
- // Remove an item only if it is installing.
- if (
- pi->status == INSTALL_BEGIN || pi->status == INSTALLING || pi->status == INSTALL_END ||
- pi->status == DOWNLOAD_BEGIN || pi->status == DOWNLOADING || pi->status == DOWNLOAD_END
- )
- {
- if (pi->page) {
- page_unpack_item(pi->page, pi->item);
- page_scroller_trim_items(scroller);
- } else {
- _D("Page is not valid (%s)", package);
- }
- item_destroy(pi->item);
- page_scroller_trim_items(scroller);
- }
- }
+ pkgmgrinfo_pkginfo_h handle = NULL;
- list_free_values(&pi->ai);
- free(pi);
-
- return MENU_SCREEN_ERROR_OK;
-}
+ retv_if(!_exist_request_in_list(package), MENU_SCREEN_ERROR_FAIL);
+ pkgmgr_request_s *rt = _get_request_in_list(package);
+ retv_if(NULL == rt, MENU_SCREEN_ERROR_FAIL);
+ if(strcasecmp(val, "ok")) {
+ pkgmgr_item_list_affect_pkgid(package, _set_removable_cb, NULL);
+ _E("cannot end that package(%s) is %s", rt->package, rt->status);
+ goto ERROR;
+ }
-static menu_screen_error_e _end(const char *package, const char *val, void *scroller)
-{
- Eina_List *l;
- Eina_List *tmp;
- struct package_info *pi;
- register int i;
- struct end_cb_set {
- int status;
- int (*handler)(const char *package, struct package_info *pi, void *scroller);
- } end_cb[] = {
- {
- .status = DOWNLOADING,
- .handler = _end_downloading,
- },
- {
- .status = INSTALLING,
- .handler = _end_installing,
- },
- {
- .status = UNINSTALLING,
- .handler = _end_uninstalling,
- },
- {
- .status = UPDATING,
- .handler = _end_updating,
- },
- {
- .status = UNKNOWN,
- .handler = _end_unknown,
- },
- {
- .status = MAX_STATUS,
- .handler = NULL,
- },
- };
- Eina_List *install_list;
+ _D("Package(%s) : key(%s) - val(%s)", package, rt->status, val);
- _D("package [%s], val [%s]", package, val);
+ /* Criteria : pkgid */
+ if (!strcasecmp("uninstall", rt->status)) {
+ Evas_Object *layout = evas_object_data_get(menu_screen_get_win(), "layout");
+ goto_if(NULL == layout, ERROR);
- pi = NULL;
- install_list = evas_object_data_get(scroller, "install_list");
- EINA_LIST_FOREACH_SAFE(install_list, l, tmp, pi) {
- if (pi->ai.package && !strcmp(pi->ai.package, package)) {
- break;
- }
- pi = NULL;
+ pkgmgr_item_list_affect_pkgid(package, _uninstall_cb, layout);
+ goto OUT;
}
- retv_if(NULL == pi, MENU_SCREEN_ERROR_FAIL);
-
- list_free_values(&pi->ai);
- if (MENU_SCREEN_ERROR_OK != list_get_values(package, &pi->ai)) _E("Cannot get values");
- item_update(pi->item, &pi->ai);
+ goto_if(PMINFO_R_OK != pkgmgrinfo_pkginfo_get_pkginfo(package, &handle), ERROR);
- if (item_is_enabled_progress(pi->item)) {
- item_disable_progress(pi->item);
+ /* Criteria : appid */
+ if (PMINFO_R_OK != pkgmgrinfo_appinfo_get_list(handle, PMINFO_UI_APP, _end_cb, rt)) {
+ goto ERROR;
}
- // NOTE: Don't release the 'pi'
- // Release it from each handler
- for (i = 0; end_cb[i].handler; i ++) {
- if (end_cb[i].status == pi->status && end_cb[i].handler) {
- int ret;
+OUT:
+ if (MENU_SCREEN_ERROR_OK != _remove_request_in_list(package))
+ _E("cannot remove a request(%s:%s)", rt->package, rt->status);
+ if (handle) pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
- if (strcasecmp(val, "ok")) {
- ret = _end_unknown(package, pi, scroller);
- } else {
- ret = end_cb[i].handler(package, pi, scroller);
- }
+ return MENU_SCREEN_ERROR_OK;
- return ret;
- }
- }
+ERROR:
+ if (MENU_SCREEN_ERROR_OK != _remove_request_in_list(package))
+ _E("cannot remove a request(%s:%s)", rt->package, rt->status);
+ if (handle) pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
- return _end_unknown(package, pi, scroller);
+ return MENU_SCREEN_ERROR_FAIL;
}
static menu_screen_error_e _change_pkg_name(const char *package, const char *val, void *scroller)
{
- Eina_List *l;
- Eina_List *tmp;
- struct package_info *pi;
- Eina_List *install_list;
-
- _D("package [%s]", package);
-
- install_list = evas_object_data_get(scroller, "install_list");
- EINA_LIST_FOREACH_SAFE(install_list, l, tmp, pi) {
- if (!pi) {
- continue;
- }
- if (pi->ai.package && !strcmp(pi->ai.package, package)) {
- _D("Replace package name %s to %s", pi->ai.package, val);
- free(pi->ai.package);
- pi->ai.package = strdup(val);
- if (!pi->ai.package) {
- _E("cannot strdup");
- return MENU_SCREEN_ERROR_FAIL;
- }
- if (pi->item) {
- item_set_package(pi->item, (char*) val, 0);
- }
- return MENU_SCREEN_ERROR_OK;
- }
- }
-
- return MENU_SCREEN_ERROR_FAIL;
+ _D("package(%s) with %s", package, val);
+ return MENU_SCREEN_ERROR_OK;
}
static menu_screen_error_e _pkgmgr_cb(int req_id, const char *pkg_type, const char *package, const char *key, const char *val, const void *pmsg, void *data)
{
register unsigned int i;
- Evas_Object *scroller = data;
- _D("pkgmgr request [%s] for %s, val(%s)", key, package, val);
+ _D("pkgmgr request [%s:%s] for %s", key, val, package);
+
+ if (BOOTING_STATE_DONE > menu_screen_get_booting_state()) {
+ pkgmgr_reserve_list_push_request(package, key, val);
+ return MENU_SCREEN_ERROR_OK;
+ }
for (i = 0; i < sizeof(pkgmgr_cbs) / sizeof(struct pkgmgr_handler); i++) {
- if (!strcasecmp(pkgmgr_cbs[i].key, key)) {
- if (pkgmgr_cbs[i].func) {
- if (MENU_SCREEN_ERROR_OK != pkgmgr_cbs[i].func(package, val, scroller)) {
- _E("pkgmgr_cbs[%u].func has errors.", i);
- }
- } else {
- _E("Cannot find pkgmgr_cbs[%u].func.", i);
- }
- return MENU_SCREEN_ERROR_OK;
+ if (strcasecmp(pkgmgr_cbs[i].key, key)) continue;
+ break_if(!pkgmgr_cbs[i].func);
+
+ if (MENU_SCREEN_ERROR_OK != pkgmgr_cbs[i].func(package, val, NULL)) {
+ _E("pkgmgr_cbs[%u].func has errors.", i);
}
+
+ return MENU_SCREEN_ERROR_OK;
}
return MENU_SCREEN_ERROR_FAIL;
-HAPI menu_screen_error_e pkgmgr_init(Evas_Object *scroller)
+HAPI menu_screen_error_e pkgmgr_reserve_list_push_request(const char *package, const char *key, const char *val)
+{
+ retv_if(NULL == package, MENU_SCREEN_ERROR_INVALID_PARAMETER);
+ retv_if(NULL == key, MENU_SCREEN_ERROR_INVALID_PARAMETER);
+ retv_if(NULL == val, MENU_SCREEN_ERROR_INVALID_PARAMETER);
+
+ char *tmp_package = NULL;
+ char *tmp_key = NULL;
+ char *tmp_val = NULL;
+
+ pkgmgr_reserve_s *pr = calloc(1, sizeof(pkgmgr_reserve_s));
+ retv_if(NULL == pr, MENU_SCREEN_ERROR_FAIL);
+
+ tmp_package = strdup(package);
+ goto_if(NULL == tmp_package, ERROR);
+ pr->package = tmp_package;
+
+ tmp_key = strdup(key);
+ goto_if(NULL == tmp_key, ERROR);
+ pr->key = tmp_key;
+
+ tmp_val = strdup(val);
+ goto_if(NULL == tmp_val, ERROR);
+ pr->val = tmp_val;
+
+ pkg_mgr_info.reserve_list = eina_list_append(pkg_mgr_info.reserve_list, pr);
+ goto_if(NULL == pkg_mgr_info.reserve_list, ERROR);
+
+ return MENU_SCREEN_ERROR_OK;
+
+ERROR:
+ if (tmp_val) free(tmp_val);
+ if (tmp_key) free(tmp_key);
+ if (tmp_package) free(tmp_package);
+ free(pr);
+
+ return MENU_SCREEN_ERROR_FAIL;
+}
+
+
+
+HAPI menu_screen_error_e pkgmgr_reserve_list_pop_request(void)
+{
+ if (!pkg_mgr_info.reserve_list) return MENU_SCREEN_ERROR_NO_DATA;
+
+ pkgmgr_reserve_s *pr = eina_list_nth(pkg_mgr_info.reserve_list, 0);
+ if (!pr) return MENU_SCREEN_ERROR_NO_DATA;
+ pkg_mgr_info.reserve_list = eina_list_remove(pkg_mgr_info.reserve_list, pr);
+
+ goto_if(MENU_SCREEN_ERROR_OK != _pkgmgr_cb(0, NULL, pr->package, pr->key, pr->val, NULL, NULL), ERROR);
+
+ if (pr->package) free(pr->package);
+ if (pr->key) free(pr->key);
+ if (pr->val) free(pr->val);
+ free(pr);
+
+ return MENU_SCREEN_ERROR_OK;
+
+ERROR:
+ if (pr->package) free(pr->package);
+ if (pr->key) free(pr->key);
+ if (pr->val) free(pr->val);
+ free(pr);
+
+ return MENU_SCREEN_ERROR_FAIL;
+}
+
+
+
+HAPI menu_screen_error_e pkgmgr_init(void)
{
if (NULL != pkg_mgr_info.listen_pc) {
return MENU_SCREEN_ERROR_OK;
pkg_mgr_info.listen_pc = pkgmgr_client_new(PC_LISTENING);
retv_if(NULL == pkg_mgr_info.listen_pc, MENU_SCREEN_ERROR_FAIL);
retv_if(pkgmgr_client_listen_status(pkg_mgr_info.listen_pc,
- _pkgmgr_cb, scroller) != PKGMGR_R_OK, MENU_SCREEN_ERROR_FAIL);
+ _pkgmgr_cb, NULL) != PKGMGR_R_OK, MENU_SCREEN_ERROR_FAIL);
return MENU_SCREEN_ERROR_OK;
}
-HAPI Evas_Object *pkgmgr_find_pended_object(const char *package, int with_desktop_file, Evas_Object *scroller, Evas_Object **page)
-{
- Eina_List *l;
- Eina_List *tmp;
- struct package_info *pi;
- Eina_List *install_list;
-
- _D("package [%s]", package);
-
- retv_if(NULL == package, NULL);
- install_list = evas_object_data_get(scroller, "install_list");
- EINA_LIST_FOREACH_SAFE(install_list, l, tmp, pi) {
- if (!pi) {
- continue;
- }
- if (pi->ai.package && !strcmp(pi->ai.package, package)) {
- Evas_Object *item;
- _D("Installing(Downloading) package is found (%p)", pi->item);
-
- item = pi->item;
-
- if (with_desktop_file) {
- pi->desktop_file_found = 1;
-
- if (pi->status == INSTALL_END || pi->status == UNINSTALL_END || pi->status == UPDATE_END) {
- install_list = eina_list_remove(install_list, pi);
- evas_object_data_set(scroller, "install_list", install_list);
- list_free_values(&pi->ai);
- free(pi);
- pi = NULL;
- }
- }
-
- if (page) {
- *page = pi ? pi->page : NULL;
- }
- return item;
- }
- }
-
- _D("Failed to find a installing/downloading package");
- return NULL;
-}
-
-
-
// End of a file
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+
+ * 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.
+ *
+ */
#include <Elementary.h>
Evas_Object *item;
item = evas_object_data_del(popup, "item");
+ ret_if(!item);
evas_object_del(evas_object_data_del(popup, "button1"));
evas_object_del(evas_object_data_del(popup, "button2"));
Evas_Object *btn2;
char warning[BUFSZE];
+ ret_if(!item);
+
popup_destroy_all();
popup = elm_popup_add(parent);
- /*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.1 (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.
- */
-
-
+/*
+ * MENU-SCREEN
+ *
+ * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Contact: Jin Yoon <jinny.yoon@samsung.com>
+ * Junkyu Han <junkyu.han@samsung.com>
+
+ * 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.
+ *
+ */
#include <Evas.h>