aboutsummaryrefslogtreecommitdiff
path: root/core/sys
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-06-17 12:01:53 +0100
committerGinger Bill <bill@gingerbill.org>2017-06-17 12:01:53 +0100
commit2deb2f8eebc42dd52ef8b78811c59e1b07f54f21 (patch)
tree6450f88b93b155bd1db798ee11f8ac03e7cc1f84 /core/sys
parent3fa398ec43ddc6fc40562087fd8ab87dc5292499 (diff)
Declaration grouping uses () rather than {}; Fix some problem with compilation on *nix
Diffstat (limited to 'core/sys')
-rw-r--r--core/sys/wgl.odin16
-rw-r--r--core/sys/windows.odin42
2 files changed, 29 insertions, 29 deletions
diff --git a/core/sys/wgl.odin b/core/sys/wgl.odin
index c02bd3805..a668790d5 100644
--- a/core/sys/wgl.odin
+++ b/core/sys/wgl.odin
@@ -1,7 +1,7 @@
foreign_system_library "opengl32.lib" when ODIN_OS == "windows";
import . "windows.odin";
-const {
+const (
CONTEXT_MAJOR_VERSION_ARB = 0x2091;
CONTEXT_MINOR_VERSION_ARB = 0x2092;
CONTEXT_FLAGS_ARB = 0x2094;
@@ -9,9 +9,9 @@ const {
CONTEXT_FORWARD_COMPATIBLE_BIT_ARB = 0x0002;
CONTEXT_CORE_PROFILE_BIT_ARB = 0x00000001;
CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB = 0x00000002;
-}
+)
-type {
+type (
Hglrc Handle;
ColorRef u32;
@@ -53,21 +53,21 @@ type {
cell_inc_x: f32,
cell_inc_y: f32,
}
-}
+)
-type {
+type (
CreateContextAttribsARBType proc(hdc: Hdc, h_share_context: rawptr, attribList: ^i32) -> Hglrc;
ChoosePixelFormatARBType proc(hdc: Hdc, attrib_i_list: ^i32, attrib_f_list: ^f32, max_formats: u32, formats: ^i32, num_formats : ^u32) -> Bool #cc_c;
SwapIntervalEXTType proc(interval: i32) -> bool #cc_c;
GetExtensionsStringARBType proc(Hdc) -> ^u8 #cc_c;
-}
+)
-var {
+var (
create_context_attribs_arb: CreateContextAttribsARBType;
choose_pixel_format_arb: ChoosePixelFormatARBType;
swap_interval_ext: SwapIntervalEXTType;
get_extensions_string_arb: GetExtensionsStringARBType;
-}
+)
foreign opengl32 {
diff --git a/core/sys/windows.odin b/core/sys/windows.odin
index 91ec9bc1b..0b9c07d11 100644
--- a/core/sys/windows.odin
+++ b/core/sys/windows.odin
@@ -1,12 +1,12 @@
-foreign_system_library {
+foreign_system_library (
"kernel32.lib" when ODIN_OS == "windows";
"user32.lib" when ODIN_OS == "windows";
"gdi32.lib" when ODIN_OS == "windows";
"winmm.lib" when ODIN_OS == "windows";
"shell32.lib" when ODIN_OS == "windows";
-}
+)
-type {
+type (
Handle rawptr;
Hwnd Handle;
Hdc Handle;
@@ -22,13 +22,13 @@ type {
Lparam int;
Lresult int;
WndProc proc(Hwnd, u32, Wparam, Lparam) -> Lresult #cc_c;
-}
+)
type Bool i32;
-const {
+const (
FALSE: Bool = 0;
TRUE = 1;
-}
+)
type Point struct #ordered {
x, y: i32,
@@ -151,19 +151,19 @@ type PixelFormatDescriptor struct #ordered {
type Proc proc() #cc_c;
-const {
- MAPVK_VK_TO_CHAR = 2;
+const (
MAPVK_VK_TO_VSC = 0;
MAPVK_VSC_TO_VK = 1;
+ MAPVK_VK_TO_CHAR = 2;
MAPVK_VSC_TO_VK_EX = 3;
-}
+)
const INVALID_HANDLE = Handle(~int(0));
-const {
+const (
CS_VREDRAW = 0x0001;
CS_HREDRAW = 0x0002;
CS_OWNDC = 0x0020;
@@ -221,7 +221,7 @@ const {
SM_CYSCREEN = 1;
SW_SHOW = 5;
-}
+)
const COLOR_BACKGROUND = Hbrush(int(1));
@@ -235,24 +235,24 @@ const BI_RGB = 0;
const DIB_RGB_COLORS = 0x00;
const SRCCOPY: u32 = 0x00cc0020;
-const {
+const (
MONITOR_DEFAULTTONULL = 0x00000000;
MONITOR_DEFAULTTOPRIMARY = 0x00000001;
MONITOR_DEFAULTTONEAREST = 0x00000002;
-}
-const {
+)
+const (
SWP_FRAMECHANGED = 0x0020;
SWP_NOOWNERZORDER = 0x0200;
SWP_NOZORDER = 0x0004;
SWP_NOSIZE = 0x0001;
SWP_NOMOVE = 0x0002;
-}
+)
// Windows OpenGL
-const {
+const (
PFD_TYPE_RGBA = 0;
PFD_TYPE_COLORINDEX = 1;
PFD_MAIN_PLANE = 0;
@@ -274,15 +274,15 @@ const {
PFD_DEPTH_DONTCARE = 0x20000000;
PFD_DOUBLEBUFFER_DONTCARE = 0x40000000;
PFD_STEREO_DONTCARE = 0x80000000;
-}
+)
type GET_FILEEX_INFO_LEVELS i32;
-const {
+const (
GetFileExInfoStandard: GET_FILEEX_INFO_LEVELS = 0;
GetFileExMaxInfoLevel = 1;
-}
+)
foreign kernel32 {
proc get_last_error () -> i32 #link_name "GetLastError";
@@ -463,7 +463,7 @@ proc is_key_down(key: KeyCode) -> bool #inline { return get_async_key_state(i32(
-const {
+const (
MAX_PATH = 0x00000104;
HANDLE_FLAG_INHERIT = 1;
@@ -513,7 +513,7 @@ const {
FILE_TYPE_DISK = 0x0001;
FILE_TYPE_CHAR = 0x0002;
FILE_TYPE_PIPE = 0x0003;
-}
+)
type MonitorInfo struct #ordered {