2009-10-27 15:27:45 +00:00
|
|
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
|
|
|
|
2010-09-26 15:18:26 +00:00
|
|
|
#ifndef __SHELL_UTIL_H__
|
|
|
|
#define __SHELL_UTIL_H__
|
2009-07-30 04:22:18 +00:00
|
|
|
|
|
|
|
#include <gio/gio.h>
|
2010-11-17 09:59:53 +00:00
|
|
|
#include <clutter/clutter.h>
|
2012-07-19 13:05:17 +00:00
|
|
|
#include <gdk-pixbuf/gdk-pixbuf.h>
|
2013-08-13 12:22:22 +00:00
|
|
|
#include <meta/meta-cursor-tracker.h>
|
2013-09-01 20:03:59 +00:00
|
|
|
#include <meta/meta-window-actor.h>
|
2009-07-30 04:22:18 +00:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2011-03-24 14:54:46 +00:00
|
|
|
void shell_util_set_hidden_from_pick (ClutterActor *actor,
|
|
|
|
gboolean hidden);
|
2011-03-26 20:34:25 +00:00
|
|
|
|
2011-06-24 00:40:36 +00:00
|
|
|
int shell_util_get_week_start (void);
|
2011-08-10 16:58:40 +00:00
|
|
|
|
2014-10-16 12:38:13 +00:00
|
|
|
const char *shell_util_translate_time_string (const char *str);
|
2011-03-23 20:01:10 +00:00
|
|
|
|
2017-06-23 18:12:38 +00:00
|
|
|
char *shell_util_regex_escape (const char *str);
|
|
|
|
|
2011-03-24 14:54:46 +00:00
|
|
|
gboolean shell_write_string_to_stream (GOutputStream *stream,
|
|
|
|
const char *str,
|
|
|
|
GError **error);
|
2011-03-23 20:01:10 +00:00
|
|
|
|
2011-03-24 14:54:46 +00:00
|
|
|
char *shell_get_file_contents_utf8_sync (const char *path,
|
|
|
|
GError **error);
|
2011-03-23 20:01:10 +00:00
|
|
|
|
2020-03-23 16:57:38 +00:00
|
|
|
void shell_util_touch_file_async (GFile *file,
|
|
|
|
GAsyncReadyCallback callback,
|
|
|
|
gpointer user_data);
|
|
|
|
gboolean shell_util_touch_file_finish (GFile *file,
|
|
|
|
GAsyncResult *res,
|
|
|
|
GError **error);
|
|
|
|
|
2011-11-03 20:57:33 +00:00
|
|
|
gboolean shell_util_wifexited (int status,
|
|
|
|
int *exit);
|
|
|
|
|
2012-07-19 13:05:17 +00:00
|
|
|
GdkPixbuf *shell_util_create_pixbuf_from_data (const guchar *data,
|
|
|
|
gsize len,
|
|
|
|
GdkColorspace colorspace,
|
|
|
|
gboolean has_alpha,
|
|
|
|
int bits_per_sample,
|
|
|
|
int width,
|
|
|
|
int height,
|
|
|
|
int rowstride);
|
2012-03-29 19:29:48 +00:00
|
|
|
|
2016-08-19 02:47:57 +00:00
|
|
|
cairo_surface_t * shell_util_composite_capture_images (ClutterCapture *captures,
|
|
|
|
int n_captures,
|
|
|
|
int x,
|
|
|
|
int y,
|
2017-12-23 03:54:48 +00:00
|
|
|
int target_width,
|
|
|
|
int target_height,
|
|
|
|
float target_scale);
|
2016-08-19 02:47:57 +00:00
|
|
|
|
2018-07-27 16:30:22 +00:00
|
|
|
void shell_util_check_cloexec_fds (void);
|
|
|
|
|
2019-12-13 18:07:16 +00:00
|
|
|
void shell_util_start_systemd_unit (const char *unit,
|
|
|
|
const char *mode,
|
|
|
|
GCancellable *cancellable,
|
|
|
|
GAsyncReadyCallback callback,
|
|
|
|
gpointer user_data);
|
|
|
|
gboolean shell_util_start_systemd_unit_finish (GAsyncResult *res,
|
|
|
|
GError **error);
|
|
|
|
|
|
|
|
void shell_util_stop_systemd_unit (const char *unit,
|
|
|
|
const char *mode,
|
|
|
|
GCancellable *cancellable,
|
|
|
|
GAsyncReadyCallback callback,
|
|
|
|
gpointer user_data);
|
|
|
|
gboolean shell_util_stop_systemd_unit_finish (GAsyncResult *res,
|
|
|
|
GError **error);
|
2019-08-15 11:22:24 +00:00
|
|
|
|
2019-10-04 11:11:06 +00:00
|
|
|
void shell_util_sd_notify (void);
|
|
|
|
|
2019-10-01 09:55:33 +00:00
|
|
|
gboolean shell_util_has_x11_display_extension (MetaDisplay *display,
|
|
|
|
const char *extension);
|
|
|
|
|
2020-02-28 03:36:14 +00:00
|
|
|
char *shell_util_get_translated_folder_name (const char *name);
|
|
|
|
|
2018-11-22 15:03:04 +00:00
|
|
|
gint shell_util_get_uid (void);
|
|
|
|
|
2009-07-30 04:22:18 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
2010-09-26 15:18:26 +00:00
|
|
|
#endif /* __SHELL_UTIL_H__ */
|