Top | ![]() |
![]() |
![]() |
![]() |
void | shell_util_set_hidden_from_pick () |
void | shell_util_get_transformed_allocation () |
int | shell_util_get_week_start () |
const char * | shell_util_translate_time_string () |
char * | shell_util_regex_escape () |
gboolean | shell_write_string_to_stream () |
char * | shell_get_file_contents_utf8_sync () |
gboolean | shell_util_wifexited () |
GdkPixbuf * | shell_util_create_pixbuf_from_data () |
gboolean | shell_util_need_background_refresh () |
ClutterContent * | shell_util_get_content_for_window_actor () |
cairo_surface_t * | shell_util_composite_capture_images () |
void | shell_util_check_cloexec_fds () |
gboolean | shell_util_start_systemd_unit () |
gboolean | shell_util_stop_systemd_unit () |
void | shell_util_sd_notify () |
gboolean | shell_util_has_x11_display_extension () |
char * | shell_util_get_translated_folder_name () |
void shell_util_set_hidden_from_pick (ClutterActor *actor
,gboolean hidden
);
If hidden
is TRUE
, hide actor
from pick even with a mode of
CLUTTER_PICK_ALL
; if hidden
is FALSE
, unhide actor
.
void shell_util_get_transformed_allocation (ClutterActor *actor
,ClutterActorBox *box
);
This function is similar to a combination of clutter_actor_get_transformed_position()
,
and clutter_actor_get_transformed_size()
, but unlike
clutter_actor_get_transformed_size()
, it always returns a transform
of the current allocation, while clutter_actor_get_transformed_size()
returns
bad values (the transform of the requested size) if a relayout has been
queued.
This function is more convenient to use than
clutter_actor_get_abs_allocation_vertices()
if no transformation is in effect
and also works around limitations in the GJS binding of arrays.
int
shell_util_get_week_start (void
);
Gets the first week day for the current locale, expressed as a number in the range 0..6, representing week days from Sunday to Saturday.
const char *
shell_util_translate_time_string (const char *str
);
Translate str
according to the locale defined by LC_TIME; unlike
dcgettext()
, the translations is still taken from the LC_MESSAGES
catalogue and not the LC_TIME one.
char *
shell_util_regex_escape (const char *str
);
A wrapper around g_regex_escape_string()
that takes its argument as
\0-terminated string rather than a byte-array that confuses gjs.
gboolean shell_write_string_to_stream (GOutputStream *stream
,const char *str
,GError **error
);
Write a string to a GOutputStream as UTF-8. This is a workaround for not having binary buffers in GJS.
char * shell_get_file_contents_utf8_sync (const char *path
,GError **error
);
Synchronously load the contents of a file as a NUL terminated string, validating it as UTF-8. Embedded NUL characters count as invalid content.
gboolean shell_util_wifexited (int status
,int *exit
);
Implements libc standard WIFEXITED, that cannot be used JS code.
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
);
Workaround for non-introspectability of gdk_pixbuf_from_data()
.
ClutterContent * shell_util_get_content_for_window_actor (MetaWindowActor *window_actor
,MetaRectangle *window_rect
);
cairo_surface_t * shell_util_composite_capture_images (ClutterCapture *captures
,int n_captures
,int x
,int y
,int target_width
,int target_height
,float target_scale
);
void
shell_util_check_cloexec_fds (void
);
Walk over all open file descriptors. Check them for the FD_CLOEXEC flag. If this flag is not set, log the offending file descriptor number.
It is important that gnome-shell's file descriptors are all marked CLOEXEC, so that the shell's open file descriptors are not passed to child processes that we launch.
gboolean shell_util_start_systemd_unit (const char *unit
,const char *mode
,GError **error
);
gboolean shell_util_stop_systemd_unit (const char *unit
,const char *mode
,GError **error
);
gboolean shell_util_has_x11_display_extension (MetaDisplay *display
,const char *extension
);
If the corresponding X11 display provides the passed extension, return TRUE
,
otherwise FALSE
. If there is no X11 display, FALSE
is passed.