gnome-shell/src/shell-util.h
Marco Trevisan (Treviño) 6d6c2e5b99 shell-recorder: Use clutter-computed sizes and scaling for the capture
Get from clutter the capture sizes and scale and don't mind
about doing any rounding here, as it might be different
from the one done at clutter level (causing mismatch and
not-working videos). Delegate this to clutter, and forget
about the internal details.

These values are then used to composte the image and set the video caps.

https://bugzilla.gnome.org/show_bug.cgi?id=7650111
2019-03-01 17:12:53 +00:00

65 lines
2.9 KiB
C

/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
#ifndef __SHELL_UTIL_H__
#define __SHELL_UTIL_H__
#include <gio/gio.h>
#include <clutter/clutter.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <meta/meta-cursor-tracker.h>
#include <meta/meta-window-actor.h>
G_BEGIN_DECLS
void shell_util_set_hidden_from_pick (ClutterActor *actor,
gboolean hidden);
void shell_util_get_transformed_allocation (ClutterActor *actor,
ClutterActorBox *box);
int shell_util_get_week_start (void);
char *shell_util_format_date (const char *format,
gint64 time_ms);
const char *shell_util_translate_time_string (const char *str);
char *shell_util_regex_escape (const char *str);
gboolean shell_write_string_to_stream (GOutputStream *stream,
const char *str,
GError **error);
char *shell_get_file_contents_utf8_sync (const char *path,
GError **error);
gboolean shell_util_wifexited (int status,
int *exit);
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);
gboolean shell_util_need_background_refresh (void);
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);
G_END_DECLS
#endif /* __SHELL_UTIL_H__ */