Merge pull request #3976 from deathbeam/add-callback-docs

Update documentation for Callbacks interface
This commit is contained in:
Tomas Slusny
2018-06-24 11:58:16 +02:00
committed by GitHub

View File

@@ -36,49 +36,131 @@ import net.runelite.api.MainBufferProvider;
public interface Callbacks public interface Callbacks
{ {
/** /**
* Post an event. See the events in net.runelite.api.events * Post an event. See the events in net.runelite.api.events.
* @param event *
* @param event the event
*/ */
void post(Object event); void post(Object event);
/** /**
* Post a deferred event, which gets delayed until the next cycle * Post a deferred event, which gets delayed until the next cycle.
* @param event *
* @param event the event
*/ */
void postDeferred(Object event); void postDeferred(Object event);
/** /**
* Called each client cycle * Called each client cycle.
*/ */
void clientMainLoop(); void clientMainLoop();
/**
* Called after receiving update NPCs packet from server.
*/
void updateNpcs(); void updateNpcs();
/**
* Called after region is drawn.
*/
void drawRegion(); void drawRegion();
/**
* Called after logic that is drawing 2D objects is processed.
*/
void drawAboveOverheads(); void drawAboveOverheads();
/**
* Client top-most draw method, rendering over top of most of game interfaces.
*
* @param mainBufferProvider the main buffer provider
* @param graphics the graphics
* @param x the x
* @param y the y
*/
void draw(MainBufferProvider mainBufferProvider, Graphics graphics, int x, int y); void draw(MainBufferProvider mainBufferProvider, Graphics graphics, int x, int y);
/**
* Mouse pressed event. If this event will be consumed it will not be propagated further to client.
*
* @param mouseEvent the mouse event
* @return the mouse event
*/
MouseEvent mousePressed(MouseEvent mouseEvent); MouseEvent mousePressed(MouseEvent mouseEvent);
/**
* Mouse released event. If this event will be consumed it will not be propagated further to client.
*
* @param mouseEvent the mouse event
* @return the mouse event
*/
MouseEvent mouseReleased(MouseEvent mouseEvent); MouseEvent mouseReleased(MouseEvent mouseEvent);
/**
* Mouse clicked event. If this event will be consumed it will not be propagated further to client.
*
* @param mouseEvent the mouse event
* @return the mouse event
*/
MouseEvent mouseClicked(MouseEvent mouseEvent); MouseEvent mouseClicked(MouseEvent mouseEvent);
/**
* Mouse entered event. If this event will be consumed it will not be propagated further to client.
*
* @param mouseEvent the mouse event
* @return the mouse event
*/
MouseEvent mouseEntered(MouseEvent mouseEvent); MouseEvent mouseEntered(MouseEvent mouseEvent);
/**
* Mouse exited event. If this event will be consumed it will not be propagated further to client.
*
* @param mouseEvent the mouse event
* @return the mouse event
*/
MouseEvent mouseExited(MouseEvent mouseEvent); MouseEvent mouseExited(MouseEvent mouseEvent);
/**
* Mouse dragged event. If this event will be consumed it will not be propagated further to client.
*
* @param mouseEvent the mouse event
* @return the mouse event
*/
MouseEvent mouseDragged(MouseEvent mouseEvent); MouseEvent mouseDragged(MouseEvent mouseEvent);
/**
* Mouse moved event. If this event will be consumed it will not be propagated further to client.
*
* @param mouseEvent the mouse event
* @return the mouse event
*/
MouseEvent mouseMoved(MouseEvent mouseEvent); MouseEvent mouseMoved(MouseEvent mouseEvent);
/**
* Mouse wheel moved event. If this event will be consumed it will not be propagated further to client.
*
* @param event the event
* @return the mouse wheel event
*/
MouseWheelEvent mouseWheelMoved(MouseWheelEvent event); MouseWheelEvent mouseWheelMoved(MouseWheelEvent event);
/**
* Key pressed event.
*
* @param keyEvent the key event
*/
void keyPressed(KeyEvent keyEvent); void keyPressed(KeyEvent keyEvent);
/**
* Key released event.
*
* @param keyEvent the key event
*/
void keyReleased(KeyEvent keyEvent); void keyReleased(KeyEvent keyEvent);
/**
* Key typed event.
*
* @param keyEvent the key event
*/
void keyTyped(KeyEvent keyEvent); void keyTyped(KeyEvent keyEvent);
} }