Skip to content

Commit

Permalink
Add Widget.destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
postsolar committed Feb 24, 2024
1 parent 523ef63 commit fc8bc14
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/AGS/Widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ export const withInterval =
return
}

export const destroy =
widget => () =>
widget.destroy()

3 changes: 3 additions & 0 deletions src/AGS/Widget.purs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module AGS.Widget
( grabFocus
, withInterval
, destroy
, module Exports
) where

Expand Down Expand Up @@ -95,10 +96,12 @@ import Effect.Uncurried
import Gtk.Widget (Widget)
import Gtk.Widget (Widget) as Exports
import Prelude (Unit)
import Unsafe.Coerce (unsafeCoerce)
import Untagged.Union (asOneOf) as Exports

-- * Methods

foreign import grabFocus Widget Effect Unit
foreign import withInterval Int Effect Unit Widget Effect Unit
foreign import destroy Widget Effect Unit

0 comments on commit fc8bc14

Please sign in to comment.