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
;
23 * Main interface for ScritchUI, all the logic calls are made through this
29 public interface ScritchInterface
30 extends ScritchApiInterface
33 * Returns the generic choice interface.
35 * @return The generic choice interface.
40 ScritchChoiceInterface
choice();
43 * Returns the generic component interface.
45 * @return The generic component interface.
50 ScritchComponentInterface
component();
53 * Returns the generic container interface.
55 * @return The generic container interface.
60 ScritchContainerInterface
container();
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
71 void objectDelete(@NotNull ScritchBaseBracket __object
)
75 * Returns the interface which contains information on the environment.
77 * @return The environment interface.
82 ScritchEnvironmentInterface
environment();
85 * Returns the event loop interface.
87 * @return The event loop interface.
92 ScritchEventLoopInterface
eventLoop();
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
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.
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
,
119 @Range(from
= 0, to
= Integer
.MAX_VALUE
) int __sw
,
120 @Range(from
= 0, to
= Integer
.MAX_VALUE
) int __sh
)
124 * Returns the list interface.
126 * @return The interface for lists.
129 @SquirrelJMEVendorApi
131 ScritchListInterface
list();
134 * Interface for menu manipulation.
136 * @return The menu manipulation Api.
139 @SquirrelJMEVendorApi
141 ScritchMenuInterface
menu();
144 * Returns the interface for generic paintables.
146 * @return Returns the interface for generic paintables.
149 @SquirrelJMEVendorApi
151 ScritchPaintableInterface
paintable();
154 * Return the interface for panels.
156 * @return The panel interface.
159 @SquirrelJMEVendorApi
161 ScritchPanelInterface
panel();
164 * Returns the screen interface.
166 * @return The screen interface.
169 @SquirrelJMEVendorApi
171 ScritchScreenInterface
screen();
174 * Returns the window interface.
176 * @return The window interface.
179 @SquirrelJMEVendorApi
181 ScritchWindowInterface
window();