2.0_alpha 92/1792/1 submit/master/20120920.154357 submit/master/20120920.154559 submit/trunk/20120920.160007
authorYeongil Jang <yg0577.jang@samsung.com>
Thu, 20 Sep 2012 15:06:58 +0000 (00:06 +0900)
committerYeongil Jang <yg0577.jang@samsung.com>
Thu, 20 Sep 2012 15:06:58 +0000 (00:06 +0900)
456 files changed:
AUTHORS [deleted file]
CMakeLists.txt [new file with mode: 0644]
COPYING [deleted file]
LICENSE [new file with mode: 0755]
Makefile.am [deleted file]
NEWS [deleted file]
NOTICE [new file with mode: 0755]
README [deleted file]
TODO [deleted file]
autogen.sh [deleted file]
configure.ac [deleted file]
contrib/python/README [deleted file]
contrib/python/lib/fontconfig.pyx [deleted file]
contrib/python/lib/harfbuzz.pyx [deleted file]
contrib/python/runpy [deleted file]
contrib/python/scripts/hbtestfont [deleted file]
contrib/python/setup.py [deleted file]
debian/changelog
debian/control
debian/copyright [deleted file]
debian/dirs [deleted file]
debian/docs [deleted file]
debian/libharfbuzz-dev.install [deleted file]
debian/libharfbuzz.install [deleted file]
debian/org.tizen.video-player.install [new file with mode: 0755]
debian/org.tizen.video-player.install.in [new file with mode: 0755]
debian/org.tizen.video-player.postinst [new file with mode: 0755]
debian/org.tizen.video-player.postinst.in [new file with mode: 0755]
debian/rules
debian/substvars [new file with mode: 0755]
git.mk [deleted file]
harfbuzz.doap [deleted file]
harfbuzz.pc.in [deleted file]
include/mp-drm-ctrl.h [new file with mode: 0644]
include/mp-external-ug.h [new file with mode: 0755]
include/mp-util-media-service.h [new file with mode: 0755]
include/mp-util.h [new file with mode: 0644]
include/mp-video-animation-ctrl.h [new file with mode: 0755]
include/mp-video-app-ctrl.h [new file with mode: 0755]
include/mp-video-ctrl-mgr.h [new file with mode: 0644]
include/mp-video-display-view.h [new file with mode: 0644]
include/mp-video-info-ctrl.h [new file with mode: 0755]
include/mp-video-info-view.h [new file with mode: 0755]
include/mp-video-log.h [new file with mode: 0644]
include/mp-video-player-mgr.h [new file with mode: 0644]
include/mp-video-progressbar.h [new file with mode: 0755]
include/mp-video-service-ctrl.h [new file with mode: 0644]
include/mp-video-sound-path-ctrl.h [new file with mode: 0644]
include/mp-video-streaming-ctrl.h [new file with mode: 0755]
include/mp-video-streaming-view.h [new file with mode: 0644]
include/mp-video-string-define.h [new file with mode: 0755]
include/mp-video-subtitle-ctrl.h [new file with mode: 0755]
include/mp-video-type-define.h [new file with mode: 0644]
include/mp-video-value-define.h [new file with mode: 0755]
include/mp-video-view-mgr.h [new file with mode: 0755]
include/mp-xml-parser.h [new file with mode: 0755]
include/video-player.h [new file with mode: 0644]
org.tizen.video-player.xml [new file with mode: 0755]
packaging/harfbuzz.spec [deleted file]
packaging/org.tizen.video-player.spec [new file with mode: 0644]
res/edc/add_tag.edc [new file with mode: 0755]
res/edc/animation.edc [new file with mode: 0755]
res/edc/control.edc [new file with mode: 0755]
res/edc/detail.edc [new file with mode: 0755]
res/edc/hidden_button_panel.edc [new file with mode: 0755]
res/edc/image_res.edc [new file with mode: 0755]
res/edc/main.edc [new file with mode: 0755]
res/edc/multi_win.edc [new file with mode: 0755]
res/edc/option_button.edc [new file with mode: 0755]
res/edc/panel.edc [new file with mode: 0755]
res/edc/popup_progressbar.edc [new file with mode: 0755]
res/edc/progress.edc [new file with mode: 0755]
res/edc/setting.edc [new file with mode: 0755]
res/edc/subtitle.edc [new file with mode: 0755]
res/edc/vp-button-white.edc [new file with mode: 0755]
res/edc/vp-button.edc [new file with mode: 0755]
res/edc/vp-check.edc [new file with mode: 0755]
res/edc/vp-controlbar.edc [new file with mode: 0755]
res/edc/vp-ctxpopup.edc [new file with mode: 0755]
res/edc/vp-custom-winset-style.edc [new file with mode: 0755]
res/edc/vp-layout.edc [new file with mode: 0755]
res/edc/vp-naviframe.edc [new file with mode: 0755]
res/edc/vp-naviframe_white.edc [new file with mode: 0755]
res/edc/vp-progressbar-list.edc [new file with mode: 0755]
res/edc/vp-toolbar.edc [new file with mode: 0755]
res/edc/vp_font.edc [new file with mode: 0755]
res/images/00_Option_header_bt.png [new file with mode: 0755]
res/images/00_Option_header_bt_dim.png [new file with mode: 0755]
res/images/00_Option_header_bt_press.png [new file with mode: 0755]
res/images/00_button_01_normal.png [new file with mode: 0755]
res/images/00_button_01_normal_dim.png [new file with mode: 0755]
res/images/00_button_01_normal_press.png [new file with mode: 0755]
res/images/00_check_bg_dim.png [new file with mode: 0755]
res/images/00_grid_select_check.png [new file with mode: 0755]
res/images/00_sweep_list_bg.png [new file with mode: 0755]
res/images/00_winset_btn_prev.png [new file with mode: 0755]
res/images/00_winset_btn_prev_press.png [new file with mode: 0755]
res/images/00_winset_control_top_arrow.png [new file with mode: 0755]
res/images/00_winset_list_progress_bg.png [new file with mode: 0755]
res/images/00_winset_thumbs_bg.png [new file with mode: 0755]
res/images/00_winset_thumbs_focus_bg.png [new file with mode: 0755]
res/images/00_winset_thumbs_loading_bg.png [new file with mode: 0755]
res/images/01_controlbar_icon_delete.png [new file with mode: 0755]
res/images/01_controlbar_icon_set_as.png [new file with mode: 0755]
res/images/01_controlbar_icon_share.png [new file with mode: 0755]
res/images/01_header_icon_add.png [new file with mode: 0755]
res/images/01_header_icon_cancel.png [new file with mode: 0755]
res/images/01_header_icon_others.png [new file with mode: 0755]
res/images/12_music_player_sound_path.png [new file with mode: 0755]
res/images/DM_Gallery_Increase.png [new file with mode: 0755]
res/images/T01-2_icon_toolbar_cancel.png [new file with mode: 0755]
res/images/T01_Image_Look.png [new file with mode: 0755]
res/images/T01_Nocontents_multimedia.png [new file with mode: 0755]
res/images/T01_Option_header_bt.png [new file with mode: 0755]
res/images/T01_Option_header_bt_press.png [new file with mode: 0755]
res/images/T01_Trim_handle_beginning.png [new file with mode: 0755]
res/images/T01_Trim_handle_ending.png [new file with mode: 0755]
res/images/T01_back.png [new file with mode: 0755]
res/images/T01_btn_prev.png [new file with mode: 0755]
res/images/T01_check.png [new file with mode: 0755]
res/images/T01_checkbox.png [new file with mode: 0755]
res/images/T01_control_icon_detail.png [new file with mode: 0755]
res/images/T01_control_icon_fullscreen.png [new file with mode: 0755]
res/images/T01_control_icon_reduce.png [new file with mode: 0755]
res/images/T01_control_top_arrow.png [new file with mode: 0755]
res/images/T01_control_top_bg.png [new file with mode: 0755]
res/images/T01_controlbar_icon_cancel.png [new file with mode: 0755]
res/images/T01_controlbar_icon_done.png [new file with mode: 0755]
res/images/T01_controller_btn.png [new file with mode: 0755]
res/images/T01_controller_btn_press.png [new file with mode: 0755]
res/images/T01_grid_select_check.png [new file with mode: 0755]
res/images/T01_icon_expand.png [new file with mode: 0755]
res/images/T01_icon_reduce.png [new file with mode: 0755]
res/images/T01_icon_soundPath.png [new file with mode: 0755]
res/images/T01_icon_soundPath_h.png [new file with mode: 0755]
res/images/T01_icon_soundPath_press.png [new file with mode: 0755]
res/images/T01_player_progress_bar.png [new file with mode: 0755]
res/images/T01_player_progress_bg.png [new file with mode: 0755]
res/images/T01_player_progress_point.png [new file with mode: 0755]
res/images/T01_sound_path.png [new file with mode: 0755]
res/images/T01_title_bg.png [new file with mode: 0755]
res/images/T01_title_bg_h.png [new file with mode: 0755]
res/images/T01_title_btn.png [new file with mode: 0755]
res/images/T01_title_btn_press.png [new file with mode: 0755]
res/images/T01_toolbar_bg.png [new file with mode: 0755]
res/images/T01_toolbar_press.png [new file with mode: 0755]
res/images/T01_video_list_progress_bar.png [new file with mode: 0755]
res/images/adjustment/T01-2_controller_progress_handle.png [new file with mode: 0755]
res/images/adjustment/T01-2_controller_progress_handle_press.png [new file with mode: 0755]
res/images/adjustment/T01-2_fine_adjustment_bg.png [new file with mode: 0755]
res/images/adjustment/T01-2_fine_adjustment_bg_ef.png [new file with mode: 0755]
res/images/adjustment/T01-2_fine_adjustment_progress_bar.png [new file with mode: 0755]
res/images/adjustment/T01-2_fine_adjustment_progress_bg.png [new file with mode: 0755]
res/images/adjustment/T01-2_fine_adjustment_progress_handle.png [new file with mode: 0755]
res/images/gallery_loading_ani_01.png [new file with mode: 0755]
res/images/gallery_loading_ani_02.png [new file with mode: 0755]
res/images/gallery_loading_ani_03.png [new file with mode: 0755]
res/images/gallery_loading_ani_04.png [new file with mode: 0755]
res/images/gallery_loading_ani_05.png [new file with mode: 0755]
res/images/gallery_loading_ani_06.png [new file with mode: 0755]
res/images/gallery_loading_ani_07.png [new file with mode: 0755]
res/images/gallery_loading_ani_08.png [new file with mode: 0755]
res/images/gallery_loading_ani_09.png [new file with mode: 0755]
res/images/gallery_loading_ani_10.png [new file with mode: 0755]
res/images/gallery_loading_ani_11.png [new file with mode: 0755]
res/images/gallery_loading_ani_12.png [new file with mode: 0755]
res/images/gallery_loading_ani_13.png [new file with mode: 0755]
res/images/gallery_loading_ani_14.png [new file with mode: 0755]
res/images/gallery_loading_ani_15.png [new file with mode: 0755]
res/images/gallery_loading_ani_16.png [new file with mode: 0755]
res/images/gallery_loading_ani_17.png [new file with mode: 0755]
res/images/gallery_loading_ani_18.png [new file with mode: 0755]
res/images/gallery_loading_ani_19.png [new file with mode: 0755]
res/images/gallery_loading_ani_20.png [new file with mode: 0755]
res/images/gallery_loading_ani_21.png [new file with mode: 0755]
res/images/gallery_loading_ani_22.png [new file with mode: 0755]
res/images/gallery_loading_ani_23.png [new file with mode: 0755]
res/images/gallery_loading_ani_24.png [new file with mode: 0755]
res/images/gallery_loading_ani_25.png [new file with mode: 0755]
res/images/gallery_loading_ani_26.png [new file with mode: 0755]
res/images/gallery_loading_ani_27.png [new file with mode: 0755]
res/images/gallery_loading_ani_28.png [new file with mode: 0755]
res/images/gallery_loading_ani_29.png [new file with mode: 0755]
res/images/gallery_loading_ani_30.png [new file with mode: 0755]
res/images/gallery_video_add_btn.png [new file with mode: 0755]
res/images/gallery_video_add_btn_press.png [new file with mode: 0755]
res/images/gallery_video_control_ff.png [new file with mode: 0755]
res/images/gallery_video_control_ff_2.png [new file with mode: 0755]
res/images/gallery_video_control_ff_3.png [new file with mode: 0755]
res/images/gallery_video_control_ff_4.png [new file with mode: 0755]
res/images/gallery_video_control_ff_5.png [new file with mode: 0755]
res/images/gallery_video_control_frame_back.png [new file with mode: 0755]
res/images/gallery_video_control_frame_forword.png [new file with mode: 0755]
res/images/gallery_video_control_next.png [new file with mode: 0755]
res/images/gallery_video_control_pause.png [new file with mode: 0755]
res/images/gallery_video_control_play.png [new file with mode: 0755]
res/images/gallery_video_control_prev.png [new file with mode: 0755]
res/images/gallery_video_control_rew.png [new file with mode: 0755]
res/images/gallery_video_control_rew_2.png [new file with mode: 0755]
res/images/gallery_video_control_rew_3.png [new file with mode: 0755]
res/images/gallery_video_control_rew_4.png [new file with mode: 0755]
res/images/gallery_video_control_rew_5.png [new file with mode: 0755]
res/images/gallery_video_delete_btn.png [new file with mode: 0755]
res/images/gallery_video_delete_btn_press.png [new file with mode: 0755]
res/images/gallery_video_fastforward_1x.png [new file with mode: 0755]
res/images/gallery_video_fastforward_2x.png [new file with mode: 0755]
res/images/gallery_video_fastforward_3x.png [new file with mode: 0755]
res/images/gallery_video_fastforward_4x.png [new file with mode: 0755]
res/images/gallery_video_icon_btn.png [new file with mode: 0755]
res/images/gallery_video_icon_btn_press.png [new file with mode: 0755]
res/images/gallery_video_icon_mute.png [new file with mode: 0755]
res/images/gallery_video_icon_volume.png [new file with mode: 0755]
res/images/gallery_video_player_bg.png [new file with mode: 0755]
res/images/gallery_video_popup_mute.png [new file with mode: 0755]
res/images/gallery_video_rewind_1x.png [new file with mode: 0755]
res/images/gallery_video_rewind_2x.png [new file with mode: 0755]
res/images/gallery_video_rewind_3x.png [new file with mode: 0755]
res/images/gallery_video_rewind_4x.png [new file with mode: 0755]
res/images/icon/06_myfiles_list_folder.png [new file with mode: 0644]
res/images/icon/T01-2_icon_function_bg.png [new file with mode: 0755]
res/images/icon/T01-2_icon_popup_sound_allive.png [new file with mode: 0755]
res/images/icon/T01-2_icon_popup_sound_audio_track.png [new file with mode: 0755]
res/images/icon/T01-2_icon_popup_sound_repeat_mode.png [new file with mode: 0755]
res/images/icon/T01-2_icon_popup_sound_settings.png [new file with mode: 0755]
res/images/icon/T01-2_icon_popup_subtitle.png [new file with mode: 0755]
res/images/icon/T01-2_icon_popup_trim.png [new file with mode: 0755]
res/images/icon/T01-2_icon_title_allshare.png [new file with mode: 0755]
res/images/icon/T01-2_icon_title_soundpath.png [new file with mode: 0755]
res/images/icon/_06_myfiles_list_folder.png [new file with mode: 0644]
res/images/navibar_item_separator_shadow.png [new file with mode: 0755]
res/images/naviframe_optionheader.png [new file with mode: 0755]
res/images/naviframe_optionheader_arrow.png [new file with mode: 0755]
res/images/org.tizen.video-player.png [new file with mode: 0755]
res/images/panel/T01-2_btn_toolbar_back.png [new file with mode: 0755]
res/images/panel/T01-2_btn_toolbar_back_press.png [new file with mode: 0755]
res/images/panel/T01-2_btn_toolbar_volum.png [new file with mode: 0755]
res/images/panel/T01-2_btn_toolbar_volum_press.png [new file with mode: 0755]
res/images/panel/T01-2_controller_progress_bar.png [new file with mode: 0755]
res/images/panel/T01-2_controller_progress_bg.png [new file with mode: 0755]
res/images/panel/T01-2_icon_controller_repeat.png [new file with mode: 0755]
res/images/panel/T01-2_icon_controller_repeat_1.png [new file with mode: 0755]
res/images/panel/T01-2_icon_controller_repeat_all.png [new file with mode: 0755]
res/images/panel/T01-2_icon_controller_sa.png [new file with mode: 0755]
res/images/panel/T01-2_icon_toolbar_cancel.png [new file with mode: 0755]
res/images/panel/T01-2_icon_toolbar_done.png [new file with mode: 0755]
res/images/toolbar/T01-2_btn_toolbar_back.png [new file with mode: 0755]
res/images/toolbar/T01-2_btn_toolbar_volum.png [new file with mode: 0755]
res/images/toolbar/T01-2_controlbar_icon_folder.png [new file with mode: 0644]
res/images/toolbar/T01-2_controlbar_icon_near_device.png [new file with mode: 0644]
res/images/toolbar/T01-2_controlbar_icon_recorded.png [new file with mode: 0644]
res/images/toolbar/T01-2_controlbar_icon_video.png [new file with mode: 0644]
res/images/toolbar/T01-2_icon_toolbar_cancel.png [new file with mode: 0755]
res/images/toolbar/T01-2_icon_toolbar_delete.png [new file with mode: 0755]
res/images/toolbar/T01-2_icon_toolbar_done.png [new file with mode: 0755]
res/images/toolbar/T01-2_icon_toolbar_setting.png [new file with mode: 0644]
res/images/toolbar/T01-2_icon_toolbar_sort_by.png [new file with mode: 0644]
res/images/toolbar/T02_controlbar_icon_search.png [new file with mode: 0755]
res/images/video_sound_path_dim.png [new file with mode: 0755]
res/images/white/common/00_popup_bubble_bg.png [new file with mode: 0755]
res/images/white/common/00_popup_tail_bottom.png [new file with mode: 0755]
res/images/white/common/00_popup_tail_left.png [new file with mode: 0755]
res/images/white/common/00_popup_tail_right.png [new file with mode: 0755]
res/images/white/common/00_popup_tail_top.png [new file with mode: 0755]
res/images/white/common/00_winset_control_toolbar_bg.png [new file with mode: 0755]
res/images/white/common/00_winset_control_top_arrow.png [new file with mode: 0755]
res/images/white/common/00_winset_control_top_bg.png [new file with mode: 0755]
res/images/white/common/00_winset_title_line.png [new file with mode: 0755]
res/images/white/common/01_scroller.png [new file with mode: 0755]
res/images/white/common/T01-2_popup_arrow.png [new file with mode: 0755]
res/images/white/common/T01-2_popup_bg.png [new file with mode: 0755]
res/images/white/common/T01-2_popup_btn_bg.png [new file with mode: 0755]
res/images/white/common/T01-2_popup_btn_bg2.9.png [new file with mode: 0755]
res/images/white/common/T01-2_popup_btn_normal.png [new file with mode: 0755]
res/images/white/common/T01-2_popup_btn_press_bottom.png [new file with mode: 0755]
res/images/white/common/T01-2_popup_btn_press_middle.png [new file with mode: 0755]
res/images/white/common/T01-2_popup_btn_press_top.png [new file with mode: 0755]
res/images/white/common/T01-2_popup_divider.png [new file with mode: 0755]
res/images/white/common/T01-2_title_btn_bg.png [new file with mode: 0755]
res/images/white/common/T01-2_title_btn_bg_press_01.png [new file with mode: 0755]
res/images/white/common/T01-2_title_btn_bg_press_02.png [new file with mode: 0755]
res/images/white/control/T01-2_icon_toolbar_next.png [new file with mode: 0755]
res/images/white/control/T01-2_icon_toolbar_pause.png [new file with mode: 0755]
res/images/white/control/T01-2_icon_toolbar_play.png [new file with mode: 0755]
res/images/white/control/T01-2_icon_toolbar_previous.png [new file with mode: 0755]
res/images/white/control/T01-2_icon_toolbar_stop.png [new file with mode: 0755]
res/images/white/panel/T01-2_btn_toolbar_back.png [new file with mode: 0755]
res/images/white/panel/T01-2_btn_toolbar_volume.png [new file with mode: 0755]
res/po/CMakeLists.txt [new file with mode: 0755]
res/po/POTFILES.in [new file with mode: 0755]
res/po/de_DE.po [new file with mode: 0755]
res/po/el_GR.po [new file with mode: 0755]
res/po/en.po [new file with mode: 0755]
res/po/es_ES.po [new file with mode: 0755]
res/po/fr_FR.po [new file with mode: 0755]
res/po/it_IT.po [new file with mode: 0755]
res/po/ja_JP.po [new file with mode: 0755]
res/po/ko_KR.po [new file with mode: 0755]
res/po/nl_NL.po [new file with mode: 0755]
res/po/pt_PT.po [new file with mode: 0755]
res/po/ru_RU.po [new file with mode: 0755]
res/po/tr_TR.po [new file with mode: 0755]
res/po/zh_CN.po [new file with mode: 0755]
res/po/zh_HK.po [new file with mode: 0755]
res/po/zh_TW.po [new file with mode: 0755]
src/Makefile.am [deleted file]
src/check-c-linkage-decls.sh [deleted file]
src/check-header-guards.sh [deleted file]
src/check-includes.sh [deleted file]
src/check-internal-symbols.sh [deleted file]
src/check-libstdc++.sh [deleted file]
src/gen-arabic-table.py [deleted file]
src/gen-indic-table.py [deleted file]
src/hb-atomic-private.hh [deleted file]
src/hb-blob.cc [deleted file]
src/hb-blob.h [deleted file]
src/hb-buffer-private.hh [deleted file]
src/hb-buffer.cc [deleted file]
src/hb-buffer.h [deleted file]
src/hb-cache-private.hh [deleted file]
src/hb-common.cc [deleted file]
src/hb-common.h [deleted file]
src/hb-fallback-shape-private.hh [deleted file]
src/hb-fallback-shape.cc [deleted file]
src/hb-font-private.hh [deleted file]
src/hb-font.cc [deleted file]
src/hb-font.h [deleted file]
src/hb-ft.cc [deleted file]
src/hb-ft.h [deleted file]
src/hb-glib.cc [deleted file]
src/hb-glib.h [deleted file]
src/hb-gobject-enums.cc.tmpl [deleted file]
src/hb-gobject-structs.cc [deleted file]
src/hb-gobject.h [deleted file]
src/hb-graphite2-private.hh [deleted file]
src/hb-graphite2.cc [deleted file]
src/hb-graphite2.h [deleted file]
src/hb-icu.cc [deleted file]
src/hb-icu.h [deleted file]
src/hb-mutex-private.hh [deleted file]
src/hb-object-private.hh [deleted file]
src/hb-open-file-private.hh [deleted file]
src/hb-open-type-private.hh [deleted file]
src/hb-ot-head-table.hh [deleted file]
src/hb-ot-hhea-table.hh [deleted file]
src/hb-ot-hmtx-table.hh [deleted file]
src/hb-ot-layout-common-private.hh [deleted file]
src/hb-ot-layout-gdef-table.hh [deleted file]
src/hb-ot-layout-gpos-table.hh [deleted file]
src/hb-ot-layout-gsub-table.hh [deleted file]
src/hb-ot-layout-gsubgpos-private.hh [deleted file]
src/hb-ot-layout-private.hh [deleted file]
src/hb-ot-layout.cc [deleted file]
src/hb-ot-layout.h [deleted file]
src/hb-ot-map-private.hh [deleted file]
src/hb-ot-map.cc [deleted file]
src/hb-ot-maxp-table.hh [deleted file]
src/hb-ot-name-table.hh [deleted file]
src/hb-ot-shape-complex-arabic-table.hh [deleted file]
src/hb-ot-shape-complex-arabic.cc [deleted file]
src/hb-ot-shape-complex-indic-machine.hh [deleted file]
src/hb-ot-shape-complex-indic-machine.rl [deleted file]
src/hb-ot-shape-complex-indic-private.hh [deleted file]
src/hb-ot-shape-complex-indic-table.hh [deleted file]
src/hb-ot-shape-complex-indic.cc [deleted file]
src/hb-ot-shape-complex-misc.cc [deleted file]
src/hb-ot-shape-complex-private.hh [deleted file]
src/hb-ot-shape-normalize-private.hh [deleted file]
src/hb-ot-shape-normalize.cc [deleted file]
src/hb-ot-shape-private.hh [deleted file]
src/hb-ot-shape.cc [deleted file]
src/hb-ot-tag.cc [deleted file]
src/hb-ot-tag.h [deleted file]
src/hb-ot.h [deleted file]
src/hb-private.hh [deleted file]
src/hb-set-private.hh [deleted file]
src/hb-set.cc [deleted file]
src/hb-set.h [deleted file]
src/hb-shape.cc [deleted file]
src/hb-shape.h [deleted file]
src/hb-tt-font.cc [deleted file]
src/hb-unicode-private.hh [deleted file]
src/hb-unicode.cc [deleted file]
src/hb-unicode.h [deleted file]
src/hb-uniscribe-private.hh [deleted file]
src/hb-uniscribe.cc [deleted file]
src/hb-uniscribe.h [deleted file]
src/hb-version.h [deleted file]
src/hb-version.h.in [deleted file]
src/hb-warning.cc [deleted file]
src/hb.h [deleted file]
src/indic.cc [deleted file]
src/main.cc [deleted file]
src/mp-drm-ctrl.c [new file with mode: 0644]
src/mp-external-ug.c [new file with mode: 0644]
src/mp-util-media-service.c [new file with mode: 0755]
src/mp-util.c [new file with mode: 0644]
src/mp-video-animation-ctrl.c [new file with mode: 0755]
src/mp-video-app-ctrl.c [new file with mode: 0755]
src/mp-video-ctrl-mgr.c [new file with mode: 0644]
src/mp-video-display-view.c [new file with mode: 0644]
src/mp-video-info-ctrl.c [new file with mode: 0755]
src/mp-video-info-view.c [new file with mode: 0644]
src/mp-video-player-mgr.c [new file with mode: 0755]
src/mp-video-progressbar.c [new file with mode: 0755]
src/mp-video-service-ctrl.c [new file with mode: 0644]
src/mp-video-sound-path-ctrl.c [new file with mode: 0644]
src/mp-video-streaming-ctrl.c [new file with mode: 0755]
src/mp-video-streaming-view.c [new file with mode: 0644]
src/mp-video-subtitle-ctrl.c [new file with mode: 0755]
src/mp-video-view-mgr.c [new file with mode: 0755]
src/mp-xml-parser.c [new file with mode: 0755]
src/video-player.c [new file with mode: 0644]
test/Makefile.am [deleted file]
test/api/Makefile.am [deleted file]
test/api/hb-test.h [deleted file]
test/api/test-blob.c [deleted file]
test/api/test-buffer.c [deleted file]
test/api/test-c.c [deleted file]
test/api/test-common.c [deleted file]
test/api/test-cplusplus.cc [deleted file]
test/api/test-font.c [deleted file]
test/api/test-object.c [deleted file]
test/api/test-ot-tag.c [deleted file]
test/api/test-shape-complex.c [deleted file]
test/api/test-shape.c [deleted file]
test/api/test-unicode.c [deleted file]
test/api/test-version.c [deleted file]
test/shaping/Makefile.am [deleted file]
test/shaping/Makefile.in [deleted file]
test/shaping/hb-diff [deleted file]
test/shaping/hb-diff-colorize [deleted file]
test/shaping/hb-diff-filter-failures [deleted file]
test/shaping/hb-diff-ngrams [deleted file]
test/shaping/hb-diff-stat [deleted file]
test/shaping/hb-manifest-read [deleted file]
test/shaping/hb-manifest-update [deleted file]
test/shaping/hb-unicode-decode [deleted file]
test/shaping/hb-unicode-encode [deleted file]
test/shaping/hb-unicode-prettyname [deleted file]
test/shaping/hb_test_tools.py [deleted file]
util/Makefile.am [deleted file]
util/ansi-print.cc [deleted file]
util/ansi-print.hh [deleted file]
util/hb-ot-shape-closure.cc [deleted file]
util/hb-shape.cc [deleted file]
util/hb-view.cc [deleted file]
util/helper-cairo-ansi.cc [deleted file]
util/helper-cairo-ansi.hh [deleted file]
util/helper-cairo.cc [deleted file]
util/helper-cairo.hh [deleted file]
util/main-font-text.hh [deleted file]
util/options.cc [deleted file]
util/options.hh [deleted file]
util/shape-consumer.hh [deleted file]
util/view-cairo.cc [deleted file]
util/view-cairo.hh [deleted file]

diff --git a/AUTHORS b/AUTHORS
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644 (file)
index 0000000..00bc551
--- /dev/null
@@ -0,0 +1,211 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(video-player C CXX)
+
+EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE CMAKE_SYSTEM_VERSION)
+
+SET(SRCS
+src/video-player.c
+src/mp-util.c
+src/mp-video-app-ctrl.c
+src/mp-xml-parser.c
+src/mp-video-view-mgr.c
+src/mp-video-display-view.c
+src/mp-video-info-view.c
+src/mp-external-ug.c
+src/mp-video-progressbar.c
+src/mp-util-media-service.c
+src/mp-video-sound-path-ctrl.c
+src/mp-video-streaming-view.c
+src/mp-video-ctrl-mgr.c
+src/mp-video-player-mgr.c
+src/mp-video-animation-ctrl.c
+src/mp-video-streaming-ctrl.c
+src/mp-video-info-ctrl.c
+src/mp-video-service-ctrl.c
+src/mp-drm-ctrl.c
+)
+
+INCLUDE_DIRECTORIES(
+       ${CMAKE_SOURCE_DIR}/include
+)
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(pkgs REQUIRED
+       elementary
+       drm-client
+       utilX
+       dlog
+       vconf
+       libxml-2.0
+       syspopup-caller
+       ecore-imf
+       ecore-x
+       ecore-input
+       ecore-evas
+       eina
+       evas
+       ecore
+       ecore-file
+       edje
+       icu-i18n
+       icu-io
+       icu-le
+       icu-lx
+       icu-uc
+       efreet-mime
+       pmapi
+       capi-appfw-application
+       capi-media-player
+       capi-media-sound-manager
+       capi-media-image-util
+       capi-media-metadata-extractor
+       capi-content-media-content
+       capi-content-mime-type
+       ui-gadget-1
+)
+
+
+FOREACH(flag ${pkgs_CFLAGS})
+       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -DMACHINE_$ENV{MACHINE} -fPIC")
+
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
+SET(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC")
+SET(CMAKE_C_FLAGS_DEBUG "-O0 -g -fpie")
+SET(CMAKE_C_FLAGS_RELEASE "-O2 -fpie")
+
+
+ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
+ADD_DEFINITIONS("-DFACTORYFS=\"$ENV{FACTORYFS}\"")
+
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+SET(BINDIR "${PREFIX}/bin")
+SET(RESDIR "${PREFIX}/res")
+SET(DATADIR "/opt/apps/org.tizen.video-player/data")
+SET(LOCALEDIR "${RESDIR}/locale")
+SET(ICONDIR "${RESDIR}/icons/default/small")
+SET(EDJDIR "${RESDIR}/edje")
+SET(SLP_LD_PATH_FLAGS -L${CMAKE_CURRENT_SOURCE_DIR}/src/ext)
+
+ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
+ADD_DEFINITIONS("-DRESDIR=\"${RESDIR}\"")
+ADD_DEFINITIONS("-DDATADIR=\"${DATADIR}\"")
+ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"")
+ADD_DEFINITIONS("-DICONDIR=\"${ICONDIR}\"")
+ADD_DEFINITIONS("-DEDJDIR=\"${EDJDIR}\"")
+#ADD_DEFINITIONS("-DUSE_XVIMAGESINK")
+
+
+IF("${ARCH}" STREQUAL "arm")
+       ADD_DEFINITIONS("-DTARGET")
+ENDIF("${ARCH}" STREQUAL "arm")
+
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -pie")
+SET(CMAKE_LDFLAGS "-Wl,-zdefs" )
+
+ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} ${gles_pkg_LDFLAGS} -ldl)
+
+ADD_CUSTOM_TARGET(main.edj COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/res/images
+${CMAKE_SOURCE_DIR}/res/edc/main.edc
+${CMAKE_BINARY_DIR}/res/edc/main.edj DEPENDS
+${CMAKE_SOURCE_DIR}/res/edc/main.edc)
+
+ADD_CUSTOM_TARGET(vp_font.edj COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/res/images
+${CMAKE_SOURCE_DIR}/res/edc/vp_font.edc
+${CMAKE_BINARY_DIR}/res/edc/vp_font.edj DEPENDS
+${CMAKE_SOURCE_DIR}/res/edc/vp_font.edc)
+
+ADD_CUSTOM_TARGET(image_res.edj COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/res/images
+${CMAKE_SOURCE_DIR}/res/edc/image_res.edc
+${CMAKE_BINARY_DIR}/res/edc/image_res.edj DEPENDS
+${CMAKE_SOURCE_DIR}/res/edc/image_res.edc)
+
+ADD_CUSTOM_TARGET(panel.edj COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/res/images
+${CMAKE_SOURCE_DIR}/res/edc/panel.edc
+${CMAKE_BINARY_DIR}/res/edc/panel.edj DEPENDS
+${CMAKE_SOURCE_DIR}/res/edc/panel.edc)
+
+ADD_CUSTOM_TARGET(progress.edj COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/res/images
+${CMAKE_SOURCE_DIR}/res/edc/progress.edc
+${CMAKE_BINARY_DIR}/res/edc/progress.edj DEPENDS
+${CMAKE_SOURCE_DIR}/res/edc/progress.edc)
+
+ADD_CUSTOM_TARGET(control.edj COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/res/images
+${CMAKE_SOURCE_DIR}/res/edc/control.edc
+${CMAKE_BINARY_DIR}/res/edc/control.edj DEPENDS
+${CMAKE_SOURCE_DIR}/res/edc/control.edc)
+
+ADD_CUSTOM_TARGET(animation.edj COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/res/images
+${CMAKE_SOURCE_DIR}/res/edc/animation.edc
+${CMAKE_BINARY_DIR}/res/edc/animation.edj DEPENDS
+${CMAKE_SOURCE_DIR}/res/edc/animation.edc)
+
+ADD_CUSTOM_TARGET(detail.edj COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/res/images
+${CMAKE_SOURCE_DIR}/res/edc/detail.edc
+${CMAKE_BINARY_DIR}/res/edc/detail.edj DEPENDS
+${CMAKE_SOURCE_DIR}/res/edc/detail.edc)
+
+ADD_CUSTOM_TARGET(vp-custom-winset-style.edj COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/res/images
+${CMAKE_SOURCE_DIR}/res/edc/vp-custom-winset-style.edc
+${CMAKE_BINARY_DIR}/res/edc/vp-custom-winset-style.edj DEPENDS
+${CMAKE_SOURCE_DIR}/res/edc/vp-custom-winset-style.edc)
+
+ADD_CUSTOM_TARGET(hidden_button_panel.edj COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/res/images
+${CMAKE_SOURCE_DIR}/res/edc/hidden_button_panel.edc
+${CMAKE_BINARY_DIR}/res/edc/hidden_button_panel.edj DEPENDS
+${CMAKE_SOURCE_DIR}/res/edc/hidden_button_panel.edc)
+
+ADD_CUSTOM_TARGET(popup_progressbar.edj COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/res/images
+${CMAKE_SOURCE_DIR}/res/edc/popup_progressbar.edc
+${CMAKE_BINARY_DIR}/res/edc/popup_progressbar.edj DEPENDS
+${CMAKE_SOURCE_DIR}/res/edc/popup_progressbar.edc)
+
+ADD_CUSTOM_TARGET(multi_win.edj COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/res/images
+${CMAKE_SOURCE_DIR}/res/edc/multi_win.edc
+${CMAKE_BINARY_DIR}/res/edc/multi_win.edj DEPENDS
+${CMAKE_SOURCE_DIR}/res/edc/multi_win.edc)
+
+ADD_DEPENDENCIES(${PROJECT_NAME} main.edj)
+ADD_DEPENDENCIES(${PROJECT_NAME} vp_font.edj)
+ADD_DEPENDENCIES(${PROJECT_NAME} image_res.edj)
+ADD_DEPENDENCIES(${PROJECT_NAME} panel.edj)
+ADD_DEPENDENCIES(${PROJECT_NAME} progress.edj)
+ADD_DEPENDENCIES(${PROJECT_NAME} control.edj)
+ADD_DEPENDENCIES(${PROJECT_NAME} animation.edj)
+ADD_DEPENDENCIES(${PROJECT_NAME} detail.edj)
+ADD_DEPENDENCIES(${PROJECT_NAME} vp-custom-winset-style.edj)
+ADD_DEPENDENCIES(${PROJECT_NAME} hidden_button_panel.edj)
+ADD_DEPENDENCIES(${PROJECT_NAME} popup_progressbar.edj)
+ADD_DEPENDENCIES(${PROJECT_NAME} multi_win.edj)
+
+
+######################################
+# install desktop file & icon, edje  #
+######################################
+
+INSTALL(DIRECTORY DESTINATION ${DATADIR})
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION bin)
+INSTALL(FILES ${CMAKE_BINARY_DIR}/res/edc/main.edj DESTINATION ${EDJDIR})
+INSTALL(FILES ${CMAKE_BINARY_DIR}/res/edc/vp_font.edj DESTINATION ${EDJDIR})
+INSTALL(FILES ${CMAKE_BINARY_DIR}/res/edc/image_res.edj DESTINATION ${EDJDIR})
+INSTALL(FILES ${CMAKE_BINARY_DIR}/res/edc/panel.edj DESTINATION ${EDJDIR})
+INSTALL(FILES ${CMAKE_BINARY_DIR}/res/edc/progress.edj DESTINATION ${EDJDIR})
+INSTALL(FILES ${CMAKE_BINARY_DIR}/res/edc/control.edj DESTINATION ${EDJDIR})
+INSTALL(FILES ${CMAKE_BINARY_DIR}/res/edc/animation.edj DESTINATION ${EDJDIR})
+INSTALL(FILES ${CMAKE_BINARY_DIR}/res/edc/detail.edj DESTINATION ${EDJDIR})
+INSTALL(FILES ${CMAKE_BINARY_DIR}/res/edc/vp-custom-winset-style.edj DESTINATION ${EDJDIR})
+INSTALL(FILES ${CMAKE_BINARY_DIR}/res/edc/hidden_button_panel.edj DESTINATION ${EDJDIR})
+INSTALL(FILES ${CMAKE_BINARY_DIR}/res/edc/popup_progressbar.edj DESTINATION ${EDJDIR})
+INSTALL(FILES ${CMAKE_BINARY_DIR}/res/edc/multi_win.edj DESTINATION ${EDJDIR})
+
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.video-player.xml DESTINATION /opt/share/packages)
+
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/res/images/org.tizen.video-player.png DESTINATION /opt/share/icons/default/small/)
+#INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/res/images/ DESTINATION ${RESDIR}/images)
+INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/res/images/icon/ DESTINATION ${RESDIR}/images/icon)
+INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/res/images/toolbar/ DESTINATION ${RESDIR}/images/toolbar)
+
+ADD_SUBDIRECTORY(res/po)
diff --git a/COPYING b/COPYING
deleted file mode 100644 (file)
index 4bb77a0..0000000
--- a/COPYING
+++ /dev/null
@@ -1,31 +0,0 @@
-HarfBuzz is licensed under the so-called "Old MIT" license.  Details follow.
-
-Copyright © 2011 Codethink Limited
-Copyright © 2010,2011  Google, Inc.
-Copyright © 2006  Behdad Esfahbod
-Copyright © 2009  Keith Stribley
-Copyright © 2009  Martin Hosken and SIL International
-Copyright © 2007  Chris Wilson
-Copyright © 2004,2007,2008,2009,2010  Red Hat, Inc.
-Copyright © 1998-2004  David Turner and Werner Lemberg
-
-For full copyright notices consult the individual files in the package.
-
-
-Permission is hereby granted, without written agreement and without
-license or royalty fees, to use, copy, modify, and distribute this
-software and its documentation for any purpose, provided that the
-above copyright notice and the following two paragraphs appear in
-all copies of this software.
-
-IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
-DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
-ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
-IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGE.
-
-THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
-BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
-ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
-PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
diff --git a/LICENSE b/LICENSE
new file mode 100755 (executable)
index 0000000..7ccb5b5
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,75 @@
+Flora License
+
+Version 1.0, May, 2012
+
+http://www.tizenopensource.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 Compatibility Definition Document and passes the Compatibility Test Suite 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.
+
+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.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.tizenopensource.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.
diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644 (file)
index a405dbf..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-# Process this file with automake to produce Makefile.in
-
-NULL =
-
-SUBDIRS = src util test
-
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = harfbuzz.pc
-
-EXTRA_DIST = \
-       autogen.sh \
-       harfbuzz.doap \
-       $(NULL)
-
-MAINTAINERCLEANFILES = \
-       $(srcdir)/INSTALL \
-       $(srcdir)/aclocal.m4 \
-       $(srcdir)/autoscan.log \
-       $(srcdir)/compile \
-       $(srcdir)/config.guess \
-       $(srcdir)/config.h.in \
-       $(srcdir)/config.sub \
-       $(srcdir)/configure.scan \
-       $(srcdir)/depcomp \
-       $(srcdir)/install-sh \
-       $(srcdir)/ltmain.sh \
-       $(srcdir)/missing \
-       $(srcdir)/mkinstalldirs \
-       $(srcdir)/ChangeLog \
-       `find "$(srcdir)" -type f -name Makefile.in -print`
-
-
-#
-# ChangeLog generation
-#
-CHANGELOG_RANGE =
-ChangeLog: $(srcdir)/ChangeLog
-$(srcdir)/ChangeLog:
-       $(AM_V_GEN) if test -d "$(srcdir)/.git"; then \
-         (GIT_DIR=$(top_srcdir)/.git ./missing --run \
-          git log $(CHANGELOG_RANGE) --stat) | fmt --split-only > $@.tmp \
-         && mv -f $@.tmp $@ \
-         || ($(RM) $@.tmp; \
-             echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
-             (test -f $@ || echo git-log is required to generate this file >> $@)); \
-       else \
-         test -f $@ || \
-         (echo A git checkout and git-log is required to generate ChangeLog >&2 && \
-         echo A git checkout and git-log is required to generate this file >> $@); \
-       fi
-.PHONY: $(srcdir)/ChangeLog
-
-
-#
-# Release engineering
-#
-
-# TODO: Copy infrastructure from cairo
-
-TAR_OPTIONS = --owner=0 --group=0
-dist-hook: dist-clear-sticky-bits
-# Clean up any sticky bits we may inherit from parent dir
-dist-clear-sticky-bits:
-       chmod -R a-s $(distdir)
-
-
-tar_file = $(PACKAGE_TARNAME)-$(VERSION).tar.bz2
-sha256_file = $(tar_file).sha256
-gpg_file = $(sha256_file).asc
-$(sha256_file): $(tar_file)
-       sha256sum $^ > $@
-$(gpg_file): $(sha256_file)
-       @echo "Please enter your GPG password to sign the checksum."
-       gpg --armor --sign $^
-
-release-files: $(tar_file) $(sha256_file) $(gpg_file)
-
-
-
--include $(top_srcdir)/git.mk
diff --git a/NEWS b/NEWS
deleted file mode 100644 (file)
index d31c548..0000000
--- a/NEWS
+++ /dev/null
@@ -1,262 +0,0 @@
-Overview of changes leading to 0.6.0
-Friday, May 27, 2011
-====================================
-
-- Vertical text support in GPOS
-- Almost all API entries have unit tests now, under test/
-- All thread-safety issues are fixed
-
-Summary of API changes follows.
-
-
-* Simple Types API:
-
-  o New API:
-    HB_LANGUAGE_INVALID
-    hb_language_get_default()
-    hb_direction_to_string()
-    hb_direction_from_string()
-    hb_script_get_horizontal_direction()
-    HB_UNTAG()
-
-  o Renamed API:
-    hb_category_t renamed to hb_unicode_general_category_t
-
-  o Changed API:
-    hb_language_t is a typed pointers now
-
-  o Removed API:
-    HB_TAG_STR()
-
-
-* Use ISO 15924 tags for hb_script_t:
-
-  o New API:
-    hb_script_from_iso15924_tag()
-    hb_script_to_iso15924_tag()
-    hb_script_from_string()
-
-  o Changed API:
-    HB_SCRIPT_* enum members changed value.
-
-
-* Buffer API streamlined:
-
-  o New API:
-    hb_buffer_reset()
-    hb_buffer_set_length()
-    hb_buffer_allocation_successful()
-
-  o Renamed API:
-    hb_buffer_ensure() renamed to hb_buffer_pre_allocate()
-    hb_buffer_add_glyph() renamed to hb_buffer_add()
-
-  o Removed API:
-    hb_buffer_clear()
-    hb_buffer_clear_positions()
-
-  o Changed API:
-    hb_buffer_get_glyph_infos() takes an out length parameter now
-    hb_buffer_get_glyph_positions() takes an out length parameter now
-
-
-* Blob API streamlined:
-
-  o New API:
-    hb_blob_get_data()
-    hb_blob_get_data_writable()
-
-  o Renamed API:
-    hb_blob_create_empty() renamed to hb_blob_get_empty()
-
-  o Removed API:
-    hb_blob_lock()
-    hb_blob_unlock()
-    hb_blob_is_writable()
-    hb_blob_try_writable()
-
-  o Changed API:
-    hb_blob_create() takes user_data before destroy now
-
-
-* Unicode functions API:
-
-  o Unicode function vectors can subclass other unicode function vectors now.
-    Unimplemented callbacks in the subclass automatically chainup to the parent.
-
-  o All hb_unicode_funcs_t callbacks take a user_data now.  Their setters
-    take a user_data and its respective destroy callback.
-
-  o New API:
-    hb_unicode_funcs_get_empty()
-    hb_unicode_funcs_get_default()
-    hb_unicode_funcs_get_parent()
-
-  o Changed API:
-    hb_unicode_funcs_create() now takes a parent_funcs.
-
-  o Removed func getter functions:
-    hb_unicode_funcs_get_mirroring_func()
-    hb_unicode_funcs_get_general_category_func()
-    hb_unicode_funcs_get_script_func()
-    hb_unicode_funcs_get_combining_class_func()
-    hb_unicode_funcs_get_eastasian_width_func()
-
-
-* Face API:
-
-  o Renamed API:
-    hb_face_get_table() renamed to hb_face_reference_table()
-    hb_face_create_for_data() renamed to hb_face_create()
-
-  o Changed API:
-    hb_face_create_for_tables() takes user_data before destroy now
-    hb_face_reference_table() returns empty blob instead of NULL
-    hb_get_table_func_t accepts the face as first parameter now
-
-* Font API:
-
-  o Fonts can subclass other fonts now.  Unimplemented callbacks in the
-    subclass automatically chainup to the parent.  When chaining up,
-    scale is adjusted if the parent font has a different scale.
-
-  o All hb_font_funcs_t callbacks take a user_data now.  Their setters
-    take a user_data and its respective destroy callback.
-
-  o New API:
-    hb_font_get_parent()
-    hb_font_funcs_get_empty()
-    hb_font_create_sub_font()
-
-  o Removed API:
-    hb_font_funcs_copy()
-    hb_font_unset_funcs()
-
-  o Removed func getter functions:
-    hb_font_funcs_get_glyph_func()
-    hb_font_funcs_get_glyph_advance_func()
-    hb_font_funcs_get_glyph_extents_func()
-    hb_font_funcs_get_contour_point_func()
-    hb_font_funcs_get_kerning_func()
-
-  o Changed API:
-    hb_font_create() takes a face and references it now
-    hb_font_set_funcs() takes user_data before destroy now
-    hb_font_set_scale() accepts signed integers now
-    hb_font_get_contour_point_func_t now takes glyph first, then point_index
-    hb_font_get_glyph_func_t returns a success boolean now
-
-
-* Changed object model:
-
-  o All object types have a _get_empty() now:
-    hb_blob_get_empty()
-    hb_buffer_get_empty()
-    hb_face_get_empty()
-    hb_font_get_empty()
-    hb_font_funcs_get_empty()
-    hb_unicode_funcs_get_empty()
-
-  o Added _set_user_data() and _get_user_data() for all object types:
-    hb_blob_get_user_data()
-    hb_blob_set_user_data()
-    hb_buffer_get_user_data()
-    hb_buffer_set_user_data()
-    hb_face_get_user_data()
-    hb_face_set_user_data()
-    hb_font_funcs_get_user_data()
-    hb_font_funcs_set_user_data()
-    hb_font_get_user_data()
-    hb_font_set_user_data()
-    hb_unicode_funcs_get_user_data()
-    hb_unicode_funcs_set_user_data()
-
-  o Removed the _get_reference_count() from all object types:
-    hb_blob_get_reference_count()
-    hb_buffer_get_reference_count()
-    hb_face_get_reference_count()
-    hb_font_funcs_get_reference_count()
-    hb_font_get_reference_count()
-    hb_unicode_funcs_get_reference_count()
-
-  o Added _make_immutable() and _is_immutable() for all object types except for buffer:
-    hb_blob_make_immutable()
-    hb_blob_is_immutable()
-    hb_face_make_immutable()
-    hb_face_is_immutable()
-
-
-* Changed API for vertical text support
-
-  o The following callbacks where removed:
-    hb_font_get_glyph_advance_func_t
-    hb_font_get_kerning_func_t
-
-  o The following new callbacks added instead:
-    hb_font_get_glyph_h_advance_func_t
-    hb_font_get_glyph_v_advance_func_t
-    hb_font_get_glyph_h_origin_func_t
-    hb_font_get_glyph_v_origin_func_t
-    hb_font_get_glyph_h_kerning_func_t
-    hb_font_get_glyph_v_kerning_func_t
-
-  o The following API removed as such:
-    hb_font_funcs_set_glyph_advance_func()
-    hb_font_funcs_set_kerning_func()
-    hb_font_get_glyph_advance()
-    hb_font_get_kerning()
-
-  o New API added instead:
-    hb_font_funcs_set_glyph_h_advance_func()
-    hb_font_funcs_set_glyph_v_advance_func()
-    hb_font_funcs_set_glyph_h_origin_func()
-    hb_font_funcs_set_glyph_v_origin_func()
-    hb_font_funcs_set_glyph_h_kerning_func()
-    hb_font_funcs_set_glyph_v_kerning_func()
-    hb_font_get_glyph_h_advance()
-    hb_font_get_glyph_v_advance()
-    hb_font_get_glyph_h_origin()
-    hb_font_get_glyph_v_origin()
-    hb_font_get_glyph_h_kerning()
-    hb_font_get_glyph_v_kerning()
-
-  o The following higher-leve API added for convenience:
-    hb_font_get_glyph_advance_for_direction()
-    hb_font_get_glyph_origin_for_direction()
-    hb_font_add_glyph_origin_for_direction()
-    hb_font_subtract_glyph_origin_for_direction()
-    hb_font_get_glyph_kerning_for_direction()
-    hb_font_get_glyph_extents_for_origin()
-    hb_font_get_glyph_contour_point_for_origin()
-
-
-* OpenType Layout API:
-
-  o New API:
-    hb_ot_layout_position_start()
-    hb_ot_layout_substitute_start()
-    hb_ot_layout_substitute_finish()
-
-
-* Glue code:
-
-  o New API:
-    hb_glib_script_to_script()
-    hb_glib_script_from_script()
-    hb_icu_script_to_script()
-    hb_icu_script_from_script()
-
-
-* Version API added:
-
-  o New API:
-    HB_VERSION_MAJOR
-    HB_VERSION_MINOR
-    HB_VERSION_MICRO
-    HB_VERSION_STRING
-    HB_VERSION_CHECK()
-    hb_version()
-    hb_version_string()
-    hb_version_check()
-
-
diff --git a/NOTICE b/NOTICE
new file mode 100755 (executable)
index 0000000..f085dc6
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1 @@
+Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
diff --git a/README b/README
deleted file mode 100644 (file)
index 74e739d..0000000
--- a/README
+++ /dev/null
@@ -1,7 +0,0 @@
-This is HarfBuzz, a text shaping library.
-
-For bug reports, mailing list, and other information please visit:
-
-  http://harfbuzz.org/
-
-For license information, see the file COPYING.
diff --git a/TODO b/TODO
deleted file mode 100644 (file)
index 4a1ad19..0000000
--- a/TODO
+++ /dev/null
@@ -1,119 +0,0 @@
-General fixes:
-=============
-
-- Warn at compile time (and runtime with HB_DEBUG?) if no Unicode / font
-  funcs found / set.
-
-- In hb_shape(), assert if direction is INVALID.
-
-- Fix TT 'kern' on/off and GPOS interaction (move kerning before GPOS).
-
-- Do proper rounding when scaling from font space?  May be a non-issue.
-
-- Misc features:
-  * init/medi/fina/isol for non-cursive scripts
-  * vkna,hkna etc for kana, etc
-
-- Move non-native direction and normalization handling to the generic non-OT
-  layer, such that uniscribe and other backends can use.
-
-- Uniscribe backend needs to enforce one direction only, otherwise cluster
-  values can confuse the user.
-
-- GSUB ligation should call merge_clusters().  Also other places.
-
-- Convert NBSP into space glyph.
-
-- Synthetic GDEF.
-
-- Add Pango backend?
-
-- Add ICUlayout backend?
-
-- Add ICUlayout API?
-
-- Add Old HarfBuzz backend?
-
-- Add Old HarfBuzz API?
-
-
-API issues to fix before 1.0:
-============================
-
-- Add default font_funcs / Unicode funcs API and to utils.
-
-- Add init_func to font_funcs.  Adjust ft.
-
-- Add pkg-config files for glue codes (harfbuzz-glib, etc)
-
-- Figure out how many .so objects, how to link, etc
-
-- 'const' for getter APIs? (use mutable internally)
-
-- blob_from_file?
-
-
-API additions
-=============
-
-- Buffer (de)serialize API ala hb-shape?
-
-- Move feature parsing from util into the library
-
-- Add hb-cairo glue
-
-- Add sanitize API (and a cached version, that saves result on blob user-data)
-
-- Add glib GBoxedType stuff and introspection
-
-- Add Uniscribe face / font get API
-
-- BCP 47 language handling / API (language_matches?)
-
-- Add hb_face_get_glyph_count()?
-
-- Add hb_font_create_linear()?
-
-- Add hb_shape_plan()/hb_shape_planned()
-
-- Add query API for aalt-like features?
-
-- SFNT api? get_num_faces? get_table_tags? (there's something in stash)
-
-- Add segmentation API
-
-- Add hb-fribidi glue?
-
-
-hb-view / hb-shape enhancements:
-===============================
-
-- Add --width, --height, --auto-size, --align, etc?
-- Add XML and JSON formats to hb-shape
-- --features="init=medi=isol=fina=0"
-
-
-Tests to write:
-==============
-
-- ot-layout enumeration API (needs font)
-
-- Finish test-shape.c, grep for TODO
-
-- Finish test-unicode.c, grep for TODO
-
-- GObject, FreeType, etc
-
-- hb_set_t
-
-- hb_cache_t and relatives
-
-
-Optimizations:
-=============
-
-- Avoid allocating blob objects internally for for_data() faces?
-
-- Add caching layer to hb-ft?
-
-- Cache feature-less shape plans internally on the face.
diff --git a/autogen.sh b/autogen.sh
deleted file mode 100755 (executable)
index 833a621..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-# Run this to generate all the initial makefiles, etc.
-
-test -n "$srcdir" || srcdir=`dirname "$0"`
-test -n "$srcdir" || srcdir=.
-
-olddir=`pwd`
-cd $srcdir
-
-echo -n "checking for ragel... "
-which ragel || {
-       echo "You need to install ragel... See http://www.complang.org/ragel/"
-       exit 1
-}
-
-echo -n "checking for pkg-config... "
-which pkg-config || {
-       echo "*** No pkg-config found, please install it ***"
-       exit 1
-}
-
-echo -n "checking for autoreconf... "
-which autoreconf || {
-       echo "*** No autoreconf found, please install it ***"
-       exit 1
-}
-
-echo "running autoreconf --force --install --verbose"
-autoreconf --force --install --verbose || exit $?
-
-cd $olddir
-echo "running configure $@"
-test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"
diff --git a/configure.ac b/configure.ac
deleted file mode 100644 (file)
index 2fb058f..0000000
+++ /dev/null
@@ -1,208 +0,0 @@
-AC_PREREQ([2.64])
-AC_INIT([harfbuzz],
-        [0.9.0],
-        [http://bugs.freedesktop.org/enter_bug.cgi?product=harfbuzz],
-        [harfbuzz],
-        [http://harfbuzz.org/])
-
-AC_CONFIG_SRCDIR([harfbuzz.pc.in])
-AC_CONFIG_HEADERS([config.h])
-
-AM_INIT_AUTOMAKE([1.11.1 gnu dist-bzip2 no-dist-gzip -Wall no-define])
-AM_SILENT_RULES([yes])
-
-# Initialize libtool
-LT_PREREQ([2.2])
-LT_INIT([disable-static])
-
-# Check for programs
-AC_PROG_CC
-AM_PROG_CC_C_O
-AC_PROG_CXX
-
-# Version
-m4_define(hb_version_triplet,m4_split(AC_PACKAGE_VERSION,[[.]]))
-m4_define(hb_version_major,m4_argn(1,hb_version_triplet))
-m4_define(hb_version_minor,m4_argn(2,hb_version_triplet))
-m4_define(hb_version_micro,m4_argn(3,hb_version_triplet))
-HB_VERSION_MAJOR=hb_version_major
-HB_VERSION_MINOR=hb_version_minor
-HB_VERSION_MICRO=hb_version_micro
-HB_VERSION=AC_PACKAGE_VERSION
-AC_SUBST(HB_VERSION_MAJOR)
-AC_SUBST(HB_VERSION_MINOR)
-AC_SUBST(HB_VERSION_MICRO)
-AC_SUBST(HB_VERSION)
-
-# Libtool version
-m4_define([hb_version_int],
-         m4_eval(hb_version_major*10000 + hb_version_minor*100 + hb_version_micro))
-m4_if(m4_eval(hb_version_minor % 2), [1],
-      dnl for unstable releases
-      [m4_define([hb_libtool_revision], 0)],
-      dnl for stable releases
-      [m4_define([hb_libtool_revision], hb_version_micro)])
-m4_define([hb_libtool_age],
-         m4_eval(hb_version_int - hb_libtool_revision))
-m4_define([hb_libtool_current],
-         m4_eval(hb_version_major + hb_libtool_age))
-HB_LIBTOOL_VERSION_INFO=hb_libtool_current:hb_libtool_revision:hb_libtool_age
-AC_SUBST(HB_LIBTOOL_VERSION_INFO)
-
-dnl GTK_DOC_CHECK([1.15],[--flavour no-tmpl])
-
-# Functions and headers
-AC_CHECK_FUNCS(atexit mprotect sysconf getpagesize sched_yield mmap _setmode isatty)
-AC_CHECK_HEADERS(unistd.h sys/mman.h sched.h io.h)
-
-# Compiler flags
-AC_CANONICAL_HOST
-if test "x$GCC" = "xyes"; then
-
-       # Make symbols link locally
-       LDFLAGS="$LDFLAGS -Bsymbolic-functions"
-
-       # Make sure we don't link to libstdc++
-       CXXFLAGS="$CXXFLAGS -fno-rtti -fno-exceptions"
-
-       case "$host" in
-               arm-*-*)
-                       # Request byte alignment on arm
-                       CXXFLAGS="$CXXFLAGS -mstructure-size-boundary=8"
-               ;;
-       esac
-fi
-
-dnl ==========================================================================
-
-have_ot=true
-if $have_ot; then
-       AC_DEFINE(HAVE_OT, 1, [Have native OpenType Layout backend])
-fi
-AM_CONDITIONAL(HAVE_OT, $have_ot)
-
-dnl ===========================================================================
-
-PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, have_glib=true, have_glib=false)
-if $have_glib; then
-       AC_DEFINE(HAVE_GLIB, 1, [Have glib2 library])
-fi
-AM_CONDITIONAL(HAVE_GLIB, $have_glib)
-
-PKG_CHECK_MODULES(GTHREAD, gthread-2.0, have_gthread=true, have_gthread=false)
-if $have_gthread; then
-       AC_DEFINE(HAVE_GTHREAD, 1, [Have gthread2 library])
-fi
-AM_CONDITIONAL(HAVE_GTHREAD, $have_gthread)
-
-PKG_CHECK_MODULES(GOBJECT, gobject-2.0 glib-2.0 >= 2.16, have_gobject=true, have_gobject=false)
-if $have_gobject; then
-       AC_DEFINE(HAVE_GOBJECT, 1, [Have gobject2 library])
-       GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
-       AC_SUBST(GLIB_MKENUMS)
-fi
-AM_CONDITIONAL(HAVE_GOBJECT, $have_gobject)
-
-dnl ==========================================================================
-
-PKG_CHECK_MODULES(CAIRO, cairo >= 1.8.0, have_cairo=true, have_cairo=false)
-if $have_cairo; then
-       AC_DEFINE(HAVE_CAIRO, 1, [Have cairo graphics library])
-fi
-AM_CONDITIONAL(HAVE_CAIRO, $have_cairo)
-
-PKG_CHECK_MODULES(CAIRO_FT, cairo-ft, have_cairo_ft=true, have_cairo_ft=false)
-if $have_cairo_ft; then
-       AC_DEFINE(HAVE_CAIRO_FT, 1, [Have cairo-ft support in cairo graphics library])
-fi
-AM_CONDITIONAL(HAVE_CAIRO_FT, $have_cairo_ft)
-
-dnl ==========================================================================
-
-PKG_CHECK_MODULES(ICU, icu, have_icu=true, [
-       have_icu=true
-       AC_CHECK_HEADERS(unicode/uchar.h,, have_icu=false)
-       AC_MSG_CHECKING([for libicuuc])
-       LIBS_old=$LIBS
-       LIBS="$LIBS -licuuc"
-       AC_TRY_LINK([#include <unicode/uchar.h>],
-                   [u_getIntPropertyValue (0, (UProperty)0);],
-                   AC_MSG_RESULT(yes),
-                   AC_MSG_RESULT(no);have_icu=false)
-       LIBS=$LIBS_old
-       if $have_icu; then
-               ICU_CFLAGS=-D_REENTRANT
-               ICU_LIBS="-licuuc"
-               AC_SUBST(ICU_CFLAGS)
-               AC_SUBST(ICU_LIBS)
-       fi
-])
-if $have_icu; then
-       AC_DEFINE(HAVE_ICU, 1, [Have ICU library])
-fi
-AM_CONDITIONAL(HAVE_ICU, $have_icu)
-
-dnl ==========================================================================
-
-PKG_CHECK_MODULES(GRAPHITE2, graphite2, have_graphite=true, have_graphite=false)
-if $have_graphite; then
-    AC_DEFINE(HAVE_GRAPHITE2, 1, [Have Graphite library])
-fi
-AM_CONDITIONAL(HAVE_GRAPHITE2, $have_graphite)
-
-dnl ==========================================================================
-
-PKG_CHECK_MODULES(FREETYPE, freetype2 >= 2.3.8, have_freetype=true, have_freetype=false)
-if $have_freetype; then
-       AC_DEFINE(HAVE_FREETYPE, 1, [Have FreeType 2 library])
-       _save_libs="$LIBS"
-       _save_cflags="$CFLAGS"
-       LIBS="$LIBS $FREETYPE_LIBS"
-       CFLAGS="$CFLAGS $FREETYPE_CFLAGS"
-       AC_CHECK_FUNCS(FT_Face_GetCharVariantIndex)
-       LIBS="$_save_libs"
-       CFLAGS="$_save_cflags"
-fi
-AM_CONDITIONAL(HAVE_FREETYPE, $have_freetype)
-
-dnl ===========================================================================
-
-AC_CHECK_HEADERS(usp10.h windows.h, have_uniscribe=true, have_uniscribe=false)
-if $have_uniscribe; then
-       UNISCRIBE_CFLAGS=
-       UNISCRIBE_LIBS="-lusp10 -lgdi32"
-       AC_SUBST(UNISCRIBE_CFLAGS)
-       AC_SUBST(UNISCRIBE_LIBS)
-       AC_DEFINE(HAVE_UNISCRIBE, 1, [Have Uniscribe backend])
-fi
-AM_CONDITIONAL(HAVE_UNISCRIBE, $have_uniscribe)
-
-dnl ===========================================================================
-
-AC_CACHE_CHECK([for Intel atomic primitives], hb_cv_have_intel_atomic_primitives, [
-       hb_cv_have_intel_atomic_primitives=false
-       AC_TRY_LINK([], [
-               void memory_barrier (void) { __sync_synchronize (); }
-               int atomic_add (int i) { return __sync_fetch_and_add (&i, 1); }
-               int atomic_cmpxchg (int *i, int *j, int *k) { return __sync_bool_compare_and_swap (&i, j, k); }
-               ], hb_cv_have_intel_atomic_primitives=true
-       )
-])
-if $hb_cv_have_intel_atomic_primitives; then
-       AC_DEFINE(HAVE_INTEL_ATOMIC_PRIMITIVES, 1, [Have Intel __sync_* atomic primitives])
-fi
-
-dnl ===========================================================================
-
-AC_CONFIG_FILES([
-Makefile
-harfbuzz.pc
-src/Makefile
-src/hb-version.h
-util/Makefile
-test/Makefile
-test/api/Makefile
-test/shaping/Makefile
-])
-
-AC_OUTPUT
diff --git a/contrib/python/README b/contrib/python/README
deleted file mode 100644 (file)
index 72a3527..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-This contains a wrapping of harfbuzz into python. The module is dependent on pyrex. To build, type:
-
-python setup.py build
-
-In addition there is a test application, hbtestfont. It has GTK based gui output and for this, python modules for gtk, gobject and cairo are needed. The application may be run without gui output using the --nogui option.
-
-Applications may be executed in the build context, without needing to install any modules or libraries, using the runpy script from the contrib/python directory. Thus one might type:
-
-./runpy script/hbtestfont -f "Charis SIL" 0048 0069 0303
-
diff --git a/contrib/python/lib/fontconfig.pyx b/contrib/python/lib/fontconfig.pyx
deleted file mode 100644 (file)
index 16e0289..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-cdef extern from "fontconfig/fontconfig.h" :
-    ctypedef struct FcPattern :
-        pass
-    ctypedef struct FcConfig :
-        pass
-    cdef enum FcResult '_FcResult' :
-        FcResultMatch = 0, FcResultNoMatch, FcResultTypeMismatch, FcResultNoId,
-        FcResultOutOfMemory
-
-    ctypedef char FcChar8
-    FcPattern *FcNameParse(FcChar8 *name)
-    FcPattern *FcFontMatch(FcConfig *config, FcPattern *match, FcResult *res)
-    FcResult FcPatternGetInteger(FcPattern *pattern, char *typeid, int index, int *res)
-    FcResult FcPatternGetString(FcPattern *pattern, char *typeid, int index, FcChar8 **res)
-    void FcPatternPrint(FcPattern *pattern)
-    void FcPatternDestroy(FcPattern *pattern)
-
-    FcConfig *FcConfigGetCurrent()
-
-cdef class fcPattern :
-    cdef FcPattern *_pattern
-
-    def __init__(self, char *name) :
-        cdef FcPattern *temp
-        cdef FcResult res
-
-        temp = FcNameParse(<FcChar8 *>name)
-        self._pattern = FcFontMatch(FcConfigGetCurrent(), temp, &res)
-        if res != FcResultMatch :
-            print "Failed to match" + str(res)
-            self._pattern = <FcPattern *>0
-
-    def __destroy__(self) :
-        FcPatternDestroy(self._pattern)
-
-    def getInteger(self, char *typeid, int index) :
-        cdef int res
-        if self._pattern == <FcPattern *>0 or FcPatternGetInteger(self._pattern, typeid, index, &res) != FcResultMatch : return None
-        return res
-
-    def getString(self, char *typeid, int index) :
-        cdef FcChar8 *res
-        if self._pattern == <FcPattern *>0 or FcPatternGetString(self._pattern, typeid, index, &res) != FcResultMatch : return None
-        return <char *>res
-
-    def debugPrint(self) :
-        FcPatternPrint(self._pattern)
diff --git a/contrib/python/lib/harfbuzz.pyx b/contrib/python/lib/harfbuzz.pyx
deleted file mode 100644 (file)
index f483fd6..0000000
+++ /dev/null
@@ -1,215 +0,0 @@
-cdef extern from "stdlib.h":
-    ctypedef int size_t
-    void *malloc(size_t size)
-    void free(void* ptr)
-
-cdef extern from "ft2build.h" :
-    pass
-
-cdef extern from "freetype/freetype.h" :
-    ctypedef void *FT_Library
-    ctypedef void *FT_Face
-    ctypedef int FT_Error
-
-    FT_Error FT_Init_FreeType (FT_Library *alib)
-    FT_Error FT_Done_FreeType (FT_Library alib)
-    FT_Error FT_Done_Face (FT_Face alib)
-    FT_Error FT_New_Face( FT_Library library, char *path, unsigned long index, FT_Face *aface)
-    FT_Error FT_Set_Char_Size (FT_Face aFace, unsigned int size_x, unsigned int size_y, unsigned int res_x, unsigned int res_y)
-
-cdef extern from "hb-common.h" :
-    cdef enum hb_direction_t :
-        HB_DIRECTION_LTR
-        HB_DIRECTION_RTL
-        HB_DIRECTION_TTB
-        HB_DIRECTION_BTT
-    ctypedef unsigned long hb_codepoint_t
-    ctypedef long hb_position_t
-    ctypedef unsigned long hb_mask_t
-    ctypedef unsigned long hb_tag_t
-    hb_tag_t hb_tag_from_string (char *s)
-    ctypedef void (*hb_destroy_func_t) (void *user_data)
-
-cdef extern from "hb-unicode.h" :
-# there must be a better way of syncing this list with the true source
-    ctypedef enum hb_script_t :
-        HB_SCRIPT_COMMON = 0
-
-cdef extern from "hb-language.h" :
-    ctypedef void *hb_language_t
-    hb_language_t hb_language_from_string(char *str)
-    char * hb_language_to_string(hb_language_t language)
-
-cdef extern from "hb-ot-tag.h" :
-    hb_script_t hb_ot_tag_to_script (hb_tag_t tag)
-
-cdef extern from "hb-buffer.h" :
-    ctypedef struct hb_buffer_t :
-        pass
-
-    ctypedef struct hb_glyph_info_t :
-        hb_codepoint_t codepoint
-        hb_mask_t mask
-        unsigned long cluster
-
-    ctypedef union hb_var_int_t:
-        unsigned long u32
-
-    ctypedef struct hb_glyph_position_t :
-        hb_position_t x_advance
-        hb_position_t y_advance
-        hb_position_t x_offset
-        hb_position_t y_offset
-        hb_var_int_t  var
-
-    hb_buffer_t *hb_buffer_create(unsigned int size)
-    hb_buffer_t *hb_buffer_reference(hb_buffer_t *buffer)
-    unsigned int hb_buffer_get_reference_count(hb_buffer_t *buffer)
-    void hb_buffer_destroy(hb_buffer_t *buffer)
-    void hb_buffer_set_direction(hb_buffer_t *buffer, hb_direction_t direction)
-    hb_direction_t hb_buffer_get_direction(hb_buffer_t *buffer)
-    void hb_buffer_set_script(hb_buffer_t *buffer, hb_script_t script)
-    hb_script_t hb_buffer_get_script(hb_buffer_t *buffer)
-    void hb_buffer_set_language(hb_buffer_t *buffer, hb_language_t language)
-    hb_language_t hb_buffer_get_language(hb_buffer_t *buffer)
-    void hb_buffer_clear(hb_buffer_t *)
-    void hb_buffer_clear_positions(hb_buffer_t *buffer)
-    void hb_buffer_ensure(hb_buffer_t *buffer, unsigned int size)
-    void hb_buffer_reverse(hb_buffer_t *buffer)
-    void hb_buffer_reverse_clusters(hb_buffer_t *buffer)
-    void hb_buffer_add_glyph(hb_buffer_t *buffer, hb_codepoint_t codepoint, hb_mask_t mask, unsigned int cluster)
-    void hb_buffer_add_utf8(hb_buffer_t *buffer, char *text, unsigned int text_length, unsigned int item_offset, unsigned int item_length)
-    unsigned int hb_buffer_get_length(hb_buffer_t *buffer)
-    hb_glyph_info_t *hb_buffer_get_glyph_infos(hb_buffer_t *buffer)
-    hb_glyph_position_t *hb_buffer_get_glyph_positions(hb_buffer_t *buffer)
-
-cdef extern from "hb-blob.h" :
-    cdef struct hb_blob_t :
-        pass
-# do I need blob functions here?
-
-cdef extern from "hb-font.h" :
-    ctypedef struct hb_face_t :
-        pass
-    ctypedef struct hb_font_t :
-        pass
-
-    ctypedef hb_blob_t * (*hb_get_table_func_t) (hb_tag_t tag, void *user_data)
-    hb_face_t * hb_face_create_for_data(hb_blob_t *blob, unsigned int index)
-    hb_face_t * hb_face_create_for_tables(hb_get_table_func_t get_table, hb_destroy_func_t destroy, void *user_data)
-    hb_face_t * hb_face_reference(hb_face_t *face)
-    unsigned int hb_face_get_reference_count(hb_face_t *face)
-    void hb_face_destroy(hb_face_t *face)
-    void hb_font_destroy(hb_font_t *font)
-    hb_blob_t * hb_face_get_table(hb_face_t *face, hb_tag_t tag)
-
-
-cdef extern from "hb-shape.h" :
-    ctypedef struct hb_feature_t :
-        int tag
-        unsigned int value
-        unsigned int start
-        unsigned int end
-
-    void hb_shape (hb_font_t *font, hb_face_t *face, hb_buffer_t *buffer, hb_feature_t *features, unsigned int num_features)
-
-cdef extern from "hb-ft.h" :
-    hb_face_t *hb_ft_face_create (FT_Face ft_face, hb_destroy_func_t destroy)
-    hb_font_t *hb_ft_font_create (FT_Face ft_face, hb_destroy_func_t destroy)
-
-class glyphinfo :
-    def __init__(self, gid, cluster, advance, offset, internal = 0) :
-        self.gid = gid
-        self.cluster = cluster
-        self.advance = advance
-        self.offset = offset
-        self.internal = internal
-
-    def __repr__(self) :
-        res = "{0:d}>{1:d}@({2:.2f},{3:.2f})+({4:.2f},{5:.2f})".format(self.gid, self.cluster, self.offset[0], self.offset[1], self.advance[0], self.advance[1])
-        if self.internal : res += "/i=" + str(self.internal)
-        return res
-
-cdef class buffer :
-    cdef hb_buffer_t *buffer
-
-    def __init__(self, char *text, unsigned int length) :
-        """Note text must be a utf-8 string and length is number of chars"""
-        self.buffer = hb_buffer_create(length)
-        hb_buffer_add_utf8(self.buffer, text, length, 0, len(text))
-
-    def set_scriptlang(self, char *script, char *lang) :
-        cdef hb_language_t language
-        cdef hb_script_t scriptnum
-
-        language = hb_language_from_string(lang)
-        scriptnum = hb_ot_tag_to_script(hb_tag_from_string(script))
-        hb_buffer_set_script(self.buffer, scriptnum)
-        hb_buffer_set_language(self.buffer, language)
-
-    def get_info(self, scale = 1) :
-        cdef hb_glyph_info_t *infos
-        cdef hb_glyph_position_t *positions
-        cdef unsigned int num
-        cdef unsigned int i
-        res = []
-
-        num = hb_buffer_get_length(self.buffer)
-        infos = hb_buffer_get_glyph_infos(self.buffer)
-        positions = hb_buffer_get_glyph_positions(self.buffer)
-        for 0 <= i < num :
-            temp = glyphinfo(infos[i].codepoint, infos[i].cluster, (positions[i].x_advance / scale, positions[i].y_advance / scale), (positions[i].x_offset / scale, positions[i].y_offset / scale), positions[i].var.u32)
-            res.append(temp)
-        return res
-
-    def get_settings(self) :
-        cdef hb_script_t script
-        cdef hb_language_t lang
-
-        script = hb_buffer_get_script(self.buffer)
-        lang = hb_buffer_get_language(self.buffer)
-        return {'script' : script, 'language' : hb_language_to_string(lang)}
-
-    def __del__(self) :
-        hb_buffer_destroy(self.buffer)
-
-cdef class ft :
-    cdef FT_Library engine
-    cdef FT_Face face
-    cdef hb_face_t *hbface
-    cdef hb_font_t *hbfont
-
-    def __init__(self, char *fname, size) :
-        cdef FT_Library engine
-        FT_Init_FreeType(&engine)
-        self.engine = engine
-        cdef FT_Face face
-        FT_New_Face(engine, fname, 0, &face)
-        FT_Set_Char_Size(face, size << 6, size << 6, 72, 72)
-        self.face = face
-        self.hbface = hb_ft_face_create(face, <void (*)(void *)>hb_face_destroy)
-        self.hbfont = hb_ft_font_create(face, <void (*)(void *)>hb_font_destroy)
-
-    def __del__(self) :
-        cdef FT_Library engine
-        engine = self.engine
-        cdef FT_Face face
-        face = self.face
-        FT_Done_Face(face)
-        FT_Done_FreeType(engine)
-
-    def shape(self, buffer aBuffer, features = {}) :
-        cdef hb_feature_t *feats
-        cdef hb_feature_t *aFeat
-        feats = <hb_feature_t *>malloc(sizeof(hb_feature_t) * len(features))
-        aFeat = feats
-        for k,v in features.items() :
-            aFeat.tag = hb_tag_from_string (k)
-            aFeat.value = int(v)
-            aFeat.start = 0
-            aFeat.end = -1
-            aFeat += 1
-        hb_shape(self.hbfont, self.hbface, aBuffer.buffer, feats, len(features))
-
-
diff --git a/contrib/python/runpy b/contrib/python/runpy
deleted file mode 100755 (executable)
index b39db1b..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-LD_LIBRARY_PATH=../../src/.libs PYTHONPATH=build/lib.`python -c 'import distutils.util, sys; print distutils.util.get_platform()+"-"+str(sys.version_info[0])+"."+str(sys.version_info[1])'` "$@"
diff --git a/contrib/python/scripts/hbtestfont b/contrib/python/scripts/hbtestfont
deleted file mode 100755 (executable)
index 7736ae6..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-#!/usr/bin/python
-
-import harfbuzz, optparse, sys
-from fontconfig import fcPattern
-
-usage = '''usage: %prog [options] codepoints
-    Generates output of glyphs and positions. Each entry is of the form:
-        glyphid>cluster@(offsetx,offsety)+(advancex,advancey)
-
-    codepoints is a space separated list of hex values of Unicode codepoints'''
-p = optparse.OptionParser(usage=usage)
-p.add_option('-s', '--size', default=32, type="int", help="point size")
-p.add_option('-l', '--lang', help="language code")
-p.add_option('-c', '--script', help="script code")
-p.add_option('-F', '--feature', action='append', help="define a feature key=val")
-p.add_option('-f', '--font', help='Font to use to render glyphs. My be a font file', default="verdana")
-p.add_option('-b', '--bold', help='Choose bold fonts', action='store_true')
-p.add_option('-i', '--italic', help='Choose italic fonts', action='store_true')
-p.add_option('-d', '--debug', action='store_true', help="Output trace info")
-p.add_option('--nogui', action='store_true', help="Don't display a gui")
-(opts, args) = p.parse_args()
-
-if opts.font.lower().endswith(".ttf") :
-    fpat = ":file="
-else :
-    fpat = ""
-fpat += opts.font + ":weight="
-fpat += "bold" if opts.bold else "medium"
-fpat += ":slant="
-fpat += "italic" if opts.italic else "roman"
-pat = fcPattern(fpat)
-fname = pat.getString("file", 0)
-family = pat.getString("family", 0)
-print "Processing: " + fname
-if opts.font.lower().endswith(".ttf") and opts.font != fname :
-    print "Failed to find font in fontconfig. Exiting"
-    sys.exit(1)
-
-ft = harfbuzz.ft(fname, opts.size)
-text = "".join(unichr(int(c, 16)) for c in args)
-bytes = text.encode('utf_8')
-buffer = harfbuzz.buffer(bytes, len(text))
-if (opts.lang or opts.script) : buffer.set_scriptlang(opts.script if opts.script else "", opts.lang if opts.lang else "")
-features = {}
-if opts.feature :
-    for f in opts.feature :
-        k, v = f.split("=")
-        features[k] = v
-ft.shape(buffer, features = features)
-res = buffer.get_info(64)       # scale for 26.6
-print res
-
-if not opts.nogui :
-    try:
-        import gtk
-        import gobject
-        import cairo
-        from gtk import gdk
-    except :
-        raise SystemExit
-    import pygtk
-
-    if gtk.pygtk_version < (2, 8) :
-        print "PyGtk 2.8 or later required"
-        raise SystemExit
-
-    class GlyphsWindow (gtk.Widget) :
-        def __init__(self, fontname, bold, italic, size, glyphs) :
-            gtk.Widget.__init__(self)
-            self.fontname = fontname
-            self.size = size
-            self.glyphs = glyphs
-            self.bold = bold
-            self.italic = italic
-
-        def do_realize(self) :
-            self.set_flags(gtk.REALIZED)
-            self.window = gdk.Window(
-                    self.get_parent_window(),
-                    width = self.allocation.width,
-                    height = self.allocation.height,
-                    window_type = gdk.WINDOW_CHILD,
-                    wclass = gdk.INPUT_OUTPUT,
-                    event_mask = self.get_events() | gdk.EXPOSURE_MASK)
-            self.window.set_user_data(self)
-            self.style.attach(self.window)
-            self.style.set_background(self.window, gtk.STATE_NORMAL)
-            self.window.move_resize(*self.allocation)
-            
-        def do_unrealize(self) :
-            self.window.destroy()
-
-        def do_expose_event(self, event) :
-            cr = self.window.cairo_create()
-            cr.set_matrix(cairo.Matrix(1, 0, 0, 1, 0, 1.5 * self.size))
-            cr.set_font_face(cairo.ToyFontFace(self.fontname, cairo.FONT_SLANT_ITALIC if self.italic else cairo.FONT_SLANT_NORMAL, cairo.FONT_WEIGHT_BOLD if self.bold else cairo.FONT_WEIGHT_NORMAL))
-            cr.set_font_size(self.size)
-            cr.show_glyphs(self.glyphs)      # [(gid, originx, originy)]
-
-    glyphs = []
-    org = [0, 0]
-    for g in res :
-        glyphs.append((g.gid, org[0] + g.offset[0], org[1] + g.offset[1]))
-        org[0] += g.advance[0]
-        org[1] += g.advance[1]
-
-    gobject.type_register(GlyphsWindow)
-    win = gtk.Window()
-    win.resize(org[0] + 10, 2 * opts.size + 40)
-    win.connect('delete-event', gtk.main_quit)
-    frame = gtk.Frame("glyphs")
-    win.add(frame)
-    w = GlyphsWindow(family, opts.bold, opts.italic, opts.size, glyphs)
-    frame.add(w)
-    win.show_all()
-    gtk.main()
diff --git a/contrib/python/setup.py b/contrib/python/setup.py
deleted file mode 100755 (executable)
index f592728..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/python
-
-from distutils.core import setup
-from glob import glob
-from Pyrex.Distutils.extension import Extension
-from Pyrex.Distutils import build_ext
-
-setup(name='harfbuzz',
-    version='0.0.1',
-    description='Harfbuzz compatibility layer',
-    long_description='Harfbuzz python integration modules and supporting scripts',
-    maintainer='Martin Hosken',
-    maintainer_email='martin_hosken@sil.org',
-    packages=['harfbuzz'],
-    ext_modules = [
-        Extension("harfbuzz", ["lib/harfbuzz.pyx"], libraries=["harfbuzz"], library_dirs=["../../src/.libs"], include_dirs=["/usr/include/freetype2", "../../src"]),
-        Extension("fontconfig", ["lib/fontconfig.pyx"], libraries=["fontconfig"])
-        ],
-    cmdclass = {'build_ext' : build_ext},
-    scripts = glob('scripts/*'),
-    license = 'LGPL',
-    platforms = ['Linux', 'Win32', 'Mac OS X'],
-    package_dir = {'harfbuzz' : 'lib'}
-)
-
index f60ddf7..9aa8b91 100755 (executable)
@@ -1,127 +1,7 @@
-harfbuzz (0.9.0-1slp2+1) unstable; urgency=low
+video-player (0.1.5) unstable; urgency=low
 
-  * Upgrade to latest harfbuzz
-  * Git: 165.213.180.234:slp/pkgs/h/harfbuzz
-  * Tag: harfbuzz_0.9.1-1slp2+1
+  * Initial release.
+  * Git: pkgs/v/video-player
+  * Tag : video-player_0.1.5
 
- -- Ankush Dua <ankush.d@samsung.com>  Wed, 27 June 2012 15:00:08 +0900
-
-harfbuzz (0.7.0-1slp2+1) unstable; urgency=low
-
-  * Upgrade to latest harfbuzz
-
- -- Mike McCormack <mj.mccormack@samsung.com>  Wed, 03 Aug 2011 17:42:58 +0900
-
-harfbuzz (0.4.1-1slp2+2) unstable; urgency=low
-
-  * Move headers to dev package
-  * use CMake to build
-
- -- Mike McCormack <mj.mccormack@samsung.com>  Thu, 21 Apr 2011 19:10:30 +0900
-
-harfbuzz (0.4.1-1slp2+1) unstable; urgency=low
-
-  * Fixed an issue with uninitialized values
-  * Fixed an issue with log clusters not updated correctly.
-  * Git: 165.213.180.234:slp/pkgs/h/harfbuzz
-  * Tag: harfbuzz_0.4.1-1slp2+1
-
- -- Tom Hacohen <tom.hacohen@partner.samsung.com>  Tue, 18 Jan 2011 16:00:38 +0900
-
-harfbuzz (0.4.0-1slp2+13) unstable; urgency=low
-
-  * Fixed version number in the .pc file
-  * Git: 165.213.180.234:slp/pkgs/h/harfbuzz
-  * Tag: harfbuzz_0.4.0-1slp2+13
-
- -- Tom Hacohen <tom.hacohen@partner.samsung.com>  Tue, 04 Jan 2011 16:45:04 +0200
-
-harfbuzz (0.4.0-1slp2+12) unstable; urgency=low
-
-  * Modify git repository path
-  * Git: 165.213.180.234:slp/pkgs/h/harfbuzz
-  * Tag: harfbuzz_0.4.0-1slp2+12
-
- -- Jihoon Kim <jihoon48.kim@samsung.com>  Mon, 20 Dec 2010 13:45:30 +0900
-
-harfbuzz (0.4.0-1slp2+11) unstable; urgency=low
-
-  * Change FPIC to fPIC
-  * Git: 165.213.180.234:/git/slp/pkgs/harfbuzz
-  * Tag: harfbuzz_0.4.0-1slp2+11
-
- -- Jihoon Kim <jihoon48.kim@samsung.com>  Mon, 20 Dec 2010 13:39:26 +0900
-
-harfbuzz (0.4.0-1slp2+10) unstable; urgency=low
-
-  * Add git tag
-  * Git: 165.213.180.234:/git/slp/pkgs/harfbuzz
-  * Tag: harfbuzz_0.4.0-1slp2+10
-
- -- Jihoon Kim <jihoon48.kim@samsung.com>  Wed, 10 Nov 2010 11:30:49 +0900
-
-harfbuzz (0.4.0-1slp2+8) unstable; urgency=low
-
-  * Added maintainer according to policy
-
- -- prameet.k <prameet.k@partner.samsung.com>  Fri, 21 May 2010 10:00:53 +0900
-
-harfbuzz (0.4.0-1slp2+7) unstable; urgency=low
-
-  * Change maintainer according to the policy
-
- -- Jihoon Kim <jihoon48.kim@samsung.com>  Wed, 21 Apr 2010 10:00:53 +0900
-
-harfbuzz (0.4.0-1slp2+6) unstable; urgency=high
-
-  * Modified the control file
-
- -- Janani <janani.k@samsung.com>  Thu, 08 Apr 2010 15:14:53 +0530
-
-harfbuzz (0.4.0-1slp2+5) unstable; urgency=low
-
-  * Removed DOS style line endings 
-
- -- Janani <janani.k@samsung.com>  Thu, 08 Apr 2010 10:53:45 +0530
-
-harfbuzz (0.4.0-1slp2+4) unstable; urgency=low
-
-  * Minor changes 
-
- -- Janani <janani.k@samsung.com>  Tue, 06 Apr 2010 13:14:09 +0530
-
-harfbuzz (0.4.0-1slp2+3) unstable; urgency=low
-
-  * Modified makefile and install file
-
- -- Janani <janani.k@samsung.com>  Tue, 06 Apr 2010 13:11:30 +0530
-
-harfbuzz (0.4.0-1slp2+2) unstable; urgency=low
-
-  * Package name changed 
-
- -- Janani <janani.k@samsung.com>  Fri, 26 Mar 2010 14:18:04 +0530
-
-harfbuzz (0.4.0-1slp2+1) unstable; urgency=low
-
-  * Repackaging
-
- -- Janani <janani.k@samsung.com>  Fri, 26 Mar 2010 10:14:37 +0530
-
-harfbuzz (0.3) unstable; urgency=low
-
-  * Email ID corrected
-
- -- Janani <janani.k@samsung.com>  Wed, 17 Mar 2010 16:00:07 +0530
-
-harfbuzz (0.2) unstable; urgency=low
-
-  * Owner Changed
-
- -- Janani <janani.k@samsung.com>  Mon, 15 Mar 2010 16:57:26 +0530
-
-harfbuzz (0.1) unstable; urgency=low
-
-  * Initial Release.
-
- -- Janani <janani.k@samsung.com>  Fri, 05 Mar 2010 10:49:10 +0530
+ -- jongdong.lee <jongdong.lee@samsung.com>  Tue, 06 Dec 2011 16:49:05 -0800
index 065539e..f312da5 100755 (executable)
@@ -1,24 +1,19 @@
-Source: harfbuzz
-Section: libs
+Source: video-player
+Section: video
 Priority: optional
-Maintainer: janani <janani.k@samsung.com>, Ankush Dua <ankush.d@samsung.com>
-Build-Depends: debhelper (>= 5),libfreetype6-dev, pkg-config, ragel
+Maintainer: JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>, JuBong Lee <jubong@samsung.com>
+Uploaders: JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>, JuBong Lee <jubong@samsung.com>
+Build-Depends: debhelper (>= 5),libelm-dev, libappcore-efl-dev, libui-gadget-dev, libslp-utilx-dev, libmm-common-dev, libmm-player-dev, libmm-sound-dev, dlog-dev, libslp-pm-dev, libmm-session-dev, libmm-ta-dev, libmm-fileinfo-dev, libappcore-common-dev, libmedia-service-dev, libxml2-0, syspopup-caller-dev, libecore, libecore-file, libecore-imf, libecore-x, libecore-input, libecore-evas, libeina, libevas, libedje, libappsvc-dev, libail-0-dev, libefreet-dev, libicu-dev, execstack
 Standards-Version: 3.7.2
 
-Package: libharfbuzz
+Package: org.tizen.video-player
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: Hindi Reshaping Library 
+Depends: ${shlibs:Depends}, ${misc:Depends}, libappcore-efl-0, libslp-utilx-0, libslp-sensor-0, libmm-common, libmm-player, libmm-log, libmm-ta, libmm-sound-0, libmm-fileinfo, libdlog-0, libmm-session-0, libslp-setting-0, libappcore-efl-0, libui-gadget-0, libmm-utility, libxml2-0, libmedia-service, libpng12-0, libappsvc-0, libail-0, libmedia-utils
+Description: Video & streaming player
 
-
-Package: libharfbuzz-dev
-Architecture: any
-Section: libdevel
-Depends: ${misc:Depends}, libharfbuzz (= ${binary:Version})
-Description: Hindi reshaping library (unstripped)
-
-Package: libharfbuzz-dbg
+Package: org.tizen.video-player-dbg
 Section: debug
 Architecture: any
-Depends: ${misc:Depends}, libharfbuzz (= ${Source-Version})
-Description: Hindi reshaping library (unstripped)
+Depends: ${shlibs:Depends}, ${misc:Depends}, org.tizen.video-player (= ${Source-Version})
+Description: Video & streaming player (unstripped)
+
diff --git a/debian/copyright b/debian/copyright
deleted file mode 100755 (executable)
index 634932c..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-This is harfbuzz library ,maintained by prameet <prameet.k@partner.samsung.com>
-on Fri, 05 Mar 2010 10:49:10 +0530.
-
-The original source can always be found at:
-       ftp://ftp.debian.org/dists/unstable/main/source/
-
-Copyright Holder:  unknown
-
-License:
-
-  This program is free software; you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation; either version 2 of the License, or
-  (at your option) any later version.
-
-  This program is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License
-  along with this package; if not, write to the Free Software
-  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-
-On Debian systems, the complete text of the GNU General
-Public License can be found in `/usr/share/common-licenses/GPL'.
diff --git a/debian/dirs b/debian/dirs
deleted file mode 100755 (executable)
index ca882bb..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-usr/bin
-usr/sbin
diff --git a/debian/docs b/debian/docs
deleted file mode 100755 (executable)
index e69de29..0000000
diff --git a/debian/libharfbuzz-dev.install b/debian/libharfbuzz-dev.install
deleted file mode 100644 (file)
index 3e46237..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-debian/tmp/usr/include/*
-debian/tmp/usr/lib/lib*.so
-debian/tmp/usr/lib/pkgconfig/*.pc
diff --git a/debian/libharfbuzz.install b/debian/libharfbuzz.install
deleted file mode 100755 (executable)
index 0177db1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-debian/tmp/usr/lib/libharfbuzz.so.*
diff --git a/debian/org.tizen.video-player.install b/debian/org.tizen.video-player.install
new file mode 100755 (executable)
index 0000000..eb020fa
--- /dev/null
@@ -0,0 +1,7 @@
+/opt/apps/org.tizen.video-player/bin/*
+/opt/apps/org.tizen.video-player/res/locale/*
+/opt/apps/org.tizen.video-player/res/icons/default/small/*
+/opt/apps/org.tizen.video-player/res/edje/*
+/opt/apps/org.tizen.video-player/res/images/*
+/opt/apps/org.tizen.video-player/data
+/opt/share/applications/*
diff --git a/debian/org.tizen.video-player.install.in b/debian/org.tizen.video-player.install.in
new file mode 100755 (executable)
index 0000000..0ac9b2d
--- /dev/null
@@ -0,0 +1,7 @@
+@PREFIX@/bin/*
+@PREFIX@/res/locale/*
+@PREFIX@/res/icons/default/small/*
+@PREFIX@/res/edje/*
+@PREFIX@/res/images/*
+@PREFIX@/data
+/opt/share/applications/*
diff --git a/debian/org.tizen.video-player.postinst b/debian/org.tizen.video-player.postinst
new file mode 100755 (executable)
index 0000000..1c1810e
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+# Create a directory to store video-player bookmark pictures and stuffs.
+# mkdir -p /opt/data/video-player
+
+if [ ${USER} == "root" ]
+then
+    #chown 5000:5000 /opt/data/video-player
+    chown -R 5000:5000 /opt/apps/org.tizen.video-player/data
+
+fi
diff --git a/debian/org.tizen.video-player.postinst.in b/debian/org.tizen.video-player.postinst.in
new file mode 100755 (executable)
index 0000000..1c1810e
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+# Create a directory to store video-player bookmark pictures and stuffs.
+# mkdir -p /opt/data/video-player
+
+if [ ${USER} == "root" ]
+then
+    #chown 5000:5000 /opt/data/video-player
+    chown -R 5000:5000 /opt/apps/org.tizen.video-player/data
+
+fi
index 8882abb..5097cee 100755 (executable)
@@ -1,9 +1,122 @@
 #!/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.
 
-include /usr/share/cdbs/1/class/autotools.mk
-include /usr/share/cdbs/1/rules/debhelper.mk
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
 
-DEB_CONFIGURE_SCRIPT := ./autogen.sh
 
-DEB_MAKE_CLEAN_TARGET := distclean
+CFLAGS += -Wall -g
+LDFLAGS ?= 
+PREFIX ?= /opt/apps/org.tizen.video-player
+RESDIR ?= /opt/apps/org.tizen.video-player/res
+DATADIR ?= /opt/apps/org.tizen.video-player/data
 
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+       CFLAGS += -O0
+else
+       CFLAGS += -O2
+endif
+CFLAGS += -fpie
+LDFLAGS += -Wl,--rpath=$(PREFIX)/lib -Wl,--as-needed -pie
+
+configure: configure-stamp
+configure-stamp:
+       dh_testdir
+       # Add here commands to configure the package.
+       CFLAGS="$(CFLAGS)" 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.
+       $(MAKE)
+       #docbook-to-man debian/video-player.sgml > video-player.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#@RESDIR@#$(RESDIR)#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.
+       -$(MAKE) clean
+       
+       find ./ -depth -type d -name "CMakeFiles" -exec rm {} -rf \;
+       find ./ -name "Makefile" -exec rm {} -f \;
+       find ./ -name "cmake_install.cmake" -exec rm {} -f \;
+       rm -rf CMakeCache.txt
+       rm -rf install_manifest.txt
+       rm -rf *.pc
+       rm -rf *.so
+       rm -rf org.tizen.video-player.desktop
+       rm -rf res/edc/*.edj
+
+       dh_clean 
+
+install: build
+       dh_testdir
+       dh_testroot
+       dh_clean -k 
+       dh_installdirs
+
+       # Add here commands to install the package into debian/video-player.
+       $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
+       execstack -c $(CURDIR)/debian/tmp/opt/apps/org.tizen.video-player/bin/video-player
+
+
+# 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_strip --dbg-package=org.tizen.video-player-dbg
+       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
diff --git a/debian/substvars b/debian/substvars
new file mode 100755 (executable)
index 0000000..5c38c57
--- /dev/null
@@ -0,0 +1 @@
+shlibs:Depends=libdbus-1-0 (>= 1.1.1), libeet1, libeina-svn-04 (>= 0.0.2.062+svn20090910), libelm-svn-01, libembryo0, libglib2.0-0, libgstreamer-plugins-base0.10-0, libgstreamer0.10-0, libimlib2, zlib1g
diff --git a/git.mk b/git.mk
deleted file mode 100644 (file)
index 088ef0b..0000000
--- a/git.mk
+++ /dev/null
@@ -1,184 +0,0 @@
-# git.mk
-#
-# Copyright 2009, Red Hat, Inc.
-# Written by Behdad Esfahbod
-#
-# Copying and distribution of this file, with or without modification,
-# are permitted in any medium without royalty provided the copyright
-# notice and this notice are preserved.
-#
-# The canonical source for this file is pango/git.mk, or whereever the
-# header of pango/git.mk suggests in the future.
-#
-# To use in your project, import this file in your git repo's toplevel,
-# then do "make -f git.mk".  This modifies all Makefile.am files in
-# your project to include git.mk.
-#
-# This enables automatic .gitignore generation.  If you need to ignore
-# more files, add them to the GITIGNOREFILES variable in your Makefile.am.
-# But think twice before doing that.  If a file has to be in .gitignore,
-# chances are very high that it's a generated file and should be in one
-# of MOSTLYCLEANFILES, CLEANFILES, DISTCLEANFILES, or MAINTAINERCLEANFILES.
-#
-# The only case that you need to manually add a file to GITIGNOREFILES is
-# when remove files in one of mostlyclean-local, clean-local, distclean-local,
-# or maintainer-clean-local.
-#
-# Note that for files like editor backup, etc, there are better places to
-# ignore them.  See "man gitignore".
-#
-# If "make maintainer-clean" removes the files but they are not recognized
-# by this script (that is, if "git status" shows untracked files still), send
-# me the output of "git status" as well as your Makefile.am and Makefile for
-# the directories involved.
-#
-# For a list of toplevel files that should be in MAINTAINERCLEANFILES, see
-# pango/Makefile.am.
-#
-# Don't EXTRA_DIST this file.  It is supposed to only live in git clones,
-# not tarballs.  It serves no useful purpose in tarballs and clutters the
-# build dir.
-#
-# This file knows how to handle autoconf, automake, libtool, gtk-doc,
-# gnome-doc-utils, intltool.
-#
-#
-# KNOWN ISSUES:
-#
-# - Recursive configure doesn't work as $(top_srcdir)/git.mk inside the
-#   submodule doesn't find us.  If you have configure.{in,ac} files in
-#   subdirs, add a proxy git.mk file in those dirs that simply does:
-#   "include $(top_srcdir)/../git.mk".  Add more ..'s to your taste.
-#   And add those files to git.  See vte/gnome-pty-helper/git.mk for
-#   example.
-#
-
-git-all: git-mk-install
-
-git-mk-install:
-       @echo Installing git makefile
-       @any_failed=; find $(top_srcdir) -name Makefile.am | while read x; do \
-               if grep 'include .*/git.mk' $$x >/dev/null; then \
-                       echo $$x already includes git.mk; \
-               else \
-                       failed=; \
-                       echo "Updating $$x"; \
-                       { cat $$x; \
-                         echo ''; \
-                         echo '-include $$(top_srcdir)/git.mk'; \
-                       } > $$x.tmp || failed=1; \
-                       if test x$$failed = x; then \
-                               mv $$x.tmp $$x || failed=1; \
-                       fi; \
-                       if test x$$failed = x; then : else \
-                               echo Failed updating $$x; >&2 \
-                               any_failed=1; \
-                       fi; \
-       fi; done; test -z "$$any_failed"
-
-.PHONY: git-all git-mk-install
-
-
-### .gitignore generation
-
-$(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk
-       $(AM_V_GEN) \
-       { \
-               if test "x$(DOC_MODULE)" = x -o "x$(DOC_MAIN_SGML_FILE)" = x; then :; else \
-                       for x in \
-                               $(DOC_MODULE)-decl-list.txt \
-                               $(DOC_MODULE)-decl.txt \
-                               tmpl/$(DOC_MODULE)-unused.sgml \
-                               "tmpl/*.bak" \
-                               xml html \
-                       ; do echo /$$x; done; \
-               fi; \
-               if test "x$(DOC_MODULE)" = x -o "x$(DOC_LINGUAS)" = x; then :; else \
-                       for x in \
-                               $(_DOC_C_DOCS) \
-                               $(_DOC_LC_DOCS) \
-                               $(_DOC_OMF_ALL) \
-                               $(_DOC_DSK_ALL) \
-                               $(_DOC_HTML_ALL) \
-                               $(_DOC_POFILES) \
-                               "*/.xml2po.mo" \
-                               "*/*.omf.out" \
-                       ; do echo /$$x; done; \
-               fi; \
-               if test -f $(srcdir)/po/Makefile.in.in; then \
-                       for x in \
-                               po/Makefile.in.in \
-                               po/Makefile.in \
-                               po/Makefile \
-                               po/POTFILES \
-                               po/stamp-it \
-                               po/.intltool-merge-cache \
-                               "po/*.gmo" \
-                               "po/*.mo" \
-                               po/$(GETTEXT_PACKAGE).pot \
-                               intltool-extract.in \
-                               intltool-merge.in \
-                               intltool-update.in \
-                       ; do echo /$$x; done; \
-               fi; \
-               if test -f $(srcdir)/configure; then \
-                       for x in \
-                               autom4te.cache \
-                               configure \
-                               config.h \
-                               stamp-h1 \
-                               libtool \
-                               config.lt \
-                       ; do echo /$$x; done; \
-               fi; \
-               for x in \
-                       .gitignore \
-                       $(GITIGNOREFILES) \
-                       $(CLEANFILES) \
-                       $(PROGRAMS) \
-                       $(check_PROGRAMS) \
-                       $(EXTRA_PROGRAMS) \
-                       $(LTLIBRARIES) \
-                       so_locations \
-                       .libs _libs \
-                       $(MOSTLYCLEANFILES) \
-                       "*.$(OBJEXT)" \
-                       "*.lo" \
-                       $(DISTCLEANFILES) \
-                       $(am__CONFIG_DISTCLEAN_FILES) \
-                       $(CONFIG_CLEAN_FILES) \
-                       TAGS ID GTAGS GRTAGS GSYMS GPATH tags \
-                       "*.tab.c" \
-                       $(MAINTAINERCLEANFILES) \
-                       $(BUILT_SOURCES) \
-                       $(DEPDIR) \
-                       Makefile \
-                       Makefile.in \
-                       "*.orig" \
-                       "*.rej" \
-                       "*.bak" \
-                       "*~" \
-                       ".*.sw[nop]" \
-               ; do echo /$$x; done; \
-       } | \
-       sed "s@^/`echo "$(srcdir)" | sed 's/\(.\)/[\1]/g'`/@/@" | \
-       sed 's@/[.]/@/@g' | \
-       LC_ALL=C sort | uniq > $@.tmp && \
-       mv $@.tmp $@;
-
-all: $(srcdir)/.gitignore gitignore-recurse-maybe
-gitignore-recurse-maybe:
-       @if test "x$(SUBDIRS)" = "x$(DIST_SUBDIRS)"; then :; else \
-               $(MAKE) $(AM_MAKEFLAGS) gitignore-recurse; \
-       fi;
-gitignore-recurse:
-       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) .gitignore gitignore-recurse || echo "Skipping $$subdir"); \
-       done
-gitignore: $(srcdir)/.gitignore gitignore-recurse
-
-maintainer-clean: gitignore-clean
-gitignore-clean:
-       -rm -f $(srcdir)/.gitignore
-
-.PHONY: gitignore-clean gitignore gitignore-recurse gitignore-recurse-maybe
diff --git a/harfbuzz.doap b/harfbuzz.doap
deleted file mode 100644 (file)
index d2896eb..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-<Project xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-         xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
-         xmlns:foaf="http://xmlns.com/foaf/0.1/"
-         xmlns="http://usefulinc.com/ns/doap#">
-
-  <name xml:lang="en">harfbuzz</name>
-  <shortdesc xml:lang="en">Text shaping library</shortdesc>
-
-  <homepage
-  rdf:resource="http://harfbuzz.org/" />
-  <mailing-list
-  rdf:resource="http://lists.freedesktop.org/mailman/listinfo/harfbuzz" />
-  <!--download-page
-  rdf:resource=""/-->
-  <bug-database
-  rdf:resource="http://bugs.freedesktop.org/enter_bug.cgi?product=harfbuzz"/>
-
-  <maintainer>
-    <foaf:Person>
-      <foaf:name>Behdad Esfahbod</foaf:name>
-      <foaf:mbox rdf:resource="mailto:harfbuzz@behdad.org" />
-    </foaf:Person>
-  </maintainer>
-</Project>
diff --git a/harfbuzz.pc.in b/harfbuzz.pc.in
deleted file mode 100644 (file)
index e92319e..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: harfbuzz
-Description: Text shaping library
-Version: @VERSION@
-
-Libs: -L${libdir} -lharfbuzz
-Cflags: -I${includedir}/harfbuzz
diff --git a/include/mp-drm-ctrl.h b/include/mp-drm-ctrl.h
new file mode 100644 (file)
index 0000000..25ed52e
--- /dev/null
@@ -0,0 +1,74 @@
+/*\r
+ * 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.\r
+ * \r
+ *    Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]\r
+ * \r
+ *    Licensed under the Flora License, Version 1.0 (the "License");\r
+ *    you may not use this file except in compliance with the License.\r
+ *    You may obtain a copy of the License at\r
+ * \r
+ *        http://www.tizenopensource.org/license\r
+ * \r
+ *    Unless required by applicable law or agreed to in writing, software\r
+ *    distributed under the License is distributed on an "AS IS" BASIS,\r
+ *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ *    See the License for the specific language governing permissions and\r
+ *    limitations under the License.\r
+ */\r
+\r
+\r
+#ifndef _MP_DRM_CTRL_H_\r
+#define _MP_DRM_CTRL_H_\r
+\r
+#define        DRM_STR_LEN_MAX         2048\r
+\r
+typedef enum\r
+{\r
+       MP_VIDEO_DRM_ERROR_NONE = 0,\r
+       MP_VIDEO_DRM_ERROR_INTERNAL,\r
+       MP_VIDEO_DRM_ERROR_TIME_BASED,\r
+       MP_VIDEO_DRM_ERROR_INTERVAL,\r
+       MP_VIDEO_DRM_ERROR_INTERVAL_FIRST_USE,\r
+       MP_VIDEO_DRM_ERROR_ACCUMULATED,\r
+       MP_VIDEO_DRM_ERROR_COUNT,\r
+       MP_VIDEO_DRM_ERROR_COUNT_SMALL,\r
+       MP_VIDEO_DRM_ERROR_TIME_COUNT_BASED,\r
+       MP_VIDEO_DRM_ERROR_TIME_INDIVIDULAL,\r
+       MP_VIDEO_DRM_ERROR_TIME_SYSTEM,\r
+       MP_VIDEO_DRM_ERROR_MAX,\r
+}MpVideoDrmErrorType;\r
+\r
+\r
+\r
+typedef struct\r
+{\r
+       int     nErrorCode;\r
+       int     nData;\r
+}MpVideoDrmInfo;\r
+\r
+\r
+typedef enum\r
+{\r
+       VIDEO_DRM_CONSUMPTION_STATE_DISABLE             = 0,\r
+       VIDEO_DRM_CONSUMPTION_STATE_ENABLE,\r
+}MpVideoDrmConsumptionStateType;\r
+\r
+\r
+void   MpVideoDrmInit(void);\r
+bool   MpVideoDrmGetForwardLookState(void);\r
+void   MpVideoDrmSetConsumptionState(int nState);\r
+int    MpVideoDrmGetConsumption(void);\r
+void   MpVideoDrmStartConsumption(char *szPath);\r
+void   MpVideoDrmPauseConsumption(void);\r
+void   MpVideoDrmResumeConsumption(void);\r
+void   MpVideoDrmStopConsumption(void);\r
+bool   MpVideoDrmIsDrmFile(char* szPath);              //bool MpVideoDrmFileRight(char* szPath);\r
+bool   MpVideoDrmHasValidRo(char* szPath);\r
+bool   MpVideoDrmCheckForward(char* szPath);\r
+MpVideoDrmInfo *MpVideoDrmCheckLeftRo(char* szVideoTitle, char* szPath);\r
+bool   MpVideoDrmCheckExpiration(char* szPath);\r
+\r
+/* DivX DRM functions */\r
+void   MpVideoDrmGetFileExtension(char *szPath, char *szContentType, int nContentTypeStrSize);\r
+\r
+#endif //_MP_DRM_CTRL_H_\r
diff --git a/include/mp-external-ug.h b/include/mp-external-ug.h
new file mode 100755 (executable)
index 0000000..333f086
--- /dev/null
@@ -0,0 +1,50 @@
+/*\r
+ * 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.\r
+ * \r
+ *    Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]\r
+ * \r
+ *    Licensed under the Flora License, Version 1.0 (the "License");\r
+ *    you may not use this file except in compliance with the License.\r
+ *    You may obtain a copy of the License at\r
+ * \r
+ *        http://www.tizenopensource.org/license\r
+ * \r
+ *    Unless required by applicable law or agreed to in writing, software\r
+ *    distributed under the License is distributed on an "AS IS" BASIS,\r
+ *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ *    See the License for the specific language governing permissions and\r
+ *    limitations under the License.\r
+ */\r
+\r
+\r
+\r
+#ifndef _MP_EXTERNAL_UG_\r
+#define  _MP_EXTERNAL_UG_\r
+\r
+\r
+#include <ui-gadget.h>\r
+\r
+\r
+typedef enum\r
+{\r
+       MP_EXTERNAL_UG_NONE                             = -1,\r
+       MP_EXTERNAL_UG_MESSAGE                  = 0,\r
+       MP_EXTERNAL_UG_EMAIL,\r
+       MP_EXTERNAL_UG_MYFILE_DETAIL,\r
+       MP_EXTERNAL_UG_YOUTUBE,\r
+       MP_EXTERNAL_UG_BLUETOOTH,\r
+       MP_EXTERNAL_UG_FTM,\r
+       MP_EXTERNAL_UG_FACEBOOK,\r
+       MP_EXTERNAL_UG_MAX,\r
+}MpExternalUGType;\r
+\r
+\r
+bool MpExternalUgLoad(MpExternalUGType nExternalUGType, void* pUserData);\r
+void MpExternalUgUnload(void);\r
+void MpExternalUgDestroyAll(void);\r
+int    MpExternalUgGetCurUgState(void);\r
+void MpExternalUgSetUgState(MpExternalUGType nExternalUGType);\r
+bool MpExternalUgShow(void *pUserData, void *pParent);\r
+void MpExternalUgHide();\r
+\r
+#endif // _MP_EXTERNAL_UG_\r
diff --git a/include/mp-util-media-service.h b/include/mp-util-media-service.h
new file mode 100755 (executable)
index 0000000..e481798
--- /dev/null
@@ -0,0 +1,123 @@
+/*\r
+ * 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.\r
+ * \r
+ *    Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]\r
+ * \r
+ *    Licensed under the Flora License, Version 1.0 (the "License");\r
+ *    you may not use this file except in compliance with the License.\r
+ *    You may obtain a copy of the License at\r
+ * \r
+ *        http://www.tizenopensource.org/license\r
+ * \r
+ *    Unless required by applicable law or agreed to in writing, software\r
+ *    distributed under the License is distributed on an "AS IS" BASIS,\r
+ *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ *    See the License for the specific language governing permissions and\r
+ *    limitations under the License.\r
+ */\r
+\r
+\r
+\r
+#ifndef _MP_UTIL_DATABASE_\r
+#define _MP_UTIL_DATABASE_\r
+\r
+#include "video-player.h"\r
+#include <glib.h>\r
+\r
+typedef enum\r
+{\r
+       MP_MEDIA_VIDEO_FILE_TYPE                        = 0,\r
+       MP_MEDIA_CAMERA_FILE_TYPE,\r
+       MP_MEDIA_ALL_FILE_TYPE,\r
+       MP_MEDIA_FILE_TYPE_MAX,\r
+}MpMediaSvcVideoFileType;\r
+\r
+typedef enum\r
+{\r
+       MP_MEDIA_SORT_BY_NONE                           = 0,\r
+       MP_MEDIA_SORT_BY_NAME_ASC,\r
+       MP_MEDIA_SORT_BY_NAME_DESC,\r
+       MP_MEDIA_SORT_BY_DATE_MOST_RECENT,\r
+       MP_MEDIA_SORT_BY_OLDEST,\r
+       MP_MEDIA_SORT_BY_MAX,\r
+}MpMediaSvcSortType;\r
+\r
+typedef enum\r
+{\r
+       MP_MEDIA_LIST_TYPE_FOLDER                       = 0,\r
+       MP_MEDIA_LIST_TYPE_ALL_FOLDER_GALLERY,\r
+       MP_MEDIA_LIST_TYPE_TAG_GALLERY,\r
+       MP_MEDIA_LIST_TYPE_FAVORITE,\r
+       MP_MEDIA_LIST_TYPE_ALLSHARE,\r
+       MP_MEDIA_LIST_TYPE_MAX,\r
+}MpMediaSvcListType;\r
+\r
+\r
+void MpUtilMediaSvcInitSession(void);\r
+void MpUtilMediaSvcFinishSession(void);\r
+\r
+////////////////////////////////////////////////////////\r
+// Manage video item list\r
+\r
+// For gallery list\r
+bool MpUtilMediaSvcExtractVideoListFromFolder(char* szFolderPath, int nSortType);    // For myfiles.\r
+bool MpUtilMediaSvcExtractVideoListFromAllFolderOfGallery(int nSortType);            // For 'All' folder of gallery.\r
+bool MpUtilMediaSvcExtractVideoListVideoType(int nSortType);                         // For only video type files of video list view.\r
+bool MpUtilMediaSvcExtractVideoListRecordedType(int nSortType);                      // For only recorded type files of video list view.\r
+bool MpUtilMediaSvcExtractVideoListByTagName(char *szTagName);                       // For tag folder of gallery.\r
+bool MpUtilMediaSvcExtractVideoListFromFavorite(int nSortType);                      // For favorite naming of gallery.\r
+bool MpUtilMediaSvcExtractVideoListForSearchView(const char *keyword);               // For only video type files of video search view*/\r
+\r
+\r
+void MpUtilMediaSvcDestoryVideoList(void);\r
+bool MpUtilMediaSvcRemoveItemByUrlWithList(char *szFilePath);\r
+bool MpUtilMediaSvcRemoveItemByListIndex(int nVideoItemIndex);\r
+bool MpUtilMediaSvcRemoveItemByListIndexWithoutListItem(int nVideoItemIndex);\r
+\r
+\r
+bool MpUtilMediaSvcGetVideoIDByVideoUri(const char *szPath, char *szVideoID);\r
+char* MpUtilMediaSvcGetVideoThumbnailByVideoUri(const char *szMediaUri);\r
+unsigned int MpUtilMediaSvcGetVideoLastPlayTimeByVideoUri(const char *szPath);\r
+unsigned int MpUtilMediaSvcGetVideoDurationByVideoUri(const char *szPath);\r
+int MpUtilMediaSvcGetVideoFilesizeByVideoUri(const char *szPath);\r
+void MpUtilMediaSvcSetVideoLastPlayedTimeByUri(char* szMediaUri, unsigned int nLastPlayedTime);\r
+\r
+bool MpUtilMediaSvcGetVideoCurrentUrlPreNextItem(char* szCurrMediaUri, char* szPreMediaUri, char* szNextMediaUri,bool bLoop);\r
+\r
+// For video list\r
+char* MpUtilMediaSvcGetVideoUrl(const int nVideoItemIndex);\r
+char* MpUtilMediaSvcGetVideoThumbnail(const int nVideoItemIndex);\r
+char* MpUtilMediaSvcGetVideoTitle(const int nVideoItemIndex);\r
+int MpUtilMediaSvcGetVideoDurationTime(const int nVideoItemIndex);\r
+int MpUtilMediaSvcGetVideoLastPlayedPos(const int nVideoItemIndex);\r
+int MpUtilMediaSvcGetVideoItemSize(const int nVideoItemIndex);\r
+int MpUtilMediaSvcGetVideoItemWidth(const int nVideoItemIndex);\r
+int MpUtilMediaSvcGetVideoItemHeight(const int nVideoItemIndex);\r
+time_t MpUtilMediaSvcGetVideoItemDateTime(const int nVideoItemIndex);\r
+char *MpUtilMediaSvcGetVideoItemExtension(const int nVideoItemIndex);\r
+double MpUtilMediaSvcGetVideoItemLongitude(const int nVideoItemIndex);\r
+double MpUtilMediaSvcGetVideoItemLatitude(const int nVideoItemIndex);\r
+\r
+int MpUtilMediaSvcGetVideoListSize(void);\r
+void MpUtilMediaSvcPrintListInfo(void);\r
+int MpUtilMediaSvcFindVideoItemIndexByUrl(const char *szPath);\r
+\r
+// For folder list\r
+bool MpUtilMediaSvcExtractVideoFolderList(int nSortType);\r
+bool MpUtilMediaSvcDestoryVideoFolderList(void);\r
+int MpUtilMediaSvcGetVideoFolderListSize(void);\r
+char* MpUtilMediaSvcGetVideoFolderName(int nVideoFolderIndex);\r
+char* MpUtilMediaSvcGetVideoFolderUrl(int nVideoFolderIndex);\r
+\r
+////////////////////////////////////////////////////////\r
+// Manage bookmark\r
+\r
+bool MpUtilMediaSvcBookmarkListGet(char *vid, GList **list);\r
+void MpUtilMediaSvcBookmarkListClear(GList *list);\r
+int MpUtilMediaSvcBookmarkInsert(char *vid, int position, char *path);\r
+int MpUtilMediaSvcBookmarkDelete(char *vid, int position);\r
+int MpUtilMediaSvcBookmarkDeleteAll(char *vid);\r
+char* MpUtilMediaSvcBookmarkGetThumbnail(void* pBookmarkItemHandle);\r
+int MpUtilMediaSvcBookmarkGetPos(void* pBookmarkItemHandle);\r
+\r
+#endif // _MP_UTIL_DATABASE_
\ No newline at end of file
diff --git a/include/mp-util.h b/include/mp-util.h
new file mode 100644 (file)
index 0000000..b43747d
--- /dev/null
@@ -0,0 +1,92 @@
+/*\r
+ * 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.\r
+ * \r
+ *    Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]\r
+ * \r
+ *    Licensed under the Flora License, Version 1.0 (the "License");\r
+ *    you may not use this file except in compliance with the License.\r
+ *    You may obtain a copy of the License at\r
+ * \r
+ *        http://www.tizenopensource.org/license\r
+ * \r
+ *    Unless required by applicable law or agreed to in writing, software\r
+ *    distributed under the License is distributed on an "AS IS" BASIS,\r
+ *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ *    See the License for the specific language governing permissions and\r
+ *    limitations under the License.\r
+ */\r
+\r
+\r
+\r
+#ifndef _MP_UTIL_\r
+#define _MP_UTIL_\r
+\r
+\r
+#include "video-player.h"\r
+\r
+\r
+typedef enum\r
+{\r
+       NORMAL_POPUP_RETURN_TYPE_UNKNOW         = 0,\r
+       NORMAL_POPUP_RETURN_TYPE_YES,\r
+       NORMAL_POPUP_RETURN_TYPE_NO,\r
+       NORMAL_POPUP_RETURN_TYPE_ERR,\r
+}NormalPopUpRetType;\r
+\r
+\r
+void   MpUtilResetForRelaunching(void);\r
+void   MpUtilSetAlphaOfMainWindow(bool bSetAlpha);\r
+void*  MpUtilCreateMainWindow(const char *pStrName);\r
+\r
+int  MpUtilSetKeyGrab(const char* szKeyName, int nGrabMode);\r
+int  MpUtilSetKeyUngrab(const char* szKeyName);\r
+bool MpUtilCheckRTSPType(char *szUriPath);\r
+int  MpUtilCheckPlayerType(char *szUriPath);\r
+bool MpUtilCheckLocalFileExist(char *uri);\r
+bool MpUtilCheckBatteryStatus(void);\r
+int  MpUtilBatteryStatusNoti(VideoAppData* pAppData);\r
+int  MpUtilBatteryStatusNotiIgnore(void);\r
+int  MpUtilMMCstatusNoti(VideoAppData* pAppData);\r
+int  MpUtilMMCstatusNotiIgnore(void);\r
+void MpUtilLanguageInit(VideoAppData* pAppData);\r
+int  MpUtilCheckDlnaSortType(void* pSvcHandle, char* szBundleKey);\r
+int  MpUtilCheckDlnaMediaID(void* pSvcHandle, char* szBundleKey);\r
+void MpUtilInitXML();\r
+void MpUtilDestroyXML();\r
+char* MpUtilGetXMLQualityURL(void);\r
+bool MpUtilIsXMLUrl(char* szMediaUri);\r
+bool MpUtilParsingXML(char* szMediaUri);\r
+int  MpUtilGetXMLItemCount(void);\r
+int  MpUtilGetRotationStateFromAppcore(void);\r
+int  MpUtilGetRotationState(void);\r
+void MpUtilSetRotationState(int nCurRotation);\r
+bool MpUtilGetTitleFromFilepath(char* szFilepath, char* szTitle, int nLengthTitle);\r
+void MpUtilInitSession(void);\r
+void MpUtilFinishSession(void);\r
+void MpUtilVolumeTypeSet(void);\r
+void MpUtilVolumeTypeUnset(void);\r
+void MpUtilDeletePopupHandle(void);\r
+bool MpUtilNotifyPopUp(VideoAppData* pAppData, char* szContents, void* PopupButtonCallbackFunc);\r
+bool MpUtilWarinigPopUp(VideoAppData *pAppData, char *szContents,void *PopupButtonCallbackFunc);\r
+bool MpUtilYesNoPopUp(VideoAppData *pAppData, char *szTitle, char *szContents, void *PopupYesButtonCallbackFunc, void *PopupNoButtonCallbackFunc);\r
+bool MpUtilRemoveQuestionPopUp(VideoAppData *pAppData, void *PopupDeleteButtonCallbackFunc, void *PopupCancelButtonCallbackFunc, void *pUserData);\r
+bool MpUtilDetailPopup(VideoAppData *pAppData, int nVideoItemIndex, char *szTitle, void *PopupButtonCallbackFunc);\r
+bool MpUtilProgressPopUp(VideoAppData* pAppData, char* szLabel);\r
+void *MpUtilCreateButtonIcon(void *pParent, const char *szIconPath, bool bSizeUp, bool bSizeDown, int nAspectWidth, int nAspectHeight, void *pUserData, char* szButtonStyle, void *func);\r
+void* MpUtilCreateStyleButton(void *pParent, const char* szButtonText, const void *pUserData, char* szButtonStyle, void *func);\r
+void* MpUtilLoadEdjFile(Evas* pEvas, char* szEdjName, char* szGroupName);\r
+bool MpUtilCheckCallStatus(void);\r
+bool MpUtilIsConnectEarjack(void);\r
+unsigned int MpUtilGetMainWindowXID(void);\r
+bool MpUtilRegisteEarjackCbFunc(void* pEarjackCb, void* pUserData);\r
+void MpUtilRotateWindow(int nRotateMode, void* pWindowHandle);\r
+void MpUtilGetUserAgent(VideoAppData* pAppData);\r
+double MpUtilGetSysTime(void);\r
+void MpUtilLcdNormalPowerLockForResume(void);\r
+void MpUtilLcdNormalPowerUnlockForPause(void);\r
+void MpUtilLcdOffForPowerButton(void);\r
+bool MpUtilTurnOverSensorInit(void *pUserData);\r
+bool MpUtilTurnOverSensorDestroy(void);\r
+void MpUtilMultimediaKeyGrab(void);\r
+void MpUtilMultimediaKeyUngrab(void);\r
+#endif // _MP_UTIL_\r
diff --git a/include/mp-video-animation-ctrl.h b/include/mp-video-animation-ctrl.h
new file mode 100755 (executable)
index 0000000..42a04d2
--- /dev/null
@@ -0,0 +1,35 @@
+/*\r
+ * 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.\r
+ * \r
+ *    Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]\r
+ * \r
+ *    Licensed under the Flora License, Version 1.0 (the "License");\r
+ *    you may not use this file except in compliance with the License.\r
+ *    You may obtain a copy of the License at\r
+ * \r
+ *        http://www.tizenopensource.org/license\r
+ * \r
+ *    Unless required by applicable law or agreed to in writing, software\r
+ *    distributed under the License is distributed on an "AS IS" BASIS,\r
+ *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ *    See the License for the specific language governing permissions and\r
+ *    limitations under the License.\r
+ */\r
+\r
+\r
+#ifndef _VIDEO_LOADING_ANIMATION_CTRL_\r
+#define  _VIDEO_LOADING_ANIMATION_CTRL_\r
+\r
+\r
+void*  MpVideoAnimationCtrlInit(void* pUserData);\r
+void   MpVideoAnimationCtrlDestroy(void);\r
+void   MpVideoAnimationCtrlSetPercent(int nPercent);\r
+void   MpVideoAnimationCtrlPlay(void);\r
+void   MpVideoAnimationCtrlStop(void);\r
+void   MpVideoAnimationCtrlShow(void);\r
+void   MpVideoAnimationCtrlHide(void);\r
+bool   MpVideoAnimationCtrlGetActiveState(void);\r
+\r
+\r
+#endif /* _VIDEO_LOADING_ANIMATION_CTRL_ */\r
+\r
diff --git a/include/mp-video-app-ctrl.h b/include/mp-video-app-ctrl.h
new file mode 100755 (executable)
index 0000000..6fb0899
--- /dev/null
@@ -0,0 +1,34 @@
+/*\r
+ * 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.\r
+ * \r
+ *    Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]\r
+ * \r
+ *    Licensed under the Flora License, Version 1.0 (the "License");\r
+ *    you may not use this file except in compliance with the License.\r
+ *    You may obtain a copy of the License at\r
+ * \r
+ *        http://www.tizenopensource.org/license\r
+ * \r
+ *    Unless required by applicable law or agreed to in writing, software\r
+ *    distributed under the License is distributed on an "AS IS" BASIS,\r
+ *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ *    See the License for the specific language governing permissions and\r
+ *    limitations under the License.\r
+ */\r
+\r
+\r
+#ifndef _VIDEO_APP_CTRL_\r
+#define _VIDEO_APP_CTRL_\r
+\r
+\r
+#include "video-player.h"\r
+\r
+\r
+bool MpVideoAppCtrlInit(VideoAppData* pAppData);\r
+bool MpVideoAppCtrlResetForRelaunching(VideoAppData* pAppData);\r
+bool MpVideoAppCtrlIsTopView(void* pUserData);\r
+bool MpVideoAppCtrlIsExistPlayerHandle(void);\r
+void MpVideoAppCtrlSetForCheckingForegroundwindow(bool bForwgroundState);\r
+void MpVideoAppCtrlSetRotation(int nRotateMode, void *pUserData);\r
+\r
+#endif /* _VIDEO_APP_CTRL_ */\r
diff --git a/include/mp-video-ctrl-mgr.h b/include/mp-video-ctrl-mgr.h
new file mode 100644 (file)
index 0000000..a8b2cf3
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * 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 [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
+ * 
+ *    Licensed under the Flora License, Version 1.0 (the "License");
+ *    you may not use this file except in compliance with the License.
+ *    You may obtain a copy of the License at
+ * 
+ *        http://www.tizenopensource.org/license
+ * 
+ *    Unless required by applicable law or agreed to in writing, software
+ *    distributed under the License is distributed on an "AS IS" BASIS,
+ *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *    See the License for the specific language governing permissions and
+ *    limitations under the License.
+ */
+
+
+#ifndef _MP_VIDEO_CTRL_MGR_H_
+#define _MP_VIDEO_CTRL_MGR_H_
+
+
+bool MpVideoCtrlMgrMediaCreate(char *szMediaURI, void *pOverlayXid, void *pUserData);
+void   MpVideoCtrlMgrMediaDestroy(void* pUserData);
+bool   MpVideoCtrlMgrMediaPlay(void* pUserData);
+void   MpVideoCtrlMgrMediaStop(void* pUserData);
+void   MpVideoCtrlMgrMediaPause(void* pUserData);
+void   MpVideoCtrlMgrMediaResume(void* pUserData);
+void   MpVideoCtrlMgrSetPlayerCallback(void *PlayerCompletedCb, void *PlayerInterruptedCb, void *PlayerErrorCb, void *PlayerBufferingCb, void *pUserData);
+void   MpVideoCtrlMgrSetOverlayXid(void* pXid);
+void   MpVideoCtrlMgrSetPosition(int nSetPosition, void *pSeekCb, void *pUserData);
+
+int            MpVideoCtrlMgrGetPosition(void);
+int            MpVideoCtrlMgrGetDuration(void);
+void   MpVideoCtrlMgrResetPlaySpeed(void* pUserData);
+void   MpVideoCtrlMgrSetPlaySpeedUp(void* pUserData);
+void   MpVideoCtrlMgrSetPlaySpeedDown(void* pUserData);
+int            MpVideoCtrlMgrGetVideoWidthResolution(void);
+int            MpVideoCtrlMgrGetVideoHeightResolution(void);
+void   MpVideoCtrlMgrSetRatioVideoScreen(void* pUserData, int nRatioScreenSize);
+void   MpVideoCtrlMgrRotateVideoScreen(int nVideoRotateValue);
+void   MpVideoCtrlMgrSetMute(bool bMuteEnable);
+bool   MpVideoCtrlMgrGetMuteState(void);
+int    MpVideoCtrlMgrGetBufferingPosition(void);
+bool   MpVideoCtrlMgrIsExistPlayerHandle(void);
+bool   MpVideoCtrlMgrIsOnlyAudio(void);
+bool   MpVideoCtrlMgrSetScaling(bool bScale);
+int            MpVideoCtrlMgrGetErrorType(int nErrorVal);
+void   MpVideoCtrlMgrSetMute(bool bState);
+bool   MpVideoCtrlMgrMediaRealize(void);
+bool   MpVideoCtrlMgrMediaRealizeAsync(void *pReailzeCb, void *pUserData);
+
+
+#endif
diff --git a/include/mp-video-display-view.h b/include/mp-video-display-view.h
new file mode 100644 (file)
index 0000000..d30f790
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * 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 [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
+ * 
+ *    Licensed under the Flora License, Version 1.0 (the "License");
+ *    you may not use this file except in compliance with the License.
+ *    You may obtain a copy of the License at
+ * 
+ *        http://www.tizenopensource.org/license
+ * 
+ *    Unless required by applicable law or agreed to in writing, software
+ *    distributed under the License is distributed on an "AS IS" BASIS,
+ *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *    See the License for the specific language governing permissions and
+ *    limitations under the License.
+ */
+
+
+
+#ifndef _VIDEO_DISPLAY_VIEW_
+#define  _VIDEO_DISPLAY_VIEW_
+
+
+typedef enum
+{
+       MP_DISPLAY_VIEW_STATE_ACTIVATE          = 0,
+       MP_DISPLAY_VIEW_STATE_UNACTIVATE,
+       MP_DISPLAY_VIEW_STATE_MAX,
+}VideoDisplayViewState;
+
+typedef void (*ChangeDisplayViewCbFunc)(int nChangePlayerView, void* pUserData);
+
+void   MpVideoDisplayViewPush(void *pNaviFrame, int nPlayerType, void *pUserData, ChangeDisplayViewCbFunc pChangeViewCb);
+void   MpVideoDisplayViewPop(void *pNaviFrame, void* pUserData);
+void   MpVideoDisplayViewDestroy(void *pUserData);
+
+void   MpVideoDisplayViewInitAfterBeginOfStream(void *pUserData);
+void   MpVideoDisplayViewUpdatePauseKey(void);
+void   MpVideoDisplayViewUpdateResumeKey(void);
+void   MpVideoDisplayViewShowControlPanel(void *pUserData);
+void   MpVideoDisplayViewHideControlPanel(void *pUserData);
+void   MpVideoDisplayViewActivate(void);
+void   MpVideoDisplayViewUnactivate(void);
+void   MpVideoDisplayViewHideSoundpath(void);
+void   MpVideoDisplayViewChangeNaviFrameTitle(void *pUserData);
+bool   MpVideoDisplayViewIsTopView(void);
+void   MpVideoDisplayViewShowNocontentImage(void *pUserData);
+void   MpVideoDisplayViewHideNocontentImage(void);
+void   MpVideoDisplayViewPortrate(void);
+void   MpVideoDisplayViewLandscape(void);
+void   MpVideoDisplayViewResetProgressBar(void *pUserData);
+void   MpVideoDisplayViewLockScreen(void *pUserData);
+void   MpVideoDisplayViewUnlockScreen(void *pUserData);
+bool   MpVideoDisplayViewGetScreenLockState(void);
+int    MpVideoDisplayViewGetScreenSize(void);
+bool   MpVideoDisplayViewIsPauseByUser(void);
+void   MpVideoDisplayViewUpdateProgressBar(void *pUserData);
+
+#endif
diff --git a/include/mp-video-info-ctrl.h b/include/mp-video-info-ctrl.h
new file mode 100755 (executable)
index 0000000..d3a14cd
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * 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 [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
+ * 
+ *    Licensed under the Flora License, Version 1.0 (the "License");
+ *    you may not use this file except in compliance with the License.
+ *    You may obtain a copy of the License at
+ * 
+ *        http://www.tizenopensource.org/license
+ * 
+ *    Unless required by applicable law or agreed to in writing, software
+ *    distributed under the License is distributed on an "AS IS" BASIS,
+ *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *    See the License for the specific language governing permissions and
+ *    limitations under the License.
+ */
+
+#ifndef _VIDEO_INFO_CTRL_
+#define  _VIDEO_INFO_CTRL_
+
+bool   MpVideoInfoCtrlGetGPS(char *szUriPath, double *nLongtitude, double *nLatitude);
+bool   MpVideoInfoCtrlGetResolution(char *szWidthResolution, char *szHeightResolution, void *pUserData);
+bool   MpVideoInfoCtrlGetFileInfo(char *szUriPath, char *szFileDate, int nFileDateSize, char *szFileExtension, int nFileExtensionSize, char *szFileSize, int nFilesizeSize);
+#endif
diff --git a/include/mp-video-info-view.h b/include/mp-video-info-view.h
new file mode 100755 (executable)
index 0000000..a7ec098
--- /dev/null
@@ -0,0 +1,29 @@
+/*\r
+ * 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.\r
+ * \r
+ *    Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]\r
+ * \r
+ *    Licensed under the Flora License, Version 1.0 (the "License");\r
+ *    you may not use this file except in compliance with the License.\r
+ *    You may obtain a copy of the License at\r
+ * \r
+ *        http://www.tizenopensource.org/license\r
+ * \r
+ *    Unless required by applicable law or agreed to in writing, software\r
+ *    distributed under the License is distributed on an "AS IS" BASIS,\r
+ *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ *    See the License for the specific language governing permissions and\r
+ *    limitations under the License.\r
+ */\r
+\r
+\r
+#ifndef _VIDEO_INFO_VIEW_\r
+#define  _VIDEO_INFO_VIEW_\r
+\r
+\r
+void   MpVideoInfoViewPush(void* pNaviFrame, void* pUserData);\r
+void   MpVideoInfoViewPop(void* pNaviFrame, void* pUserData);\r
+void   MpVideoInfoViewDestroy(void);\r
+\r
+\r
+#endif\r
diff --git a/include/mp-video-log.h b/include/mp-video-log.h
new file mode 100644 (file)
index 0000000..60ecaa3
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * 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 [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
+ * 
+ *    Licensed under the Flora License, Version 1.0 (the "License");
+ *    you may not use this file except in compliance with the License.
+ *    You may obtain a copy of the License at
+ * 
+ *        http://www.tizenopensource.org/license
+ * 
+ *    Unless required by applicable law or agreed to in writing, software
+ *    distributed under the License is distributed on an "AS IS" BASIS,
+ *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *    See the License for the specific language governing permissions and
+ *    limitations under the License.
+ */
+
+
+#ifndef _VIDEO_LOG_H_
+#define _VIDEO_LOG_H_
+
+#include <dlog.h>
+#include <unistd.h>
+#include <linux/unistd.h>
+
+
+#ifdef LOG_TAG
+#undef LOG_TAG
+#endif
+
+
+#define LOG_TAG "video-player"
+
+
+#define VideoLogInfoWithTid(fmt,arg...)                        LOGI( "[VP][TID:%d][%s][%d]" fmt "\n", syscall(__NR_gettid), __FUNCTION__, __LINE__, ##arg)
+#define VideoLogInfo(fmt,arg...)                               LOGI( "[VP][%s][%d]" fmt "\n", __FUNCTION__,__LINE__, ##arg)
+#define VideoLogDebug(fmt,arg...)                              LOGD( "[%s %s : %d] " fmt "\n",__FILE__, __FUNCTION__,__LINE__, ##arg)
+#define VideoLogWarning(fmt,arg...)                            LOGD( "[%s %s : %d] " fmt "\n",__FILE__, __FUNCTION__,__LINE__, ##arg)
+#define VideoLogError( fmt,arg...)                             LOGD( "[%s %s : %d] " fmt "\n", __FILE__,__FUNCTION__,__LINE__, ##arg)
+
+#endif /*_MPVIDEO_LOG_H_*/
diff --git a/include/mp-video-player-mgr.h b/include/mp-video-player-mgr.h
new file mode 100644 (file)
index 0000000..47eb09d
--- /dev/null
@@ -0,0 +1,102 @@
+/*
+ * 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 [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
+ * 
+ *    Licensed under the Flora License, Version 1.0 (the "License");
+ *    you may not use this file except in compliance with the License.
+ *    You may obtain a copy of the License at
+ * 
+ *        http://www.tizenopensource.org/license
+ * 
+ *    Unless required by applicable law or agreed to in writing, software
+ *    distributed under the License is distributed on an "AS IS" BASIS,
+ *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *    See the License for the specific language governing permissions and
+ *    limitations under the License.
+ */
+
+
+#ifndef _MP_VIDEO_PLAYER_MGR_H_
+#define _MP_VIDEO_PLAYER_MGR_H_
+
+
+#include <player.h>
+#include <sound_manager.h>
+#include <image_util.h>
+#include <mm_util_imgp.h>
+
+
+typedef enum
+{
+       DISPLAY_METHOD_LETTER_BOX               = 0,
+       DISPLAY_METHOD_ORIGIN_SIZE,
+       DISPLAY_METHOD_FULL_SCREEN,
+       DISPLAY_METHOD_CROPPED_FULL,
+       DISPLAY_METHOD_CUSTOM_ROI,
+}MpPlayerMgrDisplayMethod;
+
+
+typedef enum
+{
+       VIDEO_SCREEN_UNKNOWN                    = 0,
+       VIDEO_SCREEN_PORTRAIT,
+       VIDEO_SCREEN_LANDSCAPE,
+       VIDEO_SCREEN_PORTRAIT_UPSIDEDOWN,
+       VIDEO_SCREEN_LANDSCAPE_UPSIDEDOWN,
+}MpVideoRotation;
+
+
+typedef enum
+{
+       SOUND_EFFECT_NORMAL                             = 0,
+       SOUND_EFFECT_VOICE,
+       SOUND_EFFECT_MOVIE,
+       SOUND_EFFECT_51CH,
+       SOUND_EFFECT_MAX,
+}MpSoundEffectType;
+
+
+typedef enum
+{
+       FILE_STREAM_TYPE_NOTHING                = 0,
+       FILE_STREAM_TYPE_VIDEO_AUDIO,
+       FILE_STREAM_TYPE_AUDIO,
+       FILE_STREAM_TYPE_VIDEO,
+       FILE_STREAM_TYPE_MAX,
+}MpFileStreamType;
+
+
+bool   MpPlayerMgrIsActive(void);
+bool   MpPlayerMgrRegistePlayerCallback(void *PlayerCompletedCbFunc, void *PlayerInterruptedCbFunc, void *PlayerErrorCbFunc, void *PlayerBufferingCbFunc, void *pUserData);
+bool   MpPlayerMgrCreate       (const char* szPath);
+bool   MpPlayerMgrDestroy      (void);
+bool   MpPlayerMgrRealize      (void);
+bool   MpPlayerMgrRealizeAsync(void *pPrepareCb, void *pUserData);
+bool   MpPlayerMgrUnrealize(void);
+bool   MpPlayerMgrPlay         (void);
+bool   MpPlayerMgrStop         (void);
+bool   MpPlayerMgrResume       (void);
+bool   MpPlayerMgrPause        (void);
+int    MpPlayerMgrGetPosition(void);
+void   MpPlayerMgrSetPosition(unsigned int nPos, void *pSeekCb, void *pUserData);
+void   MpPlayerMgrSetMute(bool bMuteEnable);
+bool   MpPlayerMgrGetMute(void);
+int    MpPlayerMgrGetDuration(void);
+bool   MpPlayerMgrSetOverlayXid(void* pOverlayXid);
+bool   MpPlayerMgrSetSoundPriority(void);
+int    MpPlayerMgrSetPlaySpeed(float nSpeedValue);
+int    MpPlayerMgrGetVideoWidthResolution(void);
+int    MpPlayerMgrGetVideoHeightResolution(void);
+int    MpPlayerMgrSetDisplayArea(int nX, int nY, int nWidth, int nHeight);
+bool   MpPlayerMgrSetRotate(MpVideoRotation nRotation);
+bool   MpPlayerMgrSetDisplayMode(MpPlayerMgrDisplayMethod nMethodMode);
+bool   MpPlayerMgrSetUseragentForStreaming(const char* szUserAgent);
+bool   MpPlayerMgrSetProxyAddressForStreaming(const char* szProxyAddress);
+bool   MpPlayerMgrSetCookieForStreaming(const char* szCookie);
+int    MpPlayerMgrGetBufferingPosition(void);
+bool   MpPlayerMgrRegisteBufferingCallBack(void *pCallbackFunc, void *pUserData);
+int    MpPlayerMgrGetFileStreamType(void);
+bool   MpPlayerMgrSetScaling(bool bScale);
+
+#endif
diff --git a/include/mp-video-progressbar.h b/include/mp-video-progressbar.h
new file mode 100755 (executable)
index 0000000..b5a9c6e
--- /dev/null
@@ -0,0 +1,34 @@
+/*\r
+ * 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.\r
+ * \r
+ *    Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]\r
+ * \r
+ *    Licensed under the Flora License, Version 1.0 (the "License");\r
+ *    you may not use this file except in compliance with the License.\r
+ *    You may obtain a copy of the License at\r
+ * \r
+ *        http://www.tizenopensource.org/license\r
+ * \r
+ *    Unless required by applicable law or agreed to in writing, software\r
+ *    distributed under the License is distributed on an "AS IS" BASIS,\r
+ *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ *    See the License for the specific language governing permissions and\r
+ *    limitations under the License.\r
+ */\r
+\r
+\r
+#ifndef _VIDEO_PROGRESS_BAR_CTRL_\r
+#define _VIDEO_PROGRESS_BAR_CTRL_\r
+\r
+\r
+void*  MpVideoProgressbarGetEdjHandle(void);\r
+void*  MpVideoProgressbarInit(void* pUserData);\r
+void   MpVideoProgressbarDestroy(void);\r
+void   MpVideoProgressbarCreateTimer(void* pUserData);\r
+void   MpVideoProgressbarDeleteTimer(void);\r
+void   MpVideoProgressbarUpdateDurationTime(char* szDurationTime);\r
+void   MpVideoProgressbarBeginOfStream(void *pUserData);\r
+void   MpVideoProgressbarReset(void* pUserData);\r
+void   MpVideoProgressbarSetSkipEvent(bool bSkip);\r
+\r
+#endif /* _VIDEO_PROGRESS_BAR_CTRL_ */\r
diff --git a/include/mp-video-service-ctrl.h b/include/mp-video-service-ctrl.h
new file mode 100644 (file)
index 0000000..e05a119
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * 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 [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
+ * 
+ *    Licensed under the Flora License, Version 1.0 (the "License");
+ *    you may not use this file except in compliance with the License.
+ *    You may obtain a copy of the License at
+ * 
+ *        http://www.tizenopensource.org/license
+ * 
+ *    Unless required by applicable law or agreed to in writing, software
+ *    distributed under the License is distributed on an "AS IS" BASIS,
+ *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *    See the License for the specific language governing permissions and
+ *    limitations under the License.
+ */
+
+
+#ifndef _VIDEO_SERVICE_CTRL_
+#define  _VIDEO_SERVICE_CTRL_
+
+
+typedef enum
+{
+       MP_ERROR_PLAYER_TYPE                                    = 0,
+       MP_VIDEO_PLAYER,
+       MP_VIDEO_PLAYER_SIMPLE,
+       MP_VIDEO_PLAYER_EMAIL,
+       MP_VIDEO_PLAYER_MMS,
+       MP_VIDEO_PLAYER_GALLERY,
+       MP_STREAMING_PLAYER,
+       MP_MAX_PLAYER_TYPE,
+}MpPlayerViewType;
+
+
+void MpVideoServiceCtrlReset(void);
+int MpVideoServiceCtrlInitServiceParser(void* pAppServiceHandle, char* szMediaUri);
+int MpVideoServiceCtrlGetPlayerTypeWithoutLog(void);
+int MpVideoServiceCtrlGetPlayerType(void);
+void MpVideoServiceCtrlSetPlayerType(int nSetPlayerType);
+char* MpVideoServiceCtrlGetCookieForStreaming(void);
+
+#endif //_VIDEO_SERVICE_CTRL_
diff --git a/include/mp-video-sound-path-ctrl.h b/include/mp-video-sound-path-ctrl.h
new file mode 100644 (file)
index 0000000..b46cd2d
--- /dev/null
@@ -0,0 +1,29 @@
+/*\r
+ * 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.\r
+ * \r
+ *    Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]\r
+ * \r
+ *    Licensed under the Flora License, Version 1.0 (the "License");\r
+ *    you may not use this file except in compliance with the License.\r
+ *    You may obtain a copy of the License at\r
+ * \r
+ *        http://www.tizenopensource.org/license\r
+ * \r
+ *    Unless required by applicable law or agreed to in writing, software\r
+ *    distributed under the License is distributed on an "AS IS" BASIS,\r
+ *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ *    See the License for the specific language governing permissions and\r
+ *    limitations under the License.\r
+ */\r
+\r
+\r
+#ifndef _MP_VIDEO_SOUND_PATH_\r
+#define _MP_VIDEO_SOUND_PATH_\r
+\r
+\r
+bool   MpVideoSoundpathShow(void* pUserData);\r
+void   MpVideoSoundpathHide(void);\r
+\r
+bool   MpVideoSoundpathIsConnectOtherSoundpath(void);\r
+\r
+#endif // _MP_UTIL_\r
diff --git a/include/mp-video-streaming-ctrl.h b/include/mp-video-streaming-ctrl.h
new file mode 100755 (executable)
index 0000000..4a016d0
--- /dev/null
@@ -0,0 +1,41 @@
+/*\r
+ * 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.\r
+ * \r
+ *    Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]\r
+ * \r
+ *    Licensed under the Flora License, Version 1.0 (the "License");\r
+ *    you may not use this file except in compliance with the License.\r
+ *    You may obtain a copy of the License at\r
+ * \r
+ *        http://www.tizenopensource.org/license\r
+ * \r
+ *    Unless required by applicable law or agreed to in writing, software\r
+ *    distributed under the License is distributed on an "AS IS" BASIS,\r
+ *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ *    See the License for the specific language governing permissions and\r
+ *    limitations under the License.\r
+ */\r
+\r
+\r
+#ifndef _STREAMING_PLAYER_H_\r
+#define _STREAMING_PLAYER_H_\r
+\r
+\r
+#ifdef USE_DNET\r
+int            MpVideoStreamingCtrlConnection(void* pUserData);\r
+int            MpVideoStreamingCtrlDisconnection(void* pUserData);\r
+int            MpVideoStreamingCtrlIsConnected(void);\r
+#else\r
+bool   MpVideoStreamingCtrlGetIpAddress(char* szRetIpAddress);\r
+bool   MpVideoStreamingCtrlGetProxy(char* szRetProxy);\r
+bool   MpVideoStreamingCtrlIsNetworkOn(void);\r
+int            MpVideoStreamingCtrlGetNetworkStatus(void);\r
+int            MpVideoStreamingCtrlGetWifiState();\r
+int            MpVideoStreamingCtrlGetCellularState();\r
+bool   MpVideoStreamingCtrlInit(void *pUserData);\r
+void   MpVideoStreamingCtrlDestroy(void *pUserData);\r
+\r
+#endif\r
+\r
+\r
+#endif /* _STREAMING_PLAYER_H_ */\r
diff --git a/include/mp-video-streaming-view.h b/include/mp-video-streaming-view.h
new file mode 100644 (file)
index 0000000..a5f14a7
--- /dev/null
@@ -0,0 +1,57 @@
+/*\r
+ * 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.\r
+ * \r
+ *    Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]\r
+ * \r
+ *    Licensed under the Flora License, Version 1.0 (the "License");\r
+ *    you may not use this file except in compliance with the License.\r
+ *    You may obtain a copy of the License at\r
+ * \r
+ *        http://www.tizenopensource.org/license\r
+ * \r
+ *    Unless required by applicable law or agreed to in writing, software\r
+ *    distributed under the License is distributed on an "AS IS" BASIS,\r
+ *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ *    See the License for the specific language governing permissions and\r
+ *    limitations under the License.\r
+ */\r
+\r
+\r
+#ifndef _VIDEO_STREAMING_VIEW_\r
+#define  _VIDEO_STREAMING_VIEW_\r
+\r
+\r
+typedef enum\r
+{\r
+       MP_STREAMING_VIEW_STATE_ACTIVATE                = 0,\r
+       MP_STREAMING_VIEW_STATE_UNACTIVATE,\r
+       MP_STREAMING_VIEW_STATE_MAX,\r
+}VideoStreamingViewState;\r
+\r
+typedef void (*ChangeStreamingViewCbFunc)(int nChangePlayerView, void* pUserData);\r
+\r
+void MpVideoStreamingViewPush(void* pNaviFrame, int nPlayerType, void* pUserData, ChangeStreamingViewCbFunc pChangeViewCb);\r
+void MpVideoStreamingViewPop(void* pNaviFrame, void* pUserData);\r
+void MpVideoStreamingViewDestroy(void* pUserData);\r
+\r
+void MpVideoStreamingViewInitAfterBeginOfStream(void* pUserData);\r
+void MpVideoStreamingViewUpdatePauseKey(void);\r
+void MpVideoStreamingViewUpdateResumeKey(void);\r
+void MpVideoStreamingViewShowControlPanel(void* pUserData);\r
+void MpVideoStreamingViewHideControlPanel(void* pUserData);\r
+void MpVideoStreamingViewActivate(void);\r
+void MpVideoStreamingViewUnactivate(void);\r
+void MpVideoStreamingViewRotation(int nRotateMode);\r
+void MpVideoStreamingViewSetBufferingRate(int nSetBufferingRate);\r
+bool MpVideoStreamingViewGetBufferingState(void);\r
+bool MpVideoStreamingViewIsTopView(void);\r
+void MpVideoStreamingViewShowNocontentImage(void *pUserData);\r
+void MpVideoStreamingViewHideNocontentImage(void);\r
+void MpVideoStreamingViewLockScreen(void* pUserData);\r
+void MpVideoStreamingViewUnlockScreen(void* pUserData);\r
+bool MpVideoStreamingViewGetScreenLockState(void);\r
+void   MpVideoStreamingViewPortrate(void);\r
+void   MpVideoStreamingViewLandscape(void);\r
+void MpVideoStreamingViewUpdateProgressBar(void *pUserData);\r
+\r
+#endif\r
diff --git a/include/mp-video-string-define.h b/include/mp-video-string-define.h
new file mode 100755 (executable)
index 0000000..4d544b0
--- /dev/null
@@ -0,0 +1,140 @@
+/*\r
+ * 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.\r
+ * \r
+ *    Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]\r
+ * \r
+ *    Licensed under the Flora License, Version 1.0 (the "License");\r
+ *    you may not use this file except in compliance with the License.\r
+ *    You may obtain a copy of the License at\r
+ * \r
+ *        http://www.tizenopensource.org/license\r
+ * \r
+ *    Unless required by applicable law or agreed to in writing, software\r
+ *    distributed under the License is distributed on an "AS IS" BASIS,\r
+ *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ *    See the License for the specific language governing permissions and\r
+ *    limitations under the License.\r
+ */\r
+\r
+\r
+#ifndef _VIDEO_STRING_DEFINE_\r
+#define  _VIDEO_STRING_DEFINE_\r
+\r
+\r
+#define MP_SYS_STRING                                                  "sys_string"\r
+#define        MP_STREAMING_PLAYER_STR                                 "Streaming player"\r
+\r
+#define MP_SHARE_MESSAGE       (dgettext("sys_string", "IDS_COM_BODY_MESSAGE"))\r
+#define MP_SHARE_EMAIL                 (dgettext("sys_string", "IDS_COM_BODY_EMAIL"))\r
+#define MP_SHARE_BLUETOOTH     (dgettext("sys_string", "IDS_COM_BODY_BLUETOOTH"))\r
+#define MP_SHARE_FTM           (dgettext("sys_string", "IDS_COM_BODY_WI_FI"))\r
+#define MP_SHARE_FACEBOOK      (dgettext("sys_string", "IDS_COM_BODY_FACEBOOK"))\r
+#define MP_SHARE_YOUTUBE       (dgettext("sys_string", "IDS_COM_BODY_YOU_TUBE"))\r
+#define MP_SHARE_ALLSHARE      (dgettext("sys_string", "IDS_COM_BODY_ALLSHARE"))\r
+\r
+\r
+#define MP_POPUP_FAVOURITES                                    "Favourites"\r
+#define MP_POPUP_NEW_TAG                                       "New tag"\r
+#define MP_VIDEO_POPUP_TAG                                     "Tag"\r
+\r
+#define MP_VIDEO_PATH_KEY                                      "path"\r
+#define MP_VIDEO_COOKIE_KEY                                    "cookie"\r
+#define MP_VIDEO_DLNA_SORT_KEY                         "MSS_Sort_type"\r
+#define MP_VIDEO_DLNA_MEDIA_ID                         "MSS_MediaID"\r
+#define MP_VIDEO_DLNA_SERVER_ID                                "MSS_ServerID"\r
+#define MP_VIDEO_SPLIT_VIEW_KEY                                "split_screen"\r
+#define MP_VIDEO_DMR_PLAYER                                    "Player List"\r
+\r
+\r
+// SMTP video player string\r
+#define MP_VPL_CONNECTION_FAIL                                         (dgettext("sys_string", "IDS_COM_POP_CONNECTION_ERROR"))\r
+#define MP_VPL_UNABLE_TO_PLAY_VIDEO                                    "IDS_VPL_POP_UNABLE_TO_PLAY_VIDEO_ERROR_OCCURRED"\r
+#define MP_VPL_HEADER_SHARE_VIDEO_ABB                          "IDS_VPL_HEADER_SHARE_VIDEO_ABB"\r
+#define MP_VPL_OPT_SET_AS                                                      "IDS_VPL_OPT_SET_AS"\r
+#define MP_VPL_POP_INVALID_STREAMING_DATA                      "IDS_VPL_POP_UNABLE_TO_PLAY_VIDEO_INVALID_STREAMING_DATA"\r
+#define MP_VPL_POP_UNSUPPORTED_AUDIO_FORMAT                    "IDS_VPL_POP_UNSUPPORTED_AUDIO_FORMAT"\r
+#define MP_VPL_POP_UNSUPPORTED_VIDEO_FORMAT                    "IDS_VPL_POP_UNSUPPORTED_VIDEO_FORMAT"\r
+#define MP_VPL_POP_UNSUPPORTED_FILE_TYPE                       "IDS_VPL_POP_UNSUPPORTED_FILE_TYPE"\r
+#define MP_VPL_SOUND_ALIVE_NORMAL                                      "IDS_VPL_OPT_NORMAL"\r
+#define MP_VPL_SOUND_ALIVE_VOICE                                       "IDS_VPL_BODY_VOICE_M_SOUNDEFFECT"\r
+#define MP_VPL_SOUND_ALIVE_MOVIE                                       "IDS_VPL_BODY_MOVIE_M_SOUNDEFFECT"\r
+#define MP_VPL_SOUND_ALIVE_51CH                                                "IDS_VPL_BODY_51CH_M_SOUNDEFFECT"\r
+#define MP_VPL_51CH_ONLY_EARPHONE                                      "IDS_VPL_POP_51_CHANNEL_SOUND_EFFECT_WORKS_IN_EARPHONE_MODE_ONLY"\r
+#define MP_VPL_GPS_LATITUDE                                                    "IDS_VPL_BODY_LATITUDE"\r
+#define MP_VPL_GPS_LONGITUTD                                           "IDS_VPL_BODY_LONGITUDE"\r
+#define MP_VPL_TRIM                                                                    "IDS_VPL_SK3_TRIM"\r
+#define MP_VPL_SOUND_ALIVE                                                     "Sound Alive"\r
+#define MP_VPL_SUBTITLES                                                       "IDS_VPL_OPT_SUBTITLES"\r
+#define MP_VPL_REPEAT_MODE                                                     "Repeat mode"\r
+#define MP_VPL_AUDIO_TRACK                                                     "Audio track"\r
+\r
+/* SMTP Repeat mode string */\r
+#define MP_VPL_REPEAT_OFF                                                      "Stop after current video"\r
+#define MP_VPL_REPEAT_ALL_OFF                                          "Stop after playing all videos"\r
+#define MP_VPL_REPEAT_ONE                                                      "Repeat 1"\r
+#define MP_VPL_REPEAT_ALL                                                      "Repeat all videos"\r
+\r
+/* SMTP Subtitle option string */\r
+#define MP_VPL_SUBTITLE_SHOW                                           "Show subtitle"\r
+#define MP_VPL_SUBTITLE_HIDE                                           "Hide subtitle"\r
+#define MP_VPL_SUBTITLE_LANGUAGE                                       "Language"\r
+#define MP_VPL_SUBTITLE_SIZE                                           "Size"\r
+#define MP_VPL_SUBTITLE_SYNC                                           "Sync"\r
+\r
+#define MP_VPL_SUBTITLE_SIZE_LARGE                                     "Large"\r
+#define MP_VPL_SUBTITLE_SIZE_MEDIUM                                    "Medium"\r
+#define MP_VPL_SUBTITLE_SIZE_SMALL                                     "Small"\r
+\r
+\r
+// SMTP others module string\r
+#define MP_BT_POP_FILEBROWSINGFAIL                                             "IDS_BT_POP_FILEBROWSINGFAIL"\r
+#define MP_BLUETOOTH_HEADSET_DISCONNECTED                              "IDS_DVBH_POP_BLUETOOTH_STEREO_HEADSET_DISCONNECTED"\r
+#define MP_WGT_POP_ALLOW_TO_DELETE_FILE_Q                              "IDS_WGT_POP_ALLOW_TO_DELETE_FILE_Q"\r
+#define MP_EBOOK_BODY_LOADING_ING                                              "IDS_EBOOK_BODY_LOADING_ING"\r
+#define MP_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL   "IDS_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL"\r
+\r
+\r
+// Default system string\r
+#define MP_COM_POP_ERROR                                                       "IDS_COM_POP_ERROR"\r
+#define        MP_COM_BODY_LOW_BATTERY                                         "IDS_COM_BODY_LOW_BATTERY"\r
+#define MP_COM_BODY_DELETE                                                     (dgettext("sys_string", "IDS_COM_BODY_DELETE"))\r
+#define MP_COM_BODY_DELETE_Q                                           (dgettext("sys_string", "IDS_COM_POP_DELETE_Q"))\r
+#define MP_COM_BODY_SELECT_ALL                                         (dgettext("sys_string", "IDS_COM_BODY_SELECT_ALL"))\r
+#define MP_COM_POP_SELECTED                                                    (dgettext("sys_string", "IDS_COM_POP_SELECTED"))\r
+#define MP_COM_BODY_BACK                                                       "IDS_COM_BODY_BACK"\r
+#define MP_COM_SK_BACK                                                         "IDS_COM_SK_BACK"\r
+#define MP_COM_SK_YES                                                          "IDS_COM_SK_YES"\r
+#define MP_COM_SK_NO                                                           "IDS_COM_SK_NO"\r
+#define MP_COM_BUTTON_CANCEL                                           (dgettext("sys_string", "IDS_IDLE_BUTTON_CANCEL"))\r
+#define MP_COM_BUTTON_SHARE                                                    "IDS_COM_BUTTON_SHARE"\r
+#define MP_COM_BODY_SIZE                                                       "IDS_COM_BODY_SIZE"\r
+#define MP_COM_BODY_DETAILS_TITLE                                      "IDS_COM_BODY_DETAILS_TITLE"\r
+#define MP_COM_BODY_FORMAT                                                     "IDS_COM_BODY_FORMAT"\r
+#define MP_COM_POP_DATE                                                                "IDS_COM_POP_DATE"\r
+#define MP_COM_BODY_SOUNDS                                                     "IDS_COM_BODY_SOUNDS"\r
+#define MP_IDLE_BODY_RESOLUTION                                                "IDS_IDLE_BODY_RESOLUTION"\r
+#define MP_COM_BODY_DETAILS                                                    (dgettext("sys_string", "IDS_COM_BODY_DETAILS"))\r
+#define MP_VIDEO_POPUP_SHARE                                           "IDS_COM_SK4_SHARE"\r
+#define MP_COM_SEARCH                                                  dgettext("sys_string", "IDS_COM_BODY_SEARCH")\r
+\r
+#define MP_COM_SOUND_ALIVE                                             (dgettext("sys_string", "IDS_COM_BODY_SOUNDS"))\r
+#define MP_COM_SETTINGS                                                        (dgettext("sys_string", "IDS_COM_BODY_SETTINGS"))\r
+#define MP_COM_POP_FILE_NOT_FOUND                              (dgettext("sys_string", "IDS_COM_POP_FILE_NOT_FOUND"))\r
+#define MP_COM_POP_INVALID_URL                                 (dgettext("sys_string", "IDS_COM_POP_INVALID_URL"))\r
+#define MP_COM_POP_CONNECTION_FAILED                   (dgettext("sys_string", "IDS_COM_POP_CONNECTION_FAILED"))\r
+#define MP_COM_POP_FILE_NOT_EXIST                              (dgettext("sys_string", "IDS_COM_POP_FILE_NOT_EXIST"))\r
+\r
+#define MP_VIDEO_SOUND_PATH                                            "Sound Path"\r
+\r
+\r
+/* DRM POPUP */\r
+#define MP_VPL_DRM_INTERVAL_BASED_DAYS         _("You can use %s for %d days. Would you like to open it now?")\r
+#define MP_VPL_DRM_TIME_BASED_GET                      _("%s is about to be locked. Do you want to get more licenses?")\r
+#define MP_VPL_DRM_COUNT_BASED_OPEN_ONE                _("You have one more use of %s. Do you want to open it now?")\r
+#define MP_VPL_DRM_COUNT_BASED_OPEN_MANY       _("You have %d more uses of %s. Do you want to open it now?")\r
+#define MP_VPL_DRM_COUNT_BASED_ONE_MORE_GET    _("You have one more use of %s. Do you want to get more licenses?")\r
+#define MP_VPL_DRM_COUNT_BASED_NO_MORE_GET     _("You have no more use of %s. Do you want to get more licenses?")\r
+#define MP_VPL_DRM_UNLOCK                                      _("%s is currently locked. Do you want to unlock it now?")\r
+\r
+\r
+#endif //_VIDEO_STRING_DEFINE_\r
diff --git a/include/mp-video-subtitle-ctrl.h b/include/mp-video-subtitle-ctrl.h
new file mode 100755 (executable)
index 0000000..3c37da3
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.tizenopensource.org/license
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+
+#ifndef _MP_VIDEO_SUBTITLE_CTRL_
+#define _MP_VIDEO_SUBTITLE_CTRL_
+
+bool MpVideoSubtitleCtrlInit(void *pUserData);
+void MpVideoSubtitleCtrlDestroy(void);
+bool MpVideoSubtitleCtrlIsExistSubtitle(void);
+bool MpVideoSubtitleCtrlGetSubtitleUri(char *szSubtitleUriPath);
+
+#endif                         // _MP_VIDEO_SUBTITLE_CTRL_
diff --git a/include/mp-video-type-define.h b/include/mp-video-type-define.h
new file mode 100644 (file)
index 0000000..5ab9f56
--- /dev/null
@@ -0,0 +1,165 @@
+/*
+ * 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 [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
+ * 
+ *    Licensed under the Flora License, Version 1.0 (the "License");
+ *    you may not use this file except in compliance with the License.
+ *    You may obtain a copy of the License at
+ * 
+ *        http://www.tizenopensource.org/license
+ * 
+ *    Unless required by applicable law or agreed to in writing, software
+ *    distributed under the License is distributed on an "AS IS" BASIS,
+ *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *    See the License for the specific language governing permissions and
+ *    limitations under the License.
+ */
+
+
+#ifndef _VIDEO_TYPE_DEFINE_
+#define  _VIDEO_TYPE_DEFINE_
+
+
+
+typedef enum
+{
+       VIDEO_ROTATE_UNKNOWN                            = 0,
+       VIDEO_ROTATE_PORTRAIT_NORMAL,
+       VIDEO_ROTATE_PORTRAIT_REVERSE,
+       VIDEO_ROTATE_LANDSCAPE_NORMAL,
+       VIDEO_ROTATE_LANDSCAPE_REVERSE,
+}MpVideoRotateType;
+
+typedef enum
+{
+       MP_HTTP_STREAMING                                       = 0,
+       MP_RTSP_STREAMING,
+}MpProtocolType;
+
+typedef enum
+{
+       MP_DISPLAY_METHOD_LETTER_BOX            = 0,
+}MpDisplayMethod;
+
+typedef enum
+{
+       MP_SOUND_PATH_SPEAKER                           = 0,
+       MP_SOUND_PATH_EARJACK,
+       MP_SOUND_PATH_BLUETOOTH,
+       MP_SOUND_PATH_MAX,
+}MpSoundPathType;
+
+typedef enum
+{
+       MP_PLAYER_ERROR_NONE                    = 0,    // Successful
+       MP_PLAYER_ERROR_OUT_OF_MEMORY,                  // Out of memory
+       MP_PLAYER_ERROR_INVALID_PARAMETER,              // Invalid parameter
+       MP_PLAYER_ERROR_NO_SUCH_FILE,                   // No such file or directory 
+       MP_PLAYER_ERROR_INVALID_OPERATION,              // Invalid operation
+       MP_PLAYER_ERROR_SEEK_FAILED,                    // Seek operation failure
+       MP_PLAYER_ERROR_INVALID_STATE,                  // Invalid state
+       MP_PLAYER_ERROR_NOT_SUPPORTED_FILE,             // Not supported file format
+       MP_PLAYER_ERROR_INVALID_URI,                    // Invalid URI
+       MP_PLAYER_ERROR_SOUND_POLICY,                   // Sound policy error
+       MP_PLAYER_ERROR_CONNECTION_FAILED,              // Streaming connection failed 
+       MP_PLAYER_ERROR_UNKNOWN_ERROR,                  // unknown error.
+}MpPlayerErrorType;
+
+typedef enum
+{
+       MP_PLAYER_INTERRUPTED_COMPLETED  = 0,           // Interrupt completed
+       MP_PLAYER_INTERRUPTED_BY_OTHER_APP,                     // Interrupted by another application
+       MP_PLAYER_INTERRUPTED_BY_CALL,                          // Interrupted by incoming call
+       MP_PLAYER_INTERRUPTED_BY_EARJACK_UNPLUG,        // Interrupted by unplugging headphone
+       MP_PLAYER_INTERRUPTED_BY_RESOURCE_CONFLICT,     // Interrupted by resource conflict
+       MP_PLAYER_INTERRUPTED_BY_ALARM,                         // Interrupted by alarm
+}MpPlayerInterrupteType;
+
+
+typedef enum
+{
+       MP_PLAYER_STATE_WAIT_FOR_RESUME         = -3,
+       MP_PLAYER_STATE_WAIT_FOR_PLAY           = -2,
+       MP_PLAYER_STATE_WAIT_FOR_RESPONSE       = -1,
+       MP_PLAYER_STATE_CLEAR                           = 0,
+       MP_PLAYER_STATE_PLAY,
+       MP_PLAYER_STATE_PAUSE,
+       MP_PLAYER_STATE_RESUME,
+       MP_PLAYER_STATE_STOP,
+       MP_PLAYER_STATE_PAUSE_BEFORE_PLAY,
+       MP_PLAYER_STATE_MAX
+}MpPlayerState;
+
+
+typedef enum
+{
+       MP_PLAYING_SPEED_NORMAL         = 1,
+       MP_PLAYING_SPEED_2X                     = 2,
+       MP_PLAYING_SPEED_3X                     = 3,
+       MP_PLAYING_SPEED_4X                     = 4,
+       MP_PLAYING_SPEED_5X                     = 5,
+       MP_PLAYING_SPEED_MAX            = MP_PLAYING_SPEED_5X,
+}MpVideoPlayingSpeedType;
+
+
+typedef enum
+{
+       MP_NETWORK_CLOSE                                        = 0,
+       MP_NETWORK_ON,
+       MP_NETWORK_MAX,
+}MpNetworkConfig;
+
+
+typedef enum
+{
+       MP_NETWORK_TYPE_OFF                                     = 0,
+       MP_NETWORK_TYPE_CELLULAR,
+       MP_NETWORK_TYPE_WIFI,
+       MP_NETWORK_TYPE_MAX,
+}MpNetworkType;
+
+
+typedef enum
+{
+       MP_NETWORK_WIFI_OFF                                     = 0,
+       MP_NETWORK_WIFI_NOT_CONNECTED,
+       MP_NETWORK_WIFI_CONNECTED,
+       MP_NETWORK_WIFI_MAX,
+}MpNetworkWifiState;
+
+
+typedef enum
+{
+       MP_NETWORK_CELLULAR_ON                          = 0,
+       MP_NETWORK_CELLULAR_3G_OPTION_OFF,
+       MP_NETWORK_CELLULAR_ROAMING_OFF,
+       MP_NETWORK_CELLULAR_FLIGHT_MODE,
+       MP_NETWORK_CELLULAR_NO_SERVICE,
+       MP_NETWORK_CELLULAR_MAX,
+}MpNetworkCellularState;
+
+
+typedef enum
+{
+       MP_FILE_STREAM_TYPE_NOTHING                     = 0,
+       MP_FILE_STREAM_TYPE_VIDEO_AUDIO,
+       MP_FILE_STREAM_TYPE_AUDIO,
+       MP_FILE_STREAM_TYPE_VIDEO,
+       MP_FILE_STREAM_TYPE_MAX,
+}MpVideoFileStreamType;
+
+
+typedef enum
+{
+       MP_OPTION_TYPE_LOCAL = 0,
+       MP_OPTION_TYPE_MYFILE,
+       MP_OPTION_TYPE_EMAIL,
+       MP_OPTION_TYPE_WEB,
+       MP_OPTION_TYPE_MESSAGE,
+       MP_OPTION_TYPE_ALLSHARE,
+       MP_OPTION_TYPE_MAX,
+}MpOptionMenuType;
+
+
+#endif //_VIDEO_TYPE_DEFINE_
diff --git a/include/mp-video-value-define.h b/include/mp-video-value-define.h
new file mode 100755 (executable)
index 0000000..ca44f0b
--- /dev/null
@@ -0,0 +1,233 @@
+/*
+ * 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 [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
+ *
+ *    Licensed under the Flora License, Version 1.0 (the "License");
+ *    you may not use this file except in compliance with the License.
+ *    You may obtain a copy of the License at
+ *
+ *        http://www.tizenopensource.org/license
+ *
+ *    Unless required by applicable law or agreed to in writing, software
+ *    distributed under the License is distributed on an "AS IS" BASIS,
+ *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *    See the License for the specific language governing permissions and
+ *    limitations under the License.
+ */
+
+
+#ifndef _VIDEO_VALUE_DEFINE_
+#define  _VIDEO_VALUE_DEFINE_
+
+#include <utilX.h>
+
+
+//PLAY_TIME_FORMAT
+#define PLAY_TIME_FORMAT "02u:%02u:%02u"
+
+
+//PLAY_TIME_ARGS
+#define PLAY_TIME_ARGS(t) \
+        (t) / (60 * 60), \
+        ((t) / 60) % 60, \
+        (t) % 60
+
+#define PLAY_TIME_LENGTH 9
+
+
+#define _EDJ(x) elm_layout_edje_get(x)
+
+
+#ifdef PREFIX
+#undef PREFIX
+#endif
+
+#ifdef LOCALEDIR
+#undef LOCALEDIR
+#endif
+
+#define PREFIX                                         "/opt/apps/org.tizen.video-player"
+#define EDJ_PATH                                       "/opt/apps/org.tizen.video-player/res/edje"
+#define LOCALEDIR                                      "/opt/apps/org.tizen.video-player/res/locale"
+
+#define VIDEO_BOOKMARK_DIR                             PREFIX"/data"
+#define VIDEO_TRIM_DATA_DIR                            PREFIX"/data"
+
+#define VIDEO_HEAD_ICON_SOUNDPATH                      PREFIX"/res/images/icon/T01-2_icon_title_soundpath.png"
+
+#define VIDEO_PLAYER_MAIN_EDJ                          EDJ_PATH"/main.edj"
+#define VIDEO_PLAYER_CONTROL_EDJ                       EDJ_PATH"/control.edj"
+#define VIDEO_PLAYER_PANEL_EDJ                         EDJ_PATH"/panel.edj"
+#define VIDEO_PLAYER_PROGRESS_EDJ                      EDJ_PATH"/progress.edj"
+#define VIDEO_PLAYER_ADD_TAG                           EDJ_PATH"/add_tag.edj"
+#define VIDEO_PLAYER_ANIMATION_EDJ                     EDJ_PATH"/animation.edj"
+#define VIDEO_PLAYER_DETAIL_EDJ                                EDJ_PATH"/detail.edj"
+#define VIDEO_PLAYER_MULTI_WIN_EDJ                     EDJ_PATH"/multi_win.edj"
+#define VIDEO_CUSTOM_THEME                             EDJ_PATH"/vp-custom-winset-style.edj"
+#define VIDEO_PLAYER_HIDDEN_PANEL_EDJ                  EDJ_PATH"/hidden_button_panel.edj"
+#define VIDEO_PLAYER_POPUP_PROGRESSBAR_EDJ             EDJ_PATH"/popup_progressbar.edj"
+
+
+
+
+#define MAIN_EDJ_GROUP                                 "main"
+#define CONTROL_EDJ_GROUP                              "control"
+#define PROGRESS_EDJ_GROUP                             "progress"
+#define MULTIWIN_EDJ_GROUP                             "mw"
+
+#define PANEL_EDJ_GROUP                                        "panel"
+#define        FAVORITE_EDJ_GROUP                              "favorite"
+#define ANIMATION_EDJ_GROUP                            "animation"
+#define DETAIL_EDJ_GROUP                               "detail"
+#define PANEL_BUTTON_EDJ_GROUP                         "panel.button"
+
+#define SWALLOW_MAIN_CONTROL                           "main.panel"
+#define SWALLOW_MAIN_ANIMATION                         "main.animation"
+#define SWALLOW_MAIN_PANEL_BUTTON                      "main.panel.button"
+
+#define SWALLOW_PANEL_CONTROL                          "panel.control"
+#define SWALLOW_PANEL_PROGRESS_BAR                     "panel.progress"
+
+#define SWALLOW_DETAIL_LIST                            "detail.list"
+#define PART_BUTTON_ICON                               "icon"
+
+#define MAIN_SPEED_TEXT                                        "main.speedbox.txt"
+
+
+#define SIGNAL_CONTROL_PART_PLAY_BUTTON                        "control.play.button"
+#define SIGNAL_CONTROL_PART_BACK_BUTTON                        "control.back.button"
+#define SIGNAL_CONTROL_PART_VOL_BUTTON                 "control.volume.button"
+#define SIGNAL_CONTROL_PART_SOUNDPATH_BUTTON           "control.soundpath.button"
+#define SIGNAL_CONTROL_PART_FF_BUTTON                  "control.normal.ff.button"
+#define SIGNAL_CONTROL_PART_REW_BUTTON                 "control.normal.rew.button"
+
+#define SIGNAL_HIDDEN_BUTTON_PANEL_SOUNDPATH           "hidden.button.panel.soundpath"
+
+#define SIGNAL_CONTROL_MODE_STREAMING                  "signal.control.mode.streaming"
+#define SIGNAL_CONTROL_MODE_DLNA                       "signal.control.mode.dlna"
+#define SIGNAL_CONTROL_MODE_VISIBLE_OFF                        "signal.control.mode.visible.off"
+#define SIGNAL_CONTROL_MODE_NORMAL                     "signal.control.mode.normal"
+#define SIGNAL_CONTROL_BACK_BUTTON_DOWN                        "signal.control.back.button.up"
+
+#define SIGNAL_CONTROL_VOL_BUTTON_DOWN                 "signal.control.volume.button.down"
+#define SIGNAL_CONTROL_VOL_BUTTON_UP                   "signal.control.volume.button.up"
+#define SIGNAL_CONTROL_SOUNDPATH_BUTTON_DOWN           "signal.control.soundpath.button.down"
+#define SIGNAL_CONTROL_SOUNDPATH_BUTTON_UP             "signal.control.soundpath.button.up"
+#define SIGNAL_CONTROL_NORMAL_FF_BUTTON_DOWN           "signal.control.normal.ff.button.down"
+#define SIGNAL_CONTROL_NORMAL_FF_BUTTON_UP             "signal.control.normal.ff.button.up"
+#define SIGNAL_CONTROL_NORMAL_REW_BUTTON_DOWN          "signal.control.normal.rew.button.down"
+#define SIGNAL_CONTROL_NORMAL_REW_BUTTON_UP            "signal.control.normal.rew.button.up"
+#define SIGNAL_CONTROL_NORMAL_FF_STEP                  "signal.control.normal.ff.button.step"
+#define SIGNAL_CONTROL_NORMAL_REW_STEP                 "signal.control.normal.rew.button.step"
+#define SIGNAL_CONTROL_NORMAL_FF_LANDSCAPE_STEP                "signal.control.normal.ff.button.landscape.step"
+#define SIGNAL_CONTROL_NORMAL_REW_LANDSCAPE_STEP       "signal.control.normal.rew.button.landscape.step"
+
+
+#define SIGNAL_CONTROL_VOL_BUTTON_MUTE                 "signal.control.volume.button.mute"
+#define SIGNAL_CONTROL_VOL_BUTTON_UNMUTE               "signal.control.volume.button.unmute"
+#define SIGNAL_CONTROL_SOUNDPATH_BUTTON_ACTIVE         "signal.control.soundpath.button.active"
+#define SIGNAL_CONTROL_SOUNDPATH_BUTTON_UNACTIVE       "signal.control.soundpath.button.unactive"
+
+
+#define SIGNAL_MW_PIXMAP_SHOW                          "signal.mw.image.show"
+#define SIGNAL_MW_PIXMAP_HIDE                          "signal.mw.image.hide"
+
+#define SIGNAL_NAVIFRAME_PORTRATE_MODE                 "signal.naviframe.portrate.mode"
+#define SIGNAL_NAVIFRAME_LANDSCAPE_MODE                        "signal.naviframe.landscape.mode"
+
+#define SIGNAL_MAIN_PORTRATE_MODE                      "signal.main.portrate.mode"
+#define SIGNAL_MAIN_LANDSCAPE_MODE                     "signal.main.landscape.mode"
+
+#define SIGNAL_PANEL_PORTRATE_MODE                     "signal.panel.portrate.mode"
+#define SIGNAL_PANEL_LANDSCAPE_MODE                    "signal.panel.landscape.mode"
+
+#define SIGNAL_PROGRESS_PORTRATE_MODE                  "signal.progress.portrate.mode"
+#define SIGNAL_PROGRESS_LANDSCAPE_MODE                 "signal.progress.landscape.mode"
+
+#define SIGNAL_PROGRESS_ADJUSTMENT_SHOW                        "signal.progress.adjustment.show"
+#define SIGNAL_PROGRESS_ADJUSTMENT_HIDE                        "signal.progress.adjustment.hide"
+
+
+#define SIGNAL_CONTROL_PORTRATE_MODE                   "signal.control.portrate.mode"
+#define SIGNAL_CONTROL_LANDSCAPE_MODE                  "signal.control.landscape.mode"
+
+#define SIGNAL_CONTROL_STREAMING_PORTRATE_MODE         "signal.control.streaming.portrate.mode"
+#define SIGNAL_CONTROL_STREAMING_LANDSCAPE_MODE                "signal.control.streaming.landscape.mode"
+
+// Callback signals.
+#define SIGNAL_CONTROL_PLAY_BUTTON_DOWN                        "signal.control.play.button.down"
+#define SIGNAL_CONTROL_PLAY_BUTTON_UP                  "signal.control.play.button.up"
+#define SIGNAL_CONTROL_PLAY_PAUSE_PRESS                        "signal.control.play.pause.press"
+#define SIGNAL_CONTROL_PLAY_RESUME_PRESS               "signal.control.play.resume.press"
+
+// Emit signals.
+#define SIGNAL_CONTROL_PLAY_RESUME                     "signal.control.play.resume"
+#define SIGNAL_CONTROL_PLAY_PAUSE                      "signal.control.play.pause"
+
+#define SIGNAL_MAIN_MUTE_SHOW                          "signal.main.mute.show"
+#define SIGNAL_MAIN_MUTE_HIDE                          "signal.main.mute.hide"
+
+#define SIGNAL_MAIN_NOCONTENTS_SHOW                    "signal.main.nocontents.show"
+#define SIGNAL_MAIN_NOCONTENTS_HIDE                    "signal.main.nocontents.hide"
+
+#define SIGNAL_MAIN_SPEEDBOX_SHOW                      "signal.main.speedbox.show"
+#define SIGNAL_MAIN_SPEEDBOX_HIDE                      "signal.main.speedbox.hide"
+
+#define SIGNAL_MAIN_SCREEN_TOUCH_TOGGLE                        "main.screen.touch.toggle"
+#define SIGNAL_MAIN_ANIMATION_SHOW                     "signal.main.animation.show"
+#define SIGNAL_MAIN_ANIMATION_HIDE                     "signal.main.animation.hide"
+
+#define SIGNAL_ANIMATION_IMAGE_LOADING                 "signal.loading.image.step"
+
+
+#define TAG_FAVOURITES                                 "Favourites"
+#define PACKAGE                                                "video-player"
+#define PAUSE_KEY                                      "XF86AudioPause"
+#define PLAY_KEY                                       "XF86AudioPlay"
+#define STOP_KEY                                       "XF86AudioStop"
+#define NEXT_KEY                                       "XF86AudioNext"
+#define PREV_KEY                                       "XF86AudioPrev"
+#define FORWARD_KEY                                    "XF86AudioForward"
+#define REWIND_KEY                                     "XF86AudioRewind"
+#define END_KEY                                                KEY_END
+#define HOME_KEY                                       KEY_SELECT
+#define KEY_CANCLE                                     KEY_CANCEL
+#define POWER_KEY                                      "XF86PowerOff"
+#define VOLUME_DOWN_KEY                                        KEY_VOLUMEDOWN
+#define VOLUME_MUTE                                    0
+#define KEY_GRAB_SHARED                                        SHARED_GRAB
+#define KEY_GRAB_EXCLUSIVE                             EXCLUSIVE_GRAB
+#define KEY_GRAB_TOP_POSITION                          TOP_POSITION_GRAB
+#define KEY_GRAB_OR_EXCLUSIVE                          OR_EXCLUSIVE_GRAB
+#define STR_LEN_MAX                                    4096 * 3
+#define SVC_LEN_MAX                                    2048
+
+#define        XML_ITEM_NUM                                    6
+#define _WIFI_MODE_                                    1
+#define _3G_MODE_                                      2
+#define USE_STREAMING_ANI                              1
+#define LONG_PRESS_INTERVAL                            1.0
+#define DOUBLE_CLICK_TIME                              0.2
+
+#define        SCREEN_TOUCH_TOGGLE_AREA_Y_START                0.065
+#define        SCREEN_TOUCH_TOGGLE_AREA_Y_END                  0.78
+
+#define        TAG_LIST_SIZE                                   256
+
+#define ANIMATION_TIMER_INTERVAL                       0.05
+#define ANIMATION_MAX_COUNT                            30
+
+#define BOOSTER_STEP_DISTANCE                          30
+#define SIGNAL_TEXT_MAX_LEN                            64
+#define CAPTION_TEXT_MAX_LEN                           16
+#define STR_UUID_LEN_MAX                               37
+
+#define DEFAULT_SCALE_WIDTH                            720
+#define DEFAULT_SCALE_HEIGHT                           1280
+
+#define DEFAULT_MW_WIDTH                               496
+#define DEFAULT_MW_HEIGHT                              286
+
+#endif //_VIDEO_VALUE_DEFINE_
+
diff --git a/include/mp-video-view-mgr.h b/include/mp-video-view-mgr.h
new file mode 100755 (executable)
index 0000000..04ac408
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * 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 [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
+ *
+ *    Licensed under the Flora License, Version 1.0 (the "License");
+ *    you may not use this file except in compliance with the License.
+ *    You may obtain a copy of the License at
+ *
+ *        http://www.tizenopensource.org/license
+ *
+ *    Unless required by applicable law or agreed to in writing, software
+ *    distributed under the License is distributed on an "AS IS" BASIS,
+ *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *    See the License for the specific language governing permissions and
+ *    limitations under the License.
+ */
+
+
+#ifndef _VIDEO_VIEW_MGR_
+#define  _VIDEO_VIEW_MGR_
+
+
+
+bool MpVideoViewCtrlInit(VideoAppData* pAppData);
+void MpVideoViewCtrlDestroy(void* pUserData);
+
+
+void MpVideoViewCtrlSetRotation(int nRotateMode, void *pUserData);
+void MpVideoViewCtrlInitAfterBeginOfStream(void*);
+void MpVideoViewCtrlPause(void* pUserData);
+void MpVideoViewCtrlResume(void* pUserData);
+void MpVideoViewShowLayout(void* pUserData);
+void MpVideoViewHideLayout(void* pUserData);
+void MpVideoViewSetBufferingRateForStreamingView(int nSetBufferingRate, void* pUserData);
+void MpVideoViewHideSoundpath(void* pUserData);
+void MpVideoViewCtrlChangeTitle(void *pUserData);
+bool MpVideoViewCtrlIsTopView(void *pUserData);
+void MpVideoViewCtrlShowNocontentImage(void* pUserData);
+void MpVideoViewCtrlHideNocontentImage(void* pUserData);
+void MpVideoViewCtrlResetProgressBar(void *pUserData);
+void MpVideoViewCtrlUpdateProgressbar(void *pUserData);
+bool MpVideoViewCtrlIsPauseByUser(void);
+#endif //_VIDEO_VIEW_MGR_
\ No newline at end of file
diff --git a/include/mp-xml-parser.h b/include/mp-xml-parser.h
new file mode 100755 (executable)
index 0000000..3545022
--- /dev/null
@@ -0,0 +1,52 @@
+/*\r
+ * 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.\r
+ * \r
+ *    Copyright [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]\r
+ * \r
+ *    Licensed under the Flora License, Version 1.0 (the "License");\r
+ *    you may not use this file except in compliance with the License.\r
+ *    You may obtain a copy of the License at\r
+ * \r
+ *        http://www.tizenopensource.org/license\r
+ * \r
+ *    Unless required by applicable law or agreed to in writing, software\r
+ *    distributed under the License is distributed on an "AS IS" BASIS,\r
+ *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ *    See the License for the specific language governing permissions and\r
+ *    limitations under the License.\r
+ */\r
+\r
+\r
+#ifndef _MP_XML_PARSER_H_\r
+#define _MP_XML_PARSER_H_\r
+\r
+\r
+#include <stdio.h>\r
+#include <stdbool.h>\r
+#include <mp-util.h>\r
+\r
+\r
+typedef struct
+{
+       char    szURL                   [STR_LEN_MAX];
+       int             id;
+       int             streaming_type;
+}MpXMLItemInfo;\r
+\r
+\r
+void mp_xml_init();\r
+void mp_xml_destroy();\r
+\r
+unsigned int mp_read_xml_file(const char *file_name, char **data);\r
+\r
+\r
+\r
+\r
+// [in]content : xml data\r
+// [in]length : length of content\r
+// [out]streamer_url : url of content\r
+bool mp_get_url_from_xml(const char *content, int length, char **streamer_url, int mode);\r
+char *mp_get_title_from_xml(const char *file_name);\r
+int mp_get_xmlitem(const char *content, int length, MpXMLItemInfo *item,int *nHttpCount, int *nRtspCount);\r
+\r
+#endif\r
diff --git a/include/video-player.h b/include/video-player.h
new file mode 100644 (file)
index 0000000..30bce4c
--- /dev/null
@@ -0,0 +1,104 @@
+/*
+ * 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 [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
+ * 
+ *    Licensed under the Flora License, Version 1.0 (the "License");
+ *    you may not use this file except in compliance with the License.
+ *    You may obtain a copy of the License at
+ * 
+ *        http://www.tizenopensource.org/license
+ * 
+ *    Unless required by applicable law or agreed to in writing, software
+ *    distributed under the License is distributed on an "AS IS" BASIS,
+ *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *    See the License for the specific language governing permissions and
+ *    limitations under the License.
+ */
+
+
+#ifndef __VIDEO_PLAYER__
+#define         __VIDEO_PLAYER__
+
+#include <stdbool.h>
+#include <utilX.h>
+#include <Ecore_X.h>
+#include <Elementary.h>
+
+#include "mp-video-value-define.h"
+#include "mp-video-type-define.h"
+
+
+typedef struct _VideoAppData           VideoAppData;
+
+
+typedef struct
+{
+       void (*VideoAppCtrlStart)                               (VideoAppData* pAppData);
+       void (*VideoAppCtrlStop)                                (VideoAppData* pAppData);
+       void (*VideoAppCtrlPause)                               (VideoAppData* pAppData);
+       void (*VideoAppCtrlResume)                              (VideoAppData* pAppData);
+       void (*VideoAppCtrlStopByAppPause)              (VideoAppData* pAppData);
+       void (*VideoAppCtrlStartByAppResume)    (VideoAppData* pAppData);
+       void (*VideoAppCtrlFFDown)                              (VideoAppData* pAppData);
+       void (*VideoAppCtrlRewDown)                             (VideoAppData* pAppData);
+       void (*VideoAppCtrlFFUp)                                (VideoAppData* pAppData);
+       void (*VideoAppCtrlRewUp)                               (VideoAppData* pAppData);
+       void (*VideoAppCtrlSpeedReset)                  (VideoAppData* pAppData);
+       void (*VideoAppCtrlSpeedFF)                             (VideoAppData* pAppData);
+       void (*VideoAppCtrlSpeedRew)                    (VideoAppData* pAppData);
+       void (*VideoAppCtrlSetMute)                             (VideoAppData* pAppData);
+       void (*VideoAppCtrlRotateScreen)                (VideoAppData *pAppData, int nRotateState);
+       void (*VideoAppCtrlGetPosition)                 (VideoAppData* pAppData);
+       void (*VideoAppCtrlSetPosition)                 (VideoAppData* pAppData);
+       void (*VideoAppCtrlHideLayout)                  (VideoAppData* pAppData);
+       void (*VideoAppCtrlShowLayout)                  (VideoAppData* pAppData);
+       void (*VideoAppCtrlGetVideoResolution)  (VideoAppData* pAppData);
+       void (*VideoAppCtrlReqDurationTime)             (VideoAppData* pAppData);
+       void (*VideoAppCtrlChangeResolution)    (VideoAppData* pAppData);
+       void (*VideoAppCtrlBeginOfStream)               (VideoAppData* pAppData);
+       void (*VideoAppCtrlEndOfStream)                 (VideoAppData* pAppData);
+       void (*VideoAppCtrlExit)                                (VideoAppData* pAppData);
+       void (*VideoAppCtrlStartStreaming)              (VideoAppData* pAppData);
+       void (*VideoAppCtrlReLaunching)                 (VideoAppData* pAppData);
+       void (*VideoAppCtrlPlayPreMedia)                (VideoAppData* pAppData);
+       void (*VideoAppCtrlPlayNextMedia)               (VideoAppData* pAppData);
+       void (*VideoAppCtrlGetBufferingPosition)(VideoAppData* pAppData);
+}VideoAppCtrlFunc;
+
+
+struct _VideoAppData
+{
+       Evas_Object*            pMainWindow;
+
+       int                     nDuration;
+       int                     nSetPosition;
+       int                     nCurPosition;
+       int                     nSeekPosition;
+       int                     nSubtitleDuration;
+       int                     nBufferingPosition;
+
+       int                     nVideoWidthResolution;
+       int                     nVideoHeightResolution;
+
+       char                    szVideoTitle[STR_LEN_MAX];
+
+       char                    szMediaUri[STR_LEN_MAX];
+       char                    szPreMediaUri[STR_LEN_MAX];
+       char                    szNextMediaUri[STR_LEN_MAX];
+
+       int             nPlayingSpeed;
+       bool                    bStartSeek;
+       bool                    bSeekComplete;
+
+       char                    szProxyAddress[STR_LEN_MAX];
+       char                    szUserAgent[STR_LEN_MAX];
+       char                    szCookie[STR_LEN_MAX];
+
+       MpPlayerState       nPrePlayerState;
+       MpPlayerState       nCurPlayerState;
+       VideoAppCtrlFunc    VideoAppCtrlCallbackFunc;
+       MpPlayerState       nSeekPlayerState;
+};
+
+#endif //__VIDEO_PLAYER__
diff --git a/org.tizen.video-player.xml b/org.tizen.video-player.xml
new file mode 100755 (executable)
index 0000000..7952607
--- /dev/null
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.video-player" version="0.5.93" install-location="internal-only">
+       <label>Video player</label>
+       <author email="jongdong.lee@samsung.com" href="www.samsung.com">JongDong Lee</author>
+       <description>Video player Application</description>
+       <ui-application appid="org.tizen.video-player" exec="/opt/apps/org.tizen.video-player/bin/video-player" nodisplay="true" multiple="false" type="capp" taskmanage="true">
+               <label>Video player</label>
+               <icon>org.tizen.video-player.png</icon>
+               <label xml:lang="en-us">Video player</label>
+               <label xml:lang="nl-nl">Video player</label>
+               <label xml:lang="de-de">Video player</label>
+               <label xml:lang="zh-hk">Video player</label>
+               <label xml:lang="zh-cn">Video player</label>
+               <label xml:lang="ru-ru">Video player</label>
+               <label xml:lang="zh-tw">Video player</label>
+               <label xml:lang="ja-jp">Video player</label>
+               <label xml:lang="es-es">Video player</label>
+               <label xml:lang="el-gr">Video player</label>
+               <label xml:lang="it-it">Video player</label>
+               <label xml:lang="tr-tr">Video player</label>
+               <label xml:lang="pt-pt">Video player</label>
+               <label xml:lang="fr-fr">Video player</label>
+               <label xml:lang="ko-kr">비디오 플레이어</label>
+               <application-service>
+                       <operation name="http://tizen.org/appcontrol/operation/view" />
+                       <mime name="video/mp4" />
+                       <mime name="video/3gp" />
+                       <mime name="video/x-msvideo" />
+                       <mime name="video/x-ms-wmv" />
+                       <mime name="video/x-ms-asf" />
+                       <mime name="video/3gpp" />
+                       <mime name="video/x-matroska" />
+                       <mime name="video/vnd.ms-playready.media.pyv" />
+                       <mime name="application/x-mpegurl" />
+                       <mime name="audio/x-mpegurl" />
+                       <mime name="video/x-mpegurl" />
+                       <mime name="video/x-flv" />
+                       <mime name="video/ogg" />
+                       <mime name="application/sdp" />
+                       <uri name="http" />
+                       <uri name="https" />
+                       <uri name="rtsp" />
+                       <uri name="rtp" />
+               </application-service>
+               <application-service>
+                       <operation name="http://tizen.org/appcontrol/operation/view" />
+                       <mime name="video/mp4" />
+                       <mime name="video/3gp" />
+                       <mime name="video/x-msvideo" />
+                       <mime name="video/x-ms-wmv" />
+                       <mime name="video/x-ms-asf" />
+                       <mime name="video/3gpp" />
+                       <mime name="video/x-matroska" />
+                       <mime name="video/vnd.ms-playready.media.pyv" />
+                       <mime name="application/x-mpegurl" />
+                       <mime name="audio/x-mpegurl" />
+                       <mime name="video/x-mpegurl" />
+                       <mime name="video/x-flv" />
+                       <mime name="video/ogg" />
+                       <mime name="application/sdp" />
+               </application-service>
+       </ui-application>
+</manifest>
diff --git a/packaging/harfbuzz.spec b/packaging/harfbuzz.spec
deleted file mode 100644 (file)
index cda2d79..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-Name:           harfbuzz
-Summary:        Hindi Reshaping Library
-Version:        0.9.0
-Release:        1
-Group:          TO_BE/FILLED_IN
-License:        TO BE FILLED IN
-Source0:        %{name}-%{version}.tar.gz
-BuildRequires:  pkgconfig(freetype2)
-BuildRequires:  which
-BuildRequires:  ragel
-
-
-%description
-Hindi Reshaping Library
-
-
-%package devel
-Summary:    TO BE FILLED IN
-Requires:   %{name} = %{version}-%{release}
-
-
-%description devel
-Development files for %{name}
-
-
-%prep
-%setup -q 
-
-
-%build
-%autogen
-%configure
-
-make %{?jobs:-j%jobs}
-
-
-%install
-rm -rf %{buildroot}
-%make_install
-
-
-%files
-%defattr(-,root,root,-)
-%{_libdir}/lib*.so.*
-
-
-%files devel
-%defattr(-,root,root,-)
-%{_includedir}/*
-%{_libdir}/lib*.so
-%{_libdir}/pkgconfig/*
-
-
diff --git a/packaging/org.tizen.video-player.spec b/packaging/org.tizen.video-player.spec
new file mode 100644 (file)
index 0000000..f18bcb2
--- /dev/null
@@ -0,0 +1,91 @@
+Name:       org.tizen.video-player
+Summary:    Video & streaming player
+Version:    0.5.124
+Release:    1
+Group:      TO_BE/FILLED_IN
+License:    Flora
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires: pkgconfig(elementary)
+BuildRequires: pkgconfig(drm-client)
+BuildRequires: pkgconfig(utilX)
+BuildRequires: pkgconfig(dlog)
+BuildRequires: pkgconfig(vconf)
+BuildRequires: pkgconfig(libxml-2.0)
+BuildRequires: pkgconfig(syspopup-caller)
+BuildRequires: pkgconfig(ecore)
+BuildRequires: pkgconfig(eina)
+BuildRequires: pkgconfig(evas)
+BuildRequires: pkgconfig(edje)
+BuildRequires: pkgconfig(efreet)
+BuildRequires: pkgconfig(pmapi)
+BuildRequires: pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(capi-media-player)
+BuildRequires: pkgconfig(capi-media-sound-manager)
+BuildRequires: pkgconfig(capi-media-image-util)
+BuildRequires: pkgconfig(capi-system-power)
+BuildRequires: pkgconfig(capi-media-metadata-extractor)
+BuildRequires: pkgconfig(capi-content-media-content)
+BuildRequires: pkgconfig(capi-content-mime-type)
+BuildRequires: pkgconfig(capi-system-sensor)
+BuildRequires: pkgconfig(capi-system-haptic)
+BuildRequires: pkgconfig(ecore-evas)
+BuildRequires: pkgconfig(ecore-x)
+BuildRequires: pkgconfig(xext)
+BuildRequires: pkgconfig(ui-gadget-1)
+BuildRequires: boost-devel
+BuildRequires: boost-thread
+BuildRequires: boost-system
+BuildRequires: boost-filesystem
+
+
+BuildRequires: cmake
+BuildRequires: gettext-tools
+BuildRequires: edje-tools
+BuildRequires: prelink
+BuildRequires: libicu-devel
+
+%description
+Video & streaming player
+
+%prep
+%setup -q
+
+%ifarch %{arm}
+%define ARCH arm
+%else
+%define ARCH i586
+%endif
+
+%build
+cmake . -DCMAKE_INSTALL_PREFIX=/opt/apps/org.tizen.video-player  -DARCH=%{ARCH}
+make %{?jobs:-j%jobs}
+
+
+%install
+rm -rf %{buildroot}
+%make_install
+execstack -c %{buildroot}/opt/apps/org.tizen.video-player/bin/video-player
+
+%post
+vconftool set -t bool db/private/org.tizen.video-player/backgroud_playing 0  -g 5000
+vconftool set -t int  db/private/org.tizen.video-player/video_auto_off_type 0  -g 5000
+vconftool set -t bool db/private/org.tizen.video-player/auto_search_subtitle_file 1  -g 5000
+vconftool set -t bool db/private/org.tizen.video-player/show_subtitle 1  -g 5000
+vconftool set -t int  db/private/org.tizen.video-player/subtitle_size 1  -g 5000
+vconftool set -t int  db/private/org.tizen.video-player/display_color_tone_type 0  -g 5000
+vconftool set -t bool db/private/org.tizen.video-player/outdoor_visibility 0  -g 5000
+vconftool set -t string db/private/org.tizen.video-player/preview_url_videos "" -g 5000
+vconftool set -t string db/private/org.tizen.video-player/preview_url_records "" -g 5000
+vconftool set -t string db/private/org.tizen.video-player/show_indicator 1 -g 5000
+vconftool set -t string db/private/org.tizen.video-player/show_border 0 -g 5000
+
+chown -R 5000:5000 /opt/apps/org.tizen.video-player/data
+
+%files -n org.tizen.video-player
+%dir /opt/apps/org.tizen.video-player/data
+/opt/apps/org.tizen.video-player/bin/*
+/opt/apps/org.tizen.video-player/res/locale/*
+/opt/share/icons/default/small/*
+/opt/apps/org.tizen.video-player/res/edje/*
+/opt/apps/org.tizen.video-player/res/images/*
+/opt/share/packages/org.tizen.video-player.xml
diff --git a/res/edc/add_tag.edc b/res/edc/add_tag.edc
new file mode 100755 (executable)
index 0000000..c045ecb
--- /dev/null
@@ -0,0 +1,346 @@
+collections {
+       group {
+               name: "favorite";
+               parts {
+                       part {
+                               name: "background";
+                               type, RECT;     
+                               mouse_events: 0;
+                               description {
+                               state: "default" 0.0;              
+                               rel1 { relative: 0.0 0.0; offset: 0 0; }
+                               rel2 { relative: 1.0 1.0; offset: -1 -1; }
+                               color, 0 0 0 255 ;
+                           }
+                       }
+                       
+                       part {
+                               name: "selectall_bg";   
+                               type: RECT;
+                               mouse_events: 0;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       min: 0 80;
+                                       fixed: 0 1;
+                                       align: 0.5 0.0;
+                                       rel1 { relative: 0.0 0.0; to: "background"; }
+                                       rel2 { relative: 1.0 0.0; to: "background"; }
+                                       visible : 0;
+                                       color: 37 37 37 153;
+                                       visible : 0;
+                               }
+                               description {
+                                       state: "visible" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                       }
+       
+               part {
+                       name: "selectall_check_leftpadding";
+                       type: RECT;
+                       mouse_events: 0;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               min: 15 0;
+                               fixed: 1 0;
+                               align: 0.0 0.0;
+                                       
+                               color: 0 0 0 255;
+                               visible: 0;
+                               rel1 { relative: 0.0 0.0; to: "selectall_bg"; }
+                               rel2 { relative: 0.0 1.0; to: "selectall_bg"; }
+                       }
+                       description {
+                               state: "visible" 0.0;
+                               inherit: "default" 0.0;
+                       }
+               }
+
+               part {
+                       name: "selectall_check";
+                       type: SWALLOW;
+                       mouse_events: 1;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               align: 0.0 0.5;
+                               fixed: 1 1;
+                               min: 44 44;
+                               rel1 { relative: 1.0 0.0; to: "selectall_check_leftpadding"; }
+                               rel2 { relative: 1.0 1.0; to: "selectall_check_leftpadding"; }
+                               visible : 0;
+                                                                               
+                       }
+                       description {
+                               state: "visible" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 1;
+                       }                                                                       
+               }
+
+               part {
+                       name: "selectall_check_rightpadding";
+                       type: RECT;
+                       mouse_events: 0;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               min: 15 0;
+                               fixed: 1 0;
+                               align: 0.0 0.0;
+                               color: 0 0 0 0;
+                               rel1 { relative: 1.0 0.0; to: "selectall_check"; }
+                               rel2 { relative: 1.0 1.0; to: "selectall_check"; }
+                                visible: 0;
+                       }
+                       description {
+                               state: "visible" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 1;
+                       }
+               }
+
+               part {
+                       name: "selectall_text";
+                       type: TEXT;
+                       mouse_events: 0;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               align: 0.0 0.5;
+                               rel1 { relative: 1.0 0.0; to: "selectall_check_rightpadding"; }
+                               rel2 { relative: 1.0 1.0; to: "selectall_bg"; }
+                               color: 255 255 255 255;
+                               text {
+                                       font: "SLP";
+                                       size: 32;
+                                       text: "Select all";
+                                       align: 0.0 0.5;
+                               }
+                               visible: 0;
+                       }
+                       description {
+                               state: "visible" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 1;
+                       }       
+               }
+
+               part {
+                       name: "selectall_inner";
+                       type: RECT;
+                       mouse_events: 0;
+                       scale: 1;
+
+                       description {
+                               state: "defalut" 0.0;
+                               min: 0 1;
+                               fixed: 0 1;
+                               align: 0.5 0.0;
+                               rel1 { relative: 0.0 1.0; to: "selectall_bg"; }
+                               rel2 { relative: 1.0 1.0; to: "selectall_bg"; }
+                               color: 90 90 90 0;
+                       }
+                       description {
+                               state: "visible" 0.0;
+                               inherit: "default" 0.0;
+                       }
+               }
+               
+
+               // tab style container
+               part {
+                       name: "elm.swallow.tabbar";
+                       type: SWALLOW;
+                       scale: 1;
+                       mouse_events: 1;
+                       description {
+                               state: "default" 0.0;
+                       }
+               }
+
+               // tool style container. 
+               part {
+                       name: "elm.swallow.toolbar_bg";
+                       type: RECT;
+                       mouse_events: 0;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                               min: 0 50;
+                               fixed: 1 1;
+                               align: 0.5 0.0;
+                               rel1 { relative: 0.0 0.0; }
+                               rel2 { relative: 1.0 0.0; offset: 0 50;}
+
+                       }
+               }
+               
+               // tool style container. 
+               part {
+                       name: "elm.swallow.toolbar";
+                       type: SWALLOW;
+                       mouse_events: 1;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               //min: 0 76;
+                               min: 0 86;
+                               fixed: 1 1;
+                               align: 0.5 1.0;
+                               rel1 { relative: 0.0 1.0;}
+                               rel2 { relative: 1.0 1.0;}
+
+                       }
+                       description {
+                               state: "moveup" 0.0;
+                               //min: 0 86;
+                               min: 0 50;
+                               fixed: 1 1;                                     
+                               //align: 0.5 1.0;
+                               align: 0.5 0.0;                 
+                               rel1 { relative: 0.0 0.0; offset: 5 0;}                                                 
+                               rel2 { relative: 1.0 0.0; offset: -5 50;}
+
+                       }
+                       description {
+                               state: "moveup_progressbar" 0.0;
+                               min: 0 62;
+                               fixed: 1 1;                                     
+                               align: 0.5 0.0;
+                               rel1 { relative: 0.0 0.0;}
+                               rel2 { relative: 1.0 0.0; offset: 0 62;}
+
+                       }
+               }
+               
+               // view container. This is used, when tool items is added.
+               part {
+                       name: "elm.swallow.view";
+                       type: SWALLOW;
+                       mouse_events: 1;                        
+                       description {
+                               state: "default" 0.0;                   
+                               rel1 { relative: 0.0 0.0;}
+                               rel2 { relative: 1.0 0.0; to: "elm.swallow.toolbar";}
+
+                       }
+                       description {
+                               state: "edit_default" 0.0;
+                               rel1 { relative: 0.0 1.0; to: "selectall_inner"; }
+                               rel2 { relative: 1.0 0.0; to: "elm.swallow.toolbar";}
+
+                       }
+                       description {
+                               state: "moveup_toolbar" 0.0;
+                               rel1 { relative: 0.0 1.0; offset: 0 0; to: "elm.swallow.toolbar_bg";}
+                               rel2 { relative: 1.0 1.0; }
+                       }
+                       description {
+                               state: "moveup_toolbar_progressbar" 0.0;
+                               rel1 { relative: 0.0 1.0; to: "elm.swallow.toolbar";}
+                               rel2 { relative: 1.0 1.0; }
+                       }
+               }
+
+               part {
+                       name: "view_bg";
+                       type: SWALLOW;     
+                       mouse_events: 1;
+                       repeat_events: 1;                                       
+                       description {
+                       state: "default" 0.0;              
+                       rel1 { relative: 0.0 0.0; offset: 0 0; to: "elm.swallow.view";}
+                       rel2 { relative: 1.0 1.0; offset: 0 0; to: "elm.swallow.view";}
+                       }
+                       description { 
+                               state: "disabled" 0.0;
+                inherit: "default" 0.0;
+                               visible: 0;
+            }
+               }
+       }//GROUP
+       programs {
+               program {
+                       name: "swallow_view_default";
+                       signal: "elm,swallow_view,state,default";
+                       source: "elm";
+                       script {
+                               set_state(PART:"elm.swallow.view", "default", 0.0);
+                               set_state(PART:"elm.swallow.toolbar", "default", 0.0);//restore toolbar position
+                       }
+               }
+               program {
+                       name: "swallow_view_edit_default";
+                       signal: "elm,swallow_view,state,edit_default";
+                       source: "elm";
+                       script {
+                               set_state(PART:"elm.swallow.view", "edit_default", 0.0);
+                               set_state(PART:"elm.swallow.toolbar", "default", 0.0);//restore toolbar position
+                       }
+               }
+               program {
+                       name: "swallow_view_moveup_toolbar";
+                       signal: "elm,swallow_view,state,moveup_toolbar";
+                       source: "elm";
+                       script {
+                               set_state(PART:"elm.swallow.toolbar", "moveup", 0.0); //move toolbar up
+                               set_state(PART:"elm.swallow.view", "moveup_toolbar", 0.0); 
+                       }
+               }
+               program {
+                       name: "swallow_view_moveup_toolbar_progressbar";
+                       signal: "elm,swallow_view,state,moveup_toolbar_progressbar";
+                       source: "elm";
+                       script {
+                   set_state(PART:"elm.swallow.toolbar", "moveup_progressbar", 0.0); //move toolbar+progressbar up
+                               set_state(PART:"elm.swallow.view", "moveup_toolbar_progressbar", 0.0); 
+                       }
+               }                        
+               program {
+                       name: "view_bg_default";
+                       signal: "elm,view,bg,state,default";
+                       source: "elm";
+                       script {
+                               set_state(PART:"view_bg", "default", 0.0);
+                       }
+               }
+               program {
+                       name: "view_bg_disable";
+                       signal: "elm,view,bg,state,disabled";
+                       source: "elm";
+                       script {
+                               set_state(PART:"view_bg", "disabled", 0.0);
+                       }
+               }
+               program {
+                       name: "selectall_show";
+                       signal: "selectall_show";
+                       source: "elm";
+                       action: STATE_SET "visible" 0.0;
+                       target: "selectall_bg";
+                       target: "selectall_check_leftpadding";
+                       target: "selectall_check";
+                       target: "selectall_check_rightpadding";
+                       target: "selectall_text";
+                       target: "selectall_inner";                                                                      
+               }
+               program {
+                       name: "selectall_hide";
+                       signal: "selectall_hide";
+                       source: "elm";
+                       action: STATE_SET "default" 0.0;
+                       target: "selectall_bg";
+                       target: "selectall_check_leftpadding";
+                       target: "selectall_check";
+                       target: "selectall_check_rightpadding";
+                       target: "selectall_text";
+                       target: "selectall_inner";
+               } 
+       }//PROGRAMS
+} /* collections */
diff --git a/res/edc/animation.edc b/res/edc/animation.edc
new file mode 100755 (executable)
index 0000000..f0ee9a4
--- /dev/null
@@ -0,0 +1,299 @@
+#include "image_res.edc"\r
+#include "vp_font.edc"\r
+\r
+#define CONTROL_BUTTON_STEP(_item_name_, _val_)                                \\r
+program {                                                                                                      \\r
+       signal: "signal."_item_name_".step."_val_;                                              \\r
+       source: "*";                                                                                            \\r
+       action: STATE_SET "step_"_val_ 0.0;                                                     \\r
+       target: _item_name_;                                                                            \\r
+} // CONTROL_BUTTON_STEP\r
+\r
+\r
+collections {\r
+       group {\r
+               name: "animation";\r
+\r
+               parts {\r
+                       part {\r
+                               name: "loading.back";\r
+                               type: RECT;\r
+                               mouse_events: 1;\r
+                               scale: 1;\r
+                               description {\r
+                                       state: "default" 0.0;\r
+                                       visible: 0;\r
+                                       rel1 { relative: 0.0 0.0;}\r
+                                       rel2 { relative: 1.0 1.0;}\r
+                                       color: 255 0 0 255;\r
+                               }\r
+                       }\r
+\r
+                       part {\r
+                               name: "loading.txt";\r
+                               type: TEXT;\r
+                               mouse_events: 0;\r
+                               scale: 1;\r
+                               description {\r
+                                       state: "default" 0.0;\r
+                                       visible: 1;\r
+                                       min: 288 54;\r
+                                       fixed: 0 1;\r
+                                       align: 0.5 0.0;\r
+                                       rel1 { relative: 0.0 1.0; }\r
+                                       rel2 { relative: 1.0 1.0; }\r
+                                       color: FONT_COLOR;\r
+                                       text {\r
+                                               font: FONT_BOLD_TYPE;\r
+                                               text_class: "slp_bold";\r
+                                               size: 32;\r
+                                               text: "";\r
+                                               align: 0.5 0.5;\r
+                                       }\r
+                               }\r
+                       }\r
+\r
+                       part {\r
+                               name: "loading.image";\r
+                               type: IMAGE;\r
+                               mouse_events: 1;\r
+                               scale: 1;\r
+                               description {\r
+                                       state: "default" 0.0;\r
+                                       visible: 0;\r
+                                       min: 138 138;\r
+                                       fixed: 1 1;\r
+                                       align: 0.5 0.5;\r
+                                       rel1 { relative: 0.5 0.5;}\r
+                                       rel2 { relative: 0.5 0.5;}\r
+                                       image { normal: "gallery_loading_ani_01.png"; }\r
+                                       color: 255 255 255 255;\r
+                               }\r
+                               description {\r
+                                       state: "show" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       visible: 1;\r
+                                       image { normal: "gallery_loading_ani_01.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "step_1" 0.0;\r
+                                       inherit: "show" 0.0;\r
+                                       visible: 1;\r
+                                       image { normal: "gallery_loading_ani_01.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "step_2" 0.0;\r
+                                       inherit: "show" 0.0;\r
+                                       visible: 1;\r
+                                       image { normal: "gallery_loading_ani_02.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "step_3" 0.0;\r
+                                       inherit: "show" 0.0;\r
+                                       visible: 1;\r
+                                       image { normal: "gallery_loading_ani_03.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "step_4" 0.0;\r
+                                       inherit: "show" 0.0;\r
+                                       visible: 1;\r
+                                       image { normal: "gallery_loading_ani_04.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "step_5" 0.0;\r
+                                       inherit: "show" 0.0;\r
+                                       visible: 1;\r
+                                       image { normal: "gallery_loading_ani_05.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "step_6" 0.0;\r
+                                       inherit: "show" 0.0;\r
+                                       visible: 1;\r
+                                       image { normal: "gallery_loading_ani_06.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "step_7" 0.0;\r
+                                       inherit: "show" 0.0;\r
+                                       visible: 1;\r
+                                       image { normal: "gallery_loading_ani_07.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "step_8" 0.0;\r
+                                       inherit: "show" 0.0;\r
+                                       visible: 1;\r
+                                       image { normal: "gallery_loading_ani_08.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "step_9" 0.0;\r
+                                       inherit: "show" 0.0;\r
+                                       visible: 1;\r
+                                       image { normal: "gallery_loading_ani_09.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "step_10" 0.0;\r
+                                       inherit: "show" 0.0;\r
+                                       visible: 1;\r
+                                       image { normal: "gallery_loading_ani_10.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "step_11" 0.0;\r
+                                       inherit: "show" 0.0;\r
+                                       visible: 1;\r
+                                       image { normal: "gallery_loading_ani_11.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "step_12" 0.0;\r
+                                       inherit: "show" 0.0;\r
+                                       visible: 1;\r
+                                       image { normal: "gallery_loading_ani_12.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "step_13" 0.0;\r
+                                       inherit: "show" 0.0;\r
+                                       visible: 1;\r
+                                       image { normal: "gallery_loading_ani_13.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "step_14" 0.0;\r
+                                       inherit: "show" 0.0;\r
+                                       visible: 1;\r
+                                       image { normal: "gallery_loading_ani_14.png"; }\r
+                               }description {\r
+                                       state: "step_15" 0.0;\r
+                                       inherit: "show" 0.0;\r
+                                       visible: 1;\r
+                                       image { normal: "gallery_loading_ani_15.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "step_16" 0.0;\r
+                                       inherit: "show" 0.0;\r
+                                       visible: 1;\r
+                                       image { normal: "gallery_loading_ani_16.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "step_17" 0.0;\r
+                                       inherit: "show" 0.0;\r
+                                       visible: 1;\r
+                                       image { normal: "gallery_loading_ani_17.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "step_18" 0.0;\r
+                                       inherit: "show" 0.0;\r
+                                       image { normal: "gallery_loading_ani_18.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "step_19" 0.0;\r
+                                       inherit: "show" 0.0;\r
+                                       visible: 1;\r
+                                       image { normal: "gallery_loading_ani_19.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "step_20" 0.0;\r
+                                       inherit: "show" 0.0;\r
+                                       visible: 1;\r
+                                       image { normal: "gallery_loading_ani_20.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "step_21" 0.0;\r
+                                       inherit: "show" 0.0;\r
+                                       visible: 1;\r
+                                       image { normal: "gallery_loading_ani_21.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "step_22" 0.0;\r
+                                       inherit: "show" 0.0;\r
+                                       visible: 1;\r
+                                       image { normal: "gallery_loading_ani_22.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "step_23" 0.0;\r
+                                       inherit: "show" 0.0;\r
+                                       visible: 1;\r
+                                       image { normal: "gallery_loading_ani_23.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "step_24" 0.0;\r
+                                       inherit: "show" 0.0;\r
+                                       visible: 1;\r
+                                       image { normal: "gallery_loading_ani_24.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "step_25" 0.0;\r
+                                       inherit: "show" 0.0;\r
+                                       visible: 1;\r
+                                       image { normal: "gallery_loading_ani_25.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "step_26" 0.0;\r
+                                       inherit: "show" 0.0;\r
+                                       visible: 1;\r
+                                       image { normal: "gallery_loading_ani_26.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "step_27" 0.0;\r
+                                       inherit: "show" 0.0;\r
+                                       visible: 1;\r
+                                       image { normal: "gallery_loading_ani_27.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "step_28" 0.0;\r
+                                       inherit: "show" 0.0;\r
+                                       visible: 1;\r
+                                       image { normal: "gallery_loading_ani_28.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "step_29" 0.0;\r
+                                       inherit: "show" 0.0;\r
+                                       visible: 1;\r
+                                       image { normal: "gallery_loading_ani_29.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "step_30" 0.0;\r
+                                       inherit: "show" 0.0;\r
+                                       visible: 1;\r
+                                       image { normal: "gallery_loading_ani_30.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "step_0" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       visible: 0;\r
+                               }\r
+                       }\r
+               } // parts\r
+\r
+               programs {\r
+                       CONTROL_BUTTON_STEP( "loading.image", 0);\r
+                       CONTROL_BUTTON_STEP( "loading.image", 1);\r
+                       CONTROL_BUTTON_STEP( "loading.image", 2);\r
+                       CONTROL_BUTTON_STEP( "loading.image", 3);\r
+                       CONTROL_BUTTON_STEP( "loading.image", 4);\r
+                       CONTROL_BUTTON_STEP( "loading.image", 5);\r
+                       CONTROL_BUTTON_STEP( "loading.image", 6);\r
+                       CONTROL_BUTTON_STEP( "loading.image", 7);\r
+                       CONTROL_BUTTON_STEP( "loading.image", 8);\r
+                       CONTROL_BUTTON_STEP( "loading.image", 9);\r
+                       CONTROL_BUTTON_STEP( "loading.image", 10);\r
+                       CONTROL_BUTTON_STEP( "loading.image", 11);\r
+                       CONTROL_BUTTON_STEP( "loading.image", 12);\r
+                       CONTROL_BUTTON_STEP( "loading.image", 13);\r
+                       CONTROL_BUTTON_STEP( "loading.image", 14);\r
+                       CONTROL_BUTTON_STEP( "loading.image", 15);\r
+                       CONTROL_BUTTON_STEP( "loading.image", 16);\r
+                       CONTROL_BUTTON_STEP( "loading.image", 17);\r
+                       CONTROL_BUTTON_STEP( "loading.image", 18);\r
+                       CONTROL_BUTTON_STEP( "loading.image", 19);\r
+                       CONTROL_BUTTON_STEP( "loading.image", 20);\r
+                       CONTROL_BUTTON_STEP( "loading.image", 21);\r
+                       CONTROL_BUTTON_STEP( "loading.image", 22);\r
+                       CONTROL_BUTTON_STEP( "loading.image", 23);\r
+                       CONTROL_BUTTON_STEP( "loading.image", 24);\r
+                       CONTROL_BUTTON_STEP( "loading.image", 25);\r
+                       CONTROL_BUTTON_STEP( "loading.image", 26);\r
+                       CONTROL_BUTTON_STEP( "loading.image", 27);\r
+                       CONTROL_BUTTON_STEP( "loading.image", 28);\r
+                       CONTROL_BUTTON_STEP( "loading.image", 29);\r
+                       CONTROL_BUTTON_STEP( "loading.image", 30);\r
+\r
+               }       // programs\r
+       }       // group\r
+}      // collections\r
diff --git a/res/edc/control.edc b/res/edc/control.edc
new file mode 100755 (executable)
index 0000000..49590e2
--- /dev/null
@@ -0,0 +1,1065 @@
+\r
+#define BUTTON_PRESS_COLOR     56 149 205 255\r
+#define CONTROL_ICON_SIZE 136 144\r
+#include "image_res.edc"\r
+#include "vp_font.edc"\r
+\r
+// part macro\r
+\r
+#define CONTROL_BUTTON_PRESS_PART(_name_ , _w_ , _h_ , _align_x_ , _align_y_ , _rel_x1_ , _rel_x2_ , _rel_y1_, _rel_y2_ , _to_ ,  _img_def_ , _img_press_ )    \\r
+part {                                                                                                                 \\r
+       name: _name_;                                                                                   \\r
+       type: IMAGE;                                                                                            \\r
+       scale: 1;                                                                                                       \\r
+       mouse_events: 1;                                                                                        \\r
+       description {                                                                                           \\r
+               state: "default" 0.0;                                                                   \\r
+               min: _w_ _h_;                                                                                   \\r
+               fixed: 1 1;                                                                                     \\r
+               align: _align_x_ _align_y_;                                                             \\r
+               rel1 { relative: _rel_x1_ _rel_y1_; to : _to_;}                         \\r
+               rel2 { relative: _rel_x2_ _rel_y2_; to : _to_;}                         \\r
+               image { normal: _img_def_; border: 4 4 0 0;}                            \\r
+               color: 255 255 255 255;                                                                 \\r
+       }                                                                                                               \\r
+       description {                                                                                           \\r
+               state: "pressed" 0.0;                                                                   \\r
+               min: _w_ _h_;                                                                                   \\r
+               fixed: 1 1;                                                                                     \\r
+               align: _align_x_ _align_y_;                                                             \\r
+               rel1 { relative: _rel_x1_ _rel_y1_;  to : _to_;}                                \\r
+               rel2 { relative: _rel_x2_ _rel_y2_;  to : _to_;}                                \\r
+               image { normal: _img_press_; border: 4 4 0 0;}                  \\r
+               color: 255 255 255 255;                                                                 \\r
+       }                                                                                                               \\r
+       description {                                                                                           \\r
+               state: "hide" 0.0;                                                                              \\r
+               inherit: "default" 0.0;                                                                         \\r
+               visible: 0;                                                                                     \\r
+       }                                                                                                               \\r
+}      // CONTROL_BUTTON_PRESS_PART\r
+\r
+\r
+\r
+// program macro\r
+\r
+#define CONTROL_BUTTON_PROG(_item_name_)                                       \\r
+program {                                                                                                      \\r
+       name: _item_name_".pressed";                                                            \\r
+       source: _item_name_;                                                                            \\r
+       signal: "mouse,down,1";                                                                         \\r
+       action: STATE_SET "pressed" 0.0;                                                        \\r
+       target: _item_name_;                                                                            \\r
+       after: "send."_item_name_".down.signal";                                                \\r
+}                                                                                                                      \\r
+program {                                                                                                      \\r
+       name: _item_name_".clicked";                                                            \\r
+       source: _item_name_;                                                                            \\r
+       signal: "mouse,up,1";                                                                           \\r
+       action: STATE_SET "default" 0.0;                                                                \\r
+       target: _item_name_;                                                                            \\r
+       after: "send."_item_name_".up.signal";                                          \\r
+}                                                                                                                      \\r
+program {                                                                                                      \\r
+       name: "send."_item_name_".down.signal";                                                 \\r
+       action: SIGNAL_EMIT "signal."_item_name_".down" _item_name_;    \\r
+}                                                                                                                      \\r
+program {                                                                                                      \\r
+       name: "send."_item_name_".up.signal";                                           \\r
+       action: SIGNAL_EMIT "signal."_item_name_".up" _item_name_;      \\r
+} // CONTROL_BUTTON_PROG\r
+\r
+\r
+#define CONTROL_BUTTON_STEP(_item_name_, _val_)                                \\r
+program {                                                                                                      \\r
+       signal: "signal."_item_name_".step."_val_;                                              \\r
+       source: "*";                                                                                            \\r
+       action: STATE_SET "step_"_val_ 0.0;                                                     \\r
+       target: _item_name_;                                                                            \\r
+} // CONTROL_BUTTON_STEP\r
+\r
+#define CONTROL_BUTTON_STEP_LANDSCAPE(_item_name_, _val_)      \\r
+program {                                                                                                      \\r
+       signal: "signal."_item_name_".landscape.step."_val_;                                            \\r
+       source: "*";                                                                                            \\r
+       action: STATE_SET "step_"_val_"_landscape" 0.0;                                                 \\r
+       target: _item_name_;                                                                            \\r
+} // CONTROL_BUTTON_STEP\r
+\r
+collections {\r
+       group {\r
+               name: "control";\r
+\r
+               script {\r
+                       public val_volume_check = 0;    /* 0: unmute, 1: mute */\r
+                       public val_play_status = 0;             /* 0: pause , 1: resume */\r
+                       public val_display_mode = 0;    /* 0: normal, 1: trim, 2: streaming, 3: DLNA*/\r
+                       public val_rotate_mode = 0;             /* 0: portrate, 1: landscape */\r
+\r
+                       public change_display_mode() {\r
+\r
+                               run_program(PROGRAM:"set.visible.off");\r
+\r
+                               if(get_int(val_display_mode ) == 0) {           /* normal mode */\r
+                                       run_program(PROGRAM:"set.mode.normal");\r
+                               }\r
+                               if(get_int(val_display_mode ) == 1) {           /* trim mode */\r
+                                       run_program(PROGRAM:"set.mode.trim");\r
+                               }\r
+                               if(get_int(val_display_mode ) == 2) {           /* streaming mode */\r
+                                       run_program(PROGRAM:"set.mode.streaming");\r
+                               }\r
+                               if(get_int(val_display_mode ) == 3) {           /* dlna mode */\r
+                                       run_program(PROGRAM:"set.mode.dlna");\r
+                               }\r
+                       }       /* change_display_mode */\r
+\r
+\r
+                       public set_volume_check() {\r
+                               if(get_int(val_volume_check ) == 0) {\r
+                                       run_program(PROGRAM:"set.volume.unmute");\r
+                               }\r
+                               else {\r
+                                       run_program(PROGRAM:"set.volume.mute");\r
+                               }\r
+                       }       /* set_volume_check */\r
+\r
+                       public send_play_value() {\r
+                               if(get_int(val_play_status ) == 0) {\r
+                                       run_program(PROGRAM:"send.play.resume");\r
+                               }\r
+                               else {\r
+                                       run_program(PROGRAM:"send.play.pause");\r
+                               }\r
+                       }       /* send_play_value */\r
+\r
+\r
+                       public set_play_status() {\r
+                               if(get_int(val_play_status ) == 0) {\r
+                                       run_program(PROGRAM:"set.play.default");\r
+                               }\r
+                               else {\r
+                                       run_program(PROGRAM:"set.play.pause");\r
+                               }\r
+                       }       /* set_play_status */\r
+\r
+\r
+                       public set_play_button_press() {\r
+                               if(get_int(val_play_status ) == 0) {\r
+                                       run_program(PROGRAM:"press.resume.button");\r
+                               }\r
+                               else {\r
+                                       run_program(PROGRAM:"press.pause.button");\r
+                               }\r
+                       }       // set_play_button_press\r
+               }       // script\r
+\r
+               parts {\r
+                       part {\r
+                               name: "control.rect";\r
+                               type: RECT;\r
+                               mouse_events: 0;\r
+                               description {\r
+                                       state: "default" 0.0;\r
+                                       align: 0.0 0.5;\r
+                                       visible : 0;\r
+                                       rel1 { relative: 0.0 0.0; }\r
+                                       rel2 { relative: 1.0 1.0; }\r
+                                       color: 255 0 0 0;\r
+                               }\r
+                       }\r
+\r
+                       part {\r
+                               name: "control.rect.1";\r
+                               type: RECT;\r
+                               mouse_events: 0;\r
+                               scale: 1;\r
+                               description {\r
+                                       state: "default" 0.0;\r
+                                       align: 0.0 0.5;\r
+                                       min: 144 0;\r
+                                       fixed: 1 0;\r
+                                       visible : 1;\r
+                                       rel1 { relative: 0.0 0.0; }\r
+                                       rel2 { relative: 0.2 1.0; }\r
+                                       color: 255 0 0 0;\r
+                               }\r
+                               description {\r
+                                       state: "landscape" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       min: 180 0;\r
+                                       rel1 { relative: 0.0 0.0; }\r
+                                       rel2 { relative: 0.1406 1.0; }\r
+\r
+                               }\r
+                       }\r
+\r
+                       part {\r
+                               name: "control.rect.2";\r
+                               type: RECT;\r
+                               mouse_events: 0;\r
+                               scale: 1;\r
+                               description {\r
+                                       state: "default" 0.0;\r
+                                       align: 0.0 0.0;\r
+                                       min: 144 0;\r
+                                       fixed: 1 0;\r
+                                       visible : 1;\r
+                                       rel1 { relative: 0.2 0.0;}\r
+                                       rel2 { relative: 0.4 1.0;}\r
+                                       color: 0 255 0 0;\r
+                               }\r
+                               description {\r
+                                       state: "landscape" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       min: 271 0;\r
+                                       rel1 { relative: 0.18125 0.0;}\r
+                                       rel2 { relative: 0.39296 1.0;}\r
+                               }\r
+                       }\r
+\r
+                       part {\r
+                               name: "control.rect.3";\r
+                               type: RECT;\r
+                               mouse_events: 0;\r
+                               scale: 1;\r
+                               description {\r
+                                       state: "default" 0.0;\r
+                                       align: 0.0 0.0;\r
+                                       min: 144 0;\r
+                                       fixed: 1 0;\r
+                                       visible : 1;\r
+                                       rel1 { relative: 0.4 0.0; }\r
+                                       rel2 { relative: 0.6 1.0; }\r
+                                       color: 0 0 255 0;\r
+                               }\r
+                               description {\r
+                                       state: "landscape" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       min: 271 0;\r
+                                       rel1 { relative: 0.39453 0.0; }\r
+                                       rel2 { relative: 0.60625 1.0; }\r
+                               }\r
+                       }\r
+\r
+                       part {\r
+                               name: "control.rect.4";\r
+                               type: RECT;\r
+                               mouse_events: 0;\r
+                               scale: 1;\r
+                               description {\r
+                                       state: "default" 0.0;\r
+                                       align: 0.0 0.0;\r
+                                       min: 144 0;\r
+                                       fixed: 1 0;\r
+                                       visible : 1;\r
+                                       rel1 { relative: 0.6 0.0;}\r
+                                       rel2 { relative: 0.8 1.0;}\r
+                                       color: 255 255 0 0;\r
+                               }\r
+                               description {\r
+                                       state: "landscape" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       min: 271 0;\r
+                                       rel1 { relative: 0.60781 0.0; }\r
+                                       rel2 { relative: 0.81953 1.0; }\r
+                               }\r
+                       }\r
+\r
+                       part {\r
+                               name: "control.rect.5";\r
+                               type: RECT;\r
+                               mouse_events: 0;\r
+                               scale: 1;\r
+                               description {\r
+                                       state: "default" 0.0;\r
+                                       visible : 1;\r
+                                       min: 144 0;\r
+                                       fixed: 1 0;\r
+                                       align: 1.0 0.0;\r
+                                       rel1 { relative: 0.8 0.0;}\r
+                                       rel2 { relative: 1.0 1.0;}\r
+                                       color: 255 255 255 0;\r
+                               }\r
+                               description {\r
+                                       state: "landscape" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       min: 180 0;\r
+                                       rel1 { relative: 0.85937 0.0;}\r
+                                       rel2 { relative: 1.0 1.0;}\r
+                               }\r
+                       }\r
+\r
+                       part {\r
+                               name: "control.rect.1.line";\r
+                               type: RECT;\r
+                               scale: 1;\r
+                               description {\r
+                                       state: "default" 0.0;\r
+                                       visible: 1;\r
+                                       min: 1 70;\r
+                                       fixed: 1 1;\r
+                                       align: 0.5 0.5;\r
+                                       rel1 { relative: 1.0 0.5; to: "control.rect.1"; }\r
+                                       rel2 { relative: 1.0 0.5; to: "control.rect.1"; }\r
+                                       color: 144 144 144 178;\r
+                               }\r
+                       }\r
+\r
+                       part {\r
+                               name: "control.rect.2.line";\r
+                               type: RECT;\r
+                               scale: 1;\r
+                               description {\r
+                                       state: "default" 0.0;\r
+                                       visible: 1;\r
+                                       min: 1 70;\r
+                                       fixed: 1 1;\r
+                                       align: 0.5 0.5;\r
+                                       rel1 { relative: 0.0 0.5; to: "control.rect.5"; }\r
+                                       rel2 { relative: 0.0 0.5; to: "control.rect.5"; }\r
+                                       color: 144 144 144 178;\r
+                               }\r
+                       }\r
+\r
+                       part {\r
+                               name: "control.volume.button";\r
+                               type: IMAGE;\r
+                               mouse_events: 1;\r
+                               scale: 1;\r
+                               description {\r
+                                       state: "default" 0.0;\r
+                                       visible: 1;\r
+                                       min: CONTROL_ICON_SIZE;\r
+                                       fixed: 1 1;\r
+                                       align: 0.5 0.5;\r
+                                       rel1 { relative: 0.5 0.5; to: "control.rect.1"; }\r
+                                       rel2 { relative: 0.5 0.5; to: "control.rect.1"; }\r
+                                       image { normal: "white/panel/T01-2_btn_toolbar_volume.png"; }\r
+                                       color: 255 255 255 255;\r
+                               }\r
+                               description {\r
+                                       state: "pressed" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       color: BUTTON_PRESS_COLOR;\r
+                               }\r
+                               description {\r
+                                       state: "hide" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       visible: 0;\r
+                               }\r
+                       }\r
+\r
+                       part {\r
+                               name: "control.back.button";\r
+                               type: IMAGE;\r
+                               mouse_events: 1;\r
+                               scale: 1;\r
+                               description {\r
+                                       state: "default" 0.0;\r
+                                       visible: 1;\r
+                                       min: CONTROL_ICON_SIZE;\r
+                                       fixed: 1 1;\r
+                                       align: 0.5 0.5;\r
+                                       rel1 { relative: 0.5 0.5; to: "control.rect.5";  }\r
+                                       rel2 { relative: 0.5 0.5; to: "control.rect.5";  }\r
+                                       image { normal: "white/panel/T01-2_btn_toolbar_back.png"; }\r
+                                       color: 255 255 255 255;\r
+                               }\r
+                               description {\r
+                                       state: "pressed" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       color: BUTTON_PRESS_COLOR;\r
+                               }\r
+                               description {\r
+                                       state: "hide" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       visible: 0;\r
+                               }\r
+                       }\r
+\r
+                       part {\r
+                               name: "control.trim.done.button";\r
+                               type: IMAGE;\r
+                               mouse_events: 1;\r
+                               scale: 1;\r
+                               description {\r
+                                       state: "default" 0.0;\r
+                                       visible: 1;\r
+                                       min: 56 56;\r
+                                       fixed: 1 1;\r
+                                       align: 0.5 0.5;\r
+                                       rel1 { relative: 0.5 0.5; to: "control.rect.1"; }\r
+                                       rel2 { relative: 0.5 0.5; to: "control.rect.1"; }\r
+                                       image { normal: "panel/T01-2_icon_toolbar_done.png"; }\r
+                                       color: 255 255 255 255;\r
+                               }\r
+                               description {\r
+                                       state: "hide" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       visible: 0;\r
+                               }\r
+                               description {\r
+                                       state: "pressed" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       color: BUTTON_PRESS_COLOR;\r
+                               }\r
+                       }\r
+\r
+                       part {\r
+                               name: "control.trim.cancel.button";\r
+                               type: IMAGE;\r
+                               mouse_events: 1;\r
+                               scale: 1;\r
+                               description {\r
+                                       state: "default" 0.0;\r
+                                       visible: 1;\r
+                                       min: 56 56;\r
+                                       fixed: 1 1;\r
+                                       align: 0.5 0.5;\r
+                                       rel1 { relative: 0.5 0.5; to: "control.rect.5"; }\r
+                                       rel2 { relative: 0.5 0.5; to: "control.rect.5"; }\r
+                                       image { normal: "panel/T01-2_icon_toolbar_cancel.png"; }\r
+                                       color: 255 255 255 255;\r
+                               }\r
+                               description {\r
+                                       state: "hide" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       visible: 0;\r
+                               }\r
+                               description {\r
+                                       state: "pressed" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       color: BUTTON_PRESS_COLOR;\r
+                               }\r
+                       }\r
+\r
+                       part {\r
+                               name: "control.play.button";\r
+                               type: IMAGE;\r
+                               scale: 1;\r
+                               mouse_events: 1;\r
+                               description {\r
+                                       state: "default" 0.0;\r
+                                       visible: 1;\r
+                                       min: CONTROL_ICON_SIZE;\r
+                                       fixed: 1 1;\r
+                                       align: 0.5 0.5;\r
+                                       rel1 { relative: 0.5 0.5; to: "control.rect.3"; }\r
+                                       rel2 { relative: 0.5 0.5; to: "control.rect.3"; }\r
+                                       image { normal: "white/control/T01-2_icon_toolbar_play.png"; }\r
+                                       color: 255 255 255 255;\r
+                               }\r
+                               description {\r
+                                       state: "pause" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       image { normal: "white/control/T01-2_icon_toolbar_pause.png"; }\r
+                                       color: 255 255 255 255;\r
+                               }\r
+                               description {\r
+                                       state: "hide" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       visible: 0;\r
+                               }\r
+                               description {\r
+                                       state: "press_resume" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       image { normal: "white/control/T01-2_icon_toolbar_play.png"; }\r
+                                       color: BUTTON_PRESS_COLOR;\r
+                               }\r
+                               description {\r
+                                       state: "press_pause" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       image { normal: "white/control/T01-2_icon_toolbar_pause.png"; }\r
+                                       color: BUTTON_PRESS_COLOR;\r
+                               }\r
+                       }\r
+\r
+\r
+                       // normal mode control part\r
+                       part {\r
+                               name: "control.normal.rew.button";\r
+                               type: IMAGE;\r
+                               mouse_events: 1;\r
+                               scale: 1;\r
+                               description {\r
+                                       state: "default" 0.0;\r
+                                       visible: 1;\r
+                                       min: CONTROL_ICON_SIZE;\r
+                                       fixed: 1 1;\r
+                                       align: 0.5 0.5;\r
+                                       rel1 { relative: 0.5 0.5; to: "control.rect.2";}\r
+                                       rel2 { relative: 0.5 0.5; to: "control.rect.2";}\r
+                                       image { normal: "white/control/T01-2_icon_toolbar_previous.png"; }\r
+                                       color: 255 255 255 255;\r
+                               }\r
+                               description {\r
+                                       state: "pressed" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       color: BUTTON_PRESS_COLOR;\r
+                               }\r
+                               description {\r
+                                       state: "hide" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       visible: 0;\r
+                               }\r
+                               description {\r
+                                       state: "step_1" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       image { normal: "gallery_video_control_rew_2.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "step_2" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       image { normal: "gallery_video_control_rew_3.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "step_3" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       image { normal: "gallery_video_control_rew_4.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "step_4" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       image { normal: "gallery_video_control_rew_5.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "portrate" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       visible: 1;\r
+                               }\r
+                       }\r
+\r
+                       part {\r
+                               name: "control.normal.ff.button";\r
+                               type: IMAGE;\r
+                               mouse_events: 1;\r
+                               scale: 1;\r
+                               description {\r
+                                       state: "default" 0.0;\r
+                                       visible: 1;\r
+                                       min: CONTROL_ICON_SIZE;\r
+                                       fixed: 1 1;\r
+                                       align: 0.5 0.5;\r
+                                       rel1 { relative: 0.5 0.5; to: "control.rect.4"; }\r
+                                       rel2 { relative: 0.5 0.5; to: "control.rect.4";}\r
+                                       image { normal: "white/control/T01-2_icon_toolbar_next.png"; }\r
+                                       color: 255 255 255 255;\r
+                               }\r
+                               description {\r
+                                       state: "pressed" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       color: BUTTON_PRESS_COLOR;\r
+                               }\r
+                               description {\r
+                                       state: "hide" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       visible: 0;\r
+                               }\r
+                               description {\r
+                                       state: "step_1" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       image { normal: "gallery_video_control_ff_2.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "step_2" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       image { normal: "gallery_video_control_ff_3.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "step_3" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       image { normal: "gallery_video_control_ff_4.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "step_4" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       image { normal: "gallery_video_control_ff_5.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "portrate" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       visible: 1;\r
+                               }\r
+\r
+                       }\r
+                       // <-- normal mode control part\r
+\r
+\r
+\r
+                       // --> trim mode control part\r
+                       part {\r
+                               name: "control.trim.rew.button";\r
+                               type: IMAGE;\r
+                               mouse_events: 1;\r
+                               scale: 1;\r
+                               description {\r
+                                       state: "default" 0.0;\r
+                                       visible: 1;\r
+                                       min: 162 78;\r
+                                       fixed: 1 1;\r
+                                       align: 0.5 0.5;\r
+                                       rel1 { relative: 0.5 0.5; to: "control.rect.2"; }\r
+                                       rel2 { relative: 0.5 0.5; to: "control.rect.2"; }\r
+                                       image { normal: "gallery_video_rewind_1x.png"; }\r
+                                       color: 255 255 255 255;\r
+                               }\r
+                               description {\r
+                                       state: "pressed" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       image { normal: "gallery_video_rewind_1x.png"; }\r
+                                       color: BUTTON_PRESS_COLOR;\r
+                               }\r
+                               description {\r
+                                       state: "hide" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       visible: 0;\r
+                               }\r
+                               description {\r
+                                       state: "step_1" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       image { normal: "gallery_video_rewind_2x.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "step_2" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       image { normal: "gallery_video_rewind_3x.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "step_3" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       image { normal: "gallery_video_rewind_4x.png"; }\r
+                               }\r
+                       }\r
+\r
+                       part {\r
+                               name: "control.trim.ff.button";\r
+                               type: IMAGE;\r
+                               mouse_events: 1;\r
+                               scale: 1;\r
+                               description {\r
+                                       state: "default" 0.0;\r
+                                       visible: 1;\r
+                                       min: 162 78;\r
+                                       fixed: 1 1;\r
+                                       align: 0.5 0.5;\r
+                                       rel1 { relative: 0.5 0.5; to: "control.rect.4"; }\r
+                                       rel2 { relative: 0.5 0.5; to: "control.rect.4"; }\r
+                                       image { normal: "gallery_video_fastforward_1x.png"; }\r
+                                       color: 255 255 255 255;\r
+                               }\r
+                               description {\r
+                                       state: "pressed" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       image { normal: "gallery_video_fastforward_1x.png"; }\r
+                                       color: BUTTON_PRESS_COLOR;\r
+                               }\r
+                               description {\r
+                                       state: "hide" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       visible: 0;\r
+                               }\r
+                               description {\r
+                                       state: "step_1" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       image { normal: "gallery_video_fastforward_2x.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "step_2" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       image { normal: "gallery_video_fastforward_3x.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "step_3" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       image { normal: "gallery_video_fastforward_4x.png"; }\r
+                               }\r
+                       } // <-- trim mode control part\r
+               } // parts\r
+\r
+\r
+               programs {\r
+                       program {\r
+                               signal: "signal.control.mode.normal";\r
+                               source: "*";\r
+                               script {\r
+                                       set_int(val_display_mode, 0);\r
+                                       change_display_mode();\r
+                                       set_play_status();\r
+                               }\r
+                       }\r
+\r
+                       program {\r
+                               signal: "signal.control.mode.trim";\r
+                               source: "*";\r
+                               script {\r
+                                       set_int(val_display_mode, 1);\r
+                                       change_display_mode();\r
+                                       set_play_status();\r
+                               }\r
+                       }\r
+\r
+                       program {\r
+                               signal: "signal.control.mode.streaming";\r
+                               source: "*";\r
+                               script {\r
+                                       set_int(val_display_mode, 2);\r
+                                       change_display_mode();\r
+                                       set_play_status();\r
+                               }\r
+                       }\r
+                       program {\r
+                               signal: "signal.control.mode.dlna";\r
+                               source: "*";\r
+                               script {\r
+                                       set_int(val_display_mode, 3);\r
+                                       change_display_mode();\r
+                                       set_play_status();\r
+                               }\r
+                       }\r
+\r
+                       program {\r
+                               signal: "signal.control.mode.visible.off";\r
+                               source: "*";\r
+                               after: "set.visible.off";\r
+                       }\r
+\r
+                       program {\r
+                               name: "set.visible.off";\r
+                               source: "*";\r
+                               action: STATE_SET "hide" 0.0;\r
+\r
+                               target: "control.play.button";\r
+                               target: "control.back.button";\r
+                               target: "control.volume.button";\r
+                               target: "control.normal.rew.button";\r
+                               target: "control.normal.ff.button";\r
+                               target: "control.trim.rew.button";\r
+                               target: "control.trim.ff.button";\r
+                               target: "control.trim.done.button";\r
+                               target: "control.trim.cancel.button";\r
+                       }\r
+\r
+                       program {\r
+                               name: "set.mode.normal";\r
+                               source: "*";\r
+                               action: STATE_SET "default" 0.0;\r
+\r
+                               target: "control.play.button";\r
+                               target: "control.back.button";\r
+                               target: "control.volume.button";\r
+                               target: "control.normal.rew.button";\r
+                               target: "control.normal.ff.button";\r
+                       }\r
+\r
+                       program {\r
+                               name: "set.mode.trim";\r
+                               source: "*";\r
+                               action: STATE_SET "default" 0.0;\r
+\r
+                               target: "control.play.button";\r
+                               target: "control.trim.rew.button";\r
+                               target: "control.trim.ff.button";\r
+                               target: "control.trim.done.button";\r
+                               target: "control.trim.cancel.button";\r
+                       }\r
+\r
+                       program {\r
+                               name: "set.mode.streaming";\r
+                               source: "*";\r
+                               action: STATE_SET "default" 0.0;\r
+\r
+                               target: "control.play.button";\r
+                               target: "control.back.button";\r
+                               target: "control.volume.button";\r
+                       }\r
+\r
+                       program {\r
+                               name: "set.mode.dlna";\r
+                               source: "*";\r
+                               action: STATE_SET "default" 0.0;\r
+\r
+                               target: "control.play.button";\r
+                               target: "control.back.button";\r
+                               target: "control.volume.button";\r
+                               target: "control.normal.rew.button";\r
+                               target: "control.normal.ff.button";\r
+\r
+                       }\r
+\r
+                       program {\r
+                               name: "control.normal.rew.button.press";\r
+                               source: "control.normal.rew.button";\r
+                               signal: "signal.control.normal.rew.button.down";\r
+                               script:\r
+                               {\r
+                                       if(get_int(val_rotate_mode) == 0)\r
+                                       {\r
+                                               set_state(PART:"control.normal.rew.button", "pressed", 0.0);\r
+                                       }\r
+                                       else\r
+                                       {\r
+                                               set_state(PART:"control.normal.rew.button", "pressed_landscape", 0.0);\r
+                                       }\r
+                               }\r
+                       }\r
+\r
+                       program {\r
+                               name: "control.normal.rew.button.up";\r
+                               source: "control.normal.rew.button";\r
+                               signal: "signal.control.normal.rew.button.up";\r
+                               script:\r
+                               {\r
+                                       if(get_int(val_rotate_mode) == 0)\r
+                                       {\r
+                                               set_state(PART:"control.normal.rew.button", "portrate", 0.0);\r
+                                       }\r
+                                       else\r
+                                       {\r
+                                               set_state(PART:"control.normal.rew.button", "landscape", 0.0);\r
+                                       }\r
+                               }\r
+                       }\r
+\r
+                       program {\r
+                               name: "control.normal.ff.button.press";\r
+                               source: "control.normal.ff.button";\r
+                               signal: "signal.control.normal.ff.button.down";\r
+                               script:\r
+                               {\r
+                                       if(get_int(val_rotate_mode) == 0)\r
+                                       {\r
+                                               set_state(PART:"control.normal.ff.button", "pressed", 0.0);\r
+                                       }\r
+                                       else\r
+                                       {\r
+                                               set_state(PART:"control.normal.ff.button", "pressed_landscape", 0.0);\r
+                                       }\r
+                               }\r
+                       }\r
+\r
+                       program {\r
+                               name: "control.normal.ff.button.up";\r
+                               source: "control.normal.ff.button";\r
+                               signal: "signal.control.normal.ff.button.up";\r
+                               script:\r
+                               {\r
+                                       if(get_int(val_rotate_mode) == 0)\r
+                                       {\r
+                                               set_state(PART:"control.normal.ff.button", "portrate", 0.0);\r
+                                       }\r
+                                       else\r
+                                       {\r
+                                               set_state(PART:"control.normal.ff.button", "landscape", 0.0);\r
+                                       }\r
+                               }\r
+                       }\r
+\r
+\r
+                       // --> mute/unmute check prog\r
+                       program {\r
+                               signal: "signal.control.volume.button.mute";\r
+                               source: "*";\r
+                               script {\r
+                                       set_int(val_volume_check, 1);\r
+                                       set_volume_check();\r
+                               }\r
+                       }\r
+\r
+                       program {\r
+                               signal: "signal.control.volume.button.unmute";\r
+                               source: "*";\r
+                               script {\r
+                                       set_int(val_volume_check, 0);\r
+                                       set_volume_check();\r
+                               }\r
+                       }\r
+\r
+                       program {\r
+                               name: "set.volume.unmute";\r
+                               action: STATE_SET "default" 0.0;\r
+                               target: "control.volume.button";\r
+                       }\r
+                       program {\r
+                               name: "set.volume.mute";\r
+                               action: STATE_SET "mute" 0.0;\r
+                               target: "control.volume.button";\r
+                       }\r
+                       // --> mute/unmute check prog\r
+\r
+                       // --> play status part\r
+                       program {\r
+                               name: "press.resume.button";\r
+                               action: STATE_SET "press_resume" 0.0;\r
+                               target: "control.play.button";\r
+                       }\r
+                       program {\r
+                               name: "press.pause.button";\r
+                               action: STATE_SET "press_pause" 0.0;\r
+                               target: "control.play.button";\r
+                       }\r
+\r
+                       program {\r
+                               name: "control.play.button.down";\r
+                               source: "control.play.button";\r
+                               signal: "signal.control.play.button.down";\r
+                               script: {set_play_button_press(); }\r
+                       }\r
+\r
+                       program {\r
+                               name: "control.play.button.up";\r
+                               source: "control.play.button";\r
+                               signal: "signal.control.play.button.up";\r
+                               script: { send_play_value(); }\r
+                       }\r
+\r
+                       program {\r
+                               signal: "signal.control.play.resume";\r
+                               source: "*";\r
+                               script {\r
+                                       set_int(val_play_status, 1);\r
+                                       set_play_status();\r
+                               }\r
+                       }\r
+\r
+                       program {\r
+                               signal: "signal.control.play.pause";\r
+                               source: "*";\r
+                               script {\r
+                                       set_int(val_play_status, 0);\r
+                                       set_play_status();\r
+                               }\r
+                       }\r
+\r
+                       program {\r
+                               name: "set.play.default";\r
+                               source: "control.play.button";\r
+                               action: STATE_SET "default" 0.0;\r
+                               target: "control.play.button";\r
+                       }\r
+                       program {\r
+                               name: "set.play.pause";\r
+                               source: "control.play.button";\r
+                               action: STATE_SET "pause" 0.0;\r
+                               target: "control.play.button";\r
+                       }\r
+\r
+                       program {\r
+                               name: "send.play.pause";\r
+                               action: SIGNAL_EMIT "signal.control.play.pause.press" "control.play.button";\r
+                       }\r
+\r
+                       program {\r
+                               name: "send.play.resume";\r
+                               action: SIGNAL_EMIT "signal.control.play.resume.press" "control.play.button";\r
+                       }\r
+\r
+                       program {\r
+                               signal: "signal.control.portrate.mode";\r
+                               source: "*";\r
+                               script {\r
+                                       set_int(val_rotate_mode, 0);\r
+                                       set_state(PART:"control.normal.rew.button", "portrate", 0.0);\r
+                                       set_state(PART:"control.normal.ff.button", "portrate", 0.0);\r
+                                       set_state(PART:"control.rect.1", "default", 0.0);\r
+                                       set_state(PART:"control.rect.2", "default", 0.0);\r
+                                       set_state(PART:"control.rect.3", "default", 0.0);\r
+                                       set_state(PART:"control.rect.4", "default", 0.0);\r
+                                       set_state(PART:"control.rect.5", "default", 0.0);\r
+                               }\r
+                       }\r
+\r
+                       program {\r
+                               signal: "signal.control.landscape.mode";\r
+                               source: "*";\r
+                               script {\r
+                                       set_int(val_rotate_mode, 1);\r
+                                       set_state(PART:"control.normal.rew.button", "landscape", 0.0);\r
+                                       set_state(PART:"control.normal.ff.button", "landscape", 0.0);\r
+                                       set_state(PART:"control.rect.1", "landscape", 0.0);\r
+                                       set_state(PART:"control.rect.2", "landscape", 0.0);\r
+                                       set_state(PART:"control.rect.3", "landscape", 0.0);\r
+                                       set_state(PART:"control.rect.4", "landscape", 0.0);\r
+                                       set_state(PART:"control.rect.5", "landscape", 0.0);\r
+                               }\r
+                       }\r
+\r
+                       program {\r
+                               signal: "signal.control.streaming.portrate.mode";\r
+                               source: "*";\r
+                               script {\r
+                                       set_int(val_rotate_mode, 0);\r
+\r
+                                       set_state(PART:"control.rect.1", "default", 0.0);\r
+                                       set_state(PART:"control.rect.2", "default", 0.0);\r
+                                       set_state(PART:"control.rect.3", "default", 0.0);\r
+                                       set_state(PART:"control.rect.4", "default", 0.0);\r
+                                       set_state(PART:"control.rect.5", "default", 0.0);\r
+                               }\r
+                       }\r
+\r
+                       program {\r
+                               signal: "signal.control.streaming.landscape.mode";\r
+                               source: "*";\r
+                               script {\r
+                                       set_int(val_rotate_mode, 1);\r
+                                       set_state(PART:"control.rect.1", "landscape", 0.0);\r
+                                       set_state(PART:"control.rect.2", "landscape", 0.0);\r
+                                       set_state(PART:"control.rect.3", "landscape", 0.0);\r
+                                       set_state(PART:"control.rect.4", "landscape", 0.0);\r
+                                       set_state(PART:"control.rect.5", "landscape", 0.0);\r
+                               }\r
+                       }\r
+                       // <-- play status part\r
+\r
+                       // -->common control prog\r
+                       CONTROL_BUTTON_PROG("control.play.button");\r
+                       CONTROL_BUTTON_PROG("control.back.button");\r
+                       CONTROL_BUTTON_PROG("control.volume.button");\r
+                       // <-- common control prog\r
+\r
+                       // -->normal mode prog\r
+                       CONTROL_BUTTON_PROG("control.normal.ff.button");\r
+                       CONTROL_BUTTON_PROG("control.normal.rew.button");\r
+\r
+                       CONTROL_BUTTON_STEP("control.normal.ff.button", 1);\r
+                       CONTROL_BUTTON_STEP("control.normal.ff.button", 2);\r
+                       CONTROL_BUTTON_STEP("control.normal.ff.button", 3);\r
+                       CONTROL_BUTTON_STEP("control.normal.ff.button", 4);\r
+\r
+                       CONTROL_BUTTON_STEP("control.normal.rew.button", 1);\r
+                       CONTROL_BUTTON_STEP("control.normal.rew.button", 2);\r
+                       CONTROL_BUTTON_STEP("control.normal.rew.button", 3);\r
+                       CONTROL_BUTTON_STEP("control.normal.rew.button", 4);\r
+\r
+                       CONTROL_BUTTON_STEP_LANDSCAPE("control.normal.ff.button", 1);\r
+                       CONTROL_BUTTON_STEP_LANDSCAPE("control.normal.ff.button", 2);\r
+                       CONTROL_BUTTON_STEP_LANDSCAPE("control.normal.ff.button", 3);\r
+                       CONTROL_BUTTON_STEP_LANDSCAPE("control.normal.ff.button", 4);\r
+\r
+                       CONTROL_BUTTON_STEP_LANDSCAPE("control.normal.rew.button", 1);\r
+                       CONTROL_BUTTON_STEP_LANDSCAPE("control.normal.rew.button", 2);\r
+                       CONTROL_BUTTON_STEP_LANDSCAPE("control.normal.rew.button", 3);\r
+                       CONTROL_BUTTON_STEP_LANDSCAPE("control.normal.rew.button", 4);\r
+                       // <-- normal mode prog\r
+\r
+                       // --> trim mode prog\r
+                       CONTROL_BUTTON_PROG("control.trim.ff.button");\r
+                       CONTROL_BUTTON_PROG("control.trim.rew.button");\r
+\r
+                       CONTROL_BUTTON_STEP("control.trim.ff.button", 1);\r
+                       CONTROL_BUTTON_STEP("control.trim.ff.button", 2);\r
+                       CONTROL_BUTTON_STEP("control.trim.ff.button", 3);\r
+\r
+                       CONTROL_BUTTON_STEP("control.trim.rew.button", 1);\r
+                       CONTROL_BUTTON_STEP("control.trim.rew.button", 2);\r
+                       CONTROL_BUTTON_STEP("control.trim.rew.button", 3);\r
+\r
+                       CONTROL_BUTTON_PROG("control.trim.done.button");\r
+                       CONTROL_BUTTON_PROG("control.trim.cancel.button");\r
+                       // <-- trim mode prog\r
+\r
+               }       // programs\r
+       } // group\r
+} // collections\r
+\r
diff --git a/res/edc/detail.edc b/res/edc/detail.edc
new file mode 100755 (executable)
index 0000000..17b6c2b
--- /dev/null
@@ -0,0 +1,34 @@
+#include "image_res.edc"
+#include "vp_font.edc"
+
+collections {
+       group {
+               name: "detail";
+
+               parts {
+                       part {
+                               name: "detail.background";
+                               type: RECT;
+                               mouse_events: 0;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       rel1 { relative: 0.0 0.0;}
+                                       rel2 { relative: 1.0 1.0;}
+                                       color: 0 0 0 255;
+                               }
+                       }
+                       part {
+                               name: "detail.list";
+                               type: SWALLOW;
+                               scale: 1;
+                               mouse_events: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       rel1 { relative: 0.0 0.0; }
+                                       rel2 { relative: 1.0 1.0; }
+                               }
+                       }
+               } /* parts */
+       } /* group */
+} /* collections */
\ No newline at end of file
diff --git a/res/edc/hidden_button_panel.edc b/res/edc/hidden_button_panel.edc
new file mode 100755 (executable)
index 0000000..e0b9ce2
--- /dev/null
@@ -0,0 +1,187 @@
+#include "image_res.edc"
+#include "vp_font.edc"
+/* program macro */
+
+#define CONTROL_BUTTON_PROG(_item_name_)                                       \
+program {                                                                                                      \
+       name: _item_name_".pressed";                                                            \
+       source: _item_name_;                                                                            \
+       signal: "mouse,down,1";                                                                         \
+       action: STATE_SET "pressed" 0.0;                                                        \
+       target: _item_name_;                                                                            \
+       after: "send."_item_name_".down.signal";                                                \
+}                                                                                                                      \
+program {                                                                                                      \
+       name: _item_name_".clicked";                                                            \
+       source: _item_name_;                                                                            \
+       signal: "mouse,up,1";                                                                           \
+       action: STATE_SET "default" 0.0;                                                                \
+       target: _item_name_;                                                                            \
+       after: "send."_item_name_".up.signal";                                          \
+}                                                                                                                      \
+program {                                                                                                      \
+       name: "send."_item_name_".down.signal";                                                 \
+       action: SIGNAL_EMIT "signal."_item_name_".down" _item_name_;    \
+}                                                                                                                      \
+program {                                                                                                      \
+       name: "send."_item_name_".up.signal";                                           \
+       action: SIGNAL_EMIT "signal."_item_name_".up" _item_name_;      \
+} /* CONTROL_BUTTON_PROG */
+
+collections {
+       group {
+               name: "panel.button";
+               script {
+                       public val_repeat_mode = 0;             /* 0: repeat_off, 1: repeat_one, 2: repeate_all */
+                       public change_repeat() {
+                               if(get_int(val_repeat_mode) == 0) {
+                                       set_int(val_repeat_mode, 1);
+                                       run_program(PROGRAM:"send.panel.button.repeat.one");
+                               }
+                               else if(get_int(val_repeat_mode) == 1) {
+                                       set_int(val_repeat_mode, 2);
+                                       run_program(PROGRAM:"send.panel.button.repeat.all");
+                               }
+                               else {
+                                       set_int(val_repeat_mode, 0);
+                                       run_program(PROGRAM:"send.panel.button.repeat.off");
+                               }
+                       }
+               }
+
+               parts {
+                       part {
+                               name: "panel.button.sa";
+                               type: IMAGE;
+                               mouse_events: 1;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 1;
+                                       min: 70 56;
+                                       fixed: 1 1;
+                                       align: 0.0 0.0;
+                                       rel1 { relative: 0.0 0.0;}
+                                       rel2 { relative: 0.0 1.0;}
+                                       color: 255 255 255 255;
+                                       image { normal: "panel/T01-2_icon_controller_sa.png"; }
+                               }
+                               description {
+                                       state: "pressed" 0.0;
+                                       inherit: "default" 0.0;
+                                       image { normal: "panel/T01-2_icon_controller_sa.png"; }
+                               }
+                               description {
+                                       state: "hide" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 0;
+                               }
+                       }
+
+                       part {
+                               name: "panel.button.repeat";
+                               type: IMAGE;
+                               mouse_events: 1;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 1;
+                                       min: 70 56;
+                                       fixed: 1 1;
+                                       align: 1.0 0.0;
+                                       rel1 { relative: 1.0 0.0; }
+                                       rel2 { relative: 1.0 1.0; }
+                                       color: 255 255 255 255;
+                                       image { normal: "panel/T01-2_icon_controller_repeat.png"; }
+                               }
+                               description {
+                                       state: "repeat_one" 0.0;
+                                       inherit: "default" 0.0;
+                                       image { normal: "panel/T01-2_icon_controller_repeat_1.png"; }
+                               }
+                               description {
+                                       state: "repeat_all" 0.0;
+                                       inherit: "default" 0.0;
+                                       image { normal: "panel/T01-2_icon_controller_repeat_all.png"; }
+                               }
+                               description {
+                                       state: "hide" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 0;
+                               }
+                       }
+
+               } /* parts */
+
+               programs {
+                       CONTROL_BUTTON_PROG("panel.button.sa");
+                       CONTROL_BUTTON_PROG("panel.button.repeat");
+
+                       program {
+                               signal: "signal.panel.button.streaming.mode";
+                               source: "*";
+                               action: STATE_SET "hide" 0.0;
+                               target: "panel.button.repeat";
+                       }
+
+                       program {
+                               signal: "signal.panel.button.repeat.down";
+                               source: "*";
+                               script: {
+                                       if(get_int(val_repeat_mode) == 0) {
+                                               set_state(PART:"panel.button.repeat", "default", 0.0);
+                                       }
+                                       else if(get_int(val_repeat_mode) == 1)  {
+                                               set_state(PART:"panel.button.repeat", "repeat_one", 0.0);
+                                       }
+                                       else if(get_int(val_repeat_mode) == 2)  {
+                                               set_state(PART:"panel.button.repeat", "repeat_all", 0.0);
+                                       }
+                               }
+                       }
+
+                       program {
+                               signal: "signal.panel.button.repeat.up";
+                               source: "*";
+                               script: {
+                                       change_repeat();
+                               }
+                       }
+
+                       program {
+                               name: "send.panel.button.repeat.off";
+                               action: SIGNAL_EMIT "signal.panel.button.repeat.off" "panel.button.repeat";
+                       }
+
+                       program {
+                               name: "send.panel.button.repeat.one";
+                               action: SIGNAL_EMIT "signal.panel.button.repeat.one" "panel.button.repeat";
+                       }
+
+                       program {
+                               name: "send.panel.button.repeat.all";
+                               action: SIGNAL_EMIT "signal.panel.button.repeat.all" "panel.button.repeat";
+                       }
+
+                       program {
+                               signal: "signal.panel.button.repeat.off";
+                               source: "*";
+                               action: STATE_SET "default" 0.0;
+                               target: "panel.button.repeat";
+                       }
+                       program {
+                               signal: "signal.panel.button.repeat.one";
+                               source: "*";
+                               action: STATE_SET "repeat_one" 0.0;
+                               target: "panel.button.repeat";
+                       }
+                       program {
+                               signal: "signal.panel.button.repeat.all";
+                               source: "*";
+                               action: STATE_SET "repeat_all" 0.0;
+                               target: "panel.button.repeat";
+                       }
+
+               } /* programs */
+       } /* group */
+} /* collections */
diff --git a/res/edc/image_res.edc b/res/edc/image_res.edc
new file mode 100755 (executable)
index 0000000..aabe709
--- /dev/null
@@ -0,0 +1,114 @@
+\r
+images {\r
+       image: "gallery_video_player_bg.png" COMP;\r
+       image: "gallery_video_control_pause.png" COMP;\r
+       image: "gallery_video_control_play.png" COMP;\r
+       image: "gallery_video_control_rew.png" COMP;\r
+       image: "gallery_video_control_rew_2.png" COMP;\r
+       image: "gallery_video_control_rew_3.png" COMP;\r
+       image: "gallery_video_control_rew_4.png" COMP;\r
+       image: "gallery_video_control_rew_5.png" COMP;\r
+       image: "gallery_video_control_ff.png" COMP;\r
+       image: "gallery_video_control_ff_2.png" COMP;\r
+       image: "gallery_video_control_ff_3.png" COMP;\r
+       image: "gallery_video_control_ff_4.png" COMP;\r
+       image: "gallery_video_control_ff_5.png" COMP;\r
+       image: "gallery_video_control_frame_back.png" COMP;\r
+       image: "gallery_video_control_frame_forword.png" COMP;\r
+       image: "gallery_video_fastforward_1x.png" COMP;\r
+       image: "gallery_video_fastforward_2x.png" COMP;\r
+       image: "gallery_video_fastforward_3x.png" COMP;\r
+       image: "gallery_video_fastforward_4x.png" COMP;\r
+       image: "gallery_video_rewind_1x.png" COMP;\r
+       image: "gallery_video_rewind_2x.png" COMP;\r
+       image: "gallery_video_rewind_3x.png" COMP;\r
+       image: "gallery_video_rewind_4x.png" COMP;\r
+       image: "T01_Trim_handle_beginning.png" COMP;\r
+       image: "T01_Trim_handle_ending.png" COMP;\r
+       image: "gallery_loading_ani_01.png" COMP;\r
+       image: "gallery_loading_ani_02.png" COMP;\r
+       image: "gallery_loading_ani_03.png" COMP;\r
+       image: "gallery_loading_ani_04.png" COMP;\r
+       image: "gallery_loading_ani_05.png" COMP;\r
+       image: "gallery_loading_ani_06.png" COMP;\r
+       image: "gallery_loading_ani_07.png" COMP;\r
+       image: "gallery_loading_ani_08.png" COMP;\r
+       image: "gallery_loading_ani_09.png" COMP;\r
+       image: "gallery_loading_ani_10.png" COMP;\r
+       image: "gallery_loading_ani_11.png" COMP;\r
+       image: "gallery_loading_ani_12.png" COMP;\r
+       image: "gallery_loading_ani_13.png" COMP;\r
+       image: "gallery_loading_ani_14.png" COMP;\r
+       image: "gallery_loading_ani_15.png" COMP;\r
+       image: "gallery_loading_ani_16.png" COMP;\r
+       image: "gallery_loading_ani_17.png" COMP;\r
+       image: "gallery_loading_ani_18.png" COMP;\r
+       image: "gallery_loading_ani_19.png" COMP;\r
+       image: "gallery_loading_ani_20.png" COMP;\r
+       image: "gallery_loading_ani_21.png" COMP;\r
+       image: "gallery_loading_ani_22.png" COMP;\r
+       image: "gallery_loading_ani_23.png" COMP;\r
+       image: "gallery_loading_ani_24.png" COMP;\r
+       image: "gallery_loading_ani_25.png" COMP;\r
+       image: "gallery_loading_ani_26.png" COMP;\r
+       image: "gallery_loading_ani_27.png" COMP;\r
+       image: "gallery_loading_ani_28.png" COMP;\r
+       image: "gallery_loading_ani_29.png" COMP;\r
+       image: "gallery_loading_ani_30.png" COMP;\r
+       image: "navibar_item_separator_shadow.png" COMP;\r
+       image: "T01_control_top_arrow.png" COMP;\r
+       image: "T01_control_top_bg.png" COMP;\r
+       image: "T01_toolbar_bg.png" COMP;\r
+       image: "T01_toolbar_press.png" COMP;\r
+       image: "00_winset_control_top_arrow.png" COMP;\r
+       image: "naviframe_optionheader.png" COMP;\r
+       image: "naviframe_optionheader_arrow.png" COMP;\r
+       image: "T01_Nocontents_multimedia.png" COMP;\r
+       image: "T01_control_icon_SA.png" COMP;\r
+       image: "T01_title_bg.png" COMP;\r
+       image: "T01_title_bg_h.png" COMP;\r
+\r
+       image: "T01_Image_Look.png" COMP;\r
+\r
+       image: "icon/T01-2_icon_function_bg.png" COMP;\r
+\r
+       image: "panel/T01-2_icon_controller_repeat.png" COMP;\r
+       image: "panel/T01-2_icon_controller_repeat_1.png" COMP;\r
+       image: "panel/T01-2_icon_controller_repeat_all.png" COMP;\r
+       image: "panel/T01-2_icon_controller_sa.png" COMP;\r
+       image: "panel/T01-2_controller_progress_bar.png" COMP;\r
+       image: "panel/T01-2_controller_progress_bg.png" COMP;\r
+       image: "panel/T01-2_btn_toolbar_volum.png" COMP;\r
+       image: "panel/T01-2_btn_toolbar_volum_press.png" COMP;\r
+       image: "panel/T01-2_btn_toolbar_back.png" COMP;\r
+       image: "panel/T01-2_btn_toolbar_back_press.png" COMP;\r
+       image: "panel/T01-2_icon_toolbar_cancel.png" COMP;\r
+       image: "panel/T01-2_icon_toolbar_done.png" COMP;\r
+\r
+       image: "adjustment/T01-2_controller_progress_handle.png" COMP;\r
+       image: "adjustment/T01-2_controller_progress_handle_press.png" COMP;\r
+       image: "adjustment/T01-2_fine_adjustment_bg.png" COMP;\r
+       image: "adjustment/T01-2_fine_adjustment_bg_ef.png" COMP;\r
+       image: "adjustment/T01-2_fine_adjustment_progress_bar.png" COMP;\r
+       image: "adjustment/T01-2_fine_adjustment_progress_bg.png" COMP;\r
+       image: "adjustment/T01-2_fine_adjustment_progress_handle.png" COMP;\r
+\r
+       // FOR GENLIST SWEEP and check box\r
+       image: "00_sweep_list_bg.png" COMP;\r
+       image: "T01_checkbox.png" COMP;\r
+       image: "00_check_bg_dim.png" COMP;\r
+       image: "T01_check.png" COMP;\r
+       image: "T01_grid_select_check.png" COMP;\r
+       image: "00_grid_select_check.png" COMP;\r
+       image: "T01_video_list_progress_bar.png" COMP;\r
+       image: "00_winset_list_progress_bg.png" COMP;\r
+\r
+       image: "white/panel/T01-2_btn_toolbar_back.png" COMP;\r
+       image: "white/panel/T01-2_btn_toolbar_volume.png" COMP;\r
+       image: "white/control/T01-2_icon_toolbar_next.png" COMP;\r
+       image: "white/control/T01-2_icon_toolbar_play.png" COMP;\r
+       image: "white/control/T01-2_icon_toolbar_previous.png" COMP;\r
+       image: "white/control/T01-2_icon_toolbar_stop.png" COMP;\r
+       image: "white/control/T01-2_icon_toolbar_pause.png" COMP;\r
+}\r
+\r
diff --git a/res/edc/main.edc b/res/edc/main.edc
new file mode 100755 (executable)
index 0000000..792d5b4
--- /dev/null
@@ -0,0 +1,509 @@
+#define GRAY_RECT_COLOR                        128 128 128 128
+#define SPEEDBOX_OFFSET_Y              225
+
+
+#include "image_res.edc"
+#include "vp_font.edc"
+
+collections {
+       group {
+               name: "main";
+
+               parts {
+                       part {
+                               name: "main.background";
+                               type: RECT;
+                               mouse_events: 0;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       rel1 { relative: 0.0 0.0;}
+                                       rel2 { relative: 1.0 1.0;}
+                                       color: 255 255 255 0;
+                               }
+                       }
+                       part {
+                               name: "main.nocontents.bg";
+                               type: IMAGE;
+                               mouse_events: 0;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 0;
+                                       min: 399 399;
+                                       fixed: 1 1;
+                                       align: 0.5 0.5;
+                                       rel1 { relative: 0.5 0.4;}
+                                       rel2 { relative: 0.5 0.4;}
+                                       image { normal: "gallery_video_player_bg.png"; border: 7 7 0 0; }
+                                       color: GRAY_RECT_COLOR;
+                               }
+                               description {
+                                       state: "show" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                       }
+
+                       part {
+                               name: "main.nocontents.image";
+                               type: IMAGE;
+                               mouse_events: 0;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 0;
+                                       min: 144 144;
+                                       fixed: 1 1;
+                                       align: 0.5 0.5;
+                                       rel1 { relative: 0.5 0.4;}
+                                       rel2 { relative: 0.5 0.4;}
+                                       image { normal: "T01_Nocontents_multimedia.png"; }
+                                       color: 255 255 255 255;
+                               }
+                               description {
+                                       state: "show" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                       }
+
+                       part {
+                               name: "main.speedbox";
+                               type: RECT;
+                               mouse_events: 0;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 0;
+                                       min: 0 78;
+                                       fixed: 0 1;
+                                       align: 0.5 1.0;
+                                       rel1 { relative: 0.2 0.0; to_y: "main.option.button.bg"; }
+                                       rel2 { relative: 0.8 0.0; to_y: "main.option.button.bg"; }
+                                       color: GRAY_RECT_COLOR;
+                               }
+                               description {
+                                       state: "show" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                       }
+
+                       part {
+                               name: "main.speedbox.txt";
+                               type: TEXT;
+                               mouse_events: 0;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 0;
+                                       min: 0 78;
+                                       fixed: 0 1;
+                                       align: 0.5 1.0;
+                                       rel1 { relative: 0.2 0.0; to_y: "main.option.button.bg"; }
+                                       rel2 { relative: 0.8 0.0; to_y: "main.option.button.bg"; }
+                                       text {
+                                               font: FONT_BOLD_TYPE;
+                                               text_class: "slp_bold";
+                                               size: 32;
+                                               text:  "";
+                                               align: 0.5 0.5;
+                                       }
+                               }
+                               description {
+                                       state: "show" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                       }
+                       part {
+                               name: "main.option.start.rect";
+                               type: RECT;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 1;
+                                       min: 0 3;
+                                       fixed: 0 1;
+                                       align: 0.0 0.0;
+                                       rel1 { relative: 0.0 0.0; }
+                                       rel2 { relative: 1.0 0.0; }
+                                       color: 0 0 0 0;
+                               }
+                       }
+
+                       part {
+                               name: "main.option.button.bg";
+                               type: IMAGE;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 1;
+                                       min: 0 65;
+                                       fixed: 0 1;
+                                       align: 0.0 0.0;
+                                       rel1 { relative: 0.0 0.0; }
+                                       rel2 { relative: 1.0 0.0; }
+                                       image { normal: "icon/T01-2_icon_function_bg.png"; }
+                                       color: 255 255 255 255;
+
+                               }
+                               description {
+                                       state: "hide" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 0;
+                               }
+                               description {
+                                       state: "portrate" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                               description {
+                                       state: "landscape" 0.0;
+                                       inherit: "default" 0.0;
+                                       min: 0 64;
+                               }
+                               description {
+                                       state: "trim" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible : 0;
+                               }
+
+                       }
+
+                       part {
+                               name: "main.option.button";
+                               type: SWALLOW;
+                               scale: 1;
+                               mouse_events: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 1;
+                                       min: 0 62;
+                                       fixed: 0 1;
+                                       align: 0.5 0.0;
+                                       rel1 { relative: 0.0 1.0; to_y: main.option.start.rect;}
+                                       rel2 { relative: 1.0 0.0; }
+                               }
+                               description {
+                                       state: "hide" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 0;
+                               }
+                               description {
+                                       state: "portrate" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                               description {
+                                       state: "landscape" 0.0;
+                                       inherit: "default" 0.0;
+                                       min: 0 61;
+                               }
+                               description {
+                                       state: "trim" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible : 0;
+                               }
+                       }
+
+                       part {
+                               name: "main.bookmark";
+                               type: SWALLOW;
+                               scale: 1;
+                               mouse_events: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       min: 0 206;
+                                       fixed: 0 1;
+                                       align: 0.5 0.0;
+                                       rel1 { relative: 0.0 1.0; to_y: "main.option.button";}
+                                       rel2 { relative: 1.0 0.0; }
+                               }
+                               description {
+                                       state: "landscape" 0.0;
+                                       inherit: "default" 0.0;
+                                       min: 0 207;
+                               }
+                               description {
+                                       state: "trim" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible : 0;
+                               }
+                       }
+
+                       part {
+                               name: "main.panel.bg";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 1;
+                                       min: 0 214;
+                                       fixed: 0 1;
+                                       align: 0.5 1.0;
+                                       rel1 { relative: 0.0 1.0; }
+                                       rel2 { relative: 1.0 1.0; }
+                                       color : 0 0 0 128;
+                               }
+                               description {
+                                       state: "portrate" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                               description {
+                                       state: "landscape" 0.0;
+                                       inherit: "default" 0.0;
+                                       min: 0 204;
+                               }
+                               description {
+                                       state: "trim" 0.0;
+                                       inherit: "default" 0.0;
+                                       min: 0 228;
+                               }
+                       }
+
+                       part {
+                               name: "main.panel.line";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 1;
+                                       min: 0 1;
+                                       fixed: 0 1;
+                                       align: 0.5 0.0;
+                                       rel1 { relative: 0.0 0.0; to_y: "main.panel.bg";}
+                                       rel2 { relative: 1.0 0.0; to_y: "main.panel.bg";}
+                                       color : 153 153 153 171;
+                               }
+                               description {
+                                       state: "portrate" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                               description {
+                                       state: "landscape" 0.0;
+                                       inherit: "default" 0.0;
+                                       min: 0 1;
+                               }
+
+                               description {
+                                       state: "trim" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 0;
+                               }
+                       }
+
+                       part {
+                               name: "main.panel.top";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 1;
+                                       min: 0 12;
+                                       fixed: 0 1;
+                                       align: 0.5 0.0;
+                                       rel1 { relative: 0.3 0.0; to_y: "main.panel.line";}
+                                       rel2 { relative: 0.7 1.0; to_y: "main.panel.line";}
+                                       color : 0 0 0 0;
+                               }
+                               description {
+                                       state: "portrate" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                               description {
+                                       state: "landscape" 0.0;
+                                       inherit: "default" 0.0;
+                                       min: 0 17;
+                               }
+                               description {
+                                       state: "trim" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 0;
+                               }
+                       }
+
+                       part {
+                               name: "main.panel.button";
+                               type: SWALLOW;
+                               scale: 1;
+                               mouse_events: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 1;
+                                       min: 0 56;
+                                       fixed: 0 1;
+                                       align: 0.0 0.0;
+                                       rel1 { relative: 0.0486 1.0; to_y: "main.panel.top";}
+                                       rel2 { relative: 0.9514 1.0; to_y: "main.panel.top";}
+                               }
+                               description {
+                                       state: "portrate" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                               description {
+                                       state: "landscape" 0.0;
+                                       inherit: "default" 0.0;
+                                       rel1 { relative: 0.0273 1.0; to_y: "main.panel.top";}
+                                       rel2 { relative: 0.9727 1.0; to_y: "main.panel.top";}
+                               }
+                               description {
+                                       state: "trim" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 0;
+                               }
+                       }
+
+
+                       part {
+                               name: "main.panel";
+                               type: SWALLOW;
+                               scale: 1;
+                               mouse_events: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       min: 0 167;
+                                       fixed: 0 1;
+                                       align: 0.5 1.0;
+                                       rel1 { relative: 0.0 1.0; }
+                                       rel2 { relative: 1.0 1.0; }
+                               }
+                               description {
+                                       state: "portrate" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                               description {
+                                       state: "landscape" 0.0;
+                                       inherit: "default" 0.0;
+                                       min: 0 167;
+                               }
+                               description {
+                                       state: "trim" 0.0;
+                                       inherit: "default" 0.0;
+                                       min: 0 297;
+                               }
+                       }
+
+                       part { name: "main.animation";
+                               type: SWALLOW;
+                               scale: 1;
+                               mouse_events: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 0;
+                                       min: 288 195;
+                                       fixed: 1 1;
+                                       align: 0.5 0.5;
+                                       rel1 { relative: 0.5 0.4;}
+                                       rel2 { relative: 0.5 0.4;}
+                                       color: 255 0 0 255;
+                               }
+                               description {
+                                       state: "show" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                               description {
+                                       state: "trim" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 0;
+                               }
+                       }
+
+               } /* parts */
+
+               programs {
+                       program {
+                               signal: "signal.main.nocontents.show";
+                               source: "*";
+                                action: STATE_SET "show" 0.0;
+                                target: "main.nocontents.image";
+                                target: "main.nocontents.bg";
+                       }
+
+                       program {
+                               signal: "signal.main.nocontents.hide";
+                               source: "*";
+                                action: STATE_SET "default" 0.0;
+                                target: "main.nocontents.image";
+                                target: "main.nocontents.bg";
+                       }
+
+                       program {
+                               signal: "signal.main.speedbox.show";
+                               source: "*";
+                                action: STATE_SET "show" 0.0;
+                                target: "main.speedbox";
+                                target: "main.speedbox.txt";
+                       }
+
+                       program {
+                               signal: "signal.main.speedbox.hide";
+                               source: "*";
+                                action: STATE_SET "default" 0.0;
+                                target: "main.speedbox";
+                                target: "main.speedbox.txt";
+                       }
+
+                       program {
+                               signal: "signal.main.animation.show";
+                               source: "*";
+                                action: STATE_SET "show" 0.0;
+                                target: "main.animation";
+                       }
+
+                       program {
+                               signal: "signal.main.animation.hide";
+                               source: "*";
+                                action: STATE_SET "default" 0.0;
+                                target: "main.animation";
+                       }
+
+                       program {
+                               signal: "signal.main.option.button.bg.hide";
+                               source: "*";
+                                action: STATE_SET "hide" 0.0;
+                                target: "main.option.button.bg";
+                       }
+
+                       program {
+                               signal: "signal.main.portrate.mode";
+                               source: "*";
+                               action: STATE_SET "portrate" 0.0;
+                               target: "main.option.button.bg";
+                               target: "main.option.button";
+                               target: "main.panel.bg";
+                               target: "main.panel.top";
+                               target: "main.panel.button";
+                               target: "main.panel";
+                       }
+
+                       program {
+                               signal: "signal.main.landscape.mode";
+                               source: "*";
+                               action: STATE_SET "landscape" 0.0;
+                               target: "main.option.button.bg";
+                               target: "main.option.button";
+                               target: "main.panel.bg";
+                               target: "main.panel.top";
+                               target: "main.panel.button";
+                               target: "main.panel";
+                       }
+
+                       program {
+                               signal: "signal.main.trim.mode";
+                               source: "*";
+                               action: STATE_SET "trim" 0.0;
+                               target: "main.option.button.bg";
+                               target: "main.option.button";
+                               target: "main.panel.bg";
+                               target: "main.panel.top";
+                               target: "main.panel.button";
+                               target: "main.panel.line";
+                               target: "main.panel";
+                       }
+               }       /* programs */
+       }       /* group */
+} /* collections */
diff --git a/res/edc/multi_win.edc b/res/edc/multi_win.edc
new file mode 100755 (executable)
index 0000000..7185254
--- /dev/null
@@ -0,0 +1,69 @@
+#include "image_res.edc"
+#include "vp_font.edc"
+
+collections {
+
+       group {
+               name: "mw";
+               parts {
+                       part {
+                               name: "mw.bg";
+                               type: RECT;
+                               mouse_events: 1;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 0;
+                                       rel1 { relative: 0.0 0.0;}
+                                       rel2 { relative: 1.0 1.0;}
+                                       color: 0 0 0 255;
+                               }
+                               description {
+                                       state: "pressed" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                               description {
+                                       state: "show" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 0;
+                               }
+
+                       }
+
+                       part {
+                               name: "mw.image";
+                               type: SWALLOW;
+                               scale: 1;
+                               mouse_events: 1;
+                               repeat_events : 1;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 0;
+                                       rel1 { relative: 0.0 0.0;}
+                                       rel2 { relative: 1.0 1.0;}
+                               }
+                               description {
+                                       state: "show" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                       }
+               }
+               programs {
+                       program {
+                               signal: "signal.mw.image.show";
+                               source: "*";
+                               script {
+                                       set_state(PART:"mw.image", "show", 0.0);
+                               }
+                       }
+                       program {
+                               signal: "signal.mw.image.hide";
+                               source: "*";
+                               script {
+                                       set_state(PART:"mw.image", "default", 0.0);
+                               }
+                       }
+               }
+       }
+}
diff --git a/res/edc/option_button.edc b/res/edc/option_button.edc
new file mode 100755 (executable)
index 0000000..464f0e6
--- /dev/null
@@ -0,0 +1,231 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.tizenopensource.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.
+ */
+
+
+#include "image_res.edc"
+#include "vp_font.edc"
+
+#define CONTROL_BUTTON_PRESS_PART(_name_ , _w_ , _h_ , _align_x_ , _align_y_ , _rel_x1_ , _rel_x2_ , _rel_y1_, _rel_y2_ , _img_def_ , _img_press_ )    \
+part {                                                                                                                 \
+       name: _name_;                                                                                   \
+       type: IMAGE;                                                                                            \
+       scale: 1;                                                                                                       \
+       mouse_events: 1;                                                                                        \
+       description {                                                                                           \
+               state: "default" 0.0;                                                                   \
+               min: _w_ _h_;                                                                                   \
+               fixed: 1 1;                                                                                     \
+               visible: 0;                                                                                             \
+               align: _align_x_ _align_y_;                                                             \
+               rel1 { relative: _rel_x1_ _rel_y1_; }                                                   \
+               rel2 { relative: _rel_x2_ _rel_y2_; }                                                   \
+               image { normal: _img_def_; border: 4 4 0 0;}                            \
+               color: 255 255 255 255;                                                                 \
+       }                                                                                                               \
+       description {                                                                                           \
+               state: "pressed" 0.0;                                                                   \
+               visible: 1;                                                                                             \
+               min: _w_ _h_;                                                                                   \
+               fixed: 1 1;                                                                                     \
+               align: _align_x_ _align_y_;                                                             \
+               rel1 { relative: _rel_x1_ _rel_y1_; }                                                   \
+               rel2 { relative: _rel_x2_ _rel_y2_; }                                                   \
+               image { normal: _img_press_; border: 4 4 0 0;}                  \
+               color: 255 255 255 255;                                                                 \
+       }                                                                                                               \
+       description {                                                                                           \
+               state: "hide" 0.0;                                                                              \
+               inherit: "default" 0.0;                                                                         \
+               visible: 0;                                                                                     \
+       }                                                                                                               \
+}      /* CONTROL_BUTTON_PRESS_PART */
+
+
+#define CONTROL_BUTTON_PROG(_item_name_)                                       \
+program {                                                                                                      \
+       name: _item_name_".pressed";                                                            \
+       source: _item_name_;                                                                            \
+       signal: "mouse,down,1";                                                                         \
+       action: STATE_SET "pressed" 0.0;                                                        \
+       target: _item_name_;                                                                            \
+       after: "send."_item_name_".down.signal";                                                \
+}                                                                                                                      \
+program {                                                                                                      \
+       name: _item_name_".clicked";                                                            \
+       source: _item_name_;                                                                            \
+       signal: "mouse,up,1";                                                                           \
+       action: STATE_SET "default" 0.0;                                                                \
+       target: _item_name_;                                                                            \
+       after: "send."_item_name_".up.signal";                                          \
+}                                                                                                                      \
+program {                                                                                                      \
+       name: "send."_item_name_".down.signal";                                                 \
+       action: SIGNAL_EMIT "signal."_item_name_".down" _item_name_;    \
+}                                                                                                                      \
+program {                                                                                                      \
+       name: "send."_item_name_".up.signal";                                           \
+       action: SIGNAL_EMIT "signal."_item_name_".up" _item_name_;      \
+} /* CONTROL_BUTTON_PROG */
+
+
+collections {
+       group {
+               name: "option";
+
+               script {
+                       public val_screensize_check = 0;        /* 0: reduce, 1: full */
+
+                       public change_screensize() {
+                               if(get_int(val_screensize_check) == 0) {
+                                       set_int(val_screensize_check, 1);
+                                       set_state(PART:"option.screensize", "reduce", 0.0);
+                                       run_program(PROGRAM:"send.screensize.expand");
+                               } else {
+                                       set_int(val_screensize_check, 0);
+                                       set_state(PART:"option.screensize", "default", 0.0);
+                                       run_program(PROGRAM:"send.screensize.normal");
+                               }
+                       }
+
+               }
+
+               parts {
+                       part {
+                               name: "option.rect";
+                               type: RECT;
+                               mouse_events: 0;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       rel1 { relative: 0.0 0.0;}
+                                       rel2 { relative: 1.0 1.0;}
+                                       color: 255 255 255 0;
+                               }
+                       }
+
+                       CONTROL_BUTTON_PRESS_PART("option.screensize.button.bg", 74 ,74, 0.0, 0.0, 0.05, 0.05, 0.114, 0.114, "T01_controller_btn.png" , "T01_controller_btn_press.png");
+                       part {
+                               name: "option.screensize";
+                               type: IMAGE;
+                               mouse_events: 1;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 1;
+                                       min: 74 74;
+                                       fixed: 1 1;
+                                       align: 0.0 0.0;
+                                       rel1 { relative: 0.05 0.114; }
+                                       rel2 { relative: 0.05 0.114; }
+                                       image { normal: "T01_control_icon_fullscreen.png"; }
+                                       color: 255 255 255 255;
+                               }
+                               description {
+                                       state: "reduce" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       image { normal: "T01_control_icon_reduce.png"; }
+                               }
+                               description {
+                                       state: "hide" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 0;
+                               }
+                       }
+
+                       CONTROL_BUTTON_PRESS_PART("option.detail.button.bg", 74 ,74, 1.0, 0.0, 0.95, 0.95, 0.114, 0.114, "T01_controller_btn.png" , "T01_controller_btn_press.png");
+                       part {
+                               name: "option.detail";
+                               type: IMAGE;
+                               mouse_events: 1;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 1;
+                                       min: 74 74;
+                                       fixed: 1 1;
+                                       align: 1.0 0.0;
+                                       rel1 { relative: 0.95 0.114; }
+                                       rel2 { relative: 0.95 0.114; }
+                                       image { normal: "T01_control_icon_detail.png"; }
+                                       color: 255 255 255 255;
+                               }
+                               description {
+                                       state: "hide" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 0;
+                               }
+                       }
+
+                       programs {
+                               CONTROL_BUTTON_PROG("option.screensize");
+                               CONTROL_BUTTON_PROG("option.detail");
+
+                               program {
+                                       signal: "signal.option.screensize.down";
+                                       source: "*";
+                                       action: STATE_SET "pressed" 0.0;
+                                       target: "option.screensize.button.bg";
+                               }
+
+                               program {
+                                       signal: "signal.option.screensize.up";
+                                       source: "*";
+                                       action: STATE_SET "hide" 0.0;
+                                       target: "option.screensize.button.bg";
+                                       after: "option.screensize.change";
+                               }
+
+                               program {
+                                       name: "option.screensize.change";
+                                       script: { change_screensize(); }
+                               }
+
+                               program {
+                                       name: "send.screensize.normal";
+                                       action: SIGNAL_EMIT "signal.option.screensize.normal" "option.screensize";
+                               }
+
+                               program {
+                                       name: "send.screensize.expand";
+                                       action: SIGNAL_EMIT "signal.option.screensize.expand" "option.screensize";
+                               }
+
+                               program {
+                                       signal: "signal.option.detail.down";
+                                       source: "*";
+                                       action: STATE_SET "pressed" 0.0;
+                                       target: "option.detail.button.bg";
+                               }
+
+                               program {
+                                       signal: "signal.option.detail.up";
+                                       source: "*";
+                                       action: STATE_SET "hide" 0.0;
+                                       target: "option.detail.button.bg";
+                               }
+
+                               program {
+                                       signal: "signal.option.mode.streaming";
+                                       source: "*";
+                                       action: STATE_SET "hide" 0.0;
+                                       target: "option.detail";
+                                       target: "option.detail.button.bg";
+                               }
+                       } //programs
+               } //parts
+       } //group
+} //collections
diff --git a/res/edc/panel.edc b/res/edc/panel.edc
new file mode 100755 (executable)
index 0000000..4e289c6
--- /dev/null
@@ -0,0 +1,118 @@
+#include "image_res.edc"
+#include "vp_font.edc"
+
+#define LINE_RECT_COLOR                130 130 130 255
+
+collections {
+       group {
+               name: "panel";
+
+               parts {
+                       part {
+                               name: "panel.rect";
+                               type: RECT;
+                               mouse_events: 0;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       rel1 { relative: 0.0 0.0;}
+                                       rel2 { relative: 1.0 1.0;}
+                                       color: 0 0 0 0;
+                               }
+                       }
+
+                       part {
+                               name: "panel.progress";
+                               type: SWALLOW;
+                               mouse_events: 1;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       min: 0 28;
+                                       fixed: 0 1;
+                                       align: 0.5 0.0;
+                                       color: 255 0 0 255;
+                                       rel1 { relative: 0.0277 0.0;}
+                                       rel2 { relative: 0.9723 0.0;}
+                               }
+                               description {
+                                       state: "portrate" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                               description {
+                                       state: "landscape" 0.0;
+                                       inherit: "default" 0.0;
+                                       min: 0 28;
+                                       rel1 { relative: 0.01875 0.0;}
+                                       rel2 { relative: 0.98125 0.0;}
+                               }
+                               description {
+                                       state: "trim" 0.0;
+                                       inherit: "default" 0.0;
+                                       min: 0 183;
+                                       rel1 { relative: 0.0 0.0;}
+                                       rel2 { relative: 1.0 0.0;}
+                               }
+                       }
+
+                       part {
+                               name: "panel.control";
+                               type: SWALLOW;
+                               mouse_events: 1;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       min: 0 114;
+                                       fixed: 0 1;
+                                       align: 0.5 1.0;
+                                       rel1 { relative: 0.0 1.0;}
+                                       rel2 { relative: 1.0 1.0;}
+                               }
+                               description {
+                                       state: "portrate" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                               description {
+                                       state: "landscape" 0.0;
+                                       inherit: "default" 0.0;
+                                       min: 0 114;
+                                       rel1 { relative: 0.0 1.0;}
+                                       rel2 { relative: 1.0 1.0;}
+                               }
+                               description {
+                                       state: "trim" 0.0;
+                                       inherit: "default" 0.0;
+                                       min: 0 114;
+                                       rel1 { relative: 0.0 1.0;}
+                                       rel2 { relative: 1.0 1.0;}
+                               }
+                       }
+               } // parts
+
+               programs {
+                       program {
+                               signal: "signal.panel.portrate.mode";
+                               source: "*";
+                               action: STATE_SET "portrate" 0.0;
+                               target: "panel.progress";
+                               target: "panel.control";
+                       }
+
+                       program {
+                               signal: "signal.panel.landscape.mode";
+                               source: "*";
+                               action: STATE_SET "landscape" 0.0;
+                               target: "panel.progress";
+                               target: "panel.control";
+                       }
+
+                       program {
+                               signal: "signal.panel.trim.mode";
+                               source: "*";
+                               action: STATE_SET "trim" 0.0;
+                               target: "panel.progress";
+                               target: "panel.control";
+                       }
+               }
+       } // group
+} // collections
diff --git a/res/edc/popup_progressbar.edc b/res/edc/popup_progressbar.edc
new file mode 100755 (executable)
index 0000000..4c5105d
--- /dev/null
@@ -0,0 +1,263 @@
+collections {\r
+group { name: "popup_center_progressview";\r
+   parts{\r
+      part { name: "elm.title";\r
+         type: TEXT;\r
+         scale : 1;\r
+         description { state: "default" 0.0;\r
+            max: 80 16;\r
+            text {\r
+               font: "SLP:style=Medium";\r
+               text_class: "slp_medium";\r
+               size: 16;\r
+               min: 0 0;\r
+               align: 0.5 0.0;\r
+              }\r
+            color: 108 108 108 255;\r
+            align: 0.5 0.0;\r
+            rel1 {\r
+               relative: 0.0 0.0;\r
+               to: "elm.swallow.content";\r
+            }\r
+            rel2 {\r
+               relative: 1.0 0.0;\r
+               to: "elm.swallow.content";\r
+            }\r
+         }\r
+      }\r
+      part{ name:"elm.swallow.content";\r
+         type: SWALLOW;\r
+         scale : 1;\r
+         description { state: "default" 0.0;\r
+            min: 0 70;\r
+            align: 0.5 0.5;\r
+            fixed: 1 0;\r
+            rel1 {\r
+               relative: 0.0 0.0;\r
+            }\r
+            rel2 {\r
+               relative: 1.0 1.0;\r
+            }\r
+         }\r
+      }\r
+      part { name: "elm.text.left";\r
+         type: TEXT;\r
+         scale : 1;\r
+         description { state: "default" 0.0;\r
+            max: 150 16;\r
+            text {\r
+               font: "SLP:style=Medium";\r
+               text_class: "slp_medium";\r
+               size: 16;\r
+               min: 0 0;\r
+               align: 0.0 1.0;\r
+              }\r
+            color: 108 108 108 255;\r
+            align: 0.0 1.0;\r
+            rel1 {\r
+               relative: 0.0 0.0;\r
+               to: "elm.swallow.content";\r
+            }\r
+            rel2 {\r
+               relative: 1.0 1.0;\r
+               to: "elm.swallow.content";\r
+            }\r
+         }\r
+      }\r
+      part { name: "elm.text.right";\r
+         type: TEXT;\r
+         scale : 1;\r
+         description { state: "default" 0.0;\r
+            max: 150 16;\r
+            text {\r
+               font: "SLP:style=Medium";\r
+               text_class: "slp_medium";\r
+               size: 16;\r
+               min: 0 0;\r
+               align: 1.0 1.0;\r
+              }\r
+            color: 108 108 108 255;\r
+            align: 1.0 1.0;\r
+            rel1 {\r
+               relative: 0.0 0.0;\r
+               to: "elm.swallow.content";\r
+            }\r
+            rel2 {\r
+               relative: 1.0 1.0;\r
+               to: "elm.swallow.content";\r
+            }\r
+         }\r
+      }\r
+   }\r
+}\r
+\r
+\r
+group { name: "popup_center_text_progressview";\r
+   parts{\r
+      part { name: "pad_t";\r
+         scale : 1;\r
+         mouse_events: 0;\r
+         repeat_events: 1;\r
+         description { state: "default" 0.0;\r
+            align: 0.5 0.0;\r
+            min: 0 14;\r
+            fixed: 0 1;\r
+            rel1 {\r
+               relative: 1.0 0.0;\r
+               to_x: "pad_l";\r
+            }\r
+            rel2 {\r
+               relative: 0.0 0.0;\r
+               to_x: "pad_r";\r
+            }\r
+         }\r
+      }\r
+      part { name: "pad_l";\r
+         scale: 1;\r
+         description { state: "default" 0.0;\r
+            min : 10 0;\r
+            fixed: 1 0;\r
+            rel1 {\r
+               relative: 0.0 0.0;\r
+            }\r
+            rel2 {\r
+               relative: 0.0 1.0;\r
+            }\r
+            align: 0.0 0.0;\r
+         }\r
+      }\r
+      part { name: "pad_r";\r
+         scale: 1;\r
+         description { state: "default" 0.0;\r
+            min : 10 0;\r
+            fixed: 1 0;\r
+            rel1 {\r
+               relative: 1.0 0.0;\r
+            }\r
+            rel2 {\r
+               relative: 1.0 1.0;\r
+            }\r
+            align: 1.0 0.0;\r
+         }\r
+      }\r
+      part{ name:"elm.swallow.content";\r
+         type: SWALLOW;\r
+         scale : 1;\r
+         description { state: "default" 0.0;\r
+            min: 300 0;\r
+            align: 0.5 0.5;\r
+            fixed: 1 0;\r
+            rel1 {\r
+               relative: 0.5 1.0;\r
+               to: "pad_t";\r
+            }\r
+            rel2 {\r
+               relative: 0.5 0.0;\r
+               to: "pad_b";\r
+            }\r
+         }\r
+      }\r
+      part { name: "pad_b";\r
+         scale : 1;\r
+         mouse_events: 0;\r
+         repeat_events: 1;\r
+         description { state: "default" 0.0;\r
+            align: 0.5 1.0;\r
+            min: 0 90;\r
+            fixed: 0 1;\r
+            rel1 {\r
+               relative: 1.0 1.0;\r
+               to_x: "pad_l";\r
+            }\r
+            rel2 {\r
+               relative: 0.0 1.0;\r
+               to_x: "pad_r";\r
+            }\r
+         }\r
+      }\r
+      part { name: "elm.swallow.end";\r
+         type: SWALLOW;\r
+         scale : 1;\r
+         mouse_events: 1;\r
+         repeat_events: 1;\r
+         description { state: "default" 0.0;\r
+            align: 0.0 0.0;\r
+            fixed: 1 1;\r
+            rel1 {\r
+               relative: 0.0 0.0;\r
+               to: "pad_b";\r
+            }\r
+            rel2 {\r
+               relative: 1.0 1.0;\r
+               to: "pad_b";\r
+            }\r
+         }\r
+      }\r
+      part { name: "pad_bm";\r
+         scale : 1;\r
+         mouse_events: 0;\r
+         repeat_events: 1;\r
+         description { state: "default" 0.0;\r
+            align: 0.0 1.0;\r
+            min: 0 52;\r
+            fixed: 0 1;\r
+            rel1 {\r
+               relative: 0.0 1.0;\r
+               to: "pad_b";\r
+            }\r
+            rel2 {\r
+               relative: 1.0 1.0;\r
+               to: "pad_b";\r
+            }\r
+         }\r
+      }\r
+      part { name: "elm.text.subtext1";\r
+         type: TEXT;\r
+         scale : 1;\r
+         description { state: "default" 0.0;\r
+            text {\r
+               font: "SLP:style=Medium";\r
+               text_class: "slp_medium";\r
+               size: 16;\r
+               min: 0 0;\r
+               align: 0.0 1.0;\r
+              }\r
+            color: 108 108 108 255;\r
+            align: 0.0 0.5;\r
+            rel1 {\r
+               relative: 0.0 0.0;\r
+               to: "pad_bm";\r
+            }\r
+            rel2 {\r
+               relative: 1.0 1.0;\r
+               to: "pad_bm";\r
+            }\r
+         }\r
+      }\r
+      part { name: "elm.text.subtext2";\r
+         type: TEXT;\r
+         scale : 1;\r
+         description { state: "default" 0.0;\r
+            text {\r
+               font: "SLP:style=Medium";\r
+               text_class: "slp_medium";\r
+               size: 16;\r
+               min: 0 0;\r
+               align: 1.0 1.0;\r
+              }\r
+            color: 108 108 108 255;\r
+            align: 1.0 0.5;\r
+            rel1 {\r
+               relative: 0.0 0.0;\r
+               to: "pad_bm";\r
+            }\r
+            rel2 {\r
+               relative: 1.0 1.0;\r
+               to: "pad_bm";\r
+            }\r
+         }\r
+      }\r
+   }\r
+}\r
+}\r
+\r
diff --git a/res/edc/progress.edc b/res/edc/progress.edc
new file mode 100755 (executable)
index 0000000..6b43ccb
--- /dev/null
@@ -0,0 +1,445 @@
+#include "image_res.edc"\r
+#include "vp_font.edc"\r
+\r
+#define PROGRESS_LINE_RECT_COLOR               54 54 54 255\r
+\r
+collections {\r
+       group {\r
+               name: "progress";\r
+\r
+               parts {\r
+                       part {\r
+                               name: "progress.rect";\r
+                               type: RECT;\r
+                               scale: 1;\r
+                               mouse_events: 1;\r
+                               description {\r
+                                       state: "default" 0.0;\r
+                                       align: 0.0 0.0;\r
+                                       rel1 { relative: 0.0 0.0;}\r
+                                       rel2 { relative: 1.0 1.0;}\r
+                                       color: 0 0 0 0;\r
+                               }\r
+                       }\r
+                       part { name: "progress.txt.played";\r
+                               type: TEXT;\r
+                               scale: 1;\r
+                               mouse_events: 0;\r
+                               description {\r
+                                       state: "default" 0.0;\r
+                                       min: 90 28;\r
+                                       fixed: 1 1;\r
+                                       align: 0.0 0.5;\r
+                                       rel1 { relative: 0.0 0.0; }\r
+                                       rel2 { relative: 1.0 1.0; }\r
+                                       color: FONT_START_COLOR;\r
+                                       text {\r
+                                               font: FONT_MEDIUM_TYPE;\r
+                                               text_class: "slp_medium";\r
+                                               size: 25;\r
+                                               text: "00:00:00";\r
+                                               align: 0.0 1.0;\r
+                                       }\r
+                               }\r
+                               description {\r
+                                       state: "portrate" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                               }\r
+                               description {\r
+                                       state: "landscape" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                               }\r
+                       }\r
+\r
+                       part { name: "progress.txt.total";\r
+                               type: TEXT;\r
+                               scale: 1;\r
+                               mouse_events: 0;\r
+                               description {\r
+                                       state: "default" 0.0;\r
+                                       min: 90 28;\r
+                                       fixed: 1 1;\r
+                                       align: 1.0 0.5;\r
+                                       rel1 { relative: 0.0 0.0; }\r
+                                       rel2 { relative: 1.0 1.0; }\r
+                                       color: FONT_END_COLOR;\r
+                                       text {\r
+                                               font: FONT_MEDIUM_TYPE;\r
+                                               text_class: "slp_medium";\r
+                                               size: 25;\r
+                                               text: "--:--:--";\r
+                                               align: 1.0 1.0;\r
+                                       }\r
+                               }\r
+                               description {\r
+                                       state: "portrate" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                               }\r
+                               description {\r
+                                       state: "landscape" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                               }\r
+                       }\r
+\r
+                       part {\r
+                               name: "progress.bg";\r
+                               type: IMAGE;\r
+                               scale: 1;\r
+                               mouse_events: 1;\r
+                               description {\r
+                                       state: "default" 0.0;\r
+                                       min: 0 7;\r
+                                       fixed: 0 1;\r
+                                       align: 0.0 0.5;\r
+                                       rel1 { relative: 0.1647 0.5; }\r
+                                       rel2 { relative: 0.8353 0.5; }\r
+                                       image { normal: "panel/T01-2_controller_progress_bg.png"; }\r
+                               }\r
+                               description {\r
+                                       state: "portrate" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                               }\r
+                               description {\r
+                                       state: "landscape" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       rel1 { relative: 0.0933 0.5; }\r
+                                       rel2 { relative: 0.9067 0.5; }\r
+                               }\r
+                       }\r
+\r
+                       part {\r
+                               name: "progress.buffer.bar";\r
+                               type: RECT;\r
+                               mouse_events: 0;\r
+                               scale: 1;\r
+                               description {\r
+                                       state: "default" 0.0;\r
+                                       min: 0 5;\r
+                                       fixed: 0 1;\r
+                                       align: 0.0 0.0;\r
+                                       rel1 { relative: 0.0 0.0; to_x: progress.playing ; to_y: progress.bg; }\r
+                                       rel2 { relative: 1.0 1.0; to_x: progress.buffering; to_y: progress.bg; }\r
+                                       color: 128 128 128 255;\r
+                               }\r
+                       }\r
+\r
+                       part {\r
+                               name: "progress.middle";\r
+                               type: IMAGE;\r
+                               scale: 1;\r
+                               mouse_events: 0;\r
+                               description {\r
+                                       state: "default" 0.0;\r
+                                       min: 0 5;\r
+                                       fixed: 0 1;\r
+                                       align: 0.0 0.0;\r
+                                       rel1 { relative: 0.0 0.0; to: progress.bg; }\r
+                                       rel2 { relative: 0.5 1.0; to_x: progress.circle; to_y: progress.bg; }\r
+                                       color: 255 255 255 255;\r
+                                       image { normal: "panel/T01-2_controller_progress_bar.png";}\r
+                               }\r
+                       }\r
+                       part { name: "progress.buffering";\r
+                               type: RECT;\r
+                               mouse_events: 0;\r
+                               scale: 1;\r
+                               description {\r
+                                       state: "default" 0.0;\r
+                                       visible: 0;\r
+                                       min: 0 5;\r
+                                       fixed: 0 1;\r
+                                       align: 0.0 0.5;\r
+                                       rel1 { relative: 0.0 0.5; to: progress.bg;  }\r
+                                       rel2 { relative: 1.0 1.0; to: progress.bg; }\r
+                                       color: 255 255 255 0;\r
+                               }\r
+                               dragable {\r
+                                   confine: "progress.confine.rect";\r
+                                       x: 1 1 1;\r
+                               }\r
+                       }\r
+\r
+                       part { name: "progress.confine.rect";\r
+                               type: RECT;\r
+                               mouse_events: 0;\r
+                               scale: 1;\r
+                               description {\r
+                                       state: "default" 0.0;\r
+                                       visible: 1;\r
+                                       rel1 { relative: 0.0 0.0;  to: progress.bg;  }\r
+                                       rel2 { relative: 1.0 1.0;  to: progress.bg; }\r
+                                       color: 255 255 255 0;\r
+                               }\r
+                       }\r
+\r
+                       part {\r
+                               name: "progress.circle";\r
+                               type: RECT;\r
+                               mouse_events: 0;\r
+                               scale: 1;\r
+                               description {\r
+                                       state: "default" 0.0;\r
+                                       min: 0 5;\r
+                                       fixed: 0 1;\r
+                                       align: 0.5 0.0;\r
+                                       rel1 { relative: 0.5 0.0; to_x: progress.playing; to_y: progress.bg; }\r
+                                       rel2 { relative: 0.5 1.0; to_x: progress.playing; to_y: progress.bg; }\r
+                                       color: 255 255 255 255;\r
+                               }\r
+                       }\r
+\r
+                       part { name: "progress.playing";\r
+                               type: RECT;\r
+                               mouse_events: 1;\r
+                               scale: 1;\r
+                               description {\r
+                                       visible: 1;\r
+                                       state: "default" 0.0;\r
+                                       color: 255 255 255 0;\r
+                                       min: 0 15;\r
+                                       fixed: 0 1;\r
+                                       align: 0.0 0.0;\r
+                                       rel1 { relative: 0.0 0.0; to_y: progress.rect; }\r
+                                       rel2 { relative: 0.0 0.0; to_y: progress.rect; }\r
+                               }\r
+                               dragable {\r
+                                       confine:  "progress.confine.rect";\r
+                                       x: 1 1 1;\r
+                               }\r
+                       }\r
+\r
+                       part {\r
+                               name: "progress.adjustment.handle";\r
+                               type: IMAGE;\r
+                               mouse_events: 0;\r
+                               scale: 1;\r
+                               description {\r
+                                       state: "default" 0.0;\r
+                                       visible: 0;\r
+                                       min: 25 25;\r
+                                       fixed: 1 1;\r
+                                       align: 0.5 0.5;\r
+                                       rel1 { relative: 0.5 0.5; to_x: progress.circle; to_y: progress.bg; }\r
+                                       rel2 { relative: 0.5 0.5; to_x: progress.circle; to_y: progress.bg; }\r
+                                       image { normal: "adjustment/T01-2_controller_progress_handle.png";}\r
+                                       color: 255 255 255 255;\r
+                               }\r
+                               description {\r
+                                       state: "show" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       visible: 1;\r
+                               }\r
+                       }\r
+                       part {\r
+                               name: "progress.adjustment.bg.rect";\r
+                               type: RECT;\r
+                               mouse_events: 0;\r
+                               scale: 1;\r
+                               description {\r
+                                       state: "default" 0.0;\r
+                                       visible: 0;\r
+                                       min: 174 153;\r
+                                       fixed: 1 1;\r
+                                       align: 0.5 1.0;\r
+                                       rel1 { relative: 0.5 0.0; to_x: progress.circle; to_y: progress.rect; }\r
+                                       rel2 { relative: 0.5 0.0; to_x: progress.circle; to_y: progress.rect; }\r
+                                       color: 0 0 0 0;\r
+                               }\r
+                               description {\r
+                                       state: "show" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       visible: 1;\r
+                               }\r
+                       }\r
+\r
+                       part {\r
+                               name: "progress.adjustment.bg";\r
+                               type: IMAGE;\r
+                               mouse_events: 0;\r
+                               scale: 1;\r
+                               description {\r
+                                       state: "default" 0.0;\r
+                                       visible: 0;\r
+                                       min: 174 153;\r
+                                       fixed: 1 1;\r
+                                       align: 0.0 0.0;\r
+                                       rel1 { relative: 0.0 0.0; to: progress.adjustment.bg.rect; }\r
+                                       rel2 { relative: 1.0 1.0; to: progress.adjustment.bg.rect; }\r
+                                       color: 255 255 255 255;\r
+                                       image { normal: "adjustment/T01-2_fine_adjustment_bg.png";}\r
+                               }\r
+                               description {\r
+                                       state: "show" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       visible: 1;\r
+                               }\r
+                       }\r
+\r
+                       part {\r
+                               name: "progress.adjustment.progress.bg";\r
+                               type: IMAGE;\r
+                               mouse_events: 0;\r
+                               scale: 1;\r
+                               description {\r
+                                       state: "default" 0.0;\r
+                                       visible: 0;\r
+                                       min: 1 20;\r
+                                       fixed: 1 1;\r
+                                       align: 0.0 0.0;\r
+                                       rel1 { relative: 0.08620 0.23529; to: progress.adjustment.bg.rect; }\r
+                                       rel2 { relative: 0.91379 0.23529; to: progress.adjustment.bg.rect; }\r
+                                       color: 255 255 255 255;\r
+                                       image { normal: "adjustment/T01-2_fine_adjustment_progress_bg.png";}\r
+                               }\r
+                               description {\r
+                                       state: "show" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       visible: 1;\r
+                               }\r
+                       }\r
+\r
+                       part {\r
+                               name: "progress.adjustment.progress.bar";\r
+                               type: IMAGE;\r
+                               mouse_events: 0;\r
+                               scale: 1;\r
+                               description {\r
+                                       state: "default" 0.0;\r
+                                       visible: 0;\r
+                                       min: 1 20;\r
+                                       fixed: 1 1;\r
+                                       align: 0.0 0.0;\r
+                                       rel1 { relative: 0.08620 0.23529; to: progress.adjustment.bg.rect; }\r
+                                       rel2 { relative: 0.5 0.23529; to: progress.adjustment.bg.rect; }\r
+                                       color: 255 255 255 255;\r
+                                       image { normal: "adjustment/T01-2_fine_adjustment_progress_bar.png";}\r
+                               }\r
+                               description {\r
+                                       state: "show" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       visible: 1;\r
+                               }\r
+                       }\r
+\r
+                       part {\r
+                               name: "progress.adjustment.progress.handle";\r
+                               type: IMAGE;\r
+                               mouse_events: 0;\r
+                               scale: 1;\r
+                               description {\r
+                                       state: "default" 0.0;\r
+                                       visible: 0;\r
+                                       min: 36 36;\r
+                                       fixed: 1 1;\r
+                                       align: 0.5 0.0;\r
+                                       rel1 { relative: 0.5 0.183006; to: progress.adjustment.bg.rect; }\r
+                                       rel2 { relative: 0.5 0.183006; to: progress.adjustment.bg.rect; }\r
+                                       color: 255 255 255 255;\r
+                                       image { normal: "adjustment/T01-2_fine_adjustment_progress_handle.png";}\r
+                               }\r
+                               description {\r
+                                       state: "show" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       visible: 1;\r
+                               }\r
+                       }\r
+                       part {\r
+                               name: "progress.adjustment.bg.ef";\r
+                               type: IMAGE;\r
+                               mouse_events: 0;\r
+                               scale: 1;\r
+                               description {\r
+                                       state: "default" 0.0;\r
+                                       visible: 0;\r
+                                       min: 174 153;\r
+                                       fixed: 1 1;\r
+                                       align: 0.0 0.0;\r
+                                       rel1 { relative: 0.0 0.0; to: progress.adjustment.bg.rect; }\r
+                                       rel2 { relative: 1.0 1.0; to: progress.adjustment.bg.rect; }\r
+                                       image { normal: "adjustment/T01-2_fine_adjustment_bg_ef.png";}\r
+                                       color: 255 255 255 255;\r
+                               }\r
+                               description {\r
+                                       state: "show" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       visible: 1;\r
+                               }\r
+                       }\r
+                       part { name: "progress.adjustment.txt";\r
+                               type: TEXT;\r
+                               scale: 1;\r
+                               mouse_events: 0;\r
+                               description {\r
+                                       state: "default" 0.0;\r
+                                       visible: 0;\r
+                                       min: 174 40;\r
+                                       fixed: 1 1;\r
+                                       align: 0.5 0.0;\r
+                                       rel1 { relative: 0.0 0.470588; to: progress.adjustment.bg.rect;}\r
+                                       rel2 { relative: 1.0 0.470588; to: progress.adjustment.bg.rect;}\r
+                                       color: 191 191 191 255;\r
+                                       text {\r
+                                               font: FONT_ROMAN_TYPE;\r
+                                               text_class: "slp_roman";\r
+                                               size: 40;\r
+                                               text: "00:00:00";\r
+                                               align: 0.5 0.5;\r
+                                       }\r
+                               }\r
+                               description {\r
+                                       state: "show" 0.0;\r
+                                       inherit: "default" 0.0;\r
+                                       visible: 1;\r
+                               }\r
+                       }\r
+               }       /* parts */\r
+\r
+               programs {\r
+                       program {\r
+                               signal: "signal.progress.portrate.mode";\r
+                               source: "*";\r
+                               action: STATE_SET "portrate" 0.0;\r
+                               target: "progress.bg";\r
+                               target: "progress.txt.played";\r
+                               target: "progress.txt.total";\r
+                       }\r
+\r
+                       program {\r
+                               signal: "signal.progress.landscape.mode";\r
+                               source: "*";\r
+                               action: STATE_SET "landscape" 0.0;\r
+                               target: "progress.bg";\r
+                               target: "progress.txt.played";\r
+                               target: "progress.txt.total";\r
+                       }\r
+\r
+                       program {\r
+                               signal: "signal.progress.adjustment.show";\r
+                               source: "*";\r
+                               action: STATE_SET "show" 0.0;\r
+                               target: "progress.adjustment.handle";\r
+                               target: "progress.adjustment.bg.rect";\r
+                               target: "progress.adjustment.bg.ef";\r
+                               target: "progress.adjustment.bg";\r
+                               target: "progress.adjustment.progress.bg";\r
+                               target: "progress.adjustment.progress.bar";\r
+                               target: "progress.adjustment.progress.handle";\r
+                               target: "progress.adjustment.txt";\r
+                       }\r
+\r
+                       program {\r
+                               signal: "signal.progress.adjustment.hide";\r
+                               source: "*";\r
+                               action: STATE_SET "default" 0.0;\r
+                               target: "progress.adjustment.handle";\r
+                               target: "progress.adjustment.bg.rect";\r
+                               target: "progress.adjustment.bg.ef";\r
+                               target: "progress.adjustment.bg";\r
+                               target: "progress.adjustment.progress.bg";\r
+                               target: "progress.adjustment.progress.bar";\r
+                               target: "progress.adjustment.progress.handle";\r
+                               target: "progress.adjustment.txt";\r
+                       }\r
+               }\r
+       } // group\r
+} // collections\r
diff --git a/res/edc/setting.edc b/res/edc/setting.edc
new file mode 100755 (executable)
index 0000000..9691ac7
--- /dev/null
@@ -0,0 +1,33 @@
+collections {
+       group {
+               name: "setting";
+               parts {
+                       part {
+                               name: "setting.bg";
+                               type: RECT;
+                               mouse_events: 0;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 1;
+                                       rel1 { relative: 0.0 0.0;}
+                                       rel2 { relative: 1.0 1.0;}
+                                       color: 255 255 255 255;
+                               }
+                       }
+                       part {
+                               name: "setting.list";
+                               type: SWALLOW;
+                               mouse_events: 1;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       align: 0.0 0.0;
+                                       visible: 1;
+                                       rel1 { relative: 0.0 0.0;  }
+                                       rel2 { relative: 1.0 1.0; }
+                               }
+                       }
+               }
+       }
+}
\ No newline at end of file
diff --git a/res/edc/subtitle.edc b/res/edc/subtitle.edc
new file mode 100755 (executable)
index 0000000..5b19912
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.tizenopensource.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.
+ */
+
+
+#include "vp_font.edc"
+#define SUBTITLE_W 400
+#define SUBTITLE_H 100
+
+
+
+collections {
+       group {
+               name: "subtitle";
+
+               parts {
+                       part {
+                               name: "subtitle.txt";
+                               type: TEXT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 1;
+                                       min: SUBTITLE_W SUBTITLE_H;
+                                       color: FONT_COLOR;
+                                       color3: 0 0 0 255;
+                                       fixed: 0 1;
+                                       align: 0.0 0.0;
+                                       rel1 { relative: 0.0 0.5; offset: 0 0; }
+                                       rel2 { relative: 1.0 0.7; offset: 0 0; }
+                                       text {
+                                               text_class: "list_line1";
+                                               font: FONT_NANE;
+                                               size: TITLE_FONT_SIZE;
+                                               text:  "";
+                                               align: 0.5 0.5;
+                                       }
+                               }
+                       }
+               } /* parts */
+       } /* group */
+} /* collections */
diff --git a/res/edc/vp-button-white.edc b/res/edc/vp-button-white.edc
new file mode 100755 (executable)
index 0000000..371a7ca
--- /dev/null
@@ -0,0 +1,504 @@
+#define BUTTON_STATE_ENABLED 0\r
+#define BUTTON_STATE_DISABLED 1\r
+\r
+#define BUTTON_NAVIFRAME_BACK_BUTTON_BG_MIN_MAX_INC 106 74\r
+#define BUTTON_NAVIFRAME_BACK_BUTTON_BG_BORDER_INC 5 5 5 5\r
+#define BUTTON_NAVIFRAME_BACK_BUTTON_MIN_MAX_INC 56 56\r
+\r
+#define BUTTON_NAVIFRAME_DEFAULT_TEXT_COLOR_INC 249 249 249 255\r
+#define BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC 249 249 249 255\r
+\r
+#define BUTTON_NAVIFRAME_CENTER_BG_NORMAL_MIN_INC 22 46\r
+#define BUTTON_NAVIFRAME_CENTER_BG_NORMAL_BORDER_INC 4 4 4 4\r
+#define BUTTON_NAVIFRAME_CENTER_PADDING_MIN_MAX_INC 16 2\r
+#define BUTTON_NAVIFRAME_CENTER_ICON_RECT_VISIBLE_MIN_SIZE 36 36\r
+#define BUTTON_NAVIFRAME_CENTER_PADDING_AFTER_ICON_VISIBLE_MIN_INC 6 0\r
+#define BUTTON_NAVIFRAME_CENTER_PADDING_BEFORE_TEXT_DEFAULT_MIN_INC 6 0\r
+#define BUTTON_NAVIFRAME_CENTER_SWALLOW_VISIBLE_MIN_MAX_INC 36 36\r
+#define BUTTON_NAVIFRAME_CENTER_SWALLOW_ICONONLY_MIN_MAX_INC 38 38\r
+#define BUTTON_NAVIFRAME_CENTER_TEXT_FONT_SIZE_INC 32\r
+#define BUTTON_NAVIFRAME_MULTILINE_TEXT_FONT_SIZE_INC 24\r
+\r
+#define BUTTON_NAVIFRAME_BG_MIN_INC 106 68\r
+#define BUTTON_NAVIFRAME_VISIBLE_BG_MIN_INC 106 68\r
+#define BUTTON_NAVIFRAME_ICONONLY_BG_MIN_INC 72 724\r
+#define BUTTON_NAVIFRAME_BG_BORDER_INC 5 5 5 5\r
+#define BUTTON_NAVIFRAME_PADDING_MIN_INC 16 3\r
+#define BUTTON_NAVIFRAME_VISIBLE_ICON_RECT_MIN_MAX_INC 38 38\r
+#define BUTTON_NAVIFRAME_VISIBLE_PADDING_ICON_TEXT_MIN_INC 10 0\r
+#define BUTTON_NAVIFRAME_VISIBLE_ICON_MIN_MAX_INC 38 38\r
+#define BUTTON_NAVIFRAME_ICONONLY_ICON_MIN_MAX_INC 38 38\r
+#define BUTTON_TEXT_NAVIFRAME_FONT_SIZE_INC 32\r
+#define BUTTON_NAVIFRAME_TITLE_BUTTON_MIN_INC 106 68\r
+\r
+#define BUTTON_NAVIFRAME_MORE_BG_MIN_MAX_INC 82 64\r
+#define BUTTON_NAVIFRAME_MORE_BG_BORDER_INC 5 5 5 5\r
+#define BUTTON_NAVIFRAME_MORE_DEFAULT_IMAGE_MIN_MAX_INC 50 50\r
+\r
+#define BUTTON_TEXT_NAVIFRAME_NORMAL_COLOR_INC 211 211 211 255\r
+#define BUTTON_TEXT_NAVIFRAME_PRESSED_COLOR_INC 249 249 249 255\r
+#define BUTTON_TEXT_NAVIFRAME_FOCUSED_COLOR_INC 249 249 249 255\r
+#define BUTTON_TEXT_NAVIFRAME_DISABLED_COLOR_INC 211 211 211 255\r
+\r
+//////////////////////////////////////////////////////////////\r
+   group { name: "elm/button/base/video/naviframe/title/default";\r
+      images {\r
+         image: "white/common/T01-2_title_btn_bg.png" COMP;\r
+         image: "white/common/T01-2_title_btn_bg_press_01.png" COMP;\r
+         image: "white/common/T01-2_title_btn_bg_press_02.png" COMP;\r
+      }\r
+      script {\r
+         public button_state = BUTTON_STATE_ENABLED;\r
+      }\r
+      parts {\r
+         part { name: "button_image";\r
+            scale: 1;\r
+            description { state: "default" 0.0;\r
+               min: BUTTON_NAVIFRAME_TITLE_BUTTON_MIN_INC;\r
+               max: BUTTON_NAVIFRAME_TITLE_BUTTON_MIN_INC;\r
+               image {\r
+                  normal: "white/common/T01-2_title_btn_bg.png";\r
+                  border: BUTTON_NAVIFRAME_BG_BORDER_INC;\r
+                  border_scale: 1;\r
+               }\r
+            }\r
+            description { state: "clicked" 0.0;\r
+               inherit: "default" 0.0;\r
+               image.normal: "white/common/T01-2_title_btn_bg_press_01.png";\r
+            }\r
+            description { state: "disabled" 0.0;\r
+               inherit: "default" 0.0;\r
+               color: 0 0 0 128;\r
+            }\r
+            description { state: "focused" 0.0;\r
+               inherit: "default" 0.0;\r
+               image.normal: "white/common/T01-2_title_btn_bg_press_02.png";\r
+            }\r
+         }\r
+         part { name: "padding_left_top";\r
+            type: RECT;\r
+            scale: 1;\r
+            mouse_events: 0;\r
+            description { state: "default" 0.0;\r
+               align: 0.0 0.0;\r
+               rel2.relative: 0.0 0.0;\r
+               min: BUTTON_NAVIFRAME_PADDING_MIN_INC;\r
+               fixed: 1 1;\r
+               visible: 0;\r
+            }\r
+         }\r
+         part { name: "bg";\r
+            type: RECT;\r
+            scale: 1;\r
+            mouse_events: 0;\r
+            description { state: "default" 0.0;\r
+               min: BUTTON_NAVIFRAME_BG_MIN_INC;\r
+               visible: 0;\r
+            }\r
+            description { state: "visible" 0.0;\r
+               inherit: "default" 0.0;\r
+               min: BUTTON_NAVIFRAME_VISIBLE_BG_MIN_INC;\r
+            }\r
+            description { state: "icononly" 0.0;\r
+               inherit: "default" 0.0;\r
+               min: BUTTON_NAVIFRAME_ICONONLY_BG_MIN_INC;\r
+            }\r
+         }\r
+         part { name: "padding_right_bottom";\r
+            type: RECT;\r
+            scale: 1;\r
+            mouse_events: 0;\r
+            description { state: "default" 0.0;\r
+               align: 1.0 1.0;\r
+               rel1.relative: 1.0 1.0;\r
+               min: BUTTON_NAVIFRAME_PADDING_MIN_INC;\r
+               fixed: 1 1;\r
+               visible: 0;\r
+            }\r
+         }\r
+         part { name: "icon_rect";\r
+            type: RECT;\r
+            scale: 1;\r
+            mouse_events: 0;\r
+            description { state: "default" 0.0;\r
+               visible: 0;\r
+               min: 0 0;\r
+               fixed: 1 0;\r
+               rel1 {\r
+                  relative: 1.0 1.0;\r
+                  to: "padding_left_top";\r
+               }\r
+               rel2 {\r
+                  relative: 1.0 0.0;\r
+                  to_x: "padding_left_top";\r
+                  to_y: "padding_right_bottom";\r
+               }\r
+               align: 0.0 0.5;\r
+            }\r
+            description { state: "visible" 0.0;\r
+               visible: 0;\r
+               min: BUTTON_NAVIFRAME_VISIBLE_ICON_RECT_MIN_MAX_INC;\r
+               max: BUTTON_NAVIFRAME_VISIBLE_ICON_RECT_MIN_MAX_INC;\r
+               fixed: 1 0;\r
+               rel1 {\r
+                  relative: 1.0 1.0;\r
+                  to: "padding_left_top";\r
+               }\r
+               rel2 {\r
+                  relative: 1.0 0.0;\r
+                  to_x: "padding_left_top";\r
+                  to_y: "padding_right_bottom";\r
+               }\r
+               align: 0.0 0.5;\r
+            }\r
+            description { state: "icononly" 0.0;\r
+               inherit: "default" 0.0;\r
+            }\r
+         }\r
+         part { name: "padding_after_icon";\r
+            type: RECT;\r
+            scale: 1;\r
+            mouse_events: 0;\r
+            description { state: "default" 0.0; //when only icon or no icon is there\r
+               align: 0.0 0.0;\r
+               rel1 {\r
+                  relative: 1.0 0.0;\r
+                  to: "icon_rect";\r
+               }\r
+               rel2.to: "icon_rect";\r
+               fixed: 1 0;\r
+               min: 0 0;\r
+               visible: 0;\r
+            }\r
+            description { state: "visible" 0.0;\r
+               visible: 0;\r
+               align: 0.0 0.0;\r
+               rel1 {\r
+                  relative: 1.0 0.0;\r
+                  to: "icon_rect";\r
+               }\r
+               rel2.to: "icon_rect";\r
+               fixed: 1 0;\r
+               min: BUTTON_NAVIFRAME_VISIBLE_PADDING_ICON_TEXT_MIN_INC;\r
+            }\r
+            description { state: "icononly" 0.0;\r
+               inherit: "default" 0.0;\r
+            }\r
+         }\r
+         part { name: "padding_before_text";\r
+            type: RECT;\r
+            scale: 1;\r
+            mouse_events: 0;\r
+            description { state: "default" 0.0; //when only icon or no icon is there\r
+               align: 1.0 0.5;\r
+               rel1 {\r
+                  relative: 0.0 1.0;\r
+                  to_x: "elm.text";\r
+                  to_y: "padding_left_top";\r
+               }\r
+               rel2 {\r
+                  relative: 0.0 0.0;\r
+                  to_x: "elm.text";\r
+                  to_y: "padding_right_bottom";\r
+               }\r
+               fixed: 1 0;\r
+               min: BUTTON_NAVIFRAME_VISIBLE_PADDING_ICON_TEXT_MIN_INC;\r
+               visible: 0;\r
+            }\r
+         }\r
+         part { name: "elm.swallow.content";\r
+            type: SWALLOW;\r
+            scale: 1;\r
+            clip_to: "clipper";\r
+            description { state: "default" 0.0;\r
+               visible: 0;\r
+               align: 0.0 0.5;\r
+               rel1 {\r
+                  relative: 1.0 1.0;\r
+                  to: "padding_left_top";\r
+               }\r
+               rel2 {\r
+                  relative: 1.0 0.0;\r
+                  to_x: "padding_left_top";\r
+                  to_y: "padding_right_bottom";\r
+               }\r
+               fixed: 1 0;\r
+            }\r
+            description { state: "visible" 0.0;\r
+               fixed: 1 0;\r
+               min: BUTTON_NAVIFRAME_VISIBLE_ICON_MIN_MAX_INC;\r
+               max: BUTTON_NAVIFRAME_VISIBLE_ICON_MIN_MAX_INC;\r
+               align: 1.0 0.5;\r
+               rel1 {\r
+                  relative: 0.0 1.0;\r
+                  to_x: "padding_before_text";\r
+                  to_y: "padding_left_top";\r
+               }\r
+               rel2 {\r
+                  relative: 0.0 0.0;\r
+                  to_x: "padding_before_text";\r
+                  to_y: "padding_right_bottom";\r
+               }\r
+            }\r
+            description { state: "icononly" 0.0;\r
+               min: BUTTON_NAVIFRAME_ICONONLY_ICON_MIN_MAX_INC;\r
+               max: BUTTON_NAVIFRAME_ICONONLY_ICON_MIN_MAX_INC;\r
+            }\r
+         }\r
+         part { name: "elm.text";\r
+            type: TEXT;\r
+            mouse_events: 0;\r
+            scale: 1;\r
+            clip_to: "clipper";\r
+            description { state: "default" 0.0;\r
+               visible: 0;\r
+               rel1 {\r
+                  relative: 1.0 1.0;\r
+                  to_x: "padding_after_icon";\r
+                  to_y: "padding_left_top";\r
+               }\r
+               rel2 {\r
+                  relative: 0.0 0.0;\r
+                  to: "padding_right_bottom";\r
+               }\r
+               color: BUTTON_TEXT_NAVIFRAME_NORMAL_COLOR_INC;\r
+               text {\r
+                  font: "SLP:style=Medium";\r
+                  text_class: "slp_medium";\r
+                  size: BUTTON_TEXT_NAVIFRAME_FONT_SIZE_INC;\r
+                  min: 0 0;\r
+                  max: 1 0;\r
+               }\r
+            }\r
+            description { state: "visible" 0.0;\r
+               inherit: "default" 0.0;\r
+               visible: 1;\r
+            }\r
+            description { state: "clicked" 0.0;\r
+               inherit: "default" 0.0;\r
+               visible: 1;\r
+               color: BUTTON_TEXT_NAVIFRAME_PRESSED_COLOR_INC;\r
+            }\r
+            description { state: "disabled" 0.0;\r
+               inherit: "default" 0.0;\r
+               color: 0 0 0 128;\r
+            }\r
+            description { state: "disabled_visible" 0.0;\r
+               inherit: "default" 0.0;\r
+               color: BUTTON_TEXT_NAVIFRAME_DISABLED_COLOR_INC;\r
+               visible: 1;\r
+            }\r
+            description { state: "focused" 0.0;\r
+               inherit: "default" 0.0;\r
+               visible: 1;\r
+               color: BUTTON_TEXT_NAVIFRAME_FOCUSED_COLOR_INC;\r
+            }\r
+         }\r
+         part { name: "over2";\r
+            type: RECT;\r
+            repeat_events: 1;\r
+            ignore_flags: ON_HOLD;\r
+            description { state: "default" 0.0;\r
+               color: 0 0 0 0;\r
+            }\r
+         }\r
+         part { name: "over3";\r
+            type: RECT;\r
+            repeat_events: 1;\r
+            description { state: "default" 0.0;\r
+               color: 0 0 0 0;\r
+            }\r
+         }\r
+         part { name: "clipper";\r
+            type: RECT;\r
+            description { state: "default" 0.0;\r
+               color: 255 255 255 255;\r
+            }\r
+         }\r
+         part { name: "disabler";\r
+            type: RECT;\r
+            description { state: "default" 0.0;\r
+               color: 0 0 0 0;\r
+               visible: 0;\r
+            }\r
+            description { state: "disabled" 0.0;\r
+               inherit: "default" 0.0;\r
+               visible: 1;\r
+            }\r
+         }\r
+      }\r
+      programs {\r
+         program { name: "button_click";\r
+            signal: "mouse,down,1";\r
+            source: "over2";\r
+            action: SIGNAL_EMIT "elm,action,press" "";\r
+            after: "button_click_anim";\r
+         }\r
+         program { name: "button_click_anim";\r
+            action: STATE_SET "clicked" 0.0;\r
+            target: "button_image";\r
+            after: "text_clicked";\r
+         }\r
+         program { name: "text_clicked";\r
+            script {\r
+               new st[31];\r
+               new Float:vl;\r
+               get_state(PART:"elm.text", st, 30, vl);\r
+               if (!strcmp(st, "visible"))\r
+                 set_state(PART:"elm.text", "clicked", 0.0);\r
+            }\r
+         }\r
+         program { name: "button_unpress";\r
+            action: SIGNAL_EMIT "elm,action,unpress" "";\r
+         }\r
+         program { name: "button_mouseout_clicked";\r
+            signal: "mouse,up,1";\r
+            source: "over3";\r
+            script {\r
+               new st[31];\r
+               new Float:vl;\r
+               get_state(PART:"elm.swallow.content", st, 30, vl);\r
+               if (strcmp(st, "icononly"))\r
+                 {\r
+                    emit("elm,action,default,text,set", "");\r
+                    set_state(PART:"elm.text", "visible", 0.0);\r
+                 }\r
+               if (get_int(button_state) != BUTTON_STATE_DISABLED)\r
+                 set_state(PART:"button_image", "default", 0.0);\r
+            }\r
+            after: button_unpress;\r
+         }\r
+         program { name: "button_unclick3";\r
+            signal: "mouse,clicked,1";\r
+            source: "over2";\r
+            action: SIGNAL_EMIT "elm,action,click" "";\r
+         }\r
+         program { name: "text_show";\r
+            signal: "elm,state,text,visible";\r
+            source: "elm";\r
+            script {\r
+               new st[31];\r
+               new Float:vl;\r
+               get_state(PART:"elm.swallow.content", st, 30, vl);\r
+               if (!strcmp(st, "icononly"))\r
+                 {\r
+                    set_state(PART:"elm.swallow.content", "visible", 0.0);\r
+                    set_state(PART:"icon_rect", "visible", 0.0);\r
+                    set_state(PART:"padding_after_icon", "visible", 0.0);\r
+                    set_state(PART:"bg", "visible", 0.0);\r
+                 }\r
+               if (get_int(button_state) != BUTTON_STATE_DISABLED)\r
+                 set_state(PART:"elm.text", "visible", 0.0);\r
+               else\r
+                 set_state(PART:"elm.text", "disabled_visible", 0.0);\r
+            }\r
+         }\r
+         program { name: "text_hide";\r
+            signal: "elm,state,text,hidden";\r
+            source: "elm";\r
+            script {\r
+               new st[31];\r
+               new Float:vl;\r
+               get_state(PART:"elm.swallow.content", st, 30, vl);\r
+               if (!strcmp(st, "visible"))\r
+                 {\r
+                    set_state(PART:"elm.swallow.content", "icononly", 0.0);\r
+                    set_state(PART:"icon_rect", "icononly", 0.0);\r
+                    set_state(PART:"padding_after_icon", "icononly", 0.0);\r
+                    set_state(PART:"bg", "icononly", 0.0);\r
+                 }\r
+               set_state(PART:"elm.text", "default", 0.0);\r
+            }\r
+         }\r
+         program { name: "icon_show";\r
+            signal: "elm,state,icon,visible";\r
+            source: "elm";\r
+            script {\r
+               new st[31];\r
+               new Float:vl;\r
+               get_state(PART:"elm.text", st, 30, vl);\r
+               if (!strcmp(st, "visible"))\r
+                 {\r
+                    set_state(PART:"elm.swallow.content", "visible", 0.0);\r
+                    set_state(PART:"icon_rect", "visible", 0.0);\r
+                    set_state(PART:"padding_after_icon", "visible", 0.0);\r
+                    set_state(PART:"bg", "visible", 0.0);\r
+                 }\r
+               else\r
+                 {\r
+                    set_state(PART:"elm.swallow.content", "icononly", 0.0);\r
+                    set_state(PART:"icon_rect", "icononly", 0.0);\r
+                    set_state(PART:"padding_after_icon", "icononly", 0.0);\r
+                    set_state(PART:"bg", "icononly", 0.0);\r
+                 }\r
+            }\r
+         }\r
+         program { name: "icon_hide";\r
+            signal: "elm,state,icon,hidden";\r
+            source: "elm";\r
+            action: STATE_SET "default" 0.0;\r
+            target: "elm.swallow.content";\r
+            target: "padding_after_icon";\r
+            target: "icon_rect";\r
+            target: "bg";\r
+         }\r
+         program { name: "disable";\r
+            signal: "elm,state,disabled";\r
+            source: "elm";\r
+            action: STATE_SET "disabled" 0.0;\r
+            target: "button_image";\r
+            target: "disabler";\r
+            after: "disable_text";\r
+         }\r
+         program { name: "disable_text";\r
+            script {\r
+               new st[31];\r
+               new Float:vl;\r
+               get_state(PART:"elm.text", st, 30, vl);\r
+               if (!strcmp(st, "visible"))\r
+                 set_state(PART:"elm.text", "disabled_visible", 0.0);\r
+               else\r
+                 set_state(PART:"elm.text", "disabled", 0.0);\r
+               set_int(button_state, BUTTON_STATE_DISABLED);\r
+            }\r
+         }\r
+         program { name: "enable";\r
+            signal: "elm,state,enabled";\r
+            source: "elm";\r
+            action: STATE_SET "default" 0.0;\r
+            target: "button_image";\r
+            target: "disabler";\r
+            after: "enable_text";\r
+         }\r
+         program { name: "enable_text";\r
+            script {\r
+               new st[31];\r
+               new Float:vl;\r
+               get_state(PART:"elm.text", st, 30, vl);\r
+               if (!strcmp(st, "disabled_visible"))\r
+                 set_state(PART:"elm.text", "visible", 0.0);\r
+               else\r
+                 set_state(PART:"elm.text", "default", 0.0);\r
+               set_int(button_state, BUTTON_STATE_ENABLED);\r
+            }\r
+         }\r
+         program { name: "focused";\r
+            //signal: "elm,action,focus";\r
+            //source: "elm";\r
+            action: STATE_SET "focused" 0.0;\r
+            target: "button_image";\r
+            target: "elm.text";\r
+         }\r
+         program { name: "unfocused";\r
+            //signal: "elm,action,unfocus";\r
+            //source: "elm";\r
+            action: STATE_SET "default" 0.0;\r
+            target: "button_image";\r
+            after: "unfocus_text";\r
+         }\r
+         program { name: "unfocus_text";\r
+            action: STATE_SET "visible" 0.0;\r
+            target: "elm.text";\r
+         }\r
+      }\r
+   }\r
diff --git a/res/edc/vp-button.edc b/res/edc/vp-button.edc
new file mode 100755 (executable)
index 0000000..4eabcfb
--- /dev/null
@@ -0,0 +1,1086 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.tizenopensource.org/license
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#define BUTTON_STATE_ENABLED  0
+#define BUTTON_STATE_DISABLED 1
+
+#define BUTTON_NAVIBAR_FUNCTION_BUTTON_TEXT_NORMAL_COLOR_INC 146 124 98 255
+#define BUTTON_NAVIBAR_FUNCTION_BUTTON_TEXT_PRESSED_COLOR_INC 217 147 26 255
+#define BUTTON_NAVIBAR_FUNCTION_BUTTON_TEXT_FOCUSED_COLOR_INC 217 147 26 255
+#define BUTTON_NAVIBAR_FUNCTION_BUTTON_TEXT_DISABLED_COLOR_INC 160 151 145 255
+
+#define BUTTON_NAVIBAR_CENTER_BG_NORMAL_MIN_W_INC 36
+#define BUTTON_NAVIBAR_CENTER_BG_NORMAL_MIN_H_INC 74
+#define BUTTON_NAVIBAR_CENTER_BG_NORMAL_BORDER_INC 4 4 4 4
+#define BUTTON_NAVIBAR_CENTER_PADDING_MIN_MAX_INC 16 2
+#define BUTTON_NAVIBAR_CENTER_ICON_RECT_VISIBLE_MIN_SIZE 36 36
+#define BUTTON_NAVIBAR_CENTER_PADDING_AFTER_ICON_VISIBLE_MIN_INC 6 0
+#define BUTTON_NAVIBAR_CENTER_PADDING_BEFORE_TEXT_DEFAULT_MIN_INC 6 0
+#define BUTTON_NAVIBAR_CENTER_SWALLOW_VISIBLE_MIN_MAX_INC 36 36
+#define BUTTON_NAVIBAR_CENTER_SWALLOW_ICONONLY_MIN_MAX_INC 38 38
+#define BUTTON_NAVIBAR_CENTER_TEXT_FONT_SIZE_INC 32
+#define BUTTON_NAVIBAR_MULTILINE_TEXT_FONT_SIZE_INC 24
+
+#define BUTTON_NAVIBAR_BACK_BUTTON_BUTTON_IMAGE_MIN_INC 106 40
+#define BUTTON_NAVIBAR_BACK_BUTTON_BG_MIN_MAX_INC 36 32
+
+#define NAVIBAR_TITLE_LEFT_SEPARATOR_COLOR_INC 3 3 3 255
+#define NAVIBAR_TITLE_RIGHT_SEPARATOR_COLOR_INC 52 52 52 255
+
+#define BUTTON_TEXT_STYLE1_BG_MIN_INC 100 74
+#define BUTTON_TEXT_STYLE1_VISIBLE_BG_MIN_INC 148 74
+#define BUTTON_TEXT_STYLE1_ICONONLY_BG_MIN_INC 74 74
+#define BUTTON_TEXT_STYLE1_BG_BORDER_INC 5 5 5 5
+#define BUTTON_TEXT_STYLE1_PADDING_MIN_INC 5 5
+#define BUTTON_TEXT_STYLE1_VISIBLE_ICON_RECT_MIN_MAX_INC 38 38
+#define BUTTON_TEXT_STYLE1_VISIBLE_PADDING_ICON_TEXT_MIN_INC 10 0
+#define BUTTON_TEXT_STYLE1_VISIBLE_ICON_MIN_MAX_INC 38 38
+#define BUTTON_TEXT_STYLE1_ICONONLY_ICON_MIN_MAX_INC 38 38
+#define BUTTON_TEXT_STYLE1_FONT_SIZE_INC 32
+
+#define BUTTON_TEXT_STYLE1_NORMAL_COLOR_INC 108 108 108 255
+#define BUTTON_TEXT_STYLE1_PRESSED_COLOR_INC 249 249 249 255
+#define BUTTON_TEXT_STYLE1_FOCUSED_COLOR_INC 108 108 108 255
+#define BUTTON_TEXT_STYLE1_DISABLED_COLOR_INC 108 115 118 255
+
+///////////////////////////////////////////////////////////////////////////////////////
+   group { name: "elm/button/base/video/style1";
+      alias: "elm/button/base/video/text_only/style1";
+      alias: "elm/button/base/video/center";
+      alias: "elm/button/base/video/icon_and_text/center";
+      alias: "elm/button/base/video/nocontents/search_button";
+      alias: "elm/button/base/video/naviframe/title/default";
+      images {
+         image: "T01_title_btn.png" COMP;
+         image: "T01_title_btn_press.png" COMP;
+      }
+      script {
+         public button_state = BUTTON_STATE_ENABLED;
+      }
+      parts {
+         part { name: "button_image";
+            scale: 1;
+            description { state: "default" 0.0;
+               image {
+                  normal: "T01_title_btn.png";
+                  border: BUTTON_TEXT_STYLE1_BG_BORDER_INC;
+                  border_scale: 1;
+               }
+            }
+            description { state: "clicked" 0.0;
+               inherit: "default" 0.0;
+               image {
+                  normal: "T01_title_btn_press.png";
+               }
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+               image {
+                  normal: "T01_title_btn.png";
+               }
+            }
+            description { state: "focused" 0.0;
+               inherit: "default" 0.0;
+               image {
+                  normal: "T01_title_btn_press.png";
+               }
+            }
+         }
+         part { name: "padding_left_top";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               align: 0.0 0.0;
+               rel2 {
+                  relative: 0.0 0.0;
+               }
+               min: BUTTON_TEXT_STYLE1_PADDING_MIN_INC;
+               fixed: 1 1;
+               visible: 0;
+            }
+         }
+         part { name: "bg";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               min: BUTTON_TEXT_STYLE1_BG_MIN_INC;
+               visible: 0;
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               min: BUTTON_TEXT_STYLE1_VISIBLE_BG_MIN_INC;
+            }
+            description { state: "icononly" 0.0;
+               inherit: "default" 0.0;
+               min: BUTTON_TEXT_STYLE1_ICONONLY_BG_MIN_INC;
+            }
+         }
+         part { name: "padding_right_bottom";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               align: 1.0 1.0;
+               rel1 {
+                  relative: 1.0 1.0;
+               }
+               min: BUTTON_TEXT_STYLE1_PADDING_MIN_INC;
+               fixed: 1 1;
+               visible: 0;
+            }
+         }
+         part { name: "icon_rect";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               visible: 0;
+               min: 0 0;
+               fixed: 1 0;
+               rel1 {
+                  relative: 1.0 1.0;
+                  to: "padding_left_top";
+               }
+               rel2 {
+                  relative: 1.0 0.0;
+                  to_x: "padding_left_top";
+                  to_y: "padding_right_bottom";
+               }
+               align: 0.0 0.5;
+            }
+            description { state: "visible" 0.0;
+               visible: 0;
+               min: BUTTON_TEXT_STYLE1_VISIBLE_ICON_RECT_MIN_MAX_INC;
+               max: BUTTON_TEXT_STYLE1_VISIBLE_ICON_RECT_MIN_MAX_INC;
+               fixed: 1 0;
+               rel1 {
+                  relative: 1.0 1.0;
+                  to: "padding_left_top";
+               }
+               rel2 {
+               relative: 1.0 0.0;
+                  to_x: "padding_left_top";
+                  to_y: "padding_right_bottom";
+               }
+               align: 0.0 0.5;
+            }
+            description { state: "icononly" 0.0;
+               inherit: "default" 0.0;
+            }
+         }
+         part { name: "padding_after_icon";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0; //when only icon or no icon is there
+               align: 0.0 0.0;
+               rel1 {
+                  relative: 1.0 0.0;
+                  to: "icon_rect";
+               }
+               rel2 {
+                  to: "icon_rect";
+               }
+               fixed: 1 0;
+               min: 0 0;
+               visible: 0;
+            }
+            description { state: "visible" 0.0;
+               visible: 0;
+               align: 0.0 0.0;
+               rel1 {
+                  relative: 1.0 0.0;
+                  to: "icon_rect";
+               }
+               rel2 {
+                  to: "icon_rect";
+               }
+               fixed: 1 0;
+               min: BUTTON_TEXT_STYLE1_VISIBLE_PADDING_ICON_TEXT_MIN_INC;
+            }
+            description { state: "icononly" 0.0;
+               inherit: "default" 0.0;
+            }
+         }
+         part { name: "padding_before_text";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0; //when only icon or no icon is there
+               align: 1.0 0.5;
+               rel1 {
+                  relative: 0.0 1.0;
+                  to_x: "elm.text";
+                  to_y: "padding_left_top";
+               }
+               rel2 {
+                  relative: 0.0 0.0;
+                  to_x: "elm.text";
+                  to_y: "padding_right_bottom";
+               }
+               fixed: 1 0;
+               min: BUTTON_TEXT_STYLE1_VISIBLE_PADDING_ICON_TEXT_MIN_INC;
+               visible: 0;
+            }
+         }
+         part { name: "elm.swallow.content";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "clipper";
+            description { state: "default" 0.0;
+               visible: 0;
+               align: 0.0 0.5;
+               rel1 {
+                  relative: 1.0 1.0;
+                  to: "padding_left_top";
+               }
+               rel2 {
+                  relative: 1.0 0.0;
+                  to_x: "padding_left_top";
+                  to_y: "padding_right_bottom";
+               }
+               fixed: 1 0;
+            }
+            description { state: "visible" 0.0;
+               fixed: 1 0;
+               min: BUTTON_TEXT_STYLE1_VISIBLE_ICON_MIN_MAX_INC;
+               max: BUTTON_TEXT_STYLE1_VISIBLE_ICON_MIN_MAX_INC;
+               align: 1.0 0.5;
+               rel1 {
+                  relative: 0.0 1.0;
+                  to_x: "padding_before_text";
+                  to_y: "padding_left_top";
+               }
+               rel2 {
+                  relative: 0.0 0.0;
+                  to_x: "padding_before_text";
+                  to_y: "padding_right_bottom";
+               }
+            }
+            description { state: "icononly" 0.0;
+               min: BUTTON_TEXT_STYLE1_ICONONLY_ICON_MIN_MAX_INC;
+               max: BUTTON_TEXT_STYLE1_ICONONLY_ICON_MIN_MAX_INC;
+               align: 0.5 0.5;
+            }
+         }
+         part { name: "elm.text";
+            type: TEXT;
+            mouse_events: 0;
+            scale: 1;
+            clip_to: "clipper";
+            description { state: "default" 0.0;
+               visible: 0;
+               rel1 {
+                  relative: 1.0 1.0;
+                  to_x: "padding_after_icon";
+                  to_y: "padding_left_top";
+               }
+               rel2 {
+                  relative: 0.0 0.0;
+                  to: "padding_right_bottom";
+               }
+               color: BUTTON_TEXT_STYLE1_NORMAL_COLOR_INC;
+               text {
+                  font: "SLP:style=Medium";
+                  size: BUTTON_TEXT_STYLE1_FONT_SIZE_INC;
+                  min: 0 0;
+                  max: 1 0;
+               }
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+            }
+            description { state: "clicked" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+               color: BUTTON_TEXT_STYLE1_PRESSED_COLOR_INC;
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+               color: 0 0 0 128;
+            }
+            description { state: "disabled_visible" 0.0;
+               inherit: "default" 0.0;
+               color: BUTTON_TEXT_STYLE1_DISABLED_COLOR_INC;
+               visible: 1;
+            }
+            description { state: "focused" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+               color: BUTTON_TEXT_STYLE1_FOCUSED_COLOR_INC;
+            }
+         }
+         part { name: "over2";
+            type: RECT;
+            repeat_events: 1;
+            ignore_flags: ON_HOLD;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+            }
+         }
+         part { name: "over3";
+            type: RECT;
+            repeat_events: 1;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+            }
+         }
+         part { name: "clipper";
+            type: RECT;
+            description { state: "default" 0.0;
+               color: 255 255 255 255;
+            }
+         }
+         part { name: "disabler";
+            type: RECT;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+               visible: 0;
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+            }
+         }
+      }
+      programs {
+         program { name: "button_click";
+            signal: "mouse,down,1";
+            source: "over2";
+            action: SIGNAL_EMIT "elm,action,press" "";
+            after: "button_click_anim";
+         }
+         program { name: "button_click_anim";
+            action: STATE_SET "clicked" 0.0;
+            target: "button_image";
+            after: "text_clicked";
+         }
+         program { name: "text_clicked";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.text", st, 30, vl);
+               if (!strcmp(st, "visible"))
+                 set_state(PART:"elm.text", "clicked", 0.0);
+            }
+         }
+         program { name: "button_unpress";
+            action: SIGNAL_EMIT "elm,action,unpress" "";
+         }
+         program { name: "button_mouseout_clicked";
+            signal: "mouse,up,1";
+            source: "over3";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.swallow.content", st, 30, vl);
+               if (strcmp(st, "icononly"))
+                 {
+                    emit("elm,action,default,text,set", "");
+                    set_state(PART:"elm.text", "visible", 0.0);
+                 }
+               if (get_int(button_state) != BUTTON_STATE_DISABLED)
+                 set_state(PART:"button_image", "default", 0.0);
+            }
+            after: button_unpress;
+         }
+         program { name: "button_unclick3";
+            signal: "mouse,clicked,1";
+            source: "over2";
+            action: SIGNAL_EMIT "elm,action,click" "";
+         }
+         program { name: "text_show";
+            signal: "elm,state,text,visible";
+            source: "elm";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.swallow.content", st, 30, vl);
+               if (!strcmp(st, "icononly"))
+                 {
+                    set_state(PART:"elm.swallow.content", "visible", 0.0);
+                    set_state(PART:"icon_rect", "visible", 0.0);
+                    set_state(PART:"padding_after_icon", "visible", 0.0);
+                    set_state(PART:"bg", "visible", 0.0);
+                 }
+               if (get_int(button_state) != BUTTON_STATE_DISABLED)
+                 set_state(PART:"elm.text", "visible", 0.0);
+               else
+                 set_state(PART:"elm.text", "disabled_visible", 0.0);
+            }
+         }
+         program { name: "text_hide";
+            signal: "elm,state,text,hidden";
+            source: "elm";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.swallow.content", st, 30, vl);
+               if (!strcmp(st, "visible"))
+                 {
+                    set_state(PART:"elm.swallow.content", "icononly", 0.0);
+                    set_state(PART:"icon_rect", "icononly", 0.0);
+                    set_state(PART:"padding_after_icon", "icononly", 0.0);
+                    set_state(PART:"bg", "icononly", 0.0);
+                 }
+               set_state(PART:"elm.text", "default", 0.0);
+            }
+         }
+         program { name: "icon_show";
+            signal: "elm,state,icon,visible";
+            source: "elm";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.text", st, 30, vl);
+               if (!strcmp(st, "visible"))
+                 {
+                    set_state(PART:"elm.swallow.content", "visible", 0.0);
+                    set_state(PART:"icon_rect", "visible", 0.0);
+                    set_state(PART:"padding_after_icon", "visible", 0.0);
+                    set_state(PART:"bg", "visible", 0.0);
+                 }
+               else
+                 {
+                    set_state(PART:"elm.swallow.content", "icononly", 0.0);
+                    set_state(PART:"icon_rect", "icononly", 0.0);
+                    set_state(PART:"padding_after_icon", "icononly", 0.0);
+                    set_state(PART:"bg", "icononly", 0.0);
+                 }
+            }
+         }
+         program { name: "icon_hide";
+            signal: "elm,state,icon,hidden";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "elm.swallow.content";
+            target: "padding_after_icon";
+            target: "icon_rect";
+            target: "bg";
+         }
+         program { name: "disable";
+            signal: "elm,state,disabled";
+            source: "elm";
+            action: STATE_SET "disabled" 0.0;
+            target: "button_image";
+            target: "disabler";
+            after: "disable_text";
+         }
+         program { name: "disable_text";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.text", st, 30, vl);
+               if (!strcmp(st, "visible"))
+                 set_state(PART:"elm.text", "disabled_visible", 0.0);
+               else
+                 set_state(PART:"elm.text", "disabled", 0.0);
+               set_int(button_state, BUTTON_STATE_DISABLED);
+            }
+         }
+         program { name: "enable";
+            signal: "elm,state,enabled";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "button_image";
+            target: "disabler";
+            after: "enable_text";
+         }
+         program { name: "enable_text";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.text", st, 30, vl);
+               if (!strcmp(st, "disabled_visible"))
+                 set_state(PART:"elm.text", "visible", 0.0);
+               else
+                 set_state(PART:"elm.text", "default", 0.0);
+               set_int(button_state, BUTTON_STATE_ENABLED);
+            }
+         }
+         program { name: "focused";
+            //signal: "elm,action,focus";
+            //source: "elm";
+            action: STATE_SET "focused" 0.0;
+            target: "button_image";
+            target: "elm.text";
+         }
+         program { name: "unfocused";
+            //signal: "elm,action,unfocus";
+            //source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "button_image";
+            after: "unfocus_text";
+         }
+         program { name: "unfocus_text";
+            action: STATE_SET "visible" 0.0;
+            target: "elm.text";
+         }
+      }
+   }
+
+///////////////////////////////////////////////////////////////////////////////////////
+   group { name: "elm/button/base/video/naviframe/back_btn/default";
+       alias: "elm/button/base/video/naviframe/prev_btn/default";
+       alias: "elm/button/base/video/naviframe/end_btn/default";
+       //TODO: Remove this alias later
+       alias: "elm/button/base/video/navigationbar_prev_btn/default";
+       alias: "elm/button/base/video/navigationbar_backbutton/default";
+       alias: "elm/button/base/video/navigationbar_end_btn/default";
+       images {
+         image: "T01_btn_prev.png" COMP;
+
+      }
+      parts {
+         part { name: "button_image";
+            type: RECT;
+            mouse_events: 1;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: BUTTON_NAVIBAR_BACK_BUTTON_BUTTON_IMAGE_MIN_INC;
+               color: 0 0 0 0;
+            }
+            description {
+               state: "clicked" 0.0;
+               inherit: "default" 0.0;
+            }
+            description {
+               state: "disabled" 0.0;
+               inherit: "default" 0.0;
+            }
+         }
+         part {name: "padding_right";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               align: 1 0;
+               min: 1 0;
+               rel1 { relative: 1 0.2; }
+               rel2 { relative: 1 0.8; }
+               fixed: 1 0;
+               color: NAVIBAR_TITLE_RIGHT_SEPARATOR_COLOR_INC;
+            }
+         }
+         part {name: "padding_before_right";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               align: 1 0;
+               min: 1 0;
+               rel1 { relative: 0 0; to: "padding_right"; }
+               rel2 { relative: 0 1; to: "padding_right"; }
+               fixed: 1 0;
+               color: NAVIBAR_TITLE_LEFT_SEPARATOR_COLOR_INC;
+            }
+         }
+         part { name: "button_center_part";
+            mouse_events: 0;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: BUTTON_NAVIBAR_BACK_BUTTON_BG_MIN_MAX_INC;
+               max: BUTTON_NAVIBAR_BACK_BUTTON_BG_MIN_MAX_INC;
+               align: 0.5 0.5;
+               rel2 { relative: 0 1; to_x: "padding_before_right"; }
+               image {
+                  normal: "T01_btn_prev.png";
+               }
+            }
+            description {
+               state: "clicked" 0.0;
+               inherit: "default" 0.0;
+               image.normal: "T01_btn_prev.png";
+            }
+         }
+         part { name: "over1";
+            type: RECT;
+            mouse_events: 1;
+            repeat_events: 1;
+            ignore_flags: ON_HOLD;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+            }
+         }
+         part { name: "over2";
+            mouse_events: 1;
+            repeat_events: 1;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+            }
+         }
+         part { name: "disabler";
+            type: RECT;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+               visible: 0;
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+            }
+         }
+      }
+      programs {
+         program { name: "button_click";
+            signal: "mouse,down,1";
+            source: "over1";
+            action: SIGNAL_EMIT "elm,action,press" "";
+            after: "button_click_anim";
+         }
+         program { name: "button_click_anim";
+            action: STATE_SET "clicked" 0.0;
+            target: "button_image";
+            target: "button_center_part";
+         }
+         program { name: "button_unclick";
+            signal: "mouse,up,1";
+            source: "over2";
+            action: SIGNAL_EMIT "elm,action,unpress" "";
+            after: "button_unclick_anim";
+         }
+         program { name: "button_unclick_anim";
+            action: STATE_SET "default" 0.0;
+            target: "button_image";
+            target: "button_center_part";
+         }
+         program { name: "button_unclick2";
+            signal: "mouse,clicked,1";
+            source: "over1";
+            action: SIGNAL_EMIT "elm,action,click" "";
+         }
+         program { name: "disable";
+            signal: "elm,state,disabled";
+            source: "elm";
+            action: STATE_SET "disabled" 0.0;
+            target: "disabler";
+            target: "button_image";
+         }
+         program { name: "enable";
+            signal: "elm,state,enabled";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "disabler";
+            target: "button_image";
+         }
+      }
+   }
+
+///////////////////////////////////////////////////////////////////////////////////////
+   group { name: "elm/button/base/naviframe_control/multiline";
+      alias: "elm/button/base/video/navigationbar_control/multiline";
+      script {
+         public button_state = BUTTON_STATE_ENABLED;
+      }
+      images.image: "T01_title_btn.png" COMP;
+      images.image: "T01_title_btn_press.png" COMP;
+      styles{
+         style { name: "btn_multiline_navigationbar_controlbar_style";
+            base: "font=SLP:style=Medium font_size="BUTTON_NAVIBAR_MULTILINE_TEXT_FONT_SIZE_INC" align=center color=#ffffff wrap=mixed";
+            tag: "br" "\n";
+            tag: "ps" "ps";
+            tag: "tab" "\t";
+         }
+      }
+      parts {
+         part { name: "button_image";
+            type: IMAGE;
+            mouse_events: 1;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: BUTTON_NAVIBAR_CENTER_BG_NORMAL_MIN_W_INC BUTTON_NAVIBAR_CENTER_BG_NORMAL_MIN_H_INC;
+               rel1.offset: 0 0;
+               rel2.offset: -1 -1;
+               image.normal: "T01_title_btn.png";
+               image.border: BUTTON_NAVIBAR_CENTER_BG_NORMAL_BORDER_INC;
+               color: 255 255 255 255;
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+               image.normal: "T01_title_btn.png";
+            }
+            description { state: "clicked" 0.0;
+               inherit: "default" 0.0;
+               image.normal: "T01_title_btn_press.png";
+            }
+         }
+         part {
+            name: "padding_left_top";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               align: 0.0 0.0;
+               rel1 {
+                  relative: 0.0 0.0;
+               }
+               rel2 {
+                  relative: 0.0 0.0;
+               }
+               min: BUTTON_NAVIBAR_CENTER_PADDING_MIN_MAX_INC;
+               fixed: 1 1;
+               visible: 0;
+            }
+         }
+         part {
+            name: "padding_right_bottom";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               align: 1.0 1.0;
+               rel1.relative: 1.0 1.0;
+               rel2.relative: 1.0 1.0;
+               min: BUTTON_NAVIBAR_CENTER_PADDING_MIN_MAX_INC;
+               fixed: 1 1;
+               visible: 0;
+            }
+         }
+         part {
+            name: "icon_rect";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               visible: 0;
+               min: 0 0;
+               fixed: 1 0;
+               rel1 {
+                  relative: 0.0 1.0;
+                  to_x: "elm.swallow.content";
+                  to_y: "padding_left_top";
+               }
+               rel2 {
+                  relative: 1.0 0.0;
+                  to_x: "elm.swallow.content";
+                  to_y: "padding_right_bottom";
+               }
+               align: 0.0 0.5;
+            }
+         }
+         part {
+            name: "padding_icon_text";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0; //when only icon or no icon is there
+               visible: 0;
+               align: 0.0 0.0;
+               rel1 {
+                  relative: 1.0 0.0;
+                  to: "icon_rect";
+               }
+               rel2 {
+                  relative: 1.0 1.0;
+                  to: "icon_rect";
+               }
+               fixed: 1 0;
+               min: 0 0;
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               min: BUTTON_NAVIBAR_CENTER_PADDING_AFTER_ICON_VISIBLE_MIN_INC;
+               rel1 {
+                  relative: 1.0 0.0;
+                  to: "icon_rect";
+               }
+               rel2 {
+                  relative: 1.0 1.0;
+                  to: "icon_rect";
+               }
+           }
+            description { state: "icononly" 0.0;
+               inherit: "default" 0.0;
+            }
+         }
+         part { name: "elm.swallow.content";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "clipper";
+            description { state: "default" 0.0;
+               visible: 0;
+               align: 0.0 0.5;
+               rel1 {
+                  relative: 1.0 1.0;
+                  to: "padding_left_top";
+               }
+               rel2 {
+                  relative: 1.0 0.0;
+                  to_x: "padding_left_top";
+                  to_y: "padding_right_bottom";
+               }
+               fixed: 1 0;
+            }
+            description { state: "visible" 0.0;
+               fixed: 1 0;
+               visible: 1;
+               min: BUTTON_NAVIBAR_CENTER_SWALLOW_VISIBLE_MIN_MAX_INC;
+               max: BUTTON_NAVIBAR_CENTER_SWALLOW_VISIBLE_MIN_MAX_INC;
+               align: 0.0 0.5;
+               rel1 {
+                  relative: 1.0 1.0;
+                  to: "padding_left_top";
+               }
+               rel2 {
+                  relative: 0.0 0.0;
+                  to_x: "padding_left_top";
+                  to_y: "padding_right_bottom";
+               }
+            }
+            description { state: "icononly" 0.0;
+               visible: 1;
+               min: BUTTON_NAVIBAR_CENTER_SWALLOW_ICONONLY_MIN_MAX_INC;
+               max: BUTTON_NAVIBAR_CENTER_SWALLOW_ICONONLY_MIN_MAX_INC;
+               rel1 {
+                  relative: 1.0 1.0;
+                  to: "padding_left_top";
+               }
+               rel2 {
+                  relative: 0.0 0.0;
+                  to: "padding_right_bottom";
+               }
+               align: 0.5 0.5;
+            }
+         }
+         part { name: "elm.text";
+            type: TEXTBLOCK;
+            mouse_events: 0;
+            scale: 1;
+            clip_to: "clipper";
+            description { state: "default" 0.0;
+               visible: 0;
+               rel1 {
+                  relative: 1.0 1.0;
+                  to_x: "padding_icon_text";
+                  to_y: "padding_left_top";
+               }
+               rel2 {
+                   relative: 0.0 0.0;
+                   to: "padding_right_bottom";
+               }
+               align: 0.5 0.5;
+               color: 255 255 255 255;
+               text {
+                  style: "btn_multiline_navigationbar_controlbar_style";
+                  min: 0 0;
+                  max: 0 1;
+               }
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+               min: 80 0;
+            }
+            description { state: "clicked" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+               min: 0 0;
+            }
+            description { state: "focused" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+               min: 0 0;
+               color: 255 255 255 255;
+            }
+         }
+         part { name: "over2";
+            type: RECT;
+            mouse_events: 1;
+            repeat_events: 1;
+            ignore_flags: ON_HOLD;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+            }
+         }
+         part { name: "over3";
+            type: RECT;
+            mouse_events: 1;
+            repeat_events: 1;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+            }
+         }
+         part { name: "clipper";
+            type: RECT;
+            description { state: "default" 0.0;
+               color: 255 255 255 255;
+            }
+            description { state: "disabled" 0.0;
+               color: 255 255 255 127;
+            }
+         }
+         part { name: "disabler";
+            type: RECT;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+               visible: 0;
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+            }
+         }
+      }
+      programs {
+         program { name: "button_click";
+            signal: "mouse,down,1";
+            source: "over2";
+            action: SIGNAL_EMIT "elm,action,press" "";
+            after: "button_click_anim";
+         }
+         program { name: "button_click_anim";
+            action: STATE_SET "clicked" 0.0;
+            target: "button_image";
+            after: "text_clicked";
+         }
+         program { name: "text_clicked";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.text", st, 30, vl);
+               if (!strcmp(st, "visible"))
+                 set_state(PART:"elm.text", "clicked", 0.0);
+            }
+         }
+         program { name: "button_unpress";
+            action: SIGNAL_EMIT "elm,action,unpress" "";
+         }
+         program { name: "button_mouseout_clicked";
+            signal: "mouse,up,1";
+            source: "over3";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.swallow.content", st, 30, vl);
+               if (strcmp(st, "icononly"))
+                 {
+                    emit("elm,action,default,text,set", "");
+                    set_state(PART:"elm.text", "visible", 0.0);
+                 }
+               if(get_int(button_state) != BUTTON_STATE_DISABLED)
+                 set_state(PART:"button_image", "default", 0.0);
+            }
+            after: button_unpress;
+         }
+         program { name: "button_unclick3";
+            signal: "mouse,clicked,1";
+            source: "over2";
+            action: SIGNAL_EMIT "elm,action,click" "";
+         }
+         program { name: "text_show";
+            signal: "elm,state,text,visible";
+            source: "elm";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.swallow.content", st, 30, vl);
+               if (!strcmp(st, "icononly"))
+                 {
+                    set_state(PART:"elm.swallow.content", "visible", 0.0);
+                    set_state(PART:"padding_icon_text", "visible", 0.0);
+                 }
+               set_state(PART:"elm.text", "visible", 0.0);
+            }
+         }
+         program { name: "text_hide";
+            signal: "elm,state,text,hidden";
+            source: "elm";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.swallow.content", st, 30, vl);
+               if (!strcmp(st, "visible"))
+                 {
+                    set_state(PART:"elm.swallow.content", "icononly", 0.0);
+                    set_state(PART:"padding_icon_text", "icononly", 0.0);
+                 }
+               set_state(PART:"elm.text", "default", 0.0);
+            }
+         }
+         program { name: "icon_show";
+            signal: "elm,state,icon,visible";
+            source: "elm";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.text", st, 30, vl);
+               if (!strcmp(st, "visible"))
+                 {
+                    set_state(PART:"elm.swallow.content", "visible", 0.0);
+                    set_state(PART:"padding_icon_text", "visible", 0.0);
+                 }
+               else
+                 {
+                    set_state(PART:"elm.swallow.content", "icononly", 0.0);
+                    set_state(PART:"padding_icon_text", "icononly", 0.0);
+                 }
+            }
+         }
+         program { name: "icon_hide";
+            signal: "elm,state,icon,hidden";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "elm.swallow.content";
+            target: "padding_icon_text";
+         }
+         program { name: "disable";
+            signal: "elm,state,disabled";
+            source: "elm";
+            action: STATE_SET "disabled" 0.0;
+            target: "button_image";
+            target: "clipper";
+            target: "disabler";
+            after: "disable_text";
+         }
+         program { name: "disable_text";
+            script {
+               set_int(button_state, BUTTON_STATE_DISABLED);
+               set_state(PART:"elm.text", "visible", 0.0);
+            }
+         }
+         program { name: "enable";
+            signal: "elm,state,enabled";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "button_image";
+            target: "clipper";
+            target: "disabler";
+            after: "enable_text";
+         }
+         program { name: "enable_text";
+            script {
+               set_int(button_state, BUTTON_STATE_ENABLED);
+               set_state(PART:"elm.text", "visible", 0.0);
+            }
+         }
+         program { name: "focused";
+            action: STATE_SET "focused" 0.0;
+            target: "button_image";
+            target: "elm.text";
+         }
+         program { name: "unfocused";
+            action: STATE_SET "default" 0.0;
+            target: "button_image";
+            after: "unfocus_text";
+         }
+         program { name: "unfocus_text";
+            action: STATE_SET "visible" 0.0;
+            target: "elm.text";
+         }
+      }
+   }
diff --git a/res/edc/vp-check.edc b/res/edc/vp-check.edc
new file mode 100755 (executable)
index 0000000..a0ab5f5
--- /dev/null
@@ -0,0 +1,1318 @@
+#define CHECK_STYLE_DEFAULT_BG_NORMAL_MIN_MAX_INC 42 42
+
+#define CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC        255 255 255 255
+#define CHECK_DEFAULT_TEXT_PRESSED_COLOR_INC      255 255 255 255
+#define CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC          136 136 136 136
+
+//////////////////////////////////////////////////////////
+//
+#define        GALLERY_EDC_IMAGE_CHECK_BG "T01_checkbox.png"
+#define        GALLERY_EDC_IMAGE_CHECK_BG_DIM "00_check_bg_dim.png"
+#define        GALLERY_EDC_IMAGE_CHECK_BG_CHECKING "T01_check.png"
+#define GALLERY_EDC_IMAGE_CHECK_ALBUM_BG "T01_checkbox.png"
+#define GALLERY_EDC_IMAGE_CHECK_GRID "T01_grid_select_check.png"
+#define GALLERY_EDC_IMAGE_CHECK_PINCH_GRID "00_grid_select_check.png"
+
+// Grid item background size W: 14+158+6; H: 24+158
+#define W               178
+#define H               182
+
+// Gap between bg and icon
+#define GAP_BG_L         14
+#define GAP_BG_R         6
+#define GAP_BG_T         24
+
+// Gap between icon and shadow
+#define GAP_ICON_L         3
+#define GAP_ICON_R         3
+#define GAP_ICON_T         0
+#define GAP_ICON_B         4
+
+// Shadow image size
+#define SHADOW_W               (W-GAP_BG_L-GAP_BG_R+GAP_ICON_L+GAP_ICON_R)
+#define SHADOW_H               (H-GAP_BG_T+GAP_ICON_B)
+
+// Gap between bg and shadow
+#define GAP_SHADOW_L         (GAP_BG_L-GAP_ICON_L)
+#define GAP_SHADOW_R         (GAP_BG_R-GAP_ICON_R)
+#define GAP_SHADOW_T         (GAP_BG_T-GAP_ICON_T)
+#define GAP_SHADOW_B         (0+GAP_ICON_B)
+
+
+
+#define ZOOMED_W               116 //6+104+6
+#define ZOOMED_H               110 //6+104
+
+#define ZOOMED_GAP_L         6
+#define ZOOMED_GAP_R         6
+#define ZOOMED_GAP_T         6
+#define ZOOMED_GAP_B         0
+//
+//////////////////////////////////////////////////////////
+
+////////////////////////////////////////////////////////////////////////////////////////
+//
+// check default textblock style
+//
+///////////////////////////////////////////////////////////////////////////////////////
+       styles {
+               style { name: "check_label_textblock_style";
+                       base: "font=HelveticaNeue:style=Roman font_size=32 color=#ffffff wrap=char";
+                       tag: "br" "\n";
+                       tag: "ps" "ps";
+                       tag: "hilight" "+ font=HelveticaNeue:style=Bold";
+                       tag: "b" "+ font=HelveticaNeue:style=Bold";
+                       tag: "whitecolor" "+ color=#ffffff";
+                       tag: "tab" "\t";
+               }
+       }
+
+#define CHECK_STATE_DEFAULT 0
+#define CHECK_STATE_VISIBLE 1
+#define CHECK_STATE_DISABLED_VISIBLE 2
+#define CHECK_STATE_DISABLED 3
+
+////////////////////////////////////////////////////////////////////////////////
+#define CHECK_STYLE_DEFAULT(style_name, image_bg, image_checking, min_width, min_height) \
+ group { name: "elm/check/base/"style_name; \
+      images { \
+         image: image_bg COMP; \
+         image: GALLERY_EDC_IMAGE_CHECK_BG_DIM COMP; \
+         image: image_checking COMP; \
+      } \
+      script { \
+         public check_state = CHECK_STATE_DEFAULT; \
+      } \
+      parts { \
+         part { name: "back_bg"; \
+            type: RECT; \
+            scale: 1; \
+            description { state: "default" 0.0; \
+               rel2.relative: 0.0 1.0; \
+               align: 0 0.5; \
+               min: min_width min_height; \
+               fixed: 1 0; \
+               color: 0 0 0 0; \
+            } \
+         } \
+         part { name: "bg"; \
+            mouse_events: 0; \
+            scale: 1; \
+            description { state: "default" 0.0; \
+               min: CHECK_STYLE_DEFAULT_BG_NORMAL_MIN_MAX_INC; \
+               max: CHECK_STYLE_DEFAULT_BG_NORMAL_MIN_MAX_INC; \
+               fixed: 1 1; \
+               rel1.to: "back_bg"; \
+               rel2.to: "back_bg"; \
+               image.normal: image_bg; \
+               fill.smooth : 0; \
+            } \
+            description { state: "disabled" 0.0; \
+               inherit: "default" 0.0; \
+               image.normal: GALLERY_EDC_IMAGE_CHECK_BG_DIM; \
+               fill.smooth : 0; \
+            } \
+         } \
+         part { name: "check"; \
+            mouse_events: 0; \
+            scale: 1; \
+            description { state: "default" 0.0; \
+               rel1.to: "bg"; \
+               rel2.to: "bg"; \
+               visible: 0; \
+               image.normal: image_checking; \
+            } \
+            description { state: "visible" 0.0; \
+               inherit: "default" 0.0; \
+               visible: 1; \
+            } \
+            description { state: "disabled_visible" 0.0; \
+               inherit: "default" 0.0; \
+               visible: 1; \
+            } \
+         } \
+         part { name: "elm.swallow.content"; \
+            type: SWALLOW; \
+            description { state: "default" 0.0; \
+               fixed: 1 0; \
+               visible: 0; \
+               color: 255 255 255 255; \
+               align: 0.0 0.5; \
+               rel1 { \
+                  to_x: "bg"; \
+                  relative: 1.0 0.0; \
+                  offset: 1 1; \
+               } \
+               rel2 { \
+                  to_x: "bg"; \
+                  relative: 1.0 1.0; \
+                  offset: 2 -2; \
+               } \
+            } \
+            description { state: "visible" 0.0; \
+               inherit: "default" 0.0; \
+               fixed: 1 1; \
+               visible: 1; \
+               aspect: 1.0 1.0; \
+               aspect_preference: VERTICAL; \
+            } \
+            description { state: "disabled" 0.0; \
+               inherit: "default" 0.0; \
+               color: 128 128 128 128; \
+            } \
+            description { state: "disabled_visible" 0.0; \
+               inherit: "default" 0.0; \
+               color: 128 128 128 128; \
+               fixed: 1 1; \
+               visible: 1; \
+               aspect: 1.0 1.0; \
+            } \
+         } \
+         part { name: "elm.text"; \
+            type: TEXTBLOCK; \
+            mouse_events: 0; \
+            scale: 1; \
+            description { state: "default" 0.0; \
+               visible: 0; \
+               fixed: 0 1; \
+               rel1 { \
+                  relative: 1.0 0.5; \
+                  offset: 1 1; \
+                  to_x: "elm.swallow.content"; \
+               } \
+               rel2 { \
+                  relative: 1.0 0.5; \
+                  offset: -2 -2; \
+               } \
+               align: 0.0 0.5; \
+               text { \
+                  style: "check_label_textblock_style"; \
+                  min: 0 0; \
+               } \
+               color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC; \
+            } \
+            description { state: "visible" 0.0; \
+               inherit: "default" 0.0; \
+               visible: 1; \
+               text.min: 1 1; \
+            } \
+            description { state: "disabled" 0.0; \
+               inherit: "default" 0.0; \
+            } \
+            description { state: "disabled_visible" 0.0; \
+               inherit: "default" 0.0; \
+               visible: 1; \
+               text.min: 1 1; \
+               color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC; \
+            } \
+         } \
+         part { name: "events1"; \
+            type: RECT; \
+            ignore_flags: ON_HOLD; \
+            description { state: "default" 0.0; \
+               color: 0 0 0 0; \
+            } \
+         } \
+         part { name: "events2"; \
+            type: RECT; \
+            repeat_events: 1; \
+            description { state: "default" 0.0; \
+               color: 0 0 0 0; \
+            } \
+         } \
+         part { name: "disabler"; \
+            type: RECT; \
+            description { state: "default" 0.0; \
+               color: 0 0 0 0; \
+               visible: 0; \
+            } \
+            description { state: "disabled" 0.0; \
+               inherit: "default" 0.0; \
+               visible: 1; \
+            } \
+         } \
+      } \
+      programs { \
+         program { name: "click"; \
+            signal: "mouse,clicked,1"; \
+            source: "events1"; \
+            action: SIGNAL_EMIT "elm,action,check,toggle" ""; \
+         } \
+         program { name: "check_on"; \
+            signal: "elm,state,check,on"; \
+            source: "elm"; \
+            script { \
+               set_int(check_state, CHECK_STATE_VISIBLE); \
+               set_state(PART:"check", "visible", 0.0); \
+            } \
+         } \
+         program { name: "check_off"; \
+            signal: "elm,state,check,off"; \
+            source: "elm"; \
+            action: STATE_SET "default" 0.0; \
+            target: "check"; \
+            script { \
+               if (get_int(check_state) == CHECK_STATE_VISIBLE) \
+                 { \
+                    set_int(check_state, CHECK_STATE_DEFAULT); \
+                    set_state(PART:"check", "default", 0.0); \
+                 } \
+            } \
+         } \
+         program { name: "text_show"; \
+            signal: "elm,state,text,visible"; \
+            source: "elm"; \
+            action: STATE_SET "visible" 0.0; \
+            target: "elm.text"; \
+         } \
+         program { name: "text_hide"; \
+            signal: "elm,state,text,hidden"; \
+            source: "elm"; \
+            action: STATE_SET "default" 0.0; \
+            target: "elm.text"; \
+         } \
+         program { name: "icon_show"; \
+            signal: "elm,state,icon,visible"; \
+            source: "elm"; \
+            action: STATE_SET "visible" 0.0; \
+            target: "elm.swallow.content"; \
+         } \
+         program { name: "icon_hide"; \
+            signal: "elm,state,icon,hidden"; \
+            source: "elm"; \
+            action: STATE_SET "default" 0.0; \
+            target: "elm.swallow.content"; \
+         } \
+         program { name: "disable"; \
+            signal: "elm,state,disabled"; \
+            source: "elm"; \
+            action: STATE_SET "disabled" 0.0; \
+            target: "disabler"; \
+            target: "bg"; \
+            after: "disable_text"; \
+         } \
+         program { name: "disable_text"; \
+            script { \
+               new st[31]; \
+               new Float:vl; \
+               get_state(PART:"elm.text", st, 30, vl); \
+               if (!strcmp(st, "visible")) \
+                 set_state(PART:"elm.text", "disabled_visible", 0.0); \
+               else \
+                 set_state(PART:"elm.text", "disabled", 0.0); \
+               get_state(PART:"elm.swallow.content", st, 30, vl); \
+               if (!strcmp(st, "visible")) \
+                 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0); \
+               else \
+                 set_state(PART:"elm.swallow.content", "disabled", 0.0); \
+               get_state(PART:"check", st, 30, vl); \
+               if (!strcmp(st, "visible")) \
+                 { \
+                    set_state(PART:"check", "disabled_visible", 0.0); \
+                    set_int(check_state, CHECK_STATE_DISABLED_VISIBLE); \
+                 } \
+            } \
+         } \
+         program { name: "enable"; \
+            signal: "elm,state,enabled"; \
+            source: "elm"; \
+            action: STATE_SET "default" 0.0; \
+            target: "disabler"; \
+            target: "bg"; \
+            after: "enable_text"; \
+         } \
+         program { name: "enable_text"; \
+            script { \
+               new st[31]; \
+               new Float:vl; \
+               get_state(PART:"elm.text", st, 30, vl); \
+               if (!strcmp(st, "disabled_visible")) \
+                 set_state(PART:"elm.text", "visible", 0.0); \
+               else \
+                 set_state(PART:"elm.text", "default", 0.0); \
+               get_state(PART:"elm.swallow.content", st, 30, vl); \
+               if (!strcmp(st, "visible")) \
+                 set_state(PART:"elm.swallow.content", "visible", 0.0); \
+               else \
+                 set_state(PART:"elm.swallow.content", "default", 0.0); \
+               get_state(PART:"check", st, 30, vl); \
+               if (!strcmp(st, "disabled_visible")) \
+                 { \
+                    set_state(PART:"check", "visible", 0.0); \
+                    set_int(check_state, CHECK_STATE_VISIBLE); \
+                 } \
+               else \
+                 set_int(check_state, CHECK_STATE_DEFAULT); \
+            } \
+         } \
+      } \
+   }
+
+////////////////////////////////////////////////////////////////////////////////
+       CHECK_STYLE_DEFAULT("gallery/default", GALLERY_EDC_IMAGE_CHECK_BG, GALLERY_EDC_IMAGE_CHECK_BG_CHECKING, 42, 42)
+
+////////////////////////////////////////////////////////////////////////////////
+       CHECK_STYLE_DEFAULT("gallery/album", GALLERY_EDC_IMAGE_CHECK_ALBUM_BG, GALLERY_EDC_IMAGE_CHECK_BG_CHECKING, 42, 42)
+
+////////////////////////////////////////////////////////////////////////////////
+#define CHECK_STYLE_GRID(style_name, image_grid, width, height) \
+   group { name: "elm/check/base/"style_name; \
+      images.image: image_grid COMP; \
+      parts { \
+         part { name: "bg"; \
+            type: RECT; \
+            scale: 1; \
+            description { state: "default" 0.0; \
+               color: 0 0 0 0; \
+            } \
+            description { state: "pressed" 0.0; \
+               inherit: "default" 0.0; \
+            } \
+            description { state: "disabled" 0.0; \
+               inherit: "default" 0.0; \
+               visible: 0; \
+            } \
+         } \
+               part { name: "icon_bg_img"; \
+                       type: RECT; \
+                       mouse_events: 0; \
+                       scale : 1; \
+                       description { \
+                               color: 0 0 0 0; \
+                               rel1 { relative: GAP_SHADOW_L/W GAP_SHADOW_T/H; to: "bg"; } \
+                               rel2 { relative: (W-GAP_SHADOW_R-1)/W (H+GAP_SHADOW_B-1)/H; to: "bg"; } \
+                       } \
+               } \
+               part { name: "icon_bg"; \
+                       type: RECT; \
+                       description { state: "default" 0.0; \
+                               color: 0 0 0 0; \
+                               rel1 { relative: GAP_ICON_L/SHADOW_W GAP_ICON_T/SHADOW_H; to: "icon_bg_img"; } \
+                               rel2 { relative: (SHADOW_W-GAP_ICON_R+2)/SHADOW_W (SHADOW_H-GAP_ICON_B+1)/SHADOW_H; to: "icon_bg_img"; } \
+                       } \
+               } \
+         part { name: "bg2"; \
+            type: RECT; \
+            mouse_events: 0; \
+            scale: 1; \
+            description { state: "default" 0.0; \
+               rel1.to: "icon_bg"; \
+               rel2.to: "icon_bg"; \
+               align: 0.5 0.5; \
+               min: width height; \
+               max: width height; \
+               color:  0 0 0 0; \
+            } \
+            description { state: "pressed" 0.0; \
+               inherit: "default" 0.0; \
+            } \
+            description { state: "disabled" 0.0; \
+               inherit: "default" 0.0; \
+               visible: 0; \
+            } \
+         } \
+         part { name: "selected_bg"; \
+            type: RECT; \
+            scale: 1; \
+            description { state: "default" 0.0; \
+               rel1.to: "icon_bg"; \
+               rel2.to: "icon_bg"; \
+               color: 0 0 0 0; \
+               visible: 0; \
+            } \
+            description { state: "visible" 0.0; \
+               inherit: "default" 0.0; \
+               color: 0 0 0 153; \
+               visible: 1; \
+            } \
+         } \
+         part { name: "check"; \
+            mouse_events: 0; \
+            scale: 1; \
+            description { state: "default" 0.0; \
+               rel1.to: "bg2"; \
+               rel2.to: "bg2"; \
+               visible: 0; \
+               image.normal: image_grid; \
+            } \
+            description { state: "visible" 0.0; \
+               inherit: "default" 0.0; \
+               visible: 1; \
+            } \
+            description { state: "pressed" 0.0; \
+               inherit: "default" 0.0; \
+               visible: 1; \
+            } \
+            description { state: "disabled_visible" 0.0; \
+               inherit: "default" 0.0; \
+               visible: 1; \
+            } \
+         } \
+         part { name: "elm.swallow.content"; \
+            type: SWALLOW; \
+            description { \
+               state: "default" 0.0; \
+               fixed: 1 0; \
+               visible: 0; \
+               color: 255 255 255 255; \
+               align: 0.0 0.5; \
+               rel1 { \
+                  to_x: "bg2"; \
+                  relative: 1.0 0.0; \
+                  offset: 1 1; \
+               } \
+               rel2 { \
+                  to_x: "bg2"; \
+                  relative: 1.0 1.0; \
+                  offset: 2 -2; \
+               } \
+            } \
+            description { state: "visible" 0.0; \
+               inherit: "default" 0.0; \
+               fixed: 1 1; \
+               visible: 1; \
+               aspect: 1.0 1.0; \
+               aspect_preference: VERTICAL; \
+            } \
+            description { state: "disabled" 0.0; \
+               inherit: "default" 0.0; \
+               color: 128 128 128 128; \
+            } \
+            description { state: "disabled_visible" 0.0; \
+               inherit: "default" 0.0; \
+               color: 128 128 128 128; \
+               fixed: 1 1; \
+               visible: 1; \
+               aspect: 1.0 1.0; \
+            } \
+         } \
+         part { name: "elm.text"; \
+            type: TEXTBLOCK; \
+            mouse_events: 0; \
+            scale: 1; \
+            description { state: "default" 0.0; \
+               visible: 0; \
+               fixed: 0 1; \
+               rel1 { \
+                  relative: 1.0 0.5; \
+                  offset: 1 1; \
+                  to_x: "elm.swallow.content"; \
+               } \
+               rel2 { \
+                  relative: 1.0 0.5; \
+                  offset: -2 -2; \
+               } \
+               color: 255 255 255 255; \
+               align: 0.0 0.5; \
+               text { \
+                  style: "check_label_textblock_style"; \
+                  min: 0 0; \
+               } \
+               color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC; \
+            } \
+            description { state: "visible" 0.0; \
+               inherit: "default" 0.0; \
+               visible: 1; \
+               text.min: 1 1; \
+            } \
+            description { state: "disabled" 0.0; \
+               inherit: "default" 0.0; \
+            } \
+            description { state: "disabled_visible" 0.0; \
+               inherit: "default" 0.0; \
+               visible: 1; \
+               text.min: 1 1; \
+               color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC; \
+            } \
+         } \
+         part { name: "events"; \
+            type: RECT; \
+            ignore_flags: ON_HOLD; \
+            description { state: "default" 0.0; \
+               color: 0 0 0 0; \
+            } \
+         } \
+         part { name: "disabler"; \
+            type: RECT; \
+            description { state: "default" 0.0; \
+               color: 0 0 0 0; \
+               visible: 0; \
+            } \
+            description { state: "disabled" 0.0; \
+               inherit: "default" 0.0; \
+               visible: 1; \
+            } \
+         } \
+      } \
+      programs { \
+         program { name: "click"; \
+            signal: "mouse,up,1"; \
+            source: "events"; \
+            action: SIGNAL_EMIT "elm,action,check,toggle" ""; \
+            after: "bg_normal"; \
+         } \
+         program { name: "bg_normal"; \
+            script { \
+               set_state(PART:"bg", "default", 0.0); \
+               set_state(PART:"bg2", "default", 0.0); \
+            } \
+         } \
+         program { name: "mouseout"; \
+            signal: "mouse,out"; \
+            source: "events"; \
+            after: "bg_check_normal"; \
+         } \
+         program { name: "bg_check_normal"; \
+            script { \
+               new st[31]; \
+               new Float:vl; \
+               get_state(PART:"check", st, 30, vl); \
+               if (!strcmp(st, "pressed")) \
+                 set_state(PART:"check", "visible", 0.0); \
+               set_state(PART:"bg", "default", 0.0); \
+               set_state(PART:"bg2", "default", 0.0); \
+            } \
+         } \
+         program { name: "pressed"; \
+            signal: "mouse,down,1"; \
+            source: "events"; \
+            script { \
+               new st[31]; \
+               new Float:vl; \
+               get_state(PART:"check", st, 30, vl); \
+               if (!strcmp(st, "visible")) \
+                 set_state(PART:"check", "pressed", 0.0); \
+               set_state(PART:"bg", "pressed", 0.0); \
+               set_state(PART:"bg2", "pressed", 0.0); \
+            } \
+         } \
+         program { name: "check_on"; \
+            signal: "elm,state,check,on"; \
+            source: "elm"; \
+            action: STATE_SET "visible" 0.0; \
+            target: "check"; \
+            target: "selected_bg"; \
+         } \
+         program { name: "check_off"; \
+            signal: "elm,state,check,off"; \
+            source: "elm"; \
+            action: STATE_SET "default" 0.0; \
+            target: "check"; \
+            target: "selected_bg"; \
+         } \
+         program { name: "text_show"; \
+            signal: "elm,state,text,visible"; \
+            source: "elm"; \
+            action: STATE_SET "visible" 0.0; \
+            target: "elm.text"; \
+         } \
+         program { name: "text_hide"; \
+            signal: "elm,state,text,hidden"; \
+            source: "elm"; \
+            action: STATE_SET "default" 0.0; \
+            target: "elm.text"; \
+         } \
+         program { name: "icon_show"; \
+            signal: "elm,state,icon,visible"; \
+            source: "elm"; \
+            action: STATE_SET "visible" 0.0; \
+            target: "elm.swallow.content"; \
+         } \
+         program { name: "icon_hide"; \
+            signal: "elm,state,icon,hidden"; \
+            source: "elm"; \
+            action: STATE_SET "default" 0.0; \
+            target: "elm.swallow.content"; \
+         } \
+         program { name: "disable"; \
+            signal: "elm,state,disabled"; \
+            source: "elm"; \
+            action: STATE_SET "disabled" 0.0; \
+            target: "disabler"; \
+            target: "bg"; \
+            target: "bg2"; \
+            after: "disable_text"; \
+         } \
+         program { name: "disable_text"; \
+            script { \
+               new st[31]; \
+               new Float:vl; \
+               get_state(PART:"elm.text", st, 30, vl); \
+               if (!strcmp(st, "visible")) \
+                 set_state(PART:"elm.text", "disabled_visible", 0.0); \
+               else \
+                 set_state(PART:"elm.text", "disabled", 0.0); \
+               get_state(PART:"elm.swallow.content", st, 30, vl); \
+               if (!strcmp(st, "visible")) \
+                 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0); \
+               else \
+                 set_state(PART:"elm.swallow.content", "disabled", 0.0); \
+               get_state(PART:"check", st, 30, vl); \
+               if (!strcmp(st, "visible")) \
+                 set_state(PART:"check", "disabled_visible", 0.0); \
+            } \
+         } \
+         program { name: "enable"; \
+            signal: "elm,state,enabled"; \
+            source: "elm"; \
+            action: STATE_SET "default" 0.0; \
+            target: "disabler"; \
+            target: "bg"; \
+            target: "bg2"; \
+            after: "enable_text"; \
+         } \
+         program { name: "enable_text"; \
+            script { \
+               new st[31]; \
+               new Float:vl; \
+               get_state(PART:"elm.text", st, 30, vl); \
+               if (!strcmp(st, "disabled_visible")) \
+                 set_state(PART:"elm.text", "visible", 0.0); \
+               else \
+                 set_state(PART:"elm.text", "default", 0.0); \
+               get_state(PART:"elm.swallow.content", st, 30, vl); \
+               if (!strcmp(st, "visible")) \
+                 set_state(PART:"elm.swallow.content", "visible", 0.0); \
+               else \
+                 set_state(PART:"elm.swallow.content", "default", 0.0); \
+               get_state(PART:"check", st, 30, vl); \
+               if (!strcmp(st, "disabled_visible")) \
+                 set_state(PART:"check", "visible", 0.0); \
+            } \
+         } \
+      } \
+   }
+
+////////////////////////////////////////////////////////////////////////////////
+       CHECK_STYLE_GRID("gallery/grid", GALLERY_EDC_IMAGE_CHECK_GRID, 64, 64)
+
+////////////////////////////////////////////////////////////////////////////////
+   group { name: "elm/check/base/gallery/pinch/grid";
+      images.image: GALLERY_EDC_IMAGE_CHECK_PINCH_GRID COMP;
+      parts {
+         part { name: "bg";
+            type: RECT;
+            scale: 1;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+            }
+            description { state: "pressed" 0.0;
+               inherit: "default" 0.0;
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+               visible: 0;
+            }
+         }
+        part { name: "icon_bg";
+                type: RECT;
+                description {
+                    state: "default" 0.0;
+                    color: 0 0 0 0;
+                    rel1 { relative: ZOOMED_GAP_L/ZOOMED_W ZOOMED_GAP_T/ZOOMED_H; to: "bg"; }
+                    rel2 { relative: (ZOOMED_W-ZOOMED_GAP_R)/ZOOMED_W (ZOOMED_H-ZOOMED_GAP_B)/ZOOMED_H; to: "bg"; }
+                }
+        }
+         part { name: "bg2";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            description { state: "default" 0.0;
+               rel1.to: "icon_bg";
+               rel2.to: "icon_bg";
+               align: 0.5 0.5;
+               min: 40 40;
+               max: 40 40;
+               color:  0 0 0 0;
+            }
+            description { state: "pressed" 0.0;
+               inherit: "default" 0.0;
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+               visible: 0;
+            }
+         }
+         part { name: "selected_bg";
+            type: RECT;
+            scale: 1;
+            description { state: "default" 0.0;
+               rel1.to: "icon_bg";
+               rel2.to: "icon_bg";
+               color: 0 0 0 0;
+               visible: 0;
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               color: 0 0 0 153;
+               visible: 1;
+            }
+         }
+         part { name: "check";
+            mouse_events: 0;
+            scale: 1;
+            description { state: "default" 0.0;
+               rel1.to: "bg2";
+               rel2.to: "bg2";
+               visible: 0;
+               image.normal: GALLERY_EDC_IMAGE_CHECK_PINCH_GRID;
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+            }
+            description { state: "pressed" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+            }
+            description { state: "disabled_visible" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+            }
+         }
+         part { name: "elm.swallow.content";
+            type: SWALLOW;
+            description {
+               state: "default" 0.0;
+               fixed: 1 0;
+               visible: 0;
+               color: 255 255 255 255;
+               align: 0.0 0.5;
+               rel1 {
+                  to_x: "bg2";
+                  relative: 1.0 0.0;
+                  offset: 1 1;
+               }
+               rel2 {
+                  to_x: "bg2";
+                  relative: 1.0 1.0;
+                  offset: 2 -2;
+               }
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               fixed: 1 1;
+               visible: 1;
+               aspect: 1.0 1.0;
+               aspect_preference: VERTICAL;
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+               color: 128 128 128 128;
+            }
+            description { state: "disabled_visible" 0.0;
+               inherit: "default" 0.0;
+               color: 128 128 128 128;
+               fixed: 1 1;
+               visible: 1;
+               aspect: 1.0 1.0;
+            }
+         }
+         part { name: "elm.text";
+            type: TEXTBLOCK;
+            mouse_events: 0;
+            scale: 1;
+            description { state: "default" 0.0;
+               visible: 0;
+               fixed: 0 1;
+               rel1 {
+                  relative: 1.0 0.5;
+                  offset: 1 1;
+                  to_x: "elm.swallow.content";
+               }
+               rel2 {
+                  relative: 1.0 0.5;
+                  offset: -2 -2;
+               }
+               color: 255 255 255 255;
+               align: 0.0 0.5;
+               text {
+                  style: "check_label_textblock_style";
+                  min: 0 0;
+               }
+               color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC;
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+               text.min: 1 1;
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+            }
+            description { state: "disabled_visible" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+               text.min: 1 1;
+               color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC;
+            }
+         }
+         part { name: "events";
+            type: RECT;
+            ignore_flags: ON_HOLD;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+            }
+         }
+         part { name: "disabler";
+            type: RECT;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+               visible: 0;
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+            }
+         }
+      }
+      programs {
+         program { name: "click";
+            signal: "mouse,up,1";
+            source: "events";
+            action: SIGNAL_EMIT "elm,action,check,toggle" "";
+            after: "bg_normal";
+         }
+         program { name: "bg_normal";
+            script {
+               set_state(PART:"bg", "default", 0.0);
+               set_state(PART:"bg2", "default", 0.0);
+            }
+         }
+         program { name: "mouseout";
+            signal: "mouse,out";
+            source: "events";
+            after: "bg_check_normal";
+         }
+         program { name: "bg_check_normal";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"check", st, 30, vl);
+               if (!strcmp(st, "pressed"))
+                 set_state(PART:"check", "visible", 0.0);
+               set_state(PART:"bg", "default", 0.0);
+               set_state(PART:"bg2", "default", 0.0);
+            }
+         }
+         program { name: "pressed";
+            signal: "mouse,down,1";
+            source: "events";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"check", st, 30, vl);
+               if (!strcmp(st, "visible"))
+                 set_state(PART:"check", "pressed", 0.0);
+               set_state(PART:"bg", "pressed", 0.0);
+               set_state(PART:"bg2", "pressed", 0.0);
+            }
+         }
+         program { name: "check_on";
+            signal: "elm,state,check,on";
+            source: "elm";
+            action: STATE_SET "visible" 0.0;
+            target: "check";
+            target: "selected_bg";
+         }
+         program { name: "check_off";
+            signal: "elm,state,check,off";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "check";
+            target: "selected_bg";
+         }
+         program { name: "text_show";
+            signal: "elm,state,text,visible";
+            source: "elm";
+            action: STATE_SET "visible" 0.0;
+            target: "elm.text";
+         }
+         program { name: "text_hide";
+            signal: "elm,state,text,hidden";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "elm.text";
+         }
+         program { name: "icon_show";
+            signal: "elm,state,icon,visible";
+            source: "elm";
+            action: STATE_SET "visible" 0.0;
+            target: "elm.swallow.content";
+         }
+         program { name: "icon_hide";
+            signal: "elm,state,icon,hidden";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "elm.swallow.content";
+         }
+         program { name: "disable";
+            signal: "elm,state,disabled";
+            source: "elm";
+            action: STATE_SET "disabled" 0.0;
+            target: "disabler";
+            target: "bg";
+            target: "bg2";
+            after: "disable_text";
+         }
+         program { name: "disable_text";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.text", st, 30, vl);
+               if (!strcmp(st, "visible"))
+                 set_state(PART:"elm.text", "disabled_visible", 0.0);
+               else
+                 set_state(PART:"elm.text", "disabled", 0.0);
+               get_state(PART:"elm.swallow.content", st, 30, vl);
+               if (!strcmp(st, "visible"))
+                 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0);
+               else
+                 set_state(PART:"elm.swallow.content", "disabled", 0.0);
+               get_state(PART:"check", st, 30, vl);
+               if (!strcmp(st, "visible"))
+                 set_state(PART:"check", "disabled_visible", 0.0);
+            }
+         }
+         program { name: "enable";
+            signal: "elm,state,enabled";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "disabler";
+            target: "bg";
+            target: "bg2";
+            after: "enable_text";
+         }
+         program { name: "enable_text";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.text", st, 30, vl);
+               if (!strcmp(st, "disabled_visible"))
+                 set_state(PART:"elm.text", "visible", 0.0);
+               else
+                 set_state(PART:"elm.text", "default", 0.0);
+               get_state(PART:"elm.swallow.content", st, 30, vl);
+               if (!strcmp(st, "visible"))
+                 set_state(PART:"elm.swallow.content", "visible", 0.0);
+               else
+                 set_state(PART:"elm.swallow.content", "default", 0.0);
+               get_state(PART:"check", st, 30, vl);
+               if (!strcmp(st, "disabled_visible"))
+                 set_state(PART:"check", "visible", 0.0);
+            }
+         }
+      }
+   }
+
+////////////////////////////////////////////////////////////////////////////////
+   group { name: "elm/check/base/gallery/album/grid";
+      parts {
+         part { name: "bg";
+            type: RECT;
+            scale: 1;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+            }
+            description { state: "pressed" 0.0;
+               inherit: "default" 0.0;
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+               visible: 0;
+            }
+         }
+         part { name: "bg2";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            description { state: "default" 0.0;
+               rel1.to: "bg";
+               rel2.to: "bg";
+               align: 0.5 0.5;
+               min: 40 40;
+               max: 40 40;
+               color:  0 0 0 0;
+            }
+            description { state: "pressed" 0.0;
+               inherit: "default" 0.0;
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+               visible: 0;
+            }
+         }
+         part { name: "selected_bg";
+            type: RECT;
+            scale: 1;
+            description { state: "default" 0.0;
+               rel1.to: "bg";
+               rel2.to: "bg";
+               color: 0 0 0 0;
+               visible: 0;
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               color: 0 0 0 153;
+               visible: 1;
+            }
+         }
+         part { name: "check";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            description { state: "default" 0.0;
+               rel1.to: "bg2";
+               rel2.to: "bg2";
+               color: 0 0 0 0;
+               visible: 0;
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+            }
+            description { state: "pressed" 0.0;
+               inherit: "default" 0.0;
+            }
+            description { state: "disabled_visible" 0.0;
+               inherit: "default" 0.0;
+            }
+         }
+         part { name: "elm.swallow.content";
+            type: SWALLOW;
+            description {
+               state: "default" 0.0;
+               fixed: 1 0;
+               visible: 0;
+               color: 255 255 255 255;
+               align: 0.0 0.5;
+               rel1 {
+                  to_x: "bg2";
+                  relative: 1.0 0.0;
+                  offset: 1 1;
+               }
+               rel2 {
+                  to_x: "bg2";
+                  relative: 1.0 1.0;
+                  offset: 2 -2;
+               }
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               fixed: 1 1;
+               visible: 1;
+               aspect: 1.0 1.0;
+               aspect_preference: VERTICAL;
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+               color: 128 128 128 128;
+            }
+            description { state: "disabled_visible" 0.0;
+               inherit: "default" 0.0;
+               color: 128 128 128 128;
+               fixed: 1 1;
+               visible: 1;
+               aspect: 1.0 1.0;
+            }
+         }
+         part { name: "elm.text";
+            type: TEXTBLOCK;
+            mouse_events: 0;
+            scale: 1;
+            description { state: "default" 0.0;
+               visible: 0;
+               fixed: 0 1;
+               rel1 {
+                  relative: 1.0 0.5;
+                  offset: 1 1;
+                  to_x: "elm.swallow.content";
+               }
+               rel2 {
+                  relative: 1.0 0.5;
+                  offset: -2 -2;
+               }
+               color: 255 255 255 255;
+               align: 0.0 0.5;
+               text {
+                  style: "check_label_textblock_style";
+                  min: 0 0;
+               }
+               color: CHECK_DEFAULT_TEXT_NORMAL_COLOR_INC;
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+               text.min: 1 1;
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+            }
+            description { state: "disabled_visible" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+               text.min: 1 1;
+               color: CHECK_DEFAULT_TEXT_DISABLED_COLOR_INC;
+            }
+         }
+         part { name: "events";
+            type: RECT;
+            ignore_flags: ON_HOLD;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+            }
+         }
+         part { name: "disabler";
+            type: RECT;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+               visible: 0;
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+            }
+         }
+      }
+      programs {
+         program { name: "click";
+            signal: "mouse,up,1";
+            source: "events";
+            action: SIGNAL_EMIT "elm,action,check,toggle" "";
+            after: "bg_normal";
+         }
+         program { name: "bg_normal";
+            script {
+               set_state(PART:"bg", "default", 0.0);
+               set_state(PART:"bg2", "default", 0.0);
+            }
+         }
+         program { name: "mouseout";
+            signal: "mouse,out";
+            source: "events";
+            after: "bg_check_normal";
+         }
+         program { name: "bg_check_normal";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"check", st, 30, vl);
+               if (!strcmp(st, "pressed"))
+                 set_state(PART:"check", "visible", 0.0);
+               set_state(PART:"bg", "default", 0.0);
+               set_state(PART:"bg2", "default", 0.0);
+            }
+         }
+         program { name: "pressed";
+            signal: "mouse,down,1";
+            source: "events";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"check", st, 30, vl);
+               if (!strcmp(st, "visible"))
+                 set_state(PART:"check", "pressed", 0.0);
+               set_state(PART:"bg", "pressed", 0.0);
+               set_state(PART:"bg2", "pressed", 0.0);
+            }
+         }
+         program { name: "check_on";
+            signal: "elm,state,check,on";
+            source: "elm";
+            action: STATE_SET "visible" 0.0;
+            target: "check";
+            target: "selected_bg";
+         }
+         program { name: "check_off";
+            signal: "elm,state,check,off";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "check";
+            target: "selected_bg";
+         }
+         program { name: "text_show";
+            signal: "elm,state,text,visible";
+            source: "elm";
+            action: STATE_SET "visible" 0.0;
+            target: "elm.text";
+         }
+         program { name: "text_hide";
+            signal: "elm,state,text,hidden";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "elm.text";
+         }
+         program { name: "icon_show";
+            signal: "elm,state,icon,visible";
+            source: "elm";
+            action: STATE_SET "visible" 0.0;
+            target: "elm.swallow.content";
+         }
+         program { name: "icon_hide";
+            signal: "elm,state,icon,hidden";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "elm.swallow.content";
+         }
+         program { name: "disable";
+            signal: "elm,state,disabled";
+            source: "elm";
+            action: STATE_SET "disabled" 0.0;
+            target: "disabler";
+            target: "bg";
+            target: "bg2";
+            after: "disable_text";
+         }
+         program { name: "disable_text";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.text", st, 30, vl);
+               if (!strcmp(st, "visible"))
+                 set_state(PART:"elm.text", "disabled_visible", 0.0);
+               else
+                 set_state(PART:"elm.text", "disabled", 0.0);
+               get_state(PART:"elm.swallow.content", st, 30, vl);
+               if (!strcmp(st, "visible"))
+                 set_state(PART:"elm.swallow.content", "disabled_visible", 0.0);
+               else
+                 set_state(PART:"elm.swallow.content", "disabled", 0.0);
+               get_state(PART:"check", st, 30, vl);
+               if (!strcmp(st, "visible"))
+                 set_state(PART:"check", "disabled_visible", 0.0);
+            }
+         }
+         program { name: "enable";
+            signal: "elm,state,enabled";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "disabler";
+            target: "bg";
+            target: "bg2";
+            after: "enable_text";
+         }
+         program { name: "enable_text";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.text", st, 30, vl);
+               if (!strcmp(st, "disabled_visible"))
+                 set_state(PART:"elm.text", "visible", 0.0);
+               else
+                 set_state(PART:"elm.text", "default", 0.0);
+               get_state(PART:"elm.swallow.content", st, 30, vl);
+               if (!strcmp(st, "visible"))
+                 set_state(PART:"elm.swallow.content", "visible", 0.0);
+               else
+                 set_state(PART:"elm.swallow.content", "default", 0.0);
+               get_state(PART:"check", st, 30, vl);
+               if (!strcmp(st, "disabled_visible"))
+                 set_state(PART:"check", "visible", 0.0);
+            }
+         }
+      }
+   }
+
+#undef CHECK_STATE_DEFAULT
+#undef CHECK_STATE_VISIBLE
+#undef CHECK_STATE_DISABLED_VISIBLE
+#undef CHECK_STATE_DISABLED
diff --git a/res/edc/vp-controlbar.edc b/res/edc/vp-controlbar.edc
new file mode 100755 (executable)
index 0000000..a89a419
--- /dev/null
@@ -0,0 +1,760 @@
+/*
+* Refer to nbeat-theme\themes\groups\controlbar.edc
+*/
+
+#define CONTROLBAR_LARGE_H             78              //Macros defined in file: nbeat.edc.
+#define CONTROLBAR_LARGE_LANDSCAPE_H           62
+#define CONTROLBAR_SMALL_H             65
+#define CONTROLBAR_SMALL_LANDSCAPE_H           50
+#define CONTROLBAR_W                   78
+
+#define CONTROLBAR_SEPARATEBAR_BRIGHT_COLOR_INC 22 22 22 255
+#define CONTROLBAR_SEPARATEBAR_DARK_COLOR_INC 63 63 63 255
+
+
+       group{
+               name: "elm/controlbar/base/video/default";
+               parts{
+                       part{
+                               name: "bg_rect";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events:0;
+                               description{
+                                       state: "default" 0.0;
+                                       rel1 {relative: 0.0 0.0; offset: 0 0;}
+                                       rel2 {relative: 1.0 1.0; offset: -1 -1;}
+                                       color: 0 0 0 0;
+                               }
+                       }
+                       part{
+                               name: "bg_image";
+                               type: SWALLOW;
+                               scale: 1;
+                               mouse_events:0;
+                               description{
+                                       state: "default" 0.0;
+                                       rel1 {relative: 0.0 0.0; offset: 0 0;}
+                                       rel2 {relative: 1.0 1.0; offset: -1 -1;}
+                               }
+                               description{
+                                       state: "large" 0.0;
+                                       min: 0 CONTROLBAR_LARGE_H;
+                                       fixed: 0 1;
+                                       align: 0.5 1.0;
+                                       rel1 {relative: 0.0 1.0; offset: 0 -1;}
+                                       rel2 {relative: 1.0 1.0; offset: -1 -1;}
+                               }
+                               description{
+                                       state: "small" 0.0;
+                                       min: 0 CONTROLBAR_SMALL_H;
+                                       fixed: 0 1;
+                                       align: 0.5 1.0;
+                                       rel1 {relative: 0.0 1.0; offset: 0 -1;}
+                                       rel2 {relative: 1.0 1.0; offset: -1 -1;}
+                               }
+                               description{
+                                       state: "left" 0.0;
+                                       min: CONTROLBAR_W 0;
+                                       fixed: 1 0;
+                                       align: 0.0 0.5;
+                                       rel1 {relative: 0.0 0.0; offset: 0 0;}
+                                       rel2 {relative: 0.0 1.0; offset: 0 -1;}
+                               }
+                               description{
+                                       state: "right" 0.0;
+                                       min: CONTROLBAR_W 0;
+                                       fixed: 1 0;
+                                       align: 1.0 0.5;
+                                       rel1 {relative: 1.0 0.0; offset: -1 0;}
+                                       rel2 {relative: 1.0 1.0; offset: -1 -1;}
+                               }
+                       }
+                       part{
+                               name: "elm.swallow.items";
+                               type: SWALLOW;
+                               scale: 1;
+                               description{
+                                       state: "default" 0.0;
+                                       rel1 {relative: 0.0 0.0; to: "bg_image";}
+                                       rel2 {relative: 1.0 1.0; to: "bg_image";}
+                               }
+                       }
+               }
+               programs{
+                       program{
+                               name: "default";
+                               signal: "elm,state,default";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "bg_image";
+                       }
+                       program{
+                               name: "large";
+                               signal: "elm,state,large";
+                               source: "elm";
+                               action: STATE_SET "large" 0.0;
+                               target: "bg_image";
+                       }
+                       program{
+                               name: "small";
+                               signal: "elm,state,small";
+                               source: "elm";
+                               action: STATE_SET "small" 0.0;
+                               target: "bg_image";
+                       }
+                       program{
+                               name: "left";
+                               signal: "elm,state,left";
+                               source: "elm";
+                               action: STATE_SET "left" 0.0;
+                               target: "bg_image";
+                       }
+                       program{
+                               name: "right";
+                               signal: "elm,state,right";
+                               source: "elm";
+                               action: STATE_SET "right" 0.0;
+                               target: "bg_image";
+                       }
+               }
+       }
+
+       group{
+               name: "elm/controlbar/background/video/default";
+               images{
+                       image: "T01_toolbar_bg.png" COMP;
+               }
+               parts{
+                       part{
+                               name: "bg_image";
+                               type: IMAGE;
+                               scale: 1;
+                               mouse_events:0;
+                               description{
+                                       state: "default" 0.0;
+                                       rel1 {relative: 0.0 0.0; offset: 0 0;}
+                                       rel2 {relative: 1.0 1.0; offset: -1 -1;}
+                                       image.normal: "T01_toolbar_bg.png";
+                                       color: 255 255 255 255;
+                               }
+                       }
+                       programs {
+                               program {
+                                       name: "tabbar_bg";
+                                       signal: "elm,state,tabbar";
+                                       source: "elm";
+                                       action: STATE_SET "tabbar" 0.0;
+                                       target: "bg_image";
+                               }
+                       }
+               }
+       }
+
+       group{
+               name: "elm/controlbar/view/video/default";
+               parts{
+                       part{
+                               name: "bg_rect";
+                               type: RECT;
+                               mouse_events:1;
+                               description{
+                                       state: "default" 0.0;
+                                       rel1 {relative: 0.0 0.0; offset: 0 0;}
+                                       rel2 {relative: 1.0 1.0; offset: -1 -1;}
+                                       color: 0 0 0 0;
+                               }
+                       }
+                       part{
+                               name: "elm.swallow.view";
+                               type: SWALLOW;
+                               description{
+                                       state: "default" 0.0;
+                                       rel1 {relative: 0.0 0.0; to: "bg_rect";}
+                                       rel2 {relative: 1.0 1.0; to: "bg_rect";}
+                               }
+                       }
+               }
+       }
+
+       group{
+               name: "elm/controlbar/item_bg/video/default";
+               images{
+                       image: "T01_toolbar_press.png" COMP;
+               }
+               parts{
+                       part{
+                               name: "bg_rect";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 1;
+                               description{
+                                       state: "default" 0.0;
+                                       min: 0 CONTROLBAR_SMALL_H;
+                                       rel1 {relative: 0.0 0.0; offset: 0 0;}
+                                       rel2 {relative: 1.0 1.0; offset: -1 -1;}
+                                       color: 0 0 0 0;
+                               }
+                       }
+                       part{
+                               name: "bg_img";
+                               type: IMAGE;
+                               scale: 1;
+                               mouse_events: 0;
+                               description{
+                                       state: "default" 0.0;
+                                       visible: 0;
+                                       rel1 {relative: 0.0 0.0; offset: 0 0;}
+                                       rel2 {relative: 1.0 1.0; offset: -1 -1;}
+                               }
+                               description{
+                                       state: "toolbar_pressed" 0.0;
+                                       inherit: "default" 0.0;
+                                       rel1 {relative: 0.0 0.07; offset: 3 0;}
+                                       rel2 {relative: 1.0 0.93; offset: -3 0;}
+                                       image.normal: "T01_toolbar_press.png";
+                                       image.border: 2 2 2 2;
+                                       visible: 1;
+                               }
+                       }
+                       part{
+                               name: "left_line";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description{
+                                       state: "default" 0.0;
+                                       visible: 0;
+                                       rel1 {relative: 0.0 0.0; offset: 0 5;}
+                                       rel2 {relative: 0.0 1.0; offset: 1 -3;}
+                                       color: CONTROLBAR_SEPARATEBAR_BRIGHT_COLOR_INC;
+                               }
+                               description{
+                                       state: "show" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                       }
+                       part{
+                               name: "right_line";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description{
+                                       state: "default" 0.0;
+                                       visible: 0;
+                                       rel1 {relative: 1.0 0.0; offset: -1 5;}
+                                       rel2 {relative: 1.0 1.0; offset: 0 -3;}
+                                       color: CONTROLBAR_SEPARATEBAR_DARK_COLOR_INC;
+                               }
+                               description{
+                                       state: "show" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                       }
+                       part{
+                               name: "top_line";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description{
+                                       state: "default" 0.0;
+                                       visible: 0;
+                                       rel1 {relative: 0.0 0.0; offset: 5 0;}
+                                       rel2 {relative: 1.0 0.0; offset: -5 1;}
+                                       color: CONTROLBAR_SEPARATEBAR_BRIGHT_COLOR_INC;
+                               }
+                               description{
+                                       state: "show" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                       }
+                       part{
+                               name: "bottom_line";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description{
+                                       state: "default" 0.0;
+                                       visible: 0;
+                                       rel1 {relative: 0.0 1.0; offset: 5 -1;}
+                                       rel2 {relative: 1.0 1.0; offset: -5 0;}
+                                       color: CONTROLBAR_SEPARATEBAR_DARK_COLOR_INC;
+                               }
+                               description{
+                                       state: "show" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                       }
+                       part{
+                               name: "item";
+                               type: SWALLOW;
+                               scale: 1;
+                               mouse_events: 1;
+                               description{
+                                       state: "default" 0.0;
+                                       rel1 {to: "bg_rect";}
+                                       rel2 {to: "bg_rect";}
+                               }
+                       }
+               }
+               programs {
+                       program {
+                               name: "toolbar_pressed";
+                               signal: "elm,state,toolbar_pressed";
+                               source: "elm";
+                               action: STATE_SET "toolbar_pressed" 0.0;
+                               target: "bg_img";
+                       }
+                       program {
+                               name: "unselected";
+                               signal: "elm,state,unselected";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "bg_img";
+                       }
+                       program {
+                               name: "unpressed";
+                               signal: "elm,state,unpressed";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "bg_img";
+                       }
+                       program {
+                               name: "left_line_show";
+                               signal: "elm,state,left_line_show";
+                               source: "elm";
+                               action: STATE_SET "show" 0.0;
+                               target: "left_line";
+                       }
+                       program {
+                               name: "left_line_hide";
+                               signal: "elm,state,left_line_hide";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "left_line";
+                       }
+                       program {
+                               name: "right_line_show";
+                               signal: "elm,state,right_line_show";
+                               source: "elm";
+                               action: STATE_SET "show" 0.0;
+                               target: "right_line";
+                       }
+                       program {
+                               name: "right_line_hide";
+                               signal: "elm,state,right_line_hide";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "right_line";
+                       }
+                       program {
+                               name: "top_line_show";
+                               signal: "elm,state,top_line_show";
+                               source: "elm";
+                               action: STATE_SET "show" 0.0;
+                               target: "top_line";
+                       }
+                       program {
+                               name: "top_line_hide";
+                               signal: "elm,state,top_line_hide";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "top_line";
+                       }
+                       program {
+                               name: "bottom_line_show";
+                               signal: "elm,state,bottom_line_show";
+                               source: "elm";
+                               action: STATE_SET "show" 0.0;
+                               target: "bottom_line";
+                       }
+                       program {
+                               name: "bottom_line_hide";
+                               signal: "elm,state,bottom_line_hide";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "bottom_line";
+                       }
+               }
+       }
+
+
+       group{
+               name: "elm/controlbar/base/video/landscape/default";
+
+               parts{
+                       part{
+                               name: "bg_rect";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events:0;
+                               description{
+                                       state: "default" 0.0;
+                                       rel1 {relative: 0.0 0.0; offset: 0 0;}
+                                       rel2 {relative: 1.0 1.0; offset: -1 -1;}
+                                       color: 0 0 0 0;
+                               }
+                       }
+                       part{
+                               name: "bg_image";
+                               type: SWALLOW;
+                               scale: 1;
+                               mouse_events:0;
+                               description{
+                                       state: "default" 0.0;
+                                       rel1 {relative: 0.0 0.0; offset: 0 0;}
+                                       rel2 {relative: 1.0 1.0; offset: -1 -1;}
+                               }
+                               description{
+                                       state: "large" 0.0;
+                                       min: 0 CONTROLBAR_LARGE_LANDSCAPE_H;
+                                       fixed: 0 1;
+                                       align: 0.5 1.0;
+                                       rel1 {relative: 0.0 1.0; offset: 0 -1;}
+                                       rel2 {relative: 1.0 1.0; offset: -1 -1;}
+                               }
+                               description{
+                                       state: "small" 0.0;
+                                       min: 0 CONTROLBAR_SMALL_LANDSCAPE_H;
+                                       fixed: 0 1;
+                                       align: 0.5 1.0;
+                                       rel1 {relative: 0.0 1.0; offset: 0 -1;}
+                                       rel2 {relative: 1.0 1.0; offset: -1 -1;}
+                               }
+                               description{
+                                       state: "left" 0.0;
+                                       min: CONTROLBAR_W 0;
+                                       fixed: 1 0;
+                                       align: 0.0 0.5;
+                                       rel1 {relative: 0.0 0.0; offset: 0 0;}
+                                       rel2 {relative: 0.0 1.0; offset: 0 -1;}
+                               }
+                               description{
+                                       state: "right" 0.0;
+                                       min: CONTROLBAR_W 0;
+                                       fixed: 1 0;
+                                       align: 1.0 0.5;
+                                       rel1 {relative: 1.0 0.0; offset: -1 0;}
+                                       rel2 {relative: 1.0 1.0; offset: -1 -1;}
+                               }
+                       }
+                       part{
+                               name: "elm.swallow.items";
+                               type: SWALLOW;
+                               scale: 1;
+                               description{
+                                       state: "default" 0.0;
+                                       rel1 {relative: 0.0 0.0; to: "bg_image";}
+                                       rel2 {relative: 1.0 1.0; to: "bg_image";}
+                               }
+                       }
+               }
+               programs{
+                       program{
+                               name: "default";
+                               signal: "elm,state,default";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "bg_image";
+                       }
+                       program{
+                               name: "large";
+                               signal: "elm,state,large";
+                               source: "elm";
+                               action: STATE_SET "large" 0.0;
+                               target: "bg_image";
+                       }
+                       program{
+                               name: "small";
+                               signal: "elm,state,small";
+                               source: "elm";
+                               action: STATE_SET "small" 0.0;
+                               target: "bg_image";
+                       }
+                       program{
+                               name: "left";
+                               signal: "elm,state,left";
+                               source: "elm";
+                               action: STATE_SET "left" 0.0;
+                               target: "bg_image";
+                       }
+                       program{
+                               name: "right";
+                               signal: "elm,state,right";
+                               source: "elm";
+                               action: STATE_SET "right" 0.0;
+                               target: "bg_image";
+                       }
+               }
+       }
+
+       group{
+               name: "elm/controlbar/background/video/landscape/default";
+
+               images{
+                       image: "T01_toolbar_bg.png" COMP;
+               }
+
+               parts{
+                       part{
+                               name: "bg_image";
+                               type: IMAGE;
+                               scale: 1;
+                               mouse_events:0;
+                               description{
+                                       state: "default" 0.0;
+                                       rel1 {relative: 0.0 0.0; offset: 0 0;}
+                                       rel2 {relative: 1.0 1.0; offset: -1 -1;}
+                                       image.normal: "T01_toolbar_bg.png";
+                                       color: 255 255 255 255;
+                               }
+                       }
+                       programs {
+                               program {
+                                       name: "tabbar_bg";
+                                       signal: "elm,state,tabbar";
+                                       source: "elm";
+                                       action: STATE_SET "tabbar" 0.0;
+                                       target: "bg_image";
+                               }
+                       }
+               }
+       }
+
+       group{
+               name: "elm/controlbar/view/video/landscape/default";
+
+               parts{
+                       part{
+                               name: "bg_rect";
+                               type: RECT;
+                               mouse_events:1;
+                               description{
+                                       state: "default" 0.0;
+                                       rel1 {relative: 0.0 0.0; offset: 0 0;}
+                                       rel2 {relative: 1.0 1.0; offset: -1 -1;}
+                                       color: 0 0 0 0;
+                               }
+                       }
+                       part{
+                               name: "elm.swallow.view";
+                               type: SWALLOW;
+                               description{
+                                       state: "default" 0.0;
+                                       rel1 {relative: 0.0 0.0; to: "bg_rect";}
+                                       rel2 {relative: 1.0 1.0; to: "bg_rect";}
+                               }
+                       }
+               }
+       }
+
+       group{
+               name: "elm/controlbar/item_bg/video/landscape/default";
+               images{
+                       image: "T01_toolbar_press.png" COMP;
+               }
+
+               parts{
+                       part{
+                               name: "bg_rect";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 1;
+                               description{
+                                       state: "default" 0.0;
+                                       min: 0 CONTROLBAR_SMALL_LANDSCAPE_H;
+                                       rel1 {relative: 0.0 0.0; offset: 0 0;}
+                                       rel2 {relative: 1.0 1.0; offset: -1 -1;}
+                                       color: 0 0 0 0;
+                               }
+                       }
+                       part{
+                               name: "bg_img";
+                               type: IMAGE;
+                               scale: 1;
+                               mouse_events: 0;
+                               description{
+                                       state: "default" 0.0;
+                                       visible: 0;
+                                       rel1 {relative: 0.0 0.0; offset: 0 0;}
+                                       rel2 {relative: 1.0 1.0; offset: -1 -1;}
+                               }
+                               description{
+                                       state: "toolbar_pressed" 0.0;
+                                       inherit: "default" 0.0;
+                                       rel1 {relative: 0.0 0.07; offset: 3 0;}
+                                       rel2 {relative: 1.0 0.93; offset: -3 0;}
+                                       image.normal: "T01_toolbar_press.png";
+                                       image.border: 2 2 2 2;
+                                       visible: 1;
+                               }
+                       }
+                       part{
+                               name: "left_line";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description{
+                                       state: "default" 0.0;
+                                       visible: 0;
+                                       rel1 {relative: 0.0 0.0; offset: 0 5;}
+                                       rel2 {relative: 0.0 1.0; offset: 1 -3;}
+                                       color: CONTROLBAR_SEPARATEBAR_BRIGHT_COLOR_INC;
+                               }
+                               description{
+                                       state: "show" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                       }
+                       part{
+                               name: "right_line";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description{
+                                       state: "default" 0.0;
+                                       visible: 0;
+                                       rel1 {relative: 1.0 0.0; offset: -1 5;}
+                                       rel2 {relative: 1.0 1.0; offset: 0 -3;}
+                                       color: CONTROLBAR_SEPARATEBAR_DARK_COLOR_INC;
+                               }
+                               description{
+                                       state: "show" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                       }
+                       part{
+                               name: "top_line";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description{
+                                       state: "default" 0.0;
+                                       visible: 0;
+                                       rel1 {relative: 0.0 0.0; offset: 5 0;}
+                                       rel2 {relative: 1.0 0.0; offset: -5 1;}
+                                       color: CONTROLBAR_SEPARATEBAR_BRIGHT_COLOR_INC;
+                               }
+                               description{
+                                       state: "show" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                       }
+                       part{
+                               name: "bottom_line";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description{
+                                       state: "default" 0.0;
+                                       visible: 0;
+                                       rel1 {relative: 0.0 1.0; offset: 5 -1;}
+                                       rel2 {relative: 1.0 1.0; offset: -5 0;}
+                                       color: CONTROLBAR_SEPARATEBAR_DARK_COLOR_INC;
+                               }
+                               description{
+                                       state: "show" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                       }
+                       part{
+                               name: "item";
+                               type: SWALLOW;
+                               scale: 1;
+                               mouse_events: 1;
+                               description{
+                                       state: "default" 0.0;
+                                       rel1 {to: "bg_rect";}
+                                       rel2 {to: "bg_rect";}
+                               }
+                       }
+               }
+               programs {
+                       program {
+                               name: "toolbar_pressed";
+                               signal: "elm,state,toolbar_pressed";
+                               source: "elm";
+                               action: STATE_SET "toolbar_pressed" 0.0;
+                               target: "bg_img";
+                       }
+                       program {
+                               name: "unselected";
+                               signal: "elm,state,unselected";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "bg_img";
+                       }
+                       program {
+                               name: "unpressed";
+                               signal: "elm,state,unpressed";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "bg_img";
+                       }
+                       program {
+                               name: "left_line_show";
+                               signal: "elm,state,left_line_show";
+                               source: "elm";
+                               action: STATE_SET "show" 0.0;
+                               target: "left_line";
+                       }
+                       program {
+                               name: "left_line_hide";
+                               signal: "elm,state,left_line_hide";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "left_line";
+                       }
+                       program {
+                               name: "right_line_show";
+                               signal: "elm,state,right_line_show";
+                               source: "elm";
+                               action: STATE_SET "show" 0.0;
+                               target: "right_line";
+                       }
+                       program {
+                               name: "right_line_hide";
+                               signal: "elm,state,right_line_hide";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "right_line";
+                       }
+                       program {
+                               name: "top_line_show";
+                               signal: "elm,state,top_line_show";
+                               source: "elm";
+                               action: STATE_SET "show" 0.0;
+                               target: "top_line";
+                       }
+                       program {
+                               name: "top_line_hide";
+                               signal: "elm,state,top_line_hide";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "top_line";
+                       }
+                       program {
+                               name: "bottom_line_show";
+                               signal: "elm,state,bottom_line_show";
+                               source: "elm";
+                               action: STATE_SET "show" 0.0;
+                               target: "bottom_line";
+                       }
+                       program {
+                               name: "bottom_line_hide";
+                               signal: "elm,state,bottom_line_hide";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "bottom_line";
+                       }
+               }
+       }
+
diff --git a/res/edc/vp-ctxpopup.edc b/res/edc/vp-ctxpopup.edc
new file mode 100755 (executable)
index 0000000..999bd16
--- /dev/null
@@ -0,0 +1,1762 @@
+///////////////////////////////////////////////////////////////////////////////////////
+//
+// ctxpopup
+//
+///////////////////////////////////////////////////////////////////////////////////////
+
+#define CTXPOPUP_SHADOW_PADDING 10
+#define CTXPOPUP_FRAME_CORNER_SIZE 4 4
+#define CTXPOPUP_FONT_COLOR 0 0 0 255
+#define CTXPOPUP_CLICKED_FONT_COLOR 255 255 255 255
+#define CTXPOPUP_ITEM_DISABLED_COLOR 0 0 0 100
+#define CTXPOPUP_LIST_PADDING 10
+#define CTXPOPUP_LIST_SHADOW_PADDING 3
+
+#define CTXPOPUP_BUBBLE_BG_IMAGE "white/common/00_popup_bubble_bg.png"
+#define CTXPOPUP_BG_IMAGE "white/common/T01-2_popup_bg.png"
+#define CTXPOPUP_BUBBLE_BG_IMAGE_BORDER 13 13 13 13
+#define CTXPOPUP_BG_IMAGE_BORDER 3 3 3 3
+#define CTXPOPUP_BG_IMAGEEDITOR_BORDER 10 10 10 10
+#define CTXPOPUP_BG_COLOR_INC 0 0 0 165
+#define CTXPOPUP_BG_PRESS_COLOR_INC 0 140 210 255
+#define CTXPOPUP_MAIN_TEXT_UNREAD_COLOR_INC 249 249 249 255
+#define CTXPOPUP_MAIN_TEXT_PRESS_COLOR_INC 249 249 249 255
+#define CTXPOPUP_SEPARATOR_COLOR_INC 200 200 200 255
+#define CTXPOPUP_HORIZONTAL_SEPARATOR_COLOR_INC 200 200 200 255
+#define CTXPOPUP_HORIZONTAL_SEPARATOR_MIN_SIZE_INC 1 0
+#define CTXPOPUP_HORIZONTAL_SEPARATOR_MAX_SIZE_INC 1 999999
+#define CTXPOPUP_VERTICAL_SEPARATOR_MIN_SIZE_INC 0 1
+#define CTXPOPUP_VERTICAL_SEPARATOR_MAX_SIZE_INC 999999 1
+#define CTXPOPUP_TP_BG_COLOR_INC 0 140 210 255
+#define CTXPOPUP_ITEM_TEXT_SIZE_INC 44
+#define CTXPOPUP_ITEM_MAIN_TEXT_SIZE_INC 44
+#define CTXPOPUP_ITEM_HEIGHT_INC 110
+#define CTXPOPUP_ITEM_ICON_INC 160 110
+#define CTXPOPUP_ICON_WIDTH_INC 80
+#define CTXPOPUP_ICON_HEIGHT_INC 80
+#define CTXPOPUP_ARROW_SIZE_INC 48 48
+#define CTXPOPUP_CONTENT_WIDTH_MAX_INC 630
+#define CTXPOPUP_ITEM_PADDING_INC 25
+#define CTXPOPUP_IE_ARROW_SIZE_INC 52
+#define CTXPOPUP_IE_FONT_SIZE_INC 40
+#define CTXPOPUP_IE_ITEM_PADDING_INC 22
+#define CTXPOPUP_IE_ITEM_HEIGHT_INC 75
+#define CTXPOPUP_IE_CONTENT_WIDTH_MAX_INC 720
+#define CTXPOPUP_IE_ICON_WIDTH_INC 60
+#define CTXPOPUP_IE_ICON_HEIGHT_INC 60
+#define CTXPOPUP_TP_ARROW_SIZE_INC 30
+#define CTXPOPUP_TP_HEIGHT_INC 106
+
+///////////////////////////////////////////////////////////////////////////////
+       group {
+               name: "elm/scroller/base/video/ctxpopup";
+               script {
+                       public sbvis_v, sbvis_h, sbalways_v, sbalways_h, sbvis_timer;
+                       public timer0(val) {
+                               new v;
+                       v = get_int(sbvis_v);
+                       if (v) {
+                               v = get_int(sbalways_v);
+                               if(!v) {
+                                       emit("do-hide-vbar", "");
+                                       set_int(sbvis_v, 0);
+                               }
+                       }
+                       v = get_int(sbvis_h);
+                       if (v) {
+                               v = get_int(sbalways_h);
+                               if(!v) {
+                                       emit("do-hide-hbar", "");
+                                       set_int(sbvis_h, 0);
+                               }
+                       }
+                       set_int(sbvis_timer, 0);
+                       return 0;
+                       }
+               }
+               images {
+                       image: "white/common/01_scroller.png" COMP;
+               }
+               parts {
+                       part {
+                               name: "clipper";
+                               type: RECT;
+                               mouse_events: 0;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                               }
+                       }
+                       part {
+                               name: "elm.swallow.content";
+                               clip_to: "clipper";
+                               type: SWALLOW;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       align: 0.5 0.5;
+                               }
+                       }
+                       part {
+                               name: "sb_vbar_clip_master";
+                               type: RECT;
+                               mouse_events: 0;
+                               description {
+                                       state: "default" 0.0;
+                               }
+                               description {
+                                       state: "hidden" 0.0;
+                                       visible: 0;
+                                       color: 255 255 255 0;
+                               }
+                       }
+                       part {
+                               name: "sb_vbar_clip";
+                               clip_to:"sb_vbar_clip_master";
+                               type: RECT;
+                               mouse_events: 0;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       align: 0.0 0.0;
+                                       rel2{ to:"clipper"; relative: 1.0 1.0;}
+                               }
+                               description {
+                                       state: "hidden" 0.0;
+                                       visible: 0;
+                                       color: 255 255 255 0;
+                               }
+                       }
+                       part {
+                               name: "sb_vbar";
+                               type: RECT;
+                               mouse_events: 0;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       fixed: 1 1;
+                                       visible: 0;
+                                       align: 1.0 0.0;
+                                       rel1{ to:"clipper"; relative: 1.0 0.0; }
+                                       rel2{ to:"clipper"; relative: 1.0 1.0;}
+                               }
+                       }
+                       part {
+                               name: "elm.dragable.vbar";
+                               clip_to: "sb_vbar_clip";
+                               mouse_events: 0;
+                               scale: 1;
+                               dragable {
+                                       x: 0 0 0;
+                                       y: 1 1 0;
+                                       confine: "sb_vbar";
+                               }
+                               description {
+                                       state: "default" 0.0;
+                                       fixed: 1 1;
+                                       min: 14 32;
+                                       rel1 {
+                                               relative: 0.5  0.5;
+                                               to: "sb_vbar";
+                                       }
+                                       rel2 {
+                                               relative: 0.5  0.5;
+                                               to: "sb_vbar";
+                                       }
+                                       image {
+                                               normal: "white/common/01_scroller.png";
+                                               border: 0 0 6 6;
+                                               border_scale: 1;
+                                       }
+                               }
+                       }
+                       part {
+                               name: "sb_hbar_clip_master";
+                               type: RECT;
+                               mouse_events: 0;
+                               description {
+                                       state: "default" 0.0;
+                               }
+                               description {
+                                       state: "hidden" 0.0;
+                                       visible: 0;
+                                       color: 255 255 255 0;
+                               }
+                       }
+                       part {
+                               name: "sb_hbar_clip";
+                               clip_to: "sb_hbar_clip_master";
+                               type: RECT;
+                               mouse_events: 0;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       align: 0.0 0.0;
+                                       rel2{ to:"clipper"; relative: 1.0 1.0;}
+                               }
+                               description {
+                                       state: "hidden" 0.0;
+                                       visible: 0;
+                                       color: 255 255 255 0;
+                               }
+                       }
+                       part {
+                               name: "sb_hbar";
+                               type: RECT;
+                               mouse_events: 0;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       fixed: 1 1;
+                                       visible: 0;
+                                       align: 0.0 1.0;
+                                       rel1 {to:"clipper"; relative: 0.0 1.0;}
+                                       rel2 {to:"clipper"; relative: 1.0 1.0;}
+                               }
+                       }
+                       part {
+                               name: "elm.dragable.hbar";
+                               clip_to: "sb_hbar_clip";
+                               mouse_events: 0;
+                               scale: 1;
+                               dragable {
+                                       x: 1 1 0;
+                                       y: 0 0 0;
+                                       confine: "sb_hbar";
+                               }
+                               description {
+                                       state: "default" 0.0;
+                                       fixed: 1 1;
+                                       min: 32 12;
+                                       rel1 {relative: 0.5  0.5; to: "sb_hbar";}
+                                       rel2 {relative: 0.5  0.5; to: "sb_hbar";}
+                                       image {
+                                               normal: "white/common/01_scroller.png";
+                                               border: 6 6 0 0;
+                                               border_scale: 1;
+                                       }
+                               }
+                       }
+               }
+               programs {
+                       program {
+                               name: "load";
+                               signal: "load";
+                               source: "";
+                               script {
+                                       set_state(PART:"sb_vbar_clip", "hidden", 0.0);
+                                       set_state(PART:"sb_hbar_clip", "hidden", 0.0);
+                                       set_int(sbvis_v, 0);
+                                       set_int(sbvis_h, 0);
+                                       set_int(sbalways_v, 0);
+                                       set_int(sbalways_h, 0);
+                                       set_int(sbvis_timer, 0);
+                               }
+                       }
+                       program {
+                               name: "vbar_show";
+                               signal: "elm,action,show,vbar";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "sb_vbar_clip_master";
+                       }
+                       program {
+                               name: "vbar_hide";
+                               signal: "elm,action,hide,vbar";
+                               source: "elm";
+                               action:  STATE_SET "hidden" 0.0;
+                               target: "sb_vbar_clip_master";
+                       }
+                       program {
+                               name: "vbar_show_always";
+                               signal: "elm,action,show_always,vbar";
+                               source: "elm";
+                               script {
+                                       new v;
+                                       v = get_int(sbvis_v);
+                                       v |= get_int(sbalways_v);
+                                       if (!v) {
+                                               set_int(sbalways_v, 1);
+                                               emit("do-show-vbar", "");
+                                               set_int(sbvis_v, 1);
+                                       }
+                               }
+                       }
+                       program {
+                               name: "vbar_show_notalways";
+                               signal: "elm,action,show_notalways,vbar";
+                               source: "elm";
+                               script {
+                                       new v;
+                                       v = get_int(sbalways_v);
+                                       if (v) {
+                                               set_int(sbalways_v, 0);
+                                               v = get_int(sbvis_v);
+                                               if (!v) {
+                                                       emit("do-hide-vbar", "");
+                                               set_int(sbvis_v, 0);
+                                               }
+                                       }
+                               }
+                       }
+                       program {
+                               name: "sb_vbar_show";
+                               signal: "do-show-vbar";
+                               source: "";
+                               action:  STATE_SET "default" 0.0;
+                               transition: LINEAR 1.0;
+                               target: "sb_vbar_clip";
+                       }
+                       program {
+                               name: "sb_vbar_hide";
+                               signal: "do-hide-vbar";
+                               source: "";
+                               action:  STATE_SET "hidden" 0.0;
+                               transition: LINEAR 1.0;
+                               target: "sb_vbar_clip";
+                       }
+                       program {
+                               name: "hbar_show";
+                               signal: "elm,action,show,hbar";
+                               source: "elm";
+                               action:  STATE_SET "default" 0.0;
+                               target: "sb_hbar_clip_master";
+                       }
+                       program {
+                               name: "hbar_hide";
+                               signal: "elm,action,hide,hbar";
+                               source: "elm";
+                               action:  STATE_SET "hidden" 0.0;
+                               target: "sb_hbar_clip_master";
+                       }
+                       program {
+                               name: "hbar_show_always";
+                               signal: "elm,action,show_always,hbar";
+                               source: "elm";
+                               script {
+                                       new v;
+                                       v = get_int(sbvis_h);
+                                       v |= get_int(sbalways_h);
+                                       if (!v) {
+                                               set_int(sbalways_h, 1);
+                                               emit("do-show-hbar", "");
+                                               set_int(sbvis_h, 1);
+                                       }
+                               }
+                       }
+                       program {
+                               name: "hbar_show_notalways";
+                               signal: "elm,action,show_notalways,hbar";
+                               source: "elm";
+                               script {
+                                       new v;
+                                       v = get_int(sbalways_h);
+                                       if (v) {
+                                               set_int(sbalways_h, 0);
+                                               v = get_int(sbvis_h);
+                                               if (!v) {
+                                                       emit("do-hide-hbar", "");
+                                                       set_int(sbvis_h, 0);
+                                               }
+                                       }
+                               }
+                       }
+                       program {
+                               name: "sb_hbar_show";
+                               signal: "do-show-hbar";
+                               source: "";
+                               action:  STATE_SET "default" 0.0;
+                               transition: LINEAR 1.0;
+                               target: "sb_hbar_clip";
+                       }
+                       program {
+                               name: "sb_hbar_hide";
+                               signal: "do-hide-hbar";
+                               source: "";
+                               action:  STATE_SET "hidden" 0.0;
+                               transition: LINEAR 1.0;
+                               target: "sb_hbar_clip";
+                       }
+                       program {
+                               name: "scroll";
+                               signal: "elm,action,scroll";
+                               source: "elm";
+                               action:  STATE_SET "default" 0.0;
+                               script {
+                                       new v;
+                                       v = get_int(sbvis_v);
+                                       v |= get_int(sbalways_v);
+                                       if (!v) {
+                                               emit("do-show-vbar", "");
+                                               set_int(sbvis_v, 1);
+                                       }
+                                       v = get_int(sbvis_h);
+                                       v |= get_int(sbalways_h);
+                                       if(!v) {
+                                               emit("do-show-hbar", "");
+                                               set_int(sbvis_h, 1);
+                                       }
+                                       v = get_int(sbvis_timer);
+                                       if (v > 0) cancel_timer(v);
+                                       v = timer(2.0, "timer0", 0);
+                                       set_int(sbvis_timer, v);
+                               }
+                       }
+               }
+       }
+///////////////////////////////////////////////////////////////////////////////
+       group {
+               name: "elm/ctxpopup/bg/video/pass_event";
+               alias: "elm/ctxpopup/bg/video/extended/entry/pass_event";
+               alias: "elm/ctxpopup/bg/video/extended/entry";
+               alias: "elm/ctxpopup/bg/video/timepicker";
+               parts {
+                       part {
+                               name: "bg";
+                               type: RECT;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 0;
+                               }
+                               description {
+                                       state: "visible" 0.0;
+                                       visible: 0;
+                               }
+                       }
+               }
+               programs {
+                       program {
+                               name: "show";
+                               signal: "elm,state,show";
+                               source: "elm";
+                               action: STATE_SET "visible" 0.0;
+                               target: "bg";
+                       }
+                       program {
+                               name: "hide";
+                               signal: "elm,state,hide";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "bg";
+                       }
+               }
+       }
+///////////////////////////////////////////////////////////////////////////////
+       group {
+               name: "elm/ctxpopup/bg/video/default";
+               parts {
+                       part {
+                               name: "bg";
+                               type: RECT;
+                               mouse_events: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 0;
+                               }
+                               description {
+                                       state: "visible" 0.0;
+                                       color: 0 0 0 0;
+                                       visible: 1;
+                               }
+                       }
+               }
+               programs {
+                       program {
+                               name:   "clicked_event";
+                               signal: "mouse,clicked,1";
+                               source: "bg";
+                               action: SIGNAL_EMIT "elm,action,click" "";
+                       }
+                       program {
+                               name: "show";
+                               signal: "elm,state,show";
+                               source: "elm";
+                               action: STATE_SET "visible" 0.0;
+                               target: "bg";
+                       }
+                       program {
+                               name: "hide";
+                               signal: "elm,state,hide";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "bg";
+                       }
+               }
+       }
+
+       group {
+               name: "elm/ctxpopup/base/video/default";
+               images {
+                       image: CTXPOPUP_BUBBLE_BG_IMAGE COMP;
+                       image: CTXPOPUP_BG_IMAGE COMP;
+               }
+               parts {
+                       part {
+                               name:"frame_shadow_left_top_padding";
+                               type:RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description {
+                                       min: CTXPOPUP_SHADOW_PADDING CTXPOPUP_SHADOW_PADDING;
+                                       max: CTXPOPUP_SHADOW_PADDING CTXPOPUP_SHADOW_PADDING;
+                                       rel2 { relative: 0 0; }
+                                       align: 1 1;
+                                       fixed: 1 1;
+                                       visible: 0;
+                               }
+                       }
+                       part {
+                               name:"frame_shadow_right_bottom_padding";
+                               type:RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description {
+                                       min: CTXPOPUP_SHADOW_PADDING CTXPOPUP_SHADOW_PADDING;
+                                       max: CTXPOPUP_SHADOW_PADDING CTXPOPUP_SHADOW_PADDING;
+                                       rel1{relative: 1 1;}
+                                       align: 0 0;
+                                       fixed: 1 1;
+                                       visible: 0;
+                               }
+                       }
+
+                       part {
+                               name: "frame_shadow";
+                               type: IMAGE;
+                               scale: 1;
+                               mouse_events: 0;
+                               clip_to: "ctxpopup_clip";
+                               description {
+                                       state: "default" 0.0;
+                                       rel1 {
+                                       relative: 0.2 0.2;
+                                               to:"frame_shadow_left_top_padding";
+                                       }
+                                       rel2 {
+                                               relative: 0.8 0.8;
+                                               to:"frame_shadow_right_bottom_padding";
+                                       }
+                                       image {
+                                               normal: CTXPOPUP_BUBBLE_BG_IMAGE;
+                                               border: CTXPOPUP_BUBBLE_BG_IMAGE_BORDER;
+                                               border_scale: 1;
+                                       }
+                               }
+                       }
+
+                       part { name: "arrow_area_left";
+                               type: RECT;
+                               mouse_events: 0;
+                               scale: 1;
+                               clip_to: "ctxpopup_clip";
+                               description { state: "default" 0.0;
+                                       visible: 0;
+                                       min: 40 0;
+                                       fixed: 1 1;
+                                       align: 1 0.5;
+                                       rel1 {
+                                               relative: 0 1;
+                                               to_y: "ctxpopup_frame_left_top";
+                                       }
+                                       rel2 {
+                                               relative:0 0;
+                                               to:"ctxpopup_frame_left_bottom";
+                                       }
+                               }
+                       }
+                       part { name: "arrow_area_right";
+                               type: RECT;
+                               mouse_events: 0;
+                               scale: 1;
+                               clip_to: "ctxpopup_clip";
+                               description { state: "default" 0.0;
+                                       visible: 0;
+                                       min: 40 0;
+                                       fixed: 1 1;
+                                       align: 0 0.5;
+                                       rel1 {
+                                               relative: 1 1;
+                                               to:"ctxpopup_frame_right_top";
+                                       }
+                                       rel2 {
+                                               relative: 1 0;
+                                               to_y: "ctxpopup_frame_right_bottom";
+                                       }
+                               }
+                       }
+                       part { name: "arrow_area_up";
+                               type: RECT;
+                               mouse_events: 0;
+                               scale: 1;
+                               clip_to: "ctxpopup_clip";
+                               description { state: "default" 0.0;
+                                       visible: 0;
+                                       min: 0 40;
+                                       fixed: 1 1;
+                                       align: 0.5 1;
+                                       rel1 {
+                                               relative: 1 0;
+                                               to_x: "ctxpopup_frame_left_top";
+                                       }
+                                       rel2 {
+                                               relative: 0 0;
+                                               to:"ctxpopup_frame_right_top";
+                                       }
+                               }
+                       }
+                       part { name: "arrow_area_down";
+                               type: RECT;
+                               mouse_events: 0;
+                               scale: 1;
+                               clip_to: "ctxpopup_clip";
+                               description { state: "default" 0.0;
+                                       visible: 0;
+                                       min: 0 40;
+                                       fixed: 1 1;
+                                       align: 0.5 0;
+                                       rel1 {
+                                               relative: 1 1;
+                                               to:"ctxpopup_frame_left_bottom";
+                                       }
+                                       rel2 {
+                                               relative: 0 1;
+                                               to_x: "ctxpopup_frame_right_bottom";
+                                       }
+                               }
+                       }
+                       part { name: "elm.swallow.arrow_up";
+                               type: SWALLOW;
+                               mouse_events: 0;
+                               scale: 1;
+                               clip_to: "ctxpopup_clip";
+                               dragable {
+                                       x: 1 1 0;
+                                       y: 1 1 0;
+                                       confine: "arrow_area_up";
+                               }
+                               description {
+                                       state: "default" 0.0;
+                                       min: 40 40;
+                                       fixed: 1 1;
+                                       visible: 1;
+                               }
+                       }
+                       part { name: "elm.swallow.arrow_down";
+                               type: SWALLOW;
+                               mouse_events: 0;
+                               scale: 1;
+                               clip_to: "ctxpopup_clip";
+                               dragable {
+                                       x: 1 1 0;
+                                       y: 1 1 0;
+                                       confine: "arrow_area_down";
+                               }
+                               description {
+                                       state: "default" 0.0;
+                                       min: 40 40;
+                                       fixed: 1 1;
+                                       visible: 1;
+                               }
+                       }
+                       part { name: "elm.swallow.arrow_left";
+                               type: SWALLOW;
+                               mouse_events: 0;
+                               scale: 1;
+                               clip_to: "ctxpopup_clip";
+                               dragable {
+                                       x: 1 1 0;
+                                       y: 1 1 0;
+                                       confine: "arrow_area_left";
+                               }
+                               description {
+                                       state: "default" 0.0;
+                                       min: 40 40;
+                                       fixed: 1 1;
+                                       visible: 1;
+                               }
+                       }
+                       part { name: "elm.swallow.arrow_right";
+                               type: SWALLOW;
+                               mouse_events: 0;
+                               scale: 1;
+                               clip_to: "ctxpopup_clip";
+                               dragable {
+                                       x: 1 1 0;
+                                       y: 1 1 0;
+                                       confine: "arrow_area_right";
+                               }
+                               description {
+                                       state: "default" 0.0;
+                                       min: 40 40;
+                                       fixed: 1 1;
+                                       visible: 1;
+                               }
+                       }
+
+                       part {
+                               name: "ctxpopup_frame_left_top";
+                               type: RECT;
+                               scale: 1;
+                               description {
+                                       visible: 0;
+                                       align: 0 0;
+                                       min: CTXPOPUP_FRAME_CORNER_SIZE;
+                                       max: CTXPOPUP_FRAME_CORNER_SIZE;
+                               }
+                       }
+
+                       part {
+                               name: "ctxpopup_frame_right_top";
+                               type: RECT;
+                               scale: 1;
+                               description {
+                                       visible: 0;
+                                       align: 1 0;
+                                       min: CTXPOPUP_FRAME_CORNER_SIZE;
+                                       max: CTXPOPUP_FRAME_CORNER_SIZE;
+                               }
+                       }
+
+                       part {
+                               name: "ctxpopup_frame_left_bottom";
+                               type: RECT;
+                               scale: 1;
+                               description {
+                                       visible: 0;
+                                       align: 0 1;
+                                       min: CTXPOPUP_FRAME_CORNER_SIZE;
+                                       max: CTXPOPUP_FRAME_CORNER_SIZE;
+                               }
+                       }
+
+                       part {
+                               name: "ctxpopup_frame_right_bottom";
+                               type: RECT;
+                               scale: 1;
+                               description {
+                                       visible: 0;
+                                       align: 1 1;
+                                       min: CTXPOPUP_FRAME_CORNER_SIZE;
+                                       max: CTXPOPUP_FRAME_CORNER_SIZE;
+                               }
+                       }
+                       part {
+                               name:"list_shadow_right_bottom_padding";
+                               type:RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description {
+                                       min: CTXPOPUP_LIST_SHADOW_PADDING CTXPOPUP_LIST_SHADOW_PADDING;
+                                       max: CTXPOPUP_LIST_SHADOW_PADDING CTXPOPUP_LIST_SHADOW_PADDING;
+                                       align: 0 0;
+                                       fixed: 1 1;
+                                       visible: 0;
+                                       rel1 {to:"elm.swallow.content";  relative: 1 1;}
+                               }
+                       }
+                       part {
+                               name:"content_left_top_padding";
+                               type:RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description {
+                                       state: "default" 0.0;
+                                       min: CTXPOPUP_LIST_PADDING CTXPOPUP_LIST_PADDING;
+                                       max: CTXPOPUP_LIST_PADDING CTXPOPUP_LIST_PADDING;
+                                       align: 0 0;
+                                       fixed: 1 1;
+                                       visible: 0;
+                               }
+                       }
+                       part {
+                               name:"content_right_bottom_padding";
+                               type:RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description {
+                                       min: CTXPOPUP_LIST_PADDING CTXPOPUP_LIST_PADDING;
+                                       max: CTXPOPUP_LIST_PADDING CTXPOPUP_LIST_PADDING;
+                                       rel1 { relative: 1 1;}
+                                       rel2 { relative: 1 1;}
+                                       align: 1 1;
+                                       fixed: 1 1;
+                                       visible: 0;
+                               }
+                       }
+
+
+                       part {
+                               name: "frame_bg";
+                               type: IMAGE;
+                               scale: 1;
+                               mouse_events: 0;
+                               clip_to: "ctxpopup_clip";
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 1;
+                                       rel1 {to:"ctxpopup_frame_left_top";}
+                                       rel2 {to:"ctxpopup_frame_right_bottom";}
+                                       image {
+                                               normal: CTXPOPUP_BG_IMAGE;
+                                               border: CTXPOPUP_BG_IMAGE_BORDER;
+                                               border_scale: 1;
+                                       }
+                               }
+                       }
+                       part {
+                               name: "elm.swallow.content";
+                               type: SWALLOW;
+                               clip_to: "ctxpopup_clip";
+                               description {
+                                       state: "default" 0.0;
+                                       align: 0 0;
+                                       rel1 {to:"ctxpopup_frame_left_top";  relative: 0.5 0.5;}
+                                       rel2 {to:"ctxpopup_frame_right_bottom";  relative: 0.5 0.5;}
+                               }
+                       }
+                       part { name: "ctxpopup_clip";
+                               type: RECT;
+                               description { state: "default" 0.0;
+                               color: 255 255 255 0;
+                               rel1 { to:"ctxpopup_frame_left_top"; relative: 0.5 0.5; }
+                               rel2 { to:"ctxpopup_frame_right_bottom"; relative: 0.5 0.5; }
+                               }
+                               description { state: "show_up" 0.0;
+                                       color: 255 255 255 0;
+                                       rel1 { to:"arrow_area_down"; relative: 0 1; }
+                                       rel2 { to:"arrow_area_down"; relative: 1 1; }
+                               }
+                               description { state: "show_left" 0.0;
+                                       color: 255 255 255 0;
+                                       rel1 { to:"arrow_area_right"; relative: 1 0; }
+                                       rel2 { to:"arrow_area_right"; relative: 1 1; }
+                               }
+                               description { state: "show_right" 0.0;
+                                       color: 255 255 255 0;
+                                       rel1 { to:"arrow_area_left"; relative: 0 0; }
+                                       rel2 { to:"arrow_area_left"; relative: 0 1; }
+                               }
+                               description { state: "show_down" 0.0;
+                                       color: 255 255 255 0;
+                                       rel1 { to:"arrow_area_up"; relative: 0 0; }
+                                       rel2 { to:"arrow_area_up"; relative: 1 0; }
+                               }
+                               description { state: "hide_up" 0.0;
+                                       color: 255 255 255 255;
+                                       rel1 { to:"arrow_area_down"; relative: 0 1; }
+                                       rel2 { to:"arrow_area_down"; relative: 1 1; }
+                               }
+                               description { state: "hide_left" 0.0;
+                                       color: 255 255 255 255;
+                                       rel1 { to:"arrow_area_right"; relative: 1 0; }
+                                       rel2 { to:"arrow_area_right"; relative: 1 1; }
+                               }
+                               description { state: "hide_right" 0.0;
+                                       color: 255 255 255 255;
+                                       rel1 { to:"arrow_area_left"; relative: 0 0; }
+                                       rel2 { to:"arrow_area_left"; relative: 0 1; }
+                               }
+                               description { state: "hide_down" 0.0;
+                                       color: 255 255 255 255;
+                                       rel1 { to:"arrow_area_up"; relative: 0 0; }
+                                       rel2 { to:"arrow_area_up"; relative: 1 0; }
+                               }
+                               description { state: "visible" 0.0;
+                                       color: 255 255 255 255;
+                                       rel1 { to_x:"arrow_area_left"; to_y:"arrow_area_up"; }
+                                       rel2 { to_x:"arrow_area_right"; to_y:"arrow_area_down"; }
+                               }
+                       }
+               }
+               programs {
+                       program { name: "show";
+                               signal: "elm,state,show";
+                               source: "elm";
+                               action: STATE_SET "visible" 0.0;
+                               transition: LINEAR 0.25;
+                               target: "ctxpopup_clip";
+                       }
+                       program { name: "show_up";
+                               signal: "elm,state,show,up";
+                               source: "elm";
+                               action: STATE_SET "show_up" 0.0;
+                               transition: LINEAR 0.25;
+                               target: "ctxpopup_clip";
+                       }
+                       program { name: "show_left";
+                               signal: "elm,state,show,left";
+                               source: "elm";
+                               action: STATE_SET "show_left" 0.0;
+                               transition: LINEAR 0.25;
+                               target: "ctxpopup_clip";
+                       }
+                       program { name: "show_right";
+                               signal: "elm,state,show,right";
+                               source: "elm";
+                               action: STATE_SET "show_right" 0.0;
+                               transition: LINEAR 0.25;
+                               target: "ctxpopup_clip";
+                       }
+                       program { name: "show_down";
+                               signal: "elm,state,show,down";
+                               source: "elm";
+                               action: STATE_SET "show_down" 0.0;
+                               transition: LINEAR 0.25;
+                               target: "ctxpopup_clip";
+                       }
+                       program { name: "hide_up";
+                               signal: "elm,state,hide,up";
+                               source: "elm";
+                               action: STATE_SET "hide_up" 0.0;
+                               transition: LINEAR 0.25;
+                               target: "ctxpopup_clip";
+                               after: "hide_finished";
+                       }
+                       program { name: "hide_left";
+                               signal: "elm,state,hide,left";
+                               source: "elm";
+                               action: STATE_SET "hide_left" 0.0;
+                               transition: LINEAR 0.25;
+                               target: "ctxpopup_clip";
+                               after: "hide_finished";
+                       }
+                       program { name: "hide_right";
+                               signal: "elm,state,hide,right";
+                               source: "elm";
+                               action: STATE_SET "hide_right" 0.0;
+                               transition: LINEAR 0.25;
+                               target: "ctxpopup_clip";
+                               after: "hide_finished";
+                       }
+                       program { name: "hide_down";
+                               signal: "elm,state,hide,down";
+                               source: "elm";
+                               action: STATE_SET "hide_down" 0.0;
+                               transition: LINEAR 0.25;
+                               target: "ctxpopup_clip";
+                               after: "hide_finished";
+                       }
+                       program { name: "hide_finished";
+                               action: SIGNAL_EMIT "elm,action,hide,finished" "";
+                       }
+               }
+       }
+
+///////////////////////////////////////////////////////////////////////////////
+       group { name: "elm/ctxpopup/arrow/video/default";
+               images {
+                       image: "white/common/00_popup_tail_left.png" COMP;
+                       image: "white/common/00_popup_tail_right.png" COMP;
+                       image: "white/common/00_popup_tail_top.png" COMP;
+                       image: "white/common/00_popup_tail_bottom.png" COMP;
+               }
+               parts {
+                       part {
+                               name: "ctxpopup_arrow";
+                               type: IMAGE;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       min: CTXPOPUP_ARROW_SIZE_INC;
+                                       max: CTXPOPUP_ARROW_SIZE_INC;
+                                       fixed: 1 1;
+                                       visible: 0;
+                                       align: 0.5 0.5;
+                               }
+                               description {
+                                       state: "left" 0.0;
+                                       min: CTXPOPUP_ARROW_SIZE_INC;
+                                       max: CTXPOPUP_ARROW_SIZE_INC;
+                                       fixed: 1 1;
+                                       align: 1.0 0.5;
+                                       image {
+                                               normal: "white/common/00_popup_tail_left.png";
+                                       }
+                               }
+                               description {
+                                       state: "right" 0.0;
+                                       min: CTXPOPUP_ARROW_SIZE_INC;
+                                       max: CTXPOPUP_ARROW_SIZE_INC;
+                                       fixed: 1 1;
+                                       align: 0.0 0.5;
+                                       image {
+                                               normal: "white/common/00_popup_tail_right.png";
+                                       }
+                               }
+                               description {
+                                       state: "top" 0.0;
+                                       min: CTXPOPUP_ARROW_SIZE_INC;
+                                       max: CTXPOPUP_ARROW_SIZE_INC;
+                                       fixed: 1 1;
+                                       align: 0.5 1.0;
+                                       image {
+                                               normal: "white/common/00_popup_tail_top.png";
+                                       }
+                               }
+                               description {
+                                       state: "bottom" 0.0;
+                                       min: CTXPOPUP_ARROW_SIZE_INC;
+                                       max: CTXPOPUP_ARROW_SIZE_INC;
+                                       fixed: 1 1;
+                                       align: 0.5 0.0;
+                                       image {
+                                               normal: "white/common/00_popup_tail_bottom.png";
+                                       }
+                               }
+                       }
+               }
+               programs {
+                       program {
+                               name: "enable_left_arrow";
+                               signal: "elm,state,left";
+                               source: "elm";
+                               action: STATE_SET "left" 0.0;
+                               target: "ctxpopup_arrow";
+                       }
+                       program {
+                               name: "enable_right_arrow";
+                               signal: "elm,state,right";
+                               source: "elm";
+                               action: STATE_SET "right" 0.0;
+                               target: "ctxpopup_arrow";
+                       }
+                       program {
+                               name: "enable_top_arrow";
+                               signal: "elm,state,top";
+                               source: "elm";
+                               action: STATE_SET "top" 0.0;
+                               target: "ctxpopup_arrow";
+                       }
+                       program {
+                               name: "enable_bottom_arrow";
+                               signal: "elm,state,bottom";
+                               source: "elm";
+                               action: STATE_SET "bottom" 0.0;
+                               target: "ctxpopup_arrow";
+                       }
+               }
+       }
+///////////////////////////////////////////////////////////////////////////////
+       group {
+               name: "elm/ctxpopup/text_style_item/video/default";
+               parts {
+                       part {
+                               name: "event_blocker";
+                               mouse_events: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       color: 0 0 0 0;
+                               }
+                       }
+                       part {
+                               name: "bg";
+                               mouse_events: 0;
+                               type: RECT;
+                               description {
+                                       state: "default" 0.0;
+                                       color: CTXPOPUP_BG_COLOR_INC;
+                                       visible: 0;
+                               }
+                               description {
+                                       state: "clicked" 0.0;
+                                       color: CTXPOPUP_BG_PRESS_COLOR_INC;
+                                       visible: 1;
+                               }
+                       }
+                       part {
+                               name: "separator";
+                               mouse_events: 0;
+                               type: RECT;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       color: CTXPOPUP_SEPARATOR_COLOR_INC;
+                                       align: 0.5 0;
+                                       min: 1 0;
+                                       max: 1 999999;
+                                       visible: 0;
+                               }
+                               description {
+                                       state: "horizontal" 0.0;
+                                       color: CTXPOPUP_HORIZONTAL_SEPARATOR_COLOR_INC;
+                                       align: 0 0.5;
+                                       min: CTXPOPUP_HORIZONTAL_SEPARATOR_MIN_SIZE_INC;
+                                       max: CTXPOPUP_HORIZONTAL_SEPARATOR_MAX_SIZE_INC;
+                                       visible: 1;
+                               }
+                       description {
+                                       state: "vertical" 0.0;
+                                       color: CTXPOPUP_SEPARATOR_COLOR_INC;
+                                       align: 0.5 0;
+                                       min: 0 1;
+                                       max: 999999 1;
+                                       visible: 1;
+                               }
+                       }
+                       part {
+                               name: "left_padding";
+                               scale: 1;
+                               mouse_events: 0;
+                               description {
+                                       state: "default" 0.0;
+                                       min: 30 CTXPOPUP_ITEM_HEIGHT_INC;
+                                       max: 30 CTXPOPUP_ITEM_HEIGHT_INC;
+                                       align: 0 0.5;
+                                       fixed: 1 1;
+                                       visible: 0;
+                               }
+                       }
+                       part {
+                               name: "elm.text";
+                               type: TEXT;
+                               mouse_events: 0;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       min: 1 CTXPOPUP_ITEM_HEIGHT_INC;
+                                       max: (CTXPOPUP_CONTENT_WIDTH_MAX_INC-2*CTXPOPUP_ITEM_PADDING_INC) CTXPOPUP_ITEM_HEIGHT_INC;
+                                       fixed: 0 1;
+                                       align: 0.5 0.5;
+                                       rel1 {relative: 1.0 0.0; to: "left_padding";}
+                                       rel2 {relative: 0.0 1.0; to: "right_padding";}
+                                       color: CTXPOPUP_MAIN_TEXT_UNREAD_COLOR_INC;
+                                       text {
+                                               font: "SLP:style=Roman";
+                                               size: CTXPOPUP_ITEM_TEXT_SIZE_INC;
+                                               align: 0 0.5;
+                                               min: 1 1;
+                                               text_class: "list_item";
+                                       }
+                               }
+                               description {
+                                       state: "text_horizontal" 0.0;
+                                       inherit: "default" 0.0;
+                                       text {
+                                               size: CTXPOPUP_ITEM_MAIN_TEXT_SIZE_INC;
+                                               align: 0.5 0.5;
+                                               min: 1 1;
+                                       }
+                               }
+                               description {
+                                       state: "compress" 0.0;
+                                       inherit: "default" 0.0;
+                                       max: -1 -1;
+                                       text {
+                                               min: 0 1;
+                                       }
+                               }
+                               description {
+                                       state: "compress.text_horizontal" 0.0;
+                                       inherit: "default" 0.0;
+                                       max: -1 -1;
+                                       text {
+                                               size: CTXPOPUP_ITEM_MAIN_TEXT_SIZE_INC;
+                                               align: 0.5 0.5;
+                                               min: 0 1;
+                                       }
+                               }
+                               description {
+                                       state: "clicked" 0.0;
+                                       inherit: "default" 0.0;
+                                       color: CTXPOPUP_MAIN_TEXT_PRESS_COLOR_INC;
+                               }
+                               description {
+                                       state: "clicked.text_horizontal" 0.0;
+                                       inherit: "default" 0.0;
+                                       color: CTXPOPUP_MAIN_TEXT_PRESS_COLOR_INC;
+                                       text {
+                                               size: CTXPOPUP_ITEM_MAIN_TEXT_SIZE_INC;
+                                               align: 0.5 0.5;
+                                               min: 0 1;
+                                       }
+                               }
+                       }
+                       part {
+                               name: "right_padding";
+                               scale: 1;
+                               mouse_events: 0;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 0;
+                                       min: 30 CTXPOPUP_ITEM_HEIGHT_INC;
+                                       max: 30 CTXPOPUP_ITEM_HEIGHT_INC;
+                                       fixed: 1 0;
+                                       align: 1.0 0.5;
+                               }
+                       }
+                       part {
+                               name: "over1";
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               ignore_flags: ON_HOLD;
+                               description {
+                                       state: "default" 0.0;
+                               }
+                       }
+                       part {
+                               name: "over2";
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               description {
+                                       state: "default" 0.0;
+                               }
+                       }
+                       part {
+                               name: "disclip";
+                               type: RECT;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 0;
+                               }
+                               description {
+                                       state: "disabled" 0.0;
+                                       visible: 1;
+                                       color: CTXPOPUP_ITEM_DISABLED_COLOR;
+                               }
+                       }
+               }
+               programs {
+                       program {
+                               name: "item_unclick";
+                               signal: "mouse,up,1";
+                               source: "over1";
+                               action: SIGNAL_EMIT "elm,action,click" "";
+                       }
+                       program {
+                               name: "disable";
+                               signal: "elm,state,disabled";
+                               source: "elm";
+                               action: STATE_SET "disabled" 0.0;
+                               target: "disclip";
+                       }
+                       program {
+                               name: "enable";
+                               signal: "elm,state,enabled";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "disclip";
+                       }
+                       program {
+                               name: "default";
+                               signal: "elm,state,default";
+                               source: "elm";
+                               script {
+                                       set_state(PART:"separator", "default", 0.0);
+                               }
+                       }
+                       program {
+                               name: "compress";
+                               signal: "elm,state,compress";
+                               source: "elm";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"separator", st, 30, vl);
+                                       if (!strcmp(st, "horizontal"))
+                                               set_state(PART:"elm.text", "compress.text_horizontal", 0.0);
+                                       else
+                                               set_state(PART:"elm.text", "compress", 0.0);
+                               }
+                       }
+                       program {
+                               name: "vertical";
+                               signal: "elm,state,vertical";
+                               source: "elm";
+                               script {
+                                       set_state(PART:"separator", "vertical", 0.0);
+                                       set_state(PART:"elm.text", "vertical", 0.0);
+                               }
+                       }
+                       program {
+                               name: "horizontal";
+                               signal: "elm,state,horizontal";
+                               source: "elm";
+                               script {
+                                       set_state(PART:"separator", "horizontal", 0.0);
+                                       set_state(PART:"elm.text", "text_horizontal", 0.0);
+                               }
+                       }
+                       program {
+                               name: "text_horizontal";
+                               signal: "elm,state,text_horizontal";
+                               source: "elm";
+                               script {
+                                       set_state(PART:"separator", "default", 0.0);
+                                       set_state(PART:"elm.text", "text_horizontal", 0.0);
+                               }
+                       }
+                       program {
+                               name: "item_click2";
+                               signal: "mouse,down,1";
+                               source: "over2";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"separator", st, 30, vl);
+                                       if (!strcmp(st, "horizontal"))
+                                               set_state(PART:"elm.text", "clicked.text_horizontal", 0.0);
+                                       else
+                                               set_state(PART:"elm.text", "clicked", 0.0);
+                                       set_state(PART:"bg", "clicked", 0.0);
+                               }
+                       }
+                       program {
+                               name: "item_unclick2";
+                               signal: "mouse,up,1";
+                               source: "over2";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"separator", st, 30, vl);
+                                       if (!strcmp(st, "horizontal"))
+                                               set_state(PART:"elm.text", "compress.text_horizontal", 0.0);
+                                       else
+                                               set_state(PART:"elm.text", "compress", 0.0);
+                                       set_state(PART:"bg", "default", 0.0);
+                               }
+                       }
+               }
+       }
+///////////////////////////////////////////////////////////////////////////////
+       group {
+               name: "elm/ctxpopup/icon_style_item/video/default";
+               parts {
+                       part {
+                               name: "event_blocker";
+                               mouse_events: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       color: 0 0 0 0;
+                               }
+                       }
+                       part {
+                               name: "bg";
+                               scale: 1;
+                               mouse_events: 0;
+                               type: RECT;
+                               description {
+                                       state: "default" 0.0;
+                                       color: CTXPOPUP_BG_COLOR_INC;
+                                       visible: 0;
+                                       min: CTXPOPUP_ITEM_ICON_INC;
+                                       max: CTXPOPUP_ITEM_ICON_INC;
+                               }
+                               description {
+                                       state: "clicked" 0.0;
+                                       color: CTXPOPUP_BG_PRESS_COLOR_INC;
+                                       visible: 1;
+                               }
+                       }
+                       part {
+                               name: "left_top_padding";
+                               scale: 1;
+                               description {
+                                       min: (CTXPOPUP_ITEM_PADDING_INC * 2) CTXPOPUP_ITEM_PADDING_INC;
+                                       max: (CTXPOPUP_ITEM_PADDING_INC * 2) CTXPOPUP_ITEM_PADDING_INC;
+                                       visible: 0;
+                                       align: 0 0;
+                                       fixed: 1 1;
+                               }
+                       }
+                       part {
+                               name: "separator";
+                               mouse_events: 0;
+                               type: RECT;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       color: CTXPOPUP_SEPARATOR_COLOR_INC;
+                                       align: 0.5 0;
+                                       min: 1 0;
+                                       max: 1 999999;
+                                       visible: 0;
+                               }
+                               description {
+                                       state: "horizontal" 0.0;
+                                       color: CTXPOPUP_HORIZONTAL_SEPARATOR_COLOR_INC;
+                                       align: 0 0.5;
+                                       min: CTXPOPUP_HORIZONTAL_SEPARATOR_MIN_SIZE_INC;
+                                       max: CTXPOPUP_HORIZONTAL_SEPARATOR_MAX_SIZE_INC;
+                                       visible: 1;
+                               }
+                       description {
+                                       state: "vertical" 0.0;
+                                       color: CTXPOPUP_HORIZONTAL_SEPARATOR_COLOR_INC;
+                                       align: 0.5 0;
+                                       min: CTXPOPUP_VERTICAL_SEPARATOR_MIN_SIZE_INC;
+                                       max: CTXPOPUP_VERTICAL_SEPARATOR_MAX_SIZE_INC;
+                                       visible: 1;
+                               }
+                       }
+                       part {
+                               name: "elm.swallow.icon";
+                               type: SWALLOW;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       min: (CTXPOPUP_ICON_WIDTH_INC - 10) (CTXPOPUP_ICON_HEIGHT_INC - 10);
+                                       max: (CTXPOPUP_ICON_WIDTH_INC - 10) (CTXPOPUP_ICON_HEIGHT_INC - 10);
+                                       align: 0.5 0.5;
+                                       aspect: 1.0 1.0;
+                                       rel1 { to: "left_top_padding"; relative: 1 1; }
+                                       rel2 { to: "right_bottom_padding"; relative: 0 0; }
+                               }
+                       }
+                       part {
+                               name: "right_bottom_padding";
+                               scale: 1;
+                               description {
+                                       min: (CTXPOPUP_ITEM_PADDING_INC * 2) CTXPOPUP_ITEM_PADDING_INC;
+                                       max: (CTXPOPUP_ITEM_PADDING_INC * 2) CTXPOPUP_ITEM_PADDING_INC;
+                                       visible: 0;
+                                       align: 1 1;
+                                       fixed: 1 1;
+                               }
+                       }
+                       part {
+                               name: "over1";
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               ignore_flags: ON_HOLD;
+                               description {
+                                       state: "default" 0.0;
+                               }
+                       }
+                       part {
+                               name: "over2";
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               description {
+                                       state: "default" 0.0;
+                               }
+                       }
+                       part {
+                               name: "disclip";
+                               type: RECT;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 0;
+                               }
+                               description {
+                                       state: "disabled" 0.0;
+                                       visible: 1;
+                                       color: CTXPOPUP_ITEM_DISABLED_COLOR;
+                               }
+                       }
+               }
+               programs {
+                       program {
+                               name: "default";
+                               signal: "elm,state,default";
+                               source: "elm";
+                               script {
+                                       set_state(PART:"separator", "default", 0.0);
+                               }
+                       }
+                       program {
+                               name: "vertical";
+                               signal: "elm,state,vertical";
+                               source: "elm";
+                               script {
+                                       set_state(PART:"separator", "vertical", 0.0);
+                               }
+                       }
+                       program {
+                               name: "horizontal";
+                               signal: "elm,state,horizontal";
+                               source: "elm";
+                               script {
+                                       set_state(PART:"separator", "horizontal", 0.0);
+                               }
+                       }
+                       program {
+                               name: "item_unclick";
+                               signal: "mouse,up,1";
+                               source: "over1";
+                               action: SIGNAL_EMIT "elm,action,click" "";
+                       }
+                       program {
+                               name: "disable";
+                               signal: "elm,state,disabled";
+                               source: "elm";
+                               action: STATE_SET "disabled" 0.0;
+                               target: "disclip";
+                       }
+                       program {
+                               name: "enable";
+                               signal: "elm,state,enabled";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "disclip";
+                       }
+                       program {
+                               name: "item_click2";
+                               signal: "mouse,down,1";
+                               source: "over2";
+                               script {
+                                       set_state(PART:"bg", "clicked", 0.0);
+                               }
+                       }
+                       program {
+                               name: "item_unclick2";
+                               signal: "mouse,up,1";
+                               source: "over2";
+                               script {
+                                       set_state(PART:"bg", "default", 0.0);
+                               }
+                       }
+               }
+       }
+///////////////////////////////////////////////////////////////////////////////
+       group {
+               name: "elm/ctxpopup/icon_text_style_item/video/default";
+               parts {
+                       part {
+                               name: "event_blocker";
+                               mouse_events: 1;
+                               description {
+                                       state: "default" 0.0;
+                               }
+                       }
+                       part {
+                               name: "bg";
+                               mouse_events: 0;
+                               type: RECT;
+                               description {
+                                       state: "default" 0.0;
+                                       color: CTXPOPUP_BG_COLOR_INC;
+                                       visible: 0;
+                               }
+                               description {
+                                       state: "clicked" 0.0;
+                                       color: CTXPOPUP_BG_PRESS_COLOR_INC;
+                                       visible: 1;
+                               }
+                       }
+                       part {
+                               name: "icon_left_padding";
+                               scale: 1;
+                               mouse_events: 0;
+                               description {
+                                       state: "default" 0.0;
+                                       min: CTXPOPUP_ITEM_PADDING_INC CTXPOPUP_ITEM_HEIGHT_INC;
+                                       max: CTXPOPUP_ITEM_PADDING_INC CTXPOPUP_ITEM_HEIGHT_INC;
+                                       align: 0 0;
+                                       fixed: 1 1;
+                                       visible: 0;
+                               }
+                       }
+                       part {
+                               name: "separator";
+                               mouse_events: 0;
+                               type: RECT;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       color: CTXPOPUP_SEPARATOR_COLOR_INC;
+                                       align: 0.5 0;
+                                       min: 1 0;
+                                       max: 1 999999;
+                                       visible: 0;
+                               }
+                               description {
+                                       state: "horizontal" 0.0;
+                                       color: CTXPOPUP_HORIZONTAL_SEPARATOR_COLOR_INC;
+                                       align: 0 0.5;
+                                       min: CTXPOPUP_HORIZONTAL_SEPARATOR_MIN_SIZE_INC;
+                                       max: CTXPOPUP_HORIZONTAL_SEPARATOR_MAX_SIZE_INC;
+                                       visible: 1;
+                               }
+                       description {
+                                       state: "vertical" 0.0;
+                                       color: CTXPOPUP_SEPARATOR_COLOR_INC;
+                                       align: 0.5 0;
+                                       min: 0 1;
+                                       max: 999999 1;
+                                       visible: 1;
+                               }
+                       }
+                       part {
+                               name: "elm.swallow.icon";
+                               type: SWALLOW;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       min: CTXPOPUP_ICON_WIDTH_INC CTXPOPUP_ICON_HEIGHT_INC;
+                                       max: CTXPOPUP_ICON_WIDTH_INC CTXPOPUP_ICON_HEIGHT_INC;
+                                       align: 0 0.5;
+                                       aspect: 1.0 1.0;
+                                       rel1 { to:"icon_left_padding"; relative: 1 0; }
+                               }
+                       }
+                       part {
+                               name: "icon_right_padding";
+                               scale: 1;
+                               mouse_events: 0;
+                               description {
+                                       state: "default" 0.0;
+                                       min: CTXPOPUP_ITEM_PADDING_INC CTXPOPUP_ITEM_HEIGHT_INC;
+                                       max: CTXPOPUP_ITEM_PADDING_INC CTXPOPUP_ITEM_HEIGHT_INC;
+                                       align: 0 0.5;
+                                       fixed: 1 1;
+                                       visible: 0;
+                                       rel1 { to:"elm.swallow.icon"; relative: 1 1; }
+                               }
+                       }
+                       part {
+                               name: "elm.text";
+                               type:  TEXT;
+                               mouse_events:  0;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       min: 1 CTXPOPUP_ITEM_HEIGHT_INC;
+                                       max: (CTXPOPUP_CONTENT_WIDTH_MAX_INC-(3*CTXPOPUP_ITEM_PADDING_INC)-CTXPOPUP_ICON_WIDTH_INC) CTXPOPUP_ITEM_HEIGHT_INC;
+                                       fixed: 0 1;
+                                       align: 0.5 0.5;
+                                       rel1 {relative: 1.0 0.0; to_x: "icon_right_padding";}
+                                       rel2 {relative: 0.0 1.0; to_x: "text_right_padding";}
+                                       color: CTXPOPUP_MAIN_TEXT_UNREAD_COLOR_INC;
+                                       text {
+                                               font: "SLP:style=Roman";
+                                               size: CTXPOPUP_ITEM_TEXT_SIZE_INC;
+                                               align: 0.0 0.5;
+                                               min: 1 1;
+                                               text_class: "list_item";
+                                       }
+                               }
+                               description {
+                                       state: "compress" 0.0;
+                                       inherit: "default" 0.0;
+                                       max: -1 -1;
+                                       text {
+                                               min: 0 1;
+                                       }
+                               }
+                               description {
+                                       state: "clicked" 0.0;
+                                       inherit: "default" 0.0;
+                                       color: CTXPOPUP_MAIN_TEXT_PRESS_COLOR_INC;
+                               }
+                       }
+                       part {
+                               name: "text_right_padding";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 0;
+                                       min: CTXPOPUP_ITEM_PADDING_INC CTXPOPUP_ITEM_HEIGHT_INC;
+                                       max: CTXPOPUP_ITEM_PADDING_INC CTXPOPUP_ITEM_HEIGHT_INC;
+                                       fixed: 1 0;
+                                       align: 1.0 0.5;
+                       }
+                       }
+                       part {
+                               name: "over1";
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               ignore_flags: ON_HOLD;
+                               description {
+                                       state: "default" 0.0;
+                               }
+                       }
+                       part {
+                               name: "over2";
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               description {
+                                       state: "default" 0.0;
+                               }
+                       }
+                       part {
+                               name: "disclip";
+                               type: RECT;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 0;
+                               }
+                               description {
+                                       state: "disabled" 0.0;
+                                       visible: 1;
+                                       color: CTXPOPUP_ITEM_DISABLED_COLOR;
+                               }
+                       }
+               }
+               programs {
+                       program {
+                               name: "item_unclick";
+                               signal: "mouse,up,1";
+                               source: "over1";
+                               action: SIGNAL_EMIT "elm,action,click" "";
+                       }
+                       program {
+                               name: "disable";
+                               signal: "elm,state,disabled";
+                               source: "elm";
+                               action: STATE_SET "disabled" 0.0;
+                               target: "disclip";
+                       }
+                       program {
+                               name: "enable";
+                               signal: "elm,state,enabled";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "disclip";
+                       }
+                       program {
+                               name: "default";
+                               signal: "elm,state,default";
+                               source: "elm";
+                               script {
+                                       set_state(PART:"separator", "default", 0.0);
+                               }
+                       }
+                       program {
+                               name: "compress";
+                               signal: "elm,state,compress";
+                               source: "elm";
+                               action: STATE_SET "compress" 0.0;
+                               target: "elm.text";
+                       }
+                       program {
+                               name: "vertical";
+                               signal: "elm,state,vertical";
+                               source: "elm";
+                               script {
+                                       set_state(PART:"separator", "vertical", 0.0);
+                               }
+                       }
+                       program {
+                               name: "horizontal";
+                               signal: "elm,state,horizontal";
+                               source: "elm";
+                               script {
+                                       set_state(PART:"separator", "horizontal", 0.0);
+                               }
+                       }
+                       program {
+                               name: "item_click2";
+                               signal: "mouse,down,1";
+                               source: "over2";
+                               script {
+                                       set_state(PART:"elm.text", "clicked", 0.0);
+                                       set_state(PART:"bg", "clicked", 0.0);
+                               }
+                       }
+                       program {
+                               name: "item_unclick2";
+                               signal: "mouse,up,1";
+                               source: "over2";
+                               script {
+                                       set_state(PART:"elm.text", "compress", 0.0);
+                                       set_state(PART:"bg", "default", 0.0);
+                               }
+                       }
+               }
+       }
+
+
+
+
diff --git a/res/edc/vp-custom-winset-style.edc b/res/edc/vp-custom-winset-style.edc
new file mode 100755 (executable)
index 0000000..7579320
--- /dev/null
@@ -0,0 +1,11 @@
+#include "image_res.edc"
+
+collections {
+       #include "vp-button-white.edc"
+       #include "vp-controlbar.edc"
+       #include "vp-naviframe_white.edc"
+       #include "vp-layout.edc"
+       #include "vp-check.edc"
+       #include "vp-progressbar-list.edc"
+       #include "vp-ctxpopup.edc"
+}
diff --git a/res/edc/vp-layout.edc b/res/edc/vp-layout.edc
new file mode 100755 (executable)
index 0000000..b4752b8
--- /dev/null
@@ -0,0 +1,178 @@
+   /*************************************************/
+   /* elm_layout -> video style                     */
+   /*************************************************/
+
+group {
+       name: "elm/layout/application/video";
+       parts {
+               part {
+                       name: "elm.swallow.bg";
+                       type: RECT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: 0.0 0.0;}
+                               rel2 { relative: 1.0 1.0;}
+                               color: 0 0 0 0;
+                       }
+               }
+               part {
+                       name: "indicator";
+                       type: RECT;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               min: 0 50;
+                               max: 999999 50;
+                               fixed: 0 1;
+                               align: 0.5 0;
+                               color: 0 0 0 255;
+                       }
+               }
+
+               part {
+               name: "elm.swallow.pixmap";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: 0.0 0.0; }
+                               rel2 { relative: 1.0 1.0; }
+                       }
+               }
+               part {
+                       name: "elm.swallow.event";
+                       type: SWALLOW;
+                       mouse_events: 1;
+                       repeat_events : 1;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: 0.0 0.0; }
+                               rel2 { relative: 1.0 1.0; }
+                       }
+               }
+               part {
+                       name: "elm.swallow.subtitle";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: 0.0 0.0; }
+                               rel2 { relative: 1.0 1.0; }
+                       }
+               }
+               part {
+                       name: "elm.swallow.content";
+                       type: SWALLOW;
+                       scale: 1;
+                       mouse_events: 1;
+                       repeat_events : 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1.to_y: "indicator";
+                               rel1.relative: 0.0 1.0;
+                       }
+               }
+               part {
+                       name: "elm.swallow.subtitle.sync";
+                       type: SWALLOW;
+                       scale: 1;
+                       mouse_events: 1;
+                       description {
+                               state: "default" 0.0;
+                               visible: 1;
+                               rel1 { relative: 0.0 0.0; }
+                               rel2 { relative: 1.0 1.0; }
+                       }
+               }
+               part {
+                       name: "elm.swallow.controlbar";
+                       type: SWALLOW;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                       }
+               }
+       } /* parts */
+} /* group */
+
+group {
+       name: "elm/layout/application/video_no_indicator";
+       parts {
+               part {
+                       name: "elm.swallow.bg";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               color: 0 0 0 255;
+                       }
+               }
+               part {
+               name: "elm.swallow.pixmap";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: 0.0 0.0; }
+                               rel2 { relative: 1.0 1.0; }
+                       }
+               }
+
+               part {
+                       name: "elm.swallow.event";
+                       type: SWALLOW;
+                       mouse_events: 1;
+                       repeat_events : 1;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: 0.0 0.0; }
+                               rel2 { relative: 1.0 1.0; }
+                       }
+               }
+               part {
+                       name: "elm.swallow.subtitle";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: 0.0 0.0; }
+                               rel2 { relative: 1.0 1.0; }
+                       }
+               }
+               part {
+                       name: "elm.swallow.content";
+                       type: SWALLOW;
+                       mouse_events: 1;
+                       repeat_events : 1;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                       }
+               }
+               part {
+                       name: "elm.swallow.subtitle.sync";
+                       type: SWALLOW;
+                       scale: 1;
+                       mouse_events: 1;
+                       description {
+                               state: "default" 0.0;
+                               visible: 1;
+                               rel1 { relative: 0.0 0.0; }
+                               rel2 { relative: 1.0 1.0; }
+                       }
+               }
+               part {
+                       name: "elm.swallow.controlbar";
+                       type: SWALLOW;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                       }
+               }
+       } /* parts */
+} /* group */
+
+
diff --git a/res/edc/vp-naviframe.edc b/res/edc/vp-naviframe.edc
new file mode 100755 (executable)
index 0000000..49bde21
--- /dev/null
@@ -0,0 +1,4830 @@
+#include "image_res.edc"
+
+#define NAVIFRAME_TITLE_H_INC_PORTRATE 90
+#define NAVIFRAME_TITLE_H_INC_LANDSCAPE 72
+
+#define NAVIFRAME_TITLE_H_INC 100
+#define NAVIFRAME_SEGMENT_TITLE_H_INC 136
+#define NAVIFRAME_OH_OPENED_H_INC 106
+#define NAVIFRAME_OH_CONTENT_H_INC 74
+#define NAVIFRAME_OH_PADDING_INC 16
+#define NAVIFRAME_OH_ARROW_SIZE_INC 19 12
+#define NAVIFRAME_OH_OPENED_DOUBLE_H_INC 196
+#define NAVIFRAME_PREV_BTN_W_INC 124
+#define NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 10
+#define NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC 124 80
+#define NAVIFRAME_TITLE_PREV_BTN_BG_SIZE_INC 144
+#define NAVIFRAME_TEXT_PADDING_INC 144
+#define NAVIFRAME_NO_BUTTON_ICON_PADDING_INC 52
+#define NAVIFRAME_TEXT_PADDING_ICON_VISIBLE_INC 186
+#define NAVIFRAME_TITLE_SEGMENT_H_INC 74
+#define NAVIFRAME_TITLE_SEGMENT_FONT_SIZE_INC 28
+#define NAVIFRAME_TITLE_SEGMENT_TEXT_H_INC 50
+#define NAVIFRAME_TITLE_FONT_SIZE_INC 36
+#define NAVIFRAME_ICON_SIZE_INC 32 32
+#define NAVIFRAME_ICON_PADDING_INC 16 0
+#define NAVIFRAME_CONTROLBAR_BG_COLOR_INC 37 48 54 255
+#define NAVIFRAME_TITLE_TEXT_COLOR_INC 235 236 237 255
+#define NAVIFRAME_TITLE_BG_COLOR_INC 50 65 74 255
+#define NAVIFRAME_OH_BORDER_INC 0 0 4 0
+
+#define CONTROLBAR_LARGE_HEIGHT_INC 122
+#define CONTROLBAR_SMALL_HEIGHT_INC 102
+#define CONTROLBAR_WIDTH_INC 122
+
+
+#define NAVIFRAME_VIEW_TRANS_TIME 0.3
+
+   group { name:"elm/naviframe/base/video/default";
+      parts {
+         part { name: "base";
+            description { state: "default" 0.0;
+            }
+         }
+      }
+   }
+   group { name:"elm/naviframe/item/video/basic/default";
+      alias:"elm/naviframe/item/video/1line/default";
+      images {
+          image: "naviframe_optionheader.png" COMP;
+          image: "naviframe_optionheader_arrow.png" COMP;
+          image: "T01_title_bg.png" COMP;
+                 image: "T01_title_bg_h.png" COMP;
+      }
+      script {
+         public oh_show = 0;     //optionheader show/hide
+         public oh_close = 0;    //optionheader close/open
+         public cbar_bg = 0;     //Controlbar BG Show call count
+         public left_btn_visible = 0; //whether left btn is shown
+         public icon_visible = 0; //whether icon is shown
+         public right_btn_visible = 0; //whether right btn is shown
+         public more_btn_visible = 0; //whether more btn is shown
+         public large_padded_center_align = 0; //large padding based on button size for center align for 1/2 buttons.
+      }
+      parts {
+         part { name: "base";
+            type: RECT;
+            mouse_events:  0;
+            description { state: "default" 0.0;
+               visible: 0;
+            }
+            description { state: "left" 0.0;
+               inherit: "default" 0.0;
+               rel1.relative: -1.0 0.0;
+               rel2.relative: 0.0 1.0;
+            }
+            description { state: "right" 0.0;
+               inherit: "default" 0.0;
+               rel1.relative: 1.0 0.0;
+               rel2.relative: 2.0 1.0;
+            }
+         }
+         part { name: "title_bg";
+            type: IMAGE;                       // ORIGINAL - type: RECT;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 1 NAVIFRAME_TITLE_H_INC_PORTRATE;          // ORIGINAL - min: 1 NAVIFRAME_TITLE_H_INC
+               align: 0.0 0.0;
+               fixed: 0 1;
+               rel1 { relative: 0.0 0.0; to: "base"; }
+               rel2 { relative: 1.0 0.0; to: "base"; }
+               image { normal: "T01_title_bg.png"; }           // ORIGINAL - color: NAVIFRAME_TITLE_BG_COLOR_INC;
+            }
+            description { state: "hide" 0.0;
+               inherit: "default" 0.0;
+               min: 0 0;
+               max: 0 0;
+               fixed: 1 1;
+            }
+            description { state: "landscape" 0.0;
+               inherit: "default" 0.0;
+               min: 1 NAVIFRAME_TITLE_H_INC_LANDSCAPE;
+               image { normal: "T01_title_bg_h.png"; }
+            }
+         }
+         part { name: "title_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1 { to: "title_bg"; }
+               rel2 { to: "title_bg"; }
+            }
+         }
+         part { name: "optionheader_bg";
+            type: IMAGE;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 1 0;
+               align: 0.5 0;
+               fixed: 0 1;
+               rel1.to: "title_bg";
+               rel1.relative: 0 1;
+               rel2.to: "title_bg";
+               visible: 0;
+               image { normal: "naviframe_optionheader.png";
+                  border: NAVIFRAME_OH_BORDER_INC;
+               }
+            }
+            description { state: "show" 0.0;
+               inherit: "default" 0.0;
+               min: 1 NAVIFRAME_OH_OPENED_H_INC;
+               visible: 1;
+            }
+            description { state: "hide" 0.0;
+               inherit: "default" 0.0;
+               min: 0 0;
+               max: 0 0;
+               fixed: 1 1;
+            }
+         }
+         part { name: "optionheader_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1 { to: "optionheader_bg"; }
+               rel2 { to: "optionheader_bg"; }
+            }
+         }
+         part { name: "optionheader_top_padding";
+            type: RECT;
+            scale: 1;
+            clip_to: "optionheader_clip";
+            description { state: "default" 0.0;
+               min: 0 NAVIFRAME_OH_PADDING_INC;
+               rel1 { relative: 0.0 0.0; to: "optionheader_bg"; }
+               rel2 { relative: 1.0 0.0; to: "optionheader_bg"; }
+               fixed: 0 1;
+               align: 0.0 0.0;
+               visible: 0;
+            }
+         }
+         part { name: "optionheader";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "optionheader_clip";
+            description { state: "default" 0.0;
+               min: 0 NAVIFRAME_OH_CONTENT_H_INC;
+               rel1 { relative: 0.0 1.0; to: "optionheader_top_padding"; }
+               rel2 { relative: 1.0 1.0; to: "optionheader_top_padding"; }
+               fixed: 0 1;
+               align: 0.0 0.0;
+            }
+         }
+         part { name: "optionheader_bottom_padding";
+            type: RECT;
+            scale: 1;
+            clip_to: "optionheader_clip";
+            description { state: "default" 0.0;
+               min: 0 NAVIFRAME_OH_PADDING_INC;
+               rel1 { relative: 0.0 1.0; to: "optionheader"; }
+               rel2 { relative: 1.0 1.0; to: "optionheader"; }
+               fixed: 0 1;
+               align: 0.0 0.0;
+               visible: 0;
+            }
+         }
+         part { name: "elm.swallow.content";
+            type: SWALLOW;
+            scale: 1;
+            repeat_events: 0;
+            clip_to: "content_clip";
+            description { state: "default" 0.0;
+               align: 0.0 0.0;
+               rel1.relative: 0.0 1.0;
+               rel1.to_x: "base";
+               rel1.to_y: "optionheader_bg";
+               rel2.relative: 1.0 0.0;
+               rel2.to_x: "base";
+               rel2.to_y: "controlbar_bg";
+            }
+         }
+         part { name: "content_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1.to: "elm.swallow.content";
+               rel2.to: "elm.swallow.content";
+            }
+         }
+         part { name: "padding_before_left_btn";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+               fixed: 1 0;
+               align: 0.0 0.5;
+               rel1 { relative: 0.0 0.0; to: "title_bg"; }
+               rel2 { relative: 0.0 1.0; to: "title_bg"; }
+               visible: 0;
+            }
+         }
+         part { name: "padding_after_left_btn";
+            type: RECT;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+               fixed: 1 0;
+               align: 0 0.5;
+               rel1 { relative: 1.0 0.0; to: "title_left_btn"; }
+               rel2 { relative: 1.0 1.0; to: "title_left_btn"; }
+               visible: 0;
+            }
+         }
+         part { name: "padding_before_more_btn";
+            type: RECT;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+               fixed: 1 0;
+               align: 1.0 0.5;
+               rel1 { relative: 0.0 0.0; to: "title_more_btn"; }
+               rel2 { relative: 0.0 1.0; to: "title_more_btn"; }
+               visible: 0;
+            }
+         }
+         part { name: "padding_after_right_btn";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+               fixed: 1 0;
+               align: 1.0 0.5;
+               rel1 { relative: 1.0 0.0; to: "title_bg"; }
+               rel2 { relative: 1.0 1.0; to: "title_bg"; }
+               visible: 0;
+            }
+         }
+         part { name: "padding_before_right_btn";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: 0 0;
+               fixed: 1 0;
+               align: 1.0 0.5;
+               rel1 { relative: 0.0 0.0; to: "title_right_btn"; }
+               rel2 { relative: 0.0 1.0; to: "title_right_btn"; }
+               visible: 0;
+            }
+            description { state: "right_and_more_button" 0.0;
+               inherit: "default" 0.0;
+               min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+            }
+         }
+         part { name: "padding_before_text";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               align: 1.0 0.5;
+               rel1 { relative: 0.0 0.0; to_x: "elm.text.title"; to_y: "title_bg"; }
+               rel2 { relative: 0.0 1.0; to_x: "elm.text.title"; to_y: "title_bg"; }
+               fixed: 1 0;
+               min: NAVIFRAME_ICON_PADDING_INC;
+               visible: 0;
+            }
+         }
+         part { name: "padding_center_text1";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+               fixed: 1 0;
+               align: 0.0 0.0;
+               rel1 { relative: 0.0 0.0; to: "title_bg"; }
+               rel2 { relative: 0.0 1.0; to: "title_bg"; }
+               visible: 0;
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               min: NAVIFRAME_TEXT_PADDING_INC 0;
+            }
+            description { state: "icon" 0.0;
+               inherit: "default" 0.0;
+               min: NAVIFRAME_NO_BUTTON_ICON_PADDING_INC 0;
+            }
+            description { state: "icon_left_button" 0.0;
+               inherit: "default" 0.0;
+               min: NAVIFRAME_TEXT_PADDING_ICON_VISIBLE_INC 0;
+            }
+         }
+         part { name: "padding_center_text2";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+               fixed: 1 0;
+               align: 1.0 0.5;
+               rel1 { relative: 1.0 0.0; to: "title_bg"; }
+               rel2 { relative: 1.0 1.0; to: "title_bg"; }
+               visible: 0;
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               min: NAVIFRAME_TEXT_PADDING_INC 0;
+            }
+         }
+         part { name: "elm.text.title";
+            type: TEXT;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               text { font: "SLP:style=Medium";
+                  text_class: "slp_medium";
+                  size: NAVIFRAME_TITLE_FONT_SIZE_INC;
+                  min: 0 0;
+                  max: 1 0;
+                  align: 0.5 0.5;
+               }
+               color: NAVIFRAME_TITLE_TEXT_COLOR_INC;
+               align: 0.5 0.5;
+               fixed: 1 0;
+               rel1 { relative: 1.0 0.0; to: "padding_center_text1"; }
+               rel2 { relative: 0.0 1.0; to: "padding_center_text2"; }
+            }
+            description { state: "right_and_more_button" 0.0;
+               inherit: "default" 0.0;
+               rel1 { relative: 1.0 0.0; to: "padding_after_left_btn"; }
+               rel2 { relative: 0.0 1.0; to: "padding_before_more_btn"; }
+            }
+         }
+         part { name: "elm.swallow.icon";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               max: NAVIFRAME_ICON_SIZE_INC;
+               fixed: 1 1;
+               rel1 { relative: 0.0 0.0; to: "padding_before_text"; }
+               rel2 { relative: 0.0 1.0; to: "padding_before_text"; }
+               aspect: 1.0 1.0;
+               aspect_preference: VERTICAL;
+               align: 1.0 0.5;
+            }
+         }
+         part { name: "click_event_area";
+             ignore_flags: ON_HOLD;
+             repeat_events: 1;
+             description { state: "default" 0.0;
+                rel1 { to: "title_bg"; }
+                rel2 { to: "title_bg"; }
+             }
+         }
+         part { name: "title_left_btn";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+               fixed: 1 1;
+               align: 0 0.5;
+               rel1 { relative: 1.0 0.0; to: "padding_before_left_btn"; }
+               rel2 { relative: 1.0 1.0; to: "padding_before_left_btn"; }
+            }
+         }
+         part { name: "title_right_btn";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+               align: 1 0.5;
+               fixed: 1 1;
+               rel1 { relative: 0.0 0.0; to: "padding_after_right_btn"; }
+               rel2 { relative: 0.0 1.0; to: "padding_after_right_btn"; }
+            }
+         }
+         part { name: "title_more_btn";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+               fixed: 1 1;
+               align: 1 0.5;
+               rel1 { relative: 0.0 0.0; to: "padding_before_right_btn"; }
+               rel2 { relative: 0.0 1.0; to: "padding_before_right_btn"; }
+            }
+         }
+         part { name: "optionheader_arrow";
+            type: IMAGE;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: NAVIFRAME_OH_ARROW_SIZE_INC;
+               max: NAVIFRAME_OH_ARROW_SIZE_INC;
+               fixed: 1 1;
+               align: 0.5 0.0;
+               rel1 { relative: 0.0 1.025; to: "title_more_btn"; }
+               rel2 { relative: 1.0 1.025; to: "title_more_btn"; }
+               image.normal: "naviframe_optionheader_arrow.png";
+               color: 255 255 255 0;
+            }
+            description { state: "show" 0.0;
+               inherit: "default" 0.0;
+               color: 255 255 255 255;
+            }
+         }
+         part { name: "controlbar_bg";
+            type: RECT;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 0 0;
+               max: 999999 0;
+               fixed: 0 1;
+               align: 0.0 1.0;
+               visible: 0;
+               rel1 { to: "base"; }
+               rel2 { to: "base"; }
+               color: NAVIFRAME_CONTROLBAR_BG_COLOR_INC;
+            }
+            description { state: "show" 0.0;
+               inherit: "default" 0.0;
+               min: 0 CONTROLBAR_SMALL_HEIGHT_INC;
+               max: 999999 CONTROLBAR_SMALL_HEIGHT_INC;
+               visible: 1;
+            }
+         }
+         part { name: "controlbar_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1.to: "controlbar_bg";
+               rel2.to: "controlbar_bg";
+            }
+         }
+         part { name: "elm.prev_btn_bg";
+            type: RECT;
+            scale: 1;
+            clip_to: "controlbar_clip";
+            description { state: "default" 0.0;
+               min: 0 0;
+               fixed: 1 0;
+               align: 1.0 0.0;
+               rel1 { relative: 1.0 0.0; to: "controlbar_bg"; }
+               rel2.to: "controlbar_bg";
+               visible: 0;
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               min: NAVIFRAME_TITLE_PREV_BTN_BG_SIZE_INC 0;
+            }
+         }
+         part { name: "elm.swallow.prev_btn";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "controlbar_clip";
+            description { state: "default" 0.0;
+               fixed: 1 1;
+               align: 0.5 0.5;
+               rel1.to: "elm.prev_btn_bg";
+               rel2.to: "elm.prev_btn_bg";
+            }
+         }
+         part { name: "controlbar";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "controlbar_clip";
+            description { state: "default" 0.0;
+               fixed: 1 1;
+               rel1.to: "controlbar_bg";
+               rel2 { relative: 0.0 1.0; to: "elm.prev_btn_bg"; }
+            }
+         }
+      }
+      programs {
+         program { name: "content_new_pushed";
+            signal: "elm,state,new,pushed,internal";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "base";
+            transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+            after: "show_finished";
+         }
+         program { name: "content_cur_pushed";
+            signal: "elm,state,cur,pushed,internal";
+            source: "";
+            action: STATE_SET "left" 0.0;
+            target: "base";
+            transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+            after: "pushed_finished";
+         }
+         program { name: "content_prev_popped";
+            signal: "elm,state,prev,popped,internal";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "base";
+            transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+            after: "show_finished";
+         }
+         program { name: "content_cur_popped";
+            signal: "elm,state,cur,popped,internal";
+            source: "";
+            action: STATE_SET "right" 0.0;
+            target: "base";
+            transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+            after: "popped_finished";
+         }
+         program { name: "cur_pushed";
+            signal: "elm,state,cur,pushed";
+            source: "elm";
+            script {
+               set_state(PART:"base", "default", 0.0);
+               emit("elm,state,cur,pushed,internal", "");
+            }
+         }
+         program { name: "new_pushed";
+            signal: "elm,state,new,pushed";
+            source: "elm";
+            script {
+               set_state(PART:"base", "right", 0.0);
+               emit("elm,state,new,pushed,internal", "");
+            }
+         }
+         program { name: "prev_popped";
+            signal: "elm,state,prev,popped";
+            source: "elm";
+            script {
+               set_state(PART:"base", "left", 0.0);
+               emit("elm,state,prev,popped,internal", "");
+            }
+         }
+         program { name: "cur_popped";
+            signal: "elm,state,cur,popped";
+            source: "elm";
+            script {
+               set_state(PART:"base", "default", 0.0);
+               emit("elm,state,cur,popped,internal", "");
+            }
+         }
+         program { name: "visible";
+            signal: "elm,state,visible";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "base";
+         }
+         program { name: "title_show";
+            signal: "elm,state,title,show";
+            source: "elm";
+            script {
+               set_state(PART:"title_bg", "default", 0.0);
+               if (get_int(oh_show) == 1) {
+                  if (get_int(oh_close) == 1) {
+                     emit("elm,state,optionheader,instant_close", "");
+                  }else {
+                     emit("elm,state,optionheader,instant_open", "");
+                  }
+               }
+               else
+                 set_state(PART:"optionheader_bg", "default", 0.0);
+            }
+         }
+         program { name: "title_hide";
+            signal: "elm,state,title,hide";
+            source: "elm";
+            action: STATE_SET "hide" 0.0;
+            target: "title_bg";
+            target: "optionheader_bg";
+         }
+         program { name: "prev_btn_show";
+            signal: "elm,state,prev_btn,show";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,show", "elm");
+               set_state(PART:"elm.prev_btn_bg", "visible", 0.0);
+            }
+         }
+         program { name: "prev_btn_hide";
+            signal: "elm,state,prev_btn,hide";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,hide", "elm");
+               set_state(PART:"elm.prev_btn_bg", "default", 0.0);
+            }
+         }
+         program { name: "left_btn_show";
+            signal: "elm,state,title_left_btn,show";
+            source: "elm";
+            script {
+               set_int(left_btn_visible, 1);
+               if (get_int(icon_visible) == 1)
+                 set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+               else
+                 set_state(PART:"padding_center_text1", "visible", 0.0);
+               if ((get_int(more_btn_visible) == 1) && (get_int(right_btn_visible) == 1)) {
+                  set_state(PART:"elm.text.title", "right_and_more_button", 0.0);
+                  set_int(large_padded_center_align, 0);
+               }
+               else {
+                  set_state(PART:"padding_center_text2", "visible", 0.0);
+                  set_int(large_padded_center_align, 1);
+               }
+            }
+         }
+         program { name: "left_btn_hide";
+            signal: "elm,state,title_left_btn,hide";
+            source: "elm";
+            script {
+               set_int(left_btn_visible, 0);
+               if ((get_int(more_btn_visible) == 0) && (get_int(right_btn_visible) == 0)) {
+                  set_state(PART:"padding_center_text2", "default", 0.0);
+                  set_int(large_padded_center_align, 0);
+               }
+               else {
+                  set_state(PART:"padding_center_text2", "visible", 0.0);
+                  set_int(large_padded_center_align, 1);
+               }
+               if ((get_int(large_padded_center_align) == 1) && (get_int(icon_visible) == 1))
+                  set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+               else if (get_int(large_padded_center_align) == 1)
+                  set_state(PART:"padding_center_text1", "visible", 0.0);
+               else if (get_int(icon_visible) == 1)
+                  set_state(PART:"padding_center_text1", "icon", 0.0);
+               else
+                  set_state(PART:"padding_center_text1", "default", 0.0);
+            }
+         }
+         program { name: "right_btn_show";
+            signal: "elm,state,title_right_btn,show";
+            source: "elm";
+            script {
+               set_int(right_btn_visible, 1);
+               if (get_int(more_btn_visible) == 1) {
+                  set_state(PART:"elm.text.title", "right_and_more_button", 0.0);
+                  set_state(PART:"padding_before_right_btn", "right_and_more_button", 0.0);
+                  set_int(large_padded_center_align, 0);
+               }
+               else {
+                  set_state(PART:"padding_center_text2", "visible", 0.0);
+                  set_int(large_padded_center_align, 1);
+               }
+               if ((get_int(icon_visible) == 1) && ((get_int(left_btn_visible) == 1) ||
+                                                    (get_int(large_padded_center_align) == 1)))
+                 set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+               else if ((get_int(left_btn_visible) == 1) || (get_int(large_padded_center_align) == 1))
+                 set_state(PART:"padding_center_text1", "visible", 0.0);
+               else if (get_int(icon_visible) == 1)
+                 set_state(PART:"padding_center_text1", "icon", 0.0);
+               else
+                 set_state(PART:"padding_center_text1", "default", 0.0);
+            }
+         }
+         program { name: "right_btn_hide";
+            signal: "elm,state,title_right_btn,hide";
+            source: "elm";
+            script {
+               set_int(right_btn_visible, 0);
+               set_state(PART:"padding_before_right_btn", "default", 0.0);
+               if ((get_int(more_btn_visible) == 0) && (get_int(left_btn_visible) == 0)) {
+                  set_state(PART:"padding_center_text2", "default", 0.0);
+                  set_int(large_padded_center_align, 0);
+               }
+               else {
+                  set_state(PART:"padding_center_text2", "visible", 0.0);
+                  set_int(large_padded_center_align, 1);
+               }
+               if ((get_int(large_padded_center_align) == 1) && (get_int(icon_visible) == 1))
+                  set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+               else if (get_int(large_padded_center_align) == 1)
+                  set_state(PART:"padding_center_text1", "visible", 0.0);
+               else if (get_int(icon_visible) == 1)
+                  set_state(PART:"padding_center_text1", "icon", 0.0);
+               else
+                  set_state(PART:"padding_center_text1", "default", 0.0);
+            }
+         }
+         program { name: "more_btn_show";
+            signal: "elm,state,title_more_btn,show";
+            source: "elm";
+            script {
+               set_int(more_btn_visible, 1);
+               if (get_int(right_btn_visible) == 1) {
+                  set_state(PART:"elm.text.title", "right_and_more_button", 0.0);
+                  set_state(PART:"padding_before_right_btn", "right_and_more_button", 0.0);
+                  set_int(large_padded_center_align, 0);
+               }
+               else {
+                  set_state(PART:"padding_center_text2", "visible", 0.0);
+                  set_int(large_padded_center_align, 1);
+               }
+               if ((get_int(icon_visible) == 1) && ((get_int(left_btn_visible) == 1) ||
+                                                    (get_int(large_padded_center_align) == 1)))
+                 set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+               else if ((get_int(left_btn_visible) == 1) || (get_int(large_padded_center_align) == 1))
+                 set_state(PART:"padding_center_text1", "visible", 0.0);
+               else if (get_int(icon_visible) == 1)
+                 set_state(PART:"padding_center_text1", "icon", 0.0);
+               else
+                 set_state(PART:"padding_center_text1", "default", 0.0);
+            }
+         }
+         program { name: "more_btn_hide";
+            signal: "elm,state,title_more_btn,hide";
+            source: "elm";
+            script {
+               set_int(more_btn_visible, 0);
+               set_state(PART:"padding_before_right_btn", "default", 0.0);
+               if ((get_int(right_btn_visible) == 0) && (get_int(left_btn_visible) == 0)) {
+                  set_state(PART:"padding_center_text2", "default", 0.0);
+                  set_int(large_padded_center_align, 0);
+               }
+               else {
+                  set_state(PART:"padding_center_text2", "visible", 0.0);
+                  set_int(large_padded_center_align, 1);
+               }
+               if ((get_int(large_padded_center_align) == 1) && (get_int(icon_visible) == 1))
+                  set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+               else if (get_int(large_padded_center_align) == 1)
+                  set_state(PART:"padding_center_text1", "visible", 0.0);
+               else if (get_int(icon_visible) == 1)
+                  set_state(PART:"padding_center_text1", "icon", 0.0);
+               else
+                  set_state(PART:"padding_center_text1", "default", 0.0);
+            }
+         }
+         program { name: "icon_show";
+            signal: "elm,state,elm.swallow.icon,show";
+            source: "elm";
+            script {
+               set_int(icon_visible, 1);
+               if ((get_int(large_padded_center_align) == 1) || (get_int(left_btn_visible) == 1))
+                 set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+               else
+                 set_state(PART:"padding_center_text1", "icon", 0.0);
+            }
+         }
+         program { name: "icon_hide";
+            signal: "elm,state,elm.swallow.icon,hide";
+            source: "elm";
+            script {
+               set_int(icon_visible, 0);
+               if ((get_int(large_padded_center_align) == 1) || (get_int(left_btn_visible) == 1))
+                 set_state(PART:"padding_center_text1", "visible", 0.0);
+               else
+                 set_state(PART:"padding_center_text1", "default", 0.0);
+            }
+         }
+         program { name: "controlbar_show";
+            signal: "elm,state,controlbar,show";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,show", "elm");
+            }
+         }
+         program { name: "controlbar_hide";
+            signal: "elm,state,controlbar,hide";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,hide", "elm");
+            }
+         }
+         program { name: "controlbar_bg_show";
+            signal: "elm,state,controlbar_bg,show";
+            source: "elm";
+            script {
+               set_state(PART:"controlbar_bg", "show", 0.0);
+               set_int(cbar_bg, get_int(cbar_bg) + 1);
+            }
+         }
+         program { name: "controlbar_bg_hide";
+            signal: "elm,state,controlbar_bg,hide";
+            source: "elm";
+            script {
+               set_int(cbar_bg, get_int(cbar_bg) - 1);
+               if (get_int(cbar_bg) <= 0)
+                 set_state(PART:"controlbar_bg", "default", 0.0);
+            }
+         }
+         program { name: "optionheader_show";
+            signal: "elm,state,optionheader,show";
+            source: "elm";
+            script {
+               set_state(PART:"optionheader_bg", "show", 0.0);
+               set_state(PART:"optionheader_arrow", "show", 0.0);
+               set_int(oh_show, 1);
+            }
+         }
+         program { name: "optionheader_hide";
+            signal: "elm,state,optionheader,hide";
+            source: "elm";
+            script {
+               set_state(PART:"optionheader_bg", "default", 0.0);
+               set_state(PART:"optionheader_arrow", "default", 0.0);
+               set_int(oh_show, 0);
+            }
+         }
+         program { name: "optionheader_open";
+            signal: "elm,state,optionheader,open";
+            source: "";
+            action: STATE_SET "show" 0.0;
+            target: "optionheader_bg";
+            target: "optionheader_arrow";
+            transition: LINEAR 0.2;
+            after: "optionheader_open_set";
+         }
+         program { name: "optionheader_close";
+            signal: "elm,state,optionheader,close";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "optionheader_bg";
+            target: "optionheader_arrow";
+            transition: LINEAR 0.2;
+            after: "optionheader_close_set";
+         }
+         program { name: "optionheader_instant_open";
+            signal: "elm,state,optionheader,instant_open";
+            source: "";
+            action: STATE_SET "show" 0.0;
+            target: "optionheader_bg";
+            target: "optionheader_arrow";
+            after: "optionheader_open_set";
+         }
+         program { name: "optionheader_instant_close";
+            signal: "elm,state,optionheader,instant_close";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "optionheader_bg";
+            target: "optionheader_arrow";
+            after: "optionheader_close_set";
+         }
+         program { name: "optionheader_close_set";
+            signal: "elm,state,optionheader,close_set";
+            source: "";
+            script {
+               set_int(oh_close, 1);
+            }
+         }
+         program { name: "optionheader_open_set";
+            signal: "elm,state,optionheader,open_set";
+            source: "";
+            script {
+               set_int(oh_close, 0);
+            }
+         }
+         program { name: "controlbar_open";
+            signal: "elm,state,controlbar,open";
+            source: "";
+            action: STATE_SET "show" 0.0;
+            target: "controlbar_bg";
+            transition: LINEAR 0.2;
+         }
+         program { name: "controlbar_close";
+            signal: "elm,state,controlbar,close";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "controlbar_bg";
+            transition: LINEAR 0.2;
+         }
+         program { name: "controlbar_instant_open";
+            signal: "elm,state,controlbar,instant_open";
+            source: "";
+            script {
+               emit("elm,state,prev_btn,show", "elm");
+               emit("elm,state,controlbar,show", "elm");
+            }
+         }
+         program { name: "controlbar_instant_close";
+            signal: "elm,state,controlbar,instant_close";
+            source: "";
+            script {
+               emit("elm,state,prev_btn,hide", "elm");
+               emit("elm,state,controlbar,hide", "elm");
+            }
+         }
+         program { name: "show_finished";
+            action: SIGNAL_EMIT "elm,action,show,finished" "";
+         }
+         program { name: "pushed_finished";
+            action: SIGNAL_EMIT "elm,action,pushed,finished" "";
+         }
+         program { name: "popped_finished";
+            action: SIGNAL_EMIT "elm,action,popped,finished" "";
+         }
+         program {
+            name: "title_clicked";
+            signal: "mouse,clicked,1";
+            source: "click_event_area";
+            action: SIGNAL_EMIT "elm,action,title,clicked" "";
+         }
+         program {
+            name: "title_portrate_mode";
+            signal: "signal.naviframe.portrate.mode";
+            source: "*";
+            action:  STATE_SET "default" 0.0;
+            target: "title_bg";
+         }
+         program {
+            name: "title_landscape_mode";
+            signal: "signal.naviframe.landscape.mode";
+            source: "*";
+            action:  STATE_SET "landscape" 0.0;
+            target: "title_bg";
+         }
+      }
+   }
+
+
+
+
+   group { name:"elm/naviframe/item/basic2/default";
+      alias:"elm/naviframe/item/video/2line/default";
+      images {
+         image: "naviframe_optionheader.png" COMP;
+         image: "naviframe_optionheader_arrow.png" COMP;
+      }
+      script {
+         public oh_show = 0;     //optionheader show/hide
+         public oh_close = 0;    //optionheader close/open
+         public cbar_bg = 0;     //Controlbar BG Show call count
+         public left_btn_visible = 0; //whether left btn is shown
+         public icon_visible = 0; //whether icon is shown
+         public right_btn_visible = 0; //whether right btn is shown
+         public more_btn_visible = 0; //whether more btn is shown
+         public large_padded_center_align = 0; //large padding based on button size for center align for 1/2 buttons.
+      }
+      parts {
+         part { name: "base";
+            type: RECT;
+            mouse_events:  0;
+            description { state: "default" 0.0;
+               visible: 0;
+            }
+            description { state: "left" 0.0;
+               inherit: "default" 0.0;
+               rel1.relative: -1.0 0.0;
+               rel2.relative: 0.0 1.0;
+            }
+            description { state: "right" 0.0;
+               inherit: "default" 0.0;
+               rel1.relative: 1.0 0.0;
+               rel2.relative: 2.0 1.0;
+            }
+         }
+         part { name: "title_bg";
+            type: RECT;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 1 NAVIFRAME_TITLE_H_INC;
+               align: 0.0 0.0;
+               fixed: 0 1;
+               rel1 { relative: 0.0 0.0; to: "base"; }
+               rel2 { relative: 1.0 0.0; to: "base"; }
+               color: NAVIFRAME_TITLE_BG_COLOR_INC;
+            }
+            description { state: "hide" 0.0;
+               inherit: "default" 0.0;
+               min: 0 0;
+               max: 0 0;
+               fixed: 1 1;
+            }
+         }
+         part { name: "title_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1 { to: "title_bg"; }
+               rel2 { to: "title_bg"; }
+            }
+         }
+         part { name: "optionheader_bg";
+            type: IMAGE;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 1 0;
+               align: 0.5 0;
+               fixed: 0 1;
+               rel1.to: "title_bg";
+               rel1.relative: 0 1;
+               rel2.to: "title_bg";
+               visible: 0;
+               image { normal: "naviframe_optionheader.png";
+                  border: NAVIFRAME_OH_BORDER_INC;
+               }
+            }
+            description { state: "show" 0.0;
+               inherit: "default" 0.0;
+               min: 1 NAVIFRAME_OH_OPENED_DOUBLE_H_INC;
+               visible: 1;
+            }
+            description { state: "hide" 0.0;
+               inherit: "default" 0.0;
+               min: 0 0;
+               max: 0 0;
+               fixed: 1 1;
+            }
+         }
+         part { name: "optionheader_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1 { to: "optionheader_bg"; }
+               rel2 { to: "optionheader_bg"; }
+            }
+         }
+         part { name: "optionheader_top_padding";
+            type: RECT;
+            scale: 1;
+            clip_to: "optionheader_clip";
+            description { state: "default" 0.0;
+               min: 0 NAVIFRAME_OH_PADDING_INC;
+               rel1 { relative: 0.0 0.0; to: "optionheader_bg"; }
+               rel2 { relative: 1.0 0.0; to: "optionheader_bg"; }
+               fixed: 0 1;
+               align: 0.0 0.0;
+               visible: 0;
+            }
+         }
+         part { name: "optionheader";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "optionheader_clip";
+            description { state: "default" 0.0;
+               min: 0 NAVIFRAME_OH_CONTENT_H_INC;
+               rel1 { relative: 0.0 1.0; to: "optionheader_top_padding"; }
+               rel2 { relative: 1.0 1.0; to: "optionheader_top_padding"; }
+               fixed: 0 1;
+               align: 0.0 0.0;
+            }
+         }
+         part { name: "optionheader.mid.padding";
+            type: RECT;
+            scale: 1;
+            clip_to: "optionheader_clip";
+            description { state: "default" 0.0;
+               min: 0 NAVIFRAME_OH_PADDING_INC;
+               rel1 { relative: 0.0 1.0; to: "optionheader"; }
+               rel2 { relative: 1.0 1.0; to: "optionheader"; }
+               fixed: 0 1;
+               align: 0.0 0.0;
+               visible: 0;
+            }
+         }
+         part { name: "optionheader2";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "optionheader_clip";
+            description { state: "default" 0.0;
+               min: 0 NAVIFRAME_OH_CONTENT_H_INC;
+               rel1 { relative: 0.0 1.0; to: "optionheader.mid.padding";}
+               rel2 { relative: 1.0 1.0; to: "optionheader.mid.padding";}
+               fixed: 0 1;
+               align: 0.0 0.0;
+            }
+         }
+         part { name: "optionheader.bottom.padding";
+            type: RECT;
+            scale: 1;
+            clip_to: "optionheader_clip";
+            description { state: "default" 0.0;
+               min: 0 NAVIFRAME_OH_PADDING_INC;
+               rel1 { relative: 0.0 1.0; to: "optionheader2"; }
+               rel2 { relative: 1.0 1.0; to: "optionheader2"; }
+               fixed: 0 1;
+               align: 0.0 0.0;
+               visible: 0;
+            }
+         }
+         part { name: "elm.swallow.content";
+            type: SWALLOW;
+            scale: 1;
+            repeat_events: 0;
+            clip_to: "content_clip";
+            description { state: "default" 0.0;
+               align: 0.0 0.0;
+               rel1.relative: 0.0 1.0;
+               rel1.to_x: "base";
+               rel1.to_y: "optionheader_bg";
+               rel2.relative: 1.0 0.0;
+               rel2.to_x: "base";
+               rel2.to_y: "controlbar_bg";
+            }
+         }
+         part { name: "content_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1.to: "elm.swallow.content";
+               rel2.to: "elm.swallow.content";
+            }
+         }
+         part { name: "padding_before_left_btn";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+               fixed: 1 0;
+               align: 0.0 0.5;
+               rel1 { relative: 0.0 0.0; to: "title_bg"; }
+               rel2 { relative: 0.0 1.0; to: "title_bg"; }
+               visible: 0;
+            }
+         }
+         part { name: "padding_after_left_btn";
+            type: RECT;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+               fixed: 1 0;
+               align: 0 0.5;
+               rel1 { relative: 1.0 0.0; to: "title_left_btn"; }
+               rel2 { relative: 1.0 1.0; to: "title_left_btn"; }
+               visible: 0;
+            }
+         }
+         part { name: "padding_before_more_btn";
+            type: RECT;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+               fixed: 1 0;
+               align: 1.0 0.5;
+               rel1 { relative: 0.0 0.0; to: "title_more_btn"; }
+               rel2 { relative: 0.0 1.0; to: "title_more_btn"; }
+               visible: 0;
+            }
+         }
+         part { name: "padding_after_right_btn";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+               fixed: 1 0;
+               align: 1.0 0.5;
+               rel1 { relative: 1.0 0.0; to: "title_bg"; }
+               rel2 { relative: 1.0 1.0; to: "title_bg"; }
+               visible: 0;
+            }
+         }
+         part { name: "padding_before_right_btn";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: 0 0;
+               fixed: 1 0;
+               align: 1.0 0.5;
+               rel1 { relative: 0.0 0.0; to: "title_right_btn"; }
+               rel2 { relative: 0.0 1.0; to: "title_right_btn"; }
+               visible: 0;
+            }
+            description { state: "right_and_more_button" 0.0;
+               inherit: "default" 0.0;
+               min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+            }
+         }
+         part { name: "padding_before_text";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               align: 1.0 0.5;
+               rel1 { relative: 0.0 0.0; to_x: "elm.text.title"; to_y: "title_bg"; }
+               rel2 { relative: 0.0 1.0; to_x: "elm.text.title"; to_y: "title_bg"; }
+               fixed: 1 0;
+               min: NAVIFRAME_ICON_PADDING_INC;
+               visible: 0;
+            }
+         }
+         part { name: "padding_center_text1";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+               fixed: 1 0;
+               align: 0.0 0.0;
+               rel1 { relative: 0.0 0.0; to: "title_bg"; }
+               rel2 { relative: 0.0 1.0; to: "title_bg"; }
+               visible: 0;
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               min: NAVIFRAME_TEXT_PADDING_INC 0;
+            }
+            description { state: "icon" 0.0;
+               inherit: "default" 0.0;
+               min: NAVIFRAME_NO_BUTTON_ICON_PADDING_INC 0;
+            }
+            description { state: "icon_left_button" 0.0;
+               inherit: "default" 0.0;
+               min: NAVIFRAME_TEXT_PADDING_ICON_VISIBLE_INC 0;
+            }
+         }
+         part { name: "padding_center_text2";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+               fixed: 1 0;
+               align: 1.0 0.5;
+               rel1 { relative: 1.0 0.0; to: "title_bg"; }
+               rel2 { relative: 1.0 1.0; to: "title_bg"; }
+               visible: 0;
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               min: NAVIFRAME_TEXT_PADDING_INC 0;
+            }
+         }
+         part { name: "elm.text.title";
+            type: TEXT;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               text { font: "SLP:style=Medium";
+                  text_class: "slp_medium";
+                  size: NAVIFRAME_TITLE_FONT_SIZE_INC;
+                  min: 0 0;
+                  max: 1 0;
+                  align: 0.5 0.5;
+               }
+               color: NAVIFRAME_TITLE_TEXT_COLOR_INC;
+               align: 0.5 0.5;
+               fixed: 1 0;
+               rel1 { relative: 1.0 0.0; to: "padding_center_text1"; }
+               rel2 { relative: 0.0 1.0; to: "padding_center_text2"; }
+            }
+            description { state: "right_and_more_button" 0.0;
+               inherit: "default" 0.0;
+               rel1 { relative: 1.0 0.0; to: "padding_after_left_btn"; }
+               rel2 { relative: 0.0 1.0; to: "padding_before_more_btn"; }
+            }
+         }
+         part { name: "elm.swallow.icon";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               max: NAVIFRAME_ICON_SIZE_INC;
+               fixed: 1 1;
+               rel1 { relative: 0.0 0.0; to: "padding_before_text"; }
+               rel2 { relative: 0.0 1.0; to: "padding_before_text"; }
+               aspect: 1.0 1.0;
+               aspect_preference: VERTICAL;
+               align: 1.0 0.5;
+            }
+         }
+         part { name: "click_event_area";
+             ignore_flags: ON_HOLD;
+             repeat_events: 1;
+             description { state: "default" 0.0;
+                rel1 { to: "title_bg"; }
+                rel2 { to: "title_bg"; }
+             }
+         }
+         part { name: "title_left_btn";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+               fixed: 1 1;
+               align: 0 0.5;
+               rel1 { relative: 1.0 0.0; to: "padding_before_left_btn"; }
+               rel2 { relative: 1.0 1.0; to: "padding_before_left_btn"; }
+            }
+         }
+         part { name: "title_right_btn";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+               align: 1 0.5;
+               fixed: 1 1;
+               rel1 { relative: 0.0 0.0; to: "padding_after_right_btn"; }
+               rel2 { relative: 0.0 1.0; to: "padding_after_right_btn"; }
+            }
+         }
+         part { name: "title_more_btn";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+               fixed: 1 0;
+               align: 1 0.5;
+               rel1 { relative: 0.0 0.0; to: "padding_before_right_btn"; }
+               rel2 { relative: 0.0 1.0; to: "padding_before_right_btn"; }
+            }
+         }
+         part { name: "optionheader_arrow";
+            type: IMAGE;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: NAVIFRAME_OH_ARROW_SIZE_INC;
+               max: NAVIFRAME_OH_ARROW_SIZE_INC;
+               fixed: 1 1;
+               align: 0.5 0.0;
+               rel1 { relative: 0.0 1.025; to: "title_more_btn"; }
+               rel2 { relative: 1.0 1.025; to: "title_more_btn"; }
+               image.normal: "naviframe_optionheader_arrow.png";
+               color: 255 255 255 0;
+            }
+            description { state: "show" 0.0;
+               inherit: "default" 0.0;
+               color: 255 255 255 255;
+            }
+         }
+         part { name: "controlbar_bg";
+            type: RECT;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 0 0;
+               max: 999999 0;
+               fixed: 0 1;
+               align: 0.0 1.0;
+               visible: 0;
+               rel1 { to: "base"; }
+               rel2 { to: "base"; }
+               color: NAVIFRAME_CONTROLBAR_BG_COLOR_INC;
+            }
+            description { state: "show" 0.0;
+               inherit: "default" 0.0;
+               min: 0 CONTROLBAR_SMALL_HEIGHT_INC;
+               max: 999999 CONTROLBAR_SMALL_HEIGHT_INC;
+               visible: 1;
+            }
+         }
+         part { name: "controlbar_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1 { to: "controlbar_bg"; }
+               rel2 { to: "controlbar_bg"; }
+            }
+         }
+         part { name: "elm.prev_btn_bg";
+            type: RECT;
+            scale: 1;
+            clip_to: "controlbar_clip";
+            description { state: "default" 0.0;
+               min: 0 0;
+               fixed: 1 0;
+               align: 1.0 0.0;
+               rel1 { relative: 1.0 0.0; to: "controlbar_bg"; }
+               rel2.to: "controlbar_bg";
+               visible: 0;
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               min: NAVIFRAME_TITLE_PREV_BTN_BG_SIZE_INC 0;
+            }
+         }
+         part { name: "elm.swallow.prev_btn";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "controlbar_clip";
+            description { state: "default" 0.0;
+               fixed: 1 1;
+               align: 0.5 0.5;
+               rel1.to: "elm.prev_btn_bg";
+               rel2.to: "elm.prev_btn_bg";
+            }
+         }
+         part { name: "controlbar";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "controlbar_clip";
+            description { state: "default" 0.0;
+               rel1.to: "controlbar_bg";
+               rel2 { relative: 0.0 1.0; to: "elm.prev_btn_bg"; }
+            }
+         }
+      }
+      programs {
+         program { name: "content_new_pushed";
+            signal: "elm,state,new,pushed,internal";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "base";
+            transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+            after: "show_finished";
+         }
+         program { name: "content_cur_pushed";
+            signal: "elm,state,cur,pushed,internal";
+            source: "";
+            action: STATE_SET "left" 0.0;
+            target: "base";
+            transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+            after: "pushed_finished";
+         }
+         program { name: "content_prev_popped";
+            signal: "elm,state,prev,popped,internal";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "base";
+            transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+            after: "show_finished";
+         }
+         program { name: "content_cur_popped";
+            signal: "elm,state,cur,popped,internal";
+            source: "";
+            action: STATE_SET "right" 0.0;
+            target: "base";
+            transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+            after: "popped_finished";
+         }
+         program { name: "cur_pushed";
+            signal: "elm,state,cur,pushed";
+            source: "elm";
+            script {
+               set_state(PART:"base", "default", 0.0);
+               emit("elm,state,cur,pushed,internal", "");
+            }
+         }
+         program { name: "new_pushed";
+            signal: "elm,state,new,pushed";
+            source: "elm";
+            script {
+               set_state(PART:"base", "right", 0.0);
+               emit("elm,state,new,pushed,internal", "");
+            }
+         }
+         program { name: "prev_popped";
+            signal: "elm,state,prev,popped";
+            source: "elm";
+            script {
+               set_state(PART:"base", "left", 0.0);
+               emit("elm,state,prev,popped,internal", "");
+            }
+         }
+         program { name: "cur_popped";
+            signal: "elm,state,cur,popped";
+            source: "elm";
+            script {
+               set_state(PART:"base", "default", 0.0);
+               emit("elm,state,cur,popped,internal", "");
+            }
+         }
+         program { name: "visible";
+            signal: "elm,state,visible";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "base";
+         }
+         program { name: "title_show";
+            signal: "elm,state,title,show";
+            source: "elm";
+            script {
+               set_state(PART:"title_bg", "default", 0.0);
+               if (get_int(oh_show) == 1) {
+                  if (get_int(oh_close) == 1) {
+                     emit("elm,state,optionheader,instant_close", "");
+                  }else {
+                     emit("elm,state,optionheader,instant_open", "");
+                  }
+               }
+               else
+                 set_state(PART:"optionheader_bg", "default", 0.0);
+            }
+         }
+         program { name: "title_hide";
+            signal: "elm,state,title,hide";
+            source: "elm";
+            action: STATE_SET "hide" 0.0;
+            target: "title_bg";
+            target: "optionheader_bg";
+         }
+         program { name: "prev_btn_show";
+            signal: "elm,state,prev_btn,show";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,show", "elm");
+               set_state(PART:"elm.prev_btn_bg", "visible", 0.0);
+            }
+         }
+         program { name: "prev_btn_hide";
+            signal: "elm,state,prev_btn,hide";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,hide", "elm");
+               set_state(PART:"elm.prev_btn_bg", "default", 0.0);
+            }
+         }
+         program { name: "left_btn_show";
+            signal: "elm,state,title_left_btn,show";
+            source: "elm";
+            script {
+               set_int(left_btn_visible, 1);
+               if (get_int(icon_visible) == 1)
+                 set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+               else
+                 set_state(PART:"padding_center_text1", "visible", 0.0);
+               if ((get_int(more_btn_visible) == 1) && (get_int(right_btn_visible) == 1)) {
+                  set_state(PART:"elm.text.title", "right_and_more_button", 0.0);
+                  set_int(large_padded_center_align, 0);
+               }
+               else {
+                  set_state(PART:"padding_center_text2", "visible", 0.0);
+                  set_int(large_padded_center_align, 1);
+               }
+            }
+         }
+         program { name: "left_btn_hide";
+            signal: "elm,state,title_left_btn,hide";
+            source: "elm";
+            script {
+               set_int(left_btn_visible, 0);
+               if ((get_int(more_btn_visible) == 0) && (get_int(right_btn_visible) == 0)) {
+                  set_state(PART:"padding_center_text2", "default", 0.0);
+                  set_int(large_padded_center_align, 0);
+               }
+               else {
+                  set_state(PART:"padding_center_text2", "visible", 0.0);
+                  set_int(large_padded_center_align, 1);
+               }
+               if ((get_int(large_padded_center_align) == 1) && (get_int(icon_visible) == 1))
+                  set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+               else if (get_int(large_padded_center_align) == 1)
+                  set_state(PART:"padding_center_text1", "visible", 0.0);
+               else if (get_int(icon_visible) == 1)
+                  set_state(PART:"padding_center_text1", "icon", 0.0);
+               else
+                  set_state(PART:"padding_center_text1", "default", 0.0);
+            }
+         }
+         program { name: "right_btn_show";
+            signal: "elm,state,title_right_btn,show";
+            source: "elm";
+            script {
+               set_int(right_btn_visible, 1);
+               if (get_int(more_btn_visible) == 1) {
+                  set_state(PART:"elm.text.title", "right_and_more_button", 0.0);
+                  set_state(PART:"padding_before_right_btn", "right_and_more_button", 0.0);
+                  set_int(large_padded_center_align, 0);
+               }
+               else {
+                  set_state(PART:"padding_center_text2", "visible", 0.0);
+                  set_int(large_padded_center_align, 1);
+               }
+               if ((get_int(icon_visible) == 1) && ((get_int(left_btn_visible) == 1) ||
+                                                    (get_int(large_padded_center_align) == 1)))
+                 set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+               else if ((get_int(left_btn_visible) == 1) || (get_int(large_padded_center_align) == 1))
+                 set_state(PART:"padding_center_text1", "visible", 0.0);
+               else if (get_int(icon_visible) == 1)
+                 set_state(PART:"padding_center_text1", "icon", 0.0);
+               else
+                 set_state(PART:"padding_center_text1", "default", 0.0);
+            }
+         }
+         program { name: "right_btn_hide";
+            signal: "elm,state,title_right_btn,hide";
+            source: "elm";
+            script {
+               set_int(right_btn_visible, 0);
+               set_state(PART:"padding_before_right_btn", "default", 0.0);
+               if ((get_int(more_btn_visible) == 0) && (get_int(left_btn_visible) == 0)) {
+                  set_state(PART:"padding_center_text2", "default", 0.0);
+                  set_int(large_padded_center_align, 0);
+               }
+               else {
+                  set_state(PART:"padding_center_text2", "visible", 0.0);
+                  set_int(large_padded_center_align, 1);
+               }
+               if ((get_int(large_padded_center_align) == 1) && (get_int(icon_visible) == 1))
+                  set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+               else if (get_int(large_padded_center_align) == 1)
+                  set_state(PART:"padding_center_text1", "visible", 0.0);
+               else if (get_int(icon_visible) == 1)
+                  set_state(PART:"padding_center_text1", "icon", 0.0);
+               else
+                  set_state(PART:"padding_center_text1", "default", 0.0);
+            }
+         }
+         program { name: "more_btn_show";
+            signal: "elm,state,title_more_btn,show";
+            source: "elm";
+            script {
+               set_int(more_btn_visible, 1);
+               if (get_int(right_btn_visible) == 1) {
+                  set_state(PART:"elm.text.title", "right_and_more_button", 0.0);
+                  set_state(PART:"padding_before_right_btn", "right_and_more_button", 0.0);
+                  set_int(large_padded_center_align, 0);
+               }
+               else {
+                  set_state(PART:"padding_center_text2", "visible", 0.0);
+                  set_int(large_padded_center_align, 1);
+               }
+               if ((get_int(icon_visible) == 1) && ((get_int(left_btn_visible) == 1) ||
+                                                    (get_int(large_padded_center_align) == 1)))
+                 set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+               else if ((get_int(left_btn_visible) == 1) || (get_int(large_padded_center_align) == 1))
+                 set_state(PART:"padding_center_text1", "visible", 0.0);
+               else if (get_int(icon_visible) == 1)
+                 set_state(PART:"padding_center_text1", "icon", 0.0);
+               else
+                 set_state(PART:"padding_center_text1", "default", 0.0);
+            }
+         }
+         program { name: "more_btn_hide";
+            signal: "elm,state,title_more_btn,hide";
+            source: "elm";
+            script {
+               set_int(more_btn_visible, 0);
+               set_state(PART:"padding_before_right_btn", "default", 0.0);
+               if ((get_int(right_btn_visible) == 0) && (get_int(left_btn_visible) == 0)) {
+                  set_state(PART:"padding_center_text2", "default", 0.0);
+                  set_int(large_padded_center_align, 0);
+               }
+               else {
+                  set_state(PART:"padding_center_text2", "visible", 0.0);
+                  set_int(large_padded_center_align, 1);
+               }
+               if ((get_int(large_padded_center_align) == 1) && (get_int(icon_visible) == 1))
+                  set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+               else if (get_int(large_padded_center_align) == 1)
+                  set_state(PART:"padding_center_text1", "visible", 0.0);
+               else if (get_int(icon_visible) == 1)
+                  set_state(PART:"padding_center_text1", "icon", 0.0);
+               else
+                  set_state(PART:"padding_center_text1", "default", 0.0);
+            }
+         }
+         program { name: "icon_show";
+            signal: "elm,state,elm.swallow.icon,show";
+            source: "elm";
+            script {
+               set_int(icon_visible, 1);
+               if ((get_int(large_padded_center_align) == 1) || (get_int(left_btn_visible) == 1))
+                 set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+               else
+                 set_state(PART:"padding_center_text1", "icon", 0.0);
+            }
+         }
+         program { name: "icon_hide";
+            signal: "elm,state,elm.swallow.icon,hide";
+            source: "elm";
+            script {
+               set_int(icon_visible, 0);
+               if ((get_int(large_padded_center_align) == 1) || (get_int(left_btn_visible) == 1))
+                 set_state(PART:"padding_center_text1", "visible", 0.0);
+               else
+                 set_state(PART:"padding_center_text1", "default", 0.0);
+            }
+         }
+         program { name: "controlbar_show";
+            signal: "elm,state,controlbar,show";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,show", "elm");
+            }
+         }
+         program { name: "controlbar_hide";
+            signal: "elm,state,controlbar,hide";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,hide", "elm");
+            }
+         }
+         program { name: "controlbar_bg_show";
+            signal: "elm,state,controlbar_bg,show";
+            source: "elm";
+            script {
+               set_state(PART:"controlbar_bg", "show", 0.0);
+               set_int(cbar_bg, get_int(cbar_bg) + 1);
+            }
+         }
+         program { name: "controlbar_bg_hide";
+            signal: "elm,state,controlbar_bg,hide";
+            source: "elm";
+            script {
+               set_int(cbar_bg, get_int(cbar_bg) - 1);
+               if (get_int(cbar_bg) <= 0)
+                 set_state(PART:"controlbar_bg", "default", 0.0);
+            }
+         }
+         program { name: "optionheader_show";
+            signal: "elm,state,optionheader,show";
+            source: "elm";
+            script {
+               set_state(PART:"optionheader_bg", "show", 0.0);
+               set_state(PART:"optionheader_arrow", "show", 0.0);
+               set_int(oh_show, 1);
+            }
+         }
+         program { name: "optionheader_hide";
+            signal: "elm,state,optionheader,hide";
+            source: "elm";
+            script {
+               set_state(PART:"optionheader_bg", "default", 0.0);
+               set_state(PART:"optionheader_arrow", "default", 0.0);
+               set_int(oh_show, 0);
+            }
+         }
+         program { name: "optionheader_open";
+            signal: "elm,state,optionheader,open";
+            source: "";
+            action: STATE_SET "show" 0.0;
+            target: "optionheader_bg";
+            target: "optionheader_arrow";
+            transition: LINEAR 0.2;
+            after: "optionheader_open_set";
+         }
+         program { name: "optionheader_close";
+            signal: "elm,state,optionheader,close";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "optionheader_bg";
+            target: "optionheader_arrow";
+            transition: LINEAR 0.2;
+            after: "optionheader_close_set";
+         }
+         program { name: "optionheader_instant_open";
+            signal: "elm,state,optionheader,instant_open";
+            source: "";
+            action: STATE_SET "show" 0.0;
+            target: "optionheader_bg";
+            target: "optionheader_arrow";
+            after: "optionheader_open_set";
+         }
+         program { name: "optionheader_instant_close";
+            signal: "elm,state,optionheader,instant_close";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "optionheader_bg";
+            target: "optionheader_arrow";
+            after: "optionheader_close_set";
+         }
+         program { name: "optionheader_close_set";
+            signal: "elm,state,optionheader,close_set";
+            source: "";
+            script {
+               set_int(oh_close, 1);
+            }
+         }
+         program { name: "optionheader_open_set";
+            signal: "elm,state,optionheader,open_set";
+            source: "";
+            script {
+               set_int(oh_close, 0);
+            }
+         }
+         program { name: "controlbar_open";
+            signal: "elm,state,controlbar,open";
+            source: "";
+            action: STATE_SET "show" 0.0;
+            target: "controlbar_bg";
+            transition: LINEAR 0.2;
+         }
+         program { name: "controlbar_close";
+            signal: "elm,state,controlbar,close";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "controlbar_bg";
+            transition: LINEAR 0.2;
+         }
+         program { name: "controlbar_instant_open";
+            signal: "elm,state,controlbar,instant_open";
+            source: "";
+            script {
+               emit("elm,state,prev_btn,show", "elm");
+               emit("elm,state,controlbar,show", "elm");
+            }
+         }
+         program { name: "controlbar_instant_close";
+            signal: "elm,state,controlbar,instant_close";
+            source: "";
+            script {
+               emit("elm,state,prev_btn,hide", "elm");
+               emit("elm,state,controlbar,hide", "elm");
+            }
+         }
+         program { name: "show_finished";
+            action: SIGNAL_EMIT "elm,action,show,finished" "";
+         }
+         program { name: "pushed_finished";
+            action: SIGNAL_EMIT "elm,action,pushed,finished" "";
+         }
+         program { name: "popped_finished";
+            action: SIGNAL_EMIT "elm,action,popped,finished" "";
+         }
+         program {
+            name: "title_clicked";
+            signal: "mouse,clicked,1";
+            source: "click_event_area";
+            action: SIGNAL_EMIT "elm,action,title,clicked" "";
+         }
+      }
+   }
+   group { name: "elm/naviframe/item/segment/default";
+      script {
+         public cbar_bg = 0;     //Controlbar BG Show call count
+      }
+      parts {
+         part { name: "base";
+            type: RECT;
+            mouse_events:  0;
+            description { state: "default" 0.0;
+               visible: 0;
+            }
+            description { state: "left" 0.0;
+               inherit: "default" 0.0;
+               rel1.relative: -1.0 0.0;
+               rel2.relative: 0.0 1.0;
+            }
+            description { state: "right" 0.0;
+               inherit: "default" 0.0;
+               rel1.relative: 1.0 0.0;
+               rel2.relative: 2.0 1.0;
+            }
+         }
+         part { name: "title_bg";
+            type: RECT;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 1 NAVIFRAME_SEGMENT_TITLE_H_INC;
+               align: 0.0 0.0;
+               fixed: 0 1;
+               rel1 { relative: 0.0 0.0; to: "base"; }
+               rel2 { relative: 1.0 0.0; to: "base"; }
+               color: NAVIFRAME_TITLE_BG_COLOR_INC;
+            }
+            description { state: "hide" 0.0;
+               inherit: "default" 0.0;
+               min: 0 0;
+               max: 0 0;
+               fixed: 1 1;
+            }
+         }
+         part { name: "title_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1 { to: "title_bg"; }
+               rel2 { to: "title_bg"; }
+            }
+         }
+         part { name: "elm.swallow.content";
+            type: SWALLOW;
+            scale: 1;
+            repeat_events: 0;
+            clip_to: "content_clip";
+            description { state: "default" 0.0;
+               align: 0.0 0.0;
+               rel1.relative: 0.0 1.0;
+               rel1.to_x: "base";
+               rel1.to_y: "title_bg";
+               rel2.relative: 1.0 0.0;
+               rel2.to_x: "base";
+               rel2.to_y: "controlbar_bg";
+            }
+         }
+         part { name: "content_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1.to: "elm.swallow.content";
+               rel2.to: "elm.swallow.content";
+            }
+         }
+         part { name: "padding_before_left_btn";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+               fixed: 1 0;
+               align: 0.0 0.5;
+               rel1 { relative: 0.0 0.0; to: "title_bg"; }
+               rel2 { relative: 0.0 1.0; to: "title_bg"; }
+               visible: 0;
+            }
+         }
+         part { name: "padding_after_left_btn";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+               fixed: 1 0;
+               align: 0.0 0.5;
+               rel1 { relative: 1.0 0.0; to: "title_left_btn"; }
+               rel2 { relative: 1.0 1.0; to: "title_left_btn"; }
+               visible: 0;
+            }
+         }
+         part { name: "padding_after_right_btn";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+               fixed: 1 0;
+               align: 1.0 0.5;
+               rel1 { relative: 1.0 0.0; to: "title_bg"; }
+               rel2 { relative: 1.0 1.0; to: "title_bg"; }
+               visible: 0;
+            }
+         }
+         part { name: "padding_before_right_btn";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: 0 0;
+               fixed: 1 0;
+               align: 1.0 0.5;
+               rel1 { relative: 0.0 0.0; to: "title_right_btn"; }
+               rel2 { relative: 0.0 1.0; to: "title_right_btn"; }
+               visible: 0;
+            }
+            description { state: "show" 0.0;
+               inherit: "default" 0.0;
+               min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+            }
+         }
+         part { name: "padding_before_text";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               align: 1.0 0.5;
+               rel1 { relative: 0.0 0.0; to_x: "elm.text.title"; to_y: "title_bg"; }
+               rel2 { relative: 0.0 1.0; to_x: "elm.text.title"; to_y: "title_bg"; }
+               fixed: 1 0;
+               min: NAVIFRAME_ICON_PADDING_INC;
+               visible: 0;
+            }
+         }
+         part { name: "elm.text.title";
+            type: TEXT;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               text { font: "SLP:style=Medium";
+                      text_class: "slp_medium";
+                  size: NAVIFRAME_TITLE_SEGMENT_FONT_SIZE_INC;
+                  min: 0 0;
+                  max: 1 0;
+                  align: 0.5 0.5;
+               }
+               min: 0 NAVIFRAME_TITLE_SEGMENT_TEXT_H_INC;
+               max: 999999 NAVIFRAME_TITLE_SEGMENT_TEXT_H_INC;
+               fixed: 1 1;
+               color: NAVIFRAME_TITLE_TEXT_COLOR_INC;
+               align: 0.5 0;
+               rel1.to: "padding_before_left_btn";
+               rel1.relative: 1 0;
+               rel2.to: "padding_after_right_btn";
+               rel2.relative: 0 1;
+            }
+         }
+         part { name: "click_event_area";
+             ignore_flags: ON_HOLD;
+             repeat_events: 1;
+             description { state: "default" 0.0;
+                rel1 { to: "title_bg"; }
+                rel2 { to: "title_bg"; }
+             }
+         }
+         part { name: "title_left_btn";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+               fixed: 1 1;
+               align: 0 0;
+               rel1.relative: 1.0 1.0;
+               rel1.to_x: "padding_before_left_btn";
+               rel1.to_y: "elm.text.title";
+               rel2.relative: 1.0 1.0;
+               rel2.to_x: "padding_before_left_btn";
+               rel2.to_y: "elm.text.title";
+            }
+         }
+         part { name: "title_right_btn";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+               align: 1 0.0;
+               fixed: 1 1;
+               rel1.relative: 0.0 1.0;
+               rel1.to_x: "padding_after_right_btn";
+               rel1.to_y: "elm.text.title";
+               rel2.relative: 0.0 1.0;
+               rel2.to_x: "padding_after_right_btn";
+               rel2.to_y: "elm.text.title";
+            }
+         }
+         part { name: "segment2";
+            type: "SWALLOW";
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: 0 NAVIFRAME_TITLE_SEGMENT_H_INC;
+               max: 999999 NAVIFRAME_TITLE_SEGMENT_H_INC;
+               fixed: 0 1;
+               align: 0.5 0;
+               rel1.to_y: "elm.text.title";
+               rel1.to_x: "title_bg";
+               rel1.relative: 0.28 1;
+               rel2.to_y: "elm.text.title";
+               rel2.to_x: "title_bg";
+               rel2.relative: 0.72 1;
+            }
+         }
+         part { name: "segment3";
+            type: "SWALLOW";
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: 0 NAVIFRAME_TITLE_SEGMENT_H_INC;
+               max: 999999 NAVIFRAME_TITLE_SEGMENT_H_INC;
+               fixed: 0 1;
+               align: 0.5 0;
+               rel1.to_y: "elm.text.title";
+               rel1.relative: 0.2 1;
+               rel1.to_x: "title_bg";
+               rel2.to_y: "elm.text.title";
+               rel2.to_x: "title_bg";
+               rel2.relative: 0.8 1;
+            }
+         }
+         part { name: "controlbar_bg";
+            type: RECT;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 0 0;
+               max: 999999 0;
+               fixed: 0 1;
+               align: 0.0 1.0;
+               visible: 0;
+               rel1 { to: "base"; }
+               rel2 { to: "base"; }
+               color: NAVIFRAME_CONTROLBAR_BG_COLOR_INC;
+            }
+            description { state: "show" 0.0;
+               inherit: "default" 0.0;
+               min: 0 CONTROLBAR_SMALL_HEIGHT_INC;
+               max: 999999 CONTROLBAR_SMALL_HEIGHT_INC;
+               visible: 1;
+            }
+         }
+         part { name: "controlbar_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1 { to: "controlbar_bg"; }
+               rel2 { to: "controlbar_bg"; }
+            }
+         }
+         part { name: "elm.prev_btn_bg";
+            type: RECT;
+            scale: 1;
+            clip_to: "controlbar_clip";
+            description { state: "default" 0.0;
+               min: 0 0;
+               fixed: 1 0;
+               align: 1.0 0.0;
+               rel1 { relative: 1.0 0.0; to: "controlbar_bg"; }
+               rel2.to: "controlbar_bg";
+               visible: 0;
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               min: NAVIFRAME_TITLE_PREV_BTN_BG_SIZE_INC 0;
+            }
+         }
+        part { name: "elm.swallow.prev_btn";
+           type: SWALLOW;
+           scale: 1;
+           clip_to: "controlbar_clip";
+           description { state: "default" 0.0;
+              fixed: 1 1;
+              align: 0.5 0.5;
+              rel1.to: "elm.prev_btn_bg";
+              rel2.to: "elm.prev_btn_bg";
+           }
+        }
+        part { name: "controlbar";
+           type: SWALLOW;
+           scale: 1;
+           clip_to: "controlbar_clip";
+           description { state: "default" 0.0;
+              rel1.to: "controlbar_bg";
+              rel2 { relative: 0.0 1.0; to: "elm.prev_btn_bg"; }
+           }
+        }
+      }
+      programs {
+         program { name: "content_new_pushed";
+            signal: "elm,state,new,pushed,internal";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "base";
+            transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+            after: "show_finished";
+         }
+         program { name: "content_cur_pushed";
+            signal: "elm,state,cur,pushed,internal";
+            source: "";
+            action: STATE_SET "left" 0.0;
+            target: "base";
+            transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+            after: "pushed_finished";
+         }
+         program { name: "content_prev_popped";
+            signal: "elm,state,prev,popped,internal";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "base";
+            transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+            after: "show_finished";
+         }
+         program { name: "content_cur_popped";
+            signal: "elm,state,cur,popped,internal";
+            source: "";
+            action: STATE_SET "right" 0.0;
+            target: "base";
+            transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+            after: "popped_finished";
+         }
+         program { name: "cur_pushed";
+            signal: "elm,state,cur,pushed";
+            source: "elm";
+            script {
+               set_state(PART:"base", "default", 0.0);
+               emit("elm,state,cur,pushed,internal", "");
+            }
+         }
+         program { name: "new_pushed";
+            signal: "elm,state,new,pushed";
+            source: "elm";
+            script {
+               set_state(PART:"base", "right", 0.0);
+               emit("elm,state,new,pushed,internal", "");
+            }
+         }
+         program { name: "prev_popped";
+            signal: "elm,state,prev,popped";
+            source: "elm";
+            script {
+               set_state(PART:"base", "left", 0.0);
+               emit("elm,state,prev,popped,internal", "");
+            }
+         }
+         program { name: "cur_popped";
+            signal: "elm,state,cur,popped";
+            source: "elm";
+            script {
+               set_state(PART:"base", "default", 0.0);
+               emit("elm,state,cur,popped,internal", "");
+            }
+         }
+         program { name: "visible";
+            signal: "elm,state,visible";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "base";
+         }
+         program { name: "title_show";
+            signal: "elm,state,title,show";
+            source: "elm";
+            action: STATE_SET "show" 0.0;
+            target: "title_bg";
+         }
+         program { name: "title_hide";
+            signal: "elm,state,title,hide";
+            source: "elm";
+            action: STATE_SET "hide" 0.0;
+            target: "title_bg";
+         }
+         program { name: "prev_btn_show";
+            signal: "elm,state,prev_btn,show";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,show", "elm");
+               set_state(PART:"elm.prev_btn_bg", "visible", 0.0);
+            }
+         }
+         program { name: "prev_btn_hide";
+            signal: "elm,state,prev_btn,hide";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,hide", "elm");
+               set_state(PART:"elm.prev_btn_bg", "default", 0.0);
+            }
+         }
+         program { name: "controlbar_show";
+            signal: "elm,state,controlbar,show";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,show", "elm");
+            }
+         }
+         program { name: "controlbar_hide";
+            signal: "elm,state,controlbar,hide";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,hide", "elm");
+            }
+         }
+         program { name: "controlbar_bg_show";
+            signal: "elm,state,controlbar_bg,show";
+            source: "elm";
+            script {
+               set_state(PART:"controlbar_bg", "show", 0.0);
+               set_int(cbar_bg, get_int(cbar_bg) + 1);
+            }
+         }
+         program { name: "controlbar_bg_hide";
+            signal: "elm,state,controlbar_bg,hide";
+            source: "elm";
+            script {
+               set_int(cbar_bg, get_int(cbar_bg) - 1);
+               if (get_int(cbar_bg) <= 0)
+                 set_state(PART:"controlbar_bg", "default", 0.0);
+            }
+         }
+         program { name: "controlbar_open";
+            signal: "elm,state,controlbar,open";
+            source: "";
+            action: STATE_SET "show" 0.0;
+            target: "controlbar_bg";
+            transition: LINEAR 0.2;
+         }
+         program { name: "controlbar_close";
+            signal: "elm,state,controlbar,close";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "controlbar_bg";
+            transition: LINEAR 0.2;
+         }
+         program { name: "controlbar_instant_open";
+            signal: "elm,state,controlbar,instant_open";
+            source: "";
+            script {
+               emit("elm,state,prev_btn,show", "elm");
+               emit("elm,state,controlbar,show", "elm");
+            }
+         }
+         program { name: "controlbar_instant_close";
+            signal: "elm,state,controlbar,instant_close";
+            source: "";
+            script {
+               emit("elm,state,prev_btn,hide", "elm");
+               emit("elm,state,controlbar,hide", "elm");
+            }
+         }
+         program { name: "show_finished";
+            action: SIGNAL_EMIT "elm,action,show,finished" "";
+         }
+         program { name: "pushed_finished";
+            action: SIGNAL_EMIT "elm,action,pushed,finished" "";
+         }
+         program { name: "popped_finished";
+            action: SIGNAL_EMIT "elm,action,popped,finished" "";
+         }
+         program {
+            name: "title_clicked";
+            signal: "mouse,clicked,1";
+            source: "click_event_area";
+            action: SIGNAL_EMIT "elm,action,title,clicked" "";
+         }
+      }
+   }
+   group { name: "elm/naviframe/item/tabbar/default";
+      script {
+         public cbar_bg = 0;     //Controlbar BG Show call count
+      }
+      parts {
+         part { name: "base";
+            type: RECT;
+            mouse_events:  0;
+            description { state: "default" 0.0;
+               visible: 0;
+            }
+            description { state: "left" 0.0;
+               inherit: "default" 0.0;
+               rel1.relative: -1.0 0.0;
+               rel2.relative: 0.0 1.0;
+            }
+            description { state: "right" 0.0;
+               inherit: "default" 0.0;
+               rel1.relative: 1.0 0.0;
+               rel2.relative: 2.0 1.0;
+            }
+         }
+         part { name: "elm.swallow.content";
+            type: SWALLOW;
+            scale: 1;
+            repeat_events: 0;
+            clip_to: "content_clip";
+            description { state: "default" 0.0;
+               align: 0.0 0.0;
+               rel1.relative: 0.0 0.0;
+               rel1.to: "base";
+               rel2.relative: 1.0 0.0;
+               rel2.to_x: "base";
+               rel2.to_y: "controlbar_bg";
+            }
+         }
+         part { name: "content_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1.to: "elm.swallow.content";
+               rel2.to: "elm.swallow.content";
+            }
+         }
+         part { name: "controlbar_bg";
+            type: RECT;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 0 0;
+               max: 999999 0;
+               fixed: 0 1;
+               align: 0.0 1.0;
+               visible: 0;
+               rel1 { to: "base"; }
+               rel2 { to: "base"; }
+               color: NAVIFRAME_CONTROLBAR_BG_COLOR_INC;
+            }
+            description { state: "show" 0.0;
+               inherit: "default" 0.0;
+               min: 0 CONTROLBAR_SMALL_HEIGHT_INC;
+               max: 999999 CONTROLBAR_SMALL_HEIGHT_INC;
+               visible: 1;
+            }
+         }
+         part { name: "controlbar_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1 { to: "controlbar_bg"; }
+               rel2 { to: "controlbar_bg"; }
+            }
+         }
+         part { name: "elm.prev_btn_bg";
+           type: RECT;
+           scale: 1;
+           clip_to: "controlbar_clip";
+           description { state: "default" 0.0;
+              min: 0 0;
+              fixed: 1 0;
+              align: 1.0 0.0;
+              rel1 { relative: 1.0 0.0; to: "controlbar_bg"; }
+              rel2.to: "controlbar_bg";
+              visible: 0;
+           }
+           description { state: "visible" 0.0;
+              inherit: "default" 0.0;
+              min: NAVIFRAME_TITLE_PREV_BTN_BG_SIZE_INC 0;
+           }
+         }
+         part { name: "elm.swallow.prev_btn";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "controlbar_clip";
+            description { state: "default" 0.0;
+               fixed: 1 1;
+               align: 0.5 0.5;
+               rel1.to: "elm.prev_btn_bg";
+               rel2.to: "elm.prev_btn_bg";
+            }
+         }
+         part { name: "controlbar";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "controlbar_clip";
+            description { state: "default" 0.0;
+               rel1.to: "controlbar_bg";
+               rel2 { relative: 0.0 1.0; to: "elm.prev_btn_bg"; }
+            }
+         }
+      }
+      programs {
+         program { name: "content_new_pushed";
+            signal: "elm,state,new,pushed,internal";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "base";
+            transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+            after: "show_finished";
+         }
+         program { name: "content_cur_pushed";
+            signal: "elm,state,cur,pushed,internal";
+            source: "";
+            action: STATE_SET "left" 0.0;
+            target: "base";
+            transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+            after: "pushed_finished";
+         }
+         program { name: "content_prev_popped";
+            signal: "elm,state,prev,popped,internal";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "base";
+            transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+            after: "show_finished";
+         }
+         program { name: "content_cur_popped";
+            signal: "elm,state,cur,popped,internal";
+            source: "";
+            action: STATE_SET "right" 0.0;
+            target: "base";
+            transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+            after: "popped_finished";
+         }
+         program { name: "cur_pushed";
+            signal: "elm,state,cur,pushed";
+            source: "elm";
+            script {
+               set_state(PART:"base", "default", 0.0);
+               emit("elm,state,cur,pushed,internal", "");
+            }
+         }
+         program { name: "new_pushed";
+            signal: "elm,state,new,pushed";
+            source: "elm";
+            script {
+               set_state(PART:"base", "right", 0.0);
+               emit("elm,state,new,pushed,internal", "");
+            }
+         }
+         program { name: "prev_popped";
+            signal: "elm,state,prev,popped";
+            source: "elm";
+            script {
+               set_state(PART:"base", "left", 0.0);
+               emit("elm,state,prev,popped,internal", "");
+            }
+         }
+         program { name: "cur_popped";
+            signal: "elm,state,cur,popped";
+            source: "elm";
+            script {
+               set_state(PART:"base", "default", 0.0);
+               emit("elm,state,cur,popped,internal", "");
+            }
+         }
+         program { name: "visible";
+            signal: "elm,state,visible";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "base";
+         }
+         program { name: "prev_btn_show";
+            signal: "elm,state,prev_btn,show";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,show", "elm");
+               set_state(PART:"elm.prev_btn_bg", "visible", 0.0);
+            }
+         }
+         program { name: "prev_btn_hide";
+            signal: "elm,state,prev_btn,hide";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,hide", "elm");
+               set_state(PART:"elm.prev_btn_bg", "default", 0.0);
+            }
+         }
+         program { name: "controlbar_show";
+            signal: "elm,state,controlbar,show";
+            source: "elm";
+            action: STATE_SET "show" 0.0;
+            script {
+               emit("elm,state,controlbar_bg,show", "elm");
+            }
+         }
+         program { name: "controlbar_hide";
+            signal: "elm,state,controlbar,hide";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,hide", "elm");
+            }
+         }
+         program { name: "controlbar_bg_show";
+            signal: "elm,state,controlbar_bg,show";
+            source: "elm";
+            script {
+               set_state(PART:"controlbar_bg", "show", 0.0);
+               set_int(cbar_bg, get_int(cbar_bg) + 1);
+            }
+         }
+         program { name: "controlbar_bg_hide";
+            signal: "elm,state,controlbar_bg,hide";
+            source: "elm";
+            script {
+               set_int(cbar_bg, get_int(cbar_bg) - 1);
+               if (get_int(cbar_bg) <= 0)
+                 set_state(PART:"controlbar_bg", "default", 0.0);
+            }
+         }
+         program { name: "controlbar_open";
+            signal: "elm,state,controlbar,open";
+            source: "";
+            action: STATE_SET "show" 0.0;
+            target: "controlbar_bg";
+            transition: LINEAR 0.2;
+         }
+         program { name: "controlbar_close";
+            signal: "elm,state,controlbar,close";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "controlbar_bg";
+            transition: LINEAR 0.2;
+         }
+         program { name: "controlbar_instant_open";
+            signal: "elm,state,controlbar,instant_open";
+            source: "";
+            script {
+               emit("elm,state,prev_btn,show", "elm");
+               emit("elm,state,controlbar,show", "elm");
+            }
+         }
+         program { name: "controlbar_instant_close";
+            signal: "elm,state,controlbar,instant_close";
+            source: "";
+            script {
+               emit("elm,state,prev_btn,hide", "elm");
+               emit("elm,state,controlbar,hide", "elm");
+            }
+         }
+         program { name: "show_finished";
+            action: SIGNAL_EMIT "elm,action,show,finished" "";
+         }
+         program { name: "pushed_finished";
+            action: SIGNAL_EMIT "elm,action,pushed,finished" "";
+         }
+         program { name: "popped_finished";
+            action: SIGNAL_EMIT "elm,action,popped,finished" "";
+         }
+         program {
+            name: "title_clicked";
+            signal: "mouse,clicked,1";
+            source: "click_event_area";
+            action: SIGNAL_EMIT "elm,action,title,clicked" "";
+         }
+      }
+   }
+   group { name:"elm/naviframe/item/basic/instant/default";
+      alias:"elm/naviframe/item/video/1line/instant/default";
+      alias:"elm/naviframe/item/video/instant/default";
+      images {
+         image: "naviframe_optionheader.png" COMP;
+         image: "naviframe_optionheader_arrow.png" COMP;
+      }
+      script {
+         public oh_show = 0;     //optionheader show/hide
+         public oh_close = 0;    //optionheader close/open
+         public cbar_bg = 0;     //Controlbar BG Show call count
+         public left_btn_visible = 0; //whether left btn is shown
+         public icon_visible = 0; //whether icon is shown
+         public right_btn_visible = 0; //whether right btn is shown
+         public more_btn_visible = 0; //whether more btn is shown
+         public large_padded_center_align = 0; //large padding based on button size for center align for 1/2 buttons.
+      }
+      parts {
+         part { name: "title_bg";
+            type: RECT;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 1 NAVIFRAME_TITLE_H_INC;
+               align: 0.0 0.0;
+               fixed: 0 1;
+               rel1 { relative: 0.0 0.0; }
+               rel2 { relative: 1.0 0.0; }
+               color: NAVIFRAME_TITLE_BG_COLOR_INC;
+             }
+            description { state: "hide" 0.0;
+               inherit: "default" 0.0;
+               min: 0 0;
+               max: 0 0;
+               fixed: 1 1;
+            }
+         }
+         part { name: "title_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1 { to: "title_bg"; }
+               rel2 { to: "title_bg"; }
+            }
+         }
+         part { name: "optionheader_bg";
+            type: IMAGE;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 1 0;
+               align: 0.5 0;
+               fixed: 0 1;
+               rel1.to: "title_bg";
+               rel1.relative: 0 1;
+               rel2.to: "title_bg";
+               visible: 0;
+               image { normal: "naviframe_optionheader.png";
+                  border: NAVIFRAME_OH_BORDER_INC;
+               }
+            }
+            description { state: "show" 0.0;
+               inherit: "default" 0.0;
+               min: 1 NAVIFRAME_OH_OPENED_H_INC;
+               visible: 1;
+            }
+            description { state: "hide" 0.0;
+               inherit: "default" 0.0;
+               min: 0 0;
+               max: 0 0;
+               fixed: 1 1;
+            }
+         }
+         part { name: "optionheader_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1 { to: "optionheader_bg"; }
+               rel2 { to: "optionheader_bg"; }
+            }
+         }
+         part { name: "optionheader_top_padding";
+            type: RECT;
+            scale: 1;
+            clip_to: "optionheader_clip";
+            description { state: "default" 0.0;
+               min: 0 NAVIFRAME_OH_PADDING_INC;
+               rel1 { relative: 0.0 0.0; to: "optionheader_bg"; }
+               rel2 { relative: 1.0 0.0; to: "optionheader_bg"; }
+               fixed: 0 1;
+               align: 0.0 0.0;
+               visible: 0;
+            }
+         }
+         part { name: "optionheader";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "optionheader_clip";
+            description { state: "default" 0.0;
+               min: 0 NAVIFRAME_OH_CONTENT_H_INC;
+               rel1 { relative: 0.0 1.0; to: "optionheader_top_padding"; }
+               rel2 { relative: 1.0 1.0; to: "optionheader_top_padding"; }
+               fixed: 0 1;
+               align: 0.0 0.0;
+            }
+         }
+         part { name: "optionheader_bottom_padding";
+            type: RECT;
+            scale: 1;
+            clip_to: "optionheader_clip";
+            description { state: "default" 0.0;
+               min: 0 NAVIFRAME_OH_PADDING_INC;
+               rel1 { relative: 0.0 1.0; to: "optionheader"; }
+               rel2 { relative: 1.0 1.0; to: "optionheader"; }
+               fixed: 0 1;
+               align: 0.0 0.0;
+               visible: 0;
+            }
+         }
+         part { name: "elm.swallow.content";
+            type: SWALLOW;
+            scale: 1;
+            repeat_events: 0;
+            clip_to: "content_clip";
+            description { state: "default" 0.0;
+               align: 0.0 0.0;
+               rel1.relative: 0.0 1.0;
+               rel1.to_y: "optionheader_bg";
+               rel2.relative: 1.0 0.0;
+               rel2.to_y: "controlbar_bg";
+            }
+         }
+         part { name: "content_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1.to: "elm.swallow.content";
+               rel2.to: "elm.swallow.content";
+            }
+         }
+         part { name: "padding_before_left_btn";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+               fixed: 1 0;
+               align: 0.0 0.5;
+               rel1 { relative: 0.0 0.0; to: "title_bg"; }
+               rel2 { relative: 0.0 1.0; to: "title_bg"; }
+               visible: 0;
+            }
+         }
+         part { name: "padding_after_left_btn";
+            type: RECT;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+               fixed: 1 0;
+               align: 0 0.5;
+               rel1 { relative: 1.0 0.0; to: "title_left_btn"; }
+               rel2 { relative: 1.0 1.0; to: "title_left_btn"; }
+               visible: 0;
+            }
+         }
+         part { name: "padding_before_more_btn";
+            type: RECT;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+               fixed: 1 0;
+               align: 1.0 0.5;
+               rel1 { relative: 0.0 0.0; to: "title_more_btn"; }
+               rel2 { relative: 0.0 1.0; to: "title_more_btn"; }
+               visible: 0;
+            }
+         }
+         part { name: "padding_after_right_btn";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+               fixed: 1 0;
+               align: 1.0 0.5;
+               rel1 { relative: 1.0 0.0; to: "title_bg"; }
+               rel2 { relative: 1.0 1.0; to: "title_bg"; }
+               visible: 0;
+            }
+         }
+         part { name: "padding_before_right_btn";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: 0 0;
+               fixed: 1 0;
+               align: 1.0 0.5;
+               rel1 { relative: 0.0 0.0; to: "title_right_btn"; }
+               rel2 { relative: 0.0 1.0; to: "title_right_btn"; }
+               visible: 0;
+            }
+            description { state: "right_and_more_button" 0.0;
+               inherit: "default" 0.0;
+               min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+            }
+         }
+         part { name: "padding_before_text";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               align: 1.0 0.5;
+               rel1 { relative: 0.0 0.0; to_x: "elm.text.title"; to_y: "title_bg"; }
+               rel2 { relative: 0.0 1.0; to_x: "elm.text.title"; to_y: "title_bg"; }
+               fixed: 1 0;
+               min: NAVIFRAME_ICON_PADDING_INC;
+               visible: 0;
+            }
+         }
+         part { name: "padding_center_text1";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+               fixed: 1 0;
+               align: 0.0 0.0;
+               rel1 { relative: 0.0 0.0; to: "title_bg"; }
+               rel2 { relative: 0.0 1.0; to: "title_bg"; }
+               visible: 0;
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               min: NAVIFRAME_TEXT_PADDING_INC 0;
+            }
+            description { state: "icon" 0.0;
+               inherit: "default" 0.0;
+               min: NAVIFRAME_NO_BUTTON_ICON_PADDING_INC 0;
+            }
+            description { state: "icon_left_button" 0.0;
+               inherit: "default" 0.0;
+               min: NAVIFRAME_TEXT_PADDING_ICON_VISIBLE_INC 0;
+            }
+         }
+         part { name: "padding_center_text2";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+               fixed: 1 0;
+               align: 1.0 0.5;
+               rel1 { relative: 1.0 0.0; to: "title_bg"; }
+               rel2 { relative: 1.0 1.0; to: "title_bg"; }
+               visible: 0;
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               min: NAVIFRAME_TEXT_PADDING_INC 0;
+            }
+         }
+         part { name: "elm.text.title";
+            type: TEXT;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               text { font: "SLP:style=Medium";
+                  text_class: "slp_medium";
+                  size: NAVIFRAME_TITLE_FONT_SIZE_INC;
+                  min: 0 0;
+                  max: 1 0;
+                  align: 0.5 0.5;
+               }
+               color: NAVIFRAME_TITLE_TEXT_COLOR_INC;
+               align: 0.5 0.5;
+               fixed: 1 0;
+               rel1 { relative: 1.0 0.0; to: "padding_center_text1"; }
+               rel2 { relative: 0.0 1.0; to: "padding_center_text2"; }
+            }
+            description { state: "right_and_more_button" 0.0;
+               inherit: "default" 0.0;
+               rel1 { relative: 1.0 0.0; to: "padding_after_left_btn"; }
+               rel2 { relative: 0.0 1.0; to: "padding_before_more_btn"; }
+            }
+         }
+         part { name: "elm.swallow.icon";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               max: NAVIFRAME_ICON_SIZE_INC;
+               fixed: 1 1;
+               rel1 { relative: 0.0 0.0; to: "padding_before_text"; }
+               rel2 { relative: 0.0 1.0; to: "padding_before_text"; }
+               aspect: 1.0 1.0;
+               aspect_preference: VERTICAL;
+               align: 1.0 0.5;
+            }
+         }
+         part { name: "click_event_area";
+             ignore_flags: ON_HOLD;
+             repeat_events: 1;
+             description { state: "default" 0.0;
+                rel1 { to: "title_bg"; }
+                rel2 { to: "title_bg"; }
+             }
+         }
+         part { name: "title_left_btn";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+               fixed: 1 1;
+               align: 0 0.5;
+               rel1 { relative: 1.0 0.0; to: "padding_before_left_btn"; }
+               rel2 { relative: 1.0 1.0; to: "padding_before_left_btn"; }
+            }
+         }
+         part { name: "title_right_btn";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+               align: 1 0.5;
+               fixed: 1 1;
+               rel1 { relative: 0.0 0.0; to: "padding_after_right_btn"; }
+               rel2 { relative: 0.0 1.0; to: "padding_after_right_btn"; }
+            }
+         }
+         part { name: "title_more_btn";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+               fixed: 1 1;
+               align: 1 0.5;
+               rel1 { relative: 0.0 0.0; to: "padding_before_right_btn"; }
+               rel2 { relative: 0.0 1.0; to: "padding_before_right_btn"; }
+            }
+         }
+         part { name: "optionheader_arrow";
+            type: IMAGE;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: NAVIFRAME_OH_ARROW_SIZE_INC;
+               max: NAVIFRAME_OH_ARROW_SIZE_INC;
+               fixed: 1 1;
+               align: 0.5 0.0;
+               rel1 { relative: 0.0 1.025; to: "title_more_btn"; }
+               rel2 { relative: 1.0 1.025; to: "title_more_btn"; }
+               image.normal: "naviframe_optionheader_arrow.png";
+               color: 255 255 255 0;
+            }
+            description { state: "show" 0.0;
+               inherit: "default" 0.0;
+               color: 255 255 255 255;
+            }
+         }
+         part { name: "controlbar_bg";
+            type: RECT;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 0 0;
+               max: 999999 0;
+               fixed: 0 1;
+               align: 0.0 1.0;
+               visible: 0;
+               color: NAVIFRAME_CONTROLBAR_BG_COLOR_INC;
+            }
+            description { state: "show" 0.0;
+               inherit: "default" 0.0;
+               min: 0 CONTROLBAR_SMALL_HEIGHT_INC;
+               max: 999999 CONTROLBAR_SMALL_HEIGHT_INC;
+               visible: 1;
+            }
+         }
+         part { name: "controlbar_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1 { to: "controlbar_bg"; }
+               rel2 { to: "controlbar_bg"; }
+            }
+         }
+         part { name: "elm.prev_btn_bg";
+            type: RECT;
+            scale: 1;
+            clip_to: "controlbar_clip";
+            description { state: "default" 0.0;
+               min: 0 0;
+               fixed: 1 0;
+               align: 1.0 0.0;
+               rel1 { relative: 1.0 0.0; to: "controlbar_bg"; }
+               rel2.to: "controlbar_bg";
+               visible: 0;
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               min: NAVIFRAME_TITLE_PREV_BTN_BG_SIZE_INC 0;
+            }
+         }
+        part { name: "elm.swallow.prev_btn";
+           type: SWALLOW;
+           scale: 1;
+           clip_to: "controlbar_clip";
+           description { state: "default" 0.0;
+              fixed: 1 1;
+              align: 0.5 0.5;
+              rel1.to: "elm.prev_btn_bg";
+              rel2.to: "elm.prev_btn_bg";
+           }
+        }
+        part { name: "controlbar";
+           type: SWALLOW;
+           scale: 1;
+           clip_to: "controlbar_clip";
+           description { state: "default" 0.0;
+              rel1.to: "controlbar_bg";
+              rel2 { relative: 0.0 1.0; to: "elm.prev_btn_bg"; }
+           }
+        }
+      }
+      programs {
+         program { name: "cur_pushed";
+            signal: "elm,state,cur,pushed";
+            source: "elm";
+            after: "pushed_finished";
+         }
+         program { name: "new_pushed";
+            signal: "elm,state,new,pushed";
+            source: "elm";
+            after: "show_finished";
+         }
+         program { name: "prev_popped";
+            signal: "elm,state,prev,popped";
+            source: "elm";
+            after: "show_finished";
+         }
+         program { name: "cur_popped";
+            signal: "elm,state,cur,popped";
+            source: "elm";
+            after: "popped_finished";
+         }
+         program { name: "title_show";
+            signal: "elm,state,title,show";
+            source: "elm";
+            script {
+               set_state(PART:"title_bg", "default", 0.0);
+               if (get_int(oh_show) == 1) {
+                  if (get_int(oh_close) == 1) {
+                     emit("elm,state,optionheader,instant_close", "");
+                  }else {
+                     emit("elm,state,optionheader,instant_open", "");
+                  }
+               }
+               else
+                 set_state(PART:"optionheader_bg", "default", 0.0);
+            }
+         }
+         program { name: "title_hide";
+            signal: "elm,state,title,hide";
+            source: "elm";
+            action: STATE_SET "hide" 0.0;
+            target: "title_bg";
+            target: "optionheader_bg";
+         }
+         program { name: "prev_btn_show";
+            signal: "elm,state,prev_btn,show";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,show", "elm");
+               set_state(PART:"elm.prev_btn_bg", "visible", 0.0);
+            }
+         }
+         program { name: "prev_btn_hide";
+            signal: "elm,state,prev_btn,hide";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,hide", "elm");
+               set_state(PART:"elm.prev_btn_bg", "default", 0.0);
+            }
+         }
+         program { name: "left_btn_show";
+            signal: "elm,state,title_left_btn,show";
+            source: "elm";
+            script {
+               set_int(left_btn_visible, 1);
+               if (get_int(icon_visible) == 1)
+                 set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+               else
+                 set_state(PART:"padding_center_text1", "visible", 0.0);
+               if ((get_int(more_btn_visible) == 1) && (get_int(right_btn_visible) == 1)) {
+                  set_state(PART:"elm.text.title", "right_and_more_button", 0.0);
+                  set_int(large_padded_center_align, 0);
+               }
+               else {
+                  set_state(PART:"padding_center_text2", "visible", 0.0);
+                  set_int(large_padded_center_align, 1);
+               }
+            }
+         }
+         program { name: "left_btn_hide";
+            signal: "elm,state,title_left_btn,hide";
+            source: "elm";
+            script {
+               set_int(left_btn_visible, 0);
+               if ((get_int(more_btn_visible) == 0) && (get_int(right_btn_visible) == 0)) {
+                  set_state(PART:"padding_center_text2", "default", 0.0);
+                  set_int(large_padded_center_align, 0);
+               }
+               else {
+                  set_state(PART:"padding_center_text2", "visible", 0.0);
+                  set_int(large_padded_center_align, 1);
+               }
+               if ((get_int(large_padded_center_align) == 1) && (get_int(icon_visible) == 1))
+                  set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+               else if (get_int(large_padded_center_align) == 1)
+                  set_state(PART:"padding_center_text1", "visible", 0.0);
+               else if (get_int(icon_visible) == 1)
+                  set_state(PART:"padding_center_text1", "icon", 0.0);
+               else
+                  set_state(PART:"padding_center_text1", "default", 0.0);
+            }
+         }
+         program { name: "right_btn_show";
+            signal: "elm,state,tltle_right_btn,show";
+            source: "elm";
+            script {
+               set_int(right_btn_visible, 1);
+               if (get_int(more_btn_visible) == 1) {
+                  set_state(PART:"elm.text.title", "right_and_more_button", 0.0);
+                  set_state(PART:"padding_before_right_btn", "right_and_more_button", 0.0);
+                  set_int(large_padded_center_align, 0);
+               }
+               else {
+                  set_state(PART:"padding_center_text2", "visible", 0.0);
+                  set_int(large_padded_center_align, 1);
+               }
+               if ((get_int(icon_visible) == 1) && ((get_int(left_btn_visible) == 1) ||
+                                                    (get_int(large_padded_center_align) == 1)))
+                 set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+               else if ((get_int(left_btn_visible) == 1) || (get_int(large_padded_center_align) == 1))
+                 set_state(PART:"padding_center_text1", "visible", 0.0);
+               else if (get_int(icon_visible) == 1)
+                 set_state(PART:"padding_center_text1", "icon", 0.0);
+               else
+                 set_state(PART:"padding_center_text1", "default", 0.0);
+            }
+         }
+         program { name: "right_btn_hide";
+            signal: "elm,state,title_right_btn,hide";
+            source: "elm";
+            script {
+               set_int(right_btn_visible, 0);
+               set_state(PART:"padding_before_right_btn", "default", 0.0);
+               if ((get_int(more_btn_visible) == 0) && (get_int(left_btn_visible) == 0)) {
+                  set_state(PART:"padding_center_text2", "default", 0.0);
+                  set_int(large_padded_center_align, 0);
+               }
+               else {
+                  set_state(PART:"padding_center_text2", "visible", 0.0);
+                  set_int(large_padded_center_align, 1);
+               }
+               if ((get_int(large_padded_center_align) == 1) && (get_int(icon_visible) == 1))
+                  set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+               else if (get_int(large_padded_center_align) == 1)
+                  set_state(PART:"padding_center_text1", "visible", 0.0);
+               else if (get_int(icon_visible) == 1)
+                  set_state(PART:"padding_center_text1", "icon", 0.0);
+               else
+                  set_state(PART:"padding_center_text1", "default", 0.0);
+            }
+         }
+         program { name: "more_btn_show";
+            signal: "elm,state,title_more_btn,show";
+            source: "elm";
+            script {
+               set_int(more_btn_visible, 1);
+               if (get_int(right_btn_visible) == 1) {
+                  set_state(PART:"elm.text.title", "right_and_more_button", 0.0);
+                  set_state(PART:"padding_before_right_btn", "right_and_more_button", 0.0);
+                  set_int(large_padded_center_align, 0);
+               }
+               else {
+                  set_state(PART:"padding_center_text2", "visible", 0.0);
+                  set_int(large_padded_center_align, 1);
+               }
+               if ((get_int(icon_visible) == 1) && ((get_int(left_btn_visible) == 1) ||
+                                                    (get_int(large_padded_center_align) == 1)))
+                 set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+               else if ((get_int(left_btn_visible) == 1) || (get_int(large_padded_center_align) == 1))
+                 set_state(PART:"padding_center_text1", "visible", 0.0);
+               else if (get_int(icon_visible) == 1)
+                 set_state(PART:"padding_center_text1", "icon", 0.0);
+               else
+                 set_state(PART:"padding_center_text1", "default", 0.0);
+            }
+         }
+         program { name: "more_btn_hide";
+            signal: "elm,state,title_more_btn,hide";
+            source: "elm";
+            script {
+               set_int(more_btn_visible, 0);
+               set_state(PART:"padding_before_right_btn", "default", 0.0);
+               if ((get_int(right_btn_visible) == 0) && (get_int(left_btn_visible) == 0)) {
+                  set_state(PART:"padding_center_text2", "default", 0.0);
+                  set_int(large_padded_center_align, 0);
+               }
+               else {
+                  set_state(PART:"padding_center_text2", "visible", 0.0);
+                  set_int(large_padded_center_align, 1);
+               }
+               if ((get_int(large_padded_center_align) == 1) && (get_int(icon_visible) == 1))
+                  set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+               else if (get_int(large_padded_center_align) == 1)
+                  set_state(PART:"padding_center_text1", "visible", 0.0);
+               else if (get_int(icon_visible) == 1)
+                  set_state(PART:"padding_center_text1", "icon", 0.0);
+               else
+                  set_state(PART:"padding_center_text1", "default", 0.0);
+            }
+         }
+         program { name: "icon_show";
+            signal: "elm,state,elm.swallow.icon,show";
+            source: "elm";
+            script {
+               set_int(icon_visible, 1);
+               if ((get_int(large_padded_center_align) == 1) || (get_int(left_btn_visible) == 1))
+                 set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+               else
+                 set_state(PART:"padding_center_text1", "icon", 0.0);
+            }
+         }
+         program { name: "icon_hide";
+            signal: "elm,state,elm.swallow.icon,hide";
+            source: "elm";
+            script {
+               set_int(icon_visible, 0);
+               if ((get_int(large_padded_center_align) == 1) || (get_int(left_btn_visible) == 1))
+                 set_state(PART:"padding_center_text1", "visible", 0.0);
+               else
+                 set_state(PART:"padding_center_text1", "default", 0.0);
+            }
+         }
+         program { name: "controlbar_show";
+            signal: "elm,state,controlbar,show";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,show", "elm");
+            }
+         }
+         program { name: "controlbar_hide";
+            signal: "elm,state,controlbar,hide";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,hide", "elm");
+            }
+         }
+         program { name: "controlbar_bg_show";
+            signal: "elm,state,controlbar_bg,show";
+            source: "elm";
+            script {
+               set_state(PART:"controlbar_bg", "show", 0.0);
+               set_int(cbar_bg, get_int(cbar_bg) + 1);
+            }
+         }
+         program { name: "controlbar_bg_hide";
+            signal: "elm,state,controlbar_bg,hide";
+            source: "elm";
+            script {
+               set_int(cbar_bg, get_int(cbar_bg) - 1);
+               if (get_int(cbar_bg) <= 0)
+                 set_state(PART:"controlbar_bg", "default", 0.0);
+            }
+         }
+         program { name: "optionheader_show";
+            signal: "elm,state,optionheader,show";
+            source: "elm";
+            script {
+               set_state(PART:"optionheader_bg", "show", 0.0);
+               set_state(PART:"optionheader_arrow", "show", 0.0);
+               set_int(oh_show, 1);
+            }
+         }
+         program { name: "optionheader_hide";
+            signal: "elm,state,optionheader,hide";
+            source: "elm";
+            script {
+               set_state(PART:"optionheader_bg", "default", 0.0);
+               set_state(PART:"optionheader_arrow", "default", 0.0);
+               set_int(oh_show, 0);
+            }
+         }
+         program { name: "optionheader_open";
+            signal: "elm,state,optionheader,open";
+            source: "";
+            action: STATE_SET "show" 0.0;
+            target: "optionheader_bg";
+            target: "optionheader_arrow";
+            transition: LINEAR 0.2;
+            after: "optionheader_open_set";
+         }
+         program { name: "optionheader_close";
+            signal: "elm,state,optionheader,close";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "optionheader_bg";
+            target: "optionheader_arrow";
+            transition: LINEAR 0.2;
+            after: "optionheader_close_set";
+         }
+         program { name: "optionheader_instant_open";
+            signal: "elm,state,optionheader,instant_open";
+            source: "";
+            action: STATE_SET "show" 0.0;
+            target: "optionheader_bg";
+            target: "optionheader_arrow";
+            after: "optionheader_open_set";
+         }
+         program { name: "optionheader_instant_close";
+            signal: "elm,state,optionheader,instant_close";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "optionheader_bg";
+            target: "optionheader_arrow";
+            after: "optionheader_close_set";
+         }
+         program { name: "optionheader_close_set";
+            signal: "elm,state,optionheader,close_set";
+            source: "";
+            script {
+               set_int(oh_close, 1);
+            }
+         }
+         program { name: "optionheader_open_set";
+            signal: "elm,state,optionheader,open_set";
+            source: "";
+            script {
+               set_int(oh_close, 0);
+            }
+         }
+         program { name: "controlbar_open";
+            signal: "elm,state,controlbar,open";
+            source: "";
+            action: STATE_SET "show" 0.0;
+            target: "controlbar_bg";
+            transition: LINEAR 0.2;
+         }
+         program { name: "controlbar_close";
+            signal: "elm,state,controlbar,close";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "controlbar_bg";
+            transition: LINEAR 0.2;
+         }
+         program { name: "controlbar_instant_open";
+            signal: "elm,state,controlbar,instant_open";
+            source: "";
+            script {
+               emit("elm,state,prev_btn,show", "elm");
+               emit("elm,state,controlbar,show", "elm");
+            }
+         }
+         program { name: "controlbar_instant_close";
+            signal: "elm,state,controlbar,instant_close";
+            source: "";
+            script {
+               emit("elm,state,prev_btn,hide", "elm");
+               emit("elm,state,controlbar,hide", "elm");
+            }
+         }
+         program { name: "show_finished";
+            action: SIGNAL_EMIT "elm,action,show,finished" "";
+         }
+         program { name: "pushed_finished";
+            action: SIGNAL_EMIT "elm,action,pushed,finished" "";
+         }
+         program { name: "popped_finished";
+            action: SIGNAL_EMIT "elm,action,popped,finished" "";
+         }
+         program {
+            name: "title_clicked";
+            signal: "mouse,clicked,1";
+            source: "click_event_area";
+            action: SIGNAL_EMIT "elm,action,title,clicked" "";
+         }
+      }
+   }
+   group { name:"elm/naviframe/item/basic2/instant/default";
+      alias:"elm/naviframe/item/video/2line/instant/default";
+      alias:"elm/naviframe/item/video/instant2/default";
+      images {
+         image: "naviframe_optionheader.png" COMP;
+         image: "naviframe_optionheader_arrow.png" COMP;
+      }
+      script {
+         public oh_show = 0;     //optionheader show/hide
+         public oh_close = 0;    //optionheader close/open
+         public cbar_bg = 0;     //Controlbar BG Show call count
+         public left_btn_visible = 0; //whether left btn is shown
+         public icon_visible = 0; //whether icon is shown
+         public right_btn_visible = 0; //whether right btn is shown
+         public more_btn_visible = 0; //whether more btn is shown
+         public large_padded_center_align = 0; //large padding based on button size for center align for 1/2 buttons.
+      }
+      parts {
+         part { name: "title_bg";
+            type: RECT;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 1 NAVIFRAME_TITLE_H_INC;
+               align: 0.0 0.0;
+               fixed: 0 1;
+               rel1 { relative: 0.0 0.0; }
+               rel2 { relative: 1.0 0.0; }
+               color: NAVIFRAME_TITLE_BG_COLOR_INC;
+            }
+            description { state: "hide" 0.0;
+               inherit: "default" 0.0;
+               min: 0 0;
+               max: 0 0;
+               fixed: 1 1;
+            }
+         }
+         part { name: "title_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1 { to: "title_bg"; }
+               rel2 { to: "title_bg"; }
+            }
+         }
+         part { name: "optionheader_bg";
+            type: IMAGE;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 1 0;
+               align: 0.5 0;
+               fixed: 0 1;
+               rel1.to: "title_bg";
+               rel1.relative: 0 1;
+               rel2.to: "title_bg";
+               visible: 0;
+               image { normal: "naviframe_optionheader.png";
+                  border: NAVIFRAME_OH_BORDER_INC;
+               }
+            }
+            description { state: "show" 0.0;
+               inherit: "default" 0.0;
+               min: 1 NAVIFRAME_OH_OPENED_DOUBLE_H_INC;
+               visible: 1;
+            }
+            description { state: "hide" 0.0;
+               inherit: "default" 0.0;
+               min: 0 0;
+               max: 0 0;
+               fixed: 1 1;
+            }
+         }
+         part { name: "optionheader_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1 { to: "optionheader_bg"; }
+               rel2 { to: "optionheader_bg"; }
+            }
+         }
+         part { name: "optionheader_top_padding";
+            type: RECT;
+            scale: 1;
+            clip_to: "optionheader_clip";
+            description { state: "default" 0.0;
+               min: 0 NAVIFRAME_OH_PADDING_INC;
+               rel1 { relative: 0.0 0.0; to: "optionheader_bg"; }
+               rel2 { relative: 1.0 0.0; to: "optionheader_bg"; }
+               fixed: 0 1;
+               align: 0.0 0.0;
+               visible: 0;
+            }
+         }
+         part { name: "optionheader";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "optionheader_clip";
+            description { state: "default" 0.0;
+               min: 0 NAVIFRAME_OH_CONTENT_H_INC;
+               rel1 { relative: 0.0 1.0; to: "optionheader_top_padding"; }
+               rel2 { relative: 1.0 1.0; to: "optionheader_top_padding"; }
+               fixed: 0 1;
+               align: 0.0 0.0;
+            }
+         }
+         part { name: "optionheader.mid.padding";
+            type: RECT;
+            scale: 1;
+            clip_to: "optionheader_clip";
+            description { state: "default" 0.0;
+               min: 0 NAVIFRAME_OH_PADDING_INC;
+               rel1 { relative: 0.0 1.0; to: "optionheader"; }
+               rel2 { relative: 1.0 1.0; to: "optionheader"; }
+               fixed: 0 1;
+               align: 0.0 0.0;
+               visible: 0;
+            }
+         }
+         part { name: "optionheader2";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "optionheader_clip";
+            description { state: "default" 0.0;
+               min: 0 NAVIFRAME_OH_CONTENT_H_INC;
+               rel1 { relative: 0.0 1.0; to: "optionheader.mid.padding";}
+               rel2 { relative: 1.0 1.0; to: "optionheader.mid.padding";}
+               fixed: 0 1;
+               align: 0.0 0.0;
+            }
+         }
+         part { name: "optionheader.bottom.padding";
+            type: RECT;
+            scale: 1;
+            clip_to: "optionheader_clip";
+            description { state: "default" 0.0;
+               min: 0 NAVIFRAME_OH_PADDING_INC;
+               rel1 { relative: 0.0 1.0; to: "optionheader2"; }
+               rel2 { relative: 1.0 1.0; to: "optionheader2"; }
+               fixed: 0 1;
+               align: 0.0 0.0;
+               visible: 0;
+            }
+         }
+         part { name: "elm.swallow.content";
+            type: SWALLOW;
+            scale: 1;
+            repeat_events: 0;
+            clip_to: "content_clip";
+            description { state: "default" 0.0;
+               align: 0.0 0.0;
+               rel1.relative: 0.0 1.0;
+               rel1.to_y: "optionheader_bg";
+               rel2.relative: 1.0 0.0;
+               rel2.to_y: "controlbar_bg";
+            }
+         }
+         part { name: "content_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1.to: "elm.swallow.content";
+               rel2.to: "elm.swallow.content";
+            }
+         }
+         part { name: "padding_before_left_btn";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+               fixed: 1 0;
+               align: 0.0 0.5;
+               rel1 { relative: 0.0 0.0; to: "title_bg"; }
+               rel2 { relative: 0.0 1.0; to: "title_bg"; }
+               visible: 0;
+            }
+         }
+         part { name: "padding_after_left_btn";
+            type: RECT;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+               fixed: 1 0;
+               align: 0 0.5;
+               rel1 { relative: 1.0 0.0; to: "title_left_btn"; }
+               rel2 { relative: 1.0 1.0; to: "title_left_btn"; }
+               visible: 0;
+            }
+         }
+         part { name: "padding_before_more_btn";
+            type: RECT;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+               fixed: 1 0;
+               align: 1.0 0.5;
+               rel1 { relative: 0.0 0.0; to: "title_more_btn"; }
+               rel2 { relative: 0.0 1.0; to: "title_more_btn"; }
+               visible: 0;
+            }
+         }
+         part { name: "padding_after_right_btn";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+               fixed: 1 0;
+               align: 1.0 0.5;
+               rel1 { relative: 1.0 0.0; to: "title_bg"; }
+               rel2 { relative: 1.0 1.0; to: "title_bg"; }
+               visible: 0;
+            }
+         }
+         part { name: "padding_before_right_btn";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: 0 0;
+               fixed: 1 0;
+               align: 1.0 0.5;
+               rel1 { relative: 0.0 0.0; to: "title_right_btn"; }
+               rel2 { relative: 0.0 1.0; to: "title_right_btn"; }
+               visible: 0;
+            }
+            description { state: "right_and_more_button" 0.0;
+               inherit: "default" 0.0;
+               min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+            }
+         }
+         part { name: "padding_before_text";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               align: 1.0 0.5;
+               rel1 { relative: 0.0 0.0; to_x: "elm.text.title"; to_y: "title_bg"; }
+               rel2 { relative: 0.0 1.0; to_x: "elm.text.title"; to_y: "title_bg"; }
+               fixed: 1 0;
+               min: NAVIFRAME_ICON_PADDING_INC;
+               visible: 0;
+            }
+         }
+       part { name: "padding_center_text1";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+               fixed: 1 0;
+               align: 0.0 0.0;
+               rel1 { relative: 0.0 0.0; to: "title_bg"; }
+               rel2 { relative: 0.0 1.0; to: "title_bg"; }
+               visible: 0;
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               min: NAVIFRAME_TEXT_PADDING_INC 0;
+            }
+            description { state: "icon" 0.0;
+               inherit: "default" 0.0;
+               min: NAVIFRAME_NO_BUTTON_ICON_PADDING_INC 0;
+            }
+            description { state: "icon_left_button" 0.0;
+               inherit: "default" 0.0;
+               min: NAVIFRAME_TEXT_PADDING_ICON_VISIBLE_INC 0;
+            }
+         }
+         part { name: "padding_center_text2";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+               fixed: 1 0;
+               align: 1.0 0.5;
+               rel1 { relative: 1.0 0.0; to: "title_bg"; }
+               rel2 { relative: 1.0 1.0; to: "title_bg"; }
+               visible: 0;
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               min: NAVIFRAME_TEXT_PADDING_INC 0;
+            }
+         }
+         part { name: "elm.text.title";
+            type: TEXT;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               text { font: "SLP:style=Medium";
+                  text_class: "slp_medium";
+                  size: NAVIFRAME_TITLE_FONT_SIZE_INC;
+                  min: 0 0;
+                  max: 1 0;
+                  align: 0.5 0.5;
+               }
+               color: NAVIFRAME_TITLE_TEXT_COLOR_INC;
+               align: 0.5 0.5;
+               fixed: 1 0;
+               rel1 { relative: 1.0 0.0; to: "padding_center_text1"; }
+               rel2 { relative: 0.0 1.0; to: "padding_center_text2"; }
+            }
+            description { state: "right_and_more_button" 0.0;
+               inherit: "default" 0.0;
+               rel1 { relative: 1.0 0.0; to: "padding_after_left_btn"; }
+               rel2 { relative: 0.0 1.0; to: "padding_before_more_btn"; }
+            }
+         }
+         part { name: "elm.swallow.icon";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               max: NAVIFRAME_ICON_SIZE_INC;
+               fixed: 1 1;
+               rel1 { relative: 0.0 0.0; to: "padding_before_text"; }
+               rel2 { relative: 0.0 1.0; to: "padding_before_text"; }
+               aspect: 1.0 1.0;
+               aspect_preference: VERTICAL;
+               align: 1.0 0.5;
+            }
+         }
+         part { name: "click_event_area";
+             ignore_flags: ON_HOLD;
+             repeat_events: 1;
+             description { state: "default" 0.0;
+                rel1 { to: "title_bg"; }
+                rel2 { to: "title_bg"; }
+             }
+         }
+         part { name: "title_left_btn";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+               fixed: 1 1;
+               align: 0 0.5;
+               rel1 { relative: 1.0 0.0; to: "padding_before_left_btn"; }
+               rel2 { relative: 1.0 1.0; to: "padding_before_left_btn"; }
+            }
+         }
+         part { name: "title_right_btn";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+               align: 1 0.5;
+               fixed: 1 1;
+               rel1 { relative: 0.0 0.0; to: "padding_after_right_btn"; }
+               rel2 { relative: 0.0 1.0; to: "padding_after_right_btn"; }
+            }
+         }
+         part { name: "title_more_btn";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+               fixed: 1 0;
+               align: 1 0.5;
+               rel1 { relative: 0.0 0.0; to: "padding_before_right_btn"; }
+               rel2 { relative: 0.0 1.0; to: "padding_before_right_btn"; }
+            }
+         }
+         part { name: "optionheader_arrow";
+            type: IMAGE;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: NAVIFRAME_OH_ARROW_SIZE_INC;
+               max: NAVIFRAME_OH_ARROW_SIZE_INC;
+               fixed: 1 1;
+               align: 0.5 0.0;
+               rel1 { relative: 0.0 1.025; to: "title_more_btn"; }
+               rel2 { relative: 1.0 1.025; to: "title_more_btn"; }
+               image.normal: "naviframe_optionheader_arrow.png";
+               color: 255 255 255 0;
+            }
+            description { state: "show" 0.0;
+               inherit: "default" 0.0;
+               color: 255 255 255 255;
+            }
+         }
+         part { name: "controlbar_bg";
+            type: RECT;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 0 0;
+               max: 999999 0;
+               fixed: 0 1;
+               align: 0.0 1.0;
+               visible: 0;
+               color: NAVIFRAME_CONTROLBAR_BG_COLOR_INC;
+            }
+            description { state: "show" 0.0;
+               inherit: "default" 0.0;
+               min: 0 CONTROLBAR_SMALL_HEIGHT_INC;
+               max: 999999 CONTROLBAR_SMALL_HEIGHT_INC;
+               visible: 1;
+            }
+         }
+         part { name: "controlbar_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1 { to: "controlbar_bg"; }
+               rel2 { to: "controlbar_bg"; }
+            }
+         }
+         part { name: "elm.prev_btn_bg";
+            type: RECT;
+            scale: 1;
+            clip_to: "controlbar_clip";
+            description { state: "default" 0.0;
+               min: 0 0;
+               fixed: 1 0;
+               align: 1.0 0.0;
+               rel1 { relative: 1.0 0.0; to: "controlbar_bg"; }
+               rel2.to: "controlbar_bg";
+               visible: 0;
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               min: NAVIFRAME_TITLE_PREV_BTN_BG_SIZE_INC 0;
+            }
+         }
+        part { name: "elm.swallow.prev_btn";
+           type: SWALLOW;
+           scale: 1;
+           clip_to: "controlbar_clip";
+           description { state: "default" 0.0;
+              fixed: 1 1;
+              align: 0.5 0.5;
+              rel1.to: "elm.prev_btn_bg";
+              rel2.to: "elm.prev_btn_bg";
+           }
+        }
+        part { name: "controlbar";
+           type: SWALLOW;
+           scale: 1;
+           clip_to: "controlbar_clip";
+           description { state: "default" 0.0;
+              rel1.to: "controlbar_bg";
+              rel2 { relative: 0.0 1.0; to: "elm.prev_btn_bg"; }
+           }
+        }
+      }
+      programs {
+         program { name: "cur_pushed";
+            signal: "elm,state,cur,pushed";
+            source: "elm";
+            after: "pushed_finished";
+         }
+         program { name: "new_pushed";
+            signal: "elm,state,new,pushed";
+            source: "elm";
+            after: "show_finished";
+         }
+         program { name: "prev_popped";
+            signal: "elm,state,prev,popped";
+            source: "elm";
+            after: "show_finished";
+         }
+         program { name: "cur_popped";
+            signal: "elm,state,cur,popped";
+            source: "elm";
+            after: "popped_finished";
+         }
+         program { name: "title_show";
+            signal: "elm,state,title,show";
+            source: "elm";
+            script {
+               set_state(PART:"title_bg", "default", 0.0);
+               if (get_int(oh_show) == 1) {
+                  if (get_int(oh_close) == 1) {
+                     emit("elm,state,optionheader,instant_close", "");
+                  }else {
+                     emit("elm,state,optionheader,instant_open", "");
+                  }
+               }
+               else
+                 set_state(PART:"optionheader_bg", "default", 0.0);
+            }
+         }
+         program { name: "title_hide";
+            signal: "elm,state,title,hide";
+            source: "elm";
+            action: STATE_SET "hide" 0.0;
+            target: "title_bg";
+            target: "optionheader_bg";
+         }
+         program { name: "prev_btn_show";
+            signal: "elm,state,prev_btn,show";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,show", "elm");
+               set_state(PART:"elm.prev_btn_bg", "visible", 0.0);
+            }
+         }
+         program { name: "prev_btn_hide";
+            signal: "elm,state,prev_btn,hide";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,hide", "elm");
+               set_state(PART:"elm.prev_btn_bg", "default", 0.0);
+            }
+         }
+         program { name: "left_btn_show";
+            signal: "elm,state,title_left_btn,show";
+            source: "elm";
+            script {
+               set_int(left_btn_visible, 1);
+               if (get_int(icon_visible) == 1)
+                 set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+               else
+                 set_state(PART:"padding_center_text1", "visible", 0.0);
+               if ((get_int(more_btn_visible) == 1) && (get_int(right_btn_visible) == 1)) {
+                  set_state(PART:"elm.text.title", "right_and_more_button", 0.0);
+                  set_int(large_padded_center_align, 0);
+               }
+               else {
+                  set_state(PART:"padding_center_text2", "visible", 0.0);
+                  set_int(large_padded_center_align, 1);
+               }
+            }
+         }
+         program { name: "left_btn_hide";
+            signal: "elm,state,title_left_btn,hide";
+            source: "elm";
+            script {
+               set_int(left_btn_visible, 0);
+               if ((get_int(more_btn_visible) == 0) && (get_int(right_btn_visible) == 0)) {
+                  set_state(PART:"padding_center_text2", "default", 0.0);
+                  set_int(large_padded_center_align, 0);
+               }
+               else {
+                  set_state(PART:"padding_center_text2", "visible", 0.0);
+                  set_int(large_padded_center_align, 1);
+               }
+               if ((get_int(large_padded_center_align) == 1) && (get_int(icon_visible) == 1))
+                  set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+               else if (get_int(large_padded_center_align) == 1)
+                  set_state(PART:"padding_center_text1", "visible", 0.0);
+               else if (get_int(icon_visible) == 1)
+                  set_state(PART:"padding_center_text1", "icon", 0.0);
+               else
+                  set_state(PART:"padding_center_text1", "default", 0.0);
+            }
+         }
+         program { name: "right_btn_show";
+            signal: "elm,state,title_right_btn,show";
+            source: "elm";
+            script {
+               set_int(right_btn_visible, 1);
+               if (get_int(more_btn_visible) == 1) {
+                  set_state(PART:"elm.text.title", "right_and_more_button", 0.0);
+                  set_state(PART:"padding_before_right_btn", "right_and_more_button", 0.0);
+                  set_int(large_padded_center_align, 0);
+               }
+               else {
+                  set_state(PART:"padding_center_text2", "visible", 0.0);
+                  set_int(large_padded_center_align, 1);
+               }
+               if ((get_int(icon_visible) == 1) && ((get_int(left_btn_visible) == 1) ||
+                                                    (get_int(large_padded_center_align) == 1)))
+                 set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+               else if ((get_int(left_btn_visible) == 1) || (get_int(large_padded_center_align) == 1))
+                 set_state(PART:"padding_center_text1", "visible", 0.0);
+               else if (get_int(icon_visible) == 1)
+                 set_state(PART:"padding_center_text1", "icon", 0.0);
+               else
+                 set_state(PART:"padding_center_text1", "default", 0.0);
+            }
+         }
+         program { name: "right_btn_hide";
+            signal: "elm,state,title_right_btn,hide";
+            source: "elm";
+            script {
+               set_int(right_btn_visible, 0);
+               set_state(PART:"padding_before_right_btn", "default", 0.0);
+               if ((get_int(more_btn_visible) == 0) && (get_int(left_btn_visible) == 0)) {
+                  set_state(PART:"padding_center_text2", "default", 0.0);
+                  set_int(large_padded_center_align, 0);
+               }
+               else {
+                  set_state(PART:"padding_center_text2", "visible", 0.0);
+                  set_int(large_padded_center_align, 1);
+               }
+               if ((get_int(large_padded_center_align) == 1) && (get_int(icon_visible) == 1))
+                  set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+               else if (get_int(large_padded_center_align) == 1)
+                  set_state(PART:"padding_center_text1", "visible", 0.0);
+               else if (get_int(icon_visible) == 1)
+                  set_state(PART:"padding_center_text1", "icon", 0.0);
+               else
+                  set_state(PART:"padding_center_text1", "default", 0.0);
+            }
+         }
+         program { name: "more_btn_show";
+            signal: "elm,state,title_more_btn,show";
+            source: "elm";
+            script {
+               set_int(more_btn_visible, 1);
+               if (get_int(right_btn_visible) == 1) {
+                  set_state(PART:"elm.text.title", "right_and_more_button", 0.0);
+                  set_state(PART:"padding_before_right_btn", "right_and_more_button", 0.0);
+                  set_int(large_padded_center_align, 0);
+               }
+               else {
+                  set_state(PART:"padding_center_text2", "visible", 0.0);
+                  set_int(large_padded_center_align, 1);
+               }
+               if ((get_int(icon_visible) == 1) && ((get_int(left_btn_visible) == 1) ||
+                                                    (get_int(large_padded_center_align) == 1)))
+                 set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+               else if ((get_int(left_btn_visible) == 1) || (get_int(large_padded_center_align) == 1))
+                 set_state(PART:"padding_center_text1", "visible", 0.0);
+               else if (get_int(icon_visible) == 1)
+                 set_state(PART:"padding_center_text1", "icon", 0.0);
+               else
+                 set_state(PART:"padding_center_text1", "default", 0.0);
+            }
+         }
+         program { name: "more_btn_hide";
+            signal: "elm,state,title_more_btn,hide";
+            source: "elm";
+            script {
+               set_int(more_btn_visible, 0);
+               set_state(PART:"padding_before_right_btn", "default", 0.0);
+               if ((get_int(right_btn_visible) == 0) && (get_int(left_btn_visible) == 0)) {
+                  set_state(PART:"padding_center_text2", "default", 0.0);
+                  set_int(large_padded_center_align, 0);
+               }
+               else {
+                  set_state(PART:"padding_center_text2", "visible", 0.0);
+                  set_int(large_padded_center_align, 1);
+               }
+               if ((get_int(large_padded_center_align) == 1) && (get_int(icon_visible) == 1))
+                  set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+               else if (get_int(large_padded_center_align) == 1)
+                  set_state(PART:"padding_center_text1", "visible", 0.0);
+               else if (get_int(icon_visible) == 1)
+                  set_state(PART:"padding_center_text1", "icon", 0.0);
+               else
+                  set_state(PART:"padding_center_text1", "default", 0.0);
+            }
+         }
+         program { name: "icon_show";
+            signal: "elm,state,elm.swallow.icon,show";
+            source: "elm";
+            script {
+               set_int(icon_visible, 1);
+               if ((get_int(large_padded_center_align) == 1) || (get_int(left_btn_visible) == 1))
+                 set_state(PART:"padding_center_text1", "icon_left_button", 0.0);
+               else
+                 set_state(PART:"padding_center_text1", "icon", 0.0);
+            }
+         }
+         program { name: "icon_hide";
+            signal: "elm,state,elm.swallow.icon,hide";
+            source: "elm";
+            script {
+               set_int(icon_visible, 0);
+               if ((get_int(large_padded_center_align) == 1) || (get_int(left_btn_visible) == 1))
+                 set_state(PART:"padding_center_text1", "visible", 0.0);
+               else
+                 set_state(PART:"padding_center_text1", "default", 0.0);
+            }
+         }
+         program { name: "controlbar_show";
+            signal: "elm,state,controlbar,show";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,show", "elm");
+            }
+         }
+         program { name: "controlbar_hide";
+            signal: "elm,state,controlbar,hide";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,hide", "elm");
+            }
+         }
+         program { name: "controlbar_bg_show";
+            signal: "elm,state,controlbar_bg,show";
+            source: "elm";
+            script {
+               set_state(PART:"controlbar_bg", "show", 0.0);
+               set_int(cbar_bg, get_int(cbar_bg) + 1);
+            }
+         }
+         program { name: "controlbar_bg_hide";
+            signal: "elm,state,controlbar_bg,hide";
+            source: "elm";
+            script {
+               set_int(cbar_bg, get_int(cbar_bg) - 1);
+               if (get_int(cbar_bg) <= 0)
+                 set_state(PART:"controlbar_bg", "default", 0.0);
+            }
+         }
+         program { name: "optionheader_show";
+            signal: "elm,state,optionheader,show";
+            source: "elm";
+            script {
+               set_state(PART:"optionheader_bg", "show", 0.0);
+               set_state(PART:"optionheader_arrow", "show", 0.0);
+               set_int(oh_show, 1);
+            }
+         }
+         program { name: "optionheader_hide";
+            signal: "elm,state,optionheader,hide";
+            source: "elm";
+            script {
+               set_state(PART:"optionheader_bg", "default", 0.0);
+               set_state(PART:"optionheader_arrow", "default", 0.0);
+               set_int(oh_show, 0);
+            }
+         }
+         program { name: "optionheader_open";
+            signal: "elm,state,optionheader,open";
+            source: "";
+            action: STATE_SET "show" 0.0;
+            target: "optionheader_bg";
+            target: "optionheader_arrow";
+            transition: LINEAR 0.2;
+            after: "optionheader_open_set";
+         }
+         program { name: "optionheader_close";
+            signal: "elm,state,optionheader,close";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "optionheader_bg";
+            target: "optionheader_arrow";
+            transition: LINEAR 0.2;
+            after: "optionheader_close_set";
+         }
+         program { name: "optionheader_instant_open";
+            signal: "elm,state,optionheader,instant_open";
+            source: "";
+            action: STATE_SET "show" 0.0;
+            target: "optionheader_bg";
+            target: "optionheader_arrow";
+            after: "optionheader_open_set";
+         }
+         program { name: "optionheader_instant_close";
+            signal: "elm,state,optionheader,instant_close";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "optionheader_bg";
+            target: "optionheader_arrow";
+            after: "optionheader_close_set";
+         }
+         program { name: "optionheader_close_set";
+            signal: "elm,state,optionheader,close_set";
+            source: "";
+            script {
+               set_int(oh_close, 1);
+            }
+         }
+         program { name: "optionheader_open_set";
+            signal: "elm,state,optionheader,open_set";
+            source: "";
+            script {
+               set_int(oh_close, 0);
+            }
+         }
+         program { name: "controlbar_open";
+            signal: "elm,state,controlbar,open";
+            source: "";
+            action: STATE_SET "show" 0.0;
+            target: "controlbar_bg";
+            transition: LINEAR 0.2;
+         }
+         program { name: "controlbar_close";
+            signal: "elm,state,controlbar,close";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "controlbar_bg";
+            transition: LINEAR 0.2;
+         }
+         program { name: "controlbar_instant_open";
+            signal: "elm,state,controlbar,instant_open";
+            source: "";
+            script {
+               emit("elm,state,prev_btn,show", "elm");
+               emit("elm,state,controlbar,show", "elm");
+            }
+         }
+         program { name: "controlbar_instant_close";
+            signal: "elm,state,controlbar,instant_close";
+            source: "";
+            script {
+               emit("elm,state,prev_btn,hide", "elm");
+               emit("elm,state,controlbar,hide", "elm");
+            }
+         }
+         program { name: "show_finished";
+            action: SIGNAL_EMIT "elm,action,show,finished" "";
+         }
+         program { name: "pushed_finished";
+            action: SIGNAL_EMIT "elm,action,pushed,finished" "";
+         }
+         program { name: "popped_finished";
+            action: SIGNAL_EMIT "elm,action,popped,finished" "";
+         }
+         program {
+            name: "title_clicked";
+            signal: "mouse,clicked,1";
+            source: "click_event_area";
+            action: SIGNAL_EMIT "elm,action,title,clicked" "";
+         }
+      }
+   }
+   group { name: "elm/naviframe/item/segment/instant/default";
+      script {
+         public cbar_bg = 0;     //Controlbar BG Show call count
+      }
+      parts {
+         part { name: "title_bg";
+            type: RECT;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 1 NAVIFRAME_SEGMENT_TITLE_H_INC;
+               align: 0.0 0.0;
+               fixed: 0 1;
+               rel1 { relative: 0.0 0.0; }
+               rel2 { relative: 1.0 0.0; }
+               color: NAVIFRAME_TITLE_BG_COLOR_INC;
+            }
+            description { state: "hide" 0.0;
+               inherit: "default" 0.0;
+               min: 0 0;
+               max: 0 0;
+               fixed: 1 1;
+            }
+         }
+         part { name: "title_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1 { to: "title_bg"; }
+               rel2 { to: "title_bg"; }
+            }
+         }
+         part { name: "elm.swallow.content";
+            type: SWALLOW;
+            scale: 1;
+            repeat_events: 0;
+            clip_to: "content_clip";
+            description { state: "default" 0.0;
+               align: 0.0 0.0;
+               rel1.relative: 0.0 1.0;
+               rel1.to_y: "title_bg";
+               rel2.relative: 1.0 0.0;
+               rel2.to_y: "controlbar_bg";
+            }
+         }
+         part { name: "content_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1.to: "elm.swallow.content";
+               rel2.to: "elm.swallow.content";
+            }
+         }
+         part { name: "padding_before_left_btn";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+               fixed: 1 0;
+               align: 0.0 0.5;
+               rel1 { relative: 0.0 0.0; to: "title_bg"; }
+               rel2 { relative: 0.0 1.0; to: "title_bg"; }
+               visible: 0;
+            }
+         }
+         part { name: "padding_after_left_btn";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+               fixed: 1 0;
+               align: 0.0 0.5;
+               rel1 { relative: 1.0 0.0; to: "title_left_btn"; }
+               rel2 { relative: 1.0 1.0; to: "title_left_btn"; }
+               visible: 0;
+            }
+         }
+         part { name: "padding_after_right_btn";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+               fixed: 1 0;
+               align: 1.0 0.5;
+               rel1 { relative: 1.0 0.0; to: "title_bg"; }
+               rel2 { relative: 1.0 1.0; to: "title_bg"; }
+               visible: 0;
+            }
+         }
+         part { name: "padding_before_right_btn";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: 0 0;
+               fixed: 1 0;
+               align: 1.0 0.5;
+               rel1 { relative: 0.0 0.0; to: "title_right_btn"; }
+               rel2 { relative: 0.0 1.0; to: "title_right_btn"; }
+               visible: 0;
+            }
+            description { state: "show" 0.0;
+               inherit: "default" 0.0;
+               min: NAVIFRAME_TITLE_FUNC_BTN_PADDING_W_INC 0;
+            }
+         }
+         part { name: "padding_before_text";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               align: 1.0 0.5;
+               rel1 { relative: 0.0 0.0; to_x: "elm.text.title"; to_y: "title_bg"; }
+               rel2 { relative: 0.0 1.0; to_x: "elm.text.title"; to_y: "title_bg"; }
+               fixed: 1 0;
+               min: NAVIFRAME_ICON_PADDING_INC;
+               visible: 0;
+            }
+         }
+         part { name: "elm.text.title";
+            type: TEXT;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               text { font: "SLP:style=Medium";
+                  text_class: "slp_medium";
+                  size: NAVIFRAME_TITLE_SEGMENT_FONT_SIZE_INC;
+                  min: 0 0;
+                  max: 1 0;
+                  align: 0.5 0.5;
+               }
+               min: 0 NAVIFRAME_TITLE_SEGMENT_TEXT_H_INC;
+               max: 999999 NAVIFRAME_TITLE_SEGMENT_TEXT_H_INC;
+               fixed: 1 1;
+               color: NAVIFRAME_TITLE_TEXT_COLOR_INC;
+               align: 0.5 0;
+               rel1.to: "padding_before_left_btn";
+               rel1.relative: 1 0;
+               rel2.to: "padding_after_right_btn";
+               rel2.relative: 0 1;
+            }
+         }
+         part { name: "click_event_area";
+             ignore_flags: ON_HOLD;
+             repeat_events: 1;
+             description { state: "default" 0.0;
+                rel1 { to: "title_bg"; }
+                rel2 { to: "title_bg"; }
+             }
+         }
+         part { name: "title_left_btn";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+               fixed: 1 1;
+               align: 0 0;
+               rel1.relative: 1.0 1.0;
+               rel1.to_x: "padding_before_left_btn";
+               rel1.to_y: "elm.text.title";
+               rel2.relative: 1.0 1.0;
+               rel2.to_x: "padding_before_left_btn";
+               rel2.to_y: "elm.text.title";
+            }
+         }
+         part { name: "title_right_btn";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+               align: 1 0.0;
+               fixed: 1 1;
+               rel1.relative: 0.0 1.0;
+               rel1.to_x: "padding_after_right_btn";
+               rel1.to_y: "elm.text.title";
+               rel2.relative: 0.0 1.0;
+               rel2.to_x: "padding_after_right_btn";
+               rel2.to_y: "elm.text.title";
+            }
+         }
+         part { name: "segment2";
+            type: "SWALLOW";
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: 0 NAVIFRAME_TITLE_SEGMENT_H_INC;
+               max: 999999 NAVIFRAME_TITLE_SEGMENT_H_INC;
+               fixed: 0 1;
+               align: 0.5 0;
+               rel1.to_y: "elm.text.title";
+               rel1.relative: 0.28 1;
+               rel2.to_y: "elm.text.title";
+               rel2.relative: 0.72 1;
+            }
+         }
+         part { name: "segment3";
+            type: "SWALLOW";
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: 0 NAVIFRAME_TITLE_SEGMENT_H_INC;
+               max: 999999 NAVIFRAME_TITLE_SEGMENT_H_INC;
+               fixed: 0 1;
+               align: 0.5 0;
+               rel1.to_y: "elm.text.title";
+               rel1.relative: 0.2 1;
+               rel2.to_y: "elm.text.title";
+               rel2.relative: 0.8 1;
+            }
+         }
+         part { name: "controlbar_bg";
+            type: RECT;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 0 0;
+               max: 999999 0;
+               fixed: 0 1;
+               align: 0.0 1.0;
+               visible: 0;
+               color: NAVIFRAME_CONTROLBAR_BG_COLOR_INC;
+            }
+            description { state: "show" 0.0;
+               inherit: "default" 0.0;
+               min: 0 CONTROLBAR_SMALL_HEIGHT_INC;
+               max: 999999 CONTROLBAR_SMALL_HEIGHT_INC;
+               visible: 1;
+            }
+         }
+         part { name: "controlbar_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1 { to: "controlbar_bg"; }
+               rel2 { to: "controlbar_bg"; }
+            }
+         }
+         part { name: "elm.prev_btn_bg";
+            type: RECT;
+            scale: 1;
+            clip_to: "controlbar_clip";
+            description { state: "default" 0.0;
+               min: 0 0;
+               fixed: 1 0;
+               align: 1.0 0.0;
+               rel1 { relative: 1.0 0.0; to: "controlbar_bg"; }
+               rel2.to: "controlbar_bg";
+               visible: 0;
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               min: NAVIFRAME_TITLE_PREV_BTN_BG_SIZE_INC 0;
+            }
+         }
+        part { name: "elm.swallow.prev_btn";
+           type: SWALLOW;
+           scale: 1;
+           clip_to: "controlbar_clip";
+           description { state: "default" 0.0;
+              fixed: 1 1;
+              align: 0.5 0.5;
+              rel1.to: "elm.prev_btn_bg";
+              rel2.to: "elm.prev_btn_bg";
+           }
+        }
+        part { name: "controlbar";
+           type: SWALLOW;
+           scale: 1;
+           clip_to: "controlbar_clip";
+           description { state: "default" 0.0;
+              rel1.to: "controlbar_bg";
+              rel2 { relative: 0.0 1.0; to: "elm.prev_btn_bg"; }
+           }
+        }
+      }
+      programs {
+         program { name: "cur_pushed";
+            signal: "elm,state,cur,pushed";
+            source: "elm";
+            after: "pushed_finished";
+         }
+         program { name: "new_pushed";
+            signal: "elm,state,new,pushed";
+            source: "elm";
+            after: "show_finished";
+         }
+         program { name: "prev_popped";
+            signal: "elm,state,prev,popped";
+            source: "elm";
+            after: "show_finished";
+         }
+         program { name: "cur_popped";
+            signal: "elm,state,cur,popped";
+            source: "elm";
+            after: "popped_finished";
+         }
+         program { name: "title_show";
+            signal: "elm,state,title,show";
+            source: "elm";
+            action: STATE_SET "show" 0.0;
+            target: "title_clip";
+         }
+         program { name: "title_hide";
+            signal: "elm,state,title,hide";
+            source: "elm";
+            action: STATE_SET "hide" 0.0;
+            target: "title_clip";
+         }
+         program { name: "prev_btn_show";
+            signal: "elm,state,prev_btn,show";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,show", "elm");
+               set_state(PART:"elm.prev_btn_bg", "visible", 0.0);
+            }
+         }
+         program { name: "prev_btn_hide";
+            signal: "elm,state,prev_btn,hide";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,hide", "elm");
+               set_state(PART:"elm.prev_btn_bg", "default", 0.0);
+            }
+         }
+         program { name: "controlbar_show";
+            signal: "elm,state,controlbar,show";
+            source: "elm";
+            action: STATE_SET "show" 0.0;
+            script {
+               emit("elm,state,controlbar_bg,show", "elm");
+            }
+         }
+         program { name: "controlbar_hide";
+            signal: "elm,state,controlbar,hide";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,hide", "elm");
+            }
+         }
+         program { name: "controlbar_bg_show";
+            signal: "elm,state,controlbar_bg,show";
+            source: "elm";
+            script {
+               set_state(PART:"controlbar_bg", "show", 0.0);
+               set_int(cbar_bg, get_int(cbar_bg) + 1);
+            }
+         }
+         program { name: "controlbar_bg_hide";
+            signal: "elm,state,controlbar_bg,hide";
+            source: "elm";
+            script {
+               set_int(cbar_bg, get_int(cbar_bg) - 1);
+               if (get_int(cbar_bg) <= 0)
+                 set_state(PART:"controlbar_bg", "default", 0.0);
+            }
+         }
+         program { name: "controlbar_open";
+            signal: "elm,state,controlbar,open";
+            source: "";
+            action: STATE_SET "show" 0.0;
+            target: "controlbar_bg";
+            transition: LINEAR 0.2;
+         }
+         program { name: "controlbar_close";
+            signal: "elm,state,controlbar,close";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "controlbar_bg";
+            transition: LINEAR 0.2;
+         }
+         program { name: "controlbar_instant_open";
+            signal: "elm,state,controlbar,instant_open";
+            source: "";
+            script {
+               emit("elm,state,prev_btn,show", "elm");
+               emit("elm,state,controlbar,show", "elm");
+            }
+         }
+         program { name: "controlbar_instant_close";
+            signal: "elm,state,controlbar,instant_close";
+            source: "";
+            script {
+               emit("elm,state,prev_btn,hide", "elm");
+               emit("elm,state,controlbar,hide", "elm");
+            }
+         }
+         program { name: "show_finished";
+            action: SIGNAL_EMIT "elm,action,show,finished" "";
+         }
+         program { name: "pushed_finished";
+            action: SIGNAL_EMIT "elm,action,pushed,finished" "";
+         }
+         program { name: "popped_finished";
+            action: SIGNAL_EMIT "elm,action,popped,finished" "";
+         }
+         program {
+            name: "title_clicked";
+            signal: "mouse,clicked,1";
+            source: "click_event_area";
+            action: SIGNAL_EMIT "elm,action,title,clicked" "";
+         }
+      }
+   }
+   group { name: "elm/naviframe/item/tabbar/instant/default";
+      script {
+         public cbar_bg = 0;     //Controlbar BG Show call count
+      }
+      parts {
+         part { name: "elm.swallow.content";
+            type: SWALLOW;
+            scale: 1;
+            repeat_events: 0;
+            clip_to: "content_clip";
+            description { state: "default" 0.0;
+               align: 0.0 0.0;
+               rel1.relative: 0.0 0.0;
+               rel2.relative: 1.0 0.0;
+               rel2.to_y: "controlbar_bg";
+            }
+         }
+         part { name: "content_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1.to: "elm.swallow.content";
+               rel2.to: "elm.swallow.content";
+            }
+         }
+         part { name: "controlbar_bg";
+            type: RECT;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 0 0;
+               max: 999999 0;
+               fixed: 0 1;
+               align: 0.0 1.0;
+               visible: 0;
+               color: NAVIFRAME_CONTROLBAR_BG_COLOR_INC;
+            }
+            description { state: "show" 0.0;
+               inherit: "default" 0.0;
+               min: 0 CONTROLBAR_SMALL_HEIGHT_INC;
+               max: 999999 CONTROLBAR_SMALL_HEIGHT_INC;
+               visible: 1;
+            }
+         }
+         part { name: "controlbar_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1 { to: "controlbar_bg"; }
+               rel2 { to: "controlbar_bg"; }
+            }
+         }
+         part { name: "elm.prev_btn_bg";
+            type: RECT;
+            scale: 1;
+            clip_to: "controlbar_clip";
+            description { state: "default" 0.0;
+               min: 0 0;
+               fixed: 1 0;
+               align: 1.0 0.0;
+               rel1 { relative: 1.0 0.0; to: "controlbar_bg"; }
+               rel2.to: "controlbar_bg";
+               visible: 0;
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               min: NAVIFRAME_TITLE_PREV_BTN_BG_SIZE_INC 0;
+            }
+         }
+        part { name: "elm.swallow.prev_btn";
+           type: SWALLOW;
+           scale: 1;
+           clip_to: "controlbar_clip";
+           description { state: "default" 0.0;
+              fixed: 1 1;
+              align: 0.5 0.5;
+              rel1.to: "elm.prev_btn_bg";
+              rel2.to: "elm.prev_btn_bg";
+           }
+        }
+        part { name: "controlbar";
+           type: SWALLOW;
+           scale: 1;
+           clip_to: "controlbar_clip";
+           description { state: "default" 0.0;
+              rel1.to: "controlbar_bg";
+              rel2 { relative: 0.0 1.0; to: "elm.prev_btn_bg"; }
+           }
+        }
+      }
+      programs {
+         program { name: "cur_pushed";
+            signal: "elm,state,cur,pushed";
+            source: "elm";
+            after: "pushed_finished";
+         }
+         program { name: "new_pushed";
+            signal: "elm,state,new,pushed";
+            source: "elm";
+            after: "show_finished";
+         }
+         program { name: "prev_popped";
+            signal: "elm,state,prev,popped";
+            source: "elm";
+            after: "show_finished";
+         }
+         program { name: "cur_popped";
+            signal: "elm,state,cur,popped";
+            source: "elm";
+            after: "popped_finished";
+         }
+         program { name: "prev_btn_show";
+            signal: "elm,state,prev_btn,show";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,show", "elm");
+               set_state(PART:"elm.prev_btn_bg", "visible", 0.0);
+            }
+         }
+         program { name: "prev_btn_hide";
+            signal: "elm,state,prev_btn,hide";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,hide", "elm");
+               set_state(PART:"elm.prev_btn_bg", "default", 0.0);
+            }
+         }
+         program { name: "controlbar_show";
+            signal: "elm,state,controlbar,show";
+            source: "elm";
+            action: STATE_SET "show" 0.0;
+            script {
+               emit("elm,state,controlbar_bg,show", "elm");
+            }
+         }
+         program { name: "controlbar_hide";
+            signal: "elm,state,controlbar,hide";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,hide", "elm");
+            }
+         }
+         program { name: "controlbar_bg_show";
+            signal: "elm,state,controlbar_bg,show";
+            source: "elm";
+            script {
+               set_state(PART:"controlbar_bg", "show", 0.0);
+               set_int(cbar_bg, get_int(cbar_bg) + 1);
+            }
+         }
+         program { name: "controlbar_bgp_hide";
+            signal: "elm,state,controlbar_bg,hide";
+            source: "elm";
+            script {
+               set_int(cbar_bg, get_int(cbar_bg) - 1);
+               if (get_int(cbar_bg) <= 0)
+                 set_state(PART:"controlbar_bg", "default", 0.0);
+            }
+         }
+         program { name: "controlbar_open";
+            signal: "elm,state,controlbar,open";
+            source: "";
+            action: STATE_SET "show" 0.0;
+            target: "controlbar_bg";
+            transition: LINEAR 0.2;
+         }
+         program { name: "controlbar_close";
+            signal: "elm,state,controlbar,close";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "controlbar_bg";
+            transition: LINEAR 0.2;
+         }
+         program { name: "controlbar_instant_open";
+            signal: "elm,state,controlbar,instant_open";
+            source: "";
+            script {
+               emit("elm,state,prev_btn,show", "elm");
+               emit("elm,state,controlbar,show", "elm");
+            }
+         }
+         program { name: "controlbar_instant_close";
+            signal: "elm,state,controlbar,instant_close";
+            source: "";
+            script {
+               emit("elm,state,prev_btn,hide", "elm");
+               emit("elm,state,controlbar,hide", "elm");
+            }
+         }
+         program { name: "show_finished";
+            action: SIGNAL_EMIT "elm,action,show,finished" "";
+         }
+         program { name: "pushed_finished";
+            action: SIGNAL_EMIT "elm,action,pushed,finished" "";
+         }
+         program { name: "popped_finished";
+            action: SIGNAL_EMIT "elm,action,popped,finished" "";
+         }
+         program {
+            name: "title_clicked";
+            signal: "mouse,clicked,1";
+            source: "click_event_area";
+            action: SIGNAL_EMIT "elm,action,title,clicked" "";
+         }
+      }
+   }
diff --git a/res/edc/vp-naviframe_white.edc b/res/edc/vp-naviframe_white.edc
new file mode 100755 (executable)
index 0000000..a234858
--- /dev/null
@@ -0,0 +1,2872 @@
+#define NAVIFRAME_TITLE_H_INC 108
+#define NAVIFRAME_SEGMENT_TITLE_H_INC 126
+#define NAVIFRAME_OH_OPENED_H_INC 114
+#define NAVIFRAME_OH_CONTENT_H_INC 72
+#define NAVIFRAME_OH_PADDING_INC 16
+#define NAVIFRAME_OH_SHADOW_INC 10
+#define NAVIFRAME_OH_ARROW_SIZE_INC 28 24
+#define NAVIFRAME_OH_OPENED_DOUBLE_H_INC 202
+#define NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC 120 72
+#define NAVIFRAME_TITLE_PREV_BTN_BG_SIZE_INC 144
+#define NAVIFRAME_TITLE_SEGMENT_H_INC 62
+#define NAVIFRAME_TITLE_SEGMENT_FONT_SIZE_INC 38
+#define NAVIFRAME_TITLE_SEGMENT_TEXT_H_INC 54
+#define NAVIFRAME_TITLE_FONT_SIZE_INC 52
+#define NAVIFRAME_ICON_SIZE_INC 32 32
+#define NAVIFRAME_PADDING_INC 16 0
+#define NAVIFRAME_ICON_PADDING_INC 64 0
+#define NAVIFRAME_TITLE_TEXT_COLOR_INC 249 249 249 255
+#define NAVIFRAME_SUBTITLE_TEXT_COLOR_INC 249 249 249 255
+#define NAVIFRAME_OH_BORDER_INC 1 1 5 1
+#define NAVIFRAME_TITLE_BG_COLOR_INC 0 0 0 200
+
+#define NAVIFRAME_VIEW_TRANS_TIME 0.3
+
+#define CONTROLBAR_LARGE_HEIGHT_INC 122
+#define CONTROLBAR_SMALL_HEIGHT_INC 114
+#define CONTROLBAR_WIDTH_INC 122
+
+
+group {
+       name:"elm/naviframe/base/video/default";
+       parts {
+               part {
+                       name: "base";
+                       description {
+                               state: "default" 0.0;
+                       }
+               }
+       }
+}
+
+group {
+       name:"elm/naviframe/item/video/basic/default";
+       alias:"elm/naviframe/item/video/1line/default";
+       images {
+               image: "white/common/00_winset_control_top_bg.png" COMP;
+               image: "white/common/00_winset_control_top_arrow.png" COMP;
+               image: "white/common/00_winset_title_line.png" COMP;
+               image: "white/common/00_winset_control_toolbar_bg.png" COMP;
+       }
+       script {
+               public oh_show = 0;     //optionheader show/hide
+               public oh_close = 0;    //optionheader close/open
+               public cbar_bg = 0;     //Controlbar BG Show call count
+       }
+       parts {
+               part {
+                       name: "base";
+                       type: RECT;
+                       mouse_events:  0;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                       }
+                       description {
+                               state: "left" 0.0;
+                               inherit: "default" 0.0;
+                               rel1.relative: -1.0 0.0;
+                               rel2.relative: 0.0 1.0;
+                       }
+                       description {
+                               state: "right" 0.0;
+                               inherit: "default" 0.0;
+                               rel1.relative: 1.0 0.0;
+                               rel2.relative: 2.0 1.0;
+                       }
+               }
+               part {
+                       name: "title_bg";
+                       scale: 1;
+                       type: RECT;
+                       description {
+                               state: "default" 0.0;
+                               min: 1 NAVIFRAME_TITLE_H_INC;
+                               align: 0.0 0.0;
+                               fixed: 0 1;
+                               visible: 1;
+                               rel1 { relative: 0.0 0.0; to: "base"; }
+                               rel2 { relative: 1.0 0.0; to: "base"; }
+                               color: NAVIFRAME_TITLE_BG_COLOR_INC;
+                       }
+                       description {
+                               state: "hide" 0.0;
+                               inherit: "default" 0.0;
+                               min: 0 0;
+                               max: 0 0;
+                               fixed: 1 1;
+                       }
+               }
+               part {
+                       name: "title_clip";
+                       type: RECT;
+                       mouse_events: 0;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { to: "title_bg"; }
+                               rel2 { to: "title_bg"; }
+                       }
+               }
+               part {
+                       name: "optionheader_bg";
+                       type: IMAGE;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               min: 1 0;
+                               align: 0.5 0;
+                               fixed: 0 1;
+                               rel1.to: "title_bg";
+                               rel1.relative: 0 1;
+                               rel2.to: "title_bg";
+                               visible: 0;
+                               image {
+                                       normal: "white/common/00_winset_control_top_bg.png";
+                                       border: NAVIFRAME_OH_BORDER_INC;
+                               }
+                       }
+                       description {
+                               state: "show" 0.0;
+                               inherit: "default" 0.0;
+                               min: 1 NAVIFRAME_OH_OPENED_H_INC;
+                               visible: 1;
+                       }
+                       description {
+                               state: "hide" 0.0;
+                               inherit: "default" 0.0;
+                               min: 0 0;
+                               max: 0 0;
+                               fixed: 1 1;
+                       }
+               }
+               part {
+                       name: "optionheader_clip";
+                       type: RECT;
+                       mouse_events: 0;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { to: "optionheader_bg"; }
+                               rel2 { to: "optionheader_bg"; }
+                       }
+               }
+               part {
+                       name: "optionheader_top_padding";
+                       type: RECT;
+                       scale: 1;
+                       clip_to: "optionheader_clip";
+                       description {
+                               state: "default" 0.0;
+                               min: 0 NAVIFRAME_OH_PADDING_INC;
+                               rel1 { relative: 0.0 0.0; to: "optionheader_bg"; }
+                               rel2 { relative: 1.0 0.0; to: "optionheader_bg"; }
+                               fixed: 0 1;
+                               align: 0.0 0.0;
+                               visible: 0;
+                       }
+               }
+               part {
+                       name: "optionheader";
+                       type: SWALLOW;
+                       scale: 1;
+                       clip_to: "optionheader_clip";
+                       description {
+                               state: "default" 0.0;
+                               min: 0 NAVIFRAME_OH_CONTENT_H_INC;
+                               rel1 { relative: 0.0 1.0; to: "optionheader_top_padding"; }
+                               rel2 { relative: 1.0 1.0; to: "optionheader_top_padding"; }
+                               fixed: 0 1;
+                               align: 0.0 0.0;
+                       }
+               }
+               part {
+                       name: "optionheader_bottom_padding";
+                       type: RECT;
+                       scale: 1;
+                       clip_to: "optionheader_clip";
+                       description {
+                               state: "default" 0.0;
+                               min: 0 NAVIFRAME_OH_PADDING_INC;
+                               rel1 { relative: 0.0 1.0; to: "optionheader"; }
+                               rel2 { relative: 1.0 1.0; to: "optionheader"; }
+                               fixed: 0 1;
+                               align: 0.0 0.0;
+                               visible: 0;
+                       }
+               }
+               part {
+                       name: "optionheader_shadow";
+                       type: RECT;
+                       scale: 1;
+                       clip_to: "optionheader_clip";
+                       description {
+                               state: "default" 0.0;
+                               min: 0 NAVIFRAME_OH_SHADOW_INC;
+                               rel1 { relative: 0.0 1.0; to: "optionheader_bottom_padding"; }
+                               rel2 { relative: 1.0 1.0; to: "optionheader_bottom_padding"; }
+                               fixed: 0 1;
+                               align: 0.0 0.0;
+                               visible: 0;
+                       }
+               }
+               part {
+                       name: "elm.swallow.content";
+                       type: SWALLOW;
+                       scale: 1;
+                       repeat_events: 0;
+                       clip_to: "content_clip";
+                       description {
+                               state: "default" 0.0;
+                               align: 0.0 0.0;
+                               rel1.relative: 0.0 1.0;
+                               rel1.to_x: "base";
+                               rel1.to_y: "optionheader_bg";
+                               rel2.relative: 1.0 0.0;
+                               rel2.to_x: "base";
+                               rel2.to_y: "controlbar_bg";
+                       }
+               }
+               part {
+                       name: "content_clip";
+                       type: RECT;
+                       mouse_events: 0;
+                       description {
+                               state: "default" 0.0;
+                               rel1.to: "elm.swallow.content";
+                               rel2.to: "elm.swallow.content";
+                       }
+               }
+               part {
+                       name: "padding_center_text1";
+                       type: RECT;
+                       scale: 1;
+                       mouse_events: 0;
+                       clip_to: "title_clip";
+                       description {
+                               state: "default" 0.0;
+                               min: NAVIFRAME_PADDING_INC;
+                               fixed: 1 0;
+                               align: 0.0 0.0;
+                               rel1 { relative: 0.0 0.0; to: "title_bg"; }
+                               rel2 { relative: 0.0 1.0; to: "title_bg"; }
+                               visible: 0;
+                       }
+                       description {
+                               state: "icon" 0.0;
+                               inherit: "default" 0.0;
+                               min: NAVIFRAME_ICON_PADDING_INC;
+                       }
+               }
+               part {
+                       name: "padding_center_text2";
+                       type: RECT;
+                       mouse_events: 0;
+                       scale: 1;
+                       clip_to: "title_clip";
+                       description {
+                               state: "default" 0.0;
+                               min: NAVIFRAME_PADDING_INC;
+                               fixed: 1 0;
+                               align: 1.0 0.5;
+                               rel1 { relative: 0.0 0.0; to_x: "title_more_btn"; to_y: "title_bg"; }
+                               rel2 { relative: 0.0 1.0; to_x: "title_more_btn"; to_y: "title_bg"; }
+                               visible: 0;
+                       }
+               }
+               part {
+                       name: "elm.text.title";
+                       type: TEXT;
+                       scale: 1;
+                       clip_to: "title_clip";
+                       description {
+                               state: "default" 0.0;
+                               text {
+                                       font: "SLP:style=Medium";
+                                       size: NAVIFRAME_TITLE_FONT_SIZE_INC;
+                                       min: 0 0;
+                                       max: 1 0;
+                                       align: 0.5 0.5;
+                                       text_class: "slp_medium";
+                               }
+                               color: NAVIFRAME_TITLE_TEXT_COLOR_INC;
+                               align: 0.0 0.5;
+                               fixed: 1 0;
+                               rel1 { relative: 1.0 0.0; to: "padding_center_text1"; }
+                               rel2 { relative: 0.0 1.0; to: "padding_center_text2"; }
+                       }
+               }
+               part {
+                       name: "padding_before_text";
+                       type: RECT;
+                       scale: 1;
+                       mouse_events: 0;
+                       clip_to: "title_clip";
+                       description {
+                               state: "default" 0.0;
+                               align: 1.0 0.5;
+                               rel1 { relative: 0.0 0.0; to: "elm.text.title"; }
+                               rel2 { relative: 0.0 1.0; to: "elm.text.title"; }
+                               fixed: 1 0;
+                               min: NAVIFRAME_PADDING_INC;
+                               visible: 0;
+                       }
+               }
+               part {
+                       name: "elm.swallow.icon";
+                       type: SWALLOW;
+                       scale: 1;
+                       clip_to: "title_clip";
+                       description {
+                               state: "default" 0.0;
+                               max: NAVIFRAME_ICON_SIZE_INC;
+                               fixed: 1 1;
+                               rel1 { relative: 0.0 0.0; to: "padding_before_text"; }
+                               rel2 { relative: 0.0 1.0; to: "padding_before_text"; }
+                               aspect: 1.0 1.0;
+                               aspect_preference: VERTICAL;
+                               align: 1.0 0.5;
+                       }
+               }
+               part {
+                       name: "click_event_area";
+                       ignore_flags: ON_HOLD;
+                       repeat_events: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { to: "title_bg"; }
+                               rel2 { to: "title_bg"; }
+                       }
+               }
+               part {
+                       name: "title_left_btn";
+                       type: SWALLOW;
+                       scale: 1;
+                       clip_to: "title_clip";
+                       description {
+                               state: "default" 0.0;
+                               max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+                               fixed: 1 1;
+                               align: 1 0.5;
+                               rel1 { relative: 0.0 0.0; to: "title_right_btn"; }
+                               rel2 { relative: 0.0 1.0; to: "title_right_btn"; }
+                       }
+               }
+               part {
+                       name: "left_btn_separator";
+                       type: IMAGE;
+                       scale: 1;
+                       clip_to: "title_clip";
+                       description {
+                               state: "default" 0.0;
+                               min: 2 48;
+                               max: 2 48;
+                               fixed: 1 1;
+                               align: 1.0 0.5;
+                               rel1 { relative: 0.0 0.0; to: "title_left_btn"; }
+                               rel2 { relative: 0.0 1.0; to: "title_left_btn"; }
+                               image.normal: "white/common/00_winset_title_line.png";
+                               visible: 0;
+                       }
+                       description {
+                               state: "visible" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 1;
+                       }
+               }
+               part {
+                       name: "title_right_btn";
+                       type: SWALLOW;
+                       scale: 1;
+                       clip_to: "title_clip";
+                       description {
+                               state: "default" 0.0;
+                               max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+                               align: 1 0.5;
+                               fixed: 1 1;
+                               rel1 { relative: 1.0 0.0; to: "title_bg"; }
+                               rel2 { relative: 1.0 1.0; to: "title_bg"; }
+                               }
+               }
+               part {
+                       name: "right_btn_separator";
+                       type: IMAGE;
+                       scale: 1;
+                       clip_to: "title_clip";
+                       description {
+                               state: "default" 0.0;
+                               min: 2 48;
+                               max: 2 48;
+                               fixed: 1 1;
+                               align: 1.0 0.5;
+                               rel1 { relative: 0.0 0.0; to: "title_right_btn"; }
+                               rel2 { relative: 0.0 1.0; to: "title_right_btn"; }
+                               image.normal: "white/common/00_winset_title_line.png";
+                               visible: 0;
+                       }
+                       description {
+                               state: "visible" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 0;
+                       }
+               }
+               part {
+                       name: "title_more_btn";
+                       type: SWALLOW;
+                       scale: 1;
+                       clip_to: "title_clip";
+                       description {
+                               state: "default" 0.0;
+                               max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+                               fixed: 1 1;
+                               align: 1 0.5;
+                               rel1 { relative: 0.0 0.0; to: "title_left_btn"; }
+                               rel2 { relative: 0.0 1.0; to: "title_left_btn"; }
+                       }
+               }
+               part {
+                       name: "optionheader_arrow";
+                       type: IMAGE;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               min: NAVIFRAME_OH_ARROW_SIZE_INC;
+                               max: NAVIFRAME_OH_ARROW_SIZE_INC;
+                               fixed: 1 1;
+                               align: 0.5 0.0;
+                               rel1 { relative: 0.0 1.1; to: "title_more_btn"; }
+                               rel2 { relative: 1.0 1.2; to: "title_more_btn"; }
+                               image.normal: "white/common/00_winset_control_top_arrow.png";
+                               color: 255 255 255 0;
+                       }
+                       description {
+                               state: "show" 0.0;
+                               inherit: "default" 0.0;
+                               color: 255 255 255 255;
+                       }
+               }
+               part {
+                       name: "controlbar_bg";
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               min: 0 0;
+                               max: 999999 0;
+                               fixed: 0 1;
+                               align: 0.0 1.0;
+                               visible: 0;
+                               rel1 { to: "base"; }
+                               rel2 { to: "base"; }
+                               image.normal: "white/common/00_winset_control_toolbar_bg.png";
+                       }
+                       description {
+                               state: "show" 0.0;
+                               inherit: "default" 0.0;
+                               min: 0 CONTROLBAR_SMALL_HEIGHT_INC;
+                               max: 999999 CONTROLBAR_SMALL_HEIGHT_INC;
+                               visible: 1;
+                       }
+               }
+               part {
+                       name: "controlbar_clip";
+                       type: RECT;
+                       mouse_events: 0;
+                       description {
+                               state: "default" 0.0;
+                               rel1.to: "controlbar_bg";
+                               rel2.to: "controlbar_bg";
+                       }
+               }
+               part {
+                       name: "elm.prev_btn_bg";
+                       type: RECT;
+                       scale: 1;
+                       clip_to: "controlbar_clip";
+                       description {
+                               state: "default" 0.0;
+                               min: 0 0;
+                               fixed: 1 0;
+                               align: 1.0 0.0;
+                               rel1 { relative: 1.0 0.0; to: "controlbar_bg"; }
+                               rel2.to: "controlbar_bg";
+                               visible: 0;
+                       }
+                       description {
+                               state: "visible" 0.0;
+                               inherit: "default" 0.0;
+                               min: NAVIFRAME_TITLE_PREV_BTN_BG_SIZE_INC 0;
+                       }
+               }
+               part {
+                       name: "elm.swallow.prev_btn";
+                       type: SWALLOW;
+                       scale: 1;
+                       clip_to: "controlbar_clip";
+                       description {
+                               state: "default" 0.0;
+                               fixed: 1 1;
+                               align: 0.5 0.5;
+                               rel1.to: "elm.prev_btn_bg";
+                               rel2.to: "elm.prev_btn_bg";
+                       }
+               }
+               part {
+                       name: "controlbar";
+                       type: SWALLOW;
+                       scale: 1;
+                       clip_to: "controlbar_clip";
+                       description {
+                               state: "default" 0.0;
+                               fixed: 1 1;
+                               rel1.to: "controlbar_bg";
+                               rel2 { relative: 0.0 1.0; to: "elm.prev_btn_bg"; }
+                       }
+               }
+       }
+       programs {
+               program {
+                       name: "content_new_pushed";
+                       signal: "elm,state,new,pushed,internal";
+                       source: "";
+                       action: STATE_SET "default" 0.0;
+                       target: "base";
+                       transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+                       after: "show_finished";
+               }
+               program {
+                       name: "content_cur_pushed";
+                       signal: "elm,state,cur,pushed,internal";
+                       source: "";
+                       action: STATE_SET "left" 0.0;
+                       target: "base";
+                       transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+                       after: "pushed_finished";
+               }
+               program {
+                       name: "content_prev_popped";
+                       signal: "elm,state,prev,popped,internal";
+                       source: "";
+                       action: STATE_SET "default" 0.0;
+                       target: "base";
+                       transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+                       after: "show_finished";
+               }
+               program {
+                       name: "content_cur_popped";
+                       signal: "elm,state,cur,popped,internal";
+                       source: "";
+                       action: STATE_SET "right" 0.0;
+                       target: "base";
+                       transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+                       after: "popped_finished";
+               }
+               program {
+                       name: "cur_pushed";
+                       signal: "elm,state,cur,pushed";
+                       source: "elm";
+                       script {
+                               set_state(PART:"base", "default", 0.0);
+                               emit("elm,state,cur,pushed,internal", "");
+                       }
+               }
+               program {
+                       name: "new_pushed";
+                       signal: "elm,state,new,pushed";
+                       source: "elm";
+                       script {
+                               set_state(PART:"base", "right", 0.0);
+                               emit("elm,state,new,pushed,internal", "");
+                       }
+               }
+               program {
+                       name: "prev_popped";
+                       signal: "elm,state,prev,popped";
+                       source: "elm";
+                       script {
+                               set_state(PART:"base", "left", 0.0);
+                               emit("elm,state,prev,popped,internal", "");
+                       }
+               }
+               program {
+                       name: "cur_popped";
+                       signal: "elm,state,cur,popped";
+                       source: "elm";
+                       script {
+                               set_state(PART:"base", "default", 0.0);
+                               emit("elm,state,cur,popped,internal", "");
+                       }
+               }
+               program {
+                       name: "visible";
+                       signal: "elm,state,visible";
+                       source: "elm";
+                       action: STATE_SET "default" 0.0;
+                       target: "base";
+               }
+               program {
+                       name: "title_show";
+                       signal: "elm,state,title,show";
+                       source: "elm";
+                       script {
+                               set_state(PART:"title_bg", "default", 0.0);
+                               if (get_int(oh_show) == 1) {
+                                       if (get_int(oh_close) == 1) {
+                                               emit("elm,state,optionheader,instant_close", "");
+                                       }else {
+                                               emit("elm,state,optionheader,instant_open", "");
+                                       }
+                               }
+                               else
+                                       set_state(PART:"optionheader_bg", "default", 0.0);
+                       }
+               }
+               program {
+                       name: "title_hide";
+                       signal: "elm,state,title,hide";
+                       source: "elm";
+                       action: STATE_SET "hide" 0.0;
+                       target: "title_bg";
+                       target: "optionheader_bg";
+               }
+               program {
+                       name: "prev_btn_show";
+                       signal: "elm,state,prev_btn,show";
+                       source: "elm";
+                       script {
+                               emit("elm,state,controlbar_bg,show", "elm");
+                               set_state(PART:"elm.prev_btn_bg", "visible", 0.0);
+                       }
+               }
+               program {
+                       name: "prev_btn_hide";
+                       signal: "elm,state,prev_btn,hide";
+                       source: "elm";
+                       script {
+                               emit("elm,state,controlbar_bg,hide", "elm");
+                               set_state(PART:"elm.prev_btn_bg", "default", 0.0);
+                       }
+               }
+               program {
+                       name: "icon_show";
+                       signal: "elm,state,icon,show";
+                       source: "elm";
+                       action: STATE_SET "icon" 0.0;
+                       target: "padding_center_text1";
+               }
+               program {
+                       name: "icon_hide";
+                       signal: "elm,state,icon,hide";
+                       source: "elm";
+                       action: STATE_SET "default" 0.0;
+                       target: "padding_center_text1";
+               }
+               program {
+                       name: "left_btn_show";
+                       signal: "elm,state,title_left_btn,show";
+                       source: "elm";
+                       action: STATE_SET "visible" 0.0;
+                       target: "left_btn_separator";
+               }
+               program {
+                       name: "left_btn_hide";
+                       signal: "elm,state,title_left_btn,hide";
+                       source: "elm";
+                       action: STATE_SET "default" 0.0;
+                       target: "left_btn_separator";
+               }
+               program {
+                       name: "right_btn_show";
+                       signal: "elm,state,title_right_btn,show";
+                       source: "elm";
+                       action: STATE_SET "visible" 0.0;
+                       target: "right_btn_separator";
+               }
+               program {
+               name: "right_btn_hide";
+               signal: "elm,state,title_right_btn,hide";
+               source: "elm";
+               action: STATE_SET "default" 0.0;
+               target: "right_btn_separator";
+               }
+               program {
+                       name: "controlbar_show";
+                       signal: "elm,state,controlbar,show";
+                       source: "elm";
+                       script {
+                               emit("elm,state,controlbar_bg,show", "elm");
+                       }
+               }
+               program {
+                       name: "controlbar_hide";
+                       signal: "elm,state,controlbar,hide";
+                       source: "elm";
+                       script {
+                               emit("elm,state,controlbar_bg,hide", "elm");
+                       }
+               }
+               program {
+                       name: "controlbar_bg_show";
+                       signal: "elm,state,controlbar_bg,show";
+                       source: "elm";
+                       script {
+                               set_state(PART:"controlbar_bg", "show", 0.0);
+                               set_int(cbar_bg, get_int(cbar_bg) + 1);
+                       }
+               }
+               program {
+                       name: "controlbar_bg_hide";
+                       signal: "elm,state,controlbar_bg,hide";
+                       source: "elm";
+                       script {
+                               set_int(cbar_bg, get_int(cbar_bg) - 1);
+                               if (get_int(cbar_bg) <= 0)
+                                       set_state(PART:"controlbar_bg", "default", 0.0);
+                       }
+               }
+               program {
+                       name: "optionheader_show";
+                       signal: "elm,state,optionheader,show";
+                       source: "elm";
+                       script {
+                               set_state(PART:"optionheader_bg", "show", 0.0);
+                               set_state(PART:"optionheader_arrow", "show", 0.0);
+                               set_int(oh_show, 1);
+                       }
+               }
+               program {
+                       name: "optionheader_hide";
+                       signal: "elm,state,optionheader,hide";
+                       source: "elm";
+                       script {
+                               set_state(PART:"optionheader_bg", "default", 0.0);
+                               set_state(PART:"optionheader_arrow", "default", 0.0);
+                               set_int(oh_show, 0);
+                       }
+               }
+               program {
+               name: "optionheader_open";
+               signal: "elm,state,optionheader,open";
+               source: "";
+               action: STATE_SET "show" 0.0;
+               target: "optionheader_bg";
+               target: "optionheader_arrow";
+               transition: LINEAR 0.2;
+               after: "optionheader_open_set";
+               }
+               program {
+                       name: "optionheader_close";
+                       signal: "elm,state,optionheader,close";
+                       source: "";
+                       action: STATE_SET "default" 0.0;
+                       target: "optionheader_bg";
+                       target: "optionheader_arrow";
+                       transition: LINEAR 0.2;
+                       after: "optionheader_close_set";
+               }
+               program {
+                       name: "optionheader_instant_open";
+                       signal: "elm,state,optionheader,instant_open";
+                       source: "";
+                       action: STATE_SET "show" 0.0;
+                       target: "optionheader_bg";
+                       target: "optionheader_arrow";
+                       after: "optionheader_open_set";
+               }
+               program {
+                       name: "optionheader_instant_close";
+                       signal: "elm,state,optionheader,instant_close";
+                       source: "";
+                       action: STATE_SET "default" 0.0;
+                       target: "optionheader_bg";
+                       target: "optionheader_arrow";
+                       after: "optionheader_close_set";
+               }
+               program {
+                       name: "optionheader_close_set";
+                       signal: "elm,state,optionheader,close_set";
+                       source: "";
+                       script {
+                               set_int(oh_close, 1);
+                       }
+               }
+               program {
+                       name: "optionheader_open_set";
+                       signal: "elm,state,optionheader,open_set";
+                       source: "";
+                       script {
+                               set_int(oh_close, 0);
+                       }
+               }
+               program {
+                       name: "controlbar_open";
+                       signal: "elm,state,controlbar,open";
+                       source: "";
+                       action: STATE_SET "show" 0.0;
+                       target: "controlbar_bg";
+                       transition: LINEAR 0.2;
+               }
+               program {
+                       name: "controlbar_close";
+                       signal: "elm,state,controlbar,close";
+                       source: "";
+                       action: STATE_SET "default" 0.0;
+                       target: "controlbar_bg";
+                       transition: LINEAR 0.2;
+               }
+               program {
+                       name: "controlbar_instant_open";
+                       signal: "elm,state,controlbar,instant_open";
+                       source: "";
+                       script {
+                               emit("elm,state,prev_btn,show", "elm");
+                               emit("elm,state,controlbar,show", "elm");
+                       }
+               }
+               program {
+                       name: "controlbar_instant_close";
+                       signal: "elm,state,controlbar,instant_close";
+                       source: "";
+                       script {
+                               emit("elm,state,prev_btn,hide", "elm");
+                               emit("elm,state,controlbar,hide", "elm");
+                       }
+               }
+               program {
+                       name: "show_finished";
+                       action: SIGNAL_EMIT "elm,action,show,finished" "";
+               }
+               program {
+                       name: "pushed_finished";
+                       action: SIGNAL_EMIT "elm,action,pushed,finished" "";
+               }
+               program {
+                       name: "popped_finished";
+                       action: SIGNAL_EMIT "elm,action,popped,finished" "";
+               }
+               program {
+                       name: "title_clicked";
+                       signal: "mouse,clicked,1";
+                       source: "click_event_area";
+                       action: SIGNAL_EMIT "elm,action,title,clicked" "";
+               }
+       } /* programs */
+} /* group */
+
+
+
+   group { name:"elm/naviframe/item/video/basic2/default";
+      alias:"elm/naviframe/item/video/2line/default";
+      images {
+         image: "white/common/00_winset_control_top_bg.png" COMP;
+         image: "white/common/00_winset_control_top_arrow.png" COMP;
+         image: "white/common/00_winset_title_line.png" COMP;
+         image: "white/common/00_winset_control_toolbar_bg.png" COMP;
+      }
+      script {
+         public oh_show = 0;     //optionheader show/hide
+         public oh_close = 0;    //optionheader close/open
+         public cbar_bg = 0;     //Controlbar BG Show call count
+      }
+      parts {
+         part { name: "base";
+            type: RECT;
+            mouse_events:  0;
+            description { state: "default" 0.0;
+               visible: 0;
+            }
+            description { state: "left" 0.0;
+               inherit: "default" 0.0;
+               rel1.relative: -1.0 0.0;
+               rel2.relative: 0.0 1.0;
+            }
+            description { state: "right" 0.0;
+               inherit: "default" 0.0;
+               rel1.relative: 1.0 0.0;
+               rel2.relative: 2.0 1.0;
+            }
+         }
+         part { name: "title_bg";
+            scale: 1;
+            type: RECT;
+            description { state: "default" 0.0;
+               min: 1 NAVIFRAME_TITLE_H_INC;
+               align: 0.0 0.0;
+               fixed: 0 1;
+               rel1 { relative: 0.0 0.0; to: "base"; }
+               rel2 { relative: 1.0 0.0; to: "base"; }
+               color: NAVIFRAME_TITLE_BG_COLOR_INC;
+            }
+            description { state: "hide" 0.0;
+               inherit: "default" 0.0;
+               min: 0 0;
+               max: 0 0;
+               fixed: 1 1;
+            }
+         }
+         part { name: "title_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1 { to: "title_bg"; }
+               rel2 { to: "title_bg"; }
+            }
+         }
+         part { name: "optionheader_bg";
+            type: IMAGE;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 1 0;
+               align: 0.5 0;
+               fixed: 0 1;
+               rel1.to: "title_bg";
+               rel1.relative: 0 1;
+               rel2.to: "title_bg";
+               visible: 0;
+               image { normal: "white/common/00_winset_control_top_bg.png";
+                  border: NAVIFRAME_OH_BORDER_INC;
+               }
+            }
+            description { state: "show" 0.0;
+               inherit: "default" 0.0;
+               min: 1 NAVIFRAME_OH_OPENED_DOUBLE_H_INC;
+               visible: 1;
+            }
+            description { state: "hide" 0.0;
+               inherit: "default" 0.0;
+               min: 0 0;
+               max: 0 0;
+               fixed: 1 1;
+            }
+         }
+         part { name: "optionheader_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1 { to: "optionheader_bg"; }
+               rel2 { to: "optionheader_bg"; }
+            }
+         }
+         part { name: "optionheader_top_padding";
+            type: RECT;
+            scale: 1;
+            clip_to: "optionheader_clip";
+            description { state: "default" 0.0;
+               min: 0 NAVIFRAME_OH_PADDING_INC;
+               rel1 { relative: 0.0 0.0; to: "optionheader_bg"; }
+               rel2 { relative: 1.0 0.0; to: "optionheader_bg"; }
+               fixed: 0 1;
+               align: 0.0 0.0;
+               visible: 0;
+            }
+         }
+         part { name: "optionheader";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "optionheader_clip";
+            description { state: "default" 0.0;
+               min: 0 NAVIFRAME_OH_CONTENT_H_INC;
+               rel1 { relative: 0.0 1.0; to: "optionheader_top_padding"; }
+               rel2 { relative: 1.0 1.0; to: "optionheader_top_padding"; }
+               fixed: 0 1;
+               align: 0.0 0.0;
+            }
+         }
+         part { name: "optionheader_mid_padding";
+            type: RECT;
+            scale: 1;
+            clip_to: "optionheader_clip";
+            description { state: "default" 0.0;
+               min: 0 NAVIFRAME_OH_PADDING_INC;
+               rel1 { relative: 0.0 1.0; to: "optionheader"; }
+               rel2 { relative: 1.0 1.0; to: "optionheader"; }
+               fixed: 0 1;
+               align: 0.0 0.0;
+               visible: 0;
+            }
+         }
+         part { name: "optionheader2";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "optionheader_clip";
+            description { state: "default" 0.0;
+               min: 0 NAVIFRAME_OH_CONTENT_H_INC;
+               rel1 { relative: 0.0 1.0; to: "optionheader_mid_padding";}
+               rel2 { relative: 1.0 1.0; to: "optionheader_mid_padding";}
+               fixed: 0 1;
+               align: 0.0 0.0;
+            }
+         }
+         part { name: "optionheader_bottom_padding";
+            type: RECT;
+            scale: 1;
+            clip_to: "optionheader_clip";
+            description { state: "default" 0.0;
+               min: 0 NAVIFRAME_OH_PADDING_INC;
+               rel1 { relative: 0.0 1.0; to: "optionheader2"; }
+               rel2 { relative: 1.0 1.0; to: "optionheader2"; }
+               fixed: 0 1;
+               align: 0.0 0.0;
+               visible: 0;
+            }
+         }
+         part { name: "optionheader_shadow";
+            type: RECT;
+            scale: 1;
+            clip_to: "optionheader_clip";
+            description { state: "default" 0.0;
+               min: 0 NAVIFRAME_OH_SHADOW_INC;
+               rel1 { relative: 0.0 1.0; to: "optionheader_bottom_padding"; }
+               rel2 { relative: 1.0 1.0; to: "optionheader_bottom_padding"; }
+               fixed: 0 1;
+               align: 0.0 0.0;
+               visible: 0;
+            }
+         }
+         part { name: "elm.swallow.content";
+            type: SWALLOW;
+            scale: 1;
+            repeat_events: 0;
+            clip_to: "content_clip";
+            description { state: "default" 0.0;
+               align: 0.0 0.0;
+               rel1.relative: 0.0 1.0;
+               rel1.to_x: "base";
+               rel1.to_y: "optionheader_bg";
+               rel2.relative: 1.0 0.0;
+               rel2.to_x: "base";
+               rel2.to_y: "controlbar_bg";
+            }
+         }
+         part { name: "content_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1.to: "elm.swallow.content";
+               rel2.to: "elm.swallow.content";
+            }
+         }
+         part { name: "padding_center_text1";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: NAVIFRAME_PADDING_INC;
+               fixed: 1 0;
+               align: 0.0 0.0;
+               rel1 { relative: 0.0 0.0; to: "title_bg"; }
+               rel2 { relative: 0.0 1.0; to: "title_bg"; }
+               visible: 0;
+            }
+            description { state: "icon" 0.0;
+               inherit: "default" 0.0;
+               min: NAVIFRAME_ICON_PADDING_INC;
+            }
+         }
+         part { name: "padding_center_text2";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: NAVIFRAME_PADDING_INC;
+               fixed: 1 0;
+               align: 1.0 0.5;
+               rel1 { relative: 0.0 0.0; to_x: "title_more_btn"; to_y: "title_bg"; }
+               rel2 { relative: 0.0 1.0; to_x: "title_more_btn"; to_y: "title_bg"; }
+               visible: 0;
+            }
+         }
+         part { name: "elm.text.title";
+            type: TEXT;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               text { font: "SLP:style=Medium";
+                  size: NAVIFRAME_TITLE_FONT_SIZE_INC;
+                  min: 0 0;
+                  max: 1 0;
+                  align: 0.5 0.5;
+                  text_class: "slp_medium";
+               }
+               color: NAVIFRAME_TITLE_TEXT_COLOR_INC;
+               align: 0.0 0.5;
+               fixed: 1 0;
+               rel1 { relative: 1.0 0.0; to: "padding_center_text1"; }
+               rel2 { relative: 0.0 1.0; to: "padding_center_text2"; }
+            }
+         }
+         part { name: "padding_before_text";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               align: 1.0 0.5;
+               rel1 { relative: 0.0 0.0; to: "elm.text.title"; }
+               rel2 { relative: 0.0 1.0; to: "elm.text.title"; }
+               fixed: 1 0;
+               min: NAVIFRAME_PADDING_INC;
+               visible: 0;
+            }
+         }
+         part { name: "elm.swallow.icon";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               max: NAVIFRAME_ICON_SIZE_INC;
+               fixed: 1 1;
+               rel1 { relative: 0.0 0.0; to: "padding_before_text"; }
+               rel2 { relative: 0.0 1.0; to: "padding_before_text"; }
+               aspect: 1.0 1.0;
+               aspect_preference: VERTICAL;
+               align: 1.0 0.5;
+            }
+         }
+         part { name: "click_event_area";
+             ignore_flags: ON_HOLD;
+             repeat_events: 1;
+             description { state: "default" 0.0;
+                rel1 { to: "title_bg"; }
+                rel2 { to: "title_bg"; }
+             }
+         }
+         part { name: "title_left_btn";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+               fixed: 1 1;
+               align: 1 0.5;
+               rel1 { relative: 0.0 0.0; to: "title_right_btn"; }
+               rel2 { relative: 0.0 1.0; to: "title_right_btn"; }
+            }
+         }
+         part { name: "left_btn_separator";
+            type: IMAGE;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: 2 48;
+               max: 2 48;
+               fixed: 1 1;
+               align: 1.0 0.5;
+               rel1 { relative: 0.0 0.0; to: "title_left_btn"; }
+               rel2 { relative: 0.0 1.0; to: "title_left_btn"; }
+               image.normal: "white/common/00_winset_title_line.png";
+               visible: 0;
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+            }
+         }
+         part { name: "title_right_btn";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+               align: 1 0.5;
+               fixed: 1 1;
+               rel1 { relative: 1.0 0.0; to: "title_bg"; }
+               rel2 { relative: 1.0 1.0; to: "title_bg"; }
+            }
+         }
+         part { name: "right_btn_separator";
+            type: IMAGE;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: 2 48;
+               max: 2 48;
+               fixed: 1 1;
+               align: 1.0 0.5;
+               rel1 { relative: 0.0 0.0; to: "title_right_btn"; }
+               rel2 { relative: 0.0 1.0; to: "title_right_btn"; }
+               image.normal: "white/common/00_winset_title_line.png";
+               visible: 0;
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+            }
+         }
+         part { name: "title_more_btn";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               max: NAVIFRAME_TITLE_FUNC_BTN_SIZE_INC;
+               fixed: 1 1;
+               align: 1 0.5;
+               rel1 { relative: 0.0 0.0; to: "title_left_btn"; }
+               rel2 { relative: 0.0 1.0; to: "title_left_btn"; }
+            }
+         }
+         part { name: "optionheader_arrow";
+            type: IMAGE;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: NAVIFRAME_OH_ARROW_SIZE_INC;
+               max: NAVIFRAME_OH_ARROW_SIZE_INC;
+               fixed: 1 1;
+               align: 0.5 0.0;
+               rel1 { relative: 0.0 1.1; to: "title_more_btn"; }
+               rel2 { relative: 1.0 1.2; to: "title_more_btn"; }
+               image.normal: "white/common/00_winset_control_top_arrow.png";
+               color: 255 255 255 0;
+            }
+            description { state: "show" 0.0;
+               inherit: "default" 0.0;
+               color: 255 255 255 255;
+            }
+         }
+         part { name: "controlbar_bg";
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 0 0;
+               max: 999999 0;
+               fixed: 0 1;
+               align: 0.0 1.0;
+               visible: 0;
+               rel1 { to: "base"; }
+               rel2 { to: "base"; }
+               image.normal: "white/common/00_winset_control_toolbar_bg.png";
+            }
+            description { state: "show" 0.0;
+               inherit: "default" 0.0;
+               min: 0 CONTROLBAR_SMALL_HEIGHT_INC;
+               max: 999999 CONTROLBAR_SMALL_HEIGHT_INC;
+               visible: 1;
+            }
+         }
+         part { name: "controlbar_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1.to: "controlbar_bg";
+               rel2.to: "controlbar_bg";
+            }
+         }
+         part { name: "elm.prev_btn_bg";
+            type: RECT;
+            scale: 1;
+            clip_to: "controlbar_clip";
+            description { state: "default" 0.0;
+               min: 0 0;
+               fixed: 1 0;
+               align: 1.0 0.0;
+               rel1 { relative: 1.0 0.0; to: "controlbar_bg"; }
+               rel2.to: "controlbar_bg";
+               visible: 0;
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               min: NAVIFRAME_TITLE_PREV_BTN_BG_SIZE_INC 0;
+            }
+         }
+         part { name: "elm.swallow.prev_btn";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "controlbar_clip";
+            description { state: "default" 0.0;
+               fixed: 1 1;
+               align: 0.5 0.5;
+               rel1.to: "elm.prev_btn_bg";
+               rel2.to: "elm.prev_btn_bg";
+            }
+         }
+         part { name: "controlbar";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "controlbar_clip";
+            description { state: "default" 0.0;
+               fixed: 1 1;
+               rel1.to: "controlbar_bg";
+               rel2 { relative: 0.0 1.0; to: "elm.prev_btn_bg"; }
+            }
+         }
+      }
+      programs {
+         program { name: "content_new_pushed";
+            signal: "elm,state,new,pushed,internal";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "base";
+            transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+            after: "show_finished";
+         }
+         program { name: "content_cur_pushed";
+            signal: "elm,state,cur,pushed,internal";
+            source: "";
+            action: STATE_SET "left" 0.0;
+            target: "base";
+            transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+            after: "pushed_finished";
+         }
+         program { name: "content_prev_popped";
+            signal: "elm,state,prev,popped,internal";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "base";
+            transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+            after: "show_finished";
+         }
+         program { name: "content_cur_popped";
+            signal: "elm,state,cur,popped,internal";
+            source: "";
+            action: STATE_SET "right" 0.0;
+            target: "base";
+            transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+            after: "popped_finished";
+         }
+         program { name: "cur_pushed";
+            signal: "elm,state,cur,pushed";
+            source: "elm";
+            script {
+               set_state(PART:"base", "default", 0.0);
+               emit("elm,state,cur,pushed,internal", "");
+            }
+         }
+         program { name: "new_pushed";
+            signal: "elm,state,new,pushed";
+            source: "elm";
+            script {
+               set_state(PART:"base", "right", 0.0);
+               emit("elm,state,new,pushed,internal", "");
+            }
+         }
+         program { name: "prev_popped";
+            signal: "elm,state,prev,popped";
+            source: "elm";
+            script {
+               set_state(PART:"base", "left", 0.0);
+               emit("elm,state,prev,popped,internal", "");
+            }
+         }
+         program { name: "cur_popped";
+            signal: "elm,state,cur,popped";
+            source: "elm";
+            script {
+               set_state(PART:"base", "default", 0.0);
+               emit("elm,state,cur,popped,internal", "");
+            }
+         }
+         program { name: "visible";
+            signal: "elm,state,visible";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "base";
+         }
+         program { name: "title_show";
+            signal: "elm,state,title,show";
+            source: "elm";
+            script {
+               set_state(PART:"title_bg", "default", 0.0);
+               if (get_int(oh_show) == 1) {
+                  if (get_int(oh_close) == 1) {
+                     emit("elm,state,optionheader,instant_close", "");
+                  }else {
+                     emit("elm,state,optionheader,instant_open", "");
+                  }
+               }
+               else
+                 set_state(PART:"optionheader_bg", "default", 0.0);
+            }
+         }
+         program { name: "title_hide";
+            signal: "elm,state,title,hide";
+            source: "elm";
+            action: STATE_SET "hide" 0.0;
+            target: "title_bg";
+            target: "optionheader_bg";
+         }
+         program { name: "prev_btn_show";
+            signal: "elm,state,prev_btn,show";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,show", "elm");
+               set_state(PART:"elm.prev_btn_bg", "visible", 0.0);
+            }
+         }
+         program { name: "prev_btn_hide";
+            signal: "elm,state,prev_btn,hide";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,hide", "elm");
+               set_state(PART:"elm.prev_btn_bg", "default", 0.0);
+            }
+         }
+         program { name: "icon_show";
+            signal: "elm,state,icon,show";
+            source: "elm";
+            action: STATE_SET "icon" 0.0;
+            target: "padding_center_text1";
+         }
+         program { name: "icon_hide";
+            signal: "elm,state,icon,hide";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "padding_center_text1";
+         }
+         program { name: "left_btn_show";
+            signal: "elm,state,title_left_btn,show";
+            source: "elm";
+            action: STATE_SET "visible" 0.0;
+            target: "left_btn_separator";
+         }
+         program { name: "left_btn_hide";
+            signal: "elm,state,title_left_btn,hide";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "left_btn_separator";
+         }
+         program { name: "right_btn_show";
+            signal: "elm,state,title_right_btn,show";
+            source: "elm";
+            action: STATE_SET "visible" 0.0;
+            target: "right_btn_separator";
+         }
+         program { name: "right_btn_hide";
+            signal: "elm,state,title_right_btn,hide";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "right_btn_separator";
+         }
+         program { name: "controlbar_show";
+            signal: "elm,state,controlbar,show";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,show", "elm");
+            }
+         }
+         program { name: "controlbar_hide";
+            signal: "elm,state,controlbar,hide";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,hide", "elm");
+            }
+         }
+         program { name: "controlbar_bg_show";
+            signal: "elm,state,controlbar_bg,show";
+            source: "elm";
+            script {
+               set_state(PART:"controlbar_bg", "show", 0.0);
+               set_int(cbar_bg, get_int(cbar_bg) + 1);
+            }
+         }
+         program { name: "controlbar_bg_hide";
+            signal: "elm,state,controlbar_bg,hide";
+            source: "elm";
+            script {
+               set_int(cbar_bg, get_int(cbar_bg) - 1);
+               if (get_int(cbar_bg) <= 0)
+                 set_state(PART:"controlbar_bg", "default", 0.0);
+            }
+         }
+         program { name: "optionheader_show";
+            signal: "elm,state,optionheader,show";
+            source: "elm";
+            script {
+               set_state(PART:"optionheader_bg", "show", 0.0);
+               set_state(PART:"optionheader_arrow", "show", 0.0);
+               set_int(oh_show, 1);
+            }
+         }
+         program { name: "optionheader_hide";
+            signal: "elm,state,optionheader,hide";
+            source: "elm";
+            script {
+               set_state(PART:"optionheader_bg", "default", 0.0);
+               set_state(PART:"optionheader_arrow", "default", 0.0);
+               set_int(oh_show, 0);
+            }
+         }
+         program { name: "optionheader_open";
+            signal: "elm,state,optionheader,open";
+            source: "";
+            action: STATE_SET "show" 0.0;
+            target: "optionheader_bg";
+            target: "optionheader_arrow";
+            transition: LINEAR 0.2;
+            after: "optionheader_open_set";
+         }
+         program { name: "optionheader_close";
+            signal: "elm,state,optionheader,close";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "optionheader_bg";
+            target: "optionheader_arrow";
+            transition: LINEAR 0.2;
+            after: "optionheader_close_set";
+         }
+         program { name: "optionheader_instant_open";
+            signal: "elm,state,optionheader,instant_open";
+            source: "";
+            action: STATE_SET "show" 0.0;
+            target: "optionheader_bg";
+            target: "optionheader_arrow";
+            after: "optionheader_open_set";
+         }
+         program { name: "optionheader_instant_close";
+            signal: "elm,state,optionheader,instant_close";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "optionheader_bg";
+            target: "optionheader_arrow";
+            after: "optionheader_close_set";
+         }
+         program { name: "optionheader_close_set";
+            signal: "elm,state,optionheader,close_set";
+            source: "";
+            script {
+               set_int(oh_close, 1);
+            }
+         }
+         program { name: "optionheader_open_set";
+            signal: "elm,state,optionheader,open_set";
+            source: "";
+            script {
+               set_int(oh_close, 0);
+            }
+         }
+         program { name: "controlbar_open";
+            signal: "elm,state,controlbar,open";
+            source: "";
+            action: STATE_SET "show" 0.0;
+            target: "controlbar_bg";
+            transition: LINEAR 0.2;
+         }
+         program { name: "controlbar_close";
+            signal: "elm,state,controlbar,close";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "controlbar_bg";
+            transition: LINEAR 0.2;
+         }
+         program { name: "controlbar_instant_open";
+            signal: "elm,state,controlbar,instant_open";
+            source: "";
+            script {
+               emit("elm,state,prev_btn,show", "elm");
+               emit("elm,state,controlbar,show", "elm");
+            }
+         }
+         program { name: "controlbar_instant_close";
+            signal: "elm,state,controlbar,instant_close";
+            source: "";
+            script {
+               emit("elm,state,prev_btn,hide", "elm");
+               emit("elm,state,controlbar,hide", "elm");
+            }
+         }
+         program { name: "show_finished";
+            action: SIGNAL_EMIT "elm,action,show,finished" "";
+         }
+         program { name: "pushed_finished";
+            action: SIGNAL_EMIT "elm,action,pushed,finished" "";
+         }
+         program { name: "popped_finished";
+            action: SIGNAL_EMIT "elm,action,popped,finished" "";
+         }
+         program {
+            name: "title_clicked";
+            signal: "mouse,clicked,1";
+            source: "click_event_area";
+            action: SIGNAL_EMIT "elm,action,title,clicked" "";
+         }
+      }
+   }
+   group { name: "elm/naviframe/item/video/segment/default";
+      script {
+         public cbar_bg = 0;     //Controlbar BG Show call count
+      }
+      images {
+         image: "white/common/00_winset_control_toolbar_bg.png" COMP;
+      }
+      parts {
+         part { name: "base";
+            type: RECT;
+            mouse_events:  0;
+            description { state: "default" 0.0;
+               visible: 0;
+            }
+            description { state: "left" 0.0;
+               inherit: "default" 0.0;
+               rel1.relative: -1.0 0.0;
+               rel2.relative: 0.0 1.0;
+            }
+            description { state: "right" 0.0;
+               inherit: "default" 0.0;
+               rel1.relative: 1.0 0.0;
+               rel2.relative: 2.0 1.0;
+            }
+         }
+         part { name: "title_bg";
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 1 NAVIFRAME_SEGMENT_TITLE_H_INC;
+               align: 0.0 0.0;
+               fixed: 0 1;
+               rel1 { relative: 0.0 0.0; to: "base"; }
+               rel2 { relative: 1.0 0.0; to: "base"; }
+            }
+            description { state: "hide" 0.0;
+               inherit: "default" 0.0;
+               min: 0 0;
+               max: 0 0;
+               fixed: 1 1;
+            }
+         }
+         part { name: "title_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1 { to: "title_bg"; }
+               rel2 { to: "title_bg"; }
+            }
+         }
+         part { name: "elm.swallow.content";
+            type: SWALLOW;
+            scale: 1;
+            repeat_events: 0;
+            clip_to: "content_clip";
+            description { state: "default" 0.0;
+               align: 0.0 0.0;
+               rel1.relative: 0.0 1.0;
+               rel1.to_x: "base";
+               rel1.to_y: "title_bg";
+               rel2.relative: 1.0 0.0;
+               rel2.to_x: "base";
+               rel2.to_y: "controlbar_bg";
+            }
+         }
+         part { name: "content_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1.to: "elm.swallow.content";
+               rel2.to: "elm.swallow.content";
+            }
+         }
+         part { name: "left_padding";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               align: 0.0 0.5;
+               rel1 { relative: 0.0 0.0; }
+               rel2 { relative: 0.0 1.0; }
+               fixed: 1 0;
+               min: NAVIFRAME_PADDING_INC;
+               visible: 0;
+            }
+         }
+         part { name: "right_padding";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               align: 1.0 0.5;
+               rel1 { relative: 1.0 0.0; }
+               rel2 { relative: 1.0 1.0; }
+               fixed: 1 0;
+               min: NAVIFRAME_PADDING_INC;
+               visible: 0;
+            }
+         }
+         part { name: "elm.text.title";
+            type: TEXT;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               text { font: "SLP:style=Medium";
+                  size: NAVIFRAME_TITLE_SEGMENT_FONT_SIZE_INC;
+                  min: 0 0;
+                  max: 1 0;
+                  align: 0.5 0.5;
+                  text_class: "slp_medium";
+               }
+               min: 0 NAVIFRAME_TITLE_SEGMENT_TEXT_H_INC;
+               max: 999999 NAVIFRAME_TITLE_SEGMENT_TEXT_H_INC;
+               fixed: 1 1;
+               color: NAVIFRAME_TITLE_TEXT_COLOR_INC;
+               align: 0 0;
+               rel1.to: "left_padding";
+               rel1.relative: 1.0 0.0;
+               rel2.to: "right_padding";
+               rel2.relative: 0.0 1.0;
+            }
+         }
+         part { name: "click_event_area";
+             ignore_flags: ON_HOLD;
+             repeat_events: 1;
+             description { state: "default" 0.0;
+                rel1 { to: "title_bg"; }
+                rel2 { to: "title_bg"; }
+             }
+         }
+         part { name: "segment";
+            type: "SWALLOW";
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: 0 NAVIFRAME_TITLE_SEGMENT_H_INC;
+               max: 999999 NAVIFRAME_TITLE_SEGMENT_H_INC;
+               fixed: 0 1;
+               align: 0.5 0;
+               rel1.to_x: "left_padding";
+               rel1.to_y: "elm.text.title";
+               rel1.relative: 1 1;
+               rel2.to_x: "right_padding";
+               rel2.to_y: "elm.text.title";
+               rel2.relative: 0 1;
+            }
+         }
+         part { name: "controlbar_bg";
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 0 0;
+               max: 999999 0;
+               fixed: 0 1;
+               align: 0.0 1.0;
+               visible: 0;
+               rel1 { to: "base"; }
+               rel2 { to: "base"; }
+               image.normal: "white/common/00_winset_control_toolbar_bg.png";
+            }
+            description { state: "show" 0.0;
+               inherit: "default" 0.0;
+               min: 0 CONTROLBAR_SMALL_HEIGHT_INC;
+               max: 999999 CONTROLBAR_SMALL_HEIGHT_INC;
+               visible: 1;
+            }
+         }
+         part { name: "controlbar_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1 { to: "controlbar_bg"; }
+               rel2 { to: "controlbar_bg"; }
+            }
+         }
+         part { name: "elm.prev_btn_bg";
+            type: RECT;
+            scale: 1;
+            clip_to: "controlbar_clip";
+            description { state: "default" 0.0;
+               min: 0 0;
+               fixed: 1 0;
+               align: 1.0 0.0;
+               rel1 { relative: 1.0 0.0; to: "controlbar_bg"; }
+               rel2.to: "controlbar_bg";
+               visible: 0;
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               min: NAVIFRAME_TITLE_PREV_BTN_BG_SIZE_INC 0;
+            }
+         }
+        part { name: "elm.swallow.prev_btn";
+           type: SWALLOW;
+           scale: 1;
+           clip_to: "controlbar_clip";
+           description { state: "default" 0.0;
+              fixed: 1 1;
+              align: 0.5 0.5;
+              rel1.to: "elm.prev_btn_bg";
+              rel2.to: "elm.prev_btn_bg";
+           }
+        }
+        part { name: "controlbar";
+           type: SWALLOW;
+           scale: 1;
+           clip_to: "controlbar_clip";
+           description { state: "default" 0.0;
+              fixed: 1 1;
+              rel1.to: "controlbar_bg";
+              rel2 { relative: 0.0 1.0; to: "elm.prev_btn_bg"; }
+           }
+        }
+      }
+      programs {
+         program { name: "content_new_pushed";
+            signal: "elm,state,new,pushed,internal";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "base";
+            transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+            after: "show_finished";
+         }
+         program { name: "content_cur_pushed";
+            signal: "elm,state,cur,pushed,internal";
+            source: "";
+            action: STATE_SET "left" 0.0;
+            target: "base";
+            transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+            after: "pushed_finished";
+         }
+         program { name: "content_prev_popped";
+            signal: "elm,state,prev,popped,internal";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "base";
+            transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+            after: "show_finished";
+         }
+         program { name: "content_cur_popped";
+            signal: "elm,state,cur,popped,internal";
+            source: "";
+            action: STATE_SET "right" 0.0;
+            target: "base";
+            transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+            after: "popped_finished";
+         }
+         program { name: "cur_pushed";
+            signal: "elm,state,cur,pushed";
+            source: "elm";
+            script {
+               set_state(PART:"base", "default", 0.0);
+               emit("elm,state,cur,pushed,internal", "");
+            }
+         }
+         program { name: "new_pushed";
+            signal: "elm,state,new,pushed";
+            source: "elm";
+            script {
+               set_state(PART:"base", "right", 0.0);
+               emit("elm,state,new,pushed,internal", "");
+            }
+         }
+         program { name: "prev_popped";
+            signal: "elm,state,prev,popped";
+            source: "elm";
+            script {
+               set_state(PART:"base", "left", 0.0);
+               emit("elm,state,prev,popped,internal", "");
+            }
+         }
+         program { name: "cur_popped";
+            signal: "elm,state,cur,popped";
+            source: "elm";
+            script {
+               set_state(PART:"base", "default", 0.0);
+               emit("elm,state,cur,popped,internal", "");
+            }
+         }
+         program { name: "visible";
+            signal: "elm,state,visible";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "base";
+         }
+         program { name: "title_show";
+            signal: "elm,state,title,show";
+            source: "elm";
+            action: STATE_SET "show" 0.0;
+            target: "title_bg";
+         }
+         program { name: "title_hide";
+            signal: "elm,state,title,hide";
+            source: "elm";
+            action: STATE_SET "hide" 0.0;
+            target: "title_bg";
+         }
+         program { name: "prev_btn_show";
+            signal: "elm,state,prev_btn,show";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,show", "elm");
+               set_state(PART:"elm.prev_btn_bg", "visible", 0.0);
+            }
+         }
+         program { name: "prev_btn_hide";
+            signal: "elm,state,prev_btn,hide";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,hide", "elm");
+               set_state(PART:"elm.prev_btn_bg", "default", 0.0);
+            }
+         }
+         program { name: "controlbar_show";
+            signal: "elm,state,controlbar,show";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,show", "elm");
+            }
+         }
+         program { name: "controlbar_hide";
+            signal: "elm,state,controlbar,hide";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,hide", "elm");
+            }
+         }
+         program { name: "controlbar_bg_show";
+            signal: "elm,state,controlbar_bg,show";
+            source: "elm";
+            script {
+               set_state(PART:"controlbar_bg", "show", 0.0);
+               set_int(cbar_bg, get_int(cbar_bg) + 1);
+            }
+         }
+         program { name: "controlbar_bg_hide";
+            signal: "elm,state,controlbar_bg,hide";
+            source: "elm";
+            script {
+               set_int(cbar_bg, get_int(cbar_bg) - 1);
+               if (get_int(cbar_bg) <= 0)
+                 set_state(PART:"controlbar_bg", "default", 0.0);
+            }
+         }
+         program { name: "controlbar_open";
+            signal: "elm,state,controlbar,open";
+            source: "";
+            action: STATE_SET "show" 0.0;
+            target: "controlbar_bg";
+            transition: LINEAR 0.2;
+         }
+         program { name: "controlbar_close";
+            signal: "elm,state,controlbar,close";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "controlbar_bg";
+            transition: LINEAR 0.2;
+         }
+         program { name: "controlbar_instant_open";
+            signal: "elm,state,controlbar,instant_open";
+            source: "";
+            script {
+               emit("elm,state,prev_btn,show", "elm");
+               emit("elm,state,controlbar,show", "elm");
+            }
+         }
+         program { name: "controlbar_instant_close";
+            signal: "elm,state,controlbar,instant_close";
+            source: "";
+            script {
+               emit("elm,state,prev_btn,hide", "elm");
+               emit("elm,state,controlbar,hide", "elm");
+            }
+         }
+         program { name: "show_finished";
+            action: SIGNAL_EMIT "elm,action,show,finished" "";
+         }
+         program { name: "pushed_finished";
+            action: SIGNAL_EMIT "elm,action,pushed,finished" "";
+         }
+         program { name: "popped_finished";
+            action: SIGNAL_EMIT "elm,action,popped,finished" "";
+         }
+         program {
+            name: "title_clicked";
+            signal: "mouse,clicked,1";
+            source: "click_event_area";
+            action: SIGNAL_EMIT "elm,action,title,clicked" "";
+         }
+      }
+   }
+   group { name: "elm/naviframe/item/video/tabbar/default";
+      script {
+         public cbar_bg = 0;     //Controlbar BG Show call count
+      }
+      images {
+         image: "white/common/00_winset_control_toolbar_bg.png" COMP;
+      }
+      parts {
+         part { name: "base";
+            type: RECT;
+            mouse_events:  0;
+            description { state: "default" 0.0;
+               visible: 0;
+            }
+            description { state: "left" 0.0;
+               inherit: "default" 0.0;
+               rel1.relative: -1.0 0.0;
+               rel2.relative: 0.0 1.0;
+            }
+            description { state: "right" 0.0;
+               inherit: "default" 0.0;
+               rel1.relative: 1.0 0.0;
+               rel2.relative: 2.0 1.0;
+            }
+         }
+         part { name: "elm.swallow.content";
+            type: SWALLOW;
+            scale: 1;
+            repeat_events: 0;
+            clip_to: "content_clip";
+            description { state: "default" 0.0;
+               align: 0.0 0.0;
+               rel1.relative: 0.0 0.0;
+               rel1.to: "base";
+               rel2.relative: 1.0 0.0;
+               rel2.to_x: "base";
+               rel2.to_y: "controlbar_bg";
+            }
+         }
+         part { name: "content_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1.to: "elm.swallow.content";
+               rel2.to: "elm.swallow.content";
+            }
+         }
+         part { name: "controlbar_bg";
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 0 0;
+               max: 999999 0;
+               fixed: 0 1;
+               align: 0.0 1.0;
+               visible: 0;
+               rel1 { to: "base"; }
+               rel2 { to: "base"; }
+               image.normal: "white/common/00_winset_control_toolbar_bg.png";
+            }
+            description { state: "show" 0.0;
+               inherit: "default" 0.0;
+               min: 0 CONTROLBAR_SMALL_HEIGHT_INC;
+               max: 999999 CONTROLBAR_SMALL_HEIGHT_INC;
+               visible: 1;
+            }
+         }
+         part { name: "controlbar_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1 { to: "controlbar_bg"; }
+               rel2 { to: "controlbar_bg"; }
+            }
+         }
+         part { name: "elm.prev_btn_bg";
+           type: RECT;
+           scale: 1;
+           clip_to: "controlbar_clip";
+           description { state: "default" 0.0;
+              min: 0 0;
+              fixed: 1 0;
+              align: 1.0 0.0;
+              rel1 { relative: 1.0 0.0; to: "controlbar_bg"; }
+              rel2.to: "controlbar_bg";
+              visible: 0;
+           }
+           description { state: "visible" 0.0;
+              inherit: "default" 0.0;
+              min: NAVIFRAME_TITLE_PREV_BTN_BG_SIZE_INC 0;
+           }
+         }
+         part { name: "elm.swallow.prev_btn";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "controlbar_clip";
+            description { state: "default" 0.0;
+               fixed: 1 1;
+               align: 0.5 0.5;
+               rel1.to: "elm.prev_btn_bg";
+               rel2.to: "elm.prev_btn_bg";
+            }
+         }
+         part { name: "controlbar";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "controlbar_clip";
+            description { state: "default" 0.0;
+               fixed: 1 1;
+               rel1.to: "controlbar_bg";
+               rel2 { relative: 0.0 1.0; to: "elm.prev_btn_bg"; }
+            }
+         }
+      }
+      programs {
+         program { name: "content_new_pushed";
+            signal: "elm,state,new,pushed,internal";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "base";
+            transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+            after: "show_finished";
+         }
+         program { name: "content_cur_pushed";
+            signal: "elm,state,cur,pushed,internal";
+            source: "";
+            action: STATE_SET "left" 0.0;
+            target: "base";
+            transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+            after: "pushed_finished";
+         }
+         program { name: "content_prev_popped";
+            signal: "elm,state,prev,popped,internal";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "base";
+            transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+            after: "show_finished";
+         }
+         program { name: "content_cur_popped";
+            signal: "elm,state,cur,popped,internal";
+            source: "";
+            action: STATE_SET "right" 0.0;
+            target: "base";
+            transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+            after: "popped_finished";
+         }
+         program { name: "cur_pushed";
+            signal: "elm,state,cur,pushed";
+            source: "elm";
+            script {
+               set_state(PART:"base", "default", 0.0);
+               emit("elm,state,cur,pushed,internal", "");
+            }
+         }
+         program { name: "new_pushed";
+            signal: "elm,state,new,pushed";
+            source: "elm";
+            script {
+               set_state(PART:"base", "right", 0.0);
+               emit("elm,state,new,pushed,internal", "");
+            }
+         }
+         program { name: "prev_popped";
+            signal: "elm,state,prev,popped";
+            source: "elm";
+            script {
+               set_state(PART:"base", "left", 0.0);
+               emit("elm,state,prev,popped,internal", "");
+            }
+         }
+         program { name: "cur_popped";
+            signal: "elm,state,cur,popped";
+            source: "elm";
+            script {
+               set_state(PART:"base", "default", 0.0);
+               emit("elm,state,cur,popped,internal", "");
+            }
+         }
+         program { name: "visible";
+            signal: "elm,state,visible";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "base";
+         }
+         program { name: "prev_btn_show";
+            signal: "elm,state,prev_btn,show";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,show", "elm");
+               set_state(PART:"elm.prev_btn_bg", "visible", 0.0);
+            }
+         }
+         program { name: "prev_btn_hide";
+            signal: "elm,state,prev_btn,hide";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,hide", "elm");
+               set_state(PART:"elm.prev_btn_bg", "default", 0.0);
+            }
+         }
+         program { name: "controlbar_show";
+            signal: "elm,state,controlbar,show";
+            source: "elm";
+            action: STATE_SET "show" 0.0;
+            script {
+               emit("elm,state,controlbar_bg,show", "elm");
+            }
+         }
+         program { name: "controlbar_hide";
+            signal: "elm,state,controlbar,hide";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,hide", "elm");
+            }
+         }
+         program { name: "controlbar_bg_show";
+            signal: "elm,state,controlbar_bg,show";
+            source: "elm";
+            script {
+               set_state(PART:"controlbar_bg", "show", 0.0);
+               set_int(cbar_bg, get_int(cbar_bg) + 1);
+            }
+         }
+         program { name: "controlbar_bg_hide";
+            signal: "elm,state,controlbar_bg,hide";
+            source: "elm";
+            script {
+               set_int(cbar_bg, get_int(cbar_bg) - 1);
+               if (get_int(cbar_bg) <= 0)
+                 set_state(PART:"controlbar_bg", "default", 0.0);
+            }
+         }
+         program { name: "controlbar_open";
+            signal: "elm,state,controlbar,open";
+            source: "";
+            action: STATE_SET "show" 0.0;
+            target: "controlbar_bg";
+            transition: LINEAR 0.2;
+         }
+         program { name: "controlbar_close";
+            signal: "elm,state,controlbar,close";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "controlbar_bg";
+            transition: LINEAR 0.2;
+         }
+         program { name: "controlbar_instant_open";
+            signal: "elm,state,controlbar,instant_open";
+            source: "";
+            script {
+               emit("elm,state,prev_btn,show", "elm");
+               emit("elm,state,controlbar,show", "elm");
+            }
+         }
+         program { name: "controlbar_instant_close";
+            signal: "elm,state,controlbar,instant_close";
+            source: "";
+            script {
+               emit("elm,state,prev_btn,hide", "elm");
+               emit("elm,state,controlbar,hide", "elm");
+            }
+         }
+         program { name: "show_finished";
+            action: SIGNAL_EMIT "elm,action,show,finished" "";
+         }
+         program { name: "pushed_finished";
+            action: SIGNAL_EMIT "elm,action,pushed,finished" "";
+         }
+         program { name: "popped_finished";
+            action: SIGNAL_EMIT "elm,action,popped,finished" "";
+         }
+         program {
+            name: "title_clicked";
+            signal: "mouse,clicked,1";
+            source: "click_event_area";
+            action: SIGNAL_EMIT "elm,action,title,clicked" "";
+         }
+      }
+   }
+   group { name:"elm/naviframe/item/video/basic/instant/default";
+      inherit: "elm/naviframe/item/video/basic/default";
+      alias:"elm/naviframe/item/video/1line/instant/default";
+      alias:"elm/naviframe/item/video/instant/default";
+      script {
+         public oh_show = 0;     //optionheader show/hide
+         public oh_close = 0;    //optionheader close/open
+         public cbar_bg = 0;     //Controlbar BG Show call count
+      }
+      programs {
+         program { name: "cur_pushed";
+            signal: "elm,state,cur,pushed";
+            source: "elm";
+            after: "pushed_finished";
+         }
+         program { name: "new_pushed";
+            signal: "elm,state,new,pushed";
+            source: "elm";
+            after: "show_finished";
+         }
+         program { name: "prev_popped";
+            signal: "elm,state,prev,popped";
+            source: "elm";
+            after: "show_finished";
+         }
+         program { name: "cur_popped";
+            signal: "elm,state,cur,popped";
+            source: "elm";
+            after: "popped_finished";
+         }
+      }
+   }
+   group { name:"elm/naviframe/item/video/basic2/instant/default";
+      inherit: "elm/naviframe/item/video/basic2/default";
+      alias:"elm/naviframe/item/video/2line/instant/default";
+      alias:"elm/naviframe/item/video/instant2/default";
+      script {
+         public oh_show = 0;     //optionheader show/hide
+         public oh_close = 0;    //optionheader close/open
+         public cbar_bg = 0;     //Controlbar BG Show call count
+      }
+      programs {
+         program { name: "cur_pushed";
+            signal: "elm,state,cur,pushed";
+            source: "elm";
+            after: "pushed_finished";
+         }
+         program { name: "new_pushed";
+            signal: "elm,state,new,pushed";
+            source: "elm";
+            after: "show_finished";
+         }
+         program { name: "prev_popped";
+            signal: "elm,state,prev,popped";
+            source: "elm";
+            after: "show_finished";
+         }
+         program { name: "cur_popped";
+            signal: "elm,state,cur,popped";
+            source: "elm";
+            after: "popped_finished";
+         }
+      }
+   }
+   group { name: "elm/naviframe/item/video/segment/instant/default";
+      inherit:  "elm/naviframe/item/video/segment/default";
+      script {
+         public cbar_bg = 0;     //Controlbar BG Show call count
+      }
+      programs {
+         program { name: "cur_pushed";
+            signal: "elm,state,cur,pushed";
+            source: "elm";
+            after: "pushed_finished";
+         }
+         program { name: "new_pushed";
+            signal: "elm,state,new,pushed";
+            source: "elm";
+            after: "show_finished";
+         }
+         program { name: "prev_popped";
+            signal: "elm,state,prev,popped";
+            source: "elm";
+            after: "show_finished";
+         }
+         program { name: "cur_popped";
+            signal: "elm,state,cur,popped";
+            source: "elm";
+            after: "popped_finished";
+         }
+         program { name: "title_show";
+            signal: "elm,state,title,show";
+            source: "elm";
+            action: STATE_SET "show" 0.0;
+            target: "title_clip";
+         }
+         program { name: "title_hide";
+            signal: "elm,state,title,hide";
+            source: "elm";
+            action: STATE_SET "hide" 0.0;
+            target: "title_clip";
+         }
+      }
+   }
+
+   group { name: "elm/naviframe/item/video/tabbar/instant/default";
+      inherit:  "elm/naviframe/item/video/tabbar/default";
+      script {
+         public cbar_bg = 0;     //Controlbar BG Show call count
+      }
+      programs {
+         program { name: "cur_pushed";
+            signal: "elm,state,cur,pushed";
+            source: "elm";
+            after: "pushed_finished";
+         }
+         program { name: "new_pushed";
+            signal: "elm,state,new,pushed";
+            source: "elm";
+            after: "show_finished";
+         }
+         program { name: "prev_popped";
+            signal: "elm,state,prev,popped";
+            source: "elm";
+            after: "show_finished";
+         }
+         program { name: "cur_popped";
+            signal: "elm,state,cur,popped";
+            source: "elm";
+            after: "popped_finished";
+         }
+         program { name: "controlbar_bgp_hide";
+            signal: "elm,state,controlbar_bg,hide";
+            source: "elm";
+            script {
+               set_int(cbar_bg, get_int(cbar_bg) - 1);
+               if (get_int(cbar_bg) <= 0)
+                 set_state(PART:"controlbar_bg", "default", 0.0);
+            }
+         }
+      }
+   }
+   group { name:"elm/naviframe/item/video/empty/default";
+      images {
+          image: "white/common/00_winset_control_top_bg.png" COMP;
+          image: "white/common/00_winset_control_top_arrow.png" COMP;
+          image: "white/common/00_winset_control_toolbar_bg.png" COMP;
+      }
+      script {
+         public oh_show = 0;     //optionheader show/hide
+         public oh_close = 0;    //optionheader close/open
+         public cbar_bg = 0;     //Controlbar BG Show call count
+      }
+      parts {
+         part { name: "base";
+            type: RECT;
+            mouse_events:  0;
+            description { state: "default" 0.0;
+               visible: 0;
+            }
+            description { state: "left" 0.0;
+               inherit: "default" 0.0;
+               rel1.relative: -1.0 0.0;
+               rel2.relative: 0.0 1.0;
+            }
+            description { state: "right" 0.0;
+               inherit: "default" 0.0;
+               rel1.relative: 1.0 0.0;
+               rel2.relative: 2.0 1.0;
+            }
+         }
+         part { name: "title_bg";
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 1 NAVIFRAME_TITLE_H_INC;
+               align: 0.0 0.0;
+               fixed: 0 1;
+               rel1 { relative: 0.0 0.0; to: "base"; }
+               rel2 { relative: 1.0 0.0; to: "base"; }
+            }
+            description { state: "hide" 0.0;
+               inherit: "default" 0.0;
+               min: 0 0;
+               max: 0 0;
+               fixed: 1 1;
+            }
+         }
+         part { name: "title_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1 { to: "title_bg"; }
+               rel2 { to: "title_bg"; }
+            }
+         }
+         part { name: "optionheader_bg";
+            type: IMAGE;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 1 0;
+               align: 0.5 0;
+               fixed: 0 1;
+               rel1.to: "title_bg";
+               rel1.relative: 0 1;
+               rel2.to: "title_bg";
+               visible: 0;
+               image { normal: "white/common/00_winset_control_top_bg.png";
+                  border: NAVIFRAME_OH_BORDER_INC;
+               }
+            }
+            description { state: "show" 0.0;
+               inherit: "default" 0.0;
+               min: 1 NAVIFRAME_OH_OPENED_H_INC;
+               visible: 1;
+            }
+            description { state: "hide" 0.0;
+               inherit: "default" 0.0;
+               min: 0 0;
+               max: 0 0;
+               fixed: 1 1;
+            }
+         }
+         part { name: "optionheader_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1 { to: "optionheader_bg"; }
+               rel2 { to: "optionheader_bg"; }
+            }
+         }
+         part { name: "optionheader_top_padding";
+            type: RECT;
+            scale: 1;
+            clip_to: "optionheader_clip";
+            description { state: "default" 0.0;
+               min: 0 NAVIFRAME_OH_PADDING_INC;
+               rel1 { relative: 0.0 0.0; to: "optionheader_bg"; }
+               rel2 { relative: 1.0 0.0; to: "optionheader_bg"; }
+               fixed: 0 1;
+               align: 0.0 0.0;
+               visible: 0;
+            }
+         }
+         part { name: "optionheader";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "optionheader_clip";
+            description { state: "default" 0.0;
+               min: 0 NAVIFRAME_OH_CONTENT_H_INC;
+               rel1 { relative: 0.0 1.0; to: "optionheader_top_padding"; }
+               rel2 { relative: 1.0 1.0; to: "optionheader_top_padding"; }
+               fixed: 0 1;
+               align: 0.0 0.0;
+            }
+         }
+         part { name: "optionheader_bottom_padding";
+            type: RECT;
+            scale: 1;
+            clip_to: "optionheader_clip";
+            description { state: "default" 0.0;
+               min: 0 NAVIFRAME_OH_PADDING_INC;
+               rel1 { relative: 0.0 1.0; to: "optionheader"; }
+               rel2 { relative: 1.0 1.0; to: "optionheader"; }
+               fixed: 0 1;
+               align: 0.0 0.0;
+               visible: 0;
+            }
+         }
+         part { name: "optionheader_shadow";
+            type: RECT;
+            scale: 1;
+            clip_to: "optionheader_clip";
+            description { state: "default" 0.0;
+               min: 0 NAVIFRAME_OH_SHADOW_INC;
+               rel1 { relative: 0.0 1.0; to: "optionheader_bottom_padding"; }
+               rel2 { relative: 1.0 1.0; to: "optionheader_bottom_padding"; }
+               fixed: 0 1;
+               align: 0.0 0.0;
+               visible: 0;
+            }
+         }
+         part { name: "elm.swallow.content";
+            type: SWALLOW;
+            scale: 1;
+            repeat_events: 0;
+            clip_to: "content_clip";
+            description { state: "default" 0.0;
+               align: 0.0 0.0;
+               rel1.relative: 0.0 1.0;
+               rel1.to_x: "base";
+               rel1.to_y: "optionheader_bg";
+               rel2.relative: 1.0 0.0;
+               rel2.to_x: "base";
+               rel2.to_y: "controlbar_bg";
+            }
+         }
+         part { name: "content_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1.to: "elm.swallow.content";
+               rel2.to: "elm.swallow.content";
+            }
+         }
+         part { name: "title";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: 1 NAVIFRAME_TITLE_H_INC;
+               align: 0.0 0.0;
+               fixed: 0 1;
+               rel1 { relative: 0.0 0.0; to: "base"; }
+               rel2 { relative: 1.0 0.0; to: "base"; }
+            }
+         }
+         part { name: "controlbar_bg";
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 0 0;
+               max: 999999 0;
+               fixed: 0 1;
+               align: 0.0 1.0;
+               visible: 0;
+               rel1 { to: "base"; }
+               rel2 { to: "base"; }
+               image.normal: "white/common/00_winset_control_toolbar_bg.png";
+            }
+            description { state: "show" 0.0;
+               inherit: "default" 0.0;
+               min: 0 CONTROLBAR_SMALL_HEIGHT_INC;
+               max: 999999 CONTROLBAR_SMALL_HEIGHT_INC;
+               visible: 1;
+            }
+         }
+         part { name: "controlbar_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1.to: "controlbar_bg";
+               rel2.to: "controlbar_bg";
+            }
+         }
+         part { name: "elm.prev_btn_bg";
+            type: RECT;
+            scale: 1;
+            clip_to: "controlbar_clip";
+            description { state: "default" 0.0;
+               min: 0 0;
+               fixed: 1 0;
+               align: 1.0 0.0;
+               rel1 { relative: 1.0 0.0; to: "controlbar_bg"; }
+               rel2.to: "controlbar_bg";
+               visible: 0;
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               min: NAVIFRAME_TITLE_PREV_BTN_BG_SIZE_INC 0;
+            }
+         }
+         part { name: "elm.swallow.prev_btn";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "controlbar_clip";
+            description { state: "default" 0.0;
+               fixed: 1 1;
+               align: 0.5 0.5;
+               rel1.to: "elm.prev_btn_bg";
+               rel2.to: "elm.prev_btn_bg";
+            }
+         }
+         part { name: "controlbar";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "controlbar_clip";
+            description { state: "default" 0.0;
+               fixed: 1 1;
+               rel1.to: "controlbar_bg";
+               rel2 { relative: 0.0 1.0; to: "elm.prev_btn_bg"; }
+            }
+         }
+      }
+      programs {
+         program { name: "content_new_pushed";
+            signal: "elm,state,new,pushed,internal";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "base";
+            transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+            after: "show_finished";
+         }
+         program { name: "content_cur_pushed";
+            signal: "elm,state,cur,pushed,internal";
+            source: "";
+            action: STATE_SET "left" 0.0;
+            target: "base";
+            transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+            after: "pushed_finished";
+         }
+         program { name: "content_prev_popped";
+            signal: "elm,state,prev,popped,internal";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "base";
+            transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+            after: "show_finished";
+         }
+         program { name: "content_cur_popped";
+            signal: "elm,state,cur,popped,internal";
+            source: "";
+            action: STATE_SET "right" 0.0;
+            target: "base";
+            transition: DECELERATE NAVIFRAME_VIEW_TRANS_TIME;
+            after: "popped_finished";
+         }
+         program { name: "cur_pushed";
+            signal: "elm,state,cur,pushed";
+            source: "elm";
+            script {
+               set_state(PART:"base", "default", 0.0);
+               emit("elm,state,cur,pushed,internal", "");
+            }
+         }
+         program { name: "new_pushed";
+            signal: "elm,state,new,pushed";
+            source: "elm";
+            script {
+               set_state(PART:"base", "right", 0.0);
+               emit("elm,state,new,pushed,internal", "");
+            }
+         }
+         program { name: "prev_popped";
+            signal: "elm,state,prev,popped";
+            source: "elm";
+            script {
+               set_state(PART:"base", "left", 0.0);
+               emit("elm,state,prev,popped,internal", "");
+            }
+         }
+         program { name: "cur_popped";
+            signal: "elm,state,cur,popped";
+            source: "elm";
+            script {
+               set_state(PART:"base", "default", 0.0);
+               emit("elm,state,cur,popped,internal", "");
+            }
+         }
+         program { name: "visible";
+            signal: "elm,state,visible";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "base";
+         }
+         program { name: "title_show";
+            signal: "elm,state,title,show";
+            source: "elm";
+            script {
+               set_state(PART:"title_bg", "default", 0.0);
+               if (get_int(oh_show) == 1) {
+                  if (get_int(oh_close) == 1) {
+                     emit("elm,state,optionheader,instant_close", "");
+                  }else {
+                     emit("elm,state,optionheader,instant_open", "");
+                  }
+               }
+               else
+                 set_state(PART:"optionheader_bg", "default", 0.0);
+            }
+         }
+         program { name: "title_hide";
+            signal: "elm,state,title,hide";
+            source: "elm";
+            action: STATE_SET "hide" 0.0;
+            target: "title_bg";
+            target: "optionheader_bg";
+         }
+         program { name: "prev_btn_show";
+            signal: "elm,state,prev_btn,show";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,show", "elm");
+               set_state(PART:"elm.prev_btn_bg", "visible", 0.0);
+            }
+         }
+         program { name: "prev_btn_hide";
+            signal: "elm,state,prev_btn,hide";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,hide", "elm");
+               set_state(PART:"elm.prev_btn_bg", "default", 0.0);
+            }
+         }
+         program { name: "controlbar_show";
+            signal: "elm,state,controlbar,show";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,show", "elm");
+            }
+         }
+         program { name: "controlbar_hide";
+            signal: "elm,state,controlbar,hide";
+            source: "elm";
+            script {
+               emit("elm,state,controlbar_bg,hide", "elm");
+            }
+         }
+         program { name: "controlbar_bg_show";
+            signal: "elm,state,controlbar_bg,show";
+            source: "elm";
+            script {
+               set_state(PART:"controlbar_bg", "show", 0.0);
+               set_int(cbar_bg, get_int(cbar_bg) + 1);
+            }
+         }
+         program { name: "controlbar_bg_hide";
+            signal: "elm,state,controlbar_bg,hide";
+            source: "elm";
+            script {
+               set_int(cbar_bg, get_int(cbar_bg) - 1);
+               if (get_int(cbar_bg) <= 0)
+                 set_state(PART:"controlbar_bg", "default", 0.0);
+            }
+         }
+         program { name: "optionheader_show";
+            signal: "elm,state,optionheader,show";
+            source: "elm";
+            script {
+               set_state(PART:"optionheader_bg", "show", 0.0);
+               set_int(oh_show, 1);
+            }
+         }
+         program { name: "optionheader_hide";
+            signal: "elm,state,optionheader,hide";
+            source: "elm";
+            script {
+               set_state(PART:"optionheader_bg", "default", 0.0);
+               set_int(oh_show, 0);
+            }
+         }
+         program { name: "optionheader_open";
+            signal: "elm,state,optionheader,open";
+            source: "";
+            action: STATE_SET "show" 0.0;
+            target: "optionheader_bg";
+            transition: LINEAR 0.2;
+            after: "optionheader_open_set";
+         }
+         program { name: "optionheader_close";
+            signal: "elm,state,optionheader,close";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "optionheader_bg";
+            transition: LINEAR 0.2;
+            after: "optionheader_close_set";
+         }
+         program { name: "optionheader_instant_open";
+            signal: "elm,state,optionheader,instant_open";
+            source: "";
+            action: STATE_SET "show" 0.0;
+            target: "optionheader_bg";
+            after: "optionheader_open_set";
+         }
+         program { name: "optionheader_instant_close";
+            signal: "elm,state,optionheader,instant_close";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "optionheader_bg";
+            after: "optionheader_close_set";
+         }
+         program { name: "optionheader_close_set";
+            signal: "elm,state,optionheader,close_set";
+            source: "";
+            script {
+               set_int(oh_close, 1);
+            }
+         }
+         program { name: "optionheader_open_set";
+            signal: "elm,state,optionheader,open_set";
+            source: "";
+            script {
+               set_int(oh_close, 0);
+            }
+         }
+         program { name: "controlbar_open";
+            signal: "elm,state,controlbar,open";
+            source: "";
+            action: STATE_SET "show" 0.0;
+            target: "controlbar_bg";
+            transition: LINEAR 0.2;
+         }
+         program { name: "controlbar_close";
+            signal: "elm,state,controlbar,close";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "controlbar_bg";
+            transition: LINEAR 0.2;
+         }
+         program { name: "controlbar_instant_open";
+            signal: "elm,state,controlbar,instant_open";
+            source: "";
+            script {
+               emit("elm,state,prev_btn,show", "elm");
+               emit("elm,state,controlbar,show", "elm");
+            }
+         }
+         program { name: "controlbar_instant_close";
+            signal: "elm,state,controlbar,instant_close";
+            source: "";
+            script {
+               emit("elm,state,prev_btn,hide", "elm");
+               emit("elm,state,controlbar,hide", "elm");
+            }
+         }
+         program { name: "show_finished";
+            action: SIGNAL_EMIT "elm,action,show,finished" "";
+         }
+         program { name: "pushed_finished";
+            action: SIGNAL_EMIT "elm,action,pushed,finished" "";
+         }
+         program { name: "popped_finished";
+            action: SIGNAL_EMIT "elm,action,popped,finished" "";
+         }
+      }
+   }
diff --git a/res/edc/vp-progressbar-list.edc b/res/edc/vp-progressbar-list.edc
new file mode 100755 (executable)
index 0000000..e05f745
--- /dev/null
@@ -0,0 +1,584 @@
+#define PROGRESSBAR_TITLE_FONT_SIZE_INC 28
+#define PROGRESSBAR_STATUS_TEXT_FONT_SIZE_INC 20
+
+#define PROGRESSBAR_LIST_PROGRESS_STYLE_TEXT_COLOR_INC          0 0 0 255
+#define PROGRESSBAR_LIST_PROGRESS_STYLE_STATUS_TEXT_COLOR_INC          224 224 224 255
+#define PROGRESSBAR_LIST_PROCESS_WIDTH_INC 66
+#define PROGRESSBAR_LIST_PROCESS_HEIGHT_INC 66
+#define PROGRESSBAR_LIST_PROCESS_SMALL_INC 35
+#define PROGRESSBAR_LIST_PROCESS_SMALL_IMAGE "32x32"
+#define PROGRESSBAR_LIST_PROGRESS_HEIGHT_INC 16
+
+#define        GALLERY_EDC_IMAGE_LIST_PROGRESS_BG                                      "00_winset_list_progress_bg.png"
+#define        GALLERY_EDC_IMAGE_LIST_PROGRESS_BAR                                     "T01_video_list_progress_bar.png"
+
+   group { name: "elm/progressbar/horizontal/video/list_progress";
+      images {
+         image: GALLERY_EDC_IMAGE_LIST_PROGRESS_BG COMP;
+         image: GALLERY_EDC_IMAGE_LIST_PROGRESS_BAR COMP;
+      }
+      parts {
+         part { name: "elm.padding.left";
+            type: RECT;
+            scale: 1;
+            description {
+               state: "default" 0.0;
+               min: 0 0;
+               fixed: 1 0;
+               rel1 {
+                  relative: 0.0  0.0;
+                  offset: 0 0;
+               }
+               rel2 {
+                  relative: 0.0  1.0;
+                  offset: 0 0;
+               }
+               color: 0 0 0 0;
+               align: 0.0 0.0;
+            }
+         }
+         part { name: "elm.padding.right";
+            type: RECT;
+            scale: 1;
+            description {
+               state: "default" 0.0;
+               min: 0 0;
+               fixed: 1 0;
+               rel1 {
+                  relative: 1.0  0.0;
+                  offset: 0 0;
+               }
+               rel2 {
+                  relative: 1.0  1.0;
+                  offset:   0   0;
+               }
+               color: 0 0 0 0;
+               align: 1.0 0.0;
+            }
+         }
+         part { name: "elm.background.progressbar";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            description {
+               state: "default" 0.0;
+               rel1 {
+                  to_x: "elm.padding.left";
+                  relative: 1.0 0.0;
+                  offset: 0 0;
+               }
+               rel2 {
+                  to_x: "elm.padding.right";
+                  relative: 0.0 1.0;
+                  offset: 0 0;
+               }
+            }
+         }
+         part { name: "elm.swallow.bar";
+            mouse_events: 0;
+            scale: 1;
+            type: SWALLOW;
+            description {
+               min: 1 PROGRESSBAR_LIST_PROGRESS_HEIGHT_INC;
+               max: 99999 PROGRESSBAR_LIST_PROGRESS_HEIGHT_INC;
+               state: "default" 0.0;
+               rel1 {
+                  to: "elm.background.progressbar";
+                  relative: 0.0 0.0;
+               }
+               rel2 {
+                  to: "elm.background.progressbar";
+                  relative: 1.0 1.0;
+               }
+            }
+         }
+         part { name: "elm.swallow.content";
+            type: SWALLOW;
+            scale: 1;
+            description { state: "default" 0.0;
+               visible: 0;
+               align: 0.0 0.5;
+               rel1 {
+                  offset: 0 0;
+                  to_y: "elm.background.progressbar";
+               }
+               rel2 {
+                  offset: 0 -1;
+                  relative: 0.0 1.0;
+                  to_y: "elm.background.progressbar";
+               }
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+               aspect: 1.0 1.0;
+               aspect_preference: VERTICAL;
+               rel2.offset: 4 -1;
+            }
+         }
+         part { name: "elm.text";
+            type: TEXT;
+            mouse_events: 0;
+            scale: 1;
+            description { state: "default" 0.0;
+               visible: 0;
+               fixed: 1 1;
+               align: 0.0 0.5;
+               rel1.to_x: "elm.swallow.content";
+               rel1.relative: 1.0 0.0;
+               rel2.to_x: "elm.swallow.content";
+               rel2.relative: 1.0 1.0;
+               color: PROGRESSBAR_LIST_PROGRESS_STYLE_TEXT_COLOR_INC;
+               text {
+                  font: "SLP:style=Medium";
+                  text_class: "slp_medium";
+                  size: PROGRESSBAR_STATUS_TEXT_FONT_SIZE_INC;
+                  min: 0 0;
+                  align: 0.0 0.5;
+               }
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               visible: 0;
+               text.min: 1 1;
+            }
+         }
+         part { name: "background";
+            mouse_events: 0;
+            scale: 1;
+            clip_to: "elm.background.progressbar";
+            description {
+               state: "default" 0.0;
+               rel1 {
+                  to: "elm.swallow.bar";
+                  relative: 0.0 0.0;
+               }
+               rel2 {
+                  to: "elm.swallow.bar";
+                  relative: 1.0 1.0;
+               }
+               image {
+                  normal: GALLERY_EDC_IMAGE_LIST_PROGRESS_BG;
+                  border: 0 0 1 1;
+               }
+            }
+         }
+         part { name: "elm.text.status";
+            type: TEXT;
+            mouse_events: 0;
+            scale: 1;
+            description { state: "default" 0.0;
+               fixed: 1 1;
+               visible: 0;
+               rel1 {
+                  to: "background";
+                  relative: 0.5 0.5;
+               }
+               rel2 {
+                  to: "background";
+                  relative: 0.5 0.5;
+               }
+               text {
+                  font: "SLP:style=Medium";
+                  text_class: "slp_medium";
+                  size: PROGRESSBAR_STATUS_TEXT_FONT_SIZE_INC;
+                  min: 0 0;
+                  align: 0.5 0.0;
+               }
+               color: PROGRESSBAR_LIST_PROGRESS_STYLE_TEXT_COLOR_INC;
+            }
+            description { state: "show" 0.0;
+               inherit: "default" 0.0;
+               visible: 0;
+               text.min: 1 1;
+            }
+         }
+         part { name: "elm.progress.progressbar";
+            mouse_events: 0;
+            scale: 1;
+            clip_to: "elm.background.progressbar";
+            description {
+               state: "default" 0.0;
+               min: 0 0;
+               fixed: 1 1;
+               rel1 {
+                  to: "elm.swallow.bar";
+                  relative: 0.0 0.0;
+               }
+               rel2 {
+                  to_y: "elm.swallow.bar";
+                  to_x: "elm.cur.progressbar";
+                  offset: -1 -1;
+               }
+               image {
+                  normal: GALLERY_EDC_IMAGE_LIST_PROGRESS_BAR;
+                  border: 0 0 1 1;
+               }
+            }
+            description {
+               state: "invert" 0.0;
+               inherit: "default" 0.0;
+               rel1 {
+                  to_y: "elm.swallow.bar";
+                  to_x: "elm.cur.progressbar";
+               }
+               rel2 {
+                  to: "elm.swallow.bar";
+                  relative: 1.0 1.0;
+               }
+            }
+            description {
+               state: "state_begin" 0.0;
+               inherit: "default" 0.0;
+               rel1 {
+                  to: "elm.swallow.bar";
+                  relative: 0.0 0.0;
+               }
+               rel2 {
+                  to: "elm.swallow.bar";
+                  relative: 0.1 1.0;
+               }
+            }
+            description {
+               state: "state_end" 0.0;
+               inherit: "default" 0.0;
+               rel1 {
+                  to: "elm.swallow.bar";
+                  relative: 0.9 0.0;
+               }
+               rel2 {
+                  to: "elm.swallow.bar";
+                  relative: 1.0 1.0;
+               }
+            }
+         }
+         part { name: "text-bar";
+            type: TEXT;
+            mouse_events: 0;
+            scale: 1;
+            clip_to: "progress-rect";
+            //effect: SOFT_SHADOW;
+            scale: 0;
+            description { state: "default" 0.0;
+               align: 0.0 0.0;
+               fixed: 1 1;
+               visible: 0;
+               rel1.to: "elm.text.status";
+               rel1.offset: -1 -1;
+               rel2.to: "elm.text.status";
+               text {
+                  text_source: "elm.text.status";
+                  font: "SLP:style=Medium";
+                  text_class: "slp_medium";
+                  size: PROGRESSBAR_STATUS_TEXT_FONT_SIZE_INC;
+                  min: 0 0;
+                  align: 0.0 0.0;
+               }
+               color: PROGRESSBAR_LIST_PROGRESS_STYLE_STATUS_TEXT_COLOR_INC;
+            }
+            description { state: "show" 0.0;
+               inherit: "default" 0.0;
+               visible: 0;
+               text.min: 1 1;
+            }
+         }
+         part { name: "elm.cur.progressbar";
+            mouse_events: 0;
+            scale: 1;
+            dragable {
+               confine: "background";
+               x: 1 1 1;
+               y: 0 0 0;
+            }
+            description { state: "default" 0.0;
+               min: 0 28;
+               fixed: 1 1;
+               visible: 0;
+               rel1 {
+                  to: "background";
+                  relative: 0 0;
+               }
+               rel2.to: "background";
+           }
+         }
+         part { name: "progress-rect";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            description {
+               state: "default" 0.0;
+               rel1.to: "elm.progress.progressbar";
+               rel2.to: "elm.progress.progressbar";
+            }
+         }
+      }
+      programs {
+         program { name: "label_show";
+            signal: "elm,state,text,visible";
+            source: "elm";
+            action:  STATE_SET "visible" 0.0;
+            target: "elm.text";
+         }
+         program { name: "label_hide";
+            signal: "elm,state,text,hidden";
+            source: "elm";
+            action:  STATE_SET "default" 0.0;
+            target: "elm.text";
+         }
+         program { name: "icon_show";
+            signal: "elm,state,icon,visible";
+            source: "elm";
+            action:  STATE_SET "visible" 0.0;
+            target: "elm.swallow.content";
+         }
+         program { name: "icon_hide";
+            signal: "elm,state,icon,hidden";
+            source: "elm";
+            action:  STATE_SET "default" 0.0;
+            target: "elm.swallow.content";
+         }
+         program { name: "units_show";
+            signal: "elm,state,units,visible";
+            source: "elm";
+            action:  STATE_SET "show" 0.0;
+            target: "text-bar";
+            target: "elm.text.status";
+         }
+         program { name: "units_hide";
+            signal: "elm,state,units,hidden";
+            source: "elm";
+            action:  STATE_SET "default" 0.0;
+            target: "text-bar";
+            target: "elm.text.status";
+         }
+         program { name: "slide_to_end";
+            action:  STATE_SET "state_end" 0.0;
+            transition: LINEAR 0.5;
+            target: "elm.progress.progressbar";
+            after: "slide_to_begin";
+         }
+         program { name: "slide_to_begin";
+            signal: "elm,state,slide,begin";
+            action: STATE_SET "state_begin" 0.0;
+            target: "elm.progress.progressbar";
+            transition: LINEAR 0.5;
+            after: "slide_to_end";
+         }
+         program { name: "start_pulse";
+            signal: "elm,state,pulse,start";
+            source: "elm";
+           // after: "slide_to_end";
+         }
+         program { name: "stop_pulse";
+            signal: "elm,state,pulse,stop";
+            source: "elm";
+            action: ACTION_STOP;
+            target: "slide_to_begin";
+            target: "slide_to_end";
+            target: "start_pulse";
+            //after: "state_pulse";
+         }
+         program { name: "state_pulse";
+            signal: "elm,state,pulse";
+            source: "elm";
+            action: STATE_SET "state_begin" 0.0;
+            target: "elm.progress.progressbar";
+            after: "units_hide";
+         }
+         program { name: "state_fraction";
+            signal: "elm,state,fraction";
+            source: "elm";
+            action: ACTION_STOP;
+            target: "slide_to_begin";
+            target: "slide_to_end";
+            target: "start_pulse";
+            action: STATE_SET "default" 0.0;
+            target: "elm.progress.progressbar";
+         }
+         program { name: "set_invert_on";
+            signal: "elm,state,inverted,on";
+            source: "elm";
+            action:  STATE_SET "invert" 0.0;
+            target: "elm.progress.progressbar";
+         }
+         program { name: "set_invert_off";
+            signal: "elm,state,inverted,off";
+            source: "elm";
+            action:  STATE_SET "default" 0.0;
+            target: "elm.progress.progressbar";
+         }
+      }
+   }
+
+
+/*
+#define PROGRESS_BG_DESC( param_num ) \
+   description { state: "pulse" 0.#param_num; \
+      inherit: "default" 0.0; \
+      image { \
+         normal: GALLERY_EDC_IMAGE_LIST_PROCESS_##param_num; \
+      } \
+   }
+
+#define   PROGRESSING_DELAY    0.03
+
+   group { name: "elm/progressbar/horizontal/gallery/list_process";
+      images {
+         image: GALLERY_EDC_IMAGE_LIST_PROCESS_01 COMP;
+         image: GALLERY_EDC_IMAGE_LIST_PROCESS_02 COMP;
+         image: GALLERY_EDC_IMAGE_LIST_PROCESS_03 COMP;
+         image: GALLERY_EDC_IMAGE_LIST_PROCESS_04 COMP;
+         image: GALLERY_EDC_IMAGE_LIST_PROCESS_05 COMP;
+         image: GALLERY_EDC_IMAGE_LIST_PROCESS_06 COMP;
+         image: GALLERY_EDC_IMAGE_LIST_PROCESS_07 COMP;
+         image: GALLERY_EDC_IMAGE_LIST_PROCESS_08 COMP;
+         image: GALLERY_EDC_IMAGE_LIST_PROCESS_09 COMP;
+         image: GALLERY_EDC_IMAGE_LIST_PROCESS_10 COMP;
+         image: GALLERY_EDC_IMAGE_LIST_PROCESS_11 COMP;
+         image: GALLERY_EDC_IMAGE_LIST_PROCESS_12 COMP;
+         image: GALLERY_EDC_IMAGE_LIST_PROCESS_13 COMP;
+         image: GALLERY_EDC_IMAGE_LIST_PROCESS_14 COMP;
+         image: GALLERY_EDC_IMAGE_LIST_PROCESS_15 COMP;
+         image: GALLERY_EDC_IMAGE_LIST_PROCESS_16 COMP;
+         image: GALLERY_EDC_IMAGE_LIST_PROCESS_17 COMP;
+         image: GALLERY_EDC_IMAGE_LIST_PROCESS_18 COMP;
+         image: GALLERY_EDC_IMAGE_LIST_PROCESS_19 COMP;
+         image: GALLERY_EDC_IMAGE_LIST_PROCESS_20 COMP;
+         image: GALLERY_EDC_IMAGE_LIST_PROCESS_21 COMP;
+         image: GALLERY_EDC_IMAGE_LIST_PROCESS_22 COMP;
+         image: GALLERY_EDC_IMAGE_LIST_PROCESS_23 COMP;
+         image: GALLERY_EDC_IMAGE_LIST_PROCESS_24 COMP;
+         image: GALLERY_EDC_IMAGE_LIST_PROCESS_25 COMP;
+         image: GALLERY_EDC_IMAGE_LIST_PROCESS_26 COMP;
+         image: GALLERY_EDC_IMAGE_LIST_PROCESS_27 COMP;
+         image: GALLERY_EDC_IMAGE_LIST_PROCESS_28 COMP;
+         image: GALLERY_EDC_IMAGE_LIST_PROCESS_29 COMP;
+         image: GALLERY_EDC_IMAGE_LIST_PROCESS_30 COMP;
+      }
+      parts {
+         part { name: "elm.background.progressbar";
+            mouse_events: 0;
+            scale: 1;
+            type: RECT;
+            description {
+               state: "default" 0.0;
+            }
+         }
+         part { name: "elm.swallow.bar";
+            mouse_events: 0;
+            scale: 1;
+            type: SWALLOW;
+            description { state: "default" 0.0;
+               min: 0 0;
+               max: 0 0;
+               visible: 0;
+            }
+         }
+         part { name: "elm.swallow.content";
+            type: SWALLOW;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 0 0;
+               max: 0 0;
+               visible: 0;
+            }
+         }
+         part { name: "background";
+            mouse_events: 0;
+            scale: 1;
+            clip_to: "elm.background.progressbar";
+            description {
+               state: "default" 0.0;
+               min: PROGRESSBAR_LIST_PROCESS_WIDTH_INC PROGRESSBAR_LIST_PROCESS_HEIGHT_INC;
+               max: PROGRESSBAR_LIST_PROCESS_WIDTH_INC PROGRESSBAR_LIST_PROCESS_HEIGHT_INC;
+               visible: 1;
+               aspect: 1.0 1.0;
+               aspect_preference: BOTH;
+               image {
+                  normal: GALLERY_EDC_IMAGE_LIST_PROCESS_01;
+               }
+            }
+            description { state: "pulse" 0.0;
+               inherit: "default" 0.0;
+               image {
+                  normal: GALLERY_EDC_IMAGE_LIST_PROCESS_01;
+               }
+            }
+            PROGRESS_BG_DESC( 01 )
+            PROGRESS_BG_DESC( 02 )
+            PROGRESS_BG_DESC( 03 )
+            PROGRESS_BG_DESC( 04 )
+            PROGRESS_BG_DESC( 05 )
+            PROGRESS_BG_DESC( 06 )
+            PROGRESS_BG_DESC( 07 )
+            PROGRESS_BG_DESC( 08 )
+            PROGRESS_BG_DESC( 09 )
+            PROGRESS_BG_DESC( 10 )
+            PROGRESS_BG_DESC( 11 )
+            PROGRESS_BG_DESC( 12 )
+            PROGRESS_BG_DESC( 13 )
+            PROGRESS_BG_DESC( 14 )
+            PROGRESS_BG_DESC( 15 )
+            PROGRESS_BG_DESC( 16 )
+            PROGRESS_BG_DESC( 17 )
+            PROGRESS_BG_DESC( 18 )
+            PROGRESS_BG_DESC( 19 )
+            PROGRESS_BG_DESC( 20 )
+            PROGRESS_BG_DESC( 21 )
+            PROGRESS_BG_DESC( 22 )
+            PROGRESS_BG_DESC( 23 )
+            PROGRESS_BG_DESC( 24 )
+            PROGRESS_BG_DESC( 25 )
+            PROGRESS_BG_DESC( 26 )
+            PROGRESS_BG_DESC( 27 )
+            PROGRESS_BG_DESC( 28 )
+            PROGRESS_BG_DESC( 29 )
+            PROGRESS_BG_DESC( 30 )
+         }
+      }
+      script {
+         public pulse_state;
+      }
+      programs {
+         program { name: "continue_pulse";
+            script {
+               new Float:state;
+               state = get_float(pulse_state);
+               set_state(PART:"background", "pulse", state);
+               state += 0.01;
+               if( state > 0.30 )
+                  state = 0.01;
+               set_float(pulse_state, state);
+            }
+               after: "delay";
+         }
+         program { name: "delay";
+            action: STATE_SET "pulse" 0.10;
+            target: "background";
+            in: PROGRESSING_DELAY 0.0;
+            after: "continue_pulse";
+         }
+         program { name: "start_pulse";
+            signal: "elm,state,pulse,start";
+            source: "elm";
+            script {
+               set_float(pulse_state, 0.0);
+            }
+            after: "continue_pulse";
+         }
+         program { name: "stop_pulse";
+            signal: "elm,state,pulse,stop";
+            source: "elm";
+            action: ACTION_STOP;
+            target: "continue_pulse";
+            target: "delay";
+            target: "start_pulse";
+            after: "init_pulse";
+         }
+         program { name: "init_pulse";
+            action: STATE_SET "default" 0.0;
+            target: "background";
+         }
+      }
+   }
+*/
diff --git a/res/edc/vp-toolbar.edc b/res/edc/vp-toolbar.edc
new file mode 100755 (executable)
index 0000000..06af23a
--- /dev/null
@@ -0,0 +1,1733 @@
+#define ITEM_STATE_ENABLED 0
+#define ITEM_STATE_DISABLED 1
+
+group { name: "elm/toolbar/base/default";
+   images {
+      image: "00_winset_control_toolbar_bg.png" COMP;
+   }
+   parts {
+      part { name: "base";
+         mouse_events: 1;
+         description { state: "default" 0.0;
+            image.normal: "00_winset_control_toolbar_bg.png";
+         }
+      }
+      part { name: "clipper";
+         type: RECT;
+         mouse_events: 0;
+         description {
+            state: "default" 0.0;
+            rel1 {
+               to: "base";
+               offset: 2 2;
+            }
+            rel2 {
+               to: "base";
+               offset: -3 -3;
+            }
+         }
+      }
+      part { name: "elm.swallow.content";
+         clip_to: "clipper";
+         type: SWALLOW;
+         description {
+            state: "default" 0.0;
+            rel1.to: "clipper";
+            rel2.to: "clipper";
+         }
+      }
+      part { name: "event";
+         type: RECT;
+         mouse_events: 1;
+         repeat_events: 1;
+         description { state: "default" 0.0;
+            color: 0 0 0 0;
+         }
+      }
+   }
+}
+
+group { name: "elm/toolbar/item/default";
+   images {
+      image: "00_winset_toolbar_press.png" COMP;
+   }
+   styles{
+      style { name: "toolbar_style";
+         base: "font=SLP:style=Medium font_size="BUTTON_CONTROLBAR_ITEM_BUTTON_TEXT_SIZE_INC" align=center color="BUTTON_CONTROLBAR_ITEM_BUTTON_TEXTBLOCK_COLOR_INC" wrap=mixed ellipsis=1 text_class=slp_medium";
+         tag: "br" "\n";
+         tag: "ps" "ps";
+         tag: "hilight" "+ font=SLP:style=Bold";
+         tag: "b" "+ font=SLP:style=Bold";
+         tag: "tab" "\t";
+      }
+   }
+
+   data.item: "transition_animation_on" "1";
+   script {
+      public item_state = ITEM_STATE_ENABLED;
+   }
+   parts {
+      part { name: "bg";
+         mouse_events: 0;
+         description { state: "default" 0.0;
+            visible: 0;
+            color: 255 255 255 0;
+            rel1 {
+               relative: 0.0 0.0;
+               offset: 4 4;
+            }
+            rel2 {
+               relative: 1.0 1.0;
+               offset: -5 -5;
+            }
+            image {
+               normal: "00_winset_toolbar_press.png";
+               border: 3 3 3 3;
+            }
+            image.middle: SOLID;
+            fill.smooth: 0;
+         }
+         description { state: "selected" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+            color: 255 255 255 255;
+         }
+         description { state: "disabled" 0.0;
+            inherit: "default" 0.0;
+            visible: 0;
+            color: 255 255 255 0;
+         }
+      }
+      part { name: "padding_left_top";
+         type: RECT;
+         scale: 1;
+         mouse_events: 0;
+         description { state: "default" 0.0;
+            align: 0.0 0.0;
+            rel2.relative: 0.0 0.0;
+            min: 10 8;
+            fixed: 1 1;
+            visible: 1;
+            color: 0 0 0 0;
+         }
+      }
+      part { name: "padding_right_bottom";
+         type: RECT;
+         scale: 1;
+         mouse_events: 0;
+         description { state: "default" 0.0;
+            align: 1.0 1.0;
+            rel1.relative: 1.0 1.0;
+            min: 10 5;
+            fixed: 1 1;
+            visible: 1;
+            color: 0 0 0 0;
+         }
+      }
+      part {
+         name: "icon_rect";
+         type: RECT;
+         scale: 1;
+         mouse_events: 0;
+         description { state: "default" 0.0;
+            min: 0 0;
+            fixed: 0 1;
+            rel1 {
+               relative: 1.0 1.0;
+               to: "padding_left_top";
+            }
+            rel2 {
+               relative: 0.0 1.0;
+               to_x: "padding_right_bottom";
+               to_y: "padding_left_top";
+            }
+            align: 0.5 0.0;
+            color: 0 0 0 0;
+         }
+         description { state: "visible" 0.0;
+            min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+            fixed: 0 1;
+            rel1 {
+               relative: 1.0 1.0;
+               to: "padding_left_top";
+            }
+            rel2 {
+               relative: 0.0 1.0;
+               to_x: "padding_right_bottom";
+               to_y: "padding_left_top";
+            }
+            align: 0.5 0.0;
+            color: 0 0 0 0;
+         }
+         description { state: "icononly" 0.0;
+            inherit: "default" 0.0;
+         }
+      }
+      part { name: "padding_after_icon";
+         type: RECT;
+         scale: 1;
+         mouse_events: 0;
+         description { state: "default" 0.0; //when only icon or no icon is there
+            align: 0.0 0.0;
+            rel1 {
+               relative: 0.0 1.0;
+               to: "icon_rect";
+            }
+            rel2.to: "icon_rect";
+            fixed: 0 1;
+            min: 0 0;
+            color: 0 0 0 0;
+         }
+         description { state: "visible" 0.0;
+            inherit: "default" 0.0;
+         }
+         description { state: "icononly" 0.0;
+            inherit: "default" 0.0;
+         }
+      }
+      part { name: "padding_before_text";
+         type: RECT;
+         scale: 1;
+         mouse_events: 0;
+         description { state: "default" 0.0; //when only icon or no icon is there
+            align: 0.5 1.0;
+            rel1 {
+               relative: 1.0 0.0;
+               to_x: "padding_left_top";
+               to_y: "elm.text";
+            }
+            rel2 {
+               relative: 0.0 0.0;
+               to_x: "padding_right_bottom";
+               to_y: "elm.text";
+            }
+            fixed: 0 1;
+            min: 0 0;
+            color: 0 0 0 0;
+         }
+      }
+      part { name: "elm.swallow.icon";
+         type: SWALLOW;
+         scale: 1;
+         clip_to: "elm.icon.clipper";
+         description { state: "default" 0.0;
+            visible: 0;
+            align: 0.5 0.0;
+            rel1 {
+               relative: 1.0 1.0;
+               to: "padding_left_top";
+            }
+            rel2 {
+               relative: 0.0 1.0;
+               to_x: "padding_right_bottom";
+               to_y: "padding_left_top";
+            }
+            fixed: 0 1;
+         }
+         description { state: "visible" 0.0;
+            fixed: 0 1;
+            min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+            max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+            rel1 {
+               relative: 1.0 1.0;
+               to: "padding_left_top";
+            }
+            rel2 {
+               relative: 0.0 0.0;
+               to_x: "padding_right_bottom";
+               to_y: "padding_before_text";
+            }
+            aspect: 1.0 1.0;
+            aspect_preference: HORIZONTAL;
+         }
+         description { state: "icononly" 0.0;
+            min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+            max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+            rel1 {
+               relative: 1.0 1.0;
+               to: "padding_left_top";
+            }
+            rel2 {
+               relative: 0.0 0.0;
+               to: "padding_right_bottom";
+            }
+            aspect: 1.0 1.0;
+            aspect_preference: HORIZONTAL;
+         }
+      }
+      part { name: "elm.swallow.icon_new";
+         type: SWALLOW;
+         scale: 1;
+         clip_to: "elm.icon_new.clipper";
+         description { state: "default" 0.0;
+            visible: 0;
+            align: 0.5 0.0;
+            rel1 {
+               relative: 1.0 1.0;
+               to: "padding_left_top";
+            }
+            rel2 {
+               relative: 0.0 1.0;
+               to_x: "padding_right_bottom";
+               to_y: "padding_left_top";
+            }
+            fixed: 0 1;
+         }
+         description { state: "visible" 0.0;
+            fixed: 0 1;
+            min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+            max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+            rel1 {
+               relative: 1.0 1.0;
+               to: "padding_left_top";
+            }
+            rel2 {
+               relative: 0.0 0.0;
+               to_x: "padding_right_bottom";
+               to_y: "padding_before_text";
+            }
+            aspect: 1.0 1.0;
+            aspect_preference: HORIZONTAL;
+         }
+         description { state: "icononly" 0.0;
+            min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+            max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+            rel1 {
+               relative: 1.0 1.0;
+               to: "padding_left_top";
+            }
+            rel2 {
+               relative: 0.0 0.0;
+               to: "padding_right_bottom";
+            }
+            aspect: 1.0 1.0;
+            aspect_preference: HORIZONTAL;
+         }
+      }
+      part { name: "elm.text";
+         type: TEXTBLOCK;
+         mouse_events: 0;
+         scale: 1;
+         clip_to: "elm.text.clipper";
+         description { state: "default" 0.0;
+            visible: 1;
+            rel1 {
+               relative: 1.0 1.0;
+               to_x: "padding_left_top";
+               to_y: "padding_after_icon";
+            }
+            rel2 {
+               relative: 0.0 0.0;
+               to: "padding_right_bottom";
+            }
+            color: BUTTON_NAVIFRAME_DEFAULT_TEXT_COLOR_INC;
+            fixed: 1 1;
+            text {
+               style: "toolbar_style";
+               min: 0 1;
+            }
+         }
+         description { state: "selected" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+         }
+         description { state: "visible" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+         }
+         description { state: "clicked" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+            color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
+         }
+         description { state: "focused" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+            color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
+         }
+      }
+      part { name: "elm.text_new";
+         type: TEXTBLOCK;
+         mouse_events: 0;
+         scale: 1;
+         clip_to: "elm.text_new.clipper";
+         description { state: "default" 0.0;
+            visible: 1;
+            rel1 {
+               relative: 1.0 1.0;
+               to_x: "padding_left_top";
+               to_y: "padding_after_icon";
+            }
+            rel2 {
+               relative: 0.0 0.0;
+               to: "padding_right_bottom";
+            }
+            color: BUTTON_NAVIFRAME_DEFAULT_TEXT_COLOR_INC;
+            fixed: 1 1;
+            text {
+               style: "toolbar_style";
+               min: 0 1;
+            }
+         }
+         description { state: "visible" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+         }
+         description { state: "clicked" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+            color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
+         }
+         description { state: "focused" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+            color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
+         }
+      }
+      part { name: "elm.text.clipper";
+         type: RECT;
+         description { state: "default" 0.0;
+            color: 255 255 255 255;
+         }
+         description { state: "animation" 0.0;
+            color: 255 255 255 0;
+         }
+         description { state: "disabled" 0.0;
+            color: 255 255 255 153;
+         }
+      }
+      part { name: "elm.text_new.clipper";
+         type: RECT;
+         description { state: "default" 0.0;
+            color: 255 255 255 0;
+         }
+         description { state: "animation" 0.0;
+            color: 255 255 255 255;
+         }
+         description { state: "disabled" 0.0;
+            color: 255 255 255 153;
+         }
+      }
+      part { name: "elm.icon.clipper";
+         type: RECT;
+         description { state: "default" 0.0;
+            color: 255 255 255 255;
+         }
+         description { state: "animation" 0.0;
+            color: 255 255 255 0;
+         }
+         description { state: "disabled" 0.0;
+            color: 255 255 255 153;
+         }
+      }
+      part { name: "elm.icon_new.clipper";
+         type: RECT;
+         description { state: "default" 0.0;
+            color: 255 255 255 0;
+         }
+         description { state: "animation" 0.0;
+            color: 255 255 255 255;
+         }
+         description { state: "disabled" 0.0;
+            color: 255 255 255 153;
+         }
+      }
+      part { name: "event";
+         type: RECT;
+         mouse_events: 1;
+         ignore_flags: ON_HOLD;
+         description { state: "default" 0.0;
+            color: 0 0 0 0;
+         }
+      }
+      part { name: "event2";
+         type: RECT;
+         mouse_events: 1;
+         repeat_events: 1;
+         description { state: "default" 0.0;
+            color: 0 0 0 0;
+         }
+      }
+   }
+   programs {
+      program { name: "pressed";
+         signal:  "mouse,down,1";
+         source:  "event";
+         script {
+            if (get_int(item_state) != ITEM_STATE_DISABLED)
+              set_state(PART:"bg", "selected", 0.0);
+         }
+         transition: LINEAR 0.2;
+      }
+      program { name: "unpressed";
+         signal:  "mouse,up,1";
+         source:  "event2";
+         action:  STATE_SET "default" 0.0;
+         target:  "bg";
+         transition: LINEAR 0.1;
+      }
+      program { name: "go";
+         signal:  "mouse,up,1";
+         source:  "event";
+         action:  SIGNAL_EMIT "elm,action,click" "elm";
+      }
+      program { name: "mouse,in";
+         signal:  "mouse,in";
+         source:  "event";
+         action:  SIGNAL_EMIT "elm,mouse,in" "elm";
+      }
+      program { name: "mouse,out";
+         signal:  "mouse,out";
+         source:  "event";
+         action:  SIGNAL_EMIT "elm,mouse,out" "elm";
+      }
+      program { name: "disable";
+         signal: "elm,state,disabled";
+         source: "elm";
+         script {
+            set_int(item_state, ITEM_STATE_DISABLED);
+            set_state(PART:"bg", "disabled", 0.0);
+            set_state(PART:"elm.text.clipper", "disabled", 0.0);
+            set_state(PART:"elm.icon.clipper", "disabled", 0.0);
+            run_program(PROGRAM:"label_set,animation,done");
+            run_program(PROGRAM:"icon_set,animation,done");
+         }
+      }
+      program { name: "enable";
+         signal: "elm,state,enabled";
+         source: "elm";
+         script {
+            set_int(item_state, ITEM_STATE_ENABLED);
+            set_state(PART:"bg", "default", 0.0);
+            set_state(PART:"elm.text.clipper", "default", 0.0);
+            set_state(PART:"elm.icon.clipper", "default", 0.0);
+            run_program(PROGRAM:"label_set,animation,done");
+            run_program(PROGRAM:"icon_set,animation,done");
+         }
+      }
+      program { name: "label_set,animation,forward";
+         signal: "elm,state,label_set,forward";
+         source: "elm";
+         after: "label_set,animation";
+      }
+      program { name: "label_set,animation,backward";
+         signal: "elm,state,label_set,backward";
+         source: "elm";
+         after: "label_set,animation";
+      }
+      program { name: "label_set,animation";
+         signal: "elm,state,label_set";
+         source: "elm";
+         action: STATE_SET "animation" 0.0;
+         target: "elm.text.clipper";
+         target: "elm.text_new.clipper";
+         transition: LINEAR 0.2;
+         after: "label_set,animation,done";
+      }
+      program { name: "label_set,animation,done";
+         action: SIGNAL_EMIT "elm,state,label_set,done" "elm";
+      }
+      program { name: "label,reset";
+         signal: "elm,state,label,reset";
+         source: "elm";
+         script {
+            set_state(PART:"elm.text_new.clipper", "default", 0.0);
+            if (get_int(item_state) != ITEM_STATE_DISABLED)
+              set_state(PART:"elm.text.clipper", "default", 0.0);
+            else
+              set_state(PART:"elm.text.clipper", "disabled", 0.0);
+         }
+      }
+      program { name: "icon_set,animation,forward";
+         signal: "elm,state,icon_set,forward";
+         source: "elm";
+         after: "icon_set,animation";
+      }
+      program { name: "icon_set,animation,backward";
+         signal: "elm,state,icon_set,backward";
+         source: "elm";
+         after: "icon_set,animation";
+      }
+      program { name: "icon_set,animation";
+         signal: "elm,state,icon_set";
+         source: "elm";
+         action: STATE_SET "animation" 0.0;
+         target: "elm.icon.clipper";
+         target: "elm.icon_new.clipper";
+         transition: LINEAR 0.2;
+         after: "icon_set,animation,done";
+      }
+      program { name: "icon_set,animation,done";
+         action: SIGNAL_EMIT "elm,state,icon_set,done" "elm";
+      }
+      program { name: "icon,reset";
+         signal: "elm,state,icon,reset";
+         source: "elm";
+         script {
+            set_state(PART:"elm.icon_new.clipper", "default", 0.0);
+            if (get_int(item_state) != ITEM_STATE_DISABLED)
+              set_state(PART:"elm.icon.clipper", "default", 0.0);
+            else
+              set_state(PART:"elm.icon.clipper", "disabled", 0.0);
+         }
+      }
+      program { name: "text_show";
+         signal: "elm,state,text,visible";
+         source: "elm";
+         script {
+            new st[31];
+            new Float:vl;
+            get_state(PART:"elm.swallow.icon", st, 30, vl);
+            if (!strcmp(st, "icononly"))
+              {
+                 set_state(PART:"elm.swallow.icon", "visible", 0.0);
+                 set_state(PART:"icon_rect", "visible", 0.0);
+                 set_state(PART:"padding_after_icon", "visible", 0.0);
+              }
+            set_state(PART:"elm.text", "visible", 0.0);
+         }
+      }
+      program { name: "text_hide";
+         signal: "elm,state,text,hidden";
+         source: "elm";
+         script {
+            new st[31];
+            new Float:vl;
+            get_state(PART:"elm.swallow.icon", st, 30, vl);
+            if (!strcmp(st, "visible"))
+              {
+                 set_state(PART:"elm.swallow.icon", "icononly", 0.0);
+                 set_state(PART:"icon_rect", "icononly", 0.0);
+                 set_state(PART:"padding_after_icon", "icononly", 0.0);
+              }
+            set_state(PART:"elm.text", "default", 0.0);
+         }
+      }
+      program { name: "icon_show";
+         signal: "elm,state,icon,visible";
+         source: "elm";
+         script {
+            new st[31];
+            new Float:vl;
+            get_state(PART:"elm.text", st, 30, vl);
+            if (!strcmp(st, "visible"))
+              {
+                 set_state(PART:"elm.swallow.icon", "visible", 0.0);
+                 set_state(PART:"icon_rect", "visible", 0.0);
+                 set_state(PART:"padding_after_icon", "visible", 0.0);
+              }
+            else
+              {
+                 set_state(PART:"elm.swallow.icon", "icononly", 0.0);
+                 set_state(PART:"icon_rect", "icononly", 0.0);
+                 set_state(PART:"padding_after_icon", "icononly", 0.0);
+              }
+         }
+      }
+   }
+}
+
+group { name: "elm/toolbar/item/item_horizontal";
+   inherit: "elm/toolbar/item/default";
+   script {
+      public item_state = ITEM_STATE_ENABLED;
+   }
+   parts {
+      part { name: "icon_rect";
+         description { state: "default" 0.0;
+            fixed: 1 0;
+            align: 0.0 0.5;
+         }
+         description { state: "visible" 0.0;
+            fixed: 1 0;
+            rel2 {
+               relative: 1.0 0.0;
+               to_x: "padding_left_top";
+               to_y: "padding_right_bottom";
+            }
+            align: 0.0 0.5;
+         }
+      }
+      part { name: "padding_after_icon";
+         description { state: "default" 0.0; //when only icon or no icon is there
+            rel1.relative: 1.0 0.0;
+            fixed: 1 1;
+         }
+         description { state: "visible" 0.0;
+            inherit: "default" 0.0;
+            min: 6 0;
+         }
+      }
+      part { name: "padding_before_text";
+         description { state: "default" 0.0; //when only icon or no icon is there
+            align: 1.0 0.5;
+            rel1 {
+               relative: 0.0 1.0;
+               to_x: "elm.text";
+               to_y: "padding_left_top";
+            }
+            rel2 {
+               to_x: "elm.text";
+               to_y: "padding_right_bottom";
+            }
+            fixed: 1 0;
+            min: 6 0;
+         }
+      }
+      part { name: "elm.swallow.icon";
+         description { state: "default" 0.0;
+            align: 0.0 0.5;
+            rel2 {
+               relative: 1.0 0.0;
+               to_x: "padding_left_top";
+               to_y: "padding_right_bottom";
+            }
+            fixed: 1 0;
+         }
+         description { state: "visible" 0.0;
+            fixed: 1 0;
+            align: 1.0 0.5;
+            rel1 {
+               relative: 0.0 1.0;
+               to_x: "padding_before_text";
+               to_y: "padding_left_top";
+            }
+            rel2 {
+               relative: 0.0 0.0;
+               to_x: "padding_before_text";
+               to_y: "padding_right_bottom";
+            }
+            aspect_preference: VERTICAL;
+         }
+         description { state: "icononly" 0.0;
+            aspect_preference: VERTICAL;
+         }
+      }
+      part { name: "elm.swallow.icon_new";
+         description { state: "default" 0.0;
+            align: 0.0 0.5;
+            rel2 {
+               relative: 1.0 0.0;
+               to_x: "padding_left_top";
+               to_y: "padding_right_bottom";
+            }
+            fixed: 1 0;
+         }
+         description { state: "visible" 0.0;
+            fixed: 1 0;
+            align: 1.0 0.5;
+            rel1 {
+               relative: 0.0 1.0;
+               to_x: "padding_before_text";
+               to_y: "padding_left_top";
+            }
+            rel2 {
+               relative: 0.0 0.0;
+               to_x: "padding_before_text";
+               to_y: "padding_right_bottom";
+            }
+            aspect_preference: VERTICAL;
+         }
+         description { state: "icononly" 0.0;
+            aspect_preference: VERTICAL;
+         }
+      }
+      part { name: "elm.text";
+         type: TEXTBLOCK;
+         description { state: "default" 0.0;
+            rel1 {
+               relative: 1.0 1.0;
+               to_x: "padding_after_icon";
+               to_y: "padding_left_top";
+            }
+            text {
+               style: "toolbar_style";
+               min: 1 0;
+            }
+         }
+         description { state: "selected" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+         }
+         description { state: "visible" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+         }
+         description { state: "clicked" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+            color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
+         }
+         description { state: "focused" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+            color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
+         }
+      }
+      part { name: "elm.text_new";
+         type: TEXTBLOCK;
+         description { state: "default" 0.0;
+            rel1 {
+               relative: 1.0 1.0;
+               to_x: "padding_after_icon";
+               to_y: "padding_left_top";
+            }
+            text {
+               style: "toolbar_style";
+               min: 1 0;
+            }
+         }
+         description { state: "selected" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+         }
+         description { state: "visible" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+         }
+         description { state: "clicked" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+            color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
+         }
+         description { state: "focused" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+            color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
+         }
+      }
+   }
+}
+
+group { name: "elm/toolbar/separator/default";
+   parts {
+      part { name: "base";
+         type: RECT;
+         description { state: "default" 0.0;
+            min: 3 1;
+            max: 3 9999;
+            color: 0 0 0 0;
+         }
+      }
+      part { name: "separator_left";
+         type: RECT;
+         description { state: "default" 0.0;
+            min: 1 1;
+            max: 1 9999;
+            fixed: 1 1;
+            rel1 {
+                relative: 0.0 0.1;
+                offset: 0 0;
+            }
+            rel2 {
+                relative: 0.0 0.9;
+                offset: 1 0;
+            }
+            color: TOOLBAR_ITEM_SEPARATOR_LEFT_COLOR_INC;
+         }
+      }
+      part { name: "separator_middle";
+         type: RECT;
+         description { state: "default" 0.0;
+            min: 1 1;
+            max: 1 9999;
+            fixed: 1 1;
+            rel1 {
+                relative: 1.0 0.0;
+                offset: 0 0;
+                to: "separator_left";
+            }
+            rel2 {
+                relative: 1.0 1.0;
+                offset: 1 -1;
+                to: "separator_left";
+            }
+            color: TOOLBAR_ITEM_SEPARATOR_MIDDLE_COLOR_INC;
+         }
+      }
+      part { name: "separator_right";
+         type: RECT;
+         description { state: "default" 0.0;
+            min: 1 1;
+            max: 1 9999;
+            fixed: 1 1;
+            rel1 {
+                relative: 1.0 0.0;
+                offset: 0 0;
+                to: "separator_middle";
+            }
+            rel2 {
+                relative: 1.0 1.0;
+                offset: 1 -1;
+                to: "separator_middle";
+            }
+            color: TOOLBAR_ITEM_SEPARATOR_RIGHT_COLOR_INC;
+         }
+      }
+   }
+}
+
+group { name: "elm/toolbar/object/default";
+   parts {
+      part { name: "elm.swallow.object"; // object group
+         type: SWALLOW;
+         description {
+             state: "default" 0.0;
+         }
+      }
+   }
+}
+
+group { name: "elm/toolbar/base/tabbar";
+   alias: "elm/toolbar/base/tabbar/item_horizontal";
+   images {
+      image: "00_winset_control_tabbar_bg_top.png" COMP;
+   }
+
+   parts {
+      part { name: "base";
+         mouse_events: 1;
+         description { state: "default" 0.0;
+            image.normal: "00_winset_control_tabbar_bg_top.png";
+         }
+      }
+      part { name: "clipper";
+         type: RECT;
+         mouse_events: 0;
+         description {
+            state: "default" 0.0;
+            rel1 {
+               to: "base";
+               offset: 2 2;
+            }
+            rel2 {
+               to: "base";
+               offset: -3 -3;
+            }
+         }
+      }
+      part { name: "elm.swallow.content";
+         clip_to: "clipper";
+         type: SWALLOW;
+         description {
+            state: "default" 0.0;
+            rel1.to: "clipper";
+            rel2.to: "clipper";
+         }
+      }
+      part { name: "event";
+         type: RECT;
+         mouse_events: 1;
+         repeat_events: 1;
+         description { state: "default" 0.0;
+            color: 0 0 0 0;
+         }
+      }
+   }
+}
+
+group { name: "elm/toolbar/item/tabbar";
+   images {
+      image: "00_winset_tabbar_focus.png" COMP;
+   }
+
+   data.item: "transition_animation_on" "1";
+   script {
+      public item_state = ITEM_STATE_ENABLED;
+   }
+   parts {
+      part { name: "bg";
+         mouse_events: 0;
+         description { state: "default" 0.0;
+            visible: 0;
+            color: 255 255 255 0;
+            image {
+               normal: "00_winset_tabbar_focus.png";
+            }
+            image.middle: SOLID;
+            fill.smooth: 0;
+         }
+         description { state: "selected" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+            color: 255 255 255 255;
+         }
+         description { state: "disabled" 0.0;
+            inherit: "default" 0.0;
+            visible: 0;
+            color: 255 255 255 0;
+         }
+      }
+      part { name: "padding_left_top";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               align: 0.0 0.0;
+               rel2.relative: 0.0 0.0;
+               min: 10 8;
+               fixed: 1 1;
+               visible: 1;
+               color: 0 0 0 0;
+            }
+         }
+      part { name: "padding_right_bottom";
+         type: RECT;
+         scale: 1;
+         mouse_events: 0;
+         description { state: "default" 0.0;
+            align: 1.0 1.0;
+            rel1.relative: 1.0 1.0;
+            min: 10 5;
+            fixed: 1 1;
+            visible: 1;
+            color: 0 0 0 0;
+         }
+      }
+      part {
+         name: "icon_rect";
+         type: RECT;
+         scale: 1;
+         mouse_events: 0;
+         description { state: "default" 0.0;
+            min: 0 0;
+            fixed: 0 1;
+            rel1 {
+               relative: 1.0 1.0;
+               to: "padding_left_top";
+            }
+            rel2 {
+               relative: 0.0 1.0;
+               to_x: "padding_right_bottom";
+               to_y: "padding_left_top";
+            }
+            align: 0.5 0.0;
+            color: 0 0 0 0;
+         }
+         description { state: "visible" 0.0;
+            min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+            fixed: 0 1;
+            rel1 {
+               relative: 1.0 1.0;
+               to: "padding_left_top";
+            }
+            rel2 {
+               relative: 0.0 1.0;
+               to_x: "padding_right_bottom";
+               to_y: "padding_left_top";
+            }
+            align: 0.5 0.0;
+            color: 0 0 0 0;
+         }
+         description { state: "icononly" 0.0;
+            inherit: "default" 0.0;
+         }
+      }
+      part { name: "padding_after_icon";
+         type: RECT;
+         scale: 1;
+         mouse_events: 0;
+         description { state: "default" 0.0; //when only icon or no icon is there
+            align: 0.0 0.0;
+            rel1 {
+               relative: 0.0 1.0;
+               to: "icon_rect";
+            }
+            rel2.to: "icon_rect";
+            fixed: 0 1;
+            min: 0 0;
+            color: 0 0 0 0;
+         }
+         description { state: "visible" 0.0;
+            align: 0.0 0.0;
+            rel1 {
+               relative: 0.0 1.0;
+               to: "icon_rect";
+            }
+            rel2.to: "icon_rect";
+            fixed: 0 1;
+            min: 0 0;
+            color: 0 0 0 0;
+         }
+         description { state: "icononly" 0.0;
+            inherit: "default" 0.0;
+         }
+      }
+      part { name: "padding_before_text";
+         type: RECT;
+         scale: 1;
+         mouse_events: 0;
+         description { state: "default" 0.0; //when only icon or no icon is there
+            align: 0.5 1.0;
+            rel1 {
+               relative: 1.0 0.0;
+               to_x: "padding_left_top";
+               to_y: "elm.text";
+            }
+            rel2 {
+               relative: 0.0 0.0;
+               to_x: "padding_right_bottom";
+               to_y: "elm.text";
+            }
+            fixed: 0 1;
+            min: 0 0;
+            color: 0 0 0 0;
+         }
+      }
+      part { name: "elm.swallow.icon";
+         type: SWALLOW;
+         scale: 1;
+         clip_to: "elm.icon.clipper";
+         description { state: "default" 0.0;
+            visible: 0;
+            align: 0.5 0.0;
+            rel1 {
+               relative: 1.0 1.0;
+               to: "padding_left_top";
+            }
+            rel2 {
+               relative: 0.0 1.0;
+               to_x: "padding_right_bottom";
+               to_y: "padding_left_top";
+            }
+            fixed: 0 1;
+         }
+         description { state: "visible" 0.0;
+            fixed: 0 1;
+            min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+            max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+            rel1 {
+               relative: 1.0 1.0;
+               to: "padding_left_top";
+            }
+            rel2 {
+               relative: 0.0 0.0;
+               to_x: "padding_right_bottom";
+               to_y: "padding_before_text";
+            }
+            aspect: 1.0 1.0;
+            aspect_preference: HORIZONTAL;
+         }
+         description { state: "icononly" 0.0;
+            min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+            max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+            rel1 {
+               relative: 1.0 1.0;
+               to: "padding_left_top";
+            }
+            rel2 {
+               relative: 0.0 0.0;
+               to: "padding_right_bottom";
+            }
+            aspect: 1.0 1.0;
+            aspect_preference: HORIZONTAL;
+         }
+      }
+      part { name: "elm.swallow.icon_new";
+         type: SWALLOW;
+         scale: 1;
+         clip_to: "elm.icon_new.clipper";
+         description { state: "default" 0.0;
+            visible: 0;
+            align: 0.5 0.0;
+            rel1 {
+               relative: 1.0 1.0;
+               to: "padding_left_top";
+            }
+            rel2 {
+               relative: 0.0 1.0;
+               to_x: "padding_right_bottom";
+               to_y: "padding_left_top";
+            }
+            fixed: 0 1;
+         }
+         description { state: "visible" 0.0;
+            fixed: 0 1;
+            min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+            max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+            rel1 {
+               relative: 1.0 1.0;
+               to: "padding_left_top";
+            }
+            rel2 {
+               relative: 0.0 0.0;
+               to_x: "padding_right_bottom";
+               to_y: "padding_before_text";
+            }
+            aspect: 1.0 1.0;
+            aspect_preference: HORIZONTAL;
+         }
+         description { state: "icononly" 0.0;
+            min: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+            max: BUTTON_CONTROLBAR_ITEM_BUTTON_ICON_SIZE_INC;
+            rel1 {
+               relative: 1.0 1.0;
+               to: "padding_left_top";
+            }
+            rel2 {
+               relative: 0.0 0.0;
+               to: "padding_right_bottom";
+            }
+            aspect: 1.0 1.0;
+            aspect_preference: HORIZONTAL;
+         }
+      }
+      part { name: "elm.text";
+         type: TEXTBLOCK;
+         mouse_events: 0;
+         scale: 1;
+         clip_to: "elm.text.clipper";
+         description { state: "default" 0.0;
+            visible: 1;
+            rel1 {
+               relative: 1.0 1.0;
+               to_x: "padding_left_top";
+               to_y: "padding_after_icon";
+            }
+            rel2 {
+               relative: 0.0 0.0;
+               to: "padding_right_bottom";
+            }
+            color: BUTTON_NAVIFRAME_DEFAULT_TEXT_COLOR_INC;
+            fixed: 1 1;
+            text {
+               style: "toolbar_style";
+               min: 0 1;
+            }
+         }
+         description { state: "selected" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+         }
+         description { state: "visible" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+         }
+         description { state: "clicked" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+            color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
+         }
+         description { state: "focused" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+            color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
+         }
+      }
+      part { name: "elm.text_new";
+         type: TEXTBLOCK;
+         mouse_events: 0;
+         scale: 1;
+         clip_to: "elm.text_new.clipper";
+         description { state: "default" 0.0;
+            visible: 1;
+            rel1 {
+               relative: 1.0 1.0;
+               to_x: "padding_left_top";
+               to_y: "padding_after_icon";
+            }
+            rel2 {
+               relative: 0.0 0.0;
+               to: "padding_right_bottom";
+            }
+            color: BUTTON_NAVIFRAME_DEFAULT_TEXT_COLOR_INC;
+            fixed: 1 1;
+            text {
+               style: "toolbar_style";
+               min: 0 1;
+            }
+         }
+         description { state: "visible" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+         }
+         description { state: "clicked" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+            color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
+         }
+         description { state: "focused" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+            color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
+         }
+      }
+      part { name: "elm.text.clipper";
+         type: RECT;
+         description { state: "default" 0.0;
+            color: 255 255 255 255;
+         }
+         description { state: "animation" 0.0;
+            color: 255 255 255 0;
+         }
+         description { state: "disabled" 0.0;
+            color: 255 255 255 153;
+         }
+      }
+      part { name: "elm.text_new.clipper";
+         type: RECT;
+         description { state: "default" 0.0;
+            color: 255 255 255 0;
+         }
+         description { state: "animation" 0.0;
+            color: 255 255 255 255;
+         }
+         description { state: "disabled" 0.0;
+            color: 255 255 255 153;
+         }
+      }
+      part { name: "elm.icon.clipper";
+         type: RECT;
+         description { state: "default" 0.0;
+            color: 255 255 255 255;
+         }
+         description { state: "animation" 0.0;
+            color: 255 255 255 0;
+         }
+         description { state: "disabled" 0.0;
+            color: 255 255 255 153;
+         }
+      }
+      part { name: "elm.icon_new.clipper";
+         type: RECT;
+         description { state: "default" 0.0;
+            color: 255 255 255 0;
+         }
+         description { state: "animation" 0.0;
+            color: 255 255 255 255;
+         }
+         description { state: "disabled" 0.0;
+            color: 255 255 255 153;
+         }
+      }
+      part { name: "event";
+         type: RECT;
+         mouse_events: 1;
+         ignore_flags: ON_HOLD;
+         description { state: "default" 0.0;
+            color: 0 0 0 0;
+         }
+      }
+   }
+   programs {
+      program { name: "go_active";
+         signal:  "elm,state,selected";
+         source:  "elm";
+         action:  STATE_SET "selected" 0.0;
+         target:  "bg";
+         transition: LINEAR 0.2;
+      }
+      program { name: "go_passive";
+         signal:  "elm,state,unselected";
+         source:  "elm";
+         action:  STATE_SET "default" 0.0;
+         target:  "bg";
+         transition: LINEAR 0.1;
+      }/*
+         program { name: "pressed";
+         signal:  "mouse,down,1";
+         source:  "event";
+         action:  STATE_SET "selected" 0.0;
+         target:  "bg";
+         target:  "elm.text";
+         target:  "elm.text_new";
+         transition: LINEAR 0.2;
+      }
+      program { name: "unpressed";
+         signal:  "mouse,up,1";
+         source:  "event";
+         action:  STATE_SET "default" 0.0;
+         target:  "bg";
+         target:  "elm.text";
+         target:  "elm.text_new";
+         transition: LINEAR 0.1;
+      }*/
+      program { name: "go";
+         signal:  "mouse,up,1";
+         source:  "event";
+         action:  SIGNAL_EMIT "elm,action,click" "elm";
+      }
+      program { name: "mouse,in";
+         signal:  "mouse,in";
+         source:  "event";
+         action:  SIGNAL_EMIT "elm,mouse,in" "elm";
+      }
+      program { name: "mouse,out";
+         signal:  "mouse,out";
+         source:  "event";
+         action:  SIGNAL_EMIT "elm,mouse,out" "elm";
+      }
+      program { name: "disable";
+         signal: "elm,state,disabled";
+         source: "elm";
+         script {
+            set_int(item_state, ITEM_STATE_DISABLED);
+            set_state(PART:"bg", "disabled", 0.0);
+            set_state(PART:"elm.text.clipper", "disabled", 0.0);
+            set_state(PART:"elm.icon.clipper", "disabled", 0.0);
+            run_program(PROGRAM:"label_set,animation,done");
+            run_program(PROGRAM:"icon_set,animation,done");
+         }
+      }
+      program { name: "enable";
+         signal: "elm,state,enabled";
+         source: "elm";
+         script {
+            set_int(item_state, ITEM_STATE_ENABLED);
+            set_state(PART:"bg", "default", 0.0);
+            set_state(PART:"elm.text.clipper", "default", 0.0);
+            set_state(PART:"elm.icon.clipper", "default", 0.0);
+            run_program(PROGRAM:"label_set,animation,done");
+            run_program(PROGRAM:"icon_set,animation,done");
+         }
+      }
+      program { name: "label_set,animation,forward";
+         signal: "elm,state,label_set,forward";
+         source: "elm";
+         after: "label_set,animation";
+      }
+      program { name: "label_set,animation,backward";
+         signal: "elm,state,label_set,backward";
+         source: "elm";
+         after: "label_set,animation";
+      }
+      program { name: "label_set,animation";
+         signal: "elm,state,label_set";
+         source: "elm";
+         action: STATE_SET "animation" 0.0;
+         target: "elm.text.clipper";
+         target: "elm.text_new.clipper";
+         transition: LINEAR 0.2;
+         after: "label_set,animation,done";
+      }
+      program { name: "label_set,animation,done";
+         action: SIGNAL_EMIT "elm,state,label_set,done" "elm";
+      }
+      program { name: "label,reset";
+         signal: "elm,state,label,reset";
+         source: "elm";
+         script {
+            set_state(PART:"elm.text_new.clipper", "default", 0.0);
+            if (get_int(item_state) != ITEM_STATE_DISABLED)
+              set_state(PART:"elm.text.clipper", "default", 0.0);
+            else
+              set_state(PART:"elm.text.clipper", "disabled", 0.0);
+         }
+      }
+      program { name: "icon_set,animation,forward";
+         signal: "elm,state,icon_set,forward";
+         source: "elm";
+         after: "icon_set,animation";
+      }
+      program { name: "icon_set,animation,backward";
+         signal: "elm,state,icon_set,backward";
+         source: "elm";
+         after: "icon_set,animation";
+      }
+      program { name: "icon_set,animation";
+         signal: "elm,state,icon_set";
+         source: "elm";
+         action: STATE_SET "animation" 0.0;
+         target: "elm.icon.clipper";
+         target: "elm.icon_new.clipper";
+         transition: LINEAR 0.2;
+         after: "icon_set,animation,done";
+      }
+      program { name: "icon_set,animation,done";
+         action: SIGNAL_EMIT "elm,state,icon_set,done" "elm";
+      }
+      program { name: "icon,reset";
+         signal: "elm,state,icon,reset";
+         source: "elm";
+         script {
+            set_state(PART:"elm.icon_new.clipper", "default", 0.0);
+            if (get_int(item_state) != ITEM_STATE_DISABLED)
+              set_state(PART:"elm.icon.clipper", "default", 0.0);
+            else
+              set_state(PART:"elm.icon.clipper", "disabled", 0.0);
+         }
+      }
+      program { name: "text_show";
+         signal: "elm,state,text,visible";
+         source: "elm";
+         script {
+            new st[31];
+            new Float:vl;
+            get_state(PART:"elm.swallow.icon", st, 30, vl);
+            if (!strcmp(st, "icononly"))
+              {
+                 set_state(PART:"elm.swallow.icon", "visible", 0.0);
+                 set_state(PART:"icon_rect", "visible", 0.0);
+                 set_state(PART:"padding_after_icon", "visible", 0.0);
+              }
+            set_state(PART:"elm.text", "visible", 0.0);
+         }
+      }
+      program { name: "text_hide";
+         signal: "elm,state,text,hidden";
+         source: "elm";
+         script {
+            new st[31];
+            new Float:vl;
+            get_state(PART:"elm.swallow.icon", st, 30, vl);
+            if (!strcmp(st, "visible"))
+              {
+                 set_state(PART:"elm.swallow.icon", "icononly", 0.0);
+                 set_state(PART:"icon_rect", "icononly", 0.0);
+                 set_state(PART:"padding_after_icon", "icononly", 0.0);
+              }
+            set_state(PART:"elm.text", "default", 0.0);
+         }
+      }
+      program { name: "icon_show";
+         signal: "elm,state,icon,visible";
+         source: "elm";
+         script {
+            new st[31];
+            new Float:vl;
+            get_state(PART:"elm.text", st, 30, vl);
+            if (!strcmp(st, "visible"))
+              {
+                 set_state(PART:"elm.swallow.icon", "visible", 0.0);
+                 set_state(PART:"icon_rect", "visible", 0.0);
+                 set_state(PART:"padding_after_icon", "visible", 0.0);
+              }
+            else
+              {
+                 set_state(PART:"elm.swallow.icon", "icononly", 0.0);
+                 set_state(PART:"icon_rect", "icononly", 0.0);
+                 set_state(PART:"padding_after_icon", "icononly", 0.0);
+              }
+         }
+      }
+   }
+}
+
+group { name: "elm/toolbar/item/tabbar/item_horizontal";
+   inherit: "elm/toolbar/item/tabbar";
+   script {
+      public item_state = ITEM_STATE_ENABLED;
+   }
+   parts {
+      part { name: "icon_rect";
+         description { state: "default" 0.0;
+            fixed: 1 0;
+            align: 0.0 0.5;
+         }
+         description { state: "visible" 0.0;
+            fixed: 1 0;
+            rel2 {
+               relative: 1.0 0.0;
+               to_x: "padding_left_top";
+               to_y: "padding_right_bottom";
+            }
+            align: 0.0 0.5;
+         }
+      }
+      part { name: "padding_after_icon";
+         description { state: "default" 0.0; //when only icon or no icon is there
+            rel1.relative: 1.0 0.0;
+            fixed: 1 1;
+         }
+         description { state: "visible" 0.0;
+            inherit: "default" 0.0;
+            min: 6 0;
+         }
+      }
+      part { name: "padding_before_text";
+         description { state: "default" 0.0; //when only icon or no icon is there
+            align: 1.0 0.5;
+            rel1 {
+               relative: 0.0 1.0;
+               to_x: "elm.text";
+               to_y: "padding_left_top";
+            }
+            rel2 {
+               to_x: "elm.text";
+               to_y: "padding_right_bottom";
+            }
+            fixed: 1 0;
+            min: 6 0;
+         }
+      }
+      part { name: "elm.swallow.icon";
+         description { state: "default" 0.0;
+            align: 0.0 0.5;
+            rel2 {
+               relative: 1.0 0.0;
+               to_x: "padding_left_top";
+               to_y: "padding_right_bottom";
+            }
+            fixed: 1 0;
+         }
+         description { state: "visible" 0.0;
+            fixed: 1 0;
+            align: 1.0 0.5;
+            rel1 {
+               relative: 0.0 1.0;
+               to_x: "padding_before_text";
+               to_y: "padding_left_top";
+            }
+            rel2 {
+               relative: 0.0 0.0;
+               to_x: "padding_before_text";
+               to_y: "padding_right_bottom";
+            }
+            aspect_preference: VERTICAL;
+         }
+         description { state: "icononly" 0.0;
+            aspect_preference: VERTICAL;
+         }
+      }
+      part { name: "elm.swallow.icon_new";
+         description { state: "default" 0.0;
+            align: 0.0 0.5;
+            rel2 {
+               relative: 1.0 0.0;
+               to_x: "padding_left_top";
+               to_y: "padding_right_bottom";
+            }
+            fixed: 1 0;
+         }
+         description { state: "visible" 0.0;
+            fixed: 1 0;
+            align: 1.0 0.5;
+            rel1 {
+               relative: 0.0 1.0;
+               to_x: "padding_before_text";
+               to_y: "padding_left_top";
+            }
+            rel2 {
+               relative: 0.0 0.0;
+               to_x: "padding_before_text";
+               to_y: "padding_right_bottom";
+            }
+            aspect_preference: VERTICAL;
+         }
+         description { state: "icononly" 0.0;
+            aspect_preference: VERTICAL;
+         }
+      }
+      part { name: "elm.text";
+         type: TEXTBLOCK;
+         description { state: "default" 0.0;
+            rel1 {
+               relative: 1.0 1.0;
+               to_x: "padding_after_icon";
+               to_y: "padding_left_top";
+            }
+            text {
+               style: "toolbar_style";
+               min: 1 0;
+            }
+         }
+         description { state: "selected" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+         }
+         description { state: "visible" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+         }
+         description { state: "clicked" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+            color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
+         }
+         description { state: "focused" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+            color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
+         }
+      }
+      part { name: "elm.text_new";
+         type: TEXTBLOCK;
+         description { state: "default" 0.0;
+            rel1 {
+               relative: 1.0 1.0;
+               to_x: "padding_after_icon";
+               to_y: "padding_left_top";
+            }
+            text {
+               style: "toolbar_style";
+               min: 1 0;
+            }
+         }
+         description { state: "selected" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+         }
+         description { state: "visible" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+         }
+         description { state: "clicked" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+            color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
+         }
+         description { state: "focused" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+            color: BUTTON_NAVIFRAME_FOCUSED_TEXT_COLOR_INC;
+         }
+      }
+   }
+}
+
+group { name: "elm/toolbar/base/naviframe";
+   parts {
+      part { name: "base";
+         mouse_events: 1;
+         description { state: "default" 0.0;
+            color: 0 0 0 0;
+         }
+      }
+      part { name: "clipper";
+         type: RECT;
+         mouse_events: 0;
+         description {
+            state: "default" 0.0;
+            rel1 {
+               to: "base";
+               offset: 2 2;
+            }
+            rel2 {
+               to: "base";
+               offset: -3 -3;
+            }
+         }
+      }
+      part { name: "elm.swallow.content";
+         clip_to: "clipper";
+         type: SWALLOW;
+         description {
+            state: "default" 0.0;
+            rel1.to: "clipper";
+            rel2.to: "clipper";
+         }
+      }
+      part { name: "event";
+         type: RECT;
+         mouse_events: 1;
+         repeat_events: 1;
+         description { state: "default" 0.0;
+            color: 0 0 0 0;
+         }
+      }
+   }
+}
+
+group { name: "elm/toolbar/object/naviframe";
+   parts {
+      part { name: "elm.swallow.object"; // object group
+         type: SWALLOW;
+         description {
+             state: "default" 0.0;
+                        rel1.offset: 5 0;
+                        rel2.offset: -6 -1;
+         }
+      }
+   }
+}
+
diff --git a/res/edc/vp_font.edc b/res/edc/vp_font.edc
new file mode 100755 (executable)
index 0000000..2982e3e
--- /dev/null
@@ -0,0 +1,16 @@
+#define FONT_BOLD_TYPE                 "SLP:style=Bold"
+#define FONT_MEDIUM_TYPE                       "SLP:style=Medium"
+#define FONT_REGULAR_TYPE              "SLP:style=Regular"
+#define FONT_ROMAN_TYPE                        "SLP:style=Roman"
+
+#define FONT_COLOR                             255 255 255 255
+
+#define FONT_START_COLOR               255 255 255 255
+#define FONT_END_COLOR                 142 142 142 255
+#define FONT_TRIM_START_COLOR  56 56 56 255
+#define FONT_TRIM_END_COLOR            255 255 255 255
+#define FONT_BOOKMARK_TITLE            249 249 249 255
+
+
+#define TITLE_FONT_SIZE                28
+#define TEXT_TRIM_SIZE         25
\ No newline at end of file
diff --git a/res/images/00_Option_header_bt.png b/res/images/00_Option_header_bt.png
new file mode 100755 (executable)
index 0000000..659fc23
Binary files /dev/null and b/res/images/00_Option_header_bt.png differ
diff --git a/res/images/00_Option_header_bt_dim.png b/res/images/00_Option_header_bt_dim.png
new file mode 100755 (executable)
index 0000000..3fb76e2
Binary files /dev/null and b/res/images/00_Option_header_bt_dim.png differ
diff --git a/res/images/00_Option_header_bt_press.png b/res/images/00_Option_header_bt_press.png
new file mode 100755 (executable)
index 0000000..8a05504
Binary files /dev/null and b/res/images/00_Option_header_bt_press.png differ
diff --git a/res/images/00_button_01_normal.png b/res/images/00_button_01_normal.png
new file mode 100755 (executable)
index 0000000..fd06c1c
Binary files /dev/null and b/res/images/00_button_01_normal.png differ
diff --git a/res/images/00_button_01_normal_dim.png b/res/images/00_button_01_normal_dim.png
new file mode 100755 (executable)
index 0000000..7bb54fc
Binary files /dev/null and b/res/images/00_button_01_normal_dim.png differ
diff --git a/res/images/00_button_01_normal_press.png b/res/images/00_button_01_normal_press.png
new file mode 100755 (executable)
index 0000000..829554a
Binary files /dev/null and b/res/images/00_button_01_normal_press.png differ
diff --git a/res/images/00_check_bg_dim.png b/res/images/00_check_bg_dim.png
new file mode 100755 (executable)
index 0000000..d95649c
Binary files /dev/null and b/res/images/00_check_bg_dim.png differ
diff --git a/res/images/00_grid_select_check.png b/res/images/00_grid_select_check.png
new file mode 100755 (executable)
index 0000000..4385567
Binary files /dev/null and b/res/images/00_grid_select_check.png differ
diff --git a/res/images/00_sweep_list_bg.png b/res/images/00_sweep_list_bg.png
new file mode 100755 (executable)
index 0000000..1606042
Binary files /dev/null and b/res/images/00_sweep_list_bg.png differ
diff --git a/res/images/00_winset_btn_prev.png b/res/images/00_winset_btn_prev.png
new file mode 100755 (executable)
index 0000000..15b43b0
Binary files /dev/null and b/res/images/00_winset_btn_prev.png differ
diff --git a/res/images/00_winset_btn_prev_press.png b/res/images/00_winset_btn_prev_press.png
new file mode 100755 (executable)
index 0000000..1ffbb0b
Binary files /dev/null and b/res/images/00_winset_btn_prev_press.png differ
diff --git a/res/images/00_winset_control_top_arrow.png b/res/images/00_winset_control_top_arrow.png
new file mode 100755 (executable)
index 0000000..9f31c89
Binary files /dev/null and b/res/images/00_winset_control_top_arrow.png differ
diff --git a/res/images/00_winset_list_progress_bg.png b/res/images/00_winset_list_progress_bg.png
new file mode 100755 (executable)
index 0000000..5e83560
Binary files /dev/null and b/res/images/00_winset_list_progress_bg.png differ
diff --git a/res/images/00_winset_thumbs_bg.png b/res/images/00_winset_thumbs_bg.png
new file mode 100755 (executable)
index 0000000..6226c90
Binary files /dev/null and b/res/images/00_winset_thumbs_bg.png differ
diff --git a/res/images/00_winset_thumbs_focus_bg.png b/res/images/00_winset_thumbs_focus_bg.png
new file mode 100755 (executable)
index 0000000..4f7d66f
Binary files /dev/null and b/res/images/00_winset_thumbs_focus_bg.png differ
diff --git a/res/images/00_winset_thumbs_loading_bg.png b/res/images/00_winset_thumbs_loading_bg.png
new file mode 100755 (executable)
index 0000000..0472430
Binary files /dev/null and b/res/images/00_winset_thumbs_loading_bg.png differ
diff --git a/res/images/01_controlbar_icon_delete.png b/res/images/01_controlbar_icon_delete.png
new file mode 100755 (executable)
index 0000000..07e2898
Binary files /dev/null and b/res/images/01_controlbar_icon_delete.png differ
diff --git a/res/images/01_controlbar_icon_set_as.png b/res/images/01_controlbar_icon_set_as.png
new file mode 100755 (executable)
index 0000000..3f5a68f
Binary files /dev/null and b/res/images/01_controlbar_icon_set_as.png differ
diff --git a/res/images/01_controlbar_icon_share.png b/res/images/01_controlbar_icon_share.png
new file mode 100755 (executable)
index 0000000..76ef1ce
Binary files /dev/null and b/res/images/01_controlbar_icon_share.png differ
diff --git a/res/images/01_header_icon_add.png b/res/images/01_header_icon_add.png
new file mode 100755 (executable)
index 0000000..43c4984
Binary files /dev/null and b/res/images/01_header_icon_add.png differ
diff --git a/res/images/01_header_icon_cancel.png b/res/images/01_header_icon_cancel.png
new file mode 100755 (executable)
index 0000000..4fb54c3
Binary files /dev/null and b/res/images/01_header_icon_cancel.png differ
diff --git a/res/images/01_header_icon_others.png b/res/images/01_header_icon_others.png
new file mode 100755 (executable)
index 0000000..4fc9dfa
Binary files /dev/null and b/res/images/01_header_icon_others.png differ
diff --git a/res/images/12_music_player_sound_path.png b/res/images/12_music_player_sound_path.png
new file mode 100755 (executable)
index 0000000..771ebb8
Binary files /dev/null and b/res/images/12_music_player_sound_path.png differ
diff --git a/res/images/DM_Gallery_Increase.png b/res/images/DM_Gallery_Increase.png
new file mode 100755 (executable)
index 0000000..fdf6231
Binary files /dev/null and b/res/images/DM_Gallery_Increase.png differ
diff --git a/res/images/T01-2_icon_toolbar_cancel.png b/res/images/T01-2_icon_toolbar_cancel.png
new file mode 100755 (executable)
index 0000000..5cb7824
Binary files /dev/null and b/res/images/T01-2_icon_toolbar_cancel.png differ
diff --git a/res/images/T01_Image_Look.png b/res/images/T01_Image_Look.png
new file mode 100755 (executable)
index 0000000..5ecda87
Binary files /dev/null and b/res/images/T01_Image_Look.png differ
diff --git a/res/images/T01_Nocontents_multimedia.png b/res/images/T01_Nocontents_multimedia.png
new file mode 100755 (executable)
index 0000000..a59046f
Binary files /dev/null and b/res/images/T01_Nocontents_multimedia.png differ
diff --git a/res/images/T01_Option_header_bt.png b/res/images/T01_Option_header_bt.png
new file mode 100755 (executable)
index 0000000..94b1e2f
Binary files /dev/null and b/res/images/T01_Option_header_bt.png differ
diff --git a/res/images/T01_Option_header_bt_press.png b/res/images/T01_Option_header_bt_press.png
new file mode 100755 (executable)
index 0000000..17331c1
Binary files /dev/null and b/res/images/T01_Option_header_bt_press.png differ
diff --git a/res/images/T01_Trim_handle_beginning.png b/res/images/T01_Trim_handle_beginning.png
new file mode 100755 (executable)
index 0000000..859aa3e
Binary files /dev/null and b/res/images/T01_Trim_handle_beginning.png differ
diff --git a/res/images/T01_Trim_handle_ending.png b/res/images/T01_Trim_handle_ending.png
new file mode 100755 (executable)
index 0000000..adf7c82
Binary files /dev/null and b/res/images/T01_Trim_handle_ending.png differ
diff --git a/res/images/T01_back.png b/res/images/T01_back.png
new file mode 100755 (executable)
index 0000000..73d57a5
Binary files /dev/null and b/res/images/T01_back.png differ
diff --git a/res/images/T01_btn_prev.png b/res/images/T01_btn_prev.png
new file mode 100755 (executable)
index 0000000..ccaf337
Binary files /dev/null and b/res/images/T01_btn_prev.png differ
diff --git a/res/images/T01_check.png b/res/images/T01_check.png
new file mode 100755 (executable)
index 0000000..d5057e4
Binary files /dev/null and b/res/images/T01_check.png differ
diff --git a/res/images/T01_checkbox.png b/res/images/T01_checkbox.png
new file mode 100755 (executable)
index 0000000..61dc76a
Binary files /dev/null and b/res/images/T01_checkbox.png differ
diff --git a/res/images/T01_control_icon_detail.png b/res/images/T01_control_icon_detail.png
new file mode 100755 (executable)
index 0000000..e82b44d
Binary files /dev/null and b/res/images/T01_control_icon_detail.png differ
diff --git a/res/images/T01_control_icon_fullscreen.png b/res/images/T01_control_icon_fullscreen.png
new file mode 100755 (executable)
index 0000000..7fa140f
Binary files /dev/null and b/res/images/T01_control_icon_fullscreen.png differ
diff --git a/res/images/T01_control_icon_reduce.png b/res/images/T01_control_icon_reduce.png
new file mode 100755 (executable)
index 0000000..fbdb906
Binary files /dev/null and b/res/images/T01_control_icon_reduce.png differ
diff --git a/res/images/T01_control_top_arrow.png b/res/images/T01_control_top_arrow.png
new file mode 100755 (executable)
index 0000000..3f2ee50
Binary files /dev/null and b/res/images/T01_control_top_arrow.png differ
diff --git a/res/images/T01_control_top_bg.png b/res/images/T01_control_top_bg.png
new file mode 100755 (executable)
index 0000000..e7b5045
Binary files /dev/null and b/res/images/T01_control_top_bg.png differ
diff --git a/res/images/T01_controlbar_icon_cancel.png b/res/images/T01_controlbar_icon_cancel.png
new file mode 100755 (executable)
index 0000000..5cb7824
Binary files /dev/null and b/res/images/T01_controlbar_icon_cancel.png differ
diff --git a/res/images/T01_controlbar_icon_done.png b/res/images/T01_controlbar_icon_done.png
new file mode 100755 (executable)
index 0000000..46304a4
Binary files /dev/null and b/res/images/T01_controlbar_icon_done.png differ
diff --git a/res/images/T01_controller_btn.png b/res/images/T01_controller_btn.png
new file mode 100755 (executable)
index 0000000..4db7a11
Binary files /dev/null and b/res/images/T01_controller_btn.png differ
diff --git a/res/images/T01_controller_btn_press.png b/res/images/T01_controller_btn_press.png
new file mode 100755 (executable)
index 0000000..4069b0f
Binary files /dev/null and b/res/images/T01_controller_btn_press.png differ
diff --git a/res/images/T01_grid_select_check.png b/res/images/T01_grid_select_check.png
new file mode 100755 (executable)
index 0000000..f131f47
Binary files /dev/null and b/res/images/T01_grid_select_check.png differ
diff --git a/res/images/T01_icon_expand.png b/res/images/T01_icon_expand.png
new file mode 100755 (executable)
index 0000000..ba1158e
Binary files /dev/null and b/res/images/T01_icon_expand.png differ
diff --git a/res/images/T01_icon_reduce.png b/res/images/T01_icon_reduce.png
new file mode 100755 (executable)
index 0000000..7e80daa
Binary files /dev/null and b/res/images/T01_icon_reduce.png differ
diff --git a/res/images/T01_icon_soundPath.png b/res/images/T01_icon_soundPath.png
new file mode 100755 (executable)
index 0000000..79e0cda
Binary files /dev/null and b/res/images/T01_icon_soundPath.png differ
diff --git a/res/images/T01_icon_soundPath_h.png b/res/images/T01_icon_soundPath_h.png
new file mode 100755 (executable)
index 0000000..ad3b1d4
Binary files /dev/null and b/res/images/T01_icon_soundPath_h.png differ
diff --git a/res/images/T01_icon_soundPath_press.png b/res/images/T01_icon_soundPath_press.png
new file mode 100755 (executable)
index 0000000..9fcc466
Binary files /dev/null and b/res/images/T01_icon_soundPath_press.png differ
diff --git a/res/images/T01_player_progress_bar.png b/res/images/T01_player_progress_bar.png
new file mode 100755 (executable)
index 0000000..2f25452
Binary files /dev/null and b/res/images/T01_player_progress_bar.png differ
diff --git a/res/images/T01_player_progress_bg.png b/res/images/T01_player_progress_bg.png
new file mode 100755 (executable)
index 0000000..58d94cc
Binary files /dev/null and b/res/images/T01_player_progress_bg.png differ
diff --git a/res/images/T01_player_progress_point.png b/res/images/T01_player_progress_point.png
new file mode 100755 (executable)
index 0000000..0e8c5c5
Binary files /dev/null and b/res/images/T01_player_progress_point.png differ
diff --git a/res/images/T01_sound_path.png b/res/images/T01_sound_path.png
new file mode 100755 (executable)
index 0000000..d4f3843
Binary files /dev/null and b/res/images/T01_sound_path.png differ
diff --git a/res/images/T01_title_bg.png b/res/images/T01_title_bg.png
new file mode 100755 (executable)
index 0000000..039da67
Binary files /dev/null and b/res/images/T01_title_bg.png differ
diff --git a/res/images/T01_title_bg_h.png b/res/images/T01_title_bg_h.png
new file mode 100755 (executable)
index 0000000..7d0cec4
Binary files /dev/null and b/res/images/T01_title_bg_h.png differ
diff --git a/res/images/T01_title_btn.png b/res/images/T01_title_btn.png
new file mode 100755 (executable)
index 0000000..20c31f1
Binary files /dev/null and b/res/images/T01_title_btn.png differ
diff --git a/res/images/T01_title_btn_press.png b/res/images/T01_title_btn_press.png
new file mode 100755 (executable)
index 0000000..49861ed
Binary files /dev/null and b/res/images/T01_title_btn_press.png differ
diff --git a/res/images/T01_toolbar_bg.png b/res/images/T01_toolbar_bg.png
new file mode 100755 (executable)
index 0000000..e02c6c6
Binary files /dev/null and b/res/images/T01_toolbar_bg.png differ
diff --git a/res/images/T01_toolbar_press.png b/res/images/T01_toolbar_press.png
new file mode 100755 (executable)
index 0000000..851583e
Binary files /dev/null and b/res/images/T01_toolbar_press.png differ
diff --git a/res/images/T01_video_list_progress_bar.png b/res/images/T01_video_list_progress_bar.png
new file mode 100755 (executable)
index 0000000..cc9c1bc
Binary files /dev/null and b/res/images/T01_video_list_progress_bar.png differ
diff --git a/res/images/adjustment/T01-2_controller_progress_handle.png b/res/images/adjustment/T01-2_controller_progress_handle.png
new file mode 100755 (executable)
index 0000000..fc80139
Binary files /dev/null and b/res/images/adjustment/T01-2_controller_progress_handle.png differ
diff --git a/res/images/adjustment/T01-2_controller_progress_handle_press.png b/res/images/adjustment/T01-2_controller_progress_handle_press.png
new file mode 100755 (executable)
index 0000000..d14c5f6
Binary files /dev/null and b/res/images/adjustment/T01-2_controller_progress_handle_press.png differ
diff --git a/res/images/adjustment/T01-2_fine_adjustment_bg.png b/res/images/adjustment/T01-2_fine_adjustment_bg.png
new file mode 100755 (executable)
index 0000000..40efe0e
Binary files /dev/null and b/res/images/adjustment/T01-2_fine_adjustment_bg.png differ
diff --git a/res/images/adjustment/T01-2_fine_adjustment_bg_ef.png b/res/images/adjustment/T01-2_fine_adjustment_bg_ef.png
new file mode 100755 (executable)
index 0000000..b088e8a
Binary files /dev/null and b/res/images/adjustment/T01-2_fine_adjustment_bg_ef.png differ
diff --git a/res/images/adjustment/T01-2_fine_adjustment_progress_bar.png b/res/images/adjustment/T01-2_fine_adjustment_progress_bar.png
new file mode 100755 (executable)
index 0000000..34240ab
Binary files /dev/null and b/res/images/adjustment/T01-2_fine_adjustment_progress_bar.png differ
diff --git a/res/images/adjustment/T01-2_fine_adjustment_progress_bg.png b/res/images/adjustment/T01-2_fine_adjustment_progress_bg.png
new file mode 100755 (executable)
index 0000000..b4c6def
Binary files /dev/null and b/res/images/adjustment/T01-2_fine_adjustment_progress_bg.png differ
diff --git a/res/images/adjustment/T01-2_fine_adjustment_progress_handle.png b/res/images/adjustment/T01-2_fine_adjustment_progress_handle.png
new file mode 100755 (executable)
index 0000000..b8fa147
Binary files /dev/null and b/res/images/adjustment/T01-2_fine_adjustment_progress_handle.png differ
diff --git a/res/images/gallery_loading_ani_01.png b/res/images/gallery_loading_ani_01.png
new file mode 100755 (executable)
index 0000000..9402e71
Binary files /dev/null and b/res/images/gallery_loading_ani_01.png differ
diff --git a/res/images/gallery_loading_ani_02.png b/res/images/gallery_loading_ani_02.png
new file mode 100755 (executable)
index 0000000..e71d491
Binary files /dev/null and b/res/images/gallery_loading_ani_02.png differ
diff --git a/res/images/gallery_loading_ani_03.png b/res/images/gallery_loading_ani_03.png
new file mode 100755 (executable)
index 0000000..1ed0de9
Binary files /dev/null and b/res/images/gallery_loading_ani_03.png differ
diff --git a/res/images/gallery_loading_ani_04.png b/res/images/gallery_loading_ani_04.png
new file mode 100755 (executable)
index 0000000..18cc497
Binary files /dev/null and b/res/images/gallery_loading_ani_04.png differ
diff --git a/res/images/gallery_loading_ani_05.png b/res/images/gallery_loading_ani_05.png
new file mode 100755 (executable)
index 0000000..036c49b
Binary files /dev/null and b/res/images/gallery_loading_ani_05.png differ
diff --git a/res/images/gallery_loading_ani_06.png b/res/images/gallery_loading_ani_06.png
new file mode 100755 (executable)
index 0000000..3cb5e33
Binary files /dev/null and b/res/images/gallery_loading_ani_06.png differ
diff --git a/res/images/gallery_loading_ani_07.png b/res/images/gallery_loading_ani_07.png
new file mode 100755 (executable)
index 0000000..fae06de
Binary files /dev/null and b/res/images/gallery_loading_ani_07.png differ
diff --git a/res/images/gallery_loading_ani_08.png b/res/images/gallery_loading_ani_08.png
new file mode 100755 (executable)
index 0000000..70eaaf0
Binary files /dev/null and b/res/images/gallery_loading_ani_08.png differ
diff --git a/res/images/gallery_loading_ani_09.png b/res/images/gallery_loading_ani_09.png
new file mode 100755 (executable)
index 0000000..7fb390c
Binary files /dev/null and b/res/images/gallery_loading_ani_09.png differ
diff --git a/res/images/gallery_loading_ani_10.png b/res/images/gallery_loading_ani_10.png
new file mode 100755 (executable)
index 0000000..941fc3b
Binary files /dev/null and b/res/images/gallery_loading_ani_10.png differ
diff --git a/res/images/gallery_loading_ani_11.png b/res/images/gallery_loading_ani_11.png
new file mode 100755 (executable)
index 0000000..a67149d
Binary files /dev/null and b/res/images/gallery_loading_ani_11.png differ
diff --git a/res/images/gallery_loading_ani_12.png b/res/images/gallery_loading_ani_12.png
new file mode 100755 (executable)
index 0000000..b36421a
Binary files /dev/null and b/res/images/gallery_loading_ani_12.png differ
diff --git a/res/images/gallery_loading_ani_13.png b/res/images/gallery_loading_ani_13.png
new file mode 100755 (executable)
index 0000000..d70d609
Binary files /dev/null and b/res/images/gallery_loading_ani_13.png differ
diff --git a/res/images/gallery_loading_ani_14.png b/res/images/gallery_loading_ani_14.png
new file mode 100755 (executable)
index 0000000..ab52db7
Binary files /dev/null and b/res/images/gallery_loading_ani_14.png differ
diff --git a/res/images/gallery_loading_ani_15.png b/res/images/gallery_loading_ani_15.png
new file mode 100755 (executable)
index 0000000..1de8adb
Binary files /dev/null and b/res/images/gallery_loading_ani_15.png differ
diff --git a/res/images/gallery_loading_ani_16.png b/res/images/gallery_loading_ani_16.png
new file mode 100755 (executable)
index 0000000..521b61f
Binary files /dev/null and b/res/images/gallery_loading_ani_16.png differ
diff --git a/res/images/gallery_loading_ani_17.png b/res/images/gallery_loading_ani_17.png
new file mode 100755 (executable)
index 0000000..6cb5ba9
Binary files /dev/null and b/res/images/gallery_loading_ani_17.png differ
diff --git a/res/images/gallery_loading_ani_18.png b/res/images/gallery_loading_ani_18.png
new file mode 100755 (executable)
index 0000000..a636079
Binary files /dev/null and b/res/images/gallery_loading_ani_18.png differ
diff --git a/res/images/gallery_loading_ani_19.png b/res/images/gallery_loading_ani_19.png
new file mode 100755 (executable)
index 0000000..0a4f650
Binary files /dev/null and b/res/images/gallery_loading_ani_19.png differ
diff --git a/res/images/gallery_loading_ani_20.png b/res/images/gallery_loading_ani_20.png
new file mode 100755 (executable)
index 0000000..14cc339
Binary files /dev/null and b/res/images/gallery_loading_ani_20.png differ
diff --git a/res/images/gallery_loading_ani_21.png b/res/images/gallery_loading_ani_21.png
new file mode 100755 (executable)
index 0000000..0e78db7
Binary files /dev/null and b/res/images/gallery_loading_ani_21.png differ
diff --git a/res/images/gallery_loading_ani_22.png b/res/images/gallery_loading_ani_22.png
new file mode 100755 (executable)
index 0000000..80d592e
Binary files /dev/null and b/res/images/gallery_loading_ani_22.png differ
diff --git a/res/images/gallery_loading_ani_23.png b/res/images/gallery_loading_ani_23.png
new file mode 100755 (executable)
index 0000000..b4bd7ca
Binary files /dev/null and b/res/images/gallery_loading_ani_23.png differ
diff --git a/res/images/gallery_loading_ani_24.png b/res/images/gallery_loading_ani_24.png
new file mode 100755 (executable)
index 0000000..69445e4
Binary files /dev/null and b/res/images/gallery_loading_ani_24.png differ
diff --git a/res/images/gallery_loading_ani_25.png b/res/images/gallery_loading_ani_25.png
new file mode 100755 (executable)
index 0000000..233a038
Binary files /dev/null and b/res/images/gallery_loading_ani_25.png differ
diff --git a/res/images/gallery_loading_ani_26.png b/res/images/gallery_loading_ani_26.png
new file mode 100755 (executable)
index 0000000..d52a017
Binary files /dev/null and b/res/images/gallery_loading_ani_26.png differ
diff --git a/res/images/gallery_loading_ani_27.png b/res/images/gallery_loading_ani_27.png
new file mode 100755 (executable)
index 0000000..4221ecc
Binary files /dev/null and b/res/images/gallery_loading_ani_27.png differ
diff --git a/res/images/gallery_loading_ani_28.png b/res/images/gallery_loading_ani_28.png
new file mode 100755 (executable)
index 0000000..da37330
Binary files /dev/null and b/res/images/gallery_loading_ani_28.png differ
diff --git a/res/images/gallery_loading_ani_29.png b/res/images/gallery_loading_ani_29.png
new file mode 100755 (executable)
index 0000000..41e97e1
Binary files /dev/null and b/res/images/gallery_loading_ani_29.png differ
diff --git a/res/images/gallery_loading_ani_30.png b/res/images/gallery_loading_ani_30.png
new file mode 100755 (executable)
index 0000000..ac0bb55
Binary files /dev/null and b/res/images/gallery_loading_ani_30.png differ
diff --git a/res/images/gallery_video_add_btn.png b/res/images/gallery_video_add_btn.png
new file mode 100755 (executable)
index 0000000..63f7d63
Binary files /dev/null and b/res/images/gallery_video_add_btn.png differ
diff --git a/res/images/gallery_video_add_btn_press.png b/res/images/gallery_video_add_btn_press.png
new file mode 100755 (executable)
index 0000000..2bfc65b
Binary files /dev/null and b/res/images/gallery_video_add_btn_press.png differ
diff --git a/res/images/gallery_video_control_ff.png b/res/images/gallery_video_control_ff.png
new file mode 100755 (executable)
index 0000000..e0a49f1
Binary files /dev/null and b/res/images/gallery_video_control_ff.png differ
diff --git a/res/images/gallery_video_control_ff_2.png b/res/images/gallery_video_control_ff_2.png
new file mode 100755 (executable)
index 0000000..57d60d6
Binary files /dev/null and b/res/images/gallery_video_control_ff_2.png differ
diff --git a/res/images/gallery_video_control_ff_3.png b/res/images/gallery_video_control_ff_3.png
new file mode 100755 (executable)
index 0000000..6f023ea
Binary files /dev/null and b/res/images/gallery_video_control_ff_3.png differ
diff --git a/res/images/gallery_video_control_ff_4.png b/res/images/gallery_video_control_ff_4.png
new file mode 100755 (executable)
index 0000000..427735f
Binary files /dev/null and b/res/images/gallery_video_control_ff_4.png differ
diff --git a/res/images/gallery_video_control_ff_5.png b/res/images/gallery_video_control_ff_5.png
new file mode 100755 (executable)
index 0000000..93aa2be
Binary files /dev/null and b/res/images/gallery_video_control_ff_5.png differ
diff --git a/res/images/gallery_video_control_frame_back.png b/res/images/gallery_video_control_frame_back.png
new file mode 100755 (executable)
index 0000000..7a0428d
Binary files /dev/null and b/res/images/gallery_video_control_frame_back.png differ
diff --git a/res/images/gallery_video_control_frame_forword.png b/res/images/gallery_video_control_frame_forword.png
new file mode 100755 (executable)
index 0000000..af2b776
Binary files /dev/null and b/res/images/gallery_video_control_frame_forword.png differ
diff --git a/res/images/gallery_video_control_next.png b/res/images/gallery_video_control_next.png
new file mode 100755 (executable)
index 0000000..e0a49f1
Binary files /dev/null and b/res/images/gallery_video_control_next.png differ
diff --git a/res/images/gallery_video_control_pause.png b/res/images/gallery_video_control_pause.png
new file mode 100755 (executable)
index 0000000..d36fbf4
Binary files /dev/null and b/res/images/gallery_video_control_pause.png differ
diff --git a/res/images/gallery_video_control_play.png b/res/images/gallery_video_control_play.png
new file mode 100755 (executable)
index 0000000..16b49a5
Binary files /dev/null and b/res/images/gallery_video_control_play.png differ
diff --git a/res/images/gallery_video_control_prev.png b/res/images/gallery_video_control_prev.png
new file mode 100755 (executable)
index 0000000..029e57c
Binary files /dev/null and b/res/images/gallery_video_control_prev.png differ
diff --git a/res/images/gallery_video_control_rew.png b/res/images/gallery_video_control_rew.png
new file mode 100755 (executable)
index 0000000..029e57c
Binary files /dev/null and b/res/images/gallery_video_control_rew.png differ
diff --git a/res/images/gallery_video_control_rew_2.png b/res/images/gallery_video_control_rew_2.png
new file mode 100755 (executable)
index 0000000..ad63c27
Binary files /dev/null and b/res/images/gallery_video_control_rew_2.png differ
diff --git a/res/images/gallery_video_control_rew_3.png b/res/images/gallery_video_control_rew_3.png
new file mode 100755 (executable)
index 0000000..96d43fd
Binary files /dev/null and b/res/images/gallery_video_control_rew_3.png differ
diff --git a/res/images/gallery_video_control_rew_4.png b/res/images/gallery_video_control_rew_4.png
new file mode 100755 (executable)
index 0000000..60f2a1d
Binary files /dev/null and b/res/images/gallery_video_control_rew_4.png differ
diff --git a/res/images/gallery_video_control_rew_5.png b/res/images/gallery_video_control_rew_5.png
new file mode 100755 (executable)
index 0000000..2eba4f6
Binary files /dev/null and b/res/images/gallery_video_control_rew_5.png differ
diff --git a/res/images/gallery_video_delete_btn.png b/res/images/gallery_video_delete_btn.png
new file mode 100755 (executable)
index 0000000..fe62076
Binary files /dev/null and b/res/images/gallery_video_delete_btn.png differ
diff --git a/res/images/gallery_video_delete_btn_press.png b/res/images/gallery_video_delete_btn_press.png
new file mode 100755 (executable)
index 0000000..2d2466f
Binary files /dev/null and b/res/images/gallery_video_delete_btn_press.png differ
diff --git a/res/images/gallery_video_fastforward_1x.png b/res/images/gallery_video_fastforward_1x.png
new file mode 100755 (executable)
index 0000000..c1ea6b1
Binary files /dev/null and b/res/images/gallery_video_fastforward_1x.png differ
diff --git a/res/images/gallery_video_fastforward_2x.png b/res/images/gallery_video_fastforward_2x.png
new file mode 100755 (executable)
index 0000000..ea0486c
Binary files /dev/null and b/res/images/gallery_video_fastforward_2x.png differ
diff --git a/res/images/gallery_video_fastforward_3x.png b/res/images/gallery_video_fastforward_3x.png
new file mode 100755 (executable)
index 0000000..6e16eff
Binary files /dev/null and b/res/images/gallery_video_fastforward_3x.png differ
diff --git a/res/images/gallery_video_fastforward_4x.png b/res/images/gallery_video_fastforward_4x.png
new file mode 100755 (executable)
index 0000000..a1eeacb
Binary files /dev/null and b/res/images/gallery_video_fastforward_4x.png differ
diff --git a/res/images/gallery_video_icon_btn.png b/res/images/gallery_video_icon_btn.png
new file mode 100755 (executable)
index 0000000..9ef6888
Binary files /dev/null and b/res/images/gallery_video_icon_btn.png differ
diff --git a/res/images/gallery_video_icon_btn_press.png b/res/images/gallery_video_icon_btn_press.png
new file mode 100755 (executable)
index 0000000..628c8e7
Binary files /dev/null and b/res/images/gallery_video_icon_btn_press.png differ
diff --git a/res/images/gallery_video_icon_mute.png b/res/images/gallery_video_icon_mute.png
new file mode 100755 (executable)
index 0000000..e92f376
Binary files /dev/null and b/res/images/gallery_video_icon_mute.png differ
diff --git a/res/images/gallery_video_icon_volume.png b/res/images/gallery_video_icon_volume.png
new file mode 100755 (executable)
index 0000000..49d9cf5
Binary files /dev/null and b/res/images/gallery_video_icon_volume.png differ
diff --git a/res/images/gallery_video_player_bg.png b/res/images/gallery_video_player_bg.png
new file mode 100755 (executable)
index 0000000..611a7b7
Binary files /dev/null and b/res/images/gallery_video_player_bg.png differ
diff --git a/res/images/gallery_video_popup_mute.png b/res/images/gallery_video_popup_mute.png
new file mode 100755 (executable)
index 0000000..32f447c
Binary files /dev/null and b/res/images/gallery_video_popup_mute.png differ
diff --git a/res/images/gallery_video_rewind_1x.png b/res/images/gallery_video_rewind_1x.png
new file mode 100755 (executable)
index 0000000..31f3696
Binary files /dev/null and b/res/images/gallery_video_rewind_1x.png differ
diff --git a/res/images/gallery_video_rewind_2x.png b/res/images/gallery_video_rewind_2x.png
new file mode 100755 (executable)
index 0000000..17c17c9
Binary files /dev/null and b/res/images/gallery_video_rewind_2x.png differ
diff --git a/res/images/gallery_video_rewind_3x.png b/res/images/gallery_video_rewind_3x.png
new file mode 100755 (executable)
index 0000000..badb983
Binary files /dev/null and b/res/images/gallery_video_rewind_3x.png differ
diff --git a/res/images/gallery_video_rewind_4x.png b/res/images/gallery_video_rewind_4x.png
new file mode 100755 (executable)
index 0000000..a855514
Binary files /dev/null and b/res/images/gallery_video_rewind_4x.png differ
diff --git a/res/images/icon/06_myfiles_list_folder.png b/res/images/icon/06_myfiles_list_folder.png
new file mode 100644 (file)
index 0000000..d53be43
Binary files /dev/null and b/res/images/icon/06_myfiles_list_folder.png differ
diff --git a/res/images/icon/T01-2_icon_function_bg.png b/res/images/icon/T01-2_icon_function_bg.png
new file mode 100755 (executable)
index 0000000..7354c9e
Binary files /dev/null and b/res/images/icon/T01-2_icon_function_bg.png differ
diff --git a/res/images/icon/T01-2_icon_popup_sound_allive.png b/res/images/icon/T01-2_icon_popup_sound_allive.png
new file mode 100755 (executable)
index 0000000..0f40b7b
Binary files /dev/null and b/res/images/icon/T01-2_icon_popup_sound_allive.png differ
diff --git a/res/images/icon/T01-2_icon_popup_sound_audio_track.png b/res/images/icon/T01-2_icon_popup_sound_audio_track.png
new file mode 100755 (executable)
index 0000000..eb9b26d
Binary files /dev/null and b/res/images/icon/T01-2_icon_popup_sound_audio_track.png differ
diff --git a/res/images/icon/T01-2_icon_popup_sound_repeat_mode.png b/res/images/icon/T01-2_icon_popup_sound_repeat_mode.png
new file mode 100755 (executable)
index 0000000..a5aa8a0
Binary files /dev/null and b/res/images/icon/T01-2_icon_popup_sound_repeat_mode.png differ
diff --git a/res/images/icon/T01-2_icon_popup_sound_settings.png b/res/images/icon/T01-2_icon_popup_sound_settings.png
new file mode 100755 (executable)
index 0000000..b548ecd
Binary files /dev/null and b/res/images/icon/T01-2_icon_popup_sound_settings.png differ
diff --git a/res/images/icon/T01-2_icon_popup_subtitle.png b/res/images/icon/T01-2_icon_popup_subtitle.png
new file mode 100755 (executable)
index 0000000..5122b35
Binary files /dev/null and b/res/images/icon/T01-2_icon_popup_subtitle.png differ
diff --git a/res/images/icon/T01-2_icon_popup_trim.png b/res/images/icon/T01-2_icon_popup_trim.png
new file mode 100755 (executable)
index 0000000..1cab618
Binary files /dev/null and b/res/images/icon/T01-2_icon_popup_trim.png differ
diff --git a/res/images/icon/T01-2_icon_title_allshare.png b/res/images/icon/T01-2_icon_title_allshare.png
new file mode 100755 (executable)
index 0000000..2e46917
Binary files /dev/null and b/res/images/icon/T01-2_icon_title_allshare.png differ
diff --git a/res/images/icon/T01-2_icon_title_soundpath.png b/res/images/icon/T01-2_icon_title_soundpath.png
new file mode 100755 (executable)
index 0000000..1da849c
Binary files /dev/null and b/res/images/icon/T01-2_icon_title_soundpath.png differ
diff --git a/res/images/icon/_06_myfiles_list_folder.png b/res/images/icon/_06_myfiles_list_folder.png
new file mode 100644 (file)
index 0000000..52b77ba
Binary files /dev/null and b/res/images/icon/_06_myfiles_list_folder.png differ
diff --git a/res/images/navibar_item_separator_shadow.png b/res/images/navibar_item_separator_shadow.png
new file mode 100755 (executable)
index 0000000..05d347d
Binary files /dev/null and b/res/images/navibar_item_separator_shadow.png differ
diff --git a/res/images/naviframe_optionheader.png b/res/images/naviframe_optionheader.png
new file mode 100755 (executable)
index 0000000..e90f19c
Binary files /dev/null and b/res/images/naviframe_optionheader.png differ
diff --git a/res/images/naviframe_optionheader_arrow.png b/res/images/naviframe_optionheader_arrow.png
new file mode 100755 (executable)
index 0000000..de84372
Binary files /dev/null and b/res/images/naviframe_optionheader_arrow.png differ
diff --git a/res/images/org.tizen.video-player.png b/res/images/org.tizen.video-player.png
new file mode 100755 (executable)
index 0000000..3b009fc
Binary files /dev/null and b/res/images/org.tizen.video-player.png differ
diff --git a/res/images/panel/T01-2_btn_toolbar_back.png b/res/images/panel/T01-2_btn_toolbar_back.png
new file mode 100755 (executable)
index 0000000..ff4851e
Binary files /dev/null and b/res/images/panel/T01-2_btn_toolbar_back.png differ
diff --git a/res/images/panel/T01-2_btn_toolbar_back_press.png b/res/images/panel/T01-2_btn_toolbar_back_press.png
new file mode 100755 (executable)
index 0000000..0852249
Binary files /dev/null and b/res/images/panel/T01-2_btn_toolbar_back_press.png differ
diff --git a/res/images/panel/T01-2_btn_toolbar_volum.png b/res/images/panel/T01-2_btn_toolbar_volum.png
new file mode 100755 (executable)
index 0000000..3e09485
Binary files /dev/null and b/res/images/panel/T01-2_btn_toolbar_volum.png differ
diff --git a/res/images/panel/T01-2_btn_toolbar_volum_press.png b/res/images/panel/T01-2_btn_toolbar_volum_press.png
new file mode 100755 (executable)
index 0000000..d07e670
Binary files /dev/null and b/res/images/panel/T01-2_btn_toolbar_volum_press.png differ
diff --git a/res/images/panel/T01-2_controller_progress_bar.png b/res/images/panel/T01-2_controller_progress_bar.png
new file mode 100755 (executable)
index 0000000..03f54cf
Binary files /dev/null and b/res/images/panel/T01-2_controller_progress_bar.png differ
diff --git a/res/images/panel/T01-2_controller_progress_bg.png b/res/images/panel/T01-2_controller_progress_bg.png
new file mode 100755 (executable)
index 0000000..f020771
Binary files /dev/null and b/res/images/panel/T01-2_controller_progress_bg.png differ
diff --git a/res/images/panel/T01-2_icon_controller_repeat.png b/res/images/panel/T01-2_icon_controller_repeat.png
new file mode 100755 (executable)
index 0000000..e8012e3
Binary files /dev/null and b/res/images/panel/T01-2_icon_controller_repeat.png differ
diff --git a/res/images/panel/T01-2_icon_controller_repeat_1.png b/res/images/panel/T01-2_icon_controller_repeat_1.png
new file mode 100755 (executable)
index 0000000..941301f
Binary files /dev/null and b/res/images/panel/T01-2_icon_controller_repeat_1.png differ
diff --git a/res/images/panel/T01-2_icon_controller_repeat_all.png b/res/images/panel/T01-2_icon_controller_repeat_all.png
new file mode 100755 (executable)
index 0000000..bdd28af
Binary files /dev/null and b/res/images/panel/T01-2_icon_controller_repeat_all.png differ
diff --git a/res/images/panel/T01-2_icon_controller_sa.png b/res/images/panel/T01-2_icon_controller_sa.png
new file mode 100755 (executable)
index 0000000..3b6b488
Binary files /dev/null and b/res/images/panel/T01-2_icon_controller_sa.png differ
diff --git a/res/images/panel/T01-2_icon_toolbar_cancel.png b/res/images/panel/T01-2_icon_toolbar_cancel.png
new file mode 100755 (executable)
index 0000000..5cb7824
Binary files /dev/null and b/res/images/panel/T01-2_icon_toolbar_cancel.png differ
diff --git a/res/images/panel/T01-2_icon_toolbar_done.png b/res/images/panel/T01-2_icon_toolbar_done.png
new file mode 100755 (executable)
index 0000000..46304a4
Binary files /dev/null and b/res/images/panel/T01-2_icon_toolbar_done.png differ
diff --git a/res/images/toolbar/T01-2_btn_toolbar_back.png b/res/images/toolbar/T01-2_btn_toolbar_back.png
new file mode 100755 (executable)
index 0000000..ff4851e
Binary files /dev/null and b/res/images/toolbar/T01-2_btn_toolbar_back.png differ
diff --git a/res/images/toolbar/T01-2_btn_toolbar_volum.png b/res/images/toolbar/T01-2_btn_toolbar_volum.png
new file mode 100755 (executable)
index 0000000..3e09485
Binary files /dev/null and b/res/images/toolbar/T01-2_btn_toolbar_volum.png differ
diff --git a/res/images/toolbar/T01-2_controlbar_icon_folder.png b/res/images/toolbar/T01-2_controlbar_icon_folder.png
new file mode 100644 (file)
index 0000000..53500ff
Binary files /dev/null and b/res/images/toolbar/T01-2_controlbar_icon_folder.png differ
diff --git a/res/images/toolbar/T01-2_controlbar_icon_near_device.png b/res/images/toolbar/T01-2_controlbar_icon_near_device.png
new file mode 100644 (file)
index 0000000..0520970
Binary files /dev/null and b/res/images/toolbar/T01-2_controlbar_icon_near_device.png differ
diff --git a/res/images/toolbar/T01-2_controlbar_icon_recorded.png b/res/images/toolbar/T01-2_controlbar_icon_recorded.png
new file mode 100644 (file)
index 0000000..0717057
Binary files /dev/null and b/res/images/toolbar/T01-2_controlbar_icon_recorded.png differ
diff --git a/res/images/toolbar/T01-2_controlbar_icon_video.png b/res/images/toolbar/T01-2_controlbar_icon_video.png
new file mode 100644 (file)
index 0000000..da41533
Binary files /dev/null and b/res/images/toolbar/T01-2_controlbar_icon_video.png differ
diff --git a/res/images/toolbar/T01-2_icon_toolbar_cancel.png b/res/images/toolbar/T01-2_icon_toolbar_cancel.png
new file mode 100755 (executable)
index 0000000..5cb7824
Binary files /dev/null and b/res/images/toolbar/T01-2_icon_toolbar_cancel.png differ
diff --git a/res/images/toolbar/T01-2_icon_toolbar_delete.png b/res/images/toolbar/T01-2_icon_toolbar_delete.png
new file mode 100755 (executable)
index 0000000..757aee3
Binary files /dev/null and b/res/images/toolbar/T01-2_icon_toolbar_delete.png differ
diff --git a/res/images/toolbar/T01-2_icon_toolbar_done.png b/res/images/toolbar/T01-2_icon_toolbar_done.png
new file mode 100755 (executable)
index 0000000..46304a4
Binary files /dev/null and b/res/images/toolbar/T01-2_icon_toolbar_done.png differ
diff --git a/res/images/toolbar/T01-2_icon_toolbar_setting.png b/res/images/toolbar/T01-2_icon_toolbar_setting.png
new file mode 100644 (file)
index 0000000..4dcd409
Binary files /dev/null and b/res/images/toolbar/T01-2_icon_toolbar_setting.png differ
diff --git a/res/images/toolbar/T01-2_icon_toolbar_sort_by.png b/res/images/toolbar/T01-2_icon_toolbar_sort_by.png
new file mode 100644 (file)
index 0000000..e252d2b
Binary files /dev/null and b/res/images/toolbar/T01-2_icon_toolbar_sort_by.png differ
diff --git a/res/images/toolbar/T02_controlbar_icon_search.png b/res/images/toolbar/T02_controlbar_icon_search.png
new file mode 100755 (executable)
index 0000000..e748043
Binary files /dev/null and b/res/images/toolbar/T02_controlbar_icon_search.png differ
diff --git a/res/images/video_sound_path_dim.png b/res/images/video_sound_path_dim.png
new file mode 100755 (executable)
index 0000000..02b5867
Binary files /dev/null and b/res/images/video_sound_path_dim.png differ
diff --git a/res/images/white/common/00_popup_bubble_bg.png b/res/images/white/common/00_popup_bubble_bg.png
new file mode 100755 (executable)
index 0000000..11b536d
Binary files /dev/null and b/res/images/white/common/00_popup_bubble_bg.png differ
diff --git a/res/images/white/common/00_popup_tail_bottom.png b/res/images/white/common/00_popup_tail_bottom.png
new file mode 100755 (executable)
index 0000000..a37b8be
Binary files /dev/null and b/res/images/white/common/00_popup_tail_bottom.png differ
diff --git a/res/images/white/common/00_popup_tail_left.png b/res/images/white/common/00_popup_tail_left.png
new file mode 100755 (executable)
index 0000000..593c109
Binary files /dev/null and b/res/images/white/common/00_popup_tail_left.png differ
diff --git a/res/images/white/common/00_popup_tail_right.png b/res/images/white/common/00_popup_tail_right.png
new file mode 100755 (executable)
index 0000000..0b451f7
Binary files /dev/null and b/res/images/white/common/00_popup_tail_right.png differ
diff --git a/res/images/white/common/00_popup_tail_top.png b/res/images/white/common/00_popup_tail_top.png
new file mode 100755 (executable)
index 0000000..d99ce87
Binary files /dev/null and b/res/images/white/common/00_popup_tail_top.png differ
diff --git a/res/images/white/common/00_winset_control_toolbar_bg.png b/res/images/white/common/00_winset_control_toolbar_bg.png
new file mode 100755 (executable)
index 0000000..d21ae34
Binary files /dev/null and b/res/images/white/common/00_winset_control_toolbar_bg.png differ
diff --git a/res/images/white/common/00_winset_control_top_arrow.png b/res/images/white/common/00_winset_control_top_arrow.png
new file mode 100755 (executable)
index 0000000..2d0503d
Binary files /dev/null and b/res/images/white/common/00_winset_control_top_arrow.png differ
diff --git a/res/images/white/common/00_winset_control_top_bg.png b/res/images/white/common/00_winset_control_top_bg.png
new file mode 100755 (executable)
index 0000000..187516e
Binary files /dev/null and b/res/images/white/common/00_winset_control_top_bg.png differ
diff --git a/res/images/white/common/00_winset_title_line.png b/res/images/white/common/00_winset_title_line.png
new file mode 100755 (executable)
index 0000000..2be73aa
Binary files /dev/null and b/res/images/white/common/00_winset_title_line.png differ
diff --git a/res/images/white/common/01_scroller.png b/res/images/white/common/01_scroller.png
new file mode 100755 (executable)
index 0000000..88ee4ab
Binary files /dev/null and b/res/images/white/common/01_scroller.png differ
diff --git a/res/images/white/common/T01-2_popup_arrow.png b/res/images/white/common/T01-2_popup_arrow.png
new file mode 100755 (executable)
index 0000000..1644c53
Binary files /dev/null and b/res/images/white/common/T01-2_popup_arrow.png differ
diff --git a/res/images/white/common/T01-2_popup_bg.png b/res/images/white/common/T01-2_popup_bg.png
new file mode 100755 (executable)
index 0000000..aa3a361
Binary files /dev/null and b/res/images/white/common/T01-2_popup_bg.png differ
diff --git a/res/images/white/common/T01-2_popup_btn_bg.png b/res/images/white/common/T01-2_popup_btn_bg.png
new file mode 100755 (executable)
index 0000000..e86b399
Binary files /dev/null and b/res/images/white/common/T01-2_popup_btn_bg.png differ
diff --git a/res/images/white/common/T01-2_popup_btn_bg2.9.png b/res/images/white/common/T01-2_popup_btn_bg2.9.png
new file mode 100755 (executable)
index 0000000..53427eb
Binary files /dev/null and b/res/images/white/common/T01-2_popup_btn_bg2.9.png differ
diff --git a/res/images/white/common/T01-2_popup_btn_normal.png b/res/images/white/common/T01-2_popup_btn_normal.png
new file mode 100755 (executable)
index 0000000..c4be89a
Binary files /dev/null and b/res/images/white/common/T01-2_popup_btn_normal.png differ
diff --git a/res/images/white/common/T01-2_popup_btn_press_bottom.png b/res/images/white/common/T01-2_popup_btn_press_bottom.png
new file mode 100755 (executable)
index 0000000..c62a838
Binary files /dev/null and b/res/images/white/common/T01-2_popup_btn_press_bottom.png differ
diff --git a/res/images/white/common/T01-2_popup_btn_press_middle.png b/res/images/white/common/T01-2_popup_btn_press_middle.png
new file mode 100755 (executable)
index 0000000..f60efb0
Binary files /dev/null and b/res/images/white/common/T01-2_popup_btn_press_middle.png differ
diff --git a/res/images/white/common/T01-2_popup_btn_press_top.png b/res/images/white/common/T01-2_popup_btn_press_top.png
new file mode 100755 (executable)
index 0000000..6da7da9
Binary files /dev/null and b/res/images/white/common/T01-2_popup_btn_press_top.png differ
diff --git a/res/images/white/common/T01-2_popup_divider.png b/res/images/white/common/T01-2_popup_divider.png
new file mode 100755 (executable)
index 0000000..16ceb28
Binary files /dev/null and b/res/images/white/common/T01-2_popup_divider.png differ
diff --git a/res/images/white/common/T01-2_title_btn_bg.png b/res/images/white/common/T01-2_title_btn_bg.png
new file mode 100755 (executable)
index 0000000..fe53ace
Binary files /dev/null and b/res/images/white/common/T01-2_title_btn_bg.png differ
diff --git a/res/images/white/common/T01-2_title_btn_bg_press_01.png b/res/images/white/common/T01-2_title_btn_bg_press_01.png
new file mode 100755 (executable)
index 0000000..c74d762
Binary files /dev/null and b/res/images/white/common/T01-2_title_btn_bg_press_01.png differ
diff --git a/res/images/white/common/T01-2_title_btn_bg_press_02.png b/res/images/white/common/T01-2_title_btn_bg_press_02.png
new file mode 100755 (executable)
index 0000000..4c56281
Binary files /dev/null and b/res/images/white/common/T01-2_title_btn_bg_press_02.png differ
diff --git a/res/images/white/control/T01-2_icon_toolbar_next.png b/res/images/white/control/T01-2_icon_toolbar_next.png
new file mode 100755 (executable)
index 0000000..e29bc4c
Binary files /dev/null and b/res/images/white/control/T01-2_icon_toolbar_next.png differ
diff --git a/res/images/white/control/T01-2_icon_toolbar_pause.png b/res/images/white/control/T01-2_icon_toolbar_pause.png
new file mode 100755 (executable)
index 0000000..cd95fae
Binary files /dev/null and b/res/images/white/control/T01-2_icon_toolbar_pause.png differ
diff --git a/res/images/white/control/T01-2_icon_toolbar_play.png b/res/images/white/control/T01-2_icon_toolbar_play.png
new file mode 100755 (executable)
index 0000000..e939a59
Binary files /dev/null and b/res/images/white/control/T01-2_icon_toolbar_play.png differ
diff --git a/res/images/white/control/T01-2_icon_toolbar_previous.png b/res/images/white/control/T01-2_icon_toolbar_previous.png
new file mode 100755 (executable)
index 0000000..0c19cc0
Binary files /dev/null and b/res/images/white/control/T01-2_icon_toolbar_previous.png differ
diff --git a/res/images/white/control/T01-2_icon_toolbar_stop.png b/res/images/white/control/T01-2_icon_toolbar_stop.png
new file mode 100755 (executable)
index 0000000..d2ce746
Binary files /dev/null and b/res/images/white/control/T01-2_icon_toolbar_stop.png differ
diff --git a/res/images/white/panel/T01-2_btn_toolbar_back.png b/res/images/white/panel/T01-2_btn_toolbar_back.png
new file mode 100755 (executable)
index 0000000..e58ce84
Binary files /dev/null and b/res/images/white/panel/T01-2_btn_toolbar_back.png differ
diff --git a/res/images/white/panel/T01-2_btn_toolbar_volume.png b/res/images/white/panel/T01-2_btn_toolbar_volume.png
new file mode 100755 (executable)
index 0000000..f7c10e8
Binary files /dev/null and b/res/images/white/panel/T01-2_btn_toolbar_volume.png differ
diff --git a/res/po/CMakeLists.txt b/res/po/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..407cb2b
--- /dev/null
@@ -0,0 +1,23 @@
+# for i18n
+
+SET(POFILES el_GR.po es_ES.po it_IT.po ko_KR.po pt_PT.po tr_TR.po zh_HK.po de_DE.po en.po fr_FR.po ja_JP.po nl_NL.po ru_RU.po zh_CN.po zh_TW.po)
+SET(MSGFMT "/usr/bin/msgfmt")
+
+FOREACH(pofile ${POFILES})
+       SET(pofile ${CMAKE_CURRENT_SOURCE_DIR}/${pofile})
+       MESSAGE("PO: ${pofile}")
+       GET_FILENAME_COMPONENT(absPofile ${pofile} ABSOLUTE)
+       GET_FILENAME_COMPONENT(lang ${absPofile} NAME_WE)
+       SET(moFile ${CMAKE_CURRENT_BINARY_DIR}/${lang}.mo)
+       ADD_CUSTOM_COMMAND(
+                       OUTPUT ${moFile}
+                       COMMAND ${MSGFMT} -o ${moFile} ${absPofile}
+                       DEPENDS ${absPofile}
+       )
+       INSTALL(FILES ${moFile}
+                       DESTINATION ${LOCALEDIR}/${lang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo)
+       SET(moFiles ${moFiles} ${moFile})
+ENDFOREACH(pofile)
+
+MESSAGE(".mo files: ${moFiles}")
+ADD_CUSTOM_TARGET(po ALL DEPENDS ${moFiles})
diff --git a/res/po/POTFILES.in b/res/po/POTFILES.in
new file mode 100755 (executable)
index 0000000..eb1a31e
--- /dev/null
@@ -0,0 +1,2 @@
+# List of source files containing translatable strings.
+PlayViewCtrl.c
diff --git a/res/po/de_DE.po b/res/po/de_DE.po
new file mode 100755 (executable)
index 0000000..c000c40
--- /dev/null
@@ -0,0 +1,198 @@
+msgid "IDS_VPL_BODY_ALREADY_EXISTS"
+msgstr "Bereits vorhanden"
+
+msgid "IDS_VPL_BODY_BLUETOOTH_STEREO_HEADSET_DISCONNECTED"
+msgstr "Verbindung mit Bluetooth-Stereo-Headset getrennt"
+
+msgid "IDS_VPL_BODY_DRM_FILE_NOT_SUPPORTED_EXCEPT_FOR_FORWARD_LOCK_TYPE"
+msgstr "DRM-Datei nur für Typ Sperre weiterl. unterstützt"
+
+msgid "IDS_VPL_BODY_NEW_TAG"
+msgstr "Neues Tag"
+
+msgid "IDS_VPL_BODY_ORIGINAL"
+msgstr "Original"
+
+msgid "IDS_VPL_BODY_PLAY_IN_SILENT_MODE_Q"
+msgstr "Im Stumm-Modus abspielen?"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_DRM_FILE"
+msgstr "DRM-Datei kann nicht wiedergegeben werden"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_SEND_THIS_ITEM_IS_FORWARD_LOCKED"
+msgstr "Senden nicht möglich. Dieses Element ist gegen Weiterleitung gesperrt."
+
+msgid "IDS_VPL_BODY_UNSUPPORTED_DIVX_DRM_VERSION"
+msgstr "Nicht unterstützte DivX® DRM-Version"
+
+msgid "IDS_VPL_BUTTON_BOOKMARK"
+msgstr "Lesezeichen"
+
+msgid "IDS_VPL_BUTTON_DONE"
+msgstr "Fertig"
+
+msgid "IDS_VPL_HEADER_FAVOURITE"
+msgstr "Favorit"
+
+msgid "IDS_VPL_MBODY_DETAILS_ABB"
+msgstr "Details"
+
+msgid "IDS_VPL_MBODY_RESOLUTION"
+msgstr "Auflösung"
+
+msgid "IDS_VPL_OPT_ADD_BOOKMARK"
+msgstr "Favorit hinzufügen"
+
+msgid "IDS_VPL_OPT_ALLSHARE"
+msgstr "AllShare"
+
+msgid "IDS_VPL_OPT_MESSAGE"
+msgstr "Nachricht"
+
+msgid "IDS_VPL_OPT_NAME"
+msgstr "Name"
+
+msgid "IDS_VPL_OPT_ON_ALLSHARE_ABB"
+msgstr "Auf AllShare"
+
+msgid "IDS_VPL_OPT_TRIM_AS_NEW_VIDEO_ABB"
+msgstr "Als neues Video zuschn."
+
+msgid "IDS_VPL_OPT_TRIM_ORIGINAL_VIDEO_ABB"
+msgstr "Originalvideo zuschneiden"
+
+msgid "IDS_VPL_POP_ACCOUNT"
+msgstr "Konto"
+
+msgid "IDS_VPL_POP_ADD_SHORTCUT"
+msgstr "Shortcut hinzufügen"
+
+msgid "IDS_VPL_POP_ADD_TAG"
+msgstr "Tag hzfg."
+
+msgid "IDS_VPL_POP_BOOKMARK_LIST_FULL_DELETE_SOME_BOOKMARKS"
+msgstr "Favoritenliste voll. Löschen Sie einige Favoriten"
+
+msgid "IDS_VPL_POP_DISCONNECTED_FROM_SERVER"
+msgstr "Verbindung zum Server getrennt"
+
+msgid "IDS_VPL_POP_GATEWAY_TIME_OUT"
+msgstr "Gateway-Timeout"
+
+msgid "IDS_VPL_POP_INTERNAL_SERVER_ERROR"
+msgstr "Interner Serverfehler"
+
+msgid "IDS_VPL_POP_LICENCE_EXPIRED"
+msgstr "Lizenz abgelaufen"
+
+msgid "IDS_VPL_POP_LOADING_ING"
+msgstr "Ladevorgang läuft..."
+
+msgid "IDS_VPL_POP_NO_FILES"
+msgstr "Keine Dateien"
+
+msgid "IDS_VPL_POP_OUT_OF_MEMORIES"
+msgstr "Kein Speicher mehr"
+
+msgid "IDS_VPL_POP_SAVE_AS"
+msgstr "Speichern unter"
+
+msgid "IDS_VPL_POP_TO_PLAY_DIVX_PROTECTED_VIDEOS_YOUR_DEVICE_MUST_BE_REGISTERED_REGISTRATION_CODE_C_PS_REGISTER_AT_HTTP_C_VODDIVXCOM_DIVX"
+msgstr "Um DivX® geschützte Videos wiederzugeben, muss Ihr Gerät registriert sein. Registrierungs Code: %s. Registrieren Sie es unter http://vod.divx.com"
+
+msgid "IDS_VPL_POP_TRIMMING_VIDEO_ING"
+msgstr "Video wird gekürzt..."
+
+msgid "IDS_VPL_POP_UNABLE_TO_CONNECT"
+msgstr "Verbinden nicht möglich"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_INVALID_PACKET_FROM_SERVER"
+msgstr "Wiedergabe nicht möglich. Ungültiges Paket vom Server"
+
+msgid "IDS_VPL_POP_UNAUTHORIZED_VIDEO_OUTPUT_PLEASE_USE_ANALOG_OUTPUT_TO_VIEW_THIS_DIVX_PROTECTED_VIDEO_DIVIX"
+msgstr "Nicht autorisierter Videoausgang. Verwenden Sie den analogen Ausgang, um dieses DivX® geschützte Video anzusehen."
+
+msgid "IDS_VPL_POP_UNAUTHORIZED_VIDEO_OUTPUT_PLEASE_USE_HDMI_TO_VIEW_THIS_DIVX_PROTECTED_VIDEO_DIVIX"
+msgstr "Nicht autorisierter Videoausgang. Verwenden Sie HDMI, um dieses DivX® geschützte Video anzusehen."
+
+msgid "IDS_VPL_POP_YOUR_DEVICE_IS_NOT_AUTHORIZED_TO_PLAY_THIS_DIVX_PROTECTED_VIDEO_DIVX"
+msgstr "Ihr Gerät ist nicht autorisiert, dieses kopiergeschützte DivX® Video abzuspielen."
+
+msgid "IDS_VPL_SK3_TRIM"
+msgstr "Zu-\nschneiden"
+
+msgid "IDS_VPL_HEADER_VIDEO_PLAYER"
+msgstr "Video-Player"
+
+msgid "IDS_VPL_POP_NO_MEDIA_FILE"
+msgstr "Keine Mediendatei"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_VIDEO_ERROR_OCCURRED"
+msgstr "Video kann nicht wiedergegeben werden. Fehler aufgetreten."
+
+msgid "IDS_VPL_BODY_FILE_SIZE"
+msgstr "Dateigröße"
+
+msgid "IDS_VPL_BUTTON_TRIM"
+msgstr "Zuschnei."
+
+msgid "IDS_VPL_HEADER_SHARE_VIDEO_ABB"
+msgstr "Video freig."
+
+msgid "IDS_VPL_HEADER_VIDEO_LIST"
+msgstr "Videoliste"
+
+msgid "IDS_VPL_OPT_KEEP_ASPECT_RATIO"
+msgstr "Bildseitenformat beibehalten"
+
+msgid "IDS_VPL_OPT_SET_AS"
+msgstr "Einstellen als"
+
+msgid "IDS_VPL_OPT_SUBTITLES"
+msgstr "Untertitel"
+
+msgid "IDS_VPL_POP_UNABLE_TO_FIND_FILE"
+msgstr "Datei kann nicht gefunden werden"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_VIDEO_INVALID_STREAMING_DATA"
+msgstr "Video kann nicht wiedergegeben werden. Ungültige Streamingdaten"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_AUDIO_FORMAT"
+msgstr "Nicht unterstütztes Audioformat"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_FILE_TYPE"
+msgstr "Nicht unterstützter Dateityp"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_FORMAT"
+msgstr "Nicht unterst. F."
+
+msgid "IDS_VPL_POP_UNSUPPORTED_VIDEO_FORMAT"
+msgstr "Nicht unterstütztes Videoformat"
+
+msgid "IDS_VPL_OPT_RESOLUTION"
+msgstr "Auflösung"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL"
+msgstr "Video kann während eines Anrufs nicht wiedergegeben werden"
+
+msgid "IDS_VPL_OPT_NORMAL"
+msgstr "Normal"
+
+msgid "IDS_VPL_BODY_VOICE_M_SOUNDEFFECT"
+msgstr "Aufnahme"
+
+msgid "IDS_VPL_BODY_MOVIE_M_SOUNDEFFECT"
+msgstr "Video"
+
+msgid "IDS_VPL_BODY_51CH_M_SOUNDEFFECT"
+msgstr "7.1-Kanal"
+
+msgid "IDS_VPL_POP_51_CHANNEL_SOUND_EFFECT_WORKS_IN_EARPHONE_MODE_ONLY"
+msgstr "7.1-Sound-Effekte nur im Kopfhörer-Modus möglich"
+
+msgid "IDS_VPL_BODY_LATITUDE"
+msgstr "Breite"
+
+msgid "IDS_VPL_BODY_LONGITUDE"
+msgstr "Länge"
+
diff --git a/res/po/el_GR.po b/res/po/el_GR.po
new file mode 100755 (executable)
index 0000000..e3e9716
--- /dev/null
@@ -0,0 +1,198 @@
+msgid "IDS_VPL_BODY_ALREADY_EXISTS"
+msgstr "Υπάρχει ήδη"
+
+msgid "IDS_VPL_BODY_BLUETOOTH_STEREO_HEADSET_DISCONNECTED"
+msgstr "Το κύριο στερεοφωνικό σετ ακουστικών Bluetooth αποσυνδέθηκε"
+
+msgid "IDS_VPL_BODY_DRM_FILE_NOT_SUPPORTED_EXCEPT_FOR_FORWARD_LOCK_TYPE"
+msgstr "Το αρχείο DRM υποστηρ. μόνο για κλείδωμα προώθησης"
+
+msgid "IDS_VPL_BODY_NEW_TAG"
+msgstr "Νέα ετικέτα"
+
+msgid "IDS_VPL_BODY_ORIGINAL"
+msgstr "Αρχικό"
+
+msgid "IDS_VPL_BODY_PLAY_IN_SILENT_MODE_Q"
+msgstr "Αναπαραγωγή σε αθόρυβη λειτουργία;"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_DRM_FILE"
+msgstr "Δεν είναι δυνατή η αναπαραγωγή του αρχείου DRM"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_SEND_THIS_ITEM_IS_FORWARD_LOCKED"
+msgstr "Δεν είναι δυνατή η αποστολή. Έχει απενεργοποιηθεί η δυνατότητα προώθησης"
+
+msgid "IDS_VPL_BODY_UNSUPPORTED_DIVX_DRM_VERSION"
+msgstr "Μη υποστηριζόμενη έκδοση DivX DRM"
+
+msgid "IDS_VPL_BUTTON_BOOKMARK"
+msgstr "Σελιδοδείκτης"
+
+msgid "IDS_VPL_BUTTON_DONE"
+msgstr "Τέλος"
+
+msgid "IDS_VPL_HEADER_FAVOURITE"
+msgstr "Αγαπημένα"
+
+msgid "IDS_VPL_MBODY_DETAILS_ABB"
+msgstr "Λεπτομέρειες"
+
+msgid "IDS_VPL_MBODY_RESOLUTION"
+msgstr "Ανάλυση"
+
+msgid "IDS_VPL_OPT_ADD_BOOKMARK"
+msgstr "Προσθήκη σελιδοδείκτη"
+
+msgid "IDS_VPL_OPT_ALLSHARE"
+msgstr "AllShare"
+
+msgid "IDS_VPL_OPT_MESSAGE"
+msgstr "Μήνυμα"
+
+msgid "IDS_VPL_OPT_NAME"
+msgstr "Όνομα"
+
+msgid "IDS_VPL_OPT_ON_ALLSHARE_ABB"
+msgstr "Στο AllShare"
+
+msgid "IDS_VPL_OPT_TRIM_AS_NEW_VIDEO_ABB"
+msgstr "Περικοπή ως νέο βίντεο"
+
+msgid "IDS_VPL_OPT_TRIM_ORIGINAL_VIDEO_ABB"
+msgstr "Περικοπή αρχικού βίντεο"
+
+msgid "IDS_VPL_POP_ACCOUNT"
+msgstr "Λογαριασμός"
+
+msgid "IDS_VPL_POP_ADD_SHORTCUT"
+msgstr "Προσθήκη συντόμευσης"
+
+msgid "IDS_VPL_POP_ADD_TAG"
+msgstr "Πρ. ετικ."
+
+msgid "IDS_VPL_POP_BOOKMARK_LIST_FULL_DELETE_SOME_BOOKMARKS"
+msgstr "Η λίστα σελιδοδεικτών είναι πλήρης. Θέλετε να διαγράψετε μερικούς σελιδοδείκτες"
+
+msgid "IDS_VPL_POP_DISCONNECTED_FROM_SERVER"
+msgstr "Αποσυνδέθηκε από τον διακομιστή"
+
+msgid "IDS_VPL_POP_GATEWAY_TIME_OUT"
+msgstr "Λήξη χρονικού ορίου για πύλη"
+
+msgid "IDS_VPL_POP_INTERNAL_SERVER_ERROR"
+msgstr "Σφάλμα"
+
+msgid "IDS_VPL_POP_LICENCE_EXPIRED"
+msgstr "Η άδεια χρήσης έχει λήξει"
+
+msgid "IDS_VPL_POP_LOADING_ING"
+msgstr "Φόρτωση..."
+
+msgid "IDS_VPL_POP_NO_FILES"
+msgstr "Δεν βρέθηκαν αρχεία"
+
+msgid "IDS_VPL_POP_OUT_OF_MEMORIES"
+msgstr "Η μνήμη εξαντλήθηκε"
+
+msgid "IDS_VPL_POP_SAVE_AS"
+msgstr "Αποθήκευση ως"
+
+msgid "IDS_VPL_POP_TO_PLAY_DIVX_PROTECTED_VIDEOS_YOUR_DEVICE_MUST_BE_REGISTERED_REGISTRATION_CODE_C_PS_REGISTER_AT_HTTP_C_VODDIVXCOM_DIVX"
+msgstr "Για την αναπαραγωγή προστατευμένων βίντεο DivX, η συσκευή σας πρέπει να είναι εγγεγραμμένη. Κωδικός εγγραφής: %s. Κάντε εγγραφή στη διεύθυνση http://vod.divx.com"
+
+msgid "IDS_VPL_POP_TRIMMING_VIDEO_ING"
+msgstr "Περικοπή βίντεο..."
+
+msgid "IDS_VPL_POP_UNABLE_TO_CONNECT"
+msgstr "Δεν είναι δυνατή η σύνδεση"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_INVALID_PACKET_FROM_SERVER"
+msgstr "Δεν είναι δυνατή η αναπαραγωγή. Μη έγκυρο πακέτο από διακομιστή"
+
+msgid "IDS_VPL_POP_UNAUTHORIZED_VIDEO_OUTPUT_PLEASE_USE_ANALOG_OUTPUT_TO_VIEW_THIS_DIVX_PROTECTED_VIDEO_DIVIX"
+msgstr "Μη εξουσιοδοτημένη έξοδος βίντεο. Χρησιμοποιήστε την αναλογική έξοδο για να προβάλλετε αυτό το προστατευμένο βίντεο DivX"
+
+msgid "IDS_VPL_POP_UNAUTHORIZED_VIDEO_OUTPUT_PLEASE_USE_HDMI_TO_VIEW_THIS_DIVX_PROTECTED_VIDEO_DIVIX"
+msgstr "Μη εξουσιοδοτημένη έξοδος βίντεο. Χρησιμοποιήστε HDMI για να προβάλλετε αυτό το προστατευμένο βίντεο DivX"
+
+msgid "IDS_VPL_POP_YOUR_DEVICE_IS_NOT_AUTHORIZED_TO_PLAY_THIS_DIVX_PROTECTED_VIDEO_DIVX"
+msgstr "Η συσκευή σας δεν έχει εξουσιοδότηση για αναπαραγωγή αυτού του προστατευμένου βίντεο DivX®"
+
+msgid "IDS_VPL_SK3_TRIM"
+msgstr "Ξάκρισμα"
+
+msgid "IDS_VPL_HEADER_VIDEO_PLAYER"
+msgstr "Βίντεο"
+
+msgid "IDS_VPL_POP_NO_MEDIA_FILE"
+msgstr "Δεν βρέθηκε αρχείο μέσων"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_VIDEO_ERROR_OCCURRED"
+msgstr "Δεν είναι δυνατή η αναπαραγωγή βίντεο. Προέκυψε σφάλμα"
+
+msgid "IDS_VPL_BODY_FILE_SIZE"
+msgstr "Μέγεθος αρχείου"
+
+msgid "IDS_VPL_BUTTON_TRIM"
+msgstr "Κόψιμο"
+
+msgid "IDS_VPL_HEADER_SHARE_VIDEO_ABB"
+msgstr "Κοινή χρ.βίν."
+
+msgid "IDS_VPL_HEADER_VIDEO_LIST"
+msgstr "Λίστα βίντεο"
+
+msgid "IDS_VPL_OPT_KEEP_ASPECT_RATIO"
+msgstr "Διατήρηση αναλογίας εικόνας"
+
+msgid "IDS_VPL_OPT_SET_AS"
+msgstr "Ορισμός ως"
+
+msgid "IDS_VPL_OPT_SUBTITLES"
+msgstr "Υπότιτλοι"
+
+msgid "IDS_VPL_POP_UNABLE_TO_FIND_FILE"
+msgstr "Δεν είναι δυνατή η εύρεση του αρχείου"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_VIDEO_INVALID_STREAMING_DATA"
+msgstr "Δεν είναι δυνατή η αναπαραγωγή βίντεο. Μη έγκυρα δεδομένα ροής"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_AUDIO_FORMAT"
+msgstr "Μη υποστηριζόμενη μορφή ήχου"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_FILE_TYPE"
+msgstr "Μη υποστηριζόμενος τύπος αρχείου"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_FORMAT"
+msgstr "Μη υποστ. μορφή"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_VIDEO_FORMAT"
+msgstr "Μη υποστηριζόμενη μορφή βίντεο"
+
+msgid "IDS_VPL_OPT_RESOLUTION"
+msgstr "Ανάλυση"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL"
+msgstr "Δεν είναι δυνατή η αναπαραγωγή βίντεο κατά την κλήση"
+
+msgid "IDS_VPL_OPT_NORMAL"
+msgstr "Κανονικό"
+
+msgid "IDS_VPL_BODY_VOICE_M_SOUNDEFFECT"
+msgstr "Φωνή"
+
+msgid "IDS_VPL_BODY_MOVIE_M_SOUNDEFFECT"
+msgstr "Ταινία"
+
+msgid "IDS_VPL_BODY_51CH_M_SOUNDEFFECT"
+msgstr "7.1 καν."
+
+msgid "IDS_VPL_POP_51_CHANNEL_SOUND_EFFECT_WORKS_IN_EARPHONE_MODE_ONLY"
+msgstr "Τo εφέ ήχων του καναλιού 7.1 εκτελείται μ  στη λειτουργία ακουστικών"
+
+msgid "IDS_VPL_BODY_LATITUDE"
+msgstr "Γεωγραφικό πλάτος"
+
+msgid "IDS_VPL_BODY_LONGITUDE"
+msgstr "Γεωγραφικό μήκος"
+
diff --git a/res/po/en.po b/res/po/en.po
new file mode 100755 (executable)
index 0000000..e39a146
--- /dev/null
@@ -0,0 +1,198 @@
+msgid "IDS_VPL_BODY_ALREADY_EXISTS"
+msgstr "Already exists"
+
+msgid "IDS_VPL_BODY_BLUETOOTH_STEREO_HEADSET_DISCONNECTED"
+msgstr "Bluetooth stereo headset disconnected"
+
+msgid "IDS_VPL_BODY_DRM_FILE_NOT_SUPPORTED_EXCEPT_FOR_FORWARD_LOCK_TYPE"
+msgstr "DRM file not supported except for forward lock type"
+
+msgid "IDS_VPL_BODY_NEW_TAG"
+msgstr "New tag"
+
+msgid "IDS_VPL_BODY_ORIGINAL"
+msgstr "Original"
+
+msgid "IDS_VPL_BODY_PLAY_IN_SILENT_MODE_Q"
+msgstr "Play in Silent mode?"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_DRM_FILE"
+msgstr "Unable to play DRM file"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_SEND_THIS_ITEM_IS_FORWARD_LOCKED"
+msgstr "Unable to send. This item is forward-locked"
+
+msgid "IDS_VPL_BODY_UNSUPPORTED_DIVX_DRM_VERSION"
+msgstr "Unsupported DivX DRM version"
+
+msgid "IDS_VPL_BUTTON_BOOKMARK"
+msgstr "Bookmark"
+
+msgid "IDS_VPL_BUTTON_DONE"
+msgstr "Done"
+
+msgid "IDS_VPL_HEADER_FAVOURITE"
+msgstr "Favourite"
+
+msgid "IDS_VPL_MBODY_DETAILS_ABB"
+msgstr "Details"
+
+msgid "IDS_VPL_MBODY_RESOLUTION"
+msgstr "Resolution"
+
+msgid "IDS_VPL_OPT_ADD_BOOKMARK"
+msgstr "Add bookmark"
+
+msgid "IDS_VPL_OPT_ALLSHARE"
+msgstr "AllShare"
+
+msgid "IDS_VPL_OPT_MESSAGE"
+msgstr "Message"
+
+msgid "IDS_VPL_OPT_NAME"
+msgstr "Name"
+
+msgid "IDS_VPL_OPT_ON_ALLSHARE_ABB"
+msgstr "On AllShare"
+
+msgid "IDS_VPL_OPT_TRIM_AS_NEW_VIDEO_ABB"
+msgstr "Trim as new video"
+
+msgid "IDS_VPL_OPT_TRIM_ORIGINAL_VIDEO_ABB"
+msgstr "Trim original video"
+
+msgid "IDS_VPL_POP_ACCOUNT"
+msgstr "Account"
+
+msgid "IDS_VPL_POP_ADD_SHORTCUT"
+msgstr "Add shortcut"
+
+msgid "IDS_VPL_POP_ADD_TAG"
+msgstr "Add tag"
+
+msgid "IDS_VPL_POP_BOOKMARK_LIST_FULL_DELETE_SOME_BOOKMARKS"
+msgstr "Bookmark list full. Delete some bookmarks"
+
+msgid "IDS_VPL_POP_DISCONNECTED_FROM_SERVER"
+msgstr "Disconnected from server"
+
+msgid "IDS_VPL_POP_GATEWAY_TIME_OUT"
+msgstr "Gateway timeout"
+
+msgid "IDS_VPL_POP_INTERNAL_SERVER_ERROR"
+msgstr "Internal server error"
+
+msgid "IDS_VPL_POP_LICENCE_EXPIRED"
+msgstr "Licence expired"
+
+msgid "IDS_VPL_POP_LOADING_ING"
+msgstr "Loading..."
+
+msgid "IDS_VPL_POP_NO_FILES"
+msgstr "No files"
+
+msgid "IDS_VPL_POP_OUT_OF_MEMORIES"
+msgstr "Out of memories"
+
+msgid "IDS_VPL_POP_SAVE_AS"
+msgstr "Save as"
+
+msgid "IDS_VPL_POP_TO_PLAY_DIVX_PROTECTED_VIDEOS_YOUR_DEVICE_MUST_BE_REGISTERED_REGISTRATION_CODE_C_PS_REGISTER_AT_HTTP_C_VODDIVXCOM_DIVX"
+msgstr "To play DivX locked videos, your device must be registered. Registration code: %s Register at http://vod.divx.com"
+
+msgid "IDS_VPL_POP_TRIMMING_VIDEO_ING"
+msgstr "Trimming video..."
+
+msgid "IDS_VPL_POP_UNABLE_TO_CONNECT"
+msgstr "Unable to connect"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_INVALID_PACKET_FROM_SERVER"
+msgstr "Unable to play. Invalid packet from server"
+
+msgid "IDS_VPL_POP_UNAUTHORIZED_VIDEO_OUTPUT_PLEASE_USE_ANALOG_OUTPUT_TO_VIEW_THIS_DIVX_PROTECTED_VIDEO_DIVIX"
+msgstr "Unauthorized Video Output. Please use Analog output to view this DivX Protected video"
+
+msgid "IDS_VPL_POP_UNAUTHORIZED_VIDEO_OUTPUT_PLEASE_USE_HDMI_TO_VIEW_THIS_DIVX_PROTECTED_VIDEO_DIVIX"
+msgstr "Unauthorized Video Output. Please use HDMI to view this DivX Protected video"
+
+msgid "IDS_VPL_POP_YOUR_DEVICE_IS_NOT_AUTHORIZED_TO_PLAY_THIS_DIVX_PROTECTED_VIDEO_DIVX"
+msgstr "Your device is not authorized to play this DivX® protected video."
+
+msgid "IDS_VPL_SK3_TRIM"
+msgstr "Trim"
+
+msgid "IDS_VPL_HEADER_VIDEO_PLAYER"
+msgstr "Video player"
+
+msgid "IDS_VPL_POP_NO_MEDIA_FILE"
+msgstr "No media file"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_VIDEO_ERROR_OCCURRED"
+msgstr "Unable to play video. Error occurred"
+
+msgid "IDS_VPL_BODY_FILE_SIZE"
+msgstr "File size"
+
+msgid "IDS_VPL_BUTTON_TRIM"
+msgstr "Trim"
+
+msgid "IDS_VPL_HEADER_SHARE_VIDEO_ABB"
+msgstr "Share video"
+
+msgid "IDS_VPL_HEADER_VIDEO_LIST"
+msgstr "Video list"
+
+msgid "IDS_VPL_OPT_KEEP_ASPECT_RATIO"
+msgstr "Keep aspect ratio"
+
+msgid "IDS_VPL_OPT_SET_AS"
+msgstr "Set as"
+
+msgid "IDS_VPL_OPT_SUBTITLES"
+msgstr "Subtitles"
+
+msgid "IDS_VPL_POP_UNABLE_TO_FIND_FILE"
+msgstr "Unable to find file"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_VIDEO_INVALID_STREAMING_DATA"
+msgstr "Unable to play video. Invalid streaming data"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_AUDIO_FORMAT"
+msgstr "Unsupported audio format"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_FILE_TYPE"
+msgstr "Unsupported file type"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_FORMAT"
+msgstr "Unsupported format"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_VIDEO_FORMAT"
+msgstr "Unsupported video format"
+
+msgid "IDS_VPL_OPT_RESOLUTION"
+msgstr "Resolution"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL"
+msgstr "Unable to play video during call"
+
+msgid "IDS_VPL_OPT_NORMAL"
+msgstr "Normal"
+
+msgid "IDS_VPL_BODY_VOICE_M_SOUNDEFFECT"
+msgstr "Voice"
+
+msgid "IDS_VPL_BODY_MOVIE_M_SOUNDEFFECT"
+msgstr "Movie"
+
+msgid "IDS_VPL_BODY_51CH_M_SOUNDEFFECT"
+msgstr "7.1ch"
+
+msgid "IDS_VPL_POP_51_CHANNEL_SOUND_EFFECT_WORKS_IN_EARPHONE_MODE_ONLY"
+msgstr "7.1 channel sound effect works in earphone mode only"
+
+msgid "IDS_VPL_BODY_LATITUDE"
+msgstr "Latitude"
+
+msgid "IDS_VPL_BODY_LONGITUDE"
+msgstr "Longitude"
+
diff --git a/res/po/es_ES.po b/res/po/es_ES.po
new file mode 100755 (executable)
index 0000000..89ad5c6
--- /dev/null
@@ -0,0 +1,198 @@
+msgid "IDS_VPL_BODY_ALREADY_EXISTS"
+msgstr "Ya existe"
+
+msgid "IDS_VPL_BODY_BLUETOOTH_STEREO_HEADSET_DISCONNECTED"
+msgstr "Auricular estéreo Bluetooth desconectado"
+
+msgid "IDS_VPL_BODY_DRM_FILE_NOT_SUPPORTED_EXCEPT_FOR_FORWARD_LOCK_TYPE"
+msgstr "Archivo DRM incompat, salvo para tipo bloq reenvío"
+
+msgid "IDS_VPL_BODY_NEW_TAG"
+msgstr "Nueva etiqueta"
+
+msgid "IDS_VPL_BODY_ORIGINAL"
+msgstr "Original"
+
+msgid "IDS_VPL_BODY_PLAY_IN_SILENT_MODE_Q"
+msgstr "¿Reproducir en modo silencio?"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_DRM_FILE"
+msgstr "No se puede reproducir archivo DRM"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_SEND_THIS_ITEM_IS_FORWARD_LOCKED"
+msgstr "Imposible enviar. Este elemento está bloqueado para el reenvío."
+
+msgid "IDS_VPL_BODY_UNSUPPORTED_DIVX_DRM_VERSION"
+msgstr "Versión DivX DRM no admitida"
+
+msgid "IDS_VPL_BUTTON_BOOKMARK"
+msgstr "Favorito"
+
+msgid "IDS_VPL_BUTTON_DONE"
+msgstr "Finalizado"
+
+msgid "IDS_VPL_HEADER_FAVOURITE"
+msgstr "Favorito"
+
+msgid "IDS_VPL_MBODY_DETAILS_ABB"
+msgstr "Detalles"
+
+msgid "IDS_VPL_MBODY_RESOLUTION"
+msgstr "Resolución"
+
+msgid "IDS_VPL_OPT_ADD_BOOKMARK"
+msgstr "Añadir elemento favorito"
+
+msgid "IDS_VPL_OPT_ALLSHARE"
+msgstr "AllShare"
+
+msgid "IDS_VPL_OPT_MESSAGE"
+msgstr "Mensajes"
+
+msgid "IDS_VPL_OPT_NAME"
+msgstr "Nombre"
+
+msgid "IDS_VPL_OPT_ON_ALLSHARE_ABB"
+msgstr "En AllShare"
+
+msgid "IDS_VPL_OPT_TRIM_AS_NEW_VIDEO_ABB"
+msgstr "Recortar como vídeo nuevo"
+
+msgid "IDS_VPL_OPT_TRIM_ORIGINAL_VIDEO_ABB"
+msgstr "Recortar vídeo original"
+
+msgid "IDS_VPL_POP_ACCOUNT"
+msgstr "Cuenta"
+
+msgid "IDS_VPL_POP_ADD_SHORTCUT"
+msgstr "Agregar acceso directo"
+
+msgid "IDS_VPL_POP_ADD_TAG"
+msgstr "Añad etiq"
+
+msgid "IDS_VPL_POP_BOOKMARK_LIST_FULL_DELETE_SOME_BOOKMARKS"
+msgstr "Lista de favoritos llena. Elimine algunos favoritos"
+
+msgid "IDS_VPL_POP_DISCONNECTED_FROM_SERVER"
+msgstr "Desconectado del servidor"
+
+msgid "IDS_VPL_POP_GATEWAY_TIME_OUT"
+msgstr "Tiempo de espera de puerta de enlace"
+
+msgid "IDS_VPL_POP_INTERNAL_SERVER_ERROR"
+msgstr "Error interno del servidor"
+
+msgid "IDS_VPL_POP_LICENCE_EXPIRED"
+msgstr "La licencia ha caducado"
+
+msgid "IDS_VPL_POP_LOADING_ING"
+msgstr "Cargando..."
+
+msgid "IDS_VPL_POP_NO_FILES"
+msgstr "Ningún archivo"
+
+msgid "IDS_VPL_POP_OUT_OF_MEMORIES"
+msgstr "Sin memoria"
+
+msgid "IDS_VPL_POP_SAVE_AS"
+msgstr "Guardar como"
+
+msgid "IDS_VPL_POP_TO_PLAY_DIVX_PROTECTED_VIDEOS_YOUR_DEVICE_MUST_BE_REGISTERED_REGISTRATION_CODE_C_PS_REGISTER_AT_HTTP_C_VODDIVXCOM_DIVX"
+msgstr "Para reproducir vídeos DivX protegidos, su dispositivo debe estar registrado. Código de registro: %s. Regístrese en http://vod.divx.com"
+
+msgid "IDS_VPL_POP_TRIMMING_VIDEO_ING"
+msgstr "Recortando vídeo..."
+
+msgid "IDS_VPL_POP_UNABLE_TO_CONNECT"
+msgstr "No se puede conectar"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_INVALID_PACKET_FROM_SERVER"
+msgstr "No se puede reproducir. Paquete no válido procedente del servidor"
+
+msgid "IDS_VPL_POP_UNAUTHORIZED_VIDEO_OUTPUT_PLEASE_USE_ANALOG_OUTPUT_TO_VIEW_THIS_DIVX_PROTECTED_VIDEO_DIVIX"
+msgstr "Salida de vídeo no autorizada. Utilice la salida analógica para ver este vídeo DivX protegido"
+
+msgid "IDS_VPL_POP_UNAUTHORIZED_VIDEO_OUTPUT_PLEASE_USE_HDMI_TO_VIEW_THIS_DIVX_PROTECTED_VIDEO_DIVIX"
+msgstr "Salida de vídeo no autorizada. Utilice HDMI para ver este vídeo DivX protegido"
+
+msgid "IDS_VPL_POP_YOUR_DEVICE_IS_NOT_AUTHORIZED_TO_PLAY_THIS_DIVX_PROTECTED_VIDEO_DIVX"
+msgstr "Su aparato no esta autorizado para reproducir este video de DivX® protegido."
+
+msgid "IDS_VPL_SK3_TRIM"
+msgstr "Recortar"
+
+msgid "IDS_VPL_HEADER_VIDEO_PLAYER"
+msgstr "Vídeos"
+
+msgid "IDS_VPL_POP_NO_MEDIA_FILE"
+msgstr "No hay archivo multimedia"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_VIDEO_ERROR_OCCURRED"
+msgstr "No se puede reproducir vídeo. Se ha producido un error"
+
+msgid "IDS_VPL_BODY_FILE_SIZE"
+msgstr "Tamaño del archivo"
+
+msgid "IDS_VPL_BUTTON_TRIM"
+msgstr "Recortar"
+
+msgid "IDS_VPL_HEADER_SHARE_VIDEO_ABB"
+msgstr "Compart vídeo"
+
+msgid "IDS_VPL_HEADER_VIDEO_LIST"
+msgstr "Lista de vídeos"
+
+msgid "IDS_VPL_OPT_KEEP_ASPECT_RATIO"
+msgstr "Mantener relación de aspecto"
+
+msgid "IDS_VPL_OPT_SET_AS"
+msgstr "Definir como"
+
+msgid "IDS_VPL_OPT_SUBTITLES"
+msgstr "Subtítulos"
+
+msgid "IDS_VPL_POP_UNABLE_TO_FIND_FILE"
+msgstr "No se puede encontrar el archivo"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_VIDEO_INVALID_STREAMING_DATA"
+msgstr "No se puede reproducir vídeo. Datos de streaming no válidos"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_AUDIO_FORMAT"
+msgstr "Formato de audio no compatible"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_FILE_TYPE"
+msgstr "Tipo de archivo no admitido"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_FORMAT"
+msgstr "Formato no admitido"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_VIDEO_FORMAT"
+msgstr "Formato de vídeo no admitido"
+
+msgid "IDS_VPL_OPT_RESOLUTION"
+msgstr "Resolución"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL"
+msgstr "No se puede reproducir vídeo durante la llamada"
+
+msgid "IDS_VPL_OPT_NORMAL"
+msgstr "Normal"
+
+msgid "IDS_VPL_BODY_VOICE_M_SOUNDEFFECT"
+msgstr "Voz"
+
+msgid "IDS_VPL_BODY_MOVIE_M_SOUNDEFFECT"
+msgstr "Película"
+
+msgid "IDS_VPL_BODY_51CH_M_SOUNDEFFECT"
+msgstr "Can. 7.1"
+
+msgid "IDS_VPL_POP_51_CHANNEL_SOUND_EFFECT_WORKS_IN_EARPHONE_MODE_ONLY"
+msgstr "El efecto de sonido del canal 7.1 sólo funciona en modo auricular"
+
+msgid "IDS_VPL_BODY_LATITUDE"
+msgstr "Latitud"
+
+msgid "IDS_VPL_BODY_LONGITUDE"
+msgstr "Longitud"
+
diff --git a/res/po/fr_FR.po b/res/po/fr_FR.po
new file mode 100755 (executable)
index 0000000..ffa675c
--- /dev/null
@@ -0,0 +1,198 @@
+msgid "IDS_VPL_BODY_ALREADY_EXISTS"
+msgstr "Existe déjà"
+
+msgid "IDS_VPL_BODY_BLUETOOTH_STEREO_HEADSET_DISCONNECTED"
+msgstr "Casque stéréo Bluetooth déconnecté"
+
+msgid "IDS_VPL_BODY_DRM_FILE_NOT_SUPPORTED_EXCEPT_FOR_FORWARD_LOCK_TYPE"
+msgstr "Fichier DRM non pris en charge sf contenu protégé"
+
+msgid "IDS_VPL_BODY_NEW_TAG"
+msgstr "Nouveau libellé"
+
+msgid "IDS_VPL_BODY_ORIGINAL"
+msgstr "Original"
+
+msgid "IDS_VPL_BODY_PLAY_IN_SILENT_MODE_Q"
+msgstr "Activer le son ?"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_DRM_FILE"
+msgstr "Impossible de lire le fichier DRM"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_SEND_THIS_ITEM_IS_FORWARD_LOCKED"
+msgstr "Envoi impossible. Le transfert de cet élément est verrouillé"
+
+msgid "IDS_VPL_BODY_UNSUPPORTED_DIVX_DRM_VERSION"
+msgstr "Version DivX® DRM non prise en charge"
+
+msgid "IDS_VPL_BUTTON_BOOKMARK"
+msgstr "Favori"
+
+msgid "IDS_VPL_BUTTON_DONE"
+msgstr "OK"
+
+msgid "IDS_VPL_HEADER_FAVOURITE"
+msgstr "Favori"
+
+msgid "IDS_VPL_MBODY_DETAILS_ABB"
+msgstr "Détails"
+
+msgid "IDS_VPL_MBODY_RESOLUTION"
+msgstr "Résolution"
+
+msgid "IDS_VPL_OPT_ADD_BOOKMARK"
+msgstr "Ajouter un favori"
+
+msgid "IDS_VPL_OPT_ALLSHARE"
+msgstr "AllShare"
+
+msgid "IDS_VPL_OPT_MESSAGE"
+msgstr "Message"
+
+msgid "IDS_VPL_OPT_NAME"
+msgstr "Nom"
+
+msgid "IDS_VPL_OPT_ON_ALLSHARE_ABB"
+msgstr "Sur AllShare"
+
+msgid "IDS_VPL_OPT_TRIM_AS_NEW_VIDEO_ABB"
+msgstr "Rogner comme nouv. vidéo"
+
+msgid "IDS_VPL_OPT_TRIM_ORIGINAL_VIDEO_ABB"
+msgstr "Rogner la vidéo originale"
+
+msgid "IDS_VPL_POP_ACCOUNT"
+msgstr "Compte"
+
+msgid "IDS_VPL_POP_ADD_SHORTCUT"
+msgstr "Ajouter raccourci"
+
+msgid "IDS_VPL_POP_ADD_TAG"
+msgstr "Libellé"
+
+msgid "IDS_VPL_POP_BOOKMARK_LIST_FULL_DELETE_SOME_BOOKMARKS"
+msgstr "Liste de favoris saturée. Supprimer des favoris"
+
+msgid "IDS_VPL_POP_DISCONNECTED_FROM_SERVER"
+msgstr "Déconnecté du serveur"
+
+msgid "IDS_VPL_POP_GATEWAY_TIME_OUT"
+msgstr "Passerelle expirée"
+
+msgid "IDS_VPL_POP_INTERNAL_SERVER_ERROR"
+msgstr "Erreur du serveur interne"
+
+msgid "IDS_VPL_POP_LICENCE_EXPIRED"
+msgstr "Licence expirée"
+
+msgid "IDS_VPL_POP_LOADING_ING"
+msgstr "Chargement..."
+
+msgid "IDS_VPL_POP_NO_FILES"
+msgstr "Aucun fichier"
+
+msgid "IDS_VPL_POP_OUT_OF_MEMORIES"
+msgstr "Mémoire saturée"
+
+msgid "IDS_VPL_POP_SAVE_AS"
+msgstr "Enregistrer sous"
+
+msgid "IDS_VPL_POP_TO_PLAY_DIVX_PROTECTED_VIDEOS_YOUR_DEVICE_MUST_BE_REGISTERED_REGISTRATION_CODE_C_PS_REGISTER_AT_HTTP_C_VODDIVXCOM_DIVX"
+msgstr "Pour lire les vidéos protégées DivX®, votre périphérique doit être enregistré. Code d'enregistrement : %s. Enregistrez-vous sur http://vod.divx.com"
+
+msgid "IDS_VPL_POP_TRIMMING_VIDEO_ING"
+msgstr "Rognage de la vidéo..."
+
+msgid "IDS_VPL_POP_UNABLE_TO_CONNECT"
+msgstr "Connexion impossible"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_INVALID_PACKET_FROM_SERVER"
+msgstr "Lecture impossible. Paquet du serveur non valide"
+
+msgid "IDS_VPL_POP_UNAUTHORIZED_VIDEO_OUTPUT_PLEASE_USE_ANALOG_OUTPUT_TO_VIEW_THIS_DIVX_PROTECTED_VIDEO_DIVIX"
+msgstr "Sortie vidéo non autorisée. Utilisez une sortie analogique pour regarder cette vidéo DivX® protégée"
+
+msgid "IDS_VPL_POP_UNAUTHORIZED_VIDEO_OUTPUT_PLEASE_USE_HDMI_TO_VIEW_THIS_DIVX_PROTECTED_VIDEO_DIVIX"
+msgstr "Sortie vidéo non autorisée. Utilisez une sortie HDMI pour regarder cette vidéo DivX® protégée"
+
+msgid "IDS_VPL_POP_YOUR_DEVICE_IS_NOT_AUTHORIZED_TO_PLAY_THIS_DIVX_PROTECTED_VIDEO_DIVX"
+msgstr "Votre appareil n’est pas autorisé à lire cette vidéo protégée DivX®."
+
+msgid "IDS_VPL_SK3_TRIM"
+msgstr "Rogner"
+
+msgid "IDS_VPL_HEADER_VIDEO_PLAYER"
+msgstr "Lecteur vidéo"
+
+msgid "IDS_VPL_POP_NO_MEDIA_FILE"
+msgstr "Aucun fichier média"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_VIDEO_ERROR_OCCURRED"
+msgstr "Impossible de lire la vidéo. Une erreur est survenue"
+
+msgid "IDS_VPL_BODY_FILE_SIZE"
+msgstr "Taille du fichier"
+
+msgid "IDS_VPL_BUTTON_TRIM"
+msgstr "Rogner"
+
+msgid "IDS_VPL_HEADER_SHARE_VIDEO_ABB"
+msgstr "Partager vidéo"
+
+msgid "IDS_VPL_HEADER_VIDEO_LIST"
+msgstr "Liste vidéo"
+
+msgid "IDS_VPL_OPT_KEEP_ASPECT_RATIO"
+msgstr "Conserver la taille de l'écran"
+
+msgid "IDS_VPL_OPT_SET_AS"
+msgstr "Définir comme"
+
+msgid "IDS_VPL_OPT_SUBTITLES"
+msgstr "Sous-titres"
+
+msgid "IDS_VPL_POP_UNABLE_TO_FIND_FILE"
+msgstr "Impossible de trouver le fichier"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_VIDEO_INVALID_STREAMING_DATA"
+msgstr "Impossible de lire la vidéo. Données de diffusion non valides"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_AUDIO_FORMAT"
+msgstr "Format audio non pris en charge"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_FILE_TYPE"
+msgstr "Type de fichier non pris en charge"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_FORMAT"
+msgstr "Form. non supporté"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_VIDEO_FORMAT"
+msgstr "Format vidéo non pris en charge"
+
+msgid "IDS_VPL_OPT_RESOLUTION"
+msgstr "Résolution"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL"
+msgstr "Impossible de lire la vidéo pendant un appel"
+
+msgid "IDS_VPL_OPT_NORMAL"
+msgstr "Normal"
+
+msgid "IDS_VPL_BODY_VOICE_M_SOUNDEFFECT"
+msgstr "Voix"
+
+msgid "IDS_VPL_BODY_MOVIE_M_SOUNDEFFECT"
+msgstr "Vidéo"
+
+msgid "IDS_VPL_BODY_51CH_M_SOUNDEFFECT"
+msgstr "7.1ch"
+
+msgid "IDS_VPL_POP_51_CHANNEL_SOUND_EFFECT_WORKS_IN_EARPHONE_MODE_ONLY"
+msgstr "L'effet sonore 7.1 ne fonctionne qu'en mode Ecouteur uniquement"
+
+msgid "IDS_VPL_BODY_LATITUDE"
+msgstr "Latitude"
+
+msgid "IDS_VPL_BODY_LONGITUDE"
+msgstr "Longitude"
+
diff --git a/res/po/it_IT.po b/res/po/it_IT.po
new file mode 100755 (executable)
index 0000000..1e0fa64
--- /dev/null
@@ -0,0 +1,198 @@
+msgid "IDS_VPL_BODY_ALREADY_EXISTS"
+msgstr "Già esiste"
+
+msgid "IDS_VPL_BODY_BLUETOOTH_STEREO_HEADSET_DISCONNECTED"
+msgstr "Auricolare stereo Bluetooth disconnesso"
+
+msgid "IDS_VPL_BODY_DRM_FILE_NOT_SUPPORTED_EXCEPT_FOR_FORWARD_LOCK_TYPE"
+msgstr "File DRM non support.escl.tipo bloccato per invio"
+
+msgid "IDS_VPL_BODY_NEW_TAG"
+msgstr "Nuovo tag"
+
+msgid "IDS_VPL_BODY_ORIGINAL"
+msgstr "Originali"
+
+msgid "IDS_VPL_BODY_PLAY_IN_SILENT_MODE_Q"
+msgstr "Riprodurre con profilo Silenzioso?"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_DRM_FILE"
+msgstr "Impossibile riprodurre file DRM"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_SEND_THIS_ITEM_IS_FORWARD_LOCKED"
+msgstr "Impossibile inviare. L'elemento è bloccato per l'invio"
+
+msgid "IDS_VPL_BODY_UNSUPPORTED_DIVX_DRM_VERSION"
+msgstr "Versione DRM DivX non supportata"
+
+msgid "IDS_VPL_BUTTON_BOOKMARK"
+msgstr "Preferito"
+
+msgid "IDS_VPL_BUTTON_DONE"
+msgstr "Fatto"
+
+msgid "IDS_VPL_HEADER_FAVOURITE"
+msgstr "Preferiti"
+
+msgid "IDS_VPL_MBODY_DETAILS_ABB"
+msgstr "Dettagli"
+
+msgid "IDS_VPL_MBODY_RESOLUTION"
+msgstr "Risoluzione"
+
+msgid "IDS_VPL_OPT_ADD_BOOKMARK"
+msgstr "Aggiungi preferito"
+
+msgid "IDS_VPL_OPT_ALLSHARE"
+msgstr "DLNA"
+
+msgid "IDS_VPL_OPT_MESSAGE"
+msgstr "Messaggio"
+
+msgid "IDS_VPL_OPT_NAME"
+msgstr "Nome"
+
+msgid "IDS_VPL_OPT_ON_ALLSHARE_ABB"
+msgstr "Su AllShare"
+
+msgid "IDS_VPL_OPT_TRIM_AS_NEW_VIDEO_ABB"
+msgstr "Ritaglia come nuovo video"
+
+msgid "IDS_VPL_OPT_TRIM_ORIGINAL_VIDEO_ABB"
+msgstr "Ritaglia video originale"
+
+msgid "IDS_VPL_POP_ACCOUNT"
+msgstr "Account"
+
+msgid "IDS_VPL_POP_ADD_SHORTCUT"
+msgstr "Aggiungi collegamento"
+
+msgid "IDS_VPL_POP_ADD_TAG"
+msgstr "Aggiungi tag"
+
+msgid "IDS_VPL_POP_BOOKMARK_LIST_FULL_DELETE_SOME_BOOKMARKS"
+msgstr "Elenco preferiti pieno. Eliminare alcuni preferiti"
+
+msgid "IDS_VPL_POP_DISCONNECTED_FROM_SERVER"
+msgstr "Disconnesso dal server"
+
+msgid "IDS_VPL_POP_GATEWAY_TIME_OUT"
+msgstr "Time out Gateway"
+
+msgid "IDS_VPL_POP_INTERNAL_SERVER_ERROR"
+msgstr "Errore interno server"
+
+msgid "IDS_VPL_POP_LICENCE_EXPIRED"
+msgstr "Licenza scaduta"
+
+msgid "IDS_VPL_POP_LOADING_ING"
+msgstr "Caricamento..."
+
+msgid "IDS_VPL_POP_NO_FILES"
+msgstr "Nessun file"
+
+msgid "IDS_VPL_POP_OUT_OF_MEMORIES"
+msgstr "Memoria insufficiente"
+
+msgid "IDS_VPL_POP_SAVE_AS"
+msgstr "Salva con nome"
+
+msgid "IDS_VPL_POP_TO_PLAY_DIVX_PROTECTED_VIDEOS_YOUR_DEVICE_MUST_BE_REGISTERED_REGISTRATION_CODE_C_PS_REGISTER_AT_HTTP_C_VODDIVXCOM_DIVX"
+msgstr "Per riprodurre video DivX protetti, il dispositivo deve essere registrato. Codice di registrazione: %s. Registrarsi su http://vod.divx.com"
+
+msgid "IDS_VPL_POP_TRIMMING_VIDEO_ING"
+msgstr "Ritaglio video in corso..."
+
+msgid "IDS_VPL_POP_UNABLE_TO_CONNECT"
+msgstr "Impossibile stabilire connessione"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_INVALID_PACKET_FROM_SERVER"
+msgstr "Impossibile avviare riproduzione. Pacchetto non valido dal server"
+
+msgid "IDS_VPL_POP_UNAUTHORIZED_VIDEO_OUTPUT_PLEASE_USE_ANALOG_OUTPUT_TO_VIEW_THIS_DIVX_PROTECTED_VIDEO_DIVIX"
+msgstr "Output video non autorizzato. Utilizzare l'output analogico per visualizzare questo video DivX protetto"
+
+msgid "IDS_VPL_POP_UNAUTHORIZED_VIDEO_OUTPUT_PLEASE_USE_HDMI_TO_VIEW_THIS_DIVX_PROTECTED_VIDEO_DIVIX"
+msgstr "Output video non autorizzato. Utilizzare l'HDMI per visualizzare questo video DivX protetto"
+
+msgid "IDS_VPL_POP_YOUR_DEVICE_IS_NOT_AUTHORIZED_TO_PLAY_THIS_DIVX_PROTECTED_VIDEO_DIVX"
+msgstr "Il dispositivo non è autorizzato a riprodurre un video DivX® protetto"
+
+msgid "IDS_VPL_SK3_TRIM"
+msgstr "Ritaglia"
+
+msgid "IDS_VPL_HEADER_VIDEO_PLAYER"
+msgstr "Lettore video"
+
+msgid "IDS_VPL_POP_NO_MEDIA_FILE"
+msgstr "Nessun file multimediale"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_VIDEO_ERROR_OCCURRED"
+msgstr "Impossibile riprodurre il video. Si è verificato un errore"
+
+msgid "IDS_VPL_BODY_FILE_SIZE"
+msgstr "Dimensioni file"
+
+msgid "IDS_VPL_BUTTON_TRIM"
+msgstr "Ritaglia"
+
+msgid "IDS_VPL_HEADER_SHARE_VIDEO_ABB"
+msgstr "Condiv. video"
+
+msgid "IDS_VPL_HEADER_VIDEO_LIST"
+msgstr "Elenco video"
+
+msgid "IDS_VPL_OPT_KEEP_ASPECT_RATIO"
+msgstr "Conserva formato"
+
+msgid "IDS_VPL_OPT_SET_AS"
+msgstr "Imposta come"
+
+msgid "IDS_VPL_OPT_SUBTITLES"
+msgstr "Sottotitoli"
+
+msgid "IDS_VPL_POP_UNABLE_TO_FIND_FILE"
+msgstr "Espl. file non riuscita"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_VIDEO_INVALID_STREAMING_DATA"
+msgstr "Impossibile riprodurre il video. Dati di streaming non validi"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_AUDIO_FORMAT"
+msgstr "Formato audio non supportato"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_FILE_TYPE"
+msgstr "Tipo file non supportato"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_FORMAT"
+msgstr "Formato non supp."
+
+msgid "IDS_VPL_POP_UNSUPPORTED_VIDEO_FORMAT"
+msgstr "Formato video non supportato"
+
+msgid "IDS_VPL_OPT_RESOLUTION"
+msgstr "Risoluzione"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL"
+msgstr "Impossibile riprodurre durante chiamata"
+
+msgid "IDS_VPL_OPT_NORMAL"
+msgstr "Normale"
+
+msgid "IDS_VPL_BODY_VOICE_M_SOUNDEFFECT"
+msgstr "Voce"
+
+msgid "IDS_VPL_BODY_MOVIE_M_SOUNDEFFECT"
+msgstr "Filmato"
+
+msgid "IDS_VPL_BODY_51CH_M_SOUNDEFFECT"
+msgstr "7.1 ch"
+
+msgid "IDS_VPL_POP_51_CHANNEL_SOUND_EFFECT_WORKS_IN_EARPHONE_MODE_ONLY"
+msgstr "L'effetto sonoro a 7.1 canali funziona solo in modalità auricolare"
+
+msgid "IDS_VPL_BODY_LATITUDE"
+msgstr "Latitudine"
+
+msgid "IDS_VPL_BODY_LONGITUDE"
+msgstr "Longitudine"
+
diff --git a/res/po/ja_JP.po b/res/po/ja_JP.po
new file mode 100755 (executable)
index 0000000..bcb7201
--- /dev/null
@@ -0,0 +1,198 @@
+msgid "IDS_VPL_BODY_ALREADY_EXISTS"
+msgstr "既に登録されています。"
+
+msgid "IDS_VPL_BODY_BLUETOOTH_STEREO_HEADSET_DISCONNECTED"
+msgstr "Bluetooth​ステレオ​ヘッド​セット​は​切断​され​ました"
+
+msgid "IDS_VPL_BODY_DRM_FILE_NOT_SUPPORTED_EXCEPT_FOR_FORWARD_LOCK_TYPE"
+msgstr "フォワード​ロック​タイプ​以外​の​DRM​ファイル​には​対応​して​いません"
+
+msgid "IDS_VPL_BODY_NEW_TAG"
+msgstr "新しい​タグ"
+
+msgid "IDS_VPL_BODY_ORIGINAL"
+msgstr "オリジナル"
+
+msgid "IDS_VPL_BODY_PLAY_IN_SILENT_MODE_Q"
+msgstr "マナーモード中ですが、再生しますか?"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_DRM_FILE"
+msgstr "DRMファイルを再生できません"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_SEND_THIS_ITEM_IS_FORWARD_LOCKED"
+msgstr "送信​できません。​この​アイテム​は​転送​ロック​されて​います"
+
+msgid "IDS_VPL_BODY_UNSUPPORTED_DIVX_DRM_VERSION"
+msgstr "未対応​DivX DRM​バージョン"
+
+msgid "IDS_VPL_BUTTON_BOOKMARK"
+msgstr "ブック​マーク"
+
+msgid "IDS_VPL_BUTTON_DONE"
+msgstr "完了"
+
+msgid "IDS_VPL_HEADER_FAVOURITE"
+msgstr "お気に入り"
+
+msgid "IDS_VPL_MBODY_DETAILS_ABB"
+msgstr "詳細"
+
+msgid "IDS_VPL_MBODY_RESOLUTION"
+msgstr "解像度"
+
+msgid "IDS_VPL_OPT_ADD_BOOKMARK"
+msgstr "ブックマーク登録"
+
+msgid "IDS_VPL_OPT_ALLSHARE"
+msgstr "AllShare"
+
+msgid "IDS_VPL_OPT_MESSAGE"
+msgstr "SMS"
+
+msgid "IDS_VPL_OPT_NAME"
+msgstr "名前"
+
+msgid "IDS_VPL_OPT_ON_ALLSHARE_ABB"
+msgstr "AllShare"
+
+msgid "IDS_VPL_OPT_TRIM_AS_NEW_VIDEO_ABB"
+msgstr "新しいビデオとしてトリミング"
+
+msgid "IDS_VPL_OPT_TRIM_ORIGINAL_VIDEO_ABB"
+msgstr "元のビデオをトリミング"
+
+msgid "IDS_VPL_POP_ACCOUNT"
+msgstr "アカウント"
+
+msgid "IDS_VPL_POP_ADD_SHORTCUT"
+msgstr "ショートカット​を​追加​"
+
+msgid "IDS_VPL_POP_ADD_TAG"
+msgstr "タグ​を​追加​"
+
+msgid "IDS_VPL_POP_BOOKMARK_LIST_FULL_DELETE_SOME_BOOKMARKS"
+msgstr "ブックマーク​リスト​が​いっぱいです。​ブックマーク​を​いくつか​削除​してください。"
+
+msgid "IDS_VPL_POP_DISCONNECTED_FROM_SERVER"
+msgstr "サーバー​から​切断​され​ました"
+
+msgid "IDS_VPL_POP_GATEWAY_TIME_OUT"
+msgstr "ゲートウェイ​タイムアウト"
+
+msgid "IDS_VPL_POP_INTERNAL_SERVER_ERROR"
+msgstr "Internal server error"
+
+msgid "IDS_VPL_POP_LICENCE_EXPIRED"
+msgstr "ライセンス​の​有効期限​が​切れ​ました"
+
+msgid "IDS_VPL_POP_LOADING_ING"
+msgstr "読み込み中..."
+
+msgid "IDS_VPL_POP_NO_FILES"
+msgstr "ファイルがありません。"
+
+msgid "IDS_VPL_POP_OUT_OF_MEMORIES"
+msgstr "メモリが不足しています"
+
+msgid "IDS_VPL_POP_SAVE_AS"
+msgstr "名前​を​付けて​保存​"
+
+msgid "IDS_VPL_POP_TO_PLAY_DIVX_PROTECTED_VIDEOS_YOUR_DEVICE_MUST_BE_REGISTERED_REGISTRATION_CODE_C_PS_REGISTER_AT_HTTP_C_VODDIVXCOM_DIVX"
+msgstr "DivX​保護​ビデオを​再生するには、デバイスの​登録が​必要です。登録​コード: %s 登録はhttp://vod.divx.com にて行ってください"
+
+msgid "IDS_VPL_POP_TRIMMING_VIDEO_ING"
+msgstr "ビデオをトリミング中..."
+
+msgid "IDS_VPL_POP_UNABLE_TO_CONNECT"
+msgstr "接続​できません。"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_INVALID_PACKET_FROM_SERVER"
+msgstr "再生​できません。​サーバー​から​の​パケット​が​無効​です"
+
+msgid "IDS_VPL_POP_UNAUTHORIZED_VIDEO_OUTPUT_PLEASE_USE_ANALOG_OUTPUT_TO_VIEW_THIS_DIVX_PROTECTED_VIDEO_DIVIX"
+msgstr "許可されていない​ビデオが​再生されました。​​保護されてるDivX​ビデオを​再生するには​アナログ出力を​使用してください"
+
+msgid "IDS_VPL_POP_UNAUTHORIZED_VIDEO_OUTPUT_PLEASE_USE_HDMI_TO_VIEW_THIS_DIVX_PROTECTED_VIDEO_DIVIX"
+msgstr "許可されていない​ビデオが​再生されました。保護されてるDivXビデオを​再生するには​HDMI出力を​使用してください"
+
+msgid "IDS_VPL_POP_YOUR_DEVICE_IS_NOT_AUTHORIZED_TO_PLAY_THIS_DIVX_PROTECTED_VIDEO_DIVX"
+msgstr "このデバイスではDivX®保護ビデオを再生できません"
+
+msgid "IDS_VPL_SK3_TRIM"
+msgstr "整備"
+
+msgid "IDS_VPL_HEADER_VIDEO_PLAYER"
+msgstr "動画"
+
+msgid "IDS_VPL_POP_NO_MEDIA_FILE"
+msgstr "メディア​ファイルが​ありません"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_VIDEO_ERROR_OCCURRED"
+msgstr "ビデオ​を​再生​できません​。​エラー​が​発生​しました"
+
+msgid "IDS_VPL_BODY_FILE_SIZE"
+msgstr "ファイル​サイズ"
+
+msgid "IDS_VPL_BUTTON_TRIM"
+msgstr "トリミング"
+
+msgid "IDS_VPL_HEADER_SHARE_VIDEO_ABB"
+msgstr "動画を共有"
+
+msgid "IDS_VPL_HEADER_VIDEO_LIST"
+msgstr "ビデオ​リスト"
+
+msgid "IDS_VPL_OPT_KEEP_ASPECT_RATIO"
+msgstr "縦横​比​を​保存​"
+
+msgid "IDS_VPL_OPT_SET_AS"
+msgstr "登録"
+
+msgid "IDS_VPL_OPT_SUBTITLES"
+msgstr "サブタイトル"
+
+msgid "IDS_VPL_POP_UNABLE_TO_FIND_FILE"
+msgstr "ファイル​が​見つかり​ません"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_VIDEO_INVALID_STREAMING_DATA"
+msgstr "ビデオ​を​再生​できません​。​無効​な​ストリーミング​データ​です"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_AUDIO_FORMAT"
+msgstr "サポートされていない​オーディオ​形式"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_FILE_TYPE"
+msgstr "未対応のファイルです"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_FORMAT"
+msgstr "未対応フォーマット"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_VIDEO_FORMAT"
+msgstr "未対応​ビデオ​形式"
+
+msgid "IDS_VPL_OPT_RESOLUTION"
+msgstr "撮影サイズ"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL"
+msgstr "通話中​は​ビデオ​再生​できません"
+
+msgid "IDS_VPL_OPT_NORMAL"
+msgstr "標準"
+
+msgid "IDS_VPL_BODY_VOICE_M_SOUNDEFFECT"
+msgstr "音声"
+
+msgid "IDS_VPL_BODY_MOVIE_M_SOUNDEFFECT"
+msgstr "映画"
+
+msgid "IDS_VPL_BODY_51CH_M_SOUNDEFFECT"
+msgstr "7.1ch"
+
+msgid "IDS_VPL_POP_51_CHANNEL_SOUND_EFFECT_WORKS_IN_EARPHONE_MODE_ONLY"
+msgstr "7.1チャンネルは、イヤホンモードでのみ使用できます。"
+
+msgid "IDS_VPL_BODY_LATITUDE"
+msgstr "緯度"
+
+msgid "IDS_VPL_BODY_LONGITUDE"
+msgstr "経度"
+
diff --git a/res/po/ko_KR.po b/res/po/ko_KR.po
new file mode 100755 (executable)
index 0000000..013f753
--- /dev/null
@@ -0,0 +1,198 @@
+msgid "IDS_VPL_BODY_ALREADY_EXISTS"
+msgstr "이미 저장되어 있습니다"
+
+msgid "IDS_VPL_BODY_BLUETOOTH_STEREO_HEADSET_DISCONNECTED"
+msgstr "블루투스 스테레오 헤드셋 연결이 끊어졌습니다"
+
+msgid "IDS_VPL_BODY_DRM_FILE_NOT_SUPPORTED_EXCEPT_FOR_FORWARD_LOCK_TYPE"
+msgstr "전달 잠금 파일을 제외한 DRM 파일은 지원되지 않습니다"
+
+msgid "IDS_VPL_BODY_NEW_TAG"
+msgstr "태그 추가"
+
+msgid "IDS_VPL_BODY_ORIGINAL"
+msgstr "원본"
+
+msgid "IDS_VPL_BODY_PLAY_IN_SILENT_MODE_Q"
+msgstr "무음 모드에서 재생할까요?"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_DRM_FILE"
+msgstr "DRM 파일은 재생할 수 없습니다"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_SEND_THIS_ITEM_IS_FORWARD_LOCKED"
+msgstr "전송할 수 없습니다. 잠금이 설정되어 있습니다"
+
+msgid "IDS_VPL_BODY_UNSUPPORTED_DIVX_DRM_VERSION"
+msgstr "지원되지 않는 DivX DRM 버전입니다"
+
+msgid "IDS_VPL_BUTTON_BOOKMARK"
+msgstr "북마크"
+
+msgid "IDS_VPL_BUTTON_DONE"
+msgstr "완료"
+
+msgid "IDS_VPL_HEADER_FAVOURITE"
+msgstr "즐겨찾기"
+
+msgid "IDS_VPL_MBODY_DETAILS_ABB"
+msgstr "상세 정보"
+
+msgid "IDS_VPL_MBODY_RESOLUTION"
+msgstr "해상도"
+
+msgid "IDS_VPL_OPT_ADD_BOOKMARK"
+msgstr "북마크 추가"
+
+msgid "IDS_VPL_OPT_ALLSHARE"
+msgstr "AllShare"
+
+msgid "IDS_VPL_OPT_MESSAGE"
+msgstr "메시지"
+
+msgid "IDS_VPL_OPT_NAME"
+msgstr "이름"
+
+msgid "IDS_VPL_OPT_ON_ALLSHARE_ABB"
+msgstr "AllShare에서"
+
+msgid "IDS_VPL_OPT_TRIM_AS_NEW_VIDEO_ABB"
+msgstr "새 동영상으로 잘라내기"
+
+msgid "IDS_VPL_OPT_TRIM_ORIGINAL_VIDEO_ABB"
+msgstr "원본 동영상 잘라내기"
+
+msgid "IDS_VPL_POP_ACCOUNT"
+msgstr "계정"
+
+msgid "IDS_VPL_POP_ADD_SHORTCUT"
+msgstr "단축메뉴 추가"
+
+msgid "IDS_VPL_POP_ADD_TAG"
+msgstr "태그 추가"
+
+msgid "IDS_VPL_POP_BOOKMARK_LIST_FULL_DELETE_SOME_BOOKMARKS"
+msgstr "북마크 목록이 가득 찼습니다. 북마크 일부를 삭제하세요"
+
+msgid "IDS_VPL_POP_DISCONNECTED_FROM_SERVER"
+msgstr "서버와 연결이 끊어졌습니다"
+
+msgid "IDS_VPL_POP_GATEWAY_TIME_OUT"
+msgstr "게이트웨이 시간이 만료되었습니다"
+
+msgid "IDS_VPL_POP_INTERNAL_SERVER_ERROR"
+msgstr "서버 오류가 발생하였습니다"
+
+msgid "IDS_VPL_POP_LICENCE_EXPIRED"
+msgstr "라이선스 기한이 만료되었습니다"
+
+msgid "IDS_VPL_POP_LOADING_ING"
+msgstr "로딩 중..."
+
+msgid "IDS_VPL_POP_NO_FILES"
+msgstr "파일이 없습니다"
+
+msgid "IDS_VPL_POP_OUT_OF_MEMORIES"
+msgstr "메모리가 부족합니다"
+
+msgid "IDS_VPL_POP_SAVE_AS"
+msgstr "저장"
+
+msgid "IDS_VPL_POP_TO_PLAY_DIVX_PROTECTED_VIDEOS_YOUR_DEVICE_MUST_BE_REGISTERED_REGISTRATION_CODE_C_PS_REGISTER_AT_HTTP_C_VODDIVXCOM_DIVX"
+msgstr "DivX 동영상을 재생하려면 내 디바이스를 등록해야 합니다.  등록 코드: %s  http://vod.divx.com에서 등록하세요"
+
+msgid "IDS_VPL_POP_TRIMMING_VIDEO_ING"
+msgstr "동영상 잘라내는 중..."
+
+msgid "IDS_VPL_POP_UNABLE_TO_CONNECT"
+msgstr "연결할 수 없습니다"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_INVALID_PACKET_FROM_SERVER"
+msgstr "서버에서 받은 패킷이 바르지 않아 재생할 수 없습니다"
+
+msgid "IDS_VPL_POP_UNAUTHORIZED_VIDEO_OUTPUT_PLEASE_USE_ANALOG_OUTPUT_TO_VIEW_THIS_DIVX_PROTECTED_VIDEO_DIVIX"
+msgstr "허가되지 않은 비디오 출력 방식입니다. 이 DivX 동영상을 보려면 아날로그 출력 방식을 사용하세요"
+
+msgid "IDS_VPL_POP_UNAUTHORIZED_VIDEO_OUTPUT_PLEASE_USE_HDMI_TO_VIEW_THIS_DIVX_PROTECTED_VIDEO_DIVIX"
+msgstr "허가되지 않은 비디오 출력 방식입니다. 이 DivX 동영상을 보려면 HDMI 방식를 사용하세요"
+
+msgid "IDS_VPL_POP_YOUR_DEVICE_IS_NOT_AUTHORIZED_TO_PLAY_THIS_DIVX_PROTECTED_VIDEO_DIVX"
+msgstr "귀하의 제품은 DivX® DRM이 적용된 동영상의 재생 권한이 없습니다."
+
+msgid "IDS_VPL_SK3_TRIM"
+msgstr "잘라내기"
+
+msgid "IDS_VPL_HEADER_VIDEO_PLAYER"
+msgstr "비디오 플레이어"
+
+msgid "IDS_VPL_POP_NO_MEDIA_FILE"
+msgstr "미디어 파일이 없습니다"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_VIDEO_ERROR_OCCURRED"
+msgstr "동영상을 재생할 수 없습니다. 오류가 발생하였습니다"
+
+msgid "IDS_VPL_BODY_FILE_SIZE"
+msgstr "파일 크기"
+
+msgid "IDS_VPL_BUTTON_TRIM"
+msgstr "잘라내기"
+
+msgid "IDS_VPL_HEADER_SHARE_VIDEO_ABB"
+msgstr "동영상 공유"
+
+msgid "IDS_VPL_HEADER_VIDEO_LIST"
+msgstr "동영상 목록"
+
+msgid "IDS_VPL_OPT_KEEP_ASPECT_RATIO"
+msgstr "비율 유지"
+
+msgid "IDS_VPL_OPT_SET_AS"
+msgstr "설정"
+
+msgid "IDS_VPL_OPT_SUBTITLES"
+msgstr "자막"
+
+msgid "IDS_VPL_POP_UNABLE_TO_FIND_FILE"
+msgstr "파일을 찾을 수 없습니다"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_VIDEO_INVALID_STREAMING_DATA"
+msgstr "동영상을 재생할 수 없습니다. 스트리밍 데이터가 바르지 않습니다"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_AUDIO_FORMAT"
+msgstr "지원되지 않는 오디오 포맷입니다"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_FILE_TYPE"
+msgstr "지원되지 않는 파일 형식입니다"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_FORMAT"
+msgstr "지원되지 않는 형식입니다"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_VIDEO_FORMAT"
+msgstr "지원되지 않는 동영상 포맷입니다"
+
+msgid "IDS_VPL_OPT_RESOLUTION"
+msgstr "해상도"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL"
+msgstr "통화 중에는 동영상을 재생할 수 없습니다"
+
+msgid "IDS_VPL_OPT_NORMAL"
+msgstr "보통"
+
+msgid "IDS_VPL_BODY_VOICE_M_SOUNDEFFECT"
+msgstr "음성"
+
+msgid "IDS_VPL_BODY_MOVIE_M_SOUNDEFFECT"
+msgstr "영화"
+
+msgid "IDS_VPL_BODY_51CH_M_SOUNDEFFECT"
+msgstr "7.1채널"
+
+msgid "IDS_VPL_POP_51_CHANNEL_SOUND_EFFECT_WORKS_IN_EARPHONE_MODE_ONLY"
+msgstr "7.1채널 음향효과는 이어폰 연결 시에 적용됩니다"
+
+msgid "IDS_VPL_BODY_LATITUDE"
+msgstr "위도"
+
+msgid "IDS_VPL_BODY_LONGITUDE"
+msgstr "경도"
+
diff --git a/res/po/nl_NL.po b/res/po/nl_NL.po
new file mode 100755 (executable)
index 0000000..9b866cc
--- /dev/null
@@ -0,0 +1,198 @@
+msgid "IDS_VPL_BODY_ALREADY_EXISTS"
+msgstr "Bestaat al"
+
+msgid "IDS_VPL_BODY_BLUETOOTH_STEREO_HEADSET_DISCONNECTED"
+msgstr "Bluetooth-stereoheadset losgekoppeld"
+
+msgid "IDS_VPL_BODY_DRM_FILE_NOT_SUPPORTED_EXCEPT_FOR_FORWARD_LOCK_TYPE"
+msgstr "DRM-best alleen ondersteund voor blokkeren doorst"
+
+msgid "IDS_VPL_BODY_NEW_TAG"
+msgstr "Nieuwe tag"
+
+msgid "IDS_VPL_BODY_ORIGINAL"
+msgstr "Oorspronkelijk"
+
+msgid "IDS_VPL_BODY_PLAY_IN_SILENT_MODE_Q"
+msgstr "Afspelen in stille stand?"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_DRM_FILE"
+msgstr "Kan DRM-bestand niet afspelen"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_SEND_THIS_ITEM_IS_FORWARD_LOCKED"
+msgstr "Verzenden onmogelijk. Dit item is geblokkeerd voor doorsturen."
+
+msgid "IDS_VPL_BODY_UNSUPPORTED_DIVX_DRM_VERSION"
+msgstr "DivX® DRM-versie niet ondersteund"
+
+msgid "IDS_VPL_BUTTON_BOOKMARK"
+msgstr "Favorieten"
+
+msgid "IDS_VPL_BUTTON_DONE"
+msgstr "Gereed"
+
+msgid "IDS_VPL_HEADER_FAVOURITE"
+msgstr "Favoriet"
+
+msgid "IDS_VPL_MBODY_DETAILS_ABB"
+msgstr "Details"
+
+msgid "IDS_VPL_MBODY_RESOLUTION"
+msgstr "Resolutie"
+
+msgid "IDS_VPL_OPT_ADD_BOOKMARK"
+msgstr "Favoriet toevoegen"
+
+msgid "IDS_VPL_OPT_ALLSHARE"
+msgstr "AllShare"
+
+msgid "IDS_VPL_OPT_MESSAGE"
+msgstr "Bericht"
+
+msgid "IDS_VPL_OPT_NAME"
+msgstr "Naam"
+
+msgid "IDS_VPL_OPT_ON_ALLSHARE_ABB"
+msgstr "Op AllShare"
+
+msgid "IDS_VPL_OPT_TRIM_AS_NEW_VIDEO_ABB"
+msgstr "Bijsnijden als nwe video"
+
+msgid "IDS_VPL_OPT_TRIM_ORIGINAL_VIDEO_ABB"
+msgstr "Oorspr. video bijsnijden"
+
+msgid "IDS_VPL_POP_ACCOUNT"
+msgstr "Account"
+
+msgid "IDS_VPL_POP_ADD_SHORTCUT"
+msgstr "Sneltoets toevoegen"
+
+msgid "IDS_VPL_POP_ADD_TAG"
+msgstr "Tag toev."
+
+msgid "IDS_VPL_POP_BOOKMARK_LIST_FULL_DELETE_SOME_BOOKMARKS"
+msgstr "Favorieten vol. Verwijder een aantal favorieten."
+
+msgid "IDS_VPL_POP_DISCONNECTED_FROM_SERVER"
+msgstr "Verbinding met server verbreken"
+
+msgid "IDS_VPL_POP_GATEWAY_TIME_OUT"
+msgstr "Time-out voor gateway"
+
+msgid "IDS_VPL_POP_INTERNAL_SERVER_ERROR"
+msgstr "Interne serverfout"
+
+msgid "IDS_VPL_POP_LICENCE_EXPIRED"
+msgstr "Licentie verlopen"
+
+msgid "IDS_VPL_POP_LOADING_ING"
+msgstr "Laden..."
+
+msgid "IDS_VPL_POP_NO_FILES"
+msgstr "Geen bestanden"
+
+msgid "IDS_VPL_POP_OUT_OF_MEMORIES"
+msgstr "Geen geheugen meer"
+
+msgid "IDS_VPL_POP_SAVE_AS"
+msgstr "Opslaan als"
+
+msgid "IDS_VPL_POP_TO_PLAY_DIVX_PROTECTED_VIDEOS_YOUR_DEVICE_MUST_BE_REGISTERED_REGISTRATION_CODE_C_PS_REGISTER_AT_HTTP_C_VODDIVXCOM_DIVX"
+msgstr "Als u video's met DivX®-beveiliging wilt afspelen, moet uw apparaat zijn geregistreerd. Registratiecode: %s. Registreer op http://vod.divx.com"
+
+msgid "IDS_VPL_POP_TRIMMING_VIDEO_ING"
+msgstr "Video bijsnijden..."
+
+msgid "IDS_VPL_POP_UNABLE_TO_CONNECT"
+msgstr "Verbinding mislukt"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_INVALID_PACKET_FROM_SERVER"
+msgstr "Kan niet afspelen. Ongeldig pakket van server"
+
+msgid "IDS_VPL_POP_UNAUTHORIZED_VIDEO_OUTPUT_PLEASE_USE_ANALOG_OUTPUT_TO_VIEW_THIS_DIVX_PROTECTED_VIDEO_DIVIX"
+msgstr "Niet-toegestane video-uitvoer. Gebruik Analoge uitvoer om deze met DivX®-beveiligde video weer te geven"
+
+msgid "IDS_VPL_POP_UNAUTHORIZED_VIDEO_OUTPUT_PLEASE_USE_HDMI_TO_VIEW_THIS_DIVX_PROTECTED_VIDEO_DIVIX"
+msgstr "Niet-toegestane video-uitvoer. Gebruik HDMI om deze met DivX®-beveiligde video weer te geven"
+
+msgid "IDS_VPL_POP_YOUR_DEVICE_IS_NOT_AUTHORIZED_TO_PLAY_THIS_DIVX_PROTECTED_VIDEO_DIVX"
+msgstr "Uw apparaat heeft geen toestemming om video met DivX®-beveiliging af te spelen"
+
+msgid "IDS_VPL_SK3_TRIM"
+msgstr "Bijsnijd."
+
+msgid "IDS_VPL_HEADER_VIDEO_PLAYER"
+msgstr "Videospeler"
+
+msgid "IDS_VPL_POP_NO_MEDIA_FILE"
+msgstr "Geen mediabestand"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_VIDEO_ERROR_OCCURRED"
+msgstr "Kan video niet afspelen. Fout opgetreden"
+
+msgid "IDS_VPL_BODY_FILE_SIZE"
+msgstr "Bestandsgrootte"
+
+msgid "IDS_VPL_BUTTON_TRIM"
+msgstr "Bijsnijden"
+
+msgid "IDS_VPL_HEADER_SHARE_VIDEO_ABB"
+msgstr "Video delen"
+
+msgid "IDS_VPL_HEADER_VIDEO_LIST"
+msgstr "Videolijst"
+
+msgid "IDS_VPL_OPT_KEEP_ASPECT_RATIO"
+msgstr "Verhouding behouden"
+
+msgid "IDS_VPL_OPT_SET_AS"
+msgstr "Instellen als"
+
+msgid "IDS_VPL_OPT_SUBTITLES"
+msgstr "Ondertitels"
+
+msgid "IDS_VPL_POP_UNABLE_TO_FIND_FILE"
+msgstr "Browsen mislukt"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_VIDEO_INVALID_STREAMING_DATA"
+msgstr "Kan video niet afspelen. Ongeldige streaminggegevens"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_AUDIO_FORMAT"
+msgstr "Niet-ondersteunde audio-indeling"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_FILE_TYPE"
+msgstr "Niet-ondersteund bestandstype"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_FORMAT"
+msgstr "Niet onderst. formaat"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_VIDEO_FORMAT"
+msgstr "Niet-ondersteunde video-indeling"
+
+msgid "IDS_VPL_OPT_RESOLUTION"
+msgstr "Resolutie"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL"
+msgstr "Kan video niet afspelen tijdens gesprek"
+
+msgid "IDS_VPL_OPT_NORMAL"
+msgstr "Normaal"
+
+msgid "IDS_VPL_BODY_VOICE_M_SOUNDEFFECT"
+msgstr "Spraak"
+
+msgid "IDS_VPL_BODY_MOVIE_M_SOUNDEFFECT"
+msgstr "Film"
+
+msgid "IDS_VPL_BODY_51CH_M_SOUNDEFFECT"
+msgstr "7.1ch"
+
+msgid "IDS_VPL_POP_51_CHANNEL_SOUND_EFFECT_WORKS_IN_EARPHONE_MODE_ONLY"
+msgstr "7.1-kanaals geluidseffect werkt alleen met oortelefoonstand"
+
+msgid "IDS_VPL_BODY_LATITUDE"
+msgstr "Breedtegraad"
+
+msgid "IDS_VPL_BODY_LONGITUDE"
+msgstr "Lengtegraad"
+
diff --git a/res/po/pt_PT.po b/res/po/pt_PT.po
new file mode 100755 (executable)
index 0000000..7e467b2
--- /dev/null
@@ -0,0 +1,198 @@
+msgid "IDS_VPL_BODY_ALREADY_EXISTS"
+msgstr "Já existe"
+
+msgid "IDS_VPL_BODY_BLUETOOTH_STEREO_HEADSET_DISCONNECTED"
+msgstr "Auricular estéreo Bluetooth desligado"
+
+msgid "IDS_VPL_BODY_DRM_FILE_NOT_SUPPORTED_EXCEPT_FOR_FORWARD_LOCK_TYPE"
+msgstr "Fich. DRM não supor. excepto p/ tipo bloq. reenc."
+
+msgid "IDS_VPL_BODY_NEW_TAG"
+msgstr "Etiqueta nova"
+
+msgid "IDS_VPL_BODY_ORIGINAL"
+msgstr "Original"
+
+msgid "IDS_VPL_BODY_PLAY_IN_SILENT_MODE_Q"
+msgstr "Reproduzir no modo silencioso?"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_DRM_FILE"
+msgstr "Impossível reproduzir ficheiro DRM"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_SEND_THIS_ITEM_IS_FORWARD_LOCKED"
+msgstr "Impossível enviar. Este item tem o reencaminhamento bloqueado."
+
+msgid "IDS_VPL_BODY_UNSUPPORTED_DIVX_DRM_VERSION"
+msgstr "Versão de DRM DivX não suportada"
+
+msgid "IDS_VPL_BUTTON_BOOKMARK"
+msgstr "Favorito"
+
+msgid "IDS_VPL_BUTTON_DONE"
+msgstr "Concluir"
+
+msgid "IDS_VPL_HEADER_FAVOURITE"
+msgstr "Favoritos"
+
+msgid "IDS_VPL_MBODY_DETAILS_ABB"
+msgstr "Detalhes"
+
+msgid "IDS_VPL_MBODY_RESOLUTION"
+msgstr "Resolução"
+
+msgid "IDS_VPL_OPT_ADD_BOOKMARK"
+msgstr "Adicionar favorito"
+
+msgid "IDS_VPL_OPT_ALLSHARE"
+msgstr "AllShare"
+
+msgid "IDS_VPL_OPT_MESSAGE"
+msgstr "Mensagem"
+
+msgid "IDS_VPL_OPT_NAME"
+msgstr "Nome"
+
+msgid "IDS_VPL_OPT_ON_ALLSHARE_ABB"
+msgstr "Com AllShare"
+
+msgid "IDS_VPL_OPT_TRIM_AS_NEW_VIDEO_ABB"
+msgstr "Cortar como vídeo novo"
+
+msgid "IDS_VPL_OPT_TRIM_ORIGINAL_VIDEO_ABB"
+msgstr "Cortar vídeo original"
+
+msgid "IDS_VPL_POP_ACCOUNT"
+msgstr "Conta"
+
+msgid "IDS_VPL_POP_ADD_SHORTCUT"
+msgstr "Adicionar atalho"
+
+msgid "IDS_VPL_POP_ADD_TAG"
+msgstr "Ad. etiq."
+
+msgid "IDS_VPL_POP_BOOKMARK_LIST_FULL_DELETE_SOME_BOOKMARKS"
+msgstr "Lista de marcadores cheia. Apague alguns marcadores"
+
+msgid "IDS_VPL_POP_DISCONNECTED_FROM_SERVER"
+msgstr "Desligada do servidor"
+
+msgid "IDS_VPL_POP_GATEWAY_TIME_OUT"
+msgstr "Tempo de gateway esgotado"
+
+msgid "IDS_VPL_POP_INTERNAL_SERVER_ERROR"
+msgstr "Erro interno de servidor"
+
+msgid "IDS_VPL_POP_LICENCE_EXPIRED"
+msgstr "Licença expirou"
+
+msgid "IDS_VPL_POP_LOADING_ING"
+msgstr "A carregar"
+
+msgid "IDS_VPL_POP_NO_FILES"
+msgstr "Sem ficheiros"
+
+msgid "IDS_VPL_POP_OUT_OF_MEMORIES"
+msgstr "Memória esgotada"
+
+msgid "IDS_VPL_POP_SAVE_AS"
+msgstr "Guardar como"
+
+msgid "IDS_VPL_POP_TO_PLAY_DIVX_PROTECTED_VIDEOS_YOUR_DEVICE_MUST_BE_REGISTERED_REGISTRATION_CODE_C_PS_REGISTER_AT_HTTP_C_VODDIVXCOM_DIVX"
+msgstr "Para reproduzir vídeos DivX protegidos, o dispositivo tem de estar registado. Código de registo: %s. Registar em http://vod.divx.com"
+
+msgid "IDS_VPL_POP_TRIMMING_VIDEO_ING"
+msgstr "A limitar vídeo..."
+
+msgid "IDS_VPL_POP_UNABLE_TO_CONNECT"
+msgstr "Impossível ligar"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_INVALID_PACKET_FROM_SERVER"
+msgstr "Impossível reproduzir. Pacote inválido do servidor"
+
+msgid "IDS_VPL_POP_UNAUTHORIZED_VIDEO_OUTPUT_PLEASE_USE_ANALOG_OUTPUT_TO_VIEW_THIS_DIVX_PROTECTED_VIDEO_DIVIX"
+msgstr "Saída de vídeo não autorizada. Utilize a saída analógica para ver este vídeo protegido DivX"
+
+msgid "IDS_VPL_POP_UNAUTHORIZED_VIDEO_OUTPUT_PLEASE_USE_HDMI_TO_VIEW_THIS_DIVX_PROTECTED_VIDEO_DIVIX"
+msgstr "Saída de vídeo não autorizada. Utilize HDMI para ver este vídeo protegido DivX"
+
+msgid "IDS_VPL_POP_YOUR_DEVICE_IS_NOT_AUTHORIZED_TO_PLAY_THIS_DIVX_PROTECTED_VIDEO_DIVX"
+msgstr "O seu dispositivo não está autorizado a reproduzir vídeos protegidos DivX®"
+
+msgid "IDS_VPL_SK3_TRIM"
+msgstr "Cortar"
+
+msgid "IDS_VPL_HEADER_VIDEO_PLAYER"
+msgstr "Leitor de vídeo"
+
+msgid "IDS_VPL_POP_NO_MEDIA_FILE"
+msgstr "Nenhum ficheiro multimédia"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_VIDEO_ERROR_OCCURRED"
+msgstr "Impossível reproduzir vídeo. Ocorreu um erro"
+
+msgid "IDS_VPL_BODY_FILE_SIZE"
+msgstr "Tamanho do ficheiro"
+
+msgid "IDS_VPL_BUTTON_TRIM"
+msgstr "Cortar"
+
+msgid "IDS_VPL_HEADER_SHARE_VIDEO_ABB"
+msgstr "Part. vídeo"
+
+msgid "IDS_VPL_HEADER_VIDEO_LIST"
+msgstr "Lista de vídeos"
+
+msgid "IDS_VPL_OPT_KEEP_ASPECT_RATIO"
+msgstr "Manter relação de visualização"
+
+msgid "IDS_VPL_OPT_SET_AS"
+msgstr "Definir como"
+
+msgid "IDS_VPL_OPT_SUBTITLES"
+msgstr "Legendas"
+
+msgid "IDS_VPL_POP_UNABLE_TO_FIND_FILE"
+msgstr "Ficheiro não encontrado"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_VIDEO_INVALID_STREAMING_DATA"
+msgstr "Impossível reproduzir vídeo. Dados de streaming inválidos"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_AUDIO_FORMAT"
+msgstr "Formato de áudio não suportado"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_FILE_TYPE"
+msgstr "Tipo de ficheiro não suportado"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_FORMAT"
+msgstr "Formato não suportado"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_VIDEO_FORMAT"
+msgstr "Formato de vídeo não suportado"
+
+msgid "IDS_VPL_OPT_RESOLUTION"
+msgstr "Resolução"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL"
+msgstr "Impossível reproduzir vídeo durante chamada"
+
+msgid "IDS_VPL_OPT_NORMAL"
+msgstr "Normal"
+
+msgid "IDS_VPL_BODY_VOICE_M_SOUNDEFFECT"
+msgstr "Voz"
+
+msgid "IDS_VPL_BODY_MOVIE_M_SOUNDEFFECT"
+msgstr "Filme"
+
+msgid "IDS_VPL_BODY_51CH_M_SOUNDEFFECT"
+msgstr "7.1cn"
+
+msgid "IDS_VPL_POP_51_CHANNEL_SOUND_EFFECT_WORKS_IN_EARPHONE_MODE_ONLY"
+msgstr "O efeito de som do canal 7.1 funciona apenas no modo de auricular"
+
+msgid "IDS_VPL_BODY_LATITUDE"
+msgstr "Latitude"
+
+msgid "IDS_VPL_BODY_LONGITUDE"
+msgstr "Longitude"
+
diff --git a/res/po/ru_RU.po b/res/po/ru_RU.po
new file mode 100755 (executable)
index 0000000..84ae19a
--- /dev/null
@@ -0,0 +1,198 @@
+msgid "IDS_VPL_BODY_ALREADY_EXISTS"
+msgstr "Уже существует"
+
+msgid "IDS_VPL_BODY_BLUETOOTH_STEREO_HEADSET_DISCONNECTED"
+msgstr "Стереогарнитура Bluetooth отключена"
+
+msgid "IDS_VPL_BODY_DRM_FILE_NOT_SUPPORTED_EXCEPT_FOR_FORWARD_LOCK_TYPE"
+msgstr "Поддерживается только запрет на пересылку для файлов DRM"
+
+msgid "IDS_VPL_BODY_NEW_TAG"
+msgstr "Новый тег"
+
+msgid "IDS_VPL_BODY_ORIGINAL"
+msgstr "Исходный"
+
+msgid "IDS_VPL_BODY_PLAY_IN_SILENT_MODE_Q"
+msgstr "Воспроизвести в профиле “Без звука”?"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_DRM_FILE"
+msgstr "Невозможно воспроизвести файл DRM"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_SEND_THIS_ITEM_IS_FORWARD_LOCKED"
+msgstr "Нельзя отправить. Этот элемент заблокирован для пересылки."
+
+msgid "IDS_VPL_BODY_UNSUPPORTED_DIVX_DRM_VERSION"
+msgstr "Неподдерживаемая DRM-версия DivX"
+
+msgid "IDS_VPL_BUTTON_BOOKMARK"
+msgstr "Закладка"
+
+msgid "IDS_VPL_BUTTON_DONE"
+msgstr "Готово"
+
+msgid "IDS_VPL_HEADER_FAVOURITE"
+msgstr "Избранное"
+
+msgid "IDS_VPL_MBODY_DETAILS_ABB"
+msgstr "Сведения"
+
+msgid "IDS_VPL_MBODY_RESOLUTION"
+msgstr "Разрешение"
+
+msgid "IDS_VPL_OPT_ADD_BOOKMARK"
+msgstr "Добавить закладку"
+
+msgid "IDS_VPL_OPT_ALLSHARE"
+msgstr "AllShare"
+
+msgid "IDS_VPL_OPT_MESSAGE"
+msgstr "Сообщение"
+
+msgid "IDS_VPL_OPT_NAME"
+msgstr "Имя"
+
+msgid "IDS_VPL_OPT_ON_ALLSHARE_ABB"
+msgstr "На AllShare"
+
+msgid "IDS_VPL_OPT_TRIM_AS_NEW_VIDEO_ABB"
+msgstr "Обрезать и сохранить"
+
+msgid "IDS_VPL_OPT_TRIM_ORIGINAL_VIDEO_ABB"
+msgstr "Обрезать исходное видео"
+
+msgid "IDS_VPL_POP_ACCOUNT"
+msgstr "Учетная запись"
+
+msgid "IDS_VPL_POP_ADD_SHORTCUT"
+msgstr "Добавить ссылку"
+
+msgid "IDS_VPL_POP_ADD_TAG"
+msgstr "Добавить метку"
+
+msgid "IDS_VPL_POP_BOOKMARK_LIST_FULL_DELETE_SOME_BOOKMARKS"
+msgstr "Список закладок заполнен.\nУдалите некоторые закладки"
+
+msgid "IDS_VPL_POP_DISCONNECTED_FROM_SERVER"
+msgstr "Отключен от сервера"
+
+msgid "IDS_VPL_POP_GATEWAY_TIME_OUT"
+msgstr "Тайм-аут шлюза"
+
+msgid "IDS_VPL_POP_INTERNAL_SERVER_ERROR"
+msgstr "Внутренняя ошибка сервера"
+
+msgid "IDS_VPL_POP_LICENCE_EXPIRED"
+msgstr "Лицензия просрочена"
+
+msgid "IDS_VPL_POP_LOADING_ING"
+msgstr "Загрузка..."
+
+msgid "IDS_VPL_POP_NO_FILES"
+msgstr "Нет файлов"
+
+msgid "IDS_VPL_POP_OUT_OF_MEMORIES"
+msgstr "Недостаточно памяти"
+
+msgid "IDS_VPL_POP_SAVE_AS"
+msgstr "Сохранить как"
+
+msgid "IDS_VPL_POP_TO_PLAY_DIVX_PROTECTED_VIDEOS_YOUR_DEVICE_MUST_BE_REGISTERED_REGISTRATION_CODE_C_PS_REGISTER_AT_HTTP_C_VODDIVXCOM_DIVX"
+msgstr "Для воспроизведения защищенного видео DivX необходимо зарегистрировать устройство. Код регистрации: %s. Регистрация выполняется на сайте http://vod.divx.com"
+
+msgid "IDS_VPL_POP_TRIMMING_VIDEO_ING"
+msgstr "Обрезка видео..."
+
+msgid "IDS_VPL_POP_UNABLE_TO_CONNECT"
+msgstr "Невозможно подключиться"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_INVALID_PACKET_FROM_SERVER"
+msgstr "Сбой воспроизведения. От сервера получен недопустимый пакет"
+
+msgid "IDS_VPL_POP_UNAUTHORIZED_VIDEO_OUTPUT_PLEASE_USE_ANALOG_OUTPUT_TO_VIEW_THIS_DIVX_PROTECTED_VIDEO_DIVIX"
+msgstr "Несанкционированный видеовывод. Используйте для воспроизведения защищенного видео DivX аналоговый вывод"
+
+msgid "IDS_VPL_POP_UNAUTHORIZED_VIDEO_OUTPUT_PLEASE_USE_HDMI_TO_VIEW_THIS_DIVX_PROTECTED_VIDEO_DIVIX"
+msgstr "Несанкционированный видеовывод. Используйте для воспроизведения защищенного видео DivX кабель HDMI"
+
+msgid "IDS_VPL_POP_YOUR_DEVICE_IS_NOT_AUTHORIZED_TO_PLAY_THIS_DIVX_PROTECTED_VIDEO_DIVX"
+msgstr "Это устройство не авторизовано для воспроизведения защищенного видео DivX®"
+
+msgid "IDS_VPL_SK3_TRIM"
+msgstr "Обрезать"
+
+msgid "IDS_VPL_HEADER_VIDEO_PLAYER"
+msgstr "Видеоплеер"
+
+msgid "IDS_VPL_POP_NO_MEDIA_FILE"
+msgstr "Нет медиафайлов"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_VIDEO_ERROR_OCCURRED"
+msgstr "Невозможно воспроизвести видео. Ошибка"
+
+msgid "IDS_VPL_BODY_FILE_SIZE"
+msgstr "Размер файла"
+
+msgid "IDS_VPL_BUTTON_TRIM"
+msgstr "Настроить"
+
+msgid "IDS_VPL_HEADER_SHARE_VIDEO_ABB"
+msgstr "Обмен видео"
+
+msgid "IDS_VPL_HEADER_VIDEO_LIST"
+msgstr "Список видео"
+
+msgid "IDS_VPL_OPT_KEEP_ASPECT_RATIO"
+msgstr "Сохранять пропорции"
+
+msgid "IDS_VPL_OPT_SET_AS"
+msgstr "Установить как"
+
+msgid "IDS_VPL_OPT_SUBTITLES"
+msgstr "Субтитры"
+
+msgid "IDS_VPL_POP_UNABLE_TO_FIND_FILE"
+msgstr "Невозможно найти файл"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_VIDEO_INVALID_STREAMING_DATA"
+msgstr "Невозможно воспроизвести видео. Недопустимые потоковые данные"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_AUDIO_FORMAT"
+msgstr "Неподдерживаемый формат аудио"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_FILE_TYPE"
+msgstr "Неподдерживаемый тип файла"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_FORMAT"
+msgstr "Неподдерживаемый формат"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_VIDEO_FORMAT"
+msgstr "Неподдерживаемый формат видео"
+
+msgid "IDS_VPL_OPT_RESOLUTION"
+msgstr "Разрешение"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL"
+msgstr "Воспроизведение видео во время вызова невозможно"
+
+msgid "IDS_VPL_OPT_NORMAL"
+msgstr "Обычный"
+
+msgid "IDS_VPL_BODY_VOICE_M_SOUNDEFFECT"
+msgstr "Голос"
+
+msgid "IDS_VPL_BODY_MOVIE_M_SOUNDEFFECT"
+msgstr "Фильм"
+
+msgid "IDS_VPL_BODY_51CH_M_SOUNDEFFECT"
+msgstr "7.1 кан."
+
+msgid "IDS_VPL_POP_51_CHANNEL_SOUND_EFFECT_WORKS_IN_EARPHONE_MODE_ONLY"
+msgstr "7.1-канальный звуковой эффект доступен только в режиме наушников"
+
+msgid "IDS_VPL_BODY_LATITUDE"
+msgstr "Широта"
+
+msgid "IDS_VPL_BODY_LONGITUDE"
+msgstr "Долгота"
+
diff --git a/res/po/tr_TR.po b/res/po/tr_TR.po
new file mode 100755 (executable)
index 0000000..beec85b
--- /dev/null
@@ -0,0 +1,198 @@
+msgid "IDS_VPL_BODY_ALREADY_EXISTS"
+msgstr "Zaten var"
+
+msgid "IDS_VPL_BODY_BLUETOOTH_STEREO_HEADSET_DISCONNECTED"
+msgstr "Bluetooth stereo kulaklık takılı değil"
+
+msgid "IDS_VPL_BODY_DRM_FILE_NOT_SUPPORTED_EXCEPT_FOR_FORWARD_LOCK_TYPE"
+msgstr "DRM dosyası iletme türü hariç desteklenmiyor"
+
+msgid "IDS_VPL_BODY_NEW_TAG"
+msgstr "Yeni im"
+
+msgid "IDS_VPL_BODY_ORIGINAL"
+msgstr "Orijinal"
+
+msgid "IDS_VPL_BODY_PLAY_IN_SILENT_MODE_Q"
+msgstr "Sessiz modda oynatılsın mı?"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_DRM_FILE"
+msgstr "DRM dosyası çalınamıyor"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_SEND_THIS_ITEM_IS_FORWARD_LOCKED"
+msgstr "Gönderilemiyor. Bu öğe iletmeye karşı kilitli."
+
+msgid "IDS_VPL_BODY_UNSUPPORTED_DIVX_DRM_VERSION"
+msgstr "Desteklenmeyen DivX DRM sürümü"
+
+msgid "IDS_VPL_BUTTON_BOOKMARK"
+msgstr "Yer imi"
+
+msgid "IDS_VPL_BUTTON_DONE"
+msgstr "Tamam"
+
+msgid "IDS_VPL_HEADER_FAVOURITE"
+msgstr "Sık kullanılanlar"
+
+msgid "IDS_VPL_MBODY_DETAILS_ABB"
+msgstr "Ayrıntılar"
+
+msgid "IDS_VPL_MBODY_RESOLUTION"
+msgstr "Çözünürlük"
+
+msgid "IDS_VPL_OPT_ADD_BOOKMARK"
+msgstr "Yer imi ekle"
+
+msgid "IDS_VPL_OPT_ALLSHARE"
+msgstr "AllShare"
+
+msgid "IDS_VPL_OPT_MESSAGE"
+msgstr "Mesaj"
+
+msgid "IDS_VPL_OPT_NAME"
+msgstr "İsim"
+
+msgid "IDS_VPL_OPT_ON_ALLSHARE_ABB"
+msgstr "AllShare üzerinde"
+
+msgid "IDS_VPL_OPT_TRIM_AS_NEW_VIDEO_ABB"
+msgstr "Yeni videoyu kırp"
+
+msgid "IDS_VPL_OPT_TRIM_ORIGINAL_VIDEO_ABB"
+msgstr "Orijinal videoyu kırp"
+
+msgid "IDS_VPL_POP_ACCOUNT"
+msgstr "Hesap"
+
+msgid "IDS_VPL_POP_ADD_SHORTCUT"
+msgstr "Kısayol ekle"
+
+msgid "IDS_VPL_POP_ADD_TAG"
+msgstr "İm ekle"
+
+msgid "IDS_VPL_POP_BOOKMARK_LIST_FULL_DELETE_SOME_BOOKMARKS"
+msgstr "Yer işaretleri listesi dolu.  Bazılarını silin"
+
+msgid "IDS_VPL_POP_DISCONNECTED_FROM_SERVER"
+msgstr "Sunucu bağlantısı kesildi"
+
+msgid "IDS_VPL_POP_GATEWAY_TIME_OUT"
+msgstr "Ağ geçidi zaman aşımı"
+
+msgid "IDS_VPL_POP_INTERNAL_SERVER_ERROR"
+msgstr "Dahili sunucu hatası"
+
+msgid "IDS_VPL_POP_LICENCE_EXPIRED"
+msgstr "Lisans süresi doldu"
+
+msgid "IDS_VPL_POP_LOADING_ING"
+msgstr "Yükleniyor..."
+
+msgid "IDS_VPL_POP_NO_FILES"
+msgstr "Dosya yok"
+
+msgid "IDS_VPL_POP_OUT_OF_MEMORIES"
+msgstr "Bellek yetersiz"
+
+msgid "IDS_VPL_POP_SAVE_AS"
+msgstr "Farklı kaydet"
+
+msgid "IDS_VPL_POP_TO_PLAY_DIVX_PROTECTED_VIDEOS_YOUR_DEVICE_MUST_BE_REGISTERED_REGISTRATION_CODE_C_PS_REGISTER_AT_HTTP_C_VODDIVXCOM_DIVX"
+msgstr "DivX korumalı videoları oynatmak için cihazınız kayıtlı olmalıdır. Kayıt kodu: %s. http://vod.divx.com adresine kayıt olun"
+
+msgid "IDS_VPL_POP_TRIMMING_VIDEO_ING"
+msgstr "Video kırpılıyor..."
+
+msgid "IDS_VPL_POP_UNABLE_TO_CONNECT"
+msgstr "Bağlantı başarısız"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_INVALID_PACKET_FROM_SERVER"
+msgstr "Oynatılamıyor. Sunucudan geçersiz paket"
+
+msgid "IDS_VPL_POP_UNAUTHORIZED_VIDEO_OUTPUT_PLEASE_USE_ANALOG_OUTPUT_TO_VIEW_THIS_DIVX_PROTECTED_VIDEO_DIVIX"
+msgstr "Yetkisiz Video Çıkışı. Lütfen DivX Korumalı videoyu izlemek için Analog çıkış kullanın"
+
+msgid "IDS_VPL_POP_UNAUTHORIZED_VIDEO_OUTPUT_PLEASE_USE_HDMI_TO_VIEW_THIS_DIVX_PROTECTED_VIDEO_DIVIX"
+msgstr "Yetkisiz Video Çıkışı. Lütfen DivX Korumalı videoyu izlemek için HDMI kullanın"
+
+msgid "IDS_VPL_POP_YOUR_DEVICE_IS_NOT_AUTHORIZED_TO_PLAY_THIS_DIVX_PROTECTED_VIDEO_DIVX"
+msgstr "Cihazınızın DivX korumalı videoyu oynatma izni yok"
+
+msgid "IDS_VPL_SK3_TRIM"
+msgstr "Kes"
+
+msgid "IDS_VPL_HEADER_VIDEO_PLAYER"
+msgstr "Video oynatıcı"
+
+msgid "IDS_VPL_POP_NO_MEDIA_FILE"
+msgstr "Hiç ortam dosyası yok"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_VIDEO_ERROR_OCCURRED"
+msgstr "Video oynatılamıyor. Hata oluştu"
+
+msgid "IDS_VPL_BODY_FILE_SIZE"
+msgstr "Dosya boyutu"
+
+msgid "IDS_VPL_BUTTON_TRIM"
+msgstr "Kes"
+
+msgid "IDS_VPL_HEADER_SHARE_VIDEO_ABB"
+msgstr "Video paylaş"
+
+msgid "IDS_VPL_HEADER_VIDEO_LIST"
+msgstr "Video listesi"
+
+msgid "IDS_VPL_OPT_KEEP_ASPECT_RATIO"
+msgstr "En-boy oranını koru"
+
+msgid "IDS_VPL_OPT_SET_AS"
+msgstr "Yap"
+
+msgid "IDS_VPL_OPT_SUBTITLES"
+msgstr "Altyazılar"
+
+msgid "IDS_VPL_POP_UNABLE_TO_FIND_FILE"
+msgstr "Dosya bulunamıyor"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_VIDEO_INVALID_STREAMING_DATA"
+msgstr "Video oynatılamıyor. Geçersiz veri akışı."
+
+msgid "IDS_VPL_POP_UNSUPPORTED_AUDIO_FORMAT"
+msgstr "Desteklenmeyen ses biçimi"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_FILE_TYPE"
+msgstr "Desteklenmeyen dosya türü"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_FORMAT"
+msgstr "Desteklenmeyen biçim"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_VIDEO_FORMAT"
+msgstr "Desteklenmeyen video biçimi"
+
+msgid "IDS_VPL_OPT_RESOLUTION"
+msgstr "Çözünürlük"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL"
+msgstr "Görüşme sırasında video oynatılamıyor"
+
+msgid "IDS_VPL_OPT_NORMAL"
+msgstr "Normal"
+
+msgid "IDS_VPL_BODY_VOICE_M_SOUNDEFFECT"
+msgstr "Ses"
+
+msgid "IDS_VPL_BODY_MOVIE_M_SOUNDEFFECT"
+msgstr "Film"
+
+msgid "IDS_VPL_BODY_51CH_M_SOUNDEFFECT"
+msgstr "7.1ch"
+
+msgid "IDS_VPL_POP_51_CHANNEL_SOUND_EFFECT_WORKS_IN_EARPHONE_MODE_ONLY"
+msgstr "7.1 kanal ses efekti sadece kulaklık modunda çalışır"
+
+msgid "IDS_VPL_BODY_LATITUDE"
+msgstr "Enlem"
+
+msgid "IDS_VPL_BODY_LONGITUDE"
+msgstr "Boylam"
+
diff --git a/res/po/zh_CN.po b/res/po/zh_CN.po
new file mode 100755 (executable)
index 0000000..3c73f77
--- /dev/null
@@ -0,0 +1,198 @@
+msgid "IDS_VPL_BODY_ALREADY_EXISTS"
+msgstr "已经存在"
+
+msgid "IDS_VPL_BODY_BLUETOOTH_STEREO_HEADSET_DISCONNECTED"
+msgstr "蓝牙立体声耳机未连接"
+
+msgid "IDS_VPL_BODY_DRM_FILE_NOT_SUPPORTED_EXCEPT_FOR_FORWARD_LOCK_TYPE"
+msgstr "不支持除转寄锁定类型之外的 DRM 文件"
+
+msgid "IDS_VPL_BODY_NEW_TAG"
+msgstr "新标签"
+
+msgid "IDS_VPL_BODY_ORIGINAL"
+msgstr "原作"
+
+msgid "IDS_VPL_BODY_PLAY_IN_SILENT_MODE_Q"
+msgstr "在安静模式下播放?"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_DRM_FILE"
+msgstr "无法播放DRM文件"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_SEND_THIS_ITEM_IS_FORWARD_LOCKED"
+msgstr "无法发送。此项目禁止转发"
+
+msgid "IDS_VPL_BODY_UNSUPPORTED_DIVX_DRM_VERSION"
+msgstr "不支持的DivX® DRM版本"
+
+msgid "IDS_VPL_BUTTON_BOOKMARK"
+msgstr "书签"
+
+msgid "IDS_VPL_BUTTON_DONE"
+msgstr "完成"
+
+msgid "IDS_VPL_HEADER_FAVOURITE"
+msgstr "收藏"
+
+msgid "IDS_VPL_MBODY_DETAILS_ABB"
+msgstr "详情"
+
+msgid "IDS_VPL_MBODY_RESOLUTION"
+msgstr "分辨率"
+
+msgid "IDS_VPL_OPT_ADD_BOOKMARK"
+msgstr "添加书签"
+
+msgid "IDS_VPL_OPT_ALLSHARE"
+msgstr "娱乐共享"
+
+msgid "IDS_VPL_OPT_MESSAGE"
+msgstr "信息"
+
+msgid "IDS_VPL_OPT_NAME"
+msgstr "名称"
+
+msgid "IDS_VPL_OPT_ON_ALLSHARE_ABB"
+msgstr "在AllShare上"
+
+msgid "IDS_VPL_OPT_TRIM_AS_NEW_VIDEO_ABB"
+msgstr "修剪作为新视频"
+
+msgid "IDS_VPL_OPT_TRIM_ORIGINAL_VIDEO_ABB"
+msgstr "修剪原始视频"
+
+msgid "IDS_VPL_POP_ACCOUNT"
+msgstr "帐户"
+
+msgid "IDS_VPL_POP_ADD_SHORTCUT"
+msgstr "添加快捷键"
+
+msgid "IDS_VPL_POP_ADD_TAG"
+msgstr "添加标签"
+
+msgid "IDS_VPL_POP_BOOKMARK_LIST_FULL_DELETE_SOME_BOOKMARKS"
+msgstr "书签列表满。删除部分书签"
+
+msgid "IDS_VPL_POP_DISCONNECTED_FROM_SERVER"
+msgstr "已从服务器断开"
+
+msgid "IDS_VPL_POP_GATEWAY_TIME_OUT"
+msgstr "网关超时"
+
+msgid "IDS_VPL_POP_INTERNAL_SERVER_ERROR"
+msgstr "内部服务器无效"
+
+msgid "IDS_VPL_POP_LICENCE_EXPIRED"
+msgstr "许可已过期"
+
+msgid "IDS_VPL_POP_LOADING_ING"
+msgstr "裝载中…"
+
+msgid "IDS_VPL_POP_NO_FILES"
+msgstr "无文件"
+
+msgid "IDS_VPL_POP_OUT_OF_MEMORIES"
+msgstr "内存不足"
+
+msgid "IDS_VPL_POP_SAVE_AS"
+msgstr "另存为"
+
+msgid "IDS_VPL_POP_TO_PLAY_DIVX_PROTECTED_VIDEOS_YOUR_DEVICE_MUST_BE_REGISTERED_REGISTRATION_CODE_C_PS_REGISTER_AT_HTTP_C_VODDIVXCOM_DIVX"
+msgstr "如欲播放被保护的DivX®视频,必须注册您的设备。请在 http://vod.divx.com注册,注册码:%s"
+
+msgid "IDS_VPL_POP_TRIMMING_VIDEO_ING"
+msgstr "正在剪切视频…"
+
+msgid "IDS_VPL_POP_UNABLE_TO_CONNECT"
+msgstr "无法连接"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_INVALID_PACKET_FROM_SERVER"
+msgstr "无法播放。服务器无效信息包"
+
+msgid "IDS_VPL_POP_UNAUTHORIZED_VIDEO_OUTPUT_PLEASE_USE_ANALOG_OUTPUT_TO_VIEW_THIS_DIVX_PROTECTED_VIDEO_DIVIX"
+msgstr "未经授权的视频输出。请使用模拟输出查看该DivX®保护视频"
+
+msgid "IDS_VPL_POP_UNAUTHORIZED_VIDEO_OUTPUT_PLEASE_USE_HDMI_TO_VIEW_THIS_DIVX_PROTECTED_VIDEO_DIVIX"
+msgstr "未经授权的视频输出。请使用HDMI查看该DivX®保护视频"
+
+msgid "IDS_VPL_POP_YOUR_DEVICE_IS_NOT_AUTHORIZED_TO_PLAY_THIS_DIVX_PROTECTED_VIDEO_DIVX"
+msgstr "您的设备没有被授权播放这个DivX®加密的视频."
+
+msgid "IDS_VPL_SK3_TRIM"
+msgstr "剪切"
+
+msgid "IDS_VPL_HEADER_VIDEO_PLAYER"
+msgstr "视频播放器"
+
+msgid "IDS_VPL_POP_NO_MEDIA_FILE"
+msgstr "没有媒体文件"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_VIDEO_ERROR_OCCURRED"
+msgstr "无法播放视频。出现错误"
+
+msgid "IDS_VPL_BODY_FILE_SIZE"
+msgstr "文件大小"
+
+msgid "IDS_VPL_BUTTON_TRIM"
+msgstr "剪切"
+
+msgid "IDS_VPL_HEADER_SHARE_VIDEO_ABB"
+msgstr "共享视频"
+
+msgid "IDS_VPL_HEADER_VIDEO_LIST"
+msgstr "视频列表"
+
+msgid "IDS_VPL_OPT_KEEP_ASPECT_RATIO"
+msgstr "保持屏幕高宽比例"
+
+msgid "IDS_VPL_OPT_SET_AS"
+msgstr "设定为"
+
+msgid "IDS_VPL_OPT_SUBTITLES"
+msgstr "说明字幕"
+
+msgid "IDS_VPL_POP_UNABLE_TO_FIND_FILE"
+msgstr "无法找到文件"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_VIDEO_INVALID_STREAMING_DATA"
+msgstr "无法播放视频。无效视频流数据"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_AUDIO_FORMAT"
+msgstr "不支持的音频格式"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_FILE_TYPE"
+msgstr "不支持的文件类型"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_FORMAT"
+msgstr "不支持格式"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_VIDEO_FORMAT"
+msgstr "不支持的视频格式"
+
+msgid "IDS_VPL_OPT_RESOLUTION"
+msgstr "分辨率"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL"
+msgstr "通话中无法播放视频"
+
+msgid "IDS_VPL_OPT_NORMAL"
+msgstr "正常"
+
+msgid "IDS_VPL_BODY_VOICE_M_SOUNDEFFECT"
+msgstr "语音"
+
+msgid "IDS_VPL_BODY_MOVIE_M_SOUNDEFFECT"
+msgstr "电影"
+
+msgid "IDS_VPL_BODY_51CH_M_SOUNDEFFECT"
+msgstr "7.1ch"
+
+msgid "IDS_VPL_POP_51_CHANNEL_SOUND_EFFECT_WORKS_IN_EARPHONE_MODE_ONLY"
+msgstr "7.1 声道声音效果只适用于耳机模式"
+
+msgid "IDS_VPL_BODY_LATITUDE"
+msgstr "纬度"
+
+msgid "IDS_VPL_BODY_LONGITUDE"
+msgstr "经度"
+
diff --git a/res/po/zh_HK.po b/res/po/zh_HK.po
new file mode 100755 (executable)
index 0000000..5f840aa
--- /dev/null
@@ -0,0 +1,198 @@
+msgid "IDS_VPL_BODY_ALREADY_EXISTS"
+msgstr "已存在"
+
+msgid "IDS_VPL_BODY_BLUETOOTH_STEREO_HEADSET_DISCONNECTED"
+msgstr "藍牙立體聲耳機已中斷連接"
+
+msgid "IDS_VPL_BODY_DRM_FILE_NOT_SUPPORTED_EXCEPT_FOR_FORWARD_LOCK_TYPE"
+msgstr "不支援 DRM 檔案,轉寄鎖定類型除外"
+
+msgid "IDS_VPL_BODY_NEW_TAG"
+msgstr "新標籤"
+
+msgid "IDS_VPL_BODY_ORIGINAL"
+msgstr "原圖"
+
+msgid "IDS_VPL_BODY_PLAY_IN_SILENT_MODE_Q"
+msgstr "以靜音模式播放?"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_DRM_FILE"
+msgstr "Unable to play DRM file"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_SEND_THIS_ITEM_IS_FORWARD_LOCKED"
+msgstr "無法發送。此項目已轉寄鎖定"
+
+msgid "IDS_VPL_BODY_UNSUPPORTED_DIVX_DRM_VERSION"
+msgstr "不支援的 DivX DRM 版本"
+
+msgid "IDS_VPL_BUTTON_BOOKMARK"
+msgstr "書籤"
+
+msgid "IDS_VPL_BUTTON_DONE"
+msgstr "完成"
+
+msgid "IDS_VPL_HEADER_FAVOURITE"
+msgstr "我的最愛"
+
+msgid "IDS_VPL_MBODY_DETAILS_ABB"
+msgstr "詳情"
+
+msgid "IDS_VPL_MBODY_RESOLUTION"
+msgstr "解像度"
+
+msgid "IDS_VPL_OPT_ADD_BOOKMARK"
+msgstr "加入書籤"
+
+msgid "IDS_VPL_OPT_ALLSHARE"
+msgstr "AllShare"
+
+msgid "IDS_VPL_OPT_MESSAGE"
+msgstr "訊息"
+
+msgid "IDS_VPL_OPT_NAME"
+msgstr "名稱"
+
+msgid "IDS_VPL_OPT_ON_ALLSHARE_ABB"
+msgstr "在 AllShare"
+
+msgid "IDS_VPL_OPT_TRIM_AS_NEW_VIDEO_ABB"
+msgstr "修剪為新影片"
+
+msgid "IDS_VPL_OPT_TRIM_ORIGINAL_VIDEO_ABB"
+msgstr "修剪原始影片"
+
+msgid "IDS_VPL_POP_ACCOUNT"
+msgstr "帳戶"
+
+msgid "IDS_VPL_POP_ADD_SHORTCUT"
+msgstr "加入捷徑"
+
+msgid "IDS_VPL_POP_ADD_TAG"
+msgstr "加入標籤"
+
+msgid "IDS_VPL_POP_BOOKMARK_LIST_FULL_DELETE_SOME_BOOKMARKS"
+msgstr "書籤清單已滿。請刪除一些書籤"
+
+msgid "IDS_VPL_POP_DISCONNECTED_FROM_SERVER"
+msgstr "伺服器連接中斷"
+
+msgid "IDS_VPL_POP_GATEWAY_TIME_OUT"
+msgstr "網關逾時"
+
+msgid "IDS_VPL_POP_INTERNAL_SERVER_ERROR"
+msgstr "內部伺服器錯誤"
+
+msgid "IDS_VPL_POP_LICENCE_EXPIRED"
+msgstr "許可已過期"
+
+msgid "IDS_VPL_POP_LOADING_ING"
+msgstr "正在載入..."
+
+msgid "IDS_VPL_POP_NO_FILES"
+msgstr "無檔案"
+
+msgid "IDS_VPL_POP_OUT_OF_MEMORIES"
+msgstr "記憶體不足"
+
+msgid "IDS_VPL_POP_SAVE_AS"
+msgstr "另存為"
+
+msgid "IDS_VPL_POP_TO_PLAY_DIVX_PROTECTED_VIDEOS_YOUR_DEVICE_MUST_BE_REGISTERED_REGISTRATION_CODE_C_PS_REGISTER_AT_HTTP_C_VODDIVXCOM_DIVX"
+msgstr "要播送DivX保護的影片,必須登記裝置。登記號碼:%s ,請前往http://vod.divx.com網站登記"
+
+msgid "IDS_VPL_POP_TRIMMING_VIDEO_ING"
+msgstr "正在修剪影片..."
+
+msgid "IDS_VPL_POP_UNABLE_TO_CONNECT"
+msgstr "無法連接"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_INVALID_PACKET_FROM_SERVER"
+msgstr "無法播放。來自伺服器的分組數據無效"
+
+msgid "IDS_VPL_POP_UNAUTHORIZED_VIDEO_OUTPUT_PLEASE_USE_ANALOG_OUTPUT_TO_VIEW_THIS_DIVX_PROTECTED_VIDEO_DIVIX"
+msgstr "未經授權的影片輸出。請使用模擬輸出觀看此段受 DivX 保護的影片"
+
+msgid "IDS_VPL_POP_UNAUTHORIZED_VIDEO_OUTPUT_PLEASE_USE_HDMI_TO_VIEW_THIS_DIVX_PROTECTED_VIDEO_DIVIX"
+msgstr "未經授權的影片輸出。請使用 HDMI 觀看此段受 DivX 保護的影片"
+
+msgid "IDS_VPL_POP_YOUR_DEVICE_IS_NOT_AUTHORIZED_TO_PLAY_THIS_DIVX_PROTECTED_VIDEO_DIVX"
+msgstr "裝置未獲授權,無法播放此DivX®保護的影片"
+
+msgid "IDS_VPL_SK3_TRIM"
+msgstr "修剪"
+
+msgid "IDS_VPL_HEADER_VIDEO_PLAYER"
+msgstr "影片播放器"
+
+msgid "IDS_VPL_POP_NO_MEDIA_FILE"
+msgstr "無媒體檔案"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_VIDEO_ERROR_OCCURRED"
+msgstr "無法播放影片。發生錯誤"
+
+msgid "IDS_VPL_BODY_FILE_SIZE"
+msgstr "檔案大小"
+
+msgid "IDS_VPL_BUTTON_TRIM"
+msgstr "修剪"
+
+msgid "IDS_VPL_HEADER_SHARE_VIDEO_ABB"
+msgstr "共享影片"
+
+msgid "IDS_VPL_HEADER_VIDEO_LIST"
+msgstr "影片清單"
+
+msgid "IDS_VPL_OPT_KEEP_ASPECT_RATIO"
+msgstr "保持屏幕寬高比例"
+
+msgid "IDS_VPL_OPT_SET_AS"
+msgstr "設定為"
+
+msgid "IDS_VPL_OPT_SUBTITLES"
+msgstr "字幕"
+
+msgid "IDS_VPL_POP_UNABLE_TO_FIND_FILE"
+msgstr "無法尋找檔案"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_VIDEO_INVALID_STREAMING_DATA"
+msgstr "無法播放影片。無效串流數據"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_AUDIO_FORMAT"
+msgstr "不支援的音效格式"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_FILE_TYPE"
+msgstr "不支援的檔案類型"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_FORMAT"
+msgstr "不支援格式"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_VIDEO_FORMAT"
+msgstr "不支援的影片格式"
+
+msgid "IDS_VPL_OPT_RESOLUTION"
+msgstr "解像度"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL"
+msgstr "通話期間無法播放影片"
+
+msgid "IDS_VPL_OPT_NORMAL"
+msgstr "正常"
+
+msgid "IDS_VPL_BODY_VOICE_M_SOUNDEFFECT"
+msgstr "語音"
+
+msgid "IDS_VPL_BODY_MOVIE_M_SOUNDEFFECT"
+msgstr "電影"
+
+msgid "IDS_VPL_BODY_51CH_M_SOUNDEFFECT"
+msgstr "7.1 聲道"
+
+msgid "IDS_VPL_POP_51_CHANNEL_SOUND_EFFECT_WORKS_IN_EARPHONE_MODE_ONLY"
+msgstr "7.1 聲道音效只適用於耳機模式"
+
+msgid "IDS_VPL_BODY_LATITUDE"
+msgstr "緯度"
+
+msgid "IDS_VPL_BODY_LONGITUDE"
+msgstr "經度"
+
diff --git a/res/po/zh_TW.po b/res/po/zh_TW.po
new file mode 100755 (executable)
index 0000000..8237fde
--- /dev/null
@@ -0,0 +1,198 @@
+msgid "IDS_VPL_BODY_ALREADY_EXISTS"
+msgstr "已存在"
+
+msgid "IDS_VPL_BODY_BLUETOOTH_STEREO_HEADSET_DISCONNECTED"
+msgstr "藍牙立體聲耳機已中斷連線"
+
+msgid "IDS_VPL_BODY_DRM_FILE_NOT_SUPPORTED_EXCEPT_FOR_FORWARD_LOCK_TYPE"
+msgstr "不支援除了轉寄鎖定類型外的 DRM 檔案"
+
+msgid "IDS_VPL_BODY_NEW_TAG"
+msgstr "新標籤"
+
+msgid "IDS_VPL_BODY_ORIGINAL"
+msgstr "原圖"
+
+msgid "IDS_VPL_BODY_PLAY_IN_SILENT_MODE_Q"
+msgstr "在靜音模式下播放嗎?"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_DRM_FILE"
+msgstr "Unable to play DRM file"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_SEND_THIS_ITEM_IS_FORWARD_LOCKED"
+msgstr "無法傳送。此項目已鎖定轉寄"
+
+msgid "IDS_VPL_BODY_UNSUPPORTED_DIVX_DRM_VERSION"
+msgstr "不支援的 DivX DRM 版本"
+
+msgid "IDS_VPL_BUTTON_BOOKMARK"
+msgstr "書籤"
+
+msgid "IDS_VPL_BUTTON_DONE"
+msgstr "完成"
+
+msgid "IDS_VPL_HEADER_FAVOURITE"
+msgstr "我的最愛"
+
+msgid "IDS_VPL_MBODY_DETAILS_ABB"
+msgstr "詳細"
+
+msgid "IDS_VPL_MBODY_RESOLUTION"
+msgstr "解析度"
+
+msgid "IDS_VPL_OPT_ADD_BOOKMARK"
+msgstr "新增書籤"
+
+msgid "IDS_VPL_OPT_ALLSHARE"
+msgstr "AllShare"
+
+msgid "IDS_VPL_OPT_MESSAGE"
+msgstr "訊息"
+
+msgid "IDS_VPL_OPT_NAME"
+msgstr "名稱"
+
+msgid "IDS_VPL_OPT_ON_ALLSHARE_ABB"
+msgstr "On AllShare"
+
+msgid "IDS_VPL_OPT_TRIM_AS_NEW_VIDEO_ABB"
+msgstr "剪輯為新影片"
+
+msgid "IDS_VPL_OPT_TRIM_ORIGINAL_VIDEO_ABB"
+msgstr "剪輯原始影片"
+
+msgid "IDS_VPL_POP_ACCOUNT"
+msgstr "帳戶"
+
+msgid "IDS_VPL_POP_ADD_SHORTCUT"
+msgstr "加入捷徑"
+
+msgid "IDS_VPL_POP_ADD_TAG"
+msgstr "加入標籤"
+
+msgid "IDS_VPL_POP_BOOKMARK_LIST_FULL_DELETE_SOME_BOOKMARKS"
+msgstr "書籤清單已滿。請刪除部分書籤"
+
+msgid "IDS_VPL_POP_DISCONNECTED_FROM_SERVER"
+msgstr "伺服器連線中斷"
+
+msgid "IDS_VPL_POP_GATEWAY_TIME_OUT"
+msgstr "閘道逾時"
+
+msgid "IDS_VPL_POP_INTERNAL_SERVER_ERROR"
+msgstr "內部伺服器錯誤"
+
+msgid "IDS_VPL_POP_LICENCE_EXPIRED"
+msgstr "授權已到期"
+
+msgid "IDS_VPL_POP_LOADING_ING"
+msgstr "正在載入..."
+
+msgid "IDS_VPL_POP_NO_FILES"
+msgstr "無檔案"
+
+msgid "IDS_VPL_POP_OUT_OF_MEMORIES"
+msgstr "記憶體不足"
+
+msgid "IDS_VPL_POP_SAVE_AS"
+msgstr "另存為"
+
+msgid "IDS_VPL_POP_TO_PLAY_DIVX_PROTECTED_VIDEOS_YOUR_DEVICE_MUST_BE_REGISTERED_REGISTRATION_CODE_C_PS_REGISTER_AT_HTTP_C_VODDIVXCOM_DIVX"
+msgstr "要播放DivX保護的影片,您的設備必須註冊。註冊代碼:%s登錄在http://vod.divx.com"
+
+msgid "IDS_VPL_POP_TRIMMING_VIDEO_ING"
+msgstr "正在剪輯影片..."
+
+msgid "IDS_VPL_POP_UNABLE_TO_CONNECT"
+msgstr "無法連線"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_INVALID_PACKET_FROM_SERVER"
+msgstr "無法播放。來自伺服器的封包無效"
+
+msgid "IDS_VPL_POP_UNAUTHORIZED_VIDEO_OUTPUT_PLEASE_USE_ANALOG_OUTPUT_TO_VIEW_THIS_DIVX_PROTECTED_VIDEO_DIVIX"
+msgstr "未經授權的影片輸出。請使用模擬輸出觀賞受DivX保護的影片"
+
+msgid "IDS_VPL_POP_UNAUTHORIZED_VIDEO_OUTPUT_PLEASE_USE_HDMI_TO_VIEW_THIS_DIVX_PROTECTED_VIDEO_DIVIX"
+msgstr "未經授權的影片輸出。請使用HDMI觀賞受DivX保護的影片"
+
+msgid "IDS_VPL_POP_YOUR_DEVICE_IS_NOT_AUTHORIZED_TO_PLAY_THIS_DIVX_PROTECTED_VIDEO_DIVX"
+msgstr "您的設備沒有被授權播放這個DivX®加密的視頻。"
+
+msgid "IDS_VPL_SK3_TRIM"
+msgstr "修剪"
+
+msgid "IDS_VPL_HEADER_VIDEO_PLAYER"
+msgstr "視訊播放器"
+
+msgid "IDS_VPL_POP_NO_MEDIA_FILE"
+msgstr "無媒體文件"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_VIDEO_ERROR_OCCURRED"
+msgstr "無法播放影片。發生錯誤"
+
+msgid "IDS_VPL_BODY_FILE_SIZE"
+msgstr "檔案大小"
+
+msgid "IDS_VPL_BUTTON_TRIM"
+msgstr "剪輯"
+
+msgid "IDS_VPL_HEADER_SHARE_VIDEO_ABB"
+msgstr "分享影片"
+
+msgid "IDS_VPL_HEADER_VIDEO_LIST"
+msgstr "影片清單"
+
+msgid "IDS_VPL_OPT_KEEP_ASPECT_RATIO"
+msgstr "保持螢幕顯示比例"
+
+msgid "IDS_VPL_OPT_SET_AS"
+msgstr "設定為"
+
+msgid "IDS_VPL_OPT_SUBTITLES"
+msgstr "字幕"
+
+msgid "IDS_VPL_POP_UNABLE_TO_FIND_FILE"
+msgstr "無法找到檔案"
+
+msgid "IDS_VPL_POP_UNABLE_TO_PLAY_VIDEO_INVALID_STREAMING_DATA"
+msgstr "無法播放影片。無效的串流數據"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_AUDIO_FORMAT"
+msgstr "不支援的音訊格式"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_FILE_TYPE"
+msgstr "不支援的檔案類型"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_FORMAT"
+msgstr "不支援格式"
+
+msgid "IDS_VPL_POP_UNSUPPORTED_VIDEO_FORMAT"
+msgstr "不支援的視訊格式"
+
+msgid "IDS_VPL_OPT_RESOLUTION"
+msgstr "解析度"
+
+msgid "IDS_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL"
+msgstr "無法在通話期間播放影片"
+
+msgid "IDS_VPL_OPT_NORMAL"
+msgstr "正常"
+
+msgid "IDS_VPL_BODY_VOICE_M_SOUNDEFFECT"
+msgstr "語音"
+
+msgid "IDS_VPL_BODY_MOVIE_M_SOUNDEFFECT"
+msgstr "電影"
+
+msgid "IDS_VPL_BODY_51CH_M_SOUNDEFFECT"
+msgstr "7.1 聲道"
+
+msgid "IDS_VPL_POP_51_CHANNEL_SOUND_EFFECT_WORKS_IN_EARPHONE_MODE_ONLY"
+msgstr "7.1 聲道音效只適用於耳機模式"
+
+msgid "IDS_VPL_BODY_LATITUDE"
+msgstr "緯度"
+
+msgid "IDS_VPL_BODY_LONGITUDE"
+msgstr "經度"
+
diff --git a/src/Makefile.am b/src/Makefile.am
deleted file mode 100644 (file)
index 344cc57..0000000
+++ /dev/null
@@ -1,214 +0,0 @@
-# Process this file with automake to produce Makefile.in
-
-NULL =
-BUILT_SOURCES =
-EXTRA_DIST =
-CLEANFILES =
-DISTCLEANFILES =
-MAINTAINERCLEANFILES =
-
-# The following warning options are useful for debugging: -Wpadded -Wcast-align
-#AM_CXXFLAGS =
-
-lib_LTLIBRARIES = libharfbuzz.la
-
-HBCFLAGS =
-HBLIBS =
-HBSOURCES =  \
-       hb-atomic-private.hh \
-       hb-blob.cc \
-       hb-buffer-private.hh \
-       hb-buffer.cc \
-       hb-cache-private.hh \
-       hb-common.cc \
-       hb-fallback-shape-private.hh \
-       hb-fallback-shape.cc \
-       hb-font-private.hh \
-       hb-font.cc \
-       hb-mutex-private.hh \
-       hb-object-private.hh \
-       hb-open-file-private.hh \
-       hb-open-type-private.hh \
-       hb-ot-head-table.hh \
-       hb-ot-hhea-table.hh \
-       hb-ot-hmtx-table.hh \
-       hb-ot-maxp-table.hh \
-       hb-ot-name-table.hh \
-       hb-ot-tag.cc \
-       hb-private.hh \
-       hb-set-private.hh \
-       hb-set.cc \
-       hb-shape.cc \
-       hb-tt-font.cc \
-       hb-unicode-private.hh \
-       hb-unicode.cc \
-       hb-warning.cc \
-       $(NULL)
-HBHEADERS = \
-       hb.h \
-       hb-blob.h \
-       hb-buffer.h \
-       hb-common.h \
-       hb-font.h \
-       hb-set.h \
-       hb-shape.h \
-       hb-unicode.h \
-       hb-version.h \
-       $(NULL)
-
-if HAVE_OT
-HBSOURCES += \
-       hb-ot-layout.cc \
-       hb-ot-layout-common-private.hh \
-       hb-ot-layout-gdef-table.hh \
-       hb-ot-layout-gpos-table.hh \
-       hb-ot-layout-gsubgpos-private.hh \
-       hb-ot-layout-gsub-table.hh \
-       hb-ot-layout-private.hh \
-       hb-ot-map.cc \
-       hb-ot-map-private.hh \
-       hb-ot-shape.cc \
-       hb-ot-shape-complex-arabic.cc \
-       hb-ot-shape-complex-arabic-table.hh \
-       hb-ot-shape-complex-indic.cc \
-       hb-ot-shape-complex-indic-machine.hh \
-       hb-ot-shape-complex-indic-private.hh \
-       hb-ot-shape-complex-indic-table.hh \
-       hb-ot-shape-complex-misc.cc \
-       hb-ot-shape-complex-private.hh \
-       hb-ot-shape-normalize-private.hh \
-       hb-ot-shape-normalize.cc \
-       hb-ot-shape-private.hh \
-       $(NULL)
-HBHEADERS += \
-       hb-ot.h \
-       hb-ot-layout.h \
-       hb-ot-tag.h \
-       $(NULL)
-endif
-
-if HAVE_GLIB
-HBCFLAGS += $(GLIB_CFLAGS)
-HBLIBS   += $(GLIB_LIBS)
-HBSOURCES += hb-glib.cc
-HBHEADERS += hb-glib.h
-endif
-
-if HAVE_GOBJECT
-HBCFLAGS += $(GOBJECT_CFLAGS)
-HBLIBS   += $(GOBJECT_LIBS)
-HBSOURCES += hb-gobject-structs.cc
-nodist_HBSOURCES = hb-gobject-enums.cc
-HBHEADERS += hb-gobject.h
-BUILT_SOURCES += hb-gobject-enums.cc
-EXTRA_DIST += hb-gobject-enums.cc.tmpl
-DISTCLEANFILES += hb-gobject-enums.cc
-
-hb-gobject-enums.cc: hb-gobject-enums.cc.tmpl $(HBHEADERS)
-       $(AM_V_GEN) $(GLIB_MKENUMS) --template $^ > "$@.tmp" && \
-       mv "$@.tmp" "$@" || ( $(RM) "@.tmp" && false )
-endif
-
-if HAVE_ICU
-HBCFLAGS += $(ICU_CFLAGS)
-HBLIBS   += $(ICU_LIBS)
-HBSOURCES += hb-icu.cc
-HBHEADERS += hb-icu.h
-endif
-
-if HAVE_FREETYPE
-HBCFLAGS += $(FREETYPE_CFLAGS)
-HBLIBS   += $(FREETYPE_LIBS)
-HBSOURCES += hb-ft.cc
-HBHEADERS += hb-ft.h
-endif
-
-if HAVE_GRAPHITE2
-HBCFLAGS += $(GRAPHITE2_CFLAGS)
-HBLIBS   += $(GRAPHITE2_LIBS)
-HBSOURCES += hb-graphite2.cc hb-graphite2-private.hh
-HBHEADERS += hb-graphite2.h
-endif
-
-if HAVE_UNISCRIBE
-HBCFLAGS += $(UNISCRIBE_CFLAGS)
-HBLIBS   += $(UNISCRIBE_LIBS)
-HBSOURCES += hb-uniscribe.cc hb-uniscribe-private.hh
-HBHEADERS += hb-uniscribe.h
-endif
-
-# Use a C linker, not C++; Don't link to libstdc++
-libharfbuzz_la_LINK = $(LINK) $(libharfbuzz_la_LDFLAGS)
-libharfbuzz_la_SOURCES = $(HBSOURCES) $(HBHEADERS)
-nodist_libharfbuzz_la_SOURCES = $(nodist_HBSOURCES)
-libharfbuzz_la_CPPFLAGS = $(HBCFLAGS)
-libharfbuzz_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(HB_LIBTOOL_VERSION_INFO) -no-undefined
-libharfbuzz_la_LIBADD = $(HBLIBS)
-pkginclude_HEADERS = $(HBHEADERS)
-nodist_pkginclude_HEADERS = hb-version.h
-
-
-GENERATORS = \
-       gen-arabic-table.py \
-       gen-indic-table.py \
-       $(NULL)
-
-EXTRA_DIST += $(GENERATORS)
-
-unicode-tables: arabic-table indic-table
-
-indic-table: gen-indic-table.py IndicSyllabicCategory.txt IndicMatraCategory.txt Blocks.txt
-       $(AM_V_GEN) $(builddir)/$^ > hb-ot-shape-complex-indic-table.hh.tmp && \
-       mv hb-ot-shape-complex-indic-table.hh.tmp $(srcdir)/hb-ot-shape-complex-indic-table.hh || \
-       ($(RM) hb-ot-shape-complex-indic-table.hh.tmp; false)
-
-arabic-table: gen-arabic-table.py ArabicShaping.txt UnicodeData.txt
-       $(AM_V_GEN) $(builddir)/$^ > hb-ot-shape-complex-arabic-table.hh.tmp && \
-       mv hb-ot-shape-complex-arabic-table.hh.tmp $(srcdir)/hb-ot-shape-complex-arabic-table.hh || \
-       ($(RM) hb-ot-shape-complex-arabic-table.hh.tmp; false)
-
-
-.PHONY: unicode-tables arabic-table indic-table
-
-BUILT_SOURCES += hb-ot-shape-complex-indic-machine.hh
-EXTRA_DIST += hb-ot-shape-complex-indic-machine.rl
-hb-ot-shape-complex-indic-machine.hh: hb-ot-shape-complex-indic-machine.rl
-       $(AM_V_GEN)$(top_srcdir)/missing --run ragel -e -F1 -o "$@.tmp" "$<" && \
-       mv "$@.tmp" "$@" || ( $(RM) "$@.tmp" && false )
-
-noinst_PROGRAMS = main indic
-bin_PROGRAMS =
-
-main_SOURCES = main.cc
-main_CPPFLAGS = $(HBCFLAGS)
-main_LDADD = libharfbuzz.la $(HBLIBS)
-
-indic_SOURCES = indic.cc
-indic_CPPFLAGS = $(HBCFLAGS)
-indic_LDADD = libharfbuzz.la $(HBLIBS)
-
-dist_check_SCRIPTS = \
-       check-c-linkage-decls.sh \
-       check-header-guards.sh \
-       check-internal-symbols.sh \
-       check-includes.sh \
-       $(NULL)
-
-if HAVE_ICU
-else
-dist_check_SCRIPTS += check-libstdc++.sh
-endif
-
-TESTS = $(dist_check_SCRIPTS)
-TESTS_ENVIRONMENT = \
-       srcdir="$(srcdir)" \
-       MAKE="$(MAKE) $(AM_MAKEFLAGS)" \
-       HBSOURCES="$(HBSOURCES)" \
-       HBHEADERS="$(HBHEADERS)" \
-       $(NULL)
-
-scan:
-       g-ir-scanner $(HBCFLAGS) $(HBHEADERS) -n hb --strip-prefix=hb --library libharfbuzz.la
-
-
--include $(top_srcdir)/git.mk
diff --git a/src/check-c-linkage-decls.sh b/src/check-c-linkage-decls.sh
deleted file mode 100755 (executable)
index e7c95ab..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-LC_ALL=C
-export LC_ALL
-
-test -z "$srcdir" && srcdir=.
-stat=0
-
-test "x$HBHEADERS" = x && HBHEADERS=`find . -maxdepth 1 -name 'hb*.h'`
-
-
-for x in $HBHEADERS; do
-       test -f $srcdir/$x && x=$srcdir/$x
-       if ! grep -q HB_BEGIN_DECLS "$x" || ! grep -q HB_END_DECLS "$x"; then
-               echo "Ouch, file $x does not HB_BEGIN_DECLS / HB_END_DECLS"
-               stat=1
-       fi
-done
-
-exit $stat
diff --git a/src/check-header-guards.sh b/src/check-header-guards.sh
deleted file mode 100755 (executable)
index af9fa7f..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-LC_ALL=C
-export LC_ALL
-
-test -z "$srcdir" && srcdir=.
-stat=0
-
-test "x$HBHEADERS" = x && HBHEADERS=`find . -maxdepth 1 -name 'hb*.h'`
-test "x$HBSOURCES" = x && HBSOURCES=`find . -maxdepth 1 -name 'hb-*.cc' -or -name 'hb-*.hh'`
-
-
-for x in $HBHEADERS $HBSOURCES; do
-       test -f "$srcdir/$x" && x="$srcdir/$x"
-       echo "$x" | grep '[^h]$' -q && continue;
-       xx=`echo "$x" | sed 's@.*/@@'`
-       tag=`echo "$xx" | tr 'a-z.-' 'A-Z_'`
-       lines=`grep "\<$tag\>" "$x" | wc -l | sed 's/[  ]*//g'`
-       if test "x$lines" != x3; then
-               echo "Ouch, header file $x does not have correct preprocessor guards"
-               stat=1
-       fi
-done
-
-exit $stat
diff --git a/src/check-includes.sh b/src/check-includes.sh
deleted file mode 100755 (executable)
index 79323a7..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/sh
-
-LC_ALL=C
-export LC_ALL
-
-test -z "$srcdir" && srcdir=.
-stat=0
-
-test "x$HBHEADERS" = x && HBHEADERS=`find . -maxdepth 1 -name 'hb*.h'`
-test "x$HBSOURCES" = x && HBSOURCES=`find . -maxdepth 1 -name 'hb-*.cc' -or -name 'hb-*.hh'`
-
-
-cd "$srcdir"
-
-
-echo 'Checking that public header files #include "hb-common.h" or "hb.h" first (or none)'
-
-for x in $HBHEADERS; do
-       grep '#.*\<include\>' "$x" /dev/null | head -n 1
-done |
-grep -v '"hb-common[.]h"' |
-grep -v '"hb[.]h"' |
-grep -v 'hb-common[.]h:' |
-grep -v 'hb[.]h:' |
-grep . >&2 && stat=1
-
-
-echo 'Checking that source files #include "hb-*private.hh" first (or none)'
-
-for x in $HBSOURCES; do
-       grep '#.*\<include\>' "$x" /dev/null | head -n 1
-done |
-grep -v '"hb-.*private[.]hh"' |
-grep -v 'hb-private[.]hh:' |
-grep . >&2 && stat=1
-
-
-echo 'Checking that there is no #include <hb.*.h>'
-grep '#.*\<include\>.*<.*hb' $HBHEADERS $HBSOURCES >&2 && stat=1
-
-
-exit $stat
diff --git a/src/check-internal-symbols.sh b/src/check-internal-symbols.sh
deleted file mode 100755 (executable)
index a24a693..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/sh
-
-LC_ALL=C
-export LC_ALL
-
-test -z "$srcdir" && srcdir=.
-stat=0
-
-
-if which nm 2>/dev/null >/dev/null; then
-       :
-else
-       echo "check-internal-symbols.sh: 'nm' not found; skipping test"
-       exit 77
-fi
-
-tested=false
-for suffix in so; do
-       so=.libs/libharfbuzz.$suffix
-       if test -f "$so"; then
-               echo "Checking that we are exposing internal symbols"
-               if nm $so | grep ' T ' | grep -v ' T _fini\>\| T _init\>\| T hb_'; then
-                       echo "Ouch, internal symbols exposed"
-                       stat=1
-               fi
-               tested=true
-       fi
-done
-if ! $tested; then
-       echo "check-internal-symbols.sh: libharfbuzz shared library not found; skipping test"
-       exit 77
-fi
-
-exit $stat
diff --git a/src/check-libstdc++.sh b/src/check-libstdc++.sh
deleted file mode 100755 (executable)
index 0521532..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/sh
-
-LC_ALL=C
-export LC_ALL
-
-test -z "$srcdir" && srcdir=.
-stat=0
-
-
-if which ldd 2>/dev/null >/dev/null; then
-       :
-else
-       echo "check-libstdc++.sh: 'ldd' not found; skipping test"
-       exit 77
-fi
-
-tested=false
-for suffix in so dylib; do
-       so=.libs/libharfbuzz.$suffix
-       if test -f "$so"; then
-               echo "Checking that we are not linking to libstdc++"
-               if ldd $so | grep 'libstdc[+][+]'; then
-                       echo "Ouch, linked to libstdc++"
-                       stat=1
-               fi
-               tested=true
-       fi
-done
-if ! $tested; then
-       echo "check-internal-symbols.sh: libharfbuzz shared library not found; skipping test"
-       exit 77
-fi
-
-exit $stat
diff --git a/src/gen-arabic-table.py b/src/gen-arabic-table.py
deleted file mode 100755 (executable)
index 2d3c881..0000000
+++ /dev/null
@@ -1,197 +0,0 @@
-#!/usr/bin/python
-
-import sys
-import os.path
-
-if len (sys.argv) != 3:
-       print >>sys.stderr, "usage: ./gen-arabic-table.py ArabicShaping.txt UnicodeData.txt"
-       sys.exit (1)
-
-files = [file (x) for x in sys.argv[1:]]
-
-headers = [[files[0].readline (), files[0].readline ()]]
-headers.append (["UnicodeData.txt does not have a header."])
-while files[0].readline ().find ('##################') < 0:
-       pass
-
-
-def print_joining_table(f):
-
-       print
-       print "static const uint8_t joining_table[] ="
-       print "{"
-
-       min_u = 0x110000
-       max_u = 0
-       num = 0
-       last = -1
-       block = ''
-       for line in f:
-
-               if line[0] == '#':
-                       if line.find (" characters"):
-                               block = line[2:].strip ()
-                       continue
-
-               fields = [x.strip () for x in line.split (';')]
-               if len (fields) == 1:
-                       continue
-
-               u = int (fields[0], 16)
-               if u == 0x200C or u == 0x200D:
-                       continue
-               if u < last:
-                       raise Exception ("Input data character not sorted", u)
-               min_u = min (min_u, u)
-               max_u = max (max_u, u)
-               num += 1
-
-               if block:
-                       print "\n  /* %s */\n" % block
-                       block = ''
-
-               if last != -1:
-                       last += 1
-                       while last < u:
-                               print "  JOINING_TYPE_X, /* %04X */" % last
-                               last += 1
-               else:
-                       last = u
-
-               if fields[3] in ["ALAPH", "DALATH RISH"]:
-                       value = "JOINING_GROUP_" + fields[3].replace(' ', '_')
-               else:
-                       value = "JOINING_TYPE_" + fields[2]
-               print "  %s, /* %s */" % (value, '; '.join(fields))
-
-       print
-       print "};"
-       print
-       print "#define JOINING_TABLE_FIRST      0x%04X" % min_u
-       print "#define JOINING_TABLE_LAST       0x%04X" % max_u
-       print
-
-       occupancy = num * 100 / (max_u - min_u + 1)
-       # Maintain at least 40% occupancy in the table */
-       if occupancy < 40:
-               raise Exception ("Table too sparse, please investigate: ", occupancy)
-
-def print_shaping_table(f):
-
-       shapes = {}
-       ligatures = {}
-       names = {}
-       for line in f:
-
-               fields = [x.strip () for x in line.split (';')]
-               if fields[5][0:1] != '<':
-                       continue
-
-               items = fields[5].split (' ')
-               shape, items = items[0][1:-1], tuple (int (x, 16) for x in items[1:])
-
-               if not shape in ['initial', 'medial', 'isolated', 'final']:
-                       continue
-
-               c = int (fields[0], 16)
-               if len (items) != 1:
-                       # We only care about lam-alef ligatures
-                       if len (items) != 2 or items[0] != 0x0644 or items[1] not in [0x0622, 0x0623, 0x0625, 0x0627]:
-                               continue
-
-                       # Save ligature
-                       names[c] = fields[1]
-                       if items not in ligatures:
-                               ligatures[items] = {}
-                       ligatures[items][shape] = c
-                       pass
-               else:
-                       # Save shape
-                       if items[0] not in names:
-                               names[items[0]] = fields[1]
-                       else:
-                               names[items[0]] = os.path.commonprefix ([names[items[0]], fields[1]]).strip ()
-                       if items[0] not in shapes:
-                               shapes[items[0]] = {}
-                       shapes[items[0]][shape] = c
-
-       print
-       print "static const uint16_t shaping_table[][4] ="
-       print "{"
-
-       keys = shapes.keys ()
-       min_u, max_u = min (keys), max (keys)
-       for u in range (min_u, max_u + 1):
-               s = [shapes[u][shape] if u in shapes and shape in shapes[u] else u
-                    for shape in  ['initial', 'medial', 'final', 'isolated']]
-               value = ', '.join ("0x%04X" % c for c in s)
-               print "  {%s}, /* U+%04X %s */" % (value, u, names[u] if u in names else "")
-
-       print "};"
-       print
-       print "#define SHAPING_TABLE_FIRST      0x%04X" % min_u
-       print "#define SHAPING_TABLE_LAST       0x%04X" % max_u
-       print
-
-       ligas = {}
-       for pair in ligatures.keys ():
-               for shape in ligatures[pair]:
-                       c = ligatures[pair][shape]
-                       if shape == 'isolated':
-                               liga = (shapes[pair[0]]['initial'], shapes[pair[1]]['final'])
-                       elif shape == 'final':
-                               liga = (shapes[pair[0]]['medial'], shapes[pair[1]]['final'])
-                       else:
-                               raise Exception ("Unexpected shape", shape)
-                       if liga[0] not in ligas:
-                               ligas[liga[0]] = []
-                       ligas[liga[0]].append ((liga[1], c))
-       max_i = max (len (ligas[l]) for l in ligas)
-       print
-       print "static const struct {"
-       print " uint16_t first;"
-       print " struct {"
-       print "   uint16_t second;"
-       print "   uint16_t ligature;"
-       print " } ligatures[%d];" % max_i
-       print "} ligature_table[] ="
-       print "{"
-       keys = ligas.keys ()
-       keys.sort ()
-       for first in keys:
-
-               print "  { 0x%04X, {" % (first)
-               for liga in ligas[first]:
-                       print "    { 0x%04X, 0x%04X }, /* %s */" % (liga[0], liga[1], names[liga[1]])
-               print "  }},"
-
-       print "};"
-       print
-
-
-
-print "/* == Start of generated table == */"
-print "/*"
-print " * The following table is generated by running:"
-print " *"
-print " *   ./gen-arabic-table.py ArabicShaping.txt UnicodeData.txt"
-print " *"
-print " * on files with these headers:"
-print " *"
-for h in headers:
-       for l in h:
-               print " * %s" % (l.strip())
-print " */"
-print
-print "#ifndef HB_OT_SHAPE_COMPLEX_ARABIC_TABLE_HH"
-print "#define HB_OT_SHAPE_COMPLEX_ARABIC_TABLE_HH"
-print
-
-print_joining_table (files[0])
-print_shaping_table (files[1])
-
-print
-print "#endif /* HB_OT_SHAPE_COMPLEX_ARABIC_TABLE_HH */"
-print
-print "/* == End of generated table == */"
-
diff --git a/src/gen-indic-table.py b/src/gen-indic-table.py
deleted file mode 100755 (executable)
index 94aa2ab..0000000
+++ /dev/null
@@ -1,211 +0,0 @@
-#!/usr/bin/python
-
-import sys
-
-if len (sys.argv) != 4:
-       print >>sys.stderr, "usage: ./gen-indic-table.py IndicSyllabicCategory.txt IndicMatraCategory.txt Blocks.txt"
-       sys.exit (1)
-
-files = [file (x) for x in sys.argv[1:]]
-
-headers = [[f.readline () for i in range (2)] for f in files]
-
-blocks = {}
-data = [{} for f in files]
-values = [{} for f in files]
-for i, f in enumerate (files):
-       for line in f:
-
-               j = line.find ('#')
-               if j >= 0:
-                       line = line[:j]
-
-               fields = [x.strip () for x in line.split (';')]
-               if len (fields) == 1:
-                       continue
-
-               uu = fields[0].split ('..')
-               start = int (uu[0], 16)
-               if len (uu) == 1:
-                       end = start
-               else:
-                       end = int (uu[1], 16)
-
-               t = fields[1]
-
-               for u in range (start, end + 1):
-                       data[i][u] = t
-               values[i][t] = values[i].get (t, 0) + 1
-
-               if i == 2:
-                       blocks[t] = (start, end)
-
-# Merge data into one dict:
-defaults = ('Other', 'Not_Applicable', 'No_Block')
-for i,v in enumerate (defaults):
-       values[i][v] = values[i].get (v, 0) + 1
-combined = {}
-for i,d in enumerate (data):
-       for u,v in d.items ():
-               if i == 2 and not u in combined:
-                       continue
-               if not u in combined:
-                       combined[u] = list (defaults)
-               combined[u][i] = v
-data = combined
-del combined
-num = len (data)
-
-# Move the outliers NO-BREAK SPACE and DOTTED CIRCLE out
-singles = {}
-for u in [0x00A0, 0x25CC]:
-       singles[u] = data[u]
-       del data[u]
-
-print "/* == Start of generated table == */"
-print "/*"
-print " * The following table is generated by running:"
-print " *"
-print " *   ./gen-indic-table.py IndicSyllabicCategory.txt IndicMatraCategory.txt Blocks.txt"
-print " *"
-print " * on files with these headers:"
-print " *"
-for h in headers:
-       for l in h:
-               print " * %s" % (l.strip())
-print " */"
-print
-print "#ifndef HB_OT_SHAPE_COMPLEX_INDIC_TABLE_HH"
-print "#define HB_OT_SHAPE_COMPLEX_INDIC_TABLE_HH"
-print
-
-# Shorten values
-short = [{
-       "Bindu":                'Bi',
-       "Visarga":              'Vs',
-       "Vowel":                'Vo',
-       "Vowel_Dependent":      'M',
-       "Other":                'x',
-},{
-       "Not_Applicable":       'x',
-}]
-all_shorts = [[],[]]
-
-# Add some of the values, to make them more readable, and to avoid duplicates
-
-
-for i in range (2):
-       for v,s in short[i].items ():
-               all_shorts[i].append (s)
-
-what = ["INDIC_SYLLABIC_CATEGORY", "INDIC_MATRA_CATEGORY"]
-what_short = ["ISC", "IMC"]
-for i in range (2):
-       print
-       vv = values[i].keys ()
-       vv.sort ()
-       for v in vv:
-               v_no_and = v.replace ('_And_', '_')
-               if v in short[i]:
-                       s = short[i][v]
-               else:
-                       s = ''.join ([c for c in v_no_and if ord ('A') <= ord (c) <= ord ('Z')])
-                       if s in all_shorts[i]:
-                               raise Exception ("Duplicate short value alias", v, s)
-                       all_shorts[i].append (s)
-                       short[i][v] = s
-               print "#define %s_%s    %s_%s   %s/* %3d chars; %s */" % \
-                       (what_short[i], s, what[i], v.upper (), \
-                       '       '* ((48-1 - len (what[i]) - 1 - len (v)) / 8), \
-                       values[i][v], v)
-print
-print "#define _(S,M) INDIC_COMBINE_CATEGORIES (ISC_##S, IMC_##M)"
-print
-print
-
-total = 0
-used = 0
-def print_block (block, start, end, data):
-       print
-       print
-       print "  /* %s  (%04X..%04X) */" % (block, start, end)
-       num = 0
-       for u in range (start, end+1):
-               if u % 8 == 0:
-                       print
-                       print "  /* %04X */" % u,
-               if u in data:
-                       num += 1
-               d = data.get (u, defaults)
-               sys.stdout.write ("%9s" % ("_(%s,%s)," % (short[0][d[0]], short[1][d[1]])))
-
-       global total, used
-       total += end - start + 1
-       used += num
-
-uu = data.keys ()
-uu.sort ()
-
-last = -1
-num = 0
-offset = 0
-starts = []
-ends = []
-print "static const INDIC_TABLE_ELEMENT_TYPE indic_table[] = {"
-for u in uu:
-       if u <= last:
-               continue
-       block = data[u][2]
-       (start, end) = blocks[block]
-
-       if start != last + 1:
-               if start - last <= 33:
-                       print_block ("FILLER", last+1, start-1, data)
-                       last = start-1
-               else:
-                       if last >= 0:
-                               ends.append (last + 1)
-                               offset += ends[-1] - starts[-1]
-                       print
-                       print
-                       print "#define indic_offset_0x%04x %d" % (start, offset)
-                       starts.append (start)
-
-       print_block (block, start, end, data)
-       last = end
-ends.append (last + 1)
-offset += ends[-1] - starts[-1]
-print
-print
-print "#define indic_offset_total %d" % offset
-print
-occupancy = used * 100. / total
-print "}; /* Table occupancy: %d%% */" % occupancy
-print
-print "static INDIC_TABLE_ELEMENT_TYPE"
-print "get_indic_categories (hb_codepoint_t u)"
-print "{"
-for (start,end) in zip (starts, ends):
-       offset = "indic_offset_0x%04x" % start
-       print "  if (0x%04X <= u && u <= 0x%04X) return indic_table[u - 0x%04X + %s];" % (start, end, start, offset)
-for u,d in singles.items ():
-       print "  if (unlikely (u == 0x%04X)) return _(%s,%s);" % (u, short[0][d[0]], short[1][d[1]])
-print "  return _(x,x);"
-print "}"
-print
-print "#undef _"
-for i in range (2):
-       print
-       vv = values[i].keys ()
-       vv.sort ()
-       for v in vv:
-               print "#undef %s_%s" % \
-                       (what_short[i], short[i][v])
-print
-print "#endif /* HB_OT_SHAPE_COMPLEX_INDIC_TABLE_HH */"
-print
-print "/* == End of generated table == */"
-
-# Maintain at least 30% occupancy in the table */
-if occupancy < 30:
-       raise Exception ("Table too sparse, please investigate: ", occupancy)
diff --git a/src/hb-atomic-private.hh b/src/hb-atomic-private.hh
deleted file mode 100644 (file)
index c543a8d..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright © 2007  Chris Wilson
- * Copyright © 2009,2010  Red Hat, Inc.
- * Copyright © 2011,2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Contributor(s):
- *     Chris Wilson <chris@chris-wilson.co.uk>
- * Red Hat Author(s): Behdad Esfahbod
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_ATOMIC_PRIVATE_HH
-#define HB_ATOMIC_PRIVATE_HH
-
-#include "hb-private.hh"
-
-
-/* atomic_int */
-
-/* We need external help for these */
-
-#if 0
-
-
-#elif !defined(HB_NO_MT) && defined(_MSC_VER) && _MSC_VER >= 1600
-
-#include <intrin.h>
-#pragma intrinsic(_InterlockedExchangeAdd, _InterlockedCompareExchangePointer)
-
-typedef long hb_atomic_int_t;
-#define hb_atomic_int_add(AI, V)       _InterlockedExchangeAdd (&(AI), (V))
-
-#define hb_atomic_ptr_get(P)           (MemoryBarrier (), (void *) *(P))
-#define hb_atomic_ptr_cmpexch(P,O,N)   (_InterlockedCompareExchangePointer ((void **) (P), (void *) (N), (void *) (O)) == (void *) (O))
-
-
-#elif !defined(HB_NO_MT) && defined(__APPLE__)
-
-#include <libkern/OSAtomic.h>
-
-typedef int32_t hb_atomic_int_t;
-#define hb_atomic_int_add(AI, V)       (OSAtomicAdd32Barrier ((V), &(AI)) - (V))
-
-#define hb_atomic_ptr_get(P)           (OSMemoryBarrier (), (void *) *(P))
-#define hb_atomic_ptr_cmpexch(P,O,N)   OSAtomicCompareAndSwapPtrBarrier ((void *) (O), (void *) (N), (void **) (P))
-
-
-#elif !defined(HB_NO_MT) && defined(HAVE_INTEL_ATOMIC_PRIMITIVES) && !defined(__MINGW32__)
-
-typedef int hb_atomic_int_t;
-#define hb_atomic_int_add(AI, V)       __sync_fetch_and_add (&(AI), (V))
-
-#define hb_atomic_ptr_get(P)           (void *) (__sync_synchronize (), *(P))
-#define hb_atomic_ptr_cmpexch(P,O,N)   __sync_bool_compare_and_swap ((P), (O), (N))
-
-#elif !defined(HB_NO_MT) && defined(HAVE_GLIB)
-
-#include <glib.h>
-typedef int hb_atomic_int_t;
-#if GLIB_CHECK_VERSION(2,29,5)
-#define hb_atomic_int_add(AI, V)       g_atomic_int_add (&(AI), (V))
-#else
-#define hb_atomic_int_add(AI, V)       g_atomic_int_exchange_and_add (&(AI), (V))
-#endif
-
-#define hb_atomic_ptr_get(P)           g_atomic_pointer_get (P)
-#define hb_atomic_ptr_cmpexch(P,O,N)   g_atomic_pointer_compare_and_exchange ((void **) (P), (void *) (O), (void *) (N))
-
-
-#elif !defined(HB_NO_MT)
-
-#define HB_ATOMIC_INT_NIL 1 /* Warn that fallback implementation is in use. */
-typedef volatile int hb_atomic_int_t;
-#define hb_atomic_int_add(AI, V)       (((AI) += (V)) - (V))
-
-#define hb_atomic_ptr_get(P)           ((void *) *(P))
-#define hb_atomic_ptr_cmpexch(P,O,N)   (* (void * volatile *) (P) == (void *) (O) ? (* (void * volatile *) (P) = (void *) (N), true) : false)
-
-
-#else /* HB_NO_MT */
-
-typedef int hb_atomic_int_t;
-#define hb_atomic_int_add(AI, V)       (((AI) += (V)) - (V))
-
-#define hb_atomic_ptr_get(P)           ((void *) *(P))
-#define hb_atomic_ptr_cmpexch(P,O,N)   (* (void **) (P) == (void *) (O) ? (* (void **) (P) = (void *) (N), true) : false)
-
-#endif
-
-/* TODO Add tracing. */
-
-#endif /* HB_ATOMIC_PRIVATE_HH */
diff --git a/src/hb-blob.cc b/src/hb-blob.cc
deleted file mode 100644 (file)
index 3cc2d9d..0000000
+++ /dev/null
@@ -1,325 +0,0 @@
-/*
- * Copyright © 2009  Red Hat, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Behdad Esfahbod
- */
-
-#include "hb-private.hh"
-
-#include "hb-blob.h"
-#include "hb-object-private.hh"
-
-#ifdef HAVE_SYS_MMAN_H
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-#include <sys/mman.h>
-#endif /* HAVE_SYS_MMAN_H */
-
-#include <stdio.h>
-#include <errno.h>
-
-
-
-#ifndef HB_DEBUG_BLOB
-#define HB_DEBUG_BLOB (HB_DEBUG+0)
-#endif
-
-
-struct _hb_blob_t {
-  hb_object_header_t header;
-  ASSERT_POD ();
-
-  bool immutable;
-
-  const char *data;
-  unsigned int length;
-  hb_memory_mode_t mode;
-
-  void *user_data;
-  hb_destroy_func_t destroy;
-};
-
-
-static bool _try_writable (hb_blob_t *blob);
-
-static void
-_hb_blob_destroy_user_data (hb_blob_t *blob)
-{
-  if (blob->destroy) {
-    blob->destroy (blob->user_data);
-    blob->user_data = NULL;
-    blob->destroy = NULL;
-  }
-}
-
-hb_blob_t *
-hb_blob_create (const char        *data,
-               unsigned int       length,
-               hb_memory_mode_t   mode,
-               void              *user_data,
-               hb_destroy_func_t  destroy)
-{
-  hb_blob_t *blob;
-
-  if (!length || !(blob = hb_object_create<hb_blob_t> ())) {
-    if (destroy)
-      destroy (user_data);
-    return hb_blob_get_empty ();
-  }
-
-  blob->data = data;
-  blob->length = length;
-  blob->mode = mode;
-
-  blob->user_data = user_data;
-  blob->destroy = destroy;
-
-  if (blob->mode == HB_MEMORY_MODE_DUPLICATE) {
-    blob->mode = HB_MEMORY_MODE_READONLY;
-    if (!_try_writable (blob)) {
-      hb_blob_destroy (blob);
-      return hb_blob_get_empty ();
-    }
-  }
-
-  return blob;
-}
-
-hb_blob_t *
-hb_blob_create_sub_blob (hb_blob_t    *parent,
-                        unsigned int  offset,
-                        unsigned int  length)
-{
-  hb_blob_t *blob;
-
-  if (!length || offset >= parent->length)
-    return hb_blob_get_empty ();
-
-  hb_blob_make_immutable (parent);
-
-  blob = hb_blob_create (parent->data + offset,
-                        MIN (length, parent->length - offset),
-                        parent->mode,
-                        hb_blob_reference (parent),
-                        (hb_destroy_func_t) hb_blob_destroy);
-
-  return blob;
-}
-
-hb_blob_t *
-hb_blob_get_empty (void)
-{
-  static const hb_blob_t _hb_blob_nil = {
-    HB_OBJECT_HEADER_STATIC,
-
-    true, /* immutable */
-
-    NULL, /* data */
-    0, /* length */
-    HB_MEMORY_MODE_READONLY, /* mode */
-
-    NULL, /* user_data */
-    NULL  /* destroy */
-  };
-
-  return const_cast<hb_blob_t *> (&_hb_blob_nil);
-}
-
-hb_blob_t *
-hb_blob_reference (hb_blob_t *blob)
-{
-  return hb_object_reference (blob);
-}
-
-void
-hb_blob_destroy (hb_blob_t *blob)
-{
-  if (!hb_object_destroy (blob)) return;
-
-  _hb_blob_destroy_user_data (blob);
-
-  free (blob);
-}
-
-hb_bool_t
-hb_blob_set_user_data (hb_blob_t          *blob,
-                      hb_user_data_key_t *key,
-                      void *              data,
-                      hb_destroy_func_t   destroy,
-                      hb_bool_t           replace)
-{
-  return hb_object_set_user_data (blob, key, data, destroy, replace);
-}
-
-void *
-hb_blob_get_user_data (hb_blob_t          *blob,
-                      hb_user_data_key_t *key)
-{
-  return hb_object_get_user_data (blob, key);
-}
-
-
-void
-hb_blob_make_immutable (hb_blob_t *blob)
-{
-  if (hb_object_is_inert (blob))
-    return;
-
-  blob->immutable = true;
-}
-
-hb_bool_t
-hb_blob_is_immutable (hb_blob_t *blob)
-{
-  return blob->immutable;
-}
-
-
-unsigned int
-hb_blob_get_length (hb_blob_t *blob)
-{
-  return blob->length;
-}
-
-const char *
-hb_blob_get_data (hb_blob_t *blob, unsigned int *length)
-{
-  if (length)
-    *length = blob->length;
-
-  return blob->data;
-}
-
-char *
-hb_blob_get_data_writable (hb_blob_t *blob, unsigned int *length)
-{
-  if (!_try_writable (blob)) {
-    if (length)
-      *length = 0;
-
-    return NULL;
-  }
-
-  if (length)
-    *length = blob->length;
-
-  return const_cast<char *> (blob->data);
-}
-
-
-static hb_bool_t
-_try_make_writable_inplace_unix (hb_blob_t *blob)
-{
-#if defined(HAVE_SYS_MMAN_H) && defined(HAVE_MPROTECT)
-  uintptr_t pagesize = -1, mask, length;
-  const char *addr;
-
-#if defined(HAVE_SYSCONF) && defined(_SC_PAGE_SIZE)
-  pagesize = (uintptr_t) sysconf (_SC_PAGE_SIZE);
-#elif defined(HAVE_SYSCONF) && defined(_SC_PAGESIZE)
-  pagesize = (uintptr_t) sysconf (_SC_PAGESIZE);
-#elif defined(HAVE_GETPAGESIZE)
-  pagesize = (uintptr_t) getpagesize ();
-#endif
-
-  if ((uintptr_t) -1L == pagesize) {
-    DEBUG_MSG_FUNC (BLOB, blob, "failed to get pagesize: %s", strerror (errno));
-    return false;
-  }
-  DEBUG_MSG_FUNC (BLOB, blob, "pagesize is %lu", (unsigned long) pagesize);
-
-  mask = ~(pagesize-1);
-  addr = (const char *) (((uintptr_t) blob->data) & mask);
-  length = (const char *) (((uintptr_t) blob->data + blob->length + pagesize-1) & mask)  - addr;
-  DEBUG_MSG_FUNC (BLOB, blob,
-                 "calling mprotect on [%p..%p] (%lu bytes)",
-                 addr, addr+length, (unsigned long) length);
-  if (-1 == mprotect ((void *) addr, length, PROT_READ | PROT_WRITE)) {
-    DEBUG_MSG_FUNC (BLOB, blob, "mprotect failed: %s", strerror (errno));
-    return false;
-  }
-
-  blob->mode = HB_MEMORY_MODE_WRITABLE;
-
-  DEBUG_MSG_FUNC (BLOB, blob,
-                 "successfully made [%p..%p] (%lu bytes) writable\n",
-                 addr, addr+length, (unsigned long) length);
-  return true;
-#else
-  return false;
-#endif
-}
-
-static bool
-_try_writable_inplace (hb_blob_t *blob)
-{
-  DEBUG_MSG_FUNC (BLOB, blob, "making writable inplace\n");
-
-  if (_try_make_writable_inplace_unix (blob))
-    return true;
-
-  DEBUG_MSG_FUNC (BLOB, blob, "making writable -> FAILED\n");
-
-  /* Failed to make writable inplace, mark that */
-  blob->mode = HB_MEMORY_MODE_READONLY;
-  return false;
-}
-
-static bool
-_try_writable (hb_blob_t *blob)
-{
-  if (blob->immutable)
-    return false;
-
-  if (blob->mode == HB_MEMORY_MODE_WRITABLE)
-    return true;
-
-  if (blob->mode == HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE && _try_writable_inplace (blob))
-    return true;
-
-  if (blob->mode == HB_MEMORY_MODE_WRITABLE)
-    return true;
-
-
-  DEBUG_MSG_FUNC (BLOB, blob, "current data is -> %p\n", blob->data);
-
-  char *new_data;
-
-  new_data = (char *) malloc (blob->length);
-  if (unlikely (!new_data))
-    return false;
-
-  DEBUG_MSG_FUNC (BLOB, blob, "dupped successfully -> %p\n", blob->data);
-
-  memcpy (new_data, blob->data, blob->length);
-  _hb_blob_destroy_user_data (blob);
-  blob->mode = HB_MEMORY_MODE_WRITABLE;
-  blob->data = new_data;
-  blob->user_data = new_data;
-  blob->destroy = free;
-
-  return true;
-}
-
-
diff --git a/src/hb-blob.h b/src/hb-blob.h
deleted file mode 100644 (file)
index 360310b..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright © 2009  Red Hat, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_H_IN
-#error "Include <hb.h> instead."
-#endif
-
-#ifndef HB_BLOB_H
-#define HB_BLOB_H
-
-#include "hb-common.h"
-
-HB_BEGIN_DECLS
-
-
-typedef enum {
-  HB_MEMORY_MODE_DUPLICATE,
-  HB_MEMORY_MODE_READONLY,
-  HB_MEMORY_MODE_WRITABLE,
-  HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE
-} hb_memory_mode_t;
-
-typedef struct _hb_blob_t hb_blob_t;
-
-hb_blob_t *
-hb_blob_create (const char        *data,
-               unsigned int       length,
-               hb_memory_mode_t   mode,
-               void              *user_data,
-               hb_destroy_func_t  destroy);
-
-hb_blob_t *
-hb_blob_create_sub_blob (hb_blob_t    *parent,
-                        unsigned int  offset,
-                        unsigned int  length);
-
-hb_blob_t *
-hb_blob_get_empty (void);
-
-hb_blob_t *
-hb_blob_reference (hb_blob_t *blob);
-
-void
-hb_blob_destroy (hb_blob_t *blob);
-
-hb_bool_t
-hb_blob_set_user_data (hb_blob_t          *blob,
-                      hb_user_data_key_t *key,
-                      void *              data,
-                      hb_destroy_func_t   destroy,
-                      hb_bool_t           replace);
-
-
-void *
-hb_blob_get_user_data (hb_blob_t          *blob,
-                      hb_user_data_key_t *key);
-
-
-void
-hb_blob_make_immutable (hb_blob_t *blob);
-
-hb_bool_t
-hb_blob_is_immutable (hb_blob_t *blob);
-
-
-unsigned int
-hb_blob_get_length (hb_blob_t *blob);
-
-const char *
-hb_blob_get_data (hb_blob_t *blob, unsigned int *length);
-
-char *
-hb_blob_get_data_writable (hb_blob_t *blob, unsigned int *length);
-
-
-HB_END_DECLS
-
-#endif /* HB_BLOB_H */
diff --git a/src/hb-buffer-private.hh b/src/hb-buffer-private.hh
deleted file mode 100644 (file)
index b539f26..0000000
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Copyright © 1998-2004  David Turner and Werner Lemberg
- * Copyright © 2004,2007,2009,2010  Red Hat, Inc.
- * Copyright © 2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Owen Taylor, Behdad Esfahbod
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_BUFFER_PRIVATE_HH
-#define HB_BUFFER_PRIVATE_HH
-
-#include "hb-private.hh"
-#include "hb-buffer.h"
-#include "hb-object-private.hh"
-#include "hb-unicode-private.hh"
-
-
-
-ASSERT_STATIC (sizeof (hb_glyph_info_t) == 20);
-ASSERT_STATIC (sizeof (hb_glyph_info_t) == sizeof (hb_glyph_position_t));
-
-typedef struct _hb_segment_properties_t {
-    hb_direction_t      direction;
-    hb_script_t         script;
-    hb_language_t       language;
-    ASSERT_POD ();
-} hb_segment_properties_t;
-
-
-struct _hb_buffer_t {
-  hb_object_header_t header;
-  ASSERT_POD ();
-
-  /* Information about how the text in the buffer should be treated */
-
-  hb_unicode_funcs_t *unicode; /* Unicode functions */
-  hb_segment_properties_t props; /* Script, language, direction */
-
-  /* Buffer contents */
-
-  bool in_error; /* Allocation failed */
-  bool have_output; /* Whether we have an output buffer going on */
-  bool have_positions; /* Whether we have positions */
-
-  unsigned int idx; /* Cursor into ->info and ->pos arrays */
-  unsigned int len; /* Length of ->info and ->pos arrays */
-  unsigned int out_len; /* Length of ->out array if have_output */
-
-  unsigned int allocated; /* Length of allocated arrays */
-  hb_glyph_info_t     *info;
-  hb_glyph_info_t     *out_info;
-  hb_glyph_position_t *pos;
-
-  inline hb_glyph_info_t &cur (unsigned int i = 0) { return info[idx + i]; }
-  inline hb_glyph_info_t cur (unsigned int i = 0) const { return info[idx + i]; }
-
-  inline hb_glyph_position_t &cur_pos (unsigned int i = 0) { return pos[idx + i]; }
-  inline hb_glyph_position_t cur_pos (unsigned int i = 0) const { return pos[idx + i]; }
-
-  inline hb_glyph_info_t &prev (void) { return out_info[out_len - 1]; }
-  inline hb_glyph_info_t prev (void) const { return info[out_len - 1]; }
-
-  unsigned int serial;
-  uint8_t allocated_var_bytes[8];
-  const char *allocated_var_owner[8];
-
-
-  /* Methods */
-
-  HB_INTERNAL void reset (void);
-
-  inline unsigned int backtrack_len (void) const
-  { return have_output? out_len : idx; }
-  inline unsigned int next_serial (void) { return serial++; }
-
-  HB_INTERNAL void allocate_var (unsigned int byte_i, unsigned int count, const char *owner);
-  HB_INTERNAL void deallocate_var (unsigned int byte_i, unsigned int count, const char *owner);
-  HB_INTERNAL void deallocate_var_all (void);
-
-  HB_INTERNAL void add (hb_codepoint_t  codepoint,
-                       hb_mask_t       mask,
-                       unsigned int    cluster);
-
-  HB_INTERNAL void reverse_range (unsigned int start, unsigned int end);
-  HB_INTERNAL void reverse (void);
-  HB_INTERNAL void reverse_clusters (void);
-  HB_INTERNAL void guess_properties (void);
-
-  HB_INTERNAL void swap_buffers (void);
-  HB_INTERNAL void clear_output (void);
-  HB_INTERNAL void clear_positions (void);
-  HB_INTERNAL void replace_glyphs_be16 (unsigned int num_in,
-                                       unsigned int num_out,
-                                       const uint16_t *glyph_data_be);
-  HB_INTERNAL void replace_glyphs (unsigned int num_in,
-                                  unsigned int num_out,
-                                  const hb_codepoint_t *glyph_data);
-  HB_INTERNAL void replace_glyph (hb_codepoint_t glyph_index);
-  /* Makes a copy of the glyph at idx to output and replace glyph_index */
-  HB_INTERNAL void output_glyph (hb_codepoint_t glyph_index);
-  /* Copies glyph at idx to output but doesn't advance idx */
-  HB_INTERNAL void copy_glyph (void);
-  /* Copies glyph at idx to output and advance idx.
-   * If there's no output, just advance idx. */
-  HB_INTERNAL void next_glyph (void);
-  /* Advance idx without copying to output. */
-  inline void skip_glyph (void) { idx++; }
-
-  inline void reset_masks (hb_mask_t mask)
-  {
-    for (unsigned int j = 0; j < len; j++)
-      info[j].mask = mask;
-  }
-  inline void add_masks (hb_mask_t mask)
-  {
-    for (unsigned int j = 0; j < len; j++)
-      info[j].mask |= mask;
-  }
-  HB_INTERNAL void set_masks (hb_mask_t value,
-                             hb_mask_t mask,
-                             unsigned int cluster_start,
-                             unsigned int cluster_end);
-
-  HB_INTERNAL void merge_clusters (unsigned int start,
-                                  unsigned int end);
-  HB_INTERNAL void merge_out_clusters (unsigned int start,
-                                      unsigned int end);
-
-  /* Internal methods */
-  HB_INTERNAL bool enlarge (unsigned int size);
-
-  inline bool ensure (unsigned int size)
-  { return likely (size <= allocated) ? true : enlarge (size); }
-
-  HB_INTERNAL bool make_room_for (unsigned int num_in, unsigned int num_out);
-
-  HB_INTERNAL void *get_scratch_buffer (unsigned int *size);
-};
-
-
-#define HB_BUFFER_XALLOCATE_VAR(b, func, var, owner) \
-  b->func (offsetof (hb_glyph_info_t, var) - offsetof(hb_glyph_info_t, var1), \
-          sizeof (b->info[0].var), owner)
-#define HB_BUFFER_ALLOCATE_VAR(b, var) \
-       HB_BUFFER_XALLOCATE_VAR (b, allocate_var, var (), #var)
-#define HB_BUFFER_DEALLOCATE_VAR(b, var) \
-       HB_BUFFER_XALLOCATE_VAR (b, deallocate_var, var (), #var)
-
-
-
-#endif /* HB_BUFFER_PRIVATE_HH */
diff --git a/src/hb-buffer.cc b/src/hb-buffer.cc
deleted file mode 100644 (file)
index e2c34f1..0000000
+++ /dev/null
@@ -1,885 +0,0 @@
-/*
- * Copyright © 1998-2004  David Turner and Werner Lemberg
- * Copyright © 2004,2007,2009,2010  Red Hat, Inc.
- * Copyright © 2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Owen Taylor, Behdad Esfahbod
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "hb-buffer-private.hh"
-
-#include <string.h>
-
-
-
-#ifndef HB_DEBUG_BUFFER
-#define HB_DEBUG_BUFFER (HB_DEBUG+0)
-#endif
-
-#define _HB_BUFFER_UNICODE_FUNCS_DEFAULT (const_cast<hb_unicode_funcs_t *> (&_hb_unicode_funcs_default))
-#define _HB_BUFFER_PROPS_DEFAULT { HB_DIRECTION_INVALID, HB_SCRIPT_INVALID, HB_LANGUAGE_INVALID }
-
-/* Here is how the buffer works internally:
- *
- * There are two info pointers: info and out_info.  They always have
- * the same allocated size, but different lengths.
- *
- * As an optimization, both info and out_info may point to the
- * same piece of memory, which is owned by info.  This remains the
- * case as long as out_len doesn't exceed i at any time.
- * In that case, swap_buffers() is no-op and the glyph operations operate
- * mostly in-place.
- *
- * As soon as out_info gets longer than info, out_info is moved over
- * to an alternate buffer (which we reuse the pos buffer for!), and its
- * current contents (out_len entries) are copied to the new place.
- * This should all remain transparent to the user.  swap_buffers() then
- * switches info and out_info.
- */
-
-
-
-/* Internal API */
-
-bool
-hb_buffer_t::enlarge (unsigned int size)
-{
-  if (unlikely (in_error))
-    return false;
-
-  unsigned int new_allocated = allocated;
-  hb_glyph_position_t *new_pos = NULL;
-  hb_glyph_info_t *new_info = NULL;
-  bool separate_out = out_info != info;
-
-  if (unlikely (_hb_unsigned_int_mul_overflows (size, sizeof (info[0]))))
-    goto done;
-
-  while (size > new_allocated)
-    new_allocated += (new_allocated >> 1) + 32;
-
-  ASSERT_STATIC (sizeof (info[0]) == sizeof (pos[0]));
-  if (unlikely (_hb_unsigned_int_mul_overflows (new_allocated, sizeof (info[0]))))
-    goto done;
-
-  new_pos = (hb_glyph_position_t *) realloc (pos, new_allocated * sizeof (pos[0]));
-  new_info = (hb_glyph_info_t *) realloc (info, new_allocated * sizeof (info[0]));
-
-done:
-  if (unlikely (!new_pos || !new_info))
-    in_error = true;
-
-  if (likely (new_pos))
-    pos = new_pos;
-
-  if (likely (new_info))
-    info = new_info;
-
-  out_info = separate_out ? (hb_glyph_info_t *) pos : info;
-  if (likely (!in_error))
-    allocated = new_allocated;
-
-  return likely (!in_error);
-}
-
-bool
-hb_buffer_t::make_room_for (unsigned int num_in,
-                           unsigned int num_out)
-{
-  if (unlikely (!ensure (out_len + num_out))) return false;
-
-  if (out_info == info &&
-      out_len + num_out > idx + num_in)
-  {
-    assert (have_output);
-
-    out_info = (hb_glyph_info_t *) pos;
-    memcpy (out_info, info, out_len * sizeof (out_info[0]));
-  }
-
-  return true;
-}
-
-void *
-hb_buffer_t::get_scratch_buffer (unsigned int *size)
-{
-  have_output = false;
-  have_positions = false;
-  out_len = 0;
-  *size = allocated * sizeof (pos[0]);
-  return pos;
-}
-
-
-/* HarfBuzz-Internal API */
-
-void
-hb_buffer_t::reset (void)
-{
-  if (unlikely (hb_object_is_inert (this)))
-    return;
-
-  hb_unicode_funcs_destroy (unicode);
-  unicode = _HB_BUFFER_UNICODE_FUNCS_DEFAULT;
-
-  hb_segment_properties_t default_props = _HB_BUFFER_PROPS_DEFAULT;
-  props = default_props;
-
-  in_error = false;
-  have_output = false;
-  have_positions = false;
-
-  idx = 0;
-  len = 0;
-  out_len = 0;
-
-  serial = 0;
-  memset (allocated_var_bytes, 0, sizeof allocated_var_bytes);
-  memset (allocated_var_owner, 0, sizeof allocated_var_owner);
-
-  out_info = info;
-}
-
-void
-hb_buffer_t::add (hb_codepoint_t  codepoint,
-                 hb_mask_t       mask,
-                 unsigned int    cluster)
-{
-  hb_glyph_info_t *glyph;
-
-  if (unlikely (!ensure (len + 1))) return;
-
-  glyph = &info[len];
-
-  memset (glyph, 0, sizeof (*glyph));
-  glyph->codepoint = codepoint;
-  glyph->mask = mask;
-  glyph->cluster = cluster;
-
-  len++;
-}
-
-void
-hb_buffer_t::clear_output (void)
-{
-  if (unlikely (hb_object_is_inert (this)))
-    return;
-
-  have_output = true;
-  have_positions = false;
-
-  out_len = 0;
-  out_info = info;
-}
-
-void
-hb_buffer_t::clear_positions (void)
-{
-  if (unlikely (hb_object_is_inert (this)))
-    return;
-
-  have_output = false;
-  have_positions = true;
-
-  memset (pos, 0, sizeof (pos[0]) * len);
-}
-
-void
-hb_buffer_t::swap_buffers (void)
-{
-  if (unlikely (in_error)) return;
-
-  assert (have_output);
-  have_output = false;
-
-  if (out_info != info)
-  {
-    hb_glyph_info_t *tmp_string;
-    tmp_string = info;
-    info = out_info;
-    out_info = tmp_string;
-    pos = (hb_glyph_position_t *) out_info;
-  }
-
-  unsigned int tmp;
-  tmp = len;
-  len = out_len;
-  out_len = tmp;
-
-  idx = 0;
-}
-
-void
-hb_buffer_t::replace_glyphs_be16 (unsigned int num_in,
-                                 unsigned int num_out,
-                                 const uint16_t *glyph_data_be)
-{
-  if (!make_room_for (num_in, num_out)) return;
-
-  hb_glyph_info_t orig_info = info[idx];
-  for (unsigned int i = 1; i < num_in; i++)
-  {
-    hb_glyph_info_t *inf = &info[idx + i];
-    orig_info.cluster = MIN (orig_info.cluster, inf->cluster);
-  }
-
-  hb_glyph_info_t *pinfo = &out_info[out_len];
-  for (unsigned int i = 0; i < num_out; i++)
-  {
-    *pinfo = orig_info;
-    pinfo->codepoint = hb_be_uint16 (glyph_data_be[i]);
-    pinfo++;
-  }
-
-  idx  += num_in;
-  out_len += num_out;
-}
-
-void
-hb_buffer_t::replace_glyphs (unsigned int num_in,
-                            unsigned int num_out,
-                            const uint32_t *glyph_data)
-{
-  if (!make_room_for (num_in, num_out)) return;
-
-  hb_glyph_info_t orig_info = info[idx];
-  for (unsigned int i = 1; i < num_in; i++)
-  {
-    hb_glyph_info_t *inf = &info[idx + i];
-    orig_info.cluster = MIN (orig_info.cluster, inf->cluster);
-  }
-
-  hb_glyph_info_t *pinfo = &out_info[out_len];
-  for (unsigned int i = 0; i < num_out; i++)
-  {
-    *pinfo = orig_info;
-    pinfo->codepoint = glyph_data[i];
-    pinfo++;
-  }
-
-  idx  += num_in;
-  out_len += num_out;
-}
-
-void
-hb_buffer_t::output_glyph (hb_codepoint_t glyph_index)
-{
-  if (!make_room_for (0, 1)) return;
-
-  out_info[out_len] = info[idx];
-  out_info[out_len].codepoint = glyph_index;
-
-  out_len++;
-}
-
-void
-hb_buffer_t::copy_glyph (void)
-{
-  if (!make_room_for (0, 1)) return;
-
-  out_info[out_len] = info[idx];
-
-  out_len++;
-}
-
-void
-hb_buffer_t::replace_glyph (hb_codepoint_t glyph_index)
-{
-  if (!make_room_for (1, 1)) return;
-
-  out_info[out_len] = info[idx];
-  out_info[out_len].codepoint = glyph_index;
-
-  idx++;
-  out_len++;
-}
-
-void
-hb_buffer_t::next_glyph (void)
-{
-  if (have_output)
-  {
-    if (out_info != info)
-    {
-      if (unlikely (!ensure (out_len + 1))) return;
-      out_info[out_len] = info[idx];
-    }
-    else if (out_len != idx)
-      out_info[out_len] = info[idx];
-
-    out_len++;
-  }
-
-  idx++;
-}
-
-void
-hb_buffer_t::set_masks (hb_mask_t    value,
-                       hb_mask_t    mask,
-                       unsigned int cluster_start,
-                       unsigned int cluster_end)
-{
-  hb_mask_t not_mask = ~mask;
-  value &= mask;
-
-  if (!mask)
-    return;
-
-  if (cluster_start == 0 && cluster_end == (unsigned int)-1) {
-    unsigned int count = len;
-    for (unsigned int i = 0; i < count; i++)
-      info[i].mask = (info[i].mask & not_mask) | value;
-    return;
-  }
-
-  unsigned int count = len;
-  for (unsigned int i = 0; i < count; i++)
-    if (cluster_start <= info[i].cluster && info[i].cluster < cluster_end)
-      info[i].mask = (info[i].mask & not_mask) | value;
-}
-
-void
-hb_buffer_t::reverse_range (unsigned int start,
-                           unsigned int end)
-{
-  unsigned int i, j;
-
-  if (start == end - 1)
-    return;
-
-  for (i = start, j = end - 1; i < j; i++, j--) {
-    hb_glyph_info_t t;
-
-    t = info[i];
-    info[i] = info[j];
-    info[j] = t;
-  }
-
-  if (pos) {
-    for (i = start, j = end - 1; i < j; i++, j--) {
-      hb_glyph_position_t t;
-
-      t = pos[i];
-      pos[i] = pos[j];
-      pos[j] = t;
-    }
-  }
-}
-
-void
-hb_buffer_t::reverse (void)
-{
-  if (unlikely (!len))
-    return;
-
-  reverse_range (0, len);
-}
-
-void
-hb_buffer_t::reverse_clusters (void)
-{
-  unsigned int i, start, count, last_cluster;
-
-  if (unlikely (!len))
-    return;
-
-  reverse ();
-
-  count = len;
-  start = 0;
-  last_cluster = info[0].cluster;
-  for (i = 1; i < count; i++) {
-    if (last_cluster != info[i].cluster) {
-      reverse_range (start, i);
-      start = i;
-      last_cluster = info[i].cluster;
-    }
-  }
-  reverse_range (start, i);
-}
-
-void
-hb_buffer_t::merge_clusters (unsigned int start,
-                            unsigned int end)
-{
-  unsigned int cluster = this->info[start].cluster;
-
-  for (unsigned int i = start + 1; i < end; i++)
-    cluster = MIN (cluster, this->info[i].cluster);
-  for (unsigned int i = start; i < end; i++)
-    this->info[i].cluster = cluster;
-}
-void
-hb_buffer_t::merge_out_clusters (unsigned int start,
-                                unsigned int end)
-{
-  unsigned int cluster = this->out_info[start].cluster;
-
-  for (unsigned int i = start + 1; i < end; i++)
-    cluster = MIN (cluster, this->out_info[i].cluster);
-  for (unsigned int i = start; i < end; i++)
-    this->out_info[i].cluster = cluster;
-}
-
-void
-hb_buffer_t::guess_properties (void)
-{
-  /* If script is set to INVALID, guess from buffer contents */
-  if (props.script == HB_SCRIPT_INVALID) {
-    for (unsigned int i = 0; i < len; i++) {
-      hb_script_t script = hb_unicode_script (unicode, info[i].codepoint);
-      if (likely (script != HB_SCRIPT_COMMON &&
-                 script != HB_SCRIPT_INHERITED &&
-                 script != HB_SCRIPT_UNKNOWN)) {
-        props.script = script;
-        break;
-      }
-    }
-  }
-
-  /* If direction is set to INVALID, guess from script */
-  if (props.direction == HB_DIRECTION_INVALID) {
-    props.direction = hb_script_get_horizontal_direction (props.script);
-  }
-
-  /* If language is not set, use default language from locale */
-  if (props.language == HB_LANGUAGE_INVALID) {
-    /* TODO get_default_for_script? using $LANGUAGE */
-    props.language = hb_language_get_default ();
-  }
-}
-
-
-static inline void
-dump_var_allocation (const hb_buffer_t *buffer)
-{
-  char buf[80];
-  for (unsigned int i = 0; i < 8; i++)
-    buf[i] = '0' + buffer->allocated_var_bytes[7 - i];
-  buf[8] = '\0';
-  DEBUG_MSG (BUFFER, buffer,
-            "Current var allocation: %s",
-            buf);
-}
-
-void hb_buffer_t::allocate_var (unsigned int byte_i, unsigned int count, const char *owner)
-{
-  assert (byte_i < 8 && byte_i + count <= 8);
-
-  if (DEBUG (BUFFER))
-    dump_var_allocation (this);
-  DEBUG_MSG (BUFFER, this,
-            "Allocating var bytes %d..%d for %s",
-            byte_i, byte_i + count - 1, owner);
-
-  for (unsigned int i = byte_i; i < byte_i + count; i++) {
-    assert (!allocated_var_bytes[i]);
-    allocated_var_bytes[i]++;
-    allocated_var_owner[i] = owner;
-  }
-}
-
-void hb_buffer_t::deallocate_var (unsigned int byte_i, unsigned int count, const char *owner)
-{
-  if (DEBUG (BUFFER))
-    dump_var_allocation (this);
-
-  DEBUG_MSG (BUFFER, this,
-            "Deallocating var bytes %d..%d for %s",
-            byte_i, byte_i + count - 1, owner);
-
-  assert (byte_i < 8 && byte_i + count <= 8);
-  for (unsigned int i = byte_i; i < byte_i + count; i++) {
-    assert (allocated_var_bytes[i]);
-    assert (0 == strcmp (allocated_var_owner[i], owner));
-    allocated_var_bytes[i]--;
-  }
-}
-
-void hb_buffer_t::deallocate_var_all (void)
-{
-  memset (allocated_var_bytes, 0, sizeof (allocated_var_bytes));
-  memset (allocated_var_owner, 0, sizeof (allocated_var_owner));
-}
-
-/* Public API */
-
-hb_buffer_t *
-hb_buffer_create ()
-{
-  hb_buffer_t *buffer;
-
-  if (!(buffer = hb_object_create<hb_buffer_t> ()))
-    return hb_buffer_get_empty ();
-
-  buffer->reset ();
-
-  return buffer;
-}
-
-hb_buffer_t *
-hb_buffer_get_empty (void)
-{
-  static const hb_buffer_t _hb_buffer_nil = {
-    HB_OBJECT_HEADER_STATIC,
-
-    _HB_BUFFER_UNICODE_FUNCS_DEFAULT,
-    _HB_BUFFER_PROPS_DEFAULT,
-
-    true, /* in_error */
-    true, /* have_output */
-    true  /* have_positions */
-  };
-
-  return const_cast<hb_buffer_t *> (&_hb_buffer_nil);
-}
-
-hb_buffer_t *
-hb_buffer_reference (hb_buffer_t *buffer)
-{
-  return hb_object_reference (buffer);
-}
-
-void
-hb_buffer_destroy (hb_buffer_t *buffer)
-{
-  if (!hb_object_destroy (buffer)) return;
-
-  hb_unicode_funcs_destroy (buffer->unicode);
-
-  free (buffer->info);
-  free (buffer->pos);
-
-  free (buffer);
-}
-
-hb_bool_t
-hb_buffer_set_user_data (hb_buffer_t        *buffer,
-                        hb_user_data_key_t *key,
-                        void *              data,
-                        hb_destroy_func_t   destroy,
-                        hb_bool_t           replace)
-{
-  return hb_object_set_user_data (buffer, key, data, destroy, replace);
-}
-
-void *
-hb_buffer_get_user_data (hb_buffer_t        *buffer,
-                        hb_user_data_key_t *key)
-{
-  return hb_object_get_user_data (buffer, key);
-}
-
-
-void
-hb_buffer_set_unicode_funcs (hb_buffer_t        *buffer,
-                            hb_unicode_funcs_t *unicode)
-{
-  if (unlikely (hb_object_is_inert (buffer)))
-    return;
-
-  if (!unicode)
-    unicode = _HB_BUFFER_UNICODE_FUNCS_DEFAULT;
-
-  hb_unicode_funcs_reference (unicode);
-  hb_unicode_funcs_destroy (buffer->unicode);
-  buffer->unicode = unicode;
-}
-
-hb_unicode_funcs_t *
-hb_buffer_get_unicode_funcs (hb_buffer_t        *buffer)
-{
-  return buffer->unicode;
-}
-
-void
-hb_buffer_set_direction (hb_buffer_t    *buffer,
-                        hb_direction_t  direction)
-
-{
-  if (unlikely (hb_object_is_inert (buffer)))
-    return;
-
-  buffer->props.direction = direction;
-}
-
-hb_direction_t
-hb_buffer_get_direction (hb_buffer_t    *buffer)
-{
-  return buffer->props.direction;
-}
-
-void
-hb_buffer_set_script (hb_buffer_t *buffer,
-                     hb_script_t  script)
-{
-  if (unlikely (hb_object_is_inert (buffer)))
-    return;
-
-  buffer->props.script = script;
-}
-
-hb_script_t
-hb_buffer_get_script (hb_buffer_t *buffer)
-{
-  return buffer->props.script;
-}
-
-void
-hb_buffer_set_language (hb_buffer_t   *buffer,
-                       hb_language_t  language)
-{
-  if (unlikely (hb_object_is_inert (buffer)))
-    return;
-
-  buffer->props.language = language;
-}
-
-hb_language_t
-hb_buffer_get_language (hb_buffer_t *buffer)
-{
-  return buffer->props.language;
-}
-
-
-void
-hb_buffer_reset (hb_buffer_t *buffer)
-{
-  buffer->reset ();
-}
-
-hb_bool_t
-hb_buffer_pre_allocate (hb_buffer_t *buffer, unsigned int size)
-{
-  return buffer->ensure (size);
-}
-
-hb_bool_t
-hb_buffer_allocation_successful (hb_buffer_t  *buffer)
-{
-  return !buffer->in_error;
-}
-
-void
-hb_buffer_add (hb_buffer_t    *buffer,
-              hb_codepoint_t  codepoint,
-              hb_mask_t       mask,
-              unsigned int    cluster)
-{
-  buffer->add (codepoint, mask, cluster);
-}
-
-hb_bool_t
-hb_buffer_set_length (hb_buffer_t  *buffer,
-                     unsigned int  length)
-{
-  if (unlikely (hb_object_is_inert (buffer)))
-    return length == 0;
-
-  if (!buffer->ensure (length))
-    return false;
-
-  /* Wipe the new space */
-  if (length > buffer->len) {
-    memset (buffer->info + buffer->len, 0, sizeof (buffer->info[0]) * (length - buffer->len));
-    if (buffer->have_positions)
-      memset (buffer->pos + buffer->len, 0, sizeof (buffer->pos[0]) * (length - buffer->len));
-  }
-
-  buffer->len = length;
-  return true;
-}
-
-unsigned int
-hb_buffer_get_length (hb_buffer_t *buffer)
-{
-  return buffer->len;
-}
-
-/* Return value valid as long as buffer not modified */
-hb_glyph_info_t *
-hb_buffer_get_glyph_infos (hb_buffer_t  *buffer,
-                           unsigned int *length)
-{
-  if (length)
-    *length = buffer->len;
-
-  return (hb_glyph_info_t *) buffer->info;
-}
-
-/* Return value valid as long as buffer not modified */
-hb_glyph_position_t *
-hb_buffer_get_glyph_positions (hb_buffer_t  *buffer,
-                               unsigned int *length)
-{
-  if (!buffer->have_positions)
-    buffer->clear_positions ();
-
-  if (length)
-    *length = buffer->len;
-
-  return (hb_glyph_position_t *) buffer->pos;
-}
-
-void
-hb_buffer_reverse (hb_buffer_t *buffer)
-{
-  buffer->reverse ();
-}
-
-void
-hb_buffer_reverse_clusters (hb_buffer_t *buffer)
-{
-  buffer->reverse_clusters ();
-}
-
-void
-hb_buffer_guess_properties (hb_buffer_t *buffer)
-{
-  buffer->guess_properties ();
-}
-
-#define ADD_UTF(T) \
-       HB_STMT_START { \
-         if (text_length == -1) { \
-           text_length = 0; \
-           const T *p = (const T *) text; \
-           while (*p) { \
-             text_length++; \
-             p++; \
-           } \
-         } \
-         if (item_length == -1) \
-           item_length = text_length - item_offset; \
-         buffer->ensure (buffer->len + item_length * sizeof (T) / 4); \
-         const T *next = (const T *) text + item_offset; \
-         const T *end = next + item_length; \
-         while (next < end) { \
-           hb_codepoint_t u; \
-           const T *old_next = next; \
-           next = UTF_NEXT (next, end, u); \
-           hb_buffer_add (buffer, u, 1,  old_next - (const T *) text); \
-         } \
-       } HB_STMT_END
-
-
-#define UTF8_COMPUTE(Char, Mask, Len) \
-  if (Char < 128) { Len = 1; Mask = 0x7f; } \
-  else if ((Char & 0xe0) == 0xc0) { Len = 2; Mask = 0x1f; } \
-  else if ((Char & 0xf0) == 0xe0) { Len = 3; Mask = 0x0f; } \
-  else if ((Char & 0xf8) == 0xf0) { Len = 4; Mask = 0x07; } \
-  else Len = 0;
-
-static inline const uint8_t *
-hb_utf8_next (const uint8_t *text,
-             const uint8_t *end,
-             hb_codepoint_t *unicode)
-{
-  uint8_t c = *text;
-  unsigned int mask, len;
-
-  /* TODO check for overlong sequences? */
-
-  UTF8_COMPUTE (c, mask, len);
-  if (unlikely (!len || (unsigned int) (end - text) < len)) {
-    *unicode = -1;
-    return text + 1;
-  } else {
-    hb_codepoint_t result;
-    unsigned int i;
-    result = c & mask;
-    for (i = 1; i < len; i++)
-      {
-       if (unlikely ((text[i] & 0xc0) != 0x80))
-         {
-           *unicode = -1;
-           return text + 1;
-         }
-       result <<= 6;
-       result |= (text[i] & 0x3f);
-      }
-    *unicode = result;
-    return text + len;
-  }
-}
-
-void
-hb_buffer_add_utf8 (hb_buffer_t  *buffer,
-                   const char   *text,
-                   int           text_length,
-                   unsigned int  item_offset,
-                   int           item_length)
-{
-#define UTF_NEXT(S, E, U)      hb_utf8_next (S, E, &(U))
-  ADD_UTF (uint8_t);
-#undef UTF_NEXT
-}
-
-static inline const uint16_t *
-hb_utf16_next (const uint16_t *text,
-              const uint16_t *end,
-              hb_codepoint_t *unicode)
-{
-  uint16_t c = *text++;
-
-  if (unlikely (c >= 0xd800 && c < 0xdc00)) {
-    /* high surrogate */
-    uint16_t l;
-    if (text < end && ((l = *text), likely (l >= 0xdc00 && l < 0xe000))) {
-      /* low surrogate */
-      *unicode = ((hb_codepoint_t) ((c) - 0xd800) * 0x400 + (l) - 0xdc00 + 0x10000);
-       text++;
-    } else
-      *unicode = -1;
-  } else
-    *unicode = c;
-
-  return text;
-}
-
-void
-hb_buffer_add_utf16 (hb_buffer_t    *buffer,
-                    const uint16_t *text,
-                    int             text_length,
-                    unsigned int    item_offset,
-                    int            item_length)
-{
-#define UTF_NEXT(S, E, U)      hb_utf16_next (S, E, &(U))
-  ADD_UTF (uint16_t);
-#undef UTF_NEXT
-}
-
-void
-hb_buffer_add_utf32 (hb_buffer_t    *buffer,
-                    const uint32_t *text,
-                    int             text_length,
-                    unsigned int    item_offset,
-                    int             item_length)
-{
-#define UTF_NEXT(S, E, U)      ((U) = *(S), (S)+1)
-  ADD_UTF (uint32_t);
-#undef UTF_NEXT
-}
-
-
diff --git a/src/hb-buffer.h b/src/hb-buffer.h
deleted file mode 100644 (file)
index fe53197..0000000
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- * Copyright © 1998-2004  David Turner and Werner Lemberg
- * Copyright © 2004,2007,2009  Red Hat, Inc.
- * Copyright © 2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Owen Taylor, Behdad Esfahbod
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_H_IN
-#error "Include <hb.h> instead."
-#endif
-
-#ifndef HB_BUFFER_H
-#define HB_BUFFER_H
-
-#include "hb-common.h"
-#include "hb-unicode.h"
-
-HB_BEGIN_DECLS
-
-
-typedef struct _hb_buffer_t hb_buffer_t;
-
-typedef struct _hb_glyph_info_t {
-  hb_codepoint_t codepoint;
-  hb_mask_t      mask;
-  uint32_t       cluster;
-
-  /*< private >*/
-  hb_var_int_t   var1;
-  hb_var_int_t   var2;
-} hb_glyph_info_t;
-
-typedef struct _hb_glyph_position_t {
-  hb_position_t  x_advance;
-  hb_position_t  y_advance;
-  hb_position_t  x_offset;
-  hb_position_t  y_offset;
-
-  /*< private >*/
-  hb_var_int_t   var;
-} hb_glyph_position_t;
-
-
-hb_buffer_t *
-hb_buffer_create (void);
-
-hb_buffer_t *
-hb_buffer_get_empty (void);
-
-hb_buffer_t *
-hb_buffer_reference (hb_buffer_t *buffer);
-
-void
-hb_buffer_destroy (hb_buffer_t *buffer);
-
-hb_bool_t
-hb_buffer_set_user_data (hb_buffer_t        *buffer,
-                        hb_user_data_key_t *key,
-                        void *              data,
-                        hb_destroy_func_t   destroy,
-                        hb_bool_t           replace);
-
-void *
-hb_buffer_get_user_data (hb_buffer_t        *buffer,
-                        hb_user_data_key_t *key);
-
-
-void
-hb_buffer_set_unicode_funcs (hb_buffer_t        *buffer,
-                            hb_unicode_funcs_t *unicode_funcs);
-
-hb_unicode_funcs_t *
-hb_buffer_get_unicode_funcs (hb_buffer_t        *buffer);
-
-void
-hb_buffer_set_direction (hb_buffer_t    *buffer,
-                        hb_direction_t  direction);
-
-hb_direction_t
-hb_buffer_get_direction (hb_buffer_t *buffer);
-
-void
-hb_buffer_set_script (hb_buffer_t *buffer,
-                     hb_script_t  script);
-
-hb_script_t
-hb_buffer_get_script (hb_buffer_t *buffer);
-
-void
-hb_buffer_set_language (hb_buffer_t   *buffer,
-                       hb_language_t  language);
-
-hb_language_t
-hb_buffer_get_language (hb_buffer_t *buffer);
-
-
-/* Resets the buffer.  Afterwards it's as if it was just created,
- * except that it has a larger buffer allocated perhaps... */
-void
-hb_buffer_reset (hb_buffer_t *buffer);
-
-/* Returns false if allocation failed */
-hb_bool_t
-hb_buffer_pre_allocate (hb_buffer_t  *buffer,
-                       unsigned int  size);
-
-
-/* Returns false if allocation has failed before */
-hb_bool_t
-hb_buffer_allocation_successful (hb_buffer_t  *buffer);
-
-void
-hb_buffer_reverse (hb_buffer_t *buffer);
-
-void
-hb_buffer_reverse_clusters (hb_buffer_t *buffer);
-
-void
-hb_buffer_guess_properties (hb_buffer_t *buffer);
-
-
-/* Filling the buffer in */
-
-void
-hb_buffer_add (hb_buffer_t    *buffer,
-              hb_codepoint_t  codepoint,
-              hb_mask_t       mask,
-              unsigned int    cluster);
-
-void
-hb_buffer_add_utf8 (hb_buffer_t  *buffer,
-                   const char   *text,
-                   int           text_length,
-                   unsigned int  item_offset,
-                   int           item_length);
-
-void
-hb_buffer_add_utf16 (hb_buffer_t    *buffer,
-                    const uint16_t *text,
-                    int             text_length,
-                    unsigned int    item_offset,
-                    int             item_length);
-
-void
-hb_buffer_add_utf32 (hb_buffer_t    *buffer,
-                    const uint32_t *text,
-                    int             text_length,
-                    unsigned int    item_offset,
-                    int             item_length);
-
-
-/* Clears any new items added at the end */
-hb_bool_t
-hb_buffer_set_length (hb_buffer_t  *buffer,
-                     unsigned int  length);
-
-/* Return value valid as long as buffer not modified */
-unsigned int
-hb_buffer_get_length (hb_buffer_t *buffer);
-
-/* Getting glyphs out of the buffer */
-
-/* Return value valid as long as buffer not modified */
-hb_glyph_info_t *
-hb_buffer_get_glyph_infos (hb_buffer_t  *buffer,
-                           unsigned int *length);
-
-/* Return value valid as long as buffer not modified */
-hb_glyph_position_t *
-hb_buffer_get_glyph_positions (hb_buffer_t  *buffer,
-                               unsigned int *length);
-
-
-HB_END_DECLS
-
-#endif /* HB_BUFFER_H */
diff --git a/src/hb-cache-private.hh b/src/hb-cache-private.hh
deleted file mode 100644 (file)
index a0928a0..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright © 2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_CACHE_PRIVATE_HH
-#define HB_CACHE_PRIVATE_HH
-
-#include "hb-private.hh"
-
-
-/* Implements a lock-free cache for int->int functions. */
-
-template <unsigned int key_bits, unsigned int value_bits, unsigned int cache_bits>
-struct hb_cache_t
-{
-  ASSERT_STATIC (key_bits >= cache_bits);
-  ASSERT_STATIC (key_bits + value_bits - cache_bits < 8 * sizeof (unsigned int));
-
-  inline void clear (void)
-  {
-    memset (values, 255, sizeof (values));
-  }
-
-  inline bool get (unsigned int key, unsigned int *value)
-  {
-    unsigned int k = key & ((1<<cache_bits)-1);
-    unsigned int v = values[k];
-    if ((v >> value_bits) != (key >> cache_bits))
-      return false;
-  }
-
-  inline bool set (unsigned int key, unsigned int value)
-  {
-    if (unlikely ((key >> key_bits) || (value >> value_bits)))
-      return false; /* Overflows */
-    unsigned int k = key & ((1<<cache_bits)-1);
-    unsigned int v = ((key>>cache_bits)<<value_bits) | value;
-    values[k] = v;
-    return true;
-  }
-
-  private:
-  unsigned int values[1<<cache_bits];
-};
-
-typedef hb_cache_t<21, 16, 8> hb_cmap_cache_t;
-typedef hb_cache_t<16, 24, 8> hb_advance_cache_t;
-
-
-#endif /* HB_CACHE_PRIVATE_HH */
diff --git a/src/hb-common.cc b/src/hb-common.cc
deleted file mode 100644 (file)
index 331d255..0000000
+++ /dev/null
@@ -1,422 +0,0 @@
-/*
- * Copyright © 2009,2010  Red Hat, Inc.
- * Copyright © 2011,2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Behdad Esfahbod
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "hb-private.hh"
-
-#include "hb-version.h"
-
-#include "hb-mutex-private.hh"
-#include "hb-object-private.hh"
-
-#include <locale.h>
-
-
-
-/* hb_tag_t */
-
-hb_tag_t
-hb_tag_from_string (const char *s, int len)
-{
-  char tag[4];
-  unsigned int i;
-
-  if (!s || !len || !*s)
-    return HB_TAG_NONE;
-
-  if (len < 0 || len > 4)
-    len = 4;
-  for (i = 0; i < (unsigned) len && s[i]; i++)
-    tag[i] = s[i];
-  for (; i < 4; i++)
-    tag[i] = ' ';
-
-  return HB_TAG_CHAR4 (tag);
-}
-
-
-/* hb_direction_t */
-
-const char direction_strings[][4] = {
-  "ltr",
-  "rtl",
-  "ttb",
-  "btt"
-};
-
-hb_direction_t
-hb_direction_from_string (const char *str, int len)
-{
-  if (unlikely (!str || !len || !*str))
-    return HB_DIRECTION_INVALID;
-
-  /* Lets match loosely: just match the first letter, such that
-   * all of "ltr", "left-to-right", etc work!
-   */
-  char c = TOLOWER (str[0]);
-  for (unsigned int i = 0; i < ARRAY_LENGTH (direction_strings); i++)
-    if (c == direction_strings[i][0])
-      return (hb_direction_t) (HB_DIRECTION_LTR + i);
-
-  return HB_DIRECTION_INVALID;
-}
-
-const char *
-hb_direction_to_string (hb_direction_t direction)
-{
-  if (likely ((unsigned int) (direction - HB_DIRECTION_LTR)
-             < ARRAY_LENGTH (direction_strings)))
-    return direction_strings[direction - HB_DIRECTION_LTR];
-
-  return "invalid";
-}
-
-
-/* hb_language_t */
-
-struct _hb_language_t {
-  const char s[1];
-};
-
-static const char canon_map[256] = {
-   0,   0,   0,   0,   0,   0,   0,   0,    0,   0,   0,   0,   0,   0,   0,   0,
-   0,   0,   0,   0,   0,   0,   0,   0,    0,   0,   0,   0,   0,   0,   0,   0,
-   0,   0,   0,   0,   0,   0,   0,   0,    0,   0,   0,   0,   0,  '-',  0,   0,
-  '0', '1', '2', '3', '4', '5', '6', '7',  '8', '9',  0,   0,   0,   0,   0,   0,
-  '-', 'a', 'b', 'c', 'd', 'e', 'f', 'g',  'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
-  'p', 'q', 'r', 's', 't', 'u', 'v', 'w',  'x', 'y', 'z',  0,   0,   0,   0,  '-',
-   0,  'a', 'b', 'c', 'd', 'e', 'f', 'g',  'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
-  'p', 'q', 'r', 's', 't', 'u', 'v', 'w',  'x', 'y', 'z',  0,   0,   0,   0,   0
-};
-
-static hb_bool_t
-lang_equal (hb_language_t  v1,
-           const void    *v2)
-{
-  const unsigned char *p1 = (const unsigned char *) v1;
-  const unsigned char *p2 = (const unsigned char *) v2;
-
-  while (*p1 && *p1 == canon_map[*p2])
-    p1++, p2++;
-
-  return *p1 == canon_map[*p2];
-}
-
-#if 0
-static unsigned int
-lang_hash (const void *key)
-{
-  const unsigned char *p = key;
-  unsigned int h = 0;
-  while (canon_map[*p])
-    {
-      h = (h << 5) - h + canon_map[*p];
-      p++;
-    }
-
-  return h;
-}
-#endif
-
-
-struct hb_language_item_t {
-
-  struct hb_language_item_t *next;
-  hb_language_t lang;
-
-  inline bool operator == (const char *s) const {
-    return lang_equal (lang, s);
-  }
-
-  inline hb_language_item_t & operator = (const char *s) {
-    lang = (hb_language_t) strdup (s);
-    for (unsigned char *p = (unsigned char *) lang; *p; p++)
-      *p = canon_map[*p];
-
-    return *this;
-  }
-
-  void finish (void) { free (lang); }
-};
-
-
-/* Thread-safe lock-free language list */
-
-static hb_language_item_t *langs;
-
-static
-void free_langs (void)
-{
-  while (langs) {
-    hb_language_item_t *next = langs->next;
-    langs->finish ();
-    free (langs);
-    langs = next;
-  }
-}
-
-static hb_language_item_t *
-lang_find_or_insert (const char *key)
-{
-retry:
-  hb_language_item_t *first_lang = (hb_language_item_t *) hb_atomic_ptr_get (&langs);
-
-  for (hb_language_item_t *lang = first_lang; lang; lang = lang->next)
-    if (*lang == key)
-      return lang;
-
-  /* Not found; allocate one. */
-  hb_language_item_t *lang = (hb_language_item_t *) calloc (1, sizeof (hb_language_item_t));
-  if (unlikely (!lang))
-    return NULL;
-  lang->next = first_lang;
-  *lang = key;
-
-  if (!hb_atomic_ptr_cmpexch (&langs, first_lang, lang)) {
-    free (lang);
-    goto retry;
-  }
-
-#ifdef HAVE_ATEXIT
-  if (!first_lang)
-    atexit (free_langs); /* First person registers atexit() callback. */
-#endif
-
-  return lang;
-}
-
-
-hb_language_t
-hb_language_from_string (const char *str, int len)
-{
-  if (!str || !len || !*str)
-    return HB_LANGUAGE_INVALID;
-
-  char strbuf[32];
-  if (len >= 0) {
-    len = MIN (len, (int) sizeof (strbuf) - 1);
-    str = (char *) memcpy (strbuf, str, len);
-    strbuf[len] = '\0';
-  }
-
-  hb_language_item_t *item = lang_find_or_insert (str);
-
-  return likely (item) ? item->lang : HB_LANGUAGE_INVALID;
-}
-
-const char *
-hb_language_to_string (hb_language_t language)
-{
-  /* This is actually NULL-safe! */
-  return language->s;
-}
-
-hb_language_t
-hb_language_get_default (void)
-{
-  static hb_language_t default_language;
-
-  if (!default_language) {
-    /* This block is not quite threadsafe, but is not as bad as
-     * it looks since it's idempotent.  As long as pointer ops
-     * are atomic, we are safe. */
-
-    /* I hear that setlocale() doesn't honor env vars on Windows,
-     * but for now we ignore that. */
-
-    default_language = hb_language_from_string (setlocale (LC_CTYPE, NULL), -1);
-  }
-
-  return default_language;
-}
-
-
-/* hb_script_t */
-
-hb_script_t
-hb_script_from_iso15924_tag (hb_tag_t tag)
-{
-  if (unlikely (tag == HB_TAG_NONE))
-    return HB_SCRIPT_INVALID;
-
-  /* Be lenient, adjust case (one capital letter followed by three small letters) */
-  tag = (tag & 0xDFDFDFDF) | 0x00202020;
-
-  switch (tag) {
-
-    /* These graduated from the 'Q' private-area codes, but
-     * the old code is still aliased by Unicode, and the Qaai
-     * one in use by ICU. */
-    case HB_TAG('Q','a','a','i'): return HB_SCRIPT_INHERITED;
-    case HB_TAG('Q','a','a','c'): return HB_SCRIPT_COPTIC;
-
-    /* Script variants from http://unicode.org/iso15924/ */
-    case HB_TAG('C','y','r','s'): return HB_SCRIPT_CYRILLIC;
-    case HB_TAG('L','a','t','f'): return HB_SCRIPT_LATIN;
-    case HB_TAG('L','a','t','g'): return HB_SCRIPT_LATIN;
-    case HB_TAG('S','y','r','e'): return HB_SCRIPT_SYRIAC;
-    case HB_TAG('S','y','r','j'): return HB_SCRIPT_SYRIAC;
-    case HB_TAG('S','y','r','n'): return HB_SCRIPT_SYRIAC;
-  }
-
-  /* If it looks right, just use the tag as a script */
-  if (((uint32_t) tag & 0xE0E0E0E0) == 0x40606060)
-    return (hb_script_t) tag;
-
-  /* Otherwise, return unknown */
-  return HB_SCRIPT_UNKNOWN;
-}
-
-hb_script_t
-hb_script_from_string (const char *s, int len)
-{
-  return hb_script_from_iso15924_tag (hb_tag_from_string (s, len));
-}
-
-hb_tag_t
-hb_script_to_iso15924_tag (hb_script_t script)
-{
-  return (hb_tag_t) script;
-}
-
-hb_direction_t
-hb_script_get_horizontal_direction (hb_script_t script)
-{
-  /* http://goo.gl/x9ilM */
-  switch ((hb_tag_t) script)
-  {
-    /* Unicode-1.1 additions */
-    case HB_SCRIPT_ARABIC:
-    case HB_SCRIPT_HEBREW:
-
-    /* Unicode-3.0 additions */
-    case HB_SCRIPT_SYRIAC:
-    case HB_SCRIPT_THAANA:
-
-    /* Unicode-4.0 additions */
-    case HB_SCRIPT_CYPRIOT:
-
-    /* Unicode-4.1 additions */
-    case HB_SCRIPT_KHAROSHTHI:
-
-    /* Unicode-5.0 additions */
-    case HB_SCRIPT_PHOENICIAN:
-    case HB_SCRIPT_NKO:
-
-    /* Unicode-5.1 additions */
-    case HB_SCRIPT_LYDIAN:
-
-    /* Unicode-5.2 additions */
-    case HB_SCRIPT_AVESTAN:
-    case HB_SCRIPT_IMPERIAL_ARAMAIC:
-    case HB_SCRIPT_INSCRIPTIONAL_PAHLAVI:
-    case HB_SCRIPT_INSCRIPTIONAL_PARTHIAN:
-    case HB_SCRIPT_OLD_SOUTH_ARABIAN:
-    case HB_SCRIPT_OLD_TURKIC:
-    case HB_SCRIPT_SAMARITAN:
-
-    /* Unicode-6.0 additions */
-    case HB_SCRIPT_MANDAIC:
-
-    /* Unicode-6.1 additions */
-    case HB_SCRIPT_MEROITIC_CURSIVE:
-    case HB_SCRIPT_MEROITIC_HIEROGLYPHS:
-
-      return HB_DIRECTION_RTL;
-  }
-
-  return HB_DIRECTION_LTR;
-}
-
-
-/* hb_user_data_array_t */
-
-bool
-hb_user_data_array_t::set (hb_user_data_key_t *key,
-                          void *              data,
-                          hb_destroy_func_t   destroy,
-                          hb_bool_t           replace,
-                          hb_mutex_t         &lock)
-{
-  if (!key)
-    return false;
-
-  if (replace) {
-    if (!data && !destroy) {
-      items.remove (key, lock);
-      return true;
-    }
-  }
-  hb_user_data_item_t item = {key, data, destroy};
-  bool ret = !!items.replace_or_insert (item, lock, replace);
-
-  return ret;
-}
-
-void *
-hb_user_data_array_t::get (hb_user_data_key_t *key,
-                          hb_mutex_t         &lock)
-{
-  hb_user_data_item_t item = {NULL };
-
-  return items.find (key, &item, lock) ? item.data : NULL;
-}
-
-void
-hb_user_data_array_t::finish (hb_mutex_t &lock)
-{
-  items.finish (lock);
-}
-
-
-/* hb_version */
-
-void
-hb_version (unsigned int *major,
-           unsigned int *minor,
-           unsigned int *micro)
-{
-  *major = HB_VERSION_MAJOR;
-  *minor = HB_VERSION_MINOR;
-  *micro = HB_VERSION_MICRO;
-}
-
-const char *
-hb_version_string (void)
-{
-  return HB_VERSION_STRING;
-}
-
-hb_bool_t
-hb_version_check (unsigned int major,
-                 unsigned int minor,
-                 unsigned int micro)
-{
-  return HB_VERSION_CHECK (major, minor, micro);
-}
-
-
diff --git a/src/hb-common.h b/src/hb-common.h
deleted file mode 100644 (file)
index 562b04c..0000000
+++ /dev/null
@@ -1,346 +0,0 @@
-/*
- * Copyright © 2007,2008,2009  Red Hat, Inc.
- * Copyright © 2011,2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Behdad Esfahbod
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_H_IN
-#error "Include <hb.h> instead."
-#endif
-
-#ifndef HB_COMMON_H
-#define HB_COMMON_H
-
-# ifdef __cplusplus
-#  define HB_BEGIN_DECLS       extern "C" {
-#  define HB_END_DECLS         }
-# else /* !__cplusplus */
-#  define HB_BEGIN_DECLS
-#  define HB_END_DECLS
-# endif /* !__cplusplus */
-
-HB_BEGIN_DECLS
-
-#if !defined (HB_DONT_DEFINE_STDINT)
-
-#if defined (_SVR4) || defined (SVR4) || defined (__OpenBSD__) || \
-    defined (_sgi) || defined (__sun) || defined (sun) || \
-    defined (__digital__) || defined (__HP_cc)
-#  include <inttypes.h>
-#elif defined (_AIX)
-#  include <sys/inttypes.h>
-/* VS 2010 (_MSC_VER 1600) has stdint.h */
-#elif defined (_MSC_VER) && _MSC_VER < 1600
-typedef __int8 int8_t;
-typedef unsigned __int8 uint8_t;
-typedef __int16 int16_t;
-typedef unsigned __int16 uint16_t;
-typedef __int32 int32_t;
-typedef unsigned __int32 uint32_t;
-typedef __int64 int64_t;
-typedef unsigned __int64 uint64_t;
-#else
-#  include <stdint.h>
-#endif
-
-#endif
-
-
-typedef int hb_bool_t;
-
-typedef uint32_t hb_codepoint_t;
-typedef int32_t hb_position_t;
-typedef uint32_t hb_mask_t;
-
-typedef union _hb_var_int_t {
-  uint32_t u32;
-  int32_t i32;
-  uint16_t u16[2];
-  int16_t i16[2];
-  uint8_t u8[4];
-  int8_t i8[4];
-} hb_var_int_t;
-
-
-/* hb_tag_t */
-
-typedef uint32_t hb_tag_t;
-
-#define HB_TAG(a,b,c,d) ((hb_tag_t)((((uint8_t)(a))<<24)|(((uint8_t)(b))<<16)|(((uint8_t)(c))<<8)|((uint8_t)(d))))
-#define HB_UNTAG(tag)   ((uint8_t)((tag)>>24)), ((uint8_t)((tag)>>16)), ((uint8_t)((tag)>>8)), ((uint8_t)(tag))
-
-#define HB_TAG_NONE HB_TAG(0,0,0,0)
-
-/* len=-1 means str is NUL-terminated */
-hb_tag_t hb_tag_from_string (const char *str, int len);
-
-
-/* hb_direction_t */
-
-typedef enum {
-  HB_DIRECTION_INVALID = 0,
-  HB_DIRECTION_LTR = 4,
-  HB_DIRECTION_RTL,
-  HB_DIRECTION_TTB,
-  HB_DIRECTION_BTT
-} hb_direction_t;
-
-/* len=-1 means str is NUL-terminated */
-hb_direction_t
-hb_direction_from_string (const char *str, int len);
-
-const char *
-hb_direction_to_string (hb_direction_t direction);
-
-#define HB_DIRECTION_IS_HORIZONTAL(dir)        ((((unsigned int) (dir)) & ~1U) == 4)
-#define HB_DIRECTION_IS_VERTICAL(dir)  ((((unsigned int) (dir)) & ~1U) == 6)
-#define HB_DIRECTION_IS_FORWARD(dir)   ((((unsigned int) (dir)) & ~2U) == 4)
-#define HB_DIRECTION_IS_BACKWARD(dir)  ((((unsigned int) (dir)) & ~2U) == 5)
-#define HB_DIRECTION_IS_VALID(dir)     ((((unsigned int) (dir)) & ~3U) == 4)
-#define HB_DIRECTION_REVERSE(dir)      ((hb_direction_t) (((unsigned int) (dir)) ^ 1)) /* Direction must be valid */
-
-
-/* hb_language_t */
-
-typedef struct _hb_language_t *hb_language_t;
-
-/* len=-1 means str is NUL-terminated */
-hb_language_t
-hb_language_from_string (const char *str, int len);
-
-const char *
-hb_language_to_string (hb_language_t language);
-
-#define HB_LANGUAGE_INVALID ((hb_language_t) NULL)
-
-hb_language_t
-hb_language_get_default (void);
-
-
-/* hb_unicode_general_category_t */
-
-typedef enum
-{
-  HB_UNICODE_GENERAL_CATEGORY_CONTROL,                 /* Cc */
-  HB_UNICODE_GENERAL_CATEGORY_FORMAT,                  /* Cf */
-  HB_UNICODE_GENERAL_CATEGORY_UNASSIGNED,              /* Cn */
-  HB_UNICODE_GENERAL_CATEGORY_PRIVATE_USE,             /* Co */
-  HB_UNICODE_GENERAL_CATEGORY_SURROGATE,               /* Cs */
-  HB_UNICODE_GENERAL_CATEGORY_LOWERCASE_LETTER,                /* Ll */
-  HB_UNICODE_GENERAL_CATEGORY_MODIFIER_LETTER,         /* Lm */
-  HB_UNICODE_GENERAL_CATEGORY_OTHER_LETTER,            /* Lo */
-  HB_UNICODE_GENERAL_CATEGORY_TITLECASE_LETTER,                /* Lt */
-  HB_UNICODE_GENERAL_CATEGORY_UPPERCASE_LETTER,                /* Lu */
-  HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK,            /* Mc */
-  HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK,          /* Me */
-  HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK,                /* Mn */
-  HB_UNICODE_GENERAL_CATEGORY_DECIMAL_NUMBER,          /* Nd */
-  HB_UNICODE_GENERAL_CATEGORY_LETTER_NUMBER,           /* Nl */
-  HB_UNICODE_GENERAL_CATEGORY_OTHER_NUMBER,            /* No */
-  HB_UNICODE_GENERAL_CATEGORY_CONNECT_PUNCTUATION,     /* Pc */
-  HB_UNICODE_GENERAL_CATEGORY_DASH_PUNCTUATION,                /* Pd */
-  HB_UNICODE_GENERAL_CATEGORY_CLOSE_PUNCTUATION,       /* Pe */
-  HB_UNICODE_GENERAL_CATEGORY_FINAL_PUNCTUATION,       /* Pf */
-  HB_UNICODE_GENERAL_CATEGORY_INITIAL_PUNCTUATION,     /* Pi */
-  HB_UNICODE_GENERAL_CATEGORY_OTHER_PUNCTUATION,       /* Po */
-  HB_UNICODE_GENERAL_CATEGORY_OPEN_PUNCTUATION,                /* Ps */
-  HB_UNICODE_GENERAL_CATEGORY_CURRENCY_SYMBOL,         /* Sc */
-  HB_UNICODE_GENERAL_CATEGORY_MODIFIER_SYMBOL,         /* Sk */
-  HB_UNICODE_GENERAL_CATEGORY_MATH_SYMBOL,             /* Sm */
-  HB_UNICODE_GENERAL_CATEGORY_OTHER_SYMBOL,            /* So */
-  HB_UNICODE_GENERAL_CATEGORY_LINE_SEPARATOR,          /* Zl */
-  HB_UNICODE_GENERAL_CATEGORY_PARAGRAPH_SEPARATOR,     /* Zp */
-  HB_UNICODE_GENERAL_CATEGORY_SPACE_SEPARATOR          /* Zs */
-} hb_unicode_general_category_t;
-
-
-/* hb_script_t */
-
-/* http://unicode.org/iso15924/ */
-/* http://goo.gl/x9ilM */
-typedef enum
-{
-  /* Unicode-1.1 additions */
-  HB_SCRIPT_COMMON                     = HB_TAG ('Z','y','y','y'),
-  HB_SCRIPT_ARABIC                     = HB_TAG ('A','r','a','b'),
-  HB_SCRIPT_ARMENIAN                   = HB_TAG ('A','r','m','n'),
-  HB_SCRIPT_BENGALI                    = HB_TAG ('B','e','n','g'),
-  HB_SCRIPT_BOPOMOFO                   = HB_TAG ('B','o','p','o'),
-  HB_SCRIPT_CANADIAN_ABORIGINAL                = HB_TAG ('C','a','n','s'),
-  HB_SCRIPT_CHEROKEE                   = HB_TAG ('C','h','e','r'),
-  HB_SCRIPT_COPTIC                     = HB_TAG ('C','o','p','t'),
-  HB_SCRIPT_CYRILLIC                   = HB_TAG ('C','y','r','l'),
-  HB_SCRIPT_DEVANAGARI                 = HB_TAG ('D','e','v','a'),
-  HB_SCRIPT_GEORGIAN                   = HB_TAG ('G','e','o','r'),
-  HB_SCRIPT_GREEK                      = HB_TAG ('G','r','e','k'),
-  HB_SCRIPT_GUJARATI                   = HB_TAG ('G','u','j','r'),
-  HB_SCRIPT_GURMUKHI                   = HB_TAG ('G','u','r','u'),
-  HB_SCRIPT_HANGUL                     = HB_TAG ('H','a','n','g'),
-  HB_SCRIPT_HAN                                = HB_TAG ('H','a','n','i'),
-  HB_SCRIPT_HEBREW                     = HB_TAG ('H','e','b','r'),
-  HB_SCRIPT_HIRAGANA                   = HB_TAG ('H','i','r','a'),
-  HB_SCRIPT_INHERITED                  = HB_TAG ('Z','i','n','h'),
-  HB_SCRIPT_KANNADA                    = HB_TAG ('K','n','d','a'),
-  HB_SCRIPT_KATAKANA                   = HB_TAG ('K','a','n','a'),
-  HB_SCRIPT_LAO                                = HB_TAG ('L','a','o','o'),
-  HB_SCRIPT_LATIN                      = HB_TAG ('L','a','t','n'),
-  HB_SCRIPT_MALAYALAM                  = HB_TAG ('M','l','y','m'),
-  HB_SCRIPT_MONGOLIAN                  = HB_TAG ('M','o','n','g'),
-  HB_SCRIPT_OGHAM                      = HB_TAG ('O','g','a','m'),
-  HB_SCRIPT_ORIYA                      = HB_TAG ('O','r','y','a'),
-  HB_SCRIPT_RUNIC                      = HB_TAG ('R','u','n','r'),
-  HB_SCRIPT_SYRIAC                     = HB_TAG ('S','y','r','c'),
-  HB_SCRIPT_TAMIL                      = HB_TAG ('T','a','m','l'),
-  HB_SCRIPT_TELUGU                     = HB_TAG ('T','e','l','u'),
-  HB_SCRIPT_THAI                       = HB_TAG ('T','h','a','i'),
-  HB_SCRIPT_YI                         = HB_TAG ('Y','i','i','i'),
-
-  /* Unicode-2.0 additions */
-  HB_SCRIPT_TIBETAN                    = HB_TAG ('T','i','b','t'),
-
-  /* Unicode-3.0 additions */
-  HB_SCRIPT_ETHIOPIC                   = HB_TAG ('E','t','h','i'),
-  HB_SCRIPT_KHMER                      = HB_TAG ('K','h','m','r'),
-  HB_SCRIPT_MYANMAR                    = HB_TAG ('M','y','m','r'),
-  HB_SCRIPT_SINHALA                    = HB_TAG ('S','i','n','h'),
-  HB_SCRIPT_THAANA                     = HB_TAG ('T','h','a','a'),
-
-  /* Unicode-3.1 additions */
-  HB_SCRIPT_DESERET                    = HB_TAG ('D','s','r','t'),
-  HB_SCRIPT_GOTHIC                     = HB_TAG ('G','o','t','h'),
-  HB_SCRIPT_OLD_ITALIC                 = HB_TAG ('I','t','a','l'),
-
-  /* Unicode-3.2 additions */
-  HB_SCRIPT_BUHID                      = HB_TAG ('B','u','h','d'),
-  HB_SCRIPT_HANUNOO                    = HB_TAG ('H','a','n','o'),
-  HB_SCRIPT_TAGALOG                    = HB_TAG ('T','g','l','g'),
-  HB_SCRIPT_TAGBANWA                   = HB_TAG ('T','a','g','b'),
-
-  /* Unicode-4.0 additions */
-  HB_SCRIPT_BRAILLE                    = HB_TAG ('B','r','a','i'),
-  HB_SCRIPT_CYPRIOT                    = HB_TAG ('C','p','r','t'),
-  HB_SCRIPT_LIMBU                      = HB_TAG ('L','i','m','b'),
-  HB_SCRIPT_LINEAR_B                   = HB_TAG ('L','i','n','b'),
-  HB_SCRIPT_OSMANYA                    = HB_TAG ('O','s','m','a'),
-  HB_SCRIPT_SHAVIAN                    = HB_TAG ('S','h','a','w'),
-  HB_SCRIPT_TAI_LE                     = HB_TAG ('T','a','l','e'),
-  HB_SCRIPT_UGARITIC                   = HB_TAG ('U','g','a','r'),
-
-  /* Unicode-4.1 additions */
-  HB_SCRIPT_BUGINESE                   = HB_TAG ('B','u','g','i'),
-  HB_SCRIPT_GLAGOLITIC                 = HB_TAG ('G','l','a','g'),
-  HB_SCRIPT_KHAROSHTHI                 = HB_TAG ('K','h','a','r'),
-  HB_SCRIPT_NEW_TAI_LUE                        = HB_TAG ('T','a','l','u'),
-  HB_SCRIPT_OLD_PERSIAN                        = HB_TAG ('X','p','e','o'),
-  HB_SCRIPT_SYLOTI_NAGRI               = HB_TAG ('S','y','l','o'),
-  HB_SCRIPT_TIFINAGH                   = HB_TAG ('T','f','n','g'),
-
-  /* Unicode-5.0 additions */
-  HB_SCRIPT_BALINESE                   = HB_TAG ('B','a','l','i'),
-  HB_SCRIPT_CUNEIFORM                  = HB_TAG ('X','s','u','x'),
-  HB_SCRIPT_NKO                                = HB_TAG ('N','k','o','o'),
-  HB_SCRIPT_PHAGS_PA                   = HB_TAG ('P','h','a','g'),
-  HB_SCRIPT_PHOENICIAN                 = HB_TAG ('P','h','n','x'),
-  HB_SCRIPT_UNKNOWN                    = HB_TAG ('Z','z','z','z'),
-
-  /* Unicode-5.1 additions */
-  HB_SCRIPT_CARIAN                     = HB_TAG ('C','a','r','i'),
-  HB_SCRIPT_CHAM                       = HB_TAG ('C','h','a','m'),
-  HB_SCRIPT_KAYAH_LI                   = HB_TAG ('K','a','l','i'),
-  HB_SCRIPT_LEPCHA                     = HB_TAG ('L','e','p','c'),
-  HB_SCRIPT_LYCIAN                     = HB_TAG ('L','y','c','i'),
-  HB_SCRIPT_LYDIAN                     = HB_TAG ('L','y','d','i'),
-  HB_SCRIPT_OL_CHIKI                   = HB_TAG ('O','l','c','k'),
-  HB_SCRIPT_REJANG                     = HB_TAG ('R','j','n','g'),
-  HB_SCRIPT_SAURASHTRA                 = HB_TAG ('S','a','u','r'),
-  HB_SCRIPT_SUNDANESE                  = HB_TAG ('S','u','n','d'),
-  HB_SCRIPT_VAI                                = HB_TAG ('V','a','i','i'),
-
-  /* Unicode-5.2 additions */
-  HB_SCRIPT_AVESTAN                    = HB_TAG ('A','v','s','t'),
-  HB_SCRIPT_BAMUM                      = HB_TAG ('B','a','m','u'),
-  HB_SCRIPT_EGYPTIAN_HIEROGLYPHS       = HB_TAG ('E','g','y','p'),
-  HB_SCRIPT_IMPERIAL_ARAMAIC           = HB_TAG ('A','r','m','i'),
-  HB_SCRIPT_INSCRIPTIONAL_PAHLAVI      = HB_TAG ('P','h','l','i'),
-  HB_SCRIPT_INSCRIPTIONAL_PARTHIAN     = HB_TAG ('P','r','t','i'),
-  HB_SCRIPT_JAVANESE                   = HB_TAG ('J','a','v','a'),
-  HB_SCRIPT_KAITHI                     = HB_TAG ('K','t','h','i'),
-  HB_SCRIPT_LISU                       = HB_TAG ('L','i','s','u'),
-  HB_SCRIPT_MEETEI_MAYEK               = HB_TAG ('M','t','e','i'),
-  HB_SCRIPT_OLD_SOUTH_ARABIAN          = HB_TAG ('S','a','r','b'),
-  HB_SCRIPT_OLD_TURKIC                 = HB_TAG ('O','r','k','h'),
-  HB_SCRIPT_SAMARITAN                  = HB_TAG ('S','a','m','r'),
-  HB_SCRIPT_TAI_THAM                   = HB_TAG ('L','a','n','a'),
-  HB_SCRIPT_TAI_VIET                   = HB_TAG ('T','a','v','t'),
-
-  /* Unicode-6.0 additions */
-  HB_SCRIPT_BATAK                      = HB_TAG ('B','a','t','k'),
-  HB_SCRIPT_BRAHMI                     = HB_TAG ('B','r','a','h'),
-  HB_SCRIPT_MANDAIC                    = HB_TAG ('M','a','n','d'),
-
-  /* Unicode-6.1 additions */
-  HB_SCRIPT_CHAKMA                     = HB_TAG ('C','a','k','m'),
-  HB_SCRIPT_MEROITIC_CURSIVE           = HB_TAG ('M','e','r','c'),
-  HB_SCRIPT_MEROITIC_HIEROGLYPHS       = HB_TAG ('M','e','r','o'),
-  HB_SCRIPT_MIAO                       = HB_TAG ('P','l','r','d'),
-  HB_SCRIPT_SHARADA                    = HB_TAG ('S','h','r','d'),
-  HB_SCRIPT_SORA_SOMPENG               = HB_TAG ('S','o','r','a'),
-  HB_SCRIPT_TAKRI                      = HB_TAG ('T','a','k','r'),
-
-  /* No script set */
-  HB_SCRIPT_INVALID                    = HB_TAG_NONE
-} hb_script_t;
-
-
-/* Script functions */
-
-hb_script_t
-hb_script_from_iso15924_tag (hb_tag_t tag);
-
-/* suger for tag_from_string() then script_from_iso15924_tag */
-/* len=-1 means s is NUL-terminated */
-hb_script_t
-hb_script_from_string (const char *s, int len);
-
-hb_tag_t
-hb_script_to_iso15924_tag (hb_script_t script);
-
-hb_direction_t
-hb_script_get_horizontal_direction (hb_script_t script);
-
-
-/* User data */
-
-typedef struct _hb_user_data_key_t {
-  /*< private >*/
-  char unused;
-} hb_user_data_key_t;
-
-typedef void (*hb_destroy_func_t) (void *user_data);
-
-
-HB_END_DECLS
-
-#endif /* HB_COMMON_H */
diff --git a/src/hb-fallback-shape-private.hh b/src/hb-fallback-shape-private.hh
deleted file mode 100644 (file)
index 159456d..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright © 2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_FALLBACK_SHAPE_PRIVATE_HH
-#define HB_FALLBACK_SHAPE_PRIVATE_HH
-
-#include "hb-private.hh"
-
-#include "hb-shape.h"
-
-
-HB_BEGIN_DECLS
-
-
-HB_INTERNAL hb_bool_t
-_hb_fallback_shape (hb_font_t          *font,
-                   hb_buffer_t        *buffer,
-                   const hb_feature_t *features,
-                   unsigned int        num_features);
-
-
-HB_END_DECLS
-
-#endif /* HB_FALLBACK_SHAPE_PRIVATE_HH */
diff --git a/src/hb-fallback-shape.cc b/src/hb-fallback-shape.cc
deleted file mode 100644 (file)
index 5939887..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright © 2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "hb-fallback-shape-private.hh"
-
-#include "hb-buffer-private.hh"
-
-hb_bool_t
-_hb_fallback_shape (hb_font_t          *font,
-                   hb_buffer_t        *buffer,
-                   const hb_feature_t *features HB_UNUSED,
-                   unsigned int        num_features HB_UNUSED)
-{
-  buffer->guess_properties ();
-
-  unsigned int count = buffer->len;
-
-  for (unsigned int i = 0; i < count; i++)
-    hb_font_get_glyph (font, buffer->info[i].codepoint, 0, &buffer->info[i].codepoint);
-
-  buffer->clear_positions ();
-
-  for (unsigned int i = 0; i < count; i++) {
-    hb_font_get_glyph_advance_for_direction (font, buffer->info[i].codepoint,
-                                            buffer->props.direction,
-                                            &buffer->pos[i].x_advance,
-                                            &buffer->pos[i].y_advance);
-    hb_font_subtract_glyph_origin_for_direction (font, buffer->info[i].codepoint,
-                                                buffer->props.direction,
-                                                &buffer->pos[i].x_offset,
-                                                &buffer->pos[i].y_offset);
-  }
-
-  if (HB_DIRECTION_IS_BACKWARD (buffer->props.direction))
-    hb_buffer_reverse (buffer);
-
-  return true;
-}
diff --git a/src/hb-font-private.hh b/src/hb-font-private.hh
deleted file mode 100644 (file)
index 91a4304..0000000
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * Copyright © 2009  Red Hat, Inc.
- * Copyright © 2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Behdad Esfahbod
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_FONT_PRIVATE_HH
-#define HB_FONT_PRIVATE_HH
-
-#include "hb-private.hh"
-
-#include "hb-font.h"
-#include "hb-object-private.hh"
-
-
-
-/*
- * hb_font_funcs_t
- */
-
-#define HB_FONT_FUNCS_IMPLEMENT_CALLBACKS \
-  HB_FONT_FUNC_IMPLEMENT (glyph) \
-  HB_FONT_FUNC_IMPLEMENT (glyph_h_advance) \
-  HB_FONT_FUNC_IMPLEMENT (glyph_v_advance) \
-  HB_FONT_FUNC_IMPLEMENT (glyph_h_origin) \
-  HB_FONT_FUNC_IMPLEMENT (glyph_v_origin) \
-  HB_FONT_FUNC_IMPLEMENT (glyph_h_kerning) \
-  HB_FONT_FUNC_IMPLEMENT (glyph_v_kerning) \
-  HB_FONT_FUNC_IMPLEMENT (glyph_extents) \
-  HB_FONT_FUNC_IMPLEMENT (glyph_contour_point) \
-  HB_FONT_FUNC_IMPLEMENT (glyph_name) \
-  HB_FONT_FUNC_IMPLEMENT (glyph_from_name) \
-  /* ^--- Add new callbacks here */
-
-struct _hb_font_funcs_t {
-  hb_object_header_t header;
-  ASSERT_POD ();
-
-  hb_bool_t immutable;
-
-  /* Don't access these directly.  Call hb_font_get_*() instead. */
-
-  struct {
-#define HB_FONT_FUNC_IMPLEMENT(name) hb_font_get_##name##_func_t name;
-    HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
-#undef HB_FONT_FUNC_IMPLEMENT
-  } get;
-
-  struct {
-#define HB_FONT_FUNC_IMPLEMENT(name) void *name;
-    HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
-#undef HB_FONT_FUNC_IMPLEMENT
-  } user_data;
-
-  struct {
-#define HB_FONT_FUNC_IMPLEMENT(name) hb_destroy_func_t name;
-    HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
-#undef HB_FONT_FUNC_IMPLEMENT
-  } destroy;
-};
-
-
-/*
- * hb_face_t
- */
-
-struct _hb_face_t {
-  hb_object_header_t header;
-  ASSERT_POD ();
-
-  hb_bool_t immutable;
-
-  hb_reference_table_func_t  reference_table;
-  void                      *user_data;
-  hb_destroy_func_t          destroy;
-
-  struct hb_ot_layout_t *ot_layout;
-
-  unsigned int index;
-  unsigned int upem;
-};
-
-
-/*
- * hb_font_t
- */
-
-struct _hb_font_t {
-  hb_object_header_t header;
-  ASSERT_POD ();
-
-  hb_bool_t immutable;
-
-  hb_font_t *parent;
-  hb_face_t *face;
-
-  int x_scale;
-  int y_scale;
-
-  unsigned int x_ppem;
-  unsigned int y_ppem;
-
-  hb_font_funcs_t   *klass;
-  void              *user_data;
-  hb_destroy_func_t  destroy;
-
-
-  /* Convert from font-space to user-space */
-  inline hb_position_t em_scale_x (int16_t v) { return em_scale (v, this->x_scale); }
-  inline hb_position_t em_scale_y (int16_t v) { return em_scale (v, this->y_scale); }
-
-  /* Convert from parent-font user-space to our user-space */
-  inline hb_position_t parent_scale_x_distance (hb_position_t v) {
-    if (unlikely (parent && parent->x_scale != x_scale))
-      return v * (int64_t) this->x_scale / this->parent->x_scale;
-    return v;
-  }
-  inline hb_position_t parent_scale_y_distance (hb_position_t v) {
-    if (unlikely (parent && parent->y_scale != y_scale))
-      return v * (int64_t) this->y_scale / this->parent->y_scale;
-    return v;
-  }
-  inline hb_position_t parent_scale_x_position (hb_position_t v) {
-    return parent_scale_x_distance (v);
-  }
-  inline hb_position_t parent_scale_y_position (hb_position_t v) {
-    return parent_scale_y_distance (v);
-  }
-
-  inline void parent_scale_distance (hb_position_t *x, hb_position_t *y) {
-    *x = parent_scale_x_distance (*x);
-    *y = parent_scale_y_distance (*y);
-  }
-  inline void parent_scale_position (hb_position_t *x, hb_position_t *y) {
-    *x = parent_scale_x_position (*x);
-    *y = parent_scale_y_position (*y);
-  }
-
-
-  private:
-  inline hb_position_t em_scale (int16_t v, int scale) { return v * (int64_t) scale / hb_face_get_upem (this->face); }
-};
-
-
-
-#endif /* HB_FONT_PRIVATE_HH */
diff --git a/src/hb-font.cc b/src/hb-font.cc
deleted file mode 100644 (file)
index 109caff..0000000
+++ /dev/null
@@ -1,1032 +0,0 @@
-/*
- * Copyright © 2009  Red Hat, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Behdad Esfahbod
- */
-
-#include "hb-private.hh"
-
-#include "hb-ot-layout-private.hh"
-
-#include "hb-font-private.hh"
-#include "hb-blob.h"
-#include "hb-open-file-private.hh"
-#include "hb-ot-head-table.hh"
-
-#include "hb-cache-private.hh"
-
-#include <string.h>
-
-
-
-/*
- * hb_font_funcs_t
- */
-
-static hb_bool_t
-hb_font_get_glyph_nil (hb_font_t *font,
-                      void *font_data HB_UNUSED,
-                      hb_codepoint_t unicode,
-                      hb_codepoint_t variation_selector,
-                      hb_codepoint_t *glyph,
-                      void *user_data HB_UNUSED)
-{
-  if (font->parent)
-    return hb_font_get_glyph (font->parent, unicode, variation_selector, glyph);
-
-  *glyph = 0;
-  return false;
-}
-
-static hb_position_t
-hb_font_get_glyph_h_advance_nil (hb_font_t *font,
-                                void *font_data HB_UNUSED,
-                                hb_codepoint_t glyph,
-                                void *user_data HB_UNUSED)
-{
-  if (font->parent)
-    return font->parent_scale_x_distance (hb_font_get_glyph_h_advance (font->parent, glyph));
-
-  return font->x_scale;
-}
-
-static hb_position_t
-hb_font_get_glyph_v_advance_nil (hb_font_t *font,
-                                void *font_data HB_UNUSED,
-                                hb_codepoint_t glyph,
-                                void *user_data HB_UNUSED)
-{
-  if (font->parent)
-    return font->parent_scale_y_distance (hb_font_get_glyph_v_advance (font->parent, glyph));
-
-  return font->y_scale;
-}
-
-static hb_bool_t
-hb_font_get_glyph_h_origin_nil (hb_font_t *font,
-                               void *font_data HB_UNUSED,
-                               hb_codepoint_t glyph,
-                               hb_position_t *x,
-                               hb_position_t *y,
-                               void *user_data HB_UNUSED)
-{
-  if (font->parent) {
-    hb_bool_t ret = hb_font_get_glyph_h_origin (font->parent, glyph, x, y);
-    if (ret)
-      font->parent_scale_position (x, y);
-    return ret;
-  }
-
-  *x = *y = 0;
-  return false;
-}
-
-static hb_bool_t
-hb_font_get_glyph_v_origin_nil (hb_font_t *font,
-                               void *font_data HB_UNUSED,
-                               hb_codepoint_t glyph,
-                               hb_position_t *x,
-                               hb_position_t *y,
-                               void *user_data HB_UNUSED)
-{
-  if (font->parent) {
-    hb_bool_t ret = hb_font_get_glyph_v_origin (font->parent, glyph, x, y);
-    if (ret)
-      font->parent_scale_position (x, y);
-    return ret;
-  }
-
-  *x = *y = 0;
-  return false;
-}
-
-static hb_position_t
-hb_font_get_glyph_h_kerning_nil (hb_font_t *font,
-                                void *font_data HB_UNUSED,
-                                hb_codepoint_t left_glyph,
-                                hb_codepoint_t right_glyph,
-                                void *user_data HB_UNUSED)
-{
-  if (font->parent)
-    return font->parent_scale_x_distance (hb_font_get_glyph_h_kerning (font->parent, left_glyph, right_glyph));
-
-  return 0;
-}
-
-static hb_position_t
-hb_font_get_glyph_v_kerning_nil (hb_font_t *font,
-                                void *font_data HB_UNUSED,
-                                hb_codepoint_t top_glyph,
-                                hb_codepoint_t bottom_glyph,
-                                void *user_data HB_UNUSED)
-{
-  if (font->parent)
-    return font->parent_scale_y_distance (hb_font_get_glyph_v_kerning (font->parent, top_glyph, bottom_glyph));
-
-  return 0;
-}
-
-static hb_bool_t
-hb_font_get_glyph_extents_nil (hb_font_t *font,
-                              void *font_data HB_UNUSED,
-                              hb_codepoint_t glyph,
-                              hb_glyph_extents_t *extents,
-                              void *user_data HB_UNUSED)
-{
-  if (font->parent) {
-    hb_bool_t ret = hb_font_get_glyph_extents (font->parent,
-                                              glyph,
-                                              extents);
-    if (ret) {
-      font->parent_scale_position (&extents->x_bearing, &extents->y_bearing);
-      font->parent_scale_distance (&extents->width, &extents->height);
-    }
-    return ret;
-  }
-
-  memset (extents, 0, sizeof (*extents));
-  return false;
-}
-
-static hb_bool_t
-hb_font_get_glyph_contour_point_nil (hb_font_t *font,
-                                    void *font_data HB_UNUSED,
-                                    hb_codepoint_t glyph,
-                                    unsigned int point_index,
-                                    hb_position_t *x,
-                                    hb_position_t *y,
-                                    void *user_data HB_UNUSED)
-{
-  if (font->parent) {
-    hb_bool_t ret = hb_font_get_glyph_contour_point (font->parent, glyph, point_index, x, y);
-    if (ret)
-      font->parent_scale_position (x, y);
-    return ret;
-  }
-
-  *x = *y = 0;
-  return false;
-}
-
-static hb_bool_t
-hb_font_get_glyph_name_nil (hb_font_t *font,
-                           void *font_data HB_UNUSED,
-                           hb_codepoint_t glyph,
-                           char *name, unsigned int size,
-                           void *user_data HB_UNUSED)
-{
-  if (font->parent)
-    return hb_font_get_glyph_name (font->parent, glyph, name, size);
-
-  snprintf (name, size, "gid%u", glyph);
-  return false;
-}
-
-static hb_bool_t
-hb_font_get_glyph_from_name_nil (hb_font_t *font,
-                                void *font_data HB_UNUSED,
-                                const char *name, int len, /* -1 means nul-terminated */
-                                hb_codepoint_t *glyph,
-                                void *user_data HB_UNUSED)
-{
-  if (font->parent)
-    return hb_font_get_glyph_from_name (font->parent, name, len, glyph);
-
-  *glyph = 0;
-  return false;
-}
-
-
-static const hb_font_funcs_t _hb_font_funcs_nil = {
-  HB_OBJECT_HEADER_STATIC,
-
-  true, /* immutable */
-
-  {
-#define HB_FONT_FUNC_IMPLEMENT(name) hb_font_get_##name##_nil,
-    HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
-#undef HB_FONT_FUNC_IMPLEMENT
-  }
-};
-
-
-hb_font_funcs_t *
-hb_font_funcs_create (void)
-{
-  hb_font_funcs_t *ffuncs;
-
-  if (!(ffuncs = hb_object_create<hb_font_funcs_t> ()))
-    return hb_font_funcs_get_empty ();
-
-  ffuncs->get = _hb_font_funcs_nil.get;
-
-  return ffuncs;
-}
-
-hb_font_funcs_t *
-hb_font_funcs_get_empty (void)
-{
-  return const_cast<hb_font_funcs_t *> (&_hb_font_funcs_nil);
-}
-
-hb_font_funcs_t *
-hb_font_funcs_reference (hb_font_funcs_t *ffuncs)
-{
-  return hb_object_reference (ffuncs);
-}
-
-void
-hb_font_funcs_destroy (hb_font_funcs_t *ffuncs)
-{
-  if (!hb_object_destroy (ffuncs)) return;
-
-#define HB_FONT_FUNC_IMPLEMENT(name) if (ffuncs->destroy.name) \
-  ffuncs->destroy.name (ffuncs->user_data.name);
-  HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
-#undef HB_FONT_FUNC_IMPLEMENT
-
-  free (ffuncs);
-}
-
-hb_bool_t
-hb_font_funcs_set_user_data (hb_font_funcs_t    *ffuncs,
-                            hb_user_data_key_t *key,
-                            void *              data,
-                            hb_destroy_func_t   destroy,
-                            hb_bool_t           replace)
-{
-  return hb_object_set_user_data (ffuncs, key, data, destroy, replace);
-}
-
-void *
-hb_font_funcs_get_user_data (hb_font_funcs_t    *ffuncs,
-                            hb_user_data_key_t *key)
-{
-  return hb_object_get_user_data (ffuncs, key);
-}
-
-
-void
-hb_font_funcs_make_immutable (hb_font_funcs_t *ffuncs)
-{
-  if (hb_object_is_inert (ffuncs))
-    return;
-
-  ffuncs->immutable = true;
-}
-
-hb_bool_t
-hb_font_funcs_is_immutable (hb_font_funcs_t *ffuncs)
-{
-  return ffuncs->immutable;
-}
-
-
-#define HB_FONT_FUNC_IMPLEMENT(name) \
-                                                                         \
-void                                                                     \
-hb_font_funcs_set_##name##_func (hb_font_funcs_t             *ffuncs,    \
-                                 hb_font_get_##name##_func_t  func,      \
-                                 void                        *user_data, \
-                                 hb_destroy_func_t            destroy)   \
-{                                                                        \
-  if (ffuncs->immutable) {                                               \
-    if (destroy)                                                         \
-      destroy (user_data);                                               \
-    return;                                                              \
-  }                                                                      \
-                                                                         \
-  if (ffuncs->destroy.name)                                              \
-    ffuncs->destroy.name (ffuncs->user_data.name);                       \
-                                                                         \
-  if (func) {                                                            \
-    ffuncs->get.name = func;                                             \
-    ffuncs->user_data.name = user_data;                                  \
-    ffuncs->destroy.name = destroy;                                      \
-  } else {                                                               \
-    ffuncs->get.name = hb_font_get_##name##_nil;                         \
-    ffuncs->user_data.name = NULL;                                       \
-    ffuncs->destroy.name = NULL;                                         \
-  }                                                                      \
-}
-
-HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
-#undef HB_FONT_FUNC_IMPLEMENT
-
-
-hb_bool_t
-hb_font_get_glyph (hb_font_t *font,
-                  hb_codepoint_t unicode, hb_codepoint_t variation_selector,
-                  hb_codepoint_t *glyph)
-{
-  *glyph = 0;
-  return font->klass->get.glyph (font, font->user_data,
-                                unicode, variation_selector, glyph,
-                                font->klass->user_data.glyph);
-}
-
-hb_position_t
-hb_font_get_glyph_h_advance (hb_font_t *font,
-                            hb_codepoint_t glyph)
-{
-  return font->klass->get.glyph_h_advance (font, font->user_data,
-                                          glyph,
-                                          font->klass->user_data.glyph_h_advance);
-}
-
-hb_position_t
-hb_font_get_glyph_v_advance (hb_font_t *font,
-                            hb_codepoint_t glyph)
-{
-  return font->klass->get.glyph_v_advance (font, font->user_data,
-                                          glyph,
-                                          font->klass->user_data.glyph_v_advance);
-}
-
-hb_bool_t
-hb_font_get_glyph_h_origin (hb_font_t *font,
-                           hb_codepoint_t glyph,
-                           hb_position_t *x, hb_position_t *y)
-{
-  *x = *y = 0;
-  return font->klass->get.glyph_h_origin (font, font->user_data,
-                                          glyph, x, y,
-                                          font->klass->user_data.glyph_h_origin);
-}
-
-hb_bool_t
-hb_font_get_glyph_v_origin (hb_font_t *font,
-                           hb_codepoint_t glyph,
-                           hb_position_t *x, hb_position_t *y)
-{
-  *x = *y = 0;
-  return font->klass->get.glyph_v_origin (font, font->user_data,
-                                          glyph, x, y,
-                                          font->klass->user_data.glyph_v_origin);
-}
-
-hb_position_t
-hb_font_get_glyph_h_kerning (hb_font_t *font,
-                            hb_codepoint_t left_glyph, hb_codepoint_t right_glyph)
-{
-  return font->klass->get.glyph_h_kerning (font, font->user_data,
-                                          left_glyph, right_glyph,
-                                          font->klass->user_data.glyph_h_kerning);
-}
-
-hb_position_t
-hb_font_get_glyph_v_kerning (hb_font_t *font,
-                            hb_codepoint_t left_glyph, hb_codepoint_t right_glyph)
-{
-  return font->klass->get.glyph_v_kerning (font, font->user_data,
-                                    left_glyph, right_glyph,
-                                    font->klass->user_data.glyph_v_kerning);
-}
-
-hb_bool_t
-hb_font_get_glyph_extents (hb_font_t *font,
-                          hb_codepoint_t glyph,
-                          hb_glyph_extents_t *extents)
-{
-  memset (extents, 0, sizeof (*extents));
-  return font->klass->get.glyph_extents (font, font->user_data,
-                                        glyph,
-                                        extents,
-                                        font->klass->user_data.glyph_extents);
-}
-
-hb_bool_t
-hb_font_get_glyph_contour_point (hb_font_t *font,
-                                hb_codepoint_t glyph, unsigned int point_index,
-                                hb_position_t *x, hb_position_t *y)
-{
-  *x = *y = 0;
-  return font->klass->get.glyph_contour_point (font, font->user_data,
-                                              glyph, point_index,
-                                              x, y,
-                                              font->klass->user_data.glyph_contour_point);
-}
-
-hb_bool_t
-hb_font_get_glyph_name (hb_font_t *font,
-                       hb_codepoint_t glyph,
-                       char *name, unsigned int size)
-{
-  return font->klass->get.glyph_name (font, font->user_data,
-                                     glyph,
-                                     name, size,
-                                     font->klass->user_data.glyph_name);
-}
-
-hb_bool_t
-hb_font_get_glyph_from_name (hb_font_t *font,
-                            const char *name, int len, /* -1 means nul-terminated */
-                            hb_codepoint_t *glyph)
-{
-  return font->klass->get.glyph_from_name (font, font->user_data,
-                                          name, len,
-                                          glyph,
-                                          font->klass->user_data.glyph_from_name);
-}
-
-
-/* A bit higher-level, and with fallback */
-
-void
-hb_font_get_glyph_advance_for_direction (hb_font_t *font,
-                                        hb_codepoint_t glyph,
-                                        hb_direction_t direction,
-                                        hb_position_t *x, hb_position_t *y)
-{
-  if (likely (HB_DIRECTION_IS_HORIZONTAL (direction))) {
-    *x = hb_font_get_glyph_h_advance (font, glyph);
-    *y = 0;
-  } else {
-    *x = 0;
-    *y = hb_font_get_glyph_v_advance (font, glyph);
-  }
-}
-
-static void
-guess_v_origin_minus_h_origin (hb_font_t *font,
-                              hb_codepoint_t glyph,
-                              hb_position_t *x, hb_position_t *y)
-{
-  *x = hb_font_get_glyph_h_advance (font, glyph) / 2;
-
-  /* TODO use font_metics.ascent */
-  *y = font->y_scale;
-}
-
-
-void
-hb_font_get_glyph_origin_for_direction (hb_font_t *font,
-                                       hb_codepoint_t glyph,
-                                       hb_direction_t direction,
-                                       hb_position_t *x, hb_position_t *y)
-{
-  if (likely (HB_DIRECTION_IS_HORIZONTAL (direction))) {
-    hb_bool_t ret = hb_font_get_glyph_h_origin (font, glyph, x, y);
-    if (!ret && (ret = hb_font_get_glyph_v_origin (font, glyph, x, y))) {
-      hb_position_t dx, dy;
-      guess_v_origin_minus_h_origin (font, glyph, &dx, &dy);
-      *x -= dx; *y -= dy;
-    }
-  } else {
-    hb_bool_t ret = hb_font_get_glyph_v_origin (font, glyph, x, y);
-    if (!ret && (ret = hb_font_get_glyph_h_origin (font, glyph, x, y))) {
-      hb_position_t dx, dy;
-      guess_v_origin_minus_h_origin (font, glyph, &dx, &dy);
-      *x += dx; *y += dy;
-    }
-  }
-}
-
-void
-hb_font_add_glyph_origin_for_direction (hb_font_t *font,
-                                       hb_codepoint_t glyph,
-                                       hb_direction_t direction,
-                                       hb_position_t *x, hb_position_t *y)
-{
-  hb_position_t origin_x, origin_y;
-
-  hb_font_get_glyph_origin_for_direction (font, glyph, direction, &origin_x, &origin_y);
-
-  *x += origin_x;
-  *y += origin_y;
-}
-
-void
-hb_font_subtract_glyph_origin_for_direction (hb_font_t *font,
-                                            hb_codepoint_t glyph,
-                                            hb_direction_t direction,
-                                            hb_position_t *x, hb_position_t *y)
-{
-  hb_position_t origin_x, origin_y;
-
-  hb_font_get_glyph_origin_for_direction (font, glyph, direction, &origin_x, &origin_y);
-
-  *x -= origin_x;
-  *y -= origin_y;
-}
-
-void
-hb_font_get_glyph_kerning_for_direction (hb_font_t *font,
-                                        hb_codepoint_t first_glyph, hb_codepoint_t second_glyph,
-                                        hb_direction_t direction,
-                                        hb_position_t *x, hb_position_t *y)
-{
-  if (likely (HB_DIRECTION_IS_HORIZONTAL (direction))) {
-    *x = hb_font_get_glyph_h_kerning (font, first_glyph, second_glyph);
-    *y = 0;
-  } else {
-    *x = 0;
-    *y = hb_font_get_glyph_v_kerning (font, first_glyph, second_glyph);
-  }
-}
-
-hb_bool_t
-hb_font_get_glyph_extents_for_origin (hb_font_t *font,
-                                     hb_codepoint_t glyph,
-                                     hb_direction_t direction,
-                                     hb_glyph_extents_t *extents)
-{
-  hb_bool_t ret = hb_font_get_glyph_extents (font, glyph, extents);
-
-  if (ret)
-    hb_font_subtract_glyph_origin_for_direction (font, glyph, direction, &extents->x_bearing, &extents->y_bearing);
-
-  return ret;
-}
-
-hb_bool_t
-hb_font_get_glyph_contour_point_for_origin (hb_font_t *font,
-                                           hb_codepoint_t glyph, unsigned int point_index,
-                                           hb_direction_t direction,
-                                           hb_position_t *x, hb_position_t *y)
-{
-  hb_bool_t ret = hb_font_get_glyph_contour_point (font, glyph, point_index, x, y);
-
-  if (ret)
-    hb_font_subtract_glyph_origin_for_direction (font, glyph, direction, x, y);
-
-  return ret;
-}
-
-
-/*
- * hb_face_t
- */
-
-static const hb_face_t _hb_face_nil = {
-  HB_OBJECT_HEADER_STATIC,
-
-  true, /* immutable */
-
-  NULL, /* reference_table */
-  NULL, /* user_data */
-  NULL, /* destroy */
-
-  NULL, /* ot_layout */
-
-  0,    /* index */
-  1000  /* upem */
-};
-
-
-hb_face_t *
-hb_face_create_for_tables (hb_reference_table_func_t  reference_table,
-                          void                      *user_data,
-                          hb_destroy_func_t          destroy)
-{
-  hb_face_t *face;
-
-  if (!reference_table || !(face = hb_object_create<hb_face_t> ())) {
-    if (destroy)
-      destroy (user_data);
-    return hb_face_get_empty ();
-  }
-
-  face->reference_table = reference_table;
-  face->user_data = user_data;
-  face->destroy = destroy;
-
-  face->ot_layout = _hb_ot_layout_create (face);
-
-  face->upem = 0;
-
-  return face;
-}
-
-
-typedef struct _hb_face_for_data_closure_t {
-  hb_blob_t *blob;
-  unsigned int  index;
-} hb_face_for_data_closure_t;
-
-static hb_face_for_data_closure_t *
-_hb_face_for_data_closure_create (hb_blob_t *blob, unsigned int index)
-{
-  hb_face_for_data_closure_t *closure;
-
-  closure = (hb_face_for_data_closure_t *) malloc (sizeof (hb_face_for_data_closure_t));
-  if (unlikely (!closure))
-    return NULL;
-
-  closure->blob = blob;
-  closure->index = index;
-
-  return closure;
-}
-
-static void
-_hb_face_for_data_closure_destroy (hb_face_for_data_closure_t *closure)
-{
-  hb_blob_destroy (closure->blob);
-  free (closure);
-}
-
-static hb_blob_t *
-_hb_face_for_data_reference_table (hb_face_t *face HB_UNUSED, hb_tag_t tag, void *user_data)
-{
-  hb_face_for_data_closure_t *data = (hb_face_for_data_closure_t *) user_data;
-
-  if (tag == HB_TAG_NONE)
-    return hb_blob_reference (data->blob);
-
-  const OpenTypeFontFile &ot_file = *Sanitizer<OpenTypeFontFile>::lock_instance (data->blob);
-  const OpenTypeFontFace &ot_face = ot_file.get_face (data->index);
-
-  const OpenTypeTable &table = ot_face.get_table_by_tag (tag);
-
-  hb_blob_t *blob = hb_blob_create_sub_blob (data->blob, table.offset, table.length);
-
-  return blob;
-}
-
-hb_face_t *
-hb_face_create (hb_blob_t    *blob,
-               unsigned int  index)
-{
-  hb_face_t *face;
-
-  if (unlikely (!blob || !hb_blob_get_length (blob)))
-    return hb_face_get_empty ();
-
-  hb_face_for_data_closure_t *closure = _hb_face_for_data_closure_create (Sanitizer<OpenTypeFontFile>::sanitize (hb_blob_reference (blob)), index);
-
-  if (unlikely (!closure))
-    return hb_face_get_empty ();
-
-  face = hb_face_create_for_tables (_hb_face_for_data_reference_table,
-                                   closure,
-                                   (hb_destroy_func_t) _hb_face_for_data_closure_destroy);
-
-  hb_face_set_index (face, index);
-
-  return face;
-}
-
-hb_face_t *
-hb_face_get_empty (void)
-{
-  return const_cast<hb_face_t *> (&_hb_face_nil);
-}
-
-
-hb_face_t *
-hb_face_reference (hb_face_t *face)
-{
-  return hb_object_reference (face);
-}
-
-void
-hb_face_destroy (hb_face_t *face)
-{
-  if (!hb_object_destroy (face)) return;
-
-  _hb_ot_layout_destroy (face->ot_layout);
-
-  if (face->destroy)
-    face->destroy (face->user_data);
-
-  free (face);
-}
-
-hb_bool_t
-hb_face_set_user_data (hb_face_t          *face,
-                      hb_user_data_key_t *key,
-                      void *              data,
-                      hb_destroy_func_t   destroy,
-                      hb_bool_t           replace)
-{
-  return hb_object_set_user_data (face, key, data, destroy, replace);
-}
-
-void *
-hb_face_get_user_data (hb_face_t          *face,
-                      hb_user_data_key_t *key)
-{
-  return hb_object_get_user_data (face, key);
-}
-
-void
-hb_face_make_immutable (hb_face_t *face)
-{
-  if (hb_object_is_inert (face))
-    return;
-
-  face->immutable = true;
-}
-
-hb_bool_t
-hb_face_is_immutable (hb_face_t *face)
-{
-  return face->immutable;
-}
-
-
-hb_blob_t *
-hb_face_reference_table (hb_face_t *face,
-                        hb_tag_t   tag)
-{
-  hb_blob_t *blob;
-
-  if (unlikely (!face || !face->reference_table))
-    return hb_blob_get_empty ();
-
-  blob = face->reference_table (face, tag, face->user_data);
-  if (unlikely (!blob))
-    return hb_blob_get_empty ();
-
-  return blob;
-}
-
-hb_blob_t *
-hb_face_reference_blob (hb_face_t *face)
-{
-  return hb_face_reference_table (face, HB_TAG_NONE);
-}
-
-void
-hb_face_set_index (hb_face_t    *face,
-                  unsigned int  index)
-{
-  if (hb_object_is_inert (face))
-    return;
-
-  face->index = index;
-}
-
-unsigned int
-hb_face_get_index (hb_face_t    *face)
-{
-  return face->index;
-}
-
-void
-hb_face_set_upem (hb_face_t    *face,
-                 unsigned int  upem)
-{
-  if (hb_object_is_inert (face))
-    return;
-
-  face->upem = upem;
-}
-
-unsigned int
-hb_face_get_upem (hb_face_t *face)
-{
-  if (unlikely (!face->upem)) {
-    hb_blob_t *head_blob = Sanitizer<head>::sanitize (hb_face_reference_table (face, HB_OT_TAG_head));
-    const head *head_table = Sanitizer<head>::lock_instance (head_blob);
-    face->upem = head_table->get_upem ();
-    hb_blob_destroy (head_blob);
-  }
-  return face->upem;
-}
-
-
-/*
- * hb_font_t
- */
-
-hb_font_t *
-hb_font_create (hb_face_t *face)
-{
-  hb_font_t *font;
-
-  if (unlikely (!face))
-    face = hb_face_get_empty ();
-  if (unlikely (hb_object_is_inert (face)))
-    return hb_font_get_empty ();
-  if (!(font = hb_object_create<hb_font_t> ()))
-    return hb_font_get_empty ();
-
-  hb_face_make_immutable (face);
-  font->face = hb_face_reference (face);
-  font->klass = hb_font_funcs_get_empty ();
-
-  return font;
-}
-
-hb_font_t *
-hb_font_create_sub_font (hb_font_t *parent)
-{
-  if (unlikely (!parent))
-    return hb_font_get_empty ();
-
-  hb_font_t *font = hb_font_create (parent->face);
-
-  if (unlikely (hb_object_is_inert (font)))
-    return font;
-
-  hb_font_make_immutable (parent);
-  font->parent = hb_font_reference (parent);
-
-  font->x_scale = parent->x_scale;
-  font->y_scale = parent->y_scale;
-  font->x_ppem = parent->x_ppem;
-  font->y_ppem = parent->y_ppem;
-
-  return font;
-}
-
-hb_font_t *
-hb_font_get_empty (void)
-{
-  static const hb_font_t _hb_font_nil = {
-    HB_OBJECT_HEADER_STATIC,
-
-    true, /* immutable */
-
-    NULL, /* parent */
-    const_cast<hb_face_t *> (&_hb_face_nil),
-
-    0, /* x_scale */
-    0, /* y_scale */
-
-    0, /* x_ppem */
-    0, /* y_ppem */
-
-    const_cast<hb_font_funcs_t *> (&_hb_font_funcs_nil), /* klass */
-    NULL, /* user_data */
-    NULL  /* destroy */
-  };
-
-  return const_cast<hb_font_t *> (&_hb_font_nil);
-}
-
-hb_font_t *
-hb_font_reference (hb_font_t *font)
-{
-  return hb_object_reference (font);
-}
-
-void
-hb_font_destroy (hb_font_t *font)
-{
-  if (!hb_object_destroy (font)) return;
-
-  hb_font_destroy (font->parent);
-  hb_face_destroy (font->face);
-  hb_font_funcs_destroy (font->klass);
-  if (font->destroy)
-    font->destroy (font->user_data);
-
-  free (font);
-}
-
-hb_bool_t
-hb_font_set_user_data (hb_font_t          *font,
-                      hb_user_data_key_t *key,
-                      void *              data,
-                      hb_destroy_func_t   destroy,
-                      hb_bool_t           replace)
-{
-  return hb_object_set_user_data (font, key, data, destroy, replace);
-}
-
-void *
-hb_font_get_user_data (hb_font_t          *font,
-                      hb_user_data_key_t *key)
-{
-  return hb_object_get_user_data (font, key);
-}
-
-void
-hb_font_make_immutable (hb_font_t *font)
-{
-  if (hb_object_is_inert (font))
-    return;
-
-  font->immutable = true;
-}
-
-hb_bool_t
-hb_font_is_immutable (hb_font_t *font)
-{
-  return font->immutable;
-}
-
-hb_font_t *
-hb_font_get_parent (hb_font_t *font)
-{
-  return font->parent;
-}
-
-hb_face_t *
-hb_font_get_face (hb_font_t *font)
-{
-  return font->face;
-}
-
-
-void
-hb_font_set_funcs (hb_font_t         *font,
-                  hb_font_funcs_t   *klass,
-                  void              *user_data,
-                  hb_destroy_func_t  destroy)
-{
-  if (font->immutable) {
-    if (destroy)
-      destroy (user_data);
-    return;
-  }
-
-  if (font->destroy)
-    font->destroy (font->user_data);
-
-  if (!klass)
-    klass = hb_font_funcs_get_empty ();
-
-  hb_font_funcs_reference (klass);
-  hb_font_funcs_destroy (font->klass);
-  font->klass = klass;
-  font->user_data = user_data;
-  font->destroy = destroy;
-}
-
-void
-hb_font_set_funcs_data (hb_font_t         *font,
-                       void              *user_data,
-                       hb_destroy_func_t  destroy)
-{
-  /* Destroy user_data? */
-  if (font->immutable) {
-    if (destroy)
-      destroy (user_data);
-    return;
-  }
-
-  if (font->destroy)
-    font->destroy (font->user_data);
-
-  font->user_data = user_data;
-  font->destroy = destroy;
-}
-
-
-void
-hb_font_set_scale (hb_font_t *font,
-                  int x_scale,
-                  int y_scale)
-{
-  if (font->immutable)
-    return;
-
-  font->x_scale = x_scale;
-  font->y_scale = y_scale;
-}
-
-void
-hb_font_get_scale (hb_font_t *font,
-                  int *x_scale,
-                  int *y_scale)
-{
-  if (x_scale) *x_scale = font->x_scale;
-  if (y_scale) *y_scale = font->y_scale;
-}
-
-void
-hb_font_set_ppem (hb_font_t *font,
-                 unsigned int x_ppem,
-                 unsigned int y_ppem)
-{
-  if (font->immutable)
-    return;
-
-  font->x_ppem = x_ppem;
-  font->y_ppem = y_ppem;
-}
-
-void
-hb_font_get_ppem (hb_font_t *font,
-                 unsigned int *x_ppem,
-                 unsigned int *y_ppem)
-{
-  if (x_ppem) *x_ppem = font->x_ppem;
-  if (y_ppem) *y_ppem = font->y_ppem;
-}
-
-
diff --git a/src/hb-font.h b/src/hb-font.h
deleted file mode 100644 (file)
index b98759b..0000000
+++ /dev/null
@@ -1,435 +0,0 @@
-/*
- * Copyright © 2009  Red Hat, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_H_IN
-#error "Include <hb.h> instead."
-#endif
-
-#ifndef HB_FONT_H
-#define HB_FONT_H
-
-#include "hb-common.h"
-#include "hb-blob.h"
-
-HB_BEGIN_DECLS
-
-
-typedef struct _hb_face_t hb_face_t;
-typedef struct _hb_font_t hb_font_t;
-
-/*
- * hb_face_t
- */
-
-hb_face_t *
-hb_face_create (hb_blob_t    *blob,
-               unsigned int  index);
-
-typedef hb_blob_t * (*hb_reference_table_func_t)  (hb_face_t *face, hb_tag_t tag, void *user_data);
-
-/* calls destroy() when not needing user_data anymore */
-hb_face_t *
-hb_face_create_for_tables (hb_reference_table_func_t  reference_table,
-                          void                      *user_data,
-                          hb_destroy_func_t          destroy);
-
-hb_face_t *
-hb_face_get_empty (void);
-
-hb_face_t *
-hb_face_reference (hb_face_t *face);
-
-void
-hb_face_destroy (hb_face_t *face);
-
-hb_bool_t
-hb_face_set_user_data (hb_face_t          *face,
-                      hb_user_data_key_t *key,
-                      void *              data,
-                      hb_destroy_func_t   destroy,
-                      hb_bool_t           replace);
-
-
-void *
-hb_face_get_user_data (hb_face_t          *face,
-                      hb_user_data_key_t *key);
-
-void
-hb_face_make_immutable (hb_face_t *face);
-
-hb_bool_t
-hb_face_is_immutable (hb_face_t *face);
-
-
-hb_blob_t *
-hb_face_reference_table (hb_face_t *face,
-                        hb_tag_t   tag);
-
-hb_blob_t *
-hb_face_reference_blob (hb_face_t *face);
-
-void
-hb_face_set_index (hb_face_t    *face,
-                  unsigned int  index);
-
-unsigned int
-hb_face_get_index (hb_face_t    *face);
-
-void
-hb_face_set_upem (hb_face_t    *face,
-                 unsigned int  upem);
-
-unsigned int
-hb_face_get_upem (hb_face_t *face);
-
-
-/*
- * hb_font_funcs_t
- */
-
-typedef struct _hb_font_funcs_t hb_font_funcs_t;
-
-hb_font_funcs_t *
-hb_font_funcs_create (void);
-
-hb_font_funcs_t *
-hb_font_funcs_get_empty (void);
-
-hb_font_funcs_t *
-hb_font_funcs_reference (hb_font_funcs_t *ffuncs);
-
-void
-hb_font_funcs_destroy (hb_font_funcs_t *ffuncs);
-
-hb_bool_t
-hb_font_funcs_set_user_data (hb_font_funcs_t    *ffuncs,
-                            hb_user_data_key_t *key,
-                            void *              data,
-                            hb_destroy_func_t   destroy,
-                            hb_bool_t           replace);
-
-
-void *
-hb_font_funcs_get_user_data (hb_font_funcs_t    *ffuncs,
-                            hb_user_data_key_t *key);
-
-
-void
-hb_font_funcs_make_immutable (hb_font_funcs_t *ffuncs);
-
-hb_bool_t
-hb_font_funcs_is_immutable (hb_font_funcs_t *ffuncs);
-
-/* funcs */
-
-typedef struct _hb_glyph_extents_t
-{
-  hb_position_t x_bearing;
-  hb_position_t y_bearing;
-  hb_position_t width;
-  hb_position_t height;
-} hb_glyph_extents_t;
-
-
-/* func types */
-
-typedef hb_bool_t (*hb_font_get_glyph_func_t) (hb_font_t *font, void *font_data,
-                                              hb_codepoint_t unicode, hb_codepoint_t variation_selector,
-                                              hb_codepoint_t *glyph,
-                                              void *user_data);
-
-
-typedef hb_position_t (*hb_font_get_glyph_advance_func_t) (hb_font_t *font, void *font_data,
-                                                          hb_codepoint_t glyph,
-                                                          void *user_data);
-typedef hb_font_get_glyph_advance_func_t hb_font_get_glyph_h_advance_func_t;
-typedef hb_font_get_glyph_advance_func_t hb_font_get_glyph_v_advance_func_t;
-
-typedef hb_bool_t (*hb_font_get_glyph_origin_func_t) (hb_font_t *font, void *font_data,
-                                                     hb_codepoint_t glyph,
-                                                     hb_position_t *x, hb_position_t *y,
-                                                     void *user_data);
-typedef hb_font_get_glyph_origin_func_t hb_font_get_glyph_h_origin_func_t;
-typedef hb_font_get_glyph_origin_func_t hb_font_get_glyph_v_origin_func_t;
-
-typedef hb_position_t (*hb_font_get_glyph_kerning_func_t) (hb_font_t *font, void *font_data,
-                                                          hb_codepoint_t first_glyph, hb_codepoint_t second_glyph,
-                                                          void *user_data);
-typedef hb_font_get_glyph_kerning_func_t hb_font_get_glyph_h_kerning_func_t;
-typedef hb_font_get_glyph_kerning_func_t hb_font_get_glyph_v_kerning_func_t;
-
-
-typedef hb_bool_t (*hb_font_get_glyph_extents_func_t) (hb_font_t *font, void *font_data,
-                                                      hb_codepoint_t glyph,
-                                                      hb_glyph_extents_t *extents,
-                                                      void *user_data);
-typedef hb_bool_t (*hb_font_get_glyph_contour_point_func_t) (hb_font_t *font, void *font_data,
-                                                            hb_codepoint_t glyph, unsigned int point_index,
-                                                            hb_position_t *x, hb_position_t *y,
-                                                            void *user_data);
-
-
-typedef hb_bool_t (*hb_font_get_glyph_name_func_t) (hb_font_t *font, void *font_data,
-                                                   hb_codepoint_t glyph,
-                                                   char *name, unsigned int size,
-                                                   void *user_data);
-typedef hb_bool_t (*hb_font_get_glyph_from_name_func_t) (hb_font_t *font, void *font_data,
-                                                        const char *name, int len, /* -1 means nul-terminated */
-                                                        hb_codepoint_t *glyph,
-                                                        void *user_data);
-
-
-/* func setters */
-
-void
-hb_font_funcs_set_glyph_func (hb_font_funcs_t *ffuncs,
-                             hb_font_get_glyph_func_t glyph_func,
-                             void *user_data, hb_destroy_func_t destroy);
-
-void
-hb_font_funcs_set_glyph_h_advance_func (hb_font_funcs_t *ffuncs,
-                                       hb_font_get_glyph_h_advance_func_t func,
-                                       void *user_data, hb_destroy_func_t destroy);
-void
-hb_font_funcs_set_glyph_v_advance_func (hb_font_funcs_t *ffuncs,
-                                       hb_font_get_glyph_v_advance_func_t func,
-                                       void *user_data, hb_destroy_func_t destroy);
-
-void
-hb_font_funcs_set_glyph_h_origin_func (hb_font_funcs_t *ffuncs,
-                                      hb_font_get_glyph_h_origin_func_t func,
-                                      void *user_data, hb_destroy_func_t destroy);
-void
-hb_font_funcs_set_glyph_v_origin_func (hb_font_funcs_t *ffuncs,
-                                      hb_font_get_glyph_v_origin_func_t func,
-                                      void *user_data, hb_destroy_func_t destroy);
-
-void
-hb_font_funcs_set_glyph_h_kerning_func (hb_font_funcs_t *ffuncs,
-                                       hb_font_get_glyph_h_kerning_func_t func,
-                                       void *user_data, hb_destroy_func_t destroy);
-void
-hb_font_funcs_set_glyph_v_kerning_func (hb_font_funcs_t *ffuncs,
-                                       hb_font_get_glyph_v_kerning_func_t func,
-                                       void *user_data, hb_destroy_func_t destroy);
-
-void
-hb_font_funcs_set_glyph_extents_func (hb_font_funcs_t *ffuncs,
-                                     hb_font_get_glyph_extents_func_t func,
-                                     void *user_data, hb_destroy_func_t destroy);
-void
-hb_font_funcs_set_glyph_contour_point_func (hb_font_funcs_t *ffuncs,
-                                           hb_font_get_glyph_contour_point_func_t func,
-                                           void *user_data, hb_destroy_func_t destroy);
-
-void
-hb_font_funcs_set_glyph_name_func (hb_font_funcs_t *ffuncs,
-                                  hb_font_get_glyph_name_func_t glyph_func,
-                                  void *user_data, hb_destroy_func_t destroy);
-void
-hb_font_funcs_set_glyph_from_name_func (hb_font_funcs_t *ffuncs,
-                                       hb_font_get_glyph_from_name_func_t glyph_func,
-                                       void *user_data, hb_destroy_func_t destroy);
-
-
-/* func dispatch */
-
-hb_bool_t
-hb_font_get_glyph (hb_font_t *font,
-                  hb_codepoint_t unicode, hb_codepoint_t variation_selector,
-                  hb_codepoint_t *glyph);
-
-hb_position_t
-hb_font_get_glyph_h_advance (hb_font_t *font,
-                            hb_codepoint_t glyph);
-hb_position_t
-hb_font_get_glyph_v_advance (hb_font_t *font,
-                            hb_codepoint_t glyph);
-
-hb_bool_t
-hb_font_get_glyph_h_origin (hb_font_t *font,
-                           hb_codepoint_t glyph,
-                           hb_position_t *x, hb_position_t *y);
-hb_bool_t
-hb_font_get_glyph_v_origin (hb_font_t *font,
-                           hb_codepoint_t glyph,
-                           hb_position_t *x, hb_position_t *y);
-
-hb_position_t
-hb_font_get_glyph_h_kerning (hb_font_t *font,
-                            hb_codepoint_t left_glyph, hb_codepoint_t right_glyph);
-hb_position_t
-hb_font_get_glyph_v_kerning (hb_font_t *font,
-                            hb_codepoint_t top_glyph, hb_codepoint_t bottom_glyph);
-
-hb_bool_t
-hb_font_get_glyph_extents (hb_font_t *font,
-                          hb_codepoint_t glyph,
-                          hb_glyph_extents_t *extents);
-
-hb_bool_t
-hb_font_get_glyph_contour_point (hb_font_t *font,
-                                hb_codepoint_t glyph, unsigned int point_index,
-                                hb_position_t *x, hb_position_t *y);
-
-hb_bool_t
-hb_font_get_glyph_name (hb_font_t *font,
-                       hb_codepoint_t glyph,
-                       char *name, unsigned int size);
-hb_bool_t
-hb_font_get_glyph_from_name (hb_font_t *font,
-                            const char *name, int len, /* -1 means nul-terminated */
-                            hb_codepoint_t *glyph);
-
-
-/* high-level funcs, with fallback */
-
-void
-hb_font_get_glyph_advance_for_direction (hb_font_t *font,
-                                        hb_codepoint_t glyph,
-                                        hb_direction_t direction,
-                                        hb_position_t *x, hb_position_t *y);
-void
-hb_font_get_glyph_origin_for_direction (hb_font_t *font,
-                                       hb_codepoint_t glyph,
-                                       hb_direction_t direction,
-                                       hb_position_t *x, hb_position_t *y);
-void
-hb_font_add_glyph_origin_for_direction (hb_font_t *font,
-                                       hb_codepoint_t glyph,
-                                       hb_direction_t direction,
-                                       hb_position_t *x, hb_position_t *y);
-void
-hb_font_subtract_glyph_origin_for_direction (hb_font_t *font,
-                                            hb_codepoint_t glyph,
-                                            hb_direction_t direction,
-                                            hb_position_t *x, hb_position_t *y);
-
-void
-hb_font_get_glyph_kerning_for_direction (hb_font_t *font,
-                                        hb_codepoint_t first_glyph, hb_codepoint_t second_glyph,
-                                        hb_direction_t direction,
-                                        hb_position_t *x, hb_position_t *y);
-
-hb_bool_t
-hb_font_get_glyph_extents_for_origin (hb_font_t *font,
-                                     hb_codepoint_t glyph,
-                                     hb_direction_t direction,
-                                     hb_glyph_extents_t *extents);
-
-hb_bool_t
-hb_font_get_glyph_contour_point_for_origin (hb_font_t *font,
-                                           hb_codepoint_t glyph, unsigned int point_index,
-                                           hb_direction_t direction,
-                                           hb_position_t *x, hb_position_t *y);
-
-
-/*
- * hb_font_t
- */
-
-/* Fonts are very light-weight objects */
-
-hb_font_t *
-hb_font_create (hb_face_t *face);
-
-hb_font_t *
-hb_font_create_sub_font (hb_font_t *parent);
-
-hb_font_t *
-hb_font_get_empty (void);
-
-hb_font_t *
-hb_font_reference (hb_font_t *font);
-
-void
-hb_font_destroy (hb_font_t *font);
-
-hb_bool_t
-hb_font_set_user_data (hb_font_t          *font,
-                      hb_user_data_key_t *key,
-                      void *              data,
-                      hb_destroy_func_t   destroy,
-                      hb_bool_t           replace);
-
-
-void *
-hb_font_get_user_data (hb_font_t          *font,
-                      hb_user_data_key_t *key);
-
-void
-hb_font_make_immutable (hb_font_t *font);
-
-hb_bool_t
-hb_font_is_immutable (hb_font_t *font);
-
-hb_font_t *
-hb_font_get_parent (hb_font_t *font);
-
-hb_face_t *
-hb_font_get_face (hb_font_t *font);
-
-
-void
-hb_font_set_funcs (hb_font_t         *font,
-                  hb_font_funcs_t   *klass,
-                  void              *font_data,
-                  hb_destroy_func_t  destroy);
-
-/* Be *very* careful with this function! */
-void
-hb_font_set_funcs_data (hb_font_t         *font,
-                       void              *font_data,
-                       hb_destroy_func_t  destroy);
-
-
-void
-hb_font_set_scale (hb_font_t *font,
-                  int x_scale,
-                  int y_scale);
-
-void
-hb_font_get_scale (hb_font_t *font,
-                  int *x_scale,
-                  int *y_scale);
-
-/*
- * A zero value means "no hinting in that direction"
- */
-void
-hb_font_set_ppem (hb_font_t *font,
-                 unsigned int x_ppem,
-                 unsigned int y_ppem);
-
-void
-hb_font_get_ppem (hb_font_t *font,
-                 unsigned int *x_ppem,
-                 unsigned int *y_ppem);
-
-
-HB_END_DECLS
-
-#endif /* HB_FONT_H */
diff --git a/src/hb-ft.cc b/src/hb-ft.cc
deleted file mode 100644 (file)
index 0589c9e..0000000
+++ /dev/null
@@ -1,488 +0,0 @@
-/*
- * Copyright © 2009  Red Hat, Inc.
- * Copyright © 2009  Keith Stribley
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Behdad Esfahbod
- */
-
-#include "hb-private.hh"
-
-#include "hb-ft.h"
-
-#include "hb-font-private.hh"
-
-#include FT_ADVANCES_H
-#include FT_TRUETYPE_TABLES_H
-
-
-
-#ifndef HB_DEBUG_FT
-#define HB_DEBUG_FT (HB_DEBUG+0)
-#endif
-
-
-/* TODO:
- *
- * In general, this file does a fine job of what it's supposed to do.
- * There are, however, things that need more work:
- *
- *   - We don't handle any load_flags.  That definitely has API implications. :(
- *     I believe hb_ft_font_create() should take load_flags input.
- *     In particular, FT_Get_Advance() without the NO_HINTING flag seems to be
- *     buggy.
- *
- *   - We don't handle / allow for emboldening / obliqueing.
- *
- *   - Rounding, etc?
- *
- *   - In the future, we should add constructors to create fonts in font space.
- *
- *   - I believe transforms are not correctly implemented.  FreeType does not
- *     provide any API to get to the transform/delta set on the face. :(
- *
- *   - Always use FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH?
- *
- *   - FT_Load_Glyph() is exteremely costly.  Do something about it?
- */
-
-
-static hb_bool_t
-hb_ft_get_glyph (hb_font_t *font HB_UNUSED,
-                void *font_data,
-                hb_codepoint_t unicode,
-                hb_codepoint_t variation_selector,
-                hb_codepoint_t *glyph,
-                void *user_data HB_UNUSED)
-
-{
-  FT_Face ft_face = (FT_Face) font_data;
-
-#ifdef HAVE_FT_FACE_GETCHARVARIANTINDEX
-  if (unlikely (variation_selector)) {
-    *glyph = FT_Face_GetCharVariantIndex (ft_face, unicode, variation_selector);
-    if (*glyph)
-      return true;
-  }
-#endif
-
-  *glyph = FT_Get_Char_Index (ft_face, unicode);
-  return *glyph != 0;
-}
-
-static hb_position_t
-hb_ft_get_glyph_h_advance (hb_font_t *font HB_UNUSED,
-                          void *font_data,
-                          hb_codepoint_t glyph,
-                          void *user_data HB_UNUSED)
-{
-  FT_Face ft_face = (FT_Face) font_data;
-  int load_flags = FT_LOAD_DEFAULT | FT_LOAD_NO_HINTING;
-  FT_Fixed v;
-
-  if (unlikely (FT_Get_Advance (ft_face, glyph, load_flags, &v)))
-    return 0;
-
-  return v >> 10;
-}
-
-static hb_position_t
-hb_ft_get_glyph_v_advance (hb_font_t *font HB_UNUSED,
-                          void *font_data,
-                          hb_codepoint_t glyph,
-                          void *user_data HB_UNUSED)
-{
-  FT_Face ft_face = (FT_Face) font_data;
-  int load_flags = FT_LOAD_DEFAULT | FT_LOAD_NO_HINTING | FT_LOAD_VERTICAL_LAYOUT;
-  FT_Fixed v;
-
-  if (unlikely (FT_Get_Advance (ft_face, glyph, load_flags, &v)))
-    return 0;
-
-  /* Note: FreeType's vertical metrics grows downward while other FreeType coordinates
-   * have a Y growing upward.  Hence the extra negation. */
-  return -v >> 10;
-}
-
-static hb_bool_t
-hb_ft_get_glyph_h_origin (hb_font_t *font HB_UNUSED,
-                         void *font_data HB_UNUSED,
-                         hb_codepoint_t glyph HB_UNUSED,
-                         hb_position_t *x HB_UNUSED,
-                         hb_position_t *y HB_UNUSED,
-                         void *user_data HB_UNUSED)
-{
-  /* We always work in the horizontal coordinates. */
-  return true;
-}
-
-static hb_bool_t
-hb_ft_get_glyph_v_origin (hb_font_t *font HB_UNUSED,
-                         void *font_data,
-                         hb_codepoint_t glyph,
-                         hb_position_t *x,
-                         hb_position_t *y,
-                         void *user_data HB_UNUSED)
-{
-  FT_Face ft_face = (FT_Face) font_data;
-  int load_flags = FT_LOAD_DEFAULT;
-
-  if (unlikely (FT_Load_Glyph (ft_face, glyph, load_flags)))
-    return false;
-
-  /* Note: FreeType's vertical metrics grows downward while other FreeType coordinates
-   * have a Y growing upward.  Hence the extra negation. */
-  *x = ft_face->glyph->metrics.horiBearingX -   ft_face->glyph->metrics.vertBearingX;
-  *y = ft_face->glyph->metrics.horiBearingY - (-ft_face->glyph->metrics.vertBearingY);
-
-  return true;
-}
-
-static hb_position_t
-hb_ft_get_glyph_h_kerning (hb_font_t *font HB_UNUSED,
-                          void *font_data,
-                          hb_codepoint_t left_glyph,
-                          hb_codepoint_t right_glyph,
-                          void *user_data HB_UNUSED)
-{
-  FT_Face ft_face = (FT_Face) font_data;
-  FT_Vector kerningv;
-
-  if (FT_Get_Kerning (ft_face, left_glyph, right_glyph, FT_KERNING_DEFAULT, &kerningv))
-    return 0;
-
-  return kerningv.x;
-}
-
-static hb_position_t
-hb_ft_get_glyph_v_kerning (hb_font_t *font HB_UNUSED,
-                          void *font_data HB_UNUSED,
-                          hb_codepoint_t top_glyph HB_UNUSED,
-                          hb_codepoint_t bottom_glyph HB_UNUSED,
-                          void *user_data HB_UNUSED)
-{
-  /* FreeType API doesn't support vertical kerning */
-  return 0;
-}
-
-static hb_bool_t
-hb_ft_get_glyph_extents (hb_font_t *font HB_UNUSED,
-                        void *font_data,
-                        hb_codepoint_t glyph,
-                        hb_glyph_extents_t *extents,
-                        void *user_data HB_UNUSED)
-{
-  FT_Face ft_face = (FT_Face) font_data;
-  int load_flags = FT_LOAD_DEFAULT;
-
-  if (unlikely (FT_Load_Glyph (ft_face, glyph, load_flags)))
-    return false;
-
-  extents->x_bearing = ft_face->glyph->metrics.horiBearingX;
-  extents->y_bearing = ft_face->glyph->metrics.horiBearingY;
-  extents->width = ft_face->glyph->metrics.width;
-  extents->height = ft_face->glyph->metrics.height;
-  return true;
-}
-
-static hb_bool_t
-hb_ft_get_glyph_contour_point (hb_font_t *font HB_UNUSED,
-                              void *font_data,
-                              hb_codepoint_t glyph,
-                              unsigned int point_index,
-                              hb_position_t *x,
-                              hb_position_t *y,
-                              void *user_data HB_UNUSED)
-{
-  FT_Face ft_face = (FT_Face) font_data;
-  int load_flags = FT_LOAD_DEFAULT;
-
-  if (unlikely (FT_Load_Glyph (ft_face, glyph, load_flags)))
-      return false;
-
-  if (unlikely (ft_face->glyph->format != FT_GLYPH_FORMAT_OUTLINE))
-      return false;
-
-  if (unlikely (point_index >= (unsigned int) ft_face->glyph->outline.n_points))
-      return false;
-
-  *x = ft_face->glyph->outline.points[point_index].x;
-  *y = ft_face->glyph->outline.points[point_index].y;
-
-  return true;
-}
-
-static hb_bool_t
-hb_ft_get_glyph_name (hb_font_t *font,
-                     void *font_data,
-                     hb_codepoint_t glyph,
-                     char *name, unsigned int size,
-                     void *user_data HB_UNUSED)
-{
-  FT_Face ft_face = (FT_Face) font_data;
-
-  hb_bool_t ret = !FT_Get_Glyph_Name (ft_face, glyph, name, size);
-  if (!ret)
-    snprintf (name, size, "gid%u", glyph);
-
-  return ret;
-}
-
-static hb_bool_t
-hb_ft_get_glyph_from_name (hb_font_t *font,
-                          void *font_data,
-                          const char *name, int len, /* -1 means nul-terminated */
-                          hb_codepoint_t *glyph,
-                          void *user_data HB_UNUSED)
-{
-  FT_Face ft_face = (FT_Face) font_data;
-
-  if (len < 0)
-    *glyph = FT_Get_Name_Index (ft_face, (FT_String *) name);
-  else {
-    /* Make a nul-terminated version. */
-    char buf[128];
-    len = MIN (len, (int) sizeof (buf) - 1);
-    strncpy (buf, name, len);
-    buf[len] = '\0';
-    *glyph = FT_Get_Name_Index (ft_face, buf);
-  }
-
-  return *glyph != 0;
-}
-
-
-static hb_font_funcs_t *
-_hb_ft_get_font_funcs (void)
-{
-  static const hb_font_funcs_t ft_ffuncs = {
-    HB_OBJECT_HEADER_STATIC,
-
-    true, /* immutable */
-
-    {
-#define HB_FONT_FUNC_IMPLEMENT(name) hb_ft_get_##name,
-      HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
-#undef HB_FONT_FUNC_IMPLEMENT
-    }
-  };
-
-  return const_cast<hb_font_funcs_t *> (&ft_ffuncs);
-}
-
-
-static hb_blob_t *
-reference_table  (hb_face_t *face HB_UNUSED, hb_tag_t tag, void *user_data)
-{
-  FT_Face ft_face = (FT_Face) user_data;
-  FT_Byte *buffer;
-  FT_ULong  length = 0;
-  FT_Error error;
-
-  /* Note: FreeType like HarfBuzz uses the NONE tag for fetching the entire blob */
-
-  error = FT_Load_Sfnt_Table (ft_face, tag, 0, NULL, &length);
-  if (error)
-    return NULL;
-
-  buffer = (FT_Byte *) malloc (length);
-  if (buffer == NULL)
-    return NULL;
-
-  error = FT_Load_Sfnt_Table (ft_face, tag, 0, buffer, &length);
-  if (error)
-    return NULL;
-
-  return hb_blob_create ((const char *) buffer, length,
-                        HB_MEMORY_MODE_WRITABLE,
-                        buffer, free);
-}
-
-
-hb_face_t *
-hb_ft_face_create (FT_Face           ft_face,
-                  hb_destroy_func_t destroy)
-{
-  hb_face_t *face;
-
-  if (ft_face->stream->read == NULL) {
-    hb_blob_t *blob;
-
-    blob = hb_blob_create ((const char *) ft_face->stream->base,
-                          (unsigned int) ft_face->stream->size,
-                          /* TODO: We assume that it's mmap()'ed, but FreeType code
-                           * suggests that there are cases we reach here but font is
-                           * not mmapped.  For example, when mmap() fails.  No idea
-                           * how to deal with it better here. */
-                          HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE,
-                          ft_face, destroy);
-    face = hb_face_create (blob, ft_face->face_index);
-    hb_blob_destroy (blob);
-  } else {
-    face = hb_face_create_for_tables (reference_table, ft_face, destroy);
-  }
-
-  hb_face_set_index (face, ft_face->face_index);
-  hb_face_set_upem (face, ft_face->units_per_EM);
-
-  return face;
-}
-
-static void
-hb_ft_face_finalize (FT_Face ft_face)
-{
-  hb_face_destroy ((hb_face_t *) ft_face->generic.data);
-}
-
-hb_face_t *
-hb_ft_face_create_cached (FT_Face ft_face)
-{
-  if (unlikely (!ft_face->generic.data || ft_face->generic.finalizer != (FT_Generic_Finalizer) hb_ft_face_finalize))
-  {
-    if (ft_face->generic.finalizer)
-      ft_face->generic.finalizer (ft_face);
-
-    ft_face->generic.data = hb_ft_face_create (ft_face, NULL);
-    ft_face->generic.finalizer = (FT_Generic_Finalizer) hb_ft_face_finalize;
-  }
-
-  return hb_face_reference ((hb_face_t *) ft_face->generic.data);
-}
-
-static void
-_do_nothing (void)
-{
-}
-
-
-hb_font_t *
-hb_ft_font_create (FT_Face           ft_face,
-                  hb_destroy_func_t destroy)
-{
-  hb_font_t *font;
-  hb_face_t *face;
-
-  face = hb_ft_face_create (ft_face, destroy);
-  font = hb_font_create (face);
-  hb_face_destroy (face);
-  hb_font_set_funcs (font,
-                    _hb_ft_get_font_funcs (),
-                    ft_face, (hb_destroy_func_t) _do_nothing);
-  hb_font_set_scale (font,
-                    ((uint64_t) ft_face->size->metrics.x_scale * (uint64_t) ft_face->units_per_EM) >> 16,
-                    ((uint64_t) ft_face->size->metrics.y_scale * (uint64_t) ft_face->units_per_EM) >> 16);
-  hb_font_set_ppem (font,
-                   ft_face->size->metrics.x_ppem,
-                   ft_face->size->metrics.y_ppem);
-
-  return font;
-}
-
-
-/* Thread-safe, lock-free, FT_Library */
-
-static FT_Library ft_library;
-
-static
-void free_ft_library (void)
-{
-  FT_Done_FreeType (ft_library);
-}
-
-static FT_Library
-get_ft_library (void)
-{
-retry:
-  FT_Library library = (FT_Library) hb_atomic_ptr_get (&ft_library);
-
-  if (unlikely (!library))
-  {
-    /* Not found; allocate one. */
-    if (FT_Init_FreeType (&library))
-      return NULL;
-
-    if (!hb_atomic_ptr_cmpexch (&ft_library, NULL, library)) {
-      FT_Done_FreeType (library);
-      goto retry;
-    }
-
-#ifdef HAVE_ATEXIT
-    atexit (free_ft_library); /* First person registers atexit() callback. */
-#endif
-  }
-
-  return library;
-}
-
-static void
-_release_blob (FT_Face ft_face)
-{
-  hb_blob_destroy ((hb_blob_t *) ft_face->generic.data);
-}
-
-void
-hb_ft_font_set_funcs (hb_font_t *font)
-{
-  hb_blob_t *blob = hb_face_reference_blob (font->face);
-  unsigned int blob_length;
-  const char *blob_data = hb_blob_get_data (blob, &blob_length);
-  if (unlikely (!blob_length))
-    DEBUG_MSG (FT, font, "Font face has empty blob");
-
-  FT_Face ft_face = NULL;
-  FT_Error err = FT_New_Memory_Face (get_ft_library (),
-                                    (const FT_Byte *) blob_data,
-                                    blob_length,
-                                    hb_face_get_index (font->face),
-                                    &ft_face);
-
-  if (unlikely (err)) {
-    hb_blob_destroy (blob);
-    DEBUG_MSG (FT, font, "Font face FT_New_Memory_Face() failed");
-    return;
-  }
-
-  FT_Select_Charmap (ft_face, FT_ENCODING_UNICODE);
-
-  FT_Set_Char_Size (ft_face,
-                   font->x_scale, font->y_scale,
-                   font->x_ppem * 72 * 64 / font->x_scale,
-                   font->y_ppem * 72 * 64 / font->y_scale);
-
-  ft_face->generic.data = blob;
-  ft_face->generic.finalizer = (FT_Generic_Finalizer) _release_blob;
-
-  hb_font_set_funcs (font,
-                    _hb_ft_get_font_funcs (),
-                    ft_face,
-                    (hb_destroy_func_t) FT_Done_Face);
-}
-
-FT_Face
-hb_ft_font_get_face (hb_font_t *font)
-{
-  if (font->destroy == (hb_destroy_func_t) FT_Done_Face ||
-      font->destroy == (hb_destroy_func_t) _do_nothing)
-    return (FT_Face) font->user_data;
-
-  return NULL;
-}
diff --git a/src/hb-ft.h b/src/hb-ft.h
deleted file mode 100644 (file)
index 696251e..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright © 2009  Red Hat, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_FT_H
-#define HB_FT_H
-
-#include "hb.h"
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-HB_BEGIN_DECLS
-
-/* Note: FreeType is not thread-safe.  Hence, these functions are not either. */
-
-hb_face_t *
-hb_ft_face_create (FT_Face           ft_face,
-                  hb_destroy_func_t destroy);
-
-hb_face_t *
-hb_ft_face_create_cached (FT_Face ft_face);
-
-hb_font_t *
-hb_ft_font_create (FT_Face           ft_face,
-                  hb_destroy_func_t destroy);
-
-
-
-/* Makes an hb_font_t use FreeType internally to implement font functions. */
-void
-hb_ft_font_set_funcs (hb_font_t *font);
-
-FT_Face
-hb_ft_font_get_face (hb_font_t *font);
-
-
-HB_END_DECLS
-
-#endif /* HB_FT_H */
diff --git a/src/hb-glib.cc b/src/hb-glib.cc
deleted file mode 100644 (file)
index 6b655dd..0000000
+++ /dev/null
@@ -1,358 +0,0 @@
-/*
- * Copyright © 2009  Red Hat, Inc.
- * Copyright © 2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Behdad Esfahbod
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "hb-private.hh"
-
-#include "hb-glib.h"
-
-#include "hb-unicode-private.hh"
-
-
-#if !GLIB_CHECK_VERSION(2,29,14)
-static const hb_script_t
-glib_script_to_script[] =
-{
-  HB_SCRIPT_COMMON,
-  HB_SCRIPT_INHERITED,
-  HB_SCRIPT_ARABIC,
-  HB_SCRIPT_ARMENIAN,
-  HB_SCRIPT_BENGALI,
-  HB_SCRIPT_BOPOMOFO,
-  HB_SCRIPT_CHEROKEE,
-  HB_SCRIPT_COPTIC,
-  HB_SCRIPT_CYRILLIC,
-  HB_SCRIPT_DESERET,
-  HB_SCRIPT_DEVANAGARI,
-  HB_SCRIPT_ETHIOPIC,
-  HB_SCRIPT_GEORGIAN,
-  HB_SCRIPT_GOTHIC,
-  HB_SCRIPT_GREEK,
-  HB_SCRIPT_GUJARATI,
-  HB_SCRIPT_GURMUKHI,
-  HB_SCRIPT_HAN,
-  HB_SCRIPT_HANGUL,
-  HB_SCRIPT_HEBREW,
-  HB_SCRIPT_HIRAGANA,
-  HB_SCRIPT_KANNADA,
-  HB_SCRIPT_KATAKANA,
-  HB_SCRIPT_KHMER,
-  HB_SCRIPT_LAO,
-  HB_SCRIPT_LATIN,
-  HB_SCRIPT_MALAYALAM,
-  HB_SCRIPT_MONGOLIAN,
-  HB_SCRIPT_MYANMAR,
-  HB_SCRIPT_OGHAM,
-  HB_SCRIPT_OLD_ITALIC,
-  HB_SCRIPT_ORIYA,
-  HB_SCRIPT_RUNIC,
-  HB_SCRIPT_SINHALA,
-  HB_SCRIPT_SYRIAC,
-  HB_SCRIPT_TAMIL,
-  HB_SCRIPT_TELUGU,
-  HB_SCRIPT_THAANA,
-  HB_SCRIPT_THAI,
-  HB_SCRIPT_TIBETAN,
-  HB_SCRIPT_CANADIAN_ABORIGINAL,
-  HB_SCRIPT_YI,
-  HB_SCRIPT_TAGALOG,
-  HB_SCRIPT_HANUNOO,
-  HB_SCRIPT_BUHID,
-  HB_SCRIPT_TAGBANWA,
-
-  /* Unicode-4.0 additions */
-  HB_SCRIPT_BRAILLE,
-  HB_SCRIPT_CYPRIOT,
-  HB_SCRIPT_LIMBU,
-  HB_SCRIPT_OSMANYA,
-  HB_SCRIPT_SHAVIAN,
-  HB_SCRIPT_LINEAR_B,
-  HB_SCRIPT_TAI_LE,
-  HB_SCRIPT_UGARITIC,
-
-  /* Unicode-4.1 additions */
-  HB_SCRIPT_NEW_TAI_LUE,
-  HB_SCRIPT_BUGINESE,
-  HB_SCRIPT_GLAGOLITIC,
-  HB_SCRIPT_TIFINAGH,
-  HB_SCRIPT_SYLOTI_NAGRI,
-  HB_SCRIPT_OLD_PERSIAN,
-  HB_SCRIPT_KHAROSHTHI,
-
-  /* Unicode-5.0 additions */
-  HB_SCRIPT_UNKNOWN,
-  HB_SCRIPT_BALINESE,
-  HB_SCRIPT_CUNEIFORM,
-  HB_SCRIPT_PHOENICIAN,
-  HB_SCRIPT_PHAGS_PA,
-  HB_SCRIPT_NKO,
-
-  /* Unicode-5.1 additions */
-  HB_SCRIPT_KAYAH_LI,
-  HB_SCRIPT_LEPCHA,
-  HB_SCRIPT_REJANG,
-  HB_SCRIPT_SUNDANESE,
-  HB_SCRIPT_SAURASHTRA,
-  HB_SCRIPT_CHAM,
-  HB_SCRIPT_OL_CHIKI,
-  HB_SCRIPT_VAI,
-  HB_SCRIPT_CARIAN,
-  HB_SCRIPT_LYCIAN,
-  HB_SCRIPT_LYDIAN,
-
-  /* Unicode-5.2 additions */
-  HB_SCRIPT_AVESTAN,
-  HB_SCRIPT_BAMUM,
-  HB_SCRIPT_EGYPTIAN_HIEROGLYPHS,
-  HB_SCRIPT_IMPERIAL_ARAMAIC,
-  HB_SCRIPT_INSCRIPTIONAL_PAHLAVI,
-  HB_SCRIPT_INSCRIPTIONAL_PARTHIAN,
-  HB_SCRIPT_JAVANESE,
-  HB_SCRIPT_KAITHI,
-  HB_SCRIPT_TAI_THAM,
-  HB_SCRIPT_LISU,
-  HB_SCRIPT_MEETEI_MAYEK,
-  HB_SCRIPT_OLD_SOUTH_ARABIAN,
-  HB_SCRIPT_OLD_TURKIC,
-  HB_SCRIPT_SAMARITAN,
-  HB_SCRIPT_TAI_VIET,
-
-  /* Unicode-6.0 additions */
-  HB_SCRIPT_BATAK,
-  HB_SCRIPT_BRAHMI,
-  HB_SCRIPT_MANDAIC,
-
-  /* Unicode-6.1 additions */
-  HB_SCRIPT_CHAKMA,
-  HB_SCRIPT_MEROITIC_CURSIVE,
-  HB_SCRIPT_MEROITIC_HIEROGLYPHS,
-  HB_SCRIPT_MIAO,
-  HB_SCRIPT_SHARADA,
-  HB_SCRIPT_SORA_SOMPENG,
-  HB_SCRIPT_TAKRI
-};
-#endif
-
-hb_script_t
-hb_glib_script_to_script (GUnicodeScript script)
-{
-#if GLIB_CHECK_VERSION(2,29,14)
-  return (hb_script_t) g_unicode_script_to_iso15924 (script);
-#else
-  if (likely ((unsigned int) script < ARRAY_LENGTH (glib_script_to_script)))
-    return glib_script_to_script[script];
-
-  if (unlikely (script == G_UNICODE_SCRIPT_INVALID_CODE))
-    return HB_SCRIPT_INVALID;
-
-  return HB_SCRIPT_UNKNOWN;
-#endif
-}
-
-GUnicodeScript
-hb_glib_script_from_script (hb_script_t script)
-{
-#if GLIB_CHECK_VERSION(2,29,14)
-  return g_unicode_script_from_iso15924 (script);
-#else
-  unsigned int count = ARRAY_LENGTH (glib_script_to_script);
-  for (unsigned int i = 0; i < count; i++)
-    if (glib_script_to_script[i] == script)
-      return (GUnicodeScript) i;
-
-  if (unlikely (script == HB_SCRIPT_INVALID))
-    return G_UNICODE_SCRIPT_INVALID_CODE;
-
-  return G_UNICODE_SCRIPT_UNKNOWN;
-#endif
-}
-
-
-static unsigned int
-hb_glib_unicode_combining_class (hb_unicode_funcs_t *ufuncs HB_UNUSED,
-                                hb_codepoint_t      unicode,
-                                void               *user_data HB_UNUSED)
-
-{
-  return g_unichar_combining_class (unicode);
-}
-
-static unsigned int
-hb_glib_unicode_eastasian_width (hb_unicode_funcs_t *ufuncs HB_UNUSED,
-                                hb_codepoint_t      unicode,
-                                void               *user_data HB_UNUSED)
-{
-  return g_unichar_iswide (unicode) ? 2 : 1;
-}
-
-static hb_unicode_general_category_t
-hb_glib_unicode_general_category (hb_unicode_funcs_t *ufuncs HB_UNUSED,
-                                 hb_codepoint_t      unicode,
-                                 void               *user_data HB_UNUSED)
-
-{
-  /* hb_unicode_general_category_t and GUnicodeType are identical */
-  return (hb_unicode_general_category_t) g_unichar_type (unicode);
-}
-
-static hb_codepoint_t
-hb_glib_unicode_mirroring (hb_unicode_funcs_t *ufuncs HB_UNUSED,
-                          hb_codepoint_t      unicode,
-                          void               *user_data HB_UNUSED)
-{
-  g_unichar_get_mirror_char (unicode, &unicode);
-  return unicode;
-}
-
-static hb_script_t
-hb_glib_unicode_script (hb_unicode_funcs_t *ufuncs HB_UNUSED,
-                       hb_codepoint_t      unicode,
-                       void               *user_data HB_UNUSED)
-{
-  return hb_glib_script_to_script (g_unichar_get_script (unicode));
-}
-
-static hb_bool_t
-hb_glib_unicode_compose (hb_unicode_funcs_t *ufuncs HB_UNUSED,
-                        hb_codepoint_t      a,
-                        hb_codepoint_t      b,
-                        hb_codepoint_t     *ab,
-                        void               *user_data HB_UNUSED)
-{
-#if GLIB_CHECK_VERSION(2,29,12)
-  return g_unichar_compose (a, b, ab);
-#endif
-
-  /* We don't ifdef-out the fallback code such that compiler always
-   * sees it and makes sure it's compilable. */
-
-  if (!a || !b)
-    return false;
-
-  gchar utf8[12];
-  gchar *normalized;
-  gint len;
-  hb_bool_t ret;
-
-  len = g_unichar_to_utf8 (a, utf8);
-  len += g_unichar_to_utf8 (b, utf8 + len);
-  normalized = g_utf8_normalize (utf8, len, G_NORMALIZE_NFC);
-  len = g_utf8_strlen (normalized, -1);
-  if (unlikely (!len))
-    return false;
-
-  if (len == 1) {
-    *ab = g_utf8_get_char (normalized);
-    ret = true;
-  } else {
-    ret = false;
-  }
-
-  g_free (normalized);
-  return ret;
-}
-
-static hb_bool_t
-hb_glib_unicode_decompose (hb_unicode_funcs_t *ufuncs HB_UNUSED,
-                          hb_codepoint_t      ab,
-                          hb_codepoint_t     *a,
-                          hb_codepoint_t     *b,
-                          void               *user_data HB_UNUSED)
-{
-#if GLIB_CHECK_VERSION(2,29,12)
-  return g_unichar_decompose (ab, a, b);
-#endif
-
-  /* We don't ifdef-out the fallback code such that compiler always
-   * sees it and makes sure it's compilable. */
-
-  gchar utf8[6];
-  gchar *normalized;
-  gint len;
-  hb_bool_t ret;
-
-  len = g_unichar_to_utf8 (ab, utf8);
-  normalized = g_utf8_normalize (utf8, len, G_NORMALIZE_NFD);
-  len = g_utf8_strlen (normalized, -1);
-  if (unlikely (!len))
-    return false;
-
-  if (len == 1) {
-    *a = g_utf8_get_char (normalized);
-    *b = 0;
-    ret = *a != ab;
-  } else if (len == 2) {
-    *a = g_utf8_get_char (normalized);
-    *b = g_utf8_get_char (g_utf8_next_char (normalized));
-    /* Here's the ugly part: if ab decomposes to a single character and
-     * that character decomposes again, we have to detect that and undo
-     * the second part :-(. */
-    gchar *recomposed = g_utf8_normalize (normalized, -1, G_NORMALIZE_NFC);
-    hb_codepoint_t c = g_utf8_get_char (recomposed);
-    if (c != ab && c != *a) {
-      *a = c;
-      *b = 0;
-    }
-    g_free (recomposed);
-    ret = true;
-  } else {
-    /* If decomposed to more than two characters, take the last one,
-     * and recompose the rest to get the first component. */
-    gchar *end = g_utf8_offset_to_pointer (normalized, len - 1);
-    gchar *recomposed;
-    *b = g_utf8_get_char (end);
-    recomposed = g_utf8_normalize (normalized, end - normalized, G_NORMALIZE_NFC);
-    /* We expect that recomposed has exactly one character now. */
-    *a = g_utf8_get_char (recomposed);
-    g_free (recomposed);
-    ret = true;
-  }
-
-  g_free (normalized);
-  return ret;
-}
-
-
-extern HB_INTERNAL const hb_unicode_funcs_t _hb_glib_unicode_funcs;
-const hb_unicode_funcs_t _hb_glib_unicode_funcs = {
-  HB_OBJECT_HEADER_STATIC,
-
-  NULL, /* parent */
-  true, /* immutable */
-  {
-#define HB_UNICODE_FUNC_IMPLEMENT(name) hb_glib_unicode_##name,
-    HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS
-#undef HB_UNICODE_FUNC_IMPLEMENT
-  }
-};
-
-hb_unicode_funcs_t *
-hb_glib_get_unicode_funcs (void)
-{
-  return const_cast<hb_unicode_funcs_t *> (&_hb_glib_unicode_funcs);
-}
-
diff --git a/src/hb-glib.h b/src/hb-glib.h
deleted file mode 100644 (file)
index 63a9d33..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright © 2009  Red Hat, Inc.
- * Copyright © 2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Behdad Esfahbod
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_GLIB_H
-#define HB_GLIB_H
-
-#include "hb.h"
-
-#include <glib.h>
-
-HB_BEGIN_DECLS
-
-
-hb_script_t
-hb_glib_script_to_script (GUnicodeScript script);
-
-GUnicodeScript
-hb_glib_script_from_script (hb_script_t script);
-
-
-hb_unicode_funcs_t *
-hb_glib_get_unicode_funcs (void);
-
-
-HB_END_DECLS
-
-#endif /* HB_GLIB_H */
diff --git a/src/hb-gobject-enums.cc.tmpl b/src/hb-gobject-enums.cc.tmpl
deleted file mode 100644 (file)
index 05abd89..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/*** BEGIN file-header ***/
-/*
- * Copyright © 2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "hb-private.hh"
-
-/* g++ didn't like older gtype.h gcc-only code path. */
-#include <glib.h>
-#if !GLIB_CHECK_VERSION(2,29,16)
-#undef __GNUC__
-#undef __GNUC_MINOR__
-#define __GNUC__ 2
-#define __GNUC_MINOR__ 6
-#endif
-
-#include "hb-gobject.h"
-
-/*** END file-header ***/
-
-/*** BEGIN file-production ***/
-/* enumerations from "@filename@" */
-/*** END file-production ***/
-
-/*** BEGIN value-header ***/
-inline static /* TODO(behdad) disable these for now until we fix them... */
-GType
-@enum_name@_get_type (void)
-{
-  static volatile gsize g_define_type_id__volatile = 0;
-
-  if (g_once_init_enter (&g_define_type_id__volatile))
-    {
-      static const G@Type@Value values[] = {
-/*** END value-header ***/
-
-/*** BEGIN value-production ***/
-        { @VALUENAME@, "@VALUENAME@", "@valuenick@" },
-/*** END value-production ***/
-
-/*** BEGIN value-tail ***/
-        { 0, NULL, NULL }
-      };
-      GType g_define_type_id =
-        g_@type@_register_static (g_intern_static_string ("@EnumName@"), values);
-      g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
-    }
-
-  return g_define_type_id__volatile;
-}
-
-/*** END value-tail ***/
diff --git a/src/hb-gobject-structs.cc b/src/hb-gobject-structs.cc
deleted file mode 100644 (file)
index cec4854..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright © 2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "hb-private.hh"
-
-/* g++ didn't like older gtype.h gcc-only code path. */
-#include <glib.h>
-#if !GLIB_CHECK_VERSION(2,29,16)
-#undef __GNUC__
-#undef __GNUC_MINOR__
-#define __GNUC__ 2
-#define __GNUC_MINOR__ 6
-#endif
-
-#include "hb-gobject.h"
-
-#define _HB_DEFINE_BOXED_TYPE(Name,underscore_name,copy_func,free_func) \
-GType \
-underscore_name##_get_type (void) \
-{ \
-   static volatile gsize type = 0; \
-   if (g_once_init_enter (&type)) { \
-      GType t = g_boxed_type_register_static (g_intern_static_string (#Name), \
-                                             (GBoxedCopyFunc) copy_func, \
-                                             (GBoxedFreeFunc) free_func); \
-      g_once_init_leave (&type, t); \
-   } \
-   return type; \
-}
-
-#define HB_DEFINE_BOXED_TYPE(name) \
-       _HB_DEFINE_BOXED_TYPE (hb_##name, hb_gobject_##name, hb_##name##_reference, hb_##name##_destroy);
-
-HB_DEFINE_BOXED_TYPE (buffer)
-HB_DEFINE_BOXED_TYPE (blob)
-HB_DEFINE_BOXED_TYPE (face)
-HB_DEFINE_BOXED_TYPE (font)
-HB_DEFINE_BOXED_TYPE (font_funcs)
-HB_DEFINE_BOXED_TYPE (unicode_funcs)
-
diff --git a/src/hb-gobject.h b/src/hb-gobject.h
deleted file mode 100644 (file)
index 4f23fdd..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright © 2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_GOBJECT_H
-#define HB_GOBJECT_H
-
-#include "hb.h"
-
-#include <glib-object.h>
-
-HB_BEGIN_DECLS
-
-
-/* Objects */
-
-#define HB_GOBJECT_TYPE_BLOB hb_gobject_blob_get_type ()
-GType
-hb_gobject_blob_get_type (void);
-
-#define HB_GOBJECT_TYPE_BUFFER hb_gobject_buffer_get_type ()
-GType
-hb_gobject_buffer_get_type (void);
-
-#define HB_GOBJECT_TYPE_FACE hb_gobject_face_get_type ()
-GType
-hb_gobject_face_get_type (void);
-
-#define HB_GOBJECT_TYPE_FONT hb_gobject_font_get_type ()
-GType
-hb_gobject_font_get_type (void);
-
-#define HB_GOBJECT_TYPE_FONT_FUNCS hb_gobject_font_funcs_get_type ()
-GType
-hb_gobject_font_funcs_get_type (void);
-
-#define HB_GOBJECT_TYPE_UNICODE_FUNCS hb_gobject_unicode_funcs_get_type ()
-GType
-hb_gobject_unicode_funcs_get_type (void);
-
-
-/* Enums */
-
-
-HB_END_DECLS
-
-#endif /* HB_GOBJECT_H */
diff --git a/src/hb-graphite2-private.hh b/src/hb-graphite2-private.hh
deleted file mode 100644 (file)
index 644ea75..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright © 2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_GRAPHITE2_PRIVATE_HH
-#define HB_GRAPHITE2_PRIVATE_HH
-
-#include "hb-private.hh"
-
-#include "hb-graphite2.h"
-
-
-HB_INTERNAL hb_bool_t
-_hb_graphite2_shape (hb_font_t          *font,
-                    hb_buffer_t        *buffer,
-                    const hb_feature_t *features,
-                    unsigned int        num_features);
-
-
-#endif /* HB_GRAPHITE2_PRIVATE_HH */
diff --git a/src/hb-graphite2.cc b/src/hb-graphite2.cc
deleted file mode 100644 (file)
index 3fa9f79..0000000
+++ /dev/null
@@ -1,350 +0,0 @@
-/*
- * Copyright © 2011  Martin Hosken
- * Copyright © 2011  SIL International
- * Copyright © 2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "hb-private.hh"
-
-#include "hb-graphite2.h"
-
-#include "hb-buffer-private.hh"
-#include "hb-font-private.hh"
-#include "hb-ot-tag.h"
-
-#include <graphite2/Font.h>
-#include <graphite2/Segment.h>
-
-
-struct hb_gr_cluster_t {
-  unsigned int base_char;
-  unsigned int num_chars;
-  unsigned int base_glyph;
-  unsigned int num_glyphs;
-};
-
-
-typedef struct hb_gr_tablelist_t {
-  hb_blob_t   *blob;
-  struct hb_gr_tablelist_t *next;
-  unsigned int tag;
-} hb_gr_tablelist_t;
-
-static struct hb_gr_face_data_t {
-  hb_face_t         *face;
-  gr_face           *grface;
-  hb_gr_tablelist_t *tlist;
-} _hb_gr_face_data_nil = {NULL, NULL};
-
-static struct hb_gr_font_data_t {
-  gr_font   *grfont;
-  gr_face   *grface;
-} _hb_gr_font_data_nil = {NULL, NULL};
-
-
-static const void *hb_gr_get_table (const void *data, unsigned int tag, size_t *len)
-{
-  hb_gr_tablelist_t *pl = NULL, *p;
-  hb_gr_face_data_t *face = (hb_gr_face_data_t *) data;
-  hb_gr_tablelist_t *tlist = face->tlist;
-
-  for (p = tlist; p; p = p->next)
-    if (p->tag == tag ) {
-      unsigned int tlen;
-      const char *d = hb_blob_get_data (p->blob, &tlen);
-      *len = tlen;
-      return d;
-    } else
-      pl = p;
-
-  if (!face->face)
-    return NULL;
-  hb_blob_t *blob = hb_face_reference_table (face->face, tag);
-
-  if (!pl || pl->blob)
-  {
-    p = (hb_gr_tablelist_t *) malloc (sizeof (hb_gr_tablelist_t));
-    if (!p) {
-      hb_blob_destroy (blob);
-      return NULL;
-    }
-    p->next = NULL;
-    if (pl)
-      pl->next = p;
-    else
-      face->tlist = p;
-    pl = p;
-  }
-  pl->blob = blob;
-  pl->tag = tag;
-
-  unsigned int tlen;
-  const char *d = hb_blob_get_data (blob, &tlen);
-  *len = tlen;
-  return d;
-}
-
-static float hb_gr_get_advance (const void *hb_font, unsigned short gid)
-{
-  return hb_font_get_glyph_h_advance ((hb_font_t *) hb_font, gid);
-}
-
-static void _hb_gr_face_data_destroy (void *data)
-{
-  hb_gr_face_data_t *f = (hb_gr_face_data_t *) data;
-  hb_gr_tablelist_t *tlist = f->tlist;
-  while (tlist)
-  {
-    hb_gr_tablelist_t *old = tlist;
-    hb_blob_destroy (tlist->blob);
-    tlist = tlist->next;
-    free (old);
-  }
-  gr_face_destroy (f->grface);
-}
-
-static void _hb_gr_font_data_destroy (void *data)
-{
-  hb_gr_font_data_t *f = (hb_gr_font_data_t *) data;
-
-  gr_font_destroy (f->grfont);
-  free (f);
-}
-
-static hb_user_data_key_t hb_gr_data_key;
-
-static hb_gr_face_data_t *
-_hb_gr_face_get_data (hb_face_t *face)
-{
-  hb_gr_face_data_t *data = (hb_gr_face_data_t *) hb_face_get_user_data (face, &hb_gr_data_key);
-  if (likely (data)) return data;
-
-  data = (hb_gr_face_data_t *) calloc (1, sizeof (hb_gr_face_data_t));
-  if (unlikely (!data))
-    return &_hb_gr_face_data_nil;
-
-
-  hb_blob_t *silf_blob = hb_face_reference_table (face, HB_GRAPHITE_TAG_Silf);
-  if (!hb_blob_get_length (silf_blob))
-  {
-    hb_blob_destroy (silf_blob);
-    return &_hb_gr_face_data_nil;
-  }
-
-  data->face = face;
-  data->grface = gr_make_face (data, &hb_gr_get_table, gr_face_default);
-
-
-  if (unlikely (!hb_face_set_user_data (face, &hb_gr_data_key, data,
-                                       (hb_destroy_func_t) _hb_gr_face_data_destroy,
-                                       false)))
-  {
-    _hb_gr_face_data_destroy (data);
-    data = (hb_gr_face_data_t *) hb_face_get_user_data (face, &hb_gr_data_key);
-    if (data)
-      return data;
-    else
-      return &_hb_gr_face_data_nil;
-  }
-
-  return data;
-}
-
-static hb_gr_font_data_t *
-_hb_gr_font_get_data (hb_font_t *font)
-{
-  hb_gr_font_data_t *data = (hb_gr_font_data_t *) hb_font_get_user_data (font, &hb_gr_data_key);
-  if (likely (data)) return data;
-
-  data = (hb_gr_font_data_t *) calloc (1, sizeof (hb_gr_font_data_t));
-  if (unlikely (!data))
-    return &_hb_gr_font_data_nil;
-
-
-  hb_blob_t *silf_blob = hb_face_reference_table (font->face, HB_GRAPHITE_TAG_Silf);
-  if (!hb_blob_get_length (silf_blob))
-  {
-    hb_blob_destroy (silf_blob);
-    return &_hb_gr_font_data_nil;
-  }
-
-  data->grface = _hb_gr_face_get_data (font->face)->grface;
-  int scale;
-  hb_font_get_scale (font, &scale, NULL);
-  data->grfont = gr_make_font_with_advance_fn (scale, font, &hb_gr_get_advance, data->grface);
-
-
-  if (unlikely (!hb_font_set_user_data (font, &hb_gr_data_key, data,
-                                       (hb_destroy_func_t) _hb_gr_font_data_destroy,
-                                       false)))
-  {
-    _hb_gr_font_data_destroy (data);
-    data = (hb_gr_font_data_t *) hb_font_get_user_data (font, &hb_gr_data_key);
-    if (data)
-      return data;
-    else
-      return &_hb_gr_font_data_nil;
-  }
-
-  return data;
-}
-
-
-hb_bool_t
-_hb_graphite_shape (hb_font_t          *font,
-                  hb_buffer_t        *buffer,
-                  const hb_feature_t *features,
-                  unsigned int        num_features)
-{
-
-  buffer->guess_properties ();
-
-  /* XXX We do a hell of a lot of stuff just to figure out this font
-   * is not graphite!  Shouldn't do. */
-
-  hb_gr_font_data_t *data = _hb_gr_font_get_data (font);
-  if (!data->grface) return false;
-
-  unsigned int charlen;
-  hb_glyph_info_t *bufferi = hb_buffer_get_glyph_infos (buffer, &charlen);
-
-  int success = 0;
-
-  if (!charlen) return true;
-
-  const char *lang = hb_language_to_string (hb_buffer_get_language (buffer));
-  const char *lang_end = strchr (lang, '-');
-  int lang_len = lang_end ? lang_end - lang : -1;
-  gr_feature_val *feats = gr_face_featureval_for_lang (data->grface, lang ? hb_tag_from_string (lang, lang_len) : 0);
-
-  while (num_features--)
-  {
-    const gr_feature_ref *fref = gr_face_find_fref (data->grface, features->tag);
-    if (fref)
-      gr_fref_set_feature_value (fref, features->value, feats);
-    features++;
-  }
-
-  hb_codepoint_t *gids = NULL, *pg;
-  hb_gr_cluster_t *clusters = NULL;
-  gr_segment *seg = NULL;
-  uint32_t *text = NULL;
-  const gr_slot *is;
-  unsigned int ci = 0, ic = 0;
-  float curradvx = 0., curradvy = 0.;
-  unsigned int glyphlen = 0;
-  unsigned int *p;
-
-  text = (uint32_t *) malloc ((charlen + 1) * sizeof (uint32_t));
-  if (!text) goto dieout;
-
-  p = text;
-  for (unsigned int i = 0; i < charlen; ++i)
-    *p++ = bufferi++->codepoint;
-  *p = 0;
-
-  hb_tag_t script_tag[2];
-  hb_ot_tags_from_script (hb_buffer_get_script (buffer), &script_tag[0], &script_tag[1]);
-
-  seg = gr_make_seg (data->grfont, data->grface,
-                    script_tag[1] == HB_TAG_NONE ? script_tag[0] : script_tag[1],
-                    feats,
-                    gr_utf32, text, charlen,
-                    2 | (hb_buffer_get_direction (buffer) == HB_DIRECTION_RTL ? 1 : 0));
-  if (!seg) goto dieout;
-
-  glyphlen = gr_seg_n_slots (seg);
-  clusters = (hb_gr_cluster_t *) calloc (charlen, sizeof (hb_gr_cluster_t));
-  if (!glyphlen || !clusters) goto dieout;
-
-  gids = (hb_codepoint_t *) malloc (glyphlen * sizeof (hb_codepoint_t));
-  if (!gids) goto dieout;
-
-  pg = gids;
-  for (is = gr_seg_first_slot (seg), ic = 0; is; is = gr_slot_next_in_segment (is), ic++)
-  {
-    unsigned int before = gr_slot_before (is);
-    unsigned int after = gr_slot_after (is);
-    *pg = gr_slot_gid (is);
-    pg++;
-    while (clusters[ci].base_char > before && ci)
-    {
-      clusters[ci-1].num_chars += clusters[ci].num_chars;
-      clusters[ci-1].num_glyphs += clusters[ci].num_glyphs;
-      ci--;
-    }
-
-    if (gr_slot_can_insert_before (is) && clusters[ci].num_chars && before >= clusters[ci].base_char + clusters[ci].num_chars)
-    {
-      hb_gr_cluster_t *c = clusters + ci + 1;
-      c->base_char = clusters[ci].base_char + clusters[ci].num_chars;
-      c->num_chars = before - c->base_char;
-      c->base_glyph = ic;
-      c->num_glyphs = 0;
-      ci++;
-    }
-    clusters[ci].num_glyphs++;
-
-    if (clusters[ci].base_char + clusters[ci].num_chars < after + 1)
-       clusters[ci].num_chars = after + 1 - clusters[ci].base_char;
-  }
-  ci++;
-
-  buffer->clear_output ();
-  for (unsigned int i = 0; i < ci; ++i)
-    buffer->replace_glyphs (clusters[i].num_chars, clusters[i].num_glyphs, gids + clusters[i].base_glyph);
-  buffer->swap_buffers ();
-
-  hb_glyph_position_t *pPos;
-  for (pPos = hb_buffer_get_glyph_positions (buffer, NULL), is = gr_seg_first_slot (seg);
-       is; pPos++, is = gr_slot_next_in_segment (is))
-  {
-    pPos->x_offset = gr_slot_origin_X(is) - curradvx;
-    pPos->y_offset = gr_slot_origin_Y(is) - curradvy;
-    pPos->x_advance = gr_slot_advance_X(is, data->grface, data->grfont);
-    pPos->y_advance = gr_slot_advance_Y(is, data->grface, data->grfont);
-//    if (pPos->x_advance < 0 && gr_slot_attached_to(is))
-//      pPos->x_advance = 0;
-    curradvx += pPos->x_advance;
-    curradvy += pPos->y_advance;
-  }
-  pPos[-1].x_advance += gr_seg_advance_X(seg) - curradvx;
-
-  /* TODO(behdad):
-   * This shaper is badly broken with RTL text.  It returns glyphs
-   * in the logical order!
-   */
-//  if (HB_DIRECTION_IS_BACKWARD (buffer->props.direction))
-//    hb_buffer_reverse (buffer);
-
-  success = 1;
-
-dieout:
-  if (gids) free (gids);
-  if (clusters) free (clusters);
-  if (seg) gr_seg_destroy (seg);
-  if (text) free (text);
-  return success;
-}
diff --git a/src/hb-graphite2.h b/src/hb-graphite2.h
deleted file mode 100644 (file)
index 2d16cc8..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2011  Martin Hosken
- * Copyright (C) 2011  SIL International
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- */
-
-#ifndef HB_GRAPHITE2_H
-#define HB_GRAPHITE2_H
-
-#include "hb.h"
-
-HB_BEGIN_DECLS
-
-
-#define HB_GRAPHITE_TAG_Silf HB_TAG('S','i','l','f')
-
-/* TODO add gr_font/face etc getters and other glue API */
-
-HB_END_DECLS
-
-#endif /* HB_GRAPHITE2_H */
diff --git a/src/hb-icu.cc b/src/hb-icu.cc
deleted file mode 100644 (file)
index aead6dd..0000000
+++ /dev/null
@@ -1,292 +0,0 @@
-/*
- * Copyright © 2009  Red Hat, Inc.
- * Copyright © 2009  Keith Stribley
- * Copyright © 2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Behdad Esfahbod
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "hb-private.hh"
-
-#include "hb-icu.h"
-
-#include "hb-unicode-private.hh"
-
-#include <unicode/uversion.h>
-#include <unicode/uchar.h>
-#include <unicode/unorm.h>
-#include <unicode/ustring.h>
-
-
-
-hb_script_t
-hb_icu_script_to_script (UScriptCode script)
-{
-  if (unlikely (script == USCRIPT_INVALID_CODE))
-    return HB_SCRIPT_INVALID;
-
-  return hb_script_from_string (uscript_getShortName (script), -1);
-}
-
-UScriptCode
-hb_icu_script_from_script (hb_script_t script)
-{
-  if (unlikely (script == HB_SCRIPT_INVALID))
-    return USCRIPT_INVALID_CODE;
-
-  for (unsigned int i = 0; i < USCRIPT_CODE_LIMIT; i++)
-    if (unlikely (hb_icu_script_to_script ((UScriptCode) i) == script))
-      return (UScriptCode) i;
-
-  return USCRIPT_UNKNOWN;
-}
-
-
-static unsigned int
-hb_icu_unicode_combining_class (hb_unicode_funcs_t *ufuncs HB_UNUSED,
-                               hb_codepoint_t      unicode,
-                               void               *user_data HB_UNUSED)
-
-{
-  return u_getCombiningClass (unicode);
-}
-
-static unsigned int
-hb_icu_unicode_eastasian_width (hb_unicode_funcs_t *ufuncs HB_UNUSED,
-                               hb_codepoint_t      unicode,
-                               void               *user_data HB_UNUSED)
-{
-  switch (u_getIntPropertyValue(unicode, UCHAR_EAST_ASIAN_WIDTH))
-  {
-  case U_EA_WIDE:
-  case U_EA_FULLWIDTH:
-    return 2;
-  case U_EA_NEUTRAL:
-  case U_EA_AMBIGUOUS:
-  case U_EA_HALFWIDTH:
-  case U_EA_NARROW:
-    return 1;
-  }
-  return 1;
-}
-
-static hb_unicode_general_category_t
-hb_icu_unicode_general_category (hb_unicode_funcs_t *ufuncs HB_UNUSED,
-                                hb_codepoint_t      unicode,
-                                void               *user_data HB_UNUSED)
-{
-  switch (u_getIntPropertyValue(unicode, UCHAR_GENERAL_CATEGORY))
-  {
-  case U_UNASSIGNED:                   return HB_UNICODE_GENERAL_CATEGORY_UNASSIGNED;
-
-  case U_UPPERCASE_LETTER:             return HB_UNICODE_GENERAL_CATEGORY_UPPERCASE_LETTER;
-  case U_LOWERCASE_LETTER:             return HB_UNICODE_GENERAL_CATEGORY_LOWERCASE_LETTER;
-  case U_TITLECASE_LETTER:             return HB_UNICODE_GENERAL_CATEGORY_TITLECASE_LETTER;
-  case U_MODIFIER_LETTER:              return HB_UNICODE_GENERAL_CATEGORY_MODIFIER_LETTER;
-  case U_OTHER_LETTER:                 return HB_UNICODE_GENERAL_CATEGORY_OTHER_LETTER;
-
-  case U_NON_SPACING_MARK:             return HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK;
-  case U_ENCLOSING_MARK:               return HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK;
-  case U_COMBINING_SPACING_MARK:       return HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK;
-
-  case U_DECIMAL_DIGIT_NUMBER:         return HB_UNICODE_GENERAL_CATEGORY_DECIMAL_NUMBER;
-  case U_LETTER_NUMBER:                        return HB_UNICODE_GENERAL_CATEGORY_LETTER_NUMBER;
-  case U_OTHER_NUMBER:                 return HB_UNICODE_GENERAL_CATEGORY_OTHER_NUMBER;
-
-  case U_SPACE_SEPARATOR:              return HB_UNICODE_GENERAL_CATEGORY_SPACE_SEPARATOR;
-  case U_LINE_SEPARATOR:               return HB_UNICODE_GENERAL_CATEGORY_LINE_SEPARATOR;
-  case U_PARAGRAPH_SEPARATOR:          return HB_UNICODE_GENERAL_CATEGORY_PARAGRAPH_SEPARATOR;
-
-  case U_CONTROL_CHAR:                 return HB_UNICODE_GENERAL_CATEGORY_CONTROL;
-  case U_FORMAT_CHAR:                  return HB_UNICODE_GENERAL_CATEGORY_FORMAT;
-  case U_PRIVATE_USE_CHAR:             return HB_UNICODE_GENERAL_CATEGORY_PRIVATE_USE;
-  case U_SURROGATE:                    return HB_UNICODE_GENERAL_CATEGORY_SURROGATE;
-
-
-  case U_DASH_PUNCTUATION:             return HB_UNICODE_GENERAL_CATEGORY_DASH_PUNCTUATION;
-  case U_START_PUNCTUATION:            return HB_UNICODE_GENERAL_CATEGORY_OPEN_PUNCTUATION;
-  case U_END_PUNCTUATION:              return HB_UNICODE_GENERAL_CATEGORY_CLOSE_PUNCTUATION;
-  case U_CONNECTOR_PUNCTUATION:                return HB_UNICODE_GENERAL_CATEGORY_CONNECT_PUNCTUATION;
-  case U_OTHER_PUNCTUATION:            return HB_UNICODE_GENERAL_CATEGORY_OTHER_PUNCTUATION;
-
-  case U_MATH_SYMBOL:                  return HB_UNICODE_GENERAL_CATEGORY_MATH_SYMBOL;
-  case U_CURRENCY_SYMBOL:              return HB_UNICODE_GENERAL_CATEGORY_CURRENCY_SYMBOL;
-  case U_MODIFIER_SYMBOL:              return HB_UNICODE_GENERAL_CATEGORY_MODIFIER_SYMBOL;
-  case U_OTHER_SYMBOL:                 return HB_UNICODE_GENERAL_CATEGORY_OTHER_SYMBOL;
-
-  case U_INITIAL_PUNCTUATION:          return HB_UNICODE_GENERAL_CATEGORY_INITIAL_PUNCTUATION;
-  case U_FINAL_PUNCTUATION:            return HB_UNICODE_GENERAL_CATEGORY_FINAL_PUNCTUATION;
-  }
-
-  return HB_UNICODE_GENERAL_CATEGORY_UNASSIGNED;
-}
-
-static hb_codepoint_t
-hb_icu_unicode_mirroring (hb_unicode_funcs_t *ufuncs HB_UNUSED,
-                         hb_codepoint_t      unicode,
-                         void               *user_data HB_UNUSED)
-{
-  return u_charMirror(unicode);
-}
-
-static hb_script_t
-hb_icu_unicode_script (hb_unicode_funcs_t *ufuncs HB_UNUSED,
-                      hb_codepoint_t      unicode,
-                      void               *user_data HB_UNUSED)
-{
-  UErrorCode status = U_ZERO_ERROR;
-  UScriptCode scriptCode = uscript_getScript(unicode, &status);
-
-  if (unlikely (U_FAILURE (status)))
-    return HB_SCRIPT_UNKNOWN;
-
-  return hb_icu_script_to_script (scriptCode);
-}
-
-static hb_bool_t
-hb_icu_unicode_compose (hb_unicode_funcs_t *ufuncs HB_UNUSED,
-                       hb_codepoint_t      a,
-                       hb_codepoint_t      b,
-                       hb_codepoint_t     *ab,
-                       void               *user_data HB_UNUSED)
-{
-  if (!a || !b)
-    return false;
-
-  UChar utf16[4], normalized[5];
-  int len;
-  hb_bool_t ret, err;
-  UErrorCode icu_err;
-
-  len = 0;
-  err = false;
-  U16_APPEND (utf16, len, ARRAY_LENGTH (utf16), a, err);
-  if (err) return false;
-  U16_APPEND (utf16, len, ARRAY_LENGTH (utf16), b, err);
-  if (err) return false;
-
-  icu_err = U_ZERO_ERROR;
-  len = unorm_normalize (utf16, len, UNORM_NFC, 0, normalized, ARRAY_LENGTH (normalized), &icu_err);
-  if (U_FAILURE (icu_err))
-    return false;
-  if (u_countChar32 (normalized, len) == 1) {
-    U16_GET_UNSAFE (normalized, 0, *ab);
-    ret = true;
-  } else {
-    ret = false;
-  }
-
-  return ret;
-}
-
-static hb_bool_t
-hb_icu_unicode_decompose (hb_unicode_funcs_t *ufuncs HB_UNUSED,
-                         hb_codepoint_t      ab,
-                         hb_codepoint_t     *a,
-                         hb_codepoint_t     *b,
-                         void               *user_data HB_UNUSED)
-{
-  UChar utf16[2], normalized[20];
-  int len;
-  hb_bool_t ret, err;
-  UErrorCode icu_err;
-
-  /* This function is a monster! Maybe it wasn't a good idea adding a
-   * pairwise decompose API... */
-  /* Watchout for the dragons.  Err, watchout for macros changing len. */
-
-  len = 0;
-  err = false;
-  U16_APPEND (utf16, len, ARRAY_LENGTH (utf16), ab, err);
-  if (err) return false;
-
-  icu_err = U_ZERO_ERROR;
-  len = unorm_normalize (utf16, len, UNORM_NFD, 0, normalized, ARRAY_LENGTH (normalized), &icu_err);
-  if (U_FAILURE (icu_err))
-    return false;
-
-  len = u_countChar32 (normalized, len);
-
-  if (len == 1) {
-    U16_GET_UNSAFE (normalized, 0, *a);
-    *b = 0;
-    ret = *a != ab;
-  } else if (len == 2) {
-    len =0;
-    U16_NEXT_UNSAFE (normalized, len, *a);
-    U16_NEXT_UNSAFE (normalized, len, *b);
-
-    /* Here's the ugly part: if ab decomposes to a single character and
-     * that character decomposes again, we have to detect that and undo
-     * the second part :-(. */
-    UChar recomposed[20];
-    icu_err = U_ZERO_ERROR;
-    unorm_normalize (normalized, len, UNORM_NFC, 0, recomposed, ARRAY_LENGTH (recomposed), &icu_err);
-    if (U_FAILURE (icu_err))
-      return false;
-    hb_codepoint_t c;
-    U16_GET_UNSAFE (recomposed, 0, c);
-    if (c != *a && c != ab) {
-      *a = c;
-      *b = 0;
-    }
-    ret = true;
-  } else {
-    /* If decomposed to more than two characters, take the last one,
-     * and recompose the rest to get the first component. */
-    U16_PREV_UNSAFE (normalized, len, *b);
-    UChar recomposed[20];
-    icu_err = U_ZERO_ERROR;
-    len = unorm_normalize (normalized, len, UNORM_NFC, 0, recomposed, ARRAY_LENGTH (recomposed), &icu_err);
-    if (U_FAILURE (icu_err))
-      return false;
-    /* We expect that recomposed has exactly one character now. */
-    U16_GET_UNSAFE (recomposed, 0, *a);
-    ret = true;
-  }
-
-  return ret;
-}
-
-
-extern HB_INTERNAL const hb_unicode_funcs_t _hb_icu_unicode_funcs;
-const hb_unicode_funcs_t _hb_icu_unicode_funcs = {
-  HB_OBJECT_HEADER_STATIC,
-
-  NULL, /* parent */
-  true, /* immutable */
-  {
-#define HB_UNICODE_FUNC_IMPLEMENT(name) hb_icu_unicode_##name,
-    HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS
-#undef HB_UNICODE_FUNC_IMPLEMENT
-  }
-};
-
-hb_unicode_funcs_t *
-hb_icu_get_unicode_funcs (void)
-{
-  return const_cast<hb_unicode_funcs_t *> (&_hb_icu_unicode_funcs);
-}
-
-
diff --git a/src/hb-icu.h b/src/hb-icu.h
deleted file mode 100644 (file)
index d22a8e1..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright © 2009  Red Hat, Inc.
- * Copyright © 2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Behdad Esfahbod
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_ICU_H
-#define HB_ICU_H
-
-#include "hb.h"
-
-#include <unicode/uscript.h>
-
-
-HB_BEGIN_DECLS
-
-
-hb_script_t
-hb_icu_script_to_script (UScriptCode script);
-
-UScriptCode
-hb_icu_script_from_script (hb_script_t script);
-
-
-hb_unicode_funcs_t *
-hb_icu_get_unicode_funcs (void);
-
-
-HB_END_DECLS
-
-#endif /* HB_ICU_H */
diff --git a/src/hb-mutex-private.hh b/src/hb-mutex-private.hh
deleted file mode 100644 (file)
index f9bd679..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright © 2007  Chris Wilson
- * Copyright © 2009,2010  Red Hat, Inc.
- * Copyright © 2011,2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Contributor(s):
- *     Chris Wilson <chris@chris-wilson.co.uk>
- * Red Hat Author(s): Behdad Esfahbod
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_MUTEX_PRIVATE_HH
-#define HB_MUTEX_PRIVATE_HH
-
-#include "hb-private.hh"
-
-
-/* mutex */
-
-/* We need external help for these */
-
-#if 0
-
-
-#elif !defined(HB_NO_MT) && defined(_MSC_VER) || defined(__MINGW32__)
-
-#include <windows.h>
-typedef CRITICAL_SECTION hb_mutex_impl_t;
-#define HB_MUTEX_IMPL_INIT     { NULL, 0, 0, NULL, NULL, 0 }
-#define hb_mutex_impl_init(M)  InitializeCriticalSection (M)
-#define hb_mutex_impl_lock(M)  EnterCriticalSection (M)
-#define hb_mutex_impl_unlock(M)        LeaveCriticalSection (M)
-#define hb_mutex_impl_finish(M)        DeleteCriticalSection (M)
-
-
-#elif !defined(HB_NO_MT) && (defined(HAVE_PTHREAD) || defined(__APPLE__))
-
-#include <pthread.h>
-typedef pthread_mutex_t hb_mutex_impl_t;
-#define HB_MUTEX_IMPL_INIT     PTHREAD_MUTEX_INITIALIZER
-#define hb_mutex_impl_init(M)  pthread_mutex_init (M, NULL)
-#define hb_mutex_impl_lock(M)  pthread_mutex_lock (M)
-#define hb_mutex_impl_unlock(M)        pthread_mutex_unlock (M)
-#define hb_mutex_impl_finish(M)        pthread_mutex_destroy (M)
-
-
-#elif !defined(HB_NO_MT) && defined(HAVE_GLIB)
-
-#include <glib.h>
-typedef GStaticMutex hb_mutex_impl_t;
-#define HB_MUTEX_IMPL_INIT     G_STATIC_MUTEX_INIT
-#define hb_mutex_impl_init(M)  g_static_mutex_init (M)
-#define hb_mutex_impl_lock(M)  g_static_mutex_lock (M)
-#define hb_mutex_impl_unlock(M)        g_static_mutex_unlock (M)
-#define hb_mutex_impl_finish(M)        g_static_mutex_free (M)
-
-
-#elif !defined(HB_NO_MT) && defined(HAVE_INTEL_ATOMIC_PRIMITIVES)
-
-#if defined(HAVE_SCHED_H) && defined(HAVE_SCHED_YIELD)
-# include <sched.h>
-# define HB_SCHED_YIELD() sched_yield ()
-#else
-# define HB_SCHED_YIELD() HB_STMT_START {} HB_STMT_END
-#endif
-
-/* This actually is not a totally awful implementation. */
-typedef volatile int hb_mutex_impl_t;
-#define HB_MUTEX_IMPL_INIT     0
-#define hb_mutex_impl_init(M)  *(M) = 0
-#define hb_mutex_impl_lock(M)  HB_STMT_START { while (__sync_lock_test_and_set((M), 1)) HB_SCHED_YIELD (); } HB_STMT_END
-#define hb_mutex_impl_unlock(M)        __sync_lock_release (M)
-#define hb_mutex_impl_finish(M)        HB_STMT_START {} HB_STMT_END
-
-
-#elif !defined(HB_NO_MT)
-
-#if defined(HAVE_SCHED_H) && defined(HAVE_SCHED_YIELD)
-# include <sched.h>
-# define HB_SCHED_YIELD() sched_yield ()
-#else
-# define HB_SCHED_YIELD() HB_STMT_START {} HB_STMT_END
-#endif
-
-#define HB_MUTEX_INT_NIL 1 /* Warn that fallback implementation is in use. */
-typedef volatile int hb_mutex_impl_t;
-#define HB_MUTEX_IMPL_INIT     0
-#define hb_mutex_impl_init(M)  *(M) = 0
-#define hb_mutex_impl_lock(M)  HB_STMT_START { while (*(M)) HB_SCHED_YIELD (); (*(M))++; } HB_STMT_END
-#define hb_mutex_impl_unlock(M)        (*(M))--;
-#define hb_mutex_impl_finish(M)        HB_STMT_START {} HB_STMT_END
-
-
-#else /* HB_NO_MT */
-
-typedef int hb_mutex_impl_t;
-#define HB_MUTEX_IMPL_INIT     0
-#define hb_mutex_impl_init(M)  HB_STMT_START {} HB_STMT_END
-#define hb_mutex_impl_lock(M)  HB_STMT_START {} HB_STMT_END
-#define hb_mutex_impl_unlock(M)        HB_STMT_START {} HB_STMT_END
-#define hb_mutex_impl_finish(M)        HB_STMT_START {} HB_STMT_END
-
-#endif
-
-
-#define HB_MUTEX_INIT          {HB_MUTEX_IMPL_INIT}
-struct hb_mutex_t
-{
-  /* TODO Add tracing. */
-
-  hb_mutex_impl_t m;
-
-  inline void init   (void) { hb_mutex_impl_init   (&m); }
-  inline void lock   (void) { hb_mutex_impl_lock   (&m); }
-  inline void unlock (void) { hb_mutex_impl_unlock (&m); }
-  inline void finish (void) { hb_mutex_impl_finish (&m); }
-};
-
-
-#endif /* HB_MUTEX_PRIVATE_HH */
diff --git a/src/hb-object-private.hh b/src/hb-object-private.hh
deleted file mode 100644 (file)
index 96d1bd3..0000000
+++ /dev/null
@@ -1,231 +0,0 @@
-/*
- * Copyright © 2007  Chris Wilson
- * Copyright © 2009,2010  Red Hat, Inc.
- * Copyright © 2011,2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Contributor(s):
- *     Chris Wilson <chris@chris-wilson.co.uk>
- * Red Hat Author(s): Behdad Esfahbod
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_OBJECT_PRIVATE_HH
-#define HB_OBJECT_PRIVATE_HH
-
-#include "hb-private.hh"
-
-#include "hb-atomic-private.hh"
-#include "hb-mutex-private.hh"
-
-
-/* Debug */
-
-#ifndef HB_DEBUG_OBJECT
-#define HB_DEBUG_OBJECT (HB_DEBUG+0)
-#endif
-
-
-/* reference_count */
-
-#define HB_REFERENCE_COUNT_INVALID_VALUE ((hb_atomic_int_t) -1)
-#define HB_REFERENCE_COUNT_INVALID {HB_REFERENCE_COUNT_INVALID_VALUE}
-struct hb_reference_count_t
-{
-  hb_atomic_int_t ref_count;
-
-  inline void init (int v) { ref_count = v; }
-  inline int inc (void) { return hb_atomic_int_add (const_cast<hb_atomic_int_t &> (ref_count),  1); }
-  inline int dec (void) { return hb_atomic_int_add (const_cast<hb_atomic_int_t &> (ref_count), -1); }
-  inline void finish (void) { ref_count = HB_REFERENCE_COUNT_INVALID_VALUE; }
-
-  inline bool is_invalid (void) const { return ref_count == HB_REFERENCE_COUNT_INVALID_VALUE; }
-
-};
-
-
-/* user_data */
-
-#define HB_USER_DATA_ARRAY_INIT {HB_LOCKABLE_SET_INIT}
-struct hb_user_data_array_t
-{
-  /* TODO Add tracing. */
-
-  struct hb_user_data_item_t {
-    hb_user_data_key_t *key;
-    void *data;
-    hb_destroy_func_t destroy;
-
-    inline bool operator == (hb_user_data_key_t *other_key) const { return key == other_key; }
-    inline bool operator == (hb_user_data_item_t &other) const { return key == other.key; }
-
-    void finish (void) { if (destroy) destroy (data); }
-  };
-
-  hb_lockable_set_t<hb_user_data_item_t, hb_mutex_t> items;
-
-  inline void init (void) { items.init (); }
-
-  HB_INTERNAL bool set (hb_user_data_key_t *key,
-                       void *              data,
-                       hb_destroy_func_t   destroy,
-                       hb_bool_t           replace,
-                       hb_mutex_t         &lock);
-
-  HB_INTERNAL void *get (hb_user_data_key_t *key,
-                       hb_mutex_t          &lock);
-
-  HB_INTERNAL void finish (hb_mutex_t &lock);
-};
-
-
-/* object_header */
-
-struct hb_object_header_t
-{
-  hb_reference_count_t ref_count;
-  hb_mutex_t lock;
-  hb_user_data_array_t user_data;
-
-#define HB_OBJECT_HEADER_STATIC {HB_REFERENCE_COUNT_INVALID, HB_MUTEX_INIT, HB_USER_DATA_ARRAY_INIT}
-
-  static inline void *create (unsigned int size) {
-    hb_object_header_t *obj = (hb_object_header_t *) calloc (1, size);
-
-    if (likely (obj))
-      obj->init ();
-
-    return obj;
-  }
-
-  inline void init (void) {
-    ref_count.init (1);
-    lock.init ();
-    user_data.init ();
-  }
-
-  inline bool is_inert (void) const {
-    return unlikely (ref_count.is_invalid ());
-  }
-
-  inline void reference (void) {
-    if (unlikely (!this || this->is_inert ()))
-      return;
-    ref_count.inc ();
-  }
-
-  inline bool destroy (void) {
-    if (unlikely (!this || this->is_inert ()))
-      return false;
-    if (ref_count.dec () != 1)
-      return false;
-
-    ref_count.finish (); /* Do this before user_data */
-    user_data.finish (lock);
-    lock.finish ();
-
-    return true;
-  }
-
-  inline bool set_user_data (hb_user_data_key_t *key,
-                            void *              data,
-                            hb_destroy_func_t   destroy_func,
-                            hb_bool_t           replace) {
-    if (unlikely (!this || this->is_inert ()))
-      return false;
-
-    return user_data.set (key, data, destroy_func, replace, lock);
-  }
-
-  inline void *get_user_data (hb_user_data_key_t *key) {
-    if (unlikely (!this || this->is_inert ()))
-      return NULL;
-
-    return user_data.get (key, lock);
-  }
-
-  inline void trace (const char *function) const {
-    if (unlikely (!this)) return;
-    /* XXX We cannot use DEBUG_MSG_FUNC here since that one currecntly only
-     * prints the class name and throws away the template info. */
-    DEBUG_MSG (OBJECT, (void *) this,
-              "%s refcount=%d",
-              function,
-              this ? ref_count.ref_count : 0);
-  }
-
-  private:
-  ASSERT_POD ();
-};
-
-
-/* object */
-
-template <typename Type>
-static inline void hb_object_trace (const Type *obj, const char *function)
-{
-  obj->header.trace (function);
-}
-template <typename Type>
-static inline Type *hb_object_create (void)
-{
-  Type *obj = (Type *) hb_object_header_t::create (sizeof (Type));
-  hb_object_trace (obj, HB_FUNC);
-  return obj;
-}
-template <typename Type>
-static inline bool hb_object_is_inert (const Type *obj)
-{
-  return unlikely (obj->header.is_inert ());
-}
-template <typename Type>
-static inline Type *hb_object_reference (Type *obj)
-{
-  hb_object_trace (obj, HB_FUNC);
-  obj->header.reference ();
-  return obj;
-}
-template <typename Type>
-static inline bool hb_object_destroy (Type *obj)
-{
-  hb_object_trace (obj, HB_FUNC);
-  return obj->header.destroy ();
-}
-template <typename Type>
-static inline bool hb_object_set_user_data (Type               *obj,
-                                           hb_user_data_key_t *key,
-                                           void *              data,
-                                           hb_destroy_func_t   destroy,
-                                           hb_bool_t           replace)
-{
-  return obj->header.set_user_data (key, data, destroy, replace);
-}
-
-template <typename Type>
-static inline void *hb_object_get_user_data (Type               *obj,
-                                            hb_user_data_key_t *key)
-{
-  return obj->header.get_user_data (key);
-}
-
-
-#endif /* HB_OBJECT_PRIVATE_HH */
diff --git a/src/hb-open-file-private.hh b/src/hb-open-file-private.hh
deleted file mode 100644 (file)
index ce18580..0000000
+++ /dev/null
@@ -1,257 +0,0 @@
-/*
- * Copyright © 2007,2008,2009  Red Hat, Inc.
- * Copyright © 2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Behdad Esfahbod
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_OPEN_FILE_PRIVATE_HH
-#define HB_OPEN_FILE_PRIVATE_HH
-
-#include "hb-open-type-private.hh"
-
-
-
-/*
- *
- * The OpenType Font File
- *
- */
-
-
-/*
- * Organization of an OpenType Font
- */
-
-struct OpenTypeFontFile;
-struct OffsetTable;
-struct TTCHeader;
-
-
-typedef struct TableRecord
-{
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (c->check_struct (this));
-  }
-
-  Tag          tag;            /* 4-byte identifier. */
-  CheckSum     checkSum;       /* CheckSum for this table. */
-  ULONG                offset;         /* Offset from beginning of TrueType font
-                                * file. */
-  ULONG                length;         /* Length of this table. */
-  public:
-  DEFINE_SIZE_STATIC (16);
-} OpenTypeTable;
-
-typedef struct OffsetTable
-{
-  friend struct OpenTypeFontFile;
-
-  inline unsigned int get_table_count (void) const
-  { return numTables; }
-  inline const TableRecord& get_table (unsigned int i) const
-  {
-    if (unlikely (i >= numTables)) return Null(TableRecord);
-    return tables[i];
-  }
-  inline bool find_table_index (hb_tag_t tag, unsigned int *table_index) const
-  {
-    Tag t;
-    t.set (tag);
-    unsigned int count = numTables;
-    for (unsigned int i = 0; i < count; i++)
-    {
-      if (t == tables[i].tag)
-      {
-        if (table_index) *table_index = i;
-        return true;
-      }
-    }
-    if (table_index) *table_index = Index::NOT_FOUND_INDEX;
-    return false;
-  }
-  inline const TableRecord& get_table_by_tag (hb_tag_t tag) const
-  {
-    unsigned int table_index;
-    find_table_index (tag, &table_index);
-    return get_table (table_index);
-  }
-
-  public:
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (c->check_struct (this) && c->check_array (tables, TableRecord::static_size, numTables));
-  }
-
-  private:
-  Tag          sfnt_version;   /* '\0\001\0\00' if TrueType / 'OTTO' if CFF */
-  USHORT       numTables;      /* Number of tables. */
-  USHORT       searchRange;    /* (Maximum power of 2 <= numTables) x 16 */
-  USHORT       entrySelector;  /* Log2(maximum power of 2 <= numTables). */
-  USHORT       rangeShift;     /* NumTables x 16-searchRange. */
-  TableRecord  tables[VAR];    /* TableRecord entries. numTables items */
-  public:
-  DEFINE_SIZE_ARRAY (12, tables);
-} OpenTypeFontFace;
-
-
-/*
- * TrueType Collections
- */
-
-struct TTCHeaderVersion1
-{
-  friend struct TTCHeader;
-
-  inline unsigned int get_face_count (void) const { return table.len; }
-  inline const OpenTypeFontFace& get_face (unsigned int i) const { return this+table[i]; }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (table.sanitize (c, this));
-  }
-
-  private:
-  Tag          ttcTag;         /* TrueType Collection ID string: 'ttcf' */
-  FixedVersion version;        /* Version of the TTC Header (1.0),
-                                * 0x00010000 */
-  LongOffsetLongArrayOf<OffsetTable>
-               table;          /* Array of offsets to the OffsetTable for each font
-                                * from the beginning of the file */
-  public:
-  DEFINE_SIZE_ARRAY (12, table);
-};
-
-struct TTCHeader
-{
-  friend struct OpenTypeFontFile;
-
-  private:
-
-  inline unsigned int get_face_count (void) const
-  {
-    switch (u.header.version.major) {
-    case 2: /* version 2 is compatible with version 1 */
-    case 1: return u.version1.get_face_count ();
-    default:return 0;
-    }
-  }
-  inline const OpenTypeFontFace& get_face (unsigned int i) const
-  {
-    switch (u.header.version.major) {
-    case 2: /* version 2 is compatible with version 1 */
-    case 1: return u.version1.get_face (i);
-    default:return Null(OpenTypeFontFace);
-    }
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    if (unlikely (!u.header.version.sanitize (c))) return TRACE_RETURN (false);
-    switch (u.header.version.major) {
-    case 2: /* version 2 is compatible with version 1 */
-    case 1: return TRACE_RETURN (u.version1.sanitize (c));
-    default:return TRACE_RETURN (true);
-    }
-  }
-
-  private:
-  union {
-  struct {
-  Tag          ttcTag;         /* TrueType Collection ID string: 'ttcf' */
-  FixedVersion version;        /* Version of the TTC Header (1.0 or 2.0),
-                                * 0x00010000 or 0x00020000 */
-  }                    header;
-  TTCHeaderVersion1    version1;
-  } u;
-};
-
-
-/*
- * OpenType Font File
- */
-
-struct OpenTypeFontFile
-{
-  static const hb_tag_t CFFTag         = HB_TAG ('O','T','T','O'); /* OpenType with Postscript outlines */
-  static const hb_tag_t TrueTypeTag    = HB_TAG ( 0 , 1 , 0 , 0 ); /* OpenType with TrueType outlines */
-  static const hb_tag_t TTCTag         = HB_TAG ('t','t','c','f'); /* TrueType Collection */
-  static const hb_tag_t TrueTag                = HB_TAG ('t','r','u','e'); /* Obsolete Apple TrueType */
-  static const hb_tag_t Typ1Tag                = HB_TAG ('t','y','p','1'); /* Obsolete Apple Type1 font in SFNT container */
-
-  inline hb_tag_t get_tag (void) const { return u.tag; }
-
-  inline unsigned int get_face_count (void) const
-  {
-    switch (u.tag) {
-    case CFFTag:       /* All the non-collection tags */
-    case TrueTag:
-    case Typ1Tag:
-    case TrueTypeTag:  return 1;
-    case TTCTag:       return u.ttcHeader.get_face_count ();
-    default:           return 0;
-    }
-  }
-  inline const OpenTypeFontFace& get_face (unsigned int i) const
-  {
-    switch (u.tag) {
-    /* Note: for non-collection SFNT data we ignore index.  This is because
-     * Apple dfont container is a container of SFNT's.  So each SFNT is a
-     * non-TTC, but the index is more than zero. */
-    case CFFTag:       /* All the non-collection tags */
-    case TrueTag:
-    case Typ1Tag:
-    case TrueTypeTag:  return u.fontFace;
-    case TTCTag:       return u.ttcHeader.get_face (i);
-    default:           return Null(OpenTypeFontFace);
-    }
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    if (unlikely (!u.tag.sanitize (c))) return TRACE_RETURN (false);
-    switch (u.tag) {
-    case CFFTag:       /* All the non-collection tags */
-    case TrueTag:
-    case Typ1Tag:
-    case TrueTypeTag:  return TRACE_RETURN (u.fontFace.sanitize (c));
-    case TTCTag:       return TRACE_RETURN (u.ttcHeader.sanitize (c));
-    default:           return TRACE_RETURN (true);
-    }
-  }
-
-  private:
-  union {
-  Tag                  tag;            /* 4-byte identifier. */
-  OpenTypeFontFace     fontFace;
-  TTCHeader            ttcHeader;
-  } u;
-  public:
-  DEFINE_SIZE_UNION (4, tag);
-};
-
-
-
-#endif /* HB_OPEN_FILE_PRIVATE_HH */
diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh
deleted file mode 100644 (file)
index 5d90e5b..0000000
+++ /dev/null
@@ -1,710 +0,0 @@
-/*
- * Copyright © 2007,2008,2009,2010  Red Hat, Inc.
- * Copyright © 2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Behdad Esfahbod
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_OPEN_TYPE_PRIVATE_HH
-#define HB_OPEN_TYPE_PRIVATE_HH
-
-#include "hb-private.hh"
-
-#include "hb-blob.h"
-
-
-
-/*
- * Casts
- */
-
-/* Cast to struct T, reference to reference */
-template<typename Type, typename TObject>
-inline const Type& CastR(const TObject &X)
-{ return reinterpret_cast<const Type&> (X); }
-template<typename Type, typename TObject>
-inline Type& CastR(TObject &X)
-{ return reinterpret_cast<Type&> (X); }
-
-/* Cast to struct T, pointer to pointer */
-template<typename Type, typename TObject>
-inline const Type* CastP(const TObject *X)
-{ return reinterpret_cast<const Type*> (X); }
-template<typename Type, typename TObject>
-inline Type* CastP(TObject *X)
-{ return reinterpret_cast<Type*> (X); }
-
-/* StructAtOffset<T>(P,Ofs) returns the struct T& that is placed at memory
- * location pointed to by P plus Ofs bytes. */
-template<typename Type>
-inline const Type& StructAtOffset(const void *P, unsigned int offset)
-{ return * reinterpret_cast<const Type*> ((const char *) P + offset); }
-template<typename Type>
-inline Type& StructAtOffset(void *P, unsigned int offset)
-{ return * reinterpret_cast<Type*> ((char *) P + offset); }
-
-/* StructAfter<T>(X) returns the struct T& that is placed after X.
- * Works with X of variable size also.  X must implement get_size() */
-template<typename Type, typename TObject>
-inline const Type& StructAfter(const TObject &X)
-{ return StructAtOffset<Type>(&X, X.get_size()); }
-template<typename Type, typename TObject>
-inline Type& StructAfter(TObject &X)
-{ return StructAtOffset<Type>(&X, X.get_size()); }
-
-
-
-/*
- * Size checking
- */
-
-/* Check _assertion in a method environment */
-#define _DEFINE_INSTANCE_ASSERTION1(_line, _assertion) \
-  inline void _instance_assertion_on_line_##_line (void) const \
-  { \
-    ASSERT_STATIC (_assertion); \
-    ASSERT_INSTANCE_POD (*this); /* Make sure it's POD. */ \
-  }
-# define _DEFINE_INSTANCE_ASSERTION0(_line, _assertion) _DEFINE_INSTANCE_ASSERTION1 (_line, _assertion)
-# define DEFINE_INSTANCE_ASSERTION(_assertion) _DEFINE_INSTANCE_ASSERTION0 (__LINE__, _assertion)
-
-/* Check that _code compiles in a method environment */
-#define _DEFINE_COMPILES_ASSERTION1(_line, _code) \
-  inline void _compiles_assertion_on_line_##_line (void) const \
-  { _code; }
-# define _DEFINE_COMPILES_ASSERTION0(_line, _code) _DEFINE_COMPILES_ASSERTION1 (_line, _code)
-# define DEFINE_COMPILES_ASSERTION(_code) _DEFINE_COMPILES_ASSERTION0 (__LINE__, _code)
-
-
-#define DEFINE_SIZE_STATIC(size) \
-  DEFINE_INSTANCE_ASSERTION (sizeof (*this) == (size)); \
-  static const unsigned int static_size = (size); \
-  static const unsigned int min_size = (size)
-
-/* Size signifying variable-sized array */
-#define VAR 1
-
-#define DEFINE_SIZE_UNION(size, _member) \
-  DEFINE_INSTANCE_ASSERTION (this->u._member.static_size == (size)); \
-  static const unsigned int min_size = (size)
-
-#define DEFINE_SIZE_MIN(size) \
-  DEFINE_INSTANCE_ASSERTION (sizeof (*this) >= (size)); \
-  static const unsigned int min_size = (size)
-
-#define DEFINE_SIZE_ARRAY(size, array) \
-  DEFINE_INSTANCE_ASSERTION (sizeof (*this) == (size) + sizeof (array[0])); \
-  DEFINE_COMPILES_ASSERTION ((void) array[0].static_size) \
-  static const unsigned int min_size = (size)
-
-#define DEFINE_SIZE_ARRAY2(size, array1, array2) \
-  DEFINE_INSTANCE_ASSERTION (sizeof (*this) == (size) + sizeof (this->array1[0]) + sizeof (this->array2[0])); \
-  DEFINE_COMPILES_ASSERTION ((void) array1[0].static_size; (void) array2[0].static_size) \
-  static const unsigned int min_size = (size)
-
-
-
-/*
- * Null objects
- */
-
-/* Global nul-content Null pool.  Enlarge as necessary. */
-static const void *_NullPool[64 / sizeof (void *)];
-
-/* Generic nul-content Null objects. */
-template <typename Type>
-static inline const Type& Null (void) {
-  ASSERT_STATIC (Type::min_size <= sizeof (_NullPool));
-  return *CastP<Type> (_NullPool);
-}
-
-/* Specializaiton for arbitrary-content arbitrary-sized Null objects. */
-#define DEFINE_NULL_DATA(Type, data) \
-static const char _Null##Type[Type::min_size + 1] = data; /* +1 is for nul-termination in data */ \
-template <> \
-inline const Type& Null<Type> (void) { \
-  return *CastP<Type> (_Null##Type); \
-} /* The following line really exists such that we end in a place needing semicolon */ \
-ASSERT_STATIC (Type::min_size + 1 <= sizeof (_Null##Type))
-
-/* Accessor macro. */
-#define Null(Type) Null<Type>()
-
-
-
-/*
- * Sanitize
- */
-
-#ifndef HB_DEBUG_SANITIZE
-#define HB_DEBUG_SANITIZE (HB_DEBUG+0)
-#endif
-
-
-#define TRACE_SANITIZE() \
-       hb_auto_trace_t<HB_DEBUG_SANITIZE> trace (&c->debug_depth, "SANITIZE", this, HB_FUNC, "");
-
-
-struct hb_sanitize_context_t
-{
-  inline void init (hb_blob_t *b)
-  {
-    this->blob = hb_blob_reference (b);
-    this->writable = false;
-  }
-
-  inline void start_processing (void)
-  {
-    this->start = hb_blob_get_data (this->blob, NULL);
-    this->end = this->start + hb_blob_get_length (this->blob);
-    this->edit_count = 0;
-    this->debug_depth = 0;
-
-    DEBUG_MSG_LEVEL (SANITIZE, this->blob, 0, +1,
-                    "start [%p..%p] (%lu bytes)",
-                    this->start, this->end,
-                    (unsigned long) (this->end - this->start));
-  }
-
-  inline void end_processing (void)
-  {
-    DEBUG_MSG_LEVEL (SANITIZE, this->blob, 0, -1,
-                    "end [%p..%p] %u edit requests",
-                    this->start, this->end, this->edit_count);
-
-    hb_blob_destroy (this->blob);
-    this->blob = NULL;
-    this->start = this->end = NULL;
-  }
-
-  inline bool check_range (const void *base, unsigned int len) const
-  {
-    const char *p = (const char *) base;
-
-    hb_auto_trace_t<HB_DEBUG_SANITIZE> trace (&this->debug_depth, "SANITIZE", this->blob, NULL,
-                                             "check_range [%p..%p] (%d bytes) in [%p..%p]",
-                                             p, p + len, len,
-                                             this->start, this->end);
-
-    return TRACE_RETURN (likely (this->start <= p && p <= this->end && (unsigned int) (this->end - p) >= len));
-  }
-
-  inline bool check_array (const void *base, unsigned int record_size, unsigned int len) const
-  {
-    const char *p = (const char *) base;
-    bool overflows = _hb_unsigned_int_mul_overflows (len, record_size);
-
-    hb_auto_trace_t<HB_DEBUG_SANITIZE> trace (&this->debug_depth, "SANITIZE", this->blob, NULL,
-                                             "check_array [%p..%p] (%d*%d=%ld bytes) in [%p..%p]",
-                                             p, p + (record_size * len), record_size, len, (unsigned long) record_size * len,
-                                             this->start, this->end);
-
-    return TRACE_RETURN (likely (!overflows && this->check_range (base, record_size * len)));
-  }
-
-  template <typename Type>
-  inline bool check_struct (const Type *obj) const
-  {
-    return likely (this->check_range (obj, obj->min_size));
-  }
-
-  inline bool may_edit (const void *base HB_UNUSED, unsigned int len HB_UNUSED)
-  {
-    const char *p = (const char *) base;
-    this->edit_count++;
-
-    hb_auto_trace_t<HB_DEBUG_SANITIZE> trace (&this->debug_depth, "SANITIZE", this->blob, NULL,
-                                             "may_edit(%u) [%p..%p] (%d bytes) in [%p..%p] -> %s",
-                                             this->edit_count,
-                                             p, p + len, len,
-                                             this->start, this->end);
-
-    return TRACE_RETURN (this->writable);
-  }
-
-  mutable unsigned int debug_depth;
-  const char *start, *end;
-  bool writable;
-  unsigned int edit_count;
-  hb_blob_t *blob;
-};
-
-
-
-/* Template to sanitize an object. */
-template <typename Type>
-struct Sanitizer
-{
-  static hb_blob_t *sanitize (hb_blob_t *blob) {
-    hb_sanitize_context_t c[1] = {{0}};
-    bool sane;
-
-    /* TODO is_sane() stuff */
-
-    c->init (blob);
-
-  retry:
-    DEBUG_MSG_FUNC (SANITIZE, blob, "start");
-
-    c->start_processing ();
-
-    if (unlikely (!c->start)) {
-      c->end_processing ();
-      return blob;
-    }
-
-    Type *t = CastP<Type> (const_cast<char *> (c->start));
-
-    sane = t->sanitize (c);
-    if (sane) {
-      if (c->edit_count) {
-       DEBUG_MSG_FUNC (SANITIZE, blob, "passed first round with %d edits; going for second round", c->edit_count);
-
-        /* sanitize again to ensure no toe-stepping */
-        c->edit_count = 0;
-       sane = t->sanitize (c);
-       if (c->edit_count) {
-         DEBUG_MSG_FUNC (SANITIZE, blob, "requested %d edits in second round; FAILLING", c->edit_count);
-         sane = false;
-       }
-      }
-    } else {
-      unsigned int edit_count = c->edit_count;
-      if (edit_count && !c->writable) {
-        c->start = hb_blob_get_data_writable (blob, NULL);
-       c->end = c->start + hb_blob_get_length (blob);
-
-       if (c->start) {
-         c->writable = true;
-         /* ok, we made it writable by relocating.  try again */
-         DEBUG_MSG_FUNC (SANITIZE, blob, "retry");
-         goto retry;
-       }
-      }
-    }
-
-    c->end_processing ();
-
-    DEBUG_MSG_FUNC (SANITIZE, blob, sane ? "PASSED" : "FAILED");
-    if (sane)
-      return blob;
-    else {
-      hb_blob_destroy (blob);
-      return hb_blob_get_empty ();
-    }
-  }
-
-  static const Type* lock_instance (hb_blob_t *blob) {
-    hb_blob_make_immutable (blob);
-    const char *base = hb_blob_get_data (blob, NULL);
-    return unlikely (!base) ? &Null(Type) : CastP<Type> (base);
-  }
-};
-
-
-
-
-/*
- *
- * The OpenType Font File: Data Types
- */
-
-
-/* "The following data types are used in the OpenType font file.
- *  All OpenType fonts use Motorola-style byte ordering (Big Endian):" */
-
-/*
- * Int types
- */
-
-
-template <typename Type, int Bytes> struct BEInt;
-
-/* LONGTERMTODO: On machines allowing unaligned access, we can make the
- * following tighter by using byteswap instructions on ints directly. */
-template <typename Type>
-struct BEInt<Type, 2>
-{
-  public:
-  inline void set (Type i) { hb_be_uint16_put (v,i); }
-  inline operator Type (void) const { return hb_be_uint16_get (v); }
-  inline bool operator == (const BEInt<Type, 2>& o) const { return hb_be_uint16_eq (v, o.v); }
-  inline bool operator != (const BEInt<Type, 2>& o) const { return !(*this == o); }
-  private: uint8_t v[2];
-};
-template <typename Type>
-struct BEInt<Type, 4>
-{
-  public:
-  inline void set (Type i) { hb_be_uint32_put (v,i); }
-  inline operator Type (void) const { return hb_be_uint32_get (v); }
-  inline bool operator == (const BEInt<Type, 4>& o) const { return hb_be_uint32_eq (v, o.v); }
-  inline bool operator != (const BEInt<Type, 4>& o) const { return !(*this == o); }
-  private: uint8_t v[4];
-};
-
-/* Integer types in big-endian order and no alignment requirement */
-template <typename Type>
-struct IntType
-{
-  inline void set (Type i) { v.set (i); }
-  inline operator Type(void) const { return v; }
-  inline bool operator == (const IntType<Type> &o) const { return v == o.v; }
-  inline bool operator != (const IntType<Type> &o) const { return v != o.v; }
-  inline int cmp (Type a) const { Type b = v; return a < b ? -1 : a == b ? 0 : +1; }
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (likely (c->check_struct (this)));
-  }
-  protected:
-  BEInt<Type, sizeof (Type)> v;
-  public:
-  DEFINE_SIZE_STATIC (sizeof (Type));
-};
-
-/* Typedef these to avoid clash with windows.h */
-#define USHORT HB_USHORT
-#define SHORT  HB_SHORT
-#define ULONG  HB_ULONG
-#define LONG   HB_LONG
-typedef IntType<uint16_t> USHORT;      /* 16-bit unsigned integer. */
-typedef IntType<int16_t>  SHORT;       /* 16-bit signed integer. */
-typedef IntType<uint32_t> ULONG;       /* 32-bit unsigned integer. */
-typedef IntType<int32_t>  LONG;                /* 32-bit signed integer. */
-
-/* 16-bit signed integer (SHORT) that describes a quantity in FUnits. */
-typedef SHORT FWORD;
-
-/* 16-bit unsigned integer (USHORT) that describes a quantity in FUnits. */
-typedef USHORT UFWORD;
-
-/* Date represented in number of seconds since 12:00 midnight, January 1,
- * 1904. The value is represented as a signed 64-bit integer. */
-struct LONGDATETIME
-{
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (likely (c->check_struct (this)));
-  }
-  private:
-  LONG major;
-  ULONG minor;
-  public:
-  DEFINE_SIZE_STATIC (8);
-};
-
-/* Array of four uint8s (length = 32 bits) used to identify a script, language
- * system, feature, or baseline */
-struct Tag : ULONG
-{
-  /* What the char* converters return is NOT nul-terminated.  Print using "%.4s" */
-  inline operator const char* (void) const { return reinterpret_cast<const char *> (&this->v); }
-  inline operator char* (void) { return reinterpret_cast<char *> (&this->v); }
-  public:
-  DEFINE_SIZE_STATIC (4);
-};
-DEFINE_NULL_DATA (Tag, "    ");
-
-/* Glyph index number, same as uint16 (length = 16 bits) */
-typedef USHORT GlyphID;
-
-/* Script/language-system/feature index */
-struct Index : USHORT {
-  static const unsigned int NOT_FOUND_INDEX = 0xFFFF;
-};
-DEFINE_NULL_DATA (Index, "\xff\xff");
-
-/* Offset to a table, same as uint16 (length = 16 bits), Null offset = 0x0000 */
-typedef USHORT Offset;
-
-/* LongOffset to a table, same as uint32 (length = 32 bits), Null offset = 0x00000000 */
-typedef ULONG LongOffset;
-
-
-/* CheckSum */
-struct CheckSum : ULONG
-{
-  static uint32_t CalcTableChecksum (ULONG *Table, uint32_t Length)
-  {
-    uint32_t Sum = 0L;
-    ULONG *EndPtr = Table+((Length+3) & ~3) / ULONG::static_size;
-
-    while (Table < EndPtr)
-      Sum += *Table++;
-    return Sum;
-  }
-  public:
-  DEFINE_SIZE_STATIC (4);
-};
-
-
-/*
- * Version Numbers
- */
-
-struct FixedVersion
-{
-  inline uint32_t to_int (void) const { return (major << 16) + minor; }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (c->check_struct (this));
-  }
-
-  USHORT major;
-  USHORT minor;
-  public:
-  DEFINE_SIZE_STATIC (4);
-};
-
-
-
-/*
- * Template subclasses of Offset and LongOffset that do the dereferencing.
- * Use: (base+offset)
- */
-
-template <typename OffsetType, typename Type>
-struct GenericOffsetTo : OffsetType
-{
-  inline const Type& operator () (const void *base) const
-  {
-    unsigned int offset = *this;
-    if (unlikely (!offset)) return Null(Type);
-    return StructAtOffset<Type> (base, offset);
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c, void *base) {
-    TRACE_SANITIZE ();
-    if (unlikely (!c->check_struct (this))) return TRACE_RETURN (false);
-    unsigned int offset = *this;
-    if (unlikely (!offset)) return TRACE_RETURN (true);
-    Type &obj = StructAtOffset<Type> (base, offset);
-    return TRACE_RETURN (likely (obj.sanitize (c)) || neuter (c));
-  }
-  template <typename T>
-  inline bool sanitize (hb_sanitize_context_t *c, void *base, T user_data) {
-    TRACE_SANITIZE ();
-    if (unlikely (!c->check_struct (this))) return TRACE_RETURN (false);
-    unsigned int offset = *this;
-    if (unlikely (!offset)) return TRACE_RETURN (true);
-    Type &obj = StructAtOffset<Type> (base, offset);
-    return TRACE_RETURN (likely (obj.sanitize (c, user_data)) || neuter (c));
-  }
-
-  private:
-  /* Set the offset to Null */
-  inline bool neuter (hb_sanitize_context_t *c) {
-    if (c->may_edit (this, this->static_size)) {
-      this->set (0); /* 0 is Null offset */
-      return true;
-    }
-    return false;
-  }
-};
-template <typename Base, typename OffsetType, typename Type>
-inline const Type& operator + (const Base &base, GenericOffsetTo<OffsetType, Type> offset) { return offset (base); }
-
-template <typename Type>
-struct OffsetTo : GenericOffsetTo<Offset, Type> {};
-
-template <typename Type>
-struct LongOffsetTo : GenericOffsetTo<LongOffset, Type> {};
-
-
-/*
- * Array Types
- */
-
-template <typename LenType, typename Type>
-struct GenericArrayOf
-{
-  const Type *sub_array (unsigned int start_offset, unsigned int *pcount /* IN/OUT */) const
-  {
-    unsigned int count = len;
-    if (unlikely (start_offset > count))
-      count = 0;
-    else
-      count -= start_offset;
-    count = MIN (count, *pcount);
-    *pcount = count;
-    return array + start_offset;
-  }
-
-  inline const Type& operator [] (unsigned int i) const
-  {
-    if (unlikely (i >= len)) return Null(Type);
-    return array[i];
-  }
-  inline unsigned int get_size (void) const
-  { return len.static_size + len * Type::static_size; }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    if (unlikely (!sanitize_shallow (c))) return TRACE_RETURN (false);
-
-    /* Note: for structs that do not reference other structs,
-     * we do not need to call their sanitize() as we already did
-     * a bound check on the aggregate array size.  We just include
-     * a small unreachable expression to make sure the structs
-     * pointed to do have a simple sanitize(), ie. they do not
-     * reference other structs via offsets.
-     */
-    (void) (false && array[0].sanitize (c));
-
-    return TRACE_RETURN (true);
-  }
-  inline bool sanitize (hb_sanitize_context_t *c, void *base) {
-    TRACE_SANITIZE ();
-    if (unlikely (!sanitize_shallow (c))) return TRACE_RETURN (false);
-    unsigned int count = len;
-    for (unsigned int i = 0; i < count; i++)
-      if (unlikely (!array[i].sanitize (c, base)))
-        return TRACE_RETURN (false);
-    return TRACE_RETURN (true);
-  }
-  template <typename T>
-  inline bool sanitize (hb_sanitize_context_t *c, void *base, T user_data) {
-    TRACE_SANITIZE ();
-    if (unlikely (!sanitize_shallow (c))) return TRACE_RETURN (false);
-    unsigned int count = len;
-    for (unsigned int i = 0; i < count; i++)
-      if (unlikely (!array[i].sanitize (c, base, user_data)))
-        return TRACE_RETURN (false);
-    return TRACE_RETURN (true);
-  }
-
-  private:
-  inline bool sanitize_shallow (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (c->check_struct (this) && c->check_array (this, Type::static_size, len));
-  }
-
-  public:
-  LenType len;
-  Type array[VAR];
-  public:
-  DEFINE_SIZE_ARRAY (sizeof (LenType), array);
-};
-
-/* An array with a USHORT number of elements. */
-template <typename Type>
-struct ArrayOf : GenericArrayOf<USHORT, Type> {};
-
-/* An array with a ULONG number of elements. */
-template <typename Type>
-struct LongArrayOf : GenericArrayOf<ULONG, Type> {};
-
-/* Array of Offset's */
-template <typename Type>
-struct OffsetArrayOf : ArrayOf<OffsetTo<Type> > {};
-
-/* Array of LongOffset's */
-template <typename Type>
-struct LongOffsetArrayOf : ArrayOf<LongOffsetTo<Type> > {};
-
-/* LongArray of LongOffset's */
-template <typename Type>
-struct LongOffsetLongArrayOf : LongArrayOf<LongOffsetTo<Type> > {};
-
-/* Array of offsets relative to the beginning of the array itself. */
-template <typename Type>
-struct OffsetListOf : OffsetArrayOf<Type>
-{
-  inline const Type& operator [] (unsigned int i) const
-  {
-    if (unlikely (i >= this->len)) return Null(Type);
-    return this+this->array[i];
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (OffsetArrayOf<Type>::sanitize (c, this));
-  }
-  template <typename T>
-  inline bool sanitize (hb_sanitize_context_t *c, T user_data) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (OffsetArrayOf<Type>::sanitize (c, this, user_data));
-  }
-};
-
-
-/* An array with a USHORT number of elements,
- * starting at second element. */
-template <typename Type>
-struct HeadlessArrayOf
-{
-  inline const Type& operator [] (unsigned int i) const
-  {
-    if (unlikely (i >= len || !i)) return Null(Type);
-    return array[i-1];
-  }
-  inline unsigned int get_size (void) const
-  { return len.static_size + (len ? len - 1 : 0) * Type::static_size; }
-
-  inline bool sanitize_shallow (hb_sanitize_context_t *c) {
-    return c->check_struct (this)
-       && c->check_array (this, Type::static_size, len);
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    if (unlikely (!sanitize_shallow (c))) return TRACE_RETURN (false);
-
-    /* Note: for structs that do not reference other structs,
-     * we do not need to call their sanitize() as we already did
-     * a bound check on the aggregate array size.  We just include
-     * a small unreachable expression to make sure the structs
-     * pointed to do have a simple sanitize(), ie. they do not
-     * reference other structs via offsets.
-     */
-    (void) (false && array[0].sanitize (c));
-
-    return TRACE_RETURN (true);
-  }
-
-  USHORT len;
-  Type array[VAR];
-  public:
-  DEFINE_SIZE_ARRAY (sizeof (USHORT), array);
-};
-
-
-/* An array with sorted elements.  Supports binary searching. */
-template <typename Type>
-struct SortedArrayOf : ArrayOf<Type> {
-
-  template <typename SearchType>
-  inline int search (const SearchType &x) const {
-    struct Cmp {
-      static int cmp (const SearchType *a, const Type *b) { return b->cmp (*a); }
-    };
-    const Type *p = (const Type *) bsearch (&x, this->array, this->len, sizeof (this->array[0]), (hb_compare_func_t) Cmp::cmp);
-    return p ? p - this->array : -1;
-  }
-};
-
-
-
-#endif /* HB_OPEN_TYPE_PRIVATE_HH */
diff --git a/src/hb-ot-head-table.hh b/src/hb-ot-head-table.hh
deleted file mode 100644 (file)
index 32d64ca..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Copyright © 2010  Red Hat, Inc.
- * Copyright © 2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Behdad Esfahbod
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_OT_HEAD_TABLE_HH
-#define HB_OT_HEAD_TABLE_HH
-
-#include "hb-open-type-private.hh"
-
-
-
-/*
- * head -- Font Header
- */
-
-#define HB_OT_TAG_head HB_TAG('h','e','a','d')
-
-struct head
-{
-  static const hb_tag_t Tag    = HB_OT_TAG_head;
-
-  inline unsigned int get_upem (void) const {
-    unsigned int upem = unitsPerEm;
-    /* If no valid head table found, assume 1000, which matches typicaly Type1 usage. */
-    return 16 <= upem && upem <= 16384 ? upem : 1000;
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (c->check_struct (this) && likely (version.major == 1));
-  }
-
-  private:
-  FixedVersion version;                /* Version of the head table--currently
-                                        * 0x00010000 for version 1.0. */
-  FixedVersion fontRevision;           /* Set by font manufacturer. */
-  ULONG                checkSumAdjustment;     /* To compute: set it to 0, sum the
-                                        * entire font as ULONG, then store
-                                        * 0xB1B0AFBA - sum. */
-  ULONG                magicNumber;            /* Set to 0x5F0F3CF5. */
-  USHORT       flags;                  /* Bit 0: Baseline for font at y=0;
-                                        * Bit 1: Left sidebearing point at x=0;
-                                        * Bit 2: Instructions may depend on point size;
-                                        * Bit 3: Force ppem to integer values for all
-                                        *   internal scaler math; may use fractional
-                                        *   ppem sizes if this bit is clear;
-                                        * Bit 4: Instructions may alter advance width
-                                        *   (the advance widths might not scale linearly);
-
-                                        * Bits 5-10: These should be set according to
-                                        *   Apple's specification. However, they are not
-                                        *   implemented in OpenType.
-                                        * Bit 5: This bit should be set in fonts that are
-                                        *   intended to e laid out vertically, and in
-                                        *   which the glyphs have been drawn such that an
-                                        *   x-coordinate of 0 corresponds to the desired
-                                        *   vertical baseline.
-                                        * Bit 6: This bit must be set to zero.
-                                        * Bit 7: This bit should be set if the font
-                                        *   requires layout for correct linguistic
-                                        *   rendering (e.g. Arabic fonts).
-                                        * Bit 8: This bit should be set for a GX font
-                                        *   which has one or more metamorphosis effects
-                                        *   designated as happening by default.
-                                        * Bit 9: This bit should be set if the font
-                                        *   contains any strong right-to-left glyphs.
-                                        * Bit 10: This bit should be set if the font
-                                        *   contains Indic-style rearrangement effects.
-
-                                        * Bit 11: Font data is 'lossless,' as a result
-                                        *   of having been compressed and decompressed
-                                        *   with the Agfa MicroType Express engine.
-                                        * Bit 12: Font converted (produce compatible metrics)
-                                        * Bit 13: Font optimized for ClearType™.
-                                        *   Note, fonts that rely on embedded bitmaps (EBDT)
-                                        *   for rendering should not be considered optimized
-                                        *   for ClearType, and therefore should keep this bit
-                                        *   cleared.
-                                        * Bit 14: Last Resort font. If set, indicates that
-                                        * the glyphs encoded in the cmap subtables are simply
-                                        * generic symbolic representations of code point
-                                        * ranges and don’t truly represent support for those
-                                        * code points. If unset, indicates that the glyphs
-                                        * encoded in the cmap subtables represent proper
-                                        * support for those code points.
-                                        * Bit 15: Reserved, set to 0. */
-  USHORT       unitsPerEm;             /* Valid range is from 16 to 16384. This value
-                                        * should be a power of 2 for fonts that have
-                                        * TrueType outlines. */
-  LONGDATETIME created;                /* Number of seconds since 12:00 midnight,
-                                          January 1, 1904. 64-bit integer */
-  LONGDATETIME modified;               /* Number of seconds since 12:00 midnight,
-                                          January 1, 1904. 64-bit integer */
-  SHORT                xMin;                   /* For all glyph bounding boxes. */
-  SHORT                yMin;                   /* For all glyph bounding boxes. */
-  SHORT                xMax;                   /* For all glyph bounding boxes. */
-  SHORT                yMax;                   /* For all glyph bounding boxes. */
-  USHORT       macStyle;               /* Bit 0: Bold (if set to 1);
-                                        * Bit 1: Italic (if set to 1)
-                                        * Bit 2: Underline (if set to 1)
-                                        * Bit 3: Outline (if set to 1)
-                                        * Bit 4: Shadow (if set to 1)
-                                        * Bit 5: Condensed (if set to 1)
-                                        * Bit 6: Extended (if set to 1)
-                                        * Bits 7-15: Reserved (set to 0). */
-  USHORT       lowestRecPPEM;          /* Smallest readable size in pixels. */
-  SHORT                fontDirectionHint;      /* Deprecated (Set to 2).
-                                        * 0: Fully mixed directional glyphs;
-                                        * 1: Only strongly left to right;
-                                        * 2: Like 1 but also contains neutrals;
-                                        * -1: Only strongly right to left;
-                                        * -2: Like -1 but also contains neutrals. */
-  SHORT                indexToLocFormat;       /* 0 for short offsets, 1 for long. */
-  SHORT                glyphDataFormat;        /* 0 for current format. */
-  public:
-  DEFINE_SIZE_STATIC (54);
-};
-
-
-
-#endif /* HB_OT_HEAD_TABLE_HH */
diff --git a/src/hb-ot-hhea-table.hh b/src/hb-ot-hhea-table.hh
deleted file mode 100644 (file)
index 2eea05a..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright © 2011,2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_OT_HHEA_TABLE_HH
-#define HB_OT_HHEA_TABLE_HH
-
-#include "hb-open-type-private.hh"
-
-
-
-/*
- * hhea -- The Horizontal Header Table
- */
-
-#define HB_OT_TAG_hhea HB_TAG('h','h','e','a')
-
-
-struct hhea
-{
-  static const hb_tag_t Tag    = HB_OT_TAG_hhea;
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (c->check_struct (this) && likely (version.major == 1));
-  }
-
-  private:
-  FixedVersion version;                /* 0x00010000 for version 1.0. */
-  FWORD                ascender;               /* Typographic ascent. <a
-                                        * href="http://developer.apple.com/fonts/TTRefMan/RM06/Chap6hhea.html">
-                                        * (Distance from baseline of highest
-                                        * ascender)</a> */
-  FWORD                descender;              /* Typographic descent. <a
-                                        * href="http://developer.apple.com/fonts/TTRefMan/RM06/Chap6hhea.html">
-                                        * (Distance from baseline of lowest
-                                        * descender)</a> */
-  FWORD                lineGap;                /* Typographic line gap. Negative
-                                        * LineGap values are treated as zero
-                                        * in Windows 3.1, System 6, and
-                                        * System 7. */
-  UFWORD       advanceWidthMax;        /* Maximum advance width value in
-                                        * 'hmtx' table. */
-  FWORD                minLeftSideBearing;     /* Minimum left sidebearing value in
-                                        * 'hmtx' table. */
-  FWORD                minRightSideBearing;    /* Minimum right sidebearing value;
-                                        * calculated as Min(aw - lsb -
-                                        * (xMax - xMin)). */
-  FWORD                xMaxExtent;             /* Max(lsb + (xMax - xMin)). */
-  SHORT                caretSlopeRise;         /* Used to calculate the slope of the
-                                        * cursor (rise/run); 1 for vertical. */
-  SHORT                caretSlopeRun;          /* 0 for vertical. */
-  SHORT                caretOffset;            /* The amount by which a slanted
-                                        * highlight on a glyph needs
-                                        * to be shifted to produce the
-                                        * best appearance. Set to 0 for
-                                        * non--slanted fonts */
-  SHORT                reserved1;              /* set to 0 */
-  SHORT                reserved2;              /* set to 0 */
-  SHORT                reserved3;              /* set to 0 */
-  SHORT                reserved4;              /* set to 0 */
-  SHORT                metricDataFormat;       /* 0 for current format. */
-  USHORT       numberOfHMetrics;       /* Number of hMetric entries in 'hmtx'
-                                        * table */
-  public:
-  DEFINE_SIZE_STATIC (36);
-};
-
-
-#endif /* HB_OT_HHEA_TABLE_HH */
diff --git a/src/hb-ot-hmtx-table.hh b/src/hb-ot-hmtx-table.hh
deleted file mode 100644 (file)
index 35cfb48..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright © 2011,2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_OT_HMTX_TABLE_HH
-#define HB_OT_HMTX_TABLE_HH
-
-#include "hb-open-type-private.hh"
-
-
-
-/*
- * hmtx -- The Horizontal Metrics Table
- */
-
-#define HB_OT_TAG_hmtx HB_TAG('h','m','t','x')
-
-
-struct LongHorMetric
-{
-  USHORT       advanceWidth;
-  SHORT                lsb;
-  public:
-  DEFINE_SIZE_STATIC (4);
-};
-
-struct hmtx
-{
-  static const hb_tag_t Tag    = HB_OT_TAG_hmtx;
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    /* We don't check for anything specific here.  The users of the
-     * struct do all the hard work... */
-    return TRACE_RETURN (true);
-  }
-
-  private:
-  LongHorMetric        longHorMetric[VAR];     /* Paired advance width and left side
-                                        * bearing values for each glyph. The
-                                        * value numOfHMetrics comes from
-                                        * the 'hhea' table. If the font is
-                                        * monospaced, only one entry need
-                                        * be in the array, but that entry is
-                                        * required. The last entry applies to
-                                        * all subsequent glyphs. */
-  SHORT                leftSideBearingX[VAR];  /* Here the advanceWidth is assumed
-                                        * to be the same as the advanceWidth
-                                        * for the last entry above. The
-                                        * number of entries in this array is
-                                        * derived from numGlyphs (from 'maxp'
-                                        * table) minus numberOfHMetrics. This
-                                        * generally is used with a run of
-                                        * monospaced glyphs (e.g., Kanji
-                                        * fonts or Courier fonts). Only one
-                                        * run is allowed and it must be at
-                                        * the end. This allows a monospaced
-                                        * font to vary the left side bearing
-                                        * values for each glyph. */
-  public:
-  DEFINE_SIZE_ARRAY2 (0, longHorMetric, leftSideBearingX);
-};
-
-#endif /* HB_OT_HMTX_TABLE_HH */
diff --git a/src/hb-ot-layout-common-private.hh b/src/hb-ot-layout-common-private.hh
deleted file mode 100644 (file)
index 2943a7f..0000000
+++ /dev/null
@@ -1,738 +0,0 @@
-/*
- * Copyright © 2007,2008,2009  Red Hat, Inc.
- * Copyright © 2010,2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Behdad Esfahbod
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_OT_LAYOUT_COMMON_PRIVATE_HH
-#define HB_OT_LAYOUT_COMMON_PRIVATE_HH
-
-#include "hb-ot-layout-private.hh"
-#include "hb-open-type-private.hh"
-#include "hb-set-private.hh"
-
-
-#define NOT_COVERED            ((unsigned int) 0x110000)
-#define MAX_NESTING_LEVEL      8
-
-
-
-/*
- *
- * OpenType Layout Common Table Formats
- *
- */
-
-
-/*
- * Script, ScriptList, LangSys, Feature, FeatureList, Lookup, LookupList
- */
-
-template <typename Type>
-struct Record
-{
-  inline int cmp (hb_tag_t a) const {
-    return tag.cmp (a);
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c, void *base) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (c->check_struct (this) && offset.sanitize (c, base));
-  }
-
-  Tag          tag;            /* 4-byte Tag identifier */
-  OffsetTo<Type>
-               offset;         /* Offset from beginning of object holding
-                                * the Record */
-  public:
-  DEFINE_SIZE_STATIC (6);
-};
-
-template <typename Type>
-struct RecordArrayOf : SortedArrayOf<Record<Type> > {
-  inline const Tag& get_tag (unsigned int i) const
-  {
-    /* We cheat slightly and don't define separate Null objects
-     * for Record types.  Instead, we return the correct Null(Tag)
-     * here. */
-    if (unlikely (i >= this->len)) return Null(Tag);
-    return (*this)[i].tag;
-  }
-  inline unsigned int get_tags (unsigned int start_offset,
-                               unsigned int *record_count /* IN/OUT */,
-                               hb_tag_t     *record_tags /* OUT */) const
-  {
-    if (record_count) {
-      const Record<Type> *arr = this->sub_array (start_offset, record_count);
-      unsigned int count = *record_count;
-      for (unsigned int i = 0; i < count; i++)
-       record_tags[i] = arr[i].tag;
-    }
-    return this->len;
-  }
-  inline bool find_index (hb_tag_t tag, unsigned int *index) const
-  {
-    int i = this->search (tag);
-    if (i != -1) {
-        if (index) *index = i;
-        return true;
-    } else {
-      if (index) *index = Index::NOT_FOUND_INDEX;
-      return false;
-    }
-  }
-};
-
-template <typename Type>
-struct RecordListOf : RecordArrayOf<Type>
-{
-  inline const Type& operator [] (unsigned int i) const
-  { return this+RecordArrayOf<Type>::operator [](i).offset; }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (RecordArrayOf<Type>::sanitize (c, this));
-  }
-};
-
-
-struct RangeRecord
-{
-  inline int cmp (hb_codepoint_t g) const {
-    hb_codepoint_t a = start, b = end;
-    return g < a ? -1 : g <= b ? 0 : +1 ;
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (c->check_struct (this));
-  }
-
-  inline bool intersects (const hb_set_t *glyphs) const {
-    return glyphs->intersects (start, end);
-  }
-
-  GlyphID      start;          /* First GlyphID in the range */
-  GlyphID      end;            /* Last GlyphID in the range */
-  USHORT       value;          /* Value */
-  public:
-  DEFINE_SIZE_STATIC (6);
-};
-DEFINE_NULL_DATA (RangeRecord, "\000\001");
-
-
-struct IndexArray : ArrayOf<Index>
-{
-  inline unsigned int get_indexes (unsigned int start_offset,
-                                  unsigned int *_count /* IN/OUT */,
-                                  unsigned int *_indexes /* OUT */) const
-  {
-    if (_count) {
-      const USHORT *arr = this->sub_array (start_offset, _count);
-      unsigned int count = *_count;
-      for (unsigned int i = 0; i < count; i++)
-       _indexes[i] = arr[i];
-    }
-    return this->len;
-  }
-};
-
-
-struct Script;
-struct LangSys;
-struct Feature;
-
-
-struct LangSys
-{
-  inline unsigned int get_feature_count (void) const
-  { return featureIndex.len; }
-  inline hb_tag_t get_feature_index (unsigned int i) const
-  { return featureIndex[i]; }
-  inline unsigned int get_feature_indexes (unsigned int start_offset,
-                                          unsigned int *feature_count /* IN/OUT */,
-                                          unsigned int *feature_indexes /* OUT */) const
-  { return featureIndex.get_indexes (start_offset, feature_count, feature_indexes); }
-
-  inline bool has_required_feature (void) const { return reqFeatureIndex != 0xffff; }
-  inline unsigned int get_required_feature_index (void) const
-  {
-    if (reqFeatureIndex == 0xffff)
-      return Index::NOT_FOUND_INDEX;
-   return reqFeatureIndex;;
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (c->check_struct (this) && featureIndex.sanitize (c));
-  }
-
-  Offset       lookupOrder;    /* = Null (reserved for an offset to a
-                                * reordering table) */
-  USHORT       reqFeatureIndex;/* Index of a feature required for this
-                                * language system--if no required features
-                                * = 0xFFFF */
-  IndexArray   featureIndex;   /* Array of indices into the FeatureList */
-  public:
-  DEFINE_SIZE_ARRAY (6, featureIndex);
-};
-DEFINE_NULL_DATA (LangSys, "\0\0\xFF\xFF");
-
-
-struct Script
-{
-  inline unsigned int get_lang_sys_count (void) const
-  { return langSys.len; }
-  inline const Tag& get_lang_sys_tag (unsigned int i) const
-  { return langSys.get_tag (i); }
-  inline unsigned int get_lang_sys_tags (unsigned int start_offset,
-                                        unsigned int *lang_sys_count /* IN/OUT */,
-                                        hb_tag_t     *lang_sys_tags /* OUT */) const
-  { return langSys.get_tags (start_offset, lang_sys_count, lang_sys_tags); }
-  inline const LangSys& get_lang_sys (unsigned int i) const
-  {
-    if (i == Index::NOT_FOUND_INDEX) return get_default_lang_sys ();
-    return this+langSys[i].offset;
-  }
-  inline bool find_lang_sys_index (hb_tag_t tag, unsigned int *index) const
-  { return langSys.find_index (tag, index); }
-
-  inline bool has_default_lang_sys (void) const { return defaultLangSys != 0; }
-  inline const LangSys& get_default_lang_sys (void) const { return this+defaultLangSys; }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (defaultLangSys.sanitize (c, this) && langSys.sanitize (c, this));
-  }
-
-  private:
-  OffsetTo<LangSys>
-               defaultLangSys; /* Offset to DefaultLangSys table--from
-                                * beginning of Script table--may be Null */
-  RecordArrayOf<LangSys>
-               langSys;        /* Array of LangSysRecords--listed
-                                * alphabetically by LangSysTag */
-  public:
-  DEFINE_SIZE_ARRAY (4, langSys);
-};
-
-typedef RecordListOf<Script> ScriptList;
-
-
-struct Feature
-{
-  inline unsigned int get_lookup_count (void) const
-  { return lookupIndex.len; }
-  inline hb_tag_t get_lookup_index (unsigned int i) const
-  { return lookupIndex[i]; }
-  inline unsigned int get_lookup_indexes (unsigned int start_index,
-                                         unsigned int *lookup_count /* IN/OUT */,
-                                         unsigned int *lookup_tags /* OUT */) const
-  { return lookupIndex.get_indexes (start_index, lookup_count, lookup_tags); }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (c->check_struct (this) && lookupIndex.sanitize (c));
-  }
-
-  Offset       featureParams;  /* Offset to Feature Parameters table (if one
-                                * has been defined for the feature), relative
-                                * to the beginning of the Feature Table; = Null
-                                * if not required */
-  IndexArray    lookupIndex;   /* Array of LookupList indices */
-  public:
-  DEFINE_SIZE_ARRAY (4, lookupIndex);
-};
-
-typedef RecordListOf<Feature> FeatureList;
-
-
-struct LookupFlag : USHORT
-{
-  enum Flags {
-    RightToLeft                = 0x0001u,
-    IgnoreBaseGlyphs   = 0x0002u,
-    IgnoreLigatures    = 0x0004u,
-    IgnoreMarks                = 0x0008u,
-    IgnoreFlags                = 0x000Eu,
-    UseMarkFilteringSet        = 0x0010u,
-    Reserved           = 0x00E0u,
-    MarkAttachmentType = 0xFF00u
-  };
-  public:
-  DEFINE_SIZE_STATIC (2);
-};
-
-struct Lookup
-{
-  inline unsigned int get_subtable_count (void) const { return subTable.len; }
-
-  inline unsigned int get_type (void) const { return lookupType; }
-
-  /* lookup_props is a 32-bit integer where the lower 16-bit is LookupFlag and
-   * higher 16-bit is mark-filtering-set if the lookup uses one.
-   * Not to be confused with glyph_props which is very similar. */
-  inline uint32_t get_props (void) const
-  {
-    unsigned int flag = lookupFlag;
-    if (unlikely (flag & LookupFlag::UseMarkFilteringSet))
-    {
-      const USHORT &markFilteringSet = StructAfter<USHORT> (subTable);
-      flag += (markFilteringSet << 16);
-    }
-    return flag;
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    /* Real sanitize of the subtables is done by GSUB/GPOS/... */
-    if (!(c->check_struct (this) && subTable.sanitize (c))) return TRACE_RETURN (false);
-    if (unlikely (lookupFlag & LookupFlag::UseMarkFilteringSet))
-    {
-      USHORT &markFilteringSet = StructAfter<USHORT> (subTable);
-      if (!markFilteringSet.sanitize (c)) return TRACE_RETURN (false);
-    }
-    return TRACE_RETURN (true);
-  }
-
-  USHORT       lookupType;             /* Different enumerations for GSUB and GPOS */
-  USHORT       lookupFlag;             /* Lookup qualifiers */
-  ArrayOf<Offset>
-               subTable;               /* Array of SubTables */
-  USHORT       markFilteringSetX[VAR]; /* Index (base 0) into GDEF mark glyph sets
-                                        * structure. This field is only present if bit
-                                        * UseMarkFilteringSet of lookup flags is set. */
-  public:
-  DEFINE_SIZE_ARRAY2 (6, subTable, markFilteringSetX);
-};
-
-typedef OffsetListOf<Lookup> LookupList;
-
-
-/*
- * Coverage Table
- */
-
-struct CoverageFormat1
-{
-  friend struct Coverage;
-
-  private:
-  inline unsigned int get_coverage (hb_codepoint_t glyph_id) const
-  {
-    int i = glyphArray.search (glyph_id);
-    if (i != -1)
-        return i;
-    return NOT_COVERED;
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (glyphArray.sanitize (c));
-  }
-
-  inline bool intersects_coverage (const hb_set_t *glyphs, unsigned int index) const {
-    return glyphs->has (glyphArray[index]);
-  }
-
-  struct Iter {
-    inline void init (const struct CoverageFormat1 &c_) { c = &c_; i = 0; };
-    inline bool more (void) { return i < c->glyphArray.len; }
-    inline void next (void) { i++; }
-    inline uint16_t get_glyph (void) { return c->glyphArray[i]; }
-    inline uint16_t get_coverage (void) { return i; }
-
-    private:
-    const struct CoverageFormat1 *c;
-    unsigned int i;
-  };
-
-  private:
-  USHORT       coverageFormat; /* Format identifier--format = 1 */
-  SortedArrayOf<GlyphID>
-               glyphArray;     /* Array of GlyphIDs--in numerical order */
-  public:
-  DEFINE_SIZE_ARRAY (4, glyphArray);
-};
-
-struct CoverageFormat2
-{
-  friend struct Coverage;
-
-  private:
-  inline unsigned int get_coverage (hb_codepoint_t glyph_id) const
-  {
-    int i = rangeRecord.search (glyph_id);
-    if (i != -1) {
-      const RangeRecord &range = rangeRecord[i];
-      return (unsigned int) range.value + (glyph_id - range.start);
-    }
-    return NOT_COVERED;
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (rangeRecord.sanitize (c));
-  }
-
-  inline bool intersects_coverage (const hb_set_t *glyphs, unsigned int index) const {
-    unsigned int i;
-    unsigned int count = rangeRecord.len;
-    for (i = 0; i < count; i++) {
-      const RangeRecord &range = rangeRecord[i];
-      if (range.value <= index &&
-         index < (unsigned int) range.value + (range.end - range.start) &&
-         range.intersects (glyphs))
-        return true;
-      else if (index < range.value)
-        return false;
-    }
-    return false;
-  }
-
-  struct Iter {
-    inline void init (const CoverageFormat2 &c_) {
-      c = &c_;
-      coverage = 0;
-      i = 0;
-      j = c->rangeRecord.len ? c_.rangeRecord[0].start : 0;
-    }
-    inline bool more (void) { return i < c->rangeRecord.len; }
-    inline void next (void) {
-      coverage++;
-      if (j == c->rangeRecord[i].end) {
-        i++;
-       if (more ())
-         j = c->rangeRecord[i].start;
-       return;
-      }
-      j++;
-    }
-    inline uint16_t get_glyph (void) { return j; }
-    inline uint16_t get_coverage (void) { return coverage; }
-
-    private:
-    const struct CoverageFormat2 *c;
-    unsigned int i, j, coverage;
-  };
-
-  private:
-  USHORT       coverageFormat; /* Format identifier--format = 2 */
-  SortedArrayOf<RangeRecord>
-               rangeRecord;    /* Array of glyph ranges--ordered by
-                                * Start GlyphID. rangeCount entries
-                                * long */
-  public:
-  DEFINE_SIZE_ARRAY (4, rangeRecord);
-};
-
-struct Coverage
-{
-  inline unsigned int operator () (hb_codepoint_t glyph_id) const { return get_coverage (glyph_id); }
-
-  inline unsigned int get_coverage (hb_codepoint_t glyph_id) const
-  {
-    switch (u.format) {
-    case 1: return u.format1.get_coverage(glyph_id);
-    case 2: return u.format2.get_coverage(glyph_id);
-    default:return NOT_COVERED;
-    }
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    if (!u.format.sanitize (c)) return TRACE_RETURN (false);
-    switch (u.format) {
-    case 1: return TRACE_RETURN (u.format1.sanitize (c));
-    case 2: return TRACE_RETURN (u.format2.sanitize (c));
-    default:return TRACE_RETURN (true);
-    }
-  }
-
-  inline bool intersects (const hb_set_t *glyphs) const {
-    /* TODO speed this up */
-    Coverage::Iter iter;
-    for (iter.init (*this); iter.more (); iter.next ()) {
-      if (glyphs->has (iter.get_glyph ()))
-        return true;
-    }
-    return false;
-  }
-
-  inline bool intersects_coverage (const hb_set_t *glyphs, unsigned int index) const {
-    switch (u.format) {
-    case 1: return u.format1.intersects_coverage (glyphs, index);
-    case 2: return u.format2.intersects_coverage (glyphs, index);
-    default:return false;
-    }
-  }
-
-  struct Iter {
-    Iter (void) : format (0) {};
-    inline void init (const Coverage &c_) {
-      format = c_.u.format;
-      switch (format) {
-      case 1: return u.format1.init (c_.u.format1);
-      case 2: return u.format2.init (c_.u.format2);
-      default:return;
-      }
-    }
-    inline bool more (void) {
-      switch (format) {
-      case 1: return u.format1.more ();
-      case 2: return u.format2.more ();
-      default:return true;
-      }
-    }
-    inline void next (void) {
-      switch (format) {
-      case 1: u.format1.next (); break;
-      case 2: u.format2.next (); break;
-      default:                   break;
-      }
-    }
-    inline uint16_t get_glyph (void) {
-      switch (format) {
-      case 1: return u.format1.get_glyph ();
-      case 2: return u.format2.get_glyph ();
-      default:return true;
-      }
-    }
-    inline uint16_t get_coverage (void) {
-      switch (format) {
-      case 1: return u.format1.get_coverage ();
-      case 2: return u.format2.get_coverage ();
-      default:return true;
-      }
-    }
-
-    private:
-    unsigned int format;
-    union {
-    CoverageFormat1::Iter      format1;
-    CoverageFormat2::Iter      format2;
-    } u;
-  };
-
-  private:
-  union {
-  USHORT               format;         /* Format identifier */
-  CoverageFormat1      format1;
-  CoverageFormat2      format2;
-  } u;
-  public:
-  DEFINE_SIZE_UNION (2, format);
-};
-
-
-/*
- * Class Definition Table
- */
-
-struct ClassDefFormat1
-{
-  friend struct ClassDef;
-
-  private:
-  inline unsigned int get_class (hb_codepoint_t glyph_id) const
-  {
-    if ((unsigned int) (glyph_id - startGlyph) < classValue.len)
-      return classValue[glyph_id - startGlyph];
-    return 0;
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (c->check_struct (this) && classValue.sanitize (c));
-  }
-
-  inline bool intersects_class (const hb_set_t *glyphs, unsigned int klass) const {
-    unsigned int count = classValue.len;
-    for (unsigned int i = 0; i < count; i++)
-      if (classValue[i] == klass && glyphs->has (startGlyph + i))
-        return true;
-    return false;
-  }
-
-  USHORT       classFormat;            /* Format identifier--format = 1 */
-  GlyphID      startGlyph;             /* First GlyphID of the classValueArray */
-  ArrayOf<USHORT>
-               classValue;             /* Array of Class Values--one per GlyphID */
-  public:
-  DEFINE_SIZE_ARRAY (6, classValue);
-};
-
-struct ClassDefFormat2
-{
-  friend struct ClassDef;
-
-  private:
-  inline unsigned int get_class (hb_codepoint_t glyph_id) const
-  {
-    int i = rangeRecord.search (glyph_id);
-    if (i != -1)
-      return rangeRecord[i].value;
-    return 0;
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (rangeRecord.sanitize (c));
-  }
-
-  inline bool intersects_class (const hb_set_t *glyphs, unsigned int klass) const {
-    unsigned int count = rangeRecord.len;
-    for (unsigned int i = 0; i < count; i++)
-      if (rangeRecord[i].value == klass && rangeRecord[i].intersects (glyphs))
-        return true;
-    return false;
-  }
-
-  USHORT       classFormat;    /* Format identifier--format = 2 */
-  SortedArrayOf<RangeRecord>
-               rangeRecord;    /* Array of glyph ranges--ordered by
-                                * Start GlyphID */
-  public:
-  DEFINE_SIZE_ARRAY (4, rangeRecord);
-};
-
-struct ClassDef
-{
-  inline unsigned int operator () (hb_codepoint_t glyph_id) const { return get_class (glyph_id); }
-
-  inline unsigned int get_class (hb_codepoint_t glyph_id) const
-  {
-    switch (u.format) {
-    case 1: return u.format1.get_class(glyph_id);
-    case 2: return u.format2.get_class(glyph_id);
-    default:return 0;
-    }
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    if (!u.format.sanitize (c)) return TRACE_RETURN (false);
-    switch (u.format) {
-    case 1: return TRACE_RETURN (u.format1.sanitize (c));
-    case 2: return TRACE_RETURN (u.format2.sanitize (c));
-    default:return TRACE_RETURN (true);
-    }
-  }
-
-  inline bool intersects_class (const hb_set_t *glyphs, unsigned int klass) const {
-    switch (u.format) {
-    case 1: return u.format1.intersects_class (glyphs, klass);
-    case 2: return u.format2.intersects_class (glyphs, klass);
-    default:return false;
-    }
-  }
-
-  private:
-  union {
-  USHORT               format;         /* Format identifier */
-  ClassDefFormat1      format1;
-  ClassDefFormat2      format2;
-  } u;
-  public:
-  DEFINE_SIZE_UNION (2, format);
-};
-
-
-/*
- * Device Tables
- */
-
-struct Device
-{
-
-  inline hb_position_t get_x_delta (hb_font_t *font) const
-  { return get_delta (font->x_ppem, font->x_scale); }
-
-  inline hb_position_t get_y_delta (hb_font_t *font) const
-  { return get_delta (font->y_ppem, font->y_scale); }
-
-  inline int get_delta (unsigned int ppem, int scale) const
-  {
-    if (!ppem) return 0;
-
-    int pixels = get_delta_pixels (ppem);
-
-    if (!pixels) return 0;
-
-    return pixels * (int64_t) scale / ppem;
-  }
-
-
-  inline int get_delta_pixels (unsigned int ppem_size) const
-  {
-    unsigned int f = deltaFormat;
-    if (unlikely (f < 1 || f > 3))
-      return 0;
-
-    if (ppem_size < startSize || ppem_size > endSize)
-      return 0;
-
-    unsigned int s = ppem_size - startSize;
-
-    unsigned int byte = deltaValue[s >> (4 - f)];
-    unsigned int bits = (byte >> (16 - (((s & ((1 << (4 - f)) - 1)) + 1) << f)));
-    unsigned int mask = (0xFFFF >> (16 - (1 << f)));
-
-    int delta = bits & mask;
-
-    if ((unsigned int) delta >= ((mask + 1) >> 1))
-      delta -= mask + 1;
-
-    return delta;
-  }
-
-  inline unsigned int get_size (void) const
-  {
-    unsigned int f = deltaFormat;
-    if (unlikely (f < 1 || f > 3 || startSize > endSize)) return 3 * USHORT::static_size;
-    return USHORT::static_size * (4 + ((endSize - startSize) >> (4 - f)));
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (c->check_struct (this) && c->check_range (this, this->get_size ()));
-  }
-
-  private:
-  USHORT       startSize;              /* Smallest size to correct--in ppem */
-  USHORT       endSize;                /* Largest size to correct--in ppem */
-  USHORT       deltaFormat;            /* Format of DeltaValue array data: 1, 2, or 3
-                                        * 1    Signed 2-bit value, 8 values per uint16
-                                        * 2    Signed 4-bit value, 4 values per uint16
-                                        * 3    Signed 8-bit value, 2 values per uint16
-                                        */
-  USHORT       deltaValue[VAR];        /* Array of compressed data */
-  public:
-  DEFINE_SIZE_ARRAY (6, deltaValue);
-};
-
-
-
-#endif /* HB_OT_LAYOUT_COMMON_PRIVATE_HH */
diff --git a/src/hb-ot-layout-gdef-table.hh b/src/hb-ot-layout-gdef-table.hh
deleted file mode 100644 (file)
index f29fc14..0000000
+++ /dev/null
@@ -1,425 +0,0 @@
-/*
- * Copyright © 2007,2008,2009  Red Hat, Inc.
- * Copyright © 2010,2011,2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Behdad Esfahbod
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_OT_LAYOUT_GDEF_TABLE_HH
-#define HB_OT_LAYOUT_GDEF_TABLE_HH
-
-#include "hb-ot-layout-common-private.hh"
-
-#include "hb-font-private.hh"
-
-
-
-/*
- * Attachment List Table
- */
-
-typedef ArrayOf<USHORT> AttachPoint;   /* Array of contour point indices--in
-                                        * increasing numerical order */
-
-struct AttachList
-{
-  inline unsigned int get_attach_points (hb_codepoint_t glyph_id,
-                                        unsigned int start_offset,
-                                        unsigned int *point_count /* IN/OUT */,
-                                        unsigned int *point_array /* OUT */) const
-  {
-    unsigned int index = (this+coverage) (glyph_id);
-    if (index == NOT_COVERED)
-    {
-      if (point_count)
-       *point_count = 0;
-      return 0;
-    }
-
-    const AttachPoint &points = this+attachPoint[index];
-
-    if (point_count) {
-      const USHORT *array = points.sub_array (start_offset, point_count);
-      unsigned int count = *point_count;
-      for (unsigned int i = 0; i < count; i++)
-       point_array[i] = array[i];
-    }
-
-    return points.len;
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (coverage.sanitize (c, this) && attachPoint.sanitize (c, this));
-  }
-
-  private:
-  OffsetTo<Coverage>
-               coverage;               /* Offset to Coverage table -- from
-                                        * beginning of AttachList table */
-  OffsetArrayOf<AttachPoint>
-               attachPoint;            /* Array of AttachPoint tables
-                                        * in Coverage Index order */
-  public:
-  DEFINE_SIZE_ARRAY (4, attachPoint);
-};
-
-/*
- * Ligature Caret Table
- */
-
-struct CaretValueFormat1
-{
-  friend struct CaretValue;
-
-  private:
-  inline hb_position_t get_caret_value (hb_font_t *font, hb_direction_t direction, hb_codepoint_t glyph_id HB_UNUSED) const
-  {
-    return HB_DIRECTION_IS_HORIZONTAL (direction) ? font->em_scale_x (coordinate) : font->em_scale_y (coordinate);
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (c->check_struct (this));
-  }
-
-  private:
-  USHORT       caretValueFormat;       /* Format identifier--format = 1 */
-  SHORT                coordinate;             /* X or Y value, in design units */
-  public:
-  DEFINE_SIZE_STATIC (4);
-};
-
-struct CaretValueFormat2
-{
-  friend struct CaretValue;
-
-  private:
-  inline hb_position_t get_caret_value (hb_font_t *font, hb_direction_t direction, hb_codepoint_t glyph_id) const
-  {
-    hb_position_t x, y;
-    if (hb_font_get_glyph_contour_point_for_origin (font, glyph_id, caretValuePoint, direction, &x, &y))
-      return HB_DIRECTION_IS_HORIZONTAL (direction) ? x : y;
-    else
-      return 0;
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (c->check_struct (this));
-  }
-
-  private:
-  USHORT       caretValueFormat;       /* Format identifier--format = 2 */
-  USHORT       caretValuePoint;        /* Contour point index on glyph */
-  public:
-  DEFINE_SIZE_STATIC (4);
-};
-
-struct CaretValueFormat3
-{
-  friend struct CaretValue;
-
-  inline hb_position_t get_caret_value (hb_font_t *font, hb_direction_t direction, hb_codepoint_t glyph_id HB_UNUSED) const
-  {
-    return HB_DIRECTION_IS_HORIZONTAL (direction) ?
-           font->em_scale_x (coordinate) + (this+deviceTable).get_x_delta (font) :
-           font->em_scale_y (coordinate) + (this+deviceTable).get_y_delta (font);
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (c->check_struct (this) && deviceTable.sanitize (c, this));
-  }
-
-  private:
-  USHORT       caretValueFormat;       /* Format identifier--format = 3 */
-  SHORT                coordinate;             /* X or Y value, in design units */
-  OffsetTo<Device>
-               deviceTable;            /* Offset to Device table for X or Y
-                                        * value--from beginning of CaretValue
-                                        * table */
-  public:
-  DEFINE_SIZE_STATIC (6);
-};
-
-struct CaretValue
-{
-  inline hb_position_t get_caret_value (hb_font_t *font, hb_direction_t direction, hb_codepoint_t glyph_id) const
-  {
-    switch (u.format) {
-    case 1: return u.format1.get_caret_value (font, direction, glyph_id);
-    case 2: return u.format2.get_caret_value (font, direction, glyph_id);
-    case 3: return u.format3.get_caret_value (font, direction, glyph_id);
-    default:return 0;
-    }
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    if (!u.format.sanitize (c)) return TRACE_RETURN (false);
-    switch (u.format) {
-    case 1: return TRACE_RETURN (u.format1.sanitize (c));
-    case 2: return TRACE_RETURN (u.format2.sanitize (c));
-    case 3: return TRACE_RETURN (u.format3.sanitize (c));
-    default:return TRACE_RETURN (true);
-    }
-  }
-
-  private:
-  union {
-  USHORT               format;         /* Format identifier */
-  CaretValueFormat1    format1;
-  CaretValueFormat2    format2;
-  CaretValueFormat3    format3;
-  } u;
-  public:
-  DEFINE_SIZE_UNION (2, format);
-};
-
-struct LigGlyph
-{
-  inline unsigned int get_lig_carets (hb_font_t *font,
-                                     hb_direction_t direction,
-                                     hb_codepoint_t glyph_id,
-                                     unsigned int start_offset,
-                                     unsigned int *caret_count /* IN/OUT */,
-                                     hb_position_t *caret_array /* OUT */) const
-  {
-    if (caret_count) {
-      const OffsetTo<CaretValue> *array = carets.sub_array (start_offset, caret_count);
-      unsigned int count = *caret_count;
-      for (unsigned int i = 0; i < count; i++)
-       caret_array[i] = (this+array[i]).get_caret_value (font, direction, glyph_id);
-    }
-
-    return carets.len;
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (carets.sanitize (c, this));
-  }
-
-  private:
-  OffsetArrayOf<CaretValue>
-               carets;                 /* Offset array of CaretValue tables
-                                        * --from beginning of LigGlyph table
-                                        * --in increasing coordinate order */
-  public:
-  DEFINE_SIZE_ARRAY (2, carets);
-};
-
-struct LigCaretList
-{
-  inline unsigned int get_lig_carets (hb_font_t *font,
-                                     hb_direction_t direction,
-                                     hb_codepoint_t glyph_id,
-                                     unsigned int start_offset,
-                                     unsigned int *caret_count /* IN/OUT */,
-                                     hb_position_t *caret_array /* OUT */) const
-  {
-    unsigned int index = (this+coverage) (glyph_id);
-    if (index == NOT_COVERED)
-    {
-      if (caret_count)
-       *caret_count = 0;
-      return 0;
-    }
-    const LigGlyph &lig_glyph = this+ligGlyph[index];
-    return lig_glyph.get_lig_carets (font, direction, glyph_id, start_offset, caret_count, caret_array);
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (coverage.sanitize (c, this) && ligGlyph.sanitize (c, this));
-  }
-
-  private:
-  OffsetTo<Coverage>
-               coverage;               /* Offset to Coverage table--from
-                                        * beginning of LigCaretList table */
-  OffsetArrayOf<LigGlyph>
-               ligGlyph;               /* Array of LigGlyph tables
-                                        * in Coverage Index order */
-  public:
-  DEFINE_SIZE_ARRAY (4, ligGlyph);
-};
-
-
-struct MarkGlyphSetsFormat1
-{
-  inline bool covers (unsigned int set_index, hb_codepoint_t glyph_id) const
-  { return (this+coverage[set_index]).get_coverage (glyph_id) != NOT_COVERED; }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (coverage.sanitize (c, this));
-  }
-
-  private:
-  USHORT       format;                 /* Format identifier--format = 1 */
-  LongOffsetArrayOf<Coverage>
-               coverage;               /* Array of long offsets to mark set
-                                        * coverage tables */
-  public:
-  DEFINE_SIZE_ARRAY (4, coverage);
-};
-
-struct MarkGlyphSets
-{
-  inline bool covers (unsigned int set_index, hb_codepoint_t glyph_id) const
-  {
-    switch (u.format) {
-    case 1: return u.format1.covers (set_index, glyph_id);
-    default:return false;
-    }
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    if (!u.format.sanitize (c)) return TRACE_RETURN (false);
-    switch (u.format) {
-    case 1: return TRACE_RETURN (u.format1.sanitize (c));
-    default:return TRACE_RETURN (true);
-    }
-  }
-
-  private:
-  union {
-  USHORT               format;         /* Format identifier */
-  MarkGlyphSetsFormat1 format1;
-  } u;
-  public:
-  DEFINE_SIZE_UNION (2, format);
-};
-
-
-/*
- * GDEF -- The Glyph Definition Table
- */
-
-struct GDEF
-{
-  static const hb_tag_t Tag    = HB_OT_TAG_GDEF;
-
-  enum GlyphClasses {
-    UnclassifiedGlyph  = 0,
-    BaseGlyph          = 1,
-    LigatureGlyph      = 2,
-    MarkGlyph          = 3,
-    ComponentGlyph     = 4
-  };
-
-  inline bool has_glyph_classes (void) const { return glyphClassDef != 0; }
-  inline unsigned int get_glyph_class (hb_codepoint_t glyph) const
-  { return (this+glyphClassDef).get_class (glyph); }
-
-  inline bool has_mark_attachment_types (void) const { return markAttachClassDef != 0; }
-  inline unsigned int get_mark_attachment_type (hb_codepoint_t glyph) const
-  { return (this+markAttachClassDef).get_class (glyph); }
-
-  inline bool has_attach_points (void) const { return attachList != 0; }
-  inline unsigned int get_attach_points (hb_codepoint_t glyph_id,
-                                        unsigned int start_offset,
-                                        unsigned int *point_count /* IN/OUT */,
-                                        unsigned int *point_array /* OUT */) const
-  { return (this+attachList).get_attach_points (glyph_id, start_offset, point_count, point_array); }
-
-  inline bool has_lig_carets (void) const { return ligCaretList != 0; }
-  inline unsigned int get_lig_carets (hb_font_t *font,
-                                     hb_direction_t direction,
-                                     hb_codepoint_t glyph_id,
-                                     unsigned int start_offset,
-                                     unsigned int *caret_count /* IN/OUT */,
-                                     hb_position_t *caret_array /* OUT */) const
-  { return (this+ligCaretList).get_lig_carets (font, direction, glyph_id, start_offset, caret_count, caret_array); }
-
-  inline bool has_mark_sets (void) const { return version.to_int () >= 0x00010002 && markGlyphSetsDef[0] != 0; }
-  inline bool mark_set_covers (unsigned int set_index, hb_codepoint_t glyph_id) const
-  { return version.to_int () >= 0x00010002 && (this+markGlyphSetsDef[0]).covers (set_index, glyph_id); }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (version.sanitize (c) &&
-                        likely (version.major == 1) &&
-                        glyphClassDef.sanitize (c, this) &&
-                        attachList.sanitize (c, this) &&
-                        ligCaretList.sanitize (c, this) &&
-                        markAttachClassDef.sanitize (c, this) &&
-                        (version.to_int () < 0x00010002 || markGlyphSetsDef[0].sanitize (c, this)));
-  }
-
-
-  /* glyph_props is a 16-bit integer where the lower 8-bit have bits representing
-   * glyph class and other bits, and high 8-bit gthe mark attachment type (if any).
-   * Not to be confused with lookup_props which is very similar. */
-  inline unsigned int get_glyph_props (hb_codepoint_t glyph) const
-  {
-    unsigned int klass = get_glyph_class (glyph);
-
-    switch (klass) {
-    default:
-    case UnclassifiedGlyph:    return HB_OT_LAYOUT_GLYPH_CLASS_UNCLASSIFIED;
-    case BaseGlyph:            return HB_OT_LAYOUT_GLYPH_CLASS_BASE_GLYPH;
-    case LigatureGlyph:                return HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE;
-    case ComponentGlyph:       return HB_OT_LAYOUT_GLYPH_CLASS_COMPONENT;
-    case MarkGlyph:
-         klass = get_mark_attachment_type (glyph);
-         return HB_OT_LAYOUT_GLYPH_CLASS_MARK | (klass << 8);
-    }
-  }
-
-
-  private:
-  FixedVersion version;                /* Version of the GDEF table--currently
-                                        * 0x00010002 */
-  OffsetTo<ClassDef>
-               glyphClassDef;          /* Offset to class definition table
-                                        * for glyph type--from beginning of
-                                        * GDEF header (may be Null) */
-  OffsetTo<AttachList>
-               attachList;             /* Offset to list of glyphs with
-                                        * attachment points--from beginning
-                                        * of GDEF header (may be Null) */
-  OffsetTo<LigCaretList>
-               ligCaretList;           /* Offset to list of positioning points
-                                        * for ligature carets--from beginning
-                                        * of GDEF header (may be Null) */
-  OffsetTo<ClassDef>
-               markAttachClassDef;     /* Offset to class definition table for
-                                        * mark attachment type--from beginning
-                                        * of GDEF header (may be Null) */
-  OffsetTo<MarkGlyphSets>
-               markGlyphSetsDef[VAR];  /* Offset to the table of mark set
-                                        * definitions--from beginning of GDEF
-                                        * header (may be NULL).  Introduced
-                                        * in version 00010002. */
-  public:
-  DEFINE_SIZE_ARRAY (12, markGlyphSetsDef);
-};
-
-
-
-#endif /* HB_OT_LAYOUT_GDEF_TABLE_HH */
diff --git a/src/hb-ot-layout-gpos-table.hh b/src/hb-ot-layout-gpos-table.hh
deleted file mode 100644 (file)
index 71c13a2..0000000
+++ /dev/null
@@ -1,1547 +0,0 @@
-/*
- * Copyright © 2007,2008,2009,2010  Red Hat, Inc.
- * Copyright © 2010,2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Behdad Esfahbod
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_OT_LAYOUT_GPOS_TABLE_HH
-#define HB_OT_LAYOUT_GPOS_TABLE_HH
-
-#include "hb-ot-layout-gsubgpos-private.hh"
-
-
-
-/* buffer **position** var allocations */
-#define attach_lookback() var.u16[0] /* number of glyphs to go back to attach this glyph to its base */
-#define cursive_chain() var.i16[1] /* character to which this connects, may be positive or negative */
-
-
-/* Shared Tables: ValueRecord, Anchor Table, and MarkArray */
-
-typedef USHORT Value;
-
-typedef Value ValueRecord[VAR];
-
-struct ValueFormat : USHORT
-{
-  enum Flags {
-    xPlacement = 0x0001,       /* Includes horizontal adjustment for placement */
-    yPlacement = 0x0002,       /* Includes vertical adjustment for placement */
-    xAdvance   = 0x0004,       /* Includes horizontal adjustment for advance */
-    yAdvance   = 0x0008,       /* Includes vertical adjustment for advance */
-    xPlaDevice = 0x0010,       /* Includes horizontal Device table for placement */
-    yPlaDevice = 0x0020,       /* Includes vertical Device table for placement */
-    xAdvDevice = 0x0040,       /* Includes horizontal Device table for advance */
-    yAdvDevice = 0x0080,       /* Includes vertical Device table for advance */
-    ignored    = 0x0F00,       /* Was used in TrueType Open for MM fonts */
-    reserved   = 0xF000,       /* For future use */
-
-    devices    = 0x00F0        /* Mask for having any Device table */
-  };
-
-/* All fields are options.  Only those available advance the value pointer. */
-#if 0
-  SHORT                xPlacement;             /* Horizontal adjustment for
-                                        * placement--in design units */
-  SHORT                yPlacement;             /* Vertical adjustment for
-                                        * placement--in design units */
-  SHORT                xAdvance;               /* Horizontal adjustment for
-                                        * advance--in design units (only used
-                                        * for horizontal writing) */
-  SHORT                yAdvance;               /* Vertical adjustment for advance--in
-                                        * design units (only used for vertical
-                                        * writing) */
-  Offset       xPlaDevice;             /* Offset to Device table for
-                                        * horizontal placement--measured from
-                                        * beginning of PosTable (may be NULL) */
-  Offset       yPlaDevice;             /* Offset to Device table for vertical
-                                        * placement--measured from beginning
-                                        * of PosTable (may be NULL) */
-  Offset       xAdvDevice;             /* Offset to Device table for
-                                        * horizontal advance--measured from
-                                        * beginning of PosTable (may be NULL) */
-  Offset       yAdvDevice;             /* Offset to Device table for vertical
-                                        * advance--measured from beginning of
-                                        * PosTable (may be NULL) */
-#endif
-
-  inline unsigned int get_len (void) const
-  { return _hb_popcount32 ((unsigned int) *this); }
-  inline unsigned int get_size (void) const
-  { return get_len () * Value::static_size; }
-
-  void apply_value (hb_font_t            *font,
-                   hb_direction_t        direction,
-                   const void           *base,
-                   const Value          *values,
-                   hb_glyph_position_t  &glyph_pos) const
-  {
-    unsigned int x_ppem, y_ppem;
-    unsigned int format = *this;
-    hb_bool_t horizontal = HB_DIRECTION_IS_HORIZONTAL (direction);
-
-    if (!format) return;
-
-    if (format & xPlacement) glyph_pos.x_offset  += font->em_scale_x (get_short (values++));
-    if (format & yPlacement) glyph_pos.y_offset  += font->em_scale_y (get_short (values++));
-    if (format & xAdvance) {
-      if (likely (horizontal)) glyph_pos.x_advance += font->em_scale_x (get_short (values++)); else values++;
-    }
-    /* y_advance values grow downward but font-space grows upward, hence negation */
-    if (format & yAdvance) {
-      if (unlikely (!horizontal)) glyph_pos.y_advance -= font->em_scale_y (get_short (values++)); else values++;
-    }
-
-    if (!has_device ()) return;
-
-    x_ppem = font->x_ppem;
-    y_ppem = font->y_ppem;
-
-    if (!x_ppem && !y_ppem) return;
-
-    /* pixel -> fractional pixel */
-    if (format & xPlaDevice) {
-      if (x_ppem) glyph_pos.x_offset  += (base + get_device (values++)).get_x_delta (font); else values++;
-    }
-    if (format & yPlaDevice) {
-      if (y_ppem) glyph_pos.y_offset  += (base + get_device (values++)).get_y_delta (font); else values++;
-    }
-    if (format & xAdvDevice) {
-      if (horizontal && x_ppem) glyph_pos.x_advance += (base + get_device (values++)).get_x_delta (font); else values++;
-    }
-    if (format & yAdvDevice) {
-      /* y_advance values grow downward but font-space grows upward, hence negation */
-      if (!horizontal && y_ppem) glyph_pos.y_advance -= (base + get_device (values++)).get_y_delta (font); else values++;
-    }
-  }
-
-  private:
-  inline bool sanitize_value_devices (hb_sanitize_context_t *c, void *base, Value *values) {
-    unsigned int format = *this;
-
-    if (format & xPlacement) values++;
-    if (format & yPlacement) values++;
-    if (format & xAdvance)   values++;
-    if (format & yAdvance)   values++;
-
-    if ((format & xPlaDevice) && !get_device (values++).sanitize (c, base)) return false;
-    if ((format & yPlaDevice) && !get_device (values++).sanitize (c, base)) return false;
-    if ((format & xAdvDevice) && !get_device (values++).sanitize (c, base)) return false;
-    if ((format & yAdvDevice) && !get_device (values++).sanitize (c, base)) return false;
-
-    return true;
-  }
-
-  static inline OffsetTo<Device>& get_device (Value* value)
-  { return *CastP<OffsetTo<Device> > (value); }
-  static inline const OffsetTo<Device>& get_device (const Value* value)
-  { return *CastP<OffsetTo<Device> > (value); }
-
-  static inline const SHORT& get_short (const Value* value)
-  { return *CastP<SHORT> (value); }
-
-  public:
-
-  inline bool has_device (void) const {
-    unsigned int format = *this;
-    return (format & devices) != 0;
-  }
-
-  inline bool sanitize_value (hb_sanitize_context_t *c, void *base, Value *values) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (c->check_range (values, get_size ()) && (!has_device () || sanitize_value_devices (c, base, values)));
-  }
-
-  inline bool sanitize_values (hb_sanitize_context_t *c, void *base, Value *values, unsigned int count) {
-    TRACE_SANITIZE ();
-    unsigned int len = get_len ();
-
-    if (!c->check_array (values, get_size (), count)) return TRACE_RETURN (false);
-
-    if (!has_device ()) return TRACE_RETURN (true);
-
-    for (unsigned int i = 0; i < count; i++) {
-      if (!sanitize_value_devices (c, base, values))
-        return TRACE_RETURN (false);
-      values += len;
-    }
-
-    return TRACE_RETURN (true);
-  }
-
-  /* Just sanitize referenced Device tables.  Doesn't check the values themselves. */
-  inline bool sanitize_values_stride_unsafe (hb_sanitize_context_t *c, void *base, Value *values, unsigned int count, unsigned int stride) {
-    TRACE_SANITIZE ();
-
-    if (!has_device ()) return TRACE_RETURN (true);
-
-    for (unsigned int i = 0; i < count; i++) {
-      if (!sanitize_value_devices (c, base, values))
-        return TRACE_RETURN (false);
-      values += stride;
-    }
-
-    return TRACE_RETURN (true);
-  }
-};
-
-
-struct AnchorFormat1
-{
-  friend struct Anchor;
-
-  private:
-  inline void get_anchor (hb_font_t *font, hb_codepoint_t glyph_id HB_UNUSED,
-                         hb_position_t *x, hb_position_t *y) const
-  {
-      *x = font->em_scale_x (xCoordinate);
-      *y = font->em_scale_y (yCoordinate);
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (c->check_struct (this));
-  }
-
-  private:
-  USHORT       format;                 /* Format identifier--format = 1 */
-  SHORT                xCoordinate;            /* Horizontal value--in design units */
-  SHORT                yCoordinate;            /* Vertical value--in design units */
-  public:
-  DEFINE_SIZE_STATIC (6);
-};
-
-struct AnchorFormat2
-{
-  friend struct Anchor;
-
-  private:
-  inline void get_anchor (hb_font_t *font, hb_codepoint_t glyph_id,
-                         hb_position_t *x, hb_position_t *y) const
-  {
-      unsigned int x_ppem = font->x_ppem;
-      unsigned int y_ppem = font->y_ppem;
-      hb_position_t cx, cy;
-      hb_bool_t ret = false;
-
-      if (x_ppem || y_ppem)
-       ret = hb_font_get_glyph_contour_point_for_origin (font, glyph_id, anchorPoint, HB_DIRECTION_LTR, &cx, &cy);
-      *x = x_ppem && ret ? cx : font->em_scale_x (xCoordinate);
-      *y = y_ppem && ret ? cy : font->em_scale_y (yCoordinate);
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (c->check_struct (this));
-  }
-
-  private:
-  USHORT       format;                 /* Format identifier--format = 2 */
-  SHORT                xCoordinate;            /* Horizontal value--in design units */
-  SHORT                yCoordinate;            /* Vertical value--in design units */
-  USHORT       anchorPoint;            /* Index to glyph contour point */
-  public:
-  DEFINE_SIZE_STATIC (8);
-};
-
-struct AnchorFormat3
-{
-  friend struct Anchor;
-
-  private:
-  inline void get_anchor (hb_font_t *font, hb_codepoint_t glyph_id HB_UNUSED,
-                         hb_position_t *x, hb_position_t *y) const
-  {
-      *x = font->em_scale_x (xCoordinate);
-      *y = font->em_scale_y (yCoordinate);
-
-      if (font->x_ppem)
-       *x += (this+xDeviceTable).get_x_delta (font);
-      if (font->y_ppem)
-       *y += (this+yDeviceTable).get_x_delta (font);
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (c->check_struct (this) && xDeviceTable.sanitize (c, this) && yDeviceTable.sanitize (c, this));
-  }
-
-  private:
-  USHORT       format;                 /* Format identifier--format = 3 */
-  SHORT                xCoordinate;            /* Horizontal value--in design units */
-  SHORT                yCoordinate;            /* Vertical value--in design units */
-  OffsetTo<Device>
-               xDeviceTable;           /* Offset to Device table for X
-                                        * coordinate-- from beginning of
-                                        * Anchor table (may be NULL) */
-  OffsetTo<Device>
-               yDeviceTable;           /* Offset to Device table for Y
-                                        * coordinate-- from beginning of
-                                        * Anchor table (may be NULL) */
-  public:
-  DEFINE_SIZE_STATIC (10);
-};
-
-struct Anchor
-{
-  inline void get_anchor (hb_font_t *font, hb_codepoint_t glyph_id,
-                         hb_position_t *x, hb_position_t *y) const
-  {
-    *x = *y = 0;
-    switch (u.format) {
-    case 1: u.format1.get_anchor (font, glyph_id, x, y); return;
-    case 2: u.format2.get_anchor (font, glyph_id, x, y); return;
-    case 3: u.format3.get_anchor (font, glyph_id, x, y); return;
-    default:                                            return;
-    }
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    if (!u.format.sanitize (c)) return TRACE_RETURN (false);
-    switch (u.format) {
-    case 1: return TRACE_RETURN (u.format1.sanitize (c));
-    case 2: return TRACE_RETURN (u.format2.sanitize (c));
-    case 3: return TRACE_RETURN (u.format3.sanitize (c));
-    default:return TRACE_RETURN (true);
-    }
-  }
-
-  private:
-  union {
-  USHORT               format;         /* Format identifier */
-  AnchorFormat1                format1;
-  AnchorFormat2                format2;
-  AnchorFormat3                format3;
-  } u;
-  public:
-  DEFINE_SIZE_UNION (2, format);
-};
-
-
-struct AnchorMatrix
-{
-  inline const Anchor& get_anchor (unsigned int row, unsigned int col, unsigned int cols) const {
-    if (unlikely (row >= rows || col >= cols)) return Null(Anchor);
-    return this+matrix[row * cols + col];
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c, unsigned int cols) {
-    TRACE_SANITIZE ();
-    if (!c->check_struct (this)) return TRACE_RETURN (false);
-    if (unlikely (rows > 0 && cols >= ((unsigned int) -1) / rows)) return TRACE_RETURN (false);
-    unsigned int count = rows * cols;
-    if (!c->check_array (matrix, matrix[0].static_size, count)) return TRACE_RETURN (false);
-    for (unsigned int i = 0; i < count; i++)
-      if (!matrix[i].sanitize (c, this)) return TRACE_RETURN (false);
-    return TRACE_RETURN (true);
-  }
-
-  USHORT       rows;                   /* Number of rows */
-  private:
-  OffsetTo<Anchor>
-               matrix[VAR];            /* Matrix of offsets to Anchor tables--
-                                        * from beginning of AnchorMatrix table */
-  public:
-  DEFINE_SIZE_ARRAY (2, matrix);
-};
-
-
-struct MarkRecord
-{
-  friend struct MarkArray;
-
-  inline bool sanitize (hb_sanitize_context_t *c, void *base) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (c->check_struct (this) && markAnchor.sanitize (c, base));
-  }
-
-  private:
-  USHORT       klass;                  /* Class defined for this mark */
-  OffsetTo<Anchor>
-               markAnchor;             /* Offset to Anchor table--from
-                                        * beginning of MarkArray table */
-  public:
-  DEFINE_SIZE_STATIC (4);
-};
-
-struct MarkArray : ArrayOf<MarkRecord> /* Array of MarkRecords--in Coverage order */
-{
-  inline bool apply (hb_apply_context_t *c,
-                    unsigned int mark_index, unsigned int glyph_index,
-                    const AnchorMatrix &anchors, unsigned int class_count,
-                    unsigned int glyph_pos) const
-  {
-    TRACE_APPLY ();
-    const MarkRecord &record = ArrayOf<MarkRecord>::operator[](mark_index);
-    unsigned int mark_class = record.klass;
-
-    const Anchor& mark_anchor = this + record.markAnchor;
-    const Anchor& glyph_anchor = anchors.get_anchor (glyph_index, mark_class, class_count);
-
-    hb_position_t mark_x, mark_y, base_x, base_y;
-
-    mark_anchor.get_anchor (c->font, c->buffer->cur().codepoint, &mark_x, &mark_y);
-    glyph_anchor.get_anchor (c->font, c->buffer->info[glyph_pos].codepoint, &base_x, &base_y);
-
-    hb_glyph_position_t &o = c->buffer->cur_pos();
-    o.x_offset = base_x - mark_x;
-    o.y_offset = base_y - mark_y;
-    o.attach_lookback() = c->buffer->idx - glyph_pos;
-
-    c->buffer->idx++;
-    return TRACE_RETURN (true);
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (ArrayOf<MarkRecord>::sanitize (c, this));
-  }
-};
-
-
-/* Lookups */
-
-struct SinglePosFormat1
-{
-  friend struct SinglePos;
-
-  private:
-  inline bool apply (hb_apply_context_t *c) const
-  {
-    TRACE_APPLY ();
-    unsigned int index = (this+coverage) (c->buffer->cur().codepoint);
-    if (likely (index == NOT_COVERED)) return TRACE_RETURN (false);
-
-    valueFormat.apply_value (c->font, c->direction, this,
-                            values, c->buffer->cur_pos());
-
-    c->buffer->idx++;
-    return TRACE_RETURN (true);
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (c->check_struct (this) && coverage.sanitize (c, this) && valueFormat.sanitize_value (c, this, values));
-  }
-
-  private:
-  USHORT       format;                 /* Format identifier--format = 1 */
-  OffsetTo<Coverage>
-               coverage;               /* Offset to Coverage table--from
-                                        * beginning of subtable */
-  ValueFormat  valueFormat;            /* Defines the types of data in the
-                                        * ValueRecord */
-  ValueRecord  values;                 /* Defines positioning
-                                        * value(s)--applied to all glyphs in
-                                        * the Coverage table */
-  public:
-  DEFINE_SIZE_ARRAY (6, values);
-};
-
-struct SinglePosFormat2
-{
-  friend struct SinglePos;
-
-  private:
-  inline bool apply (hb_apply_context_t *c) const
-  {
-    TRACE_APPLY ();
-    unsigned int index = (this+coverage) (c->buffer->cur().codepoint);
-    if (likely (index == NOT_COVERED)) return TRACE_RETURN (false);
-
-    if (likely (index >= valueCount)) return TRACE_RETURN (false);
-
-    valueFormat.apply_value (c->font, c->direction, this,
-                            &values[index * valueFormat.get_len ()],
-                            c->buffer->cur_pos());
-
-    c->buffer->idx++;
-    return TRACE_RETURN (true);
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (c->check_struct (this) && coverage.sanitize (c, this) && valueFormat.sanitize_values (c, this, values, valueCount));
-  }
-
-  private:
-  USHORT       format;                 /* Format identifier--format = 2 */
-  OffsetTo<Coverage>
-               coverage;               /* Offset to Coverage table--from
-                                        * beginning of subtable */
-  ValueFormat  valueFormat;            /* Defines the types of data in the
-                                        * ValueRecord */
-  USHORT       valueCount;             /* Number of ValueRecords */
-  ValueRecord  values;                 /* Array of ValueRecords--positioning
-                                        * values applied to glyphs */
-  public:
-  DEFINE_SIZE_ARRAY (8, values);
-};
-
-struct SinglePos
-{
-  friend struct PosLookupSubTable;
-
-  private:
-  inline bool apply (hb_apply_context_t *c) const
-  {
-    TRACE_APPLY ();
-    switch (u.format) {
-    case 1: return TRACE_RETURN (u.format1.apply (c));
-    case 2: return TRACE_RETURN (u.format2.apply (c));
-    default:return TRACE_RETURN (false);
-    }
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    if (!u.format.sanitize (c)) return TRACE_RETURN (false);
-    switch (u.format) {
-    case 1: return TRACE_RETURN (u.format1.sanitize (c));
-    case 2: return TRACE_RETURN (u.format2.sanitize (c));
-    default:return TRACE_RETURN (true);
-    }
-  }
-
-  private:
-  union {
-  USHORT               format;         /* Format identifier */
-  SinglePosFormat1     format1;
-  SinglePosFormat2     format2;
-  } u;
-};
-
-
-struct PairValueRecord
-{
-  friend struct PairSet;
-
-  private:
-  GlyphID      secondGlyph;            /* GlyphID of second glyph in the
-                                        * pair--first glyph is listed in the
-                                        * Coverage table */
-  ValueRecord  values;                 /* Positioning data for the first glyph
-                                        * followed by for second glyph */
-  public:
-  DEFINE_SIZE_ARRAY (2, values);
-};
-
-struct PairSet
-{
-  friend struct PairPosFormat1;
-
-  inline bool apply (hb_apply_context_t *c,
-                    const ValueFormat *valueFormats,
-                    unsigned int pos) const
-  {
-    TRACE_APPLY ();
-    unsigned int len1 = valueFormats[0].get_len ();
-    unsigned int len2 = valueFormats[1].get_len ();
-    unsigned int record_size = USHORT::static_size * (1 + len1 + len2);
-
-    unsigned int count = len;
-    const PairValueRecord *record = CastP<PairValueRecord> (array);
-    for (unsigned int i = 0; i < count; i++)
-    {
-      if (c->buffer->info[pos].codepoint == record->secondGlyph)
-      {
-       valueFormats[0].apply_value (c->font, c->direction, this,
-                                    &record->values[0], c->buffer->cur_pos());
-       valueFormats[1].apply_value (c->font, c->direction, this,
-                                    &record->values[len1], c->buffer->pos[pos]);
-       if (len2)
-         pos++;
-       c->buffer->idx = pos;
-       return TRACE_RETURN (true);
-      }
-      record = &StructAtOffset<PairValueRecord> (record, record_size);
-    }
-
-    return TRACE_RETURN (false);
-  }
-
-  struct sanitize_closure_t {
-    void *base;
-    ValueFormat *valueFormats;
-    unsigned int len1; /* valueFormats[0].get_len() */
-    unsigned int stride; /* 1 + len1 + len2 */
-  };
-
-  inline bool sanitize (hb_sanitize_context_t *c, const sanitize_closure_t *closure) {
-    TRACE_SANITIZE ();
-    if (!(c->check_struct (this)
-       && c->check_array (array, USHORT::static_size * closure->stride, len))) return TRACE_RETURN (false);
-
-    unsigned int count = len;
-    PairValueRecord *record = CastP<PairValueRecord> (array);
-    return TRACE_RETURN (closure->valueFormats[0].sanitize_values_stride_unsafe (c, closure->base, &record->values[0], count, closure->stride)
-                     && closure->valueFormats[1].sanitize_values_stride_unsafe (c, closure->base, &record->values[closure->len1], count, closure->stride));
-  }
-
-  private:
-  USHORT       len;                    /* Number of PairValueRecords */
-  USHORT       array[VAR];             /* Array of PairValueRecords--ordered
-                                        * by GlyphID of the second glyph */
-  public:
-  DEFINE_SIZE_ARRAY (2, array);
-};
-
-struct PairPosFormat1
-{
-  friend struct PairPos;
-
-  private:
-  inline bool apply (hb_apply_context_t *c) const
-  {
-    TRACE_APPLY ();
-    hb_apply_context_t::mark_skipping_forward_iterator_t skippy_iter (c, c->buffer->idx, 1);
-    if (skippy_iter.has_no_chance ()) return TRACE_RETURN (false);
-
-    unsigned int index = (this+coverage) (c->buffer->cur().codepoint);
-    if (likely (index == NOT_COVERED)) return TRACE_RETURN (false);
-
-    if (!skippy_iter.next ()) return TRACE_RETURN (false);
-
-    return TRACE_RETURN ((this+pairSet[index]).apply (c, &valueFormat1, skippy_iter.idx));
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-
-    unsigned int len1 = valueFormat1.get_len ();
-    unsigned int len2 = valueFormat2.get_len ();
-    PairSet::sanitize_closure_t closure = {
-      this,
-      &valueFormat1,
-      len1,
-      1 + len1 + len2
-    };
-
-    return TRACE_RETURN (c->check_struct (this) && coverage.sanitize (c, this) && pairSet.sanitize (c, this, &closure));
-  }
-
-  private:
-  USHORT       format;                 /* Format identifier--format = 1 */
-  OffsetTo<Coverage>
-               coverage;               /* Offset to Coverage table--from
-                                        * beginning of subtable */
-  ValueFormat  valueFormat1;           /* Defines the types of data in
-                                        * ValueRecord1--for the first glyph
-                                        * in the pair--may be zero (0) */
-  ValueFormat  valueFormat2;           /* Defines the types of data in
-                                        * ValueRecord2--for the second glyph
-                                        * in the pair--may be zero (0) */
-  OffsetArrayOf<PairSet>
-               pairSet;                /* Array of PairSet tables
-                                        * ordered by Coverage Index */
-  public:
-  DEFINE_SIZE_ARRAY (10, pairSet);
-};
-
-struct PairPosFormat2
-{
-  friend struct PairPos;
-
-  private:
-  inline bool apply (hb_apply_context_t *c) const
-  {
-    TRACE_APPLY ();
-    hb_apply_context_t::mark_skipping_forward_iterator_t skippy_iter (c, c->buffer->idx, 1);
-    if (skippy_iter.has_no_chance ()) return TRACE_RETURN (false);
-
-    unsigned int index = (this+coverage) (c->buffer->cur().codepoint);
-    if (likely (index == NOT_COVERED)) return TRACE_RETURN (false);
-
-    if (!skippy_iter.next ()) return TRACE_RETURN (false);
-
-    unsigned int len1 = valueFormat1.get_len ();
-    unsigned int len2 = valueFormat2.get_len ();
-    unsigned int record_len = len1 + len2;
-
-    unsigned int klass1 = (this+classDef1) (c->buffer->cur().codepoint);
-    unsigned int klass2 = (this+classDef2) (c->buffer->info[skippy_iter.idx].codepoint);
-    if (unlikely (klass1 >= class1Count || klass2 >= class2Count)) return TRACE_RETURN (false);
-
-    const Value *v = &values[record_len * (klass1 * class2Count + klass2)];
-    valueFormat1.apply_value (c->font, c->direction, this,
-                             v, c->buffer->cur_pos());
-    valueFormat2.apply_value (c->font, c->direction, this,
-                             v + len1, c->buffer->pos[skippy_iter.idx]);
-
-    c->buffer->idx = skippy_iter.idx;
-    if (len2)
-      c->buffer->idx++;
-
-    return TRACE_RETURN (true);
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    if (!(c->check_struct (this)
-       && coverage.sanitize (c, this)
-       && classDef1.sanitize (c, this)
-       && classDef2.sanitize (c, this))) return TRACE_RETURN (false);
-
-    unsigned int len1 = valueFormat1.get_len ();
-    unsigned int len2 = valueFormat2.get_len ();
-    unsigned int stride = len1 + len2;
-    unsigned int record_size = valueFormat1.get_size () + valueFormat2.get_size ();
-    unsigned int count = (unsigned int) class1Count * (unsigned int) class2Count;
-    return TRACE_RETURN (c->check_array (values, record_size, count) &&
-                        valueFormat1.sanitize_values_stride_unsafe (c, this, &values[0], count, stride) &&
-                        valueFormat2.sanitize_values_stride_unsafe (c, this, &values[len1], count, stride));
-  }
-
-  private:
-  USHORT       format;                 /* Format identifier--format = 2 */
-  OffsetTo<Coverage>
-               coverage;               /* Offset to Coverage table--from
-                                        * beginning of subtable */
-  ValueFormat  valueFormat1;           /* ValueRecord definition--for the
-                                        * first glyph of the pair--may be zero
-                                        * (0) */
-  ValueFormat  valueFormat2;           /* ValueRecord definition--for the
-                                        * second glyph of the pair--may be
-                                        * zero (0) */
-  OffsetTo<ClassDef>
-               classDef1;              /* Offset to ClassDef table--from
-                                        * beginning of PairPos subtable--for
-                                        * the first glyph of the pair */
-  OffsetTo<ClassDef>
-               classDef2;              /* Offset to ClassDef table--from
-                                        * beginning of PairPos subtable--for
-                                        * the second glyph of the pair */
-  USHORT       class1Count;            /* Number of classes in ClassDef1
-                                        * table--includes Class0 */
-  USHORT       class2Count;            /* Number of classes in ClassDef2
-                                        * table--includes Class0 */
-  ValueRecord  values;                 /* Matrix of value pairs:
-                                        * class1-major, class2-minor,
-                                        * Each entry has value1 and value2 */
-  public:
-  DEFINE_SIZE_ARRAY (16, values);
-};
-
-struct PairPos
-{
-  friend struct PosLookupSubTable;
-
-  private:
-  inline bool apply (hb_apply_context_t *c) const
-  {
-    TRACE_APPLY ();
-    switch (u.format) {
-    case 1: return TRACE_RETURN (u.format1.apply (c));
-    case 2: return TRACE_RETURN (u.format2.apply (c));
-    default:return TRACE_RETURN (false);
-    }
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    if (!u.format.sanitize (c)) return TRACE_RETURN (false);
-    switch (u.format) {
-    case 1: return TRACE_RETURN (u.format1.sanitize (c));
-    case 2: return TRACE_RETURN (u.format2.sanitize (c));
-    default:return TRACE_RETURN (true);
-    }
-  }
-
-  private:
-  union {
-  USHORT               format;         /* Format identifier */
-  PairPosFormat1       format1;
-  PairPosFormat2       format2;
-  } u;
-};
-
-
-struct EntryExitRecord
-{
-  friend struct CursivePosFormat1;
-
-  inline bool sanitize (hb_sanitize_context_t *c, void *base) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (entryAnchor.sanitize (c, base) && exitAnchor.sanitize (c, base));
-  }
-
-  private:
-  OffsetTo<Anchor>
-               entryAnchor;            /* Offset to EntryAnchor table--from
-                                        * beginning of CursivePos
-                                        * subtable--may be NULL */
-  OffsetTo<Anchor>
-               exitAnchor;             /* Offset to ExitAnchor table--from
-                                        * beginning of CursivePos
-                                        * subtable--may be NULL */
-  public:
-  DEFINE_SIZE_STATIC (4);
-};
-
-struct CursivePosFormat1
-{
-  friend struct CursivePos;
-
-  private:
-  inline bool apply (hb_apply_context_t *c) const
-  {
-    TRACE_APPLY ();
-
-    /* We don't handle mark glyphs here. */
-    if (c->property & HB_OT_LAYOUT_GLYPH_CLASS_MARK) return TRACE_RETURN (false);
-
-    hb_apply_context_t::mark_skipping_forward_iterator_t skippy_iter (c, c->buffer->idx, 1);
-    if (skippy_iter.has_no_chance ()) return TRACE_RETURN (false);
-
-    const EntryExitRecord &this_record = entryExitRecord[(this+coverage) (c->buffer->cur().codepoint)];
-    if (!this_record.exitAnchor) return TRACE_RETURN (false);
-
-    if (!skippy_iter.next ()) return TRACE_RETURN (false);
-
-    const EntryExitRecord &next_record = entryExitRecord[(this+coverage) (c->buffer->info[skippy_iter.idx].codepoint)];
-    if (!next_record.entryAnchor) return TRACE_RETURN (false);
-
-    unsigned int i = c->buffer->idx;
-    unsigned int j = skippy_iter.idx;
-
-    hb_position_t entry_x, entry_y, exit_x, exit_y;
-    (this+this_record.exitAnchor).get_anchor (c->font, c->buffer->info[i].codepoint, &exit_x, &exit_y);
-    (this+next_record.entryAnchor).get_anchor (c->font, c->buffer->info[j].codepoint, &entry_x, &entry_y);
-
-    hb_glyph_position_t *pos = c->buffer->pos;
-
-    hb_position_t d;
-    /* Main-direction adjustment */
-    switch (c->direction) {
-      case HB_DIRECTION_LTR:
-       pos[i].x_advance  =  exit_x + pos[i].x_offset;
-
-       d = entry_x + pos[j].x_offset;
-       pos[j].x_advance -= d;
-       pos[j].x_offset  -= d;
-       break;
-      case HB_DIRECTION_RTL:
-       d = exit_x + pos[i].x_offset;
-       pos[i].x_advance -= d;
-       pos[i].x_offset  -= d;
-
-       pos[j].x_advance  =  entry_x + pos[j].x_offset;
-       break;
-      case HB_DIRECTION_TTB:
-       pos[i].y_advance  =  exit_y + pos[i].y_offset;
-
-       d = entry_y + pos[j].y_offset;
-       pos[j].y_advance -= d;
-       pos[j].y_offset  -= d;
-       break;
-      case HB_DIRECTION_BTT:
-       d = exit_y + pos[i].y_offset;
-       pos[i].y_advance -= d;
-       pos[i].y_offset  -= d;
-
-       pos[j].y_advance  =  entry_y;
-       break;
-      case HB_DIRECTION_INVALID:
-      default:
-       break;
-    }
-
-    /* Cross-direction adjustment */
-    if  (c->lookup_props & LookupFlag::RightToLeft) {
-      pos[i].cursive_chain() = j - i;
-      if (likely (HB_DIRECTION_IS_HORIZONTAL (c->direction)))
-       pos[i].y_offset = entry_y - exit_y;
-      else
-       pos[i].x_offset = entry_x - exit_x;
-    } else {
-      pos[j].cursive_chain() = i - j;
-      if (likely (HB_DIRECTION_IS_HORIZONTAL (c->direction)))
-       pos[j].y_offset = exit_y - entry_y;
-      else
-       pos[j].x_offset = exit_x - entry_x;
-    }
-
-    c->buffer->idx = j;
-    return TRACE_RETURN (true);
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (coverage.sanitize (c, this) && entryExitRecord.sanitize (c, this));
-  }
-
-  private:
-  USHORT       format;                 /* Format identifier--format = 1 */
-  OffsetTo<Coverage>
-               coverage;               /* Offset to Coverage table--from
-                                        * beginning of subtable */
-  ArrayOf<EntryExitRecord>
-               entryExitRecord;        /* Array of EntryExit records--in
-                                        * Coverage Index order */
-  public:
-  DEFINE_SIZE_ARRAY (6, entryExitRecord);
-};
-
-struct CursivePos
-{
-  friend struct PosLookupSubTable;
-
-  private:
-  inline bool apply (hb_apply_context_t *c) const
-  {
-    TRACE_APPLY ();
-    switch (u.format) {
-    case 1: return TRACE_RETURN (u.format1.apply (c));
-    default:return TRACE_RETURN (false);
-    }
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    if (!u.format.sanitize (c)) return TRACE_RETURN (false);
-    switch (u.format) {
-    case 1: return TRACE_RETURN (u.format1.sanitize (c));
-    default:return TRACE_RETURN (true);
-    }
-  }
-
-  private:
-  union {
-  USHORT               format;         /* Format identifier */
-  CursivePosFormat1    format1;
-  } u;
-};
-
-
-typedef AnchorMatrix BaseArray;                /* base-major--
-                                        * in order of BaseCoverage Index--,
-                                        * mark-minor--
-                                        * ordered by class--zero-based. */
-
-struct MarkBasePosFormat1
-{
-  friend struct MarkBasePos;
-
-  private:
-  inline bool apply (hb_apply_context_t *c) const
-  {
-    TRACE_APPLY ();
-    unsigned int mark_index = (this+markCoverage) (c->buffer->cur().codepoint);
-    if (likely (mark_index == NOT_COVERED)) return TRACE_RETURN (false);
-
-    /* now we search backwards for a non-mark glyph */
-    unsigned int property;
-    hb_apply_context_t::mark_skipping_backward_iterator_t skippy_iter (c, c->buffer->idx, 1);
-    if (!skippy_iter.prev (&property, LookupFlag::IgnoreMarks)) return TRACE_RETURN (false);
-
-    /* The following assertion is too strong, so we've disabled it. */
-    if (!(property & HB_OT_LAYOUT_GLYPH_CLASS_BASE_GLYPH)) {/*return TRACE_RETURN (false);*/}
-
-    unsigned int base_index = (this+baseCoverage) (c->buffer->info[skippy_iter.idx].codepoint);
-    if (base_index == NOT_COVERED) return TRACE_RETURN (false);
-
-    return TRACE_RETURN ((this+markArray).apply (c, mark_index, base_index, this+baseArray, classCount, skippy_iter.idx));
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (c->check_struct (this) && markCoverage.sanitize (c, this) && baseCoverage.sanitize (c, this) &&
-                        markArray.sanitize (c, this) && baseArray.sanitize (c, this, (unsigned int) classCount));
-  }
-
-  private:
-  USHORT       format;                 /* Format identifier--format = 1 */
-  OffsetTo<Coverage>
-               markCoverage;           /* Offset to MarkCoverage table--from
-                                        * beginning of MarkBasePos subtable */
-  OffsetTo<Coverage>
-               baseCoverage;           /* Offset to BaseCoverage table--from
-                                        * beginning of MarkBasePos subtable */
-  USHORT       classCount;             /* Number of classes defined for marks */
-  OffsetTo<MarkArray>
-               markArray;              /* Offset to MarkArray table--from
-                                        * beginning of MarkBasePos subtable */
-  OffsetTo<BaseArray>
-               baseArray;              /* Offset to BaseArray table--from
-                                        * beginning of MarkBasePos subtable */
-  public:
-  DEFINE_SIZE_STATIC (12);
-};
-
-struct MarkBasePos
-{
-  friend struct PosLookupSubTable;
-
-  private:
-  inline bool apply (hb_apply_context_t *c) const
-  {
-    TRACE_APPLY ();
-    switch (u.format) {
-    case 1: return TRACE_RETURN (u.format1.apply (c));
-    default:return TRACE_RETURN (false);
-    }
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    if (!u.format.sanitize (c)) return TRACE_RETURN (false);
-    switch (u.format) {
-    case 1: return TRACE_RETURN (u.format1.sanitize (c));
-    default:return TRACE_RETURN (true);
-    }
-  }
-
-  private:
-  union {
-  USHORT               format;         /* Format identifier */
-  MarkBasePosFormat1   format1;
-  } u;
-};
-
-
-typedef AnchorMatrix LigatureAttach;   /* component-major--
-                                        * in order of writing direction--,
-                                        * mark-minor--
-                                        * ordered by class--zero-based. */
-
-typedef OffsetListOf<LigatureAttach> LigatureArray;
-                                       /* Array of LigatureAttach
-                                        * tables ordered by
-                                        * LigatureCoverage Index */
-
-struct MarkLigPosFormat1
-{
-  friend struct MarkLigPos;
-
-  private:
-  inline bool apply (hb_apply_context_t *c) const
-  {
-    TRACE_APPLY ();
-    unsigned int mark_index = (this+markCoverage) (c->buffer->cur().codepoint);
-    if (likely (mark_index == NOT_COVERED)) return TRACE_RETURN (false);
-
-    /* now we search backwards for a non-mark glyph */
-    unsigned int property;
-    hb_apply_context_t::mark_skipping_backward_iterator_t skippy_iter (c, c->buffer->idx, 1);
-    if (!skippy_iter.prev (&property, LookupFlag::IgnoreMarks)) return TRACE_RETURN (false);
-
-    /* The following assertion is too strong, so we've disabled it. */
-    if (!(property & HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE)) {/*return TRACE_RETURN (false);*/}
-
-    unsigned int j = skippy_iter.idx;
-    unsigned int lig_index = (this+ligatureCoverage) (c->buffer->info[j].codepoint);
-    if (lig_index == NOT_COVERED) return TRACE_RETURN (false);
-
-    const LigatureArray& lig_array = this+ligatureArray;
-    const LigatureAttach& lig_attach = lig_array[lig_index];
-
-    /* Find component to attach to */
-    unsigned int comp_count = lig_attach.rows;
-    if (unlikely (!comp_count)) return TRACE_RETURN (false);
-
-    unsigned int comp_index;
-    /* We must now check whether the ligature ID of the current mark glyph
-     * is identical to the ligature ID of the found ligature.  If yes, we
-     * can directly use the component index.  If not, we attach the mark
-     * glyph to the last component of the ligature. */
-    if (get_lig_id (c->buffer->info[j]) &&
-       get_lig_id (c->buffer->cur()) &&
-       get_lig_comp (c->buffer->cur()) > 0)
-    {
-      comp_index = get_lig_comp (c->buffer->cur()) - 1;
-      if (comp_index >= comp_count)
-       comp_index = comp_count - 1;
-    }
-    else
-      comp_index = comp_count - 1;
-
-    return TRACE_RETURN ((this+markArray).apply (c, mark_index, comp_index, lig_attach, classCount, j));
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (c->check_struct (this) && markCoverage.sanitize (c, this) && ligatureCoverage.sanitize (c, this) &&
-                        markArray.sanitize (c, this) && ligatureArray.sanitize (c, this, (unsigned int) classCount));
-  }
-
-  private:
-  USHORT       format;                 /* Format identifier--format = 1 */
-  OffsetTo<Coverage>
-               markCoverage;           /* Offset to Mark Coverage table--from
-                                        * beginning of MarkLigPos subtable */
-  OffsetTo<Coverage>
-               ligatureCoverage;       /* Offset to Ligature Coverage
-                                        * table--from beginning of MarkLigPos
-                                        * subtable */
-  USHORT       classCount;             /* Number of defined mark classes */
-  OffsetTo<MarkArray>
-               markArray;              /* Offset to MarkArray table--from
-                                        * beginning of MarkLigPos subtable */
-  OffsetTo<LigatureArray>
-               ligatureArray;          /* Offset to LigatureArray table--from
-                                        * beginning of MarkLigPos subtable */
-  public:
-  DEFINE_SIZE_STATIC (12);
-};
-
-struct MarkLigPos
-{
-  friend struct PosLookupSubTable;
-
-  private:
-  inline bool apply (hb_apply_context_t *c) const
-  {
-    TRACE_APPLY ();
-    switch (u.format) {
-    case 1: return TRACE_RETURN (u.format1.apply (c));
-    default:return TRACE_RETURN (false);
-    }
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    if (!u.format.sanitize (c)) return TRACE_RETURN (false);
-    switch (u.format) {
-    case 1: return TRACE_RETURN (u.format1.sanitize (c));
-    default:return TRACE_RETURN (true);
-    }
-  }
-
-  private:
-  union {
-  USHORT               format;         /* Format identifier */
-  MarkLigPosFormat1    format1;
-  } u;
-};
-
-
-typedef AnchorMatrix Mark2Array;       /* mark2-major--
-                                        * in order of Mark2Coverage Index--,
-                                        * mark1-minor--
-                                        * ordered by class--zero-based. */
-
-struct MarkMarkPosFormat1
-{
-  friend struct MarkMarkPos;
-
-  private:
-  inline bool apply (hb_apply_context_t *c) const
-  {
-    TRACE_APPLY ();
-    unsigned int mark1_index = (this+mark1Coverage) (c->buffer->cur().codepoint);
-    if (likely (mark1_index == NOT_COVERED)) return TRACE_RETURN (false);
-
-    /* now we search backwards for a suitable mark glyph until a non-mark glyph */
-    unsigned int property;
-    hb_apply_context_t::mark_skipping_backward_iterator_t skippy_iter (c, c->buffer->idx, 1);
-    if (!skippy_iter.prev (&property)) return TRACE_RETURN (false);
-
-    if (!(property & HB_OT_LAYOUT_GLYPH_CLASS_MARK)) return TRACE_RETURN (false);
-
-    unsigned int j = skippy_iter.idx;
-
-    /* Two marks match only if they belong to the same base, or same component
-     * of the same ligature.  That is, the component numbers must match, and
-     * if those are non-zero, the ligid number should also match. */
-    if ((get_lig_comp (c->buffer->cur())) ||
-       (get_lig_comp (c->buffer->info[j]) > 0 &&
-        get_lig_id (c->buffer->cur())))
-      return TRACE_RETURN (false);
-
-    unsigned int mark2_index = (this+mark2Coverage) (c->buffer->info[j].codepoint);
-    if (mark2_index == NOT_COVERED) return TRACE_RETURN (false);
-
-    return TRACE_RETURN ((this+mark1Array).apply (c, mark1_index, mark2_index, this+mark2Array, classCount, j));
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (c->check_struct (this) && mark1Coverage.sanitize (c, this) &&
-                        mark2Coverage.sanitize (c, this) && mark1Array.sanitize (c, this)
-                        && mark2Array.sanitize (c, this, (unsigned int) classCount));
-  }
-
-  private:
-  USHORT       format;                 /* Format identifier--format = 1 */
-  OffsetTo<Coverage>
-               mark1Coverage;          /* Offset to Combining Mark1 Coverage
-                                        * table--from beginning of MarkMarkPos
-                                        * subtable */
-  OffsetTo<Coverage>
-               mark2Coverage;          /* Offset to Combining Mark2 Coverage
-                                        * table--from beginning of MarkMarkPos
-                                        * subtable */
-  USHORT       classCount;             /* Number of defined mark classes */
-  OffsetTo<MarkArray>
-               mark1Array;             /* Offset to Mark1Array table--from
-                                        * beginning of MarkMarkPos subtable */
-  OffsetTo<Mark2Array>
-               mark2Array;             /* Offset to Mark2Array table--from
-                                        * beginning of MarkMarkPos subtable */
-  public:
-  DEFINE_SIZE_STATIC (12);
-};
-
-struct MarkMarkPos
-{
-  friend struct PosLookupSubTable;
-
-  private:
-  inline bool apply (hb_apply_context_t *c) const
-  {
-    TRACE_APPLY ();
-    switch (u.format) {
-    case 1: return TRACE_RETURN (u.format1.apply (c));
-    default:return TRACE_RETURN (false);
-    }
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    if (!u.format.sanitize (c)) return TRACE_RETURN (false);
-    switch (u.format) {
-    case 1: return TRACE_RETURN (u.format1.sanitize (c));
-    default:return TRACE_RETURN (true);
-    }
-  }
-
-  private:
-  union {
-  USHORT               format;         /* Format identifier */
-  MarkMarkPosFormat1   format1;
-  } u;
-};
-
-
-static inline bool position_lookup (hb_apply_context_t *c, unsigned int lookup_index);
-
-struct ContextPos : Context
-{
-  friend struct PosLookupSubTable;
-
-  private:
-  inline bool apply (hb_apply_context_t *c) const
-  {
-    TRACE_APPLY ();
-    return TRACE_RETURN (Context::apply (c, position_lookup));
-  }
-};
-
-struct ChainContextPos : ChainContext
-{
-  friend struct PosLookupSubTable;
-
-  private:
-  inline bool apply (hb_apply_context_t *c) const
-  {
-    TRACE_APPLY ();
-    return TRACE_RETURN (ChainContext::apply (c, position_lookup));
-  }
-};
-
-
-struct ExtensionPos : Extension
-{
-  friend struct PosLookupSubTable;
-
-  private:
-  inline const struct PosLookupSubTable& get_subtable (void) const
-  {
-    unsigned int offset = get_offset ();
-    if (unlikely (!offset)) return Null(PosLookupSubTable);
-    return StructAtOffset<PosLookupSubTable> (this, offset);
-  }
-
-  inline bool apply (hb_apply_context_t *c) const;
-
-  inline bool sanitize (hb_sanitize_context_t *c);
-};
-
-
-
-/*
- * PosLookup
- */
-
-
-struct PosLookupSubTable
-{
-  friend struct PosLookup;
-
-  enum Type {
-    Single             = 1,
-    Pair               = 2,
-    Cursive            = 3,
-    MarkBase           = 4,
-    MarkLig            = 5,
-    MarkMark           = 6,
-    Context            = 7,
-    ChainContext       = 8,
-    Extension          = 9
-  };
-
-  inline bool apply (hb_apply_context_t *c, unsigned int lookup_type) const
-  {
-    TRACE_APPLY ();
-    switch (lookup_type) {
-    case Single:               return TRACE_RETURN (u.single.apply (c));
-    case Pair:                 return TRACE_RETURN (u.pair.apply (c));
-    case Cursive:              return TRACE_RETURN (u.cursive.apply (c));
-    case MarkBase:             return TRACE_RETURN (u.markBase.apply (c));
-    case MarkLig:              return TRACE_RETURN (u.markLig.apply (c));
-    case MarkMark:             return TRACE_RETURN (u.markMark.apply (c));
-    case Context:              return TRACE_RETURN (u.c.apply (c));
-    case ChainContext:         return TRACE_RETURN (u.chainContext.apply (c));
-    case Extension:            return TRACE_RETURN (u.extension.apply (c));
-    default:                   return TRACE_RETURN (false);
-    }
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c, unsigned int lookup_type) {
-    TRACE_SANITIZE ();
-    switch (lookup_type) {
-    case Single:               return TRACE_RETURN (u.single.sanitize (c));
-    case Pair:                 return TRACE_RETURN (u.pair.sanitize (c));
-    case Cursive:              return TRACE_RETURN (u.cursive.sanitize (c));
-    case MarkBase:             return TRACE_RETURN (u.markBase.sanitize (c));
-    case MarkLig:              return TRACE_RETURN (u.markLig.sanitize (c));
-    case MarkMark:             return TRACE_RETURN (u.markMark.sanitize (c));
-    case Context:              return TRACE_RETURN (u.c.sanitize (c));
-    case ChainContext:         return TRACE_RETURN (u.chainContext.sanitize (c));
-    case Extension:            return TRACE_RETURN (u.extension.sanitize (c));
-    default:                   return TRACE_RETURN (true);
-    }
-  }
-
-  private:
-  union {
-  USHORT               sub_format;
-  SinglePos            single;
-  PairPos              pair;
-  CursivePos           cursive;
-  MarkBasePos          markBase;
-  MarkLigPos           markLig;
-  MarkMarkPos          markMark;
-  ContextPos           c;
-  ChainContextPos      chainContext;
-  ExtensionPos         extension;
-  } u;
-  public:
-  DEFINE_SIZE_UNION (2, sub_format);
-};
-
-
-struct PosLookup : Lookup
-{
-  inline const PosLookupSubTable& get_subtable (unsigned int i) const
-  { return this+CastR<OffsetArrayOf<PosLookupSubTable> > (subTable)[i]; }
-
-  inline bool apply_once (hb_apply_context_t *c) const
-  {
-    unsigned int lookup_type = get_type ();
-
-    if (!_hb_ot_layout_check_glyph_property (c->face, &c->buffer->cur(), c->lookup_props, &c->property))
-      return false;
-
-    for (unsigned int i = 0; i < get_subtable_count (); i++)
-      if (get_subtable (i).apply (c, lookup_type))
-       return true;
-
-    return false;
-  }
-
-  inline bool apply_string (hb_apply_context_t *c) const
-  {
-    bool ret = false;
-
-    if (unlikely (!c->buffer->len))
-      return false;
-
-    c->set_lookup (*this);
-
-    c->buffer->idx = 0;
-    while (c->buffer->idx < c->buffer->len)
-    {
-      if ((c->buffer->cur().mask & c->lookup_mask) && apply_once (c))
-       ret = true;
-      else
-       c->buffer->idx++;
-    }
-
-    return ret;
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    if (unlikely (!Lookup::sanitize (c))) return TRACE_RETURN (false);
-    OffsetArrayOf<PosLookupSubTable> &list = CastR<OffsetArrayOf<PosLookupSubTable> > (subTable);
-    return TRACE_RETURN (list.sanitize (c, this, get_type ()));
-  }
-};
-
-typedef OffsetListOf<PosLookup> PosLookupList;
-
-/*
- * GPOS -- The Glyph Positioning Table
- */
-
-struct GPOS : GSUBGPOS
-{
-  static const hb_tag_t Tag    = HB_OT_TAG_GPOS;
-
-  inline const PosLookup& get_lookup (unsigned int i) const
-  { return CastR<PosLookup> (GSUBGPOS::get_lookup (i)); }
-
-  inline bool position_lookup (hb_apply_context_t *c, unsigned int lookup_index) const
-  { return get_lookup (lookup_index).apply_string (c); }
-
-  static inline void position_start (hb_buffer_t *buffer);
-  static inline void position_finish (hb_buffer_t *buffer);
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    if (unlikely (!GSUBGPOS::sanitize (c))) return TRACE_RETURN (false);
-    OffsetTo<PosLookupList> &list = CastR<OffsetTo<PosLookupList> > (lookupList);
-    return TRACE_RETURN (list.sanitize (c, this));
-  }
-  public:
-  DEFINE_SIZE_STATIC (10);
-};
-
-
-static void
-fix_cursive_minor_offset (hb_glyph_position_t *pos, unsigned int i, hb_direction_t direction)
-{
-    unsigned int j = pos[i].cursive_chain();
-    if (likely (!j))
-      return;
-
-    j += i;
-
-    pos[i].cursive_chain() = 0;
-
-    fix_cursive_minor_offset (pos, j, direction);
-
-    if (HB_DIRECTION_IS_HORIZONTAL (direction))
-      pos[i].y_offset += pos[j].y_offset;
-    else
-      pos[i].x_offset += pos[j].x_offset;
-}
-
-static void
-fix_mark_attachment (hb_glyph_position_t *pos, unsigned int i, hb_direction_t direction)
-{
-  if (likely (!(pos[i].attach_lookback())))
-    return;
-
-  unsigned int j = i - pos[i].attach_lookback();
-
-  pos[i].x_advance = 0;
-  pos[i].y_advance = 0;
-  pos[i].x_offset += pos[j].x_offset;
-  pos[i].y_offset += pos[j].y_offset;
-
-  if (HB_DIRECTION_IS_FORWARD (direction))
-    for (unsigned int k = j; k < i; k++) {
-      pos[i].x_offset -= pos[k].x_advance;
-      pos[i].y_offset -= pos[k].y_advance;
-    }
-  else
-    for (unsigned int k = j + 1; k < i + 1; k++) {
-      pos[i].x_offset += pos[k].x_advance;
-      pos[i].y_offset += pos[k].y_advance;
-    }
-}
-
-void
-GPOS::position_start (hb_buffer_t *buffer)
-{
-  buffer->clear_positions ();
-
-  unsigned int count = buffer->len;
-  for (unsigned int i = 0; i < count; i++)
-    buffer->pos[i].attach_lookback() = buffer->pos[i].cursive_chain() = 0;
-}
-
-void
-GPOS::position_finish (hb_buffer_t *buffer)
-{
-  unsigned int len;
-  hb_glyph_position_t *pos = hb_buffer_get_glyph_positions (buffer, &len);
-  hb_direction_t direction = buffer->props.direction;
-
-  /* Handle cursive connections */
-  for (unsigned int i = 0; i < len; i++)
-    fix_cursive_minor_offset (pos, i, direction);
-
-  /* Handle attachments */
-  for (unsigned int i = 0; i < len; i++)
-    fix_mark_attachment (pos, i, direction);
-
-  HB_BUFFER_DEALLOCATE_VAR (buffer, syllable);
-  HB_BUFFER_DEALLOCATE_VAR (buffer, lig_props);
-  HB_BUFFER_DEALLOCATE_VAR (buffer, props_cache);
-}
-
-
-/* Out-of-class implementation for methods recursing */
-
-inline bool ExtensionPos::apply (hb_apply_context_t *c) const
-{
-  TRACE_APPLY ();
-  return TRACE_RETURN (get_subtable ().apply (c, get_type ()));
-}
-
-inline bool ExtensionPos::sanitize (hb_sanitize_context_t *c)
-{
-  TRACE_SANITIZE ();
-  if (unlikely (!Extension::sanitize (c))) return TRACE_RETURN (false);
-  unsigned int offset = get_offset ();
-  if (unlikely (!offset)) return TRACE_RETURN (true);
-  return TRACE_RETURN (StructAtOffset<PosLookupSubTable> (this, offset).sanitize (c, get_type ()));
-}
-
-static inline bool position_lookup (hb_apply_context_t *c, unsigned int lookup_index)
-{
-  const GPOS &gpos = *(c->face->ot_layout->gpos);
-  const PosLookup &l = gpos.get_lookup (lookup_index);
-
-  if (unlikely (c->nesting_level_left == 0))
-    return false;
-
-  hb_apply_context_t new_c (*c);
-  new_c.nesting_level_left--;
-  new_c.set_lookup (l);
-  return l.apply_once (&new_c);
-}
-
-
-#undef attach_lookback
-#undef cursive_chain
-
-
-
-#endif /* HB_OT_LAYOUT_GPOS_TABLE_HH */
diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh
deleted file mode 100644 (file)
index f6a7575..0000000
+++ /dev/null
@@ -1,1253 +0,0 @@
-/*
- * Copyright © 2007,2008,2009,2010  Red Hat, Inc.
- * Copyright © 2010,2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Behdad Esfahbod
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_OT_LAYOUT_GSUB_TABLE_HH
-#define HB_OT_LAYOUT_GSUB_TABLE_HH
-
-#include "hb-ot-layout-gsubgpos-private.hh"
-
-
-
-struct SingleSubstFormat1
-{
-  friend struct SingleSubst;
-
-  private:
-
-  inline void closure (hb_closure_context_t *c) const
-  {
-    TRACE_CLOSURE ();
-    Coverage::Iter iter;
-    for (iter.init (this+coverage); iter.more (); iter.next ()) {
-      hb_codepoint_t glyph_id = iter.get_glyph ();
-      if (c->glyphs->has (glyph_id))
-       c->glyphs->add ((glyph_id + deltaGlyphID) & 0xFFFF);
-    }
-  }
-
-  inline bool would_apply (hb_codepoint_t glyph_id) const
-  {
-    return (this+coverage) (glyph_id) != NOT_COVERED;
-  }
-
-  inline bool apply (hb_apply_context_t *c) const
-  {
-    TRACE_APPLY ();
-    hb_codepoint_t glyph_id = c->buffer->cur().codepoint;
-    unsigned int index = (this+coverage) (glyph_id);
-    if (likely (index == NOT_COVERED)) return TRACE_RETURN (false);
-
-    /* According to the Adobe Annotated OpenType Suite, result is always
-     * limited to 16bit. */
-    glyph_id = (glyph_id + deltaGlyphID) & 0xFFFF;
-    c->replace_glyph (glyph_id);
-
-    return TRACE_RETURN (true);
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (coverage.sanitize (c, this) && deltaGlyphID.sanitize (c));
-  }
-
-  private:
-  USHORT       format;                 /* Format identifier--format = 1 */
-  OffsetTo<Coverage>
-               coverage;               /* Offset to Coverage table--from
-                                        * beginning of Substitution table */
-  SHORT                deltaGlyphID;           /* Add to original GlyphID to get
-                                        * substitute GlyphID */
-  public:
-  DEFINE_SIZE_STATIC (6);
-};
-
-struct SingleSubstFormat2
-{
-  friend struct SingleSubst;
-
-  private:
-
-  inline void closure (hb_closure_context_t *c) const
-  {
-    TRACE_CLOSURE ();
-    Coverage::Iter iter;
-    for (iter.init (this+coverage); iter.more (); iter.next ()) {
-      if (c->glyphs->has (iter.get_glyph ()))
-       c->glyphs->add (substitute[iter.get_coverage ()]);
-    }
-  }
-
-  inline bool would_apply (hb_codepoint_t glyph_id) const
-  {
-    return (this+coverage) (glyph_id) != NOT_COVERED;
-  }
-
-  inline bool apply (hb_apply_context_t *c) const
-  {
-    TRACE_APPLY ();
-    hb_codepoint_t glyph_id = c->buffer->cur().codepoint;
-    unsigned int index = (this+coverage) (glyph_id);
-    if (likely (index == NOT_COVERED)) return TRACE_RETURN (false);
-
-    if (unlikely (index >= substitute.len)) return TRACE_RETURN (false);
-
-    glyph_id = substitute[index];
-    c->replace_glyph (glyph_id);
-
-    return TRACE_RETURN (true);
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (coverage.sanitize (c, this) && substitute.sanitize (c));
-  }
-
-  private:
-  USHORT       format;                 /* Format identifier--format = 2 */
-  OffsetTo<Coverage>
-               coverage;               /* Offset to Coverage table--from
-                                        * beginning of Substitution table */
-  ArrayOf<GlyphID>
-               substitute;             /* Array of substitute
-                                        * GlyphIDs--ordered by Coverage Index */
-  public:
-  DEFINE_SIZE_ARRAY (6, substitute);
-};
-
-struct SingleSubst
-{
-  friend struct SubstLookupSubTable;
-
-  private:
-
-  inline void closure (hb_closure_context_t *c) const
-  {
-    TRACE_CLOSURE ();
-    switch (u.format) {
-    case 1: u.format1.closure (c); break;
-    case 2: u.format2.closure (c); break;
-    default:                       break;
-    }
-  }
-
-  inline bool would_apply (hb_codepoint_t glyph_id) const
-  {
-    switch (u.format) {
-    case 1: return u.format1.would_apply (glyph_id);
-    case 2: return u.format2.would_apply (glyph_id);
-    default:return false;
-    }
-  }
-
-  inline bool apply (hb_apply_context_t *c) const
-  {
-    TRACE_APPLY ();
-    switch (u.format) {
-    case 1: return TRACE_RETURN (u.format1.apply (c));
-    case 2: return TRACE_RETURN (u.format2.apply (c));
-    default:return TRACE_RETURN (false);
-    }
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    if (!u.format.sanitize (c)) return TRACE_RETURN (false);
-    switch (u.format) {
-    case 1: return TRACE_RETURN (u.format1.sanitize (c));
-    case 2: return TRACE_RETURN (u.format2.sanitize (c));
-    default:return TRACE_RETURN (true);
-    }
-  }
-
-  private:
-  union {
-  USHORT               format;         /* Format identifier */
-  SingleSubstFormat1   format1;
-  SingleSubstFormat2   format2;
-  } u;
-};
-
-
-struct Sequence
-{
-  friend struct MultipleSubstFormat1;
-
-  private:
-
-  inline void closure (hb_closure_context_t *c) const
-  {
-    TRACE_CLOSURE ();
-    unsigned int count = substitute.len;
-    for (unsigned int i = 0; i < count; i++)
-      c->glyphs->add (substitute[i]);
-  }
-
-  inline bool apply (hb_apply_context_t *c) const
-  {
-    TRACE_APPLY ();
-    if (unlikely (!substitute.len)) return TRACE_RETURN (false);
-
-    unsigned int klass = c->property & HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE ? HB_OT_LAYOUT_GLYPH_CLASS_BASE_GLYPH : 0;
-    c->replace_glyphs_be16 (1, substitute.len, (const uint16_t *) substitute.array, klass);
-
-    return TRACE_RETURN (true);
-  }
-
-  public:
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (substitute.sanitize (c));
-  }
-
-  private:
-  ArrayOf<GlyphID>
-               substitute;             /* String of GlyphIDs to substitute */
-  public:
-  DEFINE_SIZE_ARRAY (2, substitute);
-};
-
-struct MultipleSubstFormat1
-{
-  friend struct MultipleSubst;
-
-  private:
-
-  inline void closure (hb_closure_context_t *c) const
-  {
-    TRACE_CLOSURE ();
-    Coverage::Iter iter;
-    for (iter.init (this+coverage); iter.more (); iter.next ()) {
-      if (c->glyphs->has (iter.get_glyph ()))
-       (this+sequence[iter.get_coverage ()]).closure (c);
-    }
-  }
-
-  inline bool would_apply (hb_codepoint_t glyph_id) const
-  {
-    return (this+coverage) (glyph_id) != NOT_COVERED;
-  }
-
-  inline bool apply (hb_apply_context_t *c) const
-  {
-    TRACE_APPLY ();
-
-    unsigned int index = (this+coverage) (c->buffer->cur().codepoint);
-    if (likely (index == NOT_COVERED)) return TRACE_RETURN (false);
-
-    return TRACE_RETURN ((this+sequence[index]).apply (c));
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (coverage.sanitize (c, this) && sequence.sanitize (c, this));
-  }
-
-  private:
-  USHORT       format;                 /* Format identifier--format = 1 */
-  OffsetTo<Coverage>
-               coverage;               /* Offset to Coverage table--from
-                                        * beginning of Substitution table */
-  OffsetArrayOf<Sequence>
-               sequence;               /* Array of Sequence tables
-                                        * ordered by Coverage Index */
-  public:
-  DEFINE_SIZE_ARRAY (6, sequence);
-};
-
-struct MultipleSubst
-{
-  friend struct SubstLookupSubTable;
-
-  private:
-
-  inline void closure (hb_closure_context_t *c) const
-  {
-    TRACE_CLOSURE ();
-    switch (u.format) {
-    case 1: u.format1.closure (c); break;
-    default:                       break;
-    }
-  }
-
-  inline bool would_apply (hb_codepoint_t glyph_id) const
-  {
-    switch (u.format) {
-    case 1: return u.format1.would_apply (glyph_id);
-    default:return false;
-    }
-  }
-
-  inline bool apply (hb_apply_context_t *c) const
-  {
-    TRACE_APPLY ();
-    switch (u.format) {
-    case 1: return TRACE_RETURN (u.format1.apply (c));
-    default:return TRACE_RETURN (false);
-    }
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    if (!u.format.sanitize (c)) return TRACE_RETURN (false);
-    switch (u.format) {
-    case 1: return TRACE_RETURN (u.format1.sanitize (c));
-    default:return TRACE_RETURN (true);
-    }
-  }
-
-  private:
-  union {
-  USHORT               format;         /* Format identifier */
-  MultipleSubstFormat1 format1;
-  } u;
-};
-
-
-typedef ArrayOf<GlyphID> AlternateSet; /* Array of alternate GlyphIDs--in
-                                        * arbitrary order */
-
-struct AlternateSubstFormat1
-{
-  friend struct AlternateSubst;
-
-  private:
-
-  inline void closure (hb_closure_context_t *c) const
-  {
-    TRACE_CLOSURE ();
-    Coverage::Iter iter;
-    for (iter.init (this+coverage); iter.more (); iter.next ()) {
-      if (c->glyphs->has (iter.get_glyph ())) {
-       const AlternateSet &alt_set = this+alternateSet[iter.get_coverage ()];
-       unsigned int count = alt_set.len;
-       for (unsigned int i = 0; i < count; i++)
-         c->glyphs->add (alt_set[i]);
-      }
-    }
-  }
-
-  inline bool would_apply (hb_codepoint_t glyph_id) const
-  {
-    return (this+coverage) (glyph_id) != NOT_COVERED;
-  }
-
-  inline bool apply (hb_apply_context_t *c) const
-  {
-    TRACE_APPLY ();
-    hb_codepoint_t glyph_id = c->buffer->cur().codepoint;
-
-    unsigned int index = (this+coverage) (glyph_id);
-    if (likely (index == NOT_COVERED)) return TRACE_RETURN (false);
-
-    const AlternateSet &alt_set = this+alternateSet[index];
-
-    if (unlikely (!alt_set.len)) return TRACE_RETURN (false);
-
-    hb_mask_t glyph_mask = c->buffer->cur().mask;
-    hb_mask_t lookup_mask = c->lookup_mask;
-
-    /* Note: This breaks badly if two features enabled this lookup together. */
-    unsigned int shift = _hb_ctz (lookup_mask);
-    unsigned int alt_index = ((lookup_mask & glyph_mask) >> shift);
-
-    if (unlikely (alt_index > alt_set.len || alt_index == 0)) return TRACE_RETURN (false);
-
-    glyph_id = alt_set[alt_index - 1];
-
-    c->replace_glyph (glyph_id);
-
-    return TRACE_RETURN (true);
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (coverage.sanitize (c, this) && alternateSet.sanitize (c, this));
-  }
-
-  private:
-  USHORT       format;                 /* Format identifier--format = 1 */
-  OffsetTo<Coverage>
-               coverage;               /* Offset to Coverage table--from
-                                        * beginning of Substitution table */
-  OffsetArrayOf<AlternateSet>
-               alternateSet;           /* Array of AlternateSet tables
-                                        * ordered by Coverage Index */
-  public:
-  DEFINE_SIZE_ARRAY (6, alternateSet);
-};
-
-struct AlternateSubst
-{
-  friend struct SubstLookupSubTable;
-
-  private:
-
-  inline void closure (hb_closure_context_t *c) const
-  {
-    TRACE_CLOSURE ();
-    switch (u.format) {
-    case 1: u.format1.closure (c); break;
-    default:                       break;
-    }
-  }
-
-  inline bool would_apply (hb_codepoint_t glyph_id) const
-  {
-    switch (u.format) {
-    case 1: return u.format1.would_apply (glyph_id);
-    default:return false;
-    }
-  }
-
-  inline bool apply (hb_apply_context_t *c) const
-  {
-    TRACE_APPLY ();
-    switch (u.format) {
-    case 1: return TRACE_RETURN (u.format1.apply (c));
-    default:return TRACE_RETURN (false);
-    }
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    if (!u.format.sanitize (c)) return TRACE_RETURN (false);
-    switch (u.format) {
-    case 1: return TRACE_RETURN (u.format1.sanitize (c));
-    default:return TRACE_RETURN (true);
-    }
-  }
-
-  private:
-  union {
-  USHORT               format;         /* Format identifier */
-  AlternateSubstFormat1        format1;
-  } u;
-};
-
-
-struct Ligature
-{
-  friend struct LigatureSet;
-
-  private:
-
-  inline void closure (hb_closure_context_t *c) const
-  {
-    TRACE_CLOSURE ();
-    unsigned int count = component.len;
-    for (unsigned int i = 1; i < count; i++)
-      if (!c->glyphs->has (component[i]))
-        return;
-    c->glyphs->add (ligGlyph);
-  }
-
-  inline bool would_apply (hb_codepoint_t second) const
-  {
-    return component.len == 2 && component[1] == second;
-  }
-
-  inline bool apply (hb_apply_context_t *c) const
-  {
-    TRACE_APPLY ();
-    unsigned int count = component.len;
-    if (unlikely (count < 2)) return TRACE_RETURN (false);
-
-    hb_apply_context_t::mark_skipping_forward_iterator_t skippy_iter (c, c->buffer->idx, count - 1);
-    if (skippy_iter.has_no_chance ()) return TRACE_RETURN (false);
-
-    bool first_was_mark = (c->property & HB_OT_LAYOUT_GLYPH_CLASS_MARK);
-    bool found_non_mark = false;
-
-    for (unsigned int i = 1; i < count; i++)
-    {
-      unsigned int property;
-
-      if (!skippy_iter.next (&property)) return TRACE_RETURN (false);
-
-      found_non_mark |= !(property & HB_OT_LAYOUT_GLYPH_CLASS_MARK);
-
-      if (likely (c->buffer->info[skippy_iter.idx].codepoint != component[i])) return TRACE_RETURN (false);
-    }
-
-    unsigned int klass = first_was_mark && found_non_mark ? HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE : 0;
-
-    /* Allocate new ligature id */
-    unsigned int lig_id = allocate_lig_id (c->buffer);
-    set_lig_props (c->buffer->cur(), lig_id, 0);
-
-    if (skippy_iter.idx < c->buffer->idx + count) /* No input glyphs skipped */
-    {
-      c->replace_glyphs_be16 (count, 1, (const uint16_t *) &ligGlyph, klass);
-    }
-    else
-    {
-      c->replace_glyph (ligGlyph);
-
-      /* Now we must do a second loop to copy the skipped glyphs to
-        `out' and assign component values to it.  We start with the
-        glyph after the first component.  Glyphs between component
-        i and i+1 belong to component i.  Together with the lig_id
-        value it is later possible to check whether a specific
-        component value really belongs to a given ligature. */
-
-      for (unsigned int i = 1; i < count; i++)
-      {
-       while (c->should_mark_skip_current_glyph ())
-       {
-         set_lig_props (c->buffer->cur(),  lig_id, i);
-         c->replace_glyph (c->buffer->cur().codepoint);
-       }
-
-       /* Skip the base glyph */
-       c->buffer->idx++;
-      }
-    }
-
-    return TRACE_RETURN (true);
-  }
-
-  public:
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (ligGlyph.sanitize (c) && component.sanitize (c));
-  }
-
-  private:
-  GlyphID      ligGlyph;               /* GlyphID of ligature to substitute */
-  HeadlessArrayOf<GlyphID>
-               component;              /* Array of component GlyphIDs--start
-                                        * with the second  component--ordered
-                                        * in writing direction */
-  public:
-  DEFINE_SIZE_ARRAY (4, component);
-};
-
-struct LigatureSet
-{
-  friend struct LigatureSubstFormat1;
-
-  private:
-
-  inline void closure (hb_closure_context_t *c) const
-  {
-    TRACE_CLOSURE ();
-    unsigned int num_ligs = ligature.len;
-    for (unsigned int i = 0; i < num_ligs; i++)
-      (this+ligature[i]).closure (c);
-  }
-
-  inline bool would_apply (hb_codepoint_t second) const
-  {
-    unsigned int num_ligs = ligature.len;
-    for (unsigned int i = 0; i < num_ligs; i++)
-    {
-      const Ligature &lig = this+ligature[i];
-      if (lig.would_apply (second))
-        return true;
-    }
-    return false;
-  }
-
-  inline bool apply (hb_apply_context_t *c) const
-  {
-    TRACE_APPLY ();
-    unsigned int num_ligs = ligature.len;
-    for (unsigned int i = 0; i < num_ligs; i++)
-    {
-      const Ligature &lig = this+ligature[i];
-      if (lig.apply (c)) return TRACE_RETURN (true);
-    }
-
-    return TRACE_RETURN (false);
-  }
-
-  public:
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (ligature.sanitize (c, this));
-  }
-
-  private:
-  OffsetArrayOf<Ligature>
-               ligature;               /* Array LigatureSet tables
-                                        * ordered by preference */
-  public:
-  DEFINE_SIZE_ARRAY (2, ligature);
-};
-
-struct LigatureSubstFormat1
-{
-  friend struct LigatureSubst;
-
-  private:
-
-  inline void closure (hb_closure_context_t *c) const
-  {
-    TRACE_CLOSURE ();
-    Coverage::Iter iter;
-    for (iter.init (this+coverage); iter.more (); iter.next ()) {
-      if (c->glyphs->has (iter.get_glyph ()))
-       (this+ligatureSet[iter.get_coverage ()]).closure (c);
-    }
-  }
-
-  inline bool would_apply (hb_codepoint_t first, hb_codepoint_t second) const
-  {
-    unsigned int index;
-    return (index = (this+coverage) (first)) != NOT_COVERED &&
-          (this+ligatureSet[index]).would_apply (second);
-  }
-
-  inline bool apply (hb_apply_context_t *c) const
-  {
-    TRACE_APPLY ();
-    hb_codepoint_t glyph_id = c->buffer->cur().codepoint;
-
-    unsigned int index = (this+coverage) (glyph_id);
-    if (likely (index == NOT_COVERED)) return TRACE_RETURN (false);
-
-    const LigatureSet &lig_set = this+ligatureSet[index];
-    return TRACE_RETURN (lig_set.apply (c));
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (coverage.sanitize (c, this) && ligatureSet.sanitize (c, this));
-  }
-
-  private:
-  USHORT       format;                 /* Format identifier--format = 1 */
-  OffsetTo<Coverage>
-               coverage;               /* Offset to Coverage table--from
-                                        * beginning of Substitution table */
-  OffsetArrayOf<LigatureSet>
-               ligatureSet;            /* Array LigatureSet tables
-                                        * ordered by Coverage Index */
-  public:
-  DEFINE_SIZE_ARRAY (6, ligatureSet);
-};
-
-struct LigatureSubst
-{
-  friend struct SubstLookupSubTable;
-
-  private:
-
-  inline void closure (hb_closure_context_t *c) const
-  {
-    TRACE_CLOSURE ();
-    switch (u.format) {
-    case 1: u.format1.closure (c); break;
-    default:                       break;
-    }
-  }
-
-  inline bool would_apply (hb_codepoint_t first, hb_codepoint_t second) const
-  {
-    switch (u.format) {
-    case 1: return u.format1.would_apply (first, second);
-    default:return false;
-    }
-  }
-
-  inline bool apply (hb_apply_context_t *c) const
-  {
-    TRACE_APPLY ();
-    switch (u.format) {
-    case 1: return TRACE_RETURN (u.format1.apply (c));
-    default:return TRACE_RETURN (false);
-    }
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    if (!u.format.sanitize (c)) return TRACE_RETURN (false);
-    switch (u.format) {
-    case 1: return TRACE_RETURN (u.format1.sanitize (c));
-    default:return TRACE_RETURN (true);
-    }
-  }
-
-  private:
-  union {
-  USHORT               format;         /* Format identifier */
-  LigatureSubstFormat1 format1;
-  } u;
-};
-
-
-static inline bool substitute_lookup (hb_apply_context_t *c, unsigned int lookup_index);
-static inline void closure_lookup (hb_closure_context_t *c, unsigned int lookup_index);
-
-struct ContextSubst : Context
-{
-  friend struct SubstLookupSubTable;
-
-  private:
-
-  inline void closure (hb_closure_context_t *c) const
-  {
-    TRACE_CLOSURE ();
-    return Context::closure (c, closure_lookup);
-  }
-
-  inline bool apply (hb_apply_context_t *c) const
-  {
-    TRACE_APPLY ();
-    return TRACE_RETURN (Context::apply (c, substitute_lookup));
-  }
-};
-
-struct ChainContextSubst : ChainContext
-{
-  friend struct SubstLookupSubTable;
-
-  private:
-
-  inline void closure (hb_closure_context_t *c) const
-  {
-    TRACE_CLOSURE ();
-    return ChainContext::closure (c, closure_lookup);
-  }
-
-  inline bool apply (hb_apply_context_t *c) const
-  {
-    TRACE_APPLY ();
-    return TRACE_RETURN (ChainContext::apply (c, substitute_lookup));
-  }
-};
-
-
-struct ExtensionSubst : Extension
-{
-  friend struct SubstLookupSubTable;
-  friend struct SubstLookup;
-
-  private:
-  inline const struct SubstLookupSubTable& get_subtable (void) const
-  {
-    unsigned int offset = get_offset ();
-    if (unlikely (!offset)) return Null(SubstLookupSubTable);
-    return StructAtOffset<SubstLookupSubTable> (this, offset);
-  }
-
-  inline void closure (hb_closure_context_t *c) const;
-  inline bool would_apply (hb_codepoint_t glyph_id) const;
-  inline bool would_apply (hb_codepoint_t first, hb_codepoint_t second) const;
-
-  inline bool apply (hb_apply_context_t *c) const;
-
-  inline bool sanitize (hb_sanitize_context_t *c);
-
-  inline bool is_reverse (void) const;
-};
-
-
-struct ReverseChainSingleSubstFormat1
-{
-  friend struct ReverseChainSingleSubst;
-
-  private:
-
-  inline void closure (hb_closure_context_t *c) const
-  {
-    TRACE_CLOSURE ();
-    const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage> > (backtrack);
-
-    unsigned int count;
-
-    count = backtrack.len;
-    for (unsigned int i = 0; i < count; i++)
-      if (!(this+backtrack[i]).intersects (c->glyphs))
-        return;
-
-    count = lookahead.len;
-    for (unsigned int i = 0; i < count; i++)
-      if (!(this+lookahead[i]).intersects (c->glyphs))
-        return;
-
-    const ArrayOf<GlyphID> &substitute = StructAfter<ArrayOf<GlyphID> > (lookahead);
-    Coverage::Iter iter;
-    for (iter.init (this+coverage); iter.more (); iter.next ()) {
-      if (c->glyphs->has (iter.get_glyph ()))
-       c->glyphs->add (substitute[iter.get_coverage ()]);
-    }
-  }
-
-  inline bool apply (hb_apply_context_t *c) const
-  {
-    TRACE_APPLY ();
-    if (unlikely (c->nesting_level_left != MAX_NESTING_LEVEL))
-      return TRACE_RETURN (false); /* No chaining to this type */
-
-    unsigned int index = (this+coverage) (c->buffer->cur().codepoint);
-    if (likely (index == NOT_COVERED)) return TRACE_RETURN (false);
-
-    const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage> > (backtrack);
-    const ArrayOf<GlyphID> &substitute = StructAfter<ArrayOf<GlyphID> > (lookahead);
-
-    if (match_backtrack (c,
-                        backtrack.len, (USHORT *) backtrack.array,
-                        match_coverage, this) &&
-        match_lookahead (c,
-                        lookahead.len, (USHORT *) lookahead.array,
-                        match_coverage, this,
-                        1))
-    {
-      c->buffer->cur().codepoint = substitute[index];
-      c->buffer->idx--; /* Reverse! */
-      return TRACE_RETURN (true);
-    }
-
-    return TRACE_RETURN (false);
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    if (!(coverage.sanitize (c, this) && backtrack.sanitize (c, this)))
-      return TRACE_RETURN (false);
-    OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage> > (backtrack);
-    if (!lookahead.sanitize (c, this))
-      return TRACE_RETURN (false);
-    ArrayOf<GlyphID> &substitute = StructAfter<ArrayOf<GlyphID> > (lookahead);
-    return TRACE_RETURN (substitute.sanitize (c));
-  }
-
-  private:
-  USHORT       format;                 /* Format identifier--format = 1 */
-  OffsetTo<Coverage>
-               coverage;               /* Offset to Coverage table--from
-                                        * beginning of table */
-  OffsetArrayOf<Coverage>
-               backtrack;              /* Array of coverage tables
-                                        * in backtracking sequence, in  glyph
-                                        * sequence order */
-  OffsetArrayOf<Coverage>
-               lookaheadX;             /* Array of coverage tables
-                                        * in lookahead sequence, in glyph
-                                        * sequence order */
-  ArrayOf<GlyphID>
-               substituteX;            /* Array of substitute
-                                        * GlyphIDs--ordered by Coverage Index */
-  public:
-  DEFINE_SIZE_MIN (10);
-};
-
-struct ReverseChainSingleSubst
-{
-  friend struct SubstLookupSubTable;
-
-  private:
-
-  inline void closure (hb_closure_context_t *c) const
-  {
-    TRACE_CLOSURE ();
-    switch (u.format) {
-    case 1: u.format1.closure (c); break;
-    default:                       break;
-    }
-  }
-
-  inline bool apply (hb_apply_context_t *c) const
-  {
-    TRACE_APPLY ();
-    switch (u.format) {
-    case 1: return TRACE_RETURN (u.format1.apply (c));
-    default:return TRACE_RETURN (false);
-    }
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    if (!u.format.sanitize (c)) return TRACE_RETURN (false);
-    switch (u.format) {
-    case 1: return TRACE_RETURN (u.format1.sanitize (c));
-    default:return TRACE_RETURN (true);
-    }
-  }
-
-  private:
-  union {
-  USHORT                               format;         /* Format identifier */
-  ReverseChainSingleSubstFormat1       format1;
-  } u;
-};
-
-
-
-/*
- * SubstLookup
- */
-
-struct SubstLookupSubTable
-{
-  friend struct SubstLookup;
-
-  enum Type {
-    Single             = 1,
-    Multiple           = 2,
-    Alternate          = 3,
-    Ligature           = 4,
-    Context            = 5,
-    ChainContext       = 6,
-    Extension          = 7,
-    ReverseChainSingle = 8
-  };
-
-  inline void closure (hb_closure_context_t *c,
-                      unsigned int    lookup_type) const
-  {
-    TRACE_CLOSURE ();
-    switch (lookup_type) {
-    case Single:               u.single.closure (c); break;
-    case Multiple:             u.multiple.closure (c); break;
-    case Alternate:            u.alternate.closure (c); break;
-    case Ligature:             u.ligature.closure (c); break;
-    case Context:              u.c.closure (c); break;
-    case ChainContext:         u.chainContext.closure (c); break;
-    case Extension:            u.extension.closure (c); break;
-    case ReverseChainSingle:   u.reverseChainContextSingle.closure (c); break;
-    default:                    break;
-    }
-  }
-
-  inline bool would_apply (hb_codepoint_t glyph_id,
-                          unsigned int lookup_type) const
-  {
-    switch (lookup_type) {
-    case Single:               return u.single.would_apply (glyph_id);
-    case Multiple:             return u.multiple.would_apply (glyph_id);
-    case Alternate:            return u.alternate.would_apply (glyph_id);
-    case Extension:            return u.extension.would_apply (glyph_id);
-    default:                   return false;
-    }
-  }
-  inline bool would_apply (hb_codepoint_t first,
-                          hb_codepoint_t second,
-                          unsigned int lookup_type) const
-  {
-    switch (lookup_type) {
-    case Ligature:             return u.ligature.would_apply (first, second);
-    case Extension:            return u.extension.would_apply (first, second);
-    default:                   return false;
-    }
-  }
-
-  inline bool apply (hb_apply_context_t *c, unsigned int lookup_type) const
-  {
-    TRACE_APPLY ();
-    switch (lookup_type) {
-    case Single:               return TRACE_RETURN (u.single.apply (c));
-    case Multiple:             return TRACE_RETURN (u.multiple.apply (c));
-    case Alternate:            return TRACE_RETURN (u.alternate.apply (c));
-    case Ligature:             return TRACE_RETURN (u.ligature.apply (c));
-    case Context:              return TRACE_RETURN (u.c.apply (c));
-    case ChainContext:         return TRACE_RETURN (u.chainContext.apply (c));
-    case Extension:            return TRACE_RETURN (u.extension.apply (c));
-    case ReverseChainSingle:   return TRACE_RETURN (u.reverseChainContextSingle.apply (c));
-    default:                   return TRACE_RETURN (false);
-    }
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c, unsigned int lookup_type) {
-    TRACE_SANITIZE ();
-    switch (lookup_type) {
-    case Single:               return TRACE_RETURN (u.single.sanitize (c));
-    case Multiple:             return TRACE_RETURN (u.multiple.sanitize (c));
-    case Alternate:            return TRACE_RETURN (u.alternate.sanitize (c));
-    case Ligature:             return TRACE_RETURN (u.ligature.sanitize (c));
-    case Context:              return TRACE_RETURN (u.c.sanitize (c));
-    case ChainContext:         return TRACE_RETURN (u.chainContext.sanitize (c));
-    case Extension:            return TRACE_RETURN (u.extension.sanitize (c));
-    case ReverseChainSingle:   return TRACE_RETURN (u.reverseChainContextSingle.sanitize (c));
-    default:                   return TRACE_RETURN (true);
-    }
-  }
-
-  private:
-  union {
-  USHORT                       sub_format;
-  SingleSubst                  single;
-  MultipleSubst                        multiple;
-  AlternateSubst               alternate;
-  LigatureSubst                        ligature;
-  ContextSubst                 c;
-  ChainContextSubst            chainContext;
-  ExtensionSubst               extension;
-  ReverseChainSingleSubst      reverseChainContextSingle;
-  } u;
-  public:
-  DEFINE_SIZE_UNION (2, sub_format);
-};
-
-
-struct SubstLookup : Lookup
-{
-  inline const SubstLookupSubTable& get_subtable (unsigned int i) const
-  { return this+CastR<OffsetArrayOf<SubstLookupSubTable> > (subTable)[i]; }
-
-  inline static bool lookup_type_is_reverse (unsigned int lookup_type)
-  { return lookup_type == SubstLookupSubTable::ReverseChainSingle; }
-
-  inline bool is_reverse (void) const
-  {
-    unsigned int type = get_type ();
-    if (unlikely (type == SubstLookupSubTable::Extension))
-      return CastR<ExtensionSubst> (get_subtable(0)).is_reverse ();
-    return lookup_type_is_reverse (type);
-  }
-
-  inline void closure (hb_closure_context_t *c) const
-  {
-    unsigned int lookup_type = get_type ();
-    unsigned int count = get_subtable_count ();
-    for (unsigned int i = 0; i < count; i++)
-      get_subtable (i).closure (c, lookup_type);
-  }
-
-  inline bool would_apply (hb_codepoint_t glyph_id) const
-  {
-    unsigned int lookup_type = get_type ();
-    unsigned int count = get_subtable_count ();
-    for (unsigned int i = 0; i < count; i++)
-      if (get_subtable (i).would_apply (glyph_id, lookup_type))
-       return true;
-    return false;
-  }
-  inline bool would_apply (hb_codepoint_t first, hb_codepoint_t second) const
-  {
-    unsigned int lookup_type = get_type ();
-    unsigned int count = get_subtable_count ();
-    for (unsigned int i = 0; i < count; i++)
-      if (get_subtable (i).would_apply (first, second, lookup_type))
-       return true;
-    return false;
-  }
-
-  inline bool apply_once (hb_apply_context_t *c) const
-  {
-    unsigned int lookup_type = get_type ();
-
-    if (!_hb_ot_layout_check_glyph_property (c->face, &c->buffer->cur(), c->lookup_props, &c->property))
-      return false;
-
-    if (unlikely (lookup_type == SubstLookupSubTable::Extension))
-    {
-      /* The spec says all subtables should have the same type.
-       * This is specially important if one has a reverse type!
-       *
-       * This is rather slow to do this here for every glyph,
-       * but it's easiest, and who uses extension lookups anyway?!*/
-      unsigned int type = get_subtable(0).u.extension.get_type ();
-      unsigned int count = get_subtable_count ();
-      for (unsigned int i = 1; i < count; i++)
-        if (get_subtable(i).u.extension.get_type () != type)
-         return false;
-    }
-
-    unsigned int count = get_subtable_count ();
-    for (unsigned int i = 0; i < count; i++)
-      if (get_subtable (i).apply (c, lookup_type))
-       return true;
-
-    return false;
-  }
-
-  inline bool apply_string (hb_apply_context_t *c) const
-  {
-    bool ret = false;
-
-    if (unlikely (!c->buffer->len))
-      return false;
-
-    c->set_lookup (*this);
-
-    if (likely (!is_reverse ()))
-    {
-       /* in/out forward substitution */
-       c->buffer->clear_output ();
-       c->buffer->idx = 0;
-       while (c->buffer->idx < c->buffer->len)
-       {
-         if ((c->buffer->cur().mask & c->lookup_mask) && apply_once (c))
-           ret = true;
-         else
-           c->buffer->next_glyph ();
-
-       }
-       if (ret)
-         c->buffer->swap_buffers ();
-    }
-    else
-    {
-       /* in-place backward substitution */
-       c->buffer->idx = c->buffer->len - 1;
-       do
-       {
-         if ((c->buffer->cur().mask & c->lookup_mask) && apply_once (c))
-           ret = true;
-         else
-           c->buffer->idx--;
-
-       }
-       while ((int) c->buffer->idx >= 0);
-    }
-
-    return ret;
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    if (unlikely (!Lookup::sanitize (c))) return TRACE_RETURN (false);
-    OffsetArrayOf<SubstLookupSubTable> &list = CastR<OffsetArrayOf<SubstLookupSubTable> > (subTable);
-    return TRACE_RETURN (list.sanitize (c, this, get_type ()));
-  }
-};
-
-typedef OffsetListOf<SubstLookup> SubstLookupList;
-
-/*
- * GSUB -- The Glyph Substitution Table
- */
-
-struct GSUB : GSUBGPOS
-{
-  static const hb_tag_t Tag    = HB_OT_TAG_GSUB;
-
-  inline const SubstLookup& get_lookup (unsigned int i) const
-  { return CastR<SubstLookup> (GSUBGPOS::get_lookup (i)); }
-
-  inline bool substitute_lookup (hb_apply_context_t *c, unsigned int lookup_index) const
-  { return get_lookup (lookup_index).apply_string (c); }
-
-  static inline void substitute_start (hb_buffer_t *buffer);
-  static inline void substitute_finish (hb_buffer_t *buffer);
-
-  inline void closure_lookup (hb_closure_context_t *c,
-                             unsigned int          lookup_index) const
-  { return get_lookup (lookup_index).closure (c); }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    if (unlikely (!GSUBGPOS::sanitize (c))) return TRACE_RETURN (false);
-    OffsetTo<SubstLookupList> &list = CastR<OffsetTo<SubstLookupList> > (lookupList);
-    return TRACE_RETURN (list.sanitize (c, this));
-  }
-  public:
-  DEFINE_SIZE_STATIC (10);
-};
-
-
-void
-GSUB::substitute_start (hb_buffer_t *buffer)
-{
-  HB_BUFFER_ALLOCATE_VAR (buffer, props_cache);
-  HB_BUFFER_ALLOCATE_VAR (buffer, lig_props);
-  HB_BUFFER_ALLOCATE_VAR (buffer, syllable);
-
-  unsigned int count = buffer->len;
-  for (unsigned int i = 0; i < count; i++)
-    buffer->info[i].props_cache() = buffer->info[i].lig_props() = buffer->info[i].syllable() = 0;
-}
-
-void
-GSUB::substitute_finish (hb_buffer_t *buffer HB_UNUSED)
-{
-}
-
-
-/* Out-of-class implementation for methods recursing */
-
-inline void ExtensionSubst::closure (hb_closure_context_t *c) const
-{
-  get_subtable ().closure (c, get_type ());
-}
-
-inline bool ExtensionSubst::would_apply (hb_codepoint_t glyph_id) const
-{
-  return get_subtable ().would_apply (glyph_id, get_type ());
-}
-
-inline bool ExtensionSubst::would_apply (hb_codepoint_t first, hb_codepoint_t second) const
-{
-  return get_subtable ().would_apply (first, second, get_type ());
-}
-
-inline bool ExtensionSubst::apply (hb_apply_context_t *c) const
-{
-  TRACE_APPLY ();
-  return TRACE_RETURN (get_subtable ().apply (c, get_type ()));
-}
-
-inline bool ExtensionSubst::sanitize (hb_sanitize_context_t *c)
-{
-  TRACE_SANITIZE ();
-  if (unlikely (!Extension::sanitize (c))) return TRACE_RETURN (false);
-  unsigned int offset = get_offset ();
-  if (unlikely (!offset)) return TRACE_RETURN (true);
-  return TRACE_RETURN (StructAtOffset<SubstLookupSubTable> (this, offset).sanitize (c, get_type ()));
-}
-
-inline bool ExtensionSubst::is_reverse (void) const
-{
-  unsigned int type = get_type ();
-  if (unlikely (type == SubstLookupSubTable::Extension))
-    return CastR<ExtensionSubst> (get_subtable()).is_reverse ();
-  return SubstLookup::lookup_type_is_reverse (type);
-}
-
-static inline void closure_lookup (hb_closure_context_t *c, unsigned int lookup_index)
-{
-  const GSUB &gsub = *(c->face->ot_layout->gsub);
-  const SubstLookup &l = gsub.get_lookup (lookup_index);
-
-  if (unlikely (c->nesting_level_left == 0))
-    return;
-
-  c->nesting_level_left--;
-  l.closure (c);
-  c->nesting_level_left++;
-}
-
-static inline bool substitute_lookup (hb_apply_context_t *c, unsigned int lookup_index)
-{
-  const GSUB &gsub = *(c->face->ot_layout->gsub);
-  const SubstLookup &l = gsub.get_lookup (lookup_index);
-
-  if (unlikely (c->nesting_level_left == 0))
-    return false;
-
-  hb_apply_context_t new_c (*c);
-  new_c.nesting_level_left--;
-  new_c.set_lookup (l);
-  return l.apply_once (&new_c);
-}
-
-
-
-#endif /* HB_OT_LAYOUT_GSUB_TABLE_HH */
diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh
deleted file mode 100644 (file)
index 12cb694..0000000
+++ /dev/null
@@ -1,1374 +0,0 @@
-/*
- * Copyright © 2007,2008,2009,2010  Red Hat, Inc.
- * Copyright © 2010,2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Behdad Esfahbod
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_OT_LAYOUT_GSUBGPOS_PRIVATE_HH
-#define HB_OT_LAYOUT_GSUBGPOS_PRIVATE_HH
-
-#include "hb-buffer-private.hh"
-#include "hb-ot-layout-gdef-table.hh"
-
-
-
-/* unique ligature id */
-/* component number in the ligature (0 = base) */
-static inline void
-set_lig_props (hb_glyph_info_t &info, unsigned int lig_id, unsigned int lig_comp)
-{
-  info.lig_props() = (lig_id << 4) | (lig_comp & 0x0F);
-}
-static inline unsigned int
-get_lig_id (hb_glyph_info_t &info)
-{
-  return info.lig_props() >> 4;
-}
-static inline unsigned int
-get_lig_comp (hb_glyph_info_t &info)
-{
-  return info.lig_props() & 0x0F;
-}
-
-static inline uint8_t allocate_lig_id (hb_buffer_t *buffer) {
-  uint8_t lig_id = buffer->next_serial () & 0x0F;
-  if (unlikely (!lig_id))
-    lig_id = allocate_lig_id (buffer); /* in case of overflow */
-  return lig_id;
-}
-
-
-
-#ifndef HB_DEBUG_CLOSURE
-#define HB_DEBUG_CLOSURE (HB_DEBUG+0)
-#endif
-
-#define TRACE_CLOSURE() \
-       hb_auto_trace_t<HB_DEBUG_CLOSURE> trace (&c->debug_depth, "CLOSURE", this, HB_FUNC, "");
-
-
-/* TODO Add TRACE_RETURN annotation for would_apply */
-
-
-struct hb_closure_context_t
-{
-  hb_face_t *face;
-  hb_set_t *glyphs;
-  unsigned int nesting_level_left;
-  unsigned int debug_depth;
-
-
-  hb_closure_context_t (hb_face_t *face_,
-                       hb_set_t *glyphs_,
-                       unsigned int nesting_level_left_ = MAX_NESTING_LEVEL) :
-                         face (face_), glyphs (glyphs_),
-                         nesting_level_left (nesting_level_left_),
-                         debug_depth (0) {}
-};
-
-
-
-#ifndef HB_DEBUG_APPLY
-#define HB_DEBUG_APPLY (HB_DEBUG+0)
-#endif
-
-#define TRACE_APPLY() \
-       hb_auto_trace_t<HB_DEBUG_APPLY> trace (&c->debug_depth, "APPLY", this, HB_FUNC, "idx %d codepoint %u", c->buffer->cur().codepoint);
-
-
-
-struct hb_apply_context_t
-{
-  hb_font_t *font;
-  hb_face_t *face;
-  hb_buffer_t *buffer;
-  hb_direction_t direction;
-  hb_mask_t lookup_mask;
-  unsigned int nesting_level_left;
-  unsigned int lookup_props;
-  unsigned int property; /* propety of first glyph */
-  unsigned int debug_depth;
-
-
-  hb_apply_context_t (hb_font_t *font_,
-                     hb_face_t *face_,
-                     hb_buffer_t *buffer_,
-                     hb_mask_t lookup_mask_) :
-                       font (font_), face (face_), buffer (buffer_),
-                       direction (buffer_->props.direction),
-                       lookup_mask (lookup_mask_),
-                       nesting_level_left (MAX_NESTING_LEVEL),
-                       lookup_props (0), property (0), debug_depth (0) {}
-
-  void set_lookup (const Lookup &l) {
-    lookup_props = l.get_props ();
-  }
-
-  struct mark_skipping_forward_iterator_t
-  {
-    inline mark_skipping_forward_iterator_t (hb_apply_context_t *c_,
-                                            unsigned int start_index_,
-                                            unsigned int num_items_,
-                                            bool context_match = false)
-    {
-      c = c_;
-      idx = start_index_;
-      num_items = num_items_;
-      mask = context_match ? -1 : c->lookup_mask;
-      syllable = context_match ? 0 : c->buffer->cur().syllable ();
-      end = c->buffer->len;
-    }
-    inline bool has_no_chance (void) const
-    {
-      return unlikely (num_items && idx + num_items >= end);
-    }
-    inline bool next (unsigned int *property_out,
-                     unsigned int lookup_props)
-    {
-      assert (num_items > 0);
-      do
-      {
-       if (has_no_chance ())
-         return false;
-       idx++;
-      } while (_hb_ot_layout_skip_mark (c->face, &c->buffer->info[idx], lookup_props, property_out));
-      num_items--;
-      return (c->buffer->info[idx].mask & mask) && (!syllable || syllable == c->buffer->info[idx].syllable ());
-    }
-    inline bool next (unsigned int *property_out = NULL)
-    {
-      return next (property_out, c->lookup_props);
-    }
-
-    unsigned int idx;
-    private:
-    hb_apply_context_t *c;
-    unsigned int num_items;
-    hb_mask_t mask;
-    uint8_t syllable;
-    unsigned int end;
-  };
-
-  struct mark_skipping_backward_iterator_t
-  {
-    inline mark_skipping_backward_iterator_t (hb_apply_context_t *c_,
-                                             unsigned int start_index_,
-                                             unsigned int num_items_,
-                                             hb_mask_t mask_ = 0,
-                                             bool match_syllable_ = true)
-    {
-      c = c_;
-      idx = start_index_;
-      num_items = num_items_;
-      mask = mask_ ? mask_ : c->lookup_mask;
-      syllable = match_syllable_ ? c->buffer->cur().syllable () : 0;
-    }
-    inline bool has_no_chance (void) const
-    {
-      return unlikely (idx < num_items);
-    }
-    inline bool prev (unsigned int *property_out,
-                     unsigned int lookup_props)
-    {
-      assert (num_items > 0);
-      do
-      {
-       if (has_no_chance ())
-         return false;
-       idx--;
-      } while (_hb_ot_layout_skip_mark (c->face, &c->buffer->out_info[idx], lookup_props, property_out));
-      num_items--;
-      return (c->buffer->out_info[idx].mask & mask) && (!syllable || syllable == c->buffer->out_info[idx].syllable ());
-    }
-    inline bool prev (unsigned int *property_out = NULL)
-    {
-      return prev (property_out, c->lookup_props);
-    }
-
-    unsigned int idx;
-    private:
-    hb_apply_context_t *c;
-    unsigned int num_items;
-    hb_mask_t mask;
-    uint8_t syllable;
-  };
-
-  inline bool should_mark_skip_current_glyph (void) const
-  {
-    return _hb_ot_layout_skip_mark (face, &buffer->cur(), lookup_props, NULL);
-  }
-
-
-
-  inline void replace_glyph (hb_codepoint_t glyph_index,
-                            unsigned int klass = 0) const
-  {
-    buffer->cur().props_cache() = klass; /*XXX if has gdef? */
-    buffer->replace_glyph (glyph_index);
-  }
-  inline void replace_glyphs_be16 (unsigned int num_in,
-                                  unsigned int num_out,
-                                  const uint16_t *glyph_data_be,
-                                  unsigned int klass = 0) const
-  {
-    buffer->cur().props_cache() = klass; /* XXX if has gdef? */
-    buffer->replace_glyphs_be16 (num_in, num_out, glyph_data_be);
-  }
-};
-
-
-
-typedef bool (*intersects_func_t) (hb_set_t *glyphs, const USHORT &value, const void *data);
-typedef bool (*match_func_t) (hb_codepoint_t glyph_id, const USHORT &value, const void *data);
-typedef void (*closure_lookup_func_t) (hb_closure_context_t *c, unsigned int lookup_index);
-typedef bool (*apply_lookup_func_t) (hb_apply_context_t *c, unsigned int lookup_index);
-
-struct ContextClosureFuncs
-{
-  intersects_func_t intersects;
-  closure_lookup_func_t closure;
-};
-struct ContextApplyFuncs
-{
-  match_func_t match;
-  apply_lookup_func_t apply;
-};
-
-static inline bool intersects_glyph (hb_set_t *glyphs, const USHORT &value, const void *data HB_UNUSED)
-{
-  return glyphs->has (value);
-}
-static inline bool intersects_class (hb_set_t *glyphs, const USHORT &value, const void *data)
-{
-  const ClassDef &class_def = *reinterpret_cast<const ClassDef *>(data);
-  return class_def.intersects_class (glyphs, value);
-}
-static inline bool intersects_coverage (hb_set_t *glyphs, const USHORT &value, const void *data)
-{
-  const OffsetTo<Coverage> &coverage = (const OffsetTo<Coverage>&)value;
-  return (data+coverage).intersects (glyphs);
-}
-
-static inline bool intersects_array (hb_closure_context_t *c,
-                                    unsigned int count,
-                                    const USHORT values[],
-                                    intersects_func_t intersects_func,
-                                    const void *intersects_data)
-{
-  for (unsigned int i = 0; i < count; i++)
-    if (likely (!intersects_func (c->glyphs, values[i], intersects_data)))
-      return false;
-  return true;
-}
-
-
-static inline bool match_glyph (hb_codepoint_t glyph_id, const USHORT &value, const void *data HB_UNUSED)
-{
-  return glyph_id == value;
-}
-
-static inline bool match_class (hb_codepoint_t glyph_id, const USHORT &value, const void *data)
-{
-  const ClassDef &class_def = *reinterpret_cast<const ClassDef *>(data);
-  return class_def.get_class (glyph_id) == value;
-}
-
-static inline bool match_coverage (hb_codepoint_t glyph_id, const USHORT &value, const void *data)
-{
-  const OffsetTo<Coverage> &coverage = (const OffsetTo<Coverage>&)value;
-  return (data+coverage).get_coverage (glyph_id) != NOT_COVERED;
-}
-
-
-static inline bool match_input (hb_apply_context_t *c,
-                               unsigned int count, /* Including the first glyph (not matched) */
-                               const USHORT input[], /* Array of input values--start with second glyph */
-                               match_func_t match_func,
-                               const void *match_data,
-                               unsigned int *end_offset = NULL)
-{
-  hb_apply_context_t::mark_skipping_forward_iterator_t skippy_iter (c, c->buffer->idx, count - 1);
-  if (skippy_iter.has_no_chance ())
-    return false;
-
-  for (unsigned int i = 1; i < count; i++)
-  {
-    if (!skippy_iter.next ())
-      return false;
-
-    if (likely (!match_func (c->buffer->info[skippy_iter.idx].codepoint, input[i - 1], match_data)))
-      return false;
-  }
-
-  if (end_offset)
-    *end_offset = skippy_iter.idx - c->buffer->idx + 1;
-
-  return true;
-}
-
-static inline bool match_backtrack (hb_apply_context_t *c,
-                                   unsigned int count,
-                                   const USHORT backtrack[],
-                                   match_func_t match_func,
-                                   const void *match_data)
-{
-  hb_apply_context_t::mark_skipping_backward_iterator_t skippy_iter (c, c->buffer->backtrack_len (), count, true);
-  if (skippy_iter.has_no_chance ())
-    return false;
-
-  for (unsigned int i = 0; i < count; i++)
-  {
-    if (!skippy_iter.prev ())
-      return false;
-
-    if (likely (!match_func (c->buffer->out_info[skippy_iter.idx].codepoint, backtrack[i], match_data)))
-      return false;
-  }
-
-  return true;
-}
-
-static inline bool match_lookahead (hb_apply_context_t *c,
-                                   unsigned int count,
-                                   const USHORT lookahead[],
-                                   match_func_t match_func,
-                                   const void *match_data,
-                                   unsigned int offset)
-{
-  hb_apply_context_t::mark_skipping_forward_iterator_t skippy_iter (c, c->buffer->idx + offset - 1, count, true);
-  if (skippy_iter.has_no_chance ())
-    return false;
-
-  for (unsigned int i = 0; i < count; i++)
-  {
-    if (!skippy_iter.next ())
-      return false;
-
-    if (likely (!match_func (c->buffer->info[skippy_iter.idx].codepoint, lookahead[i], match_data)))
-      return false;
-  }
-
-  return true;
-}
-
-
-
-struct LookupRecord
-{
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (c->check_struct (this));
-  }
-
-  USHORT       sequenceIndex;          /* Index into current glyph
-                                        * sequence--first glyph = 0 */
-  USHORT       lookupListIndex;        /* Lookup to apply to that
-                                        * position--zero--based */
-  public:
-  DEFINE_SIZE_STATIC (4);
-};
-
-
-static inline void closure_lookup (hb_closure_context_t *c,
-                                  unsigned int lookupCount,
-                                  const LookupRecord lookupRecord[], /* Array of LookupRecords--in design order */
-                                  closure_lookup_func_t closure_func)
-{
-  for (unsigned int i = 0; i < lookupCount; i++)
-    closure_func (c, lookupRecord->lookupListIndex);
-}
-
-static inline bool apply_lookup (hb_apply_context_t *c,
-                                unsigned int count, /* Including the first glyph */
-                                unsigned int lookupCount,
-                                const LookupRecord lookupRecord[], /* Array of LookupRecords--in design order */
-                                apply_lookup_func_t apply_func)
-{
-  unsigned int end = c->buffer->len;
-  if (unlikely (count == 0 || c->buffer->idx + count > end))
-    return false;
-
-  /* TODO We don't support lookupRecord arrays that are not increasing:
-   *      Should be easy for in_place ones at least. */
-
-  /* Note: If sublookup is reverse, it will underflow after the first loop
-   * and we jump out of it.  Not entirely disastrous.  So we don't check
-   * for reverse lookup here.
-   */
-  for (unsigned int i = 0; i < count; /* NOP */)
-  {
-    if (unlikely (c->buffer->idx == end))
-      return true;
-    while (c->should_mark_skip_current_glyph ())
-    {
-      /* No lookup applied for this index */
-      c->buffer->next_glyph ();
-      if (unlikely (c->buffer->idx == end))
-       return true;
-    }
-
-    if (lookupCount && i == lookupRecord->sequenceIndex)
-    {
-      unsigned int old_pos = c->buffer->idx;
-
-      /* Apply a lookup */
-      bool done = apply_func (c, lookupRecord->lookupListIndex);
-
-      lookupRecord++;
-      lookupCount--;
-      /* Err, this is wrong if the lookup jumped over some glyphs */
-      i += c->buffer->idx - old_pos;
-      if (unlikely (c->buffer->idx == end))
-       return true;
-
-      if (!done)
-       goto not_applied;
-    }
-    else
-    {
-    not_applied:
-      /* No lookup applied for this index */
-      c->buffer->next_glyph ();
-      i++;
-    }
-  }
-
-  return true;
-}
-
-
-
-/* Contextual lookups */
-
-struct ContextClosureLookupContext
-{
-  ContextClosureFuncs funcs;
-  const void *intersects_data;
-};
-
-struct ContextApplyLookupContext
-{
-  ContextApplyFuncs funcs;
-  const void *match_data;
-};
-
-static inline void context_closure_lookup (hb_closure_context_t *c,
-                                          unsigned int inputCount, /* Including the first glyph (not matched) */
-                                          const USHORT input[], /* Array of input values--start with second glyph */
-                                          unsigned int lookupCount,
-                                          const LookupRecord lookupRecord[],
-                                          ContextClosureLookupContext &lookup_context)
-{
-  if (intersects_array (c,
-                       inputCount ? inputCount - 1 : 0, input,
-                       lookup_context.funcs.intersects, lookup_context.intersects_data))
-    closure_lookup (c,
-                   lookupCount, lookupRecord,
-                   lookup_context.funcs.closure);
-}
-
-
-static inline bool context_apply_lookup (hb_apply_context_t *c,
-                                        unsigned int inputCount, /* Including the first glyph (not matched) */
-                                        const USHORT input[], /* Array of input values--start with second glyph */
-                                        unsigned int lookupCount,
-                                        const LookupRecord lookupRecord[],
-                                        ContextApplyLookupContext &lookup_context)
-{
-  return match_input (c,
-                     inputCount, input,
-                     lookup_context.funcs.match, lookup_context.match_data)
-      && apply_lookup (c,
-                      inputCount,
-                      lookupCount, lookupRecord,
-                      lookup_context.funcs.apply);
-}
-
-struct Rule
-{
-  friend struct RuleSet;
-
-  private:
-
-  inline void closure (hb_closure_context_t *c, ContextClosureLookupContext &lookup_context) const
-  {
-    TRACE_CLOSURE ();
-    const LookupRecord *lookupRecord = &StructAtOffset<LookupRecord> (input, input[0].static_size * (inputCount ? inputCount - 1 : 0));
-    context_closure_lookup (c,
-                           inputCount, input,
-                           lookupCount, lookupRecord,
-                           lookup_context);
-  }
-
-  inline bool apply (hb_apply_context_t *c, ContextApplyLookupContext &lookup_context) const
-  {
-    TRACE_APPLY ();
-    const LookupRecord *lookupRecord = &StructAtOffset<LookupRecord> (input, input[0].static_size * (inputCount ? inputCount - 1 : 0));
-    return TRACE_RETURN (context_apply_lookup (c, inputCount, input, lookupCount, lookupRecord, lookup_context));
-  }
-
-  public:
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return inputCount.sanitize (c)
-       && lookupCount.sanitize (c)
-       && c->check_range (input,
-                          input[0].static_size * inputCount
-                          + lookupRecordX[0].static_size * lookupCount);
-  }
-
-  private:
-  USHORT       inputCount;             /* Total number of glyphs in input
-                                        * glyph sequence--includes the first
-                                        * glyph */
-  USHORT       lookupCount;            /* Number of LookupRecords */
-  USHORT       input[VAR];             /* Array of match inputs--start with
-                                        * second glyph */
-  LookupRecord lookupRecordX[VAR];     /* Array of LookupRecords--in
-                                        * design order */
-  public:
-  DEFINE_SIZE_ARRAY2 (4, input, lookupRecordX);
-};
-
-struct RuleSet
-{
-  inline void closure (hb_closure_context_t *c, ContextClosureLookupContext &lookup_context) const
-  {
-    TRACE_CLOSURE ();
-    unsigned int num_rules = rule.len;
-    for (unsigned int i = 0; i < num_rules; i++)
-      (this+rule[i]).closure (c, lookup_context);
-  }
-
-  inline bool apply (hb_apply_context_t *c, ContextApplyLookupContext &lookup_context) const
-  {
-    TRACE_APPLY ();
-    unsigned int num_rules = rule.len;
-    for (unsigned int i = 0; i < num_rules; i++)
-    {
-      if ((this+rule[i]).apply (c, lookup_context))
-        return TRACE_RETURN (true);
-    }
-    return TRACE_RETURN (false);
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (rule.sanitize (c, this));
-  }
-
-  private:
-  OffsetArrayOf<Rule>
-               rule;                   /* Array of Rule tables
-                                        * ordered by preference */
-  public:
-  DEFINE_SIZE_ARRAY (2, rule);
-};
-
-
-struct ContextFormat1
-{
-  friend struct Context;
-
-  private:
-
-  inline void closure (hb_closure_context_t *c, closure_lookup_func_t closure_func) const
-  {
-    TRACE_CLOSURE ();
-
-    const Coverage &cov = (this+coverage);
-
-    struct ContextClosureLookupContext lookup_context = {
-      {intersects_glyph, closure_func},
-      NULL
-    };
-
-    unsigned int count = ruleSet.len;
-    for (unsigned int i = 0; i < count; i++)
-      if (cov.intersects_coverage (c->glyphs, i)) {
-       const RuleSet &rule_set = this+ruleSet[i];
-       rule_set.closure (c, lookup_context);
-      }
-  }
-
-  inline bool apply (hb_apply_context_t *c, apply_lookup_func_t apply_func) const
-  {
-    TRACE_APPLY ();
-    unsigned int index = (this+coverage) (c->buffer->cur().codepoint);
-    if (likely (index == NOT_COVERED))
-      return TRACE_RETURN (false);
-
-    const RuleSet &rule_set = this+ruleSet[index];
-    struct ContextApplyLookupContext lookup_context = {
-      {match_glyph, apply_func},
-      NULL
-    };
-    return TRACE_RETURN (rule_set.apply (c, lookup_context));
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (coverage.sanitize (c, this) && ruleSet.sanitize (c, this));
-  }
-
-  private:
-  USHORT       format;                 /* Format identifier--format = 1 */
-  OffsetTo<Coverage>
-               coverage;               /* Offset to Coverage table--from
-                                        * beginning of table */
-  OffsetArrayOf<RuleSet>
-               ruleSet;                /* Array of RuleSet tables
-                                        * ordered by Coverage Index */
-  public:
-  DEFINE_SIZE_ARRAY (6, ruleSet);
-};
-
-
-struct ContextFormat2
-{
-  friend struct Context;
-
-  private:
-
-  inline void closure (hb_closure_context_t *c, closure_lookup_func_t closure_func) const
-  {
-    TRACE_CLOSURE ();
-    if (!(this+coverage).intersects (c->glyphs))
-      return;
-
-    const ClassDef &class_def = this+classDef;
-
-    struct ContextClosureLookupContext lookup_context = {
-      {intersects_class, closure_func},
-      NULL
-    };
-
-    unsigned int count = ruleSet.len;
-    for (unsigned int i = 0; i < count; i++)
-      if (class_def.intersects_class (c->glyphs, i)) {
-       const RuleSet &rule_set = this+ruleSet[i];
-       rule_set.closure (c, lookup_context);
-      }
-  }
-
-  inline bool apply (hb_apply_context_t *c, apply_lookup_func_t apply_func) const
-  {
-    TRACE_APPLY ();
-    unsigned int index = (this+coverage) (c->buffer->cur().codepoint);
-    if (likely (index == NOT_COVERED)) return TRACE_RETURN (false);
-
-    const ClassDef &class_def = this+classDef;
-    index = class_def (c->buffer->cur().codepoint);
-    const RuleSet &rule_set = this+ruleSet[index];
-    struct ContextApplyLookupContext lookup_context = {
-      {match_class, apply_func},
-      &class_def
-    };
-    return TRACE_RETURN (rule_set.apply (c, lookup_context));
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (coverage.sanitize (c, this) && classDef.sanitize (c, this) && ruleSet.sanitize (c, this));
-  }
-
-  private:
-  USHORT       format;                 /* Format identifier--format = 2 */
-  OffsetTo<Coverage>
-               coverage;               /* Offset to Coverage table--from
-                                        * beginning of table */
-  OffsetTo<ClassDef>
-               classDef;               /* Offset to glyph ClassDef table--from
-                                        * beginning of table */
-  OffsetArrayOf<RuleSet>
-               ruleSet;                /* Array of RuleSet tables
-                                        * ordered by class */
-  public:
-  DEFINE_SIZE_ARRAY (8, ruleSet);
-};
-
-
-struct ContextFormat3
-{
-  friend struct Context;
-
-  private:
-
-  inline void closure (hb_closure_context_t *c, closure_lookup_func_t closure_func) const
-  {
-    TRACE_CLOSURE ();
-    if (!(this+coverage[0]).intersects (c->glyphs))
-      return;
-
-    const LookupRecord *lookupRecord = &StructAtOffset<LookupRecord> (coverage, coverage[0].static_size * glyphCount);
-    struct ContextClosureLookupContext lookup_context = {
-      {intersects_coverage, closure_func},
-      this
-    };
-    context_closure_lookup (c,
-                           glyphCount, (const USHORT *) (coverage + 1),
-                           lookupCount, lookupRecord,
-                           lookup_context);
-  }
-
-  inline bool apply (hb_apply_context_t *c, apply_lookup_func_t apply_func) const
-  {
-    TRACE_APPLY ();
-    unsigned int index = (this+coverage[0]) (c->buffer->cur().codepoint);
-    if (likely (index == NOT_COVERED)) return TRACE_RETURN (false);
-
-    const LookupRecord *lookupRecord = &StructAtOffset<LookupRecord> (coverage, coverage[0].static_size * glyphCount);
-    struct ContextApplyLookupContext lookup_context = {
-      {match_coverage, apply_func},
-      this
-    };
-    return TRACE_RETURN (context_apply_lookup (c, glyphCount, (const USHORT *) (coverage + 1), lookupCount, lookupRecord, lookup_context));
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    if (!c->check_struct (this)) return TRACE_RETURN (false);
-    unsigned int count = glyphCount;
-    if (!c->check_array (coverage, coverage[0].static_size, count)) return TRACE_RETURN (false);
-    for (unsigned int i = 0; i < count; i++)
-      if (!coverage[i].sanitize (c, this)) return TRACE_RETURN (false);
-    LookupRecord *lookupRecord = &StructAtOffset<LookupRecord> (coverage, coverage[0].static_size * count);
-    return TRACE_RETURN (c->check_array (lookupRecord, lookupRecord[0].static_size, lookupCount));
-  }
-
-  private:
-  USHORT       format;                 /* Format identifier--format = 3 */
-  USHORT       glyphCount;             /* Number of glyphs in the input glyph
-                                        * sequence */
-  USHORT       lookupCount;            /* Number of LookupRecords */
-  OffsetTo<Coverage>
-               coverage[VAR];          /* Array of offsets to Coverage
-                                        * table in glyph sequence order */
-  LookupRecord lookupRecordX[VAR];     /* Array of LookupRecords--in
-                                        * design order */
-  public:
-  DEFINE_SIZE_ARRAY2 (6, coverage, lookupRecordX);
-};
-
-struct Context
-{
-  protected:
-
-  inline void closure (hb_closure_context_t *c, closure_lookup_func_t closure_func) const
-  {
-    TRACE_CLOSURE ();
-    switch (u.format) {
-    case 1: u.format1.closure (c, closure_func); break;
-    case 2: u.format2.closure (c, closure_func); break;
-    case 3: u.format3.closure (c, closure_func); break;
-    default:                                     break;
-    }
-  }
-
-  inline bool apply (hb_apply_context_t *c, apply_lookup_func_t apply_func) const
-  {
-    TRACE_APPLY ();
-    switch (u.format) {
-    case 1: return TRACE_RETURN (u.format1.apply (c, apply_func));
-    case 2: return TRACE_RETURN (u.format2.apply (c, apply_func));
-    case 3: return TRACE_RETURN (u.format3.apply (c, apply_func));
-    default:return TRACE_RETURN (false);
-    }
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    if (!u.format.sanitize (c)) return TRACE_RETURN (false);
-    switch (u.format) {
-    case 1: return TRACE_RETURN (u.format1.sanitize (c));
-    case 2: return TRACE_RETURN (u.format2.sanitize (c));
-    case 3: return TRACE_RETURN (u.format3.sanitize (c));
-    default:return TRACE_RETURN (true);
-    }
-  }
-
-  private:
-  union {
-  USHORT               format;         /* Format identifier */
-  ContextFormat1       format1;
-  ContextFormat2       format2;
-  ContextFormat3       format3;
-  } u;
-};
-
-
-/* Chaining Contextual lookups */
-
-struct ChainContextClosureLookupContext
-{
-  ContextClosureFuncs funcs;
-  const void *intersects_data[3];
-};
-
-struct ChainContextApplyLookupContext
-{
-  ContextApplyFuncs funcs;
-  const void *match_data[3];
-};
-
-static inline void chain_context_closure_lookup (hb_closure_context_t *c,
-                                                unsigned int backtrackCount,
-                                                const USHORT backtrack[],
-                                                unsigned int inputCount, /* Including the first glyph (not matched) */
-                                                const USHORT input[], /* Array of input values--start with second glyph */
-                                                unsigned int lookaheadCount,
-                                                const USHORT lookahead[],
-                                                unsigned int lookupCount,
-                                                const LookupRecord lookupRecord[],
-                                                ChainContextClosureLookupContext &lookup_context)
-{
-  if (intersects_array (c,
-                       backtrackCount, backtrack,
-                       lookup_context.funcs.intersects, lookup_context.intersects_data[0])
-   && intersects_array (c,
-                       inputCount ? inputCount - 1 : 0, input,
-                       lookup_context.funcs.intersects, lookup_context.intersects_data[1])
-  && intersects_array (c,
-                      lookaheadCount, lookahead,
-                      lookup_context.funcs.intersects, lookup_context.intersects_data[2]))
-    closure_lookup (c,
-                   lookupCount, lookupRecord,
-                   lookup_context.funcs.closure);
-}
-
-static inline bool chain_context_apply_lookup (hb_apply_context_t *c,
-                                              unsigned int backtrackCount,
-                                              const USHORT backtrack[],
-                                              unsigned int inputCount, /* Including the first glyph (not matched) */
-                                              const USHORT input[], /* Array of input values--start with second glyph */
-                                              unsigned int lookaheadCount,
-                                              const USHORT lookahead[],
-                                              unsigned int lookupCount,
-                                              const LookupRecord lookupRecord[],
-                                              ChainContextApplyLookupContext &lookup_context)
-{
-  unsigned int lookahead_offset;
-  return match_backtrack (c,
-                         backtrackCount, backtrack,
-                         lookup_context.funcs.match, lookup_context.match_data[0])
-      && match_input (c,
-                     inputCount, input,
-                     lookup_context.funcs.match, lookup_context.match_data[1],
-                     &lookahead_offset)
-      && match_lookahead (c,
-                         lookaheadCount, lookahead,
-                         lookup_context.funcs.match, lookup_context.match_data[2],
-                         lookahead_offset)
-      && apply_lookup (c,
-                      inputCount,
-                      lookupCount, lookupRecord,
-                      lookup_context.funcs.apply);
-}
-
-struct ChainRule
-{
-  friend struct ChainRuleSet;
-
-  private:
-
-  inline void closure (hb_closure_context_t *c, ChainContextClosureLookupContext &lookup_context) const
-  {
-    TRACE_CLOSURE ();
-    const HeadlessArrayOf<USHORT> &input = StructAfter<HeadlessArrayOf<USHORT> > (backtrack);
-    const ArrayOf<USHORT> &lookahead = StructAfter<ArrayOf<USHORT> > (input);
-    const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord> > (lookahead);
-    chain_context_closure_lookup (c,
-                                 backtrack.len, backtrack.array,
-                                 input.len, input.array,
-                                 lookahead.len, lookahead.array,
-                                 lookup.len, lookup.array,
-                                 lookup_context);
-  }
-
-  inline bool apply (hb_apply_context_t *c, ChainContextApplyLookupContext &lookup_context) const
-  {
-    TRACE_APPLY ();
-    const HeadlessArrayOf<USHORT> &input = StructAfter<HeadlessArrayOf<USHORT> > (backtrack);
-    const ArrayOf<USHORT> &lookahead = StructAfter<ArrayOf<USHORT> > (input);
-    const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord> > (lookahead);
-    return TRACE_RETURN (chain_context_apply_lookup (c,
-                                                    backtrack.len, backtrack.array,
-                                                    input.len, input.array,
-                                                    lookahead.len, lookahead.array, lookup.len,
-                                                    lookup.array, lookup_context));
-  }
-
-  public:
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    if (!backtrack.sanitize (c)) return TRACE_RETURN (false);
-    HeadlessArrayOf<USHORT> &input = StructAfter<HeadlessArrayOf<USHORT> > (backtrack);
-    if (!input.sanitize (c)) return TRACE_RETURN (false);
-    ArrayOf<USHORT> &lookahead = StructAfter<ArrayOf<USHORT> > (input);
-    if (!lookahead.sanitize (c)) return TRACE_RETURN (false);
-    ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord> > (lookahead);
-    return TRACE_RETURN (lookup.sanitize (c));
-  }
-
-  private:
-  ArrayOf<USHORT>
-               backtrack;              /* Array of backtracking values
-                                        * (to be matched before the input
-                                        * sequence) */
-  HeadlessArrayOf<USHORT>
-               inputX;                 /* Array of input values (start with
-                                        * second glyph) */
-  ArrayOf<USHORT>
-               lookaheadX;             /* Array of lookahead values's (to be
-                                        * matched after the input sequence) */
-  ArrayOf<LookupRecord>
-               lookupX;                /* Array of LookupRecords--in
-                                        * design order) */
-  public:
-  DEFINE_SIZE_MIN (8);
-};
-
-struct ChainRuleSet
-{
-  inline void closure (hb_closure_context_t *c, ChainContextClosureLookupContext &lookup_context) const
-  {
-    TRACE_CLOSURE ();
-    unsigned int num_rules = rule.len;
-    for (unsigned int i = 0; i < num_rules; i++)
-      (this+rule[i]).closure (c, lookup_context);
-  }
-
-  inline bool apply (hb_apply_context_t *c, ChainContextApplyLookupContext &lookup_context) const
-  {
-    TRACE_APPLY ();
-    unsigned int num_rules = rule.len;
-    for (unsigned int i = 0; i < num_rules; i++)
-      if ((this+rule[i]).apply (c, lookup_context))
-        return TRACE_RETURN (true);
-
-    return TRACE_RETURN (false);
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (rule.sanitize (c, this));
-  }
-
-  private:
-  OffsetArrayOf<ChainRule>
-               rule;                   /* Array of ChainRule tables
-                                        * ordered by preference */
-  public:
-  DEFINE_SIZE_ARRAY (2, rule);
-};
-
-struct ChainContextFormat1
-{
-  friend struct ChainContext;
-
-  private:
-
-  inline void closure (hb_closure_context_t *c, closure_lookup_func_t closure_func) const
-  {
-    TRACE_CLOSURE ();
-    const Coverage &cov = (this+coverage);
-
-    struct ChainContextClosureLookupContext lookup_context = {
-      {intersects_glyph, closure_func},
-      {NULL, NULL, NULL}
-    };
-
-    unsigned int count = ruleSet.len;
-    for (unsigned int i = 0; i < count; i++)
-      if (cov.intersects_coverage (c->glyphs, i)) {
-       const ChainRuleSet &rule_set = this+ruleSet[i];
-       rule_set.closure (c, lookup_context);
-      }
-  }
-
-  inline bool apply (hb_apply_context_t *c, apply_lookup_func_t apply_func) const
-  {
-    TRACE_APPLY ();
-    unsigned int index = (this+coverage) (c->buffer->cur().codepoint);
-    if (likely (index == NOT_COVERED)) return TRACE_RETURN (false);
-
-    const ChainRuleSet &rule_set = this+ruleSet[index];
-    struct ChainContextApplyLookupContext lookup_context = {
-      {match_glyph, apply_func},
-      {NULL, NULL, NULL}
-    };
-    return TRACE_RETURN (rule_set.apply (c, lookup_context));
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (coverage.sanitize (c, this) && ruleSet.sanitize (c, this));
-  }
-
-  private:
-  USHORT       format;                 /* Format identifier--format = 1 */
-  OffsetTo<Coverage>
-               coverage;               /* Offset to Coverage table--from
-                                        * beginning of table */
-  OffsetArrayOf<ChainRuleSet>
-               ruleSet;                /* Array of ChainRuleSet tables
-                                        * ordered by Coverage Index */
-  public:
-  DEFINE_SIZE_ARRAY (6, ruleSet);
-};
-
-struct ChainContextFormat2
-{
-  friend struct ChainContext;
-
-  private:
-
-  inline void closure (hb_closure_context_t *c, closure_lookup_func_t closure_func) const
-  {
-    TRACE_CLOSURE ();
-    if (!(this+coverage).intersects (c->glyphs))
-      return;
-
-    const ClassDef &backtrack_class_def = this+backtrackClassDef;
-    const ClassDef &input_class_def = this+inputClassDef;
-    const ClassDef &lookahead_class_def = this+lookaheadClassDef;
-
-    struct ChainContextClosureLookupContext lookup_context = {
-      {intersects_class, closure_func},
-      {&backtrack_class_def,
-       &input_class_def,
-       &lookahead_class_def}
-    };
-
-    unsigned int count = ruleSet.len;
-    for (unsigned int i = 0; i < count; i++)
-      if (input_class_def.intersects_class (c->glyphs, i)) {
-       const ChainRuleSet &rule_set = this+ruleSet[i];
-       rule_set.closure (c, lookup_context);
-      }
-  }
-
-  inline bool apply (hb_apply_context_t *c, apply_lookup_func_t apply_func) const
-  {
-    TRACE_APPLY ();
-    unsigned int index = (this+coverage) (c->buffer->cur().codepoint);
-    if (likely (index == NOT_COVERED)) return TRACE_RETURN (false);
-
-    const ClassDef &backtrack_class_def = this+backtrackClassDef;
-    const ClassDef &input_class_def = this+inputClassDef;
-    const ClassDef &lookahead_class_def = this+lookaheadClassDef;
-
-    index = input_class_def (c->buffer->cur().codepoint);
-    const ChainRuleSet &rule_set = this+ruleSet[index];
-    struct ChainContextApplyLookupContext lookup_context = {
-      {match_class, apply_func},
-      {&backtrack_class_def,
-       &input_class_def,
-       &lookahead_class_def}
-    };
-    return TRACE_RETURN (rule_set.apply (c, lookup_context));
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (coverage.sanitize (c, this) && backtrackClassDef.sanitize (c, this) &&
-                        inputClassDef.sanitize (c, this) && lookaheadClassDef.sanitize (c, this) &&
-                        ruleSet.sanitize (c, this));
-  }
-
-  private:
-  USHORT       format;                 /* Format identifier--format = 2 */
-  OffsetTo<Coverage>
-               coverage;               /* Offset to Coverage table--from
-                                        * beginning of table */
-  OffsetTo<ClassDef>
-               backtrackClassDef;      /* Offset to glyph ClassDef table
-                                        * containing backtrack sequence
-                                        * data--from beginning of table */
-  OffsetTo<ClassDef>
-               inputClassDef;          /* Offset to glyph ClassDef
-                                        * table containing input sequence
-                                        * data--from beginning of table */
-  OffsetTo<ClassDef>
-               lookaheadClassDef;      /* Offset to glyph ClassDef table
-                                        * containing lookahead sequence
-                                        * data--from beginning of table */
-  OffsetArrayOf<ChainRuleSet>
-               ruleSet;                /* Array of ChainRuleSet tables
-                                        * ordered by class */
-  public:
-  DEFINE_SIZE_ARRAY (12, ruleSet);
-};
-
-struct ChainContextFormat3
-{
-  friend struct ChainContext;
-
-  private:
-
-  inline void closure (hb_closure_context_t *c, closure_lookup_func_t closure_func) const
-  {
-    TRACE_CLOSURE ();
-    const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage> > (backtrack);
-
-    if (!(this+input[0]).intersects (c->glyphs))
-      return;
-
-    const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage> > (input);
-    const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord> > (lookahead);
-    struct ChainContextClosureLookupContext lookup_context = {
-      {intersects_coverage, closure_func},
-      {this, this, this}
-    };
-    chain_context_closure_lookup (c,
-                                 backtrack.len, (const USHORT *) backtrack.array,
-                                 input.len, (const USHORT *) input.array + 1,
-                                 lookahead.len, (const USHORT *) lookahead.array,
-                                 lookup.len, lookup.array,
-                                 lookup_context);
-  }
-
-  inline bool apply (hb_apply_context_t *c, apply_lookup_func_t apply_func) const
-  {
-    TRACE_APPLY ();
-    const OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage> > (backtrack);
-
-    unsigned int index = (this+input[0]) (c->buffer->cur().codepoint);
-    if (likely (index == NOT_COVERED)) return TRACE_RETURN (false);
-
-    const OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage> > (input);
-    const ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord> > (lookahead);
-    struct ChainContextApplyLookupContext lookup_context = {
-      {match_coverage, apply_func},
-      {this, this, this}
-    };
-    return TRACE_RETURN (chain_context_apply_lookup (c,
-                                                    backtrack.len, (const USHORT *) backtrack.array,
-                                                    input.len, (const USHORT *) input.array + 1,
-                                                    lookahead.len, (const USHORT *) lookahead.array,
-                                                    lookup.len, lookup.array, lookup_context));
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    if (!backtrack.sanitize (c, this)) return TRACE_RETURN (false);
-    OffsetArrayOf<Coverage> &input = StructAfter<OffsetArrayOf<Coverage> > (backtrack);
-    if (!input.sanitize (c, this)) return TRACE_RETURN (false);
-    OffsetArrayOf<Coverage> &lookahead = StructAfter<OffsetArrayOf<Coverage> > (input);
-    if (!lookahead.sanitize (c, this)) return TRACE_RETURN (false);
-    ArrayOf<LookupRecord> &lookup = StructAfter<ArrayOf<LookupRecord> > (lookahead);
-    return TRACE_RETURN (lookup.sanitize (c));
-  }
-
-  private:
-  USHORT       format;                 /* Format identifier--format = 3 */
-  OffsetArrayOf<Coverage>
-               backtrack;              /* Array of coverage tables
-                                        * in backtracking sequence, in  glyph
-                                        * sequence order */
-  OffsetArrayOf<Coverage>
-               inputX          ;       /* Array of coverage
-                                        * tables in input sequence, in glyph
-                                        * sequence order */
-  OffsetArrayOf<Coverage>
-               lookaheadX;             /* Array of coverage tables
-                                        * in lookahead sequence, in glyph
-                                        * sequence order */
-  ArrayOf<LookupRecord>
-               lookupX;                /* Array of LookupRecords--in
-                                        * design order) */
-  public:
-  DEFINE_SIZE_MIN (10);
-};
-
-struct ChainContext
-{
-  protected:
-
-  inline void closure (hb_closure_context_t *c, closure_lookup_func_t closure_func) const
-  {
-    TRACE_CLOSURE ();
-    switch (u.format) {
-    case 1: u.format1.closure (c, closure_func); break;
-    case 2: u.format2.closure (c, closure_func); break;
-    case 3: u.format3.closure (c, closure_func); break;
-    default:                                     break;
-    }
-  }
-
-  inline bool apply (hb_apply_context_t *c, apply_lookup_func_t apply_func) const
-  {
-    TRACE_APPLY ();
-    switch (u.format) {
-    case 1: return TRACE_RETURN (u.format1.apply (c, apply_func));
-    case 2: return TRACE_RETURN (u.format2.apply (c, apply_func));
-    case 3: return TRACE_RETURN (u.format3.apply (c, apply_func));
-    default:return TRACE_RETURN (false);
-    }
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    if (!u.format.sanitize (c)) return TRACE_RETURN (false);
-    switch (u.format) {
-    case 1: return TRACE_RETURN (u.format1.sanitize (c));
-    case 2: return TRACE_RETURN (u.format2.sanitize (c));
-    case 3: return TRACE_RETURN (u.format3.sanitize (c));
-    default:return TRACE_RETURN (true);
-    }
-  }
-
-  private:
-  union {
-  USHORT               format; /* Format identifier */
-  ChainContextFormat1  format1;
-  ChainContextFormat2  format2;
-  ChainContextFormat3  format3;
-  } u;
-};
-
-
-struct ExtensionFormat1
-{
-  friend struct Extension;
-
-  protected:
-  inline unsigned int get_type (void) const { return extensionLookupType; }
-  inline unsigned int get_offset (void) const { return extensionOffset; }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (c->check_struct (this));
-  }
-
-  private:
-  USHORT       format;                 /* Format identifier. Set to 1. */
-  USHORT       extensionLookupType;    /* Lookup type of subtable referenced
-                                        * by ExtensionOffset (i.e. the
-                                        * extension subtable). */
-  ULONG                extensionOffset;        /* Offset to the extension subtable,
-                                        * of lookup type subtable. */
-  public:
-  DEFINE_SIZE_STATIC (8);
-};
-
-struct Extension
-{
-  inline unsigned int get_type (void) const
-  {
-    switch (u.format) {
-    case 1: return u.format1.get_type ();
-    default:return 0;
-    }
-  }
-  inline unsigned int get_offset (void) const
-  {
-    switch (u.format) {
-    case 1: return u.format1.get_offset ();
-    default:return 0;
-    }
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    if (!u.format.sanitize (c)) return TRACE_RETURN (false);
-    switch (u.format) {
-    case 1: return TRACE_RETURN (u.format1.sanitize (c));
-    default:return TRACE_RETURN (true);
-    }
-  }
-
-  private:
-  union {
-  USHORT               format;         /* Format identifier */
-  ExtensionFormat1     format1;
-  } u;
-};
-
-
-/*
- * GSUB/GPOS Common
- */
-
-struct GSUBGPOS
-{
-  static const hb_tag_t GSUBTag        = HB_OT_TAG_GSUB;
-  static const hb_tag_t GPOSTag        = HB_OT_TAG_GPOS;
-
-  inline unsigned int get_script_count (void) const
-  { return (this+scriptList).len; }
-  inline const Tag& get_script_tag (unsigned int i) const
-  { return (this+scriptList).get_tag (i); }
-  inline unsigned int get_script_tags (unsigned int start_offset,
-                                      unsigned int *script_count /* IN/OUT */,
-                                      hb_tag_t     *script_tags /* OUT */) const
-  { return (this+scriptList).get_tags (start_offset, script_count, script_tags); }
-  inline const Script& get_script (unsigned int i) const
-  { return (this+scriptList)[i]; }
-  inline bool find_script_index (hb_tag_t tag, unsigned int *index) const
-  { return (this+scriptList).find_index (tag, index); }
-
-  inline unsigned int get_feature_count (void) const
-  { return (this+featureList).len; }
-  inline const Tag& get_feature_tag (unsigned int i) const
-  { return (this+featureList).get_tag (i); }
-  inline unsigned int get_feature_tags (unsigned int start_offset,
-                                       unsigned int *feature_count /* IN/OUT */,
-                                       hb_tag_t     *feature_tags /* OUT */) const
-  { return (this+featureList).get_tags (start_offset, feature_count, feature_tags); }
-  inline const Feature& get_feature (unsigned int i) const
-  { return (this+featureList)[i]; }
-  inline bool find_feature_index (hb_tag_t tag, unsigned int *index) const
-  { return (this+featureList).find_index (tag, index); }
-
-  inline unsigned int get_lookup_count (void) const
-  { return (this+lookupList).len; }
-  inline const Lookup& get_lookup (unsigned int i) const
-  { return (this+lookupList)[i]; }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (version.sanitize (c) && likely (version.major == 1) &&
-                        scriptList.sanitize (c, this) &&
-                        featureList.sanitize (c, this) &&
-                        lookupList.sanitize (c, this));
-  }
-
-  protected:
-  FixedVersion version;        /* Version of the GSUB/GPOS table--initially set
-                                * to 0x00010000 */
-  OffsetTo<ScriptList>
-               scriptList;     /* ScriptList table */
-  OffsetTo<FeatureList>
-               featureList;    /* FeatureList table */
-  OffsetTo<LookupList>
-               lookupList;     /* LookupList table */
-  public:
-  DEFINE_SIZE_STATIC (10);
-};
-
-
-
-#endif /* HB_OT_LAYOUT_GSUBGPOS_PRIVATE_HH */
diff --git a/src/hb-ot-layout-private.hh b/src/hb-ot-layout-private.hh
deleted file mode 100644 (file)
index f860e7b..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright © 2007,2008,2009  Red Hat, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_OT_LAYOUT_PRIVATE_HH
-#define HB_OT_LAYOUT_PRIVATE_HH
-
-#include "hb-private.hh"
-
-#include "hb-ot-layout.h"
-
-#include "hb-font-private.hh"
-#include "hb-buffer-private.hh"
-#include "hb-ot-shape-complex-private.hh"
-
-
-
-/*
- * GDEF
- */
-
-/* XXX cleanup */
-typedef enum {
-  HB_OT_LAYOUT_GLYPH_CLASS_UNCLASSIFIED        = 0x0001,
-  HB_OT_LAYOUT_GLYPH_CLASS_BASE_GLYPH  = 0x0002,
-  HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE    = 0x0004,
-  HB_OT_LAYOUT_GLYPH_CLASS_MARK                = 0x0008,
-  HB_OT_LAYOUT_GLYPH_CLASS_COMPONENT   = 0x0010
-} hb_ot_layout_glyph_class_t;
-
-
-HB_INTERNAL unsigned int
-_hb_ot_layout_get_glyph_property (hb_face_t       *face,
-                                 hb_glyph_info_t *info);
-
-HB_INTERNAL hb_bool_t
-_hb_ot_layout_check_glyph_property (hb_face_t    *face,
-                                   hb_glyph_info_t *ginfo,
-                                   unsigned int  lookup_props,
-                                   unsigned int *property_out);
-
-HB_INTERNAL hb_bool_t
-_hb_ot_layout_skip_mark (hb_face_t    *face,
-                        hb_glyph_info_t *ginfo,
-                        unsigned int  lookup_props,
-                        unsigned int *property_out);
-
-
-
-/*
- * hb_ot_layout_t
- */
-
-struct hb_ot_layout_t
-{
-  hb_blob_t *gdef_blob;
-  hb_blob_t *gsub_blob;
-  hb_blob_t *gpos_blob;
-
-  const struct GDEF *gdef;
-  const struct GSUB *gsub;
-  const struct GPOS *gpos;
-};
-
-
-HB_INTERNAL hb_ot_layout_t *
-_hb_ot_layout_create (hb_face_t *face);
-
-HB_INTERNAL void
-_hb_ot_layout_destroy (hb_ot_layout_t *layout);
-
-
-
-#endif /* HB_OT_LAYOUT_PRIVATE_HH */
diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc
deleted file mode 100644 (file)
index 0621f86..0000000
+++ /dev/null
@@ -1,514 +0,0 @@
-/*
- * Copyright © 1998-2004  David Turner and Werner Lemberg
- * Copyright © 2006  Behdad Esfahbod
- * Copyright © 2007,2008,2009  Red Hat, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Behdad Esfahbod
- */
-
-#include "hb-ot-layout-private.hh"
-
-#include "hb-ot-layout-gdef-table.hh"
-#include "hb-ot-layout-gsub-table.hh"
-#include "hb-ot-layout-gpos-table.hh"
-#include "hb-ot-maxp-table.hh"
-
-
-#include <stdlib.h>
-#include <string.h>
-
-
-
-hb_ot_layout_t *
-_hb_ot_layout_create (hb_face_t *face)
-{
-  /* TODO Remove this object altogether */
-  hb_ot_layout_t *layout = (hb_ot_layout_t *) calloc (1, sizeof (hb_ot_layout_t));
-
-  layout->gdef_blob = Sanitizer<GDEF>::sanitize (hb_face_reference_table (face, HB_OT_TAG_GDEF));
-  layout->gdef = Sanitizer<GDEF>::lock_instance (layout->gdef_blob);
-
-  layout->gsub_blob = Sanitizer<GSUB>::sanitize (hb_face_reference_table (face, HB_OT_TAG_GSUB));
-  layout->gsub = Sanitizer<GSUB>::lock_instance (layout->gsub_blob);
-
-  layout->gpos_blob = Sanitizer<GPOS>::sanitize (hb_face_reference_table (face, HB_OT_TAG_GPOS));
-  layout->gpos = Sanitizer<GPOS>::lock_instance (layout->gpos_blob);
-
-  return layout;
-}
-
-void
-_hb_ot_layout_destroy (hb_ot_layout_t *layout)
-{
-  hb_blob_destroy (layout->gdef_blob);
-  hb_blob_destroy (layout->gsub_blob);
-  hb_blob_destroy (layout->gpos_blob);
-
-  free (layout);
-}
-
-static inline const GDEF&
-_get_gdef (hb_face_t *face)
-{
-  return likely (face->ot_layout && face->ot_layout->gdef) ? *face->ot_layout->gdef : Null(GDEF);
-}
-static inline const GSUB&
-_get_gsub (hb_face_t *face)
-{
-  return likely (face->ot_layout && face->ot_layout->gsub) ? *face->ot_layout->gsub : Null(GSUB);
-}
-static inline const GPOS&
-_get_gpos (hb_face_t *face)
-{
-  return likely (face->ot_layout && face->ot_layout->gpos) ? *face->ot_layout->gpos : Null(GPOS);
-}
-
-
-/*
- * GDEF
- */
-
-hb_bool_t
-hb_ot_layout_has_glyph_classes (hb_face_t *face)
-{
-  return _get_gdef (face).has_glyph_classes ();
-}
-
-unsigned int
-_hb_ot_layout_get_glyph_property (hb_face_t       *face,
-                                 hb_glyph_info_t *info)
-{
-  if (!info->props_cache())
-  {
-    const GDEF &gdef = _get_gdef (face);
-    info->props_cache() = gdef.get_glyph_props (info->codepoint);
-  }
-
-  return info->props_cache();
-}
-
-static hb_bool_t
-_hb_ot_layout_match_properties (hb_face_t      *face,
-                               hb_codepoint_t  codepoint,
-                               unsigned int    glyph_props,
-                               unsigned int    lookup_props)
-{
-  /* Not covered, if, for example, glyph class is ligature and
-   * lookup_props includes LookupFlags::IgnoreLigatures
-   */
-  if (glyph_props & lookup_props & LookupFlag::IgnoreFlags)
-    return false;
-
-  if (glyph_props & HB_OT_LAYOUT_GLYPH_CLASS_MARK)
-  {
-    /* If using mark filtering sets, the high short of
-     * lookup_props has the set index.
-     */
-    if (lookup_props & LookupFlag::UseMarkFilteringSet)
-      return _get_gdef (face).mark_set_covers (lookup_props >> 16, codepoint);
-
-    /* The second byte of lookup_props has the meaning
-     * "ignore marks of attachment type different than
-     * the attachment type specified."
-     */
-    if (lookup_props & LookupFlag::MarkAttachmentType && glyph_props & LookupFlag::MarkAttachmentType)
-      return (lookup_props & LookupFlag::MarkAttachmentType) == (glyph_props & LookupFlag::MarkAttachmentType);
-  }
-
-  return true;
-}
-
-hb_bool_t
-_hb_ot_layout_check_glyph_property (hb_face_t    *face,
-                                   hb_glyph_info_t *ginfo,
-                                   unsigned int  lookup_props,
-                                   unsigned int *property_out)
-{
-  unsigned int property;
-
-  property = _hb_ot_layout_get_glyph_property (face, ginfo);
-  (void) (property_out && (*property_out = property));
-
-  return _hb_ot_layout_match_properties (face, ginfo->codepoint, property, lookup_props);
-}
-
-hb_bool_t
-_hb_ot_layout_skip_mark (hb_face_t    *face,
-                        hb_glyph_info_t *ginfo,
-                        unsigned int  lookup_props,
-                        unsigned int *property_out)
-{
-  unsigned int property;
-
-  property = _hb_ot_layout_get_glyph_property (face, ginfo);
-  (void) (property_out && (*property_out = property));
-
-  /* If it's a mark, skip it we don't accept it. */
-  if (unlikely (property & HB_OT_LAYOUT_GLYPH_CLASS_MARK))
-    return !_hb_ot_layout_match_properties (face, ginfo->codepoint, property, lookup_props);
-
-  /* If not a mark, don't skip. */
-  return false;
-}
-
-
-
-unsigned int
-hb_ot_layout_get_attach_points (hb_face_t      *face,
-                               hb_codepoint_t  glyph,
-                               unsigned int    start_offset,
-                               unsigned int   *point_count /* IN/OUT */,
-                               unsigned int   *point_array /* OUT */)
-{
-  return _get_gdef (face).get_attach_points (glyph, start_offset, point_count, point_array);
-}
-
-unsigned int
-hb_ot_layout_get_ligature_carets (hb_font_t      *font,
-                                 hb_direction_t  direction,
-                                 hb_codepoint_t  glyph,
-                                 unsigned int    start_offset,
-                                 unsigned int   *caret_count /* IN/OUT */,
-                                 int            *caret_array /* OUT */)
-{
-  return _get_gdef (font->face).get_lig_carets (font, direction, glyph, start_offset, caret_count, caret_array);
-}
-
-/*
- * GSUB/GPOS
- */
-
-static const GSUBGPOS&
-get_gsubgpos_table (hb_face_t *face,
-                   hb_tag_t   table_tag)
-{
-  switch (table_tag) {
-    case HB_OT_TAG_GSUB: return _get_gsub (face);
-    case HB_OT_TAG_GPOS: return _get_gpos (face);
-    default:             return Null(GSUBGPOS);
-  }
-}
-
-
-unsigned int
-hb_ot_layout_table_get_script_tags (hb_face_t    *face,
-                                   hb_tag_t      table_tag,
-                                   unsigned int  start_offset,
-                                   unsigned int *script_count /* IN/OUT */,
-                                   hb_tag_t     *script_tags /* OUT */)
-{
-  const GSUBGPOS &g = get_gsubgpos_table (face, table_tag);
-
-  return g.get_script_tags (start_offset, script_count, script_tags);
-}
-
-hb_bool_t
-hb_ot_layout_table_find_script (hb_face_t    *face,
-                               hb_tag_t      table_tag,
-                               hb_tag_t      script_tag,
-                               unsigned int *script_index)
-{
-  ASSERT_STATIC (Index::NOT_FOUND_INDEX == HB_OT_LAYOUT_NO_SCRIPT_INDEX);
-  const GSUBGPOS &g = get_gsubgpos_table (face, table_tag);
-
-  if (g.find_script_index (script_tag, script_index))
-    return true;
-
-  /* try finding 'DFLT' */
-  if (g.find_script_index (HB_OT_TAG_DEFAULT_SCRIPT, script_index))
-    return false;
-
-  /* try with 'dflt'; MS site has had typos and many fonts use it now :(.
-   * including many versions of DejaVu Sans Mono! */
-  if (g.find_script_index (HB_OT_TAG_DEFAULT_LANGUAGE, script_index))
-    return false;
-
-  if (script_index) *script_index = HB_OT_LAYOUT_NO_SCRIPT_INDEX;
-  return false;
-}
-
-hb_bool_t
-hb_ot_layout_table_choose_script (hb_face_t      *face,
-                                 hb_tag_t        table_tag,
-                                 const hb_tag_t *script_tags,
-                                 unsigned int   *script_index,
-                                 hb_tag_t       *chosen_script)
-{
-  ASSERT_STATIC (Index::NOT_FOUND_INDEX == HB_OT_LAYOUT_NO_SCRIPT_INDEX);
-  const GSUBGPOS &g = get_gsubgpos_table (face, table_tag);
-
-  while (*script_tags)
-  {
-    if (g.find_script_index (*script_tags, script_index)) {
-      if (chosen_script)
-        *chosen_script = *script_tags;
-      return true;
-    }
-    script_tags++;
-  }
-
-  /* try finding 'DFLT' */
-  if (g.find_script_index (HB_OT_TAG_DEFAULT_SCRIPT, script_index)) {
-    if (chosen_script)
-      *chosen_script = HB_OT_TAG_DEFAULT_SCRIPT;
-    return false;
-  }
-
-  /* try with 'dflt'; MS site has had typos and many fonts use it now :( */
-  if (g.find_script_index (HB_OT_TAG_DEFAULT_LANGUAGE, script_index)) {
-    if (chosen_script)
-      *chosen_script = HB_OT_TAG_DEFAULT_LANGUAGE;
-    return false;
-  }
-
-  /* try with 'latn'; some old fonts put their features there even though
-     they're really trying to support Thai, for example :( */
-#define HB_OT_TAG_LATIN_SCRIPT         HB_TAG ('l', 'a', 't', 'n')
-  if (g.find_script_index (HB_OT_TAG_LATIN_SCRIPT, script_index)) {
-    if (chosen_script)
-      *chosen_script = HB_OT_TAG_LATIN_SCRIPT;
-    return false;
-  }
-
-  if (script_index) *script_index = HB_OT_LAYOUT_NO_SCRIPT_INDEX;
-  if (chosen_script)
-    *chosen_script = HB_OT_LAYOUT_NO_SCRIPT_INDEX;
-  return false;
-}
-
-unsigned int
-hb_ot_layout_table_get_feature_tags (hb_face_t    *face,
-                                    hb_tag_t      table_tag,
-                                    unsigned int  start_offset,
-                                    unsigned int *feature_count /* IN/OUT */,
-                                    hb_tag_t     *feature_tags /* OUT */)
-{
-  const GSUBGPOS &g = get_gsubgpos_table (face, table_tag);
-
-  return g.get_feature_tags (start_offset, feature_count, feature_tags);
-}
-
-
-unsigned int
-hb_ot_layout_script_get_language_tags (hb_face_t    *face,
-                                      hb_tag_t      table_tag,
-                                      unsigned int  script_index,
-                                      unsigned int  start_offset,
-                                      unsigned int *language_count /* IN/OUT */,
-                                      hb_tag_t     *language_tags /* OUT */)
-{
-  const Script &s = get_gsubgpos_table (face, table_tag).get_script (script_index);
-
-  return s.get_lang_sys_tags (start_offset, language_count, language_tags);
-}
-
-hb_bool_t
-hb_ot_layout_script_find_language (hb_face_t    *face,
-                                  hb_tag_t      table_tag,
-                                  unsigned int  script_index,
-                                  hb_tag_t      language_tag,
-                                  unsigned int *language_index)
-{
-  ASSERT_STATIC (Index::NOT_FOUND_INDEX == HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX);
-  const Script &s = get_gsubgpos_table (face, table_tag).get_script (script_index);
-
-  if (s.find_lang_sys_index (language_tag, language_index))
-    return true;
-
-  /* try with 'dflt'; MS site has had typos and many fonts use it now :( */
-  if (s.find_lang_sys_index (HB_OT_TAG_DEFAULT_LANGUAGE, language_index))
-    return false;
-
-  if (language_index) *language_index = HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX;
-  return false;
-}
-
-hb_bool_t
-hb_ot_layout_language_get_required_feature_index (hb_face_t    *face,
-                                                 hb_tag_t      table_tag,
-                                                 unsigned int  script_index,
-                                                 unsigned int  language_index,
-                                                 unsigned int *feature_index)
-{
-  const LangSys &l = get_gsubgpos_table (face, table_tag).get_script (script_index).get_lang_sys (language_index);
-
-  if (feature_index) *feature_index = l.get_required_feature_index ();
-
-  return l.has_required_feature ();
-}
-
-unsigned int
-hb_ot_layout_language_get_feature_indexes (hb_face_t    *face,
-                                          hb_tag_t      table_tag,
-                                          unsigned int  script_index,
-                                          unsigned int  language_index,
-                                          unsigned int  start_offset,
-                                          unsigned int *feature_count /* IN/OUT */,
-                                          unsigned int *feature_indexes /* OUT */)
-{
-  const GSUBGPOS &g = get_gsubgpos_table (face, table_tag);
-  const LangSys &l = g.get_script (script_index).get_lang_sys (language_index);
-
-  return l.get_feature_indexes (start_offset, feature_count, feature_indexes);
-}
-
-unsigned int
-hb_ot_layout_language_get_feature_tags (hb_face_t    *face,
-                                       hb_tag_t      table_tag,
-                                       unsigned int  script_index,
-                                       unsigned int  language_index,
-                                       unsigned int  start_offset,
-                                       unsigned int *feature_count /* IN/OUT */,
-                                       hb_tag_t     *feature_tags /* OUT */)
-{
-  const GSUBGPOS &g = get_gsubgpos_table (face, table_tag);
-  const LangSys &l = g.get_script (script_index).get_lang_sys (language_index);
-
-  ASSERT_STATIC (sizeof (unsigned int) == sizeof (hb_tag_t));
-  unsigned int ret = l.get_feature_indexes (start_offset, feature_count, (unsigned int *) feature_tags);
-
-  if (feature_tags) {
-    unsigned int count = *feature_count;
-    for (unsigned int i = 0; i < count; i++)
-      feature_tags[i] = g.get_feature_tag ((unsigned int) feature_tags[i]);
-  }
-
-  return ret;
-}
-
-
-hb_bool_t
-hb_ot_layout_language_find_feature (hb_face_t    *face,
-                                   hb_tag_t      table_tag,
-                                   unsigned int  script_index,
-                                   unsigned int  language_index,
-                                   hb_tag_t      feature_tag,
-                                   unsigned int *feature_index)
-{
-  ASSERT_STATIC (Index::NOT_FOUND_INDEX == HB_OT_LAYOUT_NO_FEATURE_INDEX);
-  const GSUBGPOS &g = get_gsubgpos_table (face, table_tag);
-  const LangSys &l = g.get_script (script_index).get_lang_sys (language_index);
-
-  unsigned int num_features = l.get_feature_count ();
-  for (unsigned int i = 0; i < num_features; i++) {
-    unsigned int f_index = l.get_feature_index (i);
-
-    if (feature_tag == g.get_feature_tag (f_index)) {
-      if (feature_index) *feature_index = f_index;
-      return true;
-    }
-  }
-
-  if (feature_index) *feature_index = HB_OT_LAYOUT_NO_FEATURE_INDEX;
-  return false;
-}
-
-unsigned int
-hb_ot_layout_feature_get_lookup_indexes (hb_face_t    *face,
-                                        hb_tag_t      table_tag,
-                                        unsigned int  feature_index,
-                                        unsigned int  start_offset,
-                                        unsigned int *lookup_count /* IN/OUT */,
-                                        unsigned int *lookup_indexes /* OUT */)
-{
-  const GSUBGPOS &g = get_gsubgpos_table (face, table_tag);
-  const Feature &f = g.get_feature (feature_index);
-
-  return f.get_lookup_indexes (start_offset, lookup_count, lookup_indexes);
-}
-
-
-/*
- * GSUB
- */
-
-hb_bool_t
-hb_ot_layout_has_substitution (hb_face_t *face)
-{
-  return &_get_gsub (face) != &Null(GSUB);
-}
-
-void
-hb_ot_layout_substitute_start (hb_buffer_t  *buffer)
-{
-  GSUB::substitute_start (buffer);
-}
-
-hb_bool_t
-hb_ot_layout_substitute_lookup (hb_face_t    *face,
-                               hb_buffer_t  *buffer,
-                               unsigned int  lookup_index,
-                               hb_mask_t     mask)
-{
-  hb_apply_context_t c (NULL, face, buffer, mask);
-  return _get_gsub (face).substitute_lookup (&c, lookup_index);
-}
-
-void
-hb_ot_layout_substitute_finish (hb_buffer_t  *buffer HB_UNUSED)
-{
-  GSUB::substitute_finish (buffer);
-}
-
-void
-hb_ot_layout_substitute_closure_lookup (hb_face_t    *face,
-                                       hb_set_t     *glyphs,
-                                       unsigned int  lookup_index)
-{
-  hb_closure_context_t c (face, glyphs);
-  _get_gsub (face).closure_lookup (&c, lookup_index);
-}
-
-/*
- * GPOS
- */
-
-hb_bool_t
-hb_ot_layout_has_positioning (hb_face_t *face)
-{
-  return &_get_gpos (face) != &Null(GPOS);
-}
-
-void
-hb_ot_layout_position_start (hb_buffer_t  *buffer)
-{
-  GPOS::position_start (buffer);
-}
-
-hb_bool_t
-hb_ot_layout_position_lookup   (hb_font_t    *font,
-                               hb_buffer_t  *buffer,
-                               unsigned int  lookup_index,
-                               hb_mask_t     mask)
-{
-  hb_apply_context_t c (font, font->face, buffer, mask);
-  return _get_gpos (font->face).position_lookup (&c, lookup_index);
-}
-
-void
-hb_ot_layout_position_finish (hb_buffer_t  *buffer)
-{
-  GPOS::position_finish (buffer);
-}
-
-
diff --git a/src/hb-ot-layout.h b/src/hb-ot-layout.h
deleted file mode 100644 (file)
index b8b5baf..0000000
+++ /dev/null
@@ -1,215 +0,0 @@
-/*
- * Copyright © 2007,2008,2009  Red Hat, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_OT_H_IN
-#error "Include <hb-ot.h> instead."
-#endif
-
-#ifndef HB_OT_LAYOUT_H
-#define HB_OT_LAYOUT_H
-
-#include "hb.h"
-
-#include "hb-ot-tag.h"
-
-HB_BEGIN_DECLS
-
-
-#define HB_OT_TAG_GDEF HB_TAG('G','D','E','F')
-#define HB_OT_TAG_GSUB HB_TAG('G','S','U','B')
-#define HB_OT_TAG_GPOS HB_TAG('G','P','O','S')
-
-/*
- * GDEF
- */
-
-hb_bool_t
-hb_ot_layout_has_glyph_classes (hb_face_t *face);
-
-/* Not that useful.  Provides list of attach points for a glyph that a
- * client may want to cache */
-unsigned int
-hb_ot_layout_get_attach_points (hb_face_t      *face,
-                               hb_codepoint_t  glyph,
-                               unsigned int    start_offset,
-                               unsigned int   *point_count /* IN/OUT */,
-                               unsigned int   *point_array /* OUT */);
-
-/* Ligature caret positions */
-unsigned int
-hb_ot_layout_get_ligature_carets (hb_font_t      *font,
-                                 hb_direction_t  direction,
-                                 hb_codepoint_t  glyph,
-                                 unsigned int    start_offset,
-                                 unsigned int   *caret_count /* IN/OUT */,
-                                 hb_position_t  *caret_array /* OUT */);
-
-
-/*
- * GSUB/GPOS feature query and enumeration interface
- */
-
-#define HB_OT_LAYOUT_NO_SCRIPT_INDEX           ((unsigned int) 0xFFFF)
-#define HB_OT_LAYOUT_NO_FEATURE_INDEX          ((unsigned int) 0xFFFF)
-#define HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX    ((unsigned int) 0xFFFF)
-
-unsigned int
-hb_ot_layout_table_get_script_tags (hb_face_t    *face,
-                                   hb_tag_t      table_tag,
-                                   unsigned int  start_offset,
-                                   unsigned int *script_count /* IN/OUT */,
-                                   hb_tag_t     *script_tags /* OUT */);
-
-hb_bool_t
-hb_ot_layout_table_find_script (hb_face_t    *face,
-                               hb_tag_t      table_tag,
-                               hb_tag_t      script_tag,
-                               unsigned int *script_index);
-
-/* Like find_script, but takes zero-terminated array of scripts to test */
-hb_bool_t
-hb_ot_layout_table_choose_script (hb_face_t      *face,
-                                 hb_tag_t        table_tag,
-                                 const hb_tag_t *script_tags,
-                                 unsigned int   *script_index,
-                                 hb_tag_t       *chosen_script);
-
-unsigned int
-hb_ot_layout_table_get_feature_tags (hb_face_t    *face,
-                                    hb_tag_t      table_tag,
-                                    unsigned int  start_offset,
-                                    unsigned int *feature_count /* IN/OUT */,
-                                    hb_tag_t     *feature_tags /* OUT */);
-
-unsigned int
-hb_ot_layout_script_get_language_tags (hb_face_t    *face,
-                                      hb_tag_t      table_tag,
-                                      unsigned int  script_index,
-                                      unsigned int  start_offset,
-                                      unsigned int *language_count /* IN/OUT */,
-                                      hb_tag_t     *language_tags /* OUT */);
-
-hb_bool_t
-hb_ot_layout_script_find_language (hb_face_t    *face,
-                                  hb_tag_t      table_tag,
-                                  unsigned int  script_index,
-                                  hb_tag_t      language_tag,
-                                  unsigned int *language_index);
-
-hb_bool_t
-hb_ot_layout_language_get_required_feature_index (hb_face_t    *face,
-                                                 hb_tag_t      table_tag,
-                                                 unsigned int  script_index,
-                                                 unsigned int  language_index,
-                                                 unsigned int *feature_index);
-
-unsigned int
-hb_ot_layout_language_get_feature_indexes (hb_face_t    *face,
-                                          hb_tag_t      table_tag,
-                                          unsigned int  script_index,
-                                          unsigned int  language_index,
-                                          unsigned int  start_offset,
-                                          unsigned int *feature_count /* IN/OUT */,
-                                          unsigned int *feature_indexes /* OUT */);
-
-unsigned int
-hb_ot_layout_language_get_feature_tags (hb_face_t    *face,
-                                       hb_tag_t      table_tag,
-                                       unsigned int  script_index,
-                                       unsigned int  language_index,
-                                       unsigned int  start_offset,
-                                       unsigned int *feature_count /* IN/OUT */,
-                                       hb_tag_t     *feature_tags /* OUT */);
-
-hb_bool_t
-hb_ot_layout_language_find_feature (hb_face_t    *face,
-                                   hb_tag_t      table_tag,
-                                   unsigned int  script_index,
-                                   unsigned int  language_index,
-                                   hb_tag_t      feature_tag,
-                                   unsigned int *feature_index);
-
-unsigned int
-hb_ot_layout_feature_get_lookup_indexes (hb_face_t    *face,
-                                        hb_tag_t      table_tag,
-                                        unsigned int  feature_index,
-                                        unsigned int  start_offset,
-                                        unsigned int *lookup_count /* IN/OUT */,
-                                        unsigned int *lookup_indexes /* OUT */);
-
-
-/*
- * GSUB
- */
-
-hb_bool_t
-hb_ot_layout_has_substitution (hb_face_t *face);
-
-/* Should be called before all the substitute_lookup's are done. */
-void
-hb_ot_layout_substitute_start (hb_buffer_t  *buffer);
-
-hb_bool_t
-hb_ot_layout_substitute_lookup (hb_face_t    *face,
-                               hb_buffer_t  *buffer,
-                               unsigned int  lookup_index,
-                               hb_mask_t     mask);
-
-/* Should be called after all the substitute_lookup's are done */
-void
-hb_ot_layout_substitute_finish (hb_buffer_t  *buffer);
-
-
-void
-hb_ot_layout_substitute_closure_lookup (hb_face_t    *face,
-                                       hb_set_t     *glyphs,
-                                       unsigned int  lookup_index);
-
-/*
- * GPOS
- */
-
-hb_bool_t
-hb_ot_layout_has_positioning (hb_face_t *face);
-
-/* Should be called before all the position_lookup's are done.  Resets positions to zero. */
-void
-hb_ot_layout_position_start (hb_buffer_t  *buffer);
-
-hb_bool_t
-hb_ot_layout_position_lookup (hb_font_t    *font,
-                             hb_buffer_t  *buffer,
-                             unsigned int  lookup_index,
-                             hb_mask_t     mask);
-
-/* Should be called after all the position_lookup's are done */
-void
-hb_ot_layout_position_finish (hb_buffer_t  *buffer);
-
-
-HB_END_DECLS
-
-#endif /* HB_OT_LAYOUT_H */
diff --git a/src/hb-ot-map-private.hh b/src/hb-ot-map-private.hh
deleted file mode 100644 (file)
index 3811206..0000000
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * Copyright © 2009,2010  Red Hat, Inc.
- * Copyright © 2010,2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Behdad Esfahbod
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_OT_MAP_PRIVATE_HH
-#define HB_OT_MAP_PRIVATE_HH
-
-#include "hb-buffer-private.hh"
-
-#include "hb-ot-layout.h"
-
-
-
-static const hb_tag_t table_tags[2] = {HB_OT_TAG_GSUB, HB_OT_TAG_GPOS};
-
-struct hb_ot_map_t
-{
-  friend struct hb_ot_map_builder_t;
-
-  public:
-
-  hb_ot_map_t (void) { memset (this, 0, sizeof (*this)); }
-
-  typedef void (*gsub_pause_func_t) (const hb_ot_map_t *map, hb_face_t *face, hb_buffer_t *buffer, void *user_data);
-  typedef void (*gpos_pause_func_t) (const hb_ot_map_t *map, hb_font_t *font, hb_buffer_t *buffer, void *user_data);
-
-  inline hb_mask_t get_global_mask (void) const { return global_mask; }
-
-  inline hb_mask_t get_mask (hb_tag_t tag, unsigned int *shift = NULL) const {
-    const feature_map_t *map = features.bsearch (&tag);
-    if (shift) *shift = map ? map->shift : 0;
-    return map ? map->mask : 0;
-  }
-
-  inline hb_mask_t get_1_mask (hb_tag_t tag) const {
-    const feature_map_t *map = features.bsearch (&tag);
-    return map ? map->_1_mask : 0;
-  }
-
-  inline hb_tag_t get_chosen_script (unsigned int table_index) const
-  { return chosen_script[table_index]; }
-
-  inline void substitute (hb_face_t *face, hb_buffer_t *buffer) const
-  { apply (0, (hb_ot_map_t::apply_lookup_func_t) hb_ot_layout_substitute_lookup, face, buffer); }
-  inline void position (hb_font_t *font, hb_buffer_t *buffer) const
-  { apply (1, (hb_ot_map_t::apply_lookup_func_t) hb_ot_layout_position_lookup, font, buffer); }
-
-  HB_INTERNAL void substitute_closure (hb_face_t *face,
-                                      hb_set_t *glyphs) const;
-
-
-  inline void finish (void) {
-    features.finish ();
-    lookups[0].finish ();
-    lookups[1].finish ();
-    pauses[0].finish ();
-    pauses[1].finish ();
-  }
-
-  private:
-
-  struct feature_map_t {
-    hb_tag_t tag; /* should be first for our bsearch to work */
-    unsigned int index[2]; /* GSUB/GPOS */
-    unsigned int stage[2]; /* GSUB/GPOS */
-    unsigned int shift;
-    hb_mask_t mask;
-    hb_mask_t _1_mask; /* mask for value=1, for quick access */
-
-    static int cmp (const feature_map_t *a, const feature_map_t *b)
-    { return a->tag < b->tag ? -1 : a->tag > b->tag ? 1 : 0; }
-  };
-
-  struct lookup_map_t {
-    unsigned int index;
-    hb_mask_t mask;
-
-    static int cmp (const lookup_map_t *a, const lookup_map_t *b)
-    { return a->index < b->index ? -1 : a->index > b->index ? 1 : 0; }
-  };
-
-  typedef void (*pause_func_t) (const hb_ot_map_t *map, void *face_or_font, hb_buffer_t *buffer, void *user_data);
-  typedef struct {
-    pause_func_t func;
-    void *user_data;
-  } pause_callback_t;
-
-  struct pause_map_t {
-    unsigned int num_lookups; /* Cumulative */
-    pause_callback_t callback;
-  };
-
-  typedef hb_bool_t (*apply_lookup_func_t) (void *face_or_font,
-                                           hb_buffer_t  *buffer,
-                                           unsigned int  lookup_index,
-                                           hb_mask_t     mask);
-
-  HB_INTERNAL void add_lookups (hb_face_t    *face,
-                               unsigned int  table_index,
-                               unsigned int  feature_index,
-                               hb_mask_t     mask);
-
-  HB_INTERNAL void apply (unsigned int table_index,
-                         hb_ot_map_t::apply_lookup_func_t apply_lookup_func,
-                         void *face_or_font,
-                         hb_buffer_t *buffer) const;
-
-  hb_mask_t global_mask;
-
-  hb_tag_t chosen_script[2];
-  hb_prealloced_array_t<feature_map_t, 8> features;
-  hb_prealloced_array_t<lookup_map_t, 32> lookups[2]; /* GSUB/GPOS */
-  hb_prealloced_array_t<pause_map_t, 1> pauses[2]; /* GSUB/GPOS */
-};
-
-
-struct hb_ot_map_builder_t
-{
-  public:
-
-  hb_ot_map_builder_t (void) { memset (this, 0, sizeof (*this)); }
-
-  HB_INTERNAL void add_feature (hb_tag_t tag, unsigned int value, bool global);
-
-  inline void add_bool_feature (hb_tag_t tag, bool global = true)
-  { add_feature (tag, 1, global); }
-
-  inline void add_gsub_pause (hb_ot_map_t::gsub_pause_func_t pause_func, void *user_data)
-  { add_pause (0, (hb_ot_map_t::pause_func_t) pause_func, user_data); }
-  inline void add_gpos_pause (hb_ot_map_t::gpos_pause_func_t pause_func, void *user_data)
-  { add_pause (1, (hb_ot_map_t::pause_func_t) pause_func, user_data); }
-
-  HB_INTERNAL void compile (hb_face_t *face,
-                           const hb_segment_properties_t *props,
-                           struct hb_ot_map_t &m);
-
-  inline void finish (void) {
-    feature_infos.finish ();
-    pauses[0].finish ();
-    pauses[1].finish ();
-  }
-
-  private:
-
-  struct feature_info_t {
-    hb_tag_t tag;
-    unsigned int seq; /* sequence#, used for stable sorting only */
-    unsigned int max_value;
-    bool global; /* whether the feature applies value to every glyph in the buffer */
-    unsigned int default_value; /* for non-global features, what should the unset glyphs take */
-    unsigned int stage[2]; /* GSUB/GPOS */
-
-    static int cmp (const feature_info_t *a, const feature_info_t *b)
-    { return (a->tag != b->tag) ?  (a->tag < b->tag ? -1 : 1) : (a->seq < b->seq ? -1 : 1); }
-  };
-
-  struct pause_info_t {
-    unsigned int stage;
-    hb_ot_map_t::pause_callback_t callback;
-  };
-
-  HB_INTERNAL void add_pause (unsigned int table_index, hb_ot_map_t::pause_func_t pause_func, void *user_data);
-
-  unsigned int current_stage[2]; /* GSUB/GPOS */
-  hb_prealloced_array_t<feature_info_t,16> feature_infos;
-  hb_prealloced_array_t<pause_info_t, 1> pauses[2]; /* GSUB/GPOS */
-};
-
-
-
-#endif /* HB_OT_MAP_PRIVATE_HH */
diff --git a/src/hb-ot-map.cc b/src/hb-ot-map.cc
deleted file mode 100644 (file)
index bebf3ed..0000000
+++ /dev/null
@@ -1,289 +0,0 @@
-/*
- * Copyright © 2009,2010  Red Hat, Inc.
- * Copyright © 2010,2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Behdad Esfahbod
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "hb-ot-map-private.hh"
-
-#include "hb-ot-shape-private.hh"
-
-
-
-void
-hb_ot_map_t::add_lookups (hb_face_t    *face,
-                         unsigned int  table_index,
-                         unsigned int  feature_index,
-                         hb_mask_t     mask)
-{
-  unsigned int lookup_indices[32];
-  unsigned int offset, len;
-
-  offset = 0;
-  do {
-    len = ARRAY_LENGTH (lookup_indices);
-    hb_ot_layout_feature_get_lookup_indexes (face,
-                                            table_tags[table_index],
-                                            feature_index,
-                                            offset, &len,
-                                            lookup_indices);
-
-    for (unsigned int i = 0; i < len; i++) {
-      hb_ot_map_t::lookup_map_t *lookup = lookups[table_index].push ();
-      if (unlikely (!lookup))
-        return;
-      lookup->mask = mask;
-      lookup->index = lookup_indices[i];
-    }
-
-    offset += len;
-  } while (len == ARRAY_LENGTH (lookup_indices));
-}
-
-
-void hb_ot_map_builder_t::add_feature (hb_tag_t tag, unsigned int value, bool global)
-{
-  feature_info_t *info = feature_infos.push();
-  if (unlikely (!info)) return;
-  info->tag = tag;
-  info->seq = feature_infos.len;
-  info->max_value = value;
-  info->global = global;
-  info->default_value = global ? value : 0;
-  info->stage[0] = current_stage[0];
-  info->stage[1] = current_stage[1];
-}
-
-void hb_ot_map_t::apply (unsigned int table_index,
-                        hb_ot_map_t::apply_lookup_func_t apply_lookup_func,
-                        void *face_or_font,
-                        hb_buffer_t *buffer) const
-{
-  unsigned int i = 0;
-
-  for (unsigned int pause_index = 0; pause_index < pauses[table_index].len; pause_index++) {
-    const pause_map_t *pause = &pauses[table_index][pause_index];
-    for (; i < pause->num_lookups; i++)
-      apply_lookup_func (face_or_font, buffer, lookups[table_index][i].index, lookups[table_index][i].mask);
-
-    pause->callback.func (this, face_or_font, buffer, pause->callback.user_data);
-  }
-
-  for (; i < lookups[table_index].len; i++)
-    apply_lookup_func (face_or_font, buffer, lookups[table_index][i].index, lookups[table_index][i].mask);
-}
-
-void hb_ot_map_t::substitute_closure (hb_face_t *face,
-                                     hb_set_t *glyphs) const
-{
-  unsigned int table_index = 0;
-  unsigned int i = 0;
-
-  for (unsigned int pause_index = 0; pause_index < pauses[table_index].len; pause_index++) {
-    const pause_map_t *pause = &pauses[table_index][pause_index];
-    for (; i < pause->num_lookups; i++)
-      hb_ot_layout_substitute_closure_lookup (face, glyphs, lookups[table_index][i].index);
-  }
-
-  for (; i < lookups[table_index].len; i++)
-    hb_ot_layout_substitute_closure_lookup (face, glyphs, lookups[table_index][i].index);
-}
-
-void hb_ot_map_builder_t::add_pause (unsigned int table_index, hb_ot_map_t::pause_func_t pause_func, void *user_data)
-{
-  if (pause_func) {
-    pause_info_t *p = pauses[table_index].push ();
-    if (likely (p)) {
-      p->stage = current_stage[table_index];
-      p->callback.func = pause_func;
-      p->callback.user_data = user_data;
-    }
-  }
-
-  current_stage[table_index]++;
-}
-
-void
-hb_ot_map_builder_t::compile (hb_face_t *face,
-                             const hb_segment_properties_t *props,
-                             hb_ot_map_t &m)
-{
- m.global_mask = 1;
-
-  if (!feature_infos.len)
-    return;
-
-
-  /* Fetch script/language indices for GSUB/GPOS.  We need these later to skip
-   * features not available in either table and not waste precious bits for them. */
-
-  hb_tag_t script_tags[3] = {HB_TAG_NONE};
-  hb_tag_t language_tag;
-
-  hb_ot_tags_from_script (props->script, &script_tags[0], &script_tags[1]);
-  language_tag = hb_ot_tag_from_language (props->language);
-
-  unsigned int script_index[2], language_index[2];
-  for (unsigned int table_index = 0; table_index < 2; table_index++) {
-    hb_tag_t table_tag = table_tags[table_index];
-    hb_ot_layout_table_choose_script (face, table_tag, script_tags, &script_index[table_index], &m.chosen_script[table_index]);
-    hb_ot_layout_script_find_language (face, table_tag, script_index[table_index], language_tag, &language_index[table_index]);
-  }
-
-
-  /* Sort features and merge duplicates */
-  {
-    feature_infos.sort ();
-    unsigned int j = 0;
-    for (unsigned int i = 1; i < feature_infos.len; i++)
-      if (feature_infos[i].tag != feature_infos[j].tag)
-       feature_infos[++j] = feature_infos[i];
-      else {
-       if (feature_infos[i].global) {
-         feature_infos[j].global = true;
-         feature_infos[j].max_value = feature_infos[i].max_value;
-         feature_infos[j].default_value = feature_infos[i].default_value;
-       } else {
-         feature_infos[j].global = false;
-         feature_infos[j].max_value = MAX (feature_infos[j].max_value, feature_infos[i].max_value);
-       }
-       feature_infos[j].stage[0] = MIN (feature_infos[j].stage[0], feature_infos[i].stage[0]);
-       feature_infos[j].stage[1] = MIN (feature_infos[j].stage[1], feature_infos[i].stage[1]);
-       /* Inherit default_value from j */
-      }
-    feature_infos.shrink (j + 1);
-  }
-
-
-  /* Allocate bits now */
-  unsigned int next_bit = 1;
-  for (unsigned int i = 0; i < feature_infos.len; i++) {
-    const feature_info_t *info = &feature_infos[i];
-
-    unsigned int bits_needed;
-
-    if (info->global && info->max_value == 1)
-      /* Uses the global bit */
-      bits_needed = 0;
-    else
-      bits_needed = _hb_bit_storage (info->max_value);
-
-    if (!info->max_value || next_bit + bits_needed > 8 * sizeof (hb_mask_t))
-      continue; /* Feature disabled, or not enough bits. */
-
-
-    bool found = false;
-    unsigned int feature_index[2];
-    for (unsigned int table_index = 0; table_index < 2; table_index++)
-      found |= hb_ot_layout_language_find_feature (face,
-                                                  table_tags[table_index],
-                                                  script_index[table_index],
-                                                  language_index[table_index],
-                                                  info->tag,
-                                                  &feature_index[table_index]);
-    if (!found)
-      continue;
-
-
-    hb_ot_map_t::feature_map_t *map = m.features.push ();
-    if (unlikely (!map))
-      break;
-
-    map->tag = info->tag;
-    map->index[0] = feature_index[0];
-    map->index[1] = feature_index[1];
-    map->stage[0] = info->stage[0];
-    map->stage[1] = info->stage[1];
-    if (info->global && info->max_value == 1) {
-      /* Uses the global bit */
-      map->shift = 0;
-      map->mask = 1;
-    } else {
-      map->shift = next_bit;
-      map->mask = (1 << (next_bit + bits_needed)) - (1 << next_bit);
-      next_bit += bits_needed;
-      if (info->global)
-       m.global_mask |= (info->default_value << map->shift) & map->mask;
-    }
-    map->_1_mask = (1 << map->shift) & map->mask;
-
-  }
-  feature_infos.shrink (0); /* Done with these */
-
-
-  add_gsub_pause (NULL, NULL);
-  add_gpos_pause (NULL, NULL);
-
-  for (unsigned int table_index = 0; table_index < 2; table_index++) {
-    hb_tag_t table_tag = table_tags[table_index];
-
-    /* Collect lookup indices for features */
-
-    unsigned int required_feature_index;
-    if (hb_ot_layout_language_get_required_feature_index (face,
-                                                         table_tag,
-                                                         script_index[table_index],
-                                                         language_index[table_index],
-                                                         &required_feature_index))
-      m.add_lookups (face, table_index, required_feature_index, 1);
-
-    unsigned int pause_index = 0;
-    unsigned int last_num_lookups = 0;
-    for (unsigned stage = 0; stage < current_stage[table_index]; stage++)
-    {
-      for (unsigned i = 0; i < m.features.len; i++)
-        if (m.features[i].stage[table_index] == stage)
-         m.add_lookups (face, table_index, m.features[i].index[table_index], m.features[i].mask);
-
-      /* Sort lookups and merge duplicates */
-      if (last_num_lookups < m.lookups[table_index].len)
-      {
-       m.lookups[table_index].sort (last_num_lookups, m.lookups[table_index].len);
-
-       unsigned int j = last_num_lookups;
-       for (unsigned int i = j + 1; i < m.lookups[table_index].len; i++)
-         if (m.lookups[table_index][i].index != m.lookups[table_index][j].index)
-           m.lookups[table_index][++j] = m.lookups[table_index][i];
-         else
-           m.lookups[table_index][j].mask |= m.lookups[table_index][i].mask;
-       m.lookups[table_index].shrink (j + 1);
-      }
-
-      last_num_lookups = m.lookups[table_index].len;
-
-      if (pause_index < pauses[table_index].len && pauses[table_index][pause_index].stage == stage) {
-       hb_ot_map_t::pause_map_t *pause_map = m.pauses[table_index].push ();
-       if (likely (pause_map)) {
-         pause_map->num_lookups = last_num_lookups;
-         pause_map->callback = pauses[table_index][pause_index].callback;
-       }
-
-       pause_index++;
-      }
-    }
-  }
-}
-
-
diff --git a/src/hb-ot-maxp-table.hh b/src/hb-ot-maxp-table.hh
deleted file mode 100644 (file)
index e270490..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright © 2011,2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_OT_MAXP_TABLE_HH
-#define HB_OT_MAXP_TABLE_HH
-
-#include "hb-open-type-private.hh"
-
-
-
-/*
- * maxp -- The Maximum Profile Table
- */
-
-#define HB_OT_TAG_maxp HB_TAG('m','a','x','p')
-
-struct maxp
-{
-  static const hb_tag_t Tag    = HB_OT_TAG_maxp;
-
-  inline unsigned int get_num_glyphs (void) const {
-    return numGlyphs;
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (c->check_struct (this) &&
-                        likely (version.major == 1 || (version.major == 0 && version.minor == 0x5000)));
-  }
-
-  /* We only implement version 0.5 as none of the extra fields in version 1.0 are useful. */
-  private:
-  FixedVersion version;                /* Version of the maxp table (0.5 or 1.0),
-                                        * 0x00005000 or 0x00010000. */
-  USHORT       numGlyphs;              /* The number of glyphs in the font. */
-  public:
-  DEFINE_SIZE_STATIC (6);
-};
-
-
-
-#endif /* HB_OT_MAXP_TABLE_HH */
diff --git a/src/hb-ot-name-table.hh b/src/hb-ot-name-table.hh
deleted file mode 100644 (file)
index 9077c8c..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright © 2011,2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_OT_NAME_TABLE_HH
-#define HB_OT_NAME_TABLE_HH
-
-#include "hb-open-type-private.hh"
-
-
-
-/*
- * name -- The Naming Table
- */
-
-#define HB_OT_TAG_name HB_TAG('n','a','m','e')
-
-
-struct NameRecord
-{
-  static int cmp (const NameRecord *a, const NameRecord *b)
-  {
-    int ret;
-    ret = b->platformID.cmp (a->platformID);
-    if (ret) return ret;
-    ret = b->encodingID.cmp (a->encodingID);
-    if (ret) return ret;
-    ret = b->languageID.cmp (a->languageID);
-    if (ret) return ret;
-    ret = b->nameID.cmp (a->nameID);
-    if (ret) return ret;
-    return 0;
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c, void *base) {
-    TRACE_SANITIZE ();
-    /* We can check from base all the way up to the end of string... */
-    return TRACE_RETURN (c->check_struct (this) && c->check_range ((char *) base, (unsigned int) length + offset));
-  }
-
-  USHORT       platformID;     /* Platform ID. */
-  USHORT       encodingID;     /* Platform-specific encoding ID. */
-  USHORT       languageID;     /* Language ID. */
-  USHORT       nameID;         /* Name ID. */
-  USHORT       length;         /* String length (in bytes). */
-  USHORT       offset;         /* String offset from start of storage area (in bytes). */
-  public:
-  DEFINE_SIZE_STATIC (12);
-};
-
-struct name
-{
-  static const hb_tag_t Tag    = HB_OT_TAG_name;
-
-  inline unsigned int get_name (unsigned int platform_id,
-                               unsigned int encoding_id,
-                               unsigned int language_id,
-                               unsigned int name_id,
-                               void *buffer,
-                               unsigned int buffer_length) const
-  {
-    NameRecord key;
-    key.platformID.set (platform_id);
-    key.encodingID.set (encoding_id);
-    key.languageID.set (language_id);
-    key.nameID.set (name_id);
-    NameRecord *match = (NameRecord *) bsearch (&key, nameRecord, count, sizeof (nameRecord[0]), (hb_compare_func_t) NameRecord::cmp);
-
-    if (!match)
-      return 0;
-
-    unsigned int length = MIN (buffer_length, (unsigned int) match->length);
-    memcpy (buffer, (char *) this + stringOffset + match->offset, length);
-    return length;
-  }
-
-  inline bool sanitize_records (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    char *string_pool = (char *) this + stringOffset;
-    unsigned int _count = count;
-    for (unsigned int i = 0; i < _count; i++)
-      if (!nameRecord[i].sanitize (c, string_pool)) return TRACE_RETURN (false);
-    return TRACE_RETURN (true);
-  }
-
-  inline bool sanitize (hb_sanitize_context_t *c) {
-    TRACE_SANITIZE ();
-    return TRACE_RETURN (c->check_struct (this) &&
-                        likely (format == 0 || format == 1) &&
-                        c->check_array (nameRecord, nameRecord[0].static_size, count) &&
-                        sanitize_records (c));
-  }
-
-  /* We only implement format 0 for now. */
-  private:
-  USHORT       format;                 /* Format selector (=0/1). */
-  USHORT       count;                  /* Number of name records. */
-  Offset       stringOffset;           /* Offset to start of string storage (from start of table). */
-  NameRecord   nameRecord[VAR];        /* The name records where count is the number of records. */
-  public:
-  DEFINE_SIZE_ARRAY (6, nameRecord);
-};
-
-
-
-#endif /* HB_OT_NAME_TABLE_HH */
diff --git a/src/hb-ot-shape-complex-arabic-table.hh b/src/hb-ot-shape-complex-arabic-table.hh
deleted file mode 100644 (file)
index df85086..0000000
+++ /dev/null
@@ -1,942 +0,0 @@
-/* == Start of generated table == */
-/*
- * The following table is generated by running:
- *
- *   ./gen-arabic-table.py ArabicShaping.txt UnicodeData.txt
- *
- * on files with these headers:
- *
- * # ArabicShaping-6.1.0.txt
- * # Date: 2011-04-15, 23:16:00 GMT [KW]
- * UnicodeData.txt does not have a header.
- */
-
-#ifndef HB_OT_SHAPE_COMPLEX_ARABIC_TABLE_HH
-#define HB_OT_SHAPE_COMPLEX_ARABIC_TABLE_HH
-
-
-static const uint8_t joining_table[] =
-{
-
-  /* Arabic Characters */
-
-  JOINING_TYPE_U, /* 0600; ARABIC NUMBER SIGN; U; No_Joining_Group */
-  JOINING_TYPE_U, /* 0601; ARABIC SIGN SANAH; U; No_Joining_Group */
-  JOINING_TYPE_U, /* 0602; ARABIC FOOTNOTE MARKER; U; No_Joining_Group */
-  JOINING_TYPE_U, /* 0603; ARABIC SIGN SAFHA; U; No_Joining_Group */
-  JOINING_TYPE_U, /* 0604; ARABIC SIGN SAMVAT; U; No_Joining_Group */
-  JOINING_TYPE_X, /* 0605 */
-  JOINING_TYPE_X, /* 0606 */
-  JOINING_TYPE_X, /* 0607 */
-  JOINING_TYPE_U, /* 0608; ARABIC RAY; U; No_Joining_Group */
-  JOINING_TYPE_X, /* 0609 */
-  JOINING_TYPE_X, /* 060A */
-  JOINING_TYPE_U, /* 060B; AFGHANI SIGN; U; No_Joining_Group */
-  JOINING_TYPE_X, /* 060C */
-  JOINING_TYPE_X, /* 060D */
-  JOINING_TYPE_X, /* 060E */
-  JOINING_TYPE_X, /* 060F */
-  JOINING_TYPE_X, /* 0610 */
-  JOINING_TYPE_X, /* 0611 */
-  JOINING_TYPE_X, /* 0612 */
-  JOINING_TYPE_X, /* 0613 */
-  JOINING_TYPE_X, /* 0614 */
-  JOINING_TYPE_X, /* 0615 */
-  JOINING_TYPE_X, /* 0616 */
-  JOINING_TYPE_X, /* 0617 */
-  JOINING_TYPE_X, /* 0618 */
-  JOINING_TYPE_X, /* 0619 */
-  JOINING_TYPE_X, /* 061A */
-  JOINING_TYPE_X, /* 061B */
-  JOINING_TYPE_X, /* 061C */
-  JOINING_TYPE_X, /* 061D */
-  JOINING_TYPE_X, /* 061E */
-  JOINING_TYPE_X, /* 061F */
-  JOINING_TYPE_D, /* 0620; DOTLESS YEH WITH SEPARATE RING BELOW; D; YEH */
-  JOINING_TYPE_U, /* 0621; HAMZA; U; No_Joining_Group */
-  JOINING_TYPE_R, /* 0622; ALEF WITH MADDA ABOVE; R; ALEF */
-  JOINING_TYPE_R, /* 0623; ALEF WITH HAMZA ABOVE; R; ALEF */
-  JOINING_TYPE_R, /* 0624; WAW WITH HAMZA ABOVE; R; WAW */
-  JOINING_TYPE_R, /* 0625; ALEF WITH HAMZA BELOW; R; ALEF */
-  JOINING_TYPE_D, /* 0626; DOTLESS YEH WITH HAMZA ABOVE; D; YEH */
-  JOINING_TYPE_R, /* 0627; ALEF; R; ALEF */
-  JOINING_TYPE_D, /* 0628; BEH; D; BEH */
-  JOINING_TYPE_R, /* 0629; TEH MARBUTA; R; TEH MARBUTA */
-  JOINING_TYPE_D, /* 062A; DOTLESS BEH WITH 2 DOTS ABOVE; D; BEH */
-  JOINING_TYPE_D, /* 062B; DOTLESS BEH WITH 3 DOTS ABOVE; D; BEH */
-  JOINING_TYPE_D, /* 062C; HAH WITH DOT BELOW; D; HAH */
-  JOINING_TYPE_D, /* 062D; HAH; D; HAH */
-  JOINING_TYPE_D, /* 062E; HAH WITH DOT ABOVE; D; HAH */
-  JOINING_TYPE_R, /* 062F; DAL; R; DAL */
-  JOINING_TYPE_R, /* 0630; DAL WITH DOT ABOVE; R; DAL */
-  JOINING_TYPE_R, /* 0631; REH; R; REH */
-  JOINING_TYPE_R, /* 0632; REH WITH DOT ABOVE; R; REH */
-  JOINING_TYPE_D, /* 0633; SEEN; D; SEEN */
-  JOINING_TYPE_D, /* 0634; SEEN WITH 3 DOTS ABOVE; D; SEEN */
-  JOINING_TYPE_D, /* 0635; SAD; D; SAD */
-  JOINING_TYPE_D, /* 0636; SAD WITH DOT ABOVE; D; SAD */
-  JOINING_TYPE_D, /* 0637; TAH; D; TAH */
-  JOINING_TYPE_D, /* 0638; TAH WITH DOT ABOVE; D; TAH */
-  JOINING_TYPE_D, /* 0639; AIN; D; AIN */
-  JOINING_TYPE_D, /* 063A; AIN WITH DOT ABOVE; D; AIN */
-  JOINING_TYPE_D, /* 063B; KEHEH WITH 2 DOTS ABOVE; D; GAF */
-  JOINING_TYPE_D, /* 063C; KEHEH WITH 3 DOTS BELOW; D; GAF */
-  JOINING_TYPE_D, /* 063D; FARSI YEH WITH INVERTED V ABOVE; D; FARSI YEH */
-  JOINING_TYPE_D, /* 063E; FARSI YEH WITH 2 DOTS ABOVE; D; FARSI YEH */
-  JOINING_TYPE_D, /* 063F; FARSI YEH WITH 3 DOTS ABOVE; D; FARSI YEH */
-  JOINING_TYPE_C, /* 0640; TATWEEL; C; No_Joining_Group */
-  JOINING_TYPE_D, /* 0641; FEH; D; FEH */
-  JOINING_TYPE_D, /* 0642; QAF; D; QAF */
-  JOINING_TYPE_D, /* 0643; KAF; D; KAF */
-  JOINING_TYPE_D, /* 0644; LAM; D; LAM */
-  JOINING_TYPE_D, /* 0645; MEEM; D; MEEM */
-  JOINING_TYPE_D, /* 0646; NOON; D; NOON */
-  JOINING_TYPE_D, /* 0647; HEH; D; HEH */
-  JOINING_TYPE_R, /* 0648; WAW; R; WAW */
-  JOINING_TYPE_D, /* 0649; DOTLESS YEH; D; YEH */
-  JOINING_TYPE_D, /* 064A; YEH; D; YEH */
-  JOINING_TYPE_X, /* 064B */
-  JOINING_TYPE_X, /* 064C */
-  JOINING_TYPE_X, /* 064D */
-  JOINING_TYPE_X, /* 064E */
-  JOINING_TYPE_X, /* 064F */
-  JOINING_TYPE_X, /* 0650 */
-  JOINING_TYPE_X, /* 0651 */
-  JOINING_TYPE_X, /* 0652 */
-  JOINING_TYPE_X, /* 0653 */
-  JOINING_TYPE_X, /* 0654 */
-  JOINING_TYPE_X, /* 0655 */
-  JOINING_TYPE_X, /* 0656 */
-  JOINING_TYPE_X, /* 0657 */
-  JOINING_TYPE_X, /* 0658 */
-  JOINING_TYPE_X, /* 0659 */
-  JOINING_TYPE_X, /* 065A */
-  JOINING_TYPE_X, /* 065B */
-  JOINING_TYPE_X, /* 065C */
-  JOINING_TYPE_X, /* 065D */
-  JOINING_TYPE_X, /* 065E */
-  JOINING_TYPE_X, /* 065F */
-  JOINING_TYPE_X, /* 0660 */
-  JOINING_TYPE_X, /* 0661 */
-  JOINING_TYPE_X, /* 0662 */
-  JOINING_TYPE_X, /* 0663 */
-  JOINING_TYPE_X, /* 0664 */
-  JOINING_TYPE_X, /* 0665 */
-  JOINING_TYPE_X, /* 0666 */
-  JOINING_TYPE_X, /* 0667 */
-  JOINING_TYPE_X, /* 0668 */
-  JOINING_TYPE_X, /* 0669 */
-  JOINING_TYPE_X, /* 066A */
-  JOINING_TYPE_X, /* 066B */
-  JOINING_TYPE_X, /* 066C */
-  JOINING_TYPE_X, /* 066D */
-  JOINING_TYPE_D, /* 066E; DOTLESS BEH; D; BEH */
-  JOINING_TYPE_D, /* 066F; DOTLESS QAF; D; QAF */
-  JOINING_TYPE_X, /* 0670 */
-  JOINING_TYPE_R, /* 0671; ALEF WITH WASLA ABOVE; R; ALEF */
-  JOINING_TYPE_R, /* 0672; ALEF WITH WAVY HAMZA ABOVE; R; ALEF */
-  JOINING_TYPE_R, /* 0673; ALEF WITH WAVY HAMZA BELOW; R; ALEF */
-  JOINING_TYPE_U, /* 0674; HIGH HAMZA; U; No_Joining_Group */
-  JOINING_TYPE_R, /* 0675; HIGH HAMZA ALEF; R; ALEF */
-  JOINING_TYPE_R, /* 0676; HIGH HAMZA WAW; R; WAW */
-  JOINING_TYPE_R, /* 0677; HIGH HAMZA WAW WITH DAMMA ABOVE; R; WAW */
-  JOINING_TYPE_D, /* 0678; HIGH HAMZA DOTLESS YEH; D; YEH */
-  JOINING_TYPE_D, /* 0679; DOTLESS BEH WITH TAH ABOVE; D; BEH */
-  JOINING_TYPE_D, /* 067A; DOTLESS BEH WITH VERTICAL 2 DOTS ABOVE; D; BEH */
-  JOINING_TYPE_D, /* 067B; DOTLESS BEH WITH VERTICAL 2 DOTS BELOW; D; BEH */
-  JOINING_TYPE_D, /* 067C; DOTLESS BEH WITH ATTACHED RING BELOW AND 2 DOTS ABOVE; D; BEH */
-  JOINING_TYPE_D, /* 067D; DOTLESS BEH WITH INVERTED 3 DOTS ABOVE; D; BEH */
-  JOINING_TYPE_D, /* 067E; DOTLESS BEH WITH 3 DOTS BELOW; D; BEH */
-  JOINING_TYPE_D, /* 067F; DOTLESS BEH WITH 4 DOTS ABOVE; D; BEH */
-  JOINING_TYPE_D, /* 0680; DOTLESS BEH WITH 4 DOTS BELOW; D; BEH */
-  JOINING_TYPE_D, /* 0681; HAH WITH HAMZA ABOVE; D; HAH */
-  JOINING_TYPE_D, /* 0682; HAH WITH VERTICAL 2 DOTS ABOVE; D; HAH */
-  JOINING_TYPE_D, /* 0683; HAH WITH 2 DOTS BELOW; D; HAH */
-  JOINING_TYPE_D, /* 0684; HAH WITH VERTICAL 2 DOTS BELOW; D; HAH */
-  JOINING_TYPE_D, /* 0685; HAH WITH 3 DOTS ABOVE; D; HAH */
-  JOINING_TYPE_D, /* 0686; HAH WITH 3 DOTS BELOW; D; HAH */
-  JOINING_TYPE_D, /* 0687; HAH WITH 4 DOTS BELOW; D; HAH */
-  JOINING_TYPE_R, /* 0688; DAL WITH TAH ABOVE; R; DAL */
-  JOINING_TYPE_R, /* 0689; DAL WITH ATTACHED RING BELOW; R; DAL */
-  JOINING_TYPE_R, /* 068A; DAL WITH DOT BELOW; R; DAL */
-  JOINING_TYPE_R, /* 068B; DAL WITH DOT BELOW AND TAH ABOVE; R; DAL */
-  JOINING_TYPE_R, /* 068C; DAL WITH 2 DOTS ABOVE; R; DAL */
-  JOINING_TYPE_R, /* 068D; DAL WITH 2 DOTS BELOW; R; DAL */
-  JOINING_TYPE_R, /* 068E; DAL WITH 3 DOTS ABOVE; R; DAL */
-  JOINING_TYPE_R, /* 068F; DAL WITH INVERTED 3 DOTS ABOVE; R; DAL */
-  JOINING_TYPE_R, /* 0690; DAL WITH 4 DOTS ABOVE; R; DAL */
-  JOINING_TYPE_R, /* 0691; REH WITH TAH ABOVE; R; REH */
-  JOINING_TYPE_R, /* 0692; REH WITH V ABOVE; R; REH */
-  JOINING_TYPE_R, /* 0693; REH WITH ATTACHED RING BELOW; R; REH */
-  JOINING_TYPE_R, /* 0694; REH WITH DOT BELOW; R; REH */
-  JOINING_TYPE_R, /* 0695; REH WITH V BELOW; R; REH */
-  JOINING_TYPE_R, /* 0696; REH WITH DOT BELOW AND DOT WITHIN; R; REH */
-  JOINING_TYPE_R, /* 0697; REH WITH 2 DOTS ABOVE; R; REH */
-  JOINING_TYPE_R, /* 0698; REH WITH 3 DOTS ABOVE; R; REH */
-  JOINING_TYPE_R, /* 0699; REH WITH 4 DOTS ABOVE; R; REH */
-  JOINING_TYPE_D, /* 069A; SEEN WITH DOT BELOW AND DOT ABOVE; D; SEEN */
-  JOINING_TYPE_D, /* 069B; SEEN WITH 3 DOTS BELOW; D; SEEN */
-  JOINING_TYPE_D, /* 069C; SEEN WITH 3 DOTS BELOW AND 3 DOTS ABOVE; D; SEEN */
-  JOINING_TYPE_D, /* 069D; SAD WITH 2 DOTS BELOW; D; SAD */
-  JOINING_TYPE_D, /* 069E; SAD WITH 3 DOTS ABOVE; D; SAD */
-  JOINING_TYPE_D, /* 069F; TAH WITH 3 DOTS ABOVE; D; TAH */
-  JOINING_TYPE_D, /* 06A0; AIN WITH 3 DOTS ABOVE; D; AIN */
-  JOINING_TYPE_D, /* 06A1; DOTLESS FEH; D; FEH */
-  JOINING_TYPE_D, /* 06A2; DOTLESS FEH WITH DOT BELOW; D; FEH */
-  JOINING_TYPE_D, /* 06A3; FEH WITH DOT BELOW; D; FEH */
-  JOINING_TYPE_D, /* 06A4; DOTLESS FEH WITH 3 DOTS ABOVE; D; FEH */
-  JOINING_TYPE_D, /* 06A5; DOTLESS FEH WITH 3 DOTS BELOW; D; FEH */
-  JOINING_TYPE_D, /* 06A6; DOTLESS FEH WITH 4 DOTS ABOVE; D; FEH */
-  JOINING_TYPE_D, /* 06A7; DOTLESS QAF WITH DOT ABOVE; D; QAF */
-  JOINING_TYPE_D, /* 06A8; DOTLESS QAF WITH 3 DOTS ABOVE; D; QAF */
-  JOINING_TYPE_D, /* 06A9; KEHEH; D; GAF */
-  JOINING_TYPE_D, /* 06AA; SWASH KAF; D; SWASH KAF */
-  JOINING_TYPE_D, /* 06AB; KEHEH WITH ATTACHED RING BELOW; D; GAF */
-  JOINING_TYPE_D, /* 06AC; KAF WITH DOT ABOVE; D; KAF */
-  JOINING_TYPE_D, /* 06AD; KAF WITH 3 DOTS ABOVE; D; KAF */
-  JOINING_TYPE_D, /* 06AE; KAF WITH 3 DOTS BELOW; D; KAF */
-  JOINING_TYPE_D, /* 06AF; GAF; D; GAF */
-  JOINING_TYPE_D, /* 06B0; GAF WITH ATTACHED RING BELOW; D; GAF */
-  JOINING_TYPE_D, /* 06B1; GAF WITH 2 DOTS ABOVE; D; GAF */
-  JOINING_TYPE_D, /* 06B2; GAF WITH 2 DOTS BELOW; D; GAF */
-  JOINING_TYPE_D, /* 06B3; GAF WITH VERTICAL 2 DOTS BELOW; D; GAF */
-  JOINING_TYPE_D, /* 06B4; GAF WITH 3 DOTS ABOVE; D; GAF */
-  JOINING_TYPE_D, /* 06B5; LAM WITH V ABOVE; D; LAM */
-  JOINING_TYPE_D, /* 06B6; LAM WITH DOT ABOVE; D; LAM */
-  JOINING_TYPE_D, /* 06B7; LAM WITH 3 DOTS ABOVE; D; LAM */
-  JOINING_TYPE_D, /* 06B8; LAM WITH 3 DOTS BELOW; D; LAM */
-  JOINING_TYPE_D, /* 06B9; NOON WITH DOT BELOW; D; NOON */
-  JOINING_TYPE_D, /* 06BA; DOTLESS NOON; D; NOON */
-  JOINING_TYPE_D, /* 06BB; DOTLESS NOON WITH TAH ABOVE; D; NOON */
-  JOINING_TYPE_D, /* 06BC; NOON WITH ATTACHED RING BELOW; D; NOON */
-  JOINING_TYPE_D, /* 06BD; NYA; D; NYA */
-  JOINING_TYPE_D, /* 06BE; KNOTTED HEH; D; KNOTTED HEH */
-  JOINING_TYPE_D, /* 06BF; HAH WITH 3 DOTS BELOW AND DOT ABOVE; D; HAH */
-  JOINING_TYPE_R, /* 06C0; DOTLESS TEH MARBUTA WITH HAMZA ABOVE; R; TEH MARBUTA */
-  JOINING_TYPE_D, /* 06C1; HEH GOAL; D; HEH GOAL */
-  JOINING_TYPE_D, /* 06C2; HEH GOAL WITH HAMZA ABOVE; D; HEH GOAL */
-  JOINING_TYPE_R, /* 06C3; TEH MARBUTA GOAL; R; TEH MARBUTA GOAL */
-  JOINING_TYPE_R, /* 06C4; WAW WITH ATTACHED RING WITHIN; R; WAW */
-  JOINING_TYPE_R, /* 06C5; WAW WITH BAR; R; WAW */
-  JOINING_TYPE_R, /* 06C6; WAW WITH V ABOVE; R; WAW */
-  JOINING_TYPE_R, /* 06C7; WAW WITH DAMMA ABOVE; R; WAW */
-  JOINING_TYPE_R, /* 06C8; WAW WITH ALEF ABOVE; R; WAW */
-  JOINING_TYPE_R, /* 06C9; WAW WITH INVERTED V ABOVE; R; WAW */
-  JOINING_TYPE_R, /* 06CA; WAW WITH 2 DOTS ABOVE; R; WAW */
-  JOINING_TYPE_R, /* 06CB; WAW WITH 3 DOTS ABOVE; R; WAW */
-  JOINING_TYPE_D, /* 06CC; FARSI YEH; D; FARSI YEH */
-  JOINING_TYPE_R, /* 06CD; YEH WITH TAIL; R; YEH WITH TAIL */
-  JOINING_TYPE_D, /* 06CE; FARSI YEH WITH V ABOVE; D; FARSI YEH */
-  JOINING_TYPE_R, /* 06CF; WAW WITH DOT ABOVE; R; WAW */
-  JOINING_TYPE_D, /* 06D0; DOTLESS YEH WITH VERTICAL 2 DOTS BELOW; D; YEH */
-  JOINING_TYPE_D, /* 06D1; DOTLESS YEH WITH 3 DOTS BELOW; D; YEH */
-  JOINING_TYPE_R, /* 06D2; YEH BARREE; R; YEH BARREE */
-  JOINING_TYPE_R, /* 06D3; YEH BARREE WITH HAMZA ABOVE; R; YEH BARREE */
-  JOINING_TYPE_X, /* 06D4 */
-  JOINING_TYPE_R, /* 06D5; DOTLESS TEH MARBUTA; R; TEH MARBUTA */
-  JOINING_TYPE_X, /* 06D6 */
-  JOINING_TYPE_X, /* 06D7 */
-  JOINING_TYPE_X, /* 06D8 */
-  JOINING_TYPE_X, /* 06D9 */
-  JOINING_TYPE_X, /* 06DA */
-  JOINING_TYPE_X, /* 06DB */
-  JOINING_TYPE_X, /* 06DC */
-  JOINING_TYPE_U, /* 06DD; ARABIC END OF AYAH; U; No_Joining_Group */
-  JOINING_TYPE_X, /* 06DE */
-  JOINING_TYPE_X, /* 06DF */
-  JOINING_TYPE_X, /* 06E0 */
-  JOINING_TYPE_X, /* 06E1 */
-  JOINING_TYPE_X, /* 06E2 */
-  JOINING_TYPE_X, /* 06E3 */
-  JOINING_TYPE_X, /* 06E4 */
-  JOINING_TYPE_X, /* 06E5 */
-  JOINING_TYPE_X, /* 06E6 */
-  JOINING_TYPE_X, /* 06E7 */
-  JOINING_TYPE_X, /* 06E8 */
-  JOINING_TYPE_X, /* 06E9 */
-  JOINING_TYPE_X, /* 06EA */
-  JOINING_TYPE_X, /* 06EB */
-  JOINING_TYPE_X, /* 06EC */
-  JOINING_TYPE_X, /* 06ED */
-  JOINING_TYPE_R, /* 06EE; DAL WITH INVERTED V ABOVE; R; DAL */
-  JOINING_TYPE_R, /* 06EF; REH WITH INVERTED V ABOVE; R; REH */
-  JOINING_TYPE_X, /* 06F0 */
-  JOINING_TYPE_X, /* 06F1 */
-  JOINING_TYPE_X, /* 06F2 */
-  JOINING_TYPE_X, /* 06F3 */
-  JOINING_TYPE_X, /* 06F4 */
-  JOINING_TYPE_X, /* 06F5 */
-  JOINING_TYPE_X, /* 06F6 */
-  JOINING_TYPE_X, /* 06F7 */
-  JOINING_TYPE_X, /* 06F8 */
-  JOINING_TYPE_X, /* 06F9 */
-  JOINING_TYPE_D, /* 06FA; SEEN WITH DOT BELOW AND 3 DOTS ABOVE; D; SEEN */
-  JOINING_TYPE_D, /* 06FB; SAD WITH DOT BELOW AND DOT ABOVE; D; SAD */
-  JOINING_TYPE_D, /* 06FC; AIN WITH DOT BELOW AND DOT ABOVE; D; AIN */
-  JOINING_TYPE_X, /* 06FD */
-  JOINING_TYPE_X, /* 06FE */
-  JOINING_TYPE_D, /* 06FF; KNOTTED HEH WITH INVERTED V ABOVE; D; KNOTTED HEH */
-
-  /* Syriac Characters */
-
-  JOINING_TYPE_X, /* 0700 */
-  JOINING_TYPE_X, /* 0701 */
-  JOINING_TYPE_X, /* 0702 */
-  JOINING_TYPE_X, /* 0703 */
-  JOINING_TYPE_X, /* 0704 */
-  JOINING_TYPE_X, /* 0705 */
-  JOINING_TYPE_X, /* 0706 */
-  JOINING_TYPE_X, /* 0707 */
-  JOINING_TYPE_X, /* 0708 */
-  JOINING_TYPE_X, /* 0709 */
-  JOINING_TYPE_X, /* 070A */
-  JOINING_TYPE_X, /* 070B */
-  JOINING_TYPE_X, /* 070C */
-  JOINING_TYPE_X, /* 070D */
-  JOINING_TYPE_X, /* 070E */
-  JOINING_TYPE_X, /* 070F */
-  JOINING_GROUP_ALAPH, /* 0710; ALAPH; R; ALAPH */
-  JOINING_TYPE_X, /* 0711 */
-  JOINING_TYPE_D, /* 0712; BETH; D; BETH */
-  JOINING_TYPE_D, /* 0713; GAMAL; D; GAMAL */
-  JOINING_TYPE_D, /* 0714; GAMAL GARSHUNI; D; GAMAL */
-  JOINING_GROUP_DALATH_RISH, /* 0715; DALATH; R; DALATH RISH */
-  JOINING_GROUP_DALATH_RISH, /* 0716; DOTLESS DALATH RISH; R; DALATH RISH */
-  JOINING_TYPE_R, /* 0717; HE; R; HE */
-  JOINING_TYPE_R, /* 0718; WAW; R; SYRIAC WAW */
-  JOINING_TYPE_R, /* 0719; ZAIN; R; ZAIN */
-  JOINING_TYPE_D, /* 071A; HETH; D; HETH */
-  JOINING_TYPE_D, /* 071B; TETH; D; TETH */
-  JOINING_TYPE_D, /* 071C; TETH GARSHUNI; D; TETH */
-  JOINING_TYPE_D, /* 071D; YUDH; D; YUDH */
-  JOINING_TYPE_R, /* 071E; YUDH HE; R; YUDH HE */
-  JOINING_TYPE_D, /* 071F; KAPH; D; KAPH */
-  JOINING_TYPE_D, /* 0720; LAMADH; D; LAMADH */
-  JOINING_TYPE_D, /* 0721; MIM; D; MIM */
-  JOINING_TYPE_D, /* 0722; NUN; D; NUN */
-  JOINING_TYPE_D, /* 0723; SEMKATH; D; SEMKATH */
-  JOINING_TYPE_D, /* 0724; FINAL SEMKATH; D; FINAL SEMKATH */
-  JOINING_TYPE_D, /* 0725; E; D; E */
-  JOINING_TYPE_D, /* 0726; PE; D; PE */
-  JOINING_TYPE_D, /* 0727; REVERSED PE; D; REVERSED PE */
-  JOINING_TYPE_R, /* 0728; SADHE; R; SADHE */
-  JOINING_TYPE_D, /* 0729; QAPH; D; QAPH */
-  JOINING_GROUP_DALATH_RISH, /* 072A; RISH; R; DALATH RISH */
-  JOINING_TYPE_D, /* 072B; SHIN; D; SHIN */
-  JOINING_TYPE_R, /* 072C; TAW; R; TAW */
-  JOINING_TYPE_D, /* 072D; PERSIAN BHETH; D; BETH */
-  JOINING_TYPE_D, /* 072E; PERSIAN GHAMAL; D; GAMAL */
-  JOINING_GROUP_DALATH_RISH, /* 072F; PERSIAN DHALATH; R; DALATH RISH */
-  JOINING_TYPE_X, /* 0730 */
-  JOINING_TYPE_X, /* 0731 */
-  JOINING_TYPE_X, /* 0732 */
-  JOINING_TYPE_X, /* 0733 */
-  JOINING_TYPE_X, /* 0734 */
-  JOINING_TYPE_X, /* 0735 */
-  JOINING_TYPE_X, /* 0736 */
-  JOINING_TYPE_X, /* 0737 */
-  JOINING_TYPE_X, /* 0738 */
-  JOINING_TYPE_X, /* 0739 */
-  JOINING_TYPE_X, /* 073A */
-  JOINING_TYPE_X, /* 073B */
-  JOINING_TYPE_X, /* 073C */
-  JOINING_TYPE_X, /* 073D */
-  JOINING_TYPE_X, /* 073E */
-  JOINING_TYPE_X, /* 073F */
-  JOINING_TYPE_X, /* 0740 */
-  JOINING_TYPE_X, /* 0741 */
-  JOINING_TYPE_X, /* 0742 */
-  JOINING_TYPE_X, /* 0743 */
-  JOINING_TYPE_X, /* 0744 */
-  JOINING_TYPE_X, /* 0745 */
-  JOINING_TYPE_X, /* 0746 */
-  JOINING_TYPE_X, /* 0747 */
-  JOINING_TYPE_X, /* 0748 */
-  JOINING_TYPE_X, /* 0749 */
-  JOINING_TYPE_X, /* 074A */
-  JOINING_TYPE_X, /* 074B */
-  JOINING_TYPE_X, /* 074C */
-  JOINING_TYPE_R, /* 074D; SOGDIAN ZHAIN; R; ZHAIN */
-  JOINING_TYPE_D, /* 074E; SOGDIAN KHAPH; D; KHAPH */
-  JOINING_TYPE_D, /* 074F; SOGDIAN FE; D; FE */
-
-  /* Arabic Supplement Characters */
-
-  JOINING_TYPE_D, /* 0750; DOTLESS BEH WITH HORIZONTAL 3 DOTS BELOW; D; BEH */
-  JOINING_TYPE_D, /* 0751; BEH WITH 3 DOTS ABOVE; D; BEH */
-  JOINING_TYPE_D, /* 0752; DOTLESS BEH WITH INVERTED 3 DOTS BELOW; D; BEH */
-  JOINING_TYPE_D, /* 0753; DOTLESS BEH WITH INVERTED 3 DOTS BELOW AND 2 DOTS ABOVE; D; BEH */
-  JOINING_TYPE_D, /* 0754; DOTLESS BEH WITH 2 DOTS BELOW AND DOT ABOVE; D; BEH */
-  JOINING_TYPE_D, /* 0755; DOTLESS BEH WITH INVERTED V BELOW; D; BEH */
-  JOINING_TYPE_D, /* 0756; DOTLESS BEH WITH V ABOVE; D; BEH */
-  JOINING_TYPE_D, /* 0757; HAH WITH 2 DOTS ABOVE; D; HAH */
-  JOINING_TYPE_D, /* 0758; HAH WITH INVERTED 3 DOTS BELOW; D; HAH */
-  JOINING_TYPE_R, /* 0759; DAL WITH VERTICAL 2 DOTS BELOW AND TAH ABOVE; R; DAL */
-  JOINING_TYPE_R, /* 075A; DAL WITH INVERTED V BELOW; R; DAL */
-  JOINING_TYPE_R, /* 075B; REH WITH BAR; R; REH */
-  JOINING_TYPE_D, /* 075C; SEEN WITH 4 DOTS ABOVE; D; SEEN */
-  JOINING_TYPE_D, /* 075D; AIN WITH 2 DOTS ABOVE; D; AIN */
-  JOINING_TYPE_D, /* 075E; AIN WITH INVERTED 3 DOTS ABOVE; D; AIN */
-  JOINING_TYPE_D, /* 075F; AIN WITH VERTICAL 2 DOTS ABOVE; D; AIN */
-  JOINING_TYPE_D, /* 0760; DOTLESS FEH WITH 2 DOTS BELOW; D; FEH */
-  JOINING_TYPE_D, /* 0761; DOTLESS FEH WITH INVERTED 3 DOTS BELOW; D; FEH */
-  JOINING_TYPE_D, /* 0762; KEHEH WITH DOT ABOVE; D; GAF */
-  JOINING_TYPE_D, /* 0763; KEHEH WITH 3 DOTS ABOVE; D; GAF */
-  JOINING_TYPE_D, /* 0764; KEHEH WITH INVERTED 3 DOTS BELOW; D; GAF */
-  JOINING_TYPE_D, /* 0765; MEEM WITH DOT ABOVE; D; MEEM */
-  JOINING_TYPE_D, /* 0766; MEEM WITH DOT BELOW; D; MEEM */
-  JOINING_TYPE_D, /* 0767; NOON WITH 2 DOTS BELOW; D; NOON */
-  JOINING_TYPE_D, /* 0768; NOON WITH TAH ABOVE; D; NOON */
-  JOINING_TYPE_D, /* 0769; NOON WITH V ABOVE; D; NOON */
-  JOINING_TYPE_D, /* 076A; LAM WITH BAR; D; LAM */
-  JOINING_TYPE_R, /* 076B; REH WITH VERTICAL 2 DOTS ABOVE; R; REH */
-  JOINING_TYPE_R, /* 076C; REH WITH HAMZA ABOVE; R; REH */
-  JOINING_TYPE_D, /* 076D; SEEN WITH VERTICAL 2 DOTS ABOVE; D; SEEN */
-  JOINING_TYPE_D, /* 076E; HAH WITH TAH BELOW; D; HAH */
-  JOINING_TYPE_D, /* 076F; HAH WITH TAH AND 2 DOTS BELOW; D; HAH */
-  JOINING_TYPE_D, /* 0770; SEEN WITH 2 DOTS AND TAH ABOVE; D; SEEN */
-  JOINING_TYPE_R, /* 0771; REH WITH 2 DOTS AND TAH ABOVE; R; REH */
-  JOINING_TYPE_D, /* 0772; HAH WITH TAH ABOVE; D; HAH */
-  JOINING_TYPE_R, /* 0773; ALEF WITH DIGIT TWO ABOVE; R; ALEF */
-  JOINING_TYPE_R, /* 0774; ALEF WITH DIGIT THREE ABOVE; R; ALEF */
-  JOINING_TYPE_D, /* 0775; FARSI YEH WITH DIGIT TWO ABOVE; D; FARSI YEH */
-  JOINING_TYPE_D, /* 0776; FARSI YEH WITH DIGIT THREE ABOVE; D; FARSI YEH */
-  JOINING_TYPE_D, /* 0777; DOTLESS YEH WITH DIGIT FOUR BELOW; D; YEH */
-  JOINING_TYPE_R, /* 0778; WAW WITH DIGIT TWO ABOVE; R; WAW */
-  JOINING_TYPE_R, /* 0779; WAW WITH DIGIT THREE ABOVE; R; WAW */
-  JOINING_TYPE_D, /* 077A; BURUSHASKI YEH BARREE WITH DIGIT TWO ABOVE; D; BURUSHASKI YEH BARREE */
-  JOINING_TYPE_D, /* 077B; BURUSHASKI YEH BARREE WITH DIGIT THREE ABOVE; D; BURUSHASKI YEH BARREE */
-  JOINING_TYPE_D, /* 077C; HAH WITH DIGIT FOUR BELOW; D; HAH */
-  JOINING_TYPE_D, /* 077D; SEEN WITH DIGIT FOUR ABOVE; D; SEEN */
-  JOINING_TYPE_D, /* 077E; SEEN WITH INVERTED V ABOVE; D; SEEN */
-  JOINING_TYPE_D, /* 077F; KAF WITH 2 DOTS ABOVE; D; KAF */
-
-  /* N'Ko Characters */
-
-  JOINING_TYPE_X, /* 0780 */
-  JOINING_TYPE_X, /* 0781 */
-  JOINING_TYPE_X, /* 0782 */
-  JOINING_TYPE_X, /* 0783 */
-  JOINING_TYPE_X, /* 0784 */
-  JOINING_TYPE_X, /* 0785 */
-  JOINING_TYPE_X, /* 0786 */
-  JOINING_TYPE_X, /* 0787 */
-  JOINING_TYPE_X, /* 0788 */
-  JOINING_TYPE_X, /* 0789 */
-  JOINING_TYPE_X, /* 078A */
-  JOINING_TYPE_X, /* 078B */
-  JOINING_TYPE_X, /* 078C */
-  JOINING_TYPE_X, /* 078D */
-  JOINING_TYPE_X, /* 078E */
-  JOINING_TYPE_X, /* 078F */
-  JOINING_TYPE_X, /* 0790 */
-  JOINING_TYPE_X, /* 0791 */
-  JOINING_TYPE_X, /* 0792 */
-  JOINING_TYPE_X, /* 0793 */
-  JOINING_TYPE_X, /* 0794 */
-  JOINING_TYPE_X, /* 0795 */
-  JOINING_TYPE_X, /* 0796 */
-  JOINING_TYPE_X, /* 0797 */
-  JOINING_TYPE_X, /* 0798 */
-  JOINING_TYPE_X, /* 0799 */
-  JOINING_TYPE_X, /* 079A */
-  JOINING_TYPE_X, /* 079B */
-  JOINING_TYPE_X, /* 079C */
-  JOINING_TYPE_X, /* 079D */
-  JOINING_TYPE_X, /* 079E */
-  JOINING_TYPE_X, /* 079F */
-  JOINING_TYPE_X, /* 07A0 */
-  JOINING_TYPE_X, /* 07A1 */
-  JOINING_TYPE_X, /* 07A2 */
-  JOINING_TYPE_X, /* 07A3 */
-  JOINING_TYPE_X, /* 07A4 */
-  JOINING_TYPE_X, /* 07A5 */
-  JOINING_TYPE_X, /* 07A6 */
-  JOINING_TYPE_X, /* 07A7 */
-  JOINING_TYPE_X, /* 07A8 */
-  JOINING_TYPE_X, /* 07A9 */
-  JOINING_TYPE_X, /* 07AA */
-  JOINING_TYPE_X, /* 07AB */
-  JOINING_TYPE_X, /* 07AC */
-  JOINING_TYPE_X, /* 07AD */
-  JOINING_TYPE_X, /* 07AE */
-  JOINING_TYPE_X, /* 07AF */
-  JOINING_TYPE_X, /* 07B0 */
-  JOINING_TYPE_X, /* 07B1 */
-  JOINING_TYPE_X, /* 07B2 */
-  JOINING_TYPE_X, /* 07B3 */
-  JOINING_TYPE_X, /* 07B4 */
-  JOINING_TYPE_X, /* 07B5 */
-  JOINING_TYPE_X, /* 07B6 */
-  JOINING_TYPE_X, /* 07B7 */
-  JOINING_TYPE_X, /* 07B8 */
-  JOINING_TYPE_X, /* 07B9 */
-  JOINING_TYPE_X, /* 07BA */
-  JOINING_TYPE_X, /* 07BB */
-  JOINING_TYPE_X, /* 07BC */
-  JOINING_TYPE_X, /* 07BD */
-  JOINING_TYPE_X, /* 07BE */
-  JOINING_TYPE_X, /* 07BF */
-  JOINING_TYPE_X, /* 07C0 */
-  JOINING_TYPE_X, /* 07C1 */
-  JOINING_TYPE_X, /* 07C2 */
-  JOINING_TYPE_X, /* 07C3 */
-  JOINING_TYPE_X, /* 07C4 */
-  JOINING_TYPE_X, /* 07C5 */
-  JOINING_TYPE_X, /* 07C6 */
-  JOINING_TYPE_X, /* 07C7 */
-  JOINING_TYPE_X, /* 07C8 */
-  JOINING_TYPE_X, /* 07C9 */
-  JOINING_TYPE_D, /* 07CA; NKO A; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 07CB; NKO EE; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 07CC; NKO I; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 07CD; NKO E; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 07CE; NKO U; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 07CF; NKO OO; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 07D0; NKO O; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 07D1; NKO DAGBASINNA; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 07D2; NKO N; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 07D3; NKO BA; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 07D4; NKO PA; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 07D5; NKO TA; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 07D6; NKO JA; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 07D7; NKO CHA; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 07D8; NKO DA; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 07D9; NKO RA; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 07DA; NKO RRA; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 07DB; NKO SA; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 07DC; NKO GBA; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 07DD; NKO FA; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 07DE; NKO KA; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 07DF; NKO LA; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 07E0; NKO NA WOLOSO; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 07E1; NKO MA; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 07E2; NKO NYA; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 07E3; NKO NA; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 07E4; NKO HA; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 07E5; NKO WA; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 07E6; NKO YA; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 07E7; NKO NYA WOLOSO; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 07E8; NKO JONA JA; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 07E9; NKO JONA CHA; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 07EA; NKO JONA RA; D; No_Joining_Group */
-  JOINING_TYPE_X, /* 07EB */
-  JOINING_TYPE_X, /* 07EC */
-  JOINING_TYPE_X, /* 07ED */
-  JOINING_TYPE_X, /* 07EE */
-  JOINING_TYPE_X, /* 07EF */
-  JOINING_TYPE_X, /* 07F0 */
-  JOINING_TYPE_X, /* 07F1 */
-  JOINING_TYPE_X, /* 07F2 */
-  JOINING_TYPE_X, /* 07F3 */
-  JOINING_TYPE_X, /* 07F4 */
-  JOINING_TYPE_X, /* 07F5 */
-  JOINING_TYPE_X, /* 07F6 */
-  JOINING_TYPE_X, /* 07F7 */
-  JOINING_TYPE_X, /* 07F8 */
-  JOINING_TYPE_X, /* 07F9 */
-  JOINING_TYPE_C, /* 07FA; NKO LAJANYALAN; C; No_Joining_Group */
-
-  /* Mandaic Characters */
-
-  JOINING_TYPE_X, /* 07FB */
-  JOINING_TYPE_X, /* 07FC */
-  JOINING_TYPE_X, /* 07FD */
-  JOINING_TYPE_X, /* 07FE */
-  JOINING_TYPE_X, /* 07FF */
-  JOINING_TYPE_X, /* 0800 */
-  JOINING_TYPE_X, /* 0801 */
-  JOINING_TYPE_X, /* 0802 */
-  JOINING_TYPE_X, /* 0803 */
-  JOINING_TYPE_X, /* 0804 */
-  JOINING_TYPE_X, /* 0805 */
-  JOINING_TYPE_X, /* 0806 */
-  JOINING_TYPE_X, /* 0807 */
-  JOINING_TYPE_X, /* 0808 */
-  JOINING_TYPE_X, /* 0809 */
-  JOINING_TYPE_X, /* 080A */
-  JOINING_TYPE_X, /* 080B */
-  JOINING_TYPE_X, /* 080C */
-  JOINING_TYPE_X, /* 080D */
-  JOINING_TYPE_X, /* 080E */
-  JOINING_TYPE_X, /* 080F */
-  JOINING_TYPE_X, /* 0810 */
-  JOINING_TYPE_X, /* 0811 */
-  JOINING_TYPE_X, /* 0812 */
-  JOINING_TYPE_X, /* 0813 */
-  JOINING_TYPE_X, /* 0814 */
-  JOINING_TYPE_X, /* 0815 */
-  JOINING_TYPE_X, /* 0816 */
-  JOINING_TYPE_X, /* 0817 */
-  JOINING_TYPE_X, /* 0818 */
-  JOINING_TYPE_X, /* 0819 */
-  JOINING_TYPE_X, /* 081A */
-  JOINING_TYPE_X, /* 081B */
-  JOINING_TYPE_X, /* 081C */
-  JOINING_TYPE_X, /* 081D */
-  JOINING_TYPE_X, /* 081E */
-  JOINING_TYPE_X, /* 081F */
-  JOINING_TYPE_X, /* 0820 */
-  JOINING_TYPE_X, /* 0821 */
-  JOINING_TYPE_X, /* 0822 */
-  JOINING_TYPE_X, /* 0823 */
-  JOINING_TYPE_X, /* 0824 */
-  JOINING_TYPE_X, /* 0825 */
-  JOINING_TYPE_X, /* 0826 */
-  JOINING_TYPE_X, /* 0827 */
-  JOINING_TYPE_X, /* 0828 */
-  JOINING_TYPE_X, /* 0829 */
-  JOINING_TYPE_X, /* 082A */
-  JOINING_TYPE_X, /* 082B */
-  JOINING_TYPE_X, /* 082C */
-  JOINING_TYPE_X, /* 082D */
-  JOINING_TYPE_X, /* 082E */
-  JOINING_TYPE_X, /* 082F */
-  JOINING_TYPE_X, /* 0830 */
-  JOINING_TYPE_X, /* 0831 */
-  JOINING_TYPE_X, /* 0832 */
-  JOINING_TYPE_X, /* 0833 */
-  JOINING_TYPE_X, /* 0834 */
-  JOINING_TYPE_X, /* 0835 */
-  JOINING_TYPE_X, /* 0836 */
-  JOINING_TYPE_X, /* 0837 */
-  JOINING_TYPE_X, /* 0838 */
-  JOINING_TYPE_X, /* 0839 */
-  JOINING_TYPE_X, /* 083A */
-  JOINING_TYPE_X, /* 083B */
-  JOINING_TYPE_X, /* 083C */
-  JOINING_TYPE_X, /* 083D */
-  JOINING_TYPE_X, /* 083E */
-  JOINING_TYPE_X, /* 083F */
-  JOINING_TYPE_R, /* 0840; MANDAIC HALQA; R; No_Joining_Group */
-  JOINING_TYPE_D, /* 0841; MANDAIC AB; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 0842; MANDAIC AG; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 0843; MANDAIC AD; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 0844; MANDAIC AH; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 0845; MANDAIC USHENNA; D; No_Joining_Group */
-  JOINING_TYPE_R, /* 0846; MANDAIC AZ; R; No_Joining_Group */
-  JOINING_TYPE_D, /* 0847; MANDAIC IT; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 0848; MANDAIC ATT; D; No_Joining_Group */
-  JOINING_TYPE_R, /* 0849; MANDAIC AKSA; R; No_Joining_Group */
-  JOINING_TYPE_D, /* 084A; MANDAIC AK; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 084B; MANDAIC AL; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 084C; MANDAIC AM; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 084D; MANDAIC AN; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 084E; MANDAIC AS; D; No_Joining_Group */
-  JOINING_TYPE_R, /* 084F; MANDAIC IN; R; No_Joining_Group */
-  JOINING_TYPE_D, /* 0850; MANDAIC AP; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 0851; MANDAIC ASZ; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 0852; MANDAIC AQ; D; No_Joining_Group */
-  JOINING_TYPE_D, /* 0853; MANDAIC AR; D; No_Joining_Group */
-  JOINING_TYPE_R, /* 0854; MANDAIC ASH; R; No_Joining_Group */
-  JOINING_TYPE_D, /* 0855; MANDAIC AT; D; No_Joining_Group */
-  JOINING_TYPE_U, /* 0856; MANDAIC DUSHENNA; U; No_Joining_Group */
-  JOINING_TYPE_U, /* 0857; MANDAIC KAD; U; No_Joining_Group */
-  JOINING_TYPE_U, /* 0858; MANDAIC AIN; U; No_Joining_Group */
-
-  /* Arabic Extended-A Characters */
-
-  JOINING_TYPE_X, /* 0859 */
-  JOINING_TYPE_X, /* 085A */
-  JOINING_TYPE_X, /* 085B */
-  JOINING_TYPE_X, /* 085C */
-  JOINING_TYPE_X, /* 085D */
-  JOINING_TYPE_X, /* 085E */
-  JOINING_TYPE_X, /* 085F */
-  JOINING_TYPE_X, /* 0860 */
-  JOINING_TYPE_X, /* 0861 */
-  JOINING_TYPE_X, /* 0862 */
-  JOINING_TYPE_X, /* 0863 */
-  JOINING_TYPE_X, /* 0864 */
-  JOINING_TYPE_X, /* 0865 */
-  JOINING_TYPE_X, /* 0866 */
-  JOINING_TYPE_X, /* 0867 */
-  JOINING_TYPE_X, /* 0868 */
-  JOINING_TYPE_X, /* 0869 */
-  JOINING_TYPE_X, /* 086A */
-  JOINING_TYPE_X, /* 086B */
-  JOINING_TYPE_X, /* 086C */
-  JOINING_TYPE_X, /* 086D */
-  JOINING_TYPE_X, /* 086E */
-  JOINING_TYPE_X, /* 086F */
-  JOINING_TYPE_X, /* 0870 */
-  JOINING_TYPE_X, /* 0871 */
-  JOINING_TYPE_X, /* 0872 */
-  JOINING_TYPE_X, /* 0873 */
-  JOINING_TYPE_X, /* 0874 */
-  JOINING_TYPE_X, /* 0875 */
-  JOINING_TYPE_X, /* 0876 */
-  JOINING_TYPE_X, /* 0877 */
-  JOINING_TYPE_X, /* 0878 */
-  JOINING_TYPE_X, /* 0879 */
-  JOINING_TYPE_X, /* 087A */
-  JOINING_TYPE_X, /* 087B */
-  JOINING_TYPE_X, /* 087C */
-  JOINING_TYPE_X, /* 087D */
-  JOINING_TYPE_X, /* 087E */
-  JOINING_TYPE_X, /* 087F */
-  JOINING_TYPE_X, /* 0880 */
-  JOINING_TYPE_X, /* 0881 */
-  JOINING_TYPE_X, /* 0882 */
-  JOINING_TYPE_X, /* 0883 */
-  JOINING_TYPE_X, /* 0884 */
-  JOINING_TYPE_X, /* 0885 */
-  JOINING_TYPE_X, /* 0886 */
-  JOINING_TYPE_X, /* 0887 */
-  JOINING_TYPE_X, /* 0888 */
-  JOINING_TYPE_X, /* 0889 */
-  JOINING_TYPE_X, /* 088A */
-  JOINING_TYPE_X, /* 088B */
-  JOINING_TYPE_X, /* 088C */
-  JOINING_TYPE_X, /* 088D */
-  JOINING_TYPE_X, /* 088E */
-  JOINING_TYPE_X, /* 088F */
-  JOINING_TYPE_X, /* 0890 */
-  JOINING_TYPE_X, /* 0891 */
-  JOINING_TYPE_X, /* 0892 */
-  JOINING_TYPE_X, /* 0893 */
-  JOINING_TYPE_X, /* 0894 */
-  JOINING_TYPE_X, /* 0895 */
-  JOINING_TYPE_X, /* 0896 */
-  JOINING_TYPE_X, /* 0897 */
-  JOINING_TYPE_X, /* 0898 */
-  JOINING_TYPE_X, /* 0899 */
-  JOINING_TYPE_X, /* 089A */
-  JOINING_TYPE_X, /* 089B */
-  JOINING_TYPE_X, /* 089C */
-  JOINING_TYPE_X, /* 089D */
-  JOINING_TYPE_X, /* 089E */
-  JOINING_TYPE_X, /* 089F */
-  JOINING_TYPE_D, /* 08A0; DOTLESS BEH WITH V BELOW; D; BEH */
-  JOINING_TYPE_X, /* 08A1 */
-  JOINING_TYPE_D, /* 08A2; HAH WITH DOT BELOW AND 2 DOTS ABOVE; D; HAH */
-  JOINING_TYPE_D, /* 08A3; TAH WITH 2 DOTS ABOVE; D; TAH */
-  JOINING_TYPE_D, /* 08A4; DOTLESS FEH WITH DOT BELOW AND 3 DOTS ABOVE; D; FEH */
-  JOINING_TYPE_D, /* 08A5; QAF WITH DOT BELOW; D; QAF */
-  JOINING_TYPE_D, /* 08A6; LAM WITH DOUBLE BAR; D; LAM */
-  JOINING_TYPE_D, /* 08A7; MEEM WITH 3 DOTS ABOVE; D; MEEM */
-  JOINING_TYPE_D, /* 08A8; YEH WITH HAMZA ABOVE; D; YEH */
-  JOINING_TYPE_D, /* 08A9; YEH WITH DOT ABOVE; D; YEH */
-  JOINING_TYPE_R, /* 08AA; REH WITH LOOP; R; REH */
-  JOINING_TYPE_R, /* 08AB; WAW WITH DOT WITHIN; R; WAW */
-  JOINING_TYPE_R, /* 08AC; ROHINGYA YEH; R; ROHINGYA YEH */
-
-};
-
-#define JOINING_TABLE_FIRST    0x0600
-#define JOINING_TABLE_LAST     0x08AC
-
-
-static const uint16_t shaping_table[][4] =
-{
-  {0x0621, 0x0621, 0x0621, 0xFE80}, /* U+0621 ARABIC LETTER HAMZA ISOLATED FORM */
-  {0x0622, 0x0622, 0xFE82, 0xFE81}, /* U+0622 ARABIC LETTER ALEF WITH MADDA ABOVE */
-  {0x0623, 0x0623, 0xFE84, 0xFE83}, /* U+0623 ARABIC LETTER ALEF WITH HAMZA ABOVE */
-  {0x0624, 0x0624, 0xFE86, 0xFE85}, /* U+0624 ARABIC LETTER WAW WITH HAMZA ABOVE */
-  {0x0625, 0x0625, 0xFE88, 0xFE87}, /* U+0625 ARABIC LETTER ALEF WITH HAMZA BELOW */
-  {0xFE8B, 0xFE8C, 0xFE8A, 0xFE89}, /* U+0626 ARABIC LETTER YEH WITH HAMZA ABOVE */
-  {0x0627, 0x0627, 0xFE8E, 0xFE8D}, /* U+0627 ARABIC LETTER ALEF */
-  {0xFE91, 0xFE92, 0xFE90, 0xFE8F}, /* U+0628 ARABIC LETTER BEH */
-  {0x0629, 0x0629, 0xFE94, 0xFE93}, /* U+0629 ARABIC LETTER TEH MARBUTA */
-  {0xFE97, 0xFE98, 0xFE96, 0xFE95}, /* U+062A ARABIC LETTER TEH */
-  {0xFE9B, 0xFE9C, 0xFE9A, 0xFE99}, /* U+062B ARABIC LETTER THEH */
-  {0xFE9F, 0xFEA0, 0xFE9E, 0xFE9D}, /* U+062C ARABIC LETTER JEEM */
-  {0xFEA3, 0xFEA4, 0xFEA2, 0xFEA1}, /* U+062D ARABIC LETTER HAH */
-  {0xFEA7, 0xFEA8, 0xFEA6, 0xFEA5}, /* U+062E ARABIC LETTER KHAH */
-  {0x062F, 0x062F, 0xFEAA, 0xFEA9}, /* U+062F ARABIC LETTER DAL */
-  {0x0630, 0x0630, 0xFEAC, 0xFEAB}, /* U+0630 ARABIC LETTER THAL */
-  {0x0631, 0x0631, 0xFEAE, 0xFEAD}, /* U+0631 ARABIC LETTER REH */
-  {0x0632, 0x0632, 0xFEB0, 0xFEAF}, /* U+0632 ARABIC LETTER ZAIN */
-  {0xFEB3, 0xFEB4, 0xFEB2, 0xFEB1}, /* U+0633 ARABIC LETTER SEEN */
-  {0xFEB7, 0xFEB8, 0xFEB6, 0xFEB5}, /* U+0634 ARABIC LETTER SHEEN */
-  {0xFEBB, 0xFEBC, 0xFEBA, 0xFEB9}, /* U+0635 ARABIC LETTER SAD */
-  {0xFEBF, 0xFEC0, 0xFEBE, 0xFEBD}, /* U+0636 ARABIC LETTER DAD */
-  {0xFEC3, 0xFEC4, 0xFEC2, 0xFEC1}, /* U+0637 ARABIC LETTER TAH */
-  {0xFEC7, 0xFEC8, 0xFEC6, 0xFEC5}, /* U+0638 ARABIC LETTER ZAH */
-  {0xFECB, 0xFECC, 0xFECA, 0xFEC9}, /* U+0639 ARABIC LETTER AIN */
-  {0xFECF, 0xFED0, 0xFECE, 0xFECD}, /* U+063A ARABIC LETTER GHAIN */
-  {0x063B, 0x063B, 0x063B, 0x063B}, /* U+063B  */
-  {0x063C, 0x063C, 0x063C, 0x063C}, /* U+063C  */
-  {0x063D, 0x063D, 0x063D, 0x063D}, /* U+063D  */
-  {0x063E, 0x063E, 0x063E, 0x063E}, /* U+063E  */
-  {0x063F, 0x063F, 0x063F, 0x063F}, /* U+063F  */
-  {0x0640, 0x0640, 0x0640, 0x0640}, /* U+0640  */
-  {0xFED3, 0xFED4, 0xFED2, 0xFED1}, /* U+0641 ARABIC LETTER FEH */
-  {0xFED7, 0xFED8, 0xFED6, 0xFED5}, /* U+0642 ARABIC LETTER QAF */
-  {0xFEDB, 0xFEDC, 0xFEDA, 0xFED9}, /* U+0643 ARABIC LETTER KAF */
-  {0xFEDF, 0xFEE0, 0xFEDE, 0xFEDD}, /* U+0644 ARABIC LETTER LAM */
-  {0xFEE3, 0xFEE4, 0xFEE2, 0xFEE1}, /* U+0645 ARABIC LETTER MEEM */
-  {0xFEE7, 0xFEE8, 0xFEE6, 0xFEE5}, /* U+0646 ARABIC LETTER NOON */
-  {0xFEEB, 0xFEEC, 0xFEEA, 0xFEE9}, /* U+0647 ARABIC LETTER HEH */
-  {0x0648, 0x0648, 0xFEEE, 0xFEED}, /* U+0648 ARABIC LETTER WAW */
-  {0xFBE8, 0xFBE9, 0xFEF0, 0xFEEF}, /* U+0649 ARABIC LETTER */
-  {0xFEF3, 0xFEF4, 0xFEF2, 0xFEF1}, /* U+064A ARABIC LETTER YEH */
-  {0x064B, 0x064B, 0x064B, 0x064B}, /* U+064B  */
-  {0x064C, 0x064C, 0x064C, 0x064C}, /* U+064C  */
-  {0x064D, 0x064D, 0x064D, 0x064D}, /* U+064D  */
-  {0x064E, 0x064E, 0x064E, 0x064E}, /* U+064E  */
-  {0x064F, 0x064F, 0x064F, 0x064F}, /* U+064F  */
-  {0x0650, 0x0650, 0x0650, 0x0650}, /* U+0650  */
-  {0x0651, 0x0651, 0x0651, 0x0651}, /* U+0651  */
-  {0x0652, 0x0652, 0x0652, 0x0652}, /* U+0652  */
-  {0x0653, 0x0653, 0x0653, 0x0653}, /* U+0653  */
-  {0x0654, 0x0654, 0x0654, 0x0654}, /* U+0654  */
-  {0x0655, 0x0655, 0x0655, 0x0655}, /* U+0655  */
-  {0x0656, 0x0656, 0x0656, 0x0656}, /* U+0656  */
-  {0x0657, 0x0657, 0x0657, 0x0657}, /* U+0657  */
-  {0x0658, 0x0658, 0x0658, 0x0658}, /* U+0658  */
-  {0x0659, 0x0659, 0x0659, 0x0659}, /* U+0659  */
-  {0x065A, 0x065A, 0x065A, 0x065A}, /* U+065A  */
-  {0x065B, 0x065B, 0x065B, 0x065B}, /* U+065B  */
-  {0x065C, 0x065C, 0x065C, 0x065C}, /* U+065C  */
-  {0x065D, 0x065D, 0x065D, 0x065D}, /* U+065D  */
-  {0x065E, 0x065E, 0x065E, 0x065E}, /* U+065E  */
-  {0x065F, 0x065F, 0x065F, 0x065F}, /* U+065F  */
-  {0x0660, 0x0660, 0x0660, 0x0660}, /* U+0660  */
-  {0x0661, 0x0661, 0x0661, 0x0661}, /* U+0661  */
-  {0x0662, 0x0662, 0x0662, 0x0662}, /* U+0662  */
-  {0x0663, 0x0663, 0x0663, 0x0663}, /* U+0663  */
-  {0x0664, 0x0664, 0x0664, 0x0664}, /* U+0664  */
-  {0x0665, 0x0665, 0x0665, 0x0665}, /* U+0665  */
-  {0x0666, 0x0666, 0x0666, 0x0666}, /* U+0666  */
-  {0x0667, 0x0667, 0x0667, 0x0667}, /* U+0667  */
-  {0x0668, 0x0668, 0x0668, 0x0668}, /* U+0668  */
-  {0x0669, 0x0669, 0x0669, 0x0669}, /* U+0669  */
-  {0x066A, 0x066A, 0x066A, 0x066A}, /* U+066A  */
-  {0x066B, 0x066B, 0x066B, 0x066B}, /* U+066B  */
-  {0x066C, 0x066C, 0x066C, 0x066C}, /* U+066C  */
-  {0x066D, 0x066D, 0x066D, 0x066D}, /* U+066D  */
-  {0x066E, 0x066E, 0x066E, 0x066E}, /* U+066E  */
-  {0x066F, 0x066F, 0x066F, 0x066F}, /* U+066F  */
-  {0x0670, 0x0670, 0x0670, 0x0670}, /* U+0670  */
-  {0x0671, 0x0671, 0xFB51, 0xFB50}, /* U+0671 ARABIC LETTER ALEF WASLA */
-  {0x0672, 0x0672, 0x0672, 0x0672}, /* U+0672  */
-  {0x0673, 0x0673, 0x0673, 0x0673}, /* U+0673  */
-  {0x0674, 0x0674, 0x0674, 0x0674}, /* U+0674  */
-  {0x0675, 0x0675, 0x0675, 0x0675}, /* U+0675  */
-  {0x0676, 0x0676, 0x0676, 0x0676}, /* U+0676  */
-  {0x0677, 0x0677, 0x0677, 0xFBDD}, /* U+0677 ARABIC LETTER U WITH HAMZA ABOVE ISOLATED FORM */
-  {0x0678, 0x0678, 0x0678, 0x0678}, /* U+0678  */
-  {0xFB68, 0xFB69, 0xFB67, 0xFB66}, /* U+0679 ARABIC LETTER TTEH */
-  {0xFB60, 0xFB61, 0xFB5F, 0xFB5E}, /* U+067A ARABIC LETTER TTEHEH */
-  {0xFB54, 0xFB55, 0xFB53, 0xFB52}, /* U+067B ARABIC LETTER BEEH */
-  {0x067C, 0x067C, 0x067C, 0x067C}, /* U+067C  */
-  {0x067D, 0x067D, 0x067D, 0x067D}, /* U+067D  */
-  {0xFB58, 0xFB59, 0xFB57, 0xFB56}, /* U+067E ARABIC LETTER PEH */
-  {0xFB64, 0xFB65, 0xFB63, 0xFB62}, /* U+067F ARABIC LETTER TEHEH */
-  {0xFB5C, 0xFB5D, 0xFB5B, 0xFB5A}, /* U+0680 ARABIC LETTER BEHEH */
-  {0x0681, 0x0681, 0x0681, 0x0681}, /* U+0681  */
-  {0x0682, 0x0682, 0x0682, 0x0682}, /* U+0682  */
-  {0xFB78, 0xFB79, 0xFB77, 0xFB76}, /* U+0683 ARABIC LETTER NYEH */
-  {0xFB74, 0xFB75, 0xFB73, 0xFB72}, /* U+0684 ARABIC LETTER DYEH */
-  {0x0685, 0x0685, 0x0685, 0x0685}, /* U+0685  */
-  {0xFB7C, 0xFB7D, 0xFB7B, 0xFB7A}, /* U+0686 ARABIC LETTER TCHEH */
-  {0xFB80, 0xFB81, 0xFB7F, 0xFB7E}, /* U+0687 ARABIC LETTER TCHEHEH */
-  {0x0688, 0x0688, 0xFB89, 0xFB88}, /* U+0688 ARABIC LETTER DDAL */
-  {0x0689, 0x0689, 0x0689, 0x0689}, /* U+0689  */
-  {0x068A, 0x068A, 0x068A, 0x068A}, /* U+068A  */
-  {0x068B, 0x068B, 0x068B, 0x068B}, /* U+068B  */
-  {0x068C, 0x068C, 0xFB85, 0xFB84}, /* U+068C ARABIC LETTER DAHAL */
-  {0x068D, 0x068D, 0xFB83, 0xFB82}, /* U+068D ARABIC LETTER DDAHAL */
-  {0x068E, 0x068E, 0xFB87, 0xFB86}, /* U+068E ARABIC LETTER DUL */
-  {0x068F, 0x068F, 0x068F, 0x068F}, /* U+068F  */
-  {0x0690, 0x0690, 0x0690, 0x0690}, /* U+0690  */
-  {0x0691, 0x0691, 0xFB8D, 0xFB8C}, /* U+0691 ARABIC LETTER RREH */
-  {0x0692, 0x0692, 0x0692, 0x0692}, /* U+0692  */
-  {0x0693, 0x0693, 0x0693, 0x0693}, /* U+0693  */
-  {0x0694, 0x0694, 0x0694, 0x0694}, /* U+0694  */
-  {0x0695, 0x0695, 0x0695, 0x0695}, /* U+0695  */
-  {0x0696, 0x0696, 0x0696, 0x0696}, /* U+0696  */
-  {0x0697, 0x0697, 0x0697, 0x0697}, /* U+0697  */
-  {0x0698, 0x0698, 0xFB8B, 0xFB8A}, /* U+0698 ARABIC LETTER JEH */
-  {0x0699, 0x0699, 0x0699, 0x0699}, /* U+0699  */
-  {0x069A, 0x069A, 0x069A, 0x069A}, /* U+069A  */
-  {0x069B, 0x069B, 0x069B, 0x069B}, /* U+069B  */
-  {0x069C, 0x069C, 0x069C, 0x069C}, /* U+069C  */
-  {0x069D, 0x069D, 0x069D, 0x069D}, /* U+069D  */
-  {0x069E, 0x069E, 0x069E, 0x069E}, /* U+069E  */
-  {0x069F, 0x069F, 0x069F, 0x069F}, /* U+069F  */
-  {0x06A0, 0x06A0, 0x06A0, 0x06A0}, /* U+06A0  */
-  {0x06A1, 0x06A1, 0x06A1, 0x06A1}, /* U+06A1  */
-  {0x06A2, 0x06A2, 0x06A2, 0x06A2}, /* U+06A2  */
-  {0x06A3, 0x06A3, 0x06A3, 0x06A3}, /* U+06A3  */
-  {0xFB6C, 0xFB6D, 0xFB6B, 0xFB6A}, /* U+06A4 ARABIC LETTER VEH */
-  {0x06A5, 0x06A5, 0x06A5, 0x06A5}, /* U+06A5  */
-  {0xFB70, 0xFB71, 0xFB6F, 0xFB6E}, /* U+06A6 ARABIC LETTER PEHEH */
-  {0x06A7, 0x06A7, 0x06A7, 0x06A7}, /* U+06A7  */
-  {0x06A8, 0x06A8, 0x06A8, 0x06A8}, /* U+06A8  */
-  {0xFB90, 0xFB91, 0xFB8F, 0xFB8E}, /* U+06A9 ARABIC LETTER KEHEH */
-  {0x06AA, 0x06AA, 0x06AA, 0x06AA}, /* U+06AA  */
-  {0x06AB, 0x06AB, 0x06AB, 0x06AB}, /* U+06AB  */
-  {0x06AC, 0x06AC, 0x06AC, 0x06AC}, /* U+06AC  */
-  {0xFBD5, 0xFBD6, 0xFBD4, 0xFBD3}, /* U+06AD ARABIC LETTER NG */
-  {0x06AE, 0x06AE, 0x06AE, 0x06AE}, /* U+06AE  */
-  {0xFB94, 0xFB95, 0xFB93, 0xFB92}, /* U+06AF ARABIC LETTER GAF */
-  {0x06B0, 0x06B0, 0x06B0, 0x06B0}, /* U+06B0  */
-  {0xFB9C, 0xFB9D, 0xFB9B, 0xFB9A}, /* U+06B1 ARABIC LETTER NGOEH */
-  {0x06B2, 0x06B2, 0x06B2, 0x06B2}, /* U+06B2  */
-  {0xFB98, 0xFB99, 0xFB97, 0xFB96}, /* U+06B3 ARABIC LETTER GUEH */
-  {0x06B4, 0x06B4, 0x06B4, 0x06B4}, /* U+06B4  */
-  {0x06B5, 0x06B5, 0x06B5, 0x06B5}, /* U+06B5  */
-  {0x06B6, 0x06B6, 0x06B6, 0x06B6}, /* U+06B6  */
-  {0x06B7, 0x06B7, 0x06B7, 0x06B7}, /* U+06B7  */
-  {0x06B8, 0x06B8, 0x06B8, 0x06B8}, /* U+06B8  */
-  {0x06B9, 0x06B9, 0x06B9, 0x06B9}, /* U+06B9  */
-  {0x06BA, 0x06BA, 0xFB9F, 0xFB9E}, /* U+06BA ARABIC LETTER NOON GHUNNA */
-  {0xFBA2, 0xFBA3, 0xFBA1, 0xFBA0}, /* U+06BB ARABIC LETTER RNOON */
-  {0x06BC, 0x06BC, 0x06BC, 0x06BC}, /* U+06BC  */
-  {0x06BD, 0x06BD, 0x06BD, 0x06BD}, /* U+06BD  */
-  {0xFBAC, 0xFBAD, 0xFBAB, 0xFBAA}, /* U+06BE ARABIC LETTER HEH DOACHASHMEE */
-  {0x06BF, 0x06BF, 0x06BF, 0x06BF}, /* U+06BF  */
-  {0x06C0, 0x06C0, 0xFBA5, 0xFBA4}, /* U+06C0 ARABIC LETTER HEH WITH YEH ABOVE */
-  {0xFBA8, 0xFBA9, 0xFBA7, 0xFBA6}, /* U+06C1 ARABIC LETTER HEH GOAL */
-  {0x06C2, 0x06C2, 0x06C2, 0x06C2}, /* U+06C2  */
-  {0x06C3, 0x06C3, 0x06C3, 0x06C3}, /* U+06C3  */
-  {0x06C4, 0x06C4, 0x06C4, 0x06C4}, /* U+06C4  */
-  {0x06C5, 0x06C5, 0xFBE1, 0xFBE0}, /* U+06C5 ARABIC LETTER KIRGHIZ OE */
-  {0x06C6, 0x06C6, 0xFBDA, 0xFBD9}, /* U+06C6 ARABIC LETTER OE */
-  {0x06C7, 0x06C7, 0xFBD8, 0xFBD7}, /* U+06C7 ARABIC LETTER U */
-  {0x06C8, 0x06C8, 0xFBDC, 0xFBDB}, /* U+06C8 ARABIC LETTER YU */
-  {0x06C9, 0x06C9, 0xFBE3, 0xFBE2}, /* U+06C9 ARABIC LETTER KIRGHIZ YU */
-  {0x06CA, 0x06CA, 0x06CA, 0x06CA}, /* U+06CA  */
-  {0x06CB, 0x06CB, 0xFBDF, 0xFBDE}, /* U+06CB ARABIC LETTER VE */
-  {0xFBFE, 0xFBFF, 0xFBFD, 0xFBFC}, /* U+06CC ARABIC LETTER FARSI YEH */
-  {0x06CD, 0x06CD, 0x06CD, 0x06CD}, /* U+06CD  */
-  {0x06CE, 0x06CE, 0x06CE, 0x06CE}, /* U+06CE  */
-  {0x06CF, 0x06CF, 0x06CF, 0x06CF}, /* U+06CF  */
-  {0xFBE6, 0xFBE7, 0xFBE5, 0xFBE4}, /* U+06D0 ARABIC LETTER E */
-  {0x06D1, 0x06D1, 0x06D1, 0x06D1}, /* U+06D1  */
-  {0x06D2, 0x06D2, 0xFBAF, 0xFBAE}, /* U+06D2 ARABIC LETTER YEH BARREE */
-  {0x06D3, 0x06D3, 0xFBB1, 0xFBB0}, /* U+06D3 ARABIC LETTER YEH BARREE WITH HAMZA ABOVE */
-};
-
-#define SHAPING_TABLE_FIRST    0x0621
-#define SHAPING_TABLE_LAST     0x06D3
-
-
-static const struct {
- uint16_t first;
- struct {
-   uint16_t second;
-   uint16_t ligature;
- } ligatures[4];
-} ligature_table[] =
-{
-  { 0xFEDF, {
-    { 0xFE88, 0xFEF9 }, /* ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW ISOLATED FORM */
-    { 0xFE82, 0xFEF5 }, /* ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE ISOLATED FORM */
-    { 0xFE8E, 0xFEFB }, /* ARABIC LIGATURE LAM WITH ALEF ISOLATED FORM */
-    { 0xFE84, 0xFEF7 }, /* ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE ISOLATED FORM */
-  }},
-  { 0xFEE0, {
-    { 0xFE88, 0xFEFA }, /* ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW FINAL FORM */
-    { 0xFE82, 0xFEF6 }, /* ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE FINAL FORM */
-    { 0xFE8E, 0xFEFC }, /* ARABIC LIGATURE LAM WITH ALEF FINAL FORM */
-    { 0xFE84, 0xFEF8 }, /* ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE FINAL FORM */
-  }},
-};
-
-
-#endif /* HB_OT_SHAPE_COMPLEX_ARABIC_TABLE_HH */
-
-/* == End of generated table == */
diff --git a/src/hb-ot-shape-complex-arabic.cc b/src/hb-ot-shape-complex-arabic.cc
deleted file mode 100644 (file)
index 54460f0..0000000
+++ /dev/null
@@ -1,299 +0,0 @@
-/*
- * Copyright © 2010  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "hb-ot-shape-complex-private.hh"
-#include "hb-ot-shape-private.hh"
-
-
-
-/* buffer var allocations */
-#define arabic_shaping_action() complex_var_temporary_u8() /* arabic shaping action */
-
-
-/*
- * Bits used in the joining tables
- */
-enum {
-  JOINING_TYPE_U               = 0,
-  JOINING_TYPE_R               = 1,
-  JOINING_TYPE_D               = 2,
-  JOINING_TYPE_C               = JOINING_TYPE_D,
-  JOINING_GROUP_ALAPH          = 3,
-  JOINING_GROUP_DALATH_RISH    = 4,
-  NUM_STATE_MACHINE_COLS       = 5,
-
-  /* We deliberately don't have a JOINING_TYPE_L since that's unused in Unicode. */
-
-  JOINING_TYPE_T = 6,
-  JOINING_TYPE_X = 7  /* means: use general-category to choose between U or T. */
-};
-
-/*
- * Joining types:
- */
-
-#include "hb-ot-shape-complex-arabic-table.hh"
-
-static unsigned int get_joining_type (hb_codepoint_t u, hb_unicode_general_category_t gen_cat)
-{
-  if (likely (hb_in_range<hb_codepoint_t> (u, JOINING_TABLE_FIRST, JOINING_TABLE_LAST))) {
-    unsigned int j_type = joining_table[u - JOINING_TABLE_FIRST];
-    if (likely (j_type != JOINING_TYPE_X))
-      return j_type;
-  }
-
-  /* Mongolian joining data is not in ArabicJoining.txt yet */
-  if (unlikely (hb_in_range<hb_codepoint_t> (u, 0x1800, 0x18AF)))
-  {
-    /* All letters, SIBE SYLLABLE BOUNDARY MARKER, and NIRUGU are D */
-    if (gen_cat == HB_UNICODE_GENERAL_CATEGORY_OTHER_LETTER || u == 0x1807 || u == 0x180A)
-      return JOINING_TYPE_D;
-  }
-
-  if (unlikely (hb_in_range<hb_codepoint_t> (u, 0x200C, 0x200D))) {
-    return u == 0x200C ? JOINING_TYPE_U : JOINING_TYPE_C;
-  }
-
-  return (FLAG(gen_cat) & (FLAG(HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK) | FLAG(HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK) | FLAG(HB_UNICODE_GENERAL_CATEGORY_FORMAT))) ?
-        JOINING_TYPE_T : JOINING_TYPE_U;
-}
-
-static hb_codepoint_t get_arabic_shape (hb_codepoint_t u, unsigned int shape)
-{
-  if (likely (hb_in_range<hb_codepoint_t> (u, SHAPING_TABLE_FIRST, SHAPING_TABLE_LAST)) && shape < 4)
-    return shaping_table[u - SHAPING_TABLE_FIRST][shape];
-  return u;
-}
-
-static uint16_t get_ligature (hb_codepoint_t first, hb_codepoint_t second)
-{
-  if (unlikely (!second)) return 0;
-  for (unsigned i = 0; i < ARRAY_LENGTH (ligature_table); i++)
-    if (ligature_table[i].first == first)
-      for (unsigned j = 0; j < ARRAY_LENGTH (ligature_table[i].ligatures); j++)
-       if (ligature_table[i].ligatures[j].second == second)
-         return ligature_table[i].ligatures[j].ligature;
-  return 0;
-}
-
-static const hb_tag_t arabic_syriac_features[] =
-{
-  HB_TAG('i','n','i','t'),
-  HB_TAG('m','e','d','i'),
-  HB_TAG('f','i','n','a'),
-  HB_TAG('i','s','o','l'),
-  /* Syriac */
-  HB_TAG('m','e','d','2'),
-  HB_TAG('f','i','n','2'),
-  HB_TAG('f','i','n','3'),
-  HB_TAG_NONE
-};
-
-
-/* Same order as the feature array */
-enum {
-  INIT,
-  MEDI,
-  FINA,
-  ISOL,
-
-  /* Syriac */
-  MED2,
-  FIN2,
-  FIN3,
-
-  NONE,
-
-  COMMON_NUM_FEATURES = 4,
-  SYRIAC_NUM_FEATURES = 7,
-  TOTAL_NUM_FEATURES = NONE
-};
-
-static const struct arabic_state_table_entry {
-       uint8_t prev_action;
-       uint8_t curr_action;
-       uint16_t next_state;
-} arabic_state_table[][NUM_STATE_MACHINE_COLS] =
-{
-  /*   jt_U,          jt_R,          jt_D,          jg_ALAPH,      jg_DALATH_RISH */
-
-  /* State 0: prev was U, not willing to join. */
-  { {NONE,NONE,0}, {NONE,ISOL,1}, {NONE,ISOL,2}, {NONE,ISOL,1}, {NONE,ISOL,6}, },
-
-  /* State 1: prev was R or ISOL/ALAPH, not willing to join. */
-  { {NONE,NONE,0}, {NONE,ISOL,1}, {NONE,ISOL,2}, {NONE,FIN2,5}, {NONE,ISOL,6}, },
-
-  /* State 2: prev was D/ISOL, willing to join. */
-  { {NONE,NONE,0}, {INIT,FINA,1}, {INIT,FINA,3}, {INIT,FINA,4}, {INIT,FINA,6}, },
-
-  /* State 3: prev was D/FINA, willing to join. */
-  { {NONE,NONE,0}, {MEDI,FINA,1}, {MEDI,FINA,3}, {MEDI,FINA,4}, {MEDI,FINA,6}, },
-
-  /* State 4: prev was FINA ALAPH, not willing to join. */
-  { {NONE,NONE,0}, {MED2,ISOL,1}, {MED2,ISOL,2}, {MED2,FIN2,5}, {MED2,ISOL,6}, },
-
-  /* State 5: prev was FIN2/FIN3 ALAPH, not willing to join. */
-  { {NONE,NONE,0}, {ISOL,ISOL,1}, {ISOL,ISOL,2}, {ISOL,FIN2,5}, {ISOL,ISOL,6}, },
-
-  /* State 6: prev was DALATH/RISH, not willing to join. */
-  { {NONE,NONE,0}, {NONE,ISOL,1}, {NONE,ISOL,2}, {NONE,FIN3,5}, {NONE,ISOL,6}, }
-};
-
-
-
-void
-_hb_ot_shape_complex_collect_features_arabic (hb_ot_map_builder_t *map,
-                                             const hb_segment_properties_t *props)
-{
-  /* For Language forms (in ArabicOT speak), we do the iso/fina/medi/init together,
-   * then rlig and calt each in their own stage.  This makes IranNastaliq's ALLAH
-   * ligature work correctly. It's unfortunate though...
-   *
-   * This also makes Arial Bold in Windows7 work.  See:
-   * https://bugzilla.mozilla.org/show_bug.cgi?id=644184
-   *
-   * TODO: Add test cases for these two.
-   */
-
-  map->add_bool_feature (HB_TAG('c','c','m','p'));
-  map->add_bool_feature (HB_TAG('l','o','c','l'));
-
-  map->add_gsub_pause (NULL, NULL);
-
-  unsigned int num_features = props->script == HB_SCRIPT_SYRIAC ? SYRIAC_NUM_FEATURES : COMMON_NUM_FEATURES;
-  for (unsigned int i = 0; i < num_features; i++)
-    map->add_bool_feature (arabic_syriac_features[i], false);
-
-  map->add_gsub_pause (NULL, NULL);
-
-  map->add_bool_feature (HB_TAG('r','l','i','g'));
-  map->add_gsub_pause (NULL, NULL);
-
-  map->add_bool_feature (HB_TAG('c','a','l','t'));
-  map->add_gsub_pause (NULL, NULL);
-
-  /* ArabicOT spec enables 'cswh' for Arabic where as for basic shaper it's disabled by default. */
-  map->add_bool_feature (HB_TAG('c','s','w','h'));
-}
-
-hb_ot_shape_normalization_mode_t
-_hb_ot_shape_complex_normalization_preference_arabic (void)
-{
-  return HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS;
-}
-
-
-static void
-arabic_fallback_shape (hb_font_t *font, hb_buffer_t *buffer)
-{
-  unsigned int count = buffer->len;
-  hb_codepoint_t glyph;
-
-  /* Shape to presentation forms */
-  for (unsigned int i = 0; i < count; i++) {
-    hb_codepoint_t u = buffer->info[i].codepoint;
-    hb_codepoint_t shaped = get_arabic_shape (u, buffer->info[i].arabic_shaping_action());
-    if (shaped != u && hb_font_get_glyph (font, shaped, 0, &glyph))
-      buffer->info[i].codepoint = shaped;
-  }
-
-  /* Mandatory ligatures */
-  buffer->clear_output ();
-  for (buffer->idx = 0; buffer->idx + 1 < count;) {
-    hb_codepoint_t ligature = get_ligature (buffer->cur().codepoint,
-                                           buffer->cur(+1).codepoint);
-    if (likely (!ligature) || !(hb_font_get_glyph (font, ligature, 0, &glyph))) {
-      buffer->next_glyph ();
-      continue;
-    }
-
-    buffer->replace_glyphs (2, 1, &ligature);
-
-    /* Technically speaking we can skip marks and stuff, like the GSUB path does.
-     * But who cares, we're in fallback! */
-  }
-  for (; buffer->idx < count;)
-      buffer->next_glyph ();
-  buffer->swap_buffers ();
-}
-
-void
-_hb_ot_shape_complex_setup_masks_arabic (hb_ot_map_t *map,
-                                        hb_buffer_t *buffer,
-                                        hb_font_t *font)
-{
-  unsigned int count = buffer->len;
-  unsigned int prev = 0, state = 0;
-
-  HB_BUFFER_ALLOCATE_VAR (buffer, arabic_shaping_action);
-
-  for (unsigned int i = 0; i < count; i++)
-  {
-    unsigned int this_type = get_joining_type (buffer->info[i].codepoint, _hb_glyph_info_get_general_category (&buffer->info[i]));
-
-    if (unlikely (this_type == JOINING_TYPE_T)) {
-      buffer->info[i].arabic_shaping_action() = NONE;
-      continue;
-    }
-
-    const arabic_state_table_entry *entry = &arabic_state_table[state][this_type];
-
-    if (entry->prev_action != NONE)
-      buffer->info[prev].arabic_shaping_action() = entry->prev_action;
-
-    buffer->info[i].arabic_shaping_action() = entry->curr_action;
-
-    prev = i;
-    state = entry->next_state;
-  }
-
-  hb_mask_t mask_array[TOTAL_NUM_FEATURES + 1] = {0};
-  hb_mask_t total_masks = 0;
-  unsigned int num_masks = buffer->props.script == HB_SCRIPT_SYRIAC ? SYRIAC_NUM_FEATURES : COMMON_NUM_FEATURES;
-  for (unsigned int i = 0; i < num_masks; i++) {
-    mask_array[i] = map->get_1_mask (arabic_syriac_features[i]);
-    total_masks |= mask_array[i];
-  }
-
-  if (total_masks) {
-    /* Has OpenType tables */
-    for (unsigned int i = 0; i < count; i++)
-      buffer->info[i].mask |= mask_array[buffer->info[i].arabic_shaping_action()];
-  } else if (buffer->props.script == HB_SCRIPT_ARABIC) {
-    /* Fallback Arabic shaping to Presentation Forms */
-    /* Pitfalls:
-     * - This path fires if user force-set init/medi/fina/isol off,
-     * - If font does not declare script 'arab', well, what to do?
-     *   Most probably it's safe to assume that init/medi/fina/isol
-     *   still mean Arabic shaping, although they do not have to.
-     */
-    arabic_fallback_shape (font, buffer);
-  }
-
-  HB_BUFFER_DEALLOCATE_VAR (buffer, arabic_shaping_action);
-}
-
-
diff --git a/src/hb-ot-shape-complex-indic-machine.hh b/src/hb-ot-shape-complex-indic-machine.hh
deleted file mode 100644 (file)
index db1396b..0000000
+++ /dev/null
@@ -1,293 +0,0 @@
-
-#line 1 "../../src/hb-ot-shape-complex-indic-machine.rl"
-/*
- * Copyright © 2011,2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_OT_SHAPE_COMPLEX_INDIC_MACHINE_HH
-#define HB_OT_SHAPE_COMPLEX_INDIC_MACHINE_HH
-
-#include "hb-private.hh"
-
-HB_BEGIN_DECLS
-
-
-#line 38 "../../src/hb-ot-shape-complex-indic-machine.hh.tmp"
-static const unsigned char _indic_syllable_machine_trans_keys[] = {
-       5u, 5u, 1u, 2u, 1u, 2u, 5u, 5u, 1u, 5u, 1u, 2u, 5u, 5u, 1u, 13u, 
-       4u, 11u, 4u, 11u, 5u, 11u, 1u, 10u, 1u, 10u, 10u, 10u, 10u, 10u, 4u, 10u, 
-       5u, 10u, 8u, 10u, 5u, 10u, 6u, 10u, 9u, 10u, 4u, 11u, 1u, 13u, 4u, 10u, 
-       4u, 10u, 5u, 10u, 4u, 10u, 5u, 10u, 8u, 10u, 10u, 10u, 10u, 10u, 4u, 10u, 
-       4u, 10u, 5u, 10u, 4u, 10u, 5u, 10u, 8u, 10u, 10u, 10u, 10u, 10u, 0
-};
-
-static const char _indic_syllable_machine_key_spans[] = {
-       1, 2, 2, 1, 5, 2, 1, 13, 
-       8, 8, 7, 10, 10, 1, 1, 7, 
-       6, 3, 6, 5, 2, 8, 13, 7, 
-       7, 6, 7, 6, 3, 1, 1, 7, 
-       7, 6, 7, 6, 3, 1, 1
-};
-
-static const unsigned char _indic_syllable_machine_index_offsets[] = {
-       0, 2, 5, 8, 10, 16, 19, 21, 
-       35, 44, 53, 61, 72, 83, 85, 87, 
-       95, 102, 106, 113, 119, 122, 131, 145, 
-       153, 161, 168, 176, 183, 187, 189, 191, 
-       199, 207, 214, 222, 229, 233, 235
-};
-
-static const char _indic_syllable_machine_indicies[] = {
-       1, 0, 2, 2, 0, 4, 4, 3, 
-       5, 3, 4, 4, 3, 3, 5, 3, 
-       7, 7, 6, 8, 6, 2, 10, 11, 
-       9, 9, 9, 9, 9, 9, 9, 9, 
-       12, 12, 9, 14, 15, 16, 16, 17, 
-       18, 19, 20, 13, 21, 15, 16, 16, 
-       17, 18, 19, 20, 13, 15, 16, 16, 
-       17, 18, 19, 20, 13, 2, 2, 13, 
-       13, 13, 22, 22, 13, 18, 19, 13, 
-       2, 2, 13, 13, 13, 13, 13, 13, 
-       18, 19, 13, 19, 13, 23, 13, 24, 
-       25, 13, 13, 17, 18, 19, 13, 25, 
-       13, 13, 17, 18, 19, 13, 17, 18, 
-       19, 13, 26, 13, 13, 17, 18, 19, 
-       13, 27, 27, 13, 18, 19, 13, 18, 
-       19, 13, 14, 28, 16, 16, 17, 18, 
-       19, 20, 13, 2, 2, 11, 13, 13, 
-       22, 22, 13, 18, 19, 13, 12, 12, 
-       13, 30, 5, 31, 32, 33, 34, 35, 
-       29, 4, 5, 31, 32, 33, 34, 35, 
-       29, 5, 31, 32, 33, 34, 35, 29, 
-       36, 37, 29, 29, 33, 34, 35, 29, 
-       37, 29, 29, 33, 34, 35, 29, 33, 
-       34, 35, 29, 35, 29, 38, 29, 40, 
-       8, 41, 41, 42, 43, 44, 39, 7, 
-       8, 41, 41, 42, 43, 44, 39, 8, 
-       41, 41, 42, 43, 44, 39, 45, 46, 
-       39, 39, 42, 43, 44, 39, 46, 39, 
-       39, 42, 43, 44, 39, 42, 43, 44, 
-       39, 44, 39, 47, 39, 0
-};
-
-static const char _indic_syllable_machine_trans_targs[] = {
-       7, 1, 8, 7, 25, 2, 7, 33, 
-       5, 7, 21, 23, 31, 7, 9, 11, 
-       0, 15, 13, 14, 18, 10, 12, 7, 
-       16, 17, 19, 20, 22, 7, 24, 3, 
-       4, 26, 29, 30, 27, 28, 7, 7, 
-       32, 6, 34, 37, 38, 35, 36, 7
-};
-
-static const char _indic_syllable_machine_trans_actions[] = {
-       1, 0, 2, 3, 2, 0, 4, 2, 
-       0, 7, 2, 2, 2, 8, 2, 0, 
-       0, 0, 0, 0, 0, 2, 0, 9, 
-       0, 0, 0, 0, 0, 10, 2, 0, 
-       0, 0, 0, 0, 0, 0, 11, 12, 
-       2, 0, 0, 0, 0, 0, 0, 13
-};
-
-static const char _indic_syllable_machine_to_state_actions[] = {
-       0, 0, 0, 0, 0, 0, 0, 5, 
-       0, 0, 0, 0, 0, 0, 0, 0, 
-       0, 0, 0, 0, 0, 0, 0, 0, 
-       0, 0, 0, 0, 0, 0, 0, 0, 
-       0, 0, 0, 0, 0, 0, 0
-};
-
-static const char _indic_syllable_machine_from_state_actions[] = {
-       0, 0, 0, 0, 0, 0, 0, 6, 
-       0, 0, 0, 0, 0, 0, 0, 0, 
-       0, 0, 0, 0, 0, 0, 0, 0, 
-       0, 0, 0, 0, 0, 0, 0, 0, 
-       0, 0, 0, 0, 0, 0, 0
-};
-
-static const unsigned char _indic_syllable_machine_eof_trans[] = {
-       1, 1, 4, 4, 4, 7, 7, 0, 
-       14, 14, 14, 14, 14, 14, 14, 14, 
-       14, 14, 14, 14, 14, 14, 14, 30, 
-       30, 30, 30, 30, 30, 30, 30, 40, 
-       40, 40, 40, 40, 40, 40, 40
-};
-
-static const int indic_syllable_machine_start = 7;
-static const int indic_syllable_machine_first_final = 7;
-static const int indic_syllable_machine_error = -1;
-
-static const int indic_syllable_machine_en_main = 7;
-
-
-#line 38 "../../src/hb-ot-shape-complex-indic-machine.rl"
-
-
-
-#line 79 "../../src/hb-ot-shape-complex-indic-machine.rl"
-
-
-#define process_syllable(func) \
-  HB_STMT_START { \
-    /* fprintf (stderr, "syllable %d..%d %s\n", last, p+1, #func); */ \
-    for (unsigned int i = last; i < p+1; i++) \
-      info[i].syllable() = syllable_serial; \
-    PASTE (initial_reordering_, func) (map, buffer, mask_array, last, p+1); \
-    last = p+1; \
-    syllable_serial++; \
-    if (unlikely (!syllable_serial)) syllable_serial++; \
-  } HB_STMT_END
-
-static void
-find_syllables (const hb_ot_map_t *map, hb_buffer_t *buffer, hb_mask_t *mask_array)
-{
-  unsigned int p, pe, eof, ts, te, act;
-  int cs;
-  hb_glyph_info_t *info = buffer->info;
-  
-#line 170 "../../src/hb-ot-shape-complex-indic-machine.hh.tmp"
-       {
-       cs = indic_syllable_machine_start;
-       ts = 0;
-       te = 0;
-       act = 0;
-       }
-
-#line 101 "../../src/hb-ot-shape-complex-indic-machine.rl"
-
-
-  p = 0;
-  pe = eof = buffer->len;
-
-  unsigned int last = 0;
-  uint8_t syllable_serial = 1;
-  
-#line 187 "../../src/hb-ot-shape-complex-indic-machine.hh.tmp"
-       {
-       int _slen;
-       int _trans;
-       const unsigned char *_keys;
-       const char *_inds;
-       if ( p == pe )
-               goto _test_eof;
-_resume:
-       switch ( _indic_syllable_machine_from_state_actions[cs] ) {
-       case 6:
-#line 1 "../../src/hb-ot-shape-complex-indic-machine.rl"
-       {ts = p;}
-       break;
-#line 201 "../../src/hb-ot-shape-complex-indic-machine.hh.tmp"
-       }
-
-       _keys = _indic_syllable_machine_trans_keys + (cs<<1);
-       _inds = _indic_syllable_machine_indicies + _indic_syllable_machine_index_offsets[cs];
-
-       _slen = _indic_syllable_machine_key_spans[cs];
-       _trans = _inds[ _slen > 0 && _keys[0] <=( info[p].indic_category()) &&
-               ( info[p].indic_category()) <= _keys[1] ?
-               ( info[p].indic_category()) - _keys[0] : _slen ];
-
-_eof_trans:
-       cs = _indic_syllable_machine_trans_targs[_trans];
-
-       if ( _indic_syllable_machine_trans_actions[_trans] == 0 )
-               goto _again;
-
-       switch ( _indic_syllable_machine_trans_actions[_trans] ) {
-       case 2:
-#line 1 "../../src/hb-ot-shape-complex-indic-machine.rl"
-       {te = p+1;}
-       break;
-       case 9:
-#line 72 "../../src/hb-ot-shape-complex-indic-machine.rl"
-       {te = p+1;{ process_syllable (consonant_syllable); }}
-       break;
-       case 11:
-#line 73 "../../src/hb-ot-shape-complex-indic-machine.rl"
-       {te = p+1;{ process_syllable (vowel_syllable); }}
-       break;
-       case 13:
-#line 74 "../../src/hb-ot-shape-complex-indic-machine.rl"
-       {te = p+1;{ process_syllable (standalone_cluster); }}
-       break;
-       case 7:
-#line 75 "../../src/hb-ot-shape-complex-indic-machine.rl"
-       {te = p+1;{ process_syllable (non_indic); }}
-       break;
-       case 8:
-#line 72 "../../src/hb-ot-shape-complex-indic-machine.rl"
-       {te = p;p--;{ process_syllable (consonant_syllable); }}
-       break;
-       case 10:
-#line 73 "../../src/hb-ot-shape-complex-indic-machine.rl"
-       {te = p;p--;{ process_syllable (vowel_syllable); }}
-       break;
-       case 12:
-#line 74 "../../src/hb-ot-shape-complex-indic-machine.rl"
-       {te = p;p--;{ process_syllable (standalone_cluster); }}
-       break;
-       case 1:
-#line 72 "../../src/hb-ot-shape-complex-indic-machine.rl"
-       {{p = ((te))-1;}{ process_syllable (consonant_syllable); }}
-       break;
-       case 3:
-#line 73 "../../src/hb-ot-shape-complex-indic-machine.rl"
-       {{p = ((te))-1;}{ process_syllable (vowel_syllable); }}
-       break;
-       case 4:
-#line 74 "../../src/hb-ot-shape-complex-indic-machine.rl"
-       {{p = ((te))-1;}{ process_syllable (standalone_cluster); }}
-       break;
-#line 263 "../../src/hb-ot-shape-complex-indic-machine.hh.tmp"
-       }
-
-_again:
-       switch ( _indic_syllable_machine_to_state_actions[cs] ) {
-       case 5:
-#line 1 "../../src/hb-ot-shape-complex-indic-machine.rl"
-       {ts = 0;}
-       break;
-#line 272 "../../src/hb-ot-shape-complex-indic-machine.hh.tmp"
-       }
-
-       if ( ++p != pe )
-               goto _resume;
-       _test_eof: {}
-       if ( p == eof )
-       {
-       if ( _indic_syllable_machine_eof_trans[cs] > 0 ) {
-               _trans = _indic_syllable_machine_eof_trans[cs] - 1;
-               goto _eof_trans;
-       }
-       }
-
-       }
-
-#line 110 "../../src/hb-ot-shape-complex-indic-machine.rl"
-
-}
-
-HB_END_DECLS
-
-#endif /* HB_OT_SHAPE_COMPLEX_INDIC_MACHINE_HH */
diff --git a/src/hb-ot-shape-complex-indic-machine.rl b/src/hb-ot-shape-complex-indic-machine.rl
deleted file mode 100644 (file)
index 93ca29a..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright © 2011,2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_OT_SHAPE_COMPLEX_INDIC_MACHINE_HH
-#define HB_OT_SHAPE_COMPLEX_INDIC_MACHINE_HH
-
-#include "hb-private.hh"
-
-HB_BEGIN_DECLS
-
-%%{
-  machine indic_syllable_machine;
-  alphtype unsigned char;
-  write data;
-}%%
-
-%%{
-
-# Same order as enum indic_category_t.  Not sure how to avoid duplication.
-X    = 0;
-C    = 1;
-Ra   = 2;
-V    = 3;
-N    = 4;
-H    = 5;
-ZWNJ = 6;
-ZWJ  = 7;
-M    = 8;
-SM   = 9;
-VD   = 10;
-A    = 11;
-NBSP = 12;
-DOTTEDCIRCLE = 13;
-
-c = C | Ra;
-n = N N?;
-z = ZWJ|ZWNJ;
-matra_group = M N? H?;
-syllable_tail = SM? (VD VD?)?;
-place_holder = NBSP | DOTTEDCIRCLE;
-
-
-consonant_syllable =   (c.n? (H.z?|z.H))* c.n? A? (H.z? | matra_group*)? syllable_tail;
-vowel_syllable =       (Ra H)? V n? (z?.H.c | ZWJ.c)* matra_group* syllable_tail;
-standalone_cluster =   (Ra H)? place_holder n? (z? H c)* matra_group* syllable_tail;
-other =                        any;
-
-main := |*
-       consonant_syllable      => { process_syllable (consonant_syllable); };
-       vowel_syllable          => { process_syllable (vowel_syllable); };
-       standalone_cluster      => { process_syllable (standalone_cluster); };
-       other                   => { process_syllable (non_indic); };
-*|;
-
-
-}%%
-
-#define process_syllable(func) \
-  HB_STMT_START { \
-    /* fprintf (stderr, "syllable %d..%d %s\n", last, p+1, #func); */ \
-    for (unsigned int i = last; i < p+1; i++) \
-      info[i].syllable() = syllable_serial; \
-    PASTE (initial_reordering_, func) (map, buffer, mask_array, last, p+1); \
-    last = p+1; \
-    syllable_serial++; \
-    if (unlikely (!syllable_serial)) syllable_serial++; \
-  } HB_STMT_END
-
-static void
-find_syllables (const hb_ot_map_t *map, hb_buffer_t *buffer, hb_mask_t *mask_array)
-{
-  unsigned int p, pe, eof, ts, te, act;
-  int cs;
-  hb_glyph_info_t *info = buffer->info;
-  %%{
-    write init;
-    getkey info[p].indic_category();
-  }%%
-
-  p = 0;
-  pe = eof = buffer->len;
-
-  unsigned int last = 0;
-  uint8_t syllable_serial = 1;
-  %%{
-    write exec;
-  }%%
-}
-
-HB_END_DECLS
-
-#endif /* HB_OT_SHAPE_COMPLEX_INDIC_MACHINE_HH */
diff --git a/src/hb-ot-shape-complex-indic-private.hh b/src/hb-ot-shape-complex-indic-private.hh
deleted file mode 100644 (file)
index 64af0da..0000000
+++ /dev/null
@@ -1,270 +0,0 @@
-/*
- * Copyright © 2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_OT_SHAPE_COMPLEX_INDIC_PRIVATE_HH
-#define HB_OT_SHAPE_COMPLEX_INDIC_PRIVATE_HH
-
-#include "hb-private.hh"
-
-
-#include "hb-ot-shape-complex-private.hh"
-
-
-/* buffer var allocations */
-#define indic_category() complex_var_persistent_u8_0() /* indic_category_t */
-#define indic_position() complex_var_persistent_u8_1() /* indic_matra_category_t */
-
-#define INDIC_TABLE_ELEMENT_TYPE uint8_t
-
-/* Cateories used in the OpenType spec:
- * https://www.microsoft.com/typography/otfntdev/devanot/shaping.aspx
- */
-/* Note: This enum is duplicated in the -machine.rl source file.
- * Not sure how to avoid duplication. */
-enum indic_category_t {
-  OT_X = 0,
-  OT_C,
-  OT_Ra, /* Not explicitly listed in the OT spec, but used in the grammar. */
-  OT_V,
-  OT_N,
-  OT_H,
-  OT_ZWNJ,
-  OT_ZWJ,
-  OT_M,
-  OT_SM,
-  OT_VD,
-  OT_A,
-  OT_NBSP,
-  OT_DOTTEDCIRCLE /* Not in the spec, but special in Uniscribe. /Very very/ special! */
-};
-
-/* Visual positions in a syllable from left to right. */
-enum indic_position_t {
-  POS_RA_TO_BECOME_REPH,
-  POS_PRE_M,
-  POS_PRE_C,
-  POS_BASE_C,
-  POS_ABOVE_C,
-  POS_BELOW_C,
-  POS_ABOVE_M,
-  POS_BELOW_M,
-  POS_POST_C,
-  POS_POST_M,
-  POS_SMVD
-};
-
-/* Categories used in IndicSyllabicCategory.txt from UCD. */
-enum indic_syllabic_category_t {
-  INDIC_SYLLABIC_CATEGORY_OTHER                        = OT_X,
-
-  INDIC_SYLLABIC_CATEGORY_AVAGRAHA             = OT_X,
-  INDIC_SYLLABIC_CATEGORY_BINDU                        = OT_SM,
-  INDIC_SYLLABIC_CATEGORY_CONSONANT            = OT_C,
-  INDIC_SYLLABIC_CATEGORY_CONSONANT_DEAD       = OT_C,
-  INDIC_SYLLABIC_CATEGORY_CONSONANT_FINAL      = OT_C,
-  INDIC_SYLLABIC_CATEGORY_CONSONANT_HEAD_LETTER        = OT_C,
-  INDIC_SYLLABIC_CATEGORY_CONSONANT_MEDIAL     = OT_C,
-  INDIC_SYLLABIC_CATEGORY_CONSONANT_PLACEHOLDER        = OT_NBSP,
-  INDIC_SYLLABIC_CATEGORY_CONSONANT_SUBJOINED  = OT_C,
-  INDIC_SYLLABIC_CATEGORY_CONSONANT_REPHA      = OT_C,
-  INDIC_SYLLABIC_CATEGORY_MODIFYING_LETTER     = OT_X,
-  INDIC_SYLLABIC_CATEGORY_NUKTA                        = OT_N,
-  INDIC_SYLLABIC_CATEGORY_REGISTER_SHIFTER     = OT_X,
-  INDIC_SYLLABIC_CATEGORY_TONE_LETTER          = OT_X,
-  INDIC_SYLLABIC_CATEGORY_TONE_MARK            = OT_X,
-  INDIC_SYLLABIC_CATEGORY_VIRAMA               = OT_H,
-  INDIC_SYLLABIC_CATEGORY_VISARGA              = OT_SM,
-  INDIC_SYLLABIC_CATEGORY_VOWEL                        = OT_V,
-  INDIC_SYLLABIC_CATEGORY_VOWEL_DEPENDENT      = OT_M,
-  INDIC_SYLLABIC_CATEGORY_VOWEL_INDEPENDENT    = OT_V
-};
-
-/* Categories used in IndicSMatraCategory.txt from UCD */
-enum indic_matra_category_t {
-  INDIC_MATRA_CATEGORY_NOT_APPLICABLE          = POS_BASE_C,
-
-  INDIC_MATRA_CATEGORY_LEFT                    = POS_PRE_M,
-  INDIC_MATRA_CATEGORY_TOP                     = POS_ABOVE_M,
-  INDIC_MATRA_CATEGORY_BOTTOM                  = POS_BELOW_M,
-  INDIC_MATRA_CATEGORY_RIGHT                   = POS_POST_M,
-
-  /* We don't really care much about these since we decompose them
-   * in the generic pre-shaping layer.  They will only be used if
-   * the font does not cover the decomposition.  In which case, we
-   * define these as aliases to the place we want the split-matra
-   * glyph to show up.  Quite arbitrary.
-   *
-   * TODO: There are some split matras without Unicode decompositions.
-   * We have to figure out what to do with them.
-   */
-  INDIC_MATRA_CATEGORY_BOTTOM_AND_RIGHT                = POS_POST_M,
-  INDIC_MATRA_CATEGORY_LEFT_AND_RIGHT          = POS_PRE_M,
-  INDIC_MATRA_CATEGORY_TOP_AND_BOTTOM          = POS_BELOW_M,
-  INDIC_MATRA_CATEGORY_TOP_AND_BOTTOM_AND_RIGHT        = POS_POST_M,
-  INDIC_MATRA_CATEGORY_TOP_AND_LEFT            = POS_PRE_M,
-  INDIC_MATRA_CATEGORY_TOP_AND_LEFT_AND_RIGHT  = POS_PRE_M,
-  INDIC_MATRA_CATEGORY_TOP_AND_RIGHT           = POS_POST_M,
-
-  INDIC_MATRA_CATEGORY_INVISIBLE               = INDIC_MATRA_CATEGORY_NOT_APPLICABLE,
-  INDIC_MATRA_CATEGORY_OVERSTRUCK              = INDIC_MATRA_CATEGORY_NOT_APPLICABLE,
-  INDIC_MATRA_CATEGORY_VISUAL_ORDER_LEFT       = INDIC_MATRA_CATEGORY_NOT_APPLICABLE
-};
-
-/* Note: We use ASSERT_STATIC_EXPR_ZERO() instead of ASSERT_STATIC_EXPR() and the comma operation
- * because gcc fails to optimize the latter and fills the table in at runtime. */
-#define INDIC_COMBINE_CATEGORIES(S,M) \
-  (ASSERT_STATIC_EXPR_ZERO (M == INDIC_MATRA_CATEGORY_NOT_APPLICABLE || (S == INDIC_SYLLABIC_CATEGORY_VIRAMA || S == INDIC_SYLLABIC_CATEGORY_VOWEL_DEPENDENT)) + \
-   ASSERT_STATIC_EXPR_ZERO (S < 16 && M < 16) + \
-   ((M << 4) | S))
-
-
-#include "hb-ot-shape-complex-indic-table.hh"
-
-/* XXX
- * This is a hack for now.  We should:
- * 1. Move this data into the main Indic table,
- * and/or
- * 2. Probe font lookups to determine consonant positions.
- */
-static const struct consonant_position_t {
-  hb_codepoint_t u;
-  indic_position_t position;
-} consonant_positions[] = {
-  {0x0930, POS_BELOW_C},
-  {0x09AC, POS_BELOW_C},
-  {0x09AF, POS_POST_C},
-  {0x09B0, POS_BELOW_C},
-  {0x09F0, POS_BELOW_C},
-  {0x0A2F, POS_POST_C},
-  {0x0A30, POS_BELOW_C},
-  {0x0A35, POS_BELOW_C},
-  {0x0A39, POS_BELOW_C},
-  {0x0AB0, POS_BELOW_C},
-  {0x0B24, POS_BELOW_C},
-  {0x0B28, POS_BELOW_C},
-  {0x0B2C, POS_BELOW_C},
-  {0x0B2D, POS_BELOW_C},
-  {0x0B2E, POS_BELOW_C},
-  {0x0B2F, POS_POST_C},
-  {0x0B30, POS_BELOW_C},
-  {0x0B32, POS_BELOW_C},
-  {0x0B33, POS_BELOW_C},
-  {0x0B5F, POS_POST_C},
-  {0x0B71, POS_BELOW_C},
-  {0x0C15, POS_BELOW_C},
-  {0x0C16, POS_BELOW_C},
-  {0x0C17, POS_BELOW_C},
-  {0x0C18, POS_BELOW_C},
-  {0x0C19, POS_BELOW_C},
-  {0x0C1A, POS_BELOW_C},
-  {0x0C1B, POS_BELOW_C},
-  {0x0C1C, POS_BELOW_C},
-  {0x0C1D, POS_BELOW_C},
-  {0x0C1E, POS_BELOW_C},
-  {0x0C1F, POS_BELOW_C},
-  {0x0C20, POS_BELOW_C},
-  {0x0C21, POS_BELOW_C},
-  {0x0C22, POS_BELOW_C},
-  {0x0C23, POS_BELOW_C},
-  {0x0C24, POS_BELOW_C},
-  {0x0C25, POS_BELOW_C},
-  {0x0C26, POS_BELOW_C},
-  {0x0C27, POS_BELOW_C},
-  {0x0C28, POS_BELOW_C},
-  {0x0C2A, POS_BELOW_C},
-  {0x0C2B, POS_BELOW_C},
-  {0x0C2C, POS_BELOW_C},
-  {0x0C2D, POS_BELOW_C},
-  {0x0C2E, POS_BELOW_C},
-  {0x0C2F, POS_BELOW_C},
-  {0x0C30, POS_BELOW_C},
-  {0x0C32, POS_BELOW_C},
-  {0x0C33, POS_BELOW_C},
-  {0x0C35, POS_BELOW_C},
-  {0x0C36, POS_BELOW_C},
-  {0x0C37, POS_BELOW_C},
-  {0x0C38, POS_BELOW_C},
-  {0x0C39, POS_BELOW_C},
-  {0x0C95, POS_BELOW_C},
-  {0x0C96, POS_BELOW_C},
-  {0x0C97, POS_BELOW_C},
-  {0x0C98, POS_BELOW_C},
-  {0x0C99, POS_BELOW_C},
-  {0x0C9A, POS_BELOW_C},
-  {0x0C9B, POS_BELOW_C},
-  {0x0C9C, POS_BELOW_C},
-  {0x0C9D, POS_BELOW_C},
-  {0x0C9E, POS_BELOW_C},
-  {0x0C9F, POS_BELOW_C},
-  {0x0CA0, POS_BELOW_C},
-  {0x0CA1, POS_BELOW_C},
-  {0x0CA2, POS_BELOW_C},
-  {0x0CA3, POS_BELOW_C},
-  {0x0CA4, POS_BELOW_C},
-  {0x0CA5, POS_BELOW_C},
-  {0x0CA6, POS_BELOW_C},
-  {0x0CA7, POS_BELOW_C},
-  {0x0CA8, POS_BELOW_C},
-  {0x0CAA, POS_BELOW_C},
-  {0x0CAB, POS_BELOW_C},
-  {0x0CAC, POS_BELOW_C},
-  {0x0CAD, POS_BELOW_C},
-  {0x0CAE, POS_BELOW_C},
-  {0x0CAF, POS_BELOW_C},
-  {0x0CB0, POS_BELOW_C},
-  {0x0CB2, POS_BELOW_C},
-  {0x0CB3, POS_BELOW_C},
-  {0x0CB5, POS_BELOW_C},
-  {0x0CB6, POS_BELOW_C},
-  {0x0CB7, POS_BELOW_C},
-  {0x0CB8, POS_BELOW_C},
-  {0x0CB9, POS_BELOW_C},
-  {0x0CDE, POS_BELOW_C},
-  {0x0D2F, POS_POST_C},
-  {0x0D30, POS_POST_C},
-  {0x0D32, POS_BELOW_C},
-  {0x0D35, POS_POST_C},
-};
-
-/* XXX
- * This is a hack for now.  We should move this data into the main Indic table.
- * Or completely remove it and just check in the tables.
- */
-static const hb_codepoint_t ra_chars[] = {
-  0x0930, /* Devanagari */
-  0x09B0, /* Bengali */
-  0x09F0, /* Bengali */
-  0x0A30, /* Gurmukhi */       /* No Reph */
-  0x0AB0, /* Gujarati */
-  0x0B30, /* Oriya */
-  0x0BB0, /* Tamil */          /* No Reph */
-  0x0C30, /* Telugu */         /* No Reph */
-  0x0CB0, /* Kannada */
-  0x0D30, /* Malayalam */      /* No Reph */
-};
-
-
-#endif /* HB_OT_SHAPE_COMPLEX_INDIC_PRIVATE_HH */
diff --git a/src/hb-ot-shape-complex-indic-table.hh b/src/hb-ot-shape-complex-indic-table.hh
deleted file mode 100644 (file)
index 5b4b344..0000000
+++ /dev/null
@@ -1,872 +0,0 @@
-/* == Start of generated table == */
-/*
- * The following table is generated by running:
- *
- *   ./gen-indic-table.py IndicSyllabicCategory.txt IndicMatraCategory.txt Blocks.txt
- *
- * on files with these headers:
- *
- * # IndicSyllabicCategory-6.1.0.txt
- * # Date: 2011-08-31, 23:54:00 GMT [KW]
- * # IndicMatraCategory-6.1.0.txt
- * # Date: 2011-08-31, 23:50:00 GMT [KW]
- * # Blocks-6.1.0.txt
- * # Date: 2011-06-14, 18:26:00 GMT [KW, LI]
- */
-
-#ifndef HB_OT_SHAPE_COMPLEX_INDIC_TABLE_HH
-#define HB_OT_SHAPE_COMPLEX_INDIC_TABLE_HH
-
-
-#define ISC_A  INDIC_SYLLABIC_CATEGORY_AVAGRAHA                /*  11 chars; Avagraha */
-#define ISC_Bi INDIC_SYLLABIC_CATEGORY_BINDU                   /*  34 chars; Bindu */
-#define ISC_C  INDIC_SYLLABIC_CATEGORY_CONSONANT               /* 123 chars; Consonant */
-#define ISC_CD INDIC_SYLLABIC_CATEGORY_CONSONANT_DEAD          /*   2 chars; Consonant_Dead */
-#define ISC_CF INDIC_SYLLABIC_CATEGORY_CONSONANT_FINAL         /*  17 chars; Consonant_Final */
-#define ISC_CHL        INDIC_SYLLABIC_CATEGORY_CONSONANT_HEAD_LETTER   /*   1 chars; Consonant_Head_Letter */
-#define ISC_CM INDIC_SYLLABIC_CATEGORY_CONSONANT_MEDIAL        /*  12 chars; Consonant_Medial */
-#define ISC_CP INDIC_SYLLABIC_CATEGORY_CONSONANT_PLACEHOLDER   /*   4 chars; Consonant_Placeholder */
-#define ISC_CR INDIC_SYLLABIC_CATEGORY_CONSONANT_REPHA         /*   5 chars; Consonant_Repha */
-#define ISC_CS INDIC_SYLLABIC_CATEGORY_CONSONANT_SUBJOINED     /*  10 chars; Consonant_Subjoined */
-#define ISC_ML INDIC_SYLLABIC_CATEGORY_MODIFYING_LETTER        /*   1 chars; Modifying_Letter */
-#define ISC_N  INDIC_SYLLABIC_CATEGORY_NUKTA                   /*  12 chars; Nukta */
-#define ISC_x  INDIC_SYLLABIC_CATEGORY_OTHER                   /*   1 chars; Other */
-#define ISC_RS INDIC_SYLLABIC_CATEGORY_REGISTER_SHIFTER        /*   1 chars; Register_Shifter */
-#define ISC_TL INDIC_SYLLABIC_CATEGORY_TONE_LETTER             /*   3 chars; Tone_Letter */
-#define ISC_TM INDIC_SYLLABIC_CATEGORY_TONE_MARK               /*  16 chars; Tone_Mark */
-#define ISC_V  INDIC_SYLLABIC_CATEGORY_VIRAMA                  /*  34 chars; Virama */
-#define ISC_Vs INDIC_SYLLABIC_CATEGORY_VISARGA                 /*  25 chars; Visarga */
-#define ISC_Vo INDIC_SYLLABIC_CATEGORY_VOWEL                   /*   5 chars; Vowel */
-#define ISC_M  INDIC_SYLLABIC_CATEGORY_VOWEL_DEPENDENT         /* 165 chars; Vowel_Dependent */
-#define ISC_VI INDIC_SYLLABIC_CATEGORY_VOWEL_INDEPENDENT       /*  59 chars; Vowel_Independent */
-
-#define IMC_B  INDIC_MATRA_CATEGORY_BOTTOM                     /*  65 chars; Bottom */
-#define IMC_BR INDIC_MATRA_CATEGORY_BOTTOM_AND_RIGHT           /*   2 chars; Bottom_And_Right */
-#define IMC_I  INDIC_MATRA_CATEGORY_INVISIBLE                  /*   6 chars; Invisible */
-#define IMC_L  INDIC_MATRA_CATEGORY_LEFT                       /*  30 chars; Left */
-#define IMC_LR INDIC_MATRA_CATEGORY_LEFT_AND_RIGHT             /*   8 chars; Left_And_Right */
-#define IMC_x  INDIC_MATRA_CATEGORY_NOT_APPLICABLE             /*   1 chars; Not_Applicable */
-#define IMC_O  INDIC_MATRA_CATEGORY_OVERSTRUCK                 /*   2 chars; Overstruck */
-#define IMC_R  INDIC_MATRA_CATEGORY_RIGHT                      /*  75 chars; Right */
-#define IMC_T  INDIC_MATRA_CATEGORY_TOP                        /*  83 chars; Top */
-#define IMC_TB INDIC_MATRA_CATEGORY_TOP_AND_BOTTOM             /*   6 chars; Top_And_Bottom */
-#define IMC_TBR        INDIC_MATRA_CATEGORY_TOP_AND_BOTTOM_AND_RIGHT   /*   1 chars; Top_And_Bottom_And_Right */
-#define IMC_TL INDIC_MATRA_CATEGORY_TOP_AND_LEFT               /*   4 chars; Top_And_Left */
-#define IMC_TLR        INDIC_MATRA_CATEGORY_TOP_AND_LEFT_AND_RIGHT     /*   2 chars; Top_And_Left_And_Right */
-#define IMC_TR INDIC_MATRA_CATEGORY_TOP_AND_RIGHT              /*   8 chars; Top_And_Right */
-#define IMC_VOL        INDIC_MATRA_CATEGORY_VISUAL_ORDER_LEFT          /*   5 chars; Visual_Order_Left */
-
-#define _(S,M) INDIC_COMBINE_CATEGORIES (ISC_##S, IMC_##M)
-
-
-static const INDIC_TABLE_ELEMENT_TYPE indic_table[] = {
-
-
-#define indic_offset_0x0900 0
-
-
-  /* Devanagari  (0900..097F) */
-
-  /* 0900 */ _(Bi,x), _(Bi,x), _(Bi,x), _(Vs,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x),
-  /* 0908 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x),
-  /* 0910 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0918 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0920 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0928 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0930 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0938 */  _(C,x),  _(C,x),  _(M,T),  _(M,R),  _(N,x),  _(A,x),  _(M,R),  _(M,L),
-  /* 0940 */  _(M,R),  _(M,B),  _(M,B),  _(M,B),  _(M,B),  _(M,T),  _(M,T),  _(M,T),
-  /* 0948 */  _(M,T),  _(M,R),  _(M,R),  _(M,R),  _(M,R),  _(V,B),  _(M,L),  _(M,R),
-  /* 0950 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(M,T),  _(M,B),  _(M,B),
-  /* 0958 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0960 */ _(VI,x), _(VI,x),  _(M,B),  _(M,B),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0968 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0970 */  _(x,x),  _(x,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x),
-  /* 0978 */  _(x,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-
-  /* Bengali  (0980..09FF) */
-
-  /* 0980 */  _(x,x), _(Bi,x), _(Bi,x), _(Vs,x),  _(x,x), _(VI,x), _(VI,x), _(VI,x),
-  /* 0988 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x),  _(x,x),  _(x,x), _(VI,x),
-  /* 0990 */ _(VI,x),  _(x,x),  _(x,x), _(VI,x), _(VI,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0998 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 09A0 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 09A8 */  _(C,x),  _(x,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 09B0 */  _(C,x),  _(x,x),  _(C,x),  _(x,x),  _(x,x),  _(x,x),  _(C,x),  _(C,x),
-  /* 09B8 */  _(C,x),  _(C,x),  _(x,x),  _(x,x),  _(N,x),  _(A,x),  _(M,R),  _(M,L),
-  /* 09C0 */  _(M,R),  _(M,B),  _(M,B),  _(M,B),  _(M,B),  _(x,x),  _(x,x),  _(M,L),
-  /* 09C8 */  _(M,L),  _(x,x),  _(x,x), _(M,LR), _(M,LR),  _(V,B), _(CD,x),  _(x,x),
-  /* 09D0 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(M,R),
-  /* 09D8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(C,x),  _(C,x),  _(x,x),  _(C,x),
-  /* 09E0 */ _(VI,x), _(VI,x),  _(M,B),  _(M,B),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 09E8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 09F0 */  _(C,x),  _(C,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 09F8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-  /* Gurmukhi  (0A00..0A7F) */
-
-  /* 0A00 */  _(x,x), _(Bi,x), _(Bi,x), _(Vs,x),  _(x,x), _(VI,x), _(VI,x), _(VI,x),
-  /* 0A08 */ _(VI,x), _(VI,x), _(VI,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x), _(VI,x),
-  /* 0A10 */ _(VI,x),  _(x,x),  _(x,x), _(VI,x), _(VI,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0A18 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0A20 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0A28 */  _(C,x),  _(x,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0A30 */  _(C,x),  _(x,x),  _(C,x),  _(C,x),  _(x,x),  _(C,x),  _(C,x),  _(x,x),
-  /* 0A38 */  _(C,x),  _(C,x),  _(x,x),  _(x,x),  _(N,x),  _(x,x),  _(M,R),  _(M,L),
-  /* 0A40 */  _(M,R),  _(M,B),  _(M,B),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(M,T),
-  /* 0A48 */  _(M,T),  _(x,x),  _(x,x),  _(M,T),  _(M,T),  _(V,B),  _(x,x),  _(x,x),
-  /* 0A50 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0A58 */  _(x,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(x,x),  _(C,x),  _(x,x),
-  /* 0A60 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0A68 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0A70 */ _(Bi,x),  _(x,x), _(CP,x), _(CP,x),  _(x,x), _(CM,x),  _(x,x),  _(x,x),
-  /* 0A78 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-  /* Gujarati  (0A80..0AFF) */
-
-  /* 0A80 */  _(x,x), _(Bi,x), _(Bi,x), _(Vs,x),  _(x,x), _(VI,x), _(VI,x), _(VI,x),
-  /* 0A88 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x),  _(x,x), _(VI,x),
-  /* 0A90 */ _(VI,x), _(VI,x),  _(x,x), _(VI,x), _(VI,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0A98 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0AA0 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0AA8 */  _(C,x),  _(x,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0AB0 */  _(C,x),  _(x,x),  _(C,x),  _(C,x),  _(x,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0AB8 */  _(C,x),  _(C,x),  _(x,x),  _(x,x),  _(N,x),  _(A,x),  _(M,R),  _(M,L),
-  /* 0AC0 */  _(M,R),  _(M,B),  _(M,B),  _(M,B),  _(M,B),  _(M,T),  _(x,x),  _(M,T),
-  /* 0AC8 */  _(M,T), _(M,TR),  _(x,x),  _(M,R),  _(M,R),  _(V,B),  _(x,x),  _(x,x),
-  /* 0AD0 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0AD8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0AE0 */ _(VI,x), _(VI,x),  _(M,B),  _(M,B),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0AE8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0AF0 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0AF8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-  /* Oriya  (0B00..0B7F) */
-
-  /* 0B00 */  _(x,x), _(Bi,x), _(Bi,x), _(Vs,x),  _(x,x), _(VI,x), _(VI,x), _(VI,x),
-  /* 0B08 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x),  _(x,x),  _(x,x), _(VI,x),
-  /* 0B10 */ _(VI,x),  _(x,x),  _(x,x), _(VI,x), _(VI,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0B18 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0B20 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0B28 */  _(C,x),  _(x,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0B30 */  _(C,x),  _(x,x),  _(C,x),  _(C,x),  _(x,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0B38 */  _(C,x),  _(C,x),  _(x,x),  _(x,x),  _(N,x),  _(A,x),  _(M,R),  _(M,T),
-  /* 0B40 */  _(M,R),  _(M,B),  _(M,B),  _(M,B),  _(M,B),  _(x,x),  _(x,x),  _(M,L),
-  /* 0B48 */ _(M,TL),  _(x,x),  _(x,x), _(M,LR),_(M,TLR),  _(V,B),  _(x,x),  _(x,x),
-  /* 0B50 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(M,T), _(M,TR),
-  /* 0B58 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(C,x),  _(C,x),  _(x,x),  _(C,x),
-  /* 0B60 */ _(VI,x), _(VI,x),  _(M,B),  _(M,B),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0B68 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0B70 */  _(x,x),  _(C,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0B78 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-  /* Tamil  (0B80..0BFF) */
-
-  /* 0B80 */  _(x,x),  _(x,x), _(Bi,x), _(ML,x),  _(x,x), _(VI,x), _(VI,x), _(VI,x),
-  /* 0B88 */ _(VI,x), _(VI,x), _(VI,x),  _(x,x),  _(x,x),  _(x,x), _(VI,x), _(VI,x),
-  /* 0B90 */ _(VI,x),  _(x,x), _(VI,x), _(VI,x), _(VI,x),  _(C,x),  _(x,x),  _(x,x),
-  /* 0B98 */  _(x,x),  _(C,x),  _(C,x),  _(x,x),  _(C,x),  _(x,x),  _(C,x),  _(C,x),
-  /* 0BA0 */  _(x,x),  _(x,x),  _(x,x),  _(C,x),  _(C,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0BA8 */  _(C,x),  _(C,x),  _(C,x),  _(x,x),  _(x,x),  _(x,x),  _(C,x),  _(C,x),
-  /* 0BB0 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0BB8 */  _(C,x),  _(C,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(M,R),  _(M,R),
-  /* 0BC0 */  _(M,T),  _(M,B),  _(M,B),  _(x,x),  _(x,x),  _(x,x),  _(M,L),  _(M,L),
-  /* 0BC8 */  _(M,L),  _(x,x), _(M,LR), _(M,LR), _(M,LR),  _(V,T),  _(x,x),  _(x,x),
-  /* 0BD0 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(M,R),
-  /* 0BD8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0BE0 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0BE8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0BF0 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0BF8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-  /* Telugu  (0C00..0C7F) */
-
-  /* 0C00 */  _(x,x), _(Bi,x), _(Bi,x), _(Vs,x),  _(x,x), _(VI,x), _(VI,x), _(VI,x),
-  /* 0C08 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x),  _(x,x), _(VI,x), _(VI,x),
-  /* 0C10 */ _(VI,x),  _(x,x), _(VI,x), _(VI,x), _(VI,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0C18 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0C20 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0C28 */  _(C,x),  _(x,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0C30 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(x,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0C38 */  _(C,x),  _(C,x),  _(x,x),  _(x,x),  _(x,x),  _(A,x),  _(M,T),  _(M,T),
-  /* 0C40 */  _(M,T),  _(M,R),  _(M,R),  _(M,R),  _(M,R),  _(x,x),  _(M,T),  _(M,T),
-  /* 0C48 */ _(M,TB),  _(x,x),  _(M,T),  _(M,T),  _(M,T),  _(V,T),  _(x,x),  _(x,x),
-  /* 0C50 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(M,T),  _(M,B),  _(x,x),
-  /* 0C58 */  _(C,x),  _(C,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0C60 */ _(VI,x), _(VI,x),  _(M,B),  _(M,B),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0C68 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0C70 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0C78 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-  /* Kannada  (0C80..0CFF) */
-
-  /* 0C80 */  _(x,x),  _(x,x), _(Bi,x), _(Vs,x),  _(x,x), _(VI,x), _(VI,x), _(VI,x),
-  /* 0C88 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x),  _(x,x), _(VI,x), _(VI,x),
-  /* 0C90 */ _(VI,x),  _(x,x), _(VI,x), _(VI,x), _(VI,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0C98 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0CA0 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0CA8 */  _(C,x),  _(x,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0CB0 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(x,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0CB8 */  _(C,x),  _(C,x),  _(x,x),  _(x,x),  _(N,x),  _(A,x),  _(M,R),  _(M,T),
-  /* 0CC0 */ _(M,TR),  _(M,R),  _(M,R),  _(M,R),  _(M,R),  _(x,x),  _(M,T), _(M,TR),
-  /* 0CC8 */ _(M,TR),  _(x,x), _(M,TR), _(M,TR),  _(M,T),  _(V,T),  _(x,x),  _(x,x),
-  /* 0CD0 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(M,R),  _(M,R),  _(x,x),
-  /* 0CD8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(C,x),  _(x,x),
-  /* 0CE0 */ _(VI,x), _(VI,x),  _(M,B),  _(M,B),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0CE8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0CF0 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0CF8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-  /* Malayalam  (0D00..0D7F) */
-
-  /* 0D00 */  _(x,x),  _(x,x), _(Bi,x), _(Vs,x),  _(x,x), _(VI,x), _(VI,x), _(VI,x),
-  /* 0D08 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x),  _(x,x), _(VI,x), _(VI,x),
-  /* 0D10 */ _(VI,x),  _(x,x), _(VI,x), _(VI,x), _(VI,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0D18 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0D20 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0D28 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0D30 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0D38 */  _(C,x),  _(C,x),  _(C,x),  _(x,x),  _(x,x),  _(A,x),  _(M,R),  _(M,R),
-  /* 0D40 */  _(M,R),  _(M,R),  _(M,R),  _(M,B),  _(M,B),  _(x,x),  _(M,L),  _(M,L),
-  /* 0D48 */  _(M,L),  _(x,x), _(M,LR), _(M,LR), _(M,LR),  _(V,T), _(CR,x),  _(x,x),
-  /* 0D50 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(M,R),
-  /* 0D58 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0D60 */ _(VI,x), _(VI,x),  _(M,B),  _(M,B),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0D68 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0D70 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0D78 */  _(x,x),  _(x,x), _(CD,x), _(CD,x), _(CD,x), _(CD,x), _(CD,x), _(CD,x),
-
-  /* Sinhala  (0D80..0DFF) */
-
-  /* 0D80 */  _(x,x),  _(x,x), _(Bi,x), _(Vs,x),  _(x,x), _(VI,x), _(VI,x), _(VI,x),
-  /* 0D88 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x),
-  /* 0D90 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x),  _(x,x),
-  /* 0D98 */  _(x,x),  _(x,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0DA0 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0DA8 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0DB0 */  _(C,x),  _(C,x),  _(x,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0DB8 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(x,x),  _(C,x),  _(x,x),  _(x,x),
-  /* 0DC0 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(x,x),
-  /* 0DC8 */  _(x,x),  _(x,x),  _(V,T),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(M,R),
-  /* 0DD0 */  _(M,R),  _(M,R),  _(M,T),  _(M,T),  _(M,B),  _(x,x),  _(M,B),  _(x,x),
-  /* 0DD8 */  _(M,R),  _(M,L), _(M,TL),  _(M,L), _(M,LR), _(M,LR), _(M,LR),  _(M,R),
-  /* 0DE0 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0DE8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0DF0 */  _(x,x),  _(x,x),  _(M,R),  _(M,R),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0DF8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-  /* Thai  (0E00..0E7F) */
-
-  /* 0E00 */  _(x,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0E08 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0E10 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0E18 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0E20 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0E28 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(x,x),
-  /* 0E30 */  _(M,R),  _(M,T),  _(M,R),  _(M,R),  _(M,T),  _(M,T),  _(M,T),  _(M,T),
-  /* 0E38 */  _(M,B),  _(M,B),  _(V,B),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0E40 */_(M,VOL),_(M,VOL),_(M,VOL),_(M,VOL),_(M,VOL),  _(M,R),  _(x,x),  _(M,T),
-  /* 0E48 */ _(TM,x), _(TM,x), _(TM,x), _(TM,x),  _(x,x), _(Bi,x),  _(V,T),  _(x,x),
-  /* 0E50 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0E58 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0E60 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0E68 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0E70 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0E78 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-  /* Lao  (0E80..0EFF) */
-
-  /* 0E80 */  _(x,x),  _(C,x),  _(C,x),  _(x,x),  _(C,x),  _(x,x),  _(x,x),  _(C,x),
-  /* 0E88 */  _(C,x),  _(x,x),  _(C,x),  _(x,x),  _(x,x),  _(C,x),  _(x,x),  _(x,x),
-  /* 0E90 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0E98 */  _(x,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0EA0 */  _(x,x),  _(C,x),  _(C,x),  _(C,x),  _(x,x),  _(C,x),  _(x,x),  _(C,x),
-  /* 0EA8 */  _(x,x),  _(x,x),  _(C,x),  _(C,x),  _(x,x),  _(C,x),  _(C,x),  _(x,x),
-  /* 0EB0 */  _(M,R),  _(M,T),  _(M,R),  _(M,R),  _(M,T),  _(M,T),  _(M,T),  _(M,T),
-  /* 0EB8 */  _(M,B),  _(M,B),  _(x,x),  _(M,T), _(CM,x), _(CM,x),  _(x,x),  _(x,x),
-  /* 0EC0 */_(M,VOL),_(M,VOL),_(M,VOL),_(M,VOL),_(M,VOL),  _(x,x),  _(x,x),  _(x,x),
-  /* 0EC8 */ _(TM,x), _(TM,x), _(TM,x), _(TM,x),  _(x,x), _(Bi,x),  _(x,x),  _(x,x),
-  /* 0ED0 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0ED8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(C,x),  _(C,x),  _(x,x),  _(x,x),
-  /* 0EE0 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0EE8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0EF0 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0EF8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-  /* Tibetan  (0F00..0FFF) */
-
-  /* 0F00 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0F08 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0F10 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0F18 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0F20 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0F28 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0F30 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0F38 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0F40 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0F48 */  _(x,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0F50 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0F58 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0F60 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 0F68 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0F70 */  _(x,x),  _(M,B),  _(M,T), _(M,TB),  _(M,B),  _(M,B), _(M,TB), _(M,TB),
-  /* 0F78 */ _(M,TB), _(M,TB),  _(M,T),  _(M,T),  _(M,T),  _(M,T), _(Bi,x), _(Vs,x),
-  /* 0F80 */  _(M,T), _(M,TB), _(Bi,x), _(Bi,x),  _(V,B),  _(A,x),  _(x,x),  _(x,x),
-  /* 0F88 */_(CHL,x),_(CHL,x),_(CHL,x),_(CHL,x),_(CHL,x), _(CS,x), _(CS,x), _(CS,x),
-  /* 0F90 */ _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x),
-  /* 0F98 */  _(x,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x),
-  /* 0FA0 */ _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x),
-  /* 0FA8 */ _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x),
-  /* 0FB0 */ _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x),
-  /* 0FB8 */ _(CS,x), _(CS,x), _(CS,x), _(CS,x), _(CS,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0FC0 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0FC8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0FD0 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0FD8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0FE0 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0FE8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0FF0 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 0FF8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-  /* Myanmar  (1000..109F) */
-
-  /* 1000 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1008 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1010 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1018 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1020 */  _(C,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x),
-  /* 1028 */ _(VI,x), _(VI,x), _(VI,x),  _(M,R),  _(M,R),  _(M,T),  _(M,T),  _(M,B),
-  /* 1030 */  _(M,B),  _(M,L),  _(M,T),  _(M,T),  _(M,T),  _(M,T), _(Bi,x), _(TM,x),
-  /* 1038 */ _(Vs,x),  _(V,I),  _(V,T), _(CM,x), _(CM,x), _(CM,x), _(CM,x),  _(C,x),
-  /* 1040 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 1048 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 1050 */  _(C,x),  _(C,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x),  _(M,R),  _(M,R),
-  /* 1058 */  _(M,B),  _(M,B),  _(C,x),  _(C,x),  _(C,x),  _(C,x), _(CM,x), _(CM,x),
-  /* 1060 */ _(CM,x),  _(C,x),  _(M,R), _(TM,x), _(TM,x),  _(C,x),  _(C,x),  _(M,R),
-  /* 1068 */  _(M,R), _(TM,x), _(TM,x), _(TM,x), _(TM,x), _(TM,x),  _(C,x),  _(C,x),
-  /* 1070 */  _(C,x),  _(M,T),  _(M,T),  _(M,T),  _(M,T),  _(C,x),  _(C,x),  _(C,x),
-  /* 1078 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1080 */  _(C,x),  _(C,x), _(CM,x),  _(M,R),  _(M,L),  _(M,T),  _(M,T), _(TM,x),
-  /* 1088 */ _(TM,x), _(TM,x), _(TM,x), _(TM,x), _(TM,x), _(TM,x),  _(C,x), _(TM,x),
-  /* 1090 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 1098 */  _(x,x),  _(x,x), _(TM,x), _(TM,x),  _(M,R),  _(M,T),  _(x,x),  _(x,x),
-
-#define indic_offset_0x1700 1952
-
-
-  /* Tagalog  (1700..171F) */
-
-  /* 1700 */ _(VI,x), _(VI,x), _(VI,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1708 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(x,x),  _(C,x),  _(C,x),
-  /* 1710 */  _(C,x),  _(C,x),  _(M,T),  _(M,B),  _(V,B),  _(x,x),  _(x,x),  _(x,x),
-  /* 1718 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-  /* Hanunoo  (1720..173F) */
-
-  /* 1720 */ _(VI,x), _(VI,x), _(VI,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1728 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1730 */  _(C,x),  _(C,x),  _(M,T),  _(M,B),  _(V,B),  _(x,x),  _(x,x),  _(x,x),
-  /* 1738 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-  /* Buhid  (1740..175F) */
-
-  /* 1740 */ _(VI,x), _(VI,x), _(VI,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1748 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1750 */  _(C,x),  _(C,x),  _(M,T),  _(M,B),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 1758 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-  /* Tagbanwa  (1760..177F) */
-
-  /* 1760 */ _(VI,x), _(VI,x), _(VI,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1768 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(x,x),  _(C,x),  _(C,x),
-  /* 1770 */  _(C,x),  _(x,x),  _(M,T),  _(M,B),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 1778 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-  /* Khmer  (1780..17FF) */
-
-  /* 1780 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1788 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1790 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1798 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 17A0 */  _(C,x),  _(C,x),  _(C,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x),
-  /* 17A8 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x),
-  /* 17B0 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x),  _(x,x),  _(x,x),  _(M,R),  _(M,T),
-  /* 17B8 */  _(M,T),  _(M,T),  _(M,T),  _(M,B),  _(M,B),  _(M,B), _(M,TL),_(M,TLR),
-  /* 17C0 */ _(M,LR),  _(M,L),  _(M,L),  _(M,L), _(M,LR), _(M,LR), _(Bi,x), _(Vs,x),
-  /* 17C8 */  _(M,R), _(RS,x), _(RS,x),  _(x,x), _(CR,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 17D0 */  _(x,x),  _(V,T),  _(V,I),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 17D8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(A,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 17E0 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 17E8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 17F0 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 17F8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-#define indic_offset_0x1900 2208
-
-
-  /* Limbu  (1900..194F) */
-
-  /* 1900 */ _(CP,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1908 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1910 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1918 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 1920 */  _(M,T),  _(M,T),  _(M,B),  _(M,R),  _(M,R), _(M,TR), _(M,TR),  _(M,T),
-  /* 1928 */  _(M,T), _(CS,x), _(CS,x), _(CS,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 1930 */ _(CF,x), _(CF,x), _(Bi,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x),
-  /* 1938 */ _(CF,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 1940 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 1948 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-  /* Tai Le  (1950..197F) */
-
-  /* 1950 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1958 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1960 */  _(C,x),  _(C,x),  _(C,x), _(Vo,x), _(Vo,x), _(Vo,x), _(Vo,x), _(Vo,x),
-  /* 1968 */ _(Vo,x), _(Vo,x), _(Vo,x), _(Vo,x), _(Vo,x), _(Vo,x),  _(x,x),  _(x,x),
-  /* 1970 */ _(TL,x), _(TL,x), _(TL,x), _(TL,x), _(TL,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 1978 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-  /* New Tai Lue  (1980..19DF) */
-
-  /* 1980 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1988 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1990 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1998 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 19A0 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 19A8 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 19B0 */  _(M,R),  _(M,R),  _(M,R),  _(M,R),  _(M,R),  _(M,L),  _(M,L),  _(M,L),
-  /* 19B8 */  _(M,R),  _(M,R),  _(M,L),  _(M,R),  _(M,R),  _(M,R),  _(M,R),  _(M,R),
-  /* 19C0 */  _(M,R), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x),
-  /* 19C8 */ _(TM,x), _(TM,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 19D0 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 19D8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-  /* FILLER  (19E0..19FF) */
-
-  /* 19E0 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 19E8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 19F0 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 19F8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-  /* Buginese  (1A00..1A1F) */
-
-  /* 1A00 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1A08 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1A10 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(M,T),
-  /* 1A18 */  _(M,B),  _(M,L),  _(M,R),  _(M,L),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-  /* Tai Tham  (1A20..1AAF) */
-
-  /* 1A20 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1A28 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1A30 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1A38 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1A40 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1A48 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x), _(VI,x), _(VI,x), _(VI,x),
-  /* 1A50 */ _(VI,x), _(VI,x), _(VI,x),  _(C,x),  _(C,x), _(CM,x), _(CM,x), _(CF,x),
-  /* 1A58 */ _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x),  _(x,x),
-  /* 1A60 */  _(V,I),  _(M,R),  _(M,T),  _(M,R),  _(M,R),  _(M,T),  _(M,T),  _(M,T),
-  /* 1A68 */  _(M,T),  _(M,B),  _(M,B),  _(M,T),  _(M,B),  _(M,R),  _(M,L),  _(M,L),
-  /* 1A70 */  _(M,L),  _(M,L),  _(M,L),  _(M,T),  _(M,T), _(TM,x), _(TM,x), _(TM,x),
-  /* 1A78 */ _(TM,x), _(TM,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 1A80 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 1A88 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 1A90 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 1A98 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 1AA0 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 1AA8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-#define indic_offset_0x1b00 2640
-
-
-  /* Balinese  (1B00..1B7F) */
-
-  /* 1B00 */ _(Bi,x), _(Bi,x), _(Bi,x), _(CR,x), _(Vs,x), _(VI,x), _(VI,x), _(VI,x),
-  /* 1B08 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x),
-  /* 1B10 */ _(VI,x), _(VI,x), _(VI,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1B18 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1B20 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1B28 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1B30 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(N,x),  _(M,R),  _(M,T),  _(M,T),
-  /* 1B38 */  _(M,B),  _(M,B),  _(M,B), _(M,BR), _(M,TB),_(M,TBR),  _(M,L),  _(M,L),
-  /* 1B40 */ _(M,LR), _(M,LR),  _(M,T), _(M,TR),  _(V,R),  _(C,x),  _(C,x),  _(C,x),
-  /* 1B48 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 1B50 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 1B58 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 1B60 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 1B68 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 1B70 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 1B78 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-  /* Sundanese  (1B80..1BBF) */
-
-  /* 1B80 */ _(Bi,x), _(CR,x), _(Vs,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x),
-  /* 1B88 */ _(VI,x), _(VI,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1B90 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1B98 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1BA0 */  _(C,x), _(CS,x), _(CS,x), _(CS,x),  _(M,T),  _(M,B),  _(M,L),  _(M,R),
-  /* 1BA8 */  _(M,T),  _(M,T),  _(V,R),  _(V,x), _(CS,x), _(CS,x),  _(C,x),  _(C,x),
-  /* 1BB0 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 1BB8 */  _(x,x),  _(x,x),  _(A,x),  _(C,x),  _(C,x),  _(C,x), _(CF,x), _(CF,x),
-
-  /* Batak  (1BC0..1BFF) */
-
-  /* 1BC0 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1BC8 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1BD0 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1BD8 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1BE0 */  _(C,x),  _(C,x),  _(C,x),  _(C,x), _(VI,x), _(VI,x),  _(N,x),  _(M,x),
-  /* 1BE8 */  _(M,x),  _(M,x),  _(M,x),  _(M,x),  _(M,x),  _(M,x),  _(M,x),  _(M,x),
-  /* 1BF0 */ _(CF,x), _(CF,x),  _(V,R),  _(V,R),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 1BF8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-  /* Lepcha  (1C00..1C4F) */
-
-  /* 1C00 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1C08 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1C10 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1C18 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 1C20 */  _(C,x),  _(C,x),  _(C,x),  _(C,x), _(CS,x), _(CS,x),  _(M,R),  _(M,L),
-  /* 1C28 */  _(M,L), _(M,TL),  _(M,R),  _(M,R),  _(M,B), _(CF,x), _(CF,x), _(CF,x),
-  /* 1C30 */ _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(Bi,x), _(Bi,x),  _(x,x),  _(N,x),
-  /* 1C38 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 1C40 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 1C48 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(C,x),  _(C,x),  _(C,x),
-
-#define indic_offset_0x1cd0 2976
-
-
-  /* Vedic Extensions  (1CD0..1CFF) */
-
-  /* 1CD0 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 1CD8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 1CE0 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 1CE8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 1CF0 */  _(x,x),  _(x,x), _(Vs,x), _(Vs,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 1CF8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-#define indic_offset_0xa800 3024
-
-
-  /* Syloti Nagri  (A800..A82F) */
-
-  /* A800 */ _(VI,x), _(VI,x),  _(x,x), _(VI,x), _(VI,x), _(VI,x),  _(V,T),  _(C,x),
-  /* A808 */  _(C,x),  _(C,x),  _(C,x), _(Bi,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* A810 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* A818 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* A820 */  _(C,x),  _(C,x),  _(C,x),  _(M,R),  _(M,R),  _(M,B),  _(M,T),  _(M,R),
-  /* A828 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-  /* FILLER  (A830..A83F) */
-
-  /* A830 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* A838 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-  /* Phags-pa  (A840..A87F) */
-
-  /* A840 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* A848 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* A850 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* A858 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x), _(Vo,x), _(Vo,x),
-  /* A860 */ _(Vo,x), _(Vo,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x), _(Vo,x), _(CS,x),
-  /* A868 */ _(CS,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* A870 */  _(C,x), _(CS,x),  _(C,x), _(Bi,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* A878 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-  /* Saurashtra  (A880..A8DF) */
-
-  /* A880 */ _(Bi,x), _(Vs,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x),
-  /* A888 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x),
-  /* A890 */ _(VI,x), _(VI,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* A898 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* A8A0 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* A8A8 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* A8B0 */  _(C,x),  _(C,x),  _(C,x),  _(C,x), _(CF,x),  _(M,R),  _(M,R),  _(M,R),
-  /* A8B8 */  _(M,R),  _(M,R),  _(M,R),  _(M,R),  _(M,R),  _(M,R),  _(M,R),  _(M,R),
-  /* A8C0 */  _(M,R),  _(M,R),  _(M,R),  _(M,R),  _(V,B),  _(x,x),  _(x,x),  _(x,x),
-  /* A8C8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* A8D0 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* A8D8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-  /* FILLER  (A8E0..A8FF) */
-
-  /* A8E0 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* A8E8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* A8F0 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* A8F8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-  /* Kayah Li  (A900..A92F) */
-
-  /* A900 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* A908 */  _(x,x),  _(x,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* A910 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* A918 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* A920 */  _(C,x),  _(C,x), _(Vo,x), _(Vo,x), _(Vo,x), _(Vo,x), _(Vo,x), _(Vo,x),
-  /* A928 */ _(Vo,x), _(Vo,x), _(Vo,x), _(TM,x), _(TM,x), _(TM,x),  _(x,x),  _(x,x),
-
-  /* Rejang  (A930..A95F) */
-
-  /* A930 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* A938 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* A940 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(M,B),
-  /* A948 */  _(M,B),  _(M,B),  _(M,T),  _(M,B),  _(M,B),  _(M,B),  _(M,B), _(CF,x),
-  /* A950 */ _(CF,x), _(CF,x), _(CF,x),  _(V,R),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* A958 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-  /* FILLER  (A960..A97F) */
-
-  /* A960 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* A968 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* A970 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* A978 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-  /* Javanese  (A980..A9DF) */
-
-  /* A980 */ _(Bi,x), _(Bi,x), _(CR,x), _(Vs,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x),
-  /* A988 */ _(VI,x),  _(C,x),  _(C,x),  _(C,x), _(VI,x), _(VI,x), _(VI,x),  _(C,x),
-  /* A990 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* A998 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* A9A0 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* A9A8 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* A9B0 */  _(C,x),  _(C,x),  _(C,x),  _(N,x),  _(M,R),  _(M,R),  _(M,T),  _(M,T),
-  /* A9B8 */  _(M,B),  _(M,B),  _(M,L),  _(M,L),  _(M,T), _(CS,x), _(CM,x), _(CM,x),
-  /* A9C0 */ _(V,BR),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* A9C8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* A9D0 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* A9D8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-  /* FILLER  (A9E0..A9FF) */
-
-  /* A9E0 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* A9E8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* A9F0 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* A9F8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-  /* Cham  (AA00..AA5F) */
-
-  /* AA00 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x),  _(C,x),  _(C,x),
-  /* AA08 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* AA10 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* AA18 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* AA20 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* AA28 */  _(C,x),  _(M,T),  _(M,T),  _(M,T),  _(M,T),  _(M,B),  _(M,T),  _(M,L),
-  /* AA30 */  _(M,L),  _(M,T),  _(M,B), _(CM,x), _(CM,x), _(CM,x), _(CM,x),  _(x,x),
-  /* AA38 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* AA40 */ _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x),
-  /* AA48 */ _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x),  _(x,x),  _(x,x),
-  /* AA50 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* AA58 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-  /* Myanmar Extended-A  (AA60..AA7F) */
-
-  /* AA60 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* AA68 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* AA70 */  _(x,x),  _(C,x),  _(C,x),  _(C,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* AA78 */  _(x,x),  _(x,x),  _(C,x), _(TM,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-  /* Tai Viet  (AA80..AADF) */
-
-  /* AA80 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* AA88 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* AA90 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* AA98 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* AAA0 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* AAA8 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* AAB0 */  _(M,T),  _(M,R),  _(M,T),  _(M,T),  _(M,B),_(M,VOL),_(M,VOL),  _(M,T),
-  /* AAB8 */  _(M,T),_(M,VOL),  _(M,R),_(M,VOL),_(M,VOL),  _(M,R),  _(M,T), _(TM,x),
-  /* AAC0 */ _(TL,x), _(TM,x), _(TL,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* AAC8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* AAD0 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* AAD8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-  /* Meetei Mayek Extensions  (AAE0..AAFF) */
-
-  /* AAE0 */ _(VI,x), _(VI,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* AAE8 */  _(C,x),  _(C,x),  _(C,x),  _(M,L),  _(M,B),  _(M,T),  _(M,L),  _(M,R),
-  /* AAF0 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x), _(Vs,x),  _(V,I),  _(x,x),
-  /* AAF8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-#define indic_offset_0xabc0 3792
-
-
-  /* Meetei Mayek  (ABC0..ABFF) */
-
-  /* ABC0 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* ABC8 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x), _(VI,x), _(VI,x),
-  /* ABD0 */  _(C,x), _(VI,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* ABD8 */  _(C,x),  _(C,x),  _(C,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x), _(CF,x),
-  /* ABE0 */ _(CF,x), _(CF,x), _(CF,x),  _(M,R),  _(M,R),  _(M,T),  _(M,R),  _(M,R),
-  /* ABE8 */  _(M,B),  _(M,R),  _(M,R),  _(x,x), _(TM,x),  _(V,B),  _(x,x),  _(x,x),
-  /* ABF0 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* ABF8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-#define indic_offset_0x10a00 3856
-
-
-  /* Kharoshthi  (10A00..10A5F) */
-
-  /* 10A00 */  _(C,x),  _(M,O),  _(M,B),  _(M,B),  _(x,x),  _(M,T),  _(M,O),  _(x,x),
-  /* 10A08 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(M,B),  _(x,x), _(Bi,x), _(Vs,x),
-  /* 10A10 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(x,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 10A18 */  _(x,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 10A20 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 10A28 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 10A30 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 10A38 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(V,I),
-  /* 10A40 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 10A48 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 10A50 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 10A58 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-#define indic_offset_0x11000 3952
-
-
-  /* Brahmi  (11000..1107F) */
-
-  /* 11000 */ _(Bi,x), _(Bi,x), _(Vs,x),  _(x,x),  _(x,x), _(VI,x), _(VI,x), _(VI,x),
-  /* 11008 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x),
-  /* 11010 */ _(VI,x), _(VI,x), _(VI,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 11018 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 11020 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 11028 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 11030 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 11038 */  _(M,T),  _(M,T),  _(M,T),  _(M,T),  _(M,B),  _(M,B),  _(M,B),  _(M,B),
-  /* 11040 */  _(M,B),  _(M,B),  _(M,T),  _(M,T),  _(M,T),  _(M,T),  _(V,T),  _(x,x),
-  /* 11048 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 11050 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 11058 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 11060 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 11068 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 11070 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 11078 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-  /* Kaithi  (11080..110CF) */
-
-  /* 11080 */ _(Bi,x), _(Bi,x), _(Vs,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x),
-  /* 11088 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 11090 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 11098 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 110A0 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 110A8 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 110B0 */  _(M,R),  _(M,L),  _(M,R),  _(M,B),  _(M,B),  _(M,T),  _(M,T),  _(M,R),
-  /* 110B8 */  _(M,R),  _(V,B),  _(N,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 110C0 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 110C8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-#define indic_offset_0x11100 4160
-
-
-  /* Chakma  (11100..1114F) */
-
-  /* 11100 */ _(Bi,x), _(Bi,x), _(Vs,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x),  _(C,x),
-  /* 11108 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 11110 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 11118 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 11120 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(M,T),
-  /* 11128 */  _(M,T),  _(M,T),  _(M,B),  _(M,B),  _(M,L),  _(M,T), _(M,TB), _(M,TB),
-  /* 11130 */  _(M,T),  _(M,B),  _(M,B),  _(V,I),  _(V,T),  _(x,x),  _(x,x),  _(x,x),
-  /* 11138 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 11140 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 11148 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-#define indic_offset_0x11180 4240
-
-
-  /* Sharada  (11180..111DF) */
-
-  /* 11180 */ _(Bi,x), _(Bi,x), _(Vs,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x),
-  /* 11188 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x),
-  /* 11190 */ _(VI,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 11198 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 111A0 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 111A8 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 111B0 */  _(C,x),  _(C,x),  _(C,x),  _(M,R),  _(M,L),  _(M,R),  _(M,B),  _(M,B),
-  /* 111B8 */  _(M,B),  _(M,B),  _(M,B),  _(M,B),  _(M,T),  _(M,T),  _(M,T), _(M,TR),
-  /* 111C0 */  _(V,R),  _(A,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 111C8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 111D0 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 111D8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-#define indic_offset_0x11680 4336
-
-
-  /* Takri  (11680..116CF) */
-
-  /* 11680 */ _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x), _(VI,x),
-  /* 11688 */ _(VI,x), _(VI,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 11690 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 11698 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 116A0 */  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),  _(C,x),
-  /* 116A8 */  _(C,x),  _(C,x),  _(C,x), _(Bi,x), _(Vs,x),  _(M,T),  _(M,L),  _(M,R),
-  /* 116B0 */  _(M,B),  _(M,B),  _(M,T),  _(M,T),  _(M,T),  _(M,T),  _(V,T),  _(N,x),
-  /* 116B8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 116C0 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-  /* 116C8 */  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),  _(x,x),
-
-#define indic_offset_total 4416
-
-}; /* Table occupancy: 60% */
-
-static INDIC_TABLE_ELEMENT_TYPE
-get_indic_categories (hb_codepoint_t u)
-{
-  if (0x0900 <= u && u <= 0x10A0) return indic_table[u - 0x0900 + indic_offset_0x0900];
-  if (0x1700 <= u && u <= 0x1800) return indic_table[u - 0x1700 + indic_offset_0x1700];
-  if (0x1900 <= u && u <= 0x1AB0) return indic_table[u - 0x1900 + indic_offset_0x1900];
-  if (0x1B00 <= u && u <= 0x1C50) return indic_table[u - 0x1B00 + indic_offset_0x1b00];
-  if (0x1CD0 <= u && u <= 0x1D00) return indic_table[u - 0x1CD0 + indic_offset_0x1cd0];
-  if (0xA800 <= u && u <= 0xAB00) return indic_table[u - 0xA800 + indic_offset_0xa800];
-  if (0xABC0 <= u && u <= 0xAC00) return indic_table[u - 0xABC0 + indic_offset_0xabc0];
-  if (0x10A00 <= u && u <= 0x10A60) return indic_table[u - 0x10A00 + indic_offset_0x10a00];
-  if (0x11000 <= u && u <= 0x110D0) return indic_table[u - 0x11000 + indic_offset_0x11000];
-  if (0x11100 <= u && u <= 0x11150) return indic_table[u - 0x11100 + indic_offset_0x11100];
-  if (0x11180 <= u && u <= 0x111E0) return indic_table[u - 0x11180 + indic_offset_0x11180];
-  if (0x11680 <= u && u <= 0x116D0) return indic_table[u - 0x11680 + indic_offset_0x11680];
-  if (unlikely (u == 0x00A0)) return _(CP,x);
-  if (unlikely (u == 0x25CC)) return _(CP,x);
-  return _(x,x);
-}
-
-#undef _
-
-#undef ISC_A
-#undef ISC_Bi
-#undef ISC_C
-#undef ISC_CD
-#undef ISC_CF
-#undef ISC_CHL
-#undef ISC_CM
-#undef ISC_CP
-#undef ISC_CR
-#undef ISC_CS
-#undef ISC_ML
-#undef ISC_N
-#undef ISC_x
-#undef ISC_RS
-#undef ISC_TL
-#undef ISC_TM
-#undef ISC_V
-#undef ISC_Vs
-#undef ISC_Vo
-#undef ISC_M
-#undef ISC_VI
-
-#undef IMC_B
-#undef IMC_BR
-#undef IMC_I
-#undef IMC_L
-#undef IMC_LR
-#undef IMC_x
-#undef IMC_O
-#undef IMC_R
-#undef IMC_T
-#undef IMC_TB
-#undef IMC_TBR
-#undef IMC_TL
-#undef IMC_TLR
-#undef IMC_TR
-#undef IMC_VOL
-
-#endif /* HB_OT_SHAPE_COMPLEX_INDIC_TABLE_HH */
-
-/* == End of generated table == */
diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc
deleted file mode 100644 (file)
index f168fe1..0000000
+++ /dev/null
@@ -1,873 +0,0 @@
-/*
- * Copyright © 2011,2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "hb-ot-shape-complex-indic-private.hh"
-#include "hb-ot-shape-private.hh"
-
-struct indic_options_t
-{
-  int initialized : 1;
-  int uniscribe_bug_compatible : 1;
-};
-
-union indic_options_union_t {
-  int i;
-  indic_options_t opts;
-};
-ASSERT_STATIC (sizeof (int) == sizeof (indic_options_union_t));
-
-static indic_options_union_t
-indic_options_init (void)
-{
-  indic_options_union_t u;
-  u.i = 0;
-  u.opts.initialized = 1;
-
-  char *c = getenv ("HB_OT_INDIC_OPTIONS");
-  u.opts.uniscribe_bug_compatible = c && strstr (c, "uniscribe-bug-compatible");
-
-  return u;
-}
-
-inline indic_options_t
-indic_options (void)
-{
-  static indic_options_union_t options;
-
-  if (unlikely (!options.i)) {
-    /* This is idempotent and threadsafe. */
-    options = indic_options_init ();
-  }
-
-  return options.opts;
-}
-
-
-static int
-compare_codepoint (const void *pa, const void *pb)
-{
-  hb_codepoint_t a = * (hb_codepoint_t *) pa;
-  hb_codepoint_t b = * (hb_codepoint_t *) pb;
-
-  return a < b ? -1 : a == b ? 0 : +1;
-}
-
-static indic_position_t
-consonant_position (hb_codepoint_t u)
-{
-  consonant_position_t *record;
-
-  record = (consonant_position_t *) bsearch (&u, consonant_positions,
-                                            ARRAY_LENGTH (consonant_positions),
-                                            sizeof (consonant_positions[0]),
-                                            compare_codepoint);
-
-  return record ? record->position : POS_BASE_C;
-}
-
-static bool
-is_ra (hb_codepoint_t u)
-{
-  return !!bsearch (&u, ra_chars,
-                   ARRAY_LENGTH (ra_chars),
-                   sizeof (ra_chars[0]),
-                   compare_codepoint);
-}
-
-static bool
-is_joiner (const hb_glyph_info_t &info)
-{
-  return !!(FLAG (info.indic_category()) & (FLAG (OT_ZWJ) | FLAG (OT_ZWNJ)));
-}
-
-static bool
-is_consonant (const hb_glyph_info_t &info)
-{
-  /* Note:
-   *
-   * We treat Vowels and placeholders as if they were consonants.  This is safe because Vowels
-   * cannot happen in a consonant syllable.  The plus side however is, we can call the
-   * consonant syllable logic from the vowel syllable function and get it all right! */
-  return !!(FLAG (info.indic_category()) & (FLAG (OT_C) | FLAG (OT_Ra) | FLAG (OT_V) | FLAG (OT_NBSP) | FLAG (OT_DOTTEDCIRCLE)));
-}
-
-struct feature_list_t {
-  hb_tag_t tag;
-  hb_bool_t is_global;
-};
-
-static const feature_list_t
-indic_basic_features[] =
-{
-  {HB_TAG('n','u','k','t'), true},
-  {HB_TAG('a','k','h','n'), false},
-  {HB_TAG('r','p','h','f'), false},
-  {HB_TAG('r','k','r','f'), true},
-  {HB_TAG('p','r','e','f'), false},
-  {HB_TAG('b','l','w','f'), false},
-  {HB_TAG('h','a','l','f'), false},
-  {HB_TAG('p','s','t','f'), false},
-  {HB_TAG('c','j','c','t'), false},
-  {HB_TAG('v','a','t','u'), true},
-};
-
-/* Same order as the indic_basic_features array */
-enum {
-  _NUKT,
-  AKHN,
-  RPHF,
-  _RKRF,
-  PREF,
-  BLWF,
-  HALF,
-  PSTF,
-  CJCT,
-  VATU
-};
-
-static const feature_list_t
-indic_other_features[] =
-{
-  {HB_TAG('i','n','i','t'), false},
-  {HB_TAG('p','r','e','s'), true},
-  {HB_TAG('a','b','v','s'), true},
-  {HB_TAG('b','l','w','s'), true},
-  {HB_TAG('p','s','t','s'), true},
-  {HB_TAG('h','a','l','n'), true},
-
-  {HB_TAG('d','i','s','t'), true},
-  {HB_TAG('a','b','v','m'), true},
-  {HB_TAG('b','l','w','m'), true},
-};
-
-/* Same order as the indic_other_features array */
-enum {
-  INIT
-};
-
-
-static void
-initial_reordering (const hb_ot_map_t *map,
-                   hb_face_t *face,
-                   hb_buffer_t *buffer,
-                   void *user_data HB_UNUSED);
-static void
-final_reordering (const hb_ot_map_t *map,
-                 hb_face_t *face,
-                 hb_buffer_t *buffer,
-                 void *user_data HB_UNUSED);
-
-void
-_hb_ot_shape_complex_collect_features_indic (hb_ot_map_builder_t *map,
-                                            const hb_segment_properties_t *props HB_UNUSED)
-{
-  map->add_bool_feature (HB_TAG('l','o','c','l'));
-  /* The Indic specs do not require ccmp, but we apply it here since if
-   * there is a use of it, it's typically at the beginning. */
-  map->add_bool_feature (HB_TAG('c','c','m','p'));
-
-  map->add_gsub_pause (initial_reordering, NULL);
-
-  for (unsigned int i = 0; i < ARRAY_LENGTH (indic_basic_features); i++) {
-    map->add_bool_feature (indic_basic_features[i].tag, indic_basic_features[i].is_global);
-    map->add_gsub_pause (NULL, NULL);
-  }
-
-  map->add_gsub_pause (final_reordering, NULL);
-
-  for (unsigned int i = 0; i < ARRAY_LENGTH (indic_other_features); i++) {
-    map->add_bool_feature (indic_other_features[i].tag, indic_other_features[i].is_global);
-    map->add_gsub_pause (NULL, NULL);
-  }
-}
-
-
-hb_ot_shape_normalization_mode_t
-_hb_ot_shape_complex_normalization_preference_indic (void)
-{
-  /* We want split matras decomposed by the common shaping logic. */
-  return HB_OT_SHAPE_NORMALIZATION_MODE_DECOMPOSED;
-}
-
-
-void
-_hb_ot_shape_complex_setup_masks_indic (hb_ot_map_t *map HB_UNUSED,
-                                       hb_buffer_t *buffer,
-                                       hb_font_t *font HB_UNUSED)
-{
-  HB_BUFFER_ALLOCATE_VAR (buffer, indic_category);
-  HB_BUFFER_ALLOCATE_VAR (buffer, indic_position);
-
-  /* We cannot setup masks here.  We save information about characters
-   * and setup masks later on in a pause-callback. */
-
-  unsigned int count = buffer->len;
-  for (unsigned int i = 0; i < count; i++)
-  {
-    hb_glyph_info_t &info = buffer->info[i];
-    unsigned int type = get_indic_categories (info.codepoint);
-
-    info.indic_category() = type & 0x0F;
-    info.indic_position() = type >> 4;
-
-    /* The spec says U+0952 is OT_A.  However, testing shows that Uniscribe
-     * treats U+0951..U+0952 all as OT_VD.
-     * TESTS:
-     * U+092E,U+0947,U+0952
-     * U+092E,U+0952,U+0947
-     * U+092E,U+0947,U+0951
-     * U+092E,U+0951,U+0947
-     * */
-    if (unlikely (hb_in_range<hb_codepoint_t> (info.codepoint, 0x0951, 0x0954)))
-      info.indic_category() = OT_VD;
-
-    if (info.indic_category() == OT_C) {
-      info.indic_position() = consonant_position (info.codepoint);
-      if (is_ra (info.codepoint))
-       info.indic_category() = OT_Ra;
-    } else if (info.indic_category() == OT_SM ||
-              info.indic_category() == OT_VD) {
-      info.indic_position() = POS_SMVD;
-    } else if (unlikely (info.codepoint == 0x200C))
-      info.indic_category() = OT_ZWNJ;
-    else if (unlikely (info.codepoint == 0x200D))
-      info.indic_category() = OT_ZWJ;
-    else if (unlikely (info.codepoint == 0x25CC))
-      info.indic_category() = OT_DOTTEDCIRCLE;
-  }
-}
-
-static int
-compare_indic_order (const hb_glyph_info_t *pa, const hb_glyph_info_t *pb)
-{
-  int a = pa->indic_position();
-  int b = pb->indic_position();
-
-  return a < b ? -1 : a == b ? 0 : +1;
-}
-
-/* Rules from:
- * https://www.microsoft.com/typography/otfntdev/devanot/shaping.aspx */
-
-static void
-initial_reordering_consonant_syllable (const hb_ot_map_t *map, hb_buffer_t *buffer, hb_mask_t *mask_array,
-                                      unsigned int start, unsigned int end)
-{
-  hb_glyph_info_t *info = buffer->info;
-
-
-  /* 1. Find base consonant:
-   *
-   * The shaping engine finds the base consonant of the syllable, using the
-   * following algorithm: starting from the end of the syllable, move backwards
-   * until a consonant is found that does not have a below-base or post-base
-   * form (post-base forms have to follow below-base forms), or that is not a
-   * pre-base reordering Ra, or arrive at the first consonant. The consonant
-   * stopped at will be the base.
-   *
-   *   o If the syllable starts with Ra + Halant (in a script that has Reph)
-   *     and has more than one consonant, Ra is excluded from candidates for
-   *     base consonants.
-   */
-
-  unsigned int base = end;
-  bool has_reph = false;
-
-  {
-    /* -> If the syllable starts with Ra + Halant (in a script that has Reph)
-     *    and has more than one consonant, Ra is excluded from candidates for
-     *    base consonants. */
-    unsigned int limit = start;
-    if (mask_array[RPHF] &&
-       start + 3 <= end &&
-       info[start].indic_category() == OT_Ra &&
-       info[start + 1].indic_category() == OT_H &&
-       !is_joiner (info[start + 2]))
-    {
-      limit += 2;
-      base = start;
-      has_reph = true;
-    };
-
-    /* -> starting from the end of the syllable, move backwards */
-    unsigned int i = end;
-    do {
-      i--;
-      /* -> until a consonant is found */
-      if (is_consonant (info[i]))
-      {
-       /* -> that does not have a below-base or post-base form
-        * (post-base forms have to follow below-base forms), */
-       if (info[i].indic_position() != POS_BELOW_C &&
-           info[i].indic_position() != POS_POST_C)
-       {
-         base = i;
-         break;
-       }
-
-       /* -> or that is not a pre-base reordering Ra,
-        *
-        * TODO
-        */
-
-       /* -> or arrive at the first consonant. The consonant stopped at will
-        * be the base. */
-       base = i;
-      }
-      else
-       if (is_joiner (info[i]))
-         break;
-    } while (i > limit);
-    if (base < start)
-      base = start; /* Just in case... */
-
-
-    /* -> If the syllable starts with Ra + Halant (in a script that has Reph)
-     *    and has more than one consonant, Ra is excluded from candidates for
-     *    base consonants. */
-    if (has_reph && base == start) {
-      /* Have no other consonant, so Reph is not formed and Ra becomes base. */
-      has_reph = false;
-    }
-  }
-
-
-  /* 2. Decompose and reorder Matras:
-   *
-   * Each matra and any syllable modifier sign in the cluster are moved to the
-   * appropriate position relative to the consonant(s) in the cluster. The
-   * shaping engine decomposes two- or three-part matras into their constituent
-   * parts before any repositioning. Matra characters are classified by which
-   * consonant in a conjunct they have affinity for and are reordered to the
-   * following positions:
-   *
-   *   o Before first half form in the syllable
-   *   o After subjoined consonants
-   *   o After post-form consonant
-   *   o After main consonant (for above marks)
-   *
-   * IMPLEMENTATION NOTES:
-   *
-   * The normalize() routine has already decomposed matras for us, so we don't
-   * need to worry about that.
-   */
-
-
-  /* 3.  Reorder marks to canonical order:
-   *
-   * Adjacent nukta and halant or nukta and vedic sign are always repositioned
-   * if necessary, so that the nukta is first.
-   *
-   * IMPLEMENTATION NOTES:
-   *
-   * We don't need to do this: the normalize() routine already did this for us.
-   */
-
-
-  /* Reorder characters */
-
-  for (unsigned int i = start; i < base; i++)
-    info[i].indic_position() = POS_PRE_C;
-  info[base].indic_position() = POS_BASE_C;
-
-  /* Handle beginning Ra */
-  if (has_reph)
-    info[start].indic_position() = POS_RA_TO_BECOME_REPH;
-
-  /* For old-style Indic script tags, move the first post-base Halant after
-   * last consonant. */
-  if ((map->get_chosen_script (0) & 0x000000FF) != '2') {
-    /* We should only do this for Indic scripts which have a version two I guess. */
-    for (unsigned int i = base + 1; i < end; i++)
-      if (info[i].indic_category() == OT_H) {
-        unsigned int j;
-        for (j = end - 1; j > i; j--)
-         if (is_consonant (info[j]))
-           break;
-       if (j > i) {
-         /* Move Halant to after last consonant. */
-         hb_glyph_info_t t = info[i];
-         memmove (&info[i], &info[i + 1], (j - i) * sizeof (info[0]));
-         info[j] = t;
-       }
-        break;
-      }
-  }
-
-  /* Attach ZWJ, ZWNJ, nukta, and halant to previous char to move with them. */
-  if (!indic_options ().uniscribe_bug_compatible)
-  {
-    /* Please update the Uniscribe branch when touching this! */
-    for (unsigned int i = start + 1; i < end; i++)
-      if ((FLAG (info[i].indic_category()) & (FLAG (OT_ZWNJ) | FLAG (OT_ZWJ) | FLAG (OT_N) | FLAG (OT_H))))
-       info[i].indic_position() = info[i - 1].indic_position();
-  } else {
-    /*
-     * Uniscribe doesn't move the Halant with Left Matra.
-     * TEST: U+092B,U+093F,U+094DE
-     */
-    /* Please update the non-Uniscribe branch when touching this! */
-    for (unsigned int i = start + 1; i < end; i++)
-      if ((FLAG (info[i].indic_category()) & (FLAG (OT_ZWNJ) | FLAG (OT_ZWJ) | FLAG (OT_N) | FLAG (OT_H)))) {
-       info[i].indic_position() = info[i - 1].indic_position();
-       if (info[i].indic_category() == OT_H && info[i].indic_position() == POS_PRE_M)
-         for (unsigned int j = i; j > start; j--)
-           if (info[j - 1].indic_position() != POS_PRE_M) {
-             info[i].indic_position() = info[j - 1].indic_position();
-             break;
-           }
-      }
-  }
-
-  /* We do bubble-sort, skip malicious clusters attempts */
-  if (end - start < 64)
-  {
-    /* Sit tight, rock 'n roll! */
-    hb_bubble_sort (info + start, end - start, compare_indic_order);
-    /* Find base again */
-    base = end;
-    for (unsigned int i = start; i < end; i++)
-      if (info[i].indic_position() == POS_BASE_C) {
-        base = i;
-       break;
-      }
-  }
-
-  /* Setup masks now */
-
-  {
-    hb_mask_t mask;
-
-    /* Reph */
-    for (unsigned int i = start; i < end && info[i].indic_position() == POS_RA_TO_BECOME_REPH; i++)
-      info[i].mask |= mask_array[RPHF];
-
-    /* Pre-base */
-    mask = mask_array[HALF] | mask_array[AKHN] | mask_array[CJCT];
-    for (unsigned int i = start; i < base; i++)
-      info[i].mask  |= mask;
-    /* Base */
-    mask = mask_array[AKHN] | mask_array[CJCT];
-    info[base].mask |= mask;
-    /* Post-base */
-    mask = mask_array[BLWF] | mask_array[PSTF] | mask_array[CJCT];
-    for (unsigned int i = base + 1; i < end; i++)
-      info[i].mask  |= mask;
-  }
-
-  /* Apply ZWJ/ZWNJ effects */
-  for (unsigned int i = start + 1; i < end; i++)
-    if (is_joiner (info[i])) {
-      bool non_joiner = info[i].indic_category() == OT_ZWNJ;
-      unsigned int j = i;
-
-      do {
-       j--;
-
-       info[j].mask &= ~mask_array[CJCT];
-       if (non_joiner)
-         info[j].mask &= ~mask_array[HALF];
-
-      } while (j > start && !is_consonant (info[j]));
-    }
-}
-
-
-static void
-initial_reordering_vowel_syllable (const hb_ot_map_t *map,
-                                  hb_buffer_t *buffer,
-                                  hb_mask_t *mask_array,
-                                  unsigned int start, unsigned int end)
-{
-  /* We made the vowels look like consonants.  So let's call the consonant logic! */
-  initial_reordering_consonant_syllable (map, buffer, mask_array, start, end);
-}
-
-static void
-initial_reordering_standalone_cluster (const hb_ot_map_t *map,
-                                      hb_buffer_t *buffer,
-                                      hb_mask_t *mask_array,
-                                      unsigned int start, unsigned int end)
-{
-  /* We treat NBSP/dotted-circle as if they are consonants, so we should just chain.
-   * Only if not in compatibility mode that is... */
-
-  if (indic_options ().uniscribe_bug_compatible)
-  {
-    /* For dotted-circle, this is what Uniscribe does:
-     * If dotted-circle is the last glyph, it just does nothing.
-     * Ie. It doesn't form Reph. */
-    if (buffer->info[end - 1].indic_category() == OT_DOTTEDCIRCLE)
-      return;
-  }
-
-  initial_reordering_consonant_syllable (map, buffer, mask_array, start, end);
-}
-
-static void
-initial_reordering_non_indic (const hb_ot_map_t *map HB_UNUSED,
-                             hb_buffer_t *buffer HB_UNUSED,
-                             hb_mask_t *mask_array HB_UNUSED,
-                             unsigned int start HB_UNUSED, unsigned int end HB_UNUSED)
-{
-  /* Nothing to do right now.  If we ever switch to using the output
-   * buffer in the reordering process, we'd need to next_glyph() here. */
-}
-
-#include "hb-ot-shape-complex-indic-machine.hh"
-
-static void
-initial_reordering (const hb_ot_map_t *map,
-                   hb_face_t *face HB_UNUSED,
-                   hb_buffer_t *buffer,
-                   void *user_data HB_UNUSED)
-{
-  hb_mask_t mask_array[ARRAY_LENGTH (indic_basic_features)] = {0};
-  unsigned int num_masks = ARRAY_LENGTH (indic_basic_features);
-  for (unsigned int i = 0; i < num_masks; i++)
-    mask_array[i] = map->get_1_mask (indic_basic_features[i].tag);
-
-  find_syllables (map, buffer, mask_array);
-}
-
-static void
-final_reordering_syllable (hb_buffer_t *buffer, hb_mask_t *mask_array,
-                          unsigned int start, unsigned int end)
-{
-  hb_glyph_info_t *info = buffer->info;
-
-  /* 4. Final reordering:
-   *
-   * After the localized forms and basic shaping forms GSUB features have been
-   * applied (see below), the shaping engine performs some final glyph
-   * reordering before applying all the remaining font features to the entire
-   * cluster.
-   */
-
-  /* Find base again */
-  unsigned int base = end;
-  for (unsigned int i = start; i < end; i++)
-    if (info[i].indic_position() == POS_BASE_C) {
-      base = i;
-      break;
-    }
-
-  if (base == start) {
-    /* There's no Reph, and no left Matra to reposition.  Just merge the cluster
-     * and go home. */
-    buffer->merge_clusters (start, end);
-    return;
-  }
-
-  unsigned int start_of_last_cluster = base;
-
-  /*   o Reorder matras:
-   *
-   *     If a pre-base matra character had been reordered before applying basic
-   *     features, the glyph can be moved closer to the main consonant based on
-   *     whether half-forms had been formed. Actual position for the matra is
-   *     defined as “after last standalone halant glyph, after initial matra
-   *     position and before the main consonant”. If ZWJ or ZWNJ follow this
-   *     halant, position is moved after it.
-   */
-
-  {
-    unsigned int new_matra_pos = base - 1;
-    while (new_matra_pos > start &&
-          !(FLAG (info[new_matra_pos].indic_category()) & (FLAG (OT_M) | FLAG (OT_H))))
-      new_matra_pos--;
-    /* If we found no Halant we are done.  Otherwise only proceed if the Halant does
-     * not belong to the Matra itself! */
-    if (info[new_matra_pos].indic_category() == OT_H &&
-       info[new_matra_pos].indic_position() != POS_PRE_M) {
-      /* -> If ZWJ or ZWNJ follow this halant, position is moved after it. */
-      if (new_matra_pos + 1 < end && is_joiner (info[new_matra_pos + 1]))
-       new_matra_pos++;
-
-      /* Now go see if there's actually any matras... */
-      for (unsigned int i = new_matra_pos; i > start; i--)
-       if (info[i - 1].indic_position () == POS_PRE_M)
-       {
-         unsigned int old_matra_pos = i - 1;
-         hb_glyph_info_t matra = info[old_matra_pos];
-         memmove (&info[old_matra_pos], &info[old_matra_pos + 1], (new_matra_pos - old_matra_pos) * sizeof (info[0]));
-         info[new_matra_pos] = matra;
-         start_of_last_cluster = MIN (new_matra_pos, start_of_last_cluster);
-         new_matra_pos--;
-       }
-    }
-  }
-
-
-  /*   o Reorder reph:
-   *
-   *     Reph’s original position is always at the beginning of the syllable,
-   *     (i.e. it is not reordered at the character reordering stage). However,
-   *     it will be reordered according to the basic-forms shaping results.
-   *     Possible positions for reph, depending on the script, are; after main,
-   *     before post-base consonant forms, and after post-base consonant forms.
-   */
-
-  /* If there's anything after the Ra that has the REPH pos, it ought to be halant.
-   * Which means that the font has failed to ligate the Reph.  In which case, we
-   * shouldn't move. */
-  if (start + 1 < end &&
-      info[start].indic_position() == POS_RA_TO_BECOME_REPH &&
-      info[start + 1].indic_position() != POS_RA_TO_BECOME_REPH)
-  {
-      unsigned int new_reph_pos;
-
-     enum reph_position_t {
-       REPH_AFTER_MAIN,
-       REPH_BEFORE_SUBSCRIPT,
-       REPH_AFTER_SUBSCRIPT,
-       REPH_BEFORE_POSTSCRIPT,
-       REPH_AFTER_POSTSCRIPT
-     } reph_pos;
-
-     /* XXX Figure out old behavior too */
-     switch ((hb_tag_t) buffer->props.script)
-     {
-       case HB_SCRIPT_MALAYALAM:
-       case HB_SCRIPT_ORIYA:
-        reph_pos = REPH_AFTER_MAIN;
-        break;
-
-       case HB_SCRIPT_GURMUKHI:
-        reph_pos = REPH_BEFORE_SUBSCRIPT;
-        break;
-
-       case HB_SCRIPT_BENGALI:
-        reph_pos = REPH_AFTER_SUBSCRIPT;
-        break;
-
-       default:
-       case HB_SCRIPT_DEVANAGARI:
-       case HB_SCRIPT_GUJARATI:
-        reph_pos = REPH_BEFORE_POSTSCRIPT;
-        break;
-
-       case HB_SCRIPT_KANNADA:
-       case HB_SCRIPT_TAMIL:
-       case HB_SCRIPT_TELUGU:
-        reph_pos = REPH_AFTER_POSTSCRIPT;
-        break;
-     }
-
-    /*       1. If reph should be positioned after post-base consonant forms,
-     *          proceed to step 5.
-     */
-    if (reph_pos == REPH_AFTER_POSTSCRIPT)
-    {
-      goto reph_step_5;
-    }
-
-    /*       2. If the reph repositioning class is not after post-base: target
-     *          position is after the first explicit halant glyph between the
-     *          first post-reph consonant and last main consonant. If ZWJ or ZWNJ
-     *          are following this halant, position is moved after it. If such
-     *          position is found, this is the target position. Otherwise,
-     *          proceed to the next step.
-     *
-     *          Note: in old-implementation fonts, where classifications were
-     *          fixed in shaping engine, there was no case where reph position
-     *          will be found on this step.
-     */
-    {
-      new_reph_pos = start + 1;
-      while (new_reph_pos < base && info[new_reph_pos].indic_category() != OT_H)
-       new_reph_pos++;
-
-      if (new_reph_pos < base && info[new_reph_pos].indic_category() == OT_H) {
-       /* ->If ZWJ or ZWNJ are following this halant, position is moved after it. */
-       if (new_reph_pos + 1 < base && is_joiner (info[new_reph_pos + 1]))
-         new_reph_pos++;
-       goto reph_move;
-      }
-    }
-
-    /*       3. If reph should be repositioned after the main consonant: find the
-     *          first consonant not ligated with main, or find the first
-     *          consonant that is not a potential pre-base reordering Ra.
-     */
-    if (reph_pos == REPH_AFTER_MAIN)
-    {
-      /* XXX */
-    }
-
-    /*       4. If reph should be positioned before post-base consonant, find
-     *          first post-base classified consonant not ligated with main. If no
-     *          consonant is found, the target position should be before the
-     *          first matra, syllable modifier sign or vedic sign.
-     */
-    /* This is our take on what step 4 is trying to say (and failing, BADLY). */
-    if (reph_pos == REPH_AFTER_SUBSCRIPT)
-    {
-      new_reph_pos = base;
-      while (new_reph_pos < end &&
-            !( FLAG (info[new_reph_pos + 1].indic_position()) & (FLAG (POS_POST_C) | FLAG (POS_POST_M) | FLAG (POS_SMVD))))
-       new_reph_pos++;
-      if (new_reph_pos < end)
-        goto reph_move;
-    }
-
-    /*       5. If no consonant is found in steps 3 or 4, move reph to a position
-     *          immediately before the first post-base matra, syllable modifier
-     *          sign or vedic sign that has a reordering class after the intended
-     *          reph position. For example, if the reordering position for reph
-     *          is post-main, it will skip above-base matras that also have a
-     *          post-main position.
-     */
-    reph_step_5:
-    {
-      /* XXX */
-    }
-
-    /*       6. Otherwise, reorder reph to the end of the syllable.
-     */
-    {
-      new_reph_pos = end - 1;
-      while (new_reph_pos > start && info[new_reph_pos].indic_position() == POS_SMVD)
-       new_reph_pos--;
-
-      /*
-       * If the Reph is to be ending up after a Matra,Halant sequence,
-       * position it before that Halant so it can interact with the Matra.
-       * However, if it's a plain Consonant,Halant we shouldn't do that.
-       * Uniscribe doesn't do this.
-       * TEST: U+0930,U+094D,U+0915,U+094B,U+094D
-       */
-      if (!indic_options ().uniscribe_bug_compatible &&
-         unlikely (info[new_reph_pos].indic_category() == OT_H)) {
-       for (unsigned int i = base + 1; i < new_reph_pos; i++)
-         if (info[i].indic_category() == OT_M) {
-           /* Ok, got it. */
-           new_reph_pos--;
-         }
-      }
-      goto reph_move;
-    }
-
-    reph_move:
-    {
-      /* Move */
-      hb_glyph_info_t reph = info[start];
-      memmove (&info[start], &info[start + 1], (new_reph_pos - start) * sizeof (info[0]));
-      info[new_reph_pos] = reph;
-      start_of_last_cluster = start; /* Yay, one big cluster! */
-    }
-  }
-
-
-  /*   o Reorder pre-base reordering consonants:
-   *
-   *     If a pre-base reordering consonant is found, reorder it according to
-   *     the following rules:
-   *
-   *       1. Only reorder a glyph produced by substitution during application
-   *          of the feature. (Note that a font may shape a Ra consonant with
-   *          the feature generally but block it in certain contexts.)
-   *
-   *       2. Try to find a target position the same way as for pre-base matra.
-   *          If it is found, reorder pre-base consonant glyph.
-   *
-   *       3. If position is not found, reorder immediately before main
-   *          consonant.
-   */
-
-  /* TODO */
-
-
-
-  /* Apply 'init' to the Left Matra if it's a word start. */
-  if (info[start].indic_position () == POS_PRE_M &&
-      (!start ||
-       !(FLAG (_hb_glyph_info_get_general_category (&info[start - 1])) &
-        (FLAG (HB_UNICODE_GENERAL_CATEGORY_LOWERCASE_LETTER) |
-         FLAG (HB_UNICODE_GENERAL_CATEGORY_MODIFIER_LETTER) |
-         FLAG (HB_UNICODE_GENERAL_CATEGORY_OTHER_LETTER) |
-         FLAG (HB_UNICODE_GENERAL_CATEGORY_TITLECASE_LETTER) |
-         FLAG (HB_UNICODE_GENERAL_CATEGORY_UPPERCASE_LETTER) |
-         FLAG (HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK) |
-         FLAG (HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK) |
-         FLAG (HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK)))))
-    info[start].mask |= mask_array[INIT];
-
-
-
-  /* Finish off the clusters and go home! */
-
-  if (!indic_options ().uniscribe_bug_compatible)
-  {
-    /* This is what Uniscribe does.  Ie. add cluster boundaries after Halant,ZWNJ.
-     * This means, half forms are submerged into the main consonants cluster.
-     * This is unnecessary, and makes cursor positioning harder, but that's what
-     * Uniscribe does. */
-    unsigned int cluster_start = start;
-    for (unsigned int i = start + 1; i < start_of_last_cluster; i++)
-      if (info[i - 1].indic_category() == OT_H && info[i].indic_category() == OT_ZWNJ) {
-        i++;
-       buffer->merge_clusters (cluster_start, i);
-       cluster_start = i;
-      }
-    start_of_last_cluster = cluster_start;
-  }
-
-  buffer->merge_clusters (start_of_last_cluster, end);
-}
-
-
-static void
-final_reordering (const hb_ot_map_t *map,
-                 hb_face_t *face HB_UNUSED,
-                 hb_buffer_t *buffer,
-                 void *user_data HB_UNUSED)
-{
-  unsigned int count = buffer->len;
-  if (!count) return;
-
-  hb_mask_t mask_array[ARRAY_LENGTH (indic_other_features)] = {0};
-  unsigned int num_masks = ARRAY_LENGTH (indic_other_features);
-  for (unsigned int i = 0; i < num_masks; i++)
-    mask_array[i] = map->get_1_mask (indic_other_features[i].tag);
-
-  hb_glyph_info_t *info = buffer->info;
-  unsigned int last = 0;
-  unsigned int last_syllable = info[0].syllable();
-  for (unsigned int i = 1; i < count; i++)
-    if (last_syllable != info[i].syllable()) {
-      final_reordering_syllable (buffer, mask_array, last, i);
-      last = i;
-      last_syllable = info[last].syllable();
-    }
-  final_reordering_syllable (buffer, mask_array, last, count);
-
-  HB_BUFFER_DEALLOCATE_VAR (buffer, indic_category);
-  HB_BUFFER_DEALLOCATE_VAR (buffer, indic_position);
-}
-
-
-
diff --git a/src/hb-ot-shape-complex-misc.cc b/src/hb-ot-shape-complex-misc.cc
deleted file mode 100644 (file)
index d93d4c6..0000000
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * Copyright © 2010  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "hb-ot-shape-complex-private.hh"
-
-
-/* TODO Add kana, and other small shapers here */
-
-/* When adding trivial shapers, eg. kana, hangul, etc, we can either
- * add a full shaper enum value for them, or switch on the script in
- * the default complex shaper.  The former is faster, so I think that's
- * what we would do, and hence the default complex shaper shall remain
- * empty.
- */
-
-void
-_hb_ot_shape_complex_collect_features_default (hb_ot_map_builder_t *map HB_UNUSED,
-                                              const hb_segment_properties_t *props HB_UNUSED)
-{
-}
-
-hb_ot_shape_normalization_mode_t
-_hb_ot_shape_complex_normalization_preference_default (void)
-{
-  return HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS;
-}
-
-void
-_hb_ot_shape_complex_setup_masks_default (hb_ot_map_t *map HB_UNUSED,
-                                         hb_buffer_t *buffer HB_UNUSED,
-                                         hb_font_t *font HB_UNUSED)
-{
-}
-
-
-
-/* Hangul shaper */
-
-static const hb_tag_t hangul_features[] =
-{
-  HB_TAG('l','j','m','o'),
-  HB_TAG('v','j','m','o'),
-  HB_TAG('t','j','m','o'),
-};
-
-void
-_hb_ot_shape_complex_collect_features_hangul (hb_ot_map_builder_t *map,
-                                             const hb_segment_properties_t *props HB_UNUSED)
-{
-  for (unsigned int i = 0; i < ARRAY_LENGTH (hangul_features); i++)
-    map->add_bool_feature (hangul_features[i]);
-}
-
-hb_ot_shape_normalization_mode_t
-_hb_ot_shape_complex_normalization_preference_hangul (void)
-{
-  return HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_FULL;
-}
-
-void
-_hb_ot_shape_complex_setup_masks_hangul (hb_ot_map_t *map HB_UNUSED,
-                                        hb_buffer_t *buffer HB_UNUSED,
-                                        hb_font_t *font HB_UNUSED)
-{
-}
-
-
-
-/* Thai / Lao shaper */
-
-void
-_hb_ot_shape_complex_collect_features_thai (hb_ot_map_builder_t *map HB_UNUSED,
-                                           const hb_segment_properties_t *props HB_UNUSED)
-{
-}
-
-hb_ot_shape_normalization_mode_t
-_hb_ot_shape_complex_normalization_preference_thai (void)
-{
-  return HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_FULL;
-}
-
-void
-_hb_ot_shape_complex_setup_masks_thai (hb_ot_map_t *map HB_UNUSED,
-                                      hb_buffer_t *buffer,
-                                      hb_font_t *font HB_UNUSED)
-{
-  /* The following is NOT specified in the MS OT Thai spec, however, it seems
-   * to be what Uniscribe and other engines implement.  According to Eric Muller:
-   *
-   * When you have a sara am, decompose it in nikhahit + sara a, *and* mode the
-   * nihka hit backwards over any *tone* mark (0E48-0E4B).
-   *
-   * <0E14, 0E4B, 0E33> -> <0E14, 0E4D, 0E4B, 0E32>
-   *
-   * This reordering is legit only when the nikhahit comes from a sara am, not
-   * when it's there to start with. The string <0E14, 0E4B, 0E4D> is probably
-   * not what a u↪ser wanted, but the rendering is nevertheless nikhahit above
-   * chattawa.
-   *
-   * Same for Lao.
-   */
-
-  /*
-   * Here are the characters of significance:
-   *
-   *                   Thai    Lao
-   * SARA AM:          U+0E33  U+0EB3
-   * SARA AA:          U+0E32  U+0EB2
-   * Nikhahit:         U+0E4D  U+0ECD
-   *
-   * Tone marks:
-   * Thai:     <0E48..0E4B> CCC=107
-   * Lao:      <0EC8..0ECB> CCC=122
-   *
-   * Note how the Lao versions are the same as Thai + 0x80.
-   */
-
-  /* We only get one script at a time, so a script-agnostic implementation
-   * is adequate here. */
-#define IS_SARA_AM(x) (((x) & ~0x0080) == 0x0E33)
-#define NIKHAHIT_FROM_SARA_AM(x) ((x) - 0xE33 + 0xE4D)
-#define SARA_AA_FROM_SARA_AM(x) ((x) - 1)
-#define IS_TONE_MARK(x) (((x) & ~0x0083) == 0x0E48)
-
-  buffer->clear_output ();
-  unsigned int count = buffer->len;
-  for (buffer->idx = 0; buffer->idx < count;)
-  {
-    hb_codepoint_t u = buffer->cur().codepoint;
-    if (likely (!IS_SARA_AM (u))) {
-      buffer->next_glyph ();
-      continue;
-    }
-
-    /* Is SARA AM. Decompose and reorder. */
-    hb_codepoint_t decomposed[2] = {hb_codepoint_t (NIKHAHIT_FROM_SARA_AM (u)),
-                                   hb_codepoint_t (SARA_AA_FROM_SARA_AM (u))};
-    buffer->replace_glyphs (1, 2, decomposed);
-    if (unlikely (buffer->in_error))
-      return;
-
-    /* Ok, let's see... */
-    unsigned int end = buffer->out_len;
-    unsigned int start = end - 2;
-    while (start > 0 && IS_TONE_MARK (buffer->out_info[start - 1].codepoint))
-      start--;
-
-    /* Move Nikhahit (end-2) to the beginning */
-    hb_glyph_info_t t = buffer->out_info[end - 2];
-    memmove (buffer->out_info + start + 1,
-            buffer->out_info + start,
-            sizeof (buffer->out_info[0]) * (end - start - 2));
-    buffer->out_info[start] = t;
-
-    /* XXX Make this easier! */
-    /* Make cluster */
-    for (; start > 0 && buffer->out_info[start - 1].cluster == buffer->out_info[start].cluster; start--)
-      ;
-    for (; buffer->idx < count;)
-      if (buffer->cur().cluster == buffer->prev().cluster)
-        buffer->next_glyph ();
-      else
-        break;
-    end = buffer->out_len;
-
-    buffer->merge_out_clusters (start, end);
-  }
-  buffer->swap_buffers ();
-}
diff --git a/src/hb-ot-shape-complex-private.hh b/src/hb-ot-shape-complex-private.hh
deleted file mode 100644 (file)
index e0d93a6..0000000
+++ /dev/null
@@ -1,310 +0,0 @@
-/*
- * Copyright © 2010,2011,2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_OT_SHAPE_COMPLEX_PRIVATE_HH
-#define HB_OT_SHAPE_COMPLEX_PRIVATE_HH
-
-#include "hb-private.hh"
-
-#include "hb-ot-map-private.hh"
-#include "hb-ot-shape-normalize-private.hh"
-
-
-
-/* buffer var allocations, used during the entire shaping process */
-#define unicode_props0()       var1.u8[0]
-#define unicode_props1()       var1.u8[1]
-
-/* buffer var allocations, used during the GSUB/GPOS processing */
-#define props_cache()          var1.u16[1] /* GSUB/GPOS glyph_props cache */
-#define syllable()             var2.u8[0] /* GSUB/GPOS shaping boundaries */
-#define lig_props()            var2.u8[1] /* GSUB/GPOS ligature tracking */
-
-/* buffer var allocations, used by complex shapers */
-#define complex_var_persistent_u8_0()  var2.u8[2]
-#define complex_var_persistent_u8_1()  var2.u8[3]
-#define complex_var_temporary_u8()     var2.u8[0]
-
-
-#define HB_COMPLEX_SHAPERS_IMPLEMENT_SHAPERS \
-  HB_COMPLEX_SHAPER_IMPLEMENT (default) /* should be first */ \
-  HB_COMPLEX_SHAPER_IMPLEMENT (arabic) \
-  HB_COMPLEX_SHAPER_IMPLEMENT (hangul) \
-  HB_COMPLEX_SHAPER_IMPLEMENT (indic) \
-  HB_COMPLEX_SHAPER_IMPLEMENT (thai) \
-  /* ^--- Add new shapers here */
-
-enum hb_ot_complex_shaper_t {
-#define HB_COMPLEX_SHAPER_IMPLEMENT(name) hb_ot_complex_shaper_##name,
-  HB_COMPLEX_SHAPERS_IMPLEMENT_SHAPERS
-  /* Just here to avoid enum trailing comma: */
-  hb_ot_complex_shaper_generic = hb_ot_complex_shaper_default
-#undef HB_COMPLEX_SHAPER_IMPLEMENT
-};
-
-static inline hb_ot_complex_shaper_t
-hb_ot_shape_complex_categorize (const hb_segment_properties_t *props)
-{
-  switch ((hb_tag_t) props->script)
-  {
-    default:
-      return hb_ot_complex_shaper_default;
-
-
-    /* Unicode-1.1 additions */
-    case HB_SCRIPT_ARABIC:
-    case HB_SCRIPT_MONGOLIAN:
-    case HB_SCRIPT_SYRIAC:
-
-    /* Unicode-5.0 additions */
-    case HB_SCRIPT_NKO:
-
-    /* Unicode-6.0 additions */
-    case HB_SCRIPT_MANDAIC:
-
-      return hb_ot_complex_shaper_arabic;
-
-
-    /* Unicode-1.1 additions */
-    case HB_SCRIPT_HANGUL:
-
-      return hb_ot_complex_shaper_hangul;
-
-
-    /* Unicode-1.1 additions */
-    case HB_SCRIPT_THAI:
-    case HB_SCRIPT_LAO:
-
-      return hb_ot_complex_shaper_thai;
-
-
-
-    /* ^--- Add new shapers here */
-
-
-#if 0
-    /* Note:
-     *
-     * These disabled scripts are listed in ucd/IndicSyllabicCategory.txt, but according
-     * to Martin Hosken and Jonathan Kew do not require complex shaping.
-     *
-     * TODO We should automate figuring out which scripts do not need complex shaping
-     *
-     * TODO We currently keep data for these scripts in our indic table.  Need to fix the
-     * generator to not do that.
-     */
-
-
-    /* Simple? */
-
-    /* Unicode-3.2 additions */
-    case HB_SCRIPT_BUHID:
-    case HB_SCRIPT_HANUNOO:
-
-    /* Unicode-5.1 additions */
-    case HB_SCRIPT_SAURASHTRA:
-
-    /* Unicode-5.2 additions */
-    case HB_SCRIPT_MEETEI_MAYEK:
-
-    /* Unicode-6.0 additions */
-    case HB_SCRIPT_BATAK:
-    case HB_SCRIPT_BRAHMI:
-
-
-    /* Simple */
-
-    /* Unicode-1.1 additions */
-    /* These have their own shaper now. */
-    case HB_SCRIPT_LAO:
-    case HB_SCRIPT_THAI:
-
-    /* Unicode-2.0 additions */
-    case HB_SCRIPT_TIBETAN:
-
-    /* Unicode-3.2 additions */
-    case HB_SCRIPT_TAGALOG:
-    case HB_SCRIPT_TAGBANWA:
-
-    /* Unicode-4.0 additions */
-    case HB_SCRIPT_LIMBU:
-    case HB_SCRIPT_TAI_LE:
-
-    /* Unicode-4.1 additions */
-    case HB_SCRIPT_SYLOTI_NAGRI:
-
-    /* Unicode-5.0 additions */
-    case HB_SCRIPT_PHAGS_PA:
-
-    /* Unicode-5.1 additions */
-    case HB_SCRIPT_KAYAH_LI:
-
-    /* Unicode-5.2 additions */
-    case HB_SCRIPT_TAI_VIET:
-
-
-    /* May need Indic treatment in the future? */
-
-    /* Unicode-3.0 additions */
-    case HB_SCRIPT_MYANMAR:
-
-
-#endif
-
-    /* Unicode-1.1 additions */
-    case HB_SCRIPT_BENGALI:
-    case HB_SCRIPT_DEVANAGARI:
-    case HB_SCRIPT_GUJARATI:
-    case HB_SCRIPT_GURMUKHI:
-    case HB_SCRIPT_KANNADA:
-    case HB_SCRIPT_MALAYALAM:
-    case HB_SCRIPT_ORIYA:
-    case HB_SCRIPT_TAMIL:
-    case HB_SCRIPT_TELUGU:
-
-    /* Unicode-3.0 additions */
-    case HB_SCRIPT_KHMER:
-    case HB_SCRIPT_SINHALA:
-
-    /* Unicode-4.1 additions */
-    case HB_SCRIPT_BUGINESE:
-    case HB_SCRIPT_KHAROSHTHI:
-    case HB_SCRIPT_NEW_TAI_LUE:
-
-    /* Unicode-5.0 additions */
-    case HB_SCRIPT_BALINESE:
-
-    /* Unicode-5.1 additions */
-    case HB_SCRIPT_CHAM:
-    case HB_SCRIPT_LEPCHA:
-    case HB_SCRIPT_REJANG:
-    case HB_SCRIPT_SUNDANESE:
-
-    /* Unicode-5.2 additions */
-    case HB_SCRIPT_JAVANESE:
-    case HB_SCRIPT_KAITHI:
-    case HB_SCRIPT_TAI_THAM:
-
-    /* Unicode-6.1 additions */
-    case HB_SCRIPT_CHAKMA:
-    case HB_SCRIPT_SHARADA:
-    case HB_SCRIPT_TAKRI:
-
-      return hb_ot_complex_shaper_indic;
-
-    /* ^--- Add new shapers here */
-  }
-}
-
-
-
-/*
- * collect_features()
- *
- * Called during shape_plan().
- *
- * Shapers should use map to add their features and callbacks.
- */
-
-typedef void hb_ot_shape_complex_collect_features_func_t (hb_ot_map_builder_t *map, const hb_segment_properties_t  *props);
-#define HB_COMPLEX_SHAPER_IMPLEMENT(name) \
-  HB_INTERNAL hb_ot_shape_complex_collect_features_func_t _hb_ot_shape_complex_collect_features_##name;
-  HB_COMPLEX_SHAPERS_IMPLEMENT_SHAPERS
-#undef HB_COMPLEX_SHAPER_IMPLEMENT
-
-static inline void
-hb_ot_shape_complex_collect_features (hb_ot_complex_shaper_t shaper,
-                                     hb_ot_map_builder_t *map,
-                                     const hb_segment_properties_t  *props)
-{
-  switch (shaper) {
-    default:
-#define HB_COMPLEX_SHAPER_IMPLEMENT(name) \
-    case hb_ot_complex_shaper_##name:  _hb_ot_shape_complex_collect_features_##name (map, props); return;
-    HB_COMPLEX_SHAPERS_IMPLEMENT_SHAPERS
-#undef HB_COMPLEX_SHAPER_IMPLEMENT
-  }
-}
-
-
-/*
- * normalization_preference()
- *
- * Called during shape_execute().
- *
- * Shapers should return true if it prefers decomposed (NFD) input rather than precomposed (NFC).
- */
-
-typedef hb_ot_shape_normalization_mode_t hb_ot_shape_complex_normalization_preference_func_t (void);
-#define HB_COMPLEX_SHAPER_IMPLEMENT(name) \
-  HB_INTERNAL hb_ot_shape_complex_normalization_preference_func_t _hb_ot_shape_complex_normalization_preference_##name;
-  HB_COMPLEX_SHAPERS_IMPLEMENT_SHAPERS
-#undef HB_COMPLEX_SHAPER_IMPLEMENT
-
-static inline hb_ot_shape_normalization_mode_t
-hb_ot_shape_complex_normalization_preference (hb_ot_complex_shaper_t shaper)
-{
-  switch (shaper) {
-    default:
-#define HB_COMPLEX_SHAPER_IMPLEMENT(name) \
-    case hb_ot_complex_shaper_##name:  return _hb_ot_shape_complex_normalization_preference_##name ();
-    HB_COMPLEX_SHAPERS_IMPLEMENT_SHAPERS
-#undef HB_COMPLEX_SHAPER_IMPLEMENT
-  }
-}
-
-
-/* setup_masks()
- *
- * Called during shape_execute().
- *
- * Shapers should use map to get feature masks and set on buffer.
- */
-
-typedef void hb_ot_shape_complex_setup_masks_func_t (hb_ot_map_t *map, hb_buffer_t *buffer, hb_font_t *font);
-#define HB_COMPLEX_SHAPER_IMPLEMENT(name) \
-  HB_INTERNAL hb_ot_shape_complex_setup_masks_func_t _hb_ot_shape_complex_setup_masks_##name;
-  HB_COMPLEX_SHAPERS_IMPLEMENT_SHAPERS
-#undef HB_COMPLEX_SHAPER_IMPLEMENT
-
-static inline void
-hb_ot_shape_complex_setup_masks (hb_ot_complex_shaper_t shaper,
-                                hb_ot_map_t *map,
-                                hb_buffer_t *buffer,
-                                hb_font_t *font)
-{
-  switch (shaper) {
-    default:
-#define HB_COMPLEX_SHAPER_IMPLEMENT(name) \
-    case hb_ot_complex_shaper_##name:  _hb_ot_shape_complex_setup_masks_##name (map, buffer, font); return;
-    HB_COMPLEX_SHAPERS_IMPLEMENT_SHAPERS
-#undef HB_COMPLEX_SHAPER_IMPLEMENT
-  }
-}
-
-
-
-#endif /* HB_OT_SHAPE_COMPLEX_PRIVATE_HH */
diff --git a/src/hb-ot-shape-normalize-private.hh b/src/hb-ot-shape-normalize-private.hh
deleted file mode 100644 (file)
index bb81f00..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright © 2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_OT_SHAPE_NORMALIZE_PRIVATE_HH
-#define HB_OT_SHAPE_NORMALIZE_PRIVATE_HH
-
-#include "hb-private.hh"
-
-#include "hb-font.h"
-#include "hb-buffer.h"
-
-
-enum hb_ot_shape_normalization_mode_t {
-  HB_OT_SHAPE_NORMALIZATION_MODE_DECOMPOSED,
-  HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS, /* never composes base-to-base */
-  HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_FULL /* including base-to-base composition */
-};
-
-HB_INTERNAL void _hb_ot_shape_normalize (hb_font_t *font,
-                                        hb_buffer_t *buffer,
-                                        hb_ot_shape_normalization_mode_t mode);
-
-#endif /* HB_OT_SHAPE_NORMALIZE_PRIVATE_HH */
diff --git a/src/hb-ot-shape-normalize.cc b/src/hb-ot-shape-normalize.cc
deleted file mode 100644 (file)
index 562ba88..0000000
+++ /dev/null
@@ -1,279 +0,0 @@
-/*
- * Copyright © 2011,2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "hb-ot-shape-normalize-private.hh"
-#include "hb-ot-shape-private.hh"
-
-
-/*
- * HIGHLEVEL DESIGN:
- *
- * This file exports one main function: _hb_ot_shape_normalize().
- *
- * This function closely reflects the Unicode Normalization Algorithm,
- * yet it's different.
- *
- * Each shaper specifies whether it prefers decomposed (NFD) or composed (NFC).
- * The logic however tries to use whatever the font can support.
- *
- * In general what happens is that: each grapheme is decomposed in a chain
- * of 1:2 decompositions, marks reordered, and then recomposed if desired,
- * so far it's like Unicode Normalization.  However, the decomposition and
- * recomposition only happens if the font supports the resulting characters.
- *
- * The goals are:
- *
- *   - Try to render all canonically equivalent strings similarly.  To really
- *     achieve this we have to always do the full decomposition and then
- *     selectively recompose from there.  It's kinda too expensive though, so
- *     we skip some cases.  For example, if composed is desired, we simply
- *     don't touch 1-character clusters that are supported by the font, even
- *     though their NFC may be different.
- *
- *   - When a font has a precomposed character for a sequence but the 'ccmp'
- *     feature in the font is not adequate, use the precomposed character
- *     which typically has better mark positioning.
- *
- *   - When a font does not support a combining mark, but supports it precomposed
- *     with previous base, use that.  This needs the itemizer to have this
- *     knowledge too.  We need to provide assistance to the itemizer.
- *
- *   - When a font does not support a character but supports its decomposition,
- *     well, use the decomposition.
- *
- *   - The Indic shaper requests decomposed output.  This will handle splitting
- *     matra for the Indic shaper.
- */
-
-static void
-output_glyph (hb_buffer_t *buffer, hb_codepoint_t glyph)
-{
-  buffer->output_glyph (glyph);
-  _hb_glyph_info_set_unicode_props (&buffer->prev(), buffer->unicode);
-}
-
-static bool
-decompose (hb_font_t *font, hb_buffer_t *buffer,
-          bool shortest,
-          hb_codepoint_t ab)
-{
-  hb_codepoint_t a, b, glyph;
-
-  if (!hb_unicode_decompose (buffer->unicode, ab, &a, &b) ||
-      (b && !hb_font_get_glyph (font, b, 0, &glyph)))
-    return false;
-
-  bool has_a = hb_font_get_glyph (font, a, 0, &glyph);
-  if (shortest && has_a) {
-    /* Output a and b */
-    output_glyph (buffer, a);
-    if (b)
-      output_glyph (buffer, b);
-    return true;
-  }
-
-  if (decompose (font, buffer, shortest, a)) {
-    if (b)
-      output_glyph (buffer, b);
-    return true;
-  }
-
-  if (has_a) {
-    output_glyph (buffer, a);
-    if (b)
-      output_glyph (buffer, b);
-    return true;
-  }
-
-  return false;
-}
-
-static void
-decompose_current_glyph (hb_font_t *font, hb_buffer_t *buffer,
-                        bool shortest)
-{
-  if (decompose (font, buffer, shortest, buffer->cur().codepoint))
-    buffer->skip_glyph ();
-  else
-    buffer->next_glyph ();
-}
-
-static void
-decompose_single_char_cluster (hb_font_t *font, hb_buffer_t *buffer,
-                              bool will_recompose)
-{
-  hb_codepoint_t glyph;
-
-  /* If recomposing and font supports this, we're good to go */
-  if (will_recompose && hb_font_get_glyph (font, buffer->cur().codepoint, 0, &glyph)) {
-    buffer->next_glyph ();
-    return;
-  }
-
-  decompose_current_glyph (font, buffer, will_recompose);
-}
-
-static void
-decompose_multi_char_cluster (hb_font_t *font, hb_buffer_t *buffer,
-                             unsigned int end)
-{
-  /* TODO Currently if there's a variation-selector we give-up, it's just too hard. */
-  for (unsigned int i = buffer->idx; i < end; i++)
-    if (unlikely (_hb_unicode_is_variation_selector (buffer->info[i].codepoint))) {
-      while (buffer->idx < end)
-       buffer->next_glyph ();
-      return;
-    }
-
-  while (buffer->idx < end)
-    decompose_current_glyph (font, buffer, false);
-}
-
-static int
-compare_combining_class (const hb_glyph_info_t *pa, const hb_glyph_info_t *pb)
-{
-  unsigned int a = _hb_glyph_info_get_modified_combining_class (pa);
-  unsigned int b = _hb_glyph_info_get_modified_combining_class (pb);
-
-  return a < b ? -1 : a == b ? 0 : +1;
-}
-
-void
-_hb_ot_shape_normalize (hb_font_t *font, hb_buffer_t *buffer,
-                       hb_ot_shape_normalization_mode_t mode)
-{
-  bool recompose = mode != HB_OT_SHAPE_NORMALIZATION_MODE_DECOMPOSED;
-  bool has_multichar_clusters = false;
-  unsigned int count;
-
-  /* We do a fairly straightforward yet custom normalization process in three
-   * separate rounds: decompose, reorder, recompose (if desired).  Currently
-   * this makes two buffer swaps.  We can make it faster by moving the last
-   * two rounds into the inner loop for the first round, but it's more readable
-   * this way. */
-
-
-  /* First round, decompose */
-
-  buffer->clear_output ();
-  count = buffer->len;
-  for (buffer->idx = 0; buffer->idx < count;)
-  {
-    unsigned int end;
-    for (end = buffer->idx + 1; end < count; end++)
-      if (buffer->cur().cluster != buffer->info[end].cluster)
-        break;
-
-    if (buffer->idx + 1 == end)
-      decompose_single_char_cluster (font, buffer, recompose);
-    else {
-      decompose_multi_char_cluster (font, buffer, end);
-      has_multichar_clusters = true;
-    }
-  }
-  buffer->swap_buffers ();
-
-
-  if (mode != HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_FULL && !has_multichar_clusters)
-    return; /* Done! */
-
-
-  /* Second round, reorder (inplace) */
-
-  count = buffer->len;
-  for (unsigned int i = 0; i < count; i++)
-  {
-    if (_hb_glyph_info_get_modified_combining_class (&buffer->info[i]) == 0)
-      continue;
-
-    unsigned int end;
-    for (end = i + 1; end < count; end++)
-      if (_hb_glyph_info_get_modified_combining_class (&buffer->info[end]) == 0)
-        break;
-
-    /* We are going to do a bubble-sort.  Only do this if the
-     * sequence is short.  Doing it on long sequences can result
-     * in an O(n^2) DoS. */
-    if (end - i > 10) {
-      i = end;
-      continue;
-    }
-
-    hb_bubble_sort (buffer->info + i, end - i, compare_combining_class);
-
-    i = end;
-  }
-
-
-  if (!recompose)
-    return;
-
-  /* Third round, recompose */
-
-  /* As noted in the comment earlier, we don't try to combine
-   * ccc=0 chars with their previous Starter. */
-
-  buffer->clear_output ();
-  count = buffer->len;
-  unsigned int starter = 0;
-  buffer->next_glyph ();
-  while (buffer->idx < count)
-  {
-    hb_codepoint_t composed, glyph;
-    if (/* If mode is NOT COMPOSED_FULL (ie. it's COMPOSED_DIACRITICS), we don't try to
-        * compose a CCC=0 character with it's preceding starter. */
-       (mode == HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_FULL ||
-        _hb_glyph_info_get_modified_combining_class (&buffer->cur()) != 0) &&
-       /* If there's anything between the starter and this char, they should have CCC
-        * smaller than this character's. */
-       (starter == buffer->out_len - 1 ||
-        _hb_glyph_info_get_modified_combining_class (&buffer->prev()) < _hb_glyph_info_get_modified_combining_class (&buffer->cur())) &&
-       /* And compose. */
-       hb_unicode_compose (buffer->unicode,
-                           buffer->out_info[starter].codepoint,
-                           buffer->cur().codepoint,
-                           &composed) &&
-       /* And the font has glyph for the composite. */
-       hb_font_get_glyph (font, composed, 0, &glyph))
-    {
-      /* Composes. Modify starter and carry on. */
-      buffer->out_info[starter].codepoint = composed;
-      /* XXX update cluster */
-      _hb_glyph_info_set_unicode_props (&buffer->out_info[starter], buffer->unicode);
-
-      buffer->skip_glyph ();
-      continue;
-    }
-
-    /* Blocked, or doesn't compose. */
-    buffer->next_glyph ();
-
-    if (_hb_glyph_info_get_modified_combining_class (&buffer->prev()) == 0)
-      starter = buffer->out_len - 1;
-  }
-  buffer->swap_buffers ();
-
-}
diff --git a/src/hb-ot-shape-private.hh b/src/hb-ot-shape-private.hh
deleted file mode 100644 (file)
index df0c705..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright © 2010  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_OT_SHAPE_PRIVATE_HH
-#define HB_OT_SHAPE_PRIVATE_HH
-
-#include "hb-private.hh"
-
-#include "hb-ot-map-private.hh"
-#include "hb-ot-shape-complex-private.hh"
-
-
-struct hb_ot_shape_plan_t
-{
-  hb_ot_map_t map;
-  hb_ot_complex_shaper_t shaper;
-
-  hb_ot_shape_plan_t (void) : map () {}
-  ~hb_ot_shape_plan_t (void) { map.finish (); }
-
-  private:
-  NO_COPY (hb_ot_shape_plan_t);
-};
-
-
-
-HB_INTERNAL hb_bool_t
-_hb_ot_shape (hb_font_t          *font,
-             hb_buffer_t        *buffer,
-             const hb_feature_t *features,
-             unsigned int        num_features);
-
-
-inline void
-_hb_glyph_info_set_unicode_props (hb_glyph_info_t *info, hb_unicode_funcs_t *unicode)
-{
-  info->unicode_props0() = ((unsigned int) hb_unicode_general_category (unicode, info->codepoint)) |
-                          (_hb_unicode_is_zero_width (info->codepoint) ? 0x80 : 0);
-  info->unicode_props1() = _hb_unicode_modified_combining_class (unicode, info->codepoint);
-}
-
-inline hb_unicode_general_category_t
-_hb_glyph_info_get_general_category (const hb_glyph_info_t *info)
-{
-  return (hb_unicode_general_category_t) (info->unicode_props0() & 0x7F);
-}
-
-inline unsigned int
-_hb_glyph_info_get_modified_combining_class (const hb_glyph_info_t *info)
-{
-  return info->unicode_props1();
-}
-
-inline hb_bool_t
-_hb_glyph_info_is_zero_width (const hb_glyph_info_t *info)
-{
-  return !!(info->unicode_props0() & 0x80);
-}
-
-#endif /* HB_OT_SHAPE_PRIVATE_HH */
diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc
deleted file mode 100644 (file)
index 19cf680..0000000
+++ /dev/null
@@ -1,528 +0,0 @@
-/*
- * Copyright © 2009,2010  Red Hat, Inc.
- * Copyright © 2010,2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Behdad Esfahbod
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "hb-ot-shape-private.hh"
-#include "hb-ot-shape-normalize-private.hh"
-
-#include "hb-font-private.hh"
-#include "hb-set-private.hh"
-
-
-
-hb_tag_t common_features[] = {
-  HB_TAG('c','c','m','p'),
-  HB_TAG('l','i','g','a'),
-  HB_TAG('l','o','c','l'),
-  HB_TAG('m','a','r','k'),
-  HB_TAG('m','k','m','k'),
-  HB_TAG('r','l','i','g'),
-};
-
-
-hb_tag_t horizontal_features[] = {
-  HB_TAG('c','a','l','t'),
-  HB_TAG('c','l','i','g'),
-  HB_TAG('c','u','r','s'),
-  HB_TAG('k','e','r','n'),
-};
-
-/* Note:
- * Technically speaking, vrt2 and vert are mutually exclusive.
- * According to the spec, valt and vpal are also mutually exclusive.
- * But we apply them all for now.
- */
-hb_tag_t vertical_features[] = {
-  HB_TAG('v','a','l','t'),
-  HB_TAG('v','e','r','t'),
-  HB_TAG('v','k','r','n'),
-  HB_TAG('v','p','a','l'),
-  HB_TAG('v','r','t','2'),
-};
-
-
-
-struct hb_ot_shape_planner_t
-{
-  hb_ot_map_builder_t map;
-  hb_ot_complex_shaper_t shaper;
-
-  hb_ot_shape_planner_t (void) : map () {}
-  ~hb_ot_shape_planner_t (void) { map.finish (); }
-
-  inline void compile (hb_face_t *face,
-                      const hb_segment_properties_t *props,
-                      struct hb_ot_shape_plan_t &plan)
-  {
-    plan.shaper = shaper;
-    map.compile (face, props, plan.map);
-  }
-
-  private:
-  NO_COPY (hb_ot_shape_planner_t);
-};
-
-static void
-hb_ot_shape_collect_features (hb_ot_shape_planner_t          *planner,
-                             const hb_segment_properties_t  *props,
-                             const hb_feature_t             *user_features,
-                             unsigned int                    num_user_features)
-{
-  switch (props->direction) {
-    case HB_DIRECTION_LTR:
-      planner->map.add_bool_feature (HB_TAG ('l','t','r','a'));
-      planner->map.add_bool_feature (HB_TAG ('l','t','r','m'));
-      break;
-    case HB_DIRECTION_RTL:
-      planner->map.add_bool_feature (HB_TAG ('r','t','l','a'));
-      planner->map.add_bool_feature (HB_TAG ('r','t','l','m'), false);
-      break;
-    case HB_DIRECTION_TTB:
-    case HB_DIRECTION_BTT:
-    case HB_DIRECTION_INVALID:
-    default:
-      break;
-  }
-
-#define ADD_FEATURES(array) \
-  HB_STMT_START { \
-    for (unsigned int i = 0; i < ARRAY_LENGTH (array); i++) \
-      planner->map.add_bool_feature (array[i]); \
-  } HB_STMT_END
-
-  hb_ot_shape_complex_collect_features (planner->shaper, &planner->map, props);
-
-  ADD_FEATURES (common_features);
-
-  if (HB_DIRECTION_IS_HORIZONTAL (props->direction))
-    ADD_FEATURES (horizontal_features);
-  else
-    ADD_FEATURES (vertical_features);
-
-#undef ADD_FEATURES
-
-  for (unsigned int i = 0; i < num_user_features; i++) {
-    const hb_feature_t *feature = &user_features[i];
-    planner->map.add_feature (feature->tag, feature->value, (feature->start == 0 && feature->end == (unsigned int) -1));
-  }
-}
-
-
-struct hb_ot_shape_context_t
-{
-  /* Input to hb_ot_shape_execute() */
-  hb_ot_shape_plan_t *plan;
-  hb_font_t *font;
-  hb_face_t *face;
-  hb_buffer_t  *buffer;
-  const hb_feature_t *user_features;
-  unsigned int        num_user_features;
-
-  /* Transient stuff */
-  hb_direction_t target_direction;
-  hb_bool_t applied_position_complex;
-};
-
-static void
-hb_ot_shape_setup_masks (hb_ot_shape_context_t *c)
-{
-  hb_mask_t global_mask = c->plan->map.get_global_mask ();
-  c->buffer->reset_masks (global_mask);
-
-  hb_ot_shape_complex_setup_masks (c->plan->shaper, &c->plan->map, c->buffer, c->font);
-
-  for (unsigned int i = 0; i < c->num_user_features; i++)
-  {
-    const hb_feature_t *feature = &c->user_features[i];
-    if (!(feature->start == 0 && feature->end == (unsigned int)-1)) {
-      unsigned int shift;
-      hb_mask_t mask = c->plan->map.get_mask (feature->tag, &shift);
-      c->buffer->set_masks (feature->value << shift, mask, feature->start, feature->end);
-    }
-  }
-}
-
-
-/* Main shaper */
-
-/* Prepare */
-
-static void
-hb_set_unicode_props (hb_buffer_t *buffer)
-{
-  unsigned int count = buffer->len;
-  for (unsigned int i = 0; i < count; i++)
-    _hb_glyph_info_set_unicode_props (&buffer->info[i], buffer->unicode);
-}
-
-static void
-hb_form_clusters (hb_buffer_t *buffer)
-{
-  unsigned int count = buffer->len;
-  for (unsigned int i = 1; i < count; i++)
-    if (FLAG (_hb_glyph_info_get_general_category (&buffer->info[i])) &
-       (FLAG (HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK) |
-        FLAG (HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK) |
-        FLAG (HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK)))
-      buffer->info[i].cluster = buffer->info[i - 1].cluster; /* XXX do the min() here */
-}
-
-static void
-hb_ensure_native_direction (hb_buffer_t *buffer)
-{
-  hb_direction_t direction = buffer->props.direction;
-
-  /* TODO vertical:
-   * The only BTT vertical script is Ogham, but it's not clear to me whether OpenType
-   * Ogham fonts are supposed to be implemented BTT or not.  Need to research that
-   * first. */
-  if ((HB_DIRECTION_IS_HORIZONTAL (direction) && direction != hb_script_get_horizontal_direction (buffer->props.script)) ||
-      (HB_DIRECTION_IS_VERTICAL   (direction) && direction != HB_DIRECTION_TTB))
-  {
-    hb_buffer_reverse_clusters (buffer);
-    buffer->props.direction = HB_DIRECTION_REVERSE (buffer->props.direction);
-  }
-}
-
-
-/* Substitute */
-
-static void
-hb_mirror_chars (hb_ot_shape_context_t *c)
-{
-  hb_unicode_funcs_t *unicode = c->buffer->unicode;
-
-  if (HB_DIRECTION_IS_FORWARD (c->target_direction))
-    return;
-
-  hb_mask_t rtlm_mask = c->plan->map.get_1_mask (HB_TAG ('r','t','l','m'));
-
-  unsigned int count = c->buffer->len;
-  for (unsigned int i = 0; i < count; i++) {
-    hb_codepoint_t codepoint = hb_unicode_mirroring (unicode, c->buffer->info[i].codepoint);
-    if (likely (codepoint == c->buffer->info[i].codepoint))
-      c->buffer->info[i].mask |= rtlm_mask; /* XXX this should be moved to before setting user-feature masks */
-    else
-      c->buffer->info[i].codepoint = codepoint;
-  }
-}
-
-static void
-hb_map_glyphs (hb_font_t    *font,
-              hb_buffer_t  *buffer)
-{
-  hb_codepoint_t glyph;
-
-  if (unlikely (!buffer->len))
-    return;
-
-  buffer->clear_output ();
-
-  unsigned int count = buffer->len - 1;
-  for (buffer->idx = 0; buffer->idx < count;) {
-    if (unlikely (_hb_unicode_is_variation_selector (buffer->cur(+1).codepoint))) {
-      hb_font_get_glyph (font, buffer->cur().codepoint, buffer->cur(+1).codepoint, &glyph);
-      buffer->replace_glyphs (2, 1, &glyph);
-    } else {
-      hb_font_get_glyph (font, buffer->cur().codepoint, 0, &glyph);
-      buffer->replace_glyph (glyph);
-    }
-  }
-  if (likely (buffer->idx < buffer->len)) {
-    hb_font_get_glyph (font, buffer->cur().codepoint, 0, &glyph);
-    buffer->replace_glyph (glyph);
-  }
-  buffer->swap_buffers ();
-}
-
-static void
-hb_substitute_default (hb_ot_shape_context_t *c)
-{
-  hb_ot_layout_substitute_start (c->buffer);
-
-  hb_mirror_chars (c);
-
-  hb_map_glyphs (c->font, c->buffer);
-}
-
-static void
-hb_ot_substitute_complex (hb_ot_shape_context_t *c)
-{
-  if (hb_ot_layout_has_substitution (c->face)) {
-    c->plan->map.substitute (c->face, c->buffer);
-  }
-
-  hb_ot_layout_substitute_finish (c->buffer);
-
-  return;
-}
-
-
-/* Position */
-
-static void
-hb_position_default (hb_ot_shape_context_t *c)
-{
-  hb_ot_layout_position_start (c->buffer);
-
-  unsigned int count = c->buffer->len;
-  for (unsigned int i = 0; i < count; i++) {
-    hb_font_get_glyph_advance_for_direction (c->font, c->buffer->info[i].codepoint,
-                                            c->buffer->props.direction,
-                                            &c->buffer->pos[i].x_advance,
-                                            &c->buffer->pos[i].y_advance);
-    hb_font_subtract_glyph_origin_for_direction (c->font, c->buffer->info[i].codepoint,
-                                                c->buffer->props.direction,
-                                                &c->buffer->pos[i].x_offset,
-                                                &c->buffer->pos[i].y_offset);
-  }
-}
-
-static void
-hb_ot_position_complex (hb_ot_shape_context_t *c)
-{
-
-  if (hb_ot_layout_has_positioning (c->face))
-  {
-    /* Change glyph origin to what GPOS expects, apply GPOS, change it back. */
-
-    unsigned int count = c->buffer->len;
-    for (unsigned int i = 0; i < count; i++) {
-      hb_font_add_glyph_origin_for_direction (c->font, c->buffer->info[i].codepoint,
-                                             HB_DIRECTION_LTR,
-                                             &c->buffer->pos[i].x_offset,
-                                             &c->buffer->pos[i].y_offset);
-    }
-
-    c->plan->map.position (c->font, c->buffer);
-
-    for (unsigned int i = 0; i < count; i++) {
-      hb_font_subtract_glyph_origin_for_direction (c->font, c->buffer->info[i].codepoint,
-                                                  HB_DIRECTION_LTR,
-                                                  &c->buffer->pos[i].x_offset,
-                                                  &c->buffer->pos[i].y_offset);
-    }
-
-    c->applied_position_complex = true;
-  }
-
-  hb_ot_layout_position_finish (c->buffer);
-
-  return;
-}
-
-static void
-hb_position_complex_fallback (hb_ot_shape_context_t *c HB_UNUSED)
-{
-  /* TODO Mark pos */
-}
-
-static void
-hb_truetype_kern (hb_ot_shape_context_t *c)
-{
-  /* TODO Check for kern=0 */
-  unsigned int count = c->buffer->len;
-  for (unsigned int i = 1; i < count; i++) {
-    hb_position_t x_kern, y_kern, kern1, kern2;
-    hb_font_get_glyph_kerning_for_direction (c->font,
-                                            c->buffer->info[i - 1].codepoint, c->buffer->info[i].codepoint,
-                                            c->buffer->props.direction,
-                                            &x_kern, &y_kern);
-
-    kern1 = x_kern >> 1;
-    kern2 = x_kern - kern1;
-    c->buffer->pos[i - 1].x_advance += kern1;
-    c->buffer->pos[i].x_advance += kern2;
-    c->buffer->pos[i].x_offset += kern2;
-
-    kern1 = y_kern >> 1;
-    kern2 = y_kern - kern1;
-    c->buffer->pos[i - 1].y_advance += kern1;
-    c->buffer->pos[i].y_advance += kern2;
-    c->buffer->pos[i].y_offset += kern2;
-  }
-}
-
-static void
-hb_position_complex_fallback_visual (hb_ot_shape_context_t *c)
-{
-  hb_truetype_kern (c);
-}
-
-static void
-hb_hide_zerowidth (hb_ot_shape_context_t *c)
-{
-  /* TODO Save the space character in the font? */
-  hb_codepoint_t space;
-  if (!hb_font_get_glyph (c->font, ' ', 0, &space))
-    return; /* No point! */
-
-  unsigned int count = c->buffer->len;
-  for (unsigned int i = 0; i < count; i++)
-    if (unlikely (_hb_glyph_info_is_zero_width (&c->buffer->info[i]))) {
-      c->buffer->info[i].codepoint = space;
-      c->buffer->pos[i].x_advance = 0;
-      c->buffer->pos[i].y_advance = 0;
-    }
-}
-
-
-/* Do it! */
-
-static void
-hb_ot_shape_execute_internal (hb_ot_shape_context_t *c)
-{
-  c->buffer->deallocate_var_all ();
-
-  /* Save the original direction, we use it later. */
-  c->target_direction = c->buffer->props.direction;
-
-  HB_BUFFER_ALLOCATE_VAR (c->buffer, unicode_props0);
-  HB_BUFFER_ALLOCATE_VAR (c->buffer, unicode_props1);
-
-  hb_set_unicode_props (c->buffer);
-
-  hb_form_clusters (c->buffer);
-
-  hb_ensure_native_direction (c->buffer);
-
-  _hb_ot_shape_normalize (c->font, c->buffer, hb_ot_shape_complex_normalization_preference (c->plan->shaper));
-
-  hb_ot_shape_setup_masks (c);
-
-  /* SUBSTITUTE */
-  {
-    hb_substitute_default (c);
-
-    hb_ot_substitute_complex (c);
-  }
-
-  /* POSITION */
-  {
-    hb_position_default (c);
-
-    hb_ot_position_complex (c);
-
-    hb_bool_t position_fallback = !c->applied_position_complex;
-    if (position_fallback)
-      hb_position_complex_fallback (c);
-
-    if (HB_DIRECTION_IS_BACKWARD (c->buffer->props.direction))
-      hb_buffer_reverse (c->buffer);
-
-    if (position_fallback)
-      hb_position_complex_fallback_visual (c);
-  }
-
-  hb_hide_zerowidth (c);
-
-  HB_BUFFER_DEALLOCATE_VAR (c->buffer, unicode_props1);
-  HB_BUFFER_DEALLOCATE_VAR (c->buffer, unicode_props0);
-
-  c->buffer->props.direction = c->target_direction;
-
-  c->buffer->deallocate_var_all ();
-}
-
-static void
-hb_ot_shape_plan_internal (hb_ot_shape_plan_t       *plan,
-                          hb_face_t                *face,
-                          const hb_segment_properties_t  *props,
-                          const hb_feature_t       *user_features,
-                          unsigned int              num_user_features)
-{
-  hb_ot_shape_planner_t planner;
-
-  assert (HB_DIRECTION_IS_VALID (props->direction));
-
-  planner.shaper = hb_ot_shape_complex_categorize (props);
-
-  hb_ot_shape_collect_features (&planner, props, user_features, num_user_features);
-
-  planner.compile (face, props, *plan);
-}
-
-static void
-hb_ot_shape_execute (hb_ot_shape_plan_t *plan,
-                    hb_font_t          *font,
-                    hb_buffer_t        *buffer,
-                    const hb_feature_t *user_features,
-                    unsigned int        num_user_features)
-{
-  hb_ot_shape_context_t c = {plan, font, font->face, buffer, user_features, num_user_features};
-  hb_ot_shape_execute_internal (&c);
-}
-
-hb_bool_t
-_hb_ot_shape (hb_font_t          *font,
-             hb_buffer_t        *buffer,
-             const hb_feature_t *features,
-             unsigned int        num_features)
-{
-  hb_ot_shape_plan_t plan;
-
-  buffer->guess_properties ();
-
-  hb_ot_shape_plan_internal (&plan, font->face, &buffer->props, features, num_features);
-  hb_ot_shape_execute (&plan, font, buffer, features, num_features);
-
-  return true;
-}
-
-
-void
-hb_ot_shape_glyphs_closure (hb_font_t          *font,
-                           hb_buffer_t        *buffer,
-                           const hb_feature_t *features,
-                           unsigned int        num_features,
-                           hb_set_t           *glyphs)
-{
-  hb_ot_shape_plan_t plan;
-
-  buffer->guess_properties ();
-
-  hb_ot_shape_plan_internal (&plan, font->face, &buffer->props, features, num_features);
-
-  /* TODO: normalization? have shapers do closure()? */
-  /* TODO: Deal with mirrored chars? */
-  hb_map_glyphs (font, buffer);
-
-  /* Seed it.  It's user's responsibility to have cleard glyphs
-   * if that's what they desire. */
-  unsigned int count = buffer->len;
-  for (unsigned int i = 0; i < count; i++)
-    hb_set_add (glyphs, buffer->info[i].codepoint);
-
-  /* And find transitive closure. */
-  hb_set_t copy;
-  copy.init ();
-
-  do {
-    copy.set (glyphs);
-    plan.map.substitute_closure (font->face, glyphs);
-  } while (!copy.equal (glyphs));
-}
diff --git a/src/hb-ot-tag.cc b/src/hb-ot-tag.cc
deleted file mode 100644 (file)
index ac60e96..0000000
+++ /dev/null
@@ -1,710 +0,0 @@
-/*
- * Copyright © 2009  Red Hat, Inc.
- * Copyright © 2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Behdad Esfahbod
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "hb-private.hh"
-#include "hb-ot.h"
-
-#include <string.h>
-
-
-
-/* hb_script_t */
-
-static hb_tag_t
-hb_ot_old_tag_from_script (hb_script_t script)
-{
-  switch ((hb_tag_t) script) {
-    case HB_SCRIPT_INVALID:            return HB_OT_TAG_DEFAULT_SCRIPT;
-
-    /* KATAKANA and HIRAGANA both map to 'kana' */
-    case HB_SCRIPT_HIRAGANA:           return HB_TAG('k','a','n','a');
-
-    /* Spaces at the end are preserved, unlike ISO 15924 */
-    case HB_SCRIPT_LAO:                        return HB_TAG('l','a','o',' ');
-    case HB_SCRIPT_YI:                 return HB_TAG('y','i',' ',' ');
-    /* Unicode-5.0 additions */
-    case HB_SCRIPT_NKO:                        return HB_TAG('n','k','o',' ');
-    /* Unicode-5.1 additions */
-    case HB_SCRIPT_VAI:                        return HB_TAG('v','a','i',' ');
-    /* Unicode-5.2 additions */
-    /* Unicode-6.0 additions */
-  }
-
-  /* Else, just change first char to lowercase and return */
-  return ((hb_tag_t) script) | 0x20000000;
-}
-
-static hb_script_t
-hb_ot_old_tag_to_script (hb_tag_t tag)
-{
-  if (unlikely (tag == HB_OT_TAG_DEFAULT_SCRIPT))
-    return HB_SCRIPT_INVALID;
-
-  /* This side of the conversion is fully algorithmic. */
-
-  /* Any spaces at the end of the tag are replaced by repeating the last
-   * letter.  Eg 'nko ' -> 'Nkoo' */
-  if (unlikely ((tag & 0x0000FF00) == 0x00002000))
-    tag |= (tag >> 8) & 0x0000FF00; /* Copy second letter to third */
-  if (unlikely ((tag & 0x000000FF) == 0x00000020))
-    tag |= (tag >> 8) & 0x000000FF; /* Copy third letter to fourth */
-
-  /* Change first char to uppercase and return */
-  return (hb_script_t) (tag & ~0x20000000);
-}
-
-static hb_tag_t
-hb_ot_new_tag_from_script (hb_script_t script)
-{
-  switch ((hb_tag_t) script) {
-    case HB_SCRIPT_BENGALI:            return HB_TAG('b','n','g','2');
-    case HB_SCRIPT_DEVANAGARI:         return HB_TAG('d','e','v','2');
-    case HB_SCRIPT_GUJARATI:           return HB_TAG('g','j','r','2');
-    case HB_SCRIPT_GURMUKHI:           return HB_TAG('g','u','r','2');
-    case HB_SCRIPT_KANNADA:            return HB_TAG('k','n','d','2');
-    case HB_SCRIPT_MALAYALAM:          return HB_TAG('m','l','m','2');
-    case HB_SCRIPT_ORIYA:              return HB_TAG('o','r','y','2');
-    case HB_SCRIPT_TAMIL:              return HB_TAG('t','m','l','2');
-    case HB_SCRIPT_TELUGU:             return HB_TAG('t','e','l','2');
-  }
-
-  return HB_OT_TAG_DEFAULT_SCRIPT;
-}
-
-static hb_script_t
-hb_ot_new_tag_to_script (hb_tag_t tag)
-{
-  switch (tag) {
-    case HB_TAG('b','n','g','2'):      return HB_SCRIPT_BENGALI;
-    case HB_TAG('d','e','v','2'):      return HB_SCRIPT_DEVANAGARI;
-    case HB_TAG('g','j','r','2'):      return HB_SCRIPT_GUJARATI;
-    case HB_TAG('g','u','r','2'):      return HB_SCRIPT_GURMUKHI;
-    case HB_TAG('k','n','d','2'):      return HB_SCRIPT_KANNADA;
-    case HB_TAG('m','l','m','2'):      return HB_SCRIPT_MALAYALAM;
-    case HB_TAG('o','r','y','2'):      return HB_SCRIPT_ORIYA;
-    case HB_TAG('t','m','l','2'):      return HB_SCRIPT_TAMIL;
-    case HB_TAG('t','e','l','2'):      return HB_SCRIPT_TELUGU;
-  }
-
-  return HB_SCRIPT_UNKNOWN;
-}
-
-/*
- * Complete list at:
- * https://www.microsoft.com/typography/otspec/scripttags.htm
- * https://www.microsoft.com/typography/otspec160/scripttagsProposed.htm
- *
- * Most of the script tags are the same as the ISO 15924 tag but lowercased.
- * So we just do that, and handle the exceptional cases in a switch.
- */
-
-void
-hb_ot_tags_from_script (hb_script_t  script,
-                       hb_tag_t    *script_tag_1,
-                       hb_tag_t    *script_tag_2)
-{
-  hb_tag_t new_tag;
-
-  *script_tag_2 = HB_OT_TAG_DEFAULT_SCRIPT;
-  *script_tag_1 = hb_ot_old_tag_from_script (script);
-
-  new_tag = hb_ot_new_tag_from_script (script);
-  if (unlikely (new_tag != HB_OT_TAG_DEFAULT_SCRIPT)) {
-    *script_tag_2 = *script_tag_1;
-    *script_tag_1 = new_tag;
-  }
-}
-
-hb_script_t
-hb_ot_tag_to_script (hb_tag_t tag)
-{
-  if (unlikely ((tag & 0x000000FF) == '2'))
-    return hb_ot_new_tag_to_script (tag);
-
-  return hb_ot_old_tag_to_script (tag);
-}
-
-
-/* hb_language_t */
-
-typedef struct {
-  char language[6];
-  hb_tag_t tag;
-} LangTag;
-
-/*
- * Complete list at:
- * http://www.microsoft.com/typography/otspec/languagetags.htm
- *
- * Generated by intersecting the OpenType language tag list from
- * Draft OpenType 1.5 spec, with with the ISO 639-3 codes from
- * 2008/08/04, matching on name, and finally adjusted manually.
- *
- * Many items still missing.  Those are commented out at the end.
- * Keep sorted for bsearch.
- */
-
-static const LangTag ot_languages[] = {
-  {"aa",       HB_TAG('A','F','R',' ')},       /* Afar */
-  {"ab",       HB_TAG('A','B','K',' ')},       /* Abkhazian */
-  {"abq",      HB_TAG('A','B','A',' ')},       /* Abaza */
-  {"ady",      HB_TAG('A','D','Y',' ')},       /* Adyghe */
-  {"af",       HB_TAG('A','F','K',' ')},       /* Afrikaans */
-  {"aiw",      HB_TAG('A','R','I',' ')},       /* Aari */
-  {"am",       HB_TAG('A','M','H',' ')},       /* Amharic */
-  {"ar",       HB_TAG('A','R','A',' ')},       /* Arabic */
-  {"arn",      HB_TAG('M','A','P',' ')},       /* Mapudungun */
-  {"as",       HB_TAG('A','S','M',' ')},       /* Assamese */
-  {"av",       HB_TAG('A','V','R',' ')},       /* Avaric */
-  {"awa",      HB_TAG('A','W','A',' ')},       /* Awadhi */
-  {"ay",       HB_TAG('A','Y','M',' ')},       /* Aymara */
-  {"az",       HB_TAG('A','Z','E',' ')},       /* Azerbaijani */
-  {"ba",       HB_TAG('B','S','H',' ')},       /* Bashkir */
-  {"bal",      HB_TAG('B','L','I',' ')},       /* Baluchi */
-  {"bcq",      HB_TAG('B','C','H',' ')},       /* Bench */
-  {"bem",      HB_TAG('B','E','M',' ')},       /* Bemba (Zambia) */
-  {"bfq",      HB_TAG('B','A','D',' ')},       /* Badaga */
-  {"bft",      HB_TAG('B','L','T',' ')},       /* Balti */
-  {"bg",       HB_TAG('B','G','R',' ')},       /* Bulgarian */
-  {"bhb",      HB_TAG('B','H','I',' ')},       /* Bhili */
-  {"bho",      HB_TAG('B','H','O',' ')},       /* Bhojpuri */
-  {"bik",      HB_TAG('B','I','K',' ')},       /* Bikol */
-  {"bin",      HB_TAG('E','D','O',' ')},       /* Bini */
-  {"bm",       HB_TAG('B','M','B',' ')},       /* Bambara */
-  {"bn",       HB_TAG('B','E','N',' ')},       /* Bengali */
-  {"bo",       HB_TAG('T','I','B',' ')},       /* Tibetan */
-  {"br",       HB_TAG('B','R','E',' ')},       /* Breton */
-  {"brh",      HB_TAG('B','R','H',' ')},       /* Brahui */
-  {"bs",       HB_TAG('B','O','S',' ')},       /* Bosnian */
-  {"btb",      HB_TAG('B','T','I',' ')},       /* Beti (Cameroon) */
-  {"ca",       HB_TAG('C','A','T',' ')},       /* Catalan */
-  {"ce",       HB_TAG('C','H','E',' ')},       /* Chechen */
-  {"ceb",      HB_TAG('C','E','B',' ')},       /* Cebuano */
-  {"chp",      HB_TAG('C','H','P',' ')},       /* Chipewyan */
-  {"chr",      HB_TAG('C','H','R',' ')},       /* Cherokee */
-  {"cop",      HB_TAG('C','O','P',' ')},       /* Coptic */
-  {"cr",       HB_TAG('C','R','E',' ')},       /* Cree */
-  {"crh",      HB_TAG('C','R','T',' ')},       /* Crimean Tatar */
-  {"crm",      HB_TAG('M','C','R',' ')},       /* Moose Cree */
-  {"crx",      HB_TAG('C','R','R',' ')},       /* Carrier */
-  {"cs",       HB_TAG('C','S','Y',' ')},       /* Czech */
-  {"cu",       HB_TAG('C','S','L',' ')},       /* Church Slavic */
-  {"cv",       HB_TAG('C','H','U',' ')},       /* Chuvash */
-  {"cwd",      HB_TAG('D','C','R',' ')},       /* Woods Cree */
-  {"cy",       HB_TAG('W','E','L',' ')},       /* Welsh */
-  {"da",       HB_TAG('D','A','N',' ')},       /* Danish */
-  {"dap",      HB_TAG('N','I','S',' ')},       /* Nisi (India) */
-  {"dar",      HB_TAG('D','A','R',' ')},       /* Dargwa */
-  {"de",       HB_TAG('D','E','U',' ')},       /* German */
-  {"din",      HB_TAG('D','N','K',' ')},       /* Dinka */
-  {"dng",      HB_TAG('D','U','N',' ')},       /* Dungan */
-  {"doi",      HB_TAG('D','G','R',' ')},       /* Dogri */
-  {"dsb",      HB_TAG('L','S','B',' ')},       /* Lower Sorbian */
-  {"dv",       HB_TAG('D','I','V',' ')},       /* Dhivehi */
-  {"dz",       HB_TAG('D','Z','N',' ')},       /* Dzongkha */
-  {"ee",       HB_TAG('E','W','E',' ')},       /* Ewe */
-  {"efi",      HB_TAG('E','F','I',' ')},       /* Efik */
-  {"el",       HB_TAG('E','L','L',' ')},       /* Modern Greek (1453-) */
-  {"en",       HB_TAG('E','N','G',' ')},       /* English */
-  {"eo",       HB_TAG('N','T','O',' ')},       /* Esperanto */
-  {"eot",      HB_TAG('B','T','I',' ')},       /* Beti (Côte d'Ivoire) */
-  {"es",       HB_TAG('E','S','P',' ')},       /* Spanish */
-  {"et",       HB_TAG('E','T','I',' ')},       /* Estonian */
-  {"eu",       HB_TAG('E','U','Q',' ')},       /* Basque */
-  {"eve",      HB_TAG('E','V','N',' ')},       /* Even */
-  {"evn",      HB_TAG('E','V','K',' ')},       /* Evenki */
-  {"fa",       HB_TAG('F','A','R',' ')},       /* Persian */
-  {"ff",       HB_TAG('F','U','L',' ')},       /* Fulah */
-  {"fi",       HB_TAG('F','I','N',' ')},       /* Finnish */
-  {"fil",      HB_TAG('P','I','L',' ')},       /* Filipino */
-  {"fj",       HB_TAG('F','J','I',' ')},       /* Fijian */
-  {"fo",       HB_TAG('F','O','S',' ')},       /* Faroese */
-  {"fon",      HB_TAG('F','O','N',' ')},       /* Fon */
-  {"fr",       HB_TAG('F','R','A',' ')},       /* French */
-  {"fur",      HB_TAG('F','R','L',' ')},       /* Friulian */
-  {"fy",       HB_TAG('F','R','I',' ')},       /* Western Frisian */
-  {"ga",       HB_TAG('I','R','I',' ')},       /* Irish */
-  {"gaa",      HB_TAG('G','A','D',' ')},       /* Ga */
-  {"gag",      HB_TAG('G','A','G',' ')},       /* Gagauz */
-  {"gbm",      HB_TAG('G','A','W',' ')},       /* Garhwali */
-  {"gd",       HB_TAG('G','A','E',' ')},       /* Scottish Gaelic */
-  {"gl",       HB_TAG('G','A','L',' ')},       /* Galician */
-  {"gld",      HB_TAG('N','A','N',' ')},       /* Nanai */
-  {"gn",       HB_TAG('G','U','A',' ')},       /* Guarani */
-  {"gon",      HB_TAG('G','O','N',' ')},       /* Gondi */
-  {"grt",      HB_TAG('G','R','O',' ')},       /* Garo */
-  {"gu",       HB_TAG('G','U','J',' ')},       /* Gujarati */
-  {"guk",      HB_TAG('G','M','Z',' ')},       /* Gumuz */
-  {"gv",       HB_TAG('M','N','X',' ')},       /* Manx Gaelic */
-  {"ha",       HB_TAG('H','A','U',' ')},       /* Hausa */
-  {"har",      HB_TAG('H','R','I',' ')},       /* Harari */
-  {"he",       HB_TAG('I','W','R',' ')},       /* Hebrew */
-  {"hi",       HB_TAG('H','I','N',' ')},       /* Hindi */
-  {"hil",      HB_TAG('H','I','L',' ')},       /* Hiligaynon */
-  {"hoc",      HB_TAG('H','O',' ',' ')},       /* Ho */
-  {"hr",       HB_TAG('H','R','V',' ')},       /* Croatian */
-  {"hsb",      HB_TAG('U','S','B',' ')},       /* Upper Sorbian */
-  {"ht",       HB_TAG('H','A','I',' ')},       /* Haitian */
-  {"hu",       HB_TAG('H','U','N',' ')},       /* Hungarian */
-  {"hy",       HB_TAG('H','Y','E',' ')},       /* Armenian */
-  {"id",       HB_TAG('I','N','D',' ')},       /* Indonesian */
-  {"ig",       HB_TAG('I','B','O',' ')},       /* Igbo */
-  {"igb",      HB_TAG('E','B','I',' ')},       /* Ebira */
-  {"inh",      HB_TAG('I','N','G',' ')},       /* Ingush */
-  {"is",       HB_TAG('I','S','L',' ')},       /* Icelandic */
-  {"it",       HB_TAG('I','T','A',' ')},       /* Italian */
-  {"iu",       HB_TAG('I','N','U',' ')},       /* Inuktitut */
-  {"ja",       HB_TAG('J','A','N',' ')},       /* Japanese */
-  {"jv",       HB_TAG('J','A','V',' ')},       /* Javanese */
-  {"ka",       HB_TAG('K','A','T',' ')},       /* Georgian */
-  {"kam",      HB_TAG('K','M','B',' ')},       /* Kamba (Kenya) */
-  {"kbd",      HB_TAG('K','A','B',' ')},       /* Kabardian */
-  {"kdr",      HB_TAG('K','R','M',' ')},       /* Karaim */
-  {"kdt",      HB_TAG('K','U','Y',' ')},       /* Kuy */
-  {"kfr",      HB_TAG('K','A','C',' ')},       /* Kachchi */
-  {"kfy",      HB_TAG('K','M','N',' ')},       /* Kumaoni */
-  {"kha",      HB_TAG('K','S','I',' ')},       /* Khasi */
-  {"khw",      HB_TAG('K','H','W',' ')},       /* Khowar */
-  {"ki",       HB_TAG('K','I','K',' ')},       /* Kikuyu */
-  {"kk",       HB_TAG('K','A','Z',' ')},       /* Kazakh */
-  {"kl",       HB_TAG('G','R','N',' ')},       /* Kalaallisut */
-  {"kln",      HB_TAG('K','A','L',' ')},       /* Kalenjin */
-  {"km",       HB_TAG('K','H','M',' ')},       /* Central Khmer */
-  {"kmw",      HB_TAG('K','M','O',' ')},       /* Komo (Democratic Republic of Congo) */
-  {"kn",       HB_TAG('K','A','N',' ')},       /* Kannada */
-  {"ko",       HB_TAG('K','O','R',' ')},       /* Korean */
-  {"koi",      HB_TAG('K','O','P',' ')},       /* Komi-Permyak */
-  {"kok",      HB_TAG('K','O','K',' ')},       /* Konkani */
-  {"kpe",      HB_TAG('K','P','L',' ')},       /* Kpelle */
-  {"kpv",      HB_TAG('K','O','Z',' ')},       /* Komi-Zyrian */
-  {"kpy",      HB_TAG('K','Y','K',' ')},       /* Koryak */
-  {"kqy",      HB_TAG('K','R','T',' ')},       /* Koorete */
-  {"kr",       HB_TAG('K','N','R',' ')},       /* Kanuri */
-  {"kri",      HB_TAG('K','R','I',' ')},       /* Krio */
-  {"krl",      HB_TAG('K','R','L',' ')},       /* Karelian */
-  {"kru",      HB_TAG('K','U','U',' ')},       /* Kurukh */
-  {"ks",       HB_TAG('K','S','H',' ')},       /* Kashmiri */
-  {"ku",       HB_TAG('K','U','R',' ')},       /* Kurdish */
-  {"kum",      HB_TAG('K','U','M',' ')},       /* Kumyk */
-  {"kvd",      HB_TAG('K','U','I',' ')},       /* Kui (Indonesia) */
-  {"kxu",      HB_TAG('K','U','I',' ')},       /* Kui (India) */
-  {"ky",       HB_TAG('K','I','R',' ')},       /* Kirghiz */
-  {"la",       HB_TAG('L','A','T',' ')},       /* Latin */
-  {"lad",      HB_TAG('J','U','D',' ')},       /* Ladino */
-  {"lb",       HB_TAG('L','T','Z',' ')},       /* Luxembourgish */
-  {"lbe",      HB_TAG('L','A','K',' ')},       /* Lak */
-  {"lbj",      HB_TAG('L','D','K',' ')},       /* Ladakhi */
-  {"lif",      HB_TAG('L','M','B',' ')},       /* Limbu */
-  {"lld",      HB_TAG('L','A','D',' ')},       /* Ladin */
-  {"ln",       HB_TAG('L','I','N',' ')},       /* Lingala */
-  {"lo",       HB_TAG('L','A','O',' ')},       /* Lao */
-  {"lt",       HB_TAG('L','T','H',' ')},       /* Lithuanian */
-  {"luo",      HB_TAG('L','U','O',' ')},       /* Luo (Kenya and Tanzania) */
-  {"luw",      HB_TAG('L','U','O',' ')},       /* Luo (Cameroon) */
-  {"lv",       HB_TAG('L','V','I',' ')},       /* Latvian */
-  {"lzz",      HB_TAG('L','A','Z',' ')},       /* Laz */
-  {"mai",      HB_TAG('M','T','H',' ')},       /* Maithili */
-  {"mdc",      HB_TAG('M','L','E',' ')},       /* Male (Papua New Guinea) */
-  {"mdf",      HB_TAG('M','O','K',' ')},       /* Moksha */
-  {"mdy",      HB_TAG('M','L','E',' ')},       /* Male (Ethiopia) */
-  {"men",      HB_TAG('M','D','E',' ')},       /* Mende (Sierra Leone) */
-  {"mg",       HB_TAG('M','L','G',' ')},       /* Malagasy */
-  {"mi",       HB_TAG('M','R','I',' ')},       /* Maori */
-  {"mk",       HB_TAG('M','K','D',' ')},       /* Macedonian */
-  {"ml",       HB_TAG('M','L','R',' ')},       /* Malayalam */
-  {"mn",       HB_TAG('M','N','G',' ')},       /* Mongolian */
-  {"mnc",      HB_TAG('M','C','H',' ')},       /* Manchu */
-  {"mni",      HB_TAG('M','N','I',' ')},       /* Manipuri */
-  {"mnk",      HB_TAG('M','N','D',' ')},       /* Mandinka */
-  {"mns",      HB_TAG('M','A','N',' ')},       /* Mansi */
-  {"mnw",      HB_TAG('M','O','N',' ')},       /* Mon */
-  {"mo",       HB_TAG('M','O','L',' ')},       /* Moldavian */
-  {"moh",      HB_TAG('M','O','H',' ')},       /* Mohawk */
-  {"mpe",      HB_TAG('M','A','J',' ')},       /* Majang */
-  {"mr",       HB_TAG('M','A','R',' ')},       /* Marathi */
-  {"ms",       HB_TAG('M','L','Y',' ')},       /* Malay */
-  {"mt",       HB_TAG('M','T','S',' ')},       /* Maltese */
-  {"mwr",      HB_TAG('M','A','W',' ')},       /* Marwari */
-  {"my",       HB_TAG('B','R','M',' ')},       /* Burmese */
-  {"mym",      HB_TAG('M','E','N',' ')},       /* Me'en */
-  {"myv",      HB_TAG('E','R','Z',' ')},       /* Erzya */
-  {"nb",       HB_TAG('N','O','R',' ')},       /* Norwegian Bokmål */
-  {"nco",      HB_TAG('S','I','B',' ')},       /* Sibe */
-  {"ne",       HB_TAG('N','E','P',' ')},       /* Nepali */
-  {"new",      HB_TAG('N','E','W',' ')},       /* Newari */
-  {"ng",       HB_TAG('N','D','G',' ')},       /* Ndonga */
-  {"ngl",      HB_TAG('L','M','W',' ')},       /* Lomwe */
-  {"niu",      HB_TAG('N','I','U',' ')},       /* Niuean */
-  {"niv",      HB_TAG('G','I','L',' ')},       /* Gilyak */
-  {"nl",       HB_TAG('N','L','D',' ')},       /* Dutch */
-  {"nn",       HB_TAG('N','Y','N',' ')},       /* Norwegian Nynorsk */
-  {"no",       HB_TAG('N','O','R',' ')},       /* Norwegian (deprecated) */
-  {"nog",      HB_TAG('N','O','G',' ')},       /* Nogai */
-  {"nqo",      HB_TAG('N','K','O',' ')},       /* N'Ko */
-  {"nsk",      HB_TAG('N','A','S',' ')},       /* Naskapi */
-  {"ny",       HB_TAG('C','H','I',' ')},       /* Nyanja */
-  {"oc",       HB_TAG('O','C','I',' ')},       /* Occitan (post 1500) */
-  {"oj",       HB_TAG('O','J','B',' ')},       /* Ojibwa */
-  {"om",       HB_TAG('O','R','O',' ')},       /* Oromo */
-  {"or",       HB_TAG('O','R','I',' ')},       /* Oriya */
-  {"os",       HB_TAG('O','S','S',' ')},       /* Ossetian */
-  {"pa",       HB_TAG('P','A','N',' ')},       /* Panjabi */
-  {"pi",       HB_TAG('P','A','L',' ')},       /* Pali */
-  {"pl",       HB_TAG('P','L','K',' ')},       /* Polish */
-  {"plp",      HB_TAG('P','A','P',' ')},       /* Palpa */
-  {"prs",      HB_TAG('D','R','I',' ')},       /* Dari */
-  {"ps",       HB_TAG('P','A','S',' ')},       /* Pushto */
-  {"pt",       HB_TAG('P','T','G',' ')},       /* Portuguese */
-  {"raj",      HB_TAG('R','A','J',' ')},       /* Rajasthani */
-  {"ria",      HB_TAG('R','I','A',' ')},       /* Riang (India) */
-  {"ril",      HB_TAG('R','I','A',' ')},       /* Riang (Myanmar) */
-  {"ro",       HB_TAG('R','O','M',' ')},       /* Romanian */
-  {"rom",      HB_TAG('R','O','Y',' ')},       /* Romany */
-  {"ru",       HB_TAG('R','U','S',' ')},       /* Russian */
-  {"rue",      HB_TAG('R','S','Y',' ')},       /* Rusyn */
-  {"sa",       HB_TAG('S','A','N',' ')},       /* Sanskrit */
-  {"sah",      HB_TAG('Y','A','K',' ')},       /* Yakut */
-  {"sat",      HB_TAG('S','A','T',' ')},       /* Santali */
-  {"sck",      HB_TAG('S','A','D',' ')},       /* Sadri */
-  {"sd",       HB_TAG('S','N','D',' ')},       /* Sindhi */
-  {"se",       HB_TAG('N','S','M',' ')},       /* Northern Sami */
-  {"seh",      HB_TAG('S','N','A',' ')},       /* Sena */
-  {"sel",      HB_TAG('S','E','L',' ')},       /* Selkup */
-  {"sg",       HB_TAG('S','G','O',' ')},       /* Sango */
-  {"shn",      HB_TAG('S','H','N',' ')},       /* Shan */
-  {"si",       HB_TAG('S','N','H',' ')},       /* Sinhala */
-  {"sid",      HB_TAG('S','I','D',' ')},       /* Sidamo */
-  {"sjd",      HB_TAG('K','S','M',' ')},       /* Kildin Sami */
-  {"sk",       HB_TAG('S','K','Y',' ')},       /* Slovak */
-  {"skr",      HB_TAG('S','R','K',' ')},       /* Seraiki */
-  {"sl",       HB_TAG('S','L','V',' ')},       /* Slovenian */
-  {"sm",       HB_TAG('S','M','O',' ')},       /* Samoan */
-  {"sma",      HB_TAG('S','S','M',' ')},       /* Southern Sami */
-  {"smj",      HB_TAG('L','S','M',' ')},       /* Lule Sami */
-  {"smn",      HB_TAG('I','S','M',' ')},       /* Inari Sami */
-  {"sms",      HB_TAG('S','K','S',' ')},       /* Skolt Sami */
-  {"snk",      HB_TAG('S','N','K',' ')},       /* Soninke */
-  {"so",       HB_TAG('S','M','L',' ')},       /* Somali */
-  {"sq",       HB_TAG('S','Q','I',' ')},       /* Albanian */
-  {"sr",       HB_TAG('S','R','B',' ')},       /* Serbian */
-  {"srr",      HB_TAG('S','R','R',' ')},       /* Serer */
-  {"suq",      HB_TAG('S','U','R',' ')},       /* Suri */
-  {"sv",       HB_TAG('S','V','E',' ')},       /* Swedish */
-  {"sva",      HB_TAG('S','V','A',' ')},       /* Svan */
-  {"sw",       HB_TAG('S','W','K',' ')},       /* Swahili */
-  {"swb",      HB_TAG('C','M','R',' ')},       /* Comorian */
-  {"syr",      HB_TAG('S','Y','R',' ')},       /* Syriac */
-  {"ta",       HB_TAG('T','A','M',' ')},       /* Tamil */
-  {"tcy",      HB_TAG('T','U','L',' ')},       /* Tulu */
-  {"te",       HB_TAG('T','E','L',' ')},       /* Telugu */
-  {"tg",       HB_TAG('T','A','J',' ')},       /* Tajik */
-  {"th",       HB_TAG('T','H','A',' ')},       /* Thai */
-  {"ti",       HB_TAG('T','G','Y',' ')},       /* Tigrinya */
-  {"tig",      HB_TAG('T','G','R',' ')},       /* Tigre */
-  {"tk",       HB_TAG('T','K','M',' ')},       /* Turkmen */
-  {"tn",       HB_TAG('T','N','A',' ')},       /* Tswana */
-  {"tnz",      HB_TAG('T','N','G',' ')},       /* Tonga (Thailand) */
-  {"to",       HB_TAG('T','N','G',' ')},       /* Tonga (Tonga Islands) */
-  {"tog",      HB_TAG('T','N','G',' ')},       /* Tonga (Nyasa) */
-  {"toi",      HB_TAG('T','N','G',' ')},       /* Tonga (Zambia) */
-  {"tr",       HB_TAG('T','R','K',' ')},       /* Turkish */
-  {"ts",       HB_TAG('T','S','G',' ')},       /* Tsonga */
-  {"tt",       HB_TAG('T','A','T',' ')},       /* Tatar */
-  {"tw",       HB_TAG('T','W','I',' ')},       /* Twi */
-  {"ty",       HB_TAG('T','H','T',' ')},       /* Tahitian */
-  {"udm",      HB_TAG('U','D','M',' ')},       /* Udmurt */
-  {"ug",       HB_TAG('U','Y','G',' ')},       /* Uighur */
-  {"uk",       HB_TAG('U','K','R',' ')},       /* Ukrainian */
-  {"unr",      HB_TAG('M','U','N',' ')},       /* Mundari */
-  {"ur",       HB_TAG('U','R','D',' ')},       /* Urdu */
-  {"uz",       HB_TAG('U','Z','B',' ')},       /* Uzbek */
-  {"ve",       HB_TAG('V','E','N',' ')},       /* Venda */
-  {"vi",       HB_TAG('V','I','T',' ')},       /* Vietnamese */
-  {"wbm",      HB_TAG('W','A',' ',' ')},       /* Wa */
-  {"wbr",      HB_TAG('W','A','G',' ')},       /* Wagdi */
-  {"wo",       HB_TAG('W','L','F',' ')},       /* Wolof */
-  {"xal",      HB_TAG('K','L','M',' ')},       /* Kalmyk */
-  {"xh",       HB_TAG('X','H','S',' ')},       /* Xhosa */
-  {"xom",      HB_TAG('K','M','O',' ')},       /* Komo (Sudan) */
-  {"xsl",      HB_TAG('S','S','L',' ')},       /* South Slavey */
-  {"yi",       HB_TAG('J','I','I',' ')},       /* Yiddish */
-  {"yo",       HB_TAG('Y','B','A',' ')},       /* Yoruba */
-  {"yso",      HB_TAG('N','I','S',' ')},       /* Nisi (China) */
-  {"zne",      HB_TAG('Z','N','D',' ')},       /* Zande */
-  {"zu",       HB_TAG('Z','U','L',' ')}        /* Zulu */
-
-  /* I couldn't find the language id for these */
-
-/*{"??",       HB_TAG('A','G','W',' ')},*/     /* Agaw */
-/*{"??",       HB_TAG('A','L','S',' ')},*/     /* Alsatian */
-/*{"??",       HB_TAG('A','L','T',' ')},*/     /* Altai */
-/*{"??",       HB_TAG('A','R','K',' ')},*/     /* Arakanese */
-/*{"??",       HB_TAG('A','T','H',' ')},*/     /* Athapaskan */
-/*{"??",       HB_TAG('B','A','G',' ')},*/     /* Baghelkhandi */
-/*{"??",       HB_TAG('B','A','L',' ')},*/     /* Balkar */
-/*{"??",       HB_TAG('B','A','U',' ')},*/     /* Baule */
-/*{"??",       HB_TAG('B','B','R',' ')},*/     /* Berber */
-/*{"??",       HB_TAG('B','C','R',' ')},*/     /* Bible Cree */
-/*{"??",       HB_TAG('B','E','L',' ')},*/     /* Belarussian */
-/*{"??",       HB_TAG('B','I','L',' ')},*/     /* Bilen */
-/*{"??",       HB_TAG('B','K','F',' ')},*/     /* Blackfoot */
-/*{"??",       HB_TAG('B','L','N',' ')},*/     /* Balante */
-/*{"??",       HB_TAG('B','M','L',' ')},*/     /* Bamileke */
-/*{"??",       HB_TAG('B','R','I',' ')},*/     /* Braj Bhasha */
-/*{"??",       HB_TAG('C','H','G',' ')},*/     /* Chaha Gurage */
-/*{"??",       HB_TAG('C','H','H',' ')},*/     /* Chattisgarhi */
-/*{"??",       HB_TAG('C','H','K',' ')},*/     /* Chukchi */
-/*{"??",       HB_TAG('D','J','R',' ')},*/     /* Djerma */
-/*{"??",       HB_TAG('D','N','G',' ')},*/     /* Dangme */
-/*{"??",       HB_TAG('E','C','R',' ')},*/     /* Eastern Cree */
-/*{"??",       HB_TAG('F','A','N',' ')},*/     /* French Antillean */
-/*{"??",       HB_TAG('F','L','E',' ')},*/     /* Flemish */
-/*{"??",       HB_TAG('F','N','E',' ')},*/     /* Forest Nenets */
-/*{"??",       HB_TAG('F','T','A',' ')},*/     /* Futa */
-/*{"??",       HB_TAG('G','A','R',' ')},*/     /* Garshuni */
-/*{"??",       HB_TAG('G','E','Z',' ')},*/     /* Ge'ez */
-/*{"??",       HB_TAG('H','A','L',' ')},*/     /* Halam */
-/*{"??",       HB_TAG('H','A','R',' ')},*/     /* Harauti */
-/*{"??",       HB_TAG('H','A','W',' ')},*/     /* Hawaiin */
-/*{"??",       HB_TAG('H','B','N',' ')},*/     /* Hammer-Banna */
-/*{"??",       HB_TAG('H','M','A',' ')},*/     /* High Mari */
-/*{"??",       HB_TAG('H','N','D',' ')},*/     /* Hindko */
-/*{"??",       HB_TAG('I','J','O',' ')},*/     /* Ijo */
-/*{"??",       HB_TAG('I','L','O',' ')},*/     /* Ilokano */
-/*{"??",       HB_TAG('I','R','T',' ')},*/     /* Irish Traditional */
-/*{"??",       HB_TAG('J','U','L',' ')},*/     /* Jula */
-/*{"??",       HB_TAG('K','A','R',' ')},*/     /* Karachay */
-/*{"??",       HB_TAG('K','E','B',' ')},*/     /* Kebena */
-/*{"??",       HB_TAG('K','G','E',' ')},*/     /* Khutsuri Georgian */
-/*{"??",       HB_TAG('K','H','A',' ')},*/     /* Khakass */
-/*{"??",       HB_TAG('K','H','K',' ')},*/     /* Khanty-Kazim */
-/*{"??",       HB_TAG('K','H','S',' ')},*/     /* Khanty-Shurishkar */
-/*{"??",       HB_TAG('K','H','V',' ')},*/     /* Khanty-Vakhi */
-/*{"??",       HB_TAG('K','I','S',' ')},*/     /* Kisii */
-/*{"??",       HB_TAG('K','K','N',' ')},*/     /* Kokni */
-/*{"??",       HB_TAG('K','M','S',' ')},*/     /* Komso */
-/*{"??",       HB_TAG('K','O','D',' ')},*/     /* Kodagu */
-/*{"??",       HB_TAG('K','O','H',' ')},*/     /* Korean Old Hangul */
-/*{"??",       HB_TAG('K','O','N',' ')},*/     /* Kikongo */
-/*{"??",       HB_TAG('K','R','K',' ')},*/     /* Karakalpak */
-/*{"??",       HB_TAG('K','R','N',' ')},*/     /* Karen */
-/*{"??",       HB_TAG('K','U','L',' ')},*/     /* Kulvi */
-/*{"??",       HB_TAG('L','A','H',' ')},*/     /* Lahuli */
-/*{"??",       HB_TAG('L','A','M',' ')},*/     /* Lambani */
-/*{"??",       HB_TAG('L','C','R',' ')},*/     /* L-Cree */
-/*{"??",       HB_TAG('L','E','Z',' ')},*/     /* Lezgi */
-/*{"??",       HB_TAG('L','M','A',' ')},*/     /* Low Mari */
-/*{"??",       HB_TAG('L','U','B',' ')},*/     /* Luba */
-/*{"??",       HB_TAG('L','U','G',' ')},*/     /* Luganda */
-/*{"??",       HB_TAG('L','U','H',' ')},*/     /* Luhya */
-/*{"??",       HB_TAG('M','A','K',' ')},*/     /* Makua */
-/*{"??",       HB_TAG('M','A','L',' ')},*/     /* Malayalam Traditional */
-/*{"??",       HB_TAG('M','B','N',' ')},*/     /* Mbundu */
-/*{"??",       HB_TAG('M','I','Z',' ')},*/     /* Mizo */
-/*{"??",       HB_TAG('M','L','N',' ')},*/     /* Malinke */
-/*{"??",       HB_TAG('M','N','K',' ')},*/     /* Maninka */
-/*{"??",       HB_TAG('M','O','R',' ')},*/     /* Moroccan */
-/*{"??",       HB_TAG('N','A','G',' ')},*/     /* Naga-Assamese */
-/*{"??",       HB_TAG('N','C','R',' ')},*/     /* N-Cree */
-/*{"??",       HB_TAG('N','D','B',' ')},*/     /* Ndebele */
-/*{"??",       HB_TAG('N','G','R',' ')},*/     /* Nagari */
-/*{"??",       HB_TAG('N','H','C',' ')},*/     /* Norway House Cree */
-/*{"??",       HB_TAG('N','K','L',' ')},*/     /* Nkole */
-/*{"??",       HB_TAG('N','T','A',' ')},*/     /* Northern Tai */
-/*{"??",       HB_TAG('O','C','R',' ')},*/     /* Oji-Cree */
-/*{"??",       HB_TAG('P','A','A',' ')},*/     /* Palestinian Aramaic */
-/*{"??",       HB_TAG('P','G','R',' ')},*/     /* Polytonic Greek */
-/*{"??",       HB_TAG('P','L','G',' ')},*/     /* Palaung */
-/*{"??",       HB_TAG('Q','I','N',' ')},*/     /* Chin */
-/*{"??",       HB_TAG('R','B','U',' ')},*/     /* Russian Buriat */
-/*{"??",       HB_TAG('R','C','R',' ')},*/     /* R-Cree */
-/*{"??",       HB_TAG('R','M','S',' ')},*/     /* Rhaeto-Romanic */
-/*{"??",       HB_TAG('R','U','A',' ')},*/     /* Ruanda */
-/*{"??",       HB_TAG('S','A','Y',' ')},*/     /* Sayisi */
-/*{"??",       HB_TAG('S','E','K',' ')},*/     /* Sekota */
-/*{"??",       HB_TAG('S','I','G',' ')},*/     /* Silte Gurage */
-/*{"??",       HB_TAG('S','L','A',' ')},*/     /* Slavey */
-/*{"??",       HB_TAG('S','O','G',' ')},*/     /* Sodo Gurage */
-/*{"??",       HB_TAG('S','O','T',' ')},*/     /* Sotho */
-/*{"??",       HB_TAG('S','W','A',' ')},*/     /* Swadaya Aramaic */
-/*{"??",       HB_TAG('S','W','Z',' ')},*/     /* Swazi */
-/*{"??",       HB_TAG('S','X','T',' ')},*/     /* Sutu */
-/*{"??",       HB_TAG('T','A','B',' ')},*/     /* Tabasaran */
-/*{"??",       HB_TAG('T','C','R',' ')},*/     /* TH-Cree */
-/*{"??",       HB_TAG('T','G','N',' ')},*/     /* Tongan */
-/*{"??",       HB_TAG('T','M','N',' ')},*/     /* Temne */
-/*{"??",       HB_TAG('T','N','E',' ')},*/     /* Tundra Nenets */
-/*{"??",       HB_TAG('T','O','D',' ')},*/     /* Todo */
-/*{"??",       HB_TAG('T','U','A',' ')},*/     /* Turoyo Aramaic */
-/*{"??",       HB_TAG('T','U','V',' ')},*/     /* Tuvin */
-/*{"??",       HB_TAG('W','C','R',' ')},*/     /* West-Cree */
-/*{"??",       HB_TAG('X','B','D',' ')},*/     /* Tai Lue */
-/*{"??",       HB_TAG('Y','C','R',' ')},*/     /* Y-Cree */
-/*{"??",       HB_TAG('Y','I','C',' ')},*/     /* Yi Classic */
-/*{"??",       HB_TAG('Y','I','M',' ')},*/     /* Yi Modern */
-/*{"??",       HB_TAG('Z','H','P',' ')},*/     /* Chinese Phonetic */
-};
-
-static const LangTag ot_languages_zh[] = {
-  {"zh-cn",    HB_TAG('Z','H','S',' ')},       /* Chinese (China) */
-  {"zh-hk",    HB_TAG('Z','H','H',' ')},       /* Chinese (Hong Kong) */
-  {"zh-mo",    HB_TAG('Z','H','T',' ')},       /* Chinese (Macao) */
-  {"zh-sg",    HB_TAG('Z','H','S',' ')},       /* Chinese (Singapore) */
-  {"zh-tw",    HB_TAG('Z','H','T',' ')}        /* Chinese (Taiwan) */
-};
-
-static int
-lang_compare_first_component (const char *a,
-                             const char *b)
-{
-  unsigned int da, db;
-  const char *p;
-
-  p = strchr (a, '-');
-  da = p ? (unsigned int) (p - a) : strlen (a);
-
-  p = strchr (b, '-');
-  db = p ? (unsigned int) (p - b) : strlen (b);
-
-  return strncmp (a, b, MAX (da, db));
-}
-
-static hb_bool_t
-lang_matches (const char *lang_str, const char *spec)
-{
-  unsigned int len = strlen (spec);
-
-  return strncmp (lang_str, spec, len) == 0 &&
-        (lang_str[len] == '\0' || lang_str[len] == '-');
-}
-
-hb_tag_t
-hb_ot_tag_from_language (hb_language_t language)
-{
-  const char *lang_str, *s;
-  const LangTag *lang_tag;
-
-  if (language == HB_LANGUAGE_INVALID)
-    return HB_OT_TAG_DEFAULT_LANGUAGE;
-
-  lang_str = hb_language_to_string (language);
-
-  s = strstr (lang_str, "x-hbot");
-  if (s) {
-    char tag[4];
-    int i;
-    s += 6;
-    for (i = 0; i < 4 && ISALPHA (s[i]); i++)
-      tag[i] = TOUPPER (s[i]);
-    if (i) {
-      for (; i < 4; i++)
-       tag[i] = ' ';
-      return HB_TAG_CHAR4 (tag);
-    }
-  }
-
-  /* Find a language matching in the first component */
-  lang_tag = (LangTag *) bsearch (lang_str, ot_languages,
-                                 ARRAY_LENGTH (ot_languages), sizeof (LangTag),
-                                 (hb_compare_func_t) lang_compare_first_component);
-  if (lang_tag)
-    return lang_tag->tag;
-
-  /* Otherwise, check the Chinese ones */
-  if (0 == lang_compare_first_component (lang_str, "zh"))
-  {
-    unsigned int i;
-
-    for (i = 0; i < ARRAY_LENGTH (ot_languages_zh); i++)
-    {
-      lang_tag = &ot_languages_zh[i];
-      if (lang_matches (lang_tag->language, lang_str))
-       return lang_tag->tag;
-    }
-
-    /* Otherwise just return 'ZHS ' */
-    return HB_TAG('Z','H','S',' ');
-  }
-
-  s = strchr (lang_str, '-');
-  if (!s)
-    s = lang_str + strlen (lang_str);
-  if (s - lang_str == 3) {
-    /* Assume it's ISO-639-3 and upper-case and use it. */
-    return hb_tag_from_string (lang_str, s - lang_str) & ~0x20202000;
-  }
-
-  return HB_OT_TAG_DEFAULT_LANGUAGE;
-}
-
-hb_language_t
-hb_ot_tag_to_language (hb_tag_t tag)
-{
-  unsigned int i;
-
-  if (tag == HB_OT_TAG_DEFAULT_LANGUAGE)
-    return NULL;
-
-  for (i = 0; i < ARRAY_LENGTH (ot_languages); i++)
-    if (ot_languages[i].tag == tag)
-      return hb_language_from_string (ot_languages[i].language, -1);
-
-  /* If tag starts with ZH, it's Chinese */
-  if ((tag & 0xFFFF0000)  == 0x5A480000) {
-    switch (tag) {
-      case HB_TAG('Z','H','H',' '): return hb_language_from_string ("zh-hk", -1); /* Hong Kong */
-      default: {
-        /* Encode the tag... */
-       unsigned char buf[14] = "zh-x-hbot";
-       buf[9] = tag >> 24;
-       buf[10] = (tag >> 16) & 0xFF;
-       buf[11] = (tag >> 8) & 0xFF;
-       buf[12] = tag & 0xFF;
-       if (buf[12] == 0x20)
-         buf[12] = '\0';
-       buf[13] = '\0';
-       return hb_language_from_string ((char *) buf, -1);
-      }
-    }
-  }
-
-  /* Else return a custom language in the form of "x-hbotABCD" */
-  {
-    unsigned char buf[11] = "x-hbot";
-    buf[6] = tag >> 24;
-    buf[7] = (tag >> 16) & 0xFF;
-    buf[8] = (tag >> 8) & 0xFF;
-    buf[9] = tag & 0xFF;
-    if (buf[9] == 0x20)
-      buf[9] = '\0';
-    buf[10] = '\0';
-    return hb_language_from_string ((char *) buf, -1);
-  }
-}
-
-
diff --git a/src/hb-ot-tag.h b/src/hb-ot-tag.h
deleted file mode 100644 (file)
index 1bf12ab..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright © 2009  Red Hat, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_OT_H_IN
-#error "Include <hb-ot.h> instead."
-#endif
-
-#ifndef HB_OT_TAG_H
-#define HB_OT_TAG_H
-
-#include "hb.h"
-
-HB_BEGIN_DECLS
-
-
-#define HB_OT_TAG_DEFAULT_SCRIPT       HB_TAG ('D', 'F', 'L', 'T')
-#define HB_OT_TAG_DEFAULT_LANGUAGE     HB_TAG ('d', 'f', 'l', 't')
-
-void
-hb_ot_tags_from_script (hb_script_t  script,
-                       hb_tag_t    *script_tag_1,
-                       hb_tag_t    *script_tag_2);
-
-hb_script_t
-hb_ot_tag_to_script (hb_tag_t tag);
-
-hb_tag_t
-hb_ot_tag_from_language (hb_language_t language);
-
-hb_language_t
-hb_ot_tag_to_language (hb_tag_t tag);
-
-
-HB_END_DECLS
-
-#endif /* HB_OT_TAG_H */
diff --git a/src/hb-ot.h b/src/hb-ot.h
deleted file mode 100644 (file)
index 2d750c3..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright © 2009  Red Hat, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_OT_H
-#define HB_OT_H
-#define HB_OT_H_IN
-
-#include "hb.h"
-
-#include "hb-ot-layout.h"
-#include "hb-ot-tag.h"
-
-HB_BEGIN_DECLS
-
-void
-hb_ot_shape_glyphs_closure (hb_font_t          *font,
-                           hb_buffer_t        *buffer,
-                           const hb_feature_t *features,
-                           unsigned int        num_features,
-                           hb_set_t           *glyphs);
-
-HB_END_DECLS
-
-#undef HB_OT_H_IN
-#endif /* HB_OT_H */
diff --git a/src/hb-private.hh b/src/hb-private.hh
deleted file mode 100644 (file)
index 0cb049e..0000000
+++ /dev/null
@@ -1,749 +0,0 @@
-/*
- * Copyright © 2007,2008,2009  Red Hat, Inc.
- * Copyright © 2011,2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Behdad Esfahbod
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_PRIVATE_HH
-#define HB_PRIVATE_HH
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "hb.h"
-#define HB_H_IN
-#ifdef HAVE_OT
-#include "hb-ot.h"
-#define HB_OT_H_IN
-#endif
-
-#include <stdlib.h>
-#include <stddef.h>
-#include <string.h>
-#include <assert.h>
-
-/* We only use these two for debug output.  However, the debug code is
- * always seen by the compiler (and optimized out in non-debug builds.
- * If including these becomes a problem, we can start thinking about
- * someway around that. */
-#include <stdio.h>
-#include <errno.h>
-#include <stdarg.h>
-
-
-
-/* Essentials */
-
-#ifndef NULL
-# define NULL ((void *) 0)
-#endif
-
-
-/* Basics */
-
-
-#undef MIN
-template <typename Type> static inline Type MIN (const Type &a, const Type &b) { return a < b ? a : b; }
-
-#undef MAX
-template <typename Type> static inline Type MAX (const Type &a, const Type &b) { return a > b ? a : b; }
-
-
-#undef  ARRAY_LENGTH
-#define ARRAY_LENGTH(__array) ((signed int) (sizeof (__array) / sizeof (__array[0])))
-
-#define HB_STMT_START do
-#define HB_STMT_END   while (0)
-
-#define _ASSERT_STATIC1(_line, _cond)  typedef int _static_assert_on_line_##_line##_failed[(_cond)?1:-1]
-#define _ASSERT_STATIC0(_line, _cond)  _ASSERT_STATIC1 (_line, (_cond))
-#define ASSERT_STATIC(_cond)           _ASSERT_STATIC0 (__LINE__, (_cond))
-
-#define ASSERT_STATIC_EXPR(_cond)((void) sizeof (char[(_cond) ? 1 : -1]))
-#define ASSERT_STATIC_EXPR_ZERO(_cond) (0 * sizeof (char[(_cond) ? 1 : -1]))
-
-#define _PASTE1(a,b) a##b
-#define PASTE(a,b) _PASTE1(a,b)
-
-/* Lets assert int types.  Saves trouble down the road. */
-
-ASSERT_STATIC (sizeof (int8_t) == 1);
-ASSERT_STATIC (sizeof (uint8_t) == 1);
-ASSERT_STATIC (sizeof (int16_t) == 2);
-ASSERT_STATIC (sizeof (uint16_t) == 2);
-ASSERT_STATIC (sizeof (int32_t) == 4);
-ASSERT_STATIC (sizeof (uint32_t) == 4);
-ASSERT_STATIC (sizeof (int64_t) == 8);
-ASSERT_STATIC (sizeof (uint64_t) == 8);
-
-ASSERT_STATIC (sizeof (hb_codepoint_t) == 4);
-ASSERT_STATIC (sizeof (hb_position_t) == 4);
-ASSERT_STATIC (sizeof (hb_mask_t) == 4);
-ASSERT_STATIC (sizeof (hb_var_int_t) == 4);
-
-
-/* We like our types POD */
-
-#define _ASSERT_TYPE_POD1(_line, _type)        union _type_##_type##_on_line_##_line##_is_not_POD { _type instance; }
-#define _ASSERT_TYPE_POD0(_line, _type)        _ASSERT_TYPE_POD1 (_line, _type)
-#define ASSERT_TYPE_POD(_type)         _ASSERT_TYPE_POD0 (__LINE__, _type)
-
-#ifdef __GNUC__
-# define _ASSERT_INSTANCE_POD1(_line, _instance) \
-       HB_STMT_START { \
-               typedef __typeof__(_instance) _type_##_line; \
-               _ASSERT_TYPE_POD1 (_line, _type_##_line); \
-       } HB_STMT_END
-#else
-# define _ASSERT_INSTANCE_POD1(_line, _instance)       typedef int _assertion_on_line_##_line##_not_tested
-#endif
-# define _ASSERT_INSTANCE_POD0(_line, _instance)       _ASSERT_INSTANCE_POD1 (_line, _instance)
-# define ASSERT_INSTANCE_POD(_instance)                        _ASSERT_INSTANCE_POD0 (__LINE__, _instance)
-
-/* Check _assertion in a method environment */
-#define _ASSERT_POD1(_line) \
-       inline void _static_assertion_on_line_##_line (void) const \
-       { _ASSERT_INSTANCE_POD1 (_line, *this); /* Make sure it's POD. */ }
-# define _ASSERT_POD0(_line)   _ASSERT_POD1 (_line)
-# define ASSERT_POD()          _ASSERT_POD0 (__LINE__)
-
-
-
-/* Misc */
-
-
-#if defined(__GNUC__) && (__GNUC__ > 2) && defined(__OPTIMIZE__)
-#define _HB_BOOLEAN_EXPR(expr) ((expr) ? 1 : 0)
-#define likely(expr) (__builtin_expect (_HB_BOOLEAN_EXPR(expr), 1))
-#define unlikely(expr) (__builtin_expect (_HB_BOOLEAN_EXPR(expr), 0))
-#else
-#define likely(expr) (expr)
-#define unlikely(expr) (expr)
-#endif
-
-#ifndef __GNUC__
-#undef __attribute__
-#define __attribute__(x)
-#endif
-
-#if __GNUC__ >= 3
-#define HB_PURE_FUNC   __attribute__((pure))
-#define HB_CONST_FUNC  __attribute__((const))
-#define HB_PRINTF_FUNC(format_idx, arg_idx) __attribute__((__format__ (__printf__, format_idx, arg_idx)))
-#else
-#define HB_PURE_FUNC
-#define HB_CONST_FUNC
-#define HB_PRINTF_FUNC(format_idx, arg_idx)
-#endif
-#if __GNUC__ >= 4
-#define HB_UNUSED      __attribute__((unused))
-#else
-#define HB_UNUSED
-#endif
-
-#ifndef HB_INTERNAL
-# ifndef __MINGW32__
-#  define HB_INTERNAL __attribute__((__visibility__("hidden")))
-# else
-#  define HB_INTERNAL
-# endif
-#endif
-
-
-#if (defined(__WIN32__) && !defined(__WINE__)) || defined(_MSC_VER)
-#define snprintf _snprintf
-#endif
-
-#ifdef _MSC_VER
-#undef inline
-#define inline __inline
-#endif
-
-#ifdef __STRICT_ANSI__
-#undef inline
-#define inline __inline__
-#endif
-
-
-#if __GNUC__ >= 3
-#define HB_FUNC __PRETTY_FUNCTION__
-#elif defined(_MSC_VER)
-#define HB_FUNC __FUNCSIG__
-#else
-#define HB_FUNC __func__
-#endif
-
-
-/* Return the number of 1 bits in mask. */
-static inline HB_CONST_FUNC unsigned int
-_hb_popcount32 (uint32_t mask)
-{
-#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
-  return __builtin_popcount (mask);
-#else
-  /* "HACKMEM 169" */
-  register uint32_t y;
-  y = (mask >> 1) &033333333333;
-  y = mask - y - ((y >>1) & 033333333333);
-  return (((y + (y >> 3)) & 030707070707) % 077);
-#endif
-}
-
-/* Returns the number of bits needed to store number */
-static inline HB_CONST_FUNC unsigned int
-_hb_bit_storage (unsigned int number)
-{
-#if defined(__GNUC__) && (__GNUC__ >= 4) && defined(__OPTIMIZE__)
-  return likely (number) ? (sizeof (unsigned int) * 8 - __builtin_clz (number)) : 0;
-#else
-  register unsigned int n_bits = 0;
-  while (number) {
-    n_bits++;
-    number >>= 1;
-  }
-  return n_bits;
-#endif
-}
-
-/* Returns the number of zero bits in the least significant side of number */
-static inline HB_CONST_FUNC unsigned int
-_hb_ctz (unsigned int number)
-{
-#if defined(__GNUC__) && (__GNUC__ >= 4) && defined(__OPTIMIZE__)
-  return likely (number) ? __builtin_ctz (number) : 0;
-#else
-  register unsigned int n_bits = 0;
-  if (unlikely (!number)) return 0;
-  while (!(number & 1)) {
-    n_bits++;
-    number >>= 1;
-  }
-  return n_bits;
-#endif
-}
-
-static inline bool
-_hb_unsigned_int_mul_overflows (unsigned int count, unsigned int size)
-{
-  return (size > 0) && (count >= ((unsigned int) -1) / size);
-}
-
-
-/* Type of bsearch() / qsort() compare function */
-typedef int (*hb_compare_func_t) (const void *, const void *);
-
-
-
-
-/* arrays and maps */
-
-
-#define HB_PREALLOCED_ARRAY_INIT {0}
-template <typename Type, unsigned int StaticSize>
-struct hb_prealloced_array_t
-{
-  unsigned int len;
-  unsigned int allocated;
-  Type *array;
-  Type static_array[StaticSize];
-
-  void init (void) { memset (this, 0, sizeof (*this)); }
-
-  inline Type& operator [] (unsigned int i) { return array[i]; }
-  inline const Type& operator [] (unsigned int i) const { return array[i]; }
-
-  inline Type *push (void)
-  {
-    if (!array) {
-      array = static_array;
-      allocated = ARRAY_LENGTH (static_array);
-    }
-    if (likely (len < allocated))
-      return &array[len++];
-
-    /* Need to reallocate */
-    unsigned int new_allocated = allocated + (allocated >> 1) + 8;
-    Type *new_array = NULL;
-
-    if (array == static_array) {
-      new_array = (Type *) calloc (new_allocated, sizeof (Type));
-      if (new_array)
-        memcpy (new_array, array, len * sizeof (Type));
-    } else {
-      bool overflows = (new_allocated < allocated) || _hb_unsigned_int_mul_overflows (new_allocated, sizeof (Type));
-      if (likely (!overflows)) {
-       new_array = (Type *) realloc (array, new_allocated * sizeof (Type));
-      }
-    }
-
-    if (unlikely (!new_array))
-      return NULL;
-
-    array = new_array;
-    allocated = new_allocated;
-    return &array[len++];
-  }
-
-  inline void pop (void)
-  {
-    len--;
-    /* TODO: shrink array if needed */
-  }
-
-  inline void shrink (unsigned int l)
-  {
-     if (l < len)
-       len = l;
-    /* TODO: shrink array if needed */
-  }
-
-  template <typename T>
-  inline Type *find (T v) {
-    for (unsigned int i = 0; i < len; i++)
-      if (array[i] == v)
-       return &array[i];
-    return NULL;
-  }
-  template <typename T>
-  inline const Type *find (T v) const {
-    for (unsigned int i = 0; i < len; i++)
-      if (array[i] == v)
-       return &array[i];
-    return NULL;
-  }
-
-  inline void sort (void)
-  {
-    qsort (array, len, sizeof (Type), (hb_compare_func_t) Type::cmp);
-  }
-
-  inline void sort (unsigned int start, unsigned int end)
-  {
-    qsort (array + start, end - start, sizeof (Type), (hb_compare_func_t) Type::cmp);
-  }
-
-  template <typename T>
-  inline Type *bsearch (T *key)
-  {
-    return (Type *) ::bsearch (key, array, len, sizeof (Type), (hb_compare_func_t) Type::cmp);
-  }
-  template <typename T>
-  inline const Type *bsearch (T *key) const
-  {
-    return (const Type *) ::bsearch (key, array, len, sizeof (Type), (hb_compare_func_t) Type::cmp);
-  }
-
-  inline void finish (void)
-  {
-    if (array != static_array)
-      free (array);
-    array = NULL;
-    allocated = len = 0;
-  }
-};
-
-
-#define HB_LOCKABLE_SET_INIT {HB_PREALLOCED_ARRAY_INIT}
-template <typename item_t, typename lock_t>
-struct hb_lockable_set_t
-{
-  hb_prealloced_array_t <item_t, 2> items;
-
-  inline void init (void) { items.init (); }
-
-  template <typename T>
-  inline item_t *replace_or_insert (T v, lock_t &l, bool replace)
-  {
-    l.lock ();
-    item_t *item = items.find (v);
-    if (item) {
-      if (replace) {
-       item_t old = *item;
-       *item = v;
-       l.unlock ();
-       old.finish ();
-      }
-      else {
-        item = NULL;
-       l.unlock ();
-      }
-    } else {
-      item = items.push ();
-      if (likely (item))
-       *item = v;
-      l.unlock ();
-    }
-    return item;
-  }
-
-  template <typename T>
-  inline void remove (T v, lock_t &l)
-  {
-    l.lock ();
-    item_t *item = items.find (v);
-    if (item) {
-      item_t old = *item;
-      *item = items[items.len - 1];
-      items.pop ();
-      l.unlock ();
-      old.finish ();
-    } else {
-      l.unlock ();
-    }
-  }
-
-  template <typename T>
-  inline bool find (T v, item_t *i, lock_t &l)
-  {
-    l.lock ();
-    item_t *item = items.find (v);
-    if (item)
-      *i = *item;
-    l.unlock ();
-    return !!item;
-  }
-
-  template <typename T>
-  inline item_t *find_or_insert (T v, lock_t &l)
-  {
-    l.lock ();
-    item_t *item = items.find (v);
-    if (!item) {
-      item = items.push ();
-      if (likely (item))
-        *item = v;
-    }
-    l.unlock ();
-    return item;
-  }
-
-  inline void finish (lock_t &l)
-  {
-    l.lock ();
-    while (items.len) {
-      item_t old = items[items.len - 1];
-       items.pop ();
-       l.unlock ();
-       old.finish ();
-       l.lock ();
-    }
-    items.finish ();
-    l.unlock ();
-  }
-
-};
-
-
-
-
-/* Big-endian handling */
-
-static inline uint16_t hb_be_uint16 (const uint16_t v)
-{
-  const uint8_t *V = (const uint8_t *) &v;
-  return (uint16_t) (V[0] << 8) + V[1];
-}
-
-/* Note, of the following macros, uint16_get is the one called many many times.
- * If there is any optimizations to be done, it's in that macro.  However, I
- * already confirmed that on my T400 ThinkPad at least, using bswap_16(), which
- * results in a single ror instruction, does NOT speed this up.  In fact, it
- * resulted in a minor slowdown.  At any rate, note that v may not be correctly
- * aligned, so I think the current implementation is optimal.
- */
-
-#define hb_be_uint16_put(v,V)  HB_STMT_START { v[0] = (V>>8); v[1] = (V); } HB_STMT_END
-#define hb_be_uint16_get(v)    (uint16_t) ((v[0] << 8) + v[1])
-#define hb_be_uint16_eq(a,b)   (a[0] == b[0] && a[1] == b[1])
-
-#define hb_be_uint32_put(v,V)  HB_STMT_START { v[0] = (V>>24); v[1] = (V>>16); v[2] = (V>>8); v[3] = (V); } HB_STMT_END
-#define hb_be_uint32_get(v)    (uint32_t) ((v[0] << 24) + (v[1] << 16) + (v[2] << 8) + v[3])
-#define hb_be_uint32_eq(a,b)   (a[0] == b[0] && a[1] == b[1] && a[2] == b[2] && a[3] == b[3])
-
-
-/* ASCII tag/character handling */
-
-static inline unsigned char ISALPHA (unsigned char c)
-{ return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); }
-static inline unsigned char ISALNUM (unsigned char c)
-{ return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9'); }
-static inline unsigned char TOUPPER (unsigned char c)
-{ return (c >= 'a' && c <= 'z') ? c - 'a' + 'A' : c; }
-static inline unsigned char TOLOWER (unsigned char c)
-{ return (c >= 'A' && c <= 'Z') ? c - 'A' + 'a' : c; }
-
-#define HB_TAG_CHAR4(s)   (HB_TAG(((const char *) s)[0], \
-                                 ((const char *) s)[1], \
-                                 ((const char *) s)[2], \
-                                 ((const char *) s)[3]))
-
-
-/* C++ helpers */
-
-/* Makes class uncopyable.  Use in private: section. */
-#define NO_COPY(T) \
-  T (const T &o); \
-  T &operator = (const T &o)
-
-
-/* Debug */
-
-
-#ifndef HB_DEBUG
-#define HB_DEBUG 0
-#endif
-
-static inline bool
-_hb_debug (unsigned int level,
-          unsigned int max_level)
-{
-  return level < max_level;
-}
-
-#define DEBUG_LEVEL(WHAT, LEVEL) (_hb_debug ((LEVEL), HB_DEBUG_##WHAT))
-#define DEBUG(WHAT) (DEBUG_LEVEL (WHAT, 0))
-
-template <int max_level> inline void
-_hb_debug_msg_va (const char *what,
-                 const void *obj,
-                 const char *func,
-                 bool indented,
-                 unsigned int level,
-                 int level_dir,
-                 const char *message,
-                 va_list ap)
-{
-  if (!_hb_debug (level, max_level))
-    return;
-
-  fprintf (stderr, "%-10s", what ? what : "");
-
-  if (obj)
-    fprintf (stderr, "(%0*lx) ", (unsigned int) (2 * sizeof (void *)), (unsigned long) obj);
-  else
-    fprintf (stderr, " %*s  ", (unsigned int) (2 * sizeof (void *)), "");
-
-  if (indented) {
-    static const char bars[] = "││││││││││││││││││││││││││││││││││││││││";
-    fprintf (stderr, "%2d %s├%s",
-            level,
-            bars + sizeof (bars) - 1 - MIN ((unsigned int) sizeof (bars), 3 * level),
-            level_dir ? (level_dir > 0 ? "╮" : "╯") : "╴");
-  } else
-    fprintf (stderr, "   ├╴");
-
-  if (func) {
-    /* If there's a class name, just write that. */
-    const char *dotdot = strstr (func, "::");
-    const char *space = strchr (func, ' ');
-    if (space && dotdot && space < dotdot)
-      func = space + 1;
-    unsigned int func_len = dotdot ? dotdot - func : strlen (func);
-    fprintf (stderr, "%.*s: ", func_len, func);
-  }
-
-  if (message)
-    vfprintf (stderr, message, ap);
-
-  fprintf (stderr, "\n");
-}
-template <> inline void
-_hb_debug_msg_va<0> (const char *what HB_UNUSED,
-                    const void *obj HB_UNUSED,
-                    const char *func HB_UNUSED,
-                    bool indented HB_UNUSED,
-                    unsigned int level HB_UNUSED,
-                    int level_dir HB_UNUSED,
-                    const char *message HB_UNUSED,
-                    va_list ap HB_UNUSED) {}
-
-template <int max_level> inline void
-_hb_debug_msg (const char *what,
-              const void *obj,
-              const char *func,
-              bool indented,
-              unsigned int level,
-              int level_dir,
-              const char *message,
-              ...) HB_PRINTF_FUNC(7, 8);
-template <int max_level> inline void
-_hb_debug_msg (const char *what,
-              const void *obj,
-              const char *func,
-              bool indented,
-              unsigned int level,
-              int level_dir,
-              const char *message,
-              ...)
-{
-  va_list ap;
-  va_start (ap, message);
-  _hb_debug_msg_va<max_level> (what, obj, func, indented, level, level_dir, message, ap);
-  va_end (ap);
-}
-template <> inline void
-_hb_debug_msg<0> (const char *what HB_UNUSED,
-                 const void *obj HB_UNUSED,
-                 const char *func HB_UNUSED,
-                 bool indented HB_UNUSED,
-                 unsigned int level HB_UNUSED,
-                 int level_dir HB_UNUSED,
-                 const char *message HB_UNUSED,
-                 ...) HB_PRINTF_FUNC(7, 8);
-template <> inline void
-_hb_debug_msg<0> (const char *what HB_UNUSED,
-                 const void *obj HB_UNUSED,
-                 const char *func HB_UNUSED,
-                 bool indented HB_UNUSED,
-                 unsigned int level HB_UNUSED,
-                 int level_dir HB_UNUSED,
-                 const char *message HB_UNUSED,
-                 ...) {}
-
-#define DEBUG_MSG_LEVEL(WHAT, OBJ, LEVEL, LEVEL_DIR, ...)      _hb_debug_msg<HB_DEBUG_##WHAT> (#WHAT, (OBJ), NULL,    true, (LEVEL), (LEVEL_DIR), __VA_ARGS__)
-#define DEBUG_MSG(WHAT, OBJ, ...)                              _hb_debug_msg<HB_DEBUG_##WHAT> (#WHAT, (OBJ), NULL,    false, 0, 0, __VA_ARGS__)
-#define DEBUG_MSG_FUNC(WHAT, OBJ, ...)                         _hb_debug_msg<HB_DEBUG_##WHAT> (#WHAT, (OBJ), HB_FUNC, false, 0, 0, __VA_ARGS__)
-
-
-/*
- * Trace
- */
-
-template <int max_level>
-struct hb_auto_trace_t {
-  explicit inline hb_auto_trace_t (unsigned int *plevel_,
-                                  const char *what_,
-                                  const void *obj_,
-                                  const char *func,
-                                  const char *message,
-                                  ...) : plevel (plevel_), what (what_), obj (obj_), returned (false)
-  {
-    if (plevel) ++*plevel;
-
-    va_list ap;
-    va_start (ap, message);
-    _hb_debug_msg_va<max_level> (what, obj, func, true, plevel ? *plevel : 0, +1, message, ap);
-    va_end (ap);
-  }
-  inline ~hb_auto_trace_t (void)
-  {
-    if (unlikely (!returned)) {
-      fprintf (stderr, "OUCH, returned with no call to TRACE_RETURN.  This is a bug, please report.  Level was %d.\n", plevel ? *plevel : -1);
-      _hb_debug_msg<max_level> (what, obj, NULL, true, plevel ? *plevel : 1, -1, " ");
-      return;
-    }
-
-    if (plevel) --*plevel;
-  }
-
-  inline bool ret (bool v)
-  {
-    if (unlikely (returned)) {
-      fprintf (stderr, "OUCH, double calls to TRACE_RETURN.  This is a bug, please report.\n");
-      return v;
-    }
-
-    _hb_debug_msg<max_level> (what, obj, NULL, true, plevel ? *plevel : 1, -1, "return %s", v ? "true" : "false");
-    if (plevel) --*plevel;
-    plevel = NULL;
-    returned = true;
-    return v;
-  }
-
-  private:
-  unsigned int *plevel;
-  bool returned;
-  const char *what;
-  const void *obj;
-};
-template <> /* Optimize when tracing is disabled */
-struct hb_auto_trace_t<0> {
-  explicit inline hb_auto_trace_t (unsigned int *plevel_ HB_UNUSED,
-                                  const char *what HB_UNUSED,
-                                  const void *obj HB_UNUSED,
-                                  const char *func HB_UNUSED,
-                                  const char *message HB_UNUSED,
-                                  ...) {}
-
-  template <typename T>
-  inline T ret (T v) { return v; }
-};
-
-#define TRACE_RETURN(RET) trace.ret (RET)
-
-/* Misc */
-
-
-/* Pre-mature optimization:
- * Checks for lo <= u <= hi but with an optimization if lo and hi
- * are only different in a contiguous set of lower-most bits.
- */
-template <typename T> inline bool
-hb_in_range (T u, T lo, T hi)
-{
-  if ( ((lo^hi) & lo) == 0 &&
-       ((lo^hi) & hi) == (lo^hi) &&
-       ((lo^hi) & ((lo^hi) + 1)) == 0 )
-    return (u & ~(lo^hi)) == lo;
-  else
-    return lo <= u && u <= hi;
-}
-
-
-/* Useful for set-operations on small enums.
- * For example, for testing "x ∈ {x1, x2, x3}" use:
- * (FLAG(x) & (FLAG(x1) | FLAG(x2) | FLAG(x3)))
- */
-#define FLAG(x) (1<<(x))
-
-
-template <typename T> inline void
-hb_bubble_sort (T *array, unsigned int len, int(*compar)(const T *, const T *))
-{
-  if (unlikely (!len))
-    return;
-
-  unsigned int k = len - 1;
-  do {
-    unsigned int new_k = 0;
-
-    for (unsigned int j = 0; j < k; j++)
-      if (compar (&array[j], &array[j+1]) > 0) {
-        T t;
-       t = array[j];
-       array[j] = array[j + 1];
-       array[j + 1] = t;
-
-       new_k = j;
-      }
-    k = new_k;
-  } while (k);
-}
-
-
-
-
-#endif /* HB_PRIVATE_HH */
diff --git a/src/hb-set-private.hh b/src/hb-set-private.hh
deleted file mode 100644 (file)
index 5cdf8a0..0000000
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Copyright © 2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_SET_PRIVATE_HH
-#define HB_SET_PRIVATE_HH
-
-#include "hb-private.hh"
-#include "hb-set.h"
-#include "hb-object-private.hh"
-
-
-/* TODO Make this faster and memmory efficient. */
-
-struct _hb_set_t
-{
-  hb_object_header_t header;
-  ASSERT_POD ();
-
-  inline void init (void) {
-    header.init ();
-    clear ();
-  }
-  inline void fini (void) {
-  }
-  inline void clear (void) {
-    memset (elts, 0, sizeof elts);
-  }
-  inline bool empty (void) const {
-    for (unsigned int i = 0; i < ARRAY_LENGTH (elts); i++)
-      if (elts[i])
-        return false;
-    return true;
-  }
-  inline void add (hb_codepoint_t g)
-  {
-    if (unlikely (g == SENTINEL)) return;
-    if (unlikely (g > MAX_G)) return;
-    elt (g) |= mask (g);
-  }
-  inline void del (hb_codepoint_t g)
-  {
-    if (unlikely (g > MAX_G)) return;
-    elt (g) &= ~mask (g);
-  }
-  inline bool has (hb_codepoint_t g) const
-  {
-    if (unlikely (g > MAX_G)) return false;
-    return !!(elt (g) & mask (g));
-  }
-  inline bool intersects (hb_codepoint_t first,
-                         hb_codepoint_t last) const
-  {
-    if (unlikely (first > MAX_G)) return false;
-    if (unlikely (last  > MAX_G)) last = MAX_G;
-    unsigned int end = last + 1;
-    for (hb_codepoint_t i = first; i < end; i++)
-      if (has (i))
-        return true;
-    return false;
-  }
-  inline bool equal (const hb_set_t *other) const
-  {
-    for (unsigned int i = 0; i < ELTS; i++)
-      if (elts[i] != other->elts[i])
-        return false;
-    return true;
-  }
-  inline void set (const hb_set_t *other)
-  {
-    for (unsigned int i = 0; i < ELTS; i++)
-      elts[i] = other->elts[i];
-  }
-  inline void union_ (const hb_set_t *other)
-  {
-    for (unsigned int i = 0; i < ELTS; i++)
-      elts[i] |= other->elts[i];
-  }
-  inline void intersect (const hb_set_t *other)
-  {
-    for (unsigned int i = 0; i < ELTS; i++)
-      elts[i] &= other->elts[i];
-  }
-  inline void subtract (const hb_set_t *other)
-  {
-    for (unsigned int i = 0; i < ELTS; i++)
-      elts[i] &= ~other->elts[i];
-  }
-  inline void symmetric_difference (const hb_set_t *other)
-  {
-    for (unsigned int i = 0; i < ELTS; i++)
-      elts[i] ^= other->elts[i];
-  }
-  inline bool next (hb_codepoint_t *codepoint)
-  {
-    if (unlikely (*codepoint == SENTINEL)) {
-      hb_codepoint_t i = get_min ();
-      if (i != SENTINEL) {
-        *codepoint = i;
-       return true;
-      } else
-        return false;
-    }
-    for (hb_codepoint_t i = *codepoint + 1; i < MAX_G + 1; i++)
-      if (has (i)) {
-        *codepoint = i;
-       return true;
-      }
-    return false;
-  }
-  inline hb_codepoint_t get_min (void) const
-  {
-    for (unsigned int i = 0; i < ELTS; i++)
-      if (elts[i])
-       for (unsigned int j = 0; i < BITS; j++)
-         if (elts[i] & (1 << j))
-           return i * BITS + j;
-    return SENTINEL;
-  }
-  inline hb_codepoint_t get_max (void) const
-  {
-    for (unsigned int i = ELTS; i; i--)
-      if (elts[i - 1])
-       for (unsigned int j = BITS; j; j--)
-         if (elts[i - 1] & (1 << (j - 1)))
-           return (i - 1) * BITS + (j - 1);
-    return SENTINEL;
-  }
-
-  typedef uint32_t elt_t;
-  static const unsigned int MAX_G = 65536 - 1; /* XXX Fix this... */
-  static const unsigned int SHIFT = 5;
-  static const unsigned int BITS = (1 << SHIFT);
-  static const unsigned int MASK = BITS - 1;
-  static const unsigned int ELTS = (MAX_G + 1 + (BITS - 1)) / BITS;
-  static  const hb_codepoint_t SENTINEL = (hb_codepoint_t) -1;
-
-  elt_t &elt (hb_codepoint_t g) { return elts[g >> SHIFT]; }
-  elt_t elt (hb_codepoint_t g) const { return elts[g >> SHIFT]; }
-  elt_t mask (hb_codepoint_t g) const { return elt_t (1) << (g & MASK); }
-
-  elt_t elts[ELTS]; /* XXX 8kb */
-
-  ASSERT_STATIC (sizeof (elt_t) * 8 == BITS);
-  ASSERT_STATIC (sizeof (elt_t) * 8 * ELTS > MAX_G);
-};
-
-
-
-#endif /* HB_SET_PRIVATE_HH */
diff --git a/src/hb-set.cc b/src/hb-set.cc
deleted file mode 100644 (file)
index 4225e3c..0000000
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * Copyright © 2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "hb-set-private.hh"
-
-
-
-/* Public API */
-
-
-hb_set_t *
-hb_set_create ()
-{
-  hb_set_t *set;
-
-  if (!(set = hb_object_create<hb_set_t> ()))
-    return hb_set_get_empty ();
-
-  set->clear ();
-
-  return set;
-}
-
-hb_set_t *
-hb_set_get_empty (void)
-{
-  static const hb_set_t _hb_set_nil = {
-    HB_OBJECT_HEADER_STATIC,
-
-    {0} /* elts */
-  };
-
-  return const_cast<hb_set_t *> (&_hb_set_nil);
-}
-
-hb_set_t *
-hb_set_reference (hb_set_t *set)
-{
-  return hb_object_reference (set);
-}
-
-void
-hb_set_destroy (hb_set_t *set)
-{
-  if (!hb_object_destroy (set)) return;
-
-  set->fini ();
-
-  free (set);
-}
-
-hb_bool_t
-hb_set_set_user_data (hb_set_t        *set,
-                        hb_user_data_key_t *key,
-                        void *              data,
-                        hb_destroy_func_t   destroy,
-                        hb_bool_t           replace)
-{
-  return hb_object_set_user_data (set, key, data, destroy, replace);
-}
-
-void *
-hb_set_get_user_data (hb_set_t        *set,
-                        hb_user_data_key_t *key)
-{
-  return hb_object_get_user_data (set, key);
-}
-
-
-hb_bool_t
-hb_set_allocation_successful (hb_set_t  *set HB_UNUSED)
-{
-  return true;
-}
-
-void
-hb_set_clear (hb_set_t *set)
-{
-  set->clear ();
-}
-
-hb_bool_t
-hb_set_empty (hb_set_t *set)
-{
-  return set->empty ();
-}
-
-hb_bool_t
-hb_set_has (hb_set_t       *set,
-           hb_codepoint_t  codepoint)
-{
-  return set->has (codepoint);
-}
-
-void
-hb_set_add (hb_set_t       *set,
-           hb_codepoint_t  codepoint)
-{
-  set->add (codepoint);
-}
-
-void
-hb_set_del (hb_set_t       *set,
-           hb_codepoint_t  codepoint)
-{
-  set->del (codepoint);
-}
-
-hb_bool_t
-hb_set_equal (hb_set_t *set,
-             hb_set_t *other)
-{
-  return set->equal (other);
-}
-
-void
-hb_set_set (hb_set_t *set,
-           hb_set_t *other)
-{
-  set->set (other);
-}
-
-void
-hb_set_union (hb_set_t *set,
-             hb_set_t *other)
-{
-  set->union_ (other);
-}
-
-void
-hb_set_intersect (hb_set_t *set,
-                 hb_set_t *other)
-{
-  set->intersect (other);
-}
-
-void
-hb_set_subtract (hb_set_t *set,
-                hb_set_t *other)
-{
-  set->subtract (other);
-}
-
-void
-hb_set_symmetric_difference (hb_set_t *set,
-                            hb_set_t *other)
-{
-  set->symmetric_difference (other);
-}
-
-hb_codepoint_t
-hb_set_min (hb_set_t *set)
-{
-  return set->get_min ();
-}
-
-hb_codepoint_t
-hb_set_max (hb_set_t *set)
-{
-  return set->get_max ();
-}
-
-hb_bool_t
-hb_set_next (hb_set_t       *set,
-            hb_codepoint_t *codepoint)
-{
-  return set->next (codepoint);
-}
diff --git a/src/hb-set.h b/src/hb-set.h
deleted file mode 100644 (file)
index 9f849cf..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Copyright © 2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_H_IN
-#error "Include <hb.h> instead."
-#endif
-
-#ifndef HB_SET_H
-#define HB_SET_H
-
-#include "hb-common.h"
-
-HB_BEGIN_DECLS
-
-
-typedef struct _hb_set_t hb_set_t;
-
-
-hb_set_t *
-hb_set_create (void);
-
-hb_set_t *
-hb_set_get_empty (void);
-
-hb_set_t *
-hb_set_reference (hb_set_t *set);
-
-void
-hb_set_destroy (hb_set_t *set);
-
-hb_bool_t
-hb_set_set_user_data (hb_set_t           *set,
-                     hb_user_data_key_t *key,
-                     void *              data,
-                     hb_destroy_func_t   destroy,
-                     hb_bool_t           replace);
-
-void *
-hb_set_get_user_data (hb_set_t           *set,
-                     hb_user_data_key_t *key);
-
-
-/* Returns false if allocation has failed before */
-hb_bool_t
-hb_set_allocation_successful (hb_set_t  *set);
-
-void
-hb_set_clear (hb_set_t *set);
-
-hb_bool_t
-hb_set_empty (hb_set_t *set);
-
-hb_bool_t
-hb_set_has (hb_set_t       *set,
-           hb_codepoint_t  codepoint);
-
-/* Right now limited to 16-bit integers.  Eventually will do full codepoint range, sans -1
- * which we will use as a sentinel. */
-void
-hb_set_add (hb_set_t       *set,
-           hb_codepoint_t  codepoint);
-
-void
-hb_set_del (hb_set_t       *set,
-           hb_codepoint_t  codepoint);
-
-hb_bool_t
-hb_set_equal (hb_set_t *set,
-             hb_set_t *other);
-
-void
-hb_set_set (hb_set_t *set,
-           hb_set_t *other);
-
-void
-hb_set_union (hb_set_t *set,
-             hb_set_t *other);
-
-void
-hb_set_intersect (hb_set_t *set,
-                 hb_set_t *other);
-
-void
-hb_set_subtract (hb_set_t *set,
-                hb_set_t *other);
-
-void
-hb_set_symmetric_difference (hb_set_t *set,
-                            hb_set_t *other);
-
-/* Returns -1 if set empty. */
-hb_codepoint_t
-hb_set_min (hb_set_t *set);
-
-/* Returns -1 if set empty. */
-hb_codepoint_t
-hb_set_max (hb_set_t *set);
-
-/* Pass -1 in to get started. */
-hb_bool_t
-hb_set_next (hb_set_t       *set,
-            hb_codepoint_t *codepoint);
-
-/* TODO: Add faster iteration API? */
-
-
-HB_END_DECLS
-
-#endif /* HB_SET_H */
diff --git a/src/hb-shape.cc b/src/hb-shape.cc
deleted file mode 100644 (file)
index 163a5bf..0000000
+++ /dev/null
@@ -1,217 +0,0 @@
-/*
- * Copyright © 2009  Red Hat, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Behdad Esfahbod
- */
-
-#include "hb-private.hh"
-
-#include "hb-shape.h"
-
-#include "hb-buffer-private.hh"
-
-#ifdef HAVE_GRAPHITE
-#include "hb-graphite2-private.hh"
-#endif
-#ifdef HAVE_UNISCRIBE
-# include "hb-uniscribe-private.hh"
-#endif
-#ifdef HAVE_OT
-# include "hb-ot-shape-private.hh"
-#endif
-#include "hb-fallback-shape-private.hh"
-
-typedef hb_bool_t (*hb_shape_func_t) (hb_font_t          *font,
-                                     hb_buffer_t        *buffer,
-                                     const hb_feature_t *features,
-                                     unsigned int        num_features);
-
-#define HB_SHAPER_IMPLEMENT(name) {#name, _hb_##name##_shape}
-static const struct hb_shaper_pair_t {
-  char name[16];
-  hb_shape_func_t func;
-} all_shapers[] = {
-  /* v--- Add new shapers in the right place here */
-#ifdef HAVE_GRAPHITE
-  HB_SHAPER_IMPLEMENT (graphite2),
-#endif
-#ifdef HAVE_UNISCRIBE
-  HB_SHAPER_IMPLEMENT (uniscribe),
-#endif
-#ifdef HAVE_OT
-  HB_SHAPER_IMPLEMENT (ot),
-#endif
-  HB_SHAPER_IMPLEMENT (fallback) /* should be last */
-};
-#undef HB_SHAPER_IMPLEMENT
-
-
-/* Thread-safe, lock-free, shapers */
-
-static hb_shaper_pair_t *static_shapers;
-
-static
-void free_static_shapers (void)
-{
-  if (unlikely (static_shapers != all_shapers))
-    free (static_shapers);
-}
-
-static const hb_shaper_pair_t *
-get_shapers (void)
-{
-retry:
-  hb_shaper_pair_t *shapers = (hb_shaper_pair_t *) hb_atomic_ptr_get (&static_shapers);
-
-  if (unlikely (!shapers))
-  {
-    char *env = getenv ("HB_SHAPER_LIST");
-    if (!env || !*env) {
-      hb_atomic_ptr_cmpexch (&static_shapers, NULL, (const hb_shaper_pair_t *) all_shapers);
-      return (const hb_shaper_pair_t *) all_shapers;
-    }
-
-    /* Not found; allocate one. */
-    shapers = (hb_shaper_pair_t *) malloc (sizeof (all_shapers));
-    if (unlikely (!shapers))
-      return (const hb_shaper_pair_t *) all_shapers;
-     memcpy (shapers, all_shapers, sizeof (all_shapers));
-
-     /* Reorder shaper list to prefer requested shapers. */
-    unsigned int i = 0;
-    char *end, *p = env;
-    for (;;) {
-      end = strchr (p, ',');
-      if (!end)
-       end = p + strlen (p);
-
-      for (unsigned int j = i; j < ARRAY_LENGTH (all_shapers); j++)
-       if (end - p == (int) strlen (shapers[j].name) &&
-           0 == strncmp (shapers[j].name, p, end - p))
-       {
-         /* Reorder this shaper to position i */
-        struct hb_shaper_pair_t t = shapers[j];
-        memmove (&shapers[i + 1], &shapers[i], sizeof (shapers[i]) * (j - i));
-        shapers[i] = t;
-        i++;
-       }
-
-      if (!*end)
-       break;
-      else
-       p = end + 1;
-    }
-
-    if (!hb_atomic_ptr_cmpexch (&static_shapers, NULL, shapers)) {
-      free (shapers);
-      goto retry;
-    }
-
-#ifdef HAVE_ATEXIT
-    atexit (free_static_shapers); /* First person registers atexit() callback. */
-#endif
-  }
-
-  return shapers;
-}
-
-
-static const char **static_shaper_list;
-
-static
-void free_static_shaper_list (void)
-{
-  free (static_shaper_list);
-}
-
-const char **
-hb_shape_list_shapers (void)
-{
-retry:
-  const char **shaper_list = (const char **) hb_atomic_ptr_get (&static_shaper_list);
-
-  if (unlikely (!shaper_list))
-  {
-    /* Not found; allocate one. */
-    shaper_list = (const char **) calloc (1 + ARRAY_LENGTH (all_shapers), sizeof (const char *));
-    if (unlikely (!shaper_list)) {
-      static const char *nil_shaper_list[] = {NULL};
-      return nil_shaper_list;
-    }
-
-    const hb_shaper_pair_t *shapers = get_shapers ();
-    unsigned int i;
-    for (i = 0; i < ARRAY_LENGTH (all_shapers); i++)
-      shaper_list[i] = shapers[i].name;
-    shaper_list[i] = NULL;
-
-    if (!hb_atomic_ptr_cmpexch (&static_shaper_list, NULL, shaper_list)) {
-      free (shaper_list);
-      goto retry;
-    }
-
-#ifdef HAVE_ATEXIT
-    atexit (free_static_shaper_list); /* First person registers atexit() callback. */
-#endif
-  }
-
-  return shaper_list;
-}
-
-
-hb_bool_t
-hb_shape_full (hb_font_t          *font,
-              hb_buffer_t        *buffer,
-              const hb_feature_t *features,
-              unsigned int        num_features,
-              const char * const *shaper_list)
-{
-  hb_font_make_immutable (font); /* So we can safely cache stuff on it */
-
-  if (likely (!shaper_list)) {
-    const hb_shaper_pair_t *shapers = get_shapers ();
-    for (unsigned int i = 0; i < ARRAY_LENGTH (all_shapers); i++)
-      if (likely (shapers[i].func (font, buffer, features, num_features)))
-        return true;
-  } else {
-    while (*shaper_list) {
-      for (unsigned int i = 0; i < ARRAY_LENGTH (all_shapers); i++)
-       if (0 == strcmp (*shaper_list, all_shapers[i].name)) {
-         if (likely (all_shapers[i].func (font, buffer, features, num_features)))
-           return true;
-         break;
-       }
-      shaper_list++;
-    }
-  }
-  return false;
-}
-
-void
-hb_shape (hb_font_t           *font,
-         hb_buffer_t         *buffer,
-         const hb_feature_t  *features,
-         unsigned int         num_features)
-{
-  hb_shape_full (font, buffer, features, num_features, NULL);
-}
diff --git a/src/hb-shape.h b/src/hb-shape.h
deleted file mode 100644 (file)
index 1a0d6cf..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright © 2009  Red Hat, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_H_IN
-#error "Include <hb.h> instead."
-#endif
-
-#ifndef HB_SHAPE_H
-#define HB_SHAPE_H
-
-#include "hb-common.h"
-#include "hb-buffer.h"
-#include "hb-font.h"
-
-HB_BEGIN_DECLS
-
-
-typedef struct _hb_feature_t {
-  hb_tag_t      tag;
-  uint32_t      value;
-  unsigned int  start;
-  unsigned int  end;
-} hb_feature_t;
-
-
-void
-hb_shape (hb_font_t           *font,
-         hb_buffer_t         *buffer,
-         const hb_feature_t  *features,
-         unsigned int         num_features);
-
-hb_bool_t
-hb_shape_full (hb_font_t          *font,
-              hb_buffer_t        *buffer,
-              const hb_feature_t *features,
-              unsigned int        num_features,
-              const char * const *shaper_list);
-
-const char **
-hb_shape_list_shapers (void);
-
-
-HB_END_DECLS
-
-#endif /* HB_SHAPE_H */
diff --git a/src/hb-tt-font.cc b/src/hb-tt-font.cc
deleted file mode 100644 (file)
index 0055ae9..0000000
+++ /dev/null
@@ -1,243 +0,0 @@
-/*
- * Copyright © 2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "hb-font-private.hh" /* Shall be first since may include windows.h */
-
-#include "hb-open-type-private.hh"
-
-#include "hb-ot-hhea-table.hh"
-#include "hb-ot-hmtx-table.hh"
-
-#include "hb-blob.h"
-
-#include <string.h>
-
-
-
-#if 0
-struct hb_tt_font_t
-{
-  const struct hhea *hhea;
-  hb_blob_t *hhea_blob;
-};
-
-
-static hb_tt_font_t *
-_hb_tt_font_create (hb_font_t *font)
-{
-  /* TODO Remove this object altogether */
-  hb_tt_font_t *tt = (hb_tt_font_t *) calloc (1, sizeof (hb_tt_font_t));
-
-  tt->hhea_blob = Sanitizer<hhea>::sanitize (hb_face_reference_table (font->face, HB_OT_TAG_hhea));
-  tt->hhea = Sanitizer<hhea>::lock_instance (tt->hhea_blob);
-
-  return tt;
-}
-
-static void
-_hb_tt_font_destroy (hb_tt_font_t *tt)
-{
-  hb_blob_destroy (tt->hhea_blob);
-
-  free (tt);
-}
-
-static inline const hhea&
-_get_hhea (hb_face_t *face)
-{
-//  return likely (face->tt && face->tt->hhea) ? *face->tt->hhea : Null(hhea);
-}
-
-
-/*
- * hb_tt_font_funcs_t
- */
-
-static hb_bool_t
-hb_font_get_glyph_nil (hb_font_t *font HB_UNUSED,
-                      void *font_data HB_UNUSED,
-                      hb_codepoint_t unicode,
-                      hb_codepoint_t variation_selector,
-                      hb_codepoint_t *glyph,
-                      void *user_data HB_UNUSED)
-{
-  if (font->parent)
-    return hb_font_get_glyph (font->parent, unicode, variation_selector, glyph);
-
-  *glyph = 0;
-  return false;
-}
-
-static hb_position_t
-hb_font_get_glyph_h_advance_nil (hb_font_t *font HB_UNUSED,
-                                void *font_data HB_UNUSED,
-                                hb_codepoint_t glyph,
-                                void *user_data HB_UNUSED)
-{
-  if (font->parent)
-    return font->parent_scale_x_distance (hb_font_get_glyph_h_advance (font->parent, glyph));
-
-  return font->x_scale;
-}
-
-static hb_position_t
-hb_font_get_glyph_v_advance_nil (hb_font_t *font HB_UNUSED,
-                                void *font_data HB_UNUSED,
-                                hb_codepoint_t glyph,
-                                void *user_data HB_UNUSED)
-{
-  if (font->parent)
-    return font->parent_scale_y_distance (hb_font_get_glyph_v_advance (font->parent, glyph));
-
-  return font->y_scale;
-}
-
-static hb_bool_t
-hb_font_get_glyph_h_origin_nil (hb_font_t *font HB_UNUSED,
-                               void *font_data HB_UNUSED,
-                               hb_codepoint_t glyph,
-                               hb_position_t *x,
-                               hb_position_t *y,
-                               void *user_data HB_UNUSED)
-{
-  if (font->parent) {
-    hb_bool_t ret = hb_font_get_glyph_h_origin (font->parent,
-                                               glyph,
-                                               x, y);
-    if (ret)
-      font->parent_scale_position (x, y);
-    return ret;
-  }
-
-  *x = *y = 0;
-  return false;
-}
-
-static hb_bool_t
-hb_font_get_glyph_v_origin_nil (hb_font_t *font HB_UNUSED,
-                               void *font_data HB_UNUSED,
-                               hb_codepoint_t glyph,
-                               hb_position_t *x,
-                               hb_position_t *y,
-                               void *user_data HB_UNUSED)
-{
-  if (font->parent) {
-    hb_bool_t ret = hb_font_get_glyph_v_origin (font->parent,
-                                               glyph,
-                                               x, y);
-    if (ret)
-      font->parent_scale_position (x, y);
-    return ret;
-  }
-
-  *x = *y = 0;
-  return false;
-}
-
-static hb_position_t
-hb_font_get_glyph_h_kerning_nil (hb_font_t *font HB_UNUSED,
-                                void *font_data HB_UNUSED,
-                                hb_codepoint_t left_glyph,
-                                hb_codepoint_t right_glyph,
-                                void *user_data HB_UNUSED)
-{
-  if (font->parent)
-    return font->parent_scale_x_distance (hb_font_get_glyph_h_kerning (font->parent, left_glyph, right_glyph));
-
-  return 0;
-}
-
-static hb_position_t
-hb_font_get_glyph_v_kerning_nil (hb_font_t *font HB_UNUSED,
-                                void *font_data HB_UNUSED,
-                                hb_codepoint_t top_glyph,
-                                hb_codepoint_t bottom_glyph,
-                                void *user_data HB_UNUSED)
-{
-  if (font->parent)
-    return font->parent_scale_y_distance (hb_font_get_glyph_v_kerning (font->parent, top_glyph, bottom_glyph));
-
-  return 0;
-}
-
-static hb_bool_t
-hb_font_get_glyph_extents_nil (hb_font_t *font HB_UNUSED,
-                              void *font_data HB_UNUSED,
-                              hb_codepoint_t glyph,
-                              hb_glyph_extents_t *extents,
-                              void *user_data HB_UNUSED)
-{
-  if (font->parent) {
-    hb_bool_t ret = hb_font_get_glyph_extents (font->parent,
-                                              glyph,
-                                              extents);
-    if (ret) {
-      font->parent_scale_position (&extents->x_bearing, &extents->y_bearing);
-      font->parent_scale_distance (&extents->width, &extents->height);
-    }
-    return ret;
-  }
-
-  memset (extents, 0, sizeof (*extents));
-  return false;
-}
-
-static hb_bool_t
-hb_font_get_glyph_contour_point_nil (hb_font_t *font HB_UNUSED,
-                                    void *font_data HB_UNUSED,
-                                    hb_codepoint_t glyph,
-                                    unsigned int point_index,
-                                    hb_position_t *x,
-                                    hb_position_t *y,
-                                    void *user_data HB_UNUSED)
-{
-  if (font->parent) {
-    hb_bool_t ret = hb_font_get_glyph_contour_point (font->parent,
-                                                    glyph, point_index,
-                                                    x, y);
-    if (ret)
-      font->parent_scale_position (x, y);
-    return ret;
-  }
-
-  *x = *y = 0;
-  return false;
-}
-
-
-static hb_font_funcs_t _hb_font_funcs_nil = {
-  HB_OBJECT_HEADER_STATIC,
-
-  true, /* immutable */
-
-  {
-#define HB_FONT_FUNC_IMPLEMENT(name) hb_font_get_##name##_nil,
-    HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
-#undef HB_FONT_FUNC_IMPLEMENT
-  }
-};
-#endif
-
diff --git a/src/hb-unicode-private.hh b/src/hb-unicode-private.hh
deleted file mode 100644 (file)
index fd1fd44..0000000
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Copyright © 2009  Red Hat, Inc.
- * Copyright © 2011  Codethink Limited
- * Copyright © 2010,2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Behdad Esfahbod
- * Codethink Author(s): Ryan Lortie
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_UNICODE_PRIVATE_HH
-#define HB_UNICODE_PRIVATE_HH
-
-#include "hb-private.hh"
-
-#include "hb-unicode.h"
-#include "hb-object-private.hh"
-
-
-
-/*
- * hb_unicode_funcs_t
- */
-
-#define HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS \
-  HB_UNICODE_FUNC_IMPLEMENT (combining_class) \
-  HB_UNICODE_FUNC_IMPLEMENT (eastasian_width) \
-  HB_UNICODE_FUNC_IMPLEMENT (general_category) \
-  HB_UNICODE_FUNC_IMPLEMENT (mirroring) \
-  HB_UNICODE_FUNC_IMPLEMENT (script) \
-  HB_UNICODE_FUNC_IMPLEMENT (compose) \
-  HB_UNICODE_FUNC_IMPLEMENT (decompose) \
-  /* ^--- Add new callbacks here */
-
-/* Simple callbacks are those taking a hb_codepoint_t and returning a hb_codepoint_t */
-#define HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS_SIMPLE \
-  HB_UNICODE_FUNC_IMPLEMENT (unsigned int, combining_class) \
-  HB_UNICODE_FUNC_IMPLEMENT (unsigned int, eastasian_width) \
-  HB_UNICODE_FUNC_IMPLEMENT (hb_unicode_general_category_t, general_category) \
-  HB_UNICODE_FUNC_IMPLEMENT (hb_codepoint_t, mirroring) \
-  HB_UNICODE_FUNC_IMPLEMENT (hb_script_t, script) \
-  /* ^--- Add new simple callbacks here */
-
-struct _hb_unicode_funcs_t {
-  hb_object_header_t header;
-  ASSERT_POD ();
-
-  hb_unicode_funcs_t *parent;
-
-  bool immutable;
-
-  /* Don't access these directly.  Call hb_unicode_*() instead. */
-
-  struct {
-#define HB_UNICODE_FUNC_IMPLEMENT(name) hb_unicode_##name##_func_t name;
-    HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS
-#undef HB_UNICODE_FUNC_IMPLEMENT
-  } func;
-
-  struct {
-#define HB_UNICODE_FUNC_IMPLEMENT(name) void *name;
-    HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS
-#undef HB_UNICODE_FUNC_IMPLEMENT
-  } user_data;
-
-  struct {
-#define HB_UNICODE_FUNC_IMPLEMENT(name) hb_destroy_func_t name;
-    HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS
-#undef HB_UNICODE_FUNC_IMPLEMENT
-  } destroy;
-};
-
-
-#ifdef HAVE_GLIB
-extern HB_INTERNAL const hb_unicode_funcs_t _hb_glib_unicode_funcs;
-#define _hb_unicode_funcs_default _hb_glib_unicode_funcs
-#elif defined(HAVE_ICU)
-extern HB_INTERNAL const hb_unicode_funcs_t _hb_icu_unicode_funcs;
-#define _hb_unicode_funcs_default _hb_icu_unicode_funcs
-#else
-#define HB_UNICODE_FUNCS_NIL 1
-extern HB_INTERNAL const hb_unicode_funcs_t _hb_unicode_funcs_nil;
-#define _hb_unicode_funcs_default _hb_unicode_funcs_nil
-#endif
-
-
-HB_INTERNAL unsigned int
-_hb_unicode_modified_combining_class (hb_unicode_funcs_t *ufuncs,
-                                     hb_codepoint_t      unicode);
-
-static inline hb_bool_t
-_hb_unicode_is_variation_selector (hb_codepoint_t unicode)
-{
-  return unlikely ((unicode >=  0x180B && unicode <=  0x180D) || /* MONGOLIAN FREE VARIATION SELECTOR ONE..THREE */
-                  (unicode >=  0xFE00 && unicode <=  0xFE0F) || /* VARIATION SELECTOR-1..16 */
-                  (unicode >= 0xE0100 && unicode <= 0xE01EF));  /* VARIATION SELECTOR-17..256 */
-}
-
-/* Zero-Width invisible characters:
- *
- *  00AD  SOFT HYPHEN
- *  034F  COMBINING GRAPHEME JOINER
- *
- *  200B  ZERO WIDTH SPACE
- *  200C  ZERO WIDTH NON-JOINER
- *  200D  ZERO WIDTH JOINER
- *  200E  LEFT-TO-RIGHT MARK
- *  200F  RIGHT-TO-LEFT MARK
- *
- *  2028  LINE SEPARATOR
- *
- *  202A  LEFT-TO-RIGHT EMBEDDING
- *  202B  RIGHT-TO-LEFT EMBEDDING
- *  202C  POP DIRECTIONAL FORMATTING
- *  202D  LEFT-TO-RIGHT OVERRIDE
- *  202E  RIGHT-TO-LEFT OVERRIDE
- *
- *  2060  WORD JOINER
- *  2061  FUNCTION APPLICATION
- *  2062  INVISIBLE TIMES
- *  2063  INVISIBLE SEPARATOR
- *
- *  FEFF  ZERO WIDTH NO-BREAK SPACE
- */
-static inline hb_bool_t
-_hb_unicode_is_zero_width (hb_codepoint_t ch)
-{
-  return ((ch & ~0x007F) == 0x2000 && (
-         (ch >= 0x200B && ch <= 0x200F) ||
-         (ch >= 0x202A && ch <= 0x202E) ||
-         (ch >= 0x2060 && ch <= 0x2063) ||
-         (ch == 0x2028)
-        )) || unlikely (ch == 0x0009
-                     || ch == 0x00AD
-                     || ch == 0x034F
-                     || ch == 0xFEFF);
-}
-
-#endif /* HB_UNICODE_PRIVATE_HH */
diff --git a/src/hb-unicode.cc b/src/hb-unicode.cc
deleted file mode 100644 (file)
index 6a21ef3..0000000
+++ /dev/null
@@ -1,328 +0,0 @@
-/*
- * Copyright © 2009  Red Hat, Inc.
- * Copyright © 2011 Codethink Limited
- * Copyright © 2010,2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Behdad Esfahbod
- * Codethink Author(s): Ryan Lortie
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "hb-private.hh"
-
-#include "hb-unicode-private.hh"
-
-
-
-/*
- * hb_unicode_funcs_t
- */
-
-static unsigned int
-hb_unicode_combining_class_nil (hb_unicode_funcs_t *ufuncs    HB_UNUSED,
-                               hb_codepoint_t      unicode   HB_UNUSED,
-                               void               *user_data HB_UNUSED)
-{
-  return 0;
-}
-
-static unsigned int
-hb_unicode_eastasian_width_nil (hb_unicode_funcs_t *ufuncs    HB_UNUSED,
-                               hb_codepoint_t      unicode   HB_UNUSED,
-                               void               *user_data HB_UNUSED)
-{
-  return 1;
-}
-
-static hb_unicode_general_category_t
-hb_unicode_general_category_nil (hb_unicode_funcs_t *ufuncs    HB_UNUSED,
-                                hb_codepoint_t      unicode   HB_UNUSED,
-                                void               *user_data HB_UNUSED)
-{
-  return HB_UNICODE_GENERAL_CATEGORY_OTHER_LETTER;
-}
-
-static hb_codepoint_t
-hb_unicode_mirroring_nil (hb_unicode_funcs_t *ufuncs    HB_UNUSED,
-                         hb_codepoint_t      unicode   HB_UNUSED,
-                         void               *user_data HB_UNUSED)
-{
-  return unicode;
-}
-
-static hb_script_t
-hb_unicode_script_nil (hb_unicode_funcs_t *ufuncs    HB_UNUSED,
-                      hb_codepoint_t      unicode   HB_UNUSED,
-                      void               *user_data HB_UNUSED)
-{
-  return HB_SCRIPT_UNKNOWN;
-}
-
-static hb_bool_t
-hb_unicode_compose_nil (hb_unicode_funcs_t *ufuncs    HB_UNUSED,
-                       hb_codepoint_t      a         HB_UNUSED,
-                       hb_codepoint_t      b         HB_UNUSED,
-                       hb_codepoint_t     *ab        HB_UNUSED,
-                       void               *user_data HB_UNUSED)
-{
-  return false;
-}
-
-static hb_bool_t
-hb_unicode_decompose_nil (hb_unicode_funcs_t *ufuncs    HB_UNUSED,
-                         hb_codepoint_t      ab        HB_UNUSED,
-                         hb_codepoint_t     *a         HB_UNUSED,
-                         hb_codepoint_t     *b         HB_UNUSED,
-                         void               *user_data HB_UNUSED)
-{
-  return false;
-}
-
-
-
-hb_unicode_funcs_t *
-hb_unicode_funcs_get_default (void)
-{
-  return const_cast<hb_unicode_funcs_t *> (&_hb_unicode_funcs_default);
-}
-
-hb_unicode_funcs_t *
-hb_unicode_funcs_create (hb_unicode_funcs_t *parent)
-{
-  hb_unicode_funcs_t *ufuncs;
-
-  if (!(ufuncs = hb_object_create<hb_unicode_funcs_t> ()))
-    return hb_unicode_funcs_get_empty ();
-
-  if (!parent)
-    parent = hb_unicode_funcs_get_empty ();
-
-  hb_unicode_funcs_make_immutable (parent);
-  ufuncs->parent = hb_unicode_funcs_reference (parent);
-
-  ufuncs->func = parent->func;
-
-  /* We can safely copy user_data from parent since we hold a reference
-   * onto it and it's immutable.  We should not copy the destroy notifiers
-   * though. */
-  ufuncs->user_data = parent->user_data;
-
-  return ufuncs;
-}
-
-
-//extern HB_INTERNAL const hb_unicode_funcs_t _hb_unicode_funcs_nil;
-const hb_unicode_funcs_t _hb_unicode_funcs_nil = {
-  HB_OBJECT_HEADER_STATIC,
-
-  NULL, /* parent */
-  true, /* immutable */
-  {
-#define HB_UNICODE_FUNC_IMPLEMENT(name) hb_unicode_##name##_nil,
-    HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS
-#undef HB_UNICODE_FUNC_IMPLEMENT
-  }
-};
-
-hb_unicode_funcs_t *
-hb_unicode_funcs_get_empty (void)
-{
-  return const_cast<hb_unicode_funcs_t *> (&_hb_unicode_funcs_nil);
-}
-
-hb_unicode_funcs_t *
-hb_unicode_funcs_reference (hb_unicode_funcs_t *ufuncs)
-{
-  return hb_object_reference (ufuncs);
-}
-
-void
-hb_unicode_funcs_destroy (hb_unicode_funcs_t *ufuncs)
-{
-  if (!hb_object_destroy (ufuncs)) return;
-
-#define HB_UNICODE_FUNC_IMPLEMENT(name) \
-  if (ufuncs->destroy.name) ufuncs->destroy.name (ufuncs->user_data.name);
-    HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS
-#undef HB_UNICODE_FUNC_IMPLEMENT
-
-  hb_unicode_funcs_destroy (ufuncs->parent);
-
-  free (ufuncs);
-}
-
-hb_bool_t
-hb_unicode_funcs_set_user_data (hb_unicode_funcs_t *ufuncs,
-                               hb_user_data_key_t *key,
-                               void *              data,
-                               hb_destroy_func_t   destroy,
-                               hb_bool_t           replace)
-{
-  return hb_object_set_user_data (ufuncs, key, data, destroy, replace);
-}
-
-void *
-hb_unicode_funcs_get_user_data (hb_unicode_funcs_t *ufuncs,
-                               hb_user_data_key_t *key)
-{
-  return hb_object_get_user_data (ufuncs, key);
-}
-
-
-void
-hb_unicode_funcs_make_immutable (hb_unicode_funcs_t *ufuncs)
-{
-  if (hb_object_is_inert (ufuncs))
-    return;
-
-  ufuncs->immutable = true;
-}
-
-hb_bool_t
-hb_unicode_funcs_is_immutable (hb_unicode_funcs_t *ufuncs)
-{
-  return ufuncs->immutable;
-}
-
-hb_unicode_funcs_t *
-hb_unicode_funcs_get_parent (hb_unicode_funcs_t *ufuncs)
-{
-  return ufuncs->parent ? ufuncs->parent : hb_unicode_funcs_get_empty ();
-}
-
-
-#define HB_UNICODE_FUNC_IMPLEMENT(name)                                                \
-                                                                               \
-void                                                                           \
-hb_unicode_funcs_set_##name##_func (hb_unicode_funcs_t            *ufuncs,     \
-                                   hb_unicode_##name##_func_t      func,       \
-                                   void                           *user_data,  \
-                                   hb_destroy_func_t               destroy)    \
-{                                                                              \
-  if (ufuncs->immutable)                                                       \
-    return;                                                                    \
-                                                                               \
-  if (ufuncs->destroy.name)                                                    \
-    ufuncs->destroy.name (ufuncs->user_data.name);                             \
-                                                                               \
-  if (func) {                                                                  \
-    ufuncs->func.name = func;                                                  \
-    ufuncs->user_data.name = user_data;                                                \
-    ufuncs->destroy.name = destroy;                                            \
-  } else {                                                                     \
-    ufuncs->func.name = ufuncs->parent->func.name;                             \
-    ufuncs->user_data.name = ufuncs->parent->user_data.name;                   \
-    ufuncs->destroy.name = NULL;                                               \
-  }                                                                            \
-}
-
-    HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS
-#undef HB_UNICODE_FUNC_IMPLEMENT
-
-
-#define HB_UNICODE_FUNC_IMPLEMENT(return_type, name)                           \
-                                                                               \
-return_type                                                                    \
-hb_unicode_##name (hb_unicode_funcs_t *ufuncs,                                 \
-                  hb_codepoint_t      unicode)                                 \
-{                                                                              \
-  return ufuncs->func.name (ufuncs, unicode, ufuncs->user_data.name);          \
-}
-    HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS_SIMPLE
-#undef HB_UNICODE_FUNC_IMPLEMENT
-
-hb_bool_t
-hb_unicode_compose (hb_unicode_funcs_t *ufuncs,
-                   hb_codepoint_t      a,
-                   hb_codepoint_t      b,
-                   hb_codepoint_t     *ab)
-{
-  *ab = 0;
-  return ufuncs->func.compose (ufuncs, a, b, ab, ufuncs->user_data.compose);
-}
-
-hb_bool_t
-hb_unicode_decompose (hb_unicode_funcs_t *ufuncs,
-                     hb_codepoint_t      ab,
-                     hb_codepoint_t     *a,
-                     hb_codepoint_t     *b)
-{
-  *a = ab; *b = 0;
-  return ufuncs->func.decompose (ufuncs, ab, a, b, ufuncs->user_data.decompose);
-}
-
-
-
-unsigned int
-_hb_unicode_modified_combining_class (hb_unicode_funcs_t *ufuncs,
-                                     hb_codepoint_t      unicode)
-{
-  int c = hb_unicode_combining_class (ufuncs, unicode);
-
-  if (unlikely (hb_in_range<int> (c, 27, 33)))
-  {
-    /* Modify the combining-class to suit Arabic better.  See:
-     * http://unicode.org/faq/normalization.html#8
-     * http://unicode.org/faq/normalization.html#9
-     */
-    c = c == 33 ? 27 : c + 1;
-  }
-  else if (unlikely (hb_in_range<int> (c, 10, 25)))
-  {
-    /* The equivalent fix for Hebrew is more complex.
-     *
-     * We permute the "fixed-position" classes 10-25 into the order
-     * described in the SBL Hebrew manual:
-     *
-     * http://www.sbl-site.org/Fonts/SBLHebrewUserManual1.5x.pdf
-     *
-     * (as recommended by:
-     *  http://forum.fontlab.com/archive-old-microsoft-volt-group/vista-and-diacritic-ordering-t6751.0.html)
-     *
-     * More details here:
-     * https://bugzilla.mozilla.org/show_bug.cgi?id=662055
-     */
-    static const int permuted_hebrew_classes[25 - 10 + 1] = {
-      /* 10 sheva */        22,
-      /* 11 hataf segol */  15,
-      /* 12 hataf patah */  16,
-      /* 13 hataf qamats */ 17,
-      /* 14 hiriq */        23,
-      /* 15 tsere */        18,
-      /* 16 segol */        19,
-      /* 17 patah */        20,
-      /* 18 qamats */       21,
-      /* 19 holam */        14,
-      /* 20 qubuts */       24,
-      /* 21 dagesh */       12,
-      /* 22 meteg */        25,
-      /* 23 rafe */         13,
-      /* 24 shin dot */     10,
-      /* 25 sin dot */      11,
-    };
-    c = permuted_hebrew_classes[c - 10];
-  }
-
-  return c;
-}
-
diff --git a/src/hb-unicode.h b/src/hb-unicode.h
deleted file mode 100644 (file)
index b26168f..0000000
+++ /dev/null
@@ -1,197 +0,0 @@
-/*
- * Copyright © 2009  Red Hat, Inc.
- * Copyright © 2011  Codethink Limited
- * Copyright © 2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Behdad Esfahbod
- * Codethink Author(s): Ryan Lortie
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_H_IN
-#error "Include <hb.h> instead."
-#endif
-
-#ifndef HB_UNICODE_H
-#define HB_UNICODE_H
-
-#include "hb-common.h"
-
-HB_BEGIN_DECLS
-
-
-/*
- * hb_unicode_funcs_t
- */
-
-typedef struct _hb_unicode_funcs_t hb_unicode_funcs_t;
-
-
-/*
- * just give me the best implementation you've got there.
- */
-hb_unicode_funcs_t *
-hb_unicode_funcs_get_default (void);
-
-
-hb_unicode_funcs_t *
-hb_unicode_funcs_create (hb_unicode_funcs_t *parent);
-
-hb_unicode_funcs_t *
-hb_unicode_funcs_get_empty (void);
-
-hb_unicode_funcs_t *
-hb_unicode_funcs_reference (hb_unicode_funcs_t *ufuncs);
-
-void
-hb_unicode_funcs_destroy (hb_unicode_funcs_t *ufuncs);
-
-hb_bool_t
-hb_unicode_funcs_set_user_data (hb_unicode_funcs_t *ufuncs,
-                               hb_user_data_key_t *key,
-                               void *              data,
-                               hb_destroy_func_t   destroy,
-                               hb_bool_t           replace);
-
-void *
-hb_unicode_funcs_get_user_data (hb_unicode_funcs_t *ufuncs,
-                               hb_user_data_key_t *key);
-
-
-void
-hb_unicode_funcs_make_immutable (hb_unicode_funcs_t *ufuncs);
-
-hb_bool_t
-hb_unicode_funcs_is_immutable (hb_unicode_funcs_t *ufuncs);
-
-hb_unicode_funcs_t *
-hb_unicode_funcs_get_parent (hb_unicode_funcs_t *ufuncs);
-
-
-/*
- * funcs
- */
-
-/* typedefs */
-
-typedef unsigned int                   (*hb_unicode_combining_class_func_t)    (hb_unicode_funcs_t *ufuncs,
-                                                                                hb_codepoint_t      unicode,
-                                                                                void               *user_data);
-typedef unsigned int                   (*hb_unicode_eastasian_width_func_t)    (hb_unicode_funcs_t *ufuncs,
-                                                                                hb_codepoint_t      unicode,
-                                                                                void               *user_data);
-typedef hb_unicode_general_category_t  (*hb_unicode_general_category_func_t)   (hb_unicode_funcs_t *ufuncs,
-                                                                                hb_codepoint_t      unicode,
-                                                                                void               *user_data);
-typedef hb_codepoint_t                 (*hb_unicode_mirroring_func_t)          (hb_unicode_funcs_t *ufuncs,
-                                                                                hb_codepoint_t      unicode,
-                                                                                void               *user_data);
-typedef hb_script_t                    (*hb_unicode_script_func_t)             (hb_unicode_funcs_t *ufuncs,
-                                                                                hb_codepoint_t      unicode,
-                                                                                void               *user_data);
-
-typedef hb_bool_t                      (*hb_unicode_compose_func_t)            (hb_unicode_funcs_t *ufuncs,
-                                                                                hb_codepoint_t      a,
-                                                                                hb_codepoint_t      b,
-                                                                                hb_codepoint_t     *ab,
-                                                                                void               *user_data);
-typedef hb_bool_t                      (*hb_unicode_decompose_func_t)          (hb_unicode_funcs_t *ufuncs,
-                                                                                hb_codepoint_t      ab,
-                                                                                hb_codepoint_t     *a,
-                                                                                hb_codepoint_t     *b,
-                                                                                void               *user_data);
-
-/* setters */
-
-void
-hb_unicode_funcs_set_combining_class_func (hb_unicode_funcs_t *ufuncs,
-                                          hb_unicode_combining_class_func_t combining_class_func,
-                                          void *user_data, hb_destroy_func_t destroy);
-
-void
-hb_unicode_funcs_set_eastasian_width_func (hb_unicode_funcs_t *ufuncs,
-                                          hb_unicode_eastasian_width_func_t eastasian_width_func,
-                                          void *user_data, hb_destroy_func_t destroy);
-
-void
-hb_unicode_funcs_set_general_category_func (hb_unicode_funcs_t *ufuncs,
-                                           hb_unicode_general_category_func_t general_category_func,
-                                           void *user_data, hb_destroy_func_t destroy);
-
-void
-hb_unicode_funcs_set_mirroring_func (hb_unicode_funcs_t *ufuncs,
-                                    hb_unicode_mirroring_func_t mirroring_func,
-                                    void *user_data, hb_destroy_func_t destroy);
-
-void
-hb_unicode_funcs_set_script_func (hb_unicode_funcs_t *ufuncs,
-                                 hb_unicode_script_func_t script_func,
-                                 void *user_data, hb_destroy_func_t destroy);
-
-void
-hb_unicode_funcs_set_compose_func (hb_unicode_funcs_t *ufuncs,
-                                  hb_unicode_compose_func_t compose_func,
-                                  void *user_data, hb_destroy_func_t destroy);
-
-void
-hb_unicode_funcs_set_decompose_func (hb_unicode_funcs_t *ufuncs,
-                                    hb_unicode_decompose_func_t decompose_func,
-                                    void *user_data, hb_destroy_func_t destroy);
-
-
-/* accessors */
-
-unsigned int
-hb_unicode_combining_class (hb_unicode_funcs_t *ufuncs,
-                           hb_codepoint_t unicode);
-
-unsigned int
-hb_unicode_eastasian_width (hb_unicode_funcs_t *ufuncs,
-                           hb_codepoint_t unicode);
-
-hb_unicode_general_category_t
-hb_unicode_general_category (hb_unicode_funcs_t *ufuncs,
-                            hb_codepoint_t unicode);
-
-hb_codepoint_t
-hb_unicode_mirroring (hb_unicode_funcs_t *ufuncs,
-                     hb_codepoint_t unicode);
-
-hb_script_t
-hb_unicode_script (hb_unicode_funcs_t *ufuncs,
-                  hb_codepoint_t unicode);
-
-hb_bool_t
-hb_unicode_compose (hb_unicode_funcs_t *ufuncs,
-                   hb_codepoint_t      a,
-                   hb_codepoint_t      b,
-                   hb_codepoint_t     *ab);
-hb_bool_t
-hb_unicode_decompose (hb_unicode_funcs_t *ufuncs,
-                     hb_codepoint_t      ab,
-                     hb_codepoint_t     *a,
-                     hb_codepoint_t     *b);
-
-HB_END_DECLS
-
-#endif /* HB_UNICODE_H */
diff --git a/src/hb-uniscribe-private.hh b/src/hb-uniscribe-private.hh
deleted file mode 100644 (file)
index 239ab0c..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright © 2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_UNISCRIBE_PRIVATE_HH
-#define HB_UNISCRIBE_PRIVATE_HH
-
-#include "hb-private.hh"
-
-#include "hb-uniscribe.h"
-
-
-HB_INTERNAL hb_bool_t
-_hb_uniscribe_shape (hb_font_t          *font,
-                    hb_buffer_t        *buffer,
-                    const hb_feature_t *features,
-                    unsigned int        num_features);
-
-
-#endif /* HB_UNISCRIBE_PRIVATE_HH */
diff --git a/src/hb-uniscribe.cc b/src/hb-uniscribe.cc
deleted file mode 100644 (file)
index 9f84a3c..0000000
+++ /dev/null
@@ -1,465 +0,0 @@
-/*
- * Copyright © 2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#define _WIN32_WINNT 0x0500
-
-#include "hb-private.hh"
-
-#include <windows.h>
-#include <usp10.h>
-
-typedef ULONG WIN_ULONG;
-
-#include "hb-uniscribe.h"
-
-#include "hb-ot-name-table.hh"
-#include "hb-ot-tag.h"
-
-#include "hb-font-private.hh"
-#include "hb-buffer-private.hh"
-
-
-
-#ifndef HB_DEBUG_UNISCRIBE
-#define HB_DEBUG_UNISCRIBE (HB_DEBUG+0)
-#endif
-
-
-/*
-DWORD GetFontData(
-  __in   HDC hdc,
-  __in   DWORD dwTable,
-  __in   DWORD dwOffset,
-  __out  LPVOID lpvBuffer,
-  __in   DWORD cbData
-);
-*/
-
-static bool
-populate_log_font (LOGFONTW  *lf,
-                  HDC        hdc,
-                  hb_font_t *font)
-{
-  memset (lf, 0, sizeof (*lf));
-  int dpi = GetDeviceCaps (hdc, LOGPIXELSY);
-  lf->lfHeight = -font->y_scale;
-
-  hb_blob_t *blob = Sanitizer<name>::sanitize (hb_face_reference_table (font->face, HB_TAG ('n','a','m','e')));
-  const name *name_table = Sanitizer<name>::lock_instance (blob);
-  unsigned int len = name_table->get_name (3, 1, 0x409, 4,
-                                          lf->lfFaceName,
-                                          sizeof (lf->lfFaceName[0]) * LF_FACESIZE)
-                                         / sizeof (lf->lfFaceName[0]);
-  hb_blob_destroy (blob);
-
-  if (unlikely (!len)) {
-    DEBUG_MSG (UNISCRIBE, NULL, "Didn't find English name table entry");
-    return false;
-  }
-  if (unlikely (len >= LF_FACESIZE)) {
-    DEBUG_MSG (UNISCRIBE, NULL, "Font name too long");
-    return false;
-  }
-
-  for (unsigned int i = 0; i < len; i++)
-    lf->lfFaceName[i] = hb_be_uint16 (lf->lfFaceName[i]);
-  lf->lfFaceName[len] = 0;
-
-  return true;
-}
-
-
-static hb_user_data_key_t hb_uniscribe_data_key;
-
-
-static struct hb_uniscribe_face_data_t {
-  HANDLE fh;
-} _hb_uniscribe_face_data_nil = {0};
-
-static void
-_hb_uniscribe_face_data_destroy (hb_uniscribe_face_data_t *data)
-{
-  if (data->fh)
-    RemoveFontMemResourceEx (data->fh);
-  free (data);
-}
-
-static hb_uniscribe_face_data_t *
-_hb_uniscribe_face_get_data (hb_face_t *face)
-{
-  hb_uniscribe_face_data_t *data = (hb_uniscribe_face_data_t *) hb_face_get_user_data (face, &hb_uniscribe_data_key);
-  if (likely (data)) return data;
-
-  data = (hb_uniscribe_face_data_t *) calloc (1, sizeof (hb_uniscribe_face_data_t));
-  if (unlikely (!data))
-    return &_hb_uniscribe_face_data_nil;
-
-
-  hb_blob_t *blob = hb_face_reference_blob (face);
-  unsigned int blob_length;
-  const char *blob_data = hb_blob_get_data (blob, &blob_length);
-  if (unlikely (!blob_length))
-    DEBUG_MSG (UNISCRIBE, face, "Face has empty blob");
-
-  DWORD num_fonts_installed;
-  data->fh = AddFontMemResourceEx ((void *) blob_data, blob_length, 0, &num_fonts_installed);
-  hb_blob_destroy (blob);
-  if (unlikely (!data->fh))
-    DEBUG_MSG (UNISCRIBE, face, "Face AddFontMemResourceEx() failed");
-
-
-  if (unlikely (!hb_face_set_user_data (face, &hb_uniscribe_data_key, data,
-                                       (hb_destroy_func_t) _hb_uniscribe_face_data_destroy,
-                                       false)))
-  {
-    _hb_uniscribe_face_data_destroy (data);
-    data = (hb_uniscribe_face_data_t *) hb_face_get_user_data (face, &hb_uniscribe_data_key);
-    if (data)
-      return data;
-    else
-      return &_hb_uniscribe_face_data_nil;
-  }
-
-  return data;
-}
-
-
-static struct hb_uniscribe_font_data_t {
-  HDC hdc;
-  LOGFONTW log_font;
-  HFONT hfont;
-  SCRIPT_CACHE script_cache;
-} _hb_uniscribe_font_data_nil = {NULL, NULL, NULL};
-
-static void
-_hb_uniscribe_font_data_destroy (hb_uniscribe_font_data_t *data)
-{
-  if (data->hdc)
-    ReleaseDC (NULL, data->hdc);
-  if (data->hfont)
-    DeleteObject (data->hfont);
-  if (data->script_cache)
-    ScriptFreeCache (&data->script_cache);
-  free (data);
-}
-
-static hb_uniscribe_font_data_t *
-_hb_uniscribe_font_get_data (hb_font_t *font)
-{
-  hb_uniscribe_font_data_t *data = (hb_uniscribe_font_data_t *) hb_font_get_user_data (font, &hb_uniscribe_data_key);
-  if (likely (data)) return data;
-
-  data = (hb_uniscribe_font_data_t *) calloc (1, sizeof (hb_uniscribe_font_data_t));
-  if (unlikely (!data))
-    return &_hb_uniscribe_font_data_nil;
-
-  data->hdc = GetDC (NULL);
-
-  if (unlikely (!populate_log_font (&data->log_font, data->hdc, font)))
-    DEBUG_MSG (UNISCRIBE, font, "Font populate_log_font() failed");
-  else {
-    data->hfont = CreateFontIndirectW (&data->log_font);
-    if (unlikely (!data->hfont))
-      DEBUG_MSG (UNISCRIBE, font, "Font CreateFontIndirectW() failed");
-    if (!SelectObject (data->hdc, data->hfont))
-      DEBUG_MSG (UNISCRIBE, font, "Font SelectObject() failed");
-  }
-
-  if (unlikely (!hb_font_set_user_data (font, &hb_uniscribe_data_key, data,
-                                       (hb_destroy_func_t) _hb_uniscribe_font_data_destroy,
-                                       false)))
-  {
-    _hb_uniscribe_font_data_destroy (data);
-    data = (hb_uniscribe_font_data_t *) hb_font_get_user_data (font, &hb_uniscribe_data_key);
-    if (data)
-      return data;
-    else
-      return &_hb_uniscribe_font_data_nil;
-  }
-
-  return data;
-}
-
-LOGFONTW *
-hb_uniscribe_font_get_logfontw (hb_font_t *font)
-{
-  hb_uniscribe_font_data_t *font_data = _hb_uniscribe_font_get_data (font);
-  if (unlikely (!font_data))
-    return NULL;
-  return &font_data->log_font;
-}
-
-HFONT
-hb_uniscribe_font_get_hfont (hb_font_t *font)
-{
-  hb_uniscribe_font_data_t *font_data = _hb_uniscribe_font_get_data (font);
-  if (unlikely (!font_data))
-    return 0;
-  return font_data->hfont;
-}
-
-
-hb_bool_t
-_hb_uniscribe_shape (hb_font_t          *font,
-                    hb_buffer_t        *buffer,
-                    const hb_feature_t *features,
-                    unsigned int        num_features)
-{
-  buffer->guess_properties ();
-
-#define FAIL(...) \
-  HB_STMT_START { \
-    DEBUG_MSG (UNISCRIBE, NULL, __VA_ARGS__); \
-    return false; \
-  } HB_STMT_END;
-
-  hb_uniscribe_face_data_t *face_data = _hb_uniscribe_face_get_data (font->face);
-  if (unlikely (!face_data->fh))
-    FAIL ("Couldn't get face data");
-
-  hb_uniscribe_font_data_t *font_data = _hb_uniscribe_font_get_data (font);
-  if (unlikely (!font_data->hfont))
-    FAIL ("Couldn't get font font");
-
-  if (unlikely (!buffer->len))
-    return true;
-
-  HRESULT hr;
-
-retry:
-
-  unsigned int scratch_size;
-  char *scratch = (char *) buffer->get_scratch_buffer (&scratch_size);
-
-  /* Allocate char buffers; they all fit */
-
-#define ALLOCATE_ARRAY(Type, name, len) \
-  Type *name = (Type *) scratch; \
-  scratch += len * sizeof (name[0]); \
-  scratch_size -= len * sizeof (name[0]);
-
-#define utf16_index() var1.u32
-
-  WCHAR *pchars = (WCHAR *) scratch;
-  unsigned int chars_len = 0;
-  for (unsigned int i = 0; i < buffer->len; i++) {
-    hb_codepoint_t c = buffer->info[i].codepoint;
-    buffer->info[i].utf16_index() = chars_len;
-    if (likely (c < 0x10000))
-      pchars[chars_len++] = c;
-    else if (unlikely (c >= 0x110000))
-      pchars[chars_len++] = 0xFFFD;
-    else {
-      pchars[chars_len++] = 0xD800 + ((c - 0x10000) >> 10);
-      pchars[chars_len++] = 0xDC00 + ((c - 0x10000) & ((1 << 10) - 1));
-    }
-  }
-
-  ALLOCATE_ARRAY (WCHAR, wchars, chars_len);
-  ALLOCATE_ARRAY (WORD, log_clusters, chars_len);
-  ALLOCATE_ARRAY (SCRIPT_CHARPROP, char_props, chars_len);
-
-  /* On Windows, we don't care about alignment...*/
-  unsigned int glyphs_size = scratch_size / (sizeof (WORD) +
-                                            sizeof (SCRIPT_GLYPHPROP) +
-                                            sizeof (int) +
-                                            sizeof (GOFFSET) +
-                                            sizeof (uint32_t));
-
-  ALLOCATE_ARRAY (WORD, glyphs, glyphs_size);
-  ALLOCATE_ARRAY (SCRIPT_GLYPHPROP, glyph_props, glyphs_size);
-  ALLOCATE_ARRAY (int, advances, glyphs_size);
-  ALLOCATE_ARRAY (GOFFSET, offsets, glyphs_size);
-  ALLOCATE_ARRAY (uint32_t, vis_clusters, glyphs_size);
-
-
-#define MAX_ITEMS 10
-
-  SCRIPT_ITEM items[MAX_ITEMS + 1];
-  SCRIPT_CONTROL bidi_control = {0};
-  SCRIPT_STATE bidi_state = {0};
-  WIN_ULONG script_tags[MAX_ITEMS];
-  int item_count;
-
-  /* MinGW32 doesn't define fMergeNeutralItems, so we bruteforce */
-  //bidi_control.fMergeNeutralItems = true;
-  *(uint32_t*)&bidi_control |= 1<<24;
-
-  bidi_state.uBidiLevel = HB_DIRECTION_IS_FORWARD (buffer->props.direction) ? 0 : 1;
-//  bidi_state.fOverrideDirection = 1;
-
-  hr = ScriptItemizeOpenType (wchars,
-                             chars_len,
-                             MAX_ITEMS,
-                             &bidi_control,
-                             &bidi_state,
-                             items,
-                             script_tags,
-                             &item_count);
-  if (unlikely (FAILED (hr)))
-    FAIL ("ScriptItemizeOpenType() failed: 0x%08xL", hr);
-
-#undef MAX_ITEMS
-
-  int *range_char_counts = NULL;
-  TEXTRANGE_PROPERTIES **range_properties = NULL;
-  int range_count = 0;
-  if (num_features) {
-    /* TODO setup ranges */
-  }
-
-  OPENTYPE_TAG language_tag = hb_ot_tag_from_language (buffer->props.language);
-
-  unsigned int glyphs_offset = 0;
-  unsigned int glyphs_len;
-  for (unsigned int i = 0; i < item_count; i++)
-  {
-      unsigned int chars_offset = items[i].iCharPos;
-      unsigned int item_chars_len = items[i + 1].iCharPos - chars_offset;
-      OPENTYPE_TAG script_tag = script_tags[i]; /* XXX buffer->props.script */
-
-      hr = ScriptShapeOpenType (font_data->hdc,
-                               &font_data->script_cache,
-                               &items[i].a,
-                               script_tag,
-                               language_tag,
-                               range_char_counts,
-                               range_properties,
-                               range_count,
-                               wchars + chars_offset,
-                               item_chars_len,
-                               glyphs_size - glyphs_offset,
-                               /* out */
-                               log_clusters + chars_offset,
-                               char_props + chars_offset,
-                               glyphs + glyphs_offset,
-                               glyph_props + glyphs_offset,
-                               (int *) &glyphs_len);
-
-      for (unsigned int j = chars_offset; j < chars_offset + item_chars_len; j++)
-        log_clusters[j] += glyphs_offset;
-
-      if (unlikely (items[i].a.fNoGlyphIndex))
-       FAIL ("ScriptShapeOpenType() set fNoGlyphIndex");
-      if (unlikely (hr == E_OUTOFMEMORY))
-      {
-        buffer->ensure (buffer->allocated * 2);
-       if (buffer->in_error)
-         FAIL ("Buffer resize failed");
-       goto retry;
-      }
-      if (unlikely (hr == USP_E_SCRIPT_NOT_IN_FONT))
-       FAIL ("ScriptShapeOpenType() failed: Font doesn't support script");
-      if (unlikely (FAILED (hr)))
-       FAIL ("ScriptShapeOpenType() failed: 0x%08xL", hr);
-
-      hr = ScriptPlaceOpenType (font_data->hdc,
-                               &font_data->script_cache,
-                               &items[i].a,
-                               script_tag,
-                               language_tag,
-                               range_char_counts,
-                               range_properties,
-                               range_count,
-                               wchars + chars_offset,
-                               log_clusters + chars_offset,
-                               char_props + chars_offset,
-                               item_chars_len,
-                               glyphs + glyphs_offset,
-                               glyph_props + glyphs_offset,
-                               glyphs_len,
-                               /* out */
-                               advances + glyphs_offset,
-                               offsets + glyphs_offset,
-                               NULL);
-      if (unlikely (FAILED (hr)))
-       FAIL ("ScriptPlaceOpenType() failed: 0x%08xL", hr);
-
-      glyphs_offset += glyphs_len;
-  }
-  glyphs_len = glyphs_offset;
-
-  /* Ok, we've got everything we need, now compose output buffer,
-   * very, *very*, carefully! */
-
-  /* Calculate visual-clusters.  That's what we ship. */
-  for (unsigned int i = 0; i < glyphs_len; i++)
-    vis_clusters[i] = -1;
-  for (unsigned int i = 0; i < buffer->len; i++) {
-    uint32_t *p = &vis_clusters[log_clusters[buffer->info[i].utf16_index()]];
-    *p = MIN (*p, buffer->info[i].cluster);
-  }
-  if (HB_DIRECTION_IS_FORWARD (buffer->props.direction)) {
-    for (unsigned int i = 1; i < glyphs_len; i++)
-      if (!glyph_props[i].sva.fClusterStart)
-       vis_clusters[i] = vis_clusters[i - 1];
-  } else {
-    for (int i = glyphs_len - 2; i >= 0; i--)
-      if (!glyph_props[i].sva.fClusterStart)
-       vis_clusters[i] = vis_clusters[i + 1];
-  }
-
-#undef utf16_index
-
-  buffer->ensure (glyphs_len);
-  if (buffer->in_error)
-    FAIL ("Buffer in error");
-
-#undef FAIL
-
-  /* Set glyph infos */
-  buffer->len = 0;
-  for (unsigned int i = 0; i < glyphs_len; i++)
-  {
-    hb_glyph_info_t *info = &buffer->info[buffer->len++];
-
-    info->codepoint = glyphs[i];
-    info->cluster = vis_clusters[i];
-
-    /* The rest is crap.  Let's store position info there for now. */
-    info->mask = advances[i];
-    info->var1.u32 = offsets[i].du;
-    info->var2.u32 = offsets[i].dv;
-  }
-
-  /* Set glyph positions */
-  buffer->clear_positions ();
-  for (unsigned int i = 0; i < glyphs_len; i++)
-  {
-    hb_glyph_info_t *info = &buffer->info[i];
-    hb_glyph_position_t *pos = &buffer->pos[i];
-
-    /* TODO vertical */
-    pos->x_advance = info->mask;
-    pos->x_offset = info->var1.u32;
-    pos->y_offset = info->var2.u32;
-  }
-
-  /* Wow, done! */
-  return true;
-}
-
-
diff --git a/src/hb-uniscribe.h b/src/hb-uniscribe.h
deleted file mode 100644 (file)
index 216610e..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright © 2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_UNISCRIBE_H
-#define HB_UNISCRIBE_H
-
-#include "hb.h"
-
-#define _WIN32_WINNT 0x0500
-#include <windows.h>
-
-HB_BEGIN_DECLS
-
-
-LOGFONTW *
-hb_uniscribe_font_get_logfontw (hb_font_t *font);
-
-HFONT
-hb_uniscribe_font_get_hfont (hb_font_t *font);
-
-
-HB_END_DECLS
-
-#endif /* HB_UNISCRIBE_H */
diff --git a/src/hb-version.h b/src/hb-version.h
deleted file mode 100644 (file)
index 43ec9cf..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright © 2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_H_IN
-#error "Include <hb.h> instead."
-#endif
-
-#ifndef HB_VERSION_H
-#define HB_VERSION_H
-
-#include "hb-common.h"
-
-HB_BEGIN_DECLS
-
-
-#define HB_VERSION_MAJOR 0
-#define HB_VERSION_MINOR 9
-#define HB_VERSION_MICRO 0
-
-#define HB_VERSION_STRING "0.9.0"
-
-#define HB_VERSION_CHECK(major,minor,micro) \
-       ((major)*10000+(minor)*100+(micro) >= \
-        HB_VERSION_MAJOR*10000+HB_VERSION_MINOR*100+HB_VERSION_MICRO)
-
-
-void
-hb_version (unsigned int *major,
-           unsigned int *minor,
-           unsigned int *micro);
-
-const char *
-hb_version_string (void);
-
-hb_bool_t
-hb_version_check (unsigned int major,
-                 unsigned int minor,
-                 unsigned int micro);
-
-
-HB_END_DECLS
-
-#endif /* HB_VERSION_H */
diff --git a/src/hb-version.h.in b/src/hb-version.h.in
deleted file mode 100644 (file)
index 43634f9..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright © 2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_H_IN
-#error "Include <hb.h> instead."
-#endif
-
-#ifndef HB_VERSION_H
-#define HB_VERSION_H
-
-#include "hb-common.h"
-
-HB_BEGIN_DECLS
-
-
-#define HB_VERSION_MAJOR @HB_VERSION_MAJOR@
-#define HB_VERSION_MINOR @HB_VERSION_MINOR@
-#define HB_VERSION_MICRO @HB_VERSION_MICRO@
-
-#define HB_VERSION_STRING "@HB_VERSION@"
-
-#define HB_VERSION_CHECK(major,minor,micro) \
-       ((major)*10000+(minor)*100+(micro) >= \
-        HB_VERSION_MAJOR*10000+HB_VERSION_MINOR*100+HB_VERSION_MICRO)
-
-
-void
-hb_version (unsigned int *major,
-           unsigned int *minor,
-           unsigned int *micro);
-
-const char *
-hb_version_string (void);
-
-hb_bool_t
-hb_version_check (unsigned int major,
-                 unsigned int minor,
-                 unsigned int micro);
-
-
-HB_END_DECLS
-
-#endif /* HB_VERSION_H */
diff --git a/src/hb-warning.cc b/src/hb-warning.cc
deleted file mode 100644 (file)
index 4f1f65f..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright © 2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "hb-atomic-private.hh"
-#include "hb-mutex-private.hh"
-
-
-#if defined(HB_ATOMIC_INT_NIL)
-#ifdef _MSC_VER
-#pragma message("Could not find any system to define atomic_int macros, library may NOT be thread-safe")
-#else
-#warning "Could not find any system to define atomic_int macros, library may NOT be thread-safe"
-#endif
-#endif
-
-#if defined(HB_MUTEX_IMPL_NIL)
-#ifdef _MSC_VER
-#pragma message("Could not find any system to define mutex macros, library may NOT be thread-safe")
-#else
-#warning "Could not find any system to define mutex macros, library may NOT be thread-safe"
-#endif
-#endif
-
-#if defined(HB_ATOMIC_INT_NIL) || defined(HB_MUTEX_IMPL_NIL)
-#ifdef _MSC_VER
-#pragma message("To suppress these warnings, define HB_NO_MT")
-#else
-#warning "To suppress these warnings, define HB_NO_MT"
-#endif
-#endif
-
-
-#include "hb-unicode-private.hh"
-
-#if !defined(HB_NO_UNICODE_FUNCS) && defined(HB_UNICODE_FUNCS_NIL)
-#ifdef _MSC_VER
-#pragma message("Could not find any Unicode functions implementation, you have to provide your own")
-#pragma message("To suppress this warnings, define HB_NO_UNICODE_FUNCS")
-#else
-#warning "Could not find any Unicode functions implementation, you have to provide your own"
-#warning "To suppress this warning, define HB_NO_UNICODE_FUNCS"
-#endif
-#endif
diff --git a/src/hb.h b/src/hb.h
deleted file mode 100644 (file)
index d36040e..0000000
--- a/src/hb.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright © 2009  Red Hat, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_H
-#define HB_H
-#define HB_H_IN
-
-#include "hb-blob.h"
-#include "hb-buffer.h"
-#include "hb-common.h"
-#include "hb-font.h"
-#include "hb-set.h"
-#include "hb-shape.h"
-#include "hb-unicode.h"
-#include "hb-version.h"
-
-HB_BEGIN_DECLS
-HB_END_DECLS
-
-#undef HB_H_IN
-#endif /* HB_H */
diff --git a/src/indic.cc b/src/indic.cc
deleted file mode 100644 (file)
index 3b44076..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright © 2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "hb-ot-shape-complex-indic-private.hh"
-
-int
-main (void)
-{
-  hb_unicode_funcs_t *funcs = hb_unicode_funcs_get_default ();
-
-  printf ("There are split matras without a Unicode decomposition:\n");
-  for (hb_codepoint_t u = 0; u < 0x110000; u++)
-  {
-    unsigned int type = get_indic_categories (u);
-
-    unsigned int category = type & 0x0F;
-    unsigned int position = type >> 4;
-
-    hb_codepoint_t a, b;
-    if (!hb_unicode_decompose (funcs, u, &a, &b))
-      printf ("U+%04X %x %x\n", u, category, position);
-  }
-}
diff --git a/src/main.cc b/src/main.cc
deleted file mode 100644 (file)
index 07d3d69..0000000
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * Copyright © 2007,2008,2009  Red Hat, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Red Hat Author(s): Behdad Esfahbod
- */
-
-#include "hb-mutex-private.hh"
-#include "hb-open-file-private.hh"
-#include "hb-ot-layout-gdef-table.hh"
-#include "hb-ot-layout-gsubgpos-private.hh"
-
-#ifdef HAVE_GLIB
-#include <glib.h>
-#endif
-#include <stdlib.h>
-#include <stdio.h>
-
-
-
-int
-main (int argc, char **argv)
-{
-  if (argc != 2) {
-    fprintf (stderr, "usage: %s font-file.ttf\n", argv[0]);
-    exit (1);
-  }
-
-  const char *font_data = NULL;
-  int len = 0;
-
-#ifdef HAVE_GLIB
-  GMappedFile *mf = g_mapped_file_new (argv[1], false, NULL);
-  font_data = g_mapped_file_get_contents (mf);
-  len = g_mapped_file_get_length (mf);
-#else
-  FILE *f = fopen (argv[1], "rb");
-  fseek (f, 0, SEEK_END);
-  len = ftell (f);
-  fseek (f, 0, SEEK_SET);
-  font_data = (const char *) malloc (len);
-  len = fread ((char *) font_data, 1, len, f);
-#endif
-
-  printf ("Opened font file %s: %d bytes long\n", argv[1], len);
-
-  const OpenTypeFontFile &ot = *CastP<OpenTypeFontFile> (font_data);
-
-  switch (ot.get_tag ()) {
-  case OpenTypeFontFile::TrueTypeTag:
-    printf ("OpenType font with TrueType outlines\n");
-    break;
-  case OpenTypeFontFile::CFFTag:
-    printf ("OpenType font with CFF (Type1) outlines\n");
-    break;
-  case OpenTypeFontFile::TTCTag:
-    printf ("TrueType Collection of OpenType fonts\n");
-    break;
-  case OpenTypeFontFile::TrueTag:
-    printf ("Obsolete Apple TrueType font\n");
-    break;
-  case OpenTypeFontFile::Typ1Tag:
-    printf ("Obsolete Apple Type1 font in SFNT container\n");
-    break;
-  default:
-    printf ("Unknown font format\n");
-    break;
-  }
-
-  int num_fonts = ot.get_face_count ();
-  printf ("%d font(s) found in file\n", num_fonts);
-  for (int n_font = 0; n_font < num_fonts; n_font++) {
-    const OpenTypeFontFace &font = ot.get_face (n_font);
-    printf ("Font %d of %d:\n", n_font, num_fonts);
-
-    int num_tables = font.get_table_count ();
-    printf ("  %d table(s) found in font\n", num_tables);
-    for (int n_table = 0; n_table < num_tables; n_table++) {
-      const OpenTypeTable &table = font.get_table (n_table);
-      printf ("  Table %2d of %2d: %.4s (0x%08x+0x%08x)\n", n_table, num_tables,
-             (const char *)table.tag,
-             (unsigned int) table.offset,
-             (unsigned int) table.length);
-
-      switch (table.tag) {
-
-      case GSUBGPOS::GSUBTag:
-      case GSUBGPOS::GPOSTag:
-       {
-
-       const GSUBGPOS &g = *CastP<GSUBGPOS> (font_data + table.offset);
-
-       int num_scripts = g.get_script_count ();
-       printf ("    %d script(s) found in table\n", num_scripts);
-       for (int n_script = 0; n_script < num_scripts; n_script++) {
-         const Script &script = g.get_script (n_script);
-         printf ("    Script %2d of %2d: %.4s\n", n_script, num_scripts,
-                 (const char *)g.get_script_tag(n_script));
-
-         if (!script.has_default_lang_sys())
-           printf ("      No default language system\n");
-         int num_langsys = script.get_lang_sys_count ();
-         printf ("      %d language system(s) found in script\n", num_langsys);
-         for (int n_langsys = script.has_default_lang_sys() ? -1 : 0; n_langsys < num_langsys; n_langsys++) {
-           const LangSys &langsys = n_langsys == -1
-                                  ? script.get_default_lang_sys ()
-                                  : script.get_lang_sys (n_langsys);
-           if (n_langsys == -1)
-             printf ("      Default Language System\n");
-           else
-             printf ("      Language System %2d of %2d: %.4s\n", n_langsys, num_langsys,
-                     (const char *)script.get_lang_sys_tag (n_langsys));
-           if (langsys.get_required_feature_index () == Index::NOT_FOUND_INDEX)
-             printf ("        No required feature\n");
-
-           int num_features = langsys.get_feature_count ();
-           printf ("        %d feature(s) found in language system\n", num_features);
-           for (int n_feature = 0; n_feature < num_features; n_feature++) {
-             printf ("        Feature index %2d of %2d: %d\n", n_feature, num_features,
-                     langsys.get_feature_index (n_feature));
-           }
-         }
-       }
-
-       int num_features = g.get_feature_count ();
-       printf ("    %d feature(s) found in table\n", num_features);
-       for (int n_feature = 0; n_feature < num_features; n_feature++) {
-         const Feature &feature = g.get_feature (n_feature);
-         printf ("    Feature %2d of %2d: %.4s; %d lookup(s)\n", n_feature, num_features,
-                 (const char *)g.get_feature_tag(n_feature),
-                 feature.get_lookup_count());
-
-         int num_lookups = feature.get_lookup_count ();
-         printf ("        %d lookup(s) found in feature\n", num_lookups);
-         for (int n_lookup = 0; n_lookup < num_lookups; n_lookup++) {
-           printf ("        Lookup index %2d of %2d: %d\n", n_lookup, num_lookups,
-                   feature.get_lookup_index (n_lookup));
-         }
-       }
-
-       int num_lookups = g.get_lookup_count ();
-       printf ("    %d lookup(s) found in table\n", num_lookups);
-       for (int n_lookup = 0; n_lookup < num_lookups; n_lookup++) {
-         const Lookup &lookup = g.get_lookup (n_lookup);
-         printf ("    Lookup %2d of %2d: type %d, props 0x%04X\n", n_lookup, num_lookups,
-                 lookup.get_type(), lookup.get_props());
-       }
-
-       }
-       break;
-
-      case GDEF::Tag:
-       {
-
-       const GDEF &gdef = *CastP<GDEF> (font_data + table.offset);
-
-       printf ("    Has %sglyph classes\n",
-                 gdef.has_glyph_classes () ? "" : "no ");
-       printf ("    Has %smark attachment types\n",
-                 gdef.has_mark_attachment_types () ? "" : "no ");
-       printf ("    Has %sattach points\n",
-                 gdef.has_attach_points () ? "" : "no ");
-       printf ("    Has %slig carets\n",
-                 gdef.has_lig_carets () ? "" : "no ");
-       printf ("    Has %smark sets\n",
-                 gdef.has_mark_sets () ? "" : "no ");
-       break;
-       }
-      }
-    }
-  }
-
-  return 0;
-}
-
-
diff --git a/src/mp-drm-ctrl.c b/src/mp-drm-ctrl.c
new file mode 100644 (file)
index 0000000..ddc299e
--- /dev/null
@@ -0,0 +1,413 @@
+/*
+ * 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 [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
+ * 
+ *    Licensed under the Flora License, Version 1.0 (the "License");
+ *    you may not use this file except in compliance with the License.
+ *    You may obtain a copy of the License at
+ * 
+ *        http://www.tizenopensource.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.
+ */
+
+
+#include <drm_client.h>
+#include <drm_client_types.h>
+
+
+#include "mp-util.h"
+#include "mp-video-log.h"
+#include "video-player.h"
+#include "mp-drm-ctrl.h"
+
+static int                     nCheckConsumption = VIDEO_DRM_CONSUMPTION_STATE_DISABLE;
+
+static drm_file_type_e         nDrmFileType = DRM_TYPE_UNDEFINED;
+
+#define ACCUMULATED_DATE               86400   /* 24*60*60 */
+#define RO_MESSAGE_LEN                 1024
+
+#define MOUNTH_COUNT   12
+#define DAY_COUNT      30
+#define HOUR_COUNT     24
+
+static bool bForwordLock = FALSE;
+/*
+ * External function
+ */
+void MpVideoDrmInit()
+{
+       VideoLogInfo("");
+}
+
+bool MpVideoDrmGetForwardLookState()
+{
+       VideoLogInfo("");
+
+       return bForwordLock;
+}
+
+void MpVideoDrmSetConsumptionState(int nState)
+{
+       VideoLogInfo("");
+
+       nCheckConsumption = nState;
+}
+
+int MpVideoDrmGetConsumption()
+{
+       VideoLogInfo("");
+
+       return nCheckConsumption;
+}
+
+void MpVideoDrmStartConsumption(char *szPath)
+{
+       VideoLogInfo("");
+
+
+       if (MpVideoDrmGetConsumption()) {
+
+       } else {
+               VideoLogInfo("Disable consumption.");
+       }
+}
+
+void MpVideoDrmPauseConsumption()
+{
+       VideoLogInfo("");
+
+       if (MpVideoDrmGetConsumption()) {
+       } else {
+               VideoLogInfo("Disable consumption.");
+       }
+}
+
+void MpVideoDrmResumeConsumption()
+{
+       VideoLogInfo("");
+
+       if (MpVideoDrmGetConsumption()) {
+       } else {
+               VideoLogInfo("Disable consumption.");
+       }
+}
+
+void MpVideoDrmStopConsumption()
+{
+       VideoLogInfo("");
+
+       if (MpVideoDrmGetConsumption()) {
+               MpVideoDrmSetConsumptionState (VIDEO_DRM_CONSUMPTION_STATE_DISABLE);
+       } else {
+               VideoLogInfo("Disable consumption.");
+       }
+}
+
+bool MpVideoDrmIsDrmFile(char *szPath)
+{
+       VideoLogInfo("");
+
+       if (!szPath) {
+               VideoLogInfo("[ERR]");
+               return FALSE;
+       }
+       int nRet = DRM_RETURN_SUCCESS;
+       drm_bool_type_e is_drm =  DRM_FALSE;
+
+       nRet = drm_is_drm_file(szPath, &is_drm);
+       if(nRet != DRM_RETURN_SUCCESS) {
+               VideoLogInfo("[ERR]drm_is_drm_file : %d", nRet);
+               return FALSE;
+       }
+
+       if(is_drm != DRM_TRUE) {
+               VideoLogInfo("It's not drm file.");
+               return FALSE;
+       }
+
+
+       drm_file_type_e drm_type = DRM_TYPE_UNDEFINED;
+
+       nRet = drm_get_file_type(szPath, &drm_type);
+       if(nRet != DRM_RETURN_SUCCESS) {
+               VideoLogInfo("[ERR]drm_get_file_type : %d", nRet);
+               return FALSE;
+       }
+
+       nDrmFileType = drm_type;
+
+       if(drm_type != DRM_TYPE_OMA_V1 && drm_type != DRM_TYPE_OMA_V2) {
+               VideoLogInfo("It's not OMA drm file : %d", drm_type);
+               return FALSE;
+       }
+
+       return TRUE;
+}
+
+bool MpVideoDrmHasValidRo(char *szPath)
+{
+       VideoLogInfo("");
+
+       if (!szPath) {
+               VideoLogInfo("[ERR]");
+               return FALSE;
+       }
+
+       int nRet = DRM_RETURN_SUCCESS;
+       drm_license_status_e license_status = DRM_LICENSE_STATUS_UNDEFINED;
+       nRet = drm_get_license_status(szPath, DRM_PERMISSION_TYPE_PLAY, &license_status);
+       if(nRet != DRM_RETURN_SUCCESS) {
+               VideoLogInfo("[ERR]drm_get_license_status : %d", nRet);
+               return FALSE;
+       }
+
+       if(license_status != DRM_LICENSE_STATUS_VALID) {
+               VideoLogInfo("Invalid license status : %d", license_status);
+               return FALSE;
+       }
+
+       return TRUE;
+}
+
+bool MpVideoDrmCheckForward(char *szPath)
+{
+       VideoLogInfo("");
+
+       if (!szPath) {
+               VideoLogInfo("[ERR]");
+               return FALSE;
+       }
+
+       int nRet = DRM_RETURN_SUCCESS;
+       drm_action_allowed_data_s action_data;
+       drm_bool_type_e is_allow = DRM_FALSE;
+       memset(&action_data, 0, sizeof(drm_action_allowed_data_s));
+       snprintf(action_data.file_path , DRM_MAX_LEN_FILEPATH, "%s", szPath);
+
+       nRet = drm_is_action_allowed(DRM_IS_FORWARDING_ALLOWED,&action_data, &is_allow);
+       if(nRet != DRM_RETURN_SUCCESS) {
+               VideoLogInfo("[ERR]drm_is_action_allowed : %d", nRet);
+               bForwordLock = FALSE;
+               return FALSE;
+       }
+
+       if(is_allow == DRM_TRUE) {
+               bForwordLock = TRUE;
+               return TRUE;
+       }
+
+       return FALSE;
+}
+
+MpVideoDrmInfo *MpVideoDrmCheckLeftRo(char *szVideoTitle, char *szPath)
+{
+       VideoLogInfo("");
+       MpVideoDrmInfo *pResult = NULL;
+       pResult = calloc(1, sizeof(MpVideoDrmInfo));
+
+       if (!szVideoTitle) {
+               VideoLogInfo("[ERR] No has video title.");
+               pResult->nErrorCode = MP_VIDEO_DRM_ERROR_INTERNAL;
+               return pResult;
+       }
+
+       if (!szPath) {
+               VideoLogInfo("[ERR] No has path.");
+               pResult->nErrorCode = MP_VIDEO_DRM_ERROR_INTERNAL;
+               return pResult;
+       }
+
+
+
+       int nRet = DRM_RETURN_SUCCESS;
+       drm_constraint_info_s constraint_info;
+       memset(&constraint_info, 0, sizeof(drm_constraint_info_s));
+       nRet = drm_get_constraint_info(szPath, DRM_PERMISSION_TYPE_PLAY, &constraint_info);
+       if(nRet != DRM_RETURN_SUCCESS) {
+               VideoLogInfo("[ERR]drm_get_file_info : %d", nRet);
+               pResult->nErrorCode = MP_VIDEO_DRM_ERROR_INTERNAL;
+               return pResult;
+       }
+
+       if(constraint_info.const_type.is_unlimited) {
+               VideoLogInfo("Unlimited DRM Contents");
+               pResult->nErrorCode = MP_VIDEO_DRM_ERROR_NONE;
+               return pResult;
+       }
+       else if(constraint_info.const_type.is_count) {
+               if(constraint_info.remaining_count <= 0) {
+                       VideoLogInfo("Count expired : %d / %d",
+                               constraint_info.remaining_count,
+                               constraint_info.original_count);
+                       pResult->nErrorCode = MP_VIDEO_DRM_ERROR_COUNT;
+                       pResult->nData = constraint_info.remaining_count;
+                       return pResult;
+               }
+               else if(constraint_info.remaining_count == 1 ||
+                       constraint_info.remaining_count == 2) {
+                       VideoLogInfo("Count Small : %d / %d",
+                               constraint_info.remaining_count,
+                               constraint_info.original_count);
+                       pResult->nErrorCode = MP_VIDEO_DRM_ERROR_COUNT_SMALL;
+                       pResult->nData = constraint_info.remaining_count;
+                       return pResult;
+               }
+               else {
+                       VideoLogInfo("Count valid : %d / %d",
+                               constraint_info.remaining_count,
+                               constraint_info.original_count);
+                       pResult->nErrorCode = MP_VIDEO_DRM_ERROR_NONE;
+                       pResult->nData = constraint_info.remaining_count;
+                       return pResult;
+               }
+       }
+       else if(constraint_info.const_type.is_datetime) {
+               VideoLogInfo("Start time: Year=%d,Month=%d,Day=%d,"
+                               "Hour=%d, minute=%d, Second=%d",
+                               constraint_info.start_time.tm_year,
+                               constraint_info.start_time.tm_mon,
+                               constraint_info.start_time.tm_mday,
+                               constraint_info.start_time.tm_hour,
+                               constraint_info.start_time.tm_min,
+                               constraint_info.start_time.tm_sec);
+
+
+               VideoLogInfo("End time: Year=%d,Month=%d,Day=%d,"
+                               "Hour=%d, minute=%d, Second=%d",
+                               constraint_info.end_time.tm_year,
+                               constraint_info.end_time.tm_mon,
+                               constraint_info.end_time.tm_mday,
+                               constraint_info.end_time.tm_hour,
+                               constraint_info.end_time.tm_min,
+                               constraint_info.end_time.tm_sec);
+
+               pResult->nErrorCode = MP_VIDEO_DRM_ERROR_NONE;
+               return pResult;
+       }
+       else if(constraint_info.const_type.is_interval) {
+               VideoLogInfo("Interval time: Year=%d,Month=%d,Day=%d,"
+                               "Hour=%d, minute=%d, Second=%d",
+                               constraint_info.interval_time.tm_year,
+                               constraint_info.interval_time.tm_mon,
+                               constraint_info.interval_time.tm_mday,
+                               constraint_info.interval_time.tm_hour,
+                               constraint_info.interval_time.tm_min,
+                               constraint_info.interval_time.tm_sec);
+
+               pResult->nErrorCode = MP_VIDEO_DRM_ERROR_INTERVAL_FIRST_USE;
+               pResult->nData = ((constraint_info.interval_time.tm_year * MOUNTH_COUNT + constraint_info.interval_time.tm_mon) * DAY_COUNT + constraint_info.interval_time.tm_mday);
+               return pResult;
+
+       }
+       else if(constraint_info.const_type.is_timedcount) {
+               VideoLogInfo("DRM TimeCount "
+                       "(original : %d, remainnig : %d, count_timer: %d)",
+                       constraint_info.timed_original_count,
+                       constraint_info.timed_remaining_count,
+                       constraint_info.timed_count_timer);
+               pResult->nErrorCode = MP_VIDEO_DRM_ERROR_NONE;
+               return pResult;
+       }
+       else if(constraint_info.const_type.is_accumulated) {
+               pResult->nErrorCode = MP_VIDEO_DRM_ERROR_ACCUMULATED;
+               return pResult;
+       }
+       else if(constraint_info.const_type.is_individual) {
+               pResult->nErrorCode = MP_VIDEO_DRM_ERROR_NONE;
+               return pResult;
+       }
+       else if(constraint_info.const_type.is_system) {
+               pResult->nErrorCode = MP_VIDEO_DRM_ERROR_NONE;
+               return pResult;
+       }
+
+       return pResult;
+}
+
+bool MpVideoDrmIsDivX(char *szPath)
+{
+       VideoLogInfo("");
+
+       if (!szPath) {
+               VideoLogInfo("[ERR]");
+               return FALSE;
+       }
+
+
+       int nRet = DRM_RETURN_SUCCESS;
+       drm_bool_type_e is_drm =  DRM_FALSE;
+
+       nRet = drm_is_drm_file(szPath, &is_drm);
+       if(nRet != DRM_RETURN_SUCCESS) {
+               VideoLogInfo("[ERR]drm_is_drm_file : %d", nRet);
+               return FALSE;
+       }
+
+       if(is_drm != DRM_TRUE) {
+               VideoLogInfo("It's not drm file.");
+               return FALSE;
+       }
+
+       drm_file_type_e drm_type = DRM_TYPE_UNDEFINED;
+
+       nRet = drm_get_file_type(szPath, &drm_type);
+       if(nRet != DRM_RETURN_SUCCESS) {
+               VideoLogInfo("[ERR]drm_get_file_type : %d", nRet);
+               return FALSE;
+       }
+
+       nDrmFileType = drm_type;
+
+       if(drm_type != DRM_TYPE_DIVX ) {
+               VideoLogInfo("It's not DivX drm file : %d", drm_type);
+               return FALSE;
+       }
+
+       return TRUE;
+
+}
+
+bool MpVideoDrmCheckDivX(char *szPath)
+{
+       VideoLogInfo("");
+
+       if (!szPath) {
+               VideoLogInfo("[ERR]");
+               return FALSE;
+       }
+
+       return TRUE;
+}
+
+void MpVideoDrmGetFileExtension(char *szPath, char *szContentType, int nContentTypeStrSize)
+{
+       if (!szContentType) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       if (!szPath) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       memset(szContentType, 0, nContentTypeStrSize);
+
+       drm_content_info_s content_info;
+       int nRet = DRM_RETURN_SUCCESS;
+       memset(&content_info, 0, sizeof(drm_content_info_s));
+
+       nRet = drm_get_content_info(szPath,&content_info);
+
+
+       VideoLogInfo("contentType: %s", content_info.mime_type);
+
+       strncpy(szContentType, content_info.mime_type, nContentTypeStrSize - 1);
+}
diff --git a/src/mp-external-ug.c b/src/mp-external-ug.c
new file mode 100644 (file)
index 0000000..9aebdfb
--- /dev/null
@@ -0,0 +1,569 @@
+/*
+ * 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 [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
+ * 
+ *    Licensed under the Flora License, Version 1.0 (the "License");
+ *    you may not use this file except in compliance with the License.
+ *    You may obtain a copy of the License at
+ * 
+ *        http://www.tizenopensource.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.
+ */
+
+
+#include <app.h>
+#include <Elementary.h>
+
+#include "mp-util.h"
+#include "mp-video-log.h"
+#include "video-player.h"
+#include "mp-external-ug.h"
+#include "mp-video-value-define.h"
+#include "mp-video-string-define.h"
+#include "mp-video-service-ctrl.h"
+
+
+#define UG_LIST_ITEMS_SIZE_MAX                 32
+#define        UG_SHARE_MENU_ITEM_MAX                  6
+
+
+static ui_gadget_h pUiGadgetHandle = NULL;
+static Ecore_Event_Handler *pHardKeyEventHandler = NULL;
+static MpExternalUGType nCurUGType = MP_EXTERNAL_UG_NONE;
+
+
+static Evas_Object     *pUGPopupHandle = NULL;
+
+
+typedef struct _External_Ug {
+       MpExternalUGType nType;
+       char *szUgName;
+} MpExternalUG;
+
+MpExternalUG st_MpExternalUG[] = {
+       {MP_EXTERNAL_UG_MESSAGE, "msg-composer-efl" },
+       {MP_EXTERNAL_UG_EMAIL, "email-composer-efl" },
+       {MP_EXTERNAL_UG_MYFILE_DETAIL, "myfile-detail-efl" },
+       {MP_EXTERNAL_UG_YOUTUBE, "youtube-efl" },
+       {MP_EXTERNAL_UG_BLUETOOTH, "setting-bluetooth-efl" },
+       {MP_EXTERNAL_UG_FTM, "fileshare-efl" },
+       {MP_EXTERNAL_UG_FACEBOOK, "facebook-efl" },
+};
+
+/*
+ * CALLBACK FUNCTION
+ */
+static Eina_Bool MpExternalUgHardkeyDownCb(void *pUserData, int nType,
+                                          void *pEvent)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR]");
+               return EINA_FALSE;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       MpExternalUGType nExternalUgState = MpExternalUgGetCurUgState();
+
+       if (nExternalUgState <= MP_EXTERNAL_UG_NONE ||
+           nExternalUgState >= MP_EXTERNAL_UG_MAX) {
+               VideoLogInfo
+                   ("Return hardkey callback function because of no UG mode.");
+               return EINA_FALSE;
+       }
+
+       Ecore_Event_Key *pKeyEvent = (Ecore_Event_Key *) pEvent;
+
+       if (!strcmp(pKeyEvent->keyname, KEY_END)) {
+               VideoLogInfo("Bakc(End) key");
+               MpExternalUgUnload();
+               pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlExit(pAppData);
+       }
+       if (!strcmp(pKeyEvent->keyname, HOME_KEY)) {
+               VideoLogInfo("Home key");
+               MpExternalUgUnload();
+               pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlExit(pAppData);
+       }
+
+       return EINA_FALSE;
+}
+
+void MpExternalUgLayoutCb(ui_gadget_h pUiGadget, enum ug_mode nMode, void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+       Evas_Object *pLayoutBase = NULL;
+
+       pLayoutBase = ug_get_layout(pUiGadget);
+       if (!pLayoutBase) {
+               return;
+       }
+
+       switch (nMode) {
+       case UG_MODE_FULLVIEW:
+               evas_object_size_hint_weight_set(pLayoutBase, EVAS_HINT_EXPAND,
+                                                EVAS_HINT_EXPAND);
+               elm_win_resize_object_add(pAppData->pMainWindow, pLayoutBase);
+               evas_object_show(pLayoutBase);
+               break;
+
+       default:
+               VideoLogInfo("[DEFAUT!!!!!!!!]");
+               break;
+       }
+}
+
+void MpExternalUgResultCb(ui_gadget_h pUiGadget, service_h pService, void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+}
+
+void MpExternalUgDestroyCb(ui_gadget_h pUiGadget, void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       MpExternalUgUnload();
+
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlShowLayout(pAppData);
+}
+
+static void MpExternalUGDestroyPopupList(void)
+{
+       VideoLogInfo("");
+
+
+       if(pUGPopupHandle) {
+               evas_object_del(pUGPopupHandle);
+               pUGPopupHandle = NULL;
+       }
+
+       MpUtilSetAlphaOfMainWindow(TRUE);
+}
+
+
+static void MpExternalUGPopupCb(void *pUserData, Evas_Object *pObject,
+                                    void *pEventInfo)
+{
+       VideoLogInfo("");
+
+       if(pUserData == NULL)
+       {
+               VideoLogInfo("[ERR]No have pUserData");
+               return;
+       }
+
+       MpExternalUGDestroyPopupList();
+}
+
+static void MpExternalUgResFn(service_h pRequest, service_h pReply, service_result_e nResult, void *pUserData)
+{
+       if(!pUserData)
+{
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       VideoLogInfo("");
+}
+
+static void MpExternalUGAppSvcLoad(MpExternalUGType nExternalUGType, void *pUserData)
+{
+
+       VideoLogInfo("");
+
+       if (pUserData == NULL) {
+               VideoLogInfo("[ERR]No have pUserData");
+               return;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       service_h pServiceHandle = NULL;
+       int     ret_val = 0;
+       char    pkg_name[STR_LEN_MAX] = {0,};
+
+       if(service_create(&pServiceHandle) != SERVICE_ERROR_NONE)
+       {
+               VideoLogInfo("[ERR]service_create(&pServiceHandle)");
+               return;
+       }
+
+       switch(nExternalUGType)
+       {
+               case MP_EXTERNAL_UG_YOUTUBE:
+                       strncpy(pkg_name,"org.tizen.youtube",STR_LEN_MAX-1);
+                       break;
+
+               case MP_EXTERNAL_UG_FACEBOOK:
+                       strncpy(pkg_name,"org.tizen.facebook",STR_LEN_MAX-1);
+                       break;
+               default:
+                       break;
+       }
+
+       if(service_set_operation(pServiceHandle, SERVICE_OPERATION_SEND) != SERVICE_ERROR_NONE)
+       {
+               if(pServiceHandle)
+               {
+                       service_destroy(pServiceHandle);
+               }
+
+               VideoLogInfo("[ERR]service_set_operation fail.");
+               return;
+       }
+
+       if(nExternalUGType == MP_EXTERNAL_UG_YOUTUBE)
+       {
+               char xwin_id_str[12] = { 0, };
+               Ecore_X_Window xwin_id = (Ecore_X_Window)MpUtilGetMainWindowXID();
+               eina_convert_itoa(xwin_id, xwin_id_str);
+               VideoLogInfo("For YoutTube XID : %s", xwin_id_str);
+               service_add_extra_data(pServiceHandle, "XWINDOW_ID", xwin_id_str);
+       }
+
+       if(service_set_mime(pServiceHandle, "video/*") != SERVICE_ERROR_NONE)
+       {
+               if(pServiceHandle)
+       {
+                       service_destroy(pServiceHandle);
+               }
+
+               VideoLogInfo("[ERR]service_set_mime fail.");
+               return;
+       }
+
+       if(service_set_uri(pServiceHandle, pAppData->szMediaUri) != SERVICE_ERROR_NONE)
+       {
+               if(pServiceHandle)
+               {
+                       service_destroy(pServiceHandle);
+               }
+
+               VideoLogInfo("[ERR]service_set_uri fail.");
+               return;
+       }
+
+
+       if(service_set_package(pServiceHandle, pkg_name) != SERVICE_ERROR_NONE)
+       {
+               if(pServiceHandle)
+       {
+                       service_destroy(pServiceHandle);
+               }
+
+               VideoLogInfo("[ERR]service_set_package fail : %d", ret_val);
+               return;
+       }
+
+       if(service_send_launch_request(pServiceHandle, MpExternalUgResFn, pUserData) != SERVICE_ERROR_NONE)
+       {
+               if(pServiceHandle)
+               {
+                       service_destroy(pServiceHandle);
+       }
+
+               VideoLogInfo("[ERR]service_send_launch_request fail : %d", ret_val);
+               return;
+       }
+
+       service_destroy(pServiceHandle);
+}
+
+static void MpExternalUGSelectListItem(void *pUserData,Evas_Object *pObject,void *pEventInfo)
+{
+       VideoLogInfo("");
+
+       if(pUserData == NULL)
+       {
+               VideoLogInfo("[ERR]No have pUserData");
+               return;
+       }
+
+//     VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       char *pLabel = (char *)elm_object_item_text_get((Elm_Object_Item *) pEventInfo);
+
+       if(pLabel)
+       {
+               MpExternalUGDestroyPopupList();
+
+               VideoLogInfo("Select Controlbar item of popup : %s", pLabel);
+
+               if(!strcmp(pLabel, MP_SHARE_MESSAGE))
+               {
+                       MpExternalUgLoad(MP_EXTERNAL_UG_MESSAGE, pUserData);
+               }
+               else if(!strcmp(pLabel, MP_SHARE_EMAIL))
+               {
+                       MpExternalUgLoad(MP_EXTERNAL_UG_EMAIL, pUserData);
+               }
+               else if(!strcmp(pLabel, MP_SHARE_BLUETOOTH))
+               {
+                       MpExternalUgLoad(MP_EXTERNAL_UG_BLUETOOTH, pUserData);
+               }
+               else if(!strcmp(pLabel, MP_SHARE_FTM))
+               {
+                       MpExternalUgLoad(MP_EXTERNAL_UG_FTM, pUserData);
+               }
+               else if(!strcmp(pLabel, MP_SHARE_FACEBOOK))
+               {
+                       MpExternalUGAppSvcLoad(MP_EXTERNAL_UG_FACEBOOK, pUserData);
+               }
+               else if(!strcmp(pLabel, MP_SHARE_YOUTUBE))
+               {
+                       MpExternalUGAppSvcLoad(MP_EXTERNAL_UG_YOUTUBE, pUserData);
+               }
+       }
+}
+
+/*
+ * External Function
+ */
+bool MpExternalUgLoad(MpExternalUGType nExternalUGType, void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR]");
+               return FALSE;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       struct ug_cbs cbs = { 0, };
+       service_h pService;  //bundle *pBundleHandle = NULL;
+
+
+       cbs.layout_cb = MpExternalUgLayoutCb;
+       cbs.result_cb = MpExternalUgResultCb;
+       cbs.destroy_cb = MpExternalUgDestroyCb;
+       cbs.priv = (void *)pAppData;
+
+       service_create(&pService); //pBundleHandle = bundle_create();
+
+       UG_INIT_EFL(pAppData->pMainWindow, UG_OPT_INDICATOR_ENABLE);
+
+       if(pUiGadgetHandle)
+       {
+               MpExternalUgUnload();
+       }
+
+       switch (nExternalUGType)
+       {
+       case MP_EXTERNAL_UG_MESSAGE:
+               VideoLogInfo("MP_EXTERNAL_UG_MESSAGE");
+               //bundle_add(pBundleHandle, "ATTACHFILE", pAppData->szMediaUri);
+               service_add_extra_data(pService, "ATTACHFILE", pAppData->szMediaUri);
+               break;
+
+       case MP_EXTERNAL_UG_EMAIL:
+               VideoLogInfo("MP_EXTERNAL_UG_EMAIL");
+               //bundle_add(pBundleHandle, "RUN_TYPE", "5");
+               service_add_extra_data(pService, "RUN_TYPE", "5");
+               //bundle_add(pBundleHandle, "ATTACHMENT", pAppData->szMediaUri);
+               service_add_extra_data(pService, "ATTACHMENT", pAppData->szMediaUri);
+               break;
+
+       case MP_EXTERNAL_UG_MYFILE_DETAIL:
+               VideoLogInfo("MP_EXTERNAL_UG_MYFILE_DETAIL");
+               //bundle_add(pBundleHandle, "Path", pAppData->szMediaUri);
+               service_add_extra_data(pService, "Path", pAppData->szMediaUri);
+               break;
+
+       case MP_EXTERNAL_UG_YOUTUBE:
+               VideoLogInfo("MP_EXTERNAL_UG_YOUTUBE");
+               //bundle_add(pBundleHandle, "feature", "video_upload");
+               service_add_extra_data(pService, "feature", "video_upload");
+               //bundle_add(pBundleHandle, "video", pAppData->szMediaUri);
+               service_add_extra_data(pService, "video", pAppData->szMediaUri);
+               break;
+
+       case MP_EXTERNAL_UG_FACEBOOK:
+               VideoLogInfo("MP_EXTERNAL_UG_FACEBOOK");
+               //bundle_add(pBundleHandle, "feature", "video_upload");
+               service_add_extra_data(pService, "feature", "video_upload");
+               //bundle_add(pBundleHandle, "video", pAppData->szMediaUri);
+               service_add_extra_data(pService, "video", pAppData->szMediaUri);
+               break;
+
+       case MP_EXTERNAL_UG_BLUETOOTH:
+               VideoLogInfo("MP_EXTERNAL_UG_BLUETOOTH");
+               //bundle_add(pBundleHandle, "launch-type", "send");
+               service_add_extra_data(pService, "launch-type", "send");
+               //bundle_add(pBundleHandle, "filecount", "1");
+               service_add_extra_data(pService, "filecount", "1");
+               //bundle_add(pBundleHandle, "files", pAppData->szMediaUri);
+               service_add_extra_data(pService, "files", pAppData->szMediaUri);
+               break;
+
+       case MP_EXTERNAL_UG_FTM:
+               VideoLogInfo("MP_EXTERNAL_UG_FTM");
+               //bundle_add(pBundleHandle, "filecount", "1");
+               service_add_extra_data(pService, "filecount", "1");
+               //bundle_add(pBundleHandle, "files", pAppData->szMediaUri);
+               service_add_extra_data(pService, "files", pAppData->szMediaUri);
+               break;
+
+       default:
+               service_destroy(pService); //bundle_free(pBundleHandle);
+               return FALSE;
+       }
+
+       pUiGadgetHandle = ug_create(NULL, st_MpExternalUG[nExternalUGType].szUgName, UG_MODE_FULLVIEW, pService, &cbs);
+
+       nCurUGType = nExternalUGType;
+
+       service_destroy(pService); //bundle_free(pBundleHandle);
+
+       pHardKeyEventHandler = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, (void *)MpExternalUgHardkeyDownCb, pUserData);
+
+       /*  !!!!!SET ROTATE STATE!!!!!  */
+
+       return TRUE;
+}
+
+void MpExternalUgUnload(void)
+{
+       VideoLogInfo("");
+
+       MpExternalUGDestroyPopupList();
+
+       if (pHardKeyEventHandler) {
+               ecore_event_handler_del(pHardKeyEventHandler);
+               pHardKeyEventHandler = NULL;
+       }
+
+       if (pUiGadgetHandle) {
+               ug_destroy(pUiGadgetHandle);
+               pUiGadgetHandle = NULL;
+       }
+
+       nCurUGType = MP_EXTERNAL_UG_NONE;
+}
+
+void MpExternalUgDestroyAll(void)
+{
+       VideoLogInfo("");
+
+       MpExternalUGDestroyPopupList();
+
+       ug_destroy_all();
+}
+
+int MpExternalUgGetCurUgState()
+{
+       VideoLogInfo("");
+
+       return (int)nCurUGType;
+}
+
+void MpExternalUgSetUgState(MpExternalUGType nExternalUGType)
+{
+       VideoLogInfo("");
+
+       nCurUGType = nExternalUGType;
+}
+
+bool MpExternalUgShow(void *pUserData, void *pParent)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR]");
+               return FALSE;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+
+       MpExternalUGDestroyPopupList();
+
+       MpUtilSetAlphaOfMainWindow(FALSE);
+
+       pUGPopupHandle = elm_ctxpopup_add(pParent);
+       elm_ctxpopup_direction_priority_set(pUGPopupHandle, ELM_CTXPOPUP_DIRECTION_DOWN,
+                                               ELM_CTXPOPUP_DIRECTION_RIGHT,
+                                               ELM_CTXPOPUP_DIRECTION_LEFT,
+                                               ELM_CTXPOPUP_DIRECTION_UP);
+
+       elm_object_style_set(pUGPopupHandle, "video/default");
+
+       evas_object_smart_callback_add(pUGPopupHandle, "dismissed", MpExternalUGPopupCb, (void *)pAppData);
+
+       elm_ctxpopup_item_append(pUGPopupHandle, MP_SHARE_MESSAGE, NULL, MpExternalUGSelectListItem, (void *)pAppData);
+       elm_ctxpopup_item_append(pUGPopupHandle, MP_SHARE_EMAIL, NULL, MpExternalUGSelectListItem, (void *)pAppData);
+       elm_ctxpopup_item_append(pUGPopupHandle, MP_SHARE_BLUETOOTH, NULL, MpExternalUGSelectListItem, (void *)pAppData);
+       elm_ctxpopup_item_append(pUGPopupHandle, MP_SHARE_FTM, NULL, MpExternalUGSelectListItem, (void *)pAppData);
+       elm_ctxpopup_item_append(pUGPopupHandle, MP_SHARE_YOUTUBE, NULL, MpExternalUGSelectListItem, (void *)pAppData);
+       elm_ctxpopup_item_append(pUGPopupHandle, MP_SHARE_FACEBOOK, NULL, MpExternalUGSelectListItem, (void *)pAppData);
+
+
+       int nPosX = 0;
+       int nPosY = 0;
+       int nW = 0;
+       int nH = 0;
+
+       if(MpUtilGetRotationState() == VIDEO_ROTATE_PORTRAIT_NORMAL ||
+               MpUtilGetRotationState() == VIDEO_ROTATE_PORTRAIT_REVERSE)
+       {
+               ecore_x_window_size_get(ecore_x_window_root_first_get(),&nW, &nH);
+       }
+       else {
+               ecore_x_window_size_get(ecore_x_window_root_first_get(),&nH, &nW);
+       }
+
+       int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+
+       if(nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY) {
+               nPosX = ((nW / 5)/2) * elm_config_scale_get();
+       }
+       else if(nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE) {
+               nPosX = ((nW / 4)/2) * elm_config_scale_get();
+       }
+       else if(nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL) {
+               nPosX = ((nW / 4)/2) * elm_config_scale_get();
+       }
+       else if(nTmpPlayerType == MP_VIDEO_PLAYER_MMS) {
+               nPosX = ((nW / 4)/2) * elm_config_scale_get();
+       }
+
+       nPosY = elm_config_scale_get() * 200;
+
+       evas_object_move(pUGPopupHandle, nPosX, nPosY);
+
+       evas_object_show(pUGPopupHandle);
+
+       return TRUE;
+}
+void MpExternalUgHide()
+{
+       MpExternalUGDestroyPopupList();
+}
+
+
diff --git a/src/mp-util-media-service.c b/src/mp-util-media-service.c
new file mode 100755 (executable)
index 0000000..678543e
--- /dev/null
@@ -0,0 +1,2417 @@
+/*
+ * 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 [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
+ * 
+ *    Licensed under the Flora License, Version 1.0 (the "License");
+ *    you may not use this file except in compliance with the License.
+ *    You may obtain a copy of the License at
+ * 
+ *        http://www.tizenopensource.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.
+ */
+
+
+
+
+#include <media_content.h>
+
+
+#include "mp-video-log.h"
+#include "mp-video-value-define.h"
+#include "mp-video-type-define.h"
+#include "mp-util-media-service.h"
+#include "mp-video-string-define.h"
+
+
+typedef struct
+{
+       media_folder_h pFolderHandle;
+       char *szFolderUrl;
+}st_FolderItem;
+
+
+static Eina_List *VideoFolderList = NULL;
+static Eina_List *VideoItemList = NULL;
+static int nWhatFileType = MP_MEDIA_VIDEO_FILE_TYPE;
+
+
+bool MpUtilMediaSvcIs3gpFile(char* szFileUri)
+{
+       VideoLogInfo("");
+
+       int nRet = FALSE;
+       char* szTmpUriPath = szFileUri;
+
+       if(szTmpUriPath)
+       {
+               char *szExt = NULL;
+               szExt = strrchr(szTmpUriPath, '.');
+
+               if((szExt != NULL) && ((szExt+1) != NULL))
+               {
+                       if(!strcmp(szExt+1, "3gp"))
+                       {
+                               nRet = TRUE;
+                       }
+                       else
+                       {
+                               nRet = FALSE;
+                       }
+               }
+               else
+               {
+                       VideoLogInfo("No exist extension.");
+                       nRet = FALSE;
+               }
+       }
+       else
+       {
+               VideoLogInfo("No exist file uri.");
+               nRet = FALSE;
+       }
+
+       return nRet;
+}
+
+static bool MpUtilMediaSvcIterateForGetVideoItemCb(media_info_h pVideoItem, void *pUserData)
+{
+       VideoLogInfo("");
+
+       media_info_h *pAssignFolderItem = (media_info_h*)pUserData;
+
+       if(pVideoItem != NULL)
+       {
+               char *szTmpStr = NULL;
+               media_info_clone(pAssignFolderItem, pVideoItem);
+               media_info_get_display_name(*pAssignFolderItem, &szTmpStr);
+               VideoLogInfo("Display name : %s", szTmpStr);
+
+               if(szTmpStr)
+               {
+                       free(szTmpStr);
+               }
+       }
+
+       return FALSE;
+}
+
+static bool MpUtilMediaSvcIterateForVideoItemListViewCb(media_info_h pMediaItem, void *pUserData)
+{
+       VideoLogInfo("");
+
+       media_info_h pAssignMediaItem = NULL;
+       media_content_type_e nMediaType = MEDIA_CONTENT_TYPE_OTHERS;
+
+       media_info_get_media_type(pMediaItem, &nMediaType);
+       VideoLogInfo("nMediaType : %d", nMediaType);
+
+       if(nMediaType == MEDIA_CONTENT_TYPE_VIDEO)
+       {
+               char *szTmpItemFilePath = NULL;
+               char szItemFilePath[STR_LEN_MAX] = {0};
+
+               media_info_get_file_path(pMediaItem, &szTmpItemFilePath);
+               if(szItemFilePath == NULL)
+               {
+                       VideoLogInfo("Fail to get file path of media item.");
+                       return TRUE;
+               }
+
+               strncpy(szItemFilePath, szTmpItemFilePath, STR_LEN_MAX - 1);
+               free(szTmpItemFilePath);
+
+               VideoLogInfo("szItemFilePath : %s", szItemFilePath);
+
+               switch(nWhatFileType)
+               {
+               case MP_MEDIA_VIDEO_FILE_TYPE:
+                       if(MpUtilMediaSvcIs3gpFile(szItemFilePath) == TRUE)
+                       {
+                               return TRUE;
+                       }
+                       break;
+
+               case MP_MEDIA_CAMERA_FILE_TYPE:
+                       if(MpUtilMediaSvcIs3gpFile(szItemFilePath) == FALSE)
+                       {
+                               return TRUE;
+                       }
+                       break;
+
+               case MP_MEDIA_ALL_FILE_TYPE:
+                       break;
+               }
+
+               media_info_clone(&pAssignMediaItem, pMediaItem);
+               Eina_List **pList = (Eina_List **)pUserData;
+               *pList = eina_list_append(*pList, pAssignMediaItem);
+       }
+
+       return TRUE;
+}
+
+static bool MpUtilMediaSvcIterateCb(media_info_h pMediaItem, void *pUserData)
+{
+       VideoLogInfo("");
+
+       media_info_h pAssignMediaItem = NULL;
+       media_content_type_e nMediaType = MEDIA_CONTENT_TYPE_OTHERS;
+
+       media_info_get_media_type(pMediaItem, &nMediaType);
+       VideoLogInfo("nMediaType : %d", nMediaType);
+
+       if(nMediaType == MEDIA_CONTENT_TYPE_VIDEO)
+       {
+               media_info_clone(&pAssignMediaItem, pMediaItem);
+               Eina_List **pList = (Eina_List **)pUserData;
+               *pList = eina_list_append(*pList, pAssignMediaItem);
+       }
+
+       return TRUE;
+}
+
+static bool MpUtilMediaSvcIterateForGetFolderCb(media_folder_h pFolderItem, void *pUserData)
+{
+       VideoLogInfo("");
+
+       media_folder_h *pAssignFolderItem = (media_folder_h*)pUserData;
+
+       if(pFolderItem != NULL)
+       {
+               char *szTmpStr = NULL;
+               media_folder_clone(pAssignFolderItem, pFolderItem);
+               media_folder_get_name(*pAssignFolderItem, &szTmpStr);
+               VideoLogInfo("Folder name : %s", szTmpStr);
+
+               if(szTmpStr)
+               {
+                       free(szTmpStr);
+               }
+       }
+
+       return FALSE;
+}
+
+static bool MpUtilMediaSvcIterateForFolderListCb(media_folder_h pFolderItem, void *pUserData)
+{
+       VideoLogInfo("");
+
+       media_folder_h pAssignFolderItem = NULL;
+       media_folder_clone(&pAssignFolderItem, pFolderItem);
+       Eina_List **pList = (Eina_List **)pUserData;
+       *pList = eina_list_append(*pList, pAssignFolderItem);
+
+       return TRUE;
+}
+
+static bool MpUtilMediaSvcIterateGetTagCb(media_tag_h pTagItem, void *pUserData)
+{
+       VideoLogInfo("");
+
+       media_tag_h *pAssignTagItem = (media_tag_h*)pUserData;
+
+       if(!pTagItem)
+       {
+               char *szTmpStr = NULL;
+               media_tag_clone(pAssignTagItem, pTagItem);
+               media_tag_get_name(*pAssignTagItem, &szTmpStr);
+               VideoLogInfo("szTagName : %s", szTmpStr);
+
+               if(szTmpStr)
+               {
+                       free(szTmpStr);
+               }
+       }
+
+       return FALSE;
+}
+
+static bool MpUtilMediaSvcIterateGetVideoItemOfTagCb(media_info_h media, void *pUserData)
+{
+       VideoLogInfo("");
+
+       return TRUE;
+}
+
+//
+// Internal function
+//
+bool MpUtilMediaSvcGetFileDirectoryName(char *szFilePath, char *szFileName, char *szDirectoryName, char *szDirectoryPath)
+{
+       VideoLogInfo("");
+
+       if(!szFilePath)
+       {
+               VideoLogInfo("[ERR]");
+               return FALSE;
+       }
+
+       int nCount = 0;
+       int nLoopCount = 0;
+
+       for(nLoopCount = strlen(szFilePath); nLoopCount >= 0; nLoopCount--)
+       {
+               if (szFilePath[nLoopCount] != '\0')
+               {
+                       nCount++;
+               }
+
+               if(szFilePath[nLoopCount] == '/')
+               {
+                       if(szFileName)
+                       {
+                               memcpy(szFileName, &szFilePath[nLoopCount + 1], --nCount);
+                               *(szFileName + nCount) = '\0';
+                               VideoLogInfo("File name = %s\n", szFileName);
+                       }
+
+                       if(szDirectoryPath)
+                       {
+                               memcpy(szDirectoryPath, &szFilePath[0], nLoopCount);
+                               *(szDirectoryPath + nLoopCount + 1) = '\0';
+                               VideoLogInfo("Directory path = %s", szDirectoryPath);
+                       }
+
+                       if(szDirectoryName)
+                       {
+                               nCount = 0;
+                               for(--nLoopCount; nLoopCount >= 0; nLoopCount--)
+                               {
+                                       nCount++;
+                                       if(szFilePath[nLoopCount] == '/')
+                                       {
+                                               memcpy(szDirectoryName, &szFilePath[nLoopCount + 1], --nCount);
+                                               *(szDirectoryName + nCount) = '\0';
+                                               VideoLogInfo("Directory Name = %s", szDirectoryName);
+
+                                               return TRUE;
+                                       }
+                               }
+                       }
+
+                       return TRUE;
+               }
+       }
+
+       return FALSE;
+}
+
+//
+// External function
+//
+
+void MpUtilMediaSvcInitSession(void)
+{
+       VideoLogInfo("");
+
+       if(media_content_connect() != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to connect to media content db.");
+       }
+       else
+       {
+               VideoLogInfo("Success to connect to media content db.");
+       }
+}
+
+void MpUtilMediaSvcFinishSession(void)
+{
+       VideoLogInfo("");
+
+       if(media_content_disconnect() != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to disconnect from media content db.");
+               return;
+       }
+
+
+       VideoLogInfo("Success to disconnect from media content db.");
+       return;
+}
+
+bool MpUtilMediaSvcDestoryVideoItemList(void)
+{
+       if(!VideoItemList)
+       {
+               VideoLogInfo("VideoItemList is empty already.");
+               return FALSE;
+       }
+
+       media_info_h pTmpVideoItem = NULL;
+       EINA_LIST_FREE(VideoItemList, pTmpVideoItem)
+       {
+               if(pTmpVideoItem)
+               {
+                       media_info_destroy(pTmpVideoItem);
+               }
+       }
+
+       VideoItemList = NULL;
+
+       return TRUE;
+}
+
+bool MpUtilMediaSvcExtractVideoListFromFolder(char *szFolderPath, int nSortType)
+{
+       if(VideoItemList)
+       {
+               VideoLogInfo("Already exist video list.");
+               return FALSE;
+       }
+
+       if(!szFolderPath || strlen(szFolderPath) <= 0)
+       {
+               VideoLogInfo("[ERR]");
+               return FALSE;
+       }
+
+       VideoLogInfo("");
+
+       filter_h m_FilterHandle = NULL;
+       media_folder_h m_FolderHandle = NULL;
+       media_content_order_e nOrderType = MEDIA_CONTENT_ORDER_ASC;
+
+       char *szFolderID = NULL;
+       char szTmpStr[STR_LEN_MAX] = {0};
+       char szOrderObj[STR_LEN_MAX] = {0};
+
+       switch(nSortType)
+       {
+       case MP_MEDIA_SORT_BY_NONE:
+       case MP_MEDIA_SORT_BY_NAME_ASC:
+               nOrderType = MEDIA_CONTENT_ORDER_ASC;
+               strncpy(szOrderObj, MEDIA_TITLE, STR_LEN_MAX - 1);
+               break;
+
+       case MP_MEDIA_SORT_BY_NAME_DESC:
+               nOrderType = MEDIA_CONTENT_ORDER_DESC;
+               strncpy(szOrderObj, MEDIA_TITLE, STR_LEN_MAX - 1);
+               break;
+
+       case MP_MEDIA_SORT_BY_DATE_MOST_RECENT:
+               nOrderType = MEDIA_CONTENT_ORDER_DESC;
+               strncpy(szOrderObj, MEDIA_YEAR, STR_LEN_MAX - 1);
+               break;
+
+       case MP_MEDIA_SORT_BY_OLDEST:
+               nOrderType = MEDIA_CONTENT_ORDER_ASC;
+               strncpy(szOrderObj, MEDIA_YEAR, STR_LEN_MAX - 1);
+               break;
+
+       default:
+               nOrderType = MEDIA_CONTENT_ORDER_ASC;
+               strncpy(szOrderObj, MEDIA_TITLE, STR_LEN_MAX - 1);
+       }
+
+       if(media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to create media filter handle.");
+               return FALSE;
+       }
+
+       snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 and FOLDER_PATH = \"%s\"", szFolderPath);
+       if(media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to set filter condition.");
+               media_filter_destroy(m_FilterHandle);
+               return FALSE;
+       }
+
+       if(media_folder_foreach_folder_from_db(m_FilterHandle, MpUtilMediaSvcIterateForGetFolderCb, &m_FolderHandle) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail media_folder_foreach_folder_from_db().");
+               media_filter_destroy(m_FilterHandle);
+               return FALSE;
+       }
+
+       if(!m_FolderHandle)
+       {
+               VideoLogInfo("Fail to get folder handle.");
+               media_filter_destroy(m_FilterHandle);
+               return FALSE;
+       }
+
+       snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1");
+       if(media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to set filter condition.");
+               media_filter_destroy(m_FilterHandle);
+               return FALSE;
+       }
+
+       if(media_filter_set_order(m_FilterHandle, nOrderType, szOrderObj, MEDIA_CONTENT_COLLATE_NOCASE) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to set order.");
+               media_filter_destroy(m_FilterHandle);
+               return FALSE;
+       }
+
+       if(media_folder_get_folder_id(m_FolderHandle, &szFolderID) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to get folder id.");
+               media_filter_destroy(m_FilterHandle);
+               return FALSE;
+       }
+
+       if(media_folder_foreach_media_from_db(szFolderID, m_FilterHandle, MpUtilMediaSvcIterateCb, &VideoItemList) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to set order.");
+               media_filter_destroy(m_FilterHandle);
+               return FALSE;
+       }
+
+       if(media_filter_destroy(m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to destroy media filter handle.");
+       }
+
+       if(szFolderID)
+       {
+               free(szFolderID);
+               szFolderID = NULL;
+       }
+
+       return TRUE;
+}
+
+bool MpUtilMediaSvcExtractVideoListFromAllFolderOfGallery(int nSortType)
+{
+       if(VideoItemList)
+       {
+               VideoLogInfo("Already exist video list.");
+               return FALSE;
+       }
+
+       VideoLogInfo("");
+
+       filter_h m_FilterHandle = NULL;
+       media_content_order_e nOrderType = MEDIA_CONTENT_ORDER_ASC;
+       char szOrderObj[STR_LEN_MAX] = {0};
+
+       switch(nSortType)
+       {
+       case MP_MEDIA_SORT_BY_NONE:
+       case MP_MEDIA_SORT_BY_NAME_ASC:
+               nOrderType = MEDIA_CONTENT_ORDER_ASC;
+               strncpy(szOrderObj, MEDIA_TITLE, STR_LEN_MAX - 1);
+               break;
+
+       case MP_MEDIA_SORT_BY_NAME_DESC:
+               nOrderType = MEDIA_CONTENT_ORDER_DESC;
+               strncpy(szOrderObj, MEDIA_TITLE, STR_LEN_MAX - 1);
+               break;
+
+       case MP_MEDIA_SORT_BY_DATE_MOST_RECENT:
+               nOrderType = MEDIA_CONTENT_ORDER_DESC;
+               strncpy(szOrderObj, MEDIA_YEAR, STR_LEN_MAX - 1);
+               break;
+
+       case MP_MEDIA_SORT_BY_OLDEST:
+               nOrderType = MEDIA_CONTENT_ORDER_ASC;
+               strncpy(szOrderObj, MEDIA_YEAR, STR_LEN_MAX - 1);
+               break;
+
+       default:
+               nOrderType = MEDIA_CONTENT_ORDER_ASC;
+               strncpy(szOrderObj, MEDIA_TITLE, STR_LEN_MAX - 1);
+       }
+
+       if(media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to create media filter handle.");
+               return FALSE;
+       }
+
+       if(media_filter_set_condition(m_FilterHandle, MEDIA_TYPE" = 1", MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to set filter condition.");
+               media_filter_destroy(m_FilterHandle);
+               return FALSE;
+       }
+
+       if(media_filter_set_order(m_FilterHandle, nOrderType, szOrderObj, MEDIA_CONTENT_COLLATE_NOCASE) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to set order.");
+               media_filter_destroy(m_FilterHandle);
+               return FALSE;
+       }
+
+       if(media_info_foreach_media_from_db(m_FilterHandle, MpUtilMediaSvcIterateCb, &VideoItemList) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to get video item list with filter condition.");
+               media_filter_destroy(m_FilterHandle);
+               return FALSE;
+       }
+
+       if(media_filter_destroy(m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to destroy media filter handle.");
+               return FALSE;
+       }
+
+       return TRUE;
+}
+
+bool MpUtilMediaSvcExtractVideoListForListView(int nSortType)
+{
+       if(VideoItemList)
+       {
+               VideoLogInfo("Already exist video list.");
+               return FALSE;
+       }
+
+       VideoLogInfo("");
+
+       filter_h m_FilterHandle = NULL;
+       media_content_order_e nOrderType = MEDIA_CONTENT_ORDER_ASC;
+       char szOrderObj[STR_LEN_MAX] = {0};
+
+       switch(nSortType)
+       {
+       case MP_MEDIA_SORT_BY_NONE:
+       case MP_MEDIA_SORT_BY_NAME_ASC:
+               nOrderType = MEDIA_CONTENT_ORDER_ASC;
+               strncpy(szOrderObj, MEDIA_TITLE, STR_LEN_MAX - 1);
+               break;
+
+       case MP_MEDIA_SORT_BY_NAME_DESC:
+               nOrderType = MEDIA_CONTENT_ORDER_DESC;
+               strncpy(szOrderObj, MEDIA_TITLE, STR_LEN_MAX - 1);
+               break;
+
+       case MP_MEDIA_SORT_BY_DATE_MOST_RECENT:
+               nOrderType = MEDIA_CONTENT_ORDER_DESC;
+               strncpy(szOrderObj, MEDIA_MODIFIED_TIME, STR_LEN_MAX - 1);
+               break;
+
+       case MP_MEDIA_SORT_BY_OLDEST:
+               nOrderType = MEDIA_CONTENT_ORDER_ASC;
+               strncpy(szOrderObj, MEDIA_MODIFIED_TIME, STR_LEN_MAX - 1);
+               break;
+
+       default:
+               nOrderType = MEDIA_CONTENT_ORDER_ASC;
+               strncpy(szOrderObj, MEDIA_TITLE, STR_LEN_MAX - 1);
+       }
+
+       if(media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to create media filter handle.");
+               return FALSE;
+       }
+
+       if(media_filter_set_condition(m_FilterHandle, MEDIA_TYPE" = 1", MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to set filter condition.");
+               media_filter_destroy(m_FilterHandle);
+               return FALSE;
+       }
+
+       if(media_filter_set_order(m_FilterHandle, nOrderType, szOrderObj, MEDIA_CONTENT_COLLATE_NOCASE) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to set order.");
+               media_filter_destroy(m_FilterHandle);
+               return FALSE;
+       }
+
+       if(media_info_foreach_media_from_db(m_FilterHandle, MpUtilMediaSvcIterateForVideoItemListViewCb, &VideoItemList) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to get video item list with filter condition.");
+               media_filter_destroy(m_FilterHandle);
+               return FALSE;
+       }
+
+       if(media_filter_destroy(m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to destroy media filter handle.");
+               return FALSE;
+       }
+
+       return TRUE;
+}
+
+bool MpUtilMediaSvcExtractVideoListVideoType(int nSortType)
+{
+       VideoLogInfo("");
+
+       nWhatFileType = MP_MEDIA_VIDEO_FILE_TYPE;
+
+       return MpUtilMediaSvcExtractVideoListForListView(nSortType);
+}
+
+bool MpUtilMediaSvcExtractVideoListRecordedType(int nSortType)
+{
+       VideoLogInfo("");
+
+       nWhatFileType = MP_MEDIA_CAMERA_FILE_TYPE;
+
+       return MpUtilMediaSvcExtractVideoListForListView(nSortType);
+}
+
+bool MpUtilMediaSvcExtractVideoListByTagName(char *szTagName)
+{
+       VideoLogInfo("");
+
+       if(!szTagName)
+       {
+               VideoLogInfo("[ERR] No Exist tag name.");
+               return FALSE;
+       }
+
+       if(VideoItemList)
+       {
+               VideoLogInfo("Already exist video list.");
+               return FALSE;
+       }
+
+       VideoLogInfo("szTagName : %s", szTagName);
+
+       int nTagID = 0;
+       char szTmpStr[STR_LEN_MAX] = {0};
+
+       media_tag_h pTagHandle = NULL;
+       filter_h m_FilterHandle = NULL;
+
+       if(media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to create media filter handle.");
+               return FALSE;
+       }
+
+       //snprintf(szTmpStr, STR_LEN_MAX-1, "TAG_NAME like \"%s\"", szTagName);//snprintf(szTmpStr, STR_LEN_MAX-1, "TAG_NAME like \"\%%s\%\"", szTagName);
+       snprintf(szTmpStr, STR_LEN_MAX-1, "TAG_NAME like \"%%%s%%\"", szTagName);
+       if(media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to set filter condition.");
+               media_filter_destroy(m_FilterHandle);
+               return FALSE;
+       }
+
+       if(media_filter_set_order(m_FilterHandle, MEDIA_CONTENT_ORDER_ASC, TAG_NAME, MEDIA_CONTENT_COLLATE_NOCASE) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to set order.");
+               media_filter_destroy(m_FilterHandle);
+               return FALSE;
+       }
+
+       if(media_tag_foreach_tag_from_db(m_FilterHandle, MpUtilMediaSvcIterateGetTagCb, &pTagHandle) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail media_tag_foreach_tag_from_db().");
+               media_filter_destroy(m_FilterHandle);
+               return FALSE;
+       }
+
+       if(!pTagHandle)
+       {
+               VideoLogInfo("Fail to get pTagHandle.");
+               return FALSE;
+       }
+
+       if(media_tag_get_tag_id(pTagHandle, &nTagID) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to get tag ID.");
+               return FALSE;
+       }
+
+       VideoLogInfo("nTagID : %d", nTagID);
+
+       memset(szTmpStr, 0, STR_LEN_MAX);
+       snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1");
+       if(media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to set filter condition.");
+               media_filter_destroy(m_FilterHandle);
+               return FALSE;
+       }
+
+       if(media_filter_set_order(m_FilterHandle, MEDIA_CONTENT_ORDER_ASC, MEDIA_TITLE, MEDIA_CONTENT_COLLATE_NOCASE) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to set order.");
+               media_filter_destroy(m_FilterHandle);
+               return FALSE;
+       }
+
+       if(media_tag_foreach_media_from_db(nTagID, m_FilterHandle, MpUtilMediaSvcIterateGetVideoItemOfTagCb, VideoItemList) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail media_tag_foreach_media_from_db().");
+               media_filter_destroy(m_FilterHandle);
+               return FALSE;
+       }
+
+       if(media_filter_destroy(m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to destroy media filter handle.");
+               return FALSE;
+       }
+
+       return TRUE;
+}
+
+bool MpUtilMediaSvcExtractVideoListFromFavorite(int nSortType)
+{
+       if(VideoItemList)
+       {
+               VideoLogInfo("Already exist video list.");
+               return FALSE;
+       }
+
+       VideoLogInfo("");
+
+       filter_h m_FilterHandle = NULL;
+       media_content_order_e nOrderType = MEDIA_CONTENT_ORDER_ASC;
+       char szOrderObj[STR_LEN_MAX] = {0};
+       char szTmpStr[STR_LEN_MAX] = {0};
+
+       nWhatFileType = MP_MEDIA_ALL_FILE_TYPE;
+
+       switch(nSortType)
+       {
+       case MP_MEDIA_SORT_BY_NONE:
+       case MP_MEDIA_SORT_BY_NAME_ASC:
+               nOrderType = MEDIA_CONTENT_ORDER_ASC;
+               strncpy(szOrderObj, MEDIA_TITLE, STR_LEN_MAX - 1);
+               break;
+
+       case MP_MEDIA_SORT_BY_NAME_DESC:
+               nOrderType = MEDIA_CONTENT_ORDER_DESC;
+               strncpy(szOrderObj, MEDIA_TITLE, STR_LEN_MAX - 1);
+               break;
+
+       case MP_MEDIA_SORT_BY_DATE_MOST_RECENT:
+               nOrderType = MEDIA_CONTENT_ORDER_DESC;
+               strncpy(szOrderObj, MEDIA_YEAR, STR_LEN_MAX - 1);
+               break;
+
+       case MP_MEDIA_SORT_BY_OLDEST:
+               nOrderType = MEDIA_CONTENT_ORDER_ASC;
+               strncpy(szOrderObj, MEDIA_YEAR, STR_LEN_MAX - 1);
+               break;
+
+       default:
+               nOrderType = MEDIA_CONTENT_ORDER_ASC;
+               strncpy(szOrderObj, MEDIA_TITLE, STR_LEN_MAX - 1);
+       }
+
+       if(media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to create media filter handle.");
+               return FALSE;
+       }
+
+       snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 and MEDIA_FAVOURITE = 1");
+       if(media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to set filter condition.");
+               media_filter_destroy(m_FilterHandle);
+               return FALSE;
+       }
+
+       if(media_filter_set_order(m_FilterHandle, nOrderType, szOrderObj, MEDIA_CONTENT_COLLATE_NOCASE) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to set order.");
+               media_filter_destroy(m_FilterHandle);
+               return FALSE;
+       }
+
+       if(media_info_foreach_media_from_db(m_FilterHandle, MpUtilMediaSvcIterateForVideoItemListViewCb, &VideoItemList) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to get video item list with filter condition.");
+               media_filter_destroy(m_FilterHandle);
+               return FALSE;
+       }
+
+       if(media_filter_destroy(m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to destroy media filter handle.");
+               return FALSE;
+       }
+
+       return TRUE;
+}
+
+bool MpUtilMediaSvcExtractVideoListForSearchView(const char *keyword)
+{
+       if(VideoItemList)
+       {
+               VideoLogInfo("Already exist video list.");
+               return FALSE;
+       }
+
+       VideoLogInfo("");
+
+       int nSortType = MP_MEDIA_SORT_BY_NAME_ASC;
+       filter_h m_FilterHandle = NULL;
+       media_content_order_e nOrderType = MEDIA_CONTENT_ORDER_ASC;
+       char szOrderObj[STR_LEN_MAX] = {0};
+       char szTmpStr[STR_LEN_MAX] = {0};
+
+       nWhatFileType = MP_MEDIA_ALL_FILE_TYPE;
+
+       switch(nSortType)
+       {
+       case MP_MEDIA_SORT_BY_NONE:
+       case MP_MEDIA_SORT_BY_NAME_ASC:
+               nOrderType = MEDIA_CONTENT_ORDER_ASC;
+               strncpy(szOrderObj, MEDIA_TITLE, STR_LEN_MAX - 1);
+               break;
+
+       case MP_MEDIA_SORT_BY_NAME_DESC:
+               nOrderType = MEDIA_CONTENT_ORDER_DESC;
+               strncpy(szOrderObj, MEDIA_TITLE, STR_LEN_MAX - 1);
+               break;
+
+       case MP_MEDIA_SORT_BY_DATE_MOST_RECENT:
+               nOrderType = MEDIA_CONTENT_ORDER_DESC;
+               strncpy(szOrderObj, MEDIA_YEAR, STR_LEN_MAX - 1);
+               break;
+
+       case MP_MEDIA_SORT_BY_OLDEST:
+               nOrderType = MEDIA_CONTENT_ORDER_ASC;
+               strncpy(szOrderObj, MEDIA_YEAR, STR_LEN_MAX - 1);
+               break;
+
+       default:
+               nOrderType = MEDIA_CONTENT_ORDER_ASC;
+               strncpy(szOrderObj, MEDIA_TITLE, STR_LEN_MAX - 1);
+       }
+
+       if(media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to create media filter handle.");
+               return FALSE;
+       }
+
+       snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1 and MEDIA_TITLE like \"%%%s%%\"", keyword);
+       if(media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to set filter condition.");
+               media_filter_destroy(m_FilterHandle);
+               return FALSE;
+       }
+
+       if(media_filter_set_order(m_FilterHandle, nOrderType, szOrderObj, MEDIA_CONTENT_COLLATE_NOCASE) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to set order.");
+               media_filter_destroy(m_FilterHandle);
+               return FALSE;
+       }
+
+       if(media_info_foreach_media_from_db(m_FilterHandle, MpUtilMediaSvcIterateForVideoItemListViewCb, &VideoItemList) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to get video item list with filter condition.");
+               media_filter_destroy(m_FilterHandle);
+               return FALSE;
+       }
+
+       if(media_filter_destroy(m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to destroy media filter handle.");
+               return FALSE;
+       }
+
+       return TRUE;
+}
+
+
+void MpUtilMediaSvcDestoryVideoList(void)
+{
+       VideoLogInfo("");
+
+       if(VideoFolderList)
+       {
+               MpUtilMediaSvcDestoryVideoFolderList();
+               VideoFolderList = NULL;
+       }
+
+       if(VideoItemList)
+       {
+               MpUtilMediaSvcDestoryVideoItemList();
+               VideoItemList = NULL;
+       }
+}
+
+bool MpUtilMediaSvcRemoveItemByUrlWithList(char *szFilePath)
+{
+       if(!szFilePath)
+       {
+               VideoLogInfo("[ERR]");
+               return FALSE;
+       }
+
+       if(!VideoItemList)
+       {
+               VideoLogInfo("pList is empty already.");
+               return FALSE;
+       }
+
+       VideoLogInfo("szFilePath : %s", szFilePath);
+
+       char *szGetFilePath = NULL;
+       media_info_h pItem = NULL;
+       Eina_List *pIterateList = NULL;
+       EINA_LIST_FOREACH(VideoItemList, pIterateList, pItem)
+       {
+               if(pItem)
+               {
+                       if(media_info_get_file_path(pItem, &szGetFilePath) == MEDIA_CONTENT_ERROR_NONE)
+                       {
+                               if(szGetFilePath)
+                               {
+                                       if(!strcmp(szGetFilePath, szFilePath))
+                                       {
+                                               VideoLogInfo("Find %s", szGetFilePath);
+                                               char *szMediaID = NULL;
+                                               media_info_get_media_id(pItem, &szMediaID);
+                                               media_info_delete_from_db(szMediaID);
+                                               VideoItemList = eina_list_remove(VideoItemList, pItem);
+                                               media_info_destroy(pItem);
+
+                                               if(szMediaID)
+                                               {
+                                                       free(szMediaID);
+                                               }
+
+                                               if(szGetFilePath)
+                                               {
+                                                       free(szGetFilePath);
+                                               }
+
+                                               return TRUE;
+                                       }
+                               }
+                               else
+                               {
+                                       VideoLogInfo("No exist %s in media info Database module.", szFilePath);
+                                       return FALSE;
+                               }
+                       }
+               }
+       }
+       return FALSE;
+}
+
+bool MpUtilMediaSvcRemoveItemByListIndex(int nVideoItemIndex)
+{
+       VideoLogInfo("nVideoItemIndex : %d", nVideoItemIndex);
+
+       if(!VideoItemList)
+       {
+               VideoLogInfo("pList is empty already.");
+               return FALSE;
+       }
+
+       media_info_h pItem = eina_list_nth(VideoItemList, nVideoItemIndex);
+
+       if(pItem)
+       {
+               char *szMediaID = NULL;
+               media_info_get_media_id(pItem, &szMediaID);
+               if(szMediaID)
+               {
+                       media_info_delete_from_db(szMediaID);
+                       VideoItemList = eina_list_remove(VideoItemList, pItem);
+                       free(szMediaID);
+                       media_info_destroy(pItem);
+               }
+               else
+               {
+                       VideoLogInfo("No exist media ID in index %d of list.", nVideoItemIndex);
+                       return FALSE;
+               }
+       }
+       else
+       {
+               VideoLogInfo("Fail to remove item in media svc and list.");
+               return FALSE;
+       }
+
+       return TRUE;
+}
+
+bool MpUtilMediaSvcRemoveItemByListIndexWithoutListItem(int nVideoItemIndex)
+{
+       VideoLogInfo("nVideoItemIndex : %d", nVideoItemIndex);
+
+       if(!VideoItemList)
+       {
+               VideoLogInfo("pList is empty already.");
+               return FALSE;
+       }
+
+       media_info_h pItem = eina_list_nth(VideoItemList, nVideoItemIndex);
+
+       if(pItem)
+       {
+               char *szMediaID = NULL;
+               media_info_get_media_id(pItem, &szMediaID);
+               if(szMediaID)
+               {
+                       media_info_delete_from_db(szMediaID);
+                       free(szMediaID);
+               }
+               else
+               {
+                       VideoLogInfo("No exist media ID in index %d of list.", nVideoItemIndex);
+                       return FALSE;
+               }
+       }
+       else
+       {
+               VideoLogInfo("Fail to remove item in media svc and list.");
+               return FALSE;
+       }
+
+       return TRUE;
+}
+
+
+bool MpUtilMediaSvcGetVideoIDByVideoUri(const char *szPath, char *szVideoID)
+{
+       VideoLogInfo("");
+
+       media_info_h pVideoItem = NULL;
+       filter_h m_FilterHandle = NULL;
+       char szTmpStr[STR_LEN_MAX] = {0};
+       bool bRet = FALSE;
+
+       if(media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to create media filter handle.");
+               bRet = FALSE;
+       }
+
+       snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_PATH = \"%s\"", szPath);
+       if(media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to set filter condition.");
+               media_filter_destroy(m_FilterHandle);
+               bRet = FALSE;
+       }
+
+       if(media_info_foreach_media_from_db(m_FilterHandle, MpUtilMediaSvcIterateForGetVideoItemCb, &pVideoItem) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to get video item list with filter condition.");
+               media_filter_destroy(m_FilterHandle);
+               bRet = FALSE;
+       }
+
+       if(media_filter_destroy(m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to destroy media filter handle.");
+               bRet = FALSE;
+       }
+
+       if(pVideoItem)
+       {
+               char *szMediaID = NULL;
+               media_info_get_media_id(pVideoItem, &szMediaID);
+               if(szMediaID)
+               {
+                       strncpy(szVideoID, szMediaID, STR_LEN_MAX-2);
+                       free(szMediaID);
+               }
+               media_info_destroy(pVideoItem);
+               bRet = TRUE;
+       }
+       else
+       {
+               bRet = FALSE;
+       }
+
+       return bRet;
+}
+
+unsigned int MpUtilMediaSvcGetVideoLastPlayTimeByVideoUri(const char *szPath)
+{
+       if(!szPath)
+       {
+               VideoLogInfo("No exist video path.");
+               return 0;
+       }
+
+       VideoLogInfo("szPath : %s", szPath);
+
+       time_t LastPlayedTime = 0;
+       media_info_h pVideoItem = NULL;
+       filter_h m_FilterHandle = NULL;
+       char szTmpStr[STR_LEN_MAX] = {0};
+
+       if(media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to create media filter handle.");
+               return FALSE;
+       }
+
+       //snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_PATH = \"%s\"", szPath);
+       snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_PATH = \"%s\"", szPath);
+       if(media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to set filter condition.");
+               media_filter_destroy(m_FilterHandle);
+               return FALSE;
+       }
+
+       if(media_info_foreach_media_from_db(m_FilterHandle, MpUtilMediaSvcIterateForGetVideoItemCb, &pVideoItem) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to get video item list with filter condition.");
+               media_filter_destroy(m_FilterHandle);
+               return FALSE;
+       }
+
+       if(media_filter_destroy(m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to destroy media filter handle.");
+               return FALSE;
+       }
+
+       if(pVideoItem)
+       {
+               video_meta_h pVideoMetaHandle = NULL;
+               if(media_info_get_video(pVideoItem, &pVideoMetaHandle) == MEDIA_CONTENT_ERROR_NONE)
+               {
+                       char *szTmpStr = NULL;
+                       video_meta_get_title(pVideoMetaHandle, &szTmpStr);
+                       if(szTmpStr)
+                       {
+                               VideoLogInfo("Title : %s", szTmpStr);
+                               free(szTmpStr);
+                       }
+                       else
+                       {
+                               VideoLogInfo("No exist title");
+                       }
+
+                       video_meta_get_played_time(pVideoMetaHandle, &LastPlayedTime);
+                       VideoLogInfo("Last Played Time : %d", LastPlayedTime);
+                       video_meta_destroy(pVideoMetaHandle);
+               }
+               media_info_destroy(pVideoItem);
+       }
+
+       return (unsigned int)LastPlayedTime;
+}
+
+unsigned int MpUtilMediaSvcGetVideoDurationByVideoUri(const char *szPath)
+{
+       if(!szPath)
+       {
+               VideoLogInfo("No exist video path.");
+               return 0;
+       }
+
+       VideoLogInfo("szPath : %s", szPath);
+
+       int nDurationTime = 0;
+       media_info_h pVideoItem = NULL;
+       filter_h m_FilterHandle = NULL;
+       char szTmpStr[STR_LEN_MAX] = {0};
+
+       if(media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to create media filter handle.");
+               return FALSE;
+       }
+
+       snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_PATH = \"%s\"", szPath);
+       if(media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to set filter condition.");
+               media_filter_destroy(m_FilterHandle);
+               return FALSE;
+       }
+
+       if(media_info_foreach_media_from_db(m_FilterHandle, MpUtilMediaSvcIterateForGetVideoItemCb, &pVideoItem) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to get video item list with filter condition.");
+               media_filter_destroy(m_FilterHandle);
+               return FALSE;
+       }
+
+       if(media_filter_destroy(m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to destroy media filter handle.");
+               return FALSE;
+       }
+
+       if(pVideoItem)
+       {
+               video_meta_h pVideoMetaHandle = NULL;
+               if(media_info_get_video(pVideoItem, &pVideoMetaHandle) == MEDIA_CONTENT_ERROR_NONE)
+               {
+                       video_meta_get_duration(pVideoMetaHandle, &nDurationTime);
+                       VideoLogInfo("Duration time : %d", nDurationTime);
+                       video_meta_destroy(pVideoMetaHandle);
+               }
+               media_info_destroy(pVideoItem);
+       }
+
+       return (unsigned int)nDurationTime;
+}
+
+int MpUtilMediaSvcGetVideoFilesizeByVideoUri(const char *szPath)
+{
+       if(!szPath)
+       {
+               VideoLogInfo("No exist video path.");
+               return 0;
+       }
+
+       VideoLogInfo("szPath : %s", szPath);
+
+       unsigned long long nSize = 0;
+       media_info_h pVideoItem = NULL;
+       filter_h m_FilterHandle = NULL;
+       char szTmpStr[STR_LEN_MAX] = {0};
+
+       if(media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to create media filter handle.");
+               return FALSE;
+       }
+
+       snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_PATH = \"%s\"", szPath);
+       if(media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to set filter condition.");
+               media_filter_destroy(m_FilterHandle);
+               return FALSE;
+       }
+
+       if(media_info_foreach_media_from_db(m_FilterHandle, MpUtilMediaSvcIterateForGetVideoItemCb, &pVideoItem) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to get video item list with filter condition.");
+               media_filter_destroy(m_FilterHandle);
+               return FALSE;
+       }
+
+       if(media_filter_destroy(m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to destroy media filter handle.");
+               return FALSE;
+       }
+
+       if(pVideoItem)
+       {
+               media_info_get_size(pVideoItem, &nSize);
+               VideoLogInfo("Video file size time : %d", nSize);
+               media_info_destroy(pVideoItem);
+       }
+
+       return nSize;
+}
+
+char *MpUtilMediaSvcGetVideoThumbnailByVideoUri(const char *szMediaUri)
+{
+       if(!szMediaUri)
+       {
+               VideoLogInfo("No exist video path.");
+               return NULL;
+       }
+
+       VideoLogInfo("szPath : %s", szMediaUri);
+
+       media_info_h pVideoItem = NULL;
+       filter_h m_FilterHandle = NULL;
+       char *szThumbnailPath = NULL;
+       char szTmpStr[STR_LEN_MAX] = {0};
+
+       if(media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to create media filter handle.");
+               return FALSE;
+       }
+
+       memset(szTmpStr, 0, STR_LEN_MAX);
+       snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_PATH = \"%s\"", szMediaUri);
+       if(media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to set filter condition.");
+               media_filter_destroy(m_FilterHandle);
+               return FALSE;
+       }
+
+       if(media_info_foreach_media_from_db(m_FilterHandle, MpUtilMediaSvcIterateForGetVideoItemCb, &pVideoItem) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to get video item list with filter condition.");
+               media_filter_destroy(m_FilterHandle);
+               return FALSE;
+       }
+
+       if(media_filter_destroy(m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to destroy media filter handle.");
+               return FALSE;
+       }
+
+       if(pVideoItem)
+       {
+               media_info_get_thumbnail_path(pVideoItem, &szThumbnailPath);
+               VideoLogInfo("Video thumbnail file path : %s", szThumbnailPath);
+               media_info_destroy(pVideoItem);
+       }
+
+       return szThumbnailPath;
+}
+
+void MpUtilMediaSvcSetVideoLastPlayedTimeByUri(char* szMediaUri, unsigned int nLastPlayedTime)
+{
+       if(!szMediaUri)
+       {
+               VideoLogInfo("No exist media uri.");
+               return;
+       }
+
+       VideoLogInfo("szMediaUri : %s, nLastPlayedTime : %d", szMediaUri, nLastPlayedTime);
+
+       time_t LastPlayedTime = (time_t)nLastPlayedTime;
+       media_info_h pVideoItem = NULL;
+       filter_h m_FilterHandle = NULL;
+       char szTmpStr[STR_LEN_MAX] = {0};
+
+       if(media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to create media filter handle.");
+               return;
+       }
+
+       snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_PATH = \"%s\"", szMediaUri);
+       if(media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to set filter condition.");
+               media_filter_destroy(m_FilterHandle);
+               return;
+       }
+
+       if(media_info_foreach_media_from_db(m_FilterHandle, MpUtilMediaSvcIterateForGetVideoItemCb, &pVideoItem) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to get video item list with filter condition.");
+               media_filter_destroy(m_FilterHandle);
+               return;
+       }
+
+       if(media_filter_destroy(m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to destroy media filter handle.");
+               return;
+       }
+
+       video_meta_h pVideoMetaHandle = NULL;
+
+       if(pVideoItem)
+       {
+               if(media_info_get_video(pVideoItem, &pVideoMetaHandle) != MEDIA_CONTENT_ERROR_NONE)
+               {
+                       VideoLogInfo("Fail to get pVideoMetaHandle.");
+               }
+               else
+               {
+                       if(pVideoMetaHandle)
+                       {
+                               char *szTmpStr = NULL;
+                               video_meta_get_title(pVideoMetaHandle, &szTmpStr);
+                               if(szTmpStr)
+                               {
+                                       VideoLogInfo("Title : %s", szTmpStr);
+                                       free(szTmpStr);
+                               }
+                               else
+                               {
+                                       VideoLogInfo("No exist title");
+                               }
+
+                               video_meta_set_played_time(pVideoMetaHandle, LastPlayedTime);
+                               video_meta_update_to_db(pVideoMetaHandle);
+                               video_meta_destroy(pVideoMetaHandle);
+                               VideoLogInfo("Last Played Time : %d", LastPlayedTime);
+                       }
+                       else
+                       {
+                               VideoLogInfo("No exist pVideoMetaHandle");
+                       }
+               }
+               media_info_destroy(pVideoItem);
+       }
+}
+
+bool MpUtilMediaSvcGetVideoCurrentUrlPreNextItem(char *szCurrMediaUri, char *szPreMediaUri, char *szNextMediaUri, bool bLoop)
+{
+       VideoLogInfo("");
+
+       if(!szCurrMediaUri)
+       {
+               VideoLogInfo("[ERR] No exist current file path.");
+               return FALSE;
+       }
+
+       if(!VideoItemList)
+       {
+               VideoLogInfo("No exist VideoItemList.");
+               if(bLoop)
+               {
+                       strncpy(szNextMediaUri, szCurrMediaUri, (sizeof(char) * STR_LEN_MAX) - 1);
+               }
+               return FALSE;
+       }
+
+       int nCount = 0;
+       int nListSize = 0;
+       media_info_h pVideoItem = NULL;
+       Eina_List *pIterateList = NULL;
+
+       memset(szPreMediaUri, 0, sizeof(char) * STR_LEN_MAX);
+       memset(szNextMediaUri, 0, sizeof(char) * STR_LEN_MAX);
+
+       nListSize = eina_list_count(VideoItemList);
+
+       if(nListSize <= 1)
+       {
+               VideoLogInfo("Video list size == 1.");
+               return FALSE;
+       }
+
+       EINA_LIST_FOREACH(VideoItemList, pIterateList, pVideoItem)
+       {
+               if(pVideoItem == NULL)
+               {
+                       continue;
+               }
+
+               char *szVideoItemFilePath = NULL;
+               media_info_get_file_path(pVideoItem, &szVideoItemFilePath);
+               if(szVideoItemFilePath)
+               {
+                       VideoLogInfo("URL of the File item - %s (%d / %d)", szVideoItemFilePath, nCount, nListSize);
+                       if(!strcmp(szVideoItemFilePath, szCurrMediaUri))
+                       {
+                               free(szVideoItemFilePath);
+                               szVideoItemFilePath = NULL;
+
+                               pVideoItem = NULL;
+                               pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nCount - 1);
+                               if(pVideoItem)
+                               {
+                                       media_info_get_file_path(pVideoItem, &szVideoItemFilePath);
+                                       strncpy(szPreMediaUri, szVideoItemFilePath, (sizeof(char) * STR_LEN_MAX) - 1);
+
+                                       free(szVideoItemFilePath);
+                                       szVideoItemFilePath = NULL;
+                               }
+
+                               pVideoItem = NULL;
+                               pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nCount + 1);
+                               if(pVideoItem)
+                               {
+                                       media_info_get_file_path(pVideoItem, &szVideoItemFilePath);
+                                       strncpy(szNextMediaUri, szVideoItemFilePath, (sizeof(char) * STR_LEN_MAX) - 1);
+
+                                       free(szVideoItemFilePath);
+                                       szVideoItemFilePath = NULL;
+                               }
+                               else if(bLoop)
+                               {
+                                       media_info_h m_FirstItem = (media_info_h)eina_list_nth(VideoItemList, 0);
+                                       if(m_FirstItem)
+                                       {
+                                               media_info_get_file_path(m_FirstItem, &szVideoItemFilePath);
+                                               strncpy(szNextMediaUri, szVideoItemFilePath, (sizeof(char) * STR_LEN_MAX) - 1);
+
+                                               free(szVideoItemFilePath);
+                                               szVideoItemFilePath = NULL;
+                                       }
+                                       m_FirstItem = NULL;
+                               }
+
+                               VideoLogInfo("PreMediaUri:%s", szPreMediaUri);
+                               VideoLogInfo("NextMediaUri:%s", szNextMediaUri);
+
+                               return TRUE;
+                       }
+               }
+
+               ++nCount;
+       }
+
+       return FALSE;
+}
+
+char* MpUtilMediaSvcGetVideoUrl(const int nVideoItemIndex)
+{
+       if(!VideoItemList)
+       {
+               VideoLogInfo("Not exist video item list handle.");
+               return 0;
+       }
+
+       VideoLogInfo("nVideoItemIndex : %d", nVideoItemIndex);
+
+       if(nVideoItemIndex < 0 || nVideoItemIndex >= MpUtilMediaSvcGetVideoListSize())
+       {
+               VideoLogInfo("Error number of list item.");
+               return NULL;
+       }
+
+       char *szVideoItemFilePath = NULL;
+       media_info_h pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nVideoItemIndex);
+
+       if(pVideoItem)
+       {
+               media_info_get_file_path(pVideoItem, &szVideoItemFilePath);
+               VideoLogInfo("szVideoItemFilePath : %s", szVideoItemFilePath);
+       }
+
+       return szVideoItemFilePath;
+}
+
+char* MpUtilMediaSvcGetVideoThumbnail(const int nVideoItemIndex)
+{
+       if(!VideoItemList)
+       {
+               VideoLogInfo("Not exist video item list handle.");
+               return 0;
+       }
+
+       VideoLogInfo("nVideoItemIndex : %d", nVideoItemIndex);
+
+       if(nVideoItemIndex < 0 || nVideoItemIndex >= MpUtilMediaSvcGetVideoListSize())
+       {
+               VideoLogInfo("Error number of list item.");
+               return NULL;
+       }
+
+       char *szVideoItemThumbnailPath = NULL;
+       media_info_h pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nVideoItemIndex);
+
+       if(pVideoItem)
+       {
+               media_info_get_thumbnail_path(pVideoItem, &szVideoItemThumbnailPath);
+               VideoLogInfo("szVideoItemFilePath : %s", szVideoItemThumbnailPath);
+       }
+
+       return szVideoItemThumbnailPath;
+}
+
+char* MpUtilMediaSvcGetVideoTitle(const int nVideoItemIndex)
+{
+       if(!VideoItemList)
+       {
+               VideoLogInfo("Not exist video item list handle.");
+               return 0;
+       }
+
+       VideoLogInfo("nVideoItemIndex : %d", nVideoItemIndex);
+
+       if(nVideoItemIndex < 0 || nVideoItemIndex >= MpUtilMediaSvcGetVideoListSize())
+       {
+               VideoLogInfo("Error number of list item.");
+               return NULL;
+       }
+
+       char *szTitle = NULL;
+       media_info_h pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nVideoItemIndex);
+
+       if(pVideoItem)
+       {
+               media_info_get_display_name(pVideoItem, &szTitle);
+               VideoLogInfo("szTitle : %s", szTitle);
+       }
+
+       return szTitle;
+}
+
+int MpUtilMediaSvcGetVideoDurationTime(const int nVideoItemIndex)
+{
+       if(!VideoItemList)
+       {
+               VideoLogInfo("Not exist video item list handle.");
+               return 0;
+       }
+
+       VideoLogInfo("nVideoItemIndex : %d", nVideoItemIndex);
+
+       if(nVideoItemIndex < 0 || nVideoItemIndex >= MpUtilMediaSvcGetVideoListSize())
+       {
+               VideoLogInfo("Error number of list item.");
+               return 0;
+       }
+
+       int nDurationTime = 0;
+       media_info_h pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nVideoItemIndex);
+
+       if(pVideoItem)
+       {
+               video_meta_h pVideoMetaHandle = NULL;
+               if(media_info_get_video(pVideoItem, &pVideoMetaHandle) == MEDIA_CONTENT_ERROR_NONE)
+               {
+                       video_meta_get_duration(pVideoMetaHandle, &nDurationTime);
+                       VideoLogInfo("Duratiob time : %d", nDurationTime);
+                       video_meta_destroy(pVideoMetaHandle);
+               }
+       }
+
+       return nDurationTime;
+}
+
+int MpUtilMediaSvcGetVideoLastPlayedPos(const int nVideoItemIndex)
+{
+       if(!VideoItemList)
+       {
+               VideoLogInfo("Not exist video item list handle.");
+               return 0;
+       }
+
+       VideoLogInfo("nVideoItemIndex : %d", nVideoItemIndex);
+
+       time_t nLastPlayedTime = 0;
+       media_info_h pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nVideoItemIndex);
+
+       if(pVideoItem)
+       {
+               video_meta_h pVideoMetaHandle = NULL;
+               if(media_info_get_video(pVideoItem, &pVideoMetaHandle) == MEDIA_CONTENT_ERROR_NONE)
+               {
+                       video_meta_get_played_time(pVideoMetaHandle, &nLastPlayedTime);
+                       VideoLogInfo("Last Play time : %d", nLastPlayedTime);
+                       video_meta_destroy(pVideoMetaHandle);
+               }
+       }
+
+       return (int)nLastPlayedTime;
+}
+
+int MpUtilMediaSvcGetVideoItemSize(const int nVideoItemIndex)
+{
+       if(!VideoItemList)
+       {
+               VideoLogInfo("Not exist video item list handle.");
+               return 0;
+       }
+
+       VideoLogInfo("nVideoItemIndex : %d", nVideoItemIndex);
+
+       unsigned long long nSize = 0;
+       media_info_h pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nVideoItemIndex);
+       if(pVideoItem)
+       {
+               media_info_get_size(pVideoItem, &nSize);
+               VideoLogInfo("Video file size time : %d", nSize);
+       }
+
+       return nSize;
+}
+
+int MpUtilMediaSvcGetVideoItemWidth(const int nVideoItemIndex)
+{
+       if(!VideoItemList)
+       {
+               VideoLogInfo("Not exist video item list handle.");
+               return 0;
+       }
+
+       VideoLogInfo("nVideoItemIndex : %d", nVideoItemIndex);
+
+       int nWidth = 0;
+       media_info_h pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nVideoItemIndex);
+       video_meta_h pVideoMetaHandle = NULL;
+
+       if(pVideoItem)
+       {
+               if(media_info_get_video(pVideoItem, &pVideoMetaHandle) != MEDIA_CONTENT_ERROR_NONE)
+               {
+                       VideoLogInfo("Fail to get pVideoMetaHandle.");
+               }
+               else
+               {
+                       if(pVideoMetaHandle)
+                       {
+                               char *szTmpStr = NULL;
+                               video_meta_get_title(pVideoMetaHandle, &szTmpStr);
+                               if(szTmpStr)
+                               {
+                                       VideoLogInfo("Title : %s", szTmpStr);
+                                       free(szTmpStr);
+                               }
+                               else
+                               {
+                                       VideoLogInfo("No exist title");
+                               }
+
+                               video_meta_get_width(pVideoMetaHandle, &nWidth);
+                               video_meta_destroy(pVideoMetaHandle);
+                               VideoLogInfo("Video Width : %f", nWidth);
+                       }
+                       else
+                       {
+                               VideoLogInfo("No exist pVideoMetaHandle");
+                       }
+               }
+       }
+
+       return nWidth;
+}
+
+int MpUtilMediaSvcGetVideoItemHeight(const int nVideoItemIndex)
+{
+       if(!VideoItemList)
+       {
+               VideoLogInfo("Not exist video item list handle.");
+               return 0;
+       }
+
+       VideoLogInfo("nVideoItemIndex : %d", nVideoItemIndex);
+
+       int nHeight = 0;
+       media_info_h pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nVideoItemIndex);
+       video_meta_h pVideoMetaHandle = NULL;
+
+       if(pVideoItem)
+       {
+               if(media_info_get_video(pVideoItem, &pVideoMetaHandle) != MEDIA_CONTENT_ERROR_NONE)
+               {
+                       VideoLogInfo("Fail to get pVideoMetaHandle.");
+               }
+               else
+               {
+                       if(pVideoMetaHandle)
+                       {
+                               char *szTmpStr = NULL;
+                               video_meta_get_title(pVideoMetaHandle, &szTmpStr);
+                               if(szTmpStr)
+                               {
+                                       VideoLogInfo("Title : %s", szTmpStr);
+                                       free(szTmpStr);
+                               }
+                               else
+                               {
+                                       VideoLogInfo("No exist title");
+                               }
+
+                               video_meta_get_height(pVideoMetaHandle, &nHeight);
+                               video_meta_destroy(pVideoMetaHandle);
+                               VideoLogInfo("Video Width : %f", nHeight);
+                       }
+                       else
+                       {
+                               VideoLogInfo("No exist pVideoMetaHandle");
+                       }
+               }
+       }
+
+       return nHeight;
+}
+
+time_t MpUtilMediaSvcGetVideoItemDateTime(const int nVideoItemIndex)
+{
+       if(!VideoItemList)
+       {
+               VideoLogInfo("Not exist video item list handle.");
+               return 0;
+       }
+
+       VideoLogInfo("nVideoItemIndex : %d", nVideoItemIndex);
+
+       time_t nDateTime = 0;
+       media_info_h pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nVideoItemIndex);
+       if(pVideoItem)
+       {
+               media_info_get_modified_time(pVideoItem, &nDateTime);
+               VideoLogInfo("Video date time : %d", nDateTime);
+       }
+
+       return nDateTime;
+}
+
+char *MpUtilMediaSvcGetVideoItemExtension(const int nVideoItemIndex)
+{
+       if(!VideoItemList)
+       {
+               VideoLogInfo("Not exist video item list handle.");
+               return 0;
+       }
+
+       VideoLogInfo("nVideoItemIndex : %d", nVideoItemIndex);
+
+       return NULL;
+}
+
+double MpUtilMediaSvcGetVideoItemLongitude(const int nVideoItemIndex)
+{
+       if(!VideoItemList)
+       {
+               VideoLogInfo("Not exist video item list handle.");
+               return 0;
+       }
+
+       VideoLogInfo("nVideoItemIndex : %d", nVideoItemIndex);
+
+       double nLongitude = 0;
+       media_info_h pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nVideoItemIndex);
+       if(pVideoItem)
+       {
+               media_info_get_longitude(pVideoItem, &nLongitude);
+               VideoLogInfo("nLongitude : %f", nLongitude);
+       }
+
+       return nLongitude;
+}
+
+double MpUtilMediaSvcGetVideoItemLatitude(const int nVideoItemIndex)
+{
+       if(!VideoItemList)
+       {
+               VideoLogInfo("Not exist video item list handle.");
+               return 0;
+       }
+
+       VideoLogInfo("nVideoItemIndex : %d", nVideoItemIndex);
+
+       double nLatitude = 0;
+       media_info_h pVideoItem = (media_info_h)eina_list_nth(VideoItemList, nVideoItemIndex);
+       if(pVideoItem)
+       {
+               media_info_get_latitude(pVideoItem, &nLatitude);
+               VideoLogInfo("nLongitude : %f", nLatitude);
+       }
+
+       return nLatitude;
+}
+
+
+
+
+int MpUtilMediaSvcGetVideoListSize(void)
+{
+       if(!VideoItemList)
+       {
+               VideoLogInfo("Not exist video item list handle.");
+               return 0;
+       }
+
+       VideoLogInfo("");
+
+       return (int)eina_list_count(VideoItemList);
+}
+
+void* MpUtilMediaSvcGetVideoitem(const int nVideoItemIndex)
+{
+       if(!VideoItemList)
+       {
+               VideoLogInfo("Not exist video item list handle.");
+               return NULL;
+       }
+
+       if(nVideoItemIndex < 0 || nVideoItemIndex >= MpUtilMediaSvcGetVideoListSize())
+       {
+               VideoLogInfo("Error number of list item.");
+               return NULL;
+       }
+
+       VideoLogInfo("");
+
+       return (void*)eina_list_nth(VideoItemList, nVideoItemIndex);
+}
+
+void MpUtilMediaSvcPrintListInfo(void)
+{
+       if(!VideoItemList)
+       {
+               VideoLogInfo("Not exist video item list handle.");
+               return;
+       }
+
+       VideoLogInfo("List size : %d", MpUtilMediaSvcGetVideoListSize());
+
+       media_info_h pVideoItem = NULL;
+       Eina_List *pIterateList = NULL;
+       int nCounter = 0;
+       EINA_LIST_FOREACH(VideoItemList, pIterateList, pVideoItem)
+       {
+               if(pVideoItem)
+               {
+                       char *szTitle = NULL;
+                       media_info_get_display_name(pVideoItem, &szTitle);
+                       if(szTitle)
+                       {
+                               VideoLogInfo("%d - Print title of all list items : %s", nCounter, szTitle);
+                               free(szTitle);
+                       }
+                       else
+                       {
+                               VideoLogInfo("%d - Print title of all list items : NULL.", nCounter);
+                       }
+                       nCounter++;
+               }
+       }
+}
+
+int MpUtilMediaSvcFindVideoItemIndexByUrl(const char *szPath)
+{
+       if(!VideoItemList || !szPath)
+       {
+               VideoLogInfo("[ERR] No exist VideoItemList or szPath.");
+               return 99999;
+       }
+
+       VideoLogInfo("");
+
+       unsigned int nCounter = 0;
+
+       Eina_List *pCurList = NULL;
+       media_info_h pVideoItem = NULL;
+
+       EINA_LIST_FOREACH(VideoItemList, pCurList, pVideoItem)
+       {
+               if(pVideoItem)
+               {
+                       char *szTitle = NULL;
+                       media_info_get_display_name(pVideoItem, &szTitle);
+                       VideoLogInfo("szTitle : %s", szTitle);
+
+                       if(!strcmp(szTitle , szPath))
+                       {
+                               VideoLogInfo("Find same file url. index : %d", nCounter);
+                               free(szTitle);
+                               return nCounter;
+                       }
+                       free(szTitle);
+               }
+
+               nCounter++;
+       }
+
+       return 99999;
+}
+
+bool MpUtilMediaSvcExtractVideoFolderList(int nSortType)
+{
+       VideoLogInfo("");
+
+       filter_h m_FilterHandle = NULL;
+       media_content_order_e nOrderType = MEDIA_CONTENT_ORDER_ASC;
+
+       char szTmpStr[STR_LEN_MAX] = {0};
+       char szOrderObj[STR_LEN_MAX] = {0};
+
+       switch(nSortType)
+       {
+       case MP_MEDIA_SORT_BY_NONE:
+       case MP_MEDIA_SORT_BY_NAME_ASC:
+               nOrderType = MEDIA_CONTENT_ORDER_ASC;
+               strncpy(szOrderObj, MEDIA_TITLE, STR_LEN_MAX - 1);
+               break;
+
+       case MP_MEDIA_SORT_BY_NAME_DESC:
+               nOrderType = MEDIA_CONTENT_ORDER_DESC;
+               strncpy(szOrderObj, MEDIA_TITLE, STR_LEN_MAX - 1);
+               break;
+
+       case MP_MEDIA_SORT_BY_DATE_MOST_RECENT:
+               nOrderType = MEDIA_CONTENT_ORDER_DESC;
+               strncpy(szOrderObj, MEDIA_YEAR, STR_LEN_MAX - 1);
+               break;
+
+       case MP_MEDIA_SORT_BY_OLDEST:
+               nOrderType = MEDIA_CONTENT_ORDER_ASC;
+               strncpy(szOrderObj, MEDIA_YEAR, STR_LEN_MAX - 1);
+               break;
+
+       default:
+               nOrderType = MEDIA_CONTENT_ORDER_ASC;
+               strncpy(szOrderObj, MEDIA_TITLE, STR_LEN_MAX - 1);
+       }
+
+       if(media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to create media filter handle.");
+               return FALSE;
+       }
+
+       snprintf(szTmpStr, STR_LEN_MAX, "MEDIA_TYPE = 1");
+       if(media_filter_set_condition(m_FilterHandle, szTmpStr, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to set filter condition.");
+               media_filter_destroy(m_FilterHandle);
+               return FALSE;
+       }
+
+       if(media_folder_foreach_folder_from_db(m_FilterHandle, MpUtilMediaSvcIterateForFolderListCb, &VideoFolderList) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail media_folder_foreach_folder_from_db().");
+               media_filter_destroy(m_FilterHandle);
+               return FALSE;
+       }
+
+       if(media_filter_destroy(m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to destroy media filter handle.");
+       }
+
+       return TRUE;
+}
+
+bool MpUtilMediaSvcDestoryVideoFolderList(void)
+{
+       if(!VideoFolderList)
+       {
+               VideoLogInfo("VideoFolderList is empty already.");
+               return FALSE;
+       }
+
+       media_folder_h pTmpFolderItem = NULL;
+       EINA_LIST_FREE(VideoFolderList, pTmpFolderItem)
+       {
+               if(pTmpFolderItem)
+               {
+                       media_folder_destroy(pTmpFolderItem);
+               }
+       }
+
+       VideoFolderList = NULL;
+
+       return TRUE;
+}
+
+int MpUtilMediaSvcGetVideoFolderListSize(void)
+{
+       if(!VideoFolderList)
+       {
+               VideoLogInfo("Not exist video item list handle.");
+               return 0;
+       }
+
+       VideoLogInfo("");
+
+       if(VideoFolderList)
+       {
+               return (int)eina_list_count(VideoFolderList);
+       }
+
+       return 0;
+}
+
+char* MpUtilMediaSvcGetVideoFolderName(int nVideoFolderIndex)
+{
+       if(!VideoFolderList)
+       {
+               VideoLogInfo("Not exist video folder list handle.");
+               return 0;
+       }
+
+       VideoLogInfo("nVideoItemIndex : %d", nVideoFolderIndex);
+
+       if(nVideoFolderIndex < 0 || nVideoFolderIndex >= MpUtilMediaSvcGetVideoFolderListSize())
+       {
+               VideoLogInfo("Error number of list item.");
+               return NULL;
+       }
+
+       char *szFolderName = NULL;
+       media_folder_h pFolderItem = (media_folder_h)eina_list_nth(VideoFolderList, nVideoFolderIndex);
+       if(pFolderItem)
+       {
+               media_folder_get_name(pFolderItem, &szFolderName);
+
+               if(szFolderName)
+               {
+                       VideoLogInfo("szFolderName : %s", szFolderName);
+                       return szFolderName;
+               }
+       }
+
+       return NULL;
+}
+
+char* MpUtilMediaSvcGetVideoFolderUrl(int nVideoFolderIndex)
+{
+       if(!VideoFolderList)
+       {
+               VideoLogInfo("Not exist video item list handle.");
+               return 0;
+       }
+
+       VideoLogInfo("nVideoItemIndex : %d", nVideoFolderIndex);
+
+       if(nVideoFolderIndex < 0 || nVideoFolderIndex >= MpUtilMediaSvcGetVideoFolderListSize())
+       {
+               VideoLogInfo("Error number of list item.");
+               return NULL;
+       }
+
+       char *szFolderPath = NULL;
+       media_folder_h pFolderItem = (media_folder_h)eina_list_nth(VideoFolderList, nVideoFolderIndex);
+       if(pFolderItem)
+       {
+               media_folder_get_path(pFolderItem, &szFolderPath);
+
+               if(szFolderPath)
+               {
+                       VideoLogInfo("szFolderPath : %s", szFolderPath);
+                       return szFolderPath;
+               }
+       }
+
+       return NULL;
+}
+
+static bool MpUtilMediaSvcBookmarkItemCb(media_bookmark_h pBookmark, void *pUserData)
+{
+       VideoLogInfo("");
+
+       media_bookmark_h pAssignBookmark = NULL;
+       media_bookmark_clone(&pAssignBookmark, pBookmark);
+
+       GList **pList = (GList**)pUserData;
+       *pList = g_list_append(*pList, pAssignBookmark);
+
+       return TRUE;
+}
+
+bool MpUtilMediaSvcBookmarkListGet(char *vid, GList **list)
+{
+       if(!vid)
+       {
+               VideoLogInfo("No exist vid.");
+               return FALSE;
+       }
+
+       if(!list)
+       {
+               VideoLogInfo("No exist list.");
+               return FALSE;
+       }
+
+       VideoLogInfo("vid : %s", vid);
+
+       filter_h m_FilterHandle = NULL;
+
+       if(media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to create media filter handle.");
+               return FALSE;
+       }
+
+       if(media_filter_set_order(m_FilterHandle, MEDIA_CONTENT_ORDER_DESC, BOOKMARK_MARKED_TIME, MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to set order.");
+               media_filter_destroy(m_FilterHandle);
+               return FALSE;
+       }
+
+       if(media_info_foreach_bookmark_from_db(vid, m_FilterHandle, MpUtilMediaSvcBookmarkItemCb, list) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to get bookmark of video item with filter condition.");
+               media_filter_destroy(m_FilterHandle);
+               return FALSE;
+       }
+
+       if(media_filter_destroy(m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("Fail to destroy media filter handle.");
+               return FALSE;
+       }
+
+       return TRUE;
+}
+
+void MpUtilMediaSvcBookmarkListClear(GList *pList)
+{
+       VideoLogInfo("");
+
+       if(pList == NULL)
+       {
+               VideoLogInfo("list == NULL\n");
+               return;
+       }
+
+       media_bookmark_h pBookmarkItem = NULL;
+
+       int nCount = 0;
+       int i = 0;
+
+       nCount = g_list_length(pList);
+       for(i = 0; i < nCount; i++)
+       {
+               pBookmarkItem = (void *)g_list_nth_data(pList, i);
+               if(pBookmarkItem)
+               {
+                       media_bookmark_destroy(pBookmarkItem);
+                       pBookmarkItem = NULL;
+               }
+       }
+
+       g_list_free(pList);
+}
+
+int MpUtilMediaSvcBookmarkInsert(char *vid, int position, char *path)
+{
+       VideoLogInfo("");
+       int ret = 0;
+
+       if(vid < 0 || path == NULL)
+       {
+               VideoLogInfo("Invalid Parameter : %d, %s", vid, path);
+               return -1;
+       }
+
+       if(media_bookmark_insert_to_db(vid, position, path) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("minfo_add_bookmark ERR : %d", ret);
+               return -1;
+       }
+
+       return 0;
+}
+
+int MpUtilMediaSvcBookmarkDelete(char *vid, int position)
+{
+       VideoLogInfo("");
+       bool ret = 0;
+
+       int bookmarkid = 0;
+       char *path = NULL;
+
+       GList *list = NULL;
+       media_bookmark_h data = NULL;
+       Eina_List *l = NULL;
+
+       ret = MpUtilMediaSvcBookmarkListGet(vid, &list);
+       if(ret == FALSE)
+       {
+               return -1;
+       }
+
+       EINA_LIST_FOREACH((Eina_List *)list, l, data)
+       {
+               if(data)
+               {
+                       time_t nMarkedTime;
+                       media_bookmark_get_marked_time(data, &nMarkedTime);
+                       if(position == nMarkedTime)
+                       {
+                               media_bookmark_get_bookmark_id(data, &bookmarkid);
+                               media_bookmark_get_thumbnail_path(data, &path);
+                               break;
+                       }
+               }
+       }
+
+       MpUtilMediaSvcBookmarkListClear(list);
+
+       if(media_bookmark_delete_from_db(bookmarkid) != MEDIA_CONTENT_ERROR_NONE)
+       {
+               VideoLogInfo("[ERR] media_bookmark_delete_from_db()");
+               if(path)
+               {
+                       free(path);
+               }
+               return -1;
+       }
+
+       ecore_file_init();
+       if(ecore_file_exists(path))
+       {
+               if(ecore_file_remove(path))
+               {
+                       VideoLogInfo("Remove success :%s\n", path);
+               }
+               else
+               {
+                       VideoLogInfo("Remove Failed :%s \n", path);
+               }
+       }
+       else
+       {
+               VideoLogInfo("The file not eixst :%s\n", path);
+       }
+
+       ecore_file_shutdown();
+
+       if(path)
+       {
+               free(path);
+       }
+
+       return 0;
+}
+
+int MpUtilMediaSvcBookmarkDeleteAll(char *vid)
+{
+       VideoLogInfo("");
+       bool ret = 0;
+
+       int bookmarkid = 0;
+
+       GList *list = NULL;
+       media_bookmark_h data = NULL;
+       Eina_List *l = NULL;
+       char *szThumbnailPath = NULL;
+
+       ret = MpUtilMediaSvcBookmarkListGet(vid, &list);
+       if(ret == FALSE)
+       {
+               return -1;
+       }
+
+       EINA_LIST_FOREACH((Eina_List *)list, l, data)
+       {
+               if(data)
+               {
+                       media_bookmark_get_bookmark_id(data, &bookmarkid);
+                       media_bookmark_get_thumbnail_path(data, &szThumbnailPath);
+
+                       if(szThumbnailPath)
+                       {
+                               ecore_file_init();
+                               if(ecore_file_exists(szThumbnailPath))
+                               {
+                                       if(ecore_file_remove(szThumbnailPath))
+                                       {
+                                               VideoLogInfo("Remove success : %s", szThumbnailPath);
+                                       }
+                                       else
+                                       {
+                                               VideoLogInfo("Remove Failed : %s", szThumbnailPath);
+                                       }
+                               }
+                               else
+                               {
+                                       VideoLogInfo("The file not eixst :%s", szThumbnailPath);
+                               }
+                               ecore_file_shutdown();
+                       }
+
+                       if(media_bookmark_delete_from_db(bookmarkid) != MEDIA_CONTENT_ERROR_NONE)
+                       {
+                               VideoLogInfo("[ERR]minfo_delete_bookmark");
+                               return -1;
+                       }
+               }
+       }
+
+       MpUtilMediaSvcBookmarkListClear(list);
+
+       return 0;
+}
+
+char* MpUtilMediaSvcBookmarkGetThumbnail(void* pBookmarkItemHandle)
+{
+       char *szThumbnailPath = NULL;
+
+       media_bookmark_get_thumbnail_path((media_bookmark_h)pBookmarkItemHandle, &szThumbnailPath);
+
+       return szThumbnailPath;
+}
+
+int MpUtilMediaSvcBookmarkGetPos(void* pBookmarkItemHandle)
+{
+       time_t nBookmarkTime;
+
+       media_bookmark_get_marked_time((media_bookmark_h)pBookmarkItemHandle, &nBookmarkTime);
+
+       return (int)nBookmarkTime;
+}
diff --git a/src/mp-util.c b/src/mp-util.c
new file mode 100644 (file)
index 0000000..c556081
--- /dev/null
@@ -0,0 +1,1375 @@
+/*
+ * 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 [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
+ *
+ *    Licensed under the Flora License, Version 1.0 (the "License");
+ *    you may not use this file except in compliance with the License.
+ *    You may obtain a copy of the License at
+ *
+ *        http://www.tizenopensource.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.
+ */
+
+
+#include <app.h>
+#include <sound_manager.h>
+
+#include <aul.h>
+#include <glib.h>
+#include <errno.h>
+#include <vconf.h>
+#include <utilX.h>
+#include <pmapi.h>
+#include <unistd.h>
+#include <E_DBus.h>
+#include <signal.h>
+#include <Ecore_X.h>
+#include <ui-gadget.h>
+#include <Ecore_Evas.h>
+#include <vconf-keys.h>
+
+
+#include "mp-util.h"
+#include "mp-video-log.h"
+#include "mp-xml-parser.h"
+#include "mp-util-media-service.h"
+#include "mp-video-type-define.h"
+#include "mp-video-value-define.h"
+#include "mp-video-string-define.h"
+#include "mp-video-info-ctrl.h"
+
+
+
+#define MP_LAUNCH_BLUETOOTH_PACKAGE_NAME               "org.tizen.bluetooth"
+
+#define MP_UTIL_USER_AGENT_KEY                 "db/admin/uagent"
+#define MP_UTIL_TEMP_USER_AGENT_VALUE  "Mozilla/5.0 (SAMSUNG; SAMSUNG-GT-S8500/1.0; U; Bada/1.0; en-us) AppleWebKit/533.1 (KHTML, like Gecko) Dolfin/2.0 Mobile WVGA SMM-MMS/1.2.0 OPN-B"
+#define MP_UTIL_MMC_PATH               "/opt/storage/sdcard"
+#define MP_UTIL_FILE_PREFIX            "file://"
+
+static bool bAlphaSet = TRUE;
+
+static Ecore_X_Window pMainXwindow = 0;
+static Ecore_X_Display *pX11DisplayHandle = NULL;
+static Evas_Object     *pMainRect = NULL;
+
+static Evas_Object *pPopUpHandle = NULL;
+static Evas_Object *pPopupWindow = NULL;
+
+MpXMLItemInfo pXmlItem[XML_ITEM_NUM];
+int nXmlItemCount = 0;
+int nHttpQuality = 0;
+int nHttpCount = 0;
+int nRtspCount = 0;
+bool bXmlLoad = FALSE;
+
+static MpVideoRotateType nCurRotateValue = VIDEO_ROTATE_PORTRAIT_NORMAL;
+
+/*
+ * Callback function
+ */
+static void MpUtilBatteryStatusChangeCb(keynode_t *pKeyNode, void *pUserData)
+{
+       VideoLogInfo("");
+
+       int nLowBatteryStatus = 0;
+
+       if (!pUserData) {
+               VideoLogInfo("User data is NULL.");
+               return;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       if (!vconf_get_int
+           (VCONFKEY_SYSMAN_BATTERY_STATUS_LOW, &nLowBatteryStatus)) {
+               if (nLowBatteryStatus <= VCONFKEY_SYSMAN_BAT_POWER_OFF) {
+                       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlExit(pAppData);
+                       return;
+               }
+       } else {
+               VideoLogInfo("Fail to get vconf");
+       }
+}
+
+static void MpUtilMMCStatusChangeCb(keynode_t * pKeyNode, void *pUserData)
+{
+       VideoLogInfo("");
+
+       char szFilename[9] = { 0 };
+
+       if (!pUserData || !pKeyNode) {
+               VideoLogInfo("User data is NULL.");
+               return;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+       char *keyname = vconf_keynode_get_name(pKeyNode);
+       if (strcmp(keyname, VCONFKEY_FILEMANAGER_DB_STATUS) == 0) {
+               int nMMCState = vconf_keynode_get_int(pKeyNode);
+               if (nMMCState == VCONFKEY_FILEMANAGER_DB_UPDATED) {
+                       strncpy(szFilename, pAppData->szMediaUri, sizeof(szFilename) - 1);
+                       VideoLogInfo("FILE NAME[%s]", szFilename);
+                       if (!strcmp(MP_UTIL_MMC_PATH, szFilename)) {
+                               /* MpUtilNotifyPopUp(pAppData, "MMC card is ejected", NULL); */
+                               pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlExit(pAppData);
+                       }
+               }
+       } else {
+               VideoLogInfo("Fail to get vconf");
+       }
+}
+
+
+/*
+ * External function
+ */
+
+void MpUtilExitVideoPlayer(void)
+{
+       VideoLogInfo("");
+
+       elm_exit();
+}
+
+static void MpUtilDestroyMainWindow(void *pUserData, Evas_Object *pEvasObject,
+                                   void *pEvent)
+{
+       VideoLogInfo("");
+
+       MpUtilExitVideoPlayer();
+}
+
+void MpUtilResetForRelaunching(void)
+{
+       VideoLogInfo("");
+
+       pX11DisplayHandle = NULL;
+       pPopUpHandle = NULL;
+       pPopupWindow = NULL;
+
+       memset(pXmlItem, 0, sizeof(MpXMLItemInfo) * XML_ITEM_NUM);
+
+       nXmlItemCount = 0;
+       nHttpQuality = 0;
+       nHttpCount = 0;
+       nRtspCount = 0;
+       bXmlLoad = FALSE;
+}
+
+void MpUtilSetAlphaOfMainWindow(bool bSetAlpha)
+{
+       VideoLogInfo("");
+
+       if(bSetAlpha)
+       {
+               evas_object_hide(pMainRect);
+       }
+       else
+       {
+               evas_object_show(pMainRect);
+       }
+       bAlphaSet = bSetAlpha;
+}
+
+void *MpUtilCreateMainWindow(const char *pStrName)
+{
+       VideoLogInfo("");
+
+       if (!pStrName) {
+               VideoLogInfo("[ERR] No exist pStrName.");
+               return NULL;
+       }
+
+       if (pMainXwindow) {
+               evas_object_del((Evas_Object *)pMainXwindow);
+               pMainXwindow = 0;
+       }
+
+       Evas_Object *pEvasObject;
+
+       pEvasObject = elm_win_add(NULL, pStrName, ELM_WIN_BASIC);
+       if (pEvasObject) {
+               elm_win_title_set(pEvasObject, pStrName);
+               evas_object_smart_callback_add(pEvasObject, "delete,request",
+                                              MpUtilDestroyMainWindow, NULL);
+       }
+
+       pMainXwindow = elm_win_xwindow_get(pEvasObject);
+#if 0
+       unsigned int output = 1;
+       Ecore_X_Display *display = ecore_x_display_get ();
+       Ecore_X_Atom  atom = ecore_x_atom_get ("XV_OUTPUT");
+       utilx_set_window_cardinal_property (display, pMainXwindow, atom, &output);
+#endif
+       Evas *pMainWindowEvas = evas_object_evas_get(pEvasObject);
+
+       pMainRect = evas_object_rectangle_add(pMainWindowEvas);
+       int nW, nH;
+       if(nCurRotateValue == VIDEO_ROTATE_PORTRAIT_NORMAL ||
+               nCurRotateValue == VIDEO_ROTATE_PORTRAIT_REVERSE)
+       {
+               ecore_x_window_size_get(ecore_x_window_root_first_get(),
+                                               &nW, &nH);
+       }
+       else {
+               ecore_x_window_size_get(ecore_x_window_root_first_get(),
+                                               &nW, &nH);
+       }
+
+       evas_object_move(pMainRect, 0, 0);
+       evas_object_resize(pMainRect, nW, nH);
+       evas_object_color_set(pMainRect, 0, 0, 0, 255);
+       evas_object_hide(pMainRect);
+
+       return (void *)pEvasObject;
+}
+
+int MpUtilSetKeyGrab(const char *szKeyName, int nGrabMode)
+{
+       VideoLogInfo("");
+       if (!pX11DisplayHandle) {
+               pX11DisplayHandle = ecore_x_display_get();
+       }
+
+       if (!pMainXwindow) {
+               VideoLogInfo("Not exist pMainXwindow.");
+       }
+
+       utilx_grab_key(pX11DisplayHandle, pMainXwindow, szKeyName, nGrabMode);
+       return TRUE;
+}
+
+int MpUtilSetKeyUngrab(const char *szKeyName)
+{
+       VideoLogInfo("");
+       if (pMainXwindow && pX11DisplayHandle) {
+               utilx_ungrab_key(pX11DisplayHandle, pMainXwindow, szKeyName);
+       }
+       return TRUE;
+}
+
+
+bool MpUtilCheckRTSPType(char *szUriPath)
+{
+       if(szUriPath == NULL) {
+               VideoLogInfo("ERR:");
+               return FALSE;
+       }
+
+       //VideoLogInfo(" URI : %s", szUriPath);
+
+       if (strstr(szUriPath, "rtp"))
+               return TRUE;
+       else if (strstr(szUriPath, "rtsp"))
+               return TRUE;
+
+       return FALSE;
+}
+
+int MpUtilCheckPlayerType(char *szUriPath)
+{
+       if(szUriPath == NULL) {
+               VideoLogInfo("ERR:");
+               return FALSE;
+       }
+
+       VideoLogInfo(" URI : %s", szUriPath);
+
+       if (strstr(szUriPath, "rtp"))
+               return 1;
+       else if (strstr(szUriPath, "rtsp"))
+               return 1;
+       else if (strstr(szUriPath, "http"))
+               return 1;
+       else if (strstr(szUriPath, "https"))
+               return 1;
+
+       return 0;
+}
+
+bool MpUtilCheckLocalFileExist(char *uri)
+{
+       VideoLogInfo("");
+
+       if(uri == NULL)
+       {
+               VideoLogInfo("[ERR]");
+               return FALSE;
+       }
+
+       if(strstr(uri,MP_UTIL_FILE_PREFIX))
+       {
+               if (!g_file_test(uri+strlen(MP_UTIL_FILE_PREFIX), G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))
+               {
+                       return FALSE;
+               }
+               return TRUE;
+       }
+       else
+       {
+               if(!g_file_test(uri, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))
+               {
+                       return FALSE;
+               }
+               return TRUE;
+       }
+}
+
+bool MpUtilCheckBatteryStatus(void)
+{
+       VideoLogInfo("");
+
+       int nLowBatteryStatus = 0;
+
+       if (!vconf_get_int
+           (VCONFKEY_SYSMAN_BATTERY_STATUS_LOW, &nLowBatteryStatus)) {
+               if (nLowBatteryStatus <= VCONFKEY_SYSMAN_BAT_POWER_OFF) {
+                       return FALSE;
+               }
+       }
+
+       return TRUE;
+}
+
+int MpUtilBatteryStatusNoti(VideoAppData *pAppData)
+{
+       VideoLogInfo("");
+
+       if(!pAppData)
+       {
+               VideoLogInfo("[ERR] No exist appdata.");
+               return FALSE;
+       }
+
+       if(vconf_notify_key_changed(VCONFKEY_SYSMAN_BATTERY_STATUS_LOW, MpUtilBatteryStatusChangeCb, pAppData))
+       {
+               VideoLogInfo("[ERR] Fail to set Battery notification.");
+               /* return FALSE; */
+       }
+
+       return TRUE;
+}
+
+int MpUtilBatteryStatusNotiIgnore(void)
+{
+       VideoLogInfo("");
+
+       if (vconf_ignore_key_changed
+           (VCONFKEY_SYSMAN_BATTERY_STATUS_LOW,
+            MpUtilBatteryStatusChangeCb) < 0) {
+               VideoLogInfo("[ERR] Fail to ignore battery status.");
+               return FALSE;
+       }
+
+       return TRUE;
+}
+
+int MpUtilMMCstatusNoti(VideoAppData *pAppData)
+{
+       VideoLogInfo("");
+
+       if (!pAppData) {
+               VideoLogInfo("[ERR] No exist appdata.");
+               return FALSE;
+       }
+
+       if (vconf_notify_key_changed
+           (VCONFKEY_FILEMANAGER_DB_STATUS, MpUtilMMCStatusChangeCb,
+            pAppData) < 0) {
+               VideoLogInfo("[ERR] Fail to set MMC notification.");
+               //return FALSE;
+       }
+
+       return TRUE;
+}
+
+int MpUtilMMCstatusNotiIgnore(void)
+{
+       VideoLogInfo("");
+
+       if (vconf_ignore_key_changed
+           (VCONFKEY_FILEMANAGER_DB_STATUS, MpUtilMMCStatusChangeCb) < 0) {
+               VideoLogInfo("[ERR] Fail to ignore MMC status.");
+               //return FALSE;
+       }
+
+       return TRUE;
+}
+
+
+void MpUtilLanguageInit(VideoAppData *pAppData)
+{
+       VideoLogInfo("");
+
+       if (!pAppData) {
+               VideoLogInfo("[ERR] No exist appdata.");
+               return;
+       }
+
+       char *szPath = NULL;
+
+       szPath = vconf_get_str(VCONFKEY_LANGSET);
+       if (!szPath) {
+               VideoLogInfo("Language setting has no proper value (nil)");
+               return;
+       }
+
+       VideoLogInfo("Setting language is %s", szPath);
+
+       setenv("LANG", szPath, 1);
+       setenv("LC_ALL", szPath, 1);
+       setenv("LANGUAGE", szPath, 1);
+       setlocale(LC_ALL, "");
+       bindtextdomain(PACKAGE, LOCALEDIR);
+       textdomain(PACKAGE);
+}
+
+int MpUtilCheckDlnaSortType(void *pSvcHandle, char *szBundleKey)
+{
+       VideoLogInfo("");
+
+       if(!pSvcHandle)
+       {
+               VideoLogInfo("No exist service data.");
+               return (int)MP_MEDIA_SORT_BY_NONE;
+       }
+
+//     char szSortType[SVC_LEN_MAX] = {0};
+       char *szSortType = (char*)malloc(sizeof(char) * SVC_LEN_MAX);
+       if(service_get_extra_data(pSvcHandle, szBundleKey, &szSortType) != SERVICE_ERROR_NONE)
+       {
+               VideoLogInfo("No exist mime type.");
+               return FALSE;
+       }
+
+       int nTmpSortType = atoi(szSortType);
+
+       VideoLogInfo("nTmpSortType : %d", nTmpSortType);
+
+       free(szSortType);
+
+       return (int)nTmpSortType;
+}
+
+int MpUtilCheckDlnaMediaID(void *pSvcHandle, char *szBundleKey)
+{
+       VideoLogInfo("");
+
+       if(!pSvcHandle)
+       {
+               VideoLogInfo("No exist service data.");
+               return -1;
+       }
+
+//     char szMediID[SVC_LEN_MAX] = {0};
+       char *szMediID = (char*)malloc(sizeof(char) * SVC_LEN_MAX);
+       if(service_get_extra_data(pSvcHandle, szBundleKey, &szMediID) != SERVICE_ERROR_NONE)
+       {
+               VideoLogInfo("No exist mime type.");
+               return FALSE;
+       }
+
+       int media_id = atoi(szMediID);
+
+       VideoLogInfo("media_id : %d", media_id);
+
+       free(szMediID);
+
+       return (int)media_id;
+}
+
+bool MpUtilIsXMLUrl(char *szMediaUri)
+{
+       VideoLogInfo("URI : %s", szMediaUri);
+
+       if (!g_str_has_suffix(szMediaUri, ".xml")) {
+               VideoLogInfo("No have xml uri.");
+               return FALSE;
+       }
+
+       return TRUE;
+}
+
+void MpUtilInitXML()
+{
+       VideoLogInfo("");
+
+       mp_xml_init();
+}
+
+void MpUtilDestroyXML()
+{
+       VideoLogInfo("");
+
+       mp_xml_destroy();
+}
+
+char *MpUtilGetXMLQualityURL(void)
+{
+       VideoLogInfo("");
+
+       if (nHttpCount > 1 || nRtspCount > 1) {
+               nHttpQuality = (nHttpQuality + 1) % 2;
+               return strdup(pXmlItem[nHttpQuality].szURL);
+       }
+
+       return NULL;
+}
+
+bool MpUtilParsingXML(char *szMediaUri)
+{
+       VideoLogInfo("");
+       char *pXmlData = NULL;
+       char *szTmpUri = NULL;
+       int nInsertCount = 0;
+       unsigned int nFileSize = 0;
+
+       if (!szMediaUri) {
+               VideoLogInfo("[ERR] No have Media uri.");
+               return FALSE;
+       }
+       MpUtilInitXML();
+
+       szTmpUri = (char *)strdup(szMediaUri);
+
+       if (szTmpUri == NULL) {
+               VideoLogInfo("[ERR]");
+               return FALSE;
+       }
+
+       if (!g_str_has_suffix(szTmpUri, ".xml")) {
+               VideoLogInfo("No have xml uri.");
+               /* prevent 2011/07/12 */
+               if (szTmpUri)
+                       free(szTmpUri);
+               return TRUE;
+       }
+
+       memset(pXmlItem, 0, sizeof(MpXMLItemInfo) * XML_ITEM_NUM);
+
+       nFileSize = mp_read_xml_file(szTmpUri, &pXmlData);
+       if (nFileSize == 0 || pXmlData == NULL) {
+               VideoLogInfo("[ERR] Invalid XML File : %s", szTmpUri);
+               if (szTmpUri)
+                       free(szTmpUri);
+
+               if (pXmlData)
+                       free(pXmlData);
+
+               return FALSE;
+       }
+
+       nInsertCount = mp_get_xmlitem(pXmlData, nFileSize,
+                                     pXmlItem, &nHttpCount, &nRtspCount);
+       if (nInsertCount > 0) {
+               VideoLogInfo("Get xml item : %d", nInsertCount);
+               nXmlItemCount = nInsertCount;
+       }
+
+       if (nHttpCount > 1) {
+               nHttpQuality = 0;
+               memset((void *)szMediaUri, 0, sizeof(szMediaUri));
+               strncpy(szMediaUri, pXmlItem[nHttpQuality].szURL, STR_LEN_MAX - 1);
+               nXmlItemCount = nHttpCount;
+       } else if (nRtspCount > 1) {
+               nHttpQuality = 0;
+               memset((void *)szMediaUri, 0, sizeof(szMediaUri));
+               strncpy(szMediaUri, pXmlItem[nHttpQuality].szURL, STR_LEN_MAX - 1);
+               VideoLogInfo("URL : %s", szMediaUri);
+               nXmlItemCount = nRtspCount;
+       } else {
+               char *szParsedUrl = NULL;
+               bool bResult =
+                   mp_get_url_from_xml(pXmlData, nFileSize, &szParsedUrl,
+                                       _WIFI_MODE_);
+
+               if (bResult == FALSE || szParsedUrl == NULL) {
+                       VideoLogInfo("[ERR] XML parsing failed!");
+                       free(szTmpUri);
+                       //MpVideoAppCtrlExit(pAppData);
+                       return FALSE;
+               }
+
+               memset((void *)szMediaUri, 0, STR_LEN_MAX);
+               strncpy(szMediaUri, szParsedUrl, STR_LEN_MAX - 1);
+
+               if (szParsedUrl) {
+                       free(szParsedUrl);
+               }
+       }
+
+       //pAppData->nCurPlayerType = MP_STREAMING_PLAYER;
+       //strncpy(pAppData->szVideoTitle, mp_get_title_from_xml(szTmpUri), STR_LEN_MAX - 1);
+
+       bXmlLoad = TRUE;
+
+       if (pXmlData) {
+               free(pXmlData);
+       }
+
+       if (szTmpUri) {
+               free(szTmpUri);
+       }
+
+       return TRUE;
+}
+
+int MpUtilGetXMLItemCount(void)
+{
+       VideoLogInfo("");
+
+       if (nHttpCount > 0)
+               return nHttpCount;
+
+       if (nRtspCount > 0)
+               return nRtspCount;
+
+       return 0;
+
+}
+
+int MpUtilGetRotationStateFromAppcore(void)
+{
+       VideoLogInfo("");
+       int bLocked = -1;
+
+       if (vconf_get_bool(VCONFKEY_SETAPPL_ROTATE_LOCK_BOOL, &bLocked) != 0)
+       {
+               VideoLogInfo("Get vlalue fail");
+               return nCurRotateValue;
+       }
+
+       if(bLocked == false)
+       {
+               switch(app_get_device_orientation())
+               {
+               case APP_DEVICE_ORIENTATION_0:
+                       VideoLogInfo("VIDEO_ROTATE_PORTRAIT_NORMAL");
+                       nCurRotateValue = VIDEO_ROTATE_PORTRAIT_NORMAL;
+                       break;
+
+               case APP_DEVICE_ORIENTATION_90:
+                       VideoLogInfo("VIDEO_ROTATE_PORTRAIT_REVERSE");
+                       nCurRotateValue = VIDEO_ROTATE_LANDSCAPE_REVERSE;
+                       break;
+
+               case APP_DEVICE_ORIENTATION_180:
+                       VideoLogInfo("VIDEO_ROTATE_LANDSCAPE_NORMAL");
+                       nCurRotateValue = VIDEO_ROTATE_PORTRAIT_REVERSE;
+                       break;
+
+               case APP_DEVICE_ORIENTATION_270:
+                       VideoLogInfo("VIDEO_ROTATE_LANDSCAPE_REVERSE");
+                       nCurRotateValue = VIDEO_ROTATE_LANDSCAPE_NORMAL;
+                       break;
+               }
+       }
+       return nCurRotateValue;
+}
+
+int MpUtilGetRotationState(void)
+{
+       VideoLogInfo("");
+
+       return nCurRotateValue;
+}
+
+void MpUtilSetRotationState(int nCurRotation)
+{
+       VideoLogInfo("");
+
+       nCurRotateValue = nCurRotation;
+
+       if (pPopupWindow) {
+               MpUtilRotateWindow(nCurRotation, pPopupWindow);
+       }
+}
+
+bool MpUtilGetTitleFromFilepath(char *szFilepath, char *szTitle, int nLengthTitle)
+{
+       VideoLogInfo("");
+
+       if (!szFilepath || !szTitle) {
+               VideoLogInfo("[ERR]");
+               return FALSE;
+       }
+
+       char *szTitleName;
+       char *szExt;
+
+       memset(szTitle, 0, nLengthTitle);
+
+       szTitleName = strrchr(szFilepath, '/');
+
+       if (szTitleName)
+               szTitleName++;
+       else
+               szTitleName = szFilepath;
+
+       szExt = strrchr(szTitleName, '.');
+
+       if (szExt) {
+               int nTmpStringSize = szExt - szTitleName;
+               strncpy(szTitle, szTitleName, nTmpStringSize);
+       } else {
+               strncpy(szTitle, szTitleName, STR_LEN_MAX - 1);
+       }
+
+       return TRUE;
+}
+
+void MpUtilInitSession(void)
+{
+       VideoLogInfo("");
+
+       sound_manager_set_session_type(SOUND_SESSION_TYPE_EXCLUSIVE);
+}
+
+void MpUtilFinishSession(void)
+{
+       VideoLogInfo("");
+
+       sound_manager_set_session_type(SOUND_SESSION_TYPE_SHARE);
+}
+
+void MpUtilVolumeTypeSet(void)
+{
+       VideoLogInfo("");
+
+       sound_manager_set_volume_key_type(VOLUME_KEY_TYPE_MEDIA);
+}
+
+void MpUtilVolumeTypeUnset(void)
+{
+       VideoLogInfo("");
+
+        sound_manager_set_volume_key_type(VOLUME_KEY_TYPE_NONE);
+}
+
+void MpUtilDeletePopupHandle(void)
+{
+       VideoLogInfo("");
+
+       if (pPopUpHandle) {
+               evas_object_del(pPopUpHandle);
+               pPopUpHandle = NULL;
+       } else {
+               VideoLogInfo("No exist popup.");
+       }
+
+       if (pPopupWindow) {
+               evas_object_del(pPopupWindow);
+               pPopupWindow = NULL;
+       } else {
+               VideoLogInfo("No exist popup window.");
+       }
+
+       MpUtilSetAlphaOfMainWindow(TRUE);
+}
+
+bool MpUtilNotifyPopUp(VideoAppData *pAppData, char *szContents, void *PopupButtonCallbackFunc)
+{
+       VideoLogInfo("");
+
+       if (pAppData == NULL || szContents == NULL) {
+               VideoLogInfo("No have popup message or pAppData is null.");
+               return FALSE;
+       }
+
+       MpUtilDeletePopupHandle();
+
+       MpUtilSetAlphaOfMainWindow(FALSE);
+
+       pPopUpHandle = elm_popup_add(pAppData->pMainWindow);
+
+       evas_object_size_hint_weight_set(pPopUpHandle, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_object_text_set(pPopUpHandle, szContents);
+       elm_object_part_text_set(pPopUpHandle, "title,text", dgettext("sys_string", MP_COM_POP_ERROR));
+       elm_popup_timeout_set(pPopUpHandle, 3.0);
+
+       if(PopupButtonCallbackFunc)
+       {
+               evas_object_smart_callback_add(pPopUpHandle, "timeout", PopupButtonCallbackFunc, (void *)pAppData);
+       }
+
+       if(pPopupWindow)
+       {
+               MpUtilRotateWindow(MpUtilGetRotationState(), pPopupWindow);
+       }
+
+       evas_object_show(pPopUpHandle);
+
+       return TRUE;
+}
+
+bool MpUtilWarinigPopUp(VideoAppData *pAppData, char *szContents,
+                      void *PopupButtonCallbackFunc)
+{
+       VideoLogInfo("");
+
+       if (pAppData == NULL || szContents == NULL) {
+               VideoLogInfo("No have popup message or pAppData is null.");
+               return FALSE;
+       }
+
+       MpUtilDeletePopupHandle();
+
+       MpUtilSetAlphaOfMainWindow(FALSE);
+
+       pPopUpHandle = elm_popup_add(pAppData->pMainWindow);
+
+       evas_object_size_hint_weight_set(pPopUpHandle, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_object_text_set(pPopUpHandle, szContents);
+       elm_object_part_text_set(pPopUpHandle, "title,text", dgettext("sys_string", MP_COM_POP_ERROR));
+       elm_popup_timeout_set(pPopUpHandle, 3.0);
+
+       if (PopupButtonCallbackFunc) {
+               evas_object_smart_callback_add(pPopUpHandle, "timeout", PopupButtonCallbackFunc, (void *)pAppData);
+       }
+
+       evas_object_show(pPopUpHandle);
+
+       return TRUE;
+}
+
+
+bool MpUtilYesNoPopUp(VideoAppData *pAppData, char *szTitle, char *szContents, void *PopupYesButtonCallbackFunc, void *PopupNoButtonCallbackFunc)
+{
+       VideoLogInfo("");
+
+       if(szTitle == NULL || szContents == NULL || pAppData == NULL)
+       {
+               VideoLogInfo("No have popup message or pAppData is null.");
+               return FALSE;
+       }
+
+       Evas_Object *pButton = NULL;
+
+       MpUtilDeletePopupHandle();
+
+       MpUtilSetAlphaOfMainWindow(FALSE);
+
+       pPopUpHandle = elm_popup_add(pAppData->pMainWindow);
+
+       evas_object_size_hint_weight_set(pPopUpHandle, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_object_text_set(pPopUpHandle, szContents);
+       elm_object_part_text_set(pPopUpHandle, "title,text", szTitle);
+
+       pButton = elm_button_add(pPopUpHandle);
+       elm_object_style_set ( pButton, "popup_button/default");
+       elm_object_text_set(pButton, dgettext(MP_SYS_STRING, MP_COM_SK_YES));
+       elm_object_part_content_set(pPopUpHandle, "button1", pButton);
+
+       if(PopupYesButtonCallbackFunc)
+       {
+               evas_object_smart_callback_add(pButton, "clicked", PopupYesButtonCallbackFunc, (void*)pAppData);
+       }
+
+       pButton = elm_button_add(pPopUpHandle);
+       elm_object_text_set(pButton, dgettext(MP_SYS_STRING, MP_COM_SK_NO));
+       elm_object_style_set ( pButton, "popup_button/default");
+       elm_object_part_content_set(pPopUpHandle, "button2", pButton);
+
+       if(PopupNoButtonCallbackFunc)
+       {
+               evas_object_smart_callback_add(pButton, "clicked", PopupNoButtonCallbackFunc, (void*)pAppData);
+       }
+
+       elm_popup_timeout_set(pPopUpHandle, 3.0);
+
+       evas_object_show(pPopUpHandle);
+
+       return TRUE;
+}
+
+bool MpUtilRemoveQuestionPopUp(VideoAppData *pAppData, void *PopupDeleteButtonCallbackFunc, void *PopupCancelButtonCallbackFunc, void *pUserData)
+{
+       VideoLogInfo("");
+
+       if(pAppData == NULL || pUserData == NULL)
+       {
+               VideoLogInfo("No have popup message or pAppData is null.");
+               return FALSE;
+       }
+
+       Evas_Object *pButton = NULL;
+
+       MpUtilDeletePopupHandle();
+
+       MpUtilSetAlphaOfMainWindow(FALSE);
+
+       pPopUpHandle = elm_popup_add(pAppData->pMainWindow);
+
+       evas_object_size_hint_weight_set(pPopUpHandle, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_object_part_text_set(pPopUpHandle, "title,text", MP_COM_BODY_DELETE_Q);
+
+       pButton = elm_button_add(pPopUpHandle);
+       elm_object_text_set(pButton, MP_COM_BODY_DELETE);
+       elm_object_style_set(pButton, "sweep/delete");
+       elm_object_part_content_set(pPopUpHandle, "button1", pButton);
+
+       if(PopupDeleteButtonCallbackFunc)
+       {
+               evas_object_smart_callback_add(pButton, "clicked", PopupDeleteButtonCallbackFunc, pUserData);
+       }
+
+       pButton = elm_button_add(pPopUpHandle);
+       elm_object_text_set(pButton, MP_COM_BUTTON_CANCEL);
+       elm_object_part_content_set(pPopUpHandle, "button2", pButton);
+
+       if(PopupCancelButtonCallbackFunc)
+       {
+               evas_object_smart_callback_add(pButton, "clicked", PopupCancelButtonCallbackFunc, pUserData);
+       }
+
+       elm_popup_timeout_set(pPopUpHandle, 3.0);
+
+       evas_object_show(pPopUpHandle);
+
+       return TRUE;
+}
+
+void MpUtilSetLabelForDetail(Evas_Object *pBox, char *szString)
+{
+       VideoLogInfo("");
+
+       Evas_Object *pLabel = NULL;
+
+       pLabel = elm_label_add(pBox);
+       elm_object_style_set(pLabel, "popup/default");
+       elm_object_text_set(pLabel, szString);
+       elm_label_ellipsis_set(pLabel, EINA_TRUE);
+       elm_label_wrap_width_set(pLabel, 614 * elm_config_scale_get());
+       evas_object_size_hint_weight_set(pLabel, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_min_set(pLabel, 614 * elm_config_scale_get(), 35 * elm_config_scale_get());
+       elm_box_pack_end(pBox, pLabel);
+       evas_object_show(pLabel);
+}
+
+bool MpUtilDetailPopup(VideoAppData *pAppData, int nVideoItemIndex, char *szTitle, void *PopupButtonCallbackFunc)
+{
+       VideoLogInfo("");
+
+       if(szTitle == NULL || pAppData == NULL)
+       {
+               VideoLogInfo("No have popup message or pAppData is null.");
+               return FALSE;
+       }
+       char *szFilePath = NULL;
+       char *szVideoTitle = NULL;
+
+       char szTmpStr[STR_LEN_MAX] = {0};
+       char szTmpFileDate[STR_LEN_MAX] = {0};
+       char szTmpFileExtension[STR_LEN_MAX] = {0};
+       char szTmpFileSize[STR_LEN_MAX] = {0};
+
+       double nLongtitude = 0.0;
+       double nLatitude = 0.0;
+
+       int nWidth = 0;
+       int nHeight = 0;
+
+       Evas_Object *pBox = NULL;
+       Evas_Object *pButton = NULL;
+
+       MpUtilDeletePopupHandle();
+
+       MpUtilSetAlphaOfMainWindow(FALSE);
+
+       pPopUpHandle = elm_popup_add(pAppData->pMainWindow);
+
+       evas_object_size_hint_weight_set(pPopUpHandle, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+       szFilePath = MpUtilMediaSvcGetVideoUrl(nVideoItemIndex);
+       szVideoTitle = MpUtilMediaSvcGetVideoTitle(nVideoItemIndex);
+       nWidth = MpUtilMediaSvcGetVideoItemWidth(nVideoItemIndex);
+       nHeight = MpUtilMediaSvcGetVideoItemHeight(nVideoItemIndex);
+
+       MpVideoInfoCtrlGetFileInfo(szFilePath, szTmpFileDate, STR_LEN_MAX, szTmpFileExtension, STR_LEN_MAX, szTmpFileSize, STR_LEN_MAX);
+       MpVideoInfoCtrlGetGPS(szFilePath, &nLongtitude, &nLatitude);
+
+       pBox = elm_box_add(pPopUpHandle);
+
+       snprintf(szTmpStr, STR_LEN_MAX, "<font_size=32><align=left> %s: %s </align></font_size>", dgettext(MP_SYS_STRING, MP_COM_BODY_DETAILS_TITLE), szVideoTitle);
+       MpUtilSetLabelForDetail(pBox, szTmpStr);
+       memset(szTmpStr, 0, STR_LEN_MAX);
+
+       snprintf(szTmpStr, STR_LEN_MAX, "<font_size=32><align=left> %s: %s</align></font_size>", dgettext(MP_SYS_STRING, MP_COM_BODY_FORMAT), szTmpFileExtension);
+       MpUtilSetLabelForDetail(pBox, szTmpStr);
+       memset(szTmpStr, 0, STR_LEN_MAX);
+
+       snprintf(szTmpStr, STR_LEN_MAX, "<font_size=32><align=left> %s: %s</align></font_size>", dgettext(MP_SYS_STRING, MP_COM_POP_DATE), szTmpFileDate);
+       MpUtilSetLabelForDetail(pBox, szTmpStr);
+       memset(szTmpStr, 0, STR_LEN_MAX);
+
+       snprintf(szTmpStr, STR_LEN_MAX, "<font_size=32><align=left> %s: %s</align></font_size>", dgettext(MP_SYS_STRING, MP_COM_BODY_SIZE), szTmpFileSize);
+       MpUtilSetLabelForDetail(pBox, szTmpStr);
+       memset(szTmpStr, 0, STR_LEN_MAX);
+
+       snprintf(szTmpStr, STR_LEN_MAX, "<font_size=32><align=left> %s: %d x %d</align></font_size>", dgettext(MP_SYS_STRING, MP_IDLE_BODY_RESOLUTION), nWidth, nHeight);
+       MpUtilSetLabelForDetail(pBox, szTmpStr);
+       memset(szTmpStr, 0, STR_LEN_MAX);
+
+       snprintf(szTmpStr, STR_LEN_MAX, "<font_size=32><align=left> %s: %f</align></font_size>", _(MP_VPL_GPS_LATITUDE), nLatitude);
+       MpUtilSetLabelForDetail(pBox, szTmpStr);
+       memset(szTmpStr, 0, STR_LEN_MAX);
+
+       snprintf(szTmpStr, STR_LEN_MAX, "<font_size=32><align=left> %s: %f</align></font_size>", _(MP_VPL_GPS_LONGITUTD), nLongtitude);
+       MpUtilSetLabelForDetail(pBox, szTmpStr);
+       memset(szTmpStr, 0, STR_LEN_MAX);
+
+       elm_object_content_set(pPopUpHandle, pBox);
+
+       elm_object_part_text_set(pPopUpHandle, "title,text", szTitle);
+       pButton = elm_button_add(pPopUpHandle);
+       elm_object_style_set ( pButton, "popup_button/default");
+       elm_object_text_set(pButton, dgettext(MP_SYS_STRING, MP_COM_SK_BACK));
+       elm_object_part_content_set(pPopUpHandle, "button1", pButton);
+
+       if(szFilePath)
+       {
+               free(szFilePath);
+               szFilePath = NULL;
+       }
+
+       if(szVideoTitle)
+       {
+               free(szVideoTitle);
+               szVideoTitle = NULL;
+       }
+
+       if(PopupButtonCallbackFunc)
+       {
+               evas_object_smart_callback_add(pButton, "clicked", PopupButtonCallbackFunc, (void*)pAppData);
+       }
+
+       evas_object_show(pPopUpHandle);
+
+       return TRUE;
+}
+
+bool MpUtilProgressPopUp(VideoAppData *pAppData, char *szLabel)
+{
+       VideoLogInfo("");
+
+       if (pAppData == NULL || szLabel == NULL) {
+               VideoLogInfo("No have popup message or pAppData is null.");
+               return FALSE;
+       }
+
+       MpUtilDeletePopupHandle();
+
+       MpUtilSetAlphaOfMainWindow(FALSE);
+
+       pPopUpHandle = elm_popup_add(pAppData->pMainWindow);
+
+       evas_object_size_hint_weight_set(pPopUpHandle, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       Evas_Object *progressbar, *box, *label;
+
+       label = elm_label_add(pPopUpHandle);
+       elm_object_text_set(label, szLabel);
+       evas_object_show(label);
+
+       progressbar = elm_progressbar_add(pPopUpHandle);
+       elm_object_style_set(progressbar, "pending_list");
+       elm_progressbar_pulse(progressbar, EINA_TRUE);
+       evas_object_size_hint_align_set(progressbar, EVAS_HINT_FILL, 0.5);
+       evas_object_size_hint_weight_set(progressbar, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_progressbar_pulse(progressbar, EINA_TRUE);
+       evas_object_show(progressbar);
+
+       box = elm_box_add(pPopUpHandle);
+       elm_box_pack_end(box, label);
+       elm_box_pack_end(box, progressbar);
+       evas_object_show(box);
+       elm_object_content_set(pPopUpHandle, box);
+
+       if (pPopupWindow) {
+       MpUtilRotateWindow(MpUtilGetRotationState(), pPopupWindow);
+       }
+
+       evas_object_show(pPopUpHandle);
+
+       return TRUE;
+}
+
+void *MpUtilCreateButtonIcon(void *pParent, const char *szIconPath, bool bSizeUp, bool bSizeDown, int nAspectWidth, int nAspectHeight, void *pUserData, char* szButtonStyle, void *func)
+{
+       VideoLogInfo("");
+
+       Evas_Object *pButton = NULL;
+       Evas_Object *pIcon = NULL;
+
+       pButton = elm_button_add(pParent);
+
+       if(szIconPath)
+       {
+               pIcon = elm_icon_add(pParent);
+               elm_icon_file_set(pIcon, szIconPath, NULL);
+               //evas_object_size_hint_aspect_set(pIcon, EVAS_ASPECT_CONTROL_VERTICAL, nAspectWidth, nAspectHeight);
+               evas_object_size_hint_aspect_set(pIcon, EVAS_ASPECT_CONTROL_NEITHER, nAspectWidth, nAspectHeight);
+               elm_icon_resizable_set(pIcon, bSizeUp, bSizeDown);
+       }
+
+       if(szButtonStyle)
+       {
+               elm_object_style_set(pButton, szButtonStyle);
+       }
+
+       if(pIcon)
+       {
+               elm_object_part_content_set(pButton,PART_BUTTON_ICON, pIcon);
+       }
+
+       if(func)
+       {
+               evas_object_smart_callback_add(pButton, "clicked", func, (void *)pUserData);
+       }
+
+       elm_object_focus_allow_set(pButton, EINA_FALSE);
+       evas_object_size_hint_weight_set(pButton, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_show(pButton);
+
+       return (void *)pButton;
+}
+
+void *MpUtilCreateStyleButton(void *pParent, const char* szButtonText, const void *pUserData, char* szButtonStyle, void *func)
+{
+       VideoLogInfo("");
+
+       Evas_Object *pButton = NULL;
+
+       pButton = elm_button_add(pParent);
+
+       if(szButtonStyle)
+       {
+               elm_object_style_set(pButton, szButtonStyle);
+       }
+
+       if(szButtonText)
+       {
+               elm_object_text_set(pButton, szButtonText);
+       }
+
+       if(func)
+       {
+               evas_object_smart_callback_add(pButton, "clicked", func, pUserData);
+       }
+
+       elm_object_focus_allow_set(pButton, EINA_FALSE);
+       evas_object_size_hint_weight_set(pButton, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_show(pButton);
+
+       return (void *)pButton;
+}
+
+void *MpUtilLoadEdjFile(Evas * pEvas, char *szEdjName, char *szGroupName)
+{
+       VideoLogInfo("");
+
+       Evas_Object *pEdj = NULL;
+       int nWidth = 0;
+       int nHeight = 0;
+
+       pEdj = edje_object_add(pEvas);
+       if (!edje_object_file_set(pEdj, szEdjName, szGroupName)) {
+               VideoLogInfo("[ERR] EDJ file error : %s | %s\n", szEdjName,
+                            szGroupName);
+               return NULL;
+       }
+
+       edje_object_size_min_get(pEdj, &nWidth, &nHeight);
+       evas_object_resize(pEdj, nWidth, nHeight);
+
+       return (void *)pEdj;
+}
+
+bool MpUtilCheckCallStatus(void)
+{
+       VideoLogInfo("");
+
+       int nCallStatus = 0;
+
+       if (!vconf_get_int(VCONFKEY_CALL_STATE, &nCallStatus)) {
+               if (nCallStatus != VCONFKEY_CALL_OFF) {
+                       return FALSE;
+               }
+       }
+
+       return TRUE;
+}
+
+bool MpUtilIsConnectEarjack(void)
+{
+       VideoLogInfo("");
+
+       int nEarjack = 0;
+
+       if (!vconf_get_int(VCONFKEY_SYSMAN_EARJACK, &nEarjack)) {
+               if (nEarjack) {
+                       return TRUE;
+               }
+       }
+
+       return FALSE;
+}
+
+bool MpUtilRegisteEarjackCbFunc(void *pEarjackCb, void *pUserData)
+{
+       if (!pEarjackCb) {
+               VideoLogInfo("pEarjackCb is empty.");
+               return FALSE;
+       }
+
+       VideoLogInfo("");
+
+       vconf_notify_key_changed(VCONFKEY_SYSMAN_EARJACK, pEarjackCb, pUserData);
+
+       return TRUE;
+}
+
+unsigned int MpUtilGetMainWindowXID(void)
+{
+       VideoLogInfo("");
+       if (pMainXwindow) {
+               VideoLogInfo("pMainXwindow : %d", pMainXwindow);
+               return pMainXwindow;
+       } else {
+               VideoLogInfo("No exist main window XID.");
+       }
+       return 0;
+}
+
+void MpUtilRotateWindow(int nRotateMode, void *pWindowHandle)
+{
+       VideoLogInfo("");
+
+       if (!pWindowHandle) {
+               return;
+       }
+
+       switch (nRotateMode) {
+       case VIDEO_ROTATE_UNKNOWN:
+               VideoLogInfo("VIDEO_ROTATE_UNKNOWN");
+               elm_win_rotation_with_resize_set(pWindowHandle, 0);
+               break;
+
+       case VIDEO_ROTATE_PORTRAIT_NORMAL:
+               VideoLogInfo("VIDEO_ROTATE_PORTRAIT_NORMAL");
+               elm_win_rotation_with_resize_set(pWindowHandle, 0);
+               break;
+
+       case VIDEO_ROTATE_LANDSCAPE_NORMAL:
+               VideoLogInfo("VIDEO_ROTATE_LANDSCAPE_NORMAL");
+               elm_win_rotation_with_resize_set(pWindowHandle, 270);
+               break;
+
+       case VIDEO_ROTATE_PORTRAIT_REVERSE:
+               VideoLogInfo("VIDEO_ROTATE_PORTRAIT_REVERSE");
+               elm_win_rotation_with_resize_set(pWindowHandle, 180);
+               break;
+
+       case VIDEO_ROTATE_LANDSCAPE_REVERSE:
+               VideoLogInfo("VIDEO_ROTATE_LANDSCAPE_REVERSE");
+               elm_win_rotation_with_resize_set(pWindowHandle, 90);
+               break;
+
+       default:
+               VideoLogInfo("DEFAULT - VIDEO_ROTATE_UNKNOWN");
+               elm_win_rotation_with_resize_set(pWindowHandle, 0);
+               break;
+       }
+}
+
+void MpUtilGetUserAgent(VideoAppData *pAppData)
+{
+       VideoLogInfo("");
+
+       int nWifiMode = 0;
+
+       char *szUserAgent = NULL;
+       szUserAgent = vconf_get_str(VCONFKEY_ADMIN_UAGENT);
+       if(szUserAgent)
+       {
+               memset(pAppData->szUserAgent, 0, STR_LEN_MAX);
+               strncpy(pAppData->szUserAgent, szUserAgent, STR_LEN_MAX - 1);
+               free(szUserAgent);
+       }
+       else
+       {
+               VideoLogInfo("!!!!! NO EXIST USER AGENT !!!!!");
+       }
+
+#if 0
+       memset(pAppData->szUserAgent, 0, STR_LEN_MAX);
+       snprintf(pAppData->szUserAgent, STR_LEN_MAX, "%s", MP_UTIL_TEMP_USER_AGENT_VALUE);
+#endif
+
+       if(!vconf_get_int(VCONFKEY_WIFI_STATE, &nWifiMode))
+       {
+               VideoLogInfo("User Agent : %s, Wi-Fi : %d", pAppData->szUserAgent, nWifiMode);
+       }
+
+}
+
+double MpUtilGetSysTime(void)
+{
+       struct timeval tv;
+
+       gettimeofday(&tv, NULL);
+       return (double)tv.tv_sec + (double)tv.tv_usec / 1E6;
+}
+
+void MpUtilLcdNormalPowerLockForResume(void)
+{
+       VideoLogInfo("");
+
+       pm_lock_state(LCD_NORMAL, GOTO_STATE_NOW | HOLD_KEY_BLOCK, 0);
+}
+
+void MpUtilLcdNormalPowerUnlockForPause(void)
+{
+       VideoLogInfo("");
+
+       pm_unlock_state(LCD_NORMAL, PM_RESET_TIMER);
+}
+
+void MpUtilLcdOffForPowerButton(void)
+{
+       VideoLogInfo("");
+
+       pm_unlock_state(LCD_NORMAL, PM_RESET_TIMER);
+}
+
+void MpUtilMultimediaKeyGrab(void)
+{
+       VideoLogInfo("");
+       MpUtilSetKeyGrab(PLAY_KEY, KEY_GRAB_OR_EXCLUSIVE);
+       MpUtilSetKeyGrab(STOP_KEY, KEY_GRAB_OR_EXCLUSIVE);
+       MpUtilSetKeyGrab(PAUSE_KEY, KEY_GRAB_OR_EXCLUSIVE);
+       MpUtilSetKeyGrab(NEXT_KEY, KEY_GRAB_OR_EXCLUSIVE);
+       MpUtilSetKeyGrab(PREV_KEY, KEY_GRAB_OR_EXCLUSIVE);
+       MpUtilSetKeyGrab(REWIND_KEY, KEY_GRAB_OR_EXCLUSIVE);
+       MpUtilSetKeyGrab(FORWARD_KEY, KEY_GRAB_OR_EXCLUSIVE);
+}
+
+void MpUtilMultimediaKeyUngrab(void)
+{
+       VideoLogInfo("");
+
+       MpUtilSetKeyUngrab(PAUSE_KEY);
+       MpUtilSetKeyUngrab(PLAY_KEY);
+       MpUtilSetKeyUngrab(STOP_KEY);
+       MpUtilSetKeyUngrab(NEXT_KEY);
+       MpUtilSetKeyUngrab(PREV_KEY);
+       MpUtilSetKeyUngrab(FORWARD_KEY);
+       MpUtilSetKeyUngrab(REWIND_KEY);
+
+}
diff --git a/src/mp-video-animation-ctrl.c b/src/mp-video-animation-ctrl.c
new file mode 100755 (executable)
index 0000000..e52550c
--- /dev/null
@@ -0,0 +1,151 @@
+/*
+ * 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 [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
+ * 
+ *    Licensed under the Flora License, Version 1.0 (the "License");
+ *    you may not use this file except in compliance with the License.
+ *    You may obtain a copy of the License at
+ * 
+ *        http://www.tizenopensource.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.
+ */
+
+
+#include "mp-util.h"
+#include "mp-video-log.h"
+#include "video-player.h"
+#include "mp-video-value-define.h"
+#include "mp-video-animation-ctrl.h"
+
+#define BUFFERING_TXT_MAX_LEN  16
+
+static Evas_Object *pAnimationEdj = NULL;
+static Ecore_Timer *pAnimationTimer = NULL;
+
+static int nIconIndex = 0;
+
+static Eina_Bool MpVideoAnimationCtrlTimerCb(void *data)
+{
+/*     VideoLogInfo(""); */
+
+       char sig_format[SIGNAL_TEXT_MAX_LEN] = { 0, };
+
+       snprintf(sig_format, SIGNAL_TEXT_MAX_LEN, "%s.%d",
+                SIGNAL_ANIMATION_IMAGE_LOADING, nIconIndex);
+
+       edje_object_signal_emit(pAnimationEdj, sig_format, "*");
+
+       nIconIndex += 1;
+       if (nIconIndex > ANIMATION_MAX_COUNT)
+               nIconIndex = 1;
+
+       return EINA_TRUE;
+}
+
+void *MpVideoAnimationCtrlInit(void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (pUserData == NULL) {
+               VideoLogInfo("data is NULL");
+               return NULL;
+       }
+
+       Evas *pMainWindowEvas = (Evas *) pUserData;
+
+       pAnimationEdj = MpUtilLoadEdjFile(pMainWindowEvas,
+                                         VIDEO_PLAYER_ANIMATION_EDJ,
+                                         ANIMATION_EDJ_GROUP);
+
+       evas_object_hide(pAnimationEdj);
+
+       return (void *)pAnimationEdj;
+}
+
+void MpVideoAnimationCtrlDestroy(void)
+{
+       VideoLogInfo("");
+
+       if (pAnimationTimer) {
+               ecore_timer_del(pAnimationTimer);
+               pAnimationTimer = NULL;
+       }
+
+       if (pAnimationEdj) {
+               evas_object_hide(pAnimationEdj);
+               evas_object_del(pAnimationEdj);
+               pAnimationEdj = NULL;
+       }
+
+       nIconIndex = 0;
+}
+
+void MpVideoAnimationCtrlSetPercent(int nPercent)
+{
+       VideoLogInfo("");
+       if (nPercent >= 0) {
+               char szBuffering[BUFFERING_TXT_MAX_LEN] = { 0, };
+
+               snprintf(szBuffering, BUFFERING_TXT_MAX_LEN, "Loading %d%%...",
+                        nPercent);
+               edje_object_part_text_set(pAnimationEdj, "loading.txt",
+                                         szBuffering);
+       } else {
+               edje_object_part_text_set(pAnimationEdj, "loading.txt",
+                                         "Loading...");
+       }
+}
+
+void MpVideoAnimationCtrlPlay(void)
+{
+       VideoLogInfo("");
+       if (pAnimationTimer == NULL) {
+               pAnimationTimer = ecore_timer_add(ANIMATION_TIMER_INTERVAL,
+                                                 MpVideoAnimationCtrlTimerCb,
+                                                 NULL);
+       }
+}
+
+void MpVideoAnimationCtrlStop(void)
+{
+       VideoLogInfo("");
+
+       if (pAnimationTimer) {
+               ecore_timer_del(pAnimationTimer);
+               pAnimationTimer = NULL;
+       }
+}
+
+void MpVideoAnimationCtrlShow(void)
+{
+       VideoLogInfo("");
+
+       if (pAnimationTimer == NULL) {
+               MpVideoAnimationCtrlPlay();
+               MpVideoAnimationCtrlSetPercent(-1);
+               evas_object_show(pAnimationEdj);
+       }
+}
+
+void MpVideoAnimationCtrlHide(void)
+{
+       VideoLogInfo("");
+
+       MpVideoAnimationCtrlStop();
+       evas_object_hide(pAnimationEdj);
+}
+
+bool MpVideoAnimationCtrlGetActiveState(void)
+{
+       VideoLogInfo("");
+       if (pAnimationTimer)
+               return true;
+       else
+               return false;
+}
diff --git a/src/mp-video-app-ctrl.c b/src/mp-video-app-ctrl.c
new file mode 100755 (executable)
index 0000000..fca112d
--- /dev/null
@@ -0,0 +1,1432 @@
+/*
+ * 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 [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
+ *
+ *    Licensed under the Flora License, Version 1.0 (the "License");
+ *    you may not use this file except in compliance with the License.
+ *    You may obtain a copy of the License at
+ *
+ *        http://www.tizenopensource.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.
+ */
+
+
+#include <app.h>
+#include <player.h>
+#include <mm_util_imgp.h>
+#include <image_util.h>
+
+#include "mp-util.h"
+#include "mp-video-log.h"
+#include "mp-video-app-ctrl.h"
+#include "mp-video-view-mgr.h"
+#include "mp-util-media-service.h"
+#include "mp-video-value-define.h"
+#include "mp-video-string-define.h"
+#include "mp-video-streaming-ctrl.h"
+#include "mp-external-ug.h"
+
+#include "mp-drm-ctrl.h"
+#include "mp-video-ctrl-mgr.h"
+#include "mp-video-service-ctrl.h"
+
+
+static int nPlayerErrorType = 0;
+static int nPlayerInterruptType = 0;
+static int nBufferingRate = 0;
+static bool bWindowForegroundState = FALSE;
+
+static Ecore_Pipe      *pEcorePipeHandleForErrorMsg = NULL;
+static Ecore_Pipe      *pEcorePipeHandleBOF = NULL;
+static Ecore_Pipe      *pEcorePipeHandleEOF = NULL;
+static Ecore_Pipe      *pEcorePipeHandleForBuffering = NULL;
+static Ecore_Pipe      *pEcorePipeHandleForResumed = NULL;
+static Ecore_Pipe      *pEcorePipeHandleForInterruped = NULL;
+static Ecore_Pipe      *pEcorePipeHandlerForSeekComplete = NULL;
+
+
+static void MpVideoAppCtrlStart(VideoAppData *pAppData);
+static void MpVideoAppCtrlStop(VideoAppData *pAppData);
+static void MpVideoAppCtrlPause(VideoAppData *pAppData);
+static void MpVideoAppCtrlResume(VideoAppData *pAppData);
+static void MpVideoAppCtrlStopByAppPause(VideoAppData *pAppData);
+static void MpVideoAppCtrlStartByAppResume(VideoAppData *pAppData);
+static void MpVideoAppCtrlFFDown(VideoAppData *pAppData);
+static void MpVideoAppCtrlRewDown(VideoAppData *pAppData);
+static void MpVideoAppCtrlFFUp(VideoAppData *pAppData);
+static void MpVideoAppCtrlRewUp(VideoAppData *pAppData);
+static void MpVideoAppCtrlSpeedReset(VideoAppData *pAppData);
+static void MpVideoAppCtrlSpeedFF(VideoAppData *pAppData);
+static void MpVideoAppCtrlSpeedRew(VideoAppData *pAppData);
+static void MpVideoAppCtrlRotateScreen(VideoAppData *pAppData, int nRotateState);
+static void MpVideoAppCtrlGetPosition(VideoAppData *pAppData);
+static void MpVideoAppCtrlSetPosition(VideoAppData *pAppData);
+static void MpVideoAppCtrlHideLayout(VideoAppData *pAppData);
+static void MpVideoAppCtrlShowLayout(VideoAppData *pAppData);
+static void MpVideoAppCtrlGetVideoResolution(VideoAppData *pAppData);
+static void MpVideoAppCtrlReqDurationTime(VideoAppData *pAppData);
+static void MpVideoAppCtrlBeginOfStream(VideoAppData *pAppData);
+static void MpVideoAppCtrlEndOfStream(VideoAppData *pAppData);
+static void MpVideoAppCtrlExit(VideoAppData *pAppData);
+static void MpVideoAppCtrlStartStreaming(VideoAppData *pAppData);
+static void MpVideoAppCtrlReLaunching(VideoAppData *pAppData);
+static void MpVideoAppCtrlPlayPreMedia(VideoAppData *pAppData);
+static void MpVideoAppCtrlPlayNextMedia(VideoAppData *pAppData);
+static void MpVideoAppCtrlGetBufferingPosition(VideoAppData *pAppData);
+static void MpVideoAppCtrlPipeInit(VideoAppData *pAppData);
+
+
+
+/*
+ * Callback function
+ */
+static void MpVideoAppCtrlCheckDrmPopupCb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("[ERR] No exist pUserData");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       MpUtilDeletePopupHandle();
+}
+
+static void MpVideoAppCtrlExitCb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("[ERR] No exist pUserData");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlExit(pAppData);
+}
+
+static int MpVideoAppCtrlPauseByInterrupteCb(void *pUserData)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("[ERR] No exist pUserData");
+               return 0;
+       }
+
+       VideoLogInfo("");
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       MpVideoViewHideSoundpath(pUserData);
+       MpVideoAppCtrlPause(pAppData);
+
+       switch(nPlayerInterruptType)
+       {
+       case MP_PLAYER_INTERRUPTED_COMPLETED:
+               VideoLogInfo("MP_PLAYER_INTERRUPTED_COMPLETED");
+               break;
+
+       case MP_PLAYER_INTERRUPTED_BY_OTHER_APP:
+               VideoLogInfo("MP_PLAYER_INTERRUPTED_BY_OTHER_APP");
+               break;
+
+       case MP_PLAYER_INTERRUPTED_BY_CALL:
+               VideoLogInfo("MP_PLAYER_INTERRUPTED_BY_CALL");
+               break;
+
+       case MP_PLAYER_INTERRUPTED_BY_EARJACK_UNPLUG:
+               VideoLogInfo("MP_PLAYER_INTERRUPTED_BY_EARJACK_UNPLUG");
+               break;
+
+       case MP_PLAYER_INTERRUPTED_BY_RESOURCE_CONFLICT:
+               VideoLogInfo("MP_PLAYER_INTERRUPTED_BY_RESOURCE_CONFLICT");
+               break;
+
+       case MP_PLAYER_INTERRUPTED_BY_ALARM:
+               VideoLogInfo("MP_PLAYER_INTERRUPTED_BY_ALARM");
+               break;
+
+       default:
+               VideoLogInfo("OTHER");
+               break;
+       }
+
+       return 0;
+}
+
+static int MpVideoAppCtrlBeginOfPlayCb(void *pUserData)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("[ERR] No exist pUserData");
+               return 0;
+       }
+
+       VideoLogInfo("");
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       int nTmpPlayerType = MpVideoServiceCtrlGetPlayerTypeWithoutLog();
+       if(nTmpPlayerType == MP_STREAMING_PLAYER)
+       {
+               MpVideoCtrlMgrMediaPlay((void *)pAppData);
+
+               pAppData->bStartSeek = FALSE;
+
+               if(pAppData->nSetPosition > 0)
+               {
+                       VideoLogInfo("Start position time : %dms", pAppData->nSetPosition);
+                       MpVideoAppCtrlSetPosition(pAppData);
+               }
+       }
+
+       MpVideoAppCtrlBeginOfStream(pAppData);
+       MpUtilLcdNormalPowerLockForResume();
+
+       return 0;
+}
+
+static int MpVideoAppCtrlEndOfPlayCb(void *pUserData)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("[ERR] No exist pUserData");
+               return 0;
+       }
+
+       VideoLogInfo("");
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+       MpVideoAppCtrlEndOfStream(pAppData);
+
+       MpUtilLcdNormalPowerUnlockForPause();
+
+       return 0;
+}
+
+static int MpVideoAppCtrlBufferingCb(void *pUserData)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("No exist pUserData");
+               return 0;
+       }
+
+       VideoLogInfo("");
+
+       if(nBufferingRate < 10)
+       {
+               MpVideoAppCtrlShowLayout((VideoAppData *)pUserData);
+       }
+
+       MpVideoViewSetBufferingRateForStreamingView(nBufferingRate, pUserData);
+
+       return 0;
+}
+
+static int MpVideoAppCtrlSeekCompletePipeCb(void *pUserData)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("[ERR] No exist pUserData");
+               return 0;
+       }
+
+       VideoLogInfo("");
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       if(pAppData->bStartSeek)
+       {
+               MpVideoCtrlMgrMediaPlay((void *)pAppData);
+               MpVideoAppCtrlBeginOfStream(pAppData);
+               MpUtilLcdNormalPowerLockForResume();
+               pAppData->bStartSeek = FALSE;
+       }
+
+       pAppData->bSeekComplete = TRUE;
+
+       if(pAppData->nSeekPosition > 0) {
+               pAppData->nSetPosition = pAppData->nSeekPosition;
+               pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSetPosition(pAppData);
+               pAppData->nSeekPosition = 0;
+               MpVideoViewCtrlUpdateProgressbar((void *)pAppData);
+               return 0;
+       }
+
+       if(pAppData->nSeekPlayerState == MP_PLAYER_STATE_PAUSE) {
+               VideoLogInfo("== CALL PAUSE =================================");
+               pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlPause(pAppData);
+               pAppData->nSeekPlayerState = MP_PLAYER_STATE_WAIT_FOR_RESPONSE;
+       }
+       else if(pAppData->nSeekPlayerState == MP_PLAYER_STATE_RESUME) {
+               VideoLogInfo("== CALL RESUME =================================");
+               pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlResume(pAppData);
+               pAppData->nSeekPlayerState = MP_PLAYER_STATE_WAIT_FOR_RESPONSE;
+       }
+
+       return 0;
+}
+
+static void MpVideoAppCtrlSeekCompleteCb(void *pUserData)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("No exist pUserData");
+               return;
+       }
+
+       VideoLogInfo("");
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+       if(pEcorePipeHandlerForSeekComplete)
+       {
+               if(!ecore_pipe_write(pEcorePipeHandlerForSeekComplete, (void *)pAppData, sizeof(pAppData)))
+               {
+                       VideoLogDebug("Fail to write MpVideoAppCtrlSeekCompleteCb.");
+               }
+       }
+}
+
+static int MpVideoAppCtrlResumeByRewCb(void *pUserData)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("No exist pUserData");
+               return 0;
+       }
+
+       VideoLogInfo("");
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       MpVideoAppCtrlResume(pAppData);
+
+       return 0;
+}
+
+static int MpVideoAppCtrlErrormsgCb(void *pUserData)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("No exist pUserData");
+               return 0;
+       }
+
+       VideoLogInfo("");
+
+       switch(MpVideoCtrlMgrGetErrorType(nPlayerErrorType))
+       {
+       case MP_PLAYER_ERROR_NONE:
+               VideoLogInfo("MP_PLAYER_ERROR_NONE");
+               break;
+
+       case MP_PLAYER_ERROR_OUT_OF_MEMORY:
+               VideoLogInfo("MP_PLAYER_ERROR_OUT_OF_MEMORY");
+               MpUtilNotifyPopUp((VideoAppData*)pUserData, _(MP_VPL_UNABLE_TO_PLAY_VIDEO), MpVideoAppCtrlExitCb);
+               break;
+
+       case MP_PLAYER_ERROR_INVALID_PARAMETER:
+               VideoLogInfo("MP_PLAYER_ERROR_INVALID_PARAMETER");
+               MpUtilNotifyPopUp((VideoAppData*)pUserData, _(MP_VPL_UNABLE_TO_PLAY_VIDEO), MpVideoAppCtrlExitCb);
+               break;
+
+       case MP_PLAYER_ERROR_NO_SUCH_FILE:
+               VideoLogInfo("MP_PLAYER_ERROR_NO_SUCH_FILE");
+               MpUtilNotifyPopUp((VideoAppData*)pUserData, MP_COM_POP_FILE_NOT_FOUND, MpVideoAppCtrlExitCb);
+               break;
+
+       case MP_PLAYER_ERROR_INVALID_OPERATION:
+               VideoLogInfo("MP_PLAYER_ERROR_INVALID_OPERATION");
+               MpUtilNotifyPopUp((VideoAppData*)pUserData, _(MP_VPL_UNABLE_TO_PLAY_VIDEO), MpVideoAppCtrlExitCb);
+               break;
+
+       case MP_PLAYER_ERROR_SEEK_FAILED:
+               VideoLogInfo("MP_PLAYER_ERROR_SEEK_FAILED");
+               break;
+
+       case MP_PLAYER_ERROR_INVALID_STATE:
+               VideoLogInfo("MP_PLAYER_ERROR_INVALID_STATE");
+               break;
+
+       case MP_PLAYER_ERROR_NOT_SUPPORTED_FILE:
+               VideoLogInfo("MP_PLAYER_ERROR_NOT_SUPPORTED_FILE");
+               MpUtilNotifyPopUp((VideoAppData*)pUserData, _(MP_VPL_POP_UNSUPPORTED_FILE_TYPE), MpVideoAppCtrlEndOfStream);
+               break;
+
+       case MP_PLAYER_ERROR_INVALID_URI:
+               VideoLogInfo("MP_PLAYER_ERROR_INVALID_URI");
+               MpUtilNotifyPopUp((VideoAppData*)pUserData, MP_COM_POP_INVALID_URL, MpVideoAppCtrlExitCb);
+               break;
+
+       case MP_PLAYER_ERROR_SOUND_POLICY:
+               VideoLogInfo("MP_PLAYER_ERROR_SOUND_POLICY");
+               break;
+
+       case MP_PLAYER_ERROR_CONNECTION_FAILED:
+               VideoLogInfo("MP_PLAYER_ERROR_CONNECTION_FAILED");
+               MpUtilNotifyPopUp((VideoAppData*)pUserData, MP_COM_POP_CONNECTION_FAILED, MpVideoAppCtrlExitCb);
+               break;
+
+       default:
+               MpUtilNotifyPopUp((VideoAppData*)pUserData, _(MP_VPL_UNABLE_TO_PLAY_VIDEO), MpVideoAppCtrlExitCb);
+               break;
+       }
+
+       return 0;
+}
+
+static void MpVideoAppCtrlPlayerPrepareCb(void *pUserData)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("No exist appdata.");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       if(pEcorePipeHandleBOF)
+       {
+               if(!ecore_pipe_write(pEcorePipeHandleBOF, pUserData, sizeof(pUserData)))
+               {
+                       VideoLogDebug("FAIL PIPE WRITE");
+               }
+       }
+}
+
+static void MpVideoAppCtrlPlayerCompletedCb(void *pUserData)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("No exist appdata.");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       if(pEcorePipeHandleEOF)
+       {
+               if(!ecore_pipe_write(pEcorePipeHandleEOF, pUserData, sizeof(pUserData)))
+               {
+                       VideoLogDebug("FAIL PIPE WRITE");
+               }
+       }
+}
+
+static void MpVideoAppCtrlPlayerInterruptedCbCb(player_interrupted_code_e nInterruptCode, void *pUserData)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("No exist appdata.");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       nPlayerInterruptType = nInterruptCode;
+
+       if(pEcorePipeHandleForInterruped)
+       {
+               if(!ecore_pipe_write(pEcorePipeHandleForInterruped, pUserData, sizeof(pUserData)))
+               {
+                       VideoLogDebug("FAIL PIPE WRITE");
+               }
+       }
+}
+
+static void MpVideoAppCtrlPlayerErrorCb(int nPlayerErrorCode, void *pUserData)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("No exist appdata.");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       nPlayerErrorType = nPlayerErrorCode;
+
+       if(pEcorePipeHandleForErrorMsg)
+       {
+               if(!ecore_pipe_write(pEcorePipeHandleForErrorMsg, pUserData, sizeof(pUserData)))
+               {
+                       VideoLogDebug("FAIL PIPE WRITE");
+               }
+       }
+}
+
+static void MpVideoAppCtrlPlayerBufferingCb(int nPercent, void *pUserData)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("No exist appdata.");
+               return;
+       }
+
+       VideoLogInfo("Buffering : %d%% ", nPercent);
+
+       nBufferingRate = nPercent;
+
+       if(pEcorePipeHandleForBuffering)
+       {
+               if(!ecore_pipe_write(pEcorePipeHandleForBuffering, pUserData, sizeof(pUserData)))
+               {
+                       VideoLogDebug("FAIL PIPE WRITE");
+               }
+       }
+}
+
+/*
+ * Internal function
+ */
+void MpVideoAppCtrlFuncInit(VideoAppData *pAppData)
+{
+       VideoLogInfo("");
+
+       if(!pAppData)
+       {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlStart = (void *)MpVideoAppCtrlStart;
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlStop = (void *)MpVideoAppCtrlStop;
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlPause = (void *)MpVideoAppCtrlPause;
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlResume = (void *)MpVideoAppCtrlResume;
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlStopByAppPause = (void *)MpVideoAppCtrlStopByAppPause;
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlStartByAppResume = (void *)MpVideoAppCtrlStartByAppResume;
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlFFDown = (void *)MpVideoAppCtrlFFDown;
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlRewDown = (void *)MpVideoAppCtrlRewDown;
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlFFUp = (void *)MpVideoAppCtrlFFUp;
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlRewUp = (void *)MpVideoAppCtrlRewUp;
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSpeedFF = (void *)MpVideoAppCtrlSpeedFF;
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSpeedRew = (void *)MpVideoAppCtrlSpeedRew;
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSpeedReset = (void *)MpVideoAppCtrlSpeedReset;
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlRotateScreen = (void *)MpVideoAppCtrlRotateScreen;
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlGetPosition = (void *)MpVideoAppCtrlGetPosition;
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSetPosition = (void *)MpVideoAppCtrlSetPosition;
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlHideLayout = (void *)MpVideoAppCtrlHideLayout;
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlShowLayout = (void *)MpVideoAppCtrlShowLayout;
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlGetVideoResolution = (void *)MpVideoAppCtrlGetVideoResolution;
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlReqDurationTime = (void *)MpVideoAppCtrlReqDurationTime;
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlBeginOfStream = (void *)MpVideoAppCtrlBeginOfStream;
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlEndOfStream = (void *)MpVideoAppCtrlEndOfStream;
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlExit = (void *)MpVideoAppCtrlExit;
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlStartStreaming = (void *)MpVideoAppCtrlStartStreaming;
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlReLaunching = (void *)MpVideoAppCtrlReLaunching;
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlPlayPreMedia = (void *)MpVideoAppCtrlPlayPreMedia;
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlPlayNextMedia = (void *)MpVideoAppCtrlPlayNextMedia;
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlGetBufferingPosition = (void *)MpVideoAppCtrlGetBufferingPosition;
+}
+
+bool MpVideoAppCtrlCheckDrm(VideoAppData *pAppData, char *szMediaPath)
+{
+       if(!pAppData)
+       {
+               VideoLogInfo("No exist appdata.");
+               return FALSE;
+       }
+
+       VideoLogInfo("");
+
+       MpVideoDrmInit();
+
+       if(MpVideoDrmIsDrmFile(szMediaPath))
+       {
+               MpVideoDrmInfo *pResult = NULL;
+               pResult = MpVideoDrmCheckLeftRo(pAppData->szVideoTitle, szMediaPath);
+               if(pResult->nErrorCode != MP_VIDEO_DRM_ERROR_NONE)
+               {
+                       char szErrMsg[STR_LEN_MAX] ={0,};
+
+                       if(pResult->nErrorCode == MP_VIDEO_DRM_ERROR_INTERNAL) {
+                               snprintf(szErrMsg, STR_LEN_MAX, MP_VPL_DRM_UNLOCK, ecore_file_file_get(szMediaPath));
+                       }
+                       else if(pResult->nErrorCode == MP_VIDEO_DRM_ERROR_TIME_BASED) {
+                               snprintf(szErrMsg, STR_LEN_MAX, MP_VPL_DRM_UNLOCK, ecore_file_file_get(szMediaPath));
+                       }
+                       else if(pResult->nErrorCode == MP_VIDEO_DRM_ERROR_INTERVAL) {
+                               snprintf(szErrMsg, STR_LEN_MAX, MP_VPL_DRM_UNLOCK, ecore_file_file_get(szMediaPath));
+                       }
+                       else if(pResult->nErrorCode == MP_VIDEO_DRM_ERROR_INTERVAL_FIRST_USE) {
+                               snprintf(szErrMsg, STR_LEN_MAX, MP_VPL_DRM_INTERVAL_BASED_DAYS,ecore_file_file_get(szMediaPath) , pResult->nData);
+                               MpUtilYesNoPopUp(pAppData, NULL, szErrMsg, MpVideoAppCtrlCheckDrmPopupCb, MpVideoAppCtrlExitCb);
+                       }
+                       else if(pResult->nErrorCode == MP_VIDEO_DRM_ERROR_ACCUMULATED) {
+                               snprintf(szErrMsg, STR_LEN_MAX, MP_VPL_DRM_UNLOCK,ecore_file_file_get(szMediaPath));
+                       }
+                       else if(pResult->nErrorCode == MP_VIDEO_DRM_ERROR_COUNT) {
+                               snprintf(szErrMsg, STR_LEN_MAX, MP_VPL_DRM_UNLOCK, ecore_file_file_get(szMediaPath));
+                       }
+                       else if(pResult->nErrorCode == MP_VIDEO_DRM_ERROR_COUNT_SMALL) {
+                               if(pResult->nData == 1) {
+                                       snprintf(szErrMsg, STR_LEN_MAX, MP_VPL_DRM_COUNT_BASED_OPEN_ONE,ecore_file_file_get(szMediaPath) );
+                               }
+                               else {
+                                       snprintf(szErrMsg, STR_LEN_MAX, MP_VPL_DRM_COUNT_BASED_OPEN_MANY,ecore_file_file_get(szMediaPath) , pResult->nData);
+                               }
+
+                               MpUtilYesNoPopUp(pAppData, NULL, szErrMsg, MpVideoAppCtrlCheckDrmPopupCb, MpVideoAppCtrlExitCb);
+                       }
+                       else if(pResult->nErrorCode == MP_VIDEO_DRM_ERROR_TIME_COUNT_BASED) {
+                               snprintf(szErrMsg, STR_LEN_MAX, MP_VPL_DRM_UNLOCK,szMediaPath );
+                       }
+                       else if(pResult->nErrorCode == MP_VIDEO_DRM_ERROR_TIME_INDIVIDULAL) {
+                               snprintf(szErrMsg, STR_LEN_MAX, MP_VPL_DRM_UNLOCK,szMediaPath );
+                       }
+                       else if(pResult->nErrorCode == MP_VIDEO_DRM_ERROR_TIME_SYSTEM) {
+                               snprintf(szErrMsg, STR_LEN_MAX, MP_VPL_DRM_UNLOCK,szMediaPath );
+                       }
+
+                       if(pResult->nErrorCode != MP_VIDEO_DRM_ERROR_COUNT_SMALL &&
+                               pResult->nErrorCode != MP_VIDEO_DRM_ERROR_INTERVAL_FIRST_USE) {
+                               MpUtilNotifyPopUp(pAppData,szErrMsg, MpVideoAppCtrlCheckDrmPopupCb);
+                       MpVideoAppCtrlExit(pAppData);
+                               if(pResult) {
+                                       free(pResult);
+                                       pResult = NULL;
+                               }
+                       return FALSE;
+               }
+
+                       if(pResult) {
+                               free(pResult);
+                               pResult = NULL;
+                       }
+               }
+
+               if(pResult) {
+                       free(pResult);
+                       pResult = NULL;
+               }
+
+               if(!MpVideoDrmCheckForward(szMediaPath))
+               {
+                       VideoLogInfo("[EXIT BY CHECKING DRM]");
+                       MpUtilNotifyPopUp(pAppData, "Forward Lock DRM file.", MpVideoAppCtrlCheckDrmPopupCb);
+                       MpVideoAppCtrlExit(pAppData);
+                       return FALSE;
+               }
+
+               MpVideoDrmSetConsumptionState(VIDEO_DRM_CONSUMPTION_STATE_ENABLE);
+       }
+
+       MpVideoDrmStartConsumption(pAppData->szMediaUri);
+
+       return TRUE;
+}
+
+static void MpVideoAppCtrlPlayPreMedia(VideoAppData *pAppData)
+{
+       if(!pAppData)
+       {
+               VideoLogInfo("No exist appdata.");
+               return;
+       }
+
+       if(strlen(pAppData->szPreMediaUri) <= 0)
+       {
+               VideoLogInfo("szPreMediaUri is NULL.");
+               return;
+       }
+
+       VideoLogInfo("Current media uri : %s", pAppData->szMediaUri);
+       VideoLogInfo("Previous media uri : %s", pAppData->szPreMediaUri);
+
+       strncpy(pAppData->szMediaUri, pAppData->szPreMediaUri, sizeof(pAppData->szMediaUri) - 1);
+       MpVideoAppCtrlShowLayout(pAppData);
+
+       int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+       if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+       {
+               MpUtilMediaSvcGetVideoCurrentUrlPreNextItem(pAppData->szMediaUri, pAppData->szPreMediaUri, pAppData->szNextMediaUri, false);
+       }
+
+       MpVideoAppCtrlReLaunching(pAppData);
+}
+
+static void MpVideoAppCtrlPlayNextMedia(VideoAppData *pAppData)
+{
+       if(!pAppData)
+       {
+               VideoLogInfo("No exist appdata.");
+               return;
+       }
+
+       if(strlen(pAppData->szNextMediaUri) <= 0)
+       {
+               VideoLogInfo("szNextMediaUri is NULL.");
+               return;
+       }
+
+       VideoLogInfo("Current media uri : %s", pAppData->szMediaUri);
+       VideoLogInfo("Next media uri : %s", pAppData->szNextMediaUri);
+
+       strncpy(pAppData->szMediaUri, pAppData->szNextMediaUri, sizeof(pAppData->szMediaUri) - 1);
+       MpVideoAppCtrlShowLayout(pAppData);
+
+       int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+       if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+       {
+               MpUtilMediaSvcGetVideoCurrentUrlPreNextItem(pAppData->szMediaUri, pAppData->szPreMediaUri, pAppData->szNextMediaUri, false);
+       }
+
+       MpVideoAppCtrlReLaunching(pAppData);
+}
+
+static void MpVideoAppCtrlGetBufferingPosition(VideoAppData *pAppData)
+{
+       if(!pAppData)
+       {
+               VideoLogInfo("No exist appdata.");
+               return;
+       }
+
+       int nTmpPlayerType = MpVideoServiceCtrlGetPlayerTypeWithoutLog();
+       if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+       {
+               VideoLogInfo("Skip Normal Play mode");
+               return;
+       }
+
+       if(MpUtilCheckRTSPType(pAppData->szMediaUri))
+       {
+               return;
+       }
+
+       pAppData->nBufferingPosition = MpVideoCtrlMgrGetBufferingPosition();
+}
+
+static void MpVideoAppCtrlStart(VideoAppData *pAppData)
+{
+       if(!pAppData)
+       {
+               VideoLogInfo("No exist appdata.");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+       if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+       {
+               if(!MpUtilCheckLocalFileExist(pAppData->szMediaUri))
+               {
+                       MpUtilNotifyPopUp(pAppData, MP_COM_POP_FILE_NOT_EXIST, MpVideoAppCtrlExitCb);
+                       return;
+               }
+
+               MpUtilGetTitleFromFilepath(pAppData->szMediaUri, pAppData->szVideoTitle, STR_LEN_MAX);
+               MpVideoViewCtrlChangeTitle(pAppData);
+               MpVideoAppCtrlCheckDrm(pAppData, pAppData->szMediaUri);
+
+               MpVideoCtrlMgrMediaCreate(pAppData->szMediaUri, (void *)MpUtilGetMainWindowXID(), (void *)pAppData);
+
+               MpVideoCtrlMgrSetPlayerCallback(MpVideoAppCtrlPlayerCompletedCb, MpVideoAppCtrlPlayerInterruptedCbCb, MpVideoAppCtrlPlayerErrorCb, MpVideoAppCtrlPlayerBufferingCb, (void*)pAppData);
+
+               MpVideoCtrlMgrMediaRealize();
+
+               MpVideoAppCtrlRotateScreen(pAppData, MpUtilGetRotationState());
+
+               pAppData->bStartSeek = FALSE;
+               if(pAppData->nSetPosition > 0)
+               {
+                       VideoLogInfo("Pending seek position time : %dms", pAppData->nSetPosition);
+                       MpVideoAppCtrlSetPosition(pAppData);
+                       pAppData->bStartSeek = TRUE;
+               }
+
+               if(MpVideoViewCtrlIsPauseByUser())
+               {
+                       MpVideoCtrlMgrSetMute(TRUE);
+               }
+
+               if(!pAppData->bStartSeek)
+               {
+                       MpVideoCtrlMgrMediaPlay((void *)pAppData);
+                       MpVideoAppCtrlBeginOfStream(pAppData);
+                       MpUtilLcdNormalPowerLockForResume();
+               }
+
+               MpVideoCtrlMgrMediaPlay((void *)pAppData);
+
+       }
+       else if(nTmpPlayerType == MP_STREAMING_PLAYER)
+       {
+               if(!MpVideoStreamingCtrlIsNetworkOn())
+               {
+                       MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL), MpVideoAppCtrlExitCb);
+                       return;
+               }
+
+               if(MpVideoStreamingCtrlInit((void *)pAppData))
+               {
+                       VideoLogInfo("Connect to network.");
+                       MpVideoAppCtrlStartStreaming((void *)pAppData);
+               }
+       }
+}
+
+static void MpVideoAppCtrlStop(VideoAppData *pAppData)
+{
+       if(!pAppData)
+       {
+               VideoLogInfo("No exist appdata.");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       pAppData->nCurPlayerState = MP_PLAYER_STATE_STOP;
+
+       MpVideoDrmStopConsumption();
+       MpVideoCtrlMgrMediaStop((void *)pAppData);
+}
+
+static void MpVideoAppCtrlPause(VideoAppData *pAppData)
+{
+       if(!pAppData)
+       {
+               VideoLogInfo("No exist appdata.");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       if(pAppData->nCurPlayerState == MP_PLAYER_STATE_PAUSE)
+       {
+               VideoLogInfo("Allready Pause video player.");
+               return;
+       }
+
+       pAppData->nCurPlayerState = MP_PLAYER_STATE_PAUSE;
+
+       MpVideoDrmPauseConsumption();
+       MpVideoCtrlMgrMediaPause(pAppData);
+       MpVideoViewCtrlPause(pAppData);
+       MpVideoAppCtrlShowLayout(pAppData);
+       MpUtilLcdNormalPowerUnlockForPause();
+}
+
+static void MpVideoAppCtrlResume(VideoAppData *pAppData)
+{
+       if(!pAppData)
+       {
+               VideoLogInfo("No exist appdata.");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       if(pAppData->nCurPlayerState == MP_PLAYER_STATE_RESUME || pAppData->nCurPlayerState == MP_PLAYER_STATE_PLAY)
+       {
+               VideoLogInfo("Allready Resume video player.");
+               return;
+       }
+
+       pAppData->nCurPlayerState = MP_PLAYER_STATE_RESUME;
+
+       MpUtilMultimediaKeyGrab();
+       MpVideoDrmResumeConsumption();
+       MpVideoAppCtrlGetPosition(pAppData);
+       MpVideoCtrlMgrMediaResume(pAppData);
+       MpVideoViewCtrlResume(pAppData);
+       MpVideoAppCtrlShowLayout(pAppData);
+       MpUtilLcdNormalPowerLockForResume();
+}
+
+static void MpVideoAppCtrlStopByAppPause(VideoAppData *pAppData)
+{
+       if(!pAppData)
+       {
+               VideoLogInfo("No exist appdata.");
+               return;
+       }
+
+       if(!MpVideoCtrlMgrIsExistPlayerHandle())
+       {
+               VideoLogInfo("Not exist Player handle.");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       MpVideoAppCtrlGetPosition(pAppData);
+       pAppData->nSetPosition = pAppData->nCurPosition;
+       VideoLogInfo("Current position time : %d", pAppData->nSetPosition);
+       MpVideoViewCtrlPause(pAppData);
+       MpVideoAppCtrlStop(pAppData);
+       MpVideoCtrlMgrMediaDestroy(pAppData);
+       MpUtilLcdNormalPowerUnlockForPause();
+       MpVideoViewCtrlResetProgressBar((void *)pAppData);
+
+       MpUtilMultimediaKeyUngrab();
+
+       int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+       if(nTmpPlayerType == MP_STREAMING_PLAYER)
+       {
+               MpVideoViewSetBufferingRateForStreamingView(0, (void *)pAppData);
+       }
+}
+
+static void MpVideoAppCtrlStartByAppResume(VideoAppData *pAppData)
+{
+       if(!pAppData)
+       {
+               VideoLogInfo("No exist appdata.");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       if(bWindowForegroundState == FALSE)
+       {
+               VideoLogInfo("The Window of the video player is hided.");
+       }
+
+       MpVideoAppCtrlStart(pAppData);
+       MpVideoViewCtrlResume(pAppData);
+       MpVideoAppCtrlShowLayout(pAppData);
+
+
+       return;
+}
+
+static void MpVideoAppCtrlFFDown(VideoAppData *pAppData)
+{
+       VideoLogInfo("");
+}
+
+static void MpVideoAppCtrlRewDown(VideoAppData *pAppData)
+{
+       VideoLogInfo("");
+}
+
+static void MpVideoAppCtrlFFUp(VideoAppData *pAppData)
+{
+       VideoLogInfo("");
+}
+
+static void MpVideoAppCtrlRewUp(VideoAppData *pAppData)
+{
+       VideoLogInfo("");
+}
+
+static void MpVideoAppCtrlRotateScreen(VideoAppData *pAppData, int nRotateState)
+{
+       if(!pAppData)
+       {
+               VideoLogInfo("No exist appdata.");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       if(VIDEO_ROTATE_UNKNOWN > nRotateState || VIDEO_ROTATE_LANDSCAPE_REVERSE < nRotateState)
+       {
+               VideoLogInfo("Wrong rotate state. - %d", nRotateState);
+               return;
+       }
+
+       MpVideoCtrlMgrRotateVideoScreen(nRotateState);
+}
+
+static void MpVideoAppCtrlGetPosition(VideoAppData *pAppData)
+{
+       pAppData->nCurPosition = MpVideoCtrlMgrGetPosition();
+}
+
+static void MpVideoAppCtrlSetPosition(VideoAppData *pAppData)
+{
+       if(!pAppData)
+       {
+               VideoLogInfo("No exist appdata.");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       MpVideoCtrlMgrSetPosition(pAppData->nSetPosition, (void *)MpVideoAppCtrlSeekCompleteCb, (void *)pAppData);
+
+       if(MpUtilCheckRTSPType(pAppData->szMediaUri))
+       {
+               VideoLogInfo("RTSP SEEK Start");
+               nBufferingRate = 0;
+               MpVideoAppCtrlBufferingCb((void *)pAppData);
+       }
+}
+
+static void MpVideoAppCtrlSpeedReset(VideoAppData *pAppData)
+{
+       VideoLogInfo("");
+       MpVideoAppCtrlGetPosition(pAppData);
+       MpVideoCtrlMgrSetPosition( pAppData->nCurPosition, (void *)MpVideoAppCtrlSeekCompleteCb, (void *)pAppData);
+       MpVideoCtrlMgrResetPlaySpeed((void *)pAppData);
+}
+
+static void MpVideoAppCtrlSpeedFF(VideoAppData *pAppData)
+{
+       VideoLogInfo("");
+       MpVideoCtrlMgrSetPlaySpeedUp((void *)pAppData);
+}
+
+static void MpVideoAppCtrlSpeedRew(VideoAppData *pAppData)
+{
+       VideoLogInfo("");
+       MpVideoCtrlMgrSetPlaySpeedDown((void *)pAppData);
+}
+
+static void MpVideoAppCtrlHideLayout(VideoAppData *pAppData)
+{
+       if(!pAppData)
+       {
+               VideoLogInfo("No exist appdata.");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       MpVideoViewHideLayout((void *)pAppData);
+}
+
+static void MpVideoAppCtrlShowLayout(VideoAppData *pAppData)
+{
+       if(!pAppData)
+       {
+               VideoLogInfo("No exist appdata.");
+               return;
+       }
+
+       VideoLogInfo("");
+
+               MpVideoViewShowLayout((void *)pAppData);
+}
+
+static void MpVideoAppCtrlGetVideoResolution(VideoAppData *pAppData)
+{
+       if(!pAppData)
+       {
+               VideoLogInfo("No exist appdata.");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       pAppData->nVideoWidthResolution = MpVideoCtrlMgrGetVideoWidthResolution();
+       pAppData->nVideoHeightResolution = MpVideoCtrlMgrGetVideoHeightResolution();
+}
+
+static void MpVideoAppCtrlReqDurationTime(VideoAppData *pAppData)
+{
+       if(!pAppData)
+       {
+               VideoLogInfo("No exist appdata.");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       pAppData->nDuration = MpVideoCtrlMgrGetDuration();
+}
+
+static void MpVideoAppCtrlBeginOfStream(VideoAppData *pAppData)
+{
+       if(!pAppData)
+       {
+               VideoLogInfo("No exist appdata.");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       pAppData->nCurPlayerState = MP_PLAYER_STATE_PLAY;
+       MpUtilMultimediaKeyGrab();
+
+       MpVideoAppCtrlGetVideoResolution(pAppData);
+       pAppData->nDuration = MpVideoCtrlMgrGetDuration();
+
+       MpVideoViewCtrlInitAfterBeginOfStream((void*)pAppData);
+
+       if(MpVideoViewCtrlIsPauseByUser())
+       {
+               MpVideoAppCtrlPause(pAppData);
+               MpVideoCtrlMgrSetMute(FALSE);
+       }
+
+       if(MpVideoCtrlMgrIsOnlyAudio())
+       {
+               MpVideoViewCtrlShowNocontentImage((void*)pAppData);
+       }
+       else
+       {
+               MpVideoViewCtrlHideNocontentImage((void*)pAppData);
+       }
+}
+
+static void MpVideoAppCtrlEndOfStream(VideoAppData *pAppData)
+{
+       if(!pAppData)
+       {
+               VideoLogInfo("No exist appdata.");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+       if(nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY)
+       {
+               if(pAppData->nCurPosition >= 0)
+               {
+                       MpUtilMediaSvcSetVideoLastPlayedTimeByUri(pAppData->szMediaUri, 0);
+               }
+               else
+               {
+                       VideoLogInfo("Invalid Plaing time or duration time.");
+               }
+       }
+
+       if(strlen(pAppData->szNextMediaUri) > 0)
+       {
+               MpVideoAppCtrlPlayNextMedia(pAppData);
+       }
+               else
+               {
+                       MpVideoAppCtrlExit(pAppData);
+               }
+
+       MpVideoViewCtrlHideNocontentImage((void*)pAppData);
+}
+
+static void MpVideoAppCtrlExit(VideoAppData *pAppData)
+{
+       if(!pAppData)
+       {
+               VideoLogInfo("No exist appdata.");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       if(pEcorePipeHandleForErrorMsg)
+       {
+               ecore_pipe_del(pEcorePipeHandleForErrorMsg);
+               pEcorePipeHandleForErrorMsg = NULL;
+       }
+
+       if(pEcorePipeHandleBOF)
+       {
+               ecore_pipe_del(pEcorePipeHandleBOF);
+               pEcorePipeHandleBOF = NULL;
+       }
+
+       if(pEcorePipeHandleEOF)
+       {
+               ecore_pipe_del(pEcorePipeHandleEOF);
+               pEcorePipeHandleEOF = NULL;
+       }
+
+       if(pEcorePipeHandleForBuffering)
+       {
+               ecore_pipe_del(pEcorePipeHandleForBuffering);
+               pEcorePipeHandleForBuffering = NULL;
+       }
+
+       if(pEcorePipeHandleForResumed)
+       {
+               ecore_pipe_del(pEcorePipeHandleForResumed);
+               pEcorePipeHandleForResumed = NULL;
+       }
+
+       if(pEcorePipeHandleForInterruped)
+       {
+               ecore_pipe_del(pEcorePipeHandleForInterruped);
+               pEcorePipeHandleForInterruped = NULL;
+       }
+
+       if(pEcorePipeHandlerForSeekComplete)
+       {
+               ecore_pipe_del(pEcorePipeHandlerForSeekComplete);
+               pEcorePipeHandlerForSeekComplete = NULL;
+       }
+
+       MpVideoAppCtrlStop(pAppData);
+       MpVideoCtrlMgrMediaDestroy(pAppData);
+       MpUtilDeletePopupHandle();
+       MpVideoViewCtrlDestroy((void *)pAppData);
+
+       if(MpVideoServiceCtrlGetPlayerType() == MP_STREAMING_PLAYER)
+       {
+               MpVideoStreamingCtrlDestroy((void *)pAppData);
+       }
+
+       MpExternalUgDestroyAll();
+
+       elm_win_indicator_mode_set(pAppData->pMainWindow, ELM_WIN_INDICATOR_SHOW);
+
+       elm_exit();
+}
+
+static void MpVideoAppCtrlStartStreaming(VideoAppData *pAppData)
+{
+       if(!pAppData)
+       {
+               VideoLogInfo("No exist appdata.");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       strncpy(pAppData->szCookie, MpVideoServiceCtrlGetCookieForStreaming(), STR_LEN_MAX - 1);
+
+       MpVideoCtrlMgrMediaCreate(pAppData->szMediaUri, (void *)MpUtilGetMainWindowXID(), (void *)pAppData);
+
+       MpVideoCtrlMgrSetPlayerCallback(MpVideoAppCtrlPlayerCompletedCb, MpVideoAppCtrlPlayerInterruptedCbCb, MpVideoAppCtrlPlayerErrorCb, MpVideoAppCtrlPlayerBufferingCb, (void*)pAppData);
+
+       MpVideoCtrlMgrMediaRealizeAsync(MpVideoAppCtrlPlayerPrepareCb, (void *)pAppData);
+
+       MpVideoAppCtrlRotateScreen(pAppData, MpUtilGetRotationState());
+}
+
+static void MpVideoAppCtrlReLaunching(VideoAppData *pAppData)
+{
+       if(!pAppData)
+       {
+               VideoLogInfo("No exist appdata.");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       MpVideoAppCtrlStop(pAppData);
+       MpVideoCtrlMgrMediaDestroy(pAppData);
+
+       int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+       if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+       {
+               pAppData->nSetPosition = 0;
+               MpVideoViewCtrlChangeTitle(pAppData);
+               MpVideoAppCtrlStart(pAppData);
+       }
+
+       if(nTmpPlayerType == MP_STREAMING_PLAYER)
+       {
+               MpVideoAppCtrlStartStreaming(pAppData);
+               pAppData->nSeekPosition = 0;;
+       }
+}
+
+static void MpVideoAppCtrlPipeInit(VideoAppData *pAppData)
+{
+       if(!pAppData)
+       {
+               VideoLogInfo("No exist appdata.");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       if(pEcorePipeHandlerForSeekComplete)
+       {
+               ecore_pipe_del(pEcorePipeHandlerForSeekComplete);
+               pEcorePipeHandlerForSeekComplete = NULL;
+       }
+       pEcorePipeHandlerForSeekComplete = ecore_pipe_add((Ecore_Pipe_Cb)MpVideoAppCtrlSeekCompletePipeCb, (void *)pAppData);
+
+       if(pEcorePipeHandleForErrorMsg)
+       {
+               ecore_pipe_del(pEcorePipeHandleForErrorMsg);
+               pEcorePipeHandleForErrorMsg = NULL;
+       }
+
+       pEcorePipeHandleForErrorMsg = ecore_pipe_add((Ecore_Pipe_Cb)MpVideoAppCtrlErrormsgCb, (void *)pAppData);
+
+       if(pEcorePipeHandleBOF)
+       {
+               ecore_pipe_del(pEcorePipeHandleBOF);
+               pEcorePipeHandleBOF = NULL;
+       }
+
+       pEcorePipeHandleBOF = ecore_pipe_add((Ecore_Pipe_Cb)MpVideoAppCtrlBeginOfPlayCb, (void *)pAppData);
+
+       if(pEcorePipeHandleEOF)
+       {
+               ecore_pipe_del(pEcorePipeHandleEOF);
+               pEcorePipeHandleEOF = NULL;
+       }
+
+       pEcorePipeHandleEOF = ecore_pipe_add((Ecore_Pipe_Cb)MpVideoAppCtrlEndOfPlayCb, (void *)pAppData);
+
+       if(pEcorePipeHandleForBuffering)
+       {
+               ecore_pipe_del(pEcorePipeHandleForBuffering);
+               pEcorePipeHandleForBuffering = NULL;
+       }
+
+       pEcorePipeHandleForBuffering = ecore_pipe_add((Ecore_Pipe_Cb)MpVideoAppCtrlBufferingCb, (void *)pAppData);
+
+       if(pEcorePipeHandleForResumed)
+       {
+               ecore_pipe_del(pEcorePipeHandleForResumed);
+               pEcorePipeHandleForResumed = NULL;
+       }
+
+       pEcorePipeHandleForResumed = ecore_pipe_add((Ecore_Pipe_Cb)MpVideoAppCtrlResumeByRewCb, (void *)pAppData);
+
+       if(pEcorePipeHandleForInterruped)
+       {
+               ecore_pipe_del(pEcorePipeHandleForInterruped);
+               pEcorePipeHandleForInterruped = NULL;
+       }
+
+       pEcorePipeHandleForInterruped = ecore_pipe_add((Ecore_Pipe_Cb)MpVideoAppCtrlPauseByInterrupteCb, (void *)pAppData);
+}
+
+/*
+ * External function
+ */
+bool MpVideoAppCtrlInit(VideoAppData *pAppData)
+{
+       if(!pAppData)
+       {
+               VideoLogInfo("No exist appdata.");
+               return FALSE;
+       }
+
+       VideoLogInfo("Get rotation state from appcore. - %d", MpUtilGetRotationStateFromAppcore());
+
+       MpVideoAppCtrlFuncInit(pAppData);
+       MpVideoAppCtrlPipeInit(pAppData);
+       MpVideoViewCtrlInit(pAppData);
+
+       evas_object_show(pAppData->pMainWindow);
+       elm_win_activate(pAppData->pMainWindow);
+
+       if(!MpUtilCheckCallStatus())
+       {
+               MpUtilNotifyPopUp(pAppData, _(MP_VPL_BODY_UNABLE_TO_PLAY_VIDEO_DURING_CALL), MpVideoAppCtrlExitCb);
+               return FALSE;
+       }
+
+       if(!MpUtilCheckBatteryStatus())
+       {
+               MpUtilNotifyPopUp(pAppData, dgettext("sys_string", MP_COM_BODY_LOW_BATTERY), MpVideoAppCtrlExitCb);
+               return FALSE;
+       }
+
+               MpVideoAppCtrlStart(pAppData);
+
+       return TRUE;
+}
+
+bool MpVideoAppCtrlResetForRelaunching(VideoAppData *pAppData)
+{
+       if (!pAppData) {
+               VideoLogInfo("No exist appdata.");
+               return FALSE;
+       }
+
+       VideoLogInfo("");
+
+       MpVideoAppCtrlStop(pAppData);
+       MpVideoCtrlMgrMediaDestroy(pAppData);
+       MpUtilDeletePopupHandle();
+       MpVideoViewCtrlDestroy((void *)pAppData);
+       MpUtilMediaSvcDestoryVideoList();
+       MpUtilMediaSvcFinishSession();
+       MpUtilBatteryStatusNotiIgnore();
+
+       nBufferingRate = 0;
+       nPlayerErrorType = 0;
+       nPlayerInterruptType = 0;
+
+       pAppData->nDuration = 0;
+       pAppData->nSetPosition = 0;
+       pAppData->nCurPosition = 0;
+       pAppData->nSeekPosition = 0;
+       pAppData->nBufferingPosition = 0;
+       pAppData->nVideoWidthResolution = 0;
+       pAppData->nVideoHeightResolution = 0;
+
+       memset(pAppData->szVideoTitle, 0, sizeof(char) * STR_LEN_MAX);
+       memset(pAppData->szMediaUri, 0, sizeof(char) * STR_LEN_MAX);
+       memset(pAppData->szPreMediaUri, 0, sizeof(char) * STR_LEN_MAX);
+       memset(pAppData->szNextMediaUri, 0, sizeof(char) * STR_LEN_MAX);
+
+       pAppData->nPrePlayerState = MP_PLAYER_STATE_CLEAR;
+       pAppData->nCurPlayerState = MP_PLAYER_STATE_CLEAR;
+       pAppData->nPlayingSpeed = 0;
+
+       memset(pAppData->szProxyAddress, 0, sizeof(char) * STR_LEN_MAX);
+       memset(pAppData->szUserAgent, 0, sizeof(char) * STR_LEN_MAX);
+       memset(pAppData->szCookie, 0, sizeof(char) * STR_LEN_MAX);
+
+       MpUtilResetForRelaunching();
+
+       return TRUE;
+}
+
+bool MpVideoAppCtrlIsTopView(void* pUserData)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("No exist pUserData.");
+               return FALSE;
+       }
+
+       VideoLogInfo("");
+
+       return MpVideoViewCtrlIsTopView(pUserData);
+}
+
+bool MpVideoAppCtrlIsExistPlayerHandle(void)
+{
+       VideoLogInfo("");
+
+       return MpVideoCtrlMgrIsExistPlayerHandle();
+}
+
+void MpVideoAppCtrlSetForCheckingForegroundwindow(bool bForwgroundState)
+{
+       VideoLogInfo("");
+
+       bWindowForegroundState = bForwgroundState;
+}
+
+void MpVideoAppCtrlSetRotation(int nRotateMode, void *pUserData)
+{
+       VideoLogInfo("");
+
+       MpVideoViewCtrlSetRotation(nRotateMode, pUserData);
+}
+
+
diff --git a/src/mp-video-ctrl-mgr.c b/src/mp-video-ctrl-mgr.c
new file mode 100644 (file)
index 0000000..3a7c6c7
--- /dev/null
@@ -0,0 +1,526 @@
+/*
+ * 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 [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
+ * 
+ *    Licensed under the Flora License, Version 1.0 (the "License");
+ *    you may not use this file except in compliance with the License.
+ *    You may obtain a copy of the License at
+ * 
+ *        http://www.tizenopensource.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.
+ */
+
+
+#include <stdio.h>
+#include <string.h>
+#include <image_util.h>
+
+#include "mp-util.h"
+#include "mp-video-log.h"
+#include "video-player.h"
+#include "mp-video-ctrl-mgr.h"
+#include "mp-video-player-mgr.h"
+#include "mp-video-type-define.h"
+#include "mp-video-service-ctrl.h"
+
+bool MpVideoCtrlMgrMediaCreate(char *szMediaURI, void *pOverlayXid, void *pUserData)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("[ERR] No exist pUserData.");
+               return FALSE;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       VideoLogInfo("");
+       VideoLogInfo("XID : %p", pOverlayXid);
+
+       if(!MpPlayerMgrCreate(szMediaURI))
+       {
+               VideoLogInfo("[ERR] Fail to create player handle.");
+               return FALSE;
+       }
+
+       MpUtilGetUserAgent(pAppData);
+
+       if(!MpPlayerMgrSetUseragentForStreaming(pAppData->szUserAgent))
+       {
+               VideoLogInfo("[ERR] Fail to set useragent.");
+               return FALSE;
+       }
+
+       if(!MpPlayerMgrSetProxyAddressForStreaming(pAppData->szProxyAddress))
+       {
+               VideoLogInfo("[ERR] Fail to set proxy address.");
+               return FALSE;
+       }
+
+       if(!MpPlayerMgrSetCookieForStreaming(pAppData->szCookie))
+       {
+               VideoLogInfo("[ERR] Fail to set Cookie.");
+               return FALSE;
+       }
+
+       if(!MpPlayerMgrSetOverlayXid(pOverlayXid))
+       {
+               VideoLogInfo("[ERR] Fail to set overlay window.");
+               return FALSE;
+       }
+
+       if(!MpVideoCtrlMgrSetScaling(FALSE))
+       {
+               VideoLogInfo("[ERR] Fail to set scaling.");
+               return FALSE;
+       }
+
+       if(!MpPlayerMgrSetSoundPriority())
+       {
+               VideoLogInfo("[ERR] Fail to set sound priority.");
+               return FALSE;
+       }
+
+       pAppData->nCurPlayerState = MP_PLAYER_STATE_CLEAR;
+
+       return TRUE;
+}
+
+void MpVideoCtrlMgrMediaDestroy(void *pUserData)
+{
+       if (!pUserData) {
+               VideoLogInfo("[ERR] No exist pUserData.");
+               return;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       VideoLogInfo("");
+
+       if (!MpPlayerMgrIsActive()) {
+               VideoLogInfo(" Already destroy player handle.");
+               return;
+       }
+
+       if (!MpPlayerMgrUnrealize()) {
+               VideoLogInfo("[ERR] Fail to unrealize player handle.");
+               return;
+       }
+
+       if (!MpPlayerMgrDestroy()) {
+               VideoLogInfo("[ERR] Fail to destroy player handle.");
+               return;
+       }
+
+       pAppData->nCurPlayerState = MP_PLAYER_STATE_CLEAR;
+}
+
+bool MpVideoCtrlMgrMediaPlay(void *pUserData)
+{
+       if (!pUserData) {
+               VideoLogInfo("[ERR] No exist pUserData.");
+               return FALSE;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       VideoLogInfo("");
+
+       if (!MpPlayerMgrPlay()) {
+               VideoLogInfo("[ERR] Fail to play multimedia player.");
+               return FALSE;
+       }
+
+       pAppData->nCurPlayerState = MP_PLAYER_STATE_PLAY;
+
+       return TRUE;
+}
+
+void MpVideoCtrlMgrMediaStop(void *pUserData)
+{
+       if (!pUserData) {
+               VideoLogInfo("[ERR] No exist pUserData.");
+               return;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       VideoLogInfo("");
+
+       if (!MpPlayerMgrIsActive()) {
+               VideoLogInfo("[ERR] Player handle is destroyed.");
+               return;
+       }
+
+       if (!MpPlayerMgrStop()) {
+               VideoLogInfo("[ERR] Fail to stop multimedia player.");
+               return;
+       }
+
+       pAppData->nCurPlayerState = MP_PLAYER_STATE_STOP;
+}
+
+void MpVideoCtrlMgrMediaPause(void *pUserData)
+{
+       if (!pUserData) {
+               VideoLogInfo("[ERR] No exist pUserData.");
+               return;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       VideoLogInfo("");
+
+       if (pAppData->nCurPlayerState == MP_PLAYER_STATE_STOP) {
+               VideoLogInfo
+                   ("It is not possible to pause when player state is stop.");
+               return;
+       }
+
+       if (!MpPlayerMgrPause()) {
+               VideoLogInfo("[ERR] Fail to pause multimedia player.");
+               return;
+       }
+
+       pAppData->nCurPlayerState = MP_PLAYER_STATE_PAUSE;
+}
+
+void MpVideoCtrlMgrMediaResume(void *pUserData)
+{
+       if (!pUserData) {
+               VideoLogInfo("[ERR] No exist pUserData.");
+               return;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       VideoLogInfo("");
+
+       if (pAppData->nCurPlayerState == MP_PLAYER_STATE_STOP) {
+               VideoLogInfo
+                   ("It is not possible to resume when player state is stop.");
+               return;
+       }
+
+       if (!MpPlayerMgrResume()) {
+               VideoLogInfo("[ERR] Fail to resume multimedia player.");
+               return;
+       }
+
+       pAppData->nCurPlayerState = MP_PLAYER_STATE_RESUME;
+}
+
+void MpVideoCtrlMgrSetPlayerCallback(void *PlayerCompletedCb, void *PlayerInterruptedCb, void *PlayerErrorCb, void *PlayerBufferingCb, void *pUserData)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("[ERR] No exist pUserData.");
+               return;
+       }
+
+       if(!PlayerCompletedCb || !PlayerInterruptedCb || !PlayerErrorCb || !PlayerBufferingCb)
+       {
+               VideoLogInfo("[ERR] No exist player callback function pointer.");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       MpPlayerMgrRegistePlayerCallback(PlayerCompletedCb, PlayerInterruptedCb, PlayerErrorCb, PlayerBufferingCb, pUserData);
+}
+
+void MpVideoCtrlMgrSetOverlayXid(void *pXid)
+{
+       VideoLogInfo(" XID:%d", *((int *)pXid));
+
+       if (!MpPlayerMgrSetOverlayXid(pXid)) {
+               VideoLogInfo("[ERR] Fail to set overlay window.");
+               return;
+       }
+}
+
+void MpVideoCtrlMgrSetPosition(int nSetPosition, void *pSeekCb, void *pUserData)
+{
+       VideoLogInfo("");
+
+       VideoLogInfo("Set position - %d", nSetPosition);
+
+       if (nSetPosition > -1) {
+               MpPlayerMgrSetPosition(nSetPosition, pSeekCb, pUserData);
+       }
+}
+
+int MpVideoCtrlMgrGetPosition(void)
+{
+       /* VideoLogInfo(""); */
+
+       return MpPlayerMgrGetPosition();
+}
+
+int MpVideoCtrlMgrGetDuration(void)
+{
+       VideoLogInfo("");
+
+       int nDuration = 0;
+
+       nDuration = MpPlayerMgrGetDuration();
+
+       VideoLogInfo(" content duration : %d ms", nDuration);
+
+       return nDuration;
+}
+
+void MpVideoCtrlMgrResetPlaySpeed(void *pUserData)
+{
+       if (!pUserData) {
+               VideoLogInfo("[ERR] No exist pUserData.");
+               return;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       VideoLogInfo("");
+
+       if (!MpPlayerMgrSetPlaySpeed(1.0)) {
+               VideoLogInfo("[ERR] Fail to reset play speed.");
+               return;
+       }
+
+       pAppData->nPlayingSpeed = MP_PLAYING_SPEED_NORMAL;
+}
+
+void MpVideoCtrlMgrSetPlaySpeedUp(void *pUserData)
+{
+       if (!pUserData) {
+               VideoLogInfo("[ERR] No exist pUserData.");
+               return;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       VideoLogInfo("");
+
+       if (pAppData->nPlayingSpeed > MP_PLAYING_SPEED_MAX) {
+               VideoLogInfo("Current speed is full.(5X)");
+               pAppData->nPlayingSpeed = MP_PLAYING_SPEED_5X;
+       }
+
+
+       float val = 0;
+       val = (float)pAppData->nPlayingSpeed;
+
+       MpPlayerMgrSetPlaySpeed(val);
+
+}
+
+void MpVideoCtrlMgrSetPlaySpeedDown(void *pUserData)
+{
+       if (!pUserData) {
+               VideoLogInfo("[ERR] No exist pUserData.");
+               return;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       VideoLogInfo("");
+
+       if (pAppData->nPlayingSpeed > MP_PLAYING_SPEED_MAX) {
+               VideoLogInfo("Current speed is full.(5X)");
+               return;
+       }
+
+       float val = 0;
+       val = -(float)pAppData->nPlayingSpeed;
+       MpPlayerMgrSetPlaySpeed(val);
+
+}
+
+int MpVideoCtrlMgrGetVideoWidthResolution(void)
+{
+       VideoLogInfo("");
+
+       int nVideoWidthResolution = MpPlayerMgrGetVideoWidthResolution();
+
+       VideoLogInfo("Video width resolution : %d", nVideoWidthResolution);
+
+       return nVideoWidthResolution;
+}
+
+int MpVideoCtrlMgrGetVideoHeightResolution(void)
+{
+       VideoLogInfo("");
+
+       int nVideoHeightResolution = MpPlayerMgrGetVideoHeightResolution();
+
+       VideoLogInfo("Video height resolution : %d", nVideoHeightResolution);
+
+       return nVideoHeightResolution;
+}
+
+void MpVideoCtrlMgrSetRatioVideoScreen(void *pUserData, int nRatioScreenSize)
+{
+       if (!pUserData) {
+               VideoLogInfo("[ERR] No exist pUserData.");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       MpPlayerMgrSetDisplayMode(nRatioScreenSize);
+}
+
+void MpVideoCtrlMgrRotateVideoScreen(int nVideoRotateValue)
+{
+       VideoLogInfo("");
+
+       switch (nVideoRotateValue) {
+       case VIDEO_ROTATE_PORTRAIT_NORMAL:
+               VideoLogInfo("Set Portrait.");
+               MpPlayerMgrSetRotate(VIDEO_SCREEN_PORTRAIT);
+               break;
+
+       case VIDEO_ROTATE_LANDSCAPE_NORMAL:
+               VideoLogInfo("Set Landscape.");
+               MpPlayerMgrSetRotate(VIDEO_SCREEN_LANDSCAPE);
+               break;
+
+       case VIDEO_ROTATE_PORTRAIT_REVERSE:
+               VideoLogInfo("Set Portrait reverse.");
+               MpPlayerMgrSetRotate(VIDEO_SCREEN_PORTRAIT_UPSIDEDOWN);
+               break;
+
+       case VIDEO_ROTATE_LANDSCAPE_REVERSE:
+               VideoLogInfo("Set Landscape reverse.");
+               MpPlayerMgrSetRotate(VIDEO_SCREEN_LANDSCAPE_UPSIDEDOWN);
+               break;
+
+       default:
+               VideoLogInfo("Set Portrait.");
+               MpPlayerMgrSetRotate(VIDEO_SCREEN_PORTRAIT);
+               break;
+       }
+}
+
+void MpVideoCtrlMgrSetMute(bool bMuteEnable)
+{
+       VideoLogInfo("");
+
+       MpPlayerMgrSetMute(bMuteEnable);
+}
+
+bool MpVideoCtrlMgrGetMuteState(void)
+{
+       VideoLogInfo("");
+
+       return MpPlayerMgrGetMute();
+}
+
+int MpVideoCtrlMgrGetBufferingPosition(void)
+{
+       /* VideoLogInfo(""); */
+
+       return MpPlayerMgrGetBufferingPosition();
+}
+
+bool MpVideoCtrlMgrIsExistPlayerHandle(void)
+{
+       VideoLogInfo("");
+
+       return MpPlayerMgrIsActive();
+}
+
+bool MpVideoCtrlMgrIsOnlyAudio(void)
+{
+       VideoLogInfo("");
+
+       int nStreamFileType = MpPlayerMgrGetFileStreamType();
+
+       if(nStreamFileType == MP_FILE_STREAM_TYPE_AUDIO)
+       {
+               VideoLogInfo("A file stream type is only audio.");
+               return TRUE;
+       }
+
+       return FALSE;
+}
+
+bool MpVideoCtrlMgrSetScaling(bool bScale)
+{
+       VideoLogInfo("");
+
+       return MpPlayerMgrSetScaling(bScale);
+
+}
+
+int MpVideoCtrlMgrGetErrorType(int nErrorVal)
+{
+       VideoLogInfo("");
+
+       switch(nErrorVal)
+       {
+       case PLAYER_ERROR_NONE:
+               return MP_PLAYER_ERROR_NONE;
+
+       case PLAYER_ERROR_OUT_OF_MEMORY:
+               return MP_PLAYER_ERROR_OUT_OF_MEMORY;
+
+       case PLAYER_ERROR_INVALID_PARAMETER:
+               return MP_PLAYER_ERROR_INVALID_PARAMETER;
+
+       case PLAYER_ERROR_NO_SUCH_FILE:
+               return MP_PLAYER_ERROR_NO_SUCH_FILE;
+
+       case PLAYER_ERROR_INVALID_OPERATION:
+               return MP_PLAYER_ERROR_INVALID_OPERATION;
+
+       case PLAYER_ERROR_SEEK_FAILED:
+               return MP_PLAYER_ERROR_SEEK_FAILED;
+
+       case PLAYER_ERROR_INVALID_STATE:
+               return MP_PLAYER_ERROR_INVALID_STATE;
+
+       case PLAYER_ERROR_NOT_SUPPORTED_FILE:
+               return MP_PLAYER_ERROR_NOT_SUPPORTED_FILE;
+
+       case PLAYER_ERROR_INVALID_URI:
+               return MP_PLAYER_ERROR_INVALID_URI;
+
+       case PLAYER_ERROR_SOUND_POLICY:
+               return MP_PLAYER_ERROR_SOUND_POLICY;
+
+       case PLAYER_ERROR_CONNECTION_FAILED:
+               return MP_PLAYER_ERROR_CONNECTION_FAILED;
+
+       default:
+               return MP_PLAYER_ERROR_UNKNOWN_ERROR;
+       }
+}
+
+bool MpVideoCtrlMgrMediaRealize(void)
+{
+       VideoLogInfo("");
+
+       if(!MpPlayerMgrRealize())
+       {
+               VideoLogInfo("[ERR] Fail relization.");
+               return FALSE;
+       }
+       return TRUE;
+}
+
+bool MpVideoCtrlMgrMediaRealizeAsync(void *pReailzeCb, void *pUserData)
+{
+       VideoLogInfo("");
+
+       if(!MpPlayerMgrRealizeAsync(pReailzeCb, pUserData))
+       {
+               VideoLogInfo("[ERR] Fail relization.");
+               return FALSE;
+       }
+       return TRUE;
+}
\ No newline at end of file
diff --git a/src/mp-video-display-view.c b/src/mp-video-display-view.c
new file mode 100644 (file)
index 0000000..3a2a894
--- /dev/null
@@ -0,0 +1,1071 @@
+/*
+ * 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 [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
+ * 
+ *    Licensed under the Flora License, Version 1.0 (the "License");
+ *    you may not use this file except in compliance with the License.
+ *    You may obtain a copy of the License at
+ * 
+ *        http://www.tizenopensource.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.
+ */
+
+#include <aul.h>
+#include <ctype.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <sys/stat.h>
+#include <syspopup_caller.h>
+
+#include "mp-util.h"
+#include "mp-drm-ctrl.h"
+#include "mp-video-log.h"
+#include "video-player.h"
+#include "mp-video-display-view.h"
+#include "mp-video-progressbar.h"
+#include "mp-video-type-define.h"
+#include "mp-video-value-define.h"
+#include "mp-util-media-service.h"
+#include "mp-video-string-define.h"
+#include "mp-video-sound-path-ctrl.h"
+#include "mp-external-ug.h"
+#include "mp-video-service-ctrl.h"
+
+#define CTRL_PANEL_SHOW_TIME                                   5.0
+#define MAX_SPEED_STEP                                                 4
+
+static Evas_Object *pNaviFrameHandle = NULL;
+static Evas_Object *pDisplayViewLayout = NULL;
+static Evas_Object *pDisplayViewPanelEdj = NULL;
+static Evas_Object *pDisplayViewCtrlEdj = NULL;
+static Evas_Object *pDisplayViewProgressbarEdj = NULL;
+static Evas_Object *pDisplaySoundpathButton = NULL;
+
+static Ecore_Timer *pCtrlPanelHideTimer = NULL;
+static Ecore_Timer *pSpeedPressTimer = NULL;
+
+static Elm_Object_Item *pNaviFrameItemForDisplayerView = NULL;
+
+static ChangeDisplayViewCbFunc pChangeViewUserCbFunc = NULL;
+
+static bool bIsVideoViewScreenLock = FALSE;
+static bool bSwitchDisplayViewUI = TRUE;
+static bool bIsSpeedLongPress = FALSE;
+static bool bIsDisplayViewOnlyAudio = FALSE;
+static int nSpeedMode = 0;     /*  (-1:REW, 1: FF) */
+static int nControlMouseDownPos = 0;
+static int nControlMouseMovePos = 0;
+
+static int nScreensizeStatus = MP_DISPLAY_METHOD_LETTER_BOX;
+
+static bool bIsPauseByUser = FALSE;
+
+/*
+ * When the video display view is hieded by others view(favorite/info/etc),
+ * passing click event of mouse up in video display view.
+ */
+static VideoDisplayViewState nDisplayViewState = MP_DISPLAY_VIEW_STATE_UNACTIVATE;
+
+
+
+/*
+ * Internal function.
+ */
+static void MpVideoDisplayViewUpdateFFStep(int nStep)
+{
+       VideoLogInfo("");
+
+       if (nStep < 0 || nStep > MAX_SPEED_STEP) {
+               VideoLogInfo("Invalid Step value:%d", nStep);
+               return;
+       }
+
+       char sig_format[SIGNAL_TEXT_MAX_LEN] = { 0, };
+
+       switch(nStep)
+       {
+       case MP_PLAYING_SPEED_2X:       nStep = 1;      break;
+       case MP_PLAYING_SPEED_3X:       nStep = 2;      break;
+       case MP_PLAYING_SPEED_4X:       nStep = 3;      break;
+       case MP_PLAYING_SPEED_5X:       nStep = 4;      break;
+       }
+
+       if(MpUtilGetRotationState() == VIDEO_ROTATE_PORTRAIT_NORMAL || MpUtilGetRotationState() == VIDEO_ROTATE_PORTRAIT_REVERSE)
+       {
+               snprintf(sig_format, SIGNAL_TEXT_MAX_LEN, "%s.%d", SIGNAL_CONTROL_NORMAL_FF_STEP, nStep);
+       }
+       else
+       {
+               snprintf(sig_format, SIGNAL_TEXT_MAX_LEN, "%s.%d", SIGNAL_CONTROL_NORMAL_FF_LANDSCAPE_STEP, nStep);
+       }
+
+       VideoLogInfo("%s", sig_format);
+       edje_object_signal_emit(pDisplayViewCtrlEdj, sig_format, "*");
+}
+
+static void MpVideoDisplayViewUpdateREWStep(int nStep)
+{
+       VideoLogInfo("");
+
+       if (nStep < 0 || nStep > MAX_SPEED_STEP) {
+               VideoLogInfo("Invalid Step value:%d", nStep);
+               return;
+       }
+
+       char sig_format[SIGNAL_TEXT_MAX_LEN] = { 0, };
+
+       switch(nStep)
+       {
+       case MP_PLAYING_SPEED_2X:       nStep = 1;      break;
+       case MP_PLAYING_SPEED_3X:       nStep = 2;      break;
+       case MP_PLAYING_SPEED_4X:       nStep = 3;      break;
+       case MP_PLAYING_SPEED_5X:       nStep = 4;      break;
+       }
+
+       if(MpUtilGetRotationState() == VIDEO_ROTATE_PORTRAIT_NORMAL || MpUtilGetRotationState() == VIDEO_ROTATE_PORTRAIT_REVERSE)
+       {
+               snprintf(sig_format, SIGNAL_TEXT_MAX_LEN, "%s.%d", SIGNAL_CONTROL_NORMAL_REW_STEP, nStep);
+       }
+       else
+       {
+               snprintf(sig_format, SIGNAL_TEXT_MAX_LEN, "%s.%d", SIGNAL_CONTROL_NORMAL_REW_LANDSCAPE_STEP, nStep);
+       }
+
+       VideoLogInfo("%s", sig_format);
+       edje_object_signal_emit(pDisplayViewCtrlEdj, sig_format, "*");
+}
+
+/*
+ * Callback function.
+ */
+
+static void MpVideoDisplayViewWarningPopupCb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+{
+       if (!pUserData) {
+               VideoLogInfo("No exist pUserData");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       MpUtilDeletePopupHandle();
+}
+
+static void MpVideoDisplayViewSoundPathCb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+{
+       if (!pUserData) {
+               VideoLogInfo("[ERR] No exist pUserData");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       if (MpVideoSoundpathIsConnectOtherSoundpath()) {
+               VideoLogInfo("Connect BT or earjack.");
+               MpVideoSoundpathShow(pUserData);
+       } else {
+               MpUtilNotifyPopUp(pAppData, "Soundpath is connected with speaker only.", MpVideoDisplayViewWarningPopupCb);
+       }
+}
+
+static void MpVideoDisplayViewPressPauseButtonCb(void *pUserData, Evas_Object *pObject, const char *szEmission, const char *szSource)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       if (!strcmp(szEmission, SIGNAL_CONTROL_PLAY_PAUSE_PRESS)) {
+               VideoLogInfo("Press Pause button.");
+
+               if (pAppData->nCurPlayerState == MP_PLAYER_STATE_RESUME ||
+                   pAppData->nCurPlayerState == MP_PLAYER_STATE_PLAY) {
+                       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlPause(pAppData);
+                       bIsPauseByUser = TRUE;
+               }
+       }
+}
+
+static void MpVideoDisplayViewPressResumeButtonCb(void *pUserData, Evas_Object *pObject, const char *szEmission, const char *szSource)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       if (!strcmp(szEmission, SIGNAL_CONTROL_PLAY_RESUME_PRESS)) {
+               VideoLogInfo("Press Resume/Play button.");
+
+               if (pAppData->nCurPlayerState == MP_PLAYER_STATE_PAUSE) {
+                       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlResume(pAppData);
+                       bIsPauseByUser = FALSE;
+               }
+       }
+}
+
+static Eina_Bool MpVideoDisplayViewSpeedLongPressCb(void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR]");
+               return EINA_FALSE;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       if (pSpeedPressTimer) {
+               ecore_timer_del(pSpeedPressTimer);
+               pSpeedPressTimer = NULL;
+       }
+
+       bIsSpeedLongPress = TRUE;
+       pAppData->nPlayingSpeed = MP_PLAYING_SPEED_2X;
+
+       char caption[CAPTION_TEXT_MAX_LEN] = { 0, };
+
+       if(nSpeedMode == 1)
+       {
+               pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSpeedFF(pAppData);
+               snprintf(caption, CAPTION_TEXT_MAX_LEN, "X%d fast forward", pAppData->nPlayingSpeed);
+               MpVideoDisplayViewUpdateFFStep(pAppData->nPlayingSpeed);
+       }
+       else if(nSpeedMode == -1)
+       {
+               pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSpeedRew(pAppData);
+               snprintf(caption, CAPTION_TEXT_MAX_LEN, "X%d fast reverse", pAppData->nPlayingSpeed);
+               MpVideoDisplayViewUpdateREWStep(pAppData->nPlayingSpeed);
+       }
+
+       edje_object_part_text_set(_EDJ(pDisplayViewLayout), MAIN_SPEED_TEXT, caption);
+       edje_object_signal_emit(_EDJ(pDisplayViewLayout), SIGNAL_MAIN_SPEEDBOX_SHOW, "*");
+
+       return EINA_FALSE;
+}
+
+
+static void MpVideoDisplayViewFFDownButtonCb(void *pUserData, Evas_Object *pObject, const char *szEmission, const char *szSource)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       if (!strcmp(szEmission, SIGNAL_CONTROL_NORMAL_FF_BUTTON_DOWN)) {
+               VideoLogInfo("Press FF down button.");
+               if (pCtrlPanelHideTimer) {
+                       ecore_timer_del(pCtrlPanelHideTimer);
+                       pCtrlPanelHideTimer = NULL;
+               }
+
+               if (pSpeedPressTimer) {
+                       ecore_timer_del(pSpeedPressTimer);
+                       pSpeedPressTimer = NULL;
+               }
+
+               nSpeedMode = 1;
+               pSpeedPressTimer = ecore_timer_add(LONG_PRESS_INTERVAL, MpVideoDisplayViewSpeedLongPressCb, (void *)pAppData);
+       }
+}
+
+static void MpVideoDisplayViewFFUpButtonCb(void *pUserData, Evas_Object *pObject, const char *szEmission, const char *szSource)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       if (!strcmp(szEmission, SIGNAL_CONTROL_NORMAL_FF_BUTTON_UP)) {
+               VideoLogInfo("Press FF up button.");
+               pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlShowLayout(pAppData);
+
+               if (pSpeedPressTimer) {
+                       ecore_timer_del(pSpeedPressTimer);
+                       pSpeedPressTimer = NULL;
+                       bIsPauseByUser = FALSE;
+                       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlPlayNextMedia(pAppData);
+               } else {
+                       MpVideoDisplayViewUpdateFFStep(0);
+
+                       edje_object_part_text_set(_EDJ(pDisplayViewLayout), MAIN_SPEED_TEXT, "");
+                       edje_object_signal_emit(_EDJ(pDisplayViewLayout), SIGNAL_MAIN_SPEEDBOX_HIDE, "*");
+
+                       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSpeedReset(pAppData);
+               }
+               bIsSpeedLongPress = FALSE;
+       }
+}
+
+static void MpVideoDisplayViewRewDownButtonCb(void *pUserData, Evas_Object *pObject, const char *szEmission, const char *szSource)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       if (!strcmp(szEmission, SIGNAL_CONTROL_NORMAL_REW_BUTTON_DOWN)) {
+               VideoLogInfo("Press Rewind donw button.");
+
+               if (pCtrlPanelHideTimer) {
+                       ecore_timer_del(pCtrlPanelHideTimer);
+                       pCtrlPanelHideTimer = NULL;
+               }
+
+               if (pSpeedPressTimer) {
+                       ecore_timer_del(pSpeedPressTimer);
+                       pSpeedPressTimer = NULL;
+               }
+
+               nSpeedMode = -1;
+               pSpeedPressTimer = ecore_timer_add(LONG_PRESS_INTERVAL, MpVideoDisplayViewSpeedLongPressCb, (void *)pAppData);
+       }
+}
+
+static void MpVideoDisplayViewRewUpButtonCb(void *pUserData, Evas_Object *pObject, const char *szEmission, const char *szSource)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       if (!strcmp(szEmission, SIGNAL_CONTROL_NORMAL_REW_BUTTON_UP)) {
+               VideoLogInfo("Press Rewind up button.");
+               pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlShowLayout(pAppData);
+
+               if (pSpeedPressTimer) {
+                       ecore_timer_del(pSpeedPressTimer);
+                       pSpeedPressTimer = NULL;
+                       bIsPauseByUser = FALSE;
+                       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlPlayPreMedia(pAppData);
+               } else {
+                       MpVideoDisplayViewUpdateREWStep(0);
+
+                       edje_object_part_text_set(_EDJ(pDisplayViewLayout), MAIN_SPEED_TEXT, "");
+                       edje_object_signal_emit(_EDJ(pDisplayViewLayout), SIGNAL_MAIN_SPEEDBOX_HIDE, "*");
+
+                       pAppData->VideoAppCtrlCallbackFunc. VideoAppCtrlSpeedReset(pAppData);
+               }
+               bIsSpeedLongPress = FALSE;
+       }
+}
+
+
+static void MpVideoDisplayViewBackButtonDownCb(void *pUserData, Evas_Object *pObject, const char *szEmission, const char *szSource)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       edje_object_signal_callback_del(pDisplayViewCtrlEdj, SIGNAL_CONTROL_BACK_BUTTON_DOWN, SIGNAL_CONTROL_PART_BACK_BUTTON, (void *)MpVideoDisplayViewBackButtonDownCb);
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       if(pAppData->nCurPosition >= 0)
+       {
+               MpUtilMediaSvcSetVideoLastPlayedTimeByUri(pAppData->szMediaUri, pAppData->nCurPosition);
+       }
+
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlStopByAppPause(pAppData);
+
+       MpVideoDisplayViewPop(pNaviFrameHandle, pUserData);
+
+       edje_object_signal_callback_add(pDisplayViewCtrlEdj, SIGNAL_CONTROL_BACK_BUTTON_DOWN, SIGNAL_CONTROL_PART_BACK_BUTTON, (void *)MpVideoDisplayViewBackButtonDownCb, (void *)pAppData);
+}
+
+
+static void MpVideoDisplayViewVolumeButtonDownCb(void *pUserData, Evas_Object *pObject, const char *szEmission, const char *szSource)
+{
+       VideoLogInfo("");
+}
+
+static void MpVideoDisplayViewVolumeButtonUpCb(void *pUserData, Evas_Object *pObject, const char *szEmission, const char *szSource)
+{
+       VideoLogInfo("");
+
+       syspopup_launch("volume", NULL);
+}
+
+static Eina_Bool MpVideoDisplayViewCtrlPanelHideCb(void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR] No Exist pUserData.");
+               return EINA_FALSE;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       if (pCtrlPanelHideTimer) {
+               ecore_timer_del(pCtrlPanelHideTimer);
+               pCtrlPanelHideTimer = NULL;
+       }
+
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlHideLayout(pAppData);
+
+       return EINA_FALSE;
+}
+
+
+static void MpVideoDisplayViewSpeedChange(void *pUserData)
+{
+       if (!pUserData) {
+               VideoLogInfo("[ERR] No Exist pUserData.");
+               return;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       int booster_step = 0;
+
+       if (nSpeedMode == 1) {
+               booster_step = nControlMouseMovePos - nControlMouseDownPos;
+               booster_step = booster_step / BOOSTER_STEP_DISTANCE;
+       } else if (nSpeedMode == -1) {
+               booster_step = nControlMouseDownPos - nControlMouseMovePos;
+               booster_step = booster_step / BOOSTER_STEP_DISTANCE;
+       } else {
+               VideoLogInfo("[ERR] Invalid SpeedMode.");
+               return;
+       }
+
+       if(booster_step == 0)
+       {
+               pAppData->nPlayingSpeed = MP_PLAYING_SPEED_2X;
+       }
+       else if(booster_step == 1)
+       {
+               pAppData->nPlayingSpeed = MP_PLAYING_SPEED_3X;
+       }
+       else if(booster_step == 2)
+       {
+               pAppData->nPlayingSpeed = MP_PLAYING_SPEED_4X;
+       }
+       else if(booster_step > 3)
+       {
+               pAppData->nPlayingSpeed = MP_PLAYING_SPEED_4X;
+       }
+
+       VideoLogInfo("STEP:(%d, %d)", booster_step, pAppData->nPlayingSpeed);
+
+       char caption[CAPTION_TEXT_MAX_LEN] = { 0, };
+
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlGetPosition(pAppData);
+
+       if(nSpeedMode == 1)
+       {
+               snprintf(caption, CAPTION_TEXT_MAX_LEN, "X%d fast forward", pAppData->nPlayingSpeed);
+               pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSpeedFF(pAppData);
+               MpVideoDisplayViewUpdateFFStep(pAppData->nPlayingSpeed);
+       }
+       else
+       {
+               snprintf(caption, CAPTION_TEXT_MAX_LEN, "X%d fast reverse", pAppData->nPlayingSpeed);
+               pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSpeedRew(pAppData);
+               MpVideoDisplayViewUpdateREWStep(pAppData->nPlayingSpeed);
+       }
+
+       edje_object_part_text_set(_EDJ(pDisplayViewLayout), MAIN_SPEED_TEXT, caption);
+
+       return;
+}
+
+static void MpVideoDisplayViewControlMouseMoveCb(void *pUserData, Evas * e, Evas_Object *obj, void *event)
+{
+       if (!event) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR] No Exist pUserData.");
+               return;
+       }
+
+       Evas_Event_Mouse_Move *pBtnEvent = (Evas_Event_Mouse_Move *) event;
+
+       if (bIsSpeedLongPress) {
+               nControlMouseMovePos = pBtnEvent->cur.output.x;
+               MpVideoDisplayViewSpeedChange(pUserData);
+       }
+}
+
+static void MpVideoDisplayViewControlMouseDownCb(void *pUserData, Evas * e, Evas_Object *obj, void *event)
+{
+       VideoLogInfo("");
+
+       if (!event) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       Evas_Event_Mouse_Down *pBtnEvent = (Evas_Event_Mouse_Down *) event;
+
+       nControlMouseDownPos = pBtnEvent->output.x;
+}
+
+static void MpVideoDisplayViewChangedEarjackCb(void *pNode, void *pUserData)
+{
+       if (!pUserData) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       MpVideoSoundpathHide();
+       MpUtilDeletePopupHandle();
+
+       if (MpUtilIsConnectEarjack()) {
+               VideoLogInfo("Connect earjack.");
+               if (pDisplaySoundpathButton) {
+                       elm_object_item_part_content_set(pNaviFrameItemForDisplayerView, "title_right_btn", pDisplaySoundpathButton);
+               } else {
+                       pDisplaySoundpathButton = MpUtilCreateButtonIcon(pNaviFrameHandle, VIDEO_HEAD_ICON_SOUNDPATH, FALSE, FALSE, 1, 1, pUserData, "video/naviframe/title/default", (void*)MpVideoDisplayViewSoundPathCb);
+                       elm_object_item_part_content_set(pNaviFrameItemForDisplayerView, "title_right_btn", pDisplaySoundpathButton);
+               }
+       } else {
+               VideoLogInfo("Disconnect earjack.");
+
+               if (pDisplaySoundpathButton) {
+                       evas_object_del(pDisplaySoundpathButton);
+                       pDisplaySoundpathButton = NULL;
+               }
+
+               elm_object_item_part_content_unset(pNaviFrameItemForDisplayerView, "title_right_btn");
+       }
+}
+
+void MpVideoDisplayViewInitLayout(void *pUserData, int nPlayerType)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       pDisplayViewLayout = elm_layout_add(pNaviFrameHandle);
+       if (pDisplayViewLayout) {
+               Evas *pMainWindowEvas = evas_object_evas_get(pAppData->pMainWindow);
+
+               elm_layout_file_set(pDisplayViewLayout, VIDEO_PLAYER_MAIN_EDJ, MAIN_EDJ_GROUP);
+
+               pDisplayViewCtrlEdj = MpUtilLoadEdjFile(pMainWindowEvas, VIDEO_PLAYER_CONTROL_EDJ, CONTROL_EDJ_GROUP);
+
+               evas_object_event_callback_add(pDisplayViewCtrlEdj, EVAS_CALLBACK_MOUSE_DOWN, (void *)MpVideoDisplayViewControlMouseDownCb, pAppData);
+               evas_object_event_callback_add(pDisplayViewCtrlEdj, EVAS_CALLBACK_MOUSE_MOVE, (void *)MpVideoDisplayViewControlMouseMoveCb, pAppData);
+
+               pDisplayViewPanelEdj = MpUtilLoadEdjFile(pMainWindowEvas, VIDEO_PLAYER_PANEL_EDJ, PANEL_EDJ_GROUP);
+
+               edje_object_part_swallow(pDisplayViewPanelEdj, SWALLOW_PANEL_CONTROL, pDisplayViewCtrlEdj);
+
+               pDisplayViewProgressbarEdj = (Evas_Object *)MpVideoProgressbarInit(pAppData);
+               if (pDisplayViewProgressbarEdj) {
+                       edje_object_part_swallow(pDisplayViewPanelEdj, SWALLOW_PANEL_PROGRESS_BAR, pDisplayViewProgressbarEdj);
+               } else {
+                       VideoLogInfo("Progressbar edj handle is null.");
+               }
+
+               elm_object_part_content_set(pDisplayViewLayout, SWALLOW_MAIN_CONTROL, pDisplayViewPanelEdj);
+
+               edje_object_signal_emit(pDisplayViewCtrlEdj, SIGNAL_CONTROL_MODE_NORMAL, "*");
+
+
+               edje_object_signal_callback_add(pDisplayViewCtrlEdj,
+                                               SIGNAL_CONTROL_PLAY_PAUSE_PRESS,
+                                               SIGNAL_CONTROL_PART_PLAY_BUTTON,
+                                               (void *)MpVideoDisplayViewPressPauseButtonCb, (void *)pAppData);
+
+               edje_object_signal_callback_add(pDisplayViewCtrlEdj,
+                                               SIGNAL_CONTROL_PLAY_RESUME_PRESS,
+                                               SIGNAL_CONTROL_PART_PLAY_BUTTON,
+                                               (void *)MpVideoDisplayViewPressResumeButtonCb, (void *)pAppData);
+
+               edje_object_signal_callback_add(pDisplayViewCtrlEdj,
+                                               SIGNAL_CONTROL_NORMAL_FF_BUTTON_DOWN,
+                                               SIGNAL_CONTROL_PART_FF_BUTTON,
+                                               (void *)MpVideoDisplayViewFFDownButtonCb, (void *)pAppData);
+
+               edje_object_signal_callback_add(pDisplayViewCtrlEdj,
+                                               SIGNAL_CONTROL_NORMAL_FF_BUTTON_UP,
+                                               SIGNAL_CONTROL_PART_FF_BUTTON,
+                                               (void *)MpVideoDisplayViewFFUpButtonCb, (void *)pAppData);
+
+               edje_object_signal_callback_add(pDisplayViewCtrlEdj,
+                                               SIGNAL_CONTROL_NORMAL_REW_BUTTON_DOWN,
+                                               SIGNAL_CONTROL_PART_REW_BUTTON,
+                                               (void *)MpVideoDisplayViewRewDownButtonCb, (void *)pAppData);
+
+               edje_object_signal_callback_add(pDisplayViewCtrlEdj,
+                                               SIGNAL_CONTROL_NORMAL_REW_BUTTON_UP,
+                                               SIGNAL_CONTROL_PART_REW_BUTTON,
+                                               (void *)MpVideoDisplayViewRewUpButtonCb, (void *)pAppData);
+
+               edje_object_signal_callback_add(pDisplayViewCtrlEdj,
+                                               SIGNAL_CONTROL_BACK_BUTTON_DOWN,
+                                               SIGNAL_CONTROL_PART_BACK_BUTTON,
+                                               (void *)MpVideoDisplayViewBackButtonDownCb, (void *)pAppData);
+
+               edje_object_signal_callback_add(pDisplayViewCtrlEdj,
+                                               SIGNAL_CONTROL_VOL_BUTTON_DOWN,
+                                               SIGNAL_CONTROL_PART_VOL_BUTTON,
+                                               (void *)MpVideoDisplayViewVolumeButtonDownCb, (void *)pAppData);
+
+               edje_object_signal_callback_add(pDisplayViewCtrlEdj,
+                                               SIGNAL_CONTROL_VOL_BUTTON_UP,
+                                               SIGNAL_CONTROL_PART_VOL_BUTTON,
+                                               (void *)MpVideoDisplayViewVolumeButtonUpCb, (void *)pAppData);
+
+               MpUtilRegisteEarjackCbFunc((void *)MpVideoDisplayViewChangedEarjackCb, pUserData);
+       }
+}
+
+void MpVideoDisplayViewInit(void *pUserData, int nPlayerType)
+{
+       VideoLogInfo("");
+
+       if (!pNaviFrameHandle|| !pUserData) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       MpVideoDisplayViewInitLayout(pUserData, nPlayerType);
+}
+
+
+/*
+ * External function
+ */
+void MpVideoDisplayViewPush(void *pNaviFrame, int nPlayerType, void *pUserData, ChangeDisplayViewCbFunc pChangeViewCb)
+{
+       if (!pNaviFrame || !pUserData) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       pNaviFrameHandle = pNaviFrame;
+       pChangeViewUserCbFunc = pChangeViewCb;
+
+       MpVideoDisplayViewInit(pUserData, nPlayerType);
+       pNaviFrameItemForDisplayerView = elm_naviframe_item_push(pNaviFrameHandle, NULL, NULL, NULL, pDisplayViewLayout, "video/1line");
+
+       if(MpVideoSoundpathIsConnectOtherSoundpath())
+       {
+               pDisplaySoundpathButton = MpUtilCreateButtonIcon(pNaviFrameHandle, VIDEO_HEAD_ICON_SOUNDPATH, FALSE, FALSE, 1, 1, pUserData, "video/naviframe/title/default", (void*)MpVideoDisplayViewSoundPathCb);
+               elm_object_item_part_content_set(pNaviFrameItemForDisplayerView, "title_right_btn", pDisplaySoundpathButton);
+       }
+
+       MpVideoDisplayViewShowControlPanel(pUserData);
+}
+
+void MpVideoDisplayViewPop(void *pNaviFrame, void *pUserData)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+       if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL||
+               nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+       {
+               pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlExit(pAppData);
+       }
+}
+
+void MpVideoDisplayViewDestroy(void *pUserData)
+{
+       VideoLogInfo("");
+
+       MpVideoDisplayViewHideControlPanel(pUserData);
+       MpVideoProgressbarDestroy();
+
+       pNaviFrameHandle = NULL;
+       pDisplayViewProgressbarEdj = NULL;
+
+       if (pDisplayViewPanelEdj) {
+               evas_object_del(pDisplayViewPanelEdj);
+               pDisplayViewPanelEdj = NULL;
+       }
+
+       if (pDisplayViewCtrlEdj) {
+               evas_object_del(pDisplayViewCtrlEdj);
+               pDisplayViewCtrlEdj = NULL;
+       }
+
+       if (pSpeedPressTimer) {
+               ecore_timer_del(pSpeedPressTimer);
+               pSpeedPressTimer = NULL;
+       }
+
+       if (pCtrlPanelHideTimer) {
+               ecore_timer_del(pCtrlPanelHideTimer);
+               pCtrlPanelHideTimer = NULL;
+       }
+
+       if (pDisplayViewLayout) {
+               evas_object_del(pDisplayViewLayout);
+               pDisplayViewLayout = NULL;
+       }
+
+       if (pDisplaySoundpathButton) {
+               evas_object_del(pDisplaySoundpathButton);
+               pDisplaySoundpathButton = NULL;
+       }
+
+       bIsVideoViewScreenLock = FALSE;
+
+       bSwitchDisplayViewUI = TRUE;
+       nDisplayViewState = MP_DISPLAY_VIEW_STATE_UNACTIVATE;
+       nScreensizeStatus = MP_DISPLAY_METHOD_LETTER_BOX;
+       bIsDisplayViewOnlyAudio = FALSE;
+       bIsPauseByUser = FALSE;
+}
+
+void MpVideoDisplayViewInitAfterBeginOfStream(void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       MpVideoProgressbarBeginOfStream((void *)pAppData);
+
+       if (pAppData->nDuration > 1) {
+               char szDurationTime[PLAY_TIME_LENGTH] = { 0 };
+
+               snprintf(szDurationTime, PLAY_TIME_LENGTH, "%" PLAY_TIME_FORMAT, PLAY_TIME_ARGS(pAppData->nDuration / 1000));
+
+               MpVideoProgressbarUpdateDurationTime(szDurationTime);
+       }
+
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlShowLayout(pAppData);
+
+       if(MpVideoDisplayViewIsPauseByUser() == FALSE)
+       {
+               edje_object_signal_emit(pDisplayViewCtrlEdj, SIGNAL_CONTROL_PLAY_RESUME, "*");
+       }
+}
+
+void MpVideoDisplayViewUpdatePauseKey(void)
+{
+       VideoLogInfo("");
+
+       edje_object_signal_emit(pDisplayViewCtrlEdj, SIGNAL_CONTROL_PLAY_PAUSE, "*");
+}
+
+void MpVideoDisplayViewUpdateResumeKey(void)
+{
+       VideoLogInfo("");
+
+       edje_object_signal_emit(pDisplayViewCtrlEdj, SIGNAL_CONTROL_PLAY_RESUME, "*");
+}
+
+void MpVideoDisplayViewShowControlPanel(void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       if (!pDisplayViewPanelEdj) {
+               VideoLogInfo("No exist play control panel edc.");
+               return;
+       }
+
+       if (nDisplayViewState == MP_DISPLAY_VIEW_STATE_UNACTIVATE) {
+               VideoLogInfo("MP_DISPLAY_VIEW_STATE_UNACTIVATE");
+               return;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+       MpVideoProgressbarCreateTimer((void *)pAppData);
+
+       bSwitchDisplayViewUI = TRUE;
+       evas_object_show(pDisplayViewLayout);
+
+       if (pCtrlPanelHideTimer) {
+               ecore_timer_del(pCtrlPanelHideTimer);
+               pCtrlPanelHideTimer = NULL;
+       }
+
+       VideoLogInfo("");
+
+       if (pAppData->nCurPlayerState == MP_PLAYER_STATE_PAUSE || bIsDisplayViewOnlyAudio == TRUE) {
+               VideoLogInfo("");
+       } else {
+               VideoLogInfo("");
+               pCtrlPanelHideTimer = ecore_timer_add(CTRL_PANEL_SHOW_TIME, MpVideoDisplayViewCtrlPanelHideCb, pUserData);
+       }
+
+       MpVideoDisplayViewActivate();
+       MpVideoDisplayViewUnlockScreen(pUserData);
+}
+
+void MpVideoDisplayViewHideControlPanel(void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       if (nDisplayViewState == MP_DISPLAY_VIEW_STATE_UNACTIVATE) {
+               VideoLogInfo("MP_DISPLAY_VIEW_STATE_UNACTIVATE");
+               return;
+       }
+
+       if (!pDisplayViewPanelEdj) {
+               VideoLogInfo("No exist play control panel edc.");
+               return;
+       }
+
+       if(bIsDisplayViewOnlyAudio)
+       {
+               VideoLogInfo("Not hide control panel and UI because of audio only.");
+               return;
+       }
+
+       bSwitchDisplayViewUI = FALSE;
+
+       evas_object_hide(pDisplayViewLayout);
+
+       MpVideoProgressbarDeleteTimer();
+       MpExternalUgHide();
+       if (pCtrlPanelHideTimer) {
+               ecore_timer_del(pCtrlPanelHideTimer);
+               pCtrlPanelHideTimer = NULL;
+       }
+}
+
+void MpVideoDisplayViewActivate(void)
+{
+       VideoLogInfo("");
+
+       nDisplayViewState = MP_DISPLAY_VIEW_STATE_ACTIVATE;
+}
+
+void MpVideoDisplayViewUnactivate(void)
+{
+       VideoLogInfo("");
+
+       nDisplayViewState = MP_DISPLAY_VIEW_STATE_UNACTIVATE;
+}
+
+
+void MpVideoDisplayViewHideSoundpath(void)
+{
+       VideoLogInfo("");
+
+       MpVideoSoundpathHide();
+}
+
+void MpVideoDisplayViewChangeNaviFrameTitle(void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       Elm_Object_Item *pNaviFrameItemForDisplayerView = elm_naviframe_top_item_get(pNaviFrameHandle);
+
+       if (pNaviFrameItemForDisplayerView != NULL) {
+               VideoLogInfo("%s", pAppData->szVideoTitle);
+               elm_object_item_text_set(pNaviFrameItemForDisplayerView, pAppData->szVideoTitle);
+       }
+}
+
+bool MpVideoDisplayViewIsTopView(void)
+{
+       VideoLogInfo("");
+
+       Evas_Object *pTmpContents = NULL;
+       Elm_Object_Item *pTmpItem = NULL;
+
+       if (!pNaviFrameHandle) {
+               VideoLogInfo("[ERR] No exist navigationbar handle.");
+               return FALSE;
+       }
+
+       pTmpItem = elm_naviframe_top_item_get(pNaviFrameHandle);
+       pTmpContents = elm_object_item_content_get(pTmpItem);
+       if (pTmpContents) {
+               if (pTmpContents == pDisplayViewLayout) {
+                       VideoLogInfo("Video display view is staing in top view.");
+                       return TRUE;
+               } else {
+                       VideoLogInfo("Video display view is not staied in top view.");
+                       return FALSE;
+               }
+       } else {
+               VideoLogInfo("[ERR] No exist navigationbar top item.");
+               return FALSE;
+       }
+
+       return FALSE;
+}
+
+void MpVideoDisplayViewShowNocontentImage(void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (pDisplayViewLayout) {
+               edje_object_signal_emit(_EDJ(pDisplayViewLayout), SIGNAL_MAIN_NOCONTENTS_SHOW, "*");
+       }
+
+       bIsDisplayViewOnlyAudio = TRUE;
+
+       MpVideoDisplayViewShowControlPanel(pUserData);
+}
+
+void MpVideoDisplayViewHideNocontentImage(void)
+{
+       VideoLogInfo("");
+
+       if (pDisplayViewLayout) {
+               edje_object_signal_emit(_EDJ(pDisplayViewLayout), SIGNAL_MAIN_NOCONTENTS_HIDE, "*");
+       }
+
+       bIsDisplayViewOnlyAudio = FALSE;
+}
+
+void MpVideoDisplayViewPortrate(void)
+{
+       VideoLogInfo("");
+
+       elm_object_item_signal_emit(pNaviFrameItemForDisplayerView, SIGNAL_NAVIFRAME_PORTRATE_MODE, "*");
+       edje_object_signal_emit(_EDJ(pDisplayViewLayout), SIGNAL_MAIN_PORTRATE_MODE, "*");
+       edje_object_signal_emit(pDisplayViewPanelEdj, SIGNAL_PANEL_PORTRATE_MODE, "*");
+       edje_object_signal_emit(pDisplayViewProgressbarEdj, SIGNAL_PROGRESS_PORTRATE_MODE, "*");
+       edje_object_signal_emit(pDisplayViewCtrlEdj, SIGNAL_CONTROL_PORTRATE_MODE, "*");
+}
+
+void MpVideoDisplayViewLandscape(void)
+{
+       VideoLogInfo("");
+
+       elm_object_item_signal_emit(pNaviFrameItemForDisplayerView, SIGNAL_NAVIFRAME_LANDSCAPE_MODE, "*");
+       edje_object_signal_emit(_EDJ(pDisplayViewLayout), SIGNAL_MAIN_LANDSCAPE_MODE, "*");
+       edje_object_signal_emit(pDisplayViewPanelEdj, SIGNAL_PANEL_LANDSCAPE_MODE, "*");
+       edje_object_signal_emit(pDisplayViewProgressbarEdj, SIGNAL_PROGRESS_LANDSCAPE_MODE, "*");
+       edje_object_signal_emit(pDisplayViewCtrlEdj, SIGNAL_CONTROL_LANDSCAPE_MODE, "*");
+}
+
+void MpVideoDisplayViewResetProgressBar(void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (pDisplayViewLayout) {
+               MpVideoProgressbarReset(pUserData);
+       }
+}
+
+void MpVideoDisplayViewLockScreen(void *pUserData)
+{
+       VideoLogInfo("");
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlHideLayout(pAppData);
+
+       bIsVideoViewScreenLock = TRUE;
+}
+
+void MpVideoDisplayViewUnlockScreen(void *pUserData)
+{
+       VideoLogInfo("");
+
+       bIsVideoViewScreenLock = FALSE;
+}
+
+bool MpVideoDisplayViewGetScreenLockState(void)
+{
+       VideoLogInfo("");
+
+       return bIsVideoViewScreenLock;
+}
+
+int MpVideoDisplayViewGetScreenSize(void)
+{
+       VideoLogInfo("");
+
+       return nScreensizeStatus;
+}
+
+bool MpVideoDisplayViewIsPauseByUser(void)
+{
+       VideoLogInfo("%d", bIsPauseByUser);
+
+       return bIsPauseByUser;
+}
+
+void MpVideoDisplayViewUpdateProgressBar(void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       MpVideoProgressbarCreateTimer(pUserData);
+}
diff --git a/src/mp-video-info-ctrl.c b/src/mp-video-info-ctrl.c
new file mode 100755 (executable)
index 0000000..30afe88
--- /dev/null
@@ -0,0 +1,437 @@
+/*
+ * 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 [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
+ * 
+ *    Licensed under the Flora License, Version 1.0 (the "License");
+ *    you may not use this file except in compliance with the License.
+ *    You may obtain a copy of the License at
+ * 
+ *        http://www.tizenopensource.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.
+ */
+#include <aul.h>
+#include <vconf.h>
+#include <libexif/exif-data.h>
+#include <metadata_extractor.h>
+
+#include <unicode/udat.h>
+#include <unicode/ustring.h>
+#include <unicode/uloc.h>
+#include <unicode/ucal.h>
+#include <unicode/udatpg.h>
+#include <unicode/utmscale.h>
+
+#include "mp-util.h"
+#include "mp-drm-ctrl.h"
+#include "mp-video-log.h"
+#include "video-player.h"
+#include "mp-video-info-ctrl.h"
+
+enum VIDEO_PLAYER_FILE_SIZE_TYPE
+{
+       SIZE_BYTE = 0,
+       SIZE_KB,
+       SIZE_MB,
+       SIZE_GB
+};
+
+bool MpVideoInfoCtrlGetGPS(char *szUriPath, double *nLongtitude, double *nLatitude)
+{
+       if (!szUriPath) {
+               VideoLogInfo("[ERR] No exist szUriPath.");
+               return FALSE;
+       }
+
+       VideoLogInfo("");
+
+       if (MpVideoDrmIsDrmFile(szUriPath)) {
+               VideoLogInfo("It's drm file.");
+               return FALSE;
+       }
+
+       metadata_extractor_h pMetadata;
+
+       char *szTmp = NULL;
+
+       *nLatitude = 0.0;
+       *nLongtitude = 0.0;
+
+       if(metadata_extractor_create(&pMetadata) != METADATA_EXTRACTOR_ERROR_NONE)
+       {
+               VideoLogInfo("[ERR] - metadata_extractor_create()");
+               return FALSE;
+       }
+
+       if(metadata_extractor_set_path(pMetadata, szUriPath) != METADATA_EXTRACTOR_ERROR_NONE) 
+       {
+               VideoLogInfo("[ERR] - metadata_extractor_set_path()");
+               return FALSE;
+       }
+
+       if(metadata_extractor_get_metadata(pMetadata, METADATA_LATITUDE, &szTmp) != METADATA_EXTRACTOR_ERROR_NONE)
+       {
+               VideoLogInfo("[ERR] - metadata_extractor_get_metadata() - METADATA_LATITUDE");
+               metadata_extractor_destroy(pMetadata);
+               return FALSE;
+       }
+       else
+       {
+               if(szTmp)
+               {
+                       VideoLogInfo("METADATA_LATITUDE : %s", szTmp);
+                       *nLatitude = atof(szTmp);
+               }
+               else
+               {
+                       *nLatitude = 0.0;
+               }
+
+               free(szTmp);
+               szTmp = NULL;
+       }
+
+       if(metadata_extractor_get_metadata(pMetadata, METADATA_LONGITUDE, &szTmp) != METADATA_EXTRACTOR_ERROR_NONE)
+       {
+               VideoLogInfo("[ERR] - metadata_extractor_get_metadata() - METADATA_LONGITUDE");
+               metadata_extractor_destroy(pMetadata);
+               return FALSE;
+       }
+       else
+       {
+               if(szTmp)
+               {
+                       VideoLogInfo("METADATA_LONGITUDE : %s", szTmp);
+                       *nLongtitude = atof(szTmp);
+               }
+               else
+               {
+                       *nLongtitude = 0.0;
+                       VideoLogInfo("METADATA_LONGITUDE : %s", szTmp);
+               }
+
+               free(szTmp);
+               szTmp = NULL;
+       }
+
+       metadata_extractor_destroy(pMetadata);
+
+       return TRUE;    
+}
+
+bool MpVideoInfoCtrlGetResolution(char *szWidthResolution, char *szHeightResolution, void *pUserData)
+{
+       if (!pUserData) {
+               VideoLogInfo("[ERR] No exist pUserData.");
+               return FALSE;
+       }
+
+       VideoLogInfo("");
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlGetVideoResolution(pAppData);
+
+       if (pAppData->nVideoWidthResolution > 0 && pAppData->nVideoHeightResolution > 0) {
+               snprintf(szWidthResolution, STR_LEN_MAX, "%d", pAppData->nVideoWidthResolution);
+               snprintf(szHeightResolution, STR_LEN_MAX, "%d", pAppData->nVideoHeightResolution);
+       } else {
+               return FALSE;
+       }
+
+       return TRUE;
+}
+
+static char *MpVideoInfoCtrlConvertingString(const char *szLocale, const char *szCustomSkeleton, const char *szTimezone, UDate st_Date)
+{
+#define UG_ICU_ARR_LENGTH                      256
+
+       // Copy a byte string encoded in the default codepage to a ustring.
+       // Copies at most n characters. The result will be null terminated if the length of src is less than n.
+       // Performs a host byte to UChar conversion.
+
+       UChar ucustomSkeleton[UG_ICU_ARR_LENGTH] = {0,};
+
+       if (u_uastrncpy(ucustomSkeleton, szCustomSkeleton, UG_ICU_ARR_LENGTH) == NULL) {
+               VideoLogInfo("u_uastrncpy() error.");
+               return NULL;
+       }
+
+       UChar utimezone[UG_ICU_ARR_LENGTH] = {0,};
+
+       if (u_uastrncpy(utimezone, szTimezone, UG_ICU_ARR_LENGTH) == NULL) {
+               VideoLogInfo("u_uastrncpy() error.");
+               return NULL;
+       }
+
+       UErrorCode status = U_ZERO_ERROR;
+       UDateTimePatternGenerator *generator;
+       UDateFormat     *formatter;
+
+       UChar bestPattern[UG_ICU_ARR_LENGTH] = {0,};
+       UChar formatted[UG_ICU_ARR_LENGTH] = {0,};
+       char formattedString[UG_ICU_ARR_LENGTH] = {0,};
+       int32_t bestPatternLength, formattedLength;
+
+       ucal_setDefaultTimeZone(utimezone , &status);
+
+       if (U_FAILURE(status)) {
+               VideoLogInfo("ucal_setDefaultTimeZone() is failed.");
+               return NULL;
+       }
+
+       uloc_setDefault(getenv("LC_TIME"), &status);
+
+       if (U_FAILURE(status)) {
+               VideoLogInfo("ucal_setDefaultTimeZone() is failed.");
+               return NULL;
+       }
+
+       generator = udatpg_open(szLocale, &status);
+       if (generator == NULL) {
+               return NULL;
+       }
+
+       bestPatternLength = udatpg_getBestPattern(generator, ucustomSkeleton, u_strlen(ucustomSkeleton), bestPattern, UG_ICU_ARR_LENGTH, &status);
+       if (bestPatternLength <= 0) {
+               return NULL;
+       }
+
+       formatter = udat_open(UDAT_IGNORE, UDAT_IGNORE, szLocale, NULL, -1, bestPattern, -1, &status);
+       if (formatter == 0) {
+               return NULL;
+       }
+
+       formattedLength = udat_format(formatter, st_Date, formatted, UG_ICU_ARR_LENGTH, NULL, &status);
+       if (formattedLength <= 0) {
+               return NULL;
+       }
+
+       u_austrcpy(formattedString, formatted);
+       udatpg_close(generator);
+       udat_close(formatter);
+
+       if (strlen(formattedString) == 0) {
+               return NULL;
+       }
+
+       return strdup(formattedString);
+}
+
+static char* MpVideoInfoCtrlGetDateOfFile(time_t mtime)
+{
+#define UG_DATE_FORMAT_12                      "yMMMdhms"
+#define UG_DATE_FORMAT_24                      "yMMMdHms"
+
+       VideoLogInfo("");
+
+       char* szSkeleton = NULL;
+
+//jdlee
+/*
+       enum appcore_time_format nTimeformat;
+
+       int nRet = appcore_get_timeformat(&nTimeformat);
+       if(nRet == -1)
+       {
+               VideoLogInfo("Cannot get timeformat.");
+               nTimeformat = APPCORE_TIME_FORMAT_12;
+       }
+
+       if(nTimeformat == APPCORE_TIME_FORMAT_12)
+       {
+               szSkeleton = UG_DATE_FORMAT_12;
+       }
+       else if(nTimeformat == APPCORE_TIME_FORMAT_24)
+       {
+               szSkeleton = UG_DATE_FORMAT_24;
+       }
+       else
+       {
+               VideoLogInfo("Invalid time format : %d", nTimeformat);
+               szSkeleton = UG_DATE_FORMAT_12;         // Default value.
+       }
+*/
+       szSkeleton = UG_DATE_FORMAT_12;
+
+       char *szLocale = vconf_get_str(VCONFKEY_REGIONFORMAT);          // eg en_US.UTF-8
+       if(szLocale == NULL)
+       {
+               VideoLogInfo("Cannot get region format.");
+               szLocale = "en_US.UTF-8";                       // Default value.
+       }
+
+       char *szTimezone = NULL;
+       szTimezone = vconf_get_str(VCONFKEY_SETAPPL_TIMEZONE_ID);       // eg Asia/Seoul
+       if(szTimezone == NULL)
+       {
+               VideoLogInfo("Cannot get time zone.");
+               return strdup("N/A");
+       }
+
+       VideoLogInfo("Locale : %s TimeZone : %s TimeFormat : %s", szLocale, szSkeleton, szTimezone);
+
+       char* szDatestr = NULL;
+       szDatestr = MpVideoInfoCtrlConvertingString(szLocale, szSkeleton, szTimezone, (UDate)mtime * 1000);
+       if(!szDatestr)
+       {
+               VideoLogInfo("Cannot get time string.");
+               return strdup("N/A");
+       }
+
+       VideoLogInfo("ICU Date : %s", szDatestr);
+
+       return szDatestr;
+}
+
+static char* MpVideoInfoCtrlGetDrmFileExtension(char* szPath)
+{
+#define EXT_SIZE               128
+#define EXT_SPLITTER   '.'
+
+       if (!szPath) {
+               VideoLogInfo("[ERR] No exist szPath.");
+               return NULL;
+       }
+
+       char szDrmContentType[STR_LEN_MAX] = {0};
+
+       MpVideoDrmGetFileExtension(szPath, szDrmContentType, STR_LEN_MAX);
+       VideoLogInfo("szDrmContentType : %s", szDrmContentType);
+
+       char szTmpExt[EXT_SIZE] = {0,};
+       char *szExt = NULL;
+       int nErr = -1;
+
+       nErr = aul_get_mime_extension(szDrmContentType, szTmpExt, sizeof(szTmpExt));
+
+       if (0 == nErr) {
+               szExt = strrchr(szTmpExt, EXT_SPLITTER);
+               if((szExt == NULL) || (szExt + 1 == NULL)) {
+                       return NULL;
+               }
+       } else {
+               return NULL;
+       }
+
+       return strdup(szExt + 1);
+
+}
+
+char* MpVideoInfoCtrlGetFileExtension(char *szPath)
+{
+       if (!szPath) {
+               VideoLogInfo("Cannot get file extension. path is NULL");
+               return strdup("Unknown");
+       }
+
+       if (MpVideoDrmIsDrmFile(szPath)) {
+               VideoLogInfo("It's drm file.");
+
+               char *szFileExtension = MpVideoInfoCtrlGetDrmFileExtension(szPath);
+               if (szFileExtension) {
+                       VideoLogInfo("Drm file extension. - %s", szFileExtension);
+                       return szFileExtension;
+               } else {
+                       VideoLogInfo("No have file extension.");
+                       return strdup("Unknown");
+               }
+       } else {
+               char *szExt = NULL;
+               szExt = strrchr(szPath, '.');
+
+               if ((szExt != NULL) && ((szExt+1) != NULL)) {
+                       return strdup(szExt + 1);
+               }
+       }
+
+       return strdup("Unknown");
+}
+
+char* MpVideoInfoCtrlGetFileSize(size_t size)
+{
+       VideoLogInfo("");
+
+#define FILE_SIZE_LEN_MAX                      64
+#define BASIC_SIZE                                     1024    //used for file size check
+
+       int nCount = 0;
+
+       unsigned long int lsize = (unsigned long int)size;
+
+       char *pTmp = (char *)calloc(1, sizeof(char) * FILE_SIZE_LEN_MAX + 1);
+       if (pTmp == NULL) {
+               return NULL;
+       }
+
+       while (size >= (BASIC_SIZE)) {
+               lsize = size;
+               size /= BASIC_SIZE;
+               nCount++;
+       }
+
+       if (nCount == SIZE_BYTE) {
+               snprintf(pTmp, FILE_SIZE_LEN_MAX,"%zu B", size);
+       } else if (nCount == SIZE_KB) {
+               snprintf(pTmp, FILE_SIZE_LEN_MAX,"%zu KB", size);
+       } else if (nCount == SIZE_MB) {
+               snprintf(pTmp, FILE_SIZE_LEN_MAX,"%zu MB", size);
+       } else if(nCount == SIZE_GB) {
+               snprintf(pTmp, FILE_SIZE_LEN_MAX,"%zu GB", size);
+       }
+
+       VideoLogInfo("Size = %lu, OrigSize=%zu", lsize, size);
+
+       return pTmp;
+}
+
+bool MpVideoInfoCtrlGetFileInfo(char *szUriPath, char *szFileDate, int nFileDateSize, char *szFileExtension, int nFileExtensionSize, char *szFileSize, int nFilesizeSize)
+{
+       if (!szUriPath) {
+               VideoLogInfo("[ERR] No exist szUriPath.");
+               return FALSE;
+       }
+
+       VideoLogInfo("");
+
+       struct stat statbuf;
+
+       if (stat(szUriPath, &statbuf) == -1) {
+               VideoLogInfo("%s file is NULL", szUriPath);
+               return FALSE;
+       }
+
+       memset(szFileDate, 0, nFileDateSize);
+       memset(szFileExtension, 0, nFileExtensionSize);
+       memset(szFileSize, 0, nFilesizeSize);
+
+       char *szTmpDateOfFile = MpVideoInfoCtrlGetDateOfFile(statbuf.st_mtime);
+       char *szTmpFileExtension = MpVideoInfoCtrlGetFileExtension(szUriPath);
+       char *szTmpFileSize = MpVideoInfoCtrlGetFileSize(statbuf.st_size);      
+
+       if (szTmpDateOfFile) {
+               VideoLogInfo("szTmpDateOfFile : %s", szTmpDateOfFile);
+               strncpy(szFileDate, szTmpDateOfFile, nFileDateSize);
+               free(szTmpDateOfFile);
+       }
+
+       if (szTmpFileExtension) {
+               VideoLogInfo("szTmpFileExtension : %s", szTmpFileExtension);
+               strncpy(szFileExtension, szTmpFileExtension, nFileExtensionSize);
+               free(szTmpFileExtension);
+       }
+
+       if (szTmpFileSize) {
+               VideoLogInfo("szTmpFileSize : %s", szTmpFileSize);
+               strncpy(szFileSize, szTmpFileSize, nFilesizeSize);
+               free(szTmpFileSize);
+       }
+
+       return TRUE;
+}
diff --git a/src/mp-video-info-view.c b/src/mp-video-info-view.c
new file mode 100644 (file)
index 0000000..9550d72
--- /dev/null
@@ -0,0 +1,255 @@
+/*
+ * 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 [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
+ * 
+ *    Licensed under the Flora License, Version 1.0 (the "License");
+ *    you may not use this file except in compliance with the License.
+ *    You may obtain a copy of the License at
+ * 
+ *        http://www.tizenopensource.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.
+ */
+
+
+#include "mp-util.h"
+#include "mp-video-log.h"
+#include "video-player.h"
+#include "mp-video-info-view.h"
+#include "mp-video-string-define.h"
+
+
+static Evas_Object *pInfoViewLayout = NULL;
+static Evas_Object *pNaviFrameHandle = NULL;
+static Evas_Object *pBackBtn = NULL;
+
+static int nInfoResolutionWidth = 0;
+static int nInfoResolutionHeight = 0;
+
+static char szInfoTitle[STR_LEN_MAX] = {0,};
+static int nInfoDuration = 0;
+
+
+
+/*
+ * Callback function.
+ */
+static void MpVideoInfoViewNaviFrameBackCb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       /* Will be used if wanted it. */
+       //VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       evas_object_smart_callback_del(pBackBtn, "clicked", MpVideoInfoViewNaviFrameBackCb);
+
+       MpUtilDeletePopupHandle();
+
+       MpVideoInfoViewPop(pNaviFrameHandle, pUserData);
+
+       evas_object_smart_callback_add(pBackBtn, "clicked", MpVideoInfoViewNaviFrameBackCb, pUserData);
+}
+
+/*
+ * Internal function
+ */
+static char *MpVideoInfoViewItemLabelGet(const void *data, Evas_Object *obj,
+                                        const char *part)
+{
+       VideoLogInfo("");
+
+       int index = (int) data;
+       char subTxt[STR_LEN_MAX] = { 0, };
+
+       if (index > 2)
+               return NULL;
+
+       switch (index) {
+       case 0:         /* title */
+               if (!strcmp(part, "elm.text.1")) {
+                       return strdup("Title");
+               } else if (!strcmp(part, "elm.text.2")) {
+                       snprintf(subTxt, STR_LEN_MAX, "%s", szInfoTitle);
+                       VideoLogInfo("%s", subTxt);
+                       return strdup(subTxt);
+               } else {
+                       return NULL;
+               }
+               break;
+       case 1:         /* duration */
+               if (!strcmp(part, "elm.text.1")) {
+                       return strdup("Duration");
+               } else if (!strcmp(part, "elm.text.2")) {
+                       snprintf(subTxt, STR_LEN_MAX, "%" PLAY_TIME_FORMAT,
+                                PLAY_TIME_ARGS(nInfoDuration / 1000));
+                       VideoLogInfo("%s", subTxt);
+                       return strdup(subTxt);
+               } else {
+                       return NULL;
+               }
+               break;
+       case 2:         /* resolution */
+               if (!strcmp(part, "elm.text.1")) {
+                       return strdup("Resolution");
+               } else if (!strcmp(part, "elm.text.2")) {
+                       snprintf(subTxt, STR_LEN_MAX, "%d X %d",
+                                nInfoResolutionWidth,
+                                nInfoResolutionHeight);
+                       VideoLogInfo("%s", subTxt);
+                       return strdup(subTxt);
+               }
+               break;
+       }
+
+       return NULL;
+}
+
+static void MpVideoInfoViewInitValue(void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (!pUserData ) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       nInfoResolutionWidth = pAppData->nVideoWidthResolution;
+       nInfoResolutionHeight = pAppData->nVideoHeightResolution;
+
+       nInfoDuration = pAppData->nDuration;
+       if(pAppData->szVideoTitle) {
+               if(strcmp(pAppData->szVideoTitle, MP_STREAMING_PLAYER_STR) == 0) {
+                       snprintf(szInfoTitle,STR_LEN_MAX,"Unknown");
+               } else {
+                       snprintf(szInfoTitle,STR_LEN_MAX,"%s", pAppData->szVideoTitle);
+               }
+       } else {
+               snprintf(szInfoTitle,STR_LEN_MAX,"Unknown");
+       }
+}
+
+void MpVideoInfoViewInit(void *pParent, void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (!pUserData || !pParent) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       pInfoViewLayout = elm_layout_add(pParent);
+
+       if (pInfoViewLayout) {
+               int i = 0;
+               Evas_Object *genlist = NULL;
+               Elm_Genlist_Item_Class *info_itc = NULL;
+
+               pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlGetVideoResolution(pAppData);
+
+               MpVideoInfoViewInitValue((void *)pAppData);
+               elm_layout_file_set(pInfoViewLayout, VIDEO_PLAYER_DETAIL_EDJ, DETAIL_EDJ_GROUP);
+
+               info_itc = elm_genlist_item_class_new();
+
+               info_itc->item_style = "2text.7";
+               info_itc->func.text_get = (void *)MpVideoInfoViewItemLabelGet;
+               info_itc->func.content_get = NULL;
+               info_itc->func.state_get = NULL;
+               info_itc->func.del = NULL;
+
+               genlist = elm_genlist_add(pParent);
+               elm_genlist_multi_select_set(genlist, EINA_FALSE);
+               elm_genlist_select_mode_set(genlist, EINA_TRUE);
+
+               for (i = 0; i < 3; i++) {
+                       elm_genlist_item_append(genlist, info_itc, (void *)i, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+               }
+
+               elm_genlist_item_class_free(info_itc);
+
+               evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+               evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+               evas_object_show(genlist);
+               elm_object_part_content_set(pInfoViewLayout, SWALLOW_DETAIL_LIST, genlist);
+               evas_object_show(pInfoViewLayout);
+       }
+}
+
+/*
+ * External function
+ */
+void MpVideoInfoViewPush(void *pNaviFrame, void *pUserData)
+{
+       VideoLogInfo("");
+
+       Evas_Object *pTmpButton = NULL;
+       Elm_Object_Item *pNaviFrameItemInfoView = NULL;
+
+       pNaviFrameHandle = pNaviFrame;
+
+       MpVideoInfoViewInit(pNaviFrameHandle, pUserData);
+
+       pNaviFrameItemInfoView = elm_naviframe_item_push(pNaviFrameHandle, dgettext("sys_string", "IDS_COM_BODY_DETAILS"), NULL, NULL, pInfoViewLayout, "video/1line");
+
+       pBackBtn = elm_button_add(pNaviFrameHandle);
+       elm_object_text_set(pBackBtn, "btn_label");
+       evas_object_smart_callback_add(pBackBtn, "clicked", MpVideoInfoViewNaviFrameBackCb, pUserData);
+       elm_object_item_part_content_set(pNaviFrameItemInfoView, "prev_btn", pBackBtn);
+
+       pTmpButton = elm_object_item_part_content_get(pNaviFrameItemInfoView, "prev_btn");
+       if (pTmpButton) {
+               elm_object_style_set(pTmpButton, "video/navigationbar_prev_btn/default");
+       }
+
+       elm_object_item_signal_emit(pNaviFrameItemInfoView, "elm,state,optionheader,instant_close", "");
+}
+
+void MpVideoInfoViewPop(void *pNaviFrame, void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       elm_naviframe_item_pop(pNaviFrame);
+
+       MpVideoInfoViewDestroy();
+
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlShowLayout(pAppData);
+}
+
+void MpVideoInfoViewDestroy(void)
+{
+       VideoLogInfo("");
+
+       if (pInfoViewLayout) {
+               evas_object_del(pInfoViewLayout);
+               pInfoViewLayout = NULL;
+       }
+
+       if (pBackBtn) {
+               evas_object_del(pBackBtn);
+               pBackBtn = NULL;
+       }
+
+       pNaviFrameHandle = NULL;
+}
diff --git a/src/mp-video-player-mgr.c b/src/mp-video-player-mgr.c
new file mode 100755 (executable)
index 0000000..768da7b
--- /dev/null
@@ -0,0 +1,632 @@
+/*
+ * 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 [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
+ *
+ *    Licensed under the Flora License, Version 1.0 (the "License");
+ *    you may not use this file except in compliance with the License.
+ *    You may obtain a copy of the License at
+ *
+ *        http://www.tizenopensource.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.
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <sys/stat.h>
+
+#include "mp-video-log.h"
+#include "mp-video-player-mgr.h"
+
+#define MAX_PATH_LEN 2048
+
+
+static player_h pPlayerHandle;
+
+
+
+bool MpPlayerMgrIsActive(void)
+{
+       return pPlayerHandle ? true : false;
+}
+
+bool MpPlayerMgrRegistePlayerCallback(void *PlayerCompletedCbFunc, void *PlayerInterruptedCbFunc, void *PlayerErrorCbFunc, void *PlayerBufferingCbFunc, void *pUserData)
+{
+       VideoLogInfo("");
+
+       if(!pUserData)
+       {
+               VideoLogInfo("[ERR]");
+               return false;
+       }
+
+       if(!MpPlayerMgrIsActive())
+       {
+               VideoLogInfo("[ERR]");
+               return false;
+       }
+
+       if(player_set_completed_cb(pPlayerHandle, PlayerCompletedCbFunc, pUserData) != PLAYER_ERROR_NONE)
+       {
+               VideoLogInfo("[ERR]");
+               return false;
+       }
+
+       if(player_set_interrupted_cb(pPlayerHandle, PlayerInterruptedCbFunc, pUserData) != PLAYER_ERROR_NONE)
+       {
+               VideoLogInfo("[ERR]");
+               return false;
+       }
+
+       if(player_set_error_cb(pPlayerHandle, PlayerErrorCbFunc, pUserData) != PLAYER_ERROR_NONE)
+       {
+               VideoLogInfo("[ERR]");
+               return false;
+       }
+
+       if(player_set_buffering_cb(pPlayerHandle, PlayerBufferingCbFunc, pUserData) != PLAYER_ERROR_NONE)
+       {
+               VideoLogInfo("[ERR]");
+               return false;
+       }
+
+       return true;
+}
+
+
+bool MpPlayerMgrCreate(const char *szPath)
+{
+       VideoLogInfo("");
+
+       if(!szPath)
+       {
+               VideoLogInfo("[ERR] Not correct Meida URI.");
+               return false;
+       }
+
+       int nPathLength = strlen(szPath);
+       int nErr = PLAYER_ERROR_NONE;
+
+       VideoLogInfo(" Media path (%s)", szPath);
+
+       if(nPathLength > 0 && nPathLength < MAX_PATH_LEN)
+       {
+               nErr = player_create(&pPlayerHandle);
+               if(nErr != PLAYER_ERROR_NONE)
+               {
+                       VideoLogInfo("[ERR] Fail to create player handle. (MMF Error code : %x)", nErr);
+                       return false;
+               }
+
+               nErr = player_set_uri(pPlayerHandle, szPath);
+               if(nErr != PLAYER_ERROR_NONE)
+               {
+                       VideoLogInfo("[ERR] (%x) Fail to set attribute ", nErr);
+                       return false;
+               }
+
+       }
+       else
+       {
+               VideoLogInfo("[ERR] File path is too long.");
+               return false;
+       }
+
+       nErr = player_set_sound_type(pPlayerHandle, SOUND_TYPE_MEDIA);
+       if(nErr != PLAYER_ERROR_NONE)
+       {
+               VideoLogInfo("[ERR] (%x):: Fail to set attribute ", nErr);
+               return false;
+       }
+
+       return true;
+}
+
+bool MpPlayerMgrDestroy(void)
+{
+       VideoLogInfo("");
+
+       if(!MpPlayerMgrIsActive())
+       {
+               VideoLogInfo("[ERR]");
+               return false;
+       }
+
+       int nErr = player_destroy(pPlayerHandle);
+       if(nErr != PLAYER_ERROR_NONE)
+       {
+               VideoLogInfo("[ERR] Error code : 0x%x", nErr);
+               return false;
+       }
+
+       pPlayerHandle = NULL;
+
+       return true;
+}
+
+bool MpPlayerMgrRealize(void)
+{
+       VideoLogInfo("");
+
+       if(!MpPlayerMgrIsActive())
+       {
+               VideoLogInfo("[ERR]");
+               return false;
+       }
+
+       int nErr = player_prepare(pPlayerHandle);
+       if(nErr != PLAYER_ERROR_NONE)
+       {
+               VideoLogInfo("[ERR] Error code : 0x%x", nErr);
+               return false;
+       }
+
+       return true;
+}
+
+bool MpPlayerMgrRealizeAsync(void *pPrepareCb, void *pUserData)
+{
+       VideoLogInfo("");
+
+       if(!MpPlayerMgrIsActive())
+       {
+               VideoLogInfo("[ERR]");
+               return false;
+       }
+
+       int nErr = player_prepare_async(pPlayerHandle, pPrepareCb, pUserData);
+       if(nErr != PLAYER_ERROR_NONE)
+       {
+               VideoLogInfo("[ERR] Error code : 0x%x", nErr);
+               return false;
+       }
+
+       return true;
+}
+
+bool MpPlayerMgrUnrealize(void)
+{
+       VideoLogInfo("");
+
+       if(!MpPlayerMgrIsActive())
+       {
+               VideoLogInfo("[ERR]");
+               return false;
+       }
+
+       int nErr = player_unprepare (pPlayerHandle);
+       if(nErr != PLAYER_ERROR_NONE)
+       {
+               VideoLogInfo("[ERR] Error code : 0x%x", nErr);
+               return false;
+       }
+
+       return true;
+}
+
+bool MpPlayerMgrPlay(void)
+{
+       VideoLogInfo("");
+
+       if(!MpPlayerMgrIsActive())
+       {
+               VideoLogInfo("[ERR]");
+               return false;
+       }
+
+       int nErr = player_start(pPlayerHandle);
+       if(nErr != PLAYER_ERROR_NONE)
+       {
+               VideoLogInfo("[ERR] Error code : 0x%x", nErr);
+               return false;
+       }
+
+       return true;
+}
+
+bool MpPlayerMgrStop(void)
+{
+       VideoLogInfo("");
+
+       if(!MpPlayerMgrIsActive())
+       {
+               VideoLogInfo("[ERR]");
+               return false;
+       }
+
+       int nErr = player_stop (pPlayerHandle);
+       if(nErr != PLAYER_ERROR_NONE)
+       {
+               VideoLogInfo("[ERR] Error code : 0x%x", nErr);
+               return false;
+       }
+
+       return true;
+}
+
+bool MpPlayerMgrResume(void)
+{
+       VideoLogInfo("");
+
+       if(!MpPlayerMgrIsActive())
+       {
+               VideoLogInfo("[ERR]");
+               return false;
+       }
+
+       int nErr = player_start(pPlayerHandle);
+       if(nErr != PLAYER_ERROR_NONE)
+       {
+               VideoLogInfo("[ERR] Error code : 0x%x", nErr);
+               return false;
+       }
+
+       return true;
+}
+
+bool MpPlayerMgrPause(void)
+{
+       VideoLogInfo("");
+
+       if(!MpPlayerMgrIsActive())
+       {
+               VideoLogInfo("[ERR]");
+               return false;
+       }
+
+       int nErr = player_pause(pPlayerHandle);
+       if(nErr != PLAYER_ERROR_NONE)
+       {
+               VideoLogInfo("[ERR] Error code : 0x%x", nErr);
+               return false;
+       }
+
+       return true;
+}
+
+int MpPlayerMgrGetPosition(void)
+{
+       if(!MpPlayerMgrIsActive())
+       {
+               return 0;
+       }
+
+       int nPos = 0;
+       int nErr = 0;
+
+       nErr = player_get_position(pPlayerHandle, &nPos);
+       if(nErr != PLAYER_ERROR_NONE)
+       {
+               VideoLogInfo("[ERR] Error code : 0x%x ", nErr);
+               return 0;
+       }
+
+       return nPos;
+}
+
+void MpPlayerMgrSetPosition(unsigned int nPos, void *pSeekCb, void *pUserData)
+{
+       VideoLogInfo("");
+
+       if(!MpPlayerMgrIsActive())
+       {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       VideoLogInfo("Set position - %d", nPos);
+
+       int nErr = player_set_position(pPlayerHandle, (int)nPos, pSeekCb, pUserData);
+       if(nErr != PLAYER_ERROR_NONE)
+       {
+               VideoLogInfo("[ERR] Error code : 0x%x ", nErr);
+       }
+}
+
+void MpPlayerMgrSetMute(bool bMuteEnable)
+{
+       VideoLogInfo("");
+
+       if(!MpPlayerMgrIsActive())
+       {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       if(player_set_mute(pPlayerHandle, bMuteEnable) != PLAYER_ERROR_NONE)
+       {
+               VideoLogInfo("[ERR] Fail to set mute.");
+       }
+}
+
+bool MpPlayerMgrGetMute(void)
+{
+       VideoLogInfo("");
+
+       if(!MpPlayerMgrIsActive())
+       {
+               VideoLogInfo("[ERR]");
+               return false;
+       }
+
+       bool bIsMute = false;
+
+       if(player_is_muted(pPlayerHandle, &bIsMute) != PLAYER_ERROR_NONE)
+       {
+               VideoLogInfo("[ERR] Fail to get mute state.");
+               return false;
+       }
+
+       return bIsMute;
+}
+
+int MpPlayerMgrGetDuration(void)
+{
+       VideoLogInfo("");
+
+       if(!MpPlayerMgrIsActive())
+       {
+               VideoLogInfo("[ERR]");
+               return 0;
+       }
+
+       int nDuration = -1;
+
+       int nErr = player_get_duration(pPlayerHandle, &nDuration);
+       if(nErr != PLAYER_ERROR_NONE)
+       {
+               VideoLogInfo("[ERR] Error code : %x - Fail to get attribute ", nErr);
+               return 0;
+       }
+
+       return nDuration;
+}
+
+bool MpPlayerMgrSetOverlayXid(void *pOverlayXid)
+{
+       if(!MpPlayerMgrIsActive())
+       {
+               VideoLogInfo("[ERR]");
+               return false;
+       }
+
+       if(!pOverlayXid)
+       {
+               VideoLogInfo("[ERR]");
+               return false;
+       }
+
+       /* prevent 2011/07/12 */
+       VideoLogInfo("XID : %p", pOverlayXid);
+       int nErr = player_set_display(pPlayerHandle, PLAYER_DISPLAY_TYPE_X11, (void*)pOverlayXid);
+       if(nErr != PLAYER_ERROR_NONE)
+       {
+               VideoLogInfo("[ERR] Error code : %x - Fail to set attribute ", nErr);
+               return false;
+       }
+
+       return true;
+}
+
+bool MpPlayerMgrSetSoundPriority(void)
+{
+       VideoLogInfo("");
+
+       if(!MpPlayerMgrIsActive())
+       {
+               VideoLogInfo("[ERR]");
+               return false;
+       }
+
+       int nErr = player_set_sound_type(pPlayerHandle, SOUND_TYPE_MEDIA);
+       if(nErr != PLAYER_ERROR_NONE)
+       {
+               VideoLogInfo("[ERR] Error code : %x -  Fail to set attribute ", nErr);
+               return false;
+       }
+
+       return true;
+}
+
+int MpPlayerMgrSetPlaySpeed(float nSpeedValue)
+{
+       VideoLogInfo("");
+
+       if(!MpPlayerMgrIsActive())
+       {
+               VideoLogInfo("[ERR]");
+               return -1;
+       }
+       int nErr = player_set_playback_rate(pPlayerHandle, nSpeedValue);
+       if(nErr != PLAYER_ERROR_NONE)
+       {
+               VideoLogInfo("[ERR] Error code : %x - Fail to get attribute ", nErr);
+               return -1;
+       }
+
+       return 0;
+}
+
+int MpPlayerMgrGetVideoWidthResolution(void)
+{
+       VideoLogInfo("");
+
+       if(!MpPlayerMgrIsActive())
+       {
+               VideoLogInfo("[ERR]");
+               return 0;
+       }
+
+       int nWidth = 0;
+       int nHeight = 0;
+       int nErr = player_get_video_size(pPlayerHandle, &nWidth, &nHeight);
+       if(nErr != PLAYER_ERROR_NONE)
+       {
+               VideoLogInfo("[ERR] Error code : %x - Fail to get attribute ", nErr);
+               return 0;
+       }
+
+       return nWidth;
+}
+
+int MpPlayerMgrGetVideoHeightResolution(void)
+{
+       VideoLogInfo("");
+
+       if(!MpPlayerMgrIsActive())
+       {
+               VideoLogInfo("[ERR]");
+               return 0;
+       }
+
+       int nWidth = 0;
+       int nHeight = 0;
+       int nErr = player_get_video_size(pPlayerHandle, &nWidth, &nHeight);
+       if(nErr != PLAYER_ERROR_NONE)
+       {
+               VideoLogInfo("[ERR] Error code : %x - Fail to get attribute ", nErr);
+               return 0;
+       }
+
+       return nHeight;
+}
+
+bool MpPlayerMgrSetDisplayMode(MpPlayerMgrDisplayMethod nMethodMode)
+{
+       VideoLogInfo("");
+
+       if(!MpPlayerMgrIsActive())
+       {
+               VideoLogInfo("[ERR]");
+               return false;
+       }
+
+       return true;
+}
+
+bool MpPlayerMgrSetRotate(MpVideoRotation nRotation)
+{
+       VideoLogInfo("");
+
+       if(!MpPlayerMgrIsActive())
+       {
+               VideoLogInfo("[ERR]");
+               return false;
+       }
+
+       int nRotVal = PLAYER_DISPLAY_ROTATION_NONE;
+
+       if(nRotation == VIDEO_SCREEN_PORTRAIT) {
+               nRotVal = PLAYER_DISPLAY_ROTATION_NONE;
+       }
+       else if(nRotation == VIDEO_SCREEN_PORTRAIT_UPSIDEDOWN) {
+               nRotVal = PLAYER_DISPLAY_ROTATION_180;
+       }
+       else if(nRotation == VIDEO_SCREEN_LANDSCAPE) {
+               nRotVal = PLAYER_DISPLAY_ROTATION_270;
+       }
+       else if(nRotation == VIDEO_SCREEN_LANDSCAPE_UPSIDEDOWN) {
+               nRotVal = PLAYER_DISPLAY_ROTATION_90;
+       }
+       int nRet = player_set_x11_display_rotation (pPlayerHandle , nRotVal);
+       if(nRet != PLAYER_ERROR_NONE)
+       {
+               VideoLogInfo("[ERR] Error code : %x - Fail to set attribute ", nRet);
+               return false;
+       }
+
+       return true;
+}
+
+bool MpPlayerMgrSetUseragentForStreaming(const char *szUserAgent)
+{
+       VideoLogInfo("!!!!!! NO EXIST FUNCTION FOR SETTING USER AGENT. !!!!!!");
+
+       return true;
+}
+
+bool MpPlayerMgrSetProxyAddressForStreaming(const char *szProxyAddress)
+{
+       VideoLogInfo("!!!!!! NO EXIST FUNCTION FOR SETTING PROXY ADDRESS. !!!!!!");
+       return true;
+}
+
+bool MpPlayerMgrSetCookieForStreaming(const char *szCookie)
+{
+       if(!MpPlayerMgrIsActive())
+       {
+               VideoLogInfo("[ERR]");
+               return false;
+       }
+
+       if(!szCookie)
+       {
+               VideoLogInfo("No exist cookie.");
+               return false;
+       }
+
+       VideoLogInfo("");
+
+       int nRet = player_set_streaming_cookie(pPlayerHandle , szCookie, strlen(szCookie));
+       if(nRet == PLAYER_ERROR_INVALID_PARAMETER)
+       {
+               VideoLogInfo("PLAYER_ERROR_INVALID_PARAMETER");
+               return false;
+       }
+
+       return true;
+}
+
+int MpPlayerMgrGetBufferingPosition(void)
+{
+       return 0;
+}
+
+bool MpPlayerMgrRegisteBufferingCallBack(void *pCallbackFunc, void *pUserData)
+{
+       if(!MpPlayerMgrIsActive())
+       {
+               VideoLogInfo("[ERR]");
+               return false;
+       }
+
+       // !!! CHECK player_buffering_cb !!!
+       if(player_set_buffering_cb(pPlayerHandle, pCallbackFunc, pUserData) != PLAYER_ERROR_NONE)
+       {
+               VideoLogInfo("");
+               return false;
+       }
+
+       return true;
+}
+
+int MpPlayerMgrGetFileStreamType(void)
+{
+       VideoLogInfo("");
+
+// jdlee
+       return FILE_STREAM_TYPE_VIDEO;
+}
+
+bool MpPlayerMgrSetScaling(bool bScale)
+{
+       if(!MpPlayerMgrIsActive())
+       {
+               VideoLogInfo("[ERR]");
+               return false;
+       }
+
+       VideoLogInfo("");
+
+       if(player_enable_evas_display_scaling(pPlayerHandle, bScale) != PLAYER_ERROR_NONE) {
+               VideoLogInfo("[ERR]");
+               return false;
+       }
+       return true;
+}
diff --git a/src/mp-video-progressbar.c b/src/mp-video-progressbar.c
new file mode 100755 (executable)
index 0000000..ad6ea8c
--- /dev/null
@@ -0,0 +1,730 @@
+/*
+ * 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 [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
+ *
+ *    Licensed under the Flora License, Version 1.0 (the "License");
+ *    you may not use this file except in compliance with the License.
+ *    You may obtain a copy of the License at
+ *
+ *        http://www.tizenopensource.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.
+ */
+
+
+#include "mp-util.h"
+#include "mp-video-log.h"
+#include "video-player.h"
+#include "mp-video-value-define.h"
+#include "mp-video-service-ctrl.h"
+#include "mp-video-progressbar.h"
+
+#define PROGRESS_BAR_START_TERM                        130
+#define PROGRESS_BAR_WIDTH_TERM                        200
+
+#define PROGRESS_ADJUSTMENT_TIME_INTERVAL      2.0
+#define PROGRESS_ADJUSTMENT_RUN_INTERVAL       0.3
+
+#define PROGRESS_ADJUSTMENT_MOVE_LIMIT         10
+#define PROGRESS_ADJUSTMENT_MODE_LIMIT         10
+
+
+static Evas_Object *pProgressbarEdj = NULL;
+static Ecore_Timer *pProgressbarTimer = NULL;
+
+static Ecore_Timer *pProgressAdjustCheckTimer = NULL;
+static Ecore_Timer *pProgressAdjustRunTimer = NULL;
+
+static bool bIsEventSkip = FALSE;
+static bool bIsDrag = FALSE;
+static int nDragPosition = 0;
+
+static bool bIsAdjustmentMode = FALSE;
+static int nDownPosX = 0;
+static int nOldPosX = 0;
+static bool bPrevAdjustment = FALSE;
+
+
+static void MpVideoProgressbarSetAdjustmentMode(bool bShow)
+{
+       VideoLogInfo("");
+
+       if(bShow) {
+               edje_object_signal_emit(pProgressbarEdj, SIGNAL_PROGRESS_ADJUSTMENT_SHOW, "*");
+       }
+       else {
+               edje_object_signal_emit(pProgressbarEdj, SIGNAL_PROGRESS_ADJUSTMENT_HIDE, "*");
+       }
+}
+
+
+/*
+ * Internal function
+ */
+static Eina_Bool MpVideoProgressbarUpdateValue(void *pUserData)
+{
+       //VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR] No exist userdata.");
+               return EINA_TRUE;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       double nPlayedRatio = 0.0;
+       char szPlayingTime[PLAY_TIME_LENGTH] = { 0, };
+
+       nPlayedRatio = ((double)nDragPosition / (double)pAppData->nDuration);
+
+       snprintf(szPlayingTime, PLAY_TIME_LENGTH, "%" PLAY_TIME_FORMAT,
+                PLAY_TIME_ARGS(nDragPosition / 1000));
+
+       edje_object_part_drag_value_set(pProgressbarEdj, "progress.playing",
+                                       nPlayedRatio, 0.0);
+
+       edje_object_part_text_set(pProgressbarEdj, "progress.txt.played",
+                                 szPlayingTime);
+
+       if(bIsAdjustmentMode) {
+               edje_object_part_text_set(pProgressbarEdj, "progress.adjustment.txt",
+                                 szPlayingTime);
+       }
+
+       return EINA_TRUE;
+}
+
+static void MpVideoProgressbarUpdateBufferingValue(void *pUserData)
+{
+       //VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR] No exist userdata.");
+               return;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       double buffering_ratio = 0.0;
+       pAppData->
+           VideoAppCtrlCallbackFunc.VideoAppCtrlGetBufferingPosition(pAppData);
+
+       buffering_ratio = ((double)pAppData->nBufferingPosition / (double)100);
+
+       //VideoLogInfo("%d:%lf", pAppData->nBufferingPosition, buffering_ratio);
+
+       edje_object_part_drag_value_set(pProgressbarEdj, "progress.buffering",
+                                       buffering_ratio, 0.0);
+}
+
+/*
+ * Callback function.
+ */
+static Eina_Bool MpVideoProgressbarTimerCb(void *pUserData)
+{
+       /* VideoLogInfo(""); */
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR] No exist userdata.");
+               return EINA_TRUE;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       if (pAppData->nDuration < 1) {
+               VideoLogInfo("Try to update duration time.");
+               pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlReqDurationTime(pAppData);
+               return EINA_TRUE;
+       }
+
+       if (bIsEventSkip || bIsDrag)
+               return EINA_TRUE;
+
+       double nPlayedRatio = 0.0;
+       char szPlayingTime[PLAY_TIME_LENGTH] = { 0, };
+
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlGetPosition(pAppData);
+
+       nPlayedRatio = ((double)pAppData->nCurPosition / (double)pAppData->nDuration);
+       snprintf(szPlayingTime, PLAY_TIME_LENGTH, "%" PLAY_TIME_FORMAT, PLAY_TIME_ARGS(pAppData->nCurPosition / 1000));
+
+       edje_object_part_drag_value_set(pProgressbarEdj, "progress.playing", nPlayedRatio, 0.0);
+       edje_object_part_text_set(pProgressbarEdj, "progress.txt.played", szPlayingTime);
+
+       int nTmpPlayerType = MpVideoServiceCtrlGetPlayerTypeWithoutLog();
+       if(nTmpPlayerType == MP_STREAMING_PLAYER)
+       {
+               MpVideoProgressbarUpdateBufferingValue(pUserData);
+       }
+
+       return EINA_TRUE;
+}
+
+static Eina_Bool MpVideoProgressbarAdjustmentTimerCb(void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR] No exist userdata.");
+               return EINA_FALSE;
+       }
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       bIsAdjustmentMode = TRUE;
+
+       VideoLogInfo("%d, %d",pAppData->nCurPosition , nDragPosition);
+
+       pAppData->nSetPosition = nDragPosition;
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSetPosition(pAppData);
+
+       MpVideoProgressbarSetAdjustmentMode(bIsAdjustmentMode);
+       MpVideoProgressbarUpdateValue(pUserData);
+       return EINA_FALSE;
+}
+
+static Eina_Bool MpVideoProgressbarAdjustmentRunTimerCb(void *pUserData)
+{
+//     VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR] No exist userdata.");
+               return EINA_TRUE;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+
+       if(bPrevAdjustment) {
+               pAppData->nSetPosition = nDragPosition - 1000;
+       }
+       else {
+               pAppData->nSetPosition = nDragPosition + 1000;
+       }
+
+       if (pAppData->nSetPosition < 0) {
+               pAppData->nSetPosition = 0;
+       }
+
+       if (pAppData->nSetPosition > pAppData->nDuration) {
+               pAppData->nSetPosition = pAppData->nDuration;
+       }
+
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSetPosition(pAppData);
+
+       nDragPosition = pAppData->nSetPosition;
+
+       MpVideoProgressbarUpdateValue((void *)pAppData);
+
+
+
+       return EINA_TRUE;
+}
+
+
+
+static void MpVideoProgressbarDownCb(void *pUserData, Evas * e,
+                                    Evas_Object *obj, void *event_info)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       if (!event_info) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       if (bIsEventSkip)
+               return;
+
+
+       int nTmpPlayerType = MpVideoServiceCtrlGetPlayerTypeWithoutLog();
+       if(nTmpPlayerType != MP_STREAMING_PLAYER)
+       {
+               if(pProgressAdjustCheckTimer) {
+                       ecore_timer_del(pProgressAdjustCheckTimer);
+                       pProgressAdjustCheckTimer = NULL;
+               }
+
+               if(pProgressAdjustRunTimer) {
+                       ecore_timer_del(pProgressAdjustRunTimer);
+                       pProgressAdjustRunTimer = NULL;
+               }
+
+               pProgressAdjustCheckTimer = ecore_timer_add(PROGRESS_ADJUSTMENT_TIME_INTERVAL,
+                                       MpVideoProgressbarAdjustmentTimerCb, (void *)pUserData);
+
+       }
+       bIsDrag = TRUE;
+       MpVideoProgressbarDeleteTimer();
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+       Evas_Event_Mouse_Up *ev = event_info;
+       Evas_Object *progressbar = obj;
+       int w = 0, current = 0;
+       double ratio = 0.0;
+
+       int term = 0;
+       int w_term = 0;
+       int width = 0;
+       int height = 0;
+
+       ecore_x_window_size_get(ecore_x_window_root_first_get(),&width, &height);
+       term = PROGRESS_BAR_START_TERM * width/DEFAULT_SCALE_WIDTH;
+       w_term = PROGRESS_BAR_WIDTH_TERM * width/DEFAULT_SCALE_WIDTH;
+       evas_object_geometry_get(progressbar, NULL, NULL, &w, NULL);
+       nDownPosX = ev->canvas.x;
+       nOldPosX = ev->canvas.x;;
+       current = ev->canvas.x - term;
+       w = w - w_term;
+       if (current < 0)
+               current = 0;
+       else if (current > w)
+               current = w;
+
+       ratio = (double)current / w;
+
+       nDragPosition = ratio * pAppData->nDuration;
+       pAppData->nSetPosition = nDragPosition;
+
+       if(nTmpPlayerType != MP_STREAMING_PLAYER)
+       {
+               if (pAppData->nCurPlayerState == MP_PLAYER_STATE_PLAY ||
+                   pAppData->nCurPlayerState == MP_PLAYER_STATE_RESUME) {
+                       //pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlPause(pAppData);
+                       pAppData->nPrePlayerState = MP_PLAYER_STATE_RESUME;
+                       pAppData->nSeekPlayerState = MP_PLAYER_STATE_PAUSE;
+               }
+               pAppData->bSeekComplete = FALSE;
+               pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSetPosition(pAppData);
+       }
+       else {
+               if (pAppData->nCurPlayerState == MP_PLAYER_STATE_PLAY ||
+                   pAppData->nCurPlayerState == MP_PLAYER_STATE_RESUME) {
+                       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlPause(pAppData);
+                       pAppData->nPrePlayerState = MP_PLAYER_STATE_RESUME;
+               }
+       }
+
+       MpVideoProgressbarUpdateValue(pUserData);
+
+}
+
+static void MpVideoProgressbarUpCb(void *pUserData, Evas * e, Evas_Object *obj,
+                                  void *event_info)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       if (!event_info) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       if (bIsEventSkip)
+               return;
+
+       bIsDrag = FALSE;
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       if(pProgressAdjustRunTimer) {
+               ecore_timer_del(pProgressAdjustRunTimer);
+               pProgressAdjustRunTimer = NULL;
+       }
+
+       if(pProgressAdjustCheckTimer) {
+               ecore_timer_del(pProgressAdjustCheckTimer);
+               pProgressAdjustCheckTimer = NULL;
+       }
+
+       int nTmpPlayerType = MpVideoServiceCtrlGetPlayerTypeWithoutLog();
+       if(nTmpPlayerType != MP_STREAMING_PLAYER)
+       {
+               if(bIsAdjustmentMode) {
+                       bIsAdjustmentMode = FALSE;
+                       MpVideoProgressbarSetAdjustmentMode(bIsAdjustmentMode);
+
+                       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSetPosition(pAppData);
+
+                       if (pAppData->nPrePlayerState == MP_PLAYER_STATE_PLAY ||
+                           pAppData->nPrePlayerState == MP_PLAYER_STATE_RESUME) {
+                               //pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlResume(pAppData);
+                               pAppData->nPrePlayerState = MP_PLAYER_STATE_PAUSE;
+                               pAppData->nSeekPlayerState = MP_PLAYER_STATE_RESUME;
+                       }
+                       nOldPosX = 0;
+                       return;
+               }
+       }
+
+       Evas_Event_Mouse_Up *ev = event_info;
+       Evas_Object *progressbar = obj;
+       int w = 0, current = 0;
+       double ratio = 0.0;
+
+       int term = 0;
+       int w_term = 0;
+       int width = 0;
+       int height = 0;
+
+       ecore_x_window_size_get(ecore_x_window_root_first_get(),&width, &height);
+       term = PROGRESS_BAR_START_TERM * width/DEFAULT_SCALE_WIDTH;
+       w_term = PROGRESS_BAR_WIDTH_TERM * width/DEFAULT_SCALE_WIDTH;
+
+       evas_object_geometry_get(progressbar, NULL, NULL, &w, NULL);
+       current = ev->canvas.x - term;
+       w = w - w_term;
+
+       if (current < 0)
+               current = 0;
+       else if (current > w)
+               current = w;
+
+       ratio = (double)current / w;
+
+       pAppData->nSetPosition = (int)pAppData->nDuration * ratio;
+
+       if (pAppData->nSetPosition > pAppData->nDuration)
+               pAppData->nSetPosition = pAppData->nDuration;
+
+       if (pAppData->nSetPosition < 0)
+               pAppData->nSetPosition = 0;
+
+       if(nTmpPlayerType != MP_STREAMING_PLAYER)
+       {
+               if(!pAppData->bSeekComplete)
+               {
+                       pAppData->nSeekPosition = pAppData->nSetPosition;
+               }
+               else
+               {
+                       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSetPosition(pAppData);
+                       MpVideoProgressbarCreateTimer((void *)pAppData);
+               }
+
+               if (pAppData->nPrePlayerState == MP_PLAYER_STATE_PLAY ||
+                   pAppData->nPrePlayerState == MP_PLAYER_STATE_RESUME) {
+                       //pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlResume(pAppData);
+                       pAppData->nPrePlayerState = MP_PLAYER_STATE_PAUSE;
+                       pAppData->nSeekPlayerState = MP_PLAYER_STATE_RESUME;
+               }
+       }
+       else
+       {
+               pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSetPosition(pAppData);
+               MpVideoProgressbarCreateTimer((void *)pAppData);
+
+               if (pAppData->nPrePlayerState == MP_PLAYER_STATE_PLAY ||
+                   pAppData->nPrePlayerState == MP_PLAYER_STATE_RESUME) {
+                       pAppData->nSeekPlayerState = MP_PLAYER_STATE_RESUME;
+                       pAppData->nPrePlayerState = MP_PLAYER_STATE_PAUSE;
+               }
+
+       }
+}
+static void MpVideoProgressbarMoveCb(void *pUserData, Evas * e,
+                                    Evas_Object *obj, void *event_info)
+{
+//     VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       if (!event_info) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       if (bIsEventSkip)
+               return;
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+       Evas_Event_Mouse_Up *ev = event_info;
+       Evas_Object *progressbar = obj;
+       int w = 0, current = 0;
+       double ratio = 0.0;
+
+       int term = 0;
+       int w_term = 0;
+       int width = 0;
+       int height = 0;
+
+       ecore_x_window_size_get(ecore_x_window_root_first_get(),&width, &height);
+       term = PROGRESS_BAR_START_TERM * width/DEFAULT_SCALE_WIDTH;
+       w_term = PROGRESS_BAR_WIDTH_TERM * width/DEFAULT_SCALE_WIDTH;
+
+       evas_object_geometry_get(progressbar, NULL, NULL, &w, NULL);
+       if(bIsAdjustmentMode) {
+               if((nOldPosX + PROGRESS_ADJUSTMENT_MODE_LIMIT) < ev->canvas.x) {
+                       if(bPrevAdjustment == TRUE) {
+                               if(pProgressAdjustRunTimer) {
+                                       ecore_timer_del(pProgressAdjustRunTimer);
+                                       pProgressAdjustRunTimer = NULL;
+                               }
+                       }
+                       bPrevAdjustment = FALSE;
+                       nOldPosX = ev->canvas.x;
+               }
+               else if((nOldPosX - PROGRESS_ADJUSTMENT_MODE_LIMIT) > ev->canvas.x) {
+                       if(bPrevAdjustment == FALSE) {
+                               if(pProgressAdjustRunTimer) {
+                                       ecore_timer_del(pProgressAdjustRunTimer);
+                                       pProgressAdjustRunTimer = NULL;
+                               }
+                       }
+                       bPrevAdjustment = TRUE;
+                       nOldPosX = ev->canvas.x;
+               }
+
+               if(pProgressAdjustRunTimer == NULL) {
+                       pProgressAdjustRunTimer = ecore_timer_add(PROGRESS_ADJUSTMENT_RUN_INTERVAL,
+                                                       MpVideoProgressbarAdjustmentRunTimerCb, (void *)pAppData);
+
+               }
+
+       }
+       else {
+               if(((nDownPosX + PROGRESS_ADJUSTMENT_MOVE_LIMIT) < ev->canvas.x ) ||
+                       ((nDownPosX - PROGRESS_ADJUSTMENT_MOVE_LIMIT) > ev->canvas.x)) {
+                       VideoLogInfo("Adjustment Off");
+
+                       if(pProgressAdjustCheckTimer) {
+                               ecore_timer_del(pProgressAdjustCheckTimer);
+                               pProgressAdjustCheckTimer = NULL;
+                       }
+
+                       if(pProgressAdjustRunTimer) {
+                               ecore_timer_del(pProgressAdjustRunTimer);
+                               pProgressAdjustRunTimer = NULL;
+                       }
+               }
+               current = ev->canvas.x - term;
+               w = w - w_term;
+
+               if (current < 0)
+                       current = 0;
+               else if (current > w)
+                       current = w;
+
+               ratio = (double)current / w;
+               nDragPosition = ratio * pAppData->nDuration;
+               pAppData->nSetPosition = nDragPosition;
+               int nTmpPlayerType = MpVideoServiceCtrlGetPlayerTypeWithoutLog();
+               if(nTmpPlayerType != MP_STREAMING_PLAYER)
+               {
+                       if(pAppData->bSeekComplete) {
+                               pAppData->bSeekComplete = FALSE;
+                               pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSetPosition(pAppData);
+                       }
+               }
+               MpVideoProgressbarUpdateValue(pUserData);
+       }
+}
+
+/*
+ * External function
+ */
+void MpVideoProgressbarSetSkipEvent(bool bSkip)
+{
+       VideoLogInfo("");
+
+       bIsEventSkip = bSkip;
+}
+
+void *MpVideoProgressbarGetEdjHandle(void)
+{
+       VideoLogInfo("");
+
+       if (pProgressbarEdj) {
+               return (void *)pProgressbarEdj;
+       } else {
+               VideoLogInfo("Progressbar edj handle is null.");
+               return NULL;
+       }
+}
+
+void *MpVideoProgressbarInit(void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR]");
+               return NULL;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       Evas *pMainWindowEvas = evas_object_evas_get(pAppData->pMainWindow);
+
+       pProgressbarEdj = (Evas_Object *)MpUtilLoadEdjFile(pMainWindowEvas,
+                                                          VIDEO_PLAYER_PROGRESS_EDJ,
+                                                          PROGRESS_EDJ_GROUP);
+
+       evas_object_event_callback_add(pProgressbarEdj,
+                                      EVAS_CALLBACK_MOUSE_DOWN,
+                                      MpVideoProgressbarDownCb, pAppData);
+
+       evas_object_event_callback_add(pProgressbarEdj,
+                                      EVAS_CALLBACK_MOUSE_UP,
+                                      MpVideoProgressbarUpCb, pAppData);
+
+       evas_object_event_callback_add(pProgressbarEdj,
+                                      EVAS_CALLBACK_MOUSE_MOVE,
+                                      MpVideoProgressbarMoveCb, pAppData);
+
+       MpVideoProgressbarUpdateDurationTime("--:--:--");
+
+       return (void *)pProgressbarEdj;
+}
+
+void MpVideoProgressbarDestroy(void)
+{
+       VideoLogInfo("");
+
+       if (pProgressbarEdj) {
+               evas_object_del(pProgressbarEdj);
+               pProgressbarEdj = NULL;
+       }
+
+       if (pProgressbarTimer) {
+               ecore_timer_del(pProgressbarTimer);
+               pProgressbarTimer = NULL;
+       }
+
+       if(pProgressAdjustCheckTimer) {
+               ecore_timer_del(pProgressAdjustCheckTimer);
+               pProgressAdjustCheckTimer = NULL;
+       }
+
+       if(pProgressAdjustRunTimer) {
+               ecore_timer_del(pProgressAdjustRunTimer);
+               pProgressAdjustRunTimer = NULL;
+       }
+
+       bIsEventSkip = FALSE;
+       nDragPosition = 0;
+}
+
+void MpVideoProgressbarCreateTimer(void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       if (pProgressbarTimer) {
+               ecore_timer_del(pProgressbarTimer);
+               pProgressbarTimer = NULL;
+       }
+
+       if(pProgressAdjustCheckTimer) {
+               ecore_timer_del(pProgressAdjustCheckTimer);
+               pProgressAdjustCheckTimer = NULL;
+       }
+
+       if(pProgressAdjustRunTimer) {
+               ecore_timer_del(pProgressAdjustRunTimer);
+               pProgressAdjustRunTimer = NULL;
+       }
+
+       double nPlayedRatio = 0.0;
+       char szPlayingTime[PLAY_TIME_LENGTH] = { 0, };
+
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlGetPosition(pAppData);
+
+       nPlayedRatio = ((double)pAppData->nCurPosition / (double)pAppData->nDuration);
+       snprintf(szPlayingTime, PLAY_TIME_LENGTH, "%" PLAY_TIME_FORMAT, PLAY_TIME_ARGS(pAppData->nCurPosition / 1000));
+
+       edje_object_part_drag_value_set(pProgressbarEdj, "progress.playing", nPlayedRatio, 0.0);
+       edje_object_part_text_set(pProgressbarEdj, "progress.txt.played", szPlayingTime);
+
+       pProgressbarTimer = ecore_timer_add(0.3, MpVideoProgressbarTimerCb, (void *)pAppData);
+}
+
+void MpVideoProgressbarDeleteTimer(void)
+{
+       VideoLogInfo("");
+
+       if (pProgressbarTimer) {
+               ecore_timer_del(pProgressbarTimer);
+               pProgressbarTimer = NULL;
+       }
+
+       if(pProgressAdjustCheckTimer) {
+               ecore_timer_del(pProgressAdjustCheckTimer);
+               pProgressAdjustCheckTimer = NULL;
+       }
+
+       if(pProgressAdjustRunTimer) {
+               ecore_timer_del(pProgressAdjustRunTimer);
+               pProgressAdjustRunTimer = NULL;
+       }
+}
+
+void MpVideoProgressbarUpdateDurationTime(char *szDurationTime)
+{
+       VideoLogInfo("");
+
+       if (!szDurationTime) {
+               VideoLogInfo("Fail to ser duration time");
+               return;
+       }
+
+       edje_object_part_text_set(pProgressbarEdj, "progress.txt.total",
+                                 szDurationTime);
+}
+
+void MpVideoProgressbarBeginOfStream(void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       MpVideoProgressbarDeleteTimer();
+
+       pAppData->nCurPosition = 0;
+       edje_object_part_drag_value_set(pProgressbarEdj, "progress.playing", 0.0, 0.0);
+       edje_object_part_text_set(pProgressbarEdj, "progress.txt.played", "00:00:00");
+
+       MpVideoProgressbarCreateTimer(pUserData);
+}
+
+void MpVideoProgressbarReset(void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       MpVideoProgressbarDeleteTimer();
+
+       edje_object_part_drag_value_set(pProgressbarEdj, "progress.playing", 0.0, 0.0);
+       edje_object_part_text_set(pProgressbarEdj, "progress.txt.played", "00:00:00");
+}
+
diff --git a/src/mp-video-service-ctrl.c b/src/mp-video-service-ctrl.c
new file mode 100644 (file)
index 0000000..0d6b1f3
--- /dev/null
@@ -0,0 +1,495 @@
+/*
+ * 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 [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
+ * 
+ *    Licensed under the Flora License, Version 1.0 (the "License");
+ *    you may not use this file except in compliance with the License.
+ *    You may obtain a copy of the License at
+ * 
+ *        http://www.tizenopensource.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.
+ */
+
+
+#include <app.h>
+#include <aul.h>
+#include <glib.h>
+
+#include "mp-util.h"
+#include "mp-video-log.h"
+#include "mp-video-service-ctrl.h"
+
+
+#define MP_VIDEO_LAUNCHED_BY_APP_KEY           "launching_application"
+#define MP_VIDEO_SORT_TYPE_KEY                         "order_type"
+#define MP_VIDEO_LIST_TYPE_KEY                         "video_list_type"
+#define MP_VIDEO_TAG_NAME_KEY                          "tag_name"
+#define MP_VIDEO_EDIT_MODE_KEY                         "edit_mode"
+#define MP_VIDEO_START_POS_TIME_KEY                    "start_pos_time"
+#define MP_VIDEO_URI_PATH                                      "path"
+#define MP_VIDEO_COOKIE                                                "cookie"
+
+
+static service_h pAppSvcHandle = NULL;
+static int nPlayerType = MP_VIDEO_PLAYER_SIMPLE;
+static char szStreamingCookie[STR_LEN_MAX] = {0};
+
+
+/////////////////////////////////////////////////////////////////////////////
+// Internal Function
+
+bool MpVideoServiceCtrlCheckMime(service_h pVideoServiceHandle, char *szMediaUri)
+{
+       VideoLogInfo("");
+
+       if(!pVideoServiceHandle)
+       {
+               VideoLogInfo("[ERR] No Exist Service handle.");
+               return FALSE;
+       }
+
+       if(!szMediaUri)
+       {
+               VideoLogInfo("[ERR] No Exist media uri.");
+               return FALSE;
+       }
+
+       bool bRet = TRUE;
+       char *szMimeContent = NULL;
+
+       if(service_get_extra_data(pVideoServiceHandle, AUL_K_MIME_CONTENT, &szMimeContent) != SERVICE_ERROR_NONE)
+       {
+               VideoLogInfo("No exist mime type.");
+               bRet = FALSE;
+       }
+
+       if(szMimeContent)
+       {
+               strncpy(szMediaUri, szMimeContent, STR_LEN_MAX - 1);
+               VideoLogInfo("Mime content : %s", szMediaUri);
+               free(szMimeContent);
+               bRet = TRUE;
+       }
+       else
+       {
+               VideoLogInfo("No exist MIME type.");
+               bRet = FALSE;
+       }
+
+       return bRet;
+}
+
+bool MpVideoServiceCtrlCheckBundle(service_h pVideoServiceHandle, char *szMediaUri)
+{
+       if(!pVideoServiceHandle)
+       {
+               VideoLogInfo("[ERR] No exist pBundleData pointer or Service handle count value.");
+               return FALSE;
+       }
+
+       bool bRet = TRUE;
+       char *pStrVideoURI = NULL;
+
+       if(service_get_extra_data(pVideoServiceHandle, MP_VIDEO_URI_PATH, &pStrVideoURI) != SERVICE_ERROR_NONE)
+       {
+               VideoLogInfo("[ERR] No exist KEY of video/streaming URI.");
+               bRet = FALSE;
+       }
+
+       if(pStrVideoURI)
+       {
+               strncpy(szMediaUri, pStrVideoURI, STR_LEN_MAX - 1);
+               VideoLogInfo("Video/Streaming URI path : %s", szMediaUri);
+               free(pStrVideoURI);
+               bRet = TRUE;
+       }
+       else
+       {
+               VideoLogInfo("[ERR] No exist video/streaming URI.");
+               bRet = FALSE;
+       }
+
+       return bRet;
+}
+
+bool MpVideoServiceCtrlCheckAUL(service_h pVideoServiceHandle, char *szMediaUri)
+{
+       if(!pVideoServiceHandle)
+       {
+               VideoLogInfo("[ERR] No exist pBundleData pointer or Service handle count value.");
+               return FALSE;
+       }
+
+       char *pStrVideoURI = (char*)malloc(sizeof(char) * STR_LEN_MAX);
+       char *pGetOperation = (char*)malloc(sizeof(char) * SVC_LEN_MAX);
+
+       service_get_operation(pVideoServiceHandle, &pGetOperation);
+       if(!strcmp(SERVICE_OPERATION_VIEW , pGetOperation))
+       {
+               service_get_uri(pVideoServiceHandle, &pStrVideoURI);
+               if(strlen(pStrVideoURI) > 1)
+               {
+                       strncpy(szMediaUri, pStrVideoURI, STR_LEN_MAX - 1);
+               }
+               else
+               {
+                       VideoLogInfo("[ERR] No exist video/streaming URI.");
+                       return FALSE;
+               }
+       }
+       else
+       {
+               VideoLogInfo("[ERR] No exist Operation.");
+               return FALSE;
+       }
+
+       VideoLogInfo("Video/Streaming URI path pStrVideoURI : %s", pStrVideoURI);
+       VideoLogInfo("Video/Streaming URI path pAppData->szMediaUri : %s", szMediaUri);
+
+       free(pStrVideoURI);
+       free(pGetOperation);
+
+       return TRUE;
+}
+
+bool MpVideoServiceCtrlIsXMLUrl(char *szMediaUri)
+{
+       VideoLogInfo("URI : %s", szMediaUri);
+
+       if (!g_str_has_suffix(szMediaUri, ".xml")) {
+               VideoLogInfo("No have xml uri.");
+               return FALSE;
+       }
+
+       return TRUE;
+}
+
+bool MpVideoServiceCtrlGetUri(service_h pVideoServiceHandle, char* szMediaUri)
+{
+       VideoLogInfo("");
+
+       if(!MpVideoServiceCtrlCheckMime(pVideoServiceHandle, szMediaUri))
+       {
+               if(!MpVideoServiceCtrlCheckBundle(pVideoServiceHandle, szMediaUri))
+               {
+                       if(!MpVideoServiceCtrlCheckAUL(pVideoServiceHandle, szMediaUri))
+                       {
+                               VideoLogInfo("No exist URI path.");
+                               return FALSE;
+                       }
+               }
+       }
+
+       VideoLogInfo("szMediaUri", szMediaUri);
+
+       return TRUE;
+}
+
+int MpVideoServiceCtrlVideoUriType(char* szMediaUri)
+{
+       if(szMediaUri == NULL)
+       {
+               VideoLogInfo("[ERR]");
+               return MP_ERROR_PLAYER_TYPE;
+       }
+
+       VideoLogInfo("");
+
+       int nRet = 0;
+
+       if(strlen(szMediaUri) > 0)
+       {
+               if(MpUtilCheckPlayerType(szMediaUri))
+               {
+                       VideoLogInfo("MP_STREAMING_PLAYER");
+                       nRet = MP_STREAMING_PLAYER;
+               }
+               else
+               {
+                       VideoLogInfo("MP_VIDEO_PLAYER");
+                       nRet = MP_VIDEO_PLAYER;
+               }
+       }
+       else
+       {
+               VideoLogInfo("[ERR] No exist video/streaming URI. : MP_ERROR_PLAYER_TYPE");
+               return MP_ERROR_PLAYER_TYPE;
+       }
+
+       VideoLogInfo("pAppData->szMediaUri : %s", szMediaUri);
+
+       return nRet;
+}
+
+bool MpVideoServiceCtrlCheckCookieForStreaming(service_h pVideoServiceHandle, char* szCookie)
+{
+       if(!pVideoServiceHandle)
+       {
+               VideoLogInfo("[ERR] No exist pBundleData pointer or Service handle count value.");
+               return FALSE;
+       }
+
+       if(!szCookie)
+       {
+               VideoLogInfo("[ERR] No allocate szCookie.");
+               return FALSE;
+       }
+
+       bool bRet = TRUE;
+       char *pStrVideoCookie = NULL;
+
+       if(service_get_extra_data(pVideoServiceHandle, MP_VIDEO_COOKIE, &pStrVideoCookie) != SERVICE_ERROR_NONE)
+       {
+               VideoLogInfo("[ERR] No exist KEY of streaming COOKIE.");
+               bRet = FALSE;
+       }
+
+       if(pStrVideoCookie)
+       {
+               strncpy(szCookie, pStrVideoCookie, STR_LEN_MAX - 1);
+               VideoLogInfo("Video/Streaming URI path Cookie : %s", szCookie);
+               free(pStrVideoCookie);
+               bRet = TRUE;
+       }
+       else
+       {
+               VideoLogInfo("[ERR] No exist video/streaming URI.");
+               bRet = FALSE;
+       }
+
+       return TRUE;
+}
+
+bool MpVideoServiceCtrlGetTagNameOfGallery(service_h pVideoServiceHandle, char *szBundleKey, char *szTagName)
+{
+       VideoLogInfo("");
+
+       if(!pVideoServiceHandle)
+       {
+               VideoLogInfo("No exist Service handle.");
+               return FALSE;
+       }
+
+       if(!szBundleKey)
+       {
+               VideoLogInfo("No exist Service handle kay.");
+               return FALSE;
+       }
+
+       if(!szTagName)
+       {
+               VideoLogInfo("No exist pAppData.");
+               return FALSE;
+       }
+
+       bool nRet = TRUE;
+       char *szVideoTagName = NULL;            //char *szVideoTagName = (char*)malloc(sizeof(char) * SVC_LEN_MAX);
+
+       if(service_get_extra_data(pVideoServiceHandle, szBundleKey, &szVideoTagName) != SERVICE_ERROR_NONE)
+       {
+               VideoLogInfo("No exist mime type.");
+               nRet = FALSE;
+       }
+
+       if(szVideoTagName)
+       {
+               strncpy(szTagName, szVideoTagName, STR_LEN_MAX - 1);
+               VideoLogInfo("szTagName : %s", szTagName);
+               free(szVideoTagName);
+               nRet = TRUE;
+       }
+       else
+       {
+               VideoLogInfo("No exist pointer of szVideoTagName.");
+               nRet = FALSE;
+       }
+
+       return nRet;
+}
+
+int MpVideoServiceCtrlCheckLauncher(service_h pVideoServiceHandle)
+{
+       VideoLogInfo("");
+
+       if(!pVideoServiceHandle)
+       {
+               VideoLogInfo("No exist Service handle data.");
+               return MP_VIDEO_PLAYER_SIMPLE;
+       }
+
+       char *szLaunchingByOtherApp = NULL;             //char *szLaunchingByOtherApp = (char*)malloc(sizeof(char) * SVC_LEN_MAX);
+
+       if(service_get_extra_data(pVideoServiceHandle, MP_VIDEO_LAUNCHED_BY_APP_KEY, &szLaunchingByOtherApp) != SERVICE_ERROR_NONE)
+       {
+               VideoLogInfo("No exist Service handle key of MP_VIDEO_LAUNCHED_BY_APP_KEY");
+               return MP_VIDEO_PLAYER_SIMPLE;
+       }
+
+       if(!szLaunchingByOtherApp)
+       {
+               VideoLogInfo("No exist pointer of szLaunchingByOtherApp");
+               return MP_VIDEO_PLAYER_SIMPLE;
+       }
+
+       MpPlayerViewType nTmpLaunchingAppType = MP_VIDEO_PLAYER_SIMPLE;
+
+       if(!strcmp(szLaunchingByOtherApp, "gallery"))
+       {
+               nTmpLaunchingAppType = MP_VIDEO_PLAYER_GALLERY;
+       }
+       else if(!strcmp(szLaunchingByOtherApp, "image_viewer"))
+       {
+                       nTmpLaunchingAppType = MP_VIDEO_PLAYER_GALLERY;
+               }
+       else if(!strcmp(szLaunchingByOtherApp, "email"))
+       {
+               nTmpLaunchingAppType = MP_VIDEO_PLAYER_EMAIL;
+       }
+       else if(!strcmp(szLaunchingByOtherApp, "message"))
+       {
+               nTmpLaunchingAppType = MP_VIDEO_PLAYER_MMS;
+       }
+       else if(!strcmp(szLaunchingByOtherApp, "light_play_view"))
+       {
+               nTmpLaunchingAppType = MP_VIDEO_PLAYER_SIMPLE;
+       }
+       else
+       {
+               nTmpLaunchingAppType = MP_VIDEO_PLAYER_SIMPLE;
+       }
+
+       VideoLogInfo("Start position time : %d", nTmpLaunchingAppType);
+
+       free(szLaunchingByOtherApp);
+
+       return (int)nTmpLaunchingAppType;
+}
+
+
+
+/////////////////////////////////////////////////////////////////////////////
+// External Function
+
+void MpVideoServiceCtrlReset(void)
+{
+       VideoLogInfo("");
+
+       pAppSvcHandle = NULL;
+
+       memset(szStreamingCookie, 0, STR_LEN_MAX);
+}
+
+int MpVideoServiceCtrlInitServiceParser(void* pAppServiceHandle, char* szMediaUri)
+{
+       if(!pAppServiceHandle)
+       {
+               VideoLogInfo("");
+               return MP_ERROR_PLAYER_TYPE;
+       }
+
+       VideoLogInfo("");
+
+       MpVideoServiceCtrlReset();
+
+       pAppSvcHandle = (service_h)pAppServiceHandle;
+
+       if(!MpVideoServiceCtrlGetUri(pAppSvcHandle, szMediaUri))
+       {
+               VideoLogInfo("MP_ERROR_PLAYER_TYPE");
+               nPlayerType = MP_ERROR_PLAYER_TYPE;
+               return nPlayerType;
+       }
+
+       if(MpUtilIsXMLUrl(szMediaUri))
+       {
+               if(!MpUtilParsingXML(szMediaUri))
+               {
+                       VideoLogInfo("[ERR] Fail to get streaming URI path from XML.");
+                       nPlayerType = MP_ERROR_PLAYER_TYPE;
+                       return nPlayerType;
+               }
+
+               VideoLogInfo("MP_STREAMING_PLAYER");
+               nPlayerType = MP_STREAMING_PLAYER;
+               return nPlayerType;
+       }
+
+       if(strlen(szMediaUri) > 0)
+       {
+               int nResultPlayerType = 0;
+
+               nResultPlayerType = MpVideoServiceCtrlVideoUriType(szMediaUri);
+
+               if(nResultPlayerType == MP_ERROR_PLAYER_TYPE)
+               {
+                       VideoLogInfo("MP_ERROR_PLAYER_TYPE");
+                       nPlayerType = MP_ERROR_PLAYER_TYPE;
+               }
+               else if(nResultPlayerType == MP_VIDEO_PLAYER)
+               {
+                       nPlayerType = MpVideoServiceCtrlCheckLauncher(pAppSvcHandle);
+               }
+               else if(nResultPlayerType == MP_STREAMING_PLAYER)
+               {
+                       nPlayerType = MP_STREAMING_PLAYER;
+                       MpVideoServiceCtrlCheckCookieForStreaming(pAppSvcHandle, szStreamingCookie);
+               }
+               else
+               {
+               }
+       }
+
+       return nPlayerType;
+}
+
+int MpVideoServiceCtrlGetPlayerTypeWithoutLog(void)
+{
+       if(MP_ERROR_PLAYER_TYPE > nPlayerType || MP_MAX_PLAYER_TYPE < nPlayerType)
+       {
+               nPlayerType = MP_ERROR_PLAYER_TYPE;
+       }
+
+       return nPlayerType;
+}
+
+int MpVideoServiceCtrlGetPlayerType(void)
+{
+       VideoLogInfo("");
+
+       if(MP_ERROR_PLAYER_TYPE > nPlayerType || MP_MAX_PLAYER_TYPE < nPlayerType)
+       {
+               nPlayerType = MP_ERROR_PLAYER_TYPE;
+       }
+
+       VideoLogInfo("nPlayerType : %d", nPlayerType);
+
+       return nPlayerType;
+}
+
+void MpVideoServiceCtrlSetPlayerType(int nSetPlayerType)
+{
+       VideoLogInfo("nSetPlayerType : %d", nSetPlayerType);
+
+       if(MP_ERROR_PLAYER_TYPE < nSetPlayerType || MP_MAX_PLAYER_TYPE > nSetPlayerType)
+       {
+               nPlayerType = nSetPlayerType;
+       }
+}
+
+char* MpVideoServiceCtrlGetCookieForStreaming(void)
+{
+       VideoLogInfo("");
+
+       if(strlen(szStreamingCookie) < 1)
+       {
+               VideoLogInfo("No exist streaming cookie.");
+       }
+
+       return szStreamingCookie;
+}
\ No newline at end of file
diff --git a/src/mp-video-sound-path-ctrl.c b/src/mp-video-sound-path-ctrl.c
new file mode 100644 (file)
index 0000000..3cb3856
--- /dev/null
@@ -0,0 +1,381 @@
+/*
+ * 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 [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
+ * 
+ *    Licensed under the Flora License, Version 1.0 (the "License");
+ *    you may not use this file except in compliance with the License.
+ *    You may obtain a copy of the License at
+ * 
+ *        http://www.tizenopensource.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.
+ */
+
+#include <app.h>
+#include <player.h>
+#include <sound_manager.h>
+#include <Ecore_Evas.h>
+#include <Elementary.h>
+
+#include "mp-util.h"
+#include "mp-video-log.h"
+#include "video-player.h"
+#include "mp-video-type-define.h"
+#include "mp-video-value-define.h"
+#include "mp-video-string-define.h"
+#include "mp-video-sound-path-ctrl.h"
+
+#define MP_VIDEO_SOUND_PATH_NUM                        10
+#define MP_VIDEO_SOUND_PATH_SPEAKER            "Speaker"
+#define MP_VIDEO_SOUND_PATH_EARJACK            "Headphones"
+
+static Evas_Object *pVideoSoundPathPopUpHandle = NULL;
+//static Evas_Object *pVideoSoundPathpPopupWindow = NULL;
+static Evas_Object *pGroupRadio = NULL;
+static Evas_Object *pGenList = NULL;
+
+static char szSoundPathItems[MP_VIDEO_SOUND_PATH_NUM][STR_LEN_MAX];
+static bool bIsConnectBluetooth = FALSE;
+static bool bIsConnectEarjack = FALSE;
+
+void MpVideoSoundpathDeleteRadioButton(void)
+{
+       VideoLogInfo("");
+
+       if (pGroupRadio) {
+               evas_object_del(pGroupRadio);
+               pGroupRadio = NULL;
+       }
+}
+
+void MpVideoSoundpathDeletePopupHandle(void)
+{
+       VideoLogInfo("");
+
+       int nCount = 0;
+
+       for (nCount = 0; nCount < MP_VIDEO_SOUND_PATH_NUM; nCount++) {
+               memset(&szSoundPathItems[nCount][0], 0,
+                      sizeof(char) * STR_LEN_MAX);
+       }
+
+       MpVideoSoundpathDeleteRadioButton();
+
+       if (pGenList) {
+               evas_object_del(pGenList);
+               pGenList = NULL;
+       }
+
+       if (pVideoSoundPathPopUpHandle) {
+               evas_object_del(pVideoSoundPathPopUpHandle);
+               pVideoSoundPathPopUpHandle = NULL;
+       }
+
+       MpUtilSetAlphaOfMainWindow(TRUE);
+}
+
+static char *MpVideoSoundpathGetLabelOfGenlistItemCb(const void *pUserData, Evas_Object *pObject, const char *pPart)
+{
+       VideoLogInfo("");
+
+       int nIndex = (int)pUserData;
+
+       if (!strcmp(pPart, "elm.text")) {
+               VideoLogInfo("Index : %d", nIndex);
+               return strdup(&szSoundPathItems[nIndex][0]);
+       }
+
+       return NULL;
+}
+
+static Evas_Object *MpVideoSoundpathGetIconOfGenlistItemCb(const void *pUserData, Evas_Object *pObject, const char *pPart)
+{
+       VideoLogInfo("");
+
+       int nIndex = (int)pUserData;
+       Evas_Object *pTmpRadio = NULL;
+
+       if (!strcmp(pPart, "elm.icon")) {
+               VideoLogInfo("Index : %d", nIndex);
+               pTmpRadio = elm_radio_add(pObject);
+               elm_radio_state_value_set(pTmpRadio, nIndex);
+               evas_object_show(pTmpRadio);
+               elm_radio_group_add(pTmpRadio, pGroupRadio);
+       }
+
+       return pTmpRadio;
+}
+
+static void MpVideoSoundpathSelectSoundPathItemCb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+{
+       if (pUserData == NULL) {
+               VideoLogInfo("[ERR]No have pUserData");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       int nIndex = 0;
+       Elm_Object_Item *pItem = (Elm_Object_Item *) pEventInfo;
+
+       if (pItem) {
+               nIndex = (int)elm_object_item_data_get(pItem);
+               VideoLogInfo("Select sound path : %s", szSoundPathItems[nIndex]);
+
+               if(!strcmp(szSoundPathItems[nIndex], MP_VIDEO_SOUND_PATH_SPEAKER))
+               {
+                       int nRet = 0;
+
+                       nRet = sound_manager_set_active_route(SOUND_ROUTE_OUT_SPEAKER);
+
+                       elm_radio_value_set(pGroupRadio, MP_SOUND_PATH_SPEAKER);
+               } else if (!strcmp(szSoundPathItems[nIndex], MP_VIDEO_SOUND_PATH_EARJACK)) {
+                       int nRet = sound_manager_set_active_route(SOUND_ROUTE_OUT_WIRED_ACCESSORY);
+                       if (nRet != SOUND_MANAGER_ERROR_NONE) {
+                               VideoLogInfo("[ERR] set_system_policy(0x%x)", nRet);
+                       } else {
+                               elm_radio_value_set(pGroupRadio, MP_SOUND_PATH_EARJACK);
+                       }
+               } else {
+                       int nRet = sound_manager_set_active_route(SOUND_ROUTE_OUT_BLUETOOTH);
+                       if (nRet != SOUND_MANAGER_ERROR_NONE) {
+                               VideoLogInfo("[ERR] set_system_policy(0x%x)", nRet);
+                       } else {
+                               elm_radio_value_set(pGroupRadio, MP_SOUND_PATH_BLUETOOTH);
+                       }
+               }
+       }
+
+       MpVideoSoundpathDeletePopupHandle();
+}
+
+static void MpVideoSoundpathPopupCb(void *pUserData, Evas_Object *pObject,
+                                   void *pEventInfo)
+{
+       VideoLogInfo("");
+
+       if (pUserData == NULL) {
+               VideoLogInfo("[ERR]No have pUserData");
+               return;
+       }
+
+       MpVideoSoundpathDeletePopupHandle();
+}
+
+static void MpVideoSoundpathCurrentState()
+{
+       VideoLogInfo("");
+
+       bool bBluetoothConnect = 0;
+       char *szBluetoothName = NULL;
+       bIsConnectEarjack = FALSE;
+       bIsConnectBluetooth = FALSE;
+
+       strncpy(&szSoundPathItems[MP_SOUND_PATH_SPEAKER][0], MP_VIDEO_SOUND_PATH_SPEAKER, STR_LEN_MAX - 1);
+
+       if (MpUtilIsConnectEarjack()) {
+               VideoLogInfo("Connect earjack.");
+               bIsConnectEarjack = TRUE;
+               strncpy(&szSoundPathItems[MP_SOUND_PATH_EARJACK][0], MP_VIDEO_SOUND_PATH_EARJACK, STR_LEN_MAX - 1);
+       } else {
+               VideoLogInfo("No connect earjack.");
+       }
+
+       if (SOUND_MANAGER_ERROR_NONE != sound_manager_get_a2dp_status(&bBluetoothConnect, &szBluetoothName)) {
+               VideoLogInfo("[ERR] Fail to check bluetooth stereo sound path.");
+       } else {
+               if (bBluetoothConnect) {
+                       VideoLogInfo("Connect szBluetoothName : %s", szBluetoothName);
+                       bIsConnectBluetooth = TRUE;
+                       strncpy(&szSoundPathItems[MP_SOUND_PATH_BLUETOOTH][0], szBluetoothName, STR_LEN_MAX - 1);
+                       if(szBluetoothName) {
+                               free(szBluetoothName);
+                               szBluetoothName = NULL;
+                       }
+               } else {
+                       szBluetoothName = NULL;
+                       VideoLogInfo("Unactivate Bluetooth stereo A2DP.");
+               }
+       }
+}
+
+void MpVideoSoundpathSetRadioButton(void)
+{
+       VideoLogInfo("");
+
+       sound_device_in_e in;
+       sound_device_out_e out;
+
+       sound_manager_get_active_device(&in, &out);
+
+       switch(out) {
+       case SOUND_DEVICE_OUT_SPEAKER:
+               elm_radio_value_set(pGroupRadio, MP_SOUND_PATH_SPEAKER);
+               break;
+
+       case SOUND_DEVICE_OUT_WIRED_ACCESSORY:
+               elm_radio_value_set(pGroupRadio, MP_SOUND_PATH_EARJACK);
+               break;
+
+       case SOUND_DEVICE_OUT_BT_A2DP:
+               elm_radio_value_set(pGroupRadio, MP_SOUND_PATH_BLUETOOTH);
+               break;
+
+       default:
+               elm_radio_value_set(pGroupRadio, MP_SOUND_PATH_SPEAKER);
+               break;
+       }
+}
+
+/*
+ * External function
+ */
+bool MpVideoSoundpathShow(void *pUserData)
+{
+       if (pUserData == NULL) {
+               VideoLogInfo("No have popup message or pAppData is null.");
+               return FALSE;
+       }
+
+       VideoLogInfo("");
+
+       MpVideoSoundpathIsConnectOtherSoundpath();
+
+       if (!bIsConnectBluetooth && !bIsConnectEarjack) {
+               VideoLogInfo("Soundpath is only speaker.");
+               return FALSE;
+       }
+
+       Evas_Object *pBox = NULL;
+       Evas_Object *pButton = NULL;
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       MpVideoSoundpathDeletePopupHandle();
+
+       MpUtilSetAlphaOfMainWindow(FALSE);
+
+       MpVideoSoundpathCurrentState();
+
+       pVideoSoundPathPopUpHandle = elm_popup_add(pAppData->pMainWindow);
+       elm_object_style_set(pVideoSoundPathPopUpHandle, "min_menustyle");
+       elm_object_part_text_set(pVideoSoundPathPopUpHandle, "title,text", MP_VIDEO_SOUND_PATH);
+       evas_object_size_hint_weight_set(pVideoSoundPathPopUpHandle, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+       pButton = elm_button_add(pVideoSoundPathPopUpHandle);
+       elm_object_style_set (pButton, "popup_button/default");
+       elm_object_text_set(pButton, dgettext(MP_SYS_STRING, MP_COM_BUTTON_CANCEL));
+       elm_object_part_content_set(pVideoSoundPathPopUpHandle, "button1", pButton);
+       evas_object_smart_callback_add(pButton, "clicked", MpVideoSoundpathPopupCb, (void*)pAppData);
+
+       /*  Set item of Genlist. */
+       Elm_Genlist_Item_Class *st_Itc = NULL;
+       st_Itc = elm_genlist_item_class_new();
+       st_Itc->item_style = "1text.1icon.3";
+       st_Itc->func.text_get = (void *)MpVideoSoundpathGetLabelOfGenlistItemCb;
+       st_Itc->func.content_get = (void *)MpVideoSoundpathGetIconOfGenlistItemCb;
+       st_Itc->func.state_get = NULL;
+       st_Itc->func.del = NULL;
+
+       /* Create genlist handle */
+       pGenList = elm_genlist_add(pVideoSoundPathPopUpHandle);
+       evas_object_size_hint_weight_set(pGenList, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_align_set(pGenList, EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+       pGroupRadio = elm_radio_add(pGenList);
+
+       if (bIsConnectBluetooth) {
+               elm_genlist_item_append(pGenList, st_Itc, (void *)MP_SOUND_PATH_BLUETOOTH, NULL,
+                                       ELM_GENLIST_ITEM_NONE,
+                                       MpVideoSoundpathSelectSoundPathItemCb,
+                                       pAppData);
+       }
+
+       if (bIsConnectEarjack) {
+               elm_genlist_item_append(pGenList, st_Itc, (void *)MP_SOUND_PATH_EARJACK, NULL,
+                                       ELM_GENLIST_ITEM_NONE,
+                                       MpVideoSoundpathSelectSoundPathItemCb,
+                                       pAppData);
+       }
+
+       elm_genlist_item_append(pGenList, st_Itc, (void *)MP_SOUND_PATH_SPEAKER, NULL,
+                                       ELM_GENLIST_ITEM_NONE,
+                                       MpVideoSoundpathSelectSoundPathItemCb,
+                                       pAppData);
+
+       elm_genlist_item_class_free(st_Itc);
+
+       MpVideoSoundpathSetRadioButton();
+
+       pBox = elm_box_add(pVideoSoundPathPopUpHandle);
+       if(bIsConnectBluetooth && bIsConnectEarjack)
+       {
+               evas_object_size_hint_min_set(pBox, 614 * elm_config_scale_get(), 338 * elm_config_scale_get());
+       }
+       else if(bIsConnectBluetooth || bIsConnectEarjack)
+       {
+               evas_object_size_hint_min_set(pBox, 614 * elm_config_scale_get(), 225 * elm_config_scale_get());
+       }
+       else
+       {
+               evas_object_size_hint_min_set(pBox, 614 * elm_config_scale_get(), 451 * elm_config_scale_get());
+       }
+
+       elm_box_pack_end(pBox, pGenList);
+       elm_object_content_set(pVideoSoundPathPopUpHandle, pBox);
+
+       evas_object_show(pGenList);
+       evas_object_show(pVideoSoundPathPopUpHandle);
+
+       return TRUE;
+}
+
+void MpVideoSoundpathHide(void)
+{
+       VideoLogInfo("");
+
+       MpVideoSoundpathDeletePopupHandle();
+}
+
+bool MpVideoSoundpathIsConnectOtherSoundpath(void)
+{
+       VideoLogInfo("");
+
+       bool bBluetoothConnect = 0;
+       char *szBluetoothName = NULL;
+
+       bIsConnectEarjack = FALSE;
+       bIsConnectBluetooth = FALSE;
+
+       if(MpUtilIsConnectEarjack())
+       {
+               VideoLogInfo("Connect earjack.");
+               bIsConnectEarjack= TRUE;
+               return TRUE;
+       }
+       sound_manager_get_a2dp_status(&bBluetoothConnect, &szBluetoothName);
+
+       if(bBluetoothConnect)
+       {
+               if(szBluetoothName) {
+                       free(szBluetoothName);
+                       szBluetoothName = NULL;
+               }
+
+               VideoLogInfo("Connect bluetooth.");
+               bIsConnectBluetooth = TRUE;
+               return TRUE;
+       }
+
+       if(szBluetoothName) {
+               free(szBluetoothName);
+               szBluetoothName = NULL;
+       }
+
+       VideoLogInfo("Only spaker.");
+       return FALSE;
+}
diff --git a/src/mp-video-streaming-ctrl.c b/src/mp-video-streaming-ctrl.c
new file mode 100755 (executable)
index 0000000..117b1cd
--- /dev/null
@@ -0,0 +1,813 @@
+/*
+ * 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 [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
+ * 
+ *    Licensed under the Flora License, Version 1.0 (the "License");
+ *    you may not use this file except in compliance with the License.
+ *    You may obtain a copy of the License at
+ * 
+ *        http://www.tizenopensource.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.
+ */
+
+
+#include <app.h>
+#include <vconf.h>
+#include <string.h>
+#include <vconf-keys.h>
+
+#include "mp-util.h"
+#include "mp-video-log.h"
+#include "video-player.h"
+#include "mp-video-type-define.h"
+#include "mp-video-string-define.h"
+#include "mp-video-streaming-ctrl.h"
+
+
+#define NETWORK_TIMEOUT                30.0
+
+static char szNetworkProxy[STR_LEN_MAX] = {0};
+static char szNetworkIpAddress[STR_LEN_MAX] = {0};
+static MpNetworkType nNetworkStatus = MP_NETWORK_TYPE_OFF;
+static MpNetworkWifiState nWifiState = MP_NETWORK_WIFI_OFF;
+static MpNetworkCellularState nCellularState = MP_NETWORK_CELLULAR_NO_SERVICE;
+
+static Ecore_Pipe      *pEcorePipeHandleForPause = NULL;
+static Ecore_Pipe      *pEcorePipeHandleForResume = NULL;
+
+static Eina_Bool       bIsInitCallbackFunc = FALSE;
+
+static Ecore_Timer     *pNetworkTimeoutTimer = NULL;
+
+
+
+/*
+ * Callback function.
+ */
+
+static void MpVideoStreamingCtrlExitCb(void *pUserData, Evas_Object *pObject,
+                                void *pEventInfo)
+{
+       if (!pUserData) {
+               VideoLogInfo("No exist pUserData");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlExit(pAppData);
+}
+
+static int MpVideoStreamingCtrlResumeCb(void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("No exist pUserData");
+               return 0;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       if (pNetworkTimeoutTimer) {
+               ecore_timer_del(pNetworkTimeoutTimer);
+               pNetworkTimeoutTimer = NULL;
+       }
+
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlStopByAppPause(pAppData);
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlStartByAppResume(pAppData);
+
+       return 0;
+}
+
+static Eina_Bool MpVideoStreamingCtrlPopupCb(void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("No exist pUserData");
+               return EINA_FALSE;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       if (pNetworkTimeoutTimer) {
+               ecore_timer_del(pNetworkTimeoutTimer);
+               pNetworkTimeoutTimer = NULL;
+       }
+
+       MpUtilNotifyPopUp(pAppData, _(MP_VPL_CONNECTION_FAIL), MpVideoStreamingCtrlExitCb);
+
+       return EINA_FALSE;
+}
+
+static int MpVideoStreamingCtrlPauseCb(void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("No exist pUserData");
+               return 0;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlStopByAppPause(pAppData);
+
+       if (pNetworkTimeoutTimer) {
+               ecore_timer_del(pNetworkTimeoutTimer);
+               pNetworkTimeoutTimer = NULL;
+       }
+
+       pNetworkTimeoutTimer = ecore_timer_add(NETWORK_TIMEOUT,
+                                               MpVideoStreamingCtrlPopupCb,
+                                               pAppData);
+
+       return 0;
+}
+
+
+static void MpVideoStreamingCtrlNetworkOnOffCb(keynode_t *pKeyNode,void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (!pUserData || !pKeyNode) {
+               VideoLogInfo("User data is NULL.");
+               return;
+       }
+
+       char *szkeyname = NULL;
+
+       szkeyname = vconf_keynode_get_name(pKeyNode);
+       if (!strcmp(szkeyname, VCONFKEY_NETWORK_CONFIGURATION_CHANGE_IND)) {
+                switch(vconf_keynode_get_int(pKeyNode))
+                {
+               case MP_NETWORK_CLOSE:
+                       VideoLogInfo("MP_NETWORK_CLOSE");
+                       break;
+
+               case MP_NETWORK_ON:
+                       VideoLogInfo("MP_NETWORK_ON");
+                       break;
+
+               default:
+                       VideoLogInfo("UNKNOWN NETWORK CONFIG");
+                       break;
+                }
+       } else {
+       }
+}
+
+static void MpVideoStreamingCtrlNetworkStatusCb(keynode_t *pKeyNode,void *pUserData)
+{
+       if (!pUserData || !pKeyNode) {
+               VideoLogInfo("User data is NULL.");
+               return;
+       }
+
+       VideoLogInfo("");
+       char *szkeyname = NULL;
+
+       szkeyname = vconf_keynode_get_name(pKeyNode);
+       if (!strcmp(szkeyname, VCONFKEY_NETWORK_STATUS)) {
+               switch(vconf_keynode_get_int(pKeyNode))
+               {
+               case VCONFKEY_NETWORK_OFF:
+                       nNetworkStatus = MP_NETWORK_TYPE_OFF;
+                       VideoLogInfo("MP_NETWORK_TYPE_OFF");
+                       if(pEcorePipeHandleForPause) {
+                               if(!ecore_pipe_write(pEcorePipeHandleForPause,
+                                               pUserData, sizeof(pUserData))) {
+                                       VideoLogDebug("FAIL PIPE WRITE");
+                               }
+                       }
+                       break;
+
+               case VCONFKEY_NETWORK_CELLULAR:
+                       VideoLogInfo("MP_NETWORK_TYPE_CELLULAR");
+                       if(pEcorePipeHandleForResume) {
+                               if(!ecore_pipe_write(pEcorePipeHandleForResume,
+                                               pUserData, sizeof(pUserData))) {
+                                       VideoLogDebug("FAIL PIPE WRITE");
+                               }
+                       }
+                       nNetworkStatus = MP_NETWORK_TYPE_CELLULAR;
+                       break;
+
+               case VCONFKEY_NETWORK_WIFI:
+                       VideoLogInfo("MP_NETWORK_TYPE_WIFI");
+                       if(pEcorePipeHandleForResume) {
+                               if(!ecore_pipe_write(pEcorePipeHandleForResume,
+                                               pUserData, sizeof(pUserData))) {
+                                       VideoLogDebug("FAIL PIPE WRITE");
+                               }
+                       }
+                       nNetworkStatus = MP_NETWORK_TYPE_WIFI;
+                       break;
+
+               default:
+                       nNetworkStatus = MP_NETWORK_TYPE_OFF;
+                       VideoLogInfo("UNKNOWN NETWORK STATE");
+                       if(pEcorePipeHandleForPause) {
+                               if(!ecore_pipe_write(pEcorePipeHandleForPause,
+                                               pUserData, sizeof(pUserData))) {
+                                       VideoLogDebug("FAIL PIPE WRITE");
+                               }
+                       }
+                       break;
+               }
+       }
+       else {
+               if(pEcorePipeHandleForPause) {
+                       if(!ecore_pipe_write(pEcorePipeHandleForPause,
+                                       pUserData, sizeof(pUserData))) {
+                               VideoLogDebug("FAIL PIPE WRITE");
+                       }
+               }
+       }
+}
+
+static void MpVideoStreamingCtrlChangeIpCb(keynode_t *pKeyNode, void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (!pUserData || !pKeyNode) {
+               VideoLogInfo("User data is NULL.");
+               return;
+       }
+
+       char *szkeyname = NULL;
+       char *szTmp = NULL;
+
+       memset(szNetworkIpAddress, 0, sizeof(char) * STR_LEN_MAX);
+       szkeyname = vconf_keynode_get_name(pKeyNode);
+       if(szkeyname == NULL) {
+               VideoLogInfo("key name value is NULL");
+               return;
+       }
+
+       if (!strcmp(szkeyname, VCONFKEY_NETWORK_IP)) {
+               szTmp = vconf_keynode_get_str(pKeyNode);
+
+               if(szTmp == NULL) {
+                       VideoLogInfo("node string value is NULL");
+                       return;
+               }
+
+               strncpy(szNetworkIpAddress, szTmp, STR_LEN_MAX - 1);
+
+               VideoLogInfo("Network ip address : %s", szNetworkIpAddress);
+       }
+       else {
+               VideoLogInfo("Invalid ip address.");
+       }
+}
+
+static void MpVideoStreamingCtrlWiFiStateCb(keynode_t *pKeyNode, void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (!pUserData || !pKeyNode) {
+               VideoLogInfo("User data is NULL.");
+               return;
+       }
+
+       char *szkeyname = NULL;
+
+       szkeyname = vconf_keynode_get_name(pKeyNode);
+       if (!strcmp(szkeyname, VCONFKEY_NETWORK_WIFI_STATE)) {
+                switch(vconf_keynode_get_int(pKeyNode))
+                {
+               case VCONFKEY_NETWORK_WIFI_OFF:
+                       nWifiState = MP_NETWORK_WIFI_OFF;
+                       VideoLogInfo("MP_NETWORK_WIFI_OFF");
+                       break;
+
+               case VCONFKEY_NETWORK_WIFI_NOT_CONNECTED:
+                       nWifiState = MP_NETWORK_WIFI_NOT_CONNECTED;
+                       VideoLogInfo("MP_NETWORK_WIFI_NOT_CONNECTED");
+                       break;
+
+               case VCONFKEY_NETWORK_WIFI_CONNECTED:
+                       nWifiState = MP_NETWORK_WIFI_CONNECTED;
+                       VideoLogInfo("MP_NETWORK_WIFI_CONNECTED");
+                       break;
+
+               default:
+                       nWifiState = MP_NETWORK_WIFI_OFF;
+                       VideoLogInfo("MP_NETWORK_WIFI_OFF - default");
+                       break;
+                }
+       } else {
+               nWifiState = MP_NETWORK_WIFI_OFF;
+               VideoLogInfo("MP_NETWORK_WIFI_OFF - invalid value");
+       }
+}
+
+static void MpVideoStreamingCtrlCellularStateCb(keynode_t *pKeyNode,void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (!pUserData || !pKeyNode) {
+               VideoLogInfo("User data is NULL.");
+               return;
+       }
+
+       char *szkeyname = NULL;
+
+       szkeyname = vconf_keynode_get_name(pKeyNode);
+       if (!strcmp(szkeyname, VCONFKEY_NETWORK_CELLULAR_STATE)) {
+                switch(vconf_keynode_get_int(pKeyNode))
+                {
+               case VCONFKEY_NETWORK_CELLULAR_ON:
+                       nCellularState = MP_NETWORK_CELLULAR_ON;
+                       VideoLogInfo("MP_NETWORK_CELLULAR_ON");
+                       break;
+
+               case VCONFKEY_NETWORK_CELLULAR_3G_OPTION_OFF:
+                       nCellularState = MP_NETWORK_CELLULAR_3G_OPTION_OFF;
+                       VideoLogInfo("MP_NETWORK_CELLULAR_3G_OPTION_OFF");
+                       break;
+
+               case VCONFKEY_NETWORK_CELLULAR_ROAMING_OFF:
+                       nCellularState = MP_NETWORK_CELLULAR_ROAMING_OFF;
+                       VideoLogInfo("MP_NETWORK_CELLULAR_ROAMING_OFF");
+                       break;
+
+               case VCONFKEY_NETWORK_CELLULAR_FLIGHT_MODE:
+                       nCellularState = MP_NETWORK_CELLULAR_FLIGHT_MODE;
+                       VideoLogInfo("MP_NETWORK_CELLULAR_FLIGHT_MODE");
+                       break;
+
+               case VCONFKEY_NETWORK_CELLULAR_NO_SERVICE :
+                       nCellularState = MP_NETWORK_CELLULAR_NO_SERVICE;
+                       VideoLogInfo("MP_NETWORK_CELLULAR_NO_SERVICE");
+                       break;
+
+               default:
+                       nCellularState = MP_NETWORK_CELLULAR_NO_SERVICE;
+                       VideoLogInfo("MP_NETWORK_CELLULAR_NO_SERVICE - default");
+                       break;
+                }
+       } else {
+               nCellularState = MP_NETWORK_CELLULAR_NO_SERVICE;
+               VideoLogInfo("MP_NETWORK_CELLULAR_NO_SERVICE - invalid value");
+       }
+}
+
+static void MpVideoStreamingCtrlPipeInit(void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("No exist pUserData");
+               return;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       if(pEcorePipeHandleForPause) {
+               ecore_pipe_del(pEcorePipeHandleForPause);
+               pEcorePipeHandleForPause = NULL;
+       }
+
+       pEcorePipeHandleForPause = ecore_pipe_add(
+                       (Ecore_Pipe_Cb)MpVideoStreamingCtrlPauseCb,
+                       (void *)pAppData);
+
+       if(pEcorePipeHandleForResume) {
+               ecore_pipe_del(pEcorePipeHandleForResume);
+               pEcorePipeHandleForResume = NULL;
+       }
+
+       pEcorePipeHandleForResume = ecore_pipe_add(
+                       (Ecore_Pipe_Cb)MpVideoStreamingCtrlResumeCb,
+                       (void *)pAppData);
+
+}
+
+/*
+ * Internal function.
+ */
+
+bool MpVideoStreamingCtrlSetNotifyNetworkOnOff(void *pUserData)
+{
+       if (!pUserData) {
+               VideoLogInfo("[ERR] No exist pUserData.");
+               return FALSE;
+       }
+
+       VideoLogInfo("");
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       int nRet = 0;
+
+       nRet = vconf_notify_key_changed(VCONFKEY_NETWORK_CONFIGURATION_CHANGE_IND,
+                                       MpVideoStreamingCtrlNetworkOnOffCb,
+                                       (void*)pAppData);
+
+       if (nRet < 0) {
+               VideoLogInfo("[ERR] Fail to set network on/off notification.");
+               return FALSE;
+       }
+
+       return TRUE;
+}
+
+bool MpVideoStreamingCtrlSetNotifyNetworkStatus(void *pUserData)
+{
+       if (!pUserData) {
+               VideoLogInfo("[ERR] No exist pUserData.");
+               return FALSE;
+       }
+
+       VideoLogInfo("");
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       int nRet = 0;
+
+       nRet = vconf_notify_key_changed(VCONFKEY_NETWORK_STATUS,
+                                                                       MpVideoStreamingCtrlNetworkStatusCb,
+                                                                       (void*)pAppData);
+
+       if (nRet < 0) {
+               VideoLogInfo("[ERR] Fail to set network status notification.");
+               return FALSE;
+       }
+
+       return TRUE;
+}
+
+bool MpVideoStreamingCtrlSetNotifyChangingIp(void *pUserData)
+{
+       if (!pUserData) {
+               VideoLogInfo("[ERR] No exist pUserData.");
+               return FALSE;
+       }
+
+       VideoLogInfo("");
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       int nRet = 0;
+
+       nRet = vconf_notify_key_changed(VCONFKEY_NETWORK_IP,
+                                                                       MpVideoStreamingCtrlChangeIpCb,
+                                                                       (void*)pAppData);
+
+       if (nRet < 0) {
+               VideoLogInfo("[ERR] Fail to set ip address changing notification.");
+               return FALSE;
+       }
+
+       return TRUE;
+}
+
+bool MpVideoStreamingCtrlSetNotifyWiFiState(void *pUserData)
+{
+       if (!pUserData) {
+               VideoLogInfo("[ERR] No exist pUserData.");
+               return FALSE;
+       }
+
+       VideoLogInfo("");
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       int nRet = 0;
+
+       nRet = vconf_notify_key_changed(VCONFKEY_NETWORK_WIFI_STATE,
+                                                                       MpVideoStreamingCtrlWiFiStateCb,
+                                                                       (void*)pAppData);
+
+       if (nRet < 0) {
+               VideoLogInfo("[ERR] Fail to set wifi state notification.");
+               return FALSE;
+       }
+
+       return TRUE;
+}
+
+bool MpVideoStreamingCtrlSetNotifyCellularState(void *pUserData)
+{
+       if (!pUserData) {
+               VideoLogInfo("[ERR] No exist pUserData.");
+               return FALSE;
+       }
+
+       VideoLogInfo("");
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       int nRet = 0;
+
+       nRet = vconf_notify_key_changed(VCONFKEY_NETWORK_CELLULAR_STATE,
+                                                                       MpVideoStreamingCtrlCellularStateCb,
+                                                                       (void*)pAppData);
+
+       if (nRet < 0) {
+               VideoLogInfo("[ERR] Fail to set cellular notification.");
+               return FALSE;
+       }
+
+       return TRUE;
+}
+
+
+/*
+ * External function.
+ */
+bool MpVideoStreamingCtrlGetIpAddress(char* szRetIpAddress)
+{
+       VideoLogInfo("");
+
+       char *szTmp = NULL;
+
+       szTmp = vconf_get_str(VCONFKEY_NETWORK_IP);
+       if (szTmp) {
+               memset(szNetworkIpAddress, 0, sizeof(char) * STR_LEN_MAX);
+               strncpy(szNetworkIpAddress, szTmp, STR_LEN_MAX - 1);
+
+               memset(szRetIpAddress, 0, sizeof(char) * STR_LEN_MAX);
+               strncpy(szRetIpAddress, szTmp, STR_LEN_MAX - 1);
+
+               VideoLogInfo("Current network ip address : %s", szNetworkIpAddress);
+
+               if(szTmp)
+                       free(szTmp);
+
+               return TRUE;
+       }
+
+       return FALSE;
+}
+
+bool MpVideoStreamingCtrlGetProxy(char* szRetProxy)
+{
+       VideoLogInfo("");
+
+       char *szTmp = NULL;
+
+       szTmp = vconf_get_str(VCONFKEY_NETWORK_PROXY);
+       if (szTmp) {
+               memset(szNetworkProxy, 0, sizeof(char) * STR_LEN_MAX);
+               strncpy(szNetworkProxy, szTmp, STR_LEN_MAX - 1);
+
+               memset(szRetProxy, 0, sizeof(char) * STR_LEN_MAX);
+               strncpy(szRetProxy, szTmp, STR_LEN_MAX - 1);
+
+               VideoLogInfo("Current network ip address : %s", szNetworkProxy);
+
+               if(szTmp)
+                       free(szTmp);
+
+               return TRUE;
+       }
+
+       return FALSE;
+}
+
+bool MpVideoStreamingCtrlIsNetworkOn(void)
+{
+       VideoLogInfo("");
+
+       int ntmpCheckNetworkON = 0;
+
+       if (!vconf_get_int(VCONFKEY_NETWORK_CONFIGURATION_CHANGE_IND, &ntmpCheckNetworkON)) {
+               switch(ntmpCheckNetworkON)
+               {
+               case MP_NETWORK_CLOSE:
+                       VideoLogInfo("Network close.");
+                       return FALSE;
+
+               case MP_NETWORK_ON:
+                       VideoLogInfo("Network on.");
+                       return TRUE;
+               }
+       } else {
+               VideoLogInfo("Network close.");
+       }
+
+       return FALSE;
+}
+
+int MpVideoStreamingCtrlGetNetworkStatus(void)
+{
+       VideoLogInfo("");
+
+       int ntmpGetNetworkStatus = 0;
+
+       if (!vconf_get_int(VCONFKEY_NETWORK_STATUS, &ntmpGetNetworkStatus)) {
+               switch(ntmpGetNetworkStatus)
+               {
+               case VCONFKEY_NETWORK_OFF:
+                       nNetworkStatus = MP_NETWORK_TYPE_OFF;
+                       VideoLogInfo("MP_NETWORK_TYPE_OFF");
+                       break;
+
+               case VCONFKEY_NETWORK_CELLULAR:
+                       nNetworkStatus = MP_NETWORK_TYPE_CELLULAR;
+                       VideoLogInfo("MP_NETWORK_TYPE_CELLULAR");
+                       break;
+
+               case VCONFKEY_NETWORK_WIFI:
+                       nNetworkStatus = MP_NETWORK_TYPE_WIFI;
+                       VideoLogInfo("MP_NETWORK_TYPE_WIFI");
+                       break;
+
+               default:
+                       nNetworkStatus = MP_NETWORK_TYPE_OFF;
+                       VideoLogInfo("MP_NETWORK_TYPE_OFF - default");
+                       break;
+               }
+       } else {
+               nNetworkStatus = MP_NETWORK_TYPE_OFF;
+               VideoLogInfo("MP_NETWORK_TYPE_OFF - invalid value");
+       }
+
+       return nNetworkStatus;
+}
+
+int MpVideoStreamingCtrlGetWifiState()
+{
+       VideoLogInfo("");
+
+       int ntmpGetWifiState = 0;
+
+       if (!vconf_get_int(VCONFKEY_NETWORK_WIFI_STATE, &ntmpGetWifiState)) {
+               switch(ntmpGetWifiState)
+               {
+               case VCONFKEY_NETWORK_WIFI_OFF:
+                       nWifiState = MP_NETWORK_WIFI_OFF;
+                       VideoLogInfo("MP_NETWORK_WIFI_OFF");
+                       break;
+
+               case VCONFKEY_NETWORK_WIFI_NOT_CONNECTED:
+                       nWifiState = MP_NETWORK_WIFI_NOT_CONNECTED;
+                       VideoLogInfo("MP_NETWORK_WIFI_NOT_CONNECTED");
+                       break;
+
+               case VCONFKEY_NETWORK_WIFI_CONNECTED:
+                       nWifiState = MP_NETWORK_WIFI_CONNECTED;
+                       VideoLogInfo("MP_NETWORK_WIFI_CONNECTED");
+                       break;
+
+               default:
+                       nWifiState = MP_NETWORK_WIFI_OFF;
+                       VideoLogInfo("MP_NETWORK_WIFI_OFF - default");
+                       break;
+                }
+       } else {
+               nWifiState = MP_NETWORK_WIFI_OFF;
+               VideoLogInfo("MP_NETWORK_WIFI_OFF - invalid value");
+       }
+
+       return nWifiState;
+
+}
+
+int MpVideoStreamingCtrlGetCellularState()
+{
+       VideoLogInfo("");
+
+       int ntmpGetCellularState = 0;
+
+       if (!vconf_get_int(VCONFKEY_NETWORK_CELLULAR_STATE, &ntmpGetCellularState)) {
+               switch(ntmpGetCellularState)
+               {
+               case VCONFKEY_NETWORK_CELLULAR_ON:
+                       nCellularState = MP_NETWORK_CELLULAR_ON;
+                       VideoLogInfo("MP_NETWORK_CELLULAR_ON");
+                       break;
+
+               case VCONFKEY_NETWORK_CELLULAR_3G_OPTION_OFF:
+                       nCellularState = MP_NETWORK_CELLULAR_3G_OPTION_OFF;
+                       VideoLogInfo("MP_NETWORK_CELLULAR_3G_OPTION_OFF");
+                       break;
+
+               case VCONFKEY_NETWORK_CELLULAR_ROAMING_OFF:
+                       nCellularState = MP_NETWORK_CELLULAR_ROAMING_OFF;
+                       VideoLogInfo("MP_NETWORK_CELLULAR_ROAMING_OFF");
+                       break;
+
+               case VCONFKEY_NETWORK_CELLULAR_FLIGHT_MODE:
+                       nCellularState = MP_NETWORK_CELLULAR_FLIGHT_MODE;
+                       VideoLogInfo("MP_NETWORK_CELLULAR_FLIGHT_MODE");
+                       break;
+
+               case VCONFKEY_NETWORK_CELLULAR_NO_SERVICE :
+                       nCellularState = MP_NETWORK_CELLULAR_NO_SERVICE;
+                       VideoLogInfo("MP_NETWORK_CELLULAR_NO_SERVICE");
+                       break;
+
+               default:
+                       nCellularState = MP_NETWORK_CELLULAR_NO_SERVICE;
+                       VideoLogInfo("MP_NETWORK_CELLULAR_NO_SERVICE - default");
+                       break;
+               }
+       } else {
+               nCellularState = MP_NETWORK_CELLULAR_NO_SERVICE;
+               VideoLogInfo("MP_NETWORK_CELLULAR_NO_SERVICE - invalid value");
+       }
+
+       return nCellularState;
+}
+
+void MpVideoStreamingCtrlDestroy(void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (pNetworkTimeoutTimer) {
+               ecore_timer_del(pNetworkTimeoutTimer);
+               pNetworkTimeoutTimer = NULL;
+       }
+
+       if(pEcorePipeHandleForPause) {
+               ecore_pipe_del(pEcorePipeHandleForPause);
+               pEcorePipeHandleForPause = NULL;
+       }
+
+       if(pEcorePipeHandleForResume) {
+               ecore_pipe_del(pEcorePipeHandleForResume);
+               pEcorePipeHandleForResume = NULL;
+       }
+}
+
+
+
+bool MpVideoStreamingCtrlInit(void *pUserData)
+{
+       if (!pUserData) {
+               VideoLogInfo("[ERR] No exist pUserData.");
+               return FALSE;
+       }
+
+       VideoLogInfo("");
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+       char szTmp[STR_LEN_MAX] = {0};
+       bool bNetworkState = FALSE;
+       
+       if(bIsInitCallbackFunc == EINA_FALSE) {
+               MpVideoStreamingCtrlPipeInit(pUserData);
+
+               MpVideoStreamingCtrlSetNotifyNetworkStatus(pUserData);
+               MpVideoStreamingCtrlSetNotifyChangingIp(pUserData);
+               MpVideoStreamingCtrlSetNotifyWiFiState(pUserData);
+               MpVideoStreamingCtrlSetNotifyCellularState(pUserData);
+
+               bIsInitCallbackFunc = EINA_TRUE;
+       }
+
+       if (pNetworkTimeoutTimer) {
+               ecore_timer_del(pNetworkTimeoutTimer);
+               pNetworkTimeoutTimer = NULL;
+       }
+
+       switch(MpVideoStreamingCtrlGetNetworkStatus())
+       {
+       case MP_NETWORK_TYPE_OFF:
+               VideoLogInfo("MP_NETWORK_TYPE_OFF");
+               pNetworkTimeoutTimer = ecore_timer_add(NETWORK_TIMEOUT,
+                                               MpVideoStreamingCtrlPopupCb,
+                                               pAppData);
+               bNetworkState = FALSE;
+               break;
+
+       case MP_NETWORK_TYPE_CELLULAR:
+               VideoLogInfo("MP_NETWORK_TYPE_CELLULAR");
+               if(MpVideoStreamingCtrlGetCellularState() == MP_NETWORK_CELLULAR_ON)
+                       bNetworkState = TRUE;
+               break;
+
+       case MP_NETWORK_TYPE_WIFI:
+               VideoLogInfo("MP_NETWORK_TYPE_WIFI");
+               if(MpVideoStreamingCtrlGetWifiState() == MP_NETWORK_WIFI_CONNECTED)
+                       bNetworkState = TRUE;
+               break;
+       }
+
+       if(bNetworkState) {
+               MpVideoStreamingCtrlGetIpAddress(szTmp);
+               VideoLogInfo("Current IP Address : %s", szTmp);
+
+               memset(szTmp, 0, STR_LEN_MAX);
+               MpVideoStreamingCtrlGetProxy(szTmp);
+               VideoLogInfo("Current Proxy Address : %s", szTmp);
+
+               memset(pAppData->szProxyAddress, 0, STR_LEN_MAX);
+               strncpy(pAppData->szProxyAddress, szTmp, STR_LEN_MAX - 1);
+       }
+
+       return bNetworkState;
+}
diff --git a/src/mp-video-streaming-view.c b/src/mp-video-streaming-view.c
new file mode 100644 (file)
index 0000000..3857621
--- /dev/null
@@ -0,0 +1,679 @@
+/*
+ * 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 [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
+ * 
+ *    Licensed under the Flora License, Version 1.0 (the "License");
+ *    you may not use this file except in compliance with the License.
+ *    You may obtain a copy of the License at
+ * 
+ *        http://www.tizenopensource.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.
+ */
+
+
+#include <aul.h>
+#include <ctype.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <sys/stat.h>
+#include <syspopup_caller.h>
+
+#include "mp-util.h"
+#include "mp-video-log.h"
+#include "video-player.h"
+#include "mp-video-type-define.h"
+#include "mp-video-value-define.h"
+#include "mp-video-string-define.h"
+#include "mp-video-progressbar.h"
+#include "mp-video-animation-ctrl.h"
+#include "mp-video-streaming-view.h"
+#include "mp-video-sound-path-ctrl.h"
+#include "mp-video-service-ctrl.h"
+
+#define CTRL_PANEL_SHOW_TIME                                   5.0
+
+static Evas_Object *pNaviFrameHandle = NULL;
+static Evas_Object *pStreamingViewNaviControlBar = NULL;
+static Evas_Object *pBufferingAnimationHandle = NULL;
+
+static Evas_Object *pStreamingViewLayout = NULL;
+static Evas_Object *pStreamingViewPanelEdj = NULL;
+static Evas_Object *pStreamingViewCtrlEdj = NULL;
+static Evas_Object *pStreamingViewProgressbarEdj = NULL;
+static Evas_Object *pStreamingSoundpathButton = NULL;
+
+static Ecore_Timer *pStreamingViewCtrlPanelHideTimer = NULL;
+static Elm_Object_Item *pNaviFrameItemStreamingView = NULL;
+static ChangeStreamingViewCbFunc pChangeViewUserCbFunc = NULL;
+
+static bool bIsStreamingViewScreenLock = FALSE;
+static bool bSwitchStreamingViewUI = TRUE;
+static bool bIsStreamingViewOnlyAudio = FALSE;
+static VideoStreamingViewState nStreamingViewState = MP_STREAMING_VIEW_STATE_UNACTIVATE;
+static int nScreensizeStatus = MP_DISPLAY_METHOD_LETTER_BOX;
+
+
+/*
+ *     Callback function.
+ */
+static void MpVideoStreamingViewWarningPopupCb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+{
+       if (!pUserData) {
+               VideoLogInfo("No exist pUserData");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       MpUtilDeletePopupHandle();
+}
+
+static void MpVideoStreamingViewSoundPathCb(void *pUserData, Evas_Object *pObject, void *pEventInfo)
+{
+       if (!pUserData) {
+               VideoLogInfo("[ERR] No exist pUserData");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       if (MpVideoSoundpathIsConnectOtherSoundpath()) {
+               VideoLogInfo("Connect BT or earjack.");
+               MpVideoSoundpathShow(pUserData);
+       } else {
+               MpUtilNotifyPopUp(pAppData, "Soundpath is connected with speaker only.", MpVideoStreamingViewWarningPopupCb);
+       }
+}
+
+static void MpVideoStreamingViewPressPauseButtonCb(void *pUserData, Evas_Object *pObject, const char *szEmission, const char *szSource)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       if (!strcmp(szEmission, SIGNAL_CONTROL_PLAY_PAUSE_PRESS)) {
+               VideoLogInfo("Press Pause button.");
+
+               if (pAppData->nCurPlayerState == MP_PLAYER_STATE_RESUME || pAppData->nCurPlayerState == MP_PLAYER_STATE_PLAY) {
+                       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlPause(pAppData);
+               }
+       }
+}
+
+static void MpVideoStreamingViewPressResumeButtonCb(void *pUserData, Evas_Object *pObject, const char *szEmission, const char *szSource)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       if (!strcmp(szEmission, SIGNAL_CONTROL_PLAY_RESUME_PRESS)) {
+               VideoLogInfo("Press Resume/Play button.");
+
+               if (pAppData->nCurPlayerState == MP_PLAYER_STATE_PAUSE) {
+                       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlResume(pAppData);
+               }
+       }
+}
+
+static void MpVideoStreamingViewBackButtonDownCb(void *pUserData, Evas_Object *pObject, const char *szEmission, const char *szSource)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       edje_object_signal_callback_del(pStreamingViewCtrlEdj, SIGNAL_CONTROL_BACK_BUTTON_DOWN, SIGNAL_CONTROL_PART_BACK_BUTTON, (void *)MpVideoStreamingViewBackButtonDownCb);
+
+       MpVideoStreamingViewPop(pNaviFrameHandle, pUserData);
+
+       edje_object_signal_callback_add(pStreamingViewCtrlEdj, SIGNAL_CONTROL_BACK_BUTTON_DOWN, SIGNAL_CONTROL_PART_BACK_BUTTON, (void *)MpVideoStreamingViewBackButtonDownCb, pUserData);
+}
+
+static void MpVideoStreamingViewVolumeButtonDownCb(void *pUserData, Evas_Object *pObject, const char *szEmission, const char *szSource)
+{
+       VideoLogInfo("");
+}
+
+static void MpVideoStreamingViewVolumeButtonUpCb(void *pUserData, Evas_Object *pObject, const char *szEmission, const char *szSource)
+{
+       VideoLogInfo("");
+       syspopup_launch("volume", NULL);
+}
+
+static Eina_Bool MpVideoStreamingViewCtrlPanelHideCb(void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR] No Exist pUserData.");
+               return EINA_FALSE;
+       }
+
+       if(bIsStreamingViewOnlyAudio)
+       {
+               VideoLogInfo("Not hide control panel and UI because of audio only.");
+               return EINA_FALSE;
+       }
+
+       if (MpVideoStreamingViewGetBufferingState()) {
+               VideoLogInfo("skip for Buffering");
+               return EINA_TRUE;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       if (pStreamingViewCtrlPanelHideTimer) {
+               ecore_timer_del(pStreamingViewCtrlPanelHideTimer);
+               pStreamingViewCtrlPanelHideTimer = NULL;
+       }
+
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlHideLayout(pAppData);
+
+       return EINA_FALSE;
+}
+
+static void MpVideoStreamingViewChangedEarjackCb(void *pNode, void *pUserData)
+{
+       if (!pUserData) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       MpVideoSoundpathHide();
+       MpUtilDeletePopupHandle();
+
+       if (MpUtilIsConnectEarjack()) {
+               VideoLogInfo("Connect earjack.");
+               if (pStreamingSoundpathButton) {
+                       elm_object_item_part_content_set(pNaviFrameItemStreamingView, "title_right_btn", pStreamingSoundpathButton);
+               } else {
+                       pStreamingSoundpathButton = MpUtilCreateButtonIcon(pNaviFrameHandle, VIDEO_HEAD_ICON_SOUNDPATH, FALSE, FALSE, 1, 1, pUserData, "video/naviframe/title/default", (void*)MpVideoStreamingViewSoundPathCb);
+                       elm_object_item_part_content_set(pNaviFrameItemStreamingView, "title_right_btn", pStreamingSoundpathButton);
+               }
+       } else {
+               VideoLogInfo("Disconnect earjack.");
+
+               if (pStreamingSoundpathButton) {
+                       evas_object_del(pStreamingSoundpathButton);
+                       pStreamingSoundpathButton = NULL;
+               }
+
+               elm_object_item_part_content_unset(pNaviFrameItemStreamingView, "title_right_btn");
+       }
+}
+
+
+/*
+ * Internal function
+ */
+
+void MpVideoStreamingViewInitLayout(void *pParent, void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       pStreamingViewLayout = elm_layout_add(pParent);
+       if (pStreamingViewLayout) {
+               Evas *pMainWindowEvas = evas_object_evas_get(pAppData->pMainWindow);
+
+               elm_layout_file_set(pStreamingViewLayout, VIDEO_PLAYER_MAIN_EDJ, MAIN_EDJ_GROUP);
+
+               pStreamingViewCtrlEdj = MpUtilLoadEdjFile(pMainWindowEvas, VIDEO_PLAYER_CONTROL_EDJ, CONTROL_EDJ_GROUP);
+               pStreamingViewPanelEdj = MpUtilLoadEdjFile(pMainWindowEvas, VIDEO_PLAYER_PANEL_EDJ, PANEL_EDJ_GROUP);
+               pBufferingAnimationHandle = MpVideoAnimationCtrlInit(pMainWindowEvas);
+
+               edje_object_part_swallow(pStreamingViewPanelEdj, SWALLOW_PANEL_CONTROL, pStreamingViewCtrlEdj);
+               elm_object_part_content_set(pStreamingViewLayout, SWALLOW_MAIN_ANIMATION, pBufferingAnimationHandle);
+               edje_object_signal_emit(_EDJ(pStreamingViewLayout), SIGNAL_MAIN_ANIMATION_SHOW, "*");
+
+               MpVideoAnimationCtrlShow();
+
+               pStreamingViewProgressbarEdj = (Evas_Object *)MpVideoProgressbarInit(pAppData);
+               MpVideoProgressbarSetSkipEvent(TRUE);
+               if (pStreamingViewProgressbarEdj) {
+                       edje_object_part_swallow(pStreamingViewPanelEdj, SWALLOW_PANEL_PROGRESS_BAR, pStreamingViewProgressbarEdj);
+               } else {
+                       VideoLogInfo("Progressbar edj handle is null.");
+               }
+
+               elm_object_part_content_set(pStreamingViewLayout, SWALLOW_MAIN_CONTROL, pStreamingViewPanelEdj);
+
+               edje_object_signal_emit(pStreamingViewCtrlEdj, SIGNAL_CONTROL_MODE_STREAMING, "*");
+
+               edje_object_signal_callback_add(pStreamingViewCtrlEdj,
+                                       SIGNAL_CONTROL_PLAY_PAUSE_PRESS,
+                                       SIGNAL_CONTROL_PART_PLAY_BUTTON,
+                                       (void *)MpVideoStreamingViewPressPauseButtonCb, (void *)pAppData);
+
+               edje_object_signal_callback_add(pStreamingViewCtrlEdj,
+                                       SIGNAL_CONTROL_PLAY_RESUME_PRESS,
+                                       SIGNAL_CONTROL_PART_PLAY_BUTTON,
+                                       (void *)MpVideoStreamingViewPressResumeButtonCb, (void *)pAppData);
+
+               edje_object_signal_callback_add(pStreamingViewCtrlEdj,
+                                       SIGNAL_CONTROL_BACK_BUTTON_DOWN,
+                                       SIGNAL_CONTROL_PART_BACK_BUTTON,
+                                       (void *)MpVideoStreamingViewBackButtonDownCb, (void *)pAppData);
+
+               edje_object_signal_callback_add(pStreamingViewCtrlEdj,
+                                       SIGNAL_CONTROL_VOL_BUTTON_DOWN,
+                                       SIGNAL_CONTROL_PART_VOL_BUTTON,
+                                       (void *)MpVideoStreamingViewVolumeButtonDownCb, (void *)pAppData);
+
+               edje_object_signal_callback_add(pStreamingViewCtrlEdj,
+                                       SIGNAL_CONTROL_VOL_BUTTON_UP,
+                                       SIGNAL_CONTROL_PART_VOL_BUTTON,
+                                       (void *)MpVideoStreamingViewVolumeButtonUpCb, (void *)pAppData);
+
+               MpUtilRegisteEarjackCbFunc((void *)MpVideoStreamingViewChangedEarjackCb, pUserData);
+       }
+}
+
+void MpVideoStreamingViewInit(void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (!pNaviFrameHandle|| !pUserData) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       MpVideoStreamingViewInitLayout(pNaviFrameHandle, pUserData);
+}
+
+
+
+/*
+ * External function
+ */
+void MpVideoStreamingViewPush(void *pNaviFrame, int nPlayerType, void *pUserData, ChangeStreamingViewCbFunc pChangeViewCb)
+{
+       VideoLogInfo("");
+
+       pNaviFrameHandle = pNaviFrame;
+       pChangeViewUserCbFunc = pChangeViewCb;
+
+       MpVideoStreamingViewInit(pUserData);
+
+       pNaviFrameItemStreamingView = elm_naviframe_item_push(pNaviFrameHandle,MP_STREAMING_PLAYER_STR, NULL, NULL, pStreamingViewLayout, "video/1line");
+
+       if (MpVideoSoundpathIsConnectOtherSoundpath()) {
+               pStreamingSoundpathButton = MpUtilCreateButtonIcon(pNaviFrameHandle, VIDEO_HEAD_ICON_SOUNDPATH, FALSE, FALSE, 1, 1, pUserData, "video/naviframe/title/default", (void*)MpVideoStreamingViewSoundPathCb);
+               elm_object_item_part_content_set(pNaviFrameItemStreamingView, "title_right_btn", pStreamingSoundpathButton);
+       }
+
+       MpVideoStreamingViewShowControlPanel(pUserData);
+}
+
+void MpVideoStreamingViewPop(void *pNaviFrame, void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+               pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlExit(pAppData);
+       }
+
+void MpVideoStreamingViewDestroy(void *pUserData)
+{
+       VideoLogInfo("");
+
+       MpVideoStreamingViewHideControlPanel(pUserData);
+       MpVideoProgressbarDestroy();
+       MpVideoAnimationCtrlDestroy();
+
+       pNaviFrameHandle = NULL;
+       pBufferingAnimationHandle = NULL;
+       pNaviFrameItemStreamingView = NULL;
+       pStreamingViewProgressbarEdj = NULL;
+
+       if (pStreamingViewNaviControlBar) {
+               evas_object_del(pStreamingViewNaviControlBar);
+               pStreamingViewNaviControlBar = NULL;
+       }
+
+       if (pStreamingViewLayout) {
+               evas_object_del(pStreamingViewLayout);
+               pStreamingViewLayout = NULL;
+       }
+
+       if (pStreamingViewPanelEdj) {
+               evas_object_del(pStreamingViewPanelEdj);
+               pStreamingViewPanelEdj = NULL;
+       }
+
+       if (pStreamingViewCtrlEdj) {
+               evas_object_del(pStreamingViewCtrlEdj);
+               pStreamingViewCtrlEdj = NULL;
+       }
+
+       if (pStreamingViewCtrlPanelHideTimer) {
+               ecore_timer_del(pStreamingViewCtrlPanelHideTimer);
+               pStreamingViewCtrlPanelHideTimer = NULL;
+       }
+
+       if (pStreamingSoundpathButton) {
+               evas_object_del(pStreamingSoundpathButton);
+               pStreamingSoundpathButton = NULL;
+       }
+
+       bIsStreamingViewScreenLock = FALSE;
+       bIsStreamingViewOnlyAudio = FALSE;
+
+       bSwitchStreamingViewUI = TRUE;
+       nStreamingViewState = MP_STREAMING_VIEW_STATE_UNACTIVATE;
+       nScreensizeStatus = MP_DISPLAY_METHOD_LETTER_BOX;
+}
+
+void MpVideoStreamingViewInitAfterBeginOfStream(void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+       MpVideoProgressbarSetSkipEvent(FALSE);
+       MpVideoProgressbarBeginOfStream((void *)pAppData);
+
+       if (pAppData->nDuration > 1) {
+               char szDurationTime[PLAY_TIME_LENGTH] = { 0 };
+               snprintf(szDurationTime, PLAY_TIME_LENGTH, "%" PLAY_TIME_FORMAT, PLAY_TIME_ARGS(pAppData->nDuration / 1000));
+               MpVideoProgressbarUpdateDurationTime(szDurationTime);
+       }
+
+       MpVideoAnimationCtrlHide();
+       edje_object_signal_emit(_EDJ(pStreamingViewLayout), SIGNAL_MAIN_ANIMATION_HIDE, "*");
+       edje_object_signal_emit(pStreamingViewCtrlEdj, SIGNAL_CONTROL_PLAY_RESUME, "*");
+
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlShowLayout(pAppData);
+}
+
+void MpVideoStreamingViewUpdatePauseKey(void)
+{
+       VideoLogInfo("");
+
+       edje_object_signal_emit(pStreamingViewCtrlEdj, SIGNAL_CONTROL_PLAY_PAUSE, "*");
+}
+
+void MpVideoStreamingViewUpdateResumeKey(void)
+{
+       VideoLogInfo("");
+
+       edje_object_signal_emit(pStreamingViewCtrlEdj, SIGNAL_CONTROL_PLAY_RESUME, "*");
+}
+
+void MpVideoStreamingViewShowControlPanel(void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       if (!pStreamingViewPanelEdj) {
+               VideoLogInfo("No exist play control panel edc.");
+               return;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       if (nStreamingViewState == MP_STREAMING_VIEW_STATE_UNACTIVATE) {
+               VideoLogInfo("");
+               return;
+       }
+
+       bSwitchStreamingViewUI = TRUE;
+       MpVideoProgressbarCreateTimer((void *)pAppData);
+
+       evas_object_show(pStreamingViewLayout);
+
+       if (pStreamingViewCtrlPanelHideTimer) {
+               ecore_timer_del(pStreamingViewCtrlPanelHideTimer);
+               pStreamingViewCtrlPanelHideTimer = NULL;
+       }
+
+       if (pAppData->nCurPlayerState == MP_PLAYER_STATE_PAUSE || bIsStreamingViewOnlyAudio == TRUE) {
+       } else {
+               pStreamingViewCtrlPanelHideTimer = ecore_timer_add(CTRL_PANEL_SHOW_TIME, MpVideoStreamingViewCtrlPanelHideCb, pUserData);
+       }
+
+       MpVideoStreamingViewActivate();
+       MpVideoStreamingViewUnlockScreen(pUserData);
+}
+
+void MpVideoStreamingViewHideControlPanel(void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       if (nStreamingViewState == MP_STREAMING_VIEW_STATE_UNACTIVATE) {
+               VideoLogInfo("");
+               return;
+       }
+
+       if (!pStreamingViewPanelEdj) {
+               VideoLogInfo("No exist play control panel edc.");
+               return;
+       }
+
+       if(bIsStreamingViewOnlyAudio)
+       {
+               VideoLogInfo("Not hide control panel and UI because of audio only.");
+               return;
+       }
+
+       bSwitchStreamingViewUI = FALSE;
+       MpVideoProgressbarDeleteTimer();
+
+       evas_object_hide(_EDJ(pStreamingViewLayout));
+
+       if (pStreamingViewCtrlPanelHideTimer) {
+               ecore_timer_del(pStreamingViewCtrlPanelHideTimer);
+               pStreamingViewCtrlPanelHideTimer = NULL;
+       }
+}
+
+void MpVideoStreamingViewActivate(void)
+{
+       VideoLogInfo("");
+
+       nStreamingViewState = MP_STREAMING_VIEW_STATE_ACTIVATE;
+}
+
+void MpVideoStreamingViewUnactivate(void)
+{
+       VideoLogInfo("");
+
+       nStreamingViewState = MP_STREAMING_VIEW_STATE_UNACTIVATE;
+}
+
+void MpVideoStreamingViewRotation(int nRotateMode)
+{
+       VideoLogInfo("");
+
+       if (MpVideoStreamingViewGetBufferingState())
+               edje_object_signal_emit(_EDJ(pStreamingViewLayout), SIGNAL_MAIN_ANIMATION_SHOW, "*");
+       else
+               edje_object_signal_emit(_EDJ(pStreamingViewLayout), SIGNAL_MAIN_ANIMATION_HIDE, "*");
+}
+
+void MpVideoStreamingViewSetBufferingRate(int nSetBufferingRate)
+{
+       VideoLogInfo("nSetBufferingRate : %d", nSetBufferingRate);
+
+       if (nSetBufferingRate > 95) {
+               MpVideoAnimationCtrlHide();
+               MpVideoProgressbarSetSkipEvent(FALSE);
+               edje_object_signal_emit(_EDJ(pStreamingViewLayout), SIGNAL_MAIN_ANIMATION_HIDE, "*");
+       } else {
+               MpVideoProgressbarSetSkipEvent(TRUE);
+               MpVideoAnimationCtrlShow();
+               edje_object_signal_emit(_EDJ(pStreamingViewLayout), SIGNAL_MAIN_ANIMATION_SHOW, "*");
+
+               if(nSetBufferingRate >= 0)
+                       MpVideoAnimationCtrlSetPercent(nSetBufferingRate);
+       }
+}
+
+bool MpVideoStreamingViewGetBufferingState(void)
+{
+       VideoLogInfo("");
+
+       return MpVideoAnimationCtrlGetActiveState();
+}
+
+bool MpVideoStreamingViewIsTopView(void)
+{
+       VideoLogInfo("");
+
+       Evas_Object *pTmpContents = NULL;
+       Elm_Object_Item *pTmpItem = NULL;
+
+       if (!pNaviFrameHandle) {
+               VideoLogInfo("[ERR] No exist navigationbar handle.");
+               return FALSE;
+       }
+
+       pTmpItem = elm_naviframe_top_item_get(pNaviFrameHandle);
+       pTmpContents = elm_object_item_content_get(pTmpItem);
+       if (pTmpContents) {
+               if (pTmpContents == pStreamingViewLayout) {
+                       VideoLogInfo("Streaming display view is staing in top view.");
+                       return TRUE;
+               } else {
+                       VideoLogInfo("Streaming display view is not staied in top view.");
+                       return FALSE;
+               }
+       } else {
+               VideoLogInfo("[ERR] No exist naviFrame top item.");
+               return FALSE;
+       }
+
+       return FALSE;
+}
+
+void MpVideoStreamingViewShowNocontentImage(void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (pStreamingViewLayout) {
+               edje_object_signal_emit(_EDJ(pStreamingViewLayout), SIGNAL_MAIN_NOCONTENTS_SHOW, "*");
+       }
+
+       bIsStreamingViewOnlyAudio = TRUE;
+
+       MpVideoStreamingViewShowControlPanel(pUserData);
+}
+
+void MpVideoStreamingViewHideNocontentImage(void)
+{
+       VideoLogInfo("");
+
+       if (pStreamingViewLayout) {
+               edje_object_signal_emit(_EDJ(pStreamingViewLayout), SIGNAL_MAIN_NOCONTENTS_HIDE, "*");
+       }
+
+       bIsStreamingViewOnlyAudio = FALSE;
+}
+
+void MpVideoStreamingViewLockScreen(void* pUserData)
+{
+       VideoLogInfo("");
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlHideLayout(pAppData);
+
+       bIsStreamingViewScreenLock = TRUE;
+}
+
+void MpVideoStreamingViewUnlockScreen(void* pUserData)
+{
+       VideoLogInfo("");
+
+       bIsStreamingViewScreenLock = FALSE;
+}
+
+bool MpVideoStreamingViewGetScreenLockState(void)
+{
+       VideoLogInfo("");
+
+       return bIsStreamingViewScreenLock;
+}
+
+void MpVideoStreamingViewPortrate(void)
+{
+       VideoLogInfo("");
+
+       elm_object_item_signal_emit(pNaviFrameItemStreamingView, SIGNAL_NAVIFRAME_PORTRATE_MODE, "*");
+       edje_object_signal_emit(_EDJ(pStreamingViewLayout), SIGNAL_MAIN_PORTRATE_MODE, "*");
+       edje_object_signal_emit(pStreamingViewPanelEdj, SIGNAL_PANEL_PORTRATE_MODE, "*");
+       edje_object_signal_emit(pStreamingViewProgressbarEdj, SIGNAL_PROGRESS_PORTRATE_MODE, "*");
+       edje_object_signal_emit(pStreamingViewCtrlEdj, SIGNAL_CONTROL_STREAMING_PORTRATE_MODE, "*");
+}
+
+void MpVideoStreamingViewLandscape(void)
+{
+       VideoLogInfo("");
+
+       elm_object_item_signal_emit(pNaviFrameItemStreamingView, SIGNAL_NAVIFRAME_LANDSCAPE_MODE, "*");
+       edje_object_signal_emit(_EDJ(pStreamingViewLayout), SIGNAL_MAIN_LANDSCAPE_MODE, "*");
+       edje_object_signal_emit(pStreamingViewPanelEdj, SIGNAL_PANEL_LANDSCAPE_MODE, "*");
+       edje_object_signal_emit(pStreamingViewProgressbarEdj, SIGNAL_PROGRESS_LANDSCAPE_MODE, "*");
+       edje_object_signal_emit(pStreamingViewCtrlEdj, SIGNAL_CONTROL_STREAMING_LANDSCAPE_MODE, "*");
+}
+
+void MpVideoStreamingViewUpdateProgressBar(void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       MpVideoProgressbarCreateTimer(pUserData);
+
+}
+
diff --git a/src/mp-video-subtitle-ctrl.c b/src/mp-video-subtitle-ctrl.c
new file mode 100755 (executable)
index 0000000..dbffafc
--- /dev/null
@@ -0,0 +1,190 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.tizenopensource.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.
+ */
+
+
+
+#include <vconf.h>
+#include <vconf-keys.h>
+#include <mm_sound.h>
+#include <Ecore_Evas.h>
+#include <Elementary.h>
+#include <appcore-efl.h>
+#include <appcore-common.h>
+
+#include "mp-util.h"
+#include "mp-video-log.h"
+#include "video-player.h"
+#include "mp-video-subtitle-ctrl.h"
+
+#define MP_VIDEO_SUBTITLE_MENU_NUM             2
+#define VCONFKEY_GALLERY_SUBTITLE_STATE                "db/setting/gallery/subtitle_state" //boolean
+
+static int bSubtitleSettingState = FALSE;
+static bool bExistSubtitleFile = FALSE;
+static char szSubtitleFileUri[STR_LEN_MAX] = { 0 };
+
+static char szSubTitleExtWildkey[MP_SUBTITLE_TYPE_MAX][STR_LEN_MAX] = { ".srt", ".sub", ".smi" };
+
+
+/*
+ * Internal function
+ */
+bool MpVideoSubtitleCtrlCheckSubtitleFile(char *szMediaUriPath)
+{
+       if (!bSubtitleSettingState) {
+               VideoLogInfo("Subtitle .");
+               return FALSE;
+       }
+
+       if (!szMediaUriPath) {
+               VideoLogInfo("No Exist szMediaUri.");
+               return FALSE;
+       }
+
+       if (strlen(szMediaUriPath) < 1) {
+               VideoLogInfo("No Exist szMediaUri.");
+               return FALSE;
+       }
+
+       VideoLogInfo("");
+
+       struct stat buf;
+       int nCount = 0;
+       int nStrLength = 0;
+
+       bExistSubtitleFile = FALSE;
+       memset(szSubtitleFileUri, 0, STR_LEN_MAX);
+
+       for (nCount = 0; nCount < MP_SUBTITLE_TYPE_MAX; nCount++) {
+               nStrLength = strcspn(szMediaUriPath, ".");
+               strncpy(szSubtitleFileUri, szMediaUriPath, nStrLength);
+               strcat(szSubtitleFileUri, szSubTitleExtWildkey[nCount]);
+
+               if (!stat(szSubtitleFileUri, &buf)) {
+                       VideoLogInfo("Success finding subtitle file. - %d", nCount);
+                       bExistSubtitleFile = TRUE;
+                       break;
+               } else {
+                       memset(szSubtitleFileUri, 0, STR_LEN_MAX);
+               }
+       }
+
+       if (!bExistSubtitleFile) {
+               VideoLogInfo("Fail finding subtitle file.");
+       }
+
+       return bExistSubtitleFile;
+}
+
+void MpVideoSubtitleCtrlClear(void)
+{
+       VideoLogInfo("");
+
+       bExistSubtitleFile = FALSE;
+       bSubtitleSettingState = FALSE;
+
+       memset(szSubtitleFileUri, 0, STR_LEN_MAX);
+}
+
+static void MpVideoSubtitleCtrlStateChangeCb(keynode_t *pKeyNode, void *pUserData)
+{
+       if (!pUserData) {
+               VideoLogInfo("User data is NULL.");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       if (!vconf_get_bool(VCONFKEY_GALLERY_SUBTITLE_STATE, &bSubtitleSettingState)) {
+               if (!bSubtitleSettingState) {
+                       VideoLogInfo("Subtitle OFF.");
+               } else {
+                       VideoLogInfo("Subtitle ON.");
+               }
+       } else {
+               VideoLogInfo("Fail to get vconf - subtitle.");
+       }
+}
+
+/*
+ * External function
+ */
+bool MpVideoSubtitleCtrlInit(void *pUserData)
+{
+       if (pUserData == NULL) {
+               VideoLogInfo("[ERR]No have pUserData");
+               return FALSE;
+       }
+
+       VideoLogInfo("");
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       MpVideoSubtitleCtrlClear();
+
+       if (pAppData->nCurPlayerType != MP_VIDEO_PLAYER) {
+               VideoLogInfo("Current player type is not video player.");
+               return FALSE;
+       }
+
+       if (!vconf_get_bool(VCONFKEY_GALLERY_SUBTITLE_STATE, &bSubtitleSettingState)) {
+               if (!bSubtitleSettingState) {
+                       VideoLogInfo("Subtitle OFF.");
+               } else {
+                       VideoLogInfo("Subtitle ON.");
+               }
+       } else {
+               VideoLogInfo("Fail to get vconf - subtitle.");
+       }
+
+       if (vconf_notify_key_changed(VCONFKEY_GALLERY_SUBTITLE_STATE, MpVideoSubtitleCtrlStateChangeCb, pAppData)) {
+               VideoLogInfo("[ERR] Fail to resiste subtitle notification callback.");
+       }
+
+       return MpVideoSubtitleCtrlCheckSubtitleFile(pAppData->szMediaUri);
+}
+
+void MpVideoSubtitleCtrlDestroy(void)
+{
+       VideoLogInfo("");
+
+       MpVideoSubtitleCtrlClear();
+}
+
+bool MpVideoSubtitleCtrlIsExistSubtitle(void)
+{
+       VideoLogInfo("");
+
+       return bExistSubtitleFile;
+}
+
+bool MpVideoSubtitleCtrlGetSubtitleUri(char *szSubtitleUri)
+{
+       VideoLogInfo("");
+
+       if (!MpVideoSubtitleCtrlIsExistSubtitle()) {
+               return FALSE;
+       }
+
+       if (strlen(szSubtitleFileUri) < 1) {
+               VideoLogInfo("[ERR]No have szSubtitleFileUri");
+               return FALSE;
+       }
+
+       strncpy(szSubtitleUri, szSubtitleFileUri, STR_LEN_MAX -1);
+
+       return TRUE;
+}
diff --git a/src/mp-video-view-mgr.c b/src/mp-video-view-mgr.c
new file mode 100755 (executable)
index 0000000..990c10d
--- /dev/null
@@ -0,0 +1,1167 @@
+/*
+ * 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 [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
+ *
+ *    Licensed under the Flora License, Version 1.0 (the "License");
+ *    you may not use this file except in compliance with the License.
+ *    You may obtain a copy of the License at
+ *
+ *        http://www.tizenopensource.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.
+ */
+
+
+
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+#include <app.h>
+#include <syspopup_caller.h>
+
+#include "mp-util.h"
+#include "mp-video-log.h"
+#include "mp-external-ug.h"
+#include "mp-video-view-mgr.h"
+#include "mp-video-info-view.h"
+#include "mp-video-type-define.h"
+#include "mp-util-media-service.h"
+#include "mp-video-display-view.h"
+#include "mp-video-string-define.h"
+#include "mp-video-streaming-view.h"
+#include "mp-video-service-ctrl.h"
+
+#define MULTIMEDIA_KEY_LONG_PRESS_INTERVAL             4.0
+#define DETAIL_POPUP_STR_LEN_MAX                               20
+
+static Evas_Object *pMainLayout = NULL;
+static Evas_Object *pBackGround = NULL;
+static Evas_Object *pNaviFrame = NULL;
+
+static Evas_Object *pGesture = NULL;
+static Evas_Object *pEventRect = NULL;
+
+static MpVideoRotateType nVideoRotateType = VIDEO_ROTATE_PORTRAIT_NORMAL;
+
+static Ecore_Event_Handler *pHWKeyEventDownHandler = NULL;
+static Ecore_Event_Handler *pHWKeyEventUpHandler = NULL;
+
+static bool bIsLongPressForward = FALSE;
+static bool bIsKeyCancle = FALSE;
+static Ecore_Timer *pLongPressSpeedPlayingTimer = NULL;
+
+static bool bShowLayout = FALSE;
+
+static void MpVideoVideoViewCtrlLongpressSpeedKeyUp(void *pUserData);
+static void MpVideoVideoViewCtrlLongpressSpeedKeyDown(void *pUserData);
+static void MpVideoViewCtrlChangeViewCb(int nChangePlayerView, void *pUserData);
+
+/*
+ * Callback function.
+ */
+
+static Eina_Bool MpVideoViewCtrlHardkeyDownCb(void *pUserData, int nType, void *pEvent)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("[ERR]");
+               return EINA_FALSE;
+       }
+
+       VideoLogInfo("");
+
+       Ecore_Event_Key *pKeyEvent = (Ecore_Event_Key *) pEvent;
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       VideoLogInfo("Key down : %s", pKeyEvent->keyname);
+
+       if(!strcmp(pKeyEvent->keyname, END_KEY))
+       {
+               VideoLogInfo("Back(End) key");
+       }
+       else if(!strcmp(pKeyEvent->keyname, HOME_KEY))
+       {
+               VideoLogInfo("Home key");
+       }
+       else if(!strcmp(pKeyEvent->keyname, POWER_KEY))
+       {
+               VideoLogInfo("Power key");
+               if(pAppData->nCurPlayerState == MP_PLAYER_STATE_PLAY || pAppData->nCurPlayerState == MP_PLAYER_STATE_RESUME)
+                       {
+                               int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+                               if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+                                       nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+                                       nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+                                       nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+                                       nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+                               {
+                                       if(MpVideoDisplayViewGetScreenLockState() == FALSE)
+                                       {
+                                               MpVideoDisplayViewLockScreen(pUserData);
+                                       }
+                                       else
+                                       {
+                                               MpVideoDisplayViewUnlockScreen(pUserData);
+                                       }
+                               }
+                       else if(nTmpPlayerType == MP_STREAMING_PLAYER)
+                               {
+                                       if(MpVideoStreamingViewGetScreenLockState() == FALSE)
+                                       {
+                                               MpVideoStreamingViewLockScreen(pUserData);
+                                       }
+                                       else
+                                       {
+                                               MpVideoStreamingViewUnlockScreen(pUserData);
+                                       }
+                               }
+                               else
+                               {
+                                       MpUtilLcdOffForPowerButton();
+                               }
+                       }
+               else
+               {
+                       MpUtilLcdOffForPowerButton();
+               }
+       }
+       else if(!strcmp(pKeyEvent->keyname, PAUSE_KEY))
+       {
+               VideoLogInfo("Pause key down");
+       }
+       else if(!strcmp(pKeyEvent->keyname, PLAY_KEY))
+       {
+               VideoLogInfo("Play key down");
+       }
+       else if(!strcmp(pKeyEvent->keyname, STOP_KEY))
+       {
+               VideoLogInfo("Stop key down");
+       }
+       else if(!strcmp(pKeyEvent->keyname, NEXT_KEY))
+       {
+               VideoLogInfo("Next key down");
+       }
+       else if(!strcmp(pKeyEvent->keyname, PREV_KEY))
+       {
+               VideoLogInfo("Prev key down");
+       }
+       else if(!strcmp(pKeyEvent->keyname, FORWARD_KEY))
+       {
+               VideoLogInfo("Forward key down");
+               bIsLongPressForward = TRUE;
+               MpVideoVideoViewCtrlLongpressSpeedKeyDown(pUserData);
+       }
+       else if(!strcmp(pKeyEvent->keyname, REWIND_KEY))
+       {
+               VideoLogInfo("Rewind key down");
+               bIsLongPressForward = FALSE;
+               MpVideoVideoViewCtrlLongpressSpeedKeyDown(pUserData);
+       }
+       else if(!strcmp(pKeyEvent->keyname, KEY_CANCLE))
+       {
+               VideoLogInfo("Cancel key down");
+               bIsKeyCancle = TRUE;
+       }
+
+       return EINA_FALSE;
+}
+
+static Eina_Bool MpVideoViewCtrlHardkeyUpCb(void *pUserData, int nType, void *pEvent)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("[ERR]");
+               return EINA_FALSE;
+       }
+
+       VideoLogInfo("");
+
+       Ecore_Event_Key *pKeyEvent = (Ecore_Event_Key *) pEvent;
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       VideoLogInfo("Key Up : %s", pKeyEvent->keyname);
+
+       if(bIsKeyCancle)
+       {
+               VideoLogInfo("KEY CANCLE.");
+               bIsKeyCancle = FALSE;
+               return EINA_FALSE;
+       }
+
+       if(!strcmp(pKeyEvent->keyname, END_KEY))
+       {
+               VideoLogInfo("End key up");
+               pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlExit(pAppData);
+       }
+       else if(!strcmp(pKeyEvent->keyname, HOME_KEY))
+       {
+               VideoLogInfo("Home key up");
+               pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlExit(pAppData);
+       }
+       else if(!strcmp(pKeyEvent->keyname, POWER_KEY))
+       {
+               VideoLogInfo("Power key up");
+       }
+       else if(!strcmp(pKeyEvent->keyname, PAUSE_KEY))
+       {
+               VideoLogInfo("Pause key up");
+               if(pAppData->nCurPlayerState == MP_PLAYER_STATE_PLAY || pAppData->nCurPlayerState == MP_PLAYER_STATE_RESUME)
+               {
+                       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlPause(pAppData);
+               }
+               else if(pAppData->nCurPlayerState == MP_PLAYER_STATE_PAUSE)
+               {
+                       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlResume(pAppData);
+               }
+       }
+       else if(!strcmp(pKeyEvent->keyname, PLAY_KEY))
+       {
+               VideoLogInfo("Play key up");
+               if(pAppData->nCurPlayerState == MP_PLAYER_STATE_PLAY || pAppData->nCurPlayerState == MP_PLAYER_STATE_RESUME)
+               {
+                       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlPause(pAppData);
+               }
+               else if(pAppData->nCurPlayerState == MP_PLAYER_STATE_PAUSE)
+               {
+                       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlResume(pAppData);
+               }
+       }
+       else if(!strcmp(pKeyEvent->keyname, STOP_KEY))
+       {
+               VideoLogInfo("Stop key up");
+               pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlPause(pAppData);
+       }
+       else if(!strcmp(pKeyEvent->keyname, NEXT_KEY))
+       {
+               VideoLogInfo("Next key up");
+               pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlPlayNextMedia(pAppData);
+       }
+       else if(!strcmp(pKeyEvent->keyname, PREV_KEY))
+       {
+               VideoLogInfo("Prev key up");
+               pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlPlayPreMedia(pAppData);
+       }
+       else if(!strcmp(pKeyEvent->keyname, FORWARD_KEY))
+       {
+               VideoLogInfo("Forward key up");
+               MpVideoVideoViewCtrlLongpressSpeedKeyUp(pUserData);
+       }
+       else if(!strcmp(pKeyEvent->keyname, REWIND_KEY))
+       {
+               VideoLogInfo("Rewind key up");
+               MpVideoVideoViewCtrlLongpressSpeedKeyUp(pUserData);
+       }
+       else
+       {
+       }
+
+       return EINA_FALSE;
+}
+
+static Evas_Event_Flags MpVideoViewCtrlGestureNTabStartCb(void *pUserData , void *pEventInfo)
+{
+       VideoLogInfo("");
+
+
+       return EVAS_EVENT_FLAG_NONE;
+}
+
+static Evas_Event_Flags MpVideoViewCtrlGestureNTabEndCb(void *pUserData , void *pEventInfo)
+{
+       VideoLogInfo("");
+
+       Elm_Gesture_Taps_Info *p = (Elm_Gesture_Taps_Info *) pEventInfo;
+       if(p->n == 1) {
+               VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+               if(bShowLayout) {
+                       int nWidth = 0;
+                       int nHeight = 0;
+                       int nMinY = 0;
+                       int nMaxY = 0;
+
+                       evas_object_geometry_get(pMainLayout, NULL, NULL, &nWidth, &nHeight);
+
+                       if(MpUtilGetRotationState() == VIDEO_ROTATE_PORTRAIT_NORMAL ||
+                               MpUtilGetRotationState() == VIDEO_ROTATE_PORTRAIT_REVERSE)
+                       {
+                               nMinY = (elm_config_scale_get() * 223);
+                               nMaxY = nHeight - ( elm_config_scale_get() * 215);
+                       }
+                       else
+                       {
+                               nMinY = (elm_config_scale_get() * 223);
+                               nMaxY = nHeight - ( elm_config_scale_get() * 204);
+                       }
+
+                       if(p->y > nMinY && p->y < nMaxY)
+                       {
+                               pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlHideLayout(pAppData);
+                       }
+               } else {
+                       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlShowLayout(pAppData);
+               }
+       }
+
+       return EVAS_EVENT_FLAG_NONE;
+}
+
+static Evas_Event_Flags MpVideoViewCtrlGestureNTabAbortCb(void *pUserData , void *pEventInfo)
+{
+       VideoLogInfo("");
+
+       return EVAS_EVENT_FLAG_NONE;
+}
+
+
+/*
+ * Internal function.
+ */
+static void MpVideoViewCtrlScreenRotationInit(int nRotateMode, void *pUserData)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("[ERR] No exist pUserData.");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       MpUtilRotateWindow(nRotateMode, pAppData->pMainWindow);
+       nVideoRotateType = nRotateMode;
+       MpVideoViewCtrlSetRotation(nVideoRotateType, pUserData);
+}
+
+static Evas_Object *MpVideoViewCtrlCreateBg(Evas_Object *pWindow)
+{
+       Evas_Object *pBg = elm_bg_add(pWindow);
+       evas_object_size_hint_weight_set(pBg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_bg_color_set(pBg, 0, 0, 0);
+       elm_win_resize_object_add(pWindow, pBg);
+
+    return pBg;
+}
+
+static Evas_Object *MpVideoViewCtrlCreateMainLayout(Evas_Object *pParent)
+{
+       if(!pParent)
+       {
+               VideoLogInfo("[ERR]");
+               return NULL;
+       }
+
+       VideoLogInfo("");
+
+       if(pMainLayout)
+       {
+               evas_object_del(pMainLayout);
+               pMainLayout = NULL;
+       }
+
+       pMainLayout = elm_layout_add(pParent);
+
+               elm_layout_theme_set(pMainLayout, "layout", "application", "video");
+
+       evas_object_size_hint_weight_set(pMainLayout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+       elm_win_resize_object_add(pParent, pMainLayout);
+
+       pBackGround = MpVideoViewCtrlCreateBg(pParent);
+
+       evas_object_show(pParent);
+
+       evas_object_show(pMainLayout);
+
+       return pMainLayout;
+}
+
+static void MpVideoViewCtrlCreateEventRect(void *pUserData, Evas_Object *pParent)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       if(!pParent)
+       {
+               VideoLogInfo("[ERR]");
+               return;
+}
+
+       VideoLogInfo("");
+
+       pEventRect = evas_object_rectangle_add(evas_object_evas_get(pParent));
+       evas_object_color_set(pEventRect, 0, 0, 0, 0);
+
+       elm_object_part_content_set(pParent, "elm.swallow.event", pEventRect);
+
+       pGesture = elm_gesture_layer_add(pEventRect);
+
+       elm_gesture_layer_cb_set(pGesture, ELM_GESTURE_N_TAPS, ELM_GESTURE_STATE_START, MpVideoViewCtrlGestureNTabStartCb, pUserData);
+       elm_gesture_layer_cb_set(pGesture, ELM_GESTURE_N_TAPS, ELM_GESTURE_STATE_END, MpVideoViewCtrlGestureNTabEndCb, pUserData);
+       elm_gesture_layer_cb_set(pGesture, ELM_GESTURE_N_TAPS, ELM_GESTURE_STATE_ABORT, MpVideoViewCtrlGestureNTabAbortCb, pUserData);
+
+       evas_object_repeat_events_set(pEventRect, EINA_TRUE);
+
+       elm_gesture_layer_attach(pGesture, pEventRect);
+
+       evas_object_show(pEventRect);
+}
+
+static Evas_Object *MpVideoViewCtrlCreateNaviFrame(Evas_Object *pParent, void* pUserData)
+{
+       if(!pParent)
+       {
+               VideoLogInfo("[ERR]");
+               return NULL;
+       }
+
+       VideoLogInfo("");
+
+       if(pNaviFrame)
+       {
+               evas_object_del(pNaviFrame);
+               pNaviFrame = NULL;
+       }
+
+       pNaviFrame = elm_naviframe_add(pParent);
+
+       elm_object_part_content_set(pParent, "elm.swallow.content", pNaviFrame);
+
+       elm_naviframe_prev_btn_auto_pushed_set(pNaviFrame, EINA_FALSE);
+
+       evas_object_show(pNaviFrame);
+
+       return pNaviFrame;
+}
+
+static void MpVideoViewCtrlSetVideoViews(VideoAppData *pAppData, int nPlayerType)
+{
+       VideoLogInfo("%p",pAppData);
+
+       MpVideoServiceCtrlSetPlayerType(nPlayerType);
+
+       switch(nPlayerType)
+       {
+       case MP_VIDEO_PLAYER:
+               VideoLogInfo("MP_VIDEO_PLAYER");
+               MpVideoDisplayViewPush((void *)pNaviFrame, nPlayerType, (void *)pAppData, MpVideoViewCtrlChangeViewCb);
+               break;
+
+       case MP_VIDEO_PLAYER_SIMPLE:
+               VideoLogInfo("MP_VIDEO_PLAYER_SIMPLE");
+               MpVideoDisplayViewPush((void *)pNaviFrame, nPlayerType, (void *)pAppData, MpVideoViewCtrlChangeViewCb);
+               break;
+
+       case MP_VIDEO_PLAYER_EMAIL:
+               VideoLogInfo("MP_VIDEO_PLAYER_EMAIL");
+               MpVideoDisplayViewPush((void *)pNaviFrame, nPlayerType, (void *)pAppData, MpVideoViewCtrlChangeViewCb);
+               break;
+
+       case MP_VIDEO_PLAYER_MMS:
+               VideoLogInfo("MP_VIDEO_PLAYER_MMS");
+               MpVideoDisplayViewPush((void *)pNaviFrame, nPlayerType, (void *)pAppData, MpVideoViewCtrlChangeViewCb);
+               break;
+
+       case MP_VIDEO_PLAYER_GALLERY:
+               VideoLogInfo("MP_VIDEO_PLAYER_GALLERY");
+               MpVideoDisplayViewPush((void *)pNaviFrame, nPlayerType, (void *)pAppData, MpVideoViewCtrlChangeViewCb);
+               break;
+
+       case MP_STREAMING_PLAYER:
+               VideoLogInfo("MP_STREAMING_PLAYER");
+               MpVideoStreamingViewPush((void *)pNaviFrame, nPlayerType, (void *)pAppData, MpVideoViewCtrlChangeViewCb);
+               break;
+
+       default:
+               VideoLogInfo("[ERR] No exist player tpye.");
+               pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlExit(pAppData);
+       }
+}
+
+static void MpVideoViewCtrlShowNaviFrame(void)
+{
+       VideoLogInfo("");
+
+       if(pNaviFrame)
+       {
+               elm_object_part_content_set(pMainLayout, "elm.swallow.content", pNaviFrame);
+               evas_object_show(pNaviFrame);
+       }
+}
+
+static void MpVideoViewCtrlHideNaviFrame(void)
+{
+       VideoLogInfo("");
+
+       if(pNaviFrame)
+       {
+               elm_object_part_content_unset(pMainLayout, "elm.swallow.content");
+               evas_object_hide(pNaviFrame);
+       }
+}
+
+static Eina_Bool MpVideoVideoViewCtrlSpeedKeyLongPressCb(void *pUserData)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("[ERR]");
+               return EINA_FALSE;
+       }
+
+       VideoLogInfo("");
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       if(pAppData->nPlayingSpeed > MP_PLAYING_SPEED_MAX)
+       {
+               if(pLongPressSpeedPlayingTimer)
+               {
+                       ecore_timer_del(pLongPressSpeedPlayingTimer);
+                       pLongPressSpeedPlayingTimer = NULL;
+               }
+
+               return EINA_FALSE;
+       }
+
+       ++pAppData->nPlayingSpeed;
+
+       if(bIsLongPressForward)
+       {
+               pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSpeedFF(pAppData);
+       }
+       else
+       {
+               pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSpeedRew(pAppData);
+       }
+
+       return EINA_TRUE;
+}
+
+static void MpVideoVideoViewCtrlLongpressSpeedKeyDown(void *pUserData)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("No exist pUserData.");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       pAppData->nPlayingSpeed = MP_PLAYING_SPEED_2X;
+
+       if(bIsLongPressForward)
+       {
+               pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSpeedFF(pAppData);
+       }
+       else
+       {
+               pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSpeedRew(pAppData);
+       }
+
+       if(pLongPressSpeedPlayingTimer)
+       {
+               ecore_timer_del(pLongPressSpeedPlayingTimer);
+               pLongPressSpeedPlayingTimer = NULL;
+       }
+
+       pLongPressSpeedPlayingTimer = ecore_timer_add(MULTIMEDIA_KEY_LONG_PRESS_INTERVAL, MpVideoVideoViewCtrlSpeedKeyLongPressCb, (void *)pAppData);
+}
+
+static void MpVideoVideoViewCtrlLongpressSpeedKeyUp(void *pUserData)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("No exist pUserData.");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       bIsLongPressForward = FALSE;
+
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlSpeedReset(pAppData);
+
+       if(pLongPressSpeedPlayingTimer)
+       {
+               ecore_timer_del(pLongPressSpeedPlayingTimer);
+               pLongPressSpeedPlayingTimer = NULL;
+       }
+}
+
+static void MpVideoViewCtrlChangeViewCb(int nChangePlayerView, void *pUserData)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       MpVideoViewCtrlSetVideoViews((VideoAppData*)pUserData, nChangePlayerView);
+
+               pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlReLaunching(pAppData);
+       }
+
+/*
+ * External function.
+ */
+bool MpVideoViewCtrlInit(VideoAppData *pAppData)
+{
+       if(!pAppData)
+       {
+               VideoLogInfo("[ERR]");
+               return FALSE;
+       }
+
+       VideoLogInfo("");
+
+       if(pHWKeyEventDownHandler)
+       {
+               ecore_event_handler_del(pHWKeyEventDownHandler);
+               pHWKeyEventDownHandler = NULL;
+       }
+
+       if(pHWKeyEventUpHandler)
+       {
+               ecore_event_handler_del(pHWKeyEventUpHandler);
+               pHWKeyEventUpHandler = NULL;
+       }
+
+       pHWKeyEventDownHandler = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, (void *)MpVideoViewCtrlHardkeyDownCb, (void *)pAppData);
+       pHWKeyEventUpHandler = ecore_event_handler_add(ECORE_EVENT_KEY_UP, (void *)MpVideoViewCtrlHardkeyUpCb, (void *)pAppData);
+       elm_win_indicator_mode_set(pAppData->pMainWindow, ELM_WIN_INDICATOR_SHOW);
+
+       MpVideoViewCtrlCreateMainLayout(pAppData->pMainWindow);
+       MpVideoViewCtrlCreateEventRect((void *)pAppData, pMainLayout);
+       MpVideoViewCtrlCreateNaviFrame(pMainLayout, (void*)pAppData);
+
+       MpVideoViewCtrlSetVideoViews(pAppData, MpVideoServiceCtrlGetPlayerType());
+       MpVideoViewCtrlScreenRotationInit(MpUtilGetRotationState(), (void *)pAppData);
+
+       return TRUE;
+}
+
+void MpVideoViewCtrlDestroy(void *pUserData)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       MpExternalUgUnload();
+
+       MpVideoInfoViewDestroy();
+
+       int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+
+       if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+       {
+               MpVideoDisplayViewDestroy(pUserData);
+       }
+       else if(nTmpPlayerType == MP_STREAMING_PLAYER)
+       {
+               MpVideoStreamingViewDestroy(pUserData);
+       }
+
+
+       if(pGesture)
+       {
+               evas_object_del(pGesture);
+               pGesture = NULL;
+       }
+
+       if(pEventRect)
+       {
+               evas_object_del(pEventRect);
+               pEventRect = NULL;
+       }
+
+       if(pHWKeyEventDownHandler)
+       {
+               ecore_event_handler_del(pHWKeyEventDownHandler);
+               pHWKeyEventDownHandler = NULL;
+       }
+
+       if(pHWKeyEventUpHandler)
+       {
+               ecore_event_handler_del(pHWKeyEventUpHandler);
+               pHWKeyEventUpHandler = NULL;
+       }
+
+       if(pMainLayout)
+       {
+               evas_object_del(pMainLayout);
+               pMainLayout = NULL;
+       }
+
+       if(pNaviFrame)
+       {
+               evas_object_del(pNaviFrame);
+               pNaviFrame = NULL;
+       }
+
+       if(pLongPressSpeedPlayingTimer)
+       {
+               ecore_timer_del(pLongPressSpeedPlayingTimer);
+               pLongPressSpeedPlayingTimer = NULL;
+       }
+
+       if(pBackGround)
+       {
+               evas_object_del(pBackGround);
+               pBackGround = NULL;
+       }
+
+       bIsLongPressForward = FALSE;
+       bIsKeyCancle = FALSE;
+
+       nVideoRotateType = VIDEO_ROTATE_PORTRAIT_NORMAL;
+}
+
+void MpVideoViewCtrlSetRotation(int nRotateMode, void *pUserData)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("[ERR] No exist pUserData.");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       if(nRotateMode == VIDEO_ROTATE_UNKNOWN)
+       {
+               nRotateMode = MpUtilGetRotationState();
+       }
+
+       nVideoRotateType = nRotateMode;
+
+       MpUtilSetRotationState(nVideoRotateType);
+
+       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlRotateScreen(pAppData, nVideoRotateType);
+
+       MpUtilRotateWindow(nVideoRotateType, pAppData->pMainWindow);
+
+       int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+       if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+       {
+               if(nVideoRotateType == VIDEO_ROTATE_PORTRAIT_NORMAL || nVideoRotateType == VIDEO_ROTATE_PORTRAIT_REVERSE)
+               {
+                       MpVideoDisplayViewPortrate();
+               }
+               else if(nVideoRotateType == VIDEO_ROTATE_LANDSCAPE_NORMAL || nVideoRotateType == VIDEO_ROTATE_LANDSCAPE_REVERSE)
+               {
+                       MpVideoDisplayViewLandscape();
+               }
+       }
+       else if(nTmpPlayerType == MP_STREAMING_PLAYER)
+       {
+               MpVideoStreamingViewRotation(nVideoRotateType);
+       }
+       else
+       {
+       }
+}
+
+void MpVideoViewCtrlInitAfterBeginOfStream(void *pUserData)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+
+       if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+       {
+               MpVideoDisplayViewInitAfterBeginOfStream(pUserData);
+       }
+       else if(nTmpPlayerType == MP_STREAMING_PLAYER)
+       {
+               MpVideoStreamingViewInitAfterBeginOfStream(pUserData);
+       }
+       else
+       {
+       }
+}
+
+void MpVideoViewCtrlPause(void *pUserData)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+
+       if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+       {
+               MpVideoDisplayViewUpdatePauseKey();
+       }
+       else if(nTmpPlayerType == MP_STREAMING_PLAYER)
+       {
+               MpVideoStreamingViewUpdatePauseKey();
+       }
+       else
+       {
+       }
+}
+
+void MpVideoViewCtrlResume(void *pUserData)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+
+       if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+       {
+               MpVideoDisplayViewUpdateResumeKey();
+       }
+       else if(nTmpPlayerType == MP_STREAMING_PLAYER)
+       {
+               MpVideoStreamingViewUpdateResumeKey();
+       }
+       else
+       {
+       }
+}
+
+void MpVideoViewShowLayout(void *pUserData)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+
+       if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+       {
+               if(!MpVideoDisplayViewGetScreenLockState())
+               {
+                       elm_win_indicator_mode_set(pAppData->pMainWindow, ELM_WIN_INDICATOR_SHOW);
+                       MpVideoViewCtrlShowNaviFrame();
+                       bShowLayout = TRUE;
+
+                       MpVideoDisplayViewActivate();
+                       MpVideoDisplayViewShowControlPanel(pUserData);
+               }
+       }
+       else if(nTmpPlayerType == MP_STREAMING_PLAYER)
+       {
+               if(!MpVideoStreamingViewGetScreenLockState())
+               {
+                       elm_win_indicator_mode_set(pAppData->pMainWindow, ELM_WIN_INDICATOR_SHOW);
+                       MpVideoViewCtrlShowNaviFrame();
+                       bShowLayout = TRUE;
+               }
+               MpVideoStreamingViewActivate();
+               MpVideoStreamingViewShowControlPanel(pUserData);
+       }
+}
+
+void MpVideoViewHideLayout(void *pUserData)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+
+               elm_win_indicator_mode_set(pAppData->pMainWindow, ELM_WIN_INDICATOR_SHOW);
+
+       bShowLayout = FALSE;
+
+       MpVideoViewCtrlHideNaviFrame();
+
+       if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+       {
+               MpVideoDisplayViewHideControlPanel(pUserData);
+       }
+       else if(nTmpPlayerType == MP_STREAMING_PLAYER)
+       {
+               MpVideoStreamingViewHideControlPanel(pUserData);
+       }
+}
+
+void MpVideoViewSetBufferingRateForStreamingView(int nSetBufferingRate, void *pUserData)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+
+       if(nTmpPlayerType == MP_STREAMING_PLAYER)
+       {
+               if(MpUtilCheckRTSPType(pAppData->szMediaUri))
+               {
+                       if(nSetBufferingRate == 0)
+                       {
+                               MpVideoStreamingViewSetBufferingRate(-1);
+                       }
+                       else
+                       {
+                               MpVideoStreamingViewSetBufferingRate(nSetBufferingRate);
+                       }
+               }
+               else
+               {
+                       if(nSetBufferingRate >= 0)
+                       {
+                               MpVideoStreamingViewSetBufferingRate(nSetBufferingRate);
+                       }
+               }
+       }
+}
+
+void MpVideoViewHideSoundpath(void *pUserData)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+
+       if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+       {
+               MpVideoDisplayViewHideSoundpath();
+       }
+}
+
+void MpVideoViewCtrlChangeTitle(void *pUserData)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+
+       if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+       {
+               MpVideoDisplayViewChangeNaviFrameTitle(pUserData);
+       }
+       else
+       {
+       }
+}
+
+bool MpVideoViewCtrlIsTopView(void *pUserData)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("[ERR]");
+               return FALSE;
+       }
+
+       VideoLogInfo("");
+
+       bool bIstopView = FALSE;
+
+       int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+
+       if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+       {
+               VideoLogInfo("VIDEO PLAYER");
+               bIstopView = MpVideoDisplayViewIsTopView();
+       }
+       else if(nTmpPlayerType == MP_STREAMING_PLAYER)
+       {
+               VideoLogInfo("STREAMING PLAYER");
+               bIstopView = MpVideoStreamingViewIsTopView();
+       }
+
+       return bIstopView;
+}
+
+void MpVideoViewCtrlShowNocontentImage(void *pUserData)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+
+       if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+       {
+               MpVideoDisplayViewShowNocontentImage(pUserData);
+       }
+       else if(nTmpPlayerType == MP_STREAMING_PLAYER)
+       {
+               MpVideoStreamingViewShowNocontentImage(pUserData);
+       }
+}
+
+void MpVideoViewCtrlHideNocontentImage(void *pUserData)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("[ERR]");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+
+       if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+       {
+               MpVideoDisplayViewHideNocontentImage();
+       }
+       else if(nTmpPlayerType == MP_STREAMING_PLAYER)
+       {
+               MpVideoStreamingViewHideNocontentImage();
+       }
+}
+
+void MpVideoViewCtrlResetProgressBar(void *pUserData)
+{
+       VideoLogInfo("");
+
+       MpVideoDisplayViewResetProgressBar(pUserData);
+}
+
+void MpVideoViewCtrlUpdateProgressbar(void *pUserData)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("No exist pUserData.");
+               return;
+       }
+       VideoLogInfo("");
+       int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+
+       if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+               nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+       {
+               VideoLogInfo("VIDEO PLAYER");
+               MpVideoDisplayViewUpdateProgressBar(pUserData);
+       }
+       else if(nTmpPlayerType == MP_STREAMING_PLAYER)
+       {
+               VideoLogInfo("STREAMING PLAYER");
+               MpVideoStreamingViewUpdateProgressBar(pUserData);
+       }
+}
+
+
+bool MpVideoViewCtrlIsPauseByUser(void)
+{
+       VideoLogInfo("");
+
+       return MpVideoDisplayViewIsPauseByUser();
+}
diff --git a/src/mp-xml-parser.c b/src/mp-xml-parser.c
new file mode 100755 (executable)
index 0000000..354df18
--- /dev/null
@@ -0,0 +1,374 @@
+/*
+ * 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 [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
+ * 
+ *    Licensed under the Flora License, Version 1.0 (the "License");
+ *    you may not use this file except in compliance with the License.
+ *    You may obtain a copy of the License at
+ * 
+ *        http://www.tizenopensource.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.
+ */
+
+
+#include <glib.h>
+#include <string.h>
+#include <libxml/parser.h>
+
+#include "mp-video-log.h"
+#include "video-player.h"
+#include "mp-xml-parser.h"
+
+#define MAX_YT_FORMAT 10
+
+/*
+ * format of Youtube content
+ *
+ * 1 : rtsp | video/3gpp | H.263 / AMR audio |
+ *             176 * 144
+ * 2 : http | video/3gpp | MPEG4 / MPEG4 AAC / 22050 |
+ *             176 * 144
+ * 3 : http | video/mp4| H.264 / AVC / MPEG4 AAC / 44100 |
+ *             480 * 270 / 480 * 360
+ * 5 : http | application/x-shockwave-flash
+ * 6 : rtsp | video/3gpp | MPEG4 / AAC audio |
+ *             176 * 144
+ * 9 : http | video/3gpp | MPEG4 / MPEG4 AAC |
+ *             320 * 240
+ * 10 : rtsp | video/3gpp
+*/
+
+static bool bInitXML = false;
+static bool _parse_url_with_format(const char *content, int length, int format,
+                                  char **streamer_url);
+
+void mp_xml_init()
+{
+       if (!bInitXML) {
+               xmlInitParser();
+               bInitXML = true;
+       }
+
+}
+
+void mp_xml_destroy()
+{
+       if (bInitXML)
+               xmlCleanupParser();
+}
+
+unsigned int mp_read_xml_file(const char *file_name, char **data)
+{
+       unsigned int file_size = 0;
+       FILE *fp = fopen(file_name, "r");
+       if (!fp) {
+               VideoLogInfo("file open failed!");
+               return 0;
+       }
+
+       fseek(fp, 0, SEEK_END); /* move to end */
+       file_size = ftell(fp);
+       VideoLogInfo("file_size of xml = %d", file_size);
+       fseek(fp, 0, SEEK_SET); /* move to start */
+
+       *data = (char *)malloc(file_size);
+       if (*data == NULL) {
+               VideoLogInfo("memory allocation failed!");
+               fclose(fp);
+               return 0;
+       }
+
+       unsigned int nReadCounter = fread(*data, file_size, 1, fp);
+       VideoLogInfo("nReadCounter : %d", nReadCounter);
+       fclose(fp);
+
+       return file_size;
+}
+
+/* 3: http | video/mp4  | H.264 / AVC / MPEG4 AAC / 44100 |
+480 * 270 / 480 * 360 */
+
+/* 9: http | video/3gpp | MPEG4 / MPEG4 AAC |
+320 * 240 */
+
+/* 2: http | video/3gpp | MPEG4 / MPEG4 AAC / 22050 |
+176 * 144 */
+
+/* 10: rtsp | video/3gpp */
+
+/* 6: rtsp | video/3gpp | MPEG4 / AAC audio |
+176 * 144 */
+
+/* 1: rtsp | video/3gpp | H.263 / AMR audio |
+176 * 144 */
+
+int mp_get_xmlitem(const char *content, int length, MpXMLItemInfo * item,
+                  int *nHttpCount, int *nRtspCount)
+{
+       int xml_order_of_format[MAX_YT_FORMAT] = { 3,
+               9,
+               2,
+               10,
+               6,
+               1,
+               0,
+       };
+
+       int index = 0;
+       char *url = NULL;
+       bool result = false;
+       int insert_item = 0;
+       int http_cnt = 0;
+       int rtsp_cnt = 0;
+       int item_cnt = 0;
+       while (xml_order_of_format[index] != 0) {
+               result =
+                   _parse_url_with_format(content, length,
+                                          xml_order_of_format[index], &url);
+               if (result == false)
+                       return -1;
+
+               if (url != NULL) {
+                       memcpy(item[item_cnt].szURL, url, strlen(url) + 1);
+                       item[item_cnt].id = xml_order_of_format[index];
+                       if (xml_order_of_format[index] != 10 &&
+                           xml_order_of_format[index] != 6 &&
+                           xml_order_of_format[index] != 1) {
+                               item[item_cnt].streaming_type =
+                                   MP_HTTP_STREAMING;
+                               http_cnt++;
+                       } else {
+                               item[item_cnt].streaming_type =
+                                   MP_RTSP_STREAMING;
+                               rtsp_cnt++;
+                       }
+
+                       printf("[%d] : %s\n", item[item_cnt].id,
+                              item[item_cnt].szURL);
+                       if (url) {
+                               free(url);
+                               url = NULL;
+                       }
+                       insert_item++;
+                       item_cnt++;
+               }
+               index++;
+       }
+       *nHttpCount = http_cnt;
+       *nRtspCount = rtsp_cnt;
+       return insert_item;
+}
+
+bool mp_get_url_from_xml(const char *content, int length, char **streamer_url,
+                        int mode)
+{
+       bool result = false;
+       int index = 1;
+
+       /* disable http for field test. must remove comment later.
+          (request from yoserb.yi) */
+       int wifi_order_of_format[MAX_YT_FORMAT] = {
+               3,
+               9,
+               2,
+               10,
+               6,
+               1,
+               0,
+       };
+
+       int order_of_format[MAX_YT_FORMAT] = {
+               9,
+               10,
+               2,
+               6,
+               1,
+               0,
+       };
+
+       if (mode == _WIFI_MODE_) {
+               index = 0;
+               while (wifi_order_of_format[index] != 0) {
+                       result = _parse_url_with_format(content, length,
+                                                       wifi_order_of_format
+                                                       [index], streamer_url);
+                       if (result == false)
+                               return false;
+
+                       if (*streamer_url != NULL) {
+                               VideoLogInfo
+                                   ("success to parse url (yt_format = %d)",
+                                    wifi_order_of_format[index]);
+                               return true;
+                       } else {
+                               VideoLogInfo("no url for yt_format %d",
+                                            wifi_order_of_format[index]);
+                               index++;
+                       }
+               }
+
+       } else {
+               if (mode == _3G_MODE_)
+                       index = 0;
+
+               VideoLogInfo("mode: 0x%x, index: %d", mode, index);
+               while (order_of_format[index] != 0) {
+                       result = _parse_url_with_format(content, length,
+                                                       order_of_format[index],
+                                                       streamer_url);
+                       if (result == false)
+                               return false;
+
+                       if (*streamer_url != NULL) {
+                               VideoLogInfo
+                                   ("success to parse url (yt_format = %d)",
+                                    order_of_format[index]);
+                               return true;
+                       } else {
+                               VideoLogInfo("no url for yt_format %d",
+                                            order_of_format[index]);
+                               index++;
+                       }
+               }
+       }
+       VideoLogInfo("can't find url to play!");
+       return false;
+}
+
+bool _parse_url_with_format(const char *content, int length, int format,
+                           char **streamer_url)
+{
+       char video_url[1024] = "\0";
+       xmlDocPtr doc = NULL;
+       xmlNode *current = NULL;
+
+       doc = xmlReadMemory(content, length, NULL, NULL, 0);
+       if (doc == NULL) {
+               VideoLogInfo("Failed to parse document\n");
+               xmlFreeDoc(doc);
+               xmlMemoryDump();
+
+               return false;
+       }
+
+       xmlChar *url, *yt_format;
+       current = xmlDocGetRootElement(doc);
+       current = current->xmlChildrenNode;
+       while (current != NULL) {
+               if ((!xmlStrcmp(current->name, (const xmlChar *)"group"))) {
+                       xmlNodePtr current_group = current->xmlChildrenNode;
+                       while (current_group != NULL) {
+                               if (!xmlStrcmp(current_group->name,
+                                              (const xmlChar *)"content")) {
+                                       yt_format = xmlGetProp(current_group,
+                                                              (const xmlChar *)
+                                                              "format");
+                                       if (yt_format != NULL && format ==
+                                           atoi((char *)yt_format)) {
+                                               url =
+                                                   xmlGetProp(current_group,
+                                                              (const xmlChar *)
+                                                              "url");
+                                               strncpy(video_url,
+                                                       (const char *)url,
+                                                       sizeof(video_url) - 1);
+                                               xmlFree(url);
+                                               xmlFree(yt_format);
+                                               break;
+                                       }
+                                       xmlFree(yt_format);
+                               }
+                               current_group = current_group->next;
+                       }
+                       break;
+               }
+               current = current->next;
+       }
+
+       xmlFreeDoc(doc);
+       xmlMemoryDump();
+
+       if (strlen(video_url)) {
+               *streamer_url = (char *)calloc(1, strlen(video_url) + 1);
+               memcpy(*streamer_url, video_url, strlen(video_url) + 1);
+       }
+
+       return true;
+}
+
+char *mp_get_title_from_xml(const char *path)
+{
+       char *content = NULL;
+       unsigned int length = 0;
+
+       if (!path)
+               return NULL;
+
+       if (!g_str_has_suffix(path, ".xml"))
+               return NULL;
+
+       length = mp_read_xml_file(path, &content);
+       if (length == 0 || content == NULL) {
+               free(content);
+               return NULL;
+       }
+
+       char title[1024] = "\0";
+       xmlDocPtr doc = NULL;
+       xmlNode *current = NULL;
+
+       doc = xmlReadMemory(content, length, NULL, NULL, 0);
+       if (doc == NULL) {
+               VideoLogInfo("Failed to parse document\n");
+               xmlFreeDoc(doc);
+               xmlMemoryDump();
+
+               return NULL;
+       }
+
+       xmlChar *xml_title = NULL;
+       current = xmlDocGetRootElement(doc);
+       current = current->xmlChildrenNode;
+       while (current != NULL) {
+               if ((!xmlStrcmp(current->name, (const xmlChar *)"group"))) {
+                       xmlNodePtr current_group = current->xmlChildrenNode;
+                       while (current_group != NULL) {
+                               if (!xmlStrcmp
+                                   (current_group->name,
+                                    (const xmlChar *)"title")) {
+                                       xml_title =
+                                           xmlNodeGetContent(current_group);
+                                       if (xml_title) {
+                                               strncpy(title,
+                                                       (const char *)xml_title,
+                                                       sizeof(title) - 1);
+                                               VideoLogInfo("xml_title=%x ",
+                                                            xml_title);
+                                               xmlFree(xml_title);
+                                       }
+                                       break;
+                               }
+                               current_group = current_group->next;
+                       }
+                       break;
+               }
+               current = current->next;
+       }
+
+       xmlFreeDoc(doc);
+       xmlMemoryDump();
+
+       free(content);
+
+       if (strlen(title))
+               return strdup(title);
+       else
+               return NULL;
+
+}
diff --git a/src/video-player.c b/src/video-player.c
new file mode 100644 (file)
index 0000000..8ed34c8
--- /dev/null
@@ -0,0 +1,306 @@
+/*
+ * 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 [2012] [JongDong Lee <jongdong.lee@samsung.com>, ChangSun Lee <cs78.lee@samsung.com>]
+ * 
+ *    Licensed under the Flora License, Version 1.0 (the "License");
+ *    you may not use this file except in compliance with the License.
+ *    You may obtain a copy of the License at
+ * 
+ *        http://www.tizenopensource.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.
+ */
+
+
+#include <app.h>
+#include <glib.h>
+#include <pmapi.h>
+
+#include "mp-util.h"
+#include "mp-video-log.h"
+#include "video-player.h"
+#include "mp-video-app-ctrl.h"
+#include "mp-util-media-service.h"
+#include "mp-video-string-define.h"
+#include "mp-external-ug.h"
+#include "mp-video-service-ctrl.h"
+
+
+static bool bIsForeground = FALSE;
+
+
+static bool appCreate(void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR] No exist pUserData.");
+               return FALSE;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+#ifdef TARGET
+       elm_config_preferred_engine_set("opengl_x11");
+#else
+       elm_config_preferred_engine_set("software_x11");
+#endif
+
+       elm_theme_extension_add(NULL, VIDEO_CUSTOM_THEME);
+
+       MpUtilInitSession();
+       MpUtilVolumeTypeSet();
+       MpUtilLanguageInit(pAppData);
+
+       bIsForeground = FALSE;
+       MpVideoAppCtrlSetForCheckingForegroundwindow(FALSE);
+       return TRUE;
+}
+
+static void appService(service_h pAppSvcHandle, void *pUserData)
+{
+       VideoLogInfo("");
+       if(!pUserData)
+       {
+               VideoLogInfo("[ERR] No exist pUserData.");
+               bIsForeground = FALSE;
+               MpVideoAppCtrlSetForCheckingForegroundwindow(FALSE);
+               return;
+       }
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       if(!pAppSvcHandle)
+       {
+               VideoLogInfo("[ERR] No exist pBundle.");
+               bIsForeground = FALSE;
+               MpVideoAppCtrlSetForCheckingForegroundwindow(FALSE);
+               return;
+       }
+
+       if(strlen(pAppData->szMediaUri) > 0)
+       {
+               MpVideoAppCtrlResetForRelaunching(pAppData);
+       }
+
+       if(pAppData->pMainWindow == NULL)
+       {
+               VideoLogInfo("Create main window.");
+               pAppData->pMainWindow = (Evas_Object *)MpUtilCreateMainWindow(PACKAGE);
+               evas_object_show(pAppData->pMainWindow);
+       }
+
+       MpUtilSetKeyGrab(HOME_KEY, KEY_GRAB_SHARED);
+       MpUtilMediaSvcInitSession();
+
+       if(MpVideoServiceCtrlInitServiceParser((void*)pAppSvcHandle, pAppData->szMediaUri) == MP_ERROR_PLAYER_TYPE)
+       {
+               VideoLogInfo("[ERR] Fail to init service parser.");
+               bIsForeground = FALSE;
+               MpVideoAppCtrlSetForCheckingForegroundwindow(FALSE);
+               return;
+       }
+
+       if(!MpUtilMMCstatusNoti(pAppData))
+       {
+               VideoLogInfo("[ERR] Fail to set MMC notification.");
+               bIsForeground = FALSE;
+               MpVideoAppCtrlSetForCheckingForegroundwindow(FALSE);
+               return;
+       }
+
+
+       if(!MpUtilBatteryStatusNoti(pAppData))
+       {
+               VideoLogInfo("[ERR] Fail to set Battery notification.");
+               bIsForeground = FALSE;
+               MpVideoAppCtrlSetForCheckingForegroundwindow(FALSE);
+               return;
+       }
+
+       MpUtilVolumeTypeSet();
+
+       MpVideoAppCtrlInit(pAppData);
+}
+
+static void appExit(void *pUserData)
+{
+       VideoLogInfo("");
+
+       if (!pUserData) {
+               VideoLogInfo("[ERR] No exist pUserData.");
+               return;
+       }
+
+       MpUtilLcdOffForPowerButton();
+
+       MpUtilSetKeyUngrab(HOME_KEY);
+       MpUtilMultimediaKeyUngrab();
+       MpUtilMMCstatusNotiIgnore();
+       MpUtilBatteryStatusNotiIgnore();
+       MpUtilVolumeTypeUnset();
+       MpUtilFinishSession();
+       MpUtilDeletePopupHandle();
+       MpUtilMediaSvcDestoryVideoList();
+       MpUtilMediaSvcFinishSession();
+       MpUtilDestroyXML();
+
+       bIsForeground = FALSE;
+       MpVideoAppCtrlSetForCheckingForegroundwindow(FALSE);
+}
+
+static void appPause(void *pUserData)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("No exist pUserdata handle.");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       int nTmpPlayerType = MpVideoServiceCtrlGetPlayerType();
+
+       if(nTmpPlayerType == MP_VIDEO_PLAYER ||
+                       nTmpPlayerType == MP_VIDEO_PLAYER_SIMPLE ||
+                       nTmpPlayerType == MP_VIDEO_PLAYER_GALLERY ||
+                       nTmpPlayerType == MP_VIDEO_PLAYER_EMAIL ||
+                       nTmpPlayerType == MP_VIDEO_PLAYER_MMS)
+       {
+               VideoLogInfo("Pause application at video player.");
+               pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlStopByAppPause(pAppData);
+       }
+       else if(nTmpPlayerType == MP_STREAMING_PLAYER)
+       {
+               VideoLogInfo("Pause application at streaming player.");
+               pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlExit(pAppData);
+       }
+
+               pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlHideLayout(pAppData);
+
+       MpUtilDeletePopupHandle();
+       MpUtilVolumeTypeUnset();
+
+       elm_win_indicator_mode_set(pAppData->pMainWindow, ELM_WIN_INDICATOR_SHOW);
+
+       bIsForeground = FALSE;
+       MpVideoAppCtrlSetForCheckingForegroundwindow(FALSE);
+}
+
+static void appResume(void *pUserData)
+{
+       if(!pUserData)
+       {
+               VideoLogInfo("No exist pUserdata handle.");
+               return;
+       }
+
+       VideoLogInfo("");
+
+       VideoAppData *pAppData = (VideoAppData *)pUserData;
+
+       if(bIsForeground)
+       {
+               VideoLogInfo("Defence overlap launching.");
+               return;
+       }
+
+               if(!MpVideoAppCtrlIsTopView(pUserData))
+               {
+                       VideoLogInfo("Overlay is not staied in top.");
+                       return;
+               }
+
+               VideoLogInfo("Resume application.");
+
+               if(MpVideoAppCtrlIsExistPlayerHandle())
+               {
+                       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlResume(pAppData);
+               }
+               else
+               {
+                       pAppData->VideoAppCtrlCallbackFunc.VideoAppCtrlStartByAppResume(pAppData);
+               }
+
+       MpUtilVolumeTypeSet();
+
+       elm_win_indicator_mode_set(pAppData->pMainWindow, ELM_WIN_INDICATOR_SHOW);
+
+       bIsForeground = TRUE;
+       MpVideoAppCtrlSetForCheckingForegroundwindow(TRUE);
+}
+
+static void appRotate(app_device_orientation_e rotateState, void *pUserData)
+{
+       VideoLogInfo("");
+
+       int nCurRotate = 0;
+
+       switch(rotateState)
+       {
+       case APP_DEVICE_ORIENTATION_0:
+               VideoLogInfo("VIDEO_ROTATE_PORTRAIT_NORMAL");
+               nCurRotate = VIDEO_ROTATE_PORTRAIT_NORMAL;
+               break;
+
+       case APP_DEVICE_ORIENTATION_90:
+               VideoLogInfo("VIDEO_ROTATE_LANDSCAPE_REVERSE");
+               nCurRotate = VIDEO_ROTATE_LANDSCAPE_REVERSE;
+               break;
+
+       case APP_DEVICE_ORIENTATION_180:
+               VideoLogInfo("VIDEO_ROTATE_PORTRAIT_REVERSE");
+               nCurRotate = VIDEO_ROTATE_PORTRAIT_REVERSE;
+               break;
+
+       case APP_DEVICE_ORIENTATION_270:
+               VideoLogInfo("VIDEO_ROTATE_LANDSCAPE_NORMAL");
+               nCurRotate = VIDEO_ROTATE_LANDSCAPE_NORMAL;
+               break;
+       }
+
+       MpVideoAppCtrlSetRotation(nCurRotate, pUserData);
+}
+
+int main(int argc, char *argv[])
+{
+       struct timeval TimeVal;
+       gettimeofday(&TimeVal, NULL);
+
+       VideoLogInfo("======================================================");
+       VideoLogInfo(" Measuring exec() launching  time - %ld:%ldus", TimeVal.tv_sec, TimeVal.tv_usec);
+       VideoLogInfo("======================================================");
+
+       VideoAppData pAppData;
+       memset(&pAppData, 0, sizeof(VideoAppData));
+
+       app_event_callback_s st_appEventService;
+
+       st_appEventService.create = appCreate;
+       st_appEventService.terminate = appExit;
+       st_appEventService.pause = appPause;
+       st_appEventService.resume = appResume;
+       st_appEventService.service = appService;
+       st_appEventService.low_memory = NULL;
+       st_appEventService.low_battery = NULL;
+       st_appEventService.device_orientation = appRotate;
+       st_appEventService.language_changed = NULL;
+       st_appEventService.region_format_changed = NULL;
+
+       if(app_efl_main(&argc, &argv, &st_appEventService, &pAppData) != APP_ERROR_NONE)
+       {
+               VideoLogInfo("[ERR] app_efl_main().");
+               return -1;
+       }
+
+       VideoLogInfo("escape app_efl_main() loop.");
+
+       return 0;
+}
diff --git a/test/Makefile.am b/test/Makefile.am
deleted file mode 100644 (file)
index 16a3cd2..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-# Process this file with automake to produce Makefile.in
-
-SUBDIRS = api shaping
-
--include $(top_srcdir)/git.mk
diff --git a/test/api/Makefile.am b/test/api/Makefile.am
deleted file mode 100644 (file)
index e6c0c01..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-# Process this file with automake to produce Makefile.in
-
-NULL =
-EXTRA_DIST =
-CLEANFILES =
-DISTCLEANFILES =
-MAINTAINERCLEANFILES =
-
-if HAVE_GLIB
-AM_CPPFLAGS = -DSRCDIR="\"$(srcdir)\"" -I$(top_srcdir)/src/ -I$(top_builddir)/src/ $(GLIB_CFLAGS) $(GTHREAD_CFLAGS)
-LDADD = $(top_builddir)/src/libharfbuzz.la $(GLIB_LIBS) $(GTHREAD_LIBS)
-
-EXTRA_DIST += hb-test.h
-
-check_PROGRAMS = $(TEST_PROGS)
-noinst_PROGRAMS = $(TEST_PROGS)
-
-TEST_PROGS = \
-       test-blob \
-       test-buffer \
-       test-common \
-       test-font \
-       test-object \
-       test-shape \
-       test-unicode \
-       test-version \
-       $(NULL)
-
-if HAVE_OT
-TEST_PROGS += \
-       test-ot-tag \
-       $(NULL)
-endif
-
-# Tests for header compilation
-TEST_PROGS += \
-       test-c \
-       test-cplusplus \
-       $(NULL)
-test_cplusplus_SOURCES = test-cplusplus.cc
-test_c_CPPFLAGS = $(AM_CPPFLAGS)
-test_cplusplus_CPPFLAGS = $(AM_CPPFLAGS)
-if HAVE_ICU
-test_c_CPPFLAGS += $(ICU_CFLAGS)
-test_cplusplus_CPPFLAGS += $(ICU_CFLAGS)
-endif
-if HAVE_FREETYPE
-test_c_CPPFLAGS += $(FREETYPE_CFLAGS)
-test_cplusplus_CPPFLAGS += $(FREETYPE_CFLAGS)
-endif
-
-
-# Default test running environment
-TESTS = $(TEST_PROGS)
-TESTS_ENVIRONMENT = \
-       MALLOC_CHECK_=2 \
-       MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256)) \
-       G_DEBUG=gc-friendly \
-       G_SLICE=always-malloc \
-       srcdir=$(srcdir) \
-       $(ENV)
-
-
-# check-tool: Run tests under $(TOOL)
-check-tool:
-       $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) check \
-       TESTS_ENVIRONMENT='$(TESTS_ENVIRONMENT) $(top_builddir)/libtool --mode=execute \
-       env $(TOOL)'
-# check-tool-raw: Run tests under $(TOOL), but don't run under libtool
-check-tool-raw:
-       $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) check \
-       TESTS_ENVIRONMENT='$(TESTS_ENVIRONMENT) \
-       env $(TOOL)'
-
-# check-gtester: Run tests under gtester
-GTESTER = gtester
-check-gtester:
-       $(AM_V_at)$(MAKE) $(AM_MAKEFLGS) check-tool-raw TOOL="$(GTESTER) --verbose --keep-going"
-
-
-# Check tests under valgrind.  Saves log to log-valgrind.txt
-VALGRIND_FLAGS = \
-       --tool=memcheck --suppressions=$(srcdir)/.valgrind-suppressions \
-       --track-origins=yes \
-       --leak-check=yes
-       $(EXTRA_VALGRIND_FLAGS)
-#      Can't do for now: --show-reachable=yes
-CLEANFILES +=  log-valgrind.txt
-valgrind_verbose = $(valgrind_verbose_$(V))
-valgrind_verbose_ = $(valgrind_verbose_$(AM_DEFAULT_VERBOSITY))
-valgrind_verbose_0 = | \
-       grep '\(^[^=]\|ERROR SUMMARY\|definitely lost\|indirectly lost\)' | grep -v ': 0'
-# TODO: The following check does not fail if valgrind finds error.  It should.
-check-valgrind:
-       $(AM_V_at)$(MAKE) $(AM_MAKEFLGS) check-tool TOOL="valgrind $(VALGRIND_FLAGS)" \
-       2>&1 | tee log-valgrind.txt $(valgrind_verbose)
-
-
-# check-symbols: Finds untested API symbols
-symbols-tested.txt: $(TEST_PROGS)
-       $(AM_V_GEN)$(top_builddir)/libtool --mode=execute nm $^ \
-       | grep ' U hb_' | sed 's/.* U hb_/hb_/' \
-       | sort | uniq > $@.tmp && mv $@.tmp $@
-symbols-exported.txt: $(top_builddir)/src/.libs/libharfbuzz.so
-       $(AM_V_GEN)$(top_builddir)/libtool --mode=execute nm $^ \
-       | grep ' T ' | sed 's/.* T //' | grep -v '^\(_init\|_fini\)$$' \
-       | sort | uniq > $@.tmp && mv $@.tmp $@
-symbols-untested.txt: symbols-tested.txt symbols-exported.txt
-       $(AM_V_GEN)diff $^ > $@.tmp; mv $@.tmp $@
-CLEANFILES += symbols-tested.txt symbols-exported.txt symbols-untested.txt
-check-symbols: symbols-untested.txt
-       @! cat $^ | grep .
-
-
-
-else
-check-am: err-glib
-err-glib:
-       @echo "You need to have glib support enabled to run the tests"
-       @exit 77
-endif
-
-.PHONY: check-symbols check-tool check-valgrind
-
--include $(top_srcdir)/git.mk
diff --git a/test/api/hb-test.h b/test/api/hb-test.h
deleted file mode 100644 (file)
index f36d53b..0000000
+++ /dev/null
@@ -1,265 +0,0 @@
-/*
- * Copyright © 2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef HB_TEST_H
-#define HB_TEST_H
-
-#include <config.h>
-
-#include <hb-glib.h>
-
-#include <stdlib.h>
-#include <string.h>
-
-HB_BEGIN_DECLS
-
-/* Just in case */
-#undef G_DISABLE_ASSERT
-
-
-/* Misc */
-
-/* This is too ugly to be public API, but quite handy. */
-#define HB_TAG_CHAR4(s)   (HB_TAG(((const char *) s)[0], \
-                                 ((const char *) s)[1], \
-                                 ((const char *) s)[2], \
-                                 ((const char *) s)[3]))
-
-
-static inline const char *
-srcdir (void)
-{
-  static const char *s;
-
-  if (!s) {
-    s = getenv ("srcdir");
-
-#ifdef SRCDIR
-    if (!s || !s[0])
-      s = SRCDIR;
-#endif
-
-    if (!s || !s[0])
-      s = ".";
-  }
-
-  return s;
-}
-
-
-/* Helpers */
-
-static inline void
-hb_test_init (int *argc, char ***argv)
-{
-  g_thread_init (NULL);
-  g_test_init (argc, argv, NULL);
-}
-
-static inline int
-hb_test_run (void)
-{
-  return g_test_run ();
-}
-
-
-/* Bugzilla helpers */
-
-static inline void
-hb_test_bug (const char *uri_base, unsigned int number)
-{
-  char *s = g_strdup_printf ("%u", number);
-
-  g_test_bug_base (uri_base);
-  g_test_bug (s);
-
-  g_free (s);
-}
-
-static inline void
-hb_test_bug_freedesktop (unsigned int number)
-{
-  hb_test_bug ("http://bugs.freedesktop.org/", number);
-}
-
-static inline void
-hb_test_bug_gnome (unsigned int number)
-{
-  hb_test_bug ("http://bugzilla.gnome.org/", number);
-}
-
-static inline void
-hb_test_bug_mozilla (unsigned int number)
-{
-  hb_test_bug ("http://bugzilla.mozilla.org/", number);
-}
-
-static inline void
-hb_test_bug_redhat (unsigned int number)
-{
-  hb_test_bug ("http://bugzilla.redhat.com/", number);
-}
-
-
-/* Wrap glib test functions to simplify.  Should have been in glib already. */
-
-/* Drops the "test_" prefix and converts '_' to '/'.
- * Essentially builds test path from function name. */
-static inline char *
-hb_test_normalize_path (const char *path)
-{
-  char *s, *p;
-
-  g_assert (0 == strncmp (path, "test_", 5));
-  path += 4;
-
-  s = g_strdup (path);
-  for (p = s; *p; p++)
-    if (*p == '_')
-      *p = '/';
-
-  return s;
-}
-
-
-#if GLIB_CHECK_VERSION(2,25,12)
-typedef GTestFunc        hb_test_func_t;
-typedef GTestDataFunc    hb_test_data_func_t;
-typedef GTestFixtureFunc hb_test_fixture_func_t;
-#else
-typedef void (*hb_test_func_t)         (void);
-typedef void (*hb_test_data_func_t)    (gconstpointer user_data);
-typedef void (*hb_test_fixture_func_t) (void);
-#endif
-
-#if !GLIB_CHECK_VERSION(2,30,0)
-#define g_test_fail() g_error("Test failed")
-#endif
-
-static inline void
-hb_test_add_func (const char *test_path,
-                 hb_test_func_t   test_func)
-{
-  char *normal_path = hb_test_normalize_path (test_path);
-  g_test_add_func (normal_path, test_func);
-  g_free (normal_path);
-}
-#define hb_test_add(Func) hb_test_add_func (#Func, Func)
-
-static inline void
-hb_test_add_func_flavor (const char *test_path,
-                        const char *flavor,
-                        hb_test_func_t   test_func)
-{
-  char *path = g_strdup_printf ("%s/%s", test_path, flavor);
-  hb_test_add_func (path, test_func);
-  g_free (path);
-}
-#define hb_test_add_flavor(Flavor, Func) hb_test_add_func (#Func, Flavor, Func)
-
-static inline void
-hb_test_add_data_func (const char          *test_path,
-                      gconstpointer        test_data,
-                      hb_test_data_func_t  test_func)
-{
-  char *normal_path = hb_test_normalize_path (test_path);
-  g_test_add_data_func (normal_path, test_data, test_func);
-  g_free (normal_path);
-}
-#define hb_test_add_data(UserData, Func) hb_test_add_data_func (#Func, UserData, Func)
-
-static inline void
-hb_test_add_data_func_flavor (const char          *test_path,
-                             const char          *flavor,
-                             gconstpointer        test_data,
-                             hb_test_data_func_t  test_func)
-{
-  char *path = g_strdup_printf ("%s/%s", test_path, flavor);
-  hb_test_add_data_func (path, test_data, test_func);
-  g_free (path);
-}
-#define hb_test_add_data_flavor(UserData, Flavor, Func) hb_test_add_data_func_flavor (#Func, Flavor, UserData, Func)
-
-
-static inline void
-hb_test_add_vtable (const char             *test_path,
-                   gsize                   data_size,
-                   gconstpointer           test_data,
-                   hb_test_fixture_func_t  data_setup,
-                   hb_test_fixture_func_t  data_test,
-                   hb_test_fixture_func_t  data_teardown)
-{
-  char *normal_path = hb_test_normalize_path (test_path);
-  g_test_add_vtable (normal_path, data_size, test_data, data_setup, data_test, data_teardown);
-  g_free (normal_path);
-}
-#define hb_test_add_fixture(FixturePrefix, UserData, Func) \
-G_STMT_START { \
-  typedef G_PASTE (FixturePrefix, _t) Fixture; \
-  void (*add_vtable) (const char*, gsize, gconstpointer, \
-                     void (*) (Fixture*, gconstpointer), \
-                     void (*) (Fixture*, gconstpointer), \
-                     void (*) (Fixture*, gconstpointer)) \
-       = (void (*) (const gchar *, gsize, gconstpointer, \
-                    void (*) (Fixture*, gconstpointer), \
-                    void (*) (Fixture*, gconstpointer), \
-                    void (*) (Fixture*, gconstpointer))) hb_test_add_vtable; \
-  add_vtable (#Func, sizeof (G_PASTE (FixturePrefix, _t)), UserData, \
-             G_PASTE (FixturePrefix, _init), Func, G_PASTE (FixturePrefix, _finish)); \
-} G_STMT_END
-
-static inline void
-hb_test_add_vtable_flavor (const char             *test_path,
-                          const char             *flavor,
-                          gsize                   data_size,
-                          gconstpointer           test_data,
-                          hb_test_fixture_func_t  data_setup,
-                          hb_test_fixture_func_t  data_test,
-                          hb_test_fixture_func_t  data_teardown)
-{
-  char *path = g_strdup_printf ("%s/%s", test_path, flavor);
-  hb_test_add_vtable (path, data_size, test_data, data_setup, data_test, data_teardown);
-  g_free (path);
-}
-#define hb_test_add_fixture_flavor(FixturePrefix, UserData, Flavor, Func) \
-G_STMT_START { \
-  typedef G_PASTE (FixturePrefix, _t) Fixture; \
-  void (*add_vtable) (const char*, const char *, gsize, gconstpointer, \
-                     void (*) (Fixture*, gconstpointer), \
-                     void (*) (Fixture*, gconstpointer), \
-                     void (*) (Fixture*, gconstpointer)) \
-       = (void (*) (const gchar *, const char *, gsize, gconstpointer, \
-                    void (*) (Fixture*, gconstpointer), \
-                    void (*) (Fixture*, gconstpointer), \
-                    void (*) (Fixture*, gconstpointer))) hb_test_add_vtable_flavor; \
-  add_vtable (#Func, Flavor, sizeof (G_PASTE (FixturePrefix, _t)), UserData, \
-             G_PASTE (FixturePrefix, _init), Func, G_PASTE (FixturePrefix, _finish)); \
-} G_STMT_END
-
-
-HB_END_DECLS
-
-#endif /* HB_TEST_H */
diff --git a/test/api/test-blob.c b/test/api/test-blob.c
deleted file mode 100644 (file)
index 5fcb208..0000000
+++ /dev/null
@@ -1,301 +0,0 @@
-/*
- * Copyright © 2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "hb-test.h"
-
-/* Unit tests for hb-blob.h */
-
-#if defined(HAVE_SYS_MMAN_H) && defined(HAVE_MPROTECT) && defined(HAVE_MMAP)
-
-# define TEST_MMAP 1
-
-#ifdef HAVE_SYS_MMAN_H
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-#include <sys/mman.h>
-#endif /* HAVE_SYS_MMAN_H */
-
-#endif
-
-
-static void
-test_blob_empty (void)
-{
-  hb_blob_t *blob;
-  unsigned int len;
-  const char *data;
-  char *data_writable;
-
-  g_assert (hb_blob_is_immutable (hb_blob_get_empty ()));
-  g_assert (hb_blob_get_empty () != NULL);
-  g_assert (hb_blob_get_empty () == hb_blob_create (NULL, 0, HB_MEMORY_MODE_READONLY, NULL, NULL));
-
-  blob = hb_blob_get_empty ();
-  g_assert (blob == hb_blob_get_empty ());
-
-  len = hb_blob_get_length (blob);
-  g_assert_cmpint (len, ==, 0);
-
-  data = hb_blob_get_data (blob, NULL);
-  g_assert (data == NULL);
-
-  data = hb_blob_get_data (blob, &len);
-  g_assert (data == NULL);
-  g_assert_cmpint (len, ==, 0);
-
-  data_writable = hb_blob_get_data_writable (blob, NULL);
-  g_assert (data == NULL);
-
-  data_writable = hb_blob_get_data_writable (blob, &len);
-  g_assert (data_writable == NULL);
-  g_assert_cmpint (len, ==, 0);
-}
-
-static const char test_data[] = "test\0data";
-
-static const char *blob_names[] = {
-  "duplicate",
-  "readonly",
-  "writable"
-#ifdef TEST_MMAP
-   , "readonly-may-make-writable"
-#endif
-};
-
-typedef struct
-{
-  hb_blob_t *blob;
-  int freed;
-  char *data;
-  unsigned int len;
-} fixture_t;
-
-static void
-free_up (fixture_t *fixture)
-{
-  g_assert_cmpint (fixture->freed, ==, 0);
-  fixture->freed++;
-}
-
-static void
-free_up_free (fixture_t *fixture)
-{
-  free_up (fixture);
-  free (fixture->data);
-}
-
-
-#ifdef TEST_MMAP
-static uintptr_t
-get_pagesize (void)
-{
-  uintptr_t pagesize = -1;
-
-#if defined(HAVE_SYSCONF) && defined(_SC_PAGE_SIZE)
-  pagesize = (uintptr_t) sysconf (_SC_PAGE_SIZE);
-#elif defined(HAVE_SYSCONF) && defined(_SC_PAGESIZE)
-  pagesize = (uintptr_t) sysconf (_SC_PAGESIZE);
-#elif defined(HAVE_GETPAGESIZE)
-  pagesize = (uintptr_t) getpagesize ();
-#endif
-
-  g_assert (pagesize != (uintptr_t) -1);
-
-  return pagesize;
-}
-
-static void
-free_up_munmap (fixture_t *fixture)
-{
-  free_up (fixture);
-  munmap (fixture->data, get_pagesize ());
-}
-#endif
-
-#include <errno.h>
-static void
-fixture_init (fixture_t *fixture, gconstpointer user_data)
-{
-  hb_memory_mode_t mm = (hb_memory_mode_t) GPOINTER_TO_INT (user_data);
-  unsigned int len;
-  const char *data;
-  hb_destroy_func_t free_func;
-
-  switch (GPOINTER_TO_INT (user_data))
-  {
-    case HB_MEMORY_MODE_DUPLICATE:
-      data = test_data;
-      len = sizeof (test_data);
-      free_func = (hb_destroy_func_t) free_up;
-      break;
-
-    case HB_MEMORY_MODE_READONLY:
-      data = test_data;
-      len = sizeof (test_data);
-      free_func = (hb_destroy_func_t) free_up;
-      break;
-
-    case HB_MEMORY_MODE_WRITABLE:
-      data = malloc (sizeof (test_data));
-      memcpy ((char *) data, test_data, sizeof (test_data));
-      len = sizeof (test_data);
-      free_func = (hb_destroy_func_t) free_up_free;
-      break;
-
-#ifdef TEST_MMAP
-    case HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE:
-    {
-      uintptr_t pagesize = get_pagesize ();
-
-      data = mmap (NULL, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0);
-      g_assert (data != (char *) -1);
-      memcpy ((char *) data, test_data, sizeof (test_data));
-      mprotect ((char *) data, pagesize, PROT_READ);
-      len = sizeof (test_data);
-      free_func = (hb_destroy_func_t) free_up_munmap;
-      break;
-    }
-#endif
-
-    default:
-      g_assert_not_reached ();
-  }
-
-  fixture->freed = 0;
-  fixture->data = (char *) data;
-  fixture->len = len;
-  fixture->blob = hb_blob_create (data, len, mm, fixture, free_func);
-}
-
-static void
-fixture_finish (fixture_t *fixture, gconstpointer user_data)
-{
-  hb_blob_destroy (fixture->blob);
-  g_assert_cmpint (fixture->freed, ==, 1);
-}
-
-
-static void
-test_blob (fixture_t *fixture, gconstpointer user_data)
-{
-  hb_blob_t *b = fixture->blob;
-  hb_memory_mode_t mm = GPOINTER_TO_INT (user_data);
-  unsigned int len;
-  const char *data;
-  char *data_writable;
-  unsigned int i;
-
-  g_assert (b);
-
-  len = hb_blob_get_length (b);
-  g_assert_cmpint (len, ==, fixture->len);
-
-  data = hb_blob_get_data (b, &len);
-  g_assert_cmpint (len, ==, fixture->len);
-  if (mm == HB_MEMORY_MODE_DUPLICATE) {
-    g_assert (data != fixture->data);
-    g_assert_cmpint (fixture->freed, ==, 1);
-    mm = HB_MEMORY_MODE_WRITABLE;
-  } else {
-    g_assert (data == fixture->data);
-    g_assert_cmpint (fixture->freed, ==, 0);
-  }
-
-  data_writable = hb_blob_get_data_writable (b, &len);
-  g_assert_cmpint (len, ==, fixture->len);
-  g_assert (data_writable);
-  g_assert (0 == memcmp (data_writable, fixture->data, fixture->len));
-  if (mm == HB_MEMORY_MODE_READONLY) {
-    g_assert (data_writable != data);
-    g_assert_cmpint (fixture->freed, ==, 1);
-  } else {
-    g_assert (data_writable == data);
-  }
-
-  data = hb_blob_get_data (b, &len);
-  g_assert_cmpint (len, ==, fixture->len);
-  g_assert (data == data_writable);
-
-  memset (data_writable, 0, fixture->len);
-
-  /* Now, make it immutable and watch get_data_writable() fail */
-
-  g_assert (!hb_blob_is_immutable (b));
-  hb_blob_make_immutable (b);
-  g_assert (hb_blob_is_immutable (b));
-
-  data_writable = hb_blob_get_data_writable (b, &len);
-  g_assert (!data_writable);
-  g_assert_cmpint (len, ==, 0);
-
-  data = hb_blob_get_data (b, &len);
-  g_assert_cmpint (len, ==, fixture->len);
-  for (i = 0; i < len; i++)
-    g_assert ('\0' == data[i]);
-}
-
-static void
-test_blob_subblob (fixture_t *fixture, gconstpointer user_data)
-{
-  hb_blob_t *b = fixture->blob;
-
-  fixture->len -= 2;
-  fixture->data++;
-  fixture->blob = hb_blob_create_sub_blob (b, 1, fixture->len);
-  hb_blob_destroy (b);
-
-  test_blob (fixture, user_data);
-
-  fixture->data--;
-  fixture->len += 2;
-}
-
-
-int
-main (int argc, char **argv)
-{
-  unsigned int i;
-
-  hb_test_init (&argc, &argv);
-
-  hb_test_add (test_blob_empty);
-
-  for (i = 0; i < G_N_ELEMENTS (blob_names); i++)
-  {
-    const void *blob_type = GINT_TO_POINTER (i);
-    const char *blob_name = blob_names[i];
-
-    hb_test_add_fixture_flavor (fixture, blob_type, blob_name, test_blob);
-    hb_test_add_fixture_flavor (fixture, blob_type, blob_name, test_blob_subblob);
-  }
-
-  /*
-   * create_sub_blob
-   */
-
-  return hb_test_run ();
-}
diff --git a/test/api/test-buffer.c b/test/api/test-buffer.c
deleted file mode 100644 (file)
index ab818d0..0000000
+++ /dev/null
@@ -1,783 +0,0 @@
-/*
- * Copyright © 2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "hb-test.h"
-
-/* Unit tests for hb-buffer.h */
-
-
-static const char utf8[10] = "ab\360\240\200\200defg";
-static const uint16_t utf16[8] = {'a', 'b', 0xD840, 0xDC00, 'd', 'e', 'f', 'g'};
-static const uint32_t utf32[7] = {'a', 'b', 0x20000, 'd', 'e', 'f', 'g'};
-
-
-typedef enum {
-  BUFFER_EMPTY,
-  BUFFER_ONE_BY_ONE,
-  BUFFER_UTF32,
-  BUFFER_UTF16,
-  BUFFER_UTF8,
-  BUFFER_NUM_TYPES,
-} buffer_type_t;
-
-static const char *buffer_names[] = {
-  "empty",
-  "one-by-one",
-  "utf32",
-  "utf16",
-  "utf8"
-};
-
-typedef struct
-{
-  hb_buffer_t *buffer;
-} fixture_t;
-
-static void
-fixture_init (fixture_t *fixture, gconstpointer user_data)
-{
-  hb_buffer_t *b;
-  unsigned int i;
-
-  b = fixture->buffer = hb_buffer_create ();
-
-  switch (GPOINTER_TO_INT (user_data))
-  {
-    case BUFFER_EMPTY:
-      break;
-
-    case BUFFER_ONE_BY_ONE:
-      for (i = 1; i < G_N_ELEMENTS (utf32) - 1; i++)
-       hb_buffer_add (b, utf32[i], 1, i);
-      break;
-
-    case BUFFER_UTF32:
-      hb_buffer_add_utf32 (b, utf32, G_N_ELEMENTS (utf32), 1, G_N_ELEMENTS (utf32) - 2);
-      break;
-
-    case BUFFER_UTF16:
-      hb_buffer_add_utf16 (b, utf16, G_N_ELEMENTS (utf16), 1, G_N_ELEMENTS (utf16) - 2);
-      break;
-
-    case BUFFER_UTF8:
-      hb_buffer_add_utf8  (b, utf8,  G_N_ELEMENTS (utf8),  1, G_N_ELEMENTS (utf8)  - 2);
-      break;
-
-    default:
-      g_assert_not_reached ();
-  }
-}
-
-static void
-fixture_finish (fixture_t *fixture, gconstpointer user_data)
-{
-  hb_buffer_destroy (fixture->buffer);
-}
-
-
-static void
-test_buffer_properties (fixture_t *fixture, gconstpointer user_data)
-{
-  hb_buffer_t *b = fixture->buffer;
-  hb_unicode_funcs_t *ufuncs;
-
-  /* test default properties */
-
-  g_assert (hb_buffer_get_unicode_funcs (b) == hb_unicode_funcs_get_default ());
-  g_assert (hb_buffer_get_direction (b) == HB_DIRECTION_INVALID);
-  g_assert (hb_buffer_get_script (b) == HB_SCRIPT_INVALID);
-  g_assert (hb_buffer_get_language (b) == NULL);
-
-
-  /* test property changes are retained */
-  ufuncs = hb_unicode_funcs_create (NULL);
-  hb_buffer_set_unicode_funcs (b, ufuncs);
-  hb_unicode_funcs_destroy (ufuncs);
-  g_assert (hb_buffer_get_unicode_funcs (b) == ufuncs);
-
-  hb_buffer_set_direction (b, HB_DIRECTION_RTL);
-  g_assert (hb_buffer_get_direction (b) == HB_DIRECTION_RTL);
-
-  hb_buffer_set_script (b, HB_SCRIPT_ARABIC);
-  g_assert (hb_buffer_get_script (b) == HB_SCRIPT_ARABIC);
-
-  hb_buffer_set_language (b, hb_language_from_string ("fa", -1));
-  g_assert (hb_buffer_get_language (b) == hb_language_from_string ("Fa", -1));
-
-
-  /* test reset clears properties */
-
-  hb_buffer_reset (b);
-
-  g_assert (hb_buffer_get_unicode_funcs (b) == hb_unicode_funcs_get_default ());
-  g_assert (hb_buffer_get_direction (b) == HB_DIRECTION_INVALID);
-  g_assert (hb_buffer_get_script (b) == HB_SCRIPT_INVALID);
-  g_assert (hb_buffer_get_language (b) == NULL);
-}
-
-static void
-test_buffer_contents (fixture_t *fixture, gconstpointer user_data)
-{
-  hb_buffer_t *b = fixture->buffer;
-  unsigned int i, len, len2;
-  buffer_type_t buffer_type = GPOINTER_TO_INT (user_data);
-  hb_glyph_info_t *glyphs;
-
-  if (buffer_type == BUFFER_EMPTY) {
-    g_assert_cmpint (hb_buffer_get_length (b), ==, 0);
-    return;
-  }
-
-  len = hb_buffer_get_length (b);
-  glyphs = hb_buffer_get_glyph_infos (b, NULL); /* test NULL */
-  glyphs = hb_buffer_get_glyph_infos (b, &len2);
-  g_assert_cmpint (len, ==, len2);
-  g_assert_cmpint (len, ==, 5);
-
-  for (i = 0; i < len; i++) {
-    g_assert_cmphex (glyphs[i].mask,      ==, 1);
-    g_assert_cmphex (glyphs[i].var1.u32,  ==, 0);
-    g_assert_cmphex (glyphs[i].var2.u32,  ==, 0);
-  }
-
-  for (i = 0; i < len; i++) {
-    unsigned int cluster;
-    cluster = 1+i;
-    if (i >= 2) {
-      if (buffer_type == BUFFER_UTF16)
-       cluster++;
-      else if (buffer_type == BUFFER_UTF8)
-        cluster += 3;
-    }
-    g_assert_cmphex (glyphs[i].codepoint, ==, utf32[1+i]);
-    g_assert_cmphex (glyphs[i].cluster,   ==, cluster);
-  }
-
-  /* reverse, test, and reverse back */
-
-  hb_buffer_reverse (b);
-  for (i = 0; i < len; i++)
-    g_assert_cmphex (glyphs[i].codepoint, ==, utf32[len-i]);
-
-  hb_buffer_reverse (b);
-  for (i = 0; i < len; i++)
-    g_assert_cmphex (glyphs[i].codepoint, ==, utf32[1+i]);
-
-  /* reverse_clusters works same as reverse for now since each codepoint is
-   * in its own cluster */
-
-  hb_buffer_reverse_clusters (b);
-  for (i = 0; i < len; i++)
-    g_assert_cmphex (glyphs[i].codepoint, ==, utf32[len-i]);
-
-  hb_buffer_reverse_clusters (b);
-  for (i = 0; i < len; i++)
-    g_assert_cmphex (glyphs[i].codepoint, ==, utf32[1+i]);
-
-  /* now form a cluster and test again */
-  glyphs[2].cluster = glyphs[1].cluster;
-
-  /* reverse, test, and reverse back */
-
-  hb_buffer_reverse (b);
-  for (i = 0; i < len; i++)
-    g_assert_cmphex (glyphs[i].codepoint, ==, utf32[len-i]);
-
-  hb_buffer_reverse (b);
-  for (i = 0; i < len; i++)
-    g_assert_cmphex (glyphs[i].codepoint, ==, utf32[1+i]);
-
-  /* reverse_clusters twice still should return the original string,
-   * but when applied once, the 1-2 cluster should be retained. */
-
-  hb_buffer_reverse_clusters (b);
-  for (i = 0; i < len; i++) {
-    unsigned int j = len-1-i;
-    if (j == 1)
-      j = 2;
-    else if (j == 2)
-      j = 1;
-    g_assert_cmphex (glyphs[i].codepoint, ==, utf32[1+j]);
-  }
-
-  hb_buffer_reverse_clusters (b);
-  for (i = 0; i < len; i++)
-    g_assert_cmphex (glyphs[i].codepoint, ==, utf32[1+i]);
-
-
-  /* test setting length */
-
-  /* enlarge */
-  g_assert (hb_buffer_set_length (b, 10));
-  glyphs = hb_buffer_get_glyph_infos (b, NULL);
-  g_assert_cmpint (hb_buffer_get_length (b), ==, 10);
-  for (i = 0; i < 5; i++)
-    g_assert_cmphex (glyphs[i].codepoint, ==, utf32[1+i]);
-  for (i = 5; i < 10; i++)
-    g_assert_cmphex (glyphs[i].codepoint, ==, 0);
-  /* shrink */
-  g_assert (hb_buffer_set_length (b, 3));
-  glyphs = hb_buffer_get_glyph_infos (b, NULL);
-  g_assert_cmpint (hb_buffer_get_length (b), ==, 3);
-  for (i = 0; i < 3; i++)
-    g_assert_cmphex (glyphs[i].codepoint, ==, utf32[1+i]);
-
-
-  g_assert (hb_buffer_allocation_successful (b));
-
-
-  /* test reset clears content */
-
-  hb_buffer_reset (b);
-  g_assert_cmpint (hb_buffer_get_length (b), ==, 0);
-}
-
-static void
-test_buffer_positions (fixture_t *fixture, gconstpointer user_data)
-{
-  hb_buffer_t *b = fixture->buffer;
-  unsigned int i, len, len2;
-  hb_glyph_position_t *positions;
-
-  /* Without shaping, positions should all be zero */
-  len = hb_buffer_get_length (b);
-  positions = hb_buffer_get_glyph_positions (b, NULL); /* test NULL */
-  positions = hb_buffer_get_glyph_positions (b, &len2);
-  g_assert_cmpint (len, ==, len2);
-  for (i = 0; i < len; i++) {
-    g_assert_cmpint (0, ==, positions[i].x_advance);
-    g_assert_cmpint (0, ==, positions[i].y_advance);
-    g_assert_cmpint (0, ==, positions[i].x_offset);
-    g_assert_cmpint (0, ==, positions[i].y_offset);
-    g_assert_cmpint (0, ==, positions[i].var.i32);
-  }
-
-  /* test reset clears content */
-  hb_buffer_reset (b);
-  g_assert_cmpint (hb_buffer_get_length (b), ==, 0);
-}
-
-static void
-test_buffer_allocation (fixture_t *fixture, gconstpointer user_data)
-{
-  hb_buffer_t *b = fixture->buffer;
-
-  g_assert_cmpint (hb_buffer_get_length (b), ==, 0);
-
-  g_assert (hb_buffer_pre_allocate (b, 100));
-  g_assert_cmpint (hb_buffer_get_length (b), ==, 0);
-  g_assert (hb_buffer_allocation_successful (b));
-
-  /* lets try a huge allocation, make sure it fails */
-  g_assert (!hb_buffer_pre_allocate (b, (unsigned int) -1));
-  g_assert_cmpint (hb_buffer_get_length (b), ==, 0);
-  g_assert (!hb_buffer_allocation_successful (b));
-
-  /* small one again */
-  g_assert (hb_buffer_pre_allocate (b, 50));
-  g_assert_cmpint (hb_buffer_get_length (b), ==, 0);
-  g_assert (!hb_buffer_allocation_successful (b));
-
-  hb_buffer_reset (b);
-  g_assert (hb_buffer_allocation_successful (b));
-
-  /* all allocation and size  */
-  g_assert (!hb_buffer_pre_allocate (b, ((unsigned int) -1) / 20 + 1));
-  g_assert (!hb_buffer_allocation_successful (b));
-
-  hb_buffer_reset (b);
-  g_assert (hb_buffer_allocation_successful (b));
-
-  /* technically, this one can actually pass on 64bit machines, but
-   * I'm doubtful that any malloc allows 4GB allocations at a time.
-   * But let's only enable it on a 32-bit machine. */
-  if (sizeof (long) == 4) {
-    g_assert (!hb_buffer_pre_allocate (b, ((unsigned int) -1) / 20 - 1));
-    g_assert (!hb_buffer_allocation_successful (b));
-  }
-
-  hb_buffer_reset (b);
-  g_assert (hb_buffer_allocation_successful (b));
-}
-
-
-typedef struct {
-  const char utf8[8];
-  const uint32_t codepoints[8];
-} utf8_conversion_test_t;
-
-/* note: we skip the first and last byte when adding to buffer */
-static const utf8_conversion_test_t utf8_conversion_tests[] = {
-  {"a\303\207", {-1}},
-  {"a\303\207b", {0xC7}},
-  {"ab\303cd", {'b', -1, 'c'}},
-  {"ab\303\302\301cd", {'b', -1, -1, -1, 'c'}}
-};
-
-static void
-test_buffer_utf8_conversion (void)
-{
-  hb_buffer_t *b;
-  hb_glyph_info_t *glyphs;
-  unsigned int bytes, chars, i, j, len;
-
-  b = hb_buffer_create ();
-
-  for (i = 0; i < G_N_ELEMENTS (utf8_conversion_tests); i++)
-  {
-    const utf8_conversion_test_t *test = &utf8_conversion_tests[i];
-    char *escaped;
-
-    escaped = g_strescape (test->utf8, NULL);
-    g_test_message ("UTF-8 test #%d: %s", i, escaped);
-    g_free (escaped);
-
-    bytes = strlen (test->utf8);
-    for (chars = 0; test->codepoints[chars]; chars++)
-      ;
-
-    hb_buffer_reset (b);
-    hb_buffer_add_utf8 (b, test->utf8, bytes,  1, bytes - 2);
-
-    glyphs = hb_buffer_get_glyph_infos (b, &len);
-    g_assert_cmpint (len, ==, chars);
-    for (j = 0; j < chars; j++)
-      g_assert_cmphex (glyphs[j].codepoint, ==, test->codepoints[j]);
-  }
-
-  hb_buffer_destroy (b);
-}
-
-
-
-/* Following test table is adapted from glib/glib/tests/utf8-validate.c
- * with relicensing permission from Matthias Clasen. */
-
-typedef struct {
-  const char *utf8;
-  int max_len;
-  unsigned int offset;
-  gboolean valid;
-} utf8_validity_test_t;
-
-static const utf8_validity_test_t utf8_validity_tests[] = {
-  /* some tests to check max_len handling */
-  /* length 1 */
-  { "abcde", -1, 5, TRUE },
-  { "abcde", 3, 3, TRUE },
-  { "abcde", 5, 5, TRUE },
-  /* length 2 */
-  { "\xc2\xa9\xc2\xa9\xc2\xa9", -1, 6, TRUE },
-  { "\xc2\xa9\xc2\xa9\xc2\xa9",  1, 0, FALSE },
-  { "\xc2\xa9\xc2\xa9\xc2\xa9",  2, 2, TRUE },
-  { "\xc2\xa9\xc2\xa9\xc2\xa9",  3, 2, FALSE },
-  { "\xc2\xa9\xc2\xa9\xc2\xa9",  4, 4, TRUE },
-  { "\xc2\xa9\xc2\xa9\xc2\xa9",  5, 4, FALSE },
-  { "\xc2\xa9\xc2\xa9\xc2\xa9",  6, 6, TRUE },
-  /* length 3 */
-  { "\xe2\x89\xa0\xe2\x89\xa0", -1, 6, TRUE },
-  { "\xe2\x89\xa0\xe2\x89\xa0",  1, 0, FALSE },
-  { "\xe2\x89\xa0\xe2\x89\xa0",  2, 0, FALSE },
-  { "\xe2\x89\xa0\xe2\x89\xa0",  3, 3, TRUE },
-  { "\xe2\x89\xa0\xe2\x89\xa0",  4, 3, FALSE },
-  { "\xe2\x89\xa0\xe2\x89\xa0",  5, 3, FALSE },
-  { "\xe2\x89\xa0\xe2\x89\xa0",  6, 6, TRUE },
-
-  /* examples from http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt */
-  /* greek 'kosme' */
-  { "\xce\xba\xe1\xbd\xb9\xcf\x83\xce\xbc\xce\xb5", -1, 11, TRUE },
-  /* first sequence of each length */
-  { "\x00", -1, 0, TRUE },
-  { "\xc2\x80", -1, 2, TRUE },
-  { "\xe0\xa0\x80", -1, 3, TRUE },
-  { "\xf0\x90\x80\x80", -1, 4, TRUE },
-  { "\xf8\x88\x80\x80\x80", -1, 0, FALSE },
-  { "\xfc\x84\x80\x80\x80\x80", -1, 0, FALSE },
-  /* last sequence of each length */
-  { "\x7f", -1, 1, TRUE },
-  { "\xdf\xbf", -1, 2, TRUE },
-  { "\xef\xbf\xbf", -1, 0, TRUE },
-  { "\xf7\xbf\xbf\xbf", -1, 0, TRUE },
-  { "\xfb\xbf\xbf\xbf\xbf", -1, 0, FALSE },
-  { "\xfd\xbf\xbf\xbf\xbf\xbf", -1, 0, FALSE },
-  /* other boundary conditions */
-  { "\xed\x9f\xbf", -1, 3, TRUE },
-  { "\xee\x80\x80", -1, 3, TRUE },
-  { "\xef\xbf\xbd", -1, 3, TRUE },
-  { "\xf4\x8f\xbf\xbf", -1, 0, TRUE },
-  /* malformed sequences */
-  /* continuation bytes */
-  { "\x80", -1, 0, FALSE },
-  { "\xbf", -1, 0, FALSE },
-  { "\x80\xbf", -1, 0, FALSE },
-  { "\x80\xbf\x80", -1, 0, FALSE },
-  { "\x80\xbf\x80\xbf", -1, 0, FALSE },
-  { "\x80\xbf\x80\xbf\x80", -1, 0, FALSE },
-  { "\x80\xbf\x80\xbf\x80\xbf", -1, 0, FALSE },
-  { "\x80\xbf\x80\xbf\x80\xbf\x80", -1, 0, FALSE },
-
-  /* all possible continuation byte */
-  { "\x80", -1, 0, FALSE },
-  { "\x81", -1, 0, FALSE },
-  { "\x82", -1, 0, FALSE },
-  { "\x83", -1, 0, FALSE },
-  { "\x84", -1, 0, FALSE },
-  { "\x85", -1, 0, FALSE },
-  { "\x86", -1, 0, FALSE },
-  { "\x87", -1, 0, FALSE },
-  { "\x88", -1, 0, FALSE },
-  { "\x89", -1, 0, FALSE },
-  { "\x8a", -1, 0, FALSE },
-  { "\x8b", -1, 0, FALSE },
-  { "\x8c", -1, 0, FALSE },
-  { "\x8d", -1, 0, FALSE },
-  { "\x8e", -1, 0, FALSE },
-  { "\x8f", -1, 0, FALSE },
-  { "\x90", -1, 0, FALSE },
-  { "\x91", -1, 0, FALSE },
-  { "\x92", -1, 0, FALSE },
-  { "\x93", -1, 0, FALSE },
-  { "\x94", -1, 0, FALSE },
-  { "\x95", -1, 0, FALSE },
-  { "\x96", -1, 0, FALSE },
-  { "\x97", -1, 0, FALSE },
-  { "\x98", -1, 0, FALSE },
-  { "\x99", -1, 0, FALSE },
-  { "\x9a", -1, 0, FALSE },
-  { "\x9b", -1, 0, FALSE },
-  { "\x9c", -1, 0, FALSE },
-  { "\x9d", -1, 0, FALSE },
-  { "\x9e", -1, 0, FALSE },
-  { "\x9f", -1, 0, FALSE },
-  { "\xa0", -1, 0, FALSE },
-  { "\xa1", -1, 0, FALSE },
-  { "\xa2", -1, 0, FALSE },
-  { "\xa3", -1, 0, FALSE },
-  { "\xa4", -1, 0, FALSE },
-  { "\xa5", -1, 0, FALSE },
-  { "\xa6", -1, 0, FALSE },
-  { "\xa7", -1, 0, FALSE },
-  { "\xa8", -1, 0, FALSE },
-  { "\xa9", -1, 0, FALSE },
-  { "\xaa", -1, 0, FALSE },
-  { "\xab", -1, 0, FALSE },
-  { "\xac", -1, 0, FALSE },
-  { "\xad", -1, 0, FALSE },
-  { "\xae", -1, 0, FALSE },
-  { "\xaf", -1, 0, FALSE },
-  { "\xb0", -1, 0, FALSE },
-  { "\xb1", -1, 0, FALSE },
-  { "\xb2", -1, 0, FALSE },
-  { "\xb3", -1, 0, FALSE },
-  { "\xb4", -1, 0, FALSE },
-  { "\xb5", -1, 0, FALSE },
-  { "\xb6", -1, 0, FALSE },
-  { "\xb7", -1, 0, FALSE },
-  { "\xb8", -1, 0, FALSE },
-  { "\xb9", -1, 0, FALSE },
-  { "\xba", -1, 0, FALSE },
-  { "\xbb", -1, 0, FALSE },
-  { "\xbc", -1, 0, FALSE },
-  { "\xbd", -1, 0, FALSE },
-  { "\xbe", -1, 0, FALSE },
-  { "\xbf", -1, 0, FALSE },
-  /* lone start characters */
-  { "\xc0\x20", -1, 0, FALSE },
-  { "\xc1\x20", -1, 0, FALSE },
-  { "\xc2\x20", -1, 0, FALSE },
-  { "\xc3\x20", -1, 0, FALSE },
-  { "\xc4\x20", -1, 0, FALSE },
-  { "\xc5\x20", -1, 0, FALSE },
-  { "\xc6\x20", -1, 0, FALSE },
-  { "\xc7\x20", -1, 0, FALSE },
-  { "\xc8\x20", -1, 0, FALSE },
-  { "\xc9\x20", -1, 0, FALSE },
-  { "\xca\x20", -1, 0, FALSE },
-  { "\xcb\x20", -1, 0, FALSE },
-  { "\xcc\x20", -1, 0, FALSE },
-  { "\xcd\x20", -1, 0, FALSE },
-  { "\xce\x20", -1, 0, FALSE },
-  { "\xcf\x20", -1, 0, FALSE },
-  { "\xd0\x20", -1, 0, FALSE },
-  { "\xd1\x20", -1, 0, FALSE },
-  { "\xd2\x20", -1, 0, FALSE },
-  { "\xd3\x20", -1, 0, FALSE },
-  { "\xd4\x20", -1, 0, FALSE },
-  { "\xd5\x20", -1, 0, FALSE },
-  { "\xd6\x20", -1, 0, FALSE },
-  { "\xd7\x20", -1, 0, FALSE },
-  { "\xd8\x20", -1, 0, FALSE },
-  { "\xd9\x20", -1, 0, FALSE },
-  { "\xda\x20", -1, 0, FALSE },
-  { "\xdb\x20", -1, 0, FALSE },
-  { "\xdc\x20", -1, 0, FALSE },
-  { "\xdd\x20", -1, 0, FALSE },
-  { "\xde\x20", -1, 0, FALSE },
-  { "\xdf\x20", -1, 0, FALSE },
-  { "\xe0\x20", -1, 0, FALSE },
-  { "\xe1\x20", -1, 0, FALSE },
-  { "\xe2\x20", -1, 0, FALSE },
-  { "\xe3\x20", -1, 0, FALSE },
-  { "\xe4\x20", -1, 0, FALSE },
-  { "\xe5\x20", -1, 0, FALSE },
-  { "\xe6\x20", -1, 0, FALSE },
-  { "\xe7\x20", -1, 0, FALSE },
-  { "\xe8\x20", -1, 0, FALSE },
-  { "\xe9\x20", -1, 0, FALSE },
-  { "\xea\x20", -1, 0, FALSE },
-  { "\xeb\x20", -1, 0, FALSE },
-  { "\xec\x20", -1, 0, FALSE },
-  { "\xed\x20", -1, 0, FALSE },
-  { "\xee\x20", -1, 0, FALSE },
-  { "\xef\x20", -1, 0, FALSE },
-  { "\xf0\x20", -1, 0, FALSE },
-  { "\xf1\x20", -1, 0, FALSE },
-  { "\xf2\x20", -1, 0, FALSE },
-  { "\xf3\x20", -1, 0, FALSE },
-  { "\xf4\x20", -1, 0, FALSE },
-  { "\xf5\x20", -1, 0, FALSE },
-  { "\xf6\x20", -1, 0, FALSE },
-  { "\xf7\x20", -1, 0, FALSE },
-  { "\xf8\x20", -1, 0, FALSE },
-  { "\xf9\x20", -1, 0, FALSE },
-  { "\xfa\x20", -1, 0, FALSE },
-  { "\xfb\x20", -1, 0, FALSE },
-  { "\xfc\x20", -1, 0, FALSE },
-  { "\xfd\x20", -1, 0, FALSE },
-  /* missing continuation bytes */
-  { "\x20\xc0", -1, 1, FALSE },
-  { "\x20\xe0\x80", -1, 1, FALSE },
-  { "\x20\xf0\x80\x80", -1, 1, FALSE },
-  { "\x20\xf8\x80\x80\x80", -1, 1, FALSE },
-  { "\x20\xfc\x80\x80\x80\x80", -1, 1, FALSE },
-  { "\x20\xdf", -1, 1, FALSE },
-  { "\x20\xef\xbf", -1, 1, FALSE },
-  { "\x20\xf7\xbf\xbf", -1, 1, FALSE },
-  { "\x20\xfb\xbf\xbf\xbf", -1, 1, FALSE },
-  { "\x20\xfd\xbf\xbf\xbf\xbf", -1, 1, FALSE },
-  /* impossible bytes */
-  { "\x20\xfe\x20", -1, 1, FALSE },
-  { "\x20\xff\x20", -1, 1, FALSE },
-#if 0
-  /* XXX fix these, or document that we don't detect them? */
-  /* overlong sequences */
-  { "\x20\xc0\xaf\x20", -1, 1, FALSE },
-  { "\x20\xe0\x80\xaf\x20", -1, 1, FALSE },
-  { "\x20\xf0\x80\x80\xaf\x20", -1, 1, FALSE },
-  { "\x20\xf8\x80\x80\x80\xaf\x20", -1, 1, FALSE },
-  { "\x20\xfc\x80\x80\x80\x80\xaf\x20", -1, 1, FALSE },
-  { "\x20\xc1\xbf\x20", -1, 1, FALSE },
-  { "\x20\xe0\x9f\xbf\x20", -1, 1, FALSE },
-  { "\x20\xf0\x8f\xbf\xbf\x20", -1, 1, FALSE },
-  { "\x20\xf8\x87\xbf\xbf\xbf\x20", -1, 1, FALSE },
-  { "\x20\xfc\x83\xbf\xbf\xbf\xbf\x20", -1, 1, FALSE },
-  { "\x20\xc0\x80\x20", -1, 1, FALSE },
-  { "\x20\xe0\x80\x80\x20", -1, 1, FALSE },
-  { "\x20\xf0\x80\x80\x80\x20", -1, 1, FALSE },
-  { "\x20\xf8\x80\x80\x80\x80\x20", -1, 1, FALSE },
-  { "\x20\xfc\x80\x80\x80\x80\x80\x20", -1, 1, FALSE },
-  /* illegal code positions */
-  { "\x20\xed\xa0\x80\x20", -1, 1, FALSE },
-  { "\x20\xed\xad\xbf\x20", -1, 1, FALSE },
-  { "\x20\xed\xae\x80\x20", -1, 1, FALSE },
-  { "\x20\xed\xaf\xbf\x20", -1, 1, FALSE },
-  { "\x20\xed\xb0\x80\x20", -1, 1, FALSE },
-  { "\x20\xed\xbe\x80\x20", -1, 1, FALSE },
-  { "\x20\xed\xbf\xbf\x20", -1, 1, FALSE },
-  { "\x20\xed\xa0\x80\xed\xb0\x80\x20", -1, 1, FALSE },
-  { "\x20\xed\xa0\x80\xed\xbf\xbf\x20", -1, 1, FALSE },
-  { "\x20\xed\xad\xbf\xed\xb0\x80\x20", -1, 1, FALSE },
-  { "\x20\xed\xad\xbf\xed\xbf\xbf\x20", -1, 1, FALSE },
-  { "\x20\xed\xae\x80\xed\xb0\x80\x20", -1, 1, FALSE },
-  { "\x20\xed\xae\x80\xed\xbf\xbf\x20", -1, 1, FALSE },
-  { "\x20\xed\xaf\xbf\xed\xb0\x80\x20", -1, 1, FALSE },
-  { "\x20\xed\xaf\xbf\xed\xbf\xbf\x20", -1, 1, FALSE },
-  { "\x20\xef\xbf\xbe\x20", -1, 1, FALSE },
-  { "\x20\xef\xbf\xbf\x20", -1, 1, FALSE },
-#endif
-  { "", -1, 0, TRUE }
-};
-
-static void
-test_buffer_utf8_validity (void)
-{
-  hb_buffer_t *b;
-  unsigned int i;
-
-  b = hb_buffer_create ();
-
-  for (i = 0; i < G_N_ELEMENTS (utf8_validity_tests); i++)
-  {
-    const utf8_validity_test_t *test = &utf8_validity_tests[i];
-    unsigned int text_bytes, segment_bytes, j, len;
-    hb_glyph_info_t *glyphs;
-    char *escaped;
-
-    escaped = g_strescape (test->utf8, NULL);
-    g_test_message ("UTF-8 test #%d: %s", i, escaped);
-    g_free (escaped);
-
-    text_bytes = strlen (test->utf8);
-    if (test->max_len == -1)
-      segment_bytes = text_bytes;
-    else
-      segment_bytes = test->max_len;
-
-    hb_buffer_reset (b);
-    hb_buffer_add_utf8 (b, test->utf8, text_bytes,  0, segment_bytes);
-
-    glyphs = hb_buffer_get_glyph_infos (b, &len);
-    for (j = 0; j < len; j++)
-      if (glyphs[j].codepoint == (hb_codepoint_t) -1)
-       break;
-
-    g_assert (test->valid ? j == len : j < len);
-    if (!test->valid)
-      g_assert (glyphs[j].cluster == test->offset);
-  }
-
-  hb_buffer_destroy (b);
-}
-
-
-typedef struct {
-  const uint16_t utf16[8];
-  const uint32_t codepoints[8];
-} utf16_conversion_test_t;
-
-/* note: we skip the first and last item from utf16 when adding to buffer */
-static const utf16_conversion_test_t utf16_conversion_tests[] = {
-  {{0x41, 0x004D, 0x0430, 0x4E8C, 0xD800, 0xDF02, 0x61} , {0x004D, 0x0430, 0x4E8C, 0x10302}},
-  {{0x41, 0xD800, 0xDF02, 0x61}, {0x10302}},
-  {{0x41, 0xD800, 0xDF02}, {-1}},
-  {{0x41, 0x61, 0xD800, 0xDF02}, {0x61, -1}},
-  {{0x41, 0xD800, 0x61, 0xDF02}, {-1, 0x61}},
-  {{0x41, 0x61}, {}}
-};
-
-static void
-test_buffer_utf16_conversion (void)
-{
-  hb_buffer_t *b;
-  unsigned int i;
-
-  b = hb_buffer_create ();
-
-  for (i = 0; i < G_N_ELEMENTS (utf16_conversion_tests); i++)
-  {
-    const utf16_conversion_test_t *test = &utf16_conversion_tests[i];
-    unsigned int u_len, chars, j, len;
-    hb_glyph_info_t *glyphs;
-
-    g_test_message ("UTF-16 test #%d", i);
-
-    for (u_len = 0; test->utf16[u_len]; u_len++)
-      ;
-    for (chars = 0; test->codepoints[chars]; chars++)
-      ;
-
-    hb_buffer_reset (b);
-    hb_buffer_add_utf16 (b, test->utf16, u_len,  1, u_len - 2);
-
-    glyphs = hb_buffer_get_glyph_infos (b, &len);
-    g_assert_cmpint (len, ==, chars);
-    for (j = 0; j < chars; j++)
-      g_assert_cmphex (glyphs[j].codepoint, ==, test->codepoints[j]);
-  }
-
-  hb_buffer_destroy (b);
-}
-
-static void
-test_empty (hb_buffer_t *b)
-{
-  g_assert_cmpint (hb_buffer_get_length (b), ==, 0);
-  g_assert (!hb_buffer_get_glyph_infos (b, NULL));
-  g_assert (!hb_buffer_get_glyph_positions (b, NULL));
-}
-
-static void
-test_buffer_empty (void)
-{
-  hb_buffer_t *b = hb_buffer_get_empty ();
-
-  g_assert (hb_buffer_get_empty ());
-  g_assert (hb_buffer_get_empty () == b);
-
-  g_assert (!hb_buffer_allocation_successful (b));
-
-  test_empty (b);
-
-  hb_buffer_add_utf32 (b, utf32, G_N_ELEMENTS (utf32), 1, G_N_ELEMENTS (utf32) - 2);
-
-  test_empty (b);
-
-  hb_buffer_reverse (b);
-  hb_buffer_reverse_clusters (b);
-
-  g_assert (!hb_buffer_set_length (b, 10));
-
-  test_empty (b);
-
-  g_assert (hb_buffer_set_length (b, 0));
-
-  test_empty (b);
-
-  g_assert (!hb_buffer_allocation_successful (b));
-
-  hb_buffer_reset (b);
-
-  test_empty (b);
-
-  g_assert (!hb_buffer_allocation_successful (b));
-}
-
-int
-main (int argc, char **argv)
-{
-  unsigned int i;
-
-  hb_test_init (&argc, &argv);
-
-  for (i = 0; i < BUFFER_NUM_TYPES; i++)
-  {
-    const void *buffer_type = GINT_TO_POINTER (i);
-    const char *buffer_name = buffer_names[i];
-
-    hb_test_add_fixture_flavor (fixture, buffer_type, buffer_name, test_buffer_properties);
-    hb_test_add_fixture_flavor (fixture, buffer_type, buffer_name, test_buffer_contents);
-    hb_test_add_fixture_flavor (fixture, buffer_type, buffer_name, test_buffer_positions);
-  }
-
-  hb_test_add_fixture (fixture, GINT_TO_POINTER (BUFFER_EMPTY), test_buffer_allocation);
-
-  hb_test_add (test_buffer_utf8_conversion);
-  hb_test_add (test_buffer_utf8_validity);
-  hb_test_add (test_buffer_utf16_conversion);
-  hb_test_add (test_buffer_empty);
-
-  return hb_test_run();
-}
diff --git a/test/api/test-c.c b/test/api/test-c.c
deleted file mode 100644 (file)
index 25a38e5..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright © 2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-/* This file tests that all headers can be included from .c files */
-
-
-#include <config.h>
-
-#include <hb.h>
-
-#ifdef HAVE_GLIB
-#include <hb-glib.h>
-#endif
-
-#ifdef HAVE_ICU
-#include <hb-icu.h>
-#endif
-
-#ifdef HAVE_FREETYPE
-#include <hb-ft.h>
-#endif
-
-#ifdef HAVE_OT
-#include <hb-ot.h>
-#endif
-
-#ifdef HAVE_UNISCRIBE
-#include <hb-uniscribe.h>
-#endif
-
-int
-main (int argc, char **argv)
-{
-  return !*hb_shape_list_shapers ();
-}
diff --git a/test/api/test-common.c b/test/api/test-common.c
deleted file mode 100644 (file)
index 74b50be..0000000
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * Copyright © 2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "hb-test.h"
-
-/* Unit tests for hb-common.h */
-
-
-static void
-test_types_int (void)
-{
-  /* We already ASSERT_STATIC these in hb-private.h, but anyway */
-  g_assert_cmpint (sizeof (int8_t), ==, 1);
-  g_assert_cmpint (sizeof (uint8_t), ==, 1);
-  g_assert_cmpint (sizeof (int16_t), ==, 2);
-  g_assert_cmpint (sizeof (uint16_t), ==, 2);
-  g_assert_cmpint (sizeof (int32_t), ==, 4);
-  g_assert_cmpint (sizeof (uint32_t), ==, 4);
-  g_assert_cmpint (sizeof (int64_t), ==, 8);
-  g_assert_cmpint (sizeof (uint64_t), ==, 8);
-
-  g_assert_cmpint (sizeof (hb_codepoint_t), ==, 4);
-  g_assert_cmpint (sizeof (hb_position_t), ==, 4);
-  g_assert_cmpint (sizeof (hb_mask_t), ==, 4);
-  g_assert_cmpint (sizeof (hb_var_int_t), ==, 4);
-}
-
-static void
-test_types_direction (void)
-{
-  g_assert_cmpint ((signed) HB_DIRECTION_INVALID, ==, 0);
-  g_assert_cmpint (HB_DIRECTION_LTR, !=, 0);
-
-  g_assert (HB_DIRECTION_IS_HORIZONTAL (HB_DIRECTION_LTR));
-  g_assert (HB_DIRECTION_IS_HORIZONTAL (HB_DIRECTION_RTL));
-  g_assert (!HB_DIRECTION_IS_HORIZONTAL (HB_DIRECTION_TTB));
-  g_assert (!HB_DIRECTION_IS_HORIZONTAL (HB_DIRECTION_BTT));
-  g_assert (!HB_DIRECTION_IS_HORIZONTAL (HB_DIRECTION_INVALID));
-
-  g_assert (!HB_DIRECTION_IS_VERTICAL (HB_DIRECTION_LTR));
-  g_assert (!HB_DIRECTION_IS_VERTICAL (HB_DIRECTION_RTL));
-  g_assert (HB_DIRECTION_IS_VERTICAL (HB_DIRECTION_TTB));
-  g_assert (HB_DIRECTION_IS_VERTICAL (HB_DIRECTION_BTT));
-  g_assert (!HB_DIRECTION_IS_VERTICAL (HB_DIRECTION_INVALID));
-
-  g_assert (HB_DIRECTION_IS_FORWARD (HB_DIRECTION_LTR));
-  g_assert (HB_DIRECTION_IS_FORWARD (HB_DIRECTION_TTB));
-  g_assert (!HB_DIRECTION_IS_FORWARD (HB_DIRECTION_RTL));
-  g_assert (!HB_DIRECTION_IS_FORWARD (HB_DIRECTION_BTT));
-  g_assert (!HB_DIRECTION_IS_FORWARD (HB_DIRECTION_INVALID));
-
-  g_assert (!HB_DIRECTION_IS_BACKWARD (HB_DIRECTION_LTR));
-  g_assert (!HB_DIRECTION_IS_BACKWARD (HB_DIRECTION_TTB));
-  g_assert (HB_DIRECTION_IS_BACKWARD (HB_DIRECTION_RTL));
-  g_assert (HB_DIRECTION_IS_BACKWARD (HB_DIRECTION_BTT));
-  g_assert (!HB_DIRECTION_IS_BACKWARD (HB_DIRECTION_INVALID));
-
-  g_assert (HB_DIRECTION_IS_VALID (HB_DIRECTION_LTR));
-  g_assert (HB_DIRECTION_IS_VALID (HB_DIRECTION_TTB));
-  g_assert (HB_DIRECTION_IS_VALID (HB_DIRECTION_RTL));
-  g_assert (HB_DIRECTION_IS_VALID (HB_DIRECTION_BTT));
-  g_assert (!HB_DIRECTION_IS_VALID (HB_DIRECTION_INVALID));
-  g_assert (!HB_DIRECTION_IS_VALID ((hb_direction_t) 0x12345678));
-
-  g_assert_cmpint (HB_DIRECTION_REVERSE (HB_DIRECTION_LTR), ==, HB_DIRECTION_RTL);
-  g_assert_cmpint (HB_DIRECTION_REVERSE (HB_DIRECTION_RTL), ==, HB_DIRECTION_LTR);
-  g_assert_cmpint (HB_DIRECTION_REVERSE (HB_DIRECTION_TTB), ==, HB_DIRECTION_BTT);
-  g_assert_cmpint (HB_DIRECTION_REVERSE (HB_DIRECTION_BTT), ==, HB_DIRECTION_TTB);
-  //g_assert_cmpint (HB_DIRECTION_REVERSE (HB_DIRECTION_INVALID), ==, HB_DIRECTION_INVALID);
-
-  g_assert_cmpint (HB_DIRECTION_INVALID, ==, hb_direction_from_string (NULL, -1));
-  g_assert_cmpint (HB_DIRECTION_INVALID, ==, hb_direction_from_string ("", -1));
-  g_assert_cmpint (HB_DIRECTION_INVALID, ==, hb_direction_from_string ("t", 0));
-  g_assert_cmpint (HB_DIRECTION_INVALID, ==, hb_direction_from_string ("x", -1));
-  g_assert_cmpint (HB_DIRECTION_RTL, ==, hb_direction_from_string ("r", -1));
-  g_assert_cmpint (HB_DIRECTION_RTL, ==, hb_direction_from_string ("rtl", -1));
-  g_assert_cmpint (HB_DIRECTION_RTL, ==, hb_direction_from_string ("RtL", -1));
-  g_assert_cmpint (HB_DIRECTION_RTL, ==, hb_direction_from_string ("right-to-left", -1));
-  g_assert_cmpint (HB_DIRECTION_TTB, ==, hb_direction_from_string ("ttb", -1));
-
-  g_assert (0 == strcmp ("ltr", hb_direction_to_string (HB_DIRECTION_LTR)));
-  g_assert (0 == strcmp ("rtl", hb_direction_to_string (HB_DIRECTION_RTL)));
-  g_assert (0 == strcmp ("ttb", hb_direction_to_string (HB_DIRECTION_TTB)));
-  g_assert (0 == strcmp ("btt", hb_direction_to_string (HB_DIRECTION_BTT)));
-  g_assert (0 == strcmp ("invalid", hb_direction_to_string (HB_DIRECTION_INVALID)));
-}
-
-static void
-test_types_tag (void)
-{
-  g_assert_cmphex (HB_TAG_NONE, ==, 0);
-
-  g_assert_cmphex (HB_TAG ('a','B','c','D'), ==, 0x61426344);
-
-  g_assert_cmphex (hb_tag_from_string ("aBcDe", -1), ==, 0x61426344);
-  g_assert_cmphex (hb_tag_from_string ("aBcD", -1),  ==, 0x61426344);
-  g_assert_cmphex (hb_tag_from_string ("aBc", -1),   ==, 0x61426320);
-  g_assert_cmphex (hb_tag_from_string ("aB", -1),    ==, 0x61422020);
-  g_assert_cmphex (hb_tag_from_string ("a", -1),     ==, 0x61202020);
-  g_assert_cmphex (hb_tag_from_string ("aBcDe",  1), ==, 0x61202020);
-  g_assert_cmphex (hb_tag_from_string ("aBcDe",  2), ==, 0x61422020);
-  g_assert_cmphex (hb_tag_from_string ("aBcDe",  3), ==, 0x61426320);
-  g_assert_cmphex (hb_tag_from_string ("aBcDe",  4), ==, 0x61426344);
-  g_assert_cmphex (hb_tag_from_string ("aBcDe",  4), ==, 0x61426344);
-
-  g_assert_cmphex (hb_tag_from_string ("", -1),      ==, HB_TAG_NONE);
-  g_assert_cmphex (hb_tag_from_string ("x", 0),      ==, HB_TAG_NONE);
-  g_assert_cmphex (hb_tag_from_string (NULL, -1),    ==, HB_TAG_NONE);
-}
-
-static void
-test_types_script (void)
-{
-  hb_tag_t arab = HB_TAG_CHAR4 ("arab");
-  hb_tag_t Arab = HB_TAG_CHAR4 ("Arab");
-  hb_tag_t ARAB = HB_TAG_CHAR4 ("ARAB");
-
-  hb_tag_t wWyZ = HB_TAG_CHAR4 ("wWyZ");
-  hb_tag_t Wwyz = HB_TAG_CHAR4 ("Wwyz");
-
-  hb_tag_t x123 = HB_TAG_CHAR4 ("x123");
-
-  g_assert_cmpint (HB_SCRIPT_INVALID, ==, (hb_script_t) HB_TAG_NONE);
-  g_assert_cmphex (HB_SCRIPT_ARABIC, !=, HB_SCRIPT_LATIN);
-
-  g_assert_cmphex (HB_SCRIPT_INVALID, ==, hb_script_from_string (NULL, -1));
-  g_assert_cmphex (HB_SCRIPT_INVALID, ==, hb_script_from_string ("", -1));
-  g_assert_cmphex (HB_SCRIPT_INVALID, ==, hb_script_from_string ("x", 0));
-  g_assert_cmphex (HB_SCRIPT_UNKNOWN, ==, hb_script_from_string ("x", -1));
-
-  g_assert_cmphex (HB_SCRIPT_ARABIC, ==, hb_script_from_string ("arab", -1));
-  g_assert_cmphex (HB_SCRIPT_ARABIC, ==, hb_script_from_string ("Arab", -1));
-  g_assert_cmphex (HB_SCRIPT_ARABIC, ==, hb_script_from_string ("ARAB", -1));
-  g_assert_cmphex (HB_SCRIPT_ARABIC, ==, hb_script_from_string ("Arabic", 6));
-  g_assert_cmphex (HB_SCRIPT_ARABIC, !=, hb_script_from_string ("Arabic", 3));
-
-  g_assert_cmphex (HB_SCRIPT_ARABIC, ==, hb_script_from_iso15924_tag (arab));
-  g_assert_cmphex (HB_SCRIPT_ARABIC, ==, hb_script_from_iso15924_tag (Arab));
-  g_assert_cmphex (HB_SCRIPT_ARABIC, ==, hb_script_from_iso15924_tag (ARAB));
-
-  /* Arbitrary tags that look like may be valid ISO 15924 should be preserved. */
-  g_assert_cmphex (HB_SCRIPT_UNKNOWN, !=, hb_script_from_string ("wWyZ", -1));
-  g_assert_cmphex (HB_SCRIPT_UNKNOWN, !=, hb_script_from_iso15924_tag (wWyZ));
-  /* Otherwise, UNKNOWN should be returned. */
-  g_assert_cmphex (HB_SCRIPT_UNKNOWN, ==, hb_script_from_string ("x123", -1));
-  g_assert_cmphex (HB_SCRIPT_UNKNOWN, ==, hb_script_from_iso15924_tag (x123));
-
-  g_assert_cmphex (hb_script_to_iso15924_tag (HB_SCRIPT_ARABIC), ==, Arab);
-  g_assert_cmphex (hb_script_to_iso15924_tag (hb_script_from_iso15924_tag (wWyZ)), ==, Wwyz);
-
-  g_assert_cmpint (hb_script_get_horizontal_direction (HB_SCRIPT_LATIN), ==, HB_DIRECTION_LTR);
-  g_assert_cmpint (hb_script_get_horizontal_direction (HB_SCRIPT_ARABIC), ==, HB_DIRECTION_RTL);
-  g_assert_cmpint (hb_script_get_horizontal_direction (hb_script_from_iso15924_tag (wWyZ)), ==, HB_DIRECTION_LTR);
-}
-
-static void
-test_types_language (void)
-{
-  hb_language_t fa = hb_language_from_string ("fa", -1);
-  hb_language_t fa_IR = hb_language_from_string ("fa_IR", -1);
-  hb_language_t fa_ir = hb_language_from_string ("fa-ir", -1);
-  hb_language_t en = hb_language_from_string ("en", -1);
-
-  g_assert (HB_LANGUAGE_INVALID == NULL);
-
-  g_assert (fa != NULL);
-  g_assert (fa_IR != NULL);
-  g_assert (fa_IR == fa_ir);
-
-  g_assert (en != NULL);
-  g_assert (en != fa);
-
-  /* Test recall */
-  g_assert (en == hb_language_from_string ("en", -1));
-  g_assert (en == hb_language_from_string ("eN", -1));
-  g_assert (en == hb_language_from_string ("Enx", 2));
-
-  g_assert (HB_LANGUAGE_INVALID == hb_language_from_string (NULL, -1));
-  g_assert (HB_LANGUAGE_INVALID == hb_language_from_string ("", -1));
-  g_assert (HB_LANGUAGE_INVALID == hb_language_from_string ("en", 0));
-  g_assert (HB_LANGUAGE_INVALID != hb_language_from_string ("en", 1));
-  g_assert (NULL == hb_language_to_string (HB_LANGUAGE_INVALID));
-
-  /* Not sure how to test this better.  Setting env vars
-   * here doesn't sound like the right approach, and I'm
-   * not sure that it even works. */
-  g_assert (HB_LANGUAGE_INVALID != hb_language_get_default ());
-}
-
-int
-main (int argc, char **argv)
-{
-  hb_test_init (&argc, &argv);
-
-  hb_test_add (test_types_int);
-  hb_test_add (test_types_direction);
-  hb_test_add (test_types_tag);
-  hb_test_add (test_types_script);
-  hb_test_add (test_types_language);
-
-  return hb_test_run();
-}
diff --git a/test/api/test-cplusplus.cc b/test/api/test-cplusplus.cc
deleted file mode 100644 (file)
index 3313d74..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright © 2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-/* This file tests that all headers can be included from .cc files */
-
-
-#include "test-c.c"
diff --git a/test/api/test-font.c b/test/api/test-font.c
deleted file mode 100644 (file)
index 40540c4..0000000
+++ /dev/null
@@ -1,502 +0,0 @@
-/*
- * Copyright © 2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "hb-test.h"
-
-/* Unit tests for hb-font.h */
-
-
-static const char test_data[] = "test\0data";
-
-
-static void
-test_face_empty (void)
-{
-  g_assert (hb_face_get_empty ());
-  g_assert (hb_face_get_empty () == hb_face_create (hb_blob_get_empty (), 0));
-  g_assert (hb_face_get_empty () == hb_face_create (NULL, 0));
-
-  g_assert (hb_face_reference_table (hb_face_get_empty (), HB_TAG ('h','e','a','d')) == hb_blob_get_empty ());
-
-  g_assert_cmpint (hb_face_get_upem (hb_face_get_empty ()), ==, 1000);
-}
-
-static void
-test_face_create (void)
-{
-  hb_face_t *face;
-  hb_blob_t *blob;
-
-  blob = hb_blob_create (test_data, sizeof (test_data), HB_MEMORY_MODE_READONLY, NULL, NULL);
-  face = hb_face_create (blob, 0);
-  hb_blob_destroy (blob);
-
-  g_assert (hb_face_reference_table (face, HB_TAG ('h','e','a','d')) == hb_blob_get_empty ());
-
-  g_assert_cmpint (hb_face_get_upem (face), ==, 1000);
-
-  hb_face_destroy (face);
-}
-
-
-static void
-free_up (void *user_data)
-{
-  int *freed = (int *) user_data;
-
-  g_assert (!*freed);
-
-  (*freed)++;
-}
-
-static hb_blob_t *
-get_table (hb_face_t *face, hb_tag_t tag, void *user_data)
-{
-  if (tag == HB_TAG ('a','b','c','d'))
-    return hb_blob_create (test_data, sizeof (test_data), HB_MEMORY_MODE_READONLY, NULL, NULL);
-
-  return hb_blob_get_empty ();
-}
-
-static void
-test_face_createfortables (void)
-{
-  hb_face_t *face;
-  hb_blob_t *blob;
-  const char *data;
-  unsigned int len;
-  int freed = 0;
-
-  face = hb_face_create_for_tables (get_table, &freed, free_up);
-  g_assert (!freed);
-
-  g_assert (hb_face_reference_table (face, HB_TAG ('h','e','a','d')) == hb_blob_get_empty ());
-
-  blob = hb_face_reference_table (face, HB_TAG ('a','b','c','d'));
-  g_assert (blob != hb_blob_get_empty ());
-
-  data = hb_blob_get_data (blob, &len);
-  g_assert_cmpint (len, ==, sizeof (test_data));
-  g_assert (0 == memcmp (data, test_data, sizeof (test_data)));
-  hb_blob_destroy (blob);
-
-  g_assert_cmpint (hb_face_get_upem (face), ==, 1000);
-
-  hb_face_destroy (face);
-  g_assert (freed);
-}
-
-static void
-_test_font_nil_funcs (hb_font_t *font)
-{
-  hb_codepoint_t glyph;
-  hb_position_t x, y;
-  hb_glyph_extents_t extents;
-
-  x = y = 13;
-  g_assert (!hb_font_get_glyph_contour_point (font, 17, 2, &x, &y));
-  g_assert_cmpint (x, ==, 0);
-  g_assert_cmpint (y, ==, 0);
-
-  x = hb_font_get_glyph_h_advance (font, 17);
-  g_assert_cmpint (x, ==, 0);
-
-  extents.x_bearing = extents.y_bearing = 13;
-  extents.width = extents.height = 15;
-  hb_font_get_glyph_extents (font, 17, &extents);
-  g_assert_cmpint (extents.x_bearing, ==, 0);
-  g_assert_cmpint (extents.y_bearing, ==, 0);
-  g_assert_cmpint (extents.width, ==, 0);
-  g_assert_cmpint (extents.height, ==, 0);
-
-  glyph = 3;
-  g_assert (!hb_font_get_glyph (font, 17, 2, &glyph));
-  g_assert_cmpint (glyph, ==, 0);
-
-  x = 13;
-  x = hb_font_get_glyph_h_kerning (font, 17, 19);
-  g_assert_cmpint (x, ==, 0);
-}
-
-static void
-_test_fontfuncs_nil (hb_font_funcs_t *ffuncs)
-{
-  hb_blob_t *blob;
-  hb_face_t *face;
-  hb_font_t *font;
-  hb_font_t *subfont;
-  int freed = 0;
-
-  blob = hb_blob_create (test_data, sizeof (test_data), HB_MEMORY_MODE_READONLY, NULL, NULL);
-  face = hb_face_create (blob, 0);
-  hb_blob_destroy (blob);
-  g_assert (!hb_face_is_immutable (face));
-  font = hb_font_create (face);
-  g_assert (font);
-  g_assert (hb_face_is_immutable (face));
-  hb_face_destroy (face);
-
-
-  hb_font_set_funcs (font, ffuncs, &freed, free_up);
-  g_assert_cmpint (freed, ==, 0);
-
-  _test_font_nil_funcs (font);
-
-  subfont = hb_font_create_sub_font (font);
-  g_assert (subfont);
-
-  g_assert_cmpint (freed, ==, 0);
-  hb_font_destroy (font);
-  g_assert_cmpint (freed, ==, 0);
-
-  _test_font_nil_funcs (subfont);
-
-  hb_font_destroy (subfont);
-  g_assert_cmpint (freed, ==, 1);
-}
-
-static void
-test_fontfuncs_empty (void)
-{
-  g_assert (hb_font_funcs_get_empty ());
-  g_assert (hb_font_funcs_is_immutable (hb_font_funcs_get_empty ()));
-  _test_fontfuncs_nil (hb_font_funcs_get_empty ());
-}
-
-static void
-test_fontfuncs_nil (void)
-{
-  hb_font_funcs_t *ffuncs;
-
-  ffuncs = hb_font_funcs_create ();
-
-  g_assert (!hb_font_funcs_is_immutable (ffuncs));
-  _test_fontfuncs_nil (hb_font_funcs_get_empty ());
-
-  hb_font_funcs_destroy (ffuncs);
-}
-
-static hb_bool_t
-contour_point_func1 (hb_font_t *font, void *font_data,
-                    hb_codepoint_t glyph, unsigned int point_index,
-                    hb_position_t *x, hb_position_t *y,
-                    void *user_data)
-{
-  if (glyph == 1) {
-    *x = 2;
-    *y = 3;
-    return TRUE;
-  }
-  if (glyph == 2) {
-    *x = 4;
-    *y = 5;
-    return TRUE;
-  }
-
-  return FALSE;
-}
-
-static hb_bool_t
-contour_point_func2 (hb_font_t *font, void *font_data,
-                    hb_codepoint_t glyph, unsigned int point_index,
-                    hb_position_t *x, hb_position_t *y,
-                    void *user_data)
-{
-  if (glyph == 1) {
-    *x = 6;
-    *y = 7;
-    return TRUE;
-  }
-
-  return hb_font_get_glyph_contour_point (hb_font_get_parent (font),
-                                         glyph, point_index, x, y);
-}
-
-static hb_position_t
-glyph_h_advance_func1 (hb_font_t *font, void *font_data,
-                      hb_codepoint_t glyph,
-                      void *user_data)
-{
-  if (glyph == 1)
-    return 8;
-
-  return 0;
-}
-
-static void
-test_fontfuncs_subclassing (void)
-{
-  hb_blob_t *blob;
-  hb_face_t *face;
-
-  hb_font_funcs_t *ffuncs1;
-  hb_font_funcs_t *ffuncs2;
-
-  hb_font_t *font1;
-  hb_font_t *font2;
-  hb_font_t *font3;
-
-  hb_position_t x;
-  hb_position_t y;
-
-  blob = hb_blob_create (test_data, sizeof (test_data), HB_MEMORY_MODE_READONLY, NULL, NULL);
-  face = hb_face_create (blob, 0);
-  hb_blob_destroy (blob);
-  font1 = hb_font_create (face);
-  hb_face_destroy (face);
-  hb_font_set_scale (font1, 10, 10);
-
-  /* setup font1 */
-  ffuncs1 = hb_font_funcs_create ();
-  hb_font_funcs_set_glyph_contour_point_func (ffuncs1, contour_point_func1, NULL, NULL);
-  hb_font_funcs_set_glyph_h_advance_func (ffuncs1, glyph_h_advance_func1, NULL, NULL);
-  hb_font_set_funcs (font1, ffuncs1, NULL, NULL);
-  hb_font_funcs_destroy (ffuncs1);
-
-  x = y = 1;
-  g_assert (hb_font_get_glyph_contour_point_for_origin (font1, 1, 2, HB_DIRECTION_LTR, &x, &y));
-  g_assert_cmpint (x, ==, 2);
-  g_assert_cmpint (y, ==, 3);
-  g_assert (hb_font_get_glyph_contour_point_for_origin (font1, 2, 5, HB_DIRECTION_LTR, &x, &y));
-  g_assert_cmpint (x, ==, 4);
-  g_assert_cmpint (y, ==, 5);
-  g_assert (!hb_font_get_glyph_contour_point_for_origin (font1, 3, 7, HB_DIRECTION_RTL, &x, &y));
-  g_assert_cmpint (x, ==, 0);
-  g_assert_cmpint (y, ==, 0);
-  x = hb_font_get_glyph_h_advance (font1, 1);
-  g_assert_cmpint (x, ==, 8);
-  x = hb_font_get_glyph_h_advance (font1, 2);
-  g_assert_cmpint (x, ==, 0);
-
-
-  font2 = hb_font_create_sub_font (font1);
-  g_assert (hb_font_is_immutable (font1));
-  hb_font_destroy (font1);
-
-  /* setup font2 to override some funcs */
-  ffuncs2 = hb_font_funcs_create ();
-  hb_font_funcs_set_glyph_contour_point_func (ffuncs2, contour_point_func2, NULL, NULL);
-  hb_font_set_funcs (font2, ffuncs2, NULL, NULL);
-  hb_font_funcs_destroy (ffuncs2);
-
-  x = y = 1;
-  g_assert (hb_font_get_glyph_contour_point_for_origin (font2, 1, 2, HB_DIRECTION_LTR, &x, &y));
-  g_assert_cmpint (x, ==, 6);
-  g_assert_cmpint (y, ==, 7);
-  g_assert (hb_font_get_glyph_contour_point_for_origin (font2, 2, 5, HB_DIRECTION_RTL, &x, &y));
-  g_assert_cmpint (x, ==, 4);
-  g_assert_cmpint (y, ==, 5);
-  g_assert (!hb_font_get_glyph_contour_point_for_origin (font2, 3, 7, HB_DIRECTION_LTR, &x, &y));
-  g_assert_cmpint (x, ==, 0);
-  g_assert_cmpint (y, ==, 0);
-  x = hb_font_get_glyph_h_advance (font2, 1);
-  g_assert_cmpint (x, ==, 8);
-  x = hb_font_get_glyph_h_advance (font2, 2);
-  g_assert_cmpint (x, ==, 0);
-
-
-  font3 = hb_font_create_sub_font (font2);
-  g_assert (hb_font_is_immutable (font2));
-  hb_font_destroy (font2);
-
-  /* setup font3 to override scale */
-  hb_font_set_scale (font3, 20, 30);
-
-  x = y = 1;
-  g_assert (hb_font_get_glyph_contour_point_for_origin (font3, 1, 2, HB_DIRECTION_RTL, &x, &y));
-  g_assert_cmpint (x, ==, 6*2);
-  g_assert_cmpint (y, ==, 7*3);
-  g_assert (hb_font_get_glyph_contour_point_for_origin (font3, 2, 5, HB_DIRECTION_LTR, &x, &y));
-  g_assert_cmpint (x, ==, 4*2);
-  g_assert_cmpint (y, ==, 5*3);
-  g_assert (!hb_font_get_glyph_contour_point_for_origin (font3, 3, 7, HB_DIRECTION_LTR, &x, &y));
-  g_assert_cmpint (x, ==, 0*2);
-  g_assert_cmpint (y, ==, 0*3);
-  x = hb_font_get_glyph_h_advance (font3, 1);
-  g_assert_cmpint (x, ==, 8*2);
-  x = hb_font_get_glyph_h_advance (font3, 2);
-  g_assert_cmpint (x, ==, 0*2);
-
-
-  hb_font_destroy (font3);
-}
-
-
-static void
-test_font_empty (void)
-{
-  g_assert (hb_font_get_empty ());
-  g_assert (hb_font_get_empty () == hb_font_create (hb_face_get_empty ()));
-  g_assert (hb_font_get_empty () == hb_font_create (NULL));
-  g_assert (hb_font_get_empty () == hb_font_create_sub_font (NULL));
-  g_assert (hb_font_is_immutable (hb_font_get_empty ()));
-
-  g_assert (hb_font_get_face (hb_font_get_empty ()) == hb_face_get_empty ());
-  g_assert (hb_font_get_parent (hb_font_get_empty ()) == NULL);
-}
-
-static void
-test_font_properties (void)
-{
-  hb_blob_t *blob;
-  hb_face_t *face;
-  hb_font_t *font;
-  hb_font_t *subfont;
-  int x_scale, y_scale;
-  unsigned int x_ppem, y_ppem;
-
-  blob = hb_blob_create (test_data, sizeof (test_data), HB_MEMORY_MODE_READONLY, NULL, NULL);
-  face = hb_face_create (blob, 0);
-  hb_blob_destroy (blob);
-  font = hb_font_create (face);
-  hb_face_destroy (face);
-
-
-  g_assert (hb_font_get_face (font) == face);
-  g_assert (hb_font_get_parent (font) == NULL);
-
-
-  /* Check scale */
-
-  hb_font_get_scale (font, NULL, NULL);
-  x_scale = y_scale = 13;
-  hb_font_get_scale (font, &x_scale, NULL);
-  g_assert_cmpint (x_scale, ==, 0);
-  x_scale = y_scale = 13;
-  hb_font_get_scale (font, NULL, &y_scale);
-  g_assert_cmpint (y_scale, ==, 0);
-  x_scale = y_scale = 13;
-  hb_font_get_scale (font, &x_scale, &y_scale);
-  g_assert_cmpint (x_scale, ==, 0);
-  g_assert_cmpint (y_scale, ==, 0);
-
-  hb_font_set_scale (font, 17, 19);
-
-  x_scale = y_scale = 13;
-  hb_font_get_scale (font, &x_scale, &y_scale);
-  g_assert_cmpint (x_scale, ==, 17);
-  g_assert_cmpint (y_scale, ==, 19);
-
-
-  /* Check ppem */
-
-  hb_font_get_ppem (font, NULL, NULL);
-  x_ppem = y_ppem = 13;
-  hb_font_get_ppem (font, &x_ppem, NULL);
-  g_assert_cmpint (x_ppem, ==, 0);
-  x_ppem = y_ppem = 13;
-  hb_font_get_ppem (font, NULL, &y_ppem);
-  g_assert_cmpint (y_ppem, ==, 0);
-  x_ppem = y_ppem = 13;
-  hb_font_get_ppem (font, &x_ppem, &y_ppem);
-  g_assert_cmpint (x_ppem, ==, 0);
-  g_assert_cmpint (y_ppem, ==, 0);
-
-  hb_font_set_ppem (font, 17, 19);
-
-  x_ppem = y_ppem = 13;
-  hb_font_get_ppem (font, &x_ppem, &y_ppem);
-  g_assert_cmpint (x_ppem, ==, 17);
-  g_assert_cmpint (y_ppem, ==, 19);
-
-
-  /* Check immutable */
-
-  g_assert (!hb_font_is_immutable (font));
-  hb_font_make_immutable (font);
-  g_assert (hb_font_is_immutable (font));
-
-  hb_font_set_scale (font, 10, 12);
-  x_scale = y_scale = 13;
-  hb_font_get_scale (font, &x_scale, &y_scale);
-  g_assert_cmpint (x_scale, ==, 17);
-  g_assert_cmpint (y_scale, ==, 19);
-
-  hb_font_set_ppem (font, 10, 12);
-  x_ppem = y_ppem = 13;
-  hb_font_get_ppem (font, &x_ppem, &y_ppem);
-  g_assert_cmpint (x_ppem, ==, 17);
-  g_assert_cmpint (y_ppem, ==, 19);
-
-
-  /* sub_font now */
-  subfont = hb_font_create_sub_font (font);
-  hb_font_destroy (font);
-
-  g_assert (hb_font_get_parent (subfont) == font);
-  g_assert (hb_font_get_face (subfont) == face);
-
-  /* scale */
-  x_scale = y_scale = 13;
-  hb_font_get_scale (subfont, &x_scale, &y_scale);
-  g_assert_cmpint (x_scale, ==, 17);
-  g_assert_cmpint (y_scale, ==, 19);
-  hb_font_set_scale (subfont, 10, 12);
-  x_scale = y_scale = 13;
-  hb_font_get_scale (subfont, &x_scale, &y_scale);
-  g_assert_cmpint (x_scale, ==, 10);
-  g_assert_cmpint (y_scale, ==, 12);
-  x_scale = y_scale = 13;
-  hb_font_get_scale (font, &x_scale, &y_scale);
-  g_assert_cmpint (x_scale, ==, 17);
-  g_assert_cmpint (y_scale, ==, 19);
-
-  /* ppem */
-  x_ppem = y_ppem = 13;
-  hb_font_get_ppem (subfont, &x_ppem, &y_ppem);
-  g_assert_cmpint (x_ppem, ==, 17);
-  g_assert_cmpint (y_ppem, ==, 19);
-  hb_font_set_ppem (subfont, 10, 12);
-  x_ppem = y_ppem = 13;
-  hb_font_get_ppem (subfont, &x_ppem, &y_ppem);
-  g_assert_cmpint (x_ppem, ==, 10);
-  g_assert_cmpint (y_ppem, ==, 12);
-  x_ppem = y_ppem = 13;
-  hb_font_get_ppem (font, &x_ppem, &y_ppem);
-  g_assert_cmpint (x_ppem, ==, 17);
-  g_assert_cmpint (y_ppem, ==, 19);
-
-  hb_font_destroy (subfont);
-}
-
-int
-main (int argc, char **argv)
-{
-  hb_test_init (&argc, &argv);
-
-  hb_test_add (test_face_empty);
-  hb_test_add (test_face_create);
-  hb_test_add (test_face_createfortables);
-
-  hb_test_add (test_fontfuncs_empty);
-  hb_test_add (test_fontfuncs_nil);
-  hb_test_add (test_fontfuncs_subclassing);
-
-  hb_test_add (test_font_empty);
-  hb_test_add (test_font_properties);
-
-  return hb_test_run();
-}
diff --git a/test/api/test-object.c b/test/api/test-object.c
deleted file mode 100644 (file)
index 66e8d33..0000000
+++ /dev/null
@@ -1,367 +0,0 @@
-/*
- * Copyright © 2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "hb-test.h"
-
-/* Unit tests for hb-object-private.h */
-
-
-static void *
-create_blob (void)
-{
-  static char data[] = "test data";
-  return hb_blob_create (data, sizeof (data), HB_MEMORY_MODE_READONLY, NULL, NULL);
-}
-static void *
-create_blob_inert (void)
-{
-  return hb_blob_create (NULL, 0, HB_MEMORY_MODE_DUPLICATE, NULL, NULL);
-}
-
-static void *
-create_buffer (void)
-{
-  return hb_buffer_create ();
-}
-static void *
-create_buffer_inert (void)
-{
-  return NULL;
-}
-
-static void *
-create_face (void)
-{
-  hb_blob_t *blob = (hb_blob_t *) create_blob ();
-  hb_face_t *face = hb_face_create (blob, 0);
-  hb_blob_destroy (blob);
-  return face;
-}
-static void *
-create_face_inert (void)
-{
-  return hb_face_create (hb_blob_get_empty (), 0);
-}
-
-static void *
-create_font (void)
-{
-  hb_face_t *face = (hb_face_t *) create_face ();
-  hb_font_t *font = hb_font_create (face);
-  hb_face_destroy (face);
-  return font;
-}
-static void *
-create_font_inert (void)
-{
-  return hb_font_create (hb_face_get_empty ());
-}
-
-static void *
-create_font_funcs (void)
-{
-  return hb_font_funcs_create ();
-}
-static void *
-create_font_funcs_inert (void)
-{
-  return NULL;
-}
-
-static void *
-create_unicode_funcs (void)
-{
-  return hb_unicode_funcs_create (NULL);
-}
-static void *
-create_unicode_funcs_inert (void)
-{
-  return hb_unicode_funcs_get_default ();
-}
-
-
-
-typedef void     *(*create_func_t)         (void);
-typedef void     *(*reference_func_t)      (void *obj);
-typedef void      (*destroy_func_t)        (void *obj);
-typedef hb_bool_t (*set_user_data_func_t)  (void *obj, hb_user_data_key_t *key, void *data, hb_destroy_func_t destroy, hb_bool_t replace);
-typedef void *    (*get_user_data_func_t)  (void *obj, hb_user_data_key_t *key);
-typedef void      (*make_immutable_func_t) (void *obj);
-typedef hb_bool_t (*is_immutable_func_t)   (void *obj);
-
-typedef struct {
-  create_func_t          create;
-  create_func_t          create_inert;
-  create_func_t          get_empty;
-  reference_func_t       reference;
-  destroy_func_t         destroy;
-  set_user_data_func_t   set_user_data;
-  get_user_data_func_t   get_user_data;
-  make_immutable_func_t  make_immutable;
-  is_immutable_func_t    is_immutable;
-  const char            *name;
-} object_t;
-
-#define OBJECT_WITHOUT_IMMUTABILITY(name) \
-  { \
-    (create_func_t)         create_##name, \
-    (create_func_t)         create_##name##_inert, \
-    (create_func_t)         hb_##name##_get_empty, \
-    (reference_func_t)      hb_##name##_reference, \
-    (destroy_func_t)        hb_##name##_destroy, \
-    (set_user_data_func_t)  hb_##name##_set_user_data, \
-    (get_user_data_func_t)  hb_##name##_get_user_data, \
-    (make_immutable_func_t) NULL, \
-    (is_immutable_func_t)   NULL, \
-    #name, \
-  }
-#define OBJECT_WITH_IMMUTABILITY(name) \
-  { \
-    (create_func_t)         create_##name, \
-    (create_func_t)         create_##name##_inert, \
-    (create_func_t)         hb_##name##_get_empty, \
-    (reference_func_t)      hb_##name##_reference, \
-    (destroy_func_t)        hb_##name##_destroy, \
-    (set_user_data_func_t)  hb_##name##_set_user_data, \
-    (get_user_data_func_t)  hb_##name##_get_user_data, \
-    (make_immutable_func_t) hb_##name##_make_immutable, \
-    (is_immutable_func_t)   hb_##name##_is_immutable, \
-    #name, \
-  }
-static const object_t objects[] =
-{
-  OBJECT_WITHOUT_IMMUTABILITY (buffer),
-  OBJECT_WITH_IMMUTABILITY (blob),
-  OBJECT_WITH_IMMUTABILITY (face),
-  OBJECT_WITH_IMMUTABILITY (font),
-  OBJECT_WITH_IMMUTABILITY (font_funcs),
-  OBJECT_WITH_IMMUTABILITY (unicode_funcs)
-};
-#undef OBJECT
-
-
-#define MAGIC0 0x12345678
-#define MAGIC1 0x76543210
-
-typedef struct {
-  int value;
-  gboolean freed;
-} data_t;
-
-static int global_data;
-
-static void global_free_up (void *p G_GNUC_UNUSED)
-{
-  global_data++;
-}
-
-static void free_up0 (void *p)
-{
-  data_t *data = (data_t *) p;
-
-  g_assert_cmphex (data->value, ==, MAGIC0);
-  g_assert (!data->freed);
-  data->freed = TRUE;
-}
-
-static void free_up1 (void *p)
-{
-  data_t *data = (data_t *) p;
-
-  g_assert_cmphex (data->value, ==, MAGIC1);
-  g_assert (!data->freed);
-  data->freed = TRUE;
-}
-
-
-typedef struct {
-  const object_t *klass;
-  void *object;
-  hb_user_data_key_t key;
-} deadlock_test_t;
-
-static void free_deadlock_test (void *p)
-{
-  deadlock_test_t *t = (deadlock_test_t *) p;
-
-  g_assert (NULL == t->klass->get_user_data (t->object, &t->key));
-}
-
-
-static void
-test_object (void)
-{
-  unsigned int i;
-
-  for (i = 0; i < G_N_ELEMENTS (objects); i++) {
-    const object_t *o = &objects[i];
-    void *obj;
-    hb_user_data_key_t key[2];
-
-    {
-      unsigned int j;
-      data_t data[2] = {{MAGIC0, FALSE}, {MAGIC1, FALSE}};
-      deadlock_test_t deadlock_test;
-
-      g_test_message ("Testing object %s", o->name);
-
-      g_test_message ("->create()");
-      obj = o->create ();
-      g_assert (obj);
-
-      g_assert (obj == o->reference (obj));
-      o->destroy (obj);
-
-      if (o->is_immutable)
-       g_assert (!o->is_immutable (obj));
-
-      g_assert (o->set_user_data (obj, &key[0], &data[0], free_up0, TRUE));
-      g_assert (o->get_user_data (obj, &key[0]) == &data[0]);
-
-      if (o->is_immutable) {
-       o->make_immutable (obj);
-       g_assert (o->is_immutable (obj));
-      }
-
-      /* Should still work even if object is made immutable */
-      g_assert (o->set_user_data (obj, &key[1], &data[1], free_up1, TRUE));
-      g_assert (o->get_user_data (obj, &key[1]) == &data[1]);
-
-      g_assert (!o->set_user_data (obj, NULL, &data[0], free_up0, TRUE));
-      g_assert (o->get_user_data (obj, &key[0]) == &data[0]);
-      g_assert (o->set_user_data (obj, &key[0], &data[1], NULL, TRUE));
-      g_assert (data[0].freed);
-      g_assert (o->get_user_data (obj, &key[0]) == &data[1]);
-      g_assert (!data[1].freed);
-
-      data[0].freed = FALSE;
-      g_assert (o->set_user_data (obj, &key[0], &data[0], free_up0, TRUE));
-      g_assert (!data[0].freed);
-      g_assert (o->set_user_data (obj, &key[0], NULL, NULL, TRUE));
-      g_assert (data[0].freed);
-
-      data[0].freed = FALSE;
-      global_data = 0;
-      g_assert (o->set_user_data (obj, &key[0], &data[0], free_up0, TRUE));
-      g_assert (!o->set_user_data (obj, &key[0], &data[0], free_up0, FALSE));
-      g_assert_cmpuint (global_data, ==, 0);
-      g_assert (o->set_user_data (obj, &key[0], NULL, global_free_up, TRUE));
-      g_assert_cmpuint (global_data, ==, 0);
-      g_assert (o->set_user_data (obj, &key[0], NULL, NULL, TRUE));
-      g_assert_cmpuint (global_data, ==, 1);
-
-      global_data = 0;
-      for (j = 2; j < 1000; j++)
-       g_assert (o->set_user_data (obj, &key[j], &data[j], global_free_up, TRUE));
-      for (j = 2; j < 1000; j++)
-       g_assert (o->get_user_data (obj, &key[j]) == &data[j]);
-      for (j = 100; j < 1000; j++)
-       g_assert (o->set_user_data (obj, &key[j], NULL, NULL, TRUE));
-      for (j = 2; j < 100; j++)
-       g_assert (o->get_user_data (obj, &key[j]) == &data[j]);
-      for (j = 100; j < 1000; j++)
-       g_assert (!o->get_user_data (obj, &key[j]));
-      g_assert_cmpuint (global_data, ==, 900);
-
-      /* Test set_user_data where the destroy() func calls user_data functions.
-       * Make sure it doesn't deadlock or corrupt memory. */
-      deadlock_test.klass = o;
-      deadlock_test.object = obj;
-      g_assert (o->set_user_data (obj, &deadlock_test.key, &deadlock_test, free_deadlock_test, TRUE));
-      g_assert (o->set_user_data (obj, &deadlock_test.key, NULL, NULL, TRUE));
-
-      g_assert (!data[1].freed);
-      o->destroy (obj);
-      g_assert (data[0].freed);
-      g_assert (data[1].freed);
-      g_assert_cmpuint (global_data, ==, 1000-2);
-    }
-
-    {
-      data_t data[2] = {{MAGIC0, FALSE}, {MAGIC1, FALSE}};
-
-      g_test_message ("->get_empty()");
-      obj = o->get_empty ();
-      g_assert (obj);
-
-      g_assert (obj == o->reference (obj));
-      o->destroy (obj);
-
-      if (o->is_immutable)
-       g_assert (o->is_immutable (obj));
-
-      g_assert (!o->set_user_data (obj, &key[0], &data[0], free_up0, TRUE));
-      g_assert (!o->get_user_data (obj, &key[0]));
-
-      o->destroy (obj);
-      o->destroy (obj);
-      o->destroy (obj);
-      o->destroy (obj);
-      o->destroy (obj);
-
-      g_assert (!data[0].freed);
-    }
-
-    {
-      data_t data[2] = {{MAGIC0, FALSE}, {MAGIC1, FALSE}};
-
-      g_test_message ("->create_inert()");
-      obj = o->create_inert ();
-      if (!obj)
-       continue;
-      if (obj == o->get_empty ())
-        continue; /* Tested already */
-
-      g_assert (obj == o->reference (obj));
-      o->destroy (obj);
-
-      if (o->is_immutable)
-       g_assert (o->is_immutable (obj));
-
-      g_assert (!o->set_user_data (obj, &key[0], &data[0], free_up0, TRUE));
-      g_assert (!o->get_user_data (obj, &key[0]));
-
-      o->destroy (obj);
-      o->destroy (obj);
-      o->destroy (obj);
-      o->destroy (obj);
-      o->destroy (obj);
-
-      g_assert (!data[0].freed);
-    }
-  }
-}
-
-
-int
-main (int argc, char **argv)
-{
-  hb_test_init (&argc, &argv);
-
-  hb_test_add (test_object);
-
-  return hb_test_run ();
-}
diff --git a/test/api/test-ot-tag.c b/test/api/test-ot-tag.c
deleted file mode 100644 (file)
index 81b6678..0000000
+++ /dev/null
@@ -1,241 +0,0 @@
-/*
- * Copyright © 2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "hb-test.h"
-
-#include <hb-ot.h>
-
-/* Unit tests for hb-ot-tag.h */
-
-
-/* https://www.microsoft.com/typography/otspec/scripttags.htm */
-
-static void
-test_simple_tags (const char *s, hb_script_t script)
-{
-  hb_script_t tag;
-  hb_script_t t1, t2;
-
-  g_test_message ("Testing script %c%c%c%c: tag %s", HB_UNTAG (hb_script_to_iso15924_tag (script)), s);
-  tag = hb_tag_from_string (s, -1);
-
-  hb_ot_tags_from_script (script, &t1, &t2);
-
-  g_assert_cmphex (t1, ==, tag);
-  g_assert_cmphex (t2, ==, HB_OT_TAG_DEFAULT_SCRIPT);
-
-  g_assert_cmphex (hb_ot_tag_to_script (tag), ==, script);
-}
-
-static void
-test_indic_tags (const char *s1, const char *s2, hb_script_t script)
-{
-  hb_script_t tag1, tag2;
-  hb_script_t t1, t2;
-
-  g_test_message ("Testing script %c%c%c%c: new tag %s, old tag %s", HB_UNTAG (hb_script_to_iso15924_tag (script)), s1, s2);
-  tag1 = hb_tag_from_string (s1, -1);
-  tag2 = hb_tag_from_string (s2, -1);
-
-  hb_ot_tags_from_script (script, &t1, &t2);
-
-  g_assert_cmphex (t1, ==, tag1);
-  g_assert_cmphex (t2, ==, tag2);
-
-  g_assert_cmphex (hb_ot_tag_to_script (tag1), ==, script);
-  g_assert_cmphex (hb_ot_tag_to_script (tag2), ==, script);
-}
-
-static void
-test_ot_tag_script_degenerate (void)
-{
-  hb_script_t t1, t2;
-
-  g_assert_cmphex (HB_TAG_CHAR4 ("DFLT"), ==, HB_OT_TAG_DEFAULT_SCRIPT);
-
-  /* HIRAGANA and KATAKANA both map to 'kana' */
-  test_simple_tags ("kana", HB_SCRIPT_KATAKANA);
-  hb_ot_tags_from_script (HB_SCRIPT_HIRAGANA, &t1, &t2);
-  g_assert_cmphex (t1, ==, HB_TAG_CHAR4 ("kana"));
-  g_assert_cmphex (t2, ==, HB_OT_TAG_DEFAULT_SCRIPT);
-
-  test_simple_tags ("DFLT", HB_SCRIPT_INVALID);
-
-  /* Spaces are replaced */
-  g_assert_cmphex (hb_ot_tag_to_script (HB_TAG_CHAR4 ("be  ")), ==, hb_script_from_string ("Beee", -1));
-}
-
-static void
-test_ot_tag_script_simple (void)
-{
-  /* Arbitrary non-existent script */
-  test_simple_tags ("wwyz", hb_script_from_string ("wWyZ", -1));
-
-  /* These we don't really care about */
-  test_simple_tags ("zyyy", HB_SCRIPT_COMMON);
-  test_simple_tags ("zinh", HB_SCRIPT_INHERITED);
-  test_simple_tags ("zzzz", HB_SCRIPT_UNKNOWN);
-
-  test_simple_tags ("arab", HB_SCRIPT_ARABIC);
-  test_simple_tags ("copt", HB_SCRIPT_COPTIC);
-  test_simple_tags ("kana", HB_SCRIPT_KATAKANA);
-  test_simple_tags ("latn", HB_SCRIPT_LATIN);
-
-  /* These are trickier since their OT script tags have space. */
-  test_simple_tags ("lao ", HB_SCRIPT_LAO);
-  test_simple_tags ("yi  ", HB_SCRIPT_YI);
-  /* Unicode-5.0 additions */
-  test_simple_tags ("nko ", HB_SCRIPT_NKO);
-  /* Unicode-5.1 additions */
-  test_simple_tags ("vai ", HB_SCRIPT_VAI);
-
-  /* https://www.microsoft.com/typography/otspec160/scripttagsProposed.htm */
-
-  /* Unicode-5.2 additions */
-  test_simple_tags ("mtei", HB_SCRIPT_MEETEI_MAYEK);
-  /* Unicode-6.0 additions */
-  test_simple_tags ("mand", HB_SCRIPT_MANDAIC);
-}
-
-static void
-test_ot_tag_script_indic (void)
-{
-  test_indic_tags ("bng2", "beng", HB_SCRIPT_BENGALI);
-  test_indic_tags ("dev2", "deva", HB_SCRIPT_DEVANAGARI);
-  test_indic_tags ("gjr2", "gujr", HB_SCRIPT_GUJARATI);
-  test_indic_tags ("gur2", "guru", HB_SCRIPT_GURMUKHI);
-  test_indic_tags ("knd2", "knda", HB_SCRIPT_KANNADA);
-  test_indic_tags ("mlm2", "mlym", HB_SCRIPT_MALAYALAM);
-  test_indic_tags ("ory2", "orya", HB_SCRIPT_ORIYA);
-  test_indic_tags ("tml2", "taml", HB_SCRIPT_TAMIL);
-  test_indic_tags ("tel2", "telu", HB_SCRIPT_TELUGU);
-}
-
-
-
-/* https://www.microsoft.com/typography/otspec/languagetags.htm */
-
-static void
-test_language_two_way (const char *tag_s, const char *lang_s)
-{
-  hb_language_t lang = hb_language_from_string (lang_s, -1);
-  hb_tag_t tag = hb_tag_from_string (tag_s, -1);
-
-  g_test_message ("Testing language %s <-> tag %s", lang_s, tag_s);
-
-  g_assert_cmphex (tag, ==, hb_ot_tag_from_language (lang));
-  g_assert (lang == hb_ot_tag_to_language (tag));
-}
-
-static void
-test_tag_from_language (const char *tag_s, const char *lang_s)
-{
-  hb_language_t lang = hb_language_from_string (lang_s, -1);
-  hb_tag_t tag = hb_tag_from_string (tag_s, -1);
-
-  g_test_message ("Testing language %s -> tag %s", lang_s, tag_s);
-
-  g_assert_cmphex (tag, ==, hb_ot_tag_from_language (lang));
-}
-
-static void
-test_tag_to_language (const char *tag_s, const char *lang_s)
-{
-  hb_language_t lang = hb_language_from_string (lang_s, -1);
-  hb_tag_t tag = hb_tag_from_string (tag_s, -1);
-
-  g_test_message ("Testing tag %s -> language %s", tag_s, lang_s);
-
-  g_assert (lang == hb_ot_tag_to_language (tag));
-}
-
-static void
-test_ot_tag_language (void)
-{
-  g_assert_cmphex (HB_TAG_CHAR4 ("dflt"), ==, HB_OT_TAG_DEFAULT_LANGUAGE);
-  test_language_two_way ("dflt", NULL);
-
-  test_language_two_way ("ARA", "ar");
-
-  test_language_two_way ("AZE", "az");
-  test_tag_from_language ("AZE", "az-ir");
-  test_tag_from_language ("AZE", "az-az");
-
-  test_language_two_way ("ENG", "en");
-  test_tag_from_language ("ENG", "en_US");
-
-  test_language_two_way ("EVN", "eve");
-
-  test_language_two_way ("FAR", "fa");
-  test_tag_from_language ("FAR", "fa_IR");
-
-  test_language_two_way ("ZHH", "zh-hk"); /* Chinese (Hong Kong) */
-
-  test_tag_from_language ("ZHS", "zh-cn"); /* Chinese (China) */
-  test_tag_from_language ("ZHS", "zh-sg"); /* Chinese (Singapore) */
-  test_tag_from_language ("ZHT", "zh-mo"); /* Chinese (Macao) */
-  test_tag_from_language ("ZHT", "zh-tw"); /* Chinese (Taiwan) */
-
-  test_tag_from_language ("ZHS", "zh"); /* Chinese */
-  test_tag_from_language ("ZHS", "zh-xx");
-
-  test_tag_to_language ("ZHS", "zh-x-hbotzhs");
-  test_tag_to_language ("ZHT", "zh-x-hbotzht");
-  test_tag_to_language ("ZHP", "zh-x-hbotzhp");
-
-  test_language_two_way ("ABC", "x-hbotabc");
-  test_tag_from_language ("ABC", "asdf-asdf-wer-x-hbotabc-zxc");
-  test_tag_from_language ("ABC", "asdf-asdf-wer-x-hbotabc");
-  test_tag_from_language ("ABCD", "asdf-asdf-wer-x-hbotabcd");
-
-  test_tag_from_language ("dflt", "asdf-asdf-wer-x-hbot-zxc");
-
-  test_tag_from_language ("dflt", "xy");
-  test_tag_from_language ("XYZ", "xyz"); /* Unknown ISO 639-3 */
-  test_tag_from_language ("XYZ", "xyz-qw"); /* Unknown ISO 639-3 */
-
-  /* Test that x-hbot overrides the base language */
-  test_tag_from_language ("ABC", "fa-x-hbotabc-zxc");
-  test_tag_from_language ("ABC", "fa-ir-x-hbotabc-zxc");
-  test_tag_from_language ("ABC", "zh-x-hbotabc-zxc");
-  test_tag_from_language ("ABC", "zh-cn-x-hbotabc-zxc");
-  test_tag_from_language ("ABC", "zh-xy-x-hbotabc-zxc");
-  test_tag_from_language ("ABC", "xyz-xy-x-hbotabc-zxc");
-}
-
-int
-main (int argc, char **argv)
-{
-  hb_test_init (&argc, &argv);
-
-  hb_test_add (test_ot_tag_script_degenerate);
-  hb_test_add (test_ot_tag_script_simple);
-  hb_test_add (test_ot_tag_script_indic);
-
-  hb_test_add (test_ot_tag_language);
-
-  return hb_test_run();
-}
diff --git a/test/api/test-shape-complex.c b/test/api/test-shape-complex.c
deleted file mode 100644 (file)
index 1963b5e..0000000
+++ /dev/null
@@ -1,1159 +0,0 @@
-/*
- * Copyright © 2011  Google, Inc.
- * Copyright © 2008  Nokia Corporation and/or its subsidiary(-ies)
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "hb-test.h"
-
-/* Unit tests for complex text shaping */
-
-/*
- * This test provides a framework to test aspects of hb_shape() that are
- * font-dependent.  Please add tests for any feature that fits that
- * description.
- */
-
-#include <hb-ft.h>
-
-typedef struct
-{
-  const char *font_file;
-  unsigned int face_index;
-  /* TODO add min/max face version */
-} font_data_t;
-
-static char *
-get_font_file (const font_data_t *font_data)
-{
-  return g_strdup_printf ("%s/fonts/%s", srcdir (), font_data->font_file);
-}
-
-
-typedef struct
-{
-  char           comments[64];
-  hb_codepoint_t characters[16];
-  hb_codepoint_t glyphs[16];
-} test_data_t;
-
-typedef struct
-{
-  const font_data_t font_data;
-  const test_data_t test_datas[];
-} test_set_t;
-
-typedef struct
-{
-  const font_data_t *font_data;
-  const test_data_t *test_data;
-} test_t;
-
-
-static const test_set_t tests_devanagari1 = {
-  {"raghu.ttf", 0},
-  {
-    { "Ka",
-      { 0x0915, 0 },
-      { 0x0080, 0 }
-    },
-    { "Ka Halant",
-      { 0x0915, 0x094d, 0 },
-      { 0x0080, 0x0051, 0 }
-    },
-    { "Ka Halant Ka",
-      { 0x0915, 0x094d, 0x0915, 0 },
-      { 0x00c8, 0x0080, 0 }
-    },
-    { "Ka MatraI",
-      { 0x0915, 0x093f, 0 },
-      { 0x01d1, 0x0080, 0 }
-    },
-    { "Ra Halant Ka",
-      { 0x0930, 0x094d, 0x0915, 0 },
-      { 0x0080, 0x005b, 0 }
-    },
-    { "Ra Halant Ka MatraI",
-      { 0x0930, 0x094d, 0x0915, 0x093f, 0 },
-      { 0x01d1, 0x0080, 0x005b, 0 }
-    },
-    { "MatraI",
-      { 0x093f, 0 },
-      { 0x01d4, 0x029c, 0 }
-    },
-    { "Ka Nukta",
-      { 0x0915, 0x093c, 0 },
-      { 0x00a4, 0 }
-    },
-    { "Ka Halant Ra",
-      { 0x0915, 0x094d, 0x0930, 0 },
-      { 0x0110, 0 }
-    },
-    { "Ka Halant Ra Halant Ka",
-      { 0x0915, 0x094d, 0x0930, 0x094d, 0x0915, 0 },
-      { 0x0158, 0x0080, 0 }
-    },
-    { "",
-      { 0x0930, 0x094d, 0x200d, 0 },
-      { 0x00e2, 0 }
-    },
-    { "",
-      { 0x0915, 0x094d, 0x0930, 0x094d, 0x200d, 0 },
-      { 0x0158, 0 }
-    },
-    {{0}}
-  }
-};
-
-static const test_set_t tests_devanagari2 = {
-  {"mangal.ttf", 0},
-  {
-    { "Ka",
-      { 0x0915, 0 },
-      { 0x0080, 0 }
-    },
-    { "Ka Halant",
-      { 0x0915, 0x094d, 0 },
-      { 0x0080, 0x0051, 0 }
-    },
-    { "Ka Halant Ka",
-      { 0x0915, 0x094d, 0x0915, 0 },
-      { 0x00c8, 0x0080, 0 }
-    },
-    { "Ka MatraI",
-      { 0x0915, 0x093f, 0 },
-      { 0x01d1, 0x0080, 0 }
-    },
-    { "Ra Halant Ka",
-      { 0x0930, 0x094d, 0x0915, 0 },
-      { 0x0080, 0x005b, 0 }
-    },
-    { "Ra Halant Ka MatraI",
-      { 0x0930, 0x094d, 0x0915, 0x093f, 0 },
-      { 0x01d1, 0x0080, 0x005b, 0 }
-    },
-    { "MatraI",
-      { 0x093f, 0 },
-      { 0x01d4, 0x029c, 0 }
-    },
-    { "Ka Nukta",
-      { 0x0915, 0x093c, 0 },
-      { 0x00a4, 0 }
-    },
-    { "Ka Halant Ra",
-      { 0x0915, 0x094d, 0x0930, 0 },
-      { 0x0110, 0 }
-    },
-    { "Ka Halant Ra Halant Ka",
-      { 0x0915, 0x094d, 0x0930, 0x094d, 0x0915, 0 },
-      { 0x0158, 0x0080, 0 }
-    },
-    { "",
-      { 0x92b, 0x94d, 0x930, 0 },
-      { 0x125, 0 }
-    },
-    { "",
-      { 0x92b, 0x93c, 0x94d, 0x930, 0 },
-      { 0x149, 0 }
-    },
-    {{0}}
-  }
-};
-
-static const test_set_t tests_bengali1 = {
-  {"AkaashNormal.ttf", 0},
-  {
-    { "Ka",
-      { 0x0995, 0 },
-      { 0x0151, 0 }
-    },
-    { "Ka Halant",
-      { 0x0995, 0x09cd, 0 },
-      { 0x0151, 0x017d, 0 }
-    },
-    { "Ka Halant Ka",
-      { 0x0995, 0x09cd, 0x0995, 0 },
-      { 0x019b, 0 }
-    },
-    { "Ka MatraI",
-      { 0x0995, 0x09bf, 0 },
-      { 0x0173, 0x0151, 0 }
-    },
-    { "Ra Halant Ka",
-      { 0x09b0, 0x09cd, 0x0995, 0 },
-      { 0x0151, 0x0276, 0 }
-    },
-    { "Ra Halant Ka MatraI",
-      { 0x09b0, 0x09cd, 0x0995, 0x09bf, 0 },
-      { 0x0173, 0x0151, 0x0276, 0 }
-    },
-    { "Ka Nukta",
-      { 0x0995, 0x09bc, 0 },
-      { 0x0151, 0x0171, 0 }
-    },
-    { "Ka Halant Ra",
-      { 0x0995, 0x09cd, 0x09b0, 0 },
-      { 0x01f4, 0 }
-    },
-    { "Ka Halant Ra Halant Ka",
-      { 0x0995, 0x09cd, 0x09b0, 0x09cd, 0x0995, 0 },
-      { 0x025c, 0x0276, 0x0151, 0 }
-    },
-    { "Ya + Halant",
-      { 0x09af, 0x09cd, 0 },
-      { 0x016a, 0x017d, 0 }
-    },
-    { "Da Halant Ya -> Da Ya-Phala",
-      { 0x09a6, 0x09cd, 0x09af, 0 },
-      { 0x01e5, 0 }
-    },
-    { "A Halant Ya -> A Ya-phala",
-      { 0x0985, 0x09cd, 0x09af, 0 },
-      { 0x0145, 0x01cf, 0 }
-    },
-    { "Na Halant Ka",
-      { 0x09a8, 0x09cd, 0x0995, 0 },
-      { 0x026f, 0x0151, 0 }
-    },
-    { "Na Halant ZWNJ Ka",
-      { 0x09a8, 0x09cd, 0x200c, 0x0995, 0 },
-      { 0x0164, 0x017d, 0x0151, 0 }
-    },
-    { "Na Halant ZWJ Ka",
-      { 0x09a8, 0x09cd, 0x200d, 0x0995, 0 },
-      { 0x026f, 0x0151, 0 }
-    },
-    { "Ka Halant ZWNJ Ka",
-      { 0x0995, 0x09cd, 0x200c, 0x0995, 0 },
-      { 0x0151, 0x017d, 0x0151, 0 }
-    },
-    { "Ka Halant ZWJ Ka",
-      { 0x0995, 0x09cd, 0x200d, 0x0995, 0 },
-      { 0x025c, 0x0151, 0 }
-    },
-    { "Na Halant Ra",
-      { 0x09a8, 0x09cd, 0x09b0, 0 },
-      { 0x0207, 0 }
-    },
-    { "Na Halant ZWNJ Ra",
-      { 0x09a8, 0x09cd, 0x200c, 0x09b0, 0 },
-      { 0x0164, 0x017d, 0x016b, 0 }
-    },
-    { "Na Halant ZWJ Ra",
-      { 0x09a8, 0x09cd, 0x200d, 0x09b0, 0 },
-      { 0x026f, 0x016b, 0 }
-    },
-    { "Na Halant Ba",
-      { 0x09a8, 0x09cd, 0x09ac, 0 },
-      { 0x022f, 0 }
-    },
-    { "Na Halant ZWNJ Ba",
-      { 0x09a8, 0x09cd, 0x200c, 0x09ac, 0 },
-      { 0x0164, 0x017d, 0x0167, 0 }
-    },
-    { "Na Halant ZWJ Ba",
-      { 0x09a8, 0x09cd, 0x200d, 0x09ac, 0 },
-      { 0x026f, 0x0167, 0 }
-    },
-    { "Na Halant Dha",
-      { 0x09a8, 0x09cd, 0x09a7, 0 },
-      { 0x01d3, 0 }
-    },
-    { "Na Halant ZWNJ Dha",
-      { 0x09a8, 0x09cd, 0x200c, 0x09a7, 0 },
-      { 0x0164, 0x017d, 0x0163, 0 }
-    },
-    { "Na Halant ZWJ Dha",
-      { 0x09a8, 0x09cd, 0x200d, 0x09a7, 0 },
-      { 0x026f, 0x0163, 0 }
-    },
-    { "Ra Halant Ka MatraAU",
-      { 0x09b0, 0x09cd, 0x0995, 0x09cc, 0 },
-      { 0x0179, 0x0151, 0x0276, 0x017e, 0 }
-    },
-    { "Ra Halant Ba Halant Ba",
-      { 0x09b0, 0x09cd, 0x09ac, 0x09cd, 0x09ac, 0 },
-      { 0x0232, 0x0276, 0 }
-    },
-    { "",
-      { 0x9b0, 0x9cd, 0x995, 0x9be, 0x982, 0 },
-      { 0x151, 0x276, 0x172, 0x143, 0 }
-    },
-    { "",
-      { 0x9b0, 0x9cd, 0x995, 0x9be, 0x983, 0 },
-      { 0x151, 0x276, 0x172, 0x144, 0 }
-    },
-    /*  Test decomposed two part matras */
-    { "",
-      { 0x995, 0x9c7, 0x9be, 0 },
-      { 0x179, 0x151, 0x172, 0 }
-    },
-    { "",
-      { 0x995, 0x9c7, 0x9d7, 0 },
-      { 0x179, 0x151, 0x17e, 0 }
-    },
-    { "",
-      { 0x9b0, 0x9cd, 0x9ad, 0 },
-      { 0x168, 0x276, 0 }
-    },
-    { "",
-      { 0x9f0, 0x9cd, 0x9ad, 0 },
-      { 0x168, 0x276, 0 }
-    },
-    { "",
-      { 0x9f1, 0x9cd, 0x9ad, 0 },
-      { 0x191, 0x17d, 0x168, 0 }
-    },
-    {{0}}
-  }
-};
-
-static const test_set_t tests_bengali2 = {
-  {"MuktiNarrow.ttf", 0},
-  {
-    { "Ka",
-      { 0x0995, 0 },
-      { 0x0073, 0 }
-    },
-    { "Ka Halant",
-      { 0x0995, 0x09cd, 0 },
-      { 0x00b9, 0 }
-    },
-    { "Ka Halant Ka",
-      { 0x0995, 0x09cd, 0x0995, 0 },
-      { 0x0109, 0 }
-    },
-    { "Ka MatraI",
-      { 0x0995, 0x09bf, 0 },
-      { 0x0095, 0x0073, 0 }
-    },
-    { "Ra Halant Ka",
-      { 0x09b0, 0x09cd, 0x0995, 0 },
-      { 0x0073, 0x00e1, 0 }
-    },
-    { "Ra Halant Ka MatraI",
-      { 0x09b0, 0x09cd, 0x0995, 0x09bf, 0 },
-      { 0x0095, 0x0073, 0x00e1, 0 }
-    },
-    { "MatraI",
-      { 0x09bf, 0 },
-      { 0x0095, 0x01c8, 0 }
-    },
-    { "Ka Nukta",
-      { 0x0995, 0x09bc, 0 },
-      { 0x0073, 0x0093, 0 }
-    },
-    { "Ka Halant Ra",
-      { 0x0995, 0x09cd, 0x09b0, 0 },
-      { 0x00e5, 0 }
-    },
-    { "Ka Halant Ra Halant Ka",
-      { 0x995, 0x9cd, 0x9b0, 0x9cd, 0x995, 0 },
-      { 0x234, 0x24e, 0x73, 0 }
-    },
-    { "Ya + Halant",
-      { 0x09af, 0x09cd, 0 },
-      { 0x00d2, 0 }
-    },
-    { "Da Halant Ya -> Da Ya-Phala",
-      { 0x09a6, 0x09cd, 0x09af, 0 },
-      { 0x0084, 0x00e2, 0 }
-    },
-    { "A Halant Ya -> A Ya-phala",
-      { 0x0985, 0x09cd, 0x09af, 0 },
-      { 0x0067, 0x00e2, 0 }
-    },
-    { "Na Halant Ka",
-      { 0x09a8, 0x09cd, 0x0995, 0 },
-      { 0x0188, 0 }
-    },
-    { "Na Halant ZWNJ Ka",
-      { 0x9a8, 0x9cd, 0x200c, 0x995, 0 },
-      { 0xcc, 0x73, 0 }
-    },
-    { "Na Halant ZWJ Ka",
-      { 0x9a8, 0x9cd, 0x200d, 0x995, 0 },
-      { 0x247, 0x73, 0 }
-    },
-    { "Ka Halant ZWNJ Ka",
-      { 0x9a8, 0x9cd, 0x200d, 0x995, 0 },
-      { 0x247, 0x73, 0 }
-    },
-    { "Ka Halant ZWJ Ka",
-      { 0x9a8, 0x9cd, 0x200d, 0x995, 0 },
-      { 0x247, 0x73, 0 }
-    },
-    { "Na Halant Ra",
-      { 0x09a8, 0x09cd, 0x09b0, 0 },
-      { 0x00f8, 0 }
-    },
-    { "Na Halant ZWNJ Ra",
-      { 0x09a8, 0x09cd, 0x200c, 0x09b0, 0 },
-      { 0xcc, 0x8d, 0 }
-    },
-    { "Na Halant ZWJ Ra",
-      { 0x9a8, 0x9cd, 0x200d, 0x9b0, 0 },
-      { 0x247, 0x8d, 0 }
-    },
-    { "Na Halant Ba",
-      { 0x09a8, 0x09cd, 0x09ac, 0 },
-      { 0x0139, 0 }
-    },
-    { "Na Halant ZWNJ Ba",
-      { 0x9a8, 0x9cd, 0x200c, 0x9ac, 0 },
-      { 0xcc, 0x89, 0 }
-    },
-    { "Na Halant ZWJ Ba",
-      { 0x9a8, 0x9cd, 0x200d, 0x9ac, 0 },
-      { 0x247, 0x89, 0 }
-    },
-    { "Na Halant Dha",
-      { 0x09a8, 0x09cd, 0x09a7, 0 },
-      { 0x0145, 0 }
-    },
-    { "Na Halant ZWNJ Dha",
-      { 0x09a8, 0x09cd, 0x200c, 0x09a7, 0 },
-      { 0xcc, 0x85, 0 }
-    },
-    { "Na Halant ZWJ Dha",
-      { 0x09a8, 0x09cd, 0x200d, 0x09a7, 0 },
-      { 0x247, 0x85, 0 }
-    },
-    { "Ra Halant Ka MatraAU",
-      { 0x9b0, 0x9cd, 0x995, 0x9cc, 0 },
-      { 0x232, 0x73, 0xe1, 0xa0, 0 }
-    },
-    { "Ra Halant Ba Halant Ba",
-      { 0x09b0, 0x09cd, 0x09ac, 0x09cd, 0x09ac, 0 },
-      { 0x013b, 0x00e1, 0 }
-    },
-    {{0}}
-  }
-};
-
-static const test_set_t tests_bengali3 = {
-  {"LikhanNormal.ttf", 0},
-  {
-    { "",
-      { 0x09a8, 0x09cd, 0x09af, 0 },
-      { 0x01ca, 0 }
-    },
-    { "",
-      { 0x09b8, 0x09cd, 0x09af, 0 },
-      { 0x020e, 0 }
-    },
-    { "",
-      { 0x09b6, 0x09cd, 0x09af, 0 },
-      { 0x01f4, 0 }
-    },
-    { "",
-      { 0x09b7, 0x09cd, 0x09af, 0 },
-      { 0x01fe, 0 }
-    },
-    { "",
-      { 0x09b0, 0x09cd, 0x09a8, 0x09cd, 0x200d, 0 },
-      { 0x10b, 0x167, 0 }
-    },
-    { "",
-      { 0x9b0, 0x9cd, 0x9ad, 0 },
-      { 0xa1, 0x167, 0 }
-    },
-    { "",
-      { 0x9f0, 0x9cd, 0x9ad, 0 },
-      { 0xa1, 0x167, 0 }
-    },
-    { "",
-      { 0x9f1, 0x9cd, 0x9ad, 0 },
-      { 0x11c, 0xa1, 0 }
-    },
-    {{0}}
-  }
-};
-
-static const test_set_t tests_gurmukhi = {
-  {"lohit_pa.ttf", 0},
-  {
-    { "",
-      { 0xA15, 0xA4D, 0xa39, 0 },
-      { 0x3b, 0x8b, 0 }
-    },
-    {{0}}
-  }
-};
-
-static const test_set_t tests_oriya = {
-  {"utkalm.ttf", 0},
-  {
-    { "",
-      { 0xb15, 0xb4d, 0xb24, 0xb4d, 0xb30, 0 },
-      { 0x150, 0x125, 0 }
-    },
-    { "",
-      { 0xb24, 0xb4d, 0xb24, 0xb4d, 0xb2c, 0 },
-      { 0x151, 0x120, 0 }
-    },
-    { "",
-      { 0xb28, 0xb4d, 0xb24, 0xb4d, 0xb2c, 0 },
-      { 0x152, 0x120, 0 }
-    },
-    { "",
-      { 0xb28, 0xb4d, 0xb24, 0xb4d, 0xb2c, 0 },
-      { 0x152, 0x120, 0 }
-    },
-    { "",
-      { 0xb28, 0xb4d, 0xb24, 0xb4d, 0xb30, 0 },
-      { 0x176, 0 }
-    },
-    { "",
-      { 0xb38, 0xb4d, 0xb24, 0xb4d, 0xb30, 0 },
-      { 0x177, 0 }
-    },
-    { "",
-      { 0xb28, 0xb4d, 0xb24, 0xb4d, 0xb30, 0xb4d, 0xb2f, 0 },
-      { 0x176, 0x124, 0 }
-    },
-    {{0}}
-  }
-};
-
-static const test_set_t tests_tamil = {
-  {"akruti1.ttf", 0},
-  {
-    { "",
-      { 0x0b95, 0x0bc2, 0 },
-      { 0x004e, 0 }
-    },
-    { "",
-      { 0x0bae, 0x0bc2, 0 },
-      { 0x009e, 0 }
-    },
-    { "",
-      { 0x0b9a, 0x0bc2, 0 },
-      { 0x0058, 0 }
-    },
-    { "",
-      { 0x0b99, 0x0bc2, 0 },
-      { 0x0053, 0 }
-    },
-    { "",
-      { 0x0bb0, 0x0bc2, 0 },
-      { 0x00a8, 0 }
-    },
-    { "",
-      { 0x0ba4, 0x0bc2, 0 },
-      { 0x008e, 0 }
-    },
-    { "",
-      { 0x0b9f, 0x0bc2, 0 },
-      { 0x0062, 0 }
-    },
-    { "",
-      { 0x0b95, 0x0bc6, 0 },
-      { 0x000a, 0x0031, 0 }
-    },
-    { "",
-      { 0x0b95, 0x0bca, 0 },
-      { 0x000a, 0x0031, 0x0007, 0 }
-    },
-    { "",
-      { 0x0b95, 0x0bc6, 0x0bbe, 0 },
-      { 0x000a, 0x0031, 0x007, 0 }
-    },
-    { "",
-      { 0x0b95, 0x0bcd, 0x0bb7, 0 },
-      { 0x0049, 0 }
-    },
-    { "",
-      { 0x0b95, 0x0bcd, 0x0bb7, 0x0bca, 0 },
-      { 0x000a, 0x0049, 0x007, 0 }
-    },
-    { "",
-      { 0x0b95, 0x0bcd, 0x0bb7, 0x0bc6, 0x0bbe, 0 },
-      { 0x000a, 0x0049, 0x007, 0 }
-    },
-    { "",
-      { 0x0b9f, 0x0bbf, 0 },
-      { 0x005f, 0 }
-    },
-    { "",
-      { 0x0b9f, 0x0bc0, 0 },
-      { 0x0060, 0 }
-    },
-    { "",
-      { 0x0bb2, 0x0bc0, 0 },
-      { 0x00ab, 0 }
-    },
-    { "",
-      { 0x0bb2, 0x0bbf, 0 },
-      { 0x00aa, 0 }
-    },
-    { "",
-      { 0x0bb0, 0x0bcd, 0 },
-      { 0x00a4, 0 }
-    },
-    { "",
-      { 0x0bb0, 0x0bbf, 0 },
-      { 0x00a5, 0 }
-    },
-    { "",
-      { 0x0bb0, 0x0bc0, 0 },
-      { 0x00a6, 0 }
-    },
-    { "",
-      { 0x0b83, 0 },
-      { 0x0025, 0 }
-    },
-    { "",
-      { 0x0b83, 0x0b95, 0 },
-      { 0x0025, 0x0031, 0 }
-    },
-    {{0}}
-  }
-};
-
-static const test_set_t tests_telugu = {
-  {"Pothana2000.ttf", 0},
-  {
-    { "",
-      { 0xc15, 0xc4d, 0 },
-      { 0xbb, 0 }
-    },
-    { "",
-      { 0xc15, 0xc4d, 0xc37, 0 },
-      { 0x4b, 0 }
-    },
-    { "",
-      { 0xc15, 0xc4d, 0xc37, 0xc4d, 0 },
-      { 0xe0, 0 }
-    },
-    { "",
-      { 0xc15, 0xc4d, 0xc37, 0xc4d, 0xc23, 0 },
-      { 0x4b, 0x91, 0 }
-    },
-    { "",
-      { 0xc15, 0xc4d, 0xc30, 0 },
-      { 0x5a, 0xb2, 0 }
-    },
-    { "",
-      { 0xc15, 0xc4d, 0xc30, 0xc4d, 0 },
-      { 0xbb, 0xb2, 0 }
-    },
-    { "",
-      { 0xc15, 0xc4d, 0xc30, 0xc4d, 0xc15, 0 },
-      { 0x5a, 0xb2, 0x83, 0 }
-    },
-    { "",
-      { 0xc15, 0xc4d, 0xc30, 0xc3f, 0 },
-      { 0xe2, 0xb2, 0 }
-    },
-    { "",
-      { 0xc15, 0xc4d, 0xc15, 0xc48, 0 },
-      { 0xe6, 0xb3, 0x83, 0 }
-    },
-    { "",
-      { 0xc15, 0xc4d, 0xc30, 0xc48, 0 },
-      { 0xe6, 0xb3, 0x9f, 0 }
-    },
-    { "",
-      { 0xc15, 0xc46, 0xc56, 0 },
-      { 0xe6, 0xb3, 0 }
-    },
-    {{0}}
-  }
-};
-
-static const test_set_t tests_kannada1 = {
-  {"Sampige.ttf", 0},
-  {
-    { "",
-      { 0x0ca8, 0x0ccd, 0x0ca8, 0 },
-      { 0x0049, 0x00ba, 0 }
-    },
-    { "",
-      { 0x0ca8, 0x0ccd, 0x0ca1, 0 },
-      { 0x0049, 0x00b3, 0 }
-    },
-    { "",
-      { 0x0caf, 0x0cc2, 0 },
-      { 0x004f, 0x005d, 0 }
-    },
-    { "",
-      { 0x0ce0, 0 },
-      { 0x006a, 0 }
-    },
-    { "",
-      { 0x0ce6, 0x0ce7, 0x0ce8, 0 },
-      { 0x006b, 0x006c, 0x006d, 0 }
-    },
-    { "",
-      { 0x0cb5, 0x0ccb, 0 },
-      { 0x015f, 0x0067, 0 }
-    },
-    { "",
-      { 0x0cb0, 0x0ccd, 0x0cae, 0 },
-      { 0x004e, 0x0082, 0 }
-    },
-    { "",
-      { 0x0cb0, 0x0ccd, 0x0c95, 0 },
-      { 0x0036, 0x0082, 0 }
-    },
-    { "",
-      { 0x0c95, 0x0ccd, 0x0cb0, 0 },
-      { 0x0036, 0x00c1, 0 }
-    },
-    { "",
-      { 0x0cb0, 0x0ccd, 0x200d, 0x0c95, 0 },
-      { 0x0050, 0x00a7, 0 }
-    },
-    {{0}}
-  }
-};
-
-static const test_set_t tests_kannada2 = {
-  {"tunga.ttf", 0},
-  {
-    { "",
-      { 0x0cb7, 0x0cc6, 0 },
-      { 0x00b0, 0x006c, 0 }
-    },
-    { "",
-      { 0x0cb7, 0x0ccd, 0 },
-      { 0x0163, 0 }
-    },
-    { "",
-      { 0xc95, 0xcbf, 0xcd5, 0 },
-      { 0x114, 0x73, 0 }
-    },
-    { "",
-      { 0xc95, 0xcc6, 0xcd5, 0 },
-      { 0x90, 0x6c, 0x73, 0 }
-    },
-    { "",
-      { 0xc95, 0xcc6, 0xcd6, 0 },
-      { 0x90, 0x6c, 0x74, 0 }
-    },
-    { "",
-      { 0xc95, 0xcc6, 0xcc2, 0 },
-      { 0x90, 0x6c, 0x69, 0 }
-    },
-    { "",
-      { 0xc95, 0xcca, 0xcd5, 0 },
-      { 0x90, 0x6c, 0x69, 0x73, 0 }
-    },
-    {{0}}
-  }
-};
-
-static const test_set_t tests_malayalam1 = {
-  {"AkrutiMal2Normal.ttf", 0},
-  {
-    { "",
-      { 0x0d15, 0x0d46, 0 },
-      { 0x005e, 0x0034, 0 }
-    },
-    { "",
-      { 0x0d15, 0x0d47, 0 },
-      { 0x005f, 0x0034, 0 }
-    },
-    { "",
-      { 0x0d15, 0x0d4b, 0 },
-      { 0x005f, 0x0034, 0x0058, 0 }
-    },
-    { "",
-      { 0x0d15, 0x0d48, 0 },
-      { 0x0060, 0x0034, 0 }
-    },
-    { "",
-      { 0x0d15, 0x0d4a, 0 },
-      { 0x005e, 0x0034, 0x0058, 0 }
-    },
-    { "",
-      { 0x0d30, 0x0d4d, 0x0d15, 0 },
-      { 0x009e, 0x0034, 0 }
-    },
-    { "",
-      { 0x0d15, 0x0d4d, 0x0d35, 0 },
-      { 0x0034, 0x007a, 0 }
-    },
-    { "",
-      { 0x0d15, 0x0d4d, 0x0d2f, 0 },
-      { 0x0034, 0x00a2, 0 }
-    },
-    { "",
-      { 0x0d1f, 0x0d4d, 0x0d1f, 0 },
-      { 0x0069, 0 }
-    },
-    { "",
-      { 0x0d26, 0x0d4d, 0x0d26, 0 },
-      { 0x0074, 0 }
-    },
-    { "",
-      { 0x0d30, 0x0d4d, 0 },
-      { 0x009e, 0 }
-    },
-    { "",
-      { 0x0d30, 0x0d4d, 0x200c, 0 },
-      { 0x009e, 0 }
-    },
-    { "",
-      { 0x0d30, 0x0d4d, 0x200d, 0 },
-      { 0x009e, 0 }
-    },
-    { "",
-      { 0xd15, 0xd46, 0xd3e, 0 },
-      { 0x5e, 0x34, 0x58, 0 }
-    },
-    { "",
-      { 0xd15, 0xd47, 0xd3e, 0 },
-      { 0x5f, 0x34, 0x58, 0 }
-    },
-    { "",
-      { 0xd15, 0xd46, 0xd57, 0 },
-      { 0x5e, 0x34, 0x65, 0 }
-    },
-    { "",
-      { 0xd15, 0xd57, 0 },
-      { 0x34, 0x65, 0 }
-    },
-    { "",
-      { 0xd1f, 0xd4d, 0xd1f, 0xd41, 0xd4d, 0 },
-      { 0x69, 0x5b, 0x64, 0 }
-    },
-
-    {{0}}
-  }
-};
-
-static const test_set_t tests_malayalam2 = {
-  {"Rachana.ttf", 0},
-  {
-    { "",
-      { 0xd37, 0xd4d, 0xd1f, 0xd4d, 0xd30, 0xd40, 0 },
-      { 0x385, 0xa3, 0 }
-    },
-    { "",
-      { 0xd2f, 0xd4d, 0xd15, 0xd4d, 0xd15, 0xd41, 0 },
-      { 0x2ff, 0 }
-    },
-    { "",
-      { 0xd33, 0xd4d, 0xd33, 0 },
-      { 0x3f8, 0 }
-    },
-    { "",
-      { 0xd2f, 0xd4d, 0xd15, 0xd4d, 0xd15, 0xd41, 0 },
-      { 0x2ff, 0 }
-    },
-    { "",
-      { 0xd30, 0xd4d, 0x200d, 0xd35, 0xd4d, 0xd35, 0 },
-      { 0xf3, 0x350, 0 }
-    },
-
-    {{0}}
-  }
-};
-
-static const test_set_t tests_sinhala = {
-  {"FM-MalithiUW46.ttf", 0},
-  {
-    { "",
-      { 0xd9a, 0xdd9, 0xdcf, 0 },
-      { 0x4a, 0x61, 0x42, 0 }
-    },
-    { "",
-      { 0xd9a, 0xdd9, 0xddf, 0 },
-      { 0x4a, 0x61, 0x50, 0 }
-    },
-    { "",
-      { 0xd9a, 0xdd9, 0xdca, 0 },
-      { 0x4a, 0x62, 0 }
-    },
-    { "",
-      { 0xd9a, 0xddc, 0xdca, 0 },
-      { 0x4a, 0x61, 0x42, 0x41, 0 }
-    },
-    { "",
-      { 0xd9a, 0xdda, 0 },
-      { 0x4a, 0x62, 0 }
-    },
-    { "",
-      { 0xd9a, 0xddd, 0 },
-      { 0x4a, 0x61, 0x42, 0x41, 0 }
-    },
-    {{0}}
-  }
-};
-
-static const test_set_t tests_khmer = {
-  {"KhmerOS.ttf", 0},
-  {
-    { "",
-      { 0x179a, 0x17cd, 0 },
-      { 0x24c, 0x27f, 0 }
-    },
-    { "",
-      { 0x179f, 0x17c5, 0 },
-      { 0x273, 0x203, 0 }
-    },
-    { "",
-      { 0x1790, 0x17d2, 0x1784, 0x17c3, 0 },
-      { 0x275, 0x242, 0x182, 0 }
-    },
-    { "",
-      { 0x179a, 0 },
-      { 0x24c, 0 }
-    },
-    { "",
-      { 0x1781, 0x17d2, 0x1798, 0x17c2, 0 },
-      { 0x274, 0x233, 0x197, 0 }
-    },
-    { "",
-      { 0x1798, 0x17b6, 0 },
-      { 0x1cb, 0 }
-    },
-    { "",
-      { 0x179a, 0x17b8, 0 },
-      { 0x24c, 0x26a, 0 }
-    },
-    { "",
-      { 0x1787, 0x17b6, 0 },
-      { 0x1ba, 0 }
-    },
-    { "",
-      { 0x1798, 0x17d2, 0x1796, 0x17bb, 0 },
-      { 0x24a, 0x195, 0x26d, 0 }
-    },
-    {{0}}
-  }
-};
-
-static const test_set_t tests_nko = {
-  {"DejaVuSans.ttf", 0},
-  {
-    { "",
-      { 0x7ca, 0 },
-      { 0x5c1, 0 }
-    },
-    { "",
-      { 0x7ca, 0x7ca, 0 },
-      { 0x14d9, 0x14db, 0 }
-    },
-    { "",
-      { 0x7ca, 0x7fa, 0x7ca, 0 },
-      { 0x14d9, 0x5ec, 0x14db, 0 }
-    },
-    { "",
-      { 0x7ca, 0x7f3, 0x7ca, 0 },
-      { 0x14d9, 0x5e7, 0x14db, 0 }
-    },
-    { "",
-      { 0x7ca, 0x7f3, 0x7fa, 0x7ca, 0 },
-      { 0x14d9, 0x5ec, 0x5e7, 0x14db, 0 }
-    },
-    {{0}}
-  }
-};
-
-static const test_set_t tests_linearb = {
-  {"penuture.ttf", 0},
-  {
-    { "",
-      { 0xd800, 0xdc01, 0xd800, 0xdc02, 0xd800, 0xdc03,  0 },
-      { 0x5, 0x6, 0x7, 0 },
-    },
-    {{0}}
-  }
-};
-
-
-
-
-
-typedef struct {
-  FT_Library ft_library;
-  FT_Face ft_face;
-  hb_font_t *font;
-} ft_fixture_t;
-
-static void
-ft_fixture_init (ft_fixture_t *f, gconstpointer user_data)
-{
-  const test_t *test = user_data;
-  char *font_file = get_font_file (test->font_data);
-  FT_Error err;
-
-  FT_Init_FreeType (&f->ft_library);
-
-  err = FT_New_Face (f->ft_library, font_file, test->font_data->face_index, &f->ft_face);
-  g_assert_cmpint (err, ==, 0);
-
-  f->font = hb_ft_font_create (f->ft_face, NULL);
-
-  g_free (font_file);
-}
-
-static void
-ft_fixture_finish (ft_fixture_t *f, gconstpointer user_data)
-{
-  hb_font_destroy (f->font);
-
-  FT_Done_Face (f->ft_face);
-  FT_Done_FreeType (f->ft_library);
-}
-
-static void
-test_shape_complex (ft_fixture_t *f, gconstpointer user_data)
-{
-  const test_t *test = user_data;
-  const test_data_t *data = test->test_data;
-  hb_buffer_t *buffer;
-  unsigned int i, len, expected_len;
-  hb_glyph_info_t *glyphs;
-  hb_bool_t fail;
-  GString *str;
-
-  g_assert (f->font);
-
-  if (data->comments[0])
-    g_test_message ("Test comments: %s", data->comments);
-
-  buffer =  hb_buffer_create (0);
-  for (len = 0; data->characters[len]; len++) ;
-  hb_buffer_add_utf32 (buffer, data->characters, len, 0, len);
-
-  hb_shape (f->font, buffer, NULL, 0);
-
-  for (len = 0; data->glyphs[len]; len++) ;
-  expected_len = len;
-
-  glyphs = hb_buffer_get_glyph_infos (buffer, &len);
-  fail = len != expected_len;
-  if (!fail)
-    for (i = 0; i < len; i++)
-      if (glyphs[i].codepoint != data->glyphs[i]) {
-        fail = TRUE;
-       break;
-      }
-
-  str = g_string_new ("");
-  for (i = 0; i < len; i++)
-    g_string_append_printf (str, " %4d", glyphs[i].codepoint);
-  g_test_message ("Received glyphs: %s", str->str);
-  g_string_truncate (str, 0);
-  for (i = 0; i < expected_len; i++)
-    g_string_append_printf (str, " %4d", data->glyphs[i]);
-  g_test_message ("Expected glyphs: %s", str->str);
-  g_string_free (str, TRUE);
-
-  if (fail) {
-    g_test_message ("FAIL");
-    /* The glib test framework is useless, lets not fail for now,
-     * we can grep for FAIL/PASS and count manually.  Sigh... */
-    /*g_test_fail ();*/
-  } else
-    g_test_message ("PASS");
-
-  hb_buffer_destroy (buffer);
-}
-
-static void
-test_shape_complex_skipped (gconstpointer user_data)
-{
-  const test_t *test = user_data;
-  const test_data_t *data = test->test_data;
-
-  if (data->comments[0])
-    g_test_message ("Test comments: %s", data->comments);
-
-  g_test_message ("Skipping test");
-}
-
-
-static void
-add_test_set (const test_set_t *test_set, const char *set_name)
-{
-  const test_data_t *data;
-  char *font_file;
-  hb_bool_t skip;
-
-  font_file = get_font_file (&test_set->font_data);
-  skip = !g_file_test (font_file, G_FILE_TEST_EXISTS);
-  g_free (font_file);
-
-  for (data = test_set->test_datas; data->characters[0]; data++) {
-    char *flavor;
-    GString *str;
-    const hb_codepoint_t *p;
-
-    test_t *test = g_slice_new0 (test_t);
-    test->font_data = &test_set->font_data;
-    test->test_data = data;
-
-    str = g_string_new ("<");
-    for (p = data->characters; *p; p++)
-      g_string_append_printf (str, "%04X,", *p);
-    str->str[str->len - 1] = '>';
-
-    flavor = g_strdup_printf ("%s/%s/%ld:%s", set_name, test_set->font_data.font_file, data - test_set->test_datas, str->str);
-
-    g_string_free (str, TRUE);
-
-    if (skip)
-      hb_test_add_data_flavor ((const void *) test, flavor, test_shape_complex_skipped);
-    else
-      hb_test_add_fixture_flavor (ft_fixture, (const void *) test, flavor, test_shape_complex);
-
-    g_free (flavor);
-  }
-}
-
-
-int
-main (int argc, char **argv)
-{
-  hb_test_init (&argc, &argv);
-
-#define TEST_SET(name) add_test_set (&tests_##name, #name)
-
-  TEST_SET (devanagari1);
-  TEST_SET (devanagari2);
-  TEST_SET (bengali1);
-  TEST_SET (bengali2);
-  TEST_SET (bengali3);
-  TEST_SET (gurmukhi);
-  TEST_SET (oriya);
-  TEST_SET (tamil);
-  TEST_SET (telugu);
-  TEST_SET (kannada1);
-  TEST_SET (kannada2);
-  TEST_SET (malayalam1);
-  TEST_SET (malayalam2);
-  TEST_SET (sinhala);
-
-  TEST_SET (khmer);
-
-  TEST_SET (nko);
-  TEST_SET (linearb);
-
-  return hb_test_run();
-}
diff --git a/test/api/test-shape.c b/test/api/test-shape.c
deleted file mode 100644 (file)
index ccf6eed..0000000
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Copyright © 2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "hb-test.h"
-
-/* Unit tests for hb-shape.h */
-
-/*
- * This test provides a framework to test aspects of hb_shape() that are
- * font-independent.  Please add tests for any feature that fits that
- * description.
- */
-
-/* TODO Make this test data-driven and add some real test data */
-/* TODO Test positions too. And test non-native direction.  Test commit 2e18c6dbdfb */
-
-
-static const char test_data[] = "test\0data";
-
-static hb_position_t
-glyph_h_advance_func (hb_font_t *font, void *font_data,
-                     hb_codepoint_t glyph,
-                     void *user_data)
-{
-  switch (glyph) {
-  case 1: return 10;
-  case 2: return 6;
-  case 3: return 5;
-  }
-  return 0;
-}
-
-static hb_bool_t
-glyph_func (hb_font_t *font, void *font_data,
-           hb_codepoint_t unicode, hb_codepoint_t variant_selector,
-           hb_codepoint_t *glyph,
-           void *user_data)
-{
-  switch (unicode) {
-  case 'T': *glyph = 1; return TRUE;
-  case 'e': *glyph = 2; return TRUE;
-  case 's': *glyph = 3; return TRUE;
-  }
-  return FALSE;
-}
-
-static hb_position_t
-glyph_h_kerning_func (hb_font_t *font, void *font_data,
-                     hb_codepoint_t left, hb_codepoint_t right,
-                     void *user_data)
-{
-  if (left == 1 && right == 2)
-    return -2;
-
-  return 0;
-}
-
-static const char TesT[] = "TesT";
-
-static void
-test_shape (void)
-{
-  hb_blob_t *blob;
-  hb_face_t *face;
-  hb_font_funcs_t *ffuncs;
-  hb_font_t *font;
-  hb_buffer_t *buffer;
-  unsigned int len;
-  hb_glyph_info_t *glyphs;
-  hb_glyph_position_t *positions;
-
-  blob = hb_blob_create (test_data, sizeof (test_data), HB_MEMORY_MODE_READONLY, NULL, NULL);
-  face = hb_face_create (blob, 0);
-  hb_blob_destroy (blob);
-  font = hb_font_create (face);
-  hb_face_destroy (face);
-  hb_font_set_scale (font, 10, 10);
-
-  ffuncs = hb_font_funcs_create ();
-  hb_font_funcs_set_glyph_h_advance_func (ffuncs, glyph_h_advance_func, NULL, NULL);
-  hb_font_funcs_set_glyph_func (ffuncs, glyph_func, NULL, NULL);
-  hb_font_funcs_set_glyph_h_kerning_func (ffuncs, glyph_h_kerning_func, NULL, NULL);
-  hb_font_set_funcs (font, ffuncs, NULL, NULL);
-  hb_font_funcs_destroy (ffuncs);
-
-  buffer =  hb_buffer_create ();
-  hb_buffer_set_direction (buffer, HB_DIRECTION_LTR);
-  hb_buffer_add_utf8 (buffer, TesT, 4, 0, 4);
-
-  hb_shape (font, buffer, NULL, 0);
-
-  len = hb_buffer_get_length (buffer);
-  glyphs = hb_buffer_get_glyph_infos (buffer, NULL);
-  positions = hb_buffer_get_glyph_positions (buffer, NULL);
-
-  {
-    const hb_codepoint_t output_glyphs[] = {1, 2, 3, 1};
-    const hb_position_t output_x_advances[] = {9, 5, 5, 10};
-    const hb_position_t output_x_offsets[] = {0, -1, 0, 0};
-    unsigned int i;
-    g_assert_cmpint (len, ==, 4);
-    for (i = 0; i < len; i++) {
-      g_assert_cmphex (glyphs[i].codepoint, ==, output_glyphs[i]);
-      g_assert_cmphex (glyphs[i].cluster,   ==, i);
-    }
-    for (i = 0; i < len; i++) {
-      g_assert_cmpint (output_x_advances[i], ==, positions[i].x_advance);
-      g_assert_cmpint (output_x_offsets [i], ==, positions[i].x_offset);
-      g_assert_cmpint (0, ==, positions[i].y_advance);
-      g_assert_cmpint (0, ==, positions[i].y_offset);
-    }
-  }
-
-  hb_buffer_destroy (buffer);
-  hb_font_destroy (font);
-}
-
-static void
-test_shape_list (void)
-{
-  const char **shapers = hb_shape_list_shapers ();
-
-  unsigned int i;
-  for (i = 0; shapers[i]; i++)
-    ;
-
-  g_assert_cmpint (i, >, 1);
-  g_assert (!strcmp (shapers[i - 1], "fallback"));
-}
-
-int
-main (int argc, char **argv)
-{
-  hb_test_init (&argc, &argv);
-
-  hb_test_add (test_shape);
-  /* TODO test fallback shaper */
-  /* TODO test shaper_full */
-  hb_test_add (test_shape_list);
-
-  return hb_test_run();
-}
diff --git a/test/api/test-unicode.c b/test/api/test-unicode.c
deleted file mode 100644 (file)
index a420bf3..0000000
+++ /dev/null
@@ -1,887 +0,0 @@
-/*
- * Copyright © 2011  Codethink Limited
- * Copyright © 2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Codethink Author(s): Ryan Lortie
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "hb-test.h"
-
-/* Unit tests for hb-unicode.h */
-/* Unit tests for hb-glib.h */
-/* Unit tests for hb-icu.h */
-
-
-#ifdef HAVE_GLIB
-#include <hb-glib.h>
-#endif
-#ifdef HAVE_ICU
-#include <hb-icu.h>
-#endif
-
-
-/* Some useful stuff */
-
-#define MAGIC0 0x12345678
-#define MAGIC1 0x76543210
-
-typedef struct {
-  int value;
-  gboolean freed;
-} data_t;
-
-static void free_up (void *p)
-{
-  data_t *data = (data_t *) p;
-
-  g_assert (data->value == MAGIC0 || data->value == MAGIC1);
-  g_assert (!data->freed);
-  data->freed = TRUE;
-}
-
-static hb_script_t
-simple_get_script (hb_unicode_funcs_t *ufuncs,
-                   hb_codepoint_t      codepoint,
-                   void               *user_data)
-{
-  data_t *data = (data_t *) user_data;
-
-  g_assert (hb_unicode_funcs_get_parent (ufuncs) != NULL);
-  g_assert_cmphex (data->value, ==, MAGIC0);
-  g_assert (!data->freed);
-
-  if ('a' <= codepoint && codepoint <= 'z')
-    return HB_SCRIPT_LATIN;
-  else
-    return HB_SCRIPT_UNKNOWN;
-}
-
-static hb_script_t
-a_is_for_arabic_get_script (hb_unicode_funcs_t *ufuncs,
-                            hb_codepoint_t      codepoint,
-                            void               *user_data)
-{
-  data_t *data = (data_t *) user_data;
-
-  g_assert (hb_unicode_funcs_get_parent (ufuncs) != NULL);
-  g_assert_cmphex (data->value, ==, MAGIC1);
-  g_assert (!data->freed);
-
-  if (codepoint == 'a') {
-    return HB_SCRIPT_ARABIC;
-  } else {
-    hb_unicode_funcs_t *parent = hb_unicode_funcs_get_parent (ufuncs);
-
-    return hb_unicode_script (parent, codepoint);
-  }
-}
-
-
-
-/* Check all properties */
-
-/* Some of the following tables where adapted from glib/glib/tests/utf8-misc.c.
- * The license is compatible. */
-
-typedef struct {
-  hb_codepoint_t unicode;
-  unsigned int   value;
-} test_pair_t;
-
-static const test_pair_t combining_class_tests[] =
-{
-  {   0x0020, 0 },
-  {   0x0334, 1 },
-  {   0x093C, 7 },
-  {   0x3099, 8 },
-  {   0x094D, 9 },
-  {   0x05B0, 10 },
-  {   0x05B1, 11 },
-  {   0x05B2, 12 },
-  {   0x05B3, 13 },
-  {   0x05B4, 14 },
-  {   0x05B5, 15 },
-  {   0x05B6, 16 },
-  {   0x05B7, 17 },
-  {   0x05B8, 18 },
-  {   0x05B9, 19 },
-  {   0x05BB, 20 },
-  {   0x05BC, 21 },
-  {   0x05BD, 22 },
-  {   0x05BF, 23 },
-  {   0x05C1, 24 },
-  {   0x05C2, 25 },
-  {   0xFB1E, 26 },
-  {   0x064B, 27 },
-  {   0x064C, 28 },
-  {   0x064D, 29 },
-  /* ... */
-  {   0x05AE, 228 },
-  {   0x0300, 230 },
-  {   0x302C, 232 },
-  {   0x0362, 233 },
-  {   0x0360, 234 },
-  {   0x0345, 240 },
-
-  { 0x111111, 0 }
-};
-static const test_pair_t combining_class_tests_more[] =
-{
-  /* Unicode-5.1 character additions */
-  {   0x1DCD, 234 },
-
-  /* Unicode-5.2 character additions */
-  {   0xA8E0, 230 },
-
-  /* Unicode-6.0 character additions */
-  {   0x135D, 230 },
-
-  { 0x111111, 0 }
-};
-
-static const test_pair_t eastasian_width_tests[] =
-{
-  /* Neutral */
-  {   0x0000, 1 },
-  {   0x0483, 1 },
-  {   0x0641, 1 },
-  {   0xFFFC, 1 },
-  {  0x10000, 1 },
-  {  0xE0001, 1 },
-
-  /* Narrow */
-  {   0x0020, 1 },
-  {   0x0041, 1 },
-  {   0x27E6, 1 },
-
-  /* Halfwidth */
-  {   0x20A9, 1 },
-  {   0xFF61, 1 },
-  {   0xFF69, 1 },
-  {   0xFFEE, 1 },
-
-  /* Ambiguous */
-  {   0x00A1, 1 },
-  {   0x00D8, 1 },
-  {   0x02DD, 1 },
-  {  0xE0100, 1 },
-  { 0x100000, 1 },
-
-  /* Fullwidth */
-  {   0x3000, 2 },
-  {   0xFF60, 2 },
-
-  /* Wide */
-  {   0x2329, 2 },
-  {   0x3001, 2 },
-  {   0xFE69, 2 },
-  {  0x30000, 2 },
-  {  0x3FFFD, 2 },
-
-  { 0x111111, 1 }
-};
-static const test_pair_t eastasian_width_tests_more[] =
-{
-  /* Default Wide blocks */
-  {   0x4DBF, 2 },
-  {   0x9FFF, 2 },
-  {   0xFAFF, 2 },
-  {  0x2A6DF, 2 },
-  {  0x2B73F, 2 },
-  {  0x2B81F, 2 },
-  {  0x2FA1F, 2 },
-
-  /* Uniode-5.2 character additions */
-  /* Wide */
-  {   0x115F, 2 },
-
-  /* Uniode-6.0 character additions */
-  /* Wide */
-  {  0x2B740, 2 },
-  {  0x1B000, 2 },
-
-  { 0x111111, 1 }
-};
-
-static const test_pair_t general_category_tests[] =
-{
-  {   0x000D, HB_UNICODE_GENERAL_CATEGORY_CONTROL },
-  {   0x200E, HB_UNICODE_GENERAL_CATEGORY_FORMAT },
-  {   0x0378, HB_UNICODE_GENERAL_CATEGORY_UNASSIGNED },
-  {   0xE000, HB_UNICODE_GENERAL_CATEGORY_PRIVATE_USE },
-  {   0xD800, HB_UNICODE_GENERAL_CATEGORY_SURROGATE },
-  {   0x0061, HB_UNICODE_GENERAL_CATEGORY_LOWERCASE_LETTER },
-  {   0x02B0, HB_UNICODE_GENERAL_CATEGORY_MODIFIER_LETTER },
-  {   0x3400, HB_UNICODE_GENERAL_CATEGORY_OTHER_LETTER },
-  {   0x01C5, HB_UNICODE_GENERAL_CATEGORY_TITLECASE_LETTER },
-  {   0xFF21, HB_UNICODE_GENERAL_CATEGORY_UPPERCASE_LETTER },
-  {   0x0903, HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK },
-  {   0x20DD, HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK },
-  {   0xA806, HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK },
-  {   0xFF10, HB_UNICODE_GENERAL_CATEGORY_DECIMAL_NUMBER },
-  {   0x16EE, HB_UNICODE_GENERAL_CATEGORY_LETTER_NUMBER },
-  {   0x17F0, HB_UNICODE_GENERAL_CATEGORY_OTHER_NUMBER },
-  {   0x005F, HB_UNICODE_GENERAL_CATEGORY_CONNECT_PUNCTUATION },
-  {   0x058A, HB_UNICODE_GENERAL_CATEGORY_DASH_PUNCTUATION },
-  {   0x0F3B, HB_UNICODE_GENERAL_CATEGORY_CLOSE_PUNCTUATION },
-  {   0x2019, HB_UNICODE_GENERAL_CATEGORY_FINAL_PUNCTUATION },
-  {   0x2018, HB_UNICODE_GENERAL_CATEGORY_INITIAL_PUNCTUATION },
-  {   0x2016, HB_UNICODE_GENERAL_CATEGORY_OTHER_PUNCTUATION },
-  {   0x0F3A, HB_UNICODE_GENERAL_CATEGORY_OPEN_PUNCTUATION },
-  {   0x20A0, HB_UNICODE_GENERAL_CATEGORY_CURRENCY_SYMBOL },
-  {   0x309B, HB_UNICODE_GENERAL_CATEGORY_MODIFIER_SYMBOL },
-  {   0xFB29, HB_UNICODE_GENERAL_CATEGORY_MATH_SYMBOL },
-  {   0x00A6, HB_UNICODE_GENERAL_CATEGORY_OTHER_SYMBOL },
-  {   0x2028, HB_UNICODE_GENERAL_CATEGORY_LINE_SEPARATOR },
-  {   0x2029, HB_UNICODE_GENERAL_CATEGORY_PARAGRAPH_SEPARATOR },
-  {   0x202F, HB_UNICODE_GENERAL_CATEGORY_SPACE_SEPARATOR },
-
-  { 0x111111, HB_UNICODE_GENERAL_CATEGORY_UNASSIGNED }
-};
-static const test_pair_t general_category_tests_more[] =
-{
-  /* Unicode-5.2 character additions */
-  {  0x1F131, HB_UNICODE_GENERAL_CATEGORY_OTHER_SYMBOL },
-
-  /* Unicode-6.0 character additions */
-  {   0x0620, HB_UNICODE_GENERAL_CATEGORY_OTHER_LETTER },
-
-  { 0x111111, HB_UNICODE_GENERAL_CATEGORY_UNASSIGNED }
-};
-
-static const test_pair_t mirroring_tests[] =
-{
-  /* Some characters that do NOT mirror */
-  {   0x0020, 0x0020 },
-  {   0x0041, 0x0041 },
-  {   0x00F0, 0x00F0 },
-  {   0x27CC, 0x27CC },
-  {  0xE01EF, 0xE01EF },
-  {  0x1D7C3, 0x1D7C3 },
-  { 0x100000, 0x100000 },
-
-  /* Some characters that do mirror */
-  {   0x0029, 0x0028 },
-  {   0x0028, 0x0029 },
-  {   0x003E, 0x003C },
-  {   0x003C, 0x003E },
-  {   0x005D, 0x005B },
-  {   0x005B, 0x005D },
-  {   0x007D, 0x007B },
-  {   0x007B, 0x007D },
-  {   0x00BB, 0x00AB },
-  {   0x00AB, 0x00BB },
-  {   0x226B, 0x226A },
-  {   0x226A, 0x226B },
-  {   0x22F1, 0x22F0 },
-  {   0x22F0, 0x22F1 },
-  {   0xFF60, 0xFF5F },
-  {   0xFF5F, 0xFF60 },
-  {   0xFF63, 0xFF62 },
-  {   0xFF62, 0xFF63 },
-
-  { 0x111111, 0x111111 },
-};
-static const test_pair_t mirroring_tests_more[] =
-{
-  /* No new mirroring characters have been encoded in recent Unicode versions. */
-  { 0x111111, 0x111111 }
-};
-
-static const test_pair_t script_tests[] =
-{
-  {   0x002A, HB_SCRIPT_COMMON },
-  {   0x0670, HB_SCRIPT_INHERITED },
-  {   0x060D, HB_SCRIPT_ARABIC },
-  {   0x0559, HB_SCRIPT_ARMENIAN },
-  {   0x09CD, HB_SCRIPT_BENGALI },
-  {   0x31B6, HB_SCRIPT_BOPOMOFO },
-  {   0x13A2, HB_SCRIPT_CHEROKEE },
-  {   0x2CFD, HB_SCRIPT_COPTIC },
-  {   0x0482, HB_SCRIPT_CYRILLIC },
-  {  0x10401, HB_SCRIPT_DESERET },
-  {   0x094D, HB_SCRIPT_DEVANAGARI },
-  {   0x1258, HB_SCRIPT_ETHIOPIC },
-  {   0x10FC, HB_SCRIPT_GEORGIAN },
-  {  0x10341, HB_SCRIPT_GOTHIC },
-  {   0x0375, HB_SCRIPT_GREEK },
-  {   0x0A83, HB_SCRIPT_GUJARATI },
-  {   0x0A3C, HB_SCRIPT_GURMUKHI },
-  {   0x3005, HB_SCRIPT_HAN },
-  {   0x1100, HB_SCRIPT_HANGUL },
-  {   0x05BF, HB_SCRIPT_HEBREW },
-  {   0x309F, HB_SCRIPT_HIRAGANA },
-  {   0x0CBC, HB_SCRIPT_KANNADA },
-  {   0x30FF, HB_SCRIPT_KATAKANA },
-  {   0x17DD, HB_SCRIPT_KHMER },
-  {   0x0EDD, HB_SCRIPT_LAO },
-  {   0x0061, HB_SCRIPT_LATIN },
-  {   0x0D3D, HB_SCRIPT_MALAYALAM },
-  {   0x1843, HB_SCRIPT_MONGOLIAN },
-  {   0x1031, HB_SCRIPT_MYANMAR },
-  {   0x169C, HB_SCRIPT_OGHAM },
-  {  0x10322, HB_SCRIPT_OLD_ITALIC },
-  {   0x0B3C, HB_SCRIPT_ORIYA },
-  {   0x16EF, HB_SCRIPT_RUNIC },
-  {   0x0DBD, HB_SCRIPT_SINHALA },
-  {   0x0711, HB_SCRIPT_SYRIAC },
-  {   0x0B82, HB_SCRIPT_TAMIL },
-  {   0x0C03, HB_SCRIPT_TELUGU },
-  {   0x07B1, HB_SCRIPT_THAANA },
-  {   0x0E31, HB_SCRIPT_THAI },
-  {   0x0FD4, HB_SCRIPT_TIBETAN },
-  {   0x1401, HB_SCRIPT_CANADIAN_ABORIGINAL },
-  {   0xA015, HB_SCRIPT_YI },
-  {   0x1700, HB_SCRIPT_TAGALOG },
-  {   0x1720, HB_SCRIPT_HANUNOO },
-  {   0x1740, HB_SCRIPT_BUHID },
-  {   0x1760, HB_SCRIPT_TAGBANWA },
-
-  /* Unicode-4.0 additions */
-  {   0x2800, HB_SCRIPT_BRAILLE },
-  {  0x10808, HB_SCRIPT_CYPRIOT },
-  {   0x1932, HB_SCRIPT_LIMBU },
-  {  0x10480, HB_SCRIPT_OSMANYA },
-  {  0x10450, HB_SCRIPT_SHAVIAN },
-  {  0x10000, HB_SCRIPT_LINEAR_B },
-  {   0x1950, HB_SCRIPT_TAI_LE },
-  {  0x1039F, HB_SCRIPT_UGARITIC },
-
-  /* Unicode-4.1 additions */
-  {   0x1980, HB_SCRIPT_NEW_TAI_LUE },
-  {   0x1A1F, HB_SCRIPT_BUGINESE },
-  {   0x2C00, HB_SCRIPT_GLAGOLITIC },
-  {   0x2D6F, HB_SCRIPT_TIFINAGH },
-  {   0xA800, HB_SCRIPT_SYLOTI_NAGRI },
-  {  0x103D0, HB_SCRIPT_OLD_PERSIAN },
-  {  0x10A3F, HB_SCRIPT_KHAROSHTHI },
-
-  /* Unicode-5.0 additions */
-  {   0x0378, HB_SCRIPT_UNKNOWN },
-  {   0x1B04, HB_SCRIPT_BALINESE },
-  {  0x12000, HB_SCRIPT_CUNEIFORM },
-  {  0x10900, HB_SCRIPT_PHOENICIAN },
-  {   0xA840, HB_SCRIPT_PHAGS_PA },
-  {   0x07C0, HB_SCRIPT_NKO },
-
-  /* Unicode-5.1 additions */
-  {   0xA900, HB_SCRIPT_KAYAH_LI },
-  {   0x1C00, HB_SCRIPT_LEPCHA },
-  {   0xA930, HB_SCRIPT_REJANG },
-  {   0x1B80, HB_SCRIPT_SUNDANESE },
-  {   0xA880, HB_SCRIPT_SAURASHTRA },
-  {   0xAA00, HB_SCRIPT_CHAM },
-  {   0x1C50, HB_SCRIPT_OL_CHIKI },
-  {   0xA500, HB_SCRIPT_VAI },
-  {  0x102A0, HB_SCRIPT_CARIAN },
-  {  0x10280, HB_SCRIPT_LYCIAN },
-  {  0x1093F, HB_SCRIPT_LYDIAN },
-
-  { 0x111111, HB_SCRIPT_UNKNOWN }
-};
-static const test_pair_t script_tests_more[] =
-{
-  /* Unicode-5.2 additions */
-  {  0x10B00, HB_SCRIPT_AVESTAN },
-  {   0xA6A0, HB_SCRIPT_BAMUM },
-  {  0x13000, HB_SCRIPT_EGYPTIAN_HIEROGLYPHS },
-  {  0x10840, HB_SCRIPT_IMPERIAL_ARAMAIC },
-  {  0x10B60, HB_SCRIPT_INSCRIPTIONAL_PAHLAVI },
-  {  0x10B40, HB_SCRIPT_INSCRIPTIONAL_PARTHIAN },
-  {   0xA980, HB_SCRIPT_JAVANESE },
-  {  0x11082, HB_SCRIPT_KAITHI },
-  {   0xA4D0, HB_SCRIPT_LISU },
-  {   0xABE5, HB_SCRIPT_MEETEI_MAYEK },
-  {  0x10A60, HB_SCRIPT_OLD_SOUTH_ARABIAN },
-  {  0x10C00, HB_SCRIPT_OLD_TURKIC },
-  {   0x0800, HB_SCRIPT_SAMARITAN },
-  {   0x1A20, HB_SCRIPT_TAI_THAM },
-  {   0xAA80, HB_SCRIPT_TAI_VIET },
-
-  /* Unicode-6.0 additions */
-  {   0x1BC0, HB_SCRIPT_BATAK },
-  {  0x11000, HB_SCRIPT_BRAHMI },
-  {   0x0840, HB_SCRIPT_MANDAIC },
-
-  /* Unicode-5.2 character additions */
-  {   0x1CED, HB_SCRIPT_INHERITED },
-  {   0x1400, HB_SCRIPT_CANADIAN_ABORIGINAL },
-
-  { 0x111111, HB_SCRIPT_UNKNOWN }
-};
-
-
-typedef unsigned int (*get_func_t)         (hb_unicode_funcs_t *ufuncs,
-                                           hb_codepoint_t      unicode,
-                                           void               *user_data);
-typedef unsigned int (*func_setter_func_t) (hb_unicode_funcs_t *ufuncs,
-                                           get_func_t          func,
-                                           void               *user_data,
-                                           hb_destroy_func_t   destroy);
-typedef unsigned int (*getter_func_t)      (hb_unicode_funcs_t *ufuncs,
-                                           hb_codepoint_t      unicode);
-
-typedef struct {
-  const char         *name;
-  func_setter_func_t  func_setter;
-  getter_func_t       getter;
-  const test_pair_t  *tests;
-  unsigned int        num_tests;
-  const test_pair_t  *tests_more;
-  unsigned int        num_tests_more;
-  unsigned int        default_value;
-} property_t;
-
-#define RETURNS_UNICODE_ITSELF ((unsigned int) -1)
-
-#define PROPERTY(name, DEFAULT) \
-  { \
-    #name, \
-    (func_setter_func_t) hb_unicode_funcs_set_##name##_func, \
-    (getter_func_t) hb_unicode_##name, \
-    name##_tests, \
-    G_N_ELEMENTS (name##_tests), \
-    name##_tests_more, \
-    G_N_ELEMENTS (name##_tests_more), \
-    DEFAULT \
-  }
-static const property_t properties[] =
-{
-  PROPERTY (combining_class, 0),
-  PROPERTY (eastasian_width, 1),
-  PROPERTY (general_category, (unsigned int) HB_UNICODE_GENERAL_CATEGORY_OTHER_LETTER),
-  PROPERTY (mirroring, RETURNS_UNICODE_ITSELF),
-  PROPERTY (script, (unsigned int) HB_SCRIPT_UNKNOWN)
-};
-#undef PROPERTY
-
-static void
-test_unicode_properties (gconstpointer user_data)
-{
-  hb_unicode_funcs_t *uf = (hb_unicode_funcs_t *) user_data;
-  unsigned int i, j;
-  gboolean failed = TRUE;
-
-  g_assert (hb_unicode_funcs_is_immutable (uf));
-  g_assert (hb_unicode_funcs_get_parent (uf));
-
-  for (i = 0; i < G_N_ELEMENTS (properties); i++) {
-    const property_t *p = &properties[i];
-    const test_pair_t *tests;
-
-    g_test_message ("Testing property %s", p->name);
-    tests = p->tests;
-    for (j = 0; j < p->num_tests; j++) {
-      g_test_message ("Test %s #%d: U+%04X", p->name, j, tests[j].unicode);
-      g_assert_cmphex (p->getter (uf, tests[j].unicode), ==, tests[j].value);
-    }
-    /* These tests are from Unicode 5.2 onward and older glib/ICU
-     * don't get them right.  Just warn instead of assert. */
-    tests = p->tests_more;
-    for (j = 0; j < p->num_tests_more; j++) {
-      g_test_message ("Test %s more #%d: U+%04X", p->name, j, tests[j].unicode);
-      if (p->getter (uf, tests[j].unicode) != tests[j].value) {
-       g_test_message ("Soft fail: Received %x, expected %x", p->getter (uf, tests[j].unicode), tests[j].value);
-        failed = TRUE;
-      }
-    }
-  }
-
-  if (failed)
-    g_test_message ("Some property tests failed.  You probably have an old version of one of the libraries used.");
-}
-
-static hb_codepoint_t
-default_value (hb_codepoint_t _default_value, hb_codepoint_t unicode)
-{
-  return _default_value == RETURNS_UNICODE_ITSELF ?  unicode : _default_value;
-}
-
-static void
-_test_unicode_properties_nil (hb_unicode_funcs_t *uf)
-{
-  unsigned int i, j;
-
-  for (i = 0; i < G_N_ELEMENTS (properties); i++) {
-    const property_t *p = &properties[i];
-    const test_pair_t *tests;
-
-    g_test_message ("Testing property %s", p->name);
-    tests = p->tests;
-    for (j = 0; j < p->num_tests; j++) {
-      g_test_message ("Test %s #%d: U+%04X", p->name, j, tests[j].unicode);
-      g_assert_cmphex (p->getter (uf, tests[j].unicode), ==, default_value (p->default_value, tests[j].unicode));
-    }
-    tests = p->tests_more;
-    for (j = 0; j < p->num_tests_more; j++) {
-      g_test_message ("Test %s more #%d: U+%04X", p->name, j, tests[j].unicode);
-      g_assert_cmphex (p->getter (uf, tests[j].unicode), ==, default_value (p->default_value, tests[j].unicode));
-    }
-  }
-}
-
-static void
-test_unicode_properties_nil (void)
-{
-  hb_unicode_funcs_t *uf = hb_unicode_funcs_create (NULL);
-
-  g_assert (!hb_unicode_funcs_is_immutable (uf));
-  _test_unicode_properties_nil (uf);
-
-  hb_unicode_funcs_destroy (uf);
-}
-
-static void
-test_unicode_properties_empty (void)
-{
-  hb_unicode_funcs_t *uf = hb_unicode_funcs_get_empty ();
-
-  g_assert (uf);
-  g_assert (hb_unicode_funcs_is_immutable (uf));
-  _test_unicode_properties_nil (uf);
-}
-
-
-static void
-test_unicode_chainup (void)
-{
-  hb_unicode_funcs_t *uf, *uf2;
-
-  /* Chain-up to nil */
-
-  uf = hb_unicode_funcs_create (NULL);
-  g_assert (!hb_unicode_funcs_is_immutable (uf));
-
-  uf2 = hb_unicode_funcs_create (uf);
-  g_assert (hb_unicode_funcs_is_immutable (uf));
-  hb_unicode_funcs_destroy (uf);
-
-  g_assert (!hb_unicode_funcs_is_immutable (uf2));
-  _test_unicode_properties_nil (uf2);
-
-  hb_unicode_funcs_destroy (uf2);
-
-  /* Chain-up to default */
-
-  uf = hb_unicode_funcs_create (hb_unicode_funcs_get_default ());
-  g_assert (!hb_unicode_funcs_is_immutable (uf));
-
-  uf2 = hb_unicode_funcs_create (uf);
-  g_assert (hb_unicode_funcs_is_immutable (uf));
-  hb_unicode_funcs_destroy (uf);
-
-  g_assert (!hb_unicode_funcs_is_immutable (uf2));
-  hb_unicode_funcs_make_immutable (uf2);
-  test_unicode_properties (uf2);
-
-  hb_unicode_funcs_destroy (uf2);
-
-}
-
-static void
-test_unicode_setters (void)
-{
-  hb_unicode_funcs_t *uf;
-  unsigned int i;
-
-  /* This is cruel: we use script-returning functions to test all properties,
-   * but it works. */
-
-  for (i = 0; i < G_N_ELEMENTS (properties); i++) {
-    const property_t *p = &properties[i];
-    data_t data[2] = {{MAGIC0, FALSE}, {MAGIC1, FALSE}};
-
-    g_test_message ("Testing property %s", p->name);
-
-    uf = hb_unicode_funcs_create (NULL);
-    g_assert (!hb_unicode_funcs_is_immutable (uf));
-
-    p->func_setter (uf, (get_func_t) simple_get_script, &data[0], free_up);
-
-    g_assert_cmphex (p->getter (uf, 'a'), ==, HB_SCRIPT_LATIN);
-    g_assert_cmphex (p->getter (uf, '0'), ==, HB_SCRIPT_UNKNOWN);
-
-    p->func_setter (uf, (get_func_t) NULL, NULL, NULL);
-    g_assert (data[0].freed && !data[1].freed);
-
-    g_assert (!hb_unicode_funcs_is_immutable (uf));
-    hb_unicode_funcs_make_immutable (uf);
-    g_assert (hb_unicode_funcs_is_immutable (uf));
-
-    /* Since uf is immutable now, the following setter should do nothing. */
-    p->func_setter (uf, (get_func_t) a_is_for_arabic_get_script, &data[1], free_up);
-
-    g_assert (data[0].freed && !data[1].freed);
-    hb_unicode_funcs_destroy (uf);
-    g_assert (data[0].freed && !data[1].freed);
-  }
-}
-
-
-
-typedef struct {
-  data_t data[2];
-} data_fixture_t;
-
-static void
-data_fixture_init (data_fixture_t *f, gconstpointer user_data)
-{
-  f->data[0].value = MAGIC0;
-  f->data[1].value = MAGIC1;
-}
-static void
-data_fixture_finish (data_fixture_t *f, gconstpointer user_data)
-{
-}
-
-static void
-test_unicode_subclassing_nil (data_fixture_t *f, gconstpointer user_data)
-{
-  hb_unicode_funcs_t *uf, *aa;
-
-  uf = hb_unicode_funcs_create (NULL);
-
-  aa = hb_unicode_funcs_create (uf);
-
-  hb_unicode_funcs_destroy (uf);
-
-  hb_unicode_funcs_set_script_func (aa, a_is_for_arabic_get_script,
-                                    &f->data[1], free_up);
-
-  g_assert_cmphex (hb_unicode_script (aa, 'a'), ==, HB_SCRIPT_ARABIC);
-  g_assert_cmphex (hb_unicode_script (aa, 'b'), ==, HB_SCRIPT_UNKNOWN);
-
-  g_assert (!f->data[0].freed && !f->data[1].freed);
-  hb_unicode_funcs_destroy (aa);
-  g_assert (!f->data[0].freed && f->data[1].freed);
-}
-
-static void
-test_unicode_subclassing_default (data_fixture_t *f, gconstpointer user_data)
-{
-  hb_unicode_funcs_t *uf, *aa;
-
-  uf = hb_unicode_funcs_get_default ();
-  aa = hb_unicode_funcs_create (uf);
-
-  hb_unicode_funcs_set_script_func (aa, a_is_for_arabic_get_script,
-                                    &f->data[1], free_up);
-
-  g_assert_cmphex (hb_unicode_script (aa, 'a'), ==, HB_SCRIPT_ARABIC);
-  g_assert_cmphex (hb_unicode_script (aa, 'b'), ==, HB_SCRIPT_LATIN);
-
-  g_assert (!f->data[0].freed && !f->data[1].freed);
-  hb_unicode_funcs_destroy (aa);
-  g_assert (!f->data[0].freed && f->data[1].freed);
-}
-
-static void
-test_unicode_subclassing_deep (data_fixture_t *f, gconstpointer user_data)
-{
-  hb_unicode_funcs_t *uf, *aa;
-
-  uf = hb_unicode_funcs_create (NULL);
-
-  hb_unicode_funcs_set_script_func (uf, simple_get_script,
-                                    &f->data[0], free_up);
-
-  aa = hb_unicode_funcs_create (uf);
-
-  hb_unicode_funcs_destroy (uf);
-
-  /* make sure the 'uf' didn't get freed, since 'aa' holds a ref */
-  g_assert (!f->data[0].freed);
-
-  hb_unicode_funcs_set_script_func (aa, a_is_for_arabic_get_script,
-                                    &f->data[1], free_up);
-
-  g_assert_cmphex (hb_unicode_script (aa, 'a'), ==, HB_SCRIPT_ARABIC);
-  g_assert_cmphex (hb_unicode_script (aa, 'b'), ==, HB_SCRIPT_LATIN);
-  g_assert_cmphex (hb_unicode_script (aa, '0'), ==, HB_SCRIPT_UNKNOWN);
-
-  g_assert (!f->data[0].freed && !f->data[1].freed);
-  hb_unicode_funcs_destroy (aa);
-  g_assert (f->data[0].freed && f->data[1].freed);
-}
-
-
-static hb_script_t
-script_roundtrip_default (hb_script_t script)
-{
-  return hb_script_from_iso15924_tag (hb_script_to_iso15924_tag (script));
-}
-
-#ifdef HAVE_GLIB
-static hb_script_t
-script_roundtrip_glib (hb_script_t script)
-{
-  return hb_glib_script_to_script (hb_glib_script_from_script (script));
-}
-#endif
-
-#ifdef HAVE_ICU
-static hb_script_t
-script_roundtrip_icu (hb_script_t script)
-{
-  return hb_icu_script_to_script (hb_icu_script_from_script (script));
-}
-#endif
-
-static void
-test_unicode_script_roundtrip (gconstpointer user_data)
-{
-  typedef hb_script_t (*roundtrip_func_t) (hb_script_t);
-  roundtrip_func_t roundtrip_func = (roundtrip_func_t) user_data;
-  unsigned int i;
-  gboolean failed = FALSE;
-
-  for (i = 0; i < G_N_ELEMENTS (script_tests); i++) {
-    const test_pair_t *test = &script_tests[i];
-    hb_script_t script = test->value;
-
-    g_test_message ("Test script roundtrip #%d: %x", i, script);
-    g_assert_cmphex (script, ==, roundtrip_func (script));
-  }
-  for (i = 0; i < G_N_ELEMENTS (script_tests_more); i++) {
-    const test_pair_t *test = &script_tests_more[i];
-    hb_script_t script = test->value;
-
-    g_test_message ("Test script roundtrip more #%d: %x", i, script);
-    if (script != roundtrip_func (script)) {
-      g_test_message ("Soft fail: Received %x, expected %x", roundtrip_func (script), script);
-      failed = TRUE;
-    }
-  }
-
-  g_assert_cmphex (HB_SCRIPT_INVALID, ==, roundtrip_func (HB_SCRIPT_INVALID));
-
-  if (failed)
-    g_test_message ("Some script roundtrip tests failed.  You probably have an old version of one of the libraries used.");
-}
-
-
-static void
-test_unicode_normalization (gconstpointer user_data)
-{
-  hb_unicode_funcs_t *uf = (hb_unicode_funcs_t *) user_data;
-  gunichar a, b, ab;
-
-
-  /* Test compose() */
-
-  /* Not composable */
-  g_assert (!hb_unicode_compose (uf, 0x0041, 0x0042, &ab) && ab == 0);
-  g_assert (!hb_unicode_compose (uf, 0x0041, 0, &ab) && ab == 0);
-  g_assert (!hb_unicode_compose (uf, 0x0066, 0x0069, &ab) && ab == 0);
-
-  /* Singletons should not compose */
-  g_assert (!hb_unicode_compose (uf, 0x212B, 0, &ab) && ab == 0);
-  g_assert (!hb_unicode_compose (uf, 0x00C5, 0, &ab) && ab == 0);
-  g_assert (!hb_unicode_compose (uf, 0x2126, 0, &ab) && ab == 0);
-  g_assert (!hb_unicode_compose (uf, 0x03A9, 0, &ab) && ab == 0);
-
-  /* Non-starter pairs should not compose */
-  g_assert (!hb_unicode_compose (uf, 0x0308, 0x0301, &ab) && ab == 0); /* !0x0344 */
-  g_assert (!hb_unicode_compose (uf, 0x0F71, 0x0F72, &ab) && ab == 0); /* !0x0F73 */
-
-  /* Pairs */
-  g_assert (hb_unicode_compose (uf, 0x0041, 0x030A, &ab) && ab == 0x00C5);
-  g_assert (hb_unicode_compose (uf, 0x006F, 0x0302, &ab) && ab == 0x00F4);
-  g_assert (hb_unicode_compose (uf, 0x1E63, 0x0307, &ab) && ab == 0x1E69);
-  g_assert (hb_unicode_compose (uf, 0x0073, 0x0323, &ab) && ab == 0x1E63);
-  g_assert (hb_unicode_compose (uf, 0x0064, 0x0307, &ab) && ab == 0x1E0B);
-  g_assert (hb_unicode_compose (uf, 0x0064, 0x0323, &ab) && ab == 0x1E0D);
-
-  /* Hangul */
-  g_assert (hb_unicode_compose (uf, 0xD4CC, 0x11B6, &ab) && ab == 0xD4DB);
-  g_assert (hb_unicode_compose (uf, 0x1111, 0x1171, &ab) && ab == 0xD4CC);
-  g_assert (hb_unicode_compose (uf, 0xCE20, 0x11B8, &ab) && ab == 0xCE31);
-  g_assert (hb_unicode_compose (uf, 0x110E, 0x1173, &ab) && ab == 0xCE20);
-
-
-  /* Test decompose() */
-
-  /* Not decomposable */
-  g_assert (!hb_unicode_decompose (uf, 0x0041, &a, &b) && a == 0x0041 && b == 0);
-  g_assert (!hb_unicode_decompose (uf, 0xFB01, &a, &b) && a == 0xFB01 && b == 0);
-  g_assert (!hb_unicode_decompose (uf, 0x1F1EF, &a, &b) && a == 0x1F1EF && b == 0);
-
-  /* Singletons */
-  g_assert (hb_unicode_decompose (uf, 0x212B, &a, &b) && a == 0x00C5 && b == 0);
-  g_assert (hb_unicode_decompose (uf, 0x2126, &a, &b) && a == 0x03A9 && b == 0);
-
-  /* Non-starter pairs decompose, but not compose */
-  g_assert (hb_unicode_decompose (uf, 0x0344, &a, &b) && a == 0x0308 && b == 0x0301);
-  g_assert (hb_unicode_decompose (uf, 0x0F73, &a, &b) && a == 0x0F71 && b == 0x0F72);
-
-  /* Pairs */
-  g_assert (hb_unicode_decompose (uf, 0x00C5, &a, &b) && a == 0x0041 && b == 0x030A);
-  g_assert (hb_unicode_decompose (uf, 0x00F4, &a, &b) && a == 0x006F && b == 0x0302);
-  g_assert (hb_unicode_decompose (uf, 0x1E69, &a, &b) && a == 0x1E63 && b == 0x0307);
-  g_assert (hb_unicode_decompose (uf, 0x1E63, &a, &b) && a == 0x0073 && b == 0x0323);
-  g_assert (hb_unicode_decompose (uf, 0x1E0B, &a, &b) && a == 0x0064 && b == 0x0307);
-  g_assert (hb_unicode_decompose (uf, 0x1E0D, &a, &b) && a == 0x0064 && b == 0x0323);
-
-  /* Hangul */
-  g_assert (hb_unicode_decompose (uf, 0xD4DB, &a, &b) && a == 0xD4CC && b == 0x11B6);
-  g_assert (hb_unicode_decompose (uf, 0xD4CC, &a, &b) && a == 0x1111 && b == 0x1171);
-  g_assert (hb_unicode_decompose (uf, 0xCE31, &a, &b) && a == 0xCE20 && b == 0x11B8);
-  g_assert (hb_unicode_decompose (uf, 0xCE20, &a, &b) && a == 0x110E && b == 0x1173);
-
-}
-
-
-
-int
-main (int argc, char **argv)
-{
-  hb_test_init (&argc, &argv);
-
-  hb_test_add (test_unicode_properties_nil);
-  hb_test_add (test_unicode_properties_empty);
-
-  hb_test_add_data_flavor (hb_unicode_funcs_get_default (),          "default", test_unicode_properties);
-  hb_test_add_data_flavor (hb_unicode_funcs_get_default (),          "default", test_unicode_normalization);
-  hb_test_add_data_flavor ((gconstpointer) script_roundtrip_default, "default", test_unicode_script_roundtrip);
-#ifdef HAVE_GLIB
-  hb_test_add_data_flavor (hb_glib_get_unicode_funcs (),             "glib",    test_unicode_properties);
-  hb_test_add_data_flavor (hb_glib_get_unicode_funcs (),             "glib",    test_unicode_normalization);
-  hb_test_add_data_flavor ((gconstpointer) script_roundtrip_glib,    "glib",    test_unicode_script_roundtrip);
-#endif
-#ifdef HAVE_ICU
-  hb_test_add_data_flavor (hb_icu_get_unicode_funcs (),              "icu",     test_unicode_properties);
-  hb_test_add_data_flavor (hb_icu_get_unicode_funcs (),              "icu",     test_unicode_normalization);
-  hb_test_add_data_flavor ((gconstpointer) script_roundtrip_icu,     "icu",     test_unicode_script_roundtrip);
-#endif
-
-  hb_test_add (test_unicode_chainup);
-
-  hb_test_add (test_unicode_setters);
-
-  hb_test_add_fixture (data_fixture, NULL, test_unicode_subclassing_nil);
-  hb_test_add_fixture (data_fixture, NULL, test_unicode_subclassing_default);
-  hb_test_add_fixture (data_fixture, NULL, test_unicode_subclassing_deep);
-
-  return hb_test_run ();
-}
diff --git a/test/api/test-version.c b/test/api/test-version.c
deleted file mode 100644 (file)
index 4c9bd37..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright © 2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "hb-test.h"
-
-/* Unit tests for hb-version.h */
-
-
-static void
-test_version (void)
-{
-  unsigned int major, minor, micro;
-  char *s;
-
-  hb_version (&major, &minor, &micro);
-
-  g_assert_cmpint (major, ==, HB_VERSION_MAJOR);
-  g_assert_cmpint (minor, ==, HB_VERSION_MINOR);
-  g_assert_cmpint (micro, ==, HB_VERSION_MICRO);
-
-  s = g_strdup_printf ("%u.%u.%u", major, minor, micro);
-  g_assert (0 == strcmp (HB_VERSION_STRING, s));
-  g_free (s);
-  g_assert (0 == strcmp (HB_VERSION_STRING, hb_version_string ()));
-
-  g_assert (HB_VERSION_CHECK (major, minor, micro));
-  g_assert (HB_VERSION_CHECK (major+1, minor, micro));
-  g_assert (HB_VERSION_CHECK (major, minor+1, micro));
-  g_assert (HB_VERSION_CHECK (major, minor, micro+1));
-  if (major)
-    g_assert (!HB_VERSION_CHECK (major-1, minor, micro));
-  if (minor)
-    g_assert (!HB_VERSION_CHECK (major, minor-1, micro));
-  if (micro)
-    g_assert (!HB_VERSION_CHECK (major, minor, micro-1));
-
-  g_assert (hb_version_check (major, minor, micro));
-  g_assert (hb_version_check (major+1, minor, micro));
-  g_assert (hb_version_check (major, minor+1, micro));
-  g_assert (hb_version_check (major, minor, micro+1));
-  if (major)
-    g_assert (!hb_version_check (major-1, minor, micro));
-  if (minor)
-    g_assert (!hb_version_check (major, minor-1, micro));
-  if (micro)
-    g_assert (!hb_version_check (major, minor, micro-1));
-}
-
-int
-main (int argc, char **argv)
-{
-  hb_test_init (&argc, &argv);
-
-  hb_test_add (test_version);
-
-  return hb_test_run();
-}
diff --git a/test/shaping/Makefile.am b/test/shaping/Makefile.am
deleted file mode 100644 (file)
index 4fb762c..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-# Process this file with automake to produce Makefile.in
-
-NULL =
-EXTRA_DIST =
-CLEANFILES =
-DISTCLEANFILES =
-MAINTAINERCLEANFILES =
-
-manifests:
-       @$(srcdir)/hb-manifest-update "$(srcdir)/texts" "$(srcdir)/fonts"
-
-EXTRA_DIST += \
-       hb-diff \
-       hb-diff-colorize \
-       hb-diff-filter-failures \
-       hb-diff-ngrams \
-       hb-diff-stat \
-       hb-manifest-read \
-       hb-manifest-update \
-       hb-unicode-decode \
-       hb-unicode-encode \
-       hb-unicode-prettyname \
-       $(NULL)
-
-# TODO Figure out Python stuff
-EXTRA_DIST += \
-       hb_test_tools.py \
-       $(NULL)
-CLEANFILES += \
-       hb_test_tools.py[co] \
-       $(NULL)
-
-.PHONY: manifests
-
--include $(top_srcdir)/git.mk
diff --git a/test/shaping/Makefile.in b/test/shaping/Makefile.in
deleted file mode 100644 (file)
index c1969c4..0000000
+++ /dev/null
@@ -1,406 +0,0 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-# Process this file with automake to produce Makefile.in
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = test/shaping
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-       $(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-AM_V_GEN = $(am__v_GEN_$(V))
-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
-am__v_GEN_0 = @echo "  GEN   " $@;
-AM_V_at = $(am__v_at_$(V))
-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
-am__v_at_0 = @
-SOURCES =
-DIST_SOURCES =
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-AR = @AR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CAIRO_CFLAGS = @CAIRO_CFLAGS@
-CAIRO_FT_CFLAGS = @CAIRO_FT_CFLAGS@
-CAIRO_FT_LIBS = @CAIRO_FT_LIBS@
-CAIRO_LIBS = @CAIRO_LIBS@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
-FREETYPE_LIBS = @FREETYPE_LIBS@
-GLIB_CFLAGS = @GLIB_CFLAGS@
-GLIB_LIBS = @GLIB_LIBS@
-GLIB_MKENUMS = @GLIB_MKENUMS@
-GOBJECT_CFLAGS = @GOBJECT_CFLAGS@
-GOBJECT_LIBS = @GOBJECT_LIBS@
-GRAPHITE2_CFLAGS = @GRAPHITE2_CFLAGS@
-GRAPHITE2_LIBS = @GRAPHITE2_LIBS@
-GREP = @GREP@
-GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
-GTHREAD_LIBS = @GTHREAD_LIBS@
-HB_LIBTOOL_VERSION_INFO = @HB_LIBTOOL_VERSION_INFO@
-HB_VERSION = @HB_VERSION@
-HB_VERSION_MAJOR = @HB_VERSION_MAJOR@
-HB_VERSION_MICRO = @HB_VERSION_MICRO@
-HB_VERSION_MINOR = @HB_VERSION_MINOR@
-ICU_CFLAGS = @ICU_CFLAGS@
-ICU_LIBS = @ICU_LIBS@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
-RANLIB = @RANLIB@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-UNISCRIBE_CFLAGS = @UNISCRIBE_CFLAGS@
-UNISCRIBE_LIBS = @UNISCRIBE_LIBS@
-VERSION = @VERSION@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-NULL = 
-
-# TODO Figure out Python stuff
-EXTRA_DIST = hb-diff hb-diff-colorize hb-diff-filter-failures \
-       hb-diff-ngrams hb-diff-stat hb-manifest-read \
-       hb-manifest-update hb-unicode-decode hb-unicode-encode \
-       hb-unicode-prettyname $(NULL) hb_test_tools.py $(NULL)
-CLEANFILES = hb_test_tools.py[co] $(NULL)
-DISTCLEANFILES = 
-MAINTAINERCLEANFILES = 
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-       @for dep in $?; do \
-         case '$(am__configure_deps)' in \
-           *$$dep*) \
-             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-               && { if test -f $@; then exit 0; else break; fi; }; \
-             exit 1;; \
-         esac; \
-       done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/shaping/Makefile'; \
-       $(am__cd) $(top_srcdir) && \
-         $(AUTOMAKE) --gnu test/shaping/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-       @case '$?' in \
-         *config.status*) \
-           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-         *) \
-           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-       esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-mostlyclean-libtool:
-       -rm -f *.lo
-
-clean-libtool:
-       -rm -rf .libs _libs
-tags: TAGS
-TAGS:
-
-ctags: CTAGS
-CTAGS:
-
-
-distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-       list='$(DISTFILES)'; \
-         dist_files=`for file in $$list; do echo $$file; done | \
-         sed -e "s|^$$srcdirstrip/||;t" \
-             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-       case $$dist_files in \
-         */*) $(MKDIR_P) `echo "$$dist_files" | \
-                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-                          sort -u` ;; \
-       esac; \
-       for file in $$dist_files; do \
-         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         if test -d $$d/$$file; then \
-           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-           if test -d "$(distdir)/$$file"; then \
-             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-           fi; \
-           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-           fi; \
-           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-         else \
-           test -f "$(distdir)/$$file" \
-           || cp -p $$d/$$file "$(distdir)/$$file" \
-           || exit 1; \
-         fi; \
-       done
-check-am: all-am
-check: check-am
-all-am: Makefile
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-       -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
-       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-       -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
-
-maintainer-clean-generic:
-       @echo "This command is intended for maintainers to use"
-       @echo "it deletes files that may require special tools to rebuild."
-       -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
-clean: clean-am
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
-       -rm -f Makefile
-distclean-am: clean-am distclean-generic
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-       -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am:
-
-.MAKE: install-am install-strip
-
-.PHONY: all all-am check check-am clean clean-generic clean-libtool \
-       distclean distclean-generic distclean-libtool distdir dvi \
-       dvi-am html html-am info info-am install install-am \
-       install-data install-data-am install-dvi install-dvi-am \
-       install-exec install-exec-am install-html install-html-am \
-       install-info install-info-am install-man install-pdf \
-       install-pdf-am install-ps install-ps-am install-strip \
-       installcheck installcheck-am installdirs maintainer-clean \
-       maintainer-clean-generic mostlyclean mostlyclean-generic \
-       mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
-
-
-manifests:
-       @$(srcdir)/hb-manifest-update "$(srcdir)/texts" "$(srcdir)/fonts"
-
-.PHONY: manifests
-
--include $(top_srcdir)/git.mk
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/test/shaping/hb-diff b/test/shaping/hb-diff
deleted file mode 100755 (executable)
index 6a13fa2..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/python
-
-from hb_test_tools import *
-import sys, os
-
-if len (sys.argv) < 2:
-       print "usage: %s FILES..." % sys.argv[0]
-       sys.exit (1)
-
-ZipDiffer.diff_files (FileHelpers.open_file_or_stdin (f) for f in sys.argv[1:])
diff --git a/test/shaping/hb-diff-colorize b/test/shaping/hb-diff-colorize
deleted file mode 100755 (executable)
index 4e045d2..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/python
-
-from hb_test_tools import *
-
-formatter = ColorFormatter.Auto (sys.argv)
-colorizer = DiffColorizer (formatter=formatter)
-UtilMains.process_multiple_files (FilterHelpers.filter_printer_function_no_newline (colorizer.colorize_diff))
diff --git a/test/shaping/hb-diff-filter-failures b/test/shaping/hb-diff-filter-failures
deleted file mode 100755 (executable)
index 4fe218a..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/usr/bin/python
-
-from hb_test_tools import *
-
-UtilMains.process_multiple_files (FilterHelpers.filter_printer_function_no_newline (DiffFilters.filter_failures))
diff --git a/test/shaping/hb-diff-ngrams b/test/shaping/hb-diff-ngrams
deleted file mode 100755 (executable)
index a496447..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/usr/bin/python
-
-from hb_test_tools import *
-
-UtilMains.process_multiple_files (DiffSinks.print_ngrams)
diff --git a/test/shaping/hb-diff-stat b/test/shaping/hb-diff-stat
deleted file mode 100755 (executable)
index 81626e1..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/usr/bin/python
-
-from hb_test_tools import *
-
-UtilMains.process_multiple_files (DiffSinks.print_stat)
diff --git a/test/shaping/hb-manifest-read b/test/shaping/hb-manifest-read
deleted file mode 100755 (executable)
index f486bcc..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/usr/bin/python
-
-from hb_test_tools import *
-
-UtilMains.process_multiple_args (FilterHelpers.filter_printer_function (Manifest.read), mnemonic="DIR")
diff --git a/test/shaping/hb-manifest-update b/test/shaping/hb-manifest-update
deleted file mode 100755 (executable)
index b963f22..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/usr/bin/python
-
-from hb_test_tools import *
-
-UtilMains.process_multiple_args (Manifest.update_recursive, mnemonic="DIR")
diff --git a/test/shaping/hb-unicode-decode b/test/shaping/hb-unicode-decode
deleted file mode 100755 (executable)
index 5b00eae..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/usr/bin/python
-
-from hb_test_tools import *
-
-UtilMains.filter_multiple_strings_or_stdin (Unicode.decode, "UNICODE_STRING")
diff --git a/test/shaping/hb-unicode-encode b/test/shaping/hb-unicode-encode
deleted file mode 100755 (executable)
index 11bf365..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/usr/bin/python
-
-from hb_test_tools import *
-
-UtilMains.filter_multiple_strings_or_stdin (Unicode.encode, "UNICODE_STRING", '')
diff --git a/test/shaping/hb-unicode-prettyname b/test/shaping/hb-unicode-prettyname
deleted file mode 100755 (executable)
index ecc26cc..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/usr/bin/python
-
-from hb_test_tools import *
-
-UtilMains.filter_multiple_strings_or_stdin (Unicode.pretty_names, "UNICODE_CODEPOINTS", \
-                                           concat_separator = ' ')
diff --git a/test/shaping/hb_test_tools.py b/test/shaping/hb_test_tools.py
deleted file mode 100644 (file)
index 47fa6eb..0000000
+++ /dev/null
@@ -1,511 +0,0 @@
-#!/usr/bin/python
-
-import sys, os, re, difflib, unicodedata, errno, cgi
-from itertools import *
-
-diff_symbols = "-+=*&^%$#@!~/"
-diff_colors = ['red', 'green', 'blue']
-
-class ColorFormatter:
-
-       class Null:
-               @staticmethod
-               def start_color (c): return ''
-               @staticmethod
-               def end_color (): return ''
-               @staticmethod
-               def escape (s): return s
-               @staticmethod
-               def newline (): return '\n'
-
-       class ANSI:
-               @staticmethod
-               def start_color (c):
-                       return {
-                               'red': '\033[41;37;1m',
-                               'green': '\033[42;37;1m',
-                               'blue': '\033[44;37;1m',
-                       }[c]
-               @staticmethod
-               def end_color ():
-                       return '\033[m'
-               @staticmethod
-               def escape (s): return s
-               @staticmethod
-               def newline (): return '\n'
-
-       class HTML:
-               @staticmethod
-               def start_color (c):
-                       return '<span style="background:%s">' % c
-               @staticmethod
-               def end_color ():
-                       return '</span>'
-               @staticmethod
-               def escape (s): return cgi.escape (s)
-               @staticmethod
-               def newline (): return '<br/>\n'
-
-       @staticmethod
-       def Auto (argv = [], out = sys.stdout):
-               format = ColorFormatter.ANSI
-               if "--format" in argv:
-                       argv.remove ("--format")
-                       format = ColorFormatter.ANSI
-               if "--format=ansi" in argv:
-                       argv.remove ("--format=ansi")
-                       format = ColorFormatter.ANSI
-               if "--format=html" in argv:
-                       argv.remove ("--format=html")
-                       format = ColorFormatter.HTML
-               if "--no-format" in argv:
-                       argv.remove ("--no-format")
-                       format = ColorFormatter.Null
-               return format
-
-
-class DiffColorizer:
-
-       diff_regex = re.compile ('([a-za-z0-9_]*)([^a-za-z0-9_]?)')
-
-       def __init__ (self, formatter, colors=diff_colors, symbols=diff_symbols):
-               self.formatter = formatter
-               self.colors = colors
-               self.symbols = symbols
-
-       def colorize_lines (self, lines):
-               lines = (l if l else '' for l in lines)
-               ss = [self.diff_regex.sub (r'\1\n\2\n', l).splitlines (True) for l in lines]
-               oo = ["",""]
-               st = [False, False]
-               for l in difflib.Differ().compare (*ss):
-                       if l[0] == '?':
-                               continue
-                       if l[0] == ' ':
-                               for i in range(2):
-                                       if st[i]:
-                                               oo[i] += self.formatter.end_color ()
-                                               st[i] = False
-                               oo = [o + self.formatter.escape (l[2:]) for o in oo]
-                               continue
-                       if l[0] in self.symbols:
-                               i = self.symbols.index (l[0])
-                               if not st[i]:
-                                       oo[i] += self.formatter.start_color (self.colors[i])
-                                       st[i] = True
-                               oo[i] += self.formatter.escape (l[2:])
-                               continue
-               for i in range(2):
-                       if st[i]:
-                               oo[i] += self.formatter.end_color ()
-                               st[i] = False
-               oo = [o.replace ('\n', '') for o in oo]
-               return [s1+s2+self.formatter.newline () for (s1,s2) in zip (self.symbols, oo) if s2]
-
-       def colorize_diff (self, f):
-               lines = [None, None]
-               for l in f:
-                       if l[0] not in self.symbols:
-                               yield self.formatter.escape (l).replace ('\n', self.formatter.newline ())
-                               continue
-                       i = self.symbols.index (l[0])
-                       if lines[i]:
-                               # Flush
-                               for line in self.colorize_lines (lines):
-                                       yield line
-                               lines = [None, None]
-                       lines[i] = l[1:]
-                       if (all (lines)):
-                               # Flush
-                               for line in self.colorize_lines (lines):
-                                       yield line
-                               lines = [None, None]
-               if (any (lines)):
-                       # Flush
-                       for line in self.colorize_lines (lines):
-                               yield line
-
-
-class ZipDiffer:
-
-       @staticmethod
-       def diff_files (files, symbols=diff_symbols):
-               files = tuple (files) # in case it's a generator, copy it
-               try:
-                       for lines in izip_longest (*files):
-                               if all (lines[0] == line for line in lines[1:]):
-                                       sys.stdout.writelines ([" ", lines[0]])
-                                       continue
-
-                               for i, l in enumerate (lines):
-                                       if l:
-                                               sys.stdout.writelines ([symbols[i], l])
-               except IOError as e:
-                       if e.errno != errno.EPIPE:
-                               print >> sys.stderr, "%s: %s: %s" % (sys.argv[0], e.filename, e.strerror)
-                               sys.exit (1)
-
-
-class DiffFilters:
-
-       @staticmethod
-       def filter_failures (f):
-               for key, lines in DiffHelpers.separate_test_cases (f):
-                       lines = list (lines)
-                       if not DiffHelpers.test_passed (lines):
-                               for l in lines: yield l
-
-class Stat:
-
-       def __init__ (self):
-               self.count = 0
-               self.freq = 0
-
-       def add (self, test):
-               self.count += 1
-               self.freq += test.freq
-
-class Stats:
-
-       def __init__ (self):
-               self.passed = Stat ()
-               self.failed = Stat ()
-               self.total  = Stat ()
-
-       def add (self, test):
-               self.total.add (test)
-               if test.passed:
-                       self.passed.add (test)
-               else:
-                       self.failed.add (test)
-
-       def mean (self):
-               return float (self.passed.count) / self.total.count
-
-       def variance (self):
-               return (float (self.passed.count) / self.total.count) * \
-                      (float (self.failed.count) / self.total.count)
-
-       def stddev (self):
-               return self.variance () ** .5
-
-       def zscore (self, population):
-               """Calculate the standard score.
-                  Population is the Stats for population.
-                  Self is Stats for sample.
-                  Returns larger absolute value if sample is highly unlikely to be random.
-                  Anything outside of -3..+3 is very unlikely to be random.
-                  See: http://en.wikipedia.org/wiki/Standard_score"""
-
-               return (self.mean () - population.mean ()) / population.stddev ()
-
-
-
-
-class DiffSinks:
-
-       @staticmethod
-       def print_stat (f):
-               passed = 0
-               failed = 0
-               # XXX port to Stats, but that would really slow us down here
-               for key, lines in DiffHelpers.separate_test_cases (f):
-                       if DiffHelpers.test_passed (lines):
-                               passed += 1
-                       else:
-                               failed += 1
-               total = passed + failed
-               print "%d out of %d tests passed.  %d failed (%g%%)" % (passed, total, failed, 100. * failed / total)
-
-       @staticmethod
-       def print_ngrams (f, ns=(1,2,3)):
-               gens = tuple (Ngram.generator (n) for n in ns)
-               allstats = Stats ()
-               allgrams = {}
-               for key, lines in DiffHelpers.separate_test_cases (f):
-                       test = Test (lines)
-                       allstats.add (test)
-
-                       for gen in gens:
-                               for ngram in gen (test.unicodes):
-                                       if ngram not in allgrams:
-                                               allgrams[ngram] = Stats ()
-                                       allgrams[ngram].add (test)
-
-               importantgrams = {}
-               for ngram, stats in allgrams.iteritems ():
-                       if stats.failed.count >= 30: # for statistical reasons
-                               importantgrams[ngram] = stats
-               allgrams = importantgrams
-               del importantgrams
-
-               for ngram, stats in allgrams.iteritems ():
-                       print "zscore: %9f failed: %6d passed: %6d ngram: <%s>" % (stats.zscore (allstats), stats.failed.count, stats.passed.count, ','.join ("U+%04X" % u for u in ngram))
-
-
-
-class Test:
-
-       def __init__ (self, lines):
-               self.freq = 1
-               self.passed = True
-               self.identifier = None
-               self.text = None
-               self.unicodes = None
-               self.glyphs = None
-               for l in lines:
-                       symbol = l[0]
-                       if symbol != ' ':
-                               self.passed = False
-                       i = 1
-                       if ':' in l:
-                               i = l.index (':')
-                               if not self.identifier:
-                                       self.identifier = l[1:i]
-                               i = i + 2 # Skip colon and space
-                       j = -1
-                       if l[j] == '\n':
-                               j -= 1
-                       brackets = l[i] + l[j]
-                       l = l[i+1:-2]
-                       if brackets == '()':
-                               self.text = l
-                       elif brackets == '<>':
-                               self.unicodes = Unicode.parse (l)
-                       elif brackets == '[]':
-                               # XXX we don't handle failed tests here
-                               self.glyphs = l
-
-
-class DiffHelpers:
-
-       @staticmethod
-       def separate_test_cases (f):
-               '''Reads lines from f, and if the lines have identifiers, ie.
-                  have a colon character, groups them by identifier,
-                  yielding lists of all lines with the same identifier.'''
-
-               def identifier (l):
-                       if ':' in l[1:]:
-                               return l[1:l.index (':')]
-                       return l
-               return groupby (f, key=identifier)
-
-       @staticmethod
-       def test_passed (lines):
-               return all (l[0] == ' ' for l in lines)
-
-
-class FilterHelpers:
-
-       @staticmethod
-       def filter_printer_function (filter_callback):
-               def printer (f):
-                       for line in filter_callback (f):
-                               print line
-               return printer
-
-       @staticmethod
-       def filter_printer_function_no_newline (filter_callback):
-               def printer (f):
-                       for line in filter_callback (f):
-                               sys.stdout.writelines ([line])
-               return printer
-
-
-class Ngram:
-
-       @staticmethod
-       def generator (n):
-
-               def gen (f):
-                       l = []
-                       for x in f:
-                               l.append (x)
-                               if len (l) == n:
-                                       yield tuple (l)
-                                       l[:1] = []
-
-               gen.n = n
-               return gen
-
-
-class UtilMains:
-
-       @staticmethod
-       def process_multiple_files (callback, mnemonic = "FILE"):
-
-               if "--help" in sys.argv:
-                       print "Usage: %s %s..." % (sys.argv[0], mnemonic)
-                       sys.exit (1)
-
-               try:
-                       files = sys.argv[1:] if len (sys.argv) > 1 else ['-']
-                       for s in files:
-                               callback (FileHelpers.open_file_or_stdin (s))
-               except IOError as e:
-                       if e.errno != errno.EPIPE:
-                               print >> sys.stderr, "%s: %s: %s" % (sys.argv[0], e.filename, e.strerror)
-                               sys.exit (1)
-
-       @staticmethod
-       def process_multiple_args (callback, mnemonic):
-
-               if len (sys.argv) == 1 or "--help" in sys.argv:
-                       print "Usage: %s %s..." % (sys.argv[0], mnemonic)
-                       sys.exit (1)
-
-               try:
-                       for s in sys.argv[1:]:
-                               callback (s)
-               except IOError as e:
-                       if e.errno != errno.EPIPE:
-                               print >> sys.stderr, "%s: %s: %s" % (sys.argv[0], e.filename, e.strerror)
-                               sys.exit (1)
-
-       @staticmethod
-       def filter_multiple_strings_or_stdin (callback, mnemonic, \
-                                             separator = " ", \
-                                             concat_separator = False):
-
-               if "--help" in sys.argv:
-                       print "Usage:\n  %s %s...\nor:\n  %s\n\nWhen called with no arguments, input is read from standard input." \
-                             % (sys.argv[0], mnemonic, sys.argv[0])
-                       sys.exit (1)
-
-               try:
-                       if len (sys.argv) == 1:
-                               while (1):
-                                       line = sys.stdin.readline ()
-                                       if not len (line):
-                                               break
-                                       if line[-1] == '\n':
-                                               line = line[:-1]
-                                       print callback (line)
-                       else:
-                               args = sys.argv[1:]
-                               if concat_separator != False:
-                                       args = [concat_separator.join (args)]
-                               print separator.join (callback (x) for x in (args))
-               except IOError as e:
-                       if e.errno != errno.EPIPE:
-                               print >> sys.stderr, "%s: %s: %s" % (sys.argv[0], e.filename, e.strerror)
-                               sys.exit (1)
-
-
-class Unicode:
-
-       @staticmethod
-       def decode (s):
-               return '<' + u','.join ("U+%04X" % ord (u) for u in unicode (s, 'utf-8')).encode ('utf-8') + '>'
-
-       @staticmethod
-       def parse (s):
-               s = re.sub (r"[<+>,\\uU\n       ]", " ", s)
-               s = re.sub (r"0[xX]", " ", s)
-               return [int (x, 16) for x in s.split (' ') if len (x)]
-
-       @staticmethod
-       def encode (s):
-               return u''.join (unichr (x) for x in Unicode.parse (s)).encode ('utf-8')
-
-       shorthands = {
-               "ZERO WIDTH NON-JOINER": "ZWNJ",
-               "ZERO WIDTH JOINER": "ZWJ",
-               "NARROW NO-BREAK SPACE": "NNBSP",
-               "COMBINING GRAPHEME JOINER": "CGJ",
-               "LEFT-TO-RIGHT MARK": "LRM",
-               "RIGHT-TO-LEFT MARK": "RLM",
-               "LEFT-TO-RIGHT EMBEDDING": "LRE",
-               "RIGHT-TO-LEFT EMBEDDING": "RLE",
-               "POP DIRECTIONAL FORMATTING": "PDF",
-               "LEFT-TO-RIGHT OVERRIDE": "LRO",
-               "RIGHT-TO-LEFT OVERRIDE": "RLO",
-       }
-
-       @staticmethod
-       def pretty_name (u):
-               try:
-                       s = unicodedata.name (u)
-               except ValueError:
-                       return "XXX"
-               s = re.sub (".* LETTER ", "", s)
-               s = re.sub (".* VOWEL SIGN (.*)", r"\1-MATRA", s)
-               s = re.sub (".* SIGN ", "", s)
-               s = re.sub (".* COMBINING ", "", s)
-               if re.match (".* VIRAMA", s):
-                       s = "HALANT"
-               if s in Unicode.shorthands:
-                       s = Unicode.shorthands[s]
-               return s
-
-       @staticmethod
-       def pretty_names (s):
-               s = re.sub (r"[<+>\\uU]", " ", s)
-               s = re.sub (r"0[xX]", " ", s)
-               s = [unichr (int (x, 16)) for x in re.split ('[, \n]', s) if len (x)]
-               return u' + '.join (Unicode.pretty_name (x) for x in s).encode ('utf-8')
-
-
-class FileHelpers:
-
-       @staticmethod
-       def open_file_or_stdin (f):
-               if f == '-':
-                       return sys.stdin
-               return file (f)
-
-
-class Manifest:
-
-       @staticmethod
-       def read (s, strict = True):
-
-               if not os.path.exists (s):
-                       if strict:
-                               print >> sys.stderr, "%s: %s does not exist" % (sys.argv[0], s)
-                               sys.exit (1)
-                       return
-
-               s = os.path.normpath (s)
-
-               if os.path.isdir (s):
-
-                       try:
-                               m = file (os.path.join (s, "MANIFEST"))
-                               items = [x.strip () for x in m.readlines ()]
-                               for f in items:
-                                       for p in Manifest.read (os.path.join (s, f)):
-                                               yield p
-                       except IOError:
-                               if strict:
-                                       print >> sys.stderr, "%s: %s does not exist" % (sys.argv[0], os.path.join (s, "MANIFEST"))
-                                       sys.exit (1)
-                               return
-               else:
-                       yield s
-
-       @staticmethod
-       def update_recursive (s):
-
-               for dirpath, dirnames, filenames in os.walk (s, followlinks=True):
-
-                       for f in ["MANIFEST", "README", "LICENSE", "COPYING", "AUTHORS", "SOURCES", "ChangeLog"]:
-                               if f in dirnames:
-                                       dirnames.remove (f)
-                               if f in filenames:
-                                       filenames.remove (f)
-                       dirnames.sort ()
-                       filenames.sort ()
-                       ms = os.path.join (dirpath, "MANIFEST")
-                       print "  GEN    %s" % ms
-                       m = open (ms, "w")
-                       for f in filenames:
-                               print >> m, f
-                       for f in dirnames:
-                               print >> m, f
-                       for f in dirnames:
-                               Manifest.update_recursive (os.path.join (dirpath, f))
-
-if __name__ == '__main__':
-       pass
diff --git a/util/Makefile.am b/util/Makefile.am
deleted file mode 100644 (file)
index 944b1aa..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-# Process this file with automake to produce Makefile.in
-
-NULL =
-EXTRA_DIST =
-CLEANFILES =
-DISTCLEANFILES =
-MAINTAINERCLEANFILES =
-
-bin_PROGRAMS =
-
-AM_CPPFLAGS = \
-       -I$(top_srcdir)/src/ \
-       -I$(top_builddir)/src/ \
-       $(GLIB_CFLAGS) \
-       $(FREETYPE_CFLAGS) \
-       $(CAIRO_FT_CFLAGS) \
-       $(NULL)
-LDADD = \
-       $(top_builddir)/src/libharfbuzz.la \
-       -lm \
-       $(GLIB_LIBS) \
-       $(FREETYPE_LIBS) \
-       $(NULL)
-
-if HAVE_GLIB
-if HAVE_FREETYPE
-
-if HAVE_CAIRO_FT
-hb_view_SOURCES = \
-       hb-view.cc \
-       options.cc \
-       options.hh \
-       main-font-text.hh \
-       shape-consumer.hh \
-       ansi-print.cc \
-       ansi-print.hh \
-       helper-cairo.cc \
-       helper-cairo.hh \
-       helper-cairo-ansi.cc \
-       helper-cairo-ansi.hh \
-       view-cairo.cc \
-       view-cairo.hh \
-       $(NULL)
-hb_view_LDADD = \
-       $(LDADD) \
-       $(CAIRO_LIBS) \
-       $(CAIRO_FT_LIBS) \
-       $(NULL)
-bin_PROGRAMS += hb-view
-endif # HAVE_CAIRO_FT
-
-hb_shape_SOURCES = \
-       hb-shape.cc \
-       options.cc \
-       options.hh \
-       main-font-text.hh \
-       shape-consumer.hh \
-       $(NULL)
-bin_PROGRAMS += hb-shape
-
-if HAVE_OT
-hb_ot_shape_closure_SOURCES = \
-       hb-ot-shape-closure.cc \
-       options.cc \
-       options.hh \
-       main-font-text.hh \
-       $(NULL)
-bin_PROGRAMS += hb-ot-shape-closure
-endif # HAVE_OT
-
-endif # HAVE_FREETYPE
-endif # HAVE_GLIB
-
--include $(top_srcdir)/git.mk
diff --git a/util/ansi-print.cc b/util/ansi-print.cc
deleted file mode 100644 (file)
index 873bee8..0000000
+++ /dev/null
@@ -1,413 +0,0 @@
-/*
- * Copyright © 2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "ansi-print.hh"
-
-#include <assert.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <string.h>
-#include <stdio.h>
-#include <math.h>
-#include <fcntl.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h> /* for isatty() */
-#endif
-
-#define MIN(a,b) ((a) < (b) ? (a) : (b))
-
-#define CELL_W 8
-#define CELL_H (2 * CELL_W)
-
-struct color_diff_t
-{
-  int dot (const color_diff_t &o)
-  { return v[0]*o.v[0] + v[1]*o.v[1] + v[2]*o.v[2] + v[3]*o.v[3]; }
-
-  int v[4];
-};
-
-struct color_t
-{
-  static color_t from_ansi (unsigned int x)
-  {
-    color_t c = {(0xFF<<24) | ((0xFF*(x&1))<<16) | ((0xFF*((x >> 1)&1))<<8) | (0xFF*((x >> 2)&1))};
-    return c;
-  }
-  unsigned int to_ansi (void)
-  {
-    return ((v >> 23) & 1) | ((v >> 14)&2) | ((v >> 5)&4);
-  }
-
-  color_diff_t diff (const color_t &o)
-  {
-    color_diff_t d;
-    for (unsigned int i = 0; i < 4; i++)
-      d.v[i] = (int) ((v >> (i*8))&0xFF) - (int) ((o.v >> (i*8))&0xFF);
-    return d;
-  }
-
-  uint32_t v;
-};
-
-struct image_t
-{
-  public:
-
-  image_t (unsigned int width_,
-          unsigned int height_,
-          const uint32_t *data_,
-          unsigned int stride_) :
-               width (width_),
-               height (height_),
-               own_data (false),
-               data ((color_t *) data_),
-               stride (stride_) {}
-  image_t (unsigned int width_,
-          unsigned int height_) :
-               width (width_),
-               height (height_),
-               own_data (true),
-               data ((color_t *) malloc (sizeof (data[0]) * width * height)),
-               stride (width) {}
-  ~image_t (void)
-  { if (own_data) free (data); }
-
-  color_t &operator () (unsigned int x, unsigned int y)
-  { return data[x + y * stride]; }
-
-  color_t operator () (unsigned int x, unsigned int y) const
-  { return data[x + y * stride]; }
-
-  void
-  copy_sub_image (const image_t &s,
-                 unsigned int x, unsigned int y,
-                 unsigned int w, unsigned int h)
-  {
-    assert (x < width);
-    assert (y < height);
-    for (unsigned int row = 0; row < h; row++) {
-      color_t *p = data + x + MIN (y + row, height - 1) * stride;
-      color_t *q = s.data + row * s.stride;
-      if (x + w <= width)
-       for (unsigned int col = 0; col < w; col++)
-         *q++ = *p++;
-      else {
-        unsigned int limit = width - x;
-       for (unsigned int col = 0; col < limit; col++)
-         *q++ = *p++;
-       p--;
-       for (unsigned int col = limit; col < w; col++)
-         *q++ = *p;
-      }
-    }
-  }
-
-  const unsigned int width;
-  const unsigned int height;
-
-  private:
-  bool own_data;
-  color_t * const data;
-  const unsigned int stride;
-};
-
-struct biimage_t
-{
-  public:
-
-  biimage_t (unsigned int width, unsigned int height) :
-               width (width),
-               height (height),
-               data ((uint8_t *) malloc (sizeof (data[0]) * width * height)) {}
-  ~biimage_t (void)
-  { free (data); }
-
-  void set (const image_t &image)
-  {
-    assert (image.width == width);
-    assert (image.height == height);
-    int freq[8] = {0};
-    for (unsigned int y = 0; y < height; y++)
-      for (unsigned int x = 0; x < width; x++) {
-        color_t c = image (x, y);
-        freq[c.to_ansi ()]++;
-      }
-    bg = 0;
-    for (unsigned int i = 1; i < 8; i++)
-      if (freq[bg] < freq[i])
-        bg = i;
-    fg = 0;
-    for (unsigned int i = 1; i < 8; i++)
-      if (i != bg && freq[fg] < freq[i])
-        fg = i;
-    if (fg == bg || freq[fg] == 0) {
-      fg = bg;
-      unicolor = true;
-    }
-    else
-      unicolor = false;
-
-    /* Set the data... */
-
-    if (unicolor) {
-      memset (data, 0, sizeof (data[0]) * width * height);
-      return;
-    }
-
-    color_t bgc = color_t::from_ansi (bg);
-    color_t fgc = color_t::from_ansi (fg);
-    color_diff_t diff = fgc.diff (bgc);
-    int dd = diff.dot (diff);
-    for (unsigned int y = 0; y < height; y++)
-      for (unsigned int x = 0; x < width; x++) {
-        int d = diff.dot (image (x, y).diff (bgc));
-       (*this)(x, y) = d < 0 ? 0 : d > dd ? 255 : lround (d * 255. / dd);
-      }
-  }
-
-  uint8_t &operator () (unsigned int x, unsigned int y)
-  { return data[x + y * width]; }
-
-  uint8_t operator () (unsigned int x, unsigned int y) const
-  { return data[x + y * width]; }
-
-  const unsigned int width;
-  const unsigned int height;
-  unsigned int bg;
-  unsigned int fg;
-  bool unicolor;
-
-  private:
-  uint8_t * const data;
-};
-
-const char *
-block_best (const biimage_t &bi, unsigned int *score, bool *inverse)
-{
-  assert (bi.width  <= CELL_W);
-  assert (bi.height <= CELL_H);
-
-  unsigned int row_sum[CELL_H] = {0};
-  unsigned int col_sum[CELL_W] = {0};
-  unsigned int row_sum_i[CELL_H] = {0};
-  unsigned int col_sum_i[CELL_W] = {0};
-  unsigned int quad[2][2] = {{0}};
-  unsigned int quad_i[2][2] = {{0}};
-  unsigned int total = 0;
-  unsigned int total_i = 0;
-  for (unsigned int y = 0; y < bi.height; y++)
-    for (unsigned int x = 0; x < bi.width; x++) {
-      unsigned int c = bi (x, y);
-      unsigned int c_i = 255 - c;
-      row_sum[y] += c;
-      row_sum_i[y] += c_i;
-      col_sum[x] += c;
-      col_sum_i[x] += c_i;
-      quad[2 * y / bi.height][2 * x / bi.width] += c;
-      quad_i[2 * y / bi.height][2 * x / bi.width] += c_i;
-      total += c;
-      total_i += c_i;
-    }
-
-  /* Make the sums cummulative */
-  for (unsigned int i = 1; i < bi.height; i++) {
-    row_sum[i] += row_sum[i - 1];
-    row_sum_i[i] += row_sum_i[i - 1];
-  }
-  for (unsigned int i = 1; i < bi.width;  i++) {
-    col_sum[i] += col_sum[i - 1];
-    col_sum_i[i] += col_sum_i[i - 1];
-  }
-
-  const char *best_c = " ";
-
-  /* Maybe empty is better! */
-  if (total < *score) {
-    *score = total;
-    *inverse = false;
-    best_c = " ";
-  }
-  /* Maybe full is better! */
-  if (total_i < *score) {
-    *score = total_i;
-    *inverse = true;
-    best_c = " ";
-  }
-
-  /* Find best lower line */
-  if (1) {
-    unsigned int best_s = (unsigned int) -1;
-    bool best_inv = false;
-    int best_i = 0;
-    for (unsigned int i = 0; i < bi.height - 1; i++)
-    {
-      unsigned int s;
-      s = row_sum[i] + total_i - row_sum_i[i];
-      if (s < best_s) {
-        best_s = s;
-       best_i = i;
-       best_inv = false;
-      }
-      s = row_sum_i[i] + total - row_sum[i];
-      if (s < best_s) {
-        best_s = s;
-       best_i = i;
-       best_inv = true;
-      }
-    }
-    if (best_s < *score) {
-      static const char *lower[7] = {"▁", "▂", "▃", "▄", "▅", "▆", "▇"};
-      unsigned int which = lround (((best_i + 1) * 8) / bi.height);
-      if (1 <= which && which <= 7) {
-       *score = best_s;
-       *inverse = best_inv;
-       best_c = lower[7 - which];
-      }
-    }
-  }
-
-  /* Find best left line */
-  if (1) {
-    unsigned int best_s = (unsigned int) -1;
-    bool best_inv = false;
-    int best_i = 0;
-    for (unsigned int i = 0; i < bi.width - 1; i++)
-    {
-      unsigned int s;
-      s = col_sum[i] + total_i - col_sum_i[i];
-      if (s < best_s) {
-        best_s = s;
-       best_i = i;
-       best_inv = true;
-      }
-      s = col_sum_i[i] + total - col_sum[i];
-      if (s < best_s) {
-        best_s = s;
-       best_i = i;
-       best_inv = false;
-      }
-    }
-    if (best_s < *score) {
-      static const char *left [7] = {"▏", "▎", "▍", "▌", "▋", "▊", "▉"};
-      unsigned int which = lround (((best_i + 1) * 8) / bi.width);
-      if (1 <= which && which <= 7) {
-       *score = best_s;
-       *inverse = best_inv;
-       best_c = left[which - 1];
-      }
-    }
-  }
-
-  /* Find best quadrant */
-  if (1) {
-    unsigned int q = 0;
-    unsigned int qs = 0;
-    for (unsigned int i = 0; i < 2; i++)
-      for (unsigned int j = 0; j < 2; j++)
-       if (quad[i][j] > quad_i[i][j]) {
-         q += 1 << (2 * i + j);
-         qs += quad_i[i][j];
-       } else
-         qs += quad[i][j];
-    if (qs < *score) {
-      const char *c = NULL;
-      bool inv = false;
-      switch (q) {
-       case 1:  c = "▟"; inv = true;  break;
-       case 2:  c = "▙"; inv = true;  break;
-       case 4:  c = "▖"; inv = false; break;
-       case 8:  c = "▗"; inv = false; break;
-       case 9:  c = "▚"; inv = false; break;
-       case 6:  c = "▞"; inv = false; break;
-       case 7:  c = "▜"; inv = true;  break;
-       case 11: c = "▜"; inv = true;  break;
-       case 13: c = "▙"; inv = true;  break;
-       case 14: c = "▟"; inv = true;  break;
-      }
-      if (c) {
-       *score = qs;
-       *inverse = inv;
-       best_c = c;
-      }
-    }
-  }
-
-  return best_c;
-}
-
-void
-ansi_print_image_rgb24 (const uint32_t *data,
-                       unsigned int width,
-                       unsigned int height,
-                       unsigned int stride)
-{
-  image_t image (width, height, data, stride);
-
-  unsigned int rows = (height + CELL_H - 1) / CELL_H;
-  unsigned int cols = (width +  CELL_W - 1) / CELL_W;
-  image_t cell (CELL_W, CELL_H);
-  biimage_t bi (CELL_W, CELL_H);
-  unsigned int last_bg = -1, last_fg = -1;
-  for (unsigned int row = 0; row < rows; row++) {
-    for (unsigned int col = 0; col < cols; col++) {
-      image.copy_sub_image (cell, col * CELL_W, row * CELL_H, CELL_W, CELL_H);
-      bi.set (cell);
-      if (bi.unicolor) {
-        if (last_bg != bi.bg) {
-         printf ("\e[%dm", 40 + bi.bg);
-         last_bg = bi.bg;
-       }
-       printf (" ");
-      } else {
-        /* Figure out the closest character to the biimage */
-        unsigned int score = (unsigned int) -1;
-       bool inverse = false;
-        const char *c = block_best (bi, &score, &inverse);
-       if (inverse) {
-         if (last_bg != bi.fg || last_fg != bi.bg) {
-           printf ("\e[%d;%dm", 30 + bi.bg, 40 + bi.fg);
-           last_bg = bi.fg;
-           last_fg = bi.bg;
-         }
-       } else {
-         if (last_bg != bi.bg || last_fg != bi.fg) {
-           printf ("\e[%d;%dm", 40 + bi.bg, 30 + bi.fg);
-           last_bg = bi.bg;
-           last_fg = bi.fg;
-         }
-       }
-       printf ("%s", c);
-      }
-    }
-    printf ("\e[0m\n"); /* Reset */
-    last_bg = last_fg = -1;
-  }
-}
diff --git a/util/ansi-print.hh b/util/ansi-print.hh
deleted file mode 100644 (file)
index dad4d4c..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright © 2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef ANSI_PRINT_HH
-#define ANSI_PRINT_HH
-
-#include <hb.h> /* for int types */
-
-void
-ansi_print_image_rgb24 (const uint32_t *data,
-                       unsigned int width,
-                       unsigned int height,
-                       unsigned int stride);
-
-
-#endif
diff --git a/util/hb-ot-shape-closure.cc b/util/hb-ot-shape-closure.cc
deleted file mode 100644 (file)
index 6dce7a1..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright © 2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "main-font-text.hh"
-
-#ifdef HAVE_FREETYPE
-#include <hb-ft.h>
-#endif
-
-struct shape_closure_consumer_t : option_group_t
-{
-  shape_closure_consumer_t (option_parser_t *parser) :
-                           shaper (parser),
-                           show_glyph_names (true)
-  {
-    add_options (parser);
-  }
-
-  void add_options (struct option_parser_t *parser)
-  {
-    GOptionEntry entries[] =
-    {
-      {"no-glyph-names",       0, G_OPTION_FLAG_REVERSE, G_OPTION_ARG_NONE,    &this->show_glyph_names,        "Use glyph indices instead of names",   NULL},
-      {NULL}
-    };
-    parser->add_group (entries,
-                      "format",
-                      "Format options:",
-                      "Options controlling output formatting",
-                      this);
-  }
-
-  void init (const font_options_t *font_opts)
-  {
-    glyphs = hb_set_create ();
-    font = hb_font_reference (font_opts->get_font ());
-    failed = false;
-  }
-  void consume_line (hb_buffer_t  *buffer,
-                    const char   *text,
-                    unsigned int  text_len)
-  {
-    hb_set_clear (glyphs);
-    shaper.shape_closure (text, text_len, font, buffer, glyphs);
-
-    if (hb_set_empty (glyphs))
-      return;
-
-    /* Print it out! */
-    bool first = true;
-    for (hb_codepoint_t i = -1; hb_set_next (glyphs, &i);)
-      if (hb_set_has (glyphs, i)) {
-        if (first)
-         first = false;
-       else
-         printf (" ");
-       char glyph_name[32];
-       if (show_glyph_names) {
-         hb_font_get_glyph_name (font, i, glyph_name, sizeof (glyph_name));
-         printf ("%s", glyph_name);
-       } else
-         printf ("%u", i);
-      }
-  }
-  void finish (const font_options_t *font_opts)
-  {
-    printf ("\n");
-    hb_font_destroy (font);
-    font = NULL;
-    hb_set_destroy (glyphs);
-    glyphs = NULL;
-  }
-
-  bool failed;
-
-  protected:
-  shape_options_t shaper;
-  hb_bool_t show_glyph_names;
-
-  hb_set_t *glyphs;
-  hb_font_t *font;
-};
-
-int
-main (int argc, char **argv)
-{
-  main_font_text_t<shape_closure_consumer_t> driver;
-  return driver.main (argc, argv);
-}
diff --git a/util/hb-shape.cc b/util/hb-shape.cc
deleted file mode 100644 (file)
index b23519b..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright © 2010  Behdad Esfahbod
- * Copyright © 2011,2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "main-font-text.hh"
-#include "shape-consumer.hh"
-
-struct output_buffer_t
-{
-  output_buffer_t (option_parser_t *parser)
-                 : options (parser),
-                   format (parser) {}
-
-  void init (const font_options_t *font_opts)
-  {
-    options.get_file_handle ();
-    gs = g_string_new (NULL);
-    line_no = 0;
-    font = hb_font_reference (font_opts->get_font ());
-  }
-  void new_line (void)
-  {
-    line_no++;
-  }
-  void consume_text (hb_buffer_t  *buffer,
-                    const char   *text,
-                    unsigned int  text_len,
-                    hb_bool_t     utf8_clusters)
-  {
-    g_string_set_size (gs, 0);
-    format.serialize_buffer_of_text (buffer, line_no, text, text_len, font, utf8_clusters, gs);
-    fprintf (options.fp, "%s", gs->str);
-  }
-  void shape_failed (hb_buffer_t  *buffer,
-                    const char   *text,
-                    unsigned int  text_len,
-                    hb_bool_t     utf8_clusters)
-  {
-    g_string_set_size (gs, 0);
-    format.serialize_message (line_no, "msg: all shapers failed", gs);
-    fprintf (options.fp, "%s", gs->str);
-  }
-  void consume_glyphs (hb_buffer_t  *buffer,
-                      const char   *text,
-                      unsigned int  text_len,
-                      hb_bool_t     utf8_clusters)
-  {
-    g_string_set_size (gs, 0);
-    format.serialize_buffer_of_glyphs (buffer, line_no, text, text_len, font, utf8_clusters, gs);
-    fprintf (options.fp, "%s", gs->str);
-  }
-  void finish (const font_options_t *font_opts)
-  {
-    hb_font_destroy (font);
-    g_string_free (gs, true);
-    gs = NULL;
-    font = NULL;
-  }
-
-  protected:
-  output_options_t options;
-  format_options_t format;
-
-  GString *gs;
-  unsigned int line_no;
-  hb_font_t *font;
-};
-
-int
-main (int argc, char **argv)
-{
-  main_font_text_t<shape_consumer_t<output_buffer_t> > driver;
-  return driver.main (argc, argv);
-}
diff --git a/util/hb-view.cc b/util/hb-view.cc
deleted file mode 100644 (file)
index 26fad66..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright © 2010  Behdad Esfahbod
- * Copyright © 2011,2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "main-font-text.hh"
-#include "shape-consumer.hh"
-#include "view-cairo.hh"
-
-int
-main (int argc, char **argv)
-{
-  main_font_text_t<shape_consumer_t<view_cairo_t> > driver;
-  return driver.main (argc, argv);
-}
diff --git a/util/helper-cairo-ansi.cc b/util/helper-cairo-ansi.cc
deleted file mode 100644 (file)
index f7c0660..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright © 2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "helper-cairo-ansi.hh"
-#include "options.hh"
-
-#include "ansi-print.hh"
-
-
-cairo_status_t
-helper_cairo_surface_write_to_ansi_stream (cairo_surface_t     *surface,
-                                          cairo_write_func_t   write_func,
-                                          void                 *closure)
-{
-  unsigned int width = cairo_image_surface_get_width (surface);
-  unsigned int height = cairo_image_surface_get_height (surface);
-  if (cairo_image_surface_get_format (surface) != CAIRO_FORMAT_RGB24) {
-    cairo_surface_t *new_surface = cairo_image_surface_create (CAIRO_FORMAT_RGB24, width, height);
-    cairo_t *cr = cairo_create (new_surface);
-    if (cairo_image_surface_get_format (surface) == CAIRO_FORMAT_A8) {
-      cairo_set_source_rgb (cr, 0., 0., 0.);
-      cairo_paint (cr);
-      cairo_set_source_rgb (cr, 1., 1., 1.);
-      cairo_mask_surface (cr, surface, 0, 0);
-    } else {
-      cairo_set_source_rgb (cr, 1., 1., 1.);
-      cairo_paint (cr);
-      cairo_set_source_surface (cr, surface, 0, 0);
-      cairo_paint (cr);
-    }
-    cairo_destroy (cr);
-    surface = new_surface;
-  } else
-    cairo_surface_reference (surface);
-
-  unsigned int stride = cairo_image_surface_get_stride (surface);
-  const uint32_t *data = (uint32_t *) cairo_image_surface_get_data (surface);
-
-  /* We don't have rows to spare on the terminal window...
-   * Find the tight image top/bottom and only print in between. */
-
-  /* Use corner color as background color. */
-  uint32_t bg_color = * (uint32_t *) data;
-
-  /* Drop first row while empty */
-  while (height) 
-  {
-    unsigned int i;
-    for (i = 0; i < width; i++)
-      if (data[i] != bg_color)
-        break;
-    if (i < width)
-      break;
-    data += stride / 4;
-    height--;
-  }
-
-  /* Drop last row while empty */
-  unsigned int orig_height = height;
-  while (height)
-  {
-    const uint32_t *row = data + (height - 1) * stride / 4;
-    unsigned int i;
-    for (i = 0; i < width; i++)
-      if (row[i] != bg_color)
-        break;
-    if (i < width)
-      break;
-    height--;
-  }
-  if (height < orig_height)
-    height++; /* Add one last blank row for padding. */
-
-  if (width && height)
-    ansi_print_image_rgb24 (data, width, height, stride / 4);
-
-  cairo_surface_destroy (surface);
-  return CAIRO_STATUS_SUCCESS;
-}
diff --git a/util/helper-cairo-ansi.hh b/util/helper-cairo-ansi.hh
deleted file mode 100644 (file)
index eeaaa50..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright © 2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#include <cairo.h>
-
-#ifndef HELPER_CAIRO_ANSI_HH
-#define HELPER_CAIRO_ANSI_HH
-
-
-cairo_status_t
-helper_cairo_surface_write_to_ansi_stream (cairo_surface_t     *surface,
-                                          cairo_write_func_t   write_func,
-                                          void                 *closure);
-
-
-#endif
diff --git a/util/helper-cairo.cc b/util/helper-cairo.cc
deleted file mode 100644 (file)
index 0cdfd63..0000000
+++ /dev/null
@@ -1,453 +0,0 @@
-/*
- * Copyright © 2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "helper-cairo.hh"
-
-#include <cairo-ft.h>
-#include <hb-ft.h>
-
-#include "helper-cairo-ansi.hh"
-#ifdef CAIRO_HAS_SVG_SURFACE
-#  include <cairo-svg.h>
-#endif
-#ifdef CAIRO_HAS_PDF_SURFACE
-#  include <cairo-pdf.h>
-#endif
-#ifdef CAIRO_HAS_PS_SURFACE
-#  include <cairo-ps.h>
-#  if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1,6,0)
-#    define HAS_EPS 1
-
-static cairo_surface_t *
-_cairo_eps_surface_create_for_stream (cairo_write_func_t  write_func,
-                                     void               *closure,
-                                     double              width,
-                                     double              height)
-{
-  cairo_surface_t *surface;
-
-  surface = cairo_ps_surface_create_for_stream (write_func, closure, width, height);
-  cairo_ps_surface_set_eps (surface, true);
-
-  return surface;
-}
-
-#  else
-#    undef HAS_EPS
-#  endif
-#endif
-
-cairo_scaled_font_t *
-helper_cairo_create_scaled_font (const font_options_t *font_opts,
-                                double font_size)
-{
-  hb_font_t *font = hb_font_reference (font_opts->get_font ());
-
-  cairo_font_face_t *cairo_face;
-  FT_Face ft_face = hb_ft_font_get_face (font);
-  if (!ft_face)
-    /* This allows us to get some boxes at least... */
-    cairo_face = cairo_toy_font_face_create ("@cairo:sans",
-                                            CAIRO_FONT_SLANT_NORMAL,
-                                            CAIRO_FONT_WEIGHT_NORMAL);
-  else
-    cairo_face = cairo_ft_font_face_create_for_ft_face (ft_face, 0);
-  cairo_matrix_t ctm, font_matrix;
-  cairo_font_options_t *font_options;
-
-  cairo_matrix_init_identity (&ctm);
-  cairo_matrix_init_scale (&font_matrix,
-                          font_size, font_size);
-  font_options = cairo_font_options_create ();
-  cairo_font_options_set_hint_style (font_options, CAIRO_HINT_STYLE_NONE);
-  cairo_font_options_set_hint_metrics (font_options, CAIRO_HINT_METRICS_OFF);
-
-  cairo_scaled_font_t *scaled_font = cairo_scaled_font_create (cairo_face,
-                                                              &font_matrix,
-                                                              &ctm,
-                                                              font_options);
-
-  cairo_font_options_destroy (font_options);
-  cairo_font_face_destroy (cairo_face);
-
-  static cairo_user_data_key_t key;
-  if (cairo_scaled_font_set_user_data (scaled_font,
-                                      &key,
-                                      (void *) font,
-                                      (cairo_destroy_func_t) hb_font_destroy))
-    hb_font_destroy (font);
-
-  return scaled_font;
-}
-
-
-struct finalize_closure_t {
-  void (*callback)(finalize_closure_t *);
-  cairo_surface_t *surface;
-  cairo_write_func_t write_func;
-  void *closure;
-};
-static cairo_user_data_key_t finalize_closure_key;
-
-
-static void
-finalize_ansi (finalize_closure_t *closure)
-{
-  cairo_status_t status;
-  status = helper_cairo_surface_write_to_ansi_stream (closure->surface,
-                                                     closure->write_func,
-                                                     closure->closure);
-  if (status != CAIRO_STATUS_SUCCESS)
-    fail (false, "Failed to write output: %s",
-         cairo_status_to_string (status));
-}
-
-static cairo_surface_t *
-_cairo_ansi_surface_create_for_stream (cairo_write_func_t write_func,
-                                      void *closure,
-                                      double width,
-                                      double height,
-                                      cairo_content_t content)
-{
-  cairo_surface_t *surface;
-  int w = ceil (width);
-  int h = ceil (height);
-
-  switch (content) {
-    case CAIRO_CONTENT_ALPHA:
-      surface = cairo_image_surface_create (CAIRO_FORMAT_A8, w, h);
-      break;
-    default:
-    case CAIRO_CONTENT_COLOR:
-      surface = cairo_image_surface_create (CAIRO_FORMAT_RGB24, w, h);
-      break;
-    case CAIRO_CONTENT_COLOR_ALPHA:
-      surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, w, h);
-      break;
-  }
-  cairo_status_t status = cairo_surface_status (surface);
-  if (status != CAIRO_STATUS_SUCCESS)
-    fail (false, "Failed to create cairo surface: %s",
-         cairo_status_to_string (status));
-
-  finalize_closure_t *ansi_closure = g_new0 (finalize_closure_t, 1);
-  ansi_closure->callback = finalize_ansi;
-  ansi_closure->surface = surface;
-  ansi_closure->write_func = write_func;
-  ansi_closure->closure = closure;
-
-  if (cairo_surface_set_user_data (surface,
-                                  &finalize_closure_key,
-                                  (void *) ansi_closure,
-                                  (cairo_destroy_func_t) g_free))
-    g_free ((void *) closure);
-
-  return surface;
-}
-
-
-#ifdef CAIRO_HAS_PNG_FUNCTIONS
-
-static void
-finalize_png (finalize_closure_t *closure)
-{
-  cairo_status_t status;
-  status = cairo_surface_write_to_png_stream (closure->surface,
-                                             closure->write_func,
-                                             closure->closure);
-  if (status != CAIRO_STATUS_SUCCESS)
-    fail (false, "Failed to write output: %s",
-         cairo_status_to_string (status));
-}
-
-static cairo_surface_t *
-_cairo_png_surface_create_for_stream (cairo_write_func_t write_func,
-                                     void *closure,
-                                     double width,
-                                     double height,
-                                     cairo_content_t content)
-{
-  cairo_surface_t *surface;
-  int w = ceil (width);
-  int h = ceil (height);
-
-  switch (content) {
-    case CAIRO_CONTENT_ALPHA:
-      surface = cairo_image_surface_create (CAIRO_FORMAT_A8, w, h);
-      break;
-    default:
-    case CAIRO_CONTENT_COLOR:
-      surface = cairo_image_surface_create (CAIRO_FORMAT_RGB24, w, h);
-      break;
-    case CAIRO_CONTENT_COLOR_ALPHA:
-      surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, w, h);
-      break;
-  }
-  cairo_status_t status = cairo_surface_status (surface);
-  if (status != CAIRO_STATUS_SUCCESS)
-    fail (false, "Failed to create cairo surface: %s",
-         cairo_status_to_string (status));
-
-  finalize_closure_t *png_closure = g_new0 (finalize_closure_t, 1);
-  png_closure->callback = finalize_png;
-  png_closure->surface = surface;
-  png_closure->write_func = write_func;
-  png_closure->closure = closure;
-
-  if (cairo_surface_set_user_data (surface,
-                                  &finalize_closure_key,
-                                  (void *) png_closure,
-                                  (cairo_destroy_func_t) g_free))
-    g_free ((void *) closure);
-
-  return surface;
-}
-
-#endif
-
-static cairo_status_t
-stdio_write_func (void                *closure,
-                 const unsigned char *data,
-                 unsigned int         size)
-{
-  FILE *fp = (FILE *) closure;
-
-  while (size) {
-    size_t ret = fwrite (data, 1, size, fp);
-    size -= ret;
-    data += ret;
-    if (size && ferror (fp))
-      fail (false, "Failed to write output: %s", strerror (errno));
-  }
-
-  return CAIRO_STATUS_SUCCESS;
-}
-
-cairo_t *
-helper_cairo_create_context (double w, double h,
-                            view_options_t *view_opts,
-                            output_options_t *out_opts)
-{
-  cairo_surface_t *(*constructor) (cairo_write_func_t write_func,
-                                  void *closure,
-                                  double width,
-                                  double height) = NULL;
-  cairo_surface_t *(*constructor2) (cairo_write_func_t write_func,
-                                   void *closure,
-                                   double width,
-                                   double height,
-                                   cairo_content_t content) = NULL;
-
-  const char *extension = out_opts->output_format;
-  if (!extension) {
-#if HAVE_ISATTY
-    if (isatty (fileno (out_opts->get_file_handle ())))
-      extension = "ansi";
-    else
-#endif
-      extension = "png";
-  }
-  if (0)
-    ;
-    else if (0 == strcasecmp (extension, "ansi"))
-      constructor2 = _cairo_ansi_surface_create_for_stream;
-  #ifdef CAIRO_HAS_PNG_FUNCTIONS
-    else if (0 == strcasecmp (extension, "png"))
-      constructor2 = _cairo_png_surface_create_for_stream;
-  #endif
-  #ifdef CAIRO_HAS_SVG_SURFACE
-    else if (0 == strcasecmp (extension, "svg"))
-      constructor = cairo_svg_surface_create_for_stream;
-  #endif
-  #ifdef CAIRO_HAS_PDF_SURFACE
-    else if (0 == strcasecmp (extension, "pdf"))
-      constructor = cairo_pdf_surface_create_for_stream;
-  #endif
-  #ifdef CAIRO_HAS_PS_SURFACE
-    else if (0 == strcasecmp (extension, "ps"))
-      constructor = cairo_ps_surface_create_for_stream;
-   #ifdef HAS_EPS
-    else if (0 == strcasecmp (extension, "eps"))
-      constructor = _cairo_eps_surface_create_for_stream;
-   #endif
-  #endif
-
-
-  unsigned int fr, fg, fb, fa, br, bg, bb, ba;
-  br = bg = bb = 0; ba = 255;
-  sscanf (view_opts->back + (*view_opts->back=='#'), "%2x%2x%2x%2x", &br, &bg, &bb, &ba);
-  fr = fg = fb = 0; fa = 255;
-  sscanf (view_opts->fore + (*view_opts->fore=='#'), "%2x%2x%2x%2x", &fr, &fg, &fb, &fa);
-
-  cairo_content_t content;
-  if (!view_opts->annotate && ba == 255 && br == bg && bg == bb && fr == fg && fg == fb)
-    content = CAIRO_CONTENT_ALPHA;
-  else if (ba == 255)
-    content = CAIRO_CONTENT_COLOR;
-  else
-    content = CAIRO_CONTENT_COLOR_ALPHA;
-
-  cairo_surface_t *surface;
-  FILE *f = out_opts->get_file_handle ();
-  if (constructor)
-    surface = constructor (stdio_write_func, f, w, h);
-  else if (constructor2)
-    surface = constructor2 (stdio_write_func, f, w, h, content);
-  else
-    fail (false, "Unknown output format `%s'", extension);
-
-  cairo_t *cr = cairo_create (surface);
-  content = cairo_surface_get_content (surface);
-
-  switch (content) {
-    case CAIRO_CONTENT_ALPHA:
-      cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
-      cairo_set_source_rgba (cr, 1., 1., 1., br / 255.);
-      cairo_paint (cr);
-      cairo_set_source_rgba (cr, 1., 1., 1.,
-                            (fr / 255.) * (fa / 255.) + (br / 255) * (1 - (fa / 255.)));
-      break;
-    default:
-    case CAIRO_CONTENT_COLOR:
-    case CAIRO_CONTENT_COLOR_ALPHA:
-      cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
-      cairo_set_source_rgba (cr, br / 255., bg / 255., bb / 255., ba / 255.);
-      cairo_paint (cr);
-      cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
-      cairo_set_source_rgba (cr, fr / 255., fg / 255., fb / 255., fa / 255.);
-      break;
-  }
-
-  cairo_surface_destroy (surface);
-  return cr;
-}
-
-void
-helper_cairo_destroy_context (cairo_t *cr)
-{
-  finalize_closure_t *closure = (finalize_closure_t *)
-                               cairo_surface_get_user_data (cairo_get_target (cr),
-                                                            &finalize_closure_key);
-  if (closure)
-    closure->callback (closure);
-
-  cairo_status_t status = cairo_status (cr);
-  if (status != CAIRO_STATUS_SUCCESS)
-    fail (false, "Failed: %s",
-         cairo_status_to_string (status));
-  cairo_destroy (cr);
-}
-
-
-void
-helper_cairo_line_from_buffer (helper_cairo_line_t *l,
-                              hb_buffer_t         *buffer,
-                              const char          *text,
-                              unsigned int         text_len,
-                              double               scale,
-                              hb_bool_t            utf8_clusters)
-{
-  memset (l, 0, sizeof (*l));
-
-  l->num_glyphs = hb_buffer_get_length (buffer);
-  hb_glyph_info_t *hb_glyph = hb_buffer_get_glyph_infos (buffer, NULL);
-  hb_glyph_position_t *hb_position = hb_buffer_get_glyph_positions (buffer, NULL);
-  l->glyphs = cairo_glyph_allocate (l->num_glyphs + 1);
-
-  if (text) {
-    l->utf8 = g_strndup (text, text_len);
-    l->utf8_len = text_len;
-    l->num_clusters = l->num_glyphs ? 1 : 0;
-    for (unsigned int i = 1; i < l->num_glyphs; i++)
-      if (hb_glyph[i].cluster != hb_glyph[i-1].cluster)
-       l->num_clusters++;
-    l->clusters = cairo_text_cluster_allocate (l->num_clusters);
-  }
-
-  if ((l->num_glyphs && !l->glyphs) ||
-      (l->utf8_len && !l->utf8) ||
-      (l->num_clusters && !l->clusters))
-  {
-    l->finish ();
-    return;
-  }
-
-  hb_position_t x = 0, y = 0;
-  int i;
-  for (i = 0; i < (int) l->num_glyphs; i++)
-  {
-    l->glyphs[i].index = hb_glyph[i].codepoint;
-    l->glyphs[i].x = ( hb_position->x_offset + x) * scale;
-    l->glyphs[i].y = (-hb_position->y_offset + y) * scale;
-    x +=  hb_position->x_advance;
-    y += -hb_position->y_advance;
-
-    hb_position++;
-  }
-  l->glyphs[i].index = -1;
-  l->glyphs[i].x = x * scale;
-  l->glyphs[i].y = y * scale;
-
-  if (l->num_clusters) {
-    memset ((void *) l->clusters, 0, l->num_clusters * sizeof (l->clusters[0]));
-    hb_bool_t backward = HB_DIRECTION_IS_BACKWARD (hb_buffer_get_direction (buffer));
-    l->cluster_flags = backward ? CAIRO_TEXT_CLUSTER_FLAG_BACKWARD : (cairo_text_cluster_flags_t) 0;
-    unsigned int cluster = 0;
-    const char *start = l->utf8, *end = start;
-    l->clusters[cluster].num_glyphs++;
-    if (backward) {
-      for (i = l->num_glyphs - 2; i >= 0; i--) {
-       if (hb_glyph[i].cluster != hb_glyph[i+1].cluster) {
-         g_assert (hb_glyph[i].cluster > hb_glyph[i+1].cluster);
-         if (utf8_clusters)
-           end = start + hb_glyph[i].cluster - hb_glyph[i+1].cluster;
-         else
-           end = g_utf8_offset_to_pointer (start, hb_glyph[i].cluster - hb_glyph[i+1].cluster);
-         l->clusters[cluster].num_bytes = end - start;
-         start = end;
-         cluster++;
-       }
-       l->clusters[cluster].num_glyphs++;
-      }
-      l->clusters[cluster].num_bytes = l->utf8 + text_len - start;
-    } else {
-      for (i = 1; i < (int) l->num_glyphs; i++) {
-       if (hb_glyph[i].cluster != hb_glyph[i-1].cluster) {
-         g_assert (hb_glyph[i].cluster > hb_glyph[i-1].cluster);
-         if (utf8_clusters)
-           end = start + hb_glyph[i].cluster - hb_glyph[i-1].cluster;
-         else
-           end = g_utf8_offset_to_pointer (start, hb_glyph[i].cluster - hb_glyph[i-1].cluster);
-         l->clusters[cluster].num_bytes = end - start;
-         start = end;
-         cluster++;
-       }
-       l->clusters[cluster].num_glyphs++;
-      }
-      l->clusters[cluster].num_bytes = l->utf8 + text_len - start;
-    }
-  }
-}
diff --git a/util/helper-cairo.hh b/util/helper-cairo.hh
deleted file mode 100644 (file)
index 2f2c9d4..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright © 2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "options.hh"
-
-#include <cairo.h>
-
-#ifndef HELPER_CAIRO_HH
-#define HELPER_CAIRO_HH
-
-
-cairo_scaled_font_t *
-helper_cairo_create_scaled_font (const font_options_t *font_opts,
-                                double font_size);
-
-
-cairo_t *
-helper_cairo_create_context (double w, double h,
-                            view_options_t *view_opts,
-                            output_options_t *out_opts);
-
-void
-helper_cairo_destroy_context (cairo_t *cr);
-
-
-struct helper_cairo_line_t {
-  cairo_glyph_t *glyphs;
-  unsigned int num_glyphs;
-  char *utf8;
-  unsigned int utf8_len;
-  cairo_text_cluster_t *clusters;
-  unsigned int num_clusters;
-  cairo_text_cluster_flags_t cluster_flags;
-
-  void finish (void) {
-    if (glyphs)
-      cairo_glyph_free (glyphs);
-    if (clusters)
-      cairo_text_cluster_free (clusters);
-    if (utf8)
-      g_free (utf8);
-  }
-
-  void get_advance (double *x_advance, double *y_advance) {
-    *x_advance = glyphs[num_glyphs].x;
-    *y_advance = glyphs[num_glyphs].y;
-  }
-};
-
-void
-helper_cairo_line_from_buffer (helper_cairo_line_t *l,
-                              hb_buffer_t         *buffer,
-                              const char          *text,
-                              unsigned int         text_len,
-                              double               scale,
-                              hb_bool_t            utf8_clusters);
-
-#endif
diff --git a/util/main-font-text.hh b/util/main-font-text.hh
deleted file mode 100644 (file)
index 44e3bfb..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright © 2011,2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "options.hh"
-
-#ifndef HB_MAIN_FONT_TEXT_HH
-#define HB_MAIN_FONT_TEXT_HH
-
-/* main() body for utilities taking font and processing text.*/
-
-template <typename consumer_t>
-struct main_font_text_t
-{
-  main_font_text_t (void)
-                 : options ("[FONT-FILE] [TEXT]"),
-                   font_opts (&options),
-                   input (&options),
-                   consumer (&options) {}
-
-  int
-  main (int argc, char **argv)
-  {
-    options.parse (&argc, &argv);
-
-    argc--, argv++;
-    if (argc && !font_opts.font_file) font_opts.font_file = argv[0], argc--, argv++;
-    if (argc && !input.text && !input.text_file) input.text = argv[0], argc--, argv++;
-    if (argc)
-      fail (true, "Too many arguments on the command line");
-    if (!font_opts.font_file)
-      options.usage ();
-    if (!input.text && !input.text_file)
-      input.text_file = "-";
-
-    consumer.init (&font_opts);
-
-    hb_buffer_t *buffer = hb_buffer_create ();
-    unsigned int text_len;
-    const char *text;
-    while ((text = input.get_line (&text_len)))
-      consumer.consume_line (buffer, text, text_len);
-    hb_buffer_destroy (buffer);
-
-    consumer.finish (&font_opts);
-
-    return consumer.failed ? 1 : 0;
-  }
-
-  protected:
-  option_parser_t options;
-  font_options_t font_opts;
-  text_options_t input;
-  consumer_t consumer;
-};
-
-#endif
-
diff --git a/util/options.cc b/util/options.cc
deleted file mode 100644 (file)
index db1b244..0000000
+++ /dev/null
@@ -1,829 +0,0 @@
-/*
- * Copyright © 2011,2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "options.hh"
-
-#ifdef HAVE_FREETYPE
-#include <hb-ft.h>
-#endif
-
-
-void
-fail (hb_bool_t suggest_help, const char *format, ...)
-{
-  const char *msg;
-
-  va_list vap;
-  va_start (vap, format);
-  msg = g_strdup_vprintf (format, vap);
-  const char *prgname = g_get_prgname ();
-  g_printerr ("%s: %s\n", prgname, msg);
-  if (suggest_help)
-    g_printerr ("Try `%s --help' for more information.\n", prgname);
-
-  exit (1);
-}
-
-
-hb_bool_t debug = false;
-
-static gchar *
-shapers_to_string (void)
-{
-  GString *shapers = g_string_new (NULL);
-  const char **shaper_list = hb_shape_list_shapers ();
-
-  for (; *shaper_list; shaper_list++) {
-    g_string_append (shapers, *shaper_list);
-    g_string_append_c (shapers, ',');
-  }
-  g_string_truncate (shapers, MAX (0, (gint)shapers->len - 1));
-
-  return g_string_free (shapers, false);
-}
-
-static G_GNUC_NORETURN gboolean
-show_version (const char *name G_GNUC_UNUSED,
-             const char *arg G_GNUC_UNUSED,
-             gpointer    data G_GNUC_UNUSED,
-             GError    **error G_GNUC_UNUSED)
-{
-  g_printf ("%s (%s) %s\n", g_get_prgname (), PACKAGE_NAME, PACKAGE_VERSION);
-
-  char *shapers = shapers_to_string ();
-  g_printf ("Available shapers: %s\n", shapers);
-  g_free (shapers);
-  if (strcmp (HB_VERSION_STRING, hb_version_string ()))
-    g_printf ("Linked HarfBuzz library has a different version: %s\n", hb_version_string ());
-
-  exit(0);
-}
-
-
-void
-option_parser_t::add_main_options (void)
-{
-  GOptionEntry entries[] =
-  {
-    {"version",                0, G_OPTION_FLAG_NO_ARG,
-                             G_OPTION_ARG_CALLBACK,    (gpointer) &show_version,       "Show version numbers",                 NULL},
-    {"debug",          0, 0, G_OPTION_ARG_NONE,        &debug,                         "Free all resources before exit",       NULL},
-    {NULL}
-  };
-  g_option_context_add_main_entries (context, entries, NULL);
-}
-
-static gboolean
-pre_parse (GOptionContext *context G_GNUC_UNUSED,
-          GOptionGroup *group G_GNUC_UNUSED,
-          gpointer data,
-          GError **error)
-{
-  option_group_t *option_group = (option_group_t *) data;
-  option_group->pre_parse (error);
-  return *error == NULL;
-}
-
-static gboolean
-post_parse (GOptionContext *context G_GNUC_UNUSED,
-           GOptionGroup *group G_GNUC_UNUSED,
-           gpointer data,
-           GError **error)
-{
-  option_group_t *option_group = static_cast<option_group_t *>(data);
-  option_group->post_parse (error);
-  return *error == NULL;
-}
-
-void
-option_parser_t::add_group (GOptionEntry   *entries,
-                           const gchar    *name,
-                           const gchar    *description,
-                           const gchar    *help_description,
-                           option_group_t *option_group)
-{
-  GOptionGroup *group = g_option_group_new (name, description, help_description,
-                                           static_cast<gpointer>(option_group), NULL);
-  g_option_group_add_entries (group, entries);
-  g_option_group_set_parse_hooks (group, pre_parse, post_parse);
-  g_option_context_add_group (context, group);
-}
-
-void
-option_parser_t::parse (int *argc, char ***argv)
-{
-  setlocale (LC_ALL, "");
-
-  GError *parse_error = NULL;
-  if (!g_option_context_parse (context, argc, argv, &parse_error))
-  {
-    if (parse_error != NULL) {
-      fail (true, "%s", parse_error->message);
-      //g_error_free (parse_error);
-    } else
-      fail (true, "Option parse error");
-  }
-}
-
-
-static gboolean
-parse_margin (const char *name G_GNUC_UNUSED,
-             const char *arg,
-             gpointer    data,
-             GError    **error G_GNUC_UNUSED)
-{
-  view_options_t *view_opts = (view_options_t *) data;
-  view_options_t::margin_t &m = view_opts->margin;
-  switch (sscanf (arg, "%lf %lf %lf %lf", &m.t, &m.r, &m.b, &m.l)) {
-    case 1: m.r = m.t;
-    case 2: m.b = m.t;
-    case 3: m.l = m.r;
-    case 4: return true;
-    default:
-      g_set_error (error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE,
-                  "%s argument should be one to four space-separated numbers",
-                  name);
-      return false;
-  }
-}
-
-
-static gboolean
-parse_shapers (const char *name G_GNUC_UNUSED,
-              const char *arg,
-              gpointer    data,
-              GError    **error G_GNUC_UNUSED)
-{
-  shape_options_t *shape_opts = (shape_options_t *) data;
-  g_free (shape_opts->shapers);
-  shape_opts->shapers = g_strsplit (arg, ",", 0);
-  return true;
-}
-
-static G_GNUC_NORETURN gboolean
-list_shapers (const char *name G_GNUC_UNUSED,
-             const char *arg G_GNUC_UNUSED,
-             gpointer    data G_GNUC_UNUSED,
-             GError    **error G_GNUC_UNUSED)
-{
-  for (const char **shaper = hb_shape_list_shapers (); *shaper; shaper++)
-    g_printf ("%s\n", *shaper);
-
-  exit(0);
-}
-
-
-
-static void
-parse_space (char **pp)
-{
-  char c;
-#define ISSPACE(c) ((c)==' '||(c)=='\f'||(c)=='\n'||(c)=='\r'||(c)=='\t'||(c)=='\v')
-  while (c = **pp, ISSPACE (c))
-    (*pp)++;
-#undef ISSPACE
-}
-
-static hb_bool_t
-parse_char (char **pp, char c)
-{
-  parse_space (pp);
-
-  if (**pp != c)
-    return false;
-
-  (*pp)++;
-  return true;
-}
-
-static hb_bool_t
-parse_uint (char **pp, unsigned int *pv)
-{
-  char *p = *pp;
-  unsigned int v;
-
-  v = strtol (p, pp, 0);
-
-  if (p == *pp)
-    return false;
-
-  *pv = v;
-  return true;
-}
-
-
-static hb_bool_t
-parse_feature_value_prefix (char **pp, hb_feature_t *feature)
-{
-  if (parse_char (pp, '-'))
-    feature->value = 0;
-  else {
-    parse_char (pp, '+');
-    feature->value = 1;
-  }
-
-  return true;
-}
-
-static hb_bool_t
-parse_feature_tag (char **pp, hb_feature_t *feature)
-{
-  char *p = *pp, c;
-
-  parse_space (pp);
-
-#define ISALNUM(c) (('a' <= (c) && (c) <= 'z') || ('A' <= (c) && (c) <= 'Z') || ('0' <= (c) && (c) <= '9'))
-  while (c = **pp, ISALNUM(c))
-    (*pp)++;
-#undef ISALNUM
-
-  if (p == *pp)
-    return false;
-
-  feature->tag = hb_tag_from_string (p, *pp - p);
-  return true;
-}
-
-static hb_bool_t
-parse_feature_indices (char **pp, hb_feature_t *feature)
-{
-  parse_space (pp);
-
-  hb_bool_t has_start;
-
-  feature->start = 0;
-  feature->end = (unsigned int) -1;
-
-  if (!parse_char (pp, '['))
-    return true;
-
-  has_start = parse_uint (pp, &feature->start);
-
-  if (parse_char (pp, ':')) {
-    parse_uint (pp, &feature->end);
-  } else {
-    if (has_start)
-      feature->end = feature->start + 1;
-  }
-
-  return parse_char (pp, ']');
-}
-
-static hb_bool_t
-parse_feature_value_postfix (char **pp, hb_feature_t *feature)
-{
-  return !parse_char (pp, '=') || parse_uint (pp, &feature->value);
-}
-
-
-static hb_bool_t
-parse_one_feature (char **pp, hb_feature_t *feature)
-{
-  return parse_feature_value_prefix (pp, feature) &&
-        parse_feature_tag (pp, feature) &&
-        parse_feature_indices (pp, feature) &&
-        parse_feature_value_postfix (pp, feature) &&
-        (parse_char (pp, ',') || **pp == '\0');
-}
-
-static void
-skip_one_feature (char **pp)
-{
-  char *e;
-  e = strchr (*pp, ',');
-  if (e)
-    *pp = e + 1;
-  else
-    *pp = *pp + strlen (*pp);
-}
-
-static gboolean
-parse_features (const char *name G_GNUC_UNUSED,
-               const char *arg,
-               gpointer    data,
-               GError    **error G_GNUC_UNUSED)
-{
-  shape_options_t *shape_opts = (shape_options_t *) data;
-  char *s = (char *) arg;
-  char *p;
-
-  shape_opts->num_features = 0;
-  g_free (shape_opts->features);
-  shape_opts->features = NULL;
-
-  if (!*s)
-    return true;
-
-  /* count the features first, so we can allocate memory */
-  p = s;
-  do {
-    shape_opts->num_features++;
-    p = strchr (p, ',');
-    if (p)
-      p++;
-  } while (p);
-
-  shape_opts->features = (hb_feature_t *) calloc (shape_opts->num_features, sizeof (*shape_opts->features));
-
-  /* now do the actual parsing */
-  p = s;
-  shape_opts->num_features = 0;
-  while (*p) {
-    if (parse_one_feature (&p, &shape_opts->features[shape_opts->num_features]))
-      shape_opts->num_features++;
-    else
-      skip_one_feature (&p);
-  }
-
-  return true;
-}
-
-
-void
-view_options_t::add_options (option_parser_t *parser)
-{
-  GOptionEntry entries[] =
-  {
-    {"annotate",       0, 0, G_OPTION_ARG_NONE,        &this->annotate,                "Annotate output rendering",                            NULL},
-    {"background",     0, 0, G_OPTION_ARG_STRING,      &this->back,                    "Set background color (default: "DEFAULT_BACK")",       "red/#rrggbb/#rrggbbaa"},
-    {"foreground",     0, 0, G_OPTION_ARG_STRING,      &this->fore,                    "Set foreground color (default: "DEFAULT_FORE")",       "red/#rrggbb/#rrggbbaa"},
-    {"line-space",     0, 0, G_OPTION_ARG_DOUBLE,      &this->line_space,              "Set space between lines (default: 0)",                 "units"},
-    {"margin",         0, 0, G_OPTION_ARG_CALLBACK,    (gpointer) &parse_margin,       "Margin around output (default: "G_STRINGIFY(DEFAULT_MARGIN)")","one to four numbers"},
-    {"font-size",      0, 0, G_OPTION_ARG_DOUBLE,      &this->font_size,               "Font size (default: "G_STRINGIFY(DEFAULT_FONT_SIZE)")","size"},
-    {NULL}
-  };
-  parser->add_group (entries,
-                    "view",
-                    "View options:",
-                    "Options controlling output rendering",
-                    this);
-}
-
-void
-shape_options_t::add_options (option_parser_t *parser)
-{
-  GOptionEntry entries[] =
-  {
-    {"list-shapers",   0, G_OPTION_FLAG_NO_ARG,
-                             G_OPTION_ARG_CALLBACK,    (gpointer) &list_shapers,       "List available shapers and quit",      NULL},
-    {"shaper",         0, G_OPTION_FLAG_HIDDEN,
-                             G_OPTION_ARG_CALLBACK,    (gpointer) &parse_shapers,      "Hidden duplicate of --shapers",        NULL},
-    {"shapers",                0, 0, G_OPTION_ARG_CALLBACK,    (gpointer) &parse_shapers,      "Comma-separated list of shapers to try","list"},
-    {"direction",      0, 0, G_OPTION_ARG_STRING,      &this->direction,               "Set text direction (default: auto)",   "ltr/rtl/ttb/btt"},
-    {"language",       0, 0, G_OPTION_ARG_STRING,      &this->language,                "Set text language (default: $LANG)",   "langstr"},
-    {"script",         0, 0, G_OPTION_ARG_STRING,      &this->script,                  "Set text script (default: auto)",      "ISO-15924 tag"},
-    {"utf8-clusters",  0, 0, G_OPTION_ARG_NONE,        &this->utf8_clusters,           "Use UTF8 byte indices, not char indices",      NULL},
-    {NULL}
-  };
-  parser->add_group (entries,
-                    "shape",
-                    "Shape options:",
-                    "Options controlling the shaping process",
-                    this);
-
-  const gchar *features_help = "Comma-separated list of font features\n"
-    "\n"
-    "    Features can be enabled or disabled, either globally or limited to\n"
-    "    specific character ranges.\n"
-    "\n"
-    "    The range indices refer to the positions between Unicode characters,\n"
-    "    unless the --utf8-clusters is provided, in which case range indices\n"
-    "    refer to UTF-8 byte indices. The position before the first character\n"
-    "    is always 0.\n"
-    "\n"
-    "    The format is Python-esque.  Here is how it all works:\n"
-    "\n"
-    "      Syntax:       Value:    Start:    End:\n"
-    "\n"
-    "    Setting value:\n"
-    "      \"kern\"        1         0         ∞         # Turn feature on\n"
-    "      \"+kern\"       1         0         ∞         # Turn feature on\n"
-    "      \"-kern\"       0         0         ∞         # Turn feature off\n"
-    "      \"kern=0\"      0         0         ∞         # Turn feature off\n"
-    "      \"kern=1\"      1         0         ∞         # Turn feature on\n"
-    "      \"aalt=2\"      2         0         ∞         # Choose 2nd alternate\n"
-    "\n"
-    "    Setting index:\n"
-    "      \"kern[]\"      1         0         ∞         # Turn feature on\n"
-    "      \"kern[:]\"     1         0         ∞         # Turn feature on\n"
-    "      \"kern[5:]\"    1         5         ∞         # Turn feature on, partial\n"
-    "      \"kern[:5]\"    1         0         5         # Turn feature on, partial\n"
-    "      \"kern[3:5]\"   1         3         5         # Turn feature on, range\n"
-    "      \"kern[3]\"     1         3         3+1       # Turn feature on, single char\n"
-    "\n"
-    "    Mixing it all:\n"
-    "\n"
-    "      \"kern[3:5]=0\" 1         3         5         # Turn feature off for range";
-
-  GOptionEntry entries2[] =
-  {
-    {"features",       0, 0, G_OPTION_ARG_CALLBACK,    (gpointer) &parse_features,     features_help,  "list"},
-    {NULL}
-  };
-  parser->add_group (entries2,
-                    "features",
-                    "Features options:",
-                    "Options controlling font features used",
-                    this);
-}
-
-void
-font_options_t::add_options (option_parser_t *parser)
-{
-  GOptionEntry entries[] =
-  {
-    {"font-file",      0, 0, G_OPTION_ARG_STRING,      &this->font_file,               "Font file-name",                                       "filename"},
-    {"face-index",     0, 0, G_OPTION_ARG_INT,         &this->face_index,              "Face index (default: 0)",                              "index"},
-    {NULL}
-  };
-  parser->add_group (entries,
-                    "font",
-                    "Font options:",
-                    "Options controlling the font",
-                    this);
-}
-
-void
-text_options_t::add_options (option_parser_t *parser)
-{
-  GOptionEntry entries[] =
-  {
-    {"text",           0, 0, G_OPTION_ARG_STRING,      &this->text,                    "Set input text",                       "string"},
-    {"text-file",      0, 0, G_OPTION_ARG_STRING,      &this->text_file,               "Set input text file-name\n\n    If no text is provided, standard input is used for input.",            "filename"},
-    {NULL}
-  };
-  parser->add_group (entries,
-                    "text",
-                    "Text options:",
-                    "Options controlling the input text",
-                    this);
-}
-
-void
-output_options_t::add_options (option_parser_t *parser)
-{
-  GOptionEntry entries[] =
-  {
-    {"output-file",    0, 0, G_OPTION_ARG_STRING,      &this->output_file,             "Set output file-name (default: stdout)","filename"},
-    {"output-format",  0, 0, G_OPTION_ARG_STRING,      &this->output_format,           "Set output format",                    "format"},
-    {NULL}
-  };
-  parser->add_group (entries,
-                    "output",
-                    "Output options:",
-                    "Options controlling the output",
-                    this);
-}
-
-
-
-hb_font_t *
-font_options_t::get_font (void) const
-{
-  if (font)
-    return font;
-
-  hb_blob_t *blob = NULL;
-
-  /* Create the blob */
-  {
-    char *font_data;
-    unsigned int len = 0;
-    hb_destroy_func_t destroy;
-    void *user_data;
-    hb_memory_mode_t mm;
-
-    /* This is a hell of a lot of code for just reading a file! */
-    if (!font_file)
-      fail (true, "No font file set");
-
-    if (0 == strcmp (font_file, "-")) {
-      /* read it */
-      GString *gs = g_string_new (NULL);
-      char buf[BUFSIZ];
-#ifdef HAVE__SETMODE
-      _setmode (fileno (stdin), _O_BINARY);
-#endif
-      while (!feof (stdin)) {
-       size_t ret = fread (buf, 1, sizeof (buf), stdin);
-       if (ferror (stdin))
-         fail (false, "Failed reading font from standard input: %s",
-               strerror (errno));
-       g_string_append_len (gs, buf, ret);
-      }
-      len = gs->len;
-      font_data = g_string_free (gs, false);
-      user_data = font_data;
-      destroy = (hb_destroy_func_t) g_free;
-      mm = HB_MEMORY_MODE_WRITABLE;
-    } else {
-      GError *error = NULL;
-      GMappedFile *mf = g_mapped_file_new (font_file, false, &error);
-      if (mf) {
-       font_data = g_mapped_file_get_contents (mf);
-       len = g_mapped_file_get_length (mf);
-       if (len) {
-         destroy = (hb_destroy_func_t) g_mapped_file_unref;
-         user_data = (void *) mf;
-         mm = HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE;
-       } else
-         g_mapped_file_unref (mf);
-      } else {
-       fail (false, "%s", error->message);
-       //g_error_free (error);
-      }
-      if (!len) {
-       /* GMappedFile is buggy, it doesn't fail if file isn't regular.
-        * Try reading.
-        * https://bugzilla.gnome.org/show_bug.cgi?id=659212 */
-        GError *error = NULL;
-       gsize l;
-       if (g_file_get_contents (font_file, &font_data, &l, &error)) {
-         len = l;
-         destroy = (hb_destroy_func_t) g_free;
-         user_data = (void *) font_data;
-         mm = HB_MEMORY_MODE_WRITABLE;
-       } else {
-         fail (false, "%s", error->message);
-         //g_error_free (error);
-       }
-      }
-    }
-
-    blob = hb_blob_create (font_data, len, mm, user_data, destroy);
-  }
-
-  /* Create the face */
-  hb_face_t *face = hb_face_create (blob, face_index);
-  hb_blob_destroy (blob);
-
-
-  font = hb_font_create (face);
-
-  unsigned int upem = hb_face_get_upem (face);
-  hb_font_set_scale (font, upem, upem);
-  hb_face_destroy (face);
-
-#ifdef HAVE_FREETYPE
-  hb_ft_font_set_funcs (font);
-#endif
-
-  return font;
-}
-
-
-const char *
-text_options_t::get_line (unsigned int *len)
-{
-  if (text) {
-    if (text_len == (unsigned int) -1)
-      text_len = strlen (text);
-
-    if (!text_len) {
-      *len = 0;
-      return NULL;
-    }
-
-    const char *ret = text;
-    const char *p = (const char *) memchr (text, '\n', text_len);
-    unsigned int ret_len;
-    if (!p) {
-      ret_len = text_len;
-      text += ret_len;
-      text_len = 0;
-    } else {
-      ret_len = p - ret;
-      text += ret_len + 1;
-      text_len -= ret_len + 1;
-    }
-
-    *len = ret_len;
-    return ret;
-  }
-
-  if (!fp) {
-    if (!text_file)
-      fail (true, "At least one of text or text-file must be set");
-
-    if (0 != strcmp (text_file, "-"))
-      fp = fopen (text_file, "r");
-    else
-      fp = stdin;
-
-    if (!fp)
-      fail (false, "Failed opening text file `%s': %s",
-           text_file, strerror (errno));
-
-    gs = g_string_new (NULL);
-  }
-
-  g_string_set_size (gs, 0);
-  char buf[BUFSIZ];
-  while (fgets (buf, sizeof (buf), fp)) {
-    unsigned int bytes = strlen (buf);
-    if (bytes && buf[bytes - 1] == '\n') {
-      bytes--;
-      g_string_append_len (gs, buf, bytes);
-      break;
-    }
-      g_string_append_len (gs, buf, bytes);
-  }
-  if (ferror (fp))
-    fail (false, "Failed reading text: %s",
-         strerror (errno));
-  *len = gs->len;
-  return !*len && feof (fp) ? NULL : gs->str;
-}
-
-
-FILE *
-output_options_t::get_file_handle (void)
-{
-  if (fp)
-    return fp;
-
-  if (output_file)
-    fp = fopen (output_file, "wb");
-  else {
-#ifdef HAVE__SETMODE
-    _setmode (fileno (stdout), _O_BINARY);
-#endif
-    fp = stdout;
-  }
-  if (!fp)
-    fail (false, "Cannot open output file `%s': %s",
-         g_filename_display_name (output_file), strerror (errno));
-
-  return fp;
-}
-
-static gboolean
-parse_verbose (const char *name G_GNUC_UNUSED,
-              const char *arg G_GNUC_UNUSED,
-              gpointer    data G_GNUC_UNUSED,
-              GError    **error G_GNUC_UNUSED)
-{
-  format_options_t *format_opts = (format_options_t *) data;
-  format_opts->show_text = format_opts->show_unicode = format_opts->show_line_num = true;
-  return true;
-}
-
-void
-format_options_t::add_options (option_parser_t *parser)
-{
-  GOptionEntry entries[] =
-  {
-    {"no-glyph-names", 0, G_OPTION_FLAG_REVERSE, G_OPTION_ARG_NONE,    &this->show_glyph_names,        "Use glyph indices instead of names",   NULL},
-    {"no-positions",   0, G_OPTION_FLAG_REVERSE, G_OPTION_ARG_NONE,    &this->show_positions,          "Do not show glyph positions",          NULL},
-    {"no-clusters",    0, G_OPTION_FLAG_REVERSE, G_OPTION_ARG_NONE,    &this->show_clusters,           "Do not show cluster mapping",          NULL},
-    {"show-text",      0, 0,                     G_OPTION_ARG_NONE,    &this->show_text,               "Show input text",                      NULL},
-    {"show-unicode",   0, 0,                     G_OPTION_ARG_NONE,    &this->show_unicode,            "Show input Unicode codepoints",        NULL},
-    {"show-line-num",  0, 0,                     G_OPTION_ARG_NONE,    &this->show_line_num,           "Show line numbers",                    NULL},
-    {"verbose",                0, G_OPTION_FLAG_NO_ARG,  G_OPTION_ARG_CALLBACK,(gpointer) &parse_verbose,      "Show everything",                      NULL},
-    {NULL}
-  };
-  parser->add_group (entries,
-                    "format",
-                    "Format options:",
-                    "Options controlling the formatting of buffer contents",
-                    this);
-}
-
-void
-format_options_t::serialize_unicode (hb_buffer_t *buffer,
-                                    GString     *gs)
-{
-  unsigned int num_glyphs = hb_buffer_get_length (buffer);
-  hb_glyph_info_t *info = hb_buffer_get_glyph_infos (buffer, NULL);
-
-  g_string_append_c (gs, '<');
-  for (unsigned int i = 0; i < num_glyphs; i++)
-  {
-    if (i)
-      g_string_append_c (gs, ',');
-    g_string_append_printf (gs, "U+%04X", info->codepoint);
-    info++;
-  }
-  g_string_append_c (gs, '>');
-}
-
-void
-format_options_t::serialize_glyphs (hb_buffer_t *buffer,
-                                   hb_font_t   *font,
-                                   hb_bool_t    utf8_clusters,
-                                   GString     *gs)
-{
-  unsigned int num_glyphs = hb_buffer_get_length (buffer);
-  hb_glyph_info_t *info = hb_buffer_get_glyph_infos (buffer, NULL);
-  hb_glyph_position_t *pos = hb_buffer_get_glyph_positions (buffer, NULL);
-
-  g_string_append_c (gs, '[');
-  for (unsigned int i = 0; i < num_glyphs; i++)
-  {
-    if (i)
-      g_string_append_c (gs, '|');
-
-    char glyph_name[32];
-    if (show_glyph_names) {
-      hb_font_get_glyph_name (font, info->codepoint, glyph_name, sizeof (glyph_name));
-      g_string_append_printf (gs, "%s", glyph_name);
-    } else
-      g_string_append_printf (gs, "%u", info->codepoint);
-
-    if (show_clusters) {
-      g_string_append_printf (gs, "=%u", info->cluster);
-      if (utf8_clusters)
-       g_string_append (gs, "u8");
-    }
-
-    if (show_positions && (pos->x_offset || pos->y_offset)) {
-      g_string_append_c (gs, '@');
-      if (pos->x_offset) g_string_append_printf (gs, "%d", pos->x_offset);
-      if (pos->y_offset) g_string_append_printf (gs, ",%d", pos->y_offset);
-    }
-    if (show_positions && (pos->x_advance || pos->y_advance)) {
-      g_string_append_c (gs, '+');
-      if (pos->x_advance) g_string_append_printf (gs, "%d", pos->x_advance);
-      if (pos->y_advance) g_string_append_printf (gs, ",%d", pos->y_advance);
-    }
-
-    info++;
-    pos++;
-  }
-  g_string_append_c (gs, ']');
-}
-void
-format_options_t::serialize_line_no (unsigned int  line_no,
-                                    GString      *gs)
-{
-  if (show_line_num)
-    g_string_append_printf (gs, "%d: ", line_no);
-}
-void
-format_options_t::serialize_buffer_of_text (hb_buffer_t  *buffer,
-                                           unsigned int  line_no,
-                                           const char   *text,
-                                           unsigned int  text_len,
-                                           hb_font_t    *font,
-                                           hb_bool_t     utf8_clusters,
-                                           GString      *gs)
-{
-  if (show_text) {
-    serialize_line_no (line_no, gs);
-    g_string_append_c (gs, '(');
-    g_string_append_len (gs, text, text_len);
-    g_string_append_c (gs, ')');
-    g_string_append_c (gs, '\n');
-  }
-
-  if (show_unicode) {
-    serialize_line_no (line_no, gs);
-    serialize_unicode (buffer, gs);
-    g_string_append_c (gs, '\n');
-  }
-}
-void
-format_options_t::serialize_message (unsigned int  line_no,
-                                    const char   *msg,
-                                    GString      *gs)
-{
-  serialize_line_no (line_no, gs);
-  g_string_append_printf (gs, "%s", msg);
-  g_string_append_c (gs, '\n');
-}
-void
-format_options_t::serialize_buffer_of_glyphs (hb_buffer_t  *buffer,
-                                             unsigned int  line_no,
-                                             const char   *text,
-                                             unsigned int  text_len,
-                                             hb_font_t    *font,
-                                             hb_bool_t     utf8_clusters,
-                                             GString      *gs)
-{
-  serialize_line_no (line_no, gs);
-  serialize_glyphs (buffer, font, utf8_clusters, gs);
-  g_string_append_c (gs, '\n');
-}
diff --git a/util/options.hh b/util/options.hh
deleted file mode 100644 (file)
index 9b7baa7..0000000
+++ /dev/null
@@ -1,368 +0,0 @@
-/*
- * Copyright © 2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#ifndef OPTIONS_HH
-#define OPTIONS_HH
-
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <stdlib.h>
-#include <stddef.h>
-#include <string.h>
-#include <stdio.h>
-#include <math.h>
-#include <locale.h>
-#include <errno.h>
-#include <fcntl.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h> /* for isatty() */
-#endif
-#ifdef HAVE_IO_H
-#include <io.h> /* for _setmode() under Windows */
-#endif
-
-#include <hb.h>
-#ifdef HAVE_OT
-#include <hb-ot.h>
-#endif
-#include <glib.h>
-#include <glib/gprintf.h>
-
-#undef MIN
-template <typename Type> static inline Type MIN (const Type &a, const Type &b) { return a < b ? a : b; }
-
-#undef MAX
-template <typename Type> static inline Type MAX (const Type &a, const Type &b) { return a > b ? a : b; }
-
-
-void fail (hb_bool_t suggest_help, const char *format, ...) G_GNUC_NORETURN;
-
-
-extern hb_bool_t debug;
-
-struct option_group_t
-{
-  virtual void add_options (struct option_parser_t *parser) = 0;
-
-  virtual void pre_parse (GError **error G_GNUC_UNUSED) {};
-  virtual void post_parse (GError **error G_GNUC_UNUSED) {};
-};
-
-
-struct option_parser_t
-{
-  option_parser_t (const char *usage) {
-    memset (this, 0, sizeof (*this));
-    usage_str = usage;
-    context = g_option_context_new (usage);
-
-    add_main_options ();
-  }
-  ~option_parser_t (void) {
-    g_option_context_free (context);
-  }
-
-  void add_main_options (void);
-
-  void add_group (GOptionEntry   *entries,
-                 const gchar    *name,
-                 const gchar    *description,
-                 const gchar    *help_description,
-                 option_group_t *option_group);
-
-  void parse (int *argc, char ***argv);
-
-  G_GNUC_NORETURN void usage (void) {
-    g_printerr ("Usage: %s [OPTION...] %s\n", g_get_prgname (), usage_str);
-    exit (1);
-  }
-
-  const char *usage_str;
-  GOptionContext *context;
-};
-
-
-#define DEFAULT_MARGIN 16
-#define DEFAULT_FORE "#000000"
-#define DEFAULT_BACK "#FFFFFF"
-#define DEFAULT_FONT_SIZE 256
-
-struct view_options_t : option_group_t
-{
-  view_options_t (option_parser_t *parser) {
-    annotate = false;
-    fore = DEFAULT_FORE;
-    back = DEFAULT_BACK;
-    line_space = 0;
-    margin.t = margin.r = margin.b = margin.l = DEFAULT_MARGIN;
-    font_size = DEFAULT_FONT_SIZE;
-
-    add_options (parser);
-  }
-
-  void add_options (option_parser_t *parser);
-
-  hb_bool_t annotate;
-  const char *fore;
-  const char *back;
-  double line_space;
-  struct margin_t {
-    double t, r, b, l;
-  } margin;
-  double font_size;
-};
-
-
-struct shape_options_t : option_group_t
-{
-  shape_options_t (option_parser_t *parser)
-  {
-    direction = language = script = NULL;
-    features = NULL;
-    num_features = 0;
-    shapers = NULL;
-    utf8_clusters = false;
-
-    add_options (parser);
-  }
-  ~shape_options_t (void)
-  {
-    free (features);
-    g_free (shapers);
-  }
-
-  void add_options (option_parser_t *parser);
-
-  void setup_buffer (hb_buffer_t *buffer)
-  {
-    hb_buffer_set_direction (buffer, hb_direction_from_string (direction, -1));
-    hb_buffer_set_script (buffer, hb_script_from_string (script, -1));
-    hb_buffer_set_language (buffer, hb_language_from_string (language, -1));
-  }
-
-  void populate_buffer (hb_buffer_t *buffer, const char *text, int text_len)
-  {
-    hb_buffer_reset (buffer);
-    hb_buffer_add_utf8 (buffer, text, text_len, 0, text_len);
-
-    if (!utf8_clusters) {
-      /* Reset cluster values to refer to Unicode character index
-       * instead of UTF-8 index. */
-      unsigned int num_glyphs = hb_buffer_get_length (buffer);
-      hb_glyph_info_t *info = hb_buffer_get_glyph_infos (buffer, NULL);
-      for (unsigned int i = 0; i < num_glyphs; i++)
-      {
-       info->cluster = i;
-       info++;
-      }
-    }
-
-    setup_buffer (buffer);
-  }
-
-  hb_bool_t shape (hb_font_t *font, hb_buffer_t *buffer)
-  {
-    return hb_shape_full (font, buffer, features, num_features, shapers);
-  }
-
-  void shape_closure (const char *text, int text_len,
-                     hb_font_t *font, hb_buffer_t *buffer,
-                     hb_set_t *glyphs)
-  {
-    hb_buffer_reset (buffer);
-    hb_buffer_add_utf8 (buffer, text, text_len, 0, text_len);
-    setup_buffer (buffer);
-    hb_ot_shape_glyphs_closure (font, buffer, features, num_features, glyphs);
-  }
-
-  const char *direction;
-  const char *language;
-  const char *script;
-  hb_feature_t *features;
-  unsigned int num_features;
-  char **shapers;
-  hb_bool_t utf8_clusters;
-};
-
-
-struct font_options_t : option_group_t
-{
-  font_options_t (option_parser_t *parser) {
-    font_file = NULL;
-    face_index = 0;
-
-    font = NULL;
-
-    add_options (parser);
-  }
-  ~font_options_t (void) {
-    hb_font_destroy (font);
-  }
-
-  void add_options (option_parser_t *parser);
-
-  hb_font_t *get_font (void) const;
-
-  const char *font_file;
-  int face_index;
-
-  private:
-  mutable hb_font_t *font;
-};
-
-
-struct text_options_t : option_group_t
-{
-  text_options_t (option_parser_t *parser) {
-    text = NULL;
-    text_file = NULL;
-
-    fp = NULL;
-    gs = NULL;
-    text_len = (unsigned int) -1;
-
-    add_options (parser);
-  }
-  ~text_options_t (void) {
-    if (gs)
-      g_string_free (gs, true);
-    if (fp)
-      fclose (fp);
-  }
-
-  void add_options (option_parser_t *parser);
-
-  void post_parse (GError **error G_GNUC_UNUSED) {
-    if (text && text_file)
-      g_set_error (error,
-                  G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE,
-                  "Only one of text and text-file can be set");
-
-  };
-
-  const char *get_line (unsigned int *len);
-
-  const char *text;
-  const char *text_file;
-
-  private:
-  FILE *fp;
-  GString *gs;
-  unsigned int text_len;
-};
-
-struct output_options_t : option_group_t
-{
-  output_options_t (option_parser_t *parser) {
-    output_file = NULL;
-    output_format = NULL;
-
-    fp = NULL;
-
-    add_options (parser);
-  }
-  ~output_options_t (void) {
-    if (fp)
-      fclose (fp);
-  }
-
-  void add_options (option_parser_t *parser);
-
-  void post_parse (GError **error G_GNUC_UNUSED)
-  {
-    if (output_file && !output_format) {
-      output_format = strrchr (output_file, '.');
-      if (output_format)
-         output_format++; /* skip the dot */
-    }
-
-    if (output_file && 0 == strcmp (output_file, "-"))
-      output_file = NULL; /* STDOUT */
-  }
-
-  FILE *get_file_handle (void);
-
-  const char *output_file;
-  const char *output_format;
-
-  mutable FILE *fp;
-};
-
-struct format_options_t : option_group_t
-{
-  format_options_t (option_parser_t *parser) {
-    show_glyph_names = true;
-    show_positions = true;
-    show_clusters = true;
-    show_text = false;
-    show_unicode = false;
-    show_line_num = false;
-
-    add_options (parser);
-  }
-
-  void add_options (option_parser_t *parser);
-
-  void serialize_unicode (hb_buffer_t  *buffer,
-                         GString      *gs);
-  void serialize_glyphs (hb_buffer_t  *buffer,
-                        hb_font_t    *font,
-                        hb_bool_t    utf8_clusters,
-                        GString      *gs);
-  void serialize_line_no (unsigned int  line_no,
-                         GString      *gs);
-  void serialize_buffer_of_text (hb_buffer_t  *buffer,
-                                unsigned int  line_no,
-                                const char   *text,
-                                unsigned int  text_len,
-                                hb_font_t    *font,
-                                hb_bool_t     utf8_clusters,
-                                GString      *gs);
-  void serialize_message (unsigned int  line_no,
-                         const char   *msg,
-                         GString      *gs);
-  void serialize_buffer_of_glyphs (hb_buffer_t  *buffer,
-                                  unsigned int  line_no,
-                                  const char   *text,
-                                  unsigned int  text_len,
-                                  hb_font_t    *font,
-                                  hb_bool_t     utf8_clusters,
-                                  GString      *gs);
-
-
-  hb_bool_t show_glyph_names;
-  hb_bool_t show_positions;
-  hb_bool_t show_clusters;
-  hb_bool_t show_text;
-  hb_bool_t show_unicode;
-  hb_bool_t show_line_num;
-};
-
-
-#endif
diff --git a/util/shape-consumer.hh b/util/shape-consumer.hh
deleted file mode 100644 (file)
index 220daa4..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright © 2011,2012  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "options.hh"
-
-#ifndef HB_SHAPE_CONSUMER_HH
-#define HB_SHAPE_CONSUMER_HH
-
-
-template <typename output_t>
-struct shape_consumer_t
-{
-  shape_consumer_t (option_parser_t *parser)
-                 : shaper (parser),
-                   output (parser) {}
-
-  void init (const font_options_t *font_opts)
-  {
-    font = hb_font_reference (font_opts->get_font ());
-    output.init (font_opts);
-    failed = false;
-  }
-  void consume_line (hb_buffer_t  *buffer,
-                    const char   *text,
-                    unsigned int  text_len)
-  {
-    output.new_line ();
-
-    shaper.populate_buffer (buffer, text, text_len);
-    output.consume_text (buffer, text, text_len, shaper.utf8_clusters);
-
-    if (!shaper.shape (font, buffer)) {
-      failed = true;
-      hb_buffer_set_length (buffer, 0);
-      output.shape_failed (buffer, text, text_len, shaper.utf8_clusters);
-      return;
-    }
-
-    output.consume_glyphs (buffer, text, text_len, shaper.utf8_clusters);
-  }
-  void finish (const font_options_t *font_opts)
-  {
-    output.finish (font_opts);
-    hb_font_destroy (font);
-    font = NULL;
-  }
-
-  public:
-  bool failed;
-
-  protected:
-  shape_options_t shaper;
-  output_t output;
-
-  hb_font_t *font;
-};
-
-
-#endif
diff --git a/util/view-cairo.cc b/util/view-cairo.cc
deleted file mode 100644 (file)
index 666013e..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright © 2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "view-cairo.hh"
-
-void
-view_cairo_t::get_surface_size (cairo_scaled_font_t *scaled_font,
-                               double *w, double *h)
-{
-  cairo_font_extents_t font_extents;
-
-  cairo_scaled_font_extents (scaled_font, &font_extents);
-
-  bool vertical = HB_DIRECTION_IS_VERTICAL (direction);
-  (vertical ? *w : *h) = (int) lines->len * (font_extents.height + view_options.line_space) - view_options.line_space;
-  (vertical ? *h : *w) = 0;
-  for (unsigned int i = 0; i < lines->len; i++) {
-    helper_cairo_line_t &line = g_array_index (lines, helper_cairo_line_t, i);
-    double x_advance, y_advance;
-    line.get_advance (&x_advance, &y_advance);
-    if (vertical)
-      *h =  MAX (*h, y_advance);
-    else
-      *w =  MAX (*w, x_advance);
-  }
-
-  *w += view_options.margin.l + view_options.margin.r;
-  *h += view_options.margin.t + view_options.margin.b;
-}
-
-void
-view_cairo_t::render (const font_options_t *font_opts)
-{
-  cairo_scaled_font_t *scaled_font = helper_cairo_create_scaled_font (font_opts, view_options.font_size);
-  double w, h;
-  get_surface_size (scaled_font, &w, &h);
-  cairo_t *cr = helper_cairo_create_context (w, h, &view_options, &output_options);
-  cairo_set_scaled_font (cr, scaled_font);
-  cairo_scaled_font_destroy (scaled_font);
-
-  draw (cr);
-
-  helper_cairo_destroy_context (cr);
-}
-
-void
-view_cairo_t::draw (cairo_t *cr)
-{
-  cairo_save (cr);
-
-  bool vertical = HB_DIRECTION_IS_VERTICAL (direction);
-  int v = vertical ? 1 : 0;
-  int h = vertical ? 0 : 1;
-  cairo_font_extents_t font_extents;
-  cairo_font_extents (cr, &font_extents);
-  cairo_translate (cr, view_options.margin.l, view_options.margin.t);
-  double descent;
-  if (vertical)
-    descent = font_extents.height * (lines->len + .5);
-  else
-    descent = font_extents.height - font_extents.ascent;
-  cairo_translate (cr, v * descent, h * -descent);
-  for (unsigned int i = 0; i < lines->len; i++)
-  {
-    helper_cairo_line_t &l = g_array_index (lines, helper_cairo_line_t, i);
-
-    if (i)
-      cairo_translate (cr, v * -view_options.line_space, h * view_options.line_space);
-
-    cairo_translate (cr, v * -font_extents.height, h * font_extents.height);
-
-    if (view_options.annotate) {
-      cairo_save (cr);
-
-      /* Draw actual glyph origins */
-      cairo_set_source_rgba (cr, 1., 0., 0., .5);
-      cairo_set_line_width (cr, 5);
-      cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND);
-      for (unsigned i = 0; i < l.num_glyphs; i++) {
-       cairo_move_to (cr, l.glyphs[i].x, l.glyphs[i].y);
-       cairo_rel_line_to (cr, 0, 0);
-      }
-      cairo_stroke (cr);
-
-      cairo_restore (cr);
-    }
-
-    if (0 && cairo_surface_get_type (cairo_get_target (cr)) == CAIRO_SURFACE_TYPE_IMAGE) {
-      /* cairo_show_glyphs() doesn't support subpixel positioning */
-      cairo_glyph_path (cr, l.glyphs, l.num_glyphs);
-      cairo_fill (cr);
-    } else if (l.num_clusters)
-      cairo_show_text_glyphs (cr,
-                             l.utf8, l.utf8_len,
-                             l.glyphs, l.num_glyphs,
-                             l.clusters, l.num_clusters,
-                             l.cluster_flags);
-    else
-      cairo_show_glyphs (cr, l.glyphs, l.num_glyphs);
-  }
-
-  cairo_restore (cr);
-}
diff --git a/util/view-cairo.hh b/util/view-cairo.hh
deleted file mode 100644 (file)
index c621984..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright © 2011  Google, Inc.
- *
- *  This is part of HarfBuzz, a text shaping library.
- *
- * Permission is hereby granted, without written agreement and without
- * license or royalty fees, to use, copy, modify, and distribute this
- * software and its documentation for any purpose, provided that the
- * above copyright notice and the following two paragraphs appear in
- * all copies of this software.
- *
- * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
- * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
- * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
- * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- *
- * Google Author(s): Behdad Esfahbod
- */
-
-#include "options.hh"
-#include "helper-cairo.hh"
-
-#ifndef VIEW_CAIRO_HH
-#define VIEW_CAIRO_HH
-
-
-struct view_cairo_t {
-  view_cairo_t (option_parser_t *parser)
-              : output_options (parser),
-                view_options (parser) {}
-  ~view_cairo_t (void) {
-    if (debug)
-      cairo_debug_reset_static_data ();
-  }
-
-  void init (const font_options_t *font_opts)
-  {
-    lines = g_array_new (false, false, sizeof (helper_cairo_line_t));
-    scale = double (view_options.font_size) / hb_face_get_upem (hb_font_get_face (font_opts->get_font ()));
-  }
-  void new_line (void)
-  {
-  }
-  void consume_text (hb_buffer_t  *buffer,
-                    const char   *text,
-                    unsigned int  text_len,
-                    hb_bool_t     utf8_clusters)
-  {
-  }
-  void shape_failed (hb_buffer_t  *buffer,
-                    const char   *text,
-                    unsigned int  text_len,
-                    hb_bool_t     utf8_clusters)
-  {
-    fail (false, "all shapers failed");
-  }
-  void consume_glyphs (hb_buffer_t  *buffer,
-                      const char   *text,
-                      unsigned int  text_len,
-                      hb_bool_t     utf8_clusters)
-  {
-    direction = hb_buffer_get_direction (buffer);
-    helper_cairo_line_t l;
-    helper_cairo_line_from_buffer (&l, buffer, text, text_len, scale, utf8_clusters);
-    g_array_append_val (lines, l);
-  }
-  void finish (const font_options_t *font_opts)
-  {
-    render (font_opts);
-
-    for (unsigned int i = 0; i < lines->len; i++) {
-      helper_cairo_line_t &line = g_array_index (lines, helper_cairo_line_t, i);
-      line.finish ();
-    }
-    g_array_unref (lines);
-  }
-
-  protected:
-
-  output_options_t output_options;
-  view_options_t view_options;
-
-  void render (const font_options_t *font_opts);
-  void get_surface_size (cairo_scaled_font_t *scaled_font, double *w, double *h);
-  void draw (cairo_t *cr);
-
-  hb_direction_t direction; // Remove this, make segment_properties accessible
-  GArray *lines;
-  double scale;
-};
-
-#endif