From: Axel S. <si...@co...> - 2009-10-07 14:43:59
|
Tue Oct 6 08:06:59 EDT 2009 Andy Stewart <laz...@gm...> * Update Multiline modules signals and Update Window/WindowGroup modules to Gtk+ 2.16 Ignore-this: 31d7c20ba557bed65a92d6c9adb2d883 hunk ./gtk/Graphics/UI/Gtk.hs.pp 292 - afterToggleOverwrite, onToggleOverwrite) + afterToggleOverwrite, onToggleOverwrite, setScrollAdjustments) hunk ./gtk/Graphics/UI/Gtk/General/Enums.chs.pp 4 --- Author : Axel Simon, Manuel Chakravarty, Andy Stewart +-- Author : Axel Simon, Manuel Chakravarty hunk ./gtk/Graphics/UI/Gtk/General/Enums.chs.pp 9 --- Copyright (C) 2009 Andy Stewart hunk ./gtk/Graphics/UI/Gtk/Multiline/TextBuffer.chs.pp 147 + applyTag, + beginUserAction, + bufferChanged, + deleteRange, + endUserAction, + insertPixbuf, + insertChildAnchor, + bufferInsertText, + markDeleted, + markSet, + modifiedChanged, + pasteDone, + removeTag, + +-- * Deprecated +#ifndef DISABLE_DEPRECATED hunk ./gtk/Graphics/UI/Gtk/Multiline/TextBuffer.chs.pp 189 +#endif hunk ./gtk/Graphics/UI/Gtk/Multiline/TextBuffer.chs.pp 1091 +applyTag :: TextBufferClass self => Signal self (TextTag -> TextIter -> TextIter -> IO ()) [_$_] +applyTag = Signal (connect_OBJECT_BOXED_BOXED__NONE "apply-tag" mkTextIterCopy mkTextIterCopy) + +beginUserAction :: TextBufferClass self => Signal self (IO ()) +beginUserAction = Signal (connect_NONE__NONE "begin_user_action") + +bufferChanged :: TextBufferClass self => Signal self (IO ()) +bufferChanged = Signal (connect_NONE__NONE "changed") + +deleteRange :: TextBufferClass self => Signal self (TextIter -> TextIter -> IO ()) +deleteRange = Signal (connect_BOXED_BOXED__NONE "delete_range" mkTextIterCopy mkTextIterCopy) + +endUserAction :: TextBufferClass self => Signal self (IO ()) +endUserAction = Signal (connect_NONE__NONE "end_user_action") + +insertPixbuf :: TextBufferClass self => Signal self (TextIter -> Pixbuf -> IO ()) +insertPixbuf = Signal (connect_BOXED_OBJECT__NONE "insert_pixbuf" mkTextIterCopy) + +insertChildAnchor :: TextBufferClass self => Signal self (TextIter -> TextChildAnchor -> IO ()) +insertChildAnchor = Signal (connect_BOXED_OBJECT__NONE "insert_child_anchor" mkTextIterCopy) + +bufferInsertText :: TextBufferClass self => Signal self (TextIter -> String -> IO ()) +bufferInsertText = Signal (connect_BOXED_STRING__NONE "insert_text" mkTextIterCopy) + +markDeleted :: TextBufferClass self => Signal self (TextMark -> IO ()) +markDeleted = Signal (connect_OBJECT__NONE "mark_deleted") + +markSet :: TextBufferClass self => Signal self (TextIter -> TextMark -> IO ()) +markSet = Signal (connect_BOXED_OBJECT__NONE "mark_set" mkTextIterCopy) + +modifiedChanged :: TextBufferClass self => Signal self (IO ()) +modifiedChanged = Signal (connect_NONE__NONE "modified_changed") + +pasteDone :: TextBufferClass self => Signal self (Clipboard -> IO ()) +pasteDone = Signal (connect_OBJECT__NONE "paste_done") + +removeTag :: TextBufferClass self => Signal self (TextTag -> TextIter -> TextIter -> IO ()) +removeTag = Signal (connect_OBJECT_BOXED_BOXED__NONE "remove_tag" mkTextIterCopy mkTextIterCopy) + +-------------------- +-- Deprecated Signals and Events + +#ifndef DISABLE_DEPRECATED + hunk ./gtk/Graphics/UI/Gtk/Multiline/TextBuffer.chs.pp 1264 - hunk ./gtk/Graphics/UI/Gtk/Multiline/TextBuffer.chs.pp 1265 +#endif hunk ./gtk/Graphics/UI/Gtk/Multiline/TextMark.chs 4 --- Author : Axel Simon, Andy Stewart +-- Author : Axel Simon hunk ./gtk/Graphics/UI/Gtk/Multiline/TextMark.chs 9 --- Copyright (C) 2009 Andy Stewart hunk ./gtk/Graphics/UI/Gtk/Multiline/TextTag.chs.pp 4 --- Author : Duncan Coutts, Andy Stewart +-- Author : Duncan Coutts hunk ./gtk/Graphics/UI/Gtk/Multiline/TextTag.chs.pp 9 --- Copyright (C) 2009 Andy Stewart hunk ./gtk/Graphics/UI/Gtk/Multiline/TextTag.chs.pp 72 - makeNewTextAttributes, --internal + makeNewTextAttributes, -- internal hunk ./gtk/Graphics/UI/Gtk/Multiline/TextTag.chs.pp 144 + event, + +-- * Deprecated +#ifndef DISABLE_DEPRECATED hunk ./gtk/Graphics/UI/Gtk/Multiline/TextTag.chs.pp 149 +#endif hunk ./gtk/Graphics/UI/Gtk/Multiline/TextTag.chs.pp 247 +-- | This function is use internal for transform TextAttributes. +-- Don't expoert this function. hunk ./gtk/Graphics/UI/Gtk/Multiline/TextTag.chs.pp 740 +-------------------- +-- Signals +-- | An event has occurred that affects the given tag. +-- +-- * Adding an event handler to the tag makes it possible to react on +-- e.g. mouse clicks to implement hyperlinking. +-- +event :: TextTagClass self => Signal self (Event -> TextIter -> IO Bool) +event = Signal (connect_BOXED_BOXED__BOOL "event" marshalEvent mkTextIterCopy) + +-------------------- +-- Deprecated Signals and Events + +#ifndef DISABLE_DEPRECATED hunk ./gtk/Graphics/UI/Gtk/Multiline/TextTag.chs.pp 766 +#endif hunk ./gtk/Graphics/UI/Gtk/Multiline/TextView.chs.pp 4 --- Author : Axel Simon, Andy Stewart +-- Author : Axel Simon hunk ./gtk/Graphics/UI/Gtk/Multiline/TextView.chs.pp 9 --- Copyright (C) 2009 Andy Stewart hunk ./gtk/Graphics/UI/Gtk/Multiline/TextView.chs.pp 159 + backspace, + copyClipboard, + cutClipboard, + deleteFromCursor, + insertAtCursor, + moveCursor, + moveViewport, + moveFocus, + pageHorizontally, + pasteClipboard, + populatePopup, + setAnchor, + setScrollAdjustments, + toggleCursorVisible, + toggleOverwrite, + +-- * Deprecated +#ifndef DISABLE_DEPRECATED hunk ./gtk/Graphics/UI/Gtk/Multiline/TextView.chs.pp 207 +#endif hunk ./gtk/Graphics/UI/Gtk/Multiline/TextView.chs.pp 1186 +backspace :: TextBufferClass self => Signal self (IO ()) +backspace = Signal (connect_NONE__NONE "on_backspace") + +copyClipboard :: TextBufferClass self => Signal self (IO ()) +copyClipboard = Signal (connect_NONE__NONE "copy_clipboard") + +cutClipboard :: TextBufferClass self => Signal self (IO ()) +cutClipboard = Signal (connect_NONE__NONE "cut_clipboard") + +deleteFromCursor :: TextBufferClass self => Signal self (DeleteType -> Int -> IO ()) +deleteFromCursor = Signal (connect_ENUM_INT__NONE "delete_from_cursor") + +insertAtCursor :: TextBufferClass self => Signal self (String -> IO ()) +insertAtCursor = Signal (connect_STRING__NONE "insert_at_cursor") + +moveCursor :: TextBufferClass self => Signal self (MovementStep -> Int -> Bool -> IO ()) +moveCursor = Signal (connect_ENUM_INT_BOOL__NONE "move_cursor") + +moveViewport :: TextBufferClass self => Signal self (ScrollStep -> Int -> IO ()) +moveViewport = Signal (connect_ENUM_INT__NONE "move_viewport") + +moveFocus :: TextBufferClass self => Signal self (DirectionType -> IO ()) +moveFocus = Signal (connect_ENUM__NONE "move_focus") + +pageHorizontally :: TextBufferClass self => Signal self (Int -> Bool -> IO ()) +pageHorizontally = Signal (connect_INT_BOOL__NONE "page_horizontally") + +pasteClipboard :: TextBufferClass self => Signal self (IO ()) +pasteClipboard = Signal (connect_NONE__NONE "paste_clipboard") + +populatePopup :: TextBufferClass self => Signal self (Menu -> IO ()) +populatePopup = Signal (connect_OBJECT__NONE "populate_popup") + +setAnchor :: TextBufferClass self => Signal self (IO ()) +setAnchor = Signal (connect_NONE__NONE "set_anchor") + +setScrollAdjustments :: TextBufferClass self => Signal self (Adjustment -> Adjustment -> IO ()) +setScrollAdjustments = Signal (connect_OBJECT_OBJECT__NONE "set_scroll_adjustments") + +toggleCursorVisible :: TextBufferClass self => Signal self (IO ()) +toggleCursorVisible = Signal (connect_NONE__NONE "toggle_cursor_visible") + +toggleOverwrite :: TextBufferClass self => Signal self (IO ()) +toggleOverwrite = Signal (connect_NONE__NONE "toggle_overwrite") + +-------------------- +-- Deprecated Signals and Events + +#ifndef DISABLE_DEPRECATED hunk ./gtk/Graphics/UI/Gtk/Multiline/TextView.chs.pp 1420 + +#endif hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs.pp 4 --- Author : Manuel M. T. Chakravarty, Axel Simon +-- Author : Manuel M. T. Chakravarty, Axel Simon, Andy Stewart hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs.pp 9 +-- Copyright (C) 2009 Andy Stewart hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs.pp 62 --- windowAddAccelGroup, [_$_] --- windowRemoveAccelGroup, hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs.pp 85 --- windowAddMnemonic, --- windowRemoveMnemonic, --- windowSetMnemonicModifier, + windowGetDefaultWidget, + windowAddMnemonic, + windowRemoveMnemonic, + windowMnemonicActivate, + windowSetMnemonicModifier, + windowGetMnemonicModifier, + -- windowActivateKey, + -- windowPropagateKeyEvent, hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs.pp 118 + windowSetStartupId, hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs.pp 121 --- windowSetDecorationsHint, + windowSetDeletable, + windowGetDeletable, hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs.pp 124 --- windowSetFunctionHint, + windowGetFrameDimensions, + windowSetHasFrame, + windowGetHasFrame, hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs.pp 134 + windowSetIconList, + windowGetIconList, + windowSetDefaultIconList, + windowGetDefaultIconList, hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs.pp 143 + windowSetDefaultIcon, + windowSetDefaultIconFromFile, + windowGetDefaultIconName, hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs.pp 160 + windowParseGeometry, + windowReshowWithInitialSize, hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs.pp 173 + windowSetOpacity, + windowGetOpacity, + windowGetGroup, hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs.pp 184 + windowOpacity, + windowRole, + windowStartupId, hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs.pp 190 + windowDeletable, hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs.pp 193 + windowIconName, hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs.pp 215 + windowToplevelFocus, hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs.pp 219 + activateDefault, + activateFocus, + frameEvent, + keysChanged, + setFocus, + +-- * Deprecated +#ifndef DISABLE_DEPRECATED hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs.pp 231 +#endif hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs.pp 241 +import System.Glib.GList (fromGList, toGList) hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs.pp 243 -import System.Glib.GList (fromGList) hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs.pp 247 -import Graphics.UI.Gtk.Gdk.Events (Event, marshalEvent, MouseButton, +{#import Graphics.UI.Gtk.Gdk.Enums#} (Modifier(..)) +import Graphics.UI.Gtk.Gdk.Events (Event, EventKey, marshalEvent, MouseButton, hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs.pp 420 +-- | Adds a mnemonic to this window. +-- +windowAddMnemonic :: (WindowClass self, WidgetClass widget) => self + -> Int -- ^ @keyval@ - the mnemonic + -> widget -- ^ @target@ - the widget that gets activated by the mnemonic [_$_] + -> IO () +windowAddMnemonic self keyval target = + {# call window_add_mnemonic #} + (toWindow self) + (fromIntegral keyval) + (toWidget target) + +-- | Removes a mnemonic from this window. +-- +windowRemoveMnemonic :: (WindowClass self, WidgetClass widget) => self + -> Int -- ^ @keyval@ - the mnemonic [_$_] + -> widget -- ^ @target@ - the widget that gets activated by the mnemonic [_$_] + -> IO () +windowRemoveMnemonic self keyval target = + {# call window_remove_mnemonic #} [_$_] + (toWindow self) + (fromIntegral keyval) + (toWidget target) + +-- | Activates the targets associated with the mnemonic. +windowMnemonicActivate :: WindowClass self => self + -> Int -- ^ @keyval@ - the mnemonic [_$_] + -> Modifier -- ^ @modifier@ - the modifiers [_$_] + -> IO Bool -- ^ return @True@ if the activation is done. [_$_] +windowMnemonicActivate self keyval modifier = liftM toBool $ [_$_] + {# call window_mnemonic_activate #} + (toWindow self) + (fromIntegral keyval) + (fromIntegral (fromEnum modifier)) + +-- | Sets the mnemonic modifier for this window. +windowSetMnemonicModifier :: WindowClass self => self + -> Modifier -- ^ @modifier@ - the modifier mask used to activate mnemonics on this window. [_$_] + -> IO () +windowSetMnemonicModifier self modifier = + {# call window_set_mnemonic_modifier #} + (toWindow self) + (fromIntegral (fromEnum modifier)) + +-- | Returns the mnemonic modifier for this window. See 'windowSetMnemonicModifier'. +windowGetMnemonicModifier :: WindowClass self => self + -> IO Modifier -- ^ return the modifier mask used to activate mnemonics on this window. [_$_] +windowGetMnemonicModifier self = liftM (toEnum.fromIntegral) $ + {# call window_get_mnemonic_modifier #} [_$_] + (toWindow self) + +-- | Activates mnemonics and accelerators for this GtkWindow. [_$_] +-- This is normally called by the default ::key_press_event handler for toplevel windows, [_$_] +-- however in some cases it may be useful to call this directly when overriding the standard key handling for a toplevel window. +-- [_$_] +-- windowActivateKey :: WindowClass self => self +-- -> EventKey -- ^ @event@ - 'EventKey' +-- -> IO Bool -- ^ return @True@ if a mnemonic or accelerator was found and activated. [_$_] +-- windowActivateKey self event = liftM toBool $ +-- {# call window_activate_key #} +-- (toWindow self) +-- event + +-- | Propagate a key press or release event to the focus widget and up the focus container chain until a widget handles event. [_$_] +-- This is normally called by the default ::key_press_event and ::key_release_event handlers for toplevel windows, [_$_] +-- however in some cases it may be useful to call this directly when overriding the standard key handling for a toplevel window. +-- +-- windowPropagateKeyEvent :: WindowClass self => self +-- -> EventKey -- ^ @event@ - 'EventKey' +-- -> IO Bool -- ^ return @True@ if a widget in the focus chain handled the event. [_$_] +-- windowPropagateKeyEvent self event = liftM toBool $ +-- {# call window_propagate_key_event #} +-- (toWindow self) +-- event + hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs.pp 637 +-- | Returns the default widget for window. See 'windowSetDefault' for more details. +-- [_$_] +-- * Available since Gtk+ version 2.14 +-- +windowGetDefaultWidget :: WindowClass self => self + -> IO Widget +windowGetDefaultWidget self = [_$_] + makeNewObject mkWidget $ + {# call window_get_default_widget #} + (toWindow self) + hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs.pp 941 +-- | Startup notification identifiers are used by desktop environment to track application startup, [_$_] +-- to provide user feedback and other features. This function changes the corresponding property on the underlying GdkWindow. [_$_] +-- Normally, startup identifier is managed automatically and you should only use this function in special cases like transferring focus from other processes. You should use this function before calling gtk_window_present() or any equivalent function generating a window map event. +-- +-- This function is only useful on X11, not with other GTK+ targets. +-- +-- * Available since Gtk+ version 2.12 +-- +windowSetStartupId :: WindowClass self => self + -> String + -> IO () +windowSetStartupId self startupId = + withUTFString startupId $ \idPtr -> + {# call window_set_startup_id #} + (toWindow self) + idPtr + hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs.pp 985 +-- | By default, windows have a close button in the window frame. [_$_] +-- Some window managers allow GTK+ to disable this button. [_$_] +-- If you set the deletable property to @False@ using this function, GTK+ will do its best to convince the window manager not to show a close button. [_$_] +-- Depending on the system, this function may not have any effect when called on a window that is already visible, [_$_] +-- so you should call it before calling gtk_window_show(). +-- +-- On Windows, this function always works, since there's no window manager policy involved. +-- +-- * Available since Gtk+ version 2.10 +-- +windowSetDeletable :: WindowClass self => self + -> Bool -- ^ @setting@ - @True@ to decorate the window as deletable [_$_] + -> IO () +windowSetDeletable self setting = + {# call window_set_deletable #} + (toWindow self) + (fromBool setting) + +-- | Returns whether the window has been set to have a close button via 'windowSetDeletable'. +-- +-- * Available since Gtk+ version 2.10 +-- +windowGetDeletable :: WindowClass self => self + -> IO Bool -- ^ return @True@ if the window has been set to have a close button [_$_] +windowGetDeletable self = liftM toBool $ [_$_] + {# call window_get_deletable #} + (toWindow self) + hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs.pp 1035 +-- | (Note: this is a special-purpose function intended for the framebuffer port; see 'windowSetHasFrame'. [_$_] +-- It will not return the size of the window border drawn by the window manager, [_$_] +-- which is the normal case when using a windowing system. [_$_] +-- See 'drawWindowGetFrameExtents' to get the standard window border extents.) +-- +-- Retrieves the dimensions of the frame window for this toplevel. See 'windowSetHasFrame', 'windowSetFrameDimensions'. +-- +windowGetFrameDimensions :: WindowClass self => self + -> IO (Maybe (Int + ,Int + ,Int + ,Int)) -- ^ return @(left, top, right, bottom)@ is location to store size frame. @left@ is width of the frame at the left, @top@ is height of the frame at the top, @right@ is width of the frame at the right, @bottom@ is height of the frame at the bottom. +windowGetFrameDimensions self = [_$_] + alloca $ \lPtr -> alloca $ \tPtr -> alloca $ \rPtr -> alloca $ \bPtr -> [_$_] + do + {# call window_get_frame_dimensions #} (toWindow self) lPtr tPtr rPtr bPtr + if lPtr == nullPtr || tPtr == nullPtr || rPtr == nullPtr || bPtr == nullPtr + then return Nothing + else do + lv <- peek lPtr + tv <- peek tPtr + rv <- peek rPtr + bv <- peek bPtr + return (Just (fromIntegral lv, fromIntegral tv, fromIntegral rv, fromIntegral bv)) + +-- | (Note: this is a special-purpose function for the framebuffer port, that causes GTK+ to draw its own window border. [_$_] +-- For most applications, you want 'windowSetDecorated' instead, which tells the window manager whether to draw the window border.) +-- +-- If this function is called on a window with setting of @True@, before it is realized or showed, it will have a "frame" window around window->window, +-- accessible in window->frame. Using the signal frame_event you can receive all events targeted at the frame. +-- +-- This function is used by the linux-fb port to implement managed windows, [_$_] +-- but it could conceivably be used by X-programs that want to do their own window decorations. +-- +windowSetHasFrame :: WindowClass self => self [_$_] + -> Bool -- ^ @setting@ - a boolean [_$_] + -> IO () +windowSetHasFrame self setting = + {# call window_set_has_frame #} + (toWindow self) + (fromBool setting) + +-- | Accessor for whether the window has a frame window exterior to window->window. Gets the value set by 'windowSetHasFrame'. +-- +windowGetHasFrame :: WindowClass self => self + -> IO Bool -- ^ return @True@ if a frame has been added to the window via 'windowSetHasFrame'. +windowGetHasFrame self = liftM toBool $ + {# call window_get_has_frame #} + (toWindow self) + hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs.pp 1208 +-- | Sets up the icon representing a GtkWindow. The icon is used when the window is minimized (also known as iconified). [_$_] +-- Some window managers or desktop environments may also place it in the window frame, or display it in other contexts. +-- +-- 'windowSetIconList' allows you to pass in the same icon in several hand-drawn sizes. [_$_] +-- The list should contain the natural sizes your icon is available in; that is, don't scale the image before passing it to GTK+. [_$_] +-- Scaling is postponed until the last minute, when the desired final size is known, to allow best quality. +-- +-- By passing several sizes, you may improve the final image quality of the icon, by reducing or eliminating automatic image scaling. +-- +-- Recommended sizes to provide: 16x16, 32x32, 48x48 at minimum, and larger images (64x64, 128x128) if you have them. +-- +-- See also 'windowSetDefaultIconList' to set the icon for all windows in your application in one go. +-- +-- Note that transient windows (those who have been set transient for another window using 'windowSetTransientFor' will inherit their icon from their +-- transient parent. [_$_] +-- So there's no need to explicitly set the icon on transient windows. +-- +windowSetIconList :: WindowClass self => self + -> [Pixbuf] + -> IO () +windowSetIconList self list = + withForeignPtrs (map unPixbuf list) $ \ptrList -> do + glist <- toGList ptrList + {# call window_set_icon_list #} + (toWindow self) + glist + [_$_] +-- | Retrieves the list of icons set by 'windowSetIconList'. [_$_] +-- The list is copied, but the reference count on each member won't be incremented. +-- +windowGetIconList :: WindowClass self => self [_$_] + -> IO [Pixbuf] +windowGetIconList self = do + glist <- {# call window_get_icon_list #} (toWindow self) + ptrList <- fromGList glist + mapM (makeNewGObject mkPixbuf . return) ptrList + +-- | Sets an icon list to be used as fallback for windows that haven't had 'windowSetIconList' called on them to set up a window-specific icon list. [_$_] +-- This function allows you to set up the icon for all windows in your app at once. +-- +-- See 'windowSetIconList' for more details. +-- +windowSetDefaultIconList :: [Pixbuf] -> IO () +windowSetDefaultIconList list = [_$_] + withForeignPtrs (map unPixbuf list) $ \ptrList -> do + glist <- toGList ptrList + {# call window_set_default_icon_list #} glist + +-- | Gets the value set by 'windowSetDefaultIconList'. [_$_] +-- The list is a copy and should be freed with 'listFree', but the pixbufs in the list have not had their reference count incremented. +-- +windowGetDefaultIconList :: IO [Pixbuf] +windowGetDefaultIconList = do + glist <- {# call window_get_default_icon_list #} + ptrList <- fromGList glist + mapM (makeNewGObject mkPixbuf . return) ptrList + hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs.pp 1313 +-- | Sets an icon to be used as fallback for windows that haven't had 'windowSetIcon' called on them from a pixbuf. +-- +-- * Available since Gtk+ version 2.4 +-- +windowSetDefaultIcon :: Maybe Pixbuf -> IO () +windowSetDefaultIcon (Just icon) = + {# call window_set_default_icon #} icon +windowSetDefaultIcon Nothing = + {# call window_set_default_icon #} (mkPixbuf nullForeignPtr) + +-- | Sets an icon to be used as fallback for windows that haven't had 'windowSetIconList' called on them from a file on disk. [_$_] +windowSetDefaultIconFromFile :: [_$_] + String [_$_] + -> GError [_$_] + -> IO Bool +windowSetDefaultIconFromFile filename error = liftM toBool $ + withUTFString filename $ \filePtr -> [_$_] + with error $ \gErrorPtr -> [_$_] + {# call window_set_default_icon_from_file #} + filePtr + (castPtr gErrorPtr) + +-- | Returns the fallback icon name for windows that has been set with 'windowSetDefaultIconName'. [_$_] +-- The returned string is owned by GTK+ and should not be modified. [_$_] +-- It is only valid until the next call to 'windowSetDefaultIconName'. +-- +-- * Available since Gtk+ version 2.16 +-- +windowGetDefaultIconName :: IO String +windowGetDefaultIconName = [_$_] + {# call window_get_default_icon_name #} >>= peekCString + hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs.pp 1479 +-- | Parses a standard X Window System geometry string - see the manual page for X (type 'man X') for details on this. [_$_] +-- 'windowParseGeometry' does work on all GTK+ ports including Win32 but is primarily intended for an X environment. +-- +-- If either a size or a position can be extracted from the geometry string, [_$_] +-- 'windowParseGeometry' returns @True@ and calls gtk_window_set_default_size() and/or gtk_window_move() to resize/move the window. +-- +-- If 'windowParseGeometry' returns @True@, [_$_] +-- it will also set the 'HintUserPos' and/or 'HintUserSize' hints indicating to the window manager that the size/position of the window was user-specified +-- This causes most window managers to honor the geometry. +-- +-- Note that for 'windowParseGeometry' to work as expected, it has to be called when the window has its "final" size, i.e. [_$_] +-- after calling 'widgetShowAll' on the contents and 'windowSetGeometryHints' on the window. +-- +windowParseGeometry :: WindowClass self => self + -> String + -> IO Bool +windowParseGeometry self geometry = liftM toBool $ + withUTFString geometry $ \geometryPtr -> [_$_] + {# call window_parse_geometry #} + (toWindow self) + geometryPtr + +-- | Hides window, then reshows it, resetting the default size and position of the window. Used by GUI builders only. +-- +windowReshowWithInitialSize :: WindowClass self => self -> IO () +windowReshowWithInitialSize self = + {# call window_reshow_with_initial_size #} (toWindow self) + hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs.pp 1828 +-- | Request the windowing system to make window partially transparent, with opacity 0 being fully transparent and 1 fully opaque. [_$_] +-- (Values of the opacity parameter are clamped to the [0,1] range.) [_$_] +-- On X11 this has any effect only on X screens with a compositing manager running. See gtk_widget_is_composited(). +-- On Windows it should work always. +-- +-- Note that setting a window's opacity after the window has been shown causes it to flicker once on Windows. +-- [_$_] +-- * Available since Gtk+ version 2.12 +-- +windowSetOpacity :: WindowClass self => self + -> Double -- ^ @opacity@ - desired opacity, between 0 and 1 [_$_] + -> IO () +windowSetOpacity self opacity = + {#call window_set_opacity #} (toWindow self) (realToFrac opacity) + +-- | Fetches the requested opacity for this window. See 'windowSetOpacity'. +-- +-- * Available since Gtk+ version 2.12 +-- +windowGetOpacity :: WindowClass self => self [_$_] + -> IO Double -- ^ return the requested opacity for this window. [_$_] +windowGetOpacity self = liftM realToFrac $ + {#call window_get_opacity#} (toWindow self) + +-- | Returns the group for window or the default group, if window is @Nothing@ or if window does not have an explicit window group. +-- [_$_] +-- * Available since Gtk+ version 2.10 +-- +windowGetGroup :: WindowClass self => Maybe self + -> IO WindowGroup -- ^ return the 'WindowGroup' for a window or the default group [_$_] +windowGetGroup self = [_$_] + makeNewGObject mkWindowGroup $ + {# call window_get_group #} (maybe (Window nullForeignPtr) toWindow self) + [_$_] + hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs.pp 1917 +-- | The requested opacity of the window. See 'windowSetOpacity' for more details about window opacity. +-- +-- Allowed values: [0,1] +-- +-- Default values: 1 +-- +-- * Available since Gtk+ version 2.12 +-- +windowOpacity :: WindowClass self => Attr self Double +windowOpacity = newAttrFromDoubleProperty "opacity" + +-- | Unique identifier for the window to be used when restoring a session. +-- +-- Default value: "\\" +-- +windowRole :: WindowClass self => Attr self String +windowRole = newAttrFromStringProperty "role" + +-- | The :startup-id is a write-only property for setting window's startup notification identifier. See 'windowSetStartupId' for more details. +-- +-- Default value: "\\" +-- +-- * Available since Gtk+ version 2.12 +-- +windowStartupId :: WindowClass self => Attr self String +windowStartupId = newAttrFromStringProperty "startup-id" + hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs.pp 1970 +-- | Whether the window frame should have a close button. +-- +-- Default values: @True@ +-- +-- * Available since Gtk+ version 2.10 +-- +windowDeletable :: WindowClass self => Attr self Bool +windowDeletable = newAttrFromBoolProperty "deletable" + hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs.pp 1995 +-- | The :icon-name property specifies the name of the themed icon to use as the window icon. See GtkIconTheme for more details. +-- +-- Default values: "\\" +-- +-- * Available since Gtk+ version 2.6 +-- +-- +windowIconName :: WindowClass self => Attr self String +windowIconName = newAttrFromStringProperty "icon-name" + hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs.pp 2098 +-- | Whether the input focus is within this GtkWindow. +-- +-- Note: If add `window` before `HasToplevelFocus` (has-toplevel-focus attribute) +-- will conflicts with fucntion `windowHasToplevelFocus`, so we named this attribute [_$_] +-- to `windowToplevelFocus`. +-- +-- Default values: @False@ +-- +windowToplevelFocus :: WindowClass self => Attr self Bool +windowToplevelFocus = newAttrFromBoolProperty "has-toplevel-focus" + hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs.pp 2119 +-- | The ::activate-default signal is a keybinding signal which gets emitted when the user activates the default widget of window. +activateDefault :: WindowClass self => Signal self (IO ()) +activateDefault = Signal (connect_NONE__NONE "activate_default") + +-- | The ::activate-default signal is a keybinding signal which gets emitted when the user activates the currently focused widget of window. +activateFocus :: WindowClass self => Signal self (IO ()) +activateFocus = Signal (connect_NONE__NONE "activate_focus") + +-- | [_$_] +-- [_$_] +frameEvent :: WindowClass self => Signal self (Event -> IO Bool) +frameEvent = Signal (connect_BOXED__BOOL "frame_event" marshalEvent) + +-- | The ::keys-changed signal gets emitted when the set of accelerators or mnemonics that are associated with window changes. +-- +keysChanged :: WindowClass self => Signal self (IO ()) +keysChanged = Signal (connect_NONE__NONE "keys_changed") + +-- | [_$_] +-- +setFocus :: WindowClass self => Signal self (Widget -> IO ()) +setFocus = Signal (connect_OBJECT__NONE "set_focus") hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs.pp 2142 +-- * Deprecated +#ifndef DISABLE_DEPRECATED hunk ./gtk/Graphics/UI/Gtk/Windows/Window.chs.pp 2160 +#endif hunk ./gtk/Graphics/UI/Gtk/Windows/WindowGroup.chs 48 + windowGroupListWindows, hunk ./gtk/Graphics/UI/Gtk/Windows/WindowGroup.chs 53 +import System.Glib.GList (fromGList, toGList) hunk ./gtk/Graphics/UI/Gtk/Windows/WindowGroup.chs 92 + +-- | Returns a list of the GtkWindows that belong to window_group. +-- [_$_] +-- * Available since Gtk+ version 2.14 +-- +windowGroupListWindows :: WindowGroupClass self => self + -> IO [Pixbuf] -- ^ return A newly-allocated list of windows inside the group. [_$_] +windowGroupListWindows self = do + glist <- {# call window_group_list_windows #} (toWindowGroup self) + ptrList <- fromGList glist + mapM (makeNewGObject mkPixbuf . return) ptrList hunk ./tools/callbackGen/gtkmarshal.list 129 +# for TextBuffer +NONE:BOXED,STRING |