Hi,
I've added webResourceGetData and webDataSourceGetData. My hope was that I could
get the downloaded favicon using them, but the icon is the only resource I
always got Nothing for. It also seems using webResourceGetData you only get the
headers of downloaded images. But at least you may retrieve the webpages sources
that way. :)
Andreas
3 patches for repository http://code.haskell.org/webkit:
Mon Nov 15 10:48:22 CET 2010 Andreas Baldeau <andr...@baldeau.net>
* Added webDataSourceGetData
This requires a version of glib with GString patch applied.
Mon Nov 15 10:50:30 CET 2010 Andreas Baldeau <andr...@baldeau.net>
* Fixed typo.
Mon Nov 15 11:30:17 CET 2010 Andreas Baldeau <andr...@baldeau.net>
* Added webResourceGetData
This requires glib with GString patch applied.
New patches:
[Added webDataSourceGetData
Andreas Baldeau <andr...@baldeau.net>**20101115094822
Ignore-this: 6fdc72678b31e887b5b0965ae148d540
This requires a version of glib with GString patch applied.
] hunk ./Graphics/UI/Gtk/WebKit/WebDataSource.chs 52
webDataSourceNew,
-- * Methods
- -- webDataSourceGetData,
+ webDataSourceGetData,
webDataSourceGetEncoding,
webDataSourceGetInitialRequest,
webDataSourceGetMainResource,
hunk ./Graphics/UI/Gtk/WebKit/WebDataSource.chs 68
import System.Glib.FFI
import System.Glib.UTFString
import System.Glib.GList
+import System.Glib.GString
import System.Glib.GError
import Graphics.UI.Gtk.Gdk.Events
hunk ./Graphics/UI/Gtk/WebKit/WebDataSource.chs 87
-- | Returns the raw data that represents the the frame's content.The data
will be incomplete until the
-- data has finished loading. Returns 'Nothing' if the web frame hasn't loaded
any data. Use
-- @webkitWebDataSourceIsLoading@ to test if data source is in the process of
loading.
---
--- webDataSourceGetData :: WebDataSourceClass self => self
--- -> IO (Maybe String)
--- webDataSourceGetData ds = do
--- ptr <- {#call webkit_web_data_source_get_data #}
--- (toWebDataSource ds)
--- if strPtr == nullPtr
--- then return Nothing
--- else liftM Just $ peekCStringLen (strPtr, strLen)
+webDataSourceGetData :: WebDataSourceClass self => self
+ -> IO (Maybe String)
+webDataSourceGetData ds = do
+ gstr <- {#call webkit_web_data_source_get_data #}
+ (toWebDataSource ds)
+ readGString gstr
-- | Returns the text encoding name as set in the 'WebView', or if not, the
text encoding of the response.
webDataSourceGetEncoding ::
[Fixed typo.
Andreas Baldeau <andr...@baldeau.net>**20101115095030
Ignore-this: a1863058940c90ca4cc6342b9924274c
] hunk ./Graphics/UI/Gtk/WebKit/WebDataSource.chs 84
webDataSourceNew =
wrapNewGObject mkWebDataSource $ {#call web_data_source_new#}
--- | Returns the raw data that represents the the frame's content.The data
will be incomplete until the
+-- | Returns the raw data that represents the the frame's content. The data
will be incomplete until the
-- data has finished loading. Returns 'Nothing' if the web frame hasn't loaded
any data. Use
-- @webkitWebDataSourceIsLoading@ to test if data source is in the process of
loading.
webDataSourceGetData :: WebDataSourceClass self => self
[Added webResourceGetData
Andreas Baldeau <andr...@baldeau.net>**20101115103017
Ignore-this: 1c3531d4e96d28abed3b39e2a2f861df
This requires glib with GString patch applied.
] hunk ./Graphics/UI/Gtk/WebKit/WebResource.chs 44
webResourceNew,
-- * Methods
+ webResourceGetData,
webResourceGetEncoding,
webResourceGetFrameName,
webResourceGetMimeType,
hunk ./Graphics/UI/Gtk/WebKit/WebResource.chs 56
import System.Glib.FFI
import System.Glib.UTFString
import System.Glib.GList
+import System.Glib.GString
import System.Glib.GError
import Graphics.UI.Gtk.Gdk.Events
hunk ./Graphics/UI/Gtk/WebKit/WebResource.chs 80
wrapNewGObject mkWebResource $
{#call web_resource_new#} dataPtr (fromIntegral size) uriPtr mimePtr
encodingPtr framePtr
+-- | Returns the data of the WebResource.
+webResourceGetData :: WebResourceClass self => self -> IO (Maybe String)
+webResourceGetData wr =
+ {#call web_resource_get_data#} (toWebResource wr) >>= readGString
+
-- | Get encoding.
webResourceGetEncoding ::
WebResourceClass self => self
Context:
[Tag 0.12.1
Andy Stewart <lazycat.mana...@gmail.com>**20101114233647
Ignore-this: 57d6522e0e8b65acb4361d060d8b4071
]
[Forgot "darcs add" new moduls, sorry
Andy Stewart <lazycat.mana...@gmail.com>**20101114233505
Ignore-this: d6489514be401031d75715e62ff4ef37
]
[Tag 0.12.0
Andy Stewart <lazycat.mana...@gmail.com>**20101107144904
Ignore-this: 71b5d3b23b9dcd29a039155198aab96d
]
[Support ghc-7
Andy Stewart <lazycat.mana...@gmail.com>**20101107125057
Ignore-this: b17cafa34f87295fa6d5d1974b53572c
]
[Adjust webResourceGetMimeType.
Andreas Baldeau <andr...@baldeau.net>**20100905232232
Ignore-this: 936e25812d18273ead5611323a547154
]
[Adjust webResourceGetFrameName.
Andreas Baldeau <andr...@baldeau.net>**20100905232206
Ignore-this: 71f1e1c549ce291a3c24c5d601ae71a3
]
[Adjust webResourceGetEncoding.
Andreas Baldeau <andr...@baldeau.net>**20100905231954
Ignore-this: 34e9f69f7394bb9e2cdfc767e9394d62
]
[Update with wrapNewGObject
Andy Stewart <lazycat.mana...@gmail.com>**20101022044615
Ignore-this: 78acd0aecd11d76124821e5aea25e5a5
]
[Change signal name and fix docs
Andy Stewart <lazycat.mana...@gmail.com>**20100929235831
Ignore-this: 85d0ab1a86d2b3fab15a5d372a4b6a4c
]
[Update Gtk2HsSetup.hs
Andy Stewart <lazycat.mana...@gmail.com>**20100924002623
Ignore-this: 2ac7aa66a60a2a31cfe33e713c959f65
]
[Depend glib-0.11.2
Andy Stewart <lazycat.mana...@gmail.com>**20100906020559
Ignore-this: 46fae789cf0367eb8fb3c0c240fd5b18
]
[Tag webkit-0.11.2
Andy Stewart <lazycat.mana...@gmail.com>**20100906014223
Ignore-this: 501fdd2c7ebeb2f1ed7ce9b4bc15cb10
]
[adjust iconLoaded signal
Daniel Ehlers <danielehl...@mindeye.net>**20100904010412
Ignore-this: 35233408d3767816c24ca925e5b3e627
]
[adjust hoveringOverLink signal
Daniel Ehlers <danielehl...@mindeye.net>**20100904003725
Ignore-this: a156539b3a4774750fbd96ae4641ae4c
This patch is using the maybePeekUTFString extension to glib. Now
this signal can be bound without the pain of segfaults.
]
[Adjust resourceRequestStarting signal.
Daniel Ehlers <danielehl...@mindeye.net>**20100903210141
Ignore-this: 457bcc691e89813d4c239e4e61f5b538
]
[Fix docs
Andy Stewart <lazycat.mana...@gmail.com>**20100905153806
Ignore-this: a0c0cb56b71e1bfb5db59953351b1f20
]
[Replace tab with space
Andy Stewart <lazycat.mana...@gmail.com>**20100825045926
Ignore-this: 7aa4789313e606821b31eff8ebe57de0
]
[Tag 0.11.1
Andy Stewart <lazycat.mana...@gmail.com>**20100729183530
Ignore-this: 651741b8f68f1185d17cbcd66761ad36
]
[Generate better haddock docs.
Andy Stewart <lazycat.mana...@gmail.com>**20100729183116
Ignore-this: 24ba8406f74cbf0fbcb4991162237c28
]
[Fix webSettingsFantasyFontFamily attr
Andy Stewart <lazycat.mana...@gmail.com>**20100722171625
Ignore-this: 8e6a8584cca8a9990eb2dbc9d76727c
]
[Update to WebKitGTK+ 1.1.23
Andy Stewart <lazycat.mana...@gmail.com>**20100628123709
Ignore-this: 5b896bac25c262073551a365c31cb897
]
[Update to WebKitGTK+ 1.1.20
Andy Stewart <lazycat.mana...@gmail.com>**20100628122050
Ignore-this: 3a4a054bb21e8109ee5c8c911e617fbb
]
[Update WebKitGTK+ 1.1.18
Andy Stewart <lazycat.mana...@gmail.com>**20100628121542
Ignore-this: 36b3ca2f42bb0ba196f4b1c0a4419af1
]
[Update to WebKitGTK+ 1.1.17
Andy Stewart <lazycat.mana...@gmail.com>**20100628115119
Ignore-this: d4d2b79cb755732c94178dba2578cd34
]
[Update to WebKitGTK+ 1.1.16
Andy Stewart <lazycat.mana...@gmail.com>**20100628114005
Ignore-this: e812cedfc8dd43dacf4d9f8e121d7dd3
]
[Fix Haddock Type link.
Andy Stewart <lazycat.mana...@gmail.com>**20100627054230
Ignore-this: 4e7ee4131ad828779b3cb6b0b97ab466
]
[Fix Source-Repository
Andy Stewart <lazycat.mana...@gmail.com>**20100605125027
Ignore-this: 9e4669ba569ec0d10f1d9b714146d7a
]
[Move hierarchy.list to webkit package (Don't need reinstall gtk2hs-buildtools
after add new type)
Andy Stewart <lazycat.mana...@gmail.com>**20100604132832
Ignore-this: 9ed4fbed03ad8fe1d4cf56034c3dfdbf
]
[Fix Gtk2hsSetup.hs bug.
Andy Stewart <lazycat.mana...@gmail.com>**20100527095718
Ignore-this: ad0594b0dfa7d9f3c35d34cb7ed771a4
]
[Add demo
Andy Stewart <lazycat.mana...@gmail.com>**20100527062107
Ignore-this: 6f0fded471c305d2d432e5ba4bb0ba63
]
[Fix license
Andy Stewart <lazycat.mana...@gmail.com>**20100527035738
Ignore-this: 985672b6e5bb69e884dc4c8c3610aad7
]
[Remove all but webkit.
axel.si...@in.tum.de**20100525210636]
[Documentation fix for EventM.
axel.si...@in.tum.de**20100525131428
Ignore-this: 25c3bf3513ec6467cbd0febe397ab53e
]
[Put upper bounds on base version.
axel.si...@in.tum.de**20100525082101
Ignore-this: f92b2d9970c436c9fcbcf141fc988e8
]
[Make documentation parsable.
axel.si...@in.tum.de**20100525080209
Ignore-this: 60f44b8251a9f3e933c874f72d8e8801
]
[Make the version test in pango less complex as Cabal 1.6 doesn't parse it
otherwise.
axel.si...@in.tum.de**20100525075706
Ignore-this: f3446237cf66abf49e81bd4ba8ef9744
]
[Fix an incorrect pattern in windowSetIcon.
axel.si...@in.tum.de**20100525075639
Ignore-this: eb596c778897b4ae4fd7f9a8dde59726
]
[Get rid of stock images under ./docs/reference/images
Andy Stewart <lazycat.mana...@gmail.com>**20100524235315
Ignore-this: 1094aaf32c73ba189937e1beee24ee49
]
[Redirect image link to library.gnome.org and update image items to GTK+ 2.20
Andy Stewart <lazycat.mana...@gmail.com>**20100524233947
Ignore-this: f33362d57605d16365e4dfac59c01122
]
[Add an upper version to the requirement on base.
axel.si...@in.tum.de**20100524211158]
[Be more specific as to the prerequisites of packages.
axel.si...@in.tum.de**20100524210210]
[Fix docu.
axel.si...@in.tum.de**20100524210157]
[Make soegtk compile by fixing dependency on old-time and by not relying on Gtk
2.18.
axel.si...@in.tum.de**20100524210032]
[don't mention tools in the docs for unregistering.
axel.si...@in.tum.de**20100524201401]
[TAG 0.11.0
axel.si...@in.tum.de**20100524200857]
Patch bundle hash:
f17fca4f1aad8c9f981499c8e2d27cf830838430
------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
Gtk2hs-devel mailing list
Gtk2hs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel