Files
diya-shell/src/shell.h
2025-07-07 20:54:28 +02:00

54 lines
2.0 KiB
C

#ifndef DIYA_SHELL_H
#define DIYA_SHELL_H
#include <gio/gio.h>
#include <gtk/gtk.h>
#include "base.h"
#define DIYA_ENV_THEME "DIYA_DEFAULT_THEME"
#define DIYA_ENV_VKB_KEYMAP "DIYA_VKB_KEYMAP"
#define DIYA_PROP_SHELL_WAYLAND "wayland"
#define DIYA_PROP_SHELL_NAME "name"
#define DIYA_PROP_SHELL_APPLICATION "application"
#define DIYA_PROP_SHELL_THEME "theme"
#define DIYA_SIGNAL_SHELL_KEYBOARD_ENTER "keyboard-enter"
#define DIYA_SIGNAL_SHELL_KEYBOARD_LEAVE "keyboard-leave"
#define DIYA_SIGNAL_SHELL_KEY_PRESSED "key-pressed"
#define DIYA_SIGNAL_SHELL_KEY_RELEASED "key-released"
#define DIYA_SIGNAL_SHELL_KEYBOARD_MODIFIER_CHANGED "keyboard-modifier-changed"
#define DIYA_TYPE_SHELL (diya_shell_get_type())
G_DECLARE_DERIVABLE_TYPE(DiyaShell, diya_shell, DIYA, SHELL, DiyaObject)
struct wl_registry;
typedef void (*wl_protocol_manager_register_t)(gpointer,DiyaShell*);
struct _DiyaShellClass
{
DiyaObjectClass parent_class;
wl_protocol_manager_register_t foreign_register;
wl_protocol_manager_register_t virtual_keyboard_register;
wl_protocol_manager_register_t idle_notifier_register;
void (*monitor_changed_handle)(GListModel* /*list*/,guint /*position*/, guint /*removed*/,guint /*added*/, gpointer);
void (*startup_handle)(DiyaShell*);
void (*active_handle)(DiyaShell*);
void (*reload_handle)(DiyaShell*);
};
USE_CLASS(DiyaWayland);
USE_CLASS(DiyaVirtualKeyboard);
DiyaWayland * diya_shell_get_wayland(DiyaShell* shell);
GtkApplication* diya_shell_get_application(DiyaShell* shell);
const char* diya_shell_get_name(DiyaShell* shell);
DiyaVirtualKeyboard* diya_shell_get_virtual_keyboard(DiyaShell* shell, const gchar* name);
void diya_shell_monitor_input(DiyaShell* shell);
gboolean diya_shell_watch_file(DiyaShell* shell, const gchar* file, GCallback callback, gpointer userdata);
void diya_shell_unwatch_file(DiyaShell* shell, const gchar* file);
void diya_shell_launch(DiyaShell* shell, GAppInfo* app);
int diya_shell_run(DiyaShell* shell, int argc, char **argv);
#endif