Skip to content

Commit

Permalink
Add dummy of X11 and wayland
Browse files Browse the repository at this point in the history
  • Loading branch information
kappa-maintainer committed Dec 21, 2024
1 parent 2214135 commit df3a8b3
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/com/cleanroommc/client/IMEHandler.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package com.cleanroommc.client;

import com.cleanroommc.client.ime.CocoaIMEHandler;
import com.cleanroommc.client.ime.DummyIMEHandler;
import com.cleanroommc.client.ime.WindowsIMEHandler;
import com.cleanroommc.client.ime.*;
import net.minecraftforge.fml.common.FMLLog;
import org.lwjgl.glfw.GLFW;

Expand All @@ -14,9 +12,11 @@ public class IMEHandler {
switch (GLFW.glfwGetPlatform()) {
case GLFW.GLFW_PLATFORM_WIN32 -> instance = new WindowsIMEHandler();
case GLFW.GLFW_PLATFORM_COCOA -> instance = new CocoaIMEHandler();
case GLFW.GLFW_PLATFORM_X11 -> instance = new X11IMEHandler();
case GLFW.GLFW_PLATFORM_WAYLAND -> instance = new WaylandIMEhandler();
default -> {
instance = new DummyIMEHandler();
FMLLog.log.warn("Unsupported platform: {}", GLFW.glfwGetPlatform());
FMLLog.log.warn("IME handler initialization failed: Unsupported platform {}", GLFW.glfwGetPlatform());
}
}
}
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/com/cleanroommc/client/ime/WaylandIMEhandler.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.cleanroommc.client.ime;

import java.util.function.Consumer;

public class WaylandIMEhandler implements Consumer<Boolean> {
@Override
public void accept(Boolean aBoolean) {

}
}
10 changes: 10 additions & 0 deletions src/main/java/com/cleanroommc/client/ime/X11IMEHandler.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.cleanroommc.client.ime;

import java.util.function.Consumer;

public class X11IMEHandler implements Consumer<Boolean> {
@Override
public void accept(Boolean aBoolean) {

}
}

0 comments on commit df3a8b3

Please sign in to comment.