gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog doc/C/refmanual/internals.xml g...


From: Benjamin Wolsey
Subject: [Gnash-commit] gnash ChangeLog doc/C/refmanual/internals.xml g...
Date: Mon, 10 Mar 2008 10:32:10 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Benjamin Wolsey <bwy>   08/03/10 10:32:10

Modified files:
        .              : ChangeLog 
        doc/C/refmanual: internals.xml 
        gui            : Player.cpp Player.h gtk.cpp gtksup.h gui.cpp 
                         gui.h 
        server         : gnash.h 

Log message:
                * server/gnash.h: third time lucky: interfaceEventCallback
                  returns a std::string to allow a range of responses.
                * gui/Player.{h,cpp}: adapt interfaceEventCallback method
                  to return std::string. Clean up names of private member
                  variables.
                * gui/gui.{h,cpp}: add flag for whether mouse pointer
                  is shown or hidden.
                * gui/gtk{sup.h,.cpp}: implement mouse hide/show for GTK.
                * doc/C/refmanual/internals.xml: update some docs.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5853&r2=1.5854
http://cvs.savannah.gnu.org/viewcvs/gnash/doc/C/refmanual/internals.xml?cvsroot=gnash&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/Player.cpp?cvsroot=gnash&r1=1.84&r2=1.85
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/Player.h?cvsroot=gnash&r1=1.24&r2=1.25
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gtk.cpp?cvsroot=gnash&r1=1.152&r2=1.153
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gtksup.h?cvsroot=gnash&r1=1.65&r2=1.66
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gui.cpp?cvsroot=gnash&r1=1.136&r2=1.137
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gui.h?cvsroot=gnash&r1=1.77&r2=1.78
http://cvs.savannah.gnu.org/viewcvs/gnash/server/gnash.h?cvsroot=gnash&r1=1.117&r2=1.118

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5853
retrieving revision 1.5854
diff -u -b -r1.5853 -r1.5854
--- ChangeLog   10 Mar 2008 08:19:37 -0000      1.5853
+++ ChangeLog   10 Mar 2008 10:32:08 -0000      1.5854
@@ -1,5 +1,17 @@
 2008-03-10 Benjamin Wolsey <address@hidden>
 
+       * server/gnash.h: third time lucky: interfaceEventCallback
+         returns a std::string to allow a range of responses.
+       * gui/Player.{h,cpp}: adapt interfaceEventCallback method
+         to return std::string. Clean up names of private member
+         variables.
+       * gui/gui.{h,cpp}: add flag for whether mouse pointer
+         is shown or hidden.
+       * gui/gtk{sup.h,.cpp}: implement mouse hide/show for GTK.
+       * doc/C/refmanual/internals.xml: update some docs.
+
+2008-03-10 Benjamin Wolsey <address@hidden>
+
        * server/gnash.h: make interfaceEventCallback return bool to
          allow response from the gui. Rename register_fscommand_callback
          to registerFSCommandCallback and make it take const std::string&

Index: doc/C/refmanual/internals.xml
===================================================================
RCS file: /sources/gnash/gnash/doc/C/refmanual/internals.xml,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- doc/C/refmanual/internals.xml       3 Mar 2008 15:35:30 -0000       1.6
+++ doc/C/refmanual/internals.xml       10 Mar 2008 10:32:09 -0000      1.7
@@ -7,7 +7,8 @@
     <para>
       The top level of Gnash has several libraries, 
<emphasis>libgnashbase</emphasis>,
       <emphasis>libgnashserver</emphasis>,
-      <emphasis>libgnashasobjs</emphasis> and
+      <emphasis>libgnashmedia</emphasis>,
+      <emphasis>libgnashamf</emphasis> and
       <emphasis>libgnashbackend</emphasis>. There are several utility programs 
       included for debug parsing and processing of Flash movie files,
       and other useful utilities for examining local Shared Objects and
@@ -33,15 +34,6 @@
        </para> 
       </sect3>
       
-      <sect3 id="libgnashgui">
-       <title>libgnashgui</title>
-       
-       <para>
-         Libgnashgui contains code for a portable GUI class that
-         supports using GTK2, a framebuffer, SDL, or KDE, FLTK, or Aqua.
-       </para>
-      </sect3>
-
       <sect3 id="libgnashserver">
        <title>libgnashserver</title>
        <para>
@@ -52,11 +44,15 @@
        </para>
       </sect3>
 
-      <sect3 id="libgnashasobjs">
-       <title>libgnashasobjs</title>
+      <sect3 id="libgnashmedia">
+       <title>libgnashmedia</title>
        <para>
-         Libgnashasobjs contains all the ActionScript classes used by
-         the interpreter.
+               Libgnashmedia handles Gnash's audio and video capabilities,
+               dealing with streamed video and sound as well as decoding
+               embedded media frames. Besides the standard Flash formats
+               FLV, MPEG4, Nellymoser, ADMCP, MP3 and RAW, &app; can 
+               decode other formats supports by gstreamer or ffmpeg, 
+               including the free OGG container and free codecs.
        </para>
       </sect3>
 
@@ -158,16 +154,16 @@
       <para>
        The plugin is designed to work within Mozilla or Firefox,
        although there is Konqueror support as well. The plugin uses
-       the Mozilla NPAPI plugin API to be cross platform, and is
+       the Mozilla plugin API (NPAPI) to be cross platform, and is
        portable, as well as being well integrated into Mozilla based
        browsers.
       </para>
 
       <sect3 id="pluginstatus">
-       <title>Current Status</title>
+       <title>Current Implementation</title>
        <para>
-         As of March 30, 2006, the plugin works! This works in a
-         fashion similar to MozPlugger in that the standalone player
+         The plugin works in a
+         fashion similar to MozPlugger: the standalone player
          is used instead of using a thread. This gets around the
          issue of having to maintain a separate player to support the
          plugin. It also gets around the other issues that Gnash

Index: gui/Player.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/Player.cpp,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -b -r1.84 -r1.85
--- gui/Player.cpp      10 Mar 2008 08:19:40 -0000      1.84
+++ gui/Player.cpp      10 Mar 2008 10:32:09 -0000      1.85
@@ -71,20 +71,20 @@
 Player::Player()
        :
 #if defined(RENDERER_CAIRO)
-       bit_depth(32),
+       _bitDepth(32),
 #else
-       bit_depth(16),
+       _bitDepth(16),
 #endif
-       scale(1.0f),
-       delay(0),
-       width(0),
-       height(0),
-       windowid(0),
-       do_loop(true),
-       do_render(true),
-       do_sound(true),
-       exit_timeout(0),
-       _movie_def(0)
+       _scale(1.0f),
+       _delay(0),
+       _width(0),
+       _height(0),
+       _windowID(0),
+       _doLoop(true),
+       _doRender(true),
+       _doSound(true),
+       _exitTimeout(0),
+       _movieDef(0)
 #ifdef GNASH_FPS_DEBUG
        ,_fpsDebugTime(0.0)
 #endif
@@ -96,8 +96,8 @@
 float
 Player::setScale(float newscale)
 {
-       float oldscale=scale;
-       scale=newscale;
+       float oldscale = _scale;
+       _scale = newscale;
        return oldscale;
 }
 
@@ -146,9 +146,9 @@
     // TODO: we should remove all uses of the rcfile
     //       from Player class..
     //
-    if (!delay && rcfile.getTimerDelay() > 0) {
-        delay = rcfile.getTimerDelay();
-        log_debug (_("Timer delay set to %d milliseconds"), delay);
+    if (!_delay && rcfile.getTimerDelay() > 0) {
+        _delay = rcfile.getTimerDelay();
+        log_debug (_("Timer delay set to %d milliseconds"), _delay);
     }    
 
 }
@@ -156,7 +156,7 @@
 void
 Player::init_sound()
 {
-    if (do_sound) {
+    if (_doSound) {
 #ifdef SOUND_SDL
         _sound_handler.reset( gnash::media::create_sound_handler_sdl() );
 #elif defined(SOUND_GST)
@@ -174,7 +174,7 @@
 void
 Player::init_gui()
 {
-       if ( do_render )
+       if ( _doRender )
        {
                _gui = getGui(); 
 
@@ -187,7 +187,7 @@
        }
        else
        {
-               _gui.reset(new NullGui(do_loop));
+               _gui.reset(new NullGui(_doLoop));
        }
 
 #ifdef GNASH_FPS_DEBUG
@@ -282,9 +282,9 @@
 
        // Set _root._url (either explicit of from infile)
        if ( url ) {
-               _url=std::string(url);
+               _url = std::string(url);
        }  else {
-               _url=std::string(infile);
+               _url = std::string(infile);
        }
 
 
@@ -326,39 +326,39 @@
        gnash::set_base_url(URL(_baseurl));
 
        // Load the actual movie.
-       _movie_def = load_movie();
-       if ( ! _movie_def )
+       _movieDef = load_movie();
+       if ( ! _movieDef )
        {
                return EXIT_FAILURE;
        }
 
 
     // Get info about the width & height of the movie.
-    int movie_width = static_cast<int>(_movie_def->get_width_pixels());
-    int movie_height = static_cast<int>(_movie_def->get_height_pixels());
-    float movie_fps = _movie_def->get_frame_rate();
+    int movie_width = static_cast<int>(_movieDef->get_width_pixels());
+    int movie_height = static_cast<int>(_movieDef->get_height_pixels());
+    float movie_fps = _movieDef->get_frame_rate();
 
-    if (!width) {
-      width = size_t(movie_width * scale);
+    if (! _width) {
+      _width = size_t(movie_width * _scale);
     }
-    if (!height) {
-      height = size_t(movie_height * scale);
+    if (! _height) {
+      _height = size_t(movie_height * _scale);
     }
 
-    if ( ! width || ! height )
+    if ( ! _width || ! _height )
     {
         //log_error(_("Input movie has collapsed dimensions " SIZET_FMT "/" 
SIZET_FMT ". Giving up."), width, height);
-        log_debug(_("Input movie has collapsed dimensions " SIZET_FMT "/" 
SIZET_FMT ". Setting to 1/1 and going on."), width, height);
-       if ( ! width ) width = 1;
-       if ( ! height ) height = 1;
+        log_debug(_("Input movie has collapsed dimensions " SIZET_FMT "/" 
SIZET_FMT ". Setting to 1/1 and going on."), _width, _height);
+       if ( ! _width ) _width = 1;
+       if ( ! _height ) _height = 1;
        //return EXIT_FAILURE;
     }
 
     // Now that we know about movie size, create gui window.
-    _gui->createWindow(_url.c_str(), width, height);
+    _gui->createWindow(_url.c_str(), _width, _height);
 
     SystemClock clock; // use system clock here...
-    movie_root& root = VM::init(*_movie_def, clock).getRoot();
+    movie_root& root = VM::init(*_movieDef, clock).getRoot();
 
     // Set host requests fd (if any)
     if ( _hostfd != -1 ) root.setHostFD(_hostfd);
@@ -367,17 +367,17 @@
     _gui->setStage(&root);
 
     // Start loader thread
-    _movie_def->completeLoad();
+    _movieDef->completeLoad();
 
-    _gui->setMovieDefinition(_movie_def);
+    _gui->setMovieDefinition(_movieDef);
 
-    if (!delay) {
-      delay = (unsigned int) (1000 / movie_fps) ; // milliseconds per frame
+    if (! _delay) {
+      _delay = static_cast<unsigned int>(1000 / movie_fps) ; // milliseconds 
per frame
     }
-    _gui->setInterval(delay);
+    _gui->setInterval(_delay);
 
-    if (exit_timeout) {
-      _gui->setTimeout((unsigned int)(exit_timeout * 1000));
+    if (_exitTimeout) {
+      _gui->setTimeout(static_cast<unsigned int>(_exitTimeout * 1000));
     }
 
     _gui->run();
@@ -424,23 +424,23 @@
 
 }
 
-bool
+std::string
 Player::interfaceEventCallback(const std::string& event, const std::string& 
arg)
 {
        if (event == "Mouse.hide")
        {
                _gui->showMouse(false);
-               return true;
+               return "";
        }
 
        if (event == "Mouse.show")
        {
                _gui->showMouse(true);
-               return true;
+               return "";
        }
        
        log_error(_("Unhandled callback %s with arguments %s"), event, arg);
-       return false;
+       return "";
 }
 
 /* private */
@@ -448,33 +448,33 @@
 Player::getGui()
 {
 #ifdef GUI_GTK
-       return createGTKGui(windowid, scale, do_loop, bit_depth);
+       return createGTKGui(_windowID, _scale, _doLoop, _bitDepth);
 #endif
 
 #ifdef GUI_KDE
-       return createKDEGui(windowid, scale, do_loop, bit_depth);
+       return createKDEGui(_windowID, _scale, _doLoop, _bitDepth);
 #endif
 
 #ifdef GUI_SDL
-       return createSDLGui(windowid, scale, do_loop, bit_depth);
+       return createSDLGui(_windowID, _scale, _doLoop, _bitDepth);
 #endif
 
 #ifdef GUI_AQUA
-       return createAQUAGui(windowid, scale, do_loop, bit_depth);
+       return createAQUAGui(_windowID, _scale, _doLoop, _bitDepth);
 #endif
 
 #ifdef GUI_RISCOS
-       return createRISCOSGui(windowid, scale, do_loop, bit_depth);
+       return createRISCOSGui(_windowID, _scale, _doLoop, _bitDepth);
 #endif
 
 #ifdef GUI_FLTK
-       return createFLTKGui(windowid, scale, do_loop, bit_depth);
+       return createFLTKGui(_windowID, _scale, _doLoop, _bitDepth);
 #endif
 
 #ifdef GUI_FB
-       return createFBGui(windowid, scale, do_loop, bit_depth);
+       return createFBGui(_windowID, _scale, _doLoop, _bitDepth);
 #endif
 
-       return std::auto_ptr<Gui>(new NullGui(do_loop));
+       return std::auto_ptr<Gui>(new NullGui(_doLoop));
 }
 

Index: gui/Player.h
===================================================================
RCS file: /sources/gnash/gnash/gui/Player.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- gui/Player.h        10 Mar 2008 08:19:40 -0000      1.24
+++ gui/Player.h        10 Mar 2008 10:32:09 -0000      1.25
@@ -71,14 +71,12 @@
        ///           
        ///
        int run(int argc, char* argv[],
-               const char* infile, const char* url=NULL);
-#if 0
-        int run(const char* infile);
-#endif
+               const char* infile, const char* url = NULL);
+
        float setScale(float s);
 
        // milliseconds per frame
-       void setDelay(unsigned int d) { delay=d; }
+       void setDelay(unsigned int d) { _delay=d; }
 
 #ifdef GNASH_FPS_DEBUG
        /// Set the number of seconds between FPS debugging prints
@@ -91,23 +89,23 @@
        void setFpsPrintTime(float time)
        {
                assert(time >= 0.0);
-               _fpsDebugTime=time;
+               _fpsDebugTime = time;
        }
 #endif // def GNASH_FPS_DEBUG
 
-       void setWidth(size_t w) { width=w; }
-       size_t getWidth() { return width; }
+       void setWidth(size_t w) { _width = w; }
+       size_t getWidth() { return _width; }
 
-       void setHeight(size_t h) { height=h; }
-       size_t getHeight() { return height; }
+       void setHeight(size_t h) { _height = h; }
+       size_t getHeight() { return _height; }
 
-       void setWindowId(unsigned long x) { windowid=x; }
+       void setWindowId(unsigned long x) { _windowID = x; }
 
-       void setDoLoop(bool b) { do_loop=b; }
+       void setDoLoop(bool b) { _doLoop = b; }
 
-       void setDoRender(bool b) { do_render=b; }
+       void setDoRender(bool b) { _doRender = b; }
 
-       void setDoSound(bool b) { do_sound=b; }
+       void setDoSound(bool b) { _doSound = b; }
 
        /// Set the base url for this run.
        //
@@ -119,17 +117,11 @@
        }
 
        float setExitTimeout(float n) {
-               float old_timeout = exit_timeout;
-               exit_timeout = n;
-               return old_timeout;
+               float oldtimeout = _exitTimeout;
+               _exitTimeout = n;
+               return oldtimeout;
        }
 
-//     int setBitDepth(int depth) {
-//             int old=bit_depth;
-//             bit_depth=depth;
-//             return old;
-//     }
-
        void setParam(std::string& name, std::string& value) {
                params[name] = value;
        }
@@ -160,32 +152,32 @@
        static void fs_callback(sprite_instance* movie,
                        const std::string& command, const std::string& args);
 
-       static bool interfaceEventCallback(const std::string& event,
+       static std::string interfaceEventCallback(const std::string& event,
                                                        const std::string& arg);
 
        // Movie parameters (for -P)
        std::map<std::string, std::string> params;
 
-       unsigned int bit_depth;
+       unsigned int _bitDepth;
 
        // the scale at which to play 
-       float scale;
+       float _scale;
 
-       unsigned int delay;
+       unsigned int _delay;
 
-       size_t width;
+       size_t _width;
 
-       size_t height;
+       size_t _height;
 
-       unsigned long windowid;
+       unsigned long _windowID;
 
-       bool do_loop;
+       bool _doLoop;
 
-       bool do_render;
+       bool _doRender;
 
-       bool do_sound;
+       bool _doSound;
 
-       float exit_timeout;
+       float _exitTimeout;
 
        std::string _baseurl;
 
@@ -197,7 +189,7 @@
 
        std::string _infile;
 
-       movie_definition* _movie_def;
+       movie_definition* _movieDef;
 
        /// Load the "_infile" movie setting it's url to "_url"
        // 

Index: gui/gtk.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/gtk.cpp,v
retrieving revision 1.152
retrieving revision 1.153
diff -u -b -r1.152 -r1.153
--- gui/gtk.cpp 7 Mar 2008 12:39:19 -0000       1.152
+++ gui/gtk.cpp 10 Mar 2008 10:32:09 -0000      1.153
@@ -321,6 +321,8 @@
 {
   //GNASH_REPORT_FUNCTION;
 
+       if (! _mouseShown) return;
+
     GdkCursorType cursortype;
 
     switch(newcursor) {
@@ -349,6 +351,38 @@
     }
 }
 
+void
+GtkGui::showMouse(bool show)
+{
+
+    if (!show && _mouseShown)
+    {
+        GdkPixmap *pixmap;
+        GdkColor *color;
+
+        color = g_new0(GdkColor, 1);
+        pixmap = gdk_pixmap_new(NULL, 1, 1, 1);
+        GdkCursor* cursor = gdk_cursor_new_from_pixmap(pixmap, pixmap,
+                                                    color, color, 0, 0);
+
+
+        gdk_window_set_cursor (gtk_widget_get_parent_window(_drawingArea),
+               cursor);
+
+        g_free(color);
+        g_object_unref(pixmap);        
+        gdk_cursor_unref(cursor);
+
+        _mouseShown = false;
+
+    }
+       else if (show && !_mouseShown)
+    {
+        _mouseShown = true;    
+    } 
+
+}
+
 // private
 void
 GtkGui::setupWindowEvents()

Index: gui/gtksup.h
===================================================================
RCS file: /sources/gnash/gnash/gui/gtksup.h,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -b -r1.65 -r1.66
--- gui/gtksup.h        14 Feb 2008 13:27:56 -0000      1.65
+++ gui/gtksup.h        10 Mar 2008 10:32:09 -0000      1.66
@@ -180,6 +180,8 @@
 
     virtual void setCursor(gnash_cursor_type newcursor);
 
+    virtual void showMouse(bool show);
+
  private:
 #ifdef GUI_HILDON
     HildonProgram *_hildon_program;

Index: gui/gui.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/gui.cpp,v
retrieving revision 1.136
retrieving revision 1.137
diff -u -b -r1.136 -r1.137
--- gui/gui.cpp 10 Mar 2008 08:19:40 -0000      1.136
+++ gui/gui.cpp 10 Mar 2008 10:32:09 -0000      1.137
@@ -91,7 +91,8 @@
     _interval(0),
     _renderer(NULL),
     _redraw_flag(true),
-    _fullscreen(false)
+    _fullscreen(false),
+    _mouseShown(true)
 #ifdef GNASH_FPS_DEBUG
     ,fps_counter(0)
     ,fps_counter_total(0)

Index: gui/gui.h
===================================================================
RCS file: /sources/gnash/gnash/gui/gui.h,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -b -r1.77 -r1.78
--- gui/gui.h   10 Mar 2008 08:19:40 -0000      1.77
+++ gui/gui.h   10 Mar 2008 10:32:10 -0000      1.78
@@ -371,6 +371,8 @@
     bool            _redraw_flag;
     // True if Gnash is running in fullscreen
     bool           _fullscreen;
+    // True if mouse pointer is showing
+    bool               _mouseShown;
 
 private:
 

Index: server/gnash.h
===================================================================
RCS file: /sources/gnash/gnash/server/gnash.h,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -b -r1.117 -r1.118
--- server/gnash.h      10 Mar 2008 08:19:39 -0000      1.117
+++ server/gnash.h      10 Mar 2008 10:32:10 -0000      1.118
@@ -125,7 +125,7 @@
 DSOEXPORT void registerFSCommandCallback(fscommand_callback handler);
 
 /// Signature of interface event callback.
-typedef bool (*interfaceEventCallback)(const std::string& event, const 
std::string& arg);
+typedef std::string (*interfaceEventCallback)(const std::string& event, const 
std::string& arg);
 
 /// Use this to register listeners for core events that should
 /// trigger an event in the user interface (GUI or any other




reply via email to

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