2019-08-17 21:19:32 -04:00
|
|
|
/*
|
2020-01-06 19:42:52 -05:00
|
|
|
* Copyright (C) 2019-2020 Scoopta
|
2019-08-17 21:19:32 -04:00
|
|
|
* This file is part of Wofi
|
|
|
|
* Wofi is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
Wofi is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with Wofi. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef WAIFU_H
|
2019-08-28 02:17:18 -04:00
|
|
|
#define WAIFU_H
|
2019-08-17 21:19:32 -04:00
|
|
|
|
|
|
|
#include <map.h>
|
|
|
|
#include <config.h>
|
2019-08-28 02:15:18 -04:00
|
|
|
#include <property_box.h>
|
2019-08-17 21:19:32 -04:00
|
|
|
|
2019-09-13 03:25:25 -04:00
|
|
|
#include <dlfcn.h>
|
2019-08-17 21:19:32 -04:00
|
|
|
#include <errno.h>
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <string.h>
|
2020-01-16 19:49:57 -05:00
|
|
|
#include <libgen.h>
|
2019-08-17 21:19:32 -04:00
|
|
|
|
|
|
|
#include <sys/stat.h>
|
|
|
|
|
|
|
|
#include <gtk/gtk.h>
|
2019-12-16 21:36:21 -05:00
|
|
|
#include <pango/pango.h>
|
2019-08-17 21:19:32 -04:00
|
|
|
#include <gdk/gdkwayland.h>
|
|
|
|
#include <gio/gdesktopappinfo.h>
|
|
|
|
|
|
|
|
#include <wayland-client.h>
|
|
|
|
#include <wlr-layer-shell-unstable-v1-client-protocol.h>
|
|
|
|
|
2019-09-13 03:25:25 -04:00
|
|
|
struct cache_line {
|
|
|
|
char* line;
|
|
|
|
struct wl_list link;
|
|
|
|
};
|
|
|
|
|
2019-08-17 21:19:32 -04:00
|
|
|
void wofi_init(struct map* config);
|
2019-09-13 03:25:25 -04:00
|
|
|
|
2019-12-16 22:15:16 -05:00
|
|
|
char* wofi_parse_image_escapes(const char* text);
|
|
|
|
|
2019-11-16 17:52:20 -05:00
|
|
|
void wofi_write_cache(const gchar* mode, const gchar* cmd);
|
|
|
|
|
2020-01-02 17:36:54 -05:00
|
|
|
void wofi_remove_cache(const gchar* mode, const gchar* cmd);
|
|
|
|
|
2019-09-13 03:25:25 -04:00
|
|
|
struct wl_list* wofi_read_cache(char* mode);
|
|
|
|
|
2020-01-16 19:35:51 -05:00
|
|
|
struct widget* wofi_create_widget(char* mode, char** text, char* search_text, char** actions, size_t action_count);
|
2019-09-13 03:25:25 -04:00
|
|
|
|
2020-01-06 03:39:47 -05:00
|
|
|
bool wofi_allow_images(void);
|
2019-09-13 03:25:25 -04:00
|
|
|
|
2020-01-06 03:39:47 -05:00
|
|
|
bool wofi_allow_markup(void);
|
2019-12-16 22:38:12 -05:00
|
|
|
|
2020-01-06 03:39:47 -05:00
|
|
|
uint64_t wofi_get_image_size(void);
|
2019-09-27 02:24:48 -04:00
|
|
|
|
2020-01-06 03:39:47 -05:00
|
|
|
bool wofi_mod_shift(void);
|
2019-09-27 02:24:48 -04:00
|
|
|
|
2020-01-06 03:39:47 -05:00
|
|
|
bool wofi_mod_control(void);
|
2019-11-19 01:13:14 -05:00
|
|
|
|
2019-09-27 02:24:48 -04:00
|
|
|
void wofi_term_run(const char* cmd);
|
2019-08-17 21:19:32 -04:00
|
|
|
#endif
|