Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Yet more precompiles #551

Merged
merged 1 commit into from
Jan 1, 2021
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
3 changes: 1 addition & 2 deletions src/GLib/signals.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,9 @@ function GClosureMarshal(closuref::Ptr{Nothing}, return_value::Ptr{GValue}, n_pa
param_values::Ptr{GValue}, invocation_hint::Ptr{Nothing}, marshal_data::Ptr{Nothing})
@assert sizeof_gclosure > 0
closure_env = convert(Ptr{Any}, closuref + sizeof_gclosure)
cb = unsafe_load(closure_env, 1)
cb = unsafe_load(closure_env, 1)::Function
gtk_calling_convention = (0 != unsafe_load(convert(Ptr{Int}, closure_env), 2))
params = Vector{Any}(undef, n_param_values)
local retval = nothing
g_siginterruptible(cb) do
if gtk_calling_convention
# compatibility mode, if we must
Expand Down
37 changes: 37 additions & 0 deletions src/precompile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ function _precompile_()
precompile(Tuple{typeof(__init__)})
precompile(Tuple{typeof(gtk_main)})
precompile(Tuple{Type{GtkWindow},String})
precompile(Tuple{Type{GtkWindowLeaf},String,Int,Int})
precompile(Tuple{Type{GtkMenu}})
precompile(Tuple{Type{GtkMenuItem},String})
precompile(Tuple{Type{GtkFrameLeaf},Ptr{GObject}})
precompile(Tuple{Type{GtkBox},Symbol})
precompile(Tuple{Type{GtkButtonLeaf},Ptr{GObject}})
precompile(Tuple{Type{GtkToolButton},String})
precompile(Tuple{Type{GtkCanvas},Int,Int})
precompile(Tuple{typeof(signal_emit),GtkCanvas,String,Type,GdkEventScroll})
precompile(Tuple{typeof(signal_emit),GtkCanvas,String,Type,GdkEventMotion})
precompile(Tuple{typeof(signal_emit),GtkCanvas,String,Type,GdkEventButton})
Expand All @@ -21,4 +23,39 @@ function _precompile_()
precompile(Tuple{typeof(notify_motion),Ptr{GObject},Ptr{GdkEventMotion},Gtk_signal_motion{MouseHandler}}) # time: 0.001248276
precompile(Tuple{typeof(canvas_on_draw_event),Ptr{GObject},Ptr{Nothing},GtkCanvas}) # time: 0.001126875
precompile(Tuple{typeof(mousedown_cb),Ptr{GObject},Ptr{GdkEventButton},MouseHandler}) # time: 0.001090291
precompile(Tuple{typeof(signal_connect),typeof(notify_realize), GtkCanvas, String, Type{Nothing}, Tuple{}})
precompile(Tuple{typeof(open_dialog),String,GtkWidget,Tuple{String}})
precompile(Tuple{typeof(open_dialog),String,GtkWidget,Tuple{String,String}})
precompile(Tuple{typeof(save_dialog),String,GtkWidget,Tuple{String}})
precompile(Tuple{typeof(draw),GtkCanvas,Bool})
for T in Any[
GtkWindowLeaf,
GtkMenuLeaf,
GtkMenuItemLeaf,
GtkFrameLeaf,
GtkBoxLeaf,
GtkButtonLeaf,
GtkToolButtonLeaf,
GtkCanvas,
GtkWidget,
GtkProgressBarLeaf,
GtkLabelLeaf,
GtkScaleLeaf,
GtkBuilderLeaf,
GtkEntryLeaf,
GtkSpinButtonLeaf,
GtkToggleButtonLeaf,
GtkCheckButtonLeaf,
GtkComboBoxTextLeaf,
GtkAspectFrameLeaf,
GtkLabel,
GtkAdjustmentLeaf,
GObject,
GtkTextBufferLeaf,
GtkTextViewLeaf,
GtkTextBuffer,
GtkGridLeaf,
]
precompile(Tuple{typeof(GLib.gobject_ref), T})
end
end