gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash server/asobj/System.cpp gui/Player.cpp gu...


From: Benjamin Wolsey
Subject: [Gnash-commit] gnash server/asobj/System.cpp gui/Player.cpp gu...
Date: Mon, 14 Apr 2008 08:55:29 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Benjamin Wolsey <bwy>   08/04/14 08:55:29

Modified files:
        server/asobj   : System.cpp 
        gui            : Player.cpp gtk.cpp gtksup.h gui.h 

Log message:
                * server/asobj/System.cpp: correct formatting of serverString.
                * gui/Player.cpp, gui/gui.h, gui/gtk{sup.h,.cpp}: get screen
                  resolution in DPI (doesn't agree with the pp, but no idea
                  which is correct).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/System.cpp?cvsroot=gnash&r1=1.27&r2=1.28
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/Player.cpp?cvsroot=gnash&r1=1.100&r2=1.101
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gtk.cpp?cvsroot=gnash&r1=1.169&r2=1.170
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gtksup.h?cvsroot=gnash&r1=1.73&r2=1.74
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gui.h?cvsroot=gnash&r1=1.86&r2=1.87

Patches:
Index: server/asobj/System.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/System.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- server/asobj/System.cpp     14 Apr 2008 08:36:18 -0000      1.27
+++ server/asobj/System.cpp     14 Apr 2008 08:55:28 -0000      1.28
@@ -180,7 +180,7 @@
        // This should be the standard order of parameters in the server
        // string.
        std::ostringstream serverString;
-       serverString << "&A="    << TF(hasAudio)
+       serverString << "A="    << TF(hasAudio)
                        << "&SA="       << TF(hasStreamingAudio)
                        << "&SV="       << TF(hasStreamingVideo)
                        << "&EV="       << TF(hasEmbeddedVideo)
@@ -198,7 +198,7 @@
                        << "&DP="       << screenDPI
                        << "&COL="      << screenColor                          
        
                        << "&AR="   << pixelAspectRatio
-                       << "OS="    << URL::encode(os)
+                       << "&OS="   << URL::encode(os)
                        << "&L="    << language                 
                        << "&PT="   << playerType
                        << "&AVD="      << TF(avHardwareDisable) 

Index: gui/Player.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/Player.cpp,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -b -r1.100 -r1.101
--- gui/Player.cpp      11 Apr 2008 07:27:45 -0000      1.100
+++ gui/Player.cpp      14 Apr 2008 08:55:29 -0000      1.101
@@ -560,6 +560,20 @@
         return ss.str();
     }
 
+    if (event == "System.capabilities.screenDPI")
+    {
+        std::ostringstream ss;
+        // Whether the pp actively limits the precision or simply
+        // gets a slightly different result isn't clear.
+        ss << _gui->getScreenDPI();
+        return ss.str();
+    }
+
+    if (event == "System.capabilities.screenColor")
+    {
+        return _gui->getScreenColor();
+    }
+
     if (event == "System.capabilities.playerType")
     {
         return _gui->isPlugin() ? "PlugIn" : "StandAlone";

Index: gui/gtk.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/gtk.cpp,v
retrieving revision 1.169
retrieving revision 1.170
diff -u -b -r1.169 -r1.170
--- gui/gtk.cpp 11 Apr 2008 15:33:45 -0000      1.169
+++ gui/gtk.cpp 14 Apr 2008 08:55:29 -0000      1.170
@@ -438,6 +438,13 @@
     return gdk_screen_height(); 
 }
 
+double
+GtkGui::getScreenDPI()
+{
+    GdkScreen* screen = gdk_screen_get_default();
+    return gdk_screen_get_resolution(screen);
+}
+
 // private
 void
 GtkGui::setupWindowEvents()

Index: gui/gtksup.h
===================================================================
RCS file: /sources/gnash/gnash/gui/gtksup.h,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -b -r1.73 -r1.74
--- gui/gtksup.h        11 Apr 2008 15:33:45 -0000      1.73
+++ gui/gtksup.h        14 Apr 2008 08:55:29 -0000      1.74
@@ -80,6 +80,7 @@
     virtual double getPixelAspectRatio();
     virtual int getScreenResX();
     virtual int getScreenResY();
+    virtual double getScreenDPI();
     
     /// Add a listener with default priority that listens for IN and HUP
     /// events on a file descriptor.

Index: gui/gui.h
===================================================================
RCS file: /sources/gnash/gnash/gui/gui.h,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -b -r1.86 -r1.87
--- gui/gui.h   11 Apr 2008 15:33:45 -0000      1.86
+++ gui/gui.h   14 Apr 2008 08:55:29 -0000      1.87
@@ -180,6 +180,8 @@
     virtual double getPixelAspectRatio() { return 0; }
     virtual int getScreenResX() { return 0; }
     virtual int getScreenResY() { return 0; }
+    virtual double getScreenDPI() { return 0; }
+    virtual std::string getScreenColor() { return ""; }
 
     /// @return The value to which the movie width should be scaled.
     float getXScale();




reply via email to

[Prev in Thread] Current Thread [Next in Thread]