{
  "name": "Responder",
  "component": "gui",
  "header": "nativeui/responder.h",
  "type": "Class",
  "namespace": "nu",
  "description": "Base class of Window and View for event processing.",
  "methods": [
    {
      "signature": {
        "name": "setCapture",
        "parameters": [],
        "shortStr": "setCapture()",
        "str": "setCapture()"
      },
      "description": "Set mouse capture to the responder.",
      "id": "setcapture"
    },
    {
      "signature": {
        "name": "releaseCapture",
        "parameters": [],
        "shortStr": "releaseCapture()",
        "str": "releaseCapture()"
      },
      "description": "Release mouse capture if the responder has mouse capture.",
      "id": "releasecapture"
    },
    {
      "signature": {
        "returnType": {
          "name": "Boolean"
        },
        "name": "hasCapture",
        "parameters": [],
        "shortStr": "hasCapture()",
        "str": "hasCapture()"
      },
      "description": "Return whether the responder has mouse capture.",
      "id": "hascapture"
    },
    {
      "signature": {
        "returnType": {
          "name": "Buffer"
        },
        "name": "getNative",
        "parameters": [],
        "shortStr": "getNative()",
        "str": "getNative()"
      },
      "platform": [
        "Linux",
        "macOS"
      ],
      "description": "Return a Node.js `Buffer` containing the pointer of underlying native\nwidget wrapped by the responder.\n",
      "detail": "On Linux the C++ type of the pointer is `GtkWidget*`, and on macOS it is\n`NSResponder*`. The actual subclass type depends on which type this\nresponder is, for example for `Window` you can expect the native type to\nbe `GtkWindow*` on Linux and `NSWindow*` on macOS, and for `View` it would\nbe `GtkWidget*` on Linux and `NSView*` on macOS.\n\nHowever for subclasses of `View`, the native type is not specified, you\nmay find out the information by looking into the source code, but the type\nmight be changed in future updates. For example, the native type of\n`TextEdit` is currently a `GtkScrolledWindow*` with a `GtkTextView*` in\nit, but we may want to replace it with a custom widget when adding more\nfeatures in future.\n",
      "id": "getnative"
    }
  ],
  "events": [
    {
      "signature": {
        "returnType": {
          "name": "Boolean"
        },
        "name": "onMouseDown",
        "parameters": [
          {
            "type": {
              "name": "Responder",
              "id": "responder"
            },
            "name": "self"
          },
          {
            "type": {
              "name": "MouseEvent",
              "id": "mouseevent"
            },
            "name": "event"
          }
        ],
        "shortStr": "onMouseDown(self, event)",
        "str": "onMouseDown(self, event)"
      },
      "description": "Emitted when pressing mouse buttons.",
      "id": "onmousedown-self-event"
    },
    {
      "signature": {
        "returnType": {
          "name": "Boolean"
        },
        "name": "onMouseUp",
        "parameters": [
          {
            "type": {
              "name": "Responder",
              "id": "responder"
            },
            "name": "self"
          },
          {
            "type": {
              "name": "MouseEvent",
              "id": "mouseevent"
            },
            "name": "event"
          }
        ],
        "shortStr": "onMouseUp(self, event)",
        "str": "onMouseUp(self, event)"
      },
      "description": "Emitted when releasing mouse buttons.",
      "id": "onmouseup-self-event"
    },
    {
      "signature": {
        "name": "onMouseMove",
        "parameters": [
          {
            "type": {
              "name": "Responder",
              "id": "responder"
            },
            "name": "self"
          },
          {
            "type": {
              "name": "MouseEvent",
              "id": "mouseevent"
            },
            "name": "event"
          }
        ],
        "shortStr": "onMouseMove(self, event)",
        "str": "onMouseMove(self, event)"
      },
      "description": "Emitted when user moves mouse in the responder.",
      "id": "onmousemove-self-event"
    },
    {
      "signature": {
        "name": "onMouseEnter",
        "parameters": [
          {
            "type": {
              "name": "Responder",
              "id": "responder"
            },
            "name": "self"
          },
          {
            "type": {
              "name": "MouseEvent",
              "id": "mouseevent"
            },
            "name": "event"
          }
        ],
        "shortStr": "onMouseEnter(self, event)",
        "str": "onMouseEnter(self, event)"
      },
      "description": "Emitted when mouse enters the responder.",
      "id": "onmouseenter-self-event"
    },
    {
      "signature": {
        "name": "onMouseLeave",
        "parameters": [
          {
            "type": {
              "name": "Responder",
              "id": "responder"
            },
            "name": "self"
          },
          {
            "type": {
              "name": "MouseEvent",
              "id": "mouseevent"
            },
            "name": "event"
          }
        ],
        "shortStr": "onMouseLeave(self, event)",
        "str": "onMouseLeave(self, event)"
      },
      "description": "Emitted when mouse leaves the responder.",
      "id": "onmouseleave-self-event"
    },
    {
      "signature": {
        "returnType": {
          "name": "Boolean"
        },
        "name": "onKeyDown",
        "parameters": [
          {
            "type": {
              "name": "Responder",
              "id": "responder"
            },
            "name": "self"
          },
          {
            "type": {
              "name": "KeyEvent",
              "id": "keyevent"
            },
            "name": "event"
          }
        ],
        "shortStr": "onKeyDown(self, event)",
        "str": "onKeyDown(self, event)"
      },
      "description": "Emitted when pressing keyboard.",
      "id": "onkeydown-self-event"
    },
    {
      "signature": {
        "returnType": {
          "name": "Boolean"
        },
        "name": "onKeyUp",
        "parameters": [
          {
            "type": {
              "name": "Responder",
              "id": "responder"
            },
            "name": "self"
          },
          {
            "type": {
              "name": "KeyEvent",
              "id": "keyevent"
            },
            "name": "event"
          }
        ],
        "shortStr": "onKeyUp(self, event)",
        "str": "onKeyUp(self, event)"
      },
      "description": "Emitted when releasing keyboard.",
      "id": "onkeyup-self-event"
    },
    {
      "signature": {
        "name": "onCaptureLost",
        "parameters": [
          {
            "type": {
              "name": "Responder",
              "id": "responder"
            },
            "name": "self"
          }
        ],
        "shortStr": "onCaptureLost(self)",
        "str": "onCaptureLost(self)"
      },
      "description": "Emitted when the mouse capture on responder has been released.",
      "id": "oncapturelost-self"
    }
  ],
  "module": "gui",
  "id": "responder"
}