Function dummy_rustwlc::log_set_handler
[−]
[src]
pub fn log_set_handler(
handler: extern "C" fn(_: LogType, _: *const c_char)
)
Registers a C callback for wlc logging.
Note that rustwlc::log_set_default_handler()
will register a simple callback
that will print the type and text to the console.
Parameters
The handler
callback has two parameters:
* type
: The LogType
of the message being printed.
* text
: The text to be logged, currently in C form. One may call rustwlc::pointer_to_string
to convert it to a Rust String.
Safety
The callback function (like other callbacks in rustwlc
) must be marked as extern as it is called
from C code.
In addition, unsafe
will be required to convert the text into a Rust String.