Commit Graph

4208 Commits

Author SHA1 Message Date
Matthias Clasen
766185bce5 Add GtkWidgetPaintable to the docs
Just the usual pre-release doc fixups.
2018-05-07 07:47:18 -04:00
Matthias Clasen
c7fd3ebbaf Add GdkPaintable to the docs
Just the usual pre-release doc fixups.
2018-05-07 07:47:18 -04:00
Matthias Clasen
79e54929a2 Add more media docs 2018-05-06 15:57:10 -04:00
Matthias Clasen
f569717a03 Add media support to docs 2018-05-05 18:28:19 -04:00
Matthias Clasen
7fdf3d1769 Fixes to the gtk docs 2018-05-05 18:03:31 -04:00
Matthias Clasen
702deee799 Add some more content to the migration guide 2018-05-05 13:33:36 -04:00
Matthias Clasen
e191015aa0 The legacy event controller is still private 2018-05-03 20:45:36 -04:00
Benjamin Otte
8366ef71c0 dnd: Remove gdk_drop_reply()
It was only necessary for Motif DND, and we don't support that anymore.
2018-05-03 01:31:40 +02:00
Benjamin Otte
fb53568c04 gdk: Remove gdk_drag_grop_succeeded()
It's unused and most backends don't implement it.
2018-05-03 01:31:39 +02:00
Matthias Clasen
0f4084946a Add missing types to gtk docs 2018-05-01 23:26:28 -04:00
Matthias Clasen
1185b0b447 Add missing types to gdk docs 2018-05-01 23:22:13 -04:00
Matthias Clasen
1dcb76bc26 Merge branch 'wip/carlosg/controller' into 'master'
carlosg/controller

See merge request GNOME/gtk!131
2018-05-01 12:35:53 +00:00
Matthias Clasen
3684b72121 Misc documentation fixes
Close some gaps in gdk docs.
2018-04-28 22:34:14 -04:00
Matthias Clasen
059a181f7d Document GdkMemoryTexture 2018-04-28 16:22:29 -04:00
Matthias Clasen
a0f591297a More doc build fixes
If only the errors would make it back to stderr.
2018-04-28 16:02:34 -04:00
Matthias Clasen
b20e68cc91 More doc build fixes 2018-04-28 15:07:35 -04:00
Matthias Clasen
6b7be6643a Add offset nodes to the docs 2018-04-28 15:07:35 -04:00
Matthias Clasen
5e2103f7f0 Fix the gdk doc build
GdkDrawingContext no longer exists.
2018-04-28 15:07:35 -04:00
Benjamin Otte
9af03fa602 widget: Expose gtk_widget_add_controller()
.. and gtk_widget_remove_controller().
2018-04-26 17:59:41 +02:00
Adrian Johnson
b0bb7f3da4 Add gtk_printer_get_hard_margins_for_paper_size
to retreive paper size specific hard margins and use this
to set the hard margins in the print context.
(modified by Marek Kasik <mkasik@redhat.com>)

https://bugzilla.gnome.org/show_bug.cgi?id=686109
2018-04-26 14:19:55 +02:00
Benjamin Otte
fd686afeb2 drawcontext: Add gdk_draw_context_in_frame() API
This makes the previous gdk_draw_context_is_drawing() function public
under a new name.

I decided against the old name because we use the term "frame" for a
drawing operation, so I wanted to have this boolean flag reuse the term.
2018-04-24 23:16:58 +02:00
Benjamin Otte
a865621519 gdk: Move begin/end_frame() functions
As they require a draw context and the draw context is already bound to
the surface, it makes much more sense and reduces abiguity by moving
these APIs to the draw context.

As a side effect, we simplify GdkSurface APIs to a point where
GdkSurface now does not concern itself with drawing anymore at all,
apart from being the object that creates draw contexts.
2018-04-24 23:16:58 +02:00
Benjamin Otte
48fc18c37b gdk: Get rid of GdkDrawingContext
All information is kept in GdkDrawContext these days, so use that one.
2018-04-24 23:16:58 +02:00
Benjamin Otte
c6ae0ff2d1 gdk: Get rid of gdk_drawing_context_get_clip()
Use the identical gdk_draw_context_get_frame_region() instead.
2018-04-24 23:16:58 +02:00
Benjamin Otte
dbe4f1d766 gdk: Add gdk_draw_context_get_frame_region()
This does the same as gdk_drawing_context_get_clip().
2018-04-24 23:16:58 +02:00
Benjamin Otte
e7d6648f46 gdk: Remove gdk_gl_context_get_damage()
Remove it only form public API, because we still use the vfunc to figure
out the damage area in begin_frame().
2018-04-24 23:16:58 +02:00
Benjamin Otte
a83487a0c4 cairocontext: Move a function
A function of GdkDrawingContext is only used when drawing with Cairo, so
move it to GdkCairoContext.
2018-04-24 23:16:12 +02:00
Benjamin Otte
f396786051 gdk: Add GdkCairoContext
This does nothing but disallow passing NULL to gdk_surface_begin_paint()
and instead require this context.

The ultimate goal is to split out Cairo drawing into its own source file
so it doesn't clutter up the generic rendering path.
2018-04-24 23:16:12 +02:00
Benjamin Otte
b49dccb86d rendernode: Remove gsk_render_node_set_name()
And of course, gsk_render_node_get_name() is gone, too.
The replacement is of course debug nodes.

As a side effect, GskRenderNode is now *really* immutable.
2018-04-24 04:06:58 +02:00
Benjamin Otte
49f9d2108d gsk: Add GskDebugNode 2018-04-24 04:06:58 +02:00
Benjamin Otte
4aab8e970b gdk: Remove gdk_surface_create_similar_image_surface()
It's unused.
2018-04-12 14:04:33 +02:00
Benjamin Otte
7ef8696a7d gdk: Remove gdk_cairo_surface_create_from_pixbuf()
It's unused and people should use textures and snapshots anyway.
2018-04-12 14:04:20 +02:00
Benjamin Otte
3a1c69dce6 gdk: Remove gdk_cairo_get_drawing_context()
It's unused.
2018-04-12 14:03:40 +02:00
Benjamin Otte
770866f265 texture: Add gdk_texture_save_to_png()
It's needed for debugging Timm's code, so better have it here than
hidden in my random-patch vault.
2018-04-12 14:02:59 +02:00
Benjamin Otte
39d930c065 drawingcontext: Remove unused APIs 2018-04-12 14:02:59 +02:00
Benjamin Otte
7ef8cb652b widget: Remove gtk_widget_set_realized()
Everybody chains up now.
2018-04-11 03:16:34 +02:00
Emmanuele Bassi
410b20f904 docs: Link to GResource
Since we're referring to GLib's functionality, might as well save some
time to the reader, and link to the GResource API reference page.
2018-04-09 20:55:51 +01:00
Daniel Boles
fae064d5f9 docs/reference/gtk/getting_started: cgit => GitLab
master version of b685eb1779
2018-04-09 20:55:14 +01:00
Carlos Garnacho
20c1e24b60 gtksearchbar/entry: Add [gs]et_key_capture_widget() API calls
This lets these widgets actively pull events from a widget, instead
of passively being fed events.
2018-04-05 19:26:54 +02:00
Benjamin Otte
cbf26fbd02 widget: Add gtk_widget_compute_bounds()
The first in a set of functions intended to query widget coordinates
from another widget's coordinate system.
2018-04-05 14:57:10 +02:00
Benjamin Otte
c06a790694 widget: Remove gtk_widget_draw()
If you want to draw a widget to cairo today, you create a widget
paintable, snapshot it to a render node and then draw the render node to
cairo.

And yes, this is that complicated on purpose. Don't draw widgets to
Cairo.
2018-04-05 14:56:39 +02:00
Benjamin Otte
c74854fe49 paintable: Introduce gdk_paintable_new_empty()
Also, use it where appropriate.
2018-04-05 14:56:39 +02:00
Benjamin Otte
fc6de135fe widget: Don't keep track of clip anymore.
It's not used anywhere, so why would we need it?
2018-04-05 14:56:38 +02:00
Benjamin Otte
73650c6da2 gtk: Remove gtk_widget_queue_draw_region()
... and gtk_widget_queue_draw_area().

They don't doi anything anymore.
2018-04-05 14:56:38 +02:00
Benjamin Otte
a468714849 widget: Stop tracking invalidations
Instead of calling gdk_surface_invalidate_region(), just
gdk_surface_queue_expose() and rely on the renderer computing the diff
from the previous rendering.
2018-04-05 14:56:38 +02:00
Benjamin Otte
d0873c7dec gsk: Fold gsk_renderer_begin_draw_frame() into renderer
It doesn't need to be exported anymore.

As a side effect, the inspector no longer has any information about the
render region, so remove the code that was taking care of that.
2018-04-05 14:56:38 +02:00
Benjamin Otte
2d10c2568c gtk: Add GtkWidgetPaintable
A GtkWidgetPaintable is a paintable that observes a given GtkWidget and
renders that widget into a paintable.
2018-04-05 14:56:38 +02:00
Benjamin Otte
5e99646e1c dnd: Remove gtk_drag_set_icon_surface()
All users are gone. Use gtk_drag_set_icon_paintable() instead.
2018-03-26 18:32:38 +02:00
Benjamin Otte
7fdcc58532 snapshot: Add gtk_snapshot_to_paintable()
This is intended for DND icons
2018-03-26 18:16:36 +02:00
Benjamin Otte
9b83116fcb snapshot: Export gtk_snapshot_append_layout()
This is the equivalent snapshot function to pango_cairo_show_layout().

Not to be confused with gtk_snapshot_render_layout(), which is the
equivalent to gtk_render_layout().
2018-03-26 18:16:36 +02:00
Alexander Larsson
39851fbdbf Continue renaming window to surface
This renames a lot of arguments, local variables and functions.
2018-03-21 11:49:14 +01:00
Benjamin Otte
8202f333ea surface: Stop tracking clip region
It's not needed because we're not using it for anything anymore now that
client-side surfaces aren't drawn anymore.
2018-03-21 04:10:07 +01:00
Benjamin Otte
0ce19eed08 gdk: Remove gdk_surface_shape_combine_region()
If you want transparent region, you can just render them transparent.
If you want input shaping, use gdk_surface_input_shape_combine_region().

Also remove gtk_widget_shape_combine_region().
2018-03-21 04:10:07 +01:00
Benjamin Otte
ef693f317c surface: Remove gdk_surface_get_clip_region()
... and gdk_surface_get_visible_region() APIs. They are unused.
2018-03-21 04:10:07 +01:00
Benjamin Otte
7862894f11 surface: Remove gdk_surface_invalidate_maybe_recurse()
This also means we can now get rid of child funcs because they're not
used anymore.
2018-03-21 00:43:28 +01:00
Benjamin Otte
a1898d678b surface: Remove gdk_surface_scroll()
It's yet another fancy way to call gdk_surface_invalidate_region().

Also remove the one testgtk test that was still using it.
2018-03-21 00:43:28 +01:00
Benjamin Otte
d6ba10bacf surface: Remove gdk_surface_move_region()
It's just a cute version of gdk_surface_invalidate_region()
these days and people can call that function instead.
2018-03-21 00:43:28 +01:00
Alexander Larsson
63e060a21d GtkWidget: Start renaming widget->window
This is an automated change doing these command:

git sed -f g gtk_widget_set_has_window gtk_widget_set_has_surface
git sed -f g gtk_widget_get_has_window gtk_widget_get_has_surface
git sed -f g gtk_widget_set_parent_window gtk_widget_set_parent_surface
git sed -f g gtk_widget_get_parent_window gtk_widget_get_parent_surface
git sed -f g gtk_widget_set_window gtk_widget_set_surface
git sed -f g gtk_widget_get_window gtk_widget_get_surface
git sed -f g gtk_widget_register_window gtk_widget_register_surface
git sed -f g gtk_widget_unregister_window gtk_widget_unregister_surface

git checkout NEWS*
2018-03-20 15:21:12 +01:00
Alexander Larsson
3dce0dcca7 GdkSurface: Rename lots of stuff from window->surface
Mostly these are internal things, but the major public change is
that event.window is now event.surface.
2018-03-20 15:14:10 +01:00
Alexander Larsson
9a7e721181 GdkSurface: Rename various functions and variables
This is an automatic rename of various things related
to the window->surface rename.

Public symbols changed by this is:
 GDK_MODE_WINDOW
 gdk_device_get_window_at_position
 gdk_device_get_window_at_position_double
 gdk_device_get_last_event_window
 gdk_display_get_monitor_at_window
 gdk_drag_context_get_source_window
 gdk_drag_context_get_dest_window
 gdk_drag_context_get_drag_window
 gdk_draw_context_get_window
 gdk_drawing_context_get_window
 gdk_gl_context_get_window
 gdk_synthesize_window_state
 gdk_surface_get_window_type
 gdk_x11_display_set_window_scale
 gsk_renderer_new_for_window
 gsk_renderer_get_window
 gtk_text_view_buffer_to_window_coords
 gtk_tree_view_convert_widget_to_bin_window_coords
 gtk_tree_view_convert_tree_to_bin_window_coords

The commands that generated this are:

git sed -f g "GDK window" "GDK surface"
git sed -f g window_impl surface_impl
(cd gdk; git sed -f g impl_window impl_surface)
git sed -f g WINDOW_IMPL SURFACE_IMPL
git sed -f g GDK_MODE_WINDOW GDK_MODE_SURFACE
git sed -f g gdk_draw_context_get_window gdk_draw_context_get_surface
git sed -f g gdk_drawing_context_get_window gdk_drawing_context_get_surface
git sed -f g gdk_gl_context_get_window gdk_gl_context_get_surface
git sed -f g gsk_renderer_get_window gsk_renderer_get_surface
git sed -f g gsk_renderer_new_for_window gsk_renderer_new_for_surface

(cd gdk; git sed -f g window_type surface_type)
git sed -f g gdk_surface_get_window_type gdk_surface_get_surface_type

git sed -f g window_at_position surface_at_position
git sed -f g event_window event_surface
git sed -f g window_coord surface_coord
git sed -f g window_state surface_state
git sed -f g window_cursor surface_cursor
git sed -f g window_scale surface_scale
git sed -f g window_events surface_events
git sed -f g monitor_at_window monitor_at_surface
git sed -f g window_under_pointer surface_under_pointer
(cd gdk; git sed -f g for_window for_surface)
git sed -f g window_anchor surface_anchor
git sed -f g WINDOW_IS_TOPLEVEL SURFACE_IS_TOPLEVEL
git sed -f g native_window native_surface
git sed -f g source_window source_surface
git sed -f g dest_window dest_surface
git sed -f g drag_window drag_surface
git sed -f g input_window input_surface

git checkout NEWS* po-properties po docs/reference/gtk/migrating-3to4.xml
2018-03-20 12:05:26 +01:00
Alexander Larsson
391727bd0d GdkWindow -> GdkSurface initial type rename
This renames the GdkWindow class and related classes (impl, backend
subclasses) to surface. Additionally it renames related types:
GdkWindowAttr, GdkWindowPaint, GdkWindowWindowClass, GdkWindowType,
GdkWindowTypeHint, GdkWindowHints, GdkWindowState, GdkWindowEdge

This is an automatic conversion using the below commands:

git sed -f g GdkWindowWindowClass GdkSurfaceSurfaceClass

git sed -f g GdkWindow GdkSurface
git sed -f g "gdk_window\([ _\(\),;]\|$\)" "gdk_surface\1" # Avoid hitting gdk_windowing
git sed -f g "GDK_WINDOW\([ _\(]\|$\)" "GDK_SURFACE\1" # Avoid hitting GDK_WINDOWING
git sed "GDK_\([A-Z]*\)IS_WINDOW\([_ (]\|$\)" "GDK_\1IS_SURFACE\2"
git sed GDK_TYPE_WINDOW GDK_TYPE_SURFACE
git sed -f g GdkPointerWindowInfo GdkPointerSurfaceInfo

git sed -f g "BROADWAY_WINDOW" "BROADWAY_SURFACE"
git sed -f g "broadway_window" "broadway_surface"
git sed -f g "BroadwayWindow" "BroadwaySurface"
git sed -f g "WAYLAND_WINDOW" "WAYLAND_SURFACE"
git sed -f g "wayland_window" "wayland_surface"
git sed -f g "WaylandWindow" "WaylandSurface"
git sed -f g "X11_WINDOW" "X11_SURFACE"
git sed -f g "x11_window" "x11_surface"
git sed -f g "X11Window" "X11Surface"
git sed -f g "WIN32_WINDOW" "WIN32_SURFACE"
git sed -f g "win32_window" "win32_surface"
git sed -f g "Win32Window" "Win32Surface"
git sed -f g "QUARTZ_WINDOW" "QUARTZ_SURFACE"
git sed -f g "quartz_window" "quartz_surface"
git sed -f g "QuartzWindow" "QuartzSurface"

git checkout NEWS* po-properties
2018-03-20 11:40:08 +01:00
Benjamin Otte
82a99a3643 texture: Expose subclasses as subclasses
This is necessary so that bidnings work properly and don't make
gdk_gl_texture_release() a function on GdkTexture.
It also allows code to identify what type of texture they are dealing
with.

Finally, we can now decide to add getters later without screwing
anything up, if we want to allow people to access GL textures directly.
2018-03-18 05:57:07 +01:00
Benjamin Otte
d54ca3c74f gdk: Add GDK_MEMORY_DEFAULT
This is the default memory format.

I added it because it is way better than including a private header and
using GDK_MEMORY_CAIRO_FORMAT_ARGB32.
2018-03-18 05:57:07 +01:00
Benjamin Otte
ee8e42f19b gdk: Remove gdk_texture_new_from_data()
Use gdk_memory_texture_new() instead.
2018-03-18 05:57:07 +01:00
Benjamin Otte
b64a403100 selection: Remove surface APIs 2018-03-16 06:04:45 +01:00
Benjamin Otte
2935ef8128 image: Add gtk_image_set_can_shrink()
Images with that value set will request a 0x0 minimum size and scale
down their contents.
2018-03-16 06:04:45 +01:00
Benjamin Otte
c6541853ab image: Add gtk_image_set_keep_aspect_ratio()
If set, the image will draw its contents while keeping their aspect
ratio. That means empty areas show up on the top/bottom or left/right.

Also move the special-case snapshotting code for icons to
GtkIconHelper. That's where it belongs.
2018-03-16 06:04:45 +01:00
Benjamin Otte
af18796312 icontheme: Remove surface support
It's not used anymore.
2018-03-16 06:04:45 +01:00
Benjamin Otte
9e54c22c49 image: Don't handle surfaces anymore
Lots of special cases that are no longer needed because no code uses
surfaces.

Also remove the GdkCellRendererPixbuf:surface property.
2018-03-16 06:04:45 +01:00
Benjamin Otte
a8608618a9 dragsource: Replace gtk_drag_source_set_icon_surface()
... with gtk_drag_source_set_icon_paintable().
2018-03-16 06:04:45 +01:00
Benjamin Otte
536714a147 paintable: Add gdk_paintable_compute_concrete_size()
Do the CSS size computation routine. This will be used elsewhere soon.
2018-03-16 06:04:44 +01:00
Benjamin Otte
d1be2b29cf entry: Make icons a paintable 2018-03-16 06:04:44 +01:00
Benjamin Otte
89ee42db54 dnd: Make dnd icon API take a paintable
... instead of a texture.
2018-03-16 06:04:44 +01:00
Benjamin Otte
8f43d7e188 gdk: Add GdkPaintable 2018-03-16 06:04:44 +01:00
Benjamin Otte
e5813b3ae7 texture: Export gdk_memory_texture_new() and GdkMemoryFormat
Also add tests for all these newfangled formats.
2018-03-12 17:21:45 +01:00
Matthias Clasen
7c18911c00 GtkSnapshot: Add getters
These getters can be useful when creating new snapshots
in a snapshot() vfunc.
2018-03-11 00:31:44 -05:00
Matthias Clasen
890cd45ce4 Document new snapshot api 2018-03-11 00:31:44 -05:00
Timm Bäder
4dfe4a6476 expander: Remove label-fill property
It's just setting some internal boolean and nothing else. It's like this
in gtk3 as well so it can't be too important either.
2018-03-07 20:17:39 +01:00
Benjamin Otte
db6fed1496 overlay: Add GtkOverlay::measure child property
It determines whether a child is included in the overlay's size
measurement.

The first user is (gonna be) GtkVideo.
2018-03-07 16:17:15 +01:00
Benjamin Otte
88de098711 entry: Remove cursor adjustment APIs 2018-03-02 02:00:25 +01:00
Matthias Clasen
ef556689f8 Update docs for changed options 2018-02-24 21:34:40 -05:00
Matthias Clasen
ca794f909a Update docs for immodules 2018-02-24 21:34:40 -05:00
Matthias Clasen
5b4082ac87 Remove gtkmodules.h
We don't use these definitions anymore.

Also clean up the docs wrt to modules.
2018-02-18 09:41:29 -05:00
Matthias Clasen
656f67eeb7 Merge branch 'wip/issue-21' into 'master'
Mention gtk_button_set_image() and friends in the migration docs

Closes #21

See merge request GNOME/gtk!6
2018-02-15 03:06:28 +00:00
Carlos Garnacho
3b568fbe77 gdk/wayland: Add GdkDisplay call to query available globals
The internal known_globals hashtable is used to carry accounting for
interfaces that depend on others (as ordering is not guaranteed), extend
its usage so it also keeps track of unimplemented interfaces (here at
least).

The API call will then use this to allow querying the globals offered by
the compositor, it will be useful to determine whether we can use
text-input protocols or should fallback to other IMs.
2018-02-13 15:47:57 +01:00
Emmanuele Bassi
7ee69fc7b2 Mention gtk_button_set_image() and friends in the migration docs
The image-related API for GtkButton has been dropped, but still needs
to be mentioned in the migration guide.

Closes: #21
2018-02-13 12:57:18 +00:00
Emmanuele Bassi
5c3c95a96c docs: Mention G_ENABLE_DIAGNOSTIC in the porting notes
Since part of our type system is resolved at run time, we need to use
run time facilities to get diagnostic messages, like deprecation
warnings for properties and signals.

We should mention the G_ENABLE_DIAGNOSTIC environment variable in the
migration guide, to let developers know how to catch deprecations and
changes while porting their code.
2018-02-09 19:38:17 +00:00
Matthias Clasen
601c5fd734 Drop event filters from the docs
No longer public API.
2018-02-07 15:13:31 -05:00
Matthias Clasen
0fe3fafac1 gdk: Drop gdk_x11_window_set_frame_extents
This function is unused and has been deprecated
for a long time.
2018-02-06 01:16:32 -05:00
Matthias Clasen
d400c50ca3 fix the docs build
The GtkPlacesSidebar does not exist anymore in public API.
2018-02-06 01:16:32 -05:00
Matthias Clasen
4c150d8eb5 The big versioning cleanup
Remove all the old 2.x and 3.x version annotations.
GTK+ 4 is a new start, and from the perspective of a
GTK+ 4 developer all these APIs have been around since
the beginning.
2018-02-06 01:16:32 -05:00
Carlos Garnacho
faeb572dd5 docs: Rename right get_history() call on GDK docs
Obviously gdk_device_get_history() is not the right function to change. To
delete if anything...
2018-02-05 16:10:58 +01:00
Carlos Garnacho
f964fe3ee5 gdk: Rename gdk_event_get_history() to get_motion_history()
It only applies to GDK_MOTION_NOTIFY events, so this is a more descriptive
name. Also add Since tag in docs, and GDK_AVAILABLE_IN_3_94.
2018-02-05 16:05:34 +01:00
Matthias Clasen
4d16c5abc0 docs: Remove some leftovers
There were still references to recent chooser and tool palette
types in the docs.
2018-02-04 23:38:15 +01:00
Matthias Clasen
697b05c90c Drop threads from the docs 2018-02-04 23:27:59 +01:00
Matthias Clasen
3c45a56934 Drop gtk_widget_show_now
This function does bad things, and is not an
API that we want to take into GTK+ 4.
2018-02-04 23:23:15 +01:00
Emmanuele Bassi
2cbe094b91 Allow binding GdkContentFormatsBuilder
GdkContentFormatsBuilder is currently not introspectable, as it does not
have a GType. We can turn it into a boxed type, but we need to implement
memory management for it.

The current gdk_content_formats_builder_free() function returns a newly
constructed value, so we cannot use it as a GBoxedFreeFunc; additionally
copying a GdkContentFormatsBuilder contents would make it a bit odd, as
you could get multiple identical GdkContentFormats out of the copies.

A simple approach is to model the GdkContentFormatsBuilder API to follow
the GBytes one: use reference counting for memory management, and have
a function to release a reference, return a GdkContentFormats, and reset
the GdkContentFormatsBuilder state.

For language bindings, we can provide a get_formats() function that
returns the GdkContentFormats instance and resets the builder instance,
leaving the reference count untouched.

For C convenience we can keep gdk_content_formats_builder_free(), and
make it a wrapper around gdk_content_formats_builder_get_formats(), with
the guarantee that it'll free the builder instance regardless of its
current reference count.

https://bugzilla.gnome.org/show_bug.cgi?id=793097
https://blogs.gnome.org/otte/2018/02/03/builders/
2018-02-03 16:24:13 +01:00
Benjamin Otte
dfc131c7ec toolpalette: Remove
The widget was basically unmaintained since GTK 3.0 and the only known
user was Glade.
2018-02-03 11:52:37 +01:00
Benjamin Otte
55874470ff gtk: Remove GtkRecentChooser
It's not used any more, recent files are only used by the filtchooser
and that one uses GtkRecentManager directly.
2018-02-02 23:01:31 +01:00
Matthias Clasen
e1d81d096c Document new texture api 2018-01-17 21:45:08 -05:00
Matthias Clasen
e7cab2bc0c Drop removed api from the docs
This should have been part of the previous commit.
2018-01-16 23:33:40 -05:00
Matthias Clasen
822f802aec docs: Stop referring to specific event signals
These are going away.
2018-01-16 14:14:10 -05:00
Matthias Clasen
5759bc59c9 Drop gtk_widget_hide_on_delete
This function is misnamed - it is only ever relevant for
windows. And with the ::hide-on-delete property , it is
no longer necessary to use the signal for this simple case.
2018-01-16 14:14:10 -05:00
Matthias Clasen
4923da3550 Drop gtk_true and gtk_false
These functions are entirely trivial, their documentation
is much longer than their implementation, and it contains
an example that is annotated as "don't do this"...
2018-01-16 14:14:09 -05:00
Matthias Clasen
c04f192113 window: Add a hide-on-close property
This lets us avoid ::delete-event signal handlers for just
this purpose.
2018-01-16 14:14:09 -05:00
Matthias Clasen
76ac46405f Update docs for debug cleanup
Drop mention of GDK_GL, GDK_VULKAN and GDK_RENDERING_MODE,
add docs for GSK_DEBUG and new debug keys that were added.
2018-01-14 17:05:04 -05:00
Matthias Clasen
6cab57d7ed Document the new GDK_VULKAN_DEVICE envvar
Best to document them while they're fresh.
2018-01-10 00:14:10 -05:00
Matthias Clasen
8d24105642 Document the GDK_VULKAN env var
This was not documented at all yet.
2018-01-10 00:11:25 -05:00
Matthias Clasen
adc780f2b8 Add missing debug keys to the docs
Several values for GDK_DEBUG were missing from the docs.
2018-01-10 00:09:25 -05:00
Matthias Clasen
4dbae1d4bf Drop unused GDK_GL values
And document the existing ones.
2018-01-10 00:02:23 -05:00
Matthias Clasen
0290b28564 Drop unused debug keys
The multihead, xim and xinerama keys do nothing anymore.
2018-01-09 23:21:33 -05:00
Matthias Clasen
0443892bc7 Drop no-longer-existing debug keys from the docs
There is no draw or nogl value for GDK_DEBUG.
2018-01-09 23:15:33 -05:00
Matthias Clasen
92e6557015 Remove an unused debug value
GTK_DEBUG_MISC is not used at all. Drop it.
2018-01-09 22:56:40 -05:00
Matthias Clasen
2ff75aafbd Docs: Drop section on commandline arguments
We no longer do that.
2018-01-09 20:40:47 -05:00
Matthias Clasen
9a3b61ec9d Drop GtkPlacesSidebar from public API
This is a bit of filechooser internals that gets shared with
nautilus, which is fine, but it shouldn't be part of our
public API. There are no other users than nautilus.
2018-01-08 14:38:55 -05:00
Matthias Clasen
a670de4425 Quiet the doc build a bit 2018-01-04 18:22:47 -05:00
Matthias Clasen
ea6da7b1b8 gdk: Convince gtk-doc to include backend docs
This is almost as unpleasant with meson as it is with autotools.
2018-01-04 15:57:28 -05:00
Matthias Clasen
888a157ffa docs: Remove unused images
All the old cursor font images are unused.
2018-01-04 15:26:52 -05:00
Matthias Clasen
fb51e438e9 Implement font-variation-settings
This is a CSS font level 4 property that lets us
use font variation settings from css.
2018-01-03 13:07:55 -05:00
Matthias Clasen
894a0c0ff4 font chooser: Add properties for features and language
These can't be returned as part of the font description,
so we need new api for them. For now, this is just readonly
properties. Maybe these should be writable too, eventually.
2018-01-03 12:18:18 -05:00
Matthias Clasen
70bae02612 font button: Remove show-font and show-size
These are now handled in a more systematic fashion
using GtkFontChooserLevel.
2018-01-03 12:18:18 -05:00
Matthias Clasen
f0526359d1 font chooser: introduce font chooser levels
This is a more systematic approach to reducing the
level of detail in the font chooser.
2018-01-03 12:18:18 -05:00
Matthias Clasen
9c1207ed37 Update new css docs for new nowrap handling
This changes the recent additions to the css property
docs to also use <phrase role="nowrap">
2017-12-29 13:12:06 -05:00
Arnaud Rebillout
ed5f07e0e7 css docs: fix some formatting inconsistencies along the way
Mostly spaces.

Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791710
2017-12-29 12:51:31 -05:00
Arnaud Rebillout
c1ce599e11 css docs: remove useless <para>
Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791710
2017-12-29 12:51:31 -05:00
Arnaud Rebillout
ea55471441 css docs: swap border-width and border-left shorthands, to keep going clockwise
Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791710
2017-12-29 12:51:31 -05:00
Arnaud Rebillout
b42fc417bd css docs: Fix duplicate border‑right‑width
Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791710
2017-12-29 12:51:31 -05:00
Arnaud Rebillout
b3871a76c4 css docs: Fix refentry and refname
Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791710
2017-12-29 12:51:30 -05:00
Arnaud Rebillout
ccf3b10528 css docs: Ensure the first column does not break for every table
Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791710
2017-12-29 12:51:30 -05:00
Arnaud Rebillout
98a28f4168 css docs: Get rid of non-breaking hyphens
Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791710
2017-12-29 12:51:30 -05:00
Arnaud Rebillout
3c7c4a019c css docs: Get rid of non-breaking spaces
Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791710
2017-12-29 12:51:30 -05:00
Arnaud Rebillout
73d6076967 css docs: Fix some angle brackets for percentage
Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791710
2017-12-29 12:51:30 -05:00
Matthias Clasen
fa9037aed5 gdk: Slight doc rearrangement
Mainly, add GdkDrawContext to the docs.
2017-12-26 14:39:49 -05:00
Matthias Clasen
951456dbed Remove leftover API from headers
gdk_window_mark_paint_from_clip was removed in
bddfd7bb41
2017-12-26 13:00:27 -05:00
Matthias Clasen
d6985d793f Try to make the docs build more quiet
Not sure if this really makes a difference.
2017-12-26 13:00:27 -05:00
Matthias Clasen
97dcf2461e gdk: Remove the event structs from the documentation
No longer public api.
2017-12-26 13:00:27 -05:00
Matthias Clasen
22a43dafc8 Remove leftover gdk_event_request_motions from headers
The implementation of this function was removed in
44cb3ccfa1.
2017-12-26 11:51:28 -05:00
Matthias Clasen
1ee72e8ef4 Drop gsk_renderer_get/set_viewport from the docs
These no longer exist.
2017-12-26 11:51:28 -05:00
Matthias Clasen
8df58f953d Some migration guide revisions
Add a few things, reword some others.
2017-12-26 11:51:28 -05:00
Matthias Clasen
7a483bbecc docs: Add new headerbar api
Some functions have been renamed here.
2017-12-26 09:01:57 -05:00
Matthias Clasen
d04f66eb52 Add GtkIconSize back to the docs
And document how it works now.
2017-12-26 08:40:43 -05:00
Matthias Clasen
d5f215f96d gdk: Reshuffle docs slightly
Deemphasize GdkPixbuf in the docs.
2017-12-25 16:40:47 -05:00
Ting-Wei Lan
999cf1b1dc docs: Fix the build of gdk4 documentation
https://bugzilla.gnome.org/show_bug.cgi?id=791926
2017-12-25 14:59:35 -05:00
Matthias Clasen
3902a0d3b1 Fix the docs build
We no longer have GtkClipboard.
2017-12-22 22:59:00 -05:00
Matthias Clasen
03cacda09e css: Document font-variant and subproperties
Add the CSS font level 3 properties that we support now
to the docs.
2017-12-22 22:56:35 -05:00
Matthias Clasen
a326884df8 Mention keymaps in the migration guide
Just another bullet point.
2017-12-15 07:48:36 -05:00
Matthias Clasen
fa27d171d0 Drop gdk_keymap_get_for_display
It has been replaced by gdk_display_get_keymap.
2017-12-15 07:46:35 -05:00
Matthias Clasen
1012bbeecf Add gdk_display_get_keymap
This is just a better name for gdk_keymap_get_for_display.
2017-12-15 06:53:13 -05:00
Matthias Clasen
11a946df39 gdk: Drop GdkEventWindowState
No longer generate this event. Instead, emit change
notification for GdkWindow::state.
2017-12-14 22:24:06 -05:00
Benjamin Otte
5d70bbf4c4 display: Remove leftover old clipboard APIs 2017-12-14 13:35:32 +01:00
Benjamin Otte
920259c250 x11: Get rid of default Atom converters
No, using the default Wayland display is not okay to query Atoms.
2017-12-14 13:35:32 +01:00
Matthias Clasen
75dd3315e6 Drop atom apis from the docs
These no longer exist.
2017-12-13 23:47:51 -05:00
Benjamin Otte
b49a9b9933 dnd: Remove gdk_drag_get_selection()
Without selections, drags can't have them either.

Also included is removing the selection from GtkSelectionData.

Includes a bunch of crude cleanups to Wayland code that no longer has to
care about selection atoms.
2017-12-14 04:39:22 +01:00
Benjamin Otte
65fcff87b2 gdk: Remove ability to request selection notifications
Without selections, that's kinda pointless.
2017-12-14 04:20:48 +01:00
Benjamin Otte
f2bb2024c8 gdk: Remove properties
They are not used anymore.

Gone with them are PropertyNotify events.
2017-12-14 03:05:34 +01:00
Benjamin Otte
a4b42f0b73 gdk: Remove selection defines
And with it, remove the selections section from the docs.

So selections are gone for good now.
2017-12-14 03:05:34 +01:00
Benjamin Otte
54f9aef0d4 gdk: Remove gdk_selection_convert()
It's not used anymore.
2017-12-14 00:44:26 +01:00
Benjamin Otte
4042d5f242 gdk: Remove ability to own a selection
With this, the GDK_EVENT_SELECTION_REQUEST and GDK_EVENT_SELECTION_CLEAR
and the associated GtkWidget signals are gone, too.
2017-12-13 23:39:02 +01:00
Benjamin Otte
b66052f3ce gdk: Remove gdk_selection_add_targets()
It's not needed anymore, now that we can look at the content provider's
formats.

Alose remove all the API in GTK that was used to set it.
2017-12-13 19:27:51 +01:00
Benjamin Otte
8a453924a0 gdk: Remove gdk_event_put(), peek() etc
We don't want to treat events like they don't belong to displays. So
instead, people should use gdk_display_put/peek/get_event().
2017-12-13 00:56:52 +01:00
Matthias Clasen
a20a828b57 Add GtkEventControllMotion to the docs 2017-12-12 10:26:03 -05:00
Benjamin Otte
643a6c2311 gdk: Remove gdk_drag_manage_dnd()
Instead, pass the actions as part of gdk_drag_begin() and insist DND is
always managed.

A new side effect is that gdk_drag_begin() can now return %NULL.
2017-12-11 01:46:33 +01:00
Benjamin Otte
565d8325c4 gdk: Remove outdated gdk_drag_begin() alternatives
There's only one that's ever used, so delete the others and rename this
one to gdk_drag_begin().
2017-12-11 01:02:31 +01:00
Benjamin Otte
234d34366a clipboard: Add the useful stuff from reverted commit
This is the parts of dc50e0637f that
should have been committed but were reverted in
b5c62cf86f to unbreak the build.
2017-12-10 01:09:14 +01:00
Benjamin Otte
0d31eb8670 dnd: Add gdk_drag_context_get_display()
Also turn it into a readable, construct-only property.

Every GDK object should have this. (Apart from GdkDisplay, obviously.)
2017-12-10 01:09:14 +01:00
Matthias Clasen
fec0dc2b13 Rename GtkHeaderBar::show-close-button
It is about all window buttons, so rename it to ::show-title-buttons.

https://bugzilla.gnome.org/show_bug.cgi?id=779862
2017-12-07 22:37:06 -05:00
Carlos Garnacho
4c45022ed0 gdk: Add gdk_seat_get_master_pointers()
Traditionally (and on most backends) there's a single master pointer driven
by all pointing devices. The notable exception is Wayland though, where
master pointing devices are created per capability in the case of
pointer/touch, and one for each drawing tablet.

This function call makes it easy to access all these.

https://bugzilla.gnome.org/show_bug.cgi?id=790920
2017-12-07 21:27:14 -05:00
Matthias Clasen
20cbb3f745 Update gtk docs for recent changes
Clipboards are gone, textures appear...
2017-12-05 08:56:09 -08:00
Matthias Clasen
48f1e53e1e Drop get/set_scale_factor from gsk docs
They no longer exist.
2017-12-05 08:39:04 -08:00
Matthias Clasen
4a11baa372 gdk: Documentation improvements 2017-12-04 23:52:48 -08:00
Matthias Clasen
4ab15a8292 docs: Drop some no longer existing functions 2017-12-04 23:15:06 -08:00
Matthias Clasen
b5c62cf86f Revert "clipboard: Add gdk_clipboard_set()"
This reverts commit dc50e0637f.

This broke the build.
2017-12-04 23:09:54 -08:00
Benjamin Otte
dc50e0637f clipboard: Add gdk_clipboard_set()
This API allows specifying a GType and va_args of a value of that type
to set the clipboard contents. This massively simplifies setting weird
object types into the clipboard.
2 example patches included in this patch are the GtkTextBuffer and the
file list in the file chooser.

Using gobject-introspection, this should work without specifying the
type, so that you can literlally say
  clipboard.set ("Hello World")
or
  clipboard.set (pixbuf)
which is why I've also marked all other setters as (skip). They just
exist in C as wrappers for type safety reasons.
2017-12-05 05:29:03 +01:00
Matthias Clasen
384a999032 Move GdkGrabStatus docs
This enum was the odd man out in the initialization docs.
Move it to GdkSeat where grabbing happens nowadays.
2017-12-04 10:36:19 -08:00
Matthias Clasen
edfb86fe10 Add new stuff to the gdk docs
Document all the things.
2017-12-04 10:32:17 -08:00
Matthias Clasen
5cc7bf5dbd Fix the gdk doc build
Some types don't exist anymore.
2017-12-04 10:03:23 -08:00
Matthias Clasen
5c1a46c149 docs: Remove gtk_application_is_inhibited
It doesn't exist anymore.
2017-12-04 07:42:01 -08:00
Benjamin Otte
52b1cd40d1 gsk: Remove gsk_render_node_set_scaling_filters()
This is a leftover from the very early rendernode that we forgot to delete.

This can be seen by the fact that it is settable on an immutable object.
2017-12-03 21:57:21 +01:00
Matthias Clasen
8b1b9f8c55 Drop api that is only for unmanaged dnd
These functions are not needed as public api anymore.
2017-12-03 06:24:24 +01:00
Benjamin Otte
4e06aaeaa8 gdk: Add gdk_content_formats_new_for_gtype()
Many places create formats for a single tpye, so make it easy for them
to get this without having to create a builder first.
2017-12-03 05:46:48 +01:00
Benjamin Otte
54c8a4b3b7 widget: Add gtk_widget_get_clipboard()
... and gtk_widget_get_primary_clipboard().

They both give out the new GdkClipboard.
2017-12-03 05:46:47 +01:00
Benjamin Otte
a59572f96d widget: gtk_widget_get_clipboard => gtk_widget_get_old_clipboard
Just rename the function, so the previous one can be used for the
new clipboard.
2017-12-03 05:46:47 +01:00
Benjamin Otte
134076e738 x11: Implement claiming the X Selection with the clipboard
... and of course support writing to other apps.
2017-12-03 05:46:47 +01:00
Benjamin Otte
7426f1a16b gdkcontentformats: Change the matching API
Instead of having just one function that has the gtype and mime type as
out arguments, have 3 functions: 1 that finds any match, 1 that finds a
GType match and one for a mime type match.

This makes the API way more convenient to use.
2017-12-03 05:46:47 +01:00
Benjamin Otte
481c6ad99a dnd: Add gtk_drag_set_icon_texture() 2017-12-02 16:21:58 +01:00
Benjamin Otte
20de4c86ad selection: Add texture getter/setter 2017-12-02 16:21:58 +01:00
Руслан Ижбулатов
c7bdf643c5 GDK: Make sure W32 backend compiles without GdkDeviceManager
https://bugzilla.gnome.org/show_bug.cgi?id=773299
2017-12-02 10:37:23 +00:00
Carlos Garnacho
645e67231e gtkeventcontrollerscroll: Add some docs 2017-12-02 00:29:37 +01:00
Matthias Clasen
7fcd3bee0d Add GtkEventControllerScroll to the docs
It is not actually documented yet, unfortunately.
2017-12-01 14:17:04 -08:00
Matthias Clasen
6241ae009e docs: Some revision to the migration docs
Cover more of the recent changes, and revise some of the wording.
2017-12-01 11:51:53 -05:00
Benjamin Otte
3d4743ee62 textview: Remove serialization API
It's unused. Plain text is not using that framework, neither is
in-process same-display transmission.

So it was only useful for sharing text with custom tags across
applications, and nobody is doing that.
2017-11-29 23:03:33 -05:00
Matthias Clasen
dfd194a5fa Drop gtk_cell_view_new_with_pixbuf
We have a texture-based alternative for this now.
2017-11-29 20:26:28 -05:00
Matthias Clasen
c750c0e571 Drop gdk_cursor_new_from_pixbuf
Part of the push to remove GdkPixbuf from the API.
2017-11-29 20:16:43 -05:00
Matthias Clasen
c2a38612a9 Drop gtk_drag_source_set_icon_pixbuf
Part of removing GdkPixbuf from the API.
2017-11-29 20:02:47 -05:00
Matthias Clasen
507ef68faa Add gtk_cell_view_new_with_texture
Just more api to replace pixbufs with textures.
2017-11-29 19:28:53 -05:00
Matthias Clasen
1f6fb4e716 Drop GdkDeviceManager APIs
No longer used outside of the backends.
2017-11-25 11:04:14 -05:00
Matthias Clasen
480ea400f3 Drop support for setting event masks for floating devices
These are very rarely needed, and are X11-specific.
If it turns out that somebody needs this, it can come
back as X11-specific functionality.
2017-11-25 11:04:14 -05:00
Matthias Clasen
4c40accbb9 gdk: Move gdk_disable_multidevice tot he X11 backend
This api only ever did something for X11, so move
it there. Update the docs and adapt the only caller.
2017-11-25 11:04:14 -05:00
Matthias Clasen
0cfc812a5d Drop gdk_display_get_device_manager API
GdkDeviceManager is being replaced by GdkSeat.
2017-11-25 11:04:14 -05:00
Benjamin Otte
c82378ea57 gdk: Add GType support to GdkContentFormats
This is not used by anything yet, but add it now, so people looking at
this new code can make sense of it.
Plus, the documentation mentions it, so better have the docs make sense.

It will be used once we add support for conversions to GDK and allow
doing cipboard/dnd by GValue.
2017-11-20 23:22:28 +01:00
Benjamin Otte
1a70ca75e8 gdk: Sanitize GdkContentFormats API
Make sure the API reflects the idea that GdkContentFormats is a set
containing mime types. In particular, treat the object itself as a
plural - it's named content format`S' after all - and therefor use
the correct verb form.

Also make GdkContentFormats keep an array instead of a list, now that
it's immutable.
2017-11-20 23:15:11 +01:00
Benjamin Otte
fc2ce5a925 gdk: Make GdkContentFormats immutable 2017-11-20 23:13:10 +01:00
Benjamin Otte
1a482ad276 gdk: Add GdkContentFormatsBuilder
Yes, the name is too long.
No, I couldn't think of a shorter one.
2017-11-20 23:12:48 +01:00
Benjamin Otte
d6a209816b gdkdnd: Make GdkDragContext->formats a GdkContentFormats
Instead of it being a GList of GdkAtoms.
2017-11-20 23:12:33 +01:00
Benjamin Otte
9a6ec4e959 contentformats: Rename GtkTargetList
It's now called GdkContentsFormat
2017-11-20 23:12:33 +01:00
Benjamin Otte
0b40ad32f3 selection: Make GtkTargetList members private
Outside of the target list, don't access it directly, instead use public
APIs like the newly introduced gtk_target_list_intersects().
2017-11-20 23:12:33 +01:00
Matthias Clasen
2d591cde78 Include gdk-private.h
This gives us access to private gdk api.
2017-11-17 16:34:04 -05:00
Benjamin Otte
f4ec6290f8 gdk: Remove gdk_flush()
If you need to flush a display, use gdk_display_flush().

There is never a need to flush displays you don't know about.
2017-11-17 08:36:35 +01:00
Matthias Clasen
cc97c71883 Drop generic error trap api from the docs 2017-11-17 00:17:29 -05:00
Matthias Clasen
6bf215bc15 Drop gdk_set_program_class
Together with the corresponding getter.
This is x11-specific functionality.
2017-11-16 23:22:08 -05:00
Matthias Clasen
d73898437f x11: Add gdk_x11_display_set_program_class
The program class is a very X-specific concept.
There should be x11-backend api to deal with it.
2017-11-16 23:21:06 -05:00
Matthias Clasen
211f16d68b Drop gdk_notify_startup_complete
This function and its variant are just wrappers
around the display-specific function.
2017-11-16 22:45:52 -05:00
Matthias Clasen
baf40d35c5 Drop gdk_beep
This is an unnecessary wrapper around gdk_display_beep.
2017-11-16 22:10:26 -05:00
Matthias Clasen
ce13dbba10 Drop gdk_set_double_click_time
This is an unnecessary and not-recommended-to-be-used
wrapper around gdk_display_set_double_click_time.
2017-11-16 22:04:25 -05:00
Benjamin Otte
5da3059175 selection: Remove gtk_target_table_*() functions 2017-11-16 22:59:42 +01:00
Benjamin Otte
47e75b34a4 selection: Make GtkTargetEntry not allocatable
And remove it being registered as a boxed type (lol).
2017-11-16 22:59:42 +01:00
Matthias Clasen
a28cf475af image: Update docs
Mention the new icon-size style classes, update the docs
for removed arguments and return values, and add new
functions to the docs.
2017-11-15 14:22:17 -05:00
Matthias Clasen
f16fb1373e Document -gtk-icon-size
Add this property to the list of CSS properties.
2017-11-15 14:22:17 -05:00
Benjamin Otte
049cc6aa01 image: Change getters
Instead of returning the icon size with them, make
gtk_image_get_icon_name() and gtk_image_get_gicon() only return the icon
itself.

As a benefit, we can turn them into regular getters that return values
instead of requiring out parameters.

Instead, provide gtk_image_get_icon_size() to query the icon size.
2017-11-15 14:22:17 -05:00
Benjamin Otte
a7754a14b5 toolbar: Remove icon sizes 2017-11-15 14:22:16 -05:00
Benjamin Otte
4c4e914806 gdk: Replace GDK_NONE with NULL 2017-11-15 19:07:17 +01:00
Benjamin Otte
7efc5a1558 clipboard: Consistently use GtkTargetList
Some code was using GtkTargetList, some used GtkTargetEntry and some
GtkTargetPair.
2017-11-15 19:07:16 +01:00
Benjamin Otte
9d56cee622 widget: Remove gtk_widget_set_device_enabled()
Nobody is using it.
2017-11-13 23:41:37 +01:00
Benjamin Otte
d65d5d0a84 gtktexttag: Remove GtkTextTag::event and gtk_text_tag_event()
GtkSourceView is not using it, so it's unneeded. And it's certainly
diving deep into event internals of GtkTextView which hinders a proper
gesturization.
2017-11-11 04:25:11 +01:00
Benjamin Otte
22472c1924 entry: Remove surface icons
We have texture icons.
2017-11-05 06:45:01 +01:00
Benjamin Otte
cf2d549e92 widget: Implement gtk_widget_pick()
... and use it.
2017-11-05 05:13:17 +01:00
Matthias Clasen
844b75356d Documentation fixes
Make sure textures show up in the gdk docs.
2017-11-04 23:47:02 -04:00
Benjamin Otte
2d959553e9 image: Add the ability to set textures
This also adds it to all other places that use the same infrastructure:
GtkEntry and GtkCellRendererPixbuf
2017-11-05 00:07:17 +01:00
Emmanuele Bassi
481b5d1b89 Partially revert GskTexture → GdkTexture rename
Excessive use of sed when moving GskTexture to GDK; the GskTextureNode
should still live under the GSK namespace.
2017-11-04 15:06:00 +00:00
Benjamin Otte
4c2bae3a1a texture: Add gdk_texture_new_from_file()
and gdk_texture_new_from_resource().

While doing set, turn all GDK_AVAILABLE_IN_3_90 into
GDK_AVAILABLE_IN_3_94 because that's now true after the renaming.
2017-11-04 15:22:25 +01:00
Benjamin Otte
b38a4cb824 widget: Export gtk_widget_set_cursor()
Widgets can now set their favorite cursor using public API.

This is very necessary because all cursor-setting APIs are still
setting it on their GdkWindow, which by now is the toplevel - oops.
2017-11-04 01:00:27 +01:00
Benjamin Otte
e294f71555 x11: Redo cursor handling completely
Instead of creating a GdkX11Cursor, create GdkCursors. Cache the XCursor
in a hash table instead.

Also, make use of the new fallback mechanism for fallback code: Make
sure to provide cursors for the names that are guaranteed to exist, but
do not do bad attempts at displaying texture surfaces.
Black/White/transparent is not a replacement for those.
2017-11-04 00:07:13 +01:00
Benjamin Otte
6b2ea46a5f gdk: Add gdk_cursor_get_fallback()
There's no way to use it yet, but I want it to be available for
refactoring the backends.
2017-11-04 00:07:13 +01:00
Benjamin Otte
5adf21a17d cursor: Turn new_from_surface() into new_from_texture()
Also turn all the arguments into read-only properties on the GdkCursor
object.
2017-11-04 00:07:13 +01:00
Benjamin Otte
81c2bebaca gdk: Remove ability to download a cursor 2017-11-04 00:07:13 +01:00
Benjamin Otte
ca3c23662c GskTexture => GdkTexture
We want this thing to replace GdkPixbuf, so it has to live in GDK.
2017-11-04 00:07:13 +01:00
Benjamin Otte
8ba9ae6012 gdk: Add gdk_cursor_get_name()
Also add the GdkCursor::name property.
2017-11-04 00:07:13 +01:00
Benjamin Otte
a1759a0a52 gdk: Get rid of GdkCursorType
Now that we no longer have API that uses cursor types, don't keep them
around.
2017-11-04 00:07:13 +01:00
Benjamin Otte
8aa68110bd x11: Remove gdk_x11_grab_server()
Luckily, this one is unused.
2017-11-02 12:47:50 +01:00
Benjamin Otte
d380cf114b x11: Remove outdated functions from API
We don't want generic APIs that do random stuff on the default X display.
2017-11-02 12:42:58 +01:00
Benjamin Otte
f33c20920b x11: Add API to query root window and screen from GdkDisplay 2017-11-02 12:42:16 +01:00
Timm Bäder
8f55647fbb widget: Add get_width() and get_height() 2017-11-02 11:54:06 +01:00
Matthias Clasen
2a60928157 t Remove gdk_cursor_new_for_display
The preferred api to create cursors is by name, and the
GdkCursorType enumeration can directly trace its ancestry
to the horrible X cursor font. So lets stop using it.
2017-11-01 21:49:05 -04:00
Matthias Clasen
ee72860804 Drop GdkScreen from the docs
It is no longer part of the api.
2017-11-01 20:59:54 -04:00
Matthias Clasen
feb870add3 Drop gdk_screen_get_default
This function is not used anymore.
2017-11-01 19:44:28 -04:00
Benjamin Otte
bd6b6ed93c gdk: Remove VisibilityNotify events 2017-11-01 22:00:34 +01:00
Benjamin Otte
bcced800ea x11: Remove screen-specific macros 2017-11-01 20:51:14 +01:00
Benjamin Otte
d88c441764 widget: Add gtk_widget_contains() 2017-11-01 19:46:59 +01:00
Matthias Clasen
f2655b055d monitor: Add a ::valid property
This is slightly more useful than the existing
::invalidate signal, since it can be queried at
any time.
2017-11-01 14:17:20 -04:00
Benjamin Otte
2d31a5499a gdk: Remove gdk_get_display_arg_name()
Since we're no longer allowing arguments, this is always NULL now.
2017-11-01 18:26:34 +01:00
Benjamin Otte
161f891d55 x11: Make gdk_x11_display_open() public API
People should be able to explicitily open displays to their backends.
2017-11-01 15:48:00 +01:00
Matthias Clasen
0411cc5620 Drop GdkVisual
This type was unused except for serving as a parent
for GdkX11Visual. Just move the fields to that type.
2017-10-31 22:44:15 -04:00
Matthias Clasen
67cea50383 Drop gdk_get_default_root_window
This is a trivial convenience function, and it is barely used.
2017-10-31 21:30:59 -04:00
Matthias Clasen
68a61e9ac6 Drop gdk_screen_get_toplevel_windows 2017-10-31 20:49:50 -04:00
Matthias Clasen
a27bfaa0a3 Drop the GDK_DPI_SCALE variable
It complicates the dpi handling, and was really just a workaround
for non-dpi aware applications when hidpi support was first introduced.
2017-10-31 18:37:54 -04:00
Matthias Clasen
b36b7f08fb Drop gdk_pango_context_get_for_display
This api does not offer much over the pango api, and
the use of the resolution here is causing layering
problems.
2017-10-31 18:15:50 -04:00
Matthias Clasen
f8cad19829 dnd: Drop GdkScreen from apis
Drop the screen argument from gdk_dnd_find_window_for_screen
and rename the function to gdk_dnd_find_window. The screen
argument does not add anything here since the drag context
is already tied to the display. Update all backends, and
update all callers.
2017-10-31 10:18:10 -04:00
Benjamin Otte
ccd52a410e settings: Remove gtk_settings_get_for_screen()
All users of it are gone now.
2017-10-31 08:25:37 +01:00
Benjamin Otte
648d040395 widget: Remove gtk_widget_get_screen()
Replace the remaining users with "correct" code that does not need that
function anymore.
2017-10-31 08:25:37 +01:00
Benjamin Otte
b9504a547a mountoperation: Move from screen to display 2017-10-31 08:25:37 +01:00
Benjamin Otte
07164e098a window: Turn gtk_window_set_screen() into gtk_window_set_display()
And have a priv->display instead of a priv->screen.

Includes turning gtk_menu_set_screen() into gtk_menu_set_display(),
because that function just forwards to its window.
2017-10-31 08:25:37 +01:00
Benjamin Otte
c8986e66ce window: Remove gtk_window_get_screen()
It's identical to gtk_widget_get_screen(), just use that one.
2017-10-31 04:33:54 +01:00
Benjamin Otte
1c36c6ed4d widget: Remove gtk_widget_has_screen()
All widgets always have a screen (or display).
2017-10-31 04:33:11 +01:00
Matthias Clasen
f0189aecbc Drop gdk_event_set/get_screen
These functions have been replaced by display variants.
2017-10-30 22:22:00 -04:00
Benjamin Otte
ecd5b399a4 icontheme: Use GdkDisplay instead of GdkScreen 2017-10-31 03:05:55 +01:00
Benjamin Otte
9151e0b9f5 stylecontext: Port to use display instead of screen 2017-10-31 03:05:54 +01:00
Matthias Clasen
5c2e254f65 Drop gdk_pango_context_get
This is a trivial convenience api, and it is not used in gtk.
2017-10-30 21:36:37 -04:00
Matthias Clasen
1f114b1257 Drop gdk_pango_context_get_for_screen
GdkScreen is going away, and this api is unused in gtk.
2017-10-30 21:29:48 -04:00
Benjamin Otte
59cfd56365 settings: Don't store the screen in the settings object
Screens are going away.

Code that still needs the screen just gets it from the display.
2017-10-31 00:42:32 +01:00
Matthias Clasen
a1a5f556cb Some documentation updates
Document gtk_settings_get_for_display instead of for_screen.
2017-10-30 18:59:41 -04:00
Matthias Clasen
154117218c Drop gdk_screen_get_setting
It has been replaced by gdk_display_get_setting.
2017-10-30 17:03:09 -04:00
Matthias Clasen
209f24f962 Remove gdk_setting_get
This is a minor convenience api, and it is unused.
2017-10-30 15:31:02 -04:00
Matthias Clasen
e99687194a Forgotten files
Clean up the setting event from headers and docs too.
2017-10-30 10:08:32 -04:00
Matthias Clasen
5bdc67f3f6 Drop gtk_cell_renderer_get_size
This function has been deprecated since 3.0, time to drop it.
2017-10-25 22:27:19 -04:00
Matthias Clasen
4f6cee3ee3 Mention pixbufs in the migration guide
They are being phased out.
2017-10-23 18:33:15 +02:00
Alexander Larsson
96b04836d8 Drop all uses of GdkPixbufAnimation in the gtk APIs
These are basically animated gifs, and don't fit well in how
modern things animate.
2017-10-23 16:56:49 +02:00
Alexander Larsson
2b194089dd GtkImage: Drop support for storing pixbufs
This drops the pixbuf property and the pixbuf getters. We keep
gtk_image_new/set_from_pixbuf, but these are small helpers that
immediately convert to a surface, and there is no way to later get
back the pixbuf you passed in.

The from file/resource codepaths are also changed to load a surface
instead of a pixbuf.
2017-10-23 15:28:33 +02:00
Matthias Clasen
493f5d6b18 dnd: Add more surface apis
The new function, gtk_drag_source_set_icon_surface, is for setting
a drag source icon without using GdkPixbuf.
2017-10-23 14:16:31 +02:00
Alexander Larsson
6f8644ad25 GtkEntry: Use surfaces, not pixbufs for bitmapped icons 2017-10-23 13:45:25 +02:00
Matthias Clasen
02db8ccd89 icon theme: Add a texture cache
Return cached textures for icons. This lets us avoid duplicate
texture uploads for icons whose surfaces we already cache.
2017-10-23 08:07:35 +02:00
Matthias Clasen
e584a70820 Drop gtk_drag_set_icon_pixbuf from the docs too
It no longer exists.
2017-10-23 06:21:59 +02:00
Matthias Clasen
8b84df422b Drop gtk_recent_info_get_icon
We are moving away from pixbuf-based apis.
Use gtk_recent_info_get_gicon instead.
2017-10-23 06:21:59 +02:00
Matthias Clasen
b940872005 Add gtk_image_get_surface to the docs
This was missed.
2017-10-23 05:59:30 +02:00
Matthias Clasen
b775238bc4 Document new clipboard apis
These are surface-based replacements for some pixbuf apis.
2017-10-23 05:58:54 +02:00
Matthias Clasen
65408a0b0c Document new selection apis
Document the new cairo surface-based apis for GtkSelection.
2017-10-23 05:58:54 +02:00
Matthias Clasen
771be092da docs: Add render node api 2017-10-20 13:54:01 +02:00
Matthias Clasen
366fb44d20 Fix docs build
this include file can't be found, so just do without it.
2017-10-09 21:58:50 -04:00
Matthias Clasen
07b1030438 Towards a working docs build
Add back images, content_files and expand_content files.
2017-10-09 19:36:12 -04:00
Matthias Clasen
6bfdd772a5 Towards a working docs build
Pass mode: 'none' so escaping of <> in doc comments works.
2017-10-09 19:07:05 -04:00
Daniel Boles
29d40196e6 docs: css-properties: Fix wrongly repeated colour 2017-09-29 18:14:07 +01:00
Matthias Clasen
f6626a9e0e gsk: Documentation additions
Document newly added apis, and ensure that all public apis
are listed in the docs.
2017-09-24 22:26:39 -04:00
Matthias Clasen
dd4361a638 Rename enable-documentation and enable-man-pages options
You can now disable the documentation build with
-Ddocumentation=false and -Dman-pages=false.
2017-09-06 11:10:55 -04:00
Matthias Clasen
15edfbbc88 Rename and document the enable-gir option
You can disable introspection now with -Dintrospection=false.
2017-09-06 09:53:34 -04:00
Matthias Clasen
b5e00d36f0 Allow building without tests and demos
This is meant to cut down build time in flatpak and similar
situations. Since it produces technically incomplete builds,
we list these options in the status output at the end of
the meson run.
2017-09-06 09:53:20 -04:00
Daniel Boles
b5afe75700 docs: css-overview: Don’t recommend broken syntax
Using this produced warnings about the Pango syntax of <Family> <size>
being deprecated, and the size being invalid due to no unit specified.
Also, that multi-word font family presumably wouldn’t work as expected.
2017-09-03 12:26:07 +01:00
Javier Jardón
bc3968d2ff gtk/gtkshow: Remove deprected gtk_show_uri() 2017-08-28 23:47:36 +01:00
Daniel Boles
5f593ff306 getting_started: Sync filenames & section headings
The order of Examples 3 and 4 was swapped, so the headings updated
themselves, but the filenames were left reflecting the old order.

https://bugzilla.gnome.org/show_bug.cgi?id=786553
2017-08-22 14:15:46 +01:00
Timm Bäder
b24535ea75 container: Remove gtk_container_propagate_draw
It's superseded by gtk_widget_snapshot_child now.
2017-08-21 12:30:42 +02:00
Emmanuele Bassi
9957dd59b0 docs: Update references to Meson CLI utilities
The separate `mesonconf` and `mesontest` binaries have been deprecated,
in favour of `meson` sub-commands.
2017-08-15 14:08:57 +01:00
Emmanuele Bassi
0803ee2df4 docs: Update the 'building gtk' guide
Clean up for Meson.
2017-08-14 22:23:09 +01:00
Emmanuele Bassi
391d1a04ec Drop Autotools build
We are officially switching to Meson as the default build system for
GTK+.
2017-08-14 22:23:09 +01:00
Timm Bäder
a8a755e5cd widget: Remove gtk_widget_set_redraw_on_alloc
Since gtk+ draws more than the widget and allocates more size to it than
it knows about, this flag doesn't work anymore. Removing it (or setting
it to TRUE for widgets that used to set it to FALSE) fixes drawing
invalidation when these widgets get allocated a new size.
2017-08-09 16:26:26 +02:00
Timm Bäder
5874a30c73 GdkWindow: Remove gdk_window_new_input
Not needed anymore.
2017-08-09 15:19:46 +02:00
Matthias Clasen
80afb8c90a Fix docs build 2017-08-07 22:21:22 -04:00
Daniel Boles
d6e4ce127a docs: gtk/running: Document the GTK_CSD env var
It was not documented before.

https://bugzilla.gnome.org/show_bug.cgi?id=778791#c1
2017-08-06 17:44:18 +01:00
Benjamin Otte
47fe08528d eventbox: Remove 2017-08-02 16:59:09 +01:00
Timm Bäder
b71f644cf5 eventbox: Remove visible-window property
The GdkWindow that was supposed to back it is gone.
2017-07-27 21:53:42 +02:00
Timm Bäder
5720f2a845 widget: Make _set_clip private
We don't need this anymore since clips are now reported in
size-allocate.
2017-07-19 21:27:16 -04:00
Timm Bäder
36ab70ddf5 widget: Add baseline and out_clip parameters to size-allocate
Since setting a clip is mandatory for almost all widgets, we can as well
change the size-allocate signature to include a out_clip parameter, just
like GtkCssGadget did. And since we now always propagate baselines, we
might as well pass that one on to size-allocate.

This way we can also make sure to transform the clip returned from
size-allocate to parent-coordinates, i.e. the same coordinate space
priv->allocation is in.
2017-07-19 21:27:16 -04:00
Timm Bäder
0ebd8840a8 widget: Remove gtk_cairo_transform_to_window
Useless in a world without windows and cairo.
2017-07-19 21:27:15 -04:00
Timm Bäder
c4f6cea111 fix a few documentation problems 2017-07-19 21:27:15 -04:00
Timm Bäder
8dc5e13e8c iconview: Remove bin_window 2017-07-19 21:27:14 -04:00
Timm Bäder
e36ddfec17 Remove all widget style property code 2017-07-19 21:27:14 -04:00
Timm Bäder
a73d3418bc layout: Remove bin_window 2017-07-19 21:27:14 -04:00
Timm Bäder
4a4897a9b6 paned: Reimplement handle dragging 2017-07-19 21:27:13 -04:00
Timm Bäder
b9f70b473c scrollbar: Add new API to gtk4-sections.txt
and update the css node docs
2017-07-19 21:27:13 -04:00
Timm Bäder
34af3d3940 accellabel: Inherit from GtkWidget
Use a box and 2 labels.
2017-07-19 21:27:13 -04:00
Timm Bäder
9ab43dfe9e spinbutton: Add accessors for (max-)width-chars 2017-07-19 21:27:12 -04:00
Timm Bäder
2cedf1be9c widget: Remove gtk_widget_set_allocation 2017-07-19 21:27:12 -04:00
Timm Bäder
f736b071b4 spinbutton: Add text property 2017-07-19 21:27:11 -04:00
Daniel Boles
d7b175a3fb css-overview: Don’t document deleted pseudoclasses
Commit b52966a318 stopped the parser from
handling various deprecated pseudoclasses, which were aliases of others,
but it did not update the documentation to reflect that they were gone.
2017-06-22 23:56:44 +01:00
Daniel Boles
6eb58fa67b css-overview: Fix typo “{with=>which} is disabled” 2017-06-22 20:40:06 +01:00
Matthias Clasen
f135b2527f center box: complete the baseline support
When there is no externally allocated baseline, we should
do the same thing that GtkBox does, and determine one from
the children that want baseline alignment.

This commit adds a GtkCenterBox::baseline-position property
with setters and getters.
2017-06-10 09:14:16 -04:00
Matthias Clasen
e936a35d66 Make GtkCenterBox public
It provides functionality that GtkBox used to have,
and is generally useful.
2017-06-04 21:20:27 -04:00
Carlos Garnacho
d9d0c56eb7 gtktoolitem: Remove gtk_tool_item_set_use_drag_window()
This API call is not necessary anymore, since it's no longer necessary
to receive events.
2017-05-25 16:25:59 +02:00
Carlos Garnacho
a72404dd5a gtk: Mass delete all GtkWidget event mask API
We now rely on toplevels receiving and forwarding all the events
the windowing should be able to handle. Event masks are no longer a
way to determine whether an event is deliverable ot a widget.

Events will always be delivered in the three captured/target/bubbled
phases, widgets can now just attach GtkEventControllers and let those
handle the events.
2017-05-25 16:25:58 +02:00
Carlos Garnacho
02932bc406 gtkgesture: Drop GdkWindow checks
Those are now needless and wrong, as we get guarantees that handled
events will contain widget-relative coordinates. A side effect is
that these events are very possibly not explicitly sent to the
GdkWindow that implementations expect, any extra checks performed
through gtk_gesture_set_window() will be wrong, so the function has
been dropped entirely.
2017-05-25 16:25:58 +02:00
Carlos Garnacho
fee289cd06 gdk: Add gdk_rectangle_contains_point() call
A little helper function for a somewhat common operation.
2017-05-25 16:25:58 +02:00
Matthias Clasen
c05b317b1e Fix the docs build
gtk-doc behavior changed, it seems, and these options now
cause the build to break.
2017-05-22 17:35:58 -04:00
Emmanuele Bassi
db2c80d9db meson: Generate man pages for the installed tools 2017-05-05 11:35:31 +01:00
Timm Bäder
3d21128dbb Remove gtk_widget_get_preferred_*
They are unnecessary now that we have gtk_widget_measure.
2017-05-05 11:18:25 +02:00
Emmanuele Bassi
8acf5a8174 build: Update autotools for API reference changes 2017-05-03 15:10:58 +01:00
Emmanuele Bassi
c984c3b55e build: Initial attempt at fixing the docs build
We need to reference the types file directly, because it won't be copied
into the builddir by Meson — except for GTK, which needs to generate its
own types file using configure_file().
2017-05-03 15:10:57 +01:00
Emmanuele Bassi
ba87e857e2 build: Generate the API references (WIP)
Still a work in progress.
2017-05-03 15:10:57 +01:00
Emmanuele Bassi
f942aa53e2 docs: Rename files to match type and version
The main GDK API reference index is XML, not SGML.

The overrides file is for GDK 4.x, not 3.x.
2017-05-03 15:10:56 +01:00
Emmanuele Bassi
98b1075764 gdk: Remove GdkX11DisplayManager from the build
We don't instantiate it, and we don't use it any more.
2017-05-03 14:15:57 +01:00
Matthias Clasen
92b0d2e8ea Remove GtkWindow::hide-titlebar-when-maximized
This was only every implemented under X11, and with CSD,
this is clearly in the application realm. We should not
pretend that we can support it on the toolkit level.

https://bugzilla.gnome.org/show_bug.cgi?id=775061
2017-05-01 13:26:46 -04:00
Timm Bäder
bb1deaafa4 migration guide: Extend GtkBox child property section
Mention the removed expand and fill child properties as well.
2017-04-28 17:14:10 +02:00
Timm Bäder
db4b1d28f5 label: Remove angle property 2017-04-25 20:30:37 +02:00
Timm Bäder
fb927d1993 box: Remove center child 2017-04-25 20:30:37 +02:00
Timm Bäder
ba363fbb71 widget: Add gtk_widget_insert_before/after
To insert a widget into the widget tree before or after a child widget
of the soon-to-be parent.
2017-04-25 20:29:02 +02:00
Timm Bäder
d5c6692104 gtk4-sections: Add missing GtkWidget child/sibling accessors 2017-04-24 14:15:57 +02:00
Jeremy Bicha
fc70267158 docs: Use https for more links
https://bugzilla.gnome.org/show_bug.cgi?id=780878
2017-04-03 16:02:22 -04:00
Jeremy Bicha
183e5bb8a4 docs: Point links to correct versions
https://bugzilla.gnome.org/show_bug.cgi?id=780878
2017-04-03 16:02:22 -04:00
Timm Bäder
0ce9f26dc5 window: Remove has-toplevel-focus property
Since embedded toplevels don't exist anymore, :has-toplevel-focus is
equivalent to :active.
2017-03-31 09:50:39 +02:00
Timm Bäder
6353433f0e Make gtk_container_set_focus_child private 2017-03-31 09:50:39 +02:00
Timm Bäder
0d480a3eb0 Remove gtk_container_get_focus_child 2017-03-31 09:50:39 +02:00
Matthias Clasen
e70380a4dd Document GTK_INSPECTOR_RENDERER
Also add GTK_INSPECTOR_DISPLAY to the docs at the same time.
2017-03-30 09:15:22 -04:00
Daniel Boles
a2b72f89e2 css-overview: Fix inconsistent British English use 2017-03-18 12:31:29 +00:00
Daniel Boles
c3892874cb css-overview: Fix+Explain color expr number ranges
Last try, promise. They don’t all use 0 to 1. We should probably explain
the effects too. Hopefully this manages that while not being too verbose
2017-03-18 01:17:14 +00:00