In our case, the PerlPlus plug-in makes Netscape's window ID
available via a qualified Perl scalar,
$Plugin::brinfo{xwindow_id}. Here's a bit of
code that dumps the %brinfo hash key/value pairs
and embeds a MainWindow within Netscape:
open PPLLOG, '>/tmp/ppl.log' or die $!;
foreach (sort keys %Plugin::brinfo) {
print PPLLOG $_ . ' ' x (20 - length $_) . " : $Plugin::brinfo{$_}\n";
}
close PPLLOG;
my $mw = MainWindow->new(-use => $Plugin::brinfo{xwindow_id});
And here is what the file /tmp/ppl.log shows us:
display : 148717568
version : 0.95.04
x_len : 666
x_min : 0
xwindow_id : 88081995
y_len : 272
y_min : 0
The display hash key is the X display pointer,
which you might find useful when performing low-level X11 functions,
perhaps via X11::Protocol. x_min and
y_min are the pixel coordinates of the top-left
corner of the Netscape-provided window, and x_len
and y_len are the width and height of the window,
respectively.