Skip to content

Commit

Permalink
Add Gtk.IconInfo.filename
Browse files Browse the repository at this point in the history
  • Loading branch information
postsolar committed Feb 24, 2024
1 parent 6b01b5b commit 01eea03
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/Gtk/IconInfo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export const getFilenameImpl =
iconInfo =>
iconInfo.get_filename()

12 changes: 11 additions & 1 deletion src/Gtk/IconInfo.purs
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
module Gtk.IconInfo where
module Gtk.IconInfo (GtkIconInfo, filename) where

import Data.Maybe (Maybe)
import Data.Nullable (Nullable, toMaybe)
import Prelude ((<<<))

foreign import data GtkIconInfo Type

-- | Returns the full path to the icon, unless it's a builtin icon.
filename GtkIconInfo Maybe String
filename = toMaybe <<< getFilenameImpl

foreign import getFilenameImpl GtkIconInfo Nullable String

0 comments on commit 01eea03

Please sign in to comment.