mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-06 01:05:48 +02:00
More cocoa functions moved into cocoa header
This commit is contained in:
@@ -9,6 +9,35 @@
|
||||
|
||||
#include "data-types.h"
|
||||
|
||||
typedef enum {
|
||||
PREFERENCES_WINDOW,
|
||||
NEW_OS_WINDOW,
|
||||
NEW_OS_WINDOW_WITH_WD,
|
||||
NEW_TAB_WITH_WD,
|
||||
CLOSE_OS_WINDOW,
|
||||
CLOSE_TAB,
|
||||
NEW_TAB,
|
||||
NEXT_TAB,
|
||||
PREVIOUS_TAB,
|
||||
DETACH_TAB,
|
||||
LAUNCH_URLS,
|
||||
NEW_WINDOW,
|
||||
CLOSE_WINDOW,
|
||||
RESET_TERMINAL,
|
||||
CLEAR_TERMINAL_AND_SCROLLBACK,
|
||||
RELOAD_CONFIG,
|
||||
TOGGLE_MACOS_SECURE_KEYBOARD_ENTRY,
|
||||
TOGGLE_FULLSCREEN,
|
||||
OPEN_KITTY_WEBSITE,
|
||||
HIDE,
|
||||
HIDE_OTHERS,
|
||||
MINIMIZE,
|
||||
QUIT,
|
||||
USER_MENU_ACTION,
|
||||
|
||||
NUM_COCOA_PENDING_ACTIONS
|
||||
} CocoaPendingAction;
|
||||
|
||||
void cocoa_focus_window(void *w);
|
||||
long cocoa_window_number(void *w);
|
||||
void cocoa_create_global_menu(void);
|
||||
@@ -27,3 +56,5 @@ size_t cocoa_get_workspace_ids(void *w, size_t *workspace_ids, size_t array_sz);
|
||||
monotonic_t cocoa_cursor_blink_interval(void);
|
||||
bool cocoa_render_line_of_text(const char *text, const color_type fg, const color_type bg, uint8_t *rgba_output, const size_t width, const size_t height);
|
||||
extern uint8_t* render_single_ascii_char_as_mask(const char ch, size_t *result_width, size_t *result_height);
|
||||
void get_cocoa_key_equivalent(uint32_t, int, char *key, size_t key_sz, int*);
|
||||
void set_cocoa_pending_action(CocoaPendingAction action, const char*);
|
||||
|
||||
@@ -604,7 +604,6 @@ apple_url_open_callback(const char* url) {
|
||||
return true;
|
||||
}
|
||||
|
||||
extern bool cocoa_render_line_of_text(const char *text, const color_type fg, const color_type bg, uint8_t *rgba_output, const size_t width, const size_t height);
|
||||
|
||||
bool
|
||||
draw_window_title(OSWindow *window UNUSED, const char *text, color_type fg, color_type bg, uint8_t *output_buf, size_t width, size_t height) {
|
||||
@@ -613,7 +612,6 @@ draw_window_title(OSWindow *window UNUSED, const char *text, color_type fg, colo
|
||||
return cocoa_render_line_of_text(buf, fg, bg, output_buf, width, height);
|
||||
}
|
||||
|
||||
extern uint8_t* render_single_ascii_char_as_mask(const char ch, size_t *result_width, size_t *result_height);
|
||||
|
||||
uint8_t*
|
||||
draw_single_ascii_char(const char ch, size_t *result_width, size_t *result_height) {
|
||||
|
||||
@@ -363,36 +363,7 @@ void set_os_window_chrome(OSWindow *w);
|
||||
FONTS_DATA_HANDLE load_fonts_data(double, double, double);
|
||||
void send_prerendered_sprites_for_window(OSWindow *w);
|
||||
#ifdef __APPLE__
|
||||
void get_cocoa_key_equivalent(uint32_t, int, char *key, size_t key_sz, int*);
|
||||
typedef enum {
|
||||
PREFERENCES_WINDOW,
|
||||
NEW_OS_WINDOW,
|
||||
NEW_OS_WINDOW_WITH_WD,
|
||||
NEW_TAB_WITH_WD,
|
||||
CLOSE_OS_WINDOW,
|
||||
CLOSE_TAB,
|
||||
NEW_TAB,
|
||||
NEXT_TAB,
|
||||
PREVIOUS_TAB,
|
||||
DETACH_TAB,
|
||||
LAUNCH_URLS,
|
||||
NEW_WINDOW,
|
||||
CLOSE_WINDOW,
|
||||
RESET_TERMINAL,
|
||||
CLEAR_TERMINAL_AND_SCROLLBACK,
|
||||
RELOAD_CONFIG,
|
||||
TOGGLE_MACOS_SECURE_KEYBOARD_ENTRY,
|
||||
TOGGLE_FULLSCREEN,
|
||||
OPEN_KITTY_WEBSITE,
|
||||
HIDE,
|
||||
HIDE_OTHERS,
|
||||
MINIMIZE,
|
||||
QUIT,
|
||||
USER_MENU_ACTION,
|
||||
|
||||
NUM_COCOA_PENDING_ACTIONS
|
||||
} CocoaPendingAction;
|
||||
void set_cocoa_pending_action(CocoaPendingAction action, const char*);
|
||||
#include "cocoa_window.h"
|
||||
#endif
|
||||
void request_frame_render(OSWindow *w);
|
||||
void request_tick_callback(void);
|
||||
|
||||
Reference in New Issue
Block a user