Java base for menu initialization; Add base for deletion of ScritchUI objects.
[SquirrelJME.git] / modules / scritch-ui / src / main / java / cc / squirreljme / jvm / mle / scritchui / ScritchInterface.java
blob5cd636b0a4c812259aa336c576b4d70ce16e67e0
1 // -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
2 // ---------------------------------------------------------------------------
3 // Multi-Phasic Applications: SquirrelJME
4 // Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
5 // ---------------------------------------------------------------------------
6 // SquirrelJME is under the Mozilla Public License Version 2.0.
7 // See license.mkd for licensing and copyright information.
8 // ---------------------------------------------------------------------------
10 package cc.squirreljme.jvm.mle.scritchui;
12 import cc.squirreljme.jvm.mle.brackets.PencilBracket;
13 import cc.squirreljme.jvm.mle.constants.UIPixelFormat;
14 import cc.squirreljme.jvm.mle.exceptions.MLECallError;
15 import cc.squirreljme.jvm.mle.scritchui.brackets.ScritchBaseBracket;
16 import cc.squirreljme.runtime.cldc.annotation.SquirrelJMEVendorApi;
17 import org.intellij.lang.annotations.MagicConstant;
18 import org.jetbrains.annotations.NotNull;
19 import org.jetbrains.annotations.Nullable;
20 import org.jetbrains.annotations.Range;
22 /**
23 * Main interface for ScritchUI, all the logic calls are made through this
24 * initially.
26 * @since 2024/02/29
28 @SquirrelJMEVendorApi
29 public interface ScritchInterface
30 extends ScritchApiInterface
32 /**
33 * Returns the generic choice interface.
35 * @return The generic choice interface.
36 * @since 2024/07/16
38 @SquirrelJMEVendorApi
39 @NotNull
40 ScritchChoiceInterface choice();
42 /**
43 * Returns the generic component interface.
45 * @return The generic component interface.
46 * @since 2024/03/16
48 @SquirrelJMEVendorApi
49 @NotNull
50 ScritchComponentInterface component();
52 /**
53 * Returns the generic container interface.
55 * @return The generic container interface.
56 * @since 2024/03/16
58 @SquirrelJMEVendorApi
59 @NotNull
60 ScritchContainerInterface container();
62 /**
63 * Deletes the given object.
65 * @param __object The object to delete.
66 * @throws MLECallError If the object is {@code null} or not valid to be
67 * deleted.
68 * @since 2024/07/20
70 @SquirrelJMEVendorApi
71 void objectDelete(@NotNull ScritchBaseBracket __object)
72 throws MLECallError;
74 /**
75 * Returns the interface which contains information on the environment.
77 * @return The environment interface.
78 * @since 2024/03/07
80 @SquirrelJMEVendorApi
81 @NotNull
82 ScritchEnvironmentInterface environment();
84 /**
85 * Returns the event loop interface.
87 * @return The event loop interface.
88 * @since 2024/03/16
90 @SquirrelJMEVendorApi
91 @NotNull
92 ScritchEventLoopInterface eventLoop();
94 /**
95 * Creates a hardware reference bracket to the native hardware graphics.
97 * @param __pf The {@link UIPixelFormat} used for the draw.
98 * @param __bw The buffer width, this is the scanline width of the buffer.
99 * @param __bh The buffer height.
100 * @param __buf The target buffer to draw to, this is cast to the correct
101 * buffer format.
102 * @param __pal The color palette, may be {@code null}.
103 * @param __sx Starting surface X coordinate.
104 * @param __sy Starting surface Y coordinate.
105 * @param __sw Surface width.
106 * @param __sh Surface height.
107 * @return The bracket capable of drawing hardware accelerated graphics.
108 * @throws MLECallError If the requested graphics are not valid.
109 * @since 2020/09/25
111 @SquirrelJMEVendorApi
112 PencilBracket hardwareGraphics(
113 @MagicConstant(valuesFromClass = UIPixelFormat.class) int __pf,
114 @Range(from = 0, to = Integer.MAX_VALUE) int __bw,
115 @Range(from = 0, to = Integer.MAX_VALUE) int __bh,
116 @NotNull Object __buf,
117 @Nullable int[] __pal,
118 int __sx, int __sy,
119 @Range(from = 0, to = Integer.MAX_VALUE) int __sw,
120 @Range(from = 0, to = Integer.MAX_VALUE) int __sh)
121 throws MLECallError;
124 * Returns the list interface.
126 * @return The interface for lists.
127 * @since 2024/07/16
129 @SquirrelJMEVendorApi
130 @NotNull
131 ScritchListInterface list();
134 * Interface for menu manipulation.
136 * @return The menu manipulation Api.
137 * @since 2024/07/20
139 @SquirrelJMEVendorApi
140 @NotNull
141 ScritchMenuInterface menu();
144 * Returns the interface for generic paintables.
146 * @return Returns the interface for generic paintables.
147 * @since 2024/07/16
149 @SquirrelJMEVendorApi
150 @NotNull
151 ScritchPaintableInterface paintable();
154 * Return the interface for panels.
156 * @return The panel interface.
157 * @since 2024/03/16
159 @SquirrelJMEVendorApi
160 @NotNull
161 ScritchPanelInterface panel();
164 * Returns the screen interface.
166 * @return The screen interface.
167 * @since 2024/03/10
169 @SquirrelJMEVendorApi
170 @NotNull
171 ScritchScreenInterface screen();
174 * Returns the window interface.
176 * @return The window interface.
177 * @since 2024/03/09
179 @SquirrelJMEVendorApi
180 @NotNull
181 ScritchWindowInterface window();