From 1339d453fc828879513acd3a2cac48d66df8aff9 Mon Sep 17 00:00:00 2001 From: guthadam Date: Wed, 9 Jun 2021 13:21:59 -0500 Subject: [PATCH] Adding PAL implementation for Linux --- .../Platform/Linux/MaterialEditor_Linux.cpp | 42 +++++++++++++++++++ .../Linux/MaterialEditor_Traits_Linux.h | 15 +++++++ .../Linux/MaterialEditor_Traits_Platform.h | 14 +++++++ .../Platform/Linux/platform_linux_files.cmake | 3 ++ 4 files changed, 74 insertions(+) create mode 100644 Gems/Atom/Tools/MaterialEditor/Code/Source/Platform/Linux/MaterialEditor_Linux.cpp create mode 100644 Gems/Atom/Tools/MaterialEditor/Code/Source/Platform/Linux/MaterialEditor_Traits_Linux.h create mode 100644 Gems/Atom/Tools/MaterialEditor/Code/Source/Platform/Linux/MaterialEditor_Traits_Platform.h diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Platform/Linux/MaterialEditor_Linux.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Platform/Linux/MaterialEditor_Linux.cpp new file mode 100644 index 0000000000..6a83c8c6de --- /dev/null +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Platform/Linux/MaterialEditor_Linux.cpp @@ -0,0 +1,42 @@ +/* +* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates, or +* a third party where indicated. +* +* For complete copyright and license terms please see the LICENSE at the root of this +* distribution (the "License"). All use of this software is governed by the License, +* or, if provided, by the license below or the license accompanying this file. Do not +* remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* +*/ + +#include +#include +#include + +namespace Platform +{ + void LoadPluginDependencies() + { + AZ_Warning("Material Editor", false, "LoadPluginDependencies() function is not implemented"); + } + + void ProcessInput(void* message) + { + AZ_Warning("Material Editor", false, "ProcessInput() function is not implemented"); + } + + AzFramework::NativeWindowHandle GetWindowHandle(WId winId) + { + AZ_Warning("Material Editor", false, "GetWindowHandle() function is not implemented"); + AZ_UNUSED(winId); + return nullptr; + } + + AzFramework::WindowSize GetClientAreaSize(AzFramework::NativeWindowHandle window) + { + AZ_Warning("Material Editor", false, "GetClientAreaSize() function is not implemented"); + AZ_UNUSED(window); + return AzFramework::WindowSize{1,1}; + } +} diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Platform/Linux/MaterialEditor_Traits_Linux.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Platform/Linux/MaterialEditor_Traits_Linux.h new file mode 100644 index 0000000000..6f4eee610a --- /dev/null +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Platform/Linux/MaterialEditor_Traits_Linux.h @@ -0,0 +1,15 @@ +/* +* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or +* its licensors. +* +* For complete copyright and license terms please see the LICENSE at the root of this +* distribution (the "License"). All use of this software is governed by the License, +* or, if provided, by the license below or the license accompanying this file. Do not +* remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* +*/ +#pragma once + +#define AZ_TRAIT_MATERIALEDITOR_EXT "" + diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Platform/Linux/MaterialEditor_Traits_Platform.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Platform/Linux/MaterialEditor_Traits_Platform.h new file mode 100644 index 0000000000..9cd502877d --- /dev/null +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Platform/Linux/MaterialEditor_Traits_Platform.h @@ -0,0 +1,14 @@ +/* +* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or +* its licensors. +* +* For complete copyright and license terms please see the LICENSE at the root of this +* distribution (the "License"). All use of this software is governed by the License, +* or, if provided, by the license below or the license accompanying this file. Do not +* remove or modify any license notices. This file is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* +*/ +#pragma once + +#include diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Platform/Linux/platform_linux_files.cmake b/Gems/Atom/Tools/MaterialEditor/Code/Source/Platform/Linux/platform_linux_files.cmake index 5714be5dfb..038a605109 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Platform/Linux/platform_linux_files.cmake +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Platform/Linux/platform_linux_files.cmake @@ -10,4 +10,7 @@ # set(FILES + MaterialEditor_Traits_Platform.h + MaterialEditor_Traits_Linux.h + MaterialEditor_Linux.cpp )