Interface Callbacks


  • public interface Callbacks
    Interface of callbacks the injected client uses to send events
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void draw​(MainBufferProvider mainBufferProvider, java.awt.Graphics graphics, int x, int y)
      Client top-most draw method, rendering over top of most of game interfaces.
      void drawAboveOverheads()
      Called after logic that is drawing 2D objects is processed.
      void drawInterface​(int interfaceId, java.util.List<WidgetItem> widgetItems)
      Called after an interface has been drawn
      void drawLayer​(Widget layer, java.util.List<WidgetItem> widgetItems)
      Called after a widget layer has been drawn
      void drawScene()
      Called after the scene is drawn.
      void frame()
      Called each frame
      void keyPressed​(java.awt.event.KeyEvent keyEvent)
      Key pressed event.
      void keyReleased​(java.awt.event.KeyEvent keyEvent)
      Key released event.
      void keyTyped​(java.awt.event.KeyEvent keyEvent)
      Key typed event.
      java.awt.event.MouseEvent mouseClicked​(java.awt.event.MouseEvent mouseEvent)
      Mouse clicked event.
      java.awt.event.MouseEvent mouseDragged​(java.awt.event.MouseEvent mouseEvent)
      Mouse dragged event.
      java.awt.event.MouseEvent mouseEntered​(java.awt.event.MouseEvent mouseEvent)
      Mouse entered event.
      java.awt.event.MouseEvent mouseExited​(java.awt.event.MouseEvent mouseEvent)
      Mouse exited event.
      java.awt.event.MouseEvent mouseMoved​(java.awt.event.MouseEvent mouseEvent)
      Mouse moved event.
      java.awt.event.MouseEvent mousePressed​(java.awt.event.MouseEvent mouseEvent)
      Mouse pressed event.
      java.awt.event.MouseEvent mouseReleased​(java.awt.event.MouseEvent mouseEvent)
      Mouse released event.
      java.awt.event.MouseWheelEvent mouseWheelMoved​(java.awt.event.MouseWheelEvent event)
      Mouse wheel moved event.
      void post​(java.lang.Object event)
      Post an event.
      void postDeferred​(java.lang.Object event)
      Post a deferred event, which gets delayed until the next cycle.
      void tick()
      Called each tick
      void updateNpcs()
      Called after receiving update NPCs packet from server.
    • Method Detail

      • post

        void post​(java.lang.Object event)
        Post an event. See the events in net.runelite.api.events.
        Parameters:
        event - the event
      • postDeferred

        void postDeferred​(java.lang.Object event)
        Post a deferred event, which gets delayed until the next cycle.
        Parameters:
        event - the event
      • tick

        void tick()
        Called each tick
      • frame

        void frame()
        Called each frame
      • updateNpcs

        void updateNpcs()
        Called after receiving update NPCs packet from server.
      • drawScene

        void drawScene()
        Called after the scene is drawn.
      • drawAboveOverheads

        void drawAboveOverheads()
        Called after logic that is drawing 2D objects is processed.
      • draw

        void draw​(MainBufferProvider mainBufferProvider,
                  java.awt.Graphics graphics,
                  int x,
                  int y)
        Client top-most draw method, rendering over top of most of game interfaces.
        Parameters:
        mainBufferProvider - the main buffer provider
        graphics - the graphics
        x - the x
        y - the y
      • drawInterface

        void drawInterface​(int interfaceId,
                           java.util.List<WidgetItem> widgetItems)
        Called after an interface has been drawn
        Parameters:
        interfaceId - the interface id
        widgetItems - Widget items within the interface
      • drawLayer

        void drawLayer​(Widget layer,
                       java.util.List<WidgetItem> widgetItems)
        Called after a widget layer has been drawn
        Parameters:
        layer - The layer
        widgetItems - Widget items within the layer
      • mousePressed

        java.awt.event.MouseEvent mousePressed​(java.awt.event.MouseEvent mouseEvent)
        Mouse pressed event. If this event will be consumed it will not be propagated further to client.
        Parameters:
        mouseEvent - the mouse event
        Returns:
        the mouse event
      • mouseReleased

        java.awt.event.MouseEvent mouseReleased​(java.awt.event.MouseEvent mouseEvent)
        Mouse released event. If this event will be consumed it will not be propagated further to client.
        Parameters:
        mouseEvent - the mouse event
        Returns:
        the mouse event
      • mouseClicked

        java.awt.event.MouseEvent mouseClicked​(java.awt.event.MouseEvent mouseEvent)
        Mouse clicked event. If this event will be consumed it will not be propagated further to client.
        Parameters:
        mouseEvent - the mouse event
        Returns:
        the mouse event
      • mouseEntered

        java.awt.event.MouseEvent mouseEntered​(java.awt.event.MouseEvent mouseEvent)
        Mouse entered event. If this event will be consumed it will not be propagated further to client.
        Parameters:
        mouseEvent - the mouse event
        Returns:
        the mouse event
      • mouseExited

        java.awt.event.MouseEvent mouseExited​(java.awt.event.MouseEvent mouseEvent)
        Mouse exited event. If this event will be consumed it will not be propagated further to client.
        Parameters:
        mouseEvent - the mouse event
        Returns:
        the mouse event
      • mouseDragged

        java.awt.event.MouseEvent mouseDragged​(java.awt.event.MouseEvent mouseEvent)
        Mouse dragged event. If this event will be consumed it will not be propagated further to client.
        Parameters:
        mouseEvent - the mouse event
        Returns:
        the mouse event
      • mouseMoved

        java.awt.event.MouseEvent mouseMoved​(java.awt.event.MouseEvent mouseEvent)
        Mouse moved event. If this event will be consumed it will not be propagated further to client.
        Parameters:
        mouseEvent - the mouse event
        Returns:
        the mouse event
      • mouseWheelMoved

        java.awt.event.MouseWheelEvent mouseWheelMoved​(java.awt.event.MouseWheelEvent event)
        Mouse wheel moved event. If this event will be consumed it will not be propagated further to client.
        Parameters:
        event - the event
        Returns:
        the mouse wheel event
      • keyPressed

        void keyPressed​(java.awt.event.KeyEvent keyEvent)
        Key pressed event.
        Parameters:
        keyEvent - the key event
      • keyReleased

        void keyReleased​(java.awt.event.KeyEvent keyEvent)
        Key released event.
        Parameters:
        keyEvent - the key event
      • keyTyped

        void keyTyped​(java.awt.event.KeyEvent keyEvent)
        Key typed event.
        Parameters:
        keyEvent - the key event