mirror of
https://github.com/SK-la/osu-framework.git
synced 2026-03-15 03:20:30 +00:00
Fix xmldoc and param name
This commit is contained in:
@@ -12,31 +12,25 @@ namespace osu.Framework.Platform
|
||||
public abstract class Clipboard
|
||||
{
|
||||
/// <summary>
|
||||
/// Retrieve text from the clipboard
|
||||
/// Retrieve text from the clipboard.
|
||||
/// </summary>
|
||||
public abstract string? GetText();
|
||||
|
||||
/// <summary>
|
||||
/// Copy text to the clipboard
|
||||
/// Copy text to the clipboard.
|
||||
/// </summary>
|
||||
/// <param name="selectedText">Text to copy to the clipboard</param>
|
||||
public abstract void SetText(string selectedText);
|
||||
/// <param name="text">Text to copy to the clipboard</param>
|
||||
public abstract void SetText(string text);
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve image from the clipboard.
|
||||
/// Retrieve an image from the clipboard.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Currently only supported on Windows.
|
||||
/// </remarks>
|
||||
public abstract Image<TPixel>? GetImage<TPixel>()
|
||||
where TPixel : unmanaged, IPixel<TPixel>;
|
||||
|
||||
/// <summary>
|
||||
/// Copy the image to the clipboard.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Currently only supported on Windows.
|
||||
/// </remarks>
|
||||
/// <param name="image">The image to copy to the clipboard</param>
|
||||
/// <returns>Whether the image was successfully copied or not</returns>
|
||||
public abstract bool SetImage(Image image);
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace osu.Framework.Platform.MacOS
|
||||
|
||||
public override Image<TPixel>? GetImage<TPixel>() => Cocoa.FromNSImage<TPixel>(getFromPasteboard(Class.Get("NSImage")));
|
||||
|
||||
public override void SetText(string selectedText) => setToPasteboard(Cocoa.ToNSString(selectedText));
|
||||
public override void SetText(string text) => setToPasteboard(Cocoa.ToNSString(text));
|
||||
|
||||
public override bool SetImage(Image image) => setToPasteboard(Cocoa.ToNSImage(image));
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace osu.Framework.Platform.SDL2
|
||||
{
|
||||
public override string? GetText() => SDL.SDL_GetClipboardText();
|
||||
|
||||
public override void SetText(string selectedText) => SDL.SDL_SetClipboardText(selectedText);
|
||||
public override void SetText(string text) => SDL.SDL_SetClipboardText(text);
|
||||
|
||||
public override Image<TPixel>? GetImage<TPixel>()
|
||||
{
|
||||
|
||||
@@ -69,10 +69,10 @@ namespace osu.Framework.Platform.Windows
|
||||
return getClipboard(cf_unicodetext, bytes => Encoding.Unicode.GetString(bytes).TrimEnd('\0'));
|
||||
}
|
||||
|
||||
public override void SetText(string selectedText)
|
||||
public override void SetText(string text)
|
||||
{
|
||||
int bytes = (selectedText.Length + 1) * 2;
|
||||
var source = Marshal.StringToHGlobalUni(selectedText);
|
||||
int bytes = (text.Length + 1) * 2;
|
||||
var source = Marshal.StringToHGlobalUni(text);
|
||||
|
||||
setClipboard(source, bytes, cf_unicodetext);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user