mirror of
https://github.com/flatpak/flatpak.git
synced 2026-04-03 23:04:49 -04:00
Add utilities for showing/hiding the cursor
Closes: #2570 Approved by: alexlarsson
This commit is contained in:
committed by
Atomic Bot
parent
6aa3faadfe
commit
3598cce951
@@ -58,6 +58,8 @@ typedef enum {
|
||||
|
||||
void flatpak_get_window_size (int *rows, int *cols);
|
||||
gboolean flatpak_get_cursor_pos (int *row, int *col);
|
||||
void flatpak_hide_cursor (void);
|
||||
void flatpak_show_cursor (void);
|
||||
|
||||
/* https://bugzilla.gnome.org/show_bug.cgi?id=766370 */
|
||||
#if !GLIB_CHECK_VERSION (2, 49, 3)
|
||||
|
||||
@@ -6120,3 +6120,15 @@ flatpak_get_cursor_pos (int* row, int *col)
|
||||
|
||||
return res == 2;
|
||||
}
|
||||
|
||||
void
|
||||
flatpak_hide_cursor (void)
|
||||
{
|
||||
write (STDOUT_FILENO, FLATPAK_ANSI_HIDE_CURSOR, strlen (FLATPAK_ANSI_HIDE_CURSOR));
|
||||
}
|
||||
|
||||
void
|
||||
flatpak_show_cursor (void)
|
||||
{
|
||||
write (STDOUT_FILENO, FLATPAK_ANSI_SHOW_CURSOR, strlen (FLATPAK_ANSI_SHOW_CURSOR));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user