gi-gio-2.0.27: Gio bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Gio.Callbacks

Description

 
Synopsis

Signals

ActionEntryActivateFieldCallback

type ActionEntryActivateFieldCallback = SimpleAction -> Maybe GVariant -> IO () Source #

No description available in the introspection data.

type ActionEntryActivateFieldCallback_WithClosures = SimpleAction -> Maybe GVariant -> Ptr () -> IO () Source #

No description available in the introspection data.

type C_ActionEntryActivateFieldCallback = Ptr SimpleAction -> Ptr GVariant -> Ptr () -> IO () Source #

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

dynamic_ActionEntryActivateFieldCallback :: (HasCallStack, MonadIO m, IsSimpleAction a) => FunPtr C_ActionEntryActivateFieldCallback -> a -> Maybe GVariant -> Ptr () -> m () Source #

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

ActionEntryChangeStateFieldCallback

type ActionEntryChangeStateFieldCallback = SimpleAction -> GVariant -> IO () Source #

No description available in the introspection data.

type ActionEntryChangeStateFieldCallback_WithClosures = SimpleAction -> GVariant -> Ptr () -> IO () Source #

No description available in the introspection data.

type C_ActionEntryChangeStateFieldCallback = Ptr SimpleAction -> Ptr GVariant -> Ptr () -> IO () Source #

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

dynamic_ActionEntryChangeStateFieldCallback :: (HasCallStack, MonadIO m, IsSimpleAction a) => FunPtr C_ActionEntryChangeStateFieldCallback -> a -> GVariant -> Ptr () -> m () Source #

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

AsyncReadyCallback

type AsyncReadyCallback Source #

Arguments

 = Maybe Object

sourceObject: the object the asynchronous operation was started with.

-> AsyncResult

res: a AsyncResult.

-> IO () 

Type definition for a function that will be called back when an asynchronous operation within GIO has been completed. AsyncReadyCallback callbacks from Task are guaranteed to be invoked in a later iteration of the [thread-default main context][g-main-context-push-thread-default] where the Task was created. All other users of AsyncReadyCallback must likewise call it asynchronously in a later iteration of the main context.

type AsyncReadyCallback_WithClosures Source #

Arguments

 = Maybe Object

sourceObject: the object the asynchronous operation was started with.

-> AsyncResult

res: a AsyncResult.

-> Ptr ()

userData: user data passed to the callback.

-> IO () 

Type definition for a function that will be called back when an asynchronous operation within GIO has been completed. AsyncReadyCallback callbacks from Task are guaranteed to be invoked in a later iteration of the [thread-default main context][g-main-context-push-thread-default] where the Task was created. All other users of AsyncReadyCallback must likewise call it asynchronously in a later iteration of the main context.

type C_AsyncReadyCallback = Ptr Object -> Ptr AsyncResult -> Ptr () -> IO () Source #

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

drop_closures_AsyncReadyCallback :: AsyncReadyCallback -> AsyncReadyCallback_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_AsyncReadyCallback Source #

Arguments

:: (HasCallStack, MonadIO m, IsObject a, IsAsyncResult b) 
=> FunPtr C_AsyncReadyCallback 
-> Maybe a

sourceObject: the object the asynchronous operation was started with.

-> b

res: a AsyncResult.

-> Ptr ()

userData: user data passed to the callback.

-> m () 

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

mk_AsyncReadyCallback :: C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback) Source #

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

BusAcquiredCallback

type BusAcquiredCallback Source #

Arguments

 = DBusConnection

connection: The DBusConnection to a message bus.

-> Text

name: The name that is requested to be owned.

-> IO () 

Invoked when a connection to a message bus has been obtained.

Since: 2.26

type BusAcquiredCallback_WithClosures Source #

Arguments

 = DBusConnection

connection: The DBusConnection to a message bus.

-> Text

name: The name that is requested to be owned.

-> Ptr ()

userData: User data passed to g_bus_own_name().

-> IO () 

Invoked when a connection to a message bus has been obtained.

Since: 2.26

type C_BusAcquiredCallback = Ptr DBusConnection -> CString -> Ptr () -> IO () Source #

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

drop_closures_BusAcquiredCallback :: BusAcquiredCallback -> BusAcquiredCallback_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_BusAcquiredCallback Source #

Arguments

:: (HasCallStack, MonadIO m, IsDBusConnection a) 
=> FunPtr C_BusAcquiredCallback 
-> a

connection: The DBusConnection to a message bus.

-> Text

name: The name that is requested to be owned.

-> Ptr ()

userData: User data passed to g_bus_own_name().

-> m () 

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

mk_BusAcquiredCallback :: C_BusAcquiredCallback -> IO (FunPtr C_BusAcquiredCallback) Source #

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

BusNameAcquiredCallback

type BusNameAcquiredCallback Source #

Arguments

 = DBusConnection

connection: The DBusConnection on which to acquired the name.

-> Text

name: The name being owned.

-> IO () 

Invoked when the name is acquired.

Since: 2.26

type BusNameAcquiredCallback_WithClosures Source #

Arguments

 = DBusConnection

connection: The DBusConnection on which to acquired the name.

-> Text

name: The name being owned.

-> Ptr ()

userData: User data passed to g_bus_own_name() or g_bus_own_name_on_connection().

-> IO () 

Invoked when the name is acquired.

Since: 2.26

type C_BusNameAcquiredCallback = Ptr DBusConnection -> CString -> Ptr () -> IO () Source #

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

dynamic_BusNameAcquiredCallback Source #

Arguments

:: (HasCallStack, MonadIO m, IsDBusConnection a) 
=> FunPtr C_BusNameAcquiredCallback 
-> a

connection: The DBusConnection on which to acquired the name.

-> Text

name: The name being owned.

-> Ptr ()

userData: User data passed to g_bus_own_name() or g_bus_own_name_on_connection().

-> m () 

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

BusNameAppearedCallback

type BusNameAppearedCallback Source #

Arguments

 = DBusConnection

connection: The DBusConnection the name is being watched on.

-> Text

name: The name being watched.

-> Text

nameOwner: Unique name of the owner of the name being watched.

-> IO () 

Invoked when the name being watched is known to have to have an owner.

Since: 2.26

type BusNameAppearedCallback_WithClosures Source #

Arguments

 = DBusConnection

connection: The DBusConnection the name is being watched on.

-> Text

name: The name being watched.

-> Text

nameOwner: Unique name of the owner of the name being watched.

-> Ptr ()

userData: User data passed to g_bus_watch_name().

-> IO () 

Invoked when the name being watched is known to have to have an owner.

Since: 2.26

type C_BusNameAppearedCallback = Ptr DBusConnection -> CString -> CString -> Ptr () -> IO () Source #

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

dynamic_BusNameAppearedCallback Source #

Arguments

:: (HasCallStack, MonadIO m, IsDBusConnection a) 
=> FunPtr C_BusNameAppearedCallback 
-> a

connection: The DBusConnection the name is being watched on.

-> Text

name: The name being watched.

-> Text

nameOwner: Unique name of the owner of the name being watched.

-> Ptr ()

userData: User data passed to g_bus_watch_name().

-> m () 

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

BusNameLostCallback

type BusNameLostCallback Source #

Arguments

 = DBusConnection

connection: The DBusConnection on which to acquire the name or Nothing if the connection was disconnected.

-> Text

name: The name being owned.

-> IO () 

Invoked when the name is lost or connection has been closed.

Since: 2.26

type BusNameLostCallback_WithClosures Source #

Arguments

 = DBusConnection

connection: The DBusConnection on which to acquire the name or Nothing if the connection was disconnected.

-> Text

name: The name being owned.

-> Ptr ()

userData: User data passed to g_bus_own_name() or g_bus_own_name_on_connection().

-> IO () 

Invoked when the name is lost or connection has been closed.

Since: 2.26

type C_BusNameLostCallback = Ptr DBusConnection -> CString -> Ptr () -> IO () Source #

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

drop_closures_BusNameLostCallback :: BusNameLostCallback -> BusNameLostCallback_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_BusNameLostCallback Source #

Arguments

:: (HasCallStack, MonadIO m, IsDBusConnection a) 
=> FunPtr C_BusNameLostCallback 
-> a

connection: The DBusConnection on which to acquire the name or Nothing if the connection was disconnected.

-> Text

name: The name being owned.

-> Ptr ()

userData: User data passed to g_bus_own_name() or g_bus_own_name_on_connection().

-> m () 

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

mk_BusNameLostCallback :: C_BusNameLostCallback -> IO (FunPtr C_BusNameLostCallback) Source #

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

BusNameVanishedCallback

type BusNameVanishedCallback Source #

Arguments

 = DBusConnection

connection: The DBusConnection the name is being watched on, or Nothing.

-> Text

name: The name being watched.

-> IO () 

Invoked when the name being watched is known not to have to have an owner.

This is also invoked when the DBusConnection on which the watch was established has been closed. In that case, connection will be Nothing.

Since: 2.26

type BusNameVanishedCallback_WithClosures Source #

Arguments

 = DBusConnection

connection: The DBusConnection the name is being watched on, or Nothing.

-> Text

name: The name being watched.

-> Ptr ()

userData: User data passed to g_bus_watch_name().

-> IO () 

Invoked when the name being watched is known not to have to have an owner.

This is also invoked when the DBusConnection on which the watch was established has been closed. In that case, connection will be Nothing.

Since: 2.26

type C_BusNameVanishedCallback = Ptr DBusConnection -> CString -> Ptr () -> IO () Source #

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

dynamic_BusNameVanishedCallback Source #

Arguments

:: (HasCallStack, MonadIO m, IsDBusConnection a) 
=> FunPtr C_BusNameVanishedCallback 
-> a

connection: The DBusConnection the name is being watched on, or Nothing.

-> Text

name: The name being watched.

-> Ptr ()

userData: User data passed to g_bus_watch_name().

-> m () 

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

CancellableSourceFunc

type C_CancellableSourceFunc = Ptr Cancellable -> Ptr () -> IO CInt Source #

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

type CancellableSourceFunc Source #

Arguments

 = Maybe Cancellable

cancellable: the Cancellable

-> IO Bool

Returns: it should return False if the source should be removed.

This is the function type of the callback used for the Source returned by cancellableSourceNew.

Since: 2.28

type CancellableSourceFunc_WithClosures Source #

Arguments

 = Maybe Cancellable

cancellable: the Cancellable

-> Ptr ()

userData: data passed in by the user.

-> IO Bool

Returns: it should return False if the source should be removed.

This is the function type of the callback used for the Source returned by cancellableSourceNew.

Since: 2.28

dynamic_CancellableSourceFunc Source #

Arguments

:: (HasCallStack, MonadIO m, IsCancellable a) 
=> FunPtr C_CancellableSourceFunc 
-> Maybe a

cancellable: the Cancellable

-> Ptr ()

userData: data passed in by the user.

-> m Bool

Returns: it should return False if the source should be removed.

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

mk_CancellableSourceFunc :: C_CancellableSourceFunc -> IO (FunPtr C_CancellableSourceFunc) Source #

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

DBusInterfaceGetPropertyFunc

type C_DBusInterfaceGetPropertyFunc = Ptr DBusConnection -> CString -> CString -> CString -> CString -> Ptr GError -> Ptr () -> IO (Ptr GVariant) Source #

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

type DBusInterfaceGetPropertyFunc Source #

Arguments

 = DBusConnection

connection: A DBusConnection.

-> Text

sender: The unique bus name of the remote caller.

-> Text

objectPath: The object path that the method was invoked on.

-> Text

interfaceName: The D-Bus interface name for the property.

-> Text

propertyName: The name of the property to get the value of.

-> GError

error: Return location for error.

-> IO GVariant

Returns: A GVariant with the value for propertyName or Nothing if error is set. If the returned GVariant is floating, it is consumed - otherwise its reference count is decreased by one.

The type of the getProperty function in DBusInterfaceVTable.

Since: 2.26

type DBusInterfaceGetPropertyFunc_WithClosures Source #

Arguments

 = DBusConnection

connection: A DBusConnection.

-> Text

sender: The unique bus name of the remote caller.

-> Text

objectPath: The object path that the method was invoked on.

-> Text

interfaceName: The D-Bus interface name for the property.

-> Text

propertyName: The name of the property to get the value of.

-> GError

error: Return location for error.

-> Ptr ()

userData: The userData gpointer passed to g_dbus_connection_register_object().

-> IO GVariant

Returns: A GVariant with the value for propertyName or Nothing if error is set. If the returned GVariant is floating, it is consumed - otherwise its reference count is decreased by one.

The type of the getProperty function in DBusInterfaceVTable.

Since: 2.26

dynamic_DBusInterfaceGetPropertyFunc Source #

Arguments

:: (HasCallStack, MonadIO m, IsDBusConnection a) 
=> FunPtr C_DBusInterfaceGetPropertyFunc 
-> a

connection: A DBusConnection.

-> Text

sender: The unique bus name of the remote caller.

-> Text

objectPath: The object path that the method was invoked on.

-> Text

interfaceName: The D-Bus interface name for the property.

-> Text

propertyName: The name of the property to get the value of.

-> GError

error: Return location for error.

-> Ptr ()

userData: The userData gpointer passed to g_dbus_connection_register_object().

-> m GVariant

Returns: A GVariant with the value for propertyName or Nothing if error is set. If the returned GVariant is floating, it is consumed - otherwise its reference count is decreased by one.

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

DBusInterfaceMethodCallFunc

type C_DBusInterfaceMethodCallFunc = Ptr DBusConnection -> CString -> CString -> CString -> CString -> Ptr GVariant -> Ptr DBusMethodInvocation -> Ptr () -> IO () Source #

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

type DBusInterfaceMethodCallFunc Source #

Arguments

 = DBusConnection

connection: A DBusConnection.

-> Text

sender: The unique bus name of the remote caller.

-> Text

objectPath: The object path that the method was invoked on.

-> Text

interfaceName: The D-Bus interface name the method was invoked on.

-> Text

methodName: The name of the method that was invoked.

-> GVariant

parameters: A GVariant tuple with parameters.

-> DBusMethodInvocation

invocation: A DBusMethodInvocation object that must be used to return a value or error.

-> IO () 

The type of the methodCall function in DBusInterfaceVTable.

Since: 2.26

type DBusInterfaceMethodCallFunc_WithClosures Source #

Arguments

 = DBusConnection

connection: A DBusConnection.

-> Text

sender: The unique bus name of the remote caller.

-> Text

objectPath: The object path that the method was invoked on.

-> Text

interfaceName: The D-Bus interface name the method was invoked on.

-> Text

methodName: The name of the method that was invoked.

-> GVariant

parameters: A GVariant tuple with parameters.

-> DBusMethodInvocation

invocation: A DBusMethodInvocation object that must be used to return a value or error.

-> Ptr ()

userData: The userData gpointer passed to g_dbus_connection_register_object().

-> IO () 

The type of the methodCall function in DBusInterfaceVTable.

Since: 2.26

dynamic_DBusInterfaceMethodCallFunc Source #

Arguments

:: (HasCallStack, MonadIO m, IsDBusConnection a, IsDBusMethodInvocation b) 
=> FunPtr C_DBusInterfaceMethodCallFunc 
-> a

connection: A DBusConnection.

-> Text

sender: The unique bus name of the remote caller.

-> Text

objectPath: The object path that the method was invoked on.

-> Text

interfaceName: The D-Bus interface name the method was invoked on.

-> Text

methodName: The name of the method that was invoked.

-> GVariant

parameters: A GVariant tuple with parameters.

-> b

invocation: A DBusMethodInvocation object that must be used to return a value or error.

-> Ptr ()

userData: The userData gpointer passed to g_dbus_connection_register_object().

-> m () 

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

DBusInterfaceSetPropertyFunc

type C_DBusInterfaceSetPropertyFunc = Ptr DBusConnection -> CString -> CString -> CString -> CString -> Ptr GVariant -> Ptr GError -> Ptr () -> IO CInt Source #

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

type DBusInterfaceSetPropertyFunc Source #

Arguments

 = DBusConnection

connection: A DBusConnection.

-> Text

sender: The unique bus name of the remote caller.

-> Text

objectPath: The object path that the method was invoked on.

-> Text

interfaceName: The D-Bus interface name for the property.

-> Text

propertyName: The name of the property to get the value of.

-> GVariant

value: The value to set the property to.

-> GError

error: Return location for error.

-> IO Bool

Returns: True if the property was set to value, False if error is set.

The type of the setProperty function in DBusInterfaceVTable.

Since: 2.26

type DBusInterfaceSetPropertyFunc_WithClosures Source #

Arguments

 = DBusConnection

connection: A DBusConnection.

-> Text

sender: The unique bus name of the remote caller.

-> Text

objectPath: The object path that the method was invoked on.

-> Text

interfaceName: The D-Bus interface name for the property.

-> Text

propertyName: The name of the property to get the value of.

-> GVariant

value: The value to set the property to.

-> GError

error: Return location for error.

-> Ptr ()

userData: The userData gpointer passed to g_dbus_connection_register_object().

-> IO Bool

Returns: True if the property was set to value, False if error is set.

The type of the setProperty function in DBusInterfaceVTable.

Since: 2.26

dynamic_DBusInterfaceSetPropertyFunc Source #

Arguments

:: (HasCallStack, MonadIO m, IsDBusConnection a) 
=> FunPtr C_DBusInterfaceSetPropertyFunc 
-> a

connection: A DBusConnection.

-> Text

sender: The unique bus name of the remote caller.

-> Text

objectPath: The object path that the method was invoked on.

-> Text

interfaceName: The D-Bus interface name for the property.

-> Text

propertyName: The name of the property to get the value of.

-> GVariant

value: The value to set the property to.

-> GError

error: Return location for error.

-> Ptr ()

userData: The userData gpointer passed to g_dbus_connection_register_object().

-> m Bool

Returns: True if the property was set to value, False if error is set.

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

DBusMessageFilterFunction

type C_DBusMessageFilterFunction = Ptr DBusConnection -> Ptr DBusMessage -> CInt -> Ptr () -> IO (Ptr DBusMessage) Source #

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

type DBusMessageFilterFunction Source #

Arguments

 = DBusConnection

connection: A DBusConnection.

-> DBusMessage

message: A locked DBusMessage that the filter function takes ownership of.

-> Bool

incoming: True if it is a message received from the other peer, False if it is a message to be sent to the other peer.

-> IO (Maybe DBusMessage)

Returns: A DBusMessage that will be freed with objectUnref or Nothing to drop the message. Passive filter functions can simply return the passed message object.

Signature for function used in dBusConnectionAddFilter.

A filter function is passed a DBusMessage and expected to return a DBusMessage too. Passive filter functions that don't modify the message can simply return the message object: > >static GDBusMessage * >passive_filter (GDBusConnection *connection > GDBusMessage *message, > gboolean incoming, > gpointer user_data) >{ > // inspect @message > return message; >}

Filter functions that wants to drop a message can simply return Nothing: > >static GDBusMessage * >drop_filter (GDBusConnection *connection > GDBusMessage *message, > gboolean incoming, > gpointer user_data) >{ > if (should_drop_message) > { > g_object_unref (message); > message = NULL; > } > return message; >}

Finally, a filter function may modify a message by copying it: > >static GDBusMessage * >modifying_filter (GDBusConnection *connection > GDBusMessage *message, > gboolean incoming, > gpointer user_data) >{ > GDBusMessage *copy; > GError *error; > > error = NULL; > copy = g_dbus_message_copy (message, &error); > // handle error being set > g_object_unref (message); > > // modify copy > > return copy; >}

If the returned DBusMessage is different from message and cannot be sent on connection (it could use features, such as file descriptors, not compatible with connection), then a warning is logged to standard error. Applications can check this ahead of time using dBusMessageToBlob passing a DBusCapabilityFlags value obtained from connection.

Since: 2.26

type DBusMessageFilterFunction_WithClosures Source #

Arguments

 = DBusConnection

connection: A DBusConnection.

-> DBusMessage

message: A locked DBusMessage that the filter function takes ownership of.

-> Bool

incoming: True if it is a message received from the other peer, False if it is a message to be sent to the other peer.

-> Ptr ()

userData: User data passed when adding the filter.

-> IO (Maybe DBusMessage)

Returns: A DBusMessage that will be freed with objectUnref or Nothing to drop the message. Passive filter functions can simply return the passed message object.

Signature for function used in dBusConnectionAddFilter.

A filter function is passed a DBusMessage and expected to return a DBusMessage too. Passive filter functions that don't modify the message can simply return the message object: > >static GDBusMessage * >passive_filter (GDBusConnection *connection > GDBusMessage *message, > gboolean incoming, > gpointer user_data) >{ > // inspect @message > return message; >}

Filter functions that wants to drop a message can simply return Nothing: > >static GDBusMessage * >drop_filter (GDBusConnection *connection > GDBusMessage *message, > gboolean incoming, > gpointer user_data) >{ > if (should_drop_message) > { > g_object_unref (message); > message = NULL; > } > return message; >}

Finally, a filter function may modify a message by copying it: > >static GDBusMessage * >modifying_filter (GDBusConnection *connection > GDBusMessage *message, > gboolean incoming, > gpointer user_data) >{ > GDBusMessage *copy; > GError *error; > > error = NULL; > copy = g_dbus_message_copy (message, &error); > // handle error being set > g_object_unref (message); > > // modify copy > > return copy; >}

If the returned DBusMessage is different from message and cannot be sent on connection (it could use features, such as file descriptors, not compatible with connection), then a warning is logged to standard error. Applications can check this ahead of time using dBusMessageToBlob passing a DBusCapabilityFlags value obtained from connection.

Since: 2.26

dynamic_DBusMessageFilterFunction Source #

Arguments

:: (HasCallStack, MonadIO m, IsDBusConnection a, IsDBusMessage b) 
=> FunPtr C_DBusMessageFilterFunction 
-> a

connection: A DBusConnection.

-> b

message: A locked DBusMessage that the filter function takes ownership of.

-> Bool

incoming: True if it is a message received from the other peer, False if it is a message to be sent to the other peer.

-> Ptr ()

userData: User data passed when adding the filter.

-> m (Maybe DBusMessage)

Returns: A DBusMessage that will be freed with objectUnref or Nothing to drop the message. Passive filter functions can simply return the passed message object.

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

DBusProxyTypeFunc

type C_DBusProxyTypeFunc = Ptr DBusObjectManagerClient -> CString -> CString -> Ptr () -> IO CGType Source #

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

type DBusProxyTypeFunc Source #

Arguments

 = DBusObjectManagerClient

manager: A DBusObjectManagerClient.

-> Text

objectPath: The object path of the remote object.

-> Maybe Text

interfaceName: The interface name of the remote object or Nothing if a DBusObjectProxy GType is requested.

-> IO GType

Returns: A GType to use for the remote object. The returned type must be a DBusProxy or DBusObjectProxy -derived type.

Function signature for a function used to determine the GType to use for an interface proxy (if interfaceName is not Nothing) or object proxy (if interfaceName is Nothing).

This function is called in the [thread-default main loop][g-main-context-push-thread-default] that manager was constructed in.

Since: 2.30

type DBusProxyTypeFunc_WithClosures Source #

Arguments

 = DBusObjectManagerClient

manager: A DBusObjectManagerClient.

-> Text

objectPath: The object path of the remote object.

-> Maybe Text

interfaceName: The interface name of the remote object or Nothing if a DBusObjectProxy GType is requested.

-> Ptr ()

userData: User data.

-> IO GType

Returns: A GType to use for the remote object. The returned type must be a DBusProxy or DBusObjectProxy -derived type.

Function signature for a function used to determine the GType to use for an interface proxy (if interfaceName is not Nothing) or object proxy (if interfaceName is Nothing).

This function is called in the [thread-default main loop][g-main-context-push-thread-default] that manager was constructed in.

Since: 2.30

drop_closures_DBusProxyTypeFunc :: DBusProxyTypeFunc -> DBusProxyTypeFunc_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_DBusProxyTypeFunc Source #

Arguments

:: (HasCallStack, MonadIO m, IsDBusObjectManagerClient a) 
=> FunPtr C_DBusProxyTypeFunc 
-> a

manager: A DBusObjectManagerClient.

-> Text

objectPath: The object path of the remote object.

-> Maybe Text

interfaceName: The interface name of the remote object or Nothing if a DBusObjectProxy GType is requested.

-> Ptr ()

userData: User data.

-> m GType

Returns: A GType to use for the remote object. The returned type must be a DBusProxy or DBusObjectProxy -derived type.

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

mk_DBusProxyTypeFunc :: C_DBusProxyTypeFunc -> IO (FunPtr C_DBusProxyTypeFunc) Source #

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

DBusSignalCallback

type C_DBusSignalCallback = Ptr DBusConnection -> CString -> CString -> CString -> CString -> Ptr GVariant -> Ptr () -> IO () Source #

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

type DBusSignalCallback Source #

Arguments

 = DBusConnection

connection: A DBusConnection.

-> Text

senderName: The unique bus name of the sender of the signal.

-> Text

objectPath: The object path that the signal was emitted on.

-> Text

interfaceName: The name of the interface.

-> Text

signalName: The name of the signal.

-> GVariant

parameters: A GVariant tuple with parameters for the signal.

-> IO () 

Signature for callback function used in dBusConnectionSignalSubscribe.

Since: 2.26

type DBusSignalCallback_WithClosures Source #

Arguments

 = DBusConnection

connection: A DBusConnection.

-> Text

senderName: The unique bus name of the sender of the signal.

-> Text

objectPath: The object path that the signal was emitted on.

-> Text

interfaceName: The name of the interface.

-> Text

signalName: The name of the signal.

-> GVariant

parameters: A GVariant tuple with parameters for the signal.

-> Ptr ()

userData: User data passed when subscribing to the signal.

-> IO () 

Signature for callback function used in dBusConnectionSignalSubscribe.

Since: 2.26

drop_closures_DBusSignalCallback :: DBusSignalCallback -> DBusSignalCallback_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_DBusSignalCallback Source #

Arguments

:: (HasCallStack, MonadIO m, IsDBusConnection a) 
=> FunPtr C_DBusSignalCallback 
-> a

connection: A DBusConnection.

-> Text

senderName: The unique bus name of the sender of the signal.

-> Text

objectPath: The object path that the signal was emitted on.

-> Text

interfaceName: The name of the interface.

-> Text

signalName: The name of the signal.

-> GVariant

parameters: A GVariant tuple with parameters for the signal.

-> Ptr ()

userData: User data passed when subscribing to the signal.

-> m () 

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

mk_DBusSignalCallback :: C_DBusSignalCallback -> IO (FunPtr C_DBusSignalCallback) Source #

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

DBusSubtreeDispatchFunc

type C_DBusSubtreeDispatchFunc = Ptr DBusConnection -> CString -> CString -> CString -> CString -> Ptr () -> Ptr () -> IO (Ptr DBusInterfaceVTable) Source #

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

type DBusSubtreeDispatchFunc Source #

Arguments

 = DBusConnection

connection: A DBusConnection.

-> Text

sender: The unique bus name of the remote caller.

-> Text

objectPath: The object path that was registered with dBusConnectionRegisterSubtree.

-> Text

interfaceName: The D-Bus interface name that the method call or property access is for.

-> Text

node: A node that is a child of objectPath (relative to objectPath) or Nothing for the root of the subtree.

-> Ptr ()

outUserData: Return location for user data to pass to functions in the returned DBusInterfaceVTable.

-> IO DBusInterfaceVTable

Returns: A DBusInterfaceVTable or Nothing if you don't want to handle the methods.

The type of the dispatch function in DBusSubtreeVTable.

Subtrees are flat. node, if non-Nothing, is always exactly one segment of the object path (ie: it never contains a slash).

Since: 2.26

type DBusSubtreeDispatchFunc_WithClosures Source #

Arguments

 = DBusConnection

connection: A DBusConnection.

-> Text

sender: The unique bus name of the remote caller.

-> Text

objectPath: The object path that was registered with dBusConnectionRegisterSubtree.

-> Text

interfaceName: The D-Bus interface name that the method call or property access is for.

-> Text

node: A node that is a child of objectPath (relative to objectPath) or Nothing for the root of the subtree.

-> Ptr ()

outUserData: Return location for user data to pass to functions in the returned DBusInterfaceVTable.

-> Ptr ()

userData: The userData gpointer passed to dBusConnectionRegisterSubtree.

-> IO DBusInterfaceVTable

Returns: A DBusInterfaceVTable or Nothing if you don't want to handle the methods.

The type of the dispatch function in DBusSubtreeVTable.

Subtrees are flat. node, if non-Nothing, is always exactly one segment of the object path (ie: it never contains a slash).

Since: 2.26

dynamic_DBusSubtreeDispatchFunc Source #

Arguments

:: (HasCallStack, MonadIO m, IsDBusConnection a) 
=> FunPtr C_DBusSubtreeDispatchFunc 
-> a

connection: A DBusConnection.

-> Text

sender: The unique bus name of the remote caller.

-> Text

objectPath: The object path that was registered with dBusConnectionRegisterSubtree.

-> Text

interfaceName: The D-Bus interface name that the method call or property access is for.

-> Text

node: A node that is a child of objectPath (relative to objectPath) or Nothing for the root of the subtree.

-> Ptr ()

outUserData: Return location for user data to pass to functions in the returned DBusInterfaceVTable.

-> Ptr ()

userData: The userData gpointer passed to dBusConnectionRegisterSubtree.

-> m DBusInterfaceVTable

Returns: A DBusInterfaceVTable or Nothing if you don't want to handle the methods.

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

DBusSubtreeIntrospectFunc

type C_DBusSubtreeIntrospectFunc = Ptr DBusConnection -> CString -> CString -> CString -> Ptr () -> IO (Ptr DBusInterfaceInfo) Source #

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

type DBusSubtreeIntrospectFunc Source #

Arguments

 = DBusConnection

connection: A DBusConnection.

-> Text

sender: The unique bus name of the remote caller.

-> Text

objectPath: The object path that was registered with dBusConnectionRegisterSubtree.

-> Text

node: A node that is a child of objectPath (relative to objectPath) or Nothing for the root of the subtree.

-> IO DBusInterfaceInfo

Returns: A Nothing-terminated array of pointers to DBusInterfaceInfo, or Nothing.

The type of the introspect function in DBusSubtreeVTable.

Subtrees are flat. node, if non-Nothing, is always exactly one segment of the object path (ie: it never contains a slash).

This function should return Nothing to indicate that there is no object at this node.

If this function returns non-Nothing, the return value is expected to be a Nothing-terminated array of pointers to DBusInterfaceInfo structures describing the interfaces implemented by node. This array will have dBusInterfaceInfoUnref called on each item before being freed with free.

The difference between returning Nothing and an array containing zero items is that the standard DBus interfaces will returned to the remote introspector in the empty array case, but not in the Nothing case.

Since: 2.26

type DBusSubtreeIntrospectFunc_WithClosures Source #

Arguments

 = DBusConnection

connection: A DBusConnection.

-> Text

sender: The unique bus name of the remote caller.

-> Text

objectPath: The object path that was registered with dBusConnectionRegisterSubtree.

-> Text

node: A node that is a child of objectPath (relative to objectPath) or Nothing for the root of the subtree.

-> Ptr ()

userData: The userData gpointer passed to dBusConnectionRegisterSubtree.

-> IO DBusInterfaceInfo

Returns: A Nothing-terminated array of pointers to DBusInterfaceInfo, or Nothing.

The type of the introspect function in DBusSubtreeVTable.

Subtrees are flat. node, if non-Nothing, is always exactly one segment of the object path (ie: it never contains a slash).

This function should return Nothing to indicate that there is no object at this node.

If this function returns non-Nothing, the return value is expected to be a Nothing-terminated array of pointers to DBusInterfaceInfo structures describing the interfaces implemented by node. This array will have dBusInterfaceInfoUnref called on each item before being freed with free.

The difference between returning Nothing and an array containing zero items is that the standard DBus interfaces will returned to the remote introspector in the empty array case, but not in the Nothing case.

Since: 2.26

dynamic_DBusSubtreeIntrospectFunc Source #

Arguments

:: (HasCallStack, MonadIO m, IsDBusConnection a) 
=> FunPtr C_DBusSubtreeIntrospectFunc 
-> a

connection: A DBusConnection.

-> Text

sender: The unique bus name of the remote caller.

-> Text

objectPath: The object path that was registered with dBusConnectionRegisterSubtree.

-> Text

node: A node that is a child of objectPath (relative to objectPath) or Nothing for the root of the subtree.

-> Ptr ()

userData: The userData gpointer passed to dBusConnectionRegisterSubtree.

-> m DBusInterfaceInfo

Returns: A Nothing-terminated array of pointers to DBusInterfaceInfo, or Nothing.

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

DatagramBasedSourceFunc

type C_DatagramBasedSourceFunc = Ptr DatagramBased -> CUInt -> Ptr () -> IO CInt Source #

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

type DatagramBasedSourceFunc Source #

Arguments

 = DatagramBased

datagramBased: the DatagramBased

-> [IOCondition]

condition: the current condition at the source fired

-> IO Bool

Returns: SOURCE_REMOVE if the source should be removed, SOURCE_CONTINUE otherwise

This is the function type of the callback used for the Source returned by datagramBasedCreateSource.

Since: 2.48

type DatagramBasedSourceFunc_WithClosures Source #

Arguments

 = DatagramBased

datagramBased: the DatagramBased

-> [IOCondition]

condition: the current condition at the source fired

-> Ptr ()

userData: data passed in by the user

-> IO Bool

Returns: SOURCE_REMOVE if the source should be removed, SOURCE_CONTINUE otherwise

This is the function type of the callback used for the Source returned by datagramBasedCreateSource.

Since: 2.48

dynamic_DatagramBasedSourceFunc Source #

Arguments

:: (HasCallStack, MonadIO m, IsDatagramBased a) 
=> FunPtr C_DatagramBasedSourceFunc 
-> a

datagramBased: the DatagramBased

-> [IOCondition]

condition: the current condition at the source fired

-> Ptr ()

userData: data passed in by the user

-> m Bool

Returns: SOURCE_REMOVE if the source should be removed, SOURCE_CONTINUE otherwise

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

DesktopAppLaunchCallback

type C_DesktopAppLaunchCallback = Ptr DesktopAppInfo -> Int32 -> Ptr () -> IO () Source #

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

type DesktopAppLaunchCallback Source #

Arguments

 = DesktopAppInfo

appinfo: a DesktopAppInfo

-> Int32

pid: Process identifier

-> IO () 

During invocation, desktopAppInfoLaunchUrisAsManager may create one or more child processes. This callback is invoked once for each, providing the process ID.

type DesktopAppLaunchCallback_WithClosures Source #

Arguments

 = DesktopAppInfo

appinfo: a DesktopAppInfo

-> Int32

pid: Process identifier

-> Ptr ()

userData: User data

-> IO () 

During invocation, desktopAppInfoLaunchUrisAsManager may create one or more child processes. This callback is invoked once for each, providing the process ID.

dynamic_DesktopAppLaunchCallback Source #

Arguments

:: (HasCallStack, MonadIO m, IsDesktopAppInfo a) 
=> FunPtr C_DesktopAppLaunchCallback 
-> a

appinfo: a DesktopAppInfo

-> Int32

pid: Process identifier

-> Ptr ()

userData: User data

-> m () 

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

FileMeasureProgressCallback

type C_FileMeasureProgressCallback = CInt -> Word64 -> Word64 -> Word64 -> Ptr () -> IO () Source #

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

type FileMeasureProgressCallback Source #

Arguments

 = Bool

reporting: True if more reports will come

-> Word64

currentSize: the current cumulative size measurement

-> Word64

numDirs: the number of directories visited so far

-> Word64

numFiles: the number of non-directory files encountered

-> IO () 

This callback type is used by g_file_measure_disk_usage() to make periodic progress reports when measuring the amount of disk spaced used by a directory.

These calls are made on a best-effort basis and not all types of File will support them. At the minimum, however, one call will always be made immediately.

In the case that there is no support, reporting will be set to False (and the other values undefined) and no further calls will be made. Otherwise, the reporting will be True and the other values all-zeros during the first (immediate) call. In this way, you can know which type of progress UI to show without a delay.

For g_file_measure_disk_usage() the callback is made directly. For g_file_measure_disk_usage_async() the callback is made via the default main context of the calling thread (ie: the same way that the final async result would be reported).

currentSize is in the same units as requested by the operation (see FileMeasureFlagsApparentSize).

The frequency of the updates is implementation defined, but is ideally about once every 200ms.

The last progress callback may or may not be equal to the final result. Always check the async result to get the final value.

Since: 2.38

type FileMeasureProgressCallback_WithClosures Source #

Arguments

 = Bool

reporting: True if more reports will come

-> Word64

currentSize: the current cumulative size measurement

-> Word64

numDirs: the number of directories visited so far

-> Word64

numFiles: the number of non-directory files encountered

-> Ptr ()

userData: the data passed to the original request for this callback

-> IO () 

This callback type is used by g_file_measure_disk_usage() to make periodic progress reports when measuring the amount of disk spaced used by a directory.

These calls are made on a best-effort basis and not all types of File will support them. At the minimum, however, one call will always be made immediately.

In the case that there is no support, reporting will be set to False (and the other values undefined) and no further calls will be made. Otherwise, the reporting will be True and the other values all-zeros during the first (immediate) call. In this way, you can know which type of progress UI to show without a delay.

For g_file_measure_disk_usage() the callback is made directly. For g_file_measure_disk_usage_async() the callback is made via the default main context of the calling thread (ie: the same way that the final async result would be reported).

currentSize is in the same units as requested by the operation (see FileMeasureFlagsApparentSize).

The frequency of the updates is implementation defined, but is ideally about once every 200ms.

The last progress callback may or may not be equal to the final result. Always check the async result to get the final value.

Since: 2.38

dynamic_FileMeasureProgressCallback Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_FileMeasureProgressCallback 
-> Bool

reporting: True if more reports will come

-> Word64

currentSize: the current cumulative size measurement

-> Word64

numDirs: the number of directories visited so far

-> Word64

numFiles: the number of non-directory files encountered

-> Ptr ()

userData: the data passed to the original request for this callback

-> m () 

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

FileProgressCallback

type C_FileProgressCallback = Int64 -> Int64 -> Ptr () -> IO () Source #

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

type FileProgressCallback Source #

Arguments

 = Int64

currentNumBytes: the current number of bytes in the operation.

-> Int64

totalNumBytes: the total number of bytes in the operation.

-> IO () 

When doing file operations that may take a while, such as moving a file or copying a file, a progress callback is used to pass how far along that operation is to the application.

type FileProgressCallback_WithClosures Source #

Arguments

 = Int64

currentNumBytes: the current number of bytes in the operation.

-> Int64

totalNumBytes: the total number of bytes in the operation.

-> Ptr ()

userData: user data passed to the callback.

-> IO () 

When doing file operations that may take a while, such as moving a file or copying a file, a progress callback is used to pass how far along that operation is to the application.

dynamic_FileProgressCallback Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_FileProgressCallback 
-> Int64

currentNumBytes: the current number of bytes in the operation.

-> Int64

totalNumBytes: the total number of bytes in the operation.

-> Ptr ()

userData: user data passed to the callback.

-> m () 

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

mk_FileProgressCallback :: C_FileProgressCallback -> IO (FunPtr C_FileProgressCallback) Source #

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

FileReadMoreCallback

type C_FileReadMoreCallback = CString -> Int64 -> Ptr () -> IO CInt Source #

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

type FileReadMoreCallback Source #

Arguments

 = Text

fileContents: the data as currently read.

-> Int64

fileSize: the size of the data currently read.

-> IO Bool

Returns: True if more data should be read back. False otherwise.

When loading the partial contents of a file with g_file_load_partial_contents_async(), it may become necessary to determine if any more data from the file should be loaded. A FileReadMoreCallback function facilitates this by returning True if more data should be read, or False otherwise.

type FileReadMoreCallback_WithClosures Source #

Arguments

 = Text

fileContents: the data as currently read.

-> Int64

fileSize: the size of the data currently read.

-> Ptr ()

callbackData: data passed to the callback.

-> IO Bool

Returns: True if more data should be read back. False otherwise.

When loading the partial contents of a file with g_file_load_partial_contents_async(), it may become necessary to determine if any more data from the file should be loaded. A FileReadMoreCallback function facilitates this by returning True if more data should be read, or False otherwise.

dynamic_FileReadMoreCallback Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_FileReadMoreCallback 
-> Text

fileContents: the data as currently read.

-> Int64

fileSize: the size of the data currently read.

-> Ptr ()

callbackData: data passed to the callback.

-> m Bool

Returns: True if more data should be read back. False otherwise.

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

mk_FileReadMoreCallback :: C_FileReadMoreCallback -> IO (FunPtr C_FileReadMoreCallback) Source #

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

IOSchedulerJobFunc

type C_IOSchedulerJobFunc = Ptr IOSchedulerJob -> Ptr Cancellable -> Ptr () -> IO CInt Source #

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

type IOSchedulerJobFunc Source #

Arguments

 = IOSchedulerJob

job: a IOSchedulerJob.

-> Maybe Cancellable

cancellable: optional Cancellable object, Nothing to ignore.

-> IO Bool

Returns: True if this function should be called again to complete the job, False if the job is complete (or cancelled)

I/O Job function.

Long-running jobs should periodically check the cancellable to see if they have been cancelled.

type IOSchedulerJobFunc_WithClosures Source #

Arguments

 = IOSchedulerJob

job: a IOSchedulerJob.

-> Maybe Cancellable

cancellable: optional Cancellable object, Nothing to ignore.

-> Ptr ()

userData: the data to pass to callback function

-> IO Bool

Returns: True if this function should be called again to complete the job, False if the job is complete (or cancelled)

I/O Job function.

Long-running jobs should periodically check the cancellable to see if they have been cancelled.

drop_closures_IOSchedulerJobFunc :: IOSchedulerJobFunc -> IOSchedulerJobFunc_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_IOSchedulerJobFunc Source #

Arguments

:: (HasCallStack, MonadIO m, IsCancellable a) 
=> FunPtr C_IOSchedulerJobFunc 
-> IOSchedulerJob

job: a IOSchedulerJob.

-> Maybe a

cancellable: optional Cancellable object, Nothing to ignore.

-> Ptr ()

userData: the data to pass to callback function

-> m Bool

Returns: True if this function should be called again to complete the job, False if the job is complete (or cancelled)

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

mk_IOSchedulerJobFunc :: C_IOSchedulerJobFunc -> IO (FunPtr C_IOSchedulerJobFunc) Source #

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

PollableSourceFunc

type C_PollableSourceFunc = Ptr Object -> Ptr () -> IO CInt Source #

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

type PollableSourceFunc Source #

Arguments

 = Object

pollableStream: the PollableInputStream or PollableOutputStream

-> IO Bool

Returns: it should return False if the source should be removed.

This is the function type of the callback used for the Source returned by pollableInputStreamCreateSource and pollableOutputStreamCreateSource.

Since: 2.28

type PollableSourceFunc_WithClosures Source #

Arguments

 = Object

pollableStream: the PollableInputStream or PollableOutputStream

-> Ptr ()

userData: data passed in by the user.

-> IO Bool

Returns: it should return False if the source should be removed.

This is the function type of the callback used for the Source returned by pollableInputStreamCreateSource and pollableOutputStreamCreateSource.

Since: 2.28

drop_closures_PollableSourceFunc :: PollableSourceFunc -> PollableSourceFunc_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_PollableSourceFunc Source #

Arguments

:: (HasCallStack, MonadIO m, IsObject a) 
=> FunPtr C_PollableSourceFunc 
-> a

pollableStream: the PollableInputStream or PollableOutputStream

-> Ptr ()

userData: data passed in by the user.

-> m Bool

Returns: it should return False if the source should be removed.

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

mk_PollableSourceFunc :: C_PollableSourceFunc -> IO (FunPtr C_PollableSourceFunc) Source #

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

ReallocFunc

type C_ReallocFunc = Ptr () -> Word64 -> IO (Ptr ()) Source #

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

type ReallocFunc Source #

Arguments

 = Ptr ()

data: memory block to reallocate

-> Word64

size: size to reallocate data to

-> IO (Ptr ())

Returns: a pointer to the reallocated memory

Changes the size of the memory block pointed to by data to size bytes.

The function should have the same semantics as realloc().

dynamic_ReallocFunc Source #

Arguments

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

data: memory block to reallocate

-> Word64

size: size to reallocate data to

-> m (Ptr ())

Returns: a pointer to the reallocated memory

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

mk_ReallocFunc :: C_ReallocFunc -> IO (FunPtr C_ReallocFunc) Source #

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

SettingsBindGetMapping

type C_SettingsBindGetMapping = Ptr GValue -> Ptr GVariant -> Ptr () -> IO CInt Source #

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

type SettingsBindGetMapping Source #

Arguments

 = GValue

value: return location for the property value

-> GVariant

variant: the GVariant

-> IO Bool

Returns: True if the conversion succeeded, False in case of an error

The type for the function that is used to convert from Settings to an object property. The value is already initialized to hold values of the appropriate type.

type SettingsBindGetMapping_WithClosures Source #

Arguments

 = GValue

value: return location for the property value

-> GVariant

variant: the GVariant

-> Ptr ()

userData: user data that was specified when the binding was created

-> IO Bool

Returns: True if the conversion succeeded, False in case of an error

The type for the function that is used to convert from Settings to an object property. The value is already initialized to hold values of the appropriate type.

dynamic_SettingsBindGetMapping Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_SettingsBindGetMapping 
-> GValue

value: return location for the property value

-> GVariant

variant: the GVariant

-> Ptr ()

userData: user data that was specified when the binding was created

-> m Bool

Returns: True if the conversion succeeded, False in case of an error

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

SettingsBindSetMapping

type C_SettingsBindSetMapping = Ptr GValue -> Ptr VariantType -> Ptr () -> IO (Ptr GVariant) Source #

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

type SettingsBindSetMapping Source #

Arguments

 = GValue

value: a Value containing the property value to map

-> VariantType

expectedType: the VariantType to create

-> IO GVariant

Returns: a new GVariant holding the data from value, or Nothing in case of an error

The type for the function that is used to convert an object property value to a GVariant for storing it in Settings.

type SettingsBindSetMapping_WithClosures Source #

Arguments

 = GValue

value: a Value containing the property value to map

-> VariantType

expectedType: the VariantType to create

-> Ptr ()

userData: user data that was specified when the binding was created

-> IO GVariant

Returns: a new GVariant holding the data from value, or Nothing in case of an error

The type for the function that is used to convert an object property value to a GVariant for storing it in Settings.

dynamic_SettingsBindSetMapping Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_SettingsBindSetMapping 
-> GValue

value: a Value containing the property value to map

-> VariantType

expectedType: the VariantType to create

-> Ptr ()

userData: user data that was specified when the binding was created

-> m GVariant

Returns: a new GVariant holding the data from value, or Nothing in case of an error

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

SettingsGetMapping

type C_SettingsGetMapping = Ptr GVariant -> Ptr (Ptr ()) -> Ptr () -> IO CInt Source #

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

type SettingsGetMapping Source #

Arguments

 = GVariant

value: the GVariant to map, or Nothing

-> IO (Bool, Ptr ())

Returns: True if the conversion succeeded, False in case of an error

The type of the function that is used to convert from a value stored in a Settings to a value that is useful to the application.

If the value is successfully mapped, the result should be stored at result and True returned. If mapping fails (for example, if value is not in the right format) then False should be returned.

If value is Nothing then it means that the mapping function is being given a "last chance" to successfully return a valid value. True must be returned in this case.

type SettingsGetMapping_WithClosures Source #

Arguments

 = GVariant

value: the GVariant to map, or Nothing

-> Ptr ()

userData: the user data that was passed to settingsGetMapped

-> IO (Bool, Ptr ())

Returns: True if the conversion succeeded, False in case of an error

The type of the function that is used to convert from a value stored in a Settings to a value that is useful to the application.

If the value is successfully mapped, the result should be stored at result and True returned. If mapping fails (for example, if value is not in the right format) then False should be returned.

If value is Nothing then it means that the mapping function is being given a "last chance" to successfully return a valid value. True must be returned in this case.

drop_closures_SettingsGetMapping :: SettingsGetMapping -> SettingsGetMapping_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_SettingsGetMapping Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> FunPtr C_SettingsGetMapping 
-> GVariant

value: the GVariant to map, or Nothing

-> Ptr ()

userData: the user data that was passed to settingsGetMapped

-> m (Bool, Ptr ())

Returns: True if the conversion succeeded, False in case of an error

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

mk_SettingsGetMapping :: C_SettingsGetMapping -> IO (FunPtr C_SettingsGetMapping) Source #

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

SimpleAsyncThreadFunc

type C_SimpleAsyncThreadFunc = Ptr SimpleAsyncResult -> Ptr Object -> Ptr Cancellable -> IO () Source #

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

type SimpleAsyncThreadFunc Source #

Arguments

 = SimpleAsyncResult

res: a SimpleAsyncResult.

-> Object

object: a Object.

-> Maybe Cancellable

cancellable: optional Cancellable object, Nothing to ignore.

-> IO () 

Simple thread function that runs an asynchronous operation and checks for cancellation.

dynamic_SimpleAsyncThreadFunc Source #

Arguments

:: (HasCallStack, MonadIO m, IsSimpleAsyncResult a, IsObject b, IsCancellable c) 
=> FunPtr C_SimpleAsyncThreadFunc 
-> a

res: a SimpleAsyncResult.

-> b

object: a Object.

-> Maybe c

cancellable: optional Cancellable object, Nothing to ignore.

-> m () 

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

mk_SimpleAsyncThreadFunc :: C_SimpleAsyncThreadFunc -> IO (FunPtr C_SimpleAsyncThreadFunc) Source #

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

SocketSourceFunc

type C_SocketSourceFunc = Ptr Socket -> CUInt -> Ptr () -> IO CInt Source #

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

type SocketSourceFunc Source #

Arguments

 = Socket

socket: the Socket

-> [IOCondition]

condition: the current condition at the source fired.

-> IO Bool

Returns: it should return False if the source should be removed.

This is the function type of the callback used for the Source returned by g_socket_create_source().

Since: 2.22

type SocketSourceFunc_WithClosures Source #

Arguments

 = Socket

socket: the Socket

-> [IOCondition]

condition: the current condition at the source fired.

-> Ptr ()

userData: data passed in by the user.

-> IO Bool

Returns: it should return False if the source should be removed.

This is the function type of the callback used for the Source returned by g_socket_create_source().

Since: 2.22

drop_closures_SocketSourceFunc :: SocketSourceFunc -> SocketSourceFunc_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_SocketSourceFunc Source #

Arguments

:: (HasCallStack, MonadIO m, IsSocket a) 
=> FunPtr C_SocketSourceFunc 
-> a

socket: the Socket

-> [IOCondition]

condition: the current condition at the source fired.

-> Ptr ()

userData: data passed in by the user.

-> m Bool

Returns: it should return False if the source should be removed.

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

mk_SocketSourceFunc :: C_SocketSourceFunc -> IO (FunPtr C_SocketSourceFunc) Source #

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

TaskThreadFunc

type C_TaskThreadFunc = Ptr Task -> Ptr Object -> Ptr () -> Ptr Cancellable -> IO () Source #

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

type TaskThreadFunc Source #

Arguments

 = Task

task: the Task

-> Object

sourceObject: task's source object

-> Ptr ()

taskData: task's task data

-> Maybe Cancellable

cancellable: task's Cancellable, or Nothing

-> IO () 

The prototype for a task function to be run in a thread via taskRunInThread or taskRunInThreadSync.

If the return-on-cancel flag is set on task, and cancellable gets cancelled, then the Task will be completed immediately (as though taskReturnErrorIfCancelled had been called), without waiting for the task function to complete. However, the task function will continue running in its thread in the background. The function therefore needs to be careful about how it uses externally-visible state in this case. See taskSetReturnOnCancel for more details.

Other than in that case, task will be completed when the TaskThreadFunc returns, not when it calls a g_task_return_ function.

Since: 2.36

dynamic_TaskThreadFunc Source #

Arguments

:: (HasCallStack, MonadIO m, IsTask a, IsObject b, IsCancellable c) 
=> FunPtr C_TaskThreadFunc 
-> a

task: the Task

-> b

sourceObject: task's source object

-> Ptr ()

taskData: task's task data

-> Maybe c

cancellable: task's Cancellable, or Nothing

-> m () 

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

mk_TaskThreadFunc :: C_TaskThreadFunc -> IO (FunPtr C_TaskThreadFunc) Source #

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

VfsFileLookupFunc

type C_VfsFileLookupFunc = Ptr Vfs -> CString -> Ptr () -> IO (Ptr File) Source #

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

type VfsFileLookupFunc Source #

Arguments

 = Vfs

vfs: a Vfs

-> Text

identifier: the identifier to look up a File for. This can either be an URI or a parse name as returned by fileGetParseName

-> IO File

Returns: a File for identifier.

This function type is used by vfsRegisterUriScheme to make it possible for a client to associate an URI scheme to a different File implementation.

The client should return a reference to the new file that has been created for uri, or Nothing to continue with the default implementation.

Since: 2.50

type VfsFileLookupFunc_WithClosures Source #

Arguments

 = Vfs

vfs: a Vfs

-> Text

identifier: the identifier to look up a File for. This can either be an URI or a parse name as returned by fileGetParseName

-> Ptr ()

userData: user data passed to the function

-> IO File

Returns: a File for identifier.

This function type is used by vfsRegisterUriScheme to make it possible for a client to associate an URI scheme to a different File implementation.

The client should return a reference to the new file that has been created for uri, or Nothing to continue with the default implementation.

Since: 2.50

drop_closures_VfsFileLookupFunc :: VfsFileLookupFunc -> VfsFileLookupFunc_WithClosures Source #

A simple wrapper that ignores the closure arguments.

dynamic_VfsFileLookupFunc Source #

Arguments

:: (HasCallStack, MonadIO m, IsVfs a) 
=> FunPtr C_VfsFileLookupFunc 
-> a

vfs: a Vfs

-> Text

identifier: the identifier to look up a File for. This can either be an URI or a parse name as returned by fileGetParseName

-> Ptr ()

userData: user data passed to the function

-> m File

Returns: a File for identifier.

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

mk_VfsFileLookupFunc :: C_VfsFileLookupFunc -> IO (FunPtr C_VfsFileLookupFunc) Source #

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