aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorGZNGET FOSS Team <opensource@gznianguan.com>2017-06-22 23:17:25 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-06-22 23:27:32 +0200
commit4d72611f91923c98350f5cca39e63c2ea9b9bb0d (patch)
tree29cb427e4e23ef1bcc7ca22ccc408533bc27dbcf /bin
parent1f440be46d5de878a9a4c08a4b5456a3832e31c2 (diff)
downloadarctica-browser-4d72611f91923c98350f5cca39e63c2ea9b9bb0d.tar.gz
arctica-browser-4d72611f91923c98350f5cca39e63c2ea9b9bb0d.tar.bz2
arctica-browser-4d72611f91923c98350f5cca39e63c2ea9b9bb0d.zip
Add arctica-testbrowser.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/arctica-testbrowser80
1 files changed, 80 insertions, 0 deletions
diff --git a/bin/arctica-testbrowser b/bin/arctica-testbrowser
new file mode 100755
index 0000000..4ed1b84
--- /dev/null
+++ b/bin/arctica-testbrowser
@@ -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(1024,600);
+$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('/tekitest/eyesore_t.png');
+ }"]);
+
+ Gtk3::StyleContext::add_provider_for_screen( $Screen, $Gtk3_CSS_Provider, Gtk3::STYLE_PROVIDER_PRIORITY_USER);
+}