#include "internal.h"
+namespace gallery {
+
+ using ucl::UInt;
+
+ using ucl::Result;
+ using ucl::RES_OK;
+ using ucl::RES_FALSE;
+ using ucl::RES_FAIL;
+ using ucl::RES_INVALID_ARGUMENTS;
+ using ucl::RES_ILLEGAL_STATE;
+ using ucl::RES_NOT_SUPPORTED;
+ using ucl::RES_INVALID_DATA;
+ using ucl::RES_FATAL;
+
+ using ucl::isEmpty;
+ using ucl::isNotEmpty;
+ using ucl::toEina;
+
+ using ucl::RefCountObj;
+ using ucl::RefCountObjBase;
+ using ucl::SharedRef;
+ using ucl::WeakRef;
+
+ using ucl::makeShared;
+ using ucl::dynamicRefCast;
+
+ namespace util {
+
+ using ucl::util::makeUnique;
+ }
+}
+
#endif // __GALLERY_COMMON_H__
#include "common.h"
-using namespace ucl;
-using namespace gallery;
+using ucl::UIApp;
+using gallery::InstanceManager;
int main(int argc, char *argv[])
{
namespace gallery {
- using namespace ucl;
-
BaseJob::BaseJob(const NotiHandler &onComplete,
const bool isCancelable) :
m_onComplete(onComplete),
namespace gallery {
- using namespace ucl;
-
Gallery::Gallery() :
m_isMediaDbConnected(false)
{
namespace gallery { namespace { namespace impl {
- using namespace ucl;
+ using ucl::TString;
const auto CONDITION = TString("%s=%d").format(
MEDIA_TYPE, MEDIA_CONTENT_TYPE_IMAGE);
namespace gallery {
- using namespace ucl;
+ using ucl::MutexLock;
GalleryAlbum::GalleryAlbum() :
m_pid(getpid()),
namespace gallery { namespace { namespace impl {
- using namespace ucl;
+ using ucl::AutoHandle;
const std::string MIME_PREFIX_IMAGE {"image/"};
const std::string MIME_PREFIX_VIDEO {"video/"};
namespace gallery {
- using namespace ucl;
+ using ucl::MutexLock;
// MediaItem::Remover //
return RES_FALSE;
}
- auto cbProxy = ucl::util::makeUnique(new ThumbCbProxy{this, cb});
+ auto cbProxy = util::makeUnique(new ThumbCbProxy{this, cb});
{
MutexLock lock(getMediaMutex());
namespace gallery {
- using namespace ucl;
-
SoundManagerSRef SoundManager::newInstance()
{
auto result = makeShared<SoundManager>();
namespace gallery {
- using namespace ucl;
+ using ucl::Mutex;
Mutex &getMediaMutex()
{
namespace gallery { namespace { namespace impl {
- using namespace ucl;
-
constexpr EoDataKey BTN_EVENT_DATA {"gallery,btn,event,data"};
constexpr ElmStyle POPUP_STYLE {"circle"};
namespace gallery {
- using namespace ucl;
+ using ucl::Layout;
+
+ using ucl::PART_TITLE;
// AlertDialog::Builder //
namespace gallery { namespace { namespace impl {
- using namespace ucl;
-
constexpr EoDataKey ATSPI_HELPER_DATA {"gallery,atspi,highlight,helper"};
}}}
namespace gallery {
- using namespace ucl;
+ using ucl::AtspiGestureEventInfo;
+
+ using ucl::ATSPI_ON_GESTURE;
AtspiHighlightHelperSRef AtspiHighlightHelper::newInstance(
ElmWidget &rootWidget)
namespace gallery {
- using namespace ucl;
+ using ucl::SysEvent;
+ using ucl::SysEventProvider;
+ using ucl::IInstanceContext;
+ using ucl::getResPath;
+
+ using ucl::Theme;
+ using ucl::Naviframe;
Instance::Instance(RefCountObjBase &rc,
SysEventProvider &sysEventProvider) :
#include "presenters/Instance.h"
+#include "common.h"
+
namespace gallery {
- using namespace ucl;
+ using ucl::AppParam;
+ using ucl::AppParams;
+ using ucl::IInstanceSRef;
InstanceManager::InstanceManager() :
InstanceManagerBase(AppParams().
namespace gallery { namespace { namespace impl {
- using namespace ucl;
-
constexpr SmartEvent MORE_OPENED {"more,option,opened"};
constexpr SmartEvent MORE_CLOSED {"more,option,closed"};
constexpr SmartEvent MORE_ITEM_CLICKED {"item,clicked"};
namespace gallery {
- using namespace ucl;
+ using ucl::Layout;
// MoreOptionsPresenter::Builder //
namespace gallery {
- using namespace ucl;
+ using ucl::Layout;
+ using ucl::NaviframeSRef;
+
+ using ucl::LAYOUT_NO_CONTENTS;
+ using ucl::PART_TITLE;
// NoContentPage::Builder //
namespace gallery { namespace { namespace impl {
- using namespace ucl;
-
constexpr SmartEvent TOP_PAGE_CHANGED {"ucl,top,page,changed"};
}}}
namespace gallery {
- using namespace ucl;
+ using ucl::NaviItem;
+ using ucl::NaviframeSRef;
+
+ using ucl::NAVI_TRANSITION_STARTED;
+ using ucl::NAVI_TRANSITION_FINISHED;
Page::Page(RefCountObjBase &rc, const NaviframeSRef &navi,
const ExitRequestHandler onExitRequest) :
namespace gallery { namespace { namespace impl {
- using namespace ucl;
-
constexpr SmartEvent ACTIVATE_BY {"gallery,activate,by"};
constexpr SmartEvent DEACTIVATE_BY {"gallery,deactivate,by"};
}}}
namespace gallery {
- using namespace ucl;
+ using ucl::Window;
Presenter::Presenter(RefCountObjBase &rc) :
RefCountAware(&rc),
namespace gallery {
- using namespace ucl;
+ using ucl::NaviframeSRef;
// PreviewPage::Builder //
namespace gallery { namespace { namespace impl {
- using namespace ucl;
-
constexpr auto IDLE_WAIT_TIME_SEC = 0.2;
constexpr auto PROCESSING_MIN_TIME_SEC = 0.5;
namespace gallery {
- using namespace ucl;
+ using ucl::Layout;
+
+ using ucl::PART_TEXT;
// ProcessingPresenter::Builder //
namespace gallery { namespace { namespace impl {
- using namespace ucl;
-
const TString SELECT_BTN_TEXT_FMT {"%d"};
constexpr ElmStyle SELECT_POPUP_STYLE {"select_mode"};
namespace gallery {
- using namespace ucl;
+ using ucl::WidgetItem;
// SelectModePresenter::Builder //
namespace gallery {
- using namespace ucl;
+ using ucl::NaviframeSRef;
// ThumbnailPage::Builder //
namespace gallery { namespace { namespace impl {
- using namespace ucl;
-
constexpr auto AUTO_START_TIMEOUT_SEC = 0.3;
constexpr auto CONTROLS_PLAYBACK_HIDE_TIMEOUT_SEC = 3.0;
constexpr auto CONTROLS_PAUSE_HIDE_TIMEOUT_SEC = 6.0;
namespace gallery {
- using namespace ucl;
+ using ucl::AutoAppCtrl;
+
+ using ucl::Layout;
+ using ucl::NaviframeSRef;
+ using ucl::StyledWidgetSRef;
+ using ucl::WidgetEventHandler;
// VideoPlayerPage::Builder //
namespace gallery {
- using namespace ucl;
+ using ucl::NaviframeSRef;
// ViewerPage::Builder //
m_imageViewer->setLowResImagePath(path);
}
- void ViewerPage::onZoomEnd(ucl::Widget &widget, void *eventInfo)
+ void ViewerPage::onZoomEnd(Widget &widget, void *eventInfo)
{
if (m_exitOnZoomOut && m_imageViewer->isZoomedOut()) {
requestExit();
namespace gallery { namespace { namespace impl {
- using namespace ucl;
-
constexpr EoDataKey INSTANCE_PTR {"gallery,instance,data,ptr"};
}}}
namespace gallery {
- using namespace ucl;
+ using ucl::Window;
- void setInstancePaused(ucl::Window &win, const bool value)
+ void setInstancePaused(Window &win, const bool value)
{
win.setData(impl::INSTANCE_PTR, reinterpret_cast<void *>(value));
win.callEvent((value ? INSTANCE_PAUSED : INSTANCE_RESUMED), nullptr);
}
- bool isInstancePaused(const ucl::Window &win)
+ bool isInstancePaused(const Window &win)
{
return (reinterpret_cast<intptr_t>(
win.getData(impl::INSTANCE_PTR)) != 0);
namespace gallery {
+ using ucl::TString;
+
// TODO replace with IDS in the future
- const ucl::TString STR_APP_NAME {"Gallery"};
- const ucl::TString STR_NO_PHOTOS {"No photos"};
- const ucl::TString STR_SELECT_ALL {"Select all"};
- const ucl::TString STR_DESELECT_ALL {"Deselect all"};
- const ucl::TString STR_DELETE {"Delete"};
- const ucl::TString STR_DELETE_CAPS {"DELETE"};
- const ucl::TString STR_DELETE_1_PHOTO {"Delete 1 photo?"};
- const ucl::TString STR_DELETE_N_PHOTO {"Delete %d photo?"};
- const ucl::TString STR_DELETING {"Deleting..."};
- const ucl::TString STR_DELETED {"Deleted."};
- const ucl::TString STR_FAILED {"Failed."};
- const ucl::TString STR_SAVE_TO_GEAR {"Save to Gear"};
- const ucl::TString STR_SAVING {"Saving..."};
- const ucl::TString STR_SAVED {"Saved."};
+ const TString STR_APP_NAME {"Gallery"};
+ const TString STR_NO_PHOTOS {"No photos"};
+ const TString STR_SELECT_ALL {"Select all"};
+ const TString STR_DESELECT_ALL {"Deselect all"};
+ const TString STR_DELETE {"Delete"};
+ const TString STR_DELETE_CAPS {"DELETE"};
+ const TString STR_DELETE_1_PHOTO {"Delete 1 photo?"};
+ const TString STR_DELETE_N_PHOTO {"Delete %d photo?"};
+ const TString STR_DELETING {"Deleting..."};
+ const TString STR_DELETED {"Deleted."};
+ const TString STR_FAILED {"Failed."};
+ const TString STR_SAVE_TO_GEAR {"Save to Gear"};
+ const TString STR_SAVING {"Saving..."};
+ const TString STR_SAVED {"Saved."};
}
namespace gallery { namespace { namespace impl {
- using namespace ucl;
-
// Related to ImageGrid //
const TString SLOT_PART_FMT {"swallow.cell_%d"};
namespace gallery {
- using namespace ucl;
+ using ucl::Layout;
+
+ using ucl::Timeout;
+ using ucl::ceilDiv;
// ImageGrid::Builder //
for (int i = m_slotCount; i < newSlotCount; ++i) {
const bool isOdd = ((m_beginSlotIndex + i) & 1);
- auto slot = ucl::util::makeUnique(new Slot(*this, isOdd));
+ auto slot = util::makeUnique(new Slot(*this, isOdd));
if (m_slotSize == 0) {
UCL_ASSERT(!isOdd, "Must be even!");
namespace gallery {
- using namespace ucl;
+ using ucl::LAYOUT_DEFAULT;
// ImageViewer::Builder //
namespace gallery { namespace { namespace impl {
- using namespace ucl;
-
constexpr LayoutTheme LAYOUT_MORE_OPTIONS
{"layout", "gallery", "more_options"};
namespace gallery {
- using namespace ucl;
+ using ucl::Layout;
+ using ucl::LayoutSRef;
+
+ using ucl::PART_BUTTON;
+ using ucl::PART_CONTENT;
+ using ucl::PART_ICON;
// PageContent::Builder //
// PageContent //
PageContent::PageContent(RefCountObjBase &rc,
- const ucl::LayoutSRef &layout, const int flags) :
+ const LayoutSRef &layout, const int flags) :
ElmWidget(&rc, *layout, true),
m_moreOptions(layout)
{
namespace gallery {
- using namespace ucl;
-
TouchParser::TouchParser(RefCountObjBase &rc, Widget &eventSource) :
RefCountAware(&rc),
m_holdTimer(nullptr),
#ifndef __GALLERY_VIEW_COMMON_H__
#define __GALLERY_VIEW_COMMON_H__
+#include "ucl/gui/StyledWidget.h"
#include "ucl/gui/stdTheme.h"
#include "ucl/gui/helpers.h"
namespace gallery {
+ using ucl::EdjePart;
+ using ucl::EdjeDataKey;
+ using ucl::EdjeSignal;
+ using ucl::EdjeSignalSrc;
+ using ucl::ElmStyle;
+ using ucl::SmartEvent;
+ using ucl::EoDataKey;
+ using ucl::LayoutTheme;
+ using ucl::WidgetEvent;
+ using ucl::WidgetARHint;
+
+ using ucl::TString;
+
+ UCL_USING_REF_ALIASES(ucl::Widget);
+ UCL_USING_REF_ALIASES(ucl::ElmWidget);
+ UCL_USING_REF_ALIASES(ucl::EdjeWidget);
+ UCL_USING_REF_ALIASES(ucl::StyledWidget);
+
constexpr ucl::SmartEvent BTN_CLICKED {"clicked"};
constexpr ucl::SmartEvent POPUP_DISMISSED {"dismissed"};
namespace gallery { namespace { namespace impl {
- using namespace ucl;
-
constexpr EoDataKey CIRCLE_SURFACE {"gallery,eext,circle,surface"};
constexpr LayoutTheme LAYOUT_FAKE_ACCESS_OBJECT
namespace gallery { namespace util {
- using namespace ucl;
+ using ucl::Layout;
+ using ucl::Naviframe;
Result createCircleSurface(Naviframe &navi)
{
namespace gallery {
- using namespace ucl;
-
void addRotaryEventHandler(Eext_Rotary_Handler_Cb func, void *data)
{
eext_rotary_event_handler_add(func, data);
using CLASS_NAME##SCRef = ::ucl::SharedRef<const CLASS_NAME>; \
using CLASS_NAME##WCRef = ::ucl::WeakRef<const CLASS_NAME>
+#define UCL_USING_REF_ALIASES(CLASS_NAME) \
+ using CLASS_NAME; \
+ using CLASS_NAME##SRef; \
+ using CLASS_NAME##WRef; \
+ using CLASS_NAME##SCRef; \
+ using CLASS_NAME##WCRef; \
+
#endif // __UCL_UTIL_MEMORY_MACRO_H__