Up: cl-cffi-gtk API documentation

Package gtk

This is the API documentation of a Lisp binding to GTK+. GTK+ is a library for creating graphical user interfaces. It works on many UNIX-like platforms, Windows, and OS X. GTK+ is released under the GNU Library General Public License (GNU LGPL), which allows for flexible licensing of client applications. GTK+ has a C-based object-oriented architecture that allows for maximum flexibility. Bindings for many other languages have been written, including C++, Objective-C, Guile/Scheme, Perl, Python, TOM, Ada95, Free Pascal, and Eiffel.

About This Package

Application support
Interface builder
Windows
Layout Containers
Display Widgets
Buttons and Toggles
Numeric and Text Data Entry
GTK+ Core Reference
Theming in GTK+
Multiline Text Editor
Tree, List and Icon Grid Widgets
Menus, Combo Box, Toolbar
Action-based menus and toolbars
Selectors (Color, File and Font)
Ornaments
Scrolling
Printing
Miscellaneous
Abstract Base Classes
Cross-process Embedding
Recently Used Documents
Choosing from installed applications
Deprecated

Application support


GtkApplication

Application class

gtk-application is a class that handles many important aspects of a GTK+ application in a convenient fashion, without enforcing a one-size-fits-all application model. ...

Types of user actions that may be blocked by the function gtk-application-inhibit. ...

Creates a new gtk-application object. ...

Adds a window to application. ...

Remove a window from application. ...

Gets a list of the gtk-window's associated with application. ...

Returns the gtk-application-window with the given ID. ...

Inform the session manager that certain types of actions should be inhibited. This is not guaranteed to work on all platforms and for all types of actions. ...

Removes an inhibitor that has been established with the function gtk-application-inhibit. Inhibitors are also cleared when the application exits. ...

Installs an accelerator that will cause the named action to be activated when the key combination specificed by accelerator is pressed. ...

Removes an accelerator that has been previously added with the function gtk-application-add-accelerator. ...


GtkApplicationWindow

gtk-window subclass with gtk-application support.

gtk-application-window is a gtk-window subclass that offers some extra functionality for better integration with gtk-application features. ...

Creates a new gtk-application-window widget. ...

Returns the unique ID of the window. If the window has not yet been added to a gtk-application, returns 0. ...


GtkActionable

An interface for widgets that can be associated with actions.

This interface provides a convenient way of associating widgets with actions on a gtk-application-window or gtk-application. ...

Sets the action-name and associated string target value of an actionable widget. ...

Interface builder


GtkBuilder

Build an interface from an XML UI definition.

A gtk-builder is an auxiliary object that reads textual descriptions of a user interface and instantiates the described objects. ...

Error codes that identify various errors that can occur while using gtk-builder. ...

Creates a new builder object. ...

Parses a file containing a gtk-builder UI definition and merges it with the current contents of builder. ...

Parses a string containing a gtk-builder UI definition and merges it with the current contents of builder. ...

Parses a file containing a gtk-builder UI definition building only the requested objects and merges them with the current contents of builder. ...

Parses a string containing a gtk-builder UI definition building only the requested objects and merges them with the current contents of builder. ...

Gets the object named name. ...

Gets all objects that have been constructed by builder. ...

This method is a simpler variation of the function gtk-builder-connect-signals-full. ...

This function can be thought of the interpreted language binding version of the function gtk-builder-connect-signals, except that it does not require GModule to function correctly. ...


GtkBuildable

Interface for objects that can be built by gtk-builder.

Interface for objects that can be built by gtk-builder. ...

Sets the name of the buildable object. ...

Gets the name of the buildable object. ...

Windows


GtkDialog

Create popup windows.

Dialog windows are a convenient way to prompt the user for a small amount of input, e. g. to display a message, ask a question, or anything else that does not require extensive effort on the user's part. ...

Flags used to influence the dialog construction. ...

Predefined values for use as response IDs in the function gtk-dialog-add-button. ...

Creates a new dialog window. ...

Creates a new gtk-dialog window with title title, or nil for the default title, see the function gtk-window-title, and transient parent parent, or nil for none, see the function gtk-window-transient-for. ...

Blocks in a recursive main loop until the dialog either emits the "response" signal, or is destroyed. ...

Emits the "response" signal with the given response ID. ...

Adds a button with the given text or a stock button, if button-text is a stock ID and sets things up so that clicking the button will emit the "response" signal with the given response-id. ...

Adds more buttons, same as calling the function gtk-dialog-add-button repeatedly. ...

Adds an activatable child widget to the action area of a gtk-dialog window, connecting a signal handler that will emit the "response" signal on the dialog when the child widget is activated. ...

Sets the last widget in the dialog's action area with the given response-id as the default widget for the dialog. ...

Calls the function gtk-widget-sensitive for each widget in the dialog's action area with the given response-id. A convenient way to sensitize/desensitize dialog buttons.

Gets the response ID of a widget in the action area of a dialog. ...

Gets the widget button that uses the given response ID in the action area of a dialog. ...

Returns the action area of dialog. ...

Returns the content area of dialog. ...

Returns true if dialogs are expected to use an alternative button order on the screen screen. ...

Sets an alternative button order. ...


GtkMessageDialog

A convenient message window.

A gtk-message-dialog window presents a dialog with an image representing the type of message, Error, Question, etc., alongside some message text. ...

The type of message being displayed in the dialog. ...

Prebuilt sets of buttons for the dialog. If none of these choices are appropriate, simply use :none and call the function gtk-dialog-add-buttons to add your own buttons. ...

Creates a new message dialog, which is a simple dialog with an icon indicating the dialog type (error, warning, etc.) and some text the user may want to see. ...

Creates a new message dialog, which is a simple dialog with an icon indicating the dialog type (error, warning, etc.) and some text which is marked up with the Pango text markup language. ...

Sets the text of the message dialog to be text, which is marked up with the Pango text markup language. ...

Sets the secondary text of the message dialog to be message with the arguments args. ...

Sets the secondary text of the message dialog to be message with the arguments args, which is marked up with the Pango text markup language. ...


GtkAboutDialog

Display information about an application.

The gtk-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. ...

The type of license for an application. ...

Creates a new gtk-about-dialog widget. ...

Creates a new section in the Credits page. ...

This is a convenience function for showing an application's about box. ...


GtkAssistant

A widget used to guide users through multi-step operations.

A gtk-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. ...

Accessor of the child property "page-type" of the gtk-assistant class.

Accessor of the child property "title" of the gtk-assistant class.

Accessor of the child property "header-image" of the gtk-assistant class.

Accessor of the child property "sidebar-image" of the gtk-assistant class.

Accessor of the child property "complete" of the gtk-assistant class.

Creates a new gtk-assistant widget. ...

Returns the page number of the current page in the assistant. ...

Switches the page in assistant to page-num. ...

Returns the number of pages in the assistant. ...

Returns the child widget contained in page number page-num. ...

Prepends a page to the assistant. ...

Appends a page to the assistant. ...

Inserts a page in the assistant at a given position. ...

Removes the page-num's page from assistant. ...

Sets the page forwarding function to be func. ...

An enumeration for determining the page role inside the gtk-assistant. It is used to handle buttons sensitivity and visibility. ...

Sets the page type for page. ...

Gets the page type of page. ...

Sets a title for page. ...

Gets the title for page. ...

Sets whether page contents are complete. ...

Gets whether page is complete. ...

Adds a child widget to the action area of assistant. ...

Removes a child widget from the action area of a assistant. ...

Forces assistant to recompute the buttons state. ...

Erases the visited page history so the back button is not shown on the current page, and removes the cancel button from subsequent pages. ...

Navigate to the next page. ...

Navigate to the previous visited page. ...


GtkWindow

Toplevel which can contain other widgets.

A gtk-window is a toplevel window which can contain other widgets. Windows normally have decorations that are under the control of the windowing system and allow the user to manipulate the window, e. g. to resize it, move it, or close it.

GTK+ also allows windows to have a resize grip, a small area in the lower right or left corner, which can be clicked to reszie the window. To control whether a window has a resize grip, use the function gtk-window-set-has-resize-grip. ...

Creates a new gtk-window widget, which is a toplevel window that can contain other widgets. ...

Associate accel-group with window, such that calling the function gtk-accel-group-activate on window will activate accelerators in accel-group.

Reverses the effects of the function gtk-window-add-accel-group.

Activates the current focused widget within the window.

Activates the default widget for the window, unless the current focused widget has been configured to receive the default action, see the function gtk-widget-set-receives-default, in which case the focused widget is activated.

Like the function gtk-window-default-size, but width and height are interpreted in terms of the base size and increment set with the function gtk-window-set-geometry-hints. ...

This function sets up hints about how a window can be resized by the user. ...

Sets a position constraint for this window. ...

Returns a list of all existing toplevel windows. ...

Adds a mnemonic to this window.

Removes a mnemonic from this window.

Activates the targets associated with the mnemonic.

Activates mnemonics and accelerators for this window. ...

Propagate a key press or release event to the focus widget and up the focus container chain until a widget handles event. This is normally called by the default key_press_event and key_release_event handlers for toplevel windows, however in some cases it may be useful to call this directly when overriding the standard key handling for a toplevel window. ...

Retrieves the current focused widget within the window. ...

If focus is not the current focus widget, and is focusable, sets it as the focus widget for the window. ...

Returns the default widget for window. See gtk-window-set-default for more details. ...

The default widget is the widget that is activated when the user presses Enter in a dialog for example. This function sets or unsets the default widget for a gtk-window about. ...

Presents a window to the user. This may mean raising the window in the stacking order, deiconifying it, moving it to the current desktop, and/or giving it the keyboard focus, possibly dependent on the user's platform, window manager, and preferences. ...

Presents a window to the user in response to a user interaction. If you need to present a window without a timestamp, use gtk-window-present. See gtk-window-present for details. ...

Asks to iconify (i. e. minimize) the specified window. Note that you should not assume the window is definitely iconified afterward, because other entities (e. g. the user or window manager) could deiconify it again, or there may not be a window manager in which case iconification is not possible, etc. But normally the window will end up iconified. Just do not write code that crashes if not. ...

Asks to deiconify (i. e. unminimize) the specified window. Note that you should not assume the window is definitely deiconified afterward, because other entities (e. g. the user or window manager) could iconify it again before your code which assumes deiconification gets to run. ...

Asks to stick window, which means that it will appear on all user desktops. Note that you should not assume the window is definitely stuck afterward, because other entities (e. g. the user or window manager) could unstick it again, and some window managers do not support sticking windows. But normally the window will end up stuck. Just do not write code that crashes if not. ...

Asks to unstick window, which means that it will appear on only one of the user's desktops. Note that you should not assume the window is definitely unstuck afterward, because other entities (e. g. the user or window manager) could stick it again. But normally the window will end up stuck. Just do not write code that crashes if not. ...

Asks to maximize window, so that it becomes full screen. Note that you should not assume the window is definitely maximized afterward, because other entities (e. g. the user or window manager) could unmaximize it again, and not all window managers support maximization. But normally the window will end up maximized. Just don't write code that crashes if not. ...

Asks to unmaximize window. Note that you should not assume the window is definitely unmaximized afterward, because other entities (e. g. the user or window manager) could maximize it again, and not all window managers honor requests to unmaximize. But normally the window will end up unmaximized. Just don't write code that crashes if not. ...

Asks to place window in the fullscreen state. Note that you should not assume the window is definitely full screen afterward, because other entities (e. g. the user or window manager) could unfullscreen it again, and not all window managers honor requests to fullscreen windows. But normally the window will end up fullscreen. Just do not write code that crashes if not. ...

Asks to toggle off the fullscreen state for window. ...

Asks to keep window above, so that it stays on top. ...

Asks to keep window below, so that it stays in bottom. ...

Starts resizing a window. This function is used if an application has window resizing controls. When GDK can support it, the resize will be done using the standard mechanism for the window manager or windowing system. Otherwise, GDK will try to emulate window resizing, potentially not all that well, depending on the windowing system.

Starts moving a window. This function is used if an application has window movement grips. When GDK can support it, the window movement will be done using the standard mechanism for the window manager or windowing system. Otherwise, GDK will try to emulate window movement, potentially not all that well, depending on the windowing system.

Sets the mnemonic modifier for this window. ...

Gets the value set by gtk-window-set-default-icon-list. The list is a copy and should be freed with g_list_free(), but the pixbufs in the list have not had their reference count incremented.

Returns the fallback icon name for windows that has been set with gtk-window-set-default-icon-name. The returned string is owned by GTK+ and should not be modified. It is only valid until the next call to gtk-window-set-default-icon-name. ...

Retrieves the list of icons set by gtk-window-set-icon-list. ...

Returns the mnemonic modifier for this window. ...

This function returns the position you need to pass to the function gtk-window-move to keep window in its current position. This means that the meaning of the returned value varies with window gravity. See the function gtk-window-move for more details. ...

Obtains the current size of window. If window is not onscreen, it returns the size GTK+ will suggest to the window manager for the initial window size (but this is not reliably the same as the size the window manager will actually select). The size obtained by gtk-window-get-size is the last size received in a gdk-event-configure, that is, GTK+ uses its locally stored size, rather than querying the X server for the size. As a result, if you call gtk-window-resize then immediately call gtk-window-get-size, the size won't have taken effect yet. After the window manager processes the resize request, GTK+ receives notification that the size has changed via a configure event, and the size of the window gets updated. ...

Returns the group for window or the default group, if window is nil or if window does not have an explicit window group. ...

Returns whether window has an explicit window group. ...

Gets the type of the window. See gtk-window-type. ...

Asks the window manager to move window to the given position. Window managers are free to ignore this; most window managers ignore requests for initial window positions (instead using a user-defined placement algorithm) and honor requests after the window has already been shown. ...

Parses a standard X Window System geometry string - see the manual page for X (type 'man X') for details on this. gtk-window-parse-geometry does work on all GTK+ ports including Win32 but is primarily intended for an X environment. ...

Hides window, then reshows it, resetting the default size and position of the window. ...

Resizes the window as if the user had done so, obeying geometry constraints. The default geometry constraint is that windows may not be smaller than their size request; to override this constraint, call gtk-widget-size-request to set the window's request to a smaller value. ...

Like the gtk-window-resize, but width and height are interpreted in terms of the base size and increment set with the function gtk-window-set-geometry-hints. ...

Sets an icon list to be used as fallback for windows that have not had the function gtk-window-set-icon-list called on them to set up a window specific icon list. This function allows you to set up the icon for all windows in your app at once. ...

Sets an icon to be used as fallback for windows that have not had gtk-window-set-icon called on them from a pixbuf. ...

Sets an icon to be used as fallback for windows that have not had the function gtk-window-set-icon-list called on them from a file on disk. ...

Sets an icon to be used as fallback for windows that haven't had gtk-window-set-icon-list called on them from a named themed icon, see gtk-window-set-icon-name. ...

Sets up the icon representing a gtk-window widget. ...

Sets the icon for window. ...

By default, after showing the first gtk-window, GTK+ calls the function gdk-notify-startup-complete. Call this function to disable the automatic startup notification. You might do this if your first window is a splash screen, and you want to delay notification until after your real main window has been shown, for example. ...

Determines whether a resize grip is visible for the specified window. ...


GtkWindowGroup

Limit the effect of grabs.

gtk-window-group objects are referenced by each window in the group, so once you have added all windows to a gtk-window-group, you can drop the initial reference to the window group with g-object-unref. ...

Creates a new gtk-window-group object. Grabs added with gtk-grab-add only affect windows within the same gtk-window-group.

Adds a window to a gtk-window-group object. ...

Removes a window from a gtk-window-group object.

Returns a list of the gtk-window windows that belong to window-group. ...

Gets the current grab widget of the given group, see gtk-grab-add. ...

Returns the current grab widget for device, or nil if none. ...


GtkInvisible

A widget which is not displayed.

The gtk-invisible widget is used internally in GTK+, and is probably not very useful for application developers. ...

Creates a new gtk-invisible widget.

Creates a new gtk-invisible widget for a specified screen. ...


GtkOffscreenWindow

A toplevel widget to manage offscreen rendering of child widgets.

gtk-offscreen-window is strictly intended to be used for obtaining snapshots of widgets that are not part of a normal widget hierarchy. ...

Creates a toplevel container widget that is used to retrieve snapshots of widgets without showing them on the screen. ...

Retrieves a snapshot of the contained widget in the form of a cairo-surface-t. If you need to keep this around over window resizes then you should add a reference to it. ...

Retrieves a snapshot of the contained widget in the form of a gdk-pixbuf object. ...

Layout Containers


GtkBox

A container box.

The gtk-box widget organizes child widgets into a rectangular area. ...

Accessor of the slot baseline-position of the gtk-box class. ...

Accessor of the slot homogeneous of the gtk-box class. ...

Accessor of the slot spacing of the gtk-box class. ...

Creates a new gtk-box container. ...

Accessor of the child property expand of the gtk-box class.

Accessor of the child property fill of the gtk-box class.

Accessor of the child property padding of the gtk-box class.

Accessor of the child property pack-type of the gtk-box class.

Accessor of the child property position of the gtk-box class.

Adds child to box, packed with reference to the start of box. ...

Adds child to box, packed with reference to the end of box. ...

Moves child to a new position in the list of box children. ...

Obtains information about how child is packed into box. ...

Sets the way child is packed into box. ...

Retrieves the center widget of the box. ...

Sets a center widget; that is a child widget that will be centered with respect to the full width of the box, even if the children at either side take up different amounts of space. ...


GtkGrid

Pack widgets in a rows and columns.

gtk-grid is a container which arranges its child widgets in rows and columns. ...

Accessor of the slot baseline-row of the gtk-grid class. ...

Accessor of the slot column-homogeneous of the gtk-grid class. ...

Accessor of the slot column-spacing of the gtk-grid class. ...

Accessor of the slot row-homogeneous of the gtk-grid class. ...

Accessor of the slot row-spacing of the gtk-grid class. ...

Accessor of the child property height of the gtk-grid class.

Accessor of the child property left-attach of the gtk-grid class.

Accessor of the child property top-attach of the gtk-grid class.

Accessor of the child property width of the gtk-grid class.

Creates a new grid container. ...

Adds a child widget to the grid. ...

Adds a child widget to the grid. ...

Gets the child of grid whose area covers the grid cell whose upper left corner is at left, top. ...

Inserts a row at the specified position. ...

Inserts a column at the specified position. ...

Inserts a row or column at the specified position. ...


GtkRevealer

Hide and show with animation.

GtkListBox

A list container.

GtkStack

A stacking container.

GtkStackSwitcher

A controller for GtkStack.

GtkHeaderBar

A box with a centered child.

gtk-header-bar is similar to a horizontal gtk-box. It allows children to be placed at the start or the end. In addition, it allows a title and subtitle to be displayed. ...

Accessor of the slot custom-title of the gtk-header-bar class. ...

Accessor of the slot decoration-layout of the gtk-header-bar class. ...

Accessor of the slot has-subtitle of the gtk-header-bar class. ...


Accessor of the slot show-close-button of the gtk-header-bar class. ...

Accessor of the slot spacing of the gtk-header-bar class. ...

Accessor of the slot subtitle of the gtk-header-bar class. ...

Accessor of the slot title of the gtk-header-bar class. ...


GtkOverlay

A container which overlays widgets on top of each other.

gtk-overlay is a container which contains a single main child, on top of which it can place overlay widgets. ...

Creates a new gtk-overlay container. ...

Adds widget to overlay. ...


GtkAlignment

A widget which controls the alignment and size of its child.

The gtk-alignment widget controls the alignment and size of its child widget. ...

Creates a new gtk-alignment container.

Sets the gtk-alignment container values.

Gets the padding on the different sides of the widget. ...

Sets the padding on the different sides of the widget. ...


GtkButtonBox

A container for arranging buttons

A button box should be used to provide a consistent layout of buttons throughout your application. The layout/spacing can be altered by the programmer, or if desired, by the user to alter the 'feel' of a program to a small degree. ...

The "non-homogeneous" child property of type :boolean (Read / Write)
If true, the child will not be subject to homogeneous sizing.
Default value: nil

The "secondary" child property of type :boolean (Read / Write)
If true, the child appears in a secondary group of children, suitable for, e. g., help buttons.
Default value: nil

Creates a new gtk-button-box container. ...

Returns whether child should appear in a secondary group of children. ...

Returns whether the child is exempted from homogeneous sizing. ...

Sets whether child should appear in a secondary group of children. A typical use of a secondary child is the help button in a dialog. ...

Sets whether the child is exempted from homogeous sizing. ...


GtkPaned

A widget with two adjustable panes.

gtk-paned has two panes, arranged either horizontally or vertically. The division between the two panes is adjustable by the user by dragging a handle. ...

Creates a new gtk-paned container. ...

Accessor of the child property "resize" of the gtk-paned class.

Accessor of the child property "shrink" of the gtk-paned class.

Adds a child to the top or left pane with default parameters. This is equivalent to (gtk-paned-pack1 paned child nil t).

Adds a child to the bottom or right pane with default parameters. This is equivalent to (gtk-paned-pack2 paned child t t).

Adds a child to the top or left pane.

Adds a child to the bottom or right pane.

Obtains the first child of the paned container. ...

Obtains the second child of the paned container. ...

Returns the gdk-window object of the handle. This function is useful when handling button or motion events because it enables the callback to distinguish between the window of the paned, a child and the handle. ...


GtkLayout

Infinite scrollable area containing child widgets and/or custom drawing.

gtk-layout is similar to gtk-drawing-area in that it is a "blank slate" and does not do anything but paint a blank background by default. ...

Accessor of the child property "x" of the gtk-layout class.

Accessor of the child property "y" of the gtk-layout class.

Creates a new gtk-layout container. ...

Adds child-widget to layout, at position (x, y). ...

Moves a current child of layout to a new position.

Sets the size of the scrollable area of the layout.

Gets the size that has been set on the layout, and that determines the total extents of the layout's scrollbar area. ...

Retrieve the bin window of the layout used for drawing operations. ...


GtkNotebook

A tabbed notebook container.

The gtk-notebook container is a gtk-container whose children are pages that can be switched between using tab labels along one edge. ...

Accessor of the child property "detachable" of the gtk-notebook class.

Accessor of the child property "menu-label" of the gtk-notebook class.

Accessor of the child property "position" of the gtk-notebook class.

Accessor of the child property "reorderable" of the gtk-notebook class.

Accessor of the child property "tab-expand" of the gtk-notebook class.

Accessor of the child property "tab-fill" of the gtk-notebook class.

Accessor of the child property "tab-label" of the gtk-notebook class.

Creates a new gtk-notebook container with no pages.

Appends a page to notebook.

Appends a page to notebook, specifying the widget to use as the label in the popup menu.

Prepends a page to notebook.

Prepends a page to notebook, specifying the widget to use as the label in the popup menu.

Insert a page into notebook at the given position.

Insert a page into notebook at the given position, specifying the widget to use as the label in the popup menu.

Removes a page from the notebook given its index in the notebook.

Finds the index of the page which contains the given child widget.

Switches to the next page. Nothing happens if the current page is the last page.

Switches to the previous page. Nothing happens if the current page is the first page.

Reorders the page containing child, so that it appears in position position. If position is greater than or equal to the number of children in the list or negative, child will be moved to the end of the list.

Enables the popup menu: if the user clicks with the right mouse button on the tab labels, a menu with all the pages will be popped up.

Disables the popup menu.

Returns the page number of the current page.

Retrieves the menu label widget of the page containing child.

Returns the child widget contained in page number page-num.

Gets the number of pages in a notebook. ...

Returns the tab label widget for the page child. nil is returned if child is not in notebook or if no tab label has specifically been set for child.

Changes the menu label for the page containing child.

Creates a new label and sets it as the menu label of child.

Changes the tab label for child. If nil is specified for tab-label, then the page will have the label 'page N'.

Creates a new label and sets it as the tab label for the page containing child.

Sets whether the notebook tab can be reordered via drag and drop or not. ...

Sets whether the tab can be detached from notebook to another notebook or widget. ...

Retrieves the text of the menu label for the page containing child.

Retrieves the text of the tab label for the page containing child.

Gets whether the tab can be reordered via drag and drop or not. ...

Returns whether the tab contents can be detached from notebook. ...

Switches to the page number page-num. ...

Sets widget as one of the action widgets. Depending on the pack type the widget will be placed before or after the tabs. You can use a gtk-box if you need to pack more than one widget on the same side. ...

Gets one of the action widgets. See the function gtk-notebook-set-action-widget. ...


GtkExpander

A container which can hide its child.

A gtk-expander allows the user to hide or show its child by clicking on an expander triangle similar to the triangles used in a gtk-tree-view. ...

Creates a new expander using label as the text of the label. ...

Creates a new expander using label as the text of the label. ...


GtkOrientable

An interface for flippable widgets.

An interface for flippable widgets. ...


GtkAspectFrame

A frame that constrains its child to a particular aspect ratio.

The gtk-aspect-frame is useful when you want pack a widget so that it can resize but always retains the same aspect ratio. ...

Create a new gtk-aspect-frame container.

Set parameters for an existing gtk-aspect-frame container.


GtkFixed

A container which allows you to position widgets at fixed coordinates.

The gtk-fixed widget is a container which can place child widgets at fixed positions and with fixed sizes, given in pixels. ...

Accessor of the child property "x" of the gtk-fixed class.

Accessor of the child property "y" of the gtk-fixed class.

Creates a new gtk-fixed container.

Adds a widget to a gtk-fixed container at the given position.

Moves a child of a gtk-fixed container to the given position.

Display Widgets


GtkLabel

A widget that displays a small to medium amount of text.

The gtk-label widget displays a small amount of text. As the name implies, most labels are used to label another widget such as a gtk-button, a gtk-menu-item, or a gtk-combo-box. ...

Creates a new label with the given text inside it. You can pass nil to get an empty label widget.

Sets the text within the label. It overwrites any text that was there before. ...

Parses str which is marked up with the Pango text markup language, setting the label's text and attribute list based on the parse results. ...

Parses str which is marked up with the Pango text markup language, setting the label's text and attribute list based on the parse results. ...

Toggles line wrapping within the gtk-label widget. ...

If line wrapping is on, see the function gtk-label-set-line-wrap, this controls how the line wrapping is done. ...

Obtains the coordinates where the label will draw the pango-layout representing the text in the label; useful to convert mouse events into coordinates inside the pango-layout, e. g. to take some action if some part of the label is clicked. ...

Fetches the text from a label widget, as displayed on the screen. ...

Creates a new gtk-label widget, containing the text in str. ...

Selects a range of characters in the label, if the label is selectable. ...

Sets the label's text from the string str. ...

Gets the pango-layout used to display the label. ...

Returns whether lines in the label are automatically wrapped. ...

Returns the line wrap mode used by the label. ...

Gets the selected range of characters in the label, returning true if there is a selection.

Returns the URI for the currently active link in the label. ...


GtkImage

A widget displaying an image.

The gtk-image widget displays an image. Various kinds of object can be displayed as an image; most typically, you would load a gdk-pixbuf object ("pixel buffer") from a file, and then display that. ...

Describes the image data representation used by a gtk-image. ...

Gets the icon set and size being displayed by the gtk-image. ...

Gets the stock icon name and size being displayed by the gtk-image widget. ...

Gets the gdk-pixbuf-animation object being displayed by the gtk-image widget. ...

Gets the icon name and size being displayed by the gtk-image object. ...

Gets the g-icon object and size being displayed by the gtk-image object. ...

Creates a new gtk-image displaying the file filename. ...

Creates a gtk-image object displaying an icon set. ...

Creates a new gtk-image object displaying pixbuf. ...

Creates a gtk-image widget displaying a stock icon. ...

Creates a gtk-image displaying the given animation. ...

Creates a gtk-image widget displaying an icon from the current icon theme. ...

Creates a gtk-image displaying an icon from the current icon theme. ...

Creates a new gtk-image displaying the resource file resource-path. ...

See the function gtk-image-new-from-file for details.

See the function gtk-image-new-from-icon-set for details. ...

See the function gtk-image-new-from-pixbuf for details.

See the function gtk-image-new-from-stock for details. ...

Causes the gtk-image object to display the given animation, or display nothing, if you set the animation to nil.

See the function gtk-image-new-from-icon-name for details. ...

See the funcion gtk-image-new-from-gicon for details. ...

See the function gtk-image-new-from-resource for details.

Resets the image to be empty. ...

Creates a new empty gtk-image widget.


GtkSpinner

Show a spinner animation.

A gtk-spinner widget displays an icon size spinning animation. It is often used as an alternative to a gtk-progress-bar widget for displaying indefinite activity, instead of actual progress. ...

Returns a new spinner widget. Not yet started. ...

Starts the animation of the spinner. ...

Stops the animation of the spinner. ...


GtkInfoBar

Report important messages to the user.

gtk-info-bar is a widget that can be used to show messages to the user without showing a dialog. It is often temporarily shown at the top or bottom of a document. In contrast to gtk-dialog, which has a horizontal action area at the bottom, gtk-info-bar has a vertical action area at the side. ...

Creates a new gtk-info-bar widget. ...

Creates a new gtk-info-bar with buttons. ...

Add an activatable widget to the action area of a gtk-info-bar, connecting a signal handler that will emit the "response" signal on the message area when the widget is activated. ...

Adds a button with the given text, or a stock button, if button-text is a stock ID, and sets things up so that clicking the button will emit the "response" signal with the given response-id. ...

Adds more buttons, same as calling the function gtk-info-bar-add-button repeatedly. ...

Calls (gtk-widget-sensitive widget setting) for each widget in the info bars's action area with the given response-id. ...

Sets the last widget in the info bar's action area with the given response-id as the default widget for the dialog. ...

Emits the "response" signal with the given response-id. ...

Returns the action area of info-bar. ...

Returns the content area of info-bar. ...


GtkProgressBar

A widget which indicates progress visually.

The gtk-progress-bar is typically used to display the progress of a long running operation. It provides a visual clue that processing is underway. The gtk-progress-bar can be used in two different modes: percentage mode and activity mode. ...

Creates a new gtk-progress-bar widget.

Indicates that some progress has been made, but you do not know how much. Causes the progress bar to enter "activity mode", where a block bounces back and forth. ...


GtkLevelBar

A bar that can be used as a level indicator.

The gtk-level-bar is a bar widget that can be used as a level indicator. Typical use cases are displaying the strength of a password, or showing the charge level of a battery. ...

Describes how gtk-level-bar contents should be rendered. ...

Creates a new gtk-level-bar. ...

Utility constructor that creates a new gtk-level-bar for the specified interval. ...

Adds a new offset marker on the level bar at the position specified by value. ...

Removes an offset marker previously added with the function gtk-level-bar-add-offset-value. ...

Fetches the value specified for the offset marker name in the level bar, returning true in case an offset named name was found. ...


GtkStatusbar

Report messages of minor importance to the user.

A gtk-statusbar is usually placed along the bottom of an application's main gtk-window widget. 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. ...

Creates a new gtk-statusbar ready for messages.

Returns a new context identifier, given a description of the actual context. ...

Pushes a new message onto a statusbar's stack.

Removes the first message in the gtk-statusbar's stack with the given context ID. ...

Forces the removal of a message from a statusbar's stack. The exact context-id and message-id must be specified. ...

Forces the removal of all messages from a statusbar's stack with the exact context-id. ...

Retrieves the box containing the label widget. ...


GtkAccelLabel

A label which displays an accelerator key on the right of the text.

The gtk-accel-label widget is a subclass of gtk-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. ...

Creates a new gtk-accel-label widget.

Returns the width needed to display the accelerator key(s). ...

Manually sets a keyval and modifier mask as the accelerator rendered by accel-label. ...

Recreates the string representing the accelerator keys. ...


GtkStatusIcon

Display an icon in the system tray.

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. ...

Creates an empty status icon object. ...

Creates a status icon displaying pixbuf. ...

Creates a status icon displaying the file filename. ...

Creates a status icon displaying a stock icon. ...

Creates a status icon displaying an icon from the current icon theme. ...

Creates a status icon displaying a g-icon object. ...

Makes status-icon display pixbuf. ...

Makes status-icon display the file filename. ...

Makes status-icon display the stock icon with the ID stock-id. ...

Makes status-icon display the icon named icon-name from the current icon theme. ...

Makes status-icon display the g-icon. ...

Sets the name of this tray icon. ...

Returns whether the status icon is embedded in a notification area. ...

Buttons and Toggles


GtkButton

A widget that emits a signal when clicked on.

A widget that emits a signal when clicked on. ...

Creates a new gtk-button widget. ...

Creates a gtk-button widget with a gtk-label child widget containing the given text in label.

Creates a new gtk-button widget containing a label. ...

Creates a new gtk-button widget containing the image and text from a stock item. ...

Emits a "clicked" signal to the given gtk-button widget.

Sets the alignment of the child. ...

Gets the alignment of the child in the button. ...

Returns the button's event window if it is realized, nil otherwise. ...


GtkCheckButton

Create widgets with a discrete toggle button.

A gtk-check-button places a discrete gtk-toggle-button next to a widget, usually a gtk-label. See the section on gtk-toggle-button widgets for more information about toggle/check buttons. ...

Creates a new gtk-check-button widget. ...

Creates a new gtk-check-button widget with a gtk-label widget to the right of it. ...

Creates a new gtk-check-button widget containing a label. ...


GtkRadioButton

A choice from multiple check buttons.

A single radio button performs the same basic function as a gtk-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. ...

Creates a new gtk-radio-button. ...

Creates a new gtk-radio-button widget, adding it to the same group as radio-group-member. ...

Creates a new gtk-radio-button with a text label.

Creates a new gtk-radio-button with a text label, adding it to the same group as radio-group-member.

Creates a new gtk-radio-button widget containing a label, adding it to the same group as group. ...

Creates a new gtk-radio-button widget containing a label. ...

Sets a gtk-radio-button's group. ...

Retrieves the group assigned to a radio button.

Joins a gtk-radio-button object to the group of another gtk-radio-button object. ...


GtkToggleButton

Create buttons which retain their state.

A gtk-toggle-button is a gtk-button which will remain "pressed-in" when clicked. Clicking again will cause the toggle button to return to its normal state. ...

Creates a new toggle button. A widget should be packed into the button, as in the function gtk-button-new.

Creates a new toggle button with a text label.

Creates a new gtk-toggle-button widget containing a label. ...

Sets whether the button is displayed as a separate indicator and label. ...

Retrieves whether the button is displayed as a separate indicator and label. See the function gtk-toggle-button-set-mode.

Emits the "toggled" signal on the gtk-toggle-button widget. There is no good reason for an application ever to call this function.


GtkLinkButton

Create buttons bound to a URL.

A gtk-link-button is a gtk-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. ...

Creates a new gtk-link-button widget with the URI as its text. ...

Creates a new gtk-link-button widget containing a label. ...


GtkMenuButton

not implemented

GtkSwitch

A "light switch" style toggle.

gtk-switch is a widget that has two states: on or off. The user can control which state should be active by clicking the empty area, or by dragging the handle. ...

Creates a new gtk-switch widget. ...


GtkScaleButton

A button which pops up a scale.

gtk-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 gtk-volume-button subclass that is tailored for this use case. ...

Creates a gtk-scale-button widget, with a range between min and max, with a stepping of step. ...

Retrieves the popup of the gtk-scale-button widget. ...

Retrieves the plus button of the gtk-scale-button widget. ...

Retrieves the minus button of the gtk-scale-button widget. ...


GtkVolumeButton

A button which pops up a volume control.

gtk-volume-button is a subclass of gtk-scale-button that has been tailored for use as a volume control widget with suitable icons, tooltips and accessible labels. ...

Creates a gtk-volume-button, with a range between 0.0 and 1.0, with a stepping of 0.02. Volume values can be obtained and modified using the functions from gtk-scale-button. ...


GtkLockButton

not implemented

Numeric and Text Data Entry


GtkEntry

A single line text entry field.

The gtk-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. ...

Creates a new entry. ...

Creates a new entry with the specified text buffer. ...

Gets the area where the entry's text is drawn. This function is useful when drawing something to the entry in a draw callback. ...

Unsets the invisible char previously set with the function gtk-entry-invisible-char. So that the default invisible char is used again. ...

Sets the alignment for the contents of the entry. ...

Gets the value set by the fucntion gtk-entry-set-alignment. ...

Gets the pango-layout object used to display the entry. ...

Obtains the position of the pango-layout used to render text in entry, in widget coordinates. ...

Converts from a position in the entry contents (returned by the function gtk-entry-text) to a position in the entry's pango-layout (returned by the function gtk-entry-get-layout, with text retrieved via the function pango-layout-get-text). ...

Converts from a position in the entry's pango-layout (returned by the function gtk-entry-get-layout) to a position in the entry contents (returned by the function gtk-entry-text). ...

Hooks up an adjustment to the cursor position in an entry, so that when the cursor is moved, the adjustment is scrolled to show that position. ...

Retrieves the horizontal cursor adjustment for the entry. ...

Indicates that some progress is made, but you do not know how much. ...

Allow the gtk-entry input method to internally handle key press and release events. ...

Reset the input method context of the entry if needed. ...

Specifies the side of the entry at which an icon is placed. ...

Sets the icon shown in the specified position using a pixbuf. ...

Sets the icon shown in the entry at the specified position from a stock image. ...

Sets the icon shown in the entry at the specified position from the current icon theme. ...

Sets the icon shown in the entry at the specified position from the current icon theme. ...

Gets the type of representation being used by the icon to store image data. If the icon has no image data, the return value will be :empty. ...

Retrieves the image used for the icon. ...

Retrieves the stock ID used for the icon, or nil if there is no icon or if the icon was set by some other method, e. g., by pixbuf, icon name or gicon. ...

Retrieves the icon name used for the icon, or nil if there is no icon or if the icon was set by some other method, e. g., by pixbuf, stock or gicon. ...

Retrieves the g-icon used for the icon, or nil if there is no icon or if the icon was set by some other method, e. g., by stock, pixbuf, or icon name. ...

Sets whether the icon is activatable. ...

Returns whether the icon is activatable. ...

Sets the sensitivity for the specified icon. ...

Returns whether the icon appears sensitive or insensitive. ...

Finds the icon at the given position and return its index. ...

Sets tooltip as the contents of the tooltip for the icon at the specified position. ...

Gets the contents of the tooltip on the icon at the specified position in entry. ...

Sets tooltip as the contents of the tooltip for the icon at the specified position. ...

Gets the contents of the tooltip on the icon at the specified position in entry. ...

Sets up the icon at the given position so that GTK+ will start a drag operation when the user clicks and drags the icon. ...

Returns the index of the icon which is the source of the current DND operation, or -1. ...

Gets the area where entry's icon at icon-pos is drawn. This function is useful when drawing something to the entry in a draw callback. ...

Describes primary purpose of the input widget. This information is useful for on-screen keyboards and similar input methods to decide which keys should be presented to the user. ...

Describes hints that might be taken into account by input methods or applications. Note that input methods may already tailor their behaviour according to the gtk-input-purpose of the entry. ...


GtkEntryBuffer

Text buffer for gtk-entry.

The gtk-entry-buffer object contains the actual text displayed in a gtk-entry widget. ...

Create a new gtk-entry-buffer object. ...

Retrieves the length in bytes of the buffer. ...

Inserts text into the contents of the buffer, at position position. ...

Deletes a sequence of characters from the buffer. ...

Used when subclassing gtk-entry-buffer. ...

Used when subclassing gtk-entry-buffer object. ...


GtkEntryCompletion

Completion functionality for GtkEntry.

gtk-entry-completion is an auxiliary object to be used in conjunction with gtk-entry to provide the completion functionality. It implements the gtk-cell-layout interface, to allow the user to add extra cells to the gtk-tree-view with completion matches. ...

Creates a new gtk-entry-completion object. ...

Creates a new gtk-entry-completion object using the specified area to layout cells in the underlying gtk-tree-view-column for the drop-down menu. ...

Gets the entry completion has been attached to. ...

Sets the match function for completion to be func. ...

Computes the common prefix that is shared by all rows in completion that start with key. ...

Requests a completion operation, or in other words a refiltering of the current list with completions, using the current key. ...

Get the original text entered by the user that triggered the completion or nil if there is no completion ongoing. ...

Requests a prefix insertion. ...

Inserts an action in completion's action item list at position index with text text. ...

Inserts an action in completion's action item list at position index with markup markup. ...

Deletes the action at index from completion's action list. ...


GtkScale

A slider widget for selecting a value from a range.

A gtk-scale is a slider control used to select a numeric value. To use it, you will probably want to investigate the methods on its base class, gtk-range, in addition to the methods for gtk-scale itself. To set the value of a scale, you would normally use the function gtk-range-set-value. To detect changes to the value, you would normally use the "value-changed" signal. ...

Creates a new gtk-scale widget. ...

Creates a new scale widget with the given orientation that lets the user input a number between min and max (including min and max) with the increment step. step must be nonzero; it is the distance the slider moves when using the arrow keys to adjust the scale value. ...

Gets the pango-layout used to display the scale. The returned object is owned by the scale so does not need to be freed by the caller. ...

Obtains the coordinates where the scale will draw the pango-layout representing the text in the scale. Remember when using the pango-layout function you need to convert to and from pixels using PANGO_PIXELS() or PANGO_SCALE. ...

Adds a mark at value. ...

Removes any marks that have been added with the function gtk-scale-add-mark. ...


GtkSpinButton

Retrieve an integer or floating-point number from the user.

A gtk-spin-button is an ideal way to allow the user to set the value of some attribute. Rather than having to directly type a number into a gtk-entry, gtk-spin-button allows the user to click on one of two arrows to increment or decrement the displayed value. A value can still be typed in, with the bonus that it can be checked to ensure it is in a given range. ...

The spin button update policy determines whether the spin button displays values even if they are outside the bounds of its adjustment. See the function gtk-spin-button-update-policy. ...

The values of the gtk-spin-type enumeration are used to specify the change to make in the function gtk-spin-button-spin. ...

Changes the properties of an existing spin button. ...

Creates a new gtk-spin-button.

This is a convenience constructor that allows creation of a numeric gtk-spin-button without manually creating an adjustment. ...

Sets the step and page increments for spin-button. ...

Sets the minimum and maximum allowable values for spin-button. ...

Get the value spin-button represented as an integer.

Increment or decrement a spin button's value in a specified direction by a specified amount.

Manually force an update of the spin button.

Gets the current step and page the increments used by spin-button. ...

Gets the range allowed for spin-button. ...


GtkSearchEntry

An entry which shows a search icon.

gtk-search-entry is a subclass of gtk-entry that has been tailored for use as a search entry. ...

Creates a gtk-search-entry, with a find icon when the search field is empty, and a clear icon when it is not. ...


GtkSearchBar

not implemented

GtkEditable

Interface for text-editing widgets.

The gtk-editable interface is an interface which should be implemented by text editing widgets, such as gtk-entry and gtk-spin-button. It contains functions for generically manipulating an editable widget, a large number of action signals used for key bindings, and several signals that an application can connect to to modify the behavior of a widget. ...

Selects a region of text. ...

Retrieves the selection bound of the editable. ...

Inserts new-text into the contents of the widget, at position position. ...

Deletes a sequence of characters. ...

Retrieves a sequence of characters. ...

Removes the contents of the currently selected content in the editable and puts it on the clipboard.

Copies the contents of the currently selected content in the editable and puts it on the clipboard.

Pastes the content of the clipboard to the current position of the cursor in the editable.

Deletes the currently selected text of the editable. This call does not do anything if there is no selected text.

Sets the cursor position in the editable to the given value. ...

Retrieves the current position of the cursor relative to the start of the content of the editable. ...

Determines if the user can edit the text in the editable widget or not.

Retrieves whether editable is editable. See the function gtk-editable-set-editable.

GTK+ Core Reference


Main loop and Events

Library initialization, main event loop, and events.

Before using GTK+, it needs to be initialized; initialization connects to the window system display, and parses some standard command line arguments. In the C library the macro gtk_init() initializes GTK+. In the Lisp binding to GTK+, GTK+ is initialized, when loading the cl-cffi-gtk library. Therefore, no functions are exported, which initialize GTK+.

Like all GUI toolkits, GTK+ uses an event-driven programming model. When the user is doing nothing, GTK+ sits in the main loop and waits for input. If the user performs some action - say, a mouse click - then the main loop "wakes up" and delivers an event to GTK+. GTK+ forwards the event to one or more widgets.

In the C library the main loop is executed with the function gtk_main(). In the Lisp binding this function is implemented as the function gtk-main, but in general it is not used. The function gtk_main() is replaced with the macro within-main-loop, which does all necessary work to run the main loop. See the example for a typical main function in the Lisp binding.

When widgets receive an event, they frequently emit one or more signals. Signals notify your program that "something interesting happened" by invoking functions you have connected to the signal with the function g-signal-connect. Functions connected to a signal are often termed callbacks.

When your callbacks are invoked, you would typically take some action - for example, when an Open button is clicked you might display a gtk-file-chooser-dialog window. After a callback finishes, GTK+ will return to the main loop and await more user input.

Example: Typical main function in Lisp for a GTK+ application.
(defun main ()
  (within-main-loop
    (let (;; Create the main window.
          (window (gtk-window-new :toplevel)))

;; Set up the GUI elements ...

;; Show the application window. (gtk-widget-show-all window))))


Returns the pango-language object for the default language currently in effect. The default language is derived from the current locale. ...

Returns a g-option-group for the commandline arguments recognized by GTK+ and GDK. ...

Checks if any events are pending. ...

Runs the main loop until the function gtk-main-quit is called. ...

Asks for the current nesting level of the main loop.

Makes the innermost invocation of the main loop return when it regains control. ...

Runs a single iteration of the main loop. ...

Runs a single iteration of the main loop. If no events are available either return or block depending on the value of blocking.

Processes a single GDK event. ...

Makes widget the current grabbed widget. ...

Queries the current grab of the default window group.

Removes the grab from the given widget. ...

Adds a grab on device, so all the events on device and its associated pointer or keyboard (if any) are delivered to widget. ...

Removes a device grab from the given widget. ...

Obtains a copy of the event currently being processed by GTK+. ...

If there is a current event and it has a timestamp, return that timestamp, otherwise return the value +gdk-current-time+.

If there is a current event and it has a state field, return that state field, otherwise return nil.

If there is a current event and it has a device, return that device, otherwise return nil.

If event is nil or event was not associated with any widget, returns nil, otherwise returns the widget that received event originally.

Sends an event to a widget, propagating the event to parent widgets if the event remains unhandled. ...


Version Information

GTK+ provides version information, primarily useful in configure checks for builds that have a configure script. Applications will not typically use the features described here.

Returns the major version number of the GTK+ library. ...

Returns the minor version number of the GTK+ library. ...

Returns the micro version number of the GTK+ library. ...

Returns the binary age as passed to libtool when building the GTK+ library the process is running against. ...

Returns the interface age as passed to libtool when building the GTK+ library the process is running against. ...

Checks that the GTK+ library in use is compatible with the given version. ...

Provides informations about the installation and the versions of the loaded libraries. ...


Accelerator Groups

Groups of global keyboard accelerators for an entire gtk-window widget.

A gtk-accel-group object represents a group of keyboard accelerators, typically attached to a toplevel gtk-window widget with the function gtk-window-add-accel-group. Usually you will not need to create a gtk-accel-group object directly; instead, when using gtk-ui-manager, GTK+ automatically sets up the accelerators for your menus in the UI manager's gtk-accel-group object. ...

Creates a new gtk-accel-group object.

Finds the first accelerator in accel-group that matches accel-key and accel-mods, and activates it.

Locks the given accelerator group. ...

Undoes the last call to the function gtk-accel-group-lock on this accel-group.


Determines whether a given keyval and modifier mask constitute a valid keyboard accelerator. ...

Parses a string representing an accelerator. The format looks like "<Control>a" or "<Shift><Alt>F1" or "<Release>z" (the last one is for key release). ...



Sets the modifiers that will be considered significant for keyboard accelerators. ...

Gets the value set by the function gtk-accelerator-set-default-mod-mask.


Accelerator Maps

Loadable keyboard accelerator specifications.

Accelerator maps are used to define runtime configurable accelerators. ...

Registers a new accelerator with the global accelerator map. ...

Looks up the accelerator entry for accel-path.

Changes the accel-key and accel-mods currently associated with accel-path. ...

Parses a file previously saved with the function gtk-accel-map-save for accelerator specifications, and propagates them accordingly.

Saves current accelerator specifications, accelerator path, key and modifiers, to filename. ...

Gets the singleton global gtk-accel-map object. ...

Locks the given accelerator path. ...

Undoes the last call to the function gtk-accel-map-lock-path on this accel-path. ...


GtkClipboard

Storing data on clipboards.

The gtk-clipboard object represents a clipboard of data shared between different processes or between different widgets in the same process. Each clipboard is identified by a name encoded as a gdk-atom. Conversion to and from strings can be done with the functions gdk-atom-intern and gdk-atom-name. The default clipboard corresponds to the "CLIPBOARD" atom; another commonly used clipboard is the "PRIMARY" clipboard, which, in X, traditionally contains the currently selected text. ...

Returns the clipboard object for the given selection. ...

Returns the clipboard object for the given selection of type gdk-atom. ...

Clears the contents of the clipboard. ...

Sets the contents of the clipboard to the given UTF-8 string text. ...

Requests the contents of the clipboard as text. When the text is later received, it will be converted to UTF-8 if necessary, and callback will be called. ...


Drag and drop handling

GTK+ has a rich set of functions for doing inter-process communication via the drag-and-drop metaphor. GTK+ can do drag-and-drop (DND) via multiple protocols. The currently supported protocols are the Xdnd and Motif protocols.

As well as the functions listed here, applications may need to use some facilities provided for Selections. Also, the Drag and Drop API makes use of signals in the gtk-widget class.

The gtk-dest-defaults flags specifies the various types of action that will be taken on behalf of the user for a drag destination site. ...

The gtk-target-flags enumeration is used to specify constraints on an entry in a GtkTargetTable. ...

Sets a widget as a potential drop destination, and adds default behaviors. ...

Sets this widget as a proxy for drops to another window.

Clears information about a drop destination set with the function gtk-drag-dest-set. ...

Looks for a match between the supported targets of context and the target-list, returning the first matching target, otherwise returning :none. ...

Returns the list of targets this widget can accept from drag-and-drop.

Sets the target types that this widget can accept from drag-and-drop. ...

Add the text targets supported by the selection to the target list of the drag destination. ...

Add the image targets supported by GtkSelection to the target list of the drag destination. ...

Add the URI targets supported by the selection to the target list of the drag destination. ...

Tells the widget to emit "drag-motion" and "drag-leave" events regardless of the targets and the :motion flag. ...

Returns whether the widget has been configured to always emit "drag-motion" signals. ...

Informs the drag source that the drop is finished, and that the data of the drag will no longer be required.

Gets the data associated with a drag. ...

Determines the source widget for a drag.

Draws a highlight around a widget. ...

Removes a highlight set by the function gtk-drag-highlight from a widget.

Initiates a drag on the source side. ...

Changes the icon for a widget to a given widget. ...

Sets pixbuf as the icon for a given drag. ...

Sets the icon for a given drag from a stock ID.

Sets surface as the icon for a given drag. ...

Sets the icon for a given drag from a named themed icon. ...

Sets the icon for a given drag from the given icon. ...

Sets the icon for a particular drag to the default icon.

Checks to see if a mouse drag starting at (start-x, start-y) an ending at (current-x, current-y) has passed the GTK+ drag threshold, and thus should trigger the beginning of a drag-and-drop operation.

Sets up a widget so that GTK+ will start a drag operation when the user clicks and drags on the widget. The widget must have a window.

Sets the icon that will be used for drags from a particular widget from a gdk-pixbuf. ...


Sets the icon that will be used for drags from a particular source to a themed icon. ...

Sets the icon that will be used for drags from a particular source to icon. ...

Undoes the effects of the function gtk-drag-source-set.

Changes the target types that this widget offers for drag-and-drop. ...

Gets the list of targets this widget can provide for drag-and-drop. ...

Add the text targets supported by GtkSelection to the target list of the drag source. ...

Add the writable image targets supported by GtkSelection to the target list of the drag source. ...



Stock items

Prebuilt common menu/toolbar items and corresponding icons.

Retrieves a list of all known stock IDs added to a gtk-icon-factory or registered with gtk-stock-add.


GtkSettings

Sharing settings between applications.

gtk-settings provide a mechanism to share global settings between applications. ...

Gets the gtk-settings object for the default GDK screen, creating it if necessary. See the function gtk-settings-get-for-screen.

Gets the gtk-settings object for screen, creating it if necessary. ...


Bindings

not implemented

Standard Enumerations

Standard Enumerations


Used to specify the placement of scroll arrows in scrolling menus. ...

Used to indicate the direction in which a gtk-arrow widget should point. ...

Denotes the expansion properties that a widget will have when it or its parent is resized. ...

Used to dictate the style that a gtk-button-box widget uses to layout the buttons it contains. ...

Specifies which corner a child widget should be placed in when packed into a gtk-scrolled-window widget. This is effectively the opposite of where the scroll bars are placed. ...



Used to specify the style of the expanders drawn by a gtk-tree-view widget. ...

Style for input method preedit. ...

Style for input method status. ...

Used for justifying the text inside a gtk-label widget. See also the gtk-alignment widget. ...


Represents the orientation of widgets which can be switched between horizontal and vertical orientation on the fly, like gtk-toolbar. ...

Represents the packing location of a gtk-box children. ...



Determines when a scroll bar will be visible. ...

Describes which edge of a widget a certain feature is positioned at, e. g. the tabs of a gtk-notebook or the label of a gtk-scale. ...

Indicated the relief to be drawn around a gtk-button button. ...




Used to control what selections users are allowed to make. ...

Used to change the appearance of an outline typically provided by a gtk-frame widget. ...

This type indicates the current state of a widget; the state determines how the widget is drawn. The gtk-state-type enumeration is also used to identify different colors in a gtk-style object for drawing, so states can be used for subparts of a widget as well as entire widgets. ...

Describes a widget state. ...

Used to customize the appearance of a gtk-toolbar. Note that setting the toolbar style overrides the user's preferences for the default toolbar style. Note that if the button has only a label set and :icons is used, the label will be visible, and vice versa. ...

Window placement can be influenced using this enumeration. Note that using :center-always is almost always a bad idea. It will not necessarily work well with all window managers or on all windowing systems. ...

An enumeration for the possible types of a gtk-window widget. ...

Determines the direction of a sort. ...

Gives an indication why a drag operation failed. The value can by obtained by connecting to the "drag-failed" signal. ...

Describes how a rendered element connects to adjacent elements. ...

Describes how the border of a UI element should be rendered. ...

Describes a region within a widget. ...


Selections

The selection mechanism provides the basis for different types of communication between processes. In particular, drag and drop and gtk-clipboard work via selections. You will very seldom or never need to use most of the functions in this section directly; gtk-clipboard provides a nicer interface to the same functionality.

Some of the datatypes defined this section are used in the gtk-clipboard and drag-and-drop API's as well. The gtk-target-entry structure and gtk-target-list objects represent lists of data types that are supported when sending or receiving data. The gtk-selection-data object is used to store a chunk of data along with the data type and other associated information.


Returns an object of type gtk-selection-data.

Copies an object of type gtk-selection-data.

Accessor of the slot selection of the gtk-selection-data structure.

Accessor of the slot target of the gtk-selection-data structure.

Returns an object of type gtk-target-entry.

Returns an object of type gtk-target-entry.

Accessor for the slot target of the gtk-target-entry structure.

Accessor for the slot flags of the gtk-target-entry structure.

Accessor for the slot info of the gtk-target-entry structure.

Accessor of the slot type of the gtk-selection-data structure.

Accessor of the slot format of the gtk-selection-data structure.

Accessor of the slot data of the gtk-selection-data structure.

Accessor of the slot length of the gtk-selection-data structure.

Accessor of the slot display of the gtk-selection-data structure.

A gtk-target-entry structure represents a single type of data that can be supplied for by a widget for a selection or received during drag-and-drop. ...

A gtk-target-list structure is used to represent the same information as a table of gtk-target-entry, but in an efficient form. This structure should be treated as opaque. ...

Makes a new gtk-target-entry structure.

Makes a copy of a gtk-target-entry structure and its data.

Frees a gtk-target-entry structure returned from the functions gtk-target-entry-new or gtk-target-entry-copy.

Creates a new gtk-target-list from an array of gtk-target-entry.

Increases the reference count of a gtk-target-list by one.

Decreases the reference count of a gtk-target-list by one. ...

Appends another target to a gtk-target-list.

Prepends a table of gtk-target-entry to a target list.

Appends the text targets supported by a selection to the target list. ...

Appends the image targets supported by a selection to the target list. ...

Appends the URI targets supported by a selection to the target list. ...

Appends the rich text targets registered with the functions gtk-text-buffer-register-serialize-format or gtk-text-buffer-register-deserialize-format to the target list. ...

Removes a target from a target list.

Looks up a given target in a gtk-target-list.

This function creates a gtk-target-entry list that contains the same targets as the passed list. ...

Claims ownership of a given selection for a particular widget, or, if widget is nil, release ownership of the selection.

Claim ownership of a given selection for a particular widget, or, if widget is nil, release ownership of the selection. ...

Appends a specified target to the list of supported targets for a given widget and selection.

Prepends a table of targets to the list of supported targets for a given widget and selection.

Remove all targets registered for the given selection for the widget.

Requests the contents of a selection. When received, a "selection-received" signal will be generated.

Sets the contents of the selection from a UTF-8 encoded string. The string is converted to the form determined by selection_data->target.

Gets the contents of the selection data as a UTF-8 string.

Sets the contents of the selection from a gdk-pixbuf. ...

Gets the contents of the selection data as a gdk-pixbuf. ...

Sets the contents of the selection from a list of URIs. ...

Gets the contents of the selection data as a list of URIs. ...

Gets the contents of selection-data as a list of targets. ...

Given a gtk-selection-data structure holding a list of targets, determines if any of the targets in targets can be used to provide a gdk-pixbuf. ...

Given a gtk-selection-data object holding a list of targets, determines if any of the targets in targets can be used to provide text. ...

Given a gtk-selection-data object holding a list of targets, determines if any of the targets in targets can be used to provide a list or URIs. ...

Given a gtk-selection-data object holding a list of targets, determines if any of the targets in targets can be used to provide rich text. ...

Retrieves the selection gdk-atom of the selection data. ...

Retrieves the raw data of the selection. ...

Retrieves the length of the raw data of the selection. ...

Retrieves the raw data of the selection along with its length. ...

Retrieves the data type of the selection. ...

Retrieves the display of the selection. ...

Retrieves the format of the selection. ...

Retrieves the target of the selection. ...


Filesystem utilities

Functions for working with GIO

This is a convenience function for launching the default application to show the uri. ...

Theming in GTK+


GtkStyleContext

Rendering UI elements

gtk-style-context is an object that stores styling information affecting a widget defined by gtk-widget-path. ...

Adds a style provider to context, to be used in style construction. ...

Adds a global style provider to screen, which will be used in style construction for all gtk-style-contexts under screen. ...

Returns the widget direction used for rendering. ...

Gets the parent context set via the function gtk-style-context-set-parent. ...

Returns the gdk-screen object to which context is attached.

Gets the foreground color for a given state. ...

Invalidates context style information, so it will be reconstructed again. ...

Looks up stock-id in the icon factories associated to context and the default icon factory, returning an icon set if found, otherwise nil.

Notifies a state change on context, so if the current style makes use of transition animations, one will be started so all rendered elements under region-id are animated for state state being set to value state-value. ...

Pops an animatable region from context. ...

Pushes an animatable region, so all further gtk-render-* calls between this call and the following gtk-style-context-pop-animatable-region will potentially show transition animations for this region if the function gtk-style-context-notify-state-change is called for a given state, and the current theme/style defines transition animations for state changes. ...

Sets the reading direction for rendering purposes. ...

Sets the parent style context for context. ...

Sets the gtk-widget-path used for style matching. As a consequence, the style will be regenerated to match the new given path. ...

Attaches context to the given screen. ...

A structure that specifies a border around a rectangular area that can be of different width on each side. ...

Creates and returns an structure of type gtk-border.

Copies and returns an structure of type gtk-border.

Accessor of the slot "left" of the gtk-border structure.

Accessor of the slot "right" of the gtk-border structure.

Accessor of the slot "top" of the gtk-border structure.

Accessor of the slot "bottom" of the gtk-border structure.

Allocates a new gtk-border structure and initializes its elements to zero. ...

Copies a gtk-border structure.

Renders a focus indicator on the rectangle determined by x, y, width, height. ...

Renders the icon specified by source at the given size, returning the result in a pixbuf. ...


GtkCssProvider

CSS-like styling for widgets.

gtk-css-provider is an object implementing the gtk-style-provider interface. It is able to parse CSS-like input in order to style widgets. ...

Returns the provider containing the style settings used as a fallback for all widgets.

Loads the data contained in path into css-provider, making it clear any previously loaded information.

Returns a newly created gtk-css-provider object.

Convertes the provider into a string representation in CSS format. ...


GtkStyleProvider

Interface to provide style information to gtk-style-context.

gtk-style-provider is an interface used to provide style information to a gtk-style-context. See the functions gtk-style-context-add-provider and gtk-style-context-add-provider-for-screen.


GtkStyleProperties

Store for style property information


GtkThemingEngine

Theming renderers

gtk-theming-engine is the object used for rendering themed content in GTK+ widgets. Even though GTK+ has a default implementation, it can be overridden in CSS files by enforcing a gtk-theming-engine object to be loaded as a module. ...


GtkWidgetPath

Widget path abstraction.

gtk-widget-path is a boxed type that represents a widget hierarchy from the topmost widget, typically a toplevel, to any child. This widget path abstraction is used in gtk-style-context on behalf of the real widget in order to query style information. ...

Returns an empty widget path. ...

Dumps the widget path into a string representation. It tries to match the CSS style as closely as possible (Note that there might be paths that cannot be represented in CSS). ...


GtkIconTheme

Looking up icons by name

gtk-icon-theme provides a facility for looking up icons by name and size. The main reason for using a name rather than simply providing a filename is to allow different icons to be used depending on what icon theme is selected by the user. The operation of icon themes on Linux and Unix follows the Icon Theme Specification. There is a default icon theme, named hicolor where applications should install their icons, but more additional application themes can be installed as operating system vendors and users choose. ...

Contains information found when looking up an icon in an icon theme.


Creates a new icon theme object. Icon theme objects are used to lookup up an icon by name in a particular icon theme. Usually, you will want to use gtk-icon-theme-get-default or gtk-icon-theme-get-for-screen rather than creating a new icon theme object for scratch. ...

Gets the icon theme for the default screen. See the function gtk-icon-theme-get-for-screen. ...

Gets the icon theme object associated with screen; if this function has not previously been called for the given screen, a new icon theme object will be created and associated with the screen. Icon theme objects are fairly expensive to create, so using this function is usually a better choice than calling the function gtk-icon-theme-new and setting the screen yourself; by using this function a single icon theme object will be shared between users. ...

Checks whether an icon theme includes an icon for a particular name. ...

Looks up a named icon and returns a structure containing information such as the filename of the icon. The icon can then be rendered into a pixbuf using the function gtk-icon-info-load-icon. The function gtk-icon-theme-load-icon combines these two steps if all you need is the pixbuf. ...

Looks up a named icon and returns a structure containing information such as the filename of the icon. ...

Looks up an icon in an icon theme, scales it to the given size and renders it into a pixbuf. ...

Gets the list of contexts available within the current hierarchy of icon themes. ...

Lists the icons in the current icon theme. Only a subset of the icons can be listed by providing a context string. The set of values for the context string is system dependent, but will typically include such values as "Applications" and "MimeTypes". ...

Gets the name of an icon that is representative of the current theme (for instance, to use when presenting a list of themes to the user.) ...

Gets the filename for the icon. ...

Gets the built-in image for this icon, if any. ...

Renders an icon previously looked up in an icon theme using the function gtk-icon-theme-lookup-icon; the size will be based on the size passed to the function gtk-icon-theme-lookup-icon. ...


Themable Stock Images

Manipulating stock icons


Browse the available stock icons in the list of stock IDs found here. ...

A gtk-icon-set manages a set of variants of a particular icon, i. e. a gtk-icon-set contains variants for different sizes and widget states.


Adds the given icon-set to the icon factory, under the name stock-id. ...

Adds an icon factory to the list of icon factories searched by the function gtk-style-lookup-icon-set. This means that, for example, the function gtk-image-new-from-stock will be able to find icons in factory. There will normally be an icon factory added for each library or application that comes with icons. The default icon factories can be overridden by themes. ...

Looks up stock-id in the icon factory, returning an icon set if found, otherwise nil. For display to the user, you should use the function gtk-style-lookup-icon-set on the gtk-style object for the widget that will display the icon, instead of using this function directly, so that themes are taken into account. ...

Looks for an icon in the list of default icon factories. For display to the user, you should use the function gtk-style-lookup-icon-set on the gtk-style object for the widget that will display the icon, instead of using this function directly, so that themes are taken into account. ...

Removes an icon factory from the list of default icon factories. Not normally used; you might use it for a library that can be unloaded or shut down.

Icon sets have a list of gtk-icon-source objects, which they use as base icons for rendering icons in different states and sizes. Icons are scaled, made to look insensitive, etc. in the function gtk-icon-set-render-icon, but gtk-icon-set needs base images to work with. The base images and when to use them are described by a gtk-icon-source object. ...

Creates a new gtk-icon-set object. A gtk-icon-set object represents a single icon in various sizes and widget states. It can provide a gdk-pixbuf object for a given size and state on request, and automatically caches some of the rendered gdk-pixbuf objects. ...

Creates a new gtk-icon-set with pixbuf as the default/fallback source image. ...

Renders an icon using the function gtk-style-render-icon. In most cases, the function gtk-widget-render-icon is better, since it automatically provides most of the arguments from the current widget settings. This function never returns nil; if the icon cannot be rendered, perhaps because an image file fails to load, a default "missing image" icon will be returned instead. ...

Renders an icon using the function gtk-render-icon-pixbuf. In most cases, the function gtk-widget-render-icon-pixbuf is better, since it automatically provides most of the arguments from the current widget settings. This function never returns nil; if the icon cannot be rendered (perhaps because an image file fails to load), a default "missing image" icon will be returned instead. ...

Retrieves the source filename, or nil if none is set.

Retrieves the source icon name, or nil if none is set.

Creates a new gtk-icon-source object. A gtk-icon-source object contains a GDK-Pixbuf (or image filename) that serves as the base image for one or more of the icons in a gtk-icon-set object, along with a specification for which icons in the icon set will be based on that pixbuf or image file. An icon set contains a set of icons that represent "the same" logical concept in different states, different global text directions, and different sizes. ...

Sets the name of an image file to use as a base image when creating icon variants for gtk-icon-set object. ...

Sets the name of an icon to look up in the current icon theme to use as a base image when creating icon variants for gtk-icon-set.


GtkNumerableIcon

A g-icon that allows numbered emblems.

gtk-numerable-icon is a subclass of g-emblemed-icon that can show a number or short string as an emblem. ...

Creates a new unthemed gtk-numerable-icon object. ...

Creates a new gtk-numerable-icon object which will themed according to the passed gtk-style-context object. ...

Returns the g-icon that was set as the base background image, or nil if there's none. ...

Updates the icon to use icon as the base background image. ...

Returns the icon name used as the base background image, or nil if there is none. ...

Updates the icon to use the icon named icon-name from the current icon theme as the base background image. ...

Returns the value currently displayed by numerable-icon. ...

Sets the currently displayed value of numerable-icon to count. ...

Returns the currently displayed label of the icon, or nil. ...

Sets the currently displayed value of numerable-icon to the string in label. ...

Returns the gtk-style-context object used by the icon for theming, or nil if thereis none. ...

Updates the icon to fetch theme information from the given gtk-style-context object. ...

Multiline Text Editor

Overview of gtk-text-buffer, gtk-text-view, and friends.

Conceptual Overview
GTK+ has an extremely powerful framework for multiline text editing. The primary objects involved in the process are gtk-text-buffer, which represents the text being edited, and gtk-text-view, a widget which can display a gtk-text-buffer. Each buffer can be displayed by any number of views.

One of the important things to remember about text in GTK+ is that it is in the UTF-8 encoding. This means that one character can be encoded as multiple bytes. Character counts are usually referred to as offsets, while byte counts are called indexes. If you confuse these two, things will work fine with ASCII, but as soon as your buffer contains multibyte characters, bad things will happen.

Text in a buffer can be marked with tags. A tag is an attribute that can be applied to some range of text. For example, a tag might be called "bold" and make the text inside the tag bold. However, the tag concept is more general than that; tags do not have to affect appearance. They can instead affect the behavior of mouse and key presses, "lock" a range of text so the user cannot edit it, or countless other things. A tag is represented by a gtk-text-tag object. One gtk-text-tag can be applied to any number of text ranges in any number of buffers.

Each tag is stored in a gtk-text-tag-table. A tag table defines a set of tags that can be used together. Each buffer has one tag table associated with it; only tags from that tag table can be used with the buffer. A single tag table can be shared between multiple buffers, however.

Tags can have names, which is convenient sometimes (for example, you can name your tag that makes things bold "bold"), but they can also be anonymous (which is convenient if you are creating tags on-the-fly).

Most text manipulation is accomplished with iterators, represented by a gtk-text-iter. An iterator represents a position between two characters in the text buffer. gtk-text-iter is a structure designed to be allocated on the stack; it is guaranteed to be copiable by value and never contain any heap-allocated data. Iterators are not valid indefinitely; whenever the buffer is modified in a way that affects the number of characters in the buffer, all outstanding iterators become invalid. (Note that deleting 5 characters and then reinserting 5 still invalidates iterators, though you end up with the same number of characters you pass through a state with a different number).

Because of this, iterators cannot be used to preserve positions across buffer modifications. To preserve a position, the gtk-text-mark object is ideal. You can think of a mark as an invisible cursor or insertion point; it floats in the buffer, saving a position. If the text surrounding the mark is deleted, the mark remains in the position the text once occupied; if text is inserted at the mark, the mark ends up either to the left or to the right of the new text, depending on its gravity. The standard text cursor in left-to-right languages is a mark with right gravity, because it stays to the right of inserted text.

Like tags, marks can be either named or anonymous. There are two marks built-in to gtk-text-buffer; these are named "insert" and "selection_bound" and refer to the insertion point and the boundary of the selection which is not the insertion point, respectively. If no text is selected, these two marks will be in the same position. You can manipulate what is selected and where the cursor appears by moving these marks around. [2]

Text buffers always contain at least one line, but may be empty (that is, buffers can contain zero characters). The last line in the text buffer never ends in a line separator (such as newline); the other lines in the buffer always end in a line separator. Line separators count as characters when computing character counts and character offsets. Note that some Unicode line separators are represented with multiple bytes in UTF-8, and the two-character sequence "rn" is also considered a line separator.

Simple Example
The simplest usage of gtk-text-view might look like this:
GtkWidget *view;
GtkTextBuffer *buffer;

view = gtk_text_view_new ();

buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));

gtk_text_buffer_set_text (buffer, "Hello, this is some text", -1);

/* Now you might put the view in a container and display it on the * screen; when the user edits the text, signals on the buffer * will be emitted, such as "changed", "insert_text", and so on. */
In many cases it is also convenient to first create the buffer with gtk-text-buffer-new, then create a widget for that buffer with gtk-text-view-new-with-buffer. Or you can change the buffer the widget displays after the widget is created with gtk-text-view-buffer.

Example of Changing Text Attributes
There are two ways to affect text attributes in gtk-text-view. You can change the default attributes for a given gtk-text-view, and you can apply tags that change the attributes for a region of text. For text features that come from the theme - such as font and foreground color - use standard gtk-widget functions such as the function gtk-widget-override-font. For other attributes there are dedicated methods on gtk-text-view such as the function gtk-text-view-set-tabs.
GtkWidget *view;
GtkTextBuffer *buffer;
GtkTextIter start, end;
PangoFontDescription *font_desc;
GdkRGBA rgba;
GtkTextTag *tag;

view = gtk_text_view_new ();

buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));

gtk_text_buffer_set_text (buffer, "Hello, this is some text", -1);

/* Change default font throughout the widget */ font_desc = pango_font_description_from_string ("Serif 15"); gtk_widget_modify_font (view, font_desc); pango_font_description_free (font_desc);

/* Change default color throughout the widget */ gdk_rgba_parse ("green", &rgba); gtk_widget_override_color (view, GTK_STATE_FLAG_NORMAL, &rgba);

/* Change left margin throughout the widget */ gtk_text_view_set_left_margin (GTK_TEXT_VIEW (view), 30);

/* Use a tag to change the color for just one part of the widget */ tag = gtk_text_buffer_create_tag (buffer, "blue_foreground", "foreground", "blue", NULL); gtk_text_buffer_get_iter_at_offset (buffer, &start, 7); gtk_text_buffer_get_iter_at_offset (buffer, &end, 12); gtk_text_buffer_apply_tag (buffer, tag, &start, &end);
The gtk-demo application that comes with GTK+ contains more example code for gtk-text-view.

GtkTextIter

Text buffer iterator.

Most text manipulation is accomplished with iterators, represented by a gtk-text-iter. An iterator represents a position between two characters in the text buffer. gtk-text-iter is a structure designed to be allocated on the stack; it is guaranteed to be copiable by value and never contain any heap-allocated data. Iterators are not valid indefinitely; whenever the buffer is modified in a way that affects the number of characters in the buffer, all outstanding iterators become invalid. Note that deleting 5 characters and then reinserting 5 still invalidates iterators, though you end up with the same number of characters you pass through a state with a different number.

Returns the gtk-text-buffer this iterator is associated with.

Creates a dynamically-allocated copy of an iterator. The function is used by language bindings.

Returns the character offset of an iterator. Each character in a gtk-text-buffer object has an offset, starting with 0 for the first character in the buffer. Use the function gtk-text-buffer-get-iter-at-offset to convert an offset back into an iterator.

Returns the line number containing the iterator. Lines in a gtk-text-buffer object are numbered beginning with 0 for the first line in the buffer.

Returns the character offset of the iterator, counting from the start of a newline-terminated line. The first character on the line has offset 0.

Returns the byte index of the iterator, counting from the start of a newline-terminated line. Remember that gtk-text-buffer encodes text in UTF-8, and that characters can require a variable number of bytes to represent.

Returns the number of bytes from the start of the line to the given iter, not counting bytes that are invisible due to tags with the "invisible" flag toggled on.

Returns the offset in characters from the start of the line to the given iter, not counting characters that are invisible due to tags with the "invisible" flag toggled on.

Returns a Unicode character, or 0 if iter is not dereferenceable.

Returns the text in the given range. ...

Returns text in the given range. ...

Like the function gtk-text-iter-get-slice, but invisible text is not included. ...

Like the function gtk-text-iter-get-text, but invisible text is not included. ...

If the element at iter is a pixbuf, the pixbuf is returned with no new reference count added. Otherwise, nil is returned.

Returns a list of all gtk-text-mark objects at this location. ...

Returns a list of gtk-text-tag objects that are toggled on or off at this point. ...

If the location at iter contains a child anchor, the anchor is returned with no new reference count added. Otherwise, nil is returned.

Returns true if tag is toggled on at exactly this point. ...

Returns true if tag is toggled off at exactly this point. ...

This is equivalent to (or (gtk-text-iter-begins-tag iter tag) (gtk-text-iter-ends-tag iter tag)), i. e. it tells you whether a range with tag applied to it begins or ends at iter.

Returns true if iter is within a range tagged with tag.

Returns a list of tags that apply to iter, in ascending order of priority, highest-priority tags are last.

Returns whether the character at iter is within an editable region of text. ...

Considering the default editability of the buffer, and tags that affect editability, determines whether text inserted at iter would be editable. ...

Determines whether iter begins a natural-language word. ...

Determines whether iter ends a natural-language word. ...

Determines whether iter is inside a natural-language word, as opposed to say inside some whitespace. ...

Returns true if iter begins a paragraph, i. e. if the function gtk-text-iter-get-line-offset would return 0. ...

Returns true if iter points to the start of the paragraph delimiter characters for a line, delimiters will be either a newline, a carriage return, a carriage return followed by a newline, or a Unicode paragraph separator character. ...

Determines whether iter begins a sentence. ...

Determines whether iter ends a sentence. ...

Determines whether iter is inside a sentence, as opposed to in between two sentences, e. g. after a period and before the first letter of the next sentence. ...

See the function gtk-text-iter-forward-cursor-position, the pango-log-attr structure or the function pango-break for details on what a cursor position is.

Returns the number of characters in the line containing iter, including the paragraph delimiters.

Returns the number of bytes in the line containing iter, including the paragraph delimiters.

Computes the effect of any tags applied to this spot in the text. The values parameter should be initialized to the default settings you wish to use if no tags are in effect. ...

A convenience wrapper around the function gtk-text-iter-get-attributes, which returns the language in effect at iter. ...

Returns true if iter is the end iterator, i. e. one past the last dereferenceable iterator in the buffer. ...

Returns true if iter is the first iterator in the buffer, that is if iter has a character offset of 0.

Moves iter forward by one character offset. ...

Moves backward by one character offset. ...

Moves count characters if possible, if count would move past the start or end of the buffer, moves to the start or end of the buffer. ...

Moves count characters backward, if possible, if count would move past the start or end of the buffer, moves to the start or end of the buffer. ...

Moves iter to the start of the next line. ...

Moves iter to the start of the previous line. ...

Moves count lines forward, if possible, if count would move past the start or end of the buffer, moves to the start or end of the buffer. ...

Moves count lines backward, if possible, if count would move past the start or end of the buffer, moves to the start or end of the buffer. ...

Calls the function gtk-text-iter-forward-word-end up to count times.

Calls the function gtk-text-iter-backward-word-start up to count times.

Moves forward to the next word end. If iter is currently on a word end, moves forward to the next one after that. ...

Moves backward to the previous word start. If iter is currently on a word start, moves backward to the next one after that. ...

Moves iter forward by a single cursor position. ...

Like the function gtk-text-iter-forward-cursor-position, but moves backward. ...

Moves up to count cursor positions. ...

Moves up to count cursor positions. ...

Moves backward to the previous sentence start; if iter is already at the start of a sentence, moves backward to the next one. ...

Calls the function gtk-text-iter-backward-sentence-start up to count times, or until it returns nil. ...

Moves forward to the next sentence end. ...

Calls the function gtk-text-iter-forward-sentence-end count times, or until the function gtk-text-iter-forward-sentence-end returns nil. ...

Calls the function gtk-text-iter-forward-visible-word-end up to count times. ...

Calls the function gtk-text-iter-backward-visible-word-start up to count times. ...

Moves forward to the next visible word end. ...

Moves backward to the previous visible word start. ...

Moves iter forward to the next visible cursor position. ...

Moves iter forward to the previous visible cursor position. ...

Moves up to count visible cursor positions. See the function gtk-text-iter-forward-cursor-position for details. ...

Moves up to count visible cursor positions. ...

Moves iter to the start of the next visible line. ...

Moves iter to the start of the previous visible line. ...

Moves count visible lines forward, if possible, if count would move past the start or end of the buffer, moves to the start or end of the buffer. ...

Moves count visible lines backward, if possible. ...

Sets iter to point to char-offset. ...

Moves iterator iter to the start of the line line-number. ...

Moves iter within a line, to a new character (not byte) offset. ...

Same as the function gtk-text-iter-set-line-offset, but works with a byte index. ...

Like the function gtk-text-iter-set-line-index, but the index is in visible bytes, i. e. text with a tag making it invisible is not counted in the index.

Like the function gtk-text-iter-set-line-offset, but the offset is in visible characters, i. e. text with a tag making it invisible is not counted in the offset.

Moves iter forward to the "end iterator", which points one past the last valid character in the buffer. ...

Moves the iterator to point to the paragraph delimiter characters, which will be either a newline, a carriage return, a carriage return/newline in sequence, or the Unicode paragraph separator character. ...

Moves forward to the next toggle (on or off) of the gtk-text-tag tag, or to the next toggle of any tag if tag is nil. ...

Moves backward to the next toggle (on or off) of the gtk-text-tag tag, or to the next toggle of any tag if tag is nil. ...

Advances iter, calling pred on each character. ...

Same as the function gtk-text-iter-forward-find-char, but goes backward from iter.


Searches forward for str. Any match is returned by setting match-start to the first character of the match and match-end to the first character after the match. The search will not continue past limit. Note that a search is a linear or O(n) operation, so you may wish to use limit to avoid locking up your UI on large buffers. ...

Same as the function gtk-text-iter-forward-search, but moves backward.

Tests whether two iterators are equal, using the fastest possible mechanism. ...

A qsort()-style function that returns negative if lhs is less than rhs, positive if lhs is greater than rhs, and 0 if they are equal. ...

Checks whether iter falls in the range [start, end). ...

Swaps the value of first and second if second comes before first in the buffer. ...


GtkTextMark

A position in the buffer preserved across buffer modifications.

You may wish to begin by reading the text widget conceptual overview which gives an overview of all the objects and data types related to the text widget and how they work together. ...

Creates a text mark. ...

Sets the visibility of mark; the insertion point is normally visible, i. e. you can see it as a vertical bar. Also, the text widget uses a visible mark to indicate where a drop will occur when dragging-and-dropping text. Most other marks are not visible. Marks are not visible by default.

Returns true if the mark is visible (i. e. a cursor is displayed for it).

Returns true if the mark has been removed from its buffer with the function gtk-text-buffer-delete-mark. See the function gtk-text-buffer-add-mark for a way to add it to a buffer again.

Returns the mark name; returns nil for anonymous marks.

Gets the buffer this mark is located inside, or nil if the mark is deleted.

Determines whether the mark has left gravity.


GtkTextBuffer

Stores attributed text for display in a gtk-text-view widget.

You may wish to begin by reading the text widget conceptual overview which gives an overview of all the objects and data types related to the text widget and how they work together. ...

Creates a new text buffer.

Obtains the number of lines in the buffer. ...

Gets the number of characters in the buffer. ...

Get the gtk-text-tag-table object associated with this buffer.

Inserts text at position iter. Emits the "insert-text" signal; insertion actually occurs in the default handler for the signal. iter is invalidated when insertion occurs (because the buffer contents change), but the default signal handler revalidates it to point to the end of the inserted text.

Simply calls the function gtk-text-buffer-insert, using the current cursor position as the insertion point.

Like the function gtk-text-buffer-insert, but the insertion will not occur if iter is at a non-editable location in the buffer. Usually you want to prevent insertions at ineditable locations if the insertion results from a user action (is interactive). ...

Calls the function gtk-text-buffer-insert-interactive at the cursor position. ...

Copies text, tags, and pixbufs between start and end (the order of start and end does not matter) and inserts the copy at iter. Used instead of simply getting/inserting text because it preserves images and tags. If start and end are in a different buffer from buffer, the two buffers must share the same tag table. ...

Same as the function gtk-text-buffer-insert-range, but does nothing if the insertion point is not editable. The default-editable parameter indicates whether the text is editable at iter if no tags enclosing iter affect editability. Typically the result of the function gtk-text-view-get-editable is appropriate here.

Deletes text between start and end. The order of start and end is not actually relevant; gtk-text-buffer-delete will reorder them. This function actually emits the "delete-range" signal, and the default handler of that signal deletes the text. Because the buffer is modified, all outstanding iterators become invalid after calling this function; however, the start and end will be re-initialized to point to the location where text was deleted.

Deletes all editable text in the given range. Calls the function gtk-text-buffer-delete for each editable sub range of [start, end). start and end are revalidated to point to the location of the last deleted range, or left untouched if no text was deleted.

Performs the appropriate action as if the user hit the delete key with the cursor at the position specified by iter. In the normal case a single character will be deleted, but when combining accents are involved, more than one character can be deleted, and when precomposed character and accent combinations are involved, less than one character will be deleted. ...

Deletes current contents of buffer, and inserts text instead. text must be valid UTF-8.

Returns the text in the range [start, end). ...

Returns the text in the range [start, end). Excludes undisplayed text, text marked with tags that set the invisibility attribute, if include-hidden-chars is nil. ...

Inserts an image into the text buffer at iter. ...

Inserts a child widget anchor into the text buffer at iter. The anchor will be counted as one character in character counts, and when obtaining the buffer contents as a string, will be represented by the Unicode "object replacement character" 0xFFFC. Note that the "slice" variants for obtaining portions of the buffer as a string include this character for child anchors, but the "text" variants do not. E. g. see the functions gtk-text-buffer-get-slice and gtk-text-buffer-get-text. Consider the function gtk-text-buffer-create-child-anchor as a more convenient alternative to this function. The buffer will add a reference to the anchor, so you can unref it after insertion.

This is a convenience function which simply creates a child anchor with the function gtk-text-child-anchor-new and inserts it into the buffer with the function gtk-text-buffer-insert-child-anchor. The new anchor is owned by the buffer; no reference count is returned to the caller of the function gtk-text-buffer-create-child-anchor.

Creates a mark at position pos. If mark-name is nil, the mark is anonymous; otherwise, the mark can be retrieved by name using the function gtk-text-buffer-get-mark. If a mark has left gravity, and text is inserted at the mark's current location, the mark will be moved to the left of the newly inserted text. If the mark has right gravity (left-gravity = nil), the mark will end up on the right of newly inserted text. The standard left-to-right cursor is a mark with right gravity (when you type, the cursor stays on the right side of the text you are typing). ...

Moves mark to the new location where. Emits the "mark-set" signal as notification of the move.

Moves the mark named name (which must exist) to location where. See the function gtk-text-buffer-move-mark for details.

Adds the mark at position where. The mark must not be added to another buffer, and if its name is not nil then there must not be another mark in the buffer with the same name. ...

Deletes mark, so that it is no longer located anywhere in the buffer. Removes the reference the buffer holds to the mark, so if you have not called the function g-object-ref on the mark, it will be freed. Even if the mark is not freed, most operations on mark become invalid, until it gets added to a buffer again with the function gtk-text-buffer-add-mark. Use the function gtk-text-mark-get-deleted to find out if a mark has been removed from its buffer. The "mark-deleted" signal will be emitted as notification after the mark is deleted. gtk-text-buffer-add-mark gtk-text-mark-get-deleted

Deletes the mark named name; the mark must exist. See the function gtk-text-buffer-delete-mark for details.

Returns the mark named name in buffer buffer, or nil if no such mark exists in the buffer.

Returns the mark that represents the cursor (insertion point). Equivalent to calling the function gtk-text-buffer-get-mark to get the mark named "insert", but very slightly more efficient, and involves less typing.

Returns the mark that represents the selection bound. Equivalent to calling the function gtk-text-buffer-get-mark to get the mark named "selection_bound", but very slightly more efficient, and involves less typing. ...

Indicates whether the buffer has some text currently selected. ...

This function moves the "insert" and "selection_bound" marks simultaneously. If you move them to the same place in two steps with the function gtk-text-buffer-move-mark, you will temporarily select a region in between their old and new locations, which can be pretty inefficient since the temporarily-selected region will force stuff to be recalculated. This function moves them as a unit, which can be optimized.

This function moves the "insert" and "selection_bound" marks simultaneously. If you move them in two steps with the function gtk-text-buffer-move-mark, you will temporarily select a region in between their old and new locations, which can be pretty inefficient since the temporarily-selected region will force stuff to be recalculated. This function moves them as a unit, which can be optimized. ...

Emits the "apply-tag" signal on buffer. The default handler for the signal applies tag to the given range. start and end do not have to be in order.

Emits the "remove-tag" signal. The default handler for the signal removes all occurrences of tag from the given range. start and end do not have to be in order.

Calls the function gtk-text-tag-table-lookup on the buffer's tag table to get a gtk-text-tag object, then calls the function gtk-text-buffer-apply-tag.

Calls the function gtk-text-tag-table-lookup on the buffer's tag table to get a gtk-text-tag object, then calls the function gtk-text-buffer-remove-tag.

Removes all tags in the range between start and end. Be careful with this function; it could remove tags added in code unrelated to the code you are currently writing. That is, using this function is probably a bad idea if you have two or more unrelated code sections that add tags.

Obtains an iterator pointing to char-offset within the given line. The char-offset must exist, offsets off the end of the line are not allowed. Note characters, not bytes; UTF-8 may encode one character as multiple bytes.

Initializes iter to a position char-offset chars from the start of the entire buffer. If char-offset is -1 or greater than the number of characters in the buffer, iter is initialized to the end iterator, the iterator one past the last valid character in the buffer.

Initializes iter to the start of the given line.

Initializes iter with the current position of mark.

Obtains the location of anchor within buffer.

Initialized iter with the first position in the text buffer. This is the same as using the function gtk-text-buffer-get-iter-at-offset to get the iter at character offset 0.

Initializes iter with the "end iterator", one past the last valid character in the text buffer. If dereferenced with the function gtk-text-iter-get-char, the end iterator has a character value of 0. The entire buffer lies in the range from the first position in the buffer (call the function gtk-text-buffer-get-start-iter to get character position 0) to the end iterator.

Retrieves the first and last iterators in the buffer, i. e. the entire buffer lies within the range [start, end).

Deletes the range between the "insert" and "selection_bound" marks, that is, the currently-selected text. If interactive is true, the editability of the selection will be considered (users cannot delete uneditable text).

Pastes the contents of a clipboard at the insertion point, or at override-location. (Note: pasting is asynchronous, that is, we will ask for the paste data and return, and at some point later after the main loop runs, the paste data will be inserted.)

Copies the currently selected text to a clipboard.

Copies the currently selected text to a clipboard, then deletes said text if it is editable.

Returns the iters start and end if some text is selected; if the selection has length 0, then start and end are filled in with the same value. start and end will be in ascending order.

Called to indicate that the buffer operations between here and a call to the function gtk-text-buffer-end-user-action are part of a single user-visible operation. The operations between the functions gtk-text-buffer-begin-user-action and gtk-text-buffer-end-user-action can then be grouped when creating an undo stack. gtk-text-buffer maintains a count of calls to gtk-text-buffer-begin-user-action that have not been closed with a call to the function gtk-text-buffer-end-user-action, and emits the "begin-user-action" and "end-user-action" signals only for the outermost pair of calls. This allows you to build user actions from other user actions. ...

Should be paired with a call to the function gtk-text-buffer-begin-user-action. See that function for a full explanation.

Adds clipboard to the list of clipboards in which the selection contents of buffer are available. In most cases, clipboard will be the gtk-clipboard of type :primary for a view of buffer.

Removes a gtk-clipboard object added with the function gtk-text-buffer-add-selection-clipboard.


This function deserializes rich text in format format and inserts it at iter. ...

This functions returns the value set with the function gtk-text-buffer-deserialize-set-can-create-tags. ...

This function returns the list of targets this text buffer can provide for copying and as DND source. ...

This function returns the rich text deserialize formats registered with buffer using the functions gtk-text-buffer-register-deserialize-format or gtk-text-buffer-register-deserialize-tagset. ...

This function returns the list of targets this text buffer supports for pasting and as DND destination. ...

This function returns the rich text serialize formats registered with buffer using the functions gtk-text-buffer-register-serialize-format or gtk-text-buffer-register-serialize-tagset. ...

This function registers a rich text deserialization function along with its mime-type with the passed buffer. ...

This function registers GTK+'s internal rich text serialization format with the passed buffer. See the function gtk-text-buffer-register-serialize-tagset for details. ...

This function registers a rich text serialization function along with its mime-type with the passed buffer. ...

This function registers GTK+'s internal rich text serialization format with the passed buffer. The internal format does not comply to any standard rich text format and only works between gtk-text-buffer instances. It is capable of serializing all of a text buffer's tags and embedded pixbufs. ...

This function serializes the portion of text between start and end in the rich text format represented by format. ...

This function unregisters a rich text format that was previously registered using the functions gtk-text-buffer-register-deserialize-format or gtk-text-buffer-register-deserialize-tagset. ...

This function unregisters a rich text format that was previously registered using the functions gtk-text-buffer-register-serialize-format or gtk-text-buffer-register-serialize-tagset. ...


GtkTextTag

A tag that can be applied to text in a gtk-text-buffer.

You may wish to begin by reading the text widget conceptual overview which gives an overview of all the objects and data types related to the text widget and how they work together. ...

Describes a type of line wrapping. ...


GtkTextTagTable

Collection of tags that can be used together.

You may wish to begin by reading the text widget conceptual overview which gives an overview of all the objects and data types related to the text widget and how they work together. ...

Creates a new gtk-text-tag-table object. The table contains no tags by default.

Add a tag to the table. The tag is assigned the highest priority in the table. ...

Remove a tag from the table. This will remove the table's reference to the tag, so be careful - the tag will end up destroyed if you do not have a reference to it.

Look up a named tag.

Calls func on each tag in table. Note that the table may not be modified while iterating over it (you cannot add/remove tags).

Returns the size of the number of tags.


GtkTextView

Widget that displays a gtk-text-buffer object.

You may wish to begin by reading the text widget conceptual overview which gives an overview of all the objects and data types related to the text widget and how they work together. ...


Creates a new gtk-text-view object. If you do not call the function gtk-text-view-buffer before using the text view, an empty default buffer will be created for you. Get the buffer with the function gtk-text-view-get-buffer. If you want to specify your own buffer, consider the function gtk-text-view-new-with-buffer.

Creates a new gtk-text-view widget displaying the buffer buffer. One buffer can be shared among many widgets. buffer may be nil to create a default buffer, in which case this function is equivalent to the function gtk-text-view-new. The text view adds its own reference count to the buffer; it does not take over an existing reference.

Sets buffer as the buffer being displayed by text-view. ...

Returns the gtk-text-buffer object being displayed by this text view.

Scrolls text-view so that mark is on the screen in the position indicated by xalign and yalign. An alignment of 0.0 indicates left or top, 1.0 indicates right or bottom, 0.5 means center. If use-align is nil, the text scrolls the minimal distance to get the mark onscreen, possibly not scrolling at all. The effective screen for purposes of this function is reduced by a margin of size within-margin.

Scrolls text-view so that iter is on the screen in the position indicated by xalign and yalign. An alignment of 0.0 indicates left or top, 1.0 indicates right or bottom, 0.5 means center. If use-align is nil, the text scrolls the minimal distance to get the mark onscreen, possibly not scrolling at all. The effective screen for purposes of this function is reduced by a margin of size within-margin. ...

Scrolls text-view the minimum distance such that mark is contained within the visible area of the widget.

Moves a mark within the buffer so that it it located within the currently-visible text area.

Moves the cursor to the currently visible region of the buffer, it it is not there already.

The currently visible region of the buffer, in buffer coordinates. Convert to window coordinates with the function gtk-text-view-buffer-to-window-coords.

Gets a rectangle which roughly contains the character at iter. ...

Gets the gtk-text-iter at the start of the line containing the coordinate y. y is in buffer coordinates, convert from window coordinates with the function gtk-text-view-window-to-buffer-coords. If non-nil, line-top will be filled with the coordinate of the top edge of the line.

Gets the y coordinate of the top of the line containing iter, and the height of the line. The coordinate is a buffer coordinate; convert to window coordinates with the function gtk-text-view-buffer-to-window-coords.

Retrieves the iterator at buffer coordinates x and y. Buffer coordinates are coordinates for the entire buffer, not just the currently-displayed portion. If you have coordinates from an event, you have to convert those to buffer coordinates with the function gtk-text-view-window-to-buffer-coords.

Retrieves the iterator pointing to the character at buffer coordinates x and y. Buffer coordinates are coordinates for the entire buffer, not just the currently-displayed portion. If you have coordinates from an event, you have to convert those to buffer coordinates with the function gtk-text-view-window-to-buffer-coords. ...

Converts coordinate (buffer-x, buffer-y) to coordinates for the window win (window-x, window-y). ...

Converts coordinates on the window identified by win to buffer coordinates, storing the result in (buffer-x ,buffer-y). ...

Retrieves the gdk-window object corresponding to an area of the text view. ...

Usually used to find out which window an event corresponds to. If you connect to an event signal on text-view, this function should be called on event->window to see which window it was.

Sets the width of :left or :right, or the height of :top or :bottom. ...

Gets the width of the specified border window. See the function gtk-text-view-set-border-window-size.

Moves the given iter forward by one display (wrapped) line. A display line is different from a paragraph. Paragraphs are separated by newlines or other paragraph separator characters. Display lines are created by line-wrapping a paragraph. If wrapping is turned off, display lines and paragraphs will be the same. Display lines are divided differently for each view, since they depend on the view's width; paragraphs are the same in all views, since they depend on the contents of the gtk-text-buffer.

Moves the given iter backward by one display (wrapped) line. A display line is different from a paragraph. Paragraphs are separated by newlines or other paragraph separator characters. Display lines are created by line-wrapping a paragraph. If wrapping is turned off, display lines and paragraphs will be the same. Display lines are divided differently for each view, since they depend on the view's width; paragraphs are the same in all views, since they depend on the contents of the gtk-text-buffer.

Moves the given iter forward to the next display line end. A display line is different from a paragraph. Paragraphs are separated by newlines or other paragraph separator characters. Display lines are created by line-wrapping a paragraph. If wrapping is turned off, display lines and paragraphs will be the same. Display lines are divided differently for each view, since they depend on the view's width; paragraphs are the same in all views, since they depend on the contents of the gtk-text-buffer.

Moves the given iter backward to the next display line start. A display line is different from a paragraph. Paragraphs are separated by newlines or other paragraph separator characters. Display lines are created by line-wrapping a paragraph. If wrapping is turned off, display lines and paragraphs will be the same. Display lines are divided differently for each view, since they depend on the view's width; paragraphs are the same in all views, since they depend on the contents of the gtk-text-buffer.

Determines whether iter is at the start of a display line. See the function gtk-text-view-forward-display-line for an explanation of display lines vs. paragraphs.

Move the iterator a given number of characters visually, treating it as the strong cursor position. If count is positive, then the new strong cursor position will be count positions to the right of the old cursor position. If count is negative then the new strong cursor position will be count positions to the left of the old cursor position. ...

Adds a child widget in the text buffer, at the given anchor.

A gtk-text-child-anchor is a spot in the buffer where child widgets can be "anchored" (inserted inline, as if they were characters). The anchor can have multiple widgets anchored, to allow for multiple views.

Creates a new gtk-text-child-anchor object. ...

Gets a list of all widgets anchored at this child anchor.

Adds a child at fixed coordinates in one of the text widget's windows. ...

Updates the position of a child, as for the function gtk-text-view-add-child-in-window.

Sets the line wrapping for the view.

Gets the line wrapping for the view.

Sets the default editability of the gtk-text-view. ...

Returns the default editability of the gtk-text-view. ...

Toggles whether the insertion point is displayed. ...

Find out whether the cursor is being displayed.

Changes the gtk-text-view overwrite mode. ...

Returns whether the gtk-text-view is in overwrite mode or not. ...

Sets the default number of blank pixels above paragraphs in text-view. ...

Gets the default number of pixels to put above paragraphs.

Sets the default number of pixels of blank space to put below paragraphs in text-view. ...

Gets the value set by the function gtk-text-view-set-pixels-below-lines.

Sets the default number of pixels of blank space to leave between display/wrapped lines within a paragraph. ...

Gets the value set by the function gtk-text-view-set-pixels-inside-wrap.

Sets the default justification of text in text-view. ...

Gets the default justification of paragraphs in text-view. ...

Sets the default left margin for text in text-view. ...

Gets the default left margin size of paragraphs in the text-view. ...

Sets the default right margin for text in text-view. ...

Gets the default right margin for text in text-view. ...

Sets the default indentation for paragraphs in text-view. ...

Gets the default indentation of paragraphs in text-view. ...

Sets the default tab stops for paragraphs in text-view. ...

Gets the default tabs for text-view. ...

Sets the behavior of the text widget when the Tab key is pressed. ...

Returns whether pressing the Tab key inserts a tab characters. ...

Sets the "input-purpose" property which can be used by on-screen keyboards and other input methods to adjust their behaviour. ...

Gets the value of the "input-purpose" property. ...

Sets the "input-hints" property, which allows input methods to fine-tune their behaviour. ...

Gets the value of the "input-hints" property. ...

Tree, List and Icon Grid Widgets

Overview of gtk-tree-model, gtk-tree-view, and friends.

Overview
To create a tree or list in GTK+, use the gtk-tree-model interface in conjunction with the gtk-tree-view widget. This widget is designed around a Model/View/Controller design and consists of four major parts: The View is composed of the first three objects, while the last is the Model. One of the prime benefits of the MVC design is that multiple views can be created of a single model. For example, a model mapping the file system could be created for a file manager. Many views could be created to display various parts of the file system, but only one copy need be kept in memory.

The purpose of the cell renderers is to provide extensibility to the widget and to allow multiple ways of rendering the same type of data. For example, consider how to render a boolean variable. Should it render it as a string of "True" or "False", "On" or "Off", or should it be rendered as a checkbox?

Creating a model
GTK+ provides two simple models that can be used: the gtk-list-store and the gtk-tree-store. gtk-list-store is used to model list widgets, while the gtk-tree-store models trees. It is possible to develop a new type of model, but the existing models should be satisfactory for all but the most specialized of situations. Creating the model is quite simple:
GtkListStore *store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_BOOLEAN);      
This creates a list store with two columns: a string column and a boolean column. Typically the 2 is never passed directly like that; usually an enum is created wherein the different columns are enumerated, followed by a token that represents the total number of columns. The next example will illustrate this, only using a tree store instead of a list store. Creating a tree store operates almost exactly the same.
enum
{
   TITLE_COLUMN,
   AUTHOR_COLUMN,
   CHECKED_COLUMN,
   N_COLUMNS
};

GtkTreeStore *store = gtk_tree_store_new (N_COLUMNS, /* Total number of columns */ G_TYPE_STRING, /* Book title */ G_TYPE_STRING, /* Author */ G_TYPE_BOOLEAN); /* Is checked out? */
Adding data to the model is done using gtk-tree-store-set or gtk-list-store-set, depending upon which sort of model was created. To do this, a gtk-tree-iter must be acquired. The iterator points to the location where data will be added.

Once an iterator has been acquired, gtk-tree-store-set is used to apply data to the part of the model that the iterator points to. Consider the following example:
GtkTreeIter   iter;

gtk_tree_store_append (store, &iter, NULL); /* Acquire an iterator */

gtk_tree_store_set (store, &iter, TITLE_COLUMN, "The Principle of Reason", AUTHOR_COLUMN, "Martin Heidegger", CHECKED_COLUMN, FALSE, -1);
Notice that the last argument is -1. This is always done because this is a variable-argument function and it needs to know when to stop processing arguments. It can be used to set the data in any or all columns in a given row.

The third argument to gtk-tree-store-append is the parent iterator. It is used to add a row to a gtk-tree-store as a child of an existing row. This means that the new row will only be visible when its parent is visible and in its expanded state. Consider the following example:
GtkTreeIter iter1;  /* Parent iter */
GtkTreeIter iter2;  /* Child iter  */

gtk_tree_store_append (store, &iter1, NULL); /* Acquire a top-level iterator */ gtk_tree_store_set (store, &iter1, TITLE_COLUMN, "The Art of Computer Programming", AUTHOR_COLUMN, "Donald E. Knuth", CHECKED_COLUMN, FALSE, -1);

gtk_tree_store_append (store, &iter2, &iter1); /* Acquire a child iterator */ gtk_tree_store_set (store, &iter2, TITLE_COLUMN, "Volume 1: Fundamental Algorithms", -1);

gtk_tree_store_append (store, &iter2, &iter1); gtk_tree_store_set (store, &iter2, TITLE_COLUMN, "Volume 2: Seminumerical Algorithms", -1);

gtk_tree_store_append (store, &iter2, &iter1); gtk_tree_store_set (store, &iter2, TITLE_COLUMN, "Volume 3: Sorting and Searching", -1);


Creating the view component
While there are several different models to choose from, there is only one view widget to deal with. It works with either the list or the tree store. Setting up a gtk-tree-view is not a difficult matter. It needs a gtk-tree-model to know where to retrieve its data from.
GtkWidget *tree;

tree = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store));

Columns and cell renderers
Once the gtk-tree-view widget has a model, it will need to know how to display the model. It does this with columns and cell renderers.

Cell renderers are used to draw the data in the tree model in a way. There are a number of cell renderers that come with GTK+ 2.x, including the gtk-cell-renderer-text, gtk-cell-renderer-pixbuf and the gtk-cell-renderer-toggle. It is relatively easy to write a custom renderer.

A gtk-tree-view-column is the object that gtk-tree-view uses to organize the vertical columns in the tree view. It needs to know the name of the column to label for the user, what type of cell renderer to use, and which piece of data to retrieve from the model for a given row.
GtkCellRenderer *renderer;
GtkTreeViewColumn *column;

renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes ("Author", renderer, "text", AUTHOR_COLUMN, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (tree), column);
At this point, all the steps in creating a displayable tree have been covered. The model is created, data is stored in it, a tree view is created and columns are added to it.

Selection handling
Most applications will need to not only deal with displaying data, but also receiving input events from users. To do this, simply get a reference to a selection object and connect to the "changed" signal.
/* Prototype for selection handler callback */
static void tree_selection_changed_cb (GtkTreeSelection *selection, gpointer data);

/* Setup the selection handler */ GtkTreeSelection *select;

select = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree)); gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE); g_signal_connect (G_OBJECT (select), "changed", G_CALLBACK (tree_selection_changed_cb), NULL);
Then to retrieve data for the row selected:
static void
tree_selection_changed_cb (GtkTreeSelection *selection, gpointer data)
{
        GtkTreeIter iter;
        GtkTreeModel *model;
        gchar *author;

if (gtk_tree_selection_get_selected (selection, &model, &iter)) { gtk_tree_model_get (model, &iter, AUTHOR_COLUMN, &author, -1);

g_print ("You selected a book by %sn", author);

g_free (author); } }


Simple Example
Here is a simple example of using a gtk-tree-view widget in context of the other widgets. It simply creates a simple model and view, and puts them together. Note that the model is never populated with data - that is left as an exercise for the reader. More information can be found on this in the GtkTreeModel section.
enum
{
   TITLE_COLUMN,
   AUTHOR_COLUMN,
   CHECKED_COLUMN,
   N_COLUMNS
};

void setup_tree (void) { GtkTreeStore *store; GtkWidget *tree; GtkTreeViewColumn *column; GtkCellRenderer *renderer;

/* Create a model. We are using the store model for now, though we * could use any other GtkTreeModel */ store = gtk_tree_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN);

/* custom function to fill the model with data */ populate_tree_model (store);

/* Create a view */ tree = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store));

/* The view now holds a reference. We can get rid of our own * reference */ g_object_unref (G_OBJECT (store));

/* Create a cell render and arbitrarily make it red for demonstration * purposes */ renderer = gtk_cell_renderer_text_new (); g_object_set (G_OBJECT (renderer), "foreground", "red", NULL);

/* Create a column, associating the "text" attribute of the * cell_renderer to the first column of the model */ column = gtk_tree_view_column_new_with_attributes ("Author", renderer, "text", AUTHOR_COLUMN, NULL);

/* Add the column to the view. */ gtk_tree_view_append_column (GTK_TREE_VIEW (tree), column);

/* Second column.. title of the book. */ renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes ("Title", renderer, "text", TITLE_COLUMN, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (tree), column);

/* Last column.. whether a book is checked out. */ renderer = gtk_cell_renderer_toggle_new (); column = gtk_tree_view_column_new_with_attributes ("Checked out", renderer, "active", CHECKED_COLUMN, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (tree), column);

/* Now we can manipulate the view just like any other GTK widget */ ... }

GtkTreeModel

The tree interface used by gtk-tree-view.

The gtk-tree-model interface defines a generic tree interface for use by the gtk-tree-view widget. It is an abstract interface, and is designed to be usable with any appropriate data structure. The programmer just has to implement this interface on their own data type for it to be viewable by a gtk-tree-view widget. ...

The gtk-tree-iter structure is the primary structure for accessing a gtk-tree-model. Models are expected to put a unique integer in the stamp member, and put model specific data in the three user-data members. ...

Accessor of the slot stamp of the gtk-tree-iter structure.

Accessor of the slot user-data of the gtk-tree-iter structure.


A gtk-tree-row-reference tracks model changes so that it always refers to the same row, a gtk-tree-path refers to a position, not a fixed row. Create a new gtk-tree-row-reference with the function gtk-tree-row-reference-new. ...

These flags indicate various properties of a gtk-tree-model. ...

Creates a new gtk-tree-path. This structure refers to a row. ...

Creates a new gtk-tree-path initialized to path. ...

Creates a new path with indices as indices. ...

Generates a string representation of the path. ...

Creates a new gtk-tree-path. ...

Appends a new index to a path. ...

Prepends a new index to a path. ...

Returns the current depth of path. ...

Returns the current indices of path. ...

Frees path. If path is NULL, it simply returns. ...

Creates a new gtk-tree-path object as a copy of path. ...

Compares two paths. ...

Moves the path to point to the next node at the current depth. ...

Moves the path to point to the previous node at the current depth, if it exists.

Moves the path to point to its parent node, if it has a parent.

Moves path to point to the first child of the current path.

Returns true if descendant is a descendant of path.

Returns true if path is a descendant of ancestor.

Creates a row reference based on path. ...

Returns the model that the row reference is monitoring. ...

Returns a path that the row reference currently points to, or nil if the path pointed to is no longer valid.

Returns true if the reference is non-nil and refers to a current valid path.

Returns a set of flags supported by this interface. ...

Returns the number of columns supported by tree-model.

Returns the type of the column.

Returns a valid iterator pointing to path. If path does not exist, nil is returned.

Returns iter a valid iterator pointing to path-string, if it exists. ...

Initializes iter with the first iterator in the tree, the one at the path "0". Returns nil if the tree is empty.

Returns a newly-created gtk-tree-path referenced by iter. ...

Returns the value at column.

Sets iter to point to the node following it at the current level. ...

Sets iter to point to the previous node at the current level. ...

Sets iter to point to the first child of parent. ...

Returns true if iter has children, nil otherwise.

Returns the number of children that iter has. ...

Sets iter to be the child of parent, using the given index. ...

Sets parent to be the parent of child. ...

Generates a string representation of the iter. ...

Lets the tree ref the node. ...

Lets the tree unref the node. ...

Gets the value of one or more cells in the row referenced by iter. ...

Calls func on each node in model in a depth-first fashion. ...

Emits the "row-changed" signal on tree-model.


GtkTreeSelection

The selection object for gtk-tree-view.

The gtk-tree-selection object is a helper object to manage the selection for a gtk-tree-view widget. The gtk-tree-selection object is automatically created when a new gtk-tree-view widget is created, and cannot exist independentally of this widget. The primary reason the gtk-tree-selection objects exists is for cleanliness of code and API. That is, there is no conceptual reason all these functions could not be methods on the gtk-tree-view widget instead of a separate function. ...

Sets the selection mode of the selection. If the previous type was :multiple, then the anchor is kept selected, if it was previously selected.

Gets the selection mode for selection. ...

Sets the selection function. ...

Returns the current selection function. ...

Returns the tree view associated with selection.

Sets iter to the currently selected node if selection is set to :single or :browse. This function will not work if you use selection is :multiple.

Calls a function for each selected node. ...

Creates a list of path of all selected rows. Additionally, if you are planning on modifying the model after calling this function, you may want to convert the returned list into a list of gtk-tree-row-reference's. To do this, you can use the function gtk-tree-row-reference-new. ...

Returns the number of rows that have been selected in tree. ...

Select the row at path.

Unselects the row at path.

Returns true if the row pointed to by path is currently selected. If path does not point to a valid location, nil is returned. ...

Selects the specified iterator.

Unselects the specified iterator.

Returns true if the row at iter is currently selected.

Selects all the nodes. selection must be set to :multiple mode. ...

Unselects all the nodes. ...

Selects a range of nodes, determined by start-path and end-path inclusive. selection must be set to :multiple mode. ...

Unselects a range of nodes, determined by start-path and end-path inclusive. ...


GtkTreeViewColumn

A visible column in a gtk-tree-view widget.

The sizing method the column uses to determine its width. Please note that :autosize are inefficient for large views, and can make columns appear choppy. ...

The gtk-tree-view-column object represents a visible column in a gtk-tree-view widget. It allows to set properties of the column header, and functions as a holding pen for the cell renderers which determine how the data in the column is displayed. ...

Creates a new gtk-tree-view-column object.

Creates a new gtk-tree-view-column using area to render its cells. ...

Creates a new gtk-tree-view-column with a number of default values. ...

Packs the cell into the beginning of the column. ...

Adds the cell to end of the column. If expand is nil, then the cell is allocated no more space than it needs. Any unused space is divided evenly between cells for which expand is true.

Unsets all the mappings on all renderers on the tree-column.

Adds an attribute mapping to the list in tree-column. ...

Sets the attributes in the list as the attributes of tree-column. The attributes should be in attribute/column order, as in the function gtk-tree-view-column-add-attribute. All existing attributes are removed, and replaced with the new attributes.

Sets the GtkTreeViewColumnFunc to use for the column. This function is used instead of the standard attributes mapping for setting the column value, and should set the value of tree-column's cell renderer as appropriate. func may be nil to remove an older one.

Clears all existing attributes previously set with the function gtk-tree-view-column-set-attributes.

Sets the spacing field of tree-column, which is the number of pixels to place between cell renderers packed into it.

Returns the spacing of tree-column.

Sets the visibility of tree-column.

Returns true if tree-column is visible.

If resizable is true, then the user can explicitly resize the column by grabbing the outer edge of the column button. If resizable is true and sizing mode of the column is :autosize, then the sizing mode is changed to :grow-only.

Returns true if the tree-column can be resized by the end user.

Sets the growth behavior of tree-column to type.

Returns the current type of tree-column.

Returns the current size of tree-column in pixels.

Gets the fixed width of the column. This value is only meaning may not be the actual width of the column on the screen, just what is requested.

Sets the size of the column in pixels. ...

Sets the minimum width of the tree-column. If min-width is -1, then the minimum width is unset.

Returns the minimum width in pixels of the tree-column, or -1 if no minimum width is set.

Sets the maximum width of the tree-column. If max-width is -1, then the maximum width is unset. Note, the column can actually be wider than max width if it is the last column in a view. In this case, the column expands to fill any extra space.

Returns the maximum width in pixels of the tree-column, or -1 if no maximum width is set.

Emits the "clicked" signal on the column. This function will only work if tree-column is clickable.

Sets the title of the tree-column. If a custom widget has been set, then this value is ignored.

Returns the title of the widget.

Sets the column to take available extra space. This space is shared equally amongst all columns that have the expand set to true. If no column has this option set, then the last column gets all extra space. By default, every column is created with this nil. ...

Return true if the column expands to take any available space. ...

Sets the header to be active if clickable is true. When the header is active, then it can take keyboard focus, and can be clicked.

Returns true if the user can click on the header for the column.

Sets the widget in the header to be widget. If widget is nil, then the header button is set with a gtk-label set to the title of tree-column.

Returns the gtk-widget in the button on the column header. If a custom widget has not been set then nil is returned.

Returns the button used in the treeview column header. ...

Sets the alignment of the title or custom widget inside the column header. The alignment determines its location inside the button -0.0 for left, 0.5 for center, 1.0 for right.

Returns the current x alignment of tree-column. This value can range between 0.0 and 1.0.

If reorderable is true, then the column can be reordered by the end user dragging the header.

Returns true if the tree-column can be reordered by the user.

Sets the logical sort-column-id that this column sorts on when this column is selected for sorting. Doing so makes the column header clickable.

Gets the logical sort-column-id that the model sorts on when this column is selected for sorting. See the function gtk-tree-view-column-set-sort-column-id.

Call this function with a setting of true to display an arrow in the header button indicating the column is sorted. Call the function gtk-tree-view-column-set-sort-order to change the direction of the arrow.

Gets the value set by the function gtk-tree-view-column-set-sort-indicator.

Changes the appearance of the sort indicator. ...

Gets the value set by the function gtk-tree-view-column-set-sort-order.

Sets the cell renderer based on the tree-model and iter. That is, for every attribute mapping in tree-column, it will get a value from the set column on the iter, and use that value to set the attribute on the cell renderer. This is used primarily by the gtk-tree-view.

Obtains the width and height needed to render the column. This is used primarily by the gtk-tree-view.

Obtains the horizontal position and size of a cell in a column. If the cell is not found in the column, start-pos and width are not changed and nil is returned.

Returns true if any of the cells packed into the tree-column are visible. For this to be meaningful, you must first initialize the cells with the function gtk-tree-view-column-cell-set-cell-data.

Sets the current keyboard focus to be at cell, if the column contains 2 or more editable and activatable cells. ...

Flags the column, and the cell renderers added to this column, to have their sizes renegotiated. ...

Returns the gtk-tree-view wherein tree-column has been inserted. If column is currently not inserted in any tree view, nil is returned. ...

Returns the current X offset of tree-column in pixels. ...


GtkTreeView

A widget for displaying both trees and lists.

Widget that displays any object that implements the gtk-tree-model interface. ...

An enum for determining where a dropped row goes. ...

Creates a new gtk-tree-view widget.

Returns the amount, in pixels, of extra indentation for child levels in tree-view. ...

Returns whether or not expanders are drawn in tree-view. ...

Sets the amount of extra indentation for child levels to use in tree-view in addition to the default indentation. The value should be specified in pixels, a value of 0 disables this feature and in this case only the default indentation will be used. This does not have any visible effects for lists. ...

Sets whether to draw and enable expanders and indent child rows in tree-view. When disabled there will be no expanders visible in trees and there will be no way to expand and collapse rows by default. Also note that hiding the expanders will disable the default indentation. You can set a custom indentation in this case using the function gtk-tree-view-set-level-indentation. This does not have any visible effects for lists. ...

Creates a new gtk-tree-view widget with the model initialized to model.

Returns the model the gtk-tree-view widget is based on. Returns nil if the model is unset.

Sets the model for a gtk-tree-view. If the tree-view already has a model set, it will remove it before setting the new model. If model is nil, then it will unset the old model.

Gets the gtk-tree-selection object associated with tree-view.

Returns true if the headers on the tree-view are visible.

Sets the visibility state of the headers.

Resizes all columns to their optimal width. Only works after the treeview has been realized.

Returns whether all header columns are clickable. ...

Allow the column title buttons to be clicked.

This function tells GTK+ that the user interface for your application requires users to read across tree rows and associate cells with one another. ...

Gets the setting set by the gtk-tree-view-set-rules-hint function.

Appends column to the list of columns. If tree-view has "fixed_height" mode enabled, then column must have its "sizing" property set to be :fixed.

Removes column from tree-view.

This inserts the column into the tree-view at position. If position is -1, then the column is inserted at the end. If tree-view has "fixed_height" mode enabled, then column must have its "sizing" property set to be :fixed.

Queries the number of columns in the given tree-view. ...

Gets the gtk-tree-view-column at the given position in the tree-view.

Returns a list of all the gtk-tree-view-column's currently in tree-view.

Moves column to be after to base-column. If base-column is nil, then column is placed in the first position.

Sets the column to draw the expander arrow at. It must be in tree-view. If column is nil, then the expander arrow is always at the first visible column. ...

Returns the column that is the current expander column. This column has the expander arrow drawn next to it.

Scrolls the tree view such that the top-left corner of the visible area is tree-x, tree-y, where tree-x and tree-y are specified in tree coordinates. ...

Moves the alignments of tree-view to the position specified by column and path. ...

Sets the current keyboard focus to be at path, and selects it. ...

Sets the current keyboard focus to be at path, and selects it. ...

Fills in path and focus-column with the current path and focus column. ...

Activates the cell determined by path and column.

Recursively expands all nodes in the tree-view.

Recursively collapses all visible, expanded nodes in tree-view.

Expands the row at path. This will also expand all parent rows of path as necessary. ...

Opens the row so its children are visible.

Collapses a row (hides its child rows, if they exist).

Calls func on all expanded rows.

Returns true if the node pointed to by path is expanded in tree-view.

This function is a convenience function to allow you to reorder models that support the gtk-tree-drag-source interface and the gtk-tree-drag-dest interface. ...

Retrieves whether the user can reorder the tree via drag-and-drop. See the gtk-tree-view-set-reorderable function.

Finds the path at the point (x, y), relative to bin_window coordinates (please see the function gtk-tree-view-get-bin-window). ...

Determine whether the point (x, y) in tree-view is blank, that is no cell content nor an expander arrow is drawn at the location. If so, the location can be considered as the background. You might wish to take special action on clicks on the background, such as clearing a current selection, having a custom context menu or starting rubber banding. ...

Fills the bounding rectangle in bin_window coordinates for the cell at the row specified by path and the column specified by column. If path is nil, or points to a path not currently displayed, the y and height fields of the rectangle will be filled with 0. If column is nil, the x and width fields will be filled with 0. The sum of all cell rects does not cover the entire tree; there are extra pixels in between rows, for example. The returned rectangle is equivalent to the cell-area passed to the gtk-cell-renderer-render function. This function is only valid if tree-view is realized.

Returns the bounding rectangle in bin_window coordinates for the cell at the row specified by path and the column specified by column. ...

Returns visible-rect with the currently visible region of the buffer, in tree coordinates. Convert to bin_window coordinates with the gtk-tree-view-convert-tree-to-bin-window-coords function. Tree coordinates start at 0,0 for row 0 of the tree, and cover the entire scrollable area of the tree.

Returns start-path and end-path to be the first and last visible path. Note that there may be invisible paths in between. ...

Returns the window that tree-view renders to. ...

Converts "bin-window" coordinates to coordinates for the tree (the full scrollable area of the tree). ...

Converts "bin-window" coordinates (see the function gtk-tree-view-get-bin-window) to widget relative coordinates. ...

Converts tree coordinates (coordinates in full scrollable area of the tree) to "bin-window" coordinates. ...

Converts tree coordinates (coordinates in full scrollable area of the tree) to widget coordinates. ...

Converts widget coordinates to coordinates for the "bin-window" (see the function gtk-tree-view-get-bin-window). ...

Converts widget coordinates to coordinates for the tree (the full scrollable area of the tree). ...

Turns tree-view into a drop destination for automatic DND. Calling this method sets "reorderable" to nil.

Turns tree-view into a drag source for automatic DND. Calling this method sets "reorderable" to nil.

Sets the row that is highlighted for feedback. ...

Gets information about the row that is highlighted for feedback.

Determines the destination row for a given position. x and y are expected to be in widget coordinates. This function is only meaningful if tree-view is realized. Therefore this function will always return nil if tree-view is not realized or does not have a model.

Sets the compare function for the interactive search capabilities; note that somewhat like strcmp() returning 0 for equality GtkTreeViewSearchEqualFunc returns nil on matches.

Sets the function to use when positioning the search dialog. ...

Returns whether fixed height mode is turned on for tree-view. ...

Enables or disables the fixed height mode of tree-view. ...

Sets the row separator function, which is used to determine whether a row should be drawn as a separator. If the row separator function is nil, no separators are drawn. This is the default value. ...

Returns whether a rubber banding operation is currently being done in tree-view. ...

Used to indicate which grid lines to draw in a tree view. ...

Sets the tip area of tooltip to be the area covered by the row at path. ...

Sets the tip area of tooltip to the area path, column and cell have in common. ...

This function is supposed to be used in a "query-tooltip" signal handler for gtk-tree-view. The x, y and keyboard-tip values which are received in the signal handler, should be passed to this function without modification. ...


GtkTreeView drag and drop

Interfaces for drag-and-drop support in gtk-tree-view.

GTK+ supports Drag-and-Drop in tree views with a high-level and a low-level API. ...

GTK+ supports Drag-and-Drop in tree views with a high-level and a low-level API. ...


GtkCellView

A widget displaying a single row of a gtk-tree-model.

A gtk-cell-view displays a single row of a gtk-tree-model using a gtk-cell-area and gtk-cell-area-context. A gtk-cell-area-context can be provided to the gtk-cell-view at construction time in order to keep the cellview in context of a group of cell views, this ensures that the renderers displayed will be properly aligned with eachother like the aligned cells in the menus of gtk-combo-box. ...

Sets requisition to the size needed by cell-view to display the model row pointed to by path. ...


GtkIconView

A widget which displays a list of icons in a grid.

gtk-icon-view provides an alternative view on a gtk-tree-model. It displays the model as a grid of icons with labels. Like gtk-tree-view, it allows to select one or multiple items (depending on the selection mode, see the function gtk-icon-view-set-selection-mode). In addition to selection with the arrow keys, gtk-icon-view supports rubberband selection, which is controlled by dragging the pointer. ...

Creates a new gtk-icon-view widget. ...

Creates a new gtk-icon-view widget using the specified area to layout cells inside the icons. ...

Sets the model for a gtk-icon-view widget. ...

Returns the model the gtk-icon-view is based on. ...

Sets the column with text for icon-view to be column. ...

Returns the column with text for icon-view. ...

Sets the column with markup information for icon-view to be column. ...

Returns the column with markup text for icon-view. ...

Sets the column with pixbufs for icon-view to be column. ...

Returns the column with pixbufs for icon-view. ...

Finds the path at the point (x, y), relative to bin_window coordinates. ...

Finds the path at the point (x, y), relative to bin_window coordinates. ...

Converts widget coordinates to coordinates for the bin_window, as expected by e. g. the function gtk-icon-view-get-path-at-pos. ...

Sets the current keyboard focus to be at path, and selects it. ...

Fills in path and cell with the current cursor path and cell. ...

Calls a function for each selected icon. Note that the model or selection cannot be modified from within this function. ...

Sets the selection mode of the icon-view. ...

Gets the selection mode of the icon-view. ...

Sets the "item-orientation" property which determines whether the labels are drawn beside the icons instead of below. ...

Returns the value of the "item-orientation" property which determines whether the labels are drawn beside the icons instead of below. ...

Sets the "columns" property which determines in how many columns the icons are arranged. ...

Returns the value of the "columns" property. ...

Sets the "item-width" property which specifies the width to use for each item. ...

Returns the value of the "item-width" property. ...

Sets the "spacing" property which specifies the space which is inserted between the cells, i. e. the icon and the text, of an item. ...

Returns the value of the "spacing" property. ...

Sets the "row-spacing" property which specifies the space which is inserted between the rows of the icon view. ...

Returns the value of the "row-spacing" property. ...

Sets the "column-spacing" property which specifies the space which is inserted between the columns of the icon view. ...

Returns the value of the "column-spacing" property. ...

Sets the "margin" property which specifies the space which is inserted at the top, bottom, left and right of the icon view. ...

Returns the value of the "margin" property. ...

Sets the "item-padding" property which specifies the padding around each of the icon view's items. ...

Returns the value of the "item-padding" property. ...

Fills the bounding rectangle in widget coordinates for the cell specified by path and cell. If cell is nil the main cell area is used. ...

Selects the row at path. ...

Unselects the row at path. ...

Returns true if the icon pointed to by path is currently selected. ...

Creates a list of paths of all selected items. ...

Selects all the icons. icon-view must has its selection mode set to :multiple. ...

Unselects all the icons. ...

Activates the item determined by path. ...

Moves the alignments of icon-view to the position specified by path. ...

Sets start-path and end-path to be the first and last visible path. ...

Sets the tip area of tooltip to be the area covered by the item at path. ...

Sets the tip area of tooltip to the area which cell occupies in the item pointed to by path. ...

This function is supposed to be used in a "query-tooltip" signal handler for gtk-icon-view. The x, y and keyboard-tip values which are received in the signal handler, should be passed to this function without modification. ...

If you only plan to have simple (text-only) tooltips on full items, you can use this function to have gtk-icon-view handle these automatically for you. ...

Returns the column of icon-view's model which is being used for displaying tooltips on icon-view's rows. ...

Gets the row in which the item path is currently displayed. ...

Gets the column in which the item path is currently displayed. ...

An enum for determining where a dropped item goes. ...

Turns icon-view into a drag source for automatic DND. ...

Turns icon-view into a drop destination for automatic DND. ...

Undoes the effect of the function gtk-icon-view-enable-model-drag-source. ...

Undoes the effect of the function gtk-icon-view-enable-model-drag-dest. ...

This function is a convenience function to allow you to reorder models that support the GtkTreeDragSourceIface and the GtkTreeDragDestIface. ...

Retrieves whether the user can reorder the list via drag-and-drop. ...

Sets the item that is highlighted for feedback. ...

Gets information about the item that is highlighted for feedback. ...

Determines the destination item for a given position. ...

Creates a cairo-surface-t representation of the item at path. ...


GtkTreeSortable

The interface for sortable models used by gtk-tree-view.

gtk-tree-sortable is an interface to be implemented by tree models which support sorting. The gtk-tree-view uses the methods provided by this interface to sort the model. ...



GtkTreeModelSort

A gtk-tree-model which makes an underlying tree model sortable.

The gtk-tree-model-sort is a model which implements the gtk-tree-sortable interface. It does not hold any data itself, but rather is created with a child model and proxies its data. It has identical column types to this child model, and the changes in the child are propagated. The primary purpose of this model is to provide a way to sort a different model without modifying it. Note that the sort function used by gtk-tree-model-sort is not guaranteed to be stable. ...

Converts child-path to a path relative to tree-model-sort. ...

Sets sort-iter to point to the row in tree-model-sort that corresponds to the row pointed at by child-iter. If sort-iter was not set, nil is returned. ...

Converts sorted-path to a path on the child model of tree-model-sort. ...

Sets child-iter to point to the row pointed to by sorted-iter.

This resets the default sort function to be in the 'unsorted' state. ...

This function should almost never be called. It clears the tree-model-sort of any cached iterators that have not been reffed with the function gtk-tree-model-ref-node. ...

Checks if the given iter is a valid iter for this gtk-tree-model-sort object. ...


GtkTreeModelFilter

A gtk-tree-model which hides parts of an underlying tree model.

A gtk-tree-model-filter is a tree model which wraps another tree model. ...

Sets the visible function used when filtering the filter to be func. The function should return true if the given row should be visible and nil otherwise. ...

Sets column of the child_model to be the column where filter should look for visibility information. ...

Returns a pointer to the child model of filter. ...

Returns filter-iter to point to the row in filter that corresponds to the row pointed at by child-iter. If filter-iter was not set, nil is returned. ...

Returns child-iter to point to the row pointed to by filter-iter. ...

Converts child-path to a path relative to filter. That is, child-path points to a path in the child model. ...

Converts filter-path to a path on the child model of filter. ...

Emits the signal "row_changed" for each row in the child model, which causes the filter to re-evaluate whether a row is visible or not. ...

This function should almost never be called. It clears the filter of any cached iterators that have not been reffed with the function gtk-tree-model-ref-node. ...


GtkCellLayout

An interface for packing cells.

gtk-cell-layout is an interface to be implemented by all objects which want to provide a gtk-tree-view-column-like API for packing cells, setting attributes and data funcs. ...

Packs the cell into the beginning of cell-layout. ...

Adds the cell to the end of cell-layout. If expand is nil, then the cell is allocated no more space than it needs. Any unused space is divided evenly between cells for which expand is true. ...

Returns the cell renderers which have been added to cell-layout. ...

Re-inserts cell at position. ...

Unsets all the mappings on all renderers on cell-layout and removes all renderers from cell-layout. ...

Adds an attribute mapping to the list in cell-layout. ...

Sets the GtkCellLayoutDataFunc to use for cell-layout. ...

Clears all existing attributes previously set with the function gtk-cell-layout-set-attributes. ...


GtkCellArea

An abstract class for laying out gtk-cell-renderer's.

The gtk-cell-area is an abstract class for gtk-cell-layout widgets (also referred to as "layouting widgets") to interface with an arbitrary number of gtk-cell-renderer's and interact with the user for a given gtk-tree-model row. ...

Accessor of the child property "align" of the gtk-cell-area-box class.

Accessor of the child property "expand" of the gtk-cell-area-box class.

Accessor of the child property "fixed-size" of the gtk-cell-area-box class.

Accessor of the child property "pack-type" of the gtk-cell-area-box class.

Adds renderer to area with the default child cell properties. ...

Removes renderer from area. ...

Checks if area contains renderer. ...

Delegates event handling to a gtk-cell-area. ...

Retrieves a cell area's initial minimum and natural width. ...

Retrieves a cell area's initial minimum and natural height. ...

Activates area, usually by activating the currently focused cell, however some subclasses which embed widgets in the area can also activate a widget if it currently has the focus. ...

Explicitly sets the currently focused cell to renderer. ...

Retrieves the currently focused cell for area. ...

Gets the gtk-cell-renderer in area that is currently being edited. ...

Gets the gtk-cell-editable widget currently used to edit the currently edited cell. ...


GtkCellAreaBox

A cell area that renders gtk-cell-renderers into a row or a column.

The gtk-cell-area-box renders cell renderers into a row or a column depending on its gtk-orientation. ...

Creates a new gtk-cell-area-box widget. ...

Adds renderer to box, packed with reference to the start of box. ...

Adds renderer to box, packed with reference to the end of box. ...

Gets the spacing added between cell renderers. ...

Sets the spacing to add between cell renderers in box. ...


GtkcellAreaContext

Stores geometrical information for a series of rows in a gtk-cell-area.

The gtk-cell-area-context object is created by a given gtk-cell-area implementation via its create_context() virtual method and is used to store cell sizes and alignments for a series of gtk-tree-model rows that are requested and rendered in the same context. ...

Fetches the gtk-cell-area object this context was created by. ...

Allocates a width and/or a height for all rows which are to be rendered with context. ...

Resets any previously cached request and allocation data. ...

Gets the accumulative preferred width for all rows which have been requested with this context. ...

Gets the accumulative preferred height for all rows which have been requested with this context. ...

Gets the accumulative preferred height for width for all rows which have been requested for the same said width with this context. ...

Gets the accumulative preferred width for height for all rows which have been requested for the same said height with this context. ...

Fetches the current allocation size for context. ...

Causes the minimum and/or natural width to grow if the new proposed sizes exceed the current minimum and natural width. ...

Causes the minimum and/or natural height to grow if the new proposed sizes exceed the current minimum and natural height. ...


GtkCellRenderer

An object for rendering a single cell.

The gtk-cell-renderer is a base class of a set of objects used for rendering a cell to a cairo-t. These objects are used primarily by the gtk-tree-view widget, though they are not tied to them in any specific way. It is worth noting that gtk-cell-renderer is not a gtk-widget and cannot be treated as such. ...

Obtains the width and height needed to render the cell. Used by view widgets to determine the appropriate size for the cell-area passed to the function gtk-cell-renderer-render. ...

Invokes the virtual render function of the gtk-cell-renderer. ...

Informs the cell renderer that the editing is stopped. ...

Returns width and height with the appropriate size of cell.

Sets the renderer size to be explicit, independent of the properties set.

Returns the cell renderer's visibility. ...

Sets the cell renderer's visibility. ...

Returns the cell renderer's sensitivity. ...

Sets the cell renderer's sensitivity. ...


GtkCellEditable

Interface for widgets which can are used for editing cells.

The gtk-cell-editable interface must be implemented for widgets to be usable when editing the contents of a gtk-tree-view cell. ...

Begins editing on a cell-editable. event is the gdk-event that began the editing process. It may be nil, in the instance that editing was initiated through programatic means.

Emits the "editing-done" signal.

Emits the "remove-widget" signal.


GtkCellRendererAccel

Renders a keyboard accelerator in a cell.

gtk-cell-renderer-accel displays a keyboard accelerator (i. e. a key combination like Control+a). If the cell renderer is editable, the accelerator can be changed by simply typing the new combination. ...


Creates a new gtk-cell-renderer-accel object. ...


GtkCellRendererComo

Renders a combobox in a cell.

gtk-cell-renderer-combo renders text in a cell like gtk-cell-renderer-text from which it is derived. ...

Creates a new gtk-cell-renderer-combo object. ...


GtkCellRendererPixbuf

Renders a pixbuf in a cell.

A gtk-cell-renderer-pixbuf can be used to render an image in a cell. It allows to render either a given gdk-pixbuf (set via the "pixbuf" property) or a stock icon (set via the "stock-id" property). ...

Creates a new gtk-cell-renderer-pixbuf object. ...


GtkCellRendererProgress

Renders numbers as progress bars.

gtk-cell-renderer-progress renders a numeric value as a progress par in a cell. Additionally, it can display a text on top of the progress bar. ...

Creates a new gtk-cell-renderer-progress object. ...


GtkCellRendererSpin

Renders a spin button in a cell.

gtk-cell-renderer-spin renders text in a cell like gtk-cell-renderer-text from which it is derived. ...

Creates a new gtk-cell-renderer-spin object. ...


GtkCellRendererText

Renders text in a cell.

A gtk-cell-renderer-text renders a given text in its cell, using the font, color and style information provided by its properties. ...

Creates a new gtk-cell-renderer-text object. ...

Sets the height of a renderer to explicitly be determined by the "font" and "y-pad" property set on it. ...


GtkCellRendererToggle

Renders a toggle button in a cell.

gtk-cell-renderer-toggle renders a toggle button in a cell. ...

Creates a new gtk-cell-renderer-toggle object. ...

Returns whether we are rendering radio toggles rather than checkboxes.

If radio is true, the cell renderer renders a radio toggle (i. e. a toggle in a group of mutually-exclusive toggles). If nil, it renders a check toggle (a standalone boolean option). ...

Returns whether the cell renderer is active. See the function gtk-cell-renderer-toggle-set-active.

Activates or deactivates a cell renderer.

Returns whether the cell renderer is activatable. ...

Makes the cell renderer activatable. ...


GtkCellRendererSpinner

Renders a spinning animation in a cell.

gtk-cell-renderer-spinner renders a spinning animation in a cell, very similar to gtk-spinner. ...

Returns a new cell renderer which will show a spinner to indicate activity. ...


GtkListStore

A list-like data structure that can be used with the gtk-tree-view.

The gtk-list-store object is a list model for use with a gtk-tree-view widget. It implements the gtk-tree-model interface, and consequentialy, can use all of the methods available there. It also implements the gtk-tree-sortable interface so it can be sorted by the view. Finally, it also implements the tree drag and drop interfaces. ...

Creates a new list store as with each of the types passed in. Note that only types derived from standard GObject fundamental types are supported. ...

This function is meant primarily for GObjects that inherit from gtk-list-store, and should only be used when constructing a new gtk-list-store. ...

Sets the value of one or more cells in the row referenced by iter. ...

Sets the data in the cell specified by iter and column. ...

Removes the given row from the list store. ...

Creates a new row at position. ...

Inserts a new row before sibling. ...

Inserts a new row after sibling. ...

Creates a new row at position. ...

Prepends a new row to list-store. ...

Appends a new row to list-store. ...

Removes all rows from the list store.

Checks if the given iter is a valid iterator for this gtk-list-store. ...

Swaps a and b in list-store. ...

Moves iter in list-store to the position before position. ...

Moves iter in list-store to the position after position. ...


GtkTreeStore

A tree-like data structure that can be used with the gtk-tree-view.

The gtk-tree-store object is a list model for use with a gtk-tree-view widget. It implements the gtk-tree-model interface, and consequentialy, can use all of the methods available there. It also implements the gtk-tree-sortable interface so it can be sorted by the view. Finally, it also implements the tree drag and drop interfaces. ...

Creates a new tree store as with columns of the types passed in. ...

This function is meant primarily for GObjects that inherit from gtk-tree-store, and should only be used when constructing a new gtk-tree-store. ...

Sets the data in the cell specified by iter and column. ...

Sets the value of one or more cells in the row referenced by iter. The variable argument list should contain integer column numbers, each column number followed by the value to be set. For example, to set column 0 with type +g-type-string+ to "Foo", you would write (gtk-tree-store-set store iter 0 "Foo"). ...

Removes iter from tree-store. ...

Creates a new row at position. ...

Inserts a new row before sibling. ...

Inserts a new row after sibling. ...

Creates a new row at position. ...

Prepends a new row to tree-store. ...

Appends a new row to tree-store. If parent is non-nil, then it will append the new row after the last child of parent, otherwise it will append a row to the top level. The row will be empty after this function is called. To fill in values, you need to call the functions gtk-tree-store-set or gtk-tree-store-set-value.

Returns true if iter is an ancestor of descendant. ...

Returns the depth of iter. ...

Removes all rows from tree-store

Checks if the given iter is a valid iter for this gtk-tree-store. ...

Swaps a and b in the same level of tree-store. ...

Moves iter in tree-store to the position before position. ...

Moves iter in tree-store to the position after position. ...

Menus, Combo Box, Toolbar


GtkComboBox

A widget used to choose from a list of items.

A gtk-combo-box is a widget that allows the user to choose from a list of valid choices. The gtk-combo-box displays the selected choice. When activated, the gtk-combo-box displays a popup which allows the user to make a new choice. The style in which the selected value is displayed, and the style of the popup is determined by the current theme. It may be similar to a Windows-style combo box. ...

Creates a new empty gtk-combo-box widget. ...

Creates a new empty gtk-combo-box widget with an entry.

Creates a new gtk-combo-box widget with the model initialized to model. ...

Creates a new empty gtk-combo-box widget with an entry and with the model initialized to model.

Creates a new empty gtk-combo-box using area to layout cells.

Creates a new empty gtk-combo-box widget with an entry. ...

Returns the wrap width which is used to determine the number of columns for the popup menu. ...

Sets the wrap width of combo-box to be width. ...

Returns the column with row span information for combo-box. ...

Sets the column with row span information for combo-box to be row-span. ...

Returns the column with column span information for combo-box. ...

Sets the column with column span information for combo-box to be column-span. ...

Returns the index of the currently active item, or -1 if there is no active item. ...

Sets the active item of combo-box to be the item at index. ...

Returns iter to point to the current active item, if it exists. ...

Sets the current active item to be the one referenced by iter, or unsets the active item if iter is nil. ...

Returns the column which combo-box is using to get string IDs for values from. ...

Sets the model column which combo-box should use to get string IDs for values from. ...

Returns the ID of the active row of combo-box. ...

Changes the active row of combo-box to the one that has an ID equal to active-id, or unsets the active row if active-id is nil. ...

Returns the gtk-tree-model object which is acting as data source for combo-box. ...

Sets the model used by combo-box to be model. ...

Pops up the menu or dropdown list of combo-box, the popup window will be grabbed so only device and its associated pointer/keyboard are the only gdk-devices able to send events to it. ...

Pops up the menu or dropdown list of combo-box. ...

Hides the menu or dropdown list of combo-box. ...

Gets the accessible object corresponding to the combo box's popup. ...

Returns the current row separator function. ...

Sets the row separator function, which is used to determine whether a row should be drawn as a separator. ...

Sets whether the popup menu should have a tearoff menu item. ...

Gets the current value of the "add-tearoffs" property. ...

Sets the menu's title in tearoff mode. ...

Gets the current title of the menu in tearoff mode. ...

Sets whether the combo box will grab focus when it is clicked with the mouse. ...

Returns whether the combo box grabs focus when it is clicked with the mouse. ...

Sets whether the dropdown button of the combo box should be always sensitive :on, never sensitive :off or only if there is at least one item to display :auto. ...

Returns whether the combo box sets the dropdown button sensitive or not when there are no items in the model. ...

Returns whether the combo box has an entry. ...

Sets the model column which combo-box should use to get strings from to be text-column. ...

Returns the column which combo-box is using to get the strings from to display in the internal entry. ...

Specifies whether the popup's width should be a fixed width matching the allocated width of the combo box. ...

Gets whether the popup uses a fixed width matching the allocated width of the combo box. ...


GtkComboBoxText

A simple, text-only combo box.

A gtk-combo-box-text is a simple variant of gtk-combo-box that hides the model-view complexity for simple text-only use cases. ...

Creates a new gtk-combo-box-text widget, which is a gtk-combo-box just displaying strings. ...

Creates a new gtk-combo-box-text widget, which is a gtk-combo-box just displaying strings. The combo box created by this function has an entry. ...

Appends text to the list of strings stored in combo-box. If ID is non-nil then it is used as the ID of the row. ...

Prepends text to the list of strings stored in combo-box. If ID is non-nil then it is used as the ID of the row. ...

Inserts text at position in the list of strings stored in combo-box. If id is non-nil then it is used as the ID of the row. ...

Appends text to the list of strings stored in combo-box. ...

Prepends text to the list of strings stored in combo-box. ...

Inserts text at position in the list of strings stored in combo-box. ...

Removes the string at position from combo-box. ...

Removes all the text entries from the combo box. ...

Returns the currently active string in combo-box, or nil if none is selected. ...


GtkMenu

A menu widget

A gtk-menu is a gtk-menu-shell that implements a drop down menu consisting of a list of gtk-menu-item objects which can be navigated and activated by the user to perform application functions. ...

Accessor of the child property "left-attach" of the gtk-menu class.

Accessor of the child property "right-attach" of the gtk-menu class.

Accessor of the child property "top-attach" of the gtk-menu class.

Accessor of the child property "bottom-attach" of the gtk-menu class.

Creates a new gtk-menu widget.

Creates a gtk-menu and populates it with menu items and submenus according to model. ...

Sets the gdk-screen on which the menu will be displayed. ...

Moves child to a new position in the list of menu children.

Adds a new gtk-menu-item to a (table) menu. ...

Displays a menu and makes it available for selection. ...

Displays a menu and makes it available for selection. ...

Set the gtk-accel-group which holds global accelerators for the menu. ...

Gets the gtk-accel-group which holds global accelerators for the menu. ...

Sets an accelerator path for this menu from which accelerator paths for its immediate children, its menu items, can be constructed. ...

Retrieves the accelerator path set on the menu. ...

Sets the title string for the menu. ...

Returns the title of the menu. See the the function gtk-menu-set-title.

Informs GTK+ on which monitor a menu should be popped up. ...

Retrieves the number of the monitor on which to show the menu. ...

Returns whether the menu is torn off. ...

Sets whether the menu should reserve space for drawing toggles or icons, regardless of their actual presence. ...

Returns whether the menu reserves space for toggles and icons, regardless of their actual presence. ...

Removes the menu from the screen.

Repositions the menu according to its position function.

Returns the selected menu item from the menu. ...

Selects the specified menu item within the menu. ...

Changes the tearoff state of the menu. ...

Attaches the menu to the widget and provides a callback function that will be invoked when the menu calls the function gtk-menu-detach during its destruction. gtk-menu-detach

Detaches the menu from the widget to which it had been attached. ...

Returns the gtk-widget that the menu is attached to.

Returns a list of the menus which are attached to this widget. ...


GtkMenuBar

A subclass of gtk-menu-shell which holds gtk-menu-item widgets.

The gtk-menu-bar is a subclass of gtk-menu-shell which contains one or more items of type gtk-menu-item. The result is a standard menu bar which can hold many menu items. ...

Creates a new gtk-menu-bar widget.

Creates a new gtk-menu-bar and populates it with menu items and submenus according to model. ...

Determines how widgets should be packed insided menubars and menuitems contained in menubars. ...

Sets how items should be packed inside a menubar. ...

Retrieves the current pack direction of the menubar. ...

Sets how widgets should be packed inside the children of a menubar. ...

Retrieves the current child pack direction of the menubar. ...


GtkMenuItem

The widget used for item in menus.

The gtk-menu-item widget and the derived widgets are the only valid childs for menus. Their function is to correctly handle highlighting, alignment, events and submenus. ...

Creates a new gtk-menu-item widget.

Creates a new gtk-menu-item whose child is a gtk-label.

Creates a new gtk-menu-item widget containing a label. ...

Sets whether the menu item appears justified at the right side of a menu bar. ...

Gets whether the menu item appears justified at the right side of the menu bar. ...

Checks if an underline in the text indicates the next character should be used for the mnemonic accelerator key. ...

If true, an underline in the text indicates the next character should be used for the mnemonic accelerator key. ...

Set the accelerator path on menu-item, through which runtime changes of the menu item's accelerator caused by the user can be identified and saved to persistent storage, see the function gtk-accel-map-save on this. ...

Retrieve the accelerator path that was previously set on menu-item. ...

Emits the "select" signal on the given menu item.

Emits the "deselect" signal on the given menu item.

Emits the "activate" signal on the given menu item.

Emits the "toggle-size-request" signal on the given menu item.

Emits the "toggle-size-allocate" signal on the given item.

Returns whether the menu-item reserves space for the submenu indicator, regardless if it has a submenu or not. ...

Sets whether the menu-item should reserve space for the submenu indicator, regardless if it actually has a submenu or not. ...


GtkCheckMenuItem

A menu item with a check box.

A gtk-check-menu-item is a menu item that maintains the state of a boolean value in addition to a gtk-menu-item usual role in activating application code. ...

Creates a new gtk-check-menu-item widget.

Creates a new gtk-check-menu-item widget with a label.

Creates a new gtk-check-menu-item widget containing a label. ...

Returns whether the check menu item is active. ...

Sets the active state of the menu item's check box.

Emits the "toggled" signal.

Retrieves the value set by the gtk-check-menu-item-set-inconsistent function.

If the user has selected a range of elements (such as some text or spreadsheet cells) that are affected by a boolean setting, and the current values in that range are inconsistent, you may want to display the check in an "in between" state. ...

Sets whether check-menu-item is drawn like a gtk-radio-menu-item. ...

Returns whether check-menu-item looks like a gtk-radio-menu-item. ...


GtkSeparatorMenuItem

A separator used in menus.

The gtk-separator-menu-item is a separator used to group items within a menu. It displays a horizontal line with a shadow to make it appear sunken into the interface.

Creates a new gtk-separator-menu-item widget.


GtkToolShell

Interface for containers containing GtkToolItem widgets.

The gtk-tool-shell interface allows container widgets to provide additional information when embedding gtk-tool-item widgets. ...

Retrieves the current ellipsize mode for the tool shell. ...

Retrieves the icon size for the tool shell. ...

Retrieves the current orientation for the tool shell. ...

Returns the relief style of buttons on shell. ...

Retrieves whether the tool shell has text, icons, or both. ...

Retrieves the current text alignment for the tool shell. ...

Retrieves the current text orientation for the tool shell. ...

Calling this function signals the tool shell that the overflow menu item for tool items have changed. If there is an overflow menu and if it is visible when this function it called, the menu will be rebuilt. ...

Retrieves the current text size group for the tool shell. ...


GtkToolbar

Create bars of buttons and other widgets.

A toolbar is created with a call to the function gtk-toolbar-new. ...

Accessor of the child property "expand" of the gtk-toolbar class.

Accessor of the child property "homogeneous" of the gtk-toolbar class.

Creates a new toolbar.

Insert a gtk-tool-item into the toolbar at position pos. ...

Returns the position of item on the toolbar, starting from 0. ...

Returns the number of items on the toolbar. ...

Returns the n'th item on toolbar, or nil if the toolbar does not contain an n'th item. ...

Returns the position corresponding to the indicated point on toolbar. ...

Highlights toolbar to give an idea of what it would look like if item was added to toolbar at the position indicated by index. ...

Sets whether to show an overflow menu when toolbar does not have room for all items on it. ...

Unsets toolbar icon size set with the function gtk-toolbar-set-icon-size, so that user preferences will be used to determine the icon size.

Returns whether the toolbar has an overflow menu. ...

Retrieves whether the toolbar has text, icons, or both. ...

Retrieves the icon size for the toolbar. ...

Returns the relief style of buttons on toolbar. ...

Alters the view of toolbar to display either icons only, text only, or both.

This function sets the size of stock icons in the toolbar. ...

Unsets a toolbar style set with the gtk-toolbar-set-style function, so that user preferences will be used to determine the toolbar style.


GtkToolItem

The base class of widgets that can be added to gtk-tool-shell.

gtk-tool-item's are widgets that can appear on a toolbar. To create a toolbar item that contain something else than a button, use the gtk-tool-item-new function. Use the gtk-container-add function to add a child widget to the tool item. ...

Creates a new gtk-tool-item widget. ...

Sets whether tool-item is to be allocated the same size as other homogeneous items. ...

Returns whether tool-item is the same size as other homogeneous items. ...

Sets whether tool-item is allocated extra space when there is more room on the toolbar then needed for the items. The effect is that the item gets bigger when the toolbar gets bigger and smaller when the toolbar gets smaller. ...

Returns whether tool-item is allocated extra space. ...

Sets the text to be displayed as tooltip on the item. ...

Sets the markup text to be displayed as tooltip on the item. ...

Sets whether tool-item has a drag window. ...

Returns whether tool-item has a drag window. ...

Sets whether tool-item is visible when the toolbar is docked horizontally. ...

Returns whether the tool-item is visible on toolbars that are docked horizontally. ...

Sets whether tool-item is visible when the toolbar is docked vertically. ...

Returns whether tool-item is visible when the toolbar is docked vertically. ...

Sets whether tool-item should be considered important. ...

Returns whether tool-item is considered important. ...

Returns the ellipsize mode used for tool-item. ...

Returns the icon size used for tool-item. ...

Returns the orientation used for tool-item. ...

Returns the toolbar style used for tool-item. ...

Returns the relief style of tool-item. ...

Returns the text alignment used for tool-item. ...

Returns the text orientation used for tool-item. ...

Returns the gtk-menu-item widget that was last set by the gtk-tool-item-set-proxy-menu-item function, i. e. the gtk-menu-item that is going to appear in the overflow menu. ...

If menu-item-id matches the string passed to the function gtk-tool-item-set-proxy-menu-item return the corresponding gtk-menu-item. ...

Sets the gtk-menu-item used in the toolbar overflow menu. ...

Calling this function signals to the toolbar that the overflow menu item for tool-item has changed. If the overflow menu is visible when this function it called, the menu will be rebuilt. ...

Emits the signal "toolbar-reconfigured" on tool-item. ...

Returns the size group used for labels in tool-item. ...


GtkToolPalette

A tool palette with categories.

A gtk-tool-palette allows you to add gtk-tool-item widgets to a palette-like container with different categories and drag and drop support. ...

Creates a new tool palette. ...

Accessor of the child property "exclusive" of the gtk-tool-palette class.

Accessor of the child property "expand" of the gtk-tool-palette class.

Gets whether group is exclusive or not. ...

Sets whether the group should be exclusive or not. ...

Gets whether group should be given extra space. ...

Sets whether the group should be given extra space. ...

Gets the position of group in palette as index. ...

Sets the position of the group as an index of the tool palette. ...

Gets the size of icons in the tool palette. ...

Sets the size of icons in the tool palette. ...

Unsets the tool palette icon size set with the function gtk-tool-palette-set-icon-size, so that user preferences will be used to determine the icon size. ...

Gets the style, icons, text or both, of items in the tool palette. ...

Sets the style, text, icons or both, of items in the tool palette. ...

Unsets a toolbar style set with the function gtk-tool-palette-set-style, so that user preferences will be used to determine the toolbar style. ...

Sets palette as drag source (see the function gtk-tool-palette-set-drag-source) and sets widget as a drag destination for drags from palette. See the function gtk-drag-dest-set. ...

Get the dragged item from the selection. This could be a gtk-tool-item widget or a gtk-tool-item-group. ...

Get the target entry for a dragged gtk-tool-item-group widget. ...

Gets the target entry for a dragged gtk-tool-item widget. ...

Gets the group at position (x, y). ...

Gets the item at position (x, y). ...

Flags used to specify the supported drag targets. ...

Sets the tool palette as a drag source. ...


GtkToolItemGroup

A sub container used in a tool palette.

A gtk-tool-item-group is used together with gtk-tool-palette to add gtk-tool-item widgets to a palette like container with different categories and drag and drop support. ...

Accessor of the child property "expand" of the gtk-tool-item-group class.

Accessor of the child property "fill" of the gtk-tool-item-group class.

Accessor of the child property "homogeneous" of the gtk-tool-item-group class.

Accessor of the child property "new-row" of the gtk-tool-item-group class.

Accessor of the child property "position" of the gtk-tool-item-group class.

Gets whether group is collapsed or expanded. ...

Gets the tool item at position (x, y). ...

Gets the ellipsization mode of group. ...

Gets the position of item in group as index. ...

Gets the number of tool items in group. ...

Gets the label of group. ...

Gets the label widget of group. ...

Gets the tool item at index in group. ...

Gets the relief mode of the header button of group. ...

Inserts item at position in the list of children of group. ...

Creates a new tool item group with label label. ...

Sets whether the group should be collapsed or expanded. ...

Sets the ellipsization mode which should be used by labels in group. ...

Sets the position of item in the list of children of group. ...

Sets the label of the tool item group. ...

Sets the label of the tool item group. ...

Set the button relief of the group header. ...


GtkSeparatorToolItem

A toolbar item that separates groups of other toolbar items.

A gtk-separator-tool-item is a gtk-tool-item that separates groups of other gtk-tool-item's. Depending on the theme, a gtk-separator-tool-item will often look like a vertical line on horizontally docked toolbars. ...

Create a new gtk-separator-tool-item widget. ...

Whether item is drawn as a vertical line, or just blank. ...

Returns whether item is drawn as a line, or just blank. ...


GtkToolButton

A gtk-tool-item subclass that displays buttons.

gtk-tool-button's are gtk-tool-item's containing buttons. ...

Creates a new gtk-tool-button using icon-widget as contents and label as label. ...

Creates a new gtk-tool-button containing the image and text from a stock item. ...

Sets label as the label used for the tool button. ...

Returns the label used by the tool button, or nil if the tool button does not have a label or uses a label from a stock item. ...

If set, an underline in the label property indicates that the next character should be used for the mnemonic accelerator key in the overflow menu. ...

Returns whether underscores in the label property are used as mnemonics on menu items on the overflow menu. ...

Sets the name of the stock item. ...

Returns the name of the stock item. ...

Sets the icon for the tool button from a named themed icon. ...

Returns the name of the themed icon for the tool button. ...

Sets icon as the widget used as icon on button. ...

Return the widget used as icon widget on button. ...

Sets label-widget as the widget that will be used as the label for button. ...

Returns the widget used as label on button. ...


GtkMenuToolButton

A gtk-tool-item containing a button with an additional dropdown menu.

A gtk-menu-tool-button is a gtk-tool-item that contains a button and a small additional button with an arrow. When clicked, the arrow button pops up a dropdown menu. ...

Creates a new gtk-menu-tool-button using icon-widget as icon and label as label. ...

Creates a new gtk-menu-tool-button. ...

Sets the gtk-menu that is popped up when the user clicks on the arrow. ...

Gets the gtk-menu associated with button. ...

Sets the tooltip text to be used as tooltip for the arrow button which pops up the menu. ...

Sets the tooltip markup text to be used as tooltip for the arrow button which pops up the menu. ...


GtkToogleToolButton

A gtk-tool-item containing a toggle button.

A gtk-toggle-tool-button is a gtk-tool-item that contains a toggle button. ...

Returns a new gtk-toggle-tool-button widget. ...

Creates a new gtk-toggle-tool-button widget containing the image and text from a stock item. ...

Sets the status of the toggle tool button. ...

Queries a gtk-toggle-tool-button and returns its current state. ...


GtkRadioToolButton

A toolbar item that contains a radio button.

A gtk-radio-tool-button is a gtk-tool-item that contains a radio button, that is, a button that is part of a group of toggle buttons where only one button can be active at a time. ...

Creates a new gtk-radio-tool-button, adding it to group. ...

Creates a new gtk-radio-tool-button, adding it to group. The new gtk-radio-tool-button will contain an icon and label from the stock item indicated by stock-id. ...

Creates a new gtk-radio-tool-button adding it to the same group as group. ...

Creates a new gtk-radio-tool-button adding it to the same group as group. The new gtk-radio-tool-button will contain an icon and label from the stock item indicated by stock-id. ...

Returns the radio button group button belongs to. ...

Adds button to group, removing it from the group it belonged to before. ...

Action-based menus and toolbars


GtkUIManager

Constructing menus and toolbars from an XML description.

A gtk-ui-manager constructs a user interface, menus and toolbars, from one or more UI definitions, which reference actions from one or more action groups. ...

Creates a new ui manager object. ...

Sets the add-tearoffs property, which controls whether menus generated by this gtk-ui-manager will have tearoff menu items. ...

Returns whether menus generated by this gtk-ui-manager will have tearoff menu items. ...

Inserts an action group into the list of action groups associated with manager. ...

Removes an action group from the list of action groups associated with manager. ...

Returns the list of action groups associated with manager. ...

Returns the gtk-accel-group associated with manager. ...

Looks up a widget by following a path. ...

Obtains a list of all toplevel widgets of the requested types. ...

Looks up an action by following a path. ...

Parses a resource file containing a UI definition and merges it with the current contents of manager. ...

Parses a string containing a UI definition and merges it with the current contents of manager. An enclosing <ui> element is added if it is missing. ...

Parses a file containing a UI definition and merges it with the current contents of manager. ...

Returns an unused merge ID, suitable for use with the function gtk-ui-manager-add-ui. ...

These enumeration values are used by the gtk-ui-manager-add-ui function to determine what UI element to create. ...

Adds a UI element to the current contents of manager. ...

Unmerges the part of managers content identified by merge-id. ...

Creates a UI definition of the merged UI. ...

Makes sure that all pending updates to the UI have been completed. ...


GtkActionGroup

A group of actions.

Actions are organised into groups. An action group is essentially a map from names to gtk-action objects. ...

Creates a new gtk-action-group object. The name of the action group is used when associating keybindings with the actions. ...

Gets the name of the action group. ...

Returns true if the action group is sensitive. ...

Changes the sensitivity of action-group. ...

Returns true if the action group is visible. ...

Changes the visible of action-group. ...

Gets the accelerator group. ...

Sets the accelerator group to be used by every action in this group. ...

Looks up an action in the action group by name. ...

Lists the actions in the action group. ...

Adds an action object to the action group and sets up the accelerator. ...

Removes an action object from the action group. ...

This is a convenience function to create a number of actions and add them to the action group. ...

This is a convenience function to create a number of toggle actions and add them to the action group. ...


Sets a function to be used for translating the label and tooltip of action entires added by the function gtk-action-group-add-actions. ...

Sets the translation domain and uses g_dgettext() for translating the label and tooltip of action entries added by the function gtk-action-group-add-actions. ...

Translates a string using the specified translate_func(). ...


GtkAction

An action which can be triggered by a menu or toolbar item.

Actions represent operations that the user can be perform, along with some information how it should be presented in the interface. Each action provides methods to create icons, menu items and toolbar items representing itself. ...

Creates a new gtk-action object. ...

Returns the name of the action. ...

Returns whether the action is effectively sensitive. ...

Returns whether the action itself is sensitive. Note that this does not necessarily mean effective sensitivity. See the function gtk-action-is-sensitive for that. ...

Sets the "sensitive" property of the action to sensitive. ...

Returns whether the action is effectively visible. ...

Returns whether the action itself is visible. ...

Sets the "visible" property of the action to visible. ...

Emits the "activate" signal on the specified action, if it is not insensitive. This gets called by the proxy widgets when they get activated. ...

This function is intended for use by action implementations to create icons displayed in the proxy widgets. ...

Creates a menu item widget that proxies for the given action. ...

Creates a toolbar item widget that proxies for the given action. ...

If action provides a gtk-menu widget as a submenu for the menu item or the toolbar item it creates, this function returns an instance of that menu. ...

Returns the proxy widgets for an action. ...

Installs the accelerator for action if action has an accel path and group. ...

Undoes the effect of one call to the function gtk-action-connect-accelerator. ...

Disable activation signals from the action. ...

Reenable activation signals from the action. ...

Returns whether action's menu item proxies will ignore the "gtk-menu-images" setting and always show their image, if available. ...

Sets whether action's menu item proxies will ignore the "gtk-menu-images" setting and always show their image, if available. ...

Returns the accel path for this action. ...

Sets the accel path for this action. ...

Returns the accel closure for this action. ...

Sets the gtk-accel-group in which the accelerator for this action will be installed. ...

Sets the label of action. ...

Gets the label text of action. ...

Sets a shorter label text on action. ...

Gets the short label text of action. ...

Sets the tooltip text on action. ...

Gets the tooltip text of action. ...

Sets the stock ID on action. ...

Gets the stock ID of action. ...

Sets the icon of action. ...

Gets the g-icon of action. ...

Sets the icon name on action. ...

Gets the icon name of action. ...

Sets whether action is visible when horizontal. ...

Checks whether action is visible when horizontal. ...

Sets whether action is visible when vertical. ...

Checks whether action is visible when horizontal. ...

Sets whether the action is important, this attribute is used primarily by toolbar items to decide whether to show a label or not. ...

Checks whether action is important or not. ...


GtkRadioAction

An action of which only one in a group can be active.

A gtk-radio-action is similar to gtk-radio-menu-item. A number of radio actions can be linked together so that only one may be active at any one time. ...

Creates a new gtk-radio-action object. ...

Returns the list representing the radio group for this object. ...

Sets the radio group for the radio action object. ...

Joins a radio action object to the group of another radio action object. ...

Obtains the value property of the currently active member of the group to which action belongs. ...

Sets the currently active group member to the member with value property current-value. ...


GtkActivatable

An interface for activatable widgets.

Activatable widgets can be connected to a gtk-action and reflects the state of its action. A gtk-activatable can also provide feedback through its action, as they are responsible for activating their related actions. ...

This is a utility function for gtk-activatable interface implementors. ...

Gets the related gtk-action object for activatable. ...

Gets whether this activatable should reset its layout and appearance when setting the related action or when the action changes appearance. ...

This is called to update the activatable completely, this is called internally when the "related-action" property is set or unset and by the implementing class when "use-action-appearance" changes. ...

Sets the related action on the activatable object. ...

Sets whether this activatable should reset its layout and appearance when setting the related action or when the action changes appearance ...

Selectors (Color, File and Font)


GtkColorChooser

Interface implemented by widgets for choosing colors.

gtk-color-chooser is an interface that is implemented by widgets for choosing colors. ...

Gets the currently selected color. ...

Sets the color. ...

Returns whether the color chooser shows the alpha channel. ...

Sets whether or not the color chooser should use the alpha channel. ...

Adds a palette to the color chooser. If orientation is horizontal, the colors are grouped in rows, with colors-per-line colors in each row. If horizontal is nil, the colors are grouped in columns instead. ...


GtkColorButton

A button to launch a color selection dialog.

The gtk-color-button is a button which displays the currently selected color and allows to open a color selection dialog to change the color. It is suitable widget for selecting a color in a preference dialog. ...

Creates a new color button. ...

Creates a new color button. ...

Creates a new color button. ...

Sets the current color to be color. ...

Sets color to be the current color in the gtk-color-button widget. ...

Sets the current opacity to be alpha. ...

Returns the current alpha value. ...

Sets the current color to be rgba. ...

Returns the current color in the gtk-color-button widget. ...

Sets whether or not the color button should use the alpha channel. ...

Does the color selection dialog use the alpha channel? ...

Sets the title for the color selection dialog. ...

Gets the title of the color selection dialog. ...


GtkColorChooserWidget

A widget for choosing colors.

The gtk-color-chooser-widget widget lets the user select a color. By default, the chooser presents a prefined palette of colors, plus a small number of settable custom colors. It is also possible to select a different color with the single-color editor. To enter the single-color editing mode, use the context menu of any color of the palette, or use the '+' button to add a new custom color. ...

Creates a new gtk-color-chooser-widget widget. ...


GtkColorChooserDialog

A dialog for choosing colors.

The gtk-color-chooser-dialog widget is a dialog for choosing a color. It implements the gtk-color-chooser interface. ...



GtkFileChooser

File chooser interface used by gtk-file-chooser-widget and gtk-file-chooser-dialog.

gtk-file-chooser is an interface that can be implemented by file selection widgets. In GTK+, the main objects that implement this interface are gtk-file-chooser-widget, gtk-file-chooser-dialog, and gtk-file-chooser-button. You do not need to write an object that implements the gtk-file-chooser interface unless you are trying to adapt an existing file selector to expose a standard programming interface. ...

Describes whether a gtk-file-chooser interface is being used to open existing files or to save to a possibly new file. ...

Used as a return value of handlers for the "confirm-overwrite" signal of a gtk-file-chooser interface. This value determines whether the file chooser will present the stock confirmation dialog, accept the user's choice of a filename, or let the user choose another filename. ...

These identify the various errors that can occur while calling gtk-file-chooser interface functions. ...

Sets the type of operation that the chooser is performing; the user interface is adapted to suit the selected action. ...

Gets the type of operation that the file chooser is performing. ...

Sets whether only local files can be selected in the file selector. ...

Gets whether only local files can be selected in the file selector. ...

Sets whether multiple files can be selected in the file selector. ...

Gets whether multiple files can be selected in the file selector. ...

Sets whether hidden files and folders are displayed in the file selector. ...

Gets whether hidden files and folders are displayed in the file selector. ...

Sets whether a file chooser in :save mode will present a confirmation dialog if the user types a file name that already exists. ...

Queries whether a file chooser is set to confirm for overwriting when the user types a file name that already exists. ...

Sets whether file choser will offer to create new folders. ...

Gets whether file choser will offer to create new folders. ...

Sets the current name in the file selector, as if entered by the user. ...

Gets the filename for the currently selected file in the file selector. If multiple files are selected, one of the filenames will be returned at random. ...

Sets filename as the current filename for the file chooser, by changing to the file's parent folder and actually selecting the file in list; all other files will be unselected. ...

Selects a filename. ...

Unselects a currently selected filename. ...

Selects all the files in the current folder of a file chooser. ...

Unselects all the files in the current folder of a file chooser. ...

Lists all the selected files and subfolders in the current folder of chooser. ...

Sets the current folder for chooser from a local filename. ...

Gets the current folder of chooser as a local filename. ...

Gets the URI for the currently selected file in the file selector. ...

Sets the file referred to by uri as the current file for the file chooser, by changing to the URI's parent folder and actually selecting the URI in the list. ...

Selects the file to by uri. ...

Unselects the file referred to by uri. ...

Lists all the selected files and subfolders in the current folder of chooser. The returned names are full absolute URIs. ...

Sets the current folder for chooser from an URI. ...

Gets the current folder of chooser as an URI. ...

Sets an application-supplied widget to use to display a custom preview of the currently selected file. ...

Gets the current preview widget. ...

Sets whether the preview widget set by the function gtk-file-chooser-set-preview-widget should be shown for the current filename. ...

Gets whether the preview widget set by the function gtk-file-chooser-set-preview-widget should be shown for the current filename. ...

Sets whether the file chooser should display a stock label with the name of the file that is being previewed; the default is true. ...

Gets whether a stock label should be drawn with the name of the previewed file. ...

Gets the filename that should be previewed in a custom preview widget. ...

Gets the URI that should be previewed in a custom preview widget. ...

Sets an application-supplied widget to provide extra options to the user. ...

Gets the current preview widget. ...

Adds filter to the list of filters that the user can select between. ...

Removes filter from the list of filters that the user can select between. ...

Lists the current set of user-selectable filters. ...

Sets the current filter; only the files that pass the filter will be displayed. ...

Gets the current filter. ...

Adds a folder to be displayed with the shortcut folders in a file chooser. ...

Removes a folder from a file chooser's list of shortcut folders. ...

Queries the list of shortcut folders in the file chooser, as set by the function gtk-file-chooser-add-shortcut-folder. ...

Adds a folder URI to be displayed with the shortcut folders in a file chooser. ...

Removes a folder URI from a file chooser's list of shortcut folders. ...

Queries the list of shortcut folders in the file chooser, as set by the function gtk-file-chooser-add-shortcut-folder-uri. ...


GtkFileChooserButton

A button to launch a file selection dialog.

The gtk-file-chooser-button is a widget that lets the user select a file. It implements the gtk-file-chooser interface. Visually, it is a file name with a button to bring up a gtk-file-chooser-dialog. The user can then use that dialog to change the file associated with that button. This widget does not support setting the "select-multiple" property to true. ...

Accessor of the child property "expand" of the gtk-file-chooser-button class.

Accessor of the child property "fill" of the gtk-file-chooser-button class.

Accessor of the child property "padding" of the gtk-file-chooser-button class.

Accessor of the child property "pack-type" of the gtk-file-chooser-button class.

Accessor of the child property "position" of the gtk-file-chooser-button class.

Creates a new file-selecting button widget. ...

Creates a gtk-file-chooser-button widget which uses dialog as its file-picking window. ...

Retrieves the title of the browse dialog used by button. The returned value should not be modified or freed. ...

Modifies the title of the browse dialog used by button. ...

Retrieves the width in characters of the button widget's entry and/or label. ...

Sets the width (in characters) that button will use to n-chars. ...

Returns whether the button grabs focus when it is clicked with the mouse. ...

Sets whether the button will grab focus when it is clicked with the mouse. ...


GtkFileChooserDialog

A file chooser dialog, suitable for "File/Open" or "File/Save" commands.

gtk-file-chooser-dialog is a dialog box suitable for use with "File/Open" or "File/Save as" commands. This widget works by putting a gtk-file-chooser-widget inside a gtk-dialog. It exposes the GtkFileChooserIface interface, so you can use all of the gtk-file-chooser functions on the file chooser dialog as well as those for gtk-dialog. ...

Creates a new gtk-file-chooser-dialog widget. This function is analogous to the function gtk-dialog-new-with-buttons. ...


GtkFileChooserWidget

File chooser widget that can be embedded in other widgets.

gtk-file-chooser-widget is a widget suitable for selecting files. It is the main building block of a gtk-file-chooser-dialog. Most applications will only need to use the latter; you can use gtk-file-chooser-widget as part of a larger window if you have special needs. ...

Accessor of the child property "expand" of the gtk-file-chooser-widget class.

Accessor of the child property "fill" of the gtk-file-chooser-widget class.

Accessor of the child property "padding" of the gtk-file-chooser-widget class.

Accessor of the child property "pack-type" of the gtk-file-chooser-widget class.

Accessor of the child property "position" of the gtk-file-chooser-widget class.



GtkFileFilter

A filter for selecting a file subset.

A gtk-file-filter can be used to restrict the files being shown in a gtk-file-chooser. Files can be filtered based on their name with the function gtk-file-filter-add-pattern, on their mime type with the function gtk-file-filter-add-mime-type, or by a custom filter function with the function gtk-file-filter-add-custom. ...

These flags indicate what parts of a gtk-file-filter-info structure are filled or need to be filled. ...

A gtk-file-filter-info structure is used to pass information about the tested file to the function gtk-file-filter-filter. ...

Adds a rule allowing a given mime type to filter. ...

Adds a rule allowing a shell style glob to a filter. ...

Adds a rule allowing image files in the formats supported by gdk-pixbuf. ...


GtkFontChooser

Interface implemented by widgets displaying fonts.

gtk-font-chooser is an interface that can be implemented by widgets displaying the list of fonts. In GTK+, the main objects that implement this interface are gtk-font-chooser-widget, gtk-font-chooser-dialog and gtk-font-button. ...

Gets the pango-font-family representing the selected font family. Font families are a collection of font faces. ...

Gets the pango-font-face representing the selected font group details (i. e. family, slant, weight, width, etc). ...

The selected font size. ...

Gets the currently-selected font name. ...

Sets the currently-selected font. ...

Gets the currently-selected font. ...

Sets the currently-selected font from font-desc. ...

Gets the text displayed in the preview area. ...

Sets the text displayed in the preview area. The text is used to show how the selected font looks. ...

Returns whether the preview entry is shown or not. ...

Shows or hides the editable preview entry. ...

Adds a filter function that decides which fonts to display in the font chooser. ...


GtkFontButton

A button to launch a font chooser dialog.

The gtk-font-button is a button which displays the currently selected font and allows to open a font chooser dialog to change the font. It is a suitable widget for selecting a font in a preference dialog. ...

Creates a new font picker widget. ...

Creates a new font picker widget. ...

Sets or updates the currently displayed font in the font picker dialog. ...

Retrieves the name of the currently selected font. ...

If show-style is true, the font style will be displayed along with name of the selected font. ...

Returns whether the name of the font style will be shown in the label. ...

If show-size is true, the font size will be displayed along with the name of the selected font. ...

Returns whether the font size will be shown in the label. ...

If use-font is true, the font name will be written using the selected font. ...

Returns whether the selected font is used in the label. ...

If use-size is true, the font name will be written using the selected size. ...

Returns whether the selected size is used in the label. ...

Sets the title for the font chooser dialog. ...

Retrieves the title of the font chooser dialog. ...


GtkFontChooserWidget

A widget for selecting fonts.

The gtk-font-chooser-widget widget lists the available fonts, styles and sizes, allowing the user to select a font. It is used in the gtk-font-chooser-dialog widget to provide a dialog box for selecting fonts. ...

Creates a new gtk-font-chooser-widget widget. ...


GtkFontChooserDialog

A dialog for selecting fonts.

The gtk-font-chooser-dialog widget is a dialog for selecting a font. It implements the gtk-font-chooser interface. ...

Creates a new gtk-font-chooser-dialog widget. ...

Ornaments


GtkFrame

A bin with a decorative frame and optional label.

The frame widget is a gtk-bin widget that surrounds its child with a decorative frame and an optional label. ...

Creates a new gtk-frame container, with optional label label. If label is nil, the label is omitted.

Sets the text of the label. If label is nil, the current label is removed.

Sets the label widget for the frame. This is the widget that will appear embedded in the top edge of the frame as a title.

Sets the alignment of the frame container's label. The default values for a newly created frame are 0.0 and 0.5.

Sets the shadow type for frame.

If the frame's label widget is a gtk-label, returns the text in the label widget. ...

Retrieves the x and y alignment of the frame's label. ...

Retrieves the label widget for the frame. See the function gtk-frame-set-label-widget.

Retrieves the shadow type of the frame. See the function gtk-frame-set-shadow-type.


GtkSeparator

A separator widget.

gtk-separator is a horizontal or vertical separator widget, depending on the value of the "orientation" property of the interface gtk-orientable, used to group the widgets within a window. ...

Creates a new gtk-separator with the given orientation :horizontal or :vertical of type gtk-orientation. ...

Scrolling


GtkScrollbar

A Scrollbar.

The gtk-scrollbar widget is a horizontal or vertical scrollbar, depending on the value of the "orientation" property. ...

Creates a new scrollbar with the given orientation. ...


GtkScrolledWindow

Adds scrollbars to its child widget.

gtk-scrolled-window is a gtk-bin subclass: it is a container the accepts a single child widget. gtk-scrolled-window adds scrollbars to the child widget and optionally draws a beveled frame around the child widget. ...

Creates a new scrolled window. ...

Returns the horizontal scrollbar's adjustment, used to connect the horizontal scrollbar to the child widget's horizontal scroll functionality.

Returns the vertical scrollbar's adjustment, used to connect the vertical scrollbar to the child widget's vertical scroll functionality.

Returns the horizontal scrollbar of scrolled-window. ...

Returns the vertical scrollbar of scrolled-window. ...

Sets the scrollbar policy for the horizontal and vertical scrollbars. ...

Used to add children without native scrolling capabilities. This is simply a convenience function; it is equivalent to adding the unscrollable child to a viewport, then adding the viewport to the scrolled window. If a child has native scrolling, use the function gtk-container-add instead of this function. ...

Sets the placement of the contents with respect to the scrollbars for the scrolled window. ...

Unsets the placement of the contents with respect to the scrollbars for the scrolled window. If no window placement is set for a scrolled window, it obeys the "gtk-scrolled-window-placement" XSETTING. ...

Changes the type of shadow drawn around the contents of scrolled-window.

Sets the gtk-adjustment for the horizontal scrollbar.

Sets the gtk-adjustment for the vertical scrollbar.

Gets the placement of the contents with respect to the scrollbars for the scrolled window. See the function gtk-scrolled-window-set-placement.

Retrieves the current policy values for the horizontal and vertical scrollbars. See the function gtk-scrolled-window-set-policy.

Gets the shadow type of the scrolled window. See the function gtk-scrolled-window-set-shadow-type.

Gets the minimum content width of scrolled-window, or -1 if not set. ...

Sets the minimum width that scrolled-window should keep visible. Note that this can and (usually will) be smaller than the minimum size of the content. ...

Gets the minimal content height of scrolled-window, or -1 if not set. ...

Sets the minimum height that scrolled-window should keep visible. Note that this can and (usually will) be smaller than the minimum size of the content. ...

Turns kinetic scrolling on or off. Kinetic scrolling only applies to devices with source :touchscreen. ...

Returns the specified kinetic scrolling behavior. ...

Changes the behaviour of scrolled-window wrt. to the initial event that possibly starts kinetic scrolling. When capture-button-press is set to true, the event is captured by the scrolled window, and then later replayed if it is meant to go to the child widget. ...

Return whether button presses are captured during kinetic scrolling. See the function gtk-scrolled-window-set-capture-button-press. ...


GtkScrollable

An interface for scrollable widgets.

gtk-scrollable is an interface that is implemented by widgets with native scrolling ability. ...

Retrieves the gtk-adjustment object used for horizontal scrolling. ...



Since 3.0

Retrieves the gtk-adjustment object used for vertical scrolling. ...

Sets the vertical adjustment of the gtk-scrollable. ...

Defines the policy to be used in a scrollable widget when updating the scrolled window adjustments in a given orientation. ...

Gets the horizontal gtk-scrollable-policy. ...

Sets the gtk-scrollable-policy to determine whether horizontal scrolling should start below the minimum width or below the natural width. ...

Gets the vertical gtk-scrollable-policy. ...

Sets the gtk-scrollable-policy to determine whether vertical scrolling should start below the minimum height or below the natural height. ...

Printing


GtkPrintOperation

High-level Printing API.

gtk-print-operation is the high-level, portable printing API. It looks a bit different than other GTK+ dialogs such as the gtk-file-chooser, since some platforms do not expose enough infrastructure to implement a good print dialog. On such platforms, gtk-print-operation uses the native print dialog. On platforms which do not provide a native print dialog, GTK+ uses its own, see gtk-print-unix-dialog. ...

The status gives a rough indication of the completion of a running print operation. ...

The action parameter to the gtk-print-operation-run function determines what action the print operation should perform. ...

A value of this type is returned by the gtk-print-operation-run function. ...

Error codes that identify various errors that can occur while using the GTK+ printing support. ...

Creates a new gtk-print-operation object. ...

Sets whether the function gtk-print-operation-run may return before the print operation is completed. ...

Makes default-page-setup the default page setup for op. ...

Returns the default page setup. ...

Sets the print settings for op. This is typically used to re-establish print settings from a previous print operation. ...

Returns the current print settings. ...

Sets the name of the print job. ...

Sets the number of pages in the document. ...

Returns the number of pages that will be printed. ...

Sets the current page. ...

If full-page is true, the transformation for the cairo context obtained from gtk-print-context puts the origin at the top left corner of the page, which may not be the top left corner of the sheet, depending on page orientation and the number of pages per sheet. ...

Sets up the transformation for the cairo context obtained from gtk-print-context in such a way that distances are measured in units of unit. ...

Sets up the gtk-print-operation to generate a file instead of showing the print dialog. ...

If show-progress is true, the print operation will show a progress dialog during the print operation. ...

If track-status is true, the print operation will try to continue report on the status of the print job in the printer queues and printer. ...

Sets the label for the tab holding custom widgets. ...

Runs the print operation, by first letting the user modify print settings in the print dialog, and then print the document. ...

Cancels a running print operation. ...

Sets up the gtk-print-operation to wait for calling of the function gtk-print-operation-draw-page-finish from application. It can be used for drawing page in another thread. ...

Returns a string representation of the status of the print operation. ...

Sets whether selection is supported by gtk-print-operation. ...

Gets the value of the "support-selection" property. ...

Sets whether there is a selection to print. ...

Gets the value of the "has-selection" property. ...

Embed page size combo box and orientation combo box into page setup page. ...

Gets the value of "embed-page-setup" property. ...

Runs a page setup dialog, letting the user modify the values from page-setup. ...


Ends a preview. ...

Returns whether the given page is included in the set of pages that have been selected for printing. ...

Renders a page to the preview, using the print context that was passed to the "preview" handler together with preview. ...


GtkPrintContext

Encapsulates context for drawing pages.

A gtk-print-context encapsulates context information that is required when drawing pages for printing, such as the cairo context and important parameters like page size and resolution. It also lets you easily create pango-layout and pango-context objects that match the font metrics of the cairo surface. ...

Obtains the cairo context that is associated with the gtk-print-context. ...

Sets a new cairo context on a print context. ...

Obtains the gtk-page-setup that determines the page dimensions of the gtk-print-context. ...

Obtains the width of the gtk-print-context, in pixels. ...

Obtains the height of the gtk-print-context, in pixels. ...

Obtains the horizontal resolution of the gtk-print-context object, in dots per inch. ...

Obtains the vertical resolution of the gtk-print-context, in dots per inch. ...

Returns a pango-font-map that is suitable for use with the gtk-print-context object. ...

Creates a new pango-context object that can be used with the gtk-print-context. ...

Creates a new pango-layout that is suitable for use with the gtk-print-context object. ...

Obtains the hardware printer margins of the gtk-print-context, in units. ...


GtkPrintSettings

Stores print settings.

A gtk-print-settings object represents the settings of a print dialog in a system-independent way. The main use for this object is that once you have printed you can get a settings object that represents the settings the user chose, and the next time you print you can pass that object in so that the user does not have to re-set all his settings. ...

Creates a new gtk-print-settings object. ...

Copies a gtk-print-settings object. ...

Returns true, if a value is associated with key. ...

Looks up the string value associated with key. ...

Associates value with key. ...

Removes any value associated with key. ...

Returns the boolean represented by the value that is associated with key. ...

Sets key to a boolean value. ...

Returns the double value associated with key, or 0. ...

Returns the floating point number represented by the value that is associated with key, or default if the value does not represent a floating point number. ...

Sets key to a double value. ...

The returned value is converted to unit.

Since 2.10

Associates a length in units of unit with key. ...

Returns the integer value of key, or 0. ...

Returns the value of key, interpreted as an integer, or the default value. ...

Sets key to an integer value. ...

Convenience function to obtain the value of "printer". ...

Convenience function to set "printer" to printer. ...


Get the value of "orientation", converted to a gtk-page-orientation. ...

Sets the value of "orientation". ...

Gets the value of "paper-format", converted to a gtk-paper-size. ...

Sets the value of "paper-format", "paper-width", and "paper-height". ...

Gets the value of "paper-width" converted to unit. ...

Sets the value of "paper-width". ...

Gets the value of "paper-height", converted to unit. ...

Sets the value of "paper-height". ...

Gets the value of "use-color". ...

Sets the value of "use-color". ...

Gets the value of "collate". ...

Sets the value of "collate". ...

Gets the value of "reverse". ...

Sets the value of "reserve". ...


Gets the value of "duplex". ...

Sets the value of "duplex". ...


Gets the value of "quality". ...

Sets the value of "quality". ...



Since 2.10

Gets the value of "number-up". ...

Sets the value of "number-up". ...





















GtkPageSetup

Stores page setup information.

A gtk-page-setup object stores the page size, orientation and margins. The idea is that you can get one of these from the page setup dialog and then pass it to the gtk-print-operation when printing. The benefit of splitting this out of the gtk-print-settings is that these affect the actual layout of the page, and thus need to be set long before user prints. ...

Creates a new gtk-page-setup object. ...

Copies a gtk-page-setup object. ...

Gets the page orientation of the gtk-page-setup object. ...


GtkPaperSize

Support for named paper sizes.

gtk-paper-size handles paper sizes. It uses the standard called "PWG 5101.1-2002 PWG: Standard for Media Standardized Names" to name the paper sizes and to get the data for the page sizes. In addition to standard paper sizes, gtk-paper-size allows to construct custom paper sizes with arbitrary dimensions. ...


Creates a new gtk-paper-size object by parsing a PWG 5101.1-2002 paper name. ...

Creates a new gtk-paper-size object by using PPD information. ...

Creates a new gtk-paper-size object with the given parameters. ...

Copies an existing gtk-paper-size. ...

Free the given gtk-paper-size object. ...

Compares two gtk-paper-size objects. ...

Creates a list of known paper sizes. ...

Gets the name of the gtk-paper-size. ...

Gets the human-readable name of the gtk-paper-size. ...

Gets the PPD name of the gtk-paper-size, which may be nil. ...

Gets the paper width of the gtk-paper-size, in units of unit. ...

Gets the paper height of the gtk-paper-size, in units of unit. ...

Returns true if size is not a standard paper size. ...

Changes the dimensions of a paper size to width x height. ...

Gets the default top margin for the gtk-paper-size. ...

Gets the default bottom margin for the gtk-paper-size. ...

Gets the default left margin for the gtk-paper-size. ...

Gets the default right margin for the gtk-paper-size. ...

Returns the name of the default paper size, which depends on the current locale. ...

Reads a paper size from the group group-name in the key file key-file. ...

This function adds the paper size from size to key-file. ...


GtkPrinter

Represents a printer.

A gtk-printer object represents a printer. You only need to deal directly with printers if you use the non-portable gtk-print-unix-dialog API. ...


Creates a new gtk-printer. ...

Returns the backend of the printer. ...

Returns the name of the printer. ...

Returns the state message describing the current state of the printer. ...

Gets the description of the printer. ...

Returns a description of the location of the printer. ...

Gets the name of the icon to use for the printer. ...

Gets the number of jobs currently queued on the printer. ...

Returns whether the printer is currently active, i. e. accepts new jobs. ...

Returns whether the printer is currently paused. ...

Returns whether the printer is accepting jobs. ...

Returns whether the printer is the default printer. ...

Lists all the paper sizes printer supports. ...

Compares two printers. ...

Returns whether the printer details are available. ...

Requests the printer details. ...

Returns the printer's capabilities. ...

Returns default page size of printer. ...

Retrieve the hard margins of printer, i. e. the margins that define the area at the borders of the paper that the printer cannot print to. ...

Calls a function for all gtk-printers. ...


GtkPrintJob

Represents a print job.

A gtk-print-job object represents a job that is sent to a printer. You only need to deal directly with print jobs if you use the non-portable gtk-print-unix-dialog API. ...

Creates a new gtk-print-job. ...

Gets the gtk-print-settings of the print job. ...

Gets the gtk-printer of the print job. ...

Gets the job title. ...

Gets the status of the print job. ...

Make the gtk-print-job send an existing document to the printing system. ...

Gets a cairo surface onto which the pages of the print job should be rendered. ...

Sends the print job off to the printer. ...

If track-status is true, the print job will try to continue report on the status of the print job in the printer queues and printer. ...

Returns wheter jobs will be tracked after printing. ...

Gets the gtk-print-pages setting for this job. ...

Sets the gtk-print-pages setting for this job. ...

Gets the gtk-page-set setting for this job. ...

Sets the gtk-page-set setting for this job. ...

Gets the number of copies of this job. ...

Sets the number of copies for this job. ...

Gets the scale for this job, where 1.0 means unscaled. ...

Sets the scale for this job, where 1.0 means unscaled. ...

Gets the n-up setting for this job. ...

Sets the n-up setting for this job. ...

Gets the n-up layout setting for this job. ...

Gets whether the job is printed rotated. ...

Sets whether this job is printed rotated. ...

Gets whether this job is printed collated. ...

Sets whether this job is printed collated. ...

Gets whether this job is printed reversed. ...

Sets whether this job is printed reversed. ...


GtkPrintUnixDialog

A print dialog.

gtk-print-unix-dialog implements a print dialog for platforms which do not provide a native print dialog, like Unix. It can be used very much like any other GTK+ dialog, at the cost of the portability offered by the high-level printing API. ...

Creates a new gtk-print-unix-dialog widget. ...

Sets the page setup of the gtk-print-unix-dialog widget. ...

Gets the page setup that is used by the gtk-print-unix-dialog widget. ...

Sets the current page number. If current-page is not -1, this enables the current page choice for the range of pages to print. ...

Gets the current page of the gtk-print-unix-dialog widget. ...

Sets the gtk-print-settings for the gtk-print-unix-dialog. Typically, this is used to restore saved print settings from a previous print operation before the print dialog is shown. ...

Gets a new gtk-print-settings object that represents the current values in the print dialog. Note that this creates a new object, and you need to unref it if don't want to keep it. ...

Gets the currently selected printer. ...

Adds a custom tab to the print dialog. ...

Sets whether the print dialog allows user to print a selection. ...

Gets the value of the "support-selection" property. ...

Sets whether a selection exists. ...

Gets the value of the "has-selection" property. ...

Embed page size combo box and orientation combo box into page setup page. ...

Gets the value of the "embed-page-setup" property. ...

Gets the page setup that is used by the gtk-print-unix-dialog widget. ...

An enum for specifying which features the print dialog should offer. If neither :generate-pdf nor :generate-ps is specified, GTK+ assumes that all formats are supported. ...

This lets you specify the printing capabilities your application supports. For instance, if you can handle scaling the output then you pass :scale. If you do not pass that, then the dialog will only let you select the scale if the printing system automatically handles scaling. ...

Gets the value of the "manual-capabilities" property. ...


GtkPageSetupUnixDialog

A page setup dialog.

gtk-page-setup-unix-dialog implements a page setup dialog for platforms which do not provide a native page setup dialog, like Unix. It can be used very much like any other GTK+ dialog, at the cost of the portability offered by the high-level printing API. ...

Creates a new page setup dialog. ...

Sets the gtk-page-setup object from which the page setup dialog takes its values. ...

Gets the currently selected page setup from the dialog. ...

Sets the gtk-print-settings from which the page setup dialog takes its values. ...

Gets the current print settings from the dialog. ...

Miscellaneous


GtkAdjustment

A representation of an adjustable bounded value.

The gtk-adjustment object represents a value which has an associated lower and upper bound, together with step and page increments, and a page size. It is used within several GTK+ widgets, including gtk-spin-button, gtk-viewport, and gtk-range (which is a base class for gtk-hscrollbar, gtk-vscrollbar, gtk-hscale, and gtk-vscale). ...

Creates a new gtk-adjustment object. ...

Gets the current value of the adjustment. ...

Sets the gtk-adjustment value. The value is clamped to lie between lower and upper. ...

Updates the gtk-adjustment value to ensure that the range between lower and upper is in the current page (i. e. between value and value + page-size). ...

Emits a "changed" signal from the gtk-adjustment. This is typically called by the owner of the gtk-adjustment after it has changed any of the gtk-adjustment fields other than the value.

Emits a "value_changed" signal from the gtk-adjustment object. ...

Sets all properties of the adjustment at once. ...

Retrieves the minimum value of the adjustment. ...

Retrieves the page increment of the adjustment. ...

Retrieves the page size of the adjustment. ...

Retrieves the step increment of the adjustment. ...

Gets the smaller of step increment and page increment. ...

Retrieves the maximum value of the adjustment. ...

Sets the minimum value of the adjustment. ...

Sets the page increment of the adjustment. ...

Sets the page size of the adjustment. ...

Sets the step increment of the adjustment. ...

Sets the maximum value of the adjustment. ...


GtkArrow

Displays an arrow.

gtk-arrow should be used to draw simple arrows that need to point in one of the four cardinal directions: up, down, left, or right. The style of the arrow can be one of shadow in, shadow out, etched in, or etched out. Note that these directions and style types may be ammended in versions of GTK+ to come. ...

Creates a new gtk-arrow widget. ...

Sets the direction and style of the gtk-arrow widget. ...


GtkCalendar

Displays a calendar and allows the user to select a date.

gtk-calendar is a widget that displays a Gregorian calendar, one month at a time. ...

These options can be used to influence the display and behaviour of a gtk-calendar. ...

Creates a new calendar, with the current date being selected.

Shifts the calendar to a different month.

Selects a day from the current month.

Places a visual marker on a particular day.

Removes the visual marker from a particular day.

Returns if the day of the calendar is already marked. ...

Remove all visual markers.

Returns the current display options of calendar. ...

Sets display options, e. .g. whether to display the heading and the month headings. ...

Obtains the selected date from a gtk-calendar widget.

Installs a function which provides Pango markup with detail information for each day. ...

Queries the width of detail cells, in characters. ...

Updates the width of detail cells. ...

Queries the height of detail cells, in rows. ...

Updates the height of detail cells. ...


GtkDrawingArea

A widget for custom user interface elements.

The gtk-drawing-area widget is used for creating custom user interface elements. It is essentially a blank widget; you can draw on it. ...

Creates a new drawing area.


GtkEventBox

A widget used to catch events for widgets which do not have their own window.

The gtk-event-box widget is a subclass of gtk-bin which also has its own window. It is useful since it allows you to catch events for widgets which do not have their own window.

Creates a new gtk-event-box widget.

Set whether the event box window is positioned above the windows of its child, as opposed to below it. ...

Returns whether the event box window is above or below the windows of its child. ...

Set whether the event box uses a visible or invisible child window. The default is to use visible windows. ...

Returns whether the event box has a visible window. ...


GtkHandleBox

A widget for detachable window portions.

The gtk-handle-box widget allows a portion of a window to be "torn off". It is a bin widget which displays its child and a handle that the user can drag to tear off a separate window (the float window) containing the child widget. A thin ghost is drawn in the original location of the handlebox. By dragging the separate window back to its original location, it can be reattached. ...


GtkIMContexSimple

An input method context supporting table-based input methods.

An input method context supporting table-based input methods


GtkIMMulticontex

An input method context supporting multiple, loadable input methods.

An input method context supporting multiple, loadable input methods.


GtkSizeGroup

Grouping widgets so they request the same size.

gtk-size-group provides a mechanism for grouping a number of widgets together so they all request the same amount of space. This is typically useful when you want a column of widgets to have the same size, but you cannot use a gtk-grid widget. ...

The mode of the size group determines the directions in which the size group affects the requested sizes of its component widgets. ...

Create a new gtk-size-group object.

Sets the gtk-size-group-mode of the size group. The mode of the size group determines whether the widgets in the size group should all have the same horizontal requisition (:horizontal) all have the same vertical requisition (:vertical), or should all have the same requisition in both directions (:both).

Gets the current mode of the size group. See the function gtk-size-group-set-mode.

Sets whether unmapped widgets should be ignored when calculating the size. ...

Returns if invisible widgets are ignored when calculating the size. ...

Adds a widget to a gtk-size-group object. In the future, the requisition of the widget will be determined as the maximum of its requisition and the requisition of the other widgets in the size group. Whether this applies horizontally, vertically, or in both directions depends on the mode of the size group. See the function gtk-size-group-set-mode. ...

Removes a widget from a gtk-size-group object.

Returns the list of widgets associated with size-group. ...


GtkTooltip

Add tips to your widgets.

Add tips to your widgets. ...

Sets the text of the tooltip to be markup, which is marked up with the Pango text markup language. ...

Sets the text of the tooltip to be text. ...

Sets the icon of the tooltip (which is in front of the text) to be pixbuf. If pixbuf is nil, the image will be hidden. ...

Sets the icon of the tooltip (which is in front of the text) to be the stock item indicated by stock-id with the size indicated by icon-size of type gtk-icon-size. If stock-id is nil, the image will be hidden. ...

Sets the icon of the tooltip (which is in front of the text) to be the icon indicated by icon-name with the size indicated by icon-size of type gtk-icon-size. If icon-name is nil, the image will be hidden. ...

Sets the icon of tooltip, which is in front of the text, to be the icon indicated by gicon with the size indicated by size. If gicon is nil, the image will be hidden. ...

Replaces the widget packed into the tooltip with custom-widget. custom-widget does not get destroyed when the tooltip goes away. By default a box with a gtk-image and gtk-label is embedded in the tooltip, which can be configured using the function gtk-tooltip-set-markup and gtk-tooltip-set-icon. ...

Triggers a new tooltip query on display, in order to update the current visible tooltip, or to show/hide the current tooltip. This function is useful to call when, for example, the state of the widget changed by a key press. ...

Sets the area of the widget, where the contents of this tooltip apply, to be rectangle in widget coordinates. This is especially useful for properly setting tooltips on gtk-tree-view rows and cells, gtk-icon-view widgets, etc. ...


GtkViewport

An adapter which makes widgets scrollable.

The gtk-viewport widget acts as an adaptor class, implementing scrollability for child widgets that lack their own scrolling capabilities. Use gtk-viewport to scroll child widgets such as gtk-grid, gtk-box, and so on. ...

Creates a new gtk-viewport widget with the given adjustments.

Sets the shadow type of the viewport.

Gets the shadow type of the gtk-viewport. See the function gtk-viewport-set-shadow-type.

Gets the bin window of the gtk-viewport widget. ...

Gets the view window of the gtk-viewport widget. ...


GtkAccessible

not implemented

Abstract Base Classes


GtkWidget

Base class for all widgets.

gtk-widget is the base class all widgets in GTK+ derive from. It manages the widget lifecycle, states and style. ...

Accessor of the slot app-paintable of the gtk-widget class. ...

Accessor of the slot can-default of the gtk-widget class. ...

Accessor of the slot can-focus of the gtk-widget class. ...

Accessor of the slot composite-child of the gtk-widget class. ...

Accessor of the slot double-buffered of the gtk-widget class. ...

Accessor of the slot events of the gtk-widget class. ...

Accessor of the slot expand of the gtk-widget class. ...

Accessor of the slot halign of the gtk-widget class. ...

Accessor of the slot has-default of the gtk-widget class. ...

Accessor of the slot has-focus of the gtk-widget class. ...

Accessor of the slot has-tooltip of the gtk-widget class. ...

Accessor of the slot height-request of the gtk-widget class. ...

Accessor of the slot hexpand of the gtk-widget class. ...

Accessor of the slot hexpand-set of the gtk-widget class. ...

Determines if the widget is the focus widget within its toplevel. ...

Accessor of the slot margin of the gtk-widget class. ...

Accessor of the slot margin-bottom of the gtk-widget class. ...

Accessor of the slot margin-end of the gtk-widget class. ...

Accessor of the slot margin-left of the gtk-widget class. ...

Accessor of the slot margin-right of the gtk-widget class. ...

Accessor of the slot margin-start of the gtk-widget class. ...

Accessor of the slot margin-top of the gtk-widget class. ...

Accessor of the slot name of the gtk-widget class. ...

Accessor of the slot no-show-all of the gtk-widget class. ...

Accessor of the slot opacity of the gtk-widget class. ...

Accessor of the slot parent of the gtk-widget class. ...

Accessor of the slot receives-default of the gtk-widget class. ...

The generic function gtk-widget-scale-factor retrieves the internal scale factor that maps from window coordinates to the actual device pixels. ...

Accessor of the slot sensitive of the gtk-widget class. ...

Accessor of the slot style of the gtk-widget class. ...

Accessor of the slot tooltip-markup of the gtk-widget class. ...

Accessor of the slot tooltip-text of the gtk-widget class. ...

Accessor of the slot valign of the gtk-widget class. ...

Accessor of the slot vexpand of the gtk-widget class. ...

Accessor of the slot vexpand-set of the gtk-widget class. ...

Accessor of the slot visible of the gtk-widget class. ...

Accessor of the slot width-request of the gtk-widget class. ...

Accessor of the slot window of the gtk-widget class. ...

A gtk-requisition represents the desired size of a widget. ...

Creates a gtk-requisition structure.

Copy constructor of a gtk-requisition structure.

Accessor of the slot width of the gtk-requisition structure.

Accessor of the slot height of the gtk-requisition structure.

Controls how a widget deals with extra space in a single (x or y) dimension. ...

Used in the "show-help" signal handler. ...

This direction controls the primary direction for widgets containing text, and also the direction in which the children of a container are packed. ...

This is a function for creating a widget and setting its properties in one go. ...

Destroys a widget. ...

Returns whether the widget is currently being destroyed. ...

This function is only for use in widget implementations. ...

Flags a widget to be displayed. ...

Shows a widget. ...

Reverses the effects of the function gtk-widget-show, causing the widget to be hidden, so it is invisible to the user.

Recursively shows a widget, and any child widgets if the widget is a container. ...

This function is only for use in widget implementations. ...

This function is only for use in widget implementations. ...

Creates the GDK (windowing system) resources associated with a widget. ...

This function is only useful in widget implementations. ...

Draws widget to cr. The top left corner of the widget will be drawn to the currently set origin point of cr. ...

Equivalent to calling the function gtk-widget-queue-draw-area for the entire area of a widget.

This function is only for use in widget implementations. ...

This function works like the function gtk-widget-queue-resize, except that the widget is not invalidated. Since 2.4.

The generic function gtk-widget-size-request gets the size request that was explicitly set for the widget using the generic function (setf gtk-widget-size-request). ...

This function is only used by gtk-container subclasses, to assign a size and position to their child widgets. ...

Installs an accelerator for this widget in accel-group that causes accel-signal to be emitted if the accelerator is activated. ...

Removes an accelerator from widget, previously installed with the function gtk-widget-add-accelerator. ...

Given an accelerator group, accel-group, and an accelerator path, accel-path, sets up an accelerator in accel-group so whenever the key binding that is defined for accel-path is pressed, widget will be activated. ...

Determines whether an accelerator that activates the signal identified by signal-id can currently be activated. ...

Rarely used function. This function is used to emit the event signals on a widget, those signals should never be emitted without using this function to do so. ...

For widgets that can be "activated", buttons, menu items, etc., this function activates them. ...

Moves a widget from one gtk-container to another, handling reference count issues to avoid destroying the widget. ...

Computes the intersection of a widgets area and area, and returns the intersection as a rectangle of type gdk-rectangle if there was an intersection.

Causes widget to have the keyboard focus for the gtk-window instance it is inside. widget must be a focusable widget, such as a gtk-entry; something like gtk-frame will not work. ...

Causes widget to become the default widget. ...

This function is for use in widget implementations. Sets the state of a widget, insensitive, prelighted, etc. ...

Sets a non default parent window for widget. ...

Gets widget's parent window.

Adds the events in the bitfield events to the event mask for widget. ...

This function returns the topmost widget in the container hierarchy widget is a part of. ...

Gets the first ancestor of widget with type widget-type. ...

Gets the visual that will be used to render widget. ...

Sets the visual that should be used for by widget and its children for creating gdk-window's. ...

Obtains the location of the mouse pointer in widget coordinates. ...

Determines whether widget is somewhere inside ancestor, possibly with intermediate containers.

Translate coordinates relative to src-widget's allocation to coordinates relative to dest-widget's allocations. ...

Utility function; intended to be connected to the "delete-event" signal on a gtk-window. ...

Ensures that widget has a style. ...

Reset the styles of widget and all descendents, so when they are looked up again, they get the correct values for the currently loaded RC file settings. ...

Sets the reading direction on a particular widget. ...

Gets the reading direction for a particular widget. ...

Sets the default reading direction for widgets where the direction has not been explicitly set by the fucntion gtk-widget-set-direction.

Obtains the current default reading direction of type gtk-text-direction. ...

Obtains the full path to widget. ...

Obtains the composite name of a widget.

Warning

The function gtk-widget-get-composite-name has been deprecated since version 3.10 and should not be used in newly-written code. Use the function gtk-widget-class-set-template, or don not use this API at all.

Sets the background color to use for a widget. ...

Sets the color to use for a widget. ...

Sets the font to use for a widget. ...

Sets the foreground color for a widget in a particular state. ...

Sets the background color for a widget in a particular state. ...

Sets the text color for a widget in a particular state. ...

Sets the base color for a widget in a particular state. ...

Sets the font to use for a widget. ...

Sets the cursor color to use in a widget, overriding the "cursor-color" and "secondary-cursor-color" style properties. ...

Creates a new pango-context with the appropriate font map, font description, and base direction for drawing text for this widget. ...

Gets a pango-context with the appropriate font map, font description, and base direction for this widget. ...

Creates a new pango-layout with the appropriate font map, font description, and base direction for drawing text for this widget. ...

A convenience function that uses the theme settings for widget to look up stock-id and render it to a pixbuf. ...

A convenience function that uses the theme engine and style settings for widget to look up stock-id and render it to a pixbuf. stock-id should be a stock icon ID such as "gtk-open" or "gtk-ok". size should be a size such as :menu. ...

Cancels the effect of a previous call to the function gtk-widget-push-composite-child. ...

Makes all newly-created widgets as composite children until the corresponding function gtk-widget-pop-composite-child call. ...

Convenience function that calls the function gtk-widget-queue-draw-region on the region created from the given coordinates. ...

Invalidates the rectangular area of widget defined by region by calling the function gdk-window-invalidate-region on the widget's window and all its child windows. ...

Sets whether the entire widget is queued for drawing when its size allocation changes. ...

Sets a widgets composite name. ...

Emits the "mnemonic-activate" signal. ...

Installs a style property on a widget class. ...

Finds a style property of a widget class by name. ...

Returns all style properties of a widget class. ...

Computes the intersection of a widget's area and region, returning the intersection. ...

Gets the value of a style property of widget. ...

Returns the accessible object that describes the widget to an assistive technology. ...

This function is used by custom widget implementations; if you are writing an app, you would use the function gtk-widget-grab-focus to move the focus to a particular widget, and the function gtk-container-set-focus-chain to change the focus tab order. ...

Emits a "child-notify" signal for the child property child-property on widget. ...

Stops emission of "child-notify" signals on widget. ...

Gets the value set with the function gtk-widget-set-child-visible. ...

Gets the settings object holding the settings used for this widget. ...

Returns the clipboard object for the given selection to be used with widget. ...

Get the gdk-display for the toplevel window associated with this widget. ...

Get the root window where this widget is located. ...

Get the gdk-screen from the toplevel window associated with this widget. ...

Checks whether there is a gdk-screen is associated with this widget. ...

Sets whether widget should be mapped along with its when its parent is mapped and widget has been shown with the function gtk-widget-show. ...

Reverts the effect of a previous call to gtk-widget-freeze-child-notify. ...

Returns a list of the widgets, normally labels, for which this widget is the target of a mnemonic. ...

Adds a widget to the list of mnemonic labels for this widget. ...

Removes a widget from the list of mnemonic labels for this widget. ...

Whether widget can rely on having its alpha channel drawn correctly. ...

Notifies the user about an input-related error on this widget. If the "gtk-error-bell" setting is true, it calls the function gdk-window-beep, otherwise it does nothing. ...

This function should be called whenever keyboard navigation within a single widget hits a boundary. ...

Returns the gtk-window instance of the current tooltip. ...

Replaces the default, usually yellow, window used for displaying tooltips with custom-window. ...

Triggers a tooltip query on the display where the toplevel of widget is located. ...

This function is supposed to be called in "draw" implementations for widgets that support multiple windows. ...

Transforms the given cairo context cr from widget-relative coordinates to window-relative coordinates. ...

Returns the width that has currently been allocated to widget. ...

Returns the height that has currently been allocated to widget. ...

Retrieves the widget's allocation. ...

Sets the widget's allocation. This should not be used directly, but from within a widget's size_allocate method. ...

Determines whether widget has a gdk-window of its own. ...

Specifies whether widget has a gdk-window of its own. ...

Returns the widget's effective sensitivity, which means it is sensitive itself and also its parent widget is sensitive. ...

Determines whether the widget and all its parents are marked as visible. ...

This function is for use in widget implementations. Turns on flag values in the current widget state (insensitive, prelighted, etc.). ...

Returns the widget state as a flag set. It is worth mentioning that the effective :insensitive state will be returned, that is, also based on parent insensitivity, even if widget itself is sensitive. ...

Determines whether widget can be drawn to. ...

Determines whether widget is a toplevel widget. ...

Enables or disables multiple pointer awareness. ...

Returns true if widget is multiple pointer aware. ...

Determines whether widget is realized. ...

Determines whether widget is mapped. ...

Returns the style context associated to widget.

Specifies a preference for height-for-width or width-for-height geometry management. ...

Copy constructor of a gtk-requested-size structure.

Creates a gtk-requested-size structure.

Accessor of the slot data of the gtk-requested-size structure.

Accessor of the slot minimum-size of the gtk-requested-size structure.

Accessor of the slot natural-size of the gtk-requested-size structure.

Retrieves a widget's initial minimum and natural height. ...

Retrieves a widget's initial minimum and natural width. ...

Retrieves a widget's minimum and natural height if it would be given the specified width. ...

Retrieves a widget's minimum and natural width if it would be given the specified height. ...

Gets whether the widget prefers a height-for-width layout or a width-for-height layout. ...

Retrieves the minimum and natural size of a widget, taking into account the widget's preference for height-for-width management. ...

Mark widget as needing to recompute its expand flags. ...

Computes whether a container should give this widget extra space when possible. ...


GtkContainer

Base class for widgets which contain other widgets.

Base class for widgets which contain other widgets. ...

Accessor of the slot border-width of the gtk-container class. ...

Accessor of the slot child of the gtk-container class.

Accessor of the slot resize-mode of the gtk-container class. ...

Adds widget to container. ...

Removes widget from container. ...

Emits the "check-resize" signal on widget.

Invokes func on each non-internal child of container. ...

Returns the container's non-internal children. ...

Returns a newly created widget path representing all the widget hierarchy from the toplevel down to and including child.

Sets the reallocate-redraws flag of the container to the given value. ...

Returns the current focus child widget inside container. ...

Sets, or unsets if child is nil, the focused child of container. ...

Retrieves the vertical focus adjustment for the container. ...

Hooks up an adjustment to focus handling in a container, so when a child of the container is focused, the adjustment is scrolled to show that widget. ...

Retrieves the horizontal focus adjustment for the container. ...

Hooks up an adjustment to focus handling in a container, so when a child of the container is focused, the adjustment is scrolled to show that widget. ...

undocumented ...

Returns the type of the children supported by the container. ...

a list of property names to get Gets the values of one or more child properties for child and container.

Sets one or more child properties for child and container.

Gets the value of a child property for child and container.

Sets a child property for child and container.

Emits a "child-notify" signal for the child property child-property on widget. ...

Invokes fun on each child of container, including children that are considered "internal" (implementation details of the container). ...

Sets a focus chain, overriding the one computed automatically by GTK+. ...

Removes a focus chain explicitly set with the function gtk-container-set-focus-chain. ...

Finds a child property of a container class by name.

Returns all child properties of a container type. ...


GtkBin

A container with just one child.

The gtk-bin widget is a container with just one child. It is not very useful itself, but it is useful for deriving subclasses, since it provides common code needed for handling a single child widget. ...

Gets the child of the gtk-bin, or nil if the bin contains no child widget. ...


GtkMenuShell

A base class for menu objects.

A gtk-menu-shell is the abstract base class used to derive the gtk-menu and gtk-menu-bar subclasses. ...

Accessor of the slot take-focus of the gtk-menu-shell class. ...

Adds a new gtk-menu-item to the end of the menu shell's item list.

Adds a new gtk-menu-item to the beginning of the menu shell's item list.

Adds a new gtk-menu-item to the menu shell's item list at the position indicated by position.

Deactivates the menu shell. ...

Selects the menu item from the menu shell.

Select the first visible or selectable child of the menu shell; do not select tearoff items unless the only item is a tearoff item. ...

Deselects the currently selected item from the menu shell, if any.

Activates the menu item within the menu shell.

Cancels the selection within the menu shell. ...

An enumeration representing directional movements within a menu. ...


GtkRange

Base class for widgets which visualize an adjustment

gtk-range is the common base class for widgets which visualize an adjustment, e. g. gtk-scale or gtk-scrollbar. ...

Accessor of the slot adjustment of the gtk-range class. ...

Accessor of the slot fill-level of the gtk-range class. ...

Accessor of the slot inverted of the gtk-range class. ...

Accessor of the slot lower-stepper-sensitivity of the gtk-range class. ...

Accessor of the slot restrict-to-fill-level of the gtk-range class. ...

Accessor of the slot round-digits of the gtk-range class. ...

Accessor of the slot show-fill-level of the gtk-range class. ...

Accessor of the slot upper-stepper-sensitivity of the gtk-range class. ...

Gets the current value of the range.

Sets the current value of the range; if the value is outside the minimum or maximum range values, it will be clamped to fit inside them. The range emits the "value-changed" signal if the value changes.

Sets the step and page sizes for the range. ...

Sets the allowable values in the gtk-range, and clamps the range value to be between min and max. If the range has a non-zero page size, it is clamped between min and max - page-size.

Determines how GTK+ handles the sensitivity of stepper arrows at the end of range widgets. ...

Gets the value set by the function gtk-range-set-flippable. ...

If a range is flippable, it will switch its direction if it is horizontal and its direction is :rtl. ...

This function is useful mainly for gtk-range subclasses. ...

This function returns the area that contains the range's trough and its steppers, in widget->window coordinates. ...

This function returns sliders range along the long dimension, in widget->window coordinates. ...

This function is useful mainly for gtk-range subclasses. ...

Sets the minimum size of the range's slider. ...

Sets whether the range's slider has a fixed size, or a size that depends on its adjustment's page size. ...


GtkIMContext

Base class for input method contexts.

gtk-im-context defines the interface for GTK+ input methods. An input method is used by GTK+ text input widgets like gtk-entry to map from key events to Unicode character strings. ...

Accessor of the slot input-hints of the gtk-im-context class.

Accessor of the slot input-purpose of the gtk-im-context class.

Cross-process Embedding


GtkPlug

Toplevel for embedding into other processes.

Together with gtk-socket, gtk-plug provides the ability to embed widgets from one process into another process in a fashion that is transparent to the user. One process creates a gtk-socket widget and passes the ID of that widget's window to the other process, which then creates a gtk-plug with that window ID. Any widgets contained in the gtk-plug then will appear inside the first application's window. ...

Creates a new plug widget inside the gtk-socket identified by socket-id. ...

Gets the window ID of a gtk-plug widget, which can then be used to embed this window inside another window, for instance with the function gtk-socket-add-id.


GtkSocket

Container for widgets from other processes.

Together with gtk-plug, gtk-socket provides the ability to embed widgets from one process into another process in a fashion that is transparent to the user. One process creates a gtk-socket widget and passes that widget's window ID to the other process, which then creates a gtk-plug with that window ID. Any widgets contained in the gtk-plug then will appear inside the first application's window. ...


Adds an XEMBED client, such as a gtk-plug, to the gtk-socket. ...

Gets the window ID of a gtk-socket widget, which can then be used to create a client embedded inside the socket, for instance with the function gtk-plug-new. ...

Retrieves the window of the plug. ...

Recently Used Documents


GtkRecentManager

Managing recently used files.

gtk-recent-manager provides a facility for adding, removing and looking up recently used files. Each recently used file is identified by its URI, and has meta-data associated to it, like the names and command lines of the applications that have registered it, the number of time each application has registered the same file, the mime type of the file and whether the file should be displayed only by the applications that have registered it. ...

gtk-recent-info constains all the meta-data associated with an entry in the recently used files list. ...

Error codes for gtk-recent-manager operations. ...

Creates a new recent manager object. ...

Gets a unique instance of gtk-recent-manager, that you can share in your application without caring about memory management. ...

Adds a new resource, pointed by uri, into the recently used resources list. ...

Removes a resource pointed by uri from the recently used resources list handled by a recent manager. ...

Searches for a URI inside the recently used resources list, and returns a structure containing informations about the resource like its MIME type, or its display name. ...

Checks whether there is a recently used resource registered with uri inside the recent manager. ...

Changes the location of a recently used resource from uri to new-uri. ...

Gets the list of recently used resources. ...

Purges every item from the recently used resources list. ...

Increases the reference count of info by one. ...

Decreases the reference count of info by one. ...

Gets the URI of the resource. ...

Gets the name of the resource. If none has been defined, the basename of the resource is obtained. ...

Gets the (short) description of the resource. ...

Gets the MIME type of the resource. ...

Gets the timestamp, seconds from system's Epoch, when the resource was added to the recently used resources list. ...

Gets the timestamp, seconds from system's Epoch, when the resource was last modified. ...

Gets the timestamp, seconds from system's Epoch, when the resource was last visited. ...

Gets the value of the "private" flag. ...

Gets the data regarding the application that has registered the resource pointed by info. ...

Retrieves the list of applications that have registered this resource. ...

Gets the name of the last application that have registered the recently used resource represented by info. ...

Checks whether an application registered this resource using app-name. ...

Creates a g-app-info for the specified gtk-recent-info.

Returns all groups registered for the recently used item info. ...

Checks whether group-name appears inside the groups registered for the recently used item info. ...

Retrieves the icon of size size associated to the resource MIME type. ...

Retrieves the icon associated to the resource MIME type. ...

Computes a valid UTF-8 string that can be used as the name of the item in a menu or list. For example, calling this function on an item that refers to "file:///foo/bar.txt" will yield "bar.txt". ...

Gets a displayable version of the resource's URI. ...

Gets the number of days elapsed since the last update of the resource pointed by info. ...

Checks whether the resource is local or not by looking at the scheme of its URI. ...

Checks whether the resource pointed by info still exists. ...

Checks whether two gtk-recent-info structures point to the same resource. ...


GtkRecentChooser

Interface implemented by widgets displaying recently used files.

gtk-recent-chooser is an interface that can be implemented by widgets displaying the list of recently used files. In GTK+, the main objects that implement this interface are gtk-recent-chooser-widget, gtk-recent-chooser-dialog and gtk-recent-chooser-menu. ...

These identify the various errors that can occur while calling gtk-recent-chooser functions. ...

Whether to show recently used resources marked registered as private. ...

Returns whether chooser should display recently used resources registered as private. ...

Sets whether chooser should display the recently used resources that it did not find. ...

Retrieves whether chooser should show the recently used resources that were not found. ...

Sets whether chooser should show an icon near the resource when displaying it. ...

Retrieves whether chooser should show an icon near the resource. ...

Sets whether chooser can select multiple items. ...

Gets whether chooser can select multiple items. ...

Sets whether only local resources, that is resources using the file:// URI scheme, should be shown in the recently used resources selector. ...

Gets whether only local resources should be shown in the recently used resources selector. ...

Sets the number of items that should be returned by the functions gtk-recent-chooser-get-items and gtk-recent-chooser-get-uris. ...

Gets the number of items returned by the functions gtk-recent-chooser-get-items and gtk-recent-chooser-get-uris. ...

Sets whether to show a tooltips containing the full path of each recently used resource in a gtk-recent-chooser widget. ...

Gets whether chooser should display tooltips containing the full path of a recently user resource. ...

Used to specify the sorting method to be applyed to the recently used resource list. ...

Changes the sorting order of the recently used resources list displayed by chooser. ...

Gets the value set by the function gtk-recent-chooser-set-sort-type. ...

Sets the comparison function used when sorting to be sort-func. ...

Sets uri as the current URI for chooser. ...

Gets the URI currently selected by chooser. ...

Gets the gtk-recent-info structure currently selected by chooser. ...

Selects uri inside chooser. ...

Unselects uri inside chooser. ...

Selects all the items inside chooser, if the chooser supports multiple selection. ...

Unselects all the items inside chooser. ...

Gets the list of recently used resources in form of gtk-recent-info objects. ...

Gets the URI of the recently used resources. ...

Adds filter to the list of gtk-recent-filter objects held by chooser. ...

Removes filter from the list of gtk-recent-filter objects held by chooser. ...

Gets the gtk-recent-filter objects held by chooser. ...

Sets filter as the current gtk-recent-filter object used by chooser to affect the displayed recently used resources. ...

Gets the gtk-recent-filter object currently used by chooser to affect the display of the recently used resources. ...


GtkRecentChooserDialog

Displays recently used files in a dialog.

gtk-recent-chooser-dialog is a dialog box suitable for displaying the recently used documents. This widgets works by putting a gtk-recent-chooser-widget inside a gtk-dialog. It exposes the gtk-recent-chooser interface, so you can use all the gtk-recent-chooser functions on the recent chooser dialog as well as those for gtk-dialog. ...


Creates a new gtk-recent-chooser-dialog with a specified recent manager. ...


GtkRecentChooserMenu

Displays recently used files in a menu.

gtk-recent-chooser-menu is a widget suitable for displaying recently used files inside a menu. It can be used to set a sub-menu of a gtk-menu-item using the generic function gtk-menu-item-submenu, or as the menu of a gtk-menu-tool-button. ...

Creates a new gtk-recent-chooser-menu widget. ...

Creates a new gtk-recent-chooser-menu widget using manager as the underlying recently used resources manager. ...

Returns the value set by the function gtk-recent-chooser-menu-set-show-numbers. ...

Sets whether a number should be added to the items of menu. ...


GtkRecentChooserWidget

Displays recently used files.

gtk-recent-chooser-widget is a widget suitable for selecting recently used files. It is the main building block of a gtk-recent-chooser-dialog. Most applications will only need to use the latter; you can use gtk-recent-chooser-widget as part of a larger window if you have special needs. ...

Creates a new gtk-recent-chooser-widget object. ...

Creates a new gtk-recent-chooser-widget widget with a specified recent manager. ...


GtkRecentFilter

A filter for selecting a subset of recently used files.

A gtk-recent-filter can be used to restrict the files being shown in a gtk-recent-chooser. Files can be filtered based on their name with the function gtk-recent-filter-add-pattern, on their mime type with the function gtk-file-filter-add-mime-type, on the application that has registered them with the function gtk-recent-filter-add-application, or by a custom filter function with the function gtk-recent-filter-add-custom. ...

A gtk-recent-filter-info structure is used to pass information about the tested file to the function gtk-recent-filter-filter. ...

These flags indicate what parts of a gtk-recent-filter-info structure are filled or need to be filled. ...

Adds a rule that allows resources based on their registered MIME type. ...

Adds a rule that allows resources based on a pattern matching their display name. ...

Adds a rule that allows resources based on the name of the application that has registered them. ...

Adds a rule to a filter that allows resources based on a custom callback function. ...

Tests whether a file should be displayed according to filter. ...

Choosing from installed applications


GtkAppChooser

Interface implemented by widgets for choosing an application.

gtk-app-chooser is an interface that can be implemented by widgets which allow the user to choose an application, typically for the purpose of opening a file. The main objects that implement this interface are gtk-app-chooser-widget, gtk-app-chooser-dialog and gtk-app-chooser-button. ...

Returns the currently selected application. ...

Returns the current value of the "content-type" property. ...

Reloads the list of applications. ...


GtkAppChooserButton

A button to launch an application chooser dialog.

The gtk-app-chooser-button is a widget that lets the user select an application. It implements the gtk-app-chooser interface. ...

Creates a new gtk-app-chooser-button widget for applications that can handle content of the given type. ...

Appends a custom item to the list of applications that is shown in the popup; the item name must be unique per-widget. ...

Appends a separator to the list of applications that is shown in the popup. ...<