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,104 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!-- Generated with glade 3.22.1 -->
|
|
3
|
+
<interface>
|
|
4
|
+
<requires lib="gtk+" version="3.20"/>
|
|
5
|
+
<object class="GtkWindow" id="css_window">
|
|
6
|
+
<property name="name">css_window</property>
|
|
7
|
+
<property name="can_focus">False</property>
|
|
8
|
+
<child>
|
|
9
|
+
<placeholder/>
|
|
10
|
+
</child>
|
|
11
|
+
<child>
|
|
12
|
+
<object class="GtkPaned">
|
|
13
|
+
<property name="visible">True</property>
|
|
14
|
+
<property name="can_focus">True</property>
|
|
15
|
+
<child>
|
|
16
|
+
<object class="GtkBox">
|
|
17
|
+
<property name="visible">True</property>
|
|
18
|
+
<property name="can_focus">False</property>
|
|
19
|
+
<property name="orientation">vertical</property>
|
|
20
|
+
<property name="spacing">4</property>
|
|
21
|
+
<property name="homogeneous">True</property>
|
|
22
|
+
<child>
|
|
23
|
+
<object class="GtkButton" id="red_button">
|
|
24
|
+
<property name="label" translatable="yes">Red</property>
|
|
25
|
+
<property name="visible">True</property>
|
|
26
|
+
<property name="can_focus">True</property>
|
|
27
|
+
<property name="receives_default">True</property>
|
|
28
|
+
</object>
|
|
29
|
+
<packing>
|
|
30
|
+
<property name="expand">False</property>
|
|
31
|
+
<property name="fill">True</property>
|
|
32
|
+
<property name="position">0</property>
|
|
33
|
+
</packing>
|
|
34
|
+
</child>
|
|
35
|
+
<child>
|
|
36
|
+
<object class="GtkButton" id="green_button">
|
|
37
|
+
<property name="label" translatable="yes">Green</property>
|
|
38
|
+
<property name="visible">True</property>
|
|
39
|
+
<property name="can_focus">True</property>
|
|
40
|
+
<property name="receives_default">True</property>
|
|
41
|
+
</object>
|
|
42
|
+
<packing>
|
|
43
|
+
<property name="expand">False</property>
|
|
44
|
+
<property name="fill">True</property>
|
|
45
|
+
<property name="position">1</property>
|
|
46
|
+
</packing>
|
|
47
|
+
</child>
|
|
48
|
+
<child>
|
|
49
|
+
<object class="GtkButton" id="blue_button">
|
|
50
|
+
<property name="label" translatable="yes">Blue</property>
|
|
51
|
+
<property name="visible">True</property>
|
|
52
|
+
<property name="can_focus">True</property>
|
|
53
|
+
<property name="receives_default">True</property>
|
|
54
|
+
</object>
|
|
55
|
+
<packing>
|
|
56
|
+
<property name="expand">False</property>
|
|
57
|
+
<property name="fill">True</property>
|
|
58
|
+
<property name="position">2</property>
|
|
59
|
+
</packing>
|
|
60
|
+
</child>
|
|
61
|
+
</object>
|
|
62
|
+
<packing>
|
|
63
|
+
<property name="resize">False</property>
|
|
64
|
+
<property name="shrink">True</property>
|
|
65
|
+
</packing>
|
|
66
|
+
</child>
|
|
67
|
+
<child>
|
|
68
|
+
<object class="GtkFrame">
|
|
69
|
+
<property name="visible">True</property>
|
|
70
|
+
<property name="can_focus">False</property>
|
|
71
|
+
<property name="label_xalign">0</property>
|
|
72
|
+
<property name="shadow_type">none</property>
|
|
73
|
+
<child>
|
|
74
|
+
<object class="GtkAlignment">
|
|
75
|
+
<property name="visible">True</property>
|
|
76
|
+
<property name="can_focus">False</property>
|
|
77
|
+
<property name="left_padding">12</property>
|
|
78
|
+
<child>
|
|
79
|
+
<placeholder/>
|
|
80
|
+
</child>
|
|
81
|
+
</object>
|
|
82
|
+
</child>
|
|
83
|
+
<child type="label">
|
|
84
|
+
<object class="GtkLabel">
|
|
85
|
+
<property name="visible">True</property>
|
|
86
|
+
<property name="can_focus">False</property>
|
|
87
|
+
<property name="margin_left">20</property>
|
|
88
|
+
<property name="margin_right">20</property>
|
|
89
|
+
<property name="margin_top">5</property>
|
|
90
|
+
<property name="margin_bottom">5</property>
|
|
91
|
+
<property name="label" translatable="yes">Click on a button to change the background color</property>
|
|
92
|
+
<property name="justify">center</property>
|
|
93
|
+
</object>
|
|
94
|
+
</child>
|
|
95
|
+
</object>
|
|
96
|
+
<packing>
|
|
97
|
+
<property name="resize">False</property>
|
|
98
|
+
<property name="shrink">False</property>
|
|
99
|
+
</packing>
|
|
100
|
+
</child>
|
|
101
|
+
</object>
|
|
102
|
+
</child>
|
|
103
|
+
</object>
|
|
104
|
+
</interface>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
require "gobject/gtk/autorun"
|
|
2
|
+
|
|
3
|
+
def changed(widget : Gtk::Editable)
|
|
4
|
+
puts Gtk::Entry.cast(widget).text
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
window = Gtk::Window.new(title: "Enter something!", border_width: 10)
|
|
8
|
+
window.connect "destroy", &->Gtk.main_quit
|
|
9
|
+
entry = Gtk::Entry.new
|
|
10
|
+
|
|
11
|
+
entry.on_changed(&->changed(Gtk::Editable))
|
|
12
|
+
|
|
13
|
+
window.add entry
|
|
14
|
+
window.show_all
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
require "gobject/gtk/autorun"
|
|
2
|
+
|
|
3
|
+
window = Gtk::Window.new(title: "Enter something!", border_width: 10)
|
|
4
|
+
window.connect "destroy", &->Gtk.main_quit
|
|
5
|
+
entry = Gtk::Entry.new
|
|
6
|
+
entry.on_activate do |entry|
|
|
7
|
+
puts entry.text
|
|
8
|
+
end
|
|
9
|
+
window.add entry
|
|
10
|
+
window.show_all
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
require "gobject/gtk/autorun"
|
|
2
|
+
|
|
3
|
+
window = Gtk::Window.new(title: "Hello World!", border_width: 10)
|
|
4
|
+
window.connect "destroy", &->Gtk.main_quit
|
|
5
|
+
button = Gtk::Button.new label: "Hello World!"
|
|
6
|
+
button.on_clicked do |button|
|
|
7
|
+
p! button
|
|
8
|
+
puts "Hello World!"
|
|
9
|
+
end
|
|
10
|
+
button.connect "clicked", &->window.destroy
|
|
11
|
+
window.add button
|
|
12
|
+
|
|
13
|
+
window.show_all
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
require "gobject/gtk"
|
|
2
|
+
require "gobject/gio"
|
|
3
|
+
|
|
4
|
+
class MyApplication < Gtk::Application
|
|
5
|
+
def initialize
|
|
6
|
+
super application_id: "org.example.application"
|
|
7
|
+
|
|
8
|
+
on_activate do
|
|
9
|
+
build_ui
|
|
10
|
+
|
|
11
|
+
setup_actions
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def setup_actions
|
|
16
|
+
quit_action = Gio::SimpleAction.new("quit", nil)
|
|
17
|
+
quit_action.on_activate { self.quit }
|
|
18
|
+
|
|
19
|
+
add_action(quit_action)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def build_ui
|
|
23
|
+
menu_template = "
|
|
24
|
+
<interface>
|
|
25
|
+
<menu id='app_menu'>
|
|
26
|
+
<submenu>
|
|
27
|
+
<attribute name='label'>_File</attribute>
|
|
28
|
+
|
|
29
|
+
<item>
|
|
30
|
+
<attribute name='label'>_Quit</attribute>
|
|
31
|
+
<attribute name='action'>app.quit</attribute>
|
|
32
|
+
<attribute name='accel'><Primary>q</attribute>
|
|
33
|
+
</item>
|
|
34
|
+
|
|
35
|
+
</submenu>
|
|
36
|
+
</menu>
|
|
37
|
+
</interface>
|
|
38
|
+
"
|
|
39
|
+
menu_builder = Gtk::Builder.new_from_string menu_template, menu_template.size
|
|
40
|
+
|
|
41
|
+
menu_model = Gio::MenuModel.cast menu_builder["app_menu"]
|
|
42
|
+
|
|
43
|
+
self.menubar = menu_model
|
|
44
|
+
|
|
45
|
+
window = Gtk::ApplicationWindow.new application: self, title: "Hello World",
|
|
46
|
+
default_width: 600, default_height: 400, icon_name: "applications-development"
|
|
47
|
+
|
|
48
|
+
menu = Gtk::Menu.new
|
|
49
|
+
menu.attach_to_widget(window, nil)
|
|
50
|
+
quit_item = Gtk::MenuItem.new label: "Quit"
|
|
51
|
+
quit_item.on_activate { self.quit }
|
|
52
|
+
menu.append(quit_item)
|
|
53
|
+
menu.show_all
|
|
54
|
+
|
|
55
|
+
window.on_button_press_event do |_, event|
|
|
56
|
+
if event.type.button_press? && event.button == Gdk::BUTTON_SECONDARY
|
|
57
|
+
menu.popup_at_pointer(event)
|
|
58
|
+
true
|
|
59
|
+
else
|
|
60
|
+
false
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
window.show_all
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
app = MyApplication.new
|
|
69
|
+
app.run
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
require "gobject/gtk"
|
|
2
|
+
|
|
3
|
+
class MyWindow < Gtk::ApplicationWindow
|
|
4
|
+
def self.new(app : Gtk::Application)
|
|
5
|
+
super
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
def initialize(ptr)
|
|
9
|
+
super(ptr)
|
|
10
|
+
|
|
11
|
+
self.border_width = 10
|
|
12
|
+
self.title = "Hello"
|
|
13
|
+
add Gtk::Label.new("Hello")
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
class MyApp < Gtk::Application
|
|
18
|
+
def initialize(**kwargs)
|
|
19
|
+
super
|
|
20
|
+
|
|
21
|
+
on_activate do |application|
|
|
22
|
+
window = MyWindow.new(self)
|
|
23
|
+
window.connect "destroy", &->quit
|
|
24
|
+
window.show_all
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
app = MyApp.new(application_id: "org.crystal.mysample")
|
|
30
|
+
app.run
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
require "gobject/gtk/autorun"
|
|
2
|
+
|
|
3
|
+
builder = Gtk::Builder.new_from_file("#{__DIR__}/gtk_tree_view.glade")
|
|
4
|
+
builder.connect_signals
|
|
5
|
+
|
|
6
|
+
# Insert something into the model
|
|
7
|
+
store = Gtk::TreeStore.cast(builder["tree_model"])
|
|
8
|
+
|
|
9
|
+
root = Gtk::TreeIter.new
|
|
10
|
+
store.append(root, nil)
|
|
11
|
+
store.set(root, {0}, {"Root"})
|
|
12
|
+
|
|
13
|
+
child = Gtk::TreeIter.new
|
|
14
|
+
store.append(child, root)
|
|
15
|
+
store.set(child, {0}, {"Child!"})
|
|
16
|
+
|
|
17
|
+
view = Gtk::TreeView.cast(builder["tree_view"])
|
|
18
|
+
view.on_row_activated do |view, path, column|
|
|
19
|
+
model = view.model.not_nil!
|
|
20
|
+
|
|
21
|
+
iter = Gtk::TreeIter.new
|
|
22
|
+
model.iter(iter, path)
|
|
23
|
+
|
|
24
|
+
value = model.value(iter, 0)
|
|
25
|
+
puts "You Clicked on #{value.as_s}"
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Show main view.
|
|
29
|
+
main_window = Gtk::Window.cast(builder["main_window"])
|
|
30
|
+
main_window.show_all
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!-- Generated with glade 3.22.2 -->
|
|
3
|
+
<interface>
|
|
4
|
+
<requires lib="gtk+" version="3.20"/>
|
|
5
|
+
<!-- Model object with 1 column -->
|
|
6
|
+
<object class="GtkTreeStore" id="tree_model">
|
|
7
|
+
<columns>
|
|
8
|
+
<column type="gchararray"/>
|
|
9
|
+
</columns>
|
|
10
|
+
</object>
|
|
11
|
+
<object class="GtkApplicationWindow" id="main_window">
|
|
12
|
+
<property name="can_focus">False</property>
|
|
13
|
+
<property name="default_width">200</property>
|
|
14
|
+
<property name="default_height">200</property>
|
|
15
|
+
<!-- Quit on destroy signal -->
|
|
16
|
+
<signal name="destroy" handler="gtk_main_quit" swapped="no"/>
|
|
17
|
+
<child type="titlebar">
|
|
18
|
+
<placeholder/>
|
|
19
|
+
</child>
|
|
20
|
+
<child>
|
|
21
|
+
<object class="GtkTreeView" id="tree_view">
|
|
22
|
+
<property name="visible">True</property>
|
|
23
|
+
<property name="can_focus">True</property>
|
|
24
|
+
<property name="model">tree_model</property>
|
|
25
|
+
<child>
|
|
26
|
+
<!-- Column view -->
|
|
27
|
+
<object class="GtkTreeViewColumn" id="treeviewcolumn">
|
|
28
|
+
<property name="title" translatable="yes">A column</property>
|
|
29
|
+
<child>
|
|
30
|
+
<!-- Column view renderer, going to use column 0 from model -->
|
|
31
|
+
<object class="GtkCellRendererText" id="renderer"/>
|
|
32
|
+
<attributes>
|
|
33
|
+
<attribute name="text">0</attribute>
|
|
34
|
+
</attributes>
|
|
35
|
+
</child>
|
|
36
|
+
</object>
|
|
37
|
+
</child>
|
|
38
|
+
<child internal-child="selection">
|
|
39
|
+
<object class="GtkTreeSelection"/>
|
|
40
|
+
</child>
|
|
41
|
+
</object>
|
|
42
|
+
</child>
|
|
43
|
+
</object>
|
|
44
|
+
</interface>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
require "gobject/g_lib"
|
|
2
|
+
|
|
3
|
+
GLib.timeout(1.second) do
|
|
4
|
+
puts "Every second"
|
|
5
|
+
true
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
GLib.timeout(1.5.seconds) do
|
|
10
|
+
puts "Every 1.5 seconds"
|
|
11
|
+
true
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
GLib.timeout_seconds(2) do
|
|
15
|
+
puts "Every 2 seconds"
|
|
16
|
+
true
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
GLib.timeout_milliseconds(2500) do
|
|
20
|
+
puts "Exactly every 2.5 seconds"
|
|
21
|
+
true
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# Make sure Crystal's signal handler fiber gets a chance to run
|
|
25
|
+
GLib.idle_add do
|
|
26
|
+
Fiber.yield
|
|
27
|
+
true
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
main_loop = GLib::MainLoop.new(nil, false)
|
|
31
|
+
Signal::INT.trap {
|
|
32
|
+
main_loop.quit
|
|
33
|
+
}
|
|
34
|
+
main_loop.run
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
shopt -s extglob
|
|
3
|
+
set -eo pipefail
|
|
4
|
+
|
|
5
|
+
cd samples
|
|
6
|
+
|
|
7
|
+
for sample in crout/*.cr; do
|
|
8
|
+
echo "Running $sample"
|
|
9
|
+
crystal $sample | crystal eval
|
|
10
|
+
done
|
|
11
|
+
|
|
12
|
+
for sample in $(ls *.cr */*.cr | grep -v crout); do
|
|
13
|
+
crystal ../script/run_with_timeout.cr "$sample"
|
|
14
|
+
done
|
|
15
|
+
|
|
16
|
+
cd ../
|
|
17
|
+
./script/test
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
set -e
|
|
4
|
+
|
|
5
|
+
version="$1"
|
|
6
|
+
if [ -z "$version" ]; then
|
|
7
|
+
echo "Usage: $0 <version>"
|
|
8
|
+
exit 1
|
|
9
|
+
fi
|
|
10
|
+
|
|
11
|
+
if [ "${version:0:1}" = "v" ]; then
|
|
12
|
+
version="${version:1:100}"
|
|
13
|
+
fi
|
|
14
|
+
|
|
15
|
+
if git tag --list | grep "v$version" >/dev/null; then
|
|
16
|
+
echo "Version $version already exists"
|
|
17
|
+
exit 1
|
|
18
|
+
fi
|
|
19
|
+
|
|
20
|
+
ised() {
|
|
21
|
+
sed -e "$1" "$2" > "$2.new"
|
|
22
|
+
mv -- "$2.new" "$2"
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
ised "s|version: ~> .*$|version: ~> $version|" README.md
|
|
26
|
+
ised "s|version: .*$|version: $version|" shard.yml
|
|
27
|
+
ised "s|VERSION\(.*\)= .*$|VERSION\1= \"$version\"|" src/gobject.cr
|
|
28
|
+
|
|
29
|
+
git commit -pm "Release v$version"
|
|
30
|
+
git tag "v$version"
|
|
31
|
+
git push origin main "+v$version"
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
file = ARGV[0]
|
|
2
|
+
print "Compiling #{file}... "
|
|
3
|
+
status = Process.run("crystal build '#{file}'", shell: true, output: :inherit, error: :inherit)
|
|
4
|
+
puts status.success? ? "ok." : "failed."
|
|
5
|
+
exit 1 unless status.success?
|
|
6
|
+
print "Running #{file}... "
|
|
7
|
+
exe = File.basename file, ".cr"
|
|
8
|
+
proc = Process.new("./#{exe}", shell: true, output: :inherit, error: :inherit)
|
|
9
|
+
sleep 5
|
|
10
|
+
success = proc.exists?
|
|
11
|
+
puts success ? "ok." : "failed."
|
|
12
|
+
exit 1 unless success
|
|
13
|
+
proc.signal :term
|
|
14
|
+
proc.wait
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
name: gobject
|
|
2
|
+
version: 0.10.0
|
|
3
|
+
authors:
|
|
4
|
+
- "Jonne Haß <me@jhass.eu>"
|
|
5
|
+
description: "GObject introspection based binding generator and generated bindings"
|
|
6
|
+
license: BSD-3-Clause
|
|
7
|
+
crystal: '~> 1.0'
|
|
8
|
+
libraries:
|
|
9
|
+
libgirepository: ~> 1.0
|
|
10
|
+
targets:
|
|
11
|
+
gi-generator:
|
|
12
|
+
main: src/generator/stage3.cr
|
|
13
|
+
gi-dump:
|
|
14
|
+
main: src/generator/dump.cr
|
|
15
|
+
gi-doc:
|
|
16
|
+
main: src/generator/doc.cr
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
require "./spec_helper"
|
|
2
|
+
|
|
3
|
+
describe "GObject Binding" do
|
|
4
|
+
it "works" do
|
|
5
|
+
subject = Test::Subject.new
|
|
6
|
+
str = "test"
|
|
7
|
+
subject.receive_string_and_len(str, str.bytesize).should eq("test-4")
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
describe "optional byte array" do
|
|
11
|
+
it "works with nil" do
|
|
12
|
+
subject = Test::Subject.new
|
|
13
|
+
subject.receive_optional_array_and_len(nil).should eq 0
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
it "works with a slice" do
|
|
17
|
+
subject = Test::Subject.new
|
|
18
|
+
buf = Bytes[23, 42]
|
|
19
|
+
subject.receive_optional_array_and_len(buf).should eq 2
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
describe "nullable parameters" do
|
|
24
|
+
it "can receive nil" do
|
|
25
|
+
subject = Test::Subject.new
|
|
26
|
+
subject.receive_nullable_object(nil).should eq(1)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
it "can receive nil" do
|
|
30
|
+
subject = Test::Subject.new
|
|
31
|
+
subject.receive_nullable_object(subject).should eq(0)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
describe "parameters named using Crystal keywords" do
|
|
36
|
+
it "works on gobject parameters" do
|
|
37
|
+
subject = Test::Subject.new
|
|
38
|
+
subject.receive_arguments_named_as_crystal_keywords(1, 2, 3, 4, 5, 6, 7, 8, 9).should eq(45)
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
it "works on plain structs" do
|
|
42
|
+
subject = Test::Struct.new(in: 42)
|
|
43
|
+
subject.in.should eq(42)
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
C_SOURCE=$(wildcard *.c)
|
|
2
|
+
H_SOURCE=$(wildcard *.h)
|
|
3
|
+
OBJ=$(C_SOURCE:.c=.o)
|
|
4
|
+
LIBRARY_NAME=test
|
|
5
|
+
LIBRARY_BIN=$(shell crystal eval "puts File.expand_path %(../build/lib$(LIBRARY_NAME).so)")
|
|
6
|
+
GIR=../build/Test-1.0.gir
|
|
7
|
+
TYPELIB=../build/Test-1.0.typelib
|
|
8
|
+
|
|
9
|
+
CC_FLAGS=-c -Wall -g -fPIC `pkg-config gobject-2.0 --cflags`
|
|
10
|
+
LD_FLAGS=`pkg-config gobject-2.0 --libs`
|
|
11
|
+
|
|
12
|
+
all: $(TYPELIB)
|
|
13
|
+
|
|
14
|
+
$(LIBRARY_BIN): $(OBJ)
|
|
15
|
+
mkdir -p ../build
|
|
16
|
+
$(CC) -shared -o $@ $^ $(LD_FLAGS)
|
|
17
|
+
|
|
18
|
+
%.o: %.c %.h
|
|
19
|
+
$(CC) -o $@ $< $(CC_FLAGS)
|
|
20
|
+
|
|
21
|
+
clean:
|
|
22
|
+
rm -rf *.o $(LIBRARY_BIN) *~ $(GIR) $(TYPELIB)
|
|
23
|
+
|
|
24
|
+
$(GIR): $(LIBRARY_BIN)
|
|
25
|
+
g-ir-scanner --warn-all --namespace=Test --nsversion=1.0 --include=GObject-2.0 /usr/ --library=$(LIBRARY_NAME) --library-path=../build --pkg=gobject-2.0 -o $(GIR) $(H_SOURCE)
|
|
26
|
+
|
|
27
|
+
$(TYPELIB): $(GIR)
|
|
28
|
+
g-ir-compiler $(GIR) -o $(TYPELIB)
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
#include "test-subject.h"
|
|
2
|
+
|
|
3
|
+
/* Private structure definition. */
|
|
4
|
+
typedef struct {
|
|
5
|
+
gchar *string;
|
|
6
|
+
} TestSubjectPrivate;
|
|
7
|
+
|
|
8
|
+
G_DEFINE_TYPE_WITH_PRIVATE(TestSubject, test_subject, G_TYPE_OBJECT)
|
|
9
|
+
|
|
10
|
+
typedef enum {
|
|
11
|
+
PROP_STRING = 1,
|
|
12
|
+
N_PROPERTIES
|
|
13
|
+
} TestSubjectProperty;
|
|
14
|
+
|
|
15
|
+
static GParamSpec *obj_properties[N_PROPERTIES] = { NULL, };
|
|
16
|
+
|
|
17
|
+
static void test_subject_dispose(GObject *gobject) {
|
|
18
|
+
// TestSubjectPrivate *priv = test_subject_get_instance_private(TEST_SUBJECT(gobject));
|
|
19
|
+
|
|
20
|
+
G_OBJECT_CLASS(test_subject_parent_class)->dispose(gobject);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
static void test_subject_finalize(GObject *gobject) {
|
|
24
|
+
TestSubjectPrivate *priv = test_subject_get_instance_private(TEST_SUBJECT(gobject));
|
|
25
|
+
|
|
26
|
+
g_free(priv->string);
|
|
27
|
+
|
|
28
|
+
G_OBJECT_CLASS(test_subject_parent_class)->finalize(gobject);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
static void test_subject_set_property(GObject *gobject, guint property_id, const GValue *value, GParamSpec *pspec) {
|
|
32
|
+
TestSubjectPrivate *priv = test_subject_get_instance_private(TEST_SUBJECT(gobject));
|
|
33
|
+
|
|
34
|
+
switch ((TestSubjectProperty) property_id) {
|
|
35
|
+
case PROP_STRING:
|
|
36
|
+
g_free(priv->string);
|
|
37
|
+
priv->string = g_value_dup_string(value);
|
|
38
|
+
break;
|
|
39
|
+
default:
|
|
40
|
+
G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, property_id, pspec);
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
static void test_subject_get_property(GObject *gobject, guint property_id, GValue *value, GParamSpec *pspec) {
|
|
46
|
+
TestSubjectPrivate *priv = test_subject_get_instance_private(TEST_SUBJECT(gobject));
|
|
47
|
+
|
|
48
|
+
switch ((TestSubjectProperty) property_id) {
|
|
49
|
+
case PROP_STRING:
|
|
50
|
+
g_value_set_string(value, priv->string);
|
|
51
|
+
break;
|
|
52
|
+
default:
|
|
53
|
+
/* We don't have any other property... */
|
|
54
|
+
G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, property_id, pspec);
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
static void test_subject_class_init(TestSubjectClass *klass) {
|
|
60
|
+
GObjectClass *object_class = G_OBJECT_CLASS(klass);
|
|
61
|
+
|
|
62
|
+
object_class->set_property = test_subject_set_property;
|
|
63
|
+
object_class->get_property = test_subject_get_property;
|
|
64
|
+
object_class->dispose = test_subject_dispose;
|
|
65
|
+
object_class->finalize = test_subject_finalize;
|
|
66
|
+
|
|
67
|
+
obj_properties[PROP_STRING] = g_param_spec_string("string", "String", "A string property.",
|
|
68
|
+
NULL /* default value */,
|
|
69
|
+
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE);
|
|
70
|
+
|
|
71
|
+
g_object_class_install_properties(object_class, N_PROPERTIES, obj_properties);
|
|
72
|
+
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
static void test_subject_init(TestSubject *self) {
|
|
76
|
+
// TestSubjectPrivate *priv = test_subject_instance_private(self);
|
|
77
|
+
|
|
78
|
+
/* initialize all public and private members to reasonable default values.
|
|
79
|
+
* They are all automatically initialized to 0 to begin with. */
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
TestSubject *test_subject_new(void) {
|
|
83
|
+
return g_object_new(TEST_TYPE_SUBJECT, NULL);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
gchar *test_subject_receive_string_and_len(TestSubject *self, gchar* str, int len) {
|
|
88
|
+
gchar* retval = (gchar*) g_malloc(128);
|
|
89
|
+
sprintf(retval, "%s-%d", str, len);
|
|
90
|
+
return retval;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
int test_subject_receive_optional_array_and_len(TestSubject *self, const char* buf, int len) {
|
|
94
|
+
if (len == 0 || buf == NULL) {
|
|
95
|
+
return 0;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
return len;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
int test_subject_receive_nullable_object(TestSubject *self, TestSubject* nullable) {
|
|
102
|
+
return nullable == NULL;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
int test_subject_receive_arguments_named_as_crystal_keywords(TestSubject *self_, int def, int alias, int module, int out, int begin, int self, int end, int abstract, int in) {
|
|
106
|
+
return def + alias + module + out + begin + self + end + abstract + in;
|
|
107
|
+
}
|