From 8b6be3d5707f6194719ca91b8e699ed83c02a400 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Wed, 28 Jun 2017 13:35:23 +0200 Subject: Turn project from perl-Arctica-Browser-Overlay into arctica-browser. --- bin/arctica-browser | 80 +++++++++++++++++++++++++++++++++++++++++++++++++ bin/arctica-testbrowser | 80 ------------------------------------------------- bin/forkedmmoverlay.pl | 12 ++++---- 3 files changed, 86 insertions(+), 86 deletions(-) create mode 100755 bin/arctica-browser delete mode 100755 bin/arctica-testbrowser (limited to 'bin') diff --git a/bin/arctica-browser b/bin/arctica-browser new file mode 100755 index 0000000..97b1b58 --- /dev/null +++ b/bin/arctica-browser @@ -0,0 +1,80 @@ +#!/usr/bin/perl -X -T + +use strict; +use Data::Dumper; +use Arctica::Core::eventInit qw(genARandom BugOUT); +use Arctica::Telekinesis::Application::Gtk3; +my $ACO = Arctica::Core::eventInit->new({ + app_name=>'telekinesis-test-app', + app_class =>'tekiapp', + app_version=>'0.0.1.1'}); + + + +my $TeKiGtk3 = Arctica::Telekinesis::Application::Gtk3->new($ACO,{ + services => { + multimedia => { + conf => { + files_only => 1, + }, + }, + }, + }); + +LoadCSS(); +my $main_window = Gtk3::Window->new('toplevel'); +$main_window->signal_connect(destroy => sub {Gtk3->main_quit();}); +$main_window->set_title('TEST WINDOW'); + +my $window_id = $TeKiGtk3->add_window($main_window); +my $target_id = $TeKiGtk3->new_target($window_id,"multimedia"); +$TeKiGtk3->{'targets'}{$target_id}{'tmplnkid'} = "null";#TMP GARBAGE + + +my $vBox = Gtk3::Box->new( 'vertical', 0 ); +$main_window->add($vBox); +$vBox->show(); + + +$vBox->pack_start($TeKiGtk3->get_widget($target_id), 1, 1, 0 ); + + +$main_window->set_border_width(0); +$main_window->resize(640,480); +$main_window->show_all(); + +# We'll wan't to start this within the AppGtk3 thingie... but for now it can stay out here... +my $timeout = Glib::Timeout->add(50, sub {$TeKiGtk3->check_n_send();return 1;}); +my $timeout2 = Glib::Timeout->add(900, sub { + my ($os_x,$os_y) = $main_window->get_position; + my $x = ($os_x+1); + my $y = ($os_y+1); + $main_window->move($x,$y); + return 0; +}); +my $timeout3 = Glib::Timeout->add(1000, sub { + my ($os_x,$os_y) = $main_window->get_position; + + my $x = ($os_x-1); + my $y = ($os_y-1); + $main_window->move($x,$y); + + return 0; +}); + +$ACO->{'Glib'}{'MainLoop'}->run; + + +sub LoadCSS { + my $Gtk3_CSS_Provider = Gtk3::CssProvider->new; + my $Display = Gtk3::Gdk::Display::get_default(); + my $Screen = $Display->get_default_screen; + $Gtk3_CSS_Provider->load_from_data ([map ord, split //,"GtkSocket{ + background-color: #000000; + background-repeat: no-repeat; + background-position: center; + background-image: url('/usr/share/arctica-browser/eyesore_t.png'); + }"]); + + Gtk3::StyleContext::add_provider_for_screen( $Screen, $Gtk3_CSS_Provider, Gtk3::STYLE_PROVIDER_PRIORITY_USER); +} diff --git a/bin/arctica-testbrowser b/bin/arctica-testbrowser deleted file mode 100755 index d996281..0000000 --- a/bin/arctica-testbrowser +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/perl -X -T - -use strict; -use Data::Dumper; -use Arctica::Core::eventInit qw(genARandom BugOUT); -use Arctica::Telekinesis::Application::Gtk3; -my $ACO = Arctica::Core::eventInit->new({ - app_name=>'telekinesis-test-app', - app_class =>'tekiapp', - app_version=>'0.0.1.1'}); - - - -my $TeKiGtk3 = Arctica::Telekinesis::Application::Gtk3->new($ACO,{ - services => { - multimedia => { - conf => { - files_only => 1, - }, - }, - }, - }); - -LoadCSS(); -my $main_window = Gtk3::Window->new('toplevel'); -$main_window->signal_connect(destroy => sub {Gtk3->main_quit();}); -$main_window->set_title('TEST WINDOW'); - -my $window_id = $TeKiGtk3->add_window($main_window); -my $target_id = $TeKiGtk3->new_target($window_id,"multimedia"); -$TeKiGtk3->{'targets'}{$target_id}{'tmplnkid'} = "null";#TMP GARBAGE - - -my $vBox = Gtk3::Box->new( 'vertical', 0 ); -$main_window->add($vBox); -$vBox->show(); - - -$vBox->pack_start($TeKiGtk3->get_widget($target_id), 1, 1, 0 ); - - -$main_window->set_border_width(0); -$main_window->resize(640,480); -$main_window->show_all(); - -# We'll wan't to start this within the AppGtk3 thingie... but for now it can stay out here... -my $timeout = Glib::Timeout->add(50, sub {$TeKiGtk3->check_n_send();return 1;}); -my $timeout2 = Glib::Timeout->add(900, sub { - my ($os_x,$os_y) = $main_window->get_position; - my $x = ($os_x+1); - my $y = ($os_y+1); - $main_window->move($x,$y); - return 0; -}); -my $timeout3 = Glib::Timeout->add(1000, sub { - my ($os_x,$os_y) = $main_window->get_position; - - my $x = ($os_x-1); - my $y = ($os_y-1); - $main_window->move($x,$y); - - return 0; -}); - -$ACO->{'Glib'}{'MainLoop'}->run; - - -sub LoadCSS { - my $Gtk3_CSS_Provider = Gtk3::CssProvider->new; - my $Display = Gtk3::Gdk::Display::get_default(); - my $Screen = $Display->get_default_screen; - $Gtk3_CSS_Provider->load_from_data ([map ord, split //,"GtkSocket{ - background-color: #000000; - background-repeat: no-repeat; - background-position: center; - background-image: url('/usr/share/arctica-testbrowser/eyesore_t.png'); - }"]); - - Gtk3::StyleContext::add_provider_for_screen( $Screen, $Gtk3_CSS_Provider, Gtk3::STYLE_PROVIDER_PRIORITY_USER); -} diff --git a/bin/forkedmmoverlay.pl b/bin/forkedmmoverlay.pl index 0f1c35b..a7f66af 100755 --- a/bin/forkedmmoverlay.pl +++ b/bin/forkedmmoverlay.pl @@ -10,16 +10,16 @@ use Glib; use Glib::Object::Introspection; use Glib qw(TRUE FALSE); -use Arctica::Browser::Overlay::ToolBar; -use Arctica::Browser::Overlay::WebView; -use Arctica::Browser::Overlay::Proxy; +use Arctica::Browser::ToolBar; +use Arctica::Browser::WebView; +use Arctica::Browser::Proxy; Glib::Object::Introspection->setup( basename => "GdkX11", version => "3.0", package => "Gtk3::Gdk"); -my $proxy = Arctica::Browser::Overlay::Proxy->new; +my $proxy = Arctica::Browser::Proxy->new; my $gnx_xid = `/usr/bin/xwininfo -root -all|/bin/grep NXAgent`; if ($gnx_xid =~ /^\s*(0x[0-9a-f]*)\s.*/) { @@ -78,8 +78,8 @@ $window->set_default_size(80, 60); $window->set_title('Browser'); $window->signal_connect(destroy => sub { Gtk3->main_quit() }); -my $toolbar = Arctica::Browser::Overlay::ToolBar->new; -my $webview = Arctica::Browser::Overlay::WebView->new($toolbar); +my $toolbar = Arctica::Browser::ToolBar->new; +my $webview = Arctica::Browser::WebView->new($toolbar); my $vbox = Gtk3::Box->new( 'vertical', 0); $vbox->set_border_width(0); -- cgit v1.2.3