gi-gdk-3.0.22: Gdk bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Gdk.Callbacks

Description

 
Synopsis

Signals

EventFunc

type C_EventFunc = Ptr Event -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type EventFunc Source #

Arguments

 = Event

event: the Event to process.

-> IO () 

Specifies the type of function passed to eventHandlerSet to handle all GDK events.

type EventFunc_WithClosures Source #

Arguments

 = Event

event: the Event to process.

-> Ptr ()

data: user data set when the event handler was installed with eventHandlerSet.

-> IO () 

Specifies the type of function passed to eventHandlerSet to handle all GDK events.

drop_closures_EventFunc :: EventFunc -> EventFunc_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_EventFunc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_EventFunc 
-> Event

event: the Event to process.

-> Ptr ()

data: user data set when the event handler was installed with eventHandlerSet.

-> m () 

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

genClosure_EventFunc :: MonadIO m => EventFunc -> m (GClosure C_EventFunc) Source #

Wrap the callback into a GClosure.

mk_EventFunc :: C_EventFunc -> IO (FunPtr C_EventFunc) Source #

Generate a function pointer callable from C code, from a C_EventFunc.

noEventFunc :: Maybe EventFunc Source #

A convenience synonym for Nothing :: Maybe EventFunc.

FilterFunc

type C_FilterFunc = Ptr () -> Ptr Event -> Ptr () -> IO CUInt Source #

Type for the callback on the (unwrapped) C side.

type FilterFunc Source #

Arguments

 = Ptr ()

xevent: the native event to filter.

-> Event

event: the GDK event to which the X event will be translated.

-> IO FilterReturn

Returns: a FilterReturn value.

Specifies the type of function used to filter native events before they are converted to GDK events.

When a filter is called, event is unpopulated, except for event->window. The filter may translate the native event to a GDK event and store the result in event, or handle it without translation. If the filter translates the event and processing should continue, it should return FilterReturnTranslate.

type FilterFunc_WithClosures Source #

Arguments

 = Ptr ()

xevent: the native event to filter.

-> Event

event: the GDK event to which the X event will be translated.

-> Ptr ()

data: user data set when the filter was installed.

-> IO FilterReturn

Returns: a FilterReturn value.

Specifies the type of function used to filter native events before they are converted to GDK events.

When a filter is called, event is unpopulated, except for event->window. The filter may translate the native event to a GDK event and store the result in event, or handle it without translation. If the filter translates the event and processing should continue, it should return FilterReturnTranslate.

drop_closures_FilterFunc :: FilterFunc -> FilterFunc_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_FilterFunc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_FilterFunc 
-> Ptr ()

xevent: the native event to filter.

-> Event

event: the GDK event to which the X event will be translated.

-> Ptr ()

data: user data set when the filter was installed.

-> m FilterReturn

Returns: a FilterReturn value.

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

mk_FilterFunc :: C_FilterFunc -> IO (FunPtr C_FilterFunc) Source #

Generate a function pointer callable from C code, from a C_FilterFunc.

noFilterFunc :: Maybe FilterFunc Source #

A convenience synonym for Nothing :: Maybe FilterFunc.

SeatGrabPrepareFunc

type C_SeatGrabPrepareFunc = Ptr Seat -> Ptr Window -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type SeatGrabPrepareFunc Source #

Arguments

 = Seat

seat: the Seat being grabbed

-> Window

window: the Window being grabbed

-> IO () 

Type of the callback used to set up window so it can be grabbed. A typical action would be ensuring the window is visible, although there's room for other initialization actions.

Since: 3.20

type SeatGrabPrepareFunc_WithClosures Source #

Arguments

 = Seat

seat: the Seat being grabbed

-> Window

window: the Window being grabbed

-> Ptr ()

userData: user data passed in seatGrab

-> IO () 

Type of the callback used to set up window so it can be grabbed. A typical action would be ensuring the window is visible, although there's room for other initialization actions.

Since: 3.20

drop_closures_SeatGrabPrepareFunc :: SeatGrabPrepareFunc -> SeatGrabPrepareFunc_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_SeatGrabPrepareFunc Source #

Arguments

:: (HasCallStack, MonadIO m, IsSeat a, IsWindow b) 
=> FunPtr C_SeatGrabPrepareFunc 
-> a

seat: the Seat being grabbed

-> b

window: the Window being grabbed

-> Ptr ()

userData: user data passed in seatGrab

-> m () 

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

mk_SeatGrabPrepareFunc :: C_SeatGrabPrepareFunc -> IO (FunPtr C_SeatGrabPrepareFunc) Source #

Generate a function pointer callable from C code, from a C_SeatGrabPrepareFunc.

WindowChildFunc

type C_WindowChildFunc = Ptr Window -> Ptr () -> IO CInt Source #

Type for the callback on the (unwrapped) C side.

type WindowChildFunc Source #

Arguments

 = Window

window: a Window

-> IO Bool

Returns: True to invalidate window recursively

A function of this type is passed to windowInvalidateMaybeRecurse. It gets called for each child of the window to determine whether to recursively invalidate it or now.

type WindowChildFunc_WithClosures Source #

Arguments

 = Window

window: a Window

-> Ptr ()

userData: user data

-> IO Bool

Returns: True to invalidate window recursively

A function of this type is passed to windowInvalidateMaybeRecurse. It gets called for each child of the window to determine whether to recursively invalidate it or now.

drop_closures_WindowChildFunc :: WindowChildFunc -> WindowChildFunc_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_WindowChildFunc Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) 
=> FunPtr C_WindowChildFunc 
-> a

window: a Window

-> Ptr ()

userData: user data

-> m Bool

Returns: True to invalidate window recursively

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.

mk_WindowChildFunc :: C_WindowChildFunc -> IO (FunPtr C_WindowChildFunc) Source #

Generate a function pointer callable from C code, from a C_WindowChildFunc.

WindowInvalidateHandlerFunc

type C_WindowInvalidateHandlerFunc = Ptr Window -> Ptr Region -> IO () Source #

Type for the callback on the (unwrapped) C side.

type WindowInvalidateHandlerFunc Source #

Arguments

 = Window

window: a Window

-> Region

region: a Region

-> IO () 

Whenever some area of the window is invalidated (directly in the window or in a child window) this gets called with region in the coordinate space of window. You can use region to just keep track of the dirty region, or you can actually change region in case you are doing display tricks like showing a child in multiple places.

Since: 3.10

dynamic_WindowInvalidateHandlerFunc Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) 
=> FunPtr C_WindowInvalidateHandlerFunc 
-> a

window: a Window

-> Region

region: a Region

-> m () 

Given a pointer to a foreign C function, wrap it into a function callable from Haskell.