summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-07-26 14:20:50 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-08-02 15:09:29 +1000
commit24325773ecdb4ef1e881e5b548d5a23151768adf (patch)
tree5db65e11bb42d830e489e3d2b751d58923ed4538
parentb06011145a780026633321eca7eed54df668b9ca (diff)
XOrg: add * to XOrg::*
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rwxr-xr-xXOrg/InputDevice.pm2
-rw-r--r--XOrg/Module.pm2
-rw-r--r--XOrg/XServer.pm6
-rwxr-xr-xXOrg/xinput.pm20
-rwxr-xr-xXOrg/xorglog.pm18
5 files changed, 24 insertions, 24 deletions
diff --git a/XOrg/InputDevice.pm b/XOrg/InputDevice.pm
index 5e4f191..1c17607 100755
--- a/XOrg/InputDevice.pm
+++ b/XOrg/InputDevice.pm
@@ -21,7 +21,7 @@
# Generic input device class
-package InputDevice;
+package XOrg::InputDevice;
use warnings;
use strict;
diff --git a/XOrg/Module.pm b/XOrg/Module.pm
index d437373..9c65a29 100644
--- a/XOrg/Module.pm
+++ b/XOrg/Module.pm
@@ -21,7 +21,7 @@
# X.Org driver module
-package Module;
+package XOrg::Module;
use Carp;
use warnings;
use strict;
diff --git a/XOrg/XServer.pm b/XOrg/XServer.pm
index 66af73c..910b440 100644
--- a/XOrg/XServer.pm
+++ b/XOrg/XServer.pm
@@ -21,10 +21,10 @@
# XServer representation, after using the Xorg.log parser
-package XServer;
+package XOrg::XServer;
-use Module;
-use InputDevice;
+use XOrg::Module;
+use XOrg::InputDevice;
use warnings;
use strict;
use Carp;
diff --git a/XOrg/xinput.pm b/XOrg/xinput.pm
index 960b0af..26d7a7b 100755
--- a/XOrg/xinput.pm
+++ b/XOrg/xinput.pm
@@ -24,9 +24,9 @@
# Parses the output from git://anongit.freedesktoip.org/git/xorg/app/xinput
# and makes it available via various subs.
-package xinput;
+package XOrg::xinput;
-use InputDevice;
+use XOrg::InputDevice;
use warnings;
use strict;
@@ -97,10 +97,10 @@ sub _parse_list {
for my $line (@output) {
chomp $line;
my $type;
- $type = InputDevice::TYPE_MASTER_POINTER if ($line =~ /⎡ /);
- $type = InputDevice::TYPE_MASTER_KEYBOARD if ($line =~ /⎣ /);
- $type = InputDevice::TYPE_FLOATING_SLAVE if ($line =~ /∼ /);
- $type = InputDevice::TYPE_SLAVE if ($line =~ /[| ] ↳ /);
+ $type = XOrg::InputDevice::TYPE_MASTER_POINTER if ($line =~ /⎡ /);
+ $type = XOrg::InputDevice::TYPE_MASTER_KEYBOARD if ($line =~ /⎣ /);
+ $type = XOrg::InputDevice::TYPE_FLOATING_SLAVE if ($line =~ /∼ /);
+ $type = XOrg::InputDevice::TYPE_SLAVE if ($line =~ /[| ] ↳ /);
next if (not defined $type);
@@ -111,16 +111,16 @@ sub _parse_list {
/x) {
my $name = $2;
$name =~ s/^\s+|\s+$//g; # strip whitespace
- my $dev = InputDevice->new(
+ my $dev = XOrg::InputDevice->new(
name => $name,
id => $3,
type => $type,
);
- if ($type == InputDevice::TYPE_MASTER_POINTER or
- $type == InputDevice::TYPE_MASTER_KEYBOARD) {
+ if ($type == XOrg::InputDevice::TYPE_MASTER_POINTER or
+ $type == XOrg::InputDevice::TYPE_MASTER_KEYBOARD) {
$current_master = $dev;
- } elsif ($type == InputDevice::TYPE_SLAVE) {
+ } elsif ($type == XOrg::InputDevice::TYPE_SLAVE) {
$dev->attachment($current_master);
}
diff --git a/XOrg/xorglog.pm b/XOrg/xorglog.pm
index 42b5ca8..66e2693 100755
--- a/XOrg/xorglog.pm
+++ b/XOrg/xorglog.pm
@@ -21,11 +21,11 @@
# Xorg.log parser
-package xorglog;
+package XOrg::xorglog;
-use Module;
-use InputDevice;
-use XServer;
+use XOrg::Module;
+use XOrg::InputDevice;
+use XOrg::XServer;
use warnings;
use strict;
use Carp;
@@ -51,7 +51,7 @@ sub new {
croak "File '$file' doesn't exist.\n";
}
- $self->server(XServer->new(logfile => $file));
+ $self->server(XOrg::XServer->new(logfile => $file));
$self->_parse($file);
@@ -124,7 +124,7 @@ sub _parse_modules {
while ($i < $#{$log}) {
my $line = $log->[$i++];
if ($line =~ /$time_regex \(II\) LoadModule: \"(.*)\"/) {
- $current_module = Module->new(name => $1);
+ $current_module = XOrg::Module->new(name => $1);
$self->server->modules->{$1} = $current_module;
my $j = 4; # 4 extra module lines after the LoadModule output
@@ -153,7 +153,7 @@ sub _parse_input_drivers {
for (@{$log}) {
if ($_ =~ m|$time_regex \(II\) config/(\w+): Adding input device (.*) \((/.*)\)|) {
- $dev = InputDevice->new(
+ $dev = XOrg::InputDevice->new(
name => $2,
source => $1,
devicenode => $3
@@ -165,7 +165,7 @@ sub _parse_input_drivers {
if ($2 eq $dev->name) {
$dev->module($module);
} else {
- $dev = InputDevice->new(
+ $dev = XOrg::InputDevice->new(
name => $2,
source => "xorg.conf",
module => $module
@@ -182,7 +182,7 @@ sub _parse_input_drivers {
} else {
# This can happen with hotplugged wacom
# devices.
- $dev = InputDevice->new(
+ $dev = XOrg::InputDevice->new(
name => $1,
source => "internal"
);