Commit 3cd35c33 authored by Roberto C. Sánchez's avatar Roberto C. Sánchez

[svn-inject] Installing original source of libwx-perl

parents
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
/////////////////////////////////////////////////////////////////////////////
// Name: Controls.xs
// Purpose: XS for Wx::Control and derived classes
// Author: Mattia Barbon
// Modified by:
// Created: 29/10/2000
// RCS-ID: $Id: Controls.xs 2240 2007-10-07 19:18:51Z mbarbon $
// Copyright: (c) 2000-2007 Mattia Barbon
// Licence: This program is free software; you can redistribute it and/or
// modify it under the same terms as Perl itself
/////////////////////////////////////////////////////////////////////////////
#define PERL_NO_GET_CONTEXT
#include "cpp/wxapi.h"
#include <wx/defs.h>
#include <wx/imaglist.h>
#include <wx/event.h>
#include <wx/colour.h>
#include <wx/listctrl.h>
#include <wx/treectrl.h>
#include <wx/ctrlsub.h>
// re-include for client data
#include "cpp/helpers.h"
#define wxDefaultValidatorPtr (wxValidator*)&wxDefaultValidator
#define wxBLACKPtr (wxColour*)wxBLACK
#define wxNORMAL_FONTPtr (wxFont*)wxNORMAL_FONT
#define wxNullBitmapPtr (wxBitmap*) &wxNullBitmap
#define wxNullAnimationPtr (wxAnimation*) &wxNullAnimation
#undef THIS
#include "cpp/v_cback.h"
#include "cpp/controls.h"
#include "cpp/controls.cpp"
#include "cpp/overload.h"
WXPLI_BOOT_ONCE(Wx_Ctrl);
#define boot_Wx_Ctrl wxPli_boot_Wx_Ctrl
MODULE=Wx_Ctrl PACKAGE=Wx::Control
void
wxControl::Command( event )
wxCommandEvent* event
CODE:
THIS->Command( *event );
INCLUDE: perl script/wx_xspp.pl -t typemap.xsp XS/ControlWithItems.xsp |
INCLUDE: XS/BitmapButton.xs
INCLUDE: perl script/wx_xspp.pl -t typemap.xsp XS/AnimationCtrl.xsp |
INCLUDE: perl script/wx_xspp.pl -t typemap.xsp XS/EditableListBox.xsp |
INCLUDE: perl script/wx_xspp.pl -t typemap.xsp XS/BookCtrl.xsp |
INCLUDE: perl script/wx_xspp.pl -t typemap.xsp XS/Listbook.xsp |
INCLUDE: perl script/wx_xspp.pl -t typemap.xsp XS/Choicebook.xsp |
INCLUDE: perl script/wx_xspp.pl -t typemap.xsp XS/Toolbook.xsp |
INCLUDE: perl script/wx_xspp.pl -t typemap.xsp XS/Treebook.xsp |
INCLUDE: perl script/wx_xspp.pl -t typemap.xsp XS/HyperlinkCtrl.xsp |
INCLUDE: perl script/wx_xspp.pl -t typemap.xsp XS/VListBox.xsp |
INCLUDE: perl script/wx_xspp.pl -t typemap.xsp XS/SearchCtrl.xsp |
INCLUDE: perl script/wx_xspp.pl -t typemap.xsp XS/ComboPopup.xsp |
INCLUDE: perl script/wx_xspp.pl -t typemap.xsp XS/ComboCtrl.xsp |
INCLUDE: perl script/wx_xspp.pl -t typemap.xsp XS/OwnerDrawnComboBox.xsp |
INCLUDE: perl script/wx_xspp.pl -t typemap.xsp XS/CollapsiblePane.xsp |
INCLUDE: perl script/wx_xspp.pl -t typemap.xsp XS/BitmapComboBox.xsp |
INCLUDE: perl script/wx_xspp.pl -t typemap.xsp XS/DirCtrl.xsp |
INCLUDE: perl script/wx_xspp.pl -t typemap.xsp XS/FileCtrl.xsp |
INCLUDE: XS/Button.xs
INCLUDE: XS/CheckBox.xs
INCLUDE: XS/CheckListBox.xs
INCLUDE: XS/Choice.xs
INCLUDE: XS/ComboBox.xs
INCLUDE: XS/Gauge.xs
INCLUDE: XS/ListBox.xs
INCLUDE: XS/ListCtrl.xs
INCLUDE: XS/Notebook.xs
INCLUDE: XS/RadioBox.xs
INCLUDE: XS/RadioButton.xs
INCLUDE: XS/ScrollBar.xs
INCLUDE: XS/Slider.xs
INCLUDE: XS/SpinButton.xs
INCLUDE: XS/SpinCtrl.xs
INCLUDE: XS/StaticBitmap.xs
INCLUDE: XS/StaticBox.xs
INCLUDE: XS/StaticLine.xs
INCLUDE: XS/StaticText.xs
INCLUDE: XS/ToggleButton.xs
INCLUDE: XS/TreeCtrl.xs
INCLUDE: perl script/wx_xspp.pl -t typemap.xsp XS/TextCtrl.xs |
INCLUDE: perl script/wx_xspp.pl -t typemap.xsp XS/PickerCtrl.xsp |
INCLUDE: perl script/wx_xspp.pl -t typemap.xsp XS/ColourPickerCtrl.xsp |
INCLUDE: perl script/wx_xspp.pl -t typemap.xsp XS/FilePickerCtrl.xsp |
INCLUDE: perl script/wx_xspp.pl -t typemap.xsp XS/FontPickerCtrl.xsp |
MODULE=Wx_Ctrl PACKAGE=Wx::Control
This diff is collapsed.
/////////////////////////////////////////////////////////////////////////////
// Name: Frames.xs
// Purpose: XS for Wx::Frame, Wx::Dialog, Wx::Panel
// Author: Mattia Barbon
// Modified by:
// Created: 29/10/2000
// RCS-ID: $Id: Frames.xs 2185 2007-08-19 18:56:51Z mbarbon $
// Copyright: (c) 2000-2003, 2005-2007 Mattia Barbon
// Licence: This program is free software; you can redistribute it and/or
// modify it under the same terms as Perl itself
/////////////////////////////////////////////////////////////////////////////
#define PERL_NO_GET_CONTEXT
#include "cpp/wxapi.h"
#include "cpp/v_cback.h"
#undef THIS
WXPLI_BOOT_ONCE(Wx_Wnd);
#define boot_Wx_Wnd wxPli_boot_Wx_Wnd
MODULE=Wx_Wnd
INCLUDE: XS/Panel.xs
INCLUDE: perl script/wx_xspp.pl -t typemap.xsp XS/Dialog.xs |
INCLUDE: XS/Frame.xs
INCLUDE: XS/StatusBar.xs
INCLUDE: XS/ToolBar.xs
INCLUDE: XS/Wizard.xs
INCLUDE: perl script/wx_xspp.pl -t typemap.xsp XS/IconBundle.xsp |
INCLUDE: perl script/wx_xspp.pl -t typemap.xsp XS/TopLevelWindow.xsp |
INCLUDE: perl script/wx_xspp.pl -t typemap.xsp XS/PopupWindow.xsp |
INCLUDE: XS/ColourDialog.xs
INCLUDE: XS/DirDialog.xs
INCLUDE: XS/FileDialog.xs
INCLUDE: XS/TextEntryDialog.xs
INCLUDE: perl script/wx_xspp.pl -t typemap.xsp XS/MessageDialog.xsp |
INCLUDE: XS/ProgressDialog.xs
INCLUDE: XS/SingleChoiceDialog.xs
INCLUDE: XS/MultiChoiceDialog.xs
INCLUDE: XS/FontDialog.xs
INCLUDE: XS/FindReplaceDialog.xs
INCLUDE: perl script/wx_xspp.pl -t typemap.xsp XS/AboutDialog.xsp |
INCLUDE: perl script/wx_xspp.pl -t typemap.xsp XS/PropertySheetDialog.xsp |
MODULE=Wx_Wnd
/////////////////////////////////////////////////////////////////////////////
// Name: GDI.xs
// Purpose: XS for various GDI objects
// Author: Mattia Barbon
// Modified by:
// Created: 29/10/2000
// RCS-ID: $Id: GDI.xs 2233 2007-09-30 20:32:31Z mbarbon $
// Copyright: (c) 2000-2003, 2005-2007 Mattia Barbon
// Licence: This program is free software; you can redistribute it and/or
// modify it under the same terms as Perl itself
/////////////////////////////////////////////////////////////////////////////
#undef bool
#define PERL_NO_GET_CONTEXT
#include "cpp/wxapi.h"
#undef THIS
WXPLI_BOOT_ONCE(Wx_GDI);
#define boot_Wx_GDI wxPli_boot_Wx_GDI
MODULE=Wx_GDI
INCLUDE: perl script/wx_xspp.pl -t typemap.xsp XS/Animation.xsp |
INCLUDE: XS/Colour.xs
INCLUDE: XS/Font.xs
INCLUDE: perl script/wx_xspp.pl -t typemap.xsp XS/ImageList.xs |
INCLUDE: XS/Bitmap.xs
INCLUDE: XS/Icon.xs
INCLUDE: XS/Cursor.xs
INCLUDE: perl script/wx_xspp.pl -t typemap.xsp XS/DC.xs |
INCLUDE: XS/Pen.xs
INCLUDE: XS/Brush.xs
INCLUDE: XS/Image.xs
INCLUDE: XS/Palette.xs
INCLUDE: XS/GraphicsContext.xs
INCLUDE: XS/GraphicsPath.xs
INCLUDE: XS/GraphicsMatrix.xs
INCLUDE: XS/GraphicsObject.xs
INCLUDE: perl script/wx_xspp.pl -t typemap.xsp XS/GraphicsRenderer.xsp |
MODULE=Wx PACKAGE=Wx PREFIX=wx
wxRect*
wxGetClientDisplayRect()
CODE:
RETVAL = new wxRect( wxGetClientDisplayRect() );
OUTPUT:
RETVAL
bool
wxColourDisplay()
CODE:
RETVAL = wxColourDisplay();
OUTPUT:
RETVAL
int
wxDisplayDepth()
CODE:
RETVAL = wxDisplayDepth();
OUTPUT:
RETVAL
wxSize*
wxGetDisplaySizeMM()
CODE:
RETVAL = new wxSize( wxGetDisplaySizeMM() );
OUTPUT:
RETVAL
wxSize*
wxGetDisplaySize()
CODE:
RETVAL = new wxSize( wxGetDisplaySize() );
OUTPUT:
RETVAL
MODULE=Wx_GDI
This diff is collapsed.
(?:^|/)[Mm]akefile$
(?:^|/)[Mm]akefile.old$
(?:^|/)pm_to_blib$
[Cc][Vv][Ss]/
\.svn/
\.([Rr][Es][Ss]|bs|def)$
\.c$
\.o$
\.obj$
\.pdb$
\.poedit$
^Opt$
^Wx-\d+\.\d+\.(zip|tar\.gz|tgz)$
^bak
^blib
^cpp/setup.h$
^files.lst$
~$
# http://module-build.sourceforge.net/META-spec.html
name: Wx
version: 0.80
version_from: Wx.pm
installdirs: site
author: Mattia Barbon <mbarbon@cpan.org>
abstract: interface to the wxWidgets cross-platform GUI toolkit
license: perl
#requires:
build_requires:
Alien::wxWidgets: 0.25
Data::Dumper: 0
ExtUtils::MakeMaker: 6.17
File::Spec::Functions: 0.82
Test::Harness: 2.26
Test::More: 0.45
no_index:
directory:
- samples
- script
package:
- MY
- Parse::Yapp::Driver
# extras.
configure_requires:
Alien::wxWidgets: 0.25
dynamic_config: 1
distribution_type: module
generated_by: ExtUtils::MY_Metafile version 0.07, EUMM-6.36.
meta-spec:
version: 1.2
url: http://module-build.sourceforge.net/META-spec-v1.2.html
#!/usr/bin/perl -w
############################################################################
## Name: Makefile.PL
## Purpose: Makefile.PL
## Author: Mattia Barbon
## Modified by:
## Created: 01/10/2000
## RCS-ID: $Id: Makefile.PL 2250 2007-10-17 22:51:38Z mbarbon $
## Copyright: (c) 2000-2007 Mattia Barbon
## Licence: This program is free software; you can redistribute it and/or
## modify it under the same terms as Perl itself
#############################################################################
package core;
use 5.006001;
use strict;
use FindBin;
use lib "${FindBin::RealBin}/build";
use Wx::build::MakeMaker::Core;
( my $mmv = ExtUtils::MakeMaker->VERSION ) =~ s/_//g;
if( $mmv == 6.21 ) {
die <<EOT
ExtUtils::MakeMaker 6.21 is known not to work with wxPerl;
please downgrade to 6.17 or install the latest version from CPAN.
EOT
}
# $ExtUtils::MakeMaker::Verbose = 2;
# $wxConfig::Verbose = 10;
my $build_requires =
{ 'File::Spec::Functions' => 0.82,
'Test::More' => 0.45,
'Test::Harness' => 2.26,
'Data::Dumper' => 0,
'ExtUtils::MakeMaker' => 6.17,
'Alien::wxWidgets' => 0.25,
};
eval {
require ExtUtils::MY_Metafile;
ExtUtils::MY_Metafile->import;
my_metafile
( { license => 'perl',
dynamic_config => 1,
requires => {},
build_requires => $build_requires,
no_index => { directory => [ qw(samples script) ],
package => [ qw(MY Parse::Yapp::Driver) ],
},
configure_requires => { 'Alien::wxWidgets' => 0.25,
},
} );
};
wxWriteMakefile( NAME => 'Wx',
ABSTRACT_FROM => 'Wx.pm',
AUTHOR => 'Mattia Barbon <mbarbon@cpan.org>',
VERSION_FROM => 'Wx.pm',
PREREQ_PM => { %$build_requires },
PMLIBDIRS => [ 'lib', 'build' ],
EXE_FILES => [ qw(script/wx_xspp.pl
script/wx_overload.pl) ],
WX_CORE_LIB_MAYBE => $^O eq 'darwin' ? 'media html' : '',
WX_CORE_LIB => 'adv core base',
WX_OVERLOAD => { header => 'cpp/ovl_const.h',
source => 'cpp/ovl_const.cpp',
},
WX_TOP => 'Wx.pm',
LICENSE => 'perl',
);
END {
print <<EOT;
======================================================================
For installation instructions and further help please see
docs/INSTALL.pod
For command line switches help use:
perl Makefile.PL --help
======================================================================
EOT
}
# local variables:
# mode: cperl
# end:
wxPerl is a wrapper for the wxWidgets (formerly known as wxWindows) GUI toolkit
Copyright (c) 2000-2006 Mattia Barbon.
This package is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
You need wxWidgets in order to build wxPerl (see http://www.wxwidgets.org/).
You can use GTK, Win32, Mac OS X and Motif as windowing toolkits for wxPerl.
Please read the DEPRECATIONS section at the bottom!
INSTALLATION:
Build and install wxWidgets
perl Makefile.PL
make
make test
make install
for more detailed instructions see the docs/install.pod file;
in case of problems please consult the FAQ section therein.
TESTED PLATFORMS:
Perl | OS | wxWidgets | Compiler
----------------+---------------+----------------+-------------------
ActivePerl 6xx | Windows 2000 | wxMSW 2.5.5 | MSVC 5
8xx | | wxMSW 2.4.2 | MSVC 6
5.6.1 | | | MinGW GCC 3.4
5.8.3 | | |
----------------+---------------+----------------+-------------------
5.8.3 | RedHat 8.0 | wxGTK 2.4.2 | GCC 3.2
5.6.1 | Debian 3.0 | | GCC 2.95.2
| FreeBSD | wxGTK 2.5.5 |
| Gentoo | |
----------------+---------------+----------------+-------------------
5.6.1 | Solaris | wxGTK 2.5.4 | GCC 3.3
----------------+---------------+----------------+-------------------
5.8.3 | Mac OS X 10.3 | wxMac 2.5.5 | GCC 3.3
----------------+---------------+----------------+-------------------
wxPerl has also been reported to work on FreeBSD and IRIX.
DEPRECATIONS
The following features have been deprecated and may disappear in the future
1 - class->new always returning an hash reference
until now calling ->new( ... ) returned an hash reference for most
classes derived from Wx::Window, hence the following code
worked:
my $button = Wx::Button->new( ... );
$button->{attribute} = 'value';
At some point in the future this will be changed so that only
_user-defined_ classes derived from Wx::Window
(or from any class derived from Wx::Window)
will yield an hash reference, hence the following code will not
work anymore:
my $button = Wx::Button->new( ... );
$button->{attribute} = 'value';
while the following code will work as it did before:
package MyButton;
use base qw(Wx::Button);
sub new {
my $class = shift;
my $self = $class->SUPER::new; # always returns hash
$self->{attribure} = 'value;
return $self;
}
2 - Use of $Wx::_foo
wxPerl used to provide some constants named $Wx::_something
(for example, $Wx::_msw, $Wx::_platform, $Wx::_wx_version).
These constants are now deprecated, and will be removed in
some future version; this information is available via
functions in the Wx package (i.e. Wx::wxMSW())
toolkit: wxMSW, wxGTK, wxMOTIF, wxX11, wxMAC, wxUNIVERSAL
misc: wxUNICODE, wxVERSION
This diff is collapsed.
#############################################################################
## Name: Wx.pm
## Purpose: main wxPerl module
## Author: Mattia Barbon
## Modified by:
## Created: 01/10/2000
## RCS-ID: $Id: Wx.pm 2267 2007-11-06 22:09:56Z mbarbon $
## Copyright: (c) 2000-2007 Mattia Barbon
## Licence: This program is free software; you can redistribute it and/or
## modify it under the same terms as Perl itself
#############################################################################
package Wx;
use strict;
require Exporter;
use vars qw(@ISA $VERSION $XS_VERSION $AUTOLOAD @EXPORT_OK %EXPORT_TAGS
$_platform $_universal $_msw $_gtk $_motif $_mac $_x11 $_static);
$_msw = 1; $_gtk = 2; $_motif = 3; $_mac = 4; $_x11 = 5;
@ISA = qw(Exporter);
$VERSION = '0.80';
$XS_VERSION = $VERSION;
$VERSION = eval $VERSION;
sub BEGIN{
@EXPORT_OK = qw(wxPOINT wxSIZE wxTheApp);
%EXPORT_TAGS = ( );
}
#
# utility functions
#
sub wxPOINT { Wx::Point->new( $_[0], $_[1] ) }
sub wxSIZE { Wx::Size->new( $_[0], $_[1] ) }
sub wxTheApp { $Wx::wxTheApp }
sub AUTOLOAD {
my( $constname );
($constname = $AUTOLOAD) =~ s<^.*::>{};
return 0 if $constname eq 'wxVERSION';
my( $val ) = constant($constname, 0 );
if ($! != 0) {
# re-add this if need support for autosplitted subroutines
# $AutoLoader::AUTOLOAD = $AUTOLOAD;
# goto &AutoLoader::AUTOLOAD;