]> git.saurik.com Git - wxWidgets.git/commitdiff
Various source cleanings.
authorWłodzimierz Skiba <abx@abx.art.pl>
Wed, 9 Nov 2005 20:14:39 +0000 (20:14 +0000)
committerWłodzimierz Skiba <abx@abx.art.pl>
Wed, 9 Nov 2005 20:14:39 +0000 (20:14 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36142 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

20 files changed:
src/cocoa/mediactrl.mm
src/cocoa/settings.mm
src/common/list.cpp
src/common/wincmn.cpp
src/common/xtistrm.cpp
src/motif/gauge.cpp
src/motif/msgdlg.cpp
src/msw/gsockmsw.cpp
src/msw/mediactrl.cpp
src/msw/menu.cpp
src/msw/notebook.cpp
src/msw/urlmsw.cpp
src/os2/helpwin.cpp
src/os2/iniconf.cpp
src/os2/joystick.cpp
src/os2/slider.cpp
src/palmos/menu.cpp
src/palmos/notebook.cpp
src/unix/mediactrl.cpp
src/unix/utilsx11.cpp

index fa0ebb15b027f4ad420e2095850f52a5a37048e9..e6cc52cb9b14fcac2072ecf426181aef088ce13d 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        mac/cocoa/mediactrl.cpp
+// Name:        src/cocoa/mediactrl.cpp
 // Purpose:     Built-in Media Backends for Cocoa
 // Author:      Ryan Norton <wxprojects@comcast.net>
 // Modified by:
@@ -64,11 +64,11 @@ public:
     wxQTMediaBackend();
     ~wxQTMediaBackend();
 
-    virtual bool CreateControl(wxControl* ctrl, wxWindow* parent, 
+    virtual bool CreateControl(wxControl* ctrl, wxWindow* parent,
                                      wxWindowID id,
-                                     const wxPoint& pos, 
+                                     const wxPoint& pos,
                                      const wxSize& size,
-                                     long style, 
+                                     long style,
                                      const wxValidator& validator,
                                      const wxString& name);
 
@@ -95,7 +95,7 @@ public:
     void FinishLoad();
 
     wxSize m_bestSize;              //Original movie size
-    Movie m_movie;                             //QT Movie handle/instance
+    Movie m_movie;                  //QT Movie handle/instance
     NSMovieView* m_movieview;       //NSMovieView instance
     wxControl* m_ctrl;              //Parent control
     bool m_bVideo;                  //Whether or not we have video
@@ -108,7 +108,7 @@ public:
 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 //
 // wxQTMediaBackend
-// 
+//
 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
 IMPLEMENT_DYNAMIC_CLASS(wxQTMediaBackend, wxMediaBackend);
@@ -147,10 +147,10 @@ public:
         if (!m_bPaused)
         {
             if(!IsMovieDone(m_movie))
-                MoviesTask(m_movie, MOVIE_DELAY); 
+                MoviesTask(m_movie, MOVIE_DELAY);
             else
             {
-                wxMediaEvent theEvent(wxEVT_MEDIA_STOP, 
+                wxMediaEvent theEvent(wxEVT_MEDIA_STOP,
                                       m_parent->m_ctrl->GetId());
                 m_parent->m_ctrl->ProcessEvent(theEvent);
 
@@ -161,7 +161,7 @@ public:
                     wxASSERT(::GetMoviesError() == noErr);
 
                     //send the event to our child
-                    wxMediaEvent theEvent(wxEVT_MEDIA_FINISHED, 
+                    wxMediaEvent theEvent(wxEVT_MEDIA_FINISHED,
                                           m_parent->m_ctrl->GetId());
                     m_parent->m_ctrl->ProcessEvent(theEvent);
                 }
@@ -208,21 +208,21 @@ wxQTMediaBackend::~wxQTMediaBackend()
 // 1) Intializes QuickTime
 // 2) Creates the control window
 //---------------------------------------------------------------------------
-bool wxQTMediaBackend::CreateControl(wxControl* inctrl, wxWindow* parent, 
+bool wxQTMediaBackend::CreateControl(wxControl* inctrl, wxWindow* parent,
                                      wxWindowID wid,
-                                     const wxPoint& pos, 
+                                     const wxPoint& pos,
                                      const wxSize& size,
-                                     long style, 
+                                     long style,
                                      const wxValidator& validator,
                                      const wxString& name)
 {
     EnterMovies();
-    
+
     wxMediaCtrl* ctrl = (wxMediaCtrl*) inctrl;
 
     //Create the control base
     wxASSERT(ctrl->CreateBase(parent,wid,pos,size,style, validator, name));
-    
+
     //Create the NSMovieView
     ctrl->SetNSView(NULL);
     NSMovieView* theView = [[NSMovieView alloc] initWithFrame: ctrl->MakeDefaultNSRect(size)];
@@ -251,7 +251,7 @@ bool wxQTMediaBackend::Load(const wxString& fileName)
 {
     return Load(
                 wxURI(
-                    wxString( wxT("file://") ) + fileName 
+                    wxString( wxT("file://") ) + fileName
                      )
                );
 }
@@ -371,7 +371,7 @@ bool wxQTMediaBackend::Stop()
     ::StopMovie(m_movie);
     if(::GetMoviesError() != noErr)
         return false;
-    
+
     ::GoToBeginningOfMovie(m_movie);
     return ::GetMoviesError() == noErr;
 }
@@ -446,7 +446,7 @@ wxLongLong wxQTMediaBackend::GetDuration()
 //---------------------------------------------------------------------------
 wxMediaState wxQTMediaBackend::GetState()
 {
-    if ( !m_timer || (m_timer->IsRunning() == false && 
+    if ( !m_timer || (m_timer->IsRunning() == false &&
                       m_timer->GetPaused() == false) )
         return wxMEDIASTATE_STOPPED;
 
@@ -492,7 +492,7 @@ void wxQTMediaBackend::Move(int x, int y, int w, int h)
 
 
 //in source file that contains stuff you don't directly use
-#include <wx/html/forcelnk.h>
+#include "wx/html/forcelnk.h"
 FORCE_LINK_ME(basewxmediabackends);
 
 #endif //wxUSE_MEDIACTRL
index 168ab4884c4f67d66f57b81ddf7189b5cd4538bd..e6adf7446b10bde860d5dc02120183e48a6fe335 100644 (file)
@@ -9,7 +9,7 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#include <wx/wxprec.h>
+#include "wx/wxprec.h"
 #ifndef WX_PRECOMP
 #endif
 
@@ -125,7 +125,7 @@ wxFont wxSystemSettingsNative::GetFont(wxSystemFont index)
                 return *wxNORMAL_FONT ;
                     } ;
             break ;
-                
+
     }
     return *wxNORMAL_FONT;
 }
@@ -141,7 +141,7 @@ int wxSystemSettingsNative::GetMetric(wxSystemMetric index, wxWindow *WXUNUSED(w
     {
         case wxSYS_MOUSE_BUTTONS:
                     return 2; // we emulate a two button mouse (ctrl + click = right button )
-                    
+
         // TODO case wxSYS_BORDER_X:
         // TODO case wxSYS_BORDER_Y:
         // TODO case wxSYS_CURSOR_X:
@@ -159,7 +159,7 @@ int wxSystemSettingsNative::GetMetric(wxSystemMetric index, wxWindow *WXUNUSED(w
             return 16;
         case wxSYS_HTHUMB_X:
             return 16;
-            
+
         // TODO case wxSYS_ICON_X:
         // TODO case wxSYS_ICON_Y:
         // TODO case wxSYS_ICONSPACING_X:
@@ -172,7 +172,7 @@ int wxSystemSettingsNative::GetMetric(wxSystemMetric index, wxWindow *WXUNUSED(w
         // TODO case wxSYS_FRAMESIZE_Y:
         // TODO case wxSYS_SMALLICON_X:
         // TODO case wxSYS_SMALLICON_Y:
-            
+
         case wxSYS_HSCROLL_Y:
             return 16;
         case wxSYS_VSCROLL_X:
@@ -183,19 +183,19 @@ int wxSystemSettingsNative::GetMetric(wxSystemMetric index, wxWindow *WXUNUSED(w
             return 16;
         case wxSYS_VTHUMB_Y:
             return 16;
-            
+
         // TODO case wxSYS_CAPTION_Y:
         // TODO case wxSYS_MENU_Y:
         // TODO case wxSYS_NETWORK_PRESENT:
-            
+
         case wxSYS_PENWINDOWS_PRESENT:
             return 0;
-            
+
         // TODO case wxSYS_SHOW_SOUNDS:
 
         case wxSYS_SWAP_BUTTONS:
             return 0;
-            
+
         default:
             return -1;  // unsupported metric
     }
@@ -206,11 +206,11 @@ bool wxSystemSettingsNative::HasFeature(wxSystemFeature index)
 {
     switch (index)
     {
-        case wxSYS_CAN_ICONIZE_FRAME: 
+        case wxSYS_CAN_ICONIZE_FRAME:
         case wxSYS_CAN_DRAW_FRAME_DECORATIONS:
-            return TRUE;
-            
+            return true;
+
         default:
-            return FALSE;
+            return false;
     }
 }
index 42368c0e512aeee8ec2c52ec8e73e1a69fa373fa..398627b6c067477630f8aa25c4c29b5f358ee93d 100644 (file)
@@ -1,5 +1,5 @@
 ////////////////////////////////////////////////////////////////////////////////
-// Name:        list.cpp
+// Name:        src/common/list.cpp
 // Purpose:     wxList implementation
 // Author:      Julian Smart
 // Modified by: VZ at 16/11/98: WX_DECLARE_LIST() and typesafe lists added
@@ -754,7 +754,7 @@ wxNode *wxStringList::Prepend(const wxChar *s)
 
 #else // wxUSE_STL = 1
 
-    #include <wx/listimpl.cpp>
+    #include "wx/listimpl.cpp"
     WX_DEFINE_LIST(wxObjectList);
 
 // with wxUSE_STL wxStringList contains wxString objects, not pointers
@@ -763,4 +763,3 @@ void wxStringListBase::DeleteFunction( const wxString WXUNUSED(X) )
 }
 
 #endif // !wxUSE_STL
-
index 7a1e6e85774ce0cc5cae664560bb279b1ac936e1..81eb2b57613c0c2d916e3578afe1b3a9f259908d 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        common/window.cpp
+// Name:        src/common/window.cpp
 // Purpose:     common (to all ports) wxWindow functions
 // Author:      Julian Smart, Vadim Zeitlin
 // Modified by:
@@ -2346,7 +2346,7 @@ wxAccessible* wxWindowBase::CreateAccessible()
 
 #if wxUSE_STL
 
-#include <wx/listimpl.cpp>
+#include "wx/listimpl.cpp"
 WX_DEFINE_LIST(wxWindowList);
 
 #else
index 1f12cee312a5d1d5d9866a72b740047b99967b72..016305e74c530a8a0d3c54aa0641d546278e5336 100644 (file)
@@ -840,7 +840,7 @@ void wxCodeDepersister::SetConnect(int eventSourceObjectID,
     }
 }
 
-#include <wx/arrimpl.cpp>
+#include "wx/arrimpl.cpp"
 
 WX_DEFINE_OBJARRAY(wxxVariantArray);
 
index 268e733f16b0d20c97c926b5353d82215a1cbe6c..dbb5a2495e4a4712f6a169faf8c8cf86990dee93 100644 (file)
@@ -13,7 +13,7 @@
 #include "wx/wxprec.h"
 
 #ifdef __VMS
-#include <wx/vms_x_fix.h>
+#include "wx/vms_x_fix.h"
 #undef XtDisplay
 #undef XtScreen
 #undef XtWindow
@@ -140,8 +140,8 @@ bool wxGauge::Create(wxWindow *parent, wxWindowID id,
 
     int x = pos.x; int y = pos.y;
     wxSize best = GetBestSize();
-    if( size.x != -1 ) best.x = size.x;
-    if( size.y != -1 ) best.y = size.y;
+    if( size.x != wxDefaultCoord ) best.x = size.x;
+    if( size.y != wxDefaultCoord ) best.y = size.y;
 
     ChangeFont(false);
 
index 93e95ecf6167e9e8d6bf82afe9dc98fdc0dcfe65..f51da838f19b7faf09e604adef42d9edcc939939 100644 (file)
@@ -25,7 +25,7 @@
 #ifdef __VMS
 #define XtDisplay XTDISPLAY
 #pragma message disable nosimpint
-#include <wx/vms_x_fix.h>
+#include "wx/vms_x_fix.h"
 #endif
 #include <X11/Xlib.h>
 
@@ -267,4 +267,3 @@ int wxMessageDialog::ShowModal()
 
     return m_result;
 }
-
index c7247e249e519a464664db90c15041c72eed6adf..a9fad98e50df4bb6f0f621ca5b14ecb56d3f917f 100644 (file)
@@ -1,6 +1,6 @@
 /* -------------------------------------------------------------------------
  * Project:     GSocket (Generic Socket)
- * Name:        gsockmsw.cpp
+ * Name:        src/msw/gsockmsw.cpp
  * Copyright:   (c) Guilhem Lavaux
  * Licence:     wxWindows Licence
  * Author:      Guillermo Rodriguez Garcia <guille@iies.es>
@@ -85,7 +85,7 @@ extern HINSTANCE hInst;
 #define assert(x)
 #include <winsock.h>
 #include "wx/msw/wince/net.h"
-#include <wx/hashmap.h>
+#include "wx/hashmap.h"
 WX_DECLARE_HASH_MAP(int,bool,wxIntegerHash,wxIntegerEqual,SocketHash);
 #endif
 
@@ -154,10 +154,10 @@ static WSAEnumNetworkEventsFunc gs_WSAEnumNetworkEvents = NULL;
 /* This structure will be used to pass data on to the thread that handles socket events.
 */
 typedef struct thread_data{
-       HWND hEvtWin;
-       unsigned long msgnumber;
-       unsigned long fd;
-       unsigned long lEvent;
+    HWND hEvtWin;
+    unsigned long msgnumber;
+    unsigned long fd;
+    unsigned long lEvent;
 }thread_data;
 #endif
 
@@ -171,43 +171,43 @@ static HMODULE gs_wsock32dll = 0;
 */
 DWORD WINAPI SocketThread(LPVOID data)
 {
-       WSANETWORKEVENTS NetworkEvents;
-       thread_data* d = (thread_data *)data;
-
-       HANDLE  NetworkEvent = gs_WSACreateEvent();
-       gs_WSAEventSelect(d->fd, NetworkEvent, d->lEvent);
-
-       while(socketHash[d->fd] == true)
-       {
-               if ((gs_WSAWaitForMultipleEvents(1, &NetworkEvent, FALSE,INFINITE, FALSE)) == WAIT_FAILED)
-               {
-                        printf("WSAWaitForMultipleEvents failed with error %d\n", WSAGetLastError());
-                return 0;
-               }
-               if (gs_WSAEnumNetworkEvents(d->fd ,NetworkEvent, &NetworkEvents) == SOCKET_ERROR)
-               {
-                        printf("WSAEnumNetworkEvents failed with error %d\n", WSAGetLastError());
-                        return 0;
-               }
-               
-               long flags = NetworkEvents.lNetworkEvents;
-               if (flags & FD_READ)
-                       ::PostMessage(d->hEvtWin, d->msgnumber,d->fd, FD_READ);
-               if (flags & FD_WRITE)
-                       ::PostMessage(d->hEvtWin, d->msgnumber,d->fd, FD_WRITE);
-               if (flags & FD_OOB)
-                       ::PostMessage(d->hEvtWin, d->msgnumber,d->fd, FD_OOB);
-               if (flags & FD_ACCEPT)
-                       ::PostMessage(d->hEvtWin, d->msgnumber,d->fd, FD_ACCEPT);
-               if (flags & FD_CONNECT)
-                       ::PostMessage(d->hEvtWin, d->msgnumber,d->fd, FD_CONNECT);
-               if (flags & FD_CLOSE)
-                       ::PostMessage(d->hEvtWin, d->msgnumber,d->fd, FD_CLOSE);
-               
-       }
-       gs_WSAEventSelect(d->fd, NetworkEvent, 0);
-       ExitThread(0);
-       return 0;
+    WSANETWORKEVENTS NetworkEvents;
+    thread_data* d = (thread_data *)data;
+
+    HANDLE NetworkEvent = gs_WSACreateEvent();
+    gs_WSAEventSelect(d->fd, NetworkEvent, d->lEvent);
+
+    while(socketHash[d->fd] == true)
+    {
+        if ((gs_WSAWaitForMultipleEvents(1, &NetworkEvent, FALSE,INFINITE, FALSE)) == WAIT_FAILED)
+        {
+            printf("WSAWaitForMultipleEvents failed with error %d\n", WSAGetLastError());
+            return 0;
+        }
+        if (gs_WSAEnumNetworkEvents(d->fd ,NetworkEvent, &NetworkEvents) == SOCKET_ERROR)
+        {
+            printf("WSAEnumNetworkEvents failed with error %d\n", WSAGetLastError());
+            return 0;
+        }
+
+        long flags = NetworkEvents.lNetworkEvents;
+        if (flags & FD_READ)
+            ::PostMessage(d->hEvtWin, d->msgnumber,d->fd, FD_READ);
+        if (flags & FD_WRITE)
+            ::PostMessage(d->hEvtWin, d->msgnumber,d->fd, FD_WRITE);
+        if (flags & FD_OOB)
+            ::PostMessage(d->hEvtWin, d->msgnumber,d->fd, FD_OOB);
+        if (flags & FD_ACCEPT)
+            ::PostMessage(d->hEvtWin, d->msgnumber,d->fd, FD_ACCEPT);
+        if (flags & FD_CONNECT)
+            ::PostMessage(d->hEvtWin, d->msgnumber,d->fd, FD_CONNECT);
+        if (flags & FD_CLOSE)
+            ::PostMessage(d->hEvtWin, d->msgnumber,d->fd, FD_CLOSE);
+
+    }
+    gs_WSAEventSelect(d->fd, NetworkEvent, 0);
+    ExitThread(0);
+    return 0;
 }
 #endif
 
@@ -252,7 +252,7 @@ bool GSocketGUIFunctionsTableConcrete::OnInit()
 #else
 /*  On WinCE we load ws2.dll which will provide the needed functions.
 */
-       gs_wsock32dll = LoadLibrary(wxT("ws2.dll"));
+  gs_wsock32dll = LoadLibrary(wxT("ws2.dll"));
   if (!gs_wsock32dll)
       return false;
   gs_WSAEventSelect =(WSAEventSelectFunc)GetProcAddress(gs_wsock32dll,
@@ -261,23 +261,23 @@ bool GSocketGUIFunctionsTableConcrete::OnInit()
       return false;
 
   gs_WSACreateEvent =(WSACreateEventFunc)GetProcAddress(gs_wsock32dll,
-                                                                                                               wxT("WSACreateEvent"));
+                                                        wxT("WSACreateEvent"));
   if (!gs_WSACreateEvent)
       return false;
 
   gs_WSAWaitForMultipleEvents =(WSAWaitForMultipleEventsFunc)GetProcAddress(gs_wsock32dll,
-                                                                                                               wxT("WSAWaitForMultipleEvents"));
+                                                                            wxT("WSAWaitForMultipleEvents"));
   if (!gs_WSAWaitForMultipleEvents)
       return false;
 
   gs_WSAEnumNetworkEvents =(WSAEnumNetworkEventsFunc)GetProcAddress(gs_wsock32dll,
-                                                                                                               wxT("WSAEnumNetworkEvents"));
+                                                                    wxT("WSAEnumNetworkEvents"));
   if (!gs_WSAEnumNetworkEvents)
       return false;
 
   currSocket = 0;
 #endif
+
   return true;
 }
 
@@ -285,8 +285,8 @@ void GSocketGUIFunctionsTableConcrete::OnExit()
 {
 #ifdef __WXWINCE__
 /* Delete the threads here */
-       for(unsigned int i=0; i < currSocket; i++)
-               CloseHandle(hThread[i]);
+    for(unsigned int i=0; i < currSocket; i++)
+        CloseHandle(hThread[i]);
 #endif
   /* Destroy internal window */
   DestroyWindow(hWin);
@@ -435,13 +435,13 @@ void GSocketGUIFunctionsTableConcrete::Enable_Events(GSocket *socket)
 *  All needed parameters get passed through the thread_data structure.
 */
 
-       thread_data* d = new thread_data;
-       d->lEvent = lEvent;
-       d->hEvtWin = hWin;
-       d->msgnumber = socket->m_msgnumber;
-       d->fd = socket->m_fd;
-       socketHash[socket->m_fd] = true;
-       hThread[currSocket++] = CreateThread(NULL, 0, &SocketThread,(LPVOID)d, 0, NULL);
+    thread_data* d = new thread_data;
+    d->lEvent = lEvent;
+    d->hEvtWin = hWin;
+    d->msgnumber = socket->m_msgnumber;
+    d->fd = socket->m_fd;
+    socketHash[socket->m_fd] = true;
+    hThread[currSocket++] = CreateThread(NULL, 0, &SocketThread,(LPVOID)d, 0, NULL);
 #endif
   }
 }
@@ -458,8 +458,8 @@ void GSocketGUIFunctionsTableConcrete::Disable_Events(GSocket *socket)
 #ifndef __WXWINCE__
     gs_WSAAsyncSelect(socket->m_fd, hWin, socket->m_msgnumber, 0);
 #else
-       //Destroy the thread
-       socketHash[socket->m_fd] = false;
+    //Destroy the thread
+    socketHash[socket->m_fd] = false;
 #endif
   }
 }
index 6098efa556e36537df94b2816ef23ad4f8dff112..3e05af987442d5ef230aff68d01189aae54bd779 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        msw/mediactrl.cpp
+// Name:        src/msw/mediactrl.cpp
 // Purpose:     Built-in Media Backends for Windows
 // Author:      Ryan Norton <wxprojects@comcast.net>
 // Modified by:
@@ -161,23 +161,23 @@ struct IMediaEvent : public IDispatch
 
 enum ReadyStateConstants
 {
-    amvUninitialized    = 0,
-    amvLoading    = 1,
+    amvUninitialized  = 0,
+    amvLoading        = 1,
     amvInteractive    = 3,
-    amvComplete    = 4
+    amvComplete       = 4
 };
 
 enum StateConstants
 {
     amvNotLoaded    = -1,
-    amvStopped    = 0,
-    amvPaused    = 1,
-    amvRunning    = 2
+    amvStopped      = 0,
+    amvPaused       = 1,
+    amvRunning      = 2
 };
 
 enum DisplayModeConstants
 {
-    amvTime    = 0,
+    amvTime      = 0,
     amvFrames    = 1
 };
 
@@ -1350,7 +1350,7 @@ public:
         m_hwnd = hwnd;
 
         m_qtb->m_ctrl->Connect(m_qtb->m_ctrl->GetId(),
-            wxEVT_ERASE_BACKGROUND, 
+            wxEVT_ERASE_BACKGROUND,
             wxEraseEventHandler(wxQTMediaEvtHandler::OnEraseBackground),
             NULL, this
                               );
@@ -3536,12 +3536,10 @@ void wxQTMediaEvtHandler::OnEraseBackground(wxEraseEvent& evt)
 //---------------------------------------------------------------------------
 
 //in source file that contains stuff you don't directly use
-#include <wx/html/forcelnk.h>
+#include "wx/html/forcelnk.h"
 FORCE_LINK_ME(basewxmediabackends);
 
 //---------------------------------------------------------------------------
 //  End wxMediaCtrl Compilation Guard and this file
 //---------------------------------------------------------------------------
 #endif //wxUSE_MEDIACTRL
-
-
index f0069e6407f8da70efa957b571437b28426234fb..a4928f0a0c5b557d3213c77558518f978a4d751d 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        menu.cpp
+// Name:        src/msw/menu.cpp
 // Purpose:     wxMenu, wxMenuBar, wxMenuItem
 // Author:      Julian Smart
 // Modified by: Vadim Zeitlin
@@ -120,7 +120,7 @@ UINT GetMenuState(HMENU hMenu, UINT id, UINT flags)
 // implementation
 // ============================================================================
 
-#include <wx/listimpl.cpp>
+#include "wx/listimpl.cpp"
 
 WX_DEFINE_LIST( wxMenuInfoList )
 
@@ -697,7 +697,7 @@ void wxMenu::SetTitle(const wxString& label)
             info.cbSize = sizeof(info);
             info.fMask = MIIM_TYPE;
             info.fType = MFT_STRING;
-            info.cch = m_title.Length();
+            info.cch = m_title.length();
             info.dwTypeData = (LPTSTR) m_title.c_str();
             if ( !SetMenuItemInfo(hMenu, 0, TRUE, & info) )
             {
@@ -1005,7 +1005,7 @@ void wxMenuBar::SetLabelTop(size_t pos, const wxString& label)
     info.cbSize = sizeof(info);
     info.fMask = MIIM_TYPE;
     info.fType = MFT_STRING;
-    info.cch = label.Length();
+    info.cch = label.length();
     info.dwTypeData = (LPTSTR) label.c_str();
     if ( !SetMenuItemInfo(GetHmenu(), id, TRUE, & info) )
     {
index 1d8d4501042f7dcba9886f4410f72ee93c8570f4..d154922009044ee6191e78abb4a30f4e4cf2a7e0 100644 (file)
@@ -103,7 +103,7 @@ LRESULT APIENTRY _EXPORT wxNotebookWndProc(HWND hwnd,
 // event table
 // ----------------------------------------------------------------------------
 
-#include <wx/listimpl.cpp>
+#include "wx/listimpl.cpp"
 
 WX_DEFINE_LIST( wxNotebookPageInfoList )
 
@@ -111,7 +111,7 @@ DEFINE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED)
 DEFINE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING)
 
 BEGIN_EVENT_TABLE(wxNotebook, wxControl)
-    EVT_NOTEBOOK_PAGE_CHANGED(-1, wxNotebook::OnSelChange)
+    EVT_NOTEBOOK_PAGE_CHANGED(wxID_ANY, wxNotebook::OnSelChange)
     EVT_SIZE(wxNotebook::OnSize)
     EVT_NAVIGATION_KEY(wxNotebook::OnNavigationKey)
 
@@ -229,15 +229,15 @@ const wxNotebookPageInfoList& wxNotebook::GetPageInfos() const
 // common part of all ctors
 void wxNotebook::Init()
 {
-  m_imageList = NULL;
-  m_nSelection = -1;
+    m_imageList = NULL;
+    m_nSelection = -1;
 
 #if wxUSE_UXTHEME
-  m_hbrBackground = NULL;
+    m_hbrBackground = NULL;
 #endif // wxUSE_UXTHEME
 
 #if USE_NOTEBOOK_ANTIFLICKER
-  m_hasSubclassedUpdown = false;
+    m_hasSubclassedUpdown = false;
 #endif // USE_NOTEBOOK_ANTIFLICKER
 }
 
@@ -472,12 +472,12 @@ wxString wxNotebook::GetPageText(size_t nPage) const
 
 int wxNotebook::GetPageImage(size_t nPage) const
 {
-  wxCHECK_MSG( IS_VALID_PAGE(nPage), -1, wxT("notebook page out of range") );
+  wxCHECK_MSG( IS_VALID_PAGE(nPage), wxNOT_FOUND, wxT("notebook page out of range") );
 
   TC_ITEM tcItem;
   tcItem.mask = TCIF_IMAGE;
 
-  return TabCtrl_GetItem(GetHwnd(), nPage, &tcItem) ? tcItem.iImage : -1;
+  return TabCtrl_GetItem(GetHwnd(), nPage, &tcItem) ? tcItem.iImage : wxNOT_FOUND;
 }
 
 bool wxNotebook::SetPageImage(size_t nPage, int nImage)
@@ -650,19 +650,19 @@ wxNotebookPage *wxNotebook::DoRemovePage(size_t nPage)
 // remove all pages
 bool wxNotebook::DeleteAllPages()
 {
-  size_t nPageCount = GetPageCount();
-  size_t nPage;
-  for ( nPage = 0; nPage < nPageCount; nPage++ )
-    delete m_pages[nPage];
+    size_t nPageCount = GetPageCount();
+    size_t nPage;
+    for ( nPage = 0; nPage < nPageCount; nPage++ )
+        delete m_pages[nPage];
 
-  m_pages.Clear();
+    m_pages.Clear();
 
-  TabCtrl_DeleteAllItems(GetHwnd());
+    TabCtrl_DeleteAllItems(GetHwnd());
 
-  m_nSelection = -1;
+    m_nSelection = -1;
 
-  InvalidateBestSize();
-  return true;
+    InvalidateBestSize();
+    return true;
 }
 
 // same as AddPage() but does it at given position
index 5b1611561547eacba74259ae76f55c76612ec019..6df72c6583538924aa69fceadb504a49ad4dee26 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        msw/urlmsw.cpp
+// Name:        src/msw/urlmsw.cpp
 // Purpose:     MS-Windows native URL support based on WinINet
 // Author:      Hajo Kirchhoff
 // Modified by:
@@ -19,7 +19,7 @@
 #if wxUSE_URL_NATIVE
 
 #if !wxUSE_PROTOCOL_HTTP
-#include <wx/protocol/protocol.h>
+#include "wx/protocol/protocol.h"
 
 // empty http protocol replacement (for now)
 // so that wxUSE_URL_NATIVE can be used with
@@ -48,7 +48,7 @@ protected:
 // the only "reason for being" for this class is to tell
 // wxURL that there is someone dealing with the http protocol
 IMPLEMENT_DYNAMIC_CLASS(wxHTTPDummyProto, wxProtocol)
-IMPLEMENT_PROTOCOL(wxHTTPDummyProto, wxT("http"), NULL, FALSE)
+IMPLEMENT_PROTOCOL(wxHTTPDummyProto, wxT("http"), NULL, false)
 USE_PROTOCOL(wxHTTPDummyProto)
 
 #endif // !wxUSE_PROTOCOL_HTTP
@@ -230,4 +230,3 @@ wxInputStream *wxWinINetURL::GetInputStream(wxURL *owner)
 }
 
 #endif // wxUSE_URL_NATIVE
-
index 32e74144015987418dc2ca0bd19798baf37c1005..19c6c00e4a924c279c8b6c41b0d56877c912b800 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        helpwin.cpp
+// Name:        src/os2/helpwin.cpp
 // Purpose:     Help system: native implementation
 // Author:      David Webster
 // Modified by:
@@ -21,7 +21,7 @@
 #if wxUSE_HELP
 #include <time.h>
 
-#include <wx/os2/private.h>
+#include "wx/os2/private.h"
 
 #include <string.h>
 
@@ -58,11 +58,11 @@ bool wxWinHelpController::LoadFile(const wxString& file)
 
 bool wxWinHelpController::DisplayContents()
 {
-    if (m_helpFile == wxT(""))
+    if (m_helpFile.empty())
         return false;
 
     wxString str = m_helpFile;
-    size_t len = str.Length();
+    size_t len = str.length();
     if (!(str[(size_t)(len-1)] == wxT('p') && str[(size_t)(len-2)] == wxT('l') && str[(size_t)(len-3)] == wxT('h') && str[(size_t)(len-4)] == wxT('.')))
         str += wxT(".hlp");
 
@@ -71,17 +71,17 @@ bool wxWinHelpController::DisplayContents()
         // TODO : display the help
         return true;
     }
-    return FALSE;
+    return false;
 }
 
 bool wxWinHelpController::DisplaySection(int WXUNUSED(section))
 {
     // Use context number
-    if (m_helpFile == wxT(""))
+    if (m_helpFile.empty())
         return false;
 
     wxString str = m_helpFile;
-    size_t len = str.Length();
+    size_t len = str.length();
     if (!(str[(size_t)(len-1)] == wxT('p') && str[(size_t)(len-2)] == wxT('l') && str[(size_t)(len-3)] == wxT('h') && str[(size_t)(len-4)] == wxT('.')))
       str += wxT(".hlp");
 
@@ -98,11 +98,11 @@ bool wxWinHelpController::DisplaySection(int WXUNUSED(section))
 bool wxWinHelpController::DisplayBlock(long WXUNUSED(block))
 {
     // Use context number -- a very rough equivalent to block id!
-    if (m_helpFile == wxT(""))
+    if (m_helpFile.empty())
         return false;
 
     wxString str = m_helpFile;
-    size_t len = str.Length();
+    size_t len = str.length();
     if (!(str[(size_t)(len-1)] == wxT('p') && str[(size_t)(len-2)] == wxT('l') && str[(size_t)(len-3)] == wxT('h') && str[(size_t)(len-4)] == wxT('.')))
       str += wxT(".hlp");
 
@@ -118,10 +118,10 @@ bool wxWinHelpController::DisplayBlock(long WXUNUSED(block))
 bool wxWinHelpController::KeywordSearch(const wxString& WXUNUSED(k),
                                         wxHelpSearchMode WXUNUSED(mode))
 {
-    if (m_helpFile == wxEmptyString) return FALSE;
+    if (m_helpFile == wxEmptyString) return false;
 
     wxString str = m_helpFile;
-    size_t len = str.Length();
+    size_t len = str.length();
     if (!(str[(size_t)(len-1)] == wxT('p') && str[(size_t)(len-2)] == wxT('l') && str[(size_t)(len-3)] == wxT('h') && str[(size_t)(len-4)] == wxT('.')))
       str += wxT(".hlp");
 
@@ -131,7 +131,7 @@ bool wxWinHelpController::KeywordSearch(const wxString& WXUNUSED(k),
       // WinHelp((HWND) wxTheApp->GetTopWindow()->GetHWND(), (const wxChar*) str, HELP_PARTIALKEY, (DWORD)(const wxChar*) k);
       return true;
     }
-    return FALSE;
+    return false;
 }
 
 // Can't close the help window explicitly in WinHelp
index 9e01efedbdaf5981636f56d778b0674fd6161281..d5730815d09ac0dc0c25cb7d6eeccf902ee3ebd9 100644 (file)
@@ -4,6 +4,7 @@
 // Author:      David Webster
 // Modified by:
 // Created:     10/09/99
+// RCS-ID:      $Id$
 // Copyright:   David Webster
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
 #include "wx/wxprec.h"
 
 #ifndef   WX_PRECOMP
-  #include  <wx/string.h>
-  #include  <wx/intl.h>
-  #include  <wx/event.h>
-  #include  <wx/app.h>
-  #include  <wx/utils.h>
+  #include  "wx/string.h"
+  #include  "wx/intl.h"
+  #include  "wx/event.h"
+  #include  "wx/app.h"
+  #include  "wx/utils.h"
 #endif  //WX_PRECOMP
 
-#include  <wx/dynarray.h>
-#include  <wx/log.h>
+#include  "wx/dynarray.h"
+#include  "wx/log.h"
 
-#include  <wx/config.h>
+#include  "wx/config.h"
 #if wxUSE_CONFIG
 
-#include  <wx/os2/iniconf.h>
+#include  "wx/os2/iniconf.h"
 
 #define INCL_PM
 #include  <os2.h>
@@ -72,7 +73,7 @@ wxIniConfig::wxIniConfig(const wxString& strAppName,
     }
 
     // set root path
-    SetPath(wxT(""));
+    SetPath(wxEmptyString);
 }
 
 wxIniConfig::~wxIniConfig()
@@ -299,61 +300,67 @@ bool wxIniConfig::Read(const wxString& szKey, wxString *pstr) const
 bool wxIniConfig::Read(const wxString& szKey, wxString *pstr,
                        const wxString& szDefault) const
 {
-  wxConfigPathChanger path(this, szKey);
-  wxString strKey = GetPrivateKeyName(path.Name());
+    wxConfigPathChanger path(this, szKey);
+    wxString strKey = GetPrivateKeyName(path.Name());
 
-  wxChar szBuf[1024]; // @@ should dynamically allocate memory...
+    wxChar szBuf[1024]; // @@ should dynamically allocate memory...
 
-  // first look in the private INI file
+    // first look in the private INI file
 
-  // NB: the lpDefault param to GetPrivateProfileString can't be NULL
-//  GetPrivateProfileString(m_strGroup, strKey, "",
-//                          szBuf, WXSIZEOF(szBuf), m_strLocalFilename);
-  if ( ::IsEmpty((PSZ)szBuf) ) {
-    // now look in win.ini
-    wxString strKey = GetKeyName(path.Name());
-//    GetProfileString(m_strGroup, strKey, "", szBuf, WXSIZEOF(szBuf));
-  }
-
-  if ( ::IsEmpty((PSZ)szBuf) ) {
-    *pstr = szDefault;
-    return FALSE;
-  }
-  else {
-    *pstr = szBuf ;
-    return TRUE;
-  }
+    // NB: the lpDefault param to GetPrivateProfileString can't be NULL
+    // GetPrivateProfileString(m_strGroup, strKey, "",
+    //                         szBuf, WXSIZEOF(szBuf), m_strLocalFilename);
+    if ( ::IsEmpty((PSZ)szBuf) )
+    {
+      // now look in win.ini
+      wxString strKey = GetKeyName(path.Name());
+      // GetProfileString(m_strGroup, strKey, "", szBuf, WXSIZEOF(szBuf));
+    }
+
+    if ( ::IsEmpty((PSZ)szBuf) )
+    {
+        *pstr = szDefault;
+        return false;
+    }
+    else
+    {
+        *pstr = szBuf ;
+        return true;
+    }
 }
 
 bool wxIniConfig::Read(const wxString& szKey, long *pl) const
 {
-  wxConfigPathChanger path(this, szKey);
-  wxString strKey = GetPrivateKeyName(path.Name());
-
-  // hack: we have no mean to know if it really found the default value or
-  // didn't find anything, so we call it twice
-
-  static const int nMagic  = 17; // 17 is some "rare" number
-  static const int nMagic2 = 28; // arbitrary number != nMagic
-  long lVal = 0; // = GetPrivateProfileInt(m_strGroup, strKey, nMagic, m_strLocalFilename);
-  if ( lVal != nMagic ) {
-    // the value was read from the file
-    *pl = lVal;
-    return TRUE;
-  }
-
-  // is it really nMagic?
-//  lVal = GetPrivateProfileInt(m_strGroup, strKey, nMagic2, m_strLocalFilename);
-  if ( lVal == nMagic2 ) {
-    // the nMagic it returned was indeed read from the file
-    *pl = lVal;
-    return TRUE;
-  }
-
-  // no, it was just returning the default value, so now look in win.ini
-//  *pl = GetProfileInt(GetVendorName(), GetKeyName(szKey), *pl);
-
-  return TRUE;
+    wxConfigPathChanger path(this, szKey);
+    wxString strKey = GetPrivateKeyName(path.Name());
+
+    // hack: we have no mean to know if it really found the default value or
+    // didn't find anything, so we call it twice
+
+    static const int nMagic  = 17; // 17 is some "rare" number
+    static const int nMagic2 = 28; // arbitrary number != nMagic
+    long lVal = 0; // = GetPrivateProfileInt(m_strGroup, strKey, nMagic, m_strLocalFilename);
+
+    if ( lVal != nMagic )
+    {
+        // the value was read from the file
+        *pl = lVal;
+        return true;
+    }
+
+    // is it really nMagic?
+    // lVal = GetPrivateProfileInt(m_strGroup, strKey, nMagic2, m_strLocalFilename);
+    if ( lVal == nMagic2 )
+    {
+        // the nMagic it returned was indeed read from the file
+        *pl = lVal;
+        return true;
+    }
+
+    // no, it was just returning the default value, so now look in win.ini
+    // *pl = GetProfileInt(GetVendorName(), GetKeyName(szKey), *pl);
+
+    return true;
 }
 
 bool wxIniConfig::Write(const wxString& szKey, const wxString& WXUNUSED(szValue))
@@ -381,9 +388,9 @@ bool wxIniConfig::Write(const wxString& szKey, long lValue)
 
 bool wxIniConfig::Flush(bool /* bCurrentOnly */)
 {
-  // this is just the way it works
-//  return WritePrivateProfileString(NULL, NULL, NULL, m_strLocalFilename) != 0;
-  return FALSE;
+    // this is just the way it works
+    // return WritePrivateProfileString(NULL, NULL, NULL, m_strLocalFilename) != 0;
+    return false;
 }
 
 // ----------------------------------------------------------------------------
@@ -392,27 +399,27 @@ bool wxIniConfig::Flush(bool /* bCurrentOnly */)
 
 bool wxIniConfig::DeleteEntry(const wxString& szKey, bool bGroupIfEmptyAlso)
 {
-  // passing NULL as value to WritePrivateProfileString deletes the key
-//  if ( !Write(szKey, (const char *)NULL) )
-//    return FALSE;
-  wxConfigPathChanger path(this, szKey);
-  wxString strKey = GetPrivateKeyName(path.Name());
+    // passing NULL as value to WritePrivateProfileString deletes the key
+    // if ( !Write(szKey, (const char *)NULL) )
+    //     return false;
+    wxConfigPathChanger path(this, szKey);
+    wxString strKey = GetPrivateKeyName(path.Name());
 
-//  if (WritePrivateProfileString(m_strGroup, szKey,
-//                                         (const char*) NULL, m_strLocalFilename) == 0)
-//    return FALSE;
+    // if (WritePrivateProfileString(m_strGroup, szKey,
+    //                               (const char*) NULL, m_strLocalFilename) == 0)
+    //    return false;
 
-  if ( !bGroupIfEmptyAlso || !IsEmpty() )
-    return TRUE;
+    if ( !bGroupIfEmptyAlso || !IsEmpty() )
+        return true;
 
-  // delete the current group too
-  bool bOk = FALSE; // = WritePrivateProfileString(m_strGroup, NULL,
-//                                       NULL, m_strLocalFilename) != 0;
+    // delete the current group too
+    bool bOk = false; // = WritePrivateProfileString(m_strGroup, NULL,
+                      //                             NULL, m_strLocalFilename) != 0;
 
-  if ( !bOk )
-    wxLogLastError(wxT("WritePrivateProfileString"));
+    if ( !bOk )
+        wxLogLastError(wxT("WritePrivateProfileString"));
 
-  return bOk;
+    return bOk;
 }
 
 bool wxIniConfig::DeleteGroup(const wxString& szKey)
@@ -421,8 +428,8 @@ bool wxIniConfig::DeleteGroup(const wxString& szKey)
 
   // passing NULL as section name to WritePrivateProfileString deletes the
   // whole section according to the docs
-  bool bOk = FALSE; // = WritePrivateProfileString(path.Name(), NULL,
-  //                                     NULL, m_strLocalFilename) != 0;
+  bool bOk = false; // = WritePrivateProfileString(path.Name(), NULL,
+                    //                             NULL, m_strLocalFilename) != 0;
 
   if ( !bOk )
     wxLogLastError(wxT("WritePrivateProfileString"));
@@ -436,30 +443,31 @@ bool wxIniConfig::DeleteGroup(const wxString& szKey)
 
 bool wxIniConfig::DeleteAll()
 {
-  // first delete our group in win.ini
-//  WriteProfileString(GetVendorName(), NULL, NULL);
-
-  // then delete our own ini file
-  wxChar szBuf[MAX_PATH];
-  size_t nRc = 0; // = GetWindowsDirectory(szBuf, WXSIZEOF(szBuf));
-  if ( nRc == 0 )
-  {
-    wxLogLastError(wxT("GetWindowsDirectory"));
-  }
-  else if ( nRc > WXSIZEOF(szBuf) )
-  {
-    wxFAIL_MSG(_("buffer is too small for Windows directory."));
-  }
-
-  wxString strFile = szBuf;
-  strFile << wxT('\\') << m_strLocalFilename;
-
-  if ( !wxRemoveFile(strFile) ) {
-    wxLogSysError(_("Can't delete the INI file '%s'"), strFile.c_str());
-    return FALSE;
-  }
-
-  return TRUE;
+    // first delete our group in win.ini
+    // WriteProfileString(GetVendorName(), NULL, NULL);
+
+    // then delete our own ini file
+    wxChar szBuf[MAX_PATH];
+    size_t nRc = 0; // = GetWindowsDirectory(szBuf, WXSIZEOF(szBuf));
+    if ( nRc == 0 )
+    {
+        wxLogLastError(wxT("GetWindowsDirectory"));
+    }
+    else if ( nRc > WXSIZEOF(szBuf) )
+    {
+        wxFAIL_MSG(_("buffer is too small for Windows directory."));
+    }
+
+    wxString strFile = szBuf;
+    strFile << wxT('\\') << m_strLocalFilename;
+
+    if ( !wxRemoveFile(strFile) )
+    {
+        wxLogSysError(_("Can't delete the INI file '%s'"), strFile.c_str());
+        return false;
+    }
+
+    return true;
 }
 
 bool wxIniConfig::RenameEntry(const wxString& WXUNUSED(oldName), const wxString& WXUNUSED(newName))
index 5f2110557e8012622a3e3f5c7be85a9c06f9080c..0b19280bc72bea8d59caf9b5a02670ec76061c43 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        joystick.cpp
+// Name:        src/os2/joystick.cpp
 // Purpose:     wxJoystick class
 // Author:      David Webster
 // Modified by:
@@ -25,8 +25,8 @@
 
 #define NO_JOYGETPOSEX
 
-#include <wx/window.h>
-#include <wx/joystick.h>
+#include "wx/window.h"
+#include "wx/joystick.h"
 
 IMPLEMENT_DYNAMIC_CLASS(wxJoystick, wxObject)
 
@@ -122,7 +122,7 @@ int wxJoystick::GetProductId() const
 wxString wxJoystick::GetProductName() const
 {
     // TODO
-    return wxString("");
+    return wxEmptyString;
 }
 
 int wxJoystick::GetXMin() const
index e2827fa6ce3def706b6e7fdf5a62feddbacf065f..20d589fe72f715bc8d4572ea8a9d78944c0f19e6 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        slider.cpp
+// Name:        src/os2/slider.cpp
 // Purpose:     wxSlider
 // Author:      David Webster
 // Modified by:
@@ -18,9 +18,9 @@
 
 #ifndef WX_PRECOMP
 #include <stdio.h>
-#include <wx/utils.h>
-#include <wx/brush.h>
-#include <wx/scrolwin.h>
+#include "wx/utils.h"
+#include "wx/brush.h"
+#include "wx/scrolwin.h"
 #endif
 
 #if wxUSE_SLIDER
index 674e78e236929e57b6fa94b3e0144a75e195525d..428106a834e282c23eb4a8e68325bdd8d9d3304a 100644 (file)
@@ -63,7 +63,7 @@ static const int idMenuTitle = -3;
 // implementation
 // ============================================================================
 
-#include <wx/listimpl.cpp>
+#include "wx/listimpl.cpp"
 
 WX_DEFINE_LIST( wxMenuInfoList ) ;
 
index 05a32d9863e52a47248f864bceaef29ed1da4f8d..71aca55caab233abc9865c3fea035b906529abef 100644 (file)
@@ -34,7 +34,7 @@
 // event table
 // ----------------------------------------------------------------------------
 
-#include <wx/listimpl.cpp>
+#include "wx/listimpl.cpp"
 
 WX_DEFINE_LIST( wxNotebookPageInfoList ) ;
 
index 94a3ab61a9e33c5e53be730f585f9b9d9bf346e2..220d37dfa34389bd74da2b352e418b60f2bcaaac 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        unix/mediactrl.cpp
+// Name:        src/unix/mediactrl.cpp
 // Purpose:     Built-in Media Backends for Unix
 // Author:      Ryan Norton <wxprojects@comcast.net>
 // Modified by:
@@ -114,19 +114,19 @@ public:
                          GError     *err,   gchar      *debug,
                          gpointer    data);
     static void OnVideoCapsReady(GstPad* pad,  GParamSpec* pspec, gpointer data);
-    
+
     static bool TransCapsToVideoSize(wxGStreamerMediaBackend* be, GstPad* caps);
     void PostRecalcSize();
-    
+
 #ifdef __WXGTK__
     static gint OnGTKRealize(GtkWidget* theWidget, wxGStreamerMediaBackend* be);
 #endif
 
     GstElement* m_player;       //GStreamer media element
-    
+
     wxSize      m_videoSize;
     wxControl*  m_ctrl;
-    
+
     wxLongLong m_nPausedPos;
 
     DECLARE_DYNAMIC_CLASS(wxGStreamerMediaBackend);
@@ -153,7 +153,7 @@ wxGStreamerMediaBackend::wxGStreamerMediaBackend() : m_player(NULL), m_videoSize
 //---------------------------------------------------------------------------
 // wxGStreamerMediaBackend Destructor
 //
-// Stops/cleans up memory  
+// Stops/cleans up memory
 //---------------------------------------------------------------------------
 wxGStreamerMediaBackend::~wxGStreamerMediaBackend()
 {
@@ -187,28 +187,28 @@ extern void wxapp_install_idle_handler();
 extern bool g_isIdle;
 extern bool g_mainThreadLocked;
 
-gint wxGStreamerMediaBackend::OnGTKRealize(GtkWidget* theWidget, 
+gint wxGStreamerMediaBackend::OnGTKRealize(GtkWidget* theWidget,
                                            wxGStreamerMediaBackend* be)
 {
     DEBUG_MAIN_THREAD
-    
+
     if (g_isIdle)
         wxapp_install_idle_handler();
 
     wxYield();    //FIXME: X Server gets an error if I don't do this or a messagebox beforehand?!?!??
-    
+
     GdkWindow *window = GTK_PIZZA(theWidget)->bin_window;
     wxASSERT(window);
-    
+
     GstElement* videosink;
     g_object_get (G_OBJECT (be->m_player), "video-sink", &videosink, NULL);
-    
+
     GstElement* overlay = gst_bin_get_by_interface (GST_BIN (videosink),
                                     GST_TYPE_X_OVERLAY);
     gst_x_overlay_set_xwindow_id( GST_X_OVERLAY(overlay),
                                 GDK_WINDOW_XWINDOW( window )
                                 );
-    
+
     return 0;
 }
 
@@ -244,7 +244,7 @@ bool wxGStreamerMediaBackend::CreateControl(wxControl* ctrl, wxWindow* parent,
 {
     //init gstreamer
     gst_init(NULL, NULL);
-    
+
     m_ctrl = ctrl;
 
     return m_ctrl->wxControl::Create(parent, id, pos, size,
@@ -289,10 +289,10 @@ bool wxGStreamerMediaBackend::TransCapsToVideoSize(wxGStreamerMediaBackend* be,
 
         wxLogDebug(wxT("Adjusted video size: [%i,%i]"), be->m_videoSize.x, be->m_videoSize.y);
 
-        be->PostRecalcSize();        
+        be->PostRecalcSize();
         return true;
     }//end if caps
-    
+
     return false;
 }
 
@@ -356,7 +356,7 @@ void wxGStreamerMediaBackend::OnError(GstElement *play,
 {
     wxLogSysError(
         wxString::Format(
-            wxT("Error in wxMediaCtrl!\nError Message:%s\nDebug:%s\n"), 
+            wxT("Error in wxMediaCtrl!\nError Message:%s\nDebug:%s\n"),
             (const wxChar*)wxConvUTF8.cMB2WX(err->message),
             (const wxChar*)wxConvUTF8.cMB2WX(debug)
                         )
@@ -371,10 +371,10 @@ void wxGStreamerMediaBackend::OnError(GstElement *play,
 //---------------------------------------------------------------------------
 bool wxGStreamerMediaBackend::Load(const wxString& fileName)
 {
-    return Load( 
-                    wxURI( 
-                            wxString( wxT("file://") ) + fileName 
-                         ) 
+    return Load(
+                    wxURI(
+                            wxString( wxT("file://") ) + fileName
+                         )
                );
 }
 
@@ -385,7 +385,7 @@ bool wxGStreamerMediaBackend::Load(const wxString& fileName)
 //---------------------------------------------------------------------------
 void wxGStreamerMediaBackend::OnVideoCapsReady(GstPad* pad, GParamSpec* pspec, gpointer data)
 {
-    wxGStreamerMediaBackend::TransCapsToVideoSize((wxGStreamerMediaBackend*) data, pad);    
+    wxGStreamerMediaBackend::TransCapsToVideoSize((wxGStreamerMediaBackend*) data, pad);
 }
 
 //---------------------------------------------------------------------------
@@ -404,14 +404,14 @@ bool wxGStreamerMediaBackend::Load(const wxURI& location)
 {
     //1
     Cleanup();
-    
+
     //2
     m_player    = gst_element_factory_make ("playbin", "play");
 
     //3
     if (!m_player)
         return false;
-        
+
     //4
     g_signal_connect (m_player, "eos", G_CALLBACK (OnFinish), this);
     g_signal_connect (m_player, "error", G_CALLBACK (OnError), this);
@@ -423,48 +423,48 @@ bool wxGStreamerMediaBackend::Load(const wxURI& location)
 #if defined(__WXGTK__) && wxUSE_DYNLIB_CLASS
 
     //use gnome-specific gstreamer extensions
-    //if synthisis (?) file not found, it 
+    //if synthisis (?) file not found, it
     //spits out a warning and uses ximagesink
     wxDynamicLibrary gstgconf;
     if(gstgconf.Load(gstgconf.CanonicalizeName(wxT("gstgconf-0.8"))))
     {
         typedef GstElement* (*LPgst_gconf_get_default_video_sink) (void);
-        LPgst_gconf_get_default_video_sink pGst_gconf_get_default_video_sink = 
+        LPgst_gconf_get_default_video_sink pGst_gconf_get_default_video_sink =
         (LPgst_gconf_get_default_video_sink)
             gstgconf.GetSymbol(wxT("gst_gconf_get_default_video_sink"));
 
-        if (pGst_gconf_get_default_video_sink)        
+        if (pGst_gconf_get_default_video_sink)
         {
             videosink = (*pGst_gconf_get_default_video_sink) ();
             wxASSERT( GST_IS_BIN(videosink) );
             overlay = gst_bin_get_by_interface (GST_BIN (videosink),
                                             GST_TYPE_X_OVERLAY);
         }
-        
+
         gstgconf.Detach();
     }
-        
-        if ( ! GST_IS_X_OVERLAY(overlay) )
-        {
+
+    if ( ! GST_IS_X_OVERLAY(overlay) )
+    {
 #endif
-            wxLogDebug(wxT("Could not load Gnome preferences, reverting to xvimagesink for video for gstreamer"));
-            videosink = gst_element_factory_make ("xvimagesink", "videosink");
-            if ( !GST_IS_OBJECT(videosink) )
-                videosink = gst_element_factory_make ("ximagesink", "videosink");
-            
-            overlay = videosink;
-        
-            wxASSERT( GST_IS_X_OVERLAY(overlay) );
-            if ( ! GST_IS_X_OVERLAY(overlay) )
-                return false;
+        wxLogDebug(wxT("Could not load Gnome preferences, reverting to xvimagesink for video for gstreamer"));
+        videosink = gst_element_factory_make ("xvimagesink", "videosink");
+        if ( !GST_IS_OBJECT(videosink) )
+            videosink = gst_element_factory_make ("ximagesink", "videosink");
+
+        overlay = videosink;
+
+        wxASSERT( GST_IS_X_OVERLAY(overlay) );
+        if ( ! GST_IS_X_OVERLAY(overlay) )
+            return false;
 #if defined(__WXGTK__) && wxUSE_DYNLIB_CLASS
-        }
+    }
 #endif
 
     g_object_set (G_OBJECT (m_player),
                     "video-sink", videosink,
 //                    "audio-sink", m_audiosink,
-                    NULL);    
+                    NULL);
 
     //6
     wxString locstring = location.BuildUnescapedURI();
@@ -472,17 +472,17 @@ bool wxGStreamerMediaBackend::Load(const wxURI& location)
     wxASSERT(gst_uri_is_valid(locstring.mb_str()));
 
     g_object_set (G_OBJECT (m_player), "uri", (const char*)locstring.mb_str(), NULL);
-        
-    //7    
+
+    //7
 #ifdef __WXGTK__
     if(!GTK_WIDGET_REALIZED(m_ctrl->m_wxwindow))
     {
         //Not realized yet - set to connect at realization time
-        gtk_signal_connect( GTK_OBJECT(m_ctrl->m_wxwindow), 
+        gtk_signal_connect( GTK_OBJECT(m_ctrl->m_wxwindow),
                             "realize",
                             GTK_SIGNAL_FUNC(wxGStreamerMediaBackend::OnGTKRealize),
                             (gpointer) this );
-    }        
+    }
     else
     {
         wxYield(); //see realize callback...
@@ -490,7 +490,7 @@ bool wxGStreamerMediaBackend::Load(const wxURI& location)
         wxASSERT(window);
 #endif
 
+
     gst_x_overlay_set_xwindow_id( GST_X_OVERLAY(overlay),
 #ifdef __WXGTK__
                         GDK_WINDOW_XWINDOW( window )
@@ -499,17 +499,17 @@ bool wxGStreamerMediaBackend::Load(const wxURI& location)
 #endif
                                   );
 
-#ifdef __WXGTK__                                  
+#ifdef __WXGTK__
     } //end else block
-#endif 
-    
+#endif
+
     //8
-       int nResult = gst_element_set_state (m_player, GST_STATE_PAUSED);
-       if(nResult != GST_STATE_SUCCESS)
-       {
-           wxLogDebug(wxT("Could not set initial state to paused!"));
-           return false;
-       }
+    int nResult = gst_element_set_state (m_player, GST_STATE_PAUSED);
+    if(nResult != GST_STATE_SUCCESS)
+    {
+        wxLogDebug(wxT("Could not set initial state to paused!"));
+        return false;
+    }
 
     const GList *list = NULL;
     g_object_get (G_OBJECT (m_player), "stream-info", &list, NULL);
@@ -535,12 +535,12 @@ bool wxGStreamerMediaBackend::Load(const wxURI& location)
             //but a lot of old plugins still use "pad" :)
             pspec = g_object_class_find_property (
                         G_OBJECT_GET_CLASS (info), "object");
-                        
+
             if (!pspec)
                 g_object_get (info, "pad", &pad, NULL);
             else
                 g_object_get (info, "object", &pad, NULL);
-            
+
             pad = (GstPad *) GST_PAD_REALIZE (pad);
             wxASSERT(pad);
 
@@ -548,8 +548,8 @@ bool wxGStreamerMediaBackend::Load(const wxURI& location)
             {
                 //wait for those caps to get ready
                 g_signal_connect(
-                pad, 
-                "notify::caps", 
+                pad,
+                "notify::caps",
                 G_CALLBACK(wxGStreamerMediaBackend::OnVideoCapsReady),
                 this);
             }
@@ -562,7 +562,7 @@ bool wxGStreamerMediaBackend::Load(const wxURI& location)
             m_videoSize = wxSize(0,0);
             PostRecalcSize();
         }
-    }//end searching through info list    
+    }//end searching through info list
 
     if(!bVideoFound)
     {
@@ -574,7 +574,7 @@ bool wxGStreamerMediaBackend::Load(const wxURI& location)
     wxMediaEvent theEvent(wxEVT_MEDIA_LOADED,
                             m_ctrl->GetId());
     m_ctrl->AddPendingEvent(theEvent);
-    
+
     return true;
 }
 
@@ -642,12 +642,12 @@ wxMediaState wxGStreamerMediaBackend::GetState()
 //---------------------------------------------------------------------------
 // wxGStreamerMediaBackend::GetPosition
 //
-// If paused, returns our marked position - otherwise it queries the 
+// If paused, returns our marked position - otherwise it queries the
 // GStreamer playbin for the position and returns that
 //
 //TODO:
 //TODO: In lue of the last big TODO, when you pause and seek gstreamer
-//TODO: doesn't update the position sometimes, so we need to keep track of whether    
+//TODO: doesn't update the position sometimes, so we need to keep track of whether
 //TODO: we have paused or not and keep track of the time after the pause
 //TODO: and whenever the user seeks while paused
 //TODO:
@@ -660,7 +660,7 @@ wxLongLong wxGStreamerMediaBackend::GetPosition()
     {
         gint64 pos;
         GstFormat fmtTime = GST_FORMAT_TIME;
-    
+
         if (!gst_element_query (m_player, GST_QUERY_POSITION, &fmtTime, &pos))
             return 0;
         return pos / GST_MSECOND ;
@@ -674,7 +674,7 @@ wxLongLong wxGStreamerMediaBackend::GetPosition()
 // Note that GST_MSECOND is 1000000 (GStreamer uses nanoseconds - so
 // there is 1000000 nanoseconds in a millisecond)
 //
-// If paused marks where we seeked to 
+// If paused marks where we seeked to
 //---------------------------------------------------------------------------
 bool wxGStreamerMediaBackend::SetPosition(wxLongLong where)
 {
@@ -684,10 +684,10 @@ bool wxGStreamerMediaBackend::SetPosition(wxLongLong where)
     {
         if (GetState() != wxMEDIASTATE_PLAYING)
             m_nPausedPos = where;
-        
+
         return true;
-    }        
-            
+    }
+
     return false;
 }
 
@@ -722,7 +722,7 @@ void wxGStreamerMediaBackend::Move(int x, int y, int w, int h)
 // Returns our cached video size from Load/OnVideoCapsReady
 //---------------------------------------------------------------------------
 wxSize wxGStreamerMediaBackend::GetVideoSize() const
-{    
+{
     return m_videoSize;
 }
 
@@ -761,12 +761,7 @@ bool wxGStreamerMediaBackend::SetPlaybackRate(double dRate)
 #endif //wxUSE_GSTREAMER
 
 //in source file that contains stuff you don't directly use
-#include <wx/html/forcelnk.h>
+#include "wx/html/forcelnk.h"
 FORCE_LINK_ME(basewxmediabackends);
 
 #endif //wxUSE_MEDIACTRL
-
-
-
-
-
index cce966d98e1c63aa6abf1b273d5bb1b8986a12c7..f0e7659695c16929f19e57706d1612545c97233a 100644 (file)
@@ -770,7 +770,7 @@ KeySym wxCharCodeWXToX(int id)
 // check current state of a key
 // ----------------------------------------------------------------------------
 
-#include <wx/app.h>
+#include "wx/app.h"
 
 bool wxGetKeyState(wxKeyCode key)
 {