-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from JuliaGtk/gtk4
port to Gtk4
- Loading branch information
Showing
9 changed files
with
3,719 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using GtkSourceWidget, Gtk4 | ||
|
||
win=GtkWindow("test",400,400) | ||
sv = GtkSourceView() | ||
win[] = sv | ||
|
||
buff = sv.buffer | ||
langman = GtkSourceLanguageManager() | ||
lang = GtkSourceWidget.language(langman,"julia") | ||
buff.text = open("simple.jl","r") do f | ||
read(f,String) | ||
end | ||
GtkSourceWidget.G_.set_language(buff,lang) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
using GI | ||
GI.prepend_search_path("/usr/lib64/girepository-1.0") | ||
GI.prepend_search_path("/usr/local/lib64/girepository-1.0") | ||
|
||
toplevel, exprs, exports = GI.output_exprs() | ||
|
||
path="../src/gen" | ||
|
||
ns = GINamespace(:GtkSource,"5") | ||
|
||
## constants, enums, and flags | ||
|
||
const_mod = Expr(:block) | ||
|
||
const_exports = Expr(:export) | ||
|
||
c = GI.all_const_exprs!(const_mod, const_exports, ns; skiplist= []) | ||
push!(const_mod.args, const_exports) | ||
|
||
push!(exprs, const_mod) | ||
|
||
## export constants, enums, and flags code | ||
GI.write_to_file(path,"gtksourceview_consts",toplevel) | ||
|
||
## structs and objects | ||
|
||
toplevel, exprs, exports = GI.output_exprs() | ||
GI.struct_cache_expr!(exprs) | ||
GI.all_interfaces!(exprs,exports,ns;skiplist=[]) | ||
GI.all_objects!(exprs,exports,ns,skiplist=[],constructor_skiplist=[]) | ||
|
||
disguised = [] | ||
special = [] | ||
struct_skiplist=vcat(disguised, special, []) | ||
|
||
struct_skiplist = GI.all_struct_exprs!(exprs,exports,ns;excludelist=struct_skiplist) | ||
GI.all_callbacks!(exprs, exports, ns) | ||
|
||
push!(exprs,exports) | ||
|
||
GI.write_to_file(path,"gtksourceview_structs",toplevel) | ||
|
||
## struct methods | ||
|
||
toplevel, exprs, exports = GI.output_exprs() | ||
|
||
GI.all_struct_methods!(exprs,ns,struct_skiplist=vcat(struct_skiplist,[]);print_detailed=true) | ||
|
||
## object methods | ||
|
||
objects=GI.get_all(ns,GI.GIObjectInfo) | ||
|
||
object_skiplist=[] | ||
|
||
skiplist=[:get_default] | ||
|
||
GI.all_object_methods!(exprs,ns;skiplist=skiplist,object_skiplist=object_skiplist,interface_helpers=false) | ||
GI.all_interface_methods!(exprs,ns;skiplist=[],interface_skiplist=[]) | ||
|
||
GI.write_to_file(path,"gtksourceview_methods",toplevel) | ||
|
||
## functions | ||
|
||
toplevel, exprs, exports = GI.output_exprs() | ||
|
||
GI.all_functions!(exprs,ns,skiplist=skiplist) | ||
|
||
GI.write_to_file(path,"gtksourceview_functions",toplevel) |
Oops, something went wrong.