VISU - PHP Game Framework

WindowEventHandlerInterface

Table of Contents

Methods

handleWindowChar()  : void
Window char event callback This method is invoked when a character is inputted (e.g. when typing).
handleWindowCharMods()  : void
Window char mods event callback This method is invoked when a character is inputted (e.g. when typing).
handleWindowCursorEnter()  : void
Window cursor enter event callback This method is invoked when the cursor enters or leaves the client area of the window.
handleWindowCursorPos()  : void
Window cursor position event callback This method is invoked when the cursor is moved.
handleWindowDidPollEvents()  : void
Callback after new evenets are polled This method is invoked after new events are polled think of it as a post-update method.
handleWindowDrop()  : void
Window drop event callback This method is invoked when one or more dragged files are dropped on the window.
handleWindowKey()  : void
Window key event callback This method is invoked when a key is pressed, repeated or released.
handleWindowMouseButton()  : void
Window mouse button event callback This method is invoked when a mouse button is pressed or released.
handleWindowScroll()  : void
Window scroll event callback This method is invoked when a scrolling device is used, such as a mouse wheel or scrolling area of a touchpad.
handleWindowWillPollEvents()  : void
Callback before new evenets are polled This method is invoked before new events are polled think of it as a pre-update method.

Methods

handleWindowChar()

Window char event callback This method is invoked when a character is inputted (e.g. when typing).

public handleWindowChar(Window $window, int $char) : void
Parameters
$window : Window

The window that received the event

$char : int

The Unicode code point of the character

handleWindowCharMods()

Window char mods event callback This method is invoked when a character is inputted (e.g. when typing).

public handleWindowCharMods(Window $window, int $char, int $mods) : void
Parameters
$window : Window

The window that received the event

$char : int

The Unicode code point of the character

$mods : int

Bit field describing which modifier keys were held down

handleWindowCursorEnter()

Window cursor enter event callback This method is invoked when the cursor enters or leaves the client area of the window.

public handleWindowCursorEnter(Window $window, int $entered) : void
Parameters
$window : Window

The window that received the event

$entered : int

One of: GLFW_TRUE or GLFW_FALSE

handleWindowCursorPos()

Window cursor position event callback This method is invoked when the cursor is moved.

public handleWindowCursorPos(Window $window, float $xpos, float $ypos) : void
Parameters
$window : Window

The window that received the event

$xpos : float

The new x-coordinate, in screen coordinates, of the cursor

$ypos : float

The new y-coordinate, in screen coordinates, of the cursor

handleWindowDidPollEvents()

Callback after new evenets are polled This method is invoked after new events are polled think of it as a post-update method.

public handleWindowDidPollEvents(Window $window) : void
Parameters
$window : Window

The window that received the event

handleWindowDrop()

Window drop event callback This method is invoked when one or more dragged files are dropped on the window.

public handleWindowDrop(Window $window, array<string|int, string> $paths) : void
Parameters
$window : Window

The window that received the event

$paths : array<string|int, string>

The UTF-8 encoded file and/or directory path names

handleWindowKey()

Window key event callback This method is invoked when a key is pressed, repeated or released.

public handleWindowKey(Window $window, int $key, int $scancode, int $action, int $mods) : void
Parameters
$window : Window

The window that received the event

$key : int

The key that was pressed, repeated or released

$scancode : int

The system-specific scancode of the key

$action : int

The key action. One of: GLFW_PRESS, GLFW_RELEASE or GLFW_REPEAT

$mods : int

Bit field describing which modifier keys were held down

handleWindowMouseButton()

Window mouse button event callback This method is invoked when a mouse button is pressed or released.

public handleWindowMouseButton(Window $window, int $button, int $action, int $mods) : void
Parameters
$window : Window

The window that received the event

$button : int

The mouse button that was pressed or released

$action : int

The mouse button action. One of: GLFW_PRESS or GLFW_RELEASE

$mods : int

Bit field describing which modifier keys were held down

handleWindowScroll()

Window scroll event callback This method is invoked when a scrolling device is used, such as a mouse wheel or scrolling area of a touchpad.

public handleWindowScroll(Window $window, float $xoffset, float $yoffset) : void
Parameters
$window : Window

The window that received the event

$xoffset : float

The scroll offset along the x-axis

$yoffset : float

The scroll offset along the y-axis

handleWindowWillPollEvents()

Callback before new evenets are polled This method is invoked before new events are polled think of it as a pre-update method.

public handleWindowWillPollEvents(Window $window) : void
Parameters
$window : Window

The window that received the event


        
On this page

Search results