Commit b25aa5bf authored by JP Dinger's avatar JP Dinger

Replace #if XP_SYMBOL with #if defined(XP_SYMBOL) for consistency.

parent 2819748e
...@@ -54,10 +54,10 @@ VlcPlugin::VlcPlugin( NPP instance, uint16 mode ) : ...@@ -54,10 +54,10 @@ VlcPlugin::VlcPlugin( NPP instance, uint16 mode ) :
p_scriptClass(NULL), p_scriptClass(NULL),
p_browser(instance), p_browser(instance),
psz_baseURL(NULL) psz_baseURL(NULL)
#if XP_WIN #if defined(XP_WIN)
,pf_wndproc(NULL) ,pf_wndproc(NULL)
#endif #endif
#if XP_UNIX #if defined(XP_UNIX)
,i_width((unsigned)-1) ,i_width((unsigned)-1)
,i_height((unsigned)-1) ,i_height((unsigned)-1)
,i_tb_width(0) ,i_tb_width(0)
...@@ -74,7 +74,7 @@ VlcPlugin::VlcPlugin( NPP instance, uint16 mode ) : ...@@ -74,7 +74,7 @@ VlcPlugin::VlcPlugin( NPP instance, uint16 mode ) :
#endif #endif
{ {
memset(&npwindow, 0, sizeof(NPWindow)); memset(&npwindow, 0, sizeof(NPWindow));
#if XP_UNIX #if defined(XP_UNIX)
memset(&npvideo, 0, sizeof(Window)); memset(&npvideo, 0, sizeof(Window));
memset(&npcontrol, 0, sizeof(Window)); memset(&npcontrol, 0, sizeof(Window));
#endif #endif
...@@ -586,7 +586,7 @@ relativeurl: ...@@ -586,7 +586,7 @@ relativeurl:
return NULL; return NULL;
} }
#if XP_UNIX #if defined(XP_UNIX)
int VlcPlugin::setSize(unsigned width, unsigned height) int VlcPlugin::setSize(unsigned width, unsigned height)
{ {
int diff = (width != i_width) || (height != i_height); int diff = (width != i_width) || (height != i_height);
......
...@@ -108,14 +108,14 @@ public: ...@@ -108,14 +108,14 @@ public:
NPClass* getScriptClass() NPClass* getScriptClass()
{ return p_scriptClass; }; { return p_scriptClass; };
#if XP_WIN #if defined(XP_WIN)
WNDPROC getWindowProc() WNDPROC getWindowProc()
{ return pf_wndproc; }; { return pf_wndproc; };
void setWindowProc(WNDPROC wndproc) void setWindowProc(WNDPROC wndproc)
{ pf_wndproc = wndproc; }; { pf_wndproc = wndproc; };
#endif #endif
#if XP_UNIX #if defined(XP_UNIX)
int setSize(unsigned width, unsigned height); int setSize(unsigned width, unsigned height);
Window getVideoWindow() Window getVideoWindow()
{ return npvideo; }; { return npvideo; };
...@@ -214,10 +214,10 @@ private: ...@@ -214,10 +214,10 @@ private:
/* display settings */ /* display settings */
NPWindow npwindow; NPWindow npwindow;
#if XP_WIN #if defined(XP_WIN)
WNDPROC pf_wndproc; WNDPROC pf_wndproc;
#endif #endif
#if XP_UNIX #if defined(XP_UNIX)
unsigned int i_width, i_height; unsigned int i_width, i_height;
unsigned int i_tb_width, i_tb_height; unsigned int i_tb_width, i_tb_height;
Window npvideo, npcontrol; Window npvideo, npcontrol;
......
...@@ -330,7 +330,7 @@ NPError NPP_Destroy( NPP instance, NPSavedData** save ) ...@@ -330,7 +330,7 @@ NPError NPP_Destroy( NPP instance, NPSavedData** save )
instance->pdata = NULL; instance->pdata = NULL;
#if XP_WIN #if defined(XP_WIN)
HWND win = (HWND)p_plugin->getWindow().window; HWND win = (HWND)p_plugin->getWindow().window;
WNDPROC winproc = p_plugin->getWindowProc(); WNDPROC winproc = p_plugin->getWindowProc();
if( winproc ) if( winproc )
...@@ -723,7 +723,7 @@ void NPP_Print( NPP instance, NPPrint* printInfo ) ...@@ -723,7 +723,7 @@ void NPP_Print( NPP instance, NPPrint* printInfo )
/****************************************************************************** /******************************************************************************
* Windows-only methods * Windows-only methods
*****************************************************************************/ *****************************************************************************/
#if XP_WIN #if defined(XP_WIN)
static LRESULT CALLBACK Manage( HWND p_hwnd, UINT i_msg, WPARAM wpar, LPARAM lpar ) static LRESULT CALLBACK Manage( HWND p_hwnd, UINT i_msg, WPARAM wpar, LPARAM lpar )
{ {
VlcPlugin* p_plugin = reinterpret_cast<VlcPlugin*>(GetWindowLongPtr(p_hwnd, GWLP_USERDATA)); VlcPlugin* p_plugin = reinterpret_cast<VlcPlugin*>(GetWindowLongPtr(p_hwnd, GWLP_USERDATA));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment