gtk 0.15.3 → 0.15.4
raw patch · 3 files changed
+30/−9 lines, 3 files
Files
- Graphics/UI/Gtk/Gdk/Pixbuf.chs +22/−0
- Graphics/UI/Gtk/General/hsgthread.c +6/−7
- gtk.cabal +2/−2
Graphics/UI/Gtk/Gdk/Pixbuf.chs view
@@ -81,6 +81,7 @@ #endif #if GTK_CHECK_VERSION(3,0,0) pixbufNewFromSurface,+ pixbufNewFromWindow, #endif pixbufNewFromInline, InlineImage,@@ -370,6 +371,27 @@ (fromIntegral srcY) (fromIntegral width) (fromIntegral height)++-- | Creates a new pixbuf from a GDK window.+--+-- Transfers image data from a GdkWindow and converts it to an RGB(A) representation inside a GdkPixbuf. In other words, copies image data from a server-side drawable to a client-side RGB(A) buffer. This allows you to efficiently read individual pixels on the client side.+--+-- This function will create an RGB pixbuf with 8 bits per channel with the size specified by the width and height arguments scaled by the scale factor of window. The pixbuf will contain an alpha channel if the window contains one.+pixbufNewFromWindow :: DrawWindowClass self + => self -- ^ @window@ - The source window.+ -> Int -- ^ @srcX@ - Source X coordinate within window.+ -> Int -- ^ @srcY@ - Source Y coordinate within window.+ -> Int -- ^ @width@ - Width in pixels of region to get.+ -> Int -- ^ @height@ - Height in pixels of region to get.+ -> IO Pixbuf+pixbufNewFromWindow window srcX srcY width height =+ wrapNewGObject mkPixbuf $+ {# call gdk_pixbuf_get_from_window #}+ (toDrawWindow window)+ (fromIntegral srcX)+ (fromIntegral srcY)+ (fromIntegral width)+ (fromIntegral height) #endif -- | A string representing an image file format.
Graphics/UI/Gtk/General/hsgthread.c view
@@ -47,7 +47,7 @@ #if defined( WIN32 ) static CRITICAL_SECTION gtk2hs_finalizer_mutex; #else-static GStaticMutex gtk2hs_finalizer_mutex;+static GMutex gtk2hs_finalizer_mutex; #endif static GSource* gtk2hs_finalizer_source; static guint gtk2hs_finalizer_id;@@ -102,7 +102,7 @@ #if defined( WIN32 ) InitializeCriticalSection(>k2hs_finalizer_mutex); #else- g_static_mutex_init(>k2hs_finalizer_mutex);+ g_mutex_init(>k2hs_finalizer_mutex); #endif #if defined( WIN32 ) && GLIB_CHECK_VERSION(2,32,0)@@ -110,7 +110,6 @@ gdk_threads_set_lock_functions(imp_rec_lock, imp_rec_unlock); #endif- g_thread_init(NULL); gdk_threads_init(); /* from here onwards, the Gdk lock is held */@@ -133,7 +132,7 @@ #if defined( WIN32 ) EnterCriticalSection(>k2hs_finalizer_mutex); #else- g_static_mutex_lock(>k2hs_finalizer_mutex);+ g_mutex_lock(>k2hs_finalizer_mutex); #endif mutex_locked = 1; }@@ -178,7 +177,7 @@ #if defined( WIN32 ) LeaveCriticalSection(>k2hs_finalizer_mutex); #else- g_static_mutex_unlock(>k2hs_finalizer_mutex);+ g_mutex_unlock(>k2hs_finalizer_mutex); #endif } }@@ -198,7 +197,7 @@ #if defined( WIN32 ) EnterCriticalSection(>k2hs_finalizer_mutex); #else- g_static_mutex_lock(>k2hs_finalizer_mutex);+ g_mutex_lock(>k2hs_finalizer_mutex); #endif mutex_locked = 1; }@@ -221,7 +220,7 @@ #if defined( WIN32 ) LeaveCriticalSection(>k2hs_finalizer_mutex); #else- g_static_mutex_unlock(>k2hs_finalizer_mutex);+ g_mutex_unlock(>k2hs_finalizer_mutex); #endif }
gtk.cabal view
@@ -1,5 +1,5 @@ Name: gtk-Version: 0.15.3+Version: 0.15.4 License: LGPL-2.1 License-file: COPYING Copyright: (c) 2001-2010 The Gtk2Hs Team@@ -381,7 +381,7 @@ -- needs to be imported from this module: x-Signals-Import: Graphics.UI.Gtk.General.Threading include-dirs: .- cpp-options: -U__BLOCKS__ -D__attribute__(A)=+ cpp-options: -U__BLOCKS__ -DGLIB_DISABLE_DEPRECATION_WARNINGS if os(darwin) || os(freebsd) cpp-options: -D_Nullable= -D_Nonnull= if !flag(deprecated)