From: Andy S. <And...@co...> - 2009-11-16 16:30:58
|
Mon Nov 16 09:56:42 EST 2009 Andy Stewart <laz...@gm...> * Update Graphics.UI.Gtk.Embedding modules to Gtk+ 2.18.3 Ignore-this: d560619a2b3f3d5cb64ef2e794097fcb hunk ./gtk/Graphics/UI/Gtk/Embedding/Plug.chs.pp 4 --- Author : Axel Simon +-- Author : Axel Simon, Andy Stewart hunk ./gtk/Graphics/UI/Gtk/Embedding/Plug.chs.pp 9 +-- Copyright (C) 2009 Andy Stewart hunk ./gtk/Graphics/UI/Gtk/Embedding/Plug.chs.pp 60 +#if GTK_CHECK_VERSION(2,2,0) + plugNewForDisplay, +#endif hunk ./gtk/Graphics/UI/Gtk/Embedding/Plug.chs.pp 66 +#if GTK_CHECK_VERSION(2,14,0) + plugGetEmbedded, + plugGetSocketWindow, +#endif + +-- * Attributes + plugAttrEmbedded, + plugAttrSocketWindow, hunk ./gtk/Graphics/UI/Gtk/Embedding/Plug.chs.pp 76 + plugEmbedded, + +-- * Deprecated +#ifndef DISABLE_DEPRECATED hunk ./gtk/Graphics/UI/Gtk/Embedding/Plug.chs.pp 83 +#endif hunk ./gtk/Graphics/UI/Gtk/Embedding/Plug.chs.pp 90 +import System.Glib.Attributes +import System.Glib.Properties hunk ./gtk/Graphics/UI/Gtk/Embedding/Plug.chs.pp 124 +#if GTK_CHECK_VERSION(2,2,0) +-- | Create a new plug widget inside the 'Socket' identified by socket_id. +-- +-- * Available since Gtk+ version 2.2 +-- +plugNewForDisplay :: + Display -- ^ @display@ - the 'Display' on which @socketId@ is + -- displayed + -> Maybe NativeWindowId -- ^ @socketId@ - the XID of the socket's window. + -> IO Plug +plugNewForDisplay display socketId = + makeNewObject mkPlug $ + liftM (castPtr :: Ptr Widget -> Ptr Plug) $ + {# call gtk_plug_new_for_display #} + display + (fromNativeWindowId (fromMaybe nativeWindowIdNone socketId)) +#endif + hunk ./gtk/Graphics/UI/Gtk/Embedding/Plug.chs.pp 156 +#if GTK_CHECK_VERSION(2,14,0) +-- | Determines whether the plug is embedded in a socket. +-- +-- * Available since Gtk+ version 2.14 +-- +plugGetEmbedded :: PlugClass self => self + -> IO Bool -- ^ returns @True@ if the plug is embedded in a socket +plugGetEmbedded self = + liftM toBool $ + {# call gtk_plug_get_embedded #} + (toPlug self) + +-- | Retrieves the socket the plug is embedded in. +-- +-- * Available since Gtk+ version 2.14 +-- +plugGetSocketWindow :: PlugClass self => self + -> IO DrawWindow -- ^ returns the window of the socket, or {@NULL@, FIXME: + -- this should probably be converted to a Maybe data type} +plugGetSocketWindow self = + makeNewGObject mkDrawWindow $ + {# call gtk_plug_get_socket_window #} + (toPlug self) +#endif + +-------------------- +-- Attributes + +-- | @True@ if the plug is embedded in a socket. +-- +-- Default value: FALSE +-- [_$_] +-- * Available since Gtk+ version 2.12 +-- +plugAttrEmbedded :: PlugClass self => ReadAttr self Bool +plugAttrEmbedded = readAttrFromBoolProperty "embedded" + +-- | The window of the socket the plug is embedded in. +-- +-- * Available since Gtk+ version 2.14 +-- [_$_] +plugAttrSocketWindow :: PlugClass self => ReadAttr self DrawWindow +plugAttrSocketWindow = readAttrFromObjectProperty "socket-window" + {# call pure unsafe gdk_window_object_get_type #} + hunk ./gtk/Graphics/UI/Gtk/Embedding/Plug.chs.pp 204 --- | This plug received another application. +-- | Gets emitted when the plug becomes embedded in a socket and when the +-- embedding ends. hunk ./gtk/Graphics/UI/Gtk/Embedding/Plug.chs.pp 207 -onEmbedded, afterEmbedded :: PlugClass self => self +plugEmbedded :: PlugClass self => Signal self (IO ()) +plugEmbedded = Signal (connect_NONE__NONE "embedded") + +-------------------- +-- Deprecated Signals + +#ifndef DISABLE_DEPRECATED +onEmbedded :: PlugClass self => self hunk ./gtk/Graphics/UI/Gtk/Embedding/Plug.chs.pp 218 -afterEmbedded = connect_NONE__NONE "embedded" True +{-# DEPRECATED onEmbedded "instead of 'onEmbedded obj' use 'on obj plugEmbedded'" #-} hunk ./gtk/Graphics/UI/Gtk/Embedding/Plug.chs.pp 220 +afterEmbedded :: PlugClass self => self + -> IO () + -> IO (ConnectId self) +afterEmbedded = connect_NONE__NONE "embedded" True +{-# DEPRECATED afterEmbedded "instead of 'afterEmbedded obj' use 'after obj plugEmbedded'" #-} hunk ./gtk/Graphics/UI/Gtk/Embedding/Plug.chs.pp 227 +#endif hunk ./gtk/Graphics/UI/Gtk/Embedding/Socket.chs.pp 4 --- Author : Axel Simon +-- Author : Axel Simon, Andy Stewart hunk ./gtk/Graphics/UI/Gtk/Embedding/Socket.chs.pp 9 +-- Copyright (C) 2009 Andy Stewart hunk ./gtk/Graphics/UI/Gtk/Embedding/Socket.chs.pp 99 +#if GTK_CHECK_VERSION(2,14,0) + socketGetPlugWindow, +#endif hunk ./gtk/Graphics/UI/Gtk/Embedding/Socket.chs.pp 104 + socketPlugAdded, + socketPlugRemoved, + +-- * Deprecated +#ifndef DISABLE_DEPRECATED hunk ./gtk/Graphics/UI/Gtk/Embedding/Socket.chs.pp 114 +#endif hunk ./gtk/Graphics/UI/Gtk/Embedding/Socket.chs.pp 120 +import System.Glib.Attributes +import System.Glib.Properties hunk ./gtk/Graphics/UI/Gtk/Embedding/Socket.chs.pp 185 +#if GTK_CHECK_VERSION(2,14,0) +-- | Retrieves the window of the plug. Use this to check if the plug has been +-- created inside of the socket. +-- +-- * Available since Gtk+ version 2.14 +-- +socketGetPlugWindow :: SocketClass self => self + -> IO DrawWindow -- ^ returns the window of the plug if available, or + -- {@NULL@, FIXME: this should probably be converted to a + -- Maybe data type} +socketGetPlugWindow self = + makeNewGObject mkDrawWindow $ + {# call gtk_socket_get_plug_window #} + (toSocket self) +#endif + hunk ./gtk/Graphics/UI/Gtk/Embedding/Socket.chs.pp 206 -onPlugAdded, afterPlugAdded :: SocketClass self => self +socketPlugAdded :: SocketClass self => Signal self (IO ()) +socketPlugAdded = Signal (connect_NONE__NONE "plug-added") + +-- | This signal is emitted when a client is removed from the socket. The +-- default action is to destroy the 'Socket' widget, so if you want to reuse it +-- you must add a signal handler that returns @True@. +-- +socketPlugRemoved :: SocketClass self => Signal self (IO Bool) +socketPlugRemoved = Signal (connect_NONE__BOOL "plug-removed") + +-------------------- +-- Deprecated Signals + +#ifndef DISABLE_DEPRECATED +onPlugAdded :: SocketClass self => self hunk ./gtk/Graphics/UI/Gtk/Embedding/Socket.chs.pp 224 -afterPlugAdded = connect_NONE__NONE "plug-added" True +{-# DEPRECATED onPlugAdded "instead of 'onPlugAdded obj' use 'on obj socketPlugAdded'" #-} hunk ./gtk/Graphics/UI/Gtk/Embedding/Socket.chs.pp 226 --- | This signal is emitted when a client is removed from the socket. --- -onPlugRemoved, afterPlugRemoved :: SocketClass self => self +afterPlugAdded :: SocketClass self => self hunk ./gtk/Graphics/UI/Gtk/Embedding/Socket.chs.pp 229 -onPlugRemoved = connect_NONE__NONE "plug-removed" False -afterPlugRemoved = connect_NONE__NONE "plug-removed" True +afterPlugAdded = connect_NONE__NONE "plug-added" True +{-# DEPRECATED afterPlugAdded "instead of 'afterPlugAdded obj' use 'after obj socketPlugAdded'" #-} + +onPlugRemoved :: SocketClass self => self + -> IO Bool + -> IO (ConnectId self) +onPlugRemoved = connect_NONE__BOOL "plug-removed" False +{-# DEPRECATED onPlugRemoved "instead of 'onPlugRemoved obj' use 'on obj socketPlugRemoved'" #-} hunk ./gtk/Graphics/UI/Gtk/Embedding/Socket.chs.pp 238 +afterPlugRemoved :: SocketClass self => self + -> IO Bool + -> IO (ConnectId self) +afterPlugRemoved = connect_NONE__BOOL "plug-removed" True +{-# DEPRECATED afterPlugRemoved "instead of 'afterPlugRemoved obj' use 'after obj socketPlugRemoved'" #-} hunk ./gtk/Graphics/UI/Gtk/Embedding/Socket.chs.pp 245 +#endif |