about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/gfz.zig14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/gfz.zig b/src/gfz.zig
index 041632d..5f5f2b8 100644
--- a/src/gfz.zig
+++ b/src/gfz.zig
@@ -1,5 +1,5 @@
 // Graphics Framework for Zig
-// Copyright (C) 2021-2023  Nguyễn Gia Phong
+// Copyright (C) 2021-2023, 2025  Nguyễn Gia Phong
 //
 // This file is part of gfz.
 //
@@ -41,6 +41,14 @@ pub const Error = error{
     FormatUnavailable,
     /// The specified window does not have an OpenGL or OpenGL ES context.
     NoWindowContext,
+    /// The specified cursor shape is not available.
+    CursorUnavailable,
+    /// The requested feature is not provided by the platform.
+    FeatureUnavailable,
+    /// The requested feature is not implemented for the platform.
+    FeatureUnimplemented,
+    /// Platform unavailable or no matching platform was found.
+    PlatformUnavailable,
 };
 
 /// Return and clear the error code of the last error
@@ -58,6 +66,10 @@ pub fn checkError() Error!void {
         c.GLFW_PLATFORM_ERROR => Error.PlatformError,
         c.GLFW_FORMAT_UNAVAILABLE => Error.FormatUnavailable,
         c.GLFW_NO_WINDOW_CONTEXT => Error.NoWindowContext,
+        c.GLFW_CURSOR_UNAVAILABLE => Error.CursorUnavailable,
+        c.GLFW_FEATURE_UNAVAILABLE => Error.FeatureUnavailable,
+        c.GLFW_FEATURE_UNIMPLEMENTED => Error.FeatureUnimplemented,
+        c.GLFW_PLATFORM_UNAVAILABLE => Error.PlatformUnavailable,
         else => unreachable,
     };
 }