Actions Status Actions Status Actions Status Actions Status MetaCPAN Release

NAME

LibUI - Simple, Portable, Native GUI Library

SYNOPSIS

use LibUI ':all';
use LibUI::Window;
use LibUI::Label;
Init( ) && die;
my $window = LibUI::Window->new( 'Hi', 320, 100, 0 );
$window->setMargined( 1 );
$window->setChild( LibUI::Label->new('Hello, World!') );
$window->onClosing(
    sub {
        Quit();
        return 1;
    },
    undef
);
$window->show;
Main();

Screenshots

Linux

Linux

MacOS

MacOS

Windows

Windows

DESCRIPTION

LibUI is a simple and portable (but not inflexible) GUI library in C that uses the native GUI technologies of each platform it supports.

This distribution is under construction. It works but is incomplete.

Container controls

Data entry controls

Static controls

Dialog windows

See "Dialog windows" in LibUI::Window for more.

Tables

The upstream API is a mess so I'm still plotting around this.

GUI Functions

Some basics you gotta use just to keep a modern GUI running.

This is incomplete but... well, I'm working on it.

Init( [...] )

Init( );

Ask LibUI to do all the platform specific work to get up and running. If LibUI fails to initialize itself, this will return a true value. Weird upstream choice, I know...

You must call this before creating widgets.

Main( ... )

Main( );

Let LibUI's event loop run until interrupted.

Uninit( ... )

Uninit( );

Ask LibUI to break everything down before quitting.

Quit( ... )

Quit( );

Quit.

Timer( ... )

Timer( 1000, sub { die 'do not do this here' }, undef);

Timer(
    1000,
    sub {
        my $data = shift;
        return 1 unless ++$data->{ticks} == 5;
        0;
    },
    { ticks => 0 }
);

Expected parameters include:

Requirements

See Alien::libui

See Also

eg/demo.pl - Very basic example

eg/widgets.pl - Demo of basic controls

LICENSE

Copyright (C) Sanko Robinson.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

Sanko Robinson sanko@cpan.org