diff --git a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/GlfwSubsystem.java b/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/GlfwSubsystem.java index 8d912caa..455fb201 100644 --- a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/GlfwSubsystem.java +++ b/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/GlfwSubsystem.java @@ -30,7 +30,7 @@ import de.staropensource.sosengine.base.types.logging.LogIssuer; import de.staropensource.sosengine.base.utility.Miscellaneous; import de.staropensource.sosengine.graphics.events.GraphicsErrorEvent; import de.staropensource.sosengine.graphics.glfw.exceptions.GlfwInitializationException; -import de.staropensource.sosengine.graphics.glfw.exceptions.NotOnMainThreadException; +import de.staropensource.sosengine.graphics.exceptions.NotOnMainThreadException; import lombok.Getter; import org.jetbrains.annotations.NotNull; import org.lwjgl.glfw.GLFWErrorCallback; diff --git a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/classes/GlfwManagementClass.java b/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/classes/GlfwManagementClass.java index ef566a27..995b3773 100644 --- a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/classes/GlfwManagementClass.java +++ b/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/classes/GlfwManagementClass.java @@ -25,7 +25,7 @@ import de.staropensource.sosengine.base.types.logging.LogIssuer; import de.staropensource.sosengine.base.utility.Miscellaneous; import de.staropensource.sosengine.graphics.classes.api.ApiManagementClass; import de.staropensource.sosengine.graphics.classes.Window; -import de.staropensource.sosengine.graphics.glfw.exceptions.NotOnMainThreadException; +import de.staropensource.sosengine.graphics.exceptions.NotOnMainThreadException; import lombok.Getter; import org.jetbrains.annotations.NotNull; diff --git a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/classes/GlfwWindow.java b/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/classes/GlfwWindow.java index fa973e50..eea8c513 100644 --- a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/classes/GlfwWindow.java +++ b/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/classes/GlfwWindow.java @@ -29,8 +29,8 @@ import de.staropensource.sosengine.graphics.events.GraphicsApiErrorEvent; import de.staropensource.sosengine.graphics.events.InputEvent; import de.staropensource.sosengine.graphics.glfw.callbacks.KeyCallback; import de.staropensource.sosengine.graphics.glfw.callbacks.MouseButtonCallback; -import de.staropensource.sosengine.graphics.glfw.exceptions.NotOnMainThreadException; -import de.staropensource.sosengine.graphics.glfw.exceptions.WindowCreationFailureException; +import de.staropensource.sosengine.graphics.exceptions.NotOnMainThreadException; +import de.staropensource.sosengine.graphics.exceptions.WindowCreationFailureException; import de.staropensource.sosengine.graphics.types.window.VsyncMode; import de.staropensource.sosengine.graphics.types.window.WindowMode; import lombok.Getter; diff --git a/graphics/opengl/src/main/java/de/staropensource/sosengine/graphics/opengl/classes/OpenGlWindow.java b/graphics/opengl/src/main/java/de/staropensource/sosengine/graphics/opengl/classes/OpenGlWindow.java index fe3815d4..c809eb6d 100644 --- a/graphics/opengl/src/main/java/de/staropensource/sosengine/graphics/opengl/classes/OpenGlWindow.java +++ b/graphics/opengl/src/main/java/de/staropensource/sosengine/graphics/opengl/classes/OpenGlWindow.java @@ -22,9 +22,8 @@ package de.staropensource.sosengine.graphics.opengl.classes; import de.staropensource.sosengine.base.exceptions.UnexpectedThrowableException; import de.staropensource.sosengine.base.types.vectors.Vec2i; import de.staropensource.sosengine.graphics.glfw.classes.GlfwWindow; -import de.staropensource.sosengine.graphics.glfw.exceptions.NotOnMainThreadException; -import de.staropensource.sosengine.graphics.glfw.exceptions.WindowCreationFailureException; -import de.staropensource.sosengine.graphics.types.window.VsyncMode; +import de.staropensource.sosengine.graphics.exceptions.NotOnMainThreadException; +import de.staropensource.sosengine.graphics.exceptions.WindowCreationFailureException; import de.staropensource.sosengine.graphics.types.window.WindowMode; import org.jetbrains.annotations.NotNull; import org.lwjgl.opengl.GL; diff --git a/graphics/src/main/java/de/staropensource/sosengine/graphics/exceptions/NoMonitorsFoundException.java b/graphics/src/main/java/de/staropensource/sosengine/graphics/exceptions/NoMonitorsFoundException.java new file mode 100644 index 00000000..42593584 --- /dev/null +++ b/graphics/src/main/java/de/staropensource/sosengine/graphics/exceptions/NoMonitorsFoundException.java @@ -0,0 +1,28 @@ +/* + * STAROPENSOURCE ENGINE SOURCE FILE + * Copyright (c) 2024 The StarOpenSource Engine Contributors + * Licensed under the GNU Affero General Public License v3 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package de.staropensource.sosengine.graphics.exceptions; + +/** + * Thrown when trying to get one or multiple monitors but none are found. + * + * @since v1-alpha2 + */ +@SuppressWarnings({ "unused" }) +public final class NoMonitorsFoundException extends Exception {} diff --git a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/exceptions/NotOnMainThreadException.java b/graphics/src/main/java/de/staropensource/sosengine/graphics/exceptions/NotOnMainThreadException.java similarity index 94% rename from graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/exceptions/NotOnMainThreadException.java rename to graphics/src/main/java/de/staropensource/sosengine/graphics/exceptions/NotOnMainThreadException.java index 4decc51a..54edab29 100644 --- a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/exceptions/NotOnMainThreadException.java +++ b/graphics/src/main/java/de/staropensource/sosengine/graphics/exceptions/NotOnMainThreadException.java @@ -17,7 +17,7 @@ * along with this program. If not, see . */ -package de.staropensource.sosengine.graphics.glfw.exceptions; +package de.staropensource.sosengine.graphics.exceptions; /** * Thrown when trying to communicate with the Graphics API over a non-main thread. diff --git a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/exceptions/WindowCreationFailureException.java b/graphics/src/main/java/de/staropensource/sosengine/graphics/exceptions/WindowCreationFailureException.java similarity index 95% rename from graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/exceptions/WindowCreationFailureException.java rename to graphics/src/main/java/de/staropensource/sosengine/graphics/exceptions/WindowCreationFailureException.java index 85138b17..e637daf0 100644 --- a/graphics/glfw/src/main/java/de/staropensource/sosengine/graphics/glfw/exceptions/WindowCreationFailureException.java +++ b/graphics/src/main/java/de/staropensource/sosengine/graphics/exceptions/WindowCreationFailureException.java @@ -17,7 +17,7 @@ * along with this program. If not, see . */ -package de.staropensource.sosengine.graphics.glfw.exceptions; +package de.staropensource.sosengine.graphics.exceptions; import org.jetbrains.annotations.NotNull; diff --git a/graphics/src/main/java/module-info.java b/graphics/src/main/java/module-info.java index 7aca7da2..7182260a 100644 --- a/graphics/src/main/java/module-info.java +++ b/graphics/src/main/java/module-info.java @@ -16,6 +16,7 @@ module sosengine.graphics { exports de.staropensource.sosengine.graphics.classes; exports de.staropensource.sosengine.graphics.classes.api; exports de.staropensource.sosengine.graphics.events; + exports de.staropensource.sosengine.graphics.exceptions; exports de.staropensource.sosengine.graphics.types.input; exports de.staropensource.sosengine.graphics.types.window; @@ -24,6 +25,7 @@ module sosengine.graphics { opens de.staropensource.sosengine.graphics.classes; opens de.staropensource.sosengine.graphics.classes.api; opens de.staropensource.sosengine.graphics.events; + opens de.staropensource.sosengine.graphics.exceptions; opens de.staropensource.sosengine.graphics.types.input; opens de.staropensource.sosengine.graphics.types.window; }