Skip to content
This repository was archived by the owner on Jun 19, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007

Copyright (C) 2020 LabyMedia GmbH. <https://labymedia.com/>
Copyright (C) 2020 - 2021 LabyMedia GmbH. <https://labymedia.com/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ the Library in order to provide the natives!**

See [Examples](https://github.com/LabyMod/ultralight-java/tree/develop/example) for more info.

# Sponsors
[<img src="https://www.yourkit.com/images/yklogo.png"/>](https://www.yourkit.com/)

YourKit supports open source projects with innovative and intelligent tools for monitoring and profiling Java and .NET applications.
YourKit is the creator of [YourKit Java Profiler](https://www.yourkit.com/java/profiler/), [YourKit .NET Profiler](https://www.yourkit.com/.net/profiler/), and [YourKit YouMonitor](https://www.yourkit.com/youmonitor/).

# Licensing
For Ultralight Java [LGPLv3](https://www.gnu.org/licenses/lgpl-3.0.en.html) is being used, however, Ultralight itself is
licensed under a custom proprietary license. See
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.5
0.3.6
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ subprojects {

ext {
author = "LabyMedia"
year = Calendar.getInstance(TimeZone.getTimeZone("UTC")).get(Calendar.YEAR)
year = "2020 - " + Calendar.getInstance(TimeZone.getTimeZone("UTC")).get(Calendar.YEAR)
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Ultralight Java - Java wrapper for the Ultralight web engine
* Copyright (C) 2020 LabyMedia and contributors
* Copyright (C) 2020 - 2021 LabyMedia and contributors
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Ultralight Java - Java wrapper for the Ultralight web engine
* Copyright (C) 2020 LabyMedia and contributors
* Copyright (C) 2020 - 2021 LabyMedia and contributors
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Ultralight Java - Java wrapper for the Ultralight web engine
* Copyright (C) 2020 LabyMedia and contributors
* Copyright (C) 2020 - 2021 LabyMedia and contributors
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Ultralight Java - Java wrapper for the Ultralight web engine
* Copyright (C) 2020 LabyMedia and contributors
* Copyright (C) 2020 - 2021 LabyMedia and contributors
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Ultralight Java - Java wrapper for the Ultralight web engine
* Copyright (C) 2020 LabyMedia and contributors
* Copyright (C) 2020 - 2021 LabyMedia and contributors
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Ultralight Java - Java wrapper for the Ultralight web engine
* Copyright (C) 2020 LabyMedia and contributors
* Copyright (C) 2020 - 2021 LabyMedia and contributors
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Ultralight Java - Java wrapper for the Ultralight web engine
* Copyright (C) 2020 LabyMedia and contributors
* Copyright (C) 2020 - 2021 LabyMedia and contributors
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Ultralight Java - Java wrapper for the Ultralight web engine
* Copyright (C) 2020 LabyMedia and contributors
* Copyright (C) 2020 - 2021 LabyMedia and contributors
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand All @@ -19,11 +19,11 @@

package com.labymedia.ultralight.lwjgl3.opengl.listener;

import com.labymedia.ultralight.Databind;
import com.labymedia.ultralight.DatabindConfiguration;
import com.labymedia.ultralight.DatabindJavascriptClass;
import com.labymedia.ultralight.UltralightView;
import com.labymedia.ultralight.api.JavaAPI;
import com.labymedia.ultralight.databind.Databind;
import com.labymedia.ultralight.databind.DatabindConfiguration;
import com.labymedia.ultralight.databind.DatabindJavascriptClass;
import com.labymedia.ultralight.databind.api.JavaAPI;
import com.labymedia.ultralight.javascript.*;
import com.labymedia.ultralight.lwjgl3.opengl.support.ViewContextProvider;
import com.labymedia.ultralight.plugin.loading.UltralightLoadListener;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Ultralight Java - Java wrapper for the Ultralight web engine
* Copyright (C) 2020 LabyMedia and contributors
* Copyright (C) 2020 - 2021 LabyMedia and contributors
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Ultralight Java - Java wrapper for the Ultralight web engine
* Copyright (C) 2020 LabyMedia and contributors
* Copyright (C) 2020 - 2021 LabyMedia and contributors
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Ultralight Java - Java wrapper for the Ultralight web engine
* Copyright (C) 2020 LabyMedia and contributors
* Copyright (C) 2020 - 2021 LabyMedia and contributors
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Ultralight Java - Java wrapper for the Ultralight web engine
* Copyright (C) 2020 LabyMedia and contributors
* Copyright (C) 2020 - 2021 LabyMedia and contributors
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand All @@ -20,8 +20,8 @@
package com.labymedia.ultralight.lwjgl3.opengl.support;

import com.labymedia.ultralight.UltralightView;
import com.labymedia.ultralight.context.ContextProviderFactory;
import com.labymedia.ultralight.context.ContextProvider;
import com.labymedia.ultralight.databind.context.ContextProvider;
import com.labymedia.ultralight.databind.context.ContextProviderFactory;
import com.labymedia.ultralight.javascript.JavascriptContextLock;
import com.labymedia.ultralight.javascript.JavascriptValue;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Ultralight Java - Java wrapper for the Ultralight web engine
* Copyright (C) 2020 LabyMedia and contributors
* Copyright (C) 2020 - 2021 LabyMedia and contributors
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand All @@ -26,6 +26,7 @@
import com.labymedia.ultralight.bitmap.UltralightBitmapSurface;
import com.labymedia.ultralight.config.FontHinting;
import com.labymedia.ultralight.config.UltralightConfig;
import com.labymedia.ultralight.javascript.JavascriptContextLock;
import com.labymedia.ultralight.lwjgl3.opengl.input.CursorAdapter;
import com.labymedia.ultralight.lwjgl3.opengl.input.InputAdapter;
import com.labymedia.ultralight.lwjgl3.opengl.input.ClipboardAdapter;
Expand All @@ -49,6 +50,7 @@ public class WebController {
private final InputAdapter inputAdapter;

private int glTexture;
private long lastJavascriptGarbageCollections;

/**
* Constructs a new {@link WebController} and retrieves the platform.
Expand Down Expand Up @@ -77,7 +79,9 @@ public WebController(CursorAdapter cursorManager) {
this.view.setViewListener(viewListener);
this.loadListener = new ExampleLoadListener(view);
this.view.setLoadListener(loadListener);

this.glTexture = -1;
this.lastJavascriptGarbageCollections = 0;

this.inputAdapter = new InputAdapter(view);
}
Expand Down Expand Up @@ -106,6 +110,16 @@ public void loadURL(String url) {
public void update() {
this.renderer.update();
this.renderer.render();

if(lastJavascriptGarbageCollections == 0) {
lastJavascriptGarbageCollections = System.currentTimeMillis();
} else if(System.currentTimeMillis() - lastJavascriptGarbageCollections > 1000) {
System.out.println("Garbage collecting Javascript...");
try(JavascriptContextLock lock = this.view.lockJavascriptContext()) {
lock.getContext().garbageCollect();
}
lastJavascriptGarbageCollections = System.currentTimeMillis();
}
}

/**
Expand Down
2 changes: 1 addition & 1 deletion example/lwjgl3-opengl/src/main/resources/example.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<!--
Ultralight Java - Java wrapper for the Ultralight web engine
Copyright (C) 2020 LabyMedia and contributors
Copyright (C) 2020 - 2021 LabyMedia and contributors

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
Expand Down
2 changes: 1 addition & 1 deletion example/lwjgl3-opengl/src/main/resources/example.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Ultralight Java - Java wrapper for the Ultralight web engine
* Copyright (C) 2020 LabyMedia and contributors
* Copyright (C) 2020 - 2021 LabyMedia and contributors
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down
2 changes: 1 addition & 1 deletion example/lwjgl3-opengl/src/main/resources/style.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Ultralight Java - Java wrapper for the Ultralight web engine
* Copyright (C) 2020 LabyMedia and contributors
* Copyright (C) 2020 - 2021 LabyMedia and contributors
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down
8 changes: 8 additions & 0 deletions ultralight-java-base/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ plugins {

group 'com.labymedia'

jar {
manifest {
attributes(
'Automatic-Module-Name': 'com.labymedia.ultralight'
)
}
}

processResources {
from(nativeBinaries) {
into "native-binaries"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Ultralight Java - Java wrapper for the Ultralight web engine
* Copyright (C) 2020 LabyMedia and contributors
* Copyright (C) 2020 - 2021 LabyMedia and contributors
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Ultralight Java - Java wrapper for the Ultralight web engine
* Copyright (C) 2020 LabyMedia and contributors
* Copyright (C) 2020 - 2021 LabyMedia and contributors
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Ultralight Java - Java wrapper for the Ultralight web engine
* Copyright (C) 2020 LabyMedia and contributors
* Copyright (C) 2020 - 2021 LabyMedia and contributors
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Ultralight Java - Java wrapper for the Ultralight web engine
* Copyright (C) 2020 LabyMedia and contributors
* Copyright (C) 2020 - 2021 LabyMedia and contributors
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Ultralight Java - Java wrapper for the Ultralight web engine
* Copyright (C) 2020 LabyMedia and contributors
* Copyright (C) 2020 - 2021 LabyMedia and contributors
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Ultralight Java - Java wrapper for the Ultralight web engine
* Copyright (C) 2020 LabyMedia and contributors
* Copyright (C) 2020 - 2021 LabyMedia and contributors
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Ultralight Java - Java wrapper for the Ultralight web engine
* Copyright (C) 2020 LabyMedia and contributors
* Copyright (C) 2020 - 2021 LabyMedia and contributors
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Ultralight Java - Java wrapper for the Ultralight web engine
* Copyright (C) 2020 LabyMedia and contributors
* Copyright (C) 2020 - 2021 LabyMedia and contributors
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Ultralight Java - Java wrapper for the Ultralight web engine
* Copyright (C) 2020 LabyMedia and contributors
* Copyright (C) 2020 - 2021 LabyMedia and contributors
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Ultralight Java - Java wrapper for the Ultralight web engine
* Copyright (C) 2020 LabyMedia and contributors
* Copyright (C) 2020 - 2021 LabyMedia and contributors
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Ultralight Java - Java wrapper for the Ultralight web engine
* Copyright (C) 2020 LabyMedia and contributors
* Copyright (C) 2020 - 2021 LabyMedia and contributors
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Ultralight Java - Java wrapper for the Ultralight web engine
* Copyright (C) 2020 LabyMedia and contributors
* Copyright (C) 2020 - 2021 LabyMedia and contributors
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Ultralight Java - Java wrapper for the Ultralight web engine
* Copyright (C) 2020 LabyMedia and contributors
* Copyright (C) 2020 - 2021 LabyMedia and contributors
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Ultralight Java - Java wrapper for the Ultralight web engine
* Copyright (C) 2020 LabyMedia and contributors
* Copyright (C) 2020 - 2021 LabyMedia and contributors
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Ultralight Java - Java wrapper for the Ultralight web engine
* Copyright (C) 2020 LabyMedia and contributors
* Copyright (C) 2020 - 2021 LabyMedia and contributors
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Ultralight Java - Java wrapper for the Ultralight web engine
* Copyright (C) 2020 LabyMedia and contributors
* Copyright (C) 2020 - 2021 LabyMedia and contributors
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Ultralight Java - Java wrapper for the Ultralight web engine
* Copyright (C) 2020 LabyMedia and contributors
* Copyright (C) 2020 - 2021 LabyMedia and contributors
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Ultralight Java - Java wrapper for the Ultralight web engine
* Copyright (C) 2020 LabyMedia and contributors
* Copyright (C) 2020 - 2021 LabyMedia and contributors
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Ultralight Java - Java wrapper for the Ultralight web engine
* Copyright (C) 2020 LabyMedia and contributors
* Copyright (C) 2020 - 2021 LabyMedia and contributors
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down
Loading