r64939 - in /branches/upstream/libx11-xcb-perl/current: ./ lib/X11/ lib/X11/XCB/ lib/X11/XCB/Sizehints/ t/
mstapelberg-guest at users.alioth.debian.org
mstapelberg-guest at users.alioth.debian.org
Mon Nov 15 19:39:49 UTC 2010
Author: mstapelberg-guest
Date: Mon Nov 15 19:39:38 2010
New Revision: 64939
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=64939
Log:
[svn-upgrade] new version libx11-xcb-perl (0.01_007)
Added:
branches/upstream/libx11-xcb-perl/current/INSTALL.SKIP
branches/upstream/libx11-xcb-perl/current/lib/X11/XCB/Sizehints/
branches/upstream/libx11-xcb-perl/current/lib/X11/XCB/Sizehints.pm
branches/upstream/libx11-xcb-perl/current/lib/X11/XCB/Sizehints/Aspect.pm
Removed:
branches/upstream/libx11-xcb-perl/current/pm_to_blib
branches/upstream/libx11-xcb-perl/current/t/02-window.t
Modified:
branches/upstream/libx11-xcb-perl/current/MANIFEST
branches/upstream/libx11-xcb-perl/current/META.yml
branches/upstream/libx11-xcb-perl/current/XCB_util.inc
branches/upstream/libx11-xcb-perl/current/_GenerateMyXS.pm
branches/upstream/libx11-xcb-perl/current/lib/X11/XCB.pm.in
branches/upstream/libx11-xcb-perl/current/lib/X11/XCB/Atom.pm
branches/upstream/libx11-xcb-perl/current/lib/X11/XCB/Color.pm
branches/upstream/libx11-xcb-perl/current/lib/X11/XCB/Connection.pm
branches/upstream/libx11-xcb-perl/current/lib/X11/XCB/Screen.pm
branches/upstream/libx11-xcb-perl/current/lib/X11/XCB/Window.pm
branches/upstream/libx11-xcb-perl/current/t/01-atom.t
Added: branches/upstream/libx11-xcb-perl/current/INSTALL.SKIP
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libx11-xcb-perl/current/INSTALL.SKIP?rev=64939&op=file
==============================================================================
--- branches/upstream/libx11-xcb-perl/current/INSTALL.SKIP (added)
+++ branches/upstream/libx11-xcb-perl/current/INSTALL.SKIP Mon Nov 15 19:39:38 2010
@@ -1,0 +1,2 @@
+_GenerateMyXS.pm
+lib/X11/XCB.pm.in
Modified: branches/upstream/libx11-xcb-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libx11-xcb-perl/current/MANIFEST?rev=64939&op=diff
==============================================================================
--- branches/upstream/libx11-xcb-perl/current/MANIFEST (original)
+++ branches/upstream/libx11-xcb-perl/current/MANIFEST Mon Nov 15 19:39:38 2010
@@ -11,23 +11,24 @@
inc/Module/Install/Win32.pm
inc/Module/Install/WriteAll.pm
inc/Module/Install/XSUtil.pm
+INSTALL.SKIP
lib/X11/XCB.pm.in
lib/X11/XCB/Atom.pm
lib/X11/XCB/Color.pm
lib/X11/XCB/Connection.pm
lib/X11/XCB/Rect.pm
lib/X11/XCB/Screen.pm
+lib/X11/XCB/Sizehints.pm
+lib/X11/XCB/Sizehints/Aspect.pm
lib/X11/XCB/Window.pm
Makefile.PL
MANIFEST This list of files
MANIFEST.SKIP
META.yml
-pm_to_blib
ppport.h
README
t/01-atom.t
t/02-screens.t
-t/02-window.t
t/03-color.t
t/04-window.t
t/X11-XCB.t
Modified: branches/upstream/libx11-xcb-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libx11-xcb-perl/current/META.yml?rev=64939&op=diff
==============================================================================
--- branches/upstream/libx11-xcb-perl/current/META.yml (original)
+++ branches/upstream/libx11-xcb-perl/current/META.yml Mon Nov 15 19:39:38 2010
@@ -31,4 +31,4 @@
perl: 5.10.0
resources:
license: http://dev.perl.org/licenses/
-version: 0.01_006
+version: 0.01_007
Modified: branches/upstream/libx11-xcb-perl/current/XCB_util.inc
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libx11-xcb-perl/current/XCB_util.inc?rev=64939&op=diff
==============================================================================
--- branches/upstream/libx11-xcb-perl/current/XCB_util.inc (original)
+++ branches/upstream/libx11-xcb-perl/current/XCB_util.inc Mon Nov 15 19:39:38 2010
@@ -33,3 +33,42 @@
X11_XCB_ICCCM_WMHints * hints
CODE:
xcb_set_wm_hints(conn->conn, window, hints);
+
+void
+set_wm_size_hints(conn, window, property, hints)
+ XCBConnection * conn
+ int window
+ int property
+ X11_XCB_ICCCM_SizeHints * hints
+ CODE:
+ xcb_set_wm_size_hints(conn->conn, window, property, hints);
+
+
+
+
+MODULE = X11::XCB PACKAGE = X11::XCB::ICCCM::SizeHints
+
+PROTOTYPES: ENABLE
+
+X11_XCB_ICCCM_SizeHints *
+new(self)
+ char *self
+ PREINIT:
+ X11_XCB_ICCCM_SizeHints *buf;
+ CODE:
+ New(0, buf, 1, X11_XCB_ICCCM_SizeHints);
+ RETVAL = buf;
+ OUTPUT:
+ RETVAL
+
+MODULE = X11::XCB PACKAGE = X11_XCB_ICCCM_SizeHintsPtr
+
+void
+set_aspect(self, min_aspect_num, min_aspect_den, max_aspect_num, max_aspect_den)
+ X11_XCB_ICCCM_SizeHints * self
+ int min_aspect_num
+ int min_aspect_den
+ int max_aspect_num
+ int max_aspect_den
+ CODE:
+ xcb_size_hints_set_aspect(self, min_aspect_num, min_aspect_den, max_aspect_num, max_aspect_den);
Modified: branches/upstream/libx11-xcb-perl/current/_GenerateMyXS.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libx11-xcb-perl/current/_GenerateMyXS.pm?rev=64939&op=diff
==============================================================================
--- branches/upstream/libx11-xcb-perl/current/_GenerateMyXS.pm (original)
+++ branches/upstream/libx11-xcb-perl/current/_GenerateMyXS.pm Mon Nov 15 19:39:38 2010
@@ -663,6 +663,7 @@
print OUTTM "XCBConnection * T_PTROBJ\n";
print OUTTM "intArray * T_ARRAY\n";
print OUTTM "X11_XCB_ICCCM_WMHints * T_PTROBJ\n";
+ print OUTTM "X11_XCB_ICCCM_SizeHints * T_PTROBJ\n";
print OUT << 'eot';
#include "EXTERN.h"
@@ -686,6 +687,7 @@
typedef struct my_xcb_conn XCBConnection;
typedef xcb_wm_hints_t X11_XCB_ICCCM_WMHints;
+typedef xcb_size_hints_t X11_XCB_ICCCM_SizeHints;
typedef int intArray;
intArray *intArrayPtr(int num) {
Modified: branches/upstream/libx11-xcb-perl/current/lib/X11/XCB.pm.in
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libx11-xcb-perl/current/lib/X11/XCB.pm.in?rev=64939&op=diff
==============================================================================
--- branches/upstream/libx11-xcb-perl/current/lib/X11/XCB.pm.in (original)
+++ branches/upstream/libx11-xcb-perl/current/lib/X11/XCB.pm.in Mon Nov 15 19:39:38 2010
@@ -25,7 +25,7 @@
);
-our $VERSION = '0.01_006';
+our $VERSION = '0.01_007';
require XSLoader;
XSLoader::load('X11::XCB', $VERSION);
Modified: branches/upstream/libx11-xcb-perl/current/lib/X11/XCB/Atom.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libx11-xcb-perl/current/lib/X11/XCB/Atom.pm?rev=64939&op=diff
==============================================================================
--- branches/upstream/libx11-xcb-perl/current/lib/X11/XCB/Atom.pm (original)
+++ branches/upstream/libx11-xcb-perl/current/lib/X11/XCB/Atom.pm Mon Nov 15 19:39:38 2010
@@ -43,6 +43,12 @@
$self->_sequence($request->{sequence});
}
+=head1 NAME
+
+X11::XCB::Atom - wraps an X11 atom
+
+=head1 METHODS
+
=head2 exists
Returns whether this atom actually exists. If the id of the atom has not been
Modified: branches/upstream/libx11-xcb-perl/current/lib/X11/XCB/Color.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libx11-xcb-perl/current/lib/X11/XCB/Color.pm?rev=64939&op=diff
==============================================================================
--- branches/upstream/libx11-xcb-perl/current/lib/X11/XCB/Color.pm (original)
+++ branches/upstream/libx11-xcb-perl/current/lib/X11/XCB/Color.pm Mon Nov 15 19:39:38 2010
@@ -14,6 +14,12 @@
# truecolor. However, I donât have an idea for getting the coercion to
# work then.
#, required => 1);
+
+=head1 NAME
+
+X11::XCB::Color - X11 colorpixel handling
+
+=head1 METHODS
=head2 pixel
Modified: branches/upstream/libx11-xcb-perl/current/lib/X11/XCB/Connection.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libx11-xcb-perl/current/lib/X11/XCB/Connection.pm?rev=64939&op=diff
==============================================================================
--- branches/upstream/libx11-xcb-perl/current/lib/X11/XCB/Connection.pm (original)
+++ branches/upstream/libx11-xcb-perl/current/lib/X11/XCB/Connection.pm Mon Nov 15 19:39:38 2010
@@ -20,6 +20,12 @@
$self->conn($conn);
}
+
+=head1 NAME
+
+X11::XCB::Connection - connection to the X server
+
+=head1 METHODS
=head2 atom
Modified: branches/upstream/libx11-xcb-perl/current/lib/X11/XCB/Screen.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libx11-xcb-perl/current/lib/X11/XCB/Screen.pm?rev=64939&op=diff
==============================================================================
--- branches/upstream/libx11-xcb-perl/current/lib/X11/XCB/Screen.pm (original)
+++ branches/upstream/libx11-xcb-perl/current/lib/X11/XCB/Screen.pm Mon Nov 15 19:39:38 2010
@@ -4,6 +4,12 @@
use X11::XCB::Rect;
has 'rect' => (is => 'ro', isa => 'X11::XCB::Rect', required => 1);
+
+=head1 NAME
+
+X11::XCB::Screen - represents an x11 screen
+
+=head1 METHODS
=head2 primary
Added: branches/upstream/libx11-xcb-perl/current/lib/X11/XCB/Sizehints.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libx11-xcb-perl/current/lib/X11/XCB/Sizehints.pm?rev=64939&op=file
==============================================================================
--- branches/upstream/libx11-xcb-perl/current/lib/X11/XCB/Sizehints.pm (added)
+++ branches/upstream/libx11-xcb-perl/current/lib/X11/XCB/Sizehints.pm Mon Nov 15 19:39:38 2010
@@ -1,0 +1,35 @@
+package X11::XCB::Sizehints;
+
+use Moose;
+use Data::Dumper;
+use X11::XCB qw(:all);
+use X11::XCB::Sizehints::Aspect;
+use v5.10;
+
+has 'window' => (is => 'ro', isa => 'Int');
+has '_conn' => (is => 'ro', required => 1);
+
+has 'aspect' => (is => 'rw', isa => 'X11::XCB::Sizehints::Aspect', trigger => \&_update_aspect);
+
+sub _update_aspect {
+ my $self = shift;
+ my $aspect = $self->aspect;
+
+ my $hints = X11::XCB::ICCCM::SizeHints->new;
+
+ $hints->set_aspect($aspect->min_num, $aspect->min_den,
+ $aspect->max_num, $aspect->max_den);
+
+ X11::XCB::ICCCM::set_wm_size_hints($self->_conn->conn, $self->window, ATOM_WM_NORMAL_HINTS, $hints);
+}
+
+=head1 NAME
+
+X11::XCB::Sizehints - size hints attribute for an X11::XCB::Window
+
+=head1 METHODS
+
+=cut
+
+1
+# vim:ts=4:sw=4:expandtab
Added: branches/upstream/libx11-xcb-perl/current/lib/X11/XCB/Sizehints/Aspect.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libx11-xcb-perl/current/lib/X11/XCB/Sizehints/Aspect.pm?rev=64939&op=file
==============================================================================
--- branches/upstream/libx11-xcb-perl/current/lib/X11/XCB/Sizehints/Aspect.pm (added)
+++ branches/upstream/libx11-xcb-perl/current/lib/X11/XCB/Sizehints/Aspect.pm Mon Nov 15 19:39:38 2010
@@ -1,0 +1,20 @@
+package X11::XCB::Sizehints::Aspect;
+
+use Moose;
+use Data::Dumper;
+use v5.10;
+
+has 'min_num' => (is => 'rw', isa => 'Int');
+has 'min_den' => (is => 'rw', isa => 'Int');
+has 'max_num' => (is => 'rw', isa => 'Int');
+has 'max_den' => (is => 'rw', isa => 'Int');
+
+=head1 NAME
+
+X11::XCB::Sizehints::Aspect - aspect ratio size hint
+
+=head1 METHODS
+
+=cut
+
+1
Modified: branches/upstream/libx11-xcb-perl/current/lib/X11/XCB/Window.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libx11-xcb-perl/current/lib/X11/XCB/Window.pm?rev=64939&op=diff
==============================================================================
--- branches/upstream/libx11-xcb-perl/current/lib/X11/XCB/Window.pm (original)
+++ branches/upstream/libx11-xcb-perl/current/lib/X11/XCB/Window.pm Mon Nov 15 19:39:38 2010
@@ -6,6 +6,7 @@
use X11::XCB::Connection;
use X11::XCB::Atom;
use X11::XCB::Color;
+use X11::XCB::Sizehints;
use X11::XCB qw(:all);
use Data::Dumper;
use v5.10;
@@ -35,6 +36,7 @@
has 'background_color' => (is => 'ro', isa => 'X11::XCB::Color', coerce => 1, default => undef);
has 'name' => (is => 'rw', isa => 'Str', trigger => \&_update_name);
has 'fullscreen' => (is => 'rw', isa => 'Int', trigger => \&_update_fullscreen);
+has 'hints' => (is => 'rw', isa => 'X11::XCB::Sizehints', lazy_build => 1);
has '_hints' => (is => 'rw', isa => 'ArrayRef', default => sub { [ ] });
has '_conn' => (is => 'ro', required => 1);
has '_mapped' => (is => 'rw', isa => 'Int', default => 0);
@@ -45,6 +47,18 @@
return $self->_conn->generate_id();
}
+
+sub _build_hints {
+ my $self = shift;
+
+ return X11::XCB::Sizehints->new(_conn => $self->_conn, window => $self->id);
+}
+
+=head1 NAME
+
+X11::XCB::Window - represents an X11 window
+
+=head1 METHODS
=head2 rect
@@ -332,7 +346,7 @@
$atomtype->id,
32, # 32 bit integer
1,
- pack('L', $self->transient_for)
+ pack('L', $self->transient_for->id)
);
$self->_conn->flush;
}
Modified: branches/upstream/libx11-xcb-perl/current/t/01-atom.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libx11-xcb-perl/current/t/01-atom.t?rev=64939&op=diff
==============================================================================
--- branches/upstream/libx11-xcb-perl/current/t/01-atom.t (original)
+++ branches/upstream/libx11-xcb-perl/current/t/01-atom.t Mon Nov 15 19:39:38 2010
@@ -18,7 +18,7 @@
skip "Could not setup X11 connection", 8 if $@;
- my $atom = $x->atom(name => '_NET_WM_STATE');
+ my $atom = $x->atom(name => 'PRIMARY');
isa_ok($atom, 'X11::XCB::Atom');
More information about the Pkg-perl-cvs-commits
mailing list