Update to constdef

This commit is contained in:
Christoffer Lerno
2026-02-19 12:16:46 +01:00
committed by Christoffer Lerno
parent 0387d7666d
commit 5a82f672b5
52 changed files with 189 additions and 182 deletions

View File

@@ -18,7 +18,7 @@ const uint EPOLLWAKEUP = EpollEvents.EPOLLWAKEUP;
const uint EPOLLONESHOT = EpollEvents.EPOLLONESHOT;
const uint EPOLLET = EpollEvents.EPOLLET;
const enum EpollEvents : inline uint
constdef EpollEvents : inline uint
{
EPOLLIN = 0x001,
EPOLLPRI = 0x002,

View File

@@ -40,7 +40,7 @@ extern fn CFTypeRef CFType.retain(&self) @cname("CFRetain");
extern fn void CFType.release(&self) @cname("CFRelease");
extern fn CFIndex CFType.getRetainCount(&self) @cname("CFGetRetainCount");
const enum CFStringEncoding : uint
constdef CFStringEncoding : uint
{
INVALID_ID = 0xffffffffU,
MAC_ROMAN = 0,

View File

@@ -1,7 +1,7 @@
module std::os::darwin @if(env::DARWIN) @link("Foundation.framework");
import std::os::macos::cf, std::os::macos::objc, std::io;
const enum NSSearchPathDomainMask : NSUInteger
constdef NSSearchPathDomainMask : NSUInteger
{
USER = 1,
LOCAL = 2,
@@ -10,7 +10,7 @@ const enum NSSearchPathDomainMask : NSUInteger
ALL = 0x0ffff
}
const enum NSSearchPathDirectory : NSUInteger
constdef NSSearchPathDirectory : NSUInteger
{
APPLICATION = 1,
DEMO_APPLICATION,

View File

@@ -88,7 +88,7 @@ enum ApplicationActivationPolicy : (int val) @deprecated("Use NSApplicationActiv
PROHIBITED { 2 },
}
const enum NSApplicationActivationPolicy : inline NSInteger
constdef NSApplicationActivationPolicy : inline NSInteger
{
REGULAR = 0,
ACCESSORY = 1,
@@ -119,7 +119,7 @@ enum BackingStore : (int val) @deprecated("Use NSBackingStoreType.")
BUFFERED { 2 }
}
const enum NSBackingStoreType : inline NSUInteger
constdef NSBackingStoreType : inline NSUInteger
{
RETAINED = 0,
NONRETAINED = 1,
@@ -164,7 +164,7 @@ enum EventType : (long val) @deprecated("Use NSEventType.")
CHANGE_MODE { 38 },
}
const enum NSEventType : inline NSUInteger
constdef NSEventType : inline NSUInteger
{
LEFT_MOUSE_DOWN = 1,
LEFT_MOUSE_UP = 2,
@@ -280,7 +280,7 @@ enum EventMask : (long val) @deprecated("Use NSEventMask.")
ANY { long.max },
}
const enum NSEventMask : inline ulong
constdef NSEventMask : inline ulong
{
LEFT_MOUSE_DOWN = 1ul << NSEventType.LEFT_MOUSE_DOWN,
LEFT_MOUSE_UP = 1ul << NSEventType.LEFT_MOUSE_UP,
@@ -333,7 +333,7 @@ enum EventModifierFlag : (int val) @deprecated("Use NSEventModifierFlags.")
HELP { 1 << 22 },
}
const enum NSEventModifierFlags : inline NSUInteger
constdef NSEventModifierFlags : inline NSUInteger
{
CAPS_LOCK = 1 << 16,
SHIFT = 1 << 17,
@@ -346,7 +346,7 @@ const enum NSEventModifierFlags : inline NSUInteger
DEVICE_INDEPENDENT_FLAGS_MASK = 0xffff0000UL,
}
const enum NSWindowCollectionBehavior : inline NSUInteger
constdef NSWindowCollectionBehavior : inline NSUInteger
{
DEFAULT = 0,
CAN_JOIN_ALL_SPACES = 1 << 0,
@@ -366,7 +366,7 @@ const enum NSWindowCollectionBehavior : inline NSUInteger
CAN_JOIN_ALL_APPLICATIONS = 1 << 18,
}
const enum NSWindowLevel : inline NSInteger
constdef NSWindowLevel : inline NSInteger
{
NORMAL = 0,
FLOATING = 3,
@@ -379,7 +379,7 @@ const enum NSWindowLevel : inline NSInteger
SCREEN_SAVER = 1000,
}
const enum NSWindowStyleMask : inline NSUInteger
constdef NSWindowStyleMask : inline NSUInteger
{
BORDERLESS = 0,
TITLED = 1 << 0,
@@ -396,20 +396,20 @@ const enum NSWindowStyleMask : inline NSUInteger
HUD_WINDOW = 1 << 13
}
const enum NSWindowTabbingMode : inline NSInteger
constdef NSWindowTabbingMode : inline NSInteger
{
AUTOMATIC = 0,
DISALLOWED = 2,
PREFERRED = 1,
}
const enum NSStatusItemLength : inline CGFloat
constdef NSStatusItemLength : inline CGFloat
{
VARIABLE = -1.0,
SQUARE = -2.0
}
const enum NSApplicationTerminateReply : inline NSUInteger
constdef NSApplicationTerminateReply : inline NSUInteger
{
CANCEL = 0,
NOW = 1,

View File

@@ -1,6 +1,6 @@
module std::os::win32 @if(env::WIN32);
const enum Win32_CODEPAGE : Win32_UINT
constdef Win32_CODEPAGE : Win32_UINT
{
IBM037 = 037, // IBM EBCDIC US-Canada
IBM437 = 437, // OEM United States

View File

@@ -1,6 +1,6 @@
module std::os::win32 @if(env::WIN32);
const enum Win32_AllocationType
constdef Win32_AllocationType
{
MEM_COMMIT = 0x00001000,
MEM_RESERVE = 0x00002000,
@@ -12,7 +12,7 @@ const enum Win32_AllocationType
MEM_WRITE_WATCH = 0x00200000
}
const enum Win32_Protect : Win32_DWORD
constdef Win32_Protect : Win32_DWORD
{
PAGE_EXECUTE = 0x10,
PAGE_EXECUTE_READ = 0x20,
@@ -29,7 +29,7 @@ const enum Win32_Protect : Win32_DWORD
PAGE_WRITECOMBINE = 0x400,
}
const enum Win32_FreeType : Win32_DWORD
constdef Win32_FreeType : Win32_DWORD
{
MEM_DECOMMIT = 0x00004000,
MEM_RELEASE = 0x00008000,

View File

@@ -13,7 +13,7 @@ enum Win32_MEM_EXTENDED_PARAMETER_TYPE : CInt
}
alias Win32_PMEM_EXTENDED_PARAMETER_TYPE = Win32_MEM_EXTENDED_PARAMETER_TYPE;
const enum Win32_MEM_EXTENDED_PARAMETER_ATTRIBUTE : Win32_DWORD64
constdef Win32_MEM_EXTENDED_PARAMETER_ATTRIBUTE : Win32_DWORD64
{
<* The allocation is non-pageable. *>
NONPAGED = 0x02,