Copyright | (c) Eric Mertens, 2016 |
---|---|
License | ISC |
Maintainer | emertens@gmail.com |
Safe Haskell | Safe |
Language | Haskell2010 |
Marshaling types and functions for the C API
- data FgnExtension = FgnExtension {}
- type StartExtension = Ptr () -> CString -> IO (Ptr ())
- type StopExtension = Ptr () -> Ptr () -> IO ()
- type ProcessMessage = Ptr () -> Ptr () -> Ptr FgnMsg -> IO MessageResult
- type ProcessCommand = Ptr () -> Ptr () -> Ptr FgnCmd -> IO ()
- data FgnStringLen = FgnStringLen !CString !CSize
- data FgnMsg = FgnMsg {}
- data FgnCmd = FgnCmd {
- fcParams :: Ptr FgnStringLen
- fcParamN :: CSize
- type Dynamic a = FunPtr a -> a
- runStartExtension :: Dynamic StartExtension
- runStopExtension :: Dynamic StopExtension
- runProcessMessage :: Dynamic ProcessMessage
- runProcessCommand :: Dynamic ProcessCommand
- newtype MessageCode = MessageCode CInt
- normalMessage :: MessageCode
- errorMessage :: MessageCode
- newtype MessageResult = MessageResult CInt
- passMessage :: MessageResult
- dropMessage :: MessageResult
Extension record
data FgnExtension Source #
struct glirc_extension;
FgnExtension | |
|
type StartExtension Source #
typedef void *start(void *glirc, const char *path);
type StopExtension Source #
typedef void stop(void *glirc, void *S);
type ProcessMessage Source #
Type of typedef enum process_result process_message(void *glirc, void *S, const struct glirc_message *);
type ProcessCommand Source #
typedef void process_command(void *glirc, void *S, const struct glirc_command *);
Strings
data FgnStringLen Source #
struct glirc_string
Messages
struct glirc_message
FgnMsg | |
|
Commands
struct glirc_command
Function pointer calling
report message codes
newtype MessageCode Source #
Tag for describing the kind of message to display in the client
as used in glirc_print
.
enum message_code;
errorMessage :: MessageCode Source #
Result used to determine what to do after processing a message with
the ProcessMessage
callback.
enum process_result;