Skip to content

Commit

Permalink
add java methods
Browse files Browse the repository at this point in the history
  • Loading branch information
mworzala committed Feb 8, 2022
1 parent 3c702ce commit 494a3bf
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 0 deletions.
10 changes: 10 additions & 0 deletions linux/java/WindowX11.java
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,16 @@ public Window setZOrder(ZOrder order) {
return this;
}

@Override
public float getProgressBar() {
throw new UnsupportedOperationException("impl me!");
}

@Override
public Window setProgressBar(float progress) {
throw new UnsupportedOperationException("impl me!");
}

@Override
public Window restore() {
_nRestore();
Expand Down
15 changes: 15 additions & 0 deletions macos/java/WindowMac.java
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,19 @@ public Window setZOrder(ZOrder order) {
return this;
}

@Override
public float getProgressBar() {
assert _onUIThread();
return _nGetProgressBar();
}

@Override
public Window setProgressBar(float progress) {
assert _onUIThread();
_nSetProgressBar(progress);
return this;
}

@Override
public void close() {
assert _onUIThread();
Expand Down Expand Up @@ -245,5 +258,7 @@ public void close() {
@ApiStatus.Internal public native void _nFocus();
@ApiStatus.Internal public native int _nGetZOrder();
@ApiStatus.Internal public native void _nSetZOrder(int zOrder);
@ApiStatus.Internal public native void _nGetProgressBar();
@ApiStatus.Internal public native void _nSetProgressBar(float value);
@ApiStatus.Internal public native void _nClose();
}
5 changes: 5 additions & 0 deletions shared/java/Window.java
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,11 @@ public Window setVisible(boolean isVisible) {
*/
public abstract Window setZOrder(ZOrder order);

public abstract float getProgressBar();

@NotNull @Contract("-> this")
public abstract Window setProgressBar(float progress);

/**
* <p>Feed an event to Window’s listener. Same as getEventListener().accept(Event)</p>
*/
Expand Down
10 changes: 10 additions & 0 deletions windows/java/WindowWin32.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,16 @@ public Window setZOrder(ZOrder order) {
return this;
}

@Override
public float getProgressBar() {
throw new UnsupportedOperationException("impl me!");
}

@Override
public Window setProgressBar(float progress) {
throw new UnsupportedOperationException("impl me!");
}

@Override
public void close() {
assert _onUIThread();
Expand Down

0 comments on commit 494a3bf

Please sign in to comment.