diff options
author | der richter <der.richter@gmx.de> | 2024-02-27 16:55:29 +0100 |
---|---|---|
committer | der richter <der.richter@gmx.de> | 2024-02-28 15:52:47 +0100 |
commit | 86fa9b18a3619a379a597ca0902c23dc053cafc0 (patch) | |
tree | f187f85a97744bd0468290975e5ec4d10054b25b /osdep | |
parent | 661f45377a17635125ae36f0b8a3487ae13cf606 (diff) | |
download | mpv-86fa9b18a3619a379a597ca0902c23dc053cafc0.tar.bz2 mpv-86fa9b18a3619a379a597ca0902c23dc053cafc0.tar.xz |
osdep/mac: make mac naming of files, folders and function consistent
rename all macOS namings (osx, macosx, macOS, macos, apple) to mac, to
make naming consistent.
Diffstat (limited to 'osdep')
-rw-r--r-- | osdep/language-mac.c (renamed from osdep/language-apple.c) | 2 | ||||
-rw-r--r-- | osdep/mac/application.h (renamed from osdep/macosx_application.h) | 8 | ||||
-rw-r--r-- | osdep/mac/application.m (renamed from osdep/macosx_application.m) | 14 | ||||
-rw-r--r-- | osdep/mac/application_objc.h (renamed from osdep/macosx_application_objc.h) | 4 | ||||
-rw-r--r-- | osdep/mac/events.h (renamed from osdep/macosx_events.h) | 4 | ||||
-rw-r--r-- | osdep/mac/events.m (renamed from osdep/macosx_events.m) | 6 | ||||
-rw-r--r-- | osdep/mac/events_objc.h (renamed from osdep/macosx_events_objc.h) | 2 | ||||
-rw-r--r-- | osdep/mac/libmpv_helper.swift (renamed from osdep/macos/libmpv_helper.swift) | 0 | ||||
-rw-r--r-- | osdep/mac/log_helper.swift (renamed from osdep/macos/log_helper.swift) | 0 | ||||
-rw-r--r-- | osdep/mac/menubar.h (renamed from osdep/macosx_menubar.h) | 6 | ||||
-rw-r--r-- | osdep/mac/menubar.m (renamed from osdep/macosx_menubar.m) | 4 | ||||
-rw-r--r-- | osdep/mac/menubar_objc.h (renamed from osdep/macosx_menubar_objc.h) | 2 | ||||
-rw-r--r-- | osdep/mac/meson.build (renamed from osdep/meson.build) | 12 | ||||
-rw-r--r-- | osdep/mac/mpv_helper.swift (renamed from osdep/macos/mpv_helper.swift) | 0 | ||||
-rw-r--r-- | osdep/mac/precise_timer.swift (renamed from osdep/macos/precise_timer.swift) | 0 | ||||
-rw-r--r-- | osdep/mac/remote_command_center.swift (renamed from osdep/macos/remote_command_center.swift) | 0 | ||||
-rw-r--r-- | osdep/mac/swift_bridge.h (renamed from osdep/macOS_swift_bridge.h) | 4 | ||||
-rw-r--r-- | osdep/mac/swift_compat.swift (renamed from osdep/macos/swift_compat.swift) | 0 | ||||
-rw-r--r-- | osdep/mac/swift_extensions.swift (renamed from osdep/macos/swift_extensions.swift) | 0 | ||||
-rw-r--r-- | osdep/mac/touchbar.h (renamed from osdep/macosx_touchbar.h) | 2 | ||||
-rw-r--r-- | osdep/mac/touchbar.m (renamed from osdep/macosx_touchbar.m) | 2 | ||||
-rw-r--r-- | osdep/main-fn-mac.c (renamed from osdep/main-fn-cocoa.c) | 2 | ||||
-rw-r--r-- | osdep/path-mac.m (renamed from osdep/path-macosx.m) | 2 | ||||
-rw-r--r-- | osdep/path.h | 2 | ||||
-rw-r--r-- | osdep/semaphore-mac.c (renamed from osdep/semaphore_osx.c) | 0 | ||||
-rw-r--r-- | osdep/threads-posix.h | 4 | ||||
-rw-r--r-- | osdep/utils-mac.c (renamed from osdep/apple_utils.c) | 2 | ||||
-rw-r--r-- | osdep/utils-mac.h (renamed from osdep/apple_utils.h) | 6 |
28 files changed, 45 insertions, 45 deletions
diff --git a/osdep/language-apple.c b/osdep/language-mac.c index dc83fb545a..32a94ae14d 100644 --- a/osdep/language-apple.c +++ b/osdep/language-mac.c @@ -19,7 +19,7 @@ #include "misc/language.h" -#include "apple_utils.h" +#include "utils-mac.h" #include "mpv_talloc.h" char **mp_get_user_langs(void) diff --git a/osdep/macosx_application.h b/osdep/mac/application.h index 646cbc9b8a..9d86f9e312 100644 --- a/osdep/macosx_application.h +++ b/osdep/mac/application.h @@ -15,10 +15,10 @@ * License along with mpv. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MPV_MACOSX_APPLICATION -#define MPV_MACOSX_APPLICATION +#ifndef MAC_APPLICATION +#define MAC_APPLICATION -#include "osdep/macosx_menubar.h" +#include "osdep/mac/menubar.h" #include "options/m_option.h" enum { @@ -51,4 +51,4 @@ void cocoa_register_menu_item_action(MPMenuKey key, void* action); extern const struct m_sub_options macos_conf; -#endif /* MPV_MACOSX_APPLICATION */ +#endif /* MAC_APPLICATION */ diff --git a/osdep/macosx_application.m b/osdep/mac/application.m index 2ef597c0fc..5938180a85 100644 --- a/osdep/macosx_application.m +++ b/osdep/mac/application.m @@ -25,16 +25,16 @@ #include "options/m_config.h" #include "options/options.h" -#import "osdep/macosx_application_objc.h" -#import "osdep/macosx_events_objc.h" +#import "osdep/mac/application_objc.h" +#import "osdep/mac/events_objc.h" #include "osdep/threads.h" #include "osdep/main-fn.h" #if HAVE_MACOS_TOUCHBAR -#import "osdep/macosx_touchbar.h" +#import "osdep/mac/touchbar.h" #endif #if HAVE_SWIFT -#include "osdep/macOS_swift.h" +#include "osdep/mac/swift.h" #endif #define MPV_PROTOCOL @"mpv://" @@ -145,15 +145,15 @@ static void terminate_cocoa_application(void) [super dealloc]; } -static const char macosx_icon[] = +static const char mac_icon[] = #include "TOOLS/osxbundle/icon.icns.inc" ; - (NSImage *)getMPVIcon { // The C string contains a trailing null, so we strip it away - NSData *icon_data = [NSData dataWithBytesNoCopy:(void *)macosx_icon - length:sizeof(macosx_icon) - 1 + NSData *icon_data = [NSData dataWithBytesNoCopy:(void *)mac_icon + length:sizeof(mac_icon) - 1 freeWhenDone:NO]; return [[NSImage alloc] initWithData:icon_data]; } diff --git a/osdep/macosx_application_objc.h b/osdep/mac/application_objc.h index da8c73268b..ad4f13ec5d 100644 --- a/osdep/macosx_application_objc.h +++ b/osdep/mac/application_objc.h @@ -16,8 +16,8 @@ */ #import <Cocoa/Cocoa.h> -#include "osdep/macosx_application.h" -#import "osdep/macosx_menubar_objc.h" +#include "osdep/mac/application.h" +#import "osdep/mac/menubar_objc.h" @class CocoaCB; struct mpv_event; diff --git a/osdep/macosx_events.h b/osdep/mac/events.h index 79f2705a2e..1767b28778 100644 --- a/osdep/macosx_events.h +++ b/osdep/mac/events.h @@ -17,8 +17,8 @@ * License along with mpv. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MACOSX_EVENTS_H -#define MACOSX_EVENTS_H +#ifndef MAC_EVENTS +#define MAC_EVENTS #include "input/keycodes.h" struct input_ctx; diff --git a/osdep/macosx_events.m b/osdep/mac/events.m index e7f738f2b2..50d9242ca6 100644 --- a/osdep/macosx_events.m +++ b/osdep/mac/events.m @@ -33,13 +33,13 @@ // doesn't make much sense, but needed to access keymap functionality #include "video/out/vo.h" -#import "osdep/macosx_events_objc.h" -#import "osdep/macosx_application_objc.h" +#import "osdep/mac/events_objc.h" +#import "osdep/mac/application_objc.h" #include "config.h" #if HAVE_SWIFT -#include "osdep/macOS_swift.h" +#include "osdep/mac/swift.h" #endif @interface EventsResponder () diff --git a/osdep/macosx_events_objc.h b/osdep/mac/events_objc.h index 9394fe7160..263f1ed118 100644 --- a/osdep/macosx_events_objc.h +++ b/osdep/mac/events_objc.h @@ -18,7 +18,7 @@ */ #import <Cocoa/Cocoa.h> -#include "osdep/macosx_events.h" +#include "osdep/mac/events.h" @class RemoteCommandCenter; struct input_ctx; diff --git a/osdep/macos/libmpv_helper.swift b/osdep/mac/libmpv_helper.swift index 4bead84c69..4bead84c69 100644 --- a/osdep/macos/libmpv_helper.swift +++ b/osdep/mac/libmpv_helper.swift diff --git a/osdep/macos/log_helper.swift b/osdep/mac/log_helper.swift index 94640756bd..94640756bd 100644 --- a/osdep/macos/log_helper.swift +++ b/osdep/mac/log_helper.swift diff --git a/osdep/macosx_menubar.h b/osdep/mac/menubar.h index 509083dd20..65e3dda34a 100644 --- a/osdep/macosx_menubar.h +++ b/osdep/mac/menubar.h @@ -15,8 +15,8 @@ * License along with mpv. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MPV_MACOSX_MENU -#define MPV_MACOSX_MENU +#ifndef MAC_MENUBAR +#define MAC_MENUBAR // Menu Keys identifying menu items typedef enum { @@ -27,4 +27,4 @@ typedef enum { MPM_ZOOM, } MPMenuKey; -#endif /* MPV_MACOSX_MENU */ +#endif /* MAC_MENUBAR */ diff --git a/osdep/macosx_menubar.m b/osdep/mac/menubar.m index 8aaf5aae41..6a4ea96afe 100644 --- a/osdep/macosx_menubar.m +++ b/osdep/mac/menubar.m @@ -18,8 +18,8 @@ #include "config.h" #include "common/common.h" -#import "macosx_menubar_objc.h" -#import "osdep/macosx_application_objc.h" +#import "osdep/mac/menubar_objc.h" +#import "osdep/mac/application_objc.h" @implementation MenuBar { diff --git a/osdep/macosx_menubar_objc.h b/osdep/mac/menubar_objc.h index 072fef85c7..6278916c02 100644 --- a/osdep/macosx_menubar_objc.h +++ b/osdep/mac/menubar_objc.h @@ -16,7 +16,7 @@ */ #import <Cocoa/Cocoa.h> -#include "osdep/macosx_menubar.h" +#include "osdep/mac/menubar.h" @interface MenuBar : NSObject diff --git a/osdep/meson.build b/osdep/mac/meson.build index 21baafccdd..fca38e5282 100644 --- a/osdep/meson.build +++ b/osdep/mac/meson.build @@ -1,8 +1,8 @@ # custom swift targets -bridge = join_paths(source_root, 'osdep/macOS_swift_bridge.h') -header = join_paths(build_root, 'osdep/macOS_swift.h') -module = join_paths(build_root, 'osdep/macOS_swift.swiftmodule') -target = join_paths(build_root, 'osdep/macOS_swift.o') +bridge = join_paths(source_root, 'osdep/mac/swift_bridge.h') +header = join_paths(build_root, 'osdep/mac/swift.h') +module = join_paths(build_root, 'osdep/mac/swift.swiftmodule') +target = join_paths(build_root, 'osdep/mac/swift.o') swift_flags = ['-frontend', '-c', '-sdk', macos_sdk_path, '-enable-objc-interop', '-emit-objc-header', '-parse-as-library'] @@ -22,7 +22,7 @@ endif extra_flags = get_option('swift-flags').split() swift_flags += extra_flags -swift_compile = [swift_prog, swift_flags, '-module-name', 'macOS_swift', +swift_compile = [swift_prog, swift_flags, '-module-name', 'swift', '-emit-module-path', '@OUTPUT0@', '-import-objc-header', bridge, '-emit-objc-header-path', '@OUTPUT1@', '-o', '@OUTPUT2@', '@INPUT@', '-I.', '-I' + source_root, @@ -31,7 +31,7 @@ swift_compile = [swift_prog, swift_flags, '-module-name', 'macOS_swift', swift_targets = custom_target('swift_targets', input: swift_sources, - output: ['macOS_swift.swiftmodule', 'macOS_swift.h', 'macOS_swift.o'], + output: ['swift.swiftmodule', 'swift.h', 'swift.o'], command: swift_compile, ) sources += swift_targets diff --git a/osdep/macos/mpv_helper.swift b/osdep/mac/mpv_helper.swift index 53ef4cb521..53ef4cb521 100644 --- a/osdep/macos/mpv_helper.swift +++ b/osdep/mac/mpv_helper.swift diff --git a/osdep/macos/precise_timer.swift b/osdep/mac/precise_timer.swift index f4ad3bb6b6..f4ad3bb6b6 100644 --- a/osdep/macos/precise_timer.swift +++ b/osdep/mac/precise_timer.swift diff --git a/osdep/macos/remote_command_center.swift b/osdep/mac/remote_command_center.swift index f6613a1f9a..f6613a1f9a 100644 --- a/osdep/macos/remote_command_center.swift +++ b/osdep/mac/remote_command_center.swift diff --git a/osdep/macOS_swift_bridge.h b/osdep/mac/swift_bridge.h index 72be85274a..a32d046d9e 100644 --- a/osdep/macOS_swift_bridge.h +++ b/osdep/mac/swift_bridge.h @@ -30,8 +30,8 @@ #include "input/event.h" #include "video/out/win_state.h" -#include "osdep/macosx_application_objc.h" -#include "osdep/macosx_events_objc.h" +#include "osdep/mac/application_objc.h" +#include "osdep/mac/events_objc.h" // complex macros won't get imported to Swift so we have to reassign them diff --git a/osdep/macos/swift_compat.swift b/osdep/mac/swift_compat.swift index 83059dae5c..83059dae5c 100644 --- a/osdep/macos/swift_compat.swift +++ b/osdep/mac/swift_compat.swift diff --git a/osdep/macos/swift_extensions.swift b/osdep/mac/swift_extensions.swift index c0a7cd95e4..c0a7cd95e4 100644 --- a/osdep/macos/swift_extensions.swift +++ b/osdep/mac/swift_extensions.swift diff --git a/osdep/macosx_touchbar.h b/osdep/mac/touchbar.h index a03b68c0e6..38c4672a9b 100644 --- a/osdep/macosx_touchbar.h +++ b/osdep/mac/touchbar.h @@ -16,7 +16,7 @@ */ #import <Cocoa/Cocoa.h> -#import "osdep/macosx_application_objc.h" +#import "osdep/mac/application_objc.h" #define BASE_ID @"io.mpv.touchbar" static NSTouchBarCustomizationIdentifier customID = BASE_ID; diff --git a/osdep/macosx_touchbar.m b/osdep/mac/touchbar.m index d70324bd1c..ce92c6cfc9 100644 --- a/osdep/macosx_touchbar.m +++ b/osdep/mac/touchbar.m @@ -16,7 +16,7 @@ */ #include "player/client.h" -#import "macosx_touchbar.h" +#import "osdep/mac/touchbar.h" @implementation TouchBar diff --git a/osdep/main-fn-cocoa.c b/osdep/main-fn-mac.c index eeed127ead..356f767911 100644 --- a/osdep/main-fn-cocoa.c +++ b/osdep/main-fn-mac.c @@ -1,4 +1,4 @@ -#include "osdep/macosx_application.h" +#include "osdep/mac/application.h" // This is needed because Cocoa absolutely requires creating the NSApplication // singleton and running it in the "main" thread. It is apparently not diff --git a/osdep/path-macosx.m b/osdep/path-mac.m index 8a5a704e49..2054269e7b 100644 --- a/osdep/path-macosx.m +++ b/osdep/path-mac.m @@ -19,7 +19,7 @@ #include "options/path.h" #include "osdep/path.h" -const char *mp_get_platform_path_osx(void *talloc_ctx, const char *type) +const char *mp_get_platform_path_mac(void *talloc_ctx, const char *type) { if (strcmp(type, "osxbundle") == 0 && getenv("MPVBUNDLE")) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; diff --git a/osdep/path.h b/osdep/path.h index a9b9a3237f..c5540e4352 100644 --- a/osdep/path.h +++ b/osdep/path.h @@ -26,7 +26,7 @@ typedef const char *(*mp_get_platform_path_cb)(void *talloc_ctx, const char *typ const char *mp_get_platform_path_darwin(void *talloc_ctx, const char *type); const char *mp_get_platform_path_uwp(void *talloc_ctx, const char *type); const char *mp_get_platform_path_win(void *talloc_ctx, const char *type); -const char *mp_get_platform_path_osx(void *talloc_ctx, const char *type); +const char *mp_get_platform_path_mac(void *talloc_ctx, const char *type); const char *mp_get_platform_path_unix(void *talloc_ctx, const char *type); #endif diff --git a/osdep/semaphore_osx.c b/osdep/semaphore-mac.c index bfb4d571f0..bfb4d571f0 100644 --- a/osdep/semaphore_osx.c +++ b/osdep/semaphore-mac.c diff --git a/osdep/threads-posix.h b/osdep/threads-posix.h index 4cda0bebfc..b930506958 100644 --- a/osdep/threads-posix.h +++ b/osdep/threads-posix.h @@ -23,7 +23,7 @@ #include "common/common.h" #include "config.h" -// We make use of NON-POSIX pthreads functions and certain systems +// We make use of NON-POSIX pthreads functions and certain systems // require this header to build without issues. (ex: OpenBSD) #if HAVE_BSD_THREAD_NAME #include <pthread_np.h> @@ -235,7 +235,7 @@ static inline void mp_thread_set_name(const char *name) } #elif HAVE_BSD_THREAD_NAME pthread_set_name_np(pthread_self(), name); -#elif HAVE_OSX_THREAD_NAME +#elif HAVE_MAC_THREAD_NAME pthread_setname_np(name); #endif } diff --git a/osdep/apple_utils.c b/osdep/utils-mac.c index 02cdfaa95a..6acddfb808 100644 --- a/osdep/apple_utils.c +++ b/osdep/utils-mac.c @@ -17,7 +17,7 @@ * License along with mpv. If not, see <http://www.gnu.org/licenses/>. */ -#include "apple_utils.h" +#include "utils-mac.h" #include "mpv_talloc.h" diff --git a/osdep/apple_utils.h b/osdep/utils-mac.h index 166937e1ea..b32482533d 100644 --- a/osdep/apple_utils.h +++ b/osdep/utils-mac.h @@ -17,12 +17,12 @@ * License along with mpv. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef MPV_APPLE_UTILS -#define MPV_APPLE_UTILS +#ifndef UTILS_MAC +#define UTILS_MAC #include <CoreFoundation/CoreFoundation.h> CFStringRef cfstr_from_cstr(const char *str); char *cfstr_get_cstr(const CFStringRef cfstr); -#endif /* MPV_APPLE_UTILS */ +#endif /* UTILS_MAC */ |