@deafwave/osrs-botmaker-types 0.3.1 → 0.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/types/java/Java.d.ts +8 -0
- package/dist/src/types/java/JavaImporter.d.ts +6 -0
- package/dist/src/types/java/awt/BorderLayout.d.ts +16 -0
- package/dist/src/types/java/awt/Color.d.ts +2 -0
- package/dist/src/types/java/awt/Component.d.ts +5 -0
- package/dist/src/types/java/awt/Container.d.ts +12 -0
- package/dist/src/types/java/awt/FlowLayout.d.ts +16 -0
- package/dist/src/types/java/awt/Font.d.ts +24 -0
- package/dist/src/types/java/awt/GradientPaint.d.ts +5 -0
- package/dist/src/types/java/awt/Graphics2D.d.ts +3 -1
- package/dist/src/types/java/awt/GridBagConstraints.d.ts +56 -0
- package/dist/src/types/java/awt/GridBagLayout.d.ts +13 -0
- package/dist/src/types/java/awt/Insets.d.ts +28 -0
- package/dist/src/types/java/awt/Polygon.d.ts +14 -0
- package/dist/src/types/java/awt/Rectangle.d.ts +18 -0
- package/dist/src/types/java/awt/ToolKit.d.ts +15 -0
- package/dist/src/types/java/awt/datatransfer/Clipboard.d.ts +40 -0
- package/dist/src/types/java/awt/datatransfer/ClipboardOwner.d.ts +14 -0
- package/dist/src/types/java/awt/datatransfer/DataFlavor.d.ts +33 -0
- package/dist/src/types/java/awt/datatransfer/StringSelection.d.ts +34 -0
- package/dist/src/types/java/awt/datatransfer/Transferable.d.ts +24 -0
- package/dist/src/types/java/awt/event/ActionListener.d.ts +6 -0
- package/dist/src/types/java/awt/event/ChangeListener.d.ts +6 -0
- package/dist/src/types/java/awt/event/DocumentListener.d.ts +28 -0
- package/dist/src/types/java/awt/event/FocusListener.d.ts +15 -0
- package/dist/src/types/java/awt/event/ItemListener.d.ts +11 -0
- package/dist/src/types/java/awt/event/KeyAdapter.d.ts +9 -0
- package/dist/src/types/java/awt/event/KeyEvent.d.ts +72 -8
- package/dist/src/types/java/awt/event/KeyListener.d.ts +7 -0
- package/dist/src/types/java/awt/event/MouseAdapter.d.ts +11 -0
- package/dist/src/types/java/awt/event/MouseListener.d.ts +11 -0
- package/dist/src/types/java/awt/event/WindowListener.d.ts +25 -0
- package/dist/src/types/java/awt/geom/AffineTransform.d.ts +47 -0
- package/dist/src/types/java/index.d.ts +65 -0
- package/dist/src/types/java/lang/Object.d.ts +18 -0
- package/dist/src/types/java/swing/Border.d.ts +7 -0
- package/dist/src/types/java/swing/BorderFactory.d.ts +18 -0
- package/dist/src/types/java/swing/BoxLayout.d.ts +11 -0
- package/dist/src/types/java/swing/CustomPanel.d.ts +5 -0
- package/dist/src/types/java/swing/DefaultListModel.d.ts +15 -0
- package/dist/src/types/java/swing/DefaultTableModel.d.ts +17 -0
- package/dist/src/types/java/swing/Icon.d.ts +11 -0
- package/dist/src/types/java/swing/JButton.d.ts +36 -0
- package/dist/src/types/java/swing/JCheckBox.d.ts +17 -0
- package/dist/src/types/java/swing/JComboBox.d.ts +25 -0
- package/dist/src/types/java/swing/JComponent.d.ts +20 -0
- package/dist/src/types/java/swing/JFrame.d.ts +31 -0
- package/dist/src/types/java/swing/JLabel.d.ts +27 -0
- package/dist/src/types/java/swing/JList.d.ts +22 -0
- package/dist/src/types/java/swing/JMenu.d.ts +13 -0
- package/dist/src/types/java/swing/JMenuBar.d.ts +11 -0
- package/dist/src/types/java/swing/JMenuItem.d.ts +12 -0
- package/dist/src/types/java/swing/JPanel.d.ts +33 -0
- package/dist/src/types/java/swing/JProgressBar.d.ts +18 -0
- package/dist/src/types/java/swing/JScrollPane.d.ts +28 -0
- package/dist/src/types/java/swing/JSlider.d.ts +24 -0
- package/dist/src/types/java/swing/JSplitPane.d.ts +22 -0
- package/dist/src/types/java/swing/JTabbedPane.d.ts +16 -0
- package/dist/src/types/java/swing/JTable.d.ts +27 -0
- package/dist/src/types/java/swing/JTextArea.d.ts +29 -0
- package/dist/src/types/java/swing/JTextField.d.ts +24 -0
- package/dist/src/types/java/swing/JToggleButton.d.ts +8 -0
- package/dist/src/types/java/swing/JToolBar.d.ts +14 -0
- package/dist/src/types/java/swing/ListSelectionModel.d.ts +18 -0
- package/dist/src/types/java/swing/TableModel.d.ts +34 -0
- package/dist/src/types/java/swing/createToggleboxDropdownPanel.d.ts +10 -0
- package/dist/src/types/java/swing/event/ListSelectionEvent.d.ts +10 -0
- package/dist/src/types/java/swing/event/ListSelectionListener.d.ts +5 -0
- package/dist/src/types/java/swing/table/DefaultTableCellRenderer.d.ts +18 -0
- package/dist/src/types/java/swing/table/TableColumn.d.ts +5 -0
- package/dist/src/types/java/swing/table/TableColumnModel.d.ts +5 -0
- package/dist/src/types/java/util/index.d.ts +90 -53
- package/dist/src/types/runelite/net/runelite/api/AnimationID.d.ts +90 -22
- package/dist/src/types/runelite/net/runelite/api/EnumID.d.ts +21 -0
- package/dist/src/types/runelite/net/runelite/api/ItemID.d.ts +730 -22
- package/dist/src/types/runelite/net/runelite/api/KeyCode.d.ts +99 -6
- package/dist/src/types/runelite/net/runelite/api/NpcID.d.ts +1222 -45
- package/dist/src/types/runelite/net/runelite/api/ObjectID.d.ts +2500 -208
- package/dist/src/types/runelite/net/runelite/api/ParamID.d.ts +163 -0
- package/dist/src/types/runelite/net/runelite/api/ScriptID.d.ts +96 -7
- package/dist/src/types/runelite/net/runelite/api/SpriteID.d.ts +139 -9
- package/dist/src/types/runelite/net/runelite/api/coords/WorldPoint.d.ts +16 -72
- package/dist/src/types/runelite/net/runelite/api/widgets/ComponentID.d.ts +80 -1789
- package/dist/src/types/runelite/net/runelite/api/widgets/WidgetID.d.ts +155 -157
- package/dist/src/types/runelite/net/runelite/client/config/ConfigManager.d.ts +101 -112
- package/dist/src/types/sox/api/bot.d.ts +93 -4
- package/dist/src/types/sox/index.d.ts +45 -2
- package/package.json +53 -53
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare namespace java.awt {
|
|
2
|
+
export class BorderLayout {
|
|
3
|
+
static NORTH: string;
|
|
4
|
+
static SOUTH: string;
|
|
5
|
+
static EAST: string;
|
|
6
|
+
static WEST: string;
|
|
7
|
+
static CENTER: string;
|
|
8
|
+
constructor(hgap?: number, vgap?: number);
|
|
9
|
+
getHgap(): number;
|
|
10
|
+
setHgap(hgap: number): void;
|
|
11
|
+
getVgap(): number;
|
|
12
|
+
setVgap(vgap: number): void;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
type BorderLayout = java.awt.BorderLayout;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare namespace java.awt {
|
|
2
|
+
export class Container {
|
|
3
|
+
add(comp: java.awt.Component, constraints?: any): java.awt.Component;
|
|
4
|
+
remove(comp: java.awt.Component): void;
|
|
5
|
+
removeAll(): void;
|
|
6
|
+
setLayout(layout: java.awt.LayoutManager): void;
|
|
7
|
+
validate(): void;
|
|
8
|
+
repaint(): void;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
type Container = java.awt.Container;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare namespace java.awt {
|
|
2
|
+
export class FlowLayout {
|
|
3
|
+
static LEFT: number;
|
|
4
|
+
static CENTER: number;
|
|
5
|
+
static RIGHT: number;
|
|
6
|
+
static LEADING: number;
|
|
7
|
+
static TRAILING: number;
|
|
8
|
+
constructor(alignment?: number, hgap?: number, vgap?: number);
|
|
9
|
+
getHgap(): number;
|
|
10
|
+
setHgap(hgap: number): void;
|
|
11
|
+
getVgap(): number;
|
|
12
|
+
setVgap(vgap: number): void;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
type FlowLayout = java.awt.FlowLayout;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
declare namespace java.awt {
|
|
2
|
+
class Font {
|
|
3
|
+
constructor(name: string, style: number, size: number);
|
|
4
|
+
|
|
5
|
+
static PLAIN: number;
|
|
6
|
+
static BOLD: number;
|
|
7
|
+
static ITALIC: number;
|
|
8
|
+
|
|
9
|
+
getName(): string;
|
|
10
|
+
getStyle(): number;
|
|
11
|
+
getSize(): number;
|
|
12
|
+
getFamily(): string;
|
|
13
|
+
isBold(): boolean;
|
|
14
|
+
isItalic(): boolean;
|
|
15
|
+
isPlain(): boolean;
|
|
16
|
+
|
|
17
|
+
deriveFont(style: number): Font;
|
|
18
|
+
deriveFont(size: number): Font;
|
|
19
|
+
deriveFont(style: number, size: number): Font;
|
|
20
|
+
|
|
21
|
+
toString(): string;
|
|
22
|
+
equals(obj: any): boolean;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -8,7 +8,9 @@ declare namespace java.awt {
|
|
|
8
8
|
fillOval(x: number, y: number, width: number, height: number): void;
|
|
9
9
|
drawPolygon(xPoints: number[], yPoints: number[], nPoints: number): void;
|
|
10
10
|
fillPolygon(xPoints: number[], yPoints: number[], nPoints: number): void;
|
|
11
|
-
|
|
11
|
+
draw(shape: Shape): void; // Assuming a Shape interface is defined
|
|
12
|
+
fill(shape: Shape | Polygon): void;
|
|
13
|
+
getColor(): java.awt.Color; // Assuming a Color interface is defined
|
|
12
14
|
// Methods for manipulating graphics settings
|
|
13
15
|
setColor(color: java.awt.Color): void; // Assuming a Color interface is defined
|
|
14
16
|
setStroke(stroke: Stroke): void; // Assuming a Stroke interface is defined
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/// <reference path="./Insets.d.ts" />
|
|
2
|
+
declare namespace java.awt {
|
|
3
|
+
export class GridBagConstraints {
|
|
4
|
+
static RELATIVE: number;
|
|
5
|
+
static REMAINDER: number;
|
|
6
|
+
static NONE: number;
|
|
7
|
+
static BOTH: number;
|
|
8
|
+
static HORIZONTAL: number;
|
|
9
|
+
static VERTICAL: number;
|
|
10
|
+
static CENTER: number;
|
|
11
|
+
static NORTH: number;
|
|
12
|
+
static NORTHEAST: number;
|
|
13
|
+
static EAST: number;
|
|
14
|
+
static SOUTHEAST: number;
|
|
15
|
+
static SOUTH: number;
|
|
16
|
+
static SOUTHWEST: number;
|
|
17
|
+
static WEST: number;
|
|
18
|
+
static NORTHWEST: number;
|
|
19
|
+
static PAGE_START: number;
|
|
20
|
+
static PAGE_END: number;
|
|
21
|
+
static LINE_START: number;
|
|
22
|
+
static LINE_END: number;
|
|
23
|
+
static FIRST_LINE_START: number;
|
|
24
|
+
static FIRST_LINE_END: number;
|
|
25
|
+
static LAST_LINE_START: number;
|
|
26
|
+
static LAST_LINE_END: number;
|
|
27
|
+
|
|
28
|
+
gridx: number;
|
|
29
|
+
gridy: number;
|
|
30
|
+
gridwidth: number;
|
|
31
|
+
gridheight: number;
|
|
32
|
+
weightx: number;
|
|
33
|
+
weighty: number;
|
|
34
|
+
anchor: number;
|
|
35
|
+
fill: number;
|
|
36
|
+
insets: java.awt.Insets;
|
|
37
|
+
ipadx: number;
|
|
38
|
+
ipady: number;
|
|
39
|
+
|
|
40
|
+
constructor(
|
|
41
|
+
gridx?: number,
|
|
42
|
+
gridy?: number,
|
|
43
|
+
gridwidth?: number,
|
|
44
|
+
gridheight?: number,
|
|
45
|
+
weightx?: number,
|
|
46
|
+
weighty?: number,
|
|
47
|
+
anchor?: number,
|
|
48
|
+
fill?: number,
|
|
49
|
+
insets?: java.awt.Insets,
|
|
50
|
+
ipadx?: number,
|
|
51
|
+
ipady?: number,
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
type GridBagConstraints = java.awt.GridBagConstraints;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare namespace java.awt {
|
|
2
|
+
export class GridBagLayout {
|
|
3
|
+
constructor();
|
|
4
|
+
addLayoutComponent(name: string, comp: any): void;
|
|
5
|
+
removeLayoutComponent(comp: any): void;
|
|
6
|
+
layoutContainer(parent: any): void;
|
|
7
|
+
getLayoutAlignmentX(target: any): number;
|
|
8
|
+
getLayoutAlignmentY(target: any): number;
|
|
9
|
+
invalidateLayout(target: any): void;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
type GridBagLayout = java.awt.GridBagLayout;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
declare namespace java.awt {
|
|
2
|
+
export class Insets {
|
|
3
|
+
/** The inset from the top edge. */
|
|
4
|
+
top: number;
|
|
5
|
+
/** The inset from the left edge. */
|
|
6
|
+
left: number;
|
|
7
|
+
/** The inset from the bottom edge. */
|
|
8
|
+
bottom: number;
|
|
9
|
+
/** The inset from the right edge. */
|
|
10
|
+
right: number;
|
|
11
|
+
/**
|
|
12
|
+
* Creates and initializes a new Insets object with the specified top, left,
|
|
13
|
+
* bottom, and right insets.
|
|
14
|
+
* @param top the inset from the top edge
|
|
15
|
+
* @param left the inset from the left edge
|
|
16
|
+
* @param bottom the inset from the bottom edge
|
|
17
|
+
* @param right the inset from the right edge
|
|
18
|
+
*/
|
|
19
|
+
constructor(top: number, left: number, bottom: number, right: number);
|
|
20
|
+
/**
|
|
21
|
+
* Returns a string representation of this Insets object,
|
|
22
|
+
* e.g. "java.awt.Insets[top=2,left=3,bottom=4,right=5]"
|
|
23
|
+
*/
|
|
24
|
+
toString(): string;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
type Insets = java.awt.Insets;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare namespace java.awt {
|
|
2
|
+
export class Polygon {
|
|
3
|
+
constructor();
|
|
4
|
+
constructor(xpoints: number[], ypoints: number[], npoints: number);
|
|
5
|
+
addPoint(x: number, y: number): void;
|
|
6
|
+
contains(x: number, y: number): boolean;
|
|
7
|
+
contains(point: java.awt.Point): boolean;
|
|
8
|
+
getBounds(): java.awt.Rectangle;
|
|
9
|
+
getBoundingBox(): java.awt.Rectangle;
|
|
10
|
+
npoints: number;
|
|
11
|
+
xpoints: number[];
|
|
12
|
+
ypoints: number[];
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare namespace java.awt {
|
|
2
|
+
export class Rectangle {
|
|
3
|
+
constructor();
|
|
4
|
+
constructor(x: number, y: number, width: number, height: number);
|
|
5
|
+
contains(x: number, y: number): boolean;
|
|
6
|
+
contains(point: java.awt.Point): boolean;
|
|
7
|
+
intersects(r: java.awt.Rectangle): boolean;
|
|
8
|
+
getBounds(): java.awt.Rectangle;
|
|
9
|
+
getLocation(): java.awt.Point;
|
|
10
|
+
getSize(): java.awt.Dimension;
|
|
11
|
+
setLocation(x: number, y: number): void;
|
|
12
|
+
setSize(width: number, height: number): void;
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare namespace java.awt {
|
|
2
|
+
export class Toolkit {
|
|
3
|
+
/**
|
|
4
|
+
* Returns the default Toolkit instance.
|
|
5
|
+
*/
|
|
6
|
+
static getDefaultToolkit(): Toolkit;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Returns the system clipboard.
|
|
10
|
+
*/
|
|
11
|
+
getSystemClipboard(): java.awt.datatransfer.Clipboard;
|
|
12
|
+
|
|
13
|
+
sync(): void;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
declare namespace java.awt.datatransfer {
|
|
2
|
+
/**
|
|
3
|
+
* The Clipboard class is a container for transferable data.
|
|
4
|
+
*/
|
|
5
|
+
export class Clipboard {
|
|
6
|
+
/**
|
|
7
|
+
* Constructs a clipboard object.
|
|
8
|
+
* @param name The name of this clipboard object.
|
|
9
|
+
*/
|
|
10
|
+
constructor(name: string);
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Sets the current contents of the clipboard to the specified transferable object.
|
|
14
|
+
* @param contents The transferable object representing the clipboard content.
|
|
15
|
+
* @param owner The object that owns the clipboard content.
|
|
16
|
+
*/
|
|
17
|
+
setContents(contents: Transferable, owner: ClipboardOwner | null): void;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Returns the current transferable object on the clipboard.
|
|
21
|
+
* @param requestor The object requesting the contents (often null).
|
|
22
|
+
*/
|
|
23
|
+
getContents(requestor: any): Transferable | null;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Returns an array of DataFlavor objects indicating the flavors the data can be provided in.
|
|
27
|
+
*/
|
|
28
|
+
getAvailableDataFlavors(): DataFlavor[];
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Returns whether or not the specified DataFlavor is available on this clipboard.
|
|
32
|
+
*/
|
|
33
|
+
isDataFlavorAvailable(flavor: DataFlavor): boolean;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Returns an object representing the current contents of this clipboard in the specified DataFlavor.
|
|
37
|
+
*/
|
|
38
|
+
getData(flavor: DataFlavor): any;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare namespace java.awt.datatransfer {
|
|
2
|
+
/**
|
|
3
|
+
* Defines the interface for classes that will be notified when they
|
|
4
|
+
* no longer own the clipboard contents.
|
|
5
|
+
*/
|
|
6
|
+
export interface ClipboardOwner {
|
|
7
|
+
/**
|
|
8
|
+
* Notifies the owner that it no longer owns the clipboard contents. (According to stackoverflow)
|
|
9
|
+
* @param clipboard The clipboard that is no longer owned.
|
|
10
|
+
* @param contents The contents which this owner had placed on the clipboard.
|
|
11
|
+
*/
|
|
12
|
+
lostOwnership(clipboard: Clipboard, contents: Transferable): void;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
declare namespace java.awt.datatransfer {
|
|
2
|
+
/**
|
|
3
|
+
* Represents the type of data to be transferred via clipboard or drag and drop.
|
|
4
|
+
*/
|
|
5
|
+
export class DataFlavor {
|
|
6
|
+
/**
|
|
7
|
+
* Creates a DataFlavor from a MIME type and a human-readable name.
|
|
8
|
+
*/
|
|
9
|
+
constructor(mimeType: string, humanPresentableName?: string);
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Returns the MIME type string for this DataFlavor.
|
|
13
|
+
*/
|
|
14
|
+
getMimeType(): string;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Returns the human presentable name for the data format.
|
|
18
|
+
*/
|
|
19
|
+
getHumanPresentableName(): string;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Sets the human presentable name for the data format.
|
|
23
|
+
*/
|
|
24
|
+
setHumanPresentableName(name: string): void;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Compares the MIME type of this DataFlavor to another's.
|
|
28
|
+
*/
|
|
29
|
+
isMimeTypeEqual(mimeType: string): boolean;
|
|
30
|
+
|
|
31
|
+
// Additional methods from the DataFlavor class can be added here if needed.
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
declare namespace java.awt.datatransfer {
|
|
2
|
+
/**
|
|
3
|
+
* simple class that implements Transferable and ClipboardOwner,
|
|
4
|
+
* providing the capability of transferring a string.
|
|
5
|
+
*/
|
|
6
|
+
export class StringSelection implements Transferable, ClipboardOwner {
|
|
7
|
+
/**
|
|
8
|
+
* Creates a StringSelection object for the specified string.
|
|
9
|
+
*/
|
|
10
|
+
constructor(data: string);
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Returns an array of DataFlavor objects indicating the flavors
|
|
14
|
+
* in which the data can be provided.
|
|
15
|
+
*/
|
|
16
|
+
getTransferDataFlavors(): DataFlavor[];
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Returns whether or not the specified data flavor is supported.
|
|
20
|
+
*/
|
|
21
|
+
isDataFlavorSupported(flavor: DataFlavor): boolean;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Returns the transfer data in the requested flavor.
|
|
25
|
+
*/
|
|
26
|
+
getTransferData(flavor: DataFlavor): any;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* ClipboardOwner callback: invoked when the clipboard contents change
|
|
30
|
+
* and this object is no longer the clipboard owner.
|
|
31
|
+
*/
|
|
32
|
+
lostOwnership(clipboard: Clipboard, contents: Transferable): void;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
declare namespace java.awt.datatransfer {
|
|
2
|
+
/**
|
|
3
|
+
* Defines the interface for classes that can provide data
|
|
4
|
+
* to be transferred via clipboard or drag-and-drop operations.
|
|
5
|
+
*/
|
|
6
|
+
export interface Transferable {
|
|
7
|
+
/**
|
|
8
|
+
* Returns an array of DataFlavor objects indicating the flavors
|
|
9
|
+
* in which the data can be provided.
|
|
10
|
+
*/
|
|
11
|
+
getTransferDataFlavors(): DataFlavor[];
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Returns whether or not the specified data flavor is supported.
|
|
15
|
+
*/
|
|
16
|
+
isDataFlavorSupported(flavor: DataFlavor): boolean;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Returns the transfer data in the requested flavor.
|
|
20
|
+
* @param flavor The requested flavor for the data.
|
|
21
|
+
*/
|
|
22
|
+
getTransferData(flavor: DataFlavor): any;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
declare namespace javax.swing.event {
|
|
2
|
+
/**
|
|
3
|
+
* Listens for changes to a Document (e.g., a JTextField's document).
|
|
4
|
+
*/
|
|
5
|
+
export interface DocumentListener {
|
|
6
|
+
/** Fired when text is inserted into the document */
|
|
7
|
+
insertUpdate?(e: any): void;
|
|
8
|
+
/** Fired when text is removed from the document */
|
|
9
|
+
removeUpdate?(e: any): void;
|
|
10
|
+
/** Fired when an attribute or style changes */
|
|
11
|
+
changedUpdate?(e: any): void;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Adapter class to let you implement only the methods you need.
|
|
16
|
+
* Usage: new DocumentAdapter({ insertUpdate: e => { ... } });
|
|
17
|
+
* THis will eventually be used for our searchBar.
|
|
18
|
+
*/
|
|
19
|
+
export class DocumentAdapter implements DocumentListener {
|
|
20
|
+
constructor(options: Partial<DocumentListener>);
|
|
21
|
+
insertUpdate(e: any): void;
|
|
22
|
+
removeUpdate(e: any): void;
|
|
23
|
+
changedUpdate(e: any): void;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
type DocumentListener = javax.swing.event.DocumentListener;
|
|
28
|
+
type DocumentAdapter = javax.swing.event.DocumentAdapter;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare namespace java.awt.event {
|
|
2
|
+
export class FocusListener {
|
|
3
|
+
constructor(options: { focusGained?: (event: any) => void; focusLost?: (event: any) => void });
|
|
4
|
+
focusGained(event: any): void;
|
|
5
|
+
focusLost(event: any): void;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export class FocusAdapter implements FocusListener {
|
|
9
|
+
private focusGainedCallback?: (event: any) => void;
|
|
10
|
+
private focusLostCallback?: (event: any) => void;
|
|
11
|
+
constructor(options: { focusGained?: (event: any) => void; focusLost?: (event: any) => void });
|
|
12
|
+
focusGained(event: any): void;
|
|
13
|
+
focusLost(event: any): void;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare namespace java.awt.event {
|
|
2
|
+
export class ItemListener {
|
|
3
|
+
constructor(callback: (event: any) => void);
|
|
4
|
+
itemStateChanged(event: any): void;
|
|
5
|
+
}
|
|
6
|
+
export class ItemAdapter implements ItemListener {
|
|
7
|
+
private _itemStateChangedCallback?: (event: any) => void;
|
|
8
|
+
constructor(callback?: (event: any) => void);
|
|
9
|
+
itemStateChanged(event: any): void;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare namespace java.awt.event {
|
|
2
|
+
export abstract class KeyAdapter implements java.awt.event.KeyListener {
|
|
3
|
+
keyPressed?(event: java.awt.event.KeyEvent): void;
|
|
4
|
+
keyReleased?(event: java.awt.event.KeyEvent): void;
|
|
5
|
+
keyTyped?(event: java.awt.event.KeyEvent): void;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
type KeyAdapter = java.awt.event.KeyAdapter;
|
|
@@ -1,15 +1,79 @@
|
|
|
1
1
|
declare namespace java.awt.event {
|
|
2
2
|
export class KeyEvent {
|
|
3
|
-
constructor(
|
|
4
|
-
source: any, // java.awt.Component
|
|
5
|
-
id: number,
|
|
6
|
-
when: number,
|
|
7
|
-
modifiers: number,
|
|
8
|
-
keyCode: number,
|
|
9
|
-
keyChar: string | number, // char type?
|
|
10
|
-
);
|
|
3
|
+
constructor(source: any, id: number, when: number, modifiers: number, keyCode: number, keyChar: string | number);
|
|
11
4
|
|
|
5
|
+
// Event types
|
|
6
|
+
static KEY_PRESSED: number;
|
|
7
|
+
static KEY_RELEASED: number;
|
|
8
|
+
static KEY_TYPED: number;
|
|
9
|
+
|
|
10
|
+
// Common key codes
|
|
11
|
+
static CHAR_UNDEFINED: number;
|
|
12
12
|
static VK_UNDEFINED: number;
|
|
13
13
|
static VK_ENTER: number;
|
|
14
|
+
static VK_BACK_SPACE: number;
|
|
15
|
+
static VK_TAB: number;
|
|
16
|
+
static VK_CANCEL: number;
|
|
17
|
+
static VK_CLEAR: number;
|
|
18
|
+
static VK_SHIFT: number;
|
|
19
|
+
static VK_CONTROL: number;
|
|
20
|
+
static VK_ALT: number;
|
|
21
|
+
static VK_ESCAPE: number;
|
|
22
|
+
static VK_SPACE: number;
|
|
23
|
+
static VK_LEFT: number;
|
|
24
|
+
static VK_UP: number;
|
|
25
|
+
static VK_RIGHT: number;
|
|
26
|
+
static VK_DOWN: number;
|
|
27
|
+
static VK_DELETE: number;
|
|
28
|
+
|
|
29
|
+
// Alphabetic keys
|
|
30
|
+
static VK_A: number;
|
|
31
|
+
static VK_B: number;
|
|
32
|
+
static VK_C: number;
|
|
33
|
+
static VK_D: number;
|
|
34
|
+
static VK_E: number;
|
|
35
|
+
static VK_F: number;
|
|
36
|
+
static VK_G: number;
|
|
37
|
+
static VK_H: number;
|
|
38
|
+
static VK_I: number;
|
|
39
|
+
static VK_J: number;
|
|
40
|
+
static VK_K: number;
|
|
41
|
+
static VK_L: number;
|
|
42
|
+
static VK_M: number;
|
|
43
|
+
static VK_N: number;
|
|
44
|
+
static VK_O: number;
|
|
45
|
+
static VK_P: number;
|
|
46
|
+
static VK_Q: number;
|
|
47
|
+
static VK_R: number;
|
|
48
|
+
static VK_S: number;
|
|
49
|
+
static VK_T: number;
|
|
50
|
+
static VK_U: number;
|
|
51
|
+
static VK_V: number;
|
|
52
|
+
static VK_W: number;
|
|
53
|
+
static VK_X: number;
|
|
54
|
+
static VK_Y: number;
|
|
55
|
+
static VK_Z: number;
|
|
56
|
+
|
|
57
|
+
// Numeric keys
|
|
58
|
+
static VK_0: number;
|
|
59
|
+
static VK_1: number;
|
|
60
|
+
static VK_2: number;
|
|
61
|
+
static VK_3: number;
|
|
62
|
+
static VK_4: number;
|
|
63
|
+
static VK_5: number;
|
|
64
|
+
static VK_6: number;
|
|
65
|
+
static VK_7: number;
|
|
66
|
+
static VK_8: number;
|
|
67
|
+
static VK_9: number;
|
|
68
|
+
|
|
69
|
+
getKeyCode(): number; // Returns the key code of the event
|
|
70
|
+
getKeyChar(): string; // Returns the character associated with the event
|
|
71
|
+
isShiftDown(): boolean; // Checks if Shift is held
|
|
72
|
+
isControlDown(): boolean; // Checks if Ctrl is held
|
|
73
|
+
isAltDown(): boolean; // Checks if Alt is held
|
|
74
|
+
isMetaDown(): boolean; // Checks if Meta (Cmd/Windows) is held
|
|
75
|
+
consume(): void; // Prevents default behavior of the key event
|
|
14
76
|
}
|
|
15
77
|
}
|
|
78
|
+
|
|
79
|
+
type KeyEvent = java.awt.event.KeyEvent;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare namespace java.awt.event {
|
|
2
|
+
export abstract class MouseAdapter {
|
|
3
|
+
mouseClicked?(e: MouseEvent): void;
|
|
4
|
+
mousePressed?(e: MouseEvent): void;
|
|
5
|
+
mouseReleased?(e: MouseEvent): void;
|
|
6
|
+
mouseEntered?(e: MouseEvent): void;
|
|
7
|
+
mouseExited?(e: MouseEvent): void;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
type MouseAdapter = java.awt.event.MouseAdapter;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare namespace java.awt.event {
|
|
2
|
+
export class MouseListener {
|
|
3
|
+
constructor(options: {
|
|
4
|
+
mouseClicked?: (event: any) => void;
|
|
5
|
+
mousePressed?: (event: any) => void;
|
|
6
|
+
mouseReleased?: (event: any) => void;
|
|
7
|
+
mouseEntered?: (event: any) => void;
|
|
8
|
+
mouseExited?: (event: any) => void;
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
declare namespace java.awt.event {
|
|
2
|
+
export interface WindowListener {
|
|
3
|
+
windowOpened?(e: any): void;
|
|
4
|
+
windowClosing?(e: any): void;
|
|
5
|
+
windowClosed?(e: any): void;
|
|
6
|
+
windowIconified?(e: any): void;
|
|
7
|
+
windowDeiconified?(e: any): void;
|
|
8
|
+
windowActivated?(e: any): void;
|
|
9
|
+
windowDeactivated?(e: any): void;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export class WindowAdapter implements WindowListener {
|
|
13
|
+
constructor(options: Partial<WindowListener>);
|
|
14
|
+
windowOpened?(e: any): void;
|
|
15
|
+
windowClosing?(e: any): void;
|
|
16
|
+
windowClosed?(e: any): void;
|
|
17
|
+
windowIconified?(e: any): void;
|
|
18
|
+
windowDeiconified?(e: any): void;
|
|
19
|
+
windowActivated?(e: any): void;
|
|
20
|
+
windowDeactivated?(e: any): void;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
type WindowListener = java.awt.event.WindowListener;
|
|
25
|
+
type WindowAdapter = java.awt.event.WindowAdapter;
|