IUP

 view release on metacpan or  search on metacpan

lib/IUP.pm  view on Meta::CPAN

}

sub Flush {
  #void IupFlush(void); [in C]
  #iup.Flush() [in Lua]
  IUP::Internal::LibraryIup::_IupFlush();
}

### helper functions

sub Close {
  #void IupClose(void); [in C]
  #iup.Close() [in Lua]
  IUP::Internal::LibraryIup::_IupClose();
}

sub Open {
  #int IupOpen(int *argc, char ***argv); [in C]
  #[There is no equivalent in Lua]
  IUP::Internal::LibraryIup::_IupOpen();
}

sub GetAllDialogs {
  #int IupGetAllDialogs(char** names, int max_n); [in C]
  #iup.GetAllDialogs(max_n: number) -> (names: table, n: number) [in Lua]
  my ($pkg, $max_n) = @_;
  IUP::Internal::LibraryIup::_IupGetAllDialogs($max_n);
}

sub GetAllNames {
  #int IupGetAllNames(char** names, int max_n); [in C]
  #iup.GetAllNames(max_n: number) -> (names: table, n: number) [in Lua]
  my ($pkg, $max_n) = @_;
  IUP::Internal::LibraryIup::_IupGetAllNames($max_n);
}

sub GetFocus {
  #Ihandle* IupGetFocus(void); [in C]
  #iup.GetFocus() -> elem: ihandle [in Lua]
  my $ih = IUP::Internal::LibraryIup::_IupGetFocus();
  return IUP->GetByIhandle($ih);
}

sub GetByName {
  # BEWARE: different name form the oricinal C API
  #Ihandle *IupGetHandle(const char *name); [in C]
  #iup.GetHandle(name: string) -> ih: ihandle [in Lua]
  my ($pkg, $name) = @_;
  my $ih = IUP::Internal::LibraryIup::_IupGetHandle($name);
  return IUP->GetByIhandle($ih);
}

sub GetByIhandle {
  my ($pkg, $ih, $flag) = @_;
  $flag = 1 unless defined $flag; # default = 1 (create corresponding perl object if necessary)
  my $mapping = {
    #UPDATE when element list change
    animatedlabel   => 'IUP::AnimatedLabel',     # https://webserver2.tecgraf.puc-rio.br/iup/en/elem/iupanimatedlabel.html
    backgroundbox   => 'IUP::BackgroundBox',     # https://webserver2.tecgraf.puc-rio.br/iup/en/elem/iupbackgroundbox.html
    button          => 'IUP::Button',
    calendar        => 'IUP::Calendar',          # https://webserver2.tecgraf.puc-rio.br/iup/en/elem/iupcalendar.html
    canvas          => 'IUP::Canvas',
    cbox            => 'IUP::Cbox',
    cells           => 'IUP::Cells',
    clipboard       => 'IUP::Clipboard',
    colorbar        => 'IUP::ColorBar',
    colorbrowser    => 'IUP::ColorBrowser',
    colordlg        => 'IUP::ColorDlg',
    constants       => 'IUP::Constants',
    datepick        => 'IUP::DatePick',          # https://webserver2.tecgraf.puc-rio.br/iup/en/elem/iupdatepick.html
    detachbox       => 'IUP::DetachBox',         # https://webserver2.tecgraf.puc-rio.br/iup/en/elem/iupdetachbox.html
    dial            => 'IUP::Dial',
    dialog          => 'IUP::Dialog',
    expander        => 'IUP::Expander',
    filedlg         => 'IUP::FileDlg',
    fill            => 'IUP::Fill',
    flatbutton      => 'IUP::FlatButton',        # https://webserver2.tecgraf.puc-rio.br/iup/en/elem/iupflatbutton.html
    fontdlg         => 'IUP::FontDlg',
    frame           => 'IUP::Frame',
    gauge           => 'IUP::Gauge',
    glbackgroundbox => 'IUP::GL::BackgroundBox', # https://webserver2.tecgraf.puc-rio.br/iup/en/ctrl/iupglbackgroundbox.html
    glbutton        => 'IUP::GL::Button',
    glcanvas        => 'IUP::CanvasGL',
    glcanvasbox     => 'IUP::GL::CanvasBox',
    glexpander      => 'IUP::GL::Expander',
    glframe         => 'IUP::GL::Frame',
    gllabel         => 'IUP::GL::Label',
    gllink          => 'IUP::GL::Link',
    glprogressbar   => 'IUP::GL::ProgressBar',
    glscrollbox     => 'IUP::GL::ScrollBox',
    glseparator     => 'IUP::GL::Separator',
    glsizebox       => 'IUP::GL::SizeBox',
    glsubcanvas     => 'IUP::GL::SubCanvas',
    gltext          => 'IUP::GL::Text',          # https://webserver2.tecgraf.puc-rio.br/iup/en/gl/iupgltext.html
    gltoggle        => 'IUP::GL::Toggle',
    glval           => 'IUP::GL::Val',
    gridbox         => 'IUP::GridBox',
    hbox            => 'IUP::Hbox',
    image           => 'IUP::Image',
    imagergb        => 'IUP::Image',
    imagergba       => 'IUP::Image',
    item            => 'IUP::Item',
    label           => 'IUP::Label',
    link            => 'IUP::Link',
    list            => 'IUP::List',
    matrix          => 'IUP::Matrix',
    matrixlist      => 'IUP::MatrixList',
    menu            => 'IUP::Menu',
    messagedlg      => 'IUP::MessageDlg',
    mglplot         => 'IUP::MglPlot',
    multiline       => 'IUP::MultiLine',         # NOT-USED https://webserver2.tecgraf.puc-rio.br/iup/en/elem/iupmultiline.html
    normalizer      => 'IUP::Normalizer',
    olecontrol      => 'IUP::IUP::OLE',          # NOT-USED https://webserver2.tecgraf.puc-rio.br/iup/en/ctrl/iupole.html
    plot            => 'IUP::Plot',              # https://webserver2.tecgraf.puc-rio.br/iup/en/ctrl/iup_plot.html
    progressbar     => 'IUP::ProgressBar',
    progressdlg     => 'IUP::ProgressDlg',
    radio           => 'IUP::Radio',
    sbox            => 'IUP::Sbox',
    scintilla       => 'IUP::Scintilla',
    scrollbox       => 'IUP::ScrollBox',
    separator       => 'IUP::Separator',



( run in 2.225 seconds using v1.01-cache-2.11-cpan-99c4e6809bf )