mirror of
https://github.com/elementary/gala.git
synced 2024-08-17 02:50:38 +03:00
Fix documentation (#1854)
Co-authored-by: Danielle Foré <danielle@elementary.io>
This commit is contained in:
parent
648923cabe
commit
1315f87340
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
@ -36,7 +36,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
DESTDIR: out
|
DESTDIR: out
|
||||||
run: |
|
run: |
|
||||||
meson build
|
meson build -Ddocumentation=true
|
||||||
ninja -C build
|
ninja -C build
|
||||||
ninja -C build install
|
ninja -C build install
|
||||||
|
|
||||||
|
@ -20,6 +20,11 @@ basic_command = [
|
|||||||
'--pkg', 'gee-0.8',
|
'--pkg', 'gee-0.8',
|
||||||
'--pkg', 'gio-unix-2.0',
|
'--pkg', 'gio-unix-2.0',
|
||||||
'--pkg', 'gmodule-2.0',
|
'--pkg', 'gmodule-2.0',
|
||||||
|
'--pkg', 'posix',
|
||||||
|
'--pkg', 'libcanberra',
|
||||||
|
'--pkg', 'sqlite3',
|
||||||
|
'--pkg', 'libsystemd',
|
||||||
|
'--pkg', 'granite',
|
||||||
'--pkg', 'config',
|
'--pkg', 'config',
|
||||||
vala_flags,
|
vala_flags,
|
||||||
'--vapidir=' + join_paths(meson.build_root(), 'lib'),
|
'--vapidir=' + join_paths(meson.build_root(), 'lib'),
|
||||||
|
@ -16,28 +16,43 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
namespace Gala {
|
namespace Gala {
|
||||||
/**
|
|
||||||
* ActionMode:
|
|
||||||
* @NONE: block action
|
|
||||||
* @NORMAL: allow action when in window mode, e.g. when the focus is in an application window
|
|
||||||
* @OVERVIEW: allow action while the overview is active
|
|
||||||
* @LOCK_SCREEN: allow action when the screen is locked, e.g. when the screen shield is shown
|
|
||||||
* @UNLOCK_SCREEN: allow action in the unlock dialog
|
|
||||||
* @LOGIN_SCREEN: allow action in the login screen
|
|
||||||
* @SYSTEM_MODAL: allow action when a system modal dialog (e.g. authentification or session dialogs) is open
|
|
||||||
* @LOOKING_GLASS: allow action in looking glass
|
|
||||||
* @POPUP: allow action while a shell menu is open
|
|
||||||
*/
|
|
||||||
[Flags]
|
[Flags]
|
||||||
public enum ActionMode {
|
public enum ActionMode {
|
||||||
|
/**
|
||||||
|
* Block action
|
||||||
|
*/
|
||||||
NONE = 0,
|
NONE = 0,
|
||||||
|
/**
|
||||||
|
* allow action when in window mode, e.g. when the focus is in an application window
|
||||||
|
*/
|
||||||
NORMAL = 1 << 0,
|
NORMAL = 1 << 0,
|
||||||
|
/**
|
||||||
|
* allow action while the overview is active
|
||||||
|
*/
|
||||||
OVERVIEW = 1 << 1,
|
OVERVIEW = 1 << 1,
|
||||||
|
/**
|
||||||
|
* allow action when the screen is locked, e.g. when the screen shield is shown
|
||||||
|
*/
|
||||||
LOCK_SCREEN = 1 << 2,
|
LOCK_SCREEN = 1 << 2,
|
||||||
|
/**
|
||||||
|
* allow action in the unlock dialog
|
||||||
|
*/
|
||||||
UNLOCK_SCREEN = 1 << 3,
|
UNLOCK_SCREEN = 1 << 3,
|
||||||
|
/**
|
||||||
|
* allow action in the login screen
|
||||||
|
*/
|
||||||
LOGIN_SCREEN = 1 << 4,
|
LOGIN_SCREEN = 1 << 4,
|
||||||
|
/**
|
||||||
|
* allow action when a system modal dialog (e.g. authentification or session dialogs) is open
|
||||||
|
*/
|
||||||
SYSTEM_MODAL = 1 << 5,
|
SYSTEM_MODAL = 1 << 5,
|
||||||
|
/**
|
||||||
|
* allow action in looking glass
|
||||||
|
*/
|
||||||
LOOKING_GLASS = 1 << 6,
|
LOOKING_GLASS = 1 << 6,
|
||||||
|
/**
|
||||||
|
* allow action while a shell menu is open
|
||||||
|
*/
|
||||||
POPUP = 1 << 7,
|
POPUP = 1 << 7,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,18 +19,16 @@
|
|||||||
/**
|
/**
|
||||||
* Allow to use multi-touch gestures from different sources (backends).
|
* Allow to use multi-touch gestures from different sources (backends).
|
||||||
* Usage:
|
* Usage:
|
||||||
* - Create a new instance of the class
|
*
|
||||||
* - Use the enable_* methods to enable different backends
|
* * Create a new instance of the class
|
||||||
* - Connect the on_gesture_detected to your code
|
* * Use the enable_* methods to enable different backends\
|
||||||
* - When on_gesture_detected is emitted, if you want to handle the gesture, call connect_handlers
|
* * Connect the on_gesture_detected to your code
|
||||||
* to start receiving events
|
* * When on_gesture_detected is emitted, if you want to handle the gesture, call connect_handlers to start receiving events
|
||||||
* - on_begin will be emitted once right after on_gesture_detected
|
* * on_begin will be emitted once right after on_gesture_detected
|
||||||
* - on_update will be emitted 0 or more times
|
* * on_update will be emitted 0 or more times
|
||||||
* - on_end will be emitted once when the gesture end
|
* * on_end will be emitted once when the gesture end
|
||||||
* - When on_end is emitted, the handler connected with connect_handlers will be automatically
|
* * When on_end is emitted, the handler connected with connect_handlers will be automatically disconnected and you will only receive on_gesture_detected signals
|
||||||
* disconnected and you will only receive on_gesture_detected signals
|
* * The enabled flag is usually disabled on_end and re-enabled once the end animation finish. In this way, new gestures are not received while animating
|
||||||
* - The enabled flag is usually disabled on_end and re-enabled once the end animation finish. In
|
|
||||||
* this way, new gestures are not received while animating
|
|
||||||
*/
|
*/
|
||||||
public class Gala.GestureTracker : Object {
|
public class Gala.GestureTracker : Object {
|
||||||
/**
|
/**
|
||||||
@ -90,8 +88,6 @@ public class Gala.GestureTracker : Object {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param percentage Value between 0 and 1.
|
* @param percentage Value between 0 and 1.
|
||||||
* @param cancel_action
|
|
||||||
* @param calculated_duration
|
|
||||||
*/
|
*/
|
||||||
public signal void on_end (double percentage, bool cancel_action, int calculated_duration);
|
public signal void on_end (double percentage, bool cancel_action, int calculated_duration);
|
||||||
|
|
||||||
@ -189,7 +185,7 @@ public class Gala.GestureTracker : Object {
|
|||||||
* @param rounded If the returned value should be rounded to match physical pixels.
|
* @param rounded If the returned value should be rounded to match physical pixels.
|
||||||
* Default to false because some animations, like for example scaling an actor, use intermediate
|
* Default to false because some animations, like for example scaling an actor, use intermediate
|
||||||
* values not divisible by physical pixels.
|
* values not divisible by physical pixels.
|
||||||
* @returns The linear animation value at the specified percentage.
|
* @return The linear animation value at the specified percentage.
|
||||||
*/
|
*/
|
||||||
public static float animation_value (float initial_value, float target_value, double percentage, bool rounded = false) {
|
public static float animation_value (float initial_value, float target_value, double percentage, bool rounded = false) {
|
||||||
float value = initial_value;
|
float value = initial_value;
|
||||||
|
@ -17,9 +17,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Singleton class to manage the connection with Touchégg daemon and receive touch events.
|
* Singleton class to manage the connection with Touchégg daemon and receive touch events.
|
||||||
* See: https://github.com/JoseExposito/touchegg
|
* See: [[https://github.com/JoseExposito/touchegg]]
|
||||||
*/
|
*/
|
||||||
public class Gala.ToucheggBackend : Object {
|
public class Gala.ToucheggBackend : Object {
|
||||||
public signal void on_gesture_detected (Gesture gesture);
|
public signal void on_gesture_detected (Gesture gesture);
|
||||||
public signal void on_begin (double delta, uint64 time);
|
public signal void on_begin (double delta, uint64 time);
|
||||||
@ -104,7 +104,7 @@ public class Gala.ToucheggBackend : Object {
|
|||||||
private Variant? last_params_received = null;
|
private Variant? last_params_received = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @returns Single instance of the class.
|
* @return Single instance of the class.
|
||||||
*/
|
*/
|
||||||
public static unowned ToucheggBackend get_default () {
|
public static unowned ToucheggBackend get_default () {
|
||||||
if (instance == null) {
|
if (instance == null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user