Utilities ========= **Technical overview.** Game Boy integrations need values that cross the boundary between the emulated hardware and the host application, such as button events, BCD-encoded numbers, and errors describing invalid hardware access. **Using the API.** :mod:`pyboy.utils` provides :class:`WindowEvent ` values for :meth:`PyBoy.send_input `, BCD conversion helpers, and the exception classes raised by the public API. The complete set of event names is listed below; use the high-level button methods when they are sufficient. .. automodule:: pyboy.utils :members: :show-inheritance: .. _window-event-options: WindowEvent options ------------------- The internal events are included for completeness, but applications should use the public events when sending input. .. hlist:: :columns: 3 * :class:`QUIT ` * :class:`PRESS_ARROW_UP ` * :class:`PRESS_ARROW_DOWN ` * :class:`PRESS_ARROW_RIGHT ` * :class:`PRESS_ARROW_LEFT ` * :class:`PRESS_BUTTON_A ` * :class:`PRESS_BUTTON_B ` * :class:`PRESS_BUTTON_SELECT ` * :class:`PRESS_BUTTON_START ` * :class:`RELEASE_ARROW_UP ` * :class:`RELEASE_ARROW_DOWN ` * :class:`RELEASE_ARROW_RIGHT ` * :class:`RELEASE_ARROW_LEFT ` * :class:`RELEASE_BUTTON_A ` * :class:`RELEASE_BUTTON_B ` * :class:`RELEASE_BUTTON_SELECT ` * :class:`RELEASE_BUTTON_START ` * :class:`_INTERNAL_TOGGLE_DEBUG ` * :class:`PRESS_SPEED_UP ` * :class:`RELEASE_SPEED_UP ` * :class:`STATE_SAVE ` * :class:`STATE_LOAD ` * :class:`PASS ` * :class:`SCREEN_RECORDING_TOGGLE ` * :class:`PAUSE ` * :class:`UNPAUSE ` * :class:`PAUSE_TOGGLE ` * :class:`PRESS_REWIND_BACK ` * :class:`PRESS_REWIND_FORWARD ` * :class:`RELEASE_REWIND_BACK ` * :class:`RELEASE_REWIND_FORWARD ` * :class:`WINDOW_FOCUS ` * :class:`WINDOW_UNFOCUS ` * :class:`_INTERNAL_RENDERER_FLUSH ` * :class:`_INTERNAL_MOUSE ` * :class:`_INTERNAL_MARK_TILE ` * :class:`SCREENSHOT_RECORD ` * :class:`DEBUG_MEMORY_SCROLL_DOWN ` * :class:`DEBUG_MEMORY_SCROLL_UP ` * :class:`MOD_SHIFT_ON ` * :class:`MOD_SHIFT_OFF ` * :class:`FULL_SCREEN_TOGGLE ` * :class:`CYCLE_PALETTE ` * :class:`SCREEN_RECORDING_TOGGLE_MP4 ` * :class:`DEBUG_GAME_AREA_TOGGLE `