-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
704a095
commit 33af9cb
Showing
6 changed files
with
196 additions
and
115 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { NakoSystem, NakoCallback, NakoCallbackEvent } from '../core/src/plugin_api.mjs' | ||
|
||
export interface IKeyEvent extends Event { | ||
key: string | ||
code: string | ||
shiftKey: boolean | ||
ctrlKey: boolean | ||
altKey: boolean | ||
metaKey: boolean | ||
} | ||
export interface ITouchEvent extends Event { | ||
touches: object | ||
} | ||
export interface IBrowserLocation { // 暫定型 (window.location) | ||
href: string | ||
} | ||
export interface IBrowserWindow { // 暫定型 - 本来は Window (ブラウザ以外の環境でもなんとなく動かすために定義) | ||
location: IBrowserLocation | ||
} | ||
export interface IBrowserDocument { // 暫定型 - 本来は Document | ||
body: object | ||
querySelector: (selector: string) => HTMLElement|null | ||
} | ||
export interface NakoDomEvent { | ||
dom: HTMLElement | ||
event: string | ||
func: (e: Event) => void | ||
rawFunc: NakoCallback | ||
} | ||
export type NakoDom = HTMLElement|string | ||
|
||
export interface NakoBrowsesrSystem extends NakoSystem { | ||
__query(dom: NakoDom, commandName: string, isGetFunc: boolean): object|null | ||
__addEvent(dom: NakoDom, event: string, func: NakoCallback, setHandler: NakoCallbackEvent|null): void | ||
__keyHandler(e: KeyboardEvent, sys: NakoBrowsesrSystem): void | ||
__mouseHandler(e: MouseEvent, sys: NakoBrowsesrSystem): void | ||
__touchHandler(e: TouchEvent, sys: NakoBrowsesrSystem): void | ||
__removeEvent(dom: NakoDom, event: string, funcStr: NakoCallback): void | ||
__removeAllDomEvents(): void | ||
__tohtml(text: string): string | ||
__tohtmlQ(text: string): string | ||
__dom_events: NakoDomEvent[] | ||
__requestAnimationFrameLastId: number | ||
__chartjs: object | ||
} | ||
|
Oops, something went wrong.