Haiku API Bindings
SupportKit
Not logged in

Documentation | SupportKit

SYNOPSIS

Perl

Python

use HaikuR1::SupportKit;

DESCRIPTION

Acts as the entry point for the classes and submodules in the Support Kit. Also contains two utility functions.

For more information on the Support Kit, see the Be Book introduction and the Haiku Book introduction.

CLASSES AND SUBMODULES

FUNCTIONS

These utility functions are not part of the Haiku R1 API; they are for convenience. The built-in type codes and message constants are 32-bit integers whose individual bytes are equivalent to ASCII characters; this makes it easy to print the bytes of a constant directly to the console when writing code in C++.

However, it's not as easy with interpreted languages, so these functions map between the integer values and the 4-character strings.

Perl

Python

use HaikuR1::SupportKit qw(:util)

int_to_code

Converts an integer type to a string code.

Perl

Python

my $code = int_to_code($type);

code_to_int

Converts a string code to an integer type.

Perl

Python

my $type= code_to_int($code);