ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/kgsueme/kgsueme/board.pl
(Generate patch)

Comparing kgsueme/kgsueme/board.pl (file contents):
Revision 1.9 by pcg, Wed Jun 25 03:00:35 2003 UTC vs.
Revision 1.10 by pcg, Fri Jun 27 01:21:19 2003 UTC

1package Gtk2::GoBoard; 1package Gtk2::GoBoard;
2 2
3# my try at a real widget, needs the realobjects branch from Glib-CVS 3use Gtk2;
4 4use Glib::Object::Subclass
5use Glib; 5 Gtk2::DrawingArea,
6 properties => [
7 Glib::ParamSpec->IV (
8 "size",
9 "Board Size",
10 "The Go Board size, 2..38",
11 2, 38, 19,
12 [qw(construct-only writable readable)],
13 ),
14 ];
6 15
7use KGS::Constants; 16use KGS::Constants;
8use KGS::Game::Board; 17use KGS::Game::Board;
9 18
10use POSIX qw(ceil); 19use POSIX qw(ceil);
11
12register Glib::Type Gtk2::DrawingArea, __PACKAGE__,
13 signals => {},
14 properties => {};
15
16sub new {
17 my ($self, %arg) = @_;
18 $self = Glib::Object::new $self;
19 while (my ($k, $v) = each %arg) {
20 $self->{$k} = $v
21 }
22 $self;
23}
24 20
25sub INIT_INSTANCE { 21sub INIT_INSTANCE {
26 my $self = shift; 22 my $self = shift;
27 23
28 $self->double_buffered (0); 24 $self->double_buffered (0);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines