1616//
1717
1818namespace Gala {
19+ namespace ActionKeys {
20+ public const string INTERACTIVE_SCREENSHOT_ACTION = " interactive-screenshot-action" ;
21+ public const string OVERLAY_ACTION = " overlay-action" ;
22+ public const string PANEL_MAIN_MENU_ACTION = " panel-main-menu-action" ;
23+ public const string TOGGLE_RECORDING_ACTION = " toggle-recording-action" ;
24+ }
25+
1926 public enum ActionType {
2027 NONE = 0 ,
21- SHOW_WORKSPACE_VIEW ,
28+ SHOW_MULTITASKING_VIEW ,
2229 MAXIMIZE_CURRENT ,
2330 HIDE_CURRENT ,
2431 OPEN_LAUNCHER ,
@@ -63,6 +70,9 @@ namespace Gala {
6370 */
6471 public class ModalProxy : Object {
6572 public Clutter . Grab ? grab { get ; set ; }
73+
74+ private GestureAction [] allowed_actions;
75+
6676 /**
6777 * A function which is called whenever a keybinding is pressed. If you supply a custom
6878 * one you can filter out those that'd you like to be passed through and block all others.
@@ -87,6 +97,14 @@ namespace Gala {
8797 public void allow_all_keybindings () {
8898 _keybinding_filter = null ;
8999 }
100+
101+ public void allow_actions (GestureAction [] actions ) {
102+ allowed_actions = actions;
103+ }
104+
105+ public bool filter_action (GestureAction action ) {
106+ return ! (action in allowed_actions);
107+ }
90108 }
91109
92110 public interface WindowManager : Meta .Plugin {
@@ -118,11 +136,6 @@ namespace Gala {
118136 */
119137 public abstract Meta . BackgroundGroup background_group { get ; protected set ; }
120138
121- /**
122- * View that allows to see and manage all your windows and desktops.
123- */
124- public abstract Gala . ActivatableComponent workspace_view { get ; protected set ; }
125-
126139 /**
127140 * Enters the modal mode, which means that all events are directed to the stage instead
128141 * of the windows. This is the only way to receive keyboard events besides shortcut listeners.
@@ -176,5 +189,18 @@ namespace Gala {
176189 * @param direction The direction in which to switch
177190 */
178191 public abstract void switch_to_next_workspace (Meta .MotionDirection direction , uint32 timestamp );
192+
193+ /**
194+ * Gets action command from gsettings and executes it.
195+ *
196+ * @param action_key The gsettings key of action. Available keys are stored in ActionKeys
197+ */
198+ public abstract void launch_action (string action_key );
199+
200+ /**
201+ * Checks whether the action should currently be prohibited.
202+ * @return true if the action should be prohibited, false otherwise
203+ */
204+ public abstract bool filter_action (GestureAction action );
179205 }
180206}
0 commit comments