Mercurial > libanimone
view include/animone/types.h @ 30:a76e55e098d1
util: rewrite functions in C-ish
there are C++ bindings still put in place. the code should be valid
C, except for the use of <regex>, which ought to go anyway. eventually
I'll actually *test* this stuff aside from the TrimRight crap
author | Paper <paper@tflc.us> |
---|---|
date | Sun, 09 Feb 2025 23:18:57 -0500 |
parents | fac2b2d242d3 |
children |
line wrap: on
line source
#ifndef ANIMONE_ANIMONE_TYPES_H_ #define ANIMONE_ANIMONE_TYPES_H_ #include <cstdint> /* windows is so annoying */ #ifdef _WIN32 # ifdef DLL_EXPORT # define ANIMONE_API __declspec(dllexport) # else # define ANIMONE_API __declspec(dllimport) # endif #else # define ANIMONE_API #endif /* FIXME configure this in autoconf */ #ifndef _WIN32 #include <sys/types.h> #endif namespace animone::internal { #ifdef _WIN32 using pid_t = std::uint32_t; #else using pid_t = ::pid_t; #endif /* different window systems have different sized IDs */ union ANIMONE_API wid_t { std::uintptr_t win32; // XXX this ought to be a `void *` std::int64_t quartz; // FIXME is this correct? std::uint32_t x11; }; } #endif // ANIMONE_ANIMONE_TYPES_H_