*/
virtual bool isValid() const;
+ /**
+ * @copydoc UIObject::setIncludeHidden()
+ */
+ virtual void setIncludeHidden(bool enabled) const = 0;
+
+ /**
+ * @copydoc UIObject::getIncludeHidden()
+ */
+ virtual bool getIncludeHidden() const = 0;
+
public:
/**
* @brief Check Node support given interface or not.
*/
bool setValue(double value) override;
+ /**
+ * @copydoc AccessibleNode::setIncludeHidden()
+ */
+ void setIncludeHidden(bool enabled) const override;
+
+ /**
+ * @copydoc AccessibleNode::getIncludeHidden()
+ */
+ bool getIncludeHidden() const override;
+
private:
using AccessibleNode::setFeatureProperty;
static AtspiAccessibleNodeInfo *Atspi_accessible_get_node_info(AtspiAccessible *obj, GError **error);
static void Atspi_accessible_free_node_info(AtspiAccessibleNodeInfo *node_info);
static AtspiAccessible *Atspi_accessible_get_neighbor(AtspiAccessible *root, AtspiAccessible *start, AtspiNeighborSearchDirection direction, GError **error);
+ static void Atspi_accessible_set_include_hidden(AtspiAccessible *obj, gboolean enabled, GError **error);
+ static gboolean Atspi_accessible_get_include_hidden(AtspiAccessible *obj, GError **error);
private:
static std::recursive_mutex mMutex;
*/
bool setValue(double value) override;
+ /**
+ * @brief TBD
+ * @since_tizen 9.0
+ */
+ void setIncludeHidden(bool enabled) const override;
+
+ /**
+ * @brief TBD
+ * @since_tizen 9.0
+ */
+ bool getIncludeHidden() const override;
+
public:
using AccessibleNode::setFeatureProperty;
/**
*/
std::shared_ptr<UiObject> last() const;
+ /**
+ * @brief Sets object's include hidden flag.
+ *
+ * @since_tizen 9.0
+ */
+ void setIncludeHidden(bool enabled) const;
+
+ /**
+ * @brief Gets object's include hidden flag.
+ *
+ * @since_tizen 9.0
+ */
+ bool getIncludeHidden() const;
+
private:
std::shared_ptr<UiDevice> mDevice;
std::shared_ptr<UiSelector> mSelector;
}
return nullptr;
+}
+
+void AtspiAccessibleNode::setIncludeHidden(bool enabled) const
+{
+ if (!isValid()) {
+ return;
+ }
+ AtspiAccessible *app = AtspiWrapper::Atspi_accessible_get_application(mNode, NULL);
+ if (app) {
+ AtspiWrapper::Atspi_accessible_set_include_hidden(app, enabled, NULL);
+ g_object_unref(app);
+ }
+}
+
+bool AtspiAccessibleNode::getIncludeHidden() const
+{
+ if (!isValid()) {
+ return false;
+ }
+ AtspiAccessible *app = AtspiWrapper::Atspi_accessible_get_application(mNode, NULL);
+ if (app) {
+ bool ret = AtspiWrapper::Atspi_accessible_get_include_hidden(app, NULL);
+ g_object_unref(app);
+ return ret;
+ }
+
+ return false;
}
\ No newline at end of file
return atspi_accessible_get_neighbor(root, start, direction, error);
}
+void AtspiWrapper::Atspi_accessible_set_include_hidden(AtspiAccessible *obj, gboolean enabled, GError **error)
+{
+ std::unique_lock<std::recursive_mutex> lock(mMutex);
+ atspi_accessible_set_include_hidden(obj, enabled, error);
+}
+
+gboolean AtspiWrapper::Atspi_accessible_get_include_hidden(AtspiAccessible *obj, GError **error)
+{
+ std::unique_lock<std::recursive_mutex> lock(mMutex);
+ return atspi_accessible_get_include_hidden(obj, error);
+}
std::shared_ptr<AccessibleNode> MockAccessibleNode::last() const
{
return nullptr;
+}
+
+void MockAccessibleNode::setIncludeHidden(bool enabled) const
+{
+ return;
+}
+
+bool MockAccessibleNode::getIncludeHidden() const
+{
+ return false;
}
\ No newline at end of file
return std::make_shared<UiObject>(mDevice, mSelector, lastNode);
}
return nullptr;
+}
+
+void UiObject::setIncludeHidden(bool enabled) const {
+ mNode->setIncludeHidden(enabled);
+}
+
+bool UiObject::getIncludeHidden() const {
+ return mNode->getIncludeHidden();
}
\ No newline at end of file
::grpc::Status mouseMove(::grpc::ServerContext *context,
const ::aurum::ReqMouseMove *request,
::aurum::RspMouseMove *response) override;
+ ::grpc::Status setIncludeHidden(::grpc::ServerContext *context,
+ const ::aurum::ReqSetIncludeHidden *request,
+ ::aurum::RspSetIncludeHidden *response) override;
+ ::grpc::Status getIncludeHidden(::grpc::ServerContext *context,
+ const ::aurum::ReqGetIncludeHidden *request,
+ ::aurum::RspGetIncludeHidden *response) override;
public:
int WAIT_TIMEOUT_MS;
};
#include "Commands/MouseDownCommand.h"
#include "Commands/MouseMoveCommand.h"
#include "Commands/MouseUpCommand.h"
+#include "Commands/SetIncludeHiddenCommand.h"
+#include "Commands/GetIncludeHiddenCommand.h"
--- /dev/null
+/*
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * 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.
+ *
+ */
+
+#include "bootstrap.h"
+
+class GetIncludeHiddenCommand : public Command {
+private:
+ const ::aurum::ReqGetIncludeHidden *mRequest;
+ ::aurum::RspGetIncludeHidden *mResponse;
+
+public:
+ GetIncludeHiddenCommand(const ::aurum::ReqGetIncludeHidden *request,
+ ::aurum::RspGetIncludeHidden *response);
+ ::grpc::Status execute() override;
+};
--- /dev/null
+/*
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * 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.
+ *
+ */
+
+#include "bootstrap.h"
+
+class SetIncludeHiddenCommand : public Command {
+private:
+ const ::aurum::ReqSetIncludeHidden *mRequest;
+ ::aurum::RspSetIncludeHidden *mResponse;
+
+public:
+ SetIncludeHiddenCommand(const ::aurum::ReqSetIncludeHidden *request,
+ ::aurum::RspSetIncludeHidden *response);
+ ::grpc::Status execute() override;
+};
files('src/Commands/MouseDownCommand.cc'),
files('src/Commands/MouseMoveCommand.cc'),
files('src/Commands/MouseUpCommand.cc'),
+ files('src/Commands/SetIncludeHiddenCommand.cc'),
+ files('src/Commands/GetIncludeHiddenCommand.cc'),
]
bootstrap_svr_dep = [
{
std::unique_ptr<MouseMoveCommand> cmd = std::make_unique<MouseMoveCommand>(request, response);
return execute(cmd.get(), false);
+}
+
+::grpc::Status aurumServiceImpl::setIncludeHidden(::grpc::ServerContext *context,
+ const ::aurum::ReqSetIncludeHidden *request,
+ ::aurum::RspSetIncludeHidden *response)
+{
+ std::unique_ptr<SetIncludeHiddenCommand> cmd = std::make_unique<SetIncludeHiddenCommand>(request, response);
+ return execute(cmd.get(), false);
+}
+
+::grpc::Status aurumServiceImpl::getIncludeHidden(::grpc::ServerContext *context,
+ const ::aurum::ReqGetIncludeHidden *request,
+ ::aurum::RspGetIncludeHidden *response)
+{
+ std::unique_ptr<GetIncludeHiddenCommand> cmd = std::make_unique<GetIncludeHiddenCommand>(request, response);
+ return execute(cmd.get(), false);
}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * 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.
+ *
+ */
+
+#include "GetIncludeHiddenCommand.h"
+#include "UiObject.h"
+
+GetIncludeHiddenCommand::GetIncludeHiddenCommand(const ::aurum::ReqGetIncludeHidden *request,
+ ::aurum::RspGetIncludeHidden *response)
+ : mRequest{request}, mResponse{response}
+{
+}
+
+::grpc::Status GetIncludeHiddenCommand::execute()
+{
+ LOGI("GetIncludeHidden--------------- ");
+
+ ObjectMapper *mObjMap = ObjectMapper::getInstance();
+ std::shared_ptr<UiObject> obj = mObjMap->getElement(mRequest->elementid());
+ if (obj) {
+ mResponse->set_enabled(obj->getIncludeHidden());
+ mResponse->set_status(::aurum::RspStatus::OK);
+ } else {
+ mResponse->set_status(::aurum::RspStatus::ERROR);
+ }
+
+ return grpc::Status::OK;
+}
--- /dev/null
+/*
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * 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.
+ *
+ */
+
+#include "SetIncludeHiddenCommand.h"
+#include "UiObject.h"
+
+SetIncludeHiddenCommand::SetIncludeHiddenCommand(const ::aurum::ReqSetIncludeHidden *request,
+ ::aurum::RspSetIncludeHidden *response)
+ : mRequest{request}, mResponse{response}
+{
+}
+
+::grpc::Status SetIncludeHiddenCommand::execute()
+{
+ LOGI("SetIncludeHidden--------------- ");
+
+ ObjectMapper *mObjMap = ObjectMapper::getInstance();
+ std::shared_ptr<UiObject> obj = mObjMap->getElement(mRequest->elementid());
+ if (obj) obj->setIncludeHidden(mRequest->enabled());
+
+ mResponse->set_status(::aurum::RspStatus::OK);
+
+ return grpc::Status::OK;
+}
rpc mouseDown(ReqMouseDown) returns (RspMouseDown) {}
rpc mouseMove(ReqMouseMove) returns (RspMouseMove) {}
rpc mouseUp(ReqMouseUp) returns (RspMouseUp) {}
+ rpc setIncludeHidden(ReqSetIncludeHidden) returns (RspSetIncludeHidden) {}
+ rpc getIncludeHidden(ReqGetIncludeHidden) returns (RspGetIncludeHidden) {}
}
// ------------------------------------ //
RspStatus status = 1;
Element element = 2;
}
+
+message ReqSetIncludeHidden {
+ string elementId = 1;
+ bool enabled = 2;
+}
+
+message RspSetIncludeHidden {
+ RspStatus status = 1;
+}
+
+message ReqGetIncludeHidden {
+ string elementId = 1;
+}
+
+message RspGetIncludeHidden {
+ RspStatus status = 1;
+ bool enabled = 2;
+}