how to code borderless window gui
I'd like to create a GUI for playing music video in mplayer.
what I wanted to do is to start linux and automatically run the code below at startup and in borderless fullscreen window (something like in kiosk mode of firefox).
the code below runs in fullscreen but w/ border, I need your help or suggestion as as to what else is missing in the code, or is there other easier programming language I can use to accomplish my goal.
---code start -using perl/tk----
#!/usr/local/bin/perl
use Tk;
my $mw = new MainWindow; # Main Window
my $w = $mw->screenwidth;
my $h = $mw->screenheight;
$mw->geometry (join('x',$w,$h));
$mw->configure (-background=>'cyan'); #set BG to cyan
my $track = '';
my $frm_name = $mw -> Frame(-background=>'cyan') -> pack();
my $lab = $frm_name -> Label(-text=>"Enter Track #:", -font=>"arial 16 bold",-background=>'cyan') -> pack();
my $ent = $frm_name -> Entry(-textvariable => \$track, -width => 10,-font=>"arial 20 normal", -justify => 'center' ) -> pack();
$ent->focus; #set focus on the user entry
$mw -> bind('<Key-Escape>', sub { exit }); #exit when esc is pressed
#Shows a helping dialog box when F1 is pressed
$mw -> bind('<Key-F1>',sub { help(); });
my $but = $mw -> bind('<Key-Return>',sub { push_button(); }); #pressing enter
my $but = $mw -> Button(-text=>"Enter", -command =>\&push_button) -> pack();
#Text Area
my $txt = $mw -> Text(-width=>40, -height=>10) -> pack();
MainLoop;
#This function will be executed when the button is pushed
sub push_button {
my $name = $ent -> get();
#my $txt = $frm_name -> Label(-background=>'cyan') ->pack (-side=>'top',-pady=>'60');
$txt -> insert('end',"Playing Track $name \n");
system("mplayer -fs -fixed-vo vcd/$name.avi");
$track = ''; #clears/reset the track number entered
}
---code end ----
|