2023-08-20 20:14:31 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2023, Tim Flynn <trflynn89@serenityos.org>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2024-02-25 19:12:21 +00:00
|
|
|
#include <AK/ByteString.h>
|
2023-08-20 20:14:31 +00:00
|
|
|
#include <AK/String.h>
|
|
|
|
#include <AK/StringView.h>
|
2023-09-29 06:28:48 +00:00
|
|
|
#include <LibGfx/Color.h>
|
2023-08-20 20:14:31 +00:00
|
|
|
#include <LibGfx/Point.h>
|
|
|
|
#include <LibGfx/Rect.h>
|
|
|
|
#include <LibGfx/Size.h>
|
|
|
|
|
2024-07-17 05:54:53 +00:00
|
|
|
#import <Cocoa/Cocoa.h>
|
2023-08-20 20:14:31 +00:00
|
|
|
|
|
|
|
namespace Ladybird {
|
|
|
|
|
|
|
|
String ns_string_to_string(NSString*);
|
2024-02-25 19:12:21 +00:00
|
|
|
ByteString ns_string_to_byte_string(NSString*);
|
2023-08-20 20:14:31 +00:00
|
|
|
NSString* string_to_ns_string(StringView);
|
|
|
|
|
2023-11-10 19:15:46 +00:00
|
|
|
NSData* string_to_ns_data(StringView);
|
|
|
|
|
2023-09-13 15:57:54 +00:00
|
|
|
NSDictionary* deserialize_json_to_dictionary(StringView);
|
|
|
|
|
2023-08-20 20:14:31 +00:00
|
|
|
Gfx::IntRect ns_rect_to_gfx_rect(NSRect);
|
|
|
|
NSRect gfx_rect_to_ns_rect(Gfx::IntRect);
|
|
|
|
|
|
|
|
Gfx::IntSize ns_size_to_gfx_size(NSSize);
|
|
|
|
NSSize gfx_size_to_ns_size(Gfx::IntSize);
|
|
|
|
|
|
|
|
Gfx::IntPoint ns_point_to_gfx_point(NSPoint);
|
|
|
|
NSPoint gfx_point_to_ns_point(Gfx::IntPoint);
|
|
|
|
|
2023-09-29 06:28:48 +00:00
|
|
|
Gfx::Color ns_color_to_gfx_color(NSColor*);
|
|
|
|
NSColor* gfx_color_to_ns_color(Gfx::Color);
|
|
|
|
|
2024-10-28 11:48:49 +00:00
|
|
|
Gfx::IntPoint compute_origin_relative_to_window(NSWindow*, Gfx::IntPoint);
|
|
|
|
|
2023-08-20 20:14:31 +00:00
|
|
|
}
|