Copyright | (c) Eric Mertens 2016 |
---|---|
License | ISC |
Maintainer | emertens@gmail.com |
Safe Haskell | None |
Language | Haskell2010 |
This module exports the C functions that extensions can used to query the state of the client.
- type Glirc_send_message = Ptr () -> Ptr FgnMsg -> IO CInt
- glirc_send_message :: Glirc_send_message
- type Glirc_print = Ptr () -> MessageCode -> CString -> CSize -> IO CInt
- glirc_print :: Glirc_print
- type Glirc_list_networks = Ptr () -> IO (Ptr CString)
- glirc_list_networks :: Glirc_list_networks
- type Glirc_list_channels = Ptr () -> CString -> CSize -> IO (Ptr CString)
- glirc_list_channels :: Glirc_list_channels
- type Glirc_list_channel_users = Ptr () -> CString -> CSize -> CString -> CSize -> IO (Ptr CString)
- glirc_list_channel_users :: Glirc_list_channel_users
- type Glirc_my_nick = Ptr () -> CString -> CSize -> IO CString
- glirc_my_nick :: Glirc_my_nick
- type Glirc_identifier_cmp = CString -> CSize -> CString -> CSize -> IO CInt
- glirc_identifier_cmp :: Glirc_identifier_cmp
- type Glirc_is_channel = Ptr () -> CString -> CSize -> CString -> CSize -> IO CInt
- glirc_is_channel :: Glirc_is_channel
- type Glirc_is_logged_on = Ptr () -> CString -> CSize -> CString -> CSize -> IO CInt
- glirc_is_logged_on :: Glirc_is_channel
- type Glirc_mark_seen = Ptr () -> CString -> CSize -> CString -> CSize -> IO ()
- glirc_mark_seen :: Glirc_mark_seen
- type Glirc_clear_window = Ptr () -> CString -> CSize -> CString -> CSize -> IO ()
- glirc_clear_window :: Glirc_clear_window
- type Glirc_current_focus = Ptr () -> Ptr CString -> Ptr CSize -> Ptr CString -> Ptr CSize -> IO ()
- glirc_current_focus :: Glirc_current_focus
- type Glirc_free_string = CString -> IO ()
- glirc_free_string :: Glirc_free_string
- type Glirc_free_strings = Ptr CString -> IO ()
- glirc_free_strings :: Glirc_free_strings
- type Glirc_inject_chat = Ptr () -> CString -> CSize -> CString -> CSize -> CString -> CSize -> CString -> CSize -> IO CInt
- glirc_inject_chat :: Glirc_inject_chat
Extension API types
type Glirc_send_message Source #
Network, command, and parameters are used when transmitting a message.
type Glirc_print Source #
= Ptr () | api token |
-> MessageCode | enum message_code |
-> CString | message |
-> CSize | message length |
-> IO CInt | 0 on success |
Print a message or error to the client window
type Glirc_list_networks Source #
The resulting strings and array of strings are malloc'd and the caller must free them. NULL returned on failure.
type Glirc_list_channels Source #
= Ptr () | api token |
-> CString | network |
-> CSize | network len |
-> IO (Ptr CString) | null terminated array of null terminated strings |
The resulting strings and array of strings are malloc'd and the caller must free them. NULL returned on failure.
type Glirc_list_channel_users Source #
= Ptr () | api token |
-> CString | network |
-> CSize | network len |
-> CString | channel |
-> CSize | channel len |
-> IO (Ptr CString) | null terminated array of null terminated strings |
The resulting strings and array of strings are malloc'd and the caller must free them. NULL returned on failure.
type Glirc_my_nick Source #
The resulting string is malloc'd and the caller must free it. NULL returned on failure.
type Glirc_identifier_cmp Source #
= CString | identifier 1 |
-> CSize | identifier 1 len |
-> CString | identifier 2 |
-> CSize | identifier 2 len |
-> IO CInt |
Case insensitive comparison suitable for use on channels and nicknames. Returns -1 if the first identifier is less than the second Returns 0 if the first identifier is equal to the second Returns 1 if the first identifier is greater than the second
type Glirc_is_channel Source #
= Ptr () | api token |
-> CString | network name |
-> CSize | network length |
-> CString | target name |
-> CSize | target length |
-> IO CInt | boolean |
Returns 1
when the given target on the given network is a channel
name, otherwise returns 0
.
If the given network is not currently active this returns 0
.
type Glirc_is_logged_on Source #
= Ptr () | api token |
-> CString | network name |
-> CSize | network length |
-> CString | target name |
-> CSize | target length |
-> IO CInt | boolean |
Returns 1
when the given target on the given network shares a
channel with the user, 0
otherwise.
If the given network is not currently active this returns 0
.
type Glirc_mark_seen Source #
= Ptr () | api token |
-> CString | network name |
-> CSize | network name length |
-> CString | channel name |
-> CSize | channel name length |
-> IO () |
Mark a window as being seen clearing the new message counter. To clear the client window send an empty network name. To clear a network window send an empty channel name.
type Glirc_clear_window Source #
= Ptr () | api token |
-> CString | network name |
-> CSize | network name length |
-> CString | channel name |
-> CSize | channel name length |
-> IO () |
Mark a window as being seen clearing the new message counter. To clear the client window send an empty network name. To clear a network window send an empty channel name.
type Glirc_current_focus Source #
= Ptr () | api token |
-> Ptr CString | newly allocated network string |
-> Ptr CSize | network length |
-> Ptr CString | newly allocated target string |
-> Ptr CSize | target length |
-> IO () |
Free an array of heap allocated strings found as a return value from the extension API. If argument is NULL, nothing happens.
Free the allocated strings with glirc_free_string
Strings set to NULL if there is no current network or no current target.
type Glirc_free_string Source #
Free one of the heap allocated strings found as a return value from the extension API. If argument is NULL, nothing happens.
type Glirc_free_strings Source #
Free an array of heap allocated strings found as a return value from the extension API. If argument is NULL, nothing happens.