void SmilPage::playAnimation(bool play)
{
- if(m_pImageItem && m_pImageItem->hasAnimation())
+ if (m_pImageItem && m_pImageItem->hasAnimation())
m_pImageItem->playAnimation(play);
}
const MsgMedia *SmilPage::getMedia(const MsgPage &page, MsgMedia::Type type) const
{
const MsgMediaList &list = page.getMediaList();
- for(int i = 0; i < list.getLength(); ++i)
+ for (int i = 0; i < list.getLength(); ++i)
{
- if(list[i].getType() == type)
+ if (list[i].getType() == type)
return &list[i];
}
return nullptr;
bool SmilPage::isEmpty(const MsgPage &page)
{
const MsgMediaList &list = page.getMediaList();
- for(int i = 0; i < list.getLength(); ++i)
+ for (int i = 0; i < list.getLength(); ++i)
{
const MsgMedia &media = list[i];
std::string filePath = media.getFilePath();
- if(media.getType() != MsgMedia::UnknownType && FileUtils::getFileSize(filePath) > 0)
+ if (media.getType() != MsgMedia::UnknownType && FileUtils::getFileSize(filePath) > 0)
return false;
}
return true;
m_Duration = page.getPageDuration() / 1000.0 + 0.5;
const MsgMediaList &list = page.getMediaList();
- for(int i = 0; i < list.getLength(); ++i)
+ for (int i = 0; i < list.getLength(); ++i)
{
m_Attachments.push_back(list[i].getFilePath());
}
const MsgMedia *video = getMedia(page, MsgMedia::VideoType);
- if(video)
+ if (video)
buildVideo(*video);
else
{
const MsgMedia *image = getMedia(page, MsgMedia::ImageType);
- if(image)
+ if (image)
buildImage(*image);
}
const MsgMedia *text = getMedia(page, MsgMedia::TextType);
- if(text)
+ if (text)
buildText(*text);
- if(!video)
+ if (!video)
{
const MsgMedia *audio = getMedia(page, MsgMedia::AudioType);
- if(audio)
+ if (audio)
buildAudio(*audio);
}
- if(m_Duration <= 0)
+ if (m_Duration <= 0)
m_Duration = defaultPageDuration;
MSG_LOG("Page duration: ", m_Duration);
{
m_Duration = defaultPageDuration;
- for(int i = 0; i < list.getLength(); ++i)
+ for (int i = 0; i < list.getLength(); ++i)
{
m_Attachments.push_back(list[i].getFilePath());
}
- if(list.isEmpty())
+ if (list.isEmpty())
return;
buildAttachmentInfo(list.getLength());
buildSaveAllItem(list.getLength());
- for(int i = 0; i < list.getLength(); ++i)
+ for (int i = 0; i < list.getLength(); ++i)
{
buildAttachment(list[i]);
}
void SmilPage::buildText(const MsgMedia& media)
{
std::string text = FileUtils::readTextFile(media.getFilePath());
- if(!text.empty())
+ if (!text.empty())
{
SmilTextItemView *item = new SmilTextItemView(getBox(), text);
item->show();
m_HasAudio = true;
int duration = MediaUtils::getDurationSec(m_MediaPath);
- if(duration == 0)
+ if (duration == 0)
{
m_HasInvalidFiles = true;
return;
}
- if(m_Duration == 0)
+ if (m_Duration == 0)
m_Duration = duration;
SmilAudioItemView *item = new SmilAudioItemView(getBox(), media.getFileName());
m_MediaPath = media.getFilePath();
int duration = MediaUtils::getDurationSec(m_MediaPath);
- if(duration == 0)
+ if (duration == 0)
{
m_HasInvalidFiles = true;
return;
}
- if(m_Duration == 0)
+ if (m_Duration == 0)
m_Duration = duration;
int width = 0;
int height = 0;
MediaUtils::getFrameSize(m_MediaPath, width, height);
- if(width * height == 0)
+ if (width * height == 0)
{
MSG_LOG_ERROR("Wrong video dimension");
m_HasInvalidFiles = true;
void SmilPage::onSaveButtonClicked(SmilAttachmentItemView &item)
{
MSG_LOG("");
- if(FileUtils::saveFileToStorage(item.getFilePath()))
+ if (FileUtils::saveFileToStorage(item.getFilePath()))
notification_status_message_post(msg("IDS_MSGF_POP_SAVED_IN_MY_FILES").cStr());
}
void SmilPage::onItemClicked(SmilSaveAllItemView &item)
{
MSG_LOG("");
- if(!m_Attachments.empty() && FileUtils::saveFilesToStorage(m_Attachments))
+ if (!m_Attachments.empty() && FileUtils::saveFilesToStorage(m_Attachments))
notification_status_message_post(msg("IDS_MSGF_POP_SAVED_IN_MY_FILES").cStr());
}
SmilPlayer::~SmilPlayer()
{
-
}
void SmilPlayer::create(const MessageMms &mms)
{
// Pages:
const MsgPageList &pages = mms.getPageList();
- for(int i = 0; i < pages.getLength(); ++i)
+ for (int i = 0; i < pages.getLength(); ++i)
{
const MsgPage &page = pages[i];
- if(!SmilPage::isEmpty(page))
+ if (!SmilPage::isEmpty(page))
{
SmilPage *smilPage = new SmilPage(getEo(), page);
m_Duration += smilPage->getDuration();
}
// Attachment:
- if(!mms.getAttachmentList().isEmpty())
+ if (!mms.getAttachmentList().isEmpty())
{
SmilPage *smilPage = new SmilPage(getEo(), mms.getAttachmentList());
m_Duration += smilPage->getDuration();
m_PageList.push_back(smilPage);
}
- if(!m_PageList.empty())
+ if (!m_PageList.empty())
displayPage(**m_PageList.begin());
}
void SmilPlayer::startTimer(int sec)
{
- if(m_pTimer)
+ if (m_pTimer)
{
ecore_timer_del(m_pTimer);
m_pTimer = nullptr;
void SmilPlayer::pauseTimer()
{
- if(m_pTimer)
+ if (m_pTimer)
ecore_timer_freeze(m_pTimer);
}
void SmilPlayer::continueTimer()
{
- if(m_pTimer)
+ if (m_pTimer)
ecore_timer_thaw(m_pTimer);
}
MSG_LOG("");
++m_PageTickCounter;
- if(m_pListener)
+ if (m_pListener)
m_pListener->onSmilPlayerTick();
- if(m_PageTickCounter >= getCurrentPage()->getDuration())
+ if (m_PageTickCounter >= getCurrentPage()->getDuration())
{
m_pTimer = nullptr;
- if(!nextPage())
+ if (!nextPage())
stop();
return false;
}
void SmilPlayer::setState(State state)
{
- if(m_State != state)
+ if (m_State != state)
{
m_State = state;
- if(m_pListener)
+ if (m_pListener)
m_pListener->onSmilPlayerStateChanged();
}
}
void SmilPlayer::start()
{
- if(m_pTimer)
+ if (m_pTimer)
{
- if(canPlay(getCurrentPage()))
+ if (canPlay(getCurrentPage()))
{
MSG_LOG("Continue");
setState(PlayState);
continueTimer();
startMedia();
}
- }
- else
- {
+ } else {
MSG_LOG("Restart");
reset();
- if(canPlay(getCurrentPage()))
+ if (canPlay(getCurrentPage()))
{
setState(PlayState);
playPage();
bool SmilPlayer::playPage()
{
SmilPage *page = getCurrentPage();
- if(!page)
+ if (!page)
return false;
SmilPlayerView::displayPage(*page);
startTimer(page->getDuration());
- if(page->hasMedia())
+ if (page->hasMedia())
{
prepareMedia();
- if(!canPlay(page))
+ if (!canPlay(page))
{
stop();
showUnableToPlayNotif(*page);
startMedia();
}
- if(page->hasInvalidFiles())
+ if (page->hasInvalidFiles())
showNotSupportedFileNotif();
- if(m_pListener)
+ if (m_pListener)
m_pListener->onSmilPlayerPageChanged();
return true;
void SmilPlayer::prepareMedia()
{
- if(m_MediaPlayer)
+ if (m_MediaPlayer)
{
m_MediaPlayer->stop();
m_MediaPlayer->setPosition(0);
}
SmilPage *page = getCurrentPage();
- if(page->hasMedia())
+ if (page->hasMedia())
{
- if(!m_MediaPlayer)
+ if (!m_MediaPlayer)
{
m_MediaPlayer.reset(new MediaPlayer);
m_MediaPlayer->setListener(this);
void SmilPlayer::stopMedia()
{
- if(m_MediaPlayer)
+ if (m_MediaPlayer)
m_MediaPlayer->pause();
SmilPage *page = getCurrentPage();
- if(page)
+ if (page)
page->playAnimation(false);
}
bool SmilPlayer::canPlay(SmilPage *page)
{
- if(!page)
+ if (!page)
return false;
- if(page->hasMedia() && m_MediaPlayer && !m_MediaPlayer->getFocus())
+ if (page->hasMedia() && m_MediaPlayer && !m_MediaPlayer->getFocus())
{
showUnableToPlayNotif(*page);
return false;
void SmilPlayer::startMedia()
{
SmilPage *page = getCurrentPage();
- if(!page)
+ if (!page)
return;
- if(page->hasMedia() && m_MediaPlayer)
+ if (page->hasMedia() && m_MediaPlayer)
m_MediaPlayer->start();
page->playAnimation(true);
}
double SmilPlayer::getPosition() const
{
unsigned pos = 0;
- for(unsigned i = 0; i < m_CurrentPageIndex; ++i)
+ for (unsigned i = 0; i < m_CurrentPageIndex; ++i)
{
pos += m_PageList[i]->getDuration();
}
bool SmilPlayer::nextPage()
{
- if(probeNextPage())
+ if (probeNextPage())
{
stopMedia();
++m_CurrentPageIndex;
bool SmilPlayer::prevPage()
{
- if(probePrevPage())
+ if (probePrevPage())
{
stopMedia();
--m_CurrentPageIndex;
void SmilPlayer::showUnableToPlayNotif(SmilPage &page)
{
- if(page.hasVideo())
+ if (page.hasVideo())
showUnableToPlayVideoNotif();
- else if(page.hasAudio())
+ else if (page.hasAudio())
showUnableToPlayAudioNotif();
}
m_pListener = nullptr;
stop();
- for(SmilPage *page : m_PageList)
+ for (SmilPage *page : m_PageList)
{
page->destroy();
}
- if(m_pTimer)
+ if (m_pTimer)
{
ecore_timer_del(m_pTimer);
m_pTimer = nullptr;
void SmilPlayer::onMediaPlayerSoundFocusChanged()
{
- if(m_MediaPlayer->isPlaying() && !m_MediaPlayer->getFocus())
+ if (m_MediaPlayer->isPlaying() && !m_MediaPlayer->getFocus())
{
SmilPage *page = getCurrentPage();
- if(page)
+ if (page)
{
- if(page->hasMedia())
+ if (page->hasMedia())
{
showUnableToPlayNotif(*page);
stop();
getNaviBar().clear();
getNaviBar().setColor(NaviBar::NaviBlueColorId);
getNaviBar().showButton(NaviPrevButtonId, true);
- if(m_Msg->getAddressList().getLength() > 1)
+ if (m_Msg->getAddressList().getLength() > 1)
getNaviBar().showButton(NaviExpandButtonId, true);
FrameController::setNaviBarTitle(m_Msg->getAddressList());
}
void Viewer::updateRecipPanel()
{
- if(m_pRecipPanel)
+ if (m_pRecipPanel)
m_pRecipPanel->update(m_Msg->getAddressList());
}
void Viewer::create(MsgId id)
{
m_Msg = std::dynamic_pointer_cast<MessageMms>(getMsgEngine().getStorage().getMessage(id));
- if(!m_Msg)
+ if (!m_Msg)
{
MSG_LOG_ERROR("Can't get message by id");
// Create empty message:
void Viewer::createLayout()
{
- if(!m_pLayout)
+ if (!m_pLayout)
{
m_pLayout = new ViewerLayout(getParent());
m_pLayout->setListener(this);
void Viewer::createSubjectLayout()
{
- if(!m_pSubjectLayout)
+ if (!m_pSubjectLayout)
{
int numberOfPages = m_pSmilPlayer ? m_pSmilPlayer->getPages().size() : 0;
m_pSubjectLayout = new SubjectLayout(*m_pLayout);
void Viewer::createPlayerControl()
{
- if(!m_pPlayerControl)
+ if (!m_pPlayerControl)
{
m_pPlayerControl = new PlayerControl(*m_pLayout);
void Viewer::createRecipPanel()
{
- if(!m_pRecipPanel && m_Msg->getAddressList().getLength() > 1)
+ if (!m_pRecipPanel && m_Msg->getAddressList().getLength() > 1)
{
m_pRecipPanel = new MbeRecipients(*m_pLayout, getApp());
m_pRecipPanel->addSmartCb("item,clicked", SMART_CALLBACK(Viewer, onRecipItemClicked), this);
void Viewer::createSmilPlayer()
{
- if(!m_pSmilPlayer)
+ if (!m_pSmilPlayer)
{
m_pSmilPlayer = new SmilPlayer(*m_pLayout, *m_Msg);
m_pSmilPlayer->setListener(this);
void Viewer::naviExpandButtonHandler()
{
MSG_LOG("");
- if(m_pRecipPanel)
+ if (m_pRecipPanel)
{
bool isRecipInvisible = !m_pLayout->isRecipientsVisible();
m_pLayout->showRecipients(isRecipInvisible);
void Viewer::naviCenterButtonHandler()
{
MSG_LOG("");
- if(m_pRecipPanel)
+ if (m_pRecipPanel)
{
naviExpandButtonHandler();
- }
- else
- {
+ } else {
const MsgAddressList &addressList = m_Msg->getAddressList();
- if(!addressList.isEmpty())
+ if (!addressList.isEmpty())
recipientClickHandler(addressList[0].getAddress());
}
}
{
PopupList &popup = getApp().getPopupManager().getPopupList();
popup.setTitle(address);
- if(MsgUtils::isValidNumber(address))
+ if (MsgUtils::isValidNumber(address))
popup.appendItem(msg("IDS_MSG_OPT_MAKE_VOICE_CALL"), POPUPLIST_ITEM_PRESSED_CB(Viewer, onMakeVoiceItemPressed), this);
popup.appendItem(msg("IDS_MSG_OPT_CREATE_CONTACT_ABB"), POPUPLIST_ITEM_PRESSED_CB(Viewer, onCreateContactItemPressed), this);
popup.appendItem(msg("IDS_MSG_OPT_UPDATE_CONTACT"), POPUPLIST_ITEM_PRESSED_CB(Viewer, onUpdateContactItemPressed), this);
MSG_LOG("");
m_SelectedAddress = address;
ContactAddressRef contactAddress = getApp().getContactManager().getContactAddress(address);
- if(contactAddress)
+ if (contactAddress)
ContactViewer::getInst().launch(*contactAddress);
else
showRecipPopup(address);
void Viewer::updateSubject()
{
- if(m_pSubjectLayout)
+ if (m_pSubjectLayout)
{
std::string subject = m_Msg->getSubject();
- if(subject.empty())
+ if (subject.empty())
subject = msg("IDS_MSGF_BODY_NO_SUBJECT");
m_pSubjectLayout->setSubjectText(subject);
}
auto playPauseState = PlayerControl::PauseState;
bool isPlaying = m_pSmilPlayer->getState() == SmilPlayer::PlayState;
- if(m_pSmilPlayer->getState() == SmilPlayer::StopState)
+ if (m_pSmilPlayer->getState() == SmilPlayer::StopState)
playPauseState = PlayerControl::PlayState;
m_pPlayerControl->setPlayState(playPauseState);
PopupList &popup = getApp().getPopupManager().getMorePopup();
popup.appendItem(msg("IDS_MSG_OPT_DELETE"), POPUPLIST_ITEM_PRESSED_CB(Viewer, onDeleteItemPressed), this);
- if(!m_Msg->getText().empty())
+ if (!m_Msg->getText().empty())
popup.appendItem(msg("IDS_MSG_OPT_COPY_TEXT"), POPUPLIST_ITEM_PRESSED_CB(Viewer, onCopyTextItemPressed), this);
popup.appendItem(msg("IDS_MSGF_OPT_FORWARD"), POPUPLIST_ITEM_PRESSED_CB(Viewer, onForwardItemPressed), this);
bool hasAttachment = !m_Msg->getAttachmentList().isEmpty() || m_Msg->getMediaCount() > 0;
- if(hasAttachment)
+ if (hasAttachment)
popup.appendItem(msg("IDS_MSG_OPT_SAVE_ATTACHMENTS_ABB"), POPUPLIST_ITEM_PRESSED_CB(Viewer, onSaveAttachmentsItemPressed), this);
popup.show();
void Viewer::onButtonClicked(NaviFrameItem &item, NaviButtonId buttonId)
{
MSG_LOG("");
- switch(buttonId)
+ switch (buttonId)
{
case NaviCenterButtonId:
naviCenterButtonHandler();
void Viewer::onMsgStorageDelete(const MsgIdList &msgIdList)
{
MSG_LOG("");
- if(m_Msg)
+ if (m_Msg)
{
MsgId id = m_Msg->getId();
- if(std::find(msgIdList.begin(), msgIdList.end(), id) != msgIdList.end())
+ if (std::find(msgIdList.begin(), msgIdList.end(), id) != msgIdList.end())
pop();
}
}
void Viewer::onPause()
{
MSG_LOG("");
- if(m_pSmilPlayer)
+ if (m_pSmilPlayer)
m_pSmilPlayer->stop();
}
, m_StreamInfo()
{
sound_manager_create_stream_information(SOUND_STREAM_TYPE_MEDIA, on_sound_stream_focus_state_changed_cb, this, &m_StreamInfo);
- if(m_StreamInfo)
+ if (m_StreamInfo)
{
player_create(&m_Player);
- if(m_Player)
+ if (m_Player)
{
player_set_sound_type(m_Player, SOUND_TYPE_MEDIA);
player_set_volume(m_Player, 1.0, 1.0);
m_pListener = nullptr;
stop();
- if(m_StreamInfo)
+ if (m_StreamInfo)
sound_manager_destroy_stream_information(m_StreamInfo);
- if(m_Player)
+ if (m_Player)
{
player_unprepare(m_Player);
player_destroy(m_Player);
int flags = 0;
char *extraInfo = nullptr;
- if(sound_manager_get_current_playback_focus(&acquiredBy, &flags, &extraInfo) == SOUND_MANAGER_ERROR_NONE)
+ if (sound_manager_get_current_playback_focus(&acquiredBy, &flags, &extraInfo) == SOUND_MANAGER_ERROR_NONE)
{
free(extraInfo);
return acquiredBy != SOUND_STREAM_FOCUS_CHANGED_BY_RINGTONE &&
void MediaPlayer::start()
{
sound_manager_acquire_focus(m_StreamInfo, SOUND_STREAM_FOCUS_FOR_PLAYBACK, nullptr);
- if(getState() == PLAYER_STATE_IDLE)
+ if (getState() == PLAYER_STATE_IDLE)
player_prepare(m_Player);
- if(getState() != PLAYER_STATE_PLAYING)
+ if (getState() != PLAYER_STATE_PLAYING)
player_start(m_Player);
}
{
sound_manager_release_focus(m_StreamInfo, SOUND_STREAM_FOCUS_FOR_PLAYBACK, nullptr);
player_state_e state = getState();
- if(state == PLAYER_STATE_PLAYING || state == PLAYER_STATE_PAUSED)
+ if (state == PLAYER_STATE_PLAYING || state == PLAYER_STATE_PAUSED)
player_stop(m_Player);
}
void MediaPlayer::pause()
{
- if(getState() == PLAYER_STATE_PLAYING)
+ if (getState() == PLAYER_STATE_PLAYING)
player_pause(m_Player);
}
void MediaPlayer::setPosition(int msec)
{
player_state_e state = getState();
- if(state == PLAYER_STATE_PLAYING || state == PLAYER_STATE_PAUSED || state == PLAYER_STATE_READY)
+ if (state == PLAYER_STATE_PLAYING || state == PLAYER_STATE_PAUSED || state == PLAYER_STATE_READY)
player_set_play_position(m_Player, msec, true, on_seek_cb, this);
}
int MediaPlayer::getDuration(const std::string &uri)
{
int msec = 0;
- if(!uri.empty())
+ if (!uri.empty())
{
player_h player = {};
player_create(&player);
- if(player_set_uri(player, uri.c_str()) == PLAYER_ERROR_NONE)
+ if (player_set_uri(player, uri.c_str()) == PLAYER_ERROR_NONE)
{
player_prepare(player);
player_get_duration(player, &msec);
void MediaPlayer::on_completed_cb(void *user_data)
{
IMediaPlayerListener *l = static_cast<MediaPlayer*>(user_data)->m_pListener;
- if(l)
+ if (l)
l->onMediaPlayerCompleted();
}
[](void *data)
{
auto *self = (MediaPlayer*)data;
- if(self->m_pListener)
+ if (self->m_pListener)
self->m_pListener->onMediaPlayerSoundFocusChanged();
},
- self
- );
-
+ self);
}
{
const char *groupName = "player";
const char *prevCb = "prev_clicked";
- const char *playCb= "play_clicked";
+ const char *playCb = "play_clicked";
const char *pauseCb = "pause_clicked";
const char *nextCb = "next_clicked";
const char *progressSwl = "progress_area";
PlayerControl::~PlayerControl()
{
-
}
void PlayerControl::setListener(IPlayerControlListener *l)
void PlayerControl::onPlay(Evas_Object *obj, const char *emission, const char *source)
{
- if(m_pListener)
+ if (m_pListener)
m_pListener->onPlayClicked();
}
void PlayerControl::onPause(Evas_Object *obj, const char *emission, const char *source)
{
- if(m_pListener)
+ if (m_pListener)
m_pListener->onPauseClicked();
}
void PlayerControl::onNext(Evas_Object *obj, const char *emission, const char *source)
{
- if(m_pListener)
+ if (m_pListener)
m_pListener->onNextClicked();
}
void PlayerControl::onPrev(Evas_Object *obj, const char *emission, const char *source)
{
- if(m_pListener)
+ if (m_pListener)
m_pListener->onPrevClicked();
}
[] (void *data, Evas_Object *obj, void *event_info)
{
auto *self = (SmilAttachmentItemView*)data;
- if(self->m_pListener)
+ if (self->m_pListener)
self->m_pListener->onItemClicked(*self);
},
- this
- );
+ this);
evas_object_show(m_pFileButton);
// Save button:
[] (void *data, Evas_Object *obj, void *event_info)
{
auto *self = (SmilAttachmentItemView*)data;
- if(self->m_pListener)
+ if (self->m_pListener)
self->m_pListener->onSaveButtonClicked(*self);
},
- this
- );
+ this);
evas_object_show(m_pSaveButton);
elm_box_pack_end(box, m_pFileButton);
SmilAttachmentItemView::~SmilAttachmentItemView()
{
-
}
void SmilAttachmentItemView::setListener(ISmilAttachmentItemViewListener *l)
setContent(entry, layoutSwallowContent);
- if(manyAttachments)
+ if (manyAttachments)
setText(entry, msgt("IDS_MSGF_POP_HELP_PAGE_MESSAGE"));
else
setText(entry, msgt("IDS_MSGF_POP_HELP_PAGE_MESSAGE_FOR_ONE_FILE"));
[] (void *data, Evas_Object *obj, void *event_info)
{
auto *self = (SmilSaveAllItemView*)data;
- if(self->m_pListener)
+ if (self->m_pListener)
self->m_pListener->onItemClicked(*self);
},
- this
- );
+ this);
evas_object_show(m_pButton);
setContent(m_pButton, layoutSwallowContent);
}
SmilSaveAllItemView::~SmilSaveAllItemView()
{
-
}
void SmilSaveAllItemView::setListener(ISmilSaveAllItemViewListener *l)
SmilImageItemView::~SmilImageItemView()
{
-
}
Evas_Object *SmilImageItemView::getImage() const
void SmilImageItemView::playAnimation(bool play)
{
- if(hasAnimation())
+ if (hasAnimation())
elm_image_animated_play_set(m_pImage, play);
}
Evas_Object *SmilImageItemView::createImage(Evas_Object *parent, const std::string &imagePath)
{
m_pImage = elm_image_add(parent);
- if(!elm_image_file_set(m_pImage, imagePath.c_str(), nullptr))
+ if (!elm_image_file_set(m_pImage, imagePath.c_str(), nullptr))
{
evas_object_del(m_pImage);
m_pImage = nullptr;
evas_object_size_hint_min_set(m_pImage, ELM_SCALE_SIZE(w), ELM_SCALE_SIZE(h));
evas_object_size_hint_max_set(m_pImage, ELM_SCALE_SIZE(w), ELM_SCALE_SIZE(h));
- if(elm_image_animated_available_get(m_pImage))
+ if (elm_image_animated_available_get(m_pImage))
elm_image_animated_set(m_pImage, true);
return m_pImage;
SmilPageLayout::~SmilPageLayout()
{
-
}
Evas_Object *SmilPageLayout::getBox() const
SmilPlayerView::~SmilPlayerView()
{
-
}
void SmilPlayerView::displayPage(Evas_Object *page)
{
Eina_List *list = elm_box_children_get(getEo());
- if(list)
+ if (list)
{
Eina_List *l = nullptr;
void *obj = nullptr;
evas_object_show(entry);
char *markupText = elm_entry_utf8_to_markup(text.c_str());
- if(markupText)
+ if (markupText)
{
elm_entry_entry_set(entry, markupText);
free(markupText);
{
bool isLandscape = contentW > contentH;
- if(isLandscape)
+ if (isLandscape)
{
w = viewerMaxWidth;
h = viewerMaxWidth * contentH / contentW;
- if(h > viewerMaxHeight)
+ if (h > viewerMaxHeight)
{
w = viewerMaxHeight * contentW / contentH;
h = viewerMaxHeight;
}
- }
- else
- {
+ } else {
w = viewerMaxHeight * contentH / contentW;
h = viewerMaxHeight;
- if(w > viewerMaxWidth)
+ if (w > viewerMaxWidth)
{
w = viewerMaxWidth;
h = viewerMaxWidth * contentW / contentH;
int w = 0;
int h = 0;
- if(videoWidth > 0 && videoHeight > 0)
+ if (videoWidth > 0 && videoHeight > 0)
getResizedSize(videoWidth, videoHeight, w, h);
setEo(addLayout(parent, SMIL_ITEM_EDJ_PATH, "smil_video_item"));
SmilVideoItemView::~SmilVideoItemView()
{
-
}
Evas_Object *SmilVideoItemView::getVideoSink() const
SubjectLayout::~SubjectLayout()
{
-
}
Evas_Object *SubjectLayout::createLayout(Evas_Object *parent)
[](void *data, void *event_info)->Evas_Event_Flags
{
ViewerLayout *self = static_cast<ViewerLayout*>(data);
- if(self->m_pListener)
+ if (self->m_pListener)
self->m_pListener->onLayoutTap();
return EVAS_EVENT_FLAG_NONE;
},
- this
- );
+ this);
setContent(button, touchAreaPart);
}
ViewerLayout::~ViewerLayout()
{
-
}
void ViewerLayout::setListener(IViewerLayoutListener *l)