From e3d98796909d3a1595b75786e14f7495dc7a0ea9 Mon Sep 17 00:00:00 2001 From: planetmaker Date: Thu, 21 Jul 2011 16:13:34 +0000 Subject: (svn r22678) -Doc: More doxygen sprinkles in MacOSX code and cocoa video driver --- src/os/macosx/macos.mm | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) (limited to 'src/os/macosx/macos.mm') diff --git a/src/os/macosx/macos.mm b/src/os/macosx/macos.mm index f3d2fad30..33465d055 100644 --- a/src/os/macosx/macos.mm +++ b/src/os/macosx/macos.mm @@ -7,6 +7,8 @@ * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . */ +/** @file macos.mm Code related to MacOSX. */ + #include "../../stdafx.h" #include "../../core/bitmath_func.hpp" #include "../../rev.h" @@ -57,6 +59,13 @@ void GetMacOSVersion(int *return_major, int *return_minor, int *return_bugfix) #ifdef WITH_SDL +/** + * Show the system dialogue message (SDL on MacOSX). + * + * @param title Window title. + * @param message Message text. + * @param buttonLabel Button text. + */ void ShowMacDialog(const char *title, const char *message, const char *buttonLabel) { NSRunAlertPanel([ NSString stringWithUTF8String:title ], [ NSString stringWithUTF8String:message ], [ NSString stringWithUTF8String:buttonLabel ], nil, nil); @@ -66,6 +75,13 @@ void ShowMacDialog(const char *title, const char *message, const char *buttonLab extern void CocoaDialog(const char *title, const char *message, const char *buttonLabel); +/** + * Show the system dialogue message (Cocoa on MacOSX). + * + * @param title Window title. + * @param message Message text. + * @param buttonLabel Button text. + */ void ShowMacDialog(const char *title, const char *message, const char *buttonLabel) { CocoaDialog(title, message, buttonLabel); @@ -74,6 +90,13 @@ void ShowMacDialog(const char *title, const char *message, const char *buttonLab #else +/** + * Show the system dialogue message (console on MacOSX). + * + * @param title Window title. + * @param message Message text. + * @param buttonLabel Button text. + */ void ShowMacDialog(const char *title, const char *message, const char *buttonLabel) { fprintf(stderr, "%s: %s\n", title, message); @@ -82,6 +105,12 @@ void ShowMacDialog(const char *title, const char *message, const char *buttonLab #endif +/** + * Show an error message. + * + * @param buf error message text. + * @param system message text originates from OS. + */ void ShowOSErrorBox(const char *buf, bool system) { /* Display the error in the best way possible. */ @@ -93,7 +122,9 @@ void ShowOSErrorBox(const char *buf, bool system) } -/** Determine the current user's locale. */ +/** + * Determine and return the current user's locale. + */ const char *GetCurrentLocale(const char *) { static char retbuf[32] = { '\0' }; @@ -120,6 +151,13 @@ const char *GetCurrentLocale(const char *) #ifdef WITH_COCOA +/** + * Return the contents of the clipboard (COCOA). + * + * @param buffer Clipboard content.. + * @param buff_len Length of the clipboard content.. + * @return Whether clipboard is empty or not. + */ bool GetClipboardContents(char *buffer, size_t buff_len) { NSPasteboard *pb = [ NSPasteboard generalPasteboard ]; -- cgit v1.2.3-54-g00ecf