[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog backend/Makefile.am backend/gna...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog backend/Makefile.am backend/gna... |
Date: |
Tue, 26 Sep 2006 13:49:29 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 06/09/26 13:49:29
Modified files:
. : ChangeLog
backend : Makefile.am
Removed files:
backend : gnash.cpp gtksup.cpp gtksup.h
Log message:
* backend/Makefile.am, backend/gnash.cpp, backend/gtksup.cpp,
backend/gtksup.h: removed obsoleted files.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.926&r2=1.927
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/Makefile.am?cvsroot=gnash&r1=1.32&r2=1.33
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/gnash.cpp?cvsroot=gnash&r1=1.54&r2=0
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/gtksup.cpp?cvsroot=gnash&r1=1.7&r2=0
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/gtksup.h?cvsroot=gnash&r1=1.5&r2=0
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.926
retrieving revision 1.927
diff -u -b -r1.926 -r1.927
--- ChangeLog 26 Sep 2006 13:10:55 -0000 1.926
+++ ChangeLog 26 Sep 2006 13:49:29 -0000 1.927
@@ -1,5 +1,7 @@
2006-09-26 Sandro Santilli <address@hidden>
+ * backend/Makefile.am, backend/gnash.cpp, backend/gtksup.cpp,
+ backend/gtksup.h: removed obsoleted files.
* server/font.{cpp,h}: reduced headers inclusion.
* backend/render_handler_cairo.cpp: make sure that
the bitmap_info we receive are actually bitmap_info_cairo
Index: backend/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/backend/Makefile.am,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -b -r1.32 -r1.33
--- backend/Makefile.am 17 Sep 2006 19:45:58 -0000 1.32
+++ backend/Makefile.am 26 Sep 2006 13:49:29 -0000 1.33
@@ -106,16 +106,6 @@
$(RENDER_SOURCES) \
$(SOUND_SOURCES)
-# gnash_SOURCES = gnash.cpp
-# gnash_LDFLAGS = -module -avoid-version -no-undefined #-Wl,-z,defs
-# gnash_LDADD = $(AM_LDFLAGS) \
-# gtksup.cpp gtksup.h
-# libgnashbackend.la \
-# ../server/libgnashserver.la \
-# ../server/asobj/libgnashasobjs.la \
-# ../libgeometry/libgnashgeo.la \
-# ../libbase/libgnashbase.la
-
MUDFLAP_OPT = -fmudflap
MUDFLAP_LIB = /usr/local/lib/libmudflap.so
Index: backend/gnash.cpp
===================================================================
RCS file: backend/gnash.cpp
diff -N backend/gnash.cpp
--- backend/gnash.cpp 29 Aug 2006 02:03:16 -0000 1.54
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,1157 +0,0 @@
-//
-// Copyright (C) 2005, 2006 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 2 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
-//
-// Linking Gnash statically or dynamically with other modules is making
-// a combined work based on Gnash. Thus, the terms and conditions of
-// the GNU General Public License cover the whole combination.
-//
-// In addition, as a special exception, the copyright holders of Gnash give
-// you permission to combine Gnash with free software programs or
-// libraries that are released under the GNU LGPL and/or with Mozilla,
-// so long as the linking with Mozilla, or any variant of Mozilla, is
-// through its standard plug-in interface. You may copy and distribute
-// such a system following the terms of the GNU GPL for Gnash and the
-// licenses of the other code concerned, provided that you include the
-// source code of that other code when and as the GNU GPL requires
-// distribution of source code.
-//
-// Note that people who make modified versions of Gnash are not obligated
-// to grant this special exception for their modified versions; it is
-// their choice whether to do so. The GNU General Public License gives
-// permission to release a modified version without this exception; this
-// exception also makes it possible to release a modified version which
-// carries forward this exception.
-//
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#ifdef HAVE_SDL_H
-#include "SDL.h"
-#include "SDL_thread.h"
-#endif
-
-#ifdef HAVE_EXTENSIONS
-# include "mysql_db.h"
-#endif
-
-
-#if defined(_WIN32) || defined(WIN32)
-# include "getopt.c"
- int mouse_x;
- int mouse_y;
- int mouse_buttons;
-
- int width;
- int height;
-#else
-# include <unistd.h>
- extern int mouse_x;
- extern int mouse_y;
- extern int mouse_buttons;
-
- extern int width;
- extern int height;
-#endif
-
-#include <cstdlib>
-#include <cstdio>
-#include <iostream>
-#include <vector>
-#include <string>
-
-#include <GL/gl.h>
-#include <GL/glu.h>
-#ifdef HAVE_GTK2
-#include <gtk/gtk.h>
-#include "gtksup.h"
-# ifdef USE_GTKGLEXT
-# include <gdk/gdkx.h>
-# include <gdk/gdkgl.h>
-# include <gtk/gtkgl.h>
-# endif
-#endif
-
-#include "log.h"
-#include "gnash.h"
-#include "ogl.h"
-#include "utility.h"
-#include "container.h"
-#include "tu_file.h"
-#include "tu_types.h"
-#include "xmlsocket.h"
-#include "movie_definition.h"
-#include "URL.h"
-#include "GnashException.h"
-#include "rc.h"
-
-using namespace std;
-using namespace gnash;
-
-static void usage ();
-static void version_and_copyright();
-static int runThread(void *nothing);
-
-int xml_fd; // FIXME: this is the file descriptor
- // from XMLSocket::connect(). This
- // needs to be propogated up through
- // the layers properly, but first I
- // want to make sure it all works.
-
-#define OVERSIZE 1.0f
-
-static int doneYet = 0;
-
-static float s_scale = 1.0f;
-static bool s_antialiased = false;
-static int s_bit_depth = 16;
-static bool s_background = true;
-static bool s_measure_performance = false;
-static bool s_event_thread = false;
-static bool s_start_waiting = false;
-
-#ifdef GUI_GTK
-extern movie_state_e movie_menu_state;
-#else
-extern SDL_mutex *glMutex;
-#endif
-
-#ifndef GUI_GTK
-extern int windowid;
-#else
-extern GdkNativeWindow windowid;
-#endif
-
-// Define is you just want a hard coded OpenGL graphic
-//#define TEST_GRAPHIC
-
-static void
-fs_callback(gnash::movie_interface* movie, const char* command, const char*
args)
-// For handling notification callbacks from ActionScript.
-{
- log_msg("fs_callback: '");
- log_msg(command);
- log_msg("' '");
- log_msg(args);
- log_msg("'\n");
-}
-
-#ifndef GUI_GTK
-static void
-key_event(SDLKey key, bool down)
-// For forwarding SDL key events.
-{
- gnash::key::code c(gnash::key::INVALID);
-
- if (key >= SDLK_0 && key <= SDLK_9) {
- c = (gnash::key::code) ((key - SDLK_0) + gnash::key::_0);
- } else if (key >= SDLK_a && key <= SDLK_z) {
- c = (gnash::key::code) ((key - SDLK_a) + gnash::key::A);
- } else if (key >= SDLK_F1 && key <= SDLK_F15) {
- c = (gnash::key::code) ((key - SDLK_F1) + gnash::key::F1);
- } else if (key >= SDLK_KP0 && key <= SDLK_KP9) {
- c = (gnash::key::code) ((key - SDLK_KP0) + gnash::key::KP_0);
- } else {
- // many keys don't correlate, so just use a look-up table.
- struct {
- SDLKey sdlk;
- gnash::key::code gs;
- } table[] = {
- { SDLK_SPACE, gnash::key::SPACE },
- { SDLK_PAGEDOWN, gnash::key::PGDN },
- { SDLK_PAGEUP, gnash::key::PGUP },
- { SDLK_HOME, gnash::key::HOME },
- { SDLK_END, gnash::key::END },
- { SDLK_INSERT, gnash::key::INSERT },
- { SDLK_DELETE, gnash::key::DELETEKEY },
- { SDLK_BACKSPACE, gnash::key::BACKSPACE },
- { SDLK_TAB, gnash::key::TAB },
- { SDLK_RETURN, gnash::key::ENTER },
- { SDLK_ESCAPE, gnash::key::ESCAPE },
- { SDLK_LEFT, gnash::key::LEFT },
- { SDLK_UP, gnash::key::UP },
- { SDLK_RIGHT, gnash::key::RIGHT },
- { SDLK_DOWN, gnash::key::DOWN },
- // @@ TODO fill this out some more
- { SDLK_UNKNOWN, gnash::key::INVALID }
- };
-
- for (int i = 0; table[i].sdlk != SDLK_UNKNOWN; i++) {
- if (key == table[i].sdlk) {
- c = table[i].gs;
- break;
- }
- }
- }
-
- if (c != gnash::key::INVALID) {
- gnash::notify_key_event(c, down);
- }
-}
-#endif
-
-int
-main(int argc, char *argv[])
-{
- int c = 0;
- // scan for the two main long GNU options
- for (; c < argc; c++) {
- if (strcmp("--help", argv[c]) == 0) {
- version_and_copyright();
- printf("\n");
- usage();
- dbglogfile.removeLog();
- exit(0);
- }
- if (strcmp("--version", argv[c]) == 0) {
- version_and_copyright();
- dbglogfile.removeLog();
- exit(0);
- }
- }
-
- std::vector<const char*> infiles;
- string url;
-#ifdef GUI_GTK
- GdkGLConfigMode glcmode;
- gint major, minor;
-
- GtkWidget *window;
- GtkWidget *drawing_area;
-
- gtk_init (&argc, &argv);
- gtk_gl_init (&argc, &argv);
- gdk_gl_query_version (&major, &minor);
- dbglogfile << "OpenGL extension version - "
- << (int)major << "." << (int)minor << endl;
- glcmode = (GdkGLConfigMode)(GDK_GL_MODE_RGB
- | GDK_GL_MODE_DEPTH
- | GDK_GL_MODE_DOUBLE);
- glconfig = gdk_gl_config_new_by_mode (glcmode);
-
- if (glconfig == NULL) {
- dbglogfile << "Cannot find the double-buffered visual." << endl;
- dbglogfile << "Trying single-buffered visual." << endl;
-
- // Try single-buffered visual
- glcmode = (GdkGLConfigMode)(GDK_GL_MODE_RGB | GDK_GL_MODE_DEPTH);
- glconfig = gdk_gl_config_new_by_mode (glcmode);
- if (glconfig == NULL) {
- dbglogfile << "No appropriate OpenGL-capable visual found." <<
endl;
- exit (1);
- } else {
- dbglogfile << "Got single-buffered visual." << endl;
- }
- } else {
- dbglogfile << "Got double-buffered visual." << endl;
- }
-// examine_gl_config_attrib (glconfig);
-#endif
-
- assert(tu_types_validate());
-
- float exit_timeout = 0;
- bool do_render = true;
- bool do_sound = false;
- bool do_loop = true;
- bool sdl_abort = true;
- int delay = 31;
-
- // -1.0 tends to look good.
- float tex_lod_bias = -1.2f;
-
- dbglogfile.setWriteDisk(false);
- rcfile.loadFiles();
-// rcfile.dump();
-
- if (rcfile.useWriteLog()) {
- dbglogfile.setWriteDisk(true);
- }
-
- if (rcfile.verbosityLevel() > 0) {
- dbglogfile.setVerbosity(rcfile.verbosityLevel());
- }
-
- if (rcfile.useActionDump()) {
- dbglogfile.setActionDump(true);
- dbglogfile.setVerbosity();
- }
-
- if (rcfile.useParserDump()) {
- dbglogfile.setParserDump(true);
- dbglogfile.setVerbosity();
- }
-
- if (rcfile.getTimerDelay() > 0) {
- delay = rcfile.getTimerDelay();
- dbglogfile << "Timer delay set to " << delay << "milliseconds" << endl;
- }
-
- while ((c = getopt (argc, argv, "hvaps:cfd:m:x:r:t:b:1ewj:k:u:")) != -1)
- {
- switch (c) {
- case 'h':
- version_and_copyright();
- printf("\n");
- usage();
- dbglogfile.removeLog();
- exit(0);
- case 'v':
- dbglogfile.setVerbosity();
- dbglogfile << "Verbose output turned on" << endl;
- break;
- case 'w':
- dbglogfile.setWriteDisk(true);
- dbglogfile << "Logging to disk enabled." << endl;
- break;
- case 'a':
- dbglogfile.setActionDump(true);
- break;
- case 'p':
- dbglogfile.setParserDump(true);
- break;
- case 'f':
- s_measure_performance = true;
- break;
- case 's':
- s_scale = fclamp((float) atof(optarg), 0.01f, 100.f);
- break;
- case 'c':
- sdl_abort = false;
- break;
- case 'd':
- delay = strtol(optarg, NULL, 0);
- break;
- case 'u':
- url = optarg;
- dbglogfile << "Setting root URL to: " << width << endl;
- break;
- case 'j':
- width = strtol(optarg, NULL, 0);
- dbglogfile << "Setting width to: " << width << endl;
- break;
- case 'k':
- height = strtol(optarg, NULL, 0);
- dbglogfile << "Setting height to: " << height << endl;
- break;
- case 'e':
- s_event_thread = true;
- break;
- case 'x':
- windowid = strtol(optarg, NULL, 0);
- break;
- case 'm':
- tex_lod_bias = (float) atof(optarg);
- break;
- case '1':
- do_loop = false;
- break;
- case 'r':
- {
- int render_arg = strtol(optarg, NULL, 0);
- switch (render_arg) {
- case 0:
- // Disable both
- do_render = false;
- do_sound = false;
- break;
- case 1:
- // Enable both
- do_render = true;
- do_sound = true;
- break;
- case 2:
- // Disable just sound
- do_render = true;
- do_sound = false;
- break;
- default:
- std::cerr << "-r must be followed by 0, 1 or 2 (" <<
- render_arg << " is invalid" << endl;
-
- break;
- };
- break;
- }
- case 't':
- exit_timeout = (float) atof(optarg);
- break;
- case 'b':
- s_bit_depth = atoi(optarg);
- break;
- }
- }
-
- // get the file name from the command line
- while (optind < argc) {
- // Some options set variables, like ip=127.0.0.1
- if (strchr(argv[optind], '=')) {
- dbglogfile << "Got variable option on command line!" << endl;
- } else {
- infiles.push_back(argv[optind]);
- }
- optind++;
- }
-
- // Remove the logfile that's created by default, since leaving a short
- // file is confusing.
- if (dbglogfile.getWriteDisk() == false) {
- dbglogfile.removeLog();
- }
-
- // No file names were supplied
- if (infiles.size() == 0) {
- printf("no input files\n");
- usage();
- exit(1);
- }
-
- //gnash::register_file_opener_callback(file_opener);
- gnash::register_fscommand_callback(fs_callback);
-
-#ifdef HAVE_EXTENSIONS
- gnash::register_component("mysql_db", mysqldb::constructor);
-#endif
-
- gnash::sound_handler *sound = NULL;
- if (do_render) {
- if (do_sound) {
-#ifdef SOUND_SDL
- sound = gnash::create_sound_handler_sdl();
- gnash::set_sound_handler(sound);
-#endif
-#ifdef SOUND_GST
- sound = gnash::create_sound_handler_gst();
- gnash::set_sound_handler(sound);
-#endif
- }
- }
-
- // Get info about the width & height of the movie.
- int movie_version = 0;
- int movie_width = 0;
- int movie_height = 0;
- float movie_fps = 30.0f;
- try {
- gnash::get_movie_info(URL(infiles[0]), &movie_version, &movie_width,
- &movie_height, &movie_fps, NULL, NULL);
- } catch (const GnashException& er) {
- fprintf(stderr, "%s\n", er.what());
- movie_version = 0;
- }
- if (movie_version == 0) {
- fprintf(stderr, "error: can't get info about %s\n", infiles[0]);
- exit(1);
- }
-
- if (!width) {
- width = int(movie_width * s_scale);
- }
- if (!height) {
- height = int(movie_height * s_scale);
- }
-
- gnash::render_handler* render = NULL;
-
- if (do_render) {
-#ifndef GUI_GTK
- if (windowid) {
- char SDL_windowhack[32];
- sprintf (SDL_windowhack,"SDL_WINDOWID=%d", windowid);
- putenv (SDL_windowhack);
- }
-
- // Initialize the SDL subsystems we're using. Linux
- // and Darwin use Pthreads for SDL threads, Win32
- // doesn't. Otherwise the SDL event loop just polls.
- if (sdl_abort) {
- // Other flags are SDL_INIT_JOYSTICK | SDL_INIT_CDROM
-#if defined(_WIN32) || defined(WIN32)
- if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO))
-#else
- if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO |
SDL_INIT_EVENTTHREAD ))
-#endif
- {
- fprintf(stderr, "Unable to init SDL: %s\n",
SDL_GetError());
- exit(1);
- }
- } else {
- fprintf(stderr, "warning: SDL won't trap core dumps \n");
-#if defined(_WIN32) || defined(WIN32)
- if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO |
SDL_INIT_NOPARACHUTE | SDL_INIT_EVENTTHREAD))
-#else
- if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO |
SDL_INIT_NOPARACHUTE))
-#endif
- {
- fprintf(stderr, "Unable to init SDL: %s\n",
SDL_GetError());
- exit(1);
- }
- }
-
- atexit(SDL_Quit);
-
- SDL_EnableKeyRepeat(250, 33);
-
-
- if (s_bit_depth == 16) {
- // 16-bit color, surface creation is likely to succeed.
- SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 5);
- SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 5);
- SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 5);
- SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 15);
- SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
- SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 1);
- } else {
- assert(s_bit_depth == 32);
-
- // 32-bit color etc, for getting dest alpha,
- // for MULTIPASS_ANTIALIASING (see
- // render_handler_ogl.cpp).
- SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8);
- SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8);
- SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8);
- SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 8);
- SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
- SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
- SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 1);
- }
-#else
- if (windowid) {
- window = gtk_plug_new(windowid);
- dbglogfile << "Created GTK Plug window" << endl;
- } else {
- window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
- dbglogfile << "Created top level window" << endl;
- }
-// if (!glconfig) {
-// static const int attrib_list[] = {
-// // GDK_GL_ALPHA_SIZE, 1,
-// GDK_GL_DOUBLEBUFFER,
-// GDK_GL_DEPTH_SIZE, 1,
-// GDK_GL_RGBA,
-// GDK_GL_RED_SIZE, 8,
-// GDK_GL_ATTRIB_LIST_NONE
-// };
-// glconfig = gdk_gl_config_new(attrib_list);
-// }
-
- gtk_window_set_title(GTK_WINDOW (window), "Gnash Player");
- gtk_container_set_reallocate_redraws(GTK_CONTAINER (window), TRUE);
- g_signal_connect(G_OBJECT(window), "delete_event",
- G_CALLBACK(delete_event), NULL);
- g_signal_connect(G_OBJECT(window), "key_press_event",
- G_CALLBACK(key_press_event), NULL);
-
- GtkMenu *popup_menu = GTK_MENU(gtk_menu_new());
-
- drawing_area = gtk_drawing_area_new();
- if (!windowid) {
- gtk_widget_set_size_request(drawing_area, width, height);
- }
- // Set OpenGL-capability to the widget.
- gtk_widget_set_gl_capability(drawing_area, glconfig,
- NULL, TRUE, GDK_GL_RGBA_TYPE);
- g_signal_connect_after(G_OBJECT (drawing_area), "realize",
- G_CALLBACK (realize_event), NULL);
- g_signal_connect(G_OBJECT (drawing_area), "configure_event",
- G_CALLBACK (configure_event), NULL);
- g_signal_connect(G_OBJECT (drawing_area), "expose_event",
- G_CALLBACK (expose_event), NULL);
- g_signal_connect(G_OBJECT (drawing_area), "unrealize",
- G_CALLBACK (unrealize_event), NULL);
-
- gtk_widget_add_events(drawing_area, GDK_EXPOSURE_MASK
- | GDK_BUTTON_PRESS_MASK
- | GDK_BUTTON_RELEASE_MASK
- | GDK_KEY_RELEASE_MASK
- | GDK_KEY_PRESS_MASK
- | GDK_POINTER_MOTION_MASK);
-
- g_signal_connect_swapped(G_OBJECT(drawing_area),
- "button_press_event",
- G_CALLBACK(popup_handler),
- GTK_OBJECT(popup_menu));
-
- add_menuitems(popup_menu);
- gtk_widget_realize(window);
-
- g_signal_connect(G_OBJECT(drawing_area), "button_press_event",
- G_CALLBACK(button_press_event), NULL);
- g_signal_connect(G_OBJECT(drawing_area), "button_release_event",
- G_CALLBACK(button_release_event), NULL);
- g_signal_connect(G_OBJECT(drawing_area), "motion_notify_event",
- G_CALLBACK(motion_notify_event), NULL);
-
- gtk_container_add(GTK_CONTAINER(window), drawing_area);
- gtk_widget_show(drawing_area);
- gtk_widget_show(window);
-#endif
- render = gnash::create_render_handler_ogl();
- gnash::set_render_handler(render);
-
-
- // Change the LOD BIAS values to tweak blurriness.
- if (tex_lod_bias != 0.0f) {
- glTexEnvf(GL_TEXTURE_FILTER_CONTROL_EXT, GL_TEXTURE_LOD_BIAS_EXT,
tex_lod_bias);
- }
-#ifndef GUI_GTK
- // Set the video mode.
- if (SDL_SetVideoMode(width, height, s_bit_depth, SDL_OPENGL) == 0) {
- fprintf(stderr,
- "SDL_SetVideoMode(%d, %d, %d, SDL_OPENGL) failed: %s\n",
- width, height, s_bit_depth, SDL_GetError());
- exit(1);
- }
-
- glOrtho(-OVERSIZE, OVERSIZE, OVERSIZE,
-OVERSIZE, -1, 1);
-
- // Set the window title
- char *window_title = new char[1+strlen("gnash: ")+strlen(infiles[0])];
- strcpy(window_title, "gnash: ");
- strcat(window_title, infiles[0]);
- SDL_WM_SetCaption(window_title, window_title);
- //
- ogl::open();
-#endif
- }
-
- // Load the actual movie.
- gnash::movie_definition* md;
- try {
- md = gnash::create_library_movie(URL(infiles[0]));
- } catch (const GnashException& er) {
- fprintf(stderr, "%s\n", er.what());
- md = NULL;
- }
- if (md == NULL) {
- fprintf(stderr, "error: can't create a movie from '%s'\n", infiles[0]);
- exit(1);
- }
- gnash::movie_interface* m = create_library_movie_inst(md);
- if (m == NULL) {
- fprintf(stderr, "error: can't create movie instance\n");
- exit(1);
- }
- gnash::set_current_root(m);
-
- // Mouse state.
- float speed_scale = 1.0f;
- uint32_t start_ticks = 0;
- if (do_render) {
- start_ticks = SDL_GetTicks();
-
- }
- uint32_t last_ticks = start_ticks;
- int frame_counter = 0;
- int last_logged_fps = last_ticks;
-
-
- SDL_Thread *thread = NULL;
- if (s_event_thread) {
- thread = SDL_CreateThread(runThread, NULL);
- if ( thread == NULL) {
- fprintf(stderr, "Unable to create thread: %s\n", SDL_GetError());
- }
- }
-
-
- for (;;) {
- uint32_t ticks;
- if (do_render) {
- ticks = SDL_GetTicks();
- } else {
- // Simulate time.
- ticks = last_ticks + (uint32_t) (1000.0f / movie_fps);
- }
- int delta_ticks = ticks - last_ticks;
- float delta_t = delta_ticks / 1000.f;
- last_ticks = ticks;
-
- // Check auto timeout counter.
- if (exit_timeout > 0
- && ticks - start_ticks > (uint32_t) (exit_timeout * 1000)) {
- // Auto exit now.
- break;
- }
-
- if (do_render) {
-#ifndef GUI_GTK
- SDL_Event event;
- bool ret = true;
- // Handle input.
- while (ret) {
-// printf("xml_fd is %d, gofast is %d, s_start_waiting is %d,
s_event_thread is %d\n",
-// xml_fd, gofast, s_start_waiting, s_event_thread);
-#ifdef HAVE_LIBXML
- if (s_event_thread && s_start_waiting && (xml_fd > 0)) {
- // if (s_event_thread &&
(xml_fd > 0)) {
-// printf("SDL_WaitEvent!\n");
- ret = SDL_WaitEvent(&event);
- } else {
-// if (gofast) {
-// printf("SDL_PollEvent GOFAST!\n");
-// } else {
-// printf("SDL_PollEvent!\n");
-// }
- ret = SDL_PollEvent(&event) ? true : false;
- }
-#else
- // If we have no libxml, obey what the gofast variable is set
to
-// if (gofast)
- ret = SDL_PollEvent(&event) ? true : false;
-// else
-// ret = SDL_WaitEvent(&event);
- if (ret == false) break;
-#endif
-
-// printf("EVENT Type is %d\n", event.type);
- switch (event.type) {
- case SDL_NOEVENT:
- ret = false;
- break;
- case SDL_USEREVENT:
-// printf("SDL_USER_EVENT at %s, code %d%d\n", __FUNCTION__,
__LINE__, event.user.code);
- ret = false;
- break;
- case SDL_KEYDOWN:
- {
- SDLKey key = event.key.keysym.sym;
- bool ctrl = (event.key.keysym.mod & KMOD_CTRL) != 0;
-
- if (key == SDLK_ESCAPE
- || (ctrl && key == SDLK_q)
- || (ctrl && key == SDLK_w)) {
- goto done;
- } else if (ctrl && key == SDLK_p) {
- // Toggle paused state.
- if (m->get_play_state() ==
gnash::movie_interface::STOP) {
- m->set_play_state(gnash::movie_interface::PLAY);
- } else {
- m->set_play_state(gnash::movie_interface::STOP);
- }
- } else if (ctrl && key == SDLK_r) {
- // Restart the movie.
- m->restart();
- } else if (ctrl && (key == SDLK_LEFTBRACKET || key ==
SDLK_KP_MINUS)) {
- m->goto_frame(m->get_current_frame()-1);
- } else if (ctrl && (key == SDLK_RIGHTBRACKET || key ==
SDLK_KP_PLUS)) {
- m->goto_frame(m->get_current_frame()+1);
- } else if (ctrl && key == SDLK_a) {
- // Toggle antialiasing.
- s_antialiased = !s_antialiased;
- //gnash::set_antialiased(s_antialiased);
- } else if (ctrl && key == SDLK_t) {
- // test text replacement / variable setting:
- m->set_variable("test.text", "set_edit_text was
here...\nanother line of text for you to see in the text box\nSome UTF-8:
бжÐÐЧаÐâÐÐÐâÐÑ");
- } else if (ctrl && key == SDLK_g) {
- // test get_variable.
- log_msg("testing get_variable: '");
- log_msg(m->get_variable("test.text"));
- log_msg("'\n");
- } else if (ctrl && key == SDLK_m) {
- // Test call_method.
- const char* result = m->call_method(
- "test_call",
- "%d, %f, %s, %ls",
- 200,
- 1.0f,
- "Test string",
- L"Test long string");
-
- if (result) {
- log_msg("call_method: result = ");
- log_msg(result);
- log_msg("\n");
- } else {
- log_msg("call_method: null result\n");
- }
- } else if (ctrl && key == SDLK_b) {
- // toggle background color.
- s_background = !s_background;
- } else if (ctrl && key == SDLK_f) {
- extern bool gnash_debug_show_paths;
- gnash_debug_show_paths = !gnash_debug_show_paths;
- } else if (ctrl && key == SDLK_EQUALS) {
- float f = gnash::get_curve_max_pixel_error();
- f *= 1.1f;
- gnash::set_curve_max_pixel_error(f);
- printf("curve error tolerance = %f\n", f);
- } else if (ctrl && key == SDLK_MINUS) {
- float f = gnash::get_curve_max_pixel_error();
- f *= 0.9f;
- gnash::set_curve_max_pixel_error(f);
- printf("curve error tolerance = %f\n", f);
- }
-
- key_event(key, true);
-
- break;
- }
-
- case SDL_KEYUP:
- {
- SDLKey key = event.key.keysym.sym;
- key_event(key, false);
- break;
- }
-
- case SDL_MOUSEMOTION:
- mouse_x = (int) event.motion.x;
- mouse_y = (int) event.motion.y;
-
break;
-
- case SDL_MOUSEBUTTONDOWN:
- case SDL_MOUSEBUTTONUP:
- {
- int mask = 1 << (event.button.button - 1);
- if (event.button.state == SDL_PRESSED) {
- mouse_buttons |= mask;
- } else {
- mouse_buttons &= ~mask;
- }
- break;
- }
-
- case SDL_QUIT:
- goto done;
- break;
-
- default:
- break;
- }
- }
-#else
- // Poll for events instead of letting gtk_main() handle them
- while (gtk_events_pending ()) {
-// dbglogfile << "Making GTK main iteration!" << endl;
- switch (movie_menu_state) {
- case PLAY_MOVIE:
- m->set_play_state(gnash::movie_interface::PLAY);
- break;
- // Control-R restarts the movie
- case RESTART_MOVIE:
- m->restart();
- break;
- case STOP_MOVIE:
- m->set_play_state(gnash::movie_interface::STOP);
- break;
- case PAUSE_MOVIE:
- if (m->get_play_state() == gnash::movie_interface::STOP)
{
- m->set_play_state(gnash::movie_interface::PLAY);
- } else {
- m->set_play_state(gnash::movie_interface::STOP);
- }
- break;
- // go backward one frame
- case STEP_BACKWARD:
- m->goto_frame(m->get_current_frame()-1);
- break;
- // go forward one frame
- case STEP_FORWARD:
- m->goto_frame(m->get_current_frame()+1);
- break;
- // jump goes backward 10 frames
- case JUMP_BACKWARD:
- m->goto_frame(m->get_current_frame()-10);
- break;
- // jump goes forward 10 frames
- case JUMP_FORWARD:
- if ((m->get_current_frame()+10) < md->get_frame_count())
{
- m->goto_frame(m->get_current_frame()+10);
- }
- break;
- case QUIT_MOVIE:
- goto done;
- break;
- default:
- break;
- };
- movie_menu_state = IDLE_MOVIE;
- gtk_main_iteration();
- }
-#endif
- }
-
-#ifndef TEST_GRAPHIC
-// printf("%s(%d): Frame count is %d\n", __PRETTY_FUNCTION__, __LINE__,
-// md->get_frame_count());
- m = gnash::get_current_root();
- gnash::delete_unused_root();
-#ifdef GUI_GTK
- glcontext = gtk_widget_get_gl_context (drawing_area);
- GdkGLDrawable *gldrawable = gtk_widget_get_gl_drawable (drawing_area);
- if (!gdk_gl_drawable_gl_begin (gldrawable, glcontext)) {
- dbglogfile << "ERROR: Couldn't start drawable!" << endl;
- }
-#endif
- m->set_display_viewport(0, 0, width, height);
- m->set_background_alpha(s_background ? 1.0f : 0.05f);
-
- m->notify_mouse_state((int) (mouse_x *
((float)movie_width / width)),
-
(int) (mouse_y * ((float)movie_height /
height)),
-
mouse_buttons);
-
- m->advance(delta_t *speed_scale);
-
- if (do_render) {
- glDisable(GL_DEPTH_TEST); // Disable depth testing.
- glDrawBuffer(GL_BACK);
- }
- m->display();
- frame_counter++;
-
-#ifdef GUI_GTK
- if (gdk_gl_drawable_is_double_buffered (gldrawable)) {
- gdk_gl_drawable_swap_buffers (gldrawable);
- } else {
- glFlush();
- }
-
- gdk_gl_drawable_gl_end (gldrawable);
-#endif
-#else
- GdkGLContext *glcontext = gtk_widget_get_gl_context (drawing_area);
- GdkGLDrawable *gldrawable = gtk_widget_get_gl_drawable (drawing_area);
-
- GLUquadricObj *qobj;
- static GLfloat light_diffuse[] = {1.0, 0.0, 0.0, 1.0};
- static GLfloat light_position[] = {1.0, 1.0, 1.0, 0.0};
-
- // OpenGL BEGIN
- if (!gdk_gl_drawable_gl_begin (gldrawable, glcontext)) {
- dbglogfile << "ERROR: Couldn't start drawable!" << endl;
- return false;
- }
-
- qobj = gluNewQuadric ();
- gluQuadricDrawStyle (qobj, GLU_FILL);
- glNewList (1, GL_COMPILE);
- gluSphere (qobj, 1.0, 20, 20);
- glEndList ();
-
- glLightfv (GL_LIGHT0, GL_DIFFUSE, light_diffuse);
- glLightfv (GL_LIGHT0, GL_POSITION, light_position);
- glEnable (GL_LIGHTING);
- glEnable (GL_LIGHT0);
- glEnable (GL_DEPTH_TEST);
-
- glClearColor (1.0, 1.0, 1.0, 1.0);
- glClearDepth (1.0);
-
- glViewport (0, 0, width, height);
-
- glMatrixMode (GL_PROJECTION);
- glLoadIdentity ();
- gluPerspective (40.0, 1.0, 1.0, 10.0);
-
- glMatrixMode (GL_MODELVIEW);
- glLoadIdentity ();
- gluLookAt (0.0, 0.0, 3.0,
- 0.0, 0.0, 0.0,
- 0.0, 1.0, 0.0);
- glTranslatef (0.0, 0.0, -3.0);
-
- gdk_gl_drawable_gl_end (gldrawable);
-// end of TEST_GRAPHIC
-#endif
-
- if (do_render) {
-#ifndef GUI_GTK
- SDL_GL_SwapBuffers();
- //glPopAttrib ();
-#endif
-
- if (s_measure_performance == false) {
- // Don't hog the CPU.
- // if (!nodelay)
-// if (!gofast) {
- SDL_Delay(delay);
-// }
- } else {
- // Log the frame rate every second or so.
- if (last_ticks - last_logged_fps > 1000) {
- float delta = (last_ticks - last_logged_fps) / 1000.f;
-
- if (delta > 0) {
- printf("fps = %3.1f\n", frame_counter / delta);
- } else {
- printf("fps = *inf*\n");
- }
-
- last_logged_fps = last_ticks;
- frame_counter = 0;
- }
- }
- }
-
- // See if we should exit.
- if (do_loop == false
- && m->get_current_frame() + 1 == md->get_frame_count())
- {
- // We're reached the end of the movie; exit.
- break;
- }
- }
-
- done:
-
- doneYet = 1;
- SDL_KillThread(thread); // kill the network read thread
- //SDL_Quit();
-
- if (md) {
- md->drop_ref();
- }
-
- if (m) {
- m->drop_ref();
- }
- delete sound;
- gnash::set_sound_handler(NULL);
- delete render;
- gnash::set_render_handler(NULL);
-
- // For testing purposes, throw some keypresses
- // to make sure the key handler is properly using weak
- // references to listeners.
- gnash::notify_key_event(gnash::key::A, true);
- gnash::notify_key_event(gnash::key::B, true);
- gnash::notify_key_event(gnash::key::C, true);
-
- // Clean up as much as possible, so valgrind will help find actual leaks.
- gnash::clear();
-
- return 0;
-}
-
-static int
-runThread(void *nothing)
-{
-#ifdef HAVE_LIBXML
-
- //int i = 123;
- int val;
- int count = 0;
- SDL_Event *ptr;
-#if 1
- SDL_Event ev;
- ev.type = SDL_USEREVENT;
- ev.user.code = 0;
- ev.user.data1 = 0;
- ev.user.data2 = 0;
- ptr = &ev;
-#else
- ptr = (SDL_Event *)ev_ptr;
- ptr->type = SDL_USEREVENT;
- ptr->user.code = 0;
- ptr->user.data1 = 0;
- ptr->user.data2 = 0;
-#endif
-
- printf("Initializing event thread...\n");
-
- while (gnash::check_sockets(xml_fd) == -1) {
- sleep(10); // Delay to give the socket time to
- // connect.
- continue;
- }
-
- // give everything a chance to initialize.
- // since all the frames need to be set up,
- // and this is just a more runtime performance
- // issue with CPU load.
- sleep(20);
-
- printf("Enabling Event Wait Mode...\n");
- s_start_waiting = true;
-
- while (!doneYet) {
- //ptr->user.data1 = (void *)i;
- if ((val = gnash::check_sockets(xml_fd)) == -1) {
- return -1; // we shouldn't be seeing any errors
- }
- // Don't push an event if there is already one in the
- // queue. XMLSocket::onData() will come around and get
- // the data anyway.
- count = SDL_PeepEvents(ptr, 1, SDL_PEEKEVENT, SDL_USEREVENT);
- // printf("%d User Events in queue\n", count);
- if ((count == 0) && (val >= 0)) {
- //printf("Pushing User Event on queue\n");
- SDL_PushEvent(ptr);
- SDL_Delay(300); // was 300
- }
- }
-#endif // HAVE_LIBXML
-
- return 0;
-}
-
-void
-version_and_copyright()
-{
- printf (
-"Gnash " VERSION "\n"
-"Copyright (C) 2006 Free Software Foundation, Inc.\n"
-"Gnash comes with NO WARRANTY, to the extent permitted by law.\n"
-"You may redistribute copies of Gnash under the terms of the GNU General\n"
-"Public License. For more information, see the file named COPYING.\n"
- );
-}
-
-
-void
-usage()
-{
- printf(
- "usage: gnash [options] movie_file.swf\n"
- "\n"
- "Plays a SWF (Shockwave Flash) movie\n"
- "options:\n"
- "\n"
- " -h, --help Print this info.\n"
- " -s <factor> Scale the movie up/down by the specified factor\n"
- " -c Produce a core file instead of letting SDL trap it\n"
- " -d num Number of milliseconds to delay in main loop\n"
- " -v Be verbose; i.e. print log messages to stdout\n"
- " -va Be verbose about movie Actions\n"
- " -vp Be verbose about parsing the movie\n"
- " -m <bias> Specify the texture LOD bias (float, default is -1)\n"
- " -f Run full speed (no sleep) and log frame rate\n"
-// " -e Use SDL Event thread\n"
- " -x <ID> X11 Window ID for display\n"
- " -w Produce the disk based debug log\n"
- " -1 Play once; exit when/if movie reaches the last frame\n"
- " -r <0|1|2> 0 disables rendering & sound (good for batch tests)\n"
- " 1 enables rendering & sound (default setting)\n"
- " 2 enables rendering & disables sound\n"
- " -t <sec> Timeout and exit after the specified number of
seconds\n"
- " -b <bits> Bit depth of output window (16 or 32, default is 16)\n"
- " --version Print gnash's version number and exit\n"
- "\n"
- "keys:\n"
- " CTRL-Q, CTRL-W, ESC Quit/Exit\n"
- " CTRL-P Toggle Pause\n"
- " CTRL-R Restart the movie\n"
- " CTRL-[ or kp- Step back one frame\n"
- " CTRL-] or kp+ Step forward one frame\n"
-// " CTRL-A Toggle antialiasing (doesn't work)\n"
-// " CTRL-T Debug. Test the set_variable() function\n"
-// " CTRL-G Debug. Test the get_variable() function\n"
-// " CTRL-M Debug. Test the call_method() function\n"
- " CTRL-B Toggle background color\n"
- );
-}
Index: backend/gtksup.cpp
===================================================================
RCS file: backend/gtksup.cpp
diff -N backend/gtksup.cpp
--- backend/gtksup.cpp 5 Jul 2006 12:50:07 -0000 1.7
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,772 +0,0 @@
-//
-// Copyright (C) 2005, 2006 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 2 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
-//
-// Linking Gnash statically or dynamically with other modules is making
-// a combined work based on Gnash. Thus, the terms and conditions of
-// the GNU General Public License cover the whole combination.
-//
-// In addition, as a special exception, the copyright holders of Gnash give
-// you permission to combine Gnash with free software programs or
-// libraries that are released under the GNU LGPL and/or with Mozilla,
-// so long as the linking with Mozilla, or any variant of Mozilla, is
-// through its standard plug-in interface. You may copy and distribute
-// such a system following the terms of the GNU GPL for Gnash and the
-// licenses of the other code concerned, provided that you include the
-// source code of that other code when and as the GNU GPL requires
-// distribution of source code.
-//
-// Note that people who make modified versions of Gnash are not obligated
-// to grant this special exception for their modified versions; it is
-// their choice whether to do so. The GNU General Public License gives
-// permission to release a modified version without this exception; this
-// exception also makes it possible to release a modified version which
-// carries forward this exception.
-//
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <iostream>
-#include <X11/keysym.h>
-#include <GL/gl.h>
-#include <GL/glu.h>
-
-#include "gnash.h"
-#include "log.h"
-#ifdef USE_GTKGLEXT
-# include <gtk/gtk.h>
-# include <gdk/gdkx.h>
-# include <gtk/gtkgl.h>
-#include "gtksup.h"
-#endif
-
-using namespace std;
-using namespace gnash;
-
-GdkGLConfig *glconfig = NULL;
-GdkGLContext *glcontext = NULL;
-
-int mouse_x = 0;
-int mouse_y = 0;
-int mouse_buttons = 0;
-int width = 0;
-int height = 0;
-
-#if defined(USE_GTKGLEXT) && defined(HAVE_GTK2)
-movie_state_e movie_menu_state;
-
-// Define is you just want a hard coded OpenGL graphic
-//#define TEST_GRAPHIC
-
-//
-// Popup menu support
-//
-
-// This pops up the menu when the right mouse button is clicked
-gint
-popup_handler(GtkWidget *widget, GdkEvent *event)
-{
-// GNASH_REPORT_FUNCTION;
-
- GtkMenu *menu;
- GdkEventButton *event_button;
-
- menu = GTK_MENU(widget);
-// printf("event type # %i\n", event->type);
- if (event->type == GDK_BUTTON_PRESS) {
- event_button = (GdkEventButton *) event;
- if (event_button->button == 3) {
- gtk_menu_popup(menu, NULL, NULL, NULL, NULL,
- event_button->button, event_button->time);
- return TRUE;
- }
- }
- return FALSE;
-}
-
-/// \brief restart the movie from the beginning
-void
-menuitem_restart_callback(GtkMenuItem *menuitem, gpointer data)
-{
-// GNASH_REPORT_FUNCTION;
- movie_menu_state = RESTART_MOVIE;
-}
-
-/// \brief quit complete, and close the application
-void
-menuitem_quit_callback(GtkMenuItem *menuitem, gpointer data)
-{
-// GNASH_REPORT_FUNCTION;
- movie_menu_state = QUIT_MOVIE;
- delete_event(GTK_WIDGET(menuitem), NULL, data);
-}
-
-/// \brief Start the movie playing from the current frame.
-void
-menuitem_play_callback(GtkMenuItem *menuitem, gpointer data)
-{
-// GNASH_REPORT_FUNCTION;
- movie_menu_state = PLAY_MOVIE;
-}
-
-/// \brief toggle that's playing or paused.
-void
-menuitem_pause_callback(GtkMenuItem * menuitem,
- gpointer data)
-{
-// GNASH_REPORT_FUNCTION;
- movie_menu_state = PAUSE_MOVIE;
-}
-
-/// \brief stop the movie that's playing.
-void
-menuitem_stop_callback(GtkMenuItem *menuitem,
- gpointer data)
-{
-// GNASH_REPORT_FUNCTION;
- movie_menu_state = STOP_MOVIE;
-}
-
-/// \brief step forward 1 frame
-void
-menuitem_step_forward_callback(GtkMenuItem *menuitem,
- gpointer data)
-{
-// GNASH_REPORT_FUNCTION;
- movie_menu_state = STEP_FORWARD;
-}
-
-/// \brief step backward 1 frame
-void
-menuitem_step_backward_callback(GtkMenuItem *menuitem,
- gpointer data)
-{
-// GNASH_REPORT_FUNCTION;
- movie_menu_state = STEP_BACKWARD;
-}
-
-/// \brief jump forward 10 frames
-void
-menuitem_jump_forward_callback(GtkMenuItem *menuitem,
- gpointer data)
-{
-// GNASH_REPORT_FUNCTION;
- movie_menu_state = JUMP_FORWARD;
-}
-
-/// \brief jump backward 10 frames
-void
-menuitem_jump_backward_callback(GtkMenuItem *menuitem,
- gpointer data)
-{
-// GNASH_REPORT_FUNCTION;
- movie_menu_state = JUMP_BACKWARD;
-}
-
-/// \brief setup the menu for the right-click mouse button
-void
-add_menuitems(GtkMenu *popup_menu)
-{
- GtkMenuItem *menuitem_play =
- GTK_MENU_ITEM(gtk_menu_item_new_with_label("Play Movie"));
- gtk_menu_append(popup_menu, GTK_WIDGET(menuitem_play));
- gtk_widget_show(GTK_WIDGET(menuitem_play));
- GtkMenuItem *menuitem_pause =
- GTK_MENU_ITEM(gtk_menu_item_new_with_label("Pause Movie"));
- gtk_menu_append(popup_menu, GTK_WIDGET(menuitem_pause));
- gtk_widget_show(GTK_WIDGET(menuitem_pause));
- GtkMenuItem *menuitem_stop =
- GTK_MENU_ITEM(gtk_menu_item_new_with_label("Stop Movie"));
- gtk_menu_append(popup_menu, GTK_WIDGET(menuitem_stop));
- gtk_widget_show(GTK_WIDGET(menuitem_stop));
- GtkMenuItem *menuitem_restart =
- GTK_MENU_ITEM(gtk_menu_item_new_with_label("Restart Movie"));
- gtk_menu_append(popup_menu, GTK_WIDGET(menuitem_restart));
- gtk_widget_show(GTK_WIDGET(menuitem_restart));
- GtkMenuItem *menuitem_step_forward =
- GTK_MENU_ITEM(gtk_menu_item_new_with_label("Step Forward Frame"));
- gtk_menu_append(popup_menu, GTK_WIDGET(menuitem_step_forward));
- gtk_widget_show(GTK_WIDGET(menuitem_step_forward));
- GtkMenuItem *menuitem_step_backward =
- GTK_MENU_ITEM(gtk_menu_item_new_with_label("Step Backward Frame"));
- gtk_menu_append(popup_menu, GTK_WIDGET(menuitem_step_backward));
- gtk_widget_show(GTK_WIDGET(menuitem_step_backward));
- GtkMenuItem *menuitem_jump_forward =
- GTK_MENU_ITEM(gtk_menu_item_new_with_label("Jump Forward 10 Frames"));
- gtk_menu_append(popup_menu, GTK_WIDGET(menuitem_jump_forward));
- gtk_widget_show(GTK_WIDGET(menuitem_jump_forward));
- GtkMenuItem *menuitem_jump_backward =
- GTK_MENU_ITEM(gtk_menu_item_new_with_label("Jump Backward 10 Frames"));
- gtk_menu_append(popup_menu, GTK_WIDGET(menuitem_jump_backward));
- gtk_widget_show(GTK_WIDGET(menuitem_jump_backward));
- GtkMenuItem *menuitem_quit =
- GTK_MENU_ITEM(gtk_menu_item_new_with_label("Quit Gnash"));
- gtk_menu_append(popup_menu, GTK_WIDGET(menuitem_quit));
- gtk_widget_show(GTK_WIDGET(menuitem_quit));
- g_signal_connect(GTK_OBJECT(menuitem_play), "activate",
- G_CALLBACK(menuitem_play_callback), NULL);
- g_signal_connect(GTK_OBJECT(menuitem_pause), "activate",
- G_CALLBACK(menuitem_pause_callback), NULL);
- g_signal_connect(GTK_OBJECT(menuitem_stop), "activate",
- G_CALLBACK(menuitem_stop_callback), NULL);
- g_signal_connect(GTK_OBJECT(menuitem_restart), "activate",
- G_CALLBACK(menuitem_restart_callback), NULL);
- g_signal_connect(GTK_OBJECT(menuitem_step_forward), "activate",
- G_CALLBACK(menuitem_step_forward_callback), NULL);
- g_signal_connect(GTK_OBJECT(menuitem_step_backward), "activate",
- G_CALLBACK(menuitem_step_backward_callback), NULL);
- g_signal_connect(GTK_OBJECT(menuitem_jump_forward), "activate",
- G_CALLBACK(menuitem_jump_forward_callback), NULL);
- g_signal_connect(GTK_OBJECT(menuitem_jump_backward), "activate",
- G_CALLBACK(menuitem_jump_backward_callback), NULL);
- g_signal_connect(GTK_OBJECT(menuitem_quit), "activate",
- G_CALLBACK(menuitem_quit_callback), NULL);
-}
-
-//
-// Event handlers
-//
-
-gboolean
-unrealize_event(GtkWidget *widget, GdkEvent *event, gpointer data)
-{
- if (glcontext) {
- g_object_unref (G_OBJECT (glcontext));
- glcontext = NULL;
- }
-
- if (glconfig) {
- g_object_unref (G_OBJECT (glconfig));
- glconfig = NULL;
- }
-
- return TRUE;
-}
-
-// Shut everything down and exit when we're destroyed as a window
-gboolean
-delete_event(GtkWidget *widget, GdkEvent *event, gpointer data)
-{
-// GNASH_REPORT_FUNCTION;
-// Only use gtk_main_quit() if gtk_main() is used. For now, we're using
-// a gtk_main_iteration() to do it in a polling fashion instead.
-// gtk_main_quit();
- exit(0);
- return TRUE;
-}
-
-//
-gboolean
-realize_event(GtkWidget *widget, GdkEvent *event, gpointer data)
-{
-// GNASH_REPORT_FUNCTION;
-
-#ifdef TEST_GRAPHIC
- GdkGLContext *glcontext = gtk_widget_get_gl_context (widget);
- GdkGLDrawable *gldrawable = gtk_widget_get_gl_drawable (widget);
-
- GLUquadricObj *qobj;
- static GLfloat light_diffuse[] = {1.0, 0.0, 0.0, 1.0};
- static GLfloat light_position[] = {1.0, 1.0, 1.0, 0.0};
-
- // OpenGL BEGIN
- if (!gdk_gl_drawable_gl_begin (gldrawable, glcontext)) {
- dbglogfile << "ERROR: Couldn't start drawable!" << endl;
- return false;
- }
-
- qobj = gluNewQuadric ();
- gluQuadricDrawStyle (qobj, GLU_FILL);
- glNewList (1, GL_COMPILE);
- gluSphere (qobj, 1.0, 20, 20);
- glEndList ();
-
- glLightfv (GL_LIGHT0, GL_DIFFUSE, light_diffuse);
- glLightfv (GL_LIGHT0, GL_POSITION, light_position);
- glEnable (GL_LIGHTING);
- glEnable (GL_LIGHT0);
- glEnable (GL_DEPTH_TEST);
-
- glClearColor (1.0, 1.0, 1.0, 1.0);
- glClearDepth (1.0);
-
- glViewport (0, 0,
- widget->allocation.width, widget->allocation.height);
-
- width = widget->allocation.width;
- height = widget->allocation.height;
-
- glMatrixMode (GL_PROJECTION);
- glLoadIdentity ();
- gluPerspective (40.0, 1.0, 1.0, 10.0);
-
- glMatrixMode (GL_MODELVIEW);
- glLoadIdentity ();
- gluLookAt (0.0, 0.0, 3.0,
- 0.0, 0.0, 0.0,
- 0.0, 1.0, 0.0);
- glTranslatef (0.0, 0.0, -3.0);
-
- gdk_gl_drawable_gl_end (gldrawable);
-
-// end of TEST_GRAPHIC
-#endif
-
- return TRUE;
-
- // OpenGL END
-}
-
-gboolean
-expose_event(GtkWidget *const widget,
- GdkEventExpose *const event,
- const gpointer data)
-{
-// GNASH_REPORT_FUNCTION;
-
- GdkGLDrawable *const gldrawable = gtk_widget_get_gl_drawable(widget);
- g_assert(gldrawable);
- GdkGLContext *const glcontext = gtk_widget_get_gl_context(widget);
- g_assert(glcontext);
-
-#ifdef TEST_GRAPHIC
- // OpenGL BEGIN
- if (!gdk_gl_drawable_gl_begin (gldrawable, glcontext))
- return FALSE;
-
- glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
- glCallList (1);
-
- if (gdk_gl_drawable_is_double_buffered (gldrawable))
- gdk_gl_drawable_swap_buffers (gldrawable);
- else
- glFlush ();
-
- gdk_gl_drawable_gl_end (gldrawable);
- // OpenGL END
-#else
- if (event->count == 0
- && gdk_gl_drawable_make_current(gldrawable, glcontext)) {
-// viewer.redraw();
- }
-
-// end of TEST_GRAPHIC
-#endif
-
- return true;
-}
-
-gboolean
-configure_event(GtkWidget *const widget,
- GdkEventConfigure *const event,
- const gpointer data)
-{
-// GNASH_REPORT_FUNCTION;
-
- GdkGLContext *glcontext = gtk_widget_get_gl_context (widget);
- GdkGLDrawable *gldrawable = gtk_widget_get_gl_drawable (widget);
-
-#ifdef TEST_GRAPHIC
- // OpenGL BEGIN
- if (!gdk_gl_drawable_gl_begin (gldrawable, glcontext))
- return FALSE;
- glViewport (0, 0,
- widget->allocation.width, widget->allocation.height);
- gdk_gl_drawable_gl_end (gldrawable);
- // OpenGL END
-#else
- if (gdk_gl_drawable_make_current(gldrawable, glcontext)) {
- glViewport (event->x, event->y, event->width, event->height);
- // Reset the size of the frame. This is really ugly but these
- // global variables are used by the existing main event loop
- // in gnash.cpp to set the size of the rendered image.
- width = event->width;
- height = event->height;
- }
-
-// end of TEST_GRAPHIC
-#endif
-
- return true;
-}
-
-gboolean
-key_press_event(GtkWidget *const widget,
- GdkEventKey *const event,
- const gpointer data)
-{
-// GNASH_REPORT_FUNCTION;
- static bool shift_state = false;
- static bool control_state = false;
-
- switch (event->keyval) {
- case XK_Home:
-// info.what = viewer::key_home;
- break;
-
- case XK_Left:
-// info.what = viewer::key_left;
- break;
-
- case XK_Up:
-// info.what = viewer::key_up;
- break;
-
- case XK_Right:
-// info.what = viewer::key_right;
- break;
-
- case XK_Down:
-// info.what = viewer::key_down;
- break;
-
- case XK_Page_Up:
-// info.what = viewer::key_page_up;
- break;
-
- case XK_Page_Down:
-// info.what = viewer::key_page_down;
- break;
-
- default:
- if (event->length <= 0) {
- return true;
- }
- char key = gdk_unicode_to_keyval(event->keyval);
- if (event->state == GDK_SHIFT_MASK) {
- shift_state = true;
- dbglogfile << "Got Shift-key: " << key << endl;
- }
- if (event->state == GDK_CONTROL_MASK) {
- switch(key) {
- case 'r':
- movie_menu_state = RESTART_MOVIE;
- break;
- case 'p':
- movie_menu_state = PAUSE_MOVIE;
- break;
- default:
- dbglogfile << "Got Control-key: " << key << endl;
- control_state = true;
- break;
- }
- }
- if ((event->state != GDK_CONTROL_MASK) || !(event->state !=
GDK_SHIFT_MASK)) {
- dbglogfile << "Got key: " << key << endl;
- }
-
- gnash::key::code c(gnash::key::INVALID);
-
- if (key >= 'a' && key <= 'z') {
- c = (gnash::key::code) ((key - 'a') + gnash::key::A);
- }
- // FIXME: we don't do anything with the state for now
- if (control_state) {
- control_state = false;
- }
- if (shift_state) {
- shift_state = false;
- }
-
- switch (key) {
- case '[':
- movie_menu_state = STEP_FORWARD;
- break;
- case ']':
- movie_menu_state = STEP_BACKWARD;
- break;
- default:
- break;
- }
-
- if (c != gnash::key::INVALID) {
- gnash::notify_key_event(c, true);
- }
- };
-
- return true;
-}
-
-gboolean
-button_press_event(GtkWidget *const widget,
- GdkEventButton *const event,
- const gpointer data)
-{
-// GNASH_REPORT_FUNCTION;
-
- int mask = 1 << (event->button - 1);
- mouse_buttons |= mask;
-
- mouse_x = (int)event->x;
- mouse_y = (int)event->y;
-
- return true;
-}
-
-gboolean
-button_release_event(GtkWidget * const widget,
- GdkEventButton * const event,
- const gpointer data)
-{
-// GNASH_REPORT_FUNCTION;
- int mask = 1 << (event->button - 1);
- mouse_buttons &= ~mask;
-
- mouse_x = (int)event->x;
- mouse_y = (int)event->y;
-
- return true;
-}
-
-gboolean
-motion_notify_event(GtkWidget *const widget,
- GdkEventMotion *const event,
- const gpointer data)
-{
-// GNASH_REPORT_FUNCTION;
-// if (event->state & Button1Mask) {
-// info.what = 0;
-// } else if (event->state & Button2Mask) {
-// info.what = 1;
-// } else if (event->state & Button3Mask) {
-// info.what = 2;
-// } else {
-// info.event = viewer::event_mouse_move;
-// }
-
- mouse_x = (int)event->x;
- mouse_y = (int)event->y;
-
- return true;
-}
-
-
-void
-print_gl_config_attrib (GdkGLConfig *glconfig,
- const gchar *attrib_str,
- int attrib,
- gboolean is_boolean)
-{
- int value;
-
- g_print ("%s = ", attrib_str);
- if (gdk_gl_config_get_attrib (glconfig, attrib, &value))
- {
- if (is_boolean)
- g_print ("%s\n", value == TRUE ? "TRUE" : "FALSE");
- else
- g_print ("%d\n", value);
- }
- else
- g_print ("*** Cannot get %s attribute value\n", attrib_str);
-}
-
-void
-examine_gl_config_attrib (GdkGLConfig *glconfig)
-{
- g_print ("\nOpenGL visual configurations :\n\n");
-
- g_print ("gdk_gl_config_is_rgba (glconfig) = %s\n",
- gdk_gl_config_is_rgba (glconfig) ? "TRUE" : "FALSE");
- g_print ("gdk_gl_config_is_double_buffered (glconfig) = %s\n",
- gdk_gl_config_is_double_buffered (glconfig) ? "TRUE" : "FALSE");
- g_print ("gdk_gl_config_is_stereo (glconfig) = %s\n",
- gdk_gl_config_is_stereo (glconfig) ? "TRUE" : "FALSE");
- g_print ("gdk_gl_config_has_alpha (glconfig) = %s\n",
- gdk_gl_config_has_alpha (glconfig) ? "TRUE" : "FALSE");
- g_print ("gdk_gl_config_has_depth_buffer (glconfig) = %s\n",
- gdk_gl_config_has_depth_buffer (glconfig) ? "TRUE" : "FALSE");
- g_print ("gdk_gl_config_has_stencil_buffer (glconfig) = %s\n",
- gdk_gl_config_has_stencil_buffer (glconfig) ? "TRUE" : "FALSE");
- g_print ("gdk_gl_config_has_accum_buffer (glconfig) = %s\n",
- gdk_gl_config_has_accum_buffer (glconfig) ? "TRUE" : "FALSE");
-
- g_print ("\n");
-
- print_gl_config_attrib (glconfig, "GDK_GL_USE_GL", GDK_GL_USE_GL,
TRUE);
- print_gl_config_attrib (glconfig, "GDK_GL_BUFFER_SIZE",
GDK_GL_BUFFER_SIZE, FALSE);
- print_gl_config_attrib (glconfig, "GDK_GL_LEVEL", GDK_GL_LEVEL,
FALSE);
- print_gl_config_attrib (glconfig, "GDK_GL_RGBA", GDK_GL_RGBA,
TRUE);
- print_gl_config_attrib (glconfig, "GDK_GL_DOUBLEBUFFER",
GDK_GL_DOUBLEBUFFER, TRUE);
- print_gl_config_attrib (glconfig, "GDK_GL_STEREO", GDK_GL_STEREO,
TRUE);
- print_gl_config_attrib (glconfig, "GDK_GL_AUX_BUFFERS",
GDK_GL_AUX_BUFFERS, FALSE);
- print_gl_config_attrib (glconfig, "GDK_GL_RED_SIZE",
GDK_GL_RED_SIZE, FALSE);
- print_gl_config_attrib (glconfig, "GDK_GL_GREEN_SIZE",
GDK_GL_GREEN_SIZE, FALSE);
- print_gl_config_attrib (glconfig, "GDK_GL_BLUE_SIZE",
GDK_GL_BLUE_SIZE, FALSE);
- print_gl_config_attrib (glconfig, "GDK_GL_ALPHA_SIZE",
GDK_GL_ALPHA_SIZE, FALSE);
- print_gl_config_attrib (glconfig, "GDK_GL_DEPTH_SIZE",
GDK_GL_DEPTH_SIZE, FALSE);
- print_gl_config_attrib (glconfig, "GDK_GL_STENCIL_SIZE",
GDK_GL_STENCIL_SIZE, FALSE);
- print_gl_config_attrib (glconfig, "GDK_GL_ACCUM_RED_SIZE",
GDK_GL_ACCUM_RED_SIZE, FALSE);
- print_gl_config_attrib (glconfig, "GDK_GL_ACCUM_GREEN_SIZE",
GDK_GL_ACCUM_GREEN_SIZE, FALSE);
- print_gl_config_attrib (glconfig, "GDK_GL_ACCUM_BLUE_SIZE",
GDK_GL_ACCUM_BLUE_SIZE, FALSE);
- print_gl_config_attrib (glconfig, "GDK_GL_ACCUM_ALPHA_SIZE",
GDK_GL_ACCUM_ALPHA_SIZE, FALSE);
-
- g_print ("\n");
-}
-
-#if 0
-// This is from OpenVRML
-void swap_buffers()
-{
- GtkWidget * const widget = GTK_WIDGET(this->drawing_area);
- GdkGLDrawable * const gl_drawable = gtk_widget_get_gl_drawable(widget);
- gdk_gl_drawable_swap_buffers(gl_drawable);
-}
-
-() throw ()
-{
- if (this->timer) { g_source_remove(timer); }
-}
-
-void post_redraw()
-{
- if (!this->redrawNeeded) {
- this->redrawNeeded = true;
- gtk_widget_queue_draw(GTK_WIDGET(this->drawing_area));
- }
-}
-
-gint
-timeout_callback(const gpointer ptr)
-{
- assert(ptr);
- GtkGLViewer & viewer = *static_cast<GtkGLViewer *>(ptr);
- viewer.timer_update();
- return false;
-}
-
-void
-set_timer(const double t)
-{
- if (!this->timer) {
- this->timer = g_timeout_add(guint(10.0 * (t + 1)),
- GtkFunction(timeout_callback),
- this);
- }
-}
-
-void
-timer_update()
-{
- this->timer = 0;
- this->viewer::update();
-}
-#endif
-
-#if 0
-// This is actually an Xt event handler, not a GTK one.
-
-/// \brief Handle X events
-///
-/// This C function handles events from X, like keyboard events, or
-/// Expose events that we're interested in.
-void
-xt_event_handler(Widget xtwidget, nsPluginInstance *plugin,
- XEvent *xevent, Boolean *b)
-{
- GNASH_REPORT_FUNCTION;
-
- int keycode;
- KeySym keysym;
-#if 0
- SDL_Event sdl_event;
- SDL_keysym sdl_keysym;
-
- // handleKeyPress((SDL_keysym)keysym);
- log_msg("Peep Event returned %d", SDL_PeepEvents(&sdl_event, 1,
SDL_PEEKEVENT,
SDL_USEREVENT|SDL_ACTIVEEVENT|SDL_KEYDOWN|SDL_KEYUP|SDL_MOUSEBUTTONUP|SDL_MOUSEBUTTONDOWN));
-
- if (SDL_PollEvent(&sdl_event)) {
- switch(sdl_event.type) {
- case SDL_ACTIVEEVENT:
- case SDL_VIDEORESIZE:
- case SDL_KEYDOWN:
- /* handle key presses */
- handleKeyPress( &sdl_event.key.keysym );
- break;
- default:
- break;
-
- }
- }
-#endif
-
- switch (xevent->type) {
- case Expose:
- // get rid of all other exposure events
- if (plugin) {
-// if (_glInitialized) {
-// plugin->setGL();
-// #ifdef TEST_GRAPHIC
-// plugin->drawTestScene();
-// plugin->swapBuffers();
-// plugin->freeX();
-// #else
-// gnash::movie_interface *m = gnash::get_current_root();
-// if (m != NULL) {
-// m->display();
-// }
-// #endif
-// log_msg("Drawing GL Scene for expose event!");
-// } else {
- log_msg("GL Surface not initialized yet, ignoring expose
event!");
-// }
- }
- break;
- case ButtonPress:
-// fe.type = FeButtonPress;
- log_msg("Button Press");
- break;
- case ButtonRelease:
- // fe.type = FeButtonRelease;
- log_msg("Button Release");
- break;
- case KeyPress:
- keycode = xevent->xkey.keycode;
- plugin->lockX();
- keysym = XLookupKeysym((XKeyEvent*)xevent, 0);
- log_msg ("%s(%d): Keysym is %s", __PRETTY_FUNCTION__, __LINE__,
- XKeysymToString(keysym));
- plugin->freeX();
-
- switch (keysym) {
- case XK_Up:
- log_msg("Key Up");
- break;
- case XK_Down:
- log_msg("Key Down");
- break;
- case XK_Left:
- log_msg("Key Left");
- break;
- case XK_Right:
- log_msg("Key Right");
- break;
- case XK_Return:
- log_msg("Key Return");
- break;
-
- default:
- break;
- }
- }
-}
-#endif
-
-// end of HAVE_GTK2
-#endif
-
Index: backend/gtksup.h
===================================================================
RCS file: backend/gtksup.h
diff -N backend/gtksup.h
--- backend/gtksup.h 26 Aug 2006 13:09:52 -0000 1.5
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,106 +0,0 @@
-//
-// Copyright (C) 2005, 2006 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 2 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
-//
-// Linking Gnash statically or dynamically with other modules is making
-// a combined work based on Gnash. Thus, the terms and conditions of
-// the GNU General Public License cover the whole combination.
-//
-// In addition, as a special exception, the copyright holders of Gnash give
-// you permission to combine Gnash with free software programs or
-// libraries that are released under the GNU LGPL and/or with Mozilla,
-// so long as the linking with Mozilla, or any variant of Mozilla, is
-// through its standard plug-in interface. You may copy and distribute
-// such a system following the terms of the GNU GPL for Gnash and the
-// licenses of the other code concerned, provided that you include the
-// source code of that other code when and as the GNU GPL requires
-// distribution of source code.
-//
-// Note that people who make modified versions of Gnash are not obligated
-// to grant this special exception for their modified versions; it is
-// their choice whether to do so. The GNU General Public License gives
-// permission to release a modified version without this exception; this
-// exception also makes it possible to release a modified version which
-// carries forward this exception.
-//
-
-// {
-#ifndef __GTKSUP_H__
-#define __GTKSUP_H__
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-// {
-#ifdef USE_GTKGLEXT
-# include <gdk/gdkx.h>
-# include <gtk/gtk.h>
-# include <gtk/gtkgl.h>
-
-#include <gtk/gtk.h>
-
-// void xt_event_handler(Widget xtwidget, gpointer instance,
-// XEvent *xevent, Boolean *b);
-
-extern GdkGLConfig *glconfig;
-extern GdkGLContext *glcontext;
-
-typedef enum {IDLE_MOVIE, PLAY_MOVIE, RESTART_MOVIE, PAUSE_MOVIE, STOP_MOVIE,
STEP_FORWARD, STEP_BACKWARD, JUMP_FORWARD, JUMP_BACKWARD, QUIT_MOVIE}
movie_state_e;
-
-// Gtk popup menu
-void add_menuitems(GtkMenu *popup_menu);
-gboolean default_callback(GtkWidget *widget, GdkEvent *event, gpointer
instance);
-gint popup_handler(GtkWidget *widget, GdkEvent *event);
-void menuitem_restart_callback(GtkMenuItem *menuitem, gpointer instance);
-void menuitem_quit_callback(GtkMenuItem *menuitem, gpointer instance);
-void menuitem_play_callback(GtkMenuItem *menuitem, gpointer instance);
-void menuitem_pause_callback(GtkMenuItem *menuitem, gpointer instance);
-void menuitem_stop_callback(GtkMenuItem *menuitem, gpointer instance);
-void menuitem_step_forward_callback(GtkMenuItem *menuitem, gpointer instance);
-void menuitem_step_backward_callback(GtkMenuItem *menuitem, gpointer instance);
-void menuitem_jump_forward_callback(GtkMenuItem *menuitem, gpointer instance);
-void menuitem_jump_backward_callback(GtkMenuItem *menuitem, gpointer instance);
-
-
-// GtkGLExt utility functions
-void print_gl_config_attrib (GdkGLConfig *glconfig,
- const gchar *attrib_str,
- int attrib, gboolean is_boolean);
-void examine_gl_config_attrib (GdkGLConfig *glconfig);
-
-// GTK Event handlers
-gboolean unrealize_event(GtkWidget *widget, GdkEvent *event, gpointer data);
-gboolean realize_event(GtkWidget *widget, GdkEvent *event, gpointer data);
-gboolean delete_event(GtkWidget *widget, GdkEvent *event, gpointer data);
-gboolean expose_event(GtkWidget *widget, GdkEventExpose *event,
- gpointer data);
-gboolean configure_event(GtkWidget *widget, GdkEventConfigure *event,
- gpointer data);
-gboolean key_press_event(GtkWidget *widget, GdkEventKey *event,
- gpointer data);
-gboolean button_press_event(GtkWidget *widget, GdkEventButton *event,
- gpointer data);
-gboolean button_release_event(GtkWidget *widget, GdkEventButton *event,
- gpointer data);
-gboolean motion_notify_event(GtkWidget *widget, GdkEventMotion *event,
- gpointer data);
-
-
-# endif
-// end of USE_GTKGLEXT }
-
-#endif
-// end of ifndef __GTKSUP_H__ }
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog backend/Makefile.am backend/gna...,
Sandro Santilli <=