cleanup: Adapt to removed ClutterColor
It was replaced by CoglColor Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3142>
This commit is contained in:
parent
55027bb084
commit
7f0b1e98cf
@ -1,6 +1,7 @@
|
|||||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||||
|
|
||||||
import Clutter from 'gi://Clutter';
|
import Clutter from 'gi://Clutter';
|
||||||
|
import Cogl from 'gi://Cogl';
|
||||||
import GLib from 'gi://GLib';
|
import GLib from 'gi://GLib';
|
||||||
import GObject from 'gi://GObject';
|
import GObject from 'gi://GObject';
|
||||||
import Gio from 'gi://Gio';
|
import Gio from 'gi://Gio';
|
||||||
@ -54,8 +55,8 @@ const DRAG_PAGE_SWITCH_REPEAT_TIMEOUT = 1000;
|
|||||||
|
|
||||||
const DELAYED_MOVE_TIMEOUT = 200;
|
const DELAYED_MOVE_TIMEOUT = 200;
|
||||||
|
|
||||||
const DIALOG_SHADE_NORMAL = new Clutter.Color({red: 0, green: 0, blue: 0, alpha: 204});
|
const DIALOG_SHADE_NORMAL = new Cogl.Color({red: 0, green: 0, blue: 0, alpha: 204});
|
||||||
const DIALOG_SHADE_HIGHLIGHT = new Clutter.Color({red: 0, green: 0, blue: 0, alpha: 85});
|
const DIALOG_SHADE_HIGHLIGHT = new Cogl.Color({red: 0, green: 0, blue: 0, alpha: 85});
|
||||||
|
|
||||||
const DEFAULT_FOLDERS = {
|
const DEFAULT_FOLDERS = {
|
||||||
'Utilities': {
|
'Utilities': {
|
||||||
@ -2732,7 +2733,7 @@ export const AppFolderDialog = GObject.registerClass({
|
|||||||
this.child.get_transformed_position();
|
this.child.get_transformed_position();
|
||||||
|
|
||||||
this.ease({
|
this.ease({
|
||||||
background_color: new Clutter.Color({red: 0, green: 0, blue: 0, alpha: 0}),
|
background_color: new Cogl.Color({red: 0, green: 0, blue: 0, alpha: 0}),
|
||||||
duration: FOLDER_DIALOG_ANIMATION_TIME,
|
duration: FOLDER_DIALOG_ANIMATION_TIME,
|
||||||
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
|
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
|
||||||
});
|
});
|
||||||
|
@ -94,6 +94,7 @@
|
|||||||
// MetaBackgroundImage MetaBackgroundImage
|
// MetaBackgroundImage MetaBackgroundImage
|
||||||
|
|
||||||
import Clutter from 'gi://Clutter';
|
import Clutter from 'gi://Clutter';
|
||||||
|
import Cogl from 'gi://Cogl';
|
||||||
import GDesktopEnums from 'gi://GDesktopEnums';
|
import GDesktopEnums from 'gi://GDesktopEnums';
|
||||||
import Gio from 'gi://Gio';
|
import Gio from 'gi://Gio';
|
||||||
import GLib from 'gi://GLib';
|
import GLib from 'gi://GLib';
|
||||||
@ -107,7 +108,7 @@ import * as LoginManager from '../misc/loginManager.js';
|
|||||||
import * as Main from './main.js';
|
import * as Main from './main.js';
|
||||||
import * as Params from '../misc/params.js';
|
import * as Params from '../misc/params.js';
|
||||||
|
|
||||||
const DEFAULT_BACKGROUND_COLOR = new Clutter.Color({red: 40, green: 40, blue: 40, alpha: 255});
|
const DEFAULT_BACKGROUND_COLOR = new Cogl.Color({red: 40, green: 40, blue: 40, alpha: 255});
|
||||||
|
|
||||||
const BACKGROUND_SCHEMA = 'org.gnome.desktop.background';
|
const BACKGROUND_SCHEMA = 'org.gnome.desktop.background';
|
||||||
const PRIMARY_COLOR_KEY = 'primary-color';
|
const PRIMARY_COLOR_KEY = 'primary-color';
|
||||||
@ -355,9 +356,9 @@ const Background = GObject.registerClass({
|
|||||||
let colorString, res_, color, secondColor;
|
let colorString, res_, color, secondColor;
|
||||||
|
|
||||||
colorString = this._settings.get_string(PRIMARY_COLOR_KEY);
|
colorString = this._settings.get_string(PRIMARY_COLOR_KEY);
|
||||||
[res_, color] = Clutter.Color.from_string(colorString);
|
[res_, color] = Cogl.Color.from_string(colorString);
|
||||||
colorString = this._settings.get_string(SECONDARY_COLOR_KEY);
|
colorString = this._settings.get_string(SECONDARY_COLOR_KEY);
|
||||||
[res_, secondColor] = Clutter.Color.from_string(colorString);
|
[res_, secondColor] = Cogl.Color.from_string(colorString);
|
||||||
|
|
||||||
let shadingType = this._settings.get_enum(COLOR_SHADING_TYPE_KEY);
|
let shadingType = this._settings.get_enum(COLOR_SHADING_TYPE_KEY);
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import Atspi from 'gi://Atspi';
|
import Atspi from 'gi://Atspi';
|
||||||
import Clutter from 'gi://Clutter';
|
import Clutter from 'gi://Clutter';
|
||||||
|
import Cogl from 'gi://Cogl';
|
||||||
import GDesktopEnums from 'gi://GDesktopEnums';
|
import GDesktopEnums from 'gi://GDesktopEnums';
|
||||||
import Gio from 'gi://Gio';
|
import Gio from 'gi://Gio';
|
||||||
import GLib from 'gi://GLib';
|
import GLib from 'gi://GLib';
|
||||||
@ -406,7 +407,7 @@ export class Magnifier extends Signals.EventEmitter {
|
|||||||
*/
|
*/
|
||||||
setCrosshairsColor(color) {
|
setCrosshairsColor(color) {
|
||||||
if (this._crossHairs) {
|
if (this._crossHairs) {
|
||||||
let [res_, clutterColor] = Clutter.Color.from_string(color);
|
let [res_, clutterColor] = Cogl.Color.from_string(color);
|
||||||
this._crossHairs.setColor(clutterColor);
|
this._crossHairs.setColor(clutterColor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1908,13 +1909,13 @@ class Crosshairs extends Clutter.Actor {
|
|||||||
* setColor:
|
* setColor:
|
||||||
* Set the color of the crosshairs.
|
* Set the color of the crosshairs.
|
||||||
*
|
*
|
||||||
* @param {Clutter.Color} clutterColor The color
|
* @param {Cogl.Color} color The color
|
||||||
*/
|
*/
|
||||||
setColor(clutterColor) {
|
setColor(color) {
|
||||||
this._horizLeftHair.background_color = clutterColor;
|
this._horizLeftHair.background_color = color;
|
||||||
this._horizRightHair.background_color = clutterColor;
|
this._horizRightHair.background_color = color;
|
||||||
this._vertTopHair.background_color = clutterColor;
|
this._vertTopHair.background_color = color;
|
||||||
this._vertBottomHair.background_color = clutterColor;
|
this._vertBottomHair.background_color = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2131,7 +2132,7 @@ class MagShaderEffects {
|
|||||||
|
|
||||||
// Enable the effect if the contrast OR brightness change are such that
|
// Enable the effect if the contrast OR brightness change are such that
|
||||||
// it modifies the brightness and/or contrast.
|
// it modifies the brightness and/or contrast.
|
||||||
// should be able to use Clutter.color_equal(), but that complains of
|
// should be able to use Cogl.Color.equal(), but that complains of
|
||||||
// a null first argument.
|
// a null first argument.
|
||||||
let [bRed, bGreen, bBlue] = this._brightnessContrast.get_brightness();
|
let [bRed, bGreen, bBlue] = this._brightnessContrast.get_brightness();
|
||||||
this._brightnessContrast.set_enabled(
|
this._brightnessContrast.set_enabled(
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import Atk from 'gi://Atk';
|
import Atk from 'gi://Atk';
|
||||||
import Clutter from 'gi://Clutter';
|
import Clutter from 'gi://Clutter';
|
||||||
|
import Cogl from 'gi://Cogl';
|
||||||
import Gio from 'gi://Gio';
|
import Gio from 'gi://Gio';
|
||||||
import GLib from 'gi://GLib';
|
import GLib from 'gi://GLib';
|
||||||
import GObject from 'gi://GObject';
|
import GObject from 'gi://GObject';
|
||||||
@ -818,7 +819,7 @@ export const QuickSettingsMenu = class extends PopupMenu.PopupMenu {
|
|||||||
|
|
||||||
_setDimmed(dim) {
|
_setDimmed(dim) {
|
||||||
const val = 127 * (1 + (dim ? 1 : 0) * DIM_BRIGHTNESS);
|
const val = 127 * (1 + (dim ? 1 : 0) * DIM_BRIGHTNESS);
|
||||||
const color = new Clutter.Color({
|
const color = new Cogl.Color({
|
||||||
red: val,
|
red: val,
|
||||||
green: val,
|
green: val,
|
||||||
blue: val,
|
blue: val,
|
||||||
|
@ -2877,11 +2877,11 @@ const RecolorEffect = GObject.registerClass({
|
|||||||
color: GObject.ParamSpec.boxed(
|
color: GObject.ParamSpec.boxed(
|
||||||
'color', 'color', 'replacement color',
|
'color', 'color', 'replacement color',
|
||||||
GObject.ParamFlags.WRITABLE,
|
GObject.ParamFlags.WRITABLE,
|
||||||
Clutter.Color.$gtype),
|
Cogl.Color.$gtype),
|
||||||
chroma: GObject.ParamSpec.boxed(
|
chroma: GObject.ParamSpec.boxed(
|
||||||
'chroma', 'chroma', 'color to replace',
|
'chroma', 'chroma', 'color to replace',
|
||||||
GObject.ParamFlags.WRITABLE,
|
GObject.ParamFlags.WRITABLE,
|
||||||
Clutter.Color.$gtype),
|
Cogl.Color.$gtype),
|
||||||
threshold: GObject.ParamSpec.float(
|
threshold: GObject.ParamSpec.float(
|
||||||
'threshold', 'threshold', 'threshold',
|
'threshold', 'threshold', 'threshold',
|
||||||
GObject.ParamFlags.WRITABLE,
|
GObject.ParamFlags.WRITABLE,
|
||||||
@ -2893,8 +2893,8 @@ const RecolorEffect = GObject.registerClass({
|
|||||||
},
|
},
|
||||||
}, class RecolorEffect extends Shell.GLSLEffect {
|
}, class RecolorEffect extends Shell.GLSLEffect {
|
||||||
_init(params) {
|
_init(params) {
|
||||||
this._color = new Clutter.Color();
|
this._color = new Cogl.Color();
|
||||||
this._chroma = new Clutter.Color();
|
this._chroma = new Cogl.Color();
|
||||||
this._threshold = 0;
|
this._threshold = 0;
|
||||||
this._smoothing = 0;
|
this._smoothing = 0;
|
||||||
|
|
||||||
@ -3031,7 +3031,7 @@ class PickPixel extends St.Widget {
|
|||||||
this.add_action(action);
|
this.add_action(action);
|
||||||
|
|
||||||
this._recolorEffect = new RecolorEffect({
|
this._recolorEffect = new RecolorEffect({
|
||||||
chroma: new Clutter.Color({
|
chroma: new Cogl.Color({
|
||||||
red: 80,
|
red: 80,
|
||||||
green: 219,
|
green: 219,
|
||||||
blue: 181,
|
blue: 181,
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||||
|
|
||||||
import Clutter from 'gi://Clutter';
|
import Clutter from 'gi://Clutter';
|
||||||
|
import Cogl from 'gi://Cogl';
|
||||||
import Gio from 'gi://Gio';
|
import Gio from 'gi://Gio';
|
||||||
import GLib from 'gi://GLib';
|
import GLib from 'gi://GLib';
|
||||||
import GObject from 'gi://GObject';
|
import GObject from 'gi://GObject';
|
||||||
@ -149,7 +150,7 @@ class WindowDimmer extends Clutter.BrightnessContrastEffect {
|
|||||||
|
|
||||||
setDimmed(dimmed, animate) {
|
setDimmed(dimmed, animate) {
|
||||||
let val = 127 * (1 + (dimmed ? 1 : 0) * DIM_BRIGHTNESS);
|
let val = 127 * (1 + (dimmed ? 1 : 0) * DIM_BRIGHTNESS);
|
||||||
const color = new Clutter.Color({
|
const color = new Cogl.Color({
|
||||||
red: val,
|
red: val,
|
||||||
green: val,
|
green: val,
|
||||||
blue: val,
|
blue: val,
|
||||||
|
@ -1120,7 +1120,7 @@ shell_screenshot_screenshot_window_finish (ShellScreenshot *screenshot,
|
|||||||
* @callback: (scope async): function to call returning success or failure
|
* @callback: (scope async): function to call returning success or failure
|
||||||
* of the async grabbing
|
* of the async grabbing
|
||||||
*
|
*
|
||||||
* Picks the pixel at @x, @y and returns its color as #ClutterColor.
|
* Picks the pixel at @x, @y and returns its color as #CoglColor.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
@ -1183,7 +1183,7 @@ shell_screenshot_pick_color (ShellScreenshot *screenshot,
|
|||||||
gboolean
|
gboolean
|
||||||
shell_screenshot_pick_color_finish (ShellScreenshot *screenshot,
|
shell_screenshot_pick_color_finish (ShellScreenshot *screenshot,
|
||||||
GAsyncResult *result,
|
GAsyncResult *result,
|
||||||
ClutterColor *color,
|
CoglColor *color,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
ShellScreenshotPrivate *priv;
|
ShellScreenshotPrivate *priv;
|
||||||
|
@ -70,7 +70,7 @@ void shell_screenshot_pick_color (ShellScreenshot *screenshot,
|
|||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
gboolean shell_screenshot_pick_color_finish (ShellScreenshot *screenshot,
|
gboolean shell_screenshot_pick_color_finish (ShellScreenshot *screenshot,
|
||||||
GAsyncResult *result,
|
GAsyncResult *result,
|
||||||
ClutterColor *color,
|
CoglColor *color,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
void shell_screenshot_composite_to_stream (CoglTexture *texture,
|
void shell_screenshot_composite_to_stream (CoglTexture *texture,
|
||||||
|
@ -23,7 +23,7 @@ struct _ShellTrayManager
|
|||||||
|
|
||||||
struct _ShellTrayManagerPrivate {
|
struct _ShellTrayManagerPrivate {
|
||||||
NaTrayManager *na_manager;
|
NaTrayManager *na_manager;
|
||||||
ClutterColor bg_color;
|
CoglColor bg_color;
|
||||||
|
|
||||||
GHashTable *icons;
|
GHashTable *icons;
|
||||||
StWidget *theme_widget;
|
StWidget *theme_widget;
|
||||||
@ -53,7 +53,7 @@ G_DEFINE_TYPE_WITH_PRIVATE (ShellTrayManager, shell_tray_manager, G_TYPE_OBJECT)
|
|||||||
|
|
||||||
static guint shell_tray_manager_signals [LAST_SIGNAL] = { 0 };
|
static guint shell_tray_manager_signals [LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
static const ClutterColor default_color = { 0x00, 0x00, 0x00, 0xff };
|
static const CoglColor default_color = { 0x00, 0x00, 0x00, 0xff };
|
||||||
|
|
||||||
static void shell_tray_manager_release_resources (ShellTrayManager *manager);
|
static void shell_tray_manager_release_resources (ShellTrayManager *manager);
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ shell_tray_manager_set_property(GObject *object,
|
|||||||
{
|
{
|
||||||
case PROP_BG_COLOR:
|
case PROP_BG_COLOR:
|
||||||
{
|
{
|
||||||
ClutterColor *color = g_value_get_boxed (value);
|
CoglColor *color = g_value_get_boxed (value);
|
||||||
if (color)
|
if (color)
|
||||||
manager->priv->bg_color = *color;
|
manager->priv->bg_color = *color;
|
||||||
else
|
else
|
||||||
@ -176,7 +176,7 @@ shell_tray_manager_class_init (ShellTrayManagerClass *klass)
|
|||||||
g_param_spec_boxed ("bg-color",
|
g_param_spec_boxed ("bg-color",
|
||||||
"BG Color",
|
"BG Color",
|
||||||
"Background color (only if we don't have transparency)",
|
"Background color (only if we don't have transparency)",
|
||||||
CLUTTER_TYPE_COLOR,
|
COGL_TYPE_COLOR,
|
||||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
|
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -245,7 +245,7 @@ st_entry_style_changed (StWidget *self)
|
|||||||
StEntryPrivate *priv = ST_ENTRY_PRIV (self);
|
StEntryPrivate *priv = ST_ENTRY_PRIV (self);
|
||||||
StThemeNode *theme_node;
|
StThemeNode *theme_node;
|
||||||
StShadow *shadow_spec;
|
StShadow *shadow_spec;
|
||||||
ClutterColor color;
|
CoglColor color;
|
||||||
gdouble size;
|
gdouble size;
|
||||||
|
|
||||||
theme_node = st_widget_get_theme_node (self);
|
theme_node = st_widget_get_theme_node (self);
|
||||||
|
@ -112,10 +112,10 @@ st_icon_colors_equal (StIconColors *colors,
|
|||||||
if (colors == NULL || other == NULL)
|
if (colors == NULL || other == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
return clutter_color_equal (&colors->foreground, &other->foreground) &&
|
return cogl_color_equal (&colors->foreground, &other->foreground) &&
|
||||||
clutter_color_equal (&colors->warning, &other->warning) &&
|
cogl_color_equal (&colors->warning, &other->warning) &&
|
||||||
clutter_color_equal (&colors->error, &other->error) &&
|
cogl_color_equal (&colors->error, &other->error) &&
|
||||||
clutter_color_equal (&colors->success, &other->success);
|
cogl_color_equal (&colors->success, &other->success);
|
||||||
}
|
}
|
||||||
|
|
||||||
G_DEFINE_BOXED_TYPE (StIconColors,
|
G_DEFINE_BOXED_TYPE (StIconColors,
|
||||||
|
@ -21,10 +21,10 @@ typedef struct _StIconColors StIconColors;
|
|||||||
* icon.
|
* icon.
|
||||||
*/
|
*/
|
||||||
struct _StIconColors {
|
struct _StIconColors {
|
||||||
ClutterColor foreground;
|
CoglColor foreground;
|
||||||
ClutterColor warning;
|
CoglColor warning;
|
||||||
ClutterColor error;
|
CoglColor error;
|
||||||
ClutterColor success;
|
CoglColor success;
|
||||||
};
|
};
|
||||||
|
|
||||||
GType st_icon_colors_get_type (void) G_GNUC_CONST;
|
GType st_icon_colors_get_type (void) G_GNUC_CONST;
|
||||||
|
@ -3638,7 +3638,7 @@ symbolic_cache_get_proxy (SymbolicPixbufCache *symbolic_cache,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
color_to_string_noalpha (const ClutterColor *color)
|
color_to_string_noalpha (const CoglColor *color)
|
||||||
{
|
{
|
||||||
return g_strdup_printf ("rgb(%d,%d,%d)",
|
return g_strdup_printf ("rgb(%d,%d,%d)",
|
||||||
color->red,
|
color->red,
|
||||||
@ -3647,8 +3647,8 @@ color_to_string_noalpha (const ClutterColor *color)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
color_to_pixel(const ClutterColor *color,
|
color_to_pixel(const CoglColor *color,
|
||||||
uint8_t pixel[4])
|
uint8_t pixel[4])
|
||||||
{
|
{
|
||||||
pixel[0] = color->red;
|
pixel[0] = color->red;
|
||||||
pixel[1] = color->green;
|
pixel[1] = color->green;
|
||||||
|
@ -111,7 +111,7 @@ _st_set_text_from_style (ClutterText *text,
|
|||||||
StThemeNode *theme_node)
|
StThemeNode *theme_node)
|
||||||
{
|
{
|
||||||
|
|
||||||
ClutterColor color;
|
CoglColor color;
|
||||||
StTextDecoration decoration;
|
StTextDecoration decoration;
|
||||||
PangoAttrList *attribs = NULL;
|
PangoAttrList *attribs = NULL;
|
||||||
const PangoFontDescription *font;
|
const PangoFontDescription *font;
|
||||||
|
@ -50,7 +50,7 @@ G_DEFINE_BOXED_TYPE (StShadowHelper, st_shadow_helper, st_shadow_helper_copy, st
|
|||||||
* Returns: the newly allocated shadow. Use st_shadow_free() when done
|
* Returns: the newly allocated shadow. Use st_shadow_free() when done
|
||||||
*/
|
*/
|
||||||
StShadow *
|
StShadow *
|
||||||
st_shadow_new (ClutterColor *color,
|
st_shadow_new (CoglColor *color,
|
||||||
gdouble xoffset,
|
gdouble xoffset,
|
||||||
gdouble yoffset,
|
gdouble yoffset,
|
||||||
gdouble blur,
|
gdouble blur,
|
||||||
@ -130,7 +130,7 @@ st_shadow_equal (StShadow *shadow,
|
|||||||
* that a few false negatives are mostly harmless.
|
* that a few false negatives are mostly harmless.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
return (clutter_color_equal (&shadow->color, &other->color) &&
|
return (cogl_color_equal (&shadow->color, &other->color) &&
|
||||||
shadow->xoffset == other->xoffset &&
|
shadow->xoffset == other->xoffset &&
|
||||||
shadow->yoffset == other->yoffset &&
|
shadow->yoffset == other->yoffset &&
|
||||||
shadow->blur == other->blur &&
|
shadow->blur == other->blur &&
|
||||||
|
@ -45,7 +45,7 @@ typedef struct _StShadowHelper StShadowHelper;
|
|||||||
* Attributes of the -st-shadow property.
|
* Attributes of the -st-shadow property.
|
||||||
*/
|
*/
|
||||||
struct _StShadow {
|
struct _StShadow {
|
||||||
ClutterColor color;
|
CoglColor color;
|
||||||
gdouble xoffset;
|
gdouble xoffset;
|
||||||
gdouble yoffset;
|
gdouble yoffset;
|
||||||
gdouble blur;
|
gdouble blur;
|
||||||
@ -55,7 +55,7 @@ struct _StShadow {
|
|||||||
|
|
||||||
GType st_shadow_get_type (void) G_GNUC_CONST;
|
GType st_shadow_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
StShadow *st_shadow_new (ClutterColor *color,
|
StShadow *st_shadow_new (CoglColor *color,
|
||||||
gdouble xoffset,
|
gdouble xoffset,
|
||||||
gdouble yoffset,
|
gdouble yoffset,
|
||||||
gdouble blur,
|
gdouble blur,
|
||||||
|
@ -42,9 +42,9 @@
|
|||||||
****/
|
****/
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
ClutterColor color;
|
CoglColor color;
|
||||||
ClutterColor border_color_1;
|
CoglColor border_color_1;
|
||||||
ClutterColor border_color_2;
|
CoglColor border_color_2;
|
||||||
guint radius;
|
guint radius;
|
||||||
guint border_width_1;
|
guint border_width_1;
|
||||||
guint border_width_2;
|
guint border_width_2;
|
||||||
@ -228,7 +228,7 @@ load_corner (StTextureCache *cache,
|
|||||||
#define MULT(c,a) NORM(c*a)
|
#define MULT(c,a) NORM(c*a)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
premultiply (ClutterColor *color)
|
premultiply (CoglColor *color)
|
||||||
{
|
{
|
||||||
guint t;
|
guint t;
|
||||||
color->red = MULT (color->red, color->alpha);
|
color->red = MULT (color->red, color->alpha);
|
||||||
@ -237,7 +237,7 @@ premultiply (ClutterColor *color)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
unpremultiply (ClutterColor *color)
|
unpremultiply (CoglColor *color)
|
||||||
{
|
{
|
||||||
if (color->alpha != 0)
|
if (color->alpha != 0)
|
||||||
{
|
{
|
||||||
@ -248,13 +248,13 @@ unpremultiply (ClutterColor *color)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
over (const ClutterColor *source,
|
over (const CoglColor *source,
|
||||||
const ClutterColor *destination,
|
const CoglColor *destination,
|
||||||
ClutterColor *result)
|
CoglColor *result)
|
||||||
{
|
{
|
||||||
guint t;
|
guint t;
|
||||||
ClutterColor src = *source;
|
CoglColor src = *source;
|
||||||
ClutterColor dst = *destination;
|
CoglColor dst = *destination;
|
||||||
|
|
||||||
premultiply (&src);
|
premultiply (&src);
|
||||||
premultiply (&dst);
|
premultiply (&dst);
|
||||||
@ -418,7 +418,7 @@ st_theme_node_lookup_corner (StThemeNode *node,
|
|||||||
if (node->box_shadow == NULL)
|
if (node->box_shadow == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
else /* We still need a corner texture to render the box-shadow */
|
else /* We still need a corner texture to render the box-shadow */
|
||||||
corner.color = (ClutterColor) {0, 0, 0, 255};
|
corner.color = (CoglColor) {0, 0, 0, 255};
|
||||||
}
|
}
|
||||||
|
|
||||||
key = corner_to_string (&corner);
|
key = corner_to_string (&corner);
|
||||||
@ -569,7 +569,7 @@ get_background_position (StThemeNode *self,
|
|||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
get_arbitrary_border_color (StThemeNode *node,
|
get_arbitrary_border_color (StThemeNode *node,
|
||||||
ClutterColor *color)
|
CoglColor *color)
|
||||||
{
|
{
|
||||||
if (color)
|
if (color)
|
||||||
st_theme_node_get_border_color (node, ST_SIDE_TOP, color);
|
st_theme_node_get_border_color (node, ST_SIDE_TOP, color);
|
||||||
@ -1031,7 +1031,7 @@ st_theme_node_prerender_background (StThemeNode *node,
|
|||||||
gboolean interior_dirty;
|
gboolean interior_dirty;
|
||||||
gboolean draw_background_image_shadow = FALSE;
|
gboolean draw_background_image_shadow = FALSE;
|
||||||
gboolean has_visible_outline;
|
gboolean has_visible_outline;
|
||||||
ClutterColor border_color;
|
CoglColor border_color;
|
||||||
guint border_width[4];
|
guint border_width[4];
|
||||||
guint rowstride;
|
guint rowstride;
|
||||||
guchar *data;
|
guchar *data;
|
||||||
@ -1722,7 +1722,7 @@ st_theme_node_paint_borders (StThemeNodePaintState *state,
|
|||||||
guint max_border_radius = 0;
|
guint max_border_radius = 0;
|
||||||
guint max_width_radius[4];
|
guint max_width_radius[4];
|
||||||
int corner_id, side_id;
|
int corner_id, side_id;
|
||||||
ClutterColor border_color;
|
CoglColor border_color;
|
||||||
guint8 alpha;
|
guint8 alpha;
|
||||||
gboolean corners_are_transparent;
|
gboolean corners_are_transparent;
|
||||||
CoglColor pipeline_color;
|
CoglColor pipeline_color;
|
||||||
@ -1757,7 +1757,7 @@ st_theme_node_paint_borders (StThemeNodePaintState *state,
|
|||||||
border_width[ST_SIDE_BOTTOM] > 0 ||
|
border_width[ST_SIDE_BOTTOM] > 0 ||
|
||||||
border_width[ST_SIDE_LEFT] > 0)
|
border_width[ST_SIDE_LEFT] > 0)
|
||||||
{
|
{
|
||||||
ClutterColor effective_border;
|
CoglColor effective_border;
|
||||||
gboolean skip_corner_1, skip_corner_2;
|
gboolean skip_corner_1, skip_corner_2;
|
||||||
float rects[16];
|
float rects[16];
|
||||||
|
|
||||||
@ -2028,8 +2028,8 @@ st_theme_node_paint_sliced_shadow (StThemeNodePaintState *state,
|
|||||||
gfloat shadow_blur_radius, x_spread_factor, y_spread_factor;
|
gfloat shadow_blur_radius, x_spread_factor, y_spread_factor;
|
||||||
float rectangles[8 * 9];
|
float rectangles[8 * 9];
|
||||||
gint idx;
|
gint idx;
|
||||||
ClutterColor background_color;
|
CoglColor background_color;
|
||||||
static const ClutterColor invisible_occluded = {3, 2, 1, 0};
|
static const CoglColor invisible_occluded = {3, 2, 1, 0};
|
||||||
|
|
||||||
if (paint_opacity == 0)
|
if (paint_opacity == 0)
|
||||||
return;
|
return;
|
||||||
@ -2189,7 +2189,7 @@ st_theme_node_paint_sliced_shadow (StThemeNodePaintState *state,
|
|||||||
|
|
||||||
/* Center middle is not definitely occluded? */
|
/* Center middle is not definitely occluded? */
|
||||||
st_theme_node_get_background_color (node, &background_color);
|
st_theme_node_get_background_color (node, &background_color);
|
||||||
if (!clutter_color_equal (&background_color, &invisible_occluded) ||
|
if (!cogl_color_equal (&background_color, &invisible_occluded) ||
|
||||||
paint_opacity < 255 ||
|
paint_opacity < 255 ||
|
||||||
xoffset > shadow_blur_radius || left < 0 ||
|
xoffset > shadow_blur_radius || left < 0 ||
|
||||||
yoffset > shadow_blur_radius || top < 0)
|
yoffset > shadow_blur_radius || top < 0)
|
||||||
@ -2493,8 +2493,7 @@ st_theme_node_paint_outline (StThemeNode *node,
|
|||||||
float width, height;
|
float width, height;
|
||||||
int outline_width;
|
int outline_width;
|
||||||
float rects[16];
|
float rects[16];
|
||||||
ClutterColor outline_color, effective_outline;
|
CoglColor outline_color, effective_outline, pipeline_color;
|
||||||
CoglColor pipeline_color;
|
|
||||||
guint8 alpha;
|
guint8 alpha;
|
||||||
|
|
||||||
width = box->x2 - box->x1;
|
width = box->x2 - box->x1;
|
||||||
|
@ -37,10 +37,10 @@ struct _StThemeNode {
|
|||||||
|
|
||||||
PangoFontDescription *font_desc;
|
PangoFontDescription *font_desc;
|
||||||
|
|
||||||
ClutterColor background_color;
|
CoglColor background_color;
|
||||||
/* If gradient is set, then background_color is the gradient start */
|
/* If gradient is set, then background_color is the gradient start */
|
||||||
StGradientType background_gradient_type;
|
StGradientType background_gradient_type;
|
||||||
ClutterColor background_gradient_end;
|
CoglColor background_gradient_end;
|
||||||
|
|
||||||
int background_position_x;
|
int background_position_x;
|
||||||
int background_position_y;
|
int background_position_y;
|
||||||
@ -49,9 +49,9 @@ struct _StThemeNode {
|
|||||||
gint background_size_w;
|
gint background_size_w;
|
||||||
gint background_size_h;
|
gint background_size_h;
|
||||||
|
|
||||||
ClutterColor foreground_color;
|
CoglColor foreground_color;
|
||||||
ClutterColor border_color[4];
|
CoglColor border_color[4];
|
||||||
ClutterColor outline_color;
|
CoglColor outline_color;
|
||||||
|
|
||||||
int border_width[4];
|
int border_width[4];
|
||||||
int border_radius[4];
|
int border_radius[4];
|
||||||
|
@ -34,11 +34,11 @@
|
|||||||
static void st_theme_node_dispose (GObject *object);
|
static void st_theme_node_dispose (GObject *object);
|
||||||
static void st_theme_node_finalize (GObject *object);
|
static void st_theme_node_finalize (GObject *object);
|
||||||
|
|
||||||
static const ClutterColor BLACK_COLOR = { 0, 0, 0, 0xff };
|
static const CoglColor BLACK_COLOR = { 0, 0, 0, 0xff };
|
||||||
static const ClutterColor TRANSPARENT_COLOR = { 0, 0, 0, 0 };
|
static const CoglColor TRANSPARENT_COLOR = { 0, 0, 0, 0 };
|
||||||
static const ClutterColor DEFAULT_SUCCESS_COLOR = { 0x4e, 0x9a, 0x06, 0xff };
|
static const CoglColor DEFAULT_SUCCESS_COLOR = { 0x4e, 0x9a, 0x06, 0xff };
|
||||||
static const ClutterColor DEFAULT_WARNING_COLOR = { 0xf5, 0x79, 0x3e, 0xff };
|
static const CoglColor DEFAULT_WARNING_COLOR = { 0xf5, 0x79, 0x3e, 0xff };
|
||||||
static const ClutterColor DEFAULT_ERROR_COLOR = { 0xcc, 0x00, 0x00, 0xff };
|
static const CoglColor DEFAULT_ERROR_COLOR = { 0xcc, 0x00, 0x00, 0xff };
|
||||||
|
|
||||||
G_DEFINE_TYPE (StThemeNode, st_theme_node, G_TYPE_OBJECT)
|
G_DEFINE_TYPE (StThemeNode, st_theme_node, G_TYPE_OBJECT)
|
||||||
|
|
||||||
@ -517,8 +517,8 @@ color_component_from_double (double component)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GetFromTermResult
|
static GetFromTermResult
|
||||||
get_color_from_rgba_term (CRTerm *term,
|
get_color_from_rgba_term (CRTerm *term,
|
||||||
ClutterColor *color)
|
CoglColor *color)
|
||||||
{
|
{
|
||||||
CRTerm *arg = term->ext_content.func_param;
|
CRTerm *arg = term->ext_content.func_param;
|
||||||
CRNum *num;
|
CRNum *num;
|
||||||
@ -598,7 +598,7 @@ get_color_from_rgba_term (CRTerm *term,
|
|||||||
static GetFromTermResult
|
static GetFromTermResult
|
||||||
get_color_from_term (StThemeNode *node,
|
get_color_from_term (StThemeNode *node,
|
||||||
CRTerm *term,
|
CRTerm *term,
|
||||||
ClutterColor *color)
|
CoglColor *color)
|
||||||
{
|
{
|
||||||
CRRgb rgb;
|
CRRgb rgb;
|
||||||
enum CRStatus status;
|
enum CRStatus status;
|
||||||
@ -670,7 +670,7 @@ gboolean
|
|||||||
st_theme_node_lookup_color (StThemeNode *node,
|
st_theme_node_lookup_color (StThemeNode *node,
|
||||||
const char *property_name,
|
const char *property_name,
|
||||||
gboolean inherit,
|
gboolean inherit,
|
||||||
ClutterColor *color)
|
CoglColor *color)
|
||||||
{
|
{
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
@ -729,12 +729,12 @@ st_theme_node_lookup_color (StThemeNode *node,
|
|||||||
void
|
void
|
||||||
st_theme_node_get_color (StThemeNode *node,
|
st_theme_node_get_color (StThemeNode *node,
|
||||||
const char *property_name,
|
const char *property_name,
|
||||||
ClutterColor *color)
|
CoglColor *color)
|
||||||
{
|
{
|
||||||
if (!st_theme_node_lookup_color (node, property_name, FALSE, color))
|
if (!st_theme_node_lookup_color (node, property_name, FALSE, color))
|
||||||
{
|
{
|
||||||
g_warning ("Did not find color property '%s'", property_name);
|
g_warning ("Did not find color property '%s'", property_name);
|
||||||
memset (color, 0, sizeof (ClutterColor));
|
memset (color, 0, sizeof (CoglColor));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1353,7 +1353,7 @@ do_border_property (StThemeNode *node,
|
|||||||
{
|
{
|
||||||
const char *property_name = decl->property->stryng->str + 6; /* Skip 'border' */
|
const char *property_name = decl->property->stryng->str + 6; /* Skip 'border' */
|
||||||
StSide side = (StSide)-1;
|
StSide side = (StSide)-1;
|
||||||
ClutterColor color;
|
CoglColor color;
|
||||||
gboolean color_set = FALSE;
|
gboolean color_set = FALSE;
|
||||||
int width = 0; /* suppress warning */
|
int width = 0; /* suppress warning */
|
||||||
gboolean width_set = FALSE;
|
gboolean width_set = FALSE;
|
||||||
@ -1486,7 +1486,7 @@ do_outline_property (StThemeNode *node,
|
|||||||
CRDeclaration *decl)
|
CRDeclaration *decl)
|
||||||
{
|
{
|
||||||
const char *property_name = decl->property->stryng->str + 7; /* Skip 'outline' */
|
const char *property_name = decl->property->stryng->str + 7; /* Skip 'outline' */
|
||||||
ClutterColor color;
|
CoglColor color;
|
||||||
gboolean color_set = FALSE;
|
gboolean color_set = FALSE;
|
||||||
int width = 0; /* suppress warning */
|
int width = 0; /* suppress warning */
|
||||||
gboolean width_set = FALSE;
|
gboolean width_set = FALSE;
|
||||||
@ -1920,8 +1920,8 @@ st_theme_node_get_outline_width (StThemeNode *node)
|
|||||||
* Gets the color of @node's outline.
|
* Gets the color of @node's outline.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
st_theme_node_get_outline_color (StThemeNode *node,
|
st_theme_node_get_outline_color (StThemeNode *node,
|
||||||
ClutterColor *color)
|
CoglColor *color)
|
||||||
{
|
{
|
||||||
g_return_if_fail (ST_IS_THEME_NODE (node));
|
g_return_if_fail (ST_IS_THEME_NODE (node));
|
||||||
|
|
||||||
@ -2269,8 +2269,8 @@ _st_theme_node_ensure_background (StThemeNode *node)
|
|||||||
* Gets @node's background color.
|
* Gets @node's background color.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
st_theme_node_get_background_color (StThemeNode *node,
|
st_theme_node_get_background_color (StThemeNode *node,
|
||||||
ClutterColor *color)
|
CoglColor *color)
|
||||||
{
|
{
|
||||||
g_return_if_fail (ST_IS_THEME_NODE (node));
|
g_return_if_fail (ST_IS_THEME_NODE (node));
|
||||||
|
|
||||||
@ -2304,7 +2304,7 @@ st_theme_node_get_background_image (StThemeNode *node)
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
st_theme_node_get_foreground_color (StThemeNode *node,
|
st_theme_node_get_foreground_color (StThemeNode *node,
|
||||||
ClutterColor *color)
|
CoglColor *color)
|
||||||
{
|
{
|
||||||
g_return_if_fail (ST_IS_THEME_NODE (node));
|
g_return_if_fail (ST_IS_THEME_NODE (node));
|
||||||
|
|
||||||
@ -2353,8 +2353,8 @@ st_theme_node_get_foreground_color (StThemeNode *node,
|
|||||||
void
|
void
|
||||||
st_theme_node_get_background_gradient (StThemeNode *node,
|
st_theme_node_get_background_gradient (StThemeNode *node,
|
||||||
StGradientType *type,
|
StGradientType *type,
|
||||||
ClutterColor *start,
|
CoglColor *start,
|
||||||
ClutterColor *end)
|
CoglColor *end)
|
||||||
{
|
{
|
||||||
g_return_if_fail (ST_IS_THEME_NODE (node));
|
g_return_if_fail (ST_IS_THEME_NODE (node));
|
||||||
|
|
||||||
@ -2379,7 +2379,7 @@ st_theme_node_get_background_gradient (StThemeNode *node,
|
|||||||
void
|
void
|
||||||
st_theme_node_get_border_color (StThemeNode *node,
|
st_theme_node_get_border_color (StThemeNode *node,
|
||||||
StSide side,
|
StSide side,
|
||||||
ClutterColor *color)
|
CoglColor *color)
|
||||||
{
|
{
|
||||||
g_return_if_fail (ST_IS_THEME_NODE (node));
|
g_return_if_fail (ST_IS_THEME_NODE (node));
|
||||||
g_return_if_fail (side >= ST_SIDE_TOP && side <= ST_SIDE_LEFT);
|
g_return_if_fail (side >= ST_SIDE_TOP && side <= ST_SIDE_LEFT);
|
||||||
@ -3382,7 +3382,7 @@ _st_theme_node_apply_margins (StThemeNode *node,
|
|||||||
static GetFromTermResult
|
static GetFromTermResult
|
||||||
parse_shadow_property (StThemeNode *node,
|
parse_shadow_property (StThemeNode *node,
|
||||||
CRDeclaration *decl,
|
CRDeclaration *decl,
|
||||||
ClutterColor *color,
|
CoglColor *color,
|
||||||
gdouble *xoffset,
|
gdouble *xoffset,
|
||||||
gdouble *yoffset,
|
gdouble *yoffset,
|
||||||
gdouble *blur,
|
gdouble *blur,
|
||||||
@ -3526,7 +3526,7 @@ st_theme_node_lookup_shadow (StThemeNode *node,
|
|||||||
gboolean inherit,
|
gboolean inherit,
|
||||||
StShadow **shadow)
|
StShadow **shadow)
|
||||||
{
|
{
|
||||||
ClutterColor color = { 0., };
|
CoglColor color = { 0., };
|
||||||
gdouble xoffset = 0.;
|
gdouble xoffset = 0.;
|
||||||
gdouble yoffset = 0.;
|
gdouble yoffset = 0.;
|
||||||
gdouble blur = 0.;
|
gdouble blur = 0.;
|
||||||
@ -3769,7 +3769,7 @@ st_theme_node_get_icon_colors (StThemeNode *node)
|
|||||||
|
|
||||||
gboolean shared_with_parent;
|
gboolean shared_with_parent;
|
||||||
int i;
|
int i;
|
||||||
ClutterColor color = { 0, };
|
CoglColor color = { 0, };
|
||||||
|
|
||||||
guint still_need = FOREGROUND | WARNING | ERROR | SUCCESS;
|
guint still_need = FOREGROUND | WARNING | ERROR | SUCCESS;
|
||||||
|
|
||||||
@ -4220,14 +4220,14 @@ st_theme_node_paint_equal (StThemeNode *node,
|
|||||||
_st_theme_node_ensure_background (node);
|
_st_theme_node_ensure_background (node);
|
||||||
_st_theme_node_ensure_background (other);
|
_st_theme_node_ensure_background (other);
|
||||||
|
|
||||||
if (!clutter_color_equal (&node->background_color, &other->background_color))
|
if (!cogl_color_equal (&node->background_color, &other->background_color))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (node->background_gradient_type != other->background_gradient_type)
|
if (node->background_gradient_type != other->background_gradient_type)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (node->background_gradient_type != ST_GRADIENT_NONE &&
|
if (node->background_gradient_type != ST_GRADIENT_NONE &&
|
||||||
!clutter_color_equal (&node->background_gradient_end, &other->background_gradient_end))
|
!cogl_color_equal (&node->background_gradient_end, &other->background_gradient_end))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if ((node->background_image != NULL) &&
|
if ((node->background_image != NULL) &&
|
||||||
@ -4244,7 +4244,7 @@ st_theme_node_paint_equal (StThemeNode *node,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (node->border_width[i] > 0 &&
|
if (node->border_width[i] > 0 &&
|
||||||
!clutter_color_equal (&node->border_color[i], &other->border_color[i]))
|
!cogl_color_equal (&node->border_color[i], &other->border_color[i]))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (node->border_radius[i] != other->border_radius[i])
|
if (node->border_radius[i] != other->border_radius[i])
|
||||||
@ -4255,7 +4255,7 @@ st_theme_node_paint_equal (StThemeNode *node,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (node->outline_width > 0 &&
|
if (node->outline_width > 0 &&
|
||||||
!clutter_color_equal (&node->outline_color, &other->outline_color))
|
!cogl_color_equal (&node->outline_color, &other->outline_color))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
border_image = st_theme_node_get_border_image (node);
|
border_image = st_theme_node_get_border_image (node);
|
||||||
|
@ -204,7 +204,7 @@ GStrv st_theme_node_get_pseudo_classes (StThemeNode *node);
|
|||||||
gboolean st_theme_node_lookup_color (StThemeNode *node,
|
gboolean st_theme_node_lookup_color (StThemeNode *node,
|
||||||
const char *property_name,
|
const char *property_name,
|
||||||
gboolean inherit,
|
gboolean inherit,
|
||||||
ClutterColor *color);
|
CoglColor *color);
|
||||||
gboolean st_theme_node_lookup_double (StThemeNode *node,
|
gboolean st_theme_node_lookup_double (StThemeNode *node,
|
||||||
const char *property_name,
|
const char *property_name,
|
||||||
gboolean inherit,
|
gboolean inherit,
|
||||||
@ -229,7 +229,7 @@ gboolean st_theme_node_lookup_url (StThemeNode *node,
|
|||||||
/* Easier-to-use variants of the above, for application-level use */
|
/* Easier-to-use variants of the above, for application-level use */
|
||||||
void st_theme_node_get_color (StThemeNode *node,
|
void st_theme_node_get_color (StThemeNode *node,
|
||||||
const char *property_name,
|
const char *property_name,
|
||||||
ClutterColor *color);
|
CoglColor *color);
|
||||||
gdouble st_theme_node_get_double (StThemeNode *node,
|
gdouble st_theme_node_get_double (StThemeNode *node,
|
||||||
const char *property_name);
|
const char *property_name);
|
||||||
gdouble st_theme_node_get_length (StThemeNode *node,
|
gdouble st_theme_node_get_length (StThemeNode *node,
|
||||||
@ -242,13 +242,13 @@ GFile *st_theme_node_get_url (StThemeNode *node,
|
|||||||
/* Specific getters for particular properties: cached
|
/* Specific getters for particular properties: cached
|
||||||
*/
|
*/
|
||||||
void st_theme_node_get_background_color (StThemeNode *node,
|
void st_theme_node_get_background_color (StThemeNode *node,
|
||||||
ClutterColor *color);
|
CoglColor *color);
|
||||||
void st_theme_node_get_foreground_color (StThemeNode *node,
|
void st_theme_node_get_foreground_color (StThemeNode *node,
|
||||||
ClutterColor *color);
|
CoglColor *color);
|
||||||
void st_theme_node_get_background_gradient (StThemeNode *node,
|
void st_theme_node_get_background_gradient (StThemeNode *node,
|
||||||
StGradientType *type,
|
StGradientType *type,
|
||||||
ClutterColor *start,
|
CoglColor *start,
|
||||||
ClutterColor *end);
|
CoglColor *end);
|
||||||
|
|
||||||
GFile *st_theme_node_get_background_image (StThemeNode *node);
|
GFile *st_theme_node_get_background_image (StThemeNode *node);
|
||||||
|
|
||||||
@ -258,11 +258,11 @@ int st_theme_node_get_border_radius (StThemeNode *node,
|
|||||||
StCorner corner);
|
StCorner corner);
|
||||||
void st_theme_node_get_border_color (StThemeNode *node,
|
void st_theme_node_get_border_color (StThemeNode *node,
|
||||||
StSide side,
|
StSide side,
|
||||||
ClutterColor *color);
|
CoglColor *color);
|
||||||
|
|
||||||
int st_theme_node_get_outline_width (StThemeNode *node);
|
int st_theme_node_get_outline_width (StThemeNode *node);
|
||||||
void st_theme_node_get_outline_color (StThemeNode *node,
|
void st_theme_node_get_outline_color (StThemeNode *node,
|
||||||
ClutterColor *color);
|
CoglColor *color);
|
||||||
|
|
||||||
double st_theme_node_get_padding (StThemeNode *node,
|
double st_theme_node_get_padding (StThemeNode *node,
|
||||||
StSide side);
|
StSide side);
|
||||||
|
@ -127,11 +127,11 @@ assert_foreground_color (StThemeNode *node,
|
|||||||
const char *node_description,
|
const char *node_description,
|
||||||
const char *expected)
|
const char *expected)
|
||||||
{
|
{
|
||||||
ClutterColor color;
|
CoglColor color;
|
||||||
g_autofree char* value;
|
g_autofree char* value;
|
||||||
|
|
||||||
st_theme_node_get_foreground_color (node, &color);
|
st_theme_node_get_foreground_color (node, &color);
|
||||||
value = clutter_color_to_string (&color);
|
value = cogl_color_to_string (&color);
|
||||||
|
|
||||||
if (g_strcmp0 (expected, value) != 0)
|
if (g_strcmp0 (expected, value) != 0)
|
||||||
{
|
{
|
||||||
@ -146,11 +146,11 @@ assert_background_color (StThemeNode *node,
|
|||||||
const char *node_description,
|
const char *node_description,
|
||||||
const char *expected)
|
const char *expected)
|
||||||
{
|
{
|
||||||
ClutterColor color;
|
CoglColor color;
|
||||||
g_autofree char* value;
|
g_autofree char* value;
|
||||||
|
|
||||||
st_theme_node_get_background_color (node, &color);
|
st_theme_node_get_background_color (node, &color);
|
||||||
value = clutter_color_to_string (&color);
|
value = cogl_color_to_string (&color);
|
||||||
|
|
||||||
if (g_strcmp0 (expected, value) != 0)
|
if (g_strcmp0 (expected, value) != 0)
|
||||||
{
|
{
|
||||||
@ -184,11 +184,11 @@ assert_border_color (StThemeNode *node,
|
|||||||
StSide side,
|
StSide side,
|
||||||
const char *expected)
|
const char *expected)
|
||||||
{
|
{
|
||||||
ClutterColor color;
|
CoglColor color;
|
||||||
g_autofree char* value;
|
g_autofree char* value;
|
||||||
|
|
||||||
st_theme_node_get_border_color (node, side, &color);
|
st_theme_node_get_border_color (node, side, &color);
|
||||||
value = clutter_color_to_string (&color);
|
value = cogl_color_to_string (&color);
|
||||||
|
|
||||||
if (g_strcmp0 (expected, value) != 0)
|
if (g_strcmp0 (expected, value) != 0)
|
||||||
{
|
{
|
||||||
|
@ -71,10 +71,10 @@ struct _NaTrayManager
|
|||||||
Atom message_data_atom;
|
Atom message_data_atom;
|
||||||
|
|
||||||
Window window;
|
Window window;
|
||||||
ClutterColor fg;
|
CoglColor fg;
|
||||||
ClutterColor error;
|
CoglColor error;
|
||||||
ClutterColor warning;
|
CoglColor warning;
|
||||||
ClutterColor success;
|
CoglColor success;
|
||||||
|
|
||||||
unsigned int event_func_id;
|
unsigned int event_func_id;
|
||||||
|
|
||||||
@ -670,17 +670,17 @@ na_tray_manager_manage (NaTrayManager *manager)
|
|||||||
|
|
||||||
void
|
void
|
||||||
na_tray_manager_set_colors (NaTrayManager *manager,
|
na_tray_manager_set_colors (NaTrayManager *manager,
|
||||||
ClutterColor *fg,
|
CoglColor *fg,
|
||||||
ClutterColor *error,
|
CoglColor *error,
|
||||||
ClutterColor *warning,
|
CoglColor *warning,
|
||||||
ClutterColor *success)
|
CoglColor *success)
|
||||||
{
|
{
|
||||||
g_return_if_fail (NA_IS_TRAY_MANAGER (manager));
|
g_return_if_fail (NA_IS_TRAY_MANAGER (manager));
|
||||||
|
|
||||||
if (!clutter_color_equal (&manager->fg, fg) ||
|
if (!cogl_color_equal (&manager->fg, fg) ||
|
||||||
!clutter_color_equal (&manager->error, error) ||
|
!cogl_color_equal (&manager->error, error) ||
|
||||||
!clutter_color_equal (&manager->warning, warning) ||
|
!cogl_color_equal (&manager->warning, warning) ||
|
||||||
!clutter_color_equal (&manager->success, success))
|
!cogl_color_equal (&manager->success, success))
|
||||||
{
|
{
|
||||||
manager->fg = *fg;
|
manager->fg = *fg;
|
||||||
manager->error = *error;
|
manager->error = *error;
|
||||||
|
@ -36,10 +36,10 @@ NaTrayManager *na_tray_manager_new (MetaX11Display *x11_display);
|
|||||||
gboolean na_tray_manager_manage (NaTrayManager *manager);
|
gboolean na_tray_manager_manage (NaTrayManager *manager);
|
||||||
|
|
||||||
void na_tray_manager_set_colors (NaTrayManager *manager,
|
void na_tray_manager_set_colors (NaTrayManager *manager,
|
||||||
ClutterColor *fg,
|
CoglColor *fg,
|
||||||
ClutterColor *error,
|
CoglColor *error,
|
||||||
ClutterColor *warning,
|
CoglColor *warning,
|
||||||
ClutterColor *success);
|
CoglColor *success);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@ -841,8 +841,8 @@ get_pixel_details (unsigned long pixel_mask,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
na_xembed_set_background_color (NaXembed *xembed,
|
na_xembed_set_background_color (NaXembed *xembed,
|
||||||
const ClutterColor *color)
|
const CoglColor *color)
|
||||||
{
|
{
|
||||||
NaXembedPrivate *priv = na_xembed_get_instance_private (xembed);
|
NaXembedPrivate *priv = na_xembed_get_instance_private (xembed);
|
||||||
XVisualInfo *xvisual_info;
|
XVisualInfo *xvisual_info;
|
||||||
|
@ -59,8 +59,8 @@ void na_xembed_get_size (NaXembed *xembed,
|
|||||||
int *width,
|
int *width,
|
||||||
int *height);
|
int *height);
|
||||||
|
|
||||||
void na_xembed_set_background_color (NaXembed *xembed,
|
void na_xembed_set_background_color (NaXembed *xembed,
|
||||||
const ClutterColor *color);
|
const CoglColor *color);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user