typedef Signal< void( const ScrollEdge )> WebEngineScrollEdgeReachedSignalType;
/**
+ * @brief The callback to be called when the web engine received a plain text of current web page.
+ */
+ using PlainTextReceivedCallback = std::function<void(const std::string&)>;
+
+ /**
* @brief Enumeration for the scroll edge.
*/
enum class ScrollEdge
* @return A signal object to connect with.
*/
virtual WebEngineScrollEdgeReachedSignalType& ScrollEdgeReachedSignal() = 0;
+
+ /**
+ * @brief Get a plain text of current web page asynchronously.
+ *
+ * @param[in] callback The callback function called asynchronously.
+ */
+ virtual void GetPlainTextAsynchronously(PlainTextReceivedCallback callback) = 0;
};
} // namespace Dali
return GetImplementation( *this ).ScrollEdgeReachedSignal();
}
+void WebEngine::GetPlainTextAsynchronously(Dali::WebEnginePlugin::PlainTextReceivedCallback callback)
+{
+ GetImplementation(*this).GetPlainTextAsynchronously(callback);
+}
+
} // namespace Dali
*/
Dali::WebEnginePlugin::WebEngineScrollEdgeReachedSignalType& ScrollEdgeReachedSignal();
+ /**
+ * @brief Get a plain text of current web page asynchronously.
+ *
+ * @param[in] callback The callback function called asynchronously.
+ */
+ void GetPlainTextAsynchronously(Dali::WebEnginePlugin::PlainTextReceivedCallback callback);
+
private: // Not intended for application developers
/**
* @brief Internal constructor
return mPlugin->ScrollEdgeReachedSignal();
}
+void WebEngine::GetPlainTextAsynchronously(Dali::WebEnginePlugin::PlainTextReceivedCallback callback)
+{
+ mPlugin->GetPlainTextAsynchronously(callback);
+}
+
} // namespace Adaptor;
} // namespace Internal;
} // namespace Dali;
*/
Dali::WebEnginePlugin::WebEngineScrollEdgeReachedSignalType& ScrollEdgeReachedSignal();
+ /**
+ * @copydoc Dali::WebEngine::GetPlainTextAsynchronously()
+ */
+ void GetPlainTextAsynchronously(Dali::WebEnginePlugin::PlainTextReceivedCallback callback);
+
private:
/**