X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Fdali-toolkit-test-utils%2Ftoolkit-clipboard-event-notifier.h;h=282a0c05de11a401130a3415a688bf96703ca348;hp=4cb9a982538642d7bd2c055ece4324a6403d23b7;hb=b694e7e2ae624e206e1548b1a863c554eb9cd4d7;hpb=fa6279fb2830427d5ab569ca14e6ade1557ef2fa diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-clipboard-event-notifier.h b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-clipboard-event-notifier.h index 4cb9a98..282a0c0 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-clipboard-event-notifier.h +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-clipboard-event-notifier.h @@ -1,27 +1,31 @@ -#ifndef __DALI_TOOLKIT_CLIPBOARD_EVENT_NOTIFIER_H__ -#define __DALI_TOOLKIT_CLIPBOARD_EVENT_NOTIFIER_H__ - -// -// Copyright (c) 2014 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://floralicense.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 DALI_TOOLKIT_CLIPBOARD_EVENT_NOTIFIER_H +#define DALI_TOOLKIT_CLIPBOARD_EVENT_NOTIFIER_H + +/* + * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0 + * + * 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. + * + */ // EXTERNAL INCLUDES #include // PUBLIC INCLUDES -#include +#define DALI_CLIPBOARD_EVENT_NOTIFIER_H +#include +#include + namespace Dali { @@ -34,35 +38,25 @@ class ClipboardEventNotifier; } } -/** - * This creates a stubbed ClipboardEventNotifier so that internal Toolkit Adaptor calls work. - */ -class ToolkitClipboardEventNotifier +class ClipboardEventNotifier : public BaseHandle { -public: // Constants - -public: // Construction & Destruction - - ToolkitClipboardEventNotifier(); - ~ToolkitClipboardEventNotifier(); - -public: // Getters - - ClipboardEventNotifier GetClipboardEventNotifier(); - -public: // Signal Emissions +public: + typedef Signal< void ( ClipboardEventNotifier& ) > ClipboardEventSignalType; - ClipboardEventNotifier::ClipboardEventSignalV2& SignalContentSelected(); + ClipboardEventNotifier(); + static ClipboardEventNotifier Get(); + ~ClipboardEventNotifier(); -public: // TEST FUNCTIONS + const std::string& GetContent() const; + void SetContent( const std::string& content ); + void ClearContent(); -private: + void EmitContentSelectedSignal(); + ClipboardEventSignalType& ContentSelectedSignal(); - Internal::Adaptor::ClipboardEventNotifier* mClipboardEventNotifierStub; - friend class Internal::Adaptor::ClipboardEventNotifier; - ClipboardEventNotifier mClipboardEventNotifier; // Hold a handle ourselves. + ClipboardEventNotifier( Internal::Adaptor::ClipboardEventNotifier* notifier ); }; } // namespace Dali -#endif // __DALI_TOOLKIT_TOOLKIT_CLIPBOARD_EVENT_NOTIFIER_H__ +#endif // DALI_TOOLKIT_TOOLKIT_CLIPBOARD_EVENT_NOTIFIER_H