# Excluded tizen v3.0 wayland on tv profile build
# TODO: Please remove following code block once wayland build is supported.
+#%if "%{?_with_wayland}" == "1"
+#ExcludeArch: armv7l i586 i686 x86_64 aarch64
+#%endif
+
%if "%{?_with_wayland}" == "1"
-ExcludeArch: armv7l i586 i686 x86_64 aarch64
+BuildRequires: pkgconfig(ecore-wayland)
+%else
+BuildRequires: pkgconfig(ecore-x)
+BuildRequires: pkgconfig(utilX)
%endif
BuildRequires: pkgconfig(sqlite3)
BuildRequires: pkgconfig(ecore-evas)
BuildRequires: pkgconfig(ecore-imf)
BuildRequires: pkgconfig(ecore-input)
-BuildRequires: pkgconfig(ecore-x)
BuildRequires: pkgconfig(edje)
BuildRequires: pkgconfig(eeze)
BuildRequires: pkgconfig(eina)
BuildRequires: pkgconfig(elementary)
BuildRequires: pkgconfig(embryo)
BuildRequires: pkgconfig(evas)
-#BuildRequires: pkgconfig(ewebkit2)
BuildRequires: pkgconfig(chromium-efl)
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(capi-appfw-application)
BuildRequires: pkgconfig(capi-network-connection)
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(libcurl)
-BuildRequires: pkgconfig(utilX)
BuildRequires: browser-provider-devel
BuildRequires: cmake
BuildRequires: boost-test
%endif
%ifarch armv7l
-#BuildRequires: pkgconfig(ewebkit2)
BuildRequires: pkgconfig(chromium-efl)
BuildRequires: pkgconfig(dlog)
%endif
-DMANIFESTDIR=%{_manifestdir} \
-DICONDIR=%{_icondir} \
-DBUILD_UT=%{BUILD_UT} \
- -DCOVERAGE_STATS=%{COVERAGE_STATS}
+ -DCOVERAGE_STATS=%{COVERAGE_STATS} \
+%if "%{?_with_wayland}" == "1"
+ -DWAYLAND_SUPPORT=On
+%else
+ -DWAYLAND_SUPPORT=Off
+%endif
make %{!?verbose_make}%{?verbose_make:VERBOSE=1} -j%{?jobs}%{!?jobs:1}
#include <algorithm>
#include <Elementary.h>
#include <Ecore.h>
-#include <Ecore_X.h>
#include <Edje.h>
#include <Evas.h>
#include "Config.h"
{
elm_init(static_cast<int>(NULL), static_cast<char**>(NULL));
Evas_Object *main_window = elm_win_util_standard_add("browserApp", "browserApp");
+ if (main_window == NULL)
+ BROWSER_LOGE("Failed to create main window");
// m_zoomList = NULL;
setMainWindow(main_window);
}
elm_win_alpha_set(m_window.get(), EINA_FALSE);
// creatin main window
- int width = 0;
- int height = 0;
- ecore_x_window_size_get(ecore_x_window_root_first_get(), &width, &height);
- evas_object_move(m_window.get(), 0, 0);
- evas_object_resize(m_window.get(), width, height);
+ //int width = 1920;
+ //int height = 1080;
+ //ecore_x_window_size_get(ecore_x_window_root_first_get(), &width, &height);
+ //evas_object_move(m_window.get(), 0, 0);
+ //evas_object_resize(m_window.get(), width, height);
// create main layout
m_mainLayout = elm_layout_add(m_window.get());
(tizen_browser::core::ServiceManager::getInstance().getService("org.tizen.browser.historyservice"));
M_ASSERT(m_historyService);
-
+/*
// Platforminputmanager
BROWSER_LOGD("[%s:%d] service: platforminputmanager ", __PRETTY_FUNCTION__, __LINE__);
m_platformInputManager =
M_ASSERT(m_platformInputManager);
m_platformInputManager->init(m_window.get());
m_platformInputManager->returnPressed.connect(boost::bind(&elm_exit));
-
+*/
createActions();
// left buttons
leftButtonBar = std::make_shared<ButtonBar>(m_mainLayout, "SimpleUI/LeftButtonBar.edj", "left_button_bar");
m_showSettingsPopup = sharedAction(new Action("Settings"));
m_showSettingsPopup->setToolTip("Settings");
m_showSettingsPopup->setIcon("browser/toolbar_setting");
-
+/*
m_settingPointerMode = sharedAction(new Action("Pointer mode"));
m_settingPointerMode->setToolTip("Switch to Pointer Mode");
m_settingPointerMode->setCheckable(true);
m_settingPointerMode->setChecked(m_platformInputManager->getPointerModeEnabled());
m_settingPointerMode->setEnabled(true);
-
+*/
m_settingPrivateBrowsing = sharedAction(new Action("Private browsing"));
m_settingPrivateBrowsing->setToolTip("On exit from private mode all cookies, history, and stored data will be deleted");
m_settingPrivateBrowsing->setCheckable(true);
m_history->triggered.connect(boost::bind(&SimpleUI::showHistory, this));
m_showSettingsPopup->triggered.connect(boost::bind(&SimpleUI::showSettingsMenu, this));
- m_settingPointerMode->toggled.connect(boost::bind(&tizen_browser::services::PlatformInputManager::setPointerModeEnabled, m_platformInputManager.get(), _1));
+// m_settingPointerMode->toggled.connect(boost::bind(&tizen_browser::services::PlatformInputManager::setPointerModeEnabled, m_platformInputManager.get(), _1));
m_settingPrivateBrowsing->toggled.connect(boost::bind(&SimpleUI::settingsPrivateModeSwitch, this, _1));
m_settingDeleteHistory->triggered.connect(boost::bind(&SimpleUI::settingsDeleteHistory, this));
m_settingDeleteData->triggered.connect(boost::bind(&SimpleUI::settingsDeleteData, this));;
webTitleBar->removeFavIcon();
webTitleBar->show("Removed from favorites");
}
-
+/*
void SimpleUI::onReturnPressed(MenuButton *m)
{
BROWSER_LOGD("[%s]", __func__);
hidePopup.disconnect_all_slots();
m->hidePopup();
}
-
+*/
void SimpleUI::backEnable(bool enable)
{
m_back->setEnabled(enable);
m_webEngine->getFavicon()));
m_history->setEnabled(true);
}
-
+/*
if(!m_platformInputManager->getPointerModeEnabled())
elm_object_focus_set(leftButtonBar->getButton("refresh_stop_button"), EINA_TRUE);
+*/
}
void SimpleUI::loadError()
m_zoomList->setZoom(currentZoomType);
BROWSER_LOGD("Current zoom factor from webkit %d%%", m_webEngine->getZoomFactor());
- m_platformInputManager->returnPressed.disconnect_all_slots();
- m_platformInputManager->returnPressed.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_zoomList.get()));
- hidePopup.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_zoomList.get()));
+// m_platformInputManager->returnPressed.disconnect_all_slots();
+// m_platformInputManager->returnPressed.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_zoomList.get()));
+// hidePopup.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_zoomList.get()));
m_zoomList->showPopup();
}
m_tabList->tabClicked.connect(boost::bind(&SimpleUI::tabClicked, this, _1));
m_tabList->tabDelete.connect(boost::bind(&SimpleUI::closeTab, this, _1));
- m_platformInputManager->rightPressed.connect(boost::bind(&TabList::rightPressed, m_tabList.get()));
- m_platformInputManager->leftPressed.connect(boost::bind(&TabList::leftPressed, m_tabList.get()));
- m_platformInputManager->enterPressed.connect(boost::bind(&TabList::enterPressed, m_tabList.get()));
+// m_platformInputManager->rightPressed.connect(boost::bind(&TabList::rightPressed, m_tabList.get()));
+// m_platformInputManager->leftPressed.connect(boost::bind(&TabList::leftPressed, m_tabList.get()));
+// m_platformInputManager->enterPressed.connect(boost::bind(&TabList::enterPressed, m_tabList.get()));
}
- m_platformInputManager->returnPressed.disconnect_all_slots();
- m_platformInputManager->returnPressed.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_tabList.get()));
- hidePopup.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_tabList.get()));
+// m_platformInputManager->returnPressed.disconnect_all_slots();
+// m_platformInputManager->returnPressed.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_tabList.get()));
+// hidePopup.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_tabList.get()));
m_tabList->addItems(m_webEngine->getTabContents());
m_tabList->setCurrentTabId(m_webEngine->currentTabId());
m_tabList->disableNewTabBtn(m_tabList->getItemcCount() >= m_tabLimit);
m_settings->addAction( m_settingDeleteFavorite);
m_settingPointerMode->toggled.connect(boost::bind(&tizen_browser::base_ui::Settings::setPointerModeEnabled, m_settings.get(), _1));
}
- m_platformInputManager->returnPressed.disconnect_all_slots();
- m_platformInputManager->returnPressed.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_settings.get()));
- hidePopup.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_settings.get()));
+// m_platformInputManager->returnPressed.disconnect_all_slots();
+// m_platformInputManager->returnPressed.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_settings.get()));
+// hidePopup.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_settings.get()));
m_settingDeleteHistory->setEnabled(m_historyService->getHistoryItemsCount());
m_settingDeleteFavorite->setEnabled(m_favoriteService->countBookmarksAndSubFolders());
m_settings->showPopup();
m_historyList->deleteHistoryItem.connect(boost::bind(&tizen_browser::services::HistoryService::clearURLHistory, m_historyService.get(),_1));
m_historyList->deleteHistoryItem.connect(boost::bind(&SimpleUI::hideHistory, this));
- m_platformInputManager->rightPressed.connect(boost::bind(&HistoryList::rightPressed, m_historyList.get()));
- m_platformInputManager->leftPressed.connect(boost::bind(&HistoryList::leftPressed, m_historyList.get()));
- m_platformInputManager->enterPressed.connect(boost::bind(&HistoryList::enterPressed, m_historyList.get()));
+// m_platformInputManager->rightPressed.connect(boost::bind(&HistoryList::rightPressed, m_historyList.get()));
+// m_platformInputManager->leftPressed.connect(boost::bind(&HistoryList::leftPressed, m_historyList.get()));
+// m_platformInputManager->enterPressed.connect(boost::bind(&HistoryList::enterPressed, m_historyList.get()));
}
- m_platformInputManager->returnPressed.disconnect_all_slots();
- m_platformInputManager->returnPressed.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_historyList.get()));
- hidePopup.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_historyList.get()));
+// m_platformInputManager->returnPressed.disconnect_all_slots();
+// m_platformInputManager->returnPressed.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_historyList.get()));
+// hidePopup.connect(boost::bind(&SimpleUI::onReturnPressed, this, m_historyList.get()));
m_historyList->addItems(m_historyService->getHistoryItems());
m_historyList->showPopup();
}