Commit 4f0b96f3 authored by h2b's avatar h2b

Event package started.

parent 92dcbd8b
......@@ -5,6 +5,7 @@ scalaVersion := "2.12.1"
libraryDependencies ++= Seq(
"de.h2b.scala.lib.math" %% "linalg" % "2.1.0",
"de.h2b.scala.lib" %% "utilib" % "0.4.0",
"com.typesafe.akka" %% "akka-actor" % "2.4.17",
"org.scalatest" %% "scalatest" % "3.0.1" % Test,
"junit" % "junit" % "4.12" % Test
)
/*
SimGraf - A Simple Scala Graphics Library
Copyright 2016-2017 Hans-Hermann Bode
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package de.h2b.scala.lib.simgraf.event
/**
* @since 1.2.0
* @author h2b
*/
sealed trait Button
case object NoButton extends Button
case object LeftButton extends Button
case object RightButton extends Button
case object MiddleButton extends Button
case class OtherButton (number: Int) extends Button
/*
SimGraf - A Simple Scala Graphics Library
Copyright 2016-2017 Hans-Hermann Bode
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package de.h2b.scala.lib.simgraf.event
import de.h2b.scala.lib.simgraf.Pixel
/**
* @since 1.2.0
* @author h2b
*/
sealed trait Event
case class KeyEvent (char: Char, modifiers: Set[Modifier]) extends Event
case class MouseEvent (button: Button, modifiers: Set[Modifier], clickCount: Int,
position: Pixel) extends Event
/*
SimGraf - A Simple Scala Graphics Library
Copyright 2016-2017 Hans-Hermann Bode
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package de.h2b.scala.lib.simgraf.event
/**
* @since 1.2.0
* @author h2b
*/
sealed trait Modifier
case object ShiftModifier extends Modifier
case object CtrlModifier extends Modifier
case object AltModifier extends Modifier
case object AltGraphModifier extends Modifier
case object MetaModifier extends Modifier
case class OtherModifier (code: Int) extends Modifier
/*
SimGraf - A Simple Scala Graphics Library
Copyright 2016-2017 Hans-Hermann Bode
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package de.h2b.scala.lib.simgraf
/**
* @since 1.2.0
* @author h2b
*/
package object event
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment