gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-


From: Bastiaan Jacques
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-1223-gde126bf
Date: Sun, 30 Oct 2011 20:12:38 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  de126bfdcf93f0e0a1a92343b565402219b06bfe (commit)
      from  f6f7f6f347d791b1edf462d022691f594f5da8c1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=de126bfdcf93f0e0a1a92343b565402219b06bfe


commit de126bfdcf93f0e0a1a92343b565402219b06bfe
Author: Bastiaan Jacques <address@hidden>
Date:   Sun Oct 30 21:07:56 2011 +0100

    Properly fix bug #34699: Stop including various "Device" headers
    which may interfere with GUI code; in particular, RawFBDevice.h uses
    headers which define NULL in a matter incompatible with mixing C and
    C++ code.

diff --git a/gui/gtk/gtk.cpp b/gui/gtk/gtk.cpp
index 3bd3652..30a9beb 100644
--- a/gui/gtk/gtk.cpp
+++ b/gui/gtk/gtk.cpp
@@ -410,7 +410,7 @@ GtkGui::setCursor(gnash_cursor_type newcursor)
             cursortype = GDK_LAST_CURSOR;
     }
   
-    GdkCursor* gdkcursor = __null;
+    GdkCursor* gdkcursor = NULL; 
   
     if (cursortype != GDK_LAST_CURSOR) {
          gdkcursor = gdk_cursor_new(cursortype);
@@ -1225,7 +1225,7 @@ PreferencesDialog::PreferencesDialog(GtkWidget* window)
                     // The buttons and their response codes:
                     GTK_STOCK_OK, GTK_RESPONSE_OK,
                     GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
-                    __null);
+                    NULL);
     // Add Gnash icon
     addGnashIcon(GTK_WINDOW(_prefsDialog));
 
diff --git a/libdevice/DeviceGlue.cpp b/libdevice/DeviceGlue.cpp
new file mode 100644
index 0000000..ed77e75
--- /dev/null
+++ b/libdevice/DeviceGlue.cpp
@@ -0,0 +1,87 @@
+//
+//   Copyright (C) 2011 Free Software Foundation, Inc
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h"
+#endif
+
+#include "DeviceGlue.h"
+
+#ifdef BUILD_EGL_DEVICE
+#include "egl/eglDevice.h"
+#endif
+#ifdef BUILD_RAWFB_DEVICE
+#include "rawfb/RawFBDevice.h"
+#endif
+#ifdef BUILD_DIRECTFB_DEVICE
+#include "directfb/DirectFBDevice.h"
+#endif
+#ifdef BUILD_X11_DEVICE
+#include "x11/X11Device.h"
+#endif
+
+namespace gnash {
+
+void
+DeviceGlue::setDevice(renderer::GnashDevice::dtype_t dtype) 
+{
+    switch (dtype) {
+#ifdef BUILD_EGL_DEVICE
+        case renderer::GnashDevice::EGL:
+        {
+            _device.reset(new renderer::EGLDevice(0, 0));
+            break;
+        }
+#endif
+#ifdef BUILD_RAWFB_DEVICE
+        case renderer::GnashDevice::RAWFB:
+        {
+            _device.reset(new renderer::rawfb::RawFBDevice(0, 0));
+            break;
+        }
+#endif
+#ifdef BUILD_DIRECTFB_DEVICE
+        case renderer::GnashDevice::DIRECTFB:
+        {
+            _device.reset(new renderer::directfb::DirectFBDevice(0, 0));
+            break;
+        }
+#endif
+#ifdef BUILD_X11_DEVICE
+        case renderer::GnashDevice::X11:
+        {
+            _device.reset(new renderer::x11::X11Device(0, 0));
+            break;
+        }
+#endif
+        default:
+            log_error("unsupported Display Device!");
+    }
+    // // EGL doesn't care about command line argument, so pass NULL
+    // _device->initDevice(0, 0);
+    // renderer::EGLDevice *egl = (renderer::EGLDevice*)_device.get();
+    // egl->printEGLConfig();
+    // egl->printEGLSurface();
+}
+
+} // namespace gnash
+
+// local Variables:
+// mode: C++
+// indent-tabs-mode: nil
+// End:
diff --git a/libdevice/DeviceGlue.h b/libdevice/DeviceGlue.h
index 6636ecb..81f1b7c 100644
--- a/libdevice/DeviceGlue.h
+++ b/libdevice/DeviceGlue.h
@@ -24,25 +24,11 @@
 #include "gnashconfig.h"
 #endif
 
-#include <boost/scoped_array.hpp>
 #include <boost/shared_array.hpp>
 #include <boost/scoped_ptr.hpp>
-#include <boost/shared_ptr.hpp>
 
 #include "GnashDevice.h"
 
-#ifdef BUILD_EGL_DEVICE
-#include "egl/eglDevice.h"
-#endif
-#ifdef BUILD_RAWFB_DEVICE
-#include "rawfb/RawFBDevice.h"
-#endif
-#ifdef BUILD_DIRECTFB_DEVICE
-#include "directfb/DirectFBDevice.h"
-#endif
-#ifdef BUILD_X11_DEVICE
-#include "x11/X11Device.h"
-#endif
 
 /// @note This file is a simple base class for any GUI glue layer code
 /// That needs to use libdevice devices. Currently this is used by both
@@ -108,46 +94,8 @@ public:
     }
     
     /// Set the display device for later use. After this is called,
-    /// the display device is active.
-    void setDevice(renderer::GnashDevice::dtype_t dtype) {
-        switch (dtype) {
-#ifdef BUILD_EGL_DEVICE
-          case renderer::GnashDevice::EGL:
-          {
-              _device.reset(new renderer::EGLDevice(0, 0));
-              break;
-          }
-#endif
-#ifdef BUILD_RAWFB_DEVICE
-          case renderer::GnashDevice::RAWFB:
-          {
-              _device.reset(new renderer::rawfb::RawFBDevice(0, 0));
-              break;
-          }
-#endif
-#ifdef BUILD_DIRECTFB_DEVICE
-          case renderer::GnashDevice::DIRECTFB:
-          {
-              _device.reset(new renderer::directfb::DirectFBDevice(0, 0));
-              break;
-          }
-#endif
-#ifdef BUILD_X11_DEVICE
-          case renderer::GnashDevice::X11:
-          {
-              _device.reset(new renderer::x11::X11Device(0, 0));
-              break;
-          }
-#endif
-          default:
-              log_error("unsupported Display Device!");
-        }
-        // // EGL doesn't care about command line argument, so pass NULL
-        // _device->initDevice(0, 0);
-        // renderer::EGLDevice *egl = (renderer::EGLDevice*)_device.get();
-        // egl->printEGLConfig();
-        // egl->printEGLSurface();
-    }
+    /// the display device is active
+    void setDevice(renderer::GnashDevice::dtype_t dtype);
 
     /// Initialze the device
     ///
diff --git a/libdevice/GnashDevice.h b/libdevice/GnashDevice.h
index 3dcbdb6..104ec73 100644
--- a/libdevice/GnashDevice.h
+++ b/libdevice/GnashDevice.h
@@ -24,9 +24,8 @@
 #include "gnashconfig.h"
 #endif
 
-#include <boost/scoped_array.hpp>
-
-#include "Geometry.h"
+#include <boost/cstdint.hpp>
+#include "log.h"
 
 /// @note This file is the base class for all low level rendering and display
 /// devices. These devices must be probed and initialized first, before any
@@ -39,11 +38,6 @@ namespace renderer {
 
 struct GnashDevice
 {
-    typedef std::vector<const Path*> PathRefs;
-    typedef std::vector<Path> PathVec;
-    typedef std::vector<geometry::Range2d<int> > ClipBounds;
-    typedef std::vector<const Path*> PathPtrVec;
-    
     /// Handle multiple window types. The derived classes will cast this to
     /// the proper data type.
     typedef long native_window_t;
diff --git a/libdevice/Makefile.am b/libdevice/Makefile.am
index 8571373..2138af3 100644
--- a/libdevice/Makefile.am
+++ b/libdevice/Makefile.am
@@ -79,7 +79,9 @@ libgnashdevice_la_LIBADD = \
 libgnashdevice_la_LDFLAGS =  -release $(VERSION) 
 libgnashdevice_la_SOURCES = \
        GnashDevice.h \
-       DeviceGlue.h
+       DeviceGlue.h \
+       DeviceGlue.cpp \
+       $(NULL)       
 
 if BUILD_X11_DEVICE
 libgnashdevice_la_CPPFLAGS += $(X11_CFLAGS)

-----------------------------------------------------------------------

Summary of changes:
 gui/gtk/gtk.cpp          |    4 +-
 libdevice/DeviceGlue.cpp |   87 ++++++++++++++++++++++++++++++++++++++++++++++
 libdevice/DeviceGlue.h   |   56 +----------------------------
 libdevice/GnashDevice.h  |   10 +----
 libdevice/Makefile.am    |    4 ++-
 5 files changed, 96 insertions(+), 65 deletions(-)
 create mode 100644 libdevice/DeviceGlue.cpp


hooks/post-receive
-- 
Gnash



reply via email to

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