Let's just use 1 PD_API header
This commit is contained in:
@@ -36,12 +36,12 @@ namespace BitUtil {
|
||||
* @param v 32 bit unsigned int
|
||||
* @return true if its a single bit number
|
||||
*/
|
||||
PD_CORE_API bool IsSingleBit(u32 v);
|
||||
PD_API bool IsSingleBit(u32 v);
|
||||
/**
|
||||
* Get the Next Power of two Number
|
||||
* @param v Current Number
|
||||
* @return Next Number thats a Pow of 2
|
||||
*/
|
||||
PD_CORE_API u32 GetPow2(u32 v);
|
||||
PD_API u32 GetPow2(u32 v);
|
||||
} // namespace BitUtil
|
||||
} // namespace PD
|
||||
@@ -27,7 +27,7 @@ SOFTWARE.
|
||||
#include <pd/core/strings.hpp>
|
||||
|
||||
namespace PD {
|
||||
class PD_CORE_API Color {
|
||||
class PD_API Color {
|
||||
public:
|
||||
/**
|
||||
* Default Constructor (all variables are set to 0)
|
||||
|
||||
@@ -42,7 +42,7 @@ SOFTWARE.
|
||||
#include <vector>
|
||||
|
||||
/** Dynamic Lib loading */
|
||||
#include <pd/core/pd_p_api.hpp>
|
||||
#include <pd/pd_p_api.hpp>
|
||||
|
||||
/** Memory Management */
|
||||
|
||||
|
||||
@@ -35,28 +35,28 @@ namespace IO {
|
||||
* @param path Path to the File
|
||||
* @return 8Bit FileBuffer
|
||||
*/
|
||||
PD_CORE_API std::vector<u8> LoadFile2Mem(const std::string& path);
|
||||
PD_API std::vector<u8> LoadFile2Mem(const std::string& path);
|
||||
/**
|
||||
* Load a File into a std::string
|
||||
* @param path Path to the File
|
||||
* @return std::string file content
|
||||
*/
|
||||
PD_CORE_API std::string LoadFile2Str(const std::string& path);
|
||||
PD_API std::string LoadFile2Str(const std::string& path);
|
||||
/**
|
||||
* Hash a 8Bit Memory Buffer
|
||||
* @param data 8Bit input Buffer
|
||||
* @return 32Bit Hash
|
||||
*/
|
||||
PD_CORE_API u32 HashMemory(const std::vector<u8>& data);
|
||||
PD_API u32 HashMemory(const std::vector<u8>& data);
|
||||
/**
|
||||
* Function to decrompress RLE buffer
|
||||
* @param data Data buffer to decompress
|
||||
*/
|
||||
PD_CORE_API void DecompressRLE(std::vector<u8>& data);
|
||||
PD_API void DecompressRLE(std::vector<u8>& data);
|
||||
/**
|
||||
* Function to compress data with RLE Algorithm
|
||||
* @param data Data buf
|
||||
*/
|
||||
PD_CORE_API void CompressRLE(std::vector<u8>& data);
|
||||
PD_API void CompressRLE(std::vector<u8>& data);
|
||||
} // namespace IO
|
||||
} // namespace PD
|
||||
@@ -41,7 +41,7 @@ constexpr float Radians(float v) { return v * (Numbers::Tau / 360.0f); }
|
||||
* @note That this is not a full Matrix Library
|
||||
*/
|
||||
|
||||
struct PD_CORE_API Mat4 {
|
||||
struct PD_API Mat4 {
|
||||
std::array<float, 16> m;
|
||||
constexpr Mat4() : m{} {}
|
||||
constexpr static Mat4 Diagonal(float x, float y, float z, float w) {
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
/*
|
||||
MIT License
|
||||
Copyright (c) 2024 - 2025 René Amthor (tobid7)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
/** Generated with ppam */
|
||||
|
||||
#ifdef _WIN32 // Windows (MSVC Tested)
|
||||
#ifdef PD_CORE_BUILD_SHARED
|
||||
#define PD_CORE_API __declspec(dllexport)
|
||||
#else
|
||||
#define PD_CORE_API __declspec(dllimport)
|
||||
#endif
|
||||
#elif defined(__APPLE__) // macOS (untested yet)
|
||||
#ifdef PD_CORE_BUILD_SHARED
|
||||
#define PD_CORE_API __attribute__((visibility("default")))
|
||||
#else
|
||||
#define PD_CORE_API
|
||||
#endif
|
||||
#elif defined(__linux__) // Linux (untested yet)
|
||||
#ifdef PD_CORE_BUILD_SHARED
|
||||
#define PD_CORE_API __attribute__((visibility("default")))
|
||||
#else
|
||||
#define PD_CORE_API
|
||||
#endif
|
||||
#elif defined(__3DS__) // 3ds Specific
|
||||
// Only Static supported
|
||||
#define PD_CORE_API
|
||||
#else
|
||||
#define PD_CORE_API
|
||||
#endif
|
||||
20
include/pd/core/strings.hpp
Executable file → Normal file
20
include/pd/core/strings.hpp
Executable file → Normal file
@@ -43,47 +43,47 @@ constexpr int HexChar2Int(char c) {
|
||||
* @param exts List of Extensions to check for
|
||||
* @return true if one of the extensions is found in the String
|
||||
*/
|
||||
PD_CORE_API bool StringEndsWith(const std::string& str,
|
||||
const std::vector<std::string>& exts);
|
||||
PD_API bool StringEndsWith(const std::string& str,
|
||||
const std::vector<std::string>& exts);
|
||||
/**
|
||||
* Function to Create a wstring of a string
|
||||
* @param s Input String to Convert
|
||||
* @return Result wstring
|
||||
* @note Returns Empty if it has an error
|
||||
*/
|
||||
PD_CORE_API std::wstring MakeWstring(const std::string& s);
|
||||
PD_API std::wstring MakeWstring(const std::string& s);
|
||||
/**
|
||||
* Generate a Formatted String by an Nanoseconds Input
|
||||
* @param nanos Nanoseconds Input
|
||||
* @return Result String
|
||||
*/
|
||||
PD_CORE_API const std::string FormatNanos(unsigned long long nanos);
|
||||
PD_API const std::string FormatNanos(unsigned long long nanos);
|
||||
/**
|
||||
* Generate a Formatted String by an Milliseconds Input
|
||||
* @param millis Milliseconds Input
|
||||
* @return Result String
|
||||
*/
|
||||
PD_CORE_API const std::string FormatMillis(unsigned long long millis);
|
||||
PD_API const std::string FormatMillis(unsigned long long millis);
|
||||
/**
|
||||
* Create a formatted String by an input bytes value
|
||||
* @param bytes value in bytes
|
||||
* @result Formatted String for example `2.5MB`
|
||||
*/
|
||||
PD_CORE_API const std::string FormatBytes(unsigned long long bytes);
|
||||
PD_API const std::string FormatBytes(unsigned long long bytes);
|
||||
/**
|
||||
* Extract the Filename out of a Path
|
||||
* @param path Path to extract from
|
||||
* @param saperators Path Split Chars
|
||||
* @return extracted filename
|
||||
*/
|
||||
PD_CORE_API const std::string GetFileName(
|
||||
const std::string& path, const std::string& saperators = "/\\");
|
||||
PD_API const std::string GetFileName(const std::string& path,
|
||||
const std::string& saperators = "/\\");
|
||||
/**
|
||||
* Remove Extension from a Path / Filename
|
||||
* @param path Input Path
|
||||
* @return Path without Extension
|
||||
*/
|
||||
PD_CORE_API const std::string PathRemoveExtension(const std::string& path);
|
||||
PD_API const std::string PathRemoveExtension(const std::string& path);
|
||||
/**
|
||||
* Function to Convert a Type to a hex value
|
||||
* @tparam T Type
|
||||
@@ -101,7 +101,7 @@ inline const std::string ToHex(const T& v) {
|
||||
* @param s String to hash
|
||||
* @return 32Bit Hash
|
||||
*/
|
||||
PD_CORE_API u32 FastHash(const std::string& s);
|
||||
PD_API u32 FastHash(const std::string& s);
|
||||
/**
|
||||
* Function to Generate a Compiler Name and Version String
|
||||
* Based on their Macros
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace PD {
|
||||
/**
|
||||
* Timer class
|
||||
*/
|
||||
class PD_CORE_API Timer {
|
||||
class PD_API Timer {
|
||||
public:
|
||||
/**
|
||||
* Constructor
|
||||
|
||||
@@ -218,12 +218,12 @@ class Res {
|
||||
* Begin a Trace
|
||||
* @param id Name of the Trace
|
||||
*/
|
||||
PD_CORE_API void Beg(const std::string& id);
|
||||
PD_API void Beg(const std::string& id);
|
||||
/**
|
||||
* End a Trace
|
||||
* @param id Name of the Trace
|
||||
*/
|
||||
PD_CORE_API void End(const std::string& id);
|
||||
PD_API void End(const std::string& id);
|
||||
/**
|
||||
* Collect Start end end of the trace by tracking
|
||||
* when the Scope object goes out of scope
|
||||
|
||||
@@ -25,10 +25,10 @@ SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <pd/core/core.hpp>
|
||||
#include <pd/image/pd_p_api.hpp>
|
||||
#include <pd/pd_p_api.hpp>
|
||||
|
||||
namespace PD {
|
||||
class PD_IMAGE_API Image {
|
||||
class PD_API Image {
|
||||
public:
|
||||
enum Format {
|
||||
RGBA, // bpp == 4
|
||||
|
||||
@@ -25,7 +25,7 @@ SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <pd/core/core.hpp>
|
||||
#include <pd/image/pd_p_api.hpp>
|
||||
#include <pd/pd_p_api.hpp>
|
||||
|
||||
namespace PD {
|
||||
/**
|
||||
@@ -38,7 +38,7 @@ namespace ImgBlur {
|
||||
* @param si sigma value to use
|
||||
* @return list of kernel values
|
||||
*/
|
||||
PD_IMAGE_API std::vector<float> GaussianKernel(int radius, float si);
|
||||
PD_API std::vector<float> GaussianKernel(int radius, float si);
|
||||
/**
|
||||
* Gaussian Blur for basic Image Buffer
|
||||
* @param buf Image Buffer (unsigned char)
|
||||
@@ -48,7 +48,7 @@ PD_IMAGE_API std::vector<float> GaussianKernel(int radius, float si);
|
||||
* @param si Blur sigma
|
||||
* @param idxfn Indexing function
|
||||
*/
|
||||
PD_IMAGE_API void GaussianBlur(
|
||||
PD_API void GaussianBlur(
|
||||
std::vector<u8>& buf, int w, int h, float radius, float si,
|
||||
std::function<int(int, int, int)> idxfn = [](int x, int y, int w) -> int {
|
||||
return y * w + x;
|
||||
@@ -63,7 +63,7 @@ PD_IMAGE_API void GaussianBlur(
|
||||
* @param si Blur sigma
|
||||
* @param idxfn Indexing function
|
||||
*/
|
||||
PD_IMAGE_API void GaussianBlur(
|
||||
PD_API void GaussianBlur(
|
||||
void* buf, int w, int h, int bpp, float radius, float si,
|
||||
std::function<int(int, int, int)> idxfn = [](int x, int y, int w) -> int {
|
||||
return y * w + x;
|
||||
|
||||
@@ -26,7 +26,7 @@ SOFTWARE.
|
||||
|
||||
#include <pd/core/core.hpp>
|
||||
#include <pd/image/image.hpp>
|
||||
#include <pd/image/pd_p_api.hpp>
|
||||
#include <pd/pd_p_api.hpp>
|
||||
|
||||
namespace PD {
|
||||
/**
|
||||
@@ -41,10 +41,10 @@ namespace ImgConvert {
|
||||
* @param w width of the image
|
||||
* @param h height of the image
|
||||
*/
|
||||
PD_IMAGE_API
|
||||
PD_API
|
||||
void RGB24toRGBA32(std::vector<PD::u8>& out, const std::vector<u8>& in,
|
||||
const int& w, const int& h);
|
||||
PD_IMAGE_API
|
||||
PD_API
|
||||
void RGB32toRGBA24(std::vector<u8>& out, const std::vector<u8>& in,
|
||||
const int& w, const int& h);
|
||||
/**
|
||||
@@ -53,7 +53,7 @@ void RGB32toRGBA24(std::vector<u8>& out, const std::vector<u8>& in,
|
||||
* @param w width
|
||||
* @param h height
|
||||
*/
|
||||
PD_IMAGE_API void Reverse32(std::vector<u8>& buf, const int& w, const int& h);
|
||||
PD_IMAGE_API void ReverseBuf(std::vector<u8>& buf, size_t bpp, int w, int h);
|
||||
PD_API void Reverse32(std::vector<u8>& buf, const int& w, const int& h);
|
||||
PD_API void ReverseBuf(std::vector<u8>& buf, size_t bpp, int w, int h);
|
||||
} // namespace ImgConvert
|
||||
} // namespace PD
|
||||
@@ -1,51 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
/*
|
||||
MIT License
|
||||
Copyright (c) 2024 - 2025 René Amthor (tobid7)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
/** Generated with ppam */
|
||||
|
||||
#ifdef _WIN32 // Windows (MSVC Tested)
|
||||
#ifdef PD_IMAGE_BUILD_SHARED
|
||||
#define PD_IMAGE_API __declspec(dllexport)
|
||||
#else
|
||||
#define PD_IMAGE_API __declspec(dllimport)
|
||||
#endif
|
||||
#elif defined(__APPLE__) // macOS (untested yet)
|
||||
#ifdef PD_IMAGE_BUILD_SHARED
|
||||
#define PD_IMAGE_API __attribute__((visibility("default")))
|
||||
#else
|
||||
#define PD_IMAGE_API
|
||||
#endif
|
||||
#elif defined(__linux__) // Linux (untested yet)
|
||||
#ifdef PD_IMAGE_BUILD_SHARED
|
||||
#define PD_IMAGE_API __attribute__((visibility("default")))
|
||||
#else
|
||||
#define PD_IMAGE_API
|
||||
#endif
|
||||
#elif defined(__3DS__) // 3ds Specific
|
||||
// Only Static supported
|
||||
#define PD_IMAGE_API
|
||||
#else
|
||||
#define PD_IMAGE_API
|
||||
#endif
|
||||
4
include/pd/lithium/command.hpp
Executable file → Normal file
4
include/pd/lithium/command.hpp
Executable file → Normal file
@@ -24,9 +24,9 @@ SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <pd/core/core.hpp>
|
||||
#include <pd/lithium/pd_p_api.hpp>
|
||||
#include <pd/lithium/texture.hpp>
|
||||
#include <pd/lithium/vertex.hpp>
|
||||
#include <pd/pd_p_api.hpp>
|
||||
|
||||
namespace PD {
|
||||
namespace Li {
|
||||
@@ -72,7 +72,7 @@ class Command {
|
||||
TexAddress Tex;
|
||||
};
|
||||
|
||||
class PD_LITHIUM_API CmdPool {
|
||||
class PD_API CmdPool {
|
||||
public:
|
||||
CmdPool() {}
|
||||
~CmdPool() {}
|
||||
|
||||
@@ -26,7 +26,7 @@ SOFTWARE.
|
||||
|
||||
#include <pd/lithium/command.hpp>
|
||||
#include <pd/lithium/font.hpp>
|
||||
#include <pd/lithium/pd_p_api.hpp>
|
||||
#include <pd/pd_p_api.hpp>
|
||||
|
||||
/** Path Rect Flags */
|
||||
using LiPathRectFlags = PD::u32;
|
||||
@@ -46,7 +46,7 @@ enum LiPathRectFlags_ : PD::u32 {
|
||||
|
||||
namespace PD {
|
||||
namespace Li {
|
||||
class PD_LITHIUM_API DrawList {
|
||||
class PD_API DrawList {
|
||||
public:
|
||||
DrawList(int initial_size = 64);
|
||||
~DrawList();
|
||||
|
||||
4
include/pd/lithium/font.hpp
Executable file → Normal file
4
include/pd/lithium/font.hpp
Executable file → Normal file
@@ -26,9 +26,9 @@ SOFTWARE.
|
||||
|
||||
#include <pd/core/core.hpp>
|
||||
#include <pd/lithium/command.hpp>
|
||||
#include <pd/lithium/pd_p_api.hpp>
|
||||
#include <pd/lithium/rect.hpp>
|
||||
#include <pd/lithium/texture.hpp>
|
||||
#include <pd/pd_p_api.hpp>
|
||||
|
||||
using LiTextFlags = PD::u32;
|
||||
enum LiTextFlags_ {
|
||||
@@ -44,7 +44,7 @@ enum LiTextFlags_ {
|
||||
|
||||
namespace PD {
|
||||
namespace Li {
|
||||
class PD_LITHIUM_API Font {
|
||||
class PD_API Font {
|
||||
public:
|
||||
/** Codepoint Data holder */
|
||||
struct Codepoint {
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
/*
|
||||
MIT License
|
||||
Copyright (c) 2024 - 2025 René Amthor (tobid7)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
/** Generated with ppam */
|
||||
|
||||
#ifdef _WIN32 // Windows (MSVC Tested)
|
||||
#ifdef PD_LITHIUM_BUILD_SHARED
|
||||
#define PD_LITHIUM_API __declspec(dllexport)
|
||||
#else
|
||||
#define PD_LITHIUM_API __declspec(dllimport)
|
||||
#endif
|
||||
#elif defined(__APPLE__) // macOS (untested yet)
|
||||
#ifdef PD_LITHIUM_BUILD_SHARED
|
||||
#define PD_LITHIUM_API __attribute__((visibility("default")))
|
||||
#else
|
||||
#define PD_LITHIUM_API
|
||||
#endif
|
||||
#elif defined(__linux__) // Linux (untested yet)
|
||||
#ifdef PD_LITHIUM_BUILD_SHARED
|
||||
#define PD_LITHIUM_API __attribute__((visibility("default")))
|
||||
#else
|
||||
#define PD_LITHIUM_API
|
||||
#endif
|
||||
#elif defined(__3DS__) // 3ds Specific
|
||||
// Only Static supported
|
||||
#define PD_LITHIUM_API
|
||||
#else
|
||||
#define PD_LITHIUM_API
|
||||
#endif
|
||||
4
include/pd/lithium/renderer.hpp
Executable file → Normal file
4
include/pd/lithium/renderer.hpp
Executable file → Normal file
@@ -25,15 +25,15 @@ SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <pd/drivers/drivers.hpp>
|
||||
#include <pd/lithium/pd_p_api.hpp>
|
||||
#include <pd/lithium/rect.hpp>
|
||||
#include <pd/pd_p_api.hpp>
|
||||
|
||||
namespace PD {
|
||||
namespace Li {
|
||||
/**
|
||||
* Static Class Render Setup Functions
|
||||
*/
|
||||
class PD_LITHIUM_API Renderer {
|
||||
class PD_API Renderer {
|
||||
public:
|
||||
Renderer() = default;
|
||||
~Renderer() = default;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
/*
|
||||
MIT License
|
||||
Copyright (c) 2024 - 2025 René Amthor (tobid7)
|
||||
Copyright (c) 2024 - 2026 René Amthor (tobid7)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -26,26 +26,26 @@ SOFTWARE.
|
||||
/** Generated with ppam */
|
||||
|
||||
#ifdef _WIN32 // Windows (MSVC Tested)
|
||||
#ifdef PD_UI7_BUILD_SHARED
|
||||
#define PD_UI7_API __declspec(dllexport)
|
||||
#ifdef PD_BUILD_SHARED
|
||||
#define PD_API __declspec(dllexport)
|
||||
#else
|
||||
#define PD_UI7_API __declspec(dllimport)
|
||||
#define PD_API __declspec(dllimport)
|
||||
#endif
|
||||
#elif defined(__APPLE__) // macOS (untested yet)
|
||||
#ifdef PD_UI7_BUILD_SHARED
|
||||
#define PD_UI7_API __attribute__((visibility("default")))
|
||||
#ifdef PD_BUILD_SHARED
|
||||
#define PD_API __attribute__((visibility("default")))
|
||||
#else
|
||||
#define PD_UI7_API
|
||||
#define PD_API
|
||||
#endif
|
||||
#elif defined(__linux__) // Linux (untested yet)
|
||||
#ifdef PD_UI7_BUILD_SHARED
|
||||
#define PD_UI7_API __attribute__((visibility("default")))
|
||||
#ifdef PD_BUILD_SHARED
|
||||
#define PD_API __attribute__((visibility("default")))
|
||||
#else
|
||||
#define PD_UI7_API
|
||||
#define PD_API
|
||||
#endif
|
||||
#elif defined(__3DS__) // 3ds Specific
|
||||
// Only Static supported
|
||||
#define PD_UI7_API
|
||||
#define PD_API
|
||||
#else
|
||||
#define PD_UI7_API
|
||||
#define PD_API
|
||||
#endif
|
||||
@@ -35,7 +35,7 @@ namespace UI7 {
|
||||
* This only means that InPressed is responding the info in
|
||||
* the next frame
|
||||
*/
|
||||
class PD_UI7_API Button : public Container {
|
||||
class PD_API Button : public Container {
|
||||
public:
|
||||
/**
|
||||
* Button Object constructor
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace UI7 {
|
||||
* Context::Update while the visual update is done
|
||||
* during the Update
|
||||
*/
|
||||
class PD_UI7_API Checkbox : public Container {
|
||||
class PD_API Checkbox : public Container {
|
||||
public:
|
||||
/**
|
||||
* Constructor for Checkbox Object
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace UI7 {
|
||||
/**
|
||||
* Color Editor (Creating a PopUP when clicking)
|
||||
*/
|
||||
class PD_UI7_API ColorEdit : public Container {
|
||||
class PD_API ColorEdit : public Container {
|
||||
public:
|
||||
/**
|
||||
* Constructor
|
||||
|
||||
4
include/pd/ui7/container/container.hpp
Executable file → Normal file
4
include/pd/ui7/container/container.hpp
Executable file → Normal file
@@ -24,8 +24,8 @@ SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <pd/core/core.hpp>
|
||||
#include <pd/pd_p_api.hpp>
|
||||
#include <pd/ui7/io.hpp>
|
||||
#include <pd/ui7/pd_p_api.hpp>
|
||||
|
||||
namespace PD {
|
||||
namespace UI7 {
|
||||
@@ -33,7 +33,7 @@ namespace UI7 {
|
||||
* Container base class all Objects are based on
|
||||
* @note this class can be used to create custom Objects as well
|
||||
*/
|
||||
class PD_UI7_API Container {
|
||||
class PD_API Container {
|
||||
public:
|
||||
Container() = default;
|
||||
/**
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace UI7 {
|
||||
* and modifys these by moving left or right when dragging
|
||||
*/
|
||||
template <typename T>
|
||||
class PD_UI7_API DragData : public Container {
|
||||
class PD_API DragData : public Container {
|
||||
public:
|
||||
/**
|
||||
* Constructor
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace UI7 {
|
||||
* This only means that InPressed is responding the info in
|
||||
* the next frame
|
||||
*/
|
||||
class PD_UI7_API DynObj : public Container {
|
||||
class PD_API DynObj : public Container {
|
||||
public:
|
||||
/**
|
||||
* Button Object constructor
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace UI7 {
|
||||
/**
|
||||
* Image Object
|
||||
*/
|
||||
class PD_UI7_API Image : public Container {
|
||||
class PD_API Image : public Container {
|
||||
public:
|
||||
/**
|
||||
* Constructor for the Image Object
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace UI7 {
|
||||
/**
|
||||
* Label [Text] Object
|
||||
*/
|
||||
class PD_UI7_API Label : public Container {
|
||||
class PD_API Label : public Container {
|
||||
public:
|
||||
/**
|
||||
* Constructor for Label Object
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace UI7 {
|
||||
* and modifys these by moving left or right when dragging
|
||||
*/
|
||||
template <typename T>
|
||||
class PD_UI7_API Slider : public Container {
|
||||
class PD_API Slider : public Container {
|
||||
public:
|
||||
/**
|
||||
* Constructor
|
||||
|
||||
2
include/pd/ui7/input_api.hpp
Executable file → Normal file
2
include/pd/ui7/input_api.hpp
Executable file → Normal file
@@ -26,8 +26,8 @@ SOFTWARE.
|
||||
|
||||
#include <pd/core/core.hpp>
|
||||
#include <pd/lithium/lithium.hpp>
|
||||
#include <pd/pd_p_api.hpp>
|
||||
#include <pd/ui7/id.hpp>
|
||||
#include <pd/ui7/pd_p_api.hpp>
|
||||
|
||||
namespace PD {
|
||||
namespace UI7 {
|
||||
|
||||
4
include/pd/ui7/io.hpp
Executable file → Normal file
4
include/pd/ui7/io.hpp
Executable file → Normal file
@@ -25,14 +25,14 @@ SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <pd/core/core.hpp>
|
||||
#include <pd/pd_p_api.hpp>
|
||||
#include <pd/ui7/input_api.hpp>
|
||||
#include <pd/ui7/pd_p_api.hpp>
|
||||
#include <pd/ui7/theme.hpp>
|
||||
#include <pd/ui7/viewport.hpp>
|
||||
|
||||
namespace PD {
|
||||
namespace UI7 {
|
||||
class PD_UI7_API IO {
|
||||
class PD_API IO {
|
||||
public:
|
||||
IO() {
|
||||
Time = Timer::New();
|
||||
|
||||
@@ -25,17 +25,17 @@ SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <pd/core/core.hpp>
|
||||
#include <pd/pd_p_api.hpp>
|
||||
#include <pd/ui7/container/container.hpp>
|
||||
#include <pd/ui7/container/dragdata.hpp>
|
||||
#include <pd/ui7/container/slider.hpp>
|
||||
#include <pd/ui7/flags.hpp>
|
||||
#include <pd/ui7/input_api.hpp>
|
||||
#include <pd/ui7/pd_p_api.hpp>
|
||||
#include <pd/ui7/theme.hpp>
|
||||
|
||||
namespace PD {
|
||||
namespace UI7 {
|
||||
class PD_UI7_API Layout {
|
||||
class PD_API Layout {
|
||||
public:
|
||||
Layout(const ID& id, IO::Ref io) : ID(id) {
|
||||
this->IO = io;
|
||||
|
||||
@@ -25,16 +25,16 @@ SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <pd/core/core.hpp>
|
||||
#include <pd/pd_p_api.hpp>
|
||||
#include <pd/ui7/containers.hpp>
|
||||
#include <pd/ui7/io.hpp>
|
||||
#include <pd/ui7/layout.hpp>
|
||||
#include <pd/ui7/pd_p_api.hpp>
|
||||
|
||||
#include "pd/ui7/container/dragdata.hpp"
|
||||
|
||||
namespace PD {
|
||||
namespace UI7 {
|
||||
class PD_UI7_API Menu {
|
||||
class PD_API Menu {
|
||||
public:
|
||||
Menu(const UI7::ID& id, UI7::IO::Ref pIO);
|
||||
~Menu() {}
|
||||
|
||||
@@ -24,7 +24,7 @@ SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <pd/core/core.hpp>
|
||||
#include <pd/ui7/pd_p_api.hpp>
|
||||
#include <pd/pd_p_api.hpp>
|
||||
|
||||
/**
|
||||
* Using this to support 32bit color values as well as
|
||||
@@ -55,7 +55,7 @@ enum UI7Color_ {
|
||||
|
||||
namespace PD {
|
||||
namespace UI7 {
|
||||
class PD_UI7_API Theme {
|
||||
class PD_API Theme {
|
||||
public:
|
||||
/**
|
||||
* Default Constructor Setting up the Default theme
|
||||
|
||||
6
include/pd/ui7/ui7.hpp
Executable file → Normal file
6
include/pd/ui7/ui7.hpp
Executable file → Normal file
@@ -25,9 +25,9 @@ SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <pd/core/core.hpp>
|
||||
#include <pd/pd_p_api.hpp>
|
||||
#include <pd/ui7/io.hpp>
|
||||
#include <pd/ui7/menu.hpp>
|
||||
#include <pd/ui7/pd_p_api.hpp>
|
||||
|
||||
#include "pd/ui7/flags.hpp"
|
||||
|
||||
@@ -46,9 +46,9 @@ namespace UI7 {
|
||||
* @param show_build Show build num (mostly unused)
|
||||
* @return Version String (1.0.0-1 for example)
|
||||
*/
|
||||
PD_UI7_API std::string GetVersion(bool show_build = false);
|
||||
PD_API std::string GetVersion(bool show_build = false);
|
||||
/** Base Context for UI7 */
|
||||
class PD_UI7_API Context {
|
||||
class PD_API Context {
|
||||
public:
|
||||
Context() { pIO = IO::New(); }
|
||||
~Context() = default;
|
||||
|
||||
Reference in New Issue
Block a user