[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash gui/gtk.cpp ChangeLog
From: |
Rob Savoye |
Subject: |
[Gnash-commit] gnash gui/gtk.cpp ChangeLog |
Date: |
Fri, 28 Sep 2007 03:03:54 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Rob Savoye <rsavoye> 07/09/28 03:03:54
Modified files:
gui : gtk.cpp
. : ChangeLog
Log message:
* gui/gtk.cpp: Add support for LIRC, if it's running. Add event
handler for LIRC messages.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gtk.cpp?cvsroot=gnash&r1=1.119&r2=1.120
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4456&r2=1.4457
Patches:
Index: gui/gtk.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/gtk.cpp,v
retrieving revision 1.119
retrieving revision 1.120
diff -u -b -r1.119 -r1.120
--- gui/gtk.cpp 27 Sep 2007 19:26:04 -0000 1.119
+++ gui/gtk.cpp 28 Sep 2007 03:03:53 -0000 1.120
@@ -17,7 +17,7 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
-/* $Id: gtk.cpp,v 1.119 2007/09/27 19:26:04 bjacques Exp $ */
+/* $Id: gtk.cpp,v 1.120 2007/09/28 03:03:53 rsavoye Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -32,6 +32,7 @@
#include "gnash.h" // for get_sound_handler
#include "render_handler.h"
#include "VM.h"
+#include "lirc.h"
#include <iostream>
#include <X11/keysym.h>
@@ -63,6 +64,11 @@
bool createHelpMenu(GtkWidget *obj);
bool createControlMenu(GtkWidget *obj);
+// This is global so it can be accessed by the evnt handler, which
+// isn't part of this class.
+Lirc *lirc;
+bool lirc_handler(void*, int, void* data);
+
GtkGui::~GtkGui()
{
}
@@ -79,7 +85,6 @@
{
//GNASH_REPORT_FUNCTION;
-
gtk_init (&argc, argv);
// TODO: don't rely on a macro to select renderer
@@ -146,6 +151,14 @@
_glue->prepDrawingArea(_drawing_area);
#endif
+ lirc = new Lirc();
+ if (lirc->init("/dev/lircd")) {
+ int fd = lirc->getFileFd();
+ addFDListener(fd, lirc_handler, &fd);
+ } else {
+ log_msg("LIRC daemon not running");
+ }
+
_renderer = _glue->createRenderHandler();
if ( ! _renderer ) return false;
set_render_handler(_renderer);
@@ -913,7 +926,7 @@
comments += "\nRenderer: ";
comments += RENDERER_CONFIG;
comments += " GUI: ";
- comments += GUI_CONFIG; // gtk of course!
+ comments += "GTK2"; // gtk of course!
comments += " Media: ";
comments += MEDIA_CONFIG;
comments += ".";
@@ -1361,7 +1374,6 @@
return TRUE;
}
-
gnash::key::code
GtkGui::gdk_to_gnash_key(guint key)
{
@@ -1784,5 +1796,18 @@
}
+bool
+lirc_handler(void*, int, void* data)
+{
+ GNASH_REPORT_FUNCTION;
+ int* fd = static_cast<int*>(data);
+
+ // want to remove this handler. You may want to close fd.
+ log_msg("%s\n", lirc->getButton());
+
+ // Want to keep this handler
+ return true;
+}
+
} // end of namespace gnash
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.4456
retrieving revision 1.4457
diff -u -b -r1.4456 -r1.4457
--- ChangeLog 28 Sep 2007 00:33:29 -0000 1.4456
+++ ChangeLog 28 Sep 2007 03:03:53 -0000 1.4457
@@ -1,3 +1,22 @@
+2007-09-27 Rob Savoye <address@hidden>
+
+ * gui/gtk.cpp: Add support for LIRC, if it's running. Add event
+ handler for LIRC messages.
+
+2007-09-26 Rob Savoye <address@hidden>
+
+ * extensions/Makefile.am: Add dbus to DIST_SUBDIRS.
+
+ * libbase/extension.cpp: Initialize the entry first so the loop
+ actually works.
+ * extensions/dbus_ext.h, dbus_ext.cpp: Minimal code stubs for a
+ soon to be Dbus extension.
+ * configure.ac: Add extensions/dbus. Drop calling
+ GNASH_PATH_LIRC, as Gnash has it's own LIRC client code, and
+ doesn't use the lirc_client API anymore.
+ * macros/dbus.m4: New macro for Dbus support.
+ * extensions/Makefile.am: Build dbus extension if requested.
+
2007-09-28 Tomas Groth Christensen <address@hidden>
* libbase/Makefile.am, libmedia/sdl/VideoDecoderFfmpeg.h,
@@ -220,6 +239,7 @@
DropShadowFilter.h, GlowFilter.h, GradientBevelFilter.h,
GradientGlowFilter.h: include <boost/cstdint.hpp> for XintXX_t.
+>>>>>>> 1.4447
2007-09-26 Sandro Santilli <address@hidden>
* server/swf/tag_loaders.cpp (define_sound_loader): don't delete
@@ -946,10 +966,9 @@
* libbase/network.cpp: Don't just see if fd is set, make sure it's
greater than zero to avoid problems!
- * extensions/lirc/test.as: Test case for Lirc extension.
-
2007-09-14 Rob Savoye <address@hidden>
+ * extensions/lirc/test.as: Test case for Lirc extension.
* extensions/lirc/Makefile.am: Chnage from lirc.* to lirc_ext.* to
avoid name collisions.
* libbase/lirc.h, lirc.cpp: New files for lirc interface for
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash gui/gtk.cpp ChangeLog,
Rob Savoye <=