taffybar / gtk-strut

BSD 3-Clause "New" or "Revised" License
4 stars 5 forks source link

Support for gi-gdk 4 #8

Open felixonmars opened 2 years ago

felixonmars commented 2 years ago

gtk-strut currently doesn't build with gi-gdk 4+ as there are some major changes. Is there any plan to do so?

Probably we should add also bounds on hackage to avoid build failures.

Preprocessing library for gtk-strut-0.1.3.1..
Building library for gtk-strut-0.1.3.1..
[1 of 2] Compiling Graphics.UI.EWMHStrut ( src/Graphics/UI/EWMHStrut.hs, dist/build/Graphics/UI/EWMHStrut.dyn_o )

src/Graphics/UI/EWMHStrut.hs:94:7: error:
    Not in scope: type constructor or class ‘Gdk.Window’
    Module ‘GI.Gdk’ does not export ‘Window’.
   |
94 |   Ptr Gdk.Window ->
   |       ^^^^^^^^^^

src/Graphics/UI/EWMHStrut.hs:95:9: error:
    Not in scope: type constructor or class ‘Gdk.Atom’
    Module ‘GI.Gdk’ does not export ‘Atom’.
   |
95 |     Ptr Gdk.Atom -> Ptr Gdk.Atom -> Int32 -> CUInt -> Ptr CUChar -> Int32 -> IO ()
   |         ^^^^^^^^

src/Graphics/UI/EWMHStrut.hs:95:25: error:
    Not in scope: type constructor or class ‘Gdk.Atom’
    Module ‘GI.Gdk’ does not export ‘Atom’.
   |
95 |     Ptr Gdk.Atom -> Ptr Gdk.Atom -> Int32 -> CUInt -> Ptr CUChar -> Int32 -> IO ()
   |                         ^^^^^^^^

src/Graphics/UI/EWMHStrut.hs:98:7: error:
    Not in scope: type constructor or class ‘Gdk.IsWindow’
    Module ‘GI.Gdk’ does not export ‘IsWindow’.
   |
98 |   :: (Gdk.IsWindow a, MonadIO m)
   |       ^^^^^^^^^^^^

src/Graphics/UI/EWMHStrut.hs:100:6: error:
    Not in scope: type constructor or class ‘Gdk.Atom’
    Module ‘GI.Gdk’ does not export ‘Atom’.
    |
100 |   -> Gdk.Atom
    |      ^^^^^^^^

src/Graphics/UI/EWMHStrut.hs:101:6: error:
    Not in scope: type constructor or class ‘Gdk.Atom’
    Module ‘GI.Gdk’ does not export ‘Atom’.
    |
101 |   -> Gdk.Atom
    |      ^^^^^^^^

src/Graphics/UI/EWMHStrut.hs:103:6: error:
    Not in scope: type constructor or class ‘Gdk.PropMode’
    Module ‘GI.Gdk’ does not export ‘PropMode’.
    |
103 |   -> Gdk.PropMode
    |      ^^^^^^^^^^^^

src/Graphics/UI/EWMHStrut.hs:118:26: error:
    Not in scope: type constructor or class ‘Gdk.IsWindow’
    Module ‘GI.Gdk’ does not export ‘IsWindow’.
    |
118 | setStrut :: MonadIO m => Gdk.IsWindow w => w -> EWMHStrutSettings -> m ()
    |                          ^^^^^^^^^^^^

src/Graphics/UI/EWMHStrut.hs:120:16: error:
    Not in scope: ‘Gdk.atomIntern’
    Module ‘GI.Gdk’ does not export ‘atomIntern’.
    |
120 |   strutAtom <- Gdk.atomIntern "_NET_WM_STRUT_PARTIAL" False
    |                ^^^^^^^^^^^^^^

src/Graphics/UI/EWMHStrut.hs:121:19: error:
    Not in scope: ‘Gdk.atomIntern’
    Module ‘GI.Gdk’ does not export ‘atomIntern’.
    |
121 |   cardinalAtom <- Gdk.atomIntern "CARDINAL" False
    |                   ^^^^^^^^^^^^^^

src/Graphics/UI/EWMHStrut.hs:123:46: error:
    Not in scope: data constructor ‘Gdk.PropModeReplace’
    Module ‘GI.Gdk’ does not export ‘PropModeReplace’.
    |
123 |   propertyChange w strutAtom cardinalAtom 32 Gdk.PropModeReplace settingsArray 12
    |                                              ^^^^^^^^^^^^^^^^^^^
colonelpanic8 commented 2 years ago

Hey @felixonmars. Thanks for pointing this out. Does gi-gdk 4+ have anything to do with gtk version 4, or is that just the numbering of the gi-gdk library?

felixonmars commented 1 year ago

Yes, gi-gdk 4+ is actually using gtk4: https://github.com/haskell-gi/haskell-gi/blob/master/bindings/Gdk-4.0/pkg.info

colonelpanic8 commented 1 year ago

@felixonmars Yeah I mean I think migrating to gtk 4 would probably be a significant undertaking for taffybar and its associated packages. It's something I might be willing to entertain I suppose, but I don't really have time for it now atm.

Adding bounds does sound like a good idea. I do really wish that the haskell-gi people would make separate packages for the gtk4 stuff

juhp commented 1 year ago

Adding bounds does sound like a good idea. I do really wish that the haskell-gi people would make separate packages for the gtk4 stuff

I agree

see also https://github.com/haskell-gi/haskell-gi/issues/329