Skip to content

Commit

Permalink
[NUI] sync dali codes (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouleonlei authored and elishateng committed Nov 21, 2019
1 parent 850112b commit f6875a8
Show file tree
Hide file tree
Showing 323 changed files with 81,810 additions and 77,830 deletions.
Original file line number Diff line number Diff line change
@@ -1,89 +1,89 @@
#ifndef DALI_INTEGRAION_ACCESSIBILITY_GESTURE_STRUCTS_H
#define DALI_INTEGRAION_ACCESSIBILITY_GESTURE_STRUCTS_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.
*
*/

// INTERNAL INCLUDES
#include <dali/public-api/events/gesture.h>
#include <dali/public-api/math/vector2.h>

namespace Dali
{

struct AccessibilityGestureEvent
{
// Construction & Destruction

/**
* Virtual destructor
*/
~AccessibilityGestureEvent()
{
}

// Data

/**
* The previous touch position of the primary touch point in screen coordinates.
*/
Vector2 previousPosition;

/**
* This current touch position of the primary touch point in screen coordinates.
*/
Vector2 currentPosition;

/**
* The time difference between the previous and latest touch motion events (in ms).
*/
unsigned long timeDelta;

/**
* The total number of fingers touching the screen in a pan gesture.
*/
unsigned int numberOfTouches;

enum State
{
Clear, ///< There is no state associated with this gesture. @SINCE_1_0.0
Started, ///< The touched points on the screen have moved enough to be considered a gesture. @SINCE_1_0.0
Continuing, ///< The gesture is continuing. @SINCE_1_0.0
Finished, ///< The user has lifted a finger or touched an additional point on the screen. @SINCE_1_0.0
Cancelled, ///< The gesture has been cancelled. @SINCE_1_0.0
Possible ///< A gesture is possible. @SINCE_1_0.0
};

State state;

uint32_t time;

/**
* Default Constructor
* @param[in] state The state of the gesture
*/
AccessibilityGestureEvent(AccessibilityGestureEvent::State state)
: timeDelta( 0 ),
numberOfTouches( 0 ),
state( state ),
time( 0 )
{}
};

} // namespace Dali

#endif // DALI_INTEGRAION_ACCESSIBILITY_GESTURE_STRUCTS_H
#ifndef DALI_INTEGRAION_ACCESSIBILITY_GESTURE_STRUCTS_H
#define DALI_INTEGRAION_ACCESSIBILITY_GESTURE_STRUCTS_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.
*
*/

// INTERNAL INCLUDES
#include <dali/public-api/events/gesture.h>
#include <dali/public-api/math/vector2.h>

namespace Dali
{

struct AccessibilityGestureEvent
{
// Construction & Destruction

/**
* Virtual destructor
*/
~AccessibilityGestureEvent()
{
}

// Data

/**
* The previous touch position of the primary touch point in screen coordinates.
*/
Vector2 previousPosition;

/**
* This current touch position of the primary touch point in screen coordinates.
*/
Vector2 currentPosition;

/**
* The time difference between the previous and latest touch motion events (in ms).
*/
unsigned long timeDelta;

/**
* The total number of fingers touching the screen in a pan gesture.
*/
unsigned int numberOfTouches;

enum State
{
Clear, ///< There is no state associated with this gesture. @SINCE_1_0.0
Started, ///< The touched points on the screen have moved enough to be considered a gesture. @SINCE_1_0.0
Continuing, ///< The gesture is continuing. @SINCE_1_0.0
Finished, ///< The user has lifted a finger or touched an additional point on the screen. @SINCE_1_0.0
Cancelled, ///< The gesture has been cancelled. @SINCE_1_0.0
Possible ///< A gesture is possible. @SINCE_1_0.0
};

State state;

uint32_t time;

/**
* Default Constructor
* @param[in] state The state of the gesture
*/
AccessibilityGestureEvent(AccessibilityGestureEvent::State state)
: timeDelta( 0 ),
numberOfTouches( 0 ),
state( state ),
time( 0 )
{}
};

} // namespace Dali

#endif // DALI_INTEGRAION_ACCESSIBILITY_GESTURE_STRUCTS_H
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,9 @@

// INTERNAL INCLUDES
#include <dali/devel-api/adaptor-framework/application-devel.h>
#include <dali/integration-api/adaptor-framework/scene-holder.h>
#include <dali/internal/adaptor/common/application-impl.h>

#ifdef DALI_ADAPTOR_COMPILATION
#include <dali/integration-api/scene-holder.h>
#else
#include <dali/integration-api/adaptors/scene-holder.h>
#endif

namespace Dali
{

Expand Down
114 changes: 57 additions & 57 deletions Dali/dali-adaptor/dali/devel-api/adaptor-framework/file-stream.cpp
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
/*
* 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.
*/

// CLASS HEADER
#include <dali/devel-api/adaptor-framework/file-stream.h>

// EXTERNAL INCLUDES

// INTERNAL INCLUDES
#include <dali/internal/adaptor-framework/common/file-stream-impl.h>

namespace Dali
{

FileStream::FileStream(const std::string& filename, uint8_t mode)
{
mImpl.reset( new Impl( filename, mode ) );
}

FileStream::FileStream(uint8_t* buffer, size_t dataSize, uint8_t mode)
{
mImpl.reset( new Impl( buffer, dataSize, mode ) );
}

FileStream::FileStream(Dali::Vector<uint8_t>& buffer, size_t dataSize, uint8_t mode)
{
mImpl.reset( new Impl( buffer, dataSize, mode ) );
}

FileStream::~FileStream() = default;

FileStream& FileStream::operator=(FileStream&&) = default;

std::iostream& FileStream::GetStream()
{
return mImpl->GetStream();
}

FILE* FileStream::GetFile()
{
return mImpl->GetFile();
}

} // Dali
/*
* 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.
*/

// CLASS HEADER
#include <dali/devel-api/adaptor-framework/file-stream.h>

// EXTERNAL INCLUDES

// INTERNAL INCLUDES
#include <dali/internal/adaptor-framework/common/file-stream-impl.h>

namespace Dali
{

FileStream::FileStream(const std::string& filename, uint8_t mode)
{
mImpl.reset( new Impl( filename, mode ) );
}

FileStream::FileStream(uint8_t* buffer, size_t dataSize, uint8_t mode)
{
mImpl.reset( new Impl( buffer, dataSize, mode ) );
}

FileStream::FileStream(Dali::Vector<uint8_t>& buffer, size_t dataSize, uint8_t mode)
{
mImpl.reset( new Impl( buffer, dataSize, mode ) );
}

FileStream::~FileStream() = default;

FileStream& FileStream::operator=(FileStream&&) = default;

std::iostream& FileStream::GetStream()
{
return mImpl->GetStream();
}

FILE* FileStream::GetFile()
{
return mImpl->GetFile();
}

} // Dali
Loading

0 comments on commit f6875a8

Please sign in to comment.