* ./Makefile.am: we call pbxbuilder with the explicit target name, because

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.
This commit is contained in:
Sam Hocevar 2003-04-09 17:27:51 +00:00
parent 62ef155640
commit d9ca68f7ab
4 changed files with 73 additions and 6 deletions

View 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

View File

@ -0,0 +1,2 @@
.deps
.dirstamp

33
mozilla/vlc.r Normal file
View File

@ -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", ""
};
};

View 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>
@ -44,12 +49,14 @@
# 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
*****************************************************************************/