Top |
char * | cinnamon_util_get_label_for_uri () |
GIcon * | cinnamon_util_get_icon_for_uri () |
void | cinnamon_util_set_hidden_from_pick () |
void | cinnamon_util_get_transformed_allocation () |
int | cinnamon_util_get_week_start () |
char * | cinnamon_util_format_date () |
ClutterModifierType | cinnamon_get_event_state () |
gboolean | cinnamon_write_string_to_stream () |
char * | cinnamon_get_file_contents_utf8_sync () |
gboolean | cinnamon_get_gpu_offload_supported () |
void | (*CinnamonFileContentsCallback) () |
void | cinnamon_get_file_contents_utf8 () |
ClutterContent * | cinnamon_util_get_content_for_window_actor () |
cairo_surface_t * | cinnamon_util_composite_capture_images () |
void | cinnamon_breakpoint () |
gboolean | cinnamon_parse_search_provider () |
void | cinnamon_shader_effect_set_double_uniform () |
GIcon *
cinnamon_util_get_icon_for_uri (const char *text_uri
);
Look up the icon that should be associated with a given URI. Handles various special GNOME-internal cases like x-nautilus-search, etc.
void cinnamon_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 cinnamon_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
cinnamon_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.
char * cinnamon_util_format_date (const char *format
,gint64 time_ms
);
Formats a date for the current locale. This should be used instead of the Spidermonkey Date.toLocaleFormat() extension because Date.toLocaleFormat() is buggy for Unicode format strings: https://bugzilla.mozilla.org/show_bug.cgi?id=508783
ClutterModifierType
cinnamon_get_event_state (ClutterEvent *event
);
Gets the current state of the event (the set of modifier keys that
are pressed down). Thhis is a wrapper around
clutter_event_get_state()
that strips out any un-declared modifier
flags, to make gjs happy; see
https://bugzilla.gnome.org/show_bug.cgi?id=597292.
gboolean cinnamon_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 * cinnamon_get_file_contents_utf8_sync (const char *path
,GError **error
);
cinnamon_get_file_contents_utf8_sync
has been deprecated since version 3.1 and should not be used in newly-written code.
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
cinnamon_get_gpu_offload_supported (void
);
Performs a check to see if on-demand mode for discrete graphics is supported.
void (*CinnamonFileContentsCallback) (const gchar *utf8_contents
,gpointer user_data
);
Callback type for cinnamon_get_file_contents_utf8()
utf8_contents |
The contents of the file |
|
user_data |
Data passed to |
[closure] |
Since: 3.1
void cinnamon_get_file_contents_utf8 (const char *path
,CinnamonFileContentsCallback callback
,gpointer user_data
);
Asynchronously load the contents of a file as a NUL terminated string, validating it as UTF-8. Embedded NUL characters count as invalid content.
ClutterContent * cinnamon_util_get_content_for_window_actor (MetaWindowActor *window_actor
,MetaRectangle *window_rect
);
cairo_surface_t * cinnamon_util_composite_capture_images (ClutterCapture *captures
,int n_captures
,int x
,int y
,int target_width
,int target_height
,float target_scale
);
void
cinnamon_breakpoint (void
);
Using G_BREAKPOINT()
, interrupt the current process. This is useful
in conjunction with a debugger such as gdb.
gboolean cinnamon_parse_search_provider (const char *data
,char **name
,char **url
,GList **langs
,char **icon_data_uri
,GError **error
);
void cinnamon_shader_effect_set_double_uniform (ClutterShaderEffect *effect
,const gchar *name
,gdouble value
);
Set a double uniform on a ClutterShaderEffect.
The problem here is that JavaScript doesn't have more than one number type, and gjs tries to automatically guess what type we want to set a GValue to. If the number is "1.0" or something, it will use an integer, which will cause errors in GLSL.