]> git.sesse.net Git - vlc/commitdiff
* ./Makefile.am: we call pbxbuilder with the explicit target name, because
authorSam Hocevar <sam@videolan.org>
Wed, 9 Apr 2003 17:27:51 +0000 (17:27 +0000)
committerSam Hocevar <sam@videolan.org>
Wed, 9 Apr 2003 17:27:51 +0000 (17:27 +0000)
    we might have an additional target one day, such as vlcplugin :)
  * ./mozilla/vlc.r: OS X specific resource file for an OS X plugin.
  * ./mozilla/vlcshell.cpp: added required OS X functions.

Makefile.am
mozilla/support/.cvsignore [new file with mode: 0644]
mozilla/vlc.r [new file with mode: 0644]
mozilla/vlcshell.cpp

index 2c121c42bb86f99e00e280f49e23ee3a3db1397a..1967fea1c9079d8b76564a4ca8f7e41ab1e70258 100644 (file)
@@ -458,7 +458,7 @@ vlc_app_DATA = VLC.app
 vlc_appdir = $(bindir)
 VLC.app: vlc $(PLUGIN_FILES)
        rm -Rf VLC.app
-       cd extras/MacOSX ; pbxbuild | grep -v '^[ \t]' | grep -v "^$$"
+       cd extras/MacOSX ; pbxbuild -target vlc | grep -v '^\([ \t]\|$$\)'
        cp -r extras/MacOSX/build/vlc.bundle ./VLC.app
        $(INSTALL) -d VLC.app/Contents/MacOS
        $(INSTALL) vlc VLC.app/Contents/MacOS/VLC
diff --git a/mozilla/support/.cvsignore b/mozilla/support/.cvsignore
new file mode 100644 (file)
index 0000000..ec96903
--- /dev/null
@@ -0,0 +1,2 @@
+.deps
+.dirstamp
diff --git a/mozilla/vlc.r b/mozilla/vlc.r
new file mode 100644 (file)
index 0000000..041e892
--- /dev/null
@@ -0,0 +1,33 @@
+/*****************************************************************************
+ * VLC Plugin description for OS X
+ *****************************************************************************/
+
+/* Definitions of system resource types */
+#include <Types.r>
+
+/* The first string in the array is a plugin description,
+ * the second is the plugin name */
+resource 'STR#' (126)
+{
+    {
+        "A VLC test plugin... hope it goes somewhere",
+        "VLC plugin"
+    };
+};
+
+/* A description for each MIME type in resource 128 */
+resource 'STR#' (127)
+{
+    {
+        "Invoke scriptable sample plugin"
+    };
+};
+
+/* A series of pairs of strings... first MIME type, then file extension(s) */
+resource 'STR#' (128,"MIME Type")
+{
+    {
+        "application/vlc-plugin", ""
+    };
+};
+
index d810be118ff8989c2ea3027fbe5f39227f98da9b..ab594092166bf26ca091f4138ef250d1f0574333 100644 (file)
@@ -2,7 +2,7 @@
  * vlcshell.cpp: a VLC plugin for Mozilla
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: vlcshell.cpp,v 1.11 2003/04/09 16:18:36 sam Exp $
+ * $Id: vlcshell.cpp,v 1.12 2003/04/09 17:27:51 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -21,6 +21,9 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
+/* XXX: disable VLC here */
+#define USE_LIBVLC 1
+
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
@@ -28,7 +31,9 @@
 #include <string.h>
 
 /* vlc stuff */
-#include <vlc/vlc.h>
+#ifdef USE_LIBVLC
+#   include <vlc/vlc.h>
+#endif
 
 /* Mozilla stuff */
 #include <npapi.h>
 #   include <X11/StringDefs.h>
 #endif
 
+#ifdef XP_MAC
+    /* Mac OS X stuff */
+#   include <QuickDraw.h>
+#endif
+
 #include "vlcpeer.h"
 #include "vlcplugin.h"
 
-/* XXX: disable VLC */
-#define USE_LIBVLC 1
-
 #if USE_LIBVLC
 #   define WINDOW_TEXT "(no picture)"
 #else
@@ -163,6 +170,31 @@ NPError NPP_GetValue( NPP instance, NPPVariable variable, void *value )
     return NPERR_NO_ERROR;
 }
 
+/******************************************************************************
+ * Mac-only API calls
+ *****************************************************************************/
+#ifdef XP_MAC
+int16 NPP_HandleEvent( NPP instance, void * event )
+{
+    if( instance == NULL )
+    {
+        return false;
+    }
+
+    Boolean eventHandled = false;
+
+#if 0
+    TPlugin *pPlugin = (TPlugin*)instance->pdata;
+    if( pPlugin != NULL && event != NULL )
+    {
+        eventHandled = pPlugin->HandleEvent( *(EventRecord*)event );
+    }
+#endif
+
+    return eventHandled;
+}
+#endif
+
 /******************************************************************************
  * General Plug-in Calls
  *****************************************************************************/