compositor: Make shadow factory types x11 specific
As they are only used there, also make their APIs private as they are not meant to be used externally Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3979>
This commit is contained in:
parent
926d041f84
commit
255ddae7b5
8 changed files with 11 additions and 30 deletions
|
@ -68,7 +68,6 @@
|
|||
#include "meta/meta-background-actor.h"
|
||||
#include "meta/meta-background-group.h"
|
||||
#include "meta/meta-context.h"
|
||||
#include "meta/meta-shadow-factory.h"
|
||||
#include "meta/prefs.h"
|
||||
#include "meta/window.h"
|
||||
|
||||
|
|
|
@ -32,9 +32,9 @@
|
|||
#include "core/window-private.h"
|
||||
#include "meta/compositor.h"
|
||||
#include "meta/meta-enum-types.h"
|
||||
#include "meta/meta-shadow-factory.h"
|
||||
#include "meta/meta-window-actor.h"
|
||||
#include "meta/window.h"
|
||||
#include "x11/meta-shadow-factory.h"
|
||||
#include "x11/window-x11.h"
|
||||
#include "x11/meta-sync-counter.h"
|
||||
#include "x11/meta-x11-display-private.h"
|
||||
|
|
|
@ -319,7 +319,6 @@ mutter_sources = [
|
|||
'compositor/meta-plugin.c',
|
||||
'compositor/meta-plugin-manager.c',
|
||||
'compositor/meta-plugin-manager.h',
|
||||
'compositor/meta-shadow-factory.c',
|
||||
'compositor/meta-shaped-texture.c',
|
||||
'compositor/meta-shaped-texture-private.h',
|
||||
'compositor/meta-surface-actor.c',
|
||||
|
@ -332,7 +331,6 @@ mutter_sources = [
|
|||
'compositor/meta-window-drag.h',
|
||||
'compositor/meta-window-group.c',
|
||||
'compositor/meta-window-group-private.h',
|
||||
'compositor/meta-window-shape.c',
|
||||
'core/bell.c',
|
||||
'core/bell.h',
|
||||
'core/boxes.c',
|
||||
|
@ -474,10 +472,14 @@ if have_x11_client
|
|||
'x11/group-props.h',
|
||||
'x11/meta-selection-source-x11.c',
|
||||
'x11/meta-selection-source-x11-private.h',
|
||||
'x11/meta-shadow-factory.c',
|
||||
'x11/meta-shadow-factory.h',
|
||||
'x11/meta-startup-notification-x11.c',
|
||||
'x11/meta-startup-notification-x11.h',
|
||||
'x11/meta-sync-counter.c',
|
||||
'x11/meta-sync-counter.h',
|
||||
'x11/meta-window-shape.c',
|
||||
'x11/meta-window-shape.h',
|
||||
'x11/meta-x11-display.c',
|
||||
'x11/meta-x11-display-private.h',
|
||||
'x11/meta-x11-event-source.c',
|
||||
|
|
|
@ -35,14 +35,12 @@ mutter_public_headers = [
|
|||
'meta-selection-source.h',
|
||||
'meta-selection-source-memory.h',
|
||||
'meta-settings.h',
|
||||
'meta-shadow-factory.h',
|
||||
'meta-shaped-texture.h',
|
||||
'meta-sound-player.h',
|
||||
'meta-stage.h',
|
||||
'meta-startup-notification.h',
|
||||
'meta-window-actor.h',
|
||||
'meta-window-group.h',
|
||||
'meta-window-shape.h',
|
||||
'meta-workspace-manager.h',
|
||||
'prefs.h',
|
||||
'types.h',
|
||||
|
|
|
@ -21,8 +21,9 @@
|
|||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "x11/meta-shadow-factory.h"
|
||||
|
||||
#include "compositor/cogl-utils.h"
|
||||
#include "meta/meta-shadow-factory.h"
|
||||
#include "meta/util.h"
|
||||
|
||||
/* This file implements blurring the shape of a window to produce a
|
|
@ -24,9 +24,8 @@
|
|||
|
||||
#include "clutter/clutter.h"
|
||||
#include "cogl/cogl.h"
|
||||
#include "meta/meta-window-shape.h"
|
||||
#include "x11/meta-window-shape.h"
|
||||
|
||||
META_EXPORT
|
||||
GType meta_shadow_get_type (void) G_GNUC_CONST;
|
||||
|
||||
/**
|
||||
|
@ -56,7 +55,6 @@ struct _MetaShadowParams
|
|||
|
||||
#define META_TYPE_SHADOW_FACTORY (meta_shadow_factory_get_type ())
|
||||
|
||||
META_EXPORT
|
||||
G_DECLARE_FINAL_TYPE (MetaShadowFactory,
|
||||
meta_shadow_factory,
|
||||
META, SHADOW_FACTORY,
|
||||
|
@ -65,21 +63,18 @@ G_DECLARE_FINAL_TYPE (MetaShadowFactory,
|
|||
/**
|
||||
* MetaShadowFactory:
|
||||
*
|
||||
* Create window shadows.
|
||||
* Create window shadows.
|
||||
*
|
||||
* It caches shadows internally so that multiple shadows created for
|
||||
* the same shape with the same radius will share the same [struct@Meta.Shadow].
|
||||
*/
|
||||
META_EXPORT
|
||||
MetaShadowFactory *meta_shadow_factory_get_default (void);
|
||||
|
||||
META_EXPORT
|
||||
void meta_shadow_factory_set_params (MetaShadowFactory *factory,
|
||||
const char *class_name,
|
||||
gboolean focused,
|
||||
MetaShadowParams *params);
|
||||
|
||||
META_EXPORT
|
||||
void meta_shadow_factory_get_params (MetaShadowFactory *factory,
|
||||
const char *class_name,
|
||||
gboolean focused,
|
||||
|
@ -89,20 +84,17 @@ void meta_shadow_factory_get_params (MetaShadowFactory *factory,
|
|||
* MetaShadow:
|
||||
*
|
||||
* Holds a shadow texture along with information about how to
|
||||
* apply that texture to draw a window texture.
|
||||
* apply that texture to draw a window texture.
|
||||
*
|
||||
* E.g., it knows how big the unscaled borders are on each
|
||||
* side of the shadow texture.
|
||||
*/
|
||||
typedef struct _MetaShadow MetaShadow;
|
||||
|
||||
META_EXPORT
|
||||
MetaShadow *meta_shadow_ref (MetaShadow *shadow);
|
||||
|
||||
META_EXPORT
|
||||
void meta_shadow_unref (MetaShadow *shadow);
|
||||
|
||||
META_EXPORT
|
||||
void meta_shadow_paint (MetaShadow *shadow,
|
||||
CoglFramebuffer *framebuffer,
|
||||
int window_x,
|
||||
|
@ -113,7 +105,6 @@ void meta_shadow_paint (MetaShadow *shadow,
|
|||
MtkRegion *clip,
|
||||
gboolean clip_strictly);
|
||||
|
||||
META_EXPORT
|
||||
void meta_shadow_get_bounds (MetaShadow *shadow,
|
||||
int window_x,
|
||||
int window_y,
|
||||
|
@ -121,10 +112,8 @@ void meta_shadow_get_bounds (MetaShadow *shadow,
|
|||
int window_height,
|
||||
MtkRectangle *bounds);
|
||||
|
||||
META_EXPORT
|
||||
MetaShadowFactory *meta_shadow_factory_new (void);
|
||||
|
||||
META_EXPORT
|
||||
MetaShadow *meta_shadow_factory_get_shadow (MetaShadowFactory *factory,
|
||||
MetaWindowShape *shape,
|
||||
int width,
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include "meta/meta-window-shape.h"
|
||||
#include "x11/meta-window-shape.h"
|
||||
|
||||
#include <string.h>
|
||||
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
#include "meta/common.h"
|
||||
|
||||
META_EXPORT
|
||||
GType meta_window_shape_get_type (void) G_GNUC_CONST;
|
||||
|
||||
/**
|
||||
|
@ -43,30 +42,23 @@ GType meta_window_shape_get_type (void) G_GNUC_CONST;
|
|||
*/
|
||||
typedef struct _MetaWindowShape MetaWindowShape;
|
||||
|
||||
META_EXPORT
|
||||
MetaWindowShape * meta_window_shape_new (MtkRegion *region);
|
||||
|
||||
META_EXPORT
|
||||
MetaWindowShape * meta_window_shape_ref (MetaWindowShape *shape);
|
||||
|
||||
META_EXPORT
|
||||
void meta_window_shape_unref (MetaWindowShape *shape);
|
||||
|
||||
META_EXPORT
|
||||
guint meta_window_shape_hash (MetaWindowShape *shape);
|
||||
|
||||
META_EXPORT
|
||||
gboolean meta_window_shape_equal (MetaWindowShape *shape_a,
|
||||
MetaWindowShape *shape_b);
|
||||
|
||||
META_EXPORT
|
||||
void meta_window_shape_get_borders (MetaWindowShape *shape,
|
||||
int *border_top,
|
||||
int *border_right,
|
||||
int *border_bottom,
|
||||
int *border_left);
|
||||
|
||||
META_EXPORT
|
||||
MtkRegion * meta_window_shape_to_region (MetaWindowShape *shape,
|
||||
int center_width,
|
||||
int center_height);
|
Loading…
Reference in a new issue