11package mp .code ;
22
3- import mp .code .proto .Cursor ;
4- import mp .code .proto .Selection ;
3+ import mp .code .proto .CursorUpdate ;
4+ import mp .code .proto .CursorEvent ;
5+ import mp .code .proto .CursorPosition ;
56import mp .code .proto .WorkspaceIdentifier ;
67import mp .code .exceptions .ControllerException ;
78
@@ -31,43 +32,43 @@ public WorkspaceIdentifier workspaceId() {
3132 return workspace_id (this .ptr );
3233 }
3334
34- private static native Cursor try_recv (long self ) throws ControllerException ;
35+ private static native CursorEvent try_recv (long self ) throws ControllerException ;
3536
3637 /**
37- * Tries to get a {@link Cursor} update from the queue if any were present, null otherwise.
38- * @return the first cursor update in queue, if any are present
38+ * Tries to get a {@link CursorEvent} from the queue if any were present, null otherwise.
39+ * @return the first cursor event in queue, if any are present
3940 * @throws ControllerException if the controller was stopped
4041 */
41- public Cursor tryRecv () throws ControllerException {
42+ public CursorEvent tryRecv () throws ControllerException {
4243 return try_recv (this .ptr );
4344 }
4445
45- private static native Cursor recv (long self ) throws ControllerException ;
46+ private static native CursorUpdate recv (long self ) throws ControllerException ;
4647
4748 /**
48- * Blocks until a {@link Cursor} update is available and returns it.
49- * @return the cursor update that occurred
49+ * Blocks until a {@link CursorEvent} is available and returns it.
50+ * @return the cursor event that occurred
5051 * @throws ControllerException if the controller was stopped
5152 */
52- public Cursor recv () throws ControllerException {
53+ public CursorUpdate recv () throws ControllerException {
5354 return recv (this .ptr );
5455 }
5556
56- private static native void send (long self , Selection selection ) throws ControllerException ;
57+ private static native void send (long self , CursorUpdate selection ) throws ControllerException ;
5758
5859 /**
59- * Tries to send a {@link Selection } update.
60- * @param selection the update to send
60+ * Tries to send a {@link CursorPosition } update.
61+ * @param update the update to send
6162 * @throws ControllerException if the controller was stopped
6263 */
63- public void send (Selection selection ) throws ControllerException {
64- send (this .ptr , selection );
64+ public void send (CursorUpdate update ) throws ControllerException {
65+ send (this .ptr , update );
6566 }
6667
6768 private static native void callback (long self , Consumer <CursorController > cb );
6869
6970 /**
70- * Registers a callback to be invoked whenever a {@link Cursor } update occurs.
71+ * Registers a callback to be invoked whenever a {@link CursorUpdate } update occurs.
7172 * This will not work unless a Java thread has been dedicated to the event loop.
7273 * @param cb a {@link Consumer} that receives the controller when the change occurs;
7374 * you should probably spawn a new thread in here, to avoid deadlocking
@@ -90,7 +91,7 @@ public void clearCallback() {
9091 private static native void poll (long self ) throws ControllerException ;
9192
9293 /**
93- * Blocks until a {@link Cursor } update is available.
94+ * Blocks until a {@link CursorUpdate } update is available.
9495 * @throws ControllerException if the controller was stopped
9596 */
9697 public void poll () throws ControllerException {
0 commit comments