]> git.sesse.net Git - vlc/blobdiff - mozilla/vlcshell.cpp
Removes trailing spaces. Removes tabs.
[vlc] / mozilla / vlcshell.cpp
index 1c928310c72884d6ee0786a091e51c7cdbef8088..94df4df8d7cdc7cfd84269a11dca8a52893b447b 100644 (file)
@@ -184,11 +184,11 @@ int16 NPP_HandleEvent( NPP instance, void * event )
                 {
                     if( libvlc_playlist_isplaying(p_vlc, NULL) )
                     {
-                        libvlc_input_t *p_input = libvlc_playlist_get_input(p_vlc, NULL);
-                        if( p_input )
+                        libvlc_media_instance_t *p_md = libvlc_playlist_get_media_instance(p_vlc, NULL);
+                        if( p_md )
                         {
-                            libvlc_toggle_fullscreen(p_input, NULL);
-                            libvlc_input_free(p_input);
+                            libvlc_toggle_fullscreen(p_md, NULL);
+                            libvlc_media_instance_release(p_md);
                         }
                     }
                 }
@@ -214,10 +214,10 @@ int16 NPP_HandleEvent( NPP instance, void * event )
                 {
                     if( libvlc_playlist_isplaying(p_vlc, NULL) )
                     {
-                        libvlc_input_t *p_input = libvlc_playlist_get_input(p_vlc, NULL);
-                        if( p_input )
+                        libvlc_media_instance_t *p_md = libvlc_playlist_get_media_instance(p_vlc, NULL);
+                        if( p_md )
                         {
-                            hasVout = libvlc_input_has_vout(p_input, NULL);
+                            hasVout = libvlc_media_instance_has_vout(p_md, NULL);
                             if( hasVout )
                             {
                                 libvlc_rectangle_t area;
@@ -225,9 +225,9 @@ int16 NPP_HandleEvent( NPP instance, void * event )
                                 area.top = 0;
                                 area.right = npwindow.width;
                                 area.bottom = npwindow.height;
-                                libvlc_video_redraw_rectangle(p_input, &area, NULL);
+                                libvlc_video_redraw_rectangle(p_md, &area, NULL);
                             }
-                            libvlc_input_free(p_input);
+                            libvlc_media_instance_release(p_md);
                         }
                     }
                 }
@@ -460,7 +460,7 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
             UpdateWindow( (HWND)drawable );
         }
     }
-    else if ( curwin->window )
+    else if ( curwin.window )
     {
         /* reset WNDPROC */
         HWND oldwin = (HWND)curwin.window;
@@ -468,7 +468,7 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
         p_plugin->setWindowProc(NULL);
         /* change/set parent */
         libvlc_video_set_parent(p_vlc, 0, NULL);
-        curwin->window = NULL;
+        curwin.window = NULL;
     }
 #endif /* XP_WIN */
 
@@ -476,7 +476,7 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
     if( window && window->window )
     {
         Window  drawable   = (Window) window->window;
-        if( !curwin->window || drawable != (Window)curwin->window )
+        if( !curwin.window || drawable != (Window)curwin.window )
         {
             Display *p_display = ((NPSetWindowCallbackStruct *)window->ws_info)->display;
 
@@ -495,11 +495,11 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
             Redraw( w, (XtPointer)p_plugin, NULL );
         }
     }
-    else if ( curwin->window )
+    else if ( curwin.window )
     {
         /* change/set parent */
         libvlc_video_set_parent(p_vlc, 0, NULL);
-        curwin->window = NULL;
+        curwin.window = NULL;
     }
 #endif /* XP_UNIX */
 
@@ -702,14 +702,14 @@ static LRESULT CALLBACK Manage( HWND p_hwnd, UINT i_msg, WPARAM wpar, LPARAM lpa
             FillRect( hdc, &rect, (HBRUSH)GetStockObject(BLACK_BRUSH) );
             SetTextColor(hdc, RGB(255, 255, 255));
             SetBkColor(hdc, RGB(0, 0, 0));
-            DrawText( hdc, WINDOW_TEXT, strlen(WINDOW_TEXT), &rect, DT_CENTER|DT_VCENTER|DT_SINGLELINE); 
+            DrawText( hdc, WINDOW_TEXT, strlen(WINDOW_TEXT), &rect, DT_CENTER|DT_VCENTER|DT_SINGLELINE);
 
             EndPaint( p_hwnd, &paintstruct );
             return 0L;
         }
         default:
             /* delegate to default handler */
-            return p_plugin->getWindowProc()( p_hwnd, i_msg, wpar, lpar );
+            return CallWindowProc(p_plugin->getWindowProc(), p_hwnd, i_msg, wpar, lpar );
     }
 }
 #endif /* XP_WIN */
@@ -726,19 +726,19 @@ static void Redraw( Widget w, XtPointer closure, XEvent *event )
     XGCValues gcv;
 
     Window  drawable   = (Window) window.window;
-    Display *p_display = ((NPSetWindowCallbackStruct *)window->ws_info)->display;
+    Display *p_display = ((NPSetWindowCallbackStruct *)window.ws_info)->display;
 
     gcv.foreground = BlackPixel( p_display, 0 );
     gc = XCreateGC( p_display, drawable, GCForeground, &gcv );
 
     XFillRectangle( p_display, drawable, gc,
-                    0, 0, window->width, window->height );
+                    0, 0, window.width, window.height );
 
     gcv.foreground = WhitePixel( p_display, 0 );
     XChangeGC( p_display, gc, GCForeground, &gcv );
 
     XDrawString( p_display, drawable, gc,
-                 window->width / 2 - 40, window->height / 2,
+                 window.width / 2 - 40, window.height / 2,
                  WINDOW_TEXT, strlen(WINDOW_TEXT) );
 
     XFreeGC( p_display, gc );
@@ -749,7 +749,7 @@ static void Resize ( Widget w, XtPointer closure, XEvent *event )
     VlcPlugin* p_plugin = reinterpret_cast<VlcPlugin*>(closure);
     const NPWindow& window = p_plugin->getWindow();
     Window  drawable   = (Window) window.window;
-    Display *p_display = ((NPSetWindowCallbackStruct *)window->ws_info)->display;
+    Display *p_display = ((NPSetWindowCallbackStruct *)window.ws_info)->display;
 
     int i_ret;
     Window root_return, parent_return, * children_return;
@@ -768,14 +768,14 @@ static void Resize ( Widget w, XtPointer closure, XEvent *event )
     }
 #endif /* X11_RESIZE_DEBUG */
 
-    if( ! p_plugin->setSize(window->width, window->height) )
+    if( ! p_plugin->setSize(window.width, window.height) )
     {
         /* size already set */
         return;
     }
 
 
-    i_ret = XResizeWindow( p_display, drawable, window->width, window->height );
+    i_ret = XResizeWindow( p_display, drawable, window.width, window.height );
 
 #ifdef X11_RESIZE_DEBUG
     fprintf( stderr,
@@ -807,7 +807,7 @@ static void Resize ( Widget w, XtPointer closure, XEvent *event )
 #endif /* X11_RESIZE_DEBUG */
 
         i_ret = XResizeWindow( p_display, base_window,
-                window->width, window->height );
+                window.width, window.height );
 
 #ifdef X11_RESIZE_DEBUG
         fprintf( stderr,