Skip to content
Permalink
Browse files

added gradle properties, removed unnecessary src

  • Loading branch information...
ShchAlexander committed Nov 23, 2018
1 parent 292a386 commit 67123907b7f01906231e99f9181593fd361a1501
Showing with 79 additions and 2,484 deletions.
  1. +0 −1 .gitignore
  2. +3 −14 backend.core/src/main/java/com/spinyowl/spinygui/backend/core/event/SystemWindowCloseEvent.java
  3. +3 −12 backend.core/src/main/java/com/spinyowl/spinygui/backend/core/event/SystemWindowFocusEvent.java
  4. +3 −12 backend.core/src/main/java/com/spinyowl/spinygui/backend/core/event/SystemWindowIconifyEvent.java
  5. +4 −14 backend.core/src/main/java/com/spinyowl/spinygui/backend/core/event/SystemWindowPosEvent.java
  6. +3 −11 backend.core/src/main/java/com/spinyowl/spinygui/backend/core/event/SystemWindowRefreshEvent.java
  7. +3 −13 backend.core/src/main/java/com/spinyowl/spinygui/backend/core/event/SystemWindowSizeEvent.java
  8. +34 −3 ...d.core/src/main/java/com/spinyowl/spinygui/backend/core/event/processor/SystemEventProcessor.java
  9. +0 −16 ...2/src/main/java/com/spinyowl/spinygui/backend/opengl32/event/SystemEventProcessorForOpenGL32.java
  10. +13 −0 ...opengl32/src/main/java/com/spinyowl/spinygui/backend/opengl32/event/WindowCloseEventListener.java
  11. +4 −0 ...2/src/main/java/com/spinyowl/spinygui/backend/opengl32/service/SpinyGuiOpenGL32WindowService.java
  12. +1 −1 ...n/java/com/spinyowl/spinygui/backend/opengl32/service/internal/SpinyGuiOpenGL32ServiceThread.java
  13. +2 −0 backend.opengl32/src/main/java/module-info.java
  14. +0 −1 core/src/main/java/com/spinyowl/spinygui/core/component/Input.java
  15. +2 −0 core/src/main/java/module-info.java
  16. +3 −0 demo.simple/src/main/java/com/spinyowl/spinygui/demo/Main.java
  17. +1 −0 gradle.properties
  18. +0 −120 src/main/java/com/spinyowl/spinygui/backend/glfw/opengl32/api/MonitorOpenGL32.java
  19. +0 −84 src/main/java/com/spinyowl/spinygui/backend/glfw/opengl32/api/VideoModeOpenGL32.java
  20. +0 −136 src/main/java/com/spinyowl/spinygui/backend/glfw/opengl32/api/WindowOpenGL32.java
  21. +0 −16 src/main/java/com/spinyowl/spinygui/backend/glfw/opengl32/event/SystemEventProcessorForOpenGL32.java
  22. +0 −108 ...main/java/com/spinyowl/spinygui/backend/glfw/opengl32/service/SpinyGuiOpenGL32MonitorService.java
  23. +0 −22 ...ain/java/com/spinyowl/spinygui/backend/glfw/opengl32/service/SpinyGuiOpenGL32ServiceProvider.java
  24. +0 −102 src/main/java/com/spinyowl/spinygui/backend/glfw/opengl32/service/SpinyGuiOpenGL32WindowService.java
  25. +0 −74 ...in/java/com/spinyowl/spinygui/backend/glfw/opengl32/service/internal/SpinyGuiOpenGL32Service.java
  26. +0 −198 ...a/com/spinyowl/spinygui/backend/glfw/opengl32/service/internal/SpinyGuiOpenGL32ServiceThread.java
  27. +0 −147 src/main/java/com/spinyowl/spinygui/backend/glfw/util/CallbackKeeper.java
  28. +0 −341 src/main/java/com/spinyowl/spinygui/backend/glfw/util/DefaultCallbackKeeper.java
  29. +0 −212 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/AbstractChainCallback.java
  30. +0 −166 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/IChainCallback.java
  31. +0 −10 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/IChainCharCallback.java
  32. +0 −10 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/IChainCharModsCallback.java
  33. +0 −10 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/IChainCursorEnterCallback.java
  34. +0 −10 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/IChainCursorPosCallback.java
  35. +0 −10 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/IChainDropCallback.java
  36. +0 −11 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/IChainErrorCallback.java
  37. +0 −10 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/IChainFramebufferSizeCallback.java
  38. +0 −11 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/IChainJoystickCallback.java
  39. +0 −10 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/IChainKeyCallback.java
  40. +0 −11 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/IChainMonitorCallback.java
  41. +0 −10 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/IChainMouseButtonCallback.java
  42. +0 −11 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/IChainScrollCallback.java
  43. +0 −10 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/IChainWindowCloseCallback.java
  44. +0 −10 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/IChainWindowContentScaleCallback.java
  45. +0 −10 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/IChainWindowFocusCallback.java
  46. +0 −10 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/IChainWindowIconifyCallback.java
  47. +0 −10 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/IChainWindowMaximizeCallback.java
  48. +0 −11 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/IChainWindowPosCallback.java
  49. +0 −10 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/IChainWindowRefreshCallback.java
  50. +0 −10 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/IChainWindowSizeCallback.java
  51. +0 −18 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/impl/ChainCharCallback.java
  52. +0 −18 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/impl/ChainCharModsCallback.java
  53. +0 −18 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/impl/ChainCursorEnterCallback.java
  54. +0 −17 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/impl/ChainCursorPosCallback.java
  55. +0 −18 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/impl/ChainDropCallback.java
  56. +0 −18 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/impl/ChainErrorCallback.java
  57. +0 −18 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/impl/ChainFramebufferSizeCallback.java
  58. +0 −18 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/impl/ChainJoystickCallback.java
  59. +0 −18 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/impl/ChainKeyCallback.java
  60. +0 −18 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/impl/ChainMonitorCallback.java
  61. +0 −18 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/impl/ChainMouseButtonCallback.java
  62. +0 −18 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/impl/ChainScrollCallback.java
  63. +0 −18 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/impl/ChainWindowCloseCallback.java
  64. +0 −25 ...in/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/impl/ChainWindowContentScaleCallback.java
  65. +0 −18 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/impl/ChainWindowFocusCallback.java
  66. +0 −18 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/impl/ChainWindowIconifyCallback.java
  67. +0 −24 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/impl/ChainWindowMaximizeCallback.java
  68. +0 −18 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/impl/ChainWindowPosCallback.java
  69. +0 −18 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/impl/ChainWindowRefreshCallback.java
  70. +0 −18 src/main/java/com/spinyowl/spinygui/backend/glfw/util/cbchain/impl/ChainWindowSizeCallback.java
  71. +0 −34 src/main/java/com/spinyowl/spinygui/core/util/Reference.java
  72. +0 −49 src/main/java/module-info.java
@@ -1,5 +1,4 @@
/.idea/
/gradle.properties
**/build/*
**/target/*
/.gradle/
@@ -1,27 +1,16 @@
package com.spinyowl.spinygui.backend.core.event;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.spinyowl.spinygui.core.api.Window;

/**
* Created by Shcherbin Alexander on 6/10/2016.
*/
public class SystemWindowCloseEvent implements SystemEvent {

public final long window;
public final Window window;

public SystemWindowCloseEvent(long window) {
public SystemWindowCloseEvent(Window window) {
this.window = window;
}

public long getWindow() {
return window;
}

@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
.append("window", window)
.toString();
}
}
@@ -1,27 +1,18 @@
package com.spinyowl.spinygui.backend.core.event;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.spinyowl.spinygui.core.api.Window;

/**
* Created by Shcherbin Alexander on 6/10/2016.
*/
public class SystemWindowFocusEvent implements SystemEvent {

public final long window;
public final Window window;
public final boolean focused;

public SystemWindowFocusEvent(long window, boolean focused) {
public SystemWindowFocusEvent(Window window, boolean focused) {
this.window = window;
this.focused = focused;
}

@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
.append("window", window)
.append("focused", focused)
.toString();
}

}
@@ -1,27 +1,18 @@
package com.spinyowl.spinygui.backend.core.event;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.spinyowl.spinygui.core.api.Window;

/**
* Created by Shcherbin Alexander on 6/10/2016.
*/
public class SystemWindowIconifyEvent implements SystemEvent {

public final long window;
public final Window window;
public final boolean iconified;

public SystemWindowIconifyEvent(long window, boolean iconified) {
public SystemWindowIconifyEvent(Window window, boolean iconified) {
this.window = window;
this.iconified = iconified;
}

@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
.append("iconified", iconified)
.append("window", window)
.toString();
}

}
@@ -1,30 +1,20 @@
package com.spinyowl.spinygui.backend.core.event;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.spinyowl.spinygui.core.api.Window;

/**
* Created by Shcherbin Alexander on 6/10/2016.
*/
public class SystemWindowPosEvent implements SystemEvent {

public final long window;
public final Window window;
public final int posX;
public final int posY;

public SystemWindowPosEvent(long window, int posX, int posY) {
public SystemWindowPosEvent(Window window, int posX, int posY) {
this.window = window;
this.posX = posX;
this.posY = posY;
}

@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
.append("window", window)
.append("posX", posX)
.append("posY", posY)
.toString();
}


}
@@ -1,23 +1,15 @@
package com.spinyowl.spinygui.backend.core.event;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.spinyowl.spinygui.core.api.Window;

/**
* Created by Shcherbin Alexander on 6/10/2016.
*/
public class SystemWindowRefreshEvent implements SystemEvent {

public final long window;
public final Window window;

public SystemWindowRefreshEvent(long window) {
public SystemWindowRefreshEvent(Window window) {
this.window = window;
}

@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
.append("window", window)
.toString();
}
}
@@ -1,30 +1,20 @@
package com.spinyowl.spinygui.backend.core.event;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.spinyowl.spinygui.core.api.Window;

/**
* Created by Shcherbin Alexander on 6/10/2016.
*/
public class SystemWindowSizeEvent implements SystemEvent {

public final long window;
public final Window window;
public final int width;
public final int height;

public SystemWindowSizeEvent(long window, int width, int height) {
public SystemWindowSizeEvent(Window window, int width, int height) {
this.window = window;
this.width = width;
this.height = height;
}

@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
.append("window", window)
.append("width", width)
.append("height", height)
.toString();
}

}
@@ -2,17 +2,48 @@

import com.spinyowl.spinygui.backend.core.event.SystemEvent;

public interface SystemEventProcessor {
import java.util.ArrayList;
import java.util.List;
import java.util.Queue;
import java.util.concurrent.LinkedBlockingQueue;

public abstract class SystemEventProcessor {

private static SystemEventProcessor INSTANCE = new SystemEventProcessor() {
private Queue<SystemEvent> eventQueue = new LinkedBlockingQueue<>();

@Override
public void pushEvent(SystemEvent event) {
eventQueue.add(event);
}

@Override
public void processEvents() {
List<SystemEvent> events = new ArrayList<>(eventQueue);
for (SystemEvent event : events) {
this.processEvent(event);
}
eventQueue.removeAll(events);
}

private void processEvent(SystemEvent event) {

}
};

public static SystemEventProcessor getInstance() {
return INSTANCE;
}

/**
* Used to process system event.
*/
void processEvent();
public abstract void processEvents();

/**
* Used to push system event to processing queue.
*
* @param event event to push.
*/
void pushEvent(SystemEvent event);
public abstract void pushEvent(SystemEvent event);
}

This file was deleted.

Oops, something went wrong.
@@ -0,0 +1,13 @@
package com.spinyowl.spinygui.backend.opengl32.event;

import com.spinyowl.spinygui.backend.core.event.SystemWindowCloseEvent;
import com.spinyowl.spinygui.backend.core.event.processor.SystemEventProcessor;
import com.spinyowl.spinygui.backend.opengl32.service.SpinyGuiOpenGL32WindowService;
import org.lwjgl.glfw.GLFWWindowCloseCallback;

public class WindowCloseEventListener extends GLFWWindowCloseCallback {
@Override
public void invoke(long window) {
SystemEventProcessor.getInstance().pushEvent(new SystemWindowCloseEvent(SpinyGuiOpenGL32WindowService.getInstance().getWindow(window)));
}
}
@@ -71,6 +71,10 @@ public boolean closeWindow(Window window) {
public List<Long> getWindowPointers() {
return new ArrayList<>(WINDOW_CACHE.keySet());
}

public Window getWindow(long pointer) {
return WINDOW_CACHE.get(pointer);
}
//
// static Window _createWindow(int width, int height, String title, Monitor monitor) {
// long windowPointer = GLFW.glfwCreateWindow(width, height, title, monitor == null ? 0 : monitor.getPointer(), 0);
@@ -127,7 +127,7 @@ private void processExecutions() {
private void processSystemEvents() {
SystemEventProcessor processor = null;
if (processor != null) {
processor.processEvent();
processor.processEvents();
}
}

@@ -16,7 +16,9 @@
requires org.slf4j;

exports com.spinyowl.spinygui.backend.opengl32.api;

exports com.spinyowl.spinygui.backend.opengl32.event;

exports com.spinyowl.spinygui.backend.opengl32.service;
exports com.spinyowl.spinygui.backend.opengl32.service.internal;
}
@@ -4,7 +4,6 @@

public class Input extends EmptyComponent {


public String getValue() {
return getAttribute("value");
}
@@ -16,6 +16,8 @@
exports com.spinyowl.spinygui.core.converter;
exports com.spinyowl.spinygui.core.event;
exports com.spinyowl.spinygui.core.event.processor;
exports com.spinyowl.spinygui.core.event.listener;
exports com.spinyowl.spinygui.core.event.listener.impl;

exports com.spinyowl.spinygui.core.service;

@@ -6,6 +6,7 @@
import com.spinyowl.spinygui.core.component.base.Component;
import com.spinyowl.spinygui.core.component.base.Text;
import com.spinyowl.spinygui.core.converter.ComponentMarshaller;
import com.spinyowl.spinygui.core.event.listener.impl.DefaultWindowCloseEventListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@@ -25,6 +26,8 @@ public static void main(String[] args) throws Exception {

Window window = Window.createWindow(800, 600, "Example");
Window window2 = Window.createWindow(400, 300, "Example2", null);

window.addWindowCloseEventListener(new DefaultWindowCloseEventListener());
//
Input input = new Input();
input.setName("password");
@@ -0,0 +1 @@
lwjgl_version=3.2.1-SNAPSHOT
Oops, something went wrong.

0 comments on commit 6712390

Please sign in to comment.
You can’t perform that action at this time.