GraphicsWindowInputDevice

from panda3d.core import GraphicsWindowInputDevice
class GraphicsWindowInputDevice

Bases: InputDevice

This is a virtual input device that represents the keyboard and mouse pair that is associated with a particular window. It collects mouse and keyboard events from the windowing system while the window is in focus.

Inheritance diagram

Inheritance diagram of GraphicsWindowInputDevice

__init__(*args, **kwargs)
buttonDown()

C++ Interface: button_down(const GraphicsWindowInputDevice self, ButtonHandle button, double time)

// The following interface is for the various kinds of GraphicsWindows to // record the data incoming on the device.

/**
  • Records that the indicated button has been depressed.

*/

buttonResumeDown()

C++ Interface: button_resume_down(const GraphicsWindowInputDevice self, ButtonHandle button, double time)

/**
  • Records that the indicated button was depressed earlier, and we only just

  • detected the event after the fact. This is mainly useful for tracking the

  • state of modifier keys.

*/

buttonUp()

C++ Interface: button_up(const GraphicsWindowInputDevice self, ButtonHandle button, double time)

/**
  • Records that the indicated button has been released.

*/

button_down()

C++ Interface: button_down(const GraphicsWindowInputDevice self, ButtonHandle button, double time)

// The following interface is for the various kinds of GraphicsWindows to // record the data incoming on the device.

/**
  • Records that the indicated button has been depressed.

*/

button_resume_down()

C++ Interface: button_resume_down(const GraphicsWindowInputDevice self, ButtonHandle button, double time)

/**
  • Records that the indicated button was depressed earlier, and we only just

  • detected the event after the fact. This is mainly useful for tracking the

  • state of modifier keys.

*/

button_up()

C++ Interface: button_up(const GraphicsWindowInputDevice self, ButtonHandle button, double time)

/**
  • Records that the indicated button has been released.

*/

candidate()

C++ Interface: candidate(const GraphicsWindowInputDevice self, unicode candidate_string, int highlight_start, int highlight_end, int cursor_pos)

/**
  • Records that the indicated candidate string has been highlighted. This is

  • used to implement IME support for typing in international languages,

  • especially Chinese/Japanese/Korean.

*/

focusLost()

C++ Interface: focus_lost(const GraphicsWindowInputDevice self, double time)

/**
  • This should be called when the window focus is lost, so that we may miss

  • upcoming button events (especially “up” events) for the next period of

  • time. It generates keyboard and mouse “up” events for those buttons that

  • we previously sent unpaired “down” events, so that the Panda application

  • will believe all buttons are now released.

*/

focus_lost()

C++ Interface: focus_lost(const GraphicsWindowInputDevice self, double time)

/**
  • This should be called when the window focus is lost, so that we may miss

  • upcoming button events (especially “up” events) for the next period of

  • time. It generates keyboard and mouse “up” events for those buttons that

  • we previously sent unpaired “down” events, so that the Panda application

  • will believe all buttons are now released.

*/

getClassType()

C++ Interface: get_class_type()

getPointer()

C++ Interface: get_pointer(GraphicsWindowInputDevice self)

/**
  • Returns the PointerData associated with the input device’s pointer. This

  • only makes sense if has_pointer() also returns true.

*/

get_class_type()

C++ Interface: get_class_type()

get_pointer()

C++ Interface: get_pointer(GraphicsWindowInputDevice self)

/**
  • Returns the PointerData associated with the input device’s pointer. This

  • only makes sense if has_pointer() also returns true.

*/

keystroke()

C++ Interface: keystroke(const GraphicsWindowInputDevice self, int keycode, double time)

/**
  • Records that the indicated keystroke has been generated.

*/

pointerMoved()

C++ Interface: pointer_moved(const GraphicsWindowInputDevice self, double x, double y, double time)

/**
  • To be called by a particular kind of GraphicsWindow to indicate that the

  • pointer has moved by the given relative amount.

*/

pointer_moved()

C++ Interface: pointer_moved(const GraphicsWindowInputDevice self, double x, double y, double time)

/**
  • To be called by a particular kind of GraphicsWindow to indicate that the

  • pointer has moved by the given relative amount.

*/

rawButtonDown()

C++ Interface: raw_button_down(const GraphicsWindowInputDevice self, ButtonHandle button, double time)

/**
  • Records that the indicated button has been depressed.

*/

rawButtonUp()

C++ Interface: raw_button_up(const GraphicsWindowInputDevice self, ButtonHandle button, double time)

/**
  • Records that the indicated button has been released.

*/

raw_button_down()

C++ Interface: raw_button_down(const GraphicsWindowInputDevice self, ButtonHandle button, double time)

/**
  • Records that the indicated button has been depressed.

*/

raw_button_up()

C++ Interface: raw_button_up(const GraphicsWindowInputDevice self, ButtonHandle button, double time)

/**
  • Records that the indicated button has been released.

*/

removePointer()

C++ Interface: remove_pointer(const GraphicsWindowInputDevice self, int id)

/**
  • To be called by a particular kind of GraphicsWindow to indicate that the

  • pointer no longer exists.

*/

remove_pointer()

C++ Interface: remove_pointer(const GraphicsWindowInputDevice self, int id)

/**
  • To be called by a particular kind of GraphicsWindow to indicate that the

  • pointer no longer exists.

*/

setPointerInWindow()

C++ Interface: set_pointer_in_window(const GraphicsWindowInputDevice self, double x, double y, double time)

/**
  • To be called by a particular kind of GraphicsWindow to indicate that the

  • pointer is within the window, at the given pixel coordinates.

*/

setPointerOutOfWindow()

C++ Interface: set_pointer_out_of_window(const GraphicsWindowInputDevice self, double time)

/**
  • To be called by a particular kind of GraphicsWindow to indicate that the

  • pointer is no longer within the window.

*/

set_pointer_in_window()

C++ Interface: set_pointer_in_window(const GraphicsWindowInputDevice self, double x, double y, double time)

/**
  • To be called by a particular kind of GraphicsWindow to indicate that the

  • pointer is within the window, at the given pixel coordinates.

*/

set_pointer_out_of_window()

C++ Interface: set_pointer_out_of_window(const GraphicsWindowInputDevice self, double time)

/**
  • To be called by a particular kind of GraphicsWindow to indicate that the

  • pointer is no longer within the window.

*/

updatePointer()

C++ Interface: update_pointer(const GraphicsWindowInputDevice self, PointerData data, double time)

/**
  • To be called by a particular kind of GraphicsWindow to indicate that the

  • pointer data has changed.

*/

update_pointer()

C++ Interface: update_pointer(const GraphicsWindowInputDevice self, PointerData data, double time)

/**
  • To be called by a particular kind of GraphicsWindow to indicate that the

  • pointer data has changed.

*/