Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow Colors 0.13 #72

Merged
merged 3 commits into from
Oct 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "GtkObservables"
uuid = "8710efd8-4ad6-11eb-33ea-2d5ceb25a41c"
version = "2.1.3"
version = "2.1.4"

[deps]
Cairo = "159f3aea-2a34-519c-b102-8c37f9878175"
Expand All @@ -18,7 +18,7 @@ RoundingIntegers = "d5f540fe-1c90-5db3-b776-2e2f362d9394"

[compat]
Cairo = "1"
Colors = "0.12"
Colors = "0.12, 0.13"
Dates = "1.6"
FixedPointNumbers = "0.8"
Graphics = "1"
Expand Down
34 changes: 21 additions & 13 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -414,13 +414,17 @@ end
lastevent[] = "nothing"
@test lastevent[] == "nothing"
ec = find_gesture_click(widget(c))
signal_emit(ec, "pressed", Nothing, Int32(1), 0.0, 0.0)
sleep(0.1)
@test lastevent[] == "press"
signal_emit(ec, "released", Nothing, Int32(1), 0.0, 0.0)
sleep(0.1)
sleep(0.1)
@test lastevent[] == "release"
if ec !== nothing
signal_emit(ec, "pressed", Nothing, Int32(1), 0.0, 0.0)
sleep(0.1)
@test lastevent[] == "press"
signal_emit(ec, "released", Nothing, Int32(1), 0.0, 0.0)
sleep(0.1)
sleep(0.1)
@test lastevent[] == "release"
else
@warn("Didn't find click controller, some tests skipped.")
end
ec = Gtk4.find_controller(widget(c), GtkEventControllerScroll)
signal_emit(ec, "scroll", Bool, 1.0, 0.0)
sleep(0.1)
Expand Down Expand Up @@ -456,12 +460,16 @@ end
yield()
@test !popuptriggered[]
ec = find_gesture_click(widget(c))
signal_emit(ec, "pressed", Nothing, Int32(1), 0.0, 0.0)
yield()
@test !popuptriggered[]
modifier[] = Gtk4.ModifierType_BUTTON3_MASK
signal_emit(ec, "pressed", Nothing, Int32(1), 0.0, 0.0)
@test popuptriggered[] # this requires simulating a right click, which might require constructing a GdkEvent structure
if ec !== nothing
signal_emit(ec, "pressed", Nothing, Int32(1), 0.0, 0.0)
yield()
@test !popuptriggered[]
modifier[] = Gtk4.ModifierType_BUTTON3_MASK
signal_emit(ec, "pressed", Nothing, Int32(1), 0.0, 0.0)
@test popuptriggered[] # this requires simulating a right click, which might require constructing a GdkEvent structure
else
@warn("Didn't find click controller, some tests skipped.")
end
Gtk4.destroy(win)
end

Expand Down
Loading