Skip to content

Commit 3f7698f

Browse files
committed
Add javadoc generation
1 parent 5c81054 commit 3f7698f

File tree

4 files changed

+44
-30
lines changed

4 files changed

+44
-30
lines changed

imgui-binding/build.gradle

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,19 @@ task sourcesJar(type: Jar, dependsOn: classes) {
1616
from sourceSets.main.allSource
1717
}
1818

19+
task javadocJar(type: Jar, dependsOn: javadoc) {
20+
archiveClassifier.set('javadoc')
21+
from javadoc.destinationDir
22+
}
23+
1924
publishing {
2025
publications {
2126
MyPublication(MavenPublication) {
2227
from components.java
23-
artifact sourcesJar
24-
groupId 'imgui-java'
28+
groupId 'io.imgui.java'
2529
artifactId 'binding'
30+
artifact sourcesJar
31+
artifact javadocJar
2632
version property('version')
2733
}
2834
}
@@ -34,7 +40,7 @@ bintray {
3440
publications = ['MyPublication']
3541
override = true
3642
pkg {
37-
repo = 'imgui-java'
43+
repo = 'io.imgui.java'
3844
name = 'binding'
3945
userOrg = user
4046
desc = 'A handcrafted 1-1 Java binding for the Dear-ImGui'

imgui-binding/src/main/java/imgui/ImGui.java

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -795,8 +795,8 @@ public static ImDrawList GetWindowDrawList() {
795795
// Parameters stacks (current window)
796796

797797
/**
798-
* Set width of items for common large "item+label" widgets. >0.0f: width in pixels,
799-
* <0.0f align xx pixels to the right of window (so -1.0f always align width to the right side). 0.0f = default to ~2/3 of windows width,
798+
* Set width of items for common large "item+label" widgets. {@code > 0.0f}: width in pixels,
799+
* {@code <0.0f} align xx pixels to the right of window (so -1.0f always align width to the right side). 0.0f = default to ~2/3 of windows width,
800800
*/
801801
public static native void PushItemWidth(float item_width); /*
802802
ImGui::PushItemWidth(item_width);
@@ -807,8 +807,8 @@ public static ImDrawList GetWindowDrawList() {
807807
*/
808808

809809
/**
810-
* Set width of the _next_ common large "item+label" widget. >0.0f: width in pixels,
811-
* <0.0f align xx pixels to the right of window (so -1.0f always align width to the right side)
810+
* Set width of the _next_ common large "item+label" widget. {@code > 0.0f}: width in pixels,
811+
* {@code <0.0f} align xx pixels to the right of window (so -1.0f always align width to the right side)
812812
*/
813813
public static native void SetNextItemWidth(float item_width); /*
814814
ImGui::SetNextItemWidth(item_width);
@@ -822,15 +822,15 @@ public static ImDrawList GetWindowDrawList() {
822822
*/
823823

824824
/**
825-
* Word-wrapping for Text*() commands. < 0.0f: no wrapping; 0.0f: wrap to end of window (or column); > 0.0f: wrap at 'wrap_pos_x'
825+
* Word-wrapping for Text*() commands. {@code < 0.0f}: no wrapping; 0.0f: wrap to end of window (or column); {@code > 0.0f}: wrap at 'wrap_pos_x'
826826
* position in window local space
827827
*/
828828
public static native void PushTextWrapPos(); /*
829829
ImGui::PushTextWrapPos();
830830
*/
831831

832832
/**
833-
* Word-wrapping for Text*() commands. < 0.0f: no wrapping; 0.0f: wrap to end of window (or column); > 0.0f: wrap at 'wrap_pos_x'
833+
* Word-wrapping for Text*() commands. {@code < 0.0f}: no wrapping; 0.0f: wrap to end of window (or column); {@code > 0.0f}: wrap at 'wrap_pos_x'
834834
* position in window local space
835835
*/
836836
public static native void PushTextWrapPos(float wrap_local_pos_x); /*
@@ -1223,21 +1223,21 @@ public static ImDrawList GetWindowDrawList() {
12231223
*/
12241224

12251225
/**
1226-
* <0 frame_padding uses default frame padding settings. 0 for no padding
1226+
* {@code <0} frame_padding uses default frame padding settings. 0 for no padding
12271227
*/
12281228
public static native boolean ImageButton(int textureID, float sizeX, float sizeY); /*
12291229
return ImGui::ImageButton((ImTextureID)textureID, ImVec2(sizeX, sizeY));
12301230
*/
12311231

12321232
/**
1233-
* <0 frame_padding uses default frame padding settings. 0 for no padding
1233+
* {@code <0} frame_padding uses default frame padding settings. 0 for no padding
12341234
*/
12351235
public static native boolean ImageButton(int textureID, float sizeX, float sizeY, float uv0_x, float uv0_y, float uv1_x, float uv1_y, int frame_padding); /*
12361236
return ImGui::ImageButton((ImTextureID)textureID, ImVec2(sizeX, sizeY), ImVec2(uv0_x, uv0_y), ImVec2(uv1_x, uv1_y), frame_padding);
12371237
*/
12381238

12391239
/**
1240-
* <0 frame_padding uses default frame padding settings. 0 for no padding
1240+
* {@code <0} frame_padding uses default frame padding settings. 0 for no padding
12411241
*/
12421242
public static native boolean ImageButton(int textureID, float sizeX, float sizeY, float uv0_x, float uv0_y, float uv1_x, float uv1_y, int frame_padding, float bg_color_r, float bg_color_g, float bg_color_b, float bg_color_a, float tint_col_r, float tint_col_g, float tint_col_b, float tint_col_a); /*
12431243
return ImGui::ImageButton((ImTextureID)textureID, ImVec2(sizeX, sizeY), ImVec2(uv0_x, uv0_y), ImVec2(uv1_x, uv1_y), frame_padding, ImVec4(bg_color_r, bg_color_g, bg_color_b, bg_color_a), ImVec4(tint_col_r, tint_col_g, tint_col_b, tint_col_a));
@@ -1365,21 +1365,21 @@ public static boolean Combo(String label, ImInt current_item, String items_separ
13651365
*/
13661366

13671367
/**
1368-
* If v_min >= v_max we have no bound
1368+
* If {@code v_min >= v_max} we have no bound
13691369
*/
13701370
public static native boolean DragFloat(String label, float[] v, float v_speed, float v_min, float v_max); /*
13711371
return ImGui::DragFloat(label, &v[0], v_speed, v_min, v_max);
13721372
*/
13731373

13741374
/**
1375-
* If v_min >= v_max we have no bound
1375+
* If {@code v_min >= v_max} we have no bound
13761376
*/
13771377
public static native boolean DragFloat(String label, float[] v, float v_speed, float v_min, float v_max, String format); /*
13781378
return ImGui::DragFloat(label, &v[0], v_speed, v_min, v_max, format);
13791379
*/
13801380

13811381
/**
1382-
* If v_min >= v_max we have no bound
1382+
* If {@code v_min >= v_max} we have no bound
13831383
*/
13841384
public static native boolean DragFloat(String label, float[] v, float v_speed, float v_min, float v_max, String format, float power); /*
13851385
return ImGui::DragFloat(label, &v[0], v_speed, v_min, v_max, format, power);
@@ -1498,14 +1498,14 @@ public static boolean Combo(String label, ImInt current_item, String items_separ
14981498
*/
14991499

15001500
/**
1501-
* If v_min >= v_max we have no bound
1501+
* If {@code v_min >= v_max} we have no bound
15021502
*/
15031503
public static native boolean DragInt(String label, int[] v, float v_speed, float v_min, float v_max); /*
15041504
return ImGui::DragInt(label, &v[0], v_speed, v_min, v_max);
15051505
*/
15061506

15071507
/**
1508-
* If v_min >= v_max we have no bound
1508+
* If {@code v_min >= v_max} we have no bound
15091509
*/
15101510
public static native boolean DragInt(String label, int[] v, float v_speed, float v_min, float v_max, String format); /*
15111511
return ImGui::DragInt(label, &v[0], v_speed, v_min, v_max, format);
@@ -4060,14 +4060,14 @@ public static byte[] AcceptDragDropPayload(String type, int imGuiDragDropFlags)
40604060
*/
40614061

40624062
/**
4063-
* Is the last item clicked? (e.g. button/node just clicked on) == IsMouseClicked(mouse_button) && IsItemHovered()
4063+
* Is the last item clicked? (e.g. button/node just clicked on) == {@code IsMouseClicked(mouse_button) && IsItemHovered()}
40644064
*/
40654065
public static native boolean IsItemClicked(); /*
40664066
return ImGui::IsItemClicked();
40674067
*/
40684068

40694069
/**
4070-
* Is the last item clicked? (e.g. button/node just clicked on) == IsMouseClicked(mouse_button) && IsItemHovered()
4070+
* Is the last item clicked? (e.g. button/node just clicked on) == {@code IsMouseClicked(mouse_button) && IsItemHovered()}
40714071
*/
40724072
public static native boolean IsItemClicked(int mouse_button); /*
40734073
return ImGui::IsItemClicked(mouse_button);
@@ -4326,7 +4326,8 @@ public static ImDrawList GetForegroundDrawList() {
43264326
*/
43274327

43284328
/**
4329-
* uUses provided repeat rate/delay. return a count, most often 0 or 1 but might be >1 if RepeatRate is small enough that DeltaTime > RepeatRate
4329+
* Uses provided repeat rate/delay.
4330+
* Return a count, most often 0 or 1 but might be {@code >1} if RepeatRate is small enough that {@code DeltaTime > RepeatRate}
43304331
*/
43314332
public static native boolean GetKeyPressedAmount(int key_index, float repeat_delay, float rate); /*
43324333
return ImGui::GetKeyPressedAmount(key_index, repeat_delay, rate);
@@ -4372,21 +4373,21 @@ public static ImDrawList GetForegroundDrawList() {
43724373
*/
43734374

43744375
/**
4375-
* Is mouse dragging. if lock_threshold < -1.0f uses io.MouseDraggingThreshold
4376+
* Is mouse dragging. if lock_threshold {@code < -1.0f} uses io.MouseDraggingThreshold
43764377
*/
43774378
public static native boolean IsMouseDragging(); /*
43784379
return ImGui::IsMouseDragging();
43794380
*/
43804381

43814382
/**
4382-
* Is mouse dragging. if lock_threshold < -1.0f uses io.MouseDraggingThreshold
4383+
* Is mouse dragging. if lock_threshold {@code < -1.0f} uses io.MouseDraggingThreshold
43834384
*/
43844385
public static native boolean IsMouseDragging(int button); /*
43854386
return ImGui::IsMouseDragging(button);
43864387
*/
43874388

43884389
/**
4389-
* Is mouse dragging. if lock_threshold < -1.0f uses io.MouseDraggingThreshold
4390+
* Is mouse dragging. if lock_threshold {@code < -1.0f} uses io.MouseDraggingThreshold
43904391
*/
43914392
public static native boolean IsMouseDragging(int button, float lock_threshold); /*
43924393
return ImGui::IsMouseDragging(button, lock_threshold);
@@ -4437,23 +4438,23 @@ public static ImDrawList GetForegroundDrawList() {
44374438

44384439
/**
44394440
* Return the delta from the initial clicking position while the mouse button is pressed or was just released.
4440-
* This is locked and return 0.0f until the mouse moves past a distance threshold at least once. If lock_threshold < -1.0f uses io.MouseDraggingThreshold.
4441+
* This is locked and return 0.0f until the mouse moves past a distance threshold at least once. If lock_threshold {@code < -1.0f} uses io.MouseDraggingThreshold.
44414442
*/
44424443
public static native void GetMouseDragDelta(ImVec2 dstImVec2); /*
44434444
Jni::ImVec2Cpy(env, ImGui::GetMouseDragDelta(), dstImVec2);
44444445
*/
44454446

44464447
/**
44474448
* Return the delta from the initial clicking position while the mouse button is pressed or was just released.
4448-
* This is locked and return 0.0f until the mouse moves past a distance threshold at least once. If lock_threshold < -1.0f uses io.MouseDraggingThreshold.
4449+
* This is locked and return 0.0f until the mouse moves past a distance threshold at least once. If lock_threshold {@code < -1.0f} uses io.MouseDraggingThreshold.
44494450
*/
44504451
public static native void GetMouseDragDelta(ImVec2 dstImVec2, int button); /*
44514452
Jni::ImVec2Cpy(env, ImGui::GetMouseDragDelta(button), dstImVec2);
44524453
*/
44534454

44544455
/**
44554456
* Return the delta from the initial clicking position while the mouse button is pressed or was just released.
4456-
* This is locked and return 0.0f until the mouse moves past a distance threshold at least once. If lock_threshold < -1.0f uses io.MouseDraggingThreshold.
4457+
* This is locked and return 0.0f until the mouse moves past a distance threshold at least once. If lock_threshold {@code < -1.0f} uses io.MouseDraggingThreshold.
44574458
*/
44584459
public static native void GetMouseDragDelta(ImVec2 dstImVec2, int button, float lock_threshold); /*
44594460
Jni::ImVec2Cpy(env, ImGui::GetMouseDragDelta(button, lock_threshold), dstImVec2);

imgui-lwjgl3/build.gradle

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,19 @@ task sourcesJar(type: Jar, dependsOn: classes) {
3232
from sourceSets.main.allSource
3333
}
3434

35+
task javadocJar(type: Jar, dependsOn: javadoc) {
36+
archiveClassifier.set('javadoc')
37+
from javadoc.destinationDir
38+
}
39+
3540
publishing {
3641
publications {
3742
MyPublication(MavenPublication) {
3843
from components.java
39-
groupId 'imgui-java'
40-
artifact sourcesJar
44+
groupId 'io.imgui.java'
4145
artifactId 'lwjgl3'
46+
artifact sourcesJar
47+
artifact javadocJar
4248
version property('version')
4349
}
4450
}
@@ -50,7 +56,7 @@ bintray {
5056
publications = ['MyPublication']
5157
override = true
5258
pkg {
53-
repo = 'imgui-java'
59+
repo = 'io.imgui.java'
5460
name = 'lwjgl3'
5561
userOrg = user
5662
desc = 'Backend implementation for imgui-java based on LWJGL3'

imgui-lwjgl3/src/main/java/imgui/gl3/ImGuiImplGl3.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
import static org.lwjgl.opengl.GL30.*;
1515

1616
/**
17-
* This class mostly a straightforward port of the https://raw.githubusercontent.com/ocornut/imgui/v1.74/examples/imgui_impl_opengl3.cpp
17+
* This class mostly a straightforward port of the
18+
* <a href="https://raw.githubusercontent.com/ocornut/imgui/v1.74/examples/imgui_impl_opengl3.cpp">https://raw.githubusercontent.com/ocornut/imgui/v1.74/examples/imgui_impl_opengl3.cpp</a>
1819
* adapted for Java and LWJGL realms.
1920
* <p>
2021
* It do support a backup of the current GL state before rendering and restoring of its initial state after.

0 commit comments

Comments
 (0)