{-# OPTIONS_HADDOCK hide #-}---------------------------------------------------------------------------------- |-- Module : Graphics.UI.GLUT.Types-- Copyright : (c) Sven Panne 2002-2013-- License : BSD3---- Maintainer : Sven Panne <svenpanne@gmail.com>-- Stability : stable-- Portability : portable---- This is a purely internal module with miscellaneous types which don\'t really-- have a good place elsewhere.----------------------------------------------------------------------------------moduleGraphics.UI.GLUT.Types(Window(..),-- constructor used only internallyRelation(..),relationToString,-- used only internallyMouseButton(..),marshalMouseButton,unmarshalMouseButton-- used only internally)whereimportForeign.C.TypesimportGraphics.UI.GLUT.Raw---------------------------------------------------------------------------------- | An opaque identifier for a top-level window or a subwindow.newtypeWindow=WindowCIntderiving(Eq,Ord,Show)---------------------------------------------------------------------------------- | A relation between a 'Graphics.UI.GLUT.Initialization.DisplayCapability'-- and a numeric value.dataRelation=IsEqualTo-- ^ Equal.|IsNotEqualTo-- ^ Not equal.|IsLessThan-- ^ Less than and preferring larger difference (the least-- is best).|IsNotGreaterThan-- ^ Less than or equal and preferring larger difference-- (the least is best).|IsGreaterThan-- ^ Greater than and preferring larger differences (the-- most is best).|IsAtLeast-- ^ Greater than or equal and preferring more instead of-- less. This relation is useful for allocating-- resources like color precision or depth buffer-- precision where the maximum precision is generally-- preferred. Contrast with 'IsNotLessThan' relation.|IsNotLessThan-- ^ Greater than or equal but preferring less instead of-- more. This relation is useful for allocating-- resources such as stencil bits or auxillary color-- buffers where you would rather not over-allocate.deriving(Eq,Ord,Show)relationToString::Relation->StringrelationToStringIsEqualTo="="relationToStringIsNotEqualTo="!="relationToStringIsLessThan="<"relationToStringIsNotGreaterThan="<="relationToStringIsGreaterThan=">"relationToStringIsAtLeast=">="relationToStringIsNotLessThan="~"---------------------------------------------------------------------------------- | Mouse buttons, including a wheeldataMouseButton=LeftButton|MiddleButton|RightButton|WheelUp|WheelDown|AdditionalButtonIntderiving(Eq,Ord,Show)marshalMouseButton::MouseButton->CIntmarshalMouseButtonx=casexofLeftButton->glut_LEFT_BUTTONMiddleButton->glut_MIDDLE_BUTTONRightButton->glut_RIGHT_BUTTONWheelUp->glut_WHEEL_UPWheelDown->glut_WHEEL_DOWNAdditionalButtonb->fromIntegralbunmarshalMouseButton::CInt->MouseButtonunmarshalMouseButtonx|x==glut_LEFT_BUTTON=LeftButton|x==glut_MIDDLE_BUTTON=MiddleButton|x==glut_RIGHT_BUTTON=RightButton|x==glut_WHEEL_UP=WheelUp|x==glut_WHEEL_DOWN=WheelDown|otherwise=AdditionalButton(fromIntegralx)glut_WHEEL_UP::CIntglut_WHEEL_UP=3glut_WHEEL_DOWN::CIntglut_WHEEL_DOWN=4