-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port some types to GNOME 46 + some additional types #23
Merged
+241
−50
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
d02fb16
fix MonitorConstraint constructor types
Totto16 743f7e0
add ui/lightbox types
Totto16 c3e227d
fix modalDialog open(), see https://gitlab.gnome.org/GNOME/gnome-shel…
Totto16 7f90a46
fix types of dialog and modalDialog "addButton"
Totto16 df8168c
fix dialog / MessageDialogContent constructor types
Totto16 4dfa3d0
add version comment and double check things in ui/dialog
Totto16 b9bed50
add version specifier to checked classes in ui/layout
Totto16 fed605e
add version specifier to checked classes in ui/lightbox and add prote…
Totto16 5229b0a
add version specifier to checked classes in ui/modalDialog and update…
Totto16 ff64e4b
use namespace and "export interface ConstructorProperties" everywhere…
Totto16 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
// https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/lightbox.js | ||
|
||
import type Clutter from '@girs/clutter-14'; | ||
import type St from '@girs/st-14'; | ||
import type Shell from '@girs/shell-14'; | ||
|
||
export const DEFAULT_FADE_FACTOR = 0.4; | ||
export const VIGNETTE_BRIGHTNESS = 0.5; | ||
export const VIGNETTE_SHARPNESS = 0.7; | ||
|
||
/** | ||
* @version 46 | ||
*/ | ||
export namespace RadialShaderEffect { | ||
export interface ConstructorProperties extends Shell.GLSLEffect.ConstructorProperties { | ||
brightness?: number; | ||
sharpness?: number; | ||
} | ||
} | ||
|
||
/** | ||
* @version 46 | ||
*/ | ||
export class RadialShaderEffect extends Shell.GLSLEffect { | ||
protected _brightness: number; | ||
protected _sharpness: number; | ||
|
||
public brightness: number; | ||
public sharpness: number; | ||
|
||
constructor(props: RadialShaderEffect.ConstructorProperties); | ||
public _init(props: RadialShaderEffect.ConstructorProperties): void; | ||
|
||
vfunc_build_pipeline(): void; | ||
} | ||
|
||
export interface LightboxAdditionalParameters { | ||
inhibitEvents?: boolean; | ||
width?: number; | ||
height?: number; | ||
fadeFactor?: number; | ||
radialEffect?: boolean; | ||
} | ||
|
||
/** | ||
* @version 46 | ||
*/ | ||
export namespace Lightbox { | ||
export interface ConstructorProperties extends St.Bin.ConstructorProperties, LightboxAdditionalParameters { | ||
brightness?: number; | ||
sharpness?: number; | ||
} | ||
} | ||
|
||
/** | ||
* @version 46 | ||
*/ | ||
export class Lightbox extends St.Bin { | ||
protected _active: boolean; | ||
|
||
public readonly active: boolean; | ||
|
||
/** | ||
* Lightbox creates a dark translucent "shade" actor to hide the | ||
* contents of `container`, and allows you to specify particular actors | ||
* in `container` to highlight by bringing them above the shade. It | ||
* tracks added and removed actors in `container` while the lightboxing | ||
* is active, and ensures that all actors are returned to their | ||
* original stacking order when the lightboxing is removed. (However, | ||
* if actors are restacked by outside code while the lightboxing is | ||
* active, the lightbox may later revert them back to their original | ||
* order.) | ||
* | ||
* By default, the shade window will have the height and width of | ||
* `container` and will track any changes in its size. You can override | ||
* this by passing an explicit width and height in `params`. | ||
* | ||
* @param {Clutter.Container} container parent Clutter.Container | ||
* @param {object} [params] additional parameters: | ||
* @param {boolean=} params.inhibitEvents: whether to inhibit events for `container` | ||
* @param {number=} params.width: shade actor width | ||
* @param {number=} params.height: shade actor height | ||
* @param {number=} params.fadeFactor: fading opacity factor | ||
* @param {boolean=} params.radialEffect: whether to enable the GLSL radial effect | ||
*/ | ||
constructor(container: Clutter.Actor, params?: Lightbox.ConstructorProperties); | ||
public _init(container: Clutter.Actor, params?: Lightbox.ConstructorProperties): void; | ||
|
||
lightOn(fadeInTime?: number): void; | ||
lightOff(fadeOutTime?: number): void; | ||
|
||
highlight(window: Clutter.Actor): void; | ||
|
||
protected _childAdded(container: Clutter.Actor, newChild: Clutter.Actor): void; | ||
protected _childRemoved(container: Clutter.Actor, child: Clutter.Actor): void; | ||
protected _onDestroy(): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this issue reported to upstream and being fixed?
If so, why not add a link here? If not, perhaps report it, to clarify if it's a bug here or with popModal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I intend to do that, but not yet 😓
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The bug is clearly here, since the last commits seem to get rid of the timestamp parameter everywhere else, they just missed it here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
made a MR on this issue: here