-
Notifications
You must be signed in to change notification settings - Fork 701
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split serialized state types into their own file
- Loading branch information
1 parent
d6a1bae
commit 4c9c5b9
Showing
9 changed files
with
77 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/** | ||
* NOTE: This file must not import any other types | ||
*/ | ||
|
||
export interface WindowsSerializedStateV1 { | ||
genWindows: { | ||
[windowId: string]: { | ||
size: [number, number]; | ||
open: boolean; | ||
hidden: boolean; | ||
shade: boolean; | ||
position: { x: number; y: number }; | ||
}; | ||
}; | ||
focused: string; | ||
} | ||
|
||
export interface DisplaySerializedStateV1 { | ||
visualizerStyle: number; | ||
doubled: boolean; | ||
llama: boolean; | ||
marqueeStep: number; | ||
skinImages: { [sprite: string]: string }; | ||
skinCursors: { [cursor: string]: string } | null; | ||
skinRegion: { [windowName: string]: string[] }; | ||
skinGenLetterWidths: { [letter: string]: number } | null; | ||
skinColors: string[]; // Theoretically this could be a tuple of a specific length | ||
skinPlaylistStyle: { [state: string]: string } | null; | ||
} | ||
|
||
export interface EqualizerSerializedStateV1 { | ||
on: boolean; | ||
auto: boolean; | ||
sliders: Record< | ||
| 60 | ||
| 170 | ||
| 310 | ||
| 600 | ||
| 1000 | ||
| 3000 | ||
| 6000 | ||
| 12000 | ||
| 14000 | ||
| 16000 | ||
| "preamp", | ||
number | ||
>; | ||
} | ||
|
||
export interface MediaSerializedStateV1 { | ||
volume: number; | ||
balance: number; | ||
shuffle: boolean; | ||
repeat: boolean; | ||
} | ||
|
||
export interface SerializedStateV1 { | ||
version: 1; | ||
windows: WindowsSerializedStateV1; | ||
media: MediaSerializedStateV1; | ||
display: DisplaySerializedStateV1; | ||
equalizer: EqualizerSerializedStateV1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters