--- /dev/null
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(boot-animation C)
+
+SET(SRCS
+ src/boot-animation.c
+ src/animation.c
+)
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(pkgs REQUIRED
+ elementary
+ avsystem
+ audio-session-mgr
+ utilX
+ vconf
+ ecore-x
+ evas
+ ecore-evas
+ edje
+ x11
+)
+
+FOREACH(flag ${pkgs_CFLAGS})
+ SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
+
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
+ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
+
+ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
+
+ADD_CUSTOM_COMMAND(OUTPUT poweroff.edj
+ COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/data/image
+ ${CMAKE_SOURCE_DIR}/data/poweroff.edc ${CMAKE_BINARY_DIR}/poweroff.edj
+ DEPENDS ${CMAKE_SOURCE_DIR}/data/poweroff.edc
+ ${CMAKE_SOURCE_DIR}/data/poweroff_image.h
+ ${CMAKE_SOURCE_DIR}/data/poweroff_part.h
+)
+ADD_CUSTOM_COMMAND(OUTPUT poweron.edj
+ COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/data/image
+ ${CMAKE_SOURCE_DIR}/data/poweron.edc ${CMAKE_BINARY_DIR}/poweron.edj
+ DEPENDS ${CMAKE_SOURCE_DIR}/data/poweron.edc
+ ${CMAKE_SOURCE_DIR}/data/poweron_image.h
+ ${CMAKE_SOURCE_DIR}/data/poweron_part.h
+)
+ADD_CUSTOM_TARGET(edj_build DEPENDS poweron.edj poweroff.edj)
+ADD_DEPENDENCIES(${PROJECT_NAME} edj_build)
+
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION bin)
+INSTALL(FILES ${CMAKE_BINARY_DIR}/poweron.edj DESTINATION share/edje)
+INSTALL(FILES ${CMAKE_BINARY_DIR}/poweroff.edj DESTINATION share/edje)
+
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/boot-ani DESTINATION /etc/init.d
+ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
+ GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
+
--- /dev/null
+INCLUDES=include
+SRC+=test.c
+SRC+=src/wav_parser.c
+CFLAGS+=-D_DEBUG
+CFLAGS+=-I${INCLUDES}
+all: test.c src/wav_parser.c
+ @gcc ${CFLAGS} ${SRC} `pkg-config avsysaudio --cflags --libs` -o test
--- /dev/null
+Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
\ No newline at end of file
--- /dev/null
+#!/bin/sh
+
+i=0
+while [ ! -f /tmp/.X0-lock ];
+do
+ let i++
+ echo -ne "Waiting X $i\r"
+ sleep 0.1
+done
+
+j=0
+while [ ! -f /tmp/.wm_ready ];
+do
+ let j++
+ echo -ne "Waiting wm_ready $j\r"
+ sleep 0.1
+done
+
+if [ ! -e /tmp/restart ]; then
+ if [ -x /usr/bin/boot-animation ]; then
+ /usr/bin/boot-animation --start &
+ sleep 1
+ fi
+fi
--- /dev/null
+#!/bin/sh
+
+case "$1" in
+ poweron)
+ IMG_H=$1_image.h
+ PART_H=$1_part.h
+ ;;
+ poweroff)
+ IMG_H=$1_image.h
+ PART_H=$1_part.h
+ ;;
+ *)
+ echo "usage) $0 {poweron|poweroff}"
+ echo " ex) # $0 poweron"
+ exit 1
+ ;;
+esac
+
+if [ -e $IMG_H ]; then
+ mv $IMG_H $IMG_H.old
+fi
+touch $IMG_H
+
+if [ -e $PART_H ]; then
+ mv $PART_H $PART_H.old
+fi
+touch part.$$
+
+LASTIMG=
+
+cd image
+
+for file in ./$1/*.png; do
+ echo "image: \"$file\" LOSSY 85;" >> ../$IMG_H
+ echo "tween: \"$file\";" >> ../part.$$
+ LASTIMG=$file
+done
+
+cd ..
+
+echo "normal: \"$LASTIMG\";" > $PART_H
+cat part.$$ >> $PART_H
+rm part.$$
+
--- /dev/null
+/*
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * This file is part of <boot-animation>
+ * Written by <Seungtaek Chung> <seungtaek.chung@samsung.com>, <Mi-Ju Lee> <miju52.lee@samsung.com>, <Xi Zhichan> <zhichan.xi@samsung.com>
+ *
+ * PROPRIETARY/CONFIDENTIAL
+ *
+ * This software is the confidential and proprietary information of SAMSUNG ELECTRONICS ("Confidential Information").
+ * You shall not disclose such Confidential Information and shall use it only in accordance
+ * with the terms of the license agreement you entered into with SAMSUNG ELECTRONICS.
+ * SAMSUNG make no representations or warranties about the suitability of the software,
+ * either express or implied, including but not limited to the implied warranties of merchantability,
+ * fitness for a particular purpose, or non-infringement.
+ * SAMSUNG shall not be liable for any damages suffered by licensee as a result of using,
+ * modifying or distributing this software or its derivatives.
+ *
+ */
+
+images {
+#include "poweroff_image.h"
+}
+
+collections {
+ group { name: "poweroff";
+
+ parts {
+ part { name: "poweroff";
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ image {
+#include "poweroff_part.h"
+ }
+ visible: 1;
+ }
+ }
+ }
+
+ programs {
+ program {
+ name: "poweroff";
+ signal: "show";
+ action: STATE_SET "default" 0.0;
+ target: "poweroff";
+ transition: LINEAR 2;
+ after: "poweroff_end";
+ }
+
+ program {
+ name: "poweroff_end";
+ action: SIGNAL_EMIT "end" "animation";
+ }
+ }
+ }
+}
+
--- /dev/null
+/*
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * This file is part of <boot-animation>
+ * Written by <Seungtaek Chung> <seungtaek.chung@samsung.com>, <Mi-Ju Lee> <miju52.lee@samsung.com>, <Xi Zhichan> <zhichan.xi@samsung.com>
+ *
+ * PROPRIETARY/CONFIDENTIAL
+ *
+ * This software is the confidential and proprietary information of SAMSUNG ELECTRONICS ("Confidential Information").
+ * You shall not disclose such Confidential Information and shall use it only in accordance
+ * with the terms of the license agreement you entered into with SAMSUNG ELECTRONICS.
+ * SAMSUNG make no representations or warranties about the suitability of the software,
+ * either express or implied, including but not limited to the implied warranties of merchantability,
+ * fitness for a particular purpose, or non-infringement.
+ * SAMSUNG shall not be liable for any damages suffered by licensee as a result of using,
+ * modifying or distributing this software or its derivatives.
+ *
+ */
+
+ image:"HD/power_off_720_1280/power_off_720_1280__00000.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00001.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00002.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00003.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00004.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00005.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00006.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00007.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00008.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00009.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00010.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00011.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00012.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00013.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00014.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00015.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00016.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00017.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00018.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00019.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00020.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00021.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00022.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00023.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00024.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00025.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00026.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00027.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00028.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00029.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00030.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00031.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00032.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00033.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00034.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00035.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00036.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00037.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00038.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00039.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00040.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00041.png" LOSSY 85;
+ image:"HD/power_off_720_1280/power_off_720_1280__00042.png" LOSSY 85;
+
--- /dev/null
+/*
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * This file is part of <boot-animation>
+ * Written by <Seungtaek Chung> <seungtaek.chung@samsung.com>, <Mi-Ju Lee> <miju52.lee@samsung.com>, <Xi Zhichan> <zhichan.xi@samsung.com>
+ *
+ * PROPRIETARY/CONFIDENTIAL
+ *
+ * This software is the confidential and proprietary information of SAMSUNG ELECTRONICS ("Confidential Information").
+ * You shall not disclose such Confidential Information and shall use it only in accordance
+ * with the terms of the license agreement you entered into with SAMSUNG ELECTRONICS.
+ * SAMSUNG make no representations or warranties about the suitability of the software,
+ * either express or implied, including but not limited to the implied warranties of merchantability,
+ * fitness for a particular purpose, or non-infringement.
+ * SAMSUNG shall not be liable for any damages suffered by licensee as a result of using,
+ * modifying or distributing this software or its derivatives.
+ *
+ */
+
+ normal:"HD/power_off_720_1280/power_off_720_1280__00042.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00000.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00001.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00002.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00003.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00004.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00005.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00006.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00007.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00008.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00009.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00010.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00011.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00012.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00013.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00014.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00015.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00016.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00017.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00018.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00019.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00020.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00021.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00022.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00023.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00024.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00025.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00026.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00027.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00028.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00029.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00030.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00031.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00032.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00033.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00034.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00035.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00036.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00037.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00038.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00039.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00040.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00041.png";
+ tween:"HD/power_off_720_1280/power_off_720_1280__00042.png";
--- /dev/null
+/*
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * This file is part of <boot-animation>
+ * Written by <Seungtaek Chung> <seungtaek.chung@samsung.com>, <Mi-Ju Lee> <miju52.lee@samsung.com>, <Xi Zhichan> <zhichan.xi@samsung.com>
+ *
+ * PROPRIETARY/CONFIDENTIAL
+ *
+ * This software is the confidential and proprietary information of SAMSUNG ELECTRONICS ("Confidential Information").
+ * You shall not disclose such Confidential Information and shall use it only in accordance
+ * with the terms of the license agreement you entered into with SAMSUNG ELECTRONICS.
+ * SAMSUNG make no representations or warranties about the suitability of the software,
+ * either express or implied, including but not limited to the implied warranties of merchantability,
+ * fitness for a particular purpose, or non-infringement.
+ * SAMSUNG shall not be liable for any damages suffered by licensee as a result of using,
+ * modifying or distributing this software or its derivatives.
+ *
+ */
+
+images {
+#include "poweron_image.h"
+}
+
+collections {
+ group {
+ name: "poweron";
+
+ parts {
+ part {
+ name: "poweron";
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ image {
+#include "poweron_part.h"
+ }
+ visible: 1;
+ }
+ }
+ }
+
+ programs {
+ program {
+ name: "poweron";
+ signal: "show";
+ action: STATE_SET "default" 0.0;
+ target: "poweron";
+ transition: LINEAR 4;
+ after: "poweron_end";
+ }
+ program {
+ name: "poweron_end";
+ action: SIGNAL_EMIT "end" "animation";
+ }
+ }
+ }
+}
+
--- /dev/null
+/*
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * This file is part of <boot-animation>
+ * Written by <Seungtaek Chung> <seungtaek.chung@samsung.com>, <Mi-Ju Lee> <miju52.lee@samsung.com>, <Xi Zhichan> <zhichan.xi@samsung.com>
+ *
+ * PROPRIETARY/CONFIDENTIAL
+ *
+ * This software is the confidential and proprietary information of SAMSUNG ELECTRONICS ("Confidential Information").
+ * You shall not disclose such Confidential Information and shall use it only in accordance
+ * with the terms of the license agreement you entered into with SAMSUNG ELECTRONICS.
+ * SAMSUNG make no representations or warranties about the suitability of the software,
+ * either express or implied, including but not limited to the implied warranties of merchantability,
+ * fitness for a particular purpose, or non-infringement.
+ * SAMSUNG shall not be liable for any damages suffered by licensee as a result of using,
+ * modifying or distributing this software or its derivatives.
+ *
+ */
+
+ image:"HD/power_on_720_1280/power_on_720_1280__00000.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00001.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00002.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00003.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00004.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00005.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00006.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00007.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00008.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00009.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00010.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00011.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00012.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00013.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00014.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00015.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00016.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00017.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00018.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00019.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00020.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00021.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00022.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00023.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00024.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00025.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00026.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00027.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00028.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00029.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00030.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00031.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00032.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00033.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00034.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00035.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00036.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00037.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00038.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00039.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00040.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00041.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00042.png" LOSSY 85;
+ image:"HD/power_on_720_1280/power_on_720_1280__00043.png" LOSSY 85;
+
--- /dev/null
+/*
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * This file is part of <boot-animation>
+ * Written by <Seungtaek Chung> <seungtaek.chung@samsung.com>, <Mi-Ju Lee> <miju52.lee@samsung.com>, <Xi Zhichan> <zhichan.xi@samsung.com>
+ *
+ * PROPRIETARY/CONFIDENTIAL
+ *
+ * This software is the confidential and proprietary information of SAMSUNG ELECTRONICS ("Confidential Information").
+ * You shall not disclose such Confidential Information and shall use it only in accordance
+ * with the terms of the license agreement you entered into with SAMSUNG ELECTRONICS.
+ * SAMSUNG make no representations or warranties about the suitability of the software,
+ * either express or implied, including but not limited to the implied warranties of merchantability,
+ * fitness for a particular purpose, or non-infringement.
+ * SAMSUNG shall not be liable for any damages suffered by licensee as a result of using,
+ * modifying or distributing this software or its derivatives.
+ *
+ */
+
+ normal:"HD/power_on_720_1280/power_on_720_1280__00000.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00000.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00001.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00002.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00003.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00004.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00005.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00006.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00007.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00008.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00009.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00010.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00011.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00012.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00013.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00014.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00015.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00016.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00017.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00018.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00019.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00020.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00021.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00022.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00023.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00024.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00025.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00026.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00027.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00028.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00029.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00030.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00031.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00032.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00033.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00034.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00035.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00036.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00037.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00038.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00039.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00040.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00041.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00042.png";
+ tween:"HD/power_on_720_1280/power_on_720_1280__00043.png";
+
\ No newline at end of file
--- /dev/null
+@PREFIX@/bin/*
+@PREFIX@/share/*
+/etc/init.d/*
--- /dev/null
+#!/bin/sh
+
+ln -s /etc/init.d/boot-ani /etc/rc.d/rc3.d/S41boot-ani
+
+vconftool $GOPTION -i set -t string memory/boot-animation/restart start:start
+
+sync
--- /dev/null
+boot-animation (0.3.0-1) unstable; urgency=low
+
+ * update spec file
+ * Git: pkgs/b/boot-animation
+ * Tag: boot-animation_0.3.0-1
+
+ -- Seungtaek Chung <seungtaek.chung@samsung.com> Tue, 20 Mar 2012 21:05:55 +0900
+
+boot-animation (0.2-33) unstable; urgency=low
+
+ * change tizen booting animation.
+ * Git: pkgs/b/boot-animation
+ * Tag: boot-animation_0.2-33
+
+ -- Seungtaek Chung <seungtaek.chung@samsung.com> Thu, 15 Mar 2012 11:03:06 +0900
+
+boot-animation (0.2-32) unstable; urgency=low
+
+ * fix booting animation loading
+ * Git: pkgs/b/boot-animation
+ * Tag: boot-animation_0.2-32
+
+ -- Seungtaek Chung <seungtaek.chung@samsung.com> Wed, 22 Feb 2012 23:58:01 +0900
+
+boot-animation (0.2-31) unstable; urgency=low
+
+ * EFL update
+ * Git: pkgs/b/boot-animation
+ * Tag: boot-animation_0.2-31
+
+ -- Mi-Ju Lee <miju52.lee@samsung.com> Fri, 17 Feb 2012 13:39:29 +0900
+
+boot-animation (0.2-30) unstable; urgency=low
+
+ * update boilerplate
+ * Git: pkgs/b/boot-animation
+ * Tag: boot-animation_0.2-30
+
+ -- Mi-Ju Lee <miju52.lee@samsung.com> Thu, 16 Feb 2012 10:21:34 +0900
+
+boot-animation (0.2-29) unstable; urgency=low
+
+ * update pkgname to org.tizen
+ * Git: pkgs/b/boot-animation
+ * Tag: boot-animation_0.2-29
+
+ -- Mi-Ju Lee <miju52.lee@samsung.com> Fri, 23 Dec 2011 16:07:36 +0900
+
+boot-animation (0.2-28) unstable; urgency=low
+
+ * Initial released
+ * Git: pkgs/b/boot-animation
+ * Tag: boot-animation_0.2-28
+
+ -- Seungtaek Chung <seungtaek.chung@samsung.com> Wed, 07 Dec 2011 22:46:30 +0900
--- /dev/null
+Source: boot-animation
+Section: devel
+Priority: extra
+Maintainer: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+Build-Depends: debhelper (>= 5), libelm-dev, libavsystem-dev, libslp-utilx-dev, libvconf-dev, libaudiosessionmgr-dev
+Standards-Version: 3.7.2
+
+Package: boot-animation
+Section: devel
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, libelm, libavsystem-0, libslp-utilx-0, libvconf-0, libaudiosessionmgr-0
+Description: booting animation
--- /dev/null
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+CFLAGS ?= -Wall -g -Werror
+CXXFLAGS ?= -Wall -g
+LDFLAGS ?=
+PREFIX ?= /usr
+DATADIR ?= /usr/share
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+ CXXFLAGS += -O0
+else
+ CFLAGS += -O2
+ CXXFLAGS += -O2
+endif
+
+LDFLAGS += -Wl,--rpath=$(PREFIX)/lib -Wl,--as-needed
+
+CMAKE_BUILD_DIR ?= $(CURDIR)/cmake_build_tmp
+
+configure: configure-stamp
+configure-stamp:
+ dh_testdir
+ # Add here commands to configure the package.
+ mkdir -p $(CMAKE_BUILD_DIR) && cd $(CMAKE_BUILD_DIR) && \
+ CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" cmake .. -DCMAKE_INSTALL_PREFIX="$(PREFIX)"
+
+ touch configure-stamp
+
+build: build-stamp
+
+build-stamp: configure-stamp
+ dh_testdir
+
+ # Add here commands to compile the package.
+ cd $(CMAKE_BUILD_DIR) && $(MAKE)
+ #docbook-to-man debian/wavplayer.sgml > wavplayer.1
+
+ for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
+ cat $$f > $${f%.in}; \
+ sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \
+ sed -i -e "s#@DATADIR@#$(DATADIR)#g" $${f%.in}; \
+ done
+
+ touch $@
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ # Add here commands to clean up after the build process.
+ rm -rf $(CMAKE_BUILD_DIR)
+
+ for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
+ rm -f $${f%.in}; \
+ done
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+
+ # Add here commands to install the package into debian/wavplayer.
+ cd $(CMAKE_BUILD_DIR) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_install --sourcedir=debian/tmp
+# dh_installmenu
+# dh_installdebconf
+# dh_installlogrotate
+# dh_installemacsen
+# dh_installpam
+# dh_installmime
+# dh_python
+# dh_installinit
+# dh_installcron
+# dh_installinfo
+ dh_installman
+ dh_link
+ dh_strip
+ dh_compress
+ dh_fixperms
+# dh_perl
+ dh_makeshlibs
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
--- /dev/null
+/*
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * This file is part of <boot-animation>
+ * Written by <Seungtaek Chung> <seungtaek.chung@samsung.com>, <Mi-Ju Lee> <miju52.lee@samsung.com>, <Xi Zhichan> <zhichan.xi@samsung.com>
+ *
+ * PROPRIETARY/CONFIDENTIAL
+ *
+ * This software is the confidential and proprietary information of SAMSUNG ELECTRONICS ("Confidential Information").
+ * You shall not disclose such Confidential Information and shall use it only in accordance
+ * with the terms of the license agreement you entered into with SAMSUNG ELECTRONICS.
+ * SAMSUNG make no representations or warranties about the suitability of the software,
+ * either express or implied, including but not limited to the implied warranties of merchantability,
+ * fitness for a particular purpose, or non-infringement.
+ * SAMSUNG shall not be liable for any damages suffered by licensee as a result of using,
+ * modifying or distributing this software or its derivatives.
+ *
+ */
+
+extern int init_animation(int state, const char *msg);
+extern int fini_animation(void);
+extern void restart_animation(int state, const char *msg);
--- /dev/null
+/*
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * This file is part of <boot-animation>
+ * Written by <Seungtaek Chung> <seungtaek.chung@samsung.com>, <Mi-Ju Lee> <miju52.lee@samsung.com>, <Xi Zhichan> <zhichan.xi@samsung.com>
+ *
+ * PROPRIETARY/CONFIDENTIAL
+ *
+ * This software is the confidential and proprietary information of SAMSUNG ELECTRONICS ("Confidential Information").
+ * You shall not disclose such Confidential Information and shall use it only in accordance
+ * with the terms of the license agreement you entered into with SAMSUNG ELECTRONICS.
+ * SAMSUNG make no representations or warranties about the suitability of the software,
+ * either express or implied, including but not limited to the implied warranties of merchantability,
+ * fitness for a particular purpose, or non-infringement.
+ * SAMSUNG shall not be liable for any damages suffered by licensee as a result of using,
+ * modifying or distributing this software or its derivatives.
+ *
+ */
+
+#ifndef PREFIX
+#define PREFIX "/usr"
+#endif
+
+#define EDJ_OFF PREFIX"/share/edje/poweroff.edj"
+#define EDJ_ON PREFIX"/share/edje/poweron.edj"
+#define GRP_OFF "poweroff"
+#define GRP_ON "poweron"
+
+#define NICE_VALUE -20
+
+#define TITLE "Password Application"
+
+#define BA_DEFAULT_WINDOW_H 800
+#define BA_DEFAULT_WINDOW_W 1280
+
+enum {
+ TYPE_UNKNOWN,
+ TYPE_ON,
+ TYPE_OFF,
+ TYPE_OFF_NOEXIT,
+ TYPE_OFF_WITH_MSG,
+};
+
+#if defined(_DEBUG)
+
+static int _func_depth;
+
+#define ENTER_FUNCTION() \
+ do { \
+ _func_depth++; \
+ printf("%*.c \e[32m[%s:%d]\e[0m\n", _func_depth*4, '-', __func__, __LINE__); \
+ } while (0)
+#define LEAVE_FUNCTION() \
+ do { \
+ _func_depth--; \
+ } while (0)
+
+inline static void dump_riff_header(RIFFChunk * riff)
+{
+ ENTER_FUNCTION();
+ fprintf(stderr, "%*.c Type ID: %.4s\n", _func_depth * 4, '-',
+ riff->type);
+ LEAVE_FUNCTION();
+}
+
+inline static void dump_format_header(FormatChunk * format)
+{
+ ENTER_FUNCTION();
+ fprintf(stderr, "%*.c Format tag: %d\n", _func_depth * 4, '-',
+ format->wFormatTag);
+ fprintf(stderr, "%*.c Channel : %d\n", _func_depth * 4, '-',
+ format->wChannels);
+ fprintf(stderr, "%*.c Samples per sec : %lu\n", _func_depth * 4, '-',
+ format->dwSamplesPerSec);
+
+ fprintf(stderr, "%*.c Byte per sec : %lu\n", _func_depth * 4, '-',
+ format->dwAvBytesPerSec);
+
+ fprintf(stderr, "%*.c Block align : %d\n", _func_depth * 4, '-',
+ format->wBlockAlign);
+ fprintf(stderr, "%*.c Size of a sample frame : %d bytes\n",
+ _func_depth * 4, '-',
+ format->wChannels * (format->wBitsPerSample / 8));
+ fprintf(stderr, "%*.c Bits per sample : %d\n", _func_depth * 4, '-',
+ format->wBitsPerSample);
+ LEAVE_FUNCTION();
+}
+
+#define DbgPrint(fmt, arg...) fprintf(stderr, "%*.c "fmt, _func_depth*4, '-', ##arg);
+
+#else
+#define DbgPrint(fmt, ...)
+#define ENTER_FUNCTION()
+#define LEAVE_FUNCTION()
+
+#define dump_riff_header(riff)
+#define dump_format_header(format)
+#endif
--- /dev/null
+Name: boot-animation
+Version: 0.3.0
+Release: 1
+Summary: Boot animation
+Source: %{name}-%{version}.tar.gz
+License: Samsung Proprietary License
+Group: TO_BE/FILLED_IN
+BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
+BuildRequires: cmake
+BuildRequires: edje, edje-bin, embryo, embryo-bin
+BuildRequires: pkgconfig(ecore)
+BuildRequires: pkgconfig(x11)
+BuildRequires: pkgconfig(libexif)
+BuildRequires: pkgconfig(elementary)
+BuildRequires: pkgconfig(utilX)
+BuildRequires: pkgconfig(vconf)
+BuildRequires: pkgconfig(avsystem)
+BuildRequires: pkgconfig(audio-session-mgr)
+
+
+Requires(post): /usr/bin/vconftool
+
+%description
+Shows an animation and plays a sound when the device is booted or shutdown.
+
+%prep
+%setup -q
+#%patch0 -p1
+
+
+cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+%build
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+
+%clean
+make clean
+
+%docs_package
+
+
+%post
+ln -s /etc/init.d/boot-ani /etc/rc.d/rc3.d/S41boot-ani
+
+vconftool -i set -t string memory/boot-animation/restart start:start
+
+
+%files
+/etc/init.d/boot-ani
+/usr/share/edje/poweroff.edj
+/usr/share/edje/poweron.edj
+/usr/bin/boot-animation
--- /dev/null
+/*
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * This file is part of <boot-animation>
+ * Written by <Seungtaek Chung> <seungtaek.chung@samsung.com>, <Mi-Ju Lee> <miju52.lee@samsung.com>, <Xi Zhichan> <zhichan.xi@samsung.com>
+ *
+ * PROPRIETARY/CONFIDENTIAL
+ *
+ * This software is the confidential and proprietary information of SAMSUNG ELECTRONICS ("Confidential Information").
+ * You shall not disclose such Confidential Information and shall use it only in accordance
+ * with the terms of the license agreement you entered into with SAMSUNG ELECTRONICS.
+ * SAMSUNG make no representations or warranties about the suitability of the software,
+ * either express or implied, including but not limited to the implied warranties of merchantability,
+ * fitness for a particular purpose, or non-infringement.
+ * SAMSUNG shall not be liable for any damages suffered by licensee as a result of using,
+ * modifying or distributing this software or its derivatives.
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+#include <utilX.h>
+#include <vconf.h>
+
+#include <Elementary.h>
+#include <Ecore_X.h>
+#include <Ecore_X_Atoms.h>
+
+#include <boot-animation.h>
+#include <animation.h>
+
+static struct animation {
+ Ecore_X_Window focus_win;
+ Ecore_X_Window root_win;
+ Evas_Object *win;
+ Ecore_Window xwin;
+ Evas_Coord w;
+ Evas_Coord h;
+ int t;
+ Evas *evas;
+ Ecore_Evas *ee;
+ Evas_Object *layout;
+ int state;
+ Evas_Object *txt;
+} s_animation = {
+.txt = NULL,};
+
+static void win_del(void *data, Evas_Object * obj, void *event_info)
+{
+ fprintf(stderr, "Window delete event received\n");
+ elm_exit();
+}
+
+static void _edje_cb(void *d, Evas_Object * obj, const char *e, const char *s)
+{
+ fprintf(stderr, "edje calback is invoked\n");
+
+ if (vconf_set_int("memory/boot-animation/finished", 1) != 0) {
+ fprintf(stderr, "Failed to set finished set\n");
+ }
+
+ if (s_animation.state == TYPE_OFF || s_animation.state == TYPE_ON) {
+ elm_exit();
+ } else if (s_animation.state == TYPE_OFF_WITH_MSG) {
+ if (s_animation.txt) {
+ Evas_Coord w;
+ Evas_Coord h;
+
+ evas_object_size_hint_weight_set(s_animation.txt,
+ EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
+ evas_object_size_hint_fill_set(s_animation.txt,
+ EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
+ evas_object_resize(s_animation.txt, s_animation.w,
+ s_animation.h);
+ evas_object_color_set(s_animation.txt, 255, 255, 255,
+ 255);
+ evas_object_text_font_set(s_animation.txt,
+ "SLP:style=medium", 30);
+ evas_object_geometry_get(s_animation.txt, NULL, NULL,
+ &w, &h);
+ evas_object_move(s_animation.txt,
+ (s_animation.w - w) >> 1,
+ (s_animation.h - h) >> 1);
+ evas_object_show(s_animation.txt);
+ }
+ }
+}
+
+static
+int init_layout(const char *msg)
+{
+ s_animation.layout = elm_layout_add(s_animation.win);
+ if (!s_animation.layout) {
+ fprintf(stderr, "Failed to create layout\n");
+ return EXIT_FAILURE;
+ }
+
+ if (s_animation.state == TYPE_ON) {
+ elm_layout_file_set(s_animation.layout, EDJ_ON, GRP_ON);
+ } else {
+ elm_layout_file_set(s_animation.layout, EDJ_OFF, GRP_OFF);
+ }
+
+ evas_object_size_hint_weight_set(s_animation.layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ printf("[Boot-ani] Start animation: %d mode\n", s_animation.state);
+ elm_win_resize_object_add(s_animation.win, s_animation.layout);
+ edje_object_signal_callback_add(elm_layout_edje_get(s_animation.layout),
+ "end", "animation", _edje_cb, NULL);
+ evas_object_show(s_animation.layout);
+
+ Ecore_X_Window xwin;
+ xwin = elm_win_xwindow_get(s_animation.win);
+ ecore_x_icccm_hints_set(xwin, 0, 0, 0, 0, 0, 0, 0);
+
+
+ if (msg) {
+ if (!s_animation.txt) {
+ s_animation.txt =
+ evas_object_text_add(s_animation.evas);
+ if (!s_animation.txt) {
+ fprintf(stderr, "Failed to add text\n");
+ evas_object_del(s_animation.layout);
+ return EXIT_FAILURE;
+ }
+ }
+
+ evas_object_text_text_set(s_animation.txt, msg);
+ evas_object_hide(s_animation.txt);
+ }
+
+ if (vconf_set_int("memory/boot-animation/finished", 0) != 0) {
+ fprintf(stderr, "Failed to set finished value to 0\n");
+ }
+
+ return EXIT_SUCCESS;
+}
+
+static
+void fini_layout(void)
+{
+ if (s_animation.layout) {
+ evas_object_del(s_animation.layout);
+ }
+
+ if (s_animation.txt) {
+ evas_object_del(s_animation.txt);
+ s_animation.txt = NULL;
+ }
+}
+
+void restart_animation(int state, const char *msg)
+{
+ fini_layout();
+
+ s_animation.state = state;
+
+ init_layout(msg);
+
+ evas_object_show(s_animation.win);
+}
+
+static
+int create_window(void)
+{
+ s_animation.win = elm_win_add(NULL, "", ELM_WIN_BASIC);
+ if (!s_animation.win) {
+ fprintf(stderr, "Failed to create a new window\n");
+ return EXIT_FAILURE;
+ }
+ evas_object_smart_callback_add(s_animation.win, "delete-request",
+ win_del, NULL);
+ evas_object_resize(s_animation.win, s_animation.w, s_animation.h);
+
+ s_animation.evas = evas_object_evas_get(s_animation.win);
+ if (!s_animation.evas) {
+ evas_object_del(s_animation.win);
+ fprintf(stderr, "Failed to get the evas object\n");
+ return EXIT_FAILURE;
+ }
+ elm_win_borderless_set(s_animation.win, 1);
+ evas_object_move(s_animation.win, 0, 0);
+
+ if (s_animation.w > s_animation.h) {
+ int t;
+ elm_win_rotation_with_resize_set(s_animation.win, 90);
+ t = s_animation.w;
+ s_animation.w = s_animation.h;
+ s_animation.h = t;
+ }
+ evas_object_show(s_animation.win);
+
+ s_animation.ee = ecore_evas_ecore_evas_get(s_animation.evas);
+ if (!s_animation.ee) {
+ evas_object_del(s_animation.win);
+ fprintf(stderr, "Failed to get the ecore evas object\n");
+ return EXIT_FAILURE;
+ }
+
+ s_animation.xwin = ecore_evas_window_get(s_animation.ee);
+ ecore_x_netwm_window_type_set(s_animation.xwin,
+ ECORE_X_WINDOW_TYPE_NOTIFICATION);
+ utilx_set_system_notification_level(ecore_x_display_get(),
+ s_animation.xwin,
+ UTILX_NOTIFICATION_LEVEL_HIGH);
+
+ return EXIT_SUCCESS;
+}
+
+int init_animation(int state, const char *msg)
+{
+ s_animation.focus_win = ecore_x_window_focus_get();
+ s_animation.root_win = ecore_x_window_root_get(s_animation.focus_win);
+ s_animation.state = state;
+ ecore_x_window_size_get(s_animation.root_win, &s_animation.w,
+ &s_animation.h);
+
+ if (create_window() == EXIT_FAILURE) {
+ fprintf(stderr, "Failed to create a new window\n");
+ return EXIT_FAILURE;
+ }
+
+ if (init_layout(msg) == EXIT_FAILURE) {
+ fprintf(stderr, "Failed to init the layout object\n");
+ if (msg)
+ evas_object_del(s_animation.txt);
+ evas_object_del(s_animation.win);
+ return EXIT_FAILURE;
+ }
+
+ return EXIT_SUCCESS;
+}
+
+int fini_animation(void)
+{
+ fini_layout();
+ evas_object_del(s_animation.win);
+ return EXIT_SUCCESS;
+}
--- /dev/null
+/*
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * This file is part of <boot-animation>
+ * Written by <Seungtaek Chung> <seungtaek.chung@samsung.com>, <Mi-Ju Lee> <miju52.lee@samsung.com>, <Xi Zhichan> <zhichan.xi@samsung.com>
+ *
+ * PROPRIETARY/CONFIDENTIAL
+ *
+ * This software is the confidential and proprietary information of SAMSUNG ELECTRONICS ("Confidential Information").
+ * You shall not disclose such Confidential Information and shall use it only in accordance
+ * with the terms of the license agreement you entered into with SAMSUNG ELECTRONICS.
+ * SAMSUNG make no representations or warranties about the suitability of the software,
+ * either express or implied, including but not limited to the implied warranties of merchantability,
+ * fitness for a particular purpose, or non-infringement.
+ * SAMSUNG shall not be liable for any damages suffered by licensee as a result of using,
+ * modifying or distributing this software or its derivatives.
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+#include <pthread.h>
+#include <utilX.h>
+
+#include <Elementary.h>
+#include <Ecore_X.h>
+#include <Ecore_X_Atoms.h>
+#include <audio-session-manager.h>
+
+#include <getopt.h>
+#include <boot-animation.h>
+#include <animation.h>
+
+#include <vconf.h>
+
+extern char *optarg;
+extern int optind, opterr, optopt;
+
+struct args {
+ int argc;
+ char **argv;
+ char *msg;
+};
+
+static void print_usages(char *argv0)
+{
+ printf("Usage) %s {--start|--stop}\n"
+ " Ex:\n"
+ " # %s --start\n"
+ " # %s --stop\n"
+ " # %s --off\n"
+ " # %s --offmsg YOUR_MESSAGE\n", argv0, argv0, argv0, argv0,
+ argv0);
+}
+
+static
+void restart_cb(keynode_t * node, void *user_data)
+{
+ char *str;
+ char cmd[128];
+ char msg[256];
+ int type = TYPE_UNKNOWN;
+
+ if (!node) {
+ fprintf(stderr, "Invalid node\n");
+ return;
+ }
+
+ str = vconf_keynode_get_str(node);
+ if (!str) {
+ fprintf(stderr, "Failed to get string\n");
+ return;
+ }
+
+ if (sscanf(str, "%127[^:]:%255s", cmd, msg) != 2) {
+ fprintf(stderr, "Invalid format [%s]\n", str);
+ free(str);
+ return;
+ }
+ free(str);
+
+ if (!strcasecmp(cmd, "start")) {
+ type = TYPE_ON;
+ } else if (!strcasecmp(cmd, "stop")) {
+ type = TYPE_OFF;
+ } else if (!strcasecmp(cmd, "off")) {
+ type = TYPE_OFF_NOEXIT;
+ } else if (!strcasecmp(cmd, "offmsg")) {
+ type = TYPE_OFF_WITH_MSG;
+ } else {
+ fprintf(stderr, "Unknown command %s\n", cmd);
+ }
+
+ restart_animation(type, msg);
+}
+
+static
+void xready_cb(keynode_t * node, void *user_data)
+{
+ int c;
+ int argc;
+ char **argv;
+ int option_index = 0;
+ int type = TYPE_UNKNOWN;
+ int errorcode = -1;
+ int asm_handle;
+ struct args *args = user_data;
+ static struct option long_options[] = {
+ {"start", 0, 0, 's'},
+ {"stop", 0, 0, 'p'},
+ {"off", 0, 0, 'o'},
+ {"offmsg", 1, 0, 'm'},
+ {0, 0, 0, 0},
+ };
+ static int invoked_flag = 0;
+
+ if (invoked_flag == 1) {
+ fprintf(stderr, "Already launched.\n");
+ return;
+ }
+
+ invoked_flag = 1;
+
+ argc = args->argc;
+ argv = args->argv;
+
+ nice(NICE_VALUE);
+
+ while (1) {
+ c = getopt_long(argc, argv, "spom:", long_options,
+ &option_index);
+ if (c < 0) {
+ break;
+ } else if (c == 0) {
+ c = long_options[option_index].val;
+ }
+
+ switch (c) {
+ case 's':
+ type = TYPE_ON;
+ break;
+ case 'p':
+ type = TYPE_OFF;
+ break;
+ case 'o':
+ type = TYPE_OFF_NOEXIT;
+ break;
+ case 'm':
+ type = TYPE_OFF_WITH_MSG;
+ args->msg = strdup(optarg);
+ if (!args->msg)
+ perror("strdup");
+ break;
+ default:
+ type = TYPE_UNKNOWN;
+ break;
+ }
+ }
+
+ if (type == TYPE_UNKNOWN) {
+ fprintf(stderr, "[Boot-ani] unknown arg [%s]\n", argv[1]);
+ return;
+ }
+
+ init_animation(type, args->msg);
+ if (type == TYPE_OFF) {
+ if (!ASM_register_sound
+ (-1, &asm_handle, ASM_EVENT_EXCLUSIVE_AVSYSTEM,
+ ASM_STATE_PLAYING, NULL, NULL, ASM_RESOURCE_NONE,
+ &errorcode)) {
+ fprintf(stderr, "ASM_register_sound() failed 0x%x\n",
+ errorcode);
+ return;
+ }
+ }
+}
+
+int main(int argc, char *argv[])
+{
+ struct args args;
+
+ if (argc < 2) {
+ print_usages(argv[0]);
+ return EXIT_FAILURE;
+ }
+
+ args.argc = argc;
+ args.argv = argv;
+ args.msg = NULL;
+
+ elm_init(argc, argv);
+
+ vconf_notify_key_changed("memory/boot-animation/restart", restart_cb,
+ NULL);
+ xready_cb(NULL, &args);
+
+ elm_run();
+
+ fini_animation();
+
+ if (args.msg)
+ free(args.msg);
+ elm_shutdown();
+ return 0;
+}