mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-14 10:09:13 +01:00
822326eea9
From wxWidgets master 81570ae070b35c9d52de47b1f14897f3ff1a66c7. include/wx/defs.h -- __w64 warning disable patch by comex brought forward. include/wx/msw/window.h -- added GetContentScaleFactor() which was not implemented on Windows but is necessary for wxBitmap scaling on Mac OS X so it needs to work to avoid #ifdef-ing the code. src/gtk/window.cpp -- Modified DoSetClientSize() to direct call wxWindowGTK::DoSetSize() instead of using public wxWindowBase::SetSize() which now prevents derived classes (like wxAuiToolbar) intercepting the call and breaking it. This matches Windows which does NOT need to call DoSetSize internally. End result is this fixes Dolphin's debug tools toolbars on Linux. src/osx/window_osx.cpp -- Same fix as for GTK since it has the same issue. src/msw/radiobox.cpp -- Hacked to fix display in HiDPI (was clipping off end of text). Updated CMakeLists for Linux and Mac OS X. Small code changes to Dolphin to fix debug error boxes, deprecation warnings, and retain previous UI behavior on Windows.
89 lines
2.8 KiB
C++
89 lines
2.8 KiB
C++
/////////////////////////////////////////////////////////////////////////////
|
|
// Name: wx/osx/fswatcher_fsevents.h
|
|
// Purpose: File System watcher that uses the FSEvents API
|
|
// of OS X to efficiently watch trees
|
|
// Author: Roberto Perpuly
|
|
// Created: 2015-04-24
|
|
// Copyright: (c) 2015 Roberto Perpuly <robertop2004@gmail.com>
|
|
// Licence: wxWindows licence
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
#ifndef _WX_FSWATCHER_FSEVENTS_H_
|
|
#define _WX_FSWATCHER_FSEVENTS_H_
|
|
|
|
#include "wx/defs.h"
|
|
|
|
#if wxUSE_FSWATCHER
|
|
|
|
#include <CoreServices/CoreServices.h>
|
|
#include "wx/unix/fswatcher_kqueue.h"
|
|
|
|
WX_DECLARE_STRING_HASH_MAP(FSEventStreamRef, FSEventStreamRefMap);
|
|
|
|
/*
|
|
The FSEvents watcher uses the newer FSEvents service
|
|
that is available in OS X, the service allows for
|
|
efficient watching of entire directory hierarchies.
|
|
Note that adding a single file watch (or directory
|
|
watch) still use kqueue events.
|
|
|
|
We take care to only use this on OS X >= 10.7, as that
|
|
version introduced the ability to get file-level notifications.
|
|
|
|
See the following docs that outline the FSEvents API
|
|
|
|
https://developer.apple.com/library/mac/documentation/Darwin/Conceptual/FSEvents_ProgGuide/UsingtheFSEventsFramework/UsingtheFSEventsFramework.html
|
|
|
|
https://developer.apple.com/library/mac/documentation/Darwin/Reference/FSEvents_Ref/index.html
|
|
*/
|
|
class WXDLLIMPEXP_BASE wxFsEventsFileSystemWatcher :
|
|
public wxKqueueFileSystemWatcher
|
|
{
|
|
public:
|
|
wxFsEventsFileSystemWatcher();
|
|
|
|
wxFsEventsFileSystemWatcher(const wxFileName& path,
|
|
int events = wxFSW_EVENT_ALL);
|
|
|
|
~wxFsEventsFileSystemWatcher();
|
|
|
|
// reimplement adding a tree so that it does not use
|
|
// kqueue at all
|
|
bool AddTree(const wxFileName& path, int events = wxFSW_EVENT_ALL,
|
|
const wxString& filespec = wxEmptyString) wxOVERRIDE;
|
|
|
|
// reimplement removing a tree so that we
|
|
// cleanup the opened fs streams
|
|
bool RemoveTree(const wxFileName& path) wxOVERRIDE;
|
|
|
|
// reimplement remove all so that we cleanup
|
|
// watches from kqeueue and from FSEvents
|
|
bool RemoveAll() wxOVERRIDE;
|
|
|
|
// post an file change event to the owner
|
|
void PostChange(const wxFileName& oldFileName,
|
|
const wxFileName& newFileName, int event);
|
|
|
|
// post a warning event to the owner
|
|
void PostWarning(wxFSWWarningType warning, const wxString& msg);
|
|
|
|
// post an error event to the owner
|
|
void PostError(const wxString& msg);
|
|
|
|
// reimplement count to include the FS stream watches
|
|
int GetWatchedPathsCount() const;
|
|
|
|
// reimplement to include paths from FS stream watches
|
|
int GetWatchedPaths(wxArrayString* paths) const;
|
|
|
|
private:
|
|
|
|
// map of path => FSEventStreamRef
|
|
FSEventStreamRefMap m_streams;
|
|
|
|
};
|
|
|
|
#endif /* wxUSE_FSWATCHER */
|
|
|
|
#endif /* _WX_FSWATCHER_FSEVENTS_H_ */
|