pub struct Message {
pub message_type: MessageType,
pub message_position: MessagePosition,
}
Expand description
Represents a message sent to the windows. A message contains a type and a position.
Fields§
§message_type: MessageType
Value from the MessageType enumeration indicating the type of this message.
message_position: MessagePosition
Position of message when the message was sent. In a real system, this would generally represent the position of a cursor at the time the message was generated.
Implementations§
source§impl Message
impl Message
sourcepub fn new(message_type: MessageType, x: i32, y: i32) -> Message
pub fn new(message_type: MessageType, x: i32, y: i32) -> Message
Constructor.
Parameters
-
message_type
Value from the MessageType enumeration indicating the type of message being created.
-
x
X Position of the message.
-
y
Y Position of the message.
Returns
Returns a new instance of the Message struct.