|
mate-desktop 1.29.2
Library with common API for various MATE modules
|
#include <config.h>#include <glib.h>#include <gio/gio.h>#include <glib/gi18n-lib.h>#include <gdk/gdk.h>#include <gtk/gtk.h>#include <mate-desktop-utils.h>#include "private.h"Macros | |
| #define | MATE_DESKTOP_USE_UNSTABLE_API |
| #define | LIGHTNESS_MULT 1.3 |
| #define | DARKNESS_MULT 0.7 |
Functions | |
| static void | gtk_style_shade (GdkRGBA *a, GdkRGBA *b, gdouble k) |
| gtk_style_shade: : the starting colour : [out] the resulting colour @k: amount to scale lightness and saturation by | |
| static void | rgb_to_hls (gdouble *r, gdouble *g, gdouble *b) |
| rgb_to_hls: @r: on input, red; on output, hue @g: on input, green; on output, lightness : on input, blue; on output, saturation | |
| static void | hls_to_rgb (gdouble *h, gdouble *l, gdouble *s) |
| hls_to_rgb: @h: on input, hue; on output, red @l: on input, lightness; on output, green @s on input, saturation; on output, blue | |
| void | mate_desktop_prepend_terminal_to_vector (int *argc, char ***argv) |
| mate_desktop_prepend_terminal_to_vector: @argc: a pointer to the vector size @argv: a pointer to the vector | |
| gboolean | mate_gdk_spawn_command_line_on_screen (GdkScreen *screen, const gchar *command, GError **error) |
| mate_gdk_spawn_command_line_on_screen: @screen: a GdkScreen @command: a command line @error: return location for errors | |
| void | _mate_desktop_init_i18n (void) |
| void | mate_desktop_gtk_style_get_light_color (GtkStyleContext *style, GtkStateFlags state, GdkRGBA *color) |
| void | mate_desktop_gtk_style_get_dark_color (GtkStyleContext *style, GtkStateFlags state, GdkRGBA *color) |
| #define DARKNESS_MULT 0.7 |
| #define LIGHTNESS_MULT 1.3 |
| #define MATE_DESKTOP_USE_UNSTABLE_API |
| void _mate_desktop_init_i18n | ( | void | ) |
|
static |
gtk_style_shade: : the starting colour : [out] the resulting colour @k: amount to scale lightness and saturation by
Takes a colour "a", scales the lightness and saturation by a certain amount, and sets "b" to the resulting colour. gtkstyle.c cut-and-pastage.
References hls_to_rgb(), and rgb_to_hls().
Referenced by mate_desktop_gtk_style_get_dark_color(), and mate_desktop_gtk_style_get_light_color().
|
static |
hls_to_rgb: @h: on input, hue; on output, red @l: on input, lightness; on output, green @s on input, saturation; on output, blue
Converts a hue/lightness/saturation triplet to a red/green/blue triplet.
Referenced by gtk_style_shade().
| void mate_desktop_gtk_style_get_dark_color | ( | GtkStyleContext * | style, |
| GtkStateFlags | state, | ||
| GdkRGBA * | color | ||
| ) |
| void mate_desktop_gtk_style_get_light_color | ( | GtkStyleContext * | style, |
| GtkStateFlags | state, | ||
| GdkRGBA * | color | ||
| ) |
| void mate_desktop_prepend_terminal_to_vector | ( | int * | argc, |
| char *** | argv | ||
| ) |
mate_desktop_prepend_terminal_to_vector: @argc: a pointer to the vector size @argv: a pointer to the vector
Prepends a terminal (either the one configured as default in the user's MATE setup, or one of the common xterm emulators) to the passed in vector, modifying it in the process. The vector should be allocated with #g_malloc, as this will #g_free the original vector. Also all elements must have been allocated separately. That is the standard glib/MATE way of doing vectors however. If the integer that @argc points to is negative, the size will first be computed. Also note that passing in pointers to a vector that is empty, will just create a new vector for you.
References _mate_desktop_init_i18n().
Referenced by ditem_execute().
| gboolean mate_gdk_spawn_command_line_on_screen | ( | GdkScreen * | screen, |
| const gchar * | command, | ||
| GError ** | error | ||
| ) |
mate_gdk_spawn_command_line_on_screen: @screen: a GdkScreen @command: a command line @error: return location for errors
This is a replacement for gdk_spawn_command_line_on_screen, deprecated in GDK 2.24 and removed in GDK 3.0.
gdk_spawn_command_line_on_screen is like g_spawn_command_line_async(), except the child process is spawned in such an environment that on calling gdk_display_open() it would be returned a GdkDisplay with screen as the default screen.
This is useful for applications which wish to launch an application on a specific screen.
Returns: TRUE on success, FALSE if error is set.
Since: 1.7.1
|
static |
rgb_to_hls: @r: on input, red; on output, hue @g: on input, green; on output, lightness : on input, blue; on output, saturation
Converts a red/green/blue triplet to a hue/lightness/saturation triplet.
Referenced by gtk_style_shade().