gtk4.git
5 years agotesttoolbar: Convert to GtkDropTarget
Matthias Clasen [Thu, 2 Jan 2020 13:37:06 +0000 (08:37 -0500)]
testtoolbar: Convert to GtkDropTarget

5 years agotestlist3: Convert to GtkDropTarget
Matthias Clasen [Thu, 2 Jan 2020 13:21:49 +0000 (08:21 -0500)]
testlist3: Convert to GtkDropTarget

5 years agotestdnd: Convert to GtkDropTarget
Matthias Clasen [Thu, 2 Jan 2020 06:46:26 +0000 (01:46 -0500)]
testdnd: Convert to GtkDropTarget

5 years agotestdnd2: Port to GtkDropTarget
Matthias Clasen [Thu, 2 Jan 2020 06:31:14 +0000 (01:31 -0500)]
testdnd2: Port to GtkDropTarget

5 years agotreeview: Port to GtkDropTarget
Matthias Clasen [Thu, 2 Jan 2020 05:40:35 +0000 (00:40 -0500)]
treeview: Port to GtkDropTarget

A small api change here is that
gtk_tree_view_enable_model_drag_dest now returns
a GtkDropTarget that can be used to connect signals.

5 years agotextview: Port to GtkDropTarget
Matthias Clasen [Thu, 2 Jan 2020 05:21:19 +0000 (00:21 -0500)]
textview: Port to GtkDropTarget

5 years agofilechoserbutton: Convert to GtkDropTarget
Matthias Clasen [Thu, 2 Jan 2020 06:51:07 +0000 (01:51 -0500)]
filechoserbutton: Convert to GtkDropTarget

5 years agostackswitcher: Port to GtkDropTarget
Matthias Clasen [Thu, 2 Jan 2020 05:21:01 +0000 (00:21 -0500)]
stackswitcher: Port to GtkDropTarget

5 years agoexpander: Port to GtkDropTarget
Matthias Clasen [Thu, 2 Jan 2020 04:28:51 +0000 (23:28 -0500)]
expander: Port to GtkDropTarget

5 years agowindow: Port to GtkDragDest
Matthias Clasen [Thu, 2 Jan 2020 04:28:33 +0000 (23:28 -0500)]
window: Port to GtkDragDest

5 years agotext: Port to GtkDropTarget
Matthias Clasen [Thu, 2 Jan 2020 01:47:19 +0000 (20:47 -0500)]
text: Port to GtkDropTarget

5 years agocolorswatch: Port to GtkDropTarget
Matthias Clasen [Wed, 1 Jan 2020 20:19:04 +0000 (15:19 -0500)]
colorswatch: Port to GtkDropTarget

5 years agocolorbutton: Port to GtkDropTarget
Matthias Clasen [Wed, 1 Jan 2020 19:40:49 +0000 (14:40 -0500)]
colorbutton: Port to GtkDropTarget

5 years agocalendar: Port to GtkDropTarget
Matthias Clasen [Wed, 1 Jan 2020 19:19:48 +0000 (14:19 -0500)]
calendar: Port to GtkDropTarget

5 years agogtk-demo: Convert clipboard demo to GtkDropTarget
Matthias Clasen [Wed, 1 Jan 2020 18:13:39 +0000 (13:13 -0500)]
gtk-demo: Convert clipboard demo to GtkDropTarget

5 years agodrop: Add a convenience api
Matthias Clasen [Thu, 2 Jan 2020 18:05:29 +0000 (13:05 -0500)]
drop: Add a convenience api

This is a question that drag-drop handlers frequently
need to answer, so make it easy.

5 years agodragdest: doc improvements
Matthias Clasen [Sun, 5 Jan 2020 14:36:02 +0000 (09:36 -0500)]
dragdest: doc improvements

5 years agoAdd a GtkDropTarget object
Matthias Clasen [Tue, 31 Dec 2019 06:54:43 +0000 (01:54 -0500)]
Add a GtkDropTarget object

Add an explicit GtkDropTarget object, and move the destination-side
DND signals here. The object is used by connecting to its signals
and attaching it to a widget with gtk_drop_target_attach().

5 years agoHook up the GtkDragSource docs
Matthias Clasen [Wed, 1 Jan 2020 19:08:14 +0000 (14:08 -0500)]
Hook up the GtkDragSource docs

5 years agoMove the rest of the drag-source api over
Matthias Clasen [Wed, 1 Jan 2020 18:22:29 +0000 (13:22 -0500)]
Move the rest of the drag-source api over

Just reshuffling some source.

5 years agodocs: Mention DND in the migration guide
Matthias Clasen [Wed, 1 Jan 2020 17:55:21 +0000 (12:55 -0500)]
docs: Mention DND in the migration guide

5 years agoRemove traditional drag source API
Matthias Clasen [Wed, 1 Jan 2020 07:25:18 +0000 (02:25 -0500)]
Remove traditional drag source API

gtk_drag_source_set, gtk_drag_begin, related apis
and the GtkWidget source-side signals have all been
replaced by GtkDragSource.

5 years agotests: Convert to GtkDragSource
Matthias Clasen [Wed, 1 Jan 2020 02:10:15 +0000 (21:10 -0500)]
tests: Convert to GtkDragSource

Some tests, such as testimage did not have
anything particularly worth keeping, so
were removed instead of fixed.

5 years agonotebook: Port to GtkDragSource
Matthias Clasen [Tue, 31 Dec 2019 22:02:59 +0000 (17:02 -0500)]
notebook: Port to GtkDragSource

5 years agofilechooser: Port to GtkDragSource
Matthias Clasen [Wed, 1 Jan 2020 07:24:50 +0000 (02:24 -0500)]
filechooser: Port to GtkDragSource

5 years agotreeview: Port to GtkDragSource
Matthias Clasen [Tue, 31 Dec 2019 22:05:24 +0000 (17:05 -0500)]
treeview: Port to GtkDragSource

A small api change here is that
gtk_tree_view_enable_model_drag_source now returns
a GtkDragSource that can be used to connect signals.

5 years agoplacessidebar: Port to GtkDragSource
Matthias Clasen [Wed, 1 Jan 2020 06:44:01 +0000 (01:44 -0500)]
placessidebar: Port to GtkDragSource

5 years agoiconview: Port to GtkDragSource
Matthias Clasen [Tue, 31 Dec 2019 22:04:01 +0000 (17:04 -0500)]
iconview: Port to GtkDragSource

A small api change here is that
gtk_icon_view_enable_model_drag_source now returns
a GtkDragSource that can be used to connect signals.

5 years agoAdd another callback-based provider
Matthias Clasen [Wed, 1 Jan 2020 06:25:02 +0000 (01:25 -0500)]
Add another callback-based provider

This one can be used in cases where data needs
to be served in multiple formats that may not
all be covered by content serializers.

5 years agoiconbrowser: Port to GtkDragSource
Matthias Clasen [Wed, 1 Jan 2020 02:06:43 +0000 (21:06 -0500)]
iconbrowser: Port to GtkDragSource

5 years agogtk-demo: Convert the clipboard demo to GtkDragSource
Matthias Clasen [Wed, 1 Jan 2020 01:30:32 +0000 (20:30 -0500)]
gtk-demo: Convert the clipboard demo to GtkDragSource

5 years agopathbar: Convert to GtkDragSource
Matthias Clasen [Tue, 31 Dec 2019 18:13:17 +0000 (13:13 -0500)]
pathbar: Convert to GtkDragSource

5 years agocolorswatch: Convert to GtkDragSource
Matthias Clasen [Tue, 31 Dec 2019 16:58:27 +0000 (11:58 -0500)]
colorswatch: Convert to GtkDragSource

5 years agocolorbutton: Port to GtkDragSource
Matthias Clasen [Tue, 31 Dec 2019 15:11:37 +0000 (10:11 -0500)]
colorbutton: Port to GtkDragSource

5 years agoAdd a generic callback content provider
Matthias Clasen [Tue, 31 Dec 2019 16:48:22 +0000 (11:48 -0500)]
Add a generic callback content provider

This one is convenient to use in cases where a
drag is just serving an existing GType which
is covered by content serializers.

5 years agoAdd (de)serializers for GdkRGBA
Matthias Clasen [Tue, 31 Dec 2019 15:10:49 +0000 (10:10 -0500)]
Add (de)serializers for GdkRGBA

This is a format that we use in various
color picker widgets, so support it in GDK.

5 years agotextview: Port to GtkDragSource
Matthias Clasen [Tue, 31 Dec 2019 14:24:13 +0000 (09:24 -0500)]
textview: Port to GtkDragSource

5 years agotextbuffer: Add a content provider api
Matthias Clasen [Tue, 31 Dec 2019 14:23:25 +0000 (09:23 -0500)]
textbuffer: Add a content provider api

We need a content provider for the selection,
to implement DND, and the text buffer already
has one. Just add an api to get it.

5 years agotext: Convert to GtkDragSource
Matthias Clasen [Tue, 31 Dec 2019 13:20:54 +0000 (08:20 -0500)]
text: Convert to GtkDragSource

5 years agoentry: Port icon dnd to GtkDragSource
Matthias Clasen [Tue, 31 Dec 2019 07:45:02 +0000 (02:45 -0500)]
entry: Port icon dnd to GtkDragSource

This requires a small change in the api,
since we need to provide a GdkContentProvider now.

5 years agocalendar: Port to GtkDragSource
Matthias Clasen [Tue, 31 Dec 2019 07:20:49 +0000 (02:20 -0500)]
calendar: Port to GtkDragSource

5 years agolinkbutton: Port to GtkDragSource
Matthias Clasen [Tue, 31 Dec 2019 03:34:50 +0000 (22:34 -0500)]
linkbutton: Port to GtkDragSource

5 years agolabel: Port to GtkDragSource
Matthias Clasen [Tue, 31 Dec 2019 02:43:22 +0000 (21:43 -0500)]
label: Port to GtkDragSource

5 years agodnd: Patch up gtk_drag_get_source_widget
Matthias Clasen [Tue, 31 Dec 2019 22:01:09 +0000 (17:01 -0500)]
dnd: Patch up gtk_drag_get_source_widget

This is temporary until gtk_drag_dest_set users
have been ported over.

5 years agoAdd a GtkDragSource object
Matthias Clasen [Mon, 30 Dec 2019 19:12:08 +0000 (14:12 -0500)]
Add a GtkDragSource object

Add an explicit GtkDragSource object, and move the source-side
DND signals here. The object can be used on the spot, by calling
gtk_drag_source_drag_begin() yourself, or for static drag-source
configuration, by calling gtk_drag_source_attach(). In the latter
case, we set up and conect a drag gesture to trigger the drag_begin
call.

5 years agomarshalers: Add another
Matthias Clasen [Wed, 1 Jan 2020 18:50:25 +0000 (13:50 -0500)]
marshalers: Add another

5 years agorename CODE-OWNERS to CODEOWNERS
Timm Bäder [Wed, 8 Jan 2020 19:59:11 +0000 (20:59 +0100)]
rename CODE-OWNERS to CODEOWNERS

gitlab reads the new filename but not the old one.

5 years agoMerge branch 'fixed-fixed' into 'master'
Emmanuele Bassi [Wed, 8 Jan 2020 15:46:19 +0000 (15:46 +0000)]
Merge branch 'fixed-fixed' into 'master'

fixed layout: Actually set child transforms

See merge request GNOME/gtk!1292

5 years agofixed layout: Actually set child transforms
Matthias Clasen [Wed, 8 Jan 2020 15:34:04 +0000 (10:34 -0500)]
fixed layout: Actually set child transforms

The code was unintentionally appending to the
existing child transform, leading to ever-moving
children when you call gtk_fixed_put.

5 years agoMerge branch 'master-fix-set-functions' into 'master'
Alex Samorukov [Wed, 8 Jan 2020 14:15:45 +0000 (14:15 +0000)]
Merge branch 'master-fix-set-functions' into 'master'

quartz: impl_class->set_functions listed twice in the object

See merge request GNOME/gtk!1283

5 years agoimpl_class->set_functions listed twice in the object
Alex Samorukov [Wed, 8 Jan 2020 14:15:45 +0000 (14:15 +0000)]
impl_class->set_functions listed twice in the object

5 years agoMerge branch 'master-eventloop-fix' into 'master'
Alex Samorukov [Wed, 8 Jan 2020 14:10:06 +0000 (14:10 +0000)]
Merge branch 'master-eventloop-fix' into 'master'

Move `[NSApplication sharedApplication]` after event loop init to avoid window focus issues (closes #2342).

See merge request GNOME/gtk!1286

5 years agomove [NSApplication sharedApplication] after _gdk_quartz_events_init() to avoid initi...
Alex Samorukov [Wed, 8 Jan 2020 14:10:06 +0000 (14:10 +0000)]
move [NSApplication sharedApplication] after _gdk_quartz_events_init() to avoid initialization issues

(cherry picked from commit 46c2451c5a3cd42aa5a94935bfc850a484288ff3)

5 years agoMerge branch 'check-for-sincosf' into 'master'
Timm Bäder [Wed, 8 Jan 2020 09:27:51 +0000 (09:27 +0000)]
Merge branch 'check-for-sincosf' into 'master'

gsk/gsktransform.c: Fix building on non-GCC

See merge request GNOME/gtk!1291

5 years agobuild: Check for sincosf()
Chun-wei Fan [Wed, 8 Jan 2020 09:05:44 +0000 (17:05 +0800)]
build: Check for sincosf()

sincosf() is really a GCC-specific function that may more may not be
supported on non-GCC compilers, so we want to check for it, otherwise we
use a fallback implementation, not unlike the one in
demos/gtk-demo/gtkgears.c.

5 years agogl renderer: Handle repeat nodes with invisible children
Timm Bäder [Tue, 7 Jan 2020 16:15:02 +0000 (17:15 +0100)]
gl renderer: Handle repeat nodes with invisible children

We can handle this pretty easily by normally drawing the other
(visible) child node, if any.

5 years agotestsuite: Add a testcase for blend nodes with invisible children
Timm Bäder [Tue, 7 Jan 2020 16:14:32 +0000 (17:14 +0100)]
testsuite: Add a testcase for blend nodes with invisible children

5 years agosizerequest: Remove _gtk_widget_get_preferred_size_and_baseline
Timm Bäder [Mon, 6 Jan 2020 09:22:54 +0000 (10:22 +0100)]
sizerequest: Remove _gtk_widget_get_preferred_size_and_baseline

Private and unused function.

5 years agotransform: Properly compare scale transforms
Timm Bäder [Sat, 4 Jan 2020 07:54:58 +0000 (08:54 +0100)]
transform: Properly compare scale transforms

If the epsilon we use there is too much, we can run into rendering
errors because the GPU will use the actual scale value.

5 years agorendernodepaintable: ceil() bounds for intrinsic size
Timm Bäder [Fri, 3 Jan 2020 16:07:39 +0000 (17:07 +0100)]
rendernodepaintable: ceil() bounds for intrinsic size

Otherweise we floor() implicitly when casting to int, resulting in
slight scaling later.

5 years agolabel: Fix assumptions regaring link
Timm Bäder [Thu, 2 Jan 2020 13:05:30 +0000 (14:05 +0100)]
label: Fix assumptions regaring link

5 years agogltextureatlas: Packing must succeed here
Timm Bäder [Thu, 2 Jan 2020 13:03:21 +0000 (14:03 +0100)]
gltextureatlas: Packing must succeed here

5 years agoWindow: Avoid some redundant assignments
Timm Bäder [Thu, 2 Jan 2020 12:52:14 +0000 (13:52 +0100)]
Window: Avoid some redundant assignments

5 years agocolorswatch: Avoid redundant assignment
Timm Bäder [Thu, 2 Jan 2020 12:49:01 +0000 (13:49 +0100)]
colorswatch: Avoid redundant assignment

5 years agotransform: Scale+translate bounds directyl
Timm Bäder [Thu, 2 Jan 2020 09:28:08 +0000 (10:28 +0100)]
transform: Scale+translate bounds directyl

Make these two code paths look the same.

5 years agowidget: Use cssnode api to get the filter value
Timm Bäder [Thu, 2 Jan 2020 09:04:29 +0000 (10:04 +0100)]
widget: Use cssnode api to get the filter value

it's confusing that we use GtkStyleContext here while we use the CssNode
directly elsewhere.

5 years agotransform: Compare class before ->next
Timm Bäder [Tue, 31 Dec 2019 13:03:42 +0000 (14:03 +0100)]
transform: Compare class before ->next

5 years agosnapshot: Only normalize rectangle if we have to
Timm Bäder [Tue, 31 Dec 2019 07:54:42 +0000 (08:54 +0100)]
snapshot: Only normalize rectangle if we have to

We can even replace the comment this way.

5 years agobin: Move vfunc implementations before class_init
Timm Bäder [Tue, 31 Dec 2019 07:26:27 +0000 (08:26 +0100)]
bin: Move vfunc implementations before class_init

And avoid every single function prototype.

5 years agobin: Avoid some type checks
Timm Bäder [Tue, 31 Dec 2019 07:25:45 +0000 (08:25 +0100)]
bin: Avoid some type checks

5 years agogl renderer: Sprinkle some const around
Timm Bäder [Mon, 30 Dec 2019 11:59:01 +0000 (12:59 +0100)]
gl renderer: Sprinkle some const around

5 years agotext: Reset cursor opacity when unmapping
Timm Bäder [Mon, 30 Dec 2019 09:55:03 +0000 (10:55 +0100)]
text: Reset cursor opacity when unmapping

Otherwise we might get mapped again with a half-transparent cursor.

5 years agoscrolledwindow: Don't snapshot junction if we use indicators
Timm Bäder [Mon, 30 Dec 2019 09:47:53 +0000 (10:47 +0100)]
scrolledwindow: Don't snapshot junction if we use indicators

The junction doesn't make sense when we use indicators, since the
scrollbars overlap anyway. Not snappshotting it anymore has no visual
effect since it's being drawn below the scrollbars anyway.

5 years agocssimagelinear: Don't call get_start_end if !repeating
Timm Bäder [Mon, 30 Dec 2019 08:51:49 +0000 (09:51 +0100)]
cssimagelinear: Don't call get_start_end if !repeating

This makes it clear that the !repeating case is easier.

5 years agocssimagelinear: Avoid computing the length if we know it
Timm Bäder [Mon, 30 Dec 2019 08:46:15 +0000 (09:46 +0100)]
cssimagelinear: Avoid computing the length if we know it

We handlet the common easy cases manually anyway, so don't bother
sqrt()ing the x/y coords in those cases.

5 years agotoolitem: Remove unused members
Timm Bäder [Mon, 30 Dec 2019 08:16:18 +0000 (09:16 +0100)]
toolitem: Remove unused members

5 years agotoolitem: Plug memory leak
Timm Bäder [Mon, 30 Dec 2019 08:16:09 +0000 (09:16 +0100)]
toolitem: Plug memory leak

5 years agogl renderer: Add util to load vertex data with texture region
Timm Bäder [Sun, 29 Dec 2019 15:54:56 +0000 (16:54 +0100)]
gl renderer: Add util to load vertex data with texture region

5 years agogl renderer: Fix inverted dy in inset shadows
Timm Bäder [Sun, 29 Dec 2019 15:43:51 +0000 (16:43 +0100)]
gl renderer: Fix inverted dy in inset shadows

5 years agogsk: Add GskParseErrorFunc to the docs
Timm Bäder [Fri, 27 Dec 2019 07:30:28 +0000 (08:30 +0100)]
gsk: Add GskParseErrorFunc to the docs

5 years agogl renderer: Avoid another manual rounded rect transform
Timm Bäder [Sun, 22 Dec 2019 14:53:46 +0000 (15:53 +0100)]
gl renderer: Avoid another manual rounded rect transform

We have transform_rect() for this now.

5 years agoadwaita: Solve junction problem without border image
Timm Bäder [Sun, 22 Dec 2019 10:40:30 +0000 (11:40 +0100)]
adwaita: Solve junction problem without border image

This genius piece of CSS colors only the top left (or top right in RTL)
pixel of the scrollbar junction.
Doing it this way is better because we don't have to upload a cairo node
every frame.

5 years agoscrolledwindow: Remove a useless local variable
Timm Bäder [Sun, 22 Dec 2019 09:48:58 +0000 (10:48 +0100)]
scrolledwindow: Remove a useless local variable

5 years agoscrolledwindow: Avoid using gtk_widget_get_preferred_size
Timm Bäder [Sun, 22 Dec 2019 09:42:51 +0000 (10:42 +0100)]
scrolledwindow: Avoid using gtk_widget_get_preferred_size

This way we only measure in the direction we need.

5 years agogl renderer: Don't force repeat node child offscreen
Timm Bäder [Sat, 21 Dec 2019 21:03:53 +0000 (22:03 +0100)]
gl renderer: Don't force repeat node child offscreen

5 years agorenderborder: Only get border width if we really need to
Timm Bäder [Fri, 20 Dec 2019 19:56:28 +0000 (20:56 +0100)]
renderborder: Only get border width if we really need to

We did this unconditionally before the if statement, but we don't need
to do it if any of the early-out checks in the not-border-image branch
hits.

5 years agogl renderer: Fix a misleading comment
Timm Bäder [Fri, 20 Dec 2019 19:38:42 +0000 (20:38 +0100)]
gl renderer: Fix a misleading comment

5 years agogl renderer: Speed up bounds transformation
Timm Bäder [Fri, 20 Dec 2019 19:31:37 +0000 (20:31 +0100)]
gl renderer: Speed up bounds transformation

We started saving the scale of the current modelview directly in the
RenderOpBuilder, so we don't need to poke the modelview stack anymore.

5 years agogl renderer: Add debug code for color nodes
Timm Bäder [Fri, 20 Dec 2019 11:30:39 +0000 (12:30 +0100)]
gl renderer: Add debug code for color nodes

5 years agogl renderer: Trivial variable reordering
Timm Bäder [Fri, 20 Dec 2019 11:21:26 +0000 (12:21 +0100)]
gl renderer: Trivial variable reordering

5 years agogl renderer: transform border outline like everything else
Timm Bäder [Fri, 20 Dec 2019 11:21:04 +0000 (12:21 +0100)]
gl renderer: transform border outline like everything else

5 years agogl renderer: Move work to the blur vertex shader
Timm Bäder [Fri, 20 Dec 2019 10:43:33 +0000 (11:43 +0100)]
gl renderer: Move work to the blur vertex shader

5 years agogl renderer: Avoid copying a matrix
Timm Bäder [Thu, 19 Dec 2019 12:03:22 +0000 (13:03 +0100)]
gl renderer: Avoid copying a matrix

5 years agotestsuite: Add a test case for rotated border node
Timm Bäder [Thu, 19 Dec 2019 11:37:57 +0000 (12:37 +0100)]
testsuite: Add a test case for rotated border node

5 years agoGskTransform: Compute sin/deg of 90deg rotations manually
Timm Bäder [Thu, 19 Dec 2019 11:30:08 +0000 (12:30 +0100)]
GskTransform: Compute sin/deg of 90deg rotations manually

Otherwise we might end up with inaccuracies, e.g. when
gsk_transform_transform_bounds()'ing bounds.

5 years agoGskTransform: Normalize angles
Timm Bäder [Thu, 19 Dec 2019 11:29:33 +0000 (12:29 +0100)]
GskTransform: Normalize angles

Make sure all angles are in the [0..365) range

5 years agosnapshot: Repeat color nodes by creating a larger color node
Timm Bäder [Thu, 19 Dec 2019 08:15:13 +0000 (09:15 +0100)]
snapshot: Repeat color nodes by creating a larger color node

5 years agogl renderer: Print debug node message
Timm Bäder [Thu, 19 Dec 2019 05:05:01 +0000 (06:05 +0100)]
gl renderer: Print debug node message

5 years agogl driver: Inline function into only caller
Timm Bäder [Thu, 19 Dec 2019 04:32:25 +0000 (05:32 +0100)]
gl driver: Inline function into only caller

5 years agorenderbackground: Try to omit a save/restore pair
Timm Bäder [Wed, 18 Dec 2019 10:43:26 +0000 (11:43 +0100)]
renderbackground: Try to omit a save/restore pair