Skip to content

Commit d799e70

Browse files
committed
Add Appindicator class
1 parent 08fcc52 commit d799e70

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package org.purejava.linux;
2+
3+
import java.lang.foreign.MemorySegment;
4+
5+
public class Appindicator {
6+
public static MemorySegment APPINDICATOR = RuntimeHelper.CONSTANT_ALLOCATOR.allocate(AppIndicator.$LAYOUT());
7+
private final String id;
8+
private final String icon_name;
9+
private final int category;
10+
11+
public Appindicator(String id, String icon_name, int category) {
12+
this.id = id;
13+
this.icon_name = icon_name;
14+
this.category = category;
15+
}
16+
17+
public static MemorySegment ALLOCATE_FOR(String str) {
18+
return RuntimeHelper.CONSTANT_ALLOCATOR.allocateUtf8String(str);
19+
}
20+
}

0 commit comments

Comments
 (0)