Commit Graph

3186 Commits

Author SHA1 Message Date
Matthias Clasen
a8191e7113 places sidebar: Make 'recent' work on other platforms
Since nautilus merge, we were not showing 'Recent' in the sidebar
if GIO did not support the recent: scheme. But the file chooser
can show recent files independent of gvfs - it loads the recent
files manually. This is relevant on Windows and OS X, where gvfs
is typically not used.

This commit adds a show-recent property which can be used to override
the recent: scheme check. We use it in the file chooser.

https://bugzilla.gnome.org/show_bug.cgi?id=750068
2015-06-06 17:13:22 -04:00
Руслан Ижбулатов
26c24328d5 GDK: Add cursor theme support to W32 backend
Load themed cursors from the same places they are loaded on freedesktop systems,
but use W32 API functions to do so (works for .cur/.ani cursors instead of X
cursors).

Refactor the code for cursor handling. Prefer loading cursors by name.

Do not load actual cursors when loading the theme. Find the files and remember
the arguments/calls for loading them instead. Keeping HCURSOR instance in the
hashmap would result in multiple GdkCursors using the same HCURSOR. Given that
we use DestroyCursor() to off them, this would cause problems (at the very
least - DestroyCursor() would fail).

Store GdkCursor instances in a cache. Update cached cursors when theme changes.

Recognize "system" theme as a special (and default) case. When it is set,
prefer system cursors and fall back to Adwaita cursors and (as a last resort)
built-in X cursors. Otherwise prefer theme cursors and fall back to system and
X cursors.

Force GTK to use "left_ptr" cursor when no cursor is set. Using NULL makes
it use the system default "arrow", which is not the intended behaviour when
a non-system theme is selected.

Ignore cursor size setting and query the OS for the required cursor size, as
Windows (almost) does not allow setting cursors of arbitrary size.

https://bugzilla.gnome.org/show_bug.cgi?id=749287
2015-05-20 08:42:24 +00:00
Matthias Clasen
7d83edd4e0 Update docs 2015-05-08 13:34:25 -04:00
Matthias Clasen
049cbc8b74 GtkFontChooser: Allow a custom font map
This lets applications show their own fonts instead of
or in addition to system fonts.

https://bugzilla.gnome.org/show_bug.cgi?id=748771
2015-05-07 07:33:23 -04:00
Matthias Clasen
e1c1fc59e5 Add default widget handling to popovers
Add a new API, gtk_popover_set_default_widget, that can be
used to make a widget act as default while the popover is
shown. This is useful in dialog-like popovers.

http://bugzilla.gnome.org/show_bug.cgi?id=747664
2015-05-02 20:34:28 -04:00
Matthias Clasen
da3f2eea7c gtk-builder-tool: Improve docs 2015-05-02 11:55:57 -04:00
Matthias Clasen
a2c12f582e Fix the build 2015-04-30 07:46:18 -04:00
Matthias Clasen
398399610a gtk-builder-tool: Add an enumerate command
This lists all the named objects from the .ui file.
2015-04-30 07:11:49 -04:00
Matthias Clasen
f5d7c5fef3 Fix inclusion of examples in docs in non-srcdir builds
This is a bit messy, since xsltproc insists on stripping relative
paths to the basename before consulting the paths.

https://bugzilla.gnome.org/show_bug.cgi?id=748640
2015-04-29 14:16:50 -04:00
Matthias Clasen
31490b5634 Fix distcheck 2015-04-29 06:54:08 -04:00
Matthias Clasen
d7523423d4 gtk-builder-tool: Separate commands
Add separate commands for validation and simplification.
2015-04-27 23:40:43 -04:00
Matthias Clasen
01a83e0a26 Add a man page for gtk-builder-tool 2015-04-27 19:10:10 -04:00
Fabiano Fidêncio
fea2e7bf35 gdkkeys: Add support to _get_scroll_lock_state()
GdkKeymap already has support for _get_num_lock_state() and
_get_caps_lock_state(). Adding _get_scroll_lock_state() would be good
for completness and some backends (Windows?) could take advantage of
this.
2015-04-27 20:07:52 -03:00
Matthias Clasen
1a0726ef31 docs: Update list of ignored headers 2015-04-26 10:19:26 -04:00
Matthias Clasen
ca41bb440d Add an index for new api to the docs 2015-03-22 02:11:03 -04:00
Matthias Clasen
5c5464a469 radio-menu-item: Add join_group()
The other Radio* widgets have this convenience method that removes the
memory management of the opaque GSList used to handle the group from the
API usable from language bindings (especially the ones not based on
introspection).

This commit adds gtk_radio_menu_item_join_group().

https://bugzilla.gnome.org/show_bug.cgi?id=671362
2015-03-22 02:10:38 -04:00
Matthias Clasen
2026efb981 More documentation fixes
With this commit, gtk3-unused.txt is empty (for the first
time in a looong time).
2015-03-13 23:24:53 -04:00
Matthias Clasen
bb3ae47477 Docs: Update ignored header list
This reduces the warning spam somewhat.
2015-03-13 23:24:53 -04:00
Matthias Clasen
a744a67f42 Documentation fixes
Add a few missing symbols.
2015-03-13 23:24:53 -04:00
Philip Withnall
80013436d0 gtkentry: Document vfuncs in GtkEntryClass
Clarify that the signal handler vfuncs can be NULL, nothing else can,
and that they all have default implementations.

https://bugzilla.gnome.org/show_bug.cgi?id=712760
2015-03-11 11:24:29 +00:00
Bastian Ilsø
52f5a78c6d Update hello-world.c to GtkApplication, document 2015-03-09 12:17:31 +01:00
Frédéric Péters
70775e1985 docs: fix reference to GTK+ 2 index of deprecated symbols 2015-03-08 09:43:04 +01:00
Bastian Ilsø
761c781168 getting-started: move Drawing section to bottom. 2015-02-23 21:42:56 +01:00
Carlos Garnacho
cff1694c99 popover: Add show/hide transitions
These have the same visual effect and timing than the gnome-shell ones.
During the hide animation, the popover has been made to take focus
elsewhere, and refuse to take any pointer/keyboard input until the popover
is shown again.

This has been based on work from Timm Bäder.

https://bugzilla.gnome.org/show_bug.cgi?id=741405
2015-02-20 14:44:17 +01:00
Philip Withnall
8b4863f0c4 docs: Add extra symbol links to input handling documentation
Cross-reference to the API documentation more consistently.

https://bugzilla.gnome.org/show_bug.cgi?id=744054
2015-02-19 12:48:42 +00:00
Philip Withnall
09bb109f01 docs: Expand input handling documentation to cover event masks
Also try and clarify a few things about event propagation. Move
input-handling.xml into gtk-doc’s expand_content_files variable so it
automatically links to widget documentation. Add links from
gtk_widget_add_events() and friends to the new documentation.

https://bugzilla.gnome.org/show_bug.cgi?id=744054
2015-02-19 12:48:42 +00:00
Philip Withnall
668d5d8665 docs: Mention events in the input handling documentation title
Make it a little easier to find these docs when searching for ‘event’.

https://bugzilla.gnome.org/show_bug.cgi?id=744054
2015-02-19 12:48:42 +00:00
Philip Withnall
e160befdf8 docs: Remove non-existent symbols from gtk3-sections.txt
Eliminate a couple of gtk-doc warnings.
2015-02-18 11:38:37 +00:00
Philip Withnall
8c32f403fb docs: Ignore generated files when building documentation 2015-02-18 11:38:37 +00:00
Bastian Ilsø
0080224fdb Updated grid-packing to GtkApplication. 2015-02-15 22:57:57 +01:00
Lars Uebernickel
f3110e4103 Rename GtkSidebar to GtkStackSidebar
GtkSidebar is too generic and doesn't fully convey what the widget does.

https://bugzilla.gnome.org/show_bug.cgi?id=744094
2015-02-13 18:01:56 +01:00
Matthias Clasen
8d7a235a04 notebook: Add api to complete tab dnd from the outside
This is necessary to avoid unwanted drag cancel animations,
now that GtkNotebook is careful about cancelling a drag
when the dragged tab disappears unexpectedly.
2015-02-12 17:33:10 -05:00
Emmanuele Bassi
d066e7541e Remove GdkGLProfile
The existence of OpenGL implementations that do not provide the full
core profile compatibility because of reasons beyond the technical, like
llvmpipe not implementing floating point buffers, makes the existence of
GdkGLProfile and documenting the fact that we use core profiles a bit
harder.

Since we do not have any existing profile except the default, we can
remove the GdkGLProfile and its related API from GDK and GTK+, and sweep
the whole thing under the carpet, while we wait for an extension that
lets us ask for the most compatible profile possible.

https://bugzilla.gnome.org/show_bug.cgi?id=744407
2015-02-12 17:51:31 +00:00
Emmanuele Bassi
390a42fa60 gl: Add gdk_gl_context_get_version()
Store the OpenGL version when we first do the extensions check; this
allows client code to check the available GL version without requiring a
call to gdk_gl_context_make_current() and epoxy_gl_version().
2015-02-12 14:29:44 +00:00
Emmanuele Bassi
c115c479dc docs: Add missing GdkGLContext symbols 2015-02-12 12:40:03 +00:00
Lars Uebernickel
d825249b42 gtklistbox: add bind_model()
gtk_list_box_bind_model() binds a GListModel to a GtkListBox.

This is a first step towards having GListModel support in Gtk. It's not
useful for large models, because GtkListBox always creates all widgets
for all rows.
2015-02-12 11:22:07 +01:00
Lars Uebernickel
3e81653bd3 Add support for loading gtk3-only modules
Introduce GTK3_MODULES environment variable for modules that don't work
in gtk3. The list of modules is now $GTK3_MODULES:$GTK_MODULES.

https://bugzilla.gnome.org/show_bug.cgi?id=743917
2015-02-04 13:42:39 +01:00
Bastian Ilsø
a1f8ffce4e Getting started: BIG update of basics section
https://bugzilla.gnome.org/show_bug.cgi?id=743680
2015-01-30 17:38:08 -05:00
Matthias Clasen
c160ba0696 dnd: Allow programmatic drag cancellation
Add a gtk_drag_cancel() function that can be used on the
source side to cancel an ongoing drag operation. This can
be useful, e.g. if the data that is being dragged becomes
unavailable.
2015-01-30 09:38:41 -05:00
Bastian Ilsø
f3d95d05eb Introduction explaining widget toolkit 2015-01-28 12:17:45 +00:00
Bastian Ilsø
9e85fcbe7c Paragraph explaining casting conventions via macro 2015-01-27 21:40:19 +00:00
Jonas Danielsson
1442299b48 clipboard: Add get_default() helper
Add helper for getting the main clipboard. This makes
the API usable for bindings (as GdkAtoms aren't usable through
gobject-introspection), and easier to use in C.

https://bugzilla.gnome.org/show_bug.cgi?id=712752
2015-01-27 18:09:31 +01:00
Matthias Clasen
500c8d82fc GtkSearchEntry: Add more API
Add ::next-match, ::previous-match and ::stop-search keybinding
signals that are bound to Ctrl-g, Ctrl-Shift-g and Escape. Also
add a gtk_search_entry_handle_event() function to handle key events.
2015-01-24 08:44:30 -05:00
Carlos Garnacho
5e53676b46 device: Add property/getters for vendor/product identifiers
These are a construct only properties, expected to be filled in from
platform specific code.

https://bugzilla.gnome.org/show_bug.cgi?id=740758
2015-01-19 15:09:19 +01:00
David King
9a50203408 docs: Fix some old live.gnome.org URLs 2015-01-09 14:08:20 +00:00
Sébastien Wilmet
020258f85a textview: add extend-selection signal
To be able to customize the double-click and triple-click behaviors, to
provide custom selection boundaries.

https://bugzilla.gnome.org/show_bug.cgi?id=111503
2014-12-17 12:20:02 +01:00
Christian Hergert
661da5558c widget: add helpers to resolve GActionGroups available to GtkWidget
These functions, while added for use by the GTK inspector, are generally
useful to applications that need to resolve what action groups are
available to a particular GtkWidget.

https://bugzilla.gnome.org/show_bug.cgi?id=741386
2014-12-11 15:25:41 -08:00
Matthias Clasen
6f2fff56fb Add a gtk_scrollable_get_border
Add a vfunc to return a non-scrollable border around scrollables.
This would be nicer as a property, but we can't add properties
to an interface without breaking 3rd party implementations, so
make this an optional vfunc, and handle it not being set.
2014-12-10 10:01:30 -05:00
Matthias Clasen
b73578f95d Add a scrollable indication
Draw a themable indication when an edge of a scrolled window
is hiding some content that can be scrolled in.
2014-12-10 10:00:21 -05:00
Ankita Patil
a4e827e4bf GtkEntry: Added gtk_entry_grab_focus_without_selection()
Providing a way to focus an entry without selecting its contents.

https://bugzilla.gnome.org/show_bug.cgi?id=735838
2014-12-05 23:17:25 -05:00
Matthias Clasen
3d4bcf55a5 Allow inserting Pango markup in text buffers
This has been a very long-standing feature request.

https://bugzilla.gnome.org/show_bug.cgi?id=59390
2014-12-04 00:09:44 -05:00
Matthias Clasen
b6383f1507 Reshuffle some docs 2014-12-02 21:00:24 -05:00
Emmanuele Bassi
37a1e6cacb docs: Mention the standalone Makefile for examples
And point to the README file.

https://bugzilla.gnome.org/show_bug.cgi?id=741041
2014-12-02 19:30:33 +00:00
Matthias Clasen
83d8f9b929 Update release notes
Mention that --enable-gtk2-dependency is gone.
2014-12-01 10:32:37 -05:00
Matthias Clasen
464536b460 Add missing api to the docs 2014-11-23 19:44:01 -05:00
Lapo Calamandrei
4aca13e39e Statusbar: add 'statusbar' style class 2014-11-11 17:23:04 +01:00
Matthias Clasen
1e3e544bfd Revert "Add new API to docs"
This reverts commit 41e9eaf64f.
2014-11-07 07:12:22 -05:00
Matthias Clasen
41e9eaf64f Add new API to docs 2014-11-06 23:37:00 -05:00
Alexander Larsson
f0ae8da993 Remove GdkGLContext::visual
This is not really needed. The gl context is totally tied to the
window it is created from by virtue of sharing the context with the
paint context of that window and that context always has the visual
of the window (which we already can get).

Also, all user visible contexts are essentially offscreen contexts, so
a visual doesn't make sense for them. They only use FBOs which have
whatever format that the users sets up.
2014-10-30 12:43:03 +01:00
Matthias Clasen
0b4c37624a GtkPopoverMenu: Add API to open a submenu
This allows alternative menu switching to be implemented, besides
the builtin GtkModelButton support.
2014-10-29 06:49:59 -04:00
Matthias Clasen
6e001acbf9 Add documentation
Document GtkModelButton and GtkPopoverMenu.
2014-10-29 06:49:59 -04:00
Matthias Clasen
b86356bc1c GtkStack: split homogeneous
Split homogeneous into separate hhomogeneous and vhomogeneous
properties. vhomogeneous is what we want for popover menus.
2014-10-26 14:59:21 -04:00
Robert Ancell
0f26b26f1d Gdk: add an experimental backend for mir
This is disabled by default.  Enable with --enable-mir-backend.

This backend is a combined work of Robert Ancell and Ryan Lortie.
2014-10-22 11:17:15 -05:00
Matthias Clasen
5ee7445048 Add GtkSidebar to the widget gallery 2014-10-22 01:13:00 -04:00
Matthias Clasen
247f2c9192 Add GtkGLArea to the widget gallery 2014-10-22 01:13:00 -04:00
Matthias Clasen
9fb44a3c67 Add all sidebar API to the docs 2014-10-22 00:32:38 -04:00
Matthias Clasen
3b3a623520 Add new papersize api to the docs 2014-10-22 00:32:32 -04:00
Matthias Clasen
cc31235d2e Add a 3.16 index
We have new GDK api already.
2014-10-21 23:56:36 -04:00
Matthias Clasen
4ed98878c6 GtkScrolledWindow: Add documentation
Document the new overlay scrolling APIs, and add some more
documentation for the other touch support: kinetic scrolling
and overshoot.
2014-10-20 23:07:45 -04:00
Matthias Clasen
cf0c9eb158 GtkPaned: Add a "wide-handle" property
This can be used by applications to indicate that a paned is expected
to be actively used by the users for configuring the UI, and needs
a prominent handle.

https://bugzilla.gnome.org/show_bug.cgi?id=738860
2014-10-20 08:50:53 -04:00
Matthias Clasen
23f6ff3cec Add GtkGLArea fully to docs
It was missing from the type list.
2014-10-19 23:30:49 -04:00
Sébastien Wilmet
55dddbc54a docs: add missing symbol in GtkTextView 2014-10-18 19:28:40 +02:00
Sébastien Wilmet
2e68e4fc09 docs: documentation for GtkTextBufferClass
It'll most probably be more useful in the near future.
2014-10-18 19:28:40 +02:00
Matthias Clasen
0f4bf3d8a0 Fix the build 2014-10-18 13:19:21 -04:00
Matthias Clasen
c5c21bb1cf GtkWindow: Add a getter for the custom titlebar
This is needed for the glade integration of CSD windows.
2014-10-18 12:51:30 -04:00
Matthias Clasen
50e73dc6c7 Some documentation updates
Mention libepoxy in various places as a new dependency, and also
mention Wayland in the build documentation.
2014-10-18 12:51:29 -04:00
Benjamin Otte
672a67d0af gdk: Add GDK_DEBUG=nogl
This is mostly useful for fallback testing.

I suppose if people want finer grained GL ability testing, they can use
Mesa environment variables to tune things.
2014-10-16 03:33:15 +02:00
Matthias Clasen
0939857e70 Add GdkGLProfile and GdkGLError to the docs 2014-10-13 10:43:32 -04:00
Alexander Larsson
535723ce86 Add GtkGLArea widget 2014-10-13 10:43:31 -04:00
Alexander Larsson
038aac6275 gdk: Add support for OpenGL
This adds the new type GdkGLContext that wraps an OpenGL context for a
particular native window. It also adds support for the gdk paint
machinery to use OpenGL to draw everything. As soon as anyone creates
a GL context for a native window we create a "paint context" for that
GdkWindow and switch to using GL for painting it.

This commit contains only an implementation for X11 (using GLX).

The way painting works is that all client gl contexts draw into
offscreen buffers rather than directly to the back buffer, and the
way something gets onto the window is by using gdk_cairo_draw_from_gl()
to draw part of that buffer onto the draw cairo context.

As a fallback (if we're doing redirected drawing or some effect like a
cairo_push_group()) we read back the gl buffer into memory and composite
using cairo. This means that GL rendering works in all cases, including
rendering to a PDF. However, this is not particularly fast.

In the *typical* case, where we're drawing directly to the window in
the regular paint loop we hit the fast path. The fast path uses opengl
to draw the buffer to the window back buffer, either by blitting or
texturing. Then we track the region that was drawn, and when the draw
ends we paint the normal cairo surface to the window (using
texture-from-pixmap in the X11 case, or texture from cairo image
otherwise) in the regions where there is no gl painted.

There are some complexities wrt layering of gl and cairo areas though:
* We track via gdk_window_mark_paint_from_clip() whenever gtk is
  painting over a region we previously rendered with opengl
  (flushed_region). This area (needs_blend_region) is blended
  rather than copied at the end of the frame.
* If we're drawing a gl texture with alpha we first copy the current
  cairo_surface inside the target region to the back buffer before
  we blend over it.

These two operations allow us full stacking of transparent gl and cairo
regions.
2014-10-13 10:43:31 -04:00
Alexander Larsson
d0147a6f2c Add gdk_window_mark_paint_from_clip and call from widget drawing
This is a new function that gets called every time we're drawing
some area in the Gtk paint machinery. It is a no-op right now, but
it will be required later to keep track of what areas which
we previously rendered with GL was overwritten with cairo contents.
2014-10-13 10:43:31 -04:00
Matthias Clasen
0004e667ab GtkTextView: Add a monospace property
This is a convenient shortcut for a common case. It is implemented
by adding a .monospace style class to the text view, and letting
the theme decide about the monospace font to use.
2014-10-07 00:39:42 -04:00
Matthias Clasen
ba63f95a4a Add GtkTextViewClass to the docs
So that the existing information about draw_layer actually
ends up in the docs. While we are at it, document the other
vfuncs.

https://bugzilla.gnome.org/show_bug.cgi?id=737952
2014-10-06 22:33:19 -04:00
Matthias Clasen
75bcecb363 Add a label style class 2014-10-04 21:53:29 -04:00
Matthias Clasen
cfdbd59963 docs: Add an index for 3.16 additions 2014-10-04 16:09:21 -04:00
Matthias Clasen
a00842fa99 Add a function to load css from a resource
This is common enough that we should just provide an API for it
- we already had a function for this purpose anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=672946
2014-10-04 15:52:02 -04:00
Benjamin Otte
9752ab1711 docs: Fix some copy/paste errors 2014-10-04 17:18:50 +02:00
Benjamin Otte
82b7d21f6e print: Add a .paper style class
... and use it in the print preview.
2014-10-04 17:18:50 +02:00
Benjamin Otte
f7d7d345da docs: Add a man page fro gtk3-demo-application
It is an installed binary, so it needs a man page!
2014-10-04 17:18:50 +02:00
Ikey Doherty
cdd2651db0 Add GtkSidebar
GtkSidebar behaves internally much like GtkStackSwitcher, providing a vertical
sidebar like widget. It is virtually identical in appearance to the widget
currently used in GNOME Tweak Tool.

This widget is connected to a GtkStack, and builds its own contents as a
GtkListBox subclass, using the "title" child property to provide a consistent
navigatable widget.

Being a subclass of GtkListBox it benefits immediately from strong keyboard
navigation, and minimal changes are required for theming.

https://bugzilla.gnome.org/show_bug.cgi?id=735293

Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2014-10-01 00:44:46 -04:00
Matthias Clasen
d39424fc1c GtkLabel: add x/yalign properties
Since it turns out that x/yalign can't be quite equivalently
replaced by h/valign, bring them back as label properties, so
we can eventually get rid of GtkMisc.

https://bugzilla.gnome.org/show_bug.cgi?id=735841
2014-09-29 23:56:20 -04:00
Matthias Clasen
cc141329ed Drop outdated files
These files stem from the time when the documentation was in
a separate module - long, long ago.
2014-09-21 22:50:43 -04:00
Ekaterina Gerasimova
318de7cd44 Remove reference to GTK+ 2 in reference docs
The reference applies to both GTK+ 2 and GTK+ 3, so remove mention of
the version number from the reference docs.

https://bugzilla.gnome.org/show_bug.cgi?id=736927
2014-09-18 18:16:54 -04:00
Sébastien Wilmet
c104c64436 Better mark GtkAlignment as deprecated
- Move the class to the Deprecated section.
- Warning at the bottom of the class description.
- A missing property was not marked as deprecated.
- Update doc of gtk_container_set_border_width() to not mention
  GtkAlignment.

https://bugzilla.gnome.org/show_bug.cgi?id=736622
2014-09-17 15:02:50 +02:00
Matthias Clasen
8aa9a4c385 Better thumbnail for GtkTreeView
This one makes it more obvious that it is a tree with multiple
columns and not just multiline text.

https://bugzilla.gnome.org/show_bug.cgi?id=528800
2014-09-06 22:00:21 -04:00
Matthias Clasen
fd904c69f8 Fix cross references in docs in tarballs
This approach is copied from Pango.
2014-09-04 00:17:30 -04:00
Ikey Doherty
6e1ef76480 Cleanup invalid comments (duplication of words)
https://bugzilla.gnome.org/show_bug.cgi?id=735301

Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2014-08-26 19:55:38 -04:00
Matthias Clasen
c2bf866733 Move GtkThemingEngine to the deprecated docs section 2014-08-16 21:40:40 -04:00
Matthias Clasen
cab7dcde1b Deprecate GtkStatusIcon
GtkStatusIcon is using a problematic, XEmbed-based protocol under X,
and we want to get rid of it eventually. Document our intentions by
marking GtkStatusIcon as deprecated.

https://bugzilla.gnome.org/show_bug.cgi?id=734826
2014-08-15 13:02:31 -04:00
Domenico Tortorella
43bddd205b BroadwayServer support for unix socket listening
At the present time broadway listens only for TCP/IP incoming
display connections. This patch implements the support for listening
on unix domain sockets too, adding the broadway_server_on_unix_socket_new()
constructor and the commandline option --unixsocket [path] to broadwayd.

https://bugzilla.gnome.org/show_bug.cgi?id=734420
2014-08-14 20:24:10 -04:00