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: Axel S. <as...@us...> - 2004-10-24 17:19:31
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/entry In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28086/gtk/entry Added Files: Editable.chspp Entry.chspp EntryCompletion.chspp Removed Files: Editable.chs Entry.chs EntryCompletion.chs Log Message: New build system. --- NEW FILE: Entry.chspp --- -- -*-haskell-*- -- GIMP Toolkit (GTK) Widget Entry -- -- Author : Axel Simon -- -- Created: 23 May 2001 -- -- Version $Revision: 1.1 $ from $Date: 2004/10/24 17:19:20 $ -- -- Copyright (c) 1999..2002 Axel Simon -- -- This file is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- -- This file 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 General Public License for more details. -- -- | -- -- * This widget lets the user enter a single line of text. -- -- * TODO -- -- * 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. -- module Entry( Entry, EntryClass, castToEntry, entryNew, entrySetText, entryGetText, #ifndef DISABLE_DEPRECATED entryAppendText, entryPrependText, #endif entrySetVisibility, entryGetVisibility, entrySetInvisibleChar, entryGetInvisibleChar, entrySetMaxLength, entryGetActivatesDefault, entrySetActivatesDefault, entryGetHasFrame, entrySetHasFrame, entryGetWidthChars, entrySetWidthChars, #if GTK_CHECK_VERSION(2,4,0) entrySetAlignment, entryGetAlignment, entrySetCompletion, entryGetCompletion, #endif onEntryActivate, afterEntryActivate, onCopyClipboard, afterCopyClipboard, onCutClipboard, afterCutClipboard, onPasteClipboard, afterPasteClipboard, onInsertAtCursor, afterInsertAtCursor, onToggleOverwrite, afterToggleOverwrite ) where import Monad (liftM) import FFI import Object (makeNewObject) import GObject (makeNewGObject) {#import Hierarchy#} {#import Signal#} import Char (ord, chr) {# context lib="gtk" prefix="gtk" #} -- GtkEntry implements the GtkEditable interface instance EditableClass Entry -- methods -- | Create a new 'Entry' widget. -- entryNew :: IO Entry entryNew = makeNewObject mkEntry $ liftM castPtr $ {#call unsafe entry_new#} -- | Set the text of the 'Entry' widget. -- entrySetText :: EntryClass ec => ec -> String -> IO () entrySetText ec str = withUTFString str $ {#call entry_set_text#} (toEntry ec) -- | Get the text of the 'Entry' widget. -- entryGetText :: EntryClass ec => ec -> IO String entryGetText ec = {#call entry_get_text#} (toEntry ec) >>= peekUTFString #ifndef DISABLE_DEPRECATED -- | Append to the text of the 'Entry' widget. -- entryAppendText :: EntryClass ec => ec -> String -> IO () entryAppendText ec str = withUTFString str $ {#call entry_append_text#} (toEntry ec) -- | Prepend the text of the 'Entry' widget. -- entryPrependText :: EntryClass ec => ec -> String -> IO () entryPrependText ec str = withUTFString str $ {#call entry_prepend_text#} (toEntry ec) #endif -- | Set whether to use password mode (display stars instead of the text). -- -- * The replacement character can be changed with 'entrySetInvisibleChar'. -- entrySetVisibility :: EntryClass ec => ec -> Bool -> IO () entrySetVisibility ec visible = {#call entry_set_visibility#} (toEntry ec) (fromBool visible) -- | Get whether widget is in password mode. -- entryGetVisibility :: EntryClass ec => ec -> IO Bool entryGetVisibility ec = liftM toBool $ {#call entry_get_visibility#} (toEntry ec) -- | Set the replacement character for invisible text. -- entrySetInvisibleChar :: EntryClass ec => ec -> Char -> IO () entrySetInvisibleChar ec ch = {#call unsafe entry_set_invisible_char#} (toEntry ec) ((fromIntegral.ord) ch) -- | Get the current replacement character for invisible text, -- or 0 if not in password mode. -- entryGetInvisibleChar :: EntryClass ec => ec -> IO Char entryGetInvisibleChar ec = liftM (chr.fromIntegral) $ {#call unsafe entry_get_invisible_char#} (toEntry ec) -- | Sets a maximum length the text may grow to. -- -- * A negative number resets the restriction. -- entrySetMaxLength :: EntryClass ec => ec -> Int -> IO () entrySetMaxLength ec max = {#call entry_set_max_length#} (toEntry ec) (fromIntegral max) -- | Gets a maximum length the text is allowed to grow to. -- entryGetMaxLength :: EntryClass ec => ec -> IO Int entryGetMaxLength ec = liftM fromIntegral $ {#call unsafe entry_get_max_length#} (toEntry ec) -- | Query whether pressing return will activate the default widget. -- entryGetActivatesDefault :: EntryClass ec => ec -> IO Bool entryGetActivatesDefault ec = liftM toBool $ {#call unsafe entry_get_activates_default#} (toEntry ec) -- | Specify if pressing return will activate -- the default widget. -- -- * This setting is useful in 'Dialog' boxes where enter should press -- the default button. -- entrySetActivatesDefault :: EntryClass ec => ec -> Bool -> IO () entrySetActivatesDefault ec setting = {#call entry_set_activates_default#} (toEntry ec) (fromBool setting) -- | Query if the text 'Entry' is displayed with a frame around it. -- entryGetHasFrame :: EntryClass ec => ec -> IO Bool entryGetHasFrame ec = liftM toBool $ {#call unsafe entry_get_has_frame#} (toEntry ec) -- | Specifies whehter the 'Entry' should be in an etched-in frame. -- entrySetHasFrame :: EntryClass ec => ec -> Bool -> IO () entrySetHasFrame ec setting = {#call entry_set_has_frame#} (toEntry ec) (fromBool setting) -- | Retrieve the number of characters the widget should ask for. -- entryGetWidthChars :: EntryClass ec => ec -> IO Int entryGetWidthChars ec = liftM fromIntegral $ {#call unsafe entry_get_width_chars#} (toEntry ec) -- | Specifies how large the 'Entry' should be in characters. -- -- * This setting is only considered when the widget formulates its size -- request. Make sure that it is not mapped (shown) before you change this -- value. -- entrySetWidthChars :: EntryClass ec => ec -> Int -> IO () entrySetWidthChars ec setting = {#call entry_set_width_chars#} (toEntry ec) (fromIntegral setting) #if GTK_CHECK_VERSION(2,4,0) -- | Sets the alignment for the contents of the entry. This controls the -- horizontal positioning of the contents when the displayed text is shorter -- than the width of the entry. -- -- * Since gtk 2.4 -- entrySetAlignment :: EntryClass ec => ec -> Float -> IO () entrySetAlignment ec xalign = {#call entry_set_alignment#} (toEntry ec) (realToFrac xalign) -- | Gets the value set by 'entrySetAlignment'. -- -- * Since gtk 2.4 -- entryGetAlignment :: EntryClass ec => ec -> IO Float entryGetAlignment ec = liftM realToFrac $ {#call unsafe entry_get_alignment#} (toEntry ec) -- | Sets the auxiliary completion object to use with the entry. All further -- configuration of the completion mechanism is done on completion using the -- "EntryCompletion" API. -- -- * Since gtk 2.4 -- entrySetCompletion :: EntryClass ec => ec -> EntryCompletion -> IO () entrySetCompletion ec completion = {#call gtk_entry_set_completion#} (toEntry ec) completion -- | Returns the auxiliary completion object currently in use by the entry. -- -- * Since gtk 2.4 -- entryGetCompletion :: EntryClass ec => ec -> IO EntryCompletion entryGetCompletion ec = makeNewGObject mkEntryCompletion $ {#call gtk_entry_get_completion#} (toEntry ec) #endif -- signals -- | Emitted when the user presses return within -- the 'Entry' field. -- onEntryActivate, afterEntryActivate :: EntryClass ec => ec -> IO () -> IO (ConnectId ec) onEntryActivate = connect_NONE__NONE "activate" False afterEntryActivate = connect_NONE__NONE "activate" True -- | Emitted when the settings of the -- 'Entry' widget changes. -- onEntryChanged, afterEntryChanged :: EntryClass ec => ec -> IO () -> IO (ConnectId ec) onEntryChanged = connect_NONE__NONE "changed" False afterEntryChanged = connect_NONE__NONE "changed" True -- | Emitted when the current selection has been -- copied to the clipboard. -- onCopyClipboard, afterCopyClipboard :: EntryClass ec => ec -> IO () -> IO (ConnectId ec) onCopyClipboard = connect_NONE__NONE "copy_clipboard" False afterCopyClipboard = connect_NONE__NONE "copy_clipboard" True -- | Emitted when the current selection has been -- cut to the clipboard. -- onCutClipboard, afterCutClipboard :: EntryClass ec => ec -> IO () -> IO (ConnectId ec) onCutClipboard = connect_NONE__NONE "cut_clipboard" False afterCutClipboard = connect_NONE__NONE "cut_clipboard" True -- | Emitted when the current selection has -- been pasted from the clipboard. -- onPasteClipboard, afterPasteClipboard :: EntryClass ec => ec -> IO () -> IO (ConnectId ec) onPasteClipboard = connect_NONE__NONE "paste_clipboard" False afterPasteClipboard = connect_NONE__NONE "paste_clipboard" True -- | Emitted when a piece of text is deleted from -- the 'Entry'. -- onDeleteText, afterDeleteText :: EntryClass ec => ec -> (Int -> Int -> IO ()) -> IO (ConnectId ec) onDeleteText = connect_INT_INT__NONE "delete_text" False afterDeleteText = connect_INT_INT__NONE "delete_text" True -- | Emitted when a piece of text is inserted -- at the cursor position. -- onInsertAtCursor, afterInsertAtCursor :: EntryClass ec => ec -> (String -> IO ()) -> IO (ConnectId ec) onInsertAtCursor = connect_STRING__NONE "insert_at_cursor" False afterInsertAtCursor = connect_STRING__NONE "insert_at_cursor" True -- | Emitted when the user changes from -- overwriting to inserting. -- onToggleOverwrite, afterToggleOverwrite :: EntryClass ec => ec -> IO () -> IO (ConnectId ec) onToggleOverwrite = connect_NONE__NONE "toggle_overwrite" False afterToggleOverwrite = connect_NONE__NONE "toggle_overwrite" True --- Entry.chs DELETED --- --- NEW FILE: Editable.chspp --- -- -*-haskell-*- -- GIMP Toolkit (GTK) Interface Editable -- -- Author : Axel Simon, Duncan Coutts -- -- Created: 30 July 2004 -- split off from Entry.chs -- -- Copyright (c) 1999..2002 Axel Simon -- modified 2004 Duncan Coutts -- -- This file is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- -- This file 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 General Public License for more details. -- -- | -- -- * This is an interface for simple single-line text editing widgets. It is -- implemented by "Entry" and "SpinButton". -- -- * TODO -- -- * Find out if \"insert-text\" signal is useful and how to bind it. It is -- tricky because it has an in-out parameter. -- module Editable( -- * Data types Editable, EditableClass, castToEditable, -- * Methods editableSelectRegion, editableGetSelectionBounds, editableInsertText, editableDeleteText, editableGetChars, editableCutClipboard, editableCopyClipboard, editablePasteClipboard, editableDeleteSelection, editableSetEditable, editableGetEditable, editableSetPosition, editableGetPosition, -- * Signals onEditableChanged, afterEditableChanged, onDeleteText, afterDeleteText, ) where import Monad (liftM) import FFI import Object (makeNewObject) import GObject (makeNewGObject) {#import Hierarchy#} {#import Signal#} {# context lib="gtk" prefix="gtk" #} -- | Select a span of text. -- -- * A negative @end@ position will make the selection extend to the -- end of the buffer. -- -- * Calling this function with @start@=1 and @end@=4 it will -- mark \"ask\" in the string \"Haskell\". (FIXME: verify) -- editableSelectRegion :: EditableClass ed => ed -> Int -> Int -> IO () editableSelectRegion ed start end = {#call editable_select_region#} (toEditable ed) (fromIntegral start) (fromIntegral end) -- | Get the span of the current selection. -- -- * The returned tuple is not ordered. The second index represents the -- position of the cursor. The first index is the other end of the -- selection. If both numbers are equal there is in fact no selection. -- editableGetSelectionBounds :: EditableClass ed => ed -> IO (Int,Int) editableGetSelectionBounds ed = alloca $ \startPtr -> alloca $ \endPtr -> do {#call unsafe editable_get_selection_bounds#} (toEditable ed) startPtr endPtr start <- liftM fromIntegral $ peek startPtr end <- liftM fromIntegral $ peek endPtr return (start,end) -- | Insert new text at the specified position. -- -- * If the position is invalid the text will be inserted at the end of the -- buffer. The returned value reflects the actual insertion point. -- editableInsertText :: EditableClass ed => ed -> String -> Int -> IO Int editableInsertText ed str pos = withObject (fromIntegral pos) $ \posPtr -> withUTFStringLen str $ \(strPtr,len) -> do {#call editable_insert_text#} (toEditable ed) strPtr (fromIntegral len) posPtr liftM fromIntegral $ peek posPtr -- | Delete a given range of text. -- -- * If the @end@ position is invalid, it is set to the lenght of the -- buffer. -- -- * @start@ is restricted to 0..@end@. -- editableDeleteText :: EditableClass ed => ed -> Int -> Int -> IO () editableDeleteText ed start end = {#call editable_delete_text#} (toEditable ed) (fromIntegral start) (fromIntegral end) -- | Retrieve a range of characters. -- -- * Set @end@ to a negative value to reach the end of the buffer. -- editableGetChars :: EditableClass ed => ed -> Int -> Int -> IO String editableGetChars ed start end = do strPtr <- {#call unsafe editable_get_chars#} (toEditable ed) (fromIntegral start) (fromIntegral end) str <- peekUTFString strPtr {#call unsafe g_free#} (castPtr strPtr) return str -- | Cut the selected characters to the Clipboard. -- editableCutClipboard :: EditableClass ed => ed -> IO () editableCutClipboard = {#call editable_cut_clipboard#}.toEditable -- | Copy the selected characters to the Clipboard. -- editableCopyClipboard :: EditableClass ed => ed -> IO () editableCopyClipboard = {#call editable_copy_clipboard#}.toEditable -- | Paste the selected characters to the -- Clipboard. -- editablePasteClipboard :: EditableClass ed => ed -> IO () editablePasteClipboard = {#call editable_paste_clipboard#}.toEditable -- | Delete the current selection. -- editableDeleteSelection :: EditableClass ed => ed -> IO () editableDeleteSelection = {#call editable_delete_selection#}.toEditable -- | Set the cursor to a specific position. -- editableSetPosition :: EditableClass ed => ed -> Int -> IO () editableSetPosition ed pos = {#call editable_set_position#} (toEditable ed) (fromIntegral pos) -- | Get the current cursor position. -- editableGetPosition :: EditableClass ed => ed -> IO Int editableGetPosition ed = liftM fromIntegral $ {#call unsafe editable_get_position#} (toEditable ed) -- | Make the widget insensitive. -- -- * Called with False will make the text uneditable. -- editableSetEditable :: EditableClass ed => ed -> Bool -> IO () editableSetEditable ed isEditable = {#call editable_set_editable#} (toEditable ed) (fromBool isEditable) -- | Retrieves whether the text is editable. -- editableGetEditable :: EditableClass ed => ed -> IO Bool editableGetEditable ed = liftM toBool $ {#call editable_get_editable#} (toEditable ed) -- signals -- | Emitted when the settings of the 'Editable' widget changes. -- onEditableChanged, afterEditableChanged :: EditableClass ec => ec -> IO () -> IO (ConnectId ec) onEditableChanged = connect_NONE__NONE "changed" False afterEditableChanged = connect_NONE__NONE "changed" True -- | Emitted when a piece of text is deleted from the 'Editable' widget. -- onDeleteText, afterDeleteText :: EditableClass ec => ec -> (Int -> Int -> IO ()) -> IO (ConnectId ec) onDeleteText = connect_INT_INT__NONE "delete_text" False afterDeleteText = connect_INT_INT__NONE "delete_text" True --- NEW FILE: EntryCompletion.chspp --- -- -*-haskell-*- -- GIMP Toolkit (GTK) entry Widget EntryCompletion -- -- Author : Duncan Coutts -- Created: 24 April 2004 -- -- Copyright (c) 2004 Duncan Coutts -- -- This library is free software; you can redistribute it and/or -- modify it under the terms of the GNU Library General Public -- License as published by the Free Software Foundation; either -- version 2 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 -- Library General Public License for more details. -- -- | -- -- Completion functionality for the Entry widget. -- -- * Added in GTK+ 2.4 -- module EntryCompletion ( #if GTK_CHECK_VERSION(2,4,0) EntryCompletion, EntryCompletionClass, entryCompletionNew, entryCompletionGetEntry, entryCompletionSetModel, entryCompletionGetModel, entryCompletionSetMatchFunc, entryCompletionSetMinimumKeyLength, entryCompletionGetMinimumKeyLength, entryCompletionComplete, entryCompletionInsertActionText, entryCompletionInsertActionMarkup, entryCompletionDeleteAction, entryCompletionSetTextColumn #endif ) where #if GTK_CHECK_VERSION(2,4,0) import Monad (liftM) import FFI import LocalData (newIORef, readIORef, writeIORef) import GObject (makeNewGObject) import Object (makeNewObject) {#import Hierarchy#} {#import Signal#} {#import TreeModel#} (TreeIter, createTreeIter) {# context lib="gtk" prefix="gtk" #} entryCompletionNew :: IO EntryCompletion entryCompletionNew = makeNewGObject mkEntryCompletion $ liftM castPtr $ {# call gtk_entry_completion_new #} entryCompletionGetEntry :: EntryCompletion -> IO (Maybe Entry) entryCompletionGetEntry ec = do entryPtr <- {# call gtk_entry_completion_get_entry #} ec if entryPtr == nullPtr then return Nothing else liftM Just $ makeNewObject mkEntry $ return (castPtr entryPtr) entryCompletionSetModel :: EntryCompletion -> TreeModel -> IO () entryCompletionSetModel ec tm = {# call gtk_entry_completion_set_model #} ec tm entryCompletionGetModel :: EntryCompletion -> IO TreeModel entryCompletionGetModel ec = makeNewGObject mkTreeModel $ {# call gtk_entry_completion_get_model #} ec entryCompletionSetMatchFunc :: EntryCompletion -> (String -> TreeIter -> IO ()) -> IO () entryCompletionSetMatchFunc ec handler = connect_GtkEntryCompletionMatchFunc ec handler entryCompletionSetMinimumKeyLength :: EntryCompletion -> Int -> IO () entryCompletionSetMinimumKeyLength ec minLength = {# call gtk_entry_completion_set_minimum_key_length #} ec (fromIntegral minLength) entryCompletionGetMinimumKeyLength :: EntryCompletion -> IO Int entryCompletionGetMinimumKeyLength ec = liftM fromIntegral $ {# call gtk_entry_completion_get_minimum_key_length #} ec entryCompletionComplete :: EntryCompletion -> IO () entryCompletionComplete ec = {# call gtk_entry_completion_complete #} ec entryCompletionInsertActionText :: EntryCompletion -> Int -> String -> IO () entryCompletionInsertActionText ec index text = withUTFString text $ \strPtr -> {# call gtk_entry_completion_insert_action_text #} ec (fromIntegral index) strPtr entryCompletionInsertActionMarkup :: EntryCompletion -> Int -> String -> IO () entryCompletionInsertActionMarkup ec index markup = withUTFString markup $ \strPtr -> {# call gtk_entry_completion_insert_action_markup #} ec (fromIntegral index) strPtr entryCompletionDeleteAction :: EntryCompletion -> Int -> IO () entryCompletionDeleteAction ec index = {# call gtk_entry_completion_delete_action #} ec (fromIntegral index) entryCompletionSetTextColumn :: EntryCompletion -> Int -> IO () entryCompletionSetTextColumn ec column = {# call gtk_entry_completion_set_text_column #} ec (fromIntegral column) ------------------------------------------------- -- Callback stuff for entryCompletionSetMatchFunc -- {#pointer GDestroyNotify#} foreign import ccall "wrapper" mkDestructor :: IO () -> IO GDestroyNotify type GtkEntryCompletionMatchFunc = Ptr EntryCompletion -> --GtkEntryCompletion *completion Ptr CChar -> --const gchar *key Ptr TreeIter -> --GtkTreeIter *iter Ptr () -> --gpointer user_data IO () foreign import ccall "wrapper" mkHandler_GtkEntryCompletionMatchFunc :: GtkEntryCompletionMatchFunc -> IO (FunPtr GtkEntryCompletionMatchFunc) connect_GtkEntryCompletionMatchFunc :: EntryCompletion -> (String -> TreeIter -> IO ()) -> IO () connect_GtkEntryCompletionMatchFunc ec user = do hPtr <- mkHandler_GtkEntryCompletionMatchFunc (\_ keyPtr iterPtr _ -> do key <- peekUTFString keyPtr iter <- createTreeIter iterPtr user key iter) dRef <- newIORef nullFunPtr dPtr <- mkDestructor $ do freeHaskellFunPtr hPtr dPtr <- readIORef dRef freeHaskellFunPtr dPtr writeIORef dRef dPtr {# call gtk_entry_completion_set_match_func #} ec (castFunPtr hPtr) nullPtr dPtr #endif --- Editable.chs DELETED --- --- EntryCompletion.chs DELETED --- |
From: Axel S. <as...@us...> - 2004-10-24 17:19:30
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/glib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28086/gtk/glib Added Files: GError.chspp GObject.chspp Removed Files: GError.chs GObject.chs Log Message: New build system. --- NEW FILE: GError.chspp --- -- -*-haskell-*- -- GIMP Toolkit (GTK) GError API -- -- Author : Duncan Coutts -- Created: 2 July 2004 -- -- Copyright (c) 2004 Duncan Coutts -- parts derived from Structs.hsc Copyright (c) 1999..2002 Axel Simon -- -- This library is free software; you can redistribute it and/or -- modify it under the terms of the GNU Library General Public -- License as published by the Free Software Foundation; either -- version 2 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 -- Library General Public License for more details. -- -- | -- -- Error Reporting, glib's system for reporting errors. -- -- 'GError's are used by glib to report recoverable runtime errors. -- -- This module provides functions for checking glib\/gtk functions that report -- 'GError's. It also provides functions for throwing and catching 'GError's as -- Haskell exceptions. -- module GError ( -- * Data types -- GError(..), GErrorDomain, GErrorCode, GErrorMessage, -- * Catching GError exceptions -- | To catch GError exceptions thrown by gtk2hs functions use the catchGError* -- or handleGError* functions. They work in a similar way to the standard -- 'Control.Exception.catch' and 'Control.Exception.handle' functions. -- -- 'catchGError'\/'handleGError' catches all GError exceptions, you provide a -- handler function that gets given the GError if an exception was thrown. This -- is the most general but is probably not what you want most of the time. It -- just gives you the raw error code rather than a Haskell enumeration of the -- error codes. Most of the time you will only want to catch a specific error -- or any error from a specific error domain. To catch just a single specific -- error use 'catchGErrorJust'\/'handleGErrorJust'. To catch any error in a -- particular error domain use 'catchGErrorJustDomain'\/'handleGErrorJustDomain' -- catchGError, catchGErrorJust, catchGErrorJustDomain, handleGError, handleGErrorJust, handleGErrorJustDomain, failOnGError, throwGError, -- * Checking for GErrors returned by glib\/gtk functions -- | * Note, these functions are only useful to implementors -- -- If you are wrapping a new API that reports 'GError's you should probably use -- 'propagateGError' to convert the GError into an exception. You should also -- note in the documentation for the function that it throws GError exceptions -- and the Haskell enumeration for the expected glib GError domain(s), so that -- users know what exceptions they might want to catch. -- -- If you think it is more appropriate to use an alternate return value (eg -- Either\/Maybe) then you should use 'checkGError' or 'checkGErrorWithCont'. GErrorClass(..), propagateGError, checkGError, checkGErrorWithCont ) where import FFI import Monad (when) import Control.Exception import Data.Dynamic {# context lib="gtk" prefix ="gtk" #} -- | A GError consists of a domain, code and a human readable message. data GError = GError !GErrorDomain !GErrorCode !GErrorMessage # if __GLASGOW_HASKELL__>=600 deriving Typeable #else {-# NOINLINE gerrorTypeRep #-} gerrorTypeRep :: TypeRep gerrorTypeRep = mkAppTy (mkTyCon "Graphics.UI.Gtk.GError.GError") [] instance Typeable GError where typeOf _ = gerrorTypeRep #endif type GQuark = {#type GQuark #} -- | A code used to identify the \'namespace\' of the error. Within each error -- domain all the error codes are defined in an enumeration. Each gtk\/gnome -- module that uses GErrors has its own error domain. The rationale behind -- using error domains is so that each module can organise its own error codes -- without having to coordinate on a global error code list. type GErrorDomain = GQuark -- | A code to identify a specific error within a given 'GErrorDomain'. Most of -- time you will not need to deal with this raw code since there is an -- enumeration type for each error domain. Of course which enumeraton to use -- depends on the error domain, but if you use 'catchGErrorJustDomain' or -- 'handleGErrorJustDomain', this is worked out for you automatically. type GErrorCode = Int -- | A human readable error message. type GErrorMessage = String instance Storable GError where sizeOf _ = {#sizeof GError #} alignment _ = alignment (undefined:: GQuark) peek ptr = do (domain :: GQuark) <- {#get GError->domain #} ptr (code :: {#type gint #}) <- {#get GError->code #} ptr (msgPtr :: CString) <- {#get GError->message #} ptr msg <- peekUTFString msgPtr return $ GError (fromIntegral domain) (fromIntegral code) msg poke _ = error "GError::poke: not implemented" -- | Each error domain's error enumeration type should be an instance of this -- class. This class helps to hide the raw error and domain codes from the -- user. This interface should be implemented by calling the approrpiate -- @{error_domain}_error_quark@. It is safe to use 'unsafePerformIO' for this. -- -- Example for 'PixbufError': -- -- > instance GErrorClass PixbufError where -- > gerrorDomain _ = unsafePerformIO {#call unsafe pixbuf_error_quark#} -- class Enum err => GErrorClass err where gerrorDomain :: err -> GErrorDomain -- ^ This must not use the value of its parameter -- so that it is safe to pass 'undefined'. -- | Glib functions which report 'GError's take as a parameter a @GError **error@. -- Use this function to supply such a parameter. It checks if an error was -- reported and if so throws it as a Haskell exception. -- -- Example of use: -- -- > propagateGError $ \gerrorPtr -> -- > {# call g_some_function_that_might_return_an_error #} a b gerrorPtr -- propagateGError :: (Ptr (Ptr ()) -> IO a) -> IO a propagateGError action = checkGError action throwGError -- | Like 'propagateGError' but instead of throwing the GError as an exception -- handles the error immediately using the supplied error handler. -- -- Example of use: -- -- > checkGError -- > (\gerrorPtr -> {# call g_some_function_that_might_return_an_error #} a b gerrorPtr) -- > (\(GError domain code msg) -> ...) -- checkGError :: (Ptr (Ptr ()) -> IO a) -> (GError -> IO a) -> IO a checkGError action handler = alloca $ \(errPtrPtr :: Ptr (Ptr GError)) -> do poke errPtrPtr nullPtr result <- action (castPtr errPtrPtr) errPtr <- peek errPtrPtr if errPtr == nullPtr then return result else do gerror <- peek errPtr {# call unsafe g_error_free #} (castPtr errPtr) handler gerror -- | Like 'checkGError' but with an extra continuation applied to the result. -- This can be useful when something needs to be done after making the call -- to the function that can raise an error but is should only be done if there -- was no error. -- -- Example of use: -- -- > checkGErrorWithCont (\gerrorPtr -> -- > {# call g_some_function_that_might_return_an_error #} a b gerrorPtr) -- > (\(GError domain code msg) -> ...) -- what to do in case of error -- > (\result -> ...) -- what to do after if no error -- checkGErrorWithCont :: (Ptr (Ptr ()) -> IO b) -> (GError -> IO a) -> (b -> IO a) -> IO a checkGErrorWithCont action handler cont = alloca $ \(errPtrPtr :: Ptr (Ptr GError)) -> do poke errPtrPtr nullPtr result <- action (castPtr errPtrPtr) errPtr <- peek errPtrPtr if errPtr == nullPtr then cont result else do gerror <- peek errPtr {# call unsafe g_error_free #} (castPtr errPtr) handler gerror -- | Use this if you need to explicitly throw a GError or re-throw an existing -- GError that you do not wish to handle. throwGError :: GError -> IO a throwGError gerror = evaluate (throwDyn gerror) -- | This will catch any GError exception. The handler function will receive the -- raw GError. This is probably only useful when you want to take some action -- that does not depend on which GError exception has occured, otherwise it -- would be better to use either 'catchGErrorJust' or 'catchGErrorJustDomain'. -- For example: -- -- > catchGError -- > (do ... -- > ...) -- > (\(GError dom code msg) -> fail msg) -- catchGError :: IO a -- ^ The computation to run -> (GError -> IO a) -- ^ Handler to invoke if an exception is raised -> IO a catchGError action handler = catchDyn action handler -- | This will catch just a specific GError exception. If you need to catch a -- range of related errors, 'catchGErrorJustDomain' is probably more -- appropriate. Example: -- -- > do image <- catchGErrorJust PixbufErrorCorruptImage -- > loadImage -- > (\errorMessage -> do log errorMessage -- > return mssingImagePlaceholder) -- catchGErrorJust :: GErrorClass err => err -- ^ The error to catch -> IO a -- ^ The computation to run -> (GErrorMessage -> IO a) -- ^ Handler to invoke if an exception is raised -> IO a catchGErrorJust code action handler = catchGError action handler' where handler' gerror@(GError domain code' msg) | fromIntegral domain == gerrorDomain code && code' == fromEnum code = handler msg | otherwise = throwGError gerror -- | Catch all GErrors from a particular error domain. The handler function -- should just deal with one error enumeration type. If you need to catch -- errors from more than one error domain, use this function twice with an -- appropriate handler functions for each. -- -- > catchGErrorJustDomain -- > loadImage -- > (\err message -> case err of -- > PixbufErrorCorruptImage -> ... -- > PixbufErrorInsufficientMemory -> ... -- > PixbufErrorUnknownType -> ... -- > _ -> ...) -- catchGErrorJustDomain :: GErrorClass err => IO a -- ^ The computation to run -> (err -> GErrorMessage -> IO a) -- ^ Handler to invoke if an exception is raised -> IO a catchGErrorJustDomain action (handler :: err -> GErrorMessage -> IO a) = catchGError action handler' where handler' gerror@(GError domain code msg) | fromIntegral domain == gerrorDomain (undefined::err) = handler (toEnum code) msg | otherwise = throwGError gerror -- | A verson of 'catchGError' with the arguments swapped around. -- -- > handleGError (\(GError dom code msg) -> ...) $ -- > ... -- handleGError :: (GError -> IO a) -> IO a -> IO a handleGError = flip catchGError -- | A verson of 'handleGErrorJust' with the arguments swapped around. handleGErrorJust :: GErrorClass err => err -> (GErrorMessage -> IO a) -> IO a -> IO a handleGErrorJust code = flip (catchGErrorJust code) -- | A verson of 'handleGErrorJustDomain' with the arguments swapped around. handleGErrorJustDomain :: GErrorClass err => (err -> GErrorMessage -> IO a) -> IO a -> IO a handleGErrorJustDomain = flip catchGErrorJustDomain -- | Catch all GError exceptions and convert them into a general failure. failOnGError :: IO a -> IO a failOnGError action = catchGError action (\(GError dom code msg) -> fail msg) --- NEW FILE: GObject.chspp --- -- -*-haskell-*- -- GIMP Toolkit (GTK) Widget GObject -- -- Author : Axel Simon -- -- Created: 9 April 2001 -- -- Version $Revision: 1.1 $ from $Date: 2004/10/24 17:19:21 $ -- -- Copyright (c) 2001 Axel Simon -- -- This file is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- -- This file 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 General Public License for more details. -- -- | -- -- Implements the base GObject class to satisfy the type checker. -- module GObject( objectNew, objectRef, objectUnref, makeNewGObject, GWeakNotify, mkDestructor, objectWeakref, objectWeakunref ) where import Monad (liftM) import FFI import LocalData (newIORef, readIORef, writeIORef) import Hierarchy (GObjectClass, GObject(..), mkGObject, toGObject, unGObject) import GValue (GValue) import GType (GType) import GParameter {# context lib="glib" prefix="g" #} {# pointer *GParameter as GParm -> GParameter #} -- construct a new object (should rairly be used directly) -- objectNew :: GType -> [(String, GValue)] -> IO (Ptr GObject) objectNew objType parameters = liftM castPtr $ --caller must makeNewGObject as we don't know --if it this a GObject or a GtkObject withArray (map GParameter parameters) $ \paramArrayPtr -> {# call g_object_newv #} objType (fromIntegral $ length parameters) paramArrayPtr -- increase the reference counter of an object -- objectRef :: GObjectClass obj => Ptr obj -> IO () objectRef obj = do {#call unsafe object_ref#} (castPtr obj) return () -- decrease the reference counter of an object -- #if __GLASGOW_HASKELL__>=600 foreign import ccall unsafe "&g_object_unref" object_unref' :: FinalizerPtr a objectUnref :: Ptr a -> FinalizerPtr a objectUnref _ = object_unref' #elif __GLASGOW_HASKELL__>=504 foreign import ccall unsafe "g_object_unref" objectUnref :: Ptr a -> IO () #else foreign import ccall "g_object_unref" unsafe objectUnref :: Ptr a -> IO () #endif -- This is a convenience function to generate an object that does not -- derive from Object. It adds objectUnref as finalizer. -- -- * The constr argument is the contructor of the specific object. -- makeNewGObject :: GObjectClass obj => (ForeignPtr obj -> obj) -> IO (Ptr obj) -> IO obj makeNewGObject constr generator = do objPtr <- generator objectRef objPtr obj <- newForeignPtr objPtr (objectUnref objPtr) return $ constr obj {#pointer GWeakNotify#} foreign import ccall "wrapper" mkDestructor :: IO () -> IO GWeakNotify -- | attach a callback that will be called after the -- destroy hooks have been called -- objectWeakref :: GObjectClass o => o -> IO () -> IO GWeakNotify objectWeakref obj uFun = do funPtrContainer <- newIORef nullFunPtr uFunPtr <- mkDestructor $ do uFun funPtr <- readIORef funPtrContainer freeHaskellFunPtr funPtr writeIORef funPtrContainer uFunPtr withForeignPtr ((castForeignPtr.unGObject.toGObject) obj) $ \objPtr -> {#call unsafe object_weak_ref#} objPtr uFunPtr nullPtr return uFunPtr -- | detach a weak destroy callback function -- objectWeakunref :: GObjectClass o => o -> GWeakNotify -> IO () objectWeakunref obj fun = withForeignPtr ((castForeignPtr.unGObject.toGObject) obj) $ \objPtr -> {#call unsafe object_weak_unref#} objPtr fun nullPtr --- GError.chs DELETED --- --- GObject.chs DELETED --- |
From: Axel S. <as...@us...> - 2004-10-24 17:19:30
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/buttons In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28086/gtk/buttons Added Files: Button.chspp Removed Files: Button.chs Log Message: New build system. --- NEW FILE: Button.chspp --- -- -*-haskell-*- -- GIMP Toolkit (GTK) Widget Button -- -- Author : Axel Simon -- -- Created: 15 May 2001 -- -- Version $Revision: 1.1 $ from $Date: 2004/10/24 17:19:20 $ -- -- Copyright (c) 1999..2002 Axel Simon -- -- This file is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- -- This file 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 General Public License for more details. -- -- | -- module Button( Button, ButtonClass, castToButton, buttonNew, buttonNewWithLabel, buttonNewWithMnemonic, buttonNewFromStock, buttonPressed, buttonReleased, buttonClicked, buttonEnter, buttonLeave, ReliefStyle(..), buttonSetRelief, buttonGetRelief, buttonSetLabel, buttonGetLabel, buttonSetUseStock, buttonGetUseStock, buttonSetUseUnderline, buttonGetUseUnderline, #if GTK_CHECK_VERSION(2,4,0) buttonSetFocusOnClick, buttonGetFocusOnClick, buttonSetAlignment, buttonGetAlignment, #endif onButtonActivate, afterButtonActivate, onClicked, afterClicked, onEnter, afterEnter, onLeave, afterLeave, onPressed, afterPressed, onReleased, afterReleased ) where import Monad (liftM) import FFI import Object (makeNewObject) {#import Hierarchy#} {#import Signal#} import Enums (ReliefStyle(..)) {# context lib="gtk" prefix="gtk" #} -- methods -- | Create a new Button widget. -- buttonNew :: IO Button buttonNew = makeNewObject mkButton $ liftM castPtr {#call unsafe button_new#} -- | Create a button with a label in it. -- buttonNewWithLabel :: String -> IO Button buttonNewWithLabel lbl = withUTFString lbl (\strPtr -> makeNewObject mkButton $ liftM castPtr $ {#call unsafe button_new_with_label#} strPtr) -- | Create a button with an accelerator key. -- -- * Like 'buttonNewWithLabel' but turns every underscore in the -- label to a underlined character which then acts as a mnemonic (keyboard -- shortcut). -- buttonNewWithMnemonic :: String -> IO Button buttonNewWithMnemonic lbl = withUTFString lbl (\strPtr -> makeNewObject mkButton $ liftM castPtr $ {#call unsafe button_new_with_mnemonic#} strPtr) -- | Create a stock (predefined appearance) button. -- buttonNewFromStock :: String -> IO Button buttonNewFromStock stockId = withUTFString stockId (\strPtr -> makeNewObject mkButton $ liftM castPtr $ throwIfNull "buttonNewFromStock: Invalid stock identifier." $ {#call unsafe button_new_from_stock#} strPtr) -- | Depress the button, i.e. emit the pressed signal. -- buttonPressed :: ButtonClass b => b -> IO () buttonPressed b = {#call button_pressed#} (toButton b) -- | Release the button, i.e. emit the released signal. -- buttonReleased :: ButtonClass b => b -> IO () buttonReleased b = {#call button_released#} (toButton b) -- | Emit the clicked signal on the button. -- -- * This is similar to calling 'buttonPressed' and -- 'buttonReleased' in sequence. -- buttonClicked :: ButtonClass b => b -> IO () buttonClicked b = {#call button_clicked#} (toButton b) -- | Emit the cursor enters signal to the button. -- buttonEnter :: ButtonClass b => b -> IO () buttonEnter b = {#call button_enter#} (toButton b) -- | Emit the cursor leaves signal to the button. -- buttonLeave :: ButtonClass b => b -> IO () buttonLeave b = {#call button_leave#} (toButton b) -- | Set the style of the button edges. -- buttonSetRelief :: ButtonClass b => b -> ReliefStyle -> IO () buttonSetRelief b rs = {#call button_set_relief#} (toButton b) ((fromIntegral.fromEnum) rs) -- | Get the current relief style. -- buttonGetRelief :: ButtonClass b => b -> IO ReliefStyle buttonGetRelief b = liftM (toEnum.fromIntegral) $ {#call unsafe button_get_relief#} (toButton b) -- | Set the text of the button. -- buttonSetLabel :: ButtonClass b => b -> String -> IO () buttonSetLabel b lbl = withUTFString lbl $ \strPtr -> {#call button_set_label#} (toButton b) strPtr -- | Get the current text on the button. -- -- * The method returns the empty string in case the button does not have -- a label (e.g. it was created with 'buttonNew'. -- buttonGetLabel :: ButtonClass b => b -> IO String buttonGetLabel b = do strPtr <- {#call unsafe button_get_label#} (toButton b) if strPtr==nullPtr then return "" else peekUTFString strPtr -- | Set if the label is a stock identifier. -- -- * Setting this property to @True@ will make the button lookup -- its label in the table of stock items. If there is a match, the button -- will use the stock item instead of the label. You need to set this -- flag before you change the label. -- buttonSetUseStock :: ButtonClass b => b -> Bool -> IO () buttonSetUseStock b flag = {#call button_set_use_stock#} (toButton b) (fromBool flag) -- | Get the current flag for stock lookups. -- buttonGetUseStock :: ButtonClass b => b -> IO Bool buttonGetUseStock b = liftM toBool $ {#call unsafe button_get_use_stock#} (toButton b) -- | Set if the label has accelerators. -- -- * Setting this property will make the button join any underline character -- into the following letter and inserting this letter as a keyboard -- shortcut. You need to set this flag before you change the label. -- buttonSetUseUnderline :: ButtonClass b => b -> Bool -> IO () buttonSetUseUnderline b flag = {#call button_set_use_underline#} (toButton b) (fromBool flag) -- | Query if the underlines are mnemonics. -- buttonGetUseUnderline :: ButtonClass b => b -> IO Bool buttonGetUseUnderline b = liftM toBool $ {#call unsafe button_get_use_underline#} (toButton b) #if GTK_CHECK_VERSION(2,4,0) -- | Sets whether the button will grab focus when it is clicked with the mouse. -- buttonSetFocusOnClick :: ButtonClass b => b -> Bool -> IO () buttonSetFocusOnClick b focus = {#call unsafe button_set_focus_on_click#} (toButton b) (fromBool focus) -- | Gets whether the button grabs focus when it is clicked with the mouse. -- buttonGetFocusOnClick :: ButtonClass b => b -> IO Bool buttonGetFocusOnClick b = liftM toBool $ {#call unsafe button_get_focus_on_click#} (toButton b) -- | Sets the alignment of the child. This has no effect unless the child -- derives from "Misc" "Aligment". -- buttonSetAlignment :: ButtonClass b => b -> (Float, Float) -> IO () buttonSetAlignment b (xalign, yalign) = {#call unsafe button_set_alignment#} (toButton b) (realToFrac xalign) (realToFrac yalign) -- | Gets the alignment of the child in the button. -- buttonGetAlignment :: ButtonClass b => b -> IO (Float, Float) buttonGetAlignment b = alloca $ \xalignPtr -> alloca $ \yalignPtr -> do {#call unsafe button_get_alignment#} (toButton b) xalignPtr yalignPtr xalign <- peek xalignPtr yalign <- peek yalignPtr return (realToFrac xalign, realToFrac yalign) #endif -- signals -- | The button has been depressed (but not -- necessarily released yet). See @clicked@ signal. -- onButtonActivate, afterButtonActivate :: ButtonClass b => b -> IO () -> IO (ConnectId b) onButtonActivate = connect_NONE__NONE "activate" False afterButtonActivate = connect_NONE__NONE "activate" True -- | The button was clicked. This is only emitted if -- the mouse cursor was over the button when it was released. -- onClicked, afterClicked :: ButtonClass b => b -> IO () -> IO (ConnectId b) onClicked = connect_NONE__NONE "clicked" False afterClicked = connect_NONE__NONE "clicked" True -- | The cursor enters the button box. -- onEnter, afterEnter :: ButtonClass b => b -> IO () -> IO (ConnectId b) onEnter = connect_NONE__NONE "enter" False afterEnter = connect_NONE__NONE "enter" True -- | The cursor leaves the button box. -- onLeave, afterLeave :: ButtonClass b => b -> IO () -> IO (ConnectId b) onLeave = connect_NONE__NONE "leave" False afterLeave = connect_NONE__NONE "leave" True -- | The button is pressed. -- onPressed, afterPressed :: ButtonClass b => b -> IO () -> IO (ConnectId b) onPressed = connect_NONE__NONE "pressed" False afterPressed = connect_NONE__NONE "pressed" True -- | The button is released. -- onReleased, afterReleased :: ButtonClass b => b -> IO () -> IO (ConnectId b) onReleased = connect_NONE__NONE "released" False afterReleased = connect_NONE__NONE "released" True --- Button.chs DELETED --- |
From: Axel S. <as...@us...> - 2004-10-24 17:19:30
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/gdk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28086/gtk/gdk Added Files: Drawable.chspp Region.chspp Removed Files: Drawable.chs Region.chs Log Message: New build system. --- Drawable.chs DELETED --- --- NEW FILE: Region.chspp --- -- -*-haskell-*- -- GIMP Toolkit (GTK) Region -- -- Author : Axel Simon -- Created: 22 September 2002 -- -- Version $Revision: 1.1 $ from $Date: 2004/10/24 17:19:20 $ -- -- Copyright (c) 2002 Axel Simon -- -- This library is free software; you can redistribute it and/or -- modify it under the terms of the GNU Library General Public -- License as published by the Free Software Foundation; either -- version 2 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 -- Library General Public License for more details. -- -- | -- -- A set of rectangles describing areas to be redrawn. -- -- * Regions consist of a set of non-overlapping rectangles. They are used to -- specify the area of a window which needs updating. -- -- TODO -- -- * The Span functions and callbacks are not implemented since retrieving -- a set of rectangles and working on them within Haskell seems to be easier. -- module Region( makeNewRegion, Region(Region), regionNew, FillRule(..), regionPolygon, regionCopy, regionRectangle, regionGetClipbox, regionGetRectangles, regionEmpty, regionEqual, regionPointIn, OverlapType(..), regionRectIn, regionOffset, regionShrink, regionUnionWithRect, regionIntersect, regionUnion, regionSubtract, regionXor) where import Monad (liftM) import FFI import Structs (Point, Rectangle(..)) import GdkEnums (FillRule(..), OverlapType(..)) {# context lib="gtk" prefix="gdk" #} {#pointer *GdkRegion as Region foreign newtype #} -- Construct a region from a pointer. -- makeNewRegion :: Ptr Region -> IO Region makeNewRegion rPtr = do region <- newForeignPtr rPtr (region_destroy rPtr) return (Region region) #if __GLASGOW_HASKELL__>=600 foreign import ccall unsafe "&gdk_region_destroy" region_destroy' :: FinalizerPtr Region region_destroy :: Ptr Region -> FinalizerPtr Region region_destroy _ = region_destroy' #elif __GLASGOW_HASKELL__>=504 foreign import ccall unsafe "gdk_region_destroy" region_destroy :: Ptr Region -> IO () #else foreign import ccall "gdk_region_destroy" unsafe region_destroy :: Ptr Region -> IO () #endif -- | Create an empty region. -- regionNew :: IO Region regionNew = do rPtr <- {#call unsafe region_new#} makeNewRegion rPtr -- | Convert a polygon into a 'Region'. -- regionPolygon :: [Point] -> FillRule -> IO Region regionPolygon points rule = withArray (concatMap (\(x,y) -> [fromIntegral x, fromIntegral y]) points) $ \(aPtr :: Ptr {#type gint#}) -> do rPtr <- {#call unsafe region_polygon#} (castPtr aPtr) (fromIntegral (length points)) ((fromIntegral.fromEnum) rule) makeNewRegion rPtr -- | Copy a 'Region'. -- regionCopy :: Region -> IO Region regionCopy r = do rPtr <- {#call unsafe region_copy#} r makeNewRegion rPtr -- | Convert a rectangle to a 'Region'. -- regionRectangle :: Rectangle -> IO Region regionRectangle rect = withObject rect $ \rectPtr -> do regPtr <- {#call unsafe region_rectangle#} (castPtr rectPtr) makeNewRegion regPtr -- | Smallest rectangle including the -- 'Region'. -- regionGetClipbox :: Region -> IO Rectangle regionGetClipbox r = alloca $ \rPtr -> do {#call unsafe region_get_clipbox#} r (castPtr rPtr) peek rPtr -- | Turn the 'Region' into its rectangles. -- -- * A 'Region' is a set of horizontal bands. Each band -- consists of one or more rectangles of the same height. No rectangles -- in a band touch. -- regionGetRectangles :: Region -> IO [Rectangle] regionGetRectangles r = alloca $ \(aPtr :: Ptr Rectangle) -> alloca $ \(iPtr :: Ptr {#type gint#}) -> do {#call unsafe region_get_rectangles#} r (castPtr aPtr) iPtr size <- peek iPtr regs <- peekArray (fromIntegral size) aPtr {#call unsafe g_free#} (castPtr aPtr) return regs -- | Test if a 'Region' is empty. -- regionEmpty :: Region -> IO Bool regionEmpty r = liftM toBool $ {#call unsafe region_empty#} r -- | Compares two 'Region's for equality. -- regionEqual :: Region -> Region -> IO Bool regionEqual r1 r2 = liftM toBool $ {#call unsafe region_equal#} r1 r2 -- | Checks if a point it is within a region. -- regionPointIn :: Region -> Point -> IO Bool regionPointIn r (x,y) = liftM toBool $ {#call unsafe region_point_in#} r (fromIntegral x) (fromIntegral y) -- | Check if a rectangle is within a region. -- regionRectIn :: Region -> Rectangle -> IO OverlapType regionRectIn reg rect = liftM (toEnum.fromIntegral) $ withObject rect $ \rPtr -> {#call unsafe region_rect_in#} reg (castPtr rPtr) -- | Move a region. -- regionOffset :: Region -> Int -> Int -> IO () regionOffset r dx dy = {#call unsafe region_offset#} r (fromIntegral dx) (fromIntegral dy) -- | Move a region. -- -- * Positive values shrink the region, negative values expand it. -- regionShrink :: Region -> Int -> Int -> IO () regionShrink r dx dy = {#call unsafe region_shrink#} r (fromIntegral dx) (fromIntegral dy) -- | Updates the region to include the rectangle. -- regionUnionWithRect :: Region -> Rectangle -> IO () regionUnionWithRect reg rect = withObject rect $ \rPtr -> {#call unsafe region_union_with_rect#} reg (castPtr rPtr) -- | Intersects one region with another. -- -- * Changes @reg1@ to include the common areas of @reg1@ -- and @reg2@. -- regionIntersect :: Region -> Region -> IO () regionIntersect reg1 reg2 = {#call unsafe region_intersect#} reg1 reg2 -- | Unions one region with another. -- -- * Changes @reg1@ to include @reg1@ and @reg2@. -- regionUnion :: Region -> Region -> IO () regionUnion reg1 reg2 = {#call unsafe region_union#} reg1 reg2 -- | Removes pars of a 'Region'. -- -- * Reduces the region @reg1@ so that is does not include any areas -- of @reg2@. -- regionSubtract :: Region -> Region -> IO () regionSubtract reg1 reg2 = {#call unsafe region_subtract#} reg1 reg2 -- | XORs two 'Region's. -- -- * The exclusive or of two regions contains all areas which were not -- overlapping. In other words, it is the union of the regions minus -- their intersections. -- regionXor :: Region -> Region -> IO () regionXor reg1 reg2 = {#call unsafe region_xor#} reg1 reg2 --- Region.chs DELETED --- --- NEW FILE: Drawable.chspp --- {-# OPTIONS -cpp #-} -- -*-haskell-*- -- GIMP Toolkit (GTK) Drawable -- -- Author : Axel Simon -- Created: 22 September 2002 -- -- Version $Revision: 1.1 $ from $Date: 2004/10/24 17:19:20 $ -- -- Copyright (c) 2002 Axel Simon -- -- This library is free software; you can redistribute it and/or -- modify it under the terms of the GNU Library General Public -- License as published by the Free Software Foundation; either -- version 2 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 -- Library General Public License for more details. -- -- | -- -- Drawing primitives. -- -- * This module defines drawing primitives that can operate on -- 'DrawWindow's, 'Pixmap's and -- 'Bitmap's. -- -- TODO -- -- * if gdk_visuals are implemented, do: get_visual -- -- * if gdk_colormaps are implemented, do: set_colormap, get_colormap -- -- * add draw_glyphs if we are desparate -- module Drawable( Drawable, DrawableClass, castToDrawable, drawableGetDepth, drawableGetSize, drawableGetClipRegion, drawableGetVisibleRegion, Point, drawPoint, drawPoints, drawLine, drawLines, #if GTK_CHECK_VERSION(2,2,0) Dither(..), drawPixbuf, #endif drawSegments, drawRectangle, drawArc, drawPolygon, drawLayoutLine, drawLayoutLineWithColors, drawLayout, drawLayoutWithColors, drawDrawable) where import Monad (liftM) import FFI import GObject (makeNewGObject) import Structs (Point) {#import Hierarchy#} {#import Region#} (Region, makeNewRegion) import Structs (Color) {#import PangoTypes#} import GdkEnums (Dither(..)) {# context lib="gtk" prefix="gdk" #} -- methods -- | Get the size of pixels. -- -- * Returns the number of bits which are use to store information on each -- pixels in this 'Drawable'. -- drawableGetDepth :: DrawableClass d => d -> IO Int drawableGetDepth d = liftM fromIntegral $ {#call unsafe drawable_get_depth#} (toDrawable d) -- | Retrieve the size of the 'Drawable'. -- -- * The result might not be up-to-date if there are still resizing messages -- to be processed. -- drawableGetSize :: DrawableClass d => d -> IO (Int, Int) drawableGetSize d = alloca $ \wPtr -> alloca $ \hPtr -> do {#call unsafe drawable_get_size#} (toDrawable d) wPtr hPtr (w::{#type gint#}) <- peek wPtr (h::{#type gint#}) <- peek hPtr return (fromIntegral w, fromIntegral h) -- | Determine where not to draw. -- -- * Computes the region of a drawable that potentially can be written -- to by drawing primitives. This region will not take into account the -- clip region for the GC, and may also not take into account other -- factors such as if the window is obscured by other windows, but no -- area outside of this region will be affected by drawing primitives. -- drawableGetClipRegion :: DrawableClass d => d -> IO Region drawableGetClipRegion d = do rPtr <- {#call unsafe drawable_get_clip_region#} (toDrawable d) makeNewRegion rPtr -- | Determine what not to redraw. -- -- * Computes the region of a drawable that is potentially visible. -- This does not necessarily take into account if the window is obscured -- by other windows, but no area outside of this region is visible. -- drawableGetVisibleRegion :: DrawableClass d => d -> IO Region drawableGetVisibleRegion d = do rPtr <- {#call unsafe drawable_get_visible_region#} (toDrawable d) makeNewRegion rPtr -- | Draw a point into a 'Drawable'. -- drawPoint :: DrawableClass d => d -> GC -> Point -> IO () drawPoint d gc (x,y) = {#call unsafe draw_point#} (toDrawable d) (toGC gc) (fromIntegral x) (fromIntegral y) -- | Draw several points into a 'Drawable'. -- -- * This function is more efficient than calling 'drawPoint' on -- several points. -- drawPoints :: DrawableClass d => d -> GC -> [Point] -> IO () drawPoints d gc [] = return () drawPoints d gc points = withArray (concatMap (\(x,y) -> [fromIntegral x, fromIntegral y]) points) $ \(aPtr :: Ptr {#type gint#}) -> {#call unsafe draw_points#} (toDrawable d) (toGC gc) (castPtr aPtr) (fromIntegral (length points)) -- | Draw a line into a 'Drawable'. -- -- * The parameters are x1, y1, x2, y2. -- -- * Drawing several separate lines can be done more efficiently by -- 'drawSegments'. -- drawLine :: DrawableClass d => d -> GC -> Point -> Point -> IO () drawLine d gc (x1,y1) (x2,y2) = {#call unsafe draw_line#} (toDrawable d) (toGC gc) (fromIntegral x1) (fromIntegral y1) (fromIntegral x2) (fromIntegral y2) -- | Draw several lines. -- -- * The function uses the current line width, dashing and especially the -- joining specification in the graphics context (in contrast to -- 'drawSegments'. -- drawLines :: DrawableClass d => d -> GC -> [Point] -> IO () drawLines d gc [] = return () drawLines d gc points = withArray (concatMap (\(x,y) -> [fromIntegral x, fromIntegral y]) points) $ \(aPtr :: Ptr {#type gint#}) -> {#call unsafe draw_lines#} (toDrawable d) (toGC gc) (castPtr aPtr) (fromIntegral (length points)) #if GTK_CHECK_VERSION(2,2,0) -- | Render a 'Pixbuf'. -- -- * Renders a rectangular portion of a 'Pixbuf' to a -- 'Drawable'. The @srcX@, @srcY@, -- @srcWidth@ and @srcHeight@ specify what part of the -- 'Pixbuf' should be rendered. The latter two values may be -- @-1@ in which case the width and height are taken from -- @pb@. The image is placed at @destX@, @destY@. -- If you render parts of an image at a time, set @ditherX@ and -- @ditherY@ to the origin of the image you are rendering. -- -- * Since 2.2. -- drawPixbuf :: DrawableClass d => d -> GC -> Pixbuf -> Int -> Int -> Int -> Int -> Int -> Int -> Dither -> Int -> Int -> IO () drawPixbuf d gc pb srcX srcY destX destY srcWidth srcHeight dither xDither yDither = {#call unsafe draw_pixbuf#} (toDrawable d) gc pb (fromIntegral srcX) (fromIntegral srcY) (fromIntegral destX) (fromIntegral destY) (fromIntegral srcWidth) (fromIntegral srcHeight) ((fromIntegral . fromEnum) dither) (fromIntegral xDither) (fromIntegral yDither) #endif -- | Draw several unconnected lines. -- -- * This method draws several unrelated lines. -- drawSegments :: DrawableClass d => d -> GC -> [(Point,Point)] -> IO () drawSegments d gc [] = return () drawSegments d gc pps = withArray (concatMap (\((x1,y1),(x2,y2)) -> [fromIntegral x1, fromIntegral y1, fromIntegral x2, fromIntegral y2]) pps) $ \(aPtr :: Ptr {#type gint#}) -> {#call unsafe draw_segments#} (toDrawable d) (toGC gc) (castPtr aPtr) (fromIntegral (length pps)) -- | Draw a rectangular object. -- -- * Draws a rectangular outline or filled rectangle, using the -- foreground color and other attributes of the 'GC'. -- -- * A rectangle drawn filled is 1 pixel smaller in both dimensions -- than a rectangle outlined. Calling 'drawRectangle' w gc -- True 0 0 20 20 results in a filled rectangle 20 pixels wide and 20 -- pixels high. Calling 'drawRectangle' d gc False 0 0 20 20 -- results in an outlined rectangle with corners at (0, 0), (0, 20), (20, -- 20), and (20, 0), which makes it 21 pixels wide and 21 pixels high. -- drawRectangle :: DrawableClass d => d -> GC -> Bool -> Int -> Int -> Int -> Int -> IO () drawRectangle d gc filled x y width height = {#call unsafe draw_rectangle#} (toDrawable d) (toGC gc) (fromBool filled) (fromIntegral x) (fromIntegral y) (fromIntegral width) (fromIntegral height) -- | Draws an arc or a filled 'pie slice'. -- -- * The arc is defined by the bounding rectangle of the entire -- ellipse, and the start and end angles of the part of the ellipse to be -- drawn. -- -- * The starting angle @aStart@ is relative to the 3 o'clock -- position, counter-clockwise, in 1\/64ths of a degree. @aEnd@ -- is measured similarly, but relative to @aStart@. -- drawArc :: DrawableClass d => d -> GC -> Bool -> Int -> Int -> Int -> Int -> Int -> Int -> IO () drawArc d gc filled x y width height aStart aEnd = {#call unsafe draw_arc#} (toDrawable d) (toGC gc) (fromBool filled) (fromIntegral x) (fromIntegral y) (fromIntegral width) (fromIntegral height) (fromIntegral aStart) (fromIntegral aEnd) -- | Draws an outlined or filled polygon. -- -- * The polygon is closed automatically, connecting the last point to -- the first point if necessary. -- drawPolygon :: DrawableClass d => d -> GC -> Bool -> [Point] -> IO () drawPolygon _ _ _ [] = return () drawPolygon d gc filled points = withArray (concatMap (\(x,y) -> [fromIntegral x, fromIntegral y]) points) $ \(aPtr::Ptr {#type gint#}) -> {#call unsafe draw_polygon#} (toDrawable d) (toGC gc) (fromBool filled) (castPtr aPtr) (fromIntegral (length points)) -- | Draw a single line of text. -- -- * The @x@ coordinate specifies the start of the string, -- the @y@ coordinate specifies the base line. -- drawLayoutLine :: DrawableClass d => d -> GC -> Int -> Int -> LayoutLine -> IO () drawLayoutLine d gc x y text = {#call unsafe draw_layout_line#} (toDrawable d) (toGC gc) (fromIntegral x) (fromIntegral y) text -- | Draw a single line of text. -- -- * The @x@ coordinate specifies the start of the string, -- the @y@ coordinate specifies the base line. -- -- * If both colors are @Nothing@ this function will behave like -- 'drawLayoutLine' in that it uses the default colors from -- the graphics context. -- drawLayoutLineWithColors :: DrawableClass d => d -> GC -> Int -> Int -> LayoutLine -> Maybe Color -> Maybe Color -> IO () drawLayoutLineWithColors d gc x y text foreground background = let withMB :: Storable a => Maybe a -> (Ptr a -> IO b) -> IO b withMB Nothing f = f nullPtr withMB (Just x) f = with x f in withMB foreground $ \fPtr -> withMB background $ \bPtr -> {#call unsafe draw_layout_line_with_colors#} (toDrawable d) (toGC gc) (fromIntegral x) (fromIntegral y) text (castPtr fPtr) (castPtr bPtr) -- | Draw a paragraph of text. -- -- * The @x@ and @y@ values specify the upper left -- point of the layout. -- drawLayout :: DrawableClass d => d -> GC -> Int -> Int -> PangoLayout -> IO () drawLayout d gc x y text = {#call unsafe draw_layout#} (toDrawable d) (toGC gc) (fromIntegral x) (fromIntegral y) (toPangoLayout text) -- | Draw a paragraph of text. -- -- * The @x@ and @y@ values specify the upper left -- point of the layout. -- -- * If both colors are @Nothing@ this function will behave like -- 'drawLayout' in that it uses the default colors from -- the graphics context. -- drawLayoutWithColors :: DrawableClass d => d -> GC -> Int -> Int -> PangoLayout -> Maybe Color -> Maybe Color -> IO () drawLayoutWithColors d gc x y text foreground background = let withMB :: Storable a => Maybe a -> (Ptr a -> IO b) -> IO b withMB Nothing f = f nullPtr withMB (Just x) f = with x f in withMB foreground $ \fPtr -> withMB background $ \bPtr -> {#call unsafe draw_layout_with_colors#} (toDrawable d) (toGC gc) (fromIntegral x) (fromIntegral y) (toPangoLayout text) (castPtr fPtr) (castPtr bPtr) -- | Copies another 'Drawable'. -- -- * Copies the (width,height) region of the @src@ at coordinates -- (@xSrc@, @ySrc@) to coordinates (@xDest@, -- @yDest@) in the @dest@. The @width@ and\/or -- @height@ may be given as -1, in which case the entire source -- drawable will be copied. -- -- * Most fields in @gc@ are not used for this operation, but -- notably the clip mask or clip region will be honored. The source and -- destination drawables must have the same visual and colormap, or -- errors will result. (On X11, failure to match visual\/colormap results -- in a BadMatch error from the X server.) A common cause of this -- problem is an attempt to draw a bitmap to a color drawable. The way to -- draw a bitmap is to set the bitmap as a clip mask on your -- 'GC', then use 'drawRectangle' to draw a -- rectangle clipped to the bitmap. -- drawDrawable :: (DrawableClass src, DrawableClass dest) => dest -> GC -> src -> Int -> Int -> Int -> Int -> Int -> Int -> IO () drawDrawable dest gc src xSrc ySrc xDest yDest width height = {#call unsafe draw_drawable#} (toDrawable dest) (toGC gc) (toDrawable src) (fromIntegral xSrc) (fromIntegral ySrc) (fromIntegral xDest) (fromIntegral yDest) (fromIntegral width) (fromIntegral height) |
From: Axel S. <as...@us...> - 2004-09-04 09:09:21
|
Update of /cvsroot/gtk2hs/gtk2hs/mk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2835/mk Modified Files: recurse.mk Log Message: Moved the contents of MAKE_APPS to MAKE_DEMO which are not meant to be installed and only built on "make all". Index: recurse.mk =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/mk/recurse.mk,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- recurse.mk 19 Aug 2004 07:54:20 -0000 1.7 +++ recurse.mk 4 Sep 2004 09:09:08 -0000 1.8 @@ -5,23 +5,26 @@ # to extra directories that are included when cleaning and tarring. -all : MAKE_GOALS=$(MAKE_TOOLS) $(MAKE_LIBS) $(MAKE_APPS) +all : MAKE_GOALS=$(MAKE_TOOLS) $(MAKE_LIBS) $(MAKE_APPS) $(MAKE_DEMOS) all : make-all -inplace : MAKE_GOALS=$(MAKE_TOOLS) $(MAKE_LIBS) +inplace : MAKE_GOALS=$(MAKE_TOOLS) $(MAKE_LIBS) $(MAKE_APPS) inplace : make-inplace -noinplace : MAKE_GOALS=$(MAKE_TOOLS) $(MAKE_LIBS) +noinplace : MAKE_GOALS=$(MAKE_TOOLS) $(MAKE_LIBS) $(MAKE_APPS) noinplace : make-noinplace -tarsource : MAKE_GOALS=$(MAKE_TOOLS) $(MAKE_LIBS) $(MAKE_APPS) $(MAKE_VERB) +tarsource : MAKE_GOALS=$(MAKE_TOOLS) $(MAKE_LIBS) $(MAKE_APPS) $(MAKE_DEMOS) \ + $(MAKE_VERB) tarsource : make-tarsource -clean : MAKE_GOALS=$(MAKE_TOOLS) $(MAKE_LIBS) $(MAKE_APPS) $(MAKE_VERB) +clean : MAKE_GOALS=$(MAKE_TOOLS) $(MAKE_LIBS) $(MAKE_APPS) $(MAKE_DEMOS) \ + $(MAKE_VERB) clean : make-clean $(RM) $(EXTRA_CLEANFILES) -distclean : MAKE_GOALS=$(MAKE_TOOLS) $(MAKE_LIBS) $(MAKE_APPS) $(MAKE_VERB) +distclean : MAKE_GOALS=$(MAKE_TOOLS) $(MAKE_LIBS) $(MAKE_APPS) $(MAKE_DEMOS) \ + $(MAKE_VERB) distclean : make-distclean $(RM) $(LOCALPKGCONF) $(LOCALPKGCONF).old $(EXTRA_DISTCLEANFILES) |
From: Axel S. <as...@us...> - 2004-09-04 09:09:21
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2835 Modified Files: ChangeLog Makefile Log Message: Moved the contents of MAKE_APPS to MAKE_DEMO which are not meant to be installed and only built on "make all". Index: Makefile =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/Makefile,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- Makefile 19 Aug 2004 07:54:18 -0000 1.33 +++ Makefile 4 Sep 2004 09:09:08 -0000 1.34 @@ -22,19 +22,19 @@ MAKE_LIBS += sourceview gconf endif -MAKE_APPS = demo/concurrent demo/treeList demo/graphic demo/unicode \ +MAKE_DEMOS = demo/concurrent demo/treeList demo/graphic demo/unicode \ demo/hello demo/buttonbox ifeq ($(GTK_VERSION_2_4),yes) -MAKE_APPS += demo/filechooser +# MAKE_DEMOS += demo/filechooser # uncomment when file is commited endif ifeq ($(strip $(ENABLE_LIBGLADE)),yes) -MAKE_APPS += demo/glade +MAKE_DEMOS += demo/glade endif ifeq ($(strip $(ENABLE_GNOME)),yes) -MAKE_APPS += demo/sourceview demo/gconf +MAKE_DEMOS += demo/sourceview demo/gconf endif EXTRA_DISTCLEANFILES = $(strip mk/config.mk mk/chsDepend config.status \ Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.227 retrieving revision 1.228 diff -u -d -r1.227 -r1.228 --- ChangeLog 4 Sep 2004 08:52:51 -0000 1.227 +++ ChangeLog 4 Sep 2004 09:09:08 -0000 1.228 @@ -1,3 +1,11 @@ +2004-09-04 Axel Simon <A....@ke...> + + * Makefile, mk/recurse.mk: Set MAKE_APPS to empty and introduce + MAKE_DEMOS. Demos are only built on "make all" not on "make + inplace". Demos are never installed, applications are. The latter + never did anything since mk/application.mk does not provide an + install target. + 2004-08-19 Jens Petersen <pet...@ha...> * configure.in (GHC_DOCDIR): Default to unset. |
From: Axel S. <as...@us...> - 2004-09-04 08:53:01
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32748 Modified Files: ChangeLog Log Message: Removed conflict. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.226 retrieving revision 1.227 diff -u -d -r1.226 -r1.227 --- ChangeLog 19 Aug 2004 15:00:55 -0000 1.226 +++ ChangeLog 4 Sep 2004 08:52:51 -0000 1.227 @@ -54,7 +54,7 @@ * Makefile: No longer build gendoc or doc. Build mogul after gtk2. -2004-08-15 Axel Simon <A....@ke...> +2004-08-16 Axel Simon <A....@ke...> * mk/common.mk, mk/library.mk, mk/recurse.mk, Makefile: Make clean and make distclean remove more files now. |
From: Jens-Ulrik P. <ju...@us...> - 2004-08-19 15:01:05
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20889 Modified Files: ChangeLog configure.in Log Message: Don't set GHC_DOCDIR unless given with --with-ghc-docdir and only try to pass ghc base documentation to haddock when it is set. Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.225 retrieving revision 1.226 diff -u -d -r1.225 -r1.226 --- ChangeLog 19 Aug 2004 07:54:18 -0000 1.225 +++ ChangeLog 19 Aug 2004 15:00:55 -0000 1.226 @@ -1,5 +1,12 @@ 2004-08-19 Jens Petersen <pet...@ha...> + * configure.in (GHC_DOCDIR): Default to unset. + + * mk/library.mk (HADDOCK_BASEDOC_FLAG): New variable to handle + haddock flag for ghc base documentation BASEDOC_DIR if GHC_DOCDIR set. + + * gtk/Makefile (EXCLUDE_DOCS): Add Hierarchy.hs + * sourceview/Makefile (C2HS_EXTRA_FLAGS): Replaces HIDIRS for c2hs. * mogul/Makefile: Add EXCLUDE_DOCS and PREPROC_DOCS for haddock. Index: configure.in =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/configure.in,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- configure.in 19 Aug 2004 07:54:18 -0000 1.43 +++ configure.in 19 Aug 2004 15:00:56 -0000 1.44 @@ -461,7 +461,6 @@ dnl Documentation AC_PATH_PROG(HADDOCK,haddock) -GHC_DOCDIR=${datadir}/doc/ghc AC_ARG_WITH(ghc-docdir, [ --with-ghc-docdir=GHC_DOCDIR location of top of ghc haddockified html documentation], [GHC_DOCDIR=$withval]) |
From: Jens-Ulrik P. <ju...@us...> - 2004-08-19 15:01:05
|
Update of /cvsroot/gtk2hs/gtk2hs/mk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20889/mk Modified Files: library.mk Log Message: Don't set GHC_DOCDIR unless given with --with-ghc-docdir and only try to pass ghc base documentation to haddock when it is set. Index: library.mk =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/mk/library.mk,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- library.mk 19 Aug 2004 07:54:20 -0000 1.27 +++ library.mk 19 Aug 2004 15:00:56 -0000 1.28 @@ -14,6 +14,9 @@ makeTextList = $(addprefix \",$(addsuffix \",\ $(subst $(SPACE),\"$(COMMA)\",$(sort $(1))))) +BASEDOC_DIR = $(addsuffix /libraries/base,$(strip $(GHC_DOCDIR))) +HADDOCK_BASEDOC_FLAG = $(addprefix -i,$(addsuffix $(COMMA)$(BASEDOC_DIR)/base.haddock,$(BASEDOC_DIR))) + PKGDOCDIR ?= $(INST_DOCDIR)/$(PACKAGENAME) noinplace : inplaceinit @@ -178,7 +181,7 @@ ifneq ($(strip $(HADDOCK)),) mkdir -p doc $(foreach i, $(PREPROC_DOCS), $(shell hsc2hs $(EXTRA_CPPFLAGS) -o $(i).uncpp $(i))) - $(HADDOCK) -o doc --title=$(LIBNAME) --package=$(PACKAGENAME) --dump-interface=doc/$(PACKAGENAME).haddock -i$(GHC_DOCDIR)/libraries/base,$(GHC_DOCDIR)/libraries/base/base.haddock $(HADDOCK_EXTRA_FLAGS) --html $(addsuffix .uncpp, $(PREPROC_DOCS)) $(filter-out $(EXCLUDE_DOCS) $(PREPROC_DOCS), $(ALLHSFILES)) + $(HADDOCK) -o doc --title=$(LIBNAME) --package=$(PACKAGENAME) --dump-interface=doc/$(PACKAGENAME).haddock $(HADDOCK_BASEDOC_FLAG) $(HADDOCK_EXTRA_FLAGS) --html $(addsuffix .uncpp, $(PREPROC_DOCS)) $(filter-out $(EXCLUDE_DOCS) $(PREPROC_DOCS), $(ALLHSFILES)) else echo "You need to install `haddock' to build the documentation!" endif |
From: Jens-Ulrik P. <ju...@us...> - 2004-08-19 15:00:25
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20693/gtk Modified Files: Makefile Log Message: Exclude Hierarchy since we don't really need it in the documentation. Index: Makefile =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Makefile,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- Makefile 19 Aug 2004 07:54:20 -0000 1.33 +++ Makefile 19 Aug 2004 15:00:16 -0000 1.34 @@ -22,7 +22,8 @@ HEADER = gtk/gtk.h -EXCLUDE_DOCS = general/FFI.hs ../compat/LocalControl.hs ../compat/LocalData.hs +EXCLUDE_DOCS = general/FFI.hs general/Hierarchy.hs \ + ../compat/LocalControl.hs ../compat/LocalData.hs PREPROC_DOCS = general/Gtk.hs # Whenever a variable module-HEADER is defined, the file module.chs |
From: Jens-Ulrik P. <ju...@us...> - 2004-08-19 07:55:05
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13198 Modified Files: ChangeLog Makefile configure.in gtk2hs.spec.in Log Message: Update make files and all to support building documentation with haddock. Other minor build fixes. Remove gendoc and doc. * sourceview/Makefile (C2HS_EXTRA_FLAGS): Replaces HIDIRS for c2hs. * mogul/Makefile: Add EXCLUDE_DOCS and PREPROC_DOCS for haddock. * mk/recurse.mk: Remove $(MAKE_DOCS) dependency from all targets. Add html and install-html targets. * mk/library.mk (PKGDOCDIR): New variable to hold package doc dir. (html): New target that builds packages docs with haddock. Just warns if HADDOCK is not defined. (install-html): New target to install packages docs. * mk/config.mk.in: Add HADDOCK and GHC_DOCDIR replacing BUILDDOCS, xml and xslt related variables. * mk/common.mk (INST_DOCDIR): Setup new variable. (C2HSFLAGGED): Add C2HS_EXTRA_FLAGS for finding .chi files. * gtk/multiline/TextView.chs: Fix doc typos at top. * gtk/Makefile: Add EXCLUDE_DOCS and PREPROC_DOCS for haddock. * glade/Makefile (C2HS_EXTRA_FLAGS): Replaces HIDIRS for c2hs only. * gconf/System/Gnome/GConf/GConfClient.chs: Doc tweaks to make haddock happy at top and for gconfAddDir. * gconf/Makefile (C2HS_EXTRA_FLAGS): Replaces HIDIRS for c2hs only. * gtk2hs.spec.in: Use ghc-6.2.1 and define short ghc version %ghcver. Use License instead of Copyright. Update buildrequires. Add separate subpackages for sourceview, gconf and glade Name subpackages with %ghcver. Subpackages now require the appropriate -devel package. Define %ghclibdir and %gtk2hsdir. (%build): Update configure invocation - drop xml options and use --prefix and --libdir. Make html. Use mkdir. Clean demo dirs with find. (%post,%preun): Update and add scripts for new subpackages. (%files): Html docs are now in /usr/share/doc/gtk2hs. * configure.in: Comment out GtkGLExt, HOpenGL checks. Check for haddock instead of xslt. Add --with-ghc-docdir option. Remove xml catalog and xsl checks. Replace missing xml final warning with haddock missing warning. * Makefile: No longer build gendoc or doc. Build mogul after gtk2. Index: gtk2hs.spec.in =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk2hs.spec.in,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- gtk2hs.spec.in 11 Nov 2003 12:03:38 -0000 1.9 +++ gtk2hs.spec.in 19 Aug 2004 07:54:18 -0000 1.10 @@ -1,19 +1,23 @@ # RPM spec file for Gtk2HS -*-rpm-spec-*- # # Copyright [2001..2002] Manuel M T Chakravarty <ch...@cs...> -# Copyright 2002, 2003 Jens-Ulrik Holger Petersen <pet...@ha...> +# Copyright 2002, 2003, 2004 Jens-Ulrik Holger Petersen <pet...@ha...> -%define ghc_version 6.0.1 +%define ghc_version 6.2.1 +%define ghcver 621 Summary: Haskell binding for the GIMP Toolkit (GTK2), a GUI library Name: gtk2hs Version: @VERSION@ Release: 0.%(date +%%Y%%m%%d) -Copyright: LGPL +Epoch: 0 +License: LGPL Group: Development/Libraries Source: gtk2hs-%{version}.tar.gz URL: http://gtk2hs.sourceforge.net/ -BuildRoot: /var/tmp/gtk2hs-%{version}-%{release}-root +BuildRoot: /var/tmp/gtk2hs-%{version}-root +BuildRequires: ghc = %{ghc_version}, %{_bindir}/hsc2hs, haddock, %{?_with_c2hs: c2hs >= 0.10.6} +BuildRequires: gtk2-devel, gtksourceview-devel, libglade2-devel, GConf2-devel %description A Gtk2 binding for the functional language Haskell featuring @@ -23,15 +27,14 @@ MoGuL (Monad Gui Library) makes it possible to create and lookup named widgets in a type safe way. -%package ghc%{ghc_version} +%package ghc%{ghcver} Summary: Haskell binding for the GIMP Toolkit (GTK2), a GUI library Group: Development/Languages/Haskell -BuildRequires: ghc = %{ghc_version}, gtk2-devel, gtksourceview-devel, %{?_with_c2hs: c2hs >= 0.10.6}, %{_bindir}/hsc2hs Requires: ghc = %{ghc_version} -Requires: gtk2, gtksourceview +Requires: gtk2-devel Requires(post,preun): %{_bindir}/ghc-pkg-%{ghc_version} -%description ghc%{ghc_version} +%description ghc%{ghcver} A Gtk2 binding for the functional language Haskell featuring automatic memory management, unicode support, and quite wide coverage of widget functions and their signals, including @@ -41,6 +44,42 @@ This package contains the libraries compiled for ghc-%{ghc_version}. +%package sourceview-ghc%{ghcver} +Summary: Haskell binding for gtksourceview +Group: Development/Languages/Haskell +Requires: ghc = %{ghc_version} +Requires: gtk2hs-ghc%{ghcver} = %{version}-%{release}, gtksourceview-devel +Requires(post,preun): %{_bindir}/ghc-pkg-%{ghc_version} + +%description sourceview-ghc%{ghcver} +A GConf binding for gtk2hs. + +This package is compiled for ghc-%{ghc_version}. + +%package gconf-ghc%{ghcver} +Summary: Haskell binding for GConf +Group: Development/Languages/Haskell +Requires: ghc = %{ghc_version} +Requires: gtk2hs-ghc%{ghcver} = %{version}-%{release}, GConf-devel +Requires(post,preun): %{_bindir}/ghc-pkg-%{ghc_version} + +%description gconf-ghc%{ghcver} +A GConf binding for gtk2hs. + +This package is compiled for ghc-%{ghc_version}. + +%package glade-ghc%{ghcver} +Summary: Haskell binding of glade for gtk2hs. +Group: Development/Languages/Haskell +Requires: ghc = %{ghc_version} +Requires: libglade2-devel +Requires(post,preun): %{_bindir}/ghc-pkg-%{ghc_version} + +%description glade-ghc%{ghcver} +A Glade2 binding for gtk2hs. + +This package is compiled for ghc-%{ghc_version}. + %package doc Summary: Haskell binding for the GIMP Toolkit (GTK2), a GUI library Group: Development/Languages/Haskell @@ -59,56 +98,108 @@ %define debug_package %{nil} %define __spec_install_post /usr/lib/rpm/brp-compress +%define ghclibdir %{_libdir}/ghc-%{ghc_version} +%define gtk2hsdir %{ghclibdir}/gtk2hs + %prep %setup -q %build -./configure %{?c2hs: --with-c2hs=%{c2hs}} --with-hc=ghc-%{ghc_version} --with-hcflags="-O" --with-catalog=%{_datadir}/sgml/docbook/xmlcatalog --with-html=%{_datadir}/sgml/docbook/xsl-stylesheets/xhtml/chunk.xsl # --with-fo=%{_datadir}/sgml/docbook/xsl-stylesheets/fo/docbook.xsl -make prefix=%{_prefix} libdir=%{_libdir}/ghc-%{ghc_version} +./configure %{?c2hs: --with-c2hs=%{c2hs}} --with-hc=ghc-%{ghc_version} --with-hcflags="-O" --enable-sourceview --enable-libglade --with-ghc-docdir=%{_datadir}/doc/ghc-doc-%{ghc_version} --prefix=%{_prefix} --libdir=%{ghclibdir} + +LANG=C make all html %install rm -rf %{buildroot} -make DESTDIR=%{buildroot} prefix=%{_prefix} libdir=%{_libdir}/ghc-%{ghc_version} install-without-pkg +make DESTDIR=%{buildroot} install-without-pkg install-html -mkdirhier %{buildroot}%{_datadir}/gtksourceview-1.0/language-specs +mkdir -p %{buildroot}%{_datadir}/gtksourceview-1.0/language-specs cp -p demo/sourceview/haskell.lang %{buildroot}%{_datadir}/gtksourceview-1.0/language-specs -# hack to avoid demo binaries in docs -make clean MAKE_GOALS="demo/concurrent demo/treeList demo/graphic demo/unicode demo/hello demo/sourceview" +# clean demo dirs +find -type f \( -name "*.hi" -o -name "*.o" -o -exec test -x '{}' ';' \) -exec rm '{}' ';' %clean rm -rf %{buildroot} -%post ghc%{ghc_version} -# # remove buildroot traces from package files -# perl -pi -e "s|%{buildroot}||" \ -# %{_libdir}/ghc-%{ghc_version}/{%{name}/gtk2.conf,mogul.conf} +%post ghc%{ghcver} +ghc-pkg-%{ghc_version} -u -g -i %{gtk2hsdir}/gtk2/gtk2.conf +ghc-pkg-%{ghc_version} -u -g -i %{gtk2hsdir}/mogul/mogul.conf -ghc-pkg-%{ghc_version} -u -g -i %{_libdir}/ghc-%{ghc_version}/%{name}/gtk2/gtk2.conf -ghc-pkg-%{ghc_version} -u -g -i %{_libdir}/ghc-%{ghc_version}/%{name}/sourceview/sourceview.conf -ghc-pkg-%{ghc_version} -u -g -i %{_libdir}/ghc-%{ghc_version}/%{name}/mogul/mogul.conf +%post sourceview-ghc%{ghcver} +ghc-pkg-%{ghc_version} -u -g -i %{gtk2hsdir}/sourceview/sourceview.conf -%preun ghc%{ghc_version} +%post gconf-ghc%{ghcver} +ghc-pkg-%{ghc_version} -u -g -i %{gtk2hsdir}/gconf/gconf.conf + +%post glade-ghc%{ghcver} +ghc-pkg-%{ghc_version} -u -g -i %{gtk2hsdir}/glade/glade.conf + +%preun ghc%{ghcver} if [ "$1" = 0 ]; then - rm -f %{_libdir}/ghc-%{ghc_version}/%{name}/{gtk2/gtk2hs.o,mogul/mogul.o,spirceview/sourceview.o} + rm -f %{gtk2hsdir}/{gtk2/gtk2hs,mogul/mogul}.o ghc-pkg-%{ghc_version} -r mogul || : - ghc-pkg-%{ghc_version} -r sourceview || : ghc-pkg-%{ghc_version} -r gtk2 || : fi -%files ghc%{ghc_version} +%preun sourceview-ghc%{ghcver} +if [ "$1" = 0 ]; then + rm -f %{gtk2hsdir}/sourceview/sourceview.o + ghc-pkg-%{ghc_version} -r sourceview || : +fi + +%preun gconf-ghc%{ghcver} +if [ "$1" = 0 ]; then + rm -f %{gtk2hsdir}/gconf/gconf.o + ghc-pkg-%{ghc_version} -r gconf || : +fi + +%preun glade-ghc%{ghcver} +if [ "$1" = 0 ]; then + rm -f %{gtk2hsdir}/glade/glade.o + ghc-pkg-%{ghc_version} -r glade || : +fi + +%files ghc%{ghcver} %defattr(-,root,root) -%{_prefix}/lib/* -%{_datadir}/gtksourceview-1.0/language-specs/haskell.lang +%dir %{gtk2hsdir} +%{gtk2hsdir}/gtk2 +%{gtk2hsdir}/mogul %doc ChangeLog TODO AUTHORS COPYING.LIB +%files sourceview-ghc%{ghcver} +%defattr(-,root,root) +%{gtk2hsdir}/sourceview +%{_datadir}/gtksourceview-1.0/language-specs + +%files gconf-ghc%{ghcver} +%defattr(-,root,root) +%{gtk2hsdir}/gconf + +%files glade-ghc%{ghcver} +%defattr(-,root,root) +%{gtk2hsdir}/glade + %files doc %defattr(-,root,root) %doc demo -%doc doc/GTK -%doc doc/MOGUL +%{_datadir}/doc/gtk2hs %changelog +* Mon Aug 16 2004 Jens Petersen <pet...@ha...> - 0:0.9.6-0.fdr.1 +- 0.9.6 + +* Thu Jul 22 2004 Jens Petersen <pet...@ha...> +- split sourceview and glade into separate subpackages +- require -devel packages rather than lib pkg for gtk2, gtksourceview, + and libglade2 + +* Wed Mar 24 2004 Jens Petersen <pet...@ha...> +- enable gtksourceview and glade configure options +- use mkdir -p instead of mkdirhier +- update file locations in %%post and %%preun scripts +- buildrequire libglade2-devel + * Tue Nov 11 2003 Jens Petersen <pet...@ha...> - use %%c2hs instead of "--with c2hs" to configure c2hs program - clean demo to avoid binary files in docs dir Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.224 retrieving revision 1.225 diff -u -d -r1.224 -r1.225 --- ChangeLog 16 Aug 2004 07:35:54 -0000 1.224 +++ ChangeLog 19 Aug 2004 07:54:18 -0000 1.225 @@ -1,3 +1,52 @@ +2004-08-19 Jens Petersen <pet...@ha...> + + * sourceview/Makefile (C2HS_EXTRA_FLAGS): Replaces HIDIRS for c2hs. + + * mogul/Makefile: Add EXCLUDE_DOCS and PREPROC_DOCS for haddock. + + * mk/recurse.mk: Remove $(MAKE_DOCS) dependency from all targets. + Add html and install-html targets. + + * mk/library.mk (PKGDOCDIR): New variable to hold package doc dir. + (html): New target that builds packages docs with haddock. Just + warns if HADDOCK is not defined. + (install-html): New target to install packages docs. + + * mk/config.mk.in: Add HADDOCK and GHC_DOCDIR replacing BUILDDOCS, + xml and xslt related variables. + + * mk/common.mk (INST_DOCDIR): Setup new variable. + (C2HSFLAGGED): Add C2HS_EXTRA_FLAGS for finding .chi files. + + * gtk/multiline/TextView.chs: Fix doc typos at top. + + * gtk/Makefile: Add EXCLUDE_DOCS and PREPROC_DOCS for haddock. + + * glade/Makefile (C2HS_EXTRA_FLAGS): Replaces HIDIRS for c2hs only. + + * gconf/System/Gnome/GConf/GConfClient.chs: Doc tweaks to make + haddock happy at top and for gconfAddDir. + + * gconf/Makefile (C2HS_EXTRA_FLAGS): Replaces HIDIRS for c2hs only. + + * gtk2hs.spec.in: Use ghc-6.2.1 and define short ghc version %ghcver. + Use License instead of Copyright. Update buildrequires. + Add separate subpackages for sourceview, gconf and glade + Name subpackages with %ghcver. Subpackages now require the + appropriate -devel package. Define %ghclibdir and %gtk2hsdir. + (%build): Update configure invocation - drop xml options and + use --prefix and --libdir. Make html. Use mkdir. Clean demo + dirs with find. + (%post,%preun): Update and add scripts for new subpackages. + (%files): Html docs are now in /usr/share/doc/gtk2hs. + + * configure.in: Comment out GtkGLExt, HOpenGL checks. Check for + haddock instead of xslt. Add --with-ghc-docdir option. + Remove xml catalog and xsl checks. Replace missing xml final warning + with haddock missing warning. + + * Makefile: No longer build gendoc or doc. Build mogul after gtk2. + 2004-08-15 Axel Simon <A....@ke...> * mk/common.mk, mk/library.mk, mk/recurse.mk, Makefile: Make clean Index: Makefile =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/Makefile,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- Makefile 16 Aug 2004 07:35:54 -0000 1.32 +++ Makefile 19 Aug 2004 07:54:18 -0000 1.33 @@ -10,14 +10,10 @@ MAKE_TOOLS += c2hs endif -ifeq ($(strip $(BUILDDOCS)),no) -MAKE_VERB = gendoc doc -else -MAKE_DOCS = gendoc doc -endif - MAKE_LIBS = gtk +MAKE_LIBS += mogul + ifeq ($(strip $(ENABLE_LIBGLADE)),yes) MAKE_LIBS += glade endif @@ -26,8 +22,6 @@ MAKE_LIBS += sourceview gconf endif -MAKE_LIBS += mogul - MAKE_APPS = demo/concurrent demo/treeList demo/graphic demo/unicode \ demo/hello demo/buttonbox Index: configure.in =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/configure.in,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- configure.in 11 Aug 2004 08:41:55 -0000 1.42 +++ configure.in 19 Aug 2004 07:54:18 -0000 1.43 @@ -212,25 +212,25 @@ fi; -dnl Check if user wants GtkGLExt extension. Make the default value for this -dnl flag dependant on whether it is installed or not. -ENABLE_OPENGL=yes; -AC_MSG_CHECKING([if OpenGL extension can be built]) - -AC_ARG_ENABLE(glext, - [ --enable-glext generate binding for OpenGL rendering], - [FOUNDGLEXT=$enableval],[FOUNDGLEXT=yes]) - -dnl Reset the flag if GtkGLExt is not installed -$PKG_CONFIG --exists gtkglext-1.0 || FOUNDGLEXT=no; -if test x$FOUNDGLEXT = xno; then ENABLE_OPENGL=no;fi; - -dnl Reset the flag if HOpenGL is not installed -FOUNDHOPENGL=yes; -$GHCPKG -l | $GREP OpenGL > /dev/null || FOUNDHOPENGL=no; -if test x$FOUNDHOPENGL = xno; then ENABLE_OPENGL=no;fi; - -AC_MSG_RESULT($ENABLE_OPENGL) +dnl dnl Check if user wants GtkGLExt extension. Make the default value for this +dnl dnl flag dependant on whether it is installed or not. +dnl ENABLE_OPENGL=yes; +dnl AC_MSG_CHECKING([if OpenGL extension can be built]) +dnl +dnl AC_ARG_ENABLE(glext, +dnl [ --enable-glext generate binding for OpenGL rendering], +dnl [FOUNDGLEXT=$enableval],[FOUNDGLEXT=yes]) +dnl +dnl dnl Reset the flag if GtkGLExt is not installed +dnl $PKG_CONFIG --exists gtkglext-1.0 || FOUNDGLEXT=no; +dnl if test x$FOUNDGLEXT = xno; then ENABLE_OPENGL=no;fi; +dnl +dnl dnl Reset the flag if HOpenGL is not installed +dnl FOUNDHOPENGL=yes; +dnl $GHCPKG -l | $GREP OpenGL > /dev/null || FOUNDHOPENGL=no; +dnl if test x$FOUNDHOPENGL = xno; then ENABLE_OPENGL=no;fi; +dnl +dnl AC_MSG_RESULT($ENABLE_OPENGL) dnl Check if user wants libglade bindings. Defaults to yes. AC_MSG_CHECKING([whether to build libglade bindings]) @@ -253,9 +253,9 @@ dnl Check for the GTK&Co libraries. Use the special PKG_CHECK_MODULES dnl macro from the pkg-config program. PKG_CHECK_MODULES(GTK,[glib-2.0 >= 2.0.0 gdk-2.0 >= 2.0.0 gtk+-2.0 >= 2.0.0 gdk-pixbuf-2.0 >= 0.12.0]) -if test x$ENABLE_OPENGL = xyes; then - PKG_CHECK_MODULES(GTKGLEXT,[gtkglext-1.0 >= 0.7.1]) -fi +dnl if test x$ENABLE_OPENGL = xyes; then +dnl PKG_CHECK_MODULES(GTKGLEXT,[gtkglext-1.0 >= 0.7.1]) +dnl fi if test x$ENABLE_LIBGLADE = xyes; then PKG_CHECK_MODULES(LIBGLADE,[libglade-2.0 >= 2.0.0]) fi @@ -459,85 +459,13 @@ VERSION=`cat $TOP/VERSION` dnl Documentation +AC_PATH_PROG(HADDOCK,haddock) -BUILDDOCS=yes; - -dnl Check for the XSLT translator -FOUNDTRANSLATOR=yes; - -AC_PATH_PROG(XSLTTRANS, xsltproc, no-translator) - -if test $XSLTTRANS = no-translator; then - BUILDDOCS=no; - FOUNDTRANSLATOR=no; -fi - -XML_CATALOG_FILES=/usr/local/share/xml/catalog:/usr/share/xml/catalog; -AC_ARG_WITH(catalog, - [ --with-catalog=catalog an XML catalog file pointing to DocBook], - [XML_CATALOG_FILES=$withval:$XML_CATALOG_FILES]) - -AC_MSG_CHECKING([for XML catalog]) -OLDIFS=$IFS; -IFS=:; -FOUNDCATALOG=no; -for CATALOG in $XML_CATALOG_FILES; do - if test -r $CATALOG; then FOUNDCATALOG=yes; fi; -done; -IFS=$OLDIFS; -if test $FOUNDCATALOG = no; then - BUILDDOCS=no; -fi; -AC_MSG_RESULT([$FOUNDCATALOG]); - -dnl Check for XSLT translation descriptions -FOUNDHTML=yes; -FOUNDFO=yes; -AC_ARG_WITH(html, - [ --with-html=html.xsl an XSLT file for generating (X)HTML], - [XSLTHTML=$withval;], - [XSLTHTML=no;]) -AC_ARG_WITH(fo, - [ --with-fo=fo.xsl an XSLT file for generating formatting objects (FO)], - [XSLTFO=$withval;], - [XSLTFO=no;]) -AC_MSG_CHECKING([XSLT translations]) -dnl if the user just says --with-html, we still have to search for it -if test $XSLTHTML = yes; then XSLTHTML=no; fi; -if test $XSLTFO = yes; then XSLTFO=no; fi; -XSLTPATH=no-xslt; -OLDIFS=$IFS; -IFS=:; -for DIR in $XML_CATALOG_FILES; do - XSLTPATH=`dirname $DIR | $SED s/xml/xsl/`; - if test -r $XSLTPATH/docbook/xhtml/chunk.xsl; then - if test $XSLTHTML = no; then - XSLTHTML=$XSLTPATH/docbook/xhtml/chunk.xsl; - fi; - fi; - if test -r $XSLTPATH/docbook/fo/docbook.xsl; then - if test $XSLTFO = no; then - XSLTFO=$XSLTPATH/docbook/fo/docbook.xsl; - fi; - fi; -done; -IFS=$OLDIFS; -if test ! -r $XSLTHTML; then - FOUNDHTML=no; -fi; -if test ! -r $XSLTFO; then - FOUNDFO=no; -fi; -if test $FOUNDHTML = no -a $FOUNDFO = no; then - BUILDDOCS=no; -fi; -AC_MSG_RESULT([HTML: $FOUNDHTML, FO: $FOUNDFO]) -if test $BUILDDOCS = yes; then - AC_MSG_RESULT([HTML: $XSLTHTML]) - AC_MSG_RESULT([FO: $XSLTFO]) -fi; +GHC_DOCDIR=${datadir}/doc/ghc +AC_ARG_WITH(ghc-docdir, + [ --with-ghc-docdir=GHC_DOCDIR location of top of ghc haddockified html documentation], + [GHC_DOCDIR=$withval]) - dnl Needed substitution. AC_SUBST(PWD) AC_SUBST(TOP) @@ -568,7 +496,7 @@ AC_SUBST(GTK_VERSION_2_4) AC_SUBST(DISABLE_DEPRECATED) dnl Optional packages -AC_SUBST(ENABLE_OPENGL) +dnl AC_SUBST(ENABLE_OPENGL) AC_SUBST(ENABLE_LIBGLADE) AC_SUBST(ENABLE_GNOME) AC_SUBST(SOURCEVIEW_CFLAGS) @@ -578,13 +506,8 @@ AC_SUBST(GCONF_CFLAGS) AC_SUBST(GCONF_LIBS) dnl Documentation -AC_SUBST(BUILDDOCS) -AC_SUBST(XSLTTRANS) -AC_SUBST(XML_CATALOG_FILES) -AC_SUBST(FOUNDHTML) -AC_SUBST(XSLTHTML) -AC_SUBST(FOUNDFO) -AC_SUBST(XSLTFO) +AC_SUBST(HADDOCK) +AC_SUBST(GHC_DOCDIR) dnl The c2hs part. AC_SUBST(CPP) AC_SUBST(LEGACY_FFI) @@ -609,22 +532,27 @@ echo "**************************************************" echo "* Configuration completed successfully. *" echo "* *" -if test $BUILDDOCS = no; then - echo "* Warning: The documentation will not be built: *" - if test $FOUNDTRANSLATOR = no; then - echo "* - the xsltproc translator was not found *" - fi; - if test $FOUNDCATALOG = no; then - echo "* - no XML catalog files were found *" - fi; - if test $FOUNDHTML = no; then - echo "* - no HTML XSL translation file was found *" - fi; - if test $FOUNDFO = no; then - echo "* - no FO XSL translation file was found *" - fi; - echo "* *" -fi; +if test -z "$HADDOCK"; then + echo "* Warning: The documentation will not be built: *" + echo "* - haddock was not found *" + echo "* *" +fi +dnl if test $BUILDDOCS = no; then +dnl echo "* Warning: The documentation will not be built: *" +dnl if test $FOUNDTRANSLATOR = no; then +dnl echo "* - the xsltproc translator was not found *" +dnl fi; +dnl if test $FOUNDCATALOG = no; then +dnl echo "* - no XML catalog files were found *" +dnl fi; +dnl if test $FOUNDHTML = no; then +dnl echo "* - no HTML XSL translation file was found *" +dnl fi; +dnl if test $FOUNDFO = no; then +dnl echo "* - no FO XSL translation file was found *" +dnl fi; +dnl echo "* *" +dnl fi; dnl if test $ENABLE_OPENGL = no; then dnl echo "* Warning: OpenGL support is not available: *" dnl if test x$FOUNDGLEXT = xno; then |
From: Jens-Ulrik P. <ju...@us...> - 2004-08-19 07:55:04
|
Update of /cvsroot/gtk2hs/gtk2hs/gconf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13198/gconf Modified Files: Makefile Log Message: Update make files and all to support building documentation with haddock. Other minor build fixes. Remove gendoc and doc. * sourceview/Makefile (C2HS_EXTRA_FLAGS): Replaces HIDIRS for c2hs. * mogul/Makefile: Add EXCLUDE_DOCS and PREPROC_DOCS for haddock. * mk/recurse.mk: Remove $(MAKE_DOCS) dependency from all targets. Add html and install-html targets. * mk/library.mk (PKGDOCDIR): New variable to hold package doc dir. (html): New target that builds packages docs with haddock. Just warns if HADDOCK is not defined. (install-html): New target to install packages docs. * mk/config.mk.in: Add HADDOCK and GHC_DOCDIR replacing BUILDDOCS, xml and xslt related variables. * mk/common.mk (INST_DOCDIR): Setup new variable. (C2HSFLAGGED): Add C2HS_EXTRA_FLAGS for finding .chi files. * gtk/multiline/TextView.chs: Fix doc typos at top. * gtk/Makefile: Add EXCLUDE_DOCS and PREPROC_DOCS for haddock. * glade/Makefile (C2HS_EXTRA_FLAGS): Replaces HIDIRS for c2hs only. * gconf/System/Gnome/GConf/GConfClient.chs: Doc tweaks to make haddock happy at top and for gconfAddDir. * gconf/Makefile (C2HS_EXTRA_FLAGS): Replaces HIDIRS for c2hs only. * gtk2hs.spec.in: Use ghc-6.2.1 and define short ghc version %ghcver. Use License instead of Copyright. Update buildrequires. Add separate subpackages for sourceview, gconf and glade Name subpackages with %ghcver. Subpackages now require the appropriate -devel package. Define %ghclibdir and %gtk2hsdir. (%build): Update configure invocation - drop xml options and use --prefix and --libdir. Make html. Use mkdir. Clean demo dirs with find. (%post,%preun): Update and add scripts for new subpackages. (%files): Html docs are now in /usr/share/doc/gtk2hs. * configure.in: Comment out GtkGLExt, HOpenGL checks. Check for haddock instead of xslt. Add --with-ghc-docdir option. Remove xml catalog and xsl checks. Replace missing xml final warning with haddock missing warning. * Makefile: No longer build gendoc or doc. Build mogul after gtk2. Index: Makefile =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gconf/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Makefile 26 Jul 2004 12:02:09 -0000 1.1 +++ Makefile 19 Aug 2004 07:54:19 -0000 1.2 @@ -9,11 +9,8 @@ # HACK: need to have . is SUBDIRS so that ghc package file works SUBDIRS = ./ System/Gnome System/Gnome/GConf -# In order for ghc and c2hs to find .chi and .hi files in ../gtk/* we -# need to set these directories here. Note that this list is different -# from SUBDIRS in that the directories given here are not searched for -# compilable files. -HIDIRS = $(TOP)/gtk/glib $(TOP)/gtk/abstract $(TOP)/gtk/general +# help c2hs find Hierarchy +C2HS_EXTRA_FLAGS = -i$(TOP)/gtk/general HEADER = gconf/gconf-client.h #EXTRA_HFILES = |
From: Jens-Ulrik P. <ju...@us...> - 2004-08-19 07:54:30
|
Update of /cvsroot/gtk2hs/gtk2hs/mk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13198/mk Modified Files: common.mk config.mk.in library.mk recurse.mk Log Message: Update make files and all to support building documentation with haddock. Other minor build fixes. Remove gendoc and doc. * sourceview/Makefile (C2HS_EXTRA_FLAGS): Replaces HIDIRS for c2hs. * mogul/Makefile: Add EXCLUDE_DOCS and PREPROC_DOCS for haddock. * mk/recurse.mk: Remove $(MAKE_DOCS) dependency from all targets. Add html and install-html targets. * mk/library.mk (PKGDOCDIR): New variable to hold package doc dir. (html): New target that builds packages docs with haddock. Just warns if HADDOCK is not defined. (install-html): New target to install packages docs. * mk/config.mk.in: Add HADDOCK and GHC_DOCDIR replacing BUILDDOCS, xml and xslt related variables. * mk/common.mk (INST_DOCDIR): Setup new variable. (C2HSFLAGGED): Add C2HS_EXTRA_FLAGS for finding .chi files. * gtk/multiline/TextView.chs: Fix doc typos at top. * gtk/Makefile: Add EXCLUDE_DOCS and PREPROC_DOCS for haddock. * glade/Makefile (C2HS_EXTRA_FLAGS): Replaces HIDIRS for c2hs only. * gconf/System/Gnome/GConf/GConfClient.chs: Doc tweaks to make haddock happy at top and for gconfAddDir. * gconf/Makefile (C2HS_EXTRA_FLAGS): Replaces HIDIRS for c2hs only. * gtk2hs.spec.in: Use ghc-6.2.1 and define short ghc version %ghcver. Use License instead of Copyright. Update buildrequires. Add separate subpackages for sourceview, gconf and glade Name subpackages with %ghcver. Subpackages now require the appropriate -devel package. Define %ghclibdir and %gtk2hsdir. (%build): Update configure invocation - drop xml options and use --prefix and --libdir. Make html. Use mkdir. Clean demo dirs with find. (%post,%preun): Update and add scripts for new subpackages. (%files): Html docs are now in /usr/share/doc/gtk2hs. * configure.in: Comment out GtkGLExt, HOpenGL checks. Check for haddock instead of xslt. Add --with-ghc-docdir option. Remove xml catalog and xsl checks. Replace missing xml final warning with haddock missing warning. * Makefile: No longer build gendoc or doc. Build mogul after gtk2. Index: recurse.mk =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/mk/recurse.mk,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- recurse.mk 16 Aug 2004 07:35:55 -0000 1.6 +++ recurse.mk 19 Aug 2004 07:54:20 -0000 1.7 @@ -5,23 +5,23 @@ # to extra directories that are included when cleaning and tarring. -all : MAKE_GOALS=$(MAKE_TOOLS) $(MAKE_LIBS) $(MAKE_DOCS) $(MAKE_APPS) +all : MAKE_GOALS=$(MAKE_TOOLS) $(MAKE_LIBS) $(MAKE_APPS) all : make-all -inplace : MAKE_GOALS=$(MAKE_TOOLS) $(MAKE_LIBS) $(MAKE_DOCS) +inplace : MAKE_GOALS=$(MAKE_TOOLS) $(MAKE_LIBS) inplace : make-inplace -noinplace : MAKE_GOALS=$(MAKE_TOOLS) $(MAKE_LIBS) $(MAKE_DOCS) +noinplace : MAKE_GOALS=$(MAKE_TOOLS) $(MAKE_LIBS) noinplace : make-noinplace -tarsource : MAKE_GOALS=$(MAKE_TOOLS) $(MAKE_LIBS) $(MAKE_DOCS) $(MAKE_APPS) $(MAKE_VERB) +tarsource : MAKE_GOALS=$(MAKE_TOOLS) $(MAKE_LIBS) $(MAKE_APPS) $(MAKE_VERB) tarsource : make-tarsource -clean : MAKE_GOALS=$(MAKE_TOOLS) $(MAKE_LIBS) $(MAKE_DOCS) $(MAKE_APPS) $(MAKE_VERB) +clean : MAKE_GOALS=$(MAKE_TOOLS) $(MAKE_LIBS) $(MAKE_APPS) $(MAKE_VERB) clean : make-clean $(RM) $(EXTRA_CLEANFILES) -distclean : MAKE_GOALS=$(MAKE_TOOLS) $(MAKE_LIBS) $(MAKE_DOCS) $(MAKE_APPS) $(MAKE_VERB) +distclean : MAKE_GOALS=$(MAKE_TOOLS) $(MAKE_LIBS) $(MAKE_APPS) $(MAKE_VERB) distclean : make-distclean $(RM) $(LOCALPKGCONF) $(LOCALPKGCONF).old $(EXTRA_DISTCLEANFILES) @@ -34,5 +34,11 @@ uninstall : MAKE_GOALS=$(MAKE_LIBS) $(MAKE_APPS) uninstall : make-uninstall +html : MAKE_GOALS=$(MAKE_LIBS) +html : make-html + +install-html : MAKE_GOALS=$(MAKE_LIBS) +install-html : make-install-html + make-% : for dir in $(MAKE_GOALS); do $(MAKE) $* -C$$dir || exit 1; done; Index: common.mk =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/mk/common.mk,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- common.mk 16 Aug 2004 07:35:55 -0000 1.31 +++ common.mk 19 Aug 2004 07:54:20 -0000 1.32 @@ -24,6 +24,7 @@ INST_HIDIR = $(INST_LIBDIR)/hi INST_INCLDIR = $(INST_HIDIR) INST_BINDIR = $(shell echo $(addsuffix $(INSTALLDIROK),$(bindir)) | $(SEDPIPE)) +INST_DOCDIR = $(datadir)/doc/gtk2hs # these values are used for building a library in-place INPL_HIDIR := $(sort $(patsubst %/.,%,$(patsubst %/,%,\ @@ -122,7 +123,7 @@ # Specify how c2hs should be run. C2HSFLAGGED := $(C2HS) $(C2HSFLAGS) +RTS $(HSTOOLFLAGS) -RTS \ $(addprefix -C,$(EXTRA_CPPFLAGS_ONLY_I) $(CPPFLAGS_ONLY_I)) \ - -i$(HIDIRSOK) + -i$(HIDIRSOK) $(C2HS_EXTRA_FLAGS) # Read in all extra dependencies between .chs files. -include $(ALLCHSFILES:.chs=.dep) Index: config.mk.in =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/mk/config.mk.in,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- config.mk.in 6 Aug 2004 01:28:18 -0000 1.28 +++ config.mk.in 19 Aug 2004 07:54:20 -0000 1.29 @@ -173,11 +173,5 @@ COMMONINSTALLDIR = gtk2hs # Documentation - -BUILDDOCS = @BUILDDOCS@ -XSLTPROC = @XSLTTRANS@ -CATALOGS = @XML_CATALOG_FILES@ -DO_HTML = @FOUNDHTML@ -XSLTHTML = @XSLTHTML@ -DO_FO = @FOUNDFO@ -XSLTFO = @XSLTFO@ +HADDOCK = @HADDOCK@ +GHC_DOCDIR = @GHC_DOCDIR@ Index: library.mk =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/mk/library.mk,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- library.mk 16 Aug 2004 07:35:55 -0000 1.26 +++ library.mk 19 Aug 2004 07:54:20 -0000 1.27 @@ -14,6 +14,8 @@ makeTextList = $(addprefix \",$(addsuffix \",\ $(subst $(SPACE),\"$(COMMA)\",$(sort $(1))))) +PKGDOCDIR ?= $(INST_DOCDIR)/$(PACKAGENAME) + noinplace : inplaceinit @if $(PKG) -f $(LOCALPKGCONF) $(LISTLOCAL) | $(GREP) $(PACKAGENAME) \ > /dev/null; then \ @@ -171,3 +173,16 @@ idbg : @echo $(GHCIARCH) + +html : $(ALLHSFILES) +ifneq ($(strip $(HADDOCK)),) + mkdir -p doc + $(foreach i, $(PREPROC_DOCS), $(shell hsc2hs $(EXTRA_CPPFLAGS) -o $(i).uncpp $(i))) + $(HADDOCK) -o doc --title=$(LIBNAME) --package=$(PACKAGENAME) --dump-interface=doc/$(PACKAGENAME).haddock -i$(GHC_DOCDIR)/libraries/base,$(GHC_DOCDIR)/libraries/base/base.haddock $(HADDOCK_EXTRA_FLAGS) --html $(addsuffix .uncpp, $(PREPROC_DOCS)) $(filter-out $(EXCLUDE_DOCS) $(PREPROC_DOCS), $(ALLHSFILES)) +else + echo "You need to install `haddock' to build the documentation!" +endif + +install-html : + $(INSTALL_DIR) $(DESTDIR)$(PKGDOCDIR) + $(INSTALL_DATA) doc/* $(DESTDIR)$(PKGDOCDIR) |
From: Jens-Ulrik P. <ju...@us...> - 2004-08-19 07:54:30
|
Update of /cvsroot/gtk2hs/gtk2hs/mogul In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13198/mogul Modified Files: .cvsignore Makefile Log Message: Update make files and all to support building documentation with haddock. Other minor build fixes. Remove gendoc and doc. * sourceview/Makefile (C2HS_EXTRA_FLAGS): Replaces HIDIRS for c2hs. * mogul/Makefile: Add EXCLUDE_DOCS and PREPROC_DOCS for haddock. * mk/recurse.mk: Remove $(MAKE_DOCS) dependency from all targets. Add html and install-html targets. * mk/library.mk (PKGDOCDIR): New variable to hold package doc dir. (html): New target that builds packages docs with haddock. Just warns if HADDOCK is not defined. (install-html): New target to install packages docs. * mk/config.mk.in: Add HADDOCK and GHC_DOCDIR replacing BUILDDOCS, xml and xslt related variables. * mk/common.mk (INST_DOCDIR): Setup new variable. (C2HSFLAGGED): Add C2HS_EXTRA_FLAGS for finding .chi files. * gtk/multiline/TextView.chs: Fix doc typos at top. * gtk/Makefile: Add EXCLUDE_DOCS and PREPROC_DOCS for haddock. * glade/Makefile (C2HS_EXTRA_FLAGS): Replaces HIDIRS for c2hs only. * gconf/System/Gnome/GConf/GConfClient.chs: Doc tweaks to make haddock happy at top and for gconfAddDir. * gconf/Makefile (C2HS_EXTRA_FLAGS): Replaces HIDIRS for c2hs only. * gtk2hs.spec.in: Use ghc-6.2.1 and define short ghc version %ghcver. Use License instead of Copyright. Update buildrequires. Add separate subpackages for sourceview, gconf and glade Name subpackages with %ghcver. Subpackages now require the appropriate -devel package. Define %ghclibdir and %gtk2hsdir. (%build): Update configure invocation - drop xml options and use --prefix and --libdir. Make html. Use mkdir. Clean demo dirs with find. (%post,%preun): Update and add scripts for new subpackages. (%files): Html docs are now in /usr/share/doc/gtk2hs. * configure.in: Comment out GtkGLExt, HOpenGL checks. Check for haddock instead of xslt. Add --with-ghc-docdir option. Remove xml catalog and xsl checks. Replace missing xml final warning with haddock missing warning. * Makefile: No longer build gendoc or doc. Build mogul after gtk2. Index: .cvsignore =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/mogul/.cvsignore,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- .cvsignore 8 May 2003 11:28:45 -0000 1.2 +++ .cvsignore 19 Aug 2004 07:54:20 -0000 1.3 @@ -1 +1,2 @@ +doc mogul.conf Index: Makefile =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/mogul/Makefile,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- Makefile 8 Aug 2004 20:29:00 -0000 1.7 +++ Makefile 19 Aug 2004 07:54:20 -0000 1.8 @@ -8,6 +8,9 @@ NEEDPACKAGES = gtk2 +PREPROC_DOCS = GetWidget.hs Mogul.hs NewWidget.hs +HADDOCK_EXTRA_FLAGS = -i../gtk/doc,../gtk/doc/gtk2.haddock + ifeq ($(DISABLE_DEPRECATED),yes) EXTRAHC_FLAGS += -DDISABLE_DEPRECATED endif |
From: Jens-Ulrik P. <ju...@us...> - 2004-08-19 07:54:30
|
Update of /cvsroot/gtk2hs/gtk2hs/sourceview In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13198/sourceview Modified Files: .cvsignore Makefile Log Message: Update make files and all to support building documentation with haddock. Other minor build fixes. Remove gendoc and doc. * sourceview/Makefile (C2HS_EXTRA_FLAGS): Replaces HIDIRS for c2hs. * mogul/Makefile: Add EXCLUDE_DOCS and PREPROC_DOCS for haddock. * mk/recurse.mk: Remove $(MAKE_DOCS) dependency from all targets. Add html and install-html targets. * mk/library.mk (PKGDOCDIR): New variable to hold package doc dir. (html): New target that builds packages docs with haddock. Just warns if HADDOCK is not defined. (install-html): New target to install packages docs. * mk/config.mk.in: Add HADDOCK and GHC_DOCDIR replacing BUILDDOCS, xml and xslt related variables. * mk/common.mk (INST_DOCDIR): Setup new variable. (C2HSFLAGGED): Add C2HS_EXTRA_FLAGS for finding .chi files. * gtk/multiline/TextView.chs: Fix doc typos at top. * gtk/Makefile: Add EXCLUDE_DOCS and PREPROC_DOCS for haddock. * glade/Makefile (C2HS_EXTRA_FLAGS): Replaces HIDIRS for c2hs only. * gconf/System/Gnome/GConf/GConfClient.chs: Doc tweaks to make haddock happy at top and for gconfAddDir. * gconf/Makefile (C2HS_EXTRA_FLAGS): Replaces HIDIRS for c2hs only. * gtk2hs.spec.in: Use ghc-6.2.1 and define short ghc version %ghcver. Use License instead of Copyright. Update buildrequires. Add separate subpackages for sourceview, gconf and glade Name subpackages with %ghcver. Subpackages now require the appropriate -devel package. Define %ghclibdir and %gtk2hsdir. (%build): Update configure invocation - drop xml options and use --prefix and --libdir. Make html. Use mkdir. Clean demo dirs with find. (%post,%preun): Update and add scripts for new subpackages. (%files): Html docs are now in /usr/share/doc/gtk2hs. * configure.in: Comment out GtkGLExt, HOpenGL checks. Check for haddock instead of xslt. Add --with-ghc-docdir option. Remove xml catalog and xsl checks. Replace missing xml final warning with haddock missing warning. * Makefile: No longer build gendoc or doc. Build mogul after gtk2. Index: .cvsignore =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/sourceview/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- .cvsignore 3 Aug 2004 16:56:52 -0000 1.1 +++ .cvsignore 19 Aug 2004 07:54:21 -0000 1.2 @@ -9,3 +9,4 @@ SourceTagTable.hs SourceView.hs SourceViewType.* +doc Index: Makefile =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/sourceview/Makefile,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- Makefile 6 Aug 2004 01:28:19 -0000 1.11 +++ Makefile 19 Aug 2004 07:54:21 -0000 1.12 @@ -6,11 +6,8 @@ MAIN = SourceView.hs -# In order for ghc and c2hs to find .chi and .hi files in ../gtk/* we -# need to set these directories here. Note that this list is different -# from SUBDIRS in that the directories given here are not searched for -# compilable files. -HIDIRS = ../gtk/glib ../gtk/abstract ../gtk/general ../gtk/multiline +# help c2hs find Hierarchy and TextIter +C2HS_EXTRA_FLAGS = -i../gtk/general:../gtk/multiline HEADER = sourceview.h EXTRA_HFILES = sourceview.h |
From: Jens-Ulrik P. <ju...@us...> - 2004-08-19 07:54:29
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13198/gtk Modified Files: .cvsignore Makefile Log Message: Update make files and all to support building documentation with haddock. Other minor build fixes. Remove gendoc and doc. * sourceview/Makefile (C2HS_EXTRA_FLAGS): Replaces HIDIRS for c2hs. * mogul/Makefile: Add EXCLUDE_DOCS and PREPROC_DOCS for haddock. * mk/recurse.mk: Remove $(MAKE_DOCS) dependency from all targets. Add html and install-html targets. * mk/library.mk (PKGDOCDIR): New variable to hold package doc dir. (html): New target that builds packages docs with haddock. Just warns if HADDOCK is not defined. (install-html): New target to install packages docs. * mk/config.mk.in: Add HADDOCK and GHC_DOCDIR replacing BUILDDOCS, xml and xslt related variables. * mk/common.mk (INST_DOCDIR): Setup new variable. (C2HSFLAGGED): Add C2HS_EXTRA_FLAGS for finding .chi files. * gtk/multiline/TextView.chs: Fix doc typos at top. * gtk/Makefile: Add EXCLUDE_DOCS and PREPROC_DOCS for haddock. * glade/Makefile (C2HS_EXTRA_FLAGS): Replaces HIDIRS for c2hs only. * gconf/System/Gnome/GConf/GConfClient.chs: Doc tweaks to make haddock happy at top and for gconfAddDir. * gconf/Makefile (C2HS_EXTRA_FLAGS): Replaces HIDIRS for c2hs only. * gtk2hs.spec.in: Use ghc-6.2.1 and define short ghc version %ghcver. Use License instead of Copyright. Update buildrequires. Add separate subpackages for sourceview, gconf and glade Name subpackages with %ghcver. Subpackages now require the appropriate -devel package. Define %ghclibdir and %gtk2hsdir. (%build): Update configure invocation - drop xml options and use --prefix and --libdir. Make html. Use mkdir. Clean demo dirs with find. (%post,%preun): Update and add scripts for new subpackages. (%files): Html docs are now in /usr/share/doc/gtk2hs. * configure.in: Comment out GtkGLExt, HOpenGL checks. Check for haddock instead of xslt. Add --with-ghc-docdir option. Remove xml catalog and xsl checks. Replace missing xml final warning with haddock missing warning. * Makefile: No longer build gendoc or doc. Build mogul after gtk2. Index: .cvsignore =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- .cvsignore 17 Jul 2002 14:45:28 -0000 1.1 +++ .cvsignore 19 Aug 2004 07:54:20 -0000 1.2 @@ -1,2 +1,3 @@ *.i +doc gtk2.conf Index: Makefile =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Makefile,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- Makefile 6 Aug 2004 01:28:18 -0000 1.32 +++ Makefile 19 Aug 2004 07:54:20 -0000 1.33 @@ -22,6 +22,9 @@ HEADER = gtk/gtk.h +EXCLUDE_DOCS = general/FFI.hs ../compat/LocalControl.hs ../compat/LocalData.hs +PREPROC_DOCS = general/Gtk.hs + # Whenever a variable module-HEADER is defined, the file module.chs # is translated with a separate invokation of c2hs with the header # file $module-HEADER. The header file in this variable should be |
From: Jens-Ulrik P. <ju...@us...> - 2004-08-19 07:54:29
|
Update of /cvsroot/gtk2hs/gtk2hs/glade In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13198/glade Modified Files: .cvsignore Makefile Log Message: Update make files and all to support building documentation with haddock. Other minor build fixes. Remove gendoc and doc. * sourceview/Makefile (C2HS_EXTRA_FLAGS): Replaces HIDIRS for c2hs. * mogul/Makefile: Add EXCLUDE_DOCS and PREPROC_DOCS for haddock. * mk/recurse.mk: Remove $(MAKE_DOCS) dependency from all targets. Add html and install-html targets. * mk/library.mk (PKGDOCDIR): New variable to hold package doc dir. (html): New target that builds packages docs with haddock. Just warns if HADDOCK is not defined. (install-html): New target to install packages docs. * mk/config.mk.in: Add HADDOCK and GHC_DOCDIR replacing BUILDDOCS, xml and xslt related variables. * mk/common.mk (INST_DOCDIR): Setup new variable. (C2HSFLAGGED): Add C2HS_EXTRA_FLAGS for finding .chi files. * gtk/multiline/TextView.chs: Fix doc typos at top. * gtk/Makefile: Add EXCLUDE_DOCS and PREPROC_DOCS for haddock. * glade/Makefile (C2HS_EXTRA_FLAGS): Replaces HIDIRS for c2hs only. * gconf/System/Gnome/GConf/GConfClient.chs: Doc tweaks to make haddock happy at top and for gconfAddDir. * gconf/Makefile (C2HS_EXTRA_FLAGS): Replaces HIDIRS for c2hs only. * gtk2hs.spec.in: Use ghc-6.2.1 and define short ghc version %ghcver. Use License instead of Copyright. Update buildrequires. Add separate subpackages for sourceview, gconf and glade Name subpackages with %ghcver. Subpackages now require the appropriate -devel package. Define %ghclibdir and %gtk2hsdir. (%build): Update configure invocation - drop xml options and use --prefix and --libdir. Make html. Use mkdir. Clean demo dirs with find. (%post,%preun): Update and add scripts for new subpackages. (%files): Html docs are now in /usr/share/doc/gtk2hs. * configure.in: Comment out GtkGLExt, HOpenGL checks. Check for haddock instead of xslt. Add --with-ghc-docdir option. Remove xml catalog and xsl checks. Replace missing xml final warning with haddock missing warning. * Makefile: No longer build gendoc or doc. Build mogul after gtk2. Index: .cvsignore =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/glade/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- .cvsignore 3 Aug 2004 16:56:52 -0000 1.1 +++ .cvsignore 19 Aug 2004 07:54:19 -0000 1.2 @@ -1,2 +1,3 @@ Glade.hs GladeType.* +doc Index: Makefile =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/glade/Makefile,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Makefile 6 Aug 2004 01:28:18 -0000 1.6 +++ Makefile 19 Aug 2004 07:54:19 -0000 1.7 @@ -10,11 +10,8 @@ MAIN = Glade.hs -# In order for ghc and c2hs to find .chi and .hi files in $(TOP)/gtk/* we -# need to set these directories here. Note that this list is different -# from SUBDIRS in that the directories given here are not searched for -# compilable files. -HIDIRS = $(TOP)/gtk/glib $(TOP)/gtk/abstract $(TOP)/gtk/general +# help c2hs to find Hierarchy +C2HS_EXTRA_FLAGS = -i$(TOP)/gtk/general HEADER = glade/glade.h #EXTRA_HFILES = |
From: Jens-Ulrik P. <ju...@us...> - 2004-08-19 07:54:29
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/multiline In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13198/gtk/multiline Modified Files: TextView.chs Log Message: Update make files and all to support building documentation with haddock. Other minor build fixes. Remove gendoc and doc. * sourceview/Makefile (C2HS_EXTRA_FLAGS): Replaces HIDIRS for c2hs. * mogul/Makefile: Add EXCLUDE_DOCS and PREPROC_DOCS for haddock. * mk/recurse.mk: Remove $(MAKE_DOCS) dependency from all targets. Add html and install-html targets. * mk/library.mk (PKGDOCDIR): New variable to hold package doc dir. (html): New target that builds packages docs with haddock. Just warns if HADDOCK is not defined. (install-html): New target to install packages docs. * mk/config.mk.in: Add HADDOCK and GHC_DOCDIR replacing BUILDDOCS, xml and xslt related variables. * mk/common.mk (INST_DOCDIR): Setup new variable. (C2HSFLAGGED): Add C2HS_EXTRA_FLAGS for finding .chi files. * gtk/multiline/TextView.chs: Fix doc typos at top. * gtk/Makefile: Add EXCLUDE_DOCS and PREPROC_DOCS for haddock. * glade/Makefile (C2HS_EXTRA_FLAGS): Replaces HIDIRS for c2hs only. * gconf/System/Gnome/GConf/GConfClient.chs: Doc tweaks to make haddock happy at top and for gconfAddDir. * gconf/Makefile (C2HS_EXTRA_FLAGS): Replaces HIDIRS for c2hs only. * gtk2hs.spec.in: Use ghc-6.2.1 and define short ghc version %ghcver. Use License instead of Copyright. Update buildrequires. Add separate subpackages for sourceview, gconf and glade Name subpackages with %ghcver. Subpackages now require the appropriate -devel package. Define %ghclibdir and %gtk2hsdir. (%build): Update configure invocation - drop xml options and use --prefix and --libdir. Make html. Use mkdir. Clean demo dirs with find. (%post,%preun): Update and add scripts for new subpackages. (%files): Html docs are now in /usr/share/doc/gtk2hs. * configure.in: Comment out GtkGLExt, HOpenGL checks. Check for haddock instead of xslt. Add --with-ghc-docdir option. Remove xml catalog and xsl checks. Replace missing xml final warning with haddock missing warning. * Makefile: No longer build gendoc or doc. Build mogul after gtk2. Index: TextView.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/multiline/TextView.chs,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- TextView.chs 5 Aug 2004 14:24:28 -0000 1.12 +++ TextView.chs 19 Aug 2004 07:54:20 -0000 1.13 @@ -19,7 +19,7 @@ -- -- | -- --- * Through out we distinguish between buffer cooridinates which are pixels +-- * Throughout we distinguish between buffer coordinates which are pixels -- with the origin at the upper left corner of the first character on the -- first line. Window coordinates are relative to the top left pixel which -- is visible in the current 'TextView'. Coordinates from Events |
From: Jens-Ulrik P. <ju...@us...> - 2004-08-19 07:54:28
|
Update of /cvsroot/gtk2hs/gtk2hs/gendoc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13198/gendoc Removed Files: .cvsignore Abstract.hs Driver.hs Lexer.hs Makefile Parser.hs PrettyLib.hs State.hs Update.hs XMLwrite.hs gtk2hs.dtd gtk2hs.xml gtk2hs.xsl Log Message: Update make files and all to support building documentation with haddock. Other minor build fixes. Remove gendoc and doc. * sourceview/Makefile (C2HS_EXTRA_FLAGS): Replaces HIDIRS for c2hs. * mogul/Makefile: Add EXCLUDE_DOCS and PREPROC_DOCS for haddock. * mk/recurse.mk: Remove $(MAKE_DOCS) dependency from all targets. Add html and install-html targets. * mk/library.mk (PKGDOCDIR): New variable to hold package doc dir. (html): New target that builds packages docs with haddock. Just warns if HADDOCK is not defined. (install-html): New target to install packages docs. * mk/config.mk.in: Add HADDOCK and GHC_DOCDIR replacing BUILDDOCS, xml and xslt related variables. * mk/common.mk (INST_DOCDIR): Setup new variable. (C2HSFLAGGED): Add C2HS_EXTRA_FLAGS for finding .chi files. * gtk/multiline/TextView.chs: Fix doc typos at top. * gtk/Makefile: Add EXCLUDE_DOCS and PREPROC_DOCS for haddock. * glade/Makefile (C2HS_EXTRA_FLAGS): Replaces HIDIRS for c2hs only. * gconf/System/Gnome/GConf/GConfClient.chs: Doc tweaks to make haddock happy at top and for gconfAddDir. * gconf/Makefile (C2HS_EXTRA_FLAGS): Replaces HIDIRS for c2hs only. * gtk2hs.spec.in: Use ghc-6.2.1 and define short ghc version %ghcver. Use License instead of Copyright. Update buildrequires. Add separate subpackages for sourceview, gconf and glade Name subpackages with %ghcver. Subpackages now require the appropriate -devel package. Define %ghclibdir and %gtk2hsdir. (%build): Update configure invocation - drop xml options and use --prefix and --libdir. Make html. Use mkdir. Clean demo dirs with find. (%post,%preun): Update and add scripts for new subpackages. (%files): Html docs are now in /usr/share/doc/gtk2hs. * configure.in: Comment out GtkGLExt, HOpenGL checks. Check for haddock instead of xslt. Add --with-ghc-docdir option. Remove xml catalog and xsl checks. Replace missing xml final warning with haddock missing warning. * Makefile: No longer build gendoc or doc. Build mogul after gtk2. --- State.hs DELETED --- --- XMLwrite.hs DELETED --- --- Parser.hs DELETED --- --- gtk2hs.xml DELETED --- --- Abstract.hs DELETED --- --- gtk2hs.dtd DELETED --- --- Makefile DELETED --- --- PrettyLib.hs DELETED --- --- Driver.hs DELETED --- --- Update.hs DELETED --- --- Lexer.hs DELETED --- --- gtk2hs.xsl DELETED --- --- .cvsignore DELETED --- |
From: Jens-Ulrik P. <ju...@us...> - 2004-08-19 07:54:27
|
Update of /cvsroot/gtk2hs/gtk2hs/gconf/System/Gnome/GConf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13198/gconf/System/Gnome/GConf Modified Files: GConfClient.chs Log Message: Update make files and all to support building documentation with haddock. Other minor build fixes. Remove gendoc and doc. * sourceview/Makefile (C2HS_EXTRA_FLAGS): Replaces HIDIRS for c2hs. * mogul/Makefile: Add EXCLUDE_DOCS and PREPROC_DOCS for haddock. * mk/recurse.mk: Remove $(MAKE_DOCS) dependency from all targets. Add html and install-html targets. * mk/library.mk (PKGDOCDIR): New variable to hold package doc dir. (html): New target that builds packages docs with haddock. Just warns if HADDOCK is not defined. (install-html): New target to install packages docs. * mk/config.mk.in: Add HADDOCK and GHC_DOCDIR replacing BUILDDOCS, xml and xslt related variables. * mk/common.mk (INST_DOCDIR): Setup new variable. (C2HSFLAGGED): Add C2HS_EXTRA_FLAGS for finding .chi files. * gtk/multiline/TextView.chs: Fix doc typos at top. * gtk/Makefile: Add EXCLUDE_DOCS and PREPROC_DOCS for haddock. * glade/Makefile (C2HS_EXTRA_FLAGS): Replaces HIDIRS for c2hs only. * gconf/System/Gnome/GConf/GConfClient.chs: Doc tweaks to make haddock happy at top and for gconfAddDir. * gconf/Makefile (C2HS_EXTRA_FLAGS): Replaces HIDIRS for c2hs only. * gtk2hs.spec.in: Use ghc-6.2.1 and define short ghc version %ghcver. Use License instead of Copyright. Update buildrequires. Add separate subpackages for sourceview, gconf and glade Name subpackages with %ghcver. Subpackages now require the appropriate -devel package. Define %ghclibdir and %gtk2hsdir. (%build): Update configure invocation - drop xml options and use --prefix and --libdir. Make html. Use mkdir. Clean demo dirs with find. (%post,%preun): Update and add scripts for new subpackages. (%files): Html docs are now in /usr/share/doc/gtk2hs. * configure.in: Comment out GtkGLExt, HOpenGL checks. Check for haddock instead of xslt. Add --with-ghc-docdir option. Remove xml catalog and xsl checks. Replace missing xml final warning with haddock missing warning. * Makefile: No longer build gendoc or doc. Build mogul after gtk2. Index: GConfClient.chs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gconf/System/Gnome/GConf/GConfClient.chs,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- GConfClient.chs 10 Aug 2004 14:51:46 -0000 1.4 +++ GConfClient.chs 19 Aug 2004 07:54:19 -0000 1.5 @@ -20,8 +20,8 @@ -- | -- -- GConf is a system for maintaining program configuration information. --- The main difference between GConf and traditional configuration files / --- API's, is that GConf is that GConf is 'live'. Applications can be +-- The main difference between GConf and traditional configuration file +-- API's is that GConf is 'live'. Applications can be -- notified of changes in their configuration, it allows desktop wide setting -- to be propogated without restarting all applications, or multiple instances -- of a single application to synchronise their configuration. It is similar @@ -136,7 +136,7 @@ -- times. -- -- * Note that the watch is recursive, all keys below the given directory will --- be watched. So it would be a bad idea to watch the root "/". +-- be watched. So it would be a bad idea to watch the root \"\/\". -- gconfAddDir :: GConf -> String -> IO () gconfAddDir gc key = gconfAddDirWithPreload gc key PreloadNone |
From: Jens-Ulrik P. <ju...@us...> - 2004-08-19 07:54:27
|
Update of /cvsroot/gtk2hs/gtk2hs/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13198/doc Removed Files: .cvsignore Makefile gtk2hs.xml mogul.xml Log Message: Update make files and all to support building documentation with haddock. Other minor build fixes. Remove gendoc and doc. * sourceview/Makefile (C2HS_EXTRA_FLAGS): Replaces HIDIRS for c2hs. * mogul/Makefile: Add EXCLUDE_DOCS and PREPROC_DOCS for haddock. * mk/recurse.mk: Remove $(MAKE_DOCS) dependency from all targets. Add html and install-html targets. * mk/library.mk (PKGDOCDIR): New variable to hold package doc dir. (html): New target that builds packages docs with haddock. Just warns if HADDOCK is not defined. (install-html): New target to install packages docs. * mk/config.mk.in: Add HADDOCK and GHC_DOCDIR replacing BUILDDOCS, xml and xslt related variables. * mk/common.mk (INST_DOCDIR): Setup new variable. (C2HSFLAGGED): Add C2HS_EXTRA_FLAGS for finding .chi files. * gtk/multiline/TextView.chs: Fix doc typos at top. * gtk/Makefile: Add EXCLUDE_DOCS and PREPROC_DOCS for haddock. * glade/Makefile (C2HS_EXTRA_FLAGS): Replaces HIDIRS for c2hs only. * gconf/System/Gnome/GConf/GConfClient.chs: Doc tweaks to make haddock happy at top and for gconfAddDir. * gconf/Makefile (C2HS_EXTRA_FLAGS): Replaces HIDIRS for c2hs only. * gtk2hs.spec.in: Use ghc-6.2.1 and define short ghc version %ghcver. Use License instead of Copyright. Update buildrequires. Add separate subpackages for sourceview, gconf and glade Name subpackages with %ghcver. Subpackages now require the appropriate -devel package. Define %ghclibdir and %gtk2hsdir. (%build): Update configure invocation - drop xml options and use --prefix and --libdir. Make html. Use mkdir. Clean demo dirs with find. (%post,%preun): Update and add scripts for new subpackages. (%files): Html docs are now in /usr/share/doc/gtk2hs. * configure.in: Comment out GtkGLExt, HOpenGL checks. Check for haddock instead of xslt. Add --with-ghc-docdir option. Remove xml catalog and xsl checks. Replace missing xml final warning with haddock missing warning. * Makefile: No longer build gendoc or doc. Build mogul after gtk2. --- mogul.xml DELETED --- --- .cvsignore DELETED --- --- Makefile DELETED --- --- gtk2hs.xml DELETED --- |
From: Axel S. <as...@us...> - 2004-08-16 07:36:05
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18379 Modified Files: ChangeLog Makefile VERSION aclocal.m4 Log Message: Cleaning is now cleaner. Index: aclocal.m4 =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/aclocal.m4,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- aclocal.m4 21 Oct 2003 23:42:03 -0000 1.3 +++ aclocal.m4 16 Aug 2004 07:35:54 -0000 1.4 @@ -1,6 +1,6 @@ -# aclocal.m4t generated automatically by aclocal 1.5 +# generated automatically by aclocal 1.7.5 -*- Autoconf -*- -# Copyright 1996, 1997, 1998, 1999, 2000, 2001 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, Index: VERSION =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/VERSION,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- VERSION 27 Jul 2004 08:10:40 -0000 1.8 +++ VERSION 16 Aug 2004 07:35:54 -0000 1.9 @@ -1 +1 @@ -0.9.5.50 +0.9.6 Index: Makefile =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/Makefile,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- Makefile 28 Jul 2004 09:52:32 -0000 1.31 +++ Makefile 16 Aug 2004 07:35:54 -0000 1.32 @@ -43,6 +43,9 @@ MAKE_APPS += demo/sourceview demo/gconf endif +EXTRA_DISTCLEANFILES = $(strip mk/config.mk mk/chsDepend config.status \ + config.log gtk2hs.spec) + EXTRA_TARFILES = $(strip AUTHORS COPYING.LIB ChangeLog INSTALL Makefile \ TODO VERSION aclocal.m4 acinclude.m4 \ configure.in configure mk/recurse.mk \ Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.223 retrieving revision 1.224 diff -u -d -r1.223 -r1.224 --- ChangeLog 11 Aug 2004 08:41:55 -0000 1.223 +++ ChangeLog 16 Aug 2004 07:35:54 -0000 1.224 @@ -1,3 +1,12 @@ +2004-08-15 Axel Simon <A....@ke...> + + * mk/common.mk, mk/library.mk, mk/recurse.mk, Makefile: Make clean + and make distclean remove more files now. + +2004-08-15 Axel Simon <A....@ke...> + + * VERSION: Bumped to 0.9.6. Release. + 2004-08-11 Axel Simon <A....@ke...> * configure.in: Make install-sh executable and don't inform about |
From: Axel S. <as...@us...> - 2004-08-16 07:36:05
|
Update of /cvsroot/gtk2hs/gtk2hs/mk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18379/mk Modified Files: common.mk library.mk recurse.mk Log Message: Cleaning is now cleaner. Index: recurse.mk =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/mk/recurse.mk,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- recurse.mk 15 Nov 2003 11:39:07 -0000 1.5 +++ recurse.mk 16 Aug 2004 07:35:55 -0000 1.6 @@ -19,10 +19,11 @@ clean : MAKE_GOALS=$(MAKE_TOOLS) $(MAKE_LIBS) $(MAKE_DOCS) $(MAKE_APPS) $(MAKE_VERB) clean : make-clean + $(RM) $(EXTRA_CLEANFILES) distclean : MAKE_GOALS=$(MAKE_TOOLS) $(MAKE_LIBS) $(MAKE_DOCS) $(MAKE_APPS) $(MAKE_VERB) distclean : make-distclean - $(RM) $(LOCALPKGCONF) $(LOCALPKGCONF).old + $(RM) $(LOCALPKGCONF) $(LOCALPKGCONF).old $(EXTRA_DISTCLEANFILES) install : MAKE_GOALS=$(MAKE_LIBS) $(MAKE_APPS) install : make-install Index: common.mk =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/mk/common.mk,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- common.mk 8 Aug 2004 19:04:37 -0000 1.30 +++ common.mk 16 Aug 2004 07:35:55 -0000 1.31 @@ -336,7 +336,8 @@ distclean : clean $(strip $(RM) $(EXTRA_HSFILES) $(EXTRA_CHSFILES) \ - $(ALLCHSFILES:.chs=.dep)) $(LOCALPKGCONF) $(LOCALPKGCONF).old + $(ALLCHSFILES:.chs=.dep) $(LOCALPKGCONF) $(LOCALPKGCONF).old \ + $(EXTRA_DISTCLEANFILES)) maintainer-clean : distclean Index: library.mk =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/mk/library.mk,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- library.mk 8 Aug 2004 19:04:37 -0000 1.25 +++ library.mk 16 Aug 2004 07:35:55 -0000 1.26 @@ -7,6 +7,9 @@ TARGETOK = $(addprefix $(strip $(LIBPREFIX)),\ $(addsuffix $(LIBSUFFIX),$(strip $(LIBNAME)))) +EXTRA_CLEANFILES += $(addsuffix $(OBJSUFFIX),$(strip $(LIBNAME))) + +EXTRA_DISTCLEANFILES += $(PACKAGENAME).conf makeTextList = $(addprefix \",$(addsuffix \",\ $(subst $(SPACE),\"$(COMMA)\",$(sort $(1))))) |
From: Axel S. <as...@us...> - 2004-08-11 08:42:05
|
Update of /cvsroot/gtk2hs/gtk2hs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8647 Modified Files: configure.in ChangeLog Log Message: Make install-sh executable after configuring so installing works on Solaris. Index: configure.in =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/configure.in,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- configure.in 10 Aug 2004 12:21:03 -0000 1.41 +++ configure.in 11 Aug 2004 08:41:55 -0000 1.42 @@ -603,7 +603,7 @@ mk/config.mk mk/chsDepend c2hs/toplevel/C2HSConfig.hs -],[chmod a+x mk/chsDepend]) +],[chmod a+x mk/chsDepend && chmod a+x install-sh]) dnl ...and chat with the user echo "**************************************************" @@ -625,16 +625,16 @@ fi; echo "* *" fi; -if test $ENABLE_OPENGL = no; then - echo "* Warning: OpenGL support is not available: *" - if test x$FOUNDGLEXT = xno; then - echo "* - the GtkGLExt widget is not installed *" - fi; - if test x$FOUNDHOPENGL = xno; then - echo "* - HOpenGL is not installed in the specified *" - echo "* GHC installation *" - fi; - echo "* *" -fi; +dnl if test $ENABLE_OPENGL = no; then +dnl echo "* Warning: OpenGL support is not available: *" +dnl if test x$FOUNDGLEXT = xno; then +dnl echo "* - the GtkGLExt widget is not installed *" +dnl fi; +dnl if test x$FOUNDHOPENGL = xno; then +dnl echo "* - HOpenGL is not installed in the specified *" +dnl echo "* GHC installation *" +dnl fi; +dnl echo "* *" +dnl fi; echo "* Now do \"(g)make\" followed by \"(g)make install\" *" echo "**************************************************" Index: ChangeLog =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/ChangeLog,v retrieving revision 1.222 retrieving revision 1.223 diff -u -d -r1.222 -r1.223 --- ChangeLog 10 Aug 2004 14:51:45 -0000 1.222 +++ ChangeLog 11 Aug 2004 08:41:55 -0000 1.223 @@ -1,3 +1,8 @@ +2004-08-11 Axel Simon <A....@ke...> + + * configure.in: Make install-sh executable and don't inform about + OpenGL status since it doesn't work anyway. + 2004-08-10 Duncan Coutts <du...@co...> * configure.in: require autoconf 2.50 or greater, 2.13 doesn't work. |
From: Duncan C. <dun...@us...> - 2004-08-10 14:55:36
|
Update of /cvsroot/gtk2hs/gtk2hs/compat In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23926/compat Modified Files: LocalControl.hs LocalData.hs Log Message: Removed support for versions of ghc pre 5.04. Index: LocalData.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/compat/LocalData.hs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- LocalData.hs 21 Jul 2002 16:59:05 -0000 1.2 +++ LocalData.hs 10 Aug 2004 14:55:24 -0000 1.3 @@ -30,25 +30,13 @@ --- TODO ---------------------------------------------------------------------- module LocalData( -#if __GLASGOW_HASKELL__>=504 module Data.IORef, module Data.Bits, module Data.FiniteMap, module System.IO.Unsafe -#else - module IOExts, - module Bits, - module FiniteMap -#endif ) where -#if __GLASGOW_HASKELL__>=504 import Data.IORef import Data.Bits import Data.FiniteMap import System.IO.Unsafe -#else -import IOExts -import Bits -import FiniteMap -#endif Index: LocalControl.hs =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/compat/LocalControl.hs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- LocalControl.hs 9 Jul 2003 22:42:43 -0000 1.2 +++ LocalControl.hs 10 Aug 2004 14:55:24 -0000 1.3 @@ -30,22 +30,14 @@ --- TODO ---------------------------------------------------------------------- module LocalControl( -#if __GLASGOW_HASKELL__>=504 module Control.Exception, module Control.Concurrent -#else - module Exception, - module Concurrent -#endif ) where #if __GLASGOW_HASKELL__>=600 import Control.Exception import Control.Concurrent hiding(throwTo) -#elif __GLASGOW_HASKELL__>=504 +#else import Control.Exception import Control.Concurrent -#else -import Exception -import Concurrent #endif |