Cleanup statusbar types

This commit is contained in:
Robinson 2022-05-23 14:21:41 +02:00
parent fe9c1a4a14
commit f31704e232
No known key found for this signature in database
GPG Key ID: 8E7DB78588BD6F5C
4 changed files with 5 additions and 52 deletions

View File

@ -25,8 +25,8 @@ import dorkbox.jna.macos.foundation.ObjectiveC;
public
class NSStatusBar extends NSObject {
public final static double NSVariableStatusItemLength = -1; // can specify exactly how wide to make the space
public final static double NSSquareStatusItemLength = -2; // the space will be a square
public final static float NSVariableStatusItemLength = -1; // A status item length that dynamically adjusts to the width of its contents.
public final static float NSSquareStatusItemLength = -2; // A status item length that is equal to the status bars thickness.
static Pointer objectClass = ObjectiveC.objc_lookUpClass("NSStatusBar");
@ -46,7 +46,8 @@ class NSStatusBar extends NSObject {
public
NSStatusItem newStatusItem() {
return new NSStatusItem(ObjectiveC.objc_msgSend(this, statusItemWithLength, NSStatusBar.NSSquareStatusItemLength));
long result = ObjectiveC.objc_msgSend(this, statusItemWithLength, NSStatusBar.NSSquareStatusItemLength);
return result != 0 ? new NSStatusItem(result) : null;
}
public

View File

@ -1,24 +0,0 @@
/*
* Copyright 2021 dorkbox, llc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package dorkbox.util.collections;
/**
* Required for intellij to not complain regarding `module-info` for a multi-release jar.
* This file is completely ignored by the gradle build process
*/
public
class EmptyClass {}

View File

@ -1,24 +0,0 @@
/*
* Copyright 2021 dorkbox, llc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package dorkbox.util.swing;
/**
* Required for intellij to not complain regarding `module-info` for a multi-release jar.
* This file is completely ignored by the gradle build process
*/
public
class EmptyClass {}

View File

@ -18,13 +18,13 @@ module dorkbox.utilities {
exports dorkbox.util.exceptions;
exports dorkbox.util.gwt;
exports dorkbox.util.properties;
exports dorkbox.util.swing;
exports dorkbox.util.userManagement;
requires transitive dorkbox.executor;
requires transitive dorkbox.updates;
requires transitive kotlin.stdlib;
requires kotlinx.coroutines.core.jvm;
requires static com.sun.jna;
requires static com.sun.jna.platform;