Merge branch 'master' into drag-window-down-workspace-view

This commit is contained in:
Adam Bieńkowski 2021-01-16 00:28:43 +01:00 committed by GitHub
commit 3ffef83911
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
109 changed files with 1274 additions and 6701 deletions

View File

@ -313,4 +313,29 @@
<summary>Only show corner masks on primary monitor</summary>
</key>
</schema>
<schema path="/io/elementary/desktop/wm/gestures/" id="io.elementary.desktop.wm.gestures">
<key type="b" name="multitasking-gesture-enabled">
<default>true</default>
<summary>Multitasking view gesture</summary>
<description>If enabled, swipe up with the number of fingers set in io.elementary.desktop.wm.gestures.multitasking-gesture-fingers to show the multitasking view</description>
</key>
<key type="i" name="multitasking-gesture-fingers">
<default>3</default>
<range min="3" max="4"/>
<summary>Multitasking view gesture fingers</summary>
<description>Number of fingers used in the multitasking view gesture</description>
</key>
<key type="b" name="workspaces-gesture-enabled">
<default>true</default>
<summary>Switch workspace gesture</summary>
<description>If enabled, swipe left/right with the number of fingers set in io.elementary.desktop.wm.gestures.workspaces-gesture-fingers to switch between workspaces</description>
</key>
<key type="i" name="workspaces-gesture-fingers">
<default>3</default>
<range min="3" max="4"/>
<summary>Switch workspace gesture fingers</summary>
<description>Number of fingers used in the switch workspaces gesture</description>
</key>
</schema>
</schemalist>

View File

@ -34,8 +34,11 @@ namespace Gala {
/**
* The component was requested to be closed.
*
* @param hints The hashmap may contain special parameters that are useful
* to the component.
*/
public abstract void close ();
public abstract void close (HashTable<string,Variant>? hints = null);
/**
* Should return whether the component is currently opened. Used mainly for

View File

@ -29,6 +29,7 @@ namespace Gala {
// Duration of the snap animation as used by maximize/unmaximize
SNAP = 250,
// Duration of the workspace switch animation
WORKSPACE_SWITCH = 300,
WORKSPACE_SWITCH_MIN = 300,
WORKSPACE_SWITCH = 400,
}
}

View File

@ -313,7 +313,6 @@ namespace Gala {
return container;
}
#if HAS_MUTTER330
/**
* Ring the system bell, will most likely emit a <beep> error sound or, if the
* audible bell is disabled, flash the display
@ -326,20 +325,6 @@ namespace Gala {
else
display.get_compositor ().flash_display (display);
}
#else
/**
* Ring the system bell, will most likely emit a <beep> error sound or, if the
* audible bell is disabled, flash the screen
*
* @param screen The screen to flash, if necessary
*/
public static void bell (Meta.Screen screen) {
if (Meta.Prefs.bell_is_audible ())
Gdk.beep ();
else
screen.get_display ().get_compositor ().flash_screen (screen);
}
#endif
public static int get_ui_scaling_factor () {
return Meta.Backend.get_backend ().get_settings ().get_ui_scaling_factor ();
@ -376,28 +361,18 @@ namespace Gala {
* @return The close button actor
*/
public static Clutter.Actor create_close_button () {
#if HAS_MUTTER336
var texture = new Clutter.Actor ();
#else
var texture = new Clutter.Texture ();
#endif
var pixbuf = get_close_button_pixbuf ();
texture.reactive = true;
if (pixbuf != null) {
try {
#if HAS_MUTTER336
var image = new Clutter.Image ();
Cogl.PixelFormat pixel_format = (pixbuf.get_has_alpha () ? Cogl.PixelFormat.RGBA_8888 : Cogl.PixelFormat.RGB_888);
image.set_data (pixbuf.get_pixels (), pixel_format, pixbuf.width, pixbuf.height, pixbuf.rowstride);
texture.set_content (image);
texture.set_size (pixbuf.width, pixbuf.height);
#else
texture.set_from_rgb_data (pixbuf.get_pixels (), pixbuf.get_has_alpha (),
pixbuf.get_width (), pixbuf.get_height (),
pixbuf.get_rowstride (), (pixbuf.get_has_alpha () ? 4 : 3), 0);
#endif
} catch (Error e) {}
} else {
// we'll just make this red so there's at least something as an
@ -441,28 +416,18 @@ namespace Gala {
* @return The resize button actor
*/
public static Clutter.Actor create_resize_button () {
#if HAS_MUTTER336
var texture = new Clutter.Actor ();
#else
var texture = new Clutter.Texture ();
#endif
var pixbuf = get_resize_button_pixbuf ();
texture.reactive = true;
if (pixbuf != null) {
try {
#if HAS_MUTTER336
var image = new Clutter.Image ();
Cogl.PixelFormat pixel_format = (pixbuf.get_has_alpha () ? Cogl.PixelFormat.RGBA_8888 : Cogl.PixelFormat.RGB_888);
image.set_data (pixbuf.get_pixels (), pixel_format, pixbuf.width, pixbuf.height, pixbuf.rowstride);
texture.set_content (image);
texture.set_size (pixbuf.width, pixbuf.height);
#else
texture.set_from_rgb_data (pixbuf.get_pixels (), pixbuf.get_has_alpha (),
pixbuf.get_width (), pixbuf.get_height (),
pixbuf.get_rowstride (), (pixbuf.get_has_alpha () ? 4 : 3), 0);
#endif
} catch (Error e) {}
} else {
// we'll just make this red so there's at least something as an

View File

@ -21,11 +21,7 @@ namespace Gala {
* This is recommended way to grab an icon for a window as this method will make
* sure the icon is updated if it becomes available at a later point.
*/
#if HAS_MUTTER336
public class WindowIcon : Clutter.Actor {
#else
public class WindowIcon : Clutter.Texture {
#endif
public Meta.Window window { get; construct; }
public int icon_size { get; construct; }
public int scale { get; construct; }
@ -77,16 +73,10 @@ namespace Gala {
void update_texture (bool initial) {
var pixbuf = Gala.Utils.get_icon_for_window (window, icon_size, scale);
try {
#if HAS_MUTTER336
var image = new Clutter.Image ();
Cogl.PixelFormat pixel_format = (pixbuf.get_has_alpha () ? Cogl.PixelFormat.RGBA_8888 : Cogl.PixelFormat.RGB_888);
image.set_data (pixbuf.get_pixels (), pixel_format, pixbuf.width, pixbuf.height, pixbuf.rowstride);
set_content (image);
#else
set_from_rgb_data (pixbuf.get_pixels (), pixbuf.get_has_alpha (),
pixbuf.get_width (), pixbuf.get_height (),
pixbuf.get_rowstride (), (pixbuf.get_has_alpha () ? 4 : 3), 0);
#endif
} catch (Error e) {}
}

View File

@ -106,6 +106,11 @@ namespace Gala {
*/
public abstract Meta.BackgroundGroup background_group { get; protected set; }
/**
* View that allows to see and manage all your windows and desktops.
*/
public abstract Gala.ActivatableComponent workspace_view { get; protected set; }
/**
* Whether animations should be displayed.
*/
@ -164,6 +169,7 @@ namespace Gala {
*
* @param direction The direction in which to switch
*/
public abstract void switch_to_next_workspace (Meta.MotionDirection direction);
public abstract void switch_to_next_workspace (Meta.MotionDirection direction,
HashTable<string,Variant>? hints = null);
}
}

View File

@ -98,57 +98,6 @@ libmutter_dep = []
vala_flags = []
mutter328_dep = dependency('libmutter-2', version: ['>= 3.27', '< 3.29'], required: false)
if mutter328_dep.found()
libmutter_dep = dependency('libmutter-2', version: '>= 3.27.92')
mutter_dep = [
libmutter_dep,
dependency('mutter-cogl-2'), dependency('mutter-cogl-pango-2'),
dependency('mutter-cogl-path-2'), dependency('mutter-clutter-2')
]
add_project_arguments(['-DCLUTTER_ENABLE_COMPOSITOR_API', '-DCLUTTER_ENABLE_EXPERIMENTAL_API',
'-DCOGL_ENABLE_EXPERIMENTAL_API', '-DCOGL_ENABLE_EXPERIMENTAL_2_0_API'], language: 'c')
endif
mutter330_dep = dependency('libmutter-3', version: ['>= 3.29.4', '< 3.31'], required: false)
if mutter330_dep.found()
libmutter_dep = dependency('libmutter-3', version: '>= 3.29.4')
mutter_dep = [
libmutter_dep,
dependency('mutter-cogl-3'), dependency('mutter-cogl-pango-3'),
dependency('mutter-cogl-path-3'), dependency('mutter-clutter-3')
]
vala_flags = ['--define', 'HAS_MUTTER330']
add_project_arguments(['-DCLUTTER_ENABLE_COMPOSITOR_API', '-DCLUTTER_ENABLE_EXPERIMENTAL_API',
'-DCOGL_ENABLE_EXPERIMENTAL_API', '-DCOGL_ENABLE_EXPERIMENTAL_2_0_API'], language: 'c')
endif
mutter332_dep = dependency('libmutter-4', version: ['>= 3.31.2', '< 3.34'], required: false)
if mutter332_dep.found()
libmutter_dep = dependency('libmutter-4', version: '>= 3.31.2')
mutter_dep = [
libmutter_dep,
dependency('mutter-cogl-4'), dependency('mutter-cogl-pango-4'),
dependency('mutter-cogl-path-4'), dependency('mutter-clutter-4')
]
vala_flags = ['--define', 'HAS_MUTTER330', '--define', 'HAS_MUTTER332']
add_project_arguments(['-DCLUTTER_ENABLE_COMPOSITOR_API', '-DCLUTTER_ENABLE_EXPERIMENTAL_API',
'-DCOGL_ENABLE_EXPERIMENTAL_API', '-DCOGL_ENABLE_EXPERIMENTAL_2_0_API'], language: 'c')
endif
mutter334_dep = dependency('libmutter-5', version: ['>= 3.34', '< 3.35.1'], required: false)
if mutter334_dep.found()
libmutter_dep = dependency('libmutter-5', version: '>= 3.34')
mutter_dep = [
libmutter_dep,
dependency('mutter-cogl-5'), dependency('mutter-cogl-pango-5'),
dependency('mutter-cogl-path-5'), dependency('mutter-clutter-5')
]
vala_flags = ['--define', 'HAS_MUTTER330', '--define', 'HAS_MUTTER332', '--define', 'HAS_MUTTER334']
add_project_arguments(['-DCLUTTER_ENABLE_COMPOSITOR_API', '-DCLUTTER_ENABLE_EXPERIMENTAL_API',
'-DCOGL_ENABLE_EXPERIMENTAL_API', '-DCOGL_ENABLE_EXPERIMENTAL_2_0_API'], language: 'c')
endif
mutter336_dep = dependency('libmutter-6', version: ['>= 3.35.1', '< 3.37'], required: false)
if mutter336_dep.found()
libmutter_dep = dependency('libmutter-6', version: '>= 3.35.1')
@ -157,7 +106,7 @@ if mutter336_dep.found()
dependency('mutter-cogl-6'), dependency('mutter-cogl-pango-6'),
dependency('mutter-cogl-path-6'), dependency('mutter-clutter-6')
]
vala_flags = ['--define', 'HAS_MUTTER330', '--define', 'HAS_MUTTER332', '--define', 'HAS_MUTTER334', '--define', 'HAS_MUTTER336']
vala_flags = []
add_project_arguments(['-DCLUTTER_ENABLE_COMPOSITOR_API', '-DCLUTTER_ENABLE_EXPERIMENTAL_API',
'-DCOGL_ENABLE_EXPERIMENTAL_API', '-DCOGL_ENABLE_EXPERIMENTAL_2_0_API'], language: 'c')
endif
@ -170,7 +119,7 @@ if mutter338_dep.found()
dependency('mutter-cogl-7'), dependency('mutter-cogl-pango-7'),
dependency('mutter-clutter-7')
]
vala_flags = ['--define', 'HAS_MUTTER330', '--define', 'HAS_MUTTER332', '--define', 'HAS_MUTTER334', '--define', 'HAS_MUTTER336', '--define', 'HAS_MUTTER338']
vala_flags = ['--define', 'HAS_MUTTER338']
add_project_arguments(['-DCLUTTER_ENABLE_COMPOSITOR_API', '-DCLUTTER_ENABLE_EXPERIMENTAL_API',
'-DCOGL_ENABLE_EXPERIMENTAL_API', '-DCOGL_ENABLE_EXPERIMENTAL_2_0_API'], language: 'c')
endif
@ -193,6 +142,7 @@ subdir('daemon')
subdir('plugins/maskcorners')
subdir('plugins/pip')
subdir('plugins/template')
subdir('plugins/touchegg')
subdir('plugins/zoom')
if get_option('documentation')
subdir('docs')

View File

@ -21,11 +21,7 @@ using Meta;
namespace Gala.Plugins.MaskCorners {
public class Main : Gala.Plugin {
Gala.WindowManager? wm = null;
#if HAS_MUTTER330
Display display;
#else
Screen screen;
#endif
Settings settings;
List<Actor>[] cornermasks;
@ -34,11 +30,7 @@ namespace Gala.Plugins.MaskCorners {
public override void initialize (Gala.WindowManager wm) {
this.wm = wm;
#if HAS_MUTTER330
display = wm.get_display ();
#else
screen = wm.get_screen ();
#endif
settings = Settings.get_default ();
setup_cornermasks ();
@ -56,26 +48,17 @@ namespace Gala.Plugins.MaskCorners {
var scale = Utils.get_ui_scaling_factor ();
#if HAS_MUTTER330
int n_monitors = display.get_n_monitors ();
#else
int n_monitors = screen.get_n_monitors ();
#endif
cornermasks = new List<Actor>[n_monitors];
corner_radius = DEFAULT_CORNER_RADIUS * scale;
if (settings.only_on_primary) {
#if HAS_MUTTER330
add_cornermasks (display.get_primary_monitor ());
#else
add_cornermasks (screen.get_primary_monitor ());
#endif
} else {
for (int m = 0; m < n_monitors; m++)
add_cornermasks (m);
}
#if HAS_MUTTER330
if (settings.disable_on_fullscreen)
display.in_fullscreen_changed.connect (fullscreen_changed);
@ -83,31 +66,14 @@ namespace Gala.Plugins.MaskCorners {
monitor_manager.monitors_changed.connect (resetup_cornermasks);
display.gl_video_memory_purged.connect (resetup_cornermasks);
#else
if (settings.disable_on_fullscreen)
screen.in_fullscreen_changed.connect (fullscreen_changed);
screen.monitors_changed.connect (resetup_cornermasks);
screen.get_display ().gl_video_memory_purged.connect (resetup_cornermasks);
#endif
}
void destroy_cornermasks () {
#if HAS_MUTTER330
display.gl_video_memory_purged.disconnect (resetup_cornermasks);
#else
screen.get_display ().gl_video_memory_purged.disconnect (resetup_cornermasks);
#endif
#if HAS_MUTTER330
unowned Meta.MonitorManager monitor_manager = Meta.MonitorManager.@get ();
monitor_manager.monitors_changed.disconnect (resetup_cornermasks);
display.in_fullscreen_changed.disconnect (fullscreen_changed);
#else
screen.monitors_changed.disconnect (resetup_cornermasks);
screen.in_fullscreen_changed.disconnect (fullscreen_changed);
#endif
foreach (unowned List<Actor> list in cornermasks) {
foreach (Actor actor in list)
@ -121,7 +87,6 @@ namespace Gala.Plugins.MaskCorners {
}
void fullscreen_changed () {
#if HAS_MUTTER330
for (int i = 0; i < display.get_n_monitors (); i++) {
foreach (Actor actor in cornermasks[i]) {
if (display.get_monitor_in_fullscreen (i))
@ -130,24 +95,10 @@ namespace Gala.Plugins.MaskCorners {
actor.show ();
}
}
#else
for (int i = 0; i < screen.get_n_monitors (); i++) {
foreach (Actor actor in cornermasks[i]) {
if (screen.get_monitor_in_fullscreen (i))
actor.hide ();
else
actor.show ();
}
}
#endif
}
void add_cornermasks (int monitor_no) {
#if HAS_MUTTER330
var monitor_geometry = display.get_monitor_geometry (monitor_no);
#else
var monitor_geometry = screen.get_monitor_geometry (monitor_no);
#endif
Canvas canvas = new Canvas ();
canvas.set_size (corner_radius, corner_radius);

View File

@ -33,11 +33,7 @@ public class Gala.Plugins.PIP.Plugin : Gala.Plugin {
public override void initialize (Gala.WindowManager wm) {
this.wm = wm;
#if HAS_MUTTER330
var display = wm.get_display ();
#else
var display = wm.get_screen ().get_display ();
#endif
var settings = new GLib.Settings (Config.SCHEMA + ".keybindings");
display.add_keybinding ("pip", settings, Meta.KeyBindingFlags.NONE, (Meta.KeyHandlerFunc) on_initiate);
@ -54,13 +50,8 @@ public class Gala.Plugins.PIP.Plugin : Gala.Plugin {
}
[CCode (instance_pos = -1)]
#if HAS_MUTTER330
void on_initiate (Meta.Display display, Meta.Window? window, Clutter.KeyEvent event,
Meta.KeyBinding binding) {
#else
void on_initiate (Meta.Display display, Meta.Screen screen,
Meta.Window? window, Clutter.KeyEvent event, Meta.KeyBinding binding) {
#endif
selection_area = new SelectionArea (wm);
selection_area.selected.connect (on_selection_actor_selected);
selection_area.captured.connect (on_selection_actor_captured);
@ -88,11 +79,7 @@ public class Gala.Plugins.PIP.Plugin : Gala.Plugin {
int point_x = x - (int)active.x;
int point_y = y - (int)active.y;
#if HAS_MUTTER336
var rect = Graphene.Rect.alloc ();
#else
var rect = Clutter.Rect.alloc ();
#endif
rect.init (point_x, point_y, width, height);
var popup_window = new PopupWindow (wm, active);
@ -135,13 +122,8 @@ public class Gala.Plugins.PIP.Plugin : Gala.Plugin {
}
private Meta.WindowActor? get_window_actor_at (int x, int y) {
#if HAS_MUTTER330
unowned Meta.Display display = wm.get_display ();
unowned List<Meta.WindowActor> actors = display.get_window_actors ();
#else
var screen = wm.get_screen ();
unowned List<Meta.WindowActor> actors = screen.get_window_actors ();
#endif
var copy = actors.copy ();
copy.reverse ();
@ -164,13 +146,8 @@ public class Gala.Plugins.PIP.Plugin : Gala.Plugin {
}
private Meta.WindowActor? get_active_window_actor () {
#if HAS_MUTTER330
unowned Meta.Display display = wm.get_display ();
unowned List<Meta.WindowActor> actors = display.get_window_actors ();
#else
var screen = wm.get_screen ();
unowned List<Meta.WindowActor> actors = screen.get_window_actors ();
#endif
var copy = actors.copy ();
copy.reverse ();

View File

@ -188,11 +188,7 @@ public class Gala.Plugins.PIP.PopupWindow : Clutter.Actor {
return true;
}
#if HAS_MUTTER336
public void set_container_clip (Graphene.Rect? container_clip) {
#else
public void set_container_clip (Clutter.Rect? container_clip) {
#endif
container.clip_rect = container_clip;
dynamic_container = true;
update_container_scale ();
@ -301,11 +297,7 @@ public class Gala.Plugins.PIP.PopupWindow : Clutter.Actor {
}
private void update_window_focus () {
#if HAS_MUTTER330
unowned Meta.Window focus_window = wm.get_display ().get_focus_window ();
#else
unowned Meta.Window focus_window = wm.get_screen ().get_display ().get_focus_window ();
#endif
if ((focus_window != null && !get_window_is_normal (focus_window))
|| (previous_focus != null && !get_window_is_normal (previous_focus))) {
previous_focus = focus_window;
@ -416,13 +408,8 @@ public class Gala.Plugins.PIP.PopupWindow : Clutter.Actor {
}
private void get_current_monitor_rect (out Meta.Rectangle rect) {
#if HAS_MUTTER330
var display = wm.get_display ();
rect = display.get_monitor_geometry (display.get_current_monitor ());
#else
var screen = wm.get_screen ();
rect = screen.get_monitor_geometry (screen.get_current_monitor ());
#endif
}
private void get_target_window_size (out float width, out float height) {

View File

@ -39,11 +39,7 @@ public class Gala.Plugins.PIP.SelectionArea : Clutter.Actor {
reactive = true;
int screen_width, screen_height;
#if HAS_MUTTER330
wm.get_display ().get_size (out screen_width, out screen_height);
#else
wm.get_screen ().get_size (out screen_width, out screen_height);
#endif
width = screen_width;
height = screen_height;
@ -122,11 +118,7 @@ public class Gala.Plugins.PIP.SelectionArea : Clutter.Actor {
}
public void close () {
#if HAS_MUTTER330
wm.get_display ().set_cursor (Meta.Cursor.DEFAULT);
#else
wm.get_screen ().set_cursor (Meta.Cursor.DEFAULT);
#endif
if (modal_proxy != null) {
wm.pop_modal (modal_proxy);
@ -134,11 +126,7 @@ public class Gala.Plugins.PIP.SelectionArea : Clutter.Actor {
}
public void start_selection () {
#if HAS_MUTTER330
wm.get_display ().set_cursor (Meta.Cursor.CROSSHAIR);
#else
wm.get_screen ().set_cursor (Meta.Cursor.CROSSHAIR);
#endif
grab_key_focus ();
modal_proxy = wm.push_modal ();

View File

@ -43,11 +43,7 @@ namespace Gala.Plugins.PIP {
public float scale_factor { get; set; default = 1; }
public uint8 shadow_opacity { get; set; default = 255; }
#if HAS_MUTTER336
Cogl.Pipeline pipeline;
#else
Cogl.Material material;
#endif
string? current_key = null;
@ -56,12 +52,7 @@ namespace Gala.Plugins.PIP {
}
construct {
#if HAS_MUTTER336
pipeline = new Cogl.Pipeline (Clutter.get_default_backend ().get_cogl_context ());
#else
material = new Cogl.Material ();
#endif
}
~ShadowEffect () {
@ -69,11 +60,7 @@ namespace Gala.Plugins.PIP {
decrement_shadow_users (current_key);
}
#if HAS_MUTTER336
Cogl.Texture? get_shadow (Cogl.Context context, int width, int height, int shadow_size, int shadow_spread) {
#else
Cogl.Texture? get_shadow (int width, int height, int shadow_size, int shadow_spread) {
#endif
var old_key = current_key;
current_key = "%ix%i:%i:%i".printf (width, height, shadow_size, shadow_spread);
@ -104,13 +91,8 @@ namespace Gala.Plugins.PIP {
cr.set_source_surface (buffer.surface, 0, 0);
cr.paint ();
#if HAS_MUTTER336
var texture = new Cogl.Texture2D.from_data (context, width, height, Cogl.PixelFormat.BGRA_8888_PRE,
surface.get_stride (), surface.get_data ());
#else
var texture = new Cogl.Texture.from_data (width, height, 0, Cogl.PixelFormat.BGRA_8888_PRE,
Cogl.PixelFormat.ANY, surface.get_stride (), surface.get_data ());
#endif
shadow_cache.@set (current_key, new Shadow (texture));
@ -127,7 +109,6 @@ namespace Gala.Plugins.PIP {
shadow_cache.unset (key);
}
#if HAS_MUTTER336
public override void paint (Clutter.PaintContext context, EffectPaintFlags flags) {
var bounding_box = get_bounding_box ();
@ -147,27 +128,6 @@ namespace Gala.Plugins.PIP {
actor.continue_paint (context);
}
#else
public override void paint (EffectPaintFlags flags) {
var bounding_box = get_bounding_box ();
var shadow = get_shadow ((int) (bounding_box.x2 - bounding_box.x1), (int) (bounding_box.y2 - bounding_box.y1),
shadow_size, shadow_spread);
if (shadow != null)
material.set_layer (0, shadow);
var opacity = actor.get_paint_opacity () * shadow_opacity / 255;
var alpha = Cogl.Color.from_4ub (255, 255, 255, opacity);
alpha.premultiply ();
material.set_color (alpha);
Cogl.set_source (material);
Cogl.rectangle (bounding_box.x1, bounding_box.y1, bounding_box.x2, bounding_box.y2);
actor.continue_paint ();
}
#endif
public virtual ActorBox get_bounding_box () {
var size = shadow_size * scale_factor;

View File

@ -46,13 +46,8 @@ namespace Gala.Plugins.Template {
// we want to place it in the lower right of the primary monitor with a bit
// of padding. refer to vapi/libmutter.vapi in gala's source for something
// remotely similar to a documentation
#if HAS_MUTTER330
var display = wm.get_display ();
var rect = display.get_monitor_geometry (display.get_primary_monitor ());
#else
var screen = wm.get_screen ();
var rect = screen.get_monitor_geometry (screen.get_primary_monitor ());
#endif
red_box.x = rect.x + rect.width - red_box.width - PADDING;
red_box.y = rect.y + rect.height - red_box.height - PADDING;

View File

@ -0,0 +1,200 @@
/*
* Copyright 2020 elementary, Inc (https://elementary.io)
* 2020 José Expósito <jose.exposito89@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
namespace Gala.Plugins.Touchegg {
/**
* Daemon event type.
*/
private enum GestureEventType {
UNKNOWN = 0,
BEGIN = 1,
UPDATE = 2,
END = 3,
}
/**
* Daemon event.
*/
private struct GestureEvent {
public uint32 event_size;
public GestureEventType event_type;
public GestureType type;
public GestureDirection direction;
public int percentage;
public int fingers;
public uint64 elapsed_time;
public DeviceType performed_on_device_type;
}
/**
* This class connects to the Touchégg daemon to receive touch events.
* See: https://github.com/JoseExposito/touchegg
*/
public class Client : Object {
public signal void on_gesture_begin (Gesture gesture);
public signal void on_gesture_update (Gesture gesture);
public signal void on_gesture_end (Gesture gesture);
/**
* Maximum number of reconnection attempts to the daemon.
*/
private const int MAX_RECONNECTION_ATTEMPTS = 5;
/**
* Time to sleep between reconnection attempts.
*/
private const int RECONNECTION_USLEEP_TIME = 5000000;
/**
* Socket used to connect to the daemon.
*/
private Socket? socket = null;
/**
* Current number of reconnection attempts.
*/
private int reconnection_attempts = 0;
/**
* Struct to store the received event. It is useful to keep it to be able to finish ongoing
* actions in case of disconnection
*/
private GestureEvent *event = null;
/**
* Start receiving gestures.
*/
public void run () throws IOError {
new Thread<void*> (null, receive_events);
}
public void stop () {
if (socket != null) {
try {
reconnection_attempts = MAX_RECONNECTION_ATTEMPTS;
socket.close ();
} catch (Error e) {
// Ignore this error, the process is being killed as this point
}
}
}
private void* receive_events () {
uint8[] event_buffer = new uint8[sizeof (GestureEvent)];
while (reconnection_attempts < MAX_RECONNECTION_ATTEMPTS) {
try {
if (socket == null || !socket.is_connected ()) {
debug ("Connecting to Touchégg daemon");
socket = new Socket (SocketFamily.UNIX, SocketType.STREAM, 0);
if (socket == null) {
throw new GLib.IOError.CONNECTION_REFUSED (
"Error connecting to Touchégg daemon: Can not create socket"
);
}
UnixSocketAddress address = new UnixSocketAddress.as_abstract ("/touchegg", -1);
bool connected = socket.connect (address);
if (!connected) {
throw new GLib.IOError.CONNECTION_REFUSED ("Error connecting to Touchégg daemon");
}
reconnection_attempts = 0;
debug ("Connection to Touchégg daemon established");
}
// Read the event
ssize_t bytes_received = socket.receive (event_buffer);
if (bytes_received <= 0) {
throw new GLib.IOError.CONNECTION_CLOSED ("Error reading socket");
}
event = (GestureEvent *) event_buffer;
// The daemon could add events not supported by this plugin yet
// Discard any extra data
if (bytes_received < event.event_size) {
ssize_t pending_bytes = event.event_size - bytes_received;
uint8[] discard_buffer = new uint8[pending_bytes];
bytes_received = socket.receive (discard_buffer);
if (bytes_received <= 0) {
throw new GLib.IOError.CONNECTION_CLOSED ("Error reading socket");
}
}
emit_event (event);
} catch (Error e) {
warning ("Connection to Touchégg daemon lost: %s", e.message);
handle_disconnection ();
}
}
return null;
}
private void handle_disconnection () {
reconnection_attempts++;
if (event != null
&& event.event_type != GestureEventType.UNKNOWN
&& event.event_type != GestureEventType.END) {
event.event_type = GestureEventType.END;
emit_event (event);
}
if (socket != null) {
try {
socket.close ();
} catch (Error e) {
// The connection is already closed at this point, ignore this error
}
}
if (reconnection_attempts < MAX_RECONNECTION_ATTEMPTS) {
debug ("Reconnecting to Touchégg daemon in 5 seconds");
Thread.usleep (RECONNECTION_USLEEP_TIME);
} else {
warning ("Maximum number of reconnections reached, aborting");
}
}
private void emit_event (GestureEvent *event) {
Gesture gesture = new Gesture () {
type = event.type,
direction = event.direction,
percentage = event.percentage,
fingers = event.fingers,
elapsed_time = event.elapsed_time,
performed_on_device_type = event.performed_on_device_type
};
switch (event.event_type) {
case GestureEventType.BEGIN:
on_gesture_begin (gesture);
break;
case GestureEventType.UPDATE:
on_gesture_update (gesture);
break;
case GestureEventType.END:
on_gesture_end (gesture);
break;
default:
break;
}
}
}
}

View File

@ -0,0 +1,54 @@
/*
* Copyright 2020 elementary, Inc (https://elementary.io)
* 2020 José Expósito <jose.exposito89@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
namespace Gala.Plugins.Touchegg {
public enum GestureType {
NOT_SUPPORTED = 0,
SWIPE = 1,
PINCH = 2,
}
public enum GestureDirection {
UNKNOWN = 0,
// GestureType.SWIPE
UP = 1,
DOWN = 2,
LEFT = 3,
RIGHT = 4,
// GestureType.PINCH
IN = 5,
OUT = 6,
}
public enum DeviceType {
UNKNOWN = 0,
TOUCHPAD = 1,
TOUCHSCREEN = 2,
}
public class Gesture {
public GestureType type;
public GestureDirection direction;
public int percentage;
public int fingers;
public uint64 elapsed_time;
public DeviceType performed_on_device_type;
}
}

144
plugins/touchegg/Main.vala Normal file
View File

@ -0,0 +1,144 @@
/*
* Copyright 2020 elementary, Inc (https://elementary.io)
* 2020 José Expósito <jose.exposito89@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
public class Gala.Plugins.Touchegg.Plugin : Gala.Plugin {
private Gala.WindowManager? wm = null;
private Client? client = null;
private GLib.Settings gala_settings;
private GLib.Settings touchpad_settings;
public override void initialize (Gala.WindowManager window_manager) {
wm = window_manager;
gala_settings = new GLib.Settings ("io.elementary.desktop.wm.gestures");
touchpad_settings = new GLib.Settings ("org.gnome.desktop.peripherals.touchpad");
client = new Client ();
client.on_gesture_begin.connect ((gesture) => Idle.add (() => {
on_handle_gesture (gesture, "begin");
return false;
}));
client.on_gesture_update.connect ((gesture) => Idle.add (() => {
on_handle_gesture (gesture, "update");
return false;
}));
client.on_gesture_end.connect ((gesture) => Idle.add (() => {
on_handle_gesture (gesture, "end");
return false;
}));
try {
client.run ();
} catch (Error e) {
warning ("Error initializing Touchégg client: %s", e.message);
}
}
public override void destroy () {
if (client != null) {
client.stop ();
}
}
private void on_handle_gesture (Gesture gesture, string event) {
// debug (@"Gesture $(event): $(gesture.type) - $(gesture.direction) - $(gesture.fingers) fingers - $(gesture.percentage)% - $(gesture.elapsed_time) - $(gesture.performed_on_device_type)");
var hints = build_hints_from_gesture (gesture, event);
if (is_open_workspace_gesture (gesture)) {
wm.workspace_view.open (hints);
} else if (is_close_workspace_gesture (gesture)) {
wm.workspace_view.close (hints);
} else if (is_next_desktop_gesture (gesture)) {
if (!wm.workspace_view.is_opened ()) {
wm.switch_to_next_workspace (Meta.MotionDirection.RIGHT, hints);
}
} else if (is_previous_desktop_gesture (gesture)) {
if (!wm.workspace_view.is_opened ()) {
wm.switch_to_next_workspace (Meta.MotionDirection.LEFT, hints);
}
}
}
private GLib.HashTable<string, Variant> build_hints_from_gesture (Gesture gesture, string event) {
var hints = new GLib.HashTable<string, Variant> (str_hash, str_equal);
hints.insert ("manual_animation", new Variant.boolean (true));
hints.insert ("event", new Variant.string (event));
hints.insert ("percentage", new Variant.int32 (gesture.percentage));
hints.insert ("elapsed_time", new Variant.uint64 (gesture.elapsed_time));
return hints;
}
private bool is_open_workspace_gesture (Gesture gesture) {
bool enabled = gala_settings.get_boolean ("multitasking-gesture-enabled");
int fingers = gala_settings.get_int ("multitasking-gesture-fingers");
return enabled
&& gesture.type == GestureType.SWIPE
&& gesture.direction == GestureDirection.UP
&& gesture.fingers == fingers;
}
private bool is_close_workspace_gesture (Gesture gesture) {
bool enabled = gala_settings.get_boolean ("multitasking-gesture-enabled");
int fingers = gala_settings.get_int ("multitasking-gesture-fingers");
return enabled
&& gesture.type == GestureType.SWIPE
&& gesture.direction == GestureDirection.DOWN
&& gesture.fingers == fingers;
}
private bool is_next_desktop_gesture (Gesture gesture) {
bool enabled = gala_settings.get_boolean ("workspaces-gesture-enabled");
int fingers = gala_settings.get_int ("workspaces-gesture-fingers");
bool natural_scroll = (gesture.performed_on_device_type == DeviceType.TOUCHSCREEN)
? true
: touchpad_settings.get_boolean ("natural-scroll");
var direction = natural_scroll ? GestureDirection.LEFT : GestureDirection.RIGHT;
return enabled
&& gesture.type == GestureType.SWIPE
&& gesture.direction == direction
&& gesture.fingers == fingers;
}
private bool is_previous_desktop_gesture (Gesture gesture) {
bool enabled = gala_settings.get_boolean ("workspaces-gesture-enabled");
int fingers = gala_settings.get_int ("workspaces-gesture-fingers");
bool natural_scroll = (gesture.performed_on_device_type == DeviceType.TOUCHSCREEN)
? true
: touchpad_settings.get_boolean ("natural-scroll");
var direction = natural_scroll ? GestureDirection.RIGHT : GestureDirection.LEFT;
return enabled
&& gesture.type == GestureType.SWIPE
&& gesture.direction == direction
&& gesture.fingers == fingers;
}
}
public Gala.PluginInfo register_plugin () {
return Gala.PluginInfo () {
name = "Touchégg",
author = "José Expósito <jose.exposito89@gmail.com>",
plugin_type = typeof (Gala.Plugins.Touchegg.Plugin),
provides = Gala.PluginFunction.ADDITION,
load_priority = Gala.LoadPriority.DEFERRED
};
}

View File

@ -0,0 +1,15 @@
gala_touchegg_sources = [
'Main.vala',
'Client.vala',
'Gesture.vala',
]
gala_touchegg_lib = shared_library(
'gala-touchegg',
gala_touchegg_sources,
dependencies: [gala_dep, gala_base_dep],
include_directories: config_inc_dir,
install: true,
install_dir: plugins_dir,
install_rpath: mutter_typelib_dir,
)

View File

@ -27,11 +27,7 @@ namespace Gala.Plugins.Zoom {
public override void initialize (Gala.WindowManager wm) {
this.wm = wm;
#if HAS_MUTTER330
var display = wm.get_display ();
#else
var display = wm.get_screen ().get_display ();
#endif
var schema = new GLib.Settings (Config.SCHEMA + ".keybindings");
display.add_keybinding ("zoom-in", schema, 0, (Meta.KeyHandlerFunc) zoom_in);
@ -42,12 +38,7 @@ namespace Gala.Plugins.Zoom {
if (wm == null)
return;
#if HAS_MUTTER330
var display = wm.get_display ();
#else
var display = wm.get_screen ().get_display ();
#endif
display.remove_keybinding ("zoom-in");
display.remove_keybinding ("zoom-out");
@ -57,24 +48,14 @@ namespace Gala.Plugins.Zoom {
}
[CCode (instance_pos = -1)]
#if HAS_MUTTER330
void zoom_in (Meta.Display display, Meta.Window? window,
Clutter.KeyEvent event, Meta.KeyBinding binding) {
#else
void zoom_in (Meta.Display display, Meta.Screen screen,
Meta.Window? window, Clutter.KeyEvent event, Meta.KeyBinding binding) {
#endif
zoom (true);
}
[CCode (instance_pos = -1)]
#if HAS_MUTTER330
void zoom_out (Meta.Display display, Meta.Window? window,
Clutter.KeyEvent event, Meta.KeyBinding binding) {
#else
void zoom_out (Meta.Display display, Meta.Screen screen,
Meta.Window? window, Clutter.KeyEvent event, Meta.KeyBinding binding) {
#endif
zoom (false);
}
@ -100,21 +81,13 @@ namespace Gala.Plugins.Zoom {
mouse_poll_timer = Timeout.add (MOUSE_POLL_TIME, () => {
client_pointer.get_position (null, out mx, out my);
#if HAS_MUTTER336
var new_pivot = new Graphene.Point ();
#else
var new_pivot = Clutter.Point.alloc ();
#endif
new_pivot.init (mx / wins.width, my / wins.height);
#if HAS_MUTTER336
if (wins.pivot_point.equal (new_pivot)) {
#else
if (wins.pivot_point.equals (new_pivot)) {
#endif
return true;
}
}
wins.save_easing_state ();
wins.set_easing_mode (Clutter.AnimationMode.LINEAR);
wins.set_easing_duration (MOUSE_POLL_TIME);

View File

@ -3,10 +3,10 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: https://github.com/elementary/gala/issues\n"
"POT-Creation-Date: 2020-11-17 00:07+0000\n"
"PO-Revision-Date: 2020-08-25 13:13+0000\n"
"PO-Revision-Date: 2020-12-14 19:16+0000\n"
"Last-Translator: Yaron Shahrabani <sh.yaron@gmail.com>\n"
"Language-Team: Hebrew <https://l10n.elementary.io/projects/desktop/gala/he/"
">\n"
"Language-Team: Hebrew <https://l10n.elementary.io/projects/desktop/gala/he/>"
"\n"
"Language: he\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -33,7 +33,7 @@ msgstr "שחזור התצורה הקודמת"
#: daemon/MenuDaemon.vala:111
msgid "Hide"
msgstr ""
msgstr "הסתרה"
#: daemon/MenuDaemon.vala:124
msgid "Move"

View File

@ -8,22 +8,22 @@ msgstr ""
"Project-Id-Version: gala\n"
"Report-Msgid-Bugs-To: https://github.com/elementary/gala/issues\n"
"POT-Creation-Date: 2020-11-17 00:07+0000\n"
"PO-Revision-Date: 2019-12-16 18:35+0000\n"
"Last-Translator: Daniel Foré <daniel@elementary.io>\n"
"Language-Team: Serbian <https://l10n.elementary.io/projects/desktop/gala/sr/"
">\n"
"PO-Revision-Date: 2020-12-19 10:16+0000\n"
"Last-Translator: Мирослав Николић <miroslavnikolic@rocketmail.com>\n"
"Language-Team: Serbian <https://l10n.elementary.io/projects/desktop/gala/sr/>"
"\n"
"Language: sr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<="
"4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"X-Generator: Weblate 3.9.1\n"
"X-Launchpad-Export-Date: 2017-02-21 05:47+0000\n"
#: src/ScreenshotManager.vala:252
msgid "Screenshots"
msgstr ""
msgstr "Снимци екрана"
#: src/WindowManager.vala:2202
msgid "Does the display look OK?"
@ -35,11 +35,11 @@ msgstr "Задржи ове поставке"
#: src/WindowManager.vala:2206
msgid "Restore Previous Configuration"
msgstr "Поврати претходне поставке"
msgstr "Врати претходно подешавање"
#: daemon/MenuDaemon.vala:111
msgid "Hide"
msgstr ""
msgstr "Сакриј"
#: daemon/MenuDaemon.vala:124
msgid "Move"
@ -79,99 +79,111 @@ msgstr "Увећај"
#: daemon/MenuDaemon.vala:268
msgid "Change Wallpaper…"
msgstr ""
msgstr "Промена позадине…"
#: daemon/MenuDaemon.vala:285
msgid "Display Settings…"
msgstr ""
msgstr "Поставке екрана…"
#: daemon/MenuDaemon.vala:302
msgid "System Settings…"
msgstr ""
msgstr "Системска подешавања…"
#: data/gala.appdata.xml.in:7
msgid "Multitasking &amp; Window Management"
msgstr ""
msgstr "Управљање прозорима и са више задатака"
#: data/gala.appdata.xml.in:8
msgid "A window &amp; compositing manager for Pantheon"
msgstr ""
msgstr "Композитни и управник прозора за Пантеона"
#: data/gala.appdata.xml.in:10
msgid ""
"A window &amp; compositing manager based on libmutter and designed by "
"elementary for use with Pantheon."
msgstr ""
"Композитни и управник прозора заснован на „libmutter“ и осмишљен "
"елементаријем за коришћење са Пантеоном."
#: data/gala.appdata.xml.in:15 data/gala.appdata.xml.in:26
#: data/gala.appdata.xml.in:36 data/gala.appdata.xml.in:45
#: data/gala.appdata.xml.in:56
msgid "Improvements:"
msgstr ""
msgstr "Побољшања:"
#: data/gala.appdata.xml.in:17
msgid "Close the Alt + Tab switcher by pressing Esc without releasing Alt"
msgstr ""
"Затвара Алт + Табулатор пребацивача притиском на Есц без отпуштања Алт-а"
#: data/gala.appdata.xml.in:18
msgid "Increase maximum zoom level and provide feedback when unable to zoom"
msgstr ""
"Повећава највећи ниво увеличања и обезбеђује повратни одговор када не може "
"да зумира"
#: data/gala.appdata.xml.in:19
msgid "Show a context menu when secondary clicking the background"
msgstr ""
msgstr "Приказује приручни изборник приликом секундарног клика позадине"
#: data/gala.appdata.xml.in:20 data/gala.appdata.xml.in:30
#: data/gala.appdata.xml.in:39 data/gala.appdata.xml.in:50
msgid "Updated translations"
msgstr ""
msgstr "Освежени преводи"
#: data/gala.appdata.xml.in:28
msgid ""
"Fix “Always on Visible Workspace” windows disappearing when changing "
"workspaces"
msgstr ""
"Поправља нестајање прозора „Увек на видљивом радном прозору“ приликом "
"промене радних простора"
#: data/gala.appdata.xml.in:29
msgid ""
"Fix windows on non-primary displays disappearing when changing workspaces"
msgstr ""
"Поправља нестајање прозора на не-примарним екранима приликом промене радних "
"простора"
#: data/gala.appdata.xml.in:38
msgid "Fix crash when changing workspaces while a transient window is opening"
msgstr ""
"Поправља урушавање приликом промене радних простора када је прелазни прозор "
"у отварању"
#: data/gala.appdata.xml.in:47
msgid "Don't show Gala Background Services in the dock"
msgstr ""
msgstr "Не приказује услуге Гала позадине у луци"
#: data/gala.appdata.xml.in:48
msgid "Fixes for media key handling"
msgstr ""
msgstr "Исправке за руковање тастером медија"
#: data/gala.appdata.xml.in:49
msgid "Show keyboard shortcuts in HeaderBar menus"
msgstr ""
msgstr "Приказује пречице тастатуре у изборнику траке заглавља"
#: data/gala.appdata.xml.in:58
msgid "Improve window shadows for legacy apps"
msgstr ""
msgstr "Побољшава сенке прозора за старе програме"
#: data/gala.appdata.xml.in:59
msgid "Fix potential crash when taking screenshots"
msgstr ""
msgstr "Поправља могуће урушавање приликом прављења снимка екрана"
#: data/gala.appdata.xml.in:60
msgid "Fix notification position after changing DPI"
msgstr ""
msgstr "Поправља положај обавештења након промене ТПИ"
#: data/gala.appdata.xml.in:61
msgid "Fix animations for moving and maximizing tiled windows"
msgstr ""
"Поправља анимације за премештање и максимално увећање поплочамих прозора"
#: data/gala.appdata.xml.in:67
msgid "elementary, Inc."
msgstr ""
msgstr "elementary, Inc."
#: data/gala-multitaskingview.desktop.in:4
#: data/gala-multitaskingview.desktop.in:6
@ -184,7 +196,7 @@ msgstr "Прегледајте све отворене прозоре и рад
#: data/gala-multitaskingview.desktop.in:7
msgid "multitasking-view"
msgstr ""
msgstr "multitasking-view"
#: data/gala-other.desktop.in:4
msgid "Other"
@ -192,11 +204,11 @@ msgstr "Друго"
#: data/gala-other.desktop.in:5
msgid "Fallback desktop file for notifications from outdated applications."
msgstr ""
msgstr "Пребаците датотеку радне површи за обавештења из застарелих програма."
#: data/gala-other.desktop.in:6
msgid "applications-other"
msgstr ""
msgstr "applications-other"
#~ msgid "Minimize"
#~ msgstr "Умањи"

View File

@ -8,10 +8,10 @@ msgstr ""
"Project-Id-Version: beat-box\n"
"Report-Msgid-Bugs-To: https://github.com/elementary/gala/issues\n"
"POT-Creation-Date: 2020-11-17 00:07+0000\n"
"PO-Revision-Date: 2020-10-30 00:15+0000\n"
"PO-Revision-Date: 2020-12-06 18:16+0000\n"
"Last-Translator: Ozgur Baskin <bebeto_baskin@yahoo.com>\n"
"Language-Team: Turkish <https://l10n.elementary.io/projects/desktop/gala/tr/"
">\n"
"Language-Team: Turkish <https://l10n.elementary.io/projects/desktop/gala/tr/>"
"\n"
"Language: tr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -38,7 +38,7 @@ msgstr "Önceki Yapılandırmayı Geri Yükle"
#: daemon/MenuDaemon.vala:111
msgid "Hide"
msgstr ""
msgstr "Gizle"
#: daemon/MenuDaemon.vala:124
msgid "Move"

View File

@ -23,11 +23,7 @@ namespace Gala {
public signal void changed ();
public signal void loaded ();
#if HAS_MUTTER330
public Meta.Display display { get; construct; }
#else
public Meta.Screen screen { get; construct; }
#endif
public int monitor_index { get; construct; }
public BackgroundSource background_source { get; construct; }
public bool is_loaded { get; private set; default = false; }
@ -40,7 +36,6 @@ namespace Gala {
Cancellable cancellable;
uint update_animation_timeout_id = 0;
#if HAS_MUTTER330
public Background (Meta.Display display, int monitor_index, string? filename,
BackgroundSource background_source, GDesktop.BackgroundStyle style) {
Object (display: display,
@ -49,23 +44,9 @@ namespace Gala {
style: style,
filename: filename);
}
#else
public Background (Meta.Screen screen, int monitor_index, string? filename,
BackgroundSource background_source, GDesktop.BackgroundStyle style) {
Object (screen: screen,
monitor_index: monitor_index,
background_source: background_source,
style: style,
filename: filename);
}
#endif
construct {
#if HAS_MUTTER330
background = new Meta.Background (display);
#else
background = new Meta.Background (screen);
#endif
background.set_data<unowned Background> ("delegate", this);
file_watches = new Gee.HashMap<string,ulong> ();
@ -153,11 +134,7 @@ namespace Gala {
void update_animation () {
update_animation_timeout_id = 0;
#if HAS_MUTTER330
animation.update (display.get_monitor_geometry (monitor_index));
#else
animation.update (screen.get_monitor_geometry (monitor_index));
#endif
var files = animation.key_frame_files;
Clutter.Callback finish = () => {

View File

@ -84,18 +84,10 @@ namespace Gala {
return animation;
}
#if HAS_MUTTER330
public BackgroundSource get_background_source (Meta.Display display, string settings_schema) {
#else
public BackgroundSource get_background_source (Meta.Screen screen, string settings_schema) {
#endif
var background_source = background_sources[settings_schema];
if (background_source == null) {
#if HAS_MUTTER330
background_source = new BackgroundSource (display, settings_schema);
#else
background_source = new BackgroundSource (screen, settings_schema);
#endif
background_source.use_count = 1;
background_sources[settings_schema] = background_source;
} else

View File

@ -20,7 +20,6 @@ namespace Gala {
public signal void changed ();
public signal void show_background_menu (int x, int y);
#if HAS_MUTTER330
public Meta.Display display { get; construct; }
public BackgroundContainer (Meta.Display display) {
@ -43,30 +42,6 @@ namespace Gala {
~BackgroundContainer () {
Meta.MonitorManager.@get ().monitors_changed.disconnect (update);
}
#else
public Meta.Screen screen { get; construct; }
public BackgroundContainer (Meta.Screen screen) {
Object (screen: screen);
}
construct {
screen.monitors_changed.connect (update);
reactive = true;
button_press_event.connect ((event) => {
if (event.button == Gdk.BUTTON_SECONDARY) {
show_background_menu ((int)event.x, (int)event.y);
}
});
update ();
}
~BackgroundContainer () {
screen.monitors_changed.disconnect (update);
}
#endif
void update () {
var reference_child = (get_child_at_index (0) as BackgroundManager);
@ -75,13 +50,8 @@ namespace Gala {
destroy_all_children ();
#if HAS_MUTTER330
for (var i = 0; i < display.get_n_monitors (); i++) {
var background = new BackgroundManager (display, i);
#else
for (var i = 0; i < screen.get_n_monitors (); i++) {
var background = new BackgroundManager (screen, i);
#endif
add_child (background);

View File

@ -22,11 +22,7 @@ namespace Gala {
public signal void changed ();
#if HAS_MUTTER330
public Meta.Display display { get; construct; }
#else
public Meta.Screen screen { get; construct; }
#endif
public int monitor_index { get; construct; }
public bool control_position { get; construct; }
@ -34,23 +30,12 @@ namespace Gala {
Meta.BackgroundActor background_actor;
Meta.BackgroundActor? new_background_actor = null;
#if HAS_MUTTER330
public BackgroundManager (Meta.Display display, int monitor_index, bool control_position = true) {
Object (display: display, monitor_index: monitor_index, control_position: control_position);
}
#else
public BackgroundManager (Meta.Screen screen, int monitor_index, bool control_position = true) {
Object (screen: screen, monitor_index: monitor_index, control_position: control_position);
}
#endif
construct {
#if HAS_MUTTER330
background_source = BackgroundCache.get_default ().get_background_source (display, BACKGROUND_SCHEMA);
#else
background_source = BackgroundCache.get_default ().get_background_source (screen, BACKGROUND_SCHEMA);
#endif
background_actor = create_background_actor ();
destroy.connect (on_destroy);
@ -143,11 +128,7 @@ namespace Gala {
Meta.BackgroundActor create_background_actor () {
var background = background_source.get_background (monitor_index);
#if HAS_MUTTER330
var background_actor = new Meta.BackgroundActor (display, monitor_index);
#else
var background_actor = new Meta.BackgroundActor (screen, monitor_index);
#endif
#if HAS_MUTTER338
((Meta.BackgroundContent)background_actor.content).background = background.background;
@ -157,12 +138,7 @@ namespace Gala {
insert_child_below (background_actor, null);
#if HAS_MUTTER330
var monitor = display.get_monitor_geometry (monitor_index);
#else
var monitor = screen.get_monitor_geometry (monitor_index);
#endif
background_actor.set_size (monitor.width, monitor.height);
if (control_position) {

View File

@ -19,46 +19,28 @@ namespace Gala {
public class BackgroundSource : Object {
public signal void changed ();
#if HAS_MUTTER330
public Meta.Display display { get; construct; }
#else
public Meta.Screen screen { get; construct; }
#endif
public Settings settings { get; construct; }
internal int use_count { get; set; default = 0; }
Gee.HashMap<int,Background> backgrounds;
#if HAS_MUTTER330
public BackgroundSource (Meta.Display display, string settings_schema) {
Object (display: display, settings: new Settings (settings_schema));
}
#else
public BackgroundSource (Meta.Screen screen, string settings_schema) {
Object (screen: screen, settings: new Settings (settings_schema));
}
#endif
construct {
backgrounds = new Gee.HashMap<int,Background> ();
#if HAS_MUTTER330
Meta.MonitorManager.@get ().monitors_changed.connect (monitors_changed);
#else
screen.monitors_changed.connect (monitors_changed);
#endif
settings_hash_cache = get_current_settings_hash_cache ();
settings.changed.connect (settings_changed);
}
void monitors_changed () {
#if HAS_MUTTER330
var n = display.get_n_monitors ();
#else
var n = screen.get_n_monitors ();
#endif
var i = 0;
foreach (var background in backgrounds.values) {
@ -94,11 +76,7 @@ namespace Gala {
monitor_index = 0;
if (!backgrounds.has_key (monitor_index)) {
#if HAS_MUTTER330
var background = new Background (display, monitor_index, filename, this, (GDesktop.BackgroundStyle) style);
#else
var background = new Background (screen, monitor_index, filename, this, (GDesktop.BackgroundStyle) style);
#endif
background.changed.connect (background_changed);
backgrounds[monitor_index] = background;
}
@ -113,11 +91,7 @@ namespace Gala {
}
public void destroy () {
#if HAS_MUTTER330
Meta.MonitorManager.@get ().monitors_changed.disconnect (monitors_changed);
#else
screen.monitors_changed.disconnect (monitors_changed);
#endif
foreach (var background in backgrounds.values) {
background.changed.disconnect (background_changed);

View File

@ -16,33 +16,17 @@
//
namespace Gala {
#if HAS_MUTTER332
public class SystemBackground : GLib.Object {
#else
public class SystemBackground : Meta.BackgroundActor {
#endif
const Clutter.Color DEFAULT_BACKGROUND_COLOR = { 0x2e, 0x34, 0x36, 0xff };
static Meta.Background? system_background = null;
#if HAS_MUTTER332
public Meta.BackgroundActor background_actor { get; construct; }
#endif
public Meta.BackgroundActor background_actor { get; construct; }
public signal void loaded ();
#if HAS_MUTTER330
public SystemBackground (Meta.Display display) {
#if HAS_MUTTER332
Object (background_actor: new Meta.BackgroundActor (display, 0));
#else
Object (meta_display: display, monitor: 0);
#endif
}
#else
public SystemBackground (Meta.Screen screen) {
Object (meta_screen: screen, monitor: 0);
}
#endif
construct {
var background_file = GLib.File.new_for_uri ("resource:///io/elementary/desktop/gala/texture.png");
@ -53,23 +37,15 @@ namespace Gala {
}
if (system_background == null) {
#if HAS_MUTTER332
system_background = new Meta.Background (background_actor.meta_display);
#elif HAS_MUTTER330
system_background = new Meta.Background (meta_display);
#else
system_background = new Meta.Background (meta_screen);
#endif
system_background.set_color (DEFAULT_BACKGROUND_COLOR);
system_background.set_file (background_file, GDesktop.BackgroundStyle.WALLPAPER);
}
#if HAS_MUTTER338
((Meta.BackgroundContent)background_actor.content).background = system_background;
#elif HAS_MUTTER332
background_actor.background = system_background;
#else
background = system_background;
background_actor.background = system_background;
#endif
var cache = Meta.BackgroundImageCache.get_default ();

View File

@ -92,13 +92,9 @@ namespace Gala {
class DummyOffscreenEffect : Clutter.OffscreenEffect {
public signal void done_painting ();
#if HAS_MUTTER336
public override void post_paint (Clutter.PaintContext context) {
base.post_paint (context);
#else
public override void post_paint () {
base.post_paint ();
#endif
done_painting ();
}
}

View File

@ -19,9 +19,7 @@ namespace Gala {
public struct Accelerator {
public string name;
public uint flags;
#if HAS_MUTTER332
public Meta.KeyBindingFlags grab_flags;
#endif
}
[DBus (name="org.gnome.Shell")]
@ -45,26 +43,14 @@ namespace Gala {
wm = _wm;
grabbed_accelerators = new HashTable<string, uint?> (str_hash, str_equal);
#if HAS_MUTTER330
wm.get_display ().accelerator_activated.connect (on_accelerator_activated);
#else
wm.get_screen ().get_display ().accelerator_activated.connect (on_accelerator_activated);
#endif
}
#if HAS_MUTTER334
void on_accelerator_activated (uint action, Clutter.InputDevice device, uint timestamp) {
#else
void on_accelerator_activated (uint action, uint device_id, uint timestamp) {
#endif
foreach (string accelerator in grabbed_accelerators.get_keys ()) {
if (grabbed_accelerators[accelerator] == action) {
var parameters = new GLib.HashTable<string, Variant> (null, null);
#if HAS_MUTTER334
parameters.set ("device-id", new Variant.uint32 (device.id));
#else
parameters.set ("device-id", new Variant.uint32 (device_id));
#endif
parameters.set ("timestamp", new Variant.uint32 (timestamp));
accelerator_activated (action, parameters);
@ -72,21 +58,11 @@ namespace Gala {
}
}
#if HAS_MUTTER332
public uint grab_accelerator (string accelerator, uint flags, Meta.KeyBindingFlags grab_flags) throws DBusError, IOError {
#else
public uint grab_accelerator (string accelerator, uint flags) throws DBusError, IOError {
#endif
uint? action = grabbed_accelerators[accelerator];
if (action == null) {
#if HAS_MUTTER332
action = wm.get_display ().grab_accelerator (accelerator, grab_flags);
#elif HAS_MUTTER330
action = wm.get_display ().grab_accelerator (accelerator);
#else
action = wm.get_screen ().get_display ().grab_accelerator (accelerator);
#endif
if (action > 0) {
grabbed_accelerators[accelerator] = action;
}
@ -99,11 +75,7 @@ namespace Gala {
uint[] actions = {};
foreach (unowned Accelerator? accelerator in accelerators) {
#if HAS_MUTTER332
actions += grab_accelerator (accelerator.name, accelerator.flags, accelerator.grab_flags);
#else
actions += grab_accelerator (accelerator.name, accelerator.flags);
#endif
}
return actions;
@ -114,11 +86,7 @@ namespace Gala {
foreach (unowned string accelerator in grabbed_accelerators.get_keys ()) {
if (grabbed_accelerators[accelerator] == action) {
#if HAS_MUTTER330
ret = wm.get_display ().ungrab_accelerator (action);
#else
ret = wm.get_screen ().get_display ().ungrab_accelerator (action);
#endif
grabbed_accelerators.remove (accelerator);
break;
}
@ -127,7 +95,6 @@ namespace Gala {
return ret;
}
#if HAS_MUTTER334
public bool ungrab_accelerators (uint[] actions) throws DBusError, IOError {
foreach (uint action in actions) {
ungrab_accelerator (action);
@ -135,7 +102,6 @@ namespace Gala {
return true;
}
#endif
[DBus (name = "ShowOSD")]
public void show_osd (GLib.HashTable<string, Variant> parameters) throws DBusError, IOError {
@ -149,15 +115,10 @@ namespace Gala {
if (parameters.contains ("label"))
label = parameters["label"].get_string ();
int32 level = 0;
#if HAS_MUTTER334
if (parameters.contains ("level")) {
var double_level = parameters["level"].get_double ();
level = (int)(double_level * 100);
}
#else
if (parameters.contains ("level"))
level = parameters["level"].get_int32 ();
#endif
//if (monitor_index > -1)
// message ("MediaFeedback requested for specific monitor %i which is not supported", monitor_index);

View File

@ -0,0 +1,180 @@
/*
* Copyright 2020 elementary, Inc (https://elementary.io)
* 2020 José Expósito <jose.exposito89@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
public class Gala.GestureAnimationDirector : Object {
/**
* Percentage of the animation to be completed to apply the action.
*/
private const int SUCCESS_PERCENTAGE_THRESHOLD = 20;
/**
* When a gesture ends with a velocity greater than this constant, the action is not cancelled,
* even if the animation threshold has not been reached.
*/
private const double SUCCESS_VELOCITY_THRESHOLD = 0.3;
/**
* When a gesture ends with less velocity that this constant, this velocity is used instead.
*/
private const double ANIMATION_BASE_VELOCITY = 0.002;
/**
* Maximum velocity allowed on gesture update.
*/
private const double MAX_VELOCITY = 0.5;
public int min_animation_duration { get; construct; }
public int max_animation_duration { get; construct; }
public bool running { get; set; default = false; }
public bool canceling { get; set; default = false; }
public signal void on_animation_begin (int percentage);
public signal void on_animation_update (int percentage);
public signal void on_animation_end (int percentage, bool cancel_action, int calculated_duration);
public delegate void OnBegin (int percentage);
public delegate void OnUpdate (int percentage);
public delegate void OnEnd (int percentage, bool cancel_action, int calculated_duration);
private Gee.ArrayList<ulong> handlers;
private int previous_percentage;
private uint64 previous_time;
private int percentage_delta;
private double velocity;
construct {
handlers = new Gee.ArrayList<ulong> ();
previous_percentage = 0;
previous_time = 0;
percentage_delta = 0;
velocity = 0;
}
public GestureAnimationDirector(int min_animation_duration, int max_animation_duration) {
Object (min_animation_duration: min_animation_duration, max_animation_duration: max_animation_duration);
}
public void connect_handlers (owned OnBegin? on_begin, owned OnUpdate? on_update, owned OnEnd? on_end) {
if (on_begin != null) {
ulong handler_id = on_animation_begin.connect ((percentage) => on_begin (percentage));
handlers.add (handler_id);
}
if (on_update != null) {
ulong handler_id = on_animation_update.connect ((percentage) => on_update (percentage));
handlers.add (handler_id);
}
if (on_end != null) {
ulong handler_id = on_animation_end.connect ((percentage, cancel_action, duration) => on_end (percentage, cancel_action, duration));
handlers.add (handler_id);
}
}
public void disconnect_all_handlers () {
foreach (var handler in handlers) {
disconnect (handler);
}
handlers.clear ();
}
public static float animation_value (float initial_value, float target_value, int percentage) {
return (((target_value - initial_value) * percentage) / 100) + initial_value;
}
public void update_animation (HashTable<string,Variant> hints) {
string event = hints.get ("event").get_string ();
int32 percentage = hints.get ("percentage").get_int32 ();
uint64 elapsed_time = hints.get ("elapsed_time").get_uint64 ();
switch (event) {
case "begin":
update_animation_begin (percentage, elapsed_time);
break;
case "update":
update_animation_update (percentage, elapsed_time);
break;
case "end":
default:
update_animation_end (percentage, elapsed_time);
break;
}
}
private void update_animation_begin (int32 percentage, uint64 elapsed_time) {
on_animation_begin (percentage);
previous_percentage = percentage;
previous_time = elapsed_time;
}
private void update_animation_update (int32 percentage, uint64 elapsed_time) {
if (elapsed_time != previous_time) {
int distance = percentage - previous_percentage;
double time = (double)(elapsed_time - previous_time);
velocity = (distance / time);
if (velocity > MAX_VELOCITY) {
velocity = MAX_VELOCITY;
var used_percentage = MAX_VELOCITY * time + previous_percentage;
percentage_delta += (int)(percentage - used_percentage);
}
}
on_animation_update (applied_percentage (percentage, percentage_delta));
previous_percentage = percentage;
previous_time = elapsed_time;
}
private void update_animation_end (int32 percentage, uint64 elapsed_time) {
int end_percentage = applied_percentage (percentage, percentage_delta);
bool cancel_action = (end_percentage < SUCCESS_PERCENTAGE_THRESHOLD)
&& ((end_percentage <= previous_percentage) && (velocity < SUCCESS_VELOCITY_THRESHOLD));
int calculated_duration = calculate_end_animation_duration (end_percentage, cancel_action);
on_animation_end (end_percentage, cancel_action, calculated_duration);
previous_percentage = 0;
previous_time = 0;
percentage_delta = 0;
velocity = 0;
}
private static int applied_percentage (int percentage, int percentage_delta) {
return (percentage - percentage_delta).clamp (0, 100);
}
/**
* Calculates the end animation duration using the current gesture velocity.
*/
private int calculate_end_animation_duration (int end_percentage, bool cancel_action) {
double animation_velocity = (velocity > ANIMATION_BASE_VELOCITY)
? velocity
: ANIMATION_BASE_VELOCITY;
int pending_percentage = cancel_action ? end_percentage : 100 - end_percentage;
int duration = ((int)(pending_percentage / animation_velocity).abs ())
.clamp (min_animation_duration, max_animation_duration);
return duration;
}
}

View File

@ -91,7 +91,6 @@ namespace Gala {
/**
* set the area where clutter can receive events
**/
#if HAS_MUTTER330
public static void set_input_area (Display display, InputArea area) {
if (Meta.Util.is_wayland_compositor ()) {
return;
@ -132,71 +131,15 @@ namespace Gala {
break;
case InputArea.NONE:
default:
#if HAS_MUTTER334
unowned Meta.X11Display x11display = display.get_x11_display ();
x11display.clear_stage_input_region ();
#else
display.empty_stage_input_region ();
#endif
return;
}
#if HAS_MUTTER334
unowned Meta.X11Display x11display = display.get_x11_display ();
var xregion = X.Fixes.create_region (x11display.get_xdisplay (), rects);
x11display.set_stage_input_region (xregion);
#else
var xregion = X.Fixes.create_region (display.get_x11_display ().get_xdisplay (), rects);
Util.set_stage_input_region (display, xregion);
#endif
}
#else
public static void set_input_area (Screen screen, InputArea area) {
var display = screen.get_display ();
X.Xrectangle[] rects = {};
int width, height;
screen.get_size (out width, out height);
var geometry = screen.get_monitor_geometry (screen.get_primary_monitor ());
switch (area) {
case InputArea.FULLSCREEN:
X.Xrectangle rect = {0, 0, (ushort)width, (ushort)height};
rects = {rect};
break;
case InputArea.DEFAULT:
var settings = new GLib.Settings (Config.SCHEMA + ".behavior");
// if ActionType is NONE make it 0 sized
ushort tl_size = (settings.get_enum ("hotcorner-topleft") != ActionType.NONE ? 1 : 0);
ushort tr_size = (settings.get_enum ("hotcorner-topright") != ActionType.NONE ? 1 : 0);
ushort bl_size = (settings.get_enum ("hotcorner-bottomleft") != ActionType.NONE ? 1 : 0);
ushort br_size = (settings.get_enum ("hotcorner-bottomright") != ActionType.NONE ? 1 : 0);
X.Xrectangle topleft = {(short)geometry.x, (short)geometry.y, tl_size, tl_size};
X.Xrectangle topright = {(short)(geometry.x + geometry.width - 1), (short)geometry.y, tr_size, tr_size};
X.Xrectangle bottomleft = {(short)geometry.x, (short)(geometry.y + geometry.height - 1), bl_size, bl_size};
X.Xrectangle bottomright = {(short)(geometry.x + geometry.width - 1), (short)(geometry.y + geometry.height - 1), br_size, br_size};
rects = {topleft, topright, bottomleft, bottomright};
// add plugin's requested areas
if (area == InputArea.FULLSCREEN || area == InputArea.DEFAULT) {
foreach (var rect in PluginManager.get_default ().regions) {
rects += rect;
}
}
break;
case InputArea.NONE:
default:
screen.empty_stage_input_region ();
return;
}
var xregion = X.Fixes.create_region (display.get_xdisplay (), rects);
screen.set_stage_input_region (xregion);
}
#endif
/**
* Inserts a workspace at the given index. To ensure the workspace is not immediately
@ -211,11 +154,7 @@ namespace Gala {
new_window.change_workspace_by_index (index, false);
#if HAS_MUTTER330
unowned List<WindowActor> actors = new_window.get_display ().get_window_actors ();
#else
unowned List<WindowActor> actors = new_window.get_screen ().get_window_actors ();
#endif
foreach (unowned Meta.WindowActor actor in actors) {
if (actor.is_destroyed ())
continue;

View File

@ -32,34 +32,19 @@ public class Gala.NotificationStack : Object {
private int stack_y;
private int stack_width;
#if HAS_MUTTER330
public Meta.Display display { get; construct; }
#else
public Meta.Screen screen { get; construct; }
#endif
private Gee.ArrayList<unowned Meta.WindowActor> notifications;
#if HAS_MUTTER330
public NotificationStack (Meta.Display display) {
Object (display: display);
}
#else
public NotificationStack (Meta.Screen screen) {
Object (screen: screen);
}
#endif
construct {
notifications = new Gee.ArrayList<unowned Meta.WindowActor> ();
#if HAS_MUTTER330
Meta.MonitorManager.@get ().monitors_changed_internal.connect (update_stack_allocation);
display.workareas_changed.connect (update_stack_allocation);
#else
screen.monitors_changed.connect (update_stack_allocation);
screen.workareas_changed.connect (update_stack_allocation);
#endif
update_stack_allocation ();
}
@ -126,13 +111,8 @@ public class Gala.NotificationStack : Object {
}
private void update_stack_allocation () {
#if HAS_MUTTER330
var primary = display.get_primary_monitor ();
var area = display.get_workspace_manager ().get_active_workspace ().get_work_area_for_monitor (primary);
#else
var primary = screen.get_primary_monitor ();
var area = screen.get_active_workspace ().get_work_area_for_monitor (primary);
#endif
var scale = Utils.get_ui_scaling_factor ();
stack_width = (WIDTH + MARGIN) * scale;

View File

@ -80,11 +80,7 @@ namespace Gala {
debug ("Taking screenshot");
int width, height;
#if HAS_MUTTER330
wm.get_display ().get_size (out width, out height);
#else
wm.get_screen ().get_size (out width, out height);
#endif
var image = take_screenshot (0, 0, width, height, include_cursor);
unconceal_text ();
@ -120,12 +116,7 @@ namespace Gala {
public async void screenshot_window (bool include_frame, bool include_cursor, bool flash, string filename, out bool success, out string filename_used) throws DBusError, IOError {
debug ("Taking window screenshot");
#if HAS_MUTTER330
var window = wm.get_display ().get_focus_window ();
#else
var window = wm.get_screen ().get_display ().get_focus_window ();
#endif
if (window == null) {
unconceal_text ();
throw new DBusError.FAILED ("Cannot find active window");
@ -375,12 +366,7 @@ namespace Gala {
}
Cairo.ImageSurface composite_stage_cursor (Cairo.ImageSurface image, Cairo.RectangleInt image_rect) {
#if HAS_MUTTER330
unowned Meta.CursorTracker cursor_tracker = wm.get_display ().get_cursor_tracker ();
#else
unowned Meta.CursorTracker cursor_tracker = wm.get_screen ().get_cursor_tracker ();
#endif
int x, y;
cursor_tracker.get_pointer (out x, out y, null);

View File

@ -53,11 +53,7 @@ namespace Gala {
public uint8 shadow_opacity { get; set; default = 255; }
public string? css_class { get; set; default = null; }
#if HAS_MUTTER336
Cogl.Pipeline pipeline;
#else
Cogl.Material material;
#endif
string? current_key = null;
public ShadowEffect (int shadow_size, int shadow_spread) {
@ -65,12 +61,7 @@ namespace Gala {
}
construct {
#if HAS_MUTTER336
pipeline = new Cogl.Pipeline (Clutter.get_default_backend ().get_cogl_context ());
#else
material = new Cogl.Material ();
#endif
}
~ShadowEffect () {
@ -78,11 +69,7 @@ namespace Gala {
decrement_shadow_users (current_key);
}
#if HAS_MUTTER336
Cogl.Texture? get_shadow (Cogl.Context context, int width, int height, int shadow_size, int shadow_spread) {
#else
Cogl.Texture? get_shadow (int width, int height, int shadow_size, int shadow_spread) {
#endif
var old_key = current_key;
current_key = "%ix%i:%i:%i".printf (width, height, shadow_size, shadow_spread);
if (old_key == current_key)
@ -117,13 +104,8 @@ namespace Gala {
cr.paint ();
#if HAS_MUTTER336
var texture = new Cogl.Texture2D.from_data (context, width, height, Cogl.PixelFormat.BGRA_8888_PRE,
surface.get_stride (), surface.get_data ());
#else
var texture = new Cogl.Texture.from_data (width, height, 0, Cogl.PixelFormat.BGRA_8888_PRE,
Cogl.PixelFormat.ANY, surface.get_stride (), surface.get_data ());
#endif
shadow_cache.@set (current_key, new Shadow (texture));
return texture;
@ -139,7 +121,6 @@ namespace Gala {
shadow_cache.unset (key);
}
#if HAS_MUTTER336
public override void paint (Clutter.PaintContext context, EffectPaintFlags flags) {
var bounding_box = get_bounding_box ();
var width = (int) (bounding_box.x2 - bounding_box.x1);
@ -159,28 +140,6 @@ namespace Gala {
actor.continue_paint (context);
}
#else
public override void paint (EffectPaintFlags flags) {
var bounding_box = get_bounding_box ();
var width = (int) (bounding_box.x2 - bounding_box.x1);
var height = (int) (bounding_box.y2 - bounding_box.y1);
var shadow = get_shadow (width, height, shadow_size, shadow_spread);
if (shadow != null)
material.set_layer (0, shadow);
var opacity = actor.get_paint_opacity () * shadow_opacity / 255;
var alpha = Cogl.Color.from_4ub (255, 255, 255, opacity);
alpha.premultiply ();
material.set_color (alpha);
Cogl.set_source (material);
Cogl.rectangle (bounding_box.x1, bounding_box.y1, bounding_box.x2, bounding_box.y2);
actor.continue_paint ();
}
#endif
public virtual ActorBox get_bounding_box () {
var size = shadow_size * scale_factor;

View File

@ -205,18 +205,9 @@ namespace Gala {
/**
* Override the paint handler to draw our backdrop if necessary
*/
#if HAS_MUTTER336
public override void paint (Clutter.PaintContext context) {
#else
public override void paint () {
#endif
if (backdrop_opacity < 1 || drag_action.dragging) {
#if HAS_MUTTER336
base.paint (context);
#else
base.paint ();
#endif
return;
}
@ -226,7 +217,6 @@ namespace Gala {
var y = -10;
var height = WorkspaceClone.BOTTOM_OFFSET * scale;
#if HAS_MUTTER336
Cogl.VertexP2T2C4 vertices[4];
vertices[0] = { x, y + height, 0, 1, backdrop_opacity, backdrop_opacity, backdrop_opacity, backdrop_opacity };
vertices[1] = { x, y, 0, 0, 0, 0, 0, 0 };
@ -236,28 +226,7 @@ namespace Gala {
var primitive = new Cogl.Primitive.p2t2c4 (context.get_framebuffer ().get_context (), Cogl.VerticesMode.TRIANGLE_STRIP, vertices);
var pipeline = new Cogl.Pipeline (context.get_framebuffer ().get_context ());
primitive.draw (context.get_framebuffer (), pipeline);
#else
var color_top = Cogl.Color.from_4ub (0, 0, 0, 0);
var color_bottom = Cogl.Color.from_4ub (255, 255, 255, backdrop_opacity);
color_bottom.premultiply ();
Cogl.TextureVertex vertices[4];
vertices[0] = { x, y, 0, 0, 0, color_top };
vertices[1] = { x, y + height, 0, 0, 1, color_bottom };
vertices[2] = { x + width, y + height, 0, 1, 1, color_bottom };
vertices[3] = { x + width, y, 0, 1, 0, color_top };
// for some reason cogl will try mapping the textures of the children
// to the cogl_polygon call. We can fix this and force it to use our
// color by setting a different material with no properties.
Cogl.set_source (dummy_material);
Cogl.polygon (vertices, true);
#endif
#if HAS_MUTTER336
base.paint (context);
#else
base.paint ();
#endif
base.paint (context);
}
/**
@ -343,11 +312,7 @@ namespace Gala {
* delete signal
*/
void close () {
#if HAS_MUTTER330
var time = workspace.get_display ().get_current_time ();
#else
var time = workspace.get_screen ().get_display ().get_current_time ();
#endif
foreach (var window in workspace.list_windows ()) {
var type = window.window_type;
if (!window.is_on_all_workspaces () && (type == WindowType.NORMAL
@ -419,7 +384,6 @@ namespace Gala {
// it's not safe to to call meta_workspace_index() here, we may be still animating something
// while the workspace is already gone, which would result in a crash.
#if HAS_MUTTER330
unowned Meta.WorkspaceManager manager = workspace.get_display ().get_workspace_manager ();
int workspace_index = 0;
for (int i = 0; i < manager.get_n_workspaces (); i++) {
@ -428,21 +392,11 @@ namespace Gala {
break;
}
}
#else
var screen = workspace.get_screen ();
var workspace_index = screen.get_workspaces ().index (workspace);
#endif
if (n_windows < 1) {
#if HAS_MUTTER330
if (!Prefs.get_dynamic_workspaces ()
|| workspace_index != manager.get_n_workspaces () - 1)
return false;
#else
if (!Prefs.get_dynamic_workspaces ()
|| workspace_index != screen.get_n_workspaces () - 1)
return false;
#endif
var buffer = new Granite.Drawing.BufferSurface (SIZE * scale, SIZE * scale);
var offset = (SIZE * scale) / 2 - (PLUS_WIDTH * scale) / 2;
@ -536,21 +490,12 @@ namespace Gala {
}
Actor drag_begin (float click_x, float click_y) {
#if HAS_MUTTER330
unowned Meta.WorkspaceManager manager = workspace.get_display ().get_workspace_manager ();
if (icon_container.get_n_children () < 1 &&
Prefs.get_dynamic_workspaces () &&
workspace.index () == manager.get_n_workspaces () - 1) {
return null;
}
#else
unowned Screen screen = workspace.get_screen ();
if (icon_container.get_n_children () < 1 &&
Prefs.get_dynamic_workspaces () &&
workspace.index () == screen.get_n_workspaces () - 1) {
return null;
}
#endif
float abs_x, abs_y;
float prev_parent_x, prev_parent_y;
@ -582,12 +527,8 @@ namespace Gala {
get_parent ().remove_child (this);
unowned WorkspaceInsertThumb inserter = (WorkspaceInsertThumb) destination;
#if HAS_MUTTER330
unowned Meta.WorkspaceManager manager = workspace.get_display ().get_workspace_manager ();
manager.reorder_workspace (workspace, inserter.workspace_index);
#else
workspace.get_screen ().reorder_workspace (workspace, inserter.workspace_index);
#endif
restore_group ();
} else {

View File

@ -30,25 +30,13 @@ namespace Gala {
public signal void request_reposition (bool animate);
#if HAS_MUTTER330
public Meta.Display display { get; construct; }
#else
public Screen screen { get; construct; }
#endif
#if HAS_MUTTER330
public IconGroupContainer (Meta.Display display) {
Object (display: display);
layout_manager = new BoxLayout ();
}
#else
public IconGroupContainer (Screen screen) {
Object (screen: screen);
layout_manager = new BoxLayout ();
}
#endif
public void add_group (IconGroup group) {
var index = group.workspace.index ();

View File

@ -29,55 +29,31 @@ namespace Gala {
public class MonitorClone : Actor {
public signal void window_selected (Window window);
#if HAS_MUTTER330
public Meta.Display display { get; construct; }
#else
public Screen screen { get; construct; }
#endif
public int monitor { get; construct; }
public GestureAnimationDirector gesture_animation_director { get; construct; }
WindowCloneContainer window_container;
BackgroundManager background;
#if HAS_MUTTER330
public MonitorClone (Meta.Display display, int monitor) {
Object (display: display, monitor: monitor);
public MonitorClone (Meta.Display display, int monitor, GestureAnimationDirector gesture_animation_director) {
Object (display: display, monitor: monitor, gesture_animation_director: gesture_animation_director);
}
#else
public MonitorClone (Screen screen, int monitor) {
Object (screen: screen, monitor: monitor);
}
#endif
construct {
reactive = true;
#if HAS_MUTTER330
background = new BackgroundManager (display, monitor, false);
#else
background = new BackgroundManager (screen, monitor, false);
#endif
background.set_easing_duration (MultitaskingView.ANIMATION_DURATION);
window_container = new WindowCloneContainer ();
window_container = new WindowCloneContainer (gesture_animation_director);
window_container.window_selected.connect ((w) => { window_selected (w); });
#if HAS_MUTTER330
display.restacked.connect (window_container.restack_windows);
display.window_entered_monitor.connect (window_entered);
display.window_left_monitor.connect (window_left);
#else
screen.restacked.connect (window_container.restack_windows);
screen.window_entered_monitor.connect (window_entered);
screen.window_left_monitor.connect (window_left);
#endif
#if HAS_MUTTER330
unowned GLib.List<Meta.WindowActor> window_actors = display.get_window_actors ();
#else
unowned GLib.List<Meta.WindowActor> window_actors = screen.get_window_actors ();
#endif
foreach (unowned Meta.WindowActor window_actor in window_actors) {
if (window_actor.is_destroyed ())
continue;
@ -98,26 +74,16 @@ namespace Gala {
}
~MonitorClone () {
#if HAS_MUTTER330
display.window_entered_monitor.disconnect (window_entered);
display.window_left_monitor.disconnect (window_left);
display.restacked.disconnect (window_container.restack_windows);
#else
screen.window_entered_monitor.disconnect (window_entered);
screen.window_left_monitor.disconnect (window_left);
screen.restacked.disconnect (window_container.restack_windows);
#endif
}
/**
* Make sure the MonitorClone is at the location of the monitor on the stage
*/
public void update_allocation () {
#if HAS_MUTTER330
var monitor_geometry = display.get_monitor_geometry (monitor);
#else
var monitor_geometry = screen.get_monitor_geometry (monitor);
#endif
set_position (monitor_geometry.x, monitor_geometry.y);
set_size (monitor_geometry.width, monitor_geometry.height);

View File

@ -27,15 +27,14 @@ namespace Gala {
public class MultitaskingView : Actor, ActivatableComponent {
public const int ANIMATION_DURATION = 250;
public const AnimationMode ANIMATION_MODE = AnimationMode.EASE_OUT_QUAD;
private GestureAnimationDirector gesture_animation_director;
const int SMOOTH_SCROLL_DELAY = 500;
public WindowManager wm { get; construct; }
#if HAS_MUTTER330
Meta.Display display;
#else
Meta.Screen screen;
#endif
ModalProxy modal_proxy;
bool opened = false;
bool animating = false;
@ -58,21 +57,14 @@ namespace Gala {
clip_to_allocation = true;
opened = false;
#if HAS_MUTTER330
display = wm.get_display ();
#else
screen = wm.get_screen ();
#endif
gesture_animation_director = new GestureAnimationDirector (ANIMATION_DURATION, ANIMATION_DURATION);
workspaces = new Actor ();
workspaces.set_easing_mode (AnimationMode.EASE_OUT_QUAD);
#if HAS_MUTTER330
icon_groups = new IconGroupContainer (display);
#else
icon_groups = new IconGroupContainer (screen);
icon_groups.request_reposition.connect ((animate) => reposition_icon_groups (animate));
#endif
dock_clones = new Actor ();
@ -80,7 +72,6 @@ namespace Gala {
add_child (workspaces);
add_child (dock_clones);
#if HAS_MUTTER330
unowned Meta.WorkspaceManager manager = display.get_workspace_manager ();
for (int i = 0; i < manager.get_n_workspaces (); i++) {
add_workspace (i);
@ -88,31 +79,14 @@ namespace Gala {
manager.workspace_added.connect (add_workspace);
manager.workspace_removed.connect (remove_workspace);
#if HAS_MUTTER334
manager.workspaces_reordered.connect (() => update_positions (false));
#endif
manager.workspace_switched.connect_after ((from, to, direction) => {
update_positions (opened);
});
#else
foreach (var workspace in screen.get_workspaces ())
add_workspace (workspace.index ());
screen.workspace_added.connect (add_workspace);
screen.workspace_removed.connect (remove_workspace);
screen.workspaces_reordered.connect (() => update_positions (false));
screen.workspace_switched.connect_after ((from, to, direction) => {
update_positions (opened);
});
#endif
window_containers_monitors = new List<MonitorClone> ();
update_monitors ();
#if HAS_MUTTER330
Meta.MonitorManager.@get ().monitors_changed.connect (update_monitors);
#else
screen.monitors_changed.connect (update_monitors);
#endif
Prefs.add_listener ((pref) => {
if (pref == Preference.WORKSPACES_ONLY_ON_PRIMARY) {
@ -125,7 +99,6 @@ namespace Gala {
return;
Idle.add (() => {
#if HAS_MUTTER330
unowned List<Workspace> existing_workspaces = null;
for (int i = 0; i < manager.get_n_workspaces (); i++) {
existing_workspaces.append (manager.get_workspace_by_index (i));
@ -142,21 +115,6 @@ namespace Gala {
workspace_clone.destroy ();
}
}
#else
unowned List<Workspace> existing_workspaces = screen.get_workspaces ();
foreach (var child in workspaces.get_children ()) {
unowned WorkspaceClone workspace_clone = (WorkspaceClone) child;
if (existing_workspaces.index (workspace_clone.workspace) < 0) {
workspace_clone.window_selected.disconnect (window_selected);
workspace_clone.selected.disconnect (activate_workspace);
icon_groups.remove_group (workspace_clone.icon_group);
workspace_clone.destroy ();
}
}
#endif
update_monitors ();
update_positions (false);
@ -199,7 +157,6 @@ namespace Gala {
foreach (var monitor_clone in window_containers_monitors)
monitor_clone.destroy ();
#if HAS_MUTTER330
var primary = display.get_primary_monitor ();
if (InternalUtils.workspaces_only_on_primary ()) {
@ -207,7 +164,7 @@ namespace Gala {
if (monitor == primary)
continue;
var monitor_clone = new MonitorClone (display, monitor);
var monitor_clone = new MonitorClone (display, monitor, gesture_animation_director);
monitor_clone.window_selected.connect (window_selected);
monitor_clone.visible = opened;
@ -217,25 +174,6 @@ namespace Gala {
}
var primary_geometry = display.get_monitor_geometry (primary);
#else
var primary = screen.get_primary_monitor ();
if (InternalUtils.workspaces_only_on_primary ()) {
for (var monitor = 0; monitor < screen.get_n_monitors (); monitor++) {
if (monitor == primary)
continue;
var monitor_clone = new MonitorClone (screen, monitor);
monitor_clone.window_selected.connect (window_selected);
monitor_clone.visible = opened;
window_containers_monitors.append (monitor_clone);
wm.ui_group.add_child (monitor_clone);
}
}
var primary_geometry = screen.get_monitor_geometry (primary);
#endif
set_position (primary_geometry.x, primary_geometry.y);
set_size (primary_geometry.width, primary_geometry.height);
@ -295,20 +233,12 @@ namespace Gala {
// smooth scroll delay still active
return false;
#if HAS_MUTTER330
unowned Meta.WorkspaceManager manager = display.get_workspace_manager ();
var active_workspace = manager.get_active_workspace ();
var new_workspace = active_workspace.get_neighbor (direction);
if (active_workspace != new_workspace)
new_workspace.activate (display.get_current_time ());
#else
var active_workspace = screen.get_active_workspace ();
var new_workspace = active_workspace.get_neighbor (direction);
if (active_workspace != new_workspace)
new_workspace.activate (screen.get_display ().get_current_time ());
#endif
return false;
}
@ -321,19 +251,14 @@ namespace Gala {
* positions immediately.
*/
void update_positions (bool animate) {
var scale = InternalUtils.get_ui_scaling_factor ();
#if HAS_MUTTER330
unowned Meta.WorkspaceManager manager = display.get_workspace_manager ();
var active_index = manager.get_active_workspace ().index ();
#else
var active_index = screen.get_active_workspace ().index ();
#endif
var active_x = 0.0f;
foreach (var child in workspaces.get_children ()) {
unowned WorkspaceClone workspace_clone = (WorkspaceClone) child;
var index = workspace_clone.workspace.index ();
var dest_x = index * (workspace_clone.width - (150 * scale));
var dest_x = workspace_clone.multitasking_view_x ();
if (index == active_index) {
active_x = dest_x;
@ -355,12 +280,8 @@ namespace Gala {
}
void reposition_icon_groups (bool animate) {
#if HAS_MUTTER330
unowned Meta.WorkspaceManager manager = display.get_workspace_manager ();
var active_index = manager.get_active_workspace ().index ();
#else
var active_index = screen.get_active_workspace ().index ();
#endif
if (animate) {
icon_groups.save_easing_state ();
@ -382,12 +303,8 @@ namespace Gala {
}
void add_workspace (int num) {
#if HAS_MUTTER330
unowned Meta.WorkspaceManager manager = display.get_workspace_manager ();
var workspace = new WorkspaceClone (manager.get_workspace_by_index (num));
#else
var workspace = new WorkspaceClone (screen.get_workspace_by_index (num));
#endif
var workspace = new WorkspaceClone (manager.get_workspace_by_index (num), gesture_animation_director);
workspace.window_selected.connect (window_selected);
workspace.selected.connect (activate_workspace);
@ -404,15 +321,11 @@ namespace Gala {
WorkspaceClone? workspace = null;
// FIXME is there a better way to get the removed workspace?
#if HAS_MUTTER330
unowned Meta.WorkspaceManager manager = display.get_workspace_manager ();
List<Workspace> existing_workspaces = null;
for (int i = 0; i < manager.get_n_workspaces (); i++) {
existing_workspaces.append (manager.get_workspace_by_index (i));
}
#else
unowned List<Meta.Workspace> existing_workspaces = screen.get_workspaces ();
#endif
foreach (var child in workspaces.get_children ()) {
unowned WorkspaceClone clone = (WorkspaceClone) child;
@ -446,16 +359,10 @@ namespace Gala {
* closed.
*/
void activate_workspace (WorkspaceClone clone, bool close_view) {
#if HAS_MUTTER330
unowned Meta.WorkspaceManager manager = display.get_workspace_manager ();
close_view = close_view && manager.get_active_workspace () == clone.workspace;
clone.workspace.activate (display.get_current_time ());
#else
close_view = close_view && screen.get_active_workspace () == clone.workspace;
clone.workspace.activate (screen.get_display ().get_current_time ());
#endif
if (close_view)
toggle ();
@ -513,7 +420,6 @@ namespace Gala {
* @return The active WorkspaceClone
*/
WorkspaceClone get_active_workspace_clone () {
#if HAS_MUTTER330
unowned Meta.WorkspaceManager manager = display.get_workspace_manager ();
foreach (var child in workspaces.get_children ()) {
unowned WorkspaceClone workspace_clone = (WorkspaceClone) child;
@ -521,20 +427,11 @@ namespace Gala {
return workspace_clone;
}
}
#else
foreach (var child in workspaces.get_children ()) {
unowned WorkspaceClone workspace_clone = (WorkspaceClone) child;
if (workspace_clone.workspace == screen.get_active_workspace ()) {
return workspace_clone;
}
}
#endif
assert_not_reached ();
}
void window_selected (Meta.Window window) {
#if HAS_MUTTER330
var time = display.get_current_time ();
unowned Meta.WorkspaceManager manager = display.get_workspace_manager ();
var workspace = window.get_workspace ();
@ -545,17 +442,6 @@ namespace Gala {
window.activate (time);
toggle ();
}
#else
var time = screen.get_display ().get_current_time ();
var workspace = window.get_workspace ();
if (workspace != screen.get_active_workspace ())
workspace.activate (time);
else {
window.activate (time);
toggle ();
}
#endif
}
/**
@ -569,20 +455,40 @@ namespace Gala {
* {@inheritDoc}
*/
public void open (HashTable<string,Variant>? hints = null) {
if (opened)
return;
bool manual_animation = hints != null && hints.get ("manual_animation").get_boolean ();
toggle ();
if (!opened) {
if (manual_animation && !animating) {
debug ("Starting MultitaskingView manual open animation");
gesture_animation_director.running = true;
}
toggle ();
}
if (opened && manual_animation && gesture_animation_director.running) {
gesture_animation_director.update_animation (hints);
}
}
/**
* {@inheritDoc}
*/
public void close () {
if (!opened)
return;
public void close (HashTable<string,Variant>? hints = null) {
bool manual_animation = hints != null && hints.get ("manual_animation").get_boolean ();
toggle ();
if (opened) {
if (manual_animation && !animating) {
debug ("Starting MultitaskingView manual close animation");
gesture_animation_director.running = true;
}
toggle ();
}
if (!opened && manual_animation && gesture_animation_director.running) {
gesture_animation_director.update_animation (hints);
}
}
/**
@ -591,8 +497,9 @@ namespace Gala {
* to animate to their positions.
*/
void toggle () {
if (animating)
if (animating) {
return;
}
animating = true;
@ -603,8 +510,9 @@ namespace Gala {
if (opening) {
container.visible = true;
container.open ();
} else
} else {
container.close ();
}
}
if (opening) {
@ -625,12 +533,8 @@ namespace Gala {
// find active workspace clone and raise it, so there are no overlaps while transitioning
WorkspaceClone? active_workspace = null;
#if HAS_MUTTER330
unowned Meta.WorkspaceManager manager = display.get_workspace_manager ();
var active = manager.get_active_workspace ();
#else
var active = screen.get_active_workspace ();
#endif
foreach (var child in workspaces.get_children ()) {
unowned WorkspaceClone workspace = (WorkspaceClone) child;
if (workspace.workspace == active) {
@ -646,100 +550,161 @@ namespace Gala {
child.remove_all_transitions ();
}
update_positions (false);
if (!gesture_animation_director.canceling) {
update_positions (false);
}
foreach (var child in workspaces.get_children ()) {
unowned WorkspaceClone workspace = (WorkspaceClone) child;
if (opening)
if (opening) {
workspace.open ();
else
} else {
workspace.close ();
}
}
if (opening) {
show_docks ();
} else {
hide_docks ();
}
GestureAnimationDirector.OnEnd on_animation_end = (percentage, cancel_action) => {
var animation_duration = cancel_action ? 0 : ANIMATION_DURATION;
Timeout.add (animation_duration, () => {
if (!opening) {
foreach (var container in window_containers_monitors) {
container.visible = false;
}
hide ();
wm.background_group.show ();
wm.window_group.show ();
wm.top_window_group.show ();
dock_clones.destroy_all_children ();
wm.pop_modal (modal_proxy);
}
animating = false;
gesture_animation_director.disconnect_all_handlers ();
gesture_animation_director.running = false;
gesture_animation_director.canceling = cancel_action;
if (cancel_action) {
toggle ();
}
return false;
});
};
if (!gesture_animation_director.running) {
on_animation_end (100, false, 0);
} else {
gesture_animation_director.connect_handlers (null, null, (owned) on_animation_end);
}
}
void show_docks () {
float clone_offset_x, clone_offset_y;
dock_clones.get_transformed_position (out clone_offset_x, out clone_offset_y);
if (opening) {
#if HAS_MUTTER330
unowned GLib.List<Meta.WindowActor> window_actors = display.get_window_actors ();
#else
unowned GLib.List<Meta.WindowActor> window_actors = screen.get_window_actors ();
#endif
foreach (unowned Meta.WindowActor actor in window_actors) {
const int MAX_OFFSET = 100;
unowned GLib.List<Meta.WindowActor> window_actors = display.get_window_actors ();
foreach (unowned Meta.WindowActor actor in window_actors) {
const int MAX_OFFSET = 100;
if (actor.is_destroyed ())
continue;
if (actor.is_destroyed ())
continue;
unowned Meta.Window window = actor.get_meta_window ();
var monitor = window.get_monitor ();
unowned Meta.Window window = actor.get_meta_window ();
var monitor = window.get_monitor ();
if (window.window_type != WindowType.DOCK)
continue;
if (window.window_type != WindowType.DOCK)
continue;
#if HAS_MUTTER330
if (display.get_monitor_in_fullscreen (monitor))
continue;
if (display.get_monitor_in_fullscreen (monitor))
continue;
var monitor_geom = display.get_monitor_geometry (monitor);
#else
if (screen.get_monitor_in_fullscreen (monitor))
continue;
var monitor_geom = display.get_monitor_geometry (monitor);
var monitor_geom = screen.get_monitor_geometry (monitor);
#endif
var window_geom = window.get_frame_rect ();
var top = monitor_geom.y + MAX_OFFSET > window_geom.y;
var bottom = monitor_geom.y + monitor_geom.height - MAX_OFFSET > window_geom.y;
var window_geom = window.get_frame_rect ();
var top = monitor_geom.y + MAX_OFFSET > window_geom.y;
var bottom = monitor_geom.y + monitor_geom.height - MAX_OFFSET > window_geom.y;
if (!top && !bottom)
continue;
if (!top && !bottom)
continue;
var initial_x = actor.x - clone_offset_x;
var initial_y = actor.y - clone_offset_y;
var target_y = (top)
? actor.y - actor.height - clone_offset_y
: actor.y + actor.height - clone_offset_y;
var clone = new SafeWindowClone (window, true);
clone.set_position (actor.x - clone_offset_x, actor.y - clone_offset_y);
clone.set_easing_duration (ANIMATION_DURATION);
var clone = new SafeWindowClone (window, true);
dock_clones.add_child (clone);
GestureAnimationDirector.OnBegin on_animation_begin = () => {
clone.set_position (initial_x, initial_y);
clone.set_easing_mode (0);
};
GestureAnimationDirector.OnUpdate on_animation_update = (percentage) => {
var y = GestureAnimationDirector.animation_value (initial_y, target_y, percentage);
clone.y = y;
};
GestureAnimationDirector.OnEnd on_animation_end = (percentage, cancel_action) => {
clone.set_easing_mode (ANIMATION_MODE);
dock_clones.add_child (clone);
if (top)
clone.y = actor.y - actor.height - clone_offset_y;
else if (bottom)
clone.y = actor.y + actor.height - clone_offset_y;
}
} else {
foreach (var child in dock_clones.get_children ()) {
var dock = (Clone) child;
dock.y = dock.source.y - clone_offset_y;
}
}
if (!opening) {
Timeout.add (ANIMATION_DURATION, () => {
foreach (var container in window_containers_monitors) {
container.visible = false;
if (cancel_action) {
return;
}
hide ();
clone.set_easing_duration (gesture_animation_director.canceling ? 0 : ANIMATION_DURATION);
clone.y = target_y;
};
wm.background_group.show ();
wm.window_group.show ();
wm.top_window_group.show ();
if (!gesture_animation_director.running) {
on_animation_begin (0);
on_animation_end (100, false, 0);
} else {
gesture_animation_director.connect_handlers ((owned) on_animation_begin, (owned) on_animation_update, (owned) on_animation_end);
}
}
}
dock_clones.destroy_all_children ();
void hide_docks () {
float clone_offset_x, clone_offset_y;
dock_clones.get_transformed_position (out clone_offset_x, out clone_offset_y);
wm.pop_modal (modal_proxy);
foreach (var child in dock_clones.get_children ()) {
var dock = (Clone) child;
var initial_y = dock.y;
var target_y = dock.source.y - clone_offset_y;
animating = false;
GestureAnimationDirector.OnUpdate on_animation_update = (percentage) => {
var y = GestureAnimationDirector.animation_value (initial_y, target_y, percentage);
dock.y = y;
};
return false;
});
} else {
Timeout.add (ANIMATION_DURATION, () => {
animating = false;
return false;
});
GestureAnimationDirector.OnEnd on_animation_end = (percentage, cancel_action) => {
if (cancel_action) {
return;
}
dock.set_easing_duration (ANIMATION_DURATION);
dock.set_easing_mode (ANIMATION_MODE);
dock.y = target_y;
};
if (!gesture_animation_director.running) {
on_animation_end (100, false, 0);
} else {
gesture_animation_director.connect_handlers (null, (owned) on_animation_update, (owned) on_animation_end);
}
}
}

View File

@ -36,11 +36,7 @@ namespace Gala {
reactive = true;
int screen_width, screen_height;
#if HAS_MUTTER330
wm.get_display ().get_size (out screen_width, out screen_height);
#else
wm.get_screen ().get_size (out screen_width, out screen_height);
#endif
width = screen_width;
height = screen_height;
@ -77,23 +73,14 @@ namespace Gala {
}
public void close () {
#if HAS_MUTTER330
wm.get_display ().set_cursor (Meta.Cursor.DEFAULT);
#else
wm.get_screen ().set_cursor (Meta.Cursor.DEFAULT);
#endif
if (modal_proxy != null) {
wm.pop_modal (modal_proxy);
}
}
public void start_selection () {
#if HAS_MUTTER330
wm.get_display ().set_cursor (Meta.Cursor.CROSSHAIR);
#else
wm.get_screen ().set_cursor (Meta.Cursor.CROSSHAIR);
#endif
grab_key_focus ();
modal_proxy = wm.push_modal ();

View File

@ -189,11 +189,7 @@ namespace Gala {
public void expand_to_screen_size () {
int screen_width, screen_height;
#if HAS_MUTTER330
wm.get_display ().get_size (out screen_width, out screen_height);
#else
wm.get_screen ().get_size (out screen_width, out screen_height);
#endif
width = screen_width;
height = screen_height;
}
@ -331,12 +327,7 @@ namespace Gala {
activation_time = GLib.get_monotonic_time ();
}
#if HAS_MUTTER330
wm.get_display ().get_cursor_tracker ().set_pointer_visible (false);
#else
wm.get_screen ().get_cursor_tracker ().set_pointer_visible (false);
#endif
visible = true;
grab_key_focus ();
modal_proxy = wm.push_modal ();
@ -397,12 +388,7 @@ namespace Gala {
modal_proxy = null;
}
#if HAS_MUTTER330
wm.get_display ().get_cursor_tracker ().set_pointer_visible (true);
#else
wm.get_screen ().get_cursor_tracker ().set_pointer_visible (true);
#endif
visible = false;
wake_up_screen ();

View File

@ -40,11 +40,7 @@ namespace Gala {
reactive = true;
int screen_width, screen_height;
#if HAS_MUTTER330
wm.get_display ().get_size (out screen_width, out screen_height);
#else
wm.get_screen ().get_size (out screen_width, out screen_height);
#endif
width = screen_width;
height = screen_height;
@ -120,11 +116,7 @@ namespace Gala {
}
public void close () {
#if HAS_MUTTER330
wm.get_display ().set_cursor (Meta.Cursor.DEFAULT);
#else
wm.get_screen ().set_cursor (Meta.Cursor.DEFAULT);
#endif
if (modal_proxy != null) {
wm.pop_modal (modal_proxy);
@ -132,11 +124,7 @@ namespace Gala {
}
public void start_selection () {
#if HAS_MUTTER330
wm.get_display ().set_cursor (Meta.Cursor.CROSSHAIR);
#else
wm.get_screen ().set_cursor (Meta.Cursor.CROSSHAIR);
#endif
grab_key_focus ();
modal_proxy = wm.push_modal ();

View File

@ -94,6 +94,7 @@ namespace Gala {
}
public bool overview_mode { get; construct; }
public GestureAnimationDirector? gesture_animation_director { get; construct; }
[CCode (notify = false)]
public uint8 shadow_opacity {
@ -122,8 +123,8 @@ namespace Gala {
Actor active_shape;
Actor window_icon;
public WindowClone (Meta.Window window, bool overview_mode = false) {
Object (window: window, overview_mode: overview_mode);
public WindowClone (Meta.Window window, GestureAnimationDirector? gesture_animation_director, bool overview_mode = false) {
Object (window: window, gesture_animation_director: gesture_animation_director, overview_mode: overview_mode);
}
construct {
@ -266,13 +267,8 @@ namespace Gala {
* the current one. To ease their appearance we have to fade them in.
*/
bool should_fade () {
#if HAS_MUTTER330
return (overview_mode
&& window.get_workspace () != window.get_display ().get_workspace_manager ().get_active_workspace ()) || window.minimized;
#else
return (overview_mode
&& window.get_workspace () != window.get_screen ().get_active_workspace ()) || window.minimized;
#endif
}
void on_all_workspaces_changed () {
@ -289,32 +285,71 @@ namespace Gala {
public void transition_to_original_state (bool animate) {
var outer_rect = window.get_frame_rect ();
#if HAS_MUTTER330
var monitor_geom = window.get_display ().get_monitor_geometry (window.get_monitor ());
#else
var monitor_geom = window.get_screen ().get_monitor_geometry (window.get_monitor ());
#endif
var offset_x = monitor_geom.x;
var offset_y = monitor_geom.y;
save_easing_state ();
set_easing_mode (MultitaskingView.ANIMATION_MODE);
set_easing_duration (animate ? MultitaskingView.ANIMATION_DURATION : 0);
var initial_x = x;
var initial_y = y;
var initial_width = width;
var initial_height = height;
set_position (outer_rect.x - offset_x, outer_rect.y - offset_y);
set_size (outer_rect.width, outer_rect.height);
var target_x = outer_rect.x - offset_x;
var target_y = outer_rect.y - offset_y;
if (should_fade ())
opacity = 0;
GestureAnimationDirector.OnBegin on_animation_begin = () => {
window_icon.set_easing_duration (0);
};
restore_easing_state ();
GestureAnimationDirector.OnUpdate on_animation_update = (percentage) => {
var x = GestureAnimationDirector.animation_value (initial_x, target_x, percentage);
var y = GestureAnimationDirector.animation_value (initial_y, target_y, percentage);
var width = GestureAnimationDirector.animation_value (initial_width, outer_rect.width, percentage);
var height = GestureAnimationDirector.animation_value (initial_height, outer_rect.height, percentage);
var opacity = GestureAnimationDirector.animation_value (255f, 0f, percentage);
if (animate)
toggle_shadow (false);
set_size (width, height);
set_position (x, y);
window_icon.opacity = (uint) opacity;
window_icon.set_position ((width - WINDOW_ICON_SIZE) / 2,
height - (WINDOW_ICON_SIZE * scale_factor) * 0.75f);
};
window_icon.set_position ((outer_rect.width - WINDOW_ICON_SIZE) / 2, outer_rect.height - (WINDOW_ICON_SIZE * scale_factor) * 0.75f);
window_icon.opacity = 0;
close_button.opacity = 0;
GestureAnimationDirector.OnEnd on_animation_end = (percentage, cancel_action) => {
window_icon.set_easing_duration (MultitaskingView.ANIMATION_DURATION);
if (cancel_action) {
return;
}
save_easing_state ();
set_easing_mode (MultitaskingView.ANIMATION_MODE);
set_easing_duration (animate ? MultitaskingView.ANIMATION_DURATION : 0);
set_position (target_x, target_y);
set_size (outer_rect.width, outer_rect.height);
if (should_fade ()) {
opacity = 0;
}
restore_easing_state ();
if (animate) {
toggle_shadow (false);
}
window_icon.set_position ((outer_rect.width - WINDOW_ICON_SIZE) / 2, outer_rect.height - (WINDOW_ICON_SIZE * scale_factor) * 0.75f);
window_icon.opacity = 0;
close_button.opacity = 0;
};
if (!animate || gesture_animation_director == null || !gesture_animation_director.running) {
on_animation_begin (0);
on_animation_end (100, false, 0);
} else {
gesture_animation_director.connect_handlers ((owned) on_animation_begin, (owned) on_animation_update, (owned) on_animation_end);
}
}
/**
@ -322,28 +357,67 @@ namespace Gala {
*/
public void take_slot (Meta.Rectangle rect) {
slot = rect;
var initial_x = x;
var initial_y = y;
var initial_width = width;
var initial_height = height;
save_easing_state ();
set_easing_duration (MultitaskingView.ANIMATION_DURATION);
set_easing_mode (MultitaskingView.ANIMATION_MODE);
GestureAnimationDirector.OnBegin on_animation_begin = () => {
window_icon.opacity = 0;
window_icon.set_easing_duration (0);
};
set_size (rect.width, rect.height);
set_position (rect.x, rect.y);
GestureAnimationDirector.OnUpdate on_animation_update = (percentage) => {
var x = GestureAnimationDirector.animation_value (initial_x, rect.x, percentage);
var y = GestureAnimationDirector.animation_value (initial_y, rect.y, percentage);
var width = GestureAnimationDirector.animation_value (initial_width, rect.width, percentage);
var height = GestureAnimationDirector.animation_value (initial_height, rect.height, percentage);
var opacity = GestureAnimationDirector.animation_value (0f, 255f, percentage);
window_icon.opacity = 255;
window_icon.set_position ((rect.width - WINDOW_ICON_SIZE) / 2, rect.height - (WINDOW_ICON_SIZE * scale_factor) * 0.75f);
set_size (width, height);
set_position (x, y);
window_icon.opacity = (uint) opacity;
window_icon.set_position ((width - WINDOW_ICON_SIZE) / 2,
height - (WINDOW_ICON_SIZE * scale_factor) * 0.75f);
};
restore_easing_state ();
GestureAnimationDirector.OnEnd on_animation_end = (percentage, cancel_action) => {
window_icon.set_easing_duration (MultitaskingView.ANIMATION_DURATION);
toggle_shadow (true);
if (cancel_action) {
return;
}
if (opacity < 255) {
save_easing_state ();
set_easing_mode (AnimationMode.EASE_OUT_QUAD);
set_easing_duration (300);
set_easing_duration (MultitaskingView.ANIMATION_DURATION);
set_easing_mode (MultitaskingView.ANIMATION_MODE);
set_size (rect.width, rect.height);
set_position (rect.x, rect.y);
window_icon.opacity = 255;
window_icon.set_position ((rect.width - WINDOW_ICON_SIZE) / 2,
rect.height - (WINDOW_ICON_SIZE * scale_factor) * 0.75f);
opacity = 255;
restore_easing_state ();
toggle_shadow (true);
if (opacity < 255) {
save_easing_state ();
set_easing_mode (AnimationMode.EASE_OUT_QUAD);
set_easing_duration (300);
opacity = 255;
restore_easing_state ();
}
};
if (gesture_animation_director == null || !gesture_animation_director.running) {
on_animation_begin (0);
on_animation_end (100, false, 0);
} else {
gesture_animation_director.connect_handlers ((owned) on_animation_begin, (owned) on_animation_update, (owned) on_animation_end);
}
}
@ -472,17 +546,10 @@ namespace Gala {
* to select our window.
*/
void close_window () {
#if HAS_MUTTER330
unowned Meta.Display display = window.get_display ();
check_confirm_dialog_cb = display.window_entered_monitor.connect (check_confirm_dialog);
window.@delete (display.get_current_time ());
#else
var screen = window.get_screen ();
check_confirm_dialog_cb = screen.window_entered_monitor.connect (check_confirm_dialog);
window.@delete (screen.get_display ().get_current_time ());
#endif
}
void check_confirm_dialog (int monitor, Meta.Window new_window) {
@ -492,11 +559,7 @@ namespace Gala {
return false;
});
#if HAS_MUTTER330
SignalHandler.disconnect (window.get_display (), check_confirm_dialog_cb);
#else
SignalHandler.disconnect (window.get_screen (), check_confirm_dialog_cb);
#endif
check_confirm_dialog_cb = 0;
}
}
@ -514,11 +577,7 @@ namespace Gala {
clone.destroy ();
if (check_confirm_dialog_cb != 0) {
#if HAS_MUTTER330
SignalHandler.disconnect (window.get_display (), check_confirm_dialog_cb);
#else
SignalHandler.disconnect (window.get_screen (), check_confirm_dialog_cb);
#endif
check_confirm_dialog_cb = 0;
}
@ -619,17 +678,10 @@ namespace Gala {
return;
// for an icon group, we only do animations if there is an actual movement possible
#if HAS_MUTTER330
if (icon_group != null
&& icon_group.workspace == window.get_workspace ()
&& window.get_monitor () == window.get_display ().get_primary_monitor ())
return;
#else
if (icon_group != null
&& icon_group.workspace == window.get_workspace ()
&& window.get_monitor () == window.get_screen ().get_primary_monitor ())
return;
#endif
var scale = hovered ? 0.4 : 1.0;
var opacity = hovered ? 0 : 255;
@ -663,11 +715,7 @@ namespace Gala {
*/
void drag_end (Actor destination) {
Meta.Workspace workspace = null;
#if HAS_MUTTER330
var primary = window.get_display ().get_primary_monitor ();
#else
var primary = window.get_screen ().get_primary_monitor ();
#endif
active_shape.show ();

View File

@ -30,6 +30,7 @@ namespace Gala {
public int padding_right { get; set; default = 12; }
public int padding_bottom { get; set; default = 12; }
public GestureAnimationDirector? gesture_animation_director { get; construct; }
public bool overview_mode { get; construct; }
bool opened;
@ -40,8 +41,8 @@ namespace Gala {
*/
WindowClone? current_window;
public WindowCloneContainer (bool overview_mode = false) {
Object (overview_mode: overview_mode);
public WindowCloneContainer (GestureAnimationDirector? gesture_animation_director, bool overview_mode = false) {
Object (gesture_animation_director: gesture_animation_director, overview_mode: overview_mode);
}
construct {
@ -68,7 +69,7 @@ namespace Gala {
var windows_ordered = display.sort_windows_by_stacking (windows);
var new_window = new WindowClone (window, overview_mode);
var new_window = new WindowClone (window, gesture_animation_director, overview_mode);
new_window.selected.connect (window_selected_cb);
new_window.destroy.connect (window_destroyed);
@ -136,7 +137,6 @@ namespace Gala {
* Sort the windows z-order by their actual stacking to make intersections
* during animations correct.
*/
#if HAS_MUTTER330
public void restack_windows (Meta.Display display) {
var children = get_children ();
@ -161,33 +161,6 @@ namespace Gala {
}
}
}
#else
public void restack_windows (Screen screen) {
unowned Meta.Display display = screen.get_display ();
var children = get_children ();
GLib.SList<Meta.Window> windows = new GLib.SList<Meta.Window> ();
foreach (unowned Actor child in children) {
unowned WindowClone tw = (WindowClone) child;
windows.prepend (tw.window);
}
var windows_ordered = display.sort_windows_by_stacking (windows);
windows_ordered.reverse ();
foreach (unowned Meta.Window window in windows_ordered) {
var i = 0;
foreach (unowned Actor child in children) {
if (((WindowClone) child).window == window) {
set_child_at_index (child, i);
children.remove (child);
i++;
break;
}
}
}
}
#endif
/**
* Recalculate the tiling positions of the windows and animate them to
@ -337,8 +310,9 @@ namespace Gala {
* When opened the WindowClones are animated to a tiled layout
*/
public void open (Window? selected_window = null) {
if (opened)
if (opened) {
return;
}
opened = true;
@ -361,8 +335,11 @@ namespace Gala {
// make sure our windows are where they belong in case they were moved
// while were closed.
foreach (var window in get_children ())
((WindowClone) window).transition_to_original_state (false);
if (gesture_animation_director == null || !gesture_animation_director.canceling) {
foreach (var window in get_children ()) {
((WindowClone) window).transition_to_original_state (false);
}
}
reflow ();
}
@ -372,13 +349,15 @@ namespace Gala {
* to make them take their original locations again.
*/
public void close () {
if (!opened)
if (!opened) {
return;
}
opened = false;
foreach (var window in get_children ())
foreach (var window in get_children ()) {
((WindowClone) window).transition_to_original_state (true);
}
}
}
}

View File

@ -34,12 +34,7 @@ namespace Gala {
public WindowManager wm { get; construct; }
#if HAS_MUTTER330
Meta.Display display;
#else
Meta.Screen screen;
#endif
ModalProxy modal_proxy;
bool ready;
@ -51,17 +46,9 @@ namespace Gala {
}
construct {
#if HAS_MUTTER330
display = wm.get_display ();
display.get_workspace_manager ().workspace_switched.connect (close);
display.get_workspace_manager ().workspace_switched.connect (() => { close (); });
display.restacked.connect (restack_windows);
#else
screen = wm.get_screen ();
screen.workspace_switched.connect (close);
screen.restacked.connect (restack_windows);
#endif
visible = false;
ready = true;
@ -69,11 +56,7 @@ namespace Gala {
}
~WindowOverview () {
#if HAS_MUTTER330
display.restacked.disconnect (restack_windows);
#else
screen.restacked.disconnect (restack_windows);
#endif
}
public override bool key_press_event (Clutter.KeyEvent event) {
@ -124,7 +107,6 @@ namespace Gala {
workspaces = new List<Workspace> ();
#if HAS_MUTTER330
unowned Meta.WorkspaceManager manager = display.get_workspace_manager ();
if (all_windows) {
for (int i = 0; i < manager.get_n_workspaces (); i++) {
@ -133,14 +115,6 @@ namespace Gala {
} else {
workspaces.append (manager.get_active_workspace ());
}
#else
if (all_windows) {
foreach (var workspace in screen.get_workspaces ())
workspaces.append (workspace);
} else {
workspaces.append (screen.get_active_workspace ());
}
#endif
foreach (var workspace in workspaces) {
foreach (var window in workspace.list_windows ()) {
@ -176,17 +150,10 @@ namespace Gala {
workspace.window_removed.connect (remove_window);
}
#if HAS_MUTTER330
display.window_left_monitor.connect (window_left_monitor);
// sort windows by stacking order
var windows = display.sort_windows_by_stacking (used_windows);
#else
screen.window_left_monitor.connect (window_left_monitor);
// sort windows by stacking order
var windows = screen.get_display ().sort_windows_by_stacking (used_windows);
#endif
grab_key_focus ();
@ -195,15 +162,10 @@ namespace Gala {
visible = true;
#if HAS_MUTTER330
for (var i = 0; i < display.get_n_monitors (); i++) {
var geometry = display.get_monitor_geometry (i);
#else
for (var i = 0; i < screen.get_n_monitors (); i++) {
var geometry = screen.get_monitor_geometry (i);
#endif
var container = new WindowCloneContainer (true) {
var container = new WindowCloneContainer (null, true) {
padding_top = TOP_GAP,
padding_left = BORDER,
padding_right = BORDER,
@ -239,17 +201,10 @@ namespace Gala {
return (name != "expose-windows" && name != "expose-all-windows");
}
#if HAS_MUTTER330
void restack_windows (Display display) {
foreach (var child in get_children ())
((WindowCloneContainer) child).restack_windows (display);
}
#else
void restack_windows (Screen screen) {
foreach (var child in get_children ())
((WindowCloneContainer) child).restack_windows (screen);
}
#endif
void window_left_monitor (int num, Window window) {
unowned WindowCloneContainer container = get_child_at_index (num) as WindowCloneContainer;
@ -289,7 +244,6 @@ namespace Gala {
container.remove_window (window);
}
#if HAS_MUTTER330
void thumb_selected (Window window) {
if (window.get_workspace () == display.get_workspace_manager ().get_active_workspace ()) {
window.activate (display.get_current_time ());
@ -303,26 +257,11 @@ namespace Gala {
});
}
}
#else
void thumb_selected (Window window) {
if (window.get_workspace () == screen.get_active_workspace ()) {
window.activate (screen.get_display ().get_current_time ());
close ();
} else {
close ();
//wait for the animation to finish before switching
Timeout.add (400, () => {
window.get_workspace ().activate_with_focus (window, screen.get_display ().get_current_time ());
return false;
});
}
}
#endif
/**
* {@inheritDoc}
*/
public void close () {
public void close (HashTable<string,Variant>? hints = null) {
if (!visible || !ready)
return;
@ -330,12 +269,8 @@ namespace Gala {
workspace.window_added.disconnect (add_window);
workspace.window_removed.disconnect (remove_window);
}
#if HAS_MUTTER330
display.window_left_monitor.disconnect (window_left_monitor);
#else
screen.window_left_monitor.disconnect (window_left_monitor);
#endif
display.window_left_monitor.disconnect (window_left_monitor);
ready = false;
wm.pop_modal (modal_proxy);
@ -355,11 +290,7 @@ namespace Gala {
ready = true;
visible = false;
#if HAS_MUTTER330
foreach (var window in display.get_workspace_manager ().get_active_workspace ().list_windows ())
#else
foreach (var window in screen.get_active_workspace ().list_windows ())
#endif
if (window.showing_on_its_workspace ())
((Actor) window.get_compositor_private ()).show ();

View File

@ -100,11 +100,7 @@ namespace Gala {
add_child (window_clones);
add_child (dock);
#if HAS_MUTTER330
Meta.MonitorManager.@get ().monitors_changed.connect (update_actors);
#else
wm.get_screen ().monitors_changed.connect (update_actors);
#endif
visible = false;
}
@ -113,12 +109,7 @@ namespace Gala {
if (monitor != null)
monitor.cancel ();
#if HAS_MUTTER330
Meta.MonitorManager.@get ().monitors_changed.disconnect (update_actors);
#else
wm.get_screen ().monitors_changed.disconnect (update_actors);
#endif
}
void load_dock_theme () {
@ -138,13 +129,8 @@ namespace Gala {
void update_dock () {
ui_scale_factor = InternalUtils.get_ui_scaling_factor ();
#if HAS_MUTTER330
unowned Meta.Display display = wm.get_display ();
var geometry = display.get_monitor_geometry (display.get_primary_monitor ());
#else
var screen = wm.get_screen ();
var geometry = screen.get_monitor_geometry (screen.get_primary_monitor ());
#endif
var layout = (BoxLayout) dock.layout_manager;
var position = dock_settings.Position;
@ -196,11 +182,7 @@ namespace Gala {
void update_background () {
int width = 0, height = 0;
#if HAS_MUTTER330
wm.get_display ().get_size (out width, out height);
#else
wm.get_screen ().get_size (out width, out height);
#endif
background.set_size (width, height);
}
@ -340,11 +322,7 @@ namespace Gala {
// wait for the dimming to finish
Timeout.add (250, () => {
#if HAS_MUTTER330
close (wm.get_display ().get_current_time ());
#else
close (wm.get_screen ().get_display ().get_current_time ());
#endif
return false;
});
} else
@ -359,11 +337,7 @@ namespace Gala {
void icon_removed (Actor actor) {
if (dock.get_n_children () == 1) {
#if HAS_MUTTER330
close (wm.get_display ().get_current_time ());
#else
close (wm.get_screen ().get_display ().get_current_time ());
#endif
return;
}
@ -396,21 +370,12 @@ namespace Gala {
}
public override void key_focus_out () {
#if HAS_MUTTER330
close (wm.get_display ().get_current_time ());
#else
close (wm.get_screen ().get_display ().get_current_time ());
#endif
}
[CCode (instance_pos = -1)]
#if HAS_MUTTER330
public void handle_switch_windows (Display display, Window? window, Clutter.KeyEvent event,
KeyBinding binding) {
#else
public void handle_switch_windows (Display display, Screen screen, Window? window,
Clutter.KeyEvent event, KeyBinding binding) {
#endif
var now = get_monotonic_time () / 1000;
if (now - last_switch < MIN_DELTA)
return;
@ -423,11 +388,7 @@ namespace Gala {
last_switch = now;
#if HAS_MUTTER330
var workspace = display.get_workspace_manager ().get_active_workspace ();
#else
var workspace = screen.get_active_workspace ();
#endif
var binding_name = binding.get_name ();
var backward = binding_name.has_suffix ("-backward");
@ -472,23 +433,13 @@ namespace Gala {
dim_windows ();
grab_key_focus ();
#if HAS_MUTTER330
if ((get_current_modifiers () & modifier_mask) == 0)
close (wm.get_display ().get_current_time ());
#else
if ((get_current_modifiers () & modifier_mask) == 0)
close (wm.get_screen ().get_display ().get_current_time ());
#endif
}
void close_cleanup () {
#if HAS_MUTTER330
var display = wm.get_display ();
var workspace = display.get_workspace_manager ().get_active_workspace ();
#else
var screen = wm.get_screen ();
var workspace = screen.get_active_workspace ();
#endif
dock.destroy_all_children ();
@ -499,11 +450,7 @@ namespace Gala {
window_clones.destroy_all_children ();
// need to go through all the windows because of hidden dialogs
#if HAS_MUTTER330
unowned GLib.List<Meta.WindowActor> window_actors = display.get_window_actors ();
#else
unowned GLib.List<Meta.WindowActor> window_actors = screen.get_window_actors ();
#endif
foreach (unowned Meta.WindowActor actor in window_actors) {
if (actor.is_destroyed ())
continue;
@ -667,13 +614,7 @@ namespace Gala {
* not enough windows
*/
bool collect_windows (Workspace workspace) {
#if HAS_MUTTER330
var display = workspace.get_display ();
#else
var screen = workspace.get_screen ();
var display = screen.get_display ();
#endif
var windows = display.get_tab_list (TabList.NORMAL, workspace);
var current = display.get_tab_current (TabList.NORMAL, workspace);
@ -685,11 +626,7 @@ namespace Gala {
if (window.minimized)
window.unminimize ();
else
#if HAS_MUTTER330
Utils.bell (display);
#else
Utils.bell (screen);
#endif
window.activate (display.get_current_time ());
@ -708,11 +645,7 @@ namespace Gala {
current_window = (WindowIcon) dock.get_child_at_index (0);
// hide the others
#if HAS_MUTTER330
unowned GLib.List<Meta.WindowActor> window_actors = display.get_window_actors ();
#else
unowned GLib.List<Meta.WindowActor> window_actors = screen.get_window_actors ();
#endif
foreach (unowned Meta.WindowActor actor in window_actors) {
if (actor.is_destroyed ())
continue;

View File

@ -23,31 +23,16 @@ namespace Gala {
* Utility class which adds a border and a shadow to a Background
*/
class FramedBackground : BackgroundManager {
#if HAS_MUTTER336
private Cogl.Pipeline pipeline;
#endif
#if HAS_MUTTER330
public FramedBackground (Display display) {
Object (display: display, monitor_index: display.get_primary_monitor (), control_position: false);
}
#else
public FramedBackground (Screen screen) {
Object (screen: screen, monitor_index: screen.get_primary_monitor (), control_position: false);
}
#endif
construct {
#if HAS_MUTTER336
pipeline = new Cogl.Pipeline (Clutter.get_default_backend ().get_cogl_context ());
#endif
#if HAS_MUTTER330
var primary = display.get_primary_monitor ();
var monitor_geom = display.get_monitor_geometry (primary);
#else
var primary = screen.get_primary_monitor ();
var monitor_geom = screen.get_monitor_geometry (primary);
#endif
var effect = new ShadowEffect (40, 5) {
css_class = "workspace"
@ -73,7 +58,7 @@ namespace Gala {
fb.draw_rectangle (pipeline, 0.5f, 0.5f, width - 1, height - 1);
fb.pop_clip ();
}
#elif HAS_MUTTER336
#else
public override void paint (Clutter.PaintContext context) {
base.paint (context);
@ -88,19 +73,6 @@ namespace Gala {
path.rectangle (0.5f, 0.5f, width - 1, height - 1);
context.get_framebuffer ().stroke_path (pipeline, path);
}
#else
public override void paint () {
base.paint ();
Cogl.set_source_color4ub (0, 0, 0, 100);
var path = new Cogl.Path ();
path.rectangle (0, 0, width, height);
path.stroke ();
Cogl.set_source_color4ub (255, 255, 255, 25);
path.rectangle (0.5f, 0.5f, width - 1, height - 1);
path.stroke ();
}
#endif
}
@ -128,6 +100,12 @@ namespace Gala {
*/
const int HOVER_ACTIVATE_DELAY = 400;
/**
* The MultitaskingView shows the workspaces overlapping them WorkspaceClone.X_OFFSET pixels
* making it possible to move windows to the next/previous workspace.
*/
public const int X_OFFSET = 150;
/**
* A window has been selected, the MultitaskingView should consider activating
* and closing the view.
@ -143,6 +121,7 @@ namespace Gala {
public signal void selected (bool close_view);
public Workspace workspace { get; construct; }
public GestureAnimationDirector gesture_animation_director { get; construct; }
public IconGroup icon_group { get; private set; }
public WindowCloneContainer window_container { get; private set; }
@ -166,40 +145,27 @@ namespace Gala {
uint hover_activate_timeout = 0;
public WorkspaceClone (Workspace workspace) {
Object (workspace: workspace);
public WorkspaceClone (Workspace workspace, GestureAnimationDirector gesture_animation_director) {
Object (workspace: workspace, gesture_animation_director: gesture_animation_director);
}
construct {
opened = false;
#if HAS_MUTTER330
unowned Display display = workspace.get_display ();
var monitor_geometry = display.get_monitor_geometry (display.get_primary_monitor ());
#else
unowned Screen screen = workspace.get_screen ();
var monitor_geometry = screen.get_monitor_geometry (screen.get_primary_monitor ());
#endif
#if HAS_MUTTER330
background = new FramedBackground (display);
#else
background = new FramedBackground (screen);
#endif
background.reactive = true;
background.button_press_event.connect (() => {
selected (true);
return false;
});
window_container = new WindowCloneContainer ();
window_container = new WindowCloneContainer (gesture_animation_director);
window_container.window_selected.connect ((w) => { window_selected (w); });
window_container.set_size (monitor_geometry.width, monitor_geometry.height);
#if HAS_MUTTER330
display.restacked.connect (window_container.restack_windows);
#else
screen.restacked.connect (window_container.restack_windows);
#endif
icon_group = new IconGroup (workspace);
icon_group.selected.connect (() => selected (true));
@ -225,13 +191,8 @@ namespace Gala {
}
});
#if HAS_MUTTER330
display.window_entered_monitor.connect (window_entered_monitor);
display.window_left_monitor.connect (window_left_monitor);
#else
screen.window_entered_monitor.connect (window_entered_monitor);
screen.window_left_monitor.connect (window_left_monitor);
#endif
workspace.window_added.connect (add_window);
workspace.window_removed.connect (remove_window);
@ -241,21 +202,12 @@ namespace Gala {
// add existing windows
var windows = workspace.list_windows ();
foreach (var window in windows) {
#if HAS_MUTTER330
if (window.window_type == WindowType.NORMAL
&& !window.on_all_workspaces
&& window.get_monitor () == display.get_primary_monitor ()) {
window_container.add_window (window);
icon_group.add_window (window, true);
}
#else
if (window.window_type == WindowType.NORMAL
&& !window.on_all_workspaces
&& window.get_monitor () == screen.get_primary_monitor ()) {
window_container.add_window (window);
icon_group.add_window (window, true);
}
#endif
}
var listener = WindowListener.get_default ();
@ -263,21 +215,12 @@ namespace Gala {
}
~WorkspaceClone () {
#if HAS_MUTTER330
unowned Meta.Display display = workspace.get_display ();
display.restacked.disconnect (window_container.restack_windows);
display.window_entered_monitor.disconnect (window_entered_monitor);
display.window_left_monitor.disconnect (window_left_monitor);
#else
unowned Screen screen = workspace.get_screen ();
screen.restacked.disconnect (window_container.restack_windows);
screen.window_entered_monitor.disconnect (window_entered_monitor);
screen.window_left_monitor.disconnect (window_left_monitor);
#endif
workspace.window_added.disconnect (add_window);
workspace.window_removed.disconnect (remove_window);
@ -292,19 +235,11 @@ namespace Gala {
* belongs to this workspace and this monitor.
*/
void add_window (Window window) {
#if HAS_MUTTER330
if (window.window_type != WindowType.NORMAL
|| window.get_workspace () != workspace
|| window.on_all_workspaces
|| window.get_monitor () != window.get_display ().get_primary_monitor ())
return;
#else
if (window.window_type != WindowType.NORMAL
|| window.get_workspace () != workspace
|| window.on_all_workspaces
|| window.get_monitor () != window.get_screen ().get_primary_monitor ())
return;
#endif
foreach (var child in window_container.get_children ())
if (((WindowClone) child).window == window)
@ -322,7 +257,6 @@ namespace Gala {
icon_group.remove_window (window, opened);
}
#if HAS_MUTTER330
void window_entered_monitor (Display display, int monitor, Window window) {
add_window (window);
}
@ -331,16 +265,6 @@ namespace Gala {
if (monitor == display.get_primary_monitor ())
remove_window (window);
}
#else
void window_entered_monitor (Screen screen, int monitor, Window window) {
add_window (window);
}
void window_left_monitor (Screen screen, int monitor, Window window) {
if (monitor == screen.get_primary_monitor ())
remove_window (window);
}
#endif
void update_size (Meta.Rectangle monitor_geometry) {
if (window_container.width != monitor_geometry.width || window_container.height != monitor_geometry.height) {
@ -349,6 +273,30 @@ namespace Gala {
}
}
/**
* @return The position on the X axis of this workspace.
*/
public float multitasking_view_x () {
var scale_factor = InternalUtils.get_ui_scaling_factor ();
return workspace.index () * (width - (X_OFFSET * scale_factor));
}
/**
* @return The amount of pixels the workspace is overlapped in the X axis.
*/
float current_x_overlap () {
var scale_factor = InternalUtils.get_ui_scaling_factor ();
var display = workspace.get_display ();
unowned Meta.WorkspaceManager manager = display.get_workspace_manager ();
var active_index = manager.get_active_workspace ().index ();
if (workspace.index () == active_index) {
return 0;
} else {
var x_offset = X_OFFSET * scale_factor + WindowManagerGala.WORKSPACE_GAP;
return (workspace.index () < active_index) ? -x_offset : x_offset;
}
}
/**
* Utility function to shrink a MetaRectangle on all sides for the given amount.
* Negative amounts will scale it instead.
@ -369,34 +317,61 @@ namespace Gala {
* if it belongs to this workspace.
*/
public void open () {
if (opened)
if (opened) {
return;
}
opened = true;
var scale_factor = InternalUtils.get_ui_scaling_factor ();
#if HAS_MUTTER330
var display = workspace.get_display ();
var monitor = display.get_monitor_geometry (display.get_primary_monitor ());
#else
var screen = workspace.get_screen ();
var display = screen.get_display ();
var initial_x = gesture_animation_director.canceling ? x : x + current_x_overlap ();
var target_x = multitasking_view_x ();
var monitor = screen.get_monitor_geometry (screen.get_primary_monitor ());
#endif
var scale = (float)(monitor.height - TOP_OFFSET * scale_factor - BOTTOM_OFFSET * scale_factor) / monitor.height;
var pivotY = TOP_OFFSET * scale_factor / (monitor.height - monitor.height * scale);
update_size (monitor);
background.set_pivot_point (0.5f, pivotY);
GestureAnimationDirector.OnBegin on_animation_begin = () => {
x = initial_x;
background.set_pivot_point (0.5f, pivotY);
};
background.save_easing_state ();
background.set_easing_duration (MultitaskingView.ANIMATION_DURATION);
background.set_easing_mode (MultitaskingView.ANIMATION_MODE);
background.set_scale (scale, scale);
background.restore_easing_state ();
GestureAnimationDirector.OnUpdate on_animation_update = (percentage) => {
var x = GestureAnimationDirector.animation_value (initial_x, target_x, percentage);
set_x (x);
double update_scale = (double)GestureAnimationDirector.animation_value (1.0f, (float)scale, percentage);
background.set_scale (update_scale, update_scale);
};
GestureAnimationDirector.OnEnd on_animation_end = (percentage, cancel_action) => {
if (cancel_action) {
return;
}
save_easing_state ();
set_easing_duration (MultitaskingView.ANIMATION_DURATION);
set_easing_mode (MultitaskingView.ANIMATION_MODE);
set_x (target_x);
restore_easing_state ();
background.save_easing_state ();
background.set_easing_duration (MultitaskingView.ANIMATION_DURATION);
background.set_easing_mode (MultitaskingView.ANIMATION_MODE);
background.set_scale (scale, scale);
background.restore_easing_state ();
};
if (!gesture_animation_director.running) {
on_animation_begin (0);
on_animation_end (100, false, 0);
} else {
gesture_animation_director.connect_handlers ((owned) on_animation_begin, (owned) on_animation_update, (owned)on_animation_end);
}
Meta.Rectangle area = {
(int)Math.floorf (monitor.x + monitor.width - monitor.width * scale) / 2,
@ -413,11 +388,7 @@ namespace Gala {
icon_group.redraw ();
#if HAS_MUTTER330
window_container.open (display.get_workspace_manager ().get_active_workspace () == workspace ? display.get_focus_window () : null);
#else
window_container.open (screen.get_active_workspace () == workspace ? display.get_focus_window () : null);
#endif
}
/**
@ -425,16 +396,50 @@ namespace Gala {
* the windows back to their old locations.
*/
public void close () {
if (!opened)
if (!opened) {
return;
}
opened = false;
background.save_easing_state ();
background.set_easing_duration (MultitaskingView.ANIMATION_DURATION);
background.set_easing_mode (MultitaskingView.ANIMATION_MODE);
background.set_scale (1, 1);
background.restore_easing_state ();
var initial_x = gesture_animation_director.canceling ? x : multitasking_view_x ();
var target_x = multitasking_view_x () + current_x_overlap ();
double initial_scale_x, initial_scale_y;
background.get_scale (out initial_scale_x, out initial_scale_y);
GestureAnimationDirector.OnUpdate on_animation_update = (percentage) => {
var x = GestureAnimationDirector.animation_value (initial_x, target_x, percentage);
set_x (x);
double scale_x = (double) GestureAnimationDirector.animation_value ((float) initial_scale_x, 1.0f, percentage);
double scale_y = (double) GestureAnimationDirector.animation_value ((float) initial_scale_y, 1.0f, percentage);
background.set_scale (scale_x, scale_y);
};
GestureAnimationDirector.OnEnd on_animation_end = (percentage, cancel_action) => {
if (cancel_action) {
return;
}
save_easing_state ();
set_easing_duration (MultitaskingView.ANIMATION_DURATION);
set_easing_mode (MultitaskingView.ANIMATION_MODE);
set_x (target_x);
restore_easing_state ();
background.save_easing_state ();
background.set_easing_duration (MultitaskingView.ANIMATION_DURATION);
background.set_easing_mode (MultitaskingView.ANIMATION_MODE);
background.set_scale (1, 1);
background.restore_easing_state ();
};
if (!gesture_animation_director.running) {
on_animation_end (100, false, 0);
} else {
gesture_animation_director.connect_handlers (null, (owned) on_animation_update, (owned) on_animation_end);
}
window_container.close ();
}

View File

@ -23,7 +23,6 @@ public class Gala.WindowListener : Object {
static WindowListener? instance = null;
#if HAS_MUTTER330
public static void init (Meta.Display display) {
if (instance != null)
return;
@ -44,28 +43,6 @@ public class Gala.WindowListener : Object {
instance.monitor_window (window);
});
}
#else
public static void init (Meta.Screen screen) {
if (instance != null)
return;
instance = new WindowListener ();
foreach (unowned Meta.WindowActor actor in screen.get_window_actors ()) {
if (actor.is_destroyed ())
continue;
unowned Meta.Window window = actor.get_meta_window ();
if (window.window_type == Meta.WindowType.NORMAL)
instance.monitor_window (window);
}
screen.get_display ().window_created.connect ((window) => {
if (window.window_type == Meta.WindowType.NORMAL)
instance.monitor_window (window);
});
}
#endif
public static unowned WindowListener get_default () requires (instance != null) {
return instance;

View File

@ -51,6 +51,11 @@ namespace Gala {
*/
public Meta.BackgroundGroup background_group { get; protected set; }
/**
* {@inheritDoc}
*/
public Gala.ActivatableComponent workspace_view { get; protected set; }
/**
* {@inheritDoc}
*/
@ -58,14 +63,11 @@ namespace Gala {
public ScreenShield? screen_shield { get; private set; }
#if HAS_MUTTER336
public PointerLocator pointer_locator { get; private set; }
#endif
Meta.PluginInfo info;
WindowSwitcher? winswitcher = null;
ActivatableComponent? workspace_view = null;
ActivatableComponent? window_overview = null;
// used to detect which corner was used to trigger an action
@ -96,21 +98,20 @@ namespace Gala {
private GLib.Settings animations_settings;
private GLib.Settings behavior_settings;
private bool animating_switch_workspace = false;
private GestureAnimationDirector gesture_animation_director;
/**
* Gap to show between workspaces while switching between them.
*/
public const int WORKSPACE_GAP = 24;
construct {
gesture_animation_director = new GestureAnimationDirector (AnimationDuration.WORKSPACE_SWITCH_MIN, AnimationDuration.WORKSPACE_SWITCH);
info = Meta.PluginInfo () {name = "Gala", version = Config.VERSION, author = "Gala Developers",
license = "GPLv3", description = "A nice elementary window manager"};
#if !HAS_MUTTER332
Meta.Prefs.set_ignore_request_hide_titlebar (true);
#endif
#if !HAS_MUTTER330
Meta.Prefs.override_preference_schema ("dynamic-workspaces", Config.SCHEMA + ".behavior");
Meta.Prefs.override_preference_schema ("attach-modal-dialogs", Config.SCHEMA + ".appearance");
Meta.Prefs.override_preference_schema ("button-layout", Config.SCHEMA + ".appearance");
Meta.Prefs.override_preference_schema ("edge-tiling", Config.SCHEMA + ".behavior");
Meta.Prefs.override_preference_schema ("enable-animations", Config.SCHEMA + ".animations");
#endif
animations_settings = new GLib.Settings (Config.SCHEMA + ".animations");
animations_settings.bind ("enable-animations", this, "enable-animations", GLib.SettingsBindFlags.GET);
behavior_settings = new GLib.Settings (Config.SCHEMA + ".behavior");
@ -122,11 +123,7 @@ namespace Gala {
Bus.watch_name (BusType.SESSION, DAEMON_DBUS_NAME, BusNameWatcherFlags.NONE, daemon_appeared, lost_daemon);
#if HAS_MUTTER330
unowned Meta.Display display = get_display ();
#else
unowned Meta.Display display = get_screen ().get_display ();
#endif
display.gl_video_memory_purged.connect (() => {
Meta.Background.refresh_all ();
SystemBackground.refresh ();
@ -152,12 +149,7 @@ namespace Gala {
}
bool show_stage () {
#if HAS_MUTTER330
unowned Meta.Display display = get_display ();
#else
var screen = get_screen ();
var display = screen.get_display ();
#endif
screen_shield = new ScreenShield (this);
screensaver = new ScreenSaverManager (screen_shield);
@ -166,33 +158,21 @@ namespace Gala {
DBusAccelerator.init (this);
MediaFeedback.init ();
#if HAS_MUTTER330
WindowListener.init (display);
#else
WindowListener.init (screen);
#endif
KeyboardManager.init (display);
window_movement_tracker = new WindowMovementTracker (display);
window_movement_tracker.watch ();
window_movement_tracker.open.connect (on_wmt_open);
#if HAS_MUTTER330
notification_stack = new NotificationStack (display);
#else
notification_stack = new NotificationStack (screen);
#endif
// Due to a bug which enables access to the stage when using multiple monitors
// in the screensaver, we have to listen for changes and make sure the input area
// is set to NONE when we are in locked mode
screensaver.active_changed.connect (update_input_area);
#if HAS_MUTTER330
stage = display.get_stage () as Clutter.Stage;
#else
stage = screen.get_stage () as Clutter.Stage;
#endif
var background_settings = new GLib.Settings ("org.gnome.desktop.background");
var color = background_settings.get_string ("primary-color");
stage.background_color = Clutter.Color.from_string (color);
@ -212,55 +192,30 @@ namespace Gala {
* +-- top window group
*/
#if HAS_MUTTER330
var system_background = new SystemBackground (display);
#else
var system_background = new SystemBackground (screen);
#endif
#if HAS_MUTTER332
system_background.background_actor.add_constraint (new Clutter.BindConstraint (stage,
Clutter.BindCoordinate.ALL, 0));
stage.insert_child_below (system_background.background_actor, null);
#else
system_background.add_constraint (new Clutter.BindConstraint (stage,
Clutter.BindCoordinate.ALL, 0));
stage.insert_child_below (system_background, null);
#endif
ui_group = new Clutter.Actor ();
ui_group.reactive = true;
stage.add_child (ui_group);
#if HAS_MUTTER330
window_group = display.get_window_group ();
#else
window_group = screen.get_window_group ();
#endif
stage.remove_child (window_group);
ui_group.add_child (window_group);
#if HAS_MUTTER330
background_group = new BackgroundContainer (display);
((BackgroundContainer)background_group).show_background_menu.connect (on_show_background_menu);
#else
background_group = new BackgroundContainer (screen);
((BackgroundContainer)background_group).show_background_menu.connect (on_show_background_menu);
#endif
window_group.add_child (background_group);
window_group.set_child_below_sibling (background_group, null);
#if HAS_MUTTER330
top_window_group = display.get_top_window_group ();
#else
top_window_group = screen.get_top_window_group ();
#endif
#if HAS_MUTTER336
pointer_locator = new PointerLocator (this);
ui_group.add_child (pointer_locator);
ui_group.add_child (new DwellClickTimer (this));
#endif
ui_group.add_child (screen_shield);
@ -321,11 +276,7 @@ namespace Gala {
/*hot corner, getting enum values from GraniteServicesSettings did not work, so we use GSettings directly*/
configure_hotcorners ();
#if HAS_MUTTER330
Meta.MonitorManager.@get ().monitors_changed.connect (on_monitors_changed);
#else
screen.monitors_changed.connect (on_monitors_changed);
#endif
behavior_settings.changed.connect (configure_hotcorners);
@ -412,12 +363,8 @@ namespace Gala {
}
void configure_hotcorners () {
#if HAS_MUTTER330
unowned Meta.Display display = get_display ();
var geometry = display.get_monitor_geometry (display.get_primary_monitor ());
#else
var geometry = get_screen ().get_monitor_geometry (get_screen ().get_primary_monitor ());
#endif
add_hotcorner (geometry.x, geometry.y, "hotcorner-topleft");
add_hotcorner (geometry.x + geometry.width - 1, geometry.y, "hotcorner-topright");
@ -428,11 +375,7 @@ namespace Gala {
}
void add_hotcorner (float x, float y, string key) {
#if HAS_MUTTER330
unowned Clutter.Actor? stage = get_display ().get_stage ();
#else
unowned Clutter.Actor? stage = get_screen ().get_stage ();
#endif
return_if_fail (stage != null);
var action = (ActionType) behavior_settings.get_enum (key);
@ -466,7 +409,6 @@ namespace Gala {
hot_corner.y = y;
}
#if HAS_MUTTER330
[CCode (instance_pos = -1)]
void handle_cycle_workspaces (Meta.Display display, Meta.Window? window, Clutter.KeyEvent event,
Meta.KeyBinding binding) {
@ -521,102 +463,86 @@ namespace Gala {
var index = (binding.get_name () == "switch-to-workspace-first" ? 0 : manager.n_workspaces - 1);
manager.get_workspace_by_index (index).activate (display.get_current_time ());
}
#else
[CCode (instance_pos = -1)]
void handle_cycle_workspaces (Meta.Display display, Meta.Screen screen, Meta.Window? window,
Clutter.KeyEvent event, Meta.KeyBinding binding) {
var direction = (binding.get_name () == "cycle-workspaces-next" ? 1 : -1);
var index = screen.get_active_workspace_index () + direction;
int dynamic_offset = Meta.Prefs.get_dynamic_workspaces () ? 1 : 0;
if (index < 0)
index = screen.get_n_workspaces () - 1 - dynamic_offset;
else if (index > screen.get_n_workspaces () - 1 - dynamic_offset)
index = 0;
screen.get_workspace_by_index (index).activate (display.get_current_time ());
}
[CCode (instance_pos = -1)]
void handle_move_to_workspace (Meta.Display display, Meta.Screen screen, Meta.Window? window,
Clutter.KeyEvent event, Meta.KeyBinding binding) {
if (window == null)
return;
var direction = (binding.get_name () == "move-to-workspace-left" ? Meta.MotionDirection.LEFT : Meta.MotionDirection.RIGHT);
move_window (window, direction);
}
[CCode (instance_pos = -1)]
void handle_move_to_workspace_end (Meta.Display display, Meta.Screen screen, Meta.Window? window,
Clutter.KeyEvent event, Meta.KeyBinding binding) {
if (window == null)
return;
var index = (binding.get_name () == "move-to-workspace-first" ? 0 : screen.get_n_workspaces () - 1);
var workspace = screen.get_workspace_by_index (index);
window.change_workspace (workspace);
workspace.activate_with_focus (window, display.get_current_time ());
}
[CCode (instance_pos = -1)]
void handle_switch_to_workspace (Meta.Display display, Meta.Screen screen, Meta.Window? window,
Clutter.KeyEvent event, Meta.KeyBinding binding) {
var direction = (binding.get_name () == "switch-to-workspace-left" ? Meta.MotionDirection.LEFT : Meta.MotionDirection.RIGHT);
switch_to_next_workspace (direction);
}
[CCode (instance_pos = -1)]
void handle_switch_to_workspace_end (Meta.Display display, Meta.Screen screen, Meta.Window? window,
Clutter.KeyEvent event, Meta.KeyBinding binding) {
var index = (binding.get_name () == "switch-to-workspace-first" ? 0 : screen.n_workspaces - 1);
screen.get_workspace_by_index (index).activate (display.get_current_time ());
}
#endif
/**
* {@inheritDoc}
*/
public void switch_to_next_workspace (Meta.MotionDirection direction) {
#if HAS_MUTTER330
public void switch_to_next_workspace (Meta.MotionDirection direction, HashTable<string,Variant>? hints = null) {
if (animating_switch_workspace) {
return;
}
bool manual_animation = hints != null && hints.get ("manual_animation").get_boolean ();
if (manual_animation) {
string event = hints.get ("event").get_string ();
if (event == "begin") {
gesture_animation_director.running = true;
} else {
gesture_animation_director.update_animation (hints);
return;
}
}
unowned Meta.Display display = get_display ();
var active_workspace = display.get_workspace_manager ().get_active_workspace ();
#else
var screen = get_screen ();
var display = screen.get_display ();
var active_workspace = screen.get_active_workspace ();
#endif
var neighbor = active_workspace.get_neighbor (direction);
if (neighbor != active_workspace) {
neighbor.activate (display.get_current_time ());
return;
if (manual_animation) {
gesture_animation_director.update_animation (hints);
}
} else {
// if we didnt switch, show a nudge-over animation if one is not already in progress
play_nudge_animation (direction);
}
}
private void play_nudge_animation (Meta.MotionDirection direction) {
int duration = 360;
var dest = (direction == Meta.MotionDirection.LEFT ? 32.0f : -32.0f);
GestureAnimationDirector.OnUpdate on_animation_update = (percentage) => {
var x = GestureAnimationDirector.animation_value (0.0f, dest, percentage);
ui_group.x = x;
};
GestureAnimationDirector.OnEnd on_animation_end = (percentage, cancel_action) => {
var nudge_gesture = new Clutter.PropertyTransition ("x") {
duration = (duration / 2),
remove_on_complete = true,
progress_mode = Clutter.AnimationMode.LINEAR
};
nudge_gesture.set_from_value ((float) ui_group.x);
nudge_gesture.set_to_value (0.0f);
ui_group.add_transition ("nudge", nudge_gesture);
gesture_animation_director.disconnect_all_handlers ();
gesture_animation_director.running = false;
gesture_animation_director.canceling = false;
};
if (!gesture_animation_director.running) {
double[] keyframes = { 0.5 };
GLib.Value[] x = { dest };
var nudge = new Clutter.KeyframeTransition ("translation-x") {
duration = duration,
remove_on_complete = true,
progress_mode = Clutter.AnimationMode.EASE_IN_QUAD
};
nudge.set_from_value (0.0f);
nudge.set_to_value (0.0f);
nudge.set_key_frames (keyframes);
nudge.set_values (x);
ui_group.add_transition ("nudge", nudge);
} else {
gesture_animation_director.connect_handlers (null, (owned) on_animation_update, (owned) on_animation_end);
}
// if we didnt switch, show a nudge-over animation if one is not already in progress
if (ui_group.get_transition ("nudge") != null)
return;
var dest = (direction == Meta.MotionDirection.LEFT ? 32.0f : -32.0f);
double[] keyframes = { 0.5 };
GLib.Value[] x = { dest };
var nudge = new Clutter.KeyframeTransition ("translation-x") {
duration = 360,
remove_on_complete = true,
progress_mode = Clutter.AnimationMode.EASE_IN_QUAD
};
nudge.set_from_value (0.0f);
nudge.set_to_value (0.0f);
nudge.set_key_frames (keyframes);
nudge.set_values (x);
ui_group.add_transition ("nudge", nudge);
}
#if HAS_MUTTER330
void update_input_area () {
unowned Meta.Display display = get_display ();
@ -639,30 +565,6 @@ namespace Gala {
else
InternalUtils.set_input_area (display, InputArea.DEFAULT);
}
#else
void update_input_area () {
var screen = get_screen ();
if (screensaver != null) {
try {
if (screensaver.get_active ()) {
InternalUtils.set_input_area (screen, InputArea.NONE);
return;
}
} catch (Error e) {
// the screensaver object apparently won't be null even though
// it is unavailable. This error will be thrown however, so we
// can just ignore it, because if it is thrown, the screensaver
// is unavailable.
}
}
if (is_modal ())
InternalUtils.set_input_area (screen, InputArea.FULLSCREEN);
else
InternalUtils.set_input_area (screen, InputArea.DEFAULT);
}
#endif
void show_bottom_stack_window (Meta.Window bottom_window) {
unowned Meta.Workspace workspace = bottom_window.get_workspace ();
@ -741,7 +643,6 @@ namespace Gala {
if (window == null)
return;
#if HAS_MUTTER330
unowned Meta.Display display = get_display ();
unowned Meta.WorkspaceManager manager = display.get_workspace_manager ();
@ -753,20 +654,6 @@ namespace Gala {
Utils.bell (display);
return;
}
#else
var screen = get_screen ();
var display = screen.get_display ();
var active = screen.get_active_workspace ();
var next = active.get_neighbor (direction);
//dont allow empty workspaces to be created by moving, if we have dynamic workspaces
if ((Meta.Prefs.get_dynamic_workspaces () && Utils.get_n_windows (active) == 1 && next.index () == screen.n_workspaces - 1)
|| (active == next)) {
Utils.bell (screen);
return;
}
#endif
moving = window;
@ -788,22 +675,13 @@ namespace Gala {
if (modal_stack.size >= 2)
return proxy;
#if HAS_MUTTER330
unowned Meta.Display display = get_display ();
var time = display.get_current_time ();
#else
var screen = get_screen ();
var time = screen.get_display ().get_current_time ();
#endif
update_input_area ();
begin_modal (0, time);
#if HAS_MUTTER330
display.disable_unredirect ();
#else
screen.disable_unredirect ();
#endif
return proxy;
}
@ -822,17 +700,10 @@ namespace Gala {
update_input_area ();
#if HAS_MUTTER330
unowned Meta.Display display = get_display ();
end_modal (display.get_current_time ());
display.enable_unredirect ();
#else
var screen = get_screen ();
end_modal (screen.get_display ().get_current_time ());
screen.enable_unredirect ();
#endif
}
/**
@ -869,14 +740,8 @@ namespace Gala {
* {@inheritDoc}
*/
public void perform_action (ActionType type) {
#if HAS_MUTTER330
unowned Meta.Display display = get_display ();
var current = display.get_focus_window ();
#else
var screen = get_screen ();
var display = screen.get_display ();
var current = display.get_focus_window ();
#endif
switch (type) {
case ActionType.SHOW_WORKSPACE_VIEW:
@ -1004,12 +869,8 @@ namespace Gala {
}
break;
case ActionType.SWITCH_TO_WORKSPACE_LAST:
#if HAS_MUTTER330
unowned Meta.WorkspaceManager manager = display.get_workspace_manager ();
var workspace = manager.get_workspace_by_index (manager.get_n_workspaces () - 1);
#else
var workspace = screen.get_workspace_by_index (screen.get_n_workspaces () - 1);
#endif
workspace.activate (display.get_current_time ());
break;
default:
@ -1065,7 +926,13 @@ namespace Gala {
public override void show_tile_preview (Meta.Window window, Meta.Rectangle tile_rect, int tile_monitor_number) {
if (tile_preview == null) {
tile_preview = new Clutter.Actor ();
tile_preview.background_color = { 100, 186, 255, 100 };
var rgba = InternalUtils.get_theme_accent_color ();
tile_preview.background_color = {
(uint8)(255.0 * rgba.red),
(uint8)(255.0 * rgba.green),
(uint8)(255.0 * rgba.blue),
(uint8)(255.0 * rgba.alpha)
};
tile_preview.opacity = 0U;
window_group.add_child (tile_preview);
@ -1108,6 +975,7 @@ namespace Gala {
tile_preview.remove_all_transitions ();
tile_preview.opacity = 0U;
tile_preview.hide ();
tile_preview = null;
}
}
@ -1130,7 +998,6 @@ namespace Gala {
if (!Meta.Prefs.get_dynamic_workspaces ())
return;
#if HAS_MUTTER330
unowned Meta.Display display = get_display ();
var time = display.get_current_time ();
unowned Meta.Workspace win_ws = window.get_workspace ();
@ -1162,29 +1029,6 @@ namespace Gala {
ws_assoc.remove (window);
}
#else
unowned Meta.Screen screen = get_screen ();
var time = screen.get_display ().get_current_time ();
unowned Meta.Workspace win_ws = window.get_workspace ();
if (which_change == Meta.SizeChange.FULLSCREEN) {
// Do nothing if the current workspace would be empty
if (Utils.get_n_windows (win_ws) <= 1)
return;
var old_ws_index = win_ws.index ();
var new_ws_index = old_ws_index + 1;
InternalUtils.insert_workspace_with_window (new_ws_index, window);
var new_ws_obj = screen.get_workspace_by_index (new_ws_index);
window.change_workspace (new_ws_obj);
new_ws_obj.activate_with_focus (window, time);
ws_assoc.insert (window, old_ws_index);
} else {
move_window_to_old_ws (window);
}
#endif
}
// must wait for size_changed to get updated frame_rect
@ -1246,11 +1090,7 @@ namespace Gala {
minimizing.add (actor);
int width, height;
#if HAS_MUTTER330
get_display ().get_size (out width, out height);
#else
get_screen ().get_size (out width, out height);
#endif
Meta.Rectangle icon = {};
if (actor.get_meta_window ().get_icon_geometry (out icon)) {
@ -1788,15 +1628,9 @@ namespace Gala {
var new_ws_index = old_ws_index + 1;
InternalUtils.insert_workspace_with_window (new_ws_index, window);
#if HAS_MUTTER330
unowned Meta.Display display = get_display ();
var time = display.get_current_time ();
var new_ws_obj = display.get_workspace_manager ().get_workspace_by_index (new_ws_index);
#else
unowned Meta.Screen screen = get_screen ();
var time = get_screen ().get_display ().get_current_time ();
var new_ws_obj = screen.get_workspace_by_index (new_ws_index);
#endif
window.change_workspace (new_ws_obj);
new_ws_obj.activate_with_focus (window, time);
@ -1818,18 +1652,11 @@ namespace Gala {
var old_ws_index = ws_assoc.get (window);
var new_ws_index = win_ws.index ();
#if HAS_MUTTER330
unowned Meta.Display display = get_display ();
unowned Meta.WorkspaceManager workspace_manager = display.get_workspace_manager ();
if (new_ws_index != old_ws_index && old_ws_index < workspace_manager.get_n_workspaces ()) {
uint time = display.get_current_time ();
var old_ws_obj = workspace_manager.get_workspace_by_index (old_ws_index);
#else
unowned Meta.Screen screen = get_screen ();
if (new_ws_index != old_ws_index && old_ws_index < screen.get_n_workspaces ()) {
uint time = screen.get_display ().get_current_time ();
var old_ws_obj = screen.get_workspace_by_index (old_ws_index);
#endif
window.change_workspace (old_ws_obj);
old_ws_obj.activate_with_focus (window, time);
}
@ -1894,17 +1721,16 @@ namespace Gala {
List<Clutter.Actor>? tmp_actors;
public override void switch_workspace (int from, int to, Meta.MotionDirection direction) {
const int animation_duration = AnimationDuration.WORKSPACE_SWITCH;
if (!enable_animations
|| animation_duration == 0
|| (direction != Meta.MotionDirection.LEFT && direction != Meta.MotionDirection.RIGHT)) {
|| AnimationDuration.WORKSPACE_SWITCH == 0
|| (direction != Meta.MotionDirection.LEFT && direction != Meta.MotionDirection.RIGHT)
|| gesture_animation_director.canceling) {
gesture_animation_director.canceling = false;
switch_workspace_completed ();
return;
}
float screen_width, screen_height;
#if HAS_MUTTER330
unowned Meta.Display display = get_display ();
var primary = display.get_primary_monitor ();
var move_primary_only = InternalUtils.workspaces_only_on_primary ();
@ -1917,19 +1743,6 @@ namespace Gala {
unowned Meta.WorkspaceManager manager = display.get_workspace_manager ();
unowned Meta.Workspace workspace_from = manager.get_workspace_by_index (from);
unowned Meta.Workspace workspace_to = manager.get_workspace_by_index (to);
#else
var screen = get_screen ();
var primary = screen.get_primary_monitor ();
var move_primary_only = InternalUtils.workspaces_only_on_primary ();
var monitor_geom = screen.get_monitor_geometry (primary);
var clone_offset_x = move_primary_only ? monitor_geom.x : 0.0f;
var clone_offset_y = move_primary_only ? monitor_geom.y : 0.0f;
screen.get_size (out screen_width, out screen_height);
unowned Meta.Workspace workspace_from = screen.get_workspace_by_index (from);
unowned Meta.Workspace workspace_to = screen.get_workspace_by_index (to);
#endif
var main_container = new Clutter.Actor ();
var static_windows = new Clutter.Actor ();
@ -1984,11 +1797,7 @@ namespace Gala {
var docks = new List<Meta.WindowActor> ();
// collect all windows and put them in the appropriate containers
#if HAS_MUTTER330
foreach (unowned Meta.WindowActor actor in display.get_window_actors ()) {
#else
foreach (unowned Meta.WindowActor actor in screen.get_window_actors ()) {
#endif
if (actor.is_destroyed ())
continue;
@ -2076,13 +1885,18 @@ namespace Gala {
main_container.height = move_primary_only ? monitor_geom.height : screen_height;
var x2 = move_primary_only ? monitor_geom.width : screen_width;
x2 += WORKSPACE_GAP * InternalUtils.get_ui_scaling_factor ();
if (direction == Meta.MotionDirection.RIGHT)
x2 = -x2;
out_group.x = 0.0f;
wallpaper.x = 0.0f;
wallpaper.y += clone_offset_y;
in_group.x = -x2;
wallpaper_clone.x = -x2;
wallpaper_clone.y += clone_offset_y;
wallpaper.set_translation (-clone_offset_x, 0.0f, 0.0f);
wallpaper_clone.set_translation (-clone_offset_x, 0.0f, 0.0f);
// The wallpapers need to move upwards inside the container to match their
// original position before/after the transition.
@ -2097,42 +1911,85 @@ namespace Gala {
var animation_mode = Clutter.AnimationMode.EASE_OUT_CUBIC;
out_group.set_easing_mode (animation_mode);
out_group.set_easing_duration (animation_duration);
in_group.set_easing_mode (animation_mode);
in_group.set_easing_duration (animation_duration);
wallpaper_clone.set_easing_mode (animation_mode);
wallpaper_clone.set_easing_duration (animation_duration);
GestureAnimationDirector.OnUpdate on_animation_update = (percentage) => {
var x_out = GestureAnimationDirector.animation_value (0.1f, x2, percentage);
var x_in = GestureAnimationDirector.animation_value (-x2, 0.1f, percentage);
wallpaper.save_easing_state ();
wallpaper.set_easing_mode (animation_mode);
wallpaper.set_easing_duration (animation_duration);
out_group.x = x_out;
in_group.x = x_in;
out_group.x = x2;
in_group.x = 0.0f;
wallpaper.x = x_out;
wallpaper_clone.x = x_in;
};
wallpaper.x = x2;
wallpaper_clone.x = 0.0f;
wallpaper.restore_easing_state ();
GestureAnimationDirector.OnEnd on_animation_end = (percentage, cancel_action, calculated_duration) => {
if (gesture_animation_director.running && (percentage == 100 || percentage == 0)) {
switch_workspace_animation_finished (direction, cancel_action);
return;
}
var transition = in_group.get_transition ("x");
if (transition != null)
transition.completed.connect (end_switch_workspace);
else
end_switch_workspace ();
int duration = gesture_animation_director.running
? calculated_duration
: AnimationDuration.WORKSPACE_SWITCH;
animating_switch_workspace = true;
out_group.set_easing_mode (animation_mode);
out_group.set_easing_duration (duration);
in_group.set_easing_mode (animation_mode);
in_group.set_easing_duration (duration);
wallpaper_clone.set_easing_mode (animation_mode);
wallpaper_clone.set_easing_duration (duration);
wallpaper.save_easing_state ();
wallpaper.set_easing_mode (animation_mode);
wallpaper.set_easing_duration (duration);
out_group.x = cancel_action ? 0.0f : x2;
in_group.x = cancel_action ? -x2 : 0.0f;
wallpaper.x = cancel_action ? 0.0f : x2;
wallpaper_clone.x = cancel_action ? -x2 : 0.0f;
wallpaper.restore_easing_state ();
var transition = in_group.get_transition ("x");
if (transition != null) {
transition.completed.connect (() => {
switch_workspace_animation_finished (direction, cancel_action);
});
} else {
switch_workspace_animation_finished (direction, cancel_action);
}
};
if (!gesture_animation_director.running) {
on_animation_end (100, false, 0);
} else {
gesture_animation_director.connect_handlers (null, (owned) on_animation_update, (owned) on_animation_end);
}
}
private void switch_workspace_animation_finished (Meta.MotionDirection animation_direction,
bool cancel_action) {
end_switch_workspace ();
gesture_animation_director.disconnect_all_handlers ();
gesture_animation_director.running = false;
gesture_animation_director.canceling = cancel_action;
animating_switch_workspace = false;
if (cancel_action) {
var cancel_direction = (animation_direction == Meta.MotionDirection.LEFT)
? Meta.MotionDirection.RIGHT
: Meta.MotionDirection.LEFT;
switch_to_next_workspace (cancel_direction);
}
}
void end_switch_workspace () {
if (windows == null || parents == null)
return;
#if HAS_MUTTER330
unowned Meta.Display display = get_display ();
var active_workspace = display.get_workspace_manager ().get_active_workspace ();
#else
var screen = get_screen ();
var active_workspace = screen.get_active_workspace ();
#endif
for (var i = 0; i < windows.length (); i++) {
var actor = windows.nth_data (i);
@ -2205,11 +2062,9 @@ namespace Gala {
end_switch_workspace ();
}
#if HAS_MUTTER336
public override void locate_pointer () {
pointer_locator.show_ripple ();
}
#endif
public override bool keybinding_filter (Meta.KeyBinding binding) {
if (!is_modal ())

View File

@ -40,7 +40,6 @@ namespace Gala {
construct {
workspaces_marked_removed = new Gee.LinkedList<Workspace> ();
#if HAS_MUTTER330
unowned Meta.Display display = wm.get_display ();
unowned Meta.WorkspaceManager manager = display.get_workspace_manager ();
@ -65,34 +64,11 @@ namespace Gala {
if (Prefs.get_dynamic_workspaces ()
&& Utils.get_n_windows (manager.get_workspace_by_index (manager.get_n_workspaces () - 1)) > 0)
append_workspace ();
#else
unowned Screen screen = wm.get_screen ();
if (Prefs.get_dynamic_workspaces ())
screen.override_workspace_layout (ScreenCorner.TOPLEFT, false, 1, -1);
for (var i = 0; i < screen.get_n_workspaces (); i++)
workspace_added (screen, i);
Prefs.add_listener (prefs_listener);
screen.workspace_switched.connect_after (workspace_switched);
screen.workspace_added.connect (workspace_added);
screen.workspace_removed.connect_after (workspace_removed);
screen.window_entered_monitor.connect (window_entered_monitor);
screen.window_left_monitor.connect (window_left_monitor);
// make sure the last workspace has no windows on it
if (Prefs.get_dynamic_workspaces ()
&& Utils.get_n_windows (screen.get_workspace_by_index (screen.get_n_workspaces () - 1)) > 0)
append_workspace ();
#endif
}
~WorkspaceManager () {
Prefs.remove_listener (prefs_listener);
#if HAS_MUTTER330
unowned Meta.Display display = wm.get_display ();
unowned Meta.WorkspaceManager manager = display.get_workspace_manager ();
manager.workspace_added.disconnect (workspace_added);
@ -100,17 +76,8 @@ namespace Gala {
manager.workspace_removed.disconnect (workspace_removed);
display.window_entered_monitor.disconnect (window_entered_monitor);
display.window_left_monitor.disconnect (window_left_monitor);
#else
unowned Screen screen = wm.get_screen ();
screen.workspace_added.disconnect (workspace_added);
screen.workspace_switched.disconnect (workspace_switched);
screen.workspace_removed.disconnect (workspace_removed);
screen.window_entered_monitor.disconnect (window_entered_monitor);
screen.window_left_monitor.disconnect (window_left_monitor);
#endif
}
#if HAS_MUTTER330
void workspace_added (Meta.WorkspaceManager manager, int index) {
var workspace = manager.get_workspace_by_index (index);
if (workspace == null)
@ -151,51 +118,14 @@ namespace Gala {
remove_workspace (prev_workspace);
}
}
#else
void workspace_added (Screen screen, int index) {
var workspace = screen.get_workspace_by_index (index);
if (workspace == null)
return;
workspace.window_added.connect (window_added);
workspace.window_removed.connect (window_removed);
}
void workspace_removed (Screen screen, int index) {
unowned List<Workspace> existing_workspaces = screen.get_workspaces ();
var it = workspaces_marked_removed.iterator ();
while (it.next ()) {
if (existing_workspaces.index (it.@get ()) < 0)
it.remove ();
}
}
void workspace_switched (Screen screen, int from, int to, MotionDirection direction) {
if (!Prefs.get_dynamic_workspaces ())
return;
// remove empty workspaces after we switched away from them unless it's the last one
var prev_workspace = screen.get_workspace_by_index (from);
if (Utils.get_n_windows (prev_workspace) < 1
&& from != screen.get_n_workspaces () - 1) {
remove_workspace (prev_workspace);
}
}
#endif
void window_added (Workspace? workspace, Window window) {
if (workspace == null || !Prefs.get_dynamic_workspaces ()
|| window.on_all_workspaces)
return;
#if HAS_MUTTER330
unowned Meta.WorkspaceManager manager = workspace.get_display ().get_workspace_manager ();
int last_workspace = manager.get_n_workspaces () - 1;
#else
unowned Screen screen = workspace.get_screen ();
int last_workspace = screen.get_n_workspaces () - 1;
#endif
if ((window.window_type == WindowType.NORMAL
|| window.window_type == WindowType.DIALOG
@ -208,17 +138,10 @@ namespace Gala {
if (workspace == null || !Prefs.get_dynamic_workspaces () || window.on_all_workspaces)
return;
#if HAS_MUTTER330
unowned Meta.WorkspaceManager manager = workspace.get_display ().get_workspace_manager ();
var index = workspace.index ();
bool is_active_workspace = workspace == manager.get_active_workspace ();
int last_workspace = manager.get_n_workspaces () - 1;
#else
unowned Screen screen = workspace.get_screen ();
var index = screen.get_workspaces ().index (workspace);
bool is_active_workspace = workspace == screen.get_active_workspace ();
int last_workspace = screen.get_n_workspaces () - 1;
#endif
if (window.window_type != WindowType.NORMAL
&& window.window_type != WindowType.DIALOG
@ -239,7 +162,6 @@ namespace Gala {
}
}
#if HAS_MUTTER330
void window_entered_monitor (Meta.Display display, int monitor, Window window) {
if (InternalUtils.workspaces_only_on_primary ()
&& monitor == display.get_primary_monitor ())
@ -251,22 +173,8 @@ namespace Gala {
&& monitor == display.get_primary_monitor ())
window_removed (window.get_workspace (), window);
}
#else
void window_entered_monitor (Screen screen, int monitor, Window window) {
if (InternalUtils.workspaces_only_on_primary ()
&& monitor == screen.get_primary_monitor ())
window_added (window.get_workspace (), window);
}
void window_left_monitor (Screen screen, int monitor, Window window) {
if (InternalUtils.workspaces_only_on_primary ()
&& monitor == screen.get_primary_monitor ())
window_removed (window.get_workspace (), window);
}
#endif
void prefs_listener (Meta.Preference pref) {
#if HAS_MUTTER330
unowned Meta.WorkspaceManager manager = wm.get_display ().get_workspace_manager ();
if (pref == Preference.DYNAMIC_WORKSPACES && Prefs.get_dynamic_workspaces ()) {
@ -274,28 +182,13 @@ namespace Gala {
if (Utils.get_n_windows (manager.get_workspace_by_index (manager.get_n_workspaces () - 1)) > 0)
append_workspace ();
}
#else
unowned Screen screen = wm.get_screen ();
if (pref == Preference.DYNAMIC_WORKSPACES && Prefs.get_dynamic_workspaces ()) {
// if the last workspace has a window, we need to append a new workspace
if (Utils.get_n_windows (screen.get_workspace_by_index (screen.get_n_workspaces () - 1)) > 0)
append_workspace ();
}
#endif
}
void append_workspace () {
#if HAS_MUTTER330
unowned Meta.Display display = wm.get_display ();
unowned Meta.WorkspaceManager manager = display.get_workspace_manager ();
manager.append_new_workspace (false, display.get_current_time ());
#else
unowned Screen screen = wm.get_screen ();
screen.append_new_workspace (false, screen.get_display ().get_current_time ());
#endif
}
/**
@ -304,17 +197,10 @@ namespace Gala {
* @param workspace The workspace to remove
*/
void remove_workspace (Workspace workspace) {
#if HAS_MUTTER330
unowned Meta.Display display = workspace.get_display ();
unowned Meta.WorkspaceManager manager = display.get_workspace_manager ();
var time = display.get_current_time ();
unowned Meta.Workspace active_workspace = manager.get_active_workspace ();
#else
unowned Screen screen = workspace.get_screen ();
var time = screen.get_display ().get_current_time ();
unowned Meta.Workspace active_workspace = screen.get_active_workspace ();
#endif
if (workspace == active_workspace) {
Workspace? next = null;
@ -338,11 +224,7 @@ namespace Gala {
workspaces_marked_removed.add (workspace);
#if HAS_MUTTER330
manager.remove_workspace (workspace, time);
#else
screen.remove_workspace (workspace, time);
#endif
}
/**
@ -370,7 +252,6 @@ namespace Gala {
if (!Prefs.get_dynamic_workspaces ())
return;
#if HAS_MUTTER330
unowned Meta.Display display = wm.get_display ();
unowned Meta.WorkspaceManager manager = display.get_workspace_manager ();
List<Meta.Workspace> workspaces = null;
@ -385,18 +266,6 @@ namespace Gala {
remove_workspace (workspace);
}
}
#else
var screen = wm.get_screen ();
var last_index = screen.get_n_workspaces () - 1;
unowned GLib.List<Meta.Workspace> workspaces = screen.get_workspaces ();
foreach (var workspace in workspaces) {
if (Utils.get_n_windows (workspace) < 1
&& workspace.index () != last_index) {
remove_workspace (workspace);
}
}
#endif
}
}
}

View File

@ -2,6 +2,7 @@ gala_bin_sources = files(
'DBus.vala',
'DBusAccelerator.vala',
'DockThemeManager.vala',
'GestureAnimationDirector.vala',
'InternalUtils.vala',
'KeyboardManager.vala',
'NotificationStack.vala',

View File

@ -1,42 +0,0 @@
namespace Clutter {
public struct Color {
[CCode (cname = "clutter_color_from_hls")]
public Color.from_hls (float hue, float luminance, float saturation);
[CCode (cname = "clutter_color_from_pixel")]
public Color.from_pixel (uint32 pixel);
[CCode (cname = "clutter_color_from_string")]
public Color.from_string (string str);
[CCode (cname = "clutter_color_from_string")]
public bool parse_string (string str);
}
public interface Container : GLib.Object {
public void add (params Clutter.Actor[] actors);
[CCode (cname = "clutter_container_class_find_child_property")]
public class unowned GLib.ParamSpec find_child_property (string property_name);
[CCode (cname = "clutter_container_class_list_child_properties")]
public class unowned GLib.ParamSpec[] list_child_properties ();
}
public struct Units {
[CCode (cname = "clutter_units_from_cm")]
public Units.from_cm (float cm);
[CCode (cname = "clutter_units_from_em")]
public Units.from_em (float em);
[CCode (cname = "clutter_units_from_em_for_font")]
public Units.from_em_for_font (string font_name, float em);
[CCode (cname = "clutter_units_from_mm")]
public Units.from_mm (float mm);
[CCode (cname = "clutter_units_from_pixels")]
public Units.from_pixels (int px);
[CCode (cname = "clutter_units_from_pt")]
public Units.from_pt (float pt);
[CCode (cname = "clutter_units_from_string")]
public Units.from_string (string str);
}
[CCode (cheader_filename = "clutter/clutter.h", has_copy_function = false, has_destroy_function = false, has_type_id = false)]
public struct Capture {
}
}

View File

@ -1,237 +0,0 @@
// Non mini-object
ActorBox struct
Color struct
Fog struct
Geometry struct
Knot struct
Margin struct
PaintVolume struct
PathNode struct
Perspective struct
Point struct
Rect struct
Size struct
Units struct
Vertex struct
*.ref unowned
init.argv unowned
init_with_args
.argv unowned
Actor
.apply_transform.matrix ref
.get_abs_allocation_vertices.verts out=false
.get_allocation_vertices.verts out=false
Canvas
.new symbol_type="constructor"
Event.type#method name="get_type"
Image
.new symbol_type="constructor"
// ???
Actor.has_pointer#method name="get_has_pointer"
InitError errordomain=false
redraw skip
// Not all backing symbols are deprecated
Actor.pick deprecated=false
// Nullable return values
Actor
.get_parent nullable
value_get_color nullable
// method/virtual-method/signal don't match
Actor
.event#method name="emit_event"
.get_paint_volume#virtual_method name="get_paint_volume_vfunc"
.get_paint_volume#virtual_method.volume out
.queue_redraw#signal skip
.queue_redraw#virtual_method skip
Container
.add_actor skip=false
.class_* skip
Text
.activate#method name="try_activate"
.insert_text#signal skip
TextBuffer.get_text#virtual_method name="get_text_with_length"
// virtual/abstract distinction
Container
.lower virtual
.raise virtual
.*_child_meta#virtual_method virtual
.foreach_with_internals#virtual_method virtual
// Default values
Container
.lower.sibling nullable default=null
.raise.sibling nullable default=null
Stage.read_pixels
.width default=-1
.height default=-1
Text
.position_to_coords.line_height default=null
// Reparented funcs methods can't be instance methods
feature_available skip
feature_get_all skip
FeatureFlags.texture_npot skip
// Skipped by g-i for unknown reasons
LayoutManager
.create_child_meta skip=false
Model
.insert_row skip=false
// Variadic arguments
Actor
.animate skip=false
.animate_with_alpha skip=false
.animate_with_timeline skip=false
Animator
.set skip=false
Box
.pack skip=false
.pack_after skip=false
.pack_at skip=false
.pack_before skip=false
Container
.add_valist skip=false
.child_get skip=false
.child_set skip=false
.remove skip=false
.remove_valist skip=false
Interval
.new skip=false
.get_interval skip=false
.set_final skip=false
.set_initial skip=false
.set_interval skip=false
LayoutManager
.child_get skip=false
.child_set skip=false
ListModel
.new skip=false
Model
.append skip=false
.insert skip=false
.prepend skip=false
ModelIter
.get skip=false
.set skip=false
Script
.get_objects skip=false
// Changing error domains
Texture
.new_from_file throws="Clutter.TextureError"
// Skipped upstream for unknown reasons
Alpha.register_func skip=false
TimeoutPool skip=false
Interval.register_progress_func skip=false
frame_source_* skip=false
get_option_group skip=false
get_option_group_without_init skip=false
threads_add_frame_source skip=false
threads_add_frame_source_full skip=false
threads_add_idle skip=false
threads_add_idle_full skip=false
threads_set_lock_functions skip=false
threads_add_timeout skip=false
threads_add_timeout_full skip=false
// struct/class confusion
ActorBox
.new skip
.from_vertices skip
Units.from_* skip
Color
.new skip
Margin
.new skip
Size
.init skip
Vertex.new skip
// Class methods
container_class_find_child_property skip
container_class_list_child_properties skip
// Move symbols
get_actor_by_gid parent="Clutter.Actor" name="get_by_gid"
get_input_device_for_id parent="Clutter.InputDevice" name="get_for_id"
color_from_* skip
units_from_* skip
// Struct return values
color_get_static nullable
// Upstream
Effect
.get_paint_volume.volume out
Event
.get_position.position out
Text
.cursor_event.geometry out
// Remove for clutter-2.0
/////////////////////////
Stage
.event name="emit_event"
.capture.captures out array_length_idx=3 type="Clutter.Capture[]"
Capture
.image type="Cairo.ImageSurface"
// *Event should be compact classes derived from Clutter.Event
Event.type skip=false
AnyEvent struct=false base_type="Clutter.Event"
ButtonEvent struct=false base_type="Clutter.Event"
CrossingEvent struct=false base_type="Clutter.Event"
KeyEvent struct=false base_type="Clutter.Event"
MotionEvent struct=false base_type="Clutter.Event"
ScrollEvent struct=false base_type="Clutter.Event"
StageStateEvent struct=false base_type="Clutter.Event"
TouchEvent struct=false base_type="Clutter.Event"
TouchpadPinchEvent struct=false base_type="Clutter.Event"
TouchpadSwipeEvent struct=false base_type="Clutter.Event"
// Keysyms used to be CLUTTER_X instead of CLUTTER_KEY_X
*#constant skip
COGL skip=false
CURRENT_TIME skip=false
FLAVOUR skip=false
*VERSION* skip=false
PATH_RELATIVE skip=false
PRIORITY_REDRAW skip=false
// Clutter devs don't like us creating nested namespaces
frame_source_* name="frame_source_(.+)" parent="Clutter.FrameSource"
value_* name="value_(.+)" parent="Clutter.Value"
threads_* name="threads_(.+)" parent="Clutter.Threads"
threads_add_frame_source name="add" parent="Clutter.Threads.FrameSource"
threads_add_frame_source_full name="add_full" parent="Clutter.Threads.FrameSource"
threads_add_idle name="add" parent="Clutter.Threads.Idle"
threads_add_idle_full name="add_full" parent="Clutter.Threads.Idle"
threads_add_timeout name="add" parent="Clutter.Threads.Timeout"
threads_add_timeout_full name="add_full" parent="Clutter.Threads.Timeout"
util_next_p2 name="next_power_of_2" parent="Clutter.Util"
// Backwards compatibility
Color.alloc symbol_type="function"
Point.alloc symbol_type="function"
Rect.alloc symbol_type="function"
Size.alloc symbol_type="function"
Vertex.alloc symbol_type="function"
BinAlignment deprecated=false deprecated_since=null
BinAlignment.* deprecated
BinAlignment.start deprecated=false
BinLayout.new.*_align default=Clutter.BinAlignment.START
// Possibly keep
KEY_* skip=false name="KEY_(.+)" type="uint" parent="Clutter.Key"

View File

@ -1,42 +0,0 @@
namespace Clutter {
public struct Color {
[CCode (cname = "clutter_color_from_hls")]
public Color.from_hls (float hue, float luminance, float saturation);
[CCode (cname = "clutter_color_from_pixel")]
public Color.from_pixel (uint32 pixel);
[CCode (cname = "clutter_color_from_string")]
public Color.from_string (string str);
[CCode (cname = "clutter_color_from_string")]
public bool parse_string (string str);
}
public interface Container : GLib.Object {
public void add (params Clutter.Actor[] actors);
[CCode (cname = "clutter_container_class_find_child_property")]
public class unowned GLib.ParamSpec find_child_property (string property_name);
[CCode (cname = "clutter_container_class_list_child_properties")]
public class unowned GLib.ParamSpec[] list_child_properties ();
}
public struct Units {
[CCode (cname = "clutter_units_from_cm")]
public Units.from_cm (float cm);
[CCode (cname = "clutter_units_from_em")]
public Units.from_em (float em);
[CCode (cname = "clutter_units_from_em_for_font")]
public Units.from_em_for_font (string font_name, float em);
[CCode (cname = "clutter_units_from_mm")]
public Units.from_mm (float mm);
[CCode (cname = "clutter_units_from_pixels")]
public Units.from_pixels (int px);
[CCode (cname = "clutter_units_from_pt")]
public Units.from_pt (float pt);
[CCode (cname = "clutter_units_from_string")]
public Units.from_string (string str);
}
[CCode (cheader_filename = "clutter/clutter.h", has_copy_function = false, has_destroy_function = false, has_type_id = false)]
public struct Capture {
}
}

View File

@ -1,237 +0,0 @@
// Non mini-object
ActorBox struct
Color struct
Fog struct
Geometry struct
Knot struct
Margin struct
PaintVolume struct
PathNode struct
Perspective struct
Point struct
Rect struct
Size struct
Units struct
Vertex struct
*.ref unowned
init.argv unowned
init_with_args
.argv unowned
Actor
.apply_transform.matrix ref
.get_abs_allocation_vertices.verts out=false
.get_allocation_vertices.verts out=false
Canvas
.new symbol_type="constructor"
Event.type#method name="get_type"
Image
.new symbol_type="constructor"
// ???
Actor.has_pointer#method name="get_has_pointer"
InitError errordomain=false
redraw skip
// Not all backing symbols are deprecated
Actor.pick deprecated=false
// Nullable return values
Actor
.get_parent nullable
value_get_color nullable
// method/virtual-method/signal don't match
Actor
.event#method name="emit_event"
.get_paint_volume#virtual_method name="get_paint_volume_vfunc"
.get_paint_volume#virtual_method.volume out
.queue_redraw#signal skip
.queue_redraw#virtual_method skip
Container
.add_actor skip=false
.class_* skip
Text
.activate#method name="try_activate"
.insert_text#signal skip
TextBuffer.get_text#virtual_method name="get_text_with_length"
// virtual/abstract distinction
Container
.lower virtual
.raise virtual
.*_child_meta#virtual_method virtual
.foreach_with_internals#virtual_method virtual
// Default values
Container
.lower.sibling nullable default=null
.raise.sibling nullable default=null
Stage.read_pixels
.width default=-1
.height default=-1
Text
.position_to_coords.line_height default=null
// Reparented funcs methods can't be instance methods
feature_available skip
feature_get_all skip
FeatureFlags.texture_npot skip
// Skipped by g-i for unknown reasons
LayoutManager
.create_child_meta skip=false
Model
.insert_row skip=false
// Variadic arguments
Actor
.animate skip=false
.animate_with_alpha skip=false
.animate_with_timeline skip=false
Animator
.set skip=false
Box
.pack skip=false
.pack_after skip=false
.pack_at skip=false
.pack_before skip=false
Container
.add_valist skip=false
.child_get skip=false
.child_set skip=false
.remove skip=false
.remove_valist skip=false
Interval
.new skip=false
.get_interval skip=false
.set_final skip=false
.set_initial skip=false
.set_interval skip=false
LayoutManager
.child_get skip=false
.child_set skip=false
ListModel
.new skip=false
Model
.append skip=false
.insert skip=false
.prepend skip=false
ModelIter
.get skip=false
.set skip=false
Script
.get_objects skip=false
// Changing error domains
Texture
.new_from_file throws="Clutter.TextureError"
// Skipped upstream for unknown reasons
Alpha.register_func skip=false
TimeoutPool skip=false
Interval.register_progress_func skip=false
frame_source_* skip=false
get_option_group skip=false
get_option_group_without_init skip=false
threads_add_frame_source skip=false
threads_add_frame_source_full skip=false
threads_add_idle skip=false
threads_add_idle_full skip=false
threads_set_lock_functions skip=false
threads_add_timeout skip=false
threads_add_timeout_full skip=false
// struct/class confusion
ActorBox
.new skip
.from_vertices skip
Units.from_* skip
Color
.new skip
Margin
.new skip
Size
.init skip
Vertex.new skip
// Class methods
container_class_find_child_property skip
container_class_list_child_properties skip
// Move symbols
get_actor_by_gid parent="Clutter.Actor" name="get_by_gid"
get_input_device_for_id parent="Clutter.InputDevice" name="get_for_id"
color_from_* skip
units_from_* skip
// Struct return values
color_get_static nullable
// Upstream
Effect
.get_paint_volume.volume out
Event
.get_position.position out
Text
.cursor_event.geometry out
// Remove for clutter-2.0
/////////////////////////
Stage
.event name="emit_event"
.capture.captures out array_length_idx=3 type="Clutter.Capture[]"
Capture
.image type="Cairo.ImageSurface"
// *Event should be compact classes derived from Clutter.Event
Event.type skip=false
AnyEvent struct=false base_type="Clutter.Event"
ButtonEvent struct=false base_type="Clutter.Event"
CrossingEvent struct=false base_type="Clutter.Event"
KeyEvent struct=false base_type="Clutter.Event"
MotionEvent struct=false base_type="Clutter.Event"
ScrollEvent struct=false base_type="Clutter.Event"
StageStateEvent struct=false base_type="Clutter.Event"
TouchEvent struct=false base_type="Clutter.Event"
TouchpadPinchEvent struct=false base_type="Clutter.Event"
TouchpadSwipeEvent struct=false base_type="Clutter.Event"
// Keysyms used to be CLUTTER_X instead of CLUTTER_KEY_X
*#constant skip
COGL skip=false
CURRENT_TIME skip=false
FLAVOUR skip=false
*VERSION* skip=false
PATH_RELATIVE skip=false
PRIORITY_REDRAW skip=false
// Clutter devs don't like us creating nested namespaces
frame_source_* name="frame_source_(.+)" parent="Clutter.FrameSource"
value_* name="value_(.+)" parent="Clutter.Value"
threads_* name="threads_(.+)" parent="Clutter.Threads"
threads_add_frame_source name="add" parent="Clutter.Threads.FrameSource"
threads_add_frame_source_full name="add_full" parent="Clutter.Threads.FrameSource"
threads_add_idle name="add" parent="Clutter.Threads.Idle"
threads_add_idle_full name="add_full" parent="Clutter.Threads.Idle"
threads_add_timeout name="add" parent="Clutter.Threads.Timeout"
threads_add_timeout_full name="add_full" parent="Clutter.Threads.Timeout"
util_next_p2 name="next_power_of_2" parent="Clutter.Util"
// Backwards compatibility
Color.alloc symbol_type="function"
Point.alloc symbol_type="function"
Rect.alloc symbol_type="function"
Size.alloc symbol_type="function"
Vertex.alloc symbol_type="function"
BinAlignment deprecated=false deprecated_since=null
BinAlignment.* deprecated
BinAlignment.start deprecated=false
BinLayout.new.*_align default=Clutter.BinAlignment.START
// Possibly keep
KEY_* skip=false name="KEY_(.+)" type="uint" parent="Clutter.Key"

View File

@ -1,42 +0,0 @@
namespace Clutter {
public struct Color {
[CCode (cname = "clutter_color_from_hls")]
public Color.from_hls (float hue, float luminance, float saturation);
[CCode (cname = "clutter_color_from_pixel")]
public Color.from_pixel (uint32 pixel);
[CCode (cname = "clutter_color_from_string")]
public Color.from_string (string str);
[CCode (cname = "clutter_color_from_string")]
public bool parse_string (string str);
}
public interface Container : GLib.Object {
public void add (params Clutter.Actor[] actors);
[CCode (cname = "clutter_container_class_find_child_property")]
public class unowned GLib.ParamSpec find_child_property (string property_name);
[CCode (cname = "clutter_container_class_list_child_properties")]
public class unowned GLib.ParamSpec[] list_child_properties ();
}
public struct Units {
[CCode (cname = "clutter_units_from_cm")]
public Units.from_cm (float cm);
[CCode (cname = "clutter_units_from_em")]
public Units.from_em (float em);
[CCode (cname = "clutter_units_from_em_for_font")]
public Units.from_em_for_font (string font_name, float em);
[CCode (cname = "clutter_units_from_mm")]
public Units.from_mm (float mm);
[CCode (cname = "clutter_units_from_pixels")]
public Units.from_pixels (int px);
[CCode (cname = "clutter_units_from_pt")]
public Units.from_pt (float pt);
[CCode (cname = "clutter_units_from_string")]
public Units.from_string (string str);
}
[CCode (cheader_filename = "clutter/clutter.h", has_copy_function = false, has_destroy_function = false, has_type_id = false)]
public struct Capture {
}
}

View File

@ -1,237 +0,0 @@
// Non mini-object
ActorBox struct
Color struct
Fog struct
Geometry struct
Knot struct
Margin struct
PaintVolume struct
PathNode struct
Perspective struct
Point struct
Rect struct
Size struct
Units struct
Vertex struct
*.ref unowned
init.argv unowned
init_with_args
.argv unowned
Actor
.apply_transform.matrix ref
.get_abs_allocation_vertices.verts out=false
.get_allocation_vertices.verts out=false
Canvas
.new symbol_type="constructor"
Event.type#method name="get_type"
Image
.new symbol_type="constructor"
// ???
Actor.has_pointer#method name="get_has_pointer"
InitError errordomain=false
redraw skip
// Not all backing symbols are deprecated
Actor.pick deprecated=false
// Nullable return values
Actor
.get_parent nullable
value_get_color nullable
// method/virtual-method/signal don't match
Actor
.event#method name="emit_event"
.get_paint_volume#virtual_method name="get_paint_volume_vfunc"
.get_paint_volume#virtual_method.volume out
.queue_redraw#signal skip
.queue_redraw#virtual_method skip
Container
.add_actor skip=false
.class_* skip
Text
.activate#method name="try_activate"
.insert_text#signal skip
TextBuffer.get_text#virtual_method name="get_text_with_length"
// virtual/abstract distinction
Container
.lower virtual
.raise virtual
.*_child_meta#virtual_method virtual
.foreach_with_internals#virtual_method virtual
// Default values
Container
.lower.sibling nullable default=null
.raise.sibling nullable default=null
Stage.read_pixels
.width default=-1
.height default=-1
Text
.position_to_coords.line_height default=null
// Reparented funcs methods can't be instance methods
feature_available skip
feature_get_all skip
FeatureFlags.texture_npot skip
// Skipped by g-i for unknown reasons
LayoutManager
.create_child_meta skip=false
Model
.insert_row skip=false
// Variadic arguments
Actor
.animate skip=false
.animate_with_alpha skip=false
.animate_with_timeline skip=false
Animator
.set skip=false
Box
.pack skip=false
.pack_after skip=false
.pack_at skip=false
.pack_before skip=false
Container
.add_valist skip=false
.child_get skip=false
.child_set skip=false
.remove skip=false
.remove_valist skip=false
Interval
.new skip=false
.get_interval skip=false
.set_final skip=false
.set_initial skip=false
.set_interval skip=false
LayoutManager
.child_get skip=false
.child_set skip=false
ListModel
.new skip=false
Model
.append skip=false
.insert skip=false
.prepend skip=false
ModelIter
.get skip=false
.set skip=false
Script
.get_objects skip=false
// Changing error domains
Texture
.new_from_file throws="Clutter.TextureError"
// Skipped upstream for unknown reasons
Alpha.register_func skip=false
TimeoutPool skip=false
Interval.register_progress_func skip=false
frame_source_* skip=false
get_option_group skip=false
get_option_group_without_init skip=false
threads_add_frame_source skip=false
threads_add_frame_source_full skip=false
threads_add_idle skip=false
threads_add_idle_full skip=false
threads_set_lock_functions skip=false
threads_add_timeout skip=false
threads_add_timeout_full skip=false
// struct/class confusion
ActorBox
.new skip
.from_vertices skip
Units.from_* skip
Color
.new skip
Margin
.new skip
Size
.init skip
Vertex.new skip
// Class methods
container_class_find_child_property skip
container_class_list_child_properties skip
// Move symbols
get_actor_by_gid parent="Clutter.Actor" name="get_by_gid"
get_input_device_for_id parent="Clutter.InputDevice" name="get_for_id"
color_from_* skip
units_from_* skip
// Struct return values
color_get_static nullable
// Upstream
Effect
.get_paint_volume.volume out
Event
.get_position.position out
Text
.cursor_event.geometry out
// Remove for clutter-2.0
/////////////////////////
Stage
.event name="emit_event"
.capture.captures out array_length_idx=3 type="Clutter.Capture[]"
Capture
.image type="Cairo.ImageSurface"
// *Event should be compact classes derived from Clutter.Event
Event.type skip=false
AnyEvent struct=false base_type="Clutter.Event"
ButtonEvent struct=false base_type="Clutter.Event"
CrossingEvent struct=false base_type="Clutter.Event"
KeyEvent struct=false base_type="Clutter.Event"
MotionEvent struct=false base_type="Clutter.Event"
ScrollEvent struct=false base_type="Clutter.Event"
StageStateEvent struct=false base_type="Clutter.Event"
TouchEvent struct=false base_type="Clutter.Event"
TouchpadPinchEvent struct=false base_type="Clutter.Event"
TouchpadSwipeEvent struct=false base_type="Clutter.Event"
// Keysyms used to be CLUTTER_X instead of CLUTTER_KEY_X
*#constant skip
COGL skip=false
CURRENT_TIME skip=false
FLAVOUR skip=false
*VERSION* skip=false
PATH_RELATIVE skip=false
PRIORITY_REDRAW skip=false
// Clutter devs don't like us creating nested namespaces
frame_source_* name="frame_source_(.+)" parent="Clutter.FrameSource"
value_* name="value_(.+)" parent="Clutter.Value"
threads_* name="threads_(.+)" parent="Clutter.Threads"
threads_add_frame_source name="add" parent="Clutter.Threads.FrameSource"
threads_add_frame_source_full name="add_full" parent="Clutter.Threads.FrameSource"
threads_add_idle name="add" parent="Clutter.Threads.Idle"
threads_add_idle_full name="add_full" parent="Clutter.Threads.Idle"
threads_add_timeout name="add" parent="Clutter.Threads.Timeout"
threads_add_timeout_full name="add_full" parent="Clutter.Threads.Timeout"
util_next_p2 name="next_power_of_2" parent="Clutter.Util"
// Backwards compatibility
Color.alloc symbol_type="function"
Point.alloc symbol_type="function"
Rect.alloc symbol_type="function"
Size.alloc symbol_type="function"
Vertex.alloc symbol_type="function"
BinAlignment deprecated=false deprecated_since=null
BinAlignment.* deprecated
BinAlignment.start deprecated=false
BinLayout.new.*_align default=Clutter.BinAlignment.START
// Possibly keep
KEY_* skip=false name="KEY_(.+)" type="uint" parent="Clutter.Key"

View File

@ -1,42 +0,0 @@
namespace Clutter {
public struct Color {
[CCode (cname = "clutter_color_from_hls")]
public Color.from_hls (float hue, float luminance, float saturation);
[CCode (cname = "clutter_color_from_pixel")]
public Color.from_pixel (uint32 pixel);
[CCode (cname = "clutter_color_from_string")]
public Color.from_string (string str);
[CCode (cname = "clutter_color_from_string")]
public bool parse_string (string str);
}
public interface Container : GLib.Object {
public void add (params Clutter.Actor[] actors);
[CCode (cname = "clutter_container_class_find_child_property")]
public class unowned GLib.ParamSpec find_child_property (string property_name);
[CCode (cname = "clutter_container_class_list_child_properties")]
public class unowned GLib.ParamSpec[] list_child_properties ();
}
public struct Units {
[CCode (cname = "clutter_units_from_cm")]
public Units.from_cm (float cm);
[CCode (cname = "clutter_units_from_em")]
public Units.from_em (float em);
[CCode (cname = "clutter_units_from_em_for_font")]
public Units.from_em_for_font (string font_name, float em);
[CCode (cname = "clutter_units_from_mm")]
public Units.from_mm (float mm);
[CCode (cname = "clutter_units_from_pixels")]
public Units.from_pixels (int px);
[CCode (cname = "clutter_units_from_pt")]
public Units.from_pt (float pt);
[CCode (cname = "clutter_units_from_string")]
public Units.from_string (string str);
}
[CCode (cheader_filename = "clutter/clutter.h", has_copy_function = false, has_destroy_function = false, has_type_id = false)]
public struct Capture {
}
}

View File

@ -1,209 +0,0 @@
// Non mini-object
ActorBox struct
Color struct
Fog struct
Geometry struct
Knot struct
Margin struct
PaintVolume struct
PathNode struct
Perspective struct
Point struct
Rect struct
Size struct
Units struct
Vertex struct
*.ref unowned
init.argv unowned
init_with_args
.argv unowned
Actor
.apply_transform.matrix ref
.get_abs_allocation_vertices.verts out=false
.get_allocation_vertices.verts out=false
Canvas
.new symbol_type="constructor"
Event.type#method name="get_type"
Image
.new symbol_type="constructor"
// ???
Actor.has_pointer#method name="get_has_pointer"
InitError errordomain=false
// Not all backing symbols are deprecated
Actor.pick deprecated=false
// Nullable return values
Actor
.get_parent nullable
value_get_color nullable
// method/virtual-method/signal don't match
Actor
.event#method name="emit_event"
.get_paint_volume#virtual_method name="get_paint_volume_vfunc"
.get_paint_volume#virtual_method.volume out
.queue_redraw#signal skip
.queue_redraw#virtual_method skip
Container
.add_actor skip=false
.class_* skip
Text
.activate#method name="try_activate"
.insert_text#signal skip
TextBuffer.get_text#virtual_method name="get_text_with_length"
// virtual/abstract distinction
Container
.lower virtual
.raise virtual
.*_child_meta#virtual_method virtual
.foreach_with_internals#virtual_method virtual
// Default values
Container
.lower.sibling nullable default=null
.raise.sibling nullable default=null
Stage.read_pixels
.width default=-1
.height default=-1
Text
.position_to_coords.line_height default=null
// Reparented funcs methods can't be instance methods
feature_available skip
feature_get_all skip
// Skipped by g-i for unknown reasons
LayoutManager
.create_child_meta skip=false
// Variadic arguments
Actor
.animate skip=false
.animate_with_alpha skip=false
.animate_with_timeline skip=false
Box
.pack skip=false
.pack_after skip=false
.pack_at skip=false
.pack_before skip=false
Container
.add_valist skip=false
.child_get skip=false
.child_set skip=false
.remove skip=false
.remove_valist skip=false
Interval
.new skip=false
.get_interval skip=false
.set_final skip=false
.set_initial skip=false
.set_interval skip=false
LayoutManager
.child_get skip=false
.child_set skip=false
Script
.get_objects skip=false
// Changing error domains
Texture
.new_from_file throws="Clutter.TextureError"
// Skipped upstream for unknown reasons
Alpha.register_func skip=false
Interval.register_progress_func skip=false
get_option_group skip=false
get_option_group_without_init skip=false
threads_add_idle skip=false
threads_add_idle_full skip=false
threads_add_timeout skip=false
threads_add_timeout_full skip=false
// struct/class confusion
ActorBox
.new skip
.from_vertices skip
Units.from_* skip
Color
.new skip
Margin
.new skip
Size
.init skip
Vertex.new skip
// Class methods
container_class_find_child_property skip
container_class_list_child_properties skip
// Move symbols
get_actor_by_gid parent="Clutter.Actor" name="get_by_gid"
color_from_* skip
units_from_* skip
// Struct return values
color_get_static nullable
// Upstream
Event
.get_position.position out
Text
.cursor_event.geometry out
// Remove for clutter-2.0
/////////////////////////
Stage
.event name="emit_event"
.capture.captures out array_length_idx=3 type="Clutter.Capture[]"
Capture
.image type="Cairo.ImageSurface"
// *Event should be compact classes derived from Clutter.Event
Event.type skip=false
AnyEvent struct=false base_type="Clutter.Event"
ButtonEvent struct=false base_type="Clutter.Event"
CrossingEvent struct=false base_type="Clutter.Event"
KeyEvent struct=false base_type="Clutter.Event"
MotionEvent struct=false base_type="Clutter.Event"
ScrollEvent struct=false base_type="Clutter.Event"
StageStateEvent struct=false base_type="Clutter.Event"
TouchEvent struct=false base_type="Clutter.Event"
TouchpadPinchEvent struct=false base_type="Clutter.Event"
TouchpadSwipeEvent struct=false base_type="Clutter.Event"
// Keysyms used to be CLUTTER_X instead of CLUTTER_KEY_X
*#constant skip
COGL skip=false
CURRENT_TIME skip=false
FLAVOUR skip=false
PATH_RELATIVE skip=false
PRIORITY_REDRAW skip=false
// Clutter devs don't like us creating nested namespaces
value_* name="value_(.+)" parent="Clutter.Value"
threads_* name="threads_(.+)" parent="Clutter.Threads"
threads_add_idle name="add" parent="Clutter.Threads.Idle"
threads_add_idle_full name="add_full" parent="Clutter.Threads.Idle"
threads_add_timeout name="add" parent="Clutter.Threads.Timeout"
threads_add_timeout_full name="add_full" parent="Clutter.Threads.Timeout"
// Backwards compatibility
Color.alloc symbol_type="function"
Point.alloc symbol_type="function"
Rect.alloc symbol_type="function"
Size.alloc symbol_type="function"
Vertex.alloc symbol_type="function"
BinAlignment deprecated=false deprecated_since=null
BinAlignment.* deprecated
BinAlignment.start deprecated=false
BinLayout.new.*_align default=Clutter.BinAlignment.START
// Possibly keep
KEY_* skip=false name="KEY_(.+)" type="uint" parent="Clutter.Key"

View File

@ -1,79 +0,0 @@
namespace Cogl {
[BooleanType]
[CCode (cheader_filename = "cogl/cogl.h")]
[SimpleType]
public struct Bool : bool {
}
public struct Color {
[Version (since = "1.4")]
[CCode (cname="cogl_color_init_from_4f")]
public Color.from_4f (float red, float green, float blue, float alpha);
[Version (since = "1.4")]
[CCode (cname="cogl_color_init_from_4fv")]
public Color.from_4fv (float color_array);
[Version (since = "1.4")]
[CCode (cname="cogl_color_init_from_4ub")]
public Color.from_4ub (uint8 red, uint8 green, uint8 blue, uint8 alpha);
[Version (since = "1.16")]
[CCode (cname="cogl_color_init_from_hsl")]
public Color.from_hsl (float hue, float saturation, float luminance);
}
[Compact]
public class Bitmap : Cogl.Handle {
}
[CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_quaternion_get_gtype ()", copy_function = "cogl_quaternion_copy", free_function = "cogl_quaternion_free")]
[Compact]
public class Quaternion {
}
[Compact]
[CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_offscreen_get_gtype ()", ref_function = "cogl_offscreen_ref", unref_function = "cogl_offscreen_unref")]
public class Offscreen : Cogl.Handle {
}
[Compact]
[CCode (cname = "CoglHandle", cheader_filename = "cogl/cogl.h", type_id = "cogl_handle_get_gtype ()", ref_function = "cogl_vertex_buffer_ref", unref_function = "cogl_vertex_buffer_unref")]
public class VertexBuffer : Cogl.Handle {
}
[Compact]
[CCode (cname = "CoglHandle", cheader_filename = "cogl/cogl.h", type_id = "cogl_handle_get_gtype ()", ref_function = "cogl_shader_ref", unref_function = "cogl_shader_unref")]
public class Shader : Cogl.Handle {
}
[Compact]
[CCode (cname = "CoglHandle", cheader_filename = "cogl/cogl.h", type_id = "cogl_handle_get_gtype ()", ref_function = "cogl_program_ref", unref_function = "cogl_program_unref")]
public class Program : Cogl.Handle {
}
[Compact]
[CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_handle_get_gtype ()", ref_function = "cogl_handle_ref", unref_function = "cogl_handle_unref")]
public class Handle {
[CCode (cheader_filename = "cogl/cogl.h", cname="cogl_is_bitmap")]
[Version (since = "1.0")]
public Cogl.Bool is_bitmap ();
[CCode (cheader_filename = "cogl/cogl.h", cname="cogl_is_material")]
[Version (deprecated = true, deprecated_since = "1.16")]
public Cogl.Bool is_material ();
[CCode (cheader_filename = "cogl/cogl.h", cname="cogl_is_offscreen")]
public Cogl.Bool is_offscreen ();
[CCode (cheader_filename = "cogl/cogl.h", cname="cogl_is_program")]
[Version (deprecated = true, deprecated_since = "1.16")]
public Cogl.Bool is_program (Cogl.Handle handle);
[CCode (cheader_filename = "cogl/cogl.h", cname="cogl_is_shader")]
[Version (deprecated = true, deprecated_since = "1.16")]
public Cogl.Bool is_shader ();
[CCode (cheader_filename = "cogl/cogl.h", cname="cogl_is_texture")]
public Cogl.Bool is_texture ();
[CCode (cheader_filename = "cogl/cogl.h", cname="cogl_is_vertex_buffer")]
[Version (deprecated = true, deprecated_since = "1.16", since = "1.0")]
public Cogl.Bool is_vertex_buffer ();
[CCode (cheader_filename = "cogl/cogl.h", cname="cogl_is_vertex_buffer_indices")]
[Version (deprecated = true, deprecated_since = "1.16", since = "1.4")]
public Cogl.Bool is_vertex_buffer_indices ();
}
}

View File

@ -1,102 +0,0 @@
Color struct
Bool skip
Quaternion skip=false
Material base_type="Cogl.Handle"
MaterialLayer base_type="Cogl.Handle"
_ColorSizeCheck skip
_MatrixSizeCheck skip
_TextureVertexSizeCheck skip
Offscreen.ref skip
Offscreen.unref skip
Color
.init_* skip
color_init_from_hsl skip
color_equal.v1 type="Cogl.Color"
color_equal.v2 type="Cogl.Color"
color_equal symbol_type=method
texture_new_* name="texture_new_(.+)" parent="Cogl.Texture"
Texture
.get_data.data type="uint8[]"
.new_from_data.data type="uint8[]"
.set_data.data type="uint8[]"
.set_region.data type="uint8[]"
Matrix
.transform_points.points_in type="uint8[]"
.transform_points.stride_out out
.transform_points.points_out out type="uint8[]"
.project_points.points_in type="uint8[]"
.project_points.stride_out out
.project_points.points_out out type="uint8[]"
matrix_equal.v1 type="Cogl.Matrix"
matrix_equal.v2 type="Cogl.Matrix"
matrix_equal symbol_type=method
polygon.vertices array array_length_idx=1
vertex_buffer_* name="vertex_buffer_(.+)" parent="Cogl.VertexBuffer"
//vertex_buffer_* symbol_type="method" instance_idx=0
vertex_buffer_add symbol_type="method" instance_idx=0
vertex_buffer_delete symbol_type="method" instance_idx=0
vertex_buffer_disable symbol_type="method" instance_idx=0
vertex_buffer_draw symbol_type="method" instance_idx=0
vertex_buffer_draw_elements symbol_type="method" instance_idx=0
vertex_buffer_enable symbol_type="method" instance_idx=0
vertex_buffer_get_n_vertices symbol_type="method" instance_idx=0
vertex_buffer_indices_get_type symbol_type="method" instance_idx=0
vertex_buffer_submit symbol_type="method" instance_idx=0
vertex_buffer_unref skip
vertex_buffer_ref skip
shader_* name="shader_(.+)" parent="Cogl.Shader"
shader_* symbol_type="method" instance_idx=0
shader_unref skip
shader_ref skip
program_* name="program_(.+)" parent="Cogl.Program"
program_attach_shader symbol_type="method" instance_idx=0
program_get_uniform_location symbol_type="method" instance_idx=0
program_link symbol_type="method" instance_idx=0
program_set_uniform_1f symbol_type="method" instance_idx=0
program_set_uniform_1i symbol_type="method" instance_idx=0
program_set_uniform_float symbol_type="method" instance_idx=0
program_set_uniform_int symbol_type="method" instance_idx=0
program_set_uniform_matrix symbol_type="method" instance_idx=0
program_use symbol_type="method" instance_idx=0
program_unref skip
program_ref skip
is_bitmap parent="Cogl.Handle"
is_material parent="Cogl.Handle"
is_offscreen parent="Cogl.Handle"
is_program parent="Cogl.Handle"
is_shader parent="Cogl.Handle"
is_texture parent="Cogl.Handle"
is_vertex_buffer parent="Cogl.Handle"
is_vertex_buffer_indices parent="Cogl.Handle"
create_program type="unowned Cogl.Program" name="create" parent="Cogl.Program"
create_shader type="unowned Cogl.Shader" name="create" parent="Cogl.Shader"
get_source type="unowned Cogl.Material"
push_source.material type="Cogl.Material"
set_source.material type="Cogl.Material"
Bitmap.error_quark parent="Cogl.BitmapError" name="quark"
Texture.error_quark parent="Cogl.TextureError" name="quark"
texture_error_quark skip
BitmapError errordomain
BlendStringError errordomain
RendererError errordomain
SystemError errordomain
TextureError errordomain
FuncPtr skip

View File

@ -1,79 +0,0 @@
namespace Cogl {
[BooleanType]
[CCode (cheader_filename = "cogl/cogl.h")]
[SimpleType]
public struct Bool : bool {
}
public struct Color {
[Version (since = "1.4")]
[CCode (cname="cogl_color_init_from_4f")]
public Color.from_4f (float red, float green, float blue, float alpha);
[Version (since = "1.4")]
[CCode (cname="cogl_color_init_from_4fv")]
public Color.from_4fv (float color_array);
[Version (since = "1.4")]
[CCode (cname="cogl_color_init_from_4ub")]
public Color.from_4ub (uint8 red, uint8 green, uint8 blue, uint8 alpha);
[Version (since = "1.16")]
[CCode (cname="cogl_color_init_from_hsl")]
public Color.from_hsl (float hue, float saturation, float luminance);
}
[Compact]
public class Bitmap : Cogl.Handle {
}
[CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_quaternion_get_gtype ()", copy_function = "cogl_quaternion_copy", free_function = "cogl_quaternion_free")]
[Compact]
public class Quaternion {
}
[Compact]
[CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_offscreen_get_gtype ()", ref_function = "cogl_offscreen_ref", unref_function = "cogl_offscreen_unref")]
public class Offscreen : Cogl.Handle {
}
[Compact]
[CCode (cname = "CoglHandle", cheader_filename = "cogl/cogl.h", type_id = "cogl_handle_get_gtype ()", ref_function = "cogl_vertex_buffer_ref", unref_function = "cogl_vertex_buffer_unref")]
public class VertexBuffer : Cogl.Handle {
}
[Compact]
[CCode (cname = "CoglHandle", cheader_filename = "cogl/cogl.h", type_id = "cogl_handle_get_gtype ()", ref_function = "cogl_shader_ref", unref_function = "cogl_shader_unref")]
public class Shader : Cogl.Handle {
}
[Compact]
[CCode (cname = "CoglHandle", cheader_filename = "cogl/cogl.h", type_id = "cogl_handle_get_gtype ()", ref_function = "cogl_program_ref", unref_function = "cogl_program_unref")]
public class Program : Cogl.Handle {
}
[Compact]
[CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_handle_get_gtype ()", ref_function = "cogl_handle_ref", unref_function = "cogl_handle_unref")]
public class Handle {
[CCode (cheader_filename = "cogl/cogl.h", cname="cogl_is_bitmap")]
[Version (since = "1.0")]
public Cogl.Bool is_bitmap ();
[CCode (cheader_filename = "cogl/cogl.h", cname="cogl_is_material")]
[Version (deprecated = true, deprecated_since = "1.16")]
public Cogl.Bool is_material ();
[CCode (cheader_filename = "cogl/cogl.h", cname="cogl_is_offscreen")]
public Cogl.Bool is_offscreen ();
[CCode (cheader_filename = "cogl/cogl.h", cname="cogl_is_program")]
[Version (deprecated = true, deprecated_since = "1.16")]
public Cogl.Bool is_program (Cogl.Handle handle);
[CCode (cheader_filename = "cogl/cogl.h", cname="cogl_is_shader")]
[Version (deprecated = true, deprecated_since = "1.16")]
public Cogl.Bool is_shader ();
[CCode (cheader_filename = "cogl/cogl.h", cname="cogl_is_texture")]
public Cogl.Bool is_texture ();
[CCode (cheader_filename = "cogl/cogl.h", cname="cogl_is_vertex_buffer")]
[Version (deprecated = true, deprecated_since = "1.16", since = "1.0")]
public Cogl.Bool is_vertex_buffer ();
[CCode (cheader_filename = "cogl/cogl.h", cname="cogl_is_vertex_buffer_indices")]
[Version (deprecated = true, deprecated_since = "1.16", since = "1.4")]
public Cogl.Bool is_vertex_buffer_indices ();
}
}

View File

@ -1,102 +0,0 @@
Color struct
Bool skip
Quaternion skip=false
Material base_type="Cogl.Handle"
MaterialLayer base_type="Cogl.Handle"
_ColorSizeCheck skip
_MatrixSizeCheck skip
_TextureVertexSizeCheck skip
Offscreen.ref skip
Offscreen.unref skip
Color
.init_* skip
color_init_from_hsl skip
color_equal.v1 type="Cogl.Color"
color_equal.v2 type="Cogl.Color"
color_equal symbol_type=method
texture_new_* name="texture_new_(.+)" parent="Cogl.Texture"
Texture
.get_data.data type="uint8[]"
.new_from_data.data type="uint8[]"
.set_data.data type="uint8[]"
.set_region.data type="uint8[]"
Matrix
.transform_points.points_in type="uint8[]"
.transform_points.stride_out out
.transform_points.points_out out type="uint8[]"
.project_points.points_in type="uint8[]"
.project_points.stride_out out
.project_points.points_out out type="uint8[]"
matrix_equal.v1 type="Cogl.Matrix"
matrix_equal.v2 type="Cogl.Matrix"
matrix_equal symbol_type=method
polygon.vertices array array_length_idx=1
vertex_buffer_* name="vertex_buffer_(.+)" parent="Cogl.VertexBuffer"
//vertex_buffer_* symbol_type="method" instance_idx=0
vertex_buffer_add symbol_type="method" instance_idx=0
vertex_buffer_delete symbol_type="method" instance_idx=0
vertex_buffer_disable symbol_type="method" instance_idx=0
vertex_buffer_draw symbol_type="method" instance_idx=0
vertex_buffer_draw_elements symbol_type="method" instance_idx=0
vertex_buffer_enable symbol_type="method" instance_idx=0
vertex_buffer_get_n_vertices symbol_type="method" instance_idx=0
vertex_buffer_indices_get_type symbol_type="method" instance_idx=0
vertex_buffer_submit symbol_type="method" instance_idx=0
vertex_buffer_unref skip
vertex_buffer_ref skip
shader_* name="shader_(.+)" parent="Cogl.Shader"
shader_* symbol_type="method" instance_idx=0
shader_unref skip
shader_ref skip
program_* name="program_(.+)" parent="Cogl.Program"
program_attach_shader symbol_type="method" instance_idx=0
program_get_uniform_location symbol_type="method" instance_idx=0
program_link symbol_type="method" instance_idx=0
program_set_uniform_1f symbol_type="method" instance_idx=0
program_set_uniform_1i symbol_type="method" instance_idx=0
program_set_uniform_float symbol_type="method" instance_idx=0
program_set_uniform_int symbol_type="method" instance_idx=0
program_set_uniform_matrix symbol_type="method" instance_idx=0
program_use symbol_type="method" instance_idx=0
program_unref skip
program_ref skip
is_bitmap parent="Cogl.Handle"
is_material parent="Cogl.Handle"
is_offscreen parent="Cogl.Handle"
is_program parent="Cogl.Handle"
is_shader parent="Cogl.Handle"
is_texture parent="Cogl.Handle"
is_vertex_buffer parent="Cogl.Handle"
is_vertex_buffer_indices parent="Cogl.Handle"
create_program type="unowned Cogl.Program" name="create" parent="Cogl.Program"
create_shader type="unowned Cogl.Shader" name="create" parent="Cogl.Shader"
get_source type="unowned Cogl.Material"
push_source.material type="Cogl.Material"
set_source.material type="Cogl.Material"
Bitmap.error_quark parent="Cogl.BitmapError" name="quark"
Texture.error_quark parent="Cogl.TextureError" name="quark"
texture_error_quark skip
BitmapError errordomain
BlendStringError errordomain
RendererError errordomain
SystemError errordomain
TextureError errordomain
FuncPtr skip

View File

@ -1,79 +0,0 @@
namespace Cogl {
[BooleanType]
[CCode (cheader_filename = "cogl/cogl.h")]
[SimpleType]
public struct Bool : bool {
}
public struct Color {
[Version (since = "1.4")]
[CCode (cname="cogl_color_init_from_4f")]
public Color.from_4f (float red, float green, float blue, float alpha);
[Version (since = "1.4")]
[CCode (cname="cogl_color_init_from_4fv")]
public Color.from_4fv (float color_array);
[Version (since = "1.4")]
[CCode (cname="cogl_color_init_from_4ub")]
public Color.from_4ub (uint8 red, uint8 green, uint8 blue, uint8 alpha);
[Version (since = "1.16")]
[CCode (cname="cogl_color_init_from_hsl")]
public Color.from_hsl (float hue, float saturation, float luminance);
}
[Compact]
public class Bitmap : Cogl.Handle {
}
[CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_quaternion_get_gtype ()", copy_function = "cogl_quaternion_copy", free_function = "cogl_quaternion_free")]
[Compact]
public class Quaternion {
}
[Compact]
[CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_offscreen_get_gtype ()", ref_function = "cogl_offscreen_ref", unref_function = "cogl_offscreen_unref")]
public class Offscreen : Cogl.Handle {
}
[Compact]
[CCode (cname = "CoglHandle", cheader_filename = "cogl/cogl.h", type_id = "cogl_handle_get_gtype ()", ref_function = "cogl_vertex_buffer_ref", unref_function = "cogl_vertex_buffer_unref")]
public class VertexBuffer : Cogl.Handle {
}
[Compact]
[CCode (cname = "CoglHandle", cheader_filename = "cogl/cogl.h", type_id = "cogl_handle_get_gtype ()", ref_function = "cogl_shader_ref", unref_function = "cogl_shader_unref")]
public class Shader : Cogl.Handle {
}
[Compact]
[CCode (cname = "CoglHandle", cheader_filename = "cogl/cogl.h", type_id = "cogl_handle_get_gtype ()", ref_function = "cogl_program_ref", unref_function = "cogl_program_unref")]
public class Program : Cogl.Handle {
}
[Compact]
[CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_handle_get_gtype ()", ref_function = "cogl_handle_ref", unref_function = "cogl_handle_unref")]
public class Handle {
[CCode (cheader_filename = "cogl/cogl.h", cname="cogl_is_bitmap")]
[Version (since = "1.0")]
public Cogl.Bool is_bitmap ();
[CCode (cheader_filename = "cogl/cogl.h", cname="cogl_is_material")]
[Version (deprecated = true, deprecated_since = "1.16")]
public Cogl.Bool is_material ();
[CCode (cheader_filename = "cogl/cogl.h", cname="cogl_is_offscreen")]
public Cogl.Bool is_offscreen ();
[CCode (cheader_filename = "cogl/cogl.h", cname="cogl_is_program")]
[Version (deprecated = true, deprecated_since = "1.16")]
public Cogl.Bool is_program (Cogl.Handle handle);
[CCode (cheader_filename = "cogl/cogl.h", cname="cogl_is_shader")]
[Version (deprecated = true, deprecated_since = "1.16")]
public Cogl.Bool is_shader ();
[CCode (cheader_filename = "cogl/cogl.h", cname="cogl_is_texture")]
public Cogl.Bool is_texture ();
[CCode (cheader_filename = "cogl/cogl.h", cname="cogl_is_vertex_buffer")]
[Version (deprecated = true, deprecated_since = "1.16", since = "1.0")]
public Cogl.Bool is_vertex_buffer ();
[CCode (cheader_filename = "cogl/cogl.h", cname="cogl_is_vertex_buffer_indices")]
[Version (deprecated = true, deprecated_since = "1.16", since = "1.4")]
public Cogl.Bool is_vertex_buffer_indices ();
}
}

View File

@ -1,102 +0,0 @@
Color struct
Bool skip
Quaternion skip=false
Material base_type="Cogl.Handle"
MaterialLayer base_type="Cogl.Handle"
_ColorSizeCheck skip
_MatrixSizeCheck skip
_TextureVertexSizeCheck skip
Offscreen.ref skip
Offscreen.unref skip
Color
.init_* skip
color_init_from_hsl skip
color_equal.v1 type="Cogl.Color"
color_equal.v2 type="Cogl.Color"
color_equal symbol_type=method
texture_new_* name="texture_new_(.+)" parent="Cogl.Texture"
Texture
.get_data.data type="uint8[]"
.new_from_data.data type="uint8[]"
.set_data.data type="uint8[]"
.set_region.data type="uint8[]"
Matrix
.transform_points.points_in type="uint8[]"
.transform_points.stride_out out
.transform_points.points_out out type="uint8[]"
.project_points.points_in type="uint8[]"
.project_points.stride_out out
.project_points.points_out out type="uint8[]"
matrix_equal.v1 type="Cogl.Matrix"
matrix_equal.v2 type="Cogl.Matrix"
matrix_equal symbol_type=method
polygon.vertices array array_length_idx=1
vertex_buffer_* name="vertex_buffer_(.+)" parent="Cogl.VertexBuffer"
//vertex_buffer_* symbol_type="method" instance_idx=0
vertex_buffer_add symbol_type="method" instance_idx=0
vertex_buffer_delete symbol_type="method" instance_idx=0
vertex_buffer_disable symbol_type="method" instance_idx=0
vertex_buffer_draw symbol_type="method" instance_idx=0
vertex_buffer_draw_elements symbol_type="method" instance_idx=0
vertex_buffer_enable symbol_type="method" instance_idx=0
vertex_buffer_get_n_vertices symbol_type="method" instance_idx=0
vertex_buffer_indices_get_type symbol_type="method" instance_idx=0
vertex_buffer_submit symbol_type="method" instance_idx=0
vertex_buffer_unref skip
vertex_buffer_ref skip
shader_* name="shader_(.+)" parent="Cogl.Shader"
shader_* symbol_type="method" instance_idx=0
shader_unref skip
shader_ref skip
program_* name="program_(.+)" parent="Cogl.Program"
program_attach_shader symbol_type="method" instance_idx=0
program_get_uniform_location symbol_type="method" instance_idx=0
program_link symbol_type="method" instance_idx=0
program_set_uniform_1f symbol_type="method" instance_idx=0
program_set_uniform_1i symbol_type="method" instance_idx=0
program_set_uniform_float symbol_type="method" instance_idx=0
program_set_uniform_int symbol_type="method" instance_idx=0
program_set_uniform_matrix symbol_type="method" instance_idx=0
program_use symbol_type="method" instance_idx=0
program_unref skip
program_ref skip
is_bitmap parent="Cogl.Handle"
is_material parent="Cogl.Handle"
is_offscreen parent="Cogl.Handle"
is_program parent="Cogl.Handle"
is_shader parent="Cogl.Handle"
is_texture parent="Cogl.Handle"
is_vertex_buffer parent="Cogl.Handle"
is_vertex_buffer_indices parent="Cogl.Handle"
create_program type="unowned Cogl.Program" name="create" parent="Cogl.Program"
create_shader type="unowned Cogl.Shader" name="create" parent="Cogl.Shader"
get_source type="unowned Cogl.Material"
push_source.material type="Cogl.Material"
set_source.material type="Cogl.Material"
Bitmap.error_quark parent="Cogl.BitmapError" name="quark"
Texture.error_quark parent="Cogl.TextureError" name="quark"
texture_error_quark skip
BitmapError errordomain
BlendStringError errordomain
RendererError errordomain
SystemError errordomain
TextureError errordomain
FuncPtr skip

View File

@ -1,68 +0,0 @@
namespace Cogl {
public struct Color {
[Version (since = "1.4")]
[CCode (cname="cogl_color_init_from_4f")]
public Color.from_4f (float red, float green, float blue, float alpha);
[Version (since = "1.4")]
[CCode (cname="cogl_color_init_from_4fv")]
public Color.from_4fv (float color_array);
[Version (since = "1.4")]
[CCode (cname="cogl_color_init_from_4ub")]
public Color.from_4ub (uint8 red, uint8 green, uint8 blue, uint8 alpha);
[Version (since = "1.16")]
[CCode (cname="cogl_color_init_from_hsl")]
public Color.from_hsl (float hue, float saturation, float luminance);
}
[Compact]
public class Bitmap : Cogl.Handle {
}
[CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_quaternion_get_gtype ()", copy_function = "cogl_quaternion_copy", free_function = "cogl_quaternion_free")]
[Compact]
public class Quaternion {
}
[Compact]
[CCode (cname = "CoglHandle", cheader_filename = "cogl/cogl.h", type_id = "cogl_handle_get_gtype ()", ref_function = "cogl_vertex_buffer_ref", unref_function = "cogl_vertex_buffer_unref")]
public class VertexBuffer : Cogl.Handle {
}
[Compact]
[CCode (cname = "CoglHandle", cheader_filename = "cogl/cogl.h", type_id = "cogl_handle_get_gtype ()", ref_function = "cogl_shader_ref", unref_function = "cogl_shader_unref")]
public class Shader : Cogl.Handle {
}
[Compact]
[CCode (cname = "CoglHandle", cheader_filename = "cogl/cogl.h", type_id = "cogl_handle_get_gtype ()", ref_function = "cogl_program_ref", unref_function = "cogl_program_unref")]
public class Program : Cogl.Handle {
}
[Compact]
[CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_handle_get_gtype ()", ref_function = "cogl_handle_ref", unref_function = "cogl_handle_unref")]
public class Handle {
[CCode (cheader_filename = "cogl/cogl.h", cname="cogl_is_bitmap")]
[Version (since = "1.0")]
public bool is_bitmap ();
[CCode (cheader_filename = "cogl/cogl.h", cname="cogl_is_material")]
[Version (deprecated = true, deprecated_since = "1.16")]
public bool is_material ();
[CCode (cheader_filename = "cogl/cogl.h", cname="cogl_is_offscreen")]
public bool is_offscreen ();
[CCode (cheader_filename = "cogl/cogl.h", cname="cogl_is_program")]
[Version (deprecated = true, deprecated_since = "1.16")]
public bool is_program (Cogl.Handle handle);
[CCode (cheader_filename = "cogl/cogl.h", cname="cogl_is_shader")]
[Version (deprecated = true, deprecated_since = "1.16")]
public bool is_shader ();
[CCode (cheader_filename = "cogl/cogl.h", cname="cogl_is_texture")]
public bool is_texture ();
[CCode (cheader_filename = "cogl/cogl.h", cname="cogl_is_vertex_buffer")]
[Version (deprecated = true, deprecated_since = "1.16", since = "1.0")]
public bool is_vertex_buffer ();
[CCode (cheader_filename = "cogl/cogl.h", cname="cogl_is_vertex_buffer_indices")]
[Version (deprecated = true, deprecated_since = "1.16", since = "1.4")]
public bool is_vertex_buffer_indices ();
}
}

View File

@ -1,99 +0,0 @@
Color struct
Quaternion skip=false
Material base_type="Cogl.Handle"
MaterialLayer base_type="Cogl.Handle"
_ColorSizeCheck skip
_MatrixSizeCheck skip
_TextureVertexSizeCheck skip
Offscreen.ref skip
Offscreen.unref skip
Color
.init_* skip
color_init_from_hsl skip
color_equal.v1 type="Cogl.Color"
color_equal.v2 type="Cogl.Color"
color_equal symbol_type=method
texture_new_* name="texture_new_(.+)" parent="Cogl.Texture"
Texture
.get_data.data type="uint8[]"
.new_from_data.data type="uint8[]"
.set_data.data type="uint8[]"
.set_region.data type="uint8[]"
Matrix
.transform_points.points_in type="uint8[]"
.transform_points.stride_out out
.transform_points.points_out out type="uint8[]"
.project_points.points_in type="uint8[]"
.project_points.stride_out out
.project_points.points_out out type="uint8[]"
matrix_equal.v1 type="Cogl.Matrix"
matrix_equal.v2 type="Cogl.Matrix"
matrix_equal symbol_type=method
polygon.vertices array array_length_idx=1
vertex_buffer_* name="vertex_buffer_(.+)" parent="Cogl.VertexBuffer"
//vertex_buffer_* symbol_type="method" instance_idx=0
vertex_buffer_add symbol_type="method" instance_idx=0
vertex_buffer_delete symbol_type="method" instance_idx=0
vertex_buffer_disable symbol_type="method" instance_idx=0
vertex_buffer_draw symbol_type="method" instance_idx=0
vertex_buffer_draw_elements symbol_type="method" instance_idx=0
vertex_buffer_enable symbol_type="method" instance_idx=0
vertex_buffer_get_n_vertices symbol_type="method" instance_idx=0
vertex_buffer_indices_get_type symbol_type="method" instance_idx=0
vertex_buffer_submit symbol_type="method" instance_idx=0
vertex_buffer_unref skip
vertex_buffer_ref skip
shader_* name="shader_(.+)" parent="Cogl.Shader"
shader_* symbol_type="method" instance_idx=0
shader_unref skip
shader_ref skip
program_* name="program_(.+)" parent="Cogl.Program"
program_attach_shader symbol_type="method" instance_idx=0
program_get_uniform_location symbol_type="method" instance_idx=0
program_link symbol_type="method" instance_idx=0
program_set_uniform_1f symbol_type="method" instance_idx=0
program_set_uniform_1i symbol_type="method" instance_idx=0
program_set_uniform_float symbol_type="method" instance_idx=0
program_set_uniform_int symbol_type="method" instance_idx=0
program_set_uniform_matrix symbol_type="method" instance_idx=0
program_use symbol_type="method" instance_idx=0
program_unref skip
program_ref skip
is_bitmap parent="Cogl.Handle"
is_material parent="Cogl.Handle"
is_offscreen parent="Cogl.Handle"
is_program parent="Cogl.Handle"
is_shader parent="Cogl.Handle"
is_texture parent="Cogl.Handle"
is_vertex_buffer parent="Cogl.Handle"
is_vertex_buffer_indices parent="Cogl.Handle"
create_program type="unowned Cogl.Program" name="create" parent="Cogl.Program"
create_shader type="unowned Cogl.Shader" name="create" parent="Cogl.Shader"
get_source type="unowned Cogl.Material"
push_source.material type="Cogl.Material"
set_source.material type="Cogl.Material"
Bitmap.error_quark parent="Cogl.BitmapError" name="quark"
Texture.error_quark parent="Cogl.TextureError" name="quark"
texture_error_quark skip
BitmapError errordomain
BlendStringError errordomain
RendererError errordomain
SystemError errordomain
TextureError errordomain

View File

@ -1,181 +0,0 @@
* skip=false
*.* skip=false
* cheader_filename="meta/main.h"
Backend cheader_filename="meta/meta-backend.h"
get_backend parent="Meta.Backend" cheader_filename="meta/meta-backend.h"
Background cheader_filename="meta/meta-background.h"
Background.set_file.file nullable
BackgroundActor cheader_filename="meta/meta-background-actor.h"
BackgroundGroup cheader_filename="meta/meta-background-group.h"
BackgroundImage cheader_filename="meta/meta-background-image.h"
BackgroundImageCache cheader_filename="meta/meta-background-image.h"
Barrier cheader_filename="meta/barrier.h"
BarrierDirection cheader_filename="meta/barrier.h"
BarrierEvent cheader_filename="meta/barrier.h"
ButtonFunction cheader_filename="meta/common.h"
ButtonLayout cheader_filename="meta/common.h"
Compositor cheader_filename="meta/compositor.h"
Compositor.process_event.event type="X.Event" ref
Compositor.sync_stack.stack type_arguments="Meta.Window"
compositor_new cheader_filename="meta/compositor.h"
get_feedback_group_for_screen parent="Meta.Screen" symbol_type="method" name="get_feedback_group" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
get_stage_for_screen parent="Meta.Screen" symbol_type="method" name="get_stage" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
get_top_window_group_for_screen parent="Meta.Screen" symbol_type="method" name="get_top_window_group" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
get_window_group_for_screen parent="Meta.Screen" symbol_type="method" name="get_window_group" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
disable_unredirect_for_screen parent="Meta.Screen" symbol_type="method" name="disable_unredirect" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
enable_unredirect_for_screen parent="Meta.Screen" symbol_type="method" name="enable_unredirect" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
get_window_actors parent="Meta.Screen" symbol_type="method" instance_idx=0 cheader_filename="meta/compositor-mutter.h" type_arguments="Meta.WindowActor"
get_overlay_window parent="Meta.Screen" symbol_type="method" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
set_stage_input_region parent="Meta.Screen" symbol_type="method" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
empty_stage_input_region parent="Meta.Screen" symbol_type="method" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
focus_stage_window parent="Meta.Screen" symbol_type="method" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
CompEffect cheader_filename="meta/compositor.h"
CloseDialog cheader_filename="meta/meta-close-dialog.h"
CloseDialogResponse cheader_filename="meta/meta-close-dialog.h"
Cursor cheader_filename="meta/common.h"
CursorTracker cheader_filename="meta/meta-cursor-tracker.h"
CursorTracker.get_for_screen parent="Meta.Screen" symbol_type="method" instance_idx=0 name="get_cursor_tracker"
CursorTracker.get_pointer.x out
CursorTracker.get_pointer.y out
CursorTracker.get_pointer.mods out
DBusDisplayConfigSkeleton cheader_filename="meta/meta-monitor-manager.h"
DebugTopic cheader_filename="meta/util.h"
Direction cheader_filename="meta/common.h"
Display cheader_filename="meta/display.h"
Dnd cheader_filename="meta/meta-dnd.h"
EdgeType cheader_filename="meta/boxes.h"
Edge cheader_filename="meta/boxes.h"
Frame cheader_filename="meta/types.h"
FrameBorders cheader_filename="meta/common.h"
FrameFlags cheader_filename="meta/common.h"
FrameType cheader_filename="meta/common.h"
GrabOp cheader_filename="meta/common.h"
Group cheader_filename="meta/group.h"
Group.property_notify.event type="X.Event" ref
IdleMonitor cheader_filename="meta/meta-idle-monitor.h"
IdleMonitorWatchFunc cheader_filename="meta/meta-idle-monitor.h"
InhibitShortcutsDialog cheader_filename="meta/meta-inhibit-shortcuts-dialog.h"
InhibitShortcutsDialogResponse cheader_filename="meta/meta-inhibit-shortcuts-dialog.h"
KeyBinding cheader_filename="meta/keybindings.h"
keybindings_set_custom_handler parent="Meta.KeyBinding" name="set_custom_handler" cheader_filename="meta/keybindings.h"
KeyBindingAction cheader_filename="meta/prefs.h"
KeyBindingFlags cheader_filename="meta/prefs.h"
KeyHandlerFunc cheader_filename="meta/prefs.h"
KeyHandlerFunc.event type="Clutter.KeyEvent"
LaterType cheader_filename="meta/util.h"
LocaleDirection cheader_filename="meta/util.h"
MaximizeFlags cheader_filename="meta/window.h"
ModalOptions cheader_filename="meta/meta-plugin.h"
MonitorManager cheader_filename="meta/meta-monitor-manager.h"
MonitorSwitchConfigType cheader_filename="meta/meta-monitor-manager.h"
MotionDirection cheader_filename="meta/common.h"
PadActionType cheader_filename="meta/display.h"
Plugin cheader_filename="meta/meta-plugin.h"
Plugin.xevent_filter.event type="X.Event" ref
PluginInfo cheader_filename="meta/meta-plugin.h"
PluginVersion cheader_filename="meta/meta-plugin.h"
Preference cheader_filename="meta/prefs.h"
PrefsChangedFunc cheader_filename="meta/prefs.h"
Rectangle cheader_filename="meta/boxes.h" struct
Screen cheader_filename="meta/screen.h"
ScreenCorner cheader_filename="meta/screen.h"
ScreenDirection cheader_filename="meta/screen.h"
Settings cheader_filename="meta/meta-settings.h"
Shadow cheader_filename="meta/meta-shadow-factory.h"
ShadowFactory cheader_filename="meta/meta-shadow-factory.h"
ShadowMode cheader_filename="meta/meta-window-actor.h"
ShadowParams cheader_filename="meta/meta-shadow-factory.h"
ShapedTexture cheader_filename="meta/meta-shaped-texture.h"
Side cheader_filename="meta/common.h"
SizeChange cheader_filename="meta/compositor.h"
StackLayer cheader_filename="meta/common.h"
Stage cheader_filename="meta/meta-stage.h"
Stage.is_focused parent="Meta.Screen" symbol_type="method" name="stage_is_focused" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
Strut cheader_filename="meta/boxes.h"
TabList cheader_filename="meta/display.h"
TabShowType cheader_filename="meta/display.h"
Theme cheader_filename="meta/theme.h"
theme_get_default cheader_filename="meta/theme.h"
theme_new cheader_filename="meta/theme.h"
VirtualModifier cheader_filename="meta/common.h"
Workspace cheader_filename="meta/workspace.h"
Window cheader_filename="meta/window.h"
Window.icon type="Cairo.Surface"
Window.mini_icon type="Cairo.Surface"
Window.focus#signal name="focused"
WindowActor cheader_filename="meta/meta-window-actor.h"
WindowClientType cheader_filename="meta/window.h"
WindowForeachFunc cheader_filename="meta/window.h"
WindowGroup cheader_filename="meta/meta-window-group.h"
WindowMenuType cheader_filename="meta/compositor.h"
WindowShape cheader_filename="meta/meta-window-shape.h"
WindowType cheader_filename="meta/window.h"
rect skip
prefs_* parent="Meta.Prefs" name="prefs_(.+)" cheader_filename="meta/prefs.h"
g_utf8_strndup skip
preference_to_string cheader_filename="meta/prefs.h"
frame_type_to_string cheader_filename="meta/util.h"
ICON_WIDTH cheader_filename="meta/common.h"
ICON_HEIGHT cheader_filename="meta/common.h"
MINI_ICON_WIDTH cheader_filename="meta/common.h"
MINI_ICON_HEIGHT cheader_filename="meta/common.h"
DEFAULT_ICON_NAME cheader_filename="meta/common.h"
PRIORITY_RESIZE cheader_filename="meta/common.h"
PRIORITY_BEFORE_REDRAW cheader_filename="meta/common.h"
PRIORITY_REDRAW cheader_filename="meta/common.h"
PRIORITY_PREFS_NOTIFY cheader_filename="meta/common.h"
VIRTUAL_CORE_POINTER_ID cheader_filename="meta/common.h"
VIRTUAL_CORE_KEYBOARD_ID cheader_filename="meta/common.h"
MAJOR_VERSION cheader_filename="meta/meta-version.h"
MINOR_VERSION cheader_filename="meta/meta-version.h"
MICRO_VERSION cheader_filename="meta/meta-version.h"
PLUGIN_API_VERSION cheader_filename="meta/meta-version.h"
add_verbose_topic parent="Meta.Util" cheader_filename="meta/util.h"
bug parent="Meta.Util" cheader_filename="meta/util.h"
debug_spew_real parent="Meta.Util" cheader_filename="meta/util.h"
external_binding_name_for_action parent="Meta.Util" cheader_filename="meta/util.h"
fatal parent="Meta.Util" cheader_filename="meta/util.h"
free_gslist_and_elements skip
get_locale_direction parent="Meta.Util" cheader_filename="meta/util.h"
gravity_to_string parent="Meta.Util" cheader_filename="meta/util.h"
is_debugging parent="Meta.Util" cheader_filename="meta/util.h"
is_syncing parent="Meta.Util" cheader_filename="meta/util.h"
is_verbose parent="Meta.Util" cheader_filename="meta/util.h"
is_wayland_compositor parent="Meta.Util" cheader_filename="meta/util.h"
later_add parent="Meta.Util" cheader_filename="meta/util.h"
later_remove parent="Meta.Util" cheader_filename="meta/util.h"
pop_no_msg_prefix parent="Meta.Util" cheader_filename="meta/util.h"
push_no_msg_prefix parent="Meta.Util" cheader_filename="meta/util.h"
remove_verbose_topic parent="Meta.Util" cheader_filename="meta/util.h"
show_dialog parent="Meta.Util" cheader_filename="meta/util.h"
show_dialog.columns type_arguments="string" nullable default=null
show_dialog.entries type_arguments="string" nullable default=null
show_dialog.transient_for default=0
show_dialog.icon_name nullable default=null
show_dialog.cancel_text nullable default=null
show_dialog.ok_text nullable default=null
show_dialog.display nullable default=null
show_dialog.timeout nullable default=null
topic_real parent="Meta.Util" cheader_filename="meta/util.h"
unsigned_long_equal parent="Meta.Util" name="ulong_equal" cheader_filename="meta/util.h"
unsigned_long_equal.v1 type="ulong?"
unsigned_long_equal.v2 type="ulong?"
unsigned_long_hash parent="Meta.Util" name="ulong_hash" cheader_filename="meta/util.h"
unsigned_long_hash.v type="ulong?"
verbose_real parent="Meta.Util" cheader_filename="meta/util.h"
warning parent="Meta.Util" cheader_filename="meta/util.h"
set_gnome_wm_keybindings parent="Meta.Util"
set_wm_name parent="Meta.Util"
error_trap_pop parent="Meta.Display" symbol_type="method" name="error_trap_pop" instance_idx=0 cheader_filename="meta/errors.h"
error_trap_pop_with_return parent="Meta.Display" symbol_type="method" name="error_trap_pop_with_return" instance_idx=0 cheader_filename="meta/errors.h"
error_trap_push parent="Meta.Display" symbol_type="method" name="error_trap_push" instance_idx=0 cheader_filename="meta/errors.h"

View File

@ -1,186 +0,0 @@
* skip=false
*.* skip=false
* cheader_filename="meta/main.h"
Backend cheader_filename="meta/meta-backend.h"
get_backend parent="Meta.Backend" cheader_filename="meta/meta-backend.h"
Background cheader_filename="meta/meta-background.h"
Background.set_file.file nullable
BackgroundActor cheader_filename="meta/meta-background-actor.h"
BackgroundGroup cheader_filename="meta/meta-background-group.h"
BackgroundImage cheader_filename="meta/meta-background-image.h"
BackgroundImageCache cheader_filename="meta/meta-background-image.h"
Barrier cheader_filename="meta/barrier.h"
BarrierDirection cheader_filename="meta/barrier.h"
BarrierEvent cheader_filename="meta/barrier.h"
ButtonFunction cheader_filename="meta/common.h"
ButtonLayout cheader_filename="meta/common.h"
Compositor cheader_filename="meta/compositor.h"
Compositor.process_event.event type="X.Event" ref
Compositor.sync_stack.stack type_arguments="Meta.Window"
compositor_new cheader_filename="meta/compositor.h"
get_feedback_group_for_display parent="Meta.Display" symbol_type="method" name="get_feedback_group" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
get_stage_for_display parent="Meta.Display" symbol_type="method" name="get_stage" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
get_top_window_group_for_display parent="Meta.Display" symbol_type="method" name="get_top_window_group" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
get_window_group_for_display parent="Meta.Display" symbol_type="method" name="get_window_group" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
disable_unredirect_for_display parent="Meta.Display" symbol_type="method" name="disable_unredirect" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
enable_unredirect_for_display parent="Meta.Display" symbol_type="method" name="enable_unredirect" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
get_window_actors parent="Meta.Display" symbol_type="method" instance_idx=0 cheader_filename="meta/compositor-mutter.h" type_arguments="Meta.WindowActor"
get_overlay_window parent="Meta.Display" symbol_type="method" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
set_stage_input_region parent="Meta.Display" symbol_type="method" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
empty_stage_input_region parent="Meta.Display" symbol_type="method" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
focus_stage_window parent="Meta.Display" symbol_type="method" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
CompEffect cheader_filename="meta/compositor.h"
CloseDialog cheader_filename="meta/meta-close-dialog.h"
CloseDialogResponse cheader_filename="meta/meta-close-dialog.h"
Cursor cheader_filename="meta/common.h"
CursorTracker cheader_filename="meta/meta-cursor-tracker.h"
CursorTracker.get_for_display parent="Meta.Display" symbol_type="method" instance_idx=0 name="get_cursor_tracker"
CursorTracker.get_pointer.x out
CursorTracker.get_pointer.y out
CursorTracker.get_pointer.mods out
DBusDisplayConfigSkeleton cheader_filename="meta/meta-monitor-manager.h"
DebugTopic cheader_filename="meta/util.h"
Direction cheader_filename="meta/common.h"
Display cheader_filename="meta/display.h"
DisplayCorner cheader_filename="meta/display.h"
DisplayDirection cheader_filename="meta/display.h"
Dnd cheader_filename="meta/meta-dnd.h"
EdgeType cheader_filename="meta/boxes.h"
Edge cheader_filename="meta/boxes.h"
Frame cheader_filename="meta/types.h"
FrameBorders cheader_filename="meta/common.h"
FrameFlags cheader_filename="meta/common.h"
FrameType cheader_filename="meta/common.h"
GrabOp cheader_filename="meta/common.h"
Group cheader_filename="meta/group.h"
Group.property_notify.event type="X.Event" ref
IdleMonitor cheader_filename="meta/meta-idle-monitor.h"
IdleMonitorWatchFunc cheader_filename="meta/meta-idle-monitor.h"
InhibitShortcutsDialog cheader_filename="meta/meta-inhibit-shortcuts-dialog.h"
InhibitShortcutsDialogResponse cheader_filename="meta/meta-inhibit-shortcuts-dialog.h"
KeyBinding cheader_filename="meta/keybindings.h"
keybindings_set_custom_handler parent="Meta.KeyBinding" name="set_custom_handler" cheader_filename="meta/keybindings.h"
KeyBindingAction cheader_filename="meta/prefs.h"
KeyBindingFlags cheader_filename="meta/prefs.h"
KeyHandlerFunc cheader_filename="meta/prefs.h"
KeyHandlerFunc.event type="Clutter.KeyEvent"
LaterType cheader_filename="meta/util.h"
LocaleDirection cheader_filename="meta/util.h"
MaximizeFlags cheader_filename="meta/window.h"
ModalOptions cheader_filename="meta/meta-plugin.h"
MonitorManager cheader_filename="meta/meta-monitor-manager.h"
MonitorSwitchConfigType cheader_filename="meta/meta-monitor-manager.h"
MotionDirection cheader_filename="meta/common.h"
PadActionType cheader_filename="meta/display.h"
Plugin cheader_filename="meta/meta-plugin.h"
Plugin.xevent_filter.event type="X.Event" ref
PluginInfo cheader_filename="meta/meta-plugin.h"
PluginVersion cheader_filename="meta/meta-plugin.h"
Preference cheader_filename="meta/prefs.h"
PrefsChangedFunc cheader_filename="meta/prefs.h"
Rectangle cheader_filename="meta/boxes.h" struct
RemoteAccessController cheader_filename="meta/meta-remote-access-controller.h"
RemoteAccessHandle cheader_filename="meta/meta-remote-access-controller.h"
Settings cheader_filename="meta/meta-settings.h"
Shadow cheader_filename="meta/meta-shadow-factory.h"
ShadowFactory cheader_filename="meta/meta-shadow-factory.h"
ShadowMode cheader_filename="meta/meta-window-actor.h"
ShadowParams cheader_filename="meta/meta-shadow-factory.h"
ShapedTexture cheader_filename="meta/meta-shaped-texture.h"
Side cheader_filename="meta/common.h"
SizeChange cheader_filename="meta/compositor.h"
StackLayer cheader_filename="meta/common.h"
Stage cheader_filename="meta/meta-stage.h"
Stage.is_focused parent="Meta.Display" symbol_type="method" name="stage_is_focused" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
Strut cheader_filename="meta/boxes.h"
TabList cheader_filename="meta/display.h"
TabShowType cheader_filename="meta/display.h"
Theme cheader_filename="meta/theme.h"
theme_get_default cheader_filename="meta/theme.h"
theme_new cheader_filename="meta/theme.h"
VirtualModifier cheader_filename="meta/common.h"
Workspace cheader_filename="meta/workspace.h"
WorkspaceManager cheader_filename="meta/meta-workspace-manager.h"
Window cheader_filename="meta/window.h"
Window.focus#signal name="focused"
Window.icon type="Cairo.Surface"
Window.mini_icon type="Cairo.Surface"
WindowActor cheader_filename="meta/meta-window-actor.h"
WindowClientType cheader_filename="meta/window.h"
WindowForeachFunc cheader_filename="meta/window.h"
WindowGroup cheader_filename="meta/meta-window-group.h"
WindowMenuType cheader_filename="meta/compositor.h"
WindowShape cheader_filename="meta/meta-window-shape.h"
WindowType cheader_filename="meta/window.h"
X11Display cheader_filename="meta/meta-x11-display.h"
rect skip
prefs_* parent="Meta.Prefs" name="prefs_(.+)" cheader_filename="meta/prefs.h"
g_utf8_strndup skip
preference_to_string cheader_filename="meta/prefs.h"
frame_type_to_string cheader_filename="meta/util.h"
CURRENT_TIME cheader_filename="meta/common.h"
ICON_WIDTH cheader_filename="meta/common.h"
ICON_HEIGHT cheader_filename="meta/common.h"
MINI_ICON_WIDTH cheader_filename="meta/common.h"
MINI_ICON_HEIGHT cheader_filename="meta/common.h"
DEFAULT_ICON_NAME cheader_filename="meta/common.h"
PRIORITY_RESIZE cheader_filename="meta/common.h"
PRIORITY_BEFORE_REDRAW cheader_filename="meta/common.h"
PRIORITY_REDRAW cheader_filename="meta/common.h"
PRIORITY_PREFS_NOTIFY cheader_filename="meta/common.h"
VIRTUAL_CORE_POINTER_ID cheader_filename="meta/common.h"
VIRTUAL_CORE_KEYBOARD_ID cheader_filename="meta/common.h"
MAJOR_VERSION cheader_filename="meta/meta-version.h"
MINOR_VERSION cheader_filename="meta/meta-version.h"
MICRO_VERSION cheader_filename="meta/meta-version.h"
PLUGIN_API_VERSION cheader_filename="meta/meta-version.h"
add_verbose_topic parent="Meta.Util" cheader_filename="meta/util.h"
bug parent="Meta.Util" cheader_filename="meta/util.h"
debug_spew_real parent="Meta.Util" cheader_filename="meta/util.h"
external_binding_name_for_action parent="Meta.Util" cheader_filename="meta/util.h"
fatal parent="Meta.Util" cheader_filename="meta/util.h"
free_gslist_and_elements skip
get_locale_direction parent="Meta.Util" cheader_filename="meta/util.h"
gravity_to_string parent="Meta.Util" cheader_filename="meta/util.h"
is_debugging parent="Meta.Util" cheader_filename="meta/util.h"
is_syncing parent="Meta.Util" cheader_filename="meta/util.h"
is_verbose parent="Meta.Util" cheader_filename="meta/util.h"
is_wayland_compositor parent="Meta.Util" cheader_filename="meta/util.h"
later_add parent="Meta.Util" cheader_filename="meta/util.h"
later_remove parent="Meta.Util" cheader_filename="meta/util.h"
pop_no_msg_prefix parent="Meta.Util" cheader_filename="meta/util.h"
push_no_msg_prefix parent="Meta.Util" cheader_filename="meta/util.h"
remove_verbose_topic parent="Meta.Util" cheader_filename="meta/util.h"
show_dialog parent="Meta.Util" cheader_filename="meta/util.h"
show_dialog.columns type_arguments="string" nullable default=null
show_dialog.entries type_arguments="string" nullable default=null
show_dialog.transient_for default=0
show_dialog.icon_name nullable default=null
show_dialog.cancel_text nullable default=null
show_dialog.ok_text nullable default=null
show_dialog.display nullable default=null
show_dialog.timeout nullable default=null
topic_real parent="Meta.Util" cheader_filename="meta/util.h"
unsigned_long_equal parent="Meta.Util" name="ulong_equal" cheader_filename="meta/util.h"
unsigned_long_equal.v1 type="ulong?"
unsigned_long_equal.v2 type="ulong?"
unsigned_long_hash parent="Meta.Util" name="ulong_hash" cheader_filename="meta/util.h"
unsigned_long_hash.v type="ulong?"
verbose_real parent="Meta.Util" cheader_filename="meta/util.h"
warning parent="Meta.Util" cheader_filename="meta/util.h"
set_gnome_wm_keybindings parent="Meta.Util"
set_wm_name parent="Meta.Util"
x11_error_trap_pop parent="Meta.X11Display" symbol_type="method" name="error_trap_pop" instance_idx=0 cheader_filename="meta/meta-x11-errors.h"
x11_error_trap_pop_with_return parent="Meta.X11Display" symbol_type="method" name="error_trap_pop_with_return" instance_idx=0 cheader_filename="meta/meta-x11-errors.h"
x11_error_trap_push parent="Meta.X11Display" symbol_type="method" name="error_trap_push" instance_idx=0 cheader_filename="meta/meta-x11-errors.h"
x11_init_gdk_display parent="Meta.X11Display" cheader_filename="meta/meta-x11-display.h"

View File

@ -1,191 +0,0 @@
* skip=false
*.* skip=false
* cheader_filename="meta/main.h"
Backend cheader_filename="meta/meta-backend.h"
get_backend parent="Meta.Backend" cheader_filename="meta/meta-backend.h"
Background cheader_filename="meta/meta-background.h"
Background.set_file.file nullable
BackgroundActor cheader_filename="meta/meta-background-actor.h"
BackgroundGroup cheader_filename="meta/meta-background-group.h"
BackgroundImage cheader_filename="meta/meta-background-image.h"
BackgroundImageCache cheader_filename="meta/meta-background-image.h"
Barrier cheader_filename="meta/barrier.h"
BarrierDirection cheader_filename="meta/barrier.h"
BarrierEvent cheader_filename="meta/barrier.h"
ButtonFunction cheader_filename="meta/common.h"
ButtonLayout cheader_filename="meta/common.h"
Compositor cheader_filename="meta/compositor.h"
Compositor.process_event.event type="X.Event" ref
Compositor.sync_stack.stack type_arguments="Meta.Window"
compositor_new cheader_filename="meta/compositor.h"
get_feedback_group_for_display parent="Meta.Display" symbol_type="method" name="get_feedback_group" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
get_stage_for_display parent="Meta.Display" symbol_type="method" name="get_stage" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
get_top_window_group_for_display parent="Meta.Display" symbol_type="method" name="get_top_window_group" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
get_window_group_for_display parent="Meta.Display" symbol_type="method" name="get_window_group" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
disable_unredirect_for_display parent="Meta.Display" symbol_type="method" name="disable_unredirect" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
enable_unredirect_for_display parent="Meta.Display" symbol_type="method" name="enable_unredirect" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
get_window_actors parent="Meta.Display" symbol_type="method" instance_idx=0 cheader_filename="meta/compositor-mutter.h" type_arguments="Meta.WindowActor"
get_overlay_window parent="Meta.Display" symbol_type="method" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
set_stage_input_region parent="Meta.Display" symbol_type="method" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
empty_stage_input_region parent="Meta.Display" symbol_type="method" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
focus_stage_window parent="Meta.Display" symbol_type="method" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
CompEffect cheader_filename="meta/compositor.h"
CloseDialog cheader_filename="meta/meta-close-dialog.h"
CloseDialogResponse cheader_filename="meta/meta-close-dialog.h"
Cursor cheader_filename="meta/common.h"
CursorTracker cheader_filename="meta/meta-cursor-tracker.h"
CursorTracker.get_for_display parent="Meta.Display" symbol_type="method" instance_idx=0 name="get_cursor_tracker"
CursorTracker.get_pointer.x out
CursorTracker.get_pointer.y out
CursorTracker.get_pointer.mods out
DebugTopic cheader_filename="meta/util.h"
Direction cheader_filename="meta/common.h"
Display cheader_filename="meta/display.h"
DisplayCorner cheader_filename="meta/display.h"
DisplayDirection cheader_filename="meta/display.h"
Dnd cheader_filename="meta/meta-dnd.h"
EdgeType cheader_filename="meta/boxes.h"
Edge cheader_filename="meta/boxes.h"
Frame cheader_filename="meta/types.h"
FrameBorders cheader_filename="meta/common.h"
FrameFlags cheader_filename="meta/common.h"
FrameType cheader_filename="meta/common.h"
GrabOp cheader_filename="meta/common.h"
Group cheader_filename="meta/group.h"
Group.property_notify.event type="X.Event" ref
IdleMonitor cheader_filename="meta/meta-idle-monitor.h"
IdleMonitorWatchFunc cheader_filename="meta/meta-idle-monitor.h"
InhibitShortcutsDialog cheader_filename="meta/meta-inhibit-shortcuts-dialog.h"
InhibitShortcutsDialogResponse cheader_filename="meta/meta-inhibit-shortcuts-dialog.h"
KeyBinding cheader_filename="meta/keybindings.h"
keybindings_set_custom_handler parent="Meta.KeyBinding" name="set_custom_handler" cheader_filename="meta/keybindings.h"
KeyBindingAction cheader_filename="meta/prefs.h"
KeyBindingFlags cheader_filename="meta/prefs.h"
KeyHandlerFunc cheader_filename="meta/prefs.h"
KeyHandlerFunc.event type="Clutter.KeyEvent"
LaunchContext cheader_filename="meta/meta-launch-context.h"
LaterType cheader_filename="meta/util.h"
LocaleDirection cheader_filename="meta/util.h"
MaximizeFlags cheader_filename="meta/window.h"
ModalOptions cheader_filename="meta/meta-plugin.h"
MonitorManager cheader_filename="meta/meta-monitor-manager.h"
MonitorSwitchConfigType cheader_filename="meta/meta-monitor-manager.h"
MotionDirection cheader_filename="meta/common.h"
PadActionType cheader_filename="meta/display.h"
Plugin cheader_filename="meta/meta-plugin.h"
Plugin.xevent_filter.event type="X.Event" ref
PluginInfo cheader_filename="meta/meta-plugin.h"
PluginVersion cheader_filename="meta/meta-plugin.h"
Preference cheader_filename="meta/prefs.h"
PrefsChangedFunc cheader_filename="meta/prefs.h"
Rectangle cheader_filename="meta/boxes.h" struct
RemoteAccessController cheader_filename="meta/meta-remote-access-controller.h"
RemoteAccessHandle cheader_filename="meta/meta-remote-access-controller.h"
Settings cheader_filename="meta/meta-settings.h"
Shadow cheader_filename="meta/meta-shadow-factory.h"
ShadowFactory cheader_filename="meta/meta-shadow-factory.h"
ShadowMode cheader_filename="meta/meta-window-actor.h"
ShadowParams cheader_filename="meta/meta-shadow-factory.h"
ShapedTexture cheader_filename="meta/meta-shaped-texture.h"
Side cheader_filename="meta/common.h"
SizeChange cheader_filename="meta/compositor.h"
SoundPlayer cheader_filename="meta/meta-sound-player.h"
StartupNotification cheader_filename="meta/meta-startup-notification.h"
StartupNotification.changed.object type="Meta.StartupSequence"
StartupNotification.get_sequences type_arguments="Meta.StartupSequence"
StartupSequence cheader_filename="meta/meta-startup-notification.h"
StackLayer cheader_filename="meta/common.h"
Stage cheader_filename="meta/meta-stage.h"
Stage.is_focused parent="Meta.Display" symbol_type="method" name="stage_is_focused" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
Strut cheader_filename="meta/boxes.h"
TabList cheader_filename="meta/display.h"
TabShowType cheader_filename="meta/display.h"
Theme cheader_filename="meta/theme.h"
theme_get_default cheader_filename="meta/theme.h"
theme_new cheader_filename="meta/theme.h"
VirtualModifier cheader_filename="meta/common.h"
Workspace cheader_filename="meta/workspace.h"
WorkspaceManager cheader_filename="meta/meta-workspace-manager.h"
Window cheader_filename="meta/window.h"
Window.focus#signal name="focused"
Window.icon type="Cairo.Surface"
Window.mini_icon type="Cairo.Surface"
WindowActor cheader_filename="meta/meta-window-actor.h"
WindowClientType cheader_filename="meta/window.h"
WindowForeachFunc cheader_filename="meta/window.h"
WindowGroup cheader_filename="meta/meta-window-group.h"
WindowMenuType cheader_filename="meta/compositor.h"
WindowShape cheader_filename="meta/meta-window-shape.h"
WindowType cheader_filename="meta/window.h"
X11Display cheader_filename="meta/meta-x11-display.h"
rect skip
prefs_* parent="Meta.Prefs" name="prefs_(.+)" cheader_filename="meta/prefs.h"
g_utf8_strndup skip
preference_to_string cheader_filename="meta/prefs.h"
frame_type_to_string cheader_filename="meta/util.h"
CURRENT_TIME cheader_filename="meta/common.h"
ICON_WIDTH cheader_filename="meta/common.h"
ICON_HEIGHT cheader_filename="meta/common.h"
MINI_ICON_WIDTH cheader_filename="meta/common.h"
MINI_ICON_HEIGHT cheader_filename="meta/common.h"
DEFAULT_ICON_NAME cheader_filename="meta/common.h"
PRIORITY_RESIZE cheader_filename="meta/common.h"
PRIORITY_BEFORE_REDRAW cheader_filename="meta/common.h"
PRIORITY_REDRAW cheader_filename="meta/common.h"
PRIORITY_PREFS_NOTIFY cheader_filename="meta/common.h"
VIRTUAL_CORE_POINTER_ID cheader_filename="meta/common.h"
VIRTUAL_CORE_KEYBOARD_ID cheader_filename="meta/common.h"
MAJOR_VERSION cheader_filename="meta/meta-version.h"
MINOR_VERSION cheader_filename="meta/meta-version.h"
MICRO_VERSION cheader_filename="meta/meta-version.h"
PLUGIN_API_VERSION cheader_filename="meta/meta-version.h"
add_verbose_topic parent="Meta.Util" cheader_filename="meta/util.h"
bug parent="Meta.Util" cheader_filename="meta/util.h"
debug_spew_real parent="Meta.Util" cheader_filename="meta/util.h"
external_binding_name_for_action parent="Meta.Util" cheader_filename="meta/util.h"
fatal parent="Meta.Util" cheader_filename="meta/util.h"
free_gslist_and_elements skip
get_locale_direction parent="Meta.Util" cheader_filename="meta/util.h"
gravity_to_string parent="Meta.Util" cheader_filename="meta/util.h"
is_debugging parent="Meta.Util" cheader_filename="meta/util.h"
is_syncing parent="Meta.Util" cheader_filename="meta/util.h"
is_verbose parent="Meta.Util" cheader_filename="meta/util.h"
is_wayland_compositor parent="Meta.Util" cheader_filename="meta/util.h"
later_add parent="Meta.Util" cheader_filename="meta/util.h"
later_remove parent="Meta.Util" cheader_filename="meta/util.h"
pop_no_msg_prefix parent="Meta.Util" cheader_filename="meta/util.h"
push_no_msg_prefix parent="Meta.Util" cheader_filename="meta/util.h"
remove_verbose_topic parent="Meta.Util" cheader_filename="meta/util.h"
show_dialog parent="Meta.Util" cheader_filename="meta/util.h"
show_dialog.columns type_arguments="string" nullable default=null
show_dialog.entries type_arguments="string" nullable default=null
show_dialog.transient_for default=0
show_dialog.icon_name nullable default=null
show_dialog.cancel_text nullable default=null
show_dialog.ok_text nullable default=null
show_dialog.display nullable default=null
show_dialog.timeout nullable default=null
topic_real parent="Meta.Util" cheader_filename="meta/util.h"
unsigned_long_equal parent="Meta.Util" name="ulong_equal" cheader_filename="meta/util.h"
unsigned_long_equal.v1 type="ulong?"
unsigned_long_equal.v2 type="ulong?"
unsigned_long_hash parent="Meta.Util" name="ulong_hash" cheader_filename="meta/util.h"
unsigned_long_hash.v type="ulong?"
verbose_real parent="Meta.Util" cheader_filename="meta/util.h"
warning parent="Meta.Util" cheader_filename="meta/util.h"
set_gnome_wm_keybindings parent="Meta.Util"
set_wm_name parent="Meta.Util"
x11_error_trap_pop parent="Meta.X11Display" symbol_type="method" name="error_trap_pop" instance_idx=0 cheader_filename="meta/meta-x11-errors.h"
x11_error_trap_pop_with_return parent="Meta.X11Display" symbol_type="method" name="error_trap_pop_with_return" instance_idx=0 cheader_filename="meta/meta-x11-errors.h"
x11_error_trap_push parent="Meta.X11Display" symbol_type="method" name="error_trap_push" instance_idx=0 cheader_filename="meta/meta-x11-errors.h"
x11_init_gdk_display parent="Meta.X11Display" cheader_filename="meta/meta-x11-display.h"

View File

@ -1,190 +0,0 @@
* skip=false
*.* skip=false
* cheader_filename="meta/main.h"
Backend cheader_filename="meta/meta-backend.h"
Backend.gpu_added skip
get_backend parent="Meta.Backend" cheader_filename="meta/meta-backend.h"
Background cheader_filename="meta/meta-background.h"
Background.set_file.file nullable
BackgroundActor cheader_filename="meta/meta-background-actor.h"
BackgroundGroup cheader_filename="meta/meta-background-group.h"
BackgroundImage cheader_filename="meta/meta-background-image.h"
BackgroundImageCache cheader_filename="meta/meta-background-image.h"
Barrier cheader_filename="meta/barrier.h"
BarrierDirection cheader_filename="meta/barrier.h"
BarrierEvent cheader_filename="meta/barrier.h"
ButtonFunction cheader_filename="meta/common.h"
ButtonLayout cheader_filename="meta/common.h"
Compositor cheader_filename="meta/compositor.h"
Compositor.sync_stack.stack type_arguments="Meta.Window"
get_feedback_group_for_display parent="Meta.Display" symbol_type="method" name="get_feedback_group" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
get_stage_for_display parent="Meta.Display" symbol_type="method" name="get_stage" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
get_top_window_group_for_display parent="Meta.Display" symbol_type="method" name="get_top_window_group" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
get_window_group_for_display parent="Meta.Display" symbol_type="method" name="get_window_group" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
disable_unredirect_for_display parent="Meta.Display" symbol_type="method" name="disable_unredirect" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
enable_unredirect_for_display parent="Meta.Display" symbol_type="method" name="enable_unredirect" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
get_window_actors parent="Meta.Display" symbol_type="method" instance_idx=0 cheader_filename="meta/compositor-mutter.h" type_arguments="Meta.WindowActor"
focus_stage_window parent="Meta.Display" symbol_type="method" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
CompEffect cheader_filename="meta/compositor.h"
CloseDialog cheader_filename="meta/meta-close-dialog.h"
CloseDialogResponse cheader_filename="meta/meta-close-dialog.h"
Cursor cheader_filename="meta/common.h"
CursorTracker cheader_filename="meta/meta-cursor-tracker.h"
CursorTracker.get_for_display parent="Meta.Display" symbol_type="method" instance_idx=0 name="get_cursor_tracker"
CursorTracker.get_pointer.x out
CursorTracker.get_pointer.y out
CursorTracker.get_pointer.mods out
DebugTopic cheader_filename="meta/util.h"
Direction cheader_filename="meta/common.h"
Display cheader_filename="meta/display.h"
DisplayCorner cheader_filename="meta/display.h"
DisplayDirection cheader_filename="meta/display.h"
Dnd cheader_filename="meta/meta-dnd.h"
EdgeType cheader_filename="meta/boxes.h"
Edge cheader_filename="meta/boxes.h"
Frame cheader_filename="meta/types.h"
FrameBorders cheader_filename="meta/common.h"
FrameFlags cheader_filename="meta/common.h"
FrameType cheader_filename="meta/common.h"
GrabOp cheader_filename="meta/common.h"
Group cheader_filename="meta/group.h"
Group.property_notify.event type="X.Event" ref
IdleMonitor cheader_filename="meta/meta-idle-monitor.h"
IdleMonitorWatchFunc cheader_filename="meta/meta-idle-monitor.h"
InhibitShortcutsDialog cheader_filename="meta/meta-inhibit-shortcuts-dialog.h"
InhibitShortcutsDialogResponse cheader_filename="meta/meta-inhibit-shortcuts-dialog.h"
KeyBinding cheader_filename="meta/keybindings.h"
keybindings_set_custom_handler parent="Meta.KeyBinding" name="set_custom_handler" cheader_filename="meta/keybindings.h"
KeyBindingAction cheader_filename="meta/prefs.h"
KeyBindingFlags cheader_filename="meta/prefs.h"
KeyHandlerFunc cheader_filename="meta/prefs.h"
KeyHandlerFunc.event type="Clutter.KeyEvent"
LaunchContext cheader_filename="meta/meta-launch-context.h"
LaterType cheader_filename="meta/util.h"
LocaleDirection cheader_filename="meta/util.h"
MaximizeFlags cheader_filename="meta/window.h"
ModalOptions cheader_filename="meta/meta-plugin.h"
MonitorManager cheader_filename="meta/meta-monitor-manager.h"
MonitorSwitchConfigType cheader_filename="meta/meta-monitor-manager.h"
MotionDirection cheader_filename="meta/common.h"
PadActionType cheader_filename="meta/display.h"
Plugin cheader_filename="meta/meta-plugin.h"
Plugin.xevent_filter.event type="X.Event" ref
PluginInfo cheader_filename="meta/meta-plugin.h"
PluginVersion cheader_filename="meta/meta-plugin.h"
Preference cheader_filename="meta/prefs.h"
PrefsChangedFunc cheader_filename="meta/prefs.h"
Rectangle cheader_filename="meta/boxes.h" struct
RemoteAccessController cheader_filename="meta/meta-remote-access-controller.h"
RemoteAccessHandle cheader_filename="meta/meta-remote-access-controller.h"
Selection cheader_filename="meta/meta-selection.h"
SelectionSource cheader_filename="meta/meta-selection-source.h"
SelectionSourceMemory cheader_filename="meta/meta-selection-source-memory.h"
SelectionType cheader_filename="meta/meta-selection-source.h"
Settings cheader_filename="meta/meta-settings.h"
Shadow cheader_filename="meta/meta-shadow-factory.h"
ShadowFactory cheader_filename="meta/meta-shadow-factory.h"
ShadowMode cheader_filename="meta/meta-window-actor.h"
ShadowParams cheader_filename="meta/meta-shadow-factory.h"
ShapedTexture cheader_filename="meta/meta-shaped-texture.h"
Side cheader_filename="meta/common.h"
SizeChange cheader_filename="meta/compositor.h"
SoundPlayer cheader_filename="meta/meta-sound-player.h"
StartupNotification cheader_filename="meta/meta-startup-notification.h"
StartupNotification.changed.object type="Meta.StartupSequence"
StartupNotification.get_sequences type_arguments="Meta.StartupSequence"
StartupSequence cheader_filename="meta/meta-startup-notification.h"
StackLayer cheader_filename="meta/common.h"
Stage cheader_filename="meta/meta-stage.h"
Stage.is_focused parent="Meta.Display" symbol_type="method" name="stage_is_focused" instance_idx=0 cheader_filename="meta/compositor-mutter.h"
Strut cheader_filename="meta/boxes.h"
TabList cheader_filename="meta/display.h"
TabShowType cheader_filename="meta/display.h"
Theme cheader_filename="meta/theme.h"
theme_get_default cheader_filename="meta/theme.h"
theme_new cheader_filename="meta/theme.h"
VirtualModifier cheader_filename="meta/common.h"
Workspace cheader_filename="meta/workspace.h"
WorkspaceManager cheader_filename="meta/meta-workspace-manager.h"
Window cheader_filename="meta/window.h"
Window.focus#signal name="focused"
Window.icon type="Cairo.Surface"
Window.mini_icon type="Cairo.Surface"
WindowActor cheader_filename="meta/meta-window-actor.h"
WindowClientType cheader_filename="meta/window.h"
WindowForeachFunc cheader_filename="meta/window.h"
WindowGroup cheader_filename="meta/meta-window-group.h"
WindowMenuType cheader_filename="meta/compositor.h"
WindowShape cheader_filename="meta/meta-window-shape.h"
WindowType cheader_filename="meta/window.h"
X11Display cheader_filename="meta/meta-x11-display.h"
rect skip
prefs_* parent="Meta.Prefs" name="prefs_(.+)" cheader_filename="meta/prefs.h"
g_utf8_strndup skip
preference_to_string cheader_filename="meta/prefs.h"
frame_type_to_string cheader_filename="meta/util.h"
CURRENT_TIME cheader_filename="meta/common.h"
ICON_WIDTH cheader_filename="meta/common.h"
ICON_HEIGHT cheader_filename="meta/common.h"
MINI_ICON_WIDTH cheader_filename="meta/common.h"
MINI_ICON_HEIGHT cheader_filename="meta/common.h"
DEFAULT_ICON_NAME cheader_filename="meta/common.h"
PRIORITY_RESIZE cheader_filename="meta/common.h"
PRIORITY_BEFORE_REDRAW cheader_filename="meta/common.h"
PRIORITY_REDRAW cheader_filename="meta/common.h"
PRIORITY_PREFS_NOTIFY cheader_filename="meta/common.h"
VIRTUAL_CORE_POINTER_ID cheader_filename="meta/common.h"
VIRTUAL_CORE_KEYBOARD_ID cheader_filename="meta/common.h"
MAJOR_VERSION cheader_filename="meta/meta-version.h"
MINOR_VERSION cheader_filename="meta/meta-version.h"
MICRO_VERSION cheader_filename="meta/meta-version.h"
PLUGIN_API_VERSION cheader_filename="meta/meta-version.h"
add_verbose_topic parent="Meta.Util" cheader_filename="meta/util.h"
bug parent="Meta.Util" cheader_filename="meta/util.h"
debug_spew_real parent="Meta.Util" cheader_filename="meta/util.h"
external_binding_name_for_action parent="Meta.Util" cheader_filename="meta/util.h"
fatal parent="Meta.Util" cheader_filename="meta/util.h"
get_locale_direction parent="Meta.Util" cheader_filename="meta/util.h"
gravity_to_string parent="Meta.Util" cheader_filename="meta/util.h"
is_debugging parent="Meta.Util" cheader_filename="meta/util.h"
is_syncing parent="Meta.Util" cheader_filename="meta/util.h"
is_verbose parent="Meta.Util" cheader_filename="meta/util.h"
is_wayland_compositor parent="Meta.Util" cheader_filename="meta/util.h"
later_add parent="Meta.Util" cheader_filename="meta/util.h"
later_remove parent="Meta.Util" cheader_filename="meta/util.h"
pop_no_msg_prefix parent="Meta.Util" cheader_filename="meta/util.h"
push_no_msg_prefix parent="Meta.Util" cheader_filename="meta/util.h"
remove_verbose_topic parent="Meta.Util" cheader_filename="meta/util.h"
show_dialog parent="Meta.Util" cheader_filename="meta/util.h"
show_dialog.columns type_arguments="string" nullable default=null
show_dialog.entries type_arguments="string" nullable default=null
show_dialog.transient_for default=0
show_dialog.icon_name nullable default=null
show_dialog.cancel_text nullable default=null
show_dialog.ok_text nullable default=null
show_dialog.display nullable default=null
show_dialog.timeout nullable default=null
topic_real parent="Meta.Util" cheader_filename="meta/util.h"
unsigned_long_equal parent="Meta.Util" name="ulong_equal" cheader_filename="meta/util.h"
unsigned_long_equal.v1 type="ulong?"
unsigned_long_equal.v2 type="ulong?"
unsigned_long_hash parent="Meta.Util" name="ulong_hash" cheader_filename="meta/util.h"
unsigned_long_hash.v type="ulong?"
verbose_real parent="Meta.Util" cheader_filename="meta/util.h"
warning parent="Meta.Util" cheader_filename="meta/util.h"
set_gnome_wm_keybindings parent="Meta.Util"
set_wm_name parent="Meta.Util"
x11_error_trap_pop parent="Meta.X11Display" symbol_type="method" name="error_trap_pop" instance_idx=0 cheader_filename="meta/meta-x11-errors.h"
x11_error_trap_pop_with_return parent="Meta.X11Display" symbol_type="method" name="error_trap_pop_with_return" instance_idx=0 cheader_filename="meta/meta-x11-errors.h"
x11_error_trap_push parent="Meta.X11Display" symbol_type="method" name="error_trap_push" instance_idx=0 cheader_filename="meta/meta-x11-errors.h"
x11_init_gdk_display parent="Meta.X11Display" cheader_filename="meta/meta-x11-display.h"

View File

@ -1 +0,0 @@
libmutter.deps

View File

@ -1 +0,0 @@
libmutter.vapi

View File

@ -1 +0,0 @@
libmutter-2.deps

View File

@ -1 +0,0 @@
libmutter-2.vapi

View File

@ -1 +0,0 @@
libmutter-3.deps

View File

@ -1 +0,0 @@
libmutter-3.vapi

View File

@ -1 +0,0 @@
libmutter-4.deps

View File

@ -1 +0,0 @@
libmutter-4.vapi

View File

@ -1 +1 @@
libmutter-5.deps
libmutter.deps

View File

@ -1 +1 @@
libmutter-5.vapi
libmutter.vapi

View File

@ -27,10 +27,8 @@ namespace Meta {
public static Meta.ButtonLayout get_button_layout ();
[CCode (cheader_filename = "meta/prefs.h")]
public static bool get_center_new_windows ();
#if HAS_MUTTER336
[CCode (cheader_filename = "meta/prefs.h")]
public static uint get_check_alive_timeout ();
#endif
[CCode (cheader_filename = "meta/prefs.h")]
public static bool get_compositing_manager ();
[CCode (cheader_filename = "meta/prefs.h")]
@ -59,10 +57,6 @@ namespace Meta {
public static bool get_gnome_accessibility ();
[CCode (cheader_filename = "meta/prefs.h")]
public static bool get_gnome_animations ();
#if !HAS_MUTTER332
[CCode (cheader_filename = "meta/prefs.h")]
public static bool get_ignore_request_hide_titlebar ();
#endif
[CCode (cheader_filename = "meta/prefs.h")]
public static Meta.KeyBindingAction get_keybinding_action (string name);
[CCode (cheader_filename = "meta/prefs.h")]
@ -89,24 +83,14 @@ namespace Meta {
public static bool get_workspaces_only_on_primary ();
[CCode (cheader_filename = "meta/prefs.h")]
public static void init ();
#if !HAS_MUTTER330
[CCode (cheader_filename = "meta/prefs.h")]
public static void override_preference_schema (string key, string schema);
#endif
[CCode (cheader_filename = "meta/prefs.h")]
public static void remove_listener (Meta.PrefsChangedFunc func);
[CCode (cheader_filename = "meta/prefs.h")]
public static void set_force_fullscreen (bool whether);
#if !HAS_MUTTER332
[CCode (cheader_filename = "meta/prefs.h")]
public static void set_ignore_request_hide_titlebar (bool whether);
#endif
[CCode (cheader_filename = "meta/prefs.h")]
public static void set_num_workspaces (int n_workspaces);
#if HAS_MUTTER330
[CCode (cheader_filename = "meta/prefs.h")]
public static void set_show_fallback_app_menu (bool whether);
#endif
}
namespace Util {
[CCode (cheader_filename = "meta/util.h", cname = "meta_add_verbose_topic")]
@ -121,10 +105,6 @@ namespace Meta {
public static void fatal (string format, ...);
[CCode (cheader_filename = "meta/util.h", cname = "meta_get_locale_direction")]
public static Meta.LocaleDirection get_locale_direction ();
#if !HAS_MUTTER336
[CCode (cheader_filename = "meta/util.h", cname = "meta_gravity_to_string")]
public static unowned string gravity_to_string (int gravity);
#endif
[CCode (cheader_filename = "meta/util.h", cname = "meta_is_debugging")]
public static bool is_debugging ();
[CCode (cheader_filename = "meta/util.h", cname = "meta_is_syncing")]
@ -167,57 +147,35 @@ namespace Meta {
[CCode (cheader_filename = "meta/meta-backend.h", cname = "meta_get_backend")]
public static unowned Meta.Backend get_backend ();
public unowned Meta.Dnd get_dnd ();
#if HAS_MUTTER330
public unowned Meta.RemoteAccessController get_remote_access_controller ();
#endif
public unowned Meta.Settings get_settings ();
public unowned Clutter.Actor get_stage ();
#if HAS_MUTTER336
public bool is_rendering_hardware_accelerated ();
#endif
public void lock_layout_group (uint idx);
public void set_keymap (string layouts, string variants, string options);
public void set_numlock (bool numlock_state);
public signal void keymap_changed ();
public signal void keymap_layout_group_changed (uint object);
#if HAS_MUTTER336
public signal void last_device_changed (Clutter.InputDevice object);
#else
public signal void last_device_changed (int object);
#endif
#if HAS_MUTTER330
public signal void lid_is_closed_changed (bool object);
#endif
}
[CCode (cheader_filename = "meta/meta-background.h", type_id = "meta_background_get_type ()")]
public class Background : GLib.Object {
[CCode (has_construct_function = false)]
#if HAS_MUTTER330
public Background (Meta.Display display);
#else
public Background (Meta.Screen screen);
#endif
public static void refresh_all ();
public void set_blend (GLib.File file1, GLib.File file2, double blend_factor, GDesktop.BackgroundStyle style);
public void set_color (Clutter.Color color);
public void set_file (GLib.File? file, GDesktop.BackgroundStyle style);
public void set_gradient (GDesktop.BackgroundShading shading_direction, Clutter.Color color, Clutter.Color second_color);
[NoAccessorMethod]
#if HAS_MUTTER330
public Meta.Display meta_display { owned get; construct; }
#else
public Meta.Screen meta_screen { owned get; construct; }
#endif
public signal void changed ();
}
[CCode (cheader_filename = "meta/meta-background-actor.h", type_id = "meta_background_actor_get_type ()")]
public class BackgroundActor : Clutter.Actor, Atk.Implementor, Clutter.Animatable, Clutter.Container, Clutter.Scriptable {
[CCode (has_construct_function = false, type = "ClutterActor*")]
#if HAS_MUTTER330
public BackgroundActor (Meta.Display display, int monitor);
#else
public BackgroundActor (Meta.Screen screen, int monitor);
#endif
#if HAS_MUTTER338
[NoAccessorMethod]
public Meta.Display meta_display { owned get; construct; }
@ -246,11 +204,7 @@ namespace Meta {
[NoAccessorMethod]
public double gradient_max_darkness { get; set; }
[NoAccessorMethod]
#if HAS_MUTTER330
public Meta.Display meta_display { owned get; construct; }
#else
public Meta.Screen meta_screen { owned get; construct; }
#endif
[NoAccessorMethod]
public int monitor { get; construct; }
[NoAccessorMethod]
@ -316,32 +270,17 @@ namespace Meta {
public double x;
public double y;
}
#if HAS_MUTTER334
[CCode (cheader_filename = "meta/compositor.h", type_id = "meta_compositor_get_type ()")]
public abstract class Compositor : GLib.Object {
[CCode (has_construct_function = false)]
protected Compositor ();
#else
[CCode (cheader_filename = "meta/compositor.h", has_type_id = false)]
[Compact]
public class Compositor {
#endif
public void add_window (Meta.Window window);
public void destroy ();
public bool filter_keybinding (Meta.KeyBinding binding);
#if HAS_MUTTER330
public void flash_display (Meta.Display display);
#else
public void flash_screen (Meta.Screen screen);
#endif
public void hide_tile_preview ();
public void hide_window (Meta.Window window, Meta.CompEffect effect);
public void manage ();
#if !HAS_MUTTER334
[CCode (cheader_filename = "meta/compositor.h")]
public static unowned Meta.Compositor @new (Meta.Display display);
public bool process_event ([CCode (type = "XEvent*")] ref X.Event event, Meta.Window window);
#endif
public void queue_frame_drawn (Meta.Window window, bool no_delay_frame);
public void remove_window (Meta.Window window);
public void show_tile_preview (Meta.Window window, Meta.Rectangle tile_rect, int tile_monitor_number);
@ -360,12 +299,8 @@ namespace Meta {
[NoAccessorMethod]
public Meta.Backend backend { owned get; construct; }
#endif
#if HAS_MUTTER334
[NoAccessorMethod]
public Meta.Display display { owned get; construct; }
#else
public void window_surface_changed (Meta.Window window);
#endif
}
[CCode (cheader_filename = "meta/meta-cursor-tracker.h", type_id = "meta_cursor_tracker_get_type ()")]
public class CursorTracker : GLib.Object {
@ -373,9 +308,7 @@ namespace Meta {
protected CursorTracker ();
public void get_hot (out int x, out int y);
public void get_pointer (out int x, out int y, out Clutter.ModifierType mods);
#if HAS_MUTTER334
public bool get_pointer_visible ();
#endif
public unowned Cogl.Texture get_sprite ();
public void set_pointer_visible (bool visible);
#if HAS_MUTTER338
@ -383,114 +316,55 @@ namespace Meta {
public Meta.Backend backend { owned get; construct; }
#endif
public signal void cursor_changed ();
#if HAS_MUTTER332
public signal void cursor_moved (float x, float y);
#endif
#if HAS_MUTTER334
public signal void visibility_changed ();
#endif
}
#if !HAS_MUTTER332
[CCode (cheader_filename = "meta/meta-monitor-manager.h", type_id = "meta_dbus_display_config_skeleton_get_type ()")]
public class DBusDisplayConfigSkeleton : GLib.DBusInterfaceSkeleton, GLib.DBusInterface {
[CCode (has_construct_function = false)]
protected DBusDisplayConfigSkeleton ();
}
#endif
[CCode (cheader_filename = "meta/display.h", type_id = "meta_display_get_type ()")]
public class Display : GLib.Object {
[CCode (has_construct_function = false)]
protected Display ();
public void add_ignored_crossing_serial (ulong serial);
public uint add_keybinding (string name, GLib.Settings settings, Meta.KeyBindingFlags flags, owned Meta.KeyHandlerFunc handler);
#if HAS_MUTTER330
public bool begin_grab_op (Meta.Window window, Meta.GrabOp op, bool pointer_already_grabbed, bool frame_action, int button, ulong modmask, uint32 timestamp, int root_x, int root_y);
#else
public bool begin_grab_op (Meta.Screen screen, Meta.Window window, Meta.GrabOp op, bool pointer_already_grabbed, bool frame_action, int button, ulong modmask, uint32 timestamp, int root_x, int root_y);
#endif
public void clear_mouse_mode ();
#if HAS_MUTTER330
public void close (uint32 timestamp);
[CCode (cheader_filename = "meta/compositor-mutter.h", cname = "meta_disable_unredirect_for_display")]
public void disable_unredirect ();
#if !HAS_MUTTER334
[CCode (cheader_filename = "meta/compositor-mutter.h", cname = "meta_empty_stage_input_region")]
public void empty_stage_input_region ();
#endif
[CCode (cheader_filename = "meta/compositor-mutter.h", cname = "meta_enable_unredirect_for_display")]
public void enable_unredirect ();
#endif
public void end_grab_op (uint32 timestamp);
#if HAS_MUTTER330
public void focus_default_window (uint32 timestamp);
[CCode (cheader_filename = "meta/compositor-mutter.h", cname = "meta_focus_stage_window")]
public void focus_stage_window (uint32 timestamp);
#else
[CCode (cheader_filename = "meta/errors.h", cname = "meta_error_trap_pop")]
public void error_trap_pop ();
[CCode (cheader_filename = "meta/errors.h", cname = "meta_error_trap_pop_with_return")]
public int error_trap_pop_with_return ();
[CCode (cheader_filename = "meta/errors.h", cname = "meta_error_trap_push")]
public void error_trap_push ();
public void focus_the_no_focus_window (Meta.Screen screen, uint32 timestamp);
#endif
public void freeze_keyboard (uint32 timestamp);
public unowned Meta.Compositor get_compositor ();
#if HAS_MUTTER330
public int get_current_monitor ();
#endif
public uint32 get_current_time ();
public uint32 get_current_time_roundtrip ();
#if !HAS_MUTTER330
public int get_damage_event_base ();
#else
[CCode (cname = "meta_cursor_tracker_get_for_display")]
public unowned Meta.CursorTracker get_cursor_tracker ();
[CCode (cheader_filename = "meta/compositor-mutter.h", cname = "meta_get_feedback_group_for_display")]
public unowned Clutter.Actor get_feedback_group ();
#endif
public unowned Meta.Window get_focus_window ();
public Meta.GrabOp get_grab_op ();
public uint get_keybinding_action (uint keycode, ulong mask);
public uint32 get_last_user_time ();
#if HAS_MUTTER330
public Meta.Rectangle get_monitor_geometry (int monitor);
public bool get_monitor_in_fullscreen (int monitor);
public int get_monitor_index_for_rect (Meta.Rectangle rect);
public int get_monitor_neighbor_index (int which_monitor, Meta.DisplayDirection dir);
#if HAS_MUTTER332
public float get_monitor_scale (int monitor);
#endif
public int get_n_monitors ();
#if !HAS_MUTTER334
[CCode (cheader_filename = "meta/compositor-mutter.h", cname = "meta_get_overlay_window")]
public X.Window get_overlay_window ();
#endif
#endif
public string get_pad_action_label (Clutter.InputDevice pad, Meta.PadActionType action_type, uint action_number);
#if HAS_MUTTER330
public int get_primary_monitor ();
#if !HAS_MUTTER334
public unowned Meta.Selection get_selection ();
#endif
public void get_size (out int width, out int height);
#endif
#if HAS_MUTTER332
public unowned Meta.SoundPlayer get_sound_player ();
public unowned Meta.StartupNotification get_startup_notification ();
#endif
[CCode (cheader_filename = "meta/compositor-mutter.h", cname = "meta_get_stage_for_display")]
public unowned Clutter.Actor get_stage ();
#if !HAS_MUTTER332
public unowned GLib.SList<void*> get_startup_sequences ();
#endif
#if !HAS_MUTTER330
public int get_shape_event_base ();
#endif
public unowned Meta.Window get_tab_current (Meta.TabList type, Meta.Workspace workspace);
public GLib.List<weak Meta.Window> get_tab_list (Meta.TabList type, Meta.Workspace? workspace);
public unowned Meta.Window get_tab_next (Meta.TabList type, Meta.Workspace workspace, Meta.Window? window, bool backward);
#if HAS_MUTTER330
[CCode (cheader_filename = "meta/compositor-mutter.h", cname = "meta_get_top_window_group_for_display")]
public unowned Clutter.Actor get_top_window_group ();
[CCode (cheader_filename = "meta/compositor-mutter.h", cname = "meta_get_window_actors")]
@ -499,108 +373,49 @@ namespace Meta {
public unowned Clutter.Actor get_window_group ();
public unowned Meta.WorkspaceManager get_workspace_manager ();
public unowned Meta.X11Display get_x11_display ();
#else
public unowned X.Display get_xdisplay ();
public int get_xinput_opcode ();
#endif
#if HAS_MUTTER332
public uint grab_accelerator (string accelerator, Meta.KeyBindingFlags flags);
#else
public uint grab_accelerator (string accelerator);
#endif
#if !HAS_MUTTER330
public bool has_shape ();
#endif
public bool is_pointer_emulating_sequence (Clutter.EventSequence? sequence);
#if !HAS_MUTTER330
public unowned Meta.Group lookup_group (X.Window group_leader);
#endif
public bool remove_keybinding (string name);
public void request_pad_osd (Clutter.InputDevice pad, bool edition_mode);
#if HAS_MUTTER330
public void set_cursor (Meta.Cursor cursor);
#if HAS_MUTTER334
public void set_input_focus (Meta.Window window, bool focus_frame, uint32 timestamp);
#else
[CCode (cheader_filename = "meta/compositor-mutter.h", cname = "meta_set_stage_input_region")]
public void set_stage_input_region (X.XserverRegion region);
#endif
#else
public void set_input_focus_window (Meta.Window window, bool focus_frame, uint32 timestamp);
#endif
public GLib.SList<weak Meta.Window> sort_windows_by_stacking (GLib.SList<Meta.Window> windows);
#if HAS_MUTTER330
[CCode (cheader_filename = "meta/compositor-mutter.h", cname = "meta_stage_is_focused")]
public bool stage_is_focused ();
#endif
public bool supports_extended_barriers ();
public void unfreeze_keyboard (uint32 timestamp);
public bool ungrab_accelerator (uint action_id);
public void ungrab_keyboard (uint32 timestamp);
#if !HAS_MUTTER330
public void unmanage_screen (Meta.Screen screen, uint32 timestamp);
#endif
#if HAS_MUTTER336
public void unset_input_focus (uint32 timestamp);
#endif
public bool xserver_time_is_before (uint32 time1, uint32 time2);
#if !HAS_MUTTER330
public bool xwindow_is_a_no_focus_window (X.Window xwindow);
#endif
public Meta.Window focus_window { get; }
#if HAS_MUTTER334
public signal void accelerator_activated (uint object, Clutter.InputDevice p0, uint p1);
public signal void closing ();
#else
public signal void accelerator_activated (uint object, uint p0, uint p1);
#endif
#if HAS_MUTTER330
public signal void cursor_updated ();
#endif
public signal void gl_video_memory_purged ();
#if HAS_MUTTER330
public signal void grab_op_begin (Meta.Display object, Meta.Window p0, Meta.GrabOp p1);
public signal void grab_op_end (Meta.Display object, Meta.Window p0, Meta.GrabOp p1);
public signal void in_fullscreen_changed ();
#else
public signal void grab_op_begin (Meta.Screen object, Meta.Window p0, Meta.GrabOp p1);
public signal void grab_op_end (Meta.Screen object, Meta.Window p0, Meta.GrabOp p1);
#endif
#if HAS_MUTTER334
public signal bool init_xserver (GLib.Task object);
#endif
public signal bool modifiers_accelerator_activated ();
public signal void overlay_key ();
public signal void pad_mode_switch (Clutter.InputDevice object, uint p0, uint p1);
#if HAS_MUTTER330
public signal void restacked ();
#endif
public signal bool restart ();
public signal void show_osd (int object, string p0, string p1);
public signal unowned Clutter.Actor? show_pad_osd (Clutter.InputDevice pad, GLib.Settings settings, string layout_path, bool edition_mode, int monitor_idx);
public signal bool show_resize_popup (bool object, Meta.Rectangle p0, int p1, int p2);
public signal bool show_restart_message (string? message);
#if HAS_MUTTER330
public signal void showing_desktop_changed ();
#if !HAS_MUTTER332
public signal void startup_sequence_changed (void* object);
#endif
#endif
public signal void window_created (Meta.Window object);
public signal void window_demands_attention (Meta.Window object);
#if HAS_MUTTER330
public signal void window_entered_monitor (int object, Meta.Window p0);
public signal void window_left_monitor (int object, Meta.Window p0);
#endif
public signal void window_marked_urgent (Meta.Window object);
#if HAS_MUTTER330
public signal void workareas_changed ();
public signal void x11_display_closing ();
public signal void x11_display_opened ();
#endif
#if HAS_MUTTER334
public signal void x11_display_setup ();
#endif
}
[CCode (cheader_filename = "meta/meta-dnd.h", type_id = "meta_dnd_get_type ()")]
public class Dnd : GLib.Object {
@ -630,17 +445,10 @@ namespace Meta {
public uint add_idle_watch (uint64 interval_msec, owned Meta.IdleMonitorWatchFunc? callback);
public uint add_user_active_watch (owned Meta.IdleMonitorWatchFunc? callback);
public static unowned Meta.IdleMonitor get_core ();
#if !HAS_MUTTER336
public static unowned Meta.IdleMonitor get_for_device (int device_id);
#endif
public int64 get_idletime ();
public void remove_watch (uint id);
[NoAccessorMethod]
#if HAS_MUTTER336
public Clutter.InputDevice device { owned get; construct; }
#else
public int device_id { get; construct; }
#endif
}
[CCode (cheader_filename = "meta/keybindings.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "meta_key_binding_get_type ()")]
[Compact]
@ -653,7 +461,6 @@ namespace Meta {
[CCode (cheader_filename = "meta/keybindings.h", cname = "meta_keybindings_set_custom_handler")]
public static bool set_custom_handler (string name, owned Meta.KeyHandlerFunc? handler);
}
#if HAS_MUTTER332
[CCode (cheader_filename = "meta/meta-launch-context.h", type_id = "meta_launch_context_get_type ()")]
public class LaunchContext : GLib.AppLaunchContext {
[CCode (has_construct_function = false)]
@ -667,13 +474,8 @@ namespace Meta {
[NoAccessorMethod]
public Meta.Workspace workspace { owned get; set; }
}
#endif
[CCode (cheader_filename = "meta/meta-monitor-manager.h", type_id = "meta_monitor_manager_get_type ()")]
#if HAS_MUTTER332
public class MonitorManager : GLib.Object {
#else
public abstract class MonitorManager : Meta.DBusDisplayConfigSkeleton, GLib.DBusInterface {
#endif
[CCode (has_construct_function = false)]
protected MonitorManager ();
public bool can_switch_config ();
@ -692,13 +494,9 @@ namespace Meta {
public bool panel_orientation_managed { get; }
#endif
public signal void confirm_display_change ();
#if HAS_MUTTER332
public signal void monitors_changed ();
#endif
public signal void monitors_changed_internal ();
#if HAS_MUTTER332
public signal void power_save_mode_changed ();
#endif
}
[CCode (cheader_filename = "meta/meta-plugin.h", type_id = "meta_plugin_get_type ()")]
public abstract class Plugin : GLib.Object {
@ -717,11 +515,7 @@ namespace Meta {
public void destroy_completed (Meta.WindowActor actor);
public void end_modal (uint32 timestamp);
public unowned Meta.PluginInfo? get_info ();
#if HAS_MUTTER330
public unowned Meta.Display get_display ();
#else
public unowned Meta.Screen get_screen ();
#endif
[NoWrapper]
public virtual void hide_tile_preview ();
[NoWrapper]
@ -730,10 +524,8 @@ namespace Meta {
public virtual void kill_switch_workspace ();
[NoWrapper]
public virtual void kill_window_effects (Meta.WindowActor actor);
#if HAS_MUTTER334
[NoWrapper]
public virtual void locate_pointer ();
#endif
public static void manager_set_plugin_type (GLib.Type gtype);
[NoWrapper]
public virtual void map (Meta.WindowActor actor);
@ -765,7 +557,6 @@ namespace Meta {
[NoWrapper]
public virtual bool xevent_filter ([CCode (type = "XEvent*")] ref X.Event event);
}
#if HAS_MUTTER330
[CCode (cheader_filename = "meta/meta-remote-access-controller.h", type_id = "meta_remote_access_controller_get_type ()")]
public class RemoteAccessController : GLib.Object {
[CCode (has_construct_function = false)]
@ -780,9 +571,7 @@ namespace Meta {
public class RemoteAccessHandle : GLib.Object {
[CCode (has_construct_function = false)]
protected RemoteAccessHandle ();
#if HAS_MUTTER336
public bool get_disable_animations ();
#endif
public virtual void stop ();
#if HAS_MUTTER338
[NoAccessorMethod]
@ -790,76 +579,6 @@ namespace Meta {
#endif
public signal void stopped ();
}
#else
[CCode (cheader_filename = "meta/screen.h", type_id = "meta_screen_get_type ()")]
public class Screen : GLib.Object {
[CCode (has_construct_function = false)]
protected Screen ();
public unowned Meta.Workspace append_new_workspace (bool activate, uint32 timestamp);
[CCode (cheader_filename = "meta/compositor-mutter.h", cname = "meta_disable_unredirect_for_screen")]
public void disable_unredirect ();
[CCode (cheader_filename = "meta/compositor-mutter.h", cname = "meta_empty_stage_input_region")]
public void empty_stage_input_region ();
[CCode (cheader_filename = "meta/compositor-mutter.h", cname = "meta_enable_unredirect_for_screen")]
public void enable_unredirect ();
public void focus_default_window (uint32 timestamp);
[CCode (cheader_filename = "meta/compositor-mutter.h", cname = "meta_focus_stage_window")]
public void focus_stage_window (uint32 timestamp);
public unowned Meta.Workspace get_active_workspace ();
public int get_active_workspace_index ();
public int get_current_monitor ();
[CCode (cname = "meta_cursor_tracker_get_for_screen")]
public unowned Meta.CursorTracker get_cursor_tracker ();
public unowned Meta.Display get_display ();
[CCode (cheader_filename = "meta/compositor-mutter.h", cname = "meta_get_feedback_group_for_screen")]
public unowned Clutter.Actor get_feedback_group ();
public Meta.Rectangle get_monitor_geometry (int monitor);
public bool get_monitor_in_fullscreen (int monitor);
public int get_monitor_index_for_rect (Meta.Rectangle rect);
public int get_monitor_neighbor_index (int which_monitor, Meta.ScreenDirection dir);
public int get_n_monitors ();
public int get_n_workspaces ();
[CCode (cheader_filename = "meta/compositor-mutter.h", cname = "meta_get_overlay_window")]
public X.Window get_overlay_window ();
public int get_primary_monitor ();
public int get_screen_number ();
public void get_size (out int width, out int height);
[CCode (cheader_filename = "meta/compositor-mutter.h", cname = "meta_get_stage_for_screen")]
public unowned Clutter.Actor get_stage ();
public unowned GLib.SList<void*> get_startup_sequences ();
[CCode (cheader_filename = "meta/compositor-mutter.h", cname = "meta_get_top_window_group_for_screen")]
public unowned Clutter.Actor get_top_window_group ();
[CCode (cheader_filename = "meta/compositor-mutter.h", cname = "meta_get_window_actors")]
public unowned GLib.List<Meta.WindowActor> get_window_actors ();
[CCode (cheader_filename = "meta/compositor-mutter.h", cname = "meta_get_window_group_for_screen")]
public unowned Clutter.Actor get_window_group ();
public unowned Meta.Workspace? get_workspace_by_index (int index);
public unowned GLib.List<Meta.Workspace> get_workspaces ();
public X.Window get_xroot ();
public void override_workspace_layout (Meta.ScreenCorner starting_corner, bool vertical_layout, int n_rows, int n_columns);
public void remove_workspace (Meta.Workspace workspace, uint32 timestamp);
public void reorder_workspace (Meta.Workspace workspace, int new_index);
public void set_cm_selection ();
public void set_cursor (Meta.Cursor cursor);
[CCode (cheader_filename = "meta/compositor-mutter.h", cname = "meta_set_stage_input_region")]
public void set_stage_input_region (X.XserverRegion region);
[CCode (cheader_filename = "meta/compositor-mutter.h", cname = "meta_stage_is_focused")]
public bool stage_is_focused ();
public int n_workspaces { get; }
public signal void in_fullscreen_changed ();
public signal void monitors_changed ();
public signal void restacked ();
public signal void startup_sequence_changed (void* object);
public signal void window_entered_monitor (int object, Meta.Window p0);
public signal void window_left_monitor (int object, Meta.Window p0);
public signal void workareas_changed ();
public signal void workspace_added (int object);
public signal void workspace_removed (int object);
public signal void workspace_switched (int object, int p0, Meta.MotionDirection p1);
public signal void workspaces_reordered ();
}
#endif
#if HAS_MUTTER334
[CCode (cheader_filename = "meta/meta-selection.h", type_id = "meta_selection_get_type ()")]
public class Selection : GLib.Object {
[CCode (has_construct_function = false)]
@ -885,7 +604,6 @@ namespace Meta {
[CCode (has_construct_function = false, type = "MetaSelectionSource*")]
public SelectionSourceMemory (string mimetype, GLib.Bytes content);
}
#endif
[CCode (cheader_filename = "meta/meta-settings.h", has_type_id = false)]
[Compact]
public class Settings {
@ -896,11 +614,7 @@ namespace Meta {
[Compact]
public class Shadow {
public void get_bounds (int window_x, int window_y, int window_width, int window_height, Cairo.RectangleInt bounds);
#if HAS_MUTTER332
public void paint (Cogl.Framebuffer framebuffer, int window_x, int window_y, int window_width, int window_height, uint8 opacity, Cairo.Region? clip, bool clip_strictly);
#else
public void paint (int window_x, int window_y, int window_width, int window_height, uint8 opacity, Cairo.Region? clip, bool clip_strictly);
#endif
public Meta.Shadow @ref ();
public void unref ();
}
@ -915,11 +629,7 @@ namespace Meta {
public signal void changed ();
}
[CCode (cheader_filename = "meta/meta-shaped-texture.h", type_id = "meta_shaped_texture_get_type ()")]
#if HAS_MUTTER334
public class ShapedTexture : GLib.Object, Clutter.Content {
#else
public class ShapedTexture : Clutter.Actor, Atk.Implementor, Clutter.Animatable, Clutter.Container, Clutter.Scriptable {
#endif
[CCode (has_construct_function = false)]
protected ShapedTexture ();
public Cairo.Surface? get_image (Cairo.RectangleInt? clip);
@ -927,12 +637,8 @@ namespace Meta {
public void set_create_mipmaps (bool create_mipmaps);
public void set_mask_texture (Cogl.Texture mask_texture);
public void set_opaque_region (owned Cairo.Region opaque_region);
#if !HAS_MUTTER334
public bool update_area (int x, int y, int width, int height);
#endif
public signal void size_changed ();
}
#if HAS_MUTTER332
[CCode (cheader_filename = "meta/meta-sound-player.h", type_id = "meta_sound_player_get_type ()")]
public class SoundPlayer : GLib.Object {
[CCode (has_construct_function = false)]
@ -940,16 +646,12 @@ namespace Meta {
public void play_from_file (GLib.File file, string description, GLib.Cancellable? cancellable = null);
public void play_from_theme (string name, string description, GLib.Cancellable? cancellable = null);
}
#endif
[CCode (cheader_filename = "meta/meta-stage.h", type_id = "meta_stage_get_type ()")]
public class Stage : Clutter.Stage, Atk.Implementor, Clutter.Animatable, Clutter.Container, Clutter.Scriptable {
[CCode (has_construct_function = false)]
protected Stage ();
#if HAS_MUTTER332
public signal void actors_painted ();
#endif
}
#if HAS_MUTTER332
[CCode (cheader_filename = "meta/meta-startup-notification.h", type_id = "meta_startup_notification_get_type ()")]
public class StartupNotification : GLib.Object {
[CCode (has_construct_function = false)]
@ -982,7 +684,6 @@ namespace Meta {
[HasEmitter]
public signal void complete ();
}
#endif
[CCode (cheader_filename = "meta/theme.h", has_type_id = false)]
[Compact]
public class Theme {
@ -1030,9 +731,7 @@ namespace Meta {
public Meta.Rectangle frame_rect_to_client_rect (Meta.Rectangle frame_rect);
public Meta.Rectangle get_buffer_rect ();
public unowned string get_client_machine ();
#if HAS_MUTTER332
public Meta.WindowClientType get_client_type ();
#endif
public unowned GLib.Object get_compositor_private ();
public unowned string get_description ();
public unowned Meta.Display get_display ();
@ -1049,9 +748,7 @@ namespace Meta {
public unowned string get_gtk_unique_bus_name ();
public unowned string get_gtk_window_object_path ();
public bool get_icon_geometry (out Meta.Rectangle rect);
#if HAS_MUTTER332
public uint64 get_id ();
#endif
public Meta.StackLayer get_layer ();
public Meta.MaximizeFlags get_maximized ();
public int get_monitor ();
@ -1059,9 +756,6 @@ namespace Meta {
public int get_pid ();
public unowned string get_role ();
public unowned string get_sandboxed_app_id ();
#if !HAS_MUTTER330
public unowned Meta.Screen get_screen ();
#endif
public uint get_stable_sequence ();
public unowned string get_startup_id ();
public unowned Meta.Window? get_tile_match ();
@ -1165,45 +859,27 @@ namespace Meta {
public string wm_class { get; }
[CCode (cname = "focus")]
public signal void focused ();
#if HAS_MUTTER334 && !HAS_MUTTER338
#if !HAS_MUTTER338
public signal void monitor_changed (int old_monitor);
#endif
public signal void position_changed ();
public signal void raised ();
#if HAS_MUTTER330
public signal void shown ();
#endif
public signal void size_changed ();
public signal void unmanaged ();
#if HAS_MUTTER336
public signal void unmanaging ();
#endif
public signal void workspace_changed ();
}
[CCode (cheader_filename = "meta/meta-window-actor.h", type_id = "meta_window_actor_get_type ()")]
#if HAS_MUTTER332
public abstract class WindowActor : Clutter.Actor, Atk.Implementor, Clutter.Animatable, Clutter.Container, Clutter.Scriptable {
#else
public class WindowActor : Clutter.Actor, Atk.Implementor, Clutter.Animatable, Clutter.Container, Clutter.Scriptable {
#endif
[CCode (has_construct_function = false)]
protected WindowActor ();
#if HAS_MUTTER338
public void freeze ();
#endif
#if HAS_MUTTER334
public Cairo.Surface? get_image (Cairo.RectangleInt? clip);
#endif
public unowned Meta.Window get_meta_window ();
#if !HAS_MUTTER334
public unowned Clutter.Actor get_texture ();
#endif
#if !HAS_MUTTER332
public X.Window get_x_window ();
#endif
#if HAS_MUTTER334
public unowned Meta.ShapedTexture get_texture ();
#endif
public bool is_destroyed ();
public void sync_visibility ();
#if HAS_MUTTER338
@ -1216,16 +892,10 @@ namespace Meta {
[NoAccessorMethod]
public Meta.ShadowMode shadow_mode { get; set; }
#endif
#if HAS_MUTTER334
public signal void damaged ();
#endif
#if HAS_MUTTER330
public signal void effects_completed ();
#endif
public signal void first_frame ();
#if HAS_MUTTER336
public signal void thawed ();
#endif
}
[CCode (cheader_filename = "meta/meta-window-group.h", type_id = "meta_window_group_get_type ()")]
public class WindowGroup : Clutter.Actor, Atk.Implementor, Clutter.Animatable, Clutter.Container, Clutter.Scriptable {
@ -1251,11 +921,7 @@ namespace Meta {
public void activate (uint32 timestamp);
public void activate_with_focus (Meta.Window focus_this, uint32 timestamp);
public unowned Meta.Workspace get_neighbor (Meta.MotionDirection direction);
#if HAS_MUTTER330
public unowned Meta.Display get_display ();
#else
public unowned Meta.Screen get_screen ();
#endif
public Meta.Rectangle get_work_area_all_monitors ();
public Meta.Rectangle get_work_area_for_monitor (int which_monitor);
public int index ();
@ -1272,7 +938,6 @@ namespace Meta {
public signal void window_added (Meta.Window object);
public signal void window_removed (Meta.Window object);
}
#if HAS_MUTTER330
[CCode (cheader_filename = "meta/meta-workspace-manager.h", type_id = "meta_workspace_manager_get_type ()")]
public class WorkspaceManager : GLib.Object {
[CCode (has_construct_function = false)]
@ -1285,39 +950,30 @@ namespace Meta {
public unowned GLib.List<Meta.Workspace> get_workspaces ();
public void override_workspace_layout (Meta.DisplayCorner starting_corner, bool vertical_layout, int n_rows, int n_columns);
public void remove_workspace (Meta.Workspace workspace, uint32 timestamp);
#if HAS_MUTTER334
public void reorder_workspace (Meta.Workspace workspace, int new_index);
[NoAccessorMethod]
public int layout_columns { get; }
[NoAccessorMethod]
public int layout_rows { get; }
#endif
public int n_workspaces { get; }
public signal void active_workspace_changed ();
public signal void showing_desktop_changed ();
public signal void workspace_added (int object);
public signal void workspace_removed (int object);
public signal void workspace_switched (int object, int p0, Meta.MotionDirection p1);
#if HAS_MUTTER334
public signal void workspaces_reordered ();
#endif
}
[CCode (cheader_filename = "meta/meta-x11-display.h", type_id = "meta_x11_display_get_type ()")]
public class X11Display : GLib.Object {
[CCode (has_construct_function = false)]
protected X11Display ();
#if HAS_MUTTER334
public void clear_stage_input_region ();
#endif
[CCode (cheader_filename = "meta/meta-x11-errors.h", cname = "meta_x11_error_trap_pop")]
public void error_trap_pop ();
[CCode (cheader_filename = "meta/meta-x11-errors.h", cname = "meta_x11_error_trap_pop_with_return")]
public int error_trap_pop_with_return ();
[CCode (cheader_filename = "meta/meta-x11-errors.h", cname = "meta_x11_error_trap_push")]
public void error_trap_push ();
#if !HAS_MUTTER334
public void focus_the_no_focus_window (uint32 timestamp);
#endif
public int get_damage_event_base ();
public int get_screen_number ();
public int get_shape_event_base ();
@ -1327,16 +983,11 @@ namespace Meta {
public bool has_shape ();
public unowned Meta.Group lookup_group (X.Window group_leader);
public void set_cm_selection ();
#if !HAS_MUTTER334
public void set_input_focus_window (Meta.Window window, bool focus_frame, uint32 timestamp);
#else
public void set_stage_input_region (X.XserverRegion region);
#endif
[CCode (cheader_filename = "meta/meta-x11-display.h", cname = "meta_x11_init_gdk_display")]
public static bool x11_init_gdk_display () throws GLib.Error;
public bool xwindow_is_a_no_focus_window (X.Window xwindow);
}
#endif
[CCode (cheader_filename = "meta/meta-close-dialog.h", type_cname = "MetaCloseDialogInterface", type_id = "meta_close_dialog_get_type ()")]
public interface CloseDialog : GLib.Object {
public abstract void focus ();
@ -1359,7 +1010,6 @@ namespace Meta {
}
[CCode (cheader_filename = "meta/common.h", has_type_id = false)]
public struct ButtonLayout {
#if HAS_MUTTER332
[CCode (array_length = false)]
public weak Meta.ButtonFunction left_buttons[4];
[CCode (array_length = false)]
@ -1368,16 +1018,6 @@ namespace Meta {
public weak Meta.ButtonFunction right_buttons[4];
[CCode (array_length = false)]
public weak bool right_buttons_has_spacer[4];
#else
[CCode (array_length = false)]
public weak Meta.ButtonFunction left_buttons[5];
[CCode (array_length = false)]
public weak bool left_buttons_has_spacer[5];
[CCode (array_length = false)]
public weak Meta.ButtonFunction right_buttons[5];
[CCode (array_length = false)]
public weak bool right_buttons_has_spacer[5];
#endif
}
[CCode (cheader_filename = "meta/boxes.h", has_type_id = false)]
public struct Edge {
@ -1452,9 +1092,6 @@ namespace Meta {
MINIMIZE,
MAXIMIZE,
CLOSE,
#if !HAS_MUTTER332
APPMENU,
#endif
LAST
}
[CCode (cheader_filename = "meta/meta-close-dialog.h", cprefix = "META_CLOSE_DIALOG_RESPONSE_", type_id = "meta_close_dialog_response_get_type ()")]
@ -1545,7 +1182,6 @@ namespace Meta {
HORIZONTAL,
VERTICAL
}
#if HAS_MUTTER330
[CCode (cheader_filename = "meta/display.h", cprefix = "META_DISPLAY_", type_id = "meta_display_corner_get_type ()")]
public enum DisplayCorner {
TOPLEFT,
@ -1560,7 +1196,6 @@ namespace Meta {
LEFT,
RIGHT
}
#endif
[CCode (cheader_filename = "meta/boxes.h", cprefix = "META_EDGE_", type_id = "meta_edge_type_get_type ()")]
public enum EdgeType {
WINDOW,
@ -1577,9 +1212,6 @@ namespace Meta {
public enum FrameFlags {
ALLOWS_DELETE,
ALLOWS_MENU,
#if !HAS_MUTTER332
ALLOWS_APPMENU,
#endif
ALLOWS_MINIMIZE,
ALLOWS_MAXIMIZE,
ALLOWS_VERTICAL_RESIZE,
@ -1591,9 +1223,6 @@ namespace Meta {
ALLOWS_SHADE,
ALLOWS_MOVE,
FULLSCREEN,
#if !HAS_MUTTER332
IS_FLASHING,
#endif
ABOVE,
TILED_LEFT,
TILED_RIGHT
@ -1638,7 +1267,6 @@ namespace Meta {
KEYBOARD_RESIZING_SE,
KEYBOARD_RESIZING_W
}
#if HAS_MUTTER336
[CCode (cheader_filename = "meta/main.h", cprefix = "META_GRAVITY_", type_id = "meta_gravity_get_type ()")]
public enum Gravity {
NONE,
@ -1655,7 +1283,6 @@ namespace Meta {
[CCode (cheader_filename = "meta/util.h")]
public unowned string to_string ();
}
#endif
[CCode (cheader_filename = "meta/meta-inhibit-shortcuts-dialog.h", cprefix = "META_INHIBIT_SHORTCUTS_DIALOG_RESPONSE_", type_id = "meta_inhibit_shortcuts_dialog_response_get_type ()")]
public enum InhibitShortcutsDialogResponse {
ALLOW,
@ -1750,9 +1377,7 @@ namespace Meta {
MOVE_TO_SIDE_W,
MOVE_TO_CENTER,
OVERLAY_KEY,
#if HAS_MUTTER334
LOCATE_POINTER_KEY,
#endif
ISO_NEXT_GROUP,
ALWAYS_ON_TOP,
SWITCH_MONITOR,
@ -1765,12 +1390,8 @@ namespace Meta {
NONE,
PER_WINDOW,
BUILTIN,
#if HAS_MUTTER330
IGNORE_AUTOREPEAT,
#endif
#if HAS_MUTTER334
NO_AUTO_GRAB,
#endif
IS_REVERSED,
NON_MASKABLE
}
@ -1860,33 +1481,12 @@ namespace Meta {
DRAGGABLE_BORDER_WIDTH,
AUTO_MAXIMIZE,
CENTER_NEW_WINDOWS,
#if HAS_MUTTER334
LOCATE_POINTER,
#endif
#if HAS_MUTTER336
CHECK_ALIVE_TIMEOUT,
#endif
DRAG_THRESHOLD;
[CCode (cheader_filename = "meta/prefs.h")]
public unowned string to_string ();
}
#if !HAS_MUTTER330
[CCode (cheader_filename = "meta/screen.h", cprefix = "META_SCREEN_", type_id = "meta_screen_corner_get_type ()")]
public enum ScreenCorner {
TOPLEFT,
TOPRIGHT,
BOTTOMLEFT,
BOTTOMRIGHT
}
[CCode (cheader_filename = "meta/screen.h", cprefix = "META_SCREEN_", type_id = "meta_screen_direction_get_type ()")]
public enum ScreenDirection {
UP,
DOWN,
LEFT,
RIGHT
}
#endif
#if HAS_MUTTER334
[CCode (cheader_filename = "meta/meta-selection-source.h", cprefix = "META_", type_id = "meta_selection_type_get_type ()")]
public enum SelectionType {
SELECTION_PRIMARY,
@ -1894,7 +1494,6 @@ namespace Meta {
SELECTION_DND,
N_SELECTION_TYPES
}
#endif
[CCode (cheader_filename = "meta/meta-window-actor.h", cprefix = "META_SHADOW_MODE_", type_id = "meta_shadow_mode_get_type ()")]
public enum ShadowMode {
AUTO,
@ -1982,21 +1581,14 @@ namespace Meta {
}
[CCode (cheader_filename = "meta/meta-idle-monitor.h", instance_pos = 2.9)]
public delegate void IdleMonitorWatchFunc (Meta.IdleMonitor monitor, uint watch_id);
#if HAS_MUTTER330
[CCode (cheader_filename = "meta/prefs.h", instance_pos = 4.9)]
public delegate void KeyHandlerFunc (Meta.Display display, Meta.Window? window, Clutter.KeyEvent? event, Meta.KeyBinding binding);
#else
[CCode (cheader_filename = "meta/prefs.h", instance_pos = 5.9)]
public delegate void KeyHandlerFunc (Meta.Display display, Meta.Screen screen, Meta.Window? window, Clutter.KeyEvent? event, Meta.KeyBinding binding);
#endif
[CCode (cheader_filename = "meta/prefs.h", instance_pos = 1.9)]
public delegate void PrefsChangedFunc (Meta.Preference pref);
[CCode (cheader_filename = "meta/window.h", instance_pos = 1.9)]
public delegate bool WindowForeachFunc (Meta.Window window);
#if HAS_MUTTER330
[CCode (cheader_filename = "meta/common.h", cname = "META_CURRENT_TIME")]
public const int CURRENT_TIME;
#endif
[CCode (cheader_filename = "meta/common.h", cname = "META_DEFAULT_ICON_NAME")]
public const string DEFAULT_ICON_NAME;
[CCode (cheader_filename = "meta/common.h", cname = "META_ICON_HEIGHT")]
@ -2065,8 +1657,6 @@ namespace Meta {
public static void restart (string? message);
[CCode (cheader_filename = "meta/main.h")]
public static int run ();
#if HAS_MUTTER334
[CCode (cheader_filename = "meta/main.h")]
public static void test_init ();
#endif
}

View File

@ -6,262 +6,6 @@ vapigen_args = [
'--vapidir=@0@'.format(meson.current_source_dir()),
]
if mutter328_dep.found()
cogl_target = custom_target('mutter-cogl-2',
command: [
vapigen,
mutter_typelib_dir / 'Cogl-2.gir',
'--library=mutter-cogl-2',
'--pkg=gobject-2.0',
vapigen_args,
files('Cogl-2-custom.vala')
],
output: 'mutter-cogl-2.vapi'
)
cogl_pango_target = custom_target('mutter-cogl-pango-2',
command: [
vapigen,
mutter_typelib_dir / 'CoglPango-2.gir',
'--library=mutter-cogl-pango-2',
'--pkg=mutter-cogl-2',
'--pkg=pangocairo',
vapigen_args
],
depends: cogl_target,
output: 'mutter-cogl-pango-2.vapi'
)
clutter_target = custom_target('mutter-clutter-2',
command: [
vapigen,
mutter_typelib_dir / 'Clutter-2.gir',
'--library=mutter-clutter-2',
'--pkg=mutter-cogl-2',
'--pkg=mutter-cogl-pango-2',
'--pkg=atk',
'--pkg=gio-2.0',
'--pkg=json-glib-1.0',
'--pkg=pangocairo',
vapigen_args,
files('Clutter-2-custom.vala')
],
depends: [ cogl_target, cogl_pango_target ],
output: 'mutter-clutter-2.vapi'
)
libmutter_target = custom_target('libmutter-2',
command: [
vapigen,
mutter_typelib_dir / 'Meta-2.gir',
'--library=libmutter-2',
'--pkg=mutter-cogl-2',
'--pkg=mutter-cogl-pango-2',
'--pkg=mutter-clutter-2',
'--pkg=atk',
'--pkg=gio-2.0',
'--pkg=json-glib-1.0',
'--pkg=pangocairo',
'--pkg=gtk+-3.0',
'--pkg=x11',
vapigen_args
],
depends: [ cogl_target, cogl_pango_target, clutter_target ],
output: 'libmutter-2.vapi'
)
endif
if mutter330_dep.found()
cogl_target = custom_target('mutter-cogl-3',
command: [
vapigen,
mutter_typelib_dir / 'Cogl-3.gir',
'--library=mutter-cogl-3',
'--pkg=gobject-2.0',
vapigen_args,
files('Cogl-3-custom.vala')
],
output: 'mutter-cogl-3.vapi'
)
cogl_pango_target = custom_target('mutter-cogl-pango-3',
command: [
vapigen,
mutter_typelib_dir / 'CoglPango-3.gir',
'--library=mutter-cogl-pango-3',
'--pkg=mutter-cogl-3',
'--pkg=pangocairo',
vapigen_args
],
depends: cogl_target,
output: 'mutter-cogl-pango-3.vapi'
)
clutter_target = custom_target('mutter-clutter-3',
command: [
vapigen,
mutter_typelib_dir / 'Clutter-3.gir',
'--library=mutter-clutter-3',
'--pkg=mutter-cogl-3',
'--pkg=mutter-cogl-pango-3',
'--pkg=atk',
'--pkg=gio-2.0',
'--pkg=json-glib-1.0',
'--pkg=pangocairo',
vapigen_args,
files('Clutter-3-custom.vala')
],
depends: [ cogl_target, cogl_pango_target ],
output: 'mutter-clutter-3.vapi'
)
libmutter_target = custom_target('libmutter-3',
command: [
vapigen,
mutter_typelib_dir / 'Meta-3.gir',
'--library=libmutter-3',
'--pkg=mutter-cogl-3',
'--pkg=mutter-cogl-pango-3',
'--pkg=mutter-clutter-3',
'--pkg=atk',
'--pkg=gio-2.0',
'--pkg=json-glib-1.0',
'--pkg=pangocairo',
'--pkg=gtk+-3.0',
'--pkg=x11',
vapigen_args
],
depends: [ cogl_target, cogl_pango_target, clutter_target ],
output: 'libmutter-3.vapi'
)
endif
if mutter332_dep.found()
cogl_target = custom_target('mutter-cogl-4',
command: [
vapigen,
mutter_typelib_dir / 'Cogl-4.gir',
'--library=mutter-cogl-4',
'--pkg=gobject-2.0',
vapigen_args,
files('Cogl-4-custom.vala')
],
output: 'mutter-cogl-4.vapi'
)
cogl_pango_target = custom_target('mutter-cogl-pango-4',
command: [
vapigen,
mutter_typelib_dir / 'CoglPango-4.gir',
'--library=mutter-cogl-pango-4',
'--pkg=mutter-cogl-4',
'--pkg=pangocairo',
vapigen_args
],
depends: cogl_target,
output: 'mutter-cogl-pango-4.vapi'
)
clutter_target = custom_target('mutter-clutter-4',
command: [
vapigen,
mutter_typelib_dir / 'Clutter-4.gir',
'--library=mutter-clutter-4',
'--pkg=mutter-cogl-4',
'--pkg=mutter-cogl-pango-4',
'--pkg=atk',
'--pkg=gio-2.0',
'--pkg=json-glib-1.0',
'--pkg=pangocairo',
vapigen_args,
files('Clutter-4-custom.vala')
],
depends: [ cogl_target, cogl_pango_target ],
output: 'mutter-clutter-4.vapi'
)
libmutter_target = custom_target('libmutter-4',
command: [
vapigen,
mutter_typelib_dir / 'Meta-4.gir',
'--library=libmutter-4',
'--pkg=mutter-cogl-4',
'--pkg=mutter-cogl-pango-4',
'--pkg=mutter-clutter-4',
'--pkg=atk',
'--pkg=gio-2.0',
'--pkg=json-glib-1.0',
'--pkg=pangocairo',
'--pkg=gtk+-3.0',
'--pkg=x11',
vapigen_args
],
depends: [ cogl_target, cogl_pango_target, clutter_target ],
output: 'libmutter-4.vapi'
)
endif
if mutter334_dep.found()
cogl_target = custom_target('mutter-cogl-5',
command: [
vapigen,
mutter_typelib_dir / 'Cogl-5.gir',
'--library=mutter-cogl-5',
'--pkg=gobject-2.0',
vapigen_args,
files('Cogl-5-custom.vala')
],
output: 'mutter-cogl-5.vapi'
)
cogl_pango_target = custom_target('mutter-cogl-pango-5',
command: [
vapigen,
mutter_typelib_dir / 'CoglPango-5.gir',
'--library=mutter-cogl-pango-5',
'--pkg=mutter-cogl-5',
'--pkg=pangocairo',
vapigen_args
],
depends: cogl_target,
output: 'mutter-cogl-pango-5.vapi'
)
clutter_target = custom_target('mutter-clutter-5',
command: [
vapigen,
mutter_typelib_dir / 'Clutter-5.gir',
'--library=mutter-clutter-5',
'--pkg=mutter-cogl-5',
'--pkg=mutter-cogl-pango-5',
'--pkg=atk',
'--pkg=gio-2.0',
'--pkg=json-glib-1.0',
'--pkg=pangocairo',
vapigen_args,
files('Clutter-5-custom.vala')
],
depends: [ cogl_target, cogl_pango_target ],
output: 'mutter-clutter-5.vapi'
)
libmutter_target = custom_target('libmutter-5',
command: [
vapigen,
mutter_typelib_dir / 'Meta-5.gir',
'--library=libmutter-5',
'--pkg=mutter-cogl-5',
'--pkg=mutter-cogl-pango-5',
'--pkg=mutter-clutter-5',
'--pkg=atk',
'--pkg=gio-2.0',
'--pkg=json-glib-1.0',
'--pkg=pangocairo',
'--pkg=gtk+-3.0',
'--pkg=x11',
vapigen_args
],
depends: [ cogl_target, cogl_pango_target, clutter_target ],
output: 'libmutter-5.vapi'
)
endif
if mutter336_dep.found()
cogl_target = custom_target('mutter-cogl-6',
command: [

View File

@ -1,5 +0,0 @@
atk
cairo
pango
json-glib-1.0
mutter-cogl-2

View File

@ -1 +0,0 @@
mutter-clutter.vapi

View File

@ -1,5 +0,0 @@
atk
cairo
pango
json-glib-1.0
mutter-cogl-3

View File

@ -1 +0,0 @@
mutter-clutter-2.vapi

View File

@ -1,5 +0,0 @@
atk
cairo
pango
json-glib-1.0
mutter-cogl-4

View File

@ -1 +0,0 @@
mutter-clutter-3.vapi

View File

@ -1,5 +0,0 @@
atk
cairo
pango
json-glib-1.0
mutter-cogl-5

View File

@ -1 +0,0 @@
mutter-clutter-4.vapi

View File

@ -1 +1 @@
mutter-clutter-5.vapi
mutter-clutter.vapi

File diff suppressed because it is too large Load Diff

View File

@ -1 +0,0 @@
pango

View File

@ -1 +0,0 @@
mutter-cogl.vapi

View File

@ -1 +0,0 @@
mutter-cogl-2.deps

View File

@ -1 +0,0 @@
mutter-cogl-2.vapi

View File

@ -1 +0,0 @@
mutter-cogl-3.deps

View File

@ -1 +0,0 @@
mutter-cogl-3.vapi

View File

@ -1 +0,0 @@
mutter-cogl-4.deps

View File

@ -1 +0,0 @@
mutter-cogl-4.vapi

Some files were not shown because too many files have changed in this diff Show More