gi-glib
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.GLib.Structs.PollFD

Description

Represents a file descriptor, which events to poll for, and which events occurred.

Synopsis

Exported types

newtype PollFD Source #

Memory-managed wrapper type.

Constructors

PollFD (ManagedPtr PollFD) 

Instances

Instances details
Eq PollFD Source # 
Instance details

Defined in GI.GLib.Structs.PollFD

Methods

(==) :: PollFD -> PollFD -> Bool #

(/=) :: PollFD -> PollFD -> Bool #

GBoxed PollFD Source # 
Instance details

Defined in GI.GLib.Structs.PollFD

ManagedPtrNewtype PollFD Source # 
Instance details

Defined in GI.GLib.Structs.PollFD

TypedObject PollFD Source # 
Instance details

Defined in GI.GLib.Structs.PollFD

Methods

glibType :: IO GType #

HasParentTypes PollFD Source # 
Instance details

Defined in GI.GLib.Structs.PollFD

tag ~ 'AttrSet => Constructible PollFD tag Source # 
Instance details

Defined in GI.GLib.Structs.PollFD

Methods

new :: MonadIO m => (ManagedPtr PollFD -> PollFD) -> [AttrOp PollFD tag] -> m PollFD #

HasAttributeList PollFD Source # 
Instance details

Defined in GI.GLib.Structs.PollFD

(info ~ ResolvePollFDMethod t PollFD, OverloadedMethod info PollFD p, HasField t PollFD p) => HasField (t :: Symbol) PollFD (p :: Type) Source # 
Instance details

Defined in GI.GLib.Structs.PollFD

Methods

getField :: PollFD -> p #

(info ~ ResolvePollFDMethod t PollFD, OverloadedMethodInfo info PollFD) => IsLabel t (MethodProxy info PollFD) Source # 
Instance details

Defined in GI.GLib.Structs.PollFD

Methods

fromLabel :: MethodProxy info PollFD #

(info ~ ResolvePollFDMethod t PollFD, OverloadedMethod info PollFD p) => IsLabel t (PollFD -> p) Source # 
Instance details

Defined in GI.GLib.Structs.PollFD

Methods

fromLabel :: PollFD -> p #

IsGValue (Maybe PollFD) Source #

Convert PollFD to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.GLib.Structs.PollFD

type AttributeList PollFD Source # 
Instance details

Defined in GI.GLib.Structs.PollFD

type ParentTypes PollFD Source # 
Instance details

Defined in GI.GLib.Structs.PollFD

type ParentTypes PollFD = '[] :: [Type]

newZeroPollFD :: MonadIO m => m PollFD Source #

Construct a PollFD struct initialized to zero.

Methods

type family ResolvePollFDMethod (t :: Symbol) o where ... Source #

Properties

events

a bitwise combination from IOCondition, specifying which events should be polled for. Typically for reading from a file descriptor you would use IOConditionIn | IOConditionHup | IOConditionErr, and for writing you would use IOConditionOut | IOConditionErr.

getPollFDEvents :: MonadIO m => PollFD -> m CUShort Source #

Get the value of the “events” field. When overloading is enabled, this is equivalent to

get pollFD #events

setPollFDEvents :: MonadIO m => PollFD -> CUShort -> m () Source #

Set the value of the “events” field. When overloading is enabled, this is equivalent to

set pollFD [ #events := value ]

fd

the file descriptor to poll (or a HANDLE on Win32)

getPollFDFd :: MonadIO m => PollFD -> m Int32 Source #

Get the value of the “fd” field. When overloading is enabled, this is equivalent to

get pollFD #fd

setPollFDFd :: MonadIO m => PollFD -> Int32 -> m () Source #

Set the value of the “fd” field. When overloading is enabled, this is equivalent to

set pollFD [ #fd := value ]

revents

a bitwise combination of flags from IOCondition, returned from the poll() function to indicate which events occurred.

getPollFDRevents :: MonadIO m => PollFD -> m CUShort Source #

Get the value of the “revents” field. When overloading is enabled, this is equivalent to

get pollFD #revents

setPollFDRevents :: MonadIO m => PollFD -> CUShort -> m () Source #

Set the value of the “revents” field. When overloading is enabled, this is equivalent to

set pollFD [ #revents := value ]