helenos-ui 0.1.0

Rust bindings for HelenOS UI libraries
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// workaround some clang issue
#define __float128 long double

#define _HELENOS_SOURCE

#include <ui/ui.h>
#include <ui/window.h>
#include <ui/wdecor.h>
#include <types/ui/ui.h>
#include <io/pixelmap.h>
#include <fibril.h>

// TODO: this is nice and works, but there's no inlining/optimization across
// Rust-C boundary. We should probably inline this, and also the pixelmap_* functions,
// directly into Rust
static inline pixel_t rgba_to_pix(uint8_t r, uint8_t g, uint8_t b, uint8_t a) {
    return PIXEL(a,r,g,b);
}