Skip to content
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

X.L.DecorationEx: extensible mechanism for window decorations #857

Merged
merged 21 commits into from
Jan 21, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix some typos and formatting
thanks to @geekosaur

Co-authored-by: brandon s allbery kf8nh <allbery.b@gmail.com>
portnov and geekosaur authored Dec 22, 2023
commit 3a1cd9a0ed9eb6051545d018d097066dab83f6d6
10 changes: 5 additions & 5 deletions XMonad/Layout/DecorationEx/Engine.hs
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Layout.DecorationEx.Engine
-- Description : Type class and it's default implementation for window decoration engines.
-- Description : Type class and its default implementation for window decoration engines.
-- Copyright : (c) 2007 Andrea Rossato, 2009 Jan Vornberger, 2023 Ilya Portnov
-- License : BSD-style (see xmonad/LICENSE)
--
@@ -83,8 +83,8 @@ class (Read (engine widget a), Show (engine widget a),
=> DecorationEngine engine widget a where

-- | Type of themes used by decoration engine.
-- This type must be parametrized over widget type,
-- because theme will contain a list of widgets.
-- This type must be parameterized over a widget type,
-- because a theme will contain a list of widgets.
type Theme engine :: Type -> Type

-- | Type of data used by engine as a context during painting;
@@ -259,7 +259,7 @@ class (Read (engine widget a), Show (engine widget a),
-- | This hoook is called after a window has been dragged using the decoration.
-- This is called from default implementation of "decorationEventHookEx".
decorationAfterDraggingHook :: engine widget a -- ^ Decoration engine instance
-> (Window, Rectangle) -- ^ Original window and it's rectangle
-> (Window, Rectangle) -- ^ Original window and its rectangle
-> Window -- ^ Decoration window
-> X ()
decorationAfterDraggingHook _ds (w, _r) decoWin = do
@@ -375,7 +375,7 @@ alignCenter engine dd widgets = do
place' = place {wpRectangle = rect'}
in place' : pack remaining places

-- | Build an instance of DrawData type.
-- | Build an instance of 'DrawData' type.
mkDrawData :: (DecorationEngine engine widget a, ThemeAttributes (Theme engine widget), HasWidgets (Theme engine) widget)
=> engine widget a
-> Theme engine widget -- ^ Decoration theme
4 changes: 2 additions & 2 deletions XMonad/Layout/DecorationEx/LayoutModifier.hs
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@
-- Portability : unportable
--
-- Layout modifier, which is responsible for creation of decoration rectangles
-- (windows), updating and removing them when needed. It is parametrized by
-- (windows), updating and removing them when needed. It is parameterized by
-- @DecorationGeometry@, which says where decorations should be placed, and by
-- @DecorationEngine@, which says how decorations should look.
-----------------------------------------------------------------------------
@@ -48,7 +48,7 @@ import XMonad.Layout.DecorationEx.Geometry
-- This module exports @decorationEx@ function, which is a generic function for
-- adding decorations to your layouts. It can be used to use different
-- decoration geometries and engines in any combination.
-- For most used combinations, there are convinience functions in
-- For most used combinations, there are convenience functions in
-- "XMonad.Layout.DecorationEx.TextEngine", "XMonad.Layout.DecorationEx.TabbedGeometry",
-- and "XMonad.Layout.DecorationEx.DwmGeometry".
--