archive: manual.tar.bz2
-manual.tar.bz2: gtk/index.html gtk/style.css
- tar cjf $@ gtk
+manual.tar.bz2: gtk/index.html gtk/style.css gobject/index.html gobject/style.css
+ tar cjf $@ gtk gobject
doc.html: doc.xml
xsltproc -o $@ /usr/share/sgml/docbook/xsl-stylesheets/html/docbook.xsl $<
gtk.pdf: gtk.texi
pdftex $<
- pdftex $<
\ No newline at end of file
+ pdftex $<
* drag-context::
* drawable::
* gdk-colormap::
+* gdk-image::
* gdk-window::
* graphics-context::
* keymap::
@end itemize
+@node gdk-image
+@section gdk-image
+@Class gdk-image
+Superclass: @ref{g-object}
+
+Slots:
+@itemize
+@end itemize
+
+
+Signals:
+@itemize
+@end itemize
@node gdk-window
@node Closures
@chapter Closures
+@menu
+* create-signal-handler-closure::
+* Object-bound foreign functions::
+@end menu
Closure are anonymous functions that capture their lexical environment.
-GObject supports using closures (as instances of type GClosure) as signal handlers and in some other places where a function is expected. Function @code{create-g-closure} create closure from lisp function. The GClosure is finalized automatically when GObject no longer needs it (e.g., when GClosure is disconnected from signal).
+GObject supports using closures (as instances of type GClosure) as signal handlers and in some other places where a function is expected. Function @code{create-signal-handler-closure} create closure from lisp function that can be used a signal handler. The GClosure is finalized automatically when GObject no longer needs it (e.g., when GClosure is disconnected from signal).
-@section create-g-closure
-@Function create-g-closure
+(TODO: GObject defines finer closure API: g_closure_ref, g_closure_unref, g_closure_invoke. It should be bound.)
+
+@node create-signal-handler-closure
+@section create-signal-handler-closure
+@Function create-signal-handler-closure
@lisp
-(create-g-closure fn) @result{} closure
+(create-signal-handler-closure object fn) @result{} closure
@end lisp
@table @var
+@item @var{object}
+An object for which the closure is created
@item @var{fn}
A function that will be called by closure invokation
@item @var{closure}
Example:
@lisp
-(create-g-closure (lambda (x) (+ x 10)))
+(create-signal-handler-closure obj (lambda (x) (+ x 10)))
@result{}
#.(SB-SYS:INT-SAP #X006D7B20)
@end lisp
(defun connect-signal (object signal handler &key after)
(g-signal-connect-closure (ensure-object-pointer object)
signal
- (create-g-closure handler)
+ (create-signal-handler-closure object handler)
after))
@end lisp
-(TODO: GObject defines finer closure API: g_closure_ref, g_closure_unref, g_closure_invoke. It should be bound.)
+@node Object-bound foreign functions
+@section Object-bound foreign functions
+
+A common idiom for Gtk+ for passing user-defined function is as follows. Callback function has (besides its 'useful' arguments) an additional argument at the end - the 'data' pointer. This 'data' pointer, along with the pointer to 'destroy-notify' function is specified when passing the function. Destroy-notify function allows to free the function object (the Lisp closure) when it is not used by an object.
+
+@RMacro define-cb-methods
+@lisp
+(define-cb-methods name return-type ((arg-1 type-1) ... (arg-n type-n)))
+@end lisp
+
+Defines two CFFI callbacks assosiated with the callback function type @var{name}. Creates @var{name}-cb - a callback to be passed as an function and create @var{name}-destroy-notify - a callback to be passed as 'destroy-notify' function. These callbacks are intended to work together with @ref{create-fn-ref}.
+
+Arguments and return-type are the same as CFFI arguments and return-type for callbacks. Arguments do not include the last 'data' pointer.
+
+@RFunction create-fn-ref
+@lisp
+(create-fn-ref object function) @result{} foreign-pointer
+@end lisp
+
+This function creates a foreign structure containing the data neccesary for callbacks defined by @ref{define-cb-methods} to call and dispose of the @var{function}. The @var{function} is bound to the @var{object}. This is neccesary for correct work of garbage collector. The created structure is freed by 'destroy-notify' function.
+
+Example:
+@lisp
+(defcfun gtk-assistant-set-forward-page-func :void
+ (assistant (g-object assistant))
+ (page-func :pointer)
+ (data :pointer)
+ (destroy-notify :pointer))
+
+(define-cb-methods assistant-page-func :int ((current-page :int)))
+
+(defun set-assistant-forward-page-function (assistant function)
+ (if function
+ (gtk-assistant-set-forward-page-func assistant
+ (callback assistant-page-func-cb)
+ (create-fn-ref assistant function)
+ (callback assistant-page-func-destroy-notify))
+ (gtk-assistant-set-forward-page-func assistant (null-pointer) (null-pointer) (null-pointer))))
+@end lisp
@node GObject low-level
@chapter GObject low-level
An accessor that accesses the foreign pointer to object.
+@Function release
+@lisp
+(release object)
+@end lisp
+
+Releases the @var{object} by dropping the reference from it in advance before GC reclaims it. Use this function as an optimization measure when you know that some object will not be needed. All access to the object's properties will be invalid after this function is called.
+
+@Macro using
+@lisp
+(using (object expr) &body body)
+@end lisp
+
+Evaluates and returns the result of evaluation of the @var{body} with @var{object} being bound to the result of evaluating @var{expr}. Ensures that @code{release} is called on @var{object} after the @var{body} is evaluated.
+
+@Macro using
+@lisp
+(using ((var1 expr1) (var2 expr2) ... (varn exprn)) &body body)
+@end lisp
+
+Evaluates and returns the result of evaluation of the @var{body} with @var{var}s being bound to the results of evaluating @var{expr}s. Ensures that @code{release} is called on every @var{var} after the @var{body} is evaluated.
+
@node g-initially-unowned
@section g-initially-unowned
@node Signals
@section Signals
-To connect handler to a signal, @code{connect-signal} function is used.
+To connect handler to a signal, @code{connect-signal} function is used. Function @code{disconnect-signal} removes the connected signal.
-@Function connect-signals
+@Function connect-signal
@lisp
-(connect-signal object signal handler &key after)
+(connect-signal object signal handler &key after) @result{} handler-id
@end lisp
@table @var
A function
@item @var{after}
A boolean specifying whether the handler should be called after the default handler
+@item @var{handler-id}
+An integer - identifier of signal handler; can be used to disconnect the signal handler with @code{disconnect-signal}
@end table
Connects the @code{handler} to signal @code{signal} on object @code{object}. Signature of @code{handler} should comply with signature of a signal. @code{handler} will be called with arguments of type specified by signal with the object (on which the signal was emitted) prepended to them and it should return the value of the signal's return type.
+@Function disconnect-signal
+@lisp
+(disconnect-signal object handler-id)
+@end lisp
+
+Disconnects the signal handler identified by @var{handler-id} from the corresponding signal for @var{object}. @var{handler-id} is the integer identifying the signal handler; @code{connect-signal} returns handler identifiers.
+
Example:
@lisp
(defvar *d* (make-instance 'gtk:dialog))
Function @code{emit-signal} is used to emit signals on objects.
+@RFunction emit-signal
@code{(emit-signal object signal-name &rest args) @result{} return-value}
@table @var
@end defun
@end macro
+@macro RFunction {name}
+@anchor{\name\}@defun \name\
+@end defun
+@end macro
+
@macro Macro {args}
@defmac \args\
@end defmac
@end macro
+@macro RMacro {args}
+@anchor{\args\}@defmac \args\
+@end defmac
+@end macro
+
@macro Struct {args}
@deftp {Structure} \args\
@end deftp
* delete-type::
* direction-type::
* drag-result::
+* entry-icon-position::
* expander-style::
* file-chooser-action::
* file-chooser-confirmation::
* window-position::
* window-type::
* wrap-mode::
+* pango-wrap-mode::
+* pango-ellipsize-mode::
@end menu
@node anchor-type
@item @anchor{enum.drag-result.user-cancelled}:user-cancelled
@end itemize
+@node entry-icon-position
+@section entry-icon-position
+@Enum entry-icon-position
+Values:
+@itemize
+@item @anchor{enum.entry-icon-position.primary}:primary
+@item @anchor{enum.entry-icon-position.secondary}:secondary
+@end itemize
@node expander-style
@section expander-style
@end itemize
+@node pango-wrap-mode
+@section pango-wrap-mode
+@Enum pango-wrap-mode
+Values:
+@itemize
+@item @anchor{enum.pango-wrap-mode.char}:char
+@item @anchor{enum.pango-wrap-mode.word}:word
+@item @anchor{enum.pango-wrap-mode.word-char}:word-char
+@end itemize
+
+@node pango-ellipsize-mode
+@section pango-ellipsize-mode
+@Enum pango-ellipsize-mode
+Values:
+@itemize
+@item @anchor{enum.pango-ellipsize-mode.end}:end
+@item @anchor{enum.pango-ellipsize-mode.middle}:middle
+@item @anchor{enum.pango-ellipsize-mode.none}:none
+@item @anchor{enum.pango-ellipsize-mode.start}:start
+@end itemize
@ref{entry-completion} is an auxiliary object to be used in conjunction with @ref{entry} to provide the completion functionality. It implements the @ref{cell-layout} interface, to allow the user to add extra cells to the @ref{tree-view} with completion matches.
-"Completion functionality" means that when the user modifies the text in the entry, @ref{entry-completion} checks which rows in the model match the current content of the entry, and displays a list of matches. By default, the matching is done by comparing the entry text case-insensitively against the text column of the model (see @SlotRef{entry-completion,text-column}), but this can be overridden with a custom match function (see gtk_entry_completion_set_match_func()).
+"Completion functionality" means that when the user modifies the text in the entry, @ref{entry-completion} checks which rows in the model match the current content of the entry, and displays a list of matches. By default, the matching is done by comparing the entry text case-insensitively against the text column of the model (see @SlotRef{entry-completion,text-column}), but this can be overridden with a custom match function (see @SlotRef{entry-completion,match-function}).
When the user selects a completion, the content of the entry is updated. By default, the content of the entry is replaced by the text column of the model, but this can be overridden by connecting to the @SignalRef{entry-completion,match-selected} signal and updating the entry in the signal handler. Note that you should return TRUE from the signal handler to suppress the default behaviour.
Slots:
@itemize
+@item @anchor{slot.entry-completion.entry}entry. Type: @ref{entry}. Accessor: @anchor{fn.entry-completion-entry}@code{entry-completion-entry}. Read-only.
+
+The entry completion has been attached to.
@item @anchor{slot.entry-completion.inline-completion}inline-completion. Type: @code{boolean}. Accessor: @anchor{fn.entry-completion-inline-completion}@code{entry-completion-inline-completion}.
Determines whether the common prefix of the possible completions should be inserted automatically in the entry. Note that this requires text-column to be set, even if you are using a custom match function.
Determines whether the possible completions on the popup will appear in the entry as you navigate through them.
Default value: FALSE
+@item @anchor{slot.entry-completion.match-function}match-function. Type: function. Accessor: @anchor{fn.entry-completion-match-function}@code{entry-completion-match-function}. Write-only.
+
+Sets the match function for completion. The match function is used to determine if a row should or should not be in the completion list.
+
+The match function has the following signature: (completion @ref{entry-completion}), (key @code{string}), (tree-iter @ref{tree-iter}) @result should-be-displayed-p. This function which decides whether the row indicated by @var{tree-iter} matches a given @var{key}, and should be displayed as a possible completion for @var{key}. Note that key is normalized and case-folded (see g_utf8_normalize() and g_utf8_casefold()). If this is not appropriate, match functions have access to the unmodified key via @SlotRef{entry,text} of @SlotRef{entry-completion,entry}.
@item @anchor{slot.entry-completion.minimum-key-length}minimum-key-length. Type: @code{integer}. Accessor: @anchor{fn.entry-completion-minimum-key-length}@code{entry-completion-minimum-key-length}.
Minimum length of the search key in order to look up matches.
Gets emitted when a match from the list is selected. The default behaviour is to replace the contents of the entry with the contents of the text column in the row pointed to by iter.
@end itemize
+@RMethod entry-completion-complete
+@lisp
+(entry-completion-complete completion)
+@end lisp
+
+Requests a completion operation, or in other words a refiltering of the current list with completions, using the current key. The completion list view will be updated accordingly.
+@RMethod entry-completion-completion-prefix
+@lisp
+(entry-completion-completion-prefix completion) @result{} string
+@end lisp
+
+Get the original text entered by the user that triggered the completion or NULL if there's no completion ongoing.
+
+@RMethod entry-completion-insert-prefix
+@lisp
+(entry-completion-insert-prefix completion)
+@end lisp
+
+Requests a prefix insertion.
+
+@RMethod entry-completion-insert-action-text
+@lisp
+(entry-completion-insert-action-text completion index text)
+@end lisp
+
+Inserts an action in completion's action item list at position @var{index} with text @var{text}. If you want the action item to have markup, use @ref{entry-completion-insert-action-markup}.
+
+@RMethod entry-completion-insert-action-markup
+@lisp
+(entry-completion-insert-action-markup completion index markup)
+@end lisp
+
+Inserts an action in completion's action item list at position @var{index} with markup @var{markup}.
+
+@RMethod entry-completion-delete-action
+@lisp
+(entry-completion-delete-action completion index)
+@end lisp
+
+Deletes the action at @var{index} from completion's action list.
@node file-filter
@Class status-icon
Superclass: @ref{g-object}
+The "system tray" or notification area is normally used for transient icons that indicate some special state. For example, a system tray icon might appear to tell the user that they have new mail, or have an incoming instant message, or something along those lines. The basic idea is that creating an icon in the notification area is less annoying than popping up a dialog.
+
+A @ref{status-icon} object can be used to display an icon in a "system tray". The icon can have a tooltip, and the user can interact with it by activating it or popping up a context menu. Critical information should not solely be displayed in a @ref{status-icon}, since it may not be visible (e.g. when the user doesn't have a notification area on his panel). This can be checked with @SlotRef{status-icon,embedded}.
+
+On X11, the implementation follows the freedesktop.org "System Tray" specification. Implementations of the "tray" side of this specification can be found e.g. in the GNOME and KDE panel applications.
+
+Note that a @ref{status-icon} is not a @ref{widget}, but just a @ref{g-object}. Making it a widget would be impractical, since the system tray on Win32 doesn't allow to embed arbitrary widgets.
+
Slots:
@itemize
@item @anchor{slot.status-icon.blinking}blinking. Type: @code{boolean}. Accessor: @anchor{fn.status-icon-blinking}@code{status-icon-blinking}.
+
+Whether or not the status icon is blinking.
+
+Default value: FALSE
@item @anchor{slot.status-icon.embedded}embedded. Type: @code{boolean}. Accessor: @anchor{fn.status-icon-embedded}@code{status-icon-embedded}. Read-only.
+
+TRUE if the statusicon is embedded in a notification area.
+
+Default value: FALSE
@item @anchor{slot.status-icon.file}file. Type: @code{string}. Accessor: @anchor{fn.status-icon-file}@code{status-icon-file}. Write-only.
+
+Filename to load and display.
@item @anchor{slot.status-icon.gicon}gicon. Type: @code{GIcon}. Accessor: @anchor{fn.status-icon-gicon}@code{status-icon-gicon}.
+
+The GIcon displayed in the GtkStatusIcon. For themed icons, the image will be updated automatically if the theme changes.
@item @anchor{slot.status-icon.has-tooltip}has-tooltip. Type: @code{boolean}. Accessor: @anchor{fn.status-icon-has-tooltip}@code{status-icon-has-tooltip}.
+
+Enables or disables the emission of @SignalRef{status-icon,query-tooltip}. A value of TRUE indicates that status icon can have a tooltip, in this case the status icon will be queried using @SignalRef{status-icon,query-tooltip} to determine whether it will provide a tooltip or not.
+
+Note that setting this property to TRUE for the first time will change the event masks of the windows of this status icon to include leave-notify and motion-notify events. This will not be undone when the property is set to FALSE again.
+
+Whether this property is respected is platform dependent. For plain text tooltips, use @SlotRef{status-icon,tooltip-text} in preference.
+
+Default value: FALSE
@item @anchor{slot.status-icon.icon-name}icon-name. Type: @code{string}. Accessor: @anchor{fn.status-icon-icon-name}@code{status-icon-icon-name}.
+
+The name of the icon from the icon theme.
@item @anchor{slot.status-icon.orientation}orientation. Type: @ref{orientation}. Accessor: @anchor{fn.status-icon-orientation}@code{status-icon-orientation}. Read-only.
+
+The orientation of the tray in which the statusicon is embedded.
@item @anchor{slot.status-icon.pixbuf}pixbuf. Type: @ref{pixbuf}. Accessor: @anchor{fn.status-icon-pixbuf}@code{status-icon-pixbuf}.
+
+
+A @ref{pixbuf} to display.
@item @anchor{slot.status-icon.screen}screen. Type: @ref{screen}. Accessor: @anchor{fn.status-icon-screen}@code{status-icon-screen}.
+
+The screen where this status icon will be displayed.
@item @anchor{slot.status-icon.size}size. Type: @code{integer}. Accessor: @anchor{fn.status-icon-size}@code{status-icon-size}. Read-only.
+
+The size of the icon.
+
+Allowed values: >= 0
+
+Default value: 0
@item @anchor{slot.status-icon.stock}stock. Type: @code{string}. Accessor: @anchor{fn.status-icon-stock}@code{status-icon-stock}.
+
+Stock ID for a stock image to display.
+
+Default value: NULL
@item @anchor{slot.status-icon.storage-type}storage-type. Type: @ref{image-type}. Accessor: @anchor{fn.status-icon-storage-type}@code{status-icon-storage-type}. Read-only.
+
+The representation being used for image data.
@item @anchor{slot.status-icon.tooltip-markup}tooltip-markup. Type: @code{string}. Accessor: @anchor{fn.status-icon-tooltip-markup}@code{status-icon-tooltip-markup}.
+
+Sets the text of tooltip to be the given string, which is marked up with the Pango text markup language.
+
+This is a convenience property which will take care of getting the tooltip shown if the given string is not NULL. @SlotRef{status-icon,has-tooltip} will automatically be set to TRUE and the default handler for the @SignalRef{status-icon,query-tooltip} signal will take care of displaying the tooltip.
+
+On some platforms, embedded markup will be ignored.
+
+Default value: NULL
@item @anchor{slot.status-icon.tooltip-text}tooltip-text. Type: @code{string}. Accessor: @anchor{fn.status-icon-tooltip-text}@code{status-icon-tooltip-text}.
+
+Sets the text of tooltip to be the given string.
+
+This is a convenience property which will take care of getting the tooltip shown if the given string is not NULL. @SlotRef{status-icon,has-tooltip} will automatically be set to TRUE and the default handler for the @SignalRef{status-icon,query-tooltip} signal will take care of displaying the tooltip.
+
+Default value: NULL
@item @anchor{slot.status-icon.visible}visible. Type: @code{boolean}. Accessor: @anchor{fn.status-icon-visible}@code{status-icon-visible}.
+
+Whether or not the status icon is visible.
+
+Default value: TRUE
@end itemize
Signals:
@itemize
@item @anchor{signal.status-icon.activate}"activate". Signature: (instance @ref{status-icon}) @result{} void. Options: run-first, action.
-@item @anchor{signal.status-icon.button-press-event}"button-press-event". Signature: (instance @ref{status-icon}), (arg-1 @ref{event}) @result{} @code{boolean}. Options: run-last.
-@item @anchor{signal.status-icon.button-release-event}"button-release-event". Signature: (instance @ref{status-icon}), (arg-1 @ref{event}) @result{} @code{boolean}. Options: run-last.
-@item @anchor{signal.status-icon.popup-menu}"popup-menu". Signature: (instance @ref{status-icon}), (arg-1 @code{integer}), (arg-2 @code{integer}) @result{} void. Options: run-first, action.
-@item @anchor{signal.status-icon.query-tooltip}"query-tooltip". Signature: (instance @ref{status-icon}), (arg-1 @code{integer}), (arg-2 @code{integer}), (arg-3 @code{boolean}), (arg-4 @ref{tooltip}) @result{} @code{boolean}. Options: run-last.
-@item @anchor{signal.status-icon.scroll-event}"scroll-event". Signature: (instance @ref{status-icon}), (arg-1 @ref{event}) @result{} @code{boolean}. Options: run-last.
-@item @anchor{signal.status-icon.size-changed}"size-changed". Signature: (instance @ref{status-icon}), (arg-1 @code{integer}) @result{} @code{boolean}. Options: run-last.
-@end itemize
+Gets emitted when the user activates the status icon. If and how status icons can activated is platform-dependent.
+
+Unlike most G_SIGNAL_ACTION signals, this signal is meant to be used by applications and should be wrapped by language bindings.
+@item @anchor{signal.status-icon.button-press-event}"button-press-event". Signature: (instance @ref{status-icon}), (event @ref{event-button}) @result{} @code{boolean}. Options: run-last.
+
+This signal will be emitted when a button (typically from a mouse) is pressed.
+
+Whether this event is emitted is platform-dependent. Use the @SignalRef{status-icon,activate} and @SignalRef{status-icon,popup-menu} signals in preference.
+@item @anchor{signal.status-icon.button-release-event}"button-release-event". Signature: (instance @ref{status-icon}), (event @ref{event-button}) @result{} @code{boolean}. Options: run-last.
+
+This signal will be emitted when a button (typically from a mouse) is released.
+
+Whether this event is emitted is platform-dependent. Use the @SignalRef{status-icon,activate} and @SignalRef{status-icon,popup-menu} signals in preference.
+@item @anchor{signal.status-icon.popup-menu}"popup-menu". Signature: (instance @ref{status-icon}), (button @code{integer}), (activate-time @code{integer}) @result{} void. Options: run-first, action.
+
+Gets emitted when the user brings up the context menu of the status icon. Whether status icons can have context menus and how these are activated is platform-dependent.
+
+The button and activate-time parameters should be passed as the last to arguments to gtk_menu_popup().
+
+Unlike most G_SIGNAL_ACTION signals, this signal is meant to be used by applications and should be wrapped by language bindings.
+@item @anchor{signal.status-icon.query-tooltip}"query-tooltip". Signature: (instance @ref{status-icon}), (x @code{integer}), (y @code{integer}), (keyboard-mode @code{boolean}), (tooltip @ref{tooltip}) @result{} @code{boolean}. Options: run-last.
+
+Emitted when the "gtk-tooltip-timeout" has expired with the cursor hovering above status_icon; or emitted when status_icon got focus in keyboard mode.
+
+Using the given coordinates, the signal handler should determine whether a tooltip should be shown for status-icon. If this is the case TRUE should be returned, FALSE otherwise. Note that if keyboard-mode is TRUE, the values of x and y are undefined and should not be used.
+
+The signal handler is free to manipulate @var{tooltip} with the therefore destined function calls.
+
+Whether this signal is emitted is platform-dependent. For plain text tooltips, use @SlotRef{status-icon,tooltip-text} in preference.
+
+@var{x}, @var{y}: the x and y coordinates of the cursor position where the request has been emitted, relative to status-icon
+
+@var{keyboard-mode}: TRUE if the tooltip was trigged using the keyboard
+@item @anchor{signal.status-icon.scroll-event}"scroll-event". Signature: (instance @ref{status-icon}), (event @ref{event-scroll}) @result{} @code{boolean}. Options: run-last.
+
+This signal is emitted when a button in the 4 to 7 range is pressed. Wheel mice are usually configured to generate button press events for buttons 4 and 5 when the wheel is turned.
+
+Whether this event is emitted is platform-dependent.
+@item @anchor{signal.status-icon.size-changed}"size-changed". Signature: (instance @ref{status-icon}), (size @code{integer}) @result{} @code{boolean}. Options: run-last.
+
+Gets emitted when the size available for the image changes, e.g. because the notification area got resized.
+
+Returns TRUE if the icon was updated for the new size. Otherwise, GTK+ will scale the icon as necessary.
+@end itemize
+TODO: gtk_status_icon_position_menu, gtk_status_icon_get_x11_window_id
@node style
@end macro
@macro EnumVRef {name,value}
-@ref{enum.\name\.\value\,\value\}
+@ref{enum.\name\.\value\,@code{:\value\}}
@end macro
@macro Flags {name}
@end macro
@macro FlagsVRef {name,value}
-@ref{flags.\name\.\value\,\value\}
+@ref{flags.\name\.\value\,@code{:\value\}}
@end macro
@macro Accessor {name}
@Class about-dialog
Superclass: @ref{dialog} @ref{atk-implementor-iface} @ref{buildable}
+The @ref{about-dialog} offers a simple way to display information about a program like its logo, name, copyright, website and license. It is also possible to give credits to the authors, documenters, translators and artists who have worked on the program. An about dialog is typically opened when the user selects the About option from the Help menu. All parts of the dialog are optional.
+
+About dialog often contain links and email addresses. @ref{about-dialog} supports this by offering global hooks (TODO: not implemented in cl-gtk2), which are called when the user clicks on a link or email address, see gtk_about_dialog_set_email_hook() and gtk_about_dialog_set_url_hook(). Email addresses in the authors, documenters and artists properties are recognized by looking for @code{<user@@host>}, URLs are recognized by looking for @code{http://url}, with url extending to the next space, tab or line break.
+
+When setting the website and email hooks for the @ref{about-dialog} widget, you should remember that the order is important: you should set the hook functions before setting the website and email URL properties. Otherwise the @ref{about-dialog} widget will not display the website and the email addresses as clickable.
+
+Note that GTK+ sets a default title of @code{_("About %s")} on the dialog window (where @code{%s} is replaced by the name of the application, but in order to ensure proper translation of the title, applications should set the title property explicitly when constructing a @ref{about-dialog}, as shown in the following example:
+
+@lisp
+(make-instance 'gtk:about-dialog :program-name "ExampleCode" :title "About ExampleCode")
+@end lisp
+
+
Slots:
@itemize
-@item @anchor{slot.about-dialog.artists}artists. Type: @code{GStrv}. Accessor: @anchor{fn.about-dialog-artists}@code{about-dialog-artists}.
-@item @anchor{slot.about-dialog.authors}authors. Type: @code{GStrv}. Accessor: @anchor{fn.about-dialog-authors}@code{about-dialog-authors}.
+@item @anchor{slot.about-dialog.artists}artists. Type: list of @code{string}. Accessor: @anchor{fn.about-dialog-artists}@code{about-dialog-artists}.
+
+The people who contributed artwork to the program, as a list of strings. Each string may contain email addresses and URLs, which will be displayed as links, see the description for more details.
+@item @anchor{slot.about-dialog.authors}authors. Type: list of @code{string}. Accessor: @anchor{fn.about-dialog-authors}@code{about-dialog-authors}.
+
+The authors of the program, as a list of strings. Each string may contain email addresses and URLs, which will be displayed as links, see the introduction for more details.
@item @anchor{slot.about-dialog.comments}comments. Type: @code{string}. Accessor: @anchor{fn.about-dialog-comments}@code{about-dialog-comments}.
+
+Comments about the program. This string is displayed in a label in the main dialog, thus it should be a short explanation of the main purpose of the program, not a detailed list of features.
+
+Default value: NIL
@item @anchor{slot.about-dialog.copyright}copyright. Type: @code{string}. Accessor: @anchor{fn.about-dialog-copyright}@code{about-dialog-copyright}.
-@item @anchor{slot.about-dialog.documenters}documenters. Type: @code{GStrv}. Accessor: @anchor{fn.about-dialog-documenters}@code{about-dialog-documenters}.
+
+Copyright information for the program.
+
+Default value: NIL
+@item @anchor{slot.about-dialog.documenters}documenters. Type: list of @code{string}. Accessor: @anchor{fn.about-dialog-documenters}@code{about-dialog-documenters}.
+
+The people documenting the program, as a list of strings. Each string may contain email addresses and URLs, which will be displayed as links, see the introduction for more details.
@item @anchor{slot.about-dialog.license}license. Type: @code{string}. Accessor: @anchor{fn.about-dialog-license}@code{about-dialog-license}.
+
+The license of the program. This string is displayed in a text view in a secondary dialog, therefore it is fine to use a long multi-paragraph text. Note that the text is only wrapped in the text view if the @SlotRef{about-dialog,wrap-license} property is set to True; otherwise the text itself must contain the intended linebreaks.
+
+Default value: NIL
@item @anchor{slot.about-dialog.logo}logo. Type: @ref{pixbuf}. Accessor: @anchor{fn.about-dialog-logo}@code{about-dialog-logo}.
+
+A logo for the about box. If this is not set, it defaults to gtk_window_get_default_icon_list().
@item @anchor{slot.about-dialog.logo-icon-name}logo-icon-name. Type: @code{string}. Accessor: @anchor{fn.about-dialog-logo-icon-name}@code{about-dialog-logo-icon-name}.
+
+A named icon to use as the logo for the about box. This property overrides the @SlotRef{about-dialog,logo} property.
+
+Default value: NIL
@item @anchor{slot.about-dialog.program-name}program-name. Type: @code{string}. Accessor: @anchor{fn.about-dialog-program-name}@code{about-dialog-program-name}.
+
+The name of the program. If this is not set, it defaults to g_get_application_name().
+
+Default value: NIL
@item @anchor{slot.about-dialog.translator-credits}translator-credits. Type: @code{string}. Accessor: @anchor{fn.about-dialog-translator-credits}@code{about-dialog-translator-credits}.
+
+Credits to the translators. This string should be marked as translatable. The string may contain email addresses and URLs, which will be displayed as links, see the introduction for more details.
+
+Default value: NIL
@item @anchor{slot.about-dialog.version}version. Type: @code{string}. Accessor: @anchor{fn.about-dialog-version}@code{about-dialog-version}.
+
+The version of the program.
+
+Default value: NIL
@item @anchor{slot.about-dialog.website}website. Type: @code{string}. Accessor: @anchor{fn.about-dialog-website}@code{about-dialog-website}.
+
+The URL for the link to the website of the program. This should be a string starting with "http://.
+
+Default value: NIL
@item @anchor{slot.about-dialog.website-label}website-label. Type: @code{string}. Accessor: @anchor{fn.about-dialog-website-label}@code{about-dialog-website-label}.
+
+The label for the link to the website of the program. If this is not set, it defaults to the URL specified in the website property.
+
+Default value: NIL
@item @anchor{slot.about-dialog.wrap-license}wrap-license. Type: @code{boolean}. Accessor: @anchor{fn.about-dialog-wrap-license}@code{about-dialog-wrap-license}.
-@end itemize
+Whether to wrap the text in the license dialog.
+
+Default value: False
+@end itemize
Signals:
@itemize
@Class accel-label
Superclass: @ref{label} @ref{atk-implementor-iface} @ref{buildable}
+The @ref{accel-label} widget is a subclass of @ref{label} that also displays an accelerator key on the right of the label text, e.g. 'Ctl+S'. It is commonly used in menus to show the keyboard short-cuts for commands.
+
+The accelerator key to display is not set explicitly. Instead, the @ref{accel-label} displays the accelerators which have been added to a particular widget. This widget is set by @SlotRef{accel-label,accel-widget}.
+
+For example, a @ref{menu-item} widget may have an accelerator added to emit the @SignalRef{menu-item,activate} signal when the 'Ctl+S' key combination is pressed. A @ref{accel-label} is created and added to the @ref{accel-label}, and @SlotRef{accel-label,accel-widget} is set to the @ref{menu-item} as the second argument. The @ref{accel-label} will now display 'Ctl+S' after its label.
+
+@c Note that creating a @ref{menu-item} with gtk_menu_item_new_with_label() (or one of the similar functions for GtkCheckMenuItem and GtkRadioMenuItem) automatically adds a GtkAccelLabel to the GtkMenuItem and calls gtk_accel_label_set_accel_widget() to set it up for you.
+
+A @ref{accel-label} will only display accelerators which have @FlagsVRef{accel-flags,visible} set. A@ref{accel-label} can display multiple accelerators and even signal names, though it is almost always used to display just one accelerator key.
+
Slots:
@itemize
@item @anchor{slot.accel-label.accel-closure}accel-closure. Type: @code{GClosure}. Accessor: @anchor{fn.accel-label-accel-closure}@code{accel-label-accel-closure}.
+
+The closure to be monitored for accelerator changes.
+
+TODO: GClosure type mapping is not supported
@item @anchor{slot.accel-label.accel-widget}accel-widget. Type: @ref{widget}. Accessor: @anchor{fn.accel-label-accel-widget}@code{accel-label-accel-widget}.
+
+The widget to be monitored for accelerator changes.
@end itemize
@Class assistant
Superclass: @ref{gtk-window} @ref{atk-implementor-iface} @ref{buildable}
+A @ref{assistant} is a widget used to represent a generally complex operation splitted in several steps, guiding the user through its pages and controlling the page flow to collect the necessary data.
+
Slots:
@itemize
+@item @anchor{slot.assistant.current-page}current-page. Type: @code{integer}. Accessor: @anchor{fn.assistant-current-page}@code{assistant-current-page}.
+
+The index (starting from 0) of the current page in the assistant, or -1 if the assistant has no pages.
+@item @anchor{slot.assistant.forward-page-function}forward-page-function. function. Accessor: @anchor{fn.assistant-forward-page-function}@code{assistant-forward-page-function}. Write-only.
+
+Page forwarding function is used to determine what will be the next page when the user presses the forward button. Setting this to NIL will make the assistant to use the default forward function, which just goes to the next visible page.
+The function called both for computing the next page when the user presses the "forward" button and for handling the behavior of the "last" button. The function accepts a single integer - the current page number and returns the page number for the next page.
+@item @anchor{slot.assistant.n-pages}n-pages. Type: @code{integer}. Accessor: @anchor{fn.assistant-n-pages}@code{assistant-n-pages}. Read-only.
+
+The number of pages in the assistant
@end itemize
Signals:
@itemize
@item @anchor{signal.assistant.apply}"apply". Signature: (instance @ref{assistant}) @result{} void. Options: run-last.
+
+This signal is emitted when the apply button is clicked. The default behavior of the @ref{assistant} is to switch to the page after the current page, unless the current page is the last one.
+
+A handler for the @SignalRef{assistant,apply} signal should carry out the actions for which the wizard has collected data. If the action takes a long time to complete, you might consider to put a page of type @EnumVRef{assistant-page-type,progress} after the confirmation page and handle this operation within the @SignalRef{assistant,prepare} signal of the progress page.
@item @anchor{signal.assistant.cancel}"cancel". Signature: (instance @ref{assistant}) @result{} void. Options: run-last.
+
+This signal is emitted when then the cancel button is clicked.
@item @anchor{signal.assistant.close}"close". Signature: (instance @ref{assistant}) @result{} void. Options: run-last.
-@item @anchor{signal.assistant.prepare}"prepare". Signature: (instance @ref{assistant}), (arg-1 @ref{widget}) @result{} void. Options: run-last.
+
+This signal is emitted either when the close button of a summary page is clicked, or when the apply button in the last page in the flow (of type @EnumVRef{assistant-page-type,confirm}) is clicked.
+@item @anchor{signal.assistant.prepare}"prepare". Signature: (instance @ref{assistant}), (page @ref{widget}) @result{} void. Options: run-last.
+
+This signal is emitted when a new page is set as the assistant's current page, before making the new page visible. A handler for this signal can do any preparation which are necessary before showing page.
@end itemize
+@RMethod assistant-nth-page
+@lisp
+(assistant-nth-page assistant page-number) @result{} page-widget
+@end lisp
+
+Returns the child widget (a @ref{widget}) contained in page number @var{page-number} (an integer).
+
+@RMethod assistant-append-page
+@lisp
+(assistant-append-page assistant page)
+@end lisp
+
+Appends a @var{page} (a @ref{widget}) to the @var{assistant} (a @ref{assistant}).
+
+@RMethod assistant-prepend-page
+@lisp
+(assistant-prepend-page assistant page)
+@end lisp
+
+Prepends a @var{page} (a @ref{widget}) to the @var{assistant} (a @ref{assistant}).
+@RMethod assistant-insert-page
+@lisp
+(assistant-insert-page assistant page position) @result{} page-number
+@end lisp
+
+Inserts a @var{page} (a @ref{widget}) in the @var{assistant} (a @ref{assistant}) at a given @var{position}. @var{position} is the index (starting at 0) at which to insert the page, or -1 to append the page. Returns the index of inserted @var{page}.
+
+@RMethod assistant-add-action-widget
+@lisp
+(assistant-add-action-widget assistant widget)
+@end lisp
+
+Adds the @var{widget} (a @ref{widget}) to the action area of a @var{assistant} (a @ref{assistant}).
+
+@RMethod assistant-remove-action-widget
+@lisp
+(assistant-remove-action-widget assistant widget)
+@end lisp
+
+Removes the @var{widget} (a @ref{widget}) from the action area of a @var{assistant} (a @ref{assistant}).
+
+@RMethod assistant-update-buttons-state
+@lisp
+(assistant-update-buttons-state assistant)
+@end lisp
+Forces @var{assistant} (a @ref{assistant}) to recompute the buttons state.
+
+GTK+ automatically takes care of this in most situations, e.g. when the user goes to a different page, or when the visibility or completeness of a page changes.
+
+One situation where it can be necessary to call this function is when changing a value on the current page affects the future page flow of the assistant.
@node bin
@section bin
Subclasses: @ref{scale-button} @ref{link-button} @ref{font-button} @ref{color-button} @ref{toggle-button}
+The @ref{button} widget is generally used to attach a function to that is called when the button is pressed. The various signals and how to use them are outlined below.
+
+The @ref{button} widget can hold any valid child widget. That is it can hold most any other standard @ref{widget}. The most commonly used child is the @ref{label}.
+
Slots:
@itemize
@item @anchor{slot.button.focus-on-click}focus-on-click. Type: @code{boolean}. Accessor: @anchor{fn.button-focus-on-click}@code{button-focus-on-click}.
+
+Whether the button grabs focus when it is clicked with the mouse.
+
+Default value: True
@item @anchor{slot.button.image}image. Type: @ref{widget}. Accessor: @anchor{fn.button-image}@code{button-image}.
+
+Child widget to appear next to the button text.
@item @anchor{slot.button.image-position}image-position. Type: @ref{position-type}. Accessor: @anchor{fn.button-image-position}@code{button-image-position}.
+
+The position of the image relative to the text inside the button.
+
+Default value: @EnumVRef{position-type,left}
@item @anchor{slot.button.label}label. Type: @code{string}. Accessor: @anchor{fn.button-label}@code{button-label}.
+
+Text of the label widget inside the button, if the button contains a label widget.
+
+Default value: NIL
@item @anchor{slot.button.relief}relief. Type: @ref{relief-style}. Accessor: @anchor{fn.button-relief}@code{button-relief}.
+
+The border relief style.
+
+Default value: @EnumVRef{relief-style,normal}
@item @anchor{slot.button.use-stock}use-stock. Type: @code{boolean}. Accessor: @anchor{fn.button-use-stock}@code{button-use-stock}.
+
+If set, the label is used to pick a stock item instead of being displayed.
+
+Default value: False
@item @anchor{slot.button.use-underline}use-underline. Type: @code{boolean}. Accessor: @anchor{fn.button-use-underline}@code{button-use-underline}.
+
+If set, an underline in the text indicates the next character should be used for the mnemonic accelerator key.
+
+Default value: False
@item @anchor{slot.button.xalign}xalign. Type: @code{single-float}. Accessor: @anchor{fn.button-xalign}@code{button-xalign}.
+
+If the child of the button is a @ref{misc} or @ref{alignment}, this property can be used to control it's horizontal alignment. 0.0 is left aligned, 1.0 is right aligned.
+
+Allowed values: [0,1]
+
+Default value: 0.5
@item @anchor{slot.button.yalign}yalign. Type: @code{single-float}. Accessor: @anchor{fn.button-yalign}@code{button-yalign}.
+
+If the child of the button is a @ref{misc} or @ref{alignment}, this property can be used to control it's vertical alignment. 0.0 is left aligned, 1.0 is right aligned.
+
+Allowed values: [0,1]
+
+Default value: 0.5
@end itemize
Signals:
@itemize
@item @anchor{signal.button.activate}"activate". Signature: (instance @ref{button}) @result{} void. Options: run-first, action.
+
+This signal is an action signal and emitting it causes the button to animate press then release. Applications should never connect to this signal, but use the @SignalRef{button,clicked} signal.
@item @anchor{signal.button.clicked}"clicked". Signature: (instance @ref{button}) @result{} void. Options: run-first, action.
+
+Emitted when the button has been activated (pressed and released).
@item @anchor{signal.button.enter}"enter". Signature: (instance @ref{button}) @result{} void. Options: run-first.
+
+Emitted when the pointer enters the button.
@item @anchor{signal.button.leave}"leave". Signature: (instance @ref{button}) @result{} void. Options: run-first.
+
+Emitted when the pointer leaves the button.
@item @anchor{signal.button.pressed}"pressed". Signature: (instance @ref{button}) @result{} void. Options: run-first.
+
+Emitted when the button is pressed.
@item @anchor{signal.button.released}"released". Signature: (instance @ref{button}) @result{} void. Options: run-first.
+
+Emitted when the button is released.
@end itemize
Subclasses: @ref{radio-button}
+
+A @ref{check-button} places a discrete @ref{toggle-button} next to a widget, (usually a @ref{label}). See the @ref{toggle-button} for more information about toggle/check buttons.
+
+The important signal @SignalRef{toggle-button,toggled} is also inherited from @ref{toggle-button}.
+
Slots:
@itemize
@end itemize
Subclasses: @ref{spin-button}
+The @ref{entry} widget is a single line text entry widget. A fairly large set of key bindings are supported by default. If the entered text is longer than the allocation of the widget, the widget will scroll so that the cursor position is visible.
+
+When using an entry for passwords and other sensitive information, it can be put into "password mode" using @SlotRef{entry,visibility}. In this mode, entered text is displayed using a 'invisible' character. By default, GTK+ picks the best invisible character that is available in the current font, but it can be changed with @SlotRef{entry,invisible-char}. Since 2.16, GTK+ displays a warning when Caps Lock or input methods might interfere with entering text in a password entry. The warning can be turned off with the @SlotRef{entry,caps-lock-warning} property.
+
+Since 2.16, @ref{entry} has the ability to display progress or activity information behind the text. To make an entry display such information, use @SlotRef{entry,progress-fraction} or @SlotRef{entry,progress-pulse-step},
+
+Additionally, @ref{entry} can show icons at either side of the entry. These icons can be activatable by clicking, can be set up as drag source and can have tooltips. To add an icon, use @SlotRef{entry,primary-icon-gicon} or one of the various other properties that set an icon from a stock id, an icon name or a pixbuf. To trigger an action when the user clicks an icon, connect to the @SignalRef{entry,icon-press} signal. To allow DND operations from an icon, use gtk_entry_set_icon_drag_source(). To set a tooltip on an icon, use @SlotRef{entry,primary-icon-tooltip-text} or @SlotRef{entry,primary-icon-tooltip-markup}. Secondary icon works the same way.
+
+Note that functionality or information that is only available by clicking on an icon in an entry may not be accessible at all to users which are not able to use a mouse or other pointing device. It is therefore recommended that any such functionality should also be available by other means, e.g. via the context menu of the entry.
+
+
Slots:
@itemize
@item @anchor{slot.entry.activates-default}activates-default. Type: @code{boolean}. Accessor: @anchor{fn.entry-activates-default}@code{entry-activates-default}.
+
+Whether to activate the default widget (such as the default button in a dialog) when Enter is pressed.
+
+Default value: False
@item @anchor{slot.entry.caps-lock-warning}caps-lock-warning. Type: @code{boolean}. Accessor: @anchor{fn.entry-caps-lock-warning}@code{entry-caps-lock-warning}.
+
+Whether password entries will show a warning when Caps Lock is on.
+
+Note that the warning is shown using a secondary icon, and thus does not work if you are using the secondary icon position for some other purpose.
+
+Default value: True
+@item @anchor{slot.entry.completion}completion. Type: @ref{entry-completion}. Accessor: @anchor{fn.entry-completion}@code{entry-completion}.
+
+The current position of the insertion cursor in chars.
+
+Allowed values: [0,65535]
+
+Default value: 0
+@item @anchor{slot.entry.cursor-hadjustment}cursor-hadjustment. Type: @ref{adjustment}. Accessor: @anchor{fn.entry-cursor-hadjustment}@code{entry-cursor-hadjustment}.
+
+The adjustment that is bound to the cursor position.
+
+The adjustment has to be in pixel units and in the same coordinate system as the entry.
@item @anchor{slot.entry.cursor-position}cursor-position. Type: @code{integer}. Accessor: @anchor{fn.entry-cursor-position}@code{entry-cursor-position}. Read-only.
+
+Whether the entry contents can be edited.
+
+Default value: True
@item @anchor{slot.entry.editable}editable. Type: @code{boolean}. Accessor: @anchor{fn.entry-editable}@code{entry-editable}.
+
+False removes outside bevel from entry.
+
+Default value: True
@item @anchor{slot.entry.has-frame}has-frame. Type: @code{boolean}. Accessor: @anchor{fn.entry-has-frame}@code{entry-has-frame}.
+
+False removes outside bevel from entry.
+
+Default value: True
@item @anchor{slot.entry.im-module}im-module. Type: @code{string}. Accessor: @anchor{fn.entry-im-module}@code{entry-im-module}.
+
+Which IM (input method) module should be used for this entry. See @ref{i-m-context}.
+
+Setting this to a non-NIL value overrides the system-wide IM module setting. See the @SlotRef{settings,gtk-im-module} property.
+
+Default value: NIL
@item @anchor{slot.entry.inner-border}inner-border. Type: @ref{border}. Accessor: @anchor{fn.entry-inner-border}@code{entry-inner-border}.
+
+Sets the text area's border between the text and the frame.
+
+Since 2.10
@item @anchor{slot.entry.invisible-char}invisible-char. Type: @code{integer}. Accessor: @anchor{fn.entry-invisible-char}@code{entry-invisible-char}.
+
+The character to use when masking entry contents (in "password mode").
+
+Default value: '*'
@item @anchor{slot.entry.invisible-char-set}invisible-char-set. Type: @code{boolean}. Accessor: @anchor{fn.entry-invisible-char-set}@code{entry-invisible-char-set}.
+
+Whether the invisible char has been set for the GtkEntry.
+
+Default value: False
+@item @anchor{slot.entry.layout}layout. Type: @code{PangoLayout}. Accessor: @anchor{fn.entry-layout}@code{entry-layout}. Read-only.
+
+The PangoLayout used to display the entry. The layout is useful to e.g. convert text positions to pixel positions, in combination with @SlotRef{entry,layout-offset}.
+
+Keep in mind that the layout text may contain a preedit string, so @ref{entry-layout-index-to-text-index} and @ref{entry-text-index-to-layout-index} are needed to convert byte indices in the layout to byte indices in the entry contents.
+@item @anchor{slot.entry.layout-offset}layout-offset. Type: list of @code{integer}. Accessor: @anchor{fn.entry-layout-offset}@code{entry-layout-offset}. Read-only.
+
+Obtains the position of the PangoLayout used to render text in the entry, in widget coordinates as the list of two integers - the x and y offsets. Useful if you want to line up the text in an entry with some other text, e.g. when using the entry to implement editable cells in a sheet widget.
+
+Also useful to convert mouse events into coordinates inside the PangoLayout, e.g. to take some action if some part of the entry text is clicked.
+
+Note that as the user scrolls around in the entry the offsets will change; you'll need to connect to the "notify::scroll-offset" signal to track this. Remember when using the PangoLayout functions you need to convert to and from pixels using PANGO_PIXELS() or PANGO_SCALE.
+
+Keep in mind that the layout text may contain a preedit string, so @ref{entry-layout-index-to-text-index} and @ref{entry-text-index-to-layout-index} are needed to convert byte indices in the layout to byte indices in the entry contents.
@item @anchor{slot.entry.max-length}max-length. Type: @code{integer}. Accessor: @anchor{fn.entry-max-length}@code{entry-max-length}.
+
+Maximum number of characters for this entry. Zero if no maximum.
+
+Allowed values: [0,65535]
+
+Default value: 0
@item @anchor{slot.entry.overwrite-mode}overwrite-mode. Type: @code{boolean}. Accessor: @anchor{fn.entry-overwrite-mode}@code{entry-overwrite-mode}.
+
+If text is overwritten when typing in the GtkEntry.
+
+Default value: False
@item @anchor{slot.entry.primary-icon-activatable}primary-icon-activatable. Type: @code{boolean}. Accessor: @anchor{fn.entry-primary-icon-activatable}@code{entry-primary-icon-activatable}.
+
+Whether the primary icon is activatable.
+
+GTK+ emits the @SignalRef{entry,icon-press} and @SignalRef{entry,icon-release} signals only on sensitive, activatable icons.
+
+Sensitive, but non-activatable icons can be used for purely informational purposes.
+
+Default value: False
@item @anchor{slot.entry.primary-icon-gicon}primary-icon-gicon. Type: @code{GIcon}. Accessor: @anchor{fn.entry-primary-icon-gicon}@code{entry-primary-icon-gicon}.
+
+The GIcon to use for the primary icon for the entry. TODO: GIcon is not yet supported
@item @anchor{slot.entry.primary-icon-name}primary-icon-name. Type: @code{string}. Accessor: @anchor{fn.entry-primary-icon-name}@code{entry-primary-icon-name}.
+
+The icon name to use for the primary icon for the entry.
+
+Default value: NIL
@item @anchor{slot.entry.primary-icon-pixbuf}primary-icon-pixbuf. Type: @ref{pixbuf}. Accessor: @anchor{fn.entry-primary-icon-pixbuf}@code{entry-primary-icon-pixbuf}.
+
+A pixbuf to use as the primary icon for the entry.
@item @anchor{slot.entry.primary-icon-sensitive}primary-icon-sensitive. Type: @code{boolean}. Accessor: @anchor{fn.entry-primary-icon-sensitive}@code{entry-primary-icon-sensitive}.
+
+Whether the primary icon is sensitive.
+
+An insensitive icon appears grayed out. GTK+ does not emit the @SignalRef{entry,icon-press} and @SignalRef{entry,icon-release} signals and does not allow DND from insensitive icons.
+
+An icon should be set insensitive if the action that would trigger when clicked is currently not available.
+
+Default value: True
@item @anchor{slot.entry.primary-icon-stock}primary-icon-stock. Type: @code{string}. Accessor: @anchor{fn.entry-primary-icon-stock}@code{entry-primary-icon-stock}.
+
+The stock id to use for the primary icon for the entry.
+
+Default value: NIL
@item @anchor{slot.entry.primary-icon-storage-type}primary-icon-storage-type. Type: @ref{image-type}. Accessor: @anchor{fn.entry-primary-icon-storage-type}@code{entry-primary-icon-storage-type}. Read-only.
+
+The representation which is used for the primary icon of the entry.
+
+Default value: @EnumVRef{image-type,empty}
@item @anchor{slot.entry.primary-icon-tooltip-markup}primary-icon-tooltip-markup. Type: @code{string}. Accessor: @anchor{fn.entry-primary-icon-tooltip-markup}@code{entry-primary-icon-tooltip-markup}.
+
+The contents of the tooltip on the primary icon, which is marked up with the Pango text markup language.
+
+Default value: NIL
@item @anchor{slot.entry.primary-icon-tooltip-text}primary-icon-tooltip-text. Type: @code{string}. Accessor: @anchor{fn.entry-primary-icon-tooltip-text}@code{entry-primary-icon-tooltip-text}.
+
+The contents of the tooltip on the primary icon.
+
+Default value: NIL
@item @anchor{slot.entry.progress-fraction}progress-fraction. Type: @code{double-float}. Accessor: @anchor{fn.entry-progress-fraction}@code{entry-progress-fraction}.
+
+The current fraction of the task that's been completed.
+
+Allowed values: [0,1]
+
+Default value: 0
@item @anchor{slot.entry.progress-pulse-step}progress-pulse-step. Type: @code{double-float}. Accessor: @anchor{fn.entry-progress-pulse-step}@code{entry-progress-pulse-step}.
+
+The fraction of total entry width to move the progress bouncing block for each call to gtk_entry_progress_pulse().
+
+Allowed values: [0,1]
+
+Default value: 0.1
@item @anchor{slot.entry.scroll-offset}scroll-offset. Type: @code{integer}. Accessor: @anchor{fn.entry-scroll-offset}@code{entry-scroll-offset}. Read-only.
+
+Number of pixels of the entry scrolled off the screen to the left.
+
+Allowed values: >= 0
+
+Default value: 0
@item @anchor{slot.entry.secondary-icon-activatable}secondary-icon-activatable. Type: @code{boolean}. Accessor: @anchor{fn.entry-secondary-icon-activatable}@code{entry-secondary-icon-activatable}.
+
+Whether the secondary icon is activatable.
+
+GTK+ emits the @SignalRef{entry,icon-press} and @SignalRef{entry,icon-release} signals only on sensitive, activatable icons.
+
+Sensitive, but non-activatable icons can be used for purely informational purposes.
+
+Default value: False
@item @anchor{slot.entry.secondary-icon-gicon}secondary-icon-gicon. Type: @code{GIcon}. Accessor: @anchor{fn.entry-secondary-icon-gicon}@code{entry-secondary-icon-gicon}.
+
+The GIcon to use for the secondary icon for the entry. TODO: GIcon is not yet supported
@item @anchor{slot.entry.secondary-icon-name}secondary-icon-name. Type: @code{string}. Accessor: @anchor{fn.entry-secondary-icon-name}@code{entry-secondary-icon-name}.
+
+The icon name to use for the secondary icon for the entry.
+
+Default value: NIL
@item @anchor{slot.entry.secondary-icon-pixbuf}secondary-icon-pixbuf. Type: @ref{pixbuf}. Accessor: @anchor{fn.entry-secondary-icon-pixbuf}@code{entry-secondary-icon-pixbuf}.
+
+An pixbuf to use as the secondary icon for the entry.
@item @anchor{slot.entry.secondary-icon-sensitive}secondary-icon-sensitive. Type: @code{boolean}. Accessor: @anchor{fn.entry-secondary-icon-sensitive}@code{entry-secondary-icon-sensitive}.
+
+Whether the secondary icon is sensitive.
+
+An insensitive icon appears grayed out. GTK+ does not emit the @SignalRef{entry,icon-press} and @SignalRef{entry,icon-release} signals and does not allow DND from insensitive icons.
+
+An icon should be set insensitive if the action that would trigger when clicked is currently not available.
+
+Default value: True
@item @anchor{slot.entry.secondary-icon-stock}secondary-icon-stock. Type: @code{string}. Accessor: @anchor{fn.entry-secondary-icon-stock}@code{entry-secondary-icon-stock}.
+
+The stock id to use for the secondary icon for the entry.
+
+Default value: NIL
@item @anchor{slot.entry.secondary-icon-storage-type}secondary-icon-storage-type. Type: @ref{image-type}. Accessor: @anchor{fn.entry-secondary-icon-storage-type}@code{entry-secondary-icon-storage-type}. Read-only.
+
+The representation which is used for the secondary icon of the entry.
+
+Default value: @EnumVRef{image-type,empty}
@item @anchor{slot.entry.secondary-icon-tooltip-markup}secondary-icon-tooltip-markup. Type: @code{string}. Accessor: @anchor{fn.entry-secondary-icon-tooltip-markup}@code{entry-secondary-icon-tooltip-markup}.
+
+The contents of the tooltip on the secondary icon, which is marked up with the Pango text markup language.
+
+Default value: NIL
@item @anchor{slot.entry.secondary-icon-tooltip-text}secondary-icon-tooltip-text. Type: @code{string}. Accessor: @anchor{fn.entry-secondary-icon-tooltip-text}@code{entry-secondary-icon-tooltip-text}.
+
+The contents of the tooltip on the secondary icon.
+
+Default value: NIL
@item @anchor{slot.entry.selection-bound}selection-bound. Type: @code{integer}. Accessor: @anchor{fn.entry-selection-bound}@code{entry-selection-bound}. Read-only.
+
+The position of the opposite end of the selection from the cursor in chars.
+
+Allowed values: [0,65535]
+
+Default value: 0
@item @anchor{slot.entry.shadow-type}shadow-type. Type: @ref{shadow-type}. Accessor: @anchor{fn.entry-shadow-type}@code{entry-shadow-type}.
+
+Which kind of shadow to draw around the entry when "has-frame" is set to True.
+
+Default value: @EnumVRef{shadow-type,in}
@item @anchor{slot.entry.text}text. Type: @code{string}. Accessor: @anchor{fn.entry-text}@code{entry-text}.
+
+The contents of the entry.
+
+Default value: ""
@item @anchor{slot.entry.text-length}text-length. Type: @code{integer}. Accessor: @anchor{fn.entry-text-length}@code{entry-text-length}. Read-only.
+
+The length of the text in the GtkEntry.
+
+Allowed values: <= 65535
+
+Default value: 0
@item @anchor{slot.entry.truncate-multiline}truncate-multiline. Type: @code{boolean}. Accessor: @anchor{fn.entry-truncate-multiline}@code{entry-truncate-multiline}.
+
+When True, pasted multi-line text is truncated to the first line.
+
+Default value: False
@item @anchor{slot.entry.visibility}visibility. Type: @code{boolean}. Accessor: @anchor{fn.entry-visibility}@code{entry-visibility}.
+
+False displays the "invisible char" instead of the actual text (password mode).
+
+Default value: True
@item @anchor{slot.entry.width-chars}width-chars. Type: @code{integer}. Accessor: @anchor{fn.entry-width-chars}@code{entry-width-chars}.
+
+Number of characters to leave space for in the entry.
+
+Default value: -1
@item @anchor{slot.entry.xalign}xalign. Type: @code{single-float}. Accessor: @anchor{fn.entry-xalign}@code{entry-xalign}.
+
+The horizontal alignment, from 0 (left) to 1 (right). Reversed for RTL layouts.
+
+Allowed values: [0,1]
+
+Default value: 0
@end itemize
+Signals:
+@itemize
+@item @anchor{signal.entry.activate}"activate". Signature: (instance @ref{entry}) @result{} void. Options: run-last, action.
+
+A keybinding signal which gets emitted when the user activates the entry.
+
+Applications should not connect to it, but may emit it with @ref{emit-signal} if they need to control activation programmatically.
+
+The default bindings for this signal are all forms of the Enter key.
+@item @anchor{signal.entry.backspace}"backspace". Signature: (instance @ref{entry}) @result{} void. Options: run-last, action.
+
+This signal is a keybinding signal which gets emitted when the user asks for it.
+
+The default bindings for this signal are Backspace and Shift-Backspace.
+@item @anchor{signal.entry.copy-clipboard}"copy-clipboard". Signature: (instance @ref{entry}) @result{} void. Options: run-last, action.
+
+This signal is a keybinding signal which gets emitted to copy the selection to the clipboard.
+
+The default bindings for this signal are Ctrl-c and Ctrl-Insert.
+@item @anchor{signal.entry.cut-clipboard}"cut-clipboard". Signature: (instance @ref{entry}) @result{} void. Options: run-last, action.
+
+This signal is a keybinding signal which gets emitted to cut the selection to the clipboard.
+
+The default bindings for this signal are Ctrl-x and Shift-Delete.
+@item @anchor{signal.entry.delete-from-cursor}"delete-from-cursor". Signature: (instance @ref{entry}), (type @ref{delete-type}), (count @code{integer}) @result{} void. Options: run-last, action.
+
+This signal is a keybinding signal which gets emitted when the user initiates a text deletion.
+
+If the @var{type} is @EnumVRef{delete-type,chars}, GTK+ deletes the selection if there is one, otherwise it deletes the requested number of characters.
+
+The default bindings for this signal are Delete for deleting a character and Ctrl-Delete for deleting a word.
+
+@var{count} is the number of type units to delete
+@item @anchor{signal.entry.icon-press}"icon-press". Signature: (instance @ref{entry}), (icon @ref{entry-icon-position}), (event @ref{event}) @result{} void. Options: run-last.
+
+This signal is emitted when an activatable icon is clicked.
+@item @anchor{signal.entry.icon-release}"icon-release". Signature: (instance @ref{entry}), (icon @code{entry-icon-position}), (event @ref{event}) @result{} void. Options: run-last.
+
+This signal is emitted on the button release from a mouse click over an activatable icon.
+@item @anchor{signal.entry.insert-at-cursor}"insert-at-cursor". Signature: (instance @ref{entry}), (string @code{string}) @result{} void. Options: run-last, action.
+
+This signal is a keybinding signal which gets emitted when the user initiates the insertion of a fixed string at the cursor.
+
+This signal has no default bindings.
+@item @anchor{signal.entry.move-cursor}"move-cursor". Signature: (instance @ref{entry}), (step @ref{movement-step}), (count @code{integer}), (extend-selection @code{boolean}) @result{} void. Options: run-last, action.
+
+This signal is a keybinding signal which gets emitted when the user initiates a cursor movement. If the cursor is not visible in entry, this signal causes the viewport to be moved instead.
+
+Applications should not connect to it, but may emit it with @ref{emit-signal} if they need to control the cursor programmatically.
+
+The default bindings for this signal come in two variants, the variant with the Shift modifier extends the selection, the variant without the Shift modifer does not. There are too many key combinations to list them all here.
-Signals:
@itemize
-@item @anchor{signal.entry.activate}"activate". Signature: (instance @ref{entry}) @result{} void. Options: run-last, action.
-@item @anchor{signal.entry.backspace}"backspace". Signature: (instance @ref{entry}) @result{} void. Options: run-last, action.
-@item @anchor{signal.entry.copy-clipboard}"copy-clipboard". Signature: (instance @ref{entry}) @result{} void. Options: run-last, action.
-@item @anchor{signal.entry.cut-clipboard}"cut-clipboard". Signature: (instance @ref{entry}) @result{} void. Options: run-last, action.
-@item @anchor{signal.entry.delete-from-cursor}"delete-from-cursor". Signature: (instance @ref{entry}), (arg-1 @ref{delete-type}), (arg-2 @code{integer}) @result{} void. Options: run-last, action.
-@item @anchor{signal.entry.icon-press}"icon-press". Signature: (instance @ref{entry}), (arg-1 @code{GtkEntryIconPosition}), (arg-2 @ref{event}) @result{} void. Options: run-last.
-@item @anchor{signal.entry.icon-release}"icon-release". Signature: (instance @ref{entry}), (arg-1 @code{GtkEntryIconPosition}), (arg-2 @ref{event}) @result{} void. Options: run-last.
-@item @anchor{signal.entry.insert-at-cursor}"insert-at-cursor". Signature: (instance @ref{entry}), (arg-1 @code{string}) @result{} void. Options: run-last, action.
-@item @anchor{signal.entry.move-cursor}"move-cursor". Signature: (instance @ref{entry}), (arg-1 @ref{movement-step}), (arg-2 @code{integer}), (arg-3 @code{boolean}) @result{} void. Options: run-last, action.
+@item Arrow keys move by individual characters/lines
+@item Ctrl-arrow key combinations move by words/paragraphs
+@item Home/End keys move to the ends of the buffer
+@end itemize
+
+@var{count} is the number of @var{step} units to move
+
+@var{extend-selection} is True if the move should extend the selection
@item @anchor{signal.entry.paste-clipboard}"paste-clipboard". Signature: (instance @ref{entry}) @result{} void. Options: run-last, action.
-@item @anchor{signal.entry.populate-popup}"populate-popup". Signature: (instance @ref{entry}), (arg-1 @ref{menu}) @result{} void. Options: run-last.
+
+This signal is a keybinding signal which gets emitted to paste the contents of the clipboard into the text view.
+
+The default bindings for this signal are Ctrl-v and Shift-Insert.
+@item @anchor{signal.entry.populate-popup}"populate-popup". Signature: (instance @ref{entry}), (menu @ref{menu}) @result{} void. Options: run-last.
+
+This signal gets emitted before showing the context menu of the entry.
+
+If you need to add items to the context menu, connect to this signal and append your menuitems to the menu.
@item @anchor{signal.entry.toggle-overwrite}"toggle-overwrite". Signature: (instance @ref{entry}) @result{} void. Options: run-last, action.
+
+This signal is a keybinding signal which gets emitted to toggle the overwrite mode of the entry.
+
+The default bindings for this signal is Insert.
@end itemize
+@RMethod entry-layout-index-to-text-index
+@lisp
+(entry-layout-index-to-text-index entry layout-index) @result{} text-index
+@end lisp
+
+Converts from a position in the entry contents to a position in the entry's PangoLayout.
+
+@var{layout-index} - byte index into the entry layout text
+
+@var{text-index} - byte index into the entry contents
+
+@RMethod entry-text-index-to-layout-index
+@lisp
+(entry-text-index-to-layout-index entry text-index) @result{} layout-index
+@end lisp
+Converts from a position in the entry's PangoLayout contents to a position in the entry.
+@var{layout-index} - byte index into the entry layout text
+
+@var{text-index} - byte index into the entry contents
@node event-box
@section event-box
@Class h-scale
Superclass: @ref{scale} @ref{atk-implementor-iface} @ref{buildable} @ref{orientable}
+The @ref{h-scale} widget is used to allow the user to select a value using a horizontal slider.
+
+The position to show the current value, and the number of decimal places shown can be set using the parent @ref{scale} class's functions.
+
Slots:
@itemize
@end itemize
@Class image
Superclass: @ref{misc} @ref{atk-implementor-iface} @ref{buildable}
+The @ref{image} widget displays an image. Various kinds of object can be displayed as an image; most typically, you would load a @ref{pixbuf} ("pixel buffer") from a file, and then display that. There's an @SlotRef{image,file} slot (with @code{:file} initarg) that is used to load @ref{pixbuf} from file:
+@lisp
+(make-instance 'image :file "myfile.png")
+@end lisp
+
+If the file isn't loaded successfully, the image will contain a "broken image" icon similar to that used in many web browsers. If you want to handle errors in loading the file yourself, for example by displaying an error message, then load the image and set the @SlotRef{image,pixbuf}.
+
+The image file may contain an animation, if so the @ref{image} will display an animation (@ref{pixbuf-animation}) instead of a static image.
+
+@ref{image} is a subclass of @ref{misc}, which implies that you can align it (center, left, right) and add padding to it, using @ref{misc} slot.
+
+@ref{image} is a "no window" widget (has no @ref{gdk-window} of its own), so by default does not receive events. If you want to receive events on the image, such as button clicks, place the image inside a @ref{event-box}, then connect to the event signals on the event box.
+
+When handling events on the event box, keep in mind that coordinates in the image may be different from event box coordinates due to the alignment and padding settings on the image (see @ref{misc}). The simplest way to solve this is to set the alignment to 0.0 (left/top), and set the padding to zero. Then the origin of the image will be the same as the origin of the event box.
+
+@c Sometimes an application will want to avoid depending on external data files, such as image files. GTK+ comes with a program to avoid this, called gdk-pixbuf-csource. This program allows you to convert an image into a C variable declaration, which can then be loaded into a GdkPixbuf using gdk_pixbuf_new_from_inline().
+
Slots:
@itemize
@item @anchor{slot.image.file}file. Type: @code{string}. Accessor: @anchor{fn.image-file}@code{image-file}.
+
+Filename to load and display.
+
+Default value: NIL
@item @anchor{slot.image.gicon}gicon. Type: @code{GIcon}. Accessor: @anchor{fn.image-gicon}@code{image-gicon}.
+
+The GIcon displayed in the GtkImage. For themed icons, If the icon theme is changed, the image will be updated automatically.
+
+TODO: GIcon is part of GIO library that is not yet supported by cl-gtk2
@item @anchor{slot.image.icon-name}icon-name. Type: @code{string}. Accessor: @anchor{fn.image-icon-name}@code{image-icon-name}.
+
+The name of the icon in the icon theme. If the icon theme is changed, the image will be updated automatically.
+
+Default value: NIL
@item @anchor{slot.image.icon-set}icon-set. Type: @code{GtkIconSet}. Accessor: @anchor{fn.image-icon-set}@code{image-icon-set}.
+
+Icon set to display.
@item @anchor{slot.image.icon-size}icon-size. Type: @code{integer}. Accessor: @anchor{fn.image-icon-size}@code{image-icon-size}.
-@item @anchor{slot.image.image}image. Type: @code{GdkImage}. Accessor: @anchor{fn.image-image}@code{image-image}.
+
+Symbolic size to use for stock icon, icon set or named icon.
+
+Allowed values: >= 0
+
+Default value: 4
+@item @anchor{slot.image.image}image. Type: @ref{gdk-image}. Accessor: @anchor{fn.image-image}@code{image-image}.
+
+A GdkImage to display.
@item @anchor{slot.image.mask}mask. Type: @ref{pixmap}. Accessor: @anchor{fn.image-mask}@code{image-mask}.
+
+Mask bitmap to use with @ref{gdk-image} or @ref{pixmap}.
@item @anchor{slot.image.pixbuf}pixbuf. Type: @ref{pixbuf}. Accessor: @anchor{fn.image-pixbuf}@code{image-pixbuf}.
+
+A @ref{pixbuf} to display.
@item @anchor{slot.image.pixbuf-animation}pixbuf-animation. Type: @ref{pixbuf-animation}. Accessor: @anchor{fn.image-pixbuf-animation}@code{image-pixbuf-animation}.
+
+@ref{pixbuf-animation} to display.
@item @anchor{slot.image.pixel-size}pixel-size. Type: @code{integer}. Accessor: @anchor{fn.image-pixel-size}@code{image-pixel-size}.
+
+This property can be used to specify a fixed size overriding the @SlotRef{image,icon-size} property for images of type @EnumVRef{image-type,icon-name}.
+
+Default value: -1
@item @anchor{slot.image.pixmap}pixmap. Type: @ref{pixmap}. Accessor: @anchor{fn.image-pixmap}@code{image-pixmap}.
+
+A @ref{pixmap} to display.
@item @anchor{slot.image.stock}stock. Type: @code{string}. Accessor: @anchor{fn.image-stock}@code{image-stock}.
+
+Stock ID for a stock image to display.
+
+Default value: NIL
@item @anchor{slot.image.storage-type}storage-type. Type: @ref{image-type}. Accessor: @anchor{fn.image-storage-type}@code{image-storage-type}. Read-only.
+
+The representation being used for image data.
+
+Default value: @EnumVRef{image-type,empty}
@end itemize
Subclasses: @ref{accel-label}
+The @ref{label} widget displays a small amount of text. As the name implies, most labels are used to label another widget such as a @ref{button}, or a @ref{menu-item}.
+
+@chapheading Mnemonics
+
+Labels may contain mnemonics. Mnemonics are underlined characters in the label, used for keyboard navigation. Mnemonics are created by providing a string with an underscore before the mnemonic character, such as "_File", to @SlotRef{label,label} and setting @SlotRef{label,use-underline} to True.
+
+Mnemonics automatically activate any activatable widget the label is inside, such as a @ref{button}; if the label is not inside the mnemonic's target widget, you have to tell the label about the target by settings @SlotRef{label,mnemonic-widget}. Here's a simple example where the label is inside a button:
+
+@chapheading Markup (styled text)
+
+To make it easy to format text in a label (changing colors, fonts, etc.), label text can be provided in a simple markup format. Set @SlotRef{label,use-markup} to True if @SlotRef{label,label} contains markup. Here's how to create a label with a small font:
+@lisp
+(make-instance 'label :label "<small>Small text</small>" :use-markup t)
+@end lisp
+(See @uref{http://library.gnome.org/devel/pango/stable/PangoMarkupFormat.html,,complete documentation} of available tags in the Pango manual.)
+
+The markup passed to @SlotRef{label,label} must be valid; for example, literal @code{</>/&} characters must be escaped as @code{<}, @code{>}, and @code{&}. If you pass text obtained from the user, file, or a network, you'll want to escape it with g_markup_escape_text() or g_markup_printf_escaped(). (TODO: these functions are not supported yet in cl-gtk2)
+
+Markup strings are just a convenient way to set the PangoAttrList on a label; @SlotRef{label,attributes} may be a simpler way to set attributes in some cases. Be careful though; PangoAttrList tends to cause internationalization problems, unless you're applying attributes to the entire string (i.e. unless you set the range of each attribute to [0, G_MAXINT)). The reason is that specifying the start_index and end_index for a PangoAttribute requires knowledge of the exact string being displayed, so translations will cause problems.
+
+@chapheading Selectable labels
+
+Labels can be made selectable with @SlotRef{label,selectable}. Selectable labels allow the user to copy the label contents to the clipboard. Only labels that contain useful-to-copy information - such as error messages - should be made selectable.
+
+@chapheading Text layout
+
+A label can contain any number of paragraphs, but will have performance problems if it contains more than a small number. Paragraphs are separated by newlines or other paragraph separators understood by Pango.
+
+Labels can automatically wrap text if you call @SlotRef{label,line-wrap}.
+
+@SlotRef{label,justify} sets how the lines in a label align with one another. If you want to set how the label as a whole aligns in its available space, see @SlotRef{misc,xalign} and @SlotRef{misc,yalign}.
+
Slots:
@itemize
@item @anchor{slot.label.angle}angle. Type: @code{double-float}. Accessor: @anchor{fn.label-angle}@code{label-angle}.
+
+The angle that the baseline of the label makes with the horizontal, in degrees, measured counterclockwise. An angle of 90 reads from from bottom to top, an angle of 270, from top to bottom. Ignored if the label is selectable, wrapped, or ellipsized.
+
+Allowed values: [0,360]
+
+Default value: 0
@item @anchor{slot.label.attributes}attributes. Type: @code{PangoAttrList}. Accessor: @anchor{fn.label-attributes}@code{label-attributes}.
+
+A list of style attributes to apply to the text of the label
@item @anchor{slot.label.cursor-position}cursor-position. Type: @code{integer}. Accessor: @anchor{fn.label-cursor-position}@code{label-cursor-position}. Read-only.
-@item @anchor{slot.label.ellipsize}ellipsize. Type: @code{PangoEllipsizeMode}. Accessor: @anchor{fn.label-ellipsize}@code{label-ellipsize}.
+
+The current position of the insertion cursor in chars.
+
+Allowed values: >= 0
+
+Default value: 0
+@item @anchor{slot.label.ellipsize}ellipsize. Type: @ref{pango-ellipsize-mode}. Accessor: @anchor{fn.label-ellipsize}@code{label-ellipsize}.
+
+The preferred place to ellipsize the string, if the label does not have enough room to display the entire string.
+
+Note that setting this property to a value other than @EnumVRef{pango-ellipsize-mode,none} has the side-effect that the label requests only enough space to display the ellipsis "...". In particular, this means that ellipsizing labels do not work well in notebook tabs, unless the tab's "tab-expand" property is set to True. Other ways to set a label's width are @SlotRef{widget,width-request} and @SlotRef{label,width-chars}.
+
+Default value: @EnumVRef{pango-ellipsize-mode,none}
@item @anchor{slot.label.justify}justify. Type: @ref{justification}. Accessor: @anchor{fn.label-justify}@code{label-justify}.
+
+The alignment of the lines in the text of the label relative to each other. This does NOT affect the alignment of the label within its allocation. See @SlotRef{misc,xalign} for that.
+
+Default value: @EnumVRef{justification,left}
@item @anchor{slot.label.label}label. Type: @code{string}. Accessor: @anchor{fn.label-label}@code{label-label}.
+
+The text of the label.
+
+Default value: ""
+@item @anchor{slot.label.layout}layout. Type: @ref{g-object}. Accessor: @anchor{fn.label-layout}@code{label-layout}. Read-only.
+
+Gets the PangoLayout used to display the label. The layout is useful to e.g. convert text positions to pixel positions, in combination with @SlotRef{label,layout-offsets}.
+@item @anchor{slot.label.layout-offsets}layout-offsets. Type: list of @code{integer}. Accessor: @anchor{fn.label-layout-offsets}@code{label-layout-offsets}. Read-only.
+
+The coordinates where the label will draw the @code{PangoLayout} representing the text in the label; useful to convert mouse events into coordinates inside the @code{PangoLayout}, e.g. to take some action if some part of the label is clicked. Of course you will need to create a @ref{event-box} to receive the events, and pack the label inside it, since labels are a no-window widgets. Remember when using the @code{PangoLayout} functions you need to convert to and from pixels using PANGO_PIXELS or PANGO_SCALE.
+@item @anchor{slot.label.line-wrap}line-wrap. Type: @code{boolean}. Accessor: @anchor{fn.label-line-wrap}@code{label-line-wrap}.
+
+Whether lines in the label are automatically wrapped. True makes label break lines if text exceeds the widget's size. False lets the text get cut off by the edge of the widget if it exceeds the widget size.
+
+Note that setting line wrapping to True does not make the label wrap at its parent container's width, because GTK+ widgets conceptually can't make their requisition depend on the parent container's size. For a label that wraps at a specific position, set the label's width using @SlotRef{widget,width-request}.
+@item @anchor{slot.label.line-wrap-mode}line-wrap-mode. Type: @ref{pango-wrap-mode}. Accessor: @anchor{fn.label-line-wrap-mode}@code{label-line-wrap-mode}.
+
+If line wrapping is on (see @SlotRef{label,line-wrap}) this controls how the line wrapping is done. The default is @EnumVRef{pango-wrap-mode,word} which means wrap on word boundaries.
@item @anchor{slot.label.max-width-chars}max-width-chars. Type: @code{integer}. Accessor: @anchor{fn.label-max-width-chars}@code{label-max-width-chars}.
+
+The desired maximum width of the label, in characters. If this property is set to -1, the width will be calculated automatically, otherwise the label will request space for no more than the requested number of characters. If the @SlotRef{label,width-chars} property is set to a positive value, then the @SlotRef{label,max-width-chars} property is ignored.
+
+Default value: -1
@item @anchor{slot.label.mnemonic-keyval}mnemonic-keyval. Type: @code{integer}. Accessor: @anchor{fn.label-mnemonic-keyval}@code{label-mnemonic-keyval}. Read-only.
+
+The mnemonic accelerator key for this label.
+
+Default value: 16777215
@item @anchor{slot.label.mnemonic-widget}mnemonic-widget. Type: @ref{widget}. Accessor: @anchor{fn.label-mnemonic-widget}@code{label-mnemonic-widget}.
+
+The widget to be activated when the label's mnemonic key is pressed.
@item @anchor{slot.label.pattern}pattern. Type: @code{string}. Accessor: @anchor{fn.label-pattern}@code{label-pattern}. Write-only.
+
+A string with _ characters in positions correspond to characters in the text to underline.
+
+Default value: NIL
@item @anchor{slot.label.selectable}selectable. Type: @code{boolean}. Accessor: @anchor{fn.label-selectable}@code{label-selectable}.
+
+Whether the label text can be selected with the mouse.
+
+Default value: False
@item @anchor{slot.label.selection-bound}selection-bound. Type: @code{integer}. Accessor: @anchor{fn.label-selection-bound}@code{label-selection-bound}. Read-only.
+
+The position of the opposite end of the selection from the cursor in chars.
+
+Allowed values: >= 0
+
+Default value: 0
+@item @anchor{slot.label.selection-bounds}selection-bounds. Type: @code{(list integer integer)}. Accessor: @anchor{fn.label-selection-bounds}@code{label-selection-bounds}. Read-only.
+
+Gets the selected range of characters in the label. Returns either NIL if there is no selection or list of two integers specifying character offsets of start and end of a selection
@item @anchor{slot.label.single-line-mode}single-line-mode. Type: @code{boolean}. Accessor: @anchor{fn.label-single-line-mode}@code{label-single-line-mode}.
+
+Whether the label is in single line mode. In single line mode, the height of the label does not depend on the actual text, it is always set to ascent + descent of the font. This can be an advantage in situations where resizing the label because of text changes would be distracting, e.g. in a statusbar.
+
+Default value: False
@item @anchor{slot.label.use-markup}use-markup. Type: @code{boolean}. Accessor: @anchor{fn.label-use-markup}@code{label-use-markup}.
+
+The text of the label includes XML markup.
+
+Default value: False
@item @anchor{slot.label.use-underline}use-underline. Type: @code{boolean}. Accessor: @anchor{fn.label-use-underline}@code{label-use-underline}.
+
+If set, an underline in the text indicates the next character should be used for the mnemonic accelerator key.
+
+Default value: False
@item @anchor{slot.label.width-chars}width-chars. Type: @code{integer}. Accessor: @anchor{fn.label-width-chars}@code{label-width-chars}.
+
+he desired width of the label, in characters. If this property is set to -1, the width will be calculated automatically, otherwise the label will request either 3 characters or the property value, whichever is greater. If the @SlotRef{label,width-chars} property is set to a positive value, then the @SlotRef{label,max-width-chars} property is ignored.
+
+Default value: -1
@item @anchor{slot.label.wrap}wrap. Type: @code{boolean}. Accessor: @anchor{fn.label-wrap}@code{label-wrap}.
-@item @anchor{slot.label.wrap-mode}wrap-mode. Type: @code{PangoWrapMode}. Accessor: @anchor{fn.label-wrap-mode}@code{label-wrap-mode}.
+
+If set, wrap lines if the text becomes too wide.
+
+Default value: False
+@item @anchor{slot.label.wrap-mode}wrap-mode. Type: @ref{pango-wrap-mode}. Accessor: @anchor{fn.label-wrap-mode}@code{label-wrap-mode}.
+
+If line wrapping is on (see the @SlotRef{label,wrap} property) this controls how the line wrapping is done. The default is @EnumVRef{pango-wrap-mode,word}, which means wrap on word boundaries.
@end itemize
Signals:
@itemize
@item @anchor{signal.label.copy-clipboard}"copy-clipboard". Signature: (instance @ref{label}) @result{} void. Options: run-last, action.
-@item @anchor{signal.label.move-cursor}"move-cursor". Signature: (instance @ref{label}), (arg-1 @ref{movement-step}), (arg-2 @code{integer}), (arg-3 @code{boolean}) @result{} void. Options: run-last, action.
-@item @anchor{signal.label.populate-popup}"populate-popup". Signature: (instance @ref{label}), (arg-1 @ref{menu}) @result{} void. Options: run-last.
+
+This signal is a keybinding signal which gets emitted to copy the selection to the clipboard.
+
+The default binding for this signal is Ctrl-c.
+@item @anchor{signal.label.move-cursor}"move-cursor". Signature: (instance @ref{label}), (step @ref{movement-step}), (count @code{integer}), (extend-selection @code{boolean}) @result{} void. Options: run-last, action.
+
+This signal is a keybinding signal which gets emitted when the user initiates a cursor movement. If the cursor is not visible in entry, this signal causes the viewport to be moved instead.
+
+Applications should not connect to it, but may emit it with @ref{emit-signal} if they need to control the cursor programmatically.
+
+The default bindings for this signal come in two variants, the variant with the Shift modifier extends the selection, the variant without the Shift modifer does not. There are too many key combinations to list them all here.
+
+@itemize
+@item Arrow keys move by individual characters/lines
+@item Ctrl-arrow key combinations move by words/paragraphs
+@item Home/End keys move to the ends of the buffer
+@end itemize
+
+
+@var{step}: the granularity of the move, as a GtkMovementStep
+
+@var{count}: the number of step units to move
+
+@var{extend-selection}: True if the move should extend the selection
+@item @anchor{signal.label.populate-popup}"populate-popup". Signature: (instance @ref{label}), (menu @ref{menu}) @result{} void. Options: run-last.
+
+This signal gets emitted before showing the context menu of the label. Note that only selectable labels have context menus.
+
+If you need to add items to the context menu, connect to this signal and append your menuitems to the menu.
@end itemize
@Class link-button
Superclass: @ref{button} @ref{atk-implementor-iface} @ref{activatable} @ref{buildable}
+A @ref{link-button} is a @ref{button} with a hyperlink, similar to the one used by web browsers, which triggers an action when clicked. It is useful to show quick links to resources.
+
+@ref{link-button} offers a global hook, which is called when the used clicks on it: see @ref{link-button-global-uri-hook}.
+
Slots:
@itemize
@item @anchor{slot.link-button.uri}uri. Type: @code{string}. Accessor: @anchor{fn.link-button-uri}@code{link-button-uri}.
+
+The URI bound to this button.
+
+Default value: NIL
@item @anchor{slot.link-button.visited}visited. Type: @code{boolean}. Accessor: @anchor{fn.link-button-visited}@code{link-button-visited}.
+
+The 'visited' state of this button. A visited link is drawn in a different color.
+
+Default value: False
@end itemize
@itemize
@end itemize
+@RFunction link-button-global-uri-hook
+@lisp
+(setf (link-button-gloval-uri-hook) function)
+@end lisp
+
+Sets function as the function that should be invoked every time a user clicks a @ref{link-button}. This function is called before every callback registered for the @SignalRef{button,clicked} signal.
+If @var{function} is NIL, GTK+ defaults to calling gtk_show_uri() (default function that opens the default application for a URI).
+@var{function} is a function of two arguments: a @ref{link-button} and a @code{string}. First argument is the button that was clicked and the second is the URI of the button.
@node menu
@section menu
@Class progress-bar
Superclass: @ref{progress} @ref{atk-implementor-iface} @ref{buildable}
+The @ref{progress-bar} is typically used to display the progress of a long running operation. It provides a visual clue that processing is underway. The @ref{progress-bar} can be used in two different modes: percentage mode and activity mode.
+
+When an application can determine how much work needs to take place (e.g. read a fixed number of bytes from a file) and can monitor its progress, it can use the @ref{progress-bar} in percentage mode and the user sees a growing bar indicating the percentage of the work that has been completed. In this mode, the application is required to set @SlotRef{progress-bar,fraction} periodically to update the progress bar.
+
+When an application has no accurate way of knowing the amount of work to do, it can use the @ref{progress-bar} in activity mode, which shows activity by a block moving back and forth within the progress area. In this mode, the application is required to call @ref{progress-bar-pulse} perodically to update the progress bar.
+
+There is quite a bit of flexibility provided to control the appearance of the @ref{progress-bar}. Functions are provided to control the orientation of the bar, optional text can be displayed along with the bar, and the step size used in activity mode can be set.
+
Slots:
@itemize
@item @anchor{slot.progress-bar.activity-blocks}activity-blocks. Type: @code{integer}. Accessor: @anchor{fn.progress-bar-activity-blocks}@code{progress-bar-activity-blocks}.
+
+The number of blocks which can fit in the progress bar area in activity mode (Deprecated).
+
+Allowed values: >= 2
+
+Default value: 5
@item @anchor{slot.progress-bar.activity-step}activity-step. Type: @code{integer}. Accessor: @anchor{fn.progress-bar-activity-step}@code{progress-bar-activity-step}.
+
+The increment used for each iteration in activity mode (Deprecated).
+
+Default value: 3
@item @anchor{slot.progress-bar.adjustment}adjustment. Type: @ref{adjustment}. Accessor: @anchor{fn.progress-bar-adjustment}@code{progress-bar-adjustment}.
+
+The @ref{adjustment} connected to the progress bar (Deprecated
@item @anchor{slot.progress-bar.bar-style}bar-style. Type: @ref{progress-bar-style}. Accessor: @anchor{fn.progress-bar-bar-style}@code{progress-bar-bar-style}.
+
+Specifies the visual style of the bar in percentage mode (Deprecated).
+
+Default value: @EnumVRef{progress-bar-style,continuous}
@item @anchor{slot.progress-bar.discrete-blocks}discrete-blocks. Type: @code{integer}. Accessor: @anchor{fn.progress-bar-discrete-blocks}@code{progress-bar-discrete-blocks}.
-@item @anchor{slot.progress-bar.ellipsize}ellipsize. Type: @code{PangoEllipsizeMode}. Accessor: @anchor{fn.progress-bar-ellipsize}@code{progress-bar-ellipsize}.
+
+The number of discrete blocks in a progress bar (when shown in the discrete style).
+
+Allowed values: >= 2
+
+Default value: 10
+@item @anchor{slot.progress-bar.ellipsize}ellipsize. Type: @ref{pango-ellipsize-mode}. Accessor: @anchor{fn.progress-bar-ellipsize}@code{progress-bar-ellipsize}.
+
+The preferred place to ellipsize the string, if the progressbar does not have enough room to display the entire string.
+
+Note that setting this property to a value other than @EnumVRef{pango-ellipsize-mode,none} has the side-effect that the progressbar requests only enough space to display the ellipsis "...". Another means to set a progressbar's width is @SlotRef{widget,width-request}.
+
+Default value: @EnumVRef{pango-ellipsize-mode,none}
@item @anchor{slot.progress-bar.fraction}fraction. Type: @code{double-float}. Accessor: @anchor{fn.progress-bar-fraction}@code{progress-bar-fraction}.
+
+The fraction of total work that has been completed.
+
+Allowed values: [0,1]
+
+Default value: 0
@item @anchor{slot.progress-bar.orientation}orientation. Type: @ref{progress-bar-orientation}. Accessor: @anchor{fn.progress-bar-orientation}@code{progress-bar-orientation}.
+
+Orientation and growth direction of the progress bar.
+
+Default value: @EnumVRef{progress-bar-orientation,left-to-right}
@item @anchor{slot.progress-bar.pulse-step}pulse-step. Type: @code{double-float}. Accessor: @anchor{fn.progress-bar-pulse-step}@code{progress-bar-pulse-step}.
+
+The fraction of total progress to move the bouncing block when pulsed.
+
+Allowed values: [0,1]
+
+Default value: 0.1
@item @anchor{slot.progress-bar.text}text. Type: @code{string}. Accessor: @anchor{fn.progress-bar-text}@code{progress-bar-text}.
+
+Text to be displayed in the progress bar.
+
+Default value: NIL
@end itemize
@itemize
@end itemize
+@RMethod progress-bar-pulse
+@lisp
+(progress-bar-pulse progress-bar)
+@end lisp
-
+Indicates that some progress is made, but you don't know how much. Causes the progress bar to enter "activity mode," where a block bounces back and forth. Each call to @ref{progress-bar-pulse} causes the block to move by a little bit (the amount of movement per pulse is determined by @SlotRef{progress-bar,pulse-step}).
@node radio-button
@section radio-button
@Class radio-button
Superclass: @ref{check-button} @ref{atk-implementor-iface} @ref{activatable} @ref{buildable}
+A single radio button performs the same basic function as a @ref{check-button}, as its position in the object hierarchy reflects. It is only when multiple radio buttons are grouped together that they become a different user interface component in their own right.
+
+Every radio button is a member of some group of radio buttons. When one is selected, all other radio buttons in the same group are deselected. A @ref{radio-button} is one way of giving the user a choice from many options.
+
+To group radio buttons into one group, set @SlotRef{radio-button,group} to one of the radio buttons of the group.
+
Slots:
@itemize
@item @anchor{slot.radio-button.group}group. Type: @ref{radio-button}. Accessor: @anchor{fn.radio-button-group}@code{radio-button-group}. Write-only.
+
+A button of the radio button group that this radio button belongs to
@end itemize
Signals:
@itemize
@item @anchor{signal.radio-button.group-changed}"group-changed". Signature: (instance @ref{radio-button}) @result{} void. Options: run-first.
+
+Emitted when the group of radio buttons that a radio button belongs to changes. This is emitted when a radio button switches from being alone to being part of a group of 2 or more buttons, or vice-versa, and when a button is moved from one group of 2 or more buttons to a different one, but not when the composition of the group that a button belongs to changes.
@end itemize
Subclasses: @ref{volume-button}
+@ref{scale-button} provides a button which pops up a scale widget. This kind of widget is commonly used for volume controls in multimedia applications, and GTK+ provides a @ref{volume-button} subclass that is tailored for this use case.
+
Slots:
@itemize
@item @anchor{slot.scale-button.adjustment}adjustment. Type: @ref{adjustment}. Accessor: @anchor{fn.scale-button-adjustment}@code{scale-button-adjustment}.
-@item @anchor{slot.scale-button.icons}icons. Type: @code{GStrv}. Accessor: @anchor{fn.scale-button-icons}@code{scale-button-icons}.
+
+The @ref{adjustment} that contains the current value of this scale button object.
+@item @anchor{slot.scale-button.icons}icons. Type: list of @code{string}. Accessor: @anchor{fn.scale-button-icons}@code{scale-button-icons}.
+
+The names of the icons to be used by the scale button. The first item in the list will be used in the button when the current value is the lowest value, the second item for the highest value. All the subsequent icons will be used for all the other values, spread evenly over the range of values.
+
+If there's only one icon name in the icons array, it will be used for all the values. If only two icon names are in the icons array, the first one will be used for the bottom 50% of the scale, and the second one for the top 50%.
+
+It is recommended to use at least 3 icons so that the @ref{scale-button} reflects the current value of the scale better for the users.
@item @anchor{slot.scale-button.size}size. Type: @ref{icon-size}. Accessor: @anchor{fn.scale-button-size}@code{scale-button-size}.
+
+The icon size.
+
+Default value: @EnumVRef{icon-size,small-toolbar}
@item @anchor{slot.scale-button.value}value. Type: @code{double-float}. Accessor: @anchor{fn.scale-button-value}@code{scale-button-value}.
+
+The value of the scale.
+
+Default value: 0
@end itemize
Signals:
@itemize
@item @anchor{signal.scale-button.popdown}"popdown". Signature: (instance @ref{scale-button}) @result{} void. Options: run-last, action.
+
+This signal is a keybinding signal which gets emitted to popdown the scale widget.
+
+The default binding for this signal is Escape.
@item @anchor{signal.scale-button.popup}"popup". Signature: (instance @ref{scale-button}) @result{} void. Options: run-last, action.
+
+This signal is a keybinding signal which gets emitted to popup the scale widget.
+
+The default bindings for this signal are Space, Enter and Return.
@item @anchor{signal.scale-button.value-changed}"value-changed". Signature: (instance @ref{scale-button}), (arg-1 @code{double-float}) @result{} void. Options: run-last.
+
+This signal is emitted when the value field has changed.
@end itemize
@Class statusbar
Superclass: @ref{h-box} @ref{atk-implementor-iface} @ref{buildable} @ref{orientable}
+A @ref{statusbar} is usually placed along the bottom of an application's main @ref{gtk-window}. It may provide a regular commentary of the application's status (as is usually the case in a web browser, for example), or may be used to simply output a message when the status changes, (when an upload is complete in an FTP client, for example). It may also have a resize grip (a triangular area in the lower right corner) which can be clicked on to resize the window containing the statusbar.
+
+Status bars in GTK+ maintain a stack of messages. The message at the top of the each bar's stack is the one that will currently be displayed.
+
+Any messages added to a statusbar's stack must specify a context id that is used to uniquely identify the source of a message. Context ids may be specified by context descriptions (as string) or by numeric identifiers obtained by @ref{statusbar-context-id}. Note that messages are stored in a stack, and when choosing which message to display, the stack structure is adhered to, regardless of the context description of a message.
+
+One could say that a statusbar maintains one stack of messages for display purposes, but allows multiple message producers to maintain sub-stacks of the messages they produced (via context descriptions).
+
+Messages are added to the bar's stack with @ref{statusbar-push}.
+
+The message at the top of the stack can be removed using @ref{statusbar-pop}. A message can be removed from anywhere in the stack if its @var{message-id} was recorded at the time it was added. This is done using @ref{statusbar-remove}.
+
Slots:
@itemize
@item @anchor{slot.statusbar.has-resize-grip}has-resize-grip. Type: @code{boolean}. Accessor: @anchor{fn.statusbar-has-resize-grip}@code{statusbar-has-resize-grip}.
+
+Whether the statusbar has a grip for resizing the toplevel window.
+
+Default value: True
@end itemize
Signals:
@itemize
-@item @anchor{signal.statusbar.text-popped}"text-popped". Signature: (instance @ref{statusbar}), (arg-1 @code{integer}), (arg-2 @code{string}) @result{} void. Options: run-last.
-@item @anchor{signal.statusbar.text-pushed}"text-pushed". Signature: (instance @ref{statusbar}), (arg-1 @code{integer}), (arg-2 @code{string}) @result{} void. Options: run-last.
+@item @anchor{signal.statusbar.text-popped}"text-popped". Signature: (instance @ref{statusbar}), (context-id @code{integer}), (text @code{string}) @result{} void. Options: run-last.
+
+Is emitted whenever a new message is popped off a statusbar's stack.
+
+@var{context-id} is a numeric identifier of a context.
+@item @anchor{signal.statusbar.text-pushed}"text-pushed". Signature: (instance @ref{statusbar}), (context-id @code{integer}), (text @code{string}) @result{} void. Options: run-last.
+
+Is emitted whenever a new message gets pushed onto a statusbar's stack.
+
+@var{context-id} is a numeric identifier of a context.
@end itemize
+@RMethod statusbar-context-id
+@lisp
+(statusbar-context-id statusbar context-description) @result{} context-id
+@end lisp
+
+Returns a context identifier, given a description of the actual context. Note that the description is not shown in the UI.
+
+@var{context-description} is a string - textual description of what context the new message is being used in
+@RMethod statusbar-push
+@lisp
+(statusbar-push statusbar context text) @result{} message-id
+@end lisp
+
+Pushes a new message onto a statusbar's stack.
+
+@var{context}: a string (context description) or a number obtained by @ref{statusbar-context-id}
+
+@var{text}: the message to add to the statusbar
+
+@var{message-id}: a message id that can be used with @ref{statusbar-remove}.
+
+@RMethod statusbar-pop
+@lisp
+(statusbar-pop statusbar context)
+@end lisp
+
+Removes the first message in the @ref{statusbar}'s stack with the given context.
+
+Note that this may not change the displayed message, if the message at the top of the stack has a different context.
+
+@var{context}: a string (context description) or a number obtained by @ref{statusbar-context-id}
+
+@RMethod statusbar-remove
+@lisp
+(statusbar-remove statusbar context message-id)
+@end lisp
+
+Forces the removal of a message from a statusbar's stack. The exact @var{context} and @var{message-id} must be specified.
+@var{context}: a string (context description) or a number obtained by @ref{statusbar-context-id}
+
+@var{message-id}: a message identifier returned by @ref{statusbar-push}
@node table
@section table
Subclasses: @ref{check-button}
+A @ref{toggle-button} is a @ref{button} which will remain 'pressed-in' when clicked. Clicking again will cause the toggle button to return to its normal state.
+
+The state of a @ref{toggle-button} is stored in @SlotRef{toggle-button,active} and @SlotRef{toggle-button,inconsistent}.
+
Slots:
@itemize
@item @anchor{slot.toggle-button.active}active. Type: @code{boolean}. Accessor: @anchor{fn.toggle-button-active}@code{toggle-button-active}.
+
+If the toggle button should be pressed in or not.
+
+Default value: False
@item @anchor{slot.toggle-button.draw-indicator}draw-indicator. Type: @code{boolean}. Accessor: @anchor{fn.toggle-button-draw-indicator}@code{toggle-button-draw-indicator}.
+
+If the toggle part of the button is displayed.
+
+Default value: False
@item @anchor{slot.toggle-button.inconsistent}inconsistent. Type: @code{boolean}. Accessor: @anchor{fn.toggle-button-inconsistent}@code{toggle-button-inconsistent}.
+
+If the toggle button is in an "in between" state.
+
+Default value: False
@end itemize
Signals:
@itemize
@item @anchor{signal.toggle-button.toggled}"toggled". Signature: (instance @ref{toggle-button}) @result{} void. Options: run-first.
+
+Should be connected if you wish to perform an action whenever the @ref{toggle-button}'s state is changed.
@end itemize
@Class v-scale
Superclass: @ref{scale} @ref{atk-implementor-iface} @ref{buildable} @ref{orientable}
+The @ref{v-scale} widget is used to allow the user to select a value using a vertical slider.
+
+The position to show the current value, and the number of decimal places shown can be set using the parent @ref{scale} class's functions.
+
Slots:
@itemize
@end itemize
@Class volume-button
Superclass: @ref{scale-button} @ref{atk-implementor-iface} @ref{activatable} @ref{buildable} @ref{orientable}
+@ref{volume-button} is a subclass of @ref{scale-button} that has been tailored for use as a volume control widget with suitable icons, tooltips and accessible labels.
+
Slots:
@itemize
@end itemize
(defun type-string-f (type)
(let ((l (ensure-list type)))
(case (first l)
+ (glib:gstrv "list of @code{string}")
((:string glib:g-string) "@code{string}")
((:int :uint :long :ulong :char :uchar :int64 :uint64) "@code{integer}")
((:boolean :bool) "@code{boolean}")
(defun type-string-s (type)
(cond
+ ((g-type= type "GStrv") "list of @code{string}")
((g-type= type +g-type-string+) "@code{string}")
((g-type= type +g-type-boolean+) "@code{boolean}")
((g-type= type +g-type-float+) "@code{single-float}")
(pixels pixbuf-pixels "pixels" "gpointer" t nil)))
(define-g-object-class "GdkPixbufAnimation" pixbuf-animation ()
- nil)
\ No newline at end of file
+ nil)
+
+(define-g-object-class "GdkImage" gdk-image
+ (:superclass g-object :export t :interfaces
+ nil :type-initializer
+ "gdk_image_get_type")
+ nil)
(eval-when (:compile-toplevel :load-toplevel :execute)
(define-foreign-library gdk
(:unix (:or "libgdk-x11-2.0.so.0" "libgdk-x11-2.0.so"))
- (t "libgdk-2.0")))
+ (:win32 "libgdk-win32-2.0-0.dll")
+ (t "libgdk-2.0"))
+ (define-foreign-library gdk-pixbuf
+ (:unix (:or "libgdk_pixbuf-2.0.so.0" "libgdk_pixbuf-2.0.so"))
+ (:win32 (:or "libgdk-pixbuf-win32-2.0-0" "libgdk-pixbuf-2.0-0.dll"))
+ (t "libgdk_pixbuf-2.0")))
-(use-foreign-library gdk)
\ No newline at end of file
+(use-foreign-library gdk)
+(use-foreign-library gdk-pixbuf)
\ No newline at end of file
"GtkScrollStep" "GtkScrollType" "GtkSideType" "GtkSpinType"
"GtkSubmenuDirection" "GtkSubmenuPlacement" "GtkTextWindowType"
"GtkToolbarChildType" "GtkToolbarSpaceStyle" "GtkTreeViewDropPosition"
- "GtkTreeViewMode" "GtkVisibility")
+ "GtkTreeViewMode" "GtkVisibility" "GtkEntryIconPosition")
:exclusions '("PangoStretch" "PangoVariant" "PangoStyle" "PangoUnderline" "GtkGLDrawingArea")
:additional-properties
'(("GtkWindow"
- (:cffi gtk::focus gtk::gtk-window-focus (g-object gtk::widget) "gtk_window_get_focus" "gtk_window_set_focus")
- (:cffi gtk::default-widget gtk::gtk-window-default-widget (g-object gtk::widget) "gtk_window_get_default_widget" "gtk_window_set_default")
- (:cffi gtk::has-frame gtk::gtk-window-has-frame :boolean "gtk_window_get_has_frame" "gtk_window_set_has_frame")
- (:cffi gtk::mnemonic-modifier gtk::gtk-window-mnemonic-modifier (g-object gdk::modifier-type) "gtk_window_get_mnemonic_modifier" "gtk_window_set_mnemonic_modifier")
- (:cffi gtk::icon-list gtk::gtk-window-icon-list (glist gtk::pixbuf :free-from-foreign t :free-to-foreign t) "gtk_window_get_icon_list" "gtk_window_set_icon_list")
- (:cffi gtk::group gtk::gtk-window-group (g-object gtk::window-group) "gtk_window_get_group" nil))
+ (:cffi gtk::focus gtk::gtk-window-focus (g-object gtk::widget)
+ "gtk_window_get_focus" "gtk_window_set_focus")
+ (:cffi gtk::default-widget gtk::gtk-window-default-widget (g-object gtk::widget)
+ "gtk_window_get_default_widget" "gtk_window_set_default")
+ (:cffi gtk::has-frame gtk::gtk-window-has-frame :boolean
+ "gtk_window_get_has_frame" "gtk_window_set_has_frame")
+ (:cffi gtk::mnemonic-modifier gtk::gtk-window-mnemonic-modifier (g-object gdk::modifier-type)
+ "gtk_window_get_mnemonic_modifier" "gtk_window_set_mnemonic_modifier")
+ (:cffi gtk::icon-list gtk::gtk-window-icon-list (glist gtk::pixbuf :free-from-foreign t :free-to-foreign t)
+ "gtk_window_get_icon_list" "gtk_window_set_icon_list")
+ (:cffi gtk::group gtk::gtk-window-group (g-object gtk::window-group)
+ "gtk_window_get_group" nil))
("GtkTreeViewColumn"
- (:cffi gtk::tree-view gtk::tree-view-column-tree-view g-object "gtk_tree_view_column_get_tree_view" nil)
- (:cffi gtk::sort-column-id gtk::tree-view-column-sort-column-id :int "gtk_tree_view_column_get_sort_column_id" "gtk_tree_view_column_set_sort_column_id")
- (:cffi gtk::cell-renderers gtk::tree-view-column-cell-renderers (glist g-object :free-from-foreign t) "gtk_tree_view_column_get_cell_renderers" nil))
+ (:cffi gtk::tree-view gtk::tree-view-column-tree-view g-object
+ "gtk_tree_view_column_get_tree_view" nil)
+ (:cffi gtk::sort-column-id gtk::tree-view-column-sort-column-id :int
+ "gtk_tree_view_column_get_sort_column_id" "gtk_tree_view_column_set_sort_column_id")
+ (:cffi gtk::cell-renderers gtk::tree-view-column-cell-renderers (glist g-object :free-from-foreign t)
+ "gtk_tree_view_column_get_cell_renderers" nil))
("GtkTreeSelection"
- (:cffi gtk::mode gtk::tree-selection-mode gtk::selection-mode "gtk_tree_selection_get_mode" "gtk_tree_selection_set_mode")
- (:cffi gtk::select-function gtk::tree-selection-select-function nil gtk::tree-selection-get-selection-function gtk::tree-selection-set-select-function))
+ (:cffi gtk::mode gtk::tree-selection-mode gtk::selection-mode
+ "gtk_tree_selection_get_mode" "gtk_tree_selection_set_mode")
+ (:cffi gtk::select-function gtk::tree-selection-select-function nil
+ gtk::tree-selection-get-selection-function gtk::tree-selection-set-select-function))
("GtkTreeView"
- (:cffi gtk::selection gtk::tree-view-selection g-object "gtk_tree_view_get_selection" nil)
- (:cffi gtk::column-drag-function gtk::tree-view-column-drag-function nil nil gtk::tree-view-set-column-drag-function)
- (:cffi gtk::bin-window gtk::tree-view-bin-window g-object "gtk_tree_view_get_bin_window" nil)
- (:cffi gtk::search-equal-func gtk::tree-view-search-equal-func nil nil gtk::tree-view-set-search-equal-func)
- (:cffi gtk::search-entry gtk::tree-view-search-entry g-object "gtk_tree_view_get_search_entry" "gtk_tree_view_set_search_entry")
- (:cffi gtk::search-position-func gtk::tree-view-search-position-func nil nil gtk::tree-view-set-search-position-func)
- (:cffi gtk::row-separator-func gtk::tree-view-row-separator-func nil nil gtk::tree-view-set-row-separartor-func))
+ (:cffi gtk::selection gtk::tree-view-selection g-object
+ "gtk_tree_view_get_selection" nil)
+ (:cffi gtk::column-drag-function gtk::tree-view-column-drag-function nil
+ nil gtk::tree-view-set-column-drag-function)
+ (:cffi gtk::bin-window gtk::tree-view-bin-window g-object
+ "gtk_tree_view_get_bin_window" nil)
+ (:cffi gtk::search-equal-func gtk::tree-view-search-equal-func nil
+ nil gtk::tree-view-set-search-equal-func)
+ (:cffi gtk::search-entry gtk::tree-view-search-entry g-object
+ "gtk_tree_view_get_search_entry" "gtk_tree_view_set_search_entry")
+ (:cffi gtk::search-position-func gtk::tree-view-search-position-func nil
+ nil gtk::tree-view-set-search-position-func)
+ (:cffi gtk::row-separator-func gtk::tree-view-row-separator-func nil
+ nil gtk::tree-view-set-row-separartor-func))
("GtkCellView"
- (:cffi gtk::displayed-row gtk::cell-view-displayed-row (g-boxed-foreign gtk::tree-path) "gtk_cell_view_get_displayed_row" "gtk_cell_view_set_displayed_row"))
+ (:cffi gtk::displayed-row gtk::cell-view-displayed-row (g-boxed-foreign gtk::tree-path)
+ "gtk_cell_view_get_displayed_row" "gtk_cell_view_set_displayed_row"))
("GtkComboBox"
- (:cffi gtk::active-iter gtk::combo-box-active-iter (g-boxed-foreign gtk::tree-iter) gtk::combo-box-get-active-iter "gtk_combo_box_set_active_iter")
- (:cffi gtk::row-separator-func gtk::combo-box-separator-func nil nil gtk::combo-box-set-separator-func))
+ (:cffi gtk::active-iter gtk::combo-box-active-iter (g-boxed-foreign gtk::tree-iter)
+ gtk::combo-box-get-active-iter "gtk_combo_box_set_active_iter")
+ (:cffi gtk::row-separator-func gtk::combo-box-separator-func nil
+ nil gtk::combo-box-set-separator-func))
("GtkMenu"
- (:cffi gtk::screen gtk::menu-screen g-object nil "gtk_menu_set_screen"))
+ (:cffi gtk::screen gtk::menu-screen g-object
+ nil "gtk_menu_set_screen"))
("GtkToolItem"
- (:cffi gtk::expand gtk::tool-item-expand :boolean "gtk_tool_item_get_expand" "gtk_tool_item_set_expand")
- (:cffi gtk::use-drag-window gtk::tool-item-use-drag-window :boolean "gtk_tool_item_get_use_drag_window" "gtk_tool_item_set_use_drag_window")
- (:cffi gtk::icon-size gtk::tool-item-icon-size gtk::icon-size "gtk_tool_item_get_icon_size" nil)
- (:cffi gtk::orientation gtk::tool-item-orientation gtk::orientation "gtk_tool_item_get_orientation" nil)
- (:cffi gtk::toolbar-style gtk::tool-item-toolbar-style gtk::toolbar-style "gtk_tool_item_get_toolbar_style" nil)
- (:cffi gtk::relief-style gtk::tool-item-relief-style gtk::relief-style "gtk_tool_item_get_relief_style" nil))
+ (:cffi gtk::expand gtk::tool-item-expand :boolean
+ "gtk_tool_item_get_expand" "gtk_tool_item_set_expand")
+ (:cffi gtk::use-drag-window gtk::tool-item-use-drag-window :boolean
+ "gtk_tool_item_get_use_drag_window" "gtk_tool_item_set_use_drag_window")
+ (:cffi gtk::icon-size gtk::tool-item-icon-size gtk::icon-size
+ "gtk_tool_item_get_icon_size" nil)
+ (:cffi gtk::orientation gtk::tool-item-orientation gtk::orientation
+ "gtk_tool_item_get_orientation" nil)
+ (:cffi gtk::toolbar-style gtk::tool-item-toolbar-style gtk::toolbar-style
+ "gtk_tool_item_get_toolbar_style" nil)
+ (:cffi gtk::relief-style gtk::tool-item-relief-style gtk::relief-style
+ "gtk_tool_item_get_relief_style" nil))
("GtkMenuToolButton"
- (:cffi gtk::arrow-tooltip-text gtk::menu-tool-button-arrow-tooltip-text :string nil "gtk_menu_tool_button_set_arrow_tooltip_text")
- (:cffi gtk::arrow-tooltip-markup gtk::menu-tool-button-arrow-tooltip-markup :string nil "gtk_menu_tool_button_set_arrow_tooltip_markup"))
+ (:cffi gtk::arrow-tooltip-text gtk::menu-tool-button-arrow-tooltip-text :string
+ nil "gtk_menu_tool_button_set_arrow_tooltip_text")
+ (:cffi gtk::arrow-tooltip-markup gtk::menu-tool-button-arrow-tooltip-markup :string
+ nil "gtk_menu_tool_button_set_arrow_tooltip_markup"))
("GtkUIManager"
- (:cffi gtk::accel-group gtk::ui-manager-accel-group g-object "gtk_ui_manager_get_accel_group" nil))
+ (:cffi gtk::accel-group gtk::ui-manager-accel-group g-object
+ "gtk_ui_manager_get_accel_group" nil))
("GtkActionGroup"
- (:cffi gtk::translate-function gtk::action-group-translate-function nil nil gtk::action-group-set-translate-func)
- (:cffi gtk::translation-domain gtk::action-group-translation-domain nil nil gtk::gtk-action-group-set-translation-domain))
+ (:cffi gtk::translate-function gtk::action-group-translate-function nil
+ nil gtk::action-group-set-translate-func)
+ (:cffi gtk::translation-domain gtk::action-group-translation-domain nil
+ nil gtk::gtk-action-group-set-translation-domain))
("GtkAction"
- (:cffi gtk::accel-path gtk::action-accel-path (:string :free-from-foreign nil :free-to-foreign t) "gtk_action_get_accel_path" "gtk_action_set_accel_path")
- (:cffi gtk::accel-group gtk::action-accel-group g-object nil "gtk_action_set_accel_group"))
+ (:cffi gtk::accel-path gtk::action-accel-path (:string :free-from-foreign nil :free-to-foreign t)
+ "gtk_action_get_accel_path" "gtk_action_set_accel_path")
+ (:cffi gtk::accel-group gtk::action-accel-group g-object
+ nil "gtk_action_set_accel_group"))
("GtkFileChooser"
- (:cffi gtk::current-name gtk::file-chooser-current-name (:string :free-to-foreign t :encoding :utf-8) nil "gtk_file_chooser_set_current_name")
- (:cffi gtk::filename gtk::file-chooser-filename (glib:g-string :free-from-foreign t :free-to-foreign t) "gtk_file_chooser_get_filename" "gtk_file_chooser_set_filename")
- (:cffi gtk::current-folder gtk::file-chooser-current-folder (glib:g-string :free-from-foreign t :free-to-foreign t) "gtk_file_chooser_get_current_folder" "gtk_file_chooser_set_current_folder")
- (:cffi gtk::uri gtk::file-chooser-uri (glib:g-string :free-from-foreign t :free-to-foreign t) "gtk_file_chooser_get_uri" "gtk_file_chooser_set_uri")
- (:cffi gtk::current-folder-uri gtk::file-chooser-current-folder-uri (glib:g-string :free-from-foreign t :free-to-foreign t) "gtk_file_chooser_get_current_folder_uri" "gtk_file_chooser_set_current_folder_uri")
- (:cffi gtk::preview-filename gtk::file-chooser-preview-filename (glib:g-string :free-from-foreign t :free-to-foreign t) "gtk_file_chooser_get_preview_filename" nil)
- (:cffi gtk::preview-uri gtk::file-chooser-preview-uri (glib:g-string :free-from-foreign t :free-to-foreign t) "gtk_file_chooser_get_preview_uri" nil))
+ (:cffi gtk::current-name gtk::file-chooser-current-name (:string :free-to-foreign t :encoding :utf-8)
+ nil "gtk_file_chooser_set_current_name")
+ (:cffi gtk::filename gtk::file-chooser-filename (glib:g-string :free-from-foreign t :free-to-foreign t)
+ "gtk_file_chooser_get_filename" "gtk_file_chooser_set_filename")
+ (:cffi gtk::current-folder gtk::file-chooser-current-folder (glib:g-string :free-from-foreign t :free-to-foreign t)
+ "gtk_file_chooser_get_current_folder" "gtk_file_chooser_set_current_folder")
+ (:cffi gtk::uri gtk::file-chooser-uri (glib:g-string :free-from-foreign t :free-to-foreign t)
+ "gtk_file_chooser_get_uri" "gtk_file_chooser_set_uri")
+ (:cffi gtk::current-folder-uri gtk::file-chooser-current-folder-uri (glib:g-string :free-from-foreign t :free-to-foreign t)
+ "gtk_file_chooser_get_current_folder_uri" "gtk_file_chooser_set_current_folder_uri")
+ (:cffi gtk::preview-filename gtk::file-chooser-preview-filename (glib:g-string :free-from-foreign t :free-to-foreign t)
+ "gtk_file_chooser_get_preview_filename" nil)
+ (:cffi gtk::preview-uri gtk::file-chooser-preview-uri (glib:g-string :free-from-foreign t :free-to-foreign t)
+ "gtk_file_chooser_get_preview_uri" nil))
("GtkFileFilter"
- (:cffi gtk::name gtk::file-filter-name :string "gtk_file_filter_get_name" "gtk_file_filter_set_name"))
+ (:cffi gtk::name gtk::file-filter-name :string
+ "gtk_file_filter_get_name" "gtk_file_filter_set_name"))
("GtkFontSelectionDialog"
- (:cffi gtk::font-name gtk::font-selection-dialog-font-name (glib:g-string :free-from-foreign t :free-to-foreign t) "gtk_font_selection_dialog_get_font_name" "gtk_font_selection_dialog_set_font_name")
- (:cffi gtk::preview-text gtk::font-selection-dialog-preview-text :string "gtk_font_selection_dialog_get_preview_text" "gtk_font_selection_dialog_set_preview_text")
- (:cffi gtk::apply-button gtk::font-selection-dialog-apply-button g-object "gtk_font_selection_dialog_get_apply_button" nil)
- (:cffi gtk::cancel-button gtk::font-selection-dialog-cancel-button g-object "gtk_font_selection_dialog_get_cancel_button" nil)
- (:cffi gtk::ok-button gtk::font-selection-dialog-ok-button g-object "gtk_font_selection_dialog_get_ok_button" nil))
+ (:cffi gtk::font-name gtk::font-selection-dialog-font-name (glib:g-string :free-from-foreign t :free-to-foreign t)
+ "gtk_font_selection_dialog_get_font_name" "gtk_font_selection_dialog_set_font_name")
+ (:cffi gtk::preview-text gtk::font-selection-dialog-preview-text :string
+ "gtk_font_selection_dialog_get_preview_text" "gtk_font_selection_dialog_set_preview_text")
+ (:cffi gtk::apply-button gtk::font-selection-dialog-apply-button g-object
+ "gtk_font_selection_dialog_get_apply_button" nil)
+ (:cffi gtk::cancel-button gtk::font-selection-dialog-cancel-button g-object
+ "gtk_font_selection_dialog_get_cancel_button" nil)
+ (:cffi gtk::ok-button gtk::font-selection-dialog-ok-button g-object
+ "gtk_font_selection_dialog_get_ok_button" nil))
("GtkFixed"
- (:cffi gtk::has-window gtk::fixed-has-window :boolean "gtk_fixed_get_has_window" "gtk_fixed_set_has_window"))
+ (:cffi gtk::has-window gtk::fixed-has-window :boolean
+ "gtk_fixed_get_has_window" "gtk_fixed_set_has_window"))
("GtkLayout"
- (:cffi gtk::bin-window gtk::layout-bin-window g-object "gtk_layout_get_bin_window" nil))
+ (:cffi gtk::bin-window gtk::layout-bin-window g-object
+ "gtk_layout_get_bin_window" nil))
("GtkCalendar"
- (:cffi gtk::detail-function gtk::calendar-detail-function nil nil gtk::calendar-set-detail-function))
+ (:cffi gtk::detail-function gtk::calendar-detail-function nil
+ nil gtk::calendar-set-detail-function))
("GtkContainer"
- (:cffi gtk::focus-child gtk::container-focus-child g-object "gtk_container_get_focus_child" "gtk_container_set_focus_child")
- (:cffi gtk::focus-vadjustment gtk::container-focus-vadjustment g-object "gtk_container_get_focus_vadjustment" "gtk_container_set_focus_vadjustment")
- (:cffi gtk::focus-hadjustment gtk::container-focus-hadjustment g-object "gtk_container_get_focus_hadjustment" "gtk_container_set_focus_hadjustment"))
+ (:cffi gtk::focus-child gtk::container-focus-child g-object
+ "gtk_container_get_focus_child" "gtk_container_set_focus_child")
+ (:cffi gtk::focus-vadjustment gtk::container-focus-vadjustment g-object
+ "gtk_container_get_focus_vadjustment" "gtk_container_set_focus_vadjustment")
+ (:cffi gtk::focus-hadjustment gtk::container-focus-hadjustment g-object
+ "gtk_container_get_focus_hadjustment" "gtk_container_set_focus_hadjustment"))
("GtkWidget"
- (:cffi gtk::direction gtk::widget-direction gtk::text-direction "gtk_widget_get_direction" "gtk_widget_set_direction")
- (:cffi gtk::composite-name gtk::widget-composite-name (glib:g-string :free-from-foreign t :free-to-foreign t) "gtk_widget_get_composite_name" "gtk_widget_set_composite_name")
- (:cffi gtk::redraw-on-allocate gtk::widget-redraw-on-allocate :boolean nil "gtk_widget_set_redraw_on_allocate")
- (:cffi gtk::accessible gtk::widget-accessible g-object "gtk_widget_get_accessible" nil)
- (:cffi gtk::tooltip-window gtk::widget-tooltip-window g-object "gtk_widget_get_tooltip_window" "gtk_widget_set_tooltip_window")
-
- (:cffi gtk::parent-window gtk::widget-parent-window (g-object gdk::window) "gtk_widget_get_parent_window" "gtk_widget_set_parent_window")
- (:cffi gtk::toplevel gtk::widget-toplevel (g-object gtk::widget) "gtk_widget_get_toplevel" nil)
- (:cffi gtk::colormap gtk::widget-colormap (g-object gdk::gdk-colormap) "gtk_widget_get_colormap" "gtk_widget_set_colormap")
- (:cffi gtk::visual gtk::widget-visual (g-object gdk::visual) "gtk_widget_get_visual" nil)
- (:cffi gtk::modifier-style gtk::widget-modifier-style (g-object gtk::rc-style) "gtk_widget_get_modifier_style" "gtk_widget_modify_style")
- (:cffi gtk::pango-context gtk::widget-pango-context g-object "gtk_widget_get_pango_context" nil)
- (:cffi gtk::child-visible gtk::widget-child-visible :boolean "gtk_widget_get_child_visible" "gtk_widget_set_child_visible"))
- ("GtkTextTag"
- (:cffi gtk::priority gtk::text-tag-priority :int "gtk_text_tag_get_priority" "gtk_text_tag_set_priority"))
- ("GtkPageSetupUnixDialog"
- (:cffi gtk::page-setup gtk::page-setup-unix-dialog-page-setup (g-object gtk::page-setup) "gtk_page_setup_unix_dialog_get_page_setup" "gtk_page_setup_unix_dialog_set_page_setup")
- (:cffi gtk::print-settings gtk::page-setup-unix-dialog-print-settings (g-object gtk::print-settings) "gtk_page_setup_unix_dialog_get_print_settings" "gtk_page_setup_unix_dialog_set_print_settings"))
+ (:cffi gtk::parent-window gtk::widget-parent-window (g-object gdk::window)
+ "gtk_widget_get_parent_window" "gtk_widget_set_parent_window")
+ (:cffi gtk::toplevel gtk::widget-toplevel (g-object gtk::widget)
+ "gtk_widget_get_toplevel" nil)
+ (:cffi gtk::colormap gtk::widget-colormap (g-object gdk::gdk-colormap)
+ "gtk_widget_get_colormap" "gtk_widget_set_colormap")
+ (:cffi gtk::visual gtk::widget-visual (g-object gdk::visual)
+ "gtk_widget_get_visual" nil)
+ (:cffi gtk::modifier-style gtk::widget-modifier-style (g-object gtk::rc-style)
+ "gtk_widget_get_modifier_style" "gtk_widget_modify_style")
+ (:cffi gtk::pango-context gtk::widget-pango-context g-object
+ "gtk_widget_get_pango_context" nil)
+ (:cffi gtk::child-visible gtk::widget-child-visible :boolean
+ "gtk_widget_get_child_visible" "gtk_widget_set_child_visible"))
+ (:cffi gtk::direction gtk::widget-direction gtk::text-direction
+ "gtk_widget_get_direction" "gtk_widget_set_direction")
+ (:cffi gtk::composite-name gtk::widget-composite-name (glib:g-string :free-from-foreign t :free-to-foreign t)
+ "gtk_widget_get_composite_name" "gtk_widget_set_composite_name")
+ (:cffi gtk::redraw-on-allocate gtk::widget-redraw-on-allocate :boolean
+ nil "gtk_widget_set_redraw_on_allocate")
+ (:cffi gtk::accessible gtk::widget-accessible g-object
+ "gtk_widget_get_accessible" nil)
+ (:cffi gtk::tooltip-window gtk::widget-tooltip-window g-object
+ "gtk_widget_get_tooltip_window" "gtk_widget_set_tooltip_window"))
("GtkWindowGroup"
- (:cffi gtk::windows gtk::window-group-windows (glist (g-object gtk::window)) "gtk_window_group_list_windows" nil))
+ (:cffi gtk::windows gtk::window-group-windows (glist (g-object gtk::window))
+ "gtk_window_group_list_windows" nil))
+ ("GtkTextTag"
+ (:cffi gtk::priority gtk::text-tag-priority :int
+ "gtk_text_tag_get_priority" "gtk_text_tag_set_priority"))
("GtkDialog"
- (:cffi gtk::content-area gtk::dialog-content-area (g-object gtk::v-box) "gtk_dialog_get_content_area" nil)
- (:cffi gtk::action-area gtk::dialog-action-area (g-object gtk::widget) "gtk_dialog_get_action_area" nil)
- (:cffi gtk::default-response gtk::dialog-default-response gtk::response-type nil "gtk_dialog_set_default_response"))))))
+ (:cffi gtk::content-area gtk::dialog-content-area (g-object gtk::v-box)
+ "gtk_dialog_get_content_area" nil)
+ (:cffi gtk::action-area gtk::dialog-action-area (g-object gtk::widget)
+ "gtk_dialog_get_action_area" nil)
+ (:cffi gtk::default-response gtk::dialog-default-response gtk::response-type
+ nil "gtk_dialog_set_default_response"))
+ ("GtkAssistant"
+ (:cffi gtk::current-page gtk::assistant-current-page :int
+ "gtk_assistant_get_current_page" "gtk_assistant_set_current_page")
+ (:cffi gtk::n-pages gtk::assistant-n-pages :int
+ "gtk_assistant_get_n_pages" nil)
+ (:cffi gtk::forward-page-function gtk::assistant-forward-page-function nil
+ nil gtk::set-assistant-forward-page-function))
+ ("GtkLabel"
+ (:cffi gtk::line-wrap gtk::label-line-wrap :boolean
+ "gtk_label_get_line_wrap" "gtk_label_set_line_wrap")
+ (:cffi gtk::line-wrap-mode gtk::label-line-wrap-mode gtk::pango-wrap-mode
+ "gtk_label_get_line_wrap_mode" "gtk_label_set_line_wrap_mode")
+ (:cffi gtk::layout gtk::label-layout g-object
+ "gtk_label_get_layout" nil)
+ (:cffi gtk::selection-bounds gtk::label-selection-bounds nil
+ gtk::gtk-label-get-selection-bounds nil)
+ (:cffi gtk::layout-offsets gtk::label-layout-offsets nil
+ gtk::gtk-label-get-layout-offsets nil))
+ ("GtkEntry"
+ (:cffi gtk::layout gtk::entry-layout g-object
+ "gtk_entry_get_layout" nil)
+ (:cffi gtk::completion gtk::entry-completion (g-object gtk::entry-completion)
+ "gtk_entry_get_completion" "gtk_entry_set_completion")
+ (:cffi gtk::cursor-hadjustment gtk::entry-cursor-hadjustment (g-object gtk::adjustment)
+ "gtk_entry_get_cursor_hadjustment" "gtk_entry_set_cursor_hadjustment")
+ (:cffi gtk::layout-offset gtk::entry-layout-offset nil
+ gtk::gtk-entry-layout-offset nil))
+ ("GtkPageSetupUnixDialog"
+ (:cffi gtk::page-setup gtk::page-setup-unix-dialog-page-setup (g-object gtk::page-setup)
+ "gtk_page_setup_unix_dialog_get_page_setup" "gtk_page_setup_unix_dialog_set_page_setup")
+ (:cffi gtk::print-settings gtk::page-setup-unix-dialog-print-settings (g-object gtk::print-settings)
+ "gtk_page_setup_unix_dialog_get_print_settings" "gtk_page_setup_unix_dialog_set_print_settings"))
+ ("GtkEntryCompletion"
+ (:cffi gtk::entry gtk::entry-completion-entry (g-object gtk::entry)
+ "gtk_entry_completion_get_entry" nil)
+ (:cffi gtk::match-function gtk::entry-completion-match-function nil
+ nil gtk::gtk-entry-completion-set-match-function))))))
(defun gtk-generate-child-properties (filename)
(with-open-file (stream filename :direction :output :if-exists :supersede)
(:file "gobject.object-defs")
(:file "gobject.cffi-callbacks")
(:file "gobject.foreign-gobject-subclassing")
-
- (:file "gobject.boxed")
- #+sbcl (:file "sbcl"))
+ (:file "gobject.boxed")
+ (:file "gobject.object-function"))
:depends-on (:cffi :trivial-garbage :iterate :bordeaux-threads :iterate :closer-mop))
\ No newline at end of file
#:g-idle-add-full
#:g-idle-add
#:g-timeout-add-full
- #:g-source-remove)
+ #:g-source-remove
+ #:at-finalize)
(:documentation
"Cl-gtk2-glib is wrapper for @a[http://library.gnome.org/devel/glib/]{GLib}."))
(defun register-initializer (key fn)
(unless (gethash key *initializers-table*)
(setf (gethash key *initializers-table*) t
- *initializers* (nconc *initializers* (list fn))))))
+ *initializers* (nconc *initializers* (list fn)))))
+ (defvar *finalizers-table* (make-hash-table :test 'equalp))
+ (defvar *finalizers* nil)
+ (defun register-finalizer (key fn)
+ (unless (gethash key *finalizers-table*)
+ (setf (gethash key *finalizers-table*) t
+ *finalizers* (nconc *finalizers* (list fn))))))
(defun run-initializers ()
(iter (for fn in *initializers*)
(funcall fn)))
+(defun run-finalizers ()
+ (iter (for fn in *finalizers*)
+ (funcall fn)))
+
+#+sbcl
+(pushnew 'run-initializers sb-ext:*init-hooks*)
+
+#+sbcl
+(pushnew 'run-finalizers sb-ext:*save-hooks*)
+
(defmacro at-init ((&rest keys) &body body)
"
@arg[keys]{list of expression}
`(progn (register-initializer (list ,@keys ',body) (lambda () ,@body))
,@body))
+(defmacro at-finalize ((&rest keys) &body body)
+ `(register-finalizer (list ,@keys ',body) (lambda () ,@body)))
+
(eval-when (:compile-toplevel :load-toplevel :execute)
(define-foreign-library glib
(:unix (:or "libglib-2.0.so.0" "libglib-2.0.so"))
- (t "libglib-2.0")))
+ (:win32 "libglib-2.0-0.dll")
+ (t (:default "libglib-2.0"))))
(use-foreign-library glib)
(eval-when (:compile-toplevel :load-toplevel :execute)
(define-foreign-library gthread
(:unix (:or "libgthread-2.0.so.0" "libgthread-2.0.so"))
+ (:win32 "libgthread-2.0-0.dll")
(t "libgthread-2.0")))
(use-foreign-library gthread)
(defcfun (g-thread-init "g_thread_init") :void
(vtable :pointer))
-(defvar *threads-initialized-p* nil)
+(defcfun g-thread-get-initialized :boolean)
(at-init ()
- (unless *threads-initialized-p*
- (g-thread-init (null-pointer))
- (setf *threads-initialized-p* t)))
+ (unless (g-thread-get-initialized)
+ (g-thread-init (null-pointer))))
(defcenum g-thread-priority
:g-thread-priority-low
:allocation ,(if (gobject-property-p property) :gobject-property :gobject-fn)
:g-property-type ,(if (gobject-property-p property) (gobject-property-type property) (cffi-property-type property))
:accessor ,(intern (format nil "~A-~A" (symbol-name class-name) (property-name property)) (symbol-package class-name))
- :initarg ,(intern (string-upcase (property-name property)) (find-package :keyword))
+ ,@(when (if (gobject-property-p property)
+ t
+ (not (null (cffi-property-writer property))))
+ `(:initarg
+ ,(intern (string-upcase (property-name property)) (find-package :keyword))))
,@(if (gobject-property-p property)
`(:g-property-name ,(gobject-property-gname property))
`(:g-getter ,(cffi-property-reader property)
- :g-setter ,(cffi-property-writer property)))))
+ :g-setter ,(cffi-property-writer property)))))
(defmacro define-g-object-class (g-type-name name
(&key (superclass 'g-object)
(eval-when (:compile-toplevel :load-toplevel :execute)
(cffi:define-foreign-library gobject
(:unix (:or "libgobject-2.0.so.0" "libgobject-2.0.so"))
+ (:win32 "libgobject-2.0-0.dll")
(t "libgobject-2.0")))
(cffi:use-foreign-library gobject)
(defmethod slot-boundp-using-class ((class gobject-class) object (slot gobject-property-effective-slot-definition))
(handler-case
- (progn (g-object-property-type (pointer object) (gobject-property-effective-slot-definition-g-property-name slot) :assert-readable t) t)
+ (and (pointer object)
+ (progn (g-object-property-type (pointer object) (gobject-property-effective-slot-definition-g-property-name slot) :assert-readable t) t))
(property-unreadable-error () nil)))
(defmethod slot-value-using-class ((class gobject-class) object (slot gobject-property-effective-slot-definition))
new-value)
(defmethod slot-boundp-using-class ((class gobject-class) object (slot gobject-fn-effective-slot-definition))
- (not (null (gobject-fn-effective-slot-definition-g-getter-fn slot))))
+ (and (pointer object)
+ (not (null (gobject-fn-effective-slot-definition-g-getter-fn slot)))))
(defmethod slot-value-using-class ((class gobject-class) object (slot gobject-fn-effective-slot-definition))
(let ((fn (gobject-fn-effective-slot-definition-g-getter-fn slot)))
--- /dev/null
+(in-package :gobject)
+
+(defcstruct object-func-ref
+ (:object :pointer)
+ (:fn-id :int))
+
+(defmacro define-cb-methods (name return-type (&rest args))
+ (flet ((make-name (control-string) (intern (format nil control-string (symbol-name name)) (symbol-package name))))
+ (let ((call-cb (make-name "~A-CB"))
+ (destroy-cb (make-name "~A-DESTROY-NOTIFY"))
+ (object (gensym "OBJECT"))
+ (fn-id (gensym "FN-ID"))
+ (fn (gensym "FN"))
+ (data (gensym "DATA"))
+ (arg-names (mapcar #'first args)))
+ `(progn
+ (defcallback ,call-cb ,return-type (,@args (,data :pointer))
+ (let* ((,object (convert-from-foreign (foreign-slot-value ,data 'object-func-ref :object) 'g-object))
+ (,fn-id (foreign-slot-value ,data 'object-func-ref :fn-id))
+ (,fn (retrieve-handler-from-object ,object ,fn-id)))
+ (funcall ,fn ,@arg-names)))
+ (defcallback ,destroy-cb :void ((,data :pointer))
+ (let* ((,object (convert-from-foreign (foreign-slot-value ,data 'object-func-ref :object) 'g-object))
+ (,fn-id (foreign-slot-value ,data 'object-func-ref :fn-id)))
+ (delete-handler-from-object ,object ,fn-id))
+ (foreign-free ,data))))))
+
+(defun create-fn-ref (object function)
+ (let ((ref (foreign-alloc 'object-func-ref))
+ (fn-id (save-handler-to-object object function)))
+ (setf (foreign-slot-value ref 'object-func-ref :object)
+ (pointer object)
+ (foreign-slot-value ref 'object-func-ref :fn-id)
+ fn-id)
+ ref))
(defvar *current-object-from-pointer* nil)
(defvar *currently-making-object-p* nil)
+(at-finalize ()
+ (clrhash *foreign-gobjects-weak*)
+ (clrhash *foreign-gobjects-strong*)
+ (setf *current-creating-object* nil
+ *current-object-from-pointer* nil
+ *currently-making-object-p* nil))
+
(defun ref-count (pointer)
(foreign-slot-value (if (pointerp pointer) pointer (pointer pointer)) 'g-object-struct :ref-count))
+(defmethod release ((obj g-object))
+ (cancel-finalization obj)
+ (let ((p (pointer obj)))
+ (setf (pointer obj) nil)
+ (g-object-dispose-carefully p)))
+
(defmethod initialize-instance :around ((obj g-object) &key)
(when *currently-making-object-p*
(setf *currently-making-object-p* t))
#:get-flags-items
#:stable-pointer-value
#:g-value-type
- #:create-g-closure
#:g-object-call-constructor
#:g-object-call-get-property
#:g-object-call-set-property
#:g-boxed-foreign
#:boxed-related-symbols
#:define-boxed-opaque-accessor
- #:glib-defcallback)
+ #:glib-defcallback
+ #:create-signal-handler-closure
+ #:save-handler-to-object
+ #:retrieve-handler-from-object
+ #:delete-handler-from-object
+ #:disconnect-signal
+ #:define-cb-methods
+ #:create-fn-ref)
(:documentation
"CL-GTK2-GOBJECT is a binding to GObject type system.
For information on GObject, see its @a[http://library.gnome.org/devel/gobject/stable/]{documentation}.
(in-package :gobject)
+;;; Signal handler closures
+
(defcstruct lisp-signal-handler-closure
(:parent-instance g-closure)
(:object :pointer)
(let ((id (find-free-signal-handler-id object))
(handlers (g-object-signal-handlers object)))
(if id
- (setf (aref handlers id) handler)
- (vector-push-extend handler handlers))))
+ (progn (setf (aref handlers id) handler) id)
+ (progn (vector-push-extend handler handlers) (1- (length handlers))))))
(defun retrieve-handler-from-object (object handler-id)
(aref (g-object-signal-handlers object) handler-id))
(g-value-unset return-value))))
(iter (for i from 0 below (1+ params-count))
(g-value-unset (mem-aref params 'g-value i))))))))
+
+(defcfun (disconnect-signal "g_signal_handler_disconnect") :void
+ (object g-object)
+ (handler-id :ulong))
+++ /dev/null
-(in-package :glib)
-
-#+thread-support
-(progn
- (defun glib-stop-thread ()
- (setf *threads-initialized-p* nil))
- (pushnew 'glib-stop-thread sb-ext:*save-hooks*))
-
-(defun map-inherited-classes (class fn)
- (when (symbolp class) (setf class (find-class class)))
- (when class
- (funcall fn class)
- (iter (for subclass in (closer-mop:class-direct-subclasses class))
- (map-inherited-classes subclass fn))))
-
-(pushnew 'run-initializers sb-ext:*init-hooks*)
(glut:init))
(at-init () (gl-init))
+(at-finalize () (setf cl-glut::*glut-initialized-p* nil))
;; Query
(eval-when (:compile-toplevel :load-toplevel :execute)
(define-foreign-library gtkglext
(:unix (:or "libgtkglext-x11-1.0.so.0" "libgtkglext-x11-1.0.so"))
+ (:win32 "libgtkglext-win32-1.0-0.dll")
(t (:default "libgtkglext-1.0")))
(define-foreign-library gdkglext
(:unix (:or "libgdkglext-x11-1.0.so.0" "libgdkglext-x11-1.0.so"))
+ (:win32 "libgtkglext-win32-1.0-0.dll")
(t (:default "libgdkglext-1.0"))))
(use-foreign-library gtkglext)
(:file "gtk.child-properties")
(:file "gtk.widget")
(:file "gtk.builder")
-
+ (:file "gtk.assistant")
+ (:file "gtk.link-button")
+
(:file "gtk.main-loop-events")
(:file "gtk.dialog.example")
(:file "gtk.demo")
- #+sbcl (:file "sbcl")
(:module "demo-files"
:pathname "demo"
:components ((:static-file "demo1.glade")
--- /dev/null
+(in-package :gtk)
+
+(defcfun (assistant-nth-page "gtk_assistant_get_nth_page") (g-object widget)
+ (assistant (g-object assistant))
+ (page-num :int))
+
+(export 'assistant-nth-page)
+
+(defcfun (assistant-append-page "gtk_assistant_append_page") :int
+ (assistant (g-object assistant))
+ (page (g-object widget)))
+
+(export 'assistant-append-page)
+
+(defcfun (assistant-prepend-page "gtk_assistant_prepend_page") :int
+ (assistant (g-object assistant))
+ (page (g-object widget)))
+
+(export 'assistant-prepend-page)
+
+(defcfun (assistant-insert-page "gtk_assistant_insert_page") :int
+ (assistant (g-object assistant))
+ (page (g-object widget))
+ (position :int))
+
+(export 'assistant-insert-page)
+
+(defcfun gtk-assistant-set-forward-page-func :void
+ (assistant (g-object assistant))
+ (page-func :pointer)
+ (data :pointer)
+ (destroy-notify :pointer))
+
+(define-cb-methods assistant-page-func :int ((current-page :int)))
+
+(defun set-assistant-forward-page-function (assistant function)
+ (if function
+ (gtk-assistant-set-forward-page-func assistant
+ (callback assistant-page-func-cb)
+ (create-fn-ref assistant function)
+ (callback assistant-page-func-destroy-notify))
+ (gtk-assistant-set-forward-page-func assistant (null-pointer) (null-pointer) (null-pointer))))
+
+(defcfun (assistant-add-action-widget "gtk_assistant_add_action_widget") :void
+ (assistant (g-object assistant))
+ (widget (g-object widget)))
+
+(export 'assistant-add-action-widget)
+
+(defcfun (assistant-remove-action-widget "gtk_assistant_remove_action_widget") :void
+ (assistant (g-object assistant))
+ (widget (g-object widget)))
+
+(export 'assistant-remove-action-widget)
+
+(defcfun (assistant-update-buttons-state "gtk_assistant_update_buttons_state") :void
+ (assistant (g-object assistant)))
+
+(export 'assistant-update-buttons-state)
+
+
#:test-pixbuf
#:test-image
#:test-progress-bar
- #:test-status-bar
+ #:test-statusbar
#:test-scale-button
#:test-text-view
#:demo-code-editor
#:demo-text-editor
#:demo-class-browser
#:demo-treeview-tree
- #:test-custom-window))
+ #:test-custom-window
+ #:test-assistant
+ #:test-entry-completion))
(in-package :gtk-demo)
(coerce (read-from-string (entry-text entry)) 'real))))
(widget-show window))))
-(defun test-status-bar ()
+(defun test-statusbar ()
(within-main-loop
(let* ((window (make-instance 'gtk-window :title "Text status bar"))
(v-box (make-instance 'v-box))
(h-box (make-instance 'h-box))
(label (make-instance 'label :label "Test of status bar" :xalign 0.5 :yalign 0.5))
- (status-bar (make-instance 'statusbar :has-resize-grip t))
+ (statusbar (make-instance 'statusbar :has-resize-grip t))
(button-push (make-instance 'button :label "Push"))
(button-pop (make-instance 'button :label "Pop"))
(entry (make-instance 'entry))
(leave-gtk-main)))
(g-signal-connect button-push "clicked" (lambda (b)
(declare (ignore b))
- (status-bar-push status-bar "lisp-prog" (entry-text entry))))
+ (statusbar-push statusbar "lisp-prog" (entry-text entry))))
(g-signal-connect button-pop "clicked" (lambda (b)
(declare (ignore b))
- (status-bar-pop status-bar "lisp-prog")))
+ (statusbar-pop statusbar "lisp-prog")))
(g-signal-connect icon "activate" (lambda (i)
(declare (ignore i))
(let ((message-dialog (make-instance 'message-dialog
(box-pack-start h-box button-push :expand nil)
(box-pack-start h-box button-pop :expand nil)
(box-pack-start v-box label)
- (box-pack-start v-box status-bar :expand nil)
+ (box-pack-start v-box statusbar :expand nil)
(widget-show window)
(setf (status-icon-screen icon) (gtk-window-screen window)))))
#+nil(print (current-event))
(setf (text-buffer-text (text-view-buffer text-view))
(format nil "Clicked ~A times~%" (incf c)))
- (status-bar-pop (builder-get-object builder "statusbar1")
+ (statusbar-pop (builder-get-object builder "statusbar1")
"times")
- (status-bar-push (builder-get-object builder "statusbar1")
+ (statusbar-push (builder-get-object builder "statusbar1")
"times"
(format nil "~A times" c))))
("quit_cb" ,(lambda (&rest args)
(dialog-run d)
(object-destroy d)))))))
(g-signal-connect (builder-get-object builder "window1") "destroy" (lambda (w) (declare (ignore w)) (leave-gtk-main)))
- (status-bar-push (builder-get-object builder "statusbar1") "times" "0 times")
+ (statusbar-push (builder-get-object builder "statusbar1") "times" "0 times")
(widget-show (builder-get-object builder "window1")))))
(defun read-text-file (file-name)
builder))
(window (builder-get-object builder "window1"))
(text-view (builder-get-object builder "textview1"))
- (status-bar (builder-get-object builder "statusbar1"))
+ (statusbar (builder-get-object builder "statusbar1"))
(file-name nil)
(modified-p t))
- (status-bar-push status-bar "filename" "Untitled *")
+ (statusbar-push statusbar "filename" "Untitled *")
(labels ((set-properties ()
- (status-bar-pop status-bar "filename")
- (status-bar-push status-bar "filename" (format nil "~A~:[~; *~]" (or file-name "Untitled") modified-p)))
+ (statusbar-pop statusbar "filename")
+ (statusbar-push statusbar "filename" (format nil "~A~:[~; *~]" (or file-name "Untitled") modified-p)))
(new (&rest args) (declare (ignore args))
(setf file-name nil
modified-p t
(within-main-loop
(let ((w (make-instance 'custom-window)))
(widget-show w))))
+
+(defun test-assistant ()
+ (let ((output *standard-output*))
+ (within-main-loop
+ (let ((d (make-instance 'assistant :title "Username wizard"))
+ (p-1 (make-instance 'h-box))
+ (entry (make-instance 'entry))
+ (p-2 (make-instance 'label :label "Click Apply to close this wizard")))
+ (box-pack-start p-1 (make-instance 'label :label "Enter your name:") :expand nil)
+ (box-pack-start p-1 entry)
+ (assistant-append-page d p-1)
+ (assistant-append-page d p-2)
+ (setf (assistant-child-title d p-1) "Username wizard"
+ (assistant-child-title d p-2) "Username wizard"
+ (assistant-child-complete d p-1) nil
+ (assistant-child-complete d p-2) t
+ (assistant-child-page-type d p-1) :intro
+ (assistant-child-page-type d p-2) :confirm
+ (assistant-forward-page-function d) (lambda (i)
+ (format output "(assistant-forward-page-function ~A)~%" i)
+ (ecase i
+ (0 1)
+ (1 -1))))
+ (connect-signal entry "notify::text" (lambda (object pspec)
+ (declare (ignore object pspec))
+ (setf (assistant-child-complete d p-1)
+ (plusp (length (entry-text entry))))))
+ (let ((w (make-instance 'label :label "A label in action area")))
+ (widget-show w)
+ (assistant-add-action-widget d w))
+ (connect-signal d "cancel" (lambda (assistant)
+ (declare (ignore assistant))
+ (object-destroy d)
+ (format output "Canceled~%")))
+ (connect-signal d "close" (lambda (assistant)
+ (declare (ignore assistant))
+ (object-destroy d)
+ (format output "Thank you, ~A~%" (entry-text entry))))
+ (connect-signal d "prepare" (lambda (assistant page-widget)
+ (declare (ignore assistant page-widget))
+ (format output "Assistant ~A has ~A pages and is on ~Ath page~%"
+ d (assistant-n-pages d) (assistant-current-page d))))
+ (widget-show d)))))
+
+(defun test-entry-completion ()
+ (within-main-loop
+ (let* ((w (make-instance 'gtk-window))
+ (model (make-instance 'tree-lisp-store)))
+ (tree-lisp-store-add-column model "gchararray" #'identity)
+ (tree-node-insert-at (tree-lisp-store-root model) (make-tree-node :item "Monday") 0)
+ (tree-node-insert-at (tree-lisp-store-root model) (make-tree-node :item "Tuesday") 0)
+ (tree-node-insert-at (tree-lisp-store-root model) (make-tree-node :item "Wednesday") 0)
+ (tree-node-insert-at (tree-lisp-store-root model) (make-tree-node :item "Thursday") 0)
+ (tree-node-insert-at (tree-lisp-store-root model) (make-tree-node :item "Friday") 0)
+ (tree-node-insert-at (tree-lisp-store-root model) (make-tree-node :item "Saturday") 0)
+ (tree-node-insert-at (tree-lisp-store-root model) (make-tree-node :item "Sunday") 0)
+ (let* ((completion (make-instance 'entry-completion :model model :text-column 0))
+ (e (make-instance 'entry :completion completion)))
+ (setf (entry-completion-text-column completion) 0)
+ (container-add w e))
+ (widget-show w))))
\ No newline at end of file
(dialog-add-button dialog "Yes" :yes)
(dialog-add-button dialog "Cancel" :cancel)
(setf (dialog-default-response dialog) :cancel)
- (setf (dialog-alternative-button-order dialog) (list :yes :cancel :ok))
+ (set-dialog-alternative-button-order dialog (list :yes :cancel :ok))
(format t "Response was: ~S~%" (dialog-run dialog))
(object-destroy dialog)))))
(let ((button (make-instance 'button :label "About")))
(dialog-set-alternative-button-order-from-array dialog (length response-list) new-order))
response-list)
+(export 'set-dialog-alternative-button-order)
+
(defmacro with-gtk-message-error-handler (&body body)
(let ((dialog (gensym))
(e (gensym)))
;; GtkEntry
-(defcfun (entry-layout "gtk_entry_get_layout") g-object ;;PangoLayout
- (entry (g-object entry)))
-
-(export 'entry-layout)
-
(defcfun gtk-entry-get-layout-offsets :void
(entry (g-object entry))
(x (:pointer :int))
(y (:pointer :int)))
-(defun entry-layout-offset (entry)
+(defun gtk-entry-layout-offset (entry)
(with-foreign-objects ((x :int) (y :int))
(gtk-entry-get-layout-offsets entry x y)
- (values (mem-ref x :int) (mem-ref y :int))))
-
-(export 'entry-layout-offset)
+ (list (mem-ref x :int) (mem-ref y :int))))
(defcfun (entry-layout-index-to-text-index "gtk_entry_layout_index_to_text_index") :int
(entry (g-object entry))
(layout-index :int))
+(export 'entry-layout-index-to-text-index)
+
(defcfun (entry-text-index-to-layout-index "gtk_entry_text_index_to_layout_index") :int
(entry (g-object entry))
(text-index :int))
-(defcfun gtk-entry-set-completion :void
- (entry (g-object entry))
- (completion (g-object entry-completion)))
-
-(defcfun gtk-entry-get-completion (g-object entry-completion)
- (entry (g-object entry)))
-
-(defun entry-completion (entry)
- (gtk-entry-get-completion entry))
-
-(defun (setf entry-completion) (completion entry)
- (gtk-entry-set-completion entry completion))
+(export 'entry-text-index-to-layout-info)
-(export 'entry-completion)
-
-(defcfun gtk-entry-set-cursor-hadjustment :void
+(defcfun (entry-icon-at-pos "gtk_entry_get_icon_at_pos") :int
(entry (g-object entry))
- (adjustment (g-object adjustment)))
+ (x :int)
+ (y :int))
-(defcfun (entry-cursor-hadjustment "gtk_entry_get_cursor_hadjustment") (g-object adjustment)
- (entry (g-object entry)))
+(export 'entry-icon-at-pos)
-(defun (setf entry-cursor-hadjustment) (adjustment entry)
- (gtk-entry-set-cursor-hadjustment entry adjustment))
+(defcfun (entry-progress-pulse "gtk_entry_progress_pulse") :void
+ (entry (g-object entry)))
-(export 'entry-cursor-hadjustment)
+(export 'entry-progress-pulse)
;; GtkEditable
(defun (setf editable-editable) (is-editable editable)
(gtk-editable-set-editable editable is-editable))
-(export 'editable-editable)
\ No newline at end of file
+(export 'editable-editable)
+
+;; GtkEntryCompletion
+
+(define-cb-methods entry-completion-match-func :boolean
+ ((completion (g-object entry-completion))
+ (key :string)
+ (iter (g-boxed-foreign tree-iter))))
+
+(defcfun (%gtk-entry-completion-set-match-func "gtk_entry_completion_set_match_func") :void
+ (completion (g-object entry-completion))
+ (func :pointer)
+ (data :pointer)
+ (destroy-notify :pointer))
+
+(defun gtk-entry-completion-set-match-func (completion function)
+ (if function
+ (%gtk-entry-completion-set-match-func completion
+ (callback entry-completion-match-func-cb)
+ (create-fn-ref completion function)
+ (callback entry-completion-match-func-destroy-notify))
+ (%gtk-entry-completion-set-match-func completion
+ (null-pointer)
+ (null-pointer)
+ (null-pointer))))
+
+(defcfun (entry-completion-complete "gtk_entry_completion_complete") :void
+ (completion (g-object entry-completion)))
+
+(export 'entry-completion-complete)
+
+(defcfun (entry-completion-completion-prefix "gtk_entry_completion_get_completion_prefix") (:string :free-from-foreign t)
+ (completion (g-object entry-completion)))
+
+(export 'entry-completion-completion-prefix)
+
+(defcfun (entry-completion-insert-prefix "gtk_entry_completion_insert_prefix") :void
+ (completion (g-object entry-completion)))
+
+(export 'entry-completion-completion-prefix)
+
+(defcfun (entry-completion-insert-action-text "gtk_entry_completion_insert_action_text") :void
+ (completion (g-object entry-completion))
+ (index :int)
+ (text :string))
+
+(export 'entry-completion-insert-action-text)
+
+(defcfun (entry-copmletion-insert-action-markup "gtk_entry_completion_insert_action_markup") :void
+ (completion (g-object entry-completion))
+ (index :int)
+ (markup :string))
+
+(export 'entry-completion-insert-action-markup)
+
+(defcfun (entry-completion-delete-action "gtk_entry_completion_delete_action") :void
+ (completion (g-object entry-completion))
+ (index :int))
+
+(export 'entry-completion-delete-action)
(:export t :type-initializer "gtk_visibility_get_type")
(:none 0) (:partial 1) (:full 2))
+(define-g-enum "GtkEntryIconPosition" entry-icon-position
+ (:export t :type-initializer "gtk_entry_icon_position_get_type")
+ (:primary 0) (:secondary 1))
+
(define-g-flags "GtkTextSearchFlags" text-search-flags
(:export t :type-initializer "gtk_text_search_flags_get_type")
(:visible-only 1) (:text-only 2))
(:superclass gtk-window :export t :interfaces
("AtkImplementorIface" "GtkBuildable")
:type-initializer "gtk_assistant_get_type")
- nil)
+ ((:cffi current-page assistant-current-page :int
+ "gtk_assistant_get_current_page"
+ "gtk_assistant_set_current_page")
+ (:cffi n-pages assistant-n-pages :int
+ "gtk_assistant_get_n_pages" nil)
+ (:cffi forward-page-function
+ assistant-forward-page-function nil nil
+ set-assistant-forward-page-function)))
(define-g-object-class "GtkDialog" dialog
(:superclass gtk-window :export t :interfaces
t)
(width-chars entry-width-chars "width-chars" "gint" t
t)
- (xalign entry-xalign "xalign" "gfloat" t t)))
+ (xalign entry-xalign "xalign" "gfloat" t t)
+ (:cffi layout entry-layout g-object
+ "gtk_entry_get_layout" nil)
+ (:cffi completion entry-completion
+ (g-object entry-completion) "gtk_entry_get_completion"
+ "gtk_entry_set_completion")
+ (:cffi cursor-hadjustment entry-cursor-hadjustment
+ (g-object adjustment)
+ "gtk_entry_get_cursor_hadjustment"
+ "gtk_entry_set_cursor_hadjustment")
+ (:cffi layout-offset entry-layout-offset nil
+ gtk-entry-layout-offset nil)))
(define-g-object-class "GtkSpinButton" spin-button
(:superclass entry :export t :interfaces
t)
(wrap label-wrap "wrap" "gboolean" t t)
(wrap-mode label-wrap-mode "wrap-mode" "PangoWrapMode"
- t t)))
+ t t)
+ (:cffi line-wrap label-line-wrap :boolean
+ "gtk_label_get_line_wrap" "gtk_label_set_line_wrap")
+ (:cffi line-wrap-mode label-line-wrap-mode
+ pango-wrap-mode "gtk_label_get_line_wrap_mode"
+ "gtk_label_set_line_wrap_mode")
+ (:cffi layout label-layout g-object
+ "gtk_label_get_layout" nil)
+ (:cffi selection-bounds label-selection-bounds nil
+ gtk-label-get-selection-bounds nil)
+ (:cffi layout-offsets label-layout-offsets nil
+ gtk-label-get-layout-offsets nil)))
(define-g-object-class "GtkAccelLabel" accel-label
(:superclass label :export t :interfaces
(popup-single-match entry-completion-popup-single-match
"popup-single-match" "gboolean" t t)
(text-column entry-completion-text-column "text-column"
- "gint" t t)))
+ "gint" t t)
+ (:cffi entry entry-completion-entry (g-object entry)
+ "gtk_entry_completion_get_entry" nil)
+ (:cffi match-function entry-completion-match-function
+ nil nil gtk-entry-completion-set-match-function)))
(define-g-object-class "GtkIconFactory" icon-factory
(:superclass g-object :export t :interfaces
(in-package :gtk)
-(defcfun gtk-label-get-layout-offsets :void
+(defcfun (%gtk-label-get-layout-offsets "gtk_label_get_layout_offsets") :void
(label (g-object label))
(x (:pointer :int))
(y (:pointer :int)))
-(defun label-layout-offsets (label)
+(defun gtk-label-get-layout-offsets (label)
(with-foreign-objects ((x :int) (y :int))
(gtk-label-get-layout-offsets label x y)
- (values (mem-ref x :int) (mem-ref y :int))))
-
-(export 'label-layout-offsets)
+ (list (mem-ref x :int) (mem-ref y :int))))
(defcfun (label-select-region "gtk_label_select_region") :void
(label (g-object label))
(export 'label-select-region)
-(defcfun (label-layout "gtk_label_get_layout") g-object ;(g-object pango-layout)
- (label (g-object label)))
+(defcfun (%gtk-label-get-selection-bounds "gtk_label_get_selection_bounds") :boolean
+ (label (g-object label))
+ (start (:pointer :int))
+ (end (:pointer :int)))
-(export 'label-layout)
\ No newline at end of file
+(defun gtk-label-get-selection-bounds (label)
+ (with-foreign-objects ((start :int) (end :int))
+ (when (%gtk-label-get-selection-bounds label start end)
+ (list (mem-ref start :int) (mem-ref end :int)))))
--- /dev/null
+(in-package :gtk)
+
+(defvar *link-button-uri-func* nil)
+
+(defcallback link-button-uri-func-cb :void
+ ((button (g-object link-button)) (link (:string :free-from-foreign nil)) (user-data :pointer))
+ (declare (ignore user-data))
+ (funcall *link-button-uri-func* button link))
+
+(defcallback link-button-uri-func-destroy-cb :void
+ ((data :pointer))
+ (declare (ignore data))
+ (setf *link-button-uri-func* nil))
+
+(defcfun gtk-link-button-set-uri-hook :void
+ (func :pointer)
+ (data :pointer)
+ (destroy-notify :pointer))
+
+(defun (setf link-button-global-uri-hook) (new-value)
+ (if new-value
+ (gtk-link-button-set-uri-hook (callback link-button-uri-func-cb)
+ (null-pointer)
+ (callback link-button-uri-func-destroy-cb))
+ (gtk-link-button-set-uri-hook (null-pointer)
+ (null-pointer)
+ (null-pointer)))
+ (setf *link-button-uri-func* new-value))
+
+(export 'link-button-global-uri-hook)
(error "Cannot initialize Gtk+"))
(foreign-free (mem-ref argv '(:pointer :string))))))
-(gtk-init)
+(at-init () (gtk-init))
(defcfun gtk-main :void)
(defvar *main-thread* nil)
#+thread-support
+(at-finalize ()
+ (when (and *main-thread* (bt:thread-alive-p *main-thread*))
+ (bt:destroy-thread *main-thread*)
+ (setf *main-thread* nil)))
+
+#+thread-support
(defun ensure-gtk-main ()
(when (and *main-thread* (not (bt:thread-alive-p *main-thread*)))
(setf *main-thread* nil))
(unless *main-thread*
- (setf *main-thread* (bt:make-thread (lambda () (gtk:gtk-main)) :name "cl-gtk2 main thread"))))
+ (setf *main-thread* (bt:make-thread (lambda () (gtk-main)) :name "cl-gtk2 main thread"))))
#+thread-support
(defun join-main-thread ()
(defmacro with-main-loop (&body body)
`(progn
,@body
- (gtk-main)))
+ (ensure-gtk-main)))
(export 'with-main-loop)
\ No newline at end of file
(export 'tree-path)
(export 'tree-path-indices)
+
+(define-g-enum "PangoWrapMode" pango-wrap-mode
+ (:export t :type-initializer
+ "pango_wrap_mode_get_type")
+ (:word 0) (:char 1) (:word-char 2))
+
+(define-g-enum "PangoEllipsizeMode" pango-ellipsize-mode
+ (:export t :type-initializer
+ "pango_ellipsize_mode_get_type")
+ (:none 0) (:start 1) (:middle 2) (:end 3))
\ No newline at end of file
(eval-when (:compile-toplevel :load-toplevel :execute)
(define-foreign-library gtk
(:unix (:or "libgtk-x11-2.0.so.0" "libgtk-x11-2.0.so"))
+ (:win32 (:or "libgtk-2.0-0.dll" "libgtk-win32-2.0-0.dll"))
(t "libgtk-2.0")))
(use-foreign-library gtk)
(in-package :gtk)
-(defcfun gtk-statusbar-get-context-id :uint
- (status-bar (g-object statusbar))
+(defcfun (statusbar-get-context-id "gtk_statusbar_get_context_id") :uint
+ (statusbar (g-object statusbar))
(context-description :string))
(defcfun gtk-statusbar-push :uint
- (status-bar (g-object statusbar))
+ (statusbar (g-object statusbar))
(context-id :uint)
(text :string))
(defcfun gtk-statusbar-pop :void
- (status-bar (g-object statusbar))
+ (statusbar (g-object statusbar))
(context-id :uint))
(defcfun gtk-statusbar-remove :void
- (status-bar (g-object statusbar))
+ (statusbar (g-object statusbar))
(context-id :uint)
(message-id :uint))
-(defun status-bar-push (status-bar context text)
- (gtk-statusbar-push status-bar (gtk-statusbar-get-context-id status-bar context) text))
+(defun statusbar-context-id (statusbar context)
+ (etypecase context
+ (integer context)
+ (string (statusbar-get-context-id statusbar context))))
-(defun status-bar-pop (status-bar context)
- (gtk-statusbar-pop status-bar (gtk-statusbar-get-context-id status-bar context)))
+(defun statusbar-push (statusbar context text)
+ (gtk-statusbar-push statusbar (statusbar-context-id statusbar context) text))
-(defun status-bar-remove (status-bar context message-id)
- (gtk-statusbar-remove status-bar (gtk-statusbar-get-context-id status-bar context) message-id))
+(defun statusbar-pop (statusbar context)
+ (gtk-statusbar-pop statusbar (statusbar-context-id statusbar context)))
-(export 'status-bar-push)
-(export 'status-bar-pop)
-(export 'status-bar-remove)
\ No newline at end of file
+(defun statusbar-remove (statusbar context message-id)
+ (gtk-statusbar-remove statusbar (statusbar-context-id statusbar context) message-id))
+
+(export 'statusbar-push)
+(export 'statusbar-pop)
+(export 'statusbar-remove)
+(export 'statusbar-context-id)
\ No newline at end of file
+++ /dev/null
-(in-package :gtk)
-
-#+thread-support
-(progn
- (defun stop-main-thread-on-save ()
- (when (and *main-thread* (bt:thread-alive-p *main-thread*))
- (within-main-loop-and-wait (gtk-main-quit))
- (bt:destroy-thread *main-thread*)
- (setf *main-thread* nil)))
- (defun cl-gtk2-sbcl-init ()
- (gtk-init))
- (pushnew 'cl-gtk2-sbcl-init sb-ext:*init-hooks*)
- (pushnew 'stop-main-thread-on-save sb-ext:*save-hooks*))
-