Interface GobanCallbacks

interface GobanCallbacks {
    addCoordinatesToChatInput?: ((coordinates) => void);
    canvasAllocationErrorHandler?: ((note, error, extra) => void);
    customBlackStoneColor?: (() => string);
    customBlackStoneUrl?: (() => string);
    customBlackTextColor?: (() => string);
    customBoardColor?: (() => string);
    customBoardLineColor?: (() => string);
    customBoardUrl?: (() => string);
    customWhiteStoneColor?: (() => string);
    customWhiteStoneUrl?: (() => string);
    customWhiteTextColor?: (() => string);
    defaultConfig?: (() => any);
    getCDNReleaseBase?: (() => string);
    getClockDrift?: (() => number);
    getCoordinateDisplaySystem?: (() => "A1" | "1-1");
    getLocation?: (() => string);
    getMoveTreeNumbering?: (() => "none" | "move-coordinates" | "move-number");
    getNetworkLatency?: (() => number);
    getSelectedThemes?: (() => GobanSelectedThemes);
    getShowUndoRequestIndicator?: (() => boolean);
    getShowVariationMoveNumbers?: (() => boolean);
    getSoundEnabled?: (() => boolean);
    getSoundVolume?: (() => number);
    getStoneFontScale?: (() => number);
    isAnalysisDisabled?: ((goban, perGameSettingAppliesToNonPlayers) => boolean);
    toast?: ((message_id, duration) => void);
    updateScoreEstimation?: ((est_winning_color, number_of_points) => void);
    watchSelectedThemes?: ((cb) => {
        remove: (() => any);
    });
}

Properties

addCoordinatesToChatInput?: ((coordinates) => void)

Type declaration

    • (coordinates): void
    • Parameters

      • coordinates: string

      Returns void

canvasAllocationErrorHandler?: ((note, error, extra) => void)

Type declaration

    • (note, error, extra): void
    • Parameters

      • note: null | string
      • error: Error
      • extra: {
            height?: string | number;
            total_allocations_made: number;
            total_pixels_allocated: number;
            width?: string | number;
        }
        • Optional height?: string | number
        • total_allocations_made: number
        • total_pixels_allocated: number
        • Optional width?: string | number

      Returns void

customBlackStoneColor?: (() => string)

Type declaration

    • (): string
    • Returns string

customBlackStoneUrl?: (() => string)

Type declaration

    • (): string
    • Returns string

customBlackTextColor?: (() => string)

Type declaration

    • (): string
    • Returns string

customBoardColor?: (() => string)

Type declaration

    • (): string
    • Returns string

customBoardLineColor?: (() => string)

Type declaration

    • (): string
    • Returns string

customBoardUrl?: (() => string)

Type declaration

    • (): string
    • Returns string

customWhiteStoneColor?: (() => string)

Type declaration

    • (): string
    • Returns string

customWhiteStoneUrl?: (() => string)

Type declaration

    • (): string
    • Returns string

customWhiteTextColor?: (() => string)

Type declaration

    • (): string
    • Returns string

defaultConfig?: (() => any)

Type declaration

    • (): any
    • Returns any

getCDNReleaseBase?: (() => string)

Type declaration

    • (): string
    • Returns string

getClockDrift?: (() => number)

Type declaration

    • (): number
    • Returns number

getCoordinateDisplaySystem?: (() => "A1" | "1-1")

Type declaration

    • (): "A1" | "1-1"
    • Returns "A1" | "1-1"

getLocation?: (() => string)

Type declaration

    • (): string
    • Returns string

getMoveTreeNumbering?: (() => "none" | "move-coordinates" | "move-number")

Type declaration

    • (): "none" | "move-coordinates" | "move-number"
    • Returns "none" | "move-coordinates" | "move-number"

getNetworkLatency?: (() => number)

Type declaration

    • (): number
    • Returns number

getSelectedThemes?: (() => GobanSelectedThemes)

Type declaration

getShowUndoRequestIndicator?: (() => boolean)

Type declaration

    • (): boolean
    • Returns boolean

getShowVariationMoveNumbers?: (() => boolean)

Type declaration

    • (): boolean
    • Returns boolean

getSoundEnabled?: (() => boolean)

Type declaration

    • (): boolean
    • Returns boolean

getSoundVolume?: (() => number)

Type declaration

    • (): number
    • Returns number

getStoneFontScale?: (() => number)

Type declaration

    • (): number
    • Returns number

isAnalysisDisabled?: ((goban, perGameSettingAppliesToNonPlayers) => boolean)

Type declaration

    • (goban, perGameSettingAppliesToNonPlayers): boolean
    • Parameters

      • goban: GobanBase
      • perGameSettingAppliesToNonPlayers: boolean

      Returns boolean

toast?: ((message_id, duration) => void)

Type declaration

    • (message_id, duration): void
    • Parameters

      • message_id: string
      • duration: number

      Returns void

updateScoreEstimation?: ((est_winning_color, number_of_points) => void)

Type declaration

    • (est_winning_color, number_of_points): void
    • Parameters

      • est_winning_color: "black" | "white"
      • number_of_points: number

      Returns void

watchSelectedThemes?: ((cb) => {
    remove: (() => any);
})

Type declaration

    • (cb): {
          remove: (() => any);
      }
    • Parameters

      Returns {
          remove: (() => any);
      }

      • remove: (() => any)
          • (): any
          • Returns any