You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
|
Jul
(68) |
Aug
(4) |
Sep
|
Oct
(23) |
Nov
(95) |
Dec
(9) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(3) |
Feb
|
Mar
|
Apr
(51) |
May
(81) |
Jun
(2) |
Jul
(86) |
Aug
(143) |
Sep
(3) |
Oct
(31) |
Nov
(63) |
Dec
(90) |
2005 |
Jan
(277) |
Feb
(157) |
Mar
(99) |
Apr
(195) |
May
(151) |
Jun
(148) |
Jul
(98) |
Aug
(123) |
Sep
(20) |
Oct
(174) |
Nov
(155) |
Dec
(26) |
2006 |
Jan
(51) |
Feb
(19) |
Mar
(16) |
Apr
(12) |
May
(5) |
Jun
|
Jul
(11) |
Aug
(7) |
Sep
(10) |
Oct
(31) |
Nov
(174) |
Dec
(56) |
2007 |
Jan
(45) |
Feb
(52) |
Mar
(10) |
Apr
(5) |
May
(47) |
Jun
(16) |
Jul
(80) |
Aug
(29) |
Sep
(14) |
Oct
(59) |
Nov
(46) |
Dec
(16) |
2008 |
Jan
(10) |
Feb
(1) |
Mar
|
Apr
|
May
(49) |
Jun
(26) |
Jul
(8) |
Aug
(4) |
Sep
(25) |
Oct
(53) |
Nov
(9) |
Dec
(1) |
2009 |
Jan
(66) |
Feb
(11) |
Mar
(1) |
Apr
(14) |
May
(8) |
Jun
(1) |
Jul
(2) |
Aug
(2) |
Sep
(9) |
Oct
(23) |
Nov
(35) |
Dec
|
2010 |
Jan
(7) |
Feb
(2) |
Mar
(39) |
Apr
(19) |
May
(161) |
Jun
(19) |
Jul
(32) |
Aug
(65) |
Sep
(113) |
Oct
(120) |
Nov
(2) |
Dec
|
2012 |
Jan
|
Feb
(5) |
Mar
(4) |
Apr
(7) |
May
(9) |
Jun
(14) |
Jul
(1) |
Aug
|
Sep
(1) |
Oct
(1) |
Nov
(12) |
Dec
(2) |
2013 |
Jan
(1) |
Feb
(17) |
Mar
(4) |
Apr
(4) |
May
(9) |
Jun
|
Jul
(8) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
From: Andy S. <And...@co...> - 2010-08-17 02:02:40
|
diffing dir... Mon Aug 16 22:01:34 EDT 2010 Andy Stewart <laz...@gm...> * Add function dialogGetWidgetForResponse Ignore-this: 16b0b214e640ad0179ef8ea7ddb2af39 { hunk ./gtk/Graphics/UI/Gtk/Windows/Dialog.chs 10 --- Copyright (C) 2009 Andy Stewart +-- Copyright (C) 2009-2010 Andy Stewart hunk ./gtk/Graphics/UI/Gtk/Windows/Dialog.chs 103 +-- * Enums + ResponseId(..), + hunk ./gtk/Graphics/UI/Gtk/Windows/Dialog.chs 114 - ResponseId(..), hunk ./gtk/Graphics/UI/Gtk/Windows/Dialog.chs 123 +#if GTK_CHECK_VERSION(2,20,0) + dialogGetWidgetForResponse, +#endif hunk ./gtk/Graphics/UI/Gtk/Windows/Dialog.chs 349 +#if GTK_CHECK_VERSION(2,20,0) +-- | Gets the widget button that uses the given response ID in the action area of a dialog. +dialogGetWidgetForResponse :: DialogClass self => self [_$_] + -> ResponseId -- ^ @responseId@ the response ID used by the dialog widget [_$_] + -> IO (Maybe Widget) -- ^ returns the widget button that uses the given @responseId@, or 'Nothing'. [_$_] +dialogGetWidgetForResponse self responseId = + maybeNull (makeNewObject mkWidget) $ + {#call gtk_dialog_get_widget_for_response #} + (toDialog self) + (fromResponse responseId) +#endif + } |
From: Andy S. <And...@co...> - 2010-08-17 01:53:28
|
diffing dir... Mon Aug 16 21:52:50 EDT 2010 Andy Stewart <laz...@gm...> * Add new functions : entryGetIconWindow, entryGetTextWindow Ignore-this: 1f2034f25d379c8c77c1f8709f499bf3 { hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs 89 +#if GTK_CHECK_VERSION(2,20,0) + entryGetIconWindow, + entryGetTextWindow, +#endif hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs 148 -import Graphics.UI.Gtk.General.Enums (DeleteType (..), MovementStep (..)) +import Graphics.UI.Gtk.General.Enums (DeleteType (..), MovementStep (..), EntryIconPosition (..)) hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs 421 +#if GTK_CHECK_VERSION(2,20,0) +-- | Returns the 'Window' which contains the entry's icon at @iconPos@. This function is useful when +-- drawing something to the entry in an expose-event callback because it enables the callback to +-- distinguish between the text window and entry's icon windows. +-- [_$_] +-- See also 'entryGetTextWindow'. +entryGetIconWindow :: EntryClass self => self + -> EntryIconPosition -- ^ @iconPos@ Icon position [_$_] + -> IO DrawWindow -- ^ returns the entry's icon window at @iconPos@. [_$_] +entryGetIconWindow entry iconPos = + makeNewGObject mkDrawWindow $ + {#call gtk_entry_get_icon_window #} + (toEntry entry) + ((fromIntegral . fromEnum) iconPos) + [_$_] +-- | Returns the 'Window' which contains the text. This function is useful when drawing something to the +-- entry in an expose-event callback because it enables the callback to distinguish between the text +-- window and entry's icon windows. +-- [_$_] +-- See also 'entryGetIconWindow'. +entryGetTextWindow :: EntryClass self => self + -> IO DrawWindow -- ^ returns the entry's text window. [_$_] +entryGetTextWindow entry = + makeNewGObject mkDrawWindow $ + {#call gtk_entry_get_text_window #} + (toEntry entry) +#endif + hunk ./gtk/Graphics/UI/Gtk/General/Enums.chs 84 + EntryIconPosition(..), hunk ./gtk/Graphics/UI/Gtk/General/Enums.chs 423 +-- | Specifies the side of the entry at which an icon is placed. +-- +{#enum EntryIconPosition {underscoreToCase} deriving (Eq,Show)#} } |
From: Andy S. <And...@co...> - 2010-08-17 01:46:21
|
diffing dir... Mon Aug 16 21:45:13 EDT 2010 Andy Stewart <laz...@gm...> * Update GtkEntry signals Ignore-this: a25e193e80ece2bc1040032371ade6b5 { hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs 5 --- Author : Axel Simon +-- Author : Axel Simon, Andy Stewart hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs 10 +-- Copyright (C) 2010 Andy Stewart hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs 24 --- A couple of signals are not bound because I could not figure out what --- they mean. Some of them do not seem to be emitted at all. --- I removed onInsertAtCursor since it is internal and not emitted. The usable funtions --- are in Editable. +-- 'icon-press' and 'icon-release' signals not bind. +-- +-- NOTE +-- +-- Don't bind 'insert-at-cursor' signal, it's not default bindings signal. [_$_] hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs 109 + entryActivate, + entryBackspace, + entryCopyClipboard, + entryCutClipboard, + entryPasteClipboard, + entryDeleteFromCursor, + entryMoveCursor, + entryPopulatePopup, + entryPreeditChanged, + entryToggleOverwirte, + +-- * Deprecated +#ifndef DISABLE_DEPRECATED hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs 132 +#endif hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs 144 +import Graphics.UI.Gtk.General.Enums (DeleteType (..), MovementStep (..)) hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs 554 +-- | A keybinding signal which gets emitted when the user activates the entry. +-- [_$_] +-- Applications should not connect to it, but may emit it with 'signalEmitByName' if they need to +-- control activation programmatically. +entryActivate :: EntryClass ec => Signal ec (IO ()) +entryActivate = Signal (connect_NONE__NONE "activate") + +-- | The 'backspace' signal is a keybinding signal which gets emitted when the user asks for it. +-- [_$_] +-- The default bindings for this signal are Backspace and Shift-Backspace. +entryBackspace :: EntryClass ec => Signal ec (IO ()) +entryBackspace = Signal (connect_NONE__NONE "backspace") + +-- | The 'copyClipboard' signal is a keybinding signal which gets emitted to copy the selection to the +-- clipboard. +-- [_$_] +-- The default bindings for this signal are Ctrl-c and Ctrl-Insert. +entryCopyClipboard :: EntryClass ec => Signal ec (IO ()) +entryCopyClipboard = Signal (connect_NONE__NONE "copy-clipboard") + +-- | The 'cutClipboard' signal is a keybinding signal which gets emitted to cut the selection to the +-- clipboard. +-- [_$_] +-- The default bindings for this signal are Ctrl-x and Shift-Delete. +entryCutClipboard :: EntryClass ec => Signal ec (IO ()) +entryCutClipboard = Signal (connect_NONE__NONE "cut-clipboard") + +-- | The 'deleteFromCursor' signal is a keybinding signal which gets emitted when the user initiates a +-- text deletion. +-- [_$_] +-- If the type is 'DeleteChars', GTK+ deletes the selection if there is one, otherwise it deletes +-- the requested number of characters. +-- [_$_] +-- The default bindings for this signal are Delete for deleting a character and Ctrl-Delete for +-- deleting a word. +entryDeleteFromCursor :: EntryClass ec => Signal ec (DeleteType -> Int -> IO ()) +entryDeleteFromCursor = Signal (connect_ENUM_INT__NONE "delete-from-cursor") + +-- | The 'moveCursor' signal is a keybinding signal which gets emitted when the user initiates a cursor +-- movement. If the cursor is not visible in entry, this signal causes the viewport to be moved +-- instead. +-- [_$_] +-- Applications should not connect to it, but may emit it with 'signalEmitByName' if they need to +-- control the cursor programmatically. +-- [_$_] +-- The default bindings for this signal come in two variants, the variant with the Shift modifier +-- extends the selection, the variant without the Shift modifer does not. There are too many key +-- combinations to list them all here. +-- [_$_] +-- * Arrow keys move by individual characters/lines [_$_] +-- * Ctrl-arrow key combinations move by words/paragraphs [_$_] +-- * Home/End keys move to the ends of the buffer +entryMoveCursor :: EntryClass ec => Signal ec (MovementStep -> Int -> Bool -> IO ()) +entryMoveCursor = Signal (connect_ENUM_INT_BOOL__NONE "move-cursor") + +-- | The 'pasteClipboard' signal is a keybinding signal which gets emitted to paste the contents of the +-- clipboard into the text view. +-- [_$_] +-- The default bindings for this signal are Ctrl-v and Shift-Insert. +entryPasteClipboard :: EntryClass ec => Signal ec (IO ()) +entryPasteClipboard = Signal (connect_NONE__NONE "paste-clipboard") + +-- | The 'populatePopup' signal gets emitted before showing the context menu of the entry. +-- [_$_] +-- If you need to add items to the context menu, connect to this signal and append your menuitems to +-- the menu. +entryPopulatePopup :: EntryClass ec => Signal ec (Menu -> IO ()) +entryPopulatePopup = Signal (connect_OBJECT__NONE "populate-popup") + +-- | If an input method is used, the typed text will not immediately be committed to the buffer. So if +-- you are interested in the text, connect to this signal. +entryPreeditChanged :: EntryClass ec => Signal ec (String -> IO ()) +entryPreeditChanged = Signal (connect_STRING__NONE "preedit-changed") + +-- | The 'toggleOverwrite' signal is a keybinding signal which gets emitted to toggle the overwrite mode +-- of the entry. +-- [_$_] +-- The default bindings for this signal is Insert. +entryToggleOverwirte :: EntryClass ec => Signal ec (IO ()) +entryToggleOverwirte = Signal (connect_NONE__NONE "toggle-overwrite") + +#ifndef DISABLE_DEPRECATED hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs 691 - +#endif } |
From: Andy S. <And...@co...> - 2010-08-16 19:12:52
|
diffing dir... Mon Aug 16 15:11:13 EDT 2010 Andy Stewart <laz...@gm...> * Update GtkWindow to 2.20 (Add function windowGetWindowType and attribute windowMnemonicVisible) Ignore-this: c0cb4d9b072b5499e6e00a4e994389b1 { hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs 142 +#if GTK_CHECK_VERSION(2,20,0) + windowGetWindowType, +#endif hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs 194 +#if GTK_CHECK_VERSION(2,20,0) + windowMnemonicVisible, +#endif hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs 1932 +#if GTK_CHECK_VERSION(2,20,0) +-- | Gets the type of the window. See 'WindowType'. +-- +-- * Available since Gtk version 2.20 +-- +windowGetWindowType :: WindowClass self => self + -> IO WindowType -- ^ returns the type of the window [_$_] +windowGetWindowType self = + liftM (toEnum . fromIntegral) $ + {#call gtk_window_get_window_type #} + (toWindow self) +#endif + hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs 2070 +#if GTK_CHECK_VERSION(2,20,0) +windowMnemonicVisible :: WindowClass self => Attr self Bool +windowMnemonicVisible = newAttrFromBoolProperty "mnemonics-visible" +#endif + } |
From: Andy S. <And...@co...> - 2010-08-16 19:03:04
|
diffing dir... Mon Aug 16 15:01:59 EDT 2010 Andy Stewart <laz...@gm...> * Add function viewportGetBinWindow Ignore-this: 8aecbcb5830064b57e1154680438c779 { hunk ./gtk/Graphics/UI/Gtk/Misc/Viewport.chs 56 + ShadowType(..), hunk ./gtk/Graphics/UI/Gtk/Misc/Viewport.chs 68 - ShadowType(..), hunk ./gtk/Graphics/UI/Gtk/Misc/Viewport.chs 70 +#if GTK_CHECK_VERSION(2,20,0) + viewportGetBinWindow, +#endif hunk ./gtk/Graphics/UI/Gtk/Misc/Viewport.chs 160 +#if GTK_CHECK_VERSION(2,20,0) +-- | Gets the bin window of the 'Viewport'. +-- +-- * Available since Gtk version 2.20 +-- +viewportGetBinWindow :: ViewportClass self => self -> IO DrawWindow +viewportGetBinWindow self = + makeNewGObject mkDrawWindow $ + {#call gtk_viewport_get_bin_window #} + (toViewport self) +#endif + } |
From: Andy S. <And...@co...> - 2010-08-16 18:51:55
|
diffing dir... Mon Aug 16 14:50:54 EDT 2010 Andy Stewart <laz...@gm...> * Add functions : notebookGetActionWidget/notebookSetActionWidget Ignore-this: fd413910a857c2000f19f65f9bc49e60 { hunk ./gtk/Graphics/UI/Gtk/Layout/Notebook.chs 130 +#if GTK_CHECK_VERSION(2,20,0) + notebookSetActionWidget, + notebookGetActionWidget, +#endif hunk ./gtk/Graphics/UI/Gtk/Layout/Notebook.chs 985 +#if GTK_CHECK_VERSION(2,20,0) +-- | Sets widget as one of the action widgets. Depending on the pack type the widget will be placed +-- before or after the tabs. You can use a 'Box' if you need to pack more than one widget on the same +-- side. +-- [_$_] +-- Note that action widgets are "internal" children of the notebook and thus not included in the list +-- returned from 'containerForeach'. +-- +-- * Available since Gtk version 2.20 +-- +notebookSetActionWidget :: (NotebookClass self, WidgetClass widget) => self + -> widget + -> PackType -- ^ @packType@ pack type of the action widget [_$_] + -> IO () +notebookSetActionWidget self widget packType = + {#call gtk_notebook_set_action_widget #} + (toNotebook self) + (toWidget widget) + ((fromIntegral . fromEnum) packType) + +-- | Gets one of the action widgets. See 'notebookSetActionWidget'. +-- +-- * Available since Gtk version 2.20 +-- +notebookGetActionWidget :: NotebookClass self => self + -> PackType -- ^ @packType@ pack type of the action widget to receive + -> IO (Maybe Widget) +notebookGetActionWidget self packType = + maybeNull (makeNewObject mkWidget) $ + {#call gtk_notebook_get_action_widget #} + (toNotebook self) + ((fromIntegral . fromEnum) packType) +#endif + } |
From: Andy S. <And...@co...> - 2010-08-16 18:40:48
|
diffing dir... Mon Aug 16 14:39:05 EDT 2010 Andy Stewart <laz...@gm...> * Add new module Graphics.UI.Gtk.Display.Spinner Ignore-this: 2e82291368e55411e0445e1e5c6aaf09 { hunk ./gtk/Graphics/UI/Gtk.chs 81 + module Graphics.UI.Gtk.Display.Spinner, hunk ./gtk/Graphics/UI/Gtk.chs 270 +import Graphics.UI.Gtk.Display.Spinner addfile ./gtk/Graphics/UI/Gtk/Display/Spinner.chs hunk ./gtk/Graphics/UI/Gtk/Display/Spinner.chs 1 +{-# LANGUAGE CPP #-} +-- -*-haskell-*- +-- GIMP Toolkit (GTK) Widget Spinner +-- +-- Author : Andy Stewart +-- +-- Created: 17 Aug 2010 +-- +-- Copyright (C) 2010 Andy Stewart +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public +-- License as published by the Free Software Foundation; either +-- version 2.1 of the License, or (at your option) any later version. +-- +-- This library is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- | +-- Maintainer : gtk...@li... +-- Stability : provisional +-- Portability : portable (depends on GHC) +-- +-- Report messages of minor importance to the user +-- +module Graphics.UI.Gtk.Display.Spinner ( +#if GTK_CHECK_VERSION(2,20,0) +-- * Detail +-- [_$_] +-- | A 'Spinner' widget displays an icon-size spinning animation. It is often used as an alternative to +-- a 'ProgressBar' for displaying indefinite activity, instead of actual progress. +-- [_$_] +-- To start the animation, use 'spinnerStart'. hunk ./gtk/Graphics/UI/Gtk/Display/Spinner.chs 37 +-- * Types + Spinner, + SpinnerClass, + +-- * Constructors + spinnerNew, + +-- * Methods + spinnerStart, + spinnerStop, + [_$_] +-- * Attributes [_$_] + spinnerActive, +#endif +) where + +import Control.Monad (liftM) + +import System.Glib.FFI +import System.Glib.UTFString +import System.Glib.Attributes +import System.Glib.Properties +import Graphics.UI.Gtk.Abstract.Object (makeNewObject) +{#import Graphics.UI.Gtk.Types#} +{#import Graphics.UI.Gtk.Signals#} + +{# context lib="gtk" prefix="gtk" #} + +#if GTK_CHECK_VERSION(2,20,0) +-------------------- +-- Constructors + +-- | Returns a new spinner widget. Not yet started. +spinnerNew :: IO Spinner +spinnerNew = [_$_] + makeNewObject mkSpinner $ + liftM (castPtr :: Ptr Widget -> Ptr Spinner) $ + {# call unsafe spinner_new #} + +-------------------- +-- Methods + +-- | Starts the animation of the spinner. +spinnerStart :: SpinnerClass spinner => spinner -> IO () +spinnerStart spinner = + {#call spinner_start #} + (toSpinner spinner) + +-- | Stops the animation of the spinner. +spinnerStop :: SpinnerClass spinner => spinner -> IO () +spinnerStop spinner = + {#call spinner_stop #} + (toSpinner spinner) + +-------------------- +-- Attributes + +-- | Whether the spinner is active. +-- [_$_] +-- Default value: 'False' +spinnerActive :: SpinnerClass spinner => Attr spinner Bool +spinnerActive = newAttrFromBoolProperty "active" +#endif hunk ./gtk/gtk.cabal 166 + Graphics.UI.Gtk.Display.Spinner hunk ./gtk/hierarchy.list 147 + GtkSpinner if gtk-2.20 } |
From: Andy S. <And...@co...> - 2010-08-16 17:53:39
|
diffing dir... Mon Aug 16 13:52:42 EDT 2010 Andy Stewart <laz...@gm...> * Tag pango-0.11.2 Ignore-this: 73138bdc0eafbd4fd05950655273b088 hunk ./pango/pango.cabal 2 -Version: 0.11.1 +Version: 0.11.2 |
From: Andy S. <And...@co...> - 2010-08-16 11:08:31
|
diffing dir... Mon Aug 16 07:06:57 EDT 2010 Andy Stewart <laz...@gm...> * Add macro make pango package can compile under pango-1.22.x Ignore-this: 8bfa061a6a874fa04a0f36406b42bff1 { hunk ./pango/Graphics/Rendering/Pango/BasicTypes.chs 130 - showsPrec _ WeightThin = shows "thin" hunk ./pango/Graphics/Rendering/Pango/BasicTypes.chs 132 - showsPrec _ WeightBook = shows "book" hunk ./pango/Graphics/Rendering/Pango/BasicTypes.chs 133 - showsPrec _ WeightMedium = shows "medium" hunk ./pango/Graphics/Rendering/Pango/BasicTypes.chs 137 +#if PANGO_VERSION_CHECK(1,24,0) + showsPrec _ WeightThin = shows "thin" + showsPrec _ WeightBook = shows "book" + showsPrec _ WeightMedium = shows "medium" hunk ./pango/Graphics/Rendering/Pango/BasicTypes.chs 142 +#endif } |
From: Andy S. <And...@co...> - 2010-08-15 19:11:26
|
diffing dir... Sun Aug 15 14:13:50 EDT 2010 Andy Stewart <laz...@gm...> * Update System.GIO.File module Ignore-this: ff018efa91ad990ddfdb017c1ede3e6a { hunk ./gio/System/GIO/File/File.chs 34 --- | GFile is a high level abstraction for manipulating files on a virtual file system. GFiles are +-- | 'File' is a high level abstraction for manipulating files on a virtual file system. 'File's are hunk ./gio/System/GIO/File/File.chs 36 --- GFile objects do not represent files, merely an identifier for a file. All file content I/O is +-- 'File' objects do not represent files, merely an identifier for a file. All file content I/O is hunk ./gio/System/GIO/File/File.chs 39 --- To construct a GFile, you can use: 'fileNewForPath' if +-- To construct a 'File', you can use: 'fileNewForPath' if hunk ./gio/System/GIO/File/File.chs 43 --- One way to think of a GFile is as an abstraction of a pathname. For normal files the system pathname --- is what is stored internally, but as GFiles are extensible it could also be something else that +-- One way to think of a 'File' is as an abstraction of a pathname. For normal files the system pathname +-- is what is stored internally, but as 'File's are extensible it could also be something else that hunk ./gio/System/GIO/File/File.chs 47 --- GFiles make up hierarchies of directories and files that correspond to the files on a --- filesystem. You can move through the file system with GFile using 'fileGetParent' to get an +-- 'File's make up hierarchies of directories and files that correspond to the files on a +-- filesystem. You can move through the file system with 'File' using 'fileGetParent' to get an hunk ./gio/System/GIO/File/File.chs 50 --- 'fileResolveRelativePath' to resolve a relative path between two GFiles. There can be multiple +-- 'fileResolveRelativePath' to resolve a relative path between two 'File's. There can be multiple hunk ./gio/System/GIO/File/File.chs 54 --- All GFiles have a basename (get with 'fileGetBasename'. These names are byte strings that are +-- All 'File's have a basename (get with 'fileGetBasename'. These names are byte strings that are hunk ./gio/System/GIO/File/File.chs 58 --- the GFileAttributeStandardDisplayName attribute with 'fileQueryInfo'. This is guaranteed to --- be in utf8 and can be used in a user interface. But always store the real basename or the GFile to +-- the 'FileAttributeStandardDisplayName' attribute with 'fileQueryInfo'. This is guaranteed to +-- be in utf8 and can be used in a user interface. But always store the real basename or the 'File' to hunk ./gio/System/GIO/File/File.chs 63 --- Using GFile as an identifier has the same weaknesses as using a path in that there may be multiple --- aliases for the same file. For instance, hard or soft links may cause two different GFiles to refer +-- Using 'File' as an identifier has the same weaknesses as using a path in that there may be multiple +-- aliases for the same file. For instance, hard or soft links may cause two different 'File's to refer hunk ./gio/System/GIO/File/File.chs 66 --- long names on Fat/NTFS, or bind mounts in Linux. If you want to check if two GFiles point to the --- same file you can query for the GFileAttributeIdFile attribute. Note that GFile does some +-- long names on Fat/NTFS, or bind mounts in Linux. If you want to check if two 'File's point to the +-- same file you can query for the 'FileAttributeIdFile' attribute. Note that 'File' does some hunk ./gio/System/GIO/File/File.chs 70 --- create different GFiles. +-- create different 'File's. hunk ./gio/System/GIO/File/File.chs 72 --- Many GFile operations have both synchronous and asynchronous versions to suit your +-- Many 'File' operations have both synchronous and asynchronous versions to suit your hunk ./gio/System/GIO/File/File.chs 74 --- function names. The asynchronous I/O functions call a GAsyncReadyCallback which is then used to --- finalize the operation, producing a GAsyncResult which is then passed to the function's matching +-- function names. The asynchronous I/O functions call a 'AsyncReadyCallback' which is then used to +-- finalize the operation, producing a 'AsyncResult' which is then passed to the function's matching hunk ./gio/System/GIO/File/File.chs 78 --- Some GFile operations do not have synchronous analogs, as they may take a very long time to finish, +-- Some 'File' operations do not have synchronous analogs, as they may take a very long time to finish, hunk ./gio/System/GIO/File/File.chs 83 --- One notable feature of GFiles are entity tags, or "etags" for short. Entity tags are somewhat like a +-- One notable feature of 'File's are entity tags, or "etags" for short. Entity tags are somewhat like a hunk ./gio/System/GIO/File/File.chs 89 + File(..), + FileClass, hunk ./gio/System/GIO/File/File.chs 93 - FileClass, + Offset, + FileInputStream, + FileInputStreamClass, + FileOutputStream, + FileOutputStreamClass, + InputStream, + InputStreamClass, + OutputStream, + OutputStreamClass, + BufferedInputStream, + BufferedInputStreamClass, + BufferedOutputStream, + BufferedOutputStreamClass, + MemoryInputStream, + MemoryInputStreamClass, + MemoryOutputStream, + MemoryOutputStreamClass, + FilterInputStream, + FilterInputStreamClass, + FilterOutputStream, + FilterOutputStreamClass, + DataInputStream, + DataInputStreamClass, + DataOutputStream, + DataOutputStreamClass, hunk ./gio/System/GIO/File/File.chs 120 - File(..), - FileQueryInfoFlags(..), - FileCreateFlags(..), - FileCopyFlags(..), - FileMonitorFlags(..), - FilesystemPreviewType(..), - FileType(..), + FileType (..), + FileCopyFlags (..), + FileQueryInfoFlags (..), + FileCreateFlags (..), + FileMonitorFlags (..), + MountMountFlags (..), + MountUnmountFlags (..), hunk ./gio/System/GIO/File/File.chs 193 - fileQueryWritableNamespaces + fileQueryWritableNamespaces, + + fileSetAttributesFromInfo, + fileSetAttributesFromInfoAsync, + fileSetAttributesFinish, + fileSetAttributeString, + fileSetAttributeByteString, + fileSetAttributeWord32, + fileSetAttributeInt32, + fileSetAttributeWord64, + fileSetAttributeInt64, + fileCopyAttributes, + + fileMonitorDirectory, + fileMonitorFile, +#if GLIB_CHECK_VERSION(2,18,0) + fileMonitor, +#endif + + fileMountMountable, + fileMountMountableFinish, +#if GLIB_CHECK_VERSION(2,22,0) + fileUnmountMountableWithOperation, + fileUnmountMountableWithOperationFinish, + fileEjectMountableWithOperation, + fileEjectMountableWithOperationFinish, + fileStartMountable, + fileStartMountableFinish, + fileStopMountable, + fileStopMountableFinish, + filePollMountable, + filePollMountableFinish, + fileMountEnclosingVolume, + fileMountEnclosingVolumeFinish, + fileSupportsThreadContexts, +#endif hunk ./gio/System/GIO/File/File.chs 232 -import qualified Data.ByteString as BS hunk ./gio/System/GIO/File/File.chs 233 - +import System.GIO.Enums +import System.GIO.File.FileAttribute hunk ./gio/System/GIO/File/File.chs 238 -import System.Glib.UTFString hunk ./gio/System/GIO/File/File.chs 239 - +import System.Glib.UTFString +{#import System.GIO.Async.AsyncResult#} hunk ./gio/System/GIO/File/File.chs 243 -import System.GIO.File.FileAttribute hunk ./gio/System/GIO/File/File.chs 244 -{# context lib = "gio" prefix = "g" #} - -{# enum GFileQueryInfoFlags as FileQueryInfoFlags {underscoreToCase} with prefix = "G" deriving (Eq, Ord, Bounded, Show, Typeable) #} -instance Flags FileQueryInfoFlags - -{# enum GFileCreateFlags as FileCreateFlags {underscoreToCase} with prefix = "G" deriving (Eq, Ord, Bounded, Show, Typeable) #} -instance Flags FileCreateFlags - -{# enum GFileCopyFlags as FileCopyFlags {underscoreToCase} with prefix = "G" deriving (Eq, Ord, Bounded, Show, Typeable) #} -instance Flags FileCopyFlags +import qualified Data.ByteString as BS hunk ./gio/System/GIO/File/File.chs 246 -{# enum GFileMonitorFlags as FileMonitorFlags {underscoreToCase} with prefix = "G" deriving (Eq, Ord, Bounded, Show, Typeable) #} -instance Flags FileMonitorFlags +{# context lib = "gio" prefix = "g" #} hunk ./gio/System/GIO/File/File.chs 248 -{# enum GFilesystemPreviewType as FilesystemPreviewType {underscoreToCase} with prefix = "G" deriving (Eq, Ord, Bounded, Show, Typeable) #} +type Offset = {# type goffset #} hunk ./gio/System/GIO/File/File.chs 250 -{# enum GFileType as FileType {underscoreToCase} with prefix = "G" deriving (Eq, Ord, Bounded, Show, Typeable) #} +{#pointer GFileProgressCallback #} hunk ./gio/System/GIO/File/File.chs 253 -type CFileProgressCallback = {# type goffset #} -> {# type goffset #} -> Ptr () -> IO () -foreign import ccall "wrapper" - makeFileProgressCallback :: CFileProgressCallback - -> IO {# type GFileProgressCallback #} hunk ./gio/System/GIO/File/File.chs 254 -marshalFileProgressCallback :: FileProgressCallback -> IO {# type GFileProgressCallback #} +foreign import ccall "wrapper" mkFileProgressCallback :: + ({#type goffset #} -> {#type goffset #} -> Ptr () -> IO ()) -> IO GFileProgressCallback + +marshalFileProgressCallback :: FileProgressCallback -> IO GFileProgressCallback hunk ./gio/System/GIO/File/File.chs 259 - makeFileProgressCallback cFileProgressCallback - where cFileProgressCallback :: CFileProgressCallback - cFileProgressCallback cCurrentNumBytes cTotalNumBytes _ = do - fileProgressCallback (fromIntegral cCurrentNumBytes) - (fromIntegral cTotalNumBytes) + mkFileProgressCallback $ \ cCurrentNumBytes cTotalNumBytes _ -> do + fileProgressCallback [_$_] + (fromIntegral cCurrentNumBytes) + (fromIntegral cTotalNumBytes) hunk ./gio/System/GIO/File/File.chs 266 --- | Constructs a GFile for a given path. This operation never fails, but the returned object might not +-- | Constructs a 'File' for a given path. This operation never fails, but the returned object might not hunk ./gio/System/GIO/File/File.chs 270 - unsafePerformIO $ withUTFString path $ \cPath -> {# call file_new_for_path #} cPath >>= takeGObject + unsafePerformIO $ constructNewGObject mkFile $ [_$_] + withUTFString path $ \cPath -> {# call file_new_for_path #} cPath hunk ./gio/System/GIO/File/File.chs 273 --- | Constructs a GFile for a given URI. This operation never fails, but the returned object might not +-- | Constructs a 'File' for a given URI. This operation never fails, but the returned object might not hunk ./gio/System/GIO/File/File.chs 277 - unsafePerformIO $ withUTFString uri $ \cURI -> {# call file_new_for_uri #} cURI >>= takeGObject + unsafePerformIO $ constructNewGObject mkFile $ [_$_] + withUTFString uri $ \cURI -> {# call file_new_for_uri #} cURI [_$_] hunk ./gio/System/GIO/File/File.chs 280 --- | Creates a GFile with the given argument from the command line. The value of arg can be either a URI, +-- | Creates a 'File' with the given argument from the command line. The value of arg can be either a URI, hunk ./gio/System/GIO/File/File.chs 286 - unsafePerformIO $ withUTFString arg $ \cArg -> {# call file_new_for_commandline_arg #} cArg >>= takeGObject + unsafePerformIO $ constructNewGObject mkFile $ [_$_] + withUTFString arg $ \cArg -> {# call file_new_for_commandline_arg #} cArg [_$_] hunk ./gio/System/GIO/File/File.chs 289 --- | Constructs a GFile with the given 'name (i.e. something given by gFileGetParseName'. This +-- | Constructs a 'File' with the given name (i.e. something given by 'fileParseName'. This hunk ./gio/System/GIO/File/File.chs 294 - unsafePerformIO $ withUTFString parseName $ \cParseName -> {# call file_parse_name #} cParseName >>= takeGObject + unsafePerformIO $ constructNewGObject mkFile $ [_$_] + withUTFString parseName $ \cParseName -> {# call file_parse_name #} cParseName [_$_] hunk ./gio/System/GIO/File/File.chs 309 --- | Gets the base name (the last component of the path) for a given GFile. +-- | Gets the base name (the last component of the path) for a given 'File'. hunk ./gio/System/GIO/File/File.chs 316 --- name that you can get by requesting the GFileAttributeStandardDisplayName attribute with +-- name that you can get by requesting the 'FileAttributeStandardDisplayName' attribute with hunk ./gio/System/GIO/File/File.chs 322 - unsafePerformIO $ {# call file_get_basename #} (toFile file) >>= readUTFString + unsafePerformIO $ {# call file_get_basename #} (toFile file) >>= readCString hunk ./gio/System/GIO/File/File.chs 324 --- | Gets the local pathname for GFile, if one exists. +-- | Gets the local pathname for 'File', if one exists. hunk ./gio/System/GIO/File/File.chs 339 --- one can get the GFile back using 'fileParseName'. +-- one can get the 'File' back using 'fileParseName'. hunk ./gio/System/GIO/File/File.chs 341 --- This is generally used to show the GFile as a nice full-pathname kind of string in a user interface, +-- This is generally used to show the 'File' as a nice full-pathname kind of string in a user interface, hunk ./gio/System/GIO/File/File.chs 358 - unsafePerformIO $ {# call file_get_parent #} (toFile file) >>= maybePeek takeGObject + unsafePerformIO $ maybeNull (makeNewGObject mkFile) $ [_$_] + {# call file_get_parent #} (toFile file) [_$_] hunk ./gio/System/GIO/File/File.chs 377 --- Note that the file with that specific name might not exist, but you can still have a GFile that +-- Note that the file with that specific name might not exist, but you can still have a 'File' that hunk ./gio/System/GIO/File/File.chs 383 - unsafePerformIO $ + unsafePerformIO $ makeNewGObject mkFile $ hunk ./gio/System/GIO/File/File.chs 385 - {# call file_get_child #} (toFile file) cName >>= takeGObject + {# call file_get_child #} (toFile file) cName hunk ./gio/System/GIO/File/File.chs 388 --- fails, it returns 'Nothing' and error will be set. This is very useful when constructing a GFile for a +-- fails, it returns 'Nothing' and error will be set. This is very useful when constructing a 'File' for a hunk ./gio/System/GIO/File/File.chs 395 - unsafePerformIO $ + unsafePerformIO $ maybeNull (makeNewGObject mkFile) $ hunk ./gio/System/GIO/File/File.chs 397 - propagateGError ({# call file_get_child_for_display_name #} (toFile file) cDisplayName) >>= - maybePeek takeGObject + propagateGError ({# call file_get_child_for_display_name #} (toFile file) cDisplayName) hunk ./gio/System/GIO/File/File.chs 425 - unsafePerformIO $ + unsafePerformIO $ maybeNull (makeNewGObject mkFile) $ hunk ./gio/System/GIO/File/File.chs 427 - {# call file_resolve_relative_path #} (toFile file) cRelativePath >>= - maybePeek takeGObject + {# call file_resolve_relative_path #} (toFile file) cRelativePath hunk ./gio/System/GIO/File/File.chs 431 --- A native file s one expressed in the platform-native filename format, e.g. \"C:\\Windows\" or +-- A native file s one expressed in the platform-native filename format, e.g. \"C:\Windows\" or hunk ./gio/System/GIO/File/File.chs 436 --- filesystem (FUSE), in these cases this call will return @False@, but 'fileGetPath' will still +-- filesystem (FUSE), in these cases this call will return 'False', but 'fileGetPath' will still hunk ./gio/System/GIO/File/File.chs 445 --- | Checks to see if a 'GFile' has a given URI scheme. +-- | Checks to see if a 'File' has a given URI scheme. hunk ./gio/System/GIO/File/File.chs 454 --- | Gets the URI scheme for a GFile. RFC 3986 decodes the scheme as: +-- | Gets the URI scheme for a 'File'. RFC 3986 decodes the scheme as: hunk ./gio/System/GIO/File/File.chs 465 --- | Opens a file for reading. The result is a GFileInputStream that can be used to read the contents of +-- | Opens a file for reading. The result is a 'FileInputStream' that can be used to read the contents of hunk ./gio/System/GIO/File/File.chs 469 --- from another thread. If the operation was cancelled, the error GIoErrorCancelled will be +-- from another thread. If the operation was cancelled, the error 'IoErrorCancelled' will be hunk ./gio/System/GIO/File/File.chs 472 --- If the file does not exist, the GIoErrorNotFound error will be returned. If the file is a --- directory, the GIoErrorIsDirectory error will be returned. Other errors are possible too, and +-- If the file does not exist, the 'IoErrorNotFound' error will be returned. If the file is a +-- directory, the 'IoErrorIsDirectory' error will be returned. Other errors are possible too, and hunk ./gio/System/GIO/File/File.chs 476 -fileRead file (Just cancellable) = constructNewGObject mkFileInputStream $ - propagateGError $ {# call file_read #} (toFile file) cancellable -fileRead file Nothing = constructNewGObject mkFileInputStream $ - propagateGError $ {# call file_read #} (toFile file) (Cancellable nullForeignPtr) +fileRead file cancellable = + constructNewGObject mkFileInputStream $ + withGObject (toFile file) $ \cFile -> + maybeWith withGObject cancellable $ \cCancellable -> + propagateGError (g_file_read cFile cCancellable) [_$_] + where _ = {# call file_read #} hunk ./gio/System/GIO/File/File.chs 512 - propagateGError ({# call file_read_finish #} (toFile file) asyncResult) >>= takeGObject + constructNewGObject mkFileInputStream $ + propagateGError ({# call file_read_finish #} (toFile file) asyncResult) hunk ./gio/System/GIO/File/File.chs 518 --- By default files created are generally readable by everyone, but if you pass GFileCreatePrivate +-- By default files created are generally readable by everyone, but if you pass 'FileCreatePrivate' hunk ./gio/System/GIO/File/File.chs 523 --- from another thread. If the operation was cancelled, the error GIoErrorCancelled will be +-- from another thread. If the operation was cancelled, the error 'IoErrorCancelled' will be hunk ./gio/System/GIO/File/File.chs 526 --- Some file systems don't allow all file names, and may return an GIoErrorInvalidFilename --- error. If the file is a directory the GIoErrorIsDirectory error will be returned. Other errors +-- Some file systems don't allow all file names, and may return an 'IoErrorInvalidFilename' +-- error. If the file is a directory the 'IoErrorIsDirectory' error will be returned. Other errors hunk ./gio/System/GIO/File/File.chs 535 + makeNewGObject mkFileOutputStream $ hunk ./gio/System/GIO/File/File.chs 538 - propagateGError (g_file_append_to cFile (cFromFlags flags) cCancellable) >>= - takeGObject + propagateGError (g_file_append_to cFile ((fromIntegral . fromFlags) flags) cCancellable) hunk ./gio/System/GIO/File/File.chs 543 --- By default files created are generally readable by everyone, but if you pass GFileCreatePrivate +-- By default files created are generally readable by everyone, but if you pass 'FileCreatePrivate' hunk ./gio/System/GIO/File/File.chs 548 --- from another thread. If the operation was cancelled, the error GIoErrorCancelled will be +-- from another thread. If the operation was cancelled, the error 'IoErrorCancelled' will be hunk ./gio/System/GIO/File/File.chs 551 --- If a file or directory with this name already exists the GIoErrorExists error will be +-- If a file or directory with this name already exists the 'IoErrorExists' error will be hunk ./gio/System/GIO/File/File.chs 553 --- GIoErrorInvalidFilename error, and if the name is to long GIoErrorFilenameTooLong will be +-- 'IoErrorInvalidFilename' error, and if the name is to long 'IoErrorFilenameTooLong' will be hunk ./gio/System/GIO/File/File.chs 561 + constructNewGObject mkFileOutputStream $ hunk ./gio/System/GIO/File/File.chs 564 - propagateGError (g_file_create cFile (cFromFlags flags) cCancellable) >>= - takeGObject + propagateGError (g_file_create cFile ((fromIntegral . fromFlags) flags) cCancellable) hunk ./gio/System/GIO/File/File.chs 574 --- By default files created are generally readable by everyone, but if you pass GFileCreatePrivate +-- By default files created are generally readable by everyone, but if you pass 'FileCreatePrivate' hunk ./gio/System/GIO/File/File.chs 579 --- from another thread. If the operation was cancelled, the error GIoErrorCancelled will be +-- from another thread. If the operation was cancelled, the error 'IoErrorCancelled' will be hunk ./gio/System/GIO/File/File.chs 583 --- file, and if they differ an GIoErrorWrongEtag error is returned. This generally means that the +-- file, and if they differ an 'IoErrorWrongEtag' error is returned. This generally means that the hunk ./gio/System/GIO/File/File.chs 585 --- 'fileOutputStreamGetEtag' after you've finished writing and closed the GFileOutputStream. +-- 'fileOutputStreamGetEtag' after you've finished writing and closed the 'FileOutputStream'. hunk ./gio/System/GIO/File/File.chs 589 --- overwriting it. If this fails a GIoErrorCantCreateBackup error will be returned. If you want to +-- overwriting it. If this fails a 'IoErrorCantCreateBackup' error will be returned. If you want to hunk ./gio/System/GIO/File/File.chs 592 --- If the file is a directory the GIoErrorIsDirectory error will be returned, and if the file is --- some other form of non-regular file then a GIoErrorNotRegularFile error will be returned. Some --- file systems don't allow all file names, and may return an GIoErrorInvalidFilename error, and if --- the name is to long GIoErrorFilenameTooLong will be returned. Other errors are possible too, +-- If the file is a directory the 'IoErrorIsDirectory' error will be returned, and if the file is +-- some other form of non-regular file then a 'IoErrorNotRegularFile' error will be returned. Some +-- file systems don't allow all file names, and may return an 'IoErrorInvalidFilename' error, and if +-- the name is to long 'IoErrorFilenameTooLong' will be returned. Other errors are possible too, hunk ./gio/System/GIO/File/File.chs 605 + makeNewGObject mkFileOutputStream $ hunk ./gio/System/GIO/File/File.chs 612 - (cFromFlags flags) cCancellable) >>= - takeGObject + ((fromIntegral . fromFlags) flags) cCancellable) hunk ./gio/System/GIO/File/File.chs 633 - (cFromFlags flags) + ((fromIntegral . fromFlags) flags) hunk ./gio/System/GIO/File/File.chs 646 - propagateGError ({# call file_append_to_finish #} (toFile file) asyncResult) >>= takeGObject + constructNewGObject mkFileOutputStream $ + propagateGError ({# call file_append_to_finish #} (toFile file) asyncResult) hunk ./gio/System/GIO/File/File.chs 668 - (cFromFlags flags) + ((fromIntegral . fromFlags) flags) hunk ./gio/System/GIO/File/File.chs 681 - propagateGError ({# call file_create_finish #} (toFile file) asyncResult) >>= takeGObject + constructNewGObject mkFileOutputStream $ + propagateGError ({# call file_create_finish #} (toFile file) asyncResult) hunk ./gio/System/GIO/File/File.chs 708 - (cFromFlags flags) + ((fromIntegral . fromFlags) flags) hunk ./gio/System/GIO/File/File.chs 721 - propagateGError ({# call file_replace_finish #} (toFile file) asyncResult) >>= takeGObject + constructNewGObject mkFileOutputStream $ + propagateGError ({# call file_replace_finish #} (toFile file) asyncResult) hunk ./gio/System/GIO/File/File.chs 724 --- | Gets the requested information about specified file. The result is a 'GFileInfo' object that contains +-- | Gets the requested information about specified file. The result is a 'FileInfo' object that contains hunk ./gio/System/GIO/File/File.chs 732 --- are available as defines, like 'GFileAttributeStandardName'. +-- are available as defines, like 'FileAttributeStandardName'. hunk ./gio/System/GIO/File/File.chs 735 --- from another thread. If the operation was cancelled, the error 'GIoErrorCancelled' will be +-- from another thread. If the operation was cancelled, the error 'IoErrorCancelled' will be hunk ./gio/System/GIO/File/File.chs 739 --- information about the symlink itself. However if you pass 'GFileQueryInfoNofollowSymlinks' in +-- information about the symlink itself. However if you pass 'FileQueryInfoNofollowSymlinks' in hunk ./gio/System/GIO/File/File.chs 743 --- If the file does not exist, the 'GIoErrorNotFound' error will be returned. Other errors are +-- If the file does not exist, the 'IoErrorNotFound' error will be returned. Other errors are hunk ./gio/System/GIO/File/File.chs 752 + makeNewGObject mkFileInfo $ hunk ./gio/System/GIO/File/File.chs 756 - propagateGError (g_file_query_info cFile cAttributes (cFromFlags flags) cCancellable) >>= - takeGObject + propagateGError (g_file_query_info cFile cAttributes ((fromIntegral . fromFlags) flags) cCancellable) hunk ./gio/System/GIO/File/File.chs 759 --- | Asynchronously gets the requested information about specified file. The --- result is a 'GFileInfo' object that contains key-value attributes (such as --- type or size for the file). --- [_$_] --- For more details, see 'fileQueryInfo' which is the synchronous version of --- this call. --- [_$_] +-- | Asynchronously gets the requested information about specified file. The result is a 'FileInfo' object +-- that contains key-value attributes (such as type or size for the file). +-- [_$_] +-- For more details, see 'fileQueryInfo' which is the synchronous version of this call. +-- [_$_] hunk ./gio/System/GIO/File/File.chs 781 - (cFromFlags flags) + ((fromIntegral . fromFlags) flags) hunk ./gio/System/GIO/File/File.chs 794 - propagateGError ({#call file_query_info_finish #} (toFile file) asyncResult) >>= takeGObject + constructNewGObject mkFileInfo $ + propagateGError ({#call file_query_info_finish #} (toFile file) asyncResult) hunk ./gio/System/GIO/File/File.chs 809 --- 'fileCreate' which will either atomically create the file or fail with a GIoErrorExists error. +-- 'fileCreate' which will either atomically create the file or fail with a 'IoErrorExists' error. hunk ./gio/System/GIO/File/File.chs 818 - -> IO Bool + -> Bool hunk ./gio/System/GIO/File/File.chs 820 + unsafePerformIO $ hunk ./gio/System/GIO/File/File.chs 827 --- | Utility function to inspect the GFileType of a file. This is implemented using 'fileQueryInfo' +-- | Utility function to inspect the 'FileType' of a file. This is implemented using 'fileQueryInfo' hunk ./gio/System/GIO/File/File.chs 835 - -> IO FileType + -> FileType hunk ./gio/System/GIO/File/File.chs 837 - liftM (toEnum . fromIntegral) $ + (toEnum . fromIntegral) $ + unsafePerformIO $ [_$_] hunk ./gio/System/GIO/File/File.chs 841 - (g_file_query_file_type cFile (cFromFlags flags) cCancellable) + (g_file_query_file_type cFile ((fromIntegral . fromFlags) flags) cCancellable) hunk ./gio/System/GIO/File/File.chs 851 --- wildcard "*" means all attributes, and a wildcard like "fs:*" means all attributes in the fs +-- wildcard \"*\" means all attributes, and a wildcard like "fs:*" means all attributes in the fs hunk ./gio/System/GIO/File/File.chs 854 --- 'FILEAttributeFilesystemFree (Number Of Bytes Available)', and GFileAttributeFilesystemType +-- 'FILEAttributeFilesystemFree (Number Of Bytes Available)', and 'FileAttributeFilesystemType' hunk ./gio/System/GIO/File/File.chs 858 --- from another thread. If the operation was cancelled, the error GIoErrorCancelled will be +-- from another thread. If the operation was cancelled, the error 'IoErrorCancelled' will be hunk ./gio/System/GIO/File/File.chs 861 --- If the file does not exist, the GIoErrorNotFound error will be returned. Other errors are +-- If the file does not exist, the 'IoErrorNotFound' error will be returned. Other errors are hunk ./gio/System/GIO/File/File.chs 869 + makeNewGObject mkFileInfo $ hunk ./gio/System/GIO/File/File.chs 873 - propagateGError (g_file_query_filesystem_info cFile cAttributes cCancellable) >>= - takeGObject + propagateGError (g_file_query_filesystem_info cFile cAttributes cCancellable) hunk ./gio/System/GIO/File/File.chs 877 --- on. The result is a GFileInfo object that contains key-value attributes (such as type or size for +-- on. The result is a 'FileInfo' object that contains key-value attributes (such as type or size for hunk ./gio/System/GIO/File/File.chs 910 - propagateGError ({# call file_query_filesystem_info_finish #} (toFile file) asyncResult) >>= - takeGObject + constructNewGObject mkFileInfo $ + propagateGError ({# call file_query_filesystem_info_finish #} (toFile file) asyncResult) hunk ./gio/System/GIO/File/File.chs 913 --- | Returns the GAppInfo that is registered as the default application to handle the file specified by +-- | Returns the 'AppInfo' that is registered as the default application to handle the file specified by hunk ./gio/System/GIO/File/File.chs 917 --- from another thread. If the operation was cancelled, the error GIoErrorCancelled will be +-- from another thread. If the operation was cancelled, the error 'IoErrorCancelled' will be hunk ./gio/System/GIO/File/File.chs 924 + makeNewGObject mkAppInfo $ hunk ./gio/System/GIO/File/File.chs 927 - propagateGError (g_file_query_default_handler cFile cCancellable) >>= - takeGObject + propagateGError (g_file_query_default_handler cFile cCancellable) hunk ./gio/System/GIO/File/File.chs 930 --- | Gets a GMount for the GFile. +-- | Gets a 'Mount' for the 'File'. hunk ./gio/System/GIO/File/File.chs 932 --- If the GFileIface for file does not have a mount (e.g. possibly a remote share), error will be set --- to GIoErrorNotFound and 'Nothing' will be returned. +-- If the 'FileIface' for file does not have a mount (e.g. possibly a remote share), error will be set +-- to 'IoErrorNotFound' and 'Nothing' will be returned. hunk ./gio/System/GIO/File/File.chs 936 --- from another thread. If the operation was cancelled, the error GIoErrorCancelled will be +-- from another thread. If the operation was cancelled, the error 'IoErrorCancelled' will be hunk ./gio/System/GIO/File/File.chs 943 + makeNewGObject mkMount $ hunk ./gio/System/GIO/File/File.chs 946 - propagateGError (g_file_find_enclosing_mount cFile cCancellable) >>= - takeGObject + propagateGError (g_file_find_enclosing_mount cFile cCancellable) hunk ./gio/System/GIO/File/File.chs 978 - propagateGError ({# call file_find_enclosing_mount_finish #} (toFile file) asyncResult) >>= - takeGObject + makeNewGObject mkMount $ + propagateGError ({# call file_find_enclosing_mount_finish #} (toFile file) asyncResult) hunk ./gio/System/GIO/File/File.chs 981 --- | Gets the requested information about the files in a directory. The result is a 'GFileEnumerator' --- object that will give out 'GFileInfo' objects for all the files in the directory. +-- | Gets the requested information about the files in a directory. The result is a 'FileEnumerator' +-- object that will give out 'FileInfo' objects for all the files in the directory. hunk ./gio/System/GIO/File/File.chs 989 --- are available as defines, like 'GFileAttributeStandardName'. +-- are available as defines, like 'FileAttributeStandardName'. hunk ./gio/System/GIO/File/File.chs 991 --- If cancellable is not @Nothing@, then the operation can be cancelled by triggering the cancellable object --- from another thread. If the operation was cancelled, the error 'GIoErrorCancelled' will be +-- If cancellable is not 'Nothing', then the operation can be cancelled by triggering the cancellable object +-- from another thread. If the operation was cancelled, the error 'IoErrorCancelled' will be hunk ./gio/System/GIO/File/File.chs 995 --- If the file does not exist, the 'GIoErrorNotFound' error will be returned. If the file is not a --- directory, the 'GFileErrorNotdir' error will be returned. Other errors are possible too. +-- If the file does not exist, the 'IoErrorNotFound' error will be returned. If the file is not a +-- directory, the 'FileErrorNotdir' error will be returned. Other errors are possible too. hunk ./gio/System/GIO/File/File.chs 1004 + makeNewGObject mkFileEnumerator $ hunk ./gio/System/GIO/File/File.chs 1008 - propagateGError (g_file_enumerate_children cFile cAttributes (cFromFlags flags) cCancellable) >>= - takeGObject + propagateGError (g_file_enumerate_children cFile cAttributes ((fromIntegral . fromFlags) flags) cCancellable) hunk ./gio/System/GIO/File/File.chs 1012 --- GFileEnumerator object that will give out GFileInfo objects for all the files in the directory. +-- 'FileEnumerator' object that will give out 'FileInfo' objects for all the files in the directory. hunk ./gio/System/GIO/File/File.chs 1033 - (cFromFlags flags) + ((fromIntegral . fromFlags) flags) hunk ./gio/System/GIO/File/File.chs 1046 - propagateGError ({# call file_enumerate_children_finish #} (toFile file) asyncResult) >>= - takeGObject + constructNewGObject mkFileEnumerator $ + propagateGError ({# call file_enumerate_children_finish #} (toFile file) asyncResult) hunk ./gio/System/GIO/File/File.chs 1055 --- (GFileAttributeStandardEditName) should be used as the initial value in the rename widget, and +-- ('FileAttributeStandardEditName') should be used as the initial value in the rename widget, and hunk ./gio/System/GIO/File/File.chs 1061 --- from another thread. If the operation was cancelled, the error GIoErrorCancelled will be +-- from another thread. If the operation was cancelled, the error 'IoErrorCancelled' will be hunk ./gio/System/GIO/File/File.chs 1069 + makeNewGObject mkFile $ hunk ./gio/System/GIO/File/File.chs 1073 - propagateGError (g_file_set_display_name cFile cDisplayName cCancellable) >>= - takeGObject + propagateGError (g_file_set_display_name cFile cDisplayName cCancellable) hunk ./gio/System/GIO/File/File.chs 1076 --- | Asynchronously sets the display name for a given GFile. +-- | Asynchronously sets the display name for a given 'File'. hunk ./gio/System/GIO/File/File.chs 1108 - propagateGError ({# call file_set_display_name_finish #} (toFile file) asyncResult) >>= - takeGObject + makeNewGObject mkFile $ + propagateGError ({# call file_set_display_name_finish #} (toFile file) asyncResult) hunk ./gio/System/GIO/File/File.chs 1114 --- from another thread. If the operation was cancelled, the error GIoErrorCancelled will be +-- from another thread. If the operation was cancelled, the error 'IoErrorCancelled' will be hunk ./gio/System/GIO/File/File.chs 1128 --- GIoErrorNotSupported error. +-- 'IoErrorNotSupported' error. hunk ./gio/System/GIO/File/File.chs 1131 --- from another thread. If the operation was cancelled, the error GIoErrorCancelled will be +-- from another thread. If the operation was cancelled, the error 'IoErrorCancelled' will be hunk ./gio/System/GIO/File/File.chs 1146 --- If the flag GFileCopyOverwrite is specified an already existing destination file is overwritten. +-- If the flag 'FileCopyOverwrite' is specified an already existing destination file is overwritten. hunk ./gio/System/GIO/File/File.chs 1148 --- If the flag GFileCopyNofollowSymlinks is specified then symlinks will be copied as symlinks, +-- If the flag 'FileCopyNofollowSymlinks' is specified then symlinks will be copied as symlinks, hunk ./gio/System/GIO/File/File.chs 1152 --- from another thread. If the operation was cancelled, the error GIoErrorCancelled will be +-- from another thread. If the operation was cancelled, the error 'IoErrorCancelled' will be hunk ./gio/System/GIO/File/File.chs 1156 --- GFileProgressCallback function. @progressCallbackData@ will be passed to this function. It is +-- 'FileProgressCallback' function. @progressCallbackData@ will be passed to this function. It is hunk ./gio/System/GIO/File/File.chs 1160 --- If the source file does not exist then the GIoErrorNotFound error is returned, independent on +-- If the source file does not exist then the 'IoErrorNotFound' error is returned, independent on hunk ./gio/System/GIO/File/File.chs 1163 --- If GFileCopyOverwrite is not specified and the target exists, then the error GIoErrorExists is +-- If 'FileCopyOverwrite' is not specified and the target exists, then the error 'IoErrorExists' is hunk ./gio/System/GIO/File/File.chs 1166 --- If trying to overwrite a file over a directory the GIoErrorIsDirectory error is returned. If --- trying to overwrite a directory with a directory the GIoErrorWouldMerge error is returned. +-- If trying to overwrite a file over a directory the 'IoErrorIsDirectory' error is returned. If +-- trying to overwrite a directory with a directory the 'IoErrorWouldMerge' error is returned. hunk ./gio/System/GIO/File/File.chs 1169 --- If the source is a directory and the target does not exist, or GFileCopyOverwrite is specified --- and the target is a file, then the GIoErrorWouldRecurse error is returned. +-- If the source is a directory and the target does not exist, or 'FileCopyOverwrite' is specified +-- and the target is a file, then the 'IoErrorWouldRecurse' error is returned. hunk ./gio/System/GIO/File/File.chs 1172 --- If you are interested in copying the GFile object itself (not the on-disk file), see 'fileDup'. +-- If you are interested in copying the 'File' object itself (not the on-disk file), see 'fileDup'. hunk ./gio/System/GIO/File/File.chs 1188 - (cFromFlags flags) + ((fromIntegral . fromFlags) flags) hunk ./gio/System/GIO/File/File.chs 1226 - (cFromFlags flags) + ((fromIntegral . fromFlags) flags) hunk ./gio/System/GIO/File/File.chs 1248 --- If the flag GFileCopyOverwrite is specified an already existing destination file is overwritten. +-- If the flag 'FileCopyOverwrite' is specified an already existing destination file is overwritten. hunk ./gio/System/GIO/File/File.chs 1250 --- If the flag GFileCopyNofollowSymlinks is specified then symlinks will be copied as symlinks, +-- If the flag 'FileCopyNofollowSymlinks' is specified then symlinks will be copied as symlinks, hunk ./gio/System/GIO/File/File.chs 1254 --- from another thread. If the operation was cancelled, the error GIoErrorCancelled will be +-- from another thread. If the operation was cancelled, the error 'IoErrorCancelled' will be hunk ./gio/System/GIO/File/File.chs 1258 --- GFileProgressCallback function. @progressCallbackData@ will be passed to this function. It is +-- 'FileProgressCallback' function. @progressCallbackData@ will be passed to this function. It is hunk ./gio/System/GIO/File/File.chs 1262 --- If the source file does not exist then the GIoErrorNotFound error is returned, independent on +-- If the source file does not exist then the 'IoErrorNotFound' error is returned, independent on hunk ./gio/System/GIO/File/File.chs 1265 --- If GFileCopyOverwrite is not specified and the target exists, then the error GIoErrorExists is +-- If 'FileCopyOverwrite' is not specified and the target exists, then the error 'IoErrorExists' is hunk ./gio/System/GIO/File/File.chs 1268 --- If trying to overwrite a file over a directory the GIoErrorIsDirectory error is returned. If --- trying to overwrite a directory with a directory the GIoErrorWouldMerge error is returned. +-- If trying to overwrite a file over a directory the 'IoErrorIsDirectory' error is returned. If +-- trying to overwrite a directory with a directory the 'IoErrorWouldMerge' error is returned. hunk ./gio/System/GIO/File/File.chs 1271 --- If the source is a directory and the target does not exist, or GFileCopyOverwrite is specified --- and the target is a file, then the GIoErrorWouldRecurse error may be returned (if the native +-- If the source is a directory and the target does not exist, or 'FileCopyOverwrite' is specified +-- and the target is a file, then the 'IoErrorWouldRecurse' error may be returned (if the native hunk ./gio/System/GIO/File/File.chs 1289 - (cFromFlags flags) + ((fromIntegral . fromFlags) flags) hunk ./gio/System/GIO/File/File.chs 1300 --- directory of the path or URI given by the GFile. To recursively create directories, see +-- directory of the path or URI given by the 'File'. To recursively create directories, see hunk ./gio/System/GIO/File/File.chs 1302 --- exist, setting error to GIoErrorNotFound. If the file system doesn't support creating --- directories, this function will fail, setting error to GIoErrorNotSupported. +-- exist, setting error to 'IoErrorNotFound'. If the file system doesn't support creating +-- directories, this function will fail, setting error to 'IoErrorNotSupported'. hunk ./gio/System/GIO/File/File.chs 1305 --- For a local GFile the newly created directory will have the default (current) ownership and +-- For a local 'File' the newly created directory will have the default (current) ownership and hunk ./gio/System/GIO/File/File.chs 1309 --- from another thread. If the operation was cancelled, the error GIoErrorCancelled will be +-- from another thread. If the operation was cancelled, the error 'IoErrorCancelled' will be hunk ./gio/System/GIO/File/File.chs 1325 --- GIoErrorNotSupported. +-- 'IoErrorNotSupported'. hunk ./gio/System/GIO/File/File.chs 1327 --- For a local GFile the newly created directories will have the default (current) ownership and +-- For a local 'File' the newly created directories will have the default (current) ownership and hunk ./gio/System/GIO/File/File.chs 1331 --- from another thread. If the operation was cancelled, the error GIoErrorCancelled will be +-- from another thread. If the operation was cancelled, the error 'IoErrorCancelled' will be hunk ./gio/System/GIO/File/File.chs 1348 --- from another thread. If the operation was cancelled, the error GIoErrorCancelled will be +-- from another thread. If the operation was cancelled, the error 'IoErrorCancelled' will be hunk ./gio/System/GIO/File/File.chs 1381 --- from another thread. If the operation was cancelled, the error GIoErrorCancelled will be +-- from another thread. If the operation was cancelled, the error 'IoErrorCancelled' will be hunk ./gio/System/GIO/File/File.chs 1399 --- from another thread. If the operation was cancelled, the error GIoErrorCancelled will be +-- from another thread. If the operation was cancelled, the error 'IoErrorCancelled' will be hunk ./gio/System/GIO/File/File.chs 1413 +-- | Tries to set all attributes in the 'FileInfo' on the target values, not stopping on the first error. +-- [_$_] +-- If there is any error during this operation then error will be set to the first error. Error on +-- particular fields are flagged by setting the "status" field in the attribute value to +-- 'FileAttributeStatusErrorSetting', which means you can also detect further errors. +-- [_$_] +-- If cancellable is not 'Nothing', then the operation can be cancelled by triggering the cancellable object +-- from another thread. If the operation was cancelled, the error 'IoErrorCancelled' will be +-- returned. +fileSetAttributesFromInfo :: FileClass file => file + -> FileInfo + -> [FileQueryInfoFlags] + -> Maybe Cancellable -- ^ @cancellable@ optional 'Cancellable' object, 'Nothing' to ignore. [_$_] + -> IO Bool -- ^ returns 'True' if there was any error, 'False' otherwise. [_$_] +fileSetAttributesFromInfo file fileInfo flags cancellable = + liftM toBool $ + withGObject (toFile file) $ \cFile -> + withGObject (toFileInfo fileInfo) $ \cFileInfo -> + maybeWith withGObject cancellable $ \cCancellable -> + propagateGError (g_file_set_attributes_from_info cFile cFileInfo ((fromIntegral . fromFlags) flags) cCancellable) + where _ = {# call g_file_set_attributes_from_info #} + +-- | Asynchronously sets the attributes of file with info. +-- [_$_] +-- For more details, see 'fileSetAttributesFromInfo' which is the synchronous version of this +-- call. +-- [_$_] +-- When the operation is finished, callback will be called. You can then call +-- 'fileSetAttributesFinish' to get the result of the operation. +fileSetAttributesFromInfoAsync :: FileClass file => file + -> FileInfo + -> [FileQueryInfoFlags] + -> Int -- ^ @ioPriority@ the I/O priority of the request. [_$_] + -> Maybe Cancellable -- ^ @cancellable@ optional 'Cancellable' object, 'Nothing' to ignore. [_$_] + -> AsyncReadyCallback + -> IO () -- ^ returns 'True' if there was any error, 'False' otherwise. [_$_] +fileSetAttributesFromInfoAsync file fileInfo flags ioPriority cancellable callback = + withGObject (toFile file) $ \cFile -> + withGObject (toFileInfo fileInfo) $ \cFileInfo -> + maybeWith withGObject cancellable $ \cCancellable -> do + cCallback <- marshalAsyncReadyCallback callback + g_file_set_attributes_async [_$_] + cFile [_$_] + cFileInfo [_$_] + ((fromIntegral . fromFlags) flags) [_$_] + (fromIntegral ioPriority) + cCancellable + cCallback + (castFunPtrToPtr cCallback) + where _ = {# call g_file_set_attributes_async #} + +-- | Finishes setting an attribute started in 'fileSetAttributesAsync'. +fileSetAttributesFinish :: FileClass file + => file + -> AsyncResult + -> FileInfo + -> IO Bool -- ^ returns 'True' if the attributes were set correctly, 'False' otherwise. [_$_] +fileSetAttributesFinish file asyncResult fileInfo = + liftM toBool $ + withGObject (toFileInfo fileInfo) $ \cFileInfo -> + propagateGError ({# call g_file_set_attributes_finish #} (toFile file) asyncResult cFileInfo) + +-- | Sets attribute of type 'FileAttributeTypeString' to value. If attribute is of a different type, +-- this operation will fail. +-- [_$_] +-- If cancellable is not 'Nothing', then the operation can be cancelled by triggering the cancellable object +-- from another thread. If the operation was cancelled, the error 'IoErrorCancelled' will be +-- returned. +fileSetAttributeString :: FileClass file => file + -> String -- ^ @attribute@ a string containing the attribute's name. [_$_] + -> String -- ^ @value@ a string containing the attribute's value. [_$_] + -> [FileQueryInfoFlags] -- ^ @flags@ 'FileQueryInfoFlags'. [_$_] + -> Maybe Cancellable -- ^ @cancellable@ optional 'Cancellable' object, 'Nothing' to ignore. [_$_] + -> IO Bool -- ^ returns 'True' if the attribute was successfully set, 'False' otherwise. [_$_] +fileSetAttributeString file attribute value flags cancellable = + liftM toBool $ + withGObject (toFile file) $ \cFile -> + withUTFString attribute $ \ attributePtr -> [_$_] + withUTFString value $ \ valuePtr -> [_$_] + maybeWith withGObject cancellable $ \cCancellable -> do + propagateGError (g_file_set_attribute_string [_$_] + cFile [_$_] + attributePtr + valuePtr + ((fromIntegral . fromFlags) flags) [_$_] + cCancellable) + where _ = {# call g_file_set_attribute_string #} + +-- | Sets attribute of type 'FileAttributeTypeByteString' to value. If attribute is of a different +-- type, this operation will fail, returning 'False'. +-- [_$_] +-- If cancellable is not 'Nothing', then the operation can be cancelled by triggering the cancellable object +-- from another thread. If the operation was cancelled, the error 'IoErrorCancelled' will be +-- returned. +fileSetAttributeByteString :: FileClass file => file + -> String -- ^ @attribute@ a string containing the attribute's name. [_$_] + -> String -- ^ @value@ a string containing the attribute's value. [_$_] + -> [FileQueryInfoFlags] -- ^ @flags@ 'FileQueryInfoFlags'. [_$_] + -> Maybe Cancellable -- ^ @cancellable@ optional 'Cancellable' object, 'Nothing' to ignore. [_$_] + -> IO Bool -- ^ returns 'True' if the attribute was successfully set, 'False' otherwise. [_$_] +fileSetAttributeByteString file attribute value flags cancellable = + liftM toBool $ + withGObject (toFile file) $ \cFile -> + withCString attribute $ \ attributePtr -> [_$_] + withCString value $ \ valuePtr -> [_$_] + maybeWith withGObject cancellable $ \cCancellable -> do + propagateGError (g_file_set_attribute_byte_string [_$_] + cFile [_$_] + attributePtr + valuePtr + ((fromIntegral . fromFlags) flags) [_$_] + cCancellable) + where _ = {# call g_file_set_attribute_byte_string #} + +-- | Sets attribute of type 'FileAttributeTypeUint32' to value. If attribute is of a different type, +-- this operation will fail. +-- [_$_] +-- If cancellable is not 'Nothing', then the operation can be cancelled by triggering the cancellable object +-- from another thread. If the operation was cancelled, the error 'IoErrorCancelled' will be +-- returned. +fileSetAttributeWord32 :: FileClass file => file + -> String -- ^ @attribute@ a string containing the attribute's name. [_$_] + -> Word32 -- ^ @value@ a Word32 containing the attribute's new value. [_$_] + -> [FileQueryInfoFlags] -- ^ @flags@ 'FileQueryInfoFlags'. [_$_] + -> Maybe Cancellable -- ^ @cancellable@ optional 'Cancellable' object, 'Nothing' to ignore. [_$_] + -> IO Bool -- ^ returns 'True' if the attribute was successfully set, 'False' otherwise. [_$_] +fileSetAttributeWord32 file attribute value flags cancellable = + liftM toBool $ + withGObject (toFile file) $ \cFile -> + withUTFString attribute $ \ attributePtr -> [_$_] + maybeWith withGObject cancellable $ \cCancellable -> do + propagateGError (g_file_set_attribute_uint32 [_$_] + cFile [_$_] + attributePtr + (fromIntegral value) + ((fromIntegral . fromFlags) flags) [_$_] + cCancellable) + where _ = {# call g_file_set_attribute_uint32 #} + +-- | Sets attribute of type 'FileAttributeTypeInt32' to value. If attribute is of a different type, +-- this operation will fail. +-- [_$_] +-- If cancellable is not 'Nothing', then the operation can be cancelled by triggering the cancellable object +-- from another thread. If the operation was cancelled, the error 'IoErrorCancelled' will be +-- returned. +fileSetAttributeInt32 :: FileClass file => file + -> String -- ^ @attribute@ a string containing the attribute's name. [_$_] + -> Int32 -- ^ @value@ a Int32 containing the attribute's new value. [_$_] + -> [FileQueryInfoFlags] -- ^ @flags@ 'FileQueryInfoFlags'. [_$_] + -> Maybe Cancellable -- ^ @cancellable@ optional 'Cancellable' object, 'Nothing' to ignore. [_$_] + -> IO Bool -- ^ returns 'True' if the attribute was successfully set, 'False' otherwise. [_$_] +fileSetAttributeInt32 file attribute value flags cancellable = + liftM toBool $ + withGObject (toFile file) $ \cFile -> + withUTFString attribute $ \ attributePtr -> [_$_] + maybeWith withGObject cancellable $ \cCancellable -> do + propagateGError (g_file_set_attribute_int32 [_$_] + cFile [_$_] + attributePtr + (fromIntegral value) + ((fromIntegral . fromFlags) flags) [_$_] + cCancellable) + where _ = {# call g_file_set_attribute_int32 #} + +-- | Sets attribute of type 'FileAttributeTypeUint64' to value. If attribute is of a different type, +-- this operation will fail. +-- [_$_] +-- If cancellable is not 'Nothing', then the operation can be cancelled by triggering the cancellable object +-- from another thread. If the operation was cancelled, the error 'IoErrorCancelled' will be +-- returned. +fileSetAttributeWord64 :: FileClass file => file + -> String -- ^ @attribute@ a string containing the attribute's name. [_$_] + -> Word64 -- ^ @value@ a Word64 containing the attribute's new value. [_$_] + -> [FileQueryInfoFlags] -- ^ @flags@ 'FileQueryInfoFlags'. [_$_] + -> Maybe Cancellable -- ^ @cancellable@ optional 'Cancellable' object, 'Nothing' to ignore. [_$_] + -> IO Bool -- ^ returns 'True' if the attribute was successfully set, 'False' otherwise. [_$_] +fileSetAttributeWord64 file attribute value flags cancellable = + liftM toBool $ + withGObject (toFile file) $ \cFile -> + withUTFString attribute $ \ attributePtr -> [_$_] + maybeWith withGObject cancellable $ \cCancellable -> do + propagateGError (g_file_set_attribute_uint64 [_$_] + cFile [_$_] + attributePtr + (fromIntegral value) + ((fromIntegral . fromFlags) flags) [_$_] + cCancellable) + where _ = {# call g_file_set_attribute_uint64 #} + +-- | Sets attribute of type 'FileAttributeTypeInt64' to value. If attribute is of a different type, +-- this operation will fail. +-- [_$_] +-- If cancellable is not 'Nothing', then the operation can be cancelled by triggering the cancellable object +-- from another thread. If the operation was cancelled, the error 'IoErrorCancelled' will be +-- returned. +fileSetAttributeInt64 :: FileClass file => file + -> String -- ^ @attribute@ a string containing the attribute's name. [_$_] + -> Int64 -- ^ @value@ a Int64 containing the attribute's new value. [_$_] + -> [FileQueryInfoFlags] -- ^ @flags@ 'FileQueryInfoFlags'. [_$_] + -> Maybe Cancellable -- ^ @cancellable@ optional 'Cancellable' object, 'Nothing' to ignore. [_$_] + -> IO Bool -- ^ returns 'True' if the attribute was successfully set, 'False' otherwise. [_$_] +fileSetAttributeInt64 file attribute value flags cancellable = + liftM toBool $ + withGObject (toFile file) $ \cFile -> + withUTFString attribute $ \ attributePtr -> [_$_] + maybeWith withGObject cancellable $ \cCancellable -> do + propagateGError (g_file_set_attribute_int64 [_$_] + cFile [_$_] + attributePtr + (fromIntegral value) + ((fromIntegral . fromFlags) flags) [_$_] + cCancellable) + where _ = {# call g_file_set_attribute_int64 #} + +-- | Copies the file attributes from source to destination. +-- [_$_] +-- Normally only a subset of the file attributes are copied, those that are copies in a normal file +-- copy operation (which for instance does not include e.g. owner). However if 'FileCopyAllMetadata' +-- is specified in flags, then all the metadata that is possible to copy is copied. This is useful when +-- implementing move by copy + delete source. +fileCopyAttributes :: (FileClass source, FileClass destination) [_$_] + => source -- ^ @source@ a 'File' with attributes. [_$_] + -> destination -- ^ @destination@ a 'File' to copy attributes to. [_$_] + -> [FileCopyFlags] -- ^ @flags@ a set of 'FileCopyFlags'. [_$_] + -> Maybe Cancellable -- ^ @cancellable@ optional 'Cancellable' object, 'Nothing' to ignore. [_$_] + -> IO Bool -- ^ returns 'True' if the attributes were copied successfully, 'False' otherwise. +fileCopyAttributes source destination flags cancellable = [_$_] + liftM toBool $ + withGObject (toFile source) $ \cSource -> + withGObject (toFile destination) $ \cDestination -> + maybeWith withGObject cancellable $ \cCancellable -> + propagateGError (g_file_copy_attributes cSource cDestination ((fromIntegral . fromFlags) flags) cCancellable) + where _ = {# call g_file_copy_attributes #} + +-- | Obtains a directo... [truncated message content] |
From: Andy S. <And...@co...> - 2010-08-15 19:11:18
|
diffing dir... Sun Aug 15 14:12:10 EDT 2010 Andy Stewart <laz...@gm...> * Fix FileAttribute.hsc docs and add new attributes. Ignore-this: 2b18d5e36abe743fb1f1be8dcb3c3d31 { hunk ./gio/System/GIO/File/FileAttribute.hsc 2 - -#include <gio/gio.h> - hunk ./gio/System/GIO/File/FileAttribute.hsc 4 --- Author : Peter Gavin +-- Author : Peter Gavin, Andy Stewart hunk ./gio/System/GIO/File/FileAttribute.hsc 8 +-- Copyright (c) 2010 Andy Stewart hunk ./gio/System/GIO/File/FileAttribute.hsc 32 +-- * Details [_$_] +-- | File attributes in GIO consist of a list of key-value pairs. +-- [_$_] +-- Keys are strings that contain a key namespace and a key name, separated by a colon, +-- e.g. "namespace:keyname". Namespaces are included to sort key-value pairs by namespaces for +-- relevance. Keys can be retrived using wildcards, e.g. \"standard::*\" will return all of the keys in +-- the "standard" namespace. +-- [_$_] +-- Values are stored within the list in 'FileAttributeValue' structures. Values can store different +-- types, listed in the enum 'FileAttributeType'. Upon creation of a 'FileAttributeValue', the type will +-- be set to 'FileAttributeTypeInvalid'. +-- [_$_] +-- The list of possible attributes for a filesystem (pointed to by a 'File') is availible as a +-- 'FileAttributeInfoList'. This list is queryable by key names as indicated earlier. +-- [_$_] +-- Classes that implement 'FileIface' will create a 'FileAttributeInfoList' and install default keys and +-- values for their given file system, architecture, and other possible implementation details (e.g., +-- on a UNIX system, a file attribute key will be registered for the user id for a given file). + [_$_] +-- * Types [_$_] hunk ./gio/System/GIO/File/FileAttribute.hsc 54 + [_$_] +-- * Enums [_$_] hunk ./gio/System/GIO/File/FileAttribute.hsc 57 + [_$_] +-- * Methods [_$_] hunk ./gio/System/GIO/File/FileAttribute.hsc 72 + fileAttributeStandardAllocatedSize, hunk ./gio/System/GIO/File/FileAttribute.hsc 89 + fileAttributeMountableUnixDeviceFile, hunk ./gio/System/GIO/File/FileAttribute.hsc 108 + fileAttributeDosIsMountpoint, hunk ./gio/System/GIO/File/FileAttribute.hsc 116 + fileAttributePreviewIcon, hunk ./gio/System/GIO/File/FileAttribute.hsc 128 +#include <gio/gio.h> + hunk ./gio/System/GIO/File/FileAttribute.hsc 132 +import System.Glib.Flags hunk ./gio/System/GIO/File/FileAttribute.hsc 134 -import System.GIO.Base +import System.GIO.Enums hunk ./gio/System/GIO/File/FileAttribute.hsc 145 + | FileAttributeTypeStringList hunk ./gio/System/GIO/File/FileAttribute.hsc 157 + toEnum #{const G_FILE_ATTRIBUTE_TYPE_STRINGV} = FileAttributeTypeStringList hunk ./gio/System/GIO/File/FileAttribute.hsc 168 + fromEnum FileAttributeTypeStringList = #{const G_FILE_ATTRIBUTE_TYPE_STRINGV} hunk ./gio/System/GIO/File/FileAttribute.hsc 181 - retName <- #{peek GFileAttributeInfo, name} ptr >>= peekUTFString - retType <- (#{peek GFileAttributeInfo, type} ptr :: IO CInt) >>= return . cToEnum - retFlags <- (#{peek GFileAttributeInfo, flags} ptr :: IO CInt) >>= return . cToFlags + retName <- #{peek GFileAttributeInfo, name} ptr >>= readUTFString + retType <- (#{peek GFileAttributeInfo, type} ptr :: IO CInt) >>= return . (toEnum . fromIntegral) + retFlags <- (#{peek GFileAttributeInfo, flags} ptr :: IO CInt) >>= return . (toFlags . fromIntegral) hunk ./gio/System/GIO/File/FileAttribute.hsc 204 + fileAttributeStandardAllocatedSize, hunk ./gio/System/GIO/File/FileAttribute.hsc 221 + fileAttributeMountableUnixDeviceFile, hunk ./gio/System/GIO/File/FileAttribute.hsc 240 + fileAttributeDosIsMountpoint, hunk ./gio/System/GIO/File/FileAttribute.hsc 248 + fileAttributePreviewIcon, [_$_] hunk ./gio/System/GIO/File/FileAttribute.hsc 272 +fileAttributeStandardAllocatedSize = #{const_str G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE} hunk ./gio/System/GIO/File/FileAttribute.hsc 289 +fileAttributeMountableUnixDeviceFile = #{const_str G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE} hunk ./gio/System/GIO/File/FileAttribute.hsc 308 +fileAttributeDosIsMountpoint = #{const_str G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT} hunk ./gio/System/GIO/File/FileAttribute.hsc 316 +fileAttributePreviewIcon = #{const_str G_FILE_ATTRIBUTE_PREVIEW_ICON} } |
From: Andy S. <And...@co...> - 2010-08-15 19:11:14
|
diffing dir... Sun Aug 15 14:10:49 EDT 2010 Andy Stewart <laz...@gm...> * Fix AsyncREslut.chs docs and move marshalAsyncReadyCallback from Base.chs. Ignore-this: b1ad70f5089ffdedddc0155749eca08f { hunk ./gio/System/GIO/Async/AsyncResult.chs 31 +-- * Types hunk ./gio/System/GIO/Async/AsyncResult.chs 34 - AsyncReadyCallback + AsyncReadyCallback, + +-- * Methods + marshalAsyncReadyCallback, hunk ./gio/System/GIO/Async/AsyncResult.chs 40 +import Control.Monad hunk ./gio/System/GIO/Async/AsyncResult.chs 42 - -import System.GIO.Base +import System.Glib.GObject hunk ./gio/System/GIO/Async/AsyncResult.chs 45 +type AsyncReadyCallback = GObject -> AsyncResult -> IO () + +-- | This type just use for bind, don't expose it. +{#pointer GAsyncReadyCallback#} + +foreign import ccall "wrapper" mkAsyncReadyCallback :: [_$_] + (Ptr GObject -> Ptr AsyncResult -> Ptr () -> IO ()) -> IO GAsyncReadyCallback + +marshalAsyncReadyCallback :: AsyncReadyCallback -> IO GAsyncReadyCallback +marshalAsyncReadyCallback asyncReadyCallback = [_$_] + mkAsyncReadyCallback $ \ cObject cAsyncResult cCallback -> do + object <- (makeNewGObject mkGObject . return) cObject + asyncResult <- (makeNewGObject mkAsyncResult . return) cAsyncResult + asyncReadyCallback object asyncResult + freeHaskellFunPtr (castPtrToFunPtr cCallback) } |
From: Andy S. <And...@co...> - 2010-08-15 19:11:10
|
diffing dir... Sun Aug 15 14:08:37 EDT 2010 Andy Stewart <laz...@gm...> * Update System.GIO.Async.Cancellable module Ignore-this: 9ab8b1149393518e6bc650cc857c8775 { hunk ./gio/System/GIO/Async/Cancellable.chs 31 - Cancellable, +-- * Details +-- | 'Cancellable' is a thread-safe operation cancellation stack used throughout GIO to allow for +-- cancellation of synchronous and asynchronous operations. + +-- * Types [_$_] + Cancellable (..), + CancellableClass, + +-- * Methods [_$_] hunk ./gio/System/GIO/Async/Cancellable.chs 48 + +-- * Signals hunk ./gio/System/GIO/Async/Cancellable.chs 54 - hunk ./gio/System/GIO/Async/Cancellable.chs 56 +import System.Glib.GObject +import System.Glib.Signals +{#import System.GIO.Base#} hunk ./gio/System/GIO/Async/Cancellable.chs 60 - -import System.GIO.Base hunk ./gio/System/GIO/Async/Cancellable.chs 64 +-- | Creates a new 'Cancellable' object. +-- [_$_] +-- Applications that want to start one or more operations that should be cancellable should create a +-- 'Cancellable' and pass it to the operations. +-- [_$_] +-- One 'Cancellable' can be used in multiple consecutive operations, but not in multiple concurrent +-- operations. hunk ./gio/System/GIO/Async/Cancellable.chs 73 - {# call cancellable_new #} >>= takeGObject + constructNewGObject mkCancellable $ + {# call cancellable_new #} hunk ./gio/System/GIO/Async/Cancellable.chs 76 -cancellableIsCancelled :: Cancellable -> IO Bool +-- | Checks if a cancellable job has been cancelled. +cancellableIsCancelled :: Cancellable [_$_] + -> IO Bool -- ^ returns 'True' if cancellable is cancelled, 'False' if called with 'Nothing' or if item is not cancelled. hunk ./gio/System/GIO/Async/Cancellable.chs 82 -cancellableThrowErrorIfCancelled :: Cancellable -> IO () +-- | If the cancellable is cancelled, sets the error to notify that the operation was cancelled. +cancellableThrowErrorIfCancelled :: Cancellable [_$_] + -> IO Bool -- ^ returns 'True' if cancellable was cancelled, 'False' if it was not. [_$_] hunk ./gio/System/GIO/Async/Cancellable.chs 86 - propagateGError $ \gErrorPtr -> do + liftM toBool $ + propagateGError $ \gErrorPtr -> [_$_] hunk ./gio/System/GIO/Async/Cancellable.chs 89 - return () hunk ./gio/System/GIO/Async/Cancellable.chs 90 -cancellableGetCurrent :: IO (Maybe Cancellable) +-- | Gets the top cancellable from the stack. +cancellableGetCurrent :: [_$_] + IO (Maybe Cancellable) -- ^ returns a 'Cancellable' from the top of the stack, or 'Nothing' if the stack is empty. hunk ./gio/System/GIO/Async/Cancellable.chs 94 - {# call cancellable_get_current #} >>= maybePeek takeGObject + maybeNull (constructNewGObject mkCancellable) $ + {# call cancellable_get_current #} [_$_] hunk ./gio/System/GIO/Async/Cancellable.chs 97 +-- | Pops cancellable off the cancellable stack (verifying that cancellable is on the top of the stack). hunk ./gio/System/GIO/Async/Cancellable.chs 104 +-- | Pushes cancellable onto the cancellable stack. The current cancllable can then be recieved using +-- 'cancellableGetCurrent' . +-- [_$_] +-- This is useful when implementing cancellable operations in code that does not allow you to pass down +-- the cancellable object. +-- [_$_] +-- This is typically called automatically by e.g. 'File' operations, so you rarely have to call this +-- yourself. hunk ./gio/System/GIO/Async/Cancellable.chs 118 +-- | Resets cancellable to its uncancelled state. hunk ./gio/System/GIO/Async/Cancellable.chs 122 +-- | Will set cancellable to cancelled, and will emit the "cancelled" signal. (However, see the warning +-- about race conditions in the documentation for that signal if you are planning to connect to it.) +-- [_$_] +-- This function is thread-safe. In other words, you can safely call it from a thread other than the +-- one running the operation that was passed the cancellable. +-- [_$_] +-- The convention within gio is that cancelling an asynchronous operation causes it to complete +-- asynchronously. That is, if you cancel the operation from the same thread in which it is running, +-- then the operation's 'AsyncReadyCallback' will not be invoked until the application returns to the +-- main loop. hunk ./gio/System/GIO/Async/Cancellable.chs 135 +-- | Emitted when the operation has been cancelled. +-- [_$_] +-- Can be used by implementations of cancellable operations. If the operation is cancelled from another +-- thread, the signal will be emitted in the thread that cancelled the operation, not the thread that +-- is running the operation. +-- [_$_] +-- Note that disconnecting from this signal (or any signal) in a multi-threaded program is prone to +-- race conditions. For instance it is possible that a signal handler may be invoked even after a call +-- to 'signalHandlerDisconnect' for that handler has already returned. +-- [_$_] +-- There is also a problem when cancellation happen right before connecting to the signal. If this +-- happens the signal will unexpectedly not be emitted, and checking before connecting to the signal +-- leaves a race condition where this is still happening. } |
From: Andy S. <And...@co...> - 2010-08-15 19:11:09
|
diffing dir... Sun Aug 15 14:07:06 EDT 2010 Andy Stewart <laz...@gm...> * Add System.GIO.Enums module Ignore-this: ac76f7e910be014e85b2f0ab4a4e364f { addfile ./gio/System/GIO/Enums.chs hunk ./gio/System/GIO/Enums.chs 1 +{-# LANGUAGE CPP, DeriveDataTypeable #-} +-- GIMP Toolkit (GTK) Binding for Haskell: binding to gio -*-haskell-*- +-- +-- Author : Andy Stewart +-- Created: 30-April-2010 +-- +-- Copyright (c) 2010 Andy Stewart +-- +-- This library is free software: you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public License +-- as published by the Free Software Foundation, either version 3 of +-- the License, or (at your option) any later version. +-- [_$_] +-- This library is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- [_$_] +-- You should have received a copy of the GNU Lesser General Public +-- License along with this program. If not, see +-- <http://www.gnu.org/licenses/>. +-- [_$_] +-- GIO, the C library which this Haskell library depends on, is +-- available under LGPL Version 2. The documentation included with +-- this library is based on the original GIO documentation. +-- [_$_] +-- | Maintainer : gtk...@li... +-- Stability : alpha +-- Portability : portable (depends on GHC) +module System.GIO.Enums ( +-- * Enums + FileQueryInfoFlags(..), + FileCreateFlags(..), + FileCopyFlags(..), + FileMonitorFlags(..), + FilesystemPreviewType(..), + FileType(..), + FileAttributeStatus(..), + FileAttributeInfoFlags(..), + + AskPasswordFlags(..), + PasswordSave(..), + MountOperationResult(..), + + IOErrorEnum(..), + + FileMonitorEvent(..), + MountMountFlags(..), + MountUnmountFlags(..), + + DriveStartFlags(..), + DriveStartStopType(..), + + EmblemOrigin(..), + + AppInfoCreateFlags(..), + ) where + +import Control.Monad +import Data.Typeable +import System.Glib.FFI +import System.Glib.Flags +import System.Glib.GError +import System.Glib.GObject +import System.Glib.UTFString + +{# context lib = "gio" prefix = "g" #} + +{# enum GFileQueryInfoFlags as FileQueryInfoFlags {underscoreToCase} with prefix = "G" deriving (Eq, Ord, Bounded, Show, Typeable) #} +instance Flags FileQueryInfoFlags + +{# enum GFileCreateFlags as FileCreateFlags {underscoreToCase} with prefix = "G" deriving (Eq, Ord, Bounded, Show, Typeable) #} +instance Flags FileCreateFlags + +{# enum GFileCopyFlags as FileCopyFlags {underscoreToCase} with prefix = "G" deriving (Eq, Ord, Bounded, Show, Typeable) #} +instance Flags FileCopyFlags + +{# enum GFileMonitorFlags as FileMonitorFlags {underscoreToCase} with prefix = "G" deriving (Eq, Ord, Bounded, Show, Typeable) #} +instance Flags FileMonitorFlags + +{# enum GFilesystemPreviewType as FilesystemPreviewType {underscoreToCase} with prefix = "G" deriving (Eq, Ord, Bounded, Show, Typeable) #} + +{# enum GFileType as FileType {underscoreToCase} with prefix = "G" deriving (Eq, Ord, Bounded, Show, Typeable) #} + +{# enum GFileAttributeStatus as FileAttributeStatus {underscoreToCase} with prefix = "G" deriving (Eq, Ord, Bounded, Show, Typeable) #} + +{# enum GFileAttributeInfoFlags as FileAttributeInfoFlags {underscoreToCase} with prefix = "G" deriving (Eq, Ord, Bounded, Read, Show) #} +instance Flags FileAttributeInfoFlags + +{# enum GAskPasswordFlags as AskPasswordFlags {underscoreToCase} with prefix = "G" deriving (Eq, Ord, Bounded, Show, Typeable) #} +instance Flags AskPasswordFlags + +{# enum GPasswordSave as PasswordSave {underscoreToCase} with prefix = "G" deriving (Eq, Ord, Bounded, Show, Typeable) #} + +{# enum GMountOperationResult as MountOperationResult {underscoreToCase} with prefix = "G" deriving (Eq, Ord, Bounded, Show, Typeable) #} + +{# enum GIOErrorEnum as IOErrorEnum {underscoreToCase} with prefix = "G" deriving (Eq, Ord, Bounded, Show, Typeable) #} + +{# enum GFileMonitorEvent as FileMonitorEvent {underscoreToCase} with prefix = "G" deriving (Eq, Ord, Bounded, Show, Typeable) #} + +{# enum GMountMountFlags as MountMountFlags {underscoreToCase} with prefix = "G" deriving (Eq, Ord, Bounded, Show, Typeable) #} +instance Flags MountMountFlags + +{# enum GMountUnmountFlags as MountUnmountFlags {underscoreToCase} with prefix = "G" deriving (Eq, Ord, Bounded, Show, Typeable) #} +instance Flags MountUnmountFlags + +{# enum GDriveStartFlags as DriveStartFlags {underscoreToCase} with prefix = "G" deriving (Eq, Ord, Bounded, Show, Typeable) #} +instance Flags DriveStartFlags + +{# enum GDriveStartStopType as DriveStartStopType {underscoreToCase} with prefix = "G" deriving (Eq, Ord, Bounded, Show, Typeable) #} + +{# enum GEmblemOrigin as EmblemOrigin {underscoreToCase} with prefix = "G" deriving (Eq, Ord, Bounded, Show, Typeable) #} + +{# enum GAppInfoCreateFlags as AppInfoCreateFlags {underscoreToCase} with prefix = "G" deriving (Eq, Ord, Bounded, Show, Typeable) #} +instance Flags AppInfoCreateFlags hunk ./gio/gio.cabal 45 + System.GIO.Enums } |
From: Andy S. <And...@co...> - 2010-08-15 19:11:03
|
diffing dir... Sun Aug 15 14:03:38 EDT 2010 Andy Stewart <laz...@gm...> * Just left withGObject in Base.chs (other functions use glib functions replace) Ignore-this: 27ac454fc22e55415848de4ed5df4c15 { hunk ./gio/System/GIO/Base.chs 33 - hunk ./gio/System/GIO/Base.chs 36 - hunk ./gio/System/GIO/Base.chs 38 -type Offset = {# type goffset #} - -cToFlags :: (Integral int, Flags flags) - => int - -> [flags] -cToFlags = toFlags . fromIntegral -cFromFlags :: (Integral int, Flags flags) - => [flags] - -> int -cFromFlags = fromIntegral . fromFlags - -cToEnum :: (Integral int, Enum enum) - => int - -> enum -cToEnum = toEnum . fromIntegral -cFromEnum :: (Integral int, Enum enum) - => enum - -> int -cFromEnum = fromIntegral . fromEnum - hunk ./gio/System/GIO/Base.chs 46 -peekGObject :: GObjectClass obj - => Ptr obj - -> IO obj -peekGObject cObject = do - do cObjectRef $ castPtr cObject - takeGObject cObject -foreign import ccall unsafe "&g_object_unref" - objectFinalizer :: FunPtr (Ptr () -> IO ()) -foreign import ccall unsafe "g_object_ref" - cObjectRef :: Ptr () - -> IO (Ptr ()) - -takeGObject :: GObjectClass obj - => Ptr obj - -> IO obj -takeGObject cObject = - liftM (unsafeCastGObject . GObject . castForeignPtr) $ - do newForeignPtr (castPtr cObject) objectFinalizer - -type AsyncReadyCallback = GObject -> AsyncResult -> IO () -type CAsyncReadyCallback = Ptr GObject -> Ptr AsyncResult -> Ptr () -> IO () -foreign import ccall "wrapper" - makeAsyncReadyCallback :: CAsyncReadyCallback - -> IO {# type GAsyncReadyCallback #} - -marshalAsyncReadyCallback :: AsyncReadyCallback -> IO {# type GAsyncReadyCallback #} -marshalAsyncReadyCallback asyncReadyCallback = - makeAsyncReadyCallback cAsyncReadyCallback - where cAsyncReadyCallback :: CAsyncReadyCallback - cAsyncReadyCallback cObject cAsyncResult cCallback = do - object <- peekGObject cObject - asyncResult <- peekGObject cAsyncResult - asyncReadyCallback object asyncResult - freeHaskellFunPtr (castPtrToFunPtr cCallback) - -{# enum GFileAttributeInfoFlags as FileAttributeInfoFlags {underscoreToCase} with prefix = "G" deriving (Eq, Ord, Bounded, Read, Show) #} -instance Flags FileAttributeInfoFlags } |
From: Andy S. <And...@co...> - 2010-08-15 19:11:00
|
diffing dir... Sun Aug 15 14:00:58 EDT 2010 Andy Stewart <laz...@gm...> * Add new signal type. Ignore-this: 5f52cc57d55277bfe900a7de70973f9 hunk ./gio/marshal.list 46 +NONE:STRING,STRING,STRING,ENUM +NONE:OBJECT,OBJECT,ENUM +NONE:ENUM +NONE:OBJECT |
From: Axel S. <si...@co...> - 2010-08-15 16:13:10
|
diffing dir... Sun Aug 15 12:11:52 EDT 2010 Axe...@in... * Bump version of gtk 0.11.2 since I had a local change that turned debug output on. Ignore-this: a69540495d3e41292b9edf585ff8f4e6 hunk ./gtk/gtk.cabal 2 -Version: 0.11.1 +Version: 0.11.2 |
From: Axel S. <si...@co...> - 2010-08-15 14:04:14
|
diffing dir... Sat Aug 14 12:27:44 EDT 2010 Axe...@in... tagged 0.11.1 Ignore-this: 6017e3eec3a9de0de3372ef98c2b485b { } |
From: Axel S. <si...@co...> - 2010-08-15 14:04:09
|
diffing dir... Sat Aug 14 12:26:57 EDT 2010 Axe...@in... * Fix INSTALL instructions. Ignore-this: ccc365ace9fb14833a583ab4fb16dbe0 { hunk ./INSTALL 26 + +The following are also available, but are not built by default when installing +the 'gtk' package. In particular, these might not have a binary library on +Windows available: + hunk ./INSTALL 49 -(http://hackage.haskell.org/trac/ghc/ticket/4038), so better to avoid it. +(http://hackage.haskell.org/trac/ghc/ticket/4038), so better avoid it. hunk ./INSTALL 105 -Due to the way cabal registers packages with ghc, it is quite difficult to perform the -renaming of libraries which is necessary for the binary Windows bundle to work. As a -consequence, the cabal package can do this renaming only with Cabal 1.8 (shipped with ghc -6.12). If you use ghc 6.10 or earlier, you need to upgrade your Cabal system to 1.8 if you -want to build Gtk2Hs with ghci support. Note that it is always possible to build executables -on Windows. +Due to the way cabal registers packages with ghc, it is quite difficult to +perform the renaming of libraries which is necessary for the binary Windows +bundle to work. As a consequence, the cabal package can do this renaming only +with Cabal 1.8 (shipped with ghc 6.12). If you use ghc 6.10 or earlier, you +need to upgrade your Cabal system to 1.8 if you want to build Gtk2Hs with ghci +support. Note that it is always possible to build executables on Windows. } |
From: Axel S. <si...@co...> - 2010-08-15 14:04:06
|
diffing dir... Sat Aug 14 12:18:40 EDT 2010 Axe...@in... * Bump versions of all packages. Ignore-this: 3ecd327e02dac0e6598da49eb9dd39b0 { hunk ./cairo/cairo.cabal 2 -Version: 0.11.0 +Version: 0.11.1 hunk ./gio/gio.cabal 2 -Version: 0.11.0 +Version: 0.11.1 hunk ./gio/gio.cabal 40 - glib >= 0.11 && < 0.12 + glib >= 0.11.1 && < 0.12 hunk ./glib/glib.cabal 2 -Version: 0.11.0 +Version: 0.11.1 hunk ./gtk/gtk.cabal 2 -Version: 0.11.0 +Version: 0.11.1 hunk ./gtk/gtk.cabal 126 - glib >= 0.11 && < 0.12, - pango >= 0.11 && < 0.12, - cairo >= 0.11 && < 0.12 + glib >= 0.11.1 && < 0.12, + pango >= 0.11.1 && < 0.12, + cairo >= 0.11.1 && < 0.12 hunk ./gtk/gtk.cabal 130 - build-depends: gio >= 0.11 && < 0.12 + build-depends: gio >= 0.11.1 && < 0.12 hunk ./pango/pango.cabal 2 -Version: 0.11.0 +Version: 0.11.1 hunk ./pango/pango.cabal 45 - glib >= 0.11 && < 0.12, - cairo >= 0.11 && < 0.12 + glib >= 0.11.1 && < 0.12, + cairo >= 0.11.1 && < 0.12 hunk ./tools/gtk2hs-buildtools.cabal 2 -Version: 0.9 +Version: 0.11.1 } |
From: Axel S. <si...@co...> - 2010-08-15 14:04:04
|
diffing dir... Sat Aug 14 12:18:22 EDT 2010 Axe...@in... * Make the drawing demo build. Ignore-this: 86a23373d98e8e5c302449a925df42fb hunk ./gtk/demo/graphic/Drawing.hs 6 +import Graphics.UI.Gtk.Gdk.GC |
From: Andy S. <And...@co...> - 2010-08-15 12:35:29
|
diffing dir... Sun Aug 15 08:29:53 EDT 2010 Andy Stewart <laz...@gm...> * Fix gtk signal name (Turn _ to - ) Ignore-this: e335b0039ce30a700bbddb470f8ba34 { hunk ./gtk/Graphics/UI/Gtk/Abstract/Container.chs 527 -checkResize = Signal (connect_NONE__NONE "check_resize") +checkResize = Signal (connect_NONE__NONE "check-resize") hunk ./gtk/Graphics/UI/Gtk/Abstract/IMContext.chs 278 -imContextPreeditStart = Signal (connect_NONE__NONE "preedit_start") +imContextPreeditStart = Signal (connect_NONE__NONE "preedit-start") hunk ./gtk/Graphics/UI/Gtk/Abstract/IMContext.chs 284 -imContextPreeditEnd = Signal (connect_NONE__NONE "preedit_end") +imContextPreeditEnd = Signal (connect_NONE__NONE "preedit-end") hunk ./gtk/Graphics/UI/Gtk/Abstract/IMContext.chs 291 -imContextPreeditChanged = Signal (connect_NONE__NONE "preedit_changed") +imContextPreeditChanged = Signal (connect_NONE__NONE "preedit-changed") hunk ./gtk/Graphics/UI/Gtk/Abstract/IMContext.chs 307 -imContextRetrieveSurrounding = Signal (connect_NONE__BOOL "retrieve_surrounding") +imContextRetrieveSurrounding = Signal (connect_NONE__BOOL "retrieve-surrounding") hunk ./gtk/Graphics/UI/Gtk/Abstract/IMContext.chs 319 -imContextDeleteSurrounding' = Signal (connect_INT_INT__BOOL "delete_surrounding") +imContextDeleteSurrounding' = Signal (connect_INT_INT__BOOL "delete-surrounding") hunk ./gtk/Graphics/UI/Gtk/Abstract/Range.chs 374 -valueChanged = Signal (connect_NONE__NONE "value_changed") +valueChanged = Signal (connect_NONE__NONE "value-changed") hunk ./gtk/Graphics/UI/Gtk/Abstract/Range.chs 380 -adjustBounds = Signal (connect_DOUBLE__NONE "adjust_bounds") +adjustBounds = Signal (connect_DOUBLE__NONE "adjust-bounds") hunk ./gtk/Graphics/UI/Gtk/Abstract/Range.chs 401 -changeValue = Signal (connect_ENUM_DOUBLE__BOOL "change_value") +changeValue = Signal (connect_ENUM_DOUBLE__BOOL "change-value") hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs 2376 - connect_PTR__NONE "size_request" after w + connect_PTR__NONE "size-request" after w hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs 2387 -sizeAllocate = Signal (connect_BOXED__NONE "size_allocate" peek) +sizeAllocate = Signal (connect_BOXED__NONE "size-allocate" peek) hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs 2411 -stateChanged = Signal (connect_ENUM__NONE "state_changed") +stateChanged = Signal (connect_ENUM__NONE "state-changed") hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs 2418 -parentSet = Signal (connect_MOBJECT__NONE "parent_set") +parentSet = Signal (connect_MOBJECT__NONE "parent-set") hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs 2427 -hierarchyChanged = Signal (connect_MOBJECT__NONE "hierarchy_changed") +hierarchyChanged = Signal (connect_MOBJECT__NONE "hierarchy-changed") hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs 2435 -styleSet = Signal (connect_OBJECT__NONE "style_set") +styleSet = Signal (connect_OBJECT__NONE "style-set") hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs 2441 -directionChanged = Signal (connect_ENUM__NONE "direction_changed") +directionChanged = Signal (connect_ENUM__NONE "direction-changed") hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs 2452 -grabNotify = Signal (connect_BOOL__NONE "grab_notify") +grabNotify = Signal (connect_BOOL__NONE "grab-notify") hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs 2462 -popupMenuSignal = Signal (connect_NONE__BOOL "popup_menu") +popupMenuSignal = Signal (connect_NONE__BOOL "popup-menu") hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs 2472 -showHelp = Signal (connect_ENUM__BOOL "show_help") +showHelp = Signal (connect_ENUM__BOOL "show-help") hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs 2478 -accelClosuresChanged = Signal (connect_NONE__NONE "accel_closures_changed") +accelClosuresChanged = Signal (connect_NONE__NONE "accel-closures-changed") hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs 2484 -screenChanged = Signal (connect_OBJECT__NONE "screen_changed") +screenChanged = Signal (connect_OBJECT__NONE "screen-changed") hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs 2500 - connect_OBJECT_INT_INT_BOOL_OBJECT__BOOL "query_tooltip" [_$_] + connect_OBJECT_INT_INT_BOOL_OBJECT__BOOL "query-tooltip" [_$_] hunk ./gtk/Graphics/UI/Gtk/ActionMenuToolbar/UIManager.chs 569 -addWidget = Signal (connect_OBJECT__NONE "add_widget") +addWidget = Signal (connect_OBJECT__NONE "add-widget") hunk ./gtk/Graphics/UI/Gtk/ActionMenuToolbar/UIManager.chs 576 -actionsChanged = Signal (connect_NONE__NONE "actions_changed") +actionsChanged = Signal (connect_NONE__NONE "actions-changed") hunk ./gtk/Graphics/UI/Gtk/Display/StatusIcon.chs 535 -statusIconSizeChanged = Signal (connect_INT__BOOL "size_changed") +statusIconSizeChanged = Signal (connect_INT__BOOL "size-changed") hunk ./gtk/Graphics/UI/Gtk/Display/Statusbar.chs 224 -textPushed = Signal (\a self user -> connect_WORD_STRING__NONE "text_pushed" a self (\w s -> user (fromIntegral w) s)) +textPushed = Signal (\a self user -> connect_WORD_STRING__NONE "text-pushed" a self (\w s -> user (fromIntegral w) s)) hunk ./gtk/Graphics/UI/Gtk/Display/Statusbar.chs 230 -textPopped = Signal (\a self user -> connect_WORD_STRING__NONE "text_popped" a self (\w s -> user (fromIntegral w) s)) +textPopped = Signal (\a self user -> connect_WORD_STRING__NONE "text-popped" a self (\w s -> user (fromIntegral w) s)) hunk ./gtk/Graphics/UI/Gtk/Entry/EntryCompletion.chs 563 -insertPrefix = Signal (connect_STRING__BOOL "insert_prefix") +insertPrefix = Signal (connect_STRING__BOOL "insert-prefix") hunk ./gtk/Graphics/UI/Gtk/Entry/EntryCompletion.chs 572 -matchSelected = Signal (connect_OBJECT_BOXED__BOOL "match_selected" peekTreeIter) +matchSelected = Signal (connect_OBJECT_BOXED__BOOL "match-selected" peekTreeIter) hunk ./gtk/Graphics/UI/Gtk/Entry/EntryCompletion.chs 578 -completionActionActivated = Signal (connect_INT__NONE "action_activated") +completionActionActivated = Signal (connect_INT__NONE "action-activated") hunk ./gtk/Graphics/UI/Gtk/Gdk/Screen.chs 542 -screenSizeChanged = Signal (connect_NONE__NONE "size_changed") +screenSizeChanged = Signal (connect_NONE__NONE "size-changed") hunk ./gtk/Graphics/UI/Gtk/Gdk/Screen.chs 551 -screenCompositedChanged = Signal (connect_NONE__NONE "composited_changed") +screenCompositedChanged = Signal (connect_NONE__NONE "composited-changed") hunk ./gtk/Graphics/UI/Gtk/General/Drag.chs 622 -dragBegin = Signal (connect_OBJECT__NONE "drag_begin") +dragBegin = Signal (connect_OBJECT__NONE "drag-begin") hunk ./gtk/Graphics/UI/Gtk/General/Drag.chs 631 -dragDataDelete = Signal (connect_OBJECT__NONE "drag_data_delete") +dragDataDelete = Signal (connect_OBJECT__NONE "drag-data-delete") hunk ./gtk/Graphics/UI/Gtk/General/Drag.chs 644 - connect_OBJECT_PTR_WORD_WORD__NONE "drag_data_get" after object $ + connect_OBJECT_PTR_WORD_WORD__NONE "drag-data-get" after object $ hunk ./gtk/Graphics/UI/Gtk/General/Drag.chs 666 - connect_OBJECT_INT_INT_PTR_WORD_WORD__NONE "drag_data_received" after object $ + connect_OBJECT_INT_INT_PTR_WORD_WORD__NONE "drag-data-received" after object $ hunk ./gtk/Graphics/UI/Gtk/General/Drag.chs 685 - connect_OBJECT_INT_INT_WORD__BOOL "drag_drop" after object $ \ctxt x y time -> + connect_OBJECT_INT_INT_WORD__BOOL "drag-drop" after object $ \ctxt x y time -> hunk ./gtk/Graphics/UI/Gtk/General/Drag.chs 694 -dragEnd = Signal (connect_OBJECT__NONE "drag_end") +dragEnd = Signal (connect_OBJECT__NONE "drag-end") hunk ./gtk/Graphics/UI/Gtk/General/Drag.chs 706 -dragFailed = Signal (connect_OBJECT_ENUM__BOOL "drag_failed") +dragFailed = Signal (connect_OBJECT_ENUM__BOOL "drag-failed") hunk ./gtk/Graphics/UI/Gtk/General/Drag.chs 716 - connect_OBJECT_WORD__NONE "drag_leave" after object $ \ctxt time -> + connect_OBJECT_WORD__NONE "drag-leave" after object $ \ctxt time -> hunk ./gtk/Graphics/UI/Gtk/General/Drag.chs 740 - connect_OBJECT_INT_INT_WORD__BOOL "drag_motion" after object $ \ctxt x y time -> + connect_OBJECT_INT_INT_WORD__BOOL "drag-motion" after object $ \ctxt x y time -> hunk ./gtk/Graphics/UI/Gtk/General/Selection.chs 474 - connect_PTR_WORD__NONE "selection_received" after object $ \dataPtr time -> do + connect_PTR_WORD__NONE "selection-received" after object $ \dataPtr time -> do hunk ./gtk/Graphics/UI/Gtk/General/Selection.chs 485 - connect_PTR_WORD_WORD__NONE "selection_get" after object $ + connect_PTR_WORD_WORD__NONE "selection-get" after object $ hunk ./gtk/Graphics/UI/Gtk/ModelView/IconView.chs 983 -setIconViewScrollAdjustments = Signal (connect_OBJECT_OBJECT__NONE "set_scroll_adjustments") +setIconViewScrollAdjustments = Signal (connect_OBJECT_OBJECT__NONE "set-scroll-adjustments") hunk ./gtk/Graphics/UI/Gtk/ModelView/IconView.chs 989 -itemActivated = Signal (connect_BOXED__NONE "item_activated" (peekTreePath . castPtr)) +itemActivated = Signal (connect_BOXED__NONE "item-activated" (peekTreePath . castPtr)) hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeModel.chs 613 -rowChanged = Signal (connect_BOXED_BOXED__NONE "row_changed" peekTreePath peekTreeIter) +rowChanged = Signal (connect_BOXED_BOXED__NONE "row-changed" peekTreePath peekTreeIter) hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeModel.chs 620 -rowInserted = Signal (connect_BOXED_BOXED__NONE "row_inserted" peekTreePath peekTreeIter) +rowInserted = Signal (connect_BOXED_BOXED__NONE "row-inserted" peekTreePath peekTreeIter) hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeModel.chs 627 -rowHasChildToggled = Signal (connect_BOXED_BOXED__NONE "row_has_child_toggled" peekTreePath peekTreeIter) +rowHasChildToggled = Signal (connect_BOXED_BOXED__NONE "row-has-child-toggled" peekTreePath peekTreeIter) hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeModel.chs 641 -rowDeleted = Signal (connect_BOXED__NONE "row_deleted" peekTreePath) +rowDeleted = Signal (connect_BOXED__NONE "row-deleted" peekTreePath) hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeModel.chs 654 - connect_BOXED_BOXED_PTR__NONE "rows_reordered" peekTreePath + connect_BOXED_BOXED_PTR__NONE "rows-reordered" peekTreePath hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeSortable.chs 227 -sortColumnChanged = Signal (connect_NONE__NONE "sort_column_changed") +sortColumnChanged = Signal (connect_NONE__NONE "sort-column-changed") } |
From: Axel S. <si...@co...> - 2010-08-14 15:31:14
|
diffing dir... Sat Aug 14 11:30:18 EDT 2010 Axe...@in... * Use functions instead of macros to acquire locks. Fixes a symbol not found error in ghci on Windows. Ignore-this: 1a527803c6e56d1cfc5cfccc26d3604f { hunk ./gtk/Graphics/UI/Gtk/General/hsgthread.c 70 - GDK_THREADS_ENTER (); + gdk_threads_enter(); hunk ./gtk/Graphics/UI/Gtk/General/hsgthread.c 144 - GDK_THREADS_ENTER (); + gdk_threads_enter(); hunk ./gtk/Graphics/UI/Gtk/General/hsgthread.c 181 - GDK_THREADS_LEAVE (); + gdk_threads_leave(); } |
From: Axel S. <si...@co...> - 2010-08-14 14:38:42
|
diffing dir... Sat Aug 14 10:40:47 EDT 2010 Axe...@in... * Fix a warning in GHC 6.12. Ignore-this: ae76fcda5ca3662f7730c25d787f9366 hunk ./tools/c2hs/base/general/FastMutInt.hs 23 - where I# size = SIZEOF_HSINT + where !(I# size) = SIZEOF_HSINT |
From: Andy S. <And...@co...> - 2010-08-08 23:43:33
|
diffing dir... Sun Aug 8 19:40:59 EDT 2010 Andy Stewart <laz...@gm...> * Remove recordpatch.sh, it's should in my local multiple repo. Sorry, :) Ignore-this: 840a184a764279caa0842ac8a94232be { hunk ./recordpatch.sh 1 -#!/bin/sh - -# A script to record patch faster for gtk2hs developers. - -for pkg in tools glib gio cairo pango gtk; do [_$_] - cd $pkg; - darcs record; - cd ..; -done; rmfile ./recordpatch.sh } |