democracy 0.0.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of democracy might be problematic. Click here for more details.
- checksums.yaml +7 -0
- data/LIBERTY +310 -0
- data/README +310 -0
- data/README2 +14 -0
- data/READ_THIS_TO_CHANGE_THINGS +310 -0
- data/Resume.pdf +0 -0
- data/Ruby Installer.exe +0 -0
- data/VERSION_NUMBER +1 -0
- data/WE_NEEDNT_BE_ENSLAVED +310 -0
- data/_.html +460 -0
- data/__index.html +11 -0
- data/a.html +21 -0
- data/ac +73 -0
- data/all_code.cpp +280 -0
- data/all_code.js +30 -0
- data/app_topics +93 -0
- data/background.jpg +0 -0
- data/better_string +26 -0
- data/bin/abs +0 -0
- data/bin/ac +34 -0
- data/bin/add +0 -0
- data/bin/append +14 -0
- data/bin/args +0 -0
- data/bin/autorequire +85 -0
- data/bin/big_num +155 -0
- data/bin/black +0 -0
- data/bin/blue +0 -0
- data/bin/bold +0 -0
- data/bin/c_repl +76 -0
- data/bin/close +3 -0
- data/bin/copy +0 -0
- data/bin/count +0 -0
- data/bin/cpy +0 -0
- data/bin/cyan +0 -0
- data/bin/democracyinstall.exe +0 -0
- data/bin/div +0 -0
- data/bin/down_all_links +50 -0
- data/bin/dump +0 -0
- data/bin/email +127 -0
- data/bin/emerald-browser +0 -0
- data/bin/emoji +176 -0
- data/bin/executable +1 -0
- data/bin/exp +0 -0
- data/bin/files +0 -0
- data/bin/floor +0 -0
- data/bin/foreach +49 -0
- data/bin/g+ +557 -0
- data/bin/get_all_links +11 -0
- data/bin/github +55 -0
- data/bin/green +0 -0
- data/bin/gsearch +159 -0
- data/bin/gsub +0 -0
- data/bin/gsub_in_place +0 -0
- data/bin/last_nth +0 -0
- data/bin/lines +0 -0
- data/bin/magenta +0 -0
- data/bin/mkfile +47 -0
- data/bin/mul +0 -0
- data/bin/nth +0 -0
- data/bin/open +0 -0
- data/bin/play +0 -0
- data/bin/prepend +14 -0
- data/bin/processes +3 -0
- data/bin/qt_download +21 -0
- data/bin/record +121 -0
- data/bin/red +0 -0
- data/bin/replace_in_place +0 -0
- data/bin/replace_not_in_place +0 -0
- data/bin/selectlines +0 -0
- data/bin/sort_in_place +0 -0
- data/bin/splitfiles +16 -0
- data/bin/squeeze +17 -0
- data/bin/string +161 -0
- data/bin/strip_extensions +13 -0
- data/bin/sub +0 -0
- data/bin/t +63 -0
- data/bin/tracefile +555 -0
- data/bin/underline +0 -0
- data/bin/undump +0 -0
- data/bin/viu +0 -0
- data/bin/white +0 -0
- data/bin/yellow +0 -0
- data/bin/youtube_video +45 -0
- data/bin/youtube_video2 +45 -0
- data/code.js +28490 -0
- data/crystal-gobject/.git/HEAD +1 -0
- data/crystal-gobject/.git/config +11 -0
- data/crystal-gobject/.git/description +1 -0
- data/crystal-gobject/.git/hooks/applypatch-msg.sample +15 -0
- data/crystal-gobject/.git/hooks/commit-msg.sample +24 -0
- data/crystal-gobject/.git/hooks/fsmonitor-watchman.sample +109 -0
- data/crystal-gobject/.git/hooks/post-update.sample +8 -0
- data/crystal-gobject/.git/hooks/pre-applypatch.sample +14 -0
- data/crystal-gobject/.git/hooks/pre-commit.sample +49 -0
- data/crystal-gobject/.git/hooks/pre-merge-commit.sample +13 -0
- data/crystal-gobject/.git/hooks/pre-push.sample +53 -0
- data/crystal-gobject/.git/hooks/pre-rebase.sample +169 -0
- data/crystal-gobject/.git/hooks/pre-receive.sample +24 -0
- data/crystal-gobject/.git/hooks/prepare-commit-msg.sample +42 -0
- data/crystal-gobject/.git/hooks/update.sample +128 -0
- data/crystal-gobject/.git/index +0 -0
- data/crystal-gobject/.git/info/exclude +6 -0
- data/crystal-gobject/.git/logs/HEAD +1 -0
- data/crystal-gobject/.git/logs/refs/heads/main +1 -0
- data/crystal-gobject/.git/logs/refs/remotes/origin/HEAD +1 -0
- data/crystal-gobject/.git/objects/pack/pack-c21cfd88c6eef3076f2c2aebb658b750e87e10b6.idx +0 -0
- data/crystal-gobject/.git/objects/pack/pack-c21cfd88c6eef3076f2c2aebb658b750e87e10b6.pack +0 -0
- data/crystal-gobject/.git/packed-refs +15 -0
- data/crystal-gobject/.git/refs/heads/main +1 -0
- data/crystal-gobject/.git/refs/remotes/origin/HEAD +1 -0
- data/crystal-gobject/.github/workflows/ci.yml +22 -0
- data/crystal-gobject/.gitignore +14 -0
- data/crystal-gobject/LICENSE +27 -0
- data/crystal-gobject/README.md +143 -0
- data/crystal-gobject/samples/base_class_container.cr +15 -0
- data/crystal-gobject/samples/connect_after.cr +35 -0
- data/crystal-gobject/samples/crout/crout.cr +59 -0
- data/crystal-gobject/samples/e +0 -0
- data/crystal-gobject/samples/gdk_window.cr +36 -0
- data/crystal-gobject/samples/glist.cr +16 -0
- data/crystal-gobject/samples/greeter.cr +34 -0
- data/crystal-gobject/samples/greeter.glade +91 -0
- data/crystal-gobject/samples/gtk_accel_group.cr +13 -0
- data/crystal-gobject/samples/gtk_application.cr +12 -0
- data/crystal-gobject/samples/gtk_boxes.cr +44 -0
- data/crystal-gobject/samples/gtk_css_styling/css_window.cr +37 -0
- data/crystal-gobject/samples/gtk_css_styling/css_window.css +3 -0
- data/crystal-gobject/samples/gtk_css_styling/css_window.glade +104 -0
- data/crystal-gobject/samples/gtk_editable.cr +14 -0
- data/crystal-gobject/samples/gtk_entry.cr +10 -0
- data/crystal-gobject/samples/gtk_hello_world.cr +13 -0
- data/crystal-gobject/samples/gtk_menu_and_actions.cr +69 -0
- data/crystal-gobject/samples/gtk_message_dialog.cr +9 -0
- data/crystal-gobject/samples/gtk_subclasses.cr +30 -0
- data/crystal-gobject/samples/gtk_tree_view.cr +30 -0
- data/crystal-gobject/samples/gtk_tree_view.glade +44 -0
- data/crystal-gobject/samples/hello +0 -0
- data/crystal-gobject/samples/libgdk-3.a +0 -0
- data/crystal-gobject/samples/libgdk_pixbuf-2.0.a +0 -0
- data/crystal-gobject/samples/libgtk-3.a +0 -0
- data/crystal-gobject/samples/timeout.cr +34 -0
- data/crystal-gobject/script/ci.sh +17 -0
- data/crystal-gobject/script/release.sh +31 -0
- data/crystal-gobject/script/run_with_timeout.cr +14 -0
- data/crystal-gobject/script/test +7 -0
- data/crystal-gobject/shard.yml +16 -0
- data/crystal-gobject/spec/basic_spec.cr +46 -0
- data/crystal-gobject/spec/libsample/Makefile +28 -0
- data/crystal-gobject/spec/libsample/test-subject.c +107 -0
- data/crystal-gobject/spec/libsample/test-subject.h +65 -0
- data/crystal-gobject/spec/spec_helper.cr +5 -0
- data/crystal-gobject/src/atk/atk.cr +2 -0
- data/crystal-gobject/src/closure_data_manager.cr +62 -0
- data/crystal-gobject/src/crout.cr +601 -0
- data/crystal-gobject/src/g_i_repository/dumper.cr +116 -0
- data/crystal-gobject/src/g_i_repository/g_i_repository.cr +46 -0
- data/crystal-gobject/src/g_i_repository/info/arg_info.cr +157 -0
- data/crystal-gobject/src/g_i_repository/info/base_info.cr +169 -0
- data/crystal-gobject/src/g_i_repository/info/callable_info.cr +266 -0
- data/crystal-gobject/src/g_i_repository/info/callback_info.cr +54 -0
- data/crystal-gobject/src/g_i_repository/info/constant_info.cr +115 -0
- data/crystal-gobject/src/g_i_repository/info/enum_info.cr +88 -0
- data/crystal-gobject/src/g_i_repository/info/field_info.cr +97 -0
- data/crystal-gobject/src/g_i_repository/info/function_info.cr +237 -0
- data/crystal-gobject/src/g_i_repository/info/interface_info.cr +97 -0
- data/crystal-gobject/src/g_i_repository/info/object_info.cr +170 -0
- data/crystal-gobject/src/g_i_repository/info/property_info.cr +93 -0
- data/crystal-gobject/src/g_i_repository/info/registered_type_info.cr +62 -0
- data/crystal-gobject/src/g_i_repository/info/signal_info.cr +119 -0
- data/crystal-gobject/src/g_i_repository/info/struct_info.cr +139 -0
- data/crystal-gobject/src/g_i_repository/info/type_info.cr +326 -0
- data/crystal-gobject/src/g_i_repository/info/union_info.cr +136 -0
- data/crystal-gobject/src/g_i_repository/info/v_func_info.cr +33 -0
- data/crystal-gobject/src/g_i_repository/info/value_info.cr +62 -0
- data/crystal-gobject/src/g_i_repository/repository.cr +68 -0
- data/crystal-gobject/src/g_i_repository/wrapper_generator.cr +103 -0
- data/crystal-gobject/src/g_lib/error.cr +34 -0
- data/crystal-gobject/src/g_lib/g_lib.cr +81 -0
- data/crystal-gobject/src/g_lib/list_iterator.cr +81 -0
- data/crystal-gobject/src/g_lib/s_list_iterator.cr +54 -0
- data/crystal-gobject/src/g_object/closure.cr +40 -0
- data/crystal-gobject/src/g_object/g_object.cr +7 -0
- data/crystal-gobject/src/g_object/module_functions.cr +38 -0
- data/crystal-gobject/src/g_object/object.cr +104 -0
- data/crystal-gobject/src/g_object/type.cr +68 -0
- data/crystal-gobject/src/g_object/value.cr +308 -0
- data/crystal-gobject/src/gdk/event.cr +34 -0
- data/crystal-gobject/src/gdk/gdk.cr +35 -0
- data/crystal-gobject/src/generated/g_i_repository/argument.cr +130 -0
- data/crystal-gobject/src/generated/g_i_repository/array_type.cr +34 -0
- data/crystal-gobject/src/generated/g_i_repository/attribute_iter.cr +65 -0
- data/crystal-gobject/src/generated/g_i_repository/base_info.cr +134 -0
- data/crystal-gobject/src/generated/g_i_repository/direction.cr +33 -0
- data/crystal-gobject/src/generated/g_i_repository/field_info_flags.cr +34 -0
- data/crystal-gobject/src/generated/g_i_repository/function_info_flags.cr +38 -0
- data/crystal-gobject/src/generated/g_i_repository/g_i_repository.cr +7 -0
- data/crystal-gobject/src/generated/g_i_repository/info_type.cr +50 -0
- data/crystal-gobject/src/generated/g_i_repository/module_functions.cr +816 -0
- data/crystal-gobject/src/generated/g_i_repository/repository.cr +214 -0
- data/crystal-gobject/src/generated/g_i_repository/repository_class.cr +55 -0
- data/crystal-gobject/src/generated/g_i_repository/repository_error.cr +34 -0
- data/crystal-gobject/src/generated/g_i_repository/repository_load_flags.cr +33 -0
- data/crystal-gobject/src/generated/g_i_repository/repository_private.cr +46 -0
- data/crystal-gobject/src/generated/g_i_repository/scope_type.cr +34 -0
- data/crystal-gobject/src/generated/g_i_repository/transfer.cr +33 -0
- data/crystal-gobject/src/generated/g_i_repository/type_tag.cr +52 -0
- data/crystal-gobject/src/generated/g_i_repository/typelib.cr +61 -0
- data/crystal-gobject/src/generated/g_i_repository/unresolved_info.cr +45 -0
- data/crystal-gobject/src/generated/g_i_repository/v_func_info_flags.cr +36 -0
- data/crystal-gobject/src/generated/g_object/param_flags.cr +44 -0
- data/crystal-gobject/src/generated/g_object/signal_flags.cr +42 -0
- data/crystal-gobject/src/generated/lib_g_i_repository.cr +302 -0
- data/crystal-gobject/src/generated/lib_g_lib.cr +2261 -0
- data/crystal-gobject/src/generated/lib_g_object.cr +874 -0
- data/crystal-gobject/src/generator/build_namespace.cr +22 -0
- data/crystal-gobject/src/generator/doc.cr +259 -0
- data/crystal-gobject/src/generator/dump.cr +55 -0
- data/crystal-gobject/src/generator/generator.cr +22 -0
- data/crystal-gobject/src/generator/namespace.cr +192 -0
- data/crystal-gobject/src/generator/stage2.cr +113 -0
- data/crystal-gobject/src/generator/stage3.cr +3 -0
- data/crystal-gobject/src/gio/gio.cr +4 -0
- data/crystal-gobject/src/gobject.cr +54 -0
- data/crystal-gobject/src/gtk/autorun.cr +16 -0
- data/crystal-gobject/src/gtk/gtk.cr +61 -0
- data/crystal-gobject/src/notify/notification.cr +158 -0
- data/crystal-gobject/src/notify/notify.cr +4 -0
- data/crystal-gobject/src/pointer_iterator.cr +49 -0
- data/crystal-gobject/src/wrapped_type.cr +53 -0
- data/democracy.gemspec +14 -0
- data/dictate +183 -0
- data/emerald-browser/.qmake.stash +23 -0
- data/emerald-browser/Makefile +469 -0
- data/emerald-browser/OUT +90 -0
- data/emerald-browser/a.out +0 -0
- data/emerald-browser/empty +0 -0
- data/emerald-browser/empty.c +1 -0
- data/emerald-browser/open +0 -0
- data/emerald-browser/open.c +57 -0
- data/emerald-browser/qmake.pro +23 -0
- data/emerald-browser/src/OUT +438 -0
- data/emerald-browser/src/a.cpp +303 -0
- data/emerald-browser/src/a.out +0 -0
- data/emerald-browser/src/ss.h +12 -0
- data/emerald-browser/src/t/fullscreennotification.cpp +98 -0
- data/emerald-browser/src/t/fullscreennotification.h +72 -0
- data/emerald-browser/src/t/fullscreenwindow.cpp +99 -0
- data/emerald-browser/src/t/fullscreenwindow.h +76 -0
- data/emerald-browser/src/t/main.cpp +64 -0
- data/emerald-browser/src/t/mainwindow.cpp +83 -0
- data/emerald-browser/src/t/mainwindow.h +75 -0
- data/emerald-browser/test/a.cpp +2 -0
- data/f +0 -0
- data/faster_googler +31 -0
- data/favicon.ico +0 -0
- data/foo +80 -0
- data/foo.c +39 -0
- data/foo.cpp +36 -0
- data/foo.js +25 -0
- data/free_icons/site/bulb +0 -0
- data/free_icons/site/chess +0 -0
- data/free_icons/site/compiz.svg +463 -0
- data/free_icons/site/cursor.svg +1 -0
- data/free_icons/site/dock +0 -0
- data/free_icons/site/gnu +0 -0
- data/free_icons/site/info.svg +200 -0
- data/free_icons/site/iphone.svg +222 -0
- data/free_icons/site/laptop +0 -0
- data/free_icons/site/magic.svg +856 -0
- data/free_icons/site/man +0 -0
- data/free_icons/site/mint +0 -0
- data/free_icons/site/mouse +0 -0
- data/free_icons/site/paint.svg +2640 -0
- data/free_icons/site/present +0 -0
- data/free_icons/site/python +0 -0
- data/free_icons/site/reality +0 -0
- data/free_icons/site/ruby +0 -0
- data/free_icons/site/skeptic +0 -0
- data/free_icons/site/terminal +0 -0
- data/free_icons/site/video.svg +358 -0
- data/free_icons/site/warning +0 -0
- data/free_icons/site/wikipedia.svg +553 -0
- data/free_icons/site/write.svg +287 -0
- data/g +0 -0
- data/graphical_help.c +6 -0
- data/gregory_coreutils/DOC +14 -0
- data/gregory_coreutils/build/Makefile +12 -0
- data/gregory_coreutils/build/code +1 -0
- data/gregory_coreutils/build/functions +465 -0
- data/gregory_coreutils/build/make +93 -0
- data/gregory_coreutils/build/mk +74 -0
- data/gregory_coreutils/build/regex +2 -0
- data/gregory_coreutils/build/ruby_functions +0 -0
- data/gregory_coreutils/utilities/abs +0 -0
- data/gregory_coreutils/utilities/add +0 -0
- data/gregory_coreutils/utilities/args +0 -0
- data/gregory_coreutils/utilities/black +0 -0
- data/gregory_coreutils/utilities/blue +0 -0
- data/gregory_coreutils/utilities/bold +0 -0
- data/gregory_coreutils/utilities/copy +0 -0
- data/gregory_coreutils/utilities/count +0 -0
- data/gregory_coreutils/utilities/cpy +0 -0
- data/gregory_coreutils/utilities/cyan +0 -0
- data/gregory_coreutils/utilities/div +0 -0
- data/gregory_coreutils/utilities/dump +0 -0
- data/gregory_coreutils/utilities/exp +0 -0
- data/gregory_coreutils/utilities/files +0 -0
- data/gregory_coreutils/utilities/floor +0 -0
- data/gregory_coreutils/utilities/green +0 -0
- data/gregory_coreutils/utilities/gsub +0 -0
- data/gregory_coreutils/utilities/gsub_in_place +0 -0
- data/gregory_coreutils/utilities/last_nth +0 -0
- data/gregory_coreutils/utilities/lines +0 -0
- data/gregory_coreutils/utilities/magenta +0 -0
- data/gregory_coreutils/utilities/mul +0 -0
- data/gregory_coreutils/utilities/nth +0 -0
- data/gregory_coreutils/utilities/red +0 -0
- data/gregory_coreutils/utilities/replace_in_place +0 -0
- data/gregory_coreutils/utilities/replace_not_in_place +0 -0
- data/gregory_coreutils/utilities/selectlines +0 -0
- data/gregory_coreutils/utilities/sort_in_place +0 -0
- data/gregory_coreutils/utilities/sub +0 -0
- data/gregory_coreutils/utilities/underline +0 -0
- data/gregory_coreutils/utilities/undump +0 -0
- data/gregory_coreutils/utilities/white +0 -0
- data/gregory_coreutils/utilities/yellow +0 -0
- data/gtk +3 -0
- data/html_file +0 -0
- data/html_file.html +92 -0
- data/i +181 -0
- data/index.html +38 -0
- data/index2.html +344 -0
- data/inspect.rb +209 -0
- data/lib/README +310 -0
- data/lib/__index.html +11 -0
- data/lib/because.rb +41 -0
- data/lib/code.js +28490 -0
- data/lib/compile +5 -0
- data/lib/conjunction.rb +49 -0
- data/lib/evidence.rb +45 -0
- data/lib/graphical_help +90 -0
- data/lib/however.rb +42 -0
- data/lib/index.html +49 -0
- data/lib/index2.html +344 -0
- data/lib/inputreceiver.rb +135 -0
- data/lib/item.rb +77 -0
- data/lib/itemlist.rb +50 -0
- data/lib/negative.rb +43 -0
- data/lib/neutral.rb +43 -0
- data/lib/outputter.rb +60 -0
- data/lib/p.rb +71 -0
- data/lib/positive.rb +41 -0
- data/lib/script.js +423 -0
- data/lib/string__.rb +110 -0
- data/lib/sub/file +5 -0
- data/man/foo.rb +6 -0
- data/man/gtk.html +1 -0
- data/man/out +7288 -0
- data/more/ac.desktop +12 -0
- data/more/res +1 -0
- data/more/web-speech-api/.git/HEAD +1 -0
- data/more/web-speech-api/.git/config +11 -0
- data/more/web-speech-api/.git/description +1 -0
- data/more/web-speech-api/.git/hooks/applypatch-msg.sample +15 -0
- data/more/web-speech-api/.git/hooks/commit-msg.sample +24 -0
- data/more/web-speech-api/.git/hooks/fsmonitor-watchman.sample +109 -0
- data/more/web-speech-api/.git/hooks/post-update.sample +8 -0
- data/more/web-speech-api/.git/hooks/pre-applypatch.sample +14 -0
- data/more/web-speech-api/.git/hooks/pre-commit.sample +49 -0
- data/more/web-speech-api/.git/hooks/pre-merge-commit.sample +13 -0
- data/more/web-speech-api/.git/hooks/pre-push.sample +53 -0
- data/more/web-speech-api/.git/hooks/pre-rebase.sample +169 -0
- data/more/web-speech-api/.git/hooks/pre-receive.sample +24 -0
- data/more/web-speech-api/.git/hooks/prepare-commit-msg.sample +42 -0
- data/more/web-speech-api/.git/hooks/update.sample +128 -0
- data/more/web-speech-api/.git/index +0 -0
- data/more/web-speech-api/.git/info/exclude +6 -0
- data/more/web-speech-api/.git/logs/HEAD +1 -0
- data/more/web-speech-api/.git/logs/refs/heads/master +1 -0
- data/more/web-speech-api/.git/logs/refs/remotes/origin/HEAD +1 -0
- data/more/web-speech-api/.git/objects/pack/pack-4d2adae000c513b287d53e24937e9e836954f901.idx +0 -0
- data/more/web-speech-api/.git/objects/pack/pack-4d2adae000c513b287d53e24937e9e836954f901.pack +0 -0
- data/more/web-speech-api/.git/packed-refs +2 -0
- data/more/web-speech-api/.git/refs/heads/master +1 -0
- data/more/web-speech-api/.git/refs/remotes/origin/HEAD +1 -0
- data/more/web-speech-api/CODE_OF_CONDUCT.md +15 -0
- data/more/web-speech-api/LICENSE +116 -0
- data/more/web-speech-api/README.md +23 -0
- data/more/web-speech-api/index.html +25 -0
- data/more/web-speech-api/phrase-matcher/index.html +30 -0
- data/more/web-speech-api/phrase-matcher/script.js +124 -0
- data/more/web-speech-api/phrase-matcher/style.css +54 -0
- data/more/web-speech-api/speak-easy-synthesis/img/ws128.png +0 -0
- data/more/web-speech-api/speak-easy-synthesis/img/ws512.png +0 -0
- data/more/web-speech-api/speak-easy-synthesis/index.html +43 -0
- data/more/web-speech-api/speak-easy-synthesis/manifest.webapp +14 -0
- data/more/web-speech-api/speak-easy-synthesis/script.js +87 -0
- data/more/web-speech-api/speak-easy-synthesis/style.css +74 -0
- data/more/web-speech-api/speech-color-changer/img/ws128.png +0 -0
- data/more/web-speech-api/speech-color-changer/img/ws512.png +0 -0
- data/more/web-speech-api/speech-color-changer/index.html +26 -0
- data/more/web-speech-api/speech-color-changer/manifest.webapp +23 -0
- data/more/web-speech-api/speech-color-changer/script.js +58 -0
- data/more/web-speech-api/speech-color-changer/style.css +38 -0
- data/opensrc +68 -0
- data/out +39 -0
- data/playsrc +14 -0
- data/program.c +11 -0
- data/program.prog +568 -0
- data/proj/a +0 -0
- data/proj/a.c +1 -0
- data/proj/a.o +0 -0
- data/proj/a.rs +18 -0
- data/proj/b.rs +22 -0
- data/proj/linker.sh +8 -0
- data/proj/save_last +4 -0
- data/push +16 -0
- data/q.cpp +175 -0
- data/qt/.qmake.stash +23 -0
- data/qt/Qt5Core.dll +0 -0
- data/qt/Qt5Gui.dll +0 -0
- data/qt/Qt5Multimedia.dll +0 -0
- data/qt/Qt5MultimediaWidgets.dll +0 -0
- data/qt/Qt5Network.dll +0 -0
- data/qt/Qt5PrintSupport.dll +0 -0
- data/qt/Qt5Qml.dll +0 -0
- data/qt/Qt5QmlModels.dll +0 -0
- data/qt/Qt5Quick.dll +0 -0
- data/qt/Qt5Sensors.dll +0 -0
- data/qt/Qt5WebChannel.dll +0 -0
- data/qt/Qt5WebKit.dll +0 -0
- data/qt/Qt5WebKitWidgets.dll +0 -0
- data/qt/Qt5Widgets.dll +0 -0
- data/qt/a.cpp +39 -0
- data/qt/a.out +0 -0
- data/qt/a.sh +7 -0
- data/qt/icudt66.dll +0 -0
- data/qt/icuin66.dll +0 -0
- data/qt/icuuc66.dll +0 -0
- data/qt/libbz2.dll +0 -0
- data/qt/libcrypto-1_1-x64.dll +0 -0
- data/qt/libfreetype-6.dll +0 -0
- data/qt/libgcc_s_seh-1.dll +0 -0
- data/qt/libglib-2.0-0.dll +0 -0
- data/qt/libharfbuzz-0.dll +0 -0
- data/qt/libiconv-2.dll +0 -0
- data/qt/libintl-8.dll +0 -0
- data/qt/libjpeg-9.dll +0 -0
- data/qt/liblzma-5.dll +0 -0
- data/qt/libpcre-1.dll +0 -0
- data/qt/libpcre2-16-0.dll +0 -0
- data/qt/libpng16-16.dll +0 -0
- data/qt/libsqlite3-0.dll +0 -0
- data/qt/libssl-1_1-x64.dll +0 -0
- data/qt/libstdc++-6.dll +0 -0
- data/qt/libwebp-7.dll +0 -0
- data/qt/libwinpthread-1.dll +0 -0
- data/qt/libxml2-2.dll +0 -0
- data/qt/libxslt-1.dll +0 -0
- data/qt/libzstd.dll +0 -0
- data/qt/prog +1 -0
- data/qt/qwindows.dll +0 -0
- data/qt/zlib1.dll +0 -0
- data/quickjs/.git/HEAD +1 -0
- data/quickjs/.git/config +11 -0
- data/quickjs/.git/description +1 -0
- data/quickjs/.git/hooks/applypatch-msg.sample +15 -0
- data/quickjs/.git/hooks/commit-msg.sample +24 -0
- data/quickjs/.git/hooks/fsmonitor-watchman.sample +109 -0
- data/quickjs/.git/hooks/post-update.sample +8 -0
- data/quickjs/.git/hooks/pre-applypatch.sample +14 -0
- data/quickjs/.git/hooks/pre-commit.sample +49 -0
- data/quickjs/.git/hooks/pre-merge-commit.sample +13 -0
- data/quickjs/.git/hooks/pre-push.sample +53 -0
- data/quickjs/.git/hooks/pre-rebase.sample +169 -0
- data/quickjs/.git/hooks/pre-receive.sample +24 -0
- data/quickjs/.git/hooks/prepare-commit-msg.sample +42 -0
- data/quickjs/.git/hooks/update.sample +128 -0
- data/quickjs/.git/index +0 -0
- data/quickjs/.git/info/exclude +6 -0
- data/quickjs/.git/logs/HEAD +1 -0
- data/quickjs/.git/logs/refs/heads/master +1 -0
- data/quickjs/.git/logs/refs/remotes/origin/HEAD +1 -0
- data/quickjs/.git/objects/pack/pack-744a13dba8773a756b22372ba65ded3aca50cdeb.idx +0 -0
- data/quickjs/.git/objects/pack/pack-744a13dba8773a756b22372ba65ded3aca50cdeb.pack +0 -0
- data/quickjs/.git/packed-refs +2 -0
- data/quickjs/.git/refs/heads/master +1 -0
- data/quickjs/.git/refs/remotes/origin/HEAD +1 -0
- data/quickjs/.obj/.d +1 -0
- data/quickjs/.obj/cutils.nolto.o +0 -0
- data/quickjs/.obj/cutils.o +0 -0
- data/quickjs/.obj/cutils.o.d +1 -0
- data/quickjs/.obj/hello.o +0 -0
- data/quickjs/.obj/hello.o.d +1 -0
- data/quickjs/.obj/libbf.nolto.o +0 -0
- data/quickjs/.obj/libbf.o +0 -0
- data/quickjs/.obj/libbf.o.d +1 -0
- data/quickjs/.obj/libregexp.nolto.o +0 -0
- data/quickjs/.obj/libregexp.o +0 -0
- data/quickjs/.obj/libregexp.o.d +2 -0
- data/quickjs/.obj/libunicode.nolto.o +0 -0
- data/quickjs/.obj/libunicode.o +0 -0
- data/quickjs/.obj/libunicode.o.d +1 -0
- data/quickjs/.obj/qjs.check.o +0 -0
- data/quickjs/.obj/qjs.check.o.d +1 -0
- data/quickjs/.obj/qjs.o +0 -0
- data/quickjs/.obj/qjs.o.d +1 -0
- data/quickjs/.obj/qjsc.o +0 -0
- data/quickjs/.obj/qjsc.o.d +1 -0
- data/quickjs/.obj/qjscalc.o +0 -0
- data/quickjs/.obj/qjscalc.o.d +1 -0
- data/quickjs/.obj/quickjs-libc.nolto.o +0 -0
- data/quickjs/.obj/quickjs-libc.o +0 -0
- data/quickjs/.obj/quickjs-libc.o.d +2 -0
- data/quickjs/.obj/quickjs.check.o +0 -0
- data/quickjs/.obj/quickjs.check.o.d +2 -0
- data/quickjs/.obj/quickjs.nolto.o +0 -0
- data/quickjs/.obj/quickjs.o +0 -0
- data/quickjs/.obj/quickjs.o.d +2 -0
- data/quickjs/.obj/repl.o +0 -0
- data/quickjs/.obj/repl.o.d +1 -0
- data/quickjs/.obj/run-test262.o +0 -0
- data/quickjs/.obj/run-test262.o.d +2 -0
- data/quickjs/COMPILE_WIN +1 -0
- data/quickjs/Changelog +148 -0
- data/quickjs/LICENSE +22 -0
- data/quickjs/Makefile +470 -0
- data/quickjs/TODO +70 -0
- data/quickjs/VERSION +1 -0
- data/quickjs/a.c +50038 -0
- data/quickjs/a.js +26075 -0
- data/quickjs/a.rb +3 -0
- data/quickjs/cutils.c +631 -0
- data/quickjs/cutils.h +297 -0
- data/quickjs/doc/jsbignum.texi +589 -0
- data/quickjs/doc/quickjs.texi +1097 -0
- data/quickjs/examples/fib.c +72 -0
- data/quickjs/examples/fib_module.js +10 -0
- data/quickjs/examples/hello +0 -0
- data/quickjs/examples/hello.js +1 -0
- data/quickjs/examples/hello_module.js +6 -0
- data/quickjs/examples/pi_bigdecimal.js +68 -0
- data/quickjs/examples/pi_bigfloat.js +66 -0
- data/quickjs/examples/pi_bigint.js +118 -0
- data/quickjs/examples/point.c +151 -0
- data/quickjs/examples/test_fib.js +6 -0
- data/quickjs/examples/test_point.js +40 -0
- data/quickjs/hello.c +44 -0
- data/quickjs/libbf.c +8466 -0
- data/quickjs/libbf.h +535 -0
- data/quickjs/libquickjs.a +0 -0
- data/quickjs/libquickjs.lto.a +0 -0
- data/quickjs/libregexp-opcode.h +58 -0
- data/quickjs/libregexp.c +2610 -0
- data/quickjs/libregexp.h +92 -0
- data/quickjs/libunicode-table.h +4368 -0
- data/quickjs/libunicode.c +1556 -0
- data/quickjs/libunicode.h +124 -0
- data/quickjs/libwinpthread-1.dll +0 -0
- data/quickjs/list.h +100 -0
- data/quickjs/out.c +24 -0
- data/quickjs/out55.c +59 -0
- data/quickjs/out56.c +79 -0
- data/quickjs/out57.c +24 -0
- data/quickjs/out58.c +4 -0
- data/quickjs/p.exe +0 -0
- data/quickjs/qjs +0 -0
- data/quickjs/qjs.c +570 -0
- data/quickjs/qjsc +0 -0
- data/quickjs/qjsc.c +762 -0
- data/quickjs/qjsc.exe +0 -0
- data/quickjs/qjscalc.c +4005 -0
- data/quickjs/qjscalc.js +2657 -0
- data/quickjs/quickjs-atom.h +273 -0
- data/quickjs/quickjs-libc.c +3927 -0
- data/quickjs/quickjs-libc.h +59 -0
- data/quickjs/quickjs-opcode.h +365 -0
- data/quickjs/quickjs.c +54036 -0
- data/quickjs/quickjs.h +1049 -0
- data/quickjs/readme.txt +1 -0
- data/quickjs/release.sh +158 -0
- data/quickjs/repl.c +2020 -0
- data/quickjs/repl.js +1566 -0
- data/quickjs/run-test262 +0 -0
- data/quickjs/run-test262.c +2107 -0
- data/quickjs/test262.conf +199 -0
- data/quickjs/test262_errors.txt +35 -0
- data/quickjs/test262o.conf +410 -0
- data/quickjs/test262o_errors.txt +0 -0
- data/quickjs/tests/bjson.c +96 -0
- data/quickjs/tests/microbench.js +1065 -0
- data/quickjs/tests/test262.patch +71 -0
- data/quickjs/tests/test_bignum.js +326 -0
- data/quickjs/tests/test_bjson.js +191 -0
- data/quickjs/tests/test_builtin.js +685 -0
- data/quickjs/tests/test_closure.js +221 -0
- data/quickjs/tests/test_language.js +547 -0
- data/quickjs/tests/test_loop.js +368 -0
- data/quickjs/tests/test_op_overloading.js +207 -0
- data/quickjs/tests/test_qjscalc.js +256 -0
- data/quickjs/tests/test_std.js +281 -0
- data/quickjs/tests/test_worker.js +62 -0
- data/quickjs/tests/test_worker_module.js +31 -0
- data/quickjs/unicode_download.sh +19 -0
- data/quickjs/unicode_gen.c +3057 -0
- data/quickjs/unicode_gen_def.h +284 -0
- data/readline +3 -0
- data/rm_com +1 -0
- data/run.sh +13 -0
- data/scaling +6 -0
- data/script.js +572 -0
- data/server_creator/__ +307 -0
- data/server_creator/a/a (1).tar.gz +0 -0
- data/server_creator/a/a.out +0 -0
- data/server_creator/a/hello_world +0 -0
- data/server_creator/a/help +57 -0
- data/server_creator/a/main_v1.cpp +83 -0
- data/server_creator/a/my_libs_gregory/.deps +0 -0
- data/server_creator/a/my_libs_gregory/.libs/mod_my_libs_gregory.lai +41 -0
- data/server_creator/a/my_libs_gregory/.libs/mod_my_libs_gregory.o +0 -0
- data/server_creator/a/my_libs_gregory/.libs/mod_my_libs_gregory.so +0 -0
- data/server_creator/a/my_libs_gregory/mod_my_libs_gregory.c +72 -0
- data/server_creator/a/my_libs_gregory/mod_my_libs_gregory.la +41 -0
- data/server_creator/a/my_libs_gregory/mod_my_libs_gregory.lo +12 -0
- data/server_creator/a/my_libs_gregory/mod_my_libs_gregory.slo +0 -0
- data/server_creator/a/nginx.conf +32 -0
- data/server_creator/a/six +1 -0
- data/server_creator/a.out +0 -0
- data/server_creator/all_code.cpp +448 -0
- data/server_creator/all_code.js +27 -0
- data/server_creator/code +510 -0
- data/server_creator/make_application +64 -0
- data/server_creator/prog.cpp +33 -0
- data/server_creator/prog.js +22 -0
- data/server_creator/program.js +745 -0
- data/server_creator/rm_com +1 -0
- data/server_creator/test.sh +82 -0
- data/speakcat.rb +9 -0
- data/string +48 -0
- data/super_trans +83 -0
- data/test.sh +21 -0
- data/todo +8 -0
- data/version_decrement +3 -0
- data/viu_license +21 -0
- data/windows/program.c +21 -0
- data/windows/program.exe +0 -0
- metadata +759 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0000000000000000000000000000000000000000 5fa8d06dc332d745e2767d32ca240fee043f278c a <a@a.(none)> 1635041720 -0400 clone: from https://github.com/jhass/crystal-gobject.git
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0000000000000000000000000000000000000000 5fa8d06dc332d745e2767d32ca240fee043f278c a <a@a.(none)> 1635041720 -0400 clone: from https://github.com/jhass/crystal-gobject.git
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0000000000000000000000000000000000000000 5fa8d06dc332d745e2767d32ca240fee043f278c a <a@a.(none)> 1635041720 -0400 clone: from https://github.com/jhass/crystal-gobject.git
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# pack-refs with: peeled fully-peeled sorted
|
|
2
|
+
5fa8d06dc332d745e2767d32ca240fee043f278c refs/remotes/origin/main
|
|
3
|
+
ffcc034046b889b3993e87ba555baa5b7d8850fc refs/remotes/origin/master
|
|
4
|
+
eabefeb3b6ba5553396179326813aadfeb2ff554 refs/tags/v0.1.0
|
|
5
|
+
6468c57f8aa54b71c766d27b1e59e87a09ee8552 refs/tags/v0.10.0
|
|
6
|
+
6079130f4dca7ed7ed8885ddc95f9f83da94ae13 refs/tags/v0.2.0
|
|
7
|
+
09f02b85e533e6cdb74a96c78ef76727fac53b56 refs/tags/v0.3.0
|
|
8
|
+
afbf1462d3ebb78ec6760415689a1cdf33c1bd76 refs/tags/v0.3.1
|
|
9
|
+
18e4c9cd2e3eea3f9f28a23303f9a6e3cb50d389 refs/tags/v0.4.0
|
|
10
|
+
b6c2fe92c2bf55a2dee5534af4aa9454bf20e627 refs/tags/v0.5.0
|
|
11
|
+
34890cad190bf7da65228676ef5d9af1372827f2 refs/tags/v0.6.0
|
|
12
|
+
dabf37e79aa391a9a9605e0db364dd9aa358cac1 refs/tags/v0.7.0
|
|
13
|
+
a749b6becca81ee4f7cd1c33d6bccfd05d7a0f83 refs/tags/v0.8.0
|
|
14
|
+
28ff5a61119a2121ee6888279e4cce3170ee9ed2 refs/tags/v0.9.0
|
|
15
|
+
539bf539df1104ca6d1ad70c1340b6c1d3cb7026 refs/tags/v0.9.1
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
5fa8d06dc332d745e2767d32ca240fee043f278c
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ref: refs/remotes/origin/main
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on: [push, pull_request]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
build:
|
|
7
|
+
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
|
|
10
|
+
container:
|
|
11
|
+
image: crystallang/crystal
|
|
12
|
+
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v2
|
|
15
|
+
- name: Install packages
|
|
16
|
+
run: apt update && apt install -y libgirepository1.0-dev libgtk-3-dev xvfb
|
|
17
|
+
- name: Install dependencies
|
|
18
|
+
run: shards install
|
|
19
|
+
- name: Run tests
|
|
20
|
+
run: xvfb-run -a script/ci.sh
|
|
21
|
+
- name: Cleanup xvfb pidx
|
|
22
|
+
uses: bcomnes/cleanup-xvfb@v1
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
Copyright 2020 The crystal-gobject contributors
|
|
2
|
+
|
|
3
|
+
Redistribution and use in source and binary forms, with or without
|
|
4
|
+
modification, are permitted provided that the following conditions are met:
|
|
5
|
+
|
|
6
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
7
|
+
list of conditions and the following disclaimer.
|
|
8
|
+
|
|
9
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
10
|
+
this list of conditions and the following disclaimer in the documentation
|
|
11
|
+
and/or other materials provided with the distribution.
|
|
12
|
+
|
|
13
|
+
3. Neither the name of the copyright holder nor the names of its contributors
|
|
14
|
+
may be used to endorse or promote products derived from this software
|
|
15
|
+
without specific prior written permission.
|
|
16
|
+
|
|
17
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
18
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
19
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
20
|
+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
|
21
|
+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
22
|
+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
23
|
+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
24
|
+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
25
|
+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
26
|
+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
27
|
+
POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# gobject-introspection for [Crystal](http://crystal-lang.org)
|
|
2
|
+
|
|
3
|
+
The primary purpose of this shard is to provide compile-time generated
|
|
4
|
+
bindings to libraries supporting GObject Introspection, so for example Gtk.
|
|
5
|
+
|
|
6
|
+
Secondarily this project also aims to provide hand written extensions and
|
|
7
|
+
overrides for the more popular GObject based libraries that make the bindings
|
|
8
|
+
more friendly to use and allow users to write more idiomatic Crystal.
|
|
9
|
+
In the midterm these should be extracted to their own shards that depend on this one.
|
|
10
|
+
|
|
11
|
+
This should be useable for simple projects but usually still requires familarity with
|
|
12
|
+
the C interface and usage of the original library. There's most likely still
|
|
13
|
+
incorrect code generated, some methods may not even compile when invoked as
|
|
14
|
+
Crystal does semantic checks only then. So this should be considered a work in
|
|
15
|
+
progress and contributions are very welcome!
|
|
16
|
+
|
|
17
|
+
## Install
|
|
18
|
+
|
|
19
|
+
Install like any other shard. Additionally you'll need gobject-introspection installed
|
|
20
|
+
as well as the GObject based library you want to use and its typelib file needs to be
|
|
21
|
+
available.
|
|
22
|
+
|
|
23
|
+
### Debian
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
sudo apt install libgirepository1.0-dev
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Fedora
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
sudo dnf install gobject-introspection-devel
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Usage
|
|
36
|
+
|
|
37
|
+
Include in your shard.yml:
|
|
38
|
+
```yaml
|
|
39
|
+
dependencies:
|
|
40
|
+
gobject:
|
|
41
|
+
github: jhass/crystal-gobject
|
|
42
|
+
version: ~> 0.10.0
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
For libraries that have convenience wrappers you just require them under the `gobject`
|
|
46
|
+
namespace. For example:
|
|
47
|
+
|
|
48
|
+
```cr
|
|
49
|
+
require "gobject/gdk"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Gtk specifically has a convenience wrapper that starts the mainloop automatically:
|
|
53
|
+
|
|
54
|
+
```cr
|
|
55
|
+
require "gobject/gtk/autorun"
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
However the main entry point is the `require_gobject` macro:
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
```cr
|
|
62
|
+
require "gobject"
|
|
63
|
+
require_gobject "Gio"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
This will replace itself with the entire generated binding code for, in this case,
|
|
67
|
+
Gio and its dependencies.
|
|
68
|
+
|
|
69
|
+
There's a very work in progress documentation generator under the `gi-doc` target.
|
|
70
|
+
Note it is a modified version of the Crystal compiler's doc generator and thus
|
|
71
|
+
compiles almost the entire compiler, thus compiling this tool takes as much time
|
|
72
|
+
and resources as compiling the compiler does. Also libraries such as Gtk are huge! Generating
|
|
73
|
+
for Gtk and its dependencies will take a long time and generate about a gigabyte
|
|
74
|
+
of documentation.
|
|
75
|
+
|
|
76
|
+
## Samples
|
|
77
|
+
|
|
78
|
+
Clone the repo and give the samples a try:
|
|
79
|
+
```
|
|
80
|
+
cd samples
|
|
81
|
+
crystal run gtk_hello_world.cr
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
To run the samples you will also need the Gtk development package.
|
|
85
|
+
|
|
86
|
+
On Debian you can install it with:
|
|
87
|
+
```
|
|
88
|
+
sudo apt install libgtk-3-dev
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
On Fedora:
|
|
92
|
+
```
|
|
93
|
+
sudo dnf install gtk3-devel
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## I'm on Linux and I'm getting random crashes (segmentation faults)
|
|
97
|
+
|
|
98
|
+
Using GTK or another library that spawns threads? Please try adding
|
|
99
|
+
[crystal-malloc_pthread_shim](https://github.com/jhass/crystal-malloc_pthread_shim) to your project.
|
|
100
|
+
If that does not help, please open an issue with a, ideally minimal, example to reproduce the crash!
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
## Contributing
|
|
104
|
+
|
|
105
|
+
Pull requests are welcome! If you encounter a bug, the first step is to produce
|
|
106
|
+
the most minimal example that reproduces it. Currently this has no testsuite,
|
|
107
|
+
so the samples funciton as a sort of manual testsuite. That means including this minimal
|
|
108
|
+
example into an issue or pull request will not only allow others to verify the bug,
|
|
109
|
+
but also prevent it from reappearing as a regression.
|
|
110
|
+
|
|
111
|
+
Running `src/generator/build_namespace.cr` directly is a good way to inspect the generated code.
|
|
112
|
+
An alternative is to add `{% debug() %}` to the end of the `require_gobject`
|
|
113
|
+
macro definition in `src/gobject.cr`.
|
|
114
|
+
|
|
115
|
+
### Architecture
|
|
116
|
+
|
|
117
|
+
gobject-introspection is itself a C library, so we need to have bindings for it.
|
|
118
|
+
It is itself introspectable and we make use of that, however there's a bootstrapping
|
|
119
|
+
problem if we would try to use the main `require_gobject` macro for that, there are
|
|
120
|
+
no bindings for what it's based on! So we have a second generator that writes the output
|
|
121
|
+
to static files under `src/generated` under the target `gi-generator`. The initial version
|
|
122
|
+
of this was bootstrapped using hand-written bindings. A good quick check whether any changes
|
|
123
|
+
you did still work, is to build and run this target twice, the first time to update the generated
|
|
124
|
+
bindings and the second time to see if they still compile and produce the same output.
|
|
125
|
+
|
|
126
|
+
`src/generator` has the driver code for any of the generators and tools. `src/g_i_repository`
|
|
127
|
+
contains the classes that define the Crystal code for each of the GObject Introspection info types.
|
|
128
|
+
|
|
129
|
+
The `gi-dump` target tries to completely map out all info that's present in a typelib, that is
|
|
130
|
+
how the current bindings see that info. Look at its options, you'll need to make use
|
|
131
|
+
of them to drill in, otherwise it's just too much output due to how it displays
|
|
132
|
+
the same infos all over again and again recursively.
|
|
133
|
+
|
|
134
|
+
For now convenience extensions and overrides go under `src/library_name`, so for example `src/gtk` for Gtk or `src/g_lib` for GLib.
|
|
135
|
+
The future prospect is to have them live in their own shards that depend on this one.
|
|
136
|
+
|
|
137
|
+
## Library specific shards
|
|
138
|
+
|
|
139
|
+
Like mentioned above, we want shards that collect any convenience extensions and overrides to the code this library generates.
|
|
140
|
+
Here's a well known list of them:
|
|
141
|
+
|
|
142
|
+
- [cairo-gobject](https://github.com/viachpaliy/cairo-gobject) - Cairo bindings for crystal-gobject.
|
|
143
|
+
- [gtk_custom_widgets](https://github.com/viachpaliy/gtk_custom_widgets) - collection of custom widgets.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
require "gobject/gtk/autorun"
|
|
2
|
+
|
|
3
|
+
class Container
|
|
4
|
+
getter widget : ::Gtk::Label
|
|
5
|
+
|
|
6
|
+
def initialize
|
|
7
|
+
@widget = Gtk::Label.new("Hello")
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
main_window = Gtk::Window.new(title: "Widget container", border_width: 20)
|
|
12
|
+
container = Container.new
|
|
13
|
+
main_window.add(container.widget)
|
|
14
|
+
main_window.connect "destroy", &->Gtk.main_quit
|
|
15
|
+
main_window.show_all
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
require "gobject/gtk/autorun"
|
|
2
|
+
|
|
3
|
+
def on(widget, event)
|
|
4
|
+
puts "on"
|
|
5
|
+
false
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
def after(widget, event)
|
|
9
|
+
puts "after"
|
|
10
|
+
true
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
window = Gtk::Window.new(title: "Enter something!", border_width: 10)
|
|
14
|
+
window.connect "destroy", after: true, &->Gtk.main_quit
|
|
15
|
+
box = Gtk::Box.new(orientation: :vertical, spacing: 6)
|
|
16
|
+
window.add(box)
|
|
17
|
+
|
|
18
|
+
entry1 = Gtk::Entry.new
|
|
19
|
+
entry1.after_focus_out_event(&->after(Gtk::Widget, Gdk::EventFocus))
|
|
20
|
+
entry1.on_focus_out_event(&->on(Gtk::Widget, Gdk::EventFocus))
|
|
21
|
+
|
|
22
|
+
entry2 = Gtk::Entry.new
|
|
23
|
+
entry2.after_focus_out_event {
|
|
24
|
+
puts "after"
|
|
25
|
+
true
|
|
26
|
+
}
|
|
27
|
+
entry2.on_focus_out_event {
|
|
28
|
+
puts "on"
|
|
29
|
+
false
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
box.add(entry1)
|
|
33
|
+
box.add(entry2)
|
|
34
|
+
|
|
35
|
+
window.show_all
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
require "gobject/crout"
|
|
2
|
+
|
|
3
|
+
Crout.build(STDOUT) do
|
|
4
|
+
section do
|
|
5
|
+
foo = line assign_var(literal(1))
|
|
6
|
+
line call("puts", foo)
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
source_location("unicorn.cr") do
|
|
10
|
+
def_module("Foo") do
|
|
11
|
+
def_class("Bar") do
|
|
12
|
+
def_method("hello", arg("name")) do
|
|
13
|
+
name = line assign_var(var("name"))
|
|
14
|
+
line call("puts", literal("Hello #{interpolation(name)}"))
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def_method("test")
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def_struct("Baz") { }
|
|
21
|
+
|
|
22
|
+
write_annotation("Link", literal("foo"))
|
|
23
|
+
write_annotation("Link", literal("bar"))
|
|
24
|
+
def_lib("LibNone") { }
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
section do
|
|
29
|
+
bar = line assign_var(call("new", receiver: "Foo::Bar"))
|
|
30
|
+
line call("hello", literal("John"), receiver: bar)
|
|
31
|
+
line call("test", receiver: bar)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
section do
|
|
35
|
+
line def_if(call("==", literal("hello"), receiver: call("[]?", literal(0), receiver: var("ARGV")))) { |b|
|
|
36
|
+
b.line b.call("puts", b.literal("Hi!"))
|
|
37
|
+
}.elsif(call("==", literal("bye"), receiver: call("[]?", literal(0), receiver: var("ARGV")))) { |b|
|
|
38
|
+
b.line b.call("puts", b.literal("Ciao!"))
|
|
39
|
+
}.else { |b|
|
|
40
|
+
b.line b.call("puts", b.literal("Uh..."))
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
section do
|
|
45
|
+
def_method("baz") do
|
|
46
|
+
line call("puts", invoke_yield(literal("test")))
|
|
47
|
+
end
|
|
48
|
+
line
|
|
49
|
+
|
|
50
|
+
line call("baz") { |b|
|
|
51
|
+
b.line b.literal("Hello")
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
item = declare_var
|
|
55
|
+
line call("baz", block_args: {item}) { |b|
|
|
56
|
+
b.line b.call "upcase", receiver: item
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
end
|
|
Binary file
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
require "gobject/gdk"
|
|
2
|
+
|
|
3
|
+
Gdk.init
|
|
4
|
+
|
|
5
|
+
window = Gdk::Window.new(nil,
|
|
6
|
+
Gdk::WindowAttr.new(
|
|
7
|
+
title: "Hello World",
|
|
8
|
+
window_type: Gdk::WindowType::TOPLEVEL,
|
|
9
|
+
wclass: Gdk::WindowWindowClass::INPUT_OUTPUT,
|
|
10
|
+
width: 800,
|
|
11
|
+
height: 600
|
|
12
|
+
),
|
|
13
|
+
Gdk::WindowAttributesType.flags(TITLE)
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
window.events = Gdk::EventMask::ZERO_NONE
|
|
17
|
+
|
|
18
|
+
window.show
|
|
19
|
+
|
|
20
|
+
main_loop = GLib::MainLoop.new(nil, true)
|
|
21
|
+
|
|
22
|
+
Gdk::Event.on_event do |event|
|
|
23
|
+
case event.event_type
|
|
24
|
+
when .expose?
|
|
25
|
+
puts "Expose count: #{event.expose.count}"
|
|
26
|
+
when .setting?
|
|
27
|
+
puts "Setting #{event.setting.name} is #{event.setting.action}"
|
|
28
|
+
when .delete?
|
|
29
|
+
puts "Received window delete"
|
|
30
|
+
main_loop.quit
|
|
31
|
+
else
|
|
32
|
+
puts "Unhandled event: #{event.event_type}"
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
main_loop.run
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
require "gobject/gtk/autorun"
|
|
2
|
+
|
|
3
|
+
window = Gtk::Window.new title: "Lists", border_width: 10
|
|
4
|
+
window.connect "destroy", &->Gtk.main_quit
|
|
5
|
+
|
|
6
|
+
container = Gtk::Box.new :vertical, spacing: 2
|
|
7
|
+
|
|
8
|
+
radio1 = Gtk::RadioButton.new_with_label(nil, "Good?")
|
|
9
|
+
radio2 = Gtk::RadioButton.new_with_label_from_widget(radio1, "Awesome?")
|
|
10
|
+
container.add radio1
|
|
11
|
+
container.add radio2
|
|
12
|
+
pp! container.children.to_a
|
|
13
|
+
pp! radio1.group.to_a
|
|
14
|
+
|
|
15
|
+
window.add container
|
|
16
|
+
window.show_all
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
require "gobject/gtk/autorun"
|
|
2
|
+
|
|
3
|
+
builder = Gtk::Builder.new_from_file "#{__DIR__}/greeter.glade"
|
|
4
|
+
builder.connect_signals
|
|
5
|
+
|
|
6
|
+
info = Gtk::Window.cast builder["info"]
|
|
7
|
+
info_text = Gtk::Label.cast builder["text"]
|
|
8
|
+
name = Gtk::Entry.cast builder["name"]
|
|
9
|
+
greet = Gtk::Button.cast(builder["greet"])
|
|
10
|
+
|
|
11
|
+
def greet(button, info, info_text, name)
|
|
12
|
+
button.sensitive = false
|
|
13
|
+
button.label = "One time is enough!"
|
|
14
|
+
name.disconnect("activate")
|
|
15
|
+
|
|
16
|
+
text = name.text
|
|
17
|
+
text = text.empty? ? "You should enter your name :(" : "Hello #{text}!"
|
|
18
|
+
info_text.text = text
|
|
19
|
+
info.show_all
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
name.on_activate do
|
|
23
|
+
greet greet, info, info_text, name
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
greet.on_clicked do |button|
|
|
27
|
+
greet button, info, info_text, name
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
Gtk::Button.cast(builder["ok"]).connect "clicked", &->info.hide
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
window = Gtk::Window.cast builder["window"]
|
|
34
|
+
window.show_all
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!-- Generated with glade 3.18.3 -->
|
|
3
|
+
<interface>
|
|
4
|
+
<requires lib="gtk+" version="3.12"/>
|
|
5
|
+
<object class="GtkWindow" id="window">
|
|
6
|
+
<property name="can_focus">False</property>
|
|
7
|
+
<property name="border_width">10</property>
|
|
8
|
+
<property name="title" translatable="yes">Greeter</property>
|
|
9
|
+
<signal name="destroy" handler="gtk_main_quit" swapped="no"/>
|
|
10
|
+
<child>
|
|
11
|
+
<object class="GtkBox" id="box1">
|
|
12
|
+
<property name="visible">True</property>
|
|
13
|
+
<property name="can_focus">False</property>
|
|
14
|
+
<property name="orientation">vertical</property>
|
|
15
|
+
<child>
|
|
16
|
+
<object class="GtkEntry" id="name">
|
|
17
|
+
<property name="visible">True</property>
|
|
18
|
+
<property name="can_focus">True</property>
|
|
19
|
+
<property name="placeholder_text" translatable="yes">Your name</property>
|
|
20
|
+
</object>
|
|
21
|
+
<packing>
|
|
22
|
+
<property name="expand">False</property>
|
|
23
|
+
<property name="fill">True</property>
|
|
24
|
+
<property name="position">0</property>
|
|
25
|
+
</packing>
|
|
26
|
+
</child>
|
|
27
|
+
<child>
|
|
28
|
+
<object class="GtkButton" id="greet">
|
|
29
|
+
<property name="label" translatable="yes">Greet me!</property>
|
|
30
|
+
<property name="visible">True</property>
|
|
31
|
+
<property name="can_focus">True</property>
|
|
32
|
+
<property name="receives_default">True</property>
|
|
33
|
+
</object>
|
|
34
|
+
<packing>
|
|
35
|
+
<property name="expand">False</property>
|
|
36
|
+
<property name="fill">True</property>
|
|
37
|
+
<property name="position">1</property>
|
|
38
|
+
</packing>
|
|
39
|
+
</child>
|
|
40
|
+
</object>
|
|
41
|
+
</child>
|
|
42
|
+
</object>
|
|
43
|
+
<object class="GtkWindow" id="info">
|
|
44
|
+
<property name="can_focus">False</property>
|
|
45
|
+
<property name="border_width">10</property>
|
|
46
|
+
<property name="title" translatable="yes">Welcome</property>
|
|
47
|
+
<property name="resizable">False</property>
|
|
48
|
+
<property name="modal">True</property>
|
|
49
|
+
<property name="window_position">center-on-parent</property>
|
|
50
|
+
<property name="destroy_with_parent">True</property>
|
|
51
|
+
<property name="type_hint">dialog</property>
|
|
52
|
+
<property name="skip_taskbar_hint">True</property>
|
|
53
|
+
<property name="transient_for">window</property>
|
|
54
|
+
<child>
|
|
55
|
+
<object class="GtkBox" id="box2">
|
|
56
|
+
<property name="visible">True</property>
|
|
57
|
+
<property name="can_focus">False</property>
|
|
58
|
+
<property name="halign">center</property>
|
|
59
|
+
<property name="valign">center</property>
|
|
60
|
+
<property name="orientation">vertical</property>
|
|
61
|
+
<child>
|
|
62
|
+
<object class="GtkLabel" id="text">
|
|
63
|
+
<property name="visible">True</property>
|
|
64
|
+
<property name="can_focus">False</property>
|
|
65
|
+
<property name="xpad">5</property>
|
|
66
|
+
<property name="ypad">5</property>
|
|
67
|
+
</object>
|
|
68
|
+
<packing>
|
|
69
|
+
<property name="expand">False</property>
|
|
70
|
+
<property name="fill">True</property>
|
|
71
|
+
<property name="position">0</property>
|
|
72
|
+
</packing>
|
|
73
|
+
</child>
|
|
74
|
+
<child>
|
|
75
|
+
<object class="GtkButton" id="ok">
|
|
76
|
+
<property name="label">gtk-ok</property>
|
|
77
|
+
<property name="visible">True</property>
|
|
78
|
+
<property name="can_focus">True</property>
|
|
79
|
+
<property name="receives_default">True</property>
|
|
80
|
+
<property name="use_stock">True</property>
|
|
81
|
+
</object>
|
|
82
|
+
<packing>
|
|
83
|
+
<property name="expand">False</property>
|
|
84
|
+
<property name="fill">False</property>
|
|
85
|
+
<property name="position">1</property>
|
|
86
|
+
</packing>
|
|
87
|
+
</child>
|
|
88
|
+
</object>
|
|
89
|
+
</child>
|
|
90
|
+
</object>
|
|
91
|
+
</interface>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
require "gobject/gtk/autorun"
|
|
2
|
+
|
|
3
|
+
window = Gtk::ApplicationWindow.new(title: "AccelGroup", border_width: 20)
|
|
4
|
+
window.connect "destroy", ->Gtk.main_quit
|
|
5
|
+
window.add Gtk::Label.new("Press Ctrl+S")
|
|
6
|
+
|
|
7
|
+
accel_group = Gtk::AccelGroup.new
|
|
8
|
+
accel_group.connect(Gdk::KEY_S, :control_mask, :zero_none) do
|
|
9
|
+
puts "Ctrl+S pressed!"
|
|
10
|
+
end
|
|
11
|
+
window.add_accel_group(accel_group)
|
|
12
|
+
|
|
13
|
+
window.show_all
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
require "gobject/gtk"
|
|
2
|
+
|
|
3
|
+
application = Gtk::Application.new(application_id: "org.crystal.sample")
|
|
4
|
+
|
|
5
|
+
application.on_activate do
|
|
6
|
+
window = Gtk::ApplicationWindow.new(application: application, title: "Hello", border_width: 20)
|
|
7
|
+
window.connect "destroy", &->application.quit
|
|
8
|
+
window.add Gtk::Label.new("Hello World!")
|
|
9
|
+
window.show_all
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
application.run
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Boxes are invisible containers into which we can pack our widgets.
|
|
2
|
+
# When packing widgets into a horizontal box, the
|
|
3
|
+
# objects are inserted horizontally from left to right or right to left
|
|
4
|
+
# depending on whether Gtk::Box.pack_start() or Gtk::Box.pack_end() is used.
|
|
5
|
+
# In a vertical box, widgets are packed from top to bottom or vice versa.
|
|
6
|
+
# You may use any combination of boxes inside or beside other boxes to create the desired effect.
|
|
7
|
+
|
|
8
|
+
require "gobject/gtk/autorun"
|
|
9
|
+
|
|
10
|
+
window = Gtk::Window.new
|
|
11
|
+
window.title = "Box demo!"
|
|
12
|
+
window.connect "destroy", &->Gtk.main_quit
|
|
13
|
+
window.border_width = 10
|
|
14
|
+
|
|
15
|
+
name_container = Gtk::Box.new :vertical, spacing: 2
|
|
16
|
+
|
|
17
|
+
name_label = Gtk::Label.new "Enter name"
|
|
18
|
+
name_container.pack_start(name_label, expand: true, fill: true, padding: 10)
|
|
19
|
+
|
|
20
|
+
name_entry = Gtk::Entry.new
|
|
21
|
+
name_container.pack_start(name_entry, expand: true, fill: true, padding: 10)
|
|
22
|
+
|
|
23
|
+
name_submit = Gtk::Button.new label: "OK!"
|
|
24
|
+
name_submit.on_clicked { puts "Remembering you're called: #{name_entry.text}" }
|
|
25
|
+
name_container.pack_start(name_submit, expand: true, fill: true, padding: 10)
|
|
26
|
+
|
|
27
|
+
remarks_container = Gtk::Box.new :horizontal, 2
|
|
28
|
+
|
|
29
|
+
remarks_label = Gtk::Label.new "Enter remarks"
|
|
30
|
+
remarks_container.pack_start(remarks_label, expand: true, fill: true, padding: 5)
|
|
31
|
+
|
|
32
|
+
remarks_entry = Gtk::Entry.new
|
|
33
|
+
remarks_container.pack_start(remarks_entry, expand: true, fill: true, padding: 5)
|
|
34
|
+
|
|
35
|
+
remarks_submit = Gtk::Button.new label: "Save"
|
|
36
|
+
remarks_submit.on_clicked { puts "Stored remarks: #{remarks_entry.text}" }
|
|
37
|
+
remarks_container.pack_start(remarks_submit, expand: true, fill: true, padding: 5)
|
|
38
|
+
|
|
39
|
+
root = Gtk::Box.new :vertical, spacing: 2
|
|
40
|
+
root.add name_container
|
|
41
|
+
root.add remarks_container
|
|
42
|
+
window.add root
|
|
43
|
+
|
|
44
|
+
window.show_all
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
require "gobject/gtk/autorun"
|
|
2
|
+
|
|
3
|
+
class CSSApp
|
|
4
|
+
@window : Gtk::Window
|
|
5
|
+
|
|
6
|
+
delegate show_all, to: @window
|
|
7
|
+
|
|
8
|
+
def initialize
|
|
9
|
+
builder = Gtk::Builder.new_from_file "#{__DIR__}/css_window.glade"
|
|
10
|
+
builder.connect_signals
|
|
11
|
+
|
|
12
|
+
@window = Gtk::Window.cast builder["css_window"]
|
|
13
|
+
@window.title = "CSS Example"
|
|
14
|
+
@window.connect "delete-event", &->Gtk.main_quit
|
|
15
|
+
|
|
16
|
+
red_button = Gtk::Button.cast builder["red_button"]
|
|
17
|
+
red_button.connect("clicked") { change_background("#FF7083") }
|
|
18
|
+
green_button = Gtk::Button.cast builder["green_button"]
|
|
19
|
+
green_button.connect("clicked") { change_background("#83FF70") }
|
|
20
|
+
blue_button = Gtk::Button.cast builder["blue_button"]
|
|
21
|
+
blue_button.connect("clicked") { change_background("#7083FF") }
|
|
22
|
+
|
|
23
|
+
display = Gdk::Display.default.not_nil!
|
|
24
|
+
screen = display.default_screen
|
|
25
|
+
@css_provider = Gtk::CssProvider.new
|
|
26
|
+
Gtk::StyleContext.add_provider_for_screen screen, @css_provider, Gtk::STYLE_PROVIDER_PRIORITY_APPLICATION
|
|
27
|
+
|
|
28
|
+
@css_provider.load_from_path "#{__DIR__}/css_window.css"
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def change_background(color)
|
|
32
|
+
@css_provider.load_from_data("#css_window { background-color: #{color}; }")
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
app = CSSApp.new
|
|
37
|
+
app.show_all
|