diff --git a/Rakefile b/Rakefile index 2c5375001..ee78786b2 100644 --- a/Rakefile +++ b/Rakefile @@ -82,7 +82,8 @@ task "create-dot-atom" do `mkdir "#{DOT_ATOM_PATH}"` `cp "#{dot_atom_template_path}/atom.coffee" "#{DOT_ATOM_PATH}"` `cp "#{dot_atom_template_path}/packages" "#{DOT_ATOM_PATH}"` - `cp -r "#{dot_atom_template_path}/themes" "#{DOT_ATOM_PATH}"` + `cp -r "#{ATOM_SRC_PATH}/themes" "#{DOT_ATOM_PATH}"` + `cp "#{ATOM_SRC_PATH}/vendor/themes/IR_Black.tmTheme" "#{DOT_ATOM_PATH}/themes"` end desc "Clone default bundles into vendor/bundles directory" diff --git a/atom.gyp b/atom.gyp index ff4abbcc3..b52c5b3ac 100644 --- a/atom.gyp +++ b/atom.gyp @@ -52,7 +52,7 @@ ], 'include_dirs': [ '.', 'cef', 'git2' ], 'mac_framework_dirs': [ 'native/frameworks' ], - 'libraries': [ 'native/frameworks/CocoaOniguruma.framework' ], + 'libraries': [ 'native/frameworks/CocoaOniguruma.framework', 'native/frameworks/Sparkle.framework'], 'sources': [ '<@(includes_common)', '<@(includes_wrapper)', @@ -71,6 +71,7 @@ 'mac_bundle_resources': [ 'native/mac/atom.icns', 'native/mac/file.icns', + 'native/mac/speakeasy.pem', 'native/mac/English.lproj/MainMenu.xib', 'native/mac/English.lproj/AtomWindow.xib', ], @@ -139,6 +140,7 @@ 'destination': '<(PRODUCT_DIR)/Atom.app/Contents/Frameworks', 'files': [ 'native/frameworks/CocoaOniguruma.framework', + 'native/frameworks/Sparkle.framework', ], }, { diff --git a/cef/Resources/am.lproj/locale.pak b/cef/Resources/am.lproj/locale.pak index 64d88a737..65189adb0 100644 Binary files a/cef/Resources/am.lproj/locale.pak and b/cef/Resources/am.lproj/locale.pak differ diff --git a/cef/Resources/ar.lproj/locale.pak b/cef/Resources/ar.lproj/locale.pak index 7c7dadcbe..fcbab5ebc 100644 Binary files a/cef/Resources/ar.lproj/locale.pak and b/cef/Resources/ar.lproj/locale.pak differ diff --git a/cef/Resources/bg.lproj/locale.pak b/cef/Resources/bg.lproj/locale.pak index ab6d0e6b0..6a462255a 100644 Binary files a/cef/Resources/bg.lproj/locale.pak and b/cef/Resources/bg.lproj/locale.pak differ diff --git a/cef/Resources/bn.lproj/locale.pak b/cef/Resources/bn.lproj/locale.pak index cea4fa839..895709a20 100644 Binary files a/cef/Resources/bn.lproj/locale.pak and b/cef/Resources/bn.lproj/locale.pak differ diff --git a/cef/Resources/ca.lproj/locale.pak b/cef/Resources/ca.lproj/locale.pak index 680e3b946..587b9e43e 100644 Binary files a/cef/Resources/ca.lproj/locale.pak and b/cef/Resources/ca.lproj/locale.pak differ diff --git a/cef/Resources/cef.pak b/cef/Resources/cef.pak index 3e99a98b5..f74178cd5 100644 Binary files a/cef/Resources/cef.pak and b/cef/Resources/cef.pak differ diff --git a/cef/Resources/cs.lproj/locale.pak b/cef/Resources/cs.lproj/locale.pak index c8de5bfb6..de45ea970 100644 Binary files a/cef/Resources/cs.lproj/locale.pak and b/cef/Resources/cs.lproj/locale.pak differ diff --git a/cef/Resources/da.lproj/locale.pak b/cef/Resources/da.lproj/locale.pak index 271b2c854..eff5594cc 100644 Binary files a/cef/Resources/da.lproj/locale.pak and b/cef/Resources/da.lproj/locale.pak differ diff --git a/cef/Resources/de.lproj/locale.pak b/cef/Resources/de.lproj/locale.pak index 836acc82c..58e3ecf6b 100644 Binary files a/cef/Resources/de.lproj/locale.pak and b/cef/Resources/de.lproj/locale.pak differ diff --git a/cef/Resources/devtools_resources.pak b/cef/Resources/devtools_resources.pak index eacab853a..4afa9320c 100644 Binary files a/cef/Resources/devtools_resources.pak and b/cef/Resources/devtools_resources.pak differ diff --git a/cef/Resources/el.lproj/locale.pak b/cef/Resources/el.lproj/locale.pak index 0bbaeeb29..90c7963fe 100644 Binary files a/cef/Resources/el.lproj/locale.pak and b/cef/Resources/el.lproj/locale.pak differ diff --git a/cef/Resources/en.lproj/locale.pak b/cef/Resources/en.lproj/locale.pak index bef874a76..0eeeefc13 100644 Binary files a/cef/Resources/en.lproj/locale.pak and b/cef/Resources/en.lproj/locale.pak differ diff --git a/cef/Resources/en_GB.lproj/locale.pak b/cef/Resources/en_GB.lproj/locale.pak index e8ad7cf61..90f29dc40 100644 Binary files a/cef/Resources/en_GB.lproj/locale.pak and b/cef/Resources/en_GB.lproj/locale.pak differ diff --git a/cef/Resources/es.lproj/locale.pak b/cef/Resources/es.lproj/locale.pak index 8d0ab7a2a..f835a1360 100644 Binary files a/cef/Resources/es.lproj/locale.pak and b/cef/Resources/es.lproj/locale.pak differ diff --git a/cef/Resources/es_419.lproj/locale.pak b/cef/Resources/es_419.lproj/locale.pak index 30498078c..bfbcdcac1 100644 Binary files a/cef/Resources/es_419.lproj/locale.pak and b/cef/Resources/es_419.lproj/locale.pak differ diff --git a/cef/Resources/et.lproj/locale.pak b/cef/Resources/et.lproj/locale.pak index 1038a6bc2..cefbf4dbc 100644 Binary files a/cef/Resources/et.lproj/locale.pak and b/cef/Resources/et.lproj/locale.pak differ diff --git a/cef/Resources/fa.lproj/locale.pak b/cef/Resources/fa.lproj/locale.pak index 4c23088ef..a4778379f 100644 Binary files a/cef/Resources/fa.lproj/locale.pak and b/cef/Resources/fa.lproj/locale.pak differ diff --git a/cef/Resources/fi.lproj/locale.pak b/cef/Resources/fi.lproj/locale.pak index f1305f0f2..305c8b4ff 100644 Binary files a/cef/Resources/fi.lproj/locale.pak and b/cef/Resources/fi.lproj/locale.pak differ diff --git a/cef/Resources/fil.lproj/locale.pak b/cef/Resources/fil.lproj/locale.pak index bee63ca17..0bdb2166a 100644 Binary files a/cef/Resources/fil.lproj/locale.pak and b/cef/Resources/fil.lproj/locale.pak differ diff --git a/cef/Resources/fr.lproj/locale.pak b/cef/Resources/fr.lproj/locale.pak index 0332894f0..a9211de68 100644 Binary files a/cef/Resources/fr.lproj/locale.pak and b/cef/Resources/fr.lproj/locale.pak differ diff --git a/cef/Resources/gu.lproj/locale.pak b/cef/Resources/gu.lproj/locale.pak index 6fb157209..6c3b22dc1 100644 Binary files a/cef/Resources/gu.lproj/locale.pak and b/cef/Resources/gu.lproj/locale.pak differ diff --git a/cef/Resources/he.lproj/locale.pak b/cef/Resources/he.lproj/locale.pak index 52ea44bc1..aae8411e3 100644 Binary files a/cef/Resources/he.lproj/locale.pak and b/cef/Resources/he.lproj/locale.pak differ diff --git a/cef/Resources/hi.lproj/locale.pak b/cef/Resources/hi.lproj/locale.pak index 24762e166..000033420 100644 Binary files a/cef/Resources/hi.lproj/locale.pak and b/cef/Resources/hi.lproj/locale.pak differ diff --git a/cef/Resources/hr.lproj/locale.pak b/cef/Resources/hr.lproj/locale.pak index 6b83baa08..b724a94ef 100644 Binary files a/cef/Resources/hr.lproj/locale.pak and b/cef/Resources/hr.lproj/locale.pak differ diff --git a/cef/Resources/hu.lproj/locale.pak b/cef/Resources/hu.lproj/locale.pak index 7f70c02dc..dd842fc21 100644 Binary files a/cef/Resources/hu.lproj/locale.pak and b/cef/Resources/hu.lproj/locale.pak differ diff --git a/cef/Resources/id.lproj/locale.pak b/cef/Resources/id.lproj/locale.pak index 4dab1e4b7..98826d0d1 100644 Binary files a/cef/Resources/id.lproj/locale.pak and b/cef/Resources/id.lproj/locale.pak differ diff --git a/cef/Resources/it.lproj/locale.pak b/cef/Resources/it.lproj/locale.pak index 1f0fb0804..663343821 100644 Binary files a/cef/Resources/it.lproj/locale.pak and b/cef/Resources/it.lproj/locale.pak differ diff --git a/cef/Resources/ja.lproj/locale.pak b/cef/Resources/ja.lproj/locale.pak index 5eaf4ac13..bc1f486fb 100644 Binary files a/cef/Resources/ja.lproj/locale.pak and b/cef/Resources/ja.lproj/locale.pak differ diff --git a/cef/Resources/kn.lproj/locale.pak b/cef/Resources/kn.lproj/locale.pak index 7558242f9..f25deb996 100644 Binary files a/cef/Resources/kn.lproj/locale.pak and b/cef/Resources/kn.lproj/locale.pak differ diff --git a/cef/Resources/ko.lproj/locale.pak b/cef/Resources/ko.lproj/locale.pak index 5bba4e89a..9600b505a 100644 Binary files a/cef/Resources/ko.lproj/locale.pak and b/cef/Resources/ko.lproj/locale.pak differ diff --git a/cef/Resources/lt.lproj/locale.pak b/cef/Resources/lt.lproj/locale.pak index e69c959dc..804667adc 100644 Binary files a/cef/Resources/lt.lproj/locale.pak and b/cef/Resources/lt.lproj/locale.pak differ diff --git a/cef/Resources/lv.lproj/locale.pak b/cef/Resources/lv.lproj/locale.pak index 242f7fca7..5027dd259 100644 Binary files a/cef/Resources/lv.lproj/locale.pak and b/cef/Resources/lv.lproj/locale.pak differ diff --git a/cef/Resources/ml.lproj/locale.pak b/cef/Resources/ml.lproj/locale.pak index 1ad1d3827..4ba5c4d40 100644 Binary files a/cef/Resources/ml.lproj/locale.pak and b/cef/Resources/ml.lproj/locale.pak differ diff --git a/cef/Resources/mr.lproj/locale.pak b/cef/Resources/mr.lproj/locale.pak index 2baa04f2f..35a709f9d 100644 Binary files a/cef/Resources/mr.lproj/locale.pak and b/cef/Resources/mr.lproj/locale.pak differ diff --git a/cef/Resources/ms.lproj/locale.pak b/cef/Resources/ms.lproj/locale.pak index 815faed74..6d1eb5d9c 100644 Binary files a/cef/Resources/ms.lproj/locale.pak and b/cef/Resources/ms.lproj/locale.pak differ diff --git a/cef/Resources/nb.lproj/locale.pak b/cef/Resources/nb.lproj/locale.pak index 3c5393181..500a994e1 100644 Binary files a/cef/Resources/nb.lproj/locale.pak and b/cef/Resources/nb.lproj/locale.pak differ diff --git a/cef/Resources/nl.lproj/locale.pak b/cef/Resources/nl.lproj/locale.pak index 111b53827..20aa175e2 100644 Binary files a/cef/Resources/nl.lproj/locale.pak and b/cef/Resources/nl.lproj/locale.pak differ diff --git a/cef/Resources/pl.lproj/locale.pak b/cef/Resources/pl.lproj/locale.pak index 2b67529ef..31af234a2 100644 Binary files a/cef/Resources/pl.lproj/locale.pak and b/cef/Resources/pl.lproj/locale.pak differ diff --git a/cef/Resources/pt_BR.lproj/locale.pak b/cef/Resources/pt_BR.lproj/locale.pak index 1753cb221..08adda03e 100644 Binary files a/cef/Resources/pt_BR.lproj/locale.pak and b/cef/Resources/pt_BR.lproj/locale.pak differ diff --git a/cef/Resources/pt_PT.lproj/locale.pak b/cef/Resources/pt_PT.lproj/locale.pak index c675b64c5..f1ec8f4e4 100644 Binary files a/cef/Resources/pt_PT.lproj/locale.pak and b/cef/Resources/pt_PT.lproj/locale.pak differ diff --git a/cef/Resources/ro.lproj/locale.pak b/cef/Resources/ro.lproj/locale.pak index 5803f4d99..7e8a7a973 100644 Binary files a/cef/Resources/ro.lproj/locale.pak and b/cef/Resources/ro.lproj/locale.pak differ diff --git a/cef/Resources/ru.lproj/locale.pak b/cef/Resources/ru.lproj/locale.pak index 0898db2be..03678ade9 100644 Binary files a/cef/Resources/ru.lproj/locale.pak and b/cef/Resources/ru.lproj/locale.pak differ diff --git a/cef/Resources/sk.lproj/locale.pak b/cef/Resources/sk.lproj/locale.pak index ecd4b58f1..7a0adfabe 100644 Binary files a/cef/Resources/sk.lproj/locale.pak and b/cef/Resources/sk.lproj/locale.pak differ diff --git a/cef/Resources/sl.lproj/locale.pak b/cef/Resources/sl.lproj/locale.pak index 65e48f409..a93192cfd 100644 Binary files a/cef/Resources/sl.lproj/locale.pak and b/cef/Resources/sl.lproj/locale.pak differ diff --git a/cef/Resources/sr.lproj/locale.pak b/cef/Resources/sr.lproj/locale.pak index 46031def3..9d17cb4f8 100644 Binary files a/cef/Resources/sr.lproj/locale.pak and b/cef/Resources/sr.lproj/locale.pak differ diff --git a/cef/Resources/sv.lproj/locale.pak b/cef/Resources/sv.lproj/locale.pak index 93978914c..82d18cf87 100644 Binary files a/cef/Resources/sv.lproj/locale.pak and b/cef/Resources/sv.lproj/locale.pak differ diff --git a/cef/Resources/sw.lproj/locale.pak b/cef/Resources/sw.lproj/locale.pak index 2851e2d4a..6f773aa10 100644 Binary files a/cef/Resources/sw.lproj/locale.pak and b/cef/Resources/sw.lproj/locale.pak differ diff --git a/cef/Resources/ta.lproj/locale.pak b/cef/Resources/ta.lproj/locale.pak index 7de840455..3a3aa4446 100644 Binary files a/cef/Resources/ta.lproj/locale.pak and b/cef/Resources/ta.lproj/locale.pak differ diff --git a/cef/Resources/te.lproj/locale.pak b/cef/Resources/te.lproj/locale.pak index bc6713b70..a225c5496 100644 Binary files a/cef/Resources/te.lproj/locale.pak and b/cef/Resources/te.lproj/locale.pak differ diff --git a/cef/Resources/th.lproj/locale.pak b/cef/Resources/th.lproj/locale.pak index 17807ac1b..d954eecb2 100644 Binary files a/cef/Resources/th.lproj/locale.pak and b/cef/Resources/th.lproj/locale.pak differ diff --git a/cef/Resources/tr.lproj/locale.pak b/cef/Resources/tr.lproj/locale.pak index 8b53ac274..fdbf850df 100644 Binary files a/cef/Resources/tr.lproj/locale.pak and b/cef/Resources/tr.lproj/locale.pak differ diff --git a/cef/Resources/uk.lproj/locale.pak b/cef/Resources/uk.lproj/locale.pak index a38a9aef0..0ef1824ba 100644 Binary files a/cef/Resources/uk.lproj/locale.pak and b/cef/Resources/uk.lproj/locale.pak differ diff --git a/cef/Resources/vi.lproj/locale.pak b/cef/Resources/vi.lproj/locale.pak index 25e6b7d81..3ac42090d 100644 Binary files a/cef/Resources/vi.lproj/locale.pak and b/cef/Resources/vi.lproj/locale.pak differ diff --git a/cef/Resources/zh_CN.lproj/locale.pak b/cef/Resources/zh_CN.lproj/locale.pak index d57ba6298..50ee386ae 100644 Binary files a/cef/Resources/zh_CN.lproj/locale.pak and b/cef/Resources/zh_CN.lproj/locale.pak differ diff --git a/cef/Resources/zh_TW.lproj/locale.pak b/cef/Resources/zh_TW.lproj/locale.pak index 71fea863d..0d00e83a2 100644 Binary files a/cef/Resources/zh_TW.lproj/locale.pak and b/cef/Resources/zh_TW.lproj/locale.pak differ diff --git a/cef/cef_paths.gypi b/cef/cef_paths.gypi index 03d045758..963603e8b 100644 --- a/cef/cef_paths.gypi +++ b/cef/cef_paths.gypi @@ -1,4 +1,4 @@ -# Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +# Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights # reserved. Use of this source code is governed by a BSD-style license that # can be found in the LICENSE file. # @@ -39,6 +39,7 @@ 'cef/include/cef_process_message.h', 'cef/include/cef_process_util.h', 'cef/include/cef_proxy_handler.h', + 'cef/include/cef_render_handler.h', 'cef/include/cef_render_process_handler.h', 'cef/include/cef_request.h', 'cef/include/cef_request_handler.h', @@ -86,6 +87,7 @@ 'cef/include/capi/cef_process_message_capi.h', 'cef/include/capi/cef_process_util_capi.h', 'cef/include/capi/cef_proxy_handler_capi.h', + 'cef/include/capi/cef_render_handler_capi.h', 'cef/include/capi/cef_render_process_handler_capi.h', 'cef/include/capi/cef_request_capi.h', 'cef/include/capi/cef_request_handler_capi.h', @@ -194,6 +196,8 @@ 'cef/libcef_dll/cpptoc/quota_callback_cpptoc.h', 'cef/libcef_dll/ctocpp/read_handler_ctocpp.cc', 'cef/libcef_dll/ctocpp/read_handler_ctocpp.h', + 'cef/libcef_dll/ctocpp/render_handler_ctocpp.cc', + 'cef/libcef_dll/ctocpp/render_handler_ctocpp.h', 'cef/libcef_dll/ctocpp/render_process_handler_ctocpp.cc', 'cef/libcef_dll/ctocpp/render_process_handler_ctocpp.h', 'cef/libcef_dll/cpptoc/request_cpptoc.cc', @@ -220,6 +224,8 @@ 'cef/libcef_dll/ctocpp/string_visitor_ctocpp.h', 'cef/libcef_dll/ctocpp/task_ctocpp.cc', 'cef/libcef_dll/ctocpp/task_ctocpp.h', + 'cef/libcef_dll/cpptoc/task_runner_cpptoc.cc', + 'cef/libcef_dll/cpptoc/task_runner_cpptoc.h', 'cef/libcef_dll/ctocpp/trace_client_ctocpp.cc', 'cef/libcef_dll/ctocpp/trace_client_ctocpp.h', 'cef/libcef_dll/cpptoc/urlrequest_cpptoc.cc', @@ -342,6 +348,8 @@ 'cef/libcef_dll/ctocpp/quota_callback_ctocpp.h', 'cef/libcef_dll/cpptoc/read_handler_cpptoc.cc', 'cef/libcef_dll/cpptoc/read_handler_cpptoc.h', + 'cef/libcef_dll/cpptoc/render_handler_cpptoc.cc', + 'cef/libcef_dll/cpptoc/render_handler_cpptoc.h', 'cef/libcef_dll/cpptoc/render_process_handler_cpptoc.cc', 'cef/libcef_dll/cpptoc/render_process_handler_cpptoc.h', 'cef/libcef_dll/ctocpp/request_ctocpp.cc', @@ -368,6 +376,8 @@ 'cef/libcef_dll/cpptoc/string_visitor_cpptoc.h', 'cef/libcef_dll/cpptoc/task_cpptoc.cc', 'cef/libcef_dll/cpptoc/task_cpptoc.h', + 'cef/libcef_dll/ctocpp/task_runner_ctocpp.cc', + 'cef/libcef_dll/ctocpp/task_runner_ctocpp.h', 'cef/libcef_dll/cpptoc/trace_client_cpptoc.cc', 'cef/libcef_dll/cpptoc/trace_client_cpptoc.h', 'cef/libcef_dll/ctocpp/urlrequest_ctocpp.cc', diff --git a/cef/cef_paths2.gypi b/cef/cef_paths2.gypi index 16fb32986..fadc4f101 100644 --- a/cef/cef_paths2.gypi +++ b/cef/cef_paths2.gypi @@ -98,11 +98,16 @@ 'tests/cefclient/dialog_test.h', 'tests/cefclient/dom_test.cpp', 'tests/cefclient/dom_test.h', + 'tests/cefclient/performance_test.cpp', + 'tests/cefclient/performance_test.h', + 'tests/cefclient/performance_test_setup.h', + 'tests/cefclient/performance_test_tests.cpp', 'tests/cefclient/res/binding.html', 'tests/cefclient/res/dialogs.html', 'tests/cefclient/res/domaccess.html', 'tests/cefclient/res/localstorage.html', 'tests/cefclient/res/logo.png', + 'tests/cefclient/res/performance.html', 'tests/cefclient/res/xmlhttprequest.html', 'tests/cefclient/resource_util.h', 'tests/cefclient/scheme_test.cpp', @@ -113,12 +118,17 @@ ], 'cefclient_sources_win': [ 'tests/cefclient/cefclient.rc', + 'tests/cefclient/cefclient_osr_widget_win.h', + 'tests/cefclient/cefclient_osr_widget_win.cpp', 'tests/cefclient/cefclient_win.cpp', 'tests/cefclient/client_handler_win.cpp', + 'tests/cefclient/osrenderer.h', + 'tests/cefclient/osrenderer.cpp', 'tests/cefclient/resource.h', 'tests/cefclient/res/cefclient.ico', 'tests/cefclient/res/logoball.png', 'tests/cefclient/res/small.ico', + 'tests/cefclient/res/transparency.html', 'tests/cefclient/resource_util_win.cpp', ], 'cefclient_sources_mac': [ @@ -143,6 +153,10 @@ 'tests/cefclient/dialog_test.h', 'tests/cefclient/dom_test.cpp', 'tests/cefclient/dom_test.h', + 'tests/cefclient/performance_test.cpp', + 'tests/cefclient/performance_test.h', + 'tests/cefclient/performance_test_setup.h', + 'tests/cefclient/performance_test_tests.cpp', 'tests/cefclient/process_helper_mac.cpp', 'tests/cefclient/resource_util.h', 'tests/cefclient/resource_util_mac.mm', @@ -162,6 +176,7 @@ 'tests/cefclient/res/domaccess.html', 'tests/cefclient/res/localstorage.html', 'tests/cefclient/res/logo.png', + 'tests/cefclient/res/performance.html', 'tests/cefclient/res/xmlhttprequest.html', ], 'cefclient_sources_linux': [ @@ -175,6 +190,7 @@ 'tests/cefclient/res/domaccess.html', 'tests/cefclient/res/localstorage.html', 'tests/cefclient/res/logo.png', + 'tests/cefclient/res/performance.html', 'tests/cefclient/res/xmlhttprequest.html', ], }, diff --git a/cef/frameworks/ffmpegsumo.so b/cef/frameworks/ffmpegsumo.so index 9a496f0d0..77a27dc6a 100755 Binary files a/cef/frameworks/ffmpegsumo.so and b/cef/frameworks/ffmpegsumo.so differ diff --git a/cef/frameworks/libcef.dylib b/cef/frameworks/libcef.dylib index 7bf869458..772bb935c 100755 Binary files a/cef/frameworks/libcef.dylib and b/cef/frameworks/libcef.dylib differ diff --git a/cef/include/capi/cef_app_capi.h b/cef/include/capi/cef_app_capi.h index e698171d0..77b641468 100644 --- a/cef/include/capi/cef_app_capi.h +++ b/cef/include/capi/cef_app_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are diff --git a/cef/include/capi/cef_browser_capi.h b/cef/include/capi/cef_browser_capi.h index e721cbece..b10c64c89 100644 --- a/cef/include/capi/cef_browser_capi.h +++ b/cef/include/capi/cef_browser_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -109,6 +109,13 @@ typedef struct _cef_browser_t { /// int (CEF_CALLBACK *get_identifier)(struct _cef_browser_t* self); + /// + // Returns true (1) if this object is pointing to the same handle as |that| + // object. + /// + int (CEF_CALLBACK *is_same)(struct _cef_browser_t* self, + struct _cef_browser_t* that); + /// // Returns true (1) if the window is a popup window. /// @@ -290,6 +297,71 @@ typedef struct _cef_browser_host_t { enum cef_file_dialog_mode_t mode, const cef_string_t* title, const cef_string_t* default_file_name, cef_string_list_t accept_types, struct _cef_run_file_dialog_callback_t* callback); + + /// + // Returns true (1) if window rendering is disabled. + /// + int (CEF_CALLBACK *is_window_rendering_disabled)( + struct _cef_browser_host_t* self); + + /// + // Notify the browser that the widget has been resized. The browser will first + // call cef_render_handler_t::GetViewRect to get the new size and then call + // cef_render_handler_t::OnPaint asynchronously with the updated regions. This + // function is only used when window rendering is disabled. + /// + void (CEF_CALLBACK *was_resized)(struct _cef_browser_host_t* self); + + /// + // Invalidate the |dirtyRect| region of the view. The browser will call + // cef_render_handler_t::OnPaint asynchronously with the updated regions. This + // function is only used when window rendering is disabled. + /// + void (CEF_CALLBACK *invalidate)(struct _cef_browser_host_t* self, + const cef_rect_t* dirtyRect, enum cef_paint_element_type_t type); + + /// + // Send a key event to the browser. + /// + void (CEF_CALLBACK *send_key_event)(struct _cef_browser_host_t* self, + const struct _cef_key_event_t* event); + + /// + // Send a mouse click event to the browser. The |x| and |y| coordinates are + // relative to the upper-left corner of the view. + /// + void (CEF_CALLBACK *send_mouse_click_event)(struct _cef_browser_host_t* self, + const struct _cef_mouse_event_t* event, + enum cef_mouse_button_type_t type, int mouseUp, int clickCount); + + /// + // Send a mouse move event to the browser. The |x| and |y| coordinates are + // relative to the upper-left corner of the view. + /// + void (CEF_CALLBACK *send_mouse_move_event)(struct _cef_browser_host_t* self, + const struct _cef_mouse_event_t* event, int mouseLeave); + + /// + // Send a mouse wheel event to the browser. The |x| and |y| coordinates are + // relative to the upper-left corner of the view. The |deltaX| and |deltaY| + // values represent the movement delta in the X and Y directions respectively. + // In order to scroll inside select popups with window rendering disabled + // cef_render_handler_t::GetScreenPoint should be implemented properly. + /// + void (CEF_CALLBACK *send_mouse_wheel_event)(struct _cef_browser_host_t* self, + const struct _cef_mouse_event_t* event, int deltaX, int deltaY); + + /// + // Send a focus event to the browser. + /// + void (CEF_CALLBACK *send_focus_event)(struct _cef_browser_host_t* self, + int setFocus); + + /// + // Send a capture lost event to the browser. + /// + void (CEF_CALLBACK *send_capture_lost_event)( + struct _cef_browser_host_t* self); } cef_browser_host_t; diff --git a/cef/include/capi/cef_browser_process_handler_capi.h b/cef/include/capi/cef_browser_process_handler_capi.h index 3c631175b..b41d66ef1 100644 --- a/cef/include/capi/cef_browser_process_handler_capi.h +++ b/cef/include/capi/cef_browser_process_handler_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -72,12 +72,26 @@ typedef struct _cef_browser_process_handler_t { struct _cef_browser_process_handler_t* self); /// - // Called on the browser process IO thread before a child process is launched. - // Provides an opportunity to modify the child process command line. + // Called before a child process is launched. Will be called on the browser + // process UI thread when launching a render process and on the browser + // process IO thread when launching a GPU or plugin process. Provides an + // opportunity to modify the child process command line. Do not keep a + // reference to |command_line| outside of this function. /// void (CEF_CALLBACK *on_before_child_process_launch)( struct _cef_browser_process_handler_t* self, struct _cef_command_line_t* command_line); + + /// + // Called on the browser process IO thread after the main thread has been + // created for a new render process. Provides an opportunity to specify extra + // information that will be passed to + // cef_render_process_handler_t::on_render_thread_created() in the render + // process. Do not keep a reference to |extra_info| outside of this function. + /// + void (CEF_CALLBACK *on_render_process_thread_created)( + struct _cef_browser_process_handler_t* self, + struct _cef_list_value_t* extra_info); } cef_browser_process_handler_t; diff --git a/cef/include/capi/cef_callback_capi.h b/cef/include/capi/cef_callback_capi.h index 8f5cbeb62..a6731efd7 100644 --- a/cef/include/capi/cef_callback_capi.h +++ b/cef/include/capi/cef_callback_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are diff --git a/cef/include/capi/cef_client_capi.h b/cef/include/capi/cef_client_capi.h index 87be6f7bf..cdb513d30 100644 --- a/cef/include/capi/cef_client_capi.h +++ b/cef/include/capi/cef_client_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -119,6 +119,12 @@ typedef struct _cef_client_t { struct _cef_load_handler_t* (CEF_CALLBACK *get_load_handler)( struct _cef_client_t* self); + /// + // Return the handler for off-screen rendering events. + /// + struct _cef_render_handler_t* (CEF_CALLBACK *get_render_handler)( + struct _cef_client_t* self); + /// // Return the handler for browser request events. /// diff --git a/cef/include/capi/cef_command_line_capi.h b/cef/include/capi/cef_command_line_capi.h index 70ce23352..0168c16c3 100644 --- a/cef/include/capi/cef_command_line_capi.h +++ b/cef/include/capi/cef_command_line_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are diff --git a/cef/include/capi/cef_context_menu_handler_capi.h b/cef/include/capi/cef_context_menu_handler_capi.h index 02989d9c4..c9282393e 100644 --- a/cef/include/capi/cef_context_menu_handler_capi.h +++ b/cef/include/capi/cef_context_menu_handler_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are diff --git a/cef/include/capi/cef_cookie_capi.h b/cef/include/capi/cef_cookie_capi.h index d5c6d9bb6..de795e921 100644 --- a/cef/include/capi/cef_cookie_capi.h +++ b/cef/include/capi/cef_cookie_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are diff --git a/cef/include/capi/cef_dialog_handler_capi.h b/cef/include/capi/cef_dialog_handler_capi.h index ede997663..bd7a2656c 100644 --- a/cef/include/capi/cef_dialog_handler_capi.h +++ b/cef/include/capi/cef_dialog_handler_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are diff --git a/cef/include/capi/cef_display_handler_capi.h b/cef/include/capi/cef_display_handler_capi.h index f2b68017a..9a329a8aa 100644 --- a/cef/include/capi/cef_display_handler_capi.h +++ b/cef/include/capi/cef_display_handler_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -80,7 +80,8 @@ typedef struct _cef_display_handler_t { // text that will be displayed in the tooltip. To handle the display of the // tooltip yourself return true (1). Otherwise, you can optionally modify // |text| and then return false (0) to allow the browser to display the - // tooltip. + // tooltip. When window rendering is disabled the application is responsible + // for drawing tooltips and the return value is ignored. /// int (CEF_CALLBACK *on_tooltip)(struct _cef_display_handler_t* self, struct _cef_browser_t* browser, cef_string_t* text); diff --git a/cef/include/capi/cef_dom_capi.h b/cef/include/capi/cef_dom_capi.h index 8b5b752ec..99f0055c1 100644 --- a/cef/include/capi/cef_dom_capi.h +++ b/cef/include/capi/cef_dom_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are diff --git a/cef/include/capi/cef_download_handler_capi.h b/cef/include/capi/cef_download_handler_capi.h index ef0821c27..658136b74 100644 --- a/cef/include/capi/cef_download_handler_capi.h +++ b/cef/include/capi/cef_download_handler_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are diff --git a/cef/include/capi/cef_download_item_capi.h b/cef/include/capi/cef_download_item_capi.h index c5ac8b5c5..5639eb53f 100644 --- a/cef/include/capi/cef_download_item_capi.h +++ b/cef/include/capi/cef_download_item_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -145,13 +145,6 @@ typedef struct _cef_download_item_t { // The resulting string must be freed by calling cef_string_userfree_free(). cef_string_userfree_t (CEF_CALLBACK *get_mime_type)( struct _cef_download_item_t* self); - - /// - // Returns the referrer character set. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t (CEF_CALLBACK *get_referrer_charset)( - struct _cef_download_item_t* self); } cef_download_item_t; diff --git a/cef/include/capi/cef_focus_handler_capi.h b/cef/include/capi/cef_focus_handler_capi.h index 04ee80d81..b0b2a34b6 100644 --- a/cef/include/capi/cef_focus_handler_capi.h +++ b/cef/include/capi/cef_focus_handler_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are diff --git a/cef/include/capi/cef_frame_capi.h b/cef/include/capi/cef_frame_capi.h index 88f0ae20d..c13a98dfb 100644 --- a/cef/include/capi/cef_frame_capi.h +++ b/cef/include/capi/cef_frame_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are diff --git a/cef/include/capi/cef_geolocation_capi.h b/cef/include/capi/cef_geolocation_capi.h index c74b0609a..c4ec6aa6a 100644 --- a/cef/include/capi/cef_geolocation_capi.h +++ b/cef/include/capi/cef_geolocation_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are diff --git a/cef/include/capi/cef_geolocation_handler_capi.h b/cef/include/capi/cef_geolocation_handler_capi.h index 30eca09a6..8a646b5ac 100644 --- a/cef/include/capi/cef_geolocation_handler_capi.h +++ b/cef/include/capi/cef_geolocation_handler_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are diff --git a/cef/include/capi/cef_jsdialog_handler_capi.h b/cef/include/capi/cef_jsdialog_handler_capi.h index a667b5a6b..4869f54ea 100644 --- a/cef/include/capi/cef_jsdialog_handler_capi.h +++ b/cef/include/capi/cef_jsdialog_handler_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are diff --git a/cef/include/capi/cef_keyboard_handler_capi.h b/cef/include/capi/cef_keyboard_handler_capi.h index abff51461..e01c150bf 100644 --- a/cef/include/capi/cef_keyboard_handler_capi.h +++ b/cef/include/capi/cef_keyboard_handler_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are diff --git a/cef/include/capi/cef_life_span_handler_capi.h b/cef/include/capi/cef_life_span_handler_capi.h index be5fe1290..0220e2667 100644 --- a/cef/include/capi/cef_life_span_handler_capi.h +++ b/cef/include/capi/cef_life_span_handler_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are diff --git a/cef/include/capi/cef_load_handler_capi.h b/cef/include/capi/cef_load_handler_capi.h index e707a8dd2..5ec9060ba 100644 --- a/cef/include/capi/cef_load_handler_capi.h +++ b/cef/include/capi/cef_load_handler_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are diff --git a/cef/include/capi/cef_menu_model_capi.h b/cef/include/capi/cef_menu_model_capi.h index 6a4179998..d0c7af323 100644 --- a/cef/include/capi/cef_menu_model_capi.h +++ b/cef/include/capi/cef_menu_model_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are diff --git a/cef/include/capi/cef_origin_whitelist_capi.h b/cef/include/capi/cef_origin_whitelist_capi.h index 917ec861e..8dde4c1c5 100644 --- a/cef/include/capi/cef_origin_whitelist_capi.h +++ b/cef/include/capi/cef_origin_whitelist_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are diff --git a/cef/include/capi/cef_path_util_capi.h b/cef/include/capi/cef_path_util_capi.h index 3df1a100a..847a283ae 100644 --- a/cef/include/capi/cef_path_util_capi.h +++ b/cef/include/capi/cef_path_util_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are diff --git a/cef/include/capi/cef_process_message_capi.h b/cef/include/capi/cef_process_message_capi.h index 2b072dcf7..cc00a3c77 100644 --- a/cef/include/capi/cef_process_message_capi.h +++ b/cef/include/capi/cef_process_message_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are diff --git a/cef/include/capi/cef_process_util_capi.h b/cef/include/capi/cef_process_util_capi.h index 53ccbb2c1..066a461e6 100644 --- a/cef/include/capi/cef_process_util_capi.h +++ b/cef/include/capi/cef_process_util_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are diff --git a/cef/include/capi/cef_proxy_handler_capi.h b/cef/include/capi/cef_proxy_handler_capi.h index 2628002d6..1ed15c560 100644 --- a/cef/include/capi/cef_proxy_handler_capi.h +++ b/cef/include/capi/cef_proxy_handler_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are diff --git a/cef/include/capi/cef_render_handler_capi.h b/cef/include/capi/cef_render_handler_capi.h new file mode 100644 index 000000000..da57b65ec --- /dev/null +++ b/cef/include/capi/cef_render_handler_capi.h @@ -0,0 +1,118 @@ +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the name Chromium Embedded +// Framework nor the names of its contributors may be used to endorse +// or promote products derived from this software without specific prior +// written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// --------------------------------------------------------------------------- +// +// This file was generated by the CEF translator tool and should not edited +// by hand. See the translator.README.txt file in the tools directory for +// more information. +// + +#ifndef CEF_INCLUDE_CAPI_CEF_RENDER_HANDLER_CAPI_H_ +#define CEF_INCLUDE_CAPI_CEF_RENDER_HANDLER_CAPI_H_ +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +#include "include/capi/cef_base_capi.h" + + +/// +// Implement this structure to handle events when window rendering is disabled. +// The functions of this structure will be called on the UI thread. +/// +typedef struct _cef_render_handler_t { + /// + // Base structure. + /// + cef_base_t base; + + /// + // Called to retrieve the root window rectangle in screen coordinates. Return + // true (1) if the rectangle was provided. + /// + int (CEF_CALLBACK *get_root_screen_rect)(struct _cef_render_handler_t* self, + struct _cef_browser_t* browser, cef_rect_t* rect); + + /// + // Called to retrieve the view rectangle which is relative to screen + // coordinates. Return true (1) if the rectangle was provided. + /// + int (CEF_CALLBACK *get_view_rect)(struct _cef_render_handler_t* self, + struct _cef_browser_t* browser, cef_rect_t* rect); + + /// + // Called to retrieve the translation from view coordinates to actual screen + // coordinates. Return true (1) if the screen coordinates were provided. + /// + int (CEF_CALLBACK *get_screen_point)(struct _cef_render_handler_t* self, + struct _cef_browser_t* browser, int viewX, int viewY, int* screenX, + int* screenY); + + /// + // Called when the browser wants to show or hide the popup widget. The popup + // should be shown if |show| is true (1) and hidden if |show| is false (0). + /// + void (CEF_CALLBACK *on_popup_show)(struct _cef_render_handler_t* self, + struct _cef_browser_t* browser, int show); + + /// + // Called when the browser wants to move or resize the popup widget. |rect| + // contains the new location and size. + /// + void (CEF_CALLBACK *on_popup_size)(struct _cef_render_handler_t* self, + struct _cef_browser_t* browser, const cef_rect_t* rect); + + /// + // Called when an element should be painted. |type| indicates whether the + // element is the view or the popup widget. |buffer| contains the pixel data + // for the whole image. |dirtyRects| contains the set of rectangles that need + // to be repainted. On Windows |buffer| will be |width|*|height|*4 bytes in + // size and represents a BGRA image with an upper-left origin. + /// + void (CEF_CALLBACK *on_paint)(struct _cef_render_handler_t* self, + struct _cef_browser_t* browser, enum cef_paint_element_type_t type, + size_t dirtyRectsCount, cef_rect_t const* dirtyRects, const void* buffer, + int width, int height); + + /// + // Called when the browser window's cursor has changed. + /// + void (CEF_CALLBACK *on_cursor_change)(struct _cef_render_handler_t* self, + struct _cef_browser_t* browser, cef_cursor_handle_t cursor); +} cef_render_handler_t; + + +#ifdef __cplusplus +} +#endif + +#endif // CEF_INCLUDE_CAPI_CEF_RENDER_HANDLER_CAPI_H_ diff --git a/cef/include/capi/cef_render_process_handler_capi.h b/cef/include/capi/cef_render_process_handler_capi.h index 6ff24d0b7..13949fe8a 100644 --- a/cef/include/capi/cef_render_process_handler_capi.h +++ b/cef/include/capi/cef_render_process_handler_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -47,7 +47,8 @@ extern "C" { /// // Structure used to implement render process callbacks. The functions of this -// structure will always be called on the render process main thread. +// structure will be called on the render process main thread (TID_RENDERER) +// unless otherwise indicated. /// typedef struct _cef_render_process_handler_t { /// @@ -56,10 +57,14 @@ typedef struct _cef_render_process_handler_t { cef_base_t base; /// - // Called after the render process main thread has been created. + // Called after the render process main thread has been created. |extra_info| + // is a read-only value originating from + // cef_browser_process_handler_t::on_render_process_thread_created(). Do not + // keep a reference to |extra_info| outside of this function. /// void (CEF_CALLBACK *on_render_thread_created)( - struct _cef_render_process_handler_t* self); + struct _cef_render_process_handler_t* self, + struct _cef_list_value_t* extra_info); /// // Called after WebKit has been initialized. @@ -68,7 +73,9 @@ typedef struct _cef_render_process_handler_t { struct _cef_render_process_handler_t* self); /// - // Called after a browser has been created. + // Called after a browser has been created. When browsing cross-origin a new + // browser will be created before the old browser with the same identifier is + // destroyed. /// void (CEF_CALLBACK *on_browser_created)( struct _cef_render_process_handler_t* self, @@ -81,10 +88,24 @@ typedef struct _cef_render_process_handler_t { struct _cef_render_process_handler_t* self, struct _cef_browser_t* browser); + /// + // Called before browser navigation. Return true (1) to cancel the navigation + // or false (0) to allow the navigation to proceed. The |request| object + // cannot be modified in this callback. + /// + int (CEF_CALLBACK *on_before_navigation)( + struct _cef_render_process_handler_t* self, + struct _cef_browser_t* browser, struct _cef_frame_t* frame, + struct _cef_request_t* request, + enum cef_navigation_type_t navigation_type, int is_redirect); + /// // Called immediately after the V8 context for a frame has been created. To // retrieve the JavaScript 'window' object use the - // cef_v8context_t::get_global() function. + // cef_v8context_t::get_global() function. V8 handles can only be accessed + // from the thread on which they are created. A task runner for posting tasks + // on the associated thread can be retrieved via the + // cef_v8context_t::get_task_runner() function. /// void (CEF_CALLBACK *on_context_created)( struct _cef_render_process_handler_t* self, @@ -100,6 +121,50 @@ typedef struct _cef_render_process_handler_t { struct _cef_browser_t* browser, struct _cef_frame_t* frame, struct _cef_v8context_t* context); + /// + // Called for global uncaught exceptions in a frame. Execution of this + // callback is disabled by default. To enable set + // CefSettings.uncaught_exception_stack_size > 0. + /// + void (CEF_CALLBACK *on_uncaught_exception)( + struct _cef_render_process_handler_t* self, + struct _cef_browser_t* browser, struct _cef_frame_t* frame, + struct _cef_v8context_t* context, struct _cef_v8exception_t* exception, + struct _cef_v8stack_trace_t* stackTrace); + + /// + // Called on the WebWorker thread immediately after the V8 context for a new + // WebWorker has been created. To retrieve the JavaScript 'self' object use + // the cef_v8context_t::get_global() function. V8 handles can only be accessed + // from the thread on which they are created. A task runner for posting tasks + // on the associated thread can be retrieved via the + // cef_v8context_t::get_task_runner() function. + /// + void (CEF_CALLBACK *on_worker_context_created)( + struct _cef_render_process_handler_t* self, int worker_id, + const cef_string_t* url, struct _cef_v8context_t* context); + + /// + // Called on the WebWorker thread immediately before the V8 context for a + // WebWorker is released. No references to the context should be kept after + // this function is called. Any tasks posted or pending on the WebWorker + // thread after this function is called may not be executed. + /// + void (CEF_CALLBACK *on_worker_context_released)( + struct _cef_render_process_handler_t* self, int worker_id, + const cef_string_t* url, struct _cef_v8context_t* context); + + /// + // Called on the WebWorker thread for global uncaught exceptions in a + // WebWorker. Execution of this callback is disabled by default. To enable set + // CefSettings.uncaught_exception_stack_size > 0. + /// + void (CEF_CALLBACK *on_worker_uncaught_exception)( + struct _cef_render_process_handler_t* self, int worker_id, + const cef_string_t* url, struct _cef_v8context_t* context, + struct _cef_v8exception_t* exception, + struct _cef_v8stack_trace_t* stackTrace); + /// // Called when a new node in the the browser gets focus. The |node| value may // be NULL if no specific node has gained focus. The node object passed to diff --git a/cef/include/capi/cef_request_capi.h b/cef/include/capi/cef_request_capi.h index a28d4754d..da895f362 100644 --- a/cef/include/capi/cef_request_capi.h +++ b/cef/include/capi/cef_request_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are diff --git a/cef/include/capi/cef_request_handler_capi.h b/cef/include/capi/cef_request_handler_capi.h index 1a21cadf8..d2a9477d2 100644 --- a/cef/include/capi/cef_request_handler_capi.h +++ b/cef/include/capi/cef_request_handler_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -132,9 +132,8 @@ typedef struct _cef_request_handler_t { // Called on the IO thread when the browser needs credentials from the user. // |isProxy| indicates whether the host is a proxy server. |host| contains the // hostname and |port| contains the port number. Return true (1) to continue - // the request and call cef_auth_callback_t::Complete() when the - // authentication information is available. Return false (0) to cancel the - // request. + // the request and call cef_auth_callback_t::cont() when the authentication + // information is available. Return false (0) to cancel the request. /// int (CEF_CALLBACK *get_auth_credentials)(struct _cef_request_handler_t* self, struct _cef_browser_t* browser, struct _cef_frame_t* frame, int isProxy, @@ -145,9 +144,9 @@ typedef struct _cef_request_handler_t { // Called on the IO thread when JavaScript requests a specific storage quota // size via the webkitStorageInfo.requestQuota function. |origin_url| is the // origin of the page making the request. |new_size| is the requested quota - // size in bytes. Return true (1) and call cef_quota_callback_t::Complete() - // either in this function or at a later time to grant or deny the request. - // Return false (0) to cancel the request. + // size in bytes. Return true (1) and call cef_quota_callback_t::cont() either + // in this function or at a later time to grant or deny the request. Return + // false (0) to cancel the request. /// int (CEF_CALLBACK *on_quota_request)(struct _cef_request_handler_t* self, struct _cef_browser_t* browser, const cef_string_t* origin_url, diff --git a/cef/include/capi/cef_resource_bundle_handler_capi.h b/cef/include/capi/cef_resource_bundle_handler_capi.h index e81d7f947..62a90c04e 100644 --- a/cef/include/capi/cef_resource_bundle_handler_capi.h +++ b/cef/include/capi/cef_resource_bundle_handler_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are diff --git a/cef/include/capi/cef_resource_handler_capi.h b/cef/include/capi/cef_resource_handler_capi.h index b55c41202..5f2d8384b 100644 --- a/cef/include/capi/cef_resource_handler_capi.h +++ b/cef/include/capi/cef_resource_handler_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are diff --git a/cef/include/capi/cef_response_capi.h b/cef/include/capi/cef_response_capi.h index 5dd682ae4..f583b1343 100644 --- a/cef/include/capi/cef_response_capi.h +++ b/cef/include/capi/cef_response_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are diff --git a/cef/include/capi/cef_scheme_capi.h b/cef/include/capi/cef_scheme_capi.h index 3e9622eb9..8eea0201c 100644 --- a/cef/include/capi/cef_scheme_capi.h +++ b/cef/include/capi/cef_scheme_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are diff --git a/cef/include/capi/cef_stream_capi.h b/cef/include/capi/cef_stream_capi.h index f73fa39c3..e4b32b597 100644 --- a/cef/include/capi/cef_stream_capi.h +++ b/cef/include/capi/cef_stream_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are diff --git a/cef/include/capi/cef_string_visitor_capi.h b/cef/include/capi/cef_string_visitor_capi.h index aa628faae..13407ccd8 100644 --- a/cef/include/capi/cef_string_visitor_capi.h +++ b/cef/include/capi/cef_string_visitor_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are diff --git a/cef/include/capi/cef_task_capi.h b/cef/include/capi/cef_task_capi.h index 75b6ee3ed..e4deec516 100644 --- a/cef/include/capi/cef_task_capi.h +++ b/cef/include/capi/cef_task_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -46,33 +46,33 @@ extern "C" { /// -// CEF maintains multiple internal threads that are used for handling different -// types of tasks in different processes. See the cef_thread_id_t definitions in -// cef_types.h for more information. This function will return true (1) if -// called on the specified thread. It is an error to request a thread from the -// wrong process. +// Returns true (1) if called on the specified thread. Equivalent to using +// cef_task_runner_t::GetForThread(threadId)->belongs_to_current_thread(). /// CEF_EXPORT int cef_currently_on(cef_thread_id_t threadId); /// -// Post a task for execution on the specified thread. This function may be -// called on any thread. It is an error to request a thread from the wrong -// process. +// Post a task for execution on the specified thread. Equivalent to using +// cef_task_runner_t::GetForThread(threadId)->PostTask(task). /// CEF_EXPORT int cef_post_task(cef_thread_id_t threadId, struct _cef_task_t* task); /// -// Post a task for delayed execution on the specified thread. This function may -// be called on any thread. It is an error to request a thread from the wrong -// process. +// Post a task for delayed execution on the specified thread. Equivalent to +// using cef_task_runner_t::GetForThread(threadId)->PostDelayedTask(task, +// delay_ms). /// CEF_EXPORT int cef_post_delayed_task(cef_thread_id_t threadId, struct _cef_task_t* task, int64 delay_ms); /// -// Implement this structure for task execution. The functions of this structure -// may be called on any thread. +// Implement this structure for asynchronous task execution. If the task is +// posted successfully and if the associated message loop is still running then +// the execute() function will be called on the target thread. If the task fails +// to post then the task object may be destroyed on the source thread instead of +// the target thread. For this reason be cautious when performing work in the +// task object destructor. /// typedef struct _cef_task_t { /// @@ -81,13 +81,78 @@ typedef struct _cef_task_t { cef_base_t base; /// - // Method that will be executed. |threadId| is the thread executing the call. + // Method that will be executed on the target thread. /// - void (CEF_CALLBACK *execute)(struct _cef_task_t* self, - cef_thread_id_t threadId); + void (CEF_CALLBACK *execute)(struct _cef_task_t* self); } cef_task_t; +/// +// Structure that asynchronously executes tasks on the associated thread. It is +// safe to call the functions of this structure on any thread. +// +// CEF maintains multiple internal threads that are used for handling different +// types of tasks in different processes. The cef_thread_id_t definitions in +// cef_types.h list the common CEF threads. Task runners are also available for +// other CEF threads as appropriate (for example, V8 WebWorker threads). +/// +typedef struct _cef_task_runner_t { + /// + // Base structure. + /// + cef_base_t base; + + /// + // Returns true (1) if this object is pointing to the same task runner as + // |that| object. + /// + int (CEF_CALLBACK *is_same)(struct _cef_task_runner_t* self, + struct _cef_task_runner_t* that); + + /// + // Returns true (1) if this task runner belongs to the current thread. + /// + int (CEF_CALLBACK *belongs_to_current_thread)( + struct _cef_task_runner_t* self); + + /// + // Returns true (1) if this task runner is for the specified CEF thread. + /// + int (CEF_CALLBACK *belongs_to_thread)(struct _cef_task_runner_t* self, + cef_thread_id_t threadId); + + /// + // Post a task for execution on the thread associated with this task runner. + // Execution will occur asynchronously. + /// + int (CEF_CALLBACK *post_task)(struct _cef_task_runner_t* self, + struct _cef_task_t* task); + + /// + // Post a task for delayed execution on the thread associated with this task + // runner. Execution will occur asynchronously. Delayed tasks are not + // supported on V8 WebWorker threads and will be executed without the + // specified delay. + /// + int (CEF_CALLBACK *post_delayed_task)(struct _cef_task_runner_t* self, + struct _cef_task_t* task, int64 delay_ms); +} cef_task_runner_t; + + +/// +// Returns the task runner for the current thread. Only CEF threads will have +// task runners. An NULL reference will be returned if this function is called +// on an invalid thread. +/// +CEF_EXPORT cef_task_runner_t* cef_task_runner_get_for_current_thread(); + +/// +// Returns the task runner for the specified CEF thread. +/// +CEF_EXPORT cef_task_runner_t* cef_task_runner_get_for_thread( + cef_thread_id_t threadId); + + #ifdef __cplusplus } #endif diff --git a/cef/include/capi/cef_trace_capi.h b/cef/include/capi/cef_trace_capi.h index 2f1d0dac3..d3ba7868b 100644 --- a/cef/include/capi/cef_trace_capi.h +++ b/cef/include/capi/cef_trace_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are diff --git a/cef/include/capi/cef_url_capi.h b/cef/include/capi/cef_url_capi.h index 757875b39..b0fdcd22b 100644 --- a/cef/include/capi/cef_url_capi.h +++ b/cef/include/capi/cef_url_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are diff --git a/cef/include/capi/cef_urlrequest_capi.h b/cef/include/capi/cef_urlrequest_capi.h index 29e111e9b..23100feeb 100644 --- a/cef/include/capi/cef_urlrequest_capi.h +++ b/cef/include/capi/cef_urlrequest_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are diff --git a/cef/include/capi/cef_v8_capi.h b/cef/include/capi/cef_v8_capi.h index 03dc58661..7ec761d6f 100644 --- a/cef/include/capi/cef_v8_capi.h +++ b/cef/include/capi/cef_v8_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -105,8 +105,11 @@ CEF_EXPORT int cef_register_extension(const cef_string_t* extension_name, const cef_string_t* javascript_code, struct _cef_v8handler_t* handler); /// -// Structure that encapsulates a V8 context handle. The functions of this -// structure may only be called on the render process main thread. +// Structure representing a V8 context handle. V8 handles can only be accessed +// from the thread on which they are created. Valid threads for creating a V8 +// handle include the render process main thread (TID_RENDERER) and WebWorker +// threads. A task runner for posting tasks on the associated thread can be +// retrieved via the cef_v8context_t::get_task_runner() function. /// typedef struct _cef_v8context_t { /// @@ -115,13 +118,30 @@ typedef struct _cef_v8context_t { cef_base_t base; /// - // Returns the browser for this context. + // Returns the task runner associated with this context. V8 handles can only + // be accessed from the thread on which they are created. This function can be + // called on any render process thread. + /// + struct _cef_task_runner_t* (CEF_CALLBACK *get_task_runner)( + struct _cef_v8context_t* self); + + /// + // Returns true (1) if the underlying handle is valid and it can be accessed + // on the current thread. Do not call any other functions if this function + // returns false (0). + /// + int (CEF_CALLBACK *is_valid)(struct _cef_v8context_t* self); + + /// + // Returns the browser for this context. This function will return an NULL + // reference for WebWorker contexts. /// struct _cef_browser_t* (CEF_CALLBACK *get_browser)( struct _cef_v8context_t* self); /// - // Returns the frame for this context. + // Returns the frame for this context. This function will return an NULL + // reference for WebWorker contexts. /// struct _cef_frame_t* (CEF_CALLBACK *get_frame)(struct _cef_v8context_t* self); @@ -184,8 +204,8 @@ CEF_EXPORT int cef_v8context_in_context(); /// // Structure that should be implemented to handle V8 function calls. The -// functions of this structure will always be called on the render process main -// thread. +// functions of this structure will be called on the thread associated with the +// V8 function. /// typedef struct _cef_v8handler_t { /// @@ -210,8 +230,8 @@ typedef struct _cef_v8handler_t { /// // Structure that should be implemented to handle V8 accessor calls. Accessor // identifiers are registered by calling cef_v8value_t::set_value_byaccessor(). -// The functions of this structure will always be called on the render process -// main thread. +// The functions of this structure will be called on the thread associated with +// the V8 accessor. /// typedef struct _cef_v8accessor_t { /// @@ -244,7 +264,8 @@ typedef struct _cef_v8accessor_t { /// -// Structure representing a V8 exception. +// Structure representing a V8 exception. The functions of this structure may be +// called on any render process thread. /// typedef struct _cef_v8exception_t { /// @@ -307,8 +328,11 @@ typedef struct _cef_v8exception_t { /// -// Structure representing a V8 value. The functions of this structure may only -// be called on the render process main thread. +// Structure representing a V8 value handle. V8 handles can only be accessed +// from the thread on which they are created. Valid threads for creating a V8 +// handle include the render process main thread (TID_RENDERER) and WebWorker +// threads. A task runner for posting tasks on the associated thread can be +// retrieved via the cef_v8context_t::get_task_runner() function. /// typedef struct _cef_v8value_t { /// @@ -316,6 +340,13 @@ typedef struct _cef_v8value_t { /// cef_base_t base; + /// + // Returns true (1) if the underlying handle is valid and it can be accessed + // on the current thread. Do not call any other functions if this function + // returns false (0). + /// + int (CEF_CALLBACK *is_valid)(struct _cef_v8value_t* self); + /// // True if the value type is undefined. /// @@ -701,8 +732,11 @@ CEF_EXPORT cef_v8value_t* cef_v8value_create_function(const cef_string_t* name, /// -// Structure representing a V8 stack trace. The functions of this structure may -// only be called on the render process main thread. +// Structure representing a V8 stack trace handle. V8 handles can only be +// accessed from the thread on which they are created. Valid threads for +// creating a V8 handle include the render process main thread (TID_RENDERER) +// and WebWorker threads. A task runner for posting tasks on the associated +// thread can be retrieved via the cef_v8context_t::get_task_runner() function. /// typedef struct _cef_v8stack_trace_t { /// @@ -710,6 +744,13 @@ typedef struct _cef_v8stack_trace_t { /// cef_base_t base; + /// + // Returns true (1) if the underlying handle is valid and it can be accessed + // on the current thread. Do not call any other functions if this function + // returns false (0). + /// + int (CEF_CALLBACK *is_valid)(struct _cef_v8stack_trace_t* self); + /// // Returns the number of stack frames. /// @@ -731,8 +772,11 @@ CEF_EXPORT cef_v8stack_trace_t* cef_v8stack_trace_get_current(int frame_limit); /// -// Structure representing a V8 stack frame. The functions of this structure may -// only be called on the render process main thread. +// Structure representing a V8 stack frame handle. V8 handles can only be +// accessed from the thread on which they are created. Valid threads for +// creating a V8 handle include the render process main thread (TID_RENDERER) +// and WebWorker threads. A task runner for posting tasks on the associated +// thread can be retrieved via the cef_v8context_t::get_task_runner() function. /// typedef struct _cef_v8stack_frame_t { /// @@ -740,6 +784,13 @@ typedef struct _cef_v8stack_frame_t { /// cef_base_t base; + /// + // Returns true (1) if the underlying handle is valid and it can be accessed + // on the current thread. Do not call any other functions if this function + // returns false (0). + /// + int (CEF_CALLBACK *is_valid)(struct _cef_v8stack_frame_t* self); + /// // Returns the name of the resource script that contains the function. /// diff --git a/cef/include/capi/cef_values_capi.h b/cef/include/capi/cef_values_capi.h index 712474a09..ed59fa4fc 100644 --- a/cef/include/capi/cef_values_capi.h +++ b/cef/include/capi/cef_values_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are diff --git a/cef/include/capi/cef_web_plugin_capi.h b/cef/include/capi/cef_web_plugin_capi.h index 3fd07f1bd..13ac38b39 100644 --- a/cef/include/capi/cef_web_plugin_capi.h +++ b/cef/include/capi/cef_web_plugin_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are diff --git a/cef/include/capi/cef_xml_reader_capi.h b/cef/include/capi/cef_xml_reader_capi.h index c8585a53e..952aa26e3 100644 --- a/cef/include/capi/cef_xml_reader_capi.h +++ b/cef/include/capi/cef_xml_reader_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are diff --git a/cef/include/capi/cef_zip_reader_capi.h b/cef/include/capi/cef_zip_reader_capi.h index d7988afcb..36c5be0de 100644 --- a/cef/include/capi/cef_zip_reader_capi.h +++ b/cef/include/capi/cef_zip_reader_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are diff --git a/cef/include/cef_browser.h b/cef/include/cef_browser.h index 5090adc3e..c19e5f502 100644 --- a/cef/include/cef_browser.h +++ b/cef/include/cef_browser.h @@ -117,6 +117,13 @@ class CefBrowser : public virtual CefBase { /*--cef()--*/ virtual int GetIdentifier() =0; + /// + // Returns true if this object is pointing to the same handle as |that| + // object. + /// + /*--cef()--*/ + virtual bool IsSame(CefRefPtr that) =0; + /// // Returns true if the window is a popup window. /// @@ -211,6 +218,8 @@ class CefRunFileDialogCallback : public virtual CefBase { class CefBrowserHost : public virtual CefBase { public: typedef cef_file_dialog_mode_t FileDialogMode; + typedef cef_mouse_button_type_t MouseButtonType; + typedef cef_paint_element_type_t PaintElementType; /// // Create a new browser window using the window parameters specified by @@ -218,7 +227,7 @@ class CefBrowserHost : public virtual CefBase { // will be created on the UI thread. This method can be called on any browser // process thread and will not block. /// - /*--cef(optional_param=url)--*/ + /*--cef(optional_param=client,optional_param=url)--*/ static bool CreateBrowser(const CefWindowInfo& windowInfo, CefRefPtr client, const CefString& url, @@ -229,7 +238,7 @@ class CefBrowserHost : public virtual CefBase { // |windowInfo|. This method can only be called on the browser process UI // thread. /// - /*--cef(optional_param=url)--*/ + /*--cef(optional_param=client,optional_param=url)--*/ static CefRefPtr CreateBrowserSync( const CefWindowInfo& windowInfo, CefRefPtr client, @@ -241,7 +250,7 @@ class CefBrowserHost : public virtual CefBase { /// /*--cef()--*/ virtual CefRefPtr GetBrowser() =0; - + /// // Call this method before destroying a contained browser window. This method // performs any internal cleanup that may be needed before the browser window @@ -329,6 +338,75 @@ class CefBrowserHost : public virtual CefBase { const CefString& default_file_name, const std::vector& accept_types, CefRefPtr callback) =0; + + /// + // Returns true if window rendering is disabled. + /// + /*--cef()--*/ + virtual bool IsWindowRenderingDisabled() =0; + + /// + // Notify the browser that the widget has been resized. The browser will first + // call CefRenderHandler::GetViewRect to get the new size and then call + // CefRenderHandler::OnPaint asynchronously with the updated regions. This + // method is only used when window rendering is disabled. + /// + /*--cef()--*/ + virtual void WasResized() =0; + + /// + // Invalidate the |dirtyRect| region of the view. The browser will call + // CefRenderHandler::OnPaint asynchronously with the updated regions. This + // method is only used when window rendering is disabled. + /// + /*--cef()--*/ + virtual void Invalidate(const CefRect& dirtyRect, PaintElementType type) =0; + + /// + // Send a key event to the browser. + /// + /*--cef()--*/ + virtual void SendKeyEvent(const CefKeyEvent& event) =0; + + /// + // Send a mouse click event to the browser. The |x| and |y| coordinates are + // relative to the upper-left corner of the view. + /// + /*--cef()--*/ + virtual void SendMouseClickEvent(const CefMouseEvent& event, + MouseButtonType type, + bool mouseUp, int clickCount) =0; + + /// + // Send a mouse move event to the browser. The |x| and |y| coordinates are + // relative to the upper-left corner of the view. + /// + /*--cef()--*/ + virtual void SendMouseMoveEvent(const CefMouseEvent& event, + bool mouseLeave) =0; + + /// + // Send a mouse wheel event to the browser. The |x| and |y| coordinates are + // relative to the upper-left corner of the view. The |deltaX| and |deltaY| + // values represent the movement delta in the X and Y directions respectively. + // In order to scroll inside select popups with window rendering disabled + // CefRenderHandler::GetScreenPoint should be implemented properly. + /// + /*--cef()--*/ + virtual void SendMouseWheelEvent(const CefMouseEvent& event, + int deltaX, int deltaY) =0; + + /// + // Send a focus event to the browser. + /// + /*--cef()--*/ + virtual void SendFocusEvent(bool setFocus) =0; + + /// + // Send a capture lost event to the browser. + /// + /*--cef()--*/ + virtual void SendCaptureLostEvent() =0; }; #endif // CEF_INCLUDE_CEF_BROWSER_H_ diff --git a/cef/include/cef_browser_process_handler.h b/cef/include/cef_browser_process_handler.h index 02b792300..39e0dcbb1 100644 --- a/cef/include/cef_browser_process_handler.h +++ b/cef/include/cef_browser_process_handler.h @@ -41,6 +41,7 @@ #include "include/cef_base.h" #include "include/cef_command_line.h" #include "include/cef_proxy_handler.h" +#include "include/cef_values.h" /// // Class used to implement browser process callbacks. The methods of this class @@ -67,13 +68,26 @@ class CefBrowserProcessHandler : public virtual CefBase { virtual void OnContextInitialized() {} /// - // Called on the browser process IO thread before a child process is launched. - // Provides an opportunity to modify the child process command line. + // Called before a child process is launched. Will be called on the browser + // process UI thread when launching a render process and on the browser + // process IO thread when launching a GPU or plugin process. Provides an + // opportunity to modify the child process command line. Do not keep a + // reference to |command_line| outside of this method. /// /*--cef()--*/ virtual void OnBeforeChildProcessLaunch( - CefRefPtr command_line) { - } + CefRefPtr command_line) {} + + /// + // Called on the browser process IO thread after the main thread has been + // created for a new render process. Provides an opportunity to specify extra + // information that will be passed to + // CefRenderProcessHandler::OnRenderThreadCreated() in the render process. Do + // not keep a reference to |extra_info| outside of this method. + /// + /*--cef()--*/ + virtual void OnRenderProcessThreadCreated( + CefRefPtr extra_info) {} }; #endif // CEF_INCLUDE_CEF_BROWSER_PROCESS_HANDLER_H_ diff --git a/cef/include/cef_client.h b/cef/include/cef_client.h index b0a80d86e..dbba43927 100644 --- a/cef/include/cef_client.h +++ b/cef/include/cef_client.h @@ -50,6 +50,7 @@ #include "include/cef_life_span_handler.h" #include "include/cef_load_handler.h" #include "include/cef_process_message.h" +#include "include/cef_render_handler.h" #include "include/cef_request_handler.h" /// @@ -143,6 +144,14 @@ class CefClient : public virtual CefBase { return NULL; } + /// + // Return the handler for off-screen rendering events. + /// + /*--cef()--*/ + virtual CefRefPtr GetRenderHandler() { + return NULL; + } + /// // Return the handler for browser request events. /// diff --git a/cef/include/cef_display_handler.h b/cef/include/cef_display_handler.h index f54a650ea..7c19081c2 100644 --- a/cef/include/cef_display_handler.h +++ b/cef/include/cef_display_handler.h @@ -78,6 +78,8 @@ class CefDisplayHandler : public virtual CefBase { // text that will be displayed in the tooltip. To handle the display of the // tooltip yourself return true. Otherwise, you can optionally modify |text| // and then return false to allow the browser to display the tooltip. + // When window rendering is disabled the application is responsible for + // drawing tooltips and the return value is ignored. /// /*--cef(optional_param=text)--*/ virtual bool OnTooltip(CefRefPtr browser, diff --git a/cef/include/cef_download_item.h b/cef/include/cef_download_item.h index 01988bfd5..55f7fce06 100644 --- a/cef/include/cef_download_item.h +++ b/cef/include/cef_download_item.h @@ -143,12 +143,6 @@ class CefDownloadItem : public virtual CefBase { /// /*--cef()--*/ virtual CefString GetMimeType() =0; - - /// - // Returns the referrer character set. - /// - /*--cef()--*/ - virtual CefString GetReferrerCharset() =0; }; #endif // CEF_INCLUDE_CEF_DOWNLOAD_ITEM_H_ diff --git a/cef/include/cef_pack_resources.h b/cef/include/cef_pack_resources.h index f5fc9423e..abe055205 100644 --- a/cef/include/cef_pack_resources.h +++ b/cef/include/cef_pack_resources.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -79,9 +79,9 @@ #define DEVTOOLS_EXTENSION_API_JS 22013 #define AUDITSPANEL_CSS 22014 #define BREADCRUMBLIST_CSS 22015 -#define CODEMIRROR_CSS 22016 -#define CSSNAMEDFLOWS_CSS 22017 -#define CMDEVTOOLS_CSS 22018 +#define CMDEVTOOLS_CSS 22016 +#define CODEMIRROR_CSS 22017 +#define CSSNAMEDFLOWS_CSS 22018 #define DATAGRID_CSS 22019 #define ELEMENTSPANEL_CSS 22020 #define FILTEREDITEMSELECTIONDIALOG_CSS 22021 @@ -99,155 +99,156 @@ #define RESOURCESPANEL_CSS 22033 #define REVISIONHISTORY_CSS 22034 #define SCRIPTSPANEL_CSS 22035 -#define SPLITVIEW_CSS 22036 -#define TABBEDPANE_CSS 22037 -#define TEXTEDITOR_CSS 22038 -#define TEXTPROMPT_CSS 22039 -#define TIMELINEPANEL_CSS 22040 -#define WEBGLPROFILER_CSS 22041 -#define IMAGES_APPLICATIONCACHE_PNG 22042 -#define IMAGES_BACK_PNG 22043 -#define IMAGES_BREAKPOINTBORDER_PNG 22044 -#define IMAGES_BREAKPOINTCONDITIONALBORDER_PNG 22045 -#define IMAGES_BREAKPOINTCONDITIONALCOUNTERBORDER_PNG 22046 -#define IMAGES_BREAKPOINTCOUNTERBORDER_PNG 22047 -#define IMAGES_CHECKER_PNG 22048 -#define IMAGES_CLOSEBUTTONS_PNG 22049 -#define IMAGES_COOKIE_PNG 22050 -#define IMAGES_DATABASE_PNG 22051 -#define IMAGES_DATABASETABLE_PNG 22052 -#define IMAGES_DEBUGGERCONTINUE_PNG 22053 -#define IMAGES_DEBUGGERPAUSE_PNG 22054 -#define IMAGES_DEBUGGERSTEPINTO_PNG 22055 -#define IMAGES_DEBUGGERSTEPOUT_PNG 22056 -#define IMAGES_DEBUGGERSTEPOVER_PNG 22057 -#define IMAGES_DELETEICON_PNG 22058 -#define IMAGES_DISCLOSURETRIANGLESMALLDOWN_PNG 22059 -#define IMAGES_DISCLOSURETRIANGLESMALLDOWNBLACK_PNG 22060 -#define IMAGES_DISCLOSURETRIANGLESMALLDOWNWHITE_PNG 22061 -#define IMAGES_DISCLOSURETRIANGLESMALLRIGHT_PNG 22062 -#define IMAGES_DISCLOSURETRIANGLESMALLRIGHTBLACK_PNG 22063 -#define IMAGES_DISCLOSURETRIANGLESMALLRIGHTDOWN_PNG 22064 -#define IMAGES_DISCLOSURETRIANGLESMALLRIGHTDOWNBLACK_PNG 22065 -#define IMAGES_DISCLOSURETRIANGLESMALLRIGHTDOWNWHITE_PNG 22066 -#define IMAGES_DISCLOSURETRIANGLESMALLRIGHTWHITE_PNG 22067 -#define IMAGES_DOMAIN_PNG 22068 -#define IMAGES_ERRORICON_PNG 22069 -#define IMAGES_ERRORMEDIUMICON_PNG 22070 -#define IMAGES_ERRORREDDOT_PNG 22071 -#define IMAGES_FILESYSTEM_PNG 22072 -#define IMAGES_FORWARD_PNG 22073 -#define IMAGES_FRAME_PNG 22074 -#define IMAGES_GLOSSYHEADER_PNG 22075 -#define IMAGES_GLOSSYHEADERPRESSED_PNG 22076 -#define IMAGES_GLOSSYHEADERSELECTED_PNG 22077 -#define IMAGES_GLOSSYHEADERSELECTEDPRESSED_PNG 22078 -#define IMAGES_GOARROW_PNG 22079 -#define IMAGES_GRAPHLABELCALLOUTLEFT_PNG 22080 -#define IMAGES_GRAPHLABELCALLOUTRIGHT_PNG 22081 -#define IMAGES_INDEXEDDB_PNG 22082 -#define IMAGES_INDEXEDDBINDEX_PNG 22083 -#define IMAGES_INDEXEDDBOBJECTSTORE_PNG 22084 -#define IMAGES_LOCALSTORAGE_PNG 22085 -#define IMAGES_NAMEDFLOWOVERFLOW_PNG 22086 -#define IMAGES_NAVIGATORSHOWHIDEBUTTON_PNG 22087 -#define IMAGES_PANEADDBUTTONS_PNG 22088 -#define IMAGES_PANEBOTTOMGROW_PNG 22089 -#define IMAGES_PANEBOTTOMGROWACTIVE_PNG 22090 -#define IMAGES_PANEELEMENTSTATEBUTTONS_PNG 22091 -#define IMAGES_PANEFILTERBUTTONS_PNG 22092 -#define IMAGES_PANEGROWHANDLELINE_PNG 22093 -#define IMAGES_PANEREFRESHBUTTONS_PNG 22094 -#define IMAGES_PANESETTINGSBUTTONS_PNG 22095 -#define IMAGES_POPOVERARROWS_PNG 22096 -#define IMAGES_POPOVERBACKGROUND_PNG 22097 -#define IMAGES_PROFILEGROUPICON_PNG 22098 -#define IMAGES_PROFILEICON_PNG 22099 -#define IMAGES_PROFILESMALLICON_PNG 22100 -#define IMAGES_PROFILESSILHOUETTE_PNG 22101 -#define IMAGES_PROGRAMCOUNTERBORDER_PNG 22102 -#define IMAGES_RADIODOT_PNG 22103 -#define IMAGES_REGIONEMPTY_PNG 22104 -#define IMAGES_REGIONFIT_PNG 22105 -#define IMAGES_REGIONOVERSET_PNG 22106 -#define IMAGES_RESOURCECSSICON_PNG 22107 -#define IMAGES_RESOURCEDOCUMENTICON_PNG 22108 -#define IMAGES_RESOURCEDOCUMENTICONSMALL_PNG 22109 -#define IMAGES_RESOURCEJSICON_PNG 22110 -#define IMAGES_RESOURCEPLAINICON_PNG 22111 -#define IMAGES_RESOURCEPLAINICONSMALL_PNG 22112 -#define IMAGES_RESOURCESSIZEGRAPHICON_PNG 22113 -#define IMAGES_RESOURCESTIMEGRAPHICON_PNG 22114 -#define IMAGES_SCRIPTSSILHOUETTE_PNG 22115 -#define IMAGES_SEARCHNEXT_PNG 22116 -#define IMAGES_SEARCHPREV_PNG 22117 -#define IMAGES_SEARCHSMALLBLUE_PNG 22118 -#define IMAGES_SEARCHSMALLBRIGHTBLUE_PNG 22119 -#define IMAGES_SEARCHSMALLGRAY_PNG 22120 -#define IMAGES_SEARCHSMALLWHITE_PNG 22121 -#define IMAGES_SEGMENT_PNG 22122 -#define IMAGES_SEGMENTEND_PNG 22123 -#define IMAGES_SEGMENTHOVER_PNG 22124 -#define IMAGES_SEGMENTHOVEREND_PNG 22125 -#define IMAGES_SEGMENTSELECTED_PNG 22126 -#define IMAGES_SEGMENTSELECTEDEND_PNG 22127 -#define IMAGES_SESSIONSTORAGE_PNG 22128 -#define IMAGES_SPINNER_GIF 22129 -#define IMAGES_SPINNERACTIVE_GIF 22130 -#define IMAGES_SPINNERACTIVESELECTED_GIF 22131 -#define IMAGES_SPINNERINACTIVE_GIF 22132 -#define IMAGES_SPINNERINACTIVESELECTED_GIF 22133 -#define IMAGES_SPLITVIEWDIMPLE_PNG 22134 -#define IMAGES_SPLITVIEWDIVIDERBACKGROUND_PNG 22135 -#define IMAGES_STATUSBARBUTTONGLYPHS_PNG 22136 -#define IMAGES_STATUSBARBUTTONGLYPHS2X_PNG 22137 -#define IMAGES_STATUSBARRESIZERHORIZONTAL_PNG 22138 -#define IMAGES_STATUSBARRESIZERVERTICAL_PNG 22139 -#define IMAGES_SUCCESSGREENDOT_PNG 22140 -#define IMAGES_THUMBACTIVEHORIZ_PNG 22141 -#define IMAGES_THUMBACTIVEVERT_PNG 22142 -#define IMAGES_THUMBHORIZ_PNG 22143 -#define IMAGES_THUMBHOVERHORIZ_PNG 22144 -#define IMAGES_THUMBHOVERVERT_PNG 22145 -#define IMAGES_THUMBVERT_PNG 22146 -#define IMAGES_TICKMARK_PNG 22147 -#define IMAGES_TIMELINEHOLLOWPILLBLUE_PNG 22148 -#define IMAGES_TIMELINEHOLLOWPILLGRAY_PNG 22149 -#define IMAGES_TIMELINEHOLLOWPILLGREEN_PNG 22150 -#define IMAGES_TIMELINEHOLLOWPILLORANGE_PNG 22151 -#define IMAGES_TIMELINEHOLLOWPILLPURPLE_PNG 22152 -#define IMAGES_TIMELINEHOLLOWPILLRED_PNG 22153 -#define IMAGES_TIMELINEHOLLOWPILLYELLOW_PNG 22154 -#define IMAGES_TIMELINEPILLBLUE_PNG 22155 -#define IMAGES_TIMELINEPILLGRAY_PNG 22156 -#define IMAGES_TIMELINEPILLGREEN_PNG 22157 -#define IMAGES_TIMELINEPILLORANGE_PNG 22158 -#define IMAGES_TIMELINEPILLPURPLE_PNG 22159 -#define IMAGES_TIMELINEPILLRED_PNG 22160 -#define IMAGES_TIMELINEPILLYELLOW_PNG 22161 -#define IMAGES_TOOLBARICONS_PNG 22162 -#define IMAGES_TOOLBARICONSSMALL_PNG 22163 -#define IMAGES_TOOLBARITEMSELECTED_PNG 22164 -#define IMAGES_TRACKHORIZ_PNG 22165 -#define IMAGES_TRACKVERT_PNG 22166 -#define IMAGES_TREEDOWNTRIANGLEBLACK_PNG 22167 -#define IMAGES_TREEDOWNTRIANGLEWHITE_PNG 22168 -#define IMAGES_TREERIGHTTRIANGLEBLACK_PNG 22169 -#define IMAGES_TREERIGHTTRIANGLEWHITE_PNG 22170 -#define IMAGES_TREEUPTRIANGLEBLACK_PNG 22171 -#define IMAGES_TREEUPTRIANGLEWHITE_PNG 22172 -#define IMAGES_USERINPUTICON_PNG 22173 -#define IMAGES_USERINPUTPREVIOUSICON_PNG 22174 -#define IMAGES_USERINPUTRESULTICON_PNG 22175 -#define IMAGES_WARNINGICON_PNG 22176 -#define IMAGES_WARNINGMEDIUMICON_PNG 22177 -#define IMAGES_WARNINGORANGEDOT_PNG 22178 -#define IMAGES_WARNINGSERRORS_PNG 22179 -#define IMAGES_SEGMENTCHROMIUM_PNG 22180 -#define IMAGES_SEGMENTHOVERCHROMIUM_PNG 22181 -#define IMAGES_SEGMENTHOVERENDCHROMIUM_PNG 22182 -#define IMAGES_SEGMENTSELECTEDCHROMIUM_PNG 22183 -#define IMAGES_SEGMENTSELECTEDENDCHROMIUM_PNG 22184 +#define SPECTRUM_CSS 22036 +#define SPLITVIEW_CSS 22037 +#define TABBEDPANE_CSS 22038 +#define TEXTEDITOR_CSS 22039 +#define TEXTPROMPT_CSS 22040 +#define TIMELINEPANEL_CSS 22041 +#define CANVASPROFILER_CSS 22042 +#define IMAGES_APPLICATIONCACHE_PNG 22043 +#define IMAGES_BACK_PNG 22044 +#define IMAGES_BREAKPOINTBORDER_PNG 22045 +#define IMAGES_BREAKPOINTCONDITIONALBORDER_PNG 22046 +#define IMAGES_BREAKPOINTCONDITIONALCOUNTERBORDER_PNG 22047 +#define IMAGES_BREAKPOINTCOUNTERBORDER_PNG 22048 +#define IMAGES_CHECKER_PNG 22049 +#define IMAGES_CLOSEBUTTONS_PNG 22050 +#define IMAGES_COOKIE_PNG 22051 +#define IMAGES_DATABASE_PNG 22052 +#define IMAGES_DATABASETABLE_PNG 22053 +#define IMAGES_DEBUGGERCONTINUE_PNG 22054 +#define IMAGES_DEBUGGERPAUSE_PNG 22055 +#define IMAGES_DEBUGGERSTEPINTO_PNG 22056 +#define IMAGES_DEBUGGERSTEPOUT_PNG 22057 +#define IMAGES_DEBUGGERSTEPOVER_PNG 22058 +#define IMAGES_DELETEICON_PNG 22059 +#define IMAGES_DISCLOSURETRIANGLESMALLDOWN_PNG 22060 +#define IMAGES_DISCLOSURETRIANGLESMALLDOWNBLACK_PNG 22061 +#define IMAGES_DISCLOSURETRIANGLESMALLDOWNWHITE_PNG 22062 +#define IMAGES_DISCLOSURETRIANGLESMALLRIGHT_PNG 22063 +#define IMAGES_DISCLOSURETRIANGLESMALLRIGHTBLACK_PNG 22064 +#define IMAGES_DISCLOSURETRIANGLESMALLRIGHTDOWN_PNG 22065 +#define IMAGES_DISCLOSURETRIANGLESMALLRIGHTDOWNBLACK_PNG 22066 +#define IMAGES_DISCLOSURETRIANGLESMALLRIGHTDOWNWHITE_PNG 22067 +#define IMAGES_DISCLOSURETRIANGLESMALLRIGHTWHITE_PNG 22068 +#define IMAGES_DOMAIN_PNG 22069 +#define IMAGES_ERRORICON_PNG 22070 +#define IMAGES_ERRORMEDIUMICON_PNG 22071 +#define IMAGES_ERRORREDDOT_PNG 22072 +#define IMAGES_FILESYSTEM_PNG 22073 +#define IMAGES_FORWARD_PNG 22074 +#define IMAGES_FRAME_PNG 22075 +#define IMAGES_GLOSSYHEADER_PNG 22076 +#define IMAGES_GLOSSYHEADERPRESSED_PNG 22077 +#define IMAGES_GLOSSYHEADERSELECTED_PNG 22078 +#define IMAGES_GLOSSYHEADERSELECTEDPRESSED_PNG 22079 +#define IMAGES_GOARROW_PNG 22080 +#define IMAGES_GRAPHLABELCALLOUTLEFT_PNG 22081 +#define IMAGES_GRAPHLABELCALLOUTRIGHT_PNG 22082 +#define IMAGES_INDEXEDDB_PNG 22083 +#define IMAGES_INDEXEDDBINDEX_PNG 22084 +#define IMAGES_INDEXEDDBOBJECTSTORE_PNG 22085 +#define IMAGES_LOCALSTORAGE_PNG 22086 +#define IMAGES_NAMEDFLOWOVERFLOW_PNG 22087 +#define IMAGES_NAVIGATORSHOWHIDEBUTTON_PNG 22088 +#define IMAGES_PANEADDBUTTONS_PNG 22089 +#define IMAGES_PANEBOTTOMGROW_PNG 22090 +#define IMAGES_PANEBOTTOMGROWACTIVE_PNG 22091 +#define IMAGES_PANEELEMENTSTATEBUTTONS_PNG 22092 +#define IMAGES_PANEFILTERBUTTONS_PNG 22093 +#define IMAGES_PANEGROWHANDLELINE_PNG 22094 +#define IMAGES_PANEREFRESHBUTTONS_PNG 22095 +#define IMAGES_PANESETTINGSBUTTONS_PNG 22096 +#define IMAGES_POPOVERARROWS_PNG 22097 +#define IMAGES_POPOVERBACKGROUND_PNG 22098 +#define IMAGES_PROFILEGROUPICON_PNG 22099 +#define IMAGES_PROFILEICON_PNG 22100 +#define IMAGES_PROFILESMALLICON_PNG 22101 +#define IMAGES_PROFILESSILHOUETTE_PNG 22102 +#define IMAGES_PROGRAMCOUNTERBORDER_PNG 22103 +#define IMAGES_RADIODOT_PNG 22104 +#define IMAGES_REGIONEMPTY_PNG 22105 +#define IMAGES_REGIONFIT_PNG 22106 +#define IMAGES_REGIONOVERSET_PNG 22107 +#define IMAGES_RESOURCECSSICON_PNG 22108 +#define IMAGES_RESOURCEDOCUMENTICON_PNG 22109 +#define IMAGES_RESOURCEDOCUMENTICONSMALL_PNG 22110 +#define IMAGES_RESOURCEJSICON_PNG 22111 +#define IMAGES_RESOURCEPLAINICON_PNG 22112 +#define IMAGES_RESOURCEPLAINICONSMALL_PNG 22113 +#define IMAGES_RESOURCESSIZEGRAPHICON_PNG 22114 +#define IMAGES_RESOURCESTIMEGRAPHICON_PNG 22115 +#define IMAGES_SCRIPTSSILHOUETTE_PNG 22116 +#define IMAGES_SEARCHNEXT_PNG 22117 +#define IMAGES_SEARCHPREV_PNG 22118 +#define IMAGES_SEARCHSMALLBLUE_PNG 22119 +#define IMAGES_SEARCHSMALLBRIGHTBLUE_PNG 22120 +#define IMAGES_SEARCHSMALLGRAY_PNG 22121 +#define IMAGES_SEARCHSMALLWHITE_PNG 22122 +#define IMAGES_SEGMENT_PNG 22123 +#define IMAGES_SEGMENTEND_PNG 22124 +#define IMAGES_SEGMENTHOVER_PNG 22125 +#define IMAGES_SEGMENTHOVEREND_PNG 22126 +#define IMAGES_SEGMENTSELECTED_PNG 22127 +#define IMAGES_SEGMENTSELECTEDEND_PNG 22128 +#define IMAGES_SESSIONSTORAGE_PNG 22129 +#define IMAGES_SPINNER_GIF 22130 +#define IMAGES_SPINNERACTIVE_GIF 22131 +#define IMAGES_SPINNERACTIVESELECTED_GIF 22132 +#define IMAGES_SPINNERINACTIVE_GIF 22133 +#define IMAGES_SPINNERINACTIVESELECTED_GIF 22134 +#define IMAGES_SPLITVIEWDIMPLE_PNG 22135 +#define IMAGES_SPLITVIEWDIVIDERBACKGROUND_PNG 22136 +#define IMAGES_STATUSBARBUTTONGLYPHS_PNG 22137 +#define IMAGES_STATUSBARBUTTONGLYPHS2X_PNG 22138 +#define IMAGES_STATUSBARRESIZERHORIZONTAL_PNG 22139 +#define IMAGES_STATUSBARRESIZERVERTICAL_PNG 22140 +#define IMAGES_SUCCESSGREENDOT_PNG 22141 +#define IMAGES_THUMBACTIVEHORIZ_PNG 22142 +#define IMAGES_THUMBACTIVEVERT_PNG 22143 +#define IMAGES_THUMBHORIZ_PNG 22144 +#define IMAGES_THUMBHOVERHORIZ_PNG 22145 +#define IMAGES_THUMBHOVERVERT_PNG 22146 +#define IMAGES_THUMBVERT_PNG 22147 +#define IMAGES_TICKMARK_PNG 22148 +#define IMAGES_TIMELINEHOLLOWPILLBLUE_PNG 22149 +#define IMAGES_TIMELINEHOLLOWPILLGRAY_PNG 22150 +#define IMAGES_TIMELINEHOLLOWPILLGREEN_PNG 22151 +#define IMAGES_TIMELINEHOLLOWPILLORANGE_PNG 22152 +#define IMAGES_TIMELINEHOLLOWPILLPURPLE_PNG 22153 +#define IMAGES_TIMELINEHOLLOWPILLRED_PNG 22154 +#define IMAGES_TIMELINEHOLLOWPILLYELLOW_PNG 22155 +#define IMAGES_TIMELINEPILLBLUE_PNG 22156 +#define IMAGES_TIMELINEPILLGRAY_PNG 22157 +#define IMAGES_TIMELINEPILLGREEN_PNG 22158 +#define IMAGES_TIMELINEPILLORANGE_PNG 22159 +#define IMAGES_TIMELINEPILLPURPLE_PNG 22160 +#define IMAGES_TIMELINEPILLRED_PNG 22161 +#define IMAGES_TIMELINEPILLYELLOW_PNG 22162 +#define IMAGES_TOOLBARICONS_PNG 22163 +#define IMAGES_TOOLBARICONSSMALL_PNG 22164 +#define IMAGES_TOOLBARITEMSELECTED_PNG 22165 +#define IMAGES_TRACKHORIZ_PNG 22166 +#define IMAGES_TRACKVERT_PNG 22167 +#define IMAGES_TREEDOWNTRIANGLEBLACK_PNG 22168 +#define IMAGES_TREEDOWNTRIANGLEWHITE_PNG 22169 +#define IMAGES_TREERIGHTTRIANGLEBLACK_PNG 22170 +#define IMAGES_TREERIGHTTRIANGLEWHITE_PNG 22171 +#define IMAGES_TREEUPTRIANGLEBLACK_PNG 22172 +#define IMAGES_TREEUPTRIANGLEWHITE_PNG 22173 +#define IMAGES_USERINPUTICON_PNG 22174 +#define IMAGES_USERINPUTPREVIOUSICON_PNG 22175 +#define IMAGES_USERINPUTRESULTICON_PNG 22176 +#define IMAGES_WARNINGICON_PNG 22177 +#define IMAGES_WARNINGMEDIUMICON_PNG 22178 +#define IMAGES_WARNINGORANGEDOT_PNG 22179 +#define IMAGES_WARNINGSERRORS_PNG 22180 +#define IMAGES_SEGMENTCHROMIUM_PNG 22181 +#define IMAGES_SEGMENTHOVERCHROMIUM_PNG 22182 +#define IMAGES_SEGMENTHOVERENDCHROMIUM_PNG 22183 +#define IMAGES_SEGMENTSELECTEDCHROMIUM_PNG 22184 +#define IMAGES_SEGMENTSELECTEDENDCHROMIUM_PNG 22185 // --------------------------------------------------------------------------- // From net_resources.h: @@ -260,145 +261,190 @@ #define IDR_APP_TOP_CENTER 5500 #define IDR_APP_TOP_LEFT 5501 #define IDR_APP_TOP_RIGHT 5502 -#define IDR_BROWSER_ACTION_BADGE_CENTER 5503 -#define IDR_BROWSER_ACTION_BADGE_LEFT 5504 -#define IDR_BROWSER_ACTION_BADGE_RIGHT 5505 -#define IDR_BUBBLE_B 5506 -#define IDR_BUBBLE_BL 5507 -#define IDR_BUBBLE_BR 5508 -#define IDR_BUBBLE_B_ARROW 5509 -#define IDR_BUBBLE_L 5510 -#define IDR_BUBBLE_L_ARROW 5511 -#define IDR_BUBBLE_R 5512 -#define IDR_BUBBLE_R_ARROW 5513 -#define IDR_BUBBLE_SHADOW_B 5514 -#define IDR_BUBBLE_SHADOW_BL 5515 -#define IDR_BUBBLE_SHADOW_BR 5516 -#define IDR_BUBBLE_SHADOW_L 5517 -#define IDR_BUBBLE_SHADOW_R 5518 -#define IDR_BUBBLE_SHADOW_T 5519 -#define IDR_BUBBLE_SHADOW_TL 5520 -#define IDR_BUBBLE_SHADOW_TR 5521 -#define IDR_BUBBLE_T 5522 -#define IDR_BUBBLE_TL 5523 -#define IDR_BUBBLE_TR 5524 -#define IDR_BUBBLE_T_ARROW 5525 -#define IDR_CHECKBOX_DISABLED_INDETERMINATE 5526 -#define IDR_CHECKBOX_DISABLED_OFF 5527 -#define IDR_CHECKBOX_DISABLED_ON 5528 -#define IDR_CHECKBOX_INDETERMINATE 5529 -#define IDR_CHECKBOX_OFF 5530 -#define IDR_CHECKBOX_ON 5531 -#define IDR_CHECKMARK 5538 -#define IDR_CLOSE 5539 -#define IDR_CLOSE_BAR 5541 -#define IDR_CLOSE_BAR_H 5542 -#define IDR_CLOSE_BAR_MASK 5543 -#define IDR_CLOSE_BAR_P 5544 -#define IDR_CLOSE_H 5545 -#define IDR_CLOSE_P 5546 -#define IDR_CLOSE_SA 5549 -#define IDR_CLOSE_SA_H 5550 -#define IDR_CLOSE_SA_P 5551 -#define IDR_CONTENT_BOTTOM_CENTER 5552 -#define IDR_CONTENT_BOTTOM_LEFT_CORNER 5553 -#define IDR_CONTENT_BOTTOM_RIGHT_CORNER 5554 -#define IDR_CONTENT_LEFT_SIDE 5555 -#define IDR_CONTENT_RIGHT_SIDE 5556 -#define IDR_DEFAULT_FAVICON 5557 -#define IDR_DEFAULT_LARGE_FAVICON 5558 -#define IDR_FOLDER_CLOSED 5559 -#define IDR_FOLDER_CLOSED_RTL 5560 -#define IDR_FOLDER_OPEN 5561 -#define IDR_FOLDER_OPEN_RTL 5562 -#define IDR_FRAME 5563 -#define IDR_FRAME_APP_PANEL 5564 -#define IDR_FRAME_INACTIVE 5565 -#define IDR_MAXIMIZE 5566 -#define IDR_MAXIMIZE_H 5567 -#define IDR_MAXIMIZE_P 5568 -#define IDR_MENU_ARROW 5572 -#define IDR_MENU_CHECK 5573 -#define IDR_SLIDER_ACTIVE_LEFT 5574 -#define IDR_SLIDER_ACTIVE_RIGHT 5575 -#define IDR_SLIDER_ACTIVE_CENTER 5576 -#define IDR_SLIDER_DISABLED_LEFT 5577 -#define IDR_SLIDER_DISABLED_RIGHT 5578 -#define IDR_SLIDER_DISABLED_CENTER 5579 -#define IDR_SLIDER_PRESSED_LEFT 5580 -#define IDR_SLIDER_PRESSED_RIGHT 5581 -#define IDR_SLIDER_PRESSED_CENTER 5582 -#define IDR_SLIDER_ACTIVE_THUMB 5583 -#define IDR_SLIDER_DISABLED_THUMB 5584 -#define IDR_MENU_DROPARROW 5585 -#define IDR_MINIMIZE 5586 -#define IDR_MINIMIZE_H 5587 -#define IDR_MINIMIZE_P 5588 -#define IDR_OAK 5592 -#define IDR_PANEL_BOTTOM_LEFT_CORNER 5593 -#define IDR_PANEL_BOTTOM_RIGHT_CORNER 5594 -#define IDR_PROGRESS_BAR 5595 -#define IDR_PROGRESS_BORDER_LEFT 5596 -#define IDR_PROGRESS_BORDER_RIGHT 5597 -#define IDR_PROGRESS_VALUE 5598 -#define IDR_RADIO_DISABLED_OFF 5599 -#define IDR_RADIO_DISABLED_ON 5600 -#define IDR_RADIO_OFF 5601 -#define IDR_RADIO_ON 5602 -#define IDR_SCROLL_BASE_HORIZONTAL_CENTER_H 5611 -#define IDR_SCROLL_BASE_HORIZONTAL_LEFT_H 5612 -#define IDR_SCROLL_BASE_HORIZONTAL_RIGHT_H 5613 -#define IDR_SCROLL_BASE_VERTICAL_BOTTOM_H 5614 -#define IDR_SCROLL_BASE_VERTICAL_CENTER_H 5615 -#define IDR_SCROLL_BASE_VERTICAL_TOP_H 5616 -#define IDR_SCROLL_THUMB_HORIZONTAL_CENTER 5617 -#define IDR_SCROLL_THUMB_HORIZONTAL_CENTER_H 5618 -#define IDR_SCROLL_THUMB_HORIZONTAL_CENTER_P 5619 -#define IDR_SCROLL_THUMB_HORIZONTAL_LEFT 5620 -#define IDR_SCROLL_THUMB_HORIZONTAL_LEFT_H 5621 -#define IDR_SCROLL_THUMB_HORIZONTAL_LEFT_P 5622 -#define IDR_SCROLL_THUMB_HORIZONTAL_RIGHT 5623 -#define IDR_SCROLL_THUMB_HORIZONTAL_RIGHT_H 5624 -#define IDR_SCROLL_THUMB_HORIZONTAL_RIGHT_P 5625 -#define IDR_SCROLL_THUMB_VERTICAL_BOTTOM 5626 -#define IDR_SCROLL_THUMB_VERTICAL_BOTTOM_H 5627 -#define IDR_SCROLL_THUMB_VERTICAL_BOTTOM_P 5628 -#define IDR_SCROLL_THUMB_VERTICAL_CENTER 5629 -#define IDR_SCROLL_THUMB_VERTICAL_CENTER_H 5630 -#define IDR_SCROLL_THUMB_VERTICAL_CENTER_P 5631 -#define IDR_SCROLL_THUMB_VERTICAL_TOP 5632 -#define IDR_SCROLL_THUMB_VERTICAL_TOP_H 5633 -#define IDR_SCROLL_THUMB_VERTICAL_TOP_P 5634 -#define IDR_RESTORE 5635 -#define IDR_RESTORE_H 5636 -#define IDR_RESTORE_P 5637 -#define IDR_TEXTBUTTON_HOVER_BOTTOM 5641 -#define IDR_TEXTBUTTON_HOVER_BOTTOM_LEFT 5642 -#define IDR_TEXTBUTTON_HOVER_BOTTOM_RIGHT 5643 -#define IDR_TEXTBUTTON_HOVER_CENTER 5644 -#define IDR_TEXTBUTTON_HOVER_LEFT 5645 -#define IDR_TEXTBUTTON_HOVER_RIGHT 5646 -#define IDR_TEXTBUTTON_HOVER_TOP 5647 -#define IDR_TEXTBUTTON_HOVER_TOP_LEFT 5648 -#define IDR_TEXTBUTTON_HOVER_TOP_RIGHT 5649 -#define IDR_TEXTBUTTON_PRESSED_BOTTOM 5650 -#define IDR_TEXTBUTTON_PRESSED_BOTTOM_LEFT 5651 -#define IDR_TEXTBUTTON_PRESSED_BOTTOM_RIGHT 5652 -#define IDR_TEXTBUTTON_PRESSED_CENTER 5653 -#define IDR_TEXTBUTTON_PRESSED_LEFT 5654 -#define IDR_TEXTBUTTON_PRESSED_RIGHT 5655 -#define IDR_TEXTBUTTON_PRESSED_TOP 5656 -#define IDR_TEXTBUTTON_PRESSED_TOP_LEFT 5657 -#define IDR_TEXTBUTTON_PRESSED_TOP_RIGHT 5658 -#define IDR_THROBBER 5659 -#define IDR_WINDOW_BOTTOM_CENTER 5660 -#define IDR_WINDOW_BOTTOM_LEFT_CORNER 5661 -#define IDR_WINDOW_BOTTOM_RIGHT_CORNER 5662 -#define IDR_WINDOW_LEFT_SIDE 5663 -#define IDR_WINDOW_RIGHT_SIDE 5664 -#define IDR_WINDOW_TOP_CENTER 5665 -#define IDR_WINDOW_TOP_LEFT_CORNER 5666 -#define IDR_WINDOW_TOP_RIGHT_CORNER 5667 +#define IDR_AURA_SHADOW_ACTIVE_BOTTOM 5503 +#define IDR_AURA_SHADOW_ACTIVE_BOTTOM_LEFT 5504 +#define IDR_AURA_SHADOW_ACTIVE_BOTTOM_RIGHT 5505 +#define IDR_AURA_SHADOW_ACTIVE_LEFT 5506 +#define IDR_AURA_SHADOW_ACTIVE_RIGHT 5507 +#define IDR_AURA_SHADOW_ACTIVE_TOP 5508 +#define IDR_AURA_SHADOW_ACTIVE_TOP_LEFT 5509 +#define IDR_AURA_SHADOW_ACTIVE_TOP_RIGHT 5510 +#define IDR_AURA_SHADOW_INACTIVE_BOTTOM 5511 +#define IDR_AURA_SHADOW_INACTIVE_BOTTOM_LEFT 5512 +#define IDR_AURA_SHADOW_INACTIVE_BOTTOM_RIGHT 5513 +#define IDR_AURA_SHADOW_INACTIVE_LEFT 5514 +#define IDR_AURA_SHADOW_INACTIVE_RIGHT 5515 +#define IDR_AURA_SHADOW_INACTIVE_TOP 5516 +#define IDR_AURA_SHADOW_INACTIVE_TOP_LEFT 5517 +#define IDR_AURA_SHADOW_INACTIVE_TOP_RIGHT 5518 +#define IDR_BROWSER_ACTION_BADGE_CENTER 5519 +#define IDR_BROWSER_ACTION_BADGE_LEFT 5520 +#define IDR_BROWSER_ACTION_BADGE_RIGHT 5521 +#define IDR_BUBBLE_B 5522 +#define IDR_BUBBLE_BL 5523 +#define IDR_BUBBLE_BR 5524 +#define IDR_BUBBLE_B_ARROW 5525 +#define IDR_BUBBLE_L 5526 +#define IDR_BUBBLE_L_ARROW 5527 +#define IDR_BUBBLE_R 5528 +#define IDR_BUBBLE_R_ARROW 5529 +#define IDR_BUBBLE_SHADOW_B 5530 +#define IDR_BUBBLE_SHADOW_BL 5531 +#define IDR_BUBBLE_SHADOW_BR 5532 +#define IDR_BUBBLE_SHADOW_L 5533 +#define IDR_BUBBLE_SHADOW_R 5534 +#define IDR_BUBBLE_SHADOW_T 5535 +#define IDR_BUBBLE_SHADOW_TL 5536 +#define IDR_BUBBLE_SHADOW_TR 5537 +#define IDR_BUBBLE_T 5538 +#define IDR_BUBBLE_TL 5539 +#define IDR_BUBBLE_TR 5540 +#define IDR_BUBBLE_T_ARROW 5541 +#define IDR_CHECKBOX_DISABLED_INDETERMINATE 5542 +#define IDR_CHECKBOX_DISABLED_OFF 5543 +#define IDR_CHECKBOX_DISABLED_ON 5544 +#define IDR_CHECKBOX_INDETERMINATE 5545 +#define IDR_CHECKBOX_OFF 5546 +#define IDR_CHECKBOX_ON 5547 +#define IDR_CHECKMARK 5548 +#define IDR_CLOSE 5549 +#define IDR_CLOSE_BAR 5550 +#define IDR_CLOSE_BAR_H 5551 +#define IDR_CLOSE_BAR_MASK 5552 +#define IDR_CLOSE_BAR_P 5553 +#define IDR_CLOSE_H 5554 +#define IDR_CLOSE_P 5555 +#define IDR_CLOSE_SA 5556 +#define IDR_CLOSE_SA_H 5557 +#define IDR_CLOSE_SA_P 5558 +#define IDR_CONTENT_BOTTOM_CENTER 5559 +#define IDR_CONTENT_BOTTOM_LEFT_CORNER 5560 +#define IDR_CONTENT_BOTTOM_RIGHT_CORNER 5561 +#define IDR_CONTENT_LEFT_SIDE 5562 +#define IDR_CONTENT_RIGHT_SIDE 5563 +#define IDR_DEFAULT_FAVICON 5564 +#define IDR_DEFAULT_FAVICON_32 5565 +#define IDR_DEFAULT_FAVICON_64 5566 +#define IDR_FOLDER_CLOSED 5567 +#define IDR_FOLDER_CLOSED_RTL 5568 +#define IDR_FOLDER_OPEN 5569 +#define IDR_FOLDER_OPEN_RTL 5570 +#define IDR_FRAME 5571 +#define IDR_FRAME_APP_PANEL 5572 +#define IDR_FRAME_INACTIVE 5573 +#define IDR_MAXIMIZE 5574 +#define IDR_MAXIMIZE_H 5575 +#define IDR_MAXIMIZE_P 5576 +#define IDR_MENU_ARROW 5577 +#define IDR_MENU_CHECK 5578 +#define IDR_MENU_CHECK_CHECKED 5579 +#define IDR_MENU_RADIO_EMPTY 5580 +#define IDR_MENU_RADIO_SELECTED 5581 +#define IDR_SLIDER_ACTIVE_LEFT 5582 +#define IDR_SLIDER_ACTIVE_RIGHT 5583 +#define IDR_SLIDER_ACTIVE_CENTER 5584 +#define IDR_SLIDER_DISABLED_LEFT 5585 +#define IDR_SLIDER_DISABLED_RIGHT 5586 +#define IDR_SLIDER_DISABLED_CENTER 5587 +#define IDR_SLIDER_PRESSED_LEFT 5588 +#define IDR_SLIDER_PRESSED_RIGHT 5589 +#define IDR_SLIDER_PRESSED_CENTER 5590 +#define IDR_SLIDER_ACTIVE_THUMB 5591 +#define IDR_SLIDER_DISABLED_THUMB 5592 +#define IDR_MENU_DROPARROW 5593 +#define IDR_MINIMIZE 5594 +#define IDR_MINIMIZE_H 5595 +#define IDR_MINIMIZE_P 5596 +#define IDR_OAK 5597 +#define IDR_PANEL_BOTTOM_LEFT_CORNER 5598 +#define IDR_PANEL_BOTTOM_RIGHT_CORNER 5599 +#define IDR_PROGRESS_BAR 5600 +#define IDR_PROGRESS_BORDER_LEFT 5601 +#define IDR_PROGRESS_BORDER_RIGHT 5602 +#define IDR_PROGRESS_VALUE 5603 +#define IDR_RADIO_DISABLED_OFF 5604 +#define IDR_RADIO_DISABLED_ON 5605 +#define IDR_RADIO_OFF 5606 +#define IDR_RADIO_ON 5607 +#define IDR_SCROLL_BASE_HORIZONTAL_CENTER_H 5608 +#define IDR_SCROLL_BASE_HORIZONTAL_LEFT_H 5609 +#define IDR_SCROLL_BASE_HORIZONTAL_RIGHT_H 5610 +#define IDR_SCROLL_BASE_VERTICAL_BOTTOM_H 5611 +#define IDR_SCROLL_BASE_VERTICAL_CENTER_H 5612 +#define IDR_SCROLL_BASE_VERTICAL_TOP_H 5613 +#define IDR_SCROLL_THUMB_HORIZONTAL_CENTER 5614 +#define IDR_SCROLL_THUMB_HORIZONTAL_CENTER_H 5615 +#define IDR_SCROLL_THUMB_HORIZONTAL_CENTER_P 5616 +#define IDR_SCROLL_THUMB_HORIZONTAL_LEFT 5617 +#define IDR_SCROLL_THUMB_HORIZONTAL_LEFT_H 5618 +#define IDR_SCROLL_THUMB_HORIZONTAL_LEFT_P 5619 +#define IDR_SCROLL_THUMB_HORIZONTAL_RIGHT 5620 +#define IDR_SCROLL_THUMB_HORIZONTAL_RIGHT_H 5621 +#define IDR_SCROLL_THUMB_HORIZONTAL_RIGHT_P 5622 +#define IDR_SCROLL_THUMB_VERTICAL_BOTTOM 5623 +#define IDR_SCROLL_THUMB_VERTICAL_BOTTOM_H 5624 +#define IDR_SCROLL_THUMB_VERTICAL_BOTTOM_P 5625 +#define IDR_SCROLL_THUMB_VERTICAL_CENTER 5626 +#define IDR_SCROLL_THUMB_VERTICAL_CENTER_H 5627 +#define IDR_SCROLL_THUMB_VERTICAL_CENTER_P 5628 +#define IDR_SCROLL_THUMB_VERTICAL_TOP 5629 +#define IDR_SCROLL_THUMB_VERTICAL_TOP_H 5630 +#define IDR_SCROLL_THUMB_VERTICAL_TOP_P 5631 +#define IDR_RESTORE 5632 +#define IDR_RESTORE_H 5633 +#define IDR_RESTORE_P 5634 +#define IDR_TEXTBUTTON_HOVER_BOTTOM 5635 +#define IDR_TEXTBUTTON_HOVER_BOTTOM_LEFT 5636 +#define IDR_TEXTBUTTON_HOVER_BOTTOM_RIGHT 5637 +#define IDR_TEXTBUTTON_HOVER_CENTER 5638 +#define IDR_TEXTBUTTON_HOVER_LEFT 5639 +#define IDR_TEXTBUTTON_HOVER_RIGHT 5640 +#define IDR_TEXTBUTTON_HOVER_TOP 5641 +#define IDR_TEXTBUTTON_HOVER_TOP_LEFT 5642 +#define IDR_TEXTBUTTON_HOVER_TOP_RIGHT 5643 +#define IDR_TEXTBUTTON_PRESSED_BOTTOM 5644 +#define IDR_TEXTBUTTON_PRESSED_BOTTOM_LEFT 5645 +#define IDR_TEXTBUTTON_PRESSED_BOTTOM_RIGHT 5646 +#define IDR_TEXTBUTTON_PRESSED_CENTER 5647 +#define IDR_TEXTBUTTON_PRESSED_LEFT 5648 +#define IDR_TEXTBUTTON_PRESSED_RIGHT 5649 +#define IDR_TEXTBUTTON_PRESSED_TOP 5650 +#define IDR_TEXTBUTTON_PRESSED_TOP_LEFT 5651 +#define IDR_TEXTBUTTON_PRESSED_TOP_RIGHT 5652 +#define IDR_THROBBER 5653 +#define IDR_WINDOW_BOTTOM_CENTER 5654 +#define IDR_WINDOW_BOTTOM_LEFT_CORNER 5655 +#define IDR_WINDOW_BOTTOM_RIGHT_CORNER 5656 +#define IDR_WINDOW_LEFT_SIDE 5657 +#define IDR_WINDOW_RIGHT_SIDE 5658 +#define IDR_WINDOW_TOP_CENTER 5659 +#define IDR_WINDOW_TOP_LEFT_CORNER 5660 +#define IDR_WINDOW_TOP_RIGHT_CORNER 5661 +#define IDR_WINDOW_BUBBLE_SHADOW_BIG_BOTTOM 5662 +#define IDR_WINDOW_BUBBLE_SHADOW_BIG_BOTTOM_LEFT 5663 +#define IDR_WINDOW_BUBBLE_SHADOW_BIG_BOTTOM_RIGHT 5664 +#define IDR_WINDOW_BUBBLE_SHADOW_BIG_LEFT 5665 +#define IDR_WINDOW_BUBBLE_SHADOW_BIG_RIGHT 5666 +#define IDR_WINDOW_BUBBLE_SHADOW_BIG_TOP 5667 +#define IDR_WINDOW_BUBBLE_SHADOW_BIG_TOP_LEFT 5668 +#define IDR_WINDOW_BUBBLE_SHADOW_BIG_TOP_RIGHT 5669 +#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_BIG_BOTTOM 5670 +#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_BIG_LEFT 5671 +#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_BIG_RIGHT 5672 +#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_BIG_TOP 5673 +#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_BOTTOM 5674 +#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_BOTTOM_LEFT 5675 +#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_BOTTOM_RIGHT 5676 +#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_LEFT 5677 +#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_RIGHT 5678 +#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_TOP 5679 +#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_TOP_LEFT 5680 +#define IDR_WINDOW_BUBBLE_SHADOW_SMALL_TOP_RIGHT 5681 +#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_SMALL_BOTTOM 5682 +#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_SMALL_LEFT 5683 +#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_SMALL_RIGHT 5684 +#define IDR_WINDOW_BUBBLE_SHADOW_SPIKE_SMALL_TOP 5685 +#define IDR_MESSAGE_CLOSE 5686 // --------------------------------------------------------------------------- // From webkit_chromium_resources.h: @@ -674,26 +720,6 @@ // --------------------------------------------------------------------------- // From webkit_resources.h: -#define IDC_ALIAS 4500 -#define IDC_CELL 4501 -#define IDC_COLRESIZE 4502 -#define IDC_COPYCUR 4503 -#define IDC_CURSOR_NONE 4504 -#define IDC_HAND_GRAB 4505 -#define IDC_HAND_GRABBING 4506 -#define IDC_PAN_EAST 4507 -#define IDC_PAN_MIDDLE 4508 -#define IDC_PAN_NORTH 4509 -#define IDC_PAN_NORTH_EAST 4510 -#define IDC_PAN_NORTH_WEST 4511 -#define IDC_PAN_SOUTH 4512 -#define IDC_PAN_SOUTH_EAST 4513 -#define IDC_PAN_SOUTH_WEST 4514 -#define IDC_PAN_WEST 4515 -#define IDC_ROWRESIZE 4516 -#define IDC_VERTICALTEXT 4517 -#define IDC_ZOOMIN 4518 -#define IDC_ZOOMOUT 4519 #define IDR_BROKENIMAGE 4700 #define IDR_INPUT_SPEECH 4701 #define IDR_INPUT_SPEECH_RECORDING 4702 @@ -803,5 +829,6 @@ #define IDR_PDF_PAGE_INDICATOR_BACKGROUND 4806 #define IDR_PDF_PAGE_DROPSHADOW 4807 #define IDR_PASSWORD_GENERATION_ICON 4808 +#define IDR_PASSWORD_GENERATION_ICON_HOVER 4809 #endif // CEF_INCLUDE_CEF_PACK_RESOURCES_H_ diff --git a/cef/include/cef_pack_strings.h b/cef/include/cef_pack_strings.h index 02c6b8317..6c17b910d 100644 --- a/cef/include/cef_pack_strings.h +++ b/cef/include/cef_pack_strings.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -129,6 +129,15 @@ #define IDS_APP_GIBIBYTES_PER_SECOND 11064 #define IDS_APP_TEBIBYTES_PER_SECOND 11065 #define IDS_APP_PEBIBYTES_PER_SECOND 11066 +#define IDS_MESSAGE_CENTER_EXTENSIONS_DISABLE 11067 +#define IDS_MESSAGE_CENTER_SITE_DISABLE 11068 +#define IDS_MESSAGE_CENTER_SETTINGS 11069 +#define IDS_MESSAGE_CENTER_CLEAR_ALL 11070 +#define IDS_MESSAGE_CENTER_NO_MESSAGES 11071 +#define IDS_MESSAGE_CENTER_QUIET_MODE 11072 +#define IDS_MESSAGE_CENTER_QUIET_MODE_EXIT 11073 +#define IDS_MESSAGE_CENTER_QUIET_MODE_1HOUR 11074 +#define IDS_MESSAGE_CENTER_QUIET_MODE_1DAY 11075 // --------------------------------------------------------------------------- // From webkit_strings.h: @@ -149,55 +158,68 @@ #define IDS_FORM_FILE_NO_FILE_DRAG_LABEL 18013 #define IDS_FORM_FILE_MULTIPLE_UPLOAD 18014 #define IDS_FORM_OTHER_COLOR_LABEL 18015 -#define IDS_RECENT_SEARCHES_NONE 18016 -#define IDS_RECENT_SEARCHES 18017 -#define IDS_RECENT_SEARCHES_CLEAR 18018 -#define IDS_IMAGE_TITLE_FOR_FILENAME 18019 -#define IDS_AX_ROLE_WEB_AREA 18020 -#define IDS_AX_ROLE_LINK 18021 -#define IDS_AX_ROLE_LIST_MARKER 18022 -#define IDS_AX_ROLE_IMAGE_MAP 18023 -#define IDS_AX_ROLE_HEADING 18024 -#define IDS_AX_ROLE_FOOTER 18025 -#define IDS_AX_ROLE_STEPPER 18026 -#define IDS_AX_BUTTON_ACTION_VERB 18027 -#define IDS_AX_RADIO_BUTTON_ACTION_VERB 18028 -#define IDS_AX_TEXT_FIELD_ACTION_VERB 18029 -#define IDS_AX_CHECKED_CHECK_BOX_ACTION_VERB 18030 -#define IDS_AX_UNCHECKED_CHECK_BOX_ACTION_VERB 18031 -#define IDS_AX_LINK_ACTION_VERB 18032 -#define IDS_AX_AM_PM_FIELD_TEXT 18033 -#define IDS_AX_DAY_OF_MONTH_FIELD_TEXT 18034 -#define IDS_AX_DATE_TIME_FIELD_EMPTY_VALUE_TEXT 18035 -#define IDS_AX_HOUR_FIELD_TEXT 18036 -#define IDS_AX_MILLISECOND_FIELD_TEXT 18037 -#define IDS_AX_MINUTE_FIELD_TEXT 18038 -#define IDS_AX_MONTH_FIELD_TEXT 18039 -#define IDS_AX_SECOND_FIELD_TEXT 18040 -#define IDS_AX_WEEK_OF_YEAR_FIELD_TEXT 18041 -#define IDS_AX_YEAR_FIELD_TEXT 18042 -#define IDS_KEYGEN_HIGH_GRADE_KEY 18043 -#define IDS_KEYGEN_MED_GRADE_KEY 18044 -#define IDS_FORM_VALIDATION_VALUE_MISSING_MULTIPLE_FILE 18045 -#define IDS_FORM_VALIDATION_TYPE_MISMATCH 18046 -#define IDS_FORM_VALIDATION_TYPE_MISMATCH_MULTIPLE_EMAIL 18047 -#define IDS_FORM_VALIDATION_RANGE_UNDERFLOW 18048 -#define IDS_FORM_VALIDATION_RANGE_OVERFLOW 18049 -#define IDS_FORM_VALIDATION_STEP_MISMATCH 18050 -#define IDS_FORM_VALIDATION_VALUE_MISSING 18051 -#define IDS_FORM_VALIDATION_VALUE_MISSING_CHECKBOX 18052 -#define IDS_FORM_VALIDATION_VALUE_MISSING_FILE 18053 -#define IDS_FORM_VALIDATION_VALUE_MISSING_RADIO 18054 -#define IDS_FORM_VALIDATION_VALUE_MISSING_SELECT 18055 -#define IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL 18056 -#define IDS_FORM_VALIDATION_TYPE_MISMATCH_URL 18057 -#define IDS_FORM_VALIDATION_PATTERN_MISMATCH 18058 -#define IDS_FORM_VALIDATION_TOO_LONG 18059 -#define IDS_PDF_NEED_PASSWORD 18060 -#define IDS_PDF_PAGE_LOADING 18061 -#define IDS_PDF_LOADING_PROGRESS 18062 -#define IDS_PDF_PAGE_LOAD_FAILED 18063 -#define IDS_PDF_PROGRESS_LOADING 18064 -#define IDS_PLUGIN_INITIALIZATION_ERROR 18065 +#define IDS_FORM_OTHER_DATE_LABEL 18016 +#define IDS_FORM_OTHER_MONTH_LABEL 18017 +#define IDS_FORM_OTHER_TIME_LABEL 18018 +#define IDS_FORM_OTHER_WEEK_LABEL 18019 +#define IDS_FORM_PLACEHOLDER_FOR_DAY_OF_MONTH_FIELD 18020 +#define IDS_FORM_PLACEHOLDER_FOR_MONTH_FIELD 18021 +#define IDS_FORM_PLACEHOLDER_FOR_YEAR_FIELD 18022 +#define IDS_FORM_THIS_MONTH_LABEL 18023 +#define IDS_FORM_THIS_WEEK_LABEL 18024 +#define IDS_FORM_WEEK_NUMBER_LABEL 18025 +#define IDS_RECENT_SEARCHES_NONE 18026 +#define IDS_RECENT_SEARCHES 18027 +#define IDS_RECENT_SEARCHES_CLEAR 18028 +#define IDS_IMAGE_TITLE_FOR_FILENAME 18029 +#define IDS_AX_ROLE_WEB_AREA 18030 +#define IDS_AX_ROLE_LINK 18031 +#define IDS_AX_ROLE_LIST_MARKER 18032 +#define IDS_AX_ROLE_IMAGE_MAP 18033 +#define IDS_AX_ROLE_HEADING 18034 +#define IDS_AX_ROLE_FOOTER 18035 +#define IDS_AX_ROLE_STEPPER 18036 +#define IDS_AX_BUTTON_ACTION_VERB 18037 +#define IDS_AX_RADIO_BUTTON_ACTION_VERB 18038 +#define IDS_AX_TEXT_FIELD_ACTION_VERB 18039 +#define IDS_AX_CHECKED_CHECK_BOX_ACTION_VERB 18040 +#define IDS_AX_UNCHECKED_CHECK_BOX_ACTION_VERB 18041 +#define IDS_AX_LINK_ACTION_VERB 18042 +#define IDS_AX_AM_PM_FIELD_TEXT 18043 +#define IDS_AX_DAY_OF_MONTH_FIELD_TEXT 18044 +#define IDS_AX_DATE_TIME_FIELD_EMPTY_VALUE_TEXT 18045 +#define IDS_AX_HOUR_FIELD_TEXT 18046 +#define IDS_AX_MILLISECOND_FIELD_TEXT 18047 +#define IDS_AX_MINUTE_FIELD_TEXT 18048 +#define IDS_AX_MONTH_FIELD_TEXT 18049 +#define IDS_AX_SECOND_FIELD_TEXT 18050 +#define IDS_AX_WEEK_OF_YEAR_FIELD_TEXT 18051 +#define IDS_AX_YEAR_FIELD_TEXT 18052 +#define IDS_KEYGEN_HIGH_GRADE_KEY 18053 +#define IDS_KEYGEN_MED_GRADE_KEY 18054 +#define IDS_FORM_INPUT_WEEK_TEMPLATE 18055 +#define IDS_FORM_VALIDATION_VALUE_MISSING_MULTIPLE_FILE 18056 +#define IDS_FORM_VALIDATION_TYPE_MISMATCH 18057 +#define IDS_FORM_VALIDATION_TYPE_MISMATCH_MULTIPLE_EMAIL 18058 +#define IDS_FORM_VALIDATION_RANGE_UNDERFLOW 18059 +#define IDS_FORM_VALIDATION_RANGE_OVERFLOW 18060 +#define IDS_FORM_VALIDATION_STEP_MISMATCH 18061 +#define IDS_FORM_VALIDATION_BAD_INPUT_DATETIME 18062 +#define IDS_FORM_VALIDATION_BAD_INPUT_NUMBER 18063 +#define IDS_FORM_VALIDATION_VALUE_MISSING 18064 +#define IDS_FORM_VALIDATION_VALUE_MISSING_CHECKBOX 18065 +#define IDS_FORM_VALIDATION_VALUE_MISSING_FILE 18066 +#define IDS_FORM_VALIDATION_VALUE_MISSING_RADIO 18067 +#define IDS_FORM_VALIDATION_VALUE_MISSING_SELECT 18068 +#define IDS_FORM_VALIDATION_TYPE_MISMATCH_EMAIL 18069 +#define IDS_FORM_VALIDATION_TYPE_MISMATCH_URL 18070 +#define IDS_FORM_VALIDATION_PATTERN_MISMATCH 18071 +#define IDS_FORM_VALIDATION_TOO_LONG 18072 +#define IDS_PDF_NEED_PASSWORD 18073 +#define IDS_PDF_PAGE_LOADING 18074 +#define IDS_PDF_LOADING_PROGRESS 18075 +#define IDS_PDF_PAGE_LOAD_FAILED 18076 +#define IDS_PDF_PROGRESS_LOADING 18077 +#define IDS_PLUGIN_INITIALIZATION_ERROR 18078 #endif // CEF_INCLUDE_CEF_PACK_STRINGS_H_ diff --git a/cef/include/cef_render_handler.h b/cef/include/cef_render_handler.h new file mode 100644 index 000000000..5064950cd --- /dev/null +++ b/cef/include/cef_render_handler.h @@ -0,0 +1,119 @@ +// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the name Chromium Embedded +// Framework nor the names of its contributors may be used to endorse +// or promote products derived from this software without specific prior +// written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// --------------------------------------------------------------------------- +// +// The contents of this file must follow a specific format in order to +// support the CEF translator tool. See the translator.README.txt file in the +// tools directory for more information. +// + +#ifndef CEF_INCLUDE_CEF_RENDER_HANDLER_H_ +#define CEF_INCLUDE_CEF_RENDER_HANDLER_H_ +#pragma once + +#include "include/cef_base.h" +#include "include/cef_browser.h" +#include + +/// +// Implement this interface to handle events when window rendering is disabled. +// The methods of this class will be called on the UI thread. +/// +/*--cef(source=client)--*/ +class CefRenderHandler : public virtual CefBase { + public: + typedef cef_paint_element_type_t PaintElementType; + typedef std::vector RectList; + + /// + // Called to retrieve the root window rectangle in screen coordinates. Return + // true if the rectangle was provided. + /// + /*--cef()--*/ + virtual bool GetRootScreenRect(CefRefPtr browser, + CefRect& rect) { return false; } + + /// + // Called to retrieve the view rectangle which is relative to screen + // coordinates. Return true if the rectangle was provided. + /// + /*--cef()--*/ + virtual bool GetViewRect(CefRefPtr browser, CefRect& rect) =0; + + /// + // Called to retrieve the translation from view coordinates to actual screen + // coordinates. Return true if the screen coordinates were provided. + /// + /*--cef()--*/ + virtual bool GetScreenPoint(CefRefPtr browser, + int viewX, + int viewY, + int& screenX, + int& screenY) { return false; } + + /// + // Called when the browser wants to show or hide the popup widget. The popup + // should be shown if |show| is true and hidden if |show| is false. + /// + /*--cef()--*/ + virtual void OnPopupShow(CefRefPtr browser, + bool show) {} + + /// + // Called when the browser wants to move or resize the popup widget. |rect| + // contains the new location and size. + /// + /*--cef()--*/ + virtual void OnPopupSize(CefRefPtr browser, + const CefRect& rect) {} + + /// + // Called when an element should be painted. |type| indicates whether the + // element is the view or the popup widget. |buffer| contains the pixel data + // for the whole image. |dirtyRects| contains the set of rectangles that need + // to be repainted. On Windows |buffer| will be |width|*|height|*4 bytes + // in size and represents a BGRA image with an upper-left origin. + /// + /*--cef()--*/ + virtual void OnPaint(CefRefPtr browser, + PaintElementType type, + const RectList& dirtyRects, + const void* buffer, + int width, int height) =0; + + /// + // Called when the browser window's cursor has changed. + /// + /*--cef()--*/ + virtual void OnCursorChange(CefRefPtr browser, + CefCursorHandle cursor) {} +}; + +#endif // CEF_INCLUDE_CEF_RENDER_HANDLER_H_ diff --git a/cef/include/cef_render_process_handler.h b/cef/include/cef_render_process_handler.h index f81fc2dee..0f21b1d2c 100644 --- a/cef/include/cef_render_process_handler.h +++ b/cef/include/cef_render_process_handler.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -44,19 +44,26 @@ #include "include/cef_frame.h" #include "include/cef_process_message.h" #include "include/cef_v8.h" +#include "include/cef_values.h" /// // Class used to implement render process callbacks. The methods of this class -// will always be called on the render process main thread. +// will be called on the render process main thread (TID_RENDERER) unless +// otherwise indicated. /// /*--cef(source=client)--*/ class CefRenderProcessHandler : public virtual CefBase { public: + typedef cef_navigation_type_t NavigationType; + /// - // Called after the render process main thread has been created. + // Called after the render process main thread has been created. |extra_info| + // is a read-only value originating from + // CefBrowserProcessHandler::OnRenderProcessThreadCreated(). Do not keep a + // reference to |extra_info| outside of this method. /// /*--cef()--*/ - virtual void OnRenderThreadCreated() {} + virtual void OnRenderThreadCreated(CefRefPtr extra_info) {} /// // Called after WebKit has been initialized. @@ -65,7 +72,9 @@ class CefRenderProcessHandler : public virtual CefBase { virtual void OnWebKitInitialized() {} /// - // Called after a browser has been created. + // Called after a browser has been created. When browsing cross-origin a new + // browser will be created before the old browser with the same identifier is + // destroyed. /// /*--cef()--*/ virtual void OnBrowserCreated(CefRefPtr browser) {} @@ -76,10 +85,24 @@ class CefRenderProcessHandler : public virtual CefBase { /*--cef()--*/ virtual void OnBrowserDestroyed(CefRefPtr browser) {} + /// + // Called before browser navigation. Return true to cancel the navigation or + // false to allow the navigation to proceed. The |request| object cannot be + // modified in this callback. + /// + /*--cef()--*/ + virtual bool OnBeforeNavigation(CefRefPtr browser, + CefRefPtr frame, + CefRefPtr request, + NavigationType navigation_type, + bool is_redirect) { return false; } + /// // Called immediately after the V8 context for a frame has been created. To // retrieve the JavaScript 'window' object use the CefV8Context::GetGlobal() - // method. + // method. V8 handles can only be accessed from the thread on which they are + // created. A task runner for posting tasks on the associated thread can be + // retrieved via the CefV8Context::GetTaskRunner() method. /// /*--cef()--*/ virtual void OnContextCreated(CefRefPtr browser, @@ -95,6 +118,55 @@ class CefRenderProcessHandler : public virtual CefBase { CefRefPtr frame, CefRefPtr context) {} + /// + // Called for global uncaught exceptions in a frame. Execution of this + // callback is disabled by default. To enable set + // CefSettings.uncaught_exception_stack_size > 0. + /// + /*--cef()--*/ + virtual void OnUncaughtException(CefRefPtr browser, + CefRefPtr frame, + CefRefPtr context, + CefRefPtr exception, + CefRefPtr stackTrace) {} + + /// + // Called on the WebWorker thread immediately after the V8 context for a new + // WebWorker has been created. To retrieve the JavaScript 'self' object use + // the CefV8Context::GetGlobal() method. V8 handles can only be accessed from + // the thread on which they are created. A task runner for posting tasks on + // the associated thread can be retrieved via the + // CefV8Context::GetTaskRunner() method. + /// + /*--cef()--*/ + virtual void OnWorkerContextCreated(int worker_id, + const CefString& url, + CefRefPtr context) {} + + /// + // Called on the WebWorker thread immediately before the V8 context for a + // WebWorker is released. No references to the context should be kept after + // this method is called. Any tasks posted or pending on the WebWorker + // thread after this method is called may not be executed. + /// + /*--cef()--*/ + virtual void OnWorkerContextReleased(int worker_id, + const CefString& url, + CefRefPtr context) {} + + /// + // Called on the WebWorker thread for global uncaught exceptions in a + // WebWorker. Execution of this callback is disabled by default. To enable set + // CefSettings.uncaught_exception_stack_size > 0. + /// + /*--cef()--*/ + virtual void OnWorkerUncaughtException( + int worker_id, + const CefString& url, + CefRefPtr context, + CefRefPtr exception, + CefRefPtr stackTrace) {} + /// // Called when a new node in the the browser gets focus. The |node| value may // be empty if no specific node has gained focus. The node object passed to diff --git a/cef/include/cef_request_handler.h b/cef/include/cef_request_handler.h index 42ab13f0a..e01f89189 100644 --- a/cef/include/cef_request_handler.h +++ b/cef/include/cef_request_handler.h @@ -138,7 +138,7 @@ class CefRequestHandler : public virtual CefBase { // Called on the IO thread when the browser needs credentials from the user. // |isProxy| indicates whether the host is a proxy server. |host| contains the // hostname and |port| contains the port number. Return true to continue the - // request and call CefAuthCallback::Complete() when the authentication + // request and call CefAuthCallback::Continue() when the authentication // information is available. Return false to cancel the request. /// /*--cef(optional_param=realm)--*/ @@ -157,7 +157,7 @@ class CefRequestHandler : public virtual CefBase { // Called on the IO thread when JavaScript requests a specific storage quota // size via the webkitStorageInfo.requestQuota function. |origin_url| is the // origin of the page making the request. |new_size| is the requested quota - // size in bytes. Return true and call CefQuotaCallback::Complete() either in + // size in bytes. Return true and call CefQuotaCallback::Continue() either in // this function or at a later time to grant or deny the request. Return false // to cancel the request. /// diff --git a/cef/include/cef_runnable.h b/cef/include/cef_runnable.h index 7002d431b..37ad0efe2 100644 --- a/cef/include/cef_runnable.h +++ b/cef/include/cef_runnable.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. Portions Copyright (c) +// Copyright (c) 2013 Marshall A. Greenblatt. Portions Copyright (c) // 2006-2011 Google Inc. All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -145,7 +145,7 @@ class CefRunnableMethod : public CefTask { traits_.ReleaseCallee(obj); } - virtual void Execute(CefThreadId threadId) { + virtual void Execute() { if (obj_) DispatchToMethod(obj_, meth_, params_); } @@ -253,7 +253,7 @@ class CefRunnableFunction : public CefTask { ~CefRunnableFunction() { } - virtual void Execute(CefThreadId threadId) { + virtual void Execute() { if (function_) DispatchToFunction(function_, params_); } diff --git a/cef/include/cef_task.h b/cef/include/cef_task.h index 77dd3b991..0ecaa7526 100644 --- a/cef/include/cef_task.h +++ b/cef/include/cef_task.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -39,50 +39,110 @@ #include "include/cef_base.h" -class CefTask; - typedef cef_thread_id_t CefThreadId; /// +// Implement this interface for asynchronous task execution. If the task is +// posted successfully and if the associated message loop is still running then +// the Execute() method will be called on the target thread. If the task fails +// to post then the task object may be destroyed on the source thread instead of +// the target thread. For this reason be cautious when performing work in the +// task object destructor. +/// +/*--cef(source=client)--*/ +class CefTask : public virtual CefBase { + public: + /// + // Method that will be executed on the target thread. + /// + /*--cef()--*/ + virtual void Execute() =0; +}; + +/// +// Class that asynchronously executes tasks on the associated thread. It is safe +// to call the methods of this class on any thread. +// // CEF maintains multiple internal threads that are used for handling different -// types of tasks in different processes. See the cef_thread_id_t definitions in -// cef_types.h for more information. This function will return true if called on -// the specified thread. It is an error to request a thread from the wrong -// process. +// types of tasks in different processes. The cef_thread_id_t definitions in +// cef_types.h list the common CEF threads. Task runners are also available for +// other CEF threads as appropriate (for example, V8 WebWorker threads). +/// +/*--cef(source=library)--*/ +class CefTaskRunner : public virtual CefBase { + public: + /// + // Returns the task runner for the current thread. Only CEF threads will have + // task runners. An empty reference will be returned if this method is called + // on an invalid thread. + /// + /*--cef()--*/ + static CefRefPtr GetForCurrentThread(); + + /// + // Returns the task runner for the specified CEF thread. + /// + /*--cef()--*/ + static CefRefPtr GetForThread(CefThreadId threadId); + + /// + // Returns true if this object is pointing to the same task runner as |that| + // object. + /// + /*--cef()--*/ + virtual bool IsSame(CefRefPtr that) =0; + + /// + // Returns true if this task runner belongs to the current thread. + /// + /*--cef()--*/ + virtual bool BelongsToCurrentThread() =0; + + /// + // Returns true if this task runner is for the specified CEF thread. + /// + /*--cef()--*/ + virtual bool BelongsToThread(CefThreadId threadId) =0; + + /// + // Post a task for execution on the thread associated with this task runner. + // Execution will occur asynchronously. + /// + /*--cef()--*/ + virtual bool PostTask(CefRefPtr task) =0; + + /// + // Post a task for delayed execution on the thread associated with this task + // runner. Execution will occur asynchronously. Delayed tasks are not + // supported on V8 WebWorker threads and will be executed without the + // specified delay. + /// + /*--cef()--*/ + virtual bool PostDelayedTask(CefRefPtr task, int64 delay_ms) =0; +}; + + +/// +// Returns true if called on the specified thread. Equivalent to using +// CefTaskRunner::GetForThread(threadId)->BelongsToCurrentThread(). /// /*--cef()--*/ bool CefCurrentlyOn(CefThreadId threadId); /// -// Post a task for execution on the specified thread. This function may be -// called on any thread. It is an error to request a thread from the wrong -// process. +// Post a task for execution on the specified thread. Equivalent to +// using CefTaskRunner::GetForThread(threadId)->PostTask(task). /// /*--cef()--*/ bool CefPostTask(CefThreadId threadId, CefRefPtr task); /// -// Post a task for delayed execution on the specified thread. This function may -// be called on any thread. It is an error to request a thread from the wrong -// process. +// Post a task for delayed execution on the specified thread. Equivalent to +// using CefTaskRunner::GetForThread(threadId)->PostDelayedTask(task, delay_ms). /// /*--cef()--*/ bool CefPostDelayedTask(CefThreadId threadId, CefRefPtr task, int64 delay_ms); -/// -// Implement this interface for task execution. The methods of this class may -// be called on any thread. -/// -/*--cef(source=client)--*/ -class CefTask : public virtual CefBase { - public: - /// - // Method that will be executed. |threadId| is the thread executing the call. - /// - /*--cef()--*/ - virtual void Execute(CefThreadId threadId) =0; -}; - #endif // CEF_INCLUDE_CEF_TASK_H_ diff --git a/cef/include/cef_trace_event.h b/cef/include/cef_trace_event.h index b93a2cf9a..7fee2183f 100644 --- a/cef/include/cef_trace_event.h +++ b/cef/include/cef_trace_event.h @@ -184,13 +184,6 @@ CEF_EXPORT void cef_trace_event_end(const char* category, const char* arg2_name, uint64 arg2_val, int copy); -CEF_EXPORT void cef_trace_event_if_longer_than(long long threshold_us, - const char* category, - const char* name, - const char* arg1_name, - uint64 arg1_val, - const char* arg2_name, - uint64 arg2_val); CEF_EXPORT void cef_trace_counter(const char* category, const char* name, const char* value1_name, @@ -312,25 +305,6 @@ CEF_EXPORT void cef_trace_event_async_end(const char* category, cef_trace_event_end(category, name, arg1_name, arg1_val, arg2_name, \ arg2_val, true) -// Time threshold event: -// Only record the event if the duration is greater than the specified -// threshold_us (time in microseconds). -// Records a pair of begin and end events called "name" for the current -// scope, with 0, 1 or 2 associated arguments. If the category is not -// enabled, then this does nothing. -// - category and name strings must have application lifetime (statics or -// literals). They may not include " chars. -#define CEF_TRACE_EVENT_IF_LONGER_THAN0(threshold_us, category, name) \ - cef_trace_event_if_longer_than(threshold_us, category, name, NULL, 0, NULL, 0) -#define CEF_TRACE_EVENT_IF_LONGER_THAN1(threshold_us, category, name, \ - arg1_name, arg1_val) \ - cef_trace_event_if_longer_than(threshold_us, category, name, arg1_name, \ - arg1_val, NULL, 0) -#define CEF_TRACE_EVENT_IF_LONGER_THAN2(threshold_us, category, name, \ - arg1_name, arg1_val, arg2_name, arg2_val) \ - cef_trace_event_if_longer_than(threshold_us, category, name, arg1_name, \ - arg1_val, arg2_name, arg2_val) - // Records the value of a counter called "name" immediately. Value // must be representable as a 32 bit integer. // - category and name strings must have application lifetime (statics or diff --git a/cef/include/cef_v8.h b/cef/include/cef_v8.h index 77b45fa8c..3f05b802e 100644 --- a/cef/include/cef_v8.h +++ b/cef/include/cef_v8.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -42,6 +42,7 @@ #include "include/cef_base.h" #include "include/cef_browser.h" #include "include/cef_frame.h" +#include "include/cef_task.h" #include class CefV8Exception; @@ -116,8 +117,11 @@ bool CefRegisterExtension(const CefString& extension_name, /// -// Class that encapsulates a V8 context handle. The methods of this class may -// only be called on the render process main thread. +// Class representing a V8 context handle. V8 handles can only be accessed from +// the thread on which they are created. Valid threads for creating a V8 handle +// include the render process main thread (TID_RENDERER) and WebWorker threads. +// A task runner for posting tasks on the associated thread can be retrieved via +// the CefV8Context::GetTaskRunner() method. /// /*--cef(source=library)--*/ class CefV8Context : public virtual CefBase { @@ -141,13 +145,31 @@ class CefV8Context : public virtual CefBase { static bool InContext(); /// - // Returns the browser for this context. + // Returns the task runner associated with this context. V8 handles can only + // be accessed from the thread on which they are created. This method can be + // called on any render process thread. + /// + /*--cef()--*/ + virtual CefRefPtr GetTaskRunner() =0; + + /// + // Returns true if the underlying handle is valid and it can be accessed on + // the current thread. Do not call any other methods if this method returns + // false. + /// + /*--cef()--*/ + virtual bool IsValid() =0; + + /// + // Returns the browser for this context. This method will return an empty + // reference for WebWorker contexts. /// /*--cef()--*/ virtual CefRefPtr GetBrowser() =0; /// - // Returns the frame for this context. + // Returns the frame for this context. This method will return an empty + // reference for WebWorker contexts. /// /*--cef()--*/ virtual CefRefPtr GetFrame() =0; @@ -200,7 +222,7 @@ typedef std::vector > CefV8ValueList; /// // Interface that should be implemented to handle V8 function calls. The methods -// of this class will always be called on the render process main thread. +// of this class will be called on the thread associated with the V8 function. /// /*--cef(source=client)--*/ class CefV8Handler : public virtual CefBase { @@ -223,7 +245,7 @@ class CefV8Handler : public virtual CefBase { /// // Interface that should be implemented to handle V8 accessor calls. Accessor // identifiers are registered by calling CefV8Value::SetValue(). The methods -// of this class will always be called on the render process main thread. +// of this class will be called on the thread associated with the V8 accessor. /// /*--cef(source=client)--*/ class CefV8Accessor : public virtual CefBase { @@ -256,7 +278,8 @@ class CefV8Accessor : public virtual CefBase { }; /// -// Class representing a V8 exception. +// Class representing a V8 exception. The methods of this class may be called on +// any render process thread. /// /*--cef(source=library)--*/ class CefV8Exception : public virtual CefBase { @@ -317,8 +340,11 @@ class CefV8Exception : public virtual CefBase { }; /// -// Class representing a V8 value. The methods of this class may only be called -// on the render process main thread. +// Class representing a V8 value handle. V8 handles can only be accessed from +// the thread on which they are created. Valid threads for creating a V8 handle +// include the render process main thread (TID_RENDERER) and WebWorker threads. +// A task runner for posting tasks on the associated thread can be retrieved via +// the CefV8Context::GetTaskRunner() method. /// /*--cef(source=library)--*/ class CefV8Value : public virtual CefBase { @@ -407,6 +433,14 @@ class CefV8Value : public virtual CefBase { static CefRefPtr CreateFunction(const CefString& name, CefRefPtr handler); + /// + // Returns true if the underlying handle is valid and it can be accessed on + // the current thread. Do not call any other methods if this method returns + // false. + /// + /*--cef()--*/ + virtual bool IsValid() =0; + /// // True if the value type is undefined. /// @@ -741,8 +775,11 @@ class CefV8Value : public virtual CefBase { }; /// -// Class representing a V8 stack trace. The methods of this class may only be -// called on the render process main thread. +// Class representing a V8 stack trace handle. V8 handles can only be accessed +// from the thread on which they are created. Valid threads for creating a V8 +// handle include the render process main thread (TID_RENDERER) and WebWorker +// threads. A task runner for posting tasks on the associated thread can be +// retrieved via the CefV8Context::GetTaskRunner() method. /// /*--cef(source=library)--*/ class CefV8StackTrace : public virtual CefBase { @@ -754,6 +791,14 @@ class CefV8StackTrace : public virtual CefBase { /*--cef()--*/ static CefRefPtr GetCurrent(int frame_limit); + /// + // Returns true if the underlying handle is valid and it can be accessed on + // the current thread. Do not call any other methods if this method returns + // false. + /// + /*--cef()--*/ + virtual bool IsValid() =0; + /// // Returns the number of stack frames. /// @@ -768,12 +813,23 @@ class CefV8StackTrace : public virtual CefBase { }; /// -// Class representing a V8 stack frame. The methods of this class may only be -// called on the render process main thread. +// Class representing a V8 stack frame handle. V8 handles can only be accessed +// from the thread on which they are created. Valid threads for creating a V8 +// handle include the render process main thread (TID_RENDERER) and WebWorker +// threads. A task runner for posting tasks on the associated thread can be +// retrieved via the CefV8Context::GetTaskRunner() method. /// /*--cef(source=library)--*/ class CefV8StackFrame : public virtual CefBase { public: + /// + // Returns true if the underlying handle is valid and it can be accessed on + // the current thread. Do not call any other methods if this method returns + // false. + /// + /*--cef()--*/ + virtual bool IsValid() =0; + /// // Returns the name of the resource script that contains the function. /// diff --git a/cef/include/cef_version.h b/cef/include/cef_version.h index 8ba54455d..8776f303f 100644 --- a/cef/include/cef_version.h +++ b/cef/include/cef_version.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2013 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -36,13 +36,13 @@ #define CEF_INCLUDE_CEF_VERSION_H_ #define CEF_VERSION_MAJOR 3 -#define CEF_REVISION 883 -#define COPYRIGHT_YEAR 2012 +#define CEF_REVISION 1050 +#define COPYRIGHT_YEAR 2013 -#define CHROME_VERSION_MAJOR 23 +#define CHROME_VERSION_MAJOR 25 #define CHROME_VERSION_MINOR 0 -#define CHROME_VERSION_BUILD 1271 -#define CHROME_VERSION_PATCH 18 +#define CHROME_VERSION_BUILD 1364 +#define CHROME_VERSION_PATCH 29 #define DO_MAKE_STRING(p) #p #define MAKE_STRING(p) DO_MAKE_STRING(p) diff --git a/cef/include/internal/cef_time.h b/cef/include/internal/cef_time.h index ccaf19320..64e601fe0 100644 --- a/cef/include/internal/cef_time.h +++ b/cef/include/internal/cef_time.h @@ -69,6 +69,18 @@ CEF_EXPORT int cef_time_from_timet(time_t time, cef_time_t* cef_time); CEF_EXPORT int cef_time_to_doublet(const cef_time_t* cef_time, double* time); CEF_EXPORT int cef_time_from_doublet(double time, cef_time_t* cef_time); +/// +// Retrieve the current system time. +// +CEF_EXPORT int cef_time_now(cef_time_t* cef_time); + +/// +// Retrieve the delta in milliseconds between two time values. +// +CEF_EXPORT int cef_time_delta(const cef_time_t* cef_time1, + const cef_time_t* cef_time2, + long long* delta); + #ifdef __cplusplus } #endif diff --git a/cef/include/internal/cef_types.h b/cef/include/internal/cef_types.h index dd3df948d..d6772fb5b 100644 --- a/cef/include/internal/cef_types.h +++ b/cef/include/internal/cef_types.h @@ -130,7 +130,8 @@ enum cef_log_severity_t { /// // Initialization settings. Specify NULL or 0 to get the recommended default -// values. +// values. Many of these and other settings can also configured using command- +// line flags. /// typedef struct _cef_settings_t { /// @@ -208,6 +209,11 @@ typedef struct _cef_settings_t { /// cef_log_severity_t log_severity; + /// + // Enable DCHECK in release mode to ease debugging. + /// + bool release_dcheck_enabled; + /// // Custom flags that will be used when initializing the V8 JavaScript engine. // The consequences of using custom flags may not be well tested. @@ -252,12 +258,40 @@ typedef struct _cef_settings_t { // Chrome browser window. /// int remote_debugging_port; + + /// + // The number of stack trace frames to capture for uncaught exceptions. + // Specify a positive value to enable the CefV8ContextHandler:: + // OnUncaughtException() callback. Specify 0 (default value) and + // OnUncaughtException() will not be called. + /// + int uncaught_exception_stack_size; + + /// + // By default CEF V8 references will be invalidated (the IsValid() method will + // return false) after the owning context has been released. This reduces the + // need for external record keeping and avoids crashes due to the use of V8 + // references after the associated context has been released. + // + // CEF currently offers two context safety implementations with different + // performance characteristics. The default implementation (value of 0) uses a + // map of hash values and should provide better performance in situations with + // a small number contexts. The alternate implementation (value of 1) uses a + // hidden value attached to each context and should provide better performance + // in situations with a large number of contexts. + // + // If you need better performance in the creation of V8 references and you + // plan to manually track context lifespan you can disable context safety by + // specifying a value of -1. + /// + int context_safety_implementation; } cef_settings_t; /// // Browser initialization settings. Specify NULL or 0 to get the recommended // default values. The consequences of using custom values may not be well -// tested. +// tested. Many of these and other settings can also configured using command- +// line flags. /// typedef struct _cef_browser_settings_t { /// @@ -452,16 +486,6 @@ typedef struct _cef_browser_settings_t { /// bool accelerated_2d_canvas_disabled; - /// - // Set to true (1) to enable accelerated painting. - /// - bool accelerated_painting_enabled; - - /// - // Set to true (1) to enable accelerated filters. - /// - bool accelerated_filters_enabled; - /// // Set to true (1) to disable accelerated plugins. /// @@ -471,11 +495,6 @@ typedef struct _cef_browser_settings_t { // Set to true (1) to disable developer tools (WebKit inspector). /// bool developer_tools_disabled; - - /// - // Set to true (1) to enable fullscreen mode. - /// - bool fullscreen_enabled; } cef_browser_settings_t; /// @@ -738,28 +757,28 @@ enum cef_urlrequest_flags_t { // Default behavior. /// UR_FLAG_NONE = 0, - + /// // If set the cache will be skipped when handling the request. /// UR_FLAG_SKIP_CACHE = 1 << 0, - + /// // If set user name, password, and cookies may be sent with the request. /// UR_FLAG_ALLOW_CACHED_CREDENTIALS = 1 << 1, - + /// // If set cookies may be sent with the request and saved from the response. // UR_FLAG_ALLOW_CACHED_CREDENTIALS must also be set. /// UR_FLAG_ALLOW_COOKIES = 1 << 2, - + /// // If set upload progress events will be generated when a request has a body. /// UR_FLAG_REPORT_UPLOAD_PROGRESS = 1 << 3, - + /// // If set load timing info will be collected for the request. /// @@ -791,23 +810,23 @@ enum cef_urlrequest_status_t { // Unknown status. /// UR_UNKNOWN = 0, - + /// // Request succeeded. /// UR_SUCCESS, - + /// // An IO request is pending, and the caller will be informed when it is // completed. /// UR_IO_PENDING, - + /// // Request was canceled programatically. /// UR_CANCELED, - + /// // Request failed for some reason. /// @@ -947,12 +966,50 @@ enum cef_menu_id_t { MENU_ID_USER_LAST = 28500, }; +/// +// Mouse button types. +/// +enum cef_mouse_button_type_t { + MBT_LEFT = 0, + MBT_MIDDLE, + MBT_RIGHT, +}; + +/// +// Structure representing mouse event information. +/// +typedef struct _cef_mouse_event_t { + /// + // X coordinate relative to the left side of the view. + /// + int x; + + /// + // Y coordinate relative to the top side of the view. + /// + int y; + + /// + // Bit flags describing any pressed modifier keys. See + // cef_event_flags_t for values. + /// + uint32 modifiers; +} cef_mouse_event_t; + +/// +// Paint element types. +/// +enum cef_paint_element_type_t { + PET_VIEW = 0, + PET_POPUP, +}; + /// // Supported event bit flags. /// enum cef_event_flags_t { EVENTFLAG_NONE = 0, - EVENTFLAG_CAPS_LOCK_DOWN = 1 << 0, + EVENTFLAG_CAPS_LOCK_ON = 1 << 0, EVENTFLAG_SHIFT_DOWN = 1 << 1, EVENTFLAG_CONTROL_DOWN = 1 << 2, EVENTFLAG_ALT_DOWN = 1 << 3, @@ -961,8 +1018,10 @@ enum cef_event_flags_t { EVENTFLAG_RIGHT_MOUSE_BUTTON = 1 << 6, // Mac OS-X command key. EVENTFLAG_COMMAND_DOWN = 1 << 7, - // Windows extended key (see WM_KEYDOWN doc). - EVENTFLAG_EXTENDED = 1 << 8, + EVENTFLAG_NUM_LOCK_ON = 1 << 8, + EVENTFLAG_IS_KEY_PAD = 1 << 9, + EVENTFLAG_IS_LEFT = 1 << 10, + EVENTFLAG_IS_RIGHT = 1 << 11, }; /// @@ -1083,17 +1142,6 @@ enum cef_key_event_type_t { KEYEVENT_CHAR }; -/// -// Key event modifiers. -/// -enum cef_key_event_modifiers_t { - KEY_SHIFT = 1 << 0, - KEY_CTRL = 1 << 1, - KEY_ALT = 1 << 2, - KEY_META = 1 << 3, - KEY_KEYPAD = 1 << 4, // Only used on Mac OS-X -}; - /// // Structure representing keyboard event information. /// @@ -1102,12 +1150,12 @@ typedef struct _cef_key_event_t { // The type of keyboard event. /// cef_key_event_type_t type; - + /// // Bit flags describing any pressed modifier keys. See - // cef_key_event_modifiers_t for values. + // cef_event_flags_t for values. /// - int modifiers; + uint32 modifiers; /// // The Windows key code for the key event. This value is used by the DOM @@ -1161,6 +1209,18 @@ enum cef_focus_source_t { FOCUS_SOURCE_SYSTEM, }; +/// +// Navigation types. +/// +enum cef_navigation_type_t { + NAVIGATION_LINK_CLICKED = 0, + NAVIGATION_FORM_SUBMITTED, + NAVIGATION_BACK_FORWARD, + NAVIGATION_RELOAD, + NAVIGATION_FORM_RESUBMITTED, + NAVIGATION_OTHER, +}; + /// // Supported XML encoding types. The parser supports ASCII, ISO-8859-1, and // UTF16 (LE and BE) by default. All other types must be translated to UTF8 diff --git a/cef/include/internal/cef_types_wrappers.h b/cef/include/internal/cef_types_wrappers.h index 4b6a3d876..54e9dc917 100644 --- a/cef/include/internal/cef_types_wrappers.h +++ b/cef/include/internal/cef_types_wrappers.h @@ -199,6 +199,25 @@ struct CefKeyEventTraits { /// typedef CefStructBase CefKeyEvent; +struct CefMouseEventTraits { + typedef cef_mouse_event_t struct_type; + + static inline void init(struct_type* s) {} + + static inline void clear(struct_type* s) {} + + static inline void set(const struct_type* src, struct_type* target, + bool copy) { + target->x = src->x; + target->y = src->y; + target->modifiers = src->modifiers; + } +}; + +/// +// Class representing a mouse event. +/// +typedef CefStructBase CefMouseEvent; struct CefPopupFeaturesTraits { typedef cef_popup_features_t struct_type; @@ -288,6 +307,7 @@ struct CefSettingsTraits { cef_string_set(src->log_file.str, src->log_file.length, &target->log_file, copy); target->log_severity = src->log_severity; + target->release_dcheck_enabled = src->release_dcheck_enabled; cef_string_set(src->javascript_flags.str, src->javascript_flags.length, &target->javascript_flags, copy); @@ -300,6 +320,8 @@ struct CefSettingsTraits { &target->locales_dir_path, copy); target->pack_loading_disabled = src->pack_loading_disabled; target->remote_debugging_port = src->remote_debugging_port; + target->uncaught_exception_stack_size = src->uncaught_exception_stack_size; + target->context_safety_implementation = src->context_safety_implementation; } }; @@ -396,11 +418,8 @@ struct CefBrowserSettingsTraits { target->accelerated_video_disabled = src->accelerated_video_disabled; target->accelerated_2d_canvas_disabled = src->accelerated_2d_canvas_disabled; - target->accelerated_painting_enabled = src->accelerated_painting_enabled; - target->accelerated_filters_enabled = src->accelerated_filters_enabled; target->accelerated_plugins_disabled = src->accelerated_plugins_disabled; target->developer_tools_disabled = src->developer_tools_disabled; - target->fullscreen_enabled = src->fullscreen_enabled; } }; @@ -494,6 +513,18 @@ class CefTime : public CefStructBase { cef_time_to_doublet(this, &time); return time; } + + // Set this object to now. + void Now() { + cef_time_now(this); + } + + // Return the delta between this object and |other| in milliseconds. + long long Delta(const CefTime& other) { + long long delta = 0; + cef_time_delta(this, &other, &delta); + return delta; + } }; diff --git a/cef/libcef_dll/cpptoc/app_cpptoc.cc b/cef/libcef_dll/cpptoc/app_cpptoc.cc index d699d148b..5973f0f6b 100644 --- a/cef/libcef_dll/cpptoc/app_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/app_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/app_cpptoc.h b/cef/libcef_dll/cpptoc/app_cpptoc.h index 0809df8b4..3daad00fc 100644 --- a/cef/libcef_dll/cpptoc/app_cpptoc.h +++ b/cef/libcef_dll/cpptoc/app_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/browser_process_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/browser_process_handler_cpptoc.cc index a492c973a..380053a7b 100644 --- a/cef/libcef_dll/cpptoc/browser_process_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/browser_process_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -13,6 +13,7 @@ #include "libcef_dll/cpptoc/browser_process_handler_cpptoc.h" #include "libcef_dll/cpptoc/proxy_handler_cpptoc.h" #include "libcef_dll/ctocpp/command_line_ctocpp.h" +#include "libcef_dll/ctocpp/list_value_ctocpp.h" // MEMBER FUNCTIONS - Body may be edited by hand. @@ -63,6 +64,24 @@ void CEF_CALLBACK browser_process_handler_on_before_child_process_launch( CefCommandLineCToCpp::Wrap(command_line)); } +void CEF_CALLBACK browser_process_handler_on_render_process_thread_created( + struct _cef_browser_process_handler_t* self, + struct _cef_list_value_t* extra_info) { + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + // Verify param: extra_info; type: refptr_diff + DCHECK(extra_info); + if (!extra_info) + return; + + // Execute + CefBrowserProcessHandlerCppToC::Get(self)->OnRenderProcessThreadCreated( + CefListValueCToCpp::Wrap(extra_info)); +} + // CONSTRUCTOR - Do not edit by hand. @@ -75,6 +94,8 @@ CefBrowserProcessHandlerCppToC::CefBrowserProcessHandlerCppToC( browser_process_handler_on_context_initialized; struct_.struct_.on_before_child_process_launch = browser_process_handler_on_before_child_process_launch; + struct_.struct_.on_render_process_thread_created = + browser_process_handler_on_render_process_thread_created; } #ifndef NDEBUG diff --git a/cef/libcef_dll/cpptoc/browser_process_handler_cpptoc.h b/cef/libcef_dll/cpptoc/browser_process_handler_cpptoc.h index e9047dd07..4285b4c1a 100644 --- a/cef/libcef_dll/cpptoc/browser_process_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/browser_process_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/client_cpptoc.cc b/cef/libcef_dll/cpptoc/client_cpptoc.cc index 68df6d6de..5ff860181 100644 --- a/cef/libcef_dll/cpptoc/client_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/client_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -21,6 +21,7 @@ #include "libcef_dll/cpptoc/keyboard_handler_cpptoc.h" #include "libcef_dll/cpptoc/life_span_handler_cpptoc.h" #include "libcef_dll/cpptoc/load_handler_cpptoc.h" +#include "libcef_dll/cpptoc/render_handler_cpptoc.h" #include "libcef_dll/cpptoc/request_handler_cpptoc.h" #include "libcef_dll/ctocpp/browser_ctocpp.h" #include "libcef_dll/ctocpp/process_message_ctocpp.h" @@ -188,6 +189,22 @@ struct _cef_load_handler_t* CEF_CALLBACK client_get_load_handler( return CefLoadHandlerCppToC::Wrap(_retval); } +struct _cef_render_handler_t* CEF_CALLBACK client_get_render_handler( + struct _cef_client_t* self) { + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return NULL; + + // Execute + CefRefPtr _retval = CefClientCppToC::Get( + self)->GetRenderHandler(); + + // Return type: refptr_same + return CefRenderHandlerCppToC::Wrap(_retval); +} + struct _cef_request_handler_t* CEF_CALLBACK client_get_request_handler( struct _cef_client_t* self) { // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING @@ -246,6 +263,7 @@ CefClientCppToC::CefClientCppToC(CefClient* cls) struct_.struct_.get_keyboard_handler = client_get_keyboard_handler; struct_.struct_.get_life_span_handler = client_get_life_span_handler; struct_.struct_.get_load_handler = client_get_load_handler; + struct_.struct_.get_render_handler = client_get_render_handler; struct_.struct_.get_request_handler = client_get_request_handler; struct_.struct_.on_process_message_received = client_on_process_message_received; diff --git a/cef/libcef_dll/cpptoc/client_cpptoc.h b/cef/libcef_dll/cpptoc/client_cpptoc.h index 1db8e5b12..93731f15d 100644 --- a/cef/libcef_dll/cpptoc/client_cpptoc.h +++ b/cef/libcef_dll/cpptoc/client_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/context_menu_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/context_menu_handler_cpptoc.cc index a09c3bc39..24d99be51 100644 --- a/cef/libcef_dll/cpptoc/context_menu_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/context_menu_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/context_menu_handler_cpptoc.h b/cef/libcef_dll/cpptoc/context_menu_handler_cpptoc.h index eba5d929c..f7592de0b 100644 --- a/cef/libcef_dll/cpptoc/context_menu_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/context_menu_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/cookie_visitor_cpptoc.cc b/cef/libcef_dll/cpptoc/cookie_visitor_cpptoc.cc index fa61fe6c1..0b26e62b5 100644 --- a/cef/libcef_dll/cpptoc/cookie_visitor_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/cookie_visitor_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/cookie_visitor_cpptoc.h b/cef/libcef_dll/cpptoc/cookie_visitor_cpptoc.h index 6473a2309..24d7d62f9 100644 --- a/cef/libcef_dll/cpptoc/cookie_visitor_cpptoc.h +++ b/cef/libcef_dll/cpptoc/cookie_visitor_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/dialog_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/dialog_handler_cpptoc.cc index 0d9fa2a01..7714183b6 100644 --- a/cef/libcef_dll/cpptoc/dialog_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/dialog_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/dialog_handler_cpptoc.h b/cef/libcef_dll/cpptoc/dialog_handler_cpptoc.h index 3e916170a..9d69fbadf 100644 --- a/cef/libcef_dll/cpptoc/dialog_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/dialog_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/display_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/display_handler_cpptoc.cc index 68b675964..dcf222d42 100644 --- a/cef/libcef_dll/cpptoc/display_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/display_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/display_handler_cpptoc.h b/cef/libcef_dll/cpptoc/display_handler_cpptoc.h index 0622ced14..bfa04645d 100644 --- a/cef/libcef_dll/cpptoc/display_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/display_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/domevent_listener_cpptoc.cc b/cef/libcef_dll/cpptoc/domevent_listener_cpptoc.cc index 59e22c653..50e0158a2 100644 --- a/cef/libcef_dll/cpptoc/domevent_listener_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/domevent_listener_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/domevent_listener_cpptoc.h b/cef/libcef_dll/cpptoc/domevent_listener_cpptoc.h index 562882f3e..4e8c84d7b 100644 --- a/cef/libcef_dll/cpptoc/domevent_listener_cpptoc.h +++ b/cef/libcef_dll/cpptoc/domevent_listener_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/domvisitor_cpptoc.cc b/cef/libcef_dll/cpptoc/domvisitor_cpptoc.cc index aefbe1c92..e3c649648 100644 --- a/cef/libcef_dll/cpptoc/domvisitor_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/domvisitor_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/domvisitor_cpptoc.h b/cef/libcef_dll/cpptoc/domvisitor_cpptoc.h index 0f09b0b60..21d015c89 100644 --- a/cef/libcef_dll/cpptoc/domvisitor_cpptoc.h +++ b/cef/libcef_dll/cpptoc/domvisitor_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/download_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/download_handler_cpptoc.cc index 28113de7c..9963a05ee 100644 --- a/cef/libcef_dll/cpptoc/download_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/download_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/download_handler_cpptoc.h b/cef/libcef_dll/cpptoc/download_handler_cpptoc.h index f659d613d..b8c9ec319 100644 --- a/cef/libcef_dll/cpptoc/download_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/download_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/focus_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/focus_handler_cpptoc.cc index e33ff796b..09d7038c4 100644 --- a/cef/libcef_dll/cpptoc/focus_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/focus_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/focus_handler_cpptoc.h b/cef/libcef_dll/cpptoc/focus_handler_cpptoc.h index b88e246ec..5ed79a643 100644 --- a/cef/libcef_dll/cpptoc/focus_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/focus_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/geolocation_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/geolocation_handler_cpptoc.cc index 432fc8e30..d9c852e91 100644 --- a/cef/libcef_dll/cpptoc/geolocation_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/geolocation_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/geolocation_handler_cpptoc.h b/cef/libcef_dll/cpptoc/geolocation_handler_cpptoc.h index 9774ff4db..577422796 100644 --- a/cef/libcef_dll/cpptoc/geolocation_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/geolocation_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/get_geolocation_callback_cpptoc.cc b/cef/libcef_dll/cpptoc/get_geolocation_callback_cpptoc.cc index 5956d241d..e51cda2e8 100644 --- a/cef/libcef_dll/cpptoc/get_geolocation_callback_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/get_geolocation_callback_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/get_geolocation_callback_cpptoc.h b/cef/libcef_dll/cpptoc/get_geolocation_callback_cpptoc.h index b459711b1..d239c6962 100644 --- a/cef/libcef_dll/cpptoc/get_geolocation_callback_cpptoc.h +++ b/cef/libcef_dll/cpptoc/get_geolocation_callback_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/jsdialog_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/jsdialog_handler_cpptoc.cc index b75d13c3a..d3dd01940 100644 --- a/cef/libcef_dll/cpptoc/jsdialog_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/jsdialog_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/jsdialog_handler_cpptoc.h b/cef/libcef_dll/cpptoc/jsdialog_handler_cpptoc.h index af58e7049..68a07b83e 100644 --- a/cef/libcef_dll/cpptoc/jsdialog_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/jsdialog_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/keyboard_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/keyboard_handler_cpptoc.cc index 95779c88b..bee1102e1 100644 --- a/cef/libcef_dll/cpptoc/keyboard_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/keyboard_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/keyboard_handler_cpptoc.h b/cef/libcef_dll/cpptoc/keyboard_handler_cpptoc.h index 4685a74ea..7a4829b7d 100644 --- a/cef/libcef_dll/cpptoc/keyboard_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/keyboard_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/life_span_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/life_span_handler_cpptoc.cc index 85b1e2708..cdb031b2d 100644 --- a/cef/libcef_dll/cpptoc/life_span_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/life_span_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/life_span_handler_cpptoc.h b/cef/libcef_dll/cpptoc/life_span_handler_cpptoc.h index 247d131bc..360073aad 100644 --- a/cef/libcef_dll/cpptoc/life_span_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/life_span_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/load_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/load_handler_cpptoc.cc index c68f442cd..ee3a7bc9e 100644 --- a/cef/libcef_dll/cpptoc/load_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/load_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/load_handler_cpptoc.h b/cef/libcef_dll/cpptoc/load_handler_cpptoc.h index f5af7e734..7043d0aad 100644 --- a/cef/libcef_dll/cpptoc/load_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/load_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/proxy_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/proxy_handler_cpptoc.cc index 2243abd5b..98aaeb7b5 100644 --- a/cef/libcef_dll/cpptoc/proxy_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/proxy_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/proxy_handler_cpptoc.h b/cef/libcef_dll/cpptoc/proxy_handler_cpptoc.h index 7dd0b64ad..560b82698 100644 --- a/cef/libcef_dll/cpptoc/proxy_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/proxy_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/read_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/read_handler_cpptoc.cc index 6ac89f694..cc5495019 100644 --- a/cef/libcef_dll/cpptoc/read_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/read_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/read_handler_cpptoc.h b/cef/libcef_dll/cpptoc/read_handler_cpptoc.h index b4ca3c0c3..04ffba8d4 100644 --- a/cef/libcef_dll/cpptoc/read_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/read_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/render_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/render_handler_cpptoc.cc new file mode 100644 index 000000000..c77bed238 --- /dev/null +++ b/cef/libcef_dll/cpptoc/render_handler_cpptoc.cc @@ -0,0 +1,252 @@ +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that +// can be found in the LICENSE file. +// +// --------------------------------------------------------------------------- +// +// This file was generated by the CEF translator tool. If making changes by +// hand only do so within the body of existing method and function +// implementations. See the translator.README.txt file in the tools directory +// for more information. +// + +#include "libcef_dll/cpptoc/render_handler_cpptoc.h" +#include "libcef_dll/ctocpp/browser_ctocpp.h" + + +// MEMBER FUNCTIONS - Body may be edited by hand. + +int CEF_CALLBACK render_handler_get_root_screen_rect( + struct _cef_render_handler_t* self, cef_browser_t* browser, + cef_rect_t* rect) { + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return 0; + // Verify param: browser; type: refptr_diff + DCHECK(browser); + if (!browser) + return 0; + // Verify param: rect; type: simple_byref + DCHECK(rect); + if (!rect) + return 0; + + // Translate param: rect; type: simple_byref + CefRect rectVal = rect?*rect:CefRect(); + + // Execute + bool _retval = CefRenderHandlerCppToC::Get(self)->GetRootScreenRect( + CefBrowserCToCpp::Wrap(browser), + rectVal); + + // Restore param: rect; type: simple_byref + if (rect) + *rect = rectVal; + + // Return type: bool + return _retval; +} + +int CEF_CALLBACK render_handler_get_view_rect( + struct _cef_render_handler_t* self, cef_browser_t* browser, + cef_rect_t* rect) { + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return 0; + // Verify param: browser; type: refptr_diff + DCHECK(browser); + if (!browser) + return 0; + // Verify param: rect; type: simple_byref + DCHECK(rect); + if (!rect) + return 0; + + // Translate param: rect; type: simple_byref + CefRect rectVal = rect?*rect:CefRect(); + + // Execute + bool _retval = CefRenderHandlerCppToC::Get(self)->GetViewRect( + CefBrowserCToCpp::Wrap(browser), + rectVal); + + // Restore param: rect; type: simple_byref + if (rect) + *rect = rectVal; + + // Return type: bool + return _retval; +} + +int CEF_CALLBACK render_handler_get_screen_point( + struct _cef_render_handler_t* self, cef_browser_t* browser, int viewX, + int viewY, int* screenX, int* screenY) { + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return 0; + // Verify param: browser; type: refptr_diff + DCHECK(browser); + if (!browser) + return 0; + // Verify param: screenX; type: simple_byref + DCHECK(screenX); + if (!screenX) + return 0; + // Verify param: screenY; type: simple_byref + DCHECK(screenY); + if (!screenY) + return 0; + + // Translate param: screenX; type: simple_byref + int screenXVal = screenX?*screenX:0; + // Translate param: screenY; type: simple_byref + int screenYVal = screenY?*screenY:0; + + // Execute + bool _retval = CefRenderHandlerCppToC::Get(self)->GetScreenPoint( + CefBrowserCToCpp::Wrap(browser), + viewX, + viewY, + screenXVal, + screenYVal); + + // Restore param: screenX; type: simple_byref + if (screenX) + *screenX = screenXVal; + // Restore param: screenY; type: simple_byref + if (screenY) + *screenY = screenYVal; + + // Return type: bool + return _retval; +} + +void CEF_CALLBACK render_handler_on_popup_show( + struct _cef_render_handler_t* self, cef_browser_t* browser, int show) { + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + // Verify param: browser; type: refptr_diff + DCHECK(browser); + if (!browser) + return; + + // Execute + CefRenderHandlerCppToC::Get(self)->OnPopupShow( + CefBrowserCToCpp::Wrap(browser), + show?true:false); +} + +void CEF_CALLBACK render_handler_on_popup_size( + struct _cef_render_handler_t* self, cef_browser_t* browser, + const cef_rect_t* rect) { + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + // Verify param: browser; type: refptr_diff + DCHECK(browser); + if (!browser) + return; + // Verify param: rect; type: simple_byref_const + DCHECK(rect); + if (!rect) + return; + + // Translate param: rect; type: simple_byref_const + CefRect rectVal = rect?*rect:CefRect(); + + // Execute + CefRenderHandlerCppToC::Get(self)->OnPopupSize( + CefBrowserCToCpp::Wrap(browser), + rectVal); +} + +void CEF_CALLBACK render_handler_on_paint(struct _cef_render_handler_t* self, + cef_browser_t* browser, enum cef_paint_element_type_t type, + size_t dirtyRectsCount, cef_rect_t const* dirtyRects, const void* buffer, + int width, int height) { + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + // Verify param: browser; type: refptr_diff + DCHECK(browser); + if (!browser) + return; + // Verify param: dirtyRects; type: simple_vec_byref_const + DCHECK(dirtyRectsCount == 0 || dirtyRects); + if (dirtyRectsCount > 0 && !dirtyRects) + return; + // Verify param: buffer; type: simple_byaddr + DCHECK(buffer); + if (!buffer) + return; + + // Translate param: dirtyRects; type: simple_vec_byref_const + std::vector dirtyRectsList; + if (dirtyRectsCount > 0) { + for (size_t i = 0; i < dirtyRectsCount; ++i) { + dirtyRectsList.push_back(dirtyRects[i]); + } + } + + // Execute + CefRenderHandlerCppToC::Get(self)->OnPaint( + CefBrowserCToCpp::Wrap(browser), + type, + dirtyRectsList, + buffer, + width, + height); +} + +void CEF_CALLBACK render_handler_on_cursor_change( + struct _cef_render_handler_t* self, cef_browser_t* browser, + cef_cursor_handle_t cursor) { + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + // Verify param: browser; type: refptr_diff + DCHECK(browser); + if (!browser) + return; + + // Execute + CefRenderHandlerCppToC::Get(self)->OnCursorChange( + CefBrowserCToCpp::Wrap(browser), + cursor); +} + + +// CONSTRUCTOR - Do not edit by hand. + +CefRenderHandlerCppToC::CefRenderHandlerCppToC(CefRenderHandler* cls) + : CefCppToC( + cls) { + struct_.struct_.get_root_screen_rect = render_handler_get_root_screen_rect; + struct_.struct_.get_view_rect = render_handler_get_view_rect; + struct_.struct_.get_screen_point = render_handler_get_screen_point; + struct_.struct_.on_popup_show = render_handler_on_popup_show; + struct_.struct_.on_popup_size = render_handler_on_popup_size; + struct_.struct_.on_paint = render_handler_on_paint; + struct_.struct_.on_cursor_change = render_handler_on_cursor_change; +} + +#ifndef NDEBUG +template<> long CefCppToC::DebugObjCt = 0; +#endif + diff --git a/cef/libcef_dll/cpptoc/render_handler_cpptoc.h b/cef/libcef_dll/cpptoc/render_handler_cpptoc.h new file mode 100644 index 000000000..1fd90fe3f --- /dev/null +++ b/cef/libcef_dll/cpptoc/render_handler_cpptoc.h @@ -0,0 +1,37 @@ +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that +// can be found in the LICENSE file. +// +// --------------------------------------------------------------------------- +// +// This file was generated by the CEF translator tool. If making changes by +// hand only do so within the body of existing method and function +// implementations. See the translator.README.txt file in the tools directory +// for more information. +// + +#ifndef CEF_LIBCEF_DLL_CPPTOC_RENDER_HANDLER_CPPTOC_H_ +#define CEF_LIBCEF_DLL_CPPTOC_RENDER_HANDLER_CPPTOC_H_ +#pragma once + +#ifndef USING_CEF_SHARED +#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") +#else // USING_CEF_SHARED + +#include "include/cef_render_handler.h" +#include "include/capi/cef_render_handler_capi.h" +#include "libcef_dll/cpptoc/cpptoc.h" + +// Wrap a C++ class with a C structure. +// This class may be instantiated and accessed wrapper-side only. +class CefRenderHandlerCppToC + : public CefCppToC { + public: + explicit CefRenderHandlerCppToC(CefRenderHandler* cls); + virtual ~CefRenderHandlerCppToC() {} +}; + +#endif // USING_CEF_SHARED +#endif // CEF_LIBCEF_DLL_CPPTOC_RENDER_HANDLER_CPPTOC_H_ + diff --git a/cef/libcef_dll/cpptoc/render_process_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/render_process_handler_cpptoc.cc index 904b83fd5..11684705a 100644 --- a/cef/libcef_dll/cpptoc/render_process_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/render_process_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -14,22 +14,32 @@ #include "libcef_dll/ctocpp/browser_ctocpp.h" #include "libcef_dll/ctocpp/domnode_ctocpp.h" #include "libcef_dll/ctocpp/frame_ctocpp.h" +#include "libcef_dll/ctocpp/list_value_ctocpp.h" #include "libcef_dll/ctocpp/process_message_ctocpp.h" +#include "libcef_dll/ctocpp/request_ctocpp.h" #include "libcef_dll/ctocpp/v8context_ctocpp.h" +#include "libcef_dll/ctocpp/v8exception_ctocpp.h" +#include "libcef_dll/ctocpp/v8stack_trace_ctocpp.h" // MEMBER FUNCTIONS - Body may be edited by hand. void CEF_CALLBACK render_process_handler_on_render_thread_created( - struct _cef_render_process_handler_t* self) { + struct _cef_render_process_handler_t* self, + struct _cef_list_value_t* extra_info) { // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING DCHECK(self); if (!self) return; + // Verify param: extra_info; type: refptr_diff + DCHECK(extra_info); + if (!extra_info) + return; // Execute - CefRenderProcessHandlerCppToC::Get(self)->OnRenderThreadCreated(); + CefRenderProcessHandlerCppToC::Get(self)->OnRenderThreadCreated( + CefListValueCToCpp::Wrap(extra_info)); } void CEF_CALLBACK render_process_handler_on_web_kit_initialized( @@ -78,6 +88,40 @@ void CEF_CALLBACK render_process_handler_on_browser_destroyed( CefBrowserCToCpp::Wrap(browser)); } +int CEF_CALLBACK render_process_handler_on_before_navigation( + struct _cef_render_process_handler_t* self, cef_browser_t* browser, + cef_frame_t* frame, struct _cef_request_t* request, + enum cef_navigation_type_t navigation_type, int is_redirect) { + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return 0; + // Verify param: browser; type: refptr_diff + DCHECK(browser); + if (!browser) + return 0; + // Verify param: frame; type: refptr_diff + DCHECK(frame); + if (!frame) + return 0; + // Verify param: request; type: refptr_diff + DCHECK(request); + if (!request) + return 0; + + // Execute + bool _retval = CefRenderProcessHandlerCppToC::Get(self)->OnBeforeNavigation( + CefBrowserCToCpp::Wrap(browser), + CefFrameCToCpp::Wrap(frame), + CefRequestCToCpp::Wrap(request), + navigation_type, + is_redirect?true:false); + + // Return type: bool + return _retval; +} + void CEF_CALLBACK render_process_handler_on_context_created( struct _cef_render_process_handler_t* self, cef_browser_t* browser, cef_frame_t* frame, struct _cef_v8context_t* context) { @@ -134,6 +178,130 @@ void CEF_CALLBACK render_process_handler_on_context_released( CefV8ContextCToCpp::Wrap(context)); } +void CEF_CALLBACK render_process_handler_on_uncaught_exception( + struct _cef_render_process_handler_t* self, cef_browser_t* browser, + cef_frame_t* frame, struct _cef_v8context_t* context, + struct _cef_v8exception_t* exception, + struct _cef_v8stack_trace_t* stackTrace) { + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + // Verify param: browser; type: refptr_diff + DCHECK(browser); + if (!browser) + return; + // Verify param: frame; type: refptr_diff + DCHECK(frame); + if (!frame) + return; + // Verify param: context; type: refptr_diff + DCHECK(context); + if (!context) + return; + // Verify param: exception; type: refptr_diff + DCHECK(exception); + if (!exception) + return; + // Verify param: stackTrace; type: refptr_diff + DCHECK(stackTrace); + if (!stackTrace) + return; + + // Execute + CefRenderProcessHandlerCppToC::Get(self)->OnUncaughtException( + CefBrowserCToCpp::Wrap(browser), + CefFrameCToCpp::Wrap(frame), + CefV8ContextCToCpp::Wrap(context), + CefV8ExceptionCToCpp::Wrap(exception), + CefV8StackTraceCToCpp::Wrap(stackTrace)); +} + +void CEF_CALLBACK render_process_handler_on_worker_context_created( + struct _cef_render_process_handler_t* self, int worker_id, + const cef_string_t* url, struct _cef_v8context_t* context) { + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + // Verify param: url; type: string_byref_const + DCHECK(url); + if (!url) + return; + // Verify param: context; type: refptr_diff + DCHECK(context); + if (!context) + return; + + // Execute + CefRenderProcessHandlerCppToC::Get(self)->OnWorkerContextCreated( + worker_id, + CefString(url), + CefV8ContextCToCpp::Wrap(context)); +} + +void CEF_CALLBACK render_process_handler_on_worker_context_released( + struct _cef_render_process_handler_t* self, int worker_id, + const cef_string_t* url, struct _cef_v8context_t* context) { + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + // Verify param: url; type: string_byref_const + DCHECK(url); + if (!url) + return; + // Verify param: context; type: refptr_diff + DCHECK(context); + if (!context) + return; + + // Execute + CefRenderProcessHandlerCppToC::Get(self)->OnWorkerContextReleased( + worker_id, + CefString(url), + CefV8ContextCToCpp::Wrap(context)); +} + +void CEF_CALLBACK render_process_handler_on_worker_uncaught_exception( + struct _cef_render_process_handler_t* self, int worker_id, + const cef_string_t* url, struct _cef_v8context_t* context, + struct _cef_v8exception_t* exception, + struct _cef_v8stack_trace_t* stackTrace) { + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + DCHECK(self); + if (!self) + return; + // Verify param: url; type: string_byref_const + DCHECK(url); + if (!url) + return; + // Verify param: context; type: refptr_diff + DCHECK(context); + if (!context) + return; + // Verify param: exception; type: refptr_diff + DCHECK(exception); + if (!exception) + return; + // Verify param: stackTrace; type: refptr_diff + DCHECK(stackTrace); + if (!stackTrace) + return; + + // Execute + CefRenderProcessHandlerCppToC::Get(self)->OnWorkerUncaughtException( + worker_id, + CefString(url), + CefV8ContextCToCpp::Wrap(context), + CefV8ExceptionCToCpp::Wrap(exception), + CefV8StackTraceCToCpp::Wrap(stackTrace)); +} + void CEF_CALLBACK render_process_handler_on_focused_node_changed( struct _cef_render_process_handler_t* self, cef_browser_t* browser, cef_frame_t* frame, cef_domnode_t* node) { @@ -198,10 +366,20 @@ CefRenderProcessHandlerCppToC::CefRenderProcessHandlerCppToC( render_process_handler_on_browser_created; struct_.struct_.on_browser_destroyed = render_process_handler_on_browser_destroyed; + struct_.struct_.on_before_navigation = + render_process_handler_on_before_navigation; struct_.struct_.on_context_created = render_process_handler_on_context_created; struct_.struct_.on_context_released = render_process_handler_on_context_released; + struct_.struct_.on_uncaught_exception = + render_process_handler_on_uncaught_exception; + struct_.struct_.on_worker_context_created = + render_process_handler_on_worker_context_created; + struct_.struct_.on_worker_context_released = + render_process_handler_on_worker_context_released; + struct_.struct_.on_worker_uncaught_exception = + render_process_handler_on_worker_uncaught_exception; struct_.struct_.on_focused_node_changed = render_process_handler_on_focused_node_changed; struct_.struct_.on_process_message_received = diff --git a/cef/libcef_dll/cpptoc/render_process_handler_cpptoc.h b/cef/libcef_dll/cpptoc/render_process_handler_cpptoc.h index 838819783..42ecf803b 100644 --- a/cef/libcef_dll/cpptoc/render_process_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/render_process_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/request_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/request_handler_cpptoc.cc index bf7b12c82..d64e9393d 100644 --- a/cef/libcef_dll/cpptoc/request_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/request_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/request_handler_cpptoc.h b/cef/libcef_dll/cpptoc/request_handler_cpptoc.h index 1b4c79160..866ef1152 100644 --- a/cef/libcef_dll/cpptoc/request_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/request_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.cc index 23dd259b3..9a6bcd8e8 100644 --- a/cef/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h b/cef/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h index 3b11fb62c..8aefc1374 100644 --- a/cef/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/resource_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/resource_handler_cpptoc.cc index bac30539f..c33b28c54 100644 --- a/cef/libcef_dll/cpptoc/resource_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/resource_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/resource_handler_cpptoc.h b/cef/libcef_dll/cpptoc/resource_handler_cpptoc.h index 99e64dd90..8c4972a44 100644 --- a/cef/libcef_dll/cpptoc/resource_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/resource_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.cc b/cef/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.cc index 950722346..5bafa8b42 100644 --- a/cef/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h b/cef/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h index 637c6dbae..0302dc471 100644 --- a/cef/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h +++ b/cef/libcef_dll/cpptoc/run_file_dialog_callback_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.cc b/cef/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.cc index 698527aa0..bf1a82e24 100644 --- a/cef/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h b/cef/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h index c47b338da..cb2f1472d 100644 --- a/cef/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h +++ b/cef/libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/string_visitor_cpptoc.cc b/cef/libcef_dll/cpptoc/string_visitor_cpptoc.cc index b1bdf5144..73edb9dfd 100644 --- a/cef/libcef_dll/cpptoc/string_visitor_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/string_visitor_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/string_visitor_cpptoc.h b/cef/libcef_dll/cpptoc/string_visitor_cpptoc.h index 7e9c08759..2cdd3b547 100644 --- a/cef/libcef_dll/cpptoc/string_visitor_cpptoc.h +++ b/cef/libcef_dll/cpptoc/string_visitor_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/task_cpptoc.cc b/cef/libcef_dll/cpptoc/task_cpptoc.cc index a5e31e6b1..f0de3a4f2 100644 --- a/cef/libcef_dll/cpptoc/task_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/task_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -15,8 +15,7 @@ // MEMBER FUNCTIONS - Body may be edited by hand. -void CEF_CALLBACK task_execute(struct _cef_task_t* self, - cef_thread_id_t threadId) { +void CEF_CALLBACK task_execute(struct _cef_task_t* self) { // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING DCHECK(self); @@ -24,8 +23,7 @@ void CEF_CALLBACK task_execute(struct _cef_task_t* self, return; // Execute - CefTaskCppToC::Get(self)->Execute( - threadId); + CefTaskCppToC::Get(self)->Execute(); } diff --git a/cef/libcef_dll/cpptoc/task_cpptoc.h b/cef/libcef_dll/cpptoc/task_cpptoc.h index 8f2e2fc2e..495de4c60 100644 --- a/cef/libcef_dll/cpptoc/task_cpptoc.h +++ b/cef/libcef_dll/cpptoc/task_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/trace_client_cpptoc.cc b/cef/libcef_dll/cpptoc/trace_client_cpptoc.cc index 004cdd10f..580d837ba 100644 --- a/cef/libcef_dll/cpptoc/trace_client_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/trace_client_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/trace_client_cpptoc.h b/cef/libcef_dll/cpptoc/trace_client_cpptoc.h index 2704f3482..f005ea9ed 100644 --- a/cef/libcef_dll/cpptoc/trace_client_cpptoc.h +++ b/cef/libcef_dll/cpptoc/trace_client_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/urlrequest_client_cpptoc.cc b/cef/libcef_dll/cpptoc/urlrequest_client_cpptoc.cc index b7e931eb0..086129203 100644 --- a/cef/libcef_dll/cpptoc/urlrequest_client_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/urlrequest_client_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/urlrequest_client_cpptoc.h b/cef/libcef_dll/cpptoc/urlrequest_client_cpptoc.h index faac3d89d..6640749a8 100644 --- a/cef/libcef_dll/cpptoc/urlrequest_client_cpptoc.h +++ b/cef/libcef_dll/cpptoc/urlrequest_client_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/v8accessor_cpptoc.cc b/cef/libcef_dll/cpptoc/v8accessor_cpptoc.cc index d533fcf06..cd92d6c9f 100644 --- a/cef/libcef_dll/cpptoc/v8accessor_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/v8accessor_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/v8accessor_cpptoc.h b/cef/libcef_dll/cpptoc/v8accessor_cpptoc.h index b0dbb8ebd..80791a9a1 100644 --- a/cef/libcef_dll/cpptoc/v8accessor_cpptoc.h +++ b/cef/libcef_dll/cpptoc/v8accessor_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/v8handler_cpptoc.cc b/cef/libcef_dll/cpptoc/v8handler_cpptoc.cc index 08f003247..49c7c28cc 100644 --- a/cef/libcef_dll/cpptoc/v8handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/v8handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/v8handler_cpptoc.h b/cef/libcef_dll/cpptoc/v8handler_cpptoc.h index 1dd0886e9..aab996c24 100644 --- a/cef/libcef_dll/cpptoc/v8handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/v8handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.cc b/cef/libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.cc index 35593acab..755223bd9 100644 --- a/cef/libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.h b/cef/libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.h index 420c74460..c81f056ba 100644 --- a/cef/libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.h +++ b/cef/libcef_dll/cpptoc/web_plugin_info_visitor_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.cc b/cef/libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.cc index 3966cfb26..a1e27f086 100644 --- a/cef/libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.h b/cef/libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.h index d6c5c4707..43f62a30d 100644 --- a/cef/libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.h +++ b/cef/libcef_dll/cpptoc/web_plugin_unstable_callback_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/write_handler_cpptoc.cc b/cef/libcef_dll/cpptoc/write_handler_cpptoc.cc index 07df04525..001928442 100644 --- a/cef/libcef_dll/cpptoc/write_handler_cpptoc.cc +++ b/cef/libcef_dll/cpptoc/write_handler_cpptoc.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/cpptoc/write_handler_cpptoc.h b/cef/libcef_dll/cpptoc/write_handler_cpptoc.h index f0e75a9f6..eda6ea830 100644 --- a/cef/libcef_dll/cpptoc/write_handler_cpptoc.h +++ b/cef/libcef_dll/cpptoc/write_handler_cpptoc.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/ctocpp/auth_callback_ctocpp.cc b/cef/libcef_dll/ctocpp/auth_callback_ctocpp.cc index a914971b2..736f2ca3d 100644 --- a/cef/libcef_dll/ctocpp/auth_callback_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/auth_callback_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/ctocpp/auth_callback_ctocpp.h b/cef/libcef_dll/ctocpp/auth_callback_ctocpp.h index 7bc3a281a..08ae159c9 100644 --- a/cef/libcef_dll/ctocpp/auth_callback_ctocpp.h +++ b/cef/libcef_dll/ctocpp/auth_callback_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/ctocpp/before_download_callback_ctocpp.cc b/cef/libcef_dll/ctocpp/before_download_callback_ctocpp.cc index 1bc27870b..157debb03 100644 --- a/cef/libcef_dll/ctocpp/before_download_callback_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/before_download_callback_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/ctocpp/before_download_callback_ctocpp.h b/cef/libcef_dll/ctocpp/before_download_callback_ctocpp.h index ad8106a2b..4d7944d3e 100644 --- a/cef/libcef_dll/ctocpp/before_download_callback_ctocpp.h +++ b/cef/libcef_dll/ctocpp/before_download_callback_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/ctocpp/binary_value_ctocpp.cc b/cef/libcef_dll/ctocpp/binary_value_ctocpp.cc index 4e62a8385..e9ad6d39f 100644 --- a/cef/libcef_dll/ctocpp/binary_value_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/binary_value_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/ctocpp/binary_value_ctocpp.h b/cef/libcef_dll/ctocpp/binary_value_ctocpp.h index 89b604bfa..6eb440767 100644 --- a/cef/libcef_dll/ctocpp/binary_value_ctocpp.h +++ b/cef/libcef_dll/ctocpp/binary_value_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/ctocpp/browser_ctocpp.cc b/cef/libcef_dll/ctocpp/browser_ctocpp.cc index 3cc245e40..4b99d471b 100644 --- a/cef/libcef_dll/ctocpp/browser_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/browser_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -134,6 +134,25 @@ int CefBrowserCToCpp::GetIdentifier() { return _retval; } +bool CefBrowserCToCpp::IsSame(CefRefPtr that) { + if (CEF_MEMBER_MISSING(struct_, is_same)) + return false; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Verify param: that; type: refptr_same + DCHECK(that.get()); + if (!that.get()) + return false; + + // Execute + int _retval = struct_->is_same(struct_, + CefBrowserCToCpp::Unwrap(that)); + + // Return type: bool + return _retval?true:false; +} + bool CefBrowserCToCpp::IsPopup() { if (CEF_MEMBER_MISSING(struct_, is_popup)) return false; diff --git a/cef/libcef_dll/ctocpp/browser_ctocpp.h b/cef/libcef_dll/ctocpp/browser_ctocpp.h index 9b0375243..c836e74db 100644 --- a/cef/libcef_dll/ctocpp/browser_ctocpp.h +++ b/cef/libcef_dll/ctocpp/browser_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -45,6 +45,7 @@ class CefBrowserCToCpp virtual void ReloadIgnoreCache() OVERRIDE; virtual void StopLoad() OVERRIDE; virtual int GetIdentifier() OVERRIDE; + virtual bool IsSame(CefRefPtr that) OVERRIDE; virtual bool IsPopup() OVERRIDE; virtual bool HasDocument() OVERRIDE; virtual CefRefPtr GetMainFrame() OVERRIDE; diff --git a/cef/libcef_dll/ctocpp/browser_host_ctocpp.cc b/cef/libcef_dll/ctocpp/browser_host_ctocpp.cc index 5d268c719..63f1849a1 100644 --- a/cef/libcef_dll/ctocpp/browser_host_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/browser_host_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -24,11 +24,7 @@ bool CefBrowserHost::CreateBrowser(const CefWindowInfo& windowInfo, const CefBrowserSettings& settings) { // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - // Verify param: client; type: refptr_diff - DCHECK(client.get()); - if (!client.get()) - return false; - // Unverified params: url + // Unverified params: client, url // Execute int _retval = cef_browser_host_create_browser( @@ -46,11 +42,7 @@ CefRefPtr CefBrowserHost::CreateBrowserSync( const CefString& url, const CefBrowserSettings& settings) { // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - // Verify param: client; type: refptr_diff - DCHECK(client.get()); - if (!client.get()) - return NULL; - // Unverified params: url + // Unverified params: client, url // Execute cef_browser_t* _retval = cef_browser_host_create_browser_sync( @@ -223,6 +215,116 @@ void CefBrowserHostCToCpp::RunFileDialog(FileDialogMode mode, cef_string_list_free(accept_typesList); } +bool CefBrowserHostCToCpp::IsWindowRenderingDisabled() { + if (CEF_MEMBER_MISSING(struct_, is_window_rendering_disabled)) + return false; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Execute + int _retval = struct_->is_window_rendering_disabled(struct_); + + // Return type: bool + return _retval?true:false; +} + +void CefBrowserHostCToCpp::WasResized() { + if (CEF_MEMBER_MISSING(struct_, was_resized)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Execute + struct_->was_resized(struct_); +} + +void CefBrowserHostCToCpp::Invalidate(const CefRect& dirtyRect, + PaintElementType type) { + if (CEF_MEMBER_MISSING(struct_, invalidate)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Execute + struct_->invalidate(struct_, + &dirtyRect, + type); +} + +void CefBrowserHostCToCpp::SendKeyEvent(const CefKeyEvent& event) { + if (CEF_MEMBER_MISSING(struct_, send_key_event)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Execute + struct_->send_key_event(struct_, + &event); +} + +void CefBrowserHostCToCpp::SendMouseClickEvent(const CefMouseEvent& event, + MouseButtonType type, bool mouseUp, int clickCount) { + if (CEF_MEMBER_MISSING(struct_, send_mouse_click_event)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Execute + struct_->send_mouse_click_event(struct_, + &event, + type, + mouseUp, + clickCount); +} + +void CefBrowserHostCToCpp::SendMouseMoveEvent(const CefMouseEvent& event, + bool mouseLeave) { + if (CEF_MEMBER_MISSING(struct_, send_mouse_move_event)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Execute + struct_->send_mouse_move_event(struct_, + &event, + mouseLeave); +} + +void CefBrowserHostCToCpp::SendMouseWheelEvent(const CefMouseEvent& event, + int deltaX, int deltaY) { + if (CEF_MEMBER_MISSING(struct_, send_mouse_wheel_event)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Execute + struct_->send_mouse_wheel_event(struct_, + &event, + deltaX, + deltaY); +} + +void CefBrowserHostCToCpp::SendFocusEvent(bool setFocus) { + if (CEF_MEMBER_MISSING(struct_, send_focus_event)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Execute + struct_->send_focus_event(struct_, + setFocus); +} + +void CefBrowserHostCToCpp::SendCaptureLostEvent() { + if (CEF_MEMBER_MISSING(struct_, send_capture_lost_event)) + return; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Execute + struct_->send_capture_lost_event(struct_); +} + #ifndef NDEBUG template<> long CefCToCpp& accept_types, CefRefPtr callback) OVERRIDE; + virtual bool IsWindowRenderingDisabled() OVERRIDE; + virtual void WasResized() OVERRIDE; + virtual void Invalidate(const CefRect& dirtyRect, + PaintElementType type) OVERRIDE; + virtual void SendKeyEvent(const CefKeyEvent& event) OVERRIDE; + virtual void SendMouseClickEvent(const CefMouseEvent& event, + MouseButtonType type, bool mouseUp, int clickCount) OVERRIDE; + virtual void SendMouseMoveEvent(const CefMouseEvent& event, + bool mouseLeave) OVERRIDE; + virtual void SendMouseWheelEvent(const CefMouseEvent& event, int deltaX, + int deltaY) OVERRIDE; + virtual void SendFocusEvent(bool setFocus) OVERRIDE; + virtual void SendCaptureLostEvent() OVERRIDE; }; #endif // USING_CEF_SHARED diff --git a/cef/libcef_dll/ctocpp/callback_ctocpp.cc b/cef/libcef_dll/ctocpp/callback_ctocpp.cc index 6c622ecc0..e6cd4799e 100644 --- a/cef/libcef_dll/ctocpp/callback_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/callback_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/ctocpp/callback_ctocpp.h b/cef/libcef_dll/ctocpp/callback_ctocpp.h index 3581e286d..9cbe99593 100644 --- a/cef/libcef_dll/ctocpp/callback_ctocpp.h +++ b/cef/libcef_dll/ctocpp/callback_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/ctocpp/command_line_ctocpp.cc b/cef/libcef_dll/ctocpp/command_line_ctocpp.cc index f5883f333..8ab94a0cf 100644 --- a/cef/libcef_dll/ctocpp/command_line_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/command_line_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/ctocpp/command_line_ctocpp.h b/cef/libcef_dll/ctocpp/command_line_ctocpp.h index 063e62077..723885683 100644 --- a/cef/libcef_dll/ctocpp/command_line_ctocpp.h +++ b/cef/libcef_dll/ctocpp/command_line_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/ctocpp/context_menu_params_ctocpp.cc b/cef/libcef_dll/ctocpp/context_menu_params_ctocpp.cc index e70638aef..5fcbf3b47 100644 --- a/cef/libcef_dll/ctocpp/context_menu_params_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/context_menu_params_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/ctocpp/context_menu_params_ctocpp.h b/cef/libcef_dll/ctocpp/context_menu_params_ctocpp.h index dd1e782c1..bcbebc9b5 100644 --- a/cef/libcef_dll/ctocpp/context_menu_params_ctocpp.h +++ b/cef/libcef_dll/ctocpp/context_menu_params_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/ctocpp/cookie_manager_ctocpp.cc b/cef/libcef_dll/ctocpp/cookie_manager_ctocpp.cc index f33ef0d7d..4db768d76 100644 --- a/cef/libcef_dll/ctocpp/cookie_manager_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/cookie_manager_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/ctocpp/cookie_manager_ctocpp.h b/cef/libcef_dll/ctocpp/cookie_manager_ctocpp.h index 78cd1f460..760021ba0 100644 --- a/cef/libcef_dll/ctocpp/cookie_manager_ctocpp.h +++ b/cef/libcef_dll/ctocpp/cookie_manager_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/ctocpp/dictionary_value_ctocpp.cc b/cef/libcef_dll/ctocpp/dictionary_value_ctocpp.cc index 8fa08e686..efb99061c 100644 --- a/cef/libcef_dll/ctocpp/dictionary_value_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/dictionary_value_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/ctocpp/dictionary_value_ctocpp.h b/cef/libcef_dll/ctocpp/dictionary_value_ctocpp.h index d3959def4..79de9f7e6 100644 --- a/cef/libcef_dll/ctocpp/dictionary_value_ctocpp.h +++ b/cef/libcef_dll/ctocpp/dictionary_value_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/ctocpp/domdocument_ctocpp.cc b/cef/libcef_dll/ctocpp/domdocument_ctocpp.cc index 63aeafb67..3afa95215 100644 --- a/cef/libcef_dll/ctocpp/domdocument_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/domdocument_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/ctocpp/domdocument_ctocpp.h b/cef/libcef_dll/ctocpp/domdocument_ctocpp.h index 92fc5957d..23fee5b21 100644 --- a/cef/libcef_dll/ctocpp/domdocument_ctocpp.h +++ b/cef/libcef_dll/ctocpp/domdocument_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/ctocpp/domevent_ctocpp.cc b/cef/libcef_dll/ctocpp/domevent_ctocpp.cc index d812312f2..3bec4e5bf 100644 --- a/cef/libcef_dll/ctocpp/domevent_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/domevent_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/ctocpp/domevent_ctocpp.h b/cef/libcef_dll/ctocpp/domevent_ctocpp.h index 64b05c62a..22fbed79f 100644 --- a/cef/libcef_dll/ctocpp/domevent_ctocpp.h +++ b/cef/libcef_dll/ctocpp/domevent_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/ctocpp/domnode_ctocpp.cc b/cef/libcef_dll/ctocpp/domnode_ctocpp.cc index 3a0abe7f4..f0b3a4756 100644 --- a/cef/libcef_dll/ctocpp/domnode_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/domnode_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/ctocpp/domnode_ctocpp.h b/cef/libcef_dll/ctocpp/domnode_ctocpp.h index 6bedac7ba..c5448ad0e 100644 --- a/cef/libcef_dll/ctocpp/domnode_ctocpp.h +++ b/cef/libcef_dll/ctocpp/domnode_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/ctocpp/download_item_callback_ctocpp.cc b/cef/libcef_dll/ctocpp/download_item_callback_ctocpp.cc index 99981cf0a..092787640 100644 --- a/cef/libcef_dll/ctocpp/download_item_callback_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/download_item_callback_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/ctocpp/download_item_callback_ctocpp.h b/cef/libcef_dll/ctocpp/download_item_callback_ctocpp.h index 1a05a07d4..f10b8fd5d 100644 --- a/cef/libcef_dll/ctocpp/download_item_callback_ctocpp.h +++ b/cef/libcef_dll/ctocpp/download_item_callback_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/ctocpp/download_item_ctocpp.cc b/cef/libcef_dll/ctocpp/download_item_ctocpp.cc index f49712d37..ae50f3ffc 100644 --- a/cef/libcef_dll/ctocpp/download_item_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/download_item_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -233,21 +233,6 @@ CefString CefDownloadItemCToCpp::GetMimeType() { return _retvalStr; } -CefString CefDownloadItemCToCpp::GetReferrerCharset() { - if (CEF_MEMBER_MISSING(struct_, get_referrer_charset)) - return CefString(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = struct_->get_referrer_charset(struct_); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - #ifndef NDEBUG template<> long CefCToCpp CefTaskRunner::GetForCurrentThread() { + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Execute + cef_task_runner_t* _retval = cef_task_runner_get_for_current_thread(); + + // Return type: refptr_same + return CefTaskRunnerCToCpp::Wrap(_retval); +} + +CefRefPtr CefTaskRunner::GetForThread(CefThreadId threadId) { + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Execute + cef_task_runner_t* _retval = cef_task_runner_get_for_thread( + threadId); + + // Return type: refptr_same + return CefTaskRunnerCToCpp::Wrap(_retval); +} + + +// VIRTUAL METHODS - Body may be edited by hand. + +bool CefTaskRunnerCToCpp::IsSame(CefRefPtr that) { + if (CEF_MEMBER_MISSING(struct_, is_same)) + return false; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Verify param: that; type: refptr_same + DCHECK(that.get()); + if (!that.get()) + return false; + + // Execute + int _retval = struct_->is_same(struct_, + CefTaskRunnerCToCpp::Unwrap(that)); + + // Return type: bool + return _retval?true:false; +} + +bool CefTaskRunnerCToCpp::BelongsToCurrentThread() { + if (CEF_MEMBER_MISSING(struct_, belongs_to_current_thread)) + return false; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Execute + int _retval = struct_->belongs_to_current_thread(struct_); + + // Return type: bool + return _retval?true:false; +} + +bool CefTaskRunnerCToCpp::BelongsToThread(CefThreadId threadId) { + if (CEF_MEMBER_MISSING(struct_, belongs_to_thread)) + return false; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Execute + int _retval = struct_->belongs_to_thread(struct_, + threadId); + + // Return type: bool + return _retval?true:false; +} + +bool CefTaskRunnerCToCpp::PostTask(CefRefPtr task) { + if (CEF_MEMBER_MISSING(struct_, post_task)) + return false; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Verify param: task; type: refptr_diff + DCHECK(task.get()); + if (!task.get()) + return false; + + // Execute + int _retval = struct_->post_task(struct_, + CefTaskCppToC::Wrap(task)); + + // Return type: bool + return _retval?true:false; +} + +bool CefTaskRunnerCToCpp::PostDelayedTask(CefRefPtr task, + int64 delay_ms) { + if (CEF_MEMBER_MISSING(struct_, post_delayed_task)) + return false; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Verify param: task; type: refptr_diff + DCHECK(task.get()); + if (!task.get()) + return false; + + // Execute + int _retval = struct_->post_delayed_task(struct_, + CefTaskCppToC::Wrap(task), + delay_ms); + + // Return type: bool + return _retval?true:false; +} + + +#ifndef NDEBUG +template<> long CefCToCpp::DebugObjCt = 0; +#endif + diff --git a/cef/libcef_dll/ctocpp/task_runner_ctocpp.h b/cef/libcef_dll/ctocpp/task_runner_ctocpp.h new file mode 100644 index 000000000..ef671934c --- /dev/null +++ b/cef/libcef_dll/ctocpp/task_runner_ctocpp.h @@ -0,0 +1,45 @@ +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights +// reserved. Use of this source code is governed by a BSD-style license that +// can be found in the LICENSE file. +// +// --------------------------------------------------------------------------- +// +// This file was generated by the CEF translator tool. If making changes by +// hand only do so within the body of existing method and function +// implementations. See the translator.README.txt file in the tools directory +// for more information. +// + +#ifndef CEF_LIBCEF_DLL_CTOCPP_TASK_RUNNER_CTOCPP_H_ +#define CEF_LIBCEF_DLL_CTOCPP_TASK_RUNNER_CTOCPP_H_ +#pragma once + +#ifndef USING_CEF_SHARED +#pragma message("Warning: "__FILE__" may be accessed wrapper-side only") +#else // USING_CEF_SHARED + +#include "include/cef_task.h" +#include "include/capi/cef_task_capi.h" +#include "libcef_dll/ctocpp/ctocpp.h" + +// Wrap a C structure with a C++ class. +// This class may be instantiated and accessed wrapper-side only. +class CefTaskRunnerCToCpp + : public CefCToCpp { + public: + explicit CefTaskRunnerCToCpp(cef_task_runner_t* str) + : CefCToCpp(str) {} + virtual ~CefTaskRunnerCToCpp() {} + + // CefTaskRunner methods + virtual bool IsSame(CefRefPtr that) OVERRIDE; + virtual bool BelongsToCurrentThread() OVERRIDE; + virtual bool BelongsToThread(CefThreadId threadId) OVERRIDE; + virtual bool PostTask(CefRefPtr task) OVERRIDE; + virtual bool PostDelayedTask(CefRefPtr task, + int64 delay_ms) OVERRIDE; +}; + +#endif // USING_CEF_SHARED +#endif // CEF_LIBCEF_DLL_CTOCPP_TASK_RUNNER_CTOCPP_H_ + diff --git a/cef/libcef_dll/ctocpp/urlrequest_ctocpp.cc b/cef/libcef_dll/ctocpp/urlrequest_ctocpp.cc index 9292295a5..c91fe9dc5 100644 --- a/cef/libcef_dll/ctocpp/urlrequest_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/urlrequest_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/ctocpp/urlrequest_ctocpp.h b/cef/libcef_dll/ctocpp/urlrequest_ctocpp.h index f13c7c638..793b9b97f 100644 --- a/cef/libcef_dll/ctocpp/urlrequest_ctocpp.h +++ b/cef/libcef_dll/ctocpp/urlrequest_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/ctocpp/v8context_ctocpp.cc b/cef/libcef_dll/ctocpp/v8context_ctocpp.cc index bc1e0559b..5427893a7 100644 --- a/cef/libcef_dll/ctocpp/v8context_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/v8context_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -12,6 +12,7 @@ #include "libcef_dll/ctocpp/browser_ctocpp.h" #include "libcef_dll/ctocpp/frame_ctocpp.h" +#include "libcef_dll/ctocpp/task_runner_ctocpp.h" #include "libcef_dll/ctocpp/v8context_ctocpp.h" #include "libcef_dll/ctocpp/v8exception_ctocpp.h" #include "libcef_dll/ctocpp/v8value_ctocpp.h" @@ -52,6 +53,32 @@ bool CefV8Context::InContext() { // VIRTUAL METHODS - Body may be edited by hand. +CefRefPtr CefV8ContextCToCpp::GetTaskRunner() { + if (CEF_MEMBER_MISSING(struct_, get_task_runner)) + return NULL; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Execute + cef_task_runner_t* _retval = struct_->get_task_runner(struct_); + + // Return type: refptr_same + return CefTaskRunnerCToCpp::Wrap(_retval); +} + +bool CefV8ContextCToCpp::IsValid() { + if (CEF_MEMBER_MISSING(struct_, is_valid)) + return false; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Execute + int _retval = struct_->is_valid(struct_); + + // Return type: bool + return _retval?true:false; +} + CefRefPtr CefV8ContextCToCpp::GetBrowser() { if (CEF_MEMBER_MISSING(struct_, get_browser)) return NULL; diff --git a/cef/libcef_dll/ctocpp/v8context_ctocpp.h b/cef/libcef_dll/ctocpp/v8context_ctocpp.h index 314082fee..f364361b2 100644 --- a/cef/libcef_dll/ctocpp/v8context_ctocpp.h +++ b/cef/libcef_dll/ctocpp/v8context_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -32,6 +32,8 @@ class CefV8ContextCToCpp virtual ~CefV8ContextCToCpp() {} // CefV8Context methods + virtual CefRefPtr GetTaskRunner() OVERRIDE; + virtual bool IsValid() OVERRIDE; virtual CefRefPtr GetBrowser() OVERRIDE; virtual CefRefPtr GetFrame() OVERRIDE; virtual CefRefPtr GetGlobal() OVERRIDE; diff --git a/cef/libcef_dll/ctocpp/v8exception_ctocpp.cc b/cef/libcef_dll/ctocpp/v8exception_ctocpp.cc index 277f24f01..633a21dc4 100644 --- a/cef/libcef_dll/ctocpp/v8exception_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/v8exception_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/ctocpp/v8exception_ctocpp.h b/cef/libcef_dll/ctocpp/v8exception_ctocpp.h index 8966e61a2..1006a4c0c 100644 --- a/cef/libcef_dll/ctocpp/v8exception_ctocpp.h +++ b/cef/libcef_dll/ctocpp/v8exception_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/ctocpp/v8stack_frame_ctocpp.cc b/cef/libcef_dll/ctocpp/v8stack_frame_ctocpp.cc index 8d685df90..a0de4d3a0 100644 --- a/cef/libcef_dll/ctocpp/v8stack_frame_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/v8stack_frame_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -15,6 +15,19 @@ // VIRTUAL METHODS - Body may be edited by hand. +bool CefV8StackFrameCToCpp::IsValid() { + if (CEF_MEMBER_MISSING(struct_, is_valid)) + return false; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Execute + int _retval = struct_->is_valid(struct_); + + // Return type: bool + return _retval?true:false; +} + CefString CefV8StackFrameCToCpp::GetScriptName() { if (CEF_MEMBER_MISSING(struct_, get_script_name)) return CefString(); diff --git a/cef/libcef_dll/ctocpp/v8stack_frame_ctocpp.h b/cef/libcef_dll/ctocpp/v8stack_frame_ctocpp.h index 6a6a32999..7d1cace31 100644 --- a/cef/libcef_dll/ctocpp/v8stack_frame_ctocpp.h +++ b/cef/libcef_dll/ctocpp/v8stack_frame_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -34,6 +34,7 @@ class CefV8StackFrameCToCpp virtual ~CefV8StackFrameCToCpp() {} // CefV8StackFrame methods + virtual bool IsValid() OVERRIDE; virtual CefString GetScriptName() OVERRIDE; virtual CefString GetScriptNameOrSourceURL() OVERRIDE; virtual CefString GetFunctionName() OVERRIDE; diff --git a/cef/libcef_dll/ctocpp/v8stack_trace_ctocpp.cc b/cef/libcef_dll/ctocpp/v8stack_trace_ctocpp.cc index a569e3948..0764c7ead 100644 --- a/cef/libcef_dll/ctocpp/v8stack_trace_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/v8stack_trace_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -30,6 +30,19 @@ CefRefPtr CefV8StackTrace::GetCurrent(int frame_limit) { // VIRTUAL METHODS - Body may be edited by hand. +bool CefV8StackTraceCToCpp::IsValid() { + if (CEF_MEMBER_MISSING(struct_, is_valid)) + return false; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Execute + int _retval = struct_->is_valid(struct_); + + // Return type: bool + return _retval?true:false; +} + int CefV8StackTraceCToCpp::GetFrameCount() { if (CEF_MEMBER_MISSING(struct_, get_frame_count)) return 0; diff --git a/cef/libcef_dll/ctocpp/v8stack_trace_ctocpp.h b/cef/libcef_dll/ctocpp/v8stack_trace_ctocpp.h index 05ac92a90..8e72b8865 100644 --- a/cef/libcef_dll/ctocpp/v8stack_trace_ctocpp.h +++ b/cef/libcef_dll/ctocpp/v8stack_trace_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -34,6 +34,7 @@ class CefV8StackTraceCToCpp virtual ~CefV8StackTraceCToCpp() {} // CefV8StackTrace methods + virtual bool IsValid() OVERRIDE; virtual int GetFrameCount() OVERRIDE; virtual CefRefPtr GetFrame(int index) OVERRIDE; }; diff --git a/cef/libcef_dll/ctocpp/v8value_ctocpp.cc b/cef/libcef_dll/ctocpp/v8value_ctocpp.cc index 5e28c4020..36d2063d2 100644 --- a/cef/libcef_dll/ctocpp/v8value_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/v8value_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -159,6 +159,19 @@ CefRefPtr CefV8Value::CreateFunction(const CefString& name, // VIRTUAL METHODS - Body may be edited by hand. +bool CefV8ValueCToCpp::IsValid() { + if (CEF_MEMBER_MISSING(struct_, is_valid)) + return false; + + // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING + + // Execute + int _retval = struct_->is_valid(struct_); + + // Return type: bool + return _retval?true:false; +} + bool CefV8ValueCToCpp::IsUndefined() { if (CEF_MEMBER_MISSING(struct_, is_undefined)) return false; diff --git a/cef/libcef_dll/ctocpp/v8value_ctocpp.h b/cef/libcef_dll/ctocpp/v8value_ctocpp.h index 15efb7941..552b020b5 100644 --- a/cef/libcef_dll/ctocpp/v8value_ctocpp.h +++ b/cef/libcef_dll/ctocpp/v8value_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -33,6 +33,7 @@ class CefV8ValueCToCpp virtual ~CefV8ValueCToCpp() {} // CefV8Value methods + virtual bool IsValid() OVERRIDE; virtual bool IsUndefined() OVERRIDE; virtual bool IsNull() OVERRIDE; virtual bool IsBool() OVERRIDE; diff --git a/cef/libcef_dll/ctocpp/web_plugin_info_ctocpp.cc b/cef/libcef_dll/ctocpp/web_plugin_info_ctocpp.cc index 4c814e969..602021219 100644 --- a/cef/libcef_dll/ctocpp/web_plugin_info_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/web_plugin_info_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/ctocpp/web_plugin_info_ctocpp.h b/cef/libcef_dll/ctocpp/web_plugin_info_ctocpp.h index b8bd1cbf0..c1be75da0 100644 --- a/cef/libcef_dll/ctocpp/web_plugin_info_ctocpp.h +++ b/cef/libcef_dll/ctocpp/web_plugin_info_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/ctocpp/xml_reader_ctocpp.cc b/cef/libcef_dll/ctocpp/xml_reader_ctocpp.cc index 73f0724ad..be5c533b7 100644 --- a/cef/libcef_dll/ctocpp/xml_reader_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/xml_reader_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/ctocpp/xml_reader_ctocpp.h b/cef/libcef_dll/ctocpp/xml_reader_ctocpp.h index eeaad3dd6..ab8653c76 100644 --- a/cef/libcef_dll/ctocpp/xml_reader_ctocpp.h +++ b/cef/libcef_dll/ctocpp/xml_reader_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/ctocpp/zip_reader_ctocpp.cc b/cef/libcef_dll/ctocpp/zip_reader_ctocpp.cc index 44401ed48..a1dc226ed 100644 --- a/cef/libcef_dll/ctocpp/zip_reader_ctocpp.cc +++ b/cef/libcef_dll/ctocpp/zip_reader_ctocpp.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/ctocpp/zip_reader_ctocpp.h b/cef/libcef_dll/ctocpp/zip_reader_ctocpp.h index c9464a7d3..812516d5a 100644 --- a/cef/libcef_dll/ctocpp/zip_reader_ctocpp.h +++ b/cef/libcef_dll/ctocpp/zip_reader_ctocpp.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // diff --git a/cef/libcef_dll/wrapper/libcef_dll_wrapper.cc b/cef/libcef_dll/wrapper/libcef_dll_wrapper.cc index 2531d3ca8..0559d0e4f 100644 --- a/cef/libcef_dll/wrapper/libcef_dll_wrapper.cc +++ b/cef/libcef_dll/wrapper/libcef_dll_wrapper.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights +// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. // @@ -51,6 +51,7 @@ #include "libcef_dll/cpptoc/load_handler_cpptoc.h" #include "libcef_dll/cpptoc/proxy_handler_cpptoc.h" #include "libcef_dll/cpptoc/read_handler_cpptoc.h" +#include "libcef_dll/cpptoc/render_handler_cpptoc.h" #include "libcef_dll/cpptoc/render_process_handler_cpptoc.h" #include "libcef_dll/cpptoc/request_handler_cpptoc.h" #include "libcef_dll/cpptoc/resource_bundle_handler_cpptoc.h" @@ -92,6 +93,7 @@ #include "libcef_dll/ctocpp/scheme_registrar_ctocpp.h" #include "libcef_dll/ctocpp/stream_reader_ctocpp.h" #include "libcef_dll/ctocpp/stream_writer_ctocpp.h" +#include "libcef_dll/ctocpp/task_runner_ctocpp.h" #include "libcef_dll/ctocpp/urlrequest_ctocpp.h" #include "libcef_dll/ctocpp/v8context_ctocpp.h" #include "libcef_dll/ctocpp/v8exception_ctocpp.h" @@ -200,6 +202,7 @@ CEF_GLOBAL void CefShutdown() { DCHECK_EQ(CefProxyHandlerCppToC::DebugObjCt, 0); DCHECK_EQ(CefQuotaCallbackCToCpp::DebugObjCt, 0); DCHECK_EQ(CefReadHandlerCppToC::DebugObjCt, 0); + DCHECK_EQ(CefRenderHandlerCppToC::DebugObjCt, 0); DCHECK_EQ(CefRenderProcessHandlerCppToC::DebugObjCt, 0); DCHECK_EQ(CefRequestHandlerCppToC::DebugObjCt, 0); DCHECK_EQ(CefResourceBundleHandlerCppToC::DebugObjCt, 0); @@ -211,6 +214,7 @@ CEF_GLOBAL void CefShutdown() { DCHECK_EQ(CefStreamWriterCToCpp::DebugObjCt, 0); DCHECK_EQ(CefStringVisitorCppToC::DebugObjCt, 0); DCHECK_EQ(CefTaskCppToC::DebugObjCt, 0); + DCHECK_EQ(CefTaskRunnerCToCpp::DebugObjCt, 0); DCHECK_EQ(CefTraceClientCppToC::DebugObjCt, 0); DCHECK_EQ(CefURLRequestCToCpp::DebugObjCt, 0); DCHECK_EQ(CefURLRequestClientCppToC::DebugObjCt, 0); diff --git a/docs/configuring-and-extending.md b/docs/configuring-and-extending.md index f978f117d..7ecd60a04 100644 --- a/docs/configuring-and-extending.md +++ b/docs/configuring-and-extending.md @@ -79,16 +79,30 @@ ConfigObserver = require 'config-observer' _.extend MyClass.prototype, ConfigObserver ``` -# Themes (Not Yet Implemented) +# Themes ## Selecting A Theme +Atom comes bundles with two themes "Atom - Dark" and "Atom - Light". You can +select a theme in your core preferences pane. + Because Atom themes are based on CSS, it's possible to have multiple themes active at the same time. For example, you might select a theme for the UI, and another theme for syntax highlighting. You select your theme(s) in the core preferences pane, by selecting themes from the available list and dragging them in your preferred order. You can also edit the selected themes manually with the -`config.core.themes` array. +`config.core.themes` array. For example. + +```js +{ + "core": { + "themes": ["Atom - Light", "Mac Classic"] + }, + "editor": { + "fontSize": 15 + } +} +``` ## Installing A Theme @@ -140,15 +154,16 @@ matches the name of the original with an additional filename extension: ```text ~/.atom/themes/ - midnight.less - midnight.terminal.less - midnight.tree-view.less + midnight/midnight.less + midnight/packages/terminal.less + midnight/packages/tree-view.less ``` In the example above, when the `midnight` theme is loaded, its `terminal` and `tree-view` extensions will be loaded with it. If you author a theme extension, consider sending its author a pull request to have it included in the theme's -core. +core. Package theme extensions, do not need to be in `package.json` because they +will be loaded when needed by the package. ## TextMate Compatibility diff --git a/native/atom_application.mm b/native/atom_application.mm index 8eab6bfc5..1e36ce37d 100644 --- a/native/atom_application.mm +++ b/native/atom_application.mm @@ -4,6 +4,7 @@ #import "native/atom_window_controller.h" #import "native/atom_cef_app.h" #import +#import @implementation AtomApplication @@ -87,9 +88,13 @@ NSString *path = [NSString stringWithUTF8String:cleanArgv[0]]; path = [self standardizePathToOpen:path withArguments:arguments]; [arguments setObject:path forKey:@"path"]; + } else { + NSString *executedFromPath = [arguments objectForKey:@"executed-from"]; + if (executedFromPath) { + [arguments setObject:executedFromPath forKey:@"path"]; + } } - return arguments; } @@ -217,6 +222,11 @@ } - (void)applicationWillFinishLaunching:(NSNotification *)notification { + SUUpdater.sharedUpdater.delegate = self; + SUUpdater.sharedUpdater.automaticallyChecksForUpdates = YES; + SUUpdater.sharedUpdater.automaticallyDownloadsUpdates = YES; + [SUUpdater.sharedUpdater checkForUpdatesInBackground]; + _backgroundWindowController = [[AtomWindowController alloc] initInBackground]; if ([self.arguments objectForKey:@"benchmark"]) { [self runBenchmarksThenExit:true]; @@ -256,4 +266,26 @@ } } +#pragma mark SUUpdaterDelegate + +- (void)updaterDidNotFindUpdate:(SUUpdater *)update { + NSLog(@"No update found"); +} + +- (void)updater:(SUUpdater *)updater didFindValidUpdate:(SUAppcastItem *)update { + NSLog(@"Found Update"); +} + +- (void)updater:(SUUpdater *)updater willExtractUpdate:(SUAppcastItem *)update { + NSLog(@"Extract update"); +} + +- (void)updater:(SUUpdater *)updater willInstallUpdateOnQuit:(SUAppcastItem *)update immediateInstallationInvocation:(NSInvocation *)invocation { + NSLog(@"Install Update"); +} + +- (void)updater:(SUUpdater *)updater didCancelInstallUpdateOnQuit:(SUAppcastItem *)update { + NSLog(@"Cancel Update Install"); +} + @end diff --git a/native/atom_cef_client.cpp b/native/atom_cef_client.cpp index 41a0c2383..38c25470b 100644 --- a/native/atom_cef_client.cpp +++ b/native/atom_cef_client.cpp @@ -6,6 +6,7 @@ #include "include/cef_task.h" #include "include/cef_runnable.h" #include "include/cef_trace.h" +#include "cef_types.h" #include "native/atom_cef_client.h" #include "cef_v8.h" @@ -124,21 +125,21 @@ bool AtomCefClient::OnConsoleMessage(CefRefPtr browser, bool AtomCefClient::OnKeyEvent(CefRefPtr browser, const CefKeyEvent& event, CefEventHandle os_event) { - if (event.modifiers == KEY_META && event.unmodified_character == 'r') { + if (event.modifiers == EVENTFLAG_COMMAND_DOWN && event.unmodified_character == 'r') { browser->SendProcessMessage(PID_RENDERER, CefProcessMessage::Create("reload")); } - if (m_HandlePasteboardCommands && event.modifiers == KEY_META && event.unmodified_character == 'x') { + if (m_HandlePasteboardCommands && event.modifiers == EVENTFLAG_COMMAND_DOWN && event.unmodified_character == 'x') { browser->GetFocusedFrame()->Cut(); } - if (m_HandlePasteboardCommands && event.modifiers == KEY_META && event.unmodified_character == 'c') { + if (m_HandlePasteboardCommands && event.modifiers == EVENTFLAG_COMMAND_DOWN && event.unmodified_character == 'c') { browser->GetFocusedFrame()->Copy(); } - if (m_HandlePasteboardCommands && event.modifiers == KEY_META && event.unmodified_character == 'v') { + if (m_HandlePasteboardCommands && event.modifiers == EVENTFLAG_COMMAND_DOWN && event.unmodified_character == 'v') { browser->GetFocusedFrame()->Paste(); } - else if (event.modifiers == (KEY_META | KEY_ALT) && event.unmodified_character == 'i') { + else if (event.modifiers == (EVENTFLAG_COMMAND_DOWN | EVENTFLAG_ALT_DOWN) && event.unmodified_character == 'i') { ToggleDevTools(browser); - } else if (event.modifiers == KEY_META && event.unmodified_character == '`') { + } else if (event.modifiers == EVENTFLAG_COMMAND_DOWN && event.unmodified_character == '`') { FocusNextWindow(); } else { diff --git a/native/atom_window_controller.mm b/native/atom_window_controller.mm index 785d85071..d61e46063 100644 --- a/native/atom_window_controller.mm +++ b/native/atom_window_controller.mm @@ -41,7 +41,7 @@ if (!background) { [self setShouldCascadeWindows:NO]; [self setWindowFrameAutosaveName:@"AtomWindow"]; - NSColor *background = [NSColor colorWithCalibratedRed:(51.0/255.0) green:(51.0/255.0f) blue:(51.0/255.0f) alpha:1.0]; + NSColor *background = [NSColor colorWithDeviceRed:(51.0/255.0) green:(51.0/255.0f) blue:(51.0/255.0f) alpha:1.0]; [self.window setBackgroundColor:background]; [self showWindow:self]; } @@ -223,11 +223,11 @@ settings.accelerated_layers_disabled = false; settings.accelerated_video_disabled = false; settings.accelerated_2d_canvas_disabled = false; - settings.accelerated_painting_enabled = true; - settings.accelerated_filters_enabled = true; +// settings.accelerated_painting_enabled = true; +// settings.accelerated_filters_enabled = true; settings.accelerated_plugins_disabled = false; settings.developer_tools_disabled = false; - settings.fullscreen_enabled = true; +// settings.fullscreen_enabled = true; } @end diff --git a/native/frameworks/Sparkle.framework/Headers b/native/frameworks/Sparkle.framework/Headers new file mode 120000 index 000000000..a177d2a6b --- /dev/null +++ b/native/frameworks/Sparkle.framework/Headers @@ -0,0 +1 @@ +Versions/Current/Headers \ No newline at end of file diff --git a/native/frameworks/Sparkle.framework/Resources b/native/frameworks/Sparkle.framework/Resources new file mode 120000 index 000000000..953ee36f3 --- /dev/null +++ b/native/frameworks/Sparkle.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/native/frameworks/Sparkle.framework/Sparkle b/native/frameworks/Sparkle.framework/Sparkle new file mode 120000 index 000000000..b2c52731e --- /dev/null +++ b/native/frameworks/Sparkle.framework/Sparkle @@ -0,0 +1 @@ +Versions/Current/Sparkle \ No newline at end of file diff --git a/native/frameworks/Sparkle.framework/Versions/A/Headers/SUAppcast.h b/native/frameworks/Sparkle.framework/Versions/A/Headers/SUAppcast.h new file mode 100644 index 000000000..5a60d2fda --- /dev/null +++ b/native/frameworks/Sparkle.framework/Versions/A/Headers/SUAppcast.h @@ -0,0 +1,36 @@ +// +// SUAppcast.h +// Sparkle +// +// Created by Andy Matuschak on 3/12/06. +// Copyright 2006 Andy Matuschak. All rights reserved. +// + +#ifndef SUAPPCAST_H +#define SUAPPCAST_H + +@class SUAppcastItem; +@interface SUAppcast : NSObject +{ +@private + NSArray *items; + NSString *userAgentString; + id delegate; + NSString *downloadFilename; + NSURLDownload *download; +} + +- (void)fetchAppcastFromURL:(NSURL *)url; +- (void)setDelegate:delegate; +- (void)setUserAgentString:(NSString *)userAgentString; + +- (NSArray *)items; + +@end + +@interface NSObject (SUAppcastDelegate) +- (void)appcastDidFinishLoading:(SUAppcast *)appcast; +- (void)appcast:(SUAppcast *)appcast failedToLoadWithError:(NSError *)error; +@end + +#endif diff --git a/native/frameworks/Sparkle.framework/Versions/A/Headers/SUAppcastItem.h b/native/frameworks/Sparkle.framework/Versions/A/Headers/SUAppcastItem.h new file mode 100644 index 000000000..9f9539e1c --- /dev/null +++ b/native/frameworks/Sparkle.framework/Versions/A/Headers/SUAppcastItem.h @@ -0,0 +1,61 @@ +// +// SUAppcastItem.h +// Sparkle +// +// Created by Andy Matuschak on 3/12/06. +// Copyright 2006 Andy Matuschak. All rights reserved. +// + +#ifndef SUAPPCASTITEM_H +#define SUAPPCASTITEM_H + +@interface SUAppcastItem : NSObject +{ +@private + NSString *title; + NSDate *date; + NSString *itemDescription; + + NSURL *releaseNotesURL; + + NSString *DSASignature; + NSString *minimumSystemVersion; + NSString *maximumSystemVersion; + + NSURL *fileURL; + NSString *versionString; + NSString *displayVersionString; + + NSDictionary *deltaUpdates; + + NSDictionary *propertiesDictionary; + + NSURL *infoURL; // UK 2007-08-31 +} + +// Initializes with data from a dictionary provided by the RSS class. +- initWithDictionary:(NSDictionary *)dict; +- initWithDictionary:(NSDictionary *)dict failureReason:(NSString**)error; + +- (NSString *)title; +- (NSString *)versionString; +- (NSString *)displayVersionString; +- (NSDate *)date; +- (NSString *)itemDescription; +- (NSURL *)releaseNotesURL; +- (NSURL *)fileURL; +- (NSString *)DSASignature; +- (NSString *)minimumSystemVersion; +- (NSString *)maximumSystemVersion; +- (NSDictionary *)deltaUpdates; +- (BOOL)isDeltaUpdate; +- (BOOL)isCriticalUpdate; + +// Returns the dictionary provided in initWithDictionary; this might be useful later for extensions. +- (NSDictionary *)propertiesDictionary; + +- (NSURL *)infoURL; // UK 2007-08-31 + +@end + +#endif diff --git a/native/frameworks/Sparkle.framework/Versions/A/Headers/SUUpdater.h b/native/frameworks/Sparkle.framework/Versions/A/Headers/SUUpdater.h new file mode 100644 index 000000000..67b116e83 --- /dev/null +++ b/native/frameworks/Sparkle.framework/Versions/A/Headers/SUUpdater.h @@ -0,0 +1,169 @@ +// +// SUUpdater.h +// Sparkle +// +// Created by Andy Matuschak on 1/4/06. +// Copyright 2006 Andy Matuschak. All rights reserved. +// + +#ifndef SUUPDATER_H +#define SUUPDATER_H + +#import "SUVersionComparisonProtocol.h" +#import "SUVersionDisplayProtocol.h" + +@class SUUpdateDriver, SUAppcastItem, SUHost, SUAppcast; + +@interface SUUpdater : NSObject +{ +@private + NSTimer *checkTimer; + SUUpdateDriver *driver; + + NSString *customUserAgentString; + SUHost *host; + IBOutlet id delegate; +} + ++ (SUUpdater *)sharedUpdater; ++ (SUUpdater *)updaterForBundle:(NSBundle *)bundle; +- initForBundle:(NSBundle *)bundle; + +- (NSBundle *)hostBundle; + +- (void)setDelegate:(id)delegate; +- delegate; + +- (void)setAutomaticallyChecksForUpdates:(BOOL)automaticallyChecks; +- (BOOL)automaticallyChecksForUpdates; + +- (void)setUpdateCheckInterval:(NSTimeInterval)interval; +- (NSTimeInterval)updateCheckInterval; + +- (void)setFeedURL:(NSURL *)feedURL; +- (NSURL *)feedURL; // *** MUST BE CALLED ON MAIN THREAD *** + +- (void)setUserAgentString:(NSString *)userAgent; +- (NSString *)userAgentString; + +- (void)setSendsSystemProfile:(BOOL)sendsSystemProfile; +- (BOOL)sendsSystemProfile; + +- (void)setAutomaticallyDownloadsUpdates:(BOOL)automaticallyDownloadsUpdates; +- (BOOL)automaticallyDownloadsUpdates; + +// This IBAction is meant for a main menu item. Hook up any menu item to this action, +// and Sparkle will check for updates and report back its findings verbosely. +- (IBAction)checkForUpdates:(id)sender; + +// This kicks off an update meant to be programmatically initiated. That is, it will display no UI unless it actually finds an update, +// in which case it proceeds as usual. If the fully automated updating is turned on, however, this will invoke that behavior, and if an +// update is found, it will be downloaded and prepped for installation. +- (void)checkForUpdatesInBackground; + +// Date of last update check. Returns nil if no check has been performed. +- (NSDate*)lastUpdateCheckDate; + +// This begins a "probing" check for updates which will not actually offer to update to that version. The delegate methods, though, +// (up to updater:didFindValidUpdate: and updaterDidNotFindUpdate:), are called, so you can use that information in your UI. +- (void)checkForUpdateInformation; + +// Call this to appropriately schedule or cancel the update checking timer according to the preferences for time interval and automatic checks. This call does not change the date of the next check, but only the internal NSTimer. +- (void)resetUpdateCycle; + +- (BOOL)updateInProgress; + +@end + + +// ----------------------------------------------------------------------------- +// SUUpdater Delegate: +// ----------------------------------------------------------------------------- + +@interface NSObject (SUUpdaterDelegateInformalProtocol) + +// Use this to keep Sparkle from popping up e.g. while your setup assistant is showing: +- (BOOL)updaterMayCheckForUpdates:(SUUpdater *)bundle; + +// This method allows you to add extra parameters to the appcast URL, potentially based on whether or not Sparkle will also be sending along the system profile. This method should return an array of dictionaries with keys: "key", "value", "displayKey", "displayValue", the latter two being specifically for display to the user. +- (NSArray *)feedParametersForUpdater:(SUUpdater *)updater sendingSystemProfile:(BOOL)sendingProfile; + +// Override this to dynamically specify the entire URL. +- (NSString*)feedURLStringForUpdater:(SUUpdater*)updater; + +// Use this to override the default behavior for Sparkle prompting the user about automatic update checks. +- (BOOL)updaterShouldPromptForPermissionToCheckForUpdates:(SUUpdater *)bundle; + +// Implement this if you want to do some special handling with the appcast once it finishes loading. +- (void)updater:(SUUpdater *)updater didFinishLoadingAppcast:(SUAppcast *)appcast; + +// If you're using special logic or extensions in your appcast, implement this to use your own logic for finding +// a valid update, if any, in the given appcast. +- (SUAppcastItem *)bestValidUpdateInAppcast:(SUAppcast *)appcast forUpdater:(SUUpdater *)bundle; + +// Sent when a valid update is found by the update driver. +- (void)updater:(SUUpdater *)updater didFindValidUpdate:(SUAppcastItem *)update; + +// Sent when a valid update is not found. +- (void)updaterDidNotFindUpdate:(SUUpdater *)update; + +// Sent immediately before extracting the specified update. +- (void)updater:(SUUpdater *)updater willExtractUpdate:(SUAppcastItem *)update; + +// Sent immediately before installing the specified update. +- (void)updater:(SUUpdater *)updater willInstallUpdate:(SUAppcastItem *)update; + +// Return YES to delay the relaunch until you do some processing; invoke the given NSInvocation to continue. +// This is not called if the user didn't relaunch on the previous update, in that case it will immediately +// restart. +- (BOOL)updater:(SUUpdater *)updater shouldPostponeRelaunchForUpdate:(SUAppcastItem *)update untilInvoking:(NSInvocation *)invocation; + +// Some apps *can not* be relaunched in certain circumstances. They can use this method +// to prevent a relaunch "hard": +- (BOOL)updaterShouldRelaunchApplication:(SUUpdater *)updater; + +// Called immediately before relaunching. +- (void)updaterWillRelaunchApplication:(SUUpdater *)updater; + +// This method allows you to provide a custom version comparator. +// If you don't implement this method or return nil, the standard version comparator will be used. +- (id )versionComparatorForUpdater:(SUUpdater *)updater; + +// This method allows you to provide a custom version comparator. +// If you don't implement this method or return nil, the standard version displayer will be used. +- (id )versionDisplayerForUpdater:(SUUpdater *)updater; + +// Returns the path which is used to relaunch the client after the update is installed. By default, the path of the host bundle. +- (NSString *)pathToRelaunchForUpdater:(SUUpdater *)updater; + +// Called before and after, respectively, an updater shows a modal alert window, to give the host +// the opportunity to hide attached windows etc. that may get in the way: +-(void) updaterWillShowModalAlert:(SUUpdater *)updater; +-(void) updaterDidShowModalAlert:(SUUpdater *)updater; + +// Called when an update is scheduled to be silently installed on quit. +// The invocation can be used to trigger an immediate silent install and relaunch. +- (void)updater:(SUUpdater *)updater willInstallUpdateOnQuit:(SUAppcastItem *)update immediateInstallationInvocation:(NSInvocation *)invocation; +- (void)updater:(SUUpdater *)updater didCancelInstallUpdateOnQuit:(SUAppcastItem *)update; + +@end + + +// ----------------------------------------------------------------------------- +// Constants: +// ----------------------------------------------------------------------------- + +// Define some minimum intervals to avoid DOS-like checking attacks. These are in seconds. +#if defined(DEBUG) && DEBUG && 0 +#define SU_MIN_CHECK_INTERVAL 60 +#else +#define SU_MIN_CHECK_INTERVAL 60*60 +#endif + +#if defined(DEBUG) && DEBUG && 0 +#define SU_DEFAULT_CHECK_INTERVAL 60 +#else +#define SU_DEFAULT_CHECK_INTERVAL 60*60*24 +#endif + +#endif diff --git a/native/frameworks/Sparkle.framework/Versions/A/Headers/SUVersionComparisonProtocol.h b/native/frameworks/Sparkle.framework/Versions/A/Headers/SUVersionComparisonProtocol.h new file mode 100644 index 000000000..6c65ea45a --- /dev/null +++ b/native/frameworks/Sparkle.framework/Versions/A/Headers/SUVersionComparisonProtocol.h @@ -0,0 +1,29 @@ +// +// SUVersionComparisonProtocol.h +// Sparkle +// +// Created by Andy Matuschak on 12/21/07. +// Copyright 2007 Andy Matuschak. All rights reserved. +// + +#ifndef SUVERSIONCOMPARISONPROTOCOL_H +#define SUVERSIONCOMPARISONPROTOCOL_H + +#import + +/*! + @protocol + @abstract Implement this protocol to provide version comparison facilities for Sparkle. +*/ +@protocol SUVersionComparison + +/*! + @method + @abstract An abstract method to compare two version strings. + @discussion Should return NSOrderedAscending if b > a, NSOrderedDescending if b < a, and NSOrderedSame if they are equivalent. +*/ +- (NSComparisonResult)compareVersion:(NSString *)versionA toVersion:(NSString *)versionB; // *** MAY BE CALLED ON NON-MAIN THREAD! + +@end + +#endif diff --git a/native/frameworks/Sparkle.framework/Versions/A/Headers/SUVersionDisplayProtocol.h b/native/frameworks/Sparkle.framework/Versions/A/Headers/SUVersionDisplayProtocol.h new file mode 100644 index 000000000..368b9c9f4 --- /dev/null +++ b/native/frameworks/Sparkle.framework/Versions/A/Headers/SUVersionDisplayProtocol.h @@ -0,0 +1,27 @@ +// +// SUVersionDisplayProtocol.h +// EyeTV +// +// Created by Uli Kusterer on 08.12.09. +// Copyright 2009 Elgato Systems GmbH. All rights reserved. +// + +#import + + +/*! + @protocol + @abstract Implement this protocol to apply special formatting to the two + version numbers. +*/ +@protocol SUVersionDisplay + +/*! + @method + @abstract An abstract method to format two version strings. + @discussion You get both so you can display important distinguishing + information, but leave out unnecessary/confusing parts. +*/ +-(void) formatVersion: (NSString**)inOutVersionA andVersion: (NSString**)inOutVersionB; + +@end diff --git a/native/frameworks/Sparkle.framework/Versions/A/Headers/Sparkle.h b/native/frameworks/Sparkle.framework/Versions/A/Headers/Sparkle.h new file mode 100644 index 000000000..08dd57775 --- /dev/null +++ b/native/frameworks/Sparkle.framework/Versions/A/Headers/Sparkle.h @@ -0,0 +1,21 @@ +// +// Sparkle.h +// Sparkle +// +// Created by Andy Matuschak on 3/16/06. (Modified by CDHW on 23/12/07) +// Copyright 2006 Andy Matuschak. All rights reserved. +// + +#ifndef SPARKLE_H +#define SPARKLE_H + +// This list should include the shared headers. It doesn't matter if some of them aren't shared (unless +// there are name-space collisions) so we can list all of them to start with: + +#import + +#import +#import +#import + +#endif diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/Info.plist b/native/frameworks/Sparkle.framework/Versions/A/Resources/Info.plist new file mode 100644 index 000000000..26bc4f522 --- /dev/null +++ b/native/frameworks/Sparkle.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,40 @@ + + + + + BuildMachineOSBuild + 12C60 + CFBundleDevelopmentRegion + en + CFBundleExecutable + Sparkle + CFBundleIdentifier + org.andymatuschak.Sparkle + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + Sparkle + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.5 Beta (git) + CFBundleSignature + ???? + CFBundleVersion + 4abc126 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 4G2008a + DTPlatformVersion + GM + DTSDKBuild + 11E52 + DTSDKName + macosx10.7 + DTXcode + 0452 + DTXcodeBuild + 4G2008a + + diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/License.txt b/native/frameworks/Sparkle.framework/Versions/A/Resources/License.txt new file mode 100644 index 000000000..08364c631 --- /dev/null +++ b/native/frameworks/Sparkle.framework/Versions/A/Resources/License.txt @@ -0,0 +1,38 @@ +Copyright (c) 2006 Andy Matuschak + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +================= +EXTERNAL LICENSES +================= + +License for bspatch.c and bsdiff.c, from bsdiff 4.3 (: +/*- + * Copyright 2003-2005 Colin Percival + * All rights reserved + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted providing that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/SUModelTranslation.plist b/native/frameworks/Sparkle.framework/Versions/A/Resources/SUModelTranslation.plist new file mode 100644 index 000000000..63644f088 --- /dev/null +++ b/native/frameworks/Sparkle.framework/Versions/A/Resources/SUModelTranslation.plist @@ -0,0 +1,182 @@ + + + + + ADP2,1 + Developer Transition Kit + iMac1,1 + iMac G3 (Rev A-D) + iMac4,1 + iMac (Core Duo) + iMac4,2 + iMac for Education (17-inch, Core Duo) + iMac5,1 + iMac (Core 2 Duo, 17 or 20 inch, SuperDrive) + iMac5,2 + iMac (Core 2 Duo, 17 inch, Combo Drive) + iMac6,1 + iMac (Core 2 Duo, 24 inch, SuperDrive) + iMac8,1 + iMac (April 2008) + MacBook1,1 + MacBook (Core Duo) + MacBook2,1 + MacBook (Core 2 Duo) + MacBook4,1 + MacBook (Core 2 Duo Feb 2008) + MacBookAir1,1 + MacBook Air (January 2008) + MacBookAir2,1 + MacBook Air (June 2009) + MacBookAir3,1 + MacBook Air (October 2010) + MacBookPro1,1 + MacBook Pro Core Duo (15-inch) + MacBookPro1,2 + MacBook Pro Core Duo (17-inch) + MacBookPro2,1 + MacBook Pro Core 2 Duo (17-inch) + MacBookPro2,2 + MacBook Pro Core 2 Duo (15-inch) + MacBookPro3,1 + MacBook Pro Core 2 Duo (15-inch LED, Core 2 Duo) + MacBookPro3,2 + MacBook Pro Core 2 Duo (17-inch HD, Core 2 Duo) + MacBookPro4,1 + MacBook Pro (Core 2 Duo Feb 2008) + Macmini1,1 + Mac Mini (Core Solo/Duo) + MacPro1,1 + Mac Pro (four-core) + MacPro2,1 + Mac Pro (eight-core) + MacPro3,1 + Mac Pro (January 2008 4- or 8- core "Harpertown") + MacPro4,1 + Mac Pro (March 2009) + MacPro5,1 + Mac Pro (August 2010) + PowerBook1,1 + PowerBook G3 + PowerBook2,1 + iBook G3 + PowerBook2,2 + iBook G3 (FireWire) + PowerBook2,3 + iBook G3 + PowerBook2,4 + iBook G3 + PowerBook3,1 + PowerBook G3 (FireWire) + PowerBook3,2 + PowerBook G4 + PowerBook3,3 + PowerBook G4 (Gigabit Ethernet) + PowerBook3,4 + PowerBook G4 (DVI) + PowerBook3,5 + PowerBook G4 (1GHz / 867MHz) + PowerBook4,1 + iBook G3 (Dual USB, Late 2001) + PowerBook4,2 + iBook G3 (16MB VRAM) + PowerBook4,3 + iBook G3 Opaque 16MB VRAM, 32MB VRAM, Early 2003) + PowerBook5,1 + PowerBook G4 (17 inch) + PowerBook5,2 + PowerBook G4 (15 inch FW 800) + PowerBook5,3 + PowerBook G4 (17-inch 1.33GHz) + PowerBook5,4 + PowerBook G4 (15 inch 1.5/1.33GHz) + PowerBook5,5 + PowerBook G4 (17-inch 1.5GHz) + PowerBook5,6 + PowerBook G4 (15 inch 1.67GHz/1.5GHz) + PowerBook5,7 + PowerBook G4 (17-inch 1.67GHz) + PowerBook5,8 + PowerBook G4 (Double layer SD, 15 inch) + PowerBook5,9 + PowerBook G4 (Double layer SD, 17 inch) + PowerBook6,1 + PowerBook G4 (12 inch) + PowerBook6,2 + PowerBook G4 (12 inch, DVI) + PowerBook6,3 + iBook G4 + PowerBook6,4 + PowerBook G4 (12 inch 1.33GHz) + PowerBook6,5 + iBook G4 (Early-Late 2004) + PowerBook6,7 + iBook G4 (Mid 2005) + PowerBook6,8 + PowerBook G4 (12 inch 1.5GHz) + PowerMac1,1 + Power Macintosh G3 (Blue & White) + PowerMac1,2 + Power Macintosh G4 (PCI Graphics) + PowerMac10,1 + Mac Mini G4 + PowerMac10,2 + Mac Mini (Late 2005) + PowerMac11,2 + Power Macintosh G5 (Late 2005) + PowerMac12,1 + iMac G5 (iSight) + PowerMac2,1 + iMac G3 (Slot-loading CD-ROM) + PowerMac2,2 + iMac G3 (Summer 2000) + PowerMac3,1 + Power Macintosh G4 (AGP Graphics) + PowerMac3,2 + Power Macintosh G4 (AGP Graphics) + PowerMac3,3 + Power Macintosh G4 (Gigabit Ethernet) + PowerMac3,4 + Power Macintosh G4 (Digital Audio) + PowerMac3,5 + Power Macintosh G4 (Quick Silver) + PowerMac3,6 + Power Macintosh G4 (Mirrored Drive Door) + PowerMac4,1 + iMac G3 (Early/Summer 2001) + PowerMac4,2 + iMac G4 (Flat Panel) + PowerMac4,4 + eMac + PowerMac4,5 + iMac G4 (17-inch Flat Panel) + PowerMac5,1 + Power Macintosh G4 Cube + PowerMac6,1 + iMac G4 (USB 2.0) + PowerMac6,3 + iMac G4 (20-inch Flat Panel) + PowerMac6,4 + eMac (USB 2.0, 2005) + PowerMac7,2 + Power Macintosh G5 + PowerMac7,3 + Power Macintosh G5 + PowerMac8,1 + iMac G5 + PowerMac8,2 + iMac G5 (Ambient Light Sensor) + PowerMac9,1 + Power Macintosh G5 (Late 2005) + RackMac1,1 + Xserve G4 + RackMac1,2 + Xserve G4 (slot-loading, cluster node) + RackMac3,1 + Xserve G5 + Xserve1,1 + Xserve (Intel Xeon) + Xserve2,1 + Xserve (January 2008 quad-core) + + diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/SUStatus.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/SUStatus.nib new file mode 100644 index 000000000..5ddc9d216 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/SUStatus.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/ar.lproj/SUAutomaticUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/ar.lproj/SUAutomaticUpdateAlert.nib new file mode 100644 index 000000000..5e5199c7c Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/ar.lproj/SUAutomaticUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/ar.lproj/SUPasswordPrompt.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/ar.lproj/SUPasswordPrompt.nib new file mode 100644 index 000000000..1c35eef14 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/ar.lproj/SUPasswordPrompt.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/ar.lproj/SUUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/ar.lproj/SUUpdateAlert.nib new file mode 100644 index 000000000..f80f6c760 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/ar.lproj/SUUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/ar.lproj/SUUpdatePermissionPrompt.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/ar.lproj/SUUpdatePermissionPrompt.nib new file mode 100644 index 000000000..e11c18462 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/ar.lproj/SUUpdatePermissionPrompt.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/ar.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/ar.lproj/Sparkle.strings new file mode 100644 index 000000000..858a71fae Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/ar.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib new file mode 100644 index 000000000..6960c92a2 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib new file mode 100644 index 000000000..ac0456f55 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdatePermissionPrompt.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdatePermissionPrompt.nib new file mode 100644 index 000000000..2d72e4e50 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdatePermissionPrompt.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/cs.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/cs.lproj/Sparkle.strings new file mode 100644 index 000000000..9bbb99686 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/cs.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib new file mode 100644 index 000000000..278635608 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib new file mode 100644 index 000000000..51225f88c Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdatePermissionPrompt.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdatePermissionPrompt.nib new file mode 100644 index 000000000..d9d19c17a Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdatePermissionPrompt.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/da.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/da.lproj/Sparkle.strings new file mode 100644 index 000000000..2984afdf6 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/da.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib new file mode 100644 index 000000000..9c9c941b7 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib new file mode 100644 index 000000000..300f99c84 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdatePermissionPrompt.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdatePermissionPrompt.nib new file mode 100644 index 000000000..829526ee7 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdatePermissionPrompt.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/de.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/de.lproj/Sparkle.strings new file mode 100644 index 000000000..664946d41 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/de.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib new file mode 100644 index 000000000..4924731bd Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/en.lproj/SUAutomaticUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/en.lproj/SUPasswordPrompt.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/en.lproj/SUPasswordPrompt.nib new file mode 100644 index 000000000..16cd6171c Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/en.lproj/SUPasswordPrompt.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib new file mode 100644 index 000000000..504ab4904 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdatePermissionPrompt.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdatePermissionPrompt.nib new file mode 100644 index 000000000..a8dc39dfe Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/en.lproj/SUUpdatePermissionPrompt.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/en.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/en.lproj/Sparkle.strings new file mode 100644 index 000000000..a9c7f851d Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/en.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib new file mode 100644 index 000000000..e895c2668 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/es.lproj/SUAutomaticUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib new file mode 100644 index 000000000..e1412ac95 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdatePermissionPrompt.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdatePermissionPrompt.nib new file mode 100644 index 000000000..d5f250406 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/es.lproj/SUUpdatePermissionPrompt.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/es.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/es.lproj/Sparkle.strings new file mode 100644 index 000000000..8e4ab943b Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/es.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Info.plist b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Info.plist new file mode 100644 index 000000000..2c7893dea --- /dev/null +++ b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Info.plist @@ -0,0 +1,50 @@ + + + + + BuildMachineOSBuild + 12C60 + CFBundleDevelopmentRegion + English + CFBundleExecutable + finish_installation + CFBundleIconFile + Sparkle + CFBundleIdentifier + org.andymatuschak.sparkle.finish-installation + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 4G2008a + DTPlatformVersion + GM + DTSDKBuild + 11E52 + DTSDKName + macosx10.7 + DTXcode + 0452 + DTXcodeBuild + 4G2008a + LSBackgroundOnly + 1 + LSMinimumSystemVersion + 10.4 + LSUIElement + 1 + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/MacOS/finish_installation b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/MacOS/finish_installation new file mode 100755 index 000000000..67aaa1908 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/MacOS/finish_installation differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/PkgInfo b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/PkgInfo new file mode 100644 index 000000000..bd04210fb --- /dev/null +++ b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/PkgInfo @@ -0,0 +1 @@ +APPL???? \ No newline at end of file diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/SUStatus.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/SUStatus.nib new file mode 100644 index 000000000..5ddc9d216 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/SUStatus.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/Sparkle.icns b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/Sparkle.icns new file mode 100644 index 000000000..8e56d45c0 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/Sparkle.icns differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/ar.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/ar.lproj/Sparkle.strings new file mode 100644 index 000000000..858a71fae Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/ar.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/cs.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/cs.lproj/Sparkle.strings new file mode 100644 index 000000000..9bbb99686 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/cs.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/da.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/da.lproj/Sparkle.strings new file mode 100644 index 000000000..2984afdf6 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/da.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/de.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/de.lproj/Sparkle.strings new file mode 100644 index 000000000..664946d41 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/de.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/en.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/en.lproj/Sparkle.strings new file mode 100644 index 000000000..a9c7f851d Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/en.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/es.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/es.lproj/Sparkle.strings new file mode 100644 index 000000000..8e4ab943b Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/es.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/fr.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/fr.lproj/Sparkle.strings new file mode 100644 index 000000000..236f807a7 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/fr.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/is.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/is.lproj/Sparkle.strings new file mode 100644 index 000000000..665e273e4 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/is.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/it.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/it.lproj/Sparkle.strings new file mode 100644 index 000000000..4ccd7affb Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/it.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/ja.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/ja.lproj/Sparkle.strings new file mode 100644 index 000000000..b21ea044d Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/ja.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/nl.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/nl.lproj/Sparkle.strings new file mode 100644 index 000000000..023c473b2 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/nl.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/pl.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/pl.lproj/Sparkle.strings new file mode 100644 index 000000000..9a0bc8b9f Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/pl.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/pt_BR.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/pt_BR.lproj/Sparkle.strings new file mode 100644 index 000000000..7a11a9ebd Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/pt_BR.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/pt_PT.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/pt_PT.lproj/Sparkle.strings new file mode 100644 index 000000000..497cd8303 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/pt_PT.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/ro.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/ro.lproj/Sparkle.strings new file mode 100644 index 000000000..e90bdf598 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/ro.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/ru.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/ru.lproj/Sparkle.strings new file mode 100644 index 000000000..7afef95f4 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/ru.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/sl.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/sl.lproj/Sparkle.strings new file mode 100644 index 000000000..7ec0bc27b Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/sl.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/sv.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/sv.lproj/Sparkle.strings new file mode 100644 index 000000000..16c3fb842 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/sv.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/th.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/th.lproj/Sparkle.strings new file mode 100644 index 000000000..0468c97f1 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/th.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/tr.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/tr.lproj/Sparkle.strings new file mode 100644 index 000000000..69184c75b Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/tr.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/uk.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/uk.lproj/Sparkle.strings new file mode 100644 index 000000000..6f0e4db95 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/uk.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/zh_CN.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/zh_CN.lproj/Sparkle.strings new file mode 100644 index 000000000..b741758fd Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/zh_CN.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/zh_TW.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/zh_TW.lproj/Sparkle.strings new file mode 100644 index 000000000..c1f7e85ed Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/finish_installation.app/Contents/Resources/zh_TW.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib new file mode 100644 index 000000000..6f99d8514 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/fr.lproj/SUAutomaticUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib new file mode 100644 index 000000000..347f12a98 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdatePermissionPrompt.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdatePermissionPrompt.nib new file mode 100644 index 000000000..9d1adfa73 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/fr.lproj/SUUpdatePermissionPrompt.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/fr.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/fr.lproj/Sparkle.strings new file mode 100644 index 000000000..236f807a7 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/fr.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/fr_CA.lproj b/native/frameworks/Sparkle.framework/Versions/A/Resources/fr_CA.lproj new file mode 120000 index 000000000..f9834a395 --- /dev/null +++ b/native/frameworks/Sparkle.framework/Versions/A/Resources/fr_CA.lproj @@ -0,0 +1 @@ +fr.lproj \ No newline at end of file diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib new file mode 100644 index 000000000..a8bbb1d57 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/is.lproj/SUAutomaticUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib new file mode 100644 index 000000000..e371d758b Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdatePermissionPrompt.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdatePermissionPrompt.nib new file mode 100644 index 000000000..55c5891d2 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/is.lproj/SUUpdatePermissionPrompt.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/is.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/is.lproj/Sparkle.strings new file mode 100644 index 000000000..665e273e4 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/is.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib new file mode 100644 index 000000000..c3d4c8f1d Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/it.lproj/SUAutomaticUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib new file mode 100644 index 000000000..b12608a4c Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdatePermissionPrompt.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdatePermissionPrompt.nib new file mode 100644 index 000000000..3d7a8e675 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/it.lproj/SUUpdatePermissionPrompt.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/it.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/it.lproj/Sparkle.strings new file mode 100644 index 000000000..4ccd7affb Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/it.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib new file mode 100644 index 000000000..cc6a7d842 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/ja.lproj/SUAutomaticUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib new file mode 100644 index 000000000..86aa88c23 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdatePermissionPrompt.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdatePermissionPrompt.nib new file mode 100644 index 000000000..62a4e0195 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/ja.lproj/SUUpdatePermissionPrompt.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/ja.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/ja.lproj/Sparkle.strings new file mode 100644 index 000000000..b21ea044d Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/ja.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib new file mode 100644 index 000000000..e74a88b91 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/ko.lproj/SUAutomaticUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib new file mode 100644 index 000000000..08e91dd77 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdatePermissionPrompt.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdatePermissionPrompt.nib new file mode 100644 index 000000000..763ed3727 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/ko.lproj/SUUpdatePermissionPrompt.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib new file mode 100644 index 000000000..2ce3543b0 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/nl.lproj/SUAutomaticUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib new file mode 100644 index 000000000..a47c77410 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdatePermissionPrompt.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdatePermissionPrompt.nib new file mode 100644 index 000000000..5d115e14a Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/nl.lproj/SUUpdatePermissionPrompt.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/nl.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/nl.lproj/Sparkle.strings new file mode 100644 index 000000000..023c473b2 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/nl.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib new file mode 100644 index 000000000..6b3bb832d Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/pl.lproj/SUAutomaticUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib new file mode 100644 index 000000000..e55aabf6e Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdatePermissionPrompt.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdatePermissionPrompt.nib new file mode 100644 index 000000000..f936c00e5 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/pl.lproj/SUUpdatePermissionPrompt.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/pl.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/pl.lproj/Sparkle.strings new file mode 100644 index 000000000..9a0bc8b9f Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/pl.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/pt.lproj b/native/frameworks/Sparkle.framework/Versions/A/Resources/pt.lproj new file mode 120000 index 000000000..3c1c9f6dc --- /dev/null +++ b/native/frameworks/Sparkle.framework/Versions/A/Resources/pt.lproj @@ -0,0 +1 @@ +pt_BR.lproj \ No newline at end of file diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/pt_BR.lproj/SUAutomaticUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/pt_BR.lproj/SUAutomaticUpdateAlert.nib new file mode 100644 index 000000000..cfde618d8 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/pt_BR.lproj/SUAutomaticUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/pt_BR.lproj/SUPasswordPrompt.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/pt_BR.lproj/SUPasswordPrompt.nib new file mode 100644 index 000000000..185c1c08e Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/pt_BR.lproj/SUPasswordPrompt.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/pt_BR.lproj/SUUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/pt_BR.lproj/SUUpdateAlert.nib new file mode 100644 index 000000000..0507aae05 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/pt_BR.lproj/SUUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/pt_BR.lproj/SUUpdatePermissionPrompt.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/pt_BR.lproj/SUUpdatePermissionPrompt.nib new file mode 100644 index 000000000..192910175 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/pt_BR.lproj/SUUpdatePermissionPrompt.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/pt_BR.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/pt_BR.lproj/Sparkle.strings new file mode 100644 index 000000000..7a11a9ebd Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/pt_BR.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/pt_PT.lproj/SUAutomaticUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/pt_PT.lproj/SUAutomaticUpdateAlert.nib new file mode 100644 index 000000000..1677728af Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/pt_PT.lproj/SUAutomaticUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/pt_PT.lproj/SUUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/pt_PT.lproj/SUUpdateAlert.nib new file mode 100644 index 000000000..487f7556d Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/pt_PT.lproj/SUUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/pt_PT.lproj/SUUpdatePermissionPrompt.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/pt_PT.lproj/SUUpdatePermissionPrompt.nib new file mode 100644 index 000000000..01a6c38a3 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/pt_PT.lproj/SUUpdatePermissionPrompt.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/pt_PT.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/pt_PT.lproj/Sparkle.strings new file mode 100644 index 000000000..497cd8303 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/pt_PT.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/ro.lproj/SUAutomaticUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/ro.lproj/SUAutomaticUpdateAlert.nib new file mode 100644 index 000000000..52e0e5d22 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/ro.lproj/SUAutomaticUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/ro.lproj/SUUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/ro.lproj/SUUpdateAlert.nib new file mode 100644 index 000000000..650114b57 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/ro.lproj/SUUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/ro.lproj/SUUpdatePermissionPrompt.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/ro.lproj/SUUpdatePermissionPrompt.nib new file mode 100644 index 000000000..f556aae5d Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/ro.lproj/SUUpdatePermissionPrompt.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/ro.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/ro.lproj/Sparkle.strings new file mode 100644 index 000000000..e90bdf598 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/ro.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib new file mode 100644 index 000000000..50e99525f Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/ru.lproj/SUAutomaticUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib new file mode 100644 index 000000000..259cc9b5b Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdatePermissionPrompt.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdatePermissionPrompt.nib new file mode 100644 index 000000000..bbbc71e9e Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/ru.lproj/SUUpdatePermissionPrompt.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/ru.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/ru.lproj/Sparkle.strings new file mode 100644 index 000000000..7afef95f4 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/ru.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib new file mode 100644 index 000000000..1599b26a0 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/sk.lproj/SUAutomaticUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib new file mode 100644 index 000000000..0b8688cdf Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdatePermissionPrompt.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdatePermissionPrompt.nib new file mode 100644 index 000000000..eceddf2de Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/sk.lproj/SUUpdatePermissionPrompt.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/sl.lproj/SUAutomaticUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/sl.lproj/SUAutomaticUpdateAlert.nib new file mode 100644 index 000000000..ccf680cc6 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/sl.lproj/SUAutomaticUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/sl.lproj/SUUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/sl.lproj/SUUpdateAlert.nib new file mode 100644 index 000000000..d2db5af34 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/sl.lproj/SUUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/sl.lproj/SUUpdatePermissionPrompt.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/sl.lproj/SUUpdatePermissionPrompt.nib new file mode 100644 index 000000000..df467541b Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/sl.lproj/SUUpdatePermissionPrompt.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/sl.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/sl.lproj/Sparkle.strings new file mode 100644 index 000000000..7ec0bc27b Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/sl.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib new file mode 100644 index 000000000..ccb719614 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/sv.lproj/SUAutomaticUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib new file mode 100644 index 000000000..cf7b20365 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdatePermissionPrompt.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdatePermissionPrompt.nib new file mode 100644 index 000000000..60343ea62 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/sv.lproj/SUUpdatePermissionPrompt.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/sv.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/sv.lproj/Sparkle.strings new file mode 100644 index 000000000..16c3fb842 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/sv.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib new file mode 100644 index 000000000..de3bceed9 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/th.lproj/SUAutomaticUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/th.lproj/SUPasswordPrompt.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/th.lproj/SUPasswordPrompt.nib new file mode 100644 index 000000000..08c9dc44d Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/th.lproj/SUPasswordPrompt.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib new file mode 100644 index 000000000..e21e467e8 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdatePermissionPrompt.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdatePermissionPrompt.nib new file mode 100644 index 000000000..7610fc98e Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/th.lproj/SUUpdatePermissionPrompt.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/th.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/th.lproj/Sparkle.strings new file mode 100644 index 000000000..0468c97f1 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/th.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib new file mode 100644 index 000000000..193b60c8e Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/tr.lproj/SUAutomaticUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib new file mode 100644 index 000000000..80923a410 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdatePermissionPrompt.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdatePermissionPrompt.nib new file mode 100644 index 000000000..6fe09c2b1 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/tr.lproj/SUUpdatePermissionPrompt.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/tr.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/tr.lproj/Sparkle.strings new file mode 100644 index 000000000..69184c75b Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/tr.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/uk.lproj/SUAutomaticUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/uk.lproj/SUAutomaticUpdateAlert.nib new file mode 100644 index 000000000..309cda699 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/uk.lproj/SUAutomaticUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/uk.lproj/SUUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/uk.lproj/SUUpdateAlert.nib new file mode 100644 index 000000000..ef1b92f0b Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/uk.lproj/SUUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/uk.lproj/SUUpdatePermissionPrompt.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/uk.lproj/SUUpdatePermissionPrompt.nib new file mode 100644 index 000000000..41b5a3974 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/uk.lproj/SUUpdatePermissionPrompt.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/uk.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/uk.lproj/Sparkle.strings new file mode 100644 index 000000000..6f0e4db95 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/uk.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib new file mode 100644 index 000000000..a06881312 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUAutomaticUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib new file mode 100644 index 000000000..ec7965e50 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdatePermissionPrompt.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdatePermissionPrompt.nib new file mode 100644 index 000000000..c2ff59c40 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/SUUpdatePermissionPrompt.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/Sparkle.strings new file mode 100644 index 000000000..b741758fd Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/zh_CN.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib new file mode 100644 index 000000000..966d90063 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUAutomaticUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib new file mode 100644 index 000000000..530b67ab5 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdateAlert.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdatePermissionPrompt.nib b/native/frameworks/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdatePermissionPrompt.nib new file mode 100644 index 000000000..f6849fe84 Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/SUUpdatePermissionPrompt.nib differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/Sparkle.strings b/native/frameworks/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/Sparkle.strings new file mode 100644 index 000000000..c1f7e85ed Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Resources/zh_TW.lproj/Sparkle.strings differ diff --git a/native/frameworks/Sparkle.framework/Versions/A/Sparkle b/native/frameworks/Sparkle.framework/Versions/A/Sparkle new file mode 100755 index 000000000..bfc12fdcf Binary files /dev/null and b/native/frameworks/Sparkle.framework/Versions/A/Sparkle differ diff --git a/native/frameworks/Sparkle.framework/Versions/Current b/native/frameworks/Sparkle.framework/Versions/Current new file mode 120000 index 000000000..8c7e5a667 --- /dev/null +++ b/native/frameworks/Sparkle.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/native/mac/info.plist b/native/mac/info.plist index 8ca1026b6..c85f69221 100644 --- a/native/mac/info.plist +++ b/native/mac/info.plist @@ -4,22 +4,6 @@ CFBundleDevelopmentRegion English - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - atom.icns - CFBundleIdentifier - com.github.atom - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 1.0 CFBundleDocumentTypes @@ -32,9 +16,35 @@ + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + atom.icns + CFBundleIdentifier + com.github.atom + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 0.0.1 + CFBundleSignature + ???? + CFBundleVersion + 0.0.1 + LSApplicationCategoryType + public.app-category.developer-tools NSMainNibFile MainMenu NSPrincipalClass AtomApp + SUFeedURL + https://speakeasy.githubapp.com/apps/27/appcast.xml + SUPublicDSAKeyFile + speakeasy.pem + SUScheduledCheckInterval + 3600 diff --git a/native/mac/speakeasy.pem b/native/mac/speakeasy.pem new file mode 100644 index 000000000..791182f81 --- /dev/null +++ b/native/mac/speakeasy.pem @@ -0,0 +1,20 @@ +-----BEGIN PUBLIC KEY----- +MIIDOjCCAi0GByqGSM44BAEwggIgAoIBAQCEh+j0nKWTw7soK6w3uk9PzPGVBksk +wDIaA+d+1CHJY9qhjp7OjAlSOl6nrUlGHzU87DRmBlwYZONAzDZnYpLi7zmPVASg +Xk+AmuqzqahTKtwodJp7R/Aq/lCbB2tXTXOxVo+Jya1BQbfd0wWXJFUlD/xTvrgu +zrtw6VYBvaRu8jCjHAJNZn0CO80igj1ZNxRqmmz1Rkt1tT0KBBfGBTNzXeBmGKHN +bVIKW7zImgfm+UQky+WFei1dqcfWOyfrHIYa3Qn1Nes48SBdrolvfvrChlSpqgEN +wxFW9aoognS1UJTu350AQb2NwOOSQRsR++y3iJp+60nBSDZu7sjNN9etAhUAvqki +JOjBjooRd2odMh7imICHQ3kCggEATwa6W0s2xrolPRpwWZS8ORUNDgEI4eOIvonq +O2qZgwD21zUQOsFjLMbWn0cCtrORr7iM8pFg8Yn8dSccpqs+2cM4uFZAycKXf6w3 +jIvV6M3IPQuUSqVFZtqUVuteGTEuAHZKIrXE05P4aJXHLjqSC9JuaXNRm9q7OW7m +rwsoAFyfkKqbtl5Ch+WZ21CE4J+ByTfVwVU4XLiOtce6NABSDWNJsF9fIoFCZCDc +uumLllDJysD8S6aBNhOjNMHPmeIpZBXT23zHH5du/blcEyBbVF3a2ntgudfJmyln +T178CIEUSSjcbz9JyAhhK7OfNlzKhRiO1c4Y3XaZIniLGjF5DwOCAQUAAoIBABGZ +mfuHBW89ub19iICE//VbB91m2f0nUvHk8vE4vvAK8AdD91GODPJr4DU0kJM6ne8r +ohvZgokgDRkGAEceX/nVoG0RLq9T15Xr2qedWVwAffpU10iV9mYwbhHqUKPtG8cj +GW0cDdSI+0oG6UEyn8aQ5p93YEm5N6lq4rWKpxXb/gkrIla4sJJP8VHOOKmo6l1H +AKVIfofiaNAQShu72WVCCurWaoVTUEliEBhy3WlcjuKXEuoL1lpNxyqkt7mf6w71 +6y2+Nh+XUTiFoTIVhk/CH0z+BQTneWEALvfTFzDae+a42rPAisKlt+Gbe7zopnVA +kcQwM0lLzgwx4T1DV3s= +-----END PUBLIC KEY----- \ No newline at end of file diff --git a/spec/app/atom-spec.coffee b/spec/app/atom-spec.coffee index a117d48b8..f09390343 100644 --- a/spec/app/atom-spec.coffee +++ b/spec/app/atom-spec.coffee @@ -16,7 +16,7 @@ describe "the `atom` global", -> it "requires and activates the package's main module if it exists", -> spyOn(rootView, 'activatePackage').andCallThrough() atom.loadPackage("package-with-module") - expect(rootView.activatePackage).toHaveBeenCalledWith('package-with-module', extension) + expect(rootView.activatePackage).toHaveBeenCalled() it "logs warning instead of throwing an exception if a package fails to load", -> spyOn(console, "warn") diff --git a/spec/app/buffer-spec.coffee b/spec/app/buffer-spec.coffee index a4a1fea71..a93bae30a 100644 --- a/spec/app/buffer-spec.coffee +++ b/spec/app/buffer-spec.coffee @@ -128,6 +128,22 @@ describe 'Buffer', -> runs -> expect(buffer.isModified()).toBeTruthy() + it "fires a single contents-conflicted event", -> + buffer.insert([0, 0], "a change") + buffer.save() + buffer.insert([0, 0], "a second change") + + handler = jasmine.createSpy('fileChange') + fs.write(path, "second") + buffer.on 'contents-conflicted', handler + + expect(handler.callCount).toBe 0 + waitsFor -> + handler.callCount > 0 + + runs -> + expect(handler.callCount).toBe 1 + describe "when the buffer's file is deleted (via another process)", -> [path, bufferToDelete] = [] @@ -625,7 +641,7 @@ describe 'Buffer', -> expect(ranges[1]).toEqual [[6,6], [6,13]] describe ".characterIndexForPosition(position)", -> - it "returns the total number of charachters that precede the given position", -> + it "returns the total number of characters that precede the given position", -> expect(buffer.characterIndexForPosition([0, 0])).toBe 0 expect(buffer.characterIndexForPosition([0, 1])).toBe 1 expect(buffer.characterIndexForPosition([0, 29])).toBe 29 @@ -634,7 +650,7 @@ describe 'Buffer', -> expect(buffer.characterIndexForPosition([12, 2])).toBe 408 describe ".positionForCharacterIndex(position)", -> - it "returns the position based on charachter index", -> + it "returns the position based on character index", -> expect(buffer.positionForCharacterIndex(0)).toEqual [0, 0] expect(buffer.positionForCharacterIndex(1)).toEqual [0, 1] expect(buffer.positionForCharacterIndex(29)).toEqual [0, 29] diff --git a/spec/app/edit-session-spec.coffee b/spec/app/edit-session-spec.coffee index c74a6605e..6f72cd8bc 100644 --- a/spec/app/edit-session-spec.coffee +++ b/spec/app/edit-session-spec.coffee @@ -2007,3 +2007,16 @@ describe "EditSession", -> expect(editSession.lineForBufferRow(2)).toBe " 0" expect(editSession.lineForBufferRow(3)).toBe " 2" expect(editSession.lineForBufferRow(4)).toBe " 4" + + describe ".autoDecreaseIndentForRow()", -> + it "doesn't outdent the first and only row", -> + editSession.selectAll() + editSession.insertText("}") + editSession.autoDecreaseIndentForRow(0) + expect(editSession.lineForBufferRow(0)).toBe "}" + + it "doesn't outdent a row that is already fully outdented", -> + editSession.selectAll() + editSession.insertText("var i;\n}") + editSession.autoDecreaseIndentForRow(1) + expect(editSession.lineForBufferRow(1)).toBe "}" diff --git a/spec/app/editor-spec.coffee b/spec/app/editor-spec.coffee index 777e7b7b3..dd67f2946 100644 --- a/spec/app/editor-spec.coffee +++ b/spec/app/editor-spec.coffee @@ -558,7 +558,7 @@ describe "Editor", -> rootView.attachToDom() config.set("editor.fontSize", 16 * 4) expect(editor.gutter.css('font-size')).toBe "#{16 * 4}px" - expect(editor.gutter.width()).toBe(141) + expect(editor.gutter.width()).toBe(64) it "updates lines if there are unrendered lines", -> editor.attachToDom(heightInLines: 5) @@ -744,7 +744,7 @@ describe "Editor", -> editor.renderedLines.trigger mousedownEvent(editor: editor, point: [12, 0]) # moving changes selection - $(document).trigger mousemoveEvent(editor: editor, pageX: 0, pageY: -10) + $(document).trigger mousemoveEvent(editor: editor, pageX: 0, pageY: -15) expect(editor.scrollTop()).toBe 4 * editor.lineHeight # if cursor stays off screen, we keep moving / scrolling up diff --git a/spec/app/language-mode-spec.coffee b/spec/app/language-mode-spec.coffee index 340f4865c..9e1cd8b71 100644 --- a/spec/app/language-mode-spec.coffee +++ b/spec/app/language-mode-spec.coffee @@ -23,12 +23,12 @@ describe "LanguageMode", -> beforeEach -> editSession.buffer.setText("") - describe "when more than one charachter is inserted", -> + describe "when more than one character is inserted", -> it "does not insert a matching bracket", -> editSession.insertText("woah(") expect(editSession.buffer.getText()).toBe "woah(" - describe "when there is a word charachter after the cursor", -> + describe "when there is a word character after the cursor", -> it "does not insert a matching bracket", -> editSession.buffer.setText("ab") editSession.setCursorBufferPosition([0, 1]) @@ -47,7 +47,7 @@ describe "LanguageMode", -> expect(editSession.buffer.getText()).toBe "())\na)b\n[)]\n1)2" - describe "when there is a non-word characher after the cursor", -> + describe "when there is a non-word character after the cursor", -> it "inserts a closing bracket after an opening bracket is inserted", -> editSession.buffer.setText("}") editSession.setCursorBufferPosition([0, 0]) @@ -145,8 +145,30 @@ describe "LanguageMode", -> expect(buffer.lineForRow(0)).toBe '"ok"' expect(editSession.getCursorBufferPosition()).toEqual [0, 4] + describe "when there is text selected on a single line", -> + it "wraps the selection with brackets", -> + editSession.insertText 'text' + editSession.moveCursorToBottom() + editSession.selectToTop() + editSession.selectAll() + editSession.insertText '(' + expect('(text)').toBe buffer.getText() + expect(editSession.getSelectedBufferRange()).toEqual [[0, 1], [0, 5]] + expect(editSession.getSelection().isReversed()).toBeTruthy() + + describe "when there is text selected on multiple lines", -> + it "wraps the selection with brackets", -> + editSession.insertText 'text\nabcd' + editSession.moveCursorToBottom() + editSession.selectToTop() + editSession.selectAll() + editSession.insertText '(' + expect('(text\nabcd)').toBe buffer.getText() + expect(editSession.getSelectedBufferRange()).toEqual [[0, 1], [1, 4]] + expect(editSession.getSelection().isReversed()).toBeTruthy() + describe "when inserting a quote", -> - describe "when a word charachter is before the cursor", -> + describe "when a word character is before the cursor", -> it "does not automatically insert closing quote", -> editSession.buffer.setText("abc") editSession.setCursorBufferPosition([0, 3]) @@ -158,7 +180,7 @@ describe "LanguageMode", -> editSession.insertText '\'' expect(buffer.lineForRow(0)).toBe "abc\'" - describe "when a non word charachter is before the cursor", -> + describe "when a non word character is before the cursor", -> it "automatically insert closing quote", -> editSession.buffer.setText("ab@") editSession.setCursorBufferPosition([0, 3]) @@ -174,6 +196,15 @@ describe "LanguageMode", -> expect(buffer.lineForRow(0)).toBe "\"\"" expect(editSession.getCursorBufferPosition()).toEqual [0, 1] + describe "bracket deletion", -> + it "deletes the end bracket when it directly proceeds a begin bracket that is being backspaced", -> + buffer.setText("") + editSession.setCursorBufferPosition([0, 0]) + editSession.insertText '{' + expect(buffer.lineForRow(0)).toBe "{}" + editSession.backspace() + expect(buffer.lineForRow(0)).toBe "" + describe "javascript", -> beforeEach -> editSession = fixturesProject.buildEditSessionForPath('sample.js', autoIndent: false) diff --git a/spec/app/select-list-spec.coffee b/spec/app/select-list-spec.coffee index 01ffeb445..e4e4d32cc 100644 --- a/spec/app/select-list-spec.coffee +++ b/spec/app/select-list-spec.coffee @@ -59,6 +59,17 @@ describe "SelectList", -> expect(selectList.error).not.toBeVisible() expect(selectList).not.toHaveClass("error") + it "displays no elements until the array has been set on the list", -> + selectList.array = null + selectList.list.empty() + miniEditor.insertText('la') + window.advanceClock(selectList.inputThrottle) + + expect(list.find('li').length).toBe 0 + expect(selectList).not.toHaveClass("error") + selectList.setArray(array) + expect(list.find('li').length).toBe 2 + describe "when core:move-up / core:move-down are triggered on the miniEditor", -> it "selects the previous / next item in the list, or wraps around to the other side", -> expect(list.find('li:first')).toHaveClass 'selected' diff --git a/spec/app/text-mate-theme-spec.coffee b/spec/app/text-mate-theme-spec.coffee index 381d3297e..5191ced55 100644 --- a/spec/app/text-mate-theme-spec.coffee +++ b/spec/app/text-mate-theme-spec.coffee @@ -21,7 +21,7 @@ describe "TextMateTheme", -> it "returns rulesets representing the theme's global style settings", -> expect(rulesets[0]).toEqual - selector: '.editor' + selector: '.editor, .editor .gutter' properties: 'background-color': '#141414' 'color': '#F8F8F8' @@ -37,7 +37,7 @@ describe "TextMateTheme", -> 'background-color': "rgba(221, 240, 255, 0.2)" it "returns an array of objects representing the theme's scope selectors", -> - expect(rulesets[11]).toEqual + expect(rulesets[12]).toEqual comment: "Invalid – Deprecated" selector: ".invalid.deprecated" properties: @@ -45,7 +45,7 @@ describe "TextMateTheme", -> # 'font-style': 'italic' 'text-decoration': 'underline' - expect(rulesets[12]).toEqual + expect(rulesets[13]).toEqual comment: "Invalid – Illegal" selector: ".invalid.illegal" properties: diff --git a/spec/fixtures/packages/package-with-module/index.coffee b/spec/fixtures/packages/package-with-module/index.coffee index 25df27829..6b54f633a 100644 --- a/spec/fixtures/packages/package-with-module/index.coffee +++ b/spec/fixtures/packages/package-with-module/index.coffee @@ -1,3 +1,6 @@ +AtomPackage = require 'atom-package' + module.exports = +class MyPackage extends AtomPackage activate: -> @activateCalled = true diff --git a/spec/fixtures/packages/package-with-snippets/snippets/.hidden-file b/spec/fixtures/packages/package-with-snippets/snippets/.hidden-file new file mode 100644 index 000000000..7aa86d685 --- /dev/null +++ b/spec/fixtures/packages/package-with-snippets/snippets/.hidden-file @@ -0,0 +1 @@ +This is a hidden file. Don't even try to load it as a snippet diff --git a/spec/fixtures/packages/package-with-snippets/snippets/junk-file b/spec/fixtures/packages/package-with-snippets/snippets/junk-file new file mode 100644 index 000000000..5549cb956 --- /dev/null +++ b/spec/fixtures/packages/package-with-snippets/snippets/junk-file @@ -0,0 +1 @@ +This file isn't CSON, but shouldn't be a big deal \ No newline at end of file diff --git a/src/app/atom-package.coffee b/src/app/atom-package.coffee index e86678a37..8fc6b4908 100644 --- a/src/app/atom-package.coffee +++ b/src/app/atom-package.coffee @@ -5,6 +5,7 @@ module.exports = class AtomPackage extends Package metadata: null keymapsDirPath: null + autoloadStylesheets: true constructor: (@name) -> super @@ -12,15 +13,13 @@ class AtomPackage extends Package load: -> try - if @requireModule - @module = require(@path) - @module.name = @name @loadMetadata() @loadKeymaps() - @loadStylesheets() - rootView.activatePackage(@name, @module) if @module + @loadStylesheets() if @autoloadStylesheets + rootView.activatePackage(@name, this) unless @isDirectory catch e console.warn "Failed to load package named '#{@name}'", e.stack + this loadMetadata: -> if metadataPath = fs.resolveExtension(fs.join(@path, "package"), ['cson', 'json']) diff --git a/src/app/atom.coffee b/src/app/atom.coffee index ee5c8a442..f23ed3dcb 100644 --- a/src/app/atom.coffee +++ b/src/app/atom.coffee @@ -9,14 +9,14 @@ originalSendMessageToBrowserProcess = atom.sendMessageToBrowserProcess _.extend atom, exitWhenDone: window.location.params.exitWhenDone - + loadedThemes: [] pendingBrowserProcessCallbacks: {} loadPackages: -> pack.load() for pack in @getPackages() getPackages: -> - @getPackageNames().map (name) -> Package.build(name) + @getPackageNames().map((name) -> Package.build(name)).filter (pack) -> pack? loadTextMatePackages: -> pack.load() for pack in @getTextMatePackages() @@ -25,7 +25,7 @@ _.extend atom, @getPackages().filter (pack) -> pack instanceof TextMatePackage loadPackage: (name) -> - Package.build(name).load() + Package.build(name)?.load() getPackageNames: -> disabledPackages = config.get("core.disabledPackages") ? [] @@ -39,12 +39,16 @@ _.extend atom, .filter (name) -> not _.contains(disabledPackages, name) loadThemes: -> - themeNames = config.get("core.themes") ? ['IR_Black'] + themeNames = config.get("core.themes") ? ['Atom - Dark', 'IR_Black'] themeNames = [themeNames] unless _.isArray(themeNames) @loadTheme(themeName) for themeName in themeNames loadTheme: (name) -> - Theme.load(name) + @loadedThemes.push Theme.load(name) + + getAtomThemeStylesheets: -> + themeNames = config.get("core.themes") ? ['Atom - Dark', 'IR_Black'] + themeNames = [themeNames] unless _.isArray(themeNames) open: (args...) -> @sendMessageToBrowserProcess('open', args) diff --git a/src/app/buffer.coffee b/src/app/buffer.coffee index d5f9bd34c..9b205b7e0 100644 --- a/src/app/buffer.coffee +++ b/src/app/buffer.coffee @@ -92,9 +92,8 @@ class Buffer @file?.off() @file = new File(path) - if @file.exists() - @file.read() - @subscribeToFile() + @file.read() if @file.exists() + @subscribeToFile() @trigger "path-changed", this @@ -242,7 +241,6 @@ class Buffer @setPath(path) @cachedDiskContents = @getText() @file.write(@getText()) - @subscribeToFile() @trigger 'saved' isModified: -> diff --git a/src/app/config.coffee b/src/app/config.coffee index 448a7fc2d..ab1eae901 100644 --- a/src/app/config.coffee +++ b/src/app/config.coffee @@ -9,9 +9,10 @@ Theme = require 'theme' configDirPath = fs.absolute("~/.atom") configJsonPath = fs.join(configDirPath, "config.json") userInitScriptPath = fs.join(configDirPath, "atom.coffee") -bundledThemesDirPath = fs.join(resourcePath, "themes") bundledPackagesDirPath = fs.join(resourcePath, "src/packages") -bundledVendorPackagesDirPath = fs.join(resourcePath, "vendor/packages") +bundledThemesDirPath = fs.join(resourcePath, "themes") +vendoredPackagesDirPath = fs.join(resourcePath, "vendor/packages") +vendoredThemesDirPath = fs.join(resourcePath, "vendor/themes") userThemesDirPath = fs.join(configDirPath, "themes") userPackagesDirPath = fs.join(configDirPath, "packages") @@ -20,8 +21,8 @@ require.paths.unshift userPackagesDirPath module.exports = class Config configDirPath: configDirPath - themeDirPaths: [userThemesDirPath, bundledThemesDirPath] - packageDirPaths: [userPackagesDirPath, bundledVendorPackagesDirPath, bundledPackagesDirPath] + themeDirPaths: [userThemesDirPath, bundledThemesDirPath, vendoredThemesDirPath] + packageDirPaths: [userPackagesDirPath, vendoredPackagesDirPath, bundledPackagesDirPath] defaultSettings: null settings: null @@ -34,8 +35,8 @@ class Config load: -> @loadUserConfig() @requireUserInitScript() - atom.loadPackages() atom.loadThemes() + atom.loadPackages() loadUserConfig: -> if fs.exists(configJsonPath) diff --git a/src/app/cursor.coffee b/src/app/cursor.coffee index 498b2ef83..4599705f3 100644 --- a/src/app/cursor.coffee +++ b/src/app/cursor.coffee @@ -150,7 +150,7 @@ class Cursor previousLinesRange = [[previousNonBlankRow, 0], currentBufferPosition] beginningOfWordPosition = currentBufferPosition - @editSession.backwardsScanInRange @wordRegex, previousLinesRange, (match, matchRange, { stop }) => + @editSession.backwardsScanInRange (options.wordRegex || @wordRegex), previousLinesRange, (match, matchRange, { stop }) => if matchRange.end.isGreaterThanOrEqual(currentBufferPosition) or allowPrevious beginningOfWordPosition = matchRange.start stop() @@ -162,15 +162,17 @@ class Cursor range = [currentBufferPosition, @editSession.getEofBufferPosition()] endOfWordPosition = null - @editSession.scanInRange @wordRegex, range, (match, matchRange, { stop }) => + @editSession.scanInRange (options.wordRegex || @wordRegex), range, (match, matchRange, { stop }) => endOfWordPosition = matchRange.end if not allowNext and matchRange.start.isGreaterThan(currentBufferPosition) endOfWordPosition = currentBufferPosition stop() endOfWordPosition or currentBufferPosition - getCurrentWordBufferRange: -> - new Range(@getBeginningOfCurrentWordBufferPosition(allowPrevious: false), @getEndOfCurrentWordBufferPosition(allowNext: false)) + getCurrentWordBufferRange: (options={}) -> + startOptions = _.extend(_.clone(options), allowPrevious: false) + endOptions = _.extend(_.clone(options), allowNext: false) + new Range(@getBeginningOfCurrentWordBufferPosition(startOptions), @getEndOfCurrentWordBufferPosition(endOptions)) getCurrentLineBufferRange: (options) -> @editSession.bufferRangeForBufferRow(@getBufferRow(), options) diff --git a/src/app/deferred-atom-package.coffee b/src/app/deferred-atom-package.coffee new file mode 100644 index 000000000..1f328fc02 --- /dev/null +++ b/src/app/deferred-atom-package.coffee @@ -0,0 +1,36 @@ +AtomPackage = require 'atom-package' +_ = require 'underscore' + +module.exports = +class DeferredAtomPackage extends AtomPackage + + constructor: -> + super + + @autoloadStylesheets = false + + activate: (@rootView, @state) -> + @instance = null + onLoadEvent = (e) => @onLoadEvent(e, @getInstance()) + if _.isArray(@loadEvents) + for event in @loadEvents + @rootView.command(event, onLoadEvent) + else + for event, selector of @loadEvents + @rootView.command(event, selector, onLoadEvent) + this + + deactivate: -> @instance?.deactivate?() + + serialize: -> + if @instance + @instance.serialize?() + else + @state + + getInstance: -> + unless @instance + @loadStylesheets() + InstanceClass = require @instanceClass + @instance = InstanceClass.activate(@rootView, @state) + @instance diff --git a/src/app/edit-session.coffee b/src/app/edit-session.coffee index 7e7791963..8e64e2012 100644 --- a/src/app/edit-session.coffee +++ b/src/app/edit-session.coffee @@ -498,6 +498,9 @@ class EditSession getCurrentParagraphBufferRange: -> @getCursor().getCurrentParagraphBufferRange() + getWordUnderCursor: (options) -> + @getTextInBufferRange(@getCursor().getCurrentWordBufferRange(options)) + moveCursorUp: (lineCount) -> @moveCursors (cursor) -> cursor.moveUp(lineCount) diff --git a/src/app/editor.coffee b/src/app/editor.coffee index 3112a5b17..f06487f45 100644 --- a/src/app/editor.coffee +++ b/src/app/editor.coffee @@ -209,6 +209,7 @@ class Editor extends View setCursorBufferPosition: (position, options) -> @activeEditSession.setCursorBufferPosition(position, options) getCursorBufferPosition: -> @activeEditSession.getCursorBufferPosition() getCurrentParagraphBufferRange: -> @activeEditSession.getCurrentParagraphBufferRange() + getWordUnderCursor: (options) -> @activeEditSession.getWordUnderCursor(options) getSelection: (index) -> @activeEditSession.getSelection(index) getSelections: -> @activeEditSession.getSelections() diff --git a/src/app/grammar-view.coffee b/src/app/grammar-view.coffee index ad7311b01..bd0b73251 100644 --- a/src/app/grammar-view.coffee +++ b/src/app/grammar-view.coffee @@ -35,10 +35,6 @@ class GrammarView extends SelectList grammars.unshift(@autoDetect) @setArray(grammars) - cancelled: -> - @miniEditor.setText('') - @editor.rootView()?.focus() if @miniEditor.isFocused - confirmed: (grammar) -> @cancel() if grammar is @autoDetect @@ -48,5 +44,7 @@ class GrammarView extends SelectList @editor.reloadGrammar() attach: -> + super + @editor.rootView()?.append(this) @miniEditor.focus() diff --git a/src/app/keymaps/editor.cson b/src/app/keymaps/editor.cson index 2f48d27bb..2f6da8a83 100644 --- a/src/app/keymaps/editor.cson +++ b/src/app/keymaps/editor.cson @@ -36,4 +36,4 @@ 'meta-U': 'editor:lower-case' 'alt-meta-w': 'editor:close-other-edit-sessions' 'meta-P': 'editor:close-all-edit-sessions' - 'meta-l': 'editor:select-grammar' + 'meta-L': 'editor:select-grammar' diff --git a/src/app/language-mode.coffee b/src/app/language-mode.coffee index 19c376f1b..57be42c86 100644 --- a/src/app/language-mode.coffee +++ b/src/app/language-mode.coffee @@ -23,15 +23,19 @@ class LanguageMode return true if @editSession.hasMultipleCursors() cursorBufferPosition = @editSession.getCursorBufferPosition() - previousCharachter = @editSession.getTextInBufferRange([cursorBufferPosition.add([0, -1]), cursorBufferPosition]) - nextCharachter = @editSession.getTextInBufferRange([cursorBufferPosition, cursorBufferPosition.add([0,1])]) + previousCharacter = @editSession.getTextInBufferRange([cursorBufferPosition.add([0, -1]), cursorBufferPosition]) + nextCharacter = @editSession.getTextInBufferRange([cursorBufferPosition, cursorBufferPosition.add([0,1])]) - hasWordAfterCursor = /\w/.test(nextCharachter) - hasWordBeforeCursor = /\w/.test(previousCharachter) + if @isOpeningBracket(text) and not @editSession.getSelection().isEmpty() + @wrapSelectionInBrackets(text) + return false + + hasWordAfterCursor = /\w/.test(nextCharacter) + hasWordBeforeCursor = /\w/.test(previousCharacter) autoCompleteOpeningBracket = @isOpeningBracket(text) and not hasWordAfterCursor and not (@isQuote(text) and hasWordBeforeCursor) skipOverExistingClosingBracket = false - if @isClosingBracket(text) and nextCharachter == text + if @isClosingBracket(text) and nextCharacter == text if bracketAnchorRange = @bracketAnchorRanges.filter((anchorRange) -> anchorRange.getBufferRange().end.isEqual(cursorBufferPosition))[0] skipOverExistingClosingBracket = true @@ -47,6 +51,35 @@ class LanguageMode @bracketAnchorRanges.push @editSession.addAnchorRange(range) false + _.adviseBefore @editSession, 'backspace', => + return if @editSession.hasMultipleCursors() + return unless @editSession.getSelection().isEmpty() + + cursorBufferPosition = @editSession.getCursorBufferPosition() + previousCharacter = @editSession.getTextInBufferRange([cursorBufferPosition.add([0, -1]), cursorBufferPosition]) + nextCharacter = @editSession.getTextInBufferRange([cursorBufferPosition, cursorBufferPosition.add([0,1])]) + if @pairedCharacters[previousCharacter] is nextCharacter + @editSession.transact => + @editSession.moveCursorLeft() + @editSession.delete() + @editSession.delete() + false + + wrapSelectionInBrackets: (bracket) -> + pair = @pairedCharacters[bracket] + @editSession.mutateSelectedText (selection) => + return if selection.isEmpty() + + range = selection.getBufferRange() + options = reverse: selection.isReversed() + selection.insertText("#{bracket}#{selection.getText()}#{pair}") + selectionStart = range.start.add([0, 1]) + if range.start.row is range.end.row + selectionEnd = range.end.add([0, 1]) + else + selectionEnd = range.end + selection.setBufferRange([selectionStart, selectionEnd], options) + reloadGrammar: -> path = @buffer.getPath() pathContents = @buffer.cachedDiskContents @@ -55,6 +88,7 @@ class LanguageMode @grammar = @buffer.project.grammarForFilePath(path, pathContents) else @grammar = syntax.grammarForFilePath(path, pathContents) + throw new Error("No grammar found for path: #{path}") unless @grammar previousGrammar isnt @grammar isQuote: (string) -> @@ -187,12 +221,14 @@ class LanguageMode return unless decreaseIndentRegex.test(line) currentIndentLevel = @editSession.indentationForBufferRow(bufferRow) + return if currentIndentLevel is 0 precedingRow = @buffer.previousNonBlankRow(bufferRow) + return unless precedingRow? precedingLine = @buffer.lineForRow(precedingRow) desiredIndentLevel = @editSession.indentationForBufferRow(precedingRow) desiredIndentLevel -= 1 unless increaseIndentRegex.test(precedingLine) - if desiredIndentLevel < currentIndentLevel + if desiredIndentLevel >= 0 and desiredIndentLevel < currentIndentLevel @editSession.setIndentationForBufferRow(bufferRow, desiredIndentLevel) tokenizeLine: (line, stack, firstLine) -> diff --git a/src/app/package.coffee b/src/app/package.coffee index 8bcbecfa1..01bdde1fa 100644 --- a/src/app/package.coffee +++ b/src/app/package.coffee @@ -2,25 +2,34 @@ fs = require 'fs' module.exports = class Package + @resolve: (name) -> + path = require.resolve(name, verifyExistence: false) + return path if path + throw new Error("No package found named '#{name}'") + @build: (name) -> - AtomPackage = require 'atom-package' TextMatePackage = require 'text-mate-package' + AtomPackage = require 'atom-package' if TextMatePackage.testName(name) new TextMatePackage(name) else - new AtomPackage(name) + if fs.isDirectory(@resolve(name)) + new AtomPackage(name) + else + try + PackageClass = require name + new PackageClass(name) if typeof PackageClass is 'function' + catch e + console.warn "Failed to load package named '#{name}'", e.stack name: null path: null - requireModule: null + isDirectory: false module: null constructor: (@name) -> - @path = require.resolve(@name, verifyExistence: false) - throw new Error("No package found named '#{@name}'") unless @path + @path = Package.resolve(@name) + @isDirectory = fs.isDirectory(@path) + @path = fs.directory(@path) unless @isDirectory - if fs.isDirectory(@path) - @requireModule = false - else - @requireModule = true - @path = fs.directory(@path) + activate: (rootView) -> diff --git a/src/app/project.coffee b/src/app/project.coffee index 3a2b47cf4..7a6c3a219 100644 --- a/src/app/project.coffee +++ b/src/app/project.coffee @@ -83,7 +83,7 @@ class Project @ignoreRepositoryPath(path) ignoreRepositoryPath: (path) -> - config.get("core.hideGitIgnoredFiles") and @repo.isPathIgnored(fs.join(@getPath(), path)) + config.get("core.hideGitIgnoredFiles") and @repo?.isPathIgnored(fs.join(@getPath(), path)) resolve: (filePath) -> filePath = fs.join(@getPath(), filePath) unless filePath[0] == '/' diff --git a/src/app/select-list.coffee b/src/app/select-list.coffee index 0f8bb6c10..5bdb3258d 100644 --- a/src/app/select-list.coffee +++ b/src/app/select-list.coffee @@ -62,6 +62,8 @@ class SelectList extends View @loading.text(message).show() populateList: -> + return unless @array? + filterQuery = @miniEditor.getText() if filterQuery.length filteredArray = fuzzyFilter(@array, filterQuery, key: @filterKey) @@ -121,10 +123,24 @@ class SelectList extends View else @cancel() + attach: -> + @storeFocusedElement() + + storeFocusedElement: -> + @previouslyFocusedElement = $(':focus') + + restoreFocus: -> + @previouslyFocusedElement?.focus() + + cancelled: -> + @miniEditor.setText('') + cancel: -> @list.empty() @cancelling = true + miniEditorFocused = @miniEditor.isFocused @cancelled() @detach() + @restoreFocus() if miniEditorFocused @cancelling = false clearTimeout(@scheduleTimeout) diff --git a/src/app/text-mate-package.coffee b/src/app/text-mate-package.coffee index a7cc7bcbc..23cc9143b 100644 --- a/src/app/text-mate-package.coffee +++ b/src/app/text-mate-package.coffee @@ -32,6 +32,7 @@ class TextMatePackage extends Package syntax.addProperties(selector, properties) catch e console.warn "Failed to load package named '#{@name}'", e.stack + this getGrammars: -> return @grammars if @grammars diff --git a/src/app/text-mate-theme.coffee b/src/app/text-mate-theme.coffee index 9c56ec222..ee78cdea7 100644 --- a/src/app/text-mate-theme.coffee +++ b/src/app/text-mate-theme.coffee @@ -35,10 +35,10 @@ class TextMateTheme extends Theme getRulesets: -> @rulesets buildGlobalSettingsRulesets: ({settings}) -> - { background, foreground, caret, selection } = settings + { background, foreground, caret, selection, lineHighlight } = settings @rulesets.push - selector: '.editor' + selector: '.editor, .editor .gutter' properties: 'background-color': @translateColor(background) 'color': @translateColor(foreground) @@ -53,6 +53,11 @@ class TextMateTheme extends Theme properties: 'background-color': @translateColor(selection) + @rulesets.push + selector: '.editor.focused .line-number.cursor-line-no-selection, .editor.focused .line.cursor-line' + properties: + 'background-color': @translateColor(lineHighlight) + buildScopeSelectorRulesets: (scopeSelectorSettings) -> for { name, scope, settings } in scopeSelectorSettings continue unless scope diff --git a/src/app/theme.coffee b/src/app/theme.coffee index 3c438b9b2..410add427 100644 --- a/src/app/theme.coffee +++ b/src/app/theme.coffee @@ -12,8 +12,7 @@ class Theme if fs.exists(name) path = name else - path = fs.resolve(config.themeDirPaths..., name) - path ?= fs.resolve(config.themeDirPaths..., name + ".tmTheme") + path = fs.resolve(config.themeDirPaths..., name, ['', '.tmTheme']) throw new Error("No theme exists named '#{name}'") unless path @@ -31,7 +30,7 @@ class Theme load: -> for stylesheetPath, stylesheetContent of @stylesheets - applyStylesheet(stylesheetPath, stylesheetContent) + applyStylesheet(stylesheetPath, stylesheetContent, 'userTheme') deactivate: -> for stylesheetPath, stylesheetContent of @stylesheets diff --git a/src/app/window.coffee b/src/app/window.coffee index 9e53ed5b6..d990b28a4 100644 --- a/src/app/window.coffee +++ b/src/app/window.coffee @@ -3,9 +3,7 @@ Native = require 'native' fs = require 'fs' -_ = require 'underscore' $ = require 'jquery' -{CoffeeScript} = require 'coffee-script' Config = require 'config' Syntax = require 'syntax' RootView = require 'root-view' @@ -70,18 +68,23 @@ windowAdditions = $("head style[id='#{id}']") requireStylesheet: (path) -> - unless fullPath = require.resolve(path) + if fullPath = require.resolve(path) + window.applyStylesheet(fullPath, fs.read(fullPath)) + unless fullPath throw new Error("Could not find a file at path '#{path}'") - window.applyStylesheet(fullPath, fs.read(fullPath)) removeStylesheet: (path) -> unless fullPath = require.resolve(path) throw new Error("Could not find a file at path '#{path}'") window.stylesheetElementForId(fullPath).remove() - applyStylesheet: (id, text) -> + applyStylesheet: (id, text, ttype = 'bundled') -> unless window.stylesheetElementForId(id).length - $('head').append "" + if $("head style.#{ttype}").length + $("head style.#{ttype}:last").after "" + else + $("head").append "" + reload: -> if rootView?.getModifiedBuffers().length > 0 diff --git a/src/packages/autocomplete/index.coffee b/src/packages/autocomplete/index.coffee index 5a86b1576..902c08e24 100644 --- a/src/packages/autocomplete/index.coffee +++ b/src/packages/autocomplete/index.coffee @@ -1 +1,6 @@ -module.exports = require 'autocomplete/src/autocomplete' +AtomPackage = require 'atom-package' +AutocompleteView = require './src/autocomplete-view' + +module.exports = +class Autocomplete extends AtomPackage + activate: (rootView) -> AutocompleteView.activate(rootView) diff --git a/src/packages/autocomplete/spec/autocomplete-spec.coffee b/src/packages/autocomplete/spec/autocomplete-spec.coffee index 9283e5b14..d9b2da85a 100644 --- a/src/packages/autocomplete/spec/autocomplete-spec.coffee +++ b/src/packages/autocomplete/spec/autocomplete-spec.coffee @@ -1,5 +1,5 @@ $ = require 'jquery' -Autocomplete = require 'autocomplete' +Autocomplete = require 'autocomplete/src/autocomplete-view' Buffer = require 'buffer' Editor = require 'editor' RootView = require 'root-view' @@ -11,6 +11,7 @@ describe "Autocomplete", -> beforeEach -> editor = new Editor(editSession: fixturesProject.buildEditSessionForPath('sample.js')) + atom.loadPackage('autocomplete') autocomplete = new Autocomplete(editor) miniEditor = autocomplete.miniEditor diff --git a/src/packages/autocomplete/src/autocomplete.coffee b/src/packages/autocomplete/src/autocomplete-view.coffee similarity index 97% rename from src/packages/autocomplete/src/autocomplete.coffee rename to src/packages/autocomplete/src/autocomplete-view.coffee index 47a0f5764..1e071ccf3 100644 --- a/src/packages/autocomplete/src/autocomplete.coffee +++ b/src/packages/autocomplete/src/autocomplete-view.coffee @@ -3,10 +3,10 @@ Range = require 'range' SelectList = require 'select-list' module.exports = -class Autocomplete extends SelectList +class AutocompleteView extends SelectList @activate: (rootView) -> rootView.eachEditor (editor) -> - new Autocomplete(editor) if editor.attached and not editor.mini + new AutocompleteView(editor) if editor.attached and not editor.mini @viewClass: -> "autocomplete #{super}" @@ -74,10 +74,10 @@ class Autocomplete extends SelectList @editor.setCursorBufferPosition([position.row, position.column + match.suffix.length]) cancelled: -> + super + @editor.abort() @editor.setSelectedBufferRange(@originalSelectionBufferRange) - - @miniEditor.setText('') @editor.rootView()?.focus() if @miniEditor.isFocused attach: -> diff --git a/src/packages/autocomplete/stylesheets/autocomplete.css b/src/packages/autocomplete/stylesheets/autocomplete.css index 7f6c17bdb..9142f6a5e 100644 --- a/src/packages/autocomplete/stylesheets/autocomplete.css +++ b/src/packages/autocomplete/stylesheets/autocomplete.css @@ -1,11 +1,6 @@ .select-list.autocomplete { - min-width: 150px; - border: 2px solid #222; - webkit-box-shadow: 0 0 3px 3px rgba(0, 0, 0, .5); box-sizing: content-box; margin-left: 0px; - width: auto; - -webkit-box-shadow: none; } .autocomplete ol { @@ -13,7 +8,3 @@ overflow-y: scroll; max-height: 200px; } - -.autocomplete ol li { - padding: 0.1em 0.2em; -} diff --git a/src/packages/autoflow/index.coffee b/src/packages/autoflow/index.coffee index 950ab2727..73b52d8ed 100644 --- a/src/packages/autoflow/index.coffee +++ b/src/packages/autoflow/index.coffee @@ -1 +1,36 @@ -module.exports = require './lib/autoflow' +AtomPackage = require 'atom-package' + +module.exports = +class Autoflow extends AtomPackage + activate: (rootView) -> + rootView.command 'autoflow:reflow-paragraph', '.editor', (e) => + @reflowParagraph(e.currentTargetView()) + + reflowParagraph: (editor) -> + if range = editor.getCurrentParagraphBufferRange() + editor.getBuffer().change(range, @reflow(editor.getTextInRange(range))) + + reflow: (text) -> + wrapColumn = config.get('editor.preferredLineLength') ? 80 + lines = [] + + currentLine = [] + currentLineLength = 0 + for segment in @segmentText(text.replace(/\n/g, ' ')) + if /\w/.test(segment) and + (currentLineLength + segment.length > wrapColumn) and + (currentLineLength > 0 or segment.length < wrapColumn) + lines.push(currentLine.join('')) + currentLine = [] + currentLineLength = 0 + currentLine.push(segment) + currentLineLength += segment.length + lines.push(currentLine.join('')) + + lines.join('\n').replace(/\s+\n/g, '\n') + + segmentText: (text) -> + segments = [] + re = /[\s]+|[^\s]+/g + segments.push(match[0]) while match = re.exec(text) + segments diff --git a/src/packages/autoflow/lib/autoflow.coffee b/src/packages/autoflow/lib/autoflow.coffee deleted file mode 100644 index a1dc9f73b..000000000 --- a/src/packages/autoflow/lib/autoflow.coffee +++ /dev/null @@ -1,33 +0,0 @@ -module.exports = - activate: (rootView) -> - rootView.command 'autoflow:reflow-paragraph', '.editor', (e) => - @reflowParagraph(e.currentTargetView()) - - reflowParagraph: (editor) -> - if range = editor.getCurrentParagraphBufferRange() - editor.getBuffer().change(range, @reflow(editor.getTextInRange(range))) - - reflow: (text) -> - wrapColumn = config.get('editor.preferredLineLength') ? 80 - lines = [] - - currentLine = [] - currentLineLength = 0 - for segment in @segmentText(text.replace(/\n/g, ' ')) - if /\w/.test(segment) and - (currentLineLength + segment.length > wrapColumn) and - (currentLineLength > 0 or segment.length < wrapColumn) - lines.push(currentLine.join('')) - currentLine = [] - currentLineLength = 0 - currentLine.push(segment) - currentLineLength += segment.length - lines.push(currentLine.join('')) - - lines.join('\n').replace(/\s+\n/g, '\n') - - segmentText: (text) -> - segments = [] - re = /[\s]+|[^\s]+/g - segments.push(match[0]) while match = re.exec(text) - segments diff --git a/src/packages/command-logger/index.coffee b/src/packages/command-logger/index.coffee index 4bff38c81..39dd9ad68 100644 --- a/src/packages/command-logger/index.coffee +++ b/src/packages/command-logger/index.coffee @@ -1 +1,10 @@ -module.exports = require 'command-logger/src/command-logger' +DeferredAtomPackage = require 'deferred-atom-package' + +module.exports = +class CommandLogger extends DeferredAtomPackage + + loadEvents: ['command-logger:toggle'] + + instanceClass: 'command-logger/src/command-logger-view' + + onLoadEvent: (event, instance) -> instance.toggle() diff --git a/src/packages/command-logger/spec/command-logger-spec.coffee b/src/packages/command-logger/spec/command-logger-spec.coffee index 1eaee9318..c01f24320 100644 --- a/src/packages/command-logger/spec/command-logger-spec.coffee +++ b/src/packages/command-logger/spec/command-logger-spec.coffee @@ -1,12 +1,12 @@ RootView = require 'root-view' -CommandLogger = require 'command-logger' +CommandLogger = require 'command-logger/src/command-logger-view' describe "CommandLogger", -> [rootView, commandLogger, editor] = [] beforeEach -> rootView = new RootView(require.resolve('fixtures/sample.js')) - atom.loadPackage 'command-logger' + atom.loadPackage('command-logger').getInstance() editor = rootView.getActiveEditor() commandLogger = CommandLogger.instance @@ -26,9 +26,13 @@ describe "CommandLogger", -> editor.trigger 'core:backspace' lastRun = commandLogger.eventLog['core:backspace'].lastRun expect(lastRun).toBeGreaterThan 0 - advanceClock(100) - editor.trigger 'core:backspace' - expect(commandLogger.eventLog['core:backspace'].lastRun).toBeGreaterThan lastRun + start = new Date().getTime() + waitsFor -> + new Date().getTime() > start + + runs -> + editor.trigger 'core:backspace' + expect(commandLogger.eventLog['core:backspace'].lastRun).toBeGreaterThan lastRun describe "when the data is cleared", -> it "removes all triggered events from the log", -> diff --git a/src/packages/command-logger/src/command-logger.coffee b/src/packages/command-logger/src/command-logger-view.coffee similarity index 97% rename from src/packages/command-logger/src/command-logger.coffee rename to src/packages/command-logger/src/command-logger-view.coffee index ebe1e7164..01496a2d0 100644 --- a/src/packages/command-logger/src/command-logger.coffee +++ b/src/packages/command-logger/src/command-logger-view.coffee @@ -4,9 +4,9 @@ $ = require 'jquery' _ = require 'underscore' module.exports = -class CommandLogger extends ScrollView +class CommandLoggerView extends ScrollView @activate: (rootView, state) -> - @instance = new CommandLogger(rootView, state?.eventLog) + @instance = new CommandLoggerView(rootView, state?.eventLog) @content: (rootView) -> @div class: 'command-logger', tabindex: -1, => @@ -34,7 +34,6 @@ class CommandLogger extends ScrollView initialize: (@rootView, @eventLog={}) -> super - @rootView.command 'command-logger:toggle', => @toggle() @rootView.command 'command-logger:clear-data', => @eventLog = {} @command 'core:cancel', => @detach() diff --git a/src/packages/command-logger/stylesheets/command-logger.css b/src/packages/command-logger/stylesheets/command-logger.css index 5e9f34ffa..87a21e502 100644 --- a/src/packages/command-logger/stylesheets/command-logger.css +++ b/src/packages/command-logger/stylesheets/command-logger.css @@ -4,34 +4,8 @@ height: 100%; top: 0px; left: 0px; - background: #1e1e1e; - color: #eee; overflow: auto; z-index: 99; - padding-top: 10px; - padding-bottom: 10px; -} - -.command-logger .category-header { - text-align: center; - padding-bottom: 5px; - font-size: 16px; -} - -.command-logger .category-summary { - text-align: center; - padding-bottom: 10px; - font-size: 12px; -} - -.command-logger .tree-map { - margin: auto; - background-color: #efefef; - border: 1px solid #999; -} - -body.command-logger-node-text { - background-color: transparent; } .command-logger-node-text div { @@ -42,8 +16,5 @@ body.command-logger-node-text { } .command-logger-node-text span { - font-size: 10px; - color: #fff; - text-shadow: #000 1px 1px 4px; -webkit-user-select: none; } diff --git a/src/packages/command-palette/index.coffee b/src/packages/command-palette/index.coffee index d097e0ea0..15d41efb5 100644 --- a/src/packages/command-palette/index.coffee +++ b/src/packages/command-palette/index.coffee @@ -1 +1,10 @@ -module.exports = require 'command-palette/src/command-palette' +DeferredAtomPackage = require 'deferred-atom-package' + +module.exports = +class CommandPalette extends DeferredAtomPackage + + loadEvents: ['command-palette:toggle'] + + instanceClass: 'command-palette/src/command-palette-view' + + onLoadEvent: (event, instance) -> instance.attach() diff --git a/src/packages/command-palette/spec/command-palette-spec.coffee b/src/packages/command-palette/spec/command-palette-spec.coffee index f95f2d7d3..2f62d1b7b 100644 --- a/src/packages/command-palette/spec/command-palette-spec.coffee +++ b/src/packages/command-palette/spec/command-palette-spec.coffee @@ -1,5 +1,5 @@ RootView = require 'root-view' -CommandPalette = require 'command-palette' +CommandPalette = require 'command-palette/src/command-palette-view' $ = require 'jquery' _ = require 'underscore' @@ -8,7 +8,7 @@ describe "CommandPalette", -> beforeEach -> rootView = new RootView(require.resolve('fixtures/sample.js')) - atom.loadPackage("command-palette") + atom.loadPackage("command-palette").getInstance() palette = CommandPalette.instance rootView.attachToDom().focus() rootView.trigger 'command-palette:toggle' diff --git a/src/packages/command-palette/src/command-palette.coffee b/src/packages/command-palette/src/command-palette-view.coffee similarity index 81% rename from src/packages/command-palette/src/command-palette.coffee rename to src/packages/command-palette/src/command-palette-view.coffee index 6ba7d7cae..d723afa54 100644 --- a/src/packages/command-palette/src/command-palette.coffee +++ b/src/packages/command-palette/src/command-palette-view.coffee @@ -4,10 +4,9 @@ $ = require 'jquery' _ = require 'underscore' module.exports = -class CommandPalette extends SelectList +class CommandPaletteView extends SelectList @activate: (rootView) -> - @instance = new CommandPalette(rootView) - rootView.command 'command-palette:toggle', => @instance.attach() + @instance = new CommandPaletteView(rootView) @viewClass: -> "#{super} command-palette" @@ -24,7 +23,8 @@ class CommandPalette extends SelectList super attach: -> - @previouslyFocusedElement = $(':focus') + super + @keyBindings = _.losslessInvert(keymap.bindingsForElement(@previouslyFocusedElement)) events = [] @@ -35,7 +35,6 @@ class CommandPalette extends SelectList @setArray(events) @appendTo(@rootView) - @miniEditor.setText('') @miniEditor.focus() itemForElement: ({eventName, eventDescription}) -> @@ -52,6 +51,3 @@ class CommandPalette extends SelectList confirmed: ({eventName}) -> @cancel() @previouslyFocusedElement.trigger(eventName) - - cancelled: -> - @previouslyFocusedElement.focus() if @miniEditor.isFocused diff --git a/src/packages/command-panel/index.coffee b/src/packages/command-panel/index.coffee index f3622c933..4f1a26c8a 100644 --- a/src/packages/command-panel/index.coffee +++ b/src/packages/command-panel/index.coffee @@ -1 +1,33 @@ -module.exports = require 'command-panel/src/command-panel' +DeferredAtomPackage = require 'deferred-atom-package' + +module.exports = +class CommandPanel extends DeferredAtomPackage + + loadEvents: [ + 'command-panel:toggle' + 'command-panel:toggle-preview' + 'command-panel:find-in-file' + 'command-panel:find-in-project' + 'command-panel:repeat-relative-address' + 'command-panel:repeat-relative-address-in-reverse' + 'command-panel:set-selection-as-regex-address' + ] + + instanceClass: 'command-panel/src/command-panel-view' + + onLoadEvent: (event, instance) -> + switch event.type + when 'command-panel:toggle' + instance.toggle() + when 'command-panel:toggle-preview' + instance.togglePreview() + when 'command-panel:find-in-file' + instance.attach("/") + when 'command-panel:find-in-project' + instance.attach("Xx/") + when 'command-panel:repeat-relative-address' + instance.repeatRelativeAddress() + when 'command-panel:repeat-relative-address-in-reverse' + instance.repeatRelativeAddressInReverse() + when 'command-panel:set-selection-as-regex-address' + instance.setSelectionAsLastRelativeAddress() diff --git a/src/packages/command-panel/spec/command-panel-spec.coffee b/src/packages/command-panel/spec/command-panel-spec.coffee index 500b401e9..635613912 100644 --- a/src/packages/command-panel/spec/command-panel-spec.coffee +++ b/src/packages/command-panel/spec/command-panel-spec.coffee @@ -1,9 +1,9 @@ RootView = require 'root-view' -CommandPanel = require 'command-panel' +CommandPanelView = require 'command-panel/src/command-panel-view' _ = require 'underscore' describe "CommandPanel", -> - [rootView, editor, buffer, commandPanel, project] = [] + [rootView, editor, buffer, commandPanel, project, CommandPanel] = [] beforeEach -> rootView = new RootView @@ -12,8 +12,8 @@ describe "CommandPanel", -> project = rootView.project editor = rootView.getActiveEditor() buffer = editor.activeEditSession.buffer - atom.loadPackage('command-panel') - commandPanel = CommandPanel.instance + CommandPanel = atom.loadPackage('command-panel') + commandPanel = CommandPanel.getInstance() commandPanel.history = [] commandPanel.historyIndex = 0 @@ -36,7 +36,7 @@ describe "CommandPanel", -> rootView.deactivate() rootView2.attachToDom() - commandPanel = rootView2.activatePackage('command-panel', CommandPanel) + commandPanel = rootView2.activatePackage('command-panel', CommandPanel).getInstance() expect(rootView2.find('.command-panel')).toExist() expect(commandPanel.miniEditor.getText()).toBe 'abc' expect(commandPanel.miniEditor.isFocused).toBeTruthy() @@ -49,7 +49,7 @@ describe "CommandPanel", -> rootView3 = RootView.deserialize(rootView2.serialize()) rootView2.deactivate() rootView3.attachToDom() - commandPanel = rootView3.activatePackage('command-panel', CommandPanel) + commandPanel = rootView3.activatePackage('command-panel', CommandPanel).getInstance() expect(commandPanel.miniEditor.isFocused).toBeFalsy() rootView3.deactivate() @@ -71,7 +71,7 @@ describe "CommandPanel", -> rootView.deactivate() rootView2.attachToDom() - commandPanel = rootView2.activatePackage('command-panel', CommandPanel) + commandPanel = rootView2.activatePackage('command-panel', CommandPanel).getInstance() expect(commandPanel.history.length).toBe(2) expect(commandPanel.history[0]).toBe('/test2') expect(commandPanel.history[1]).toBe('/test3') @@ -180,17 +180,19 @@ describe "CommandPanel", -> expect(commandPanel.hasParent()).toBeTruthy() describe "when the mini editor is focused", -> - it "retains focus on the mini editor and does not show the preview list", -> + it "retains focus on the mini editor and does not show the preview list or preview count", -> expect(commandPanel.miniEditor.isFocused).toBeTruthy() rootView.trigger 'command-panel:toggle-preview' expect(commandPanel.previewList).toBeHidden() + expect(commandPanel.previewCount).toBeHidden() expect(commandPanel.miniEditor.isFocused).toBeTruthy() describe "when the mini editor is not focused", -> - it "focuses the mini editor and does not show the preview list", -> + it "focuses the mini editor and does not show the preview list or preview count", -> rootView.focus() rootView.trigger 'command-panel:toggle-preview' expect(commandPanel.previewList).toBeHidden() + expect(commandPanel.previewCount).toBeHidden() expect(commandPanel.miniEditor.isFocused).toBeTruthy() describe "when the command panel is not visible", -> @@ -297,7 +299,7 @@ describe "CommandPanel", -> expect(commandPanel.previewList).toBeVisible() expect(commandPanel.previewList).toMatchSelector ':focus' previewItem = commandPanel.previewList.find("li:contains(sample.js):first") - expect(previewItem.text()).toBe "sample.js" + expect(previewItem.text()).toBe "sample.js(1)" expect(previewItem.next().find('.preview').text()).toBe "var quicksort = function () {" expect(previewItem.next().find('.preview > .match').text()).toBe "quicksort" @@ -341,7 +343,7 @@ describe "CommandPanel", -> expect(commandPanel.errorMessages).not.toBeVisible() - describe "when the command contains an escaped charachter", -> + describe "when the command contains an escaped character", -> it "executes the command with the escaped character (instead of as a backslash followed by the character)", -> rootView.trigger 'command-panel:toggle' @@ -377,6 +379,10 @@ describe "CommandPanel", -> rootView.trigger 'command-panel:toggle' waitsForPromise -> commandPanel.execute('X x/sort/') + it "displays the number of files and operations", -> + rootView.attachToDom() + expect(commandPanel.previewCount.text()).toBe '17 matches in 4 files' + describe "when move-down and move-up are triggered on the preview list", -> it "selects the next/previous operation (if there is one), and scrolls the list if needed", -> rootView.attachToDom() @@ -405,28 +411,15 @@ describe "CommandPanel", -> previewList.trigger 'core:move-down' expect(previewList.scrollTop()).toBe 0 - it "wraps around when the list is at the beginning or end", -> - rootView.attachToDom() - expect(previewList.find('li.operation:eq(0)')).toHaveClass 'selected' - expect(previewList.getSelectedOperation()).toBe previewList.getOperations()[0] - - previewList.trigger 'core:move-up' - expect(previewList.find('li.operation:last')).toHaveClass 'selected' - expect(previewList.getSelectedOperation()).toBe _.last(previewList.getOperations()) - - previewList.trigger 'core:move-down' - expect(previewList.find('li.operation:eq(0)')).toHaveClass 'selected' - expect(previewList.getSelectedOperation()).toBe previewList.getOperations()[0] - it "doesn't bubble up the event and the command panel text doesn't change", -> rootView.attachToDom() commandPanel.miniEditor.setText "command" previewList.focus() previewList.trigger 'core:move-up' - expect(previewList.find('li.operation:last')).toHaveClass 'selected' + expect(previewList.find('li.operation:eq(0)')).toHaveClass 'selected' expect(commandPanel.miniEditor.getText()).toBe 'command' previewList.trigger 'core:move-down' - expect(previewList.find('li.operation:eq(0)')).toHaveClass 'selected' + expect(previewList.find('li.operation:eq(1)')).toHaveClass 'selected' expect(commandPanel.miniEditor.getText()).toBe 'command' describe "when move-to-top and move-to-bottom are triggered on the preview list", -> diff --git a/src/packages/command-panel/src/command-panel.coffee b/src/packages/command-panel/src/command-panel-view.coffee similarity index 79% rename from src/packages/command-panel/src/command-panel.coffee rename to src/packages/command-panel/src/command-panel-view.coffee index 05db2a1ba..7ccb74a48 100644 --- a/src/packages/command-panel/src/command-panel.coffee +++ b/src/packages/command-panel/src/command-panel-view.coffee @@ -9,30 +9,22 @@ Editor = require 'editor' _ = require 'underscore' module.exports = -class CommandPanel extends View +class CommandPanelView extends View @activate: (rootView, state) -> if state? - @instance = CommandPanel.deserialize(state, rootView) + @instance = @deserialize(state, rootView) else - @instance = new CommandPanel(rootView) - - @deactivate: -> - @instance.destroy() - - @serialize: -> - text: @instance.miniEditor.getText() - visible: @instance.hasParent() - miniEditorFocused: @instance.miniEditor.isFocused - history: @instance.history[-@instance.maxSerializedHistorySize..] + @instance = new CommandPanelView(rootView) @deserialize: (state, rootView) -> - commandPanel = new CommandPanel(rootView, state.history) + commandPanel = new CommandPanelView(rootView, state.history) commandPanel.attach(state.text, focus: false) if state.visible commandPanel.miniEditor.focus() if state.miniEditorFocused commandPanel @content: (rootView) -> @div class: 'command-panel tool-panel', => + @div outlet: 'previewCount', class: 'preview-count' @subview 'previewList', new PreviewList(rootView) @ul class: 'error-messages', outlet: 'errorMessages' @div class: 'prompt-and-editor', => @@ -53,22 +45,22 @@ class CommandPanel extends View @command 'tool-panel:unfocus', => @rootView.focus() @command 'core:close', => @detach(); false @command 'core:confirm', => @execute() - - @rootView.command 'command-panel:toggle', => @toggle() - @rootView.command 'command-panel:toggle-preview', => @togglePreview() - @rootView.command 'command-panel:find-in-file', => @attach("/") - @rootView.command 'command-panel:find-in-project', => @attach("Xx/") - @rootView.command 'command-panel:repeat-relative-address', => @repeatRelativeAddress() - @rootView.command 'command-panel:repeat-relative-address-in-reverse', => @repeatRelativeAddressInReverse() - @rootView.command 'command-panel:set-selection-as-regex-address', => @setSelectionAsLastRelativeAddress() - @command 'core:move-up', => @navigateBackwardInHistory() @command 'core:move-down', => @navigateForwardInHistory() @previewList.hide() + @previewCount.hide() @errorMessages.hide() @prompt.iconSize(@miniEditor.fontSize) + serialize: -> + text: @miniEditor.getText() + visible: @hasParent() + miniEditorFocused: @miniEditor.isFocused + history: @history[-@maxSerializedHistorySize..] + + deactivate: -> @destroy() + destroy: -> @previewList.destroy() @@ -83,12 +75,14 @@ class CommandPanel extends View togglePreview: -> if @previewList.is(':focus') @previewList.hide() + @previewCount.hide() @detach() @rootView.focus() else @attach() unless @hasParent() if @previewList.hasOperations() @previewList.show().focus() + @previewCount.show() else @miniEditor.focus() @@ -104,6 +98,7 @@ class CommandPanel extends View detach: -> @rootView.focus() @previewList.hide() + @previewCount.hide() super escapedCommand: -> @@ -125,6 +120,7 @@ class CommandPanel extends View else if operationsToPreview?.length @previewList.populate(operationsToPreview) @previewList.focus() + @previewCount.text("#{_.pluralize(operationsToPreview.length, 'match', 'matches')} in #{_.pluralize(@previewList.getPathCount(), 'file')}").show() else @detach() catch error diff --git a/src/packages/command-panel/src/preview-list.coffee b/src/packages/command-panel/src/preview-list.coffee index 44280eac5..34cbd240c 100644 --- a/src/packages/command-panel/src/preview-list.coffee +++ b/src/packages/command-panel/src/preview-list.coffee @@ -34,7 +34,9 @@ class PreviewList extends ScrollView operation.index = index for operation, index in operations operationsByPath = _.groupBy(operations, (operation) -> operation.getPath()) for path, ops of operationsByPath - @li path, class: 'path' + @li class: 'path', => + @span path + @span "(#{ops.length})", class: 'path-match-number' for operation in ops {prefix, suffix, match, range} = operation.preview() @li 'data-index': operation.index, class: 'operation', => @@ -56,16 +58,10 @@ class PreviewList extends ScrollView lineNumbers.width(maxWidth) selectNextOperation: -> - if @selectedOperationIndex is @operations.length - 1 - @setSelectedOperationIndex(0) - else - @setSelectedOperationIndex(@selectedOperationIndex + 1) + @setSelectedOperationIndex(@selectedOperationIndex + 1) selectPreviousOperation: -> - if @selectedOperationIndex is 0 - @setSelectedOperationIndex(@operations.length - 1) - else - @setSelectedOperationIndex(@selectedOperationIndex - 1) + @setSelectedOperationIndex(@selectedOperationIndex - 1) setSelectedOperationIndex: (index, scrollToOperation=true) -> index = Math.max(0, index) @@ -90,6 +86,9 @@ class PreviewList extends ScrollView @rootView.focus() false + getPathCount: -> + _.keys(_.groupBy(@operations, (operation) -> operation.getPath())).length + getOperations: -> new Array(@operations...) diff --git a/src/packages/fuzzy-finder/index.coffee b/src/packages/fuzzy-finder/index.coffee index 3dd4e515f..1d815057e 100644 --- a/src/packages/fuzzy-finder/index.coffee +++ b/src/packages/fuzzy-finder/index.coffee @@ -1 +1,21 @@ -module.exports = require 'fuzzy-finder/src/fuzzy-finder' +DeferredAtomPackage = require 'deferred-atom-package' + +module.exports = +class FuzzyFinder extends DeferredAtomPackage + + loadEvents: [ + 'fuzzy-finder:toggle-file-finder' + 'fuzzy-finder:toggle-buffer-finder' + 'fuzzy-finder:find-under-cursor' + ] + + instanceClass: 'fuzzy-finder/src/fuzzy-finder-view' + + onLoadEvent: (event, instance) -> + switch event.type + when 'fuzzy-finder:toggle-file-finder' + instance.toggleFileFinder() + when 'fuzzy-finder:toggle-buffer-finder' + instance.toggleBufferFinder() + when 'fuzzy-finder:find-under-cursor' + instance.findUnderCursor() diff --git a/src/packages/fuzzy-finder/keymaps/fuzzy-finder.cson b/src/packages/fuzzy-finder/keymaps/fuzzy-finder.cson index fca322bed..c4267c9e2 100644 --- a/src/packages/fuzzy-finder/keymaps/fuzzy-finder.cson +++ b/src/packages/fuzzy-finder/keymaps/fuzzy-finder.cson @@ -1,3 +1,4 @@ 'body': 'meta-t': 'fuzzy-finder:toggle-file-finder' 'meta-b': 'fuzzy-finder:toggle-buffer-finder' + 'ctrl-.': 'fuzzy-finder:find-under-cursor' diff --git a/src/packages/fuzzy-finder/spec/fuzzy-finder-spec.coffee b/src/packages/fuzzy-finder/spec/fuzzy-finder-spec.coffee index 4453b2602..ad40e0010 100644 --- a/src/packages/fuzzy-finder/spec/fuzzy-finder-spec.coffee +++ b/src/packages/fuzzy-finder/spec/fuzzy-finder-spec.coffee @@ -1,5 +1,5 @@ RootView = require 'root-view' -FuzzyFinder = require 'fuzzy-finder' +FuzzyFinder = require 'fuzzy-finder/src/fuzzy-finder-view' $ = require 'jquery' {$$} = require 'space-pen' fs = require 'fs' @@ -10,7 +10,7 @@ describe 'FuzzyFinder', -> beforeEach -> rootView = new RootView(require.resolve('fixtures/sample.js')) rootView.enableKeymap() - atom.loadPackage("fuzzy-finder") + atom.loadPackage("fuzzy-finder").getInstance() finder = FuzzyFinder.instance afterEach -> @@ -187,21 +187,38 @@ describe 'FuzzyFinder', -> describe "common behavior between file and buffer finder", -> describe "when the fuzzy finder is cancelled", -> - it "detaches the finder and focuses the previously focused element", -> - rootView.attachToDom() - activeEditor = rootView.getActiveEditor() - activeEditor.focus() + describe "when an editor is open", -> + it "detaches the finder and focuses the previously focused element", -> + rootView.attachToDom() + activeEditor = rootView.getActiveEditor() + activeEditor.focus() - rootView.trigger 'fuzzy-finder:toggle-file-finder' - expect(finder.hasParent()).toBeTruthy() - expect(activeEditor.isFocused).toBeFalsy() - expect(finder.miniEditor.isFocused).toBeTruthy() + rootView.trigger 'fuzzy-finder:toggle-file-finder' + expect(finder.hasParent()).toBeTruthy() + expect(activeEditor.isFocused).toBeFalsy() + expect(finder.miniEditor.isFocused).toBeTruthy() - finder.cancel() + finder.cancel() - expect(finder.hasParent()).toBeFalsy() - expect(activeEditor.isFocused).toBeTruthy() - expect(finder.miniEditor.isFocused).toBeFalsy() + expect(finder.hasParent()).toBeFalsy() + expect(activeEditor.isFocused).toBeTruthy() + expect(finder.miniEditor.isFocused).toBeFalsy() + + describe "when no editors are open", -> + it "detaches the finder and focuses the previously focused element", -> + rootView.attachToDom() + rootView.getActiveEditor().destroyActiveEditSession() + + rootView.trigger 'fuzzy-finder:toggle-file-finder' + expect(finder.hasParent()).toBeTruthy() + expect(rootView.isFocused).toBeFalsy() + expect(finder.miniEditor.isFocused).toBeTruthy() + + finder.cancel() + + expect(finder.hasParent()).toBeFalsy() + expect($(document.activeElement).view()).toBe rootView + expect(finder.miniEditor.isFocused).toBeFalsy() describe "cached file paths", -> it "caches file paths after first time", -> @@ -270,6 +287,65 @@ describe 'FuzzyFinder', -> runs -> expect(finder.list.find("li:contains(tree-view.js)")).not.toExist() + describe "fuzzy find by content under cursor", -> + editor = null + + beforeEach -> + editor = rootView.getActiveEditor() + rootView.attachToDom() + spyOn(rootView.project, "getFilePaths").andCallThrough() + + it "opens the fuzzy finder window when there are multiple matches", -> + editor.setText("sample") + rootView.trigger 'fuzzy-finder:find-under-cursor' + + waitsFor -> + finder.list.children('li').length > 0 + + runs -> + expect(finder).toBeVisible() + expect(rootView.find('.fuzzy-finder input:focus')).toExist() + + it "opens a file directly when there is a single match", -> + editor.setText("sample.txt") + rootView.trigger 'fuzzy-finder:find-under-cursor' + + openedPath = null + spyOn(rootView, "open").andCallFake (path) -> + openedPath = path + + waitsFor -> + openedPath != null + + runs -> + expect(finder).not.toBeVisible() + expect(openedPath).toBe "sample.txt" + + it "displays error when the word under the cursor doesn't match any files", -> + editor.setText("moogoogaipan") + editor.setCursorBufferPosition([0,5]) + + rootView.trigger 'fuzzy-finder:find-under-cursor' + + waitsFor -> + finder.is(':visible') + + runs -> + expect(finder.find('.error').text().length).toBeGreaterThan 0 + + it "displays error when there is no word under the cursor", -> + editor.setText("&&&&&&&&&&&&&&& sample") + editor.setCursorBufferPosition([0,5]) + + rootView.trigger 'fuzzy-finder:find-under-cursor' + + waitsFor -> + finder.is(':visible') + + runs -> + expect(finder.find('.error').text().length).toBeGreaterThan 0 + + describe "opening a path into a split", -> beforeEach -> rootView.attachToDom() diff --git a/src/packages/fuzzy-finder/src/fuzzy-finder.coffee b/src/packages/fuzzy-finder/src/fuzzy-finder-view.coffee similarity index 69% rename from src/packages/fuzzy-finder/src/fuzzy-finder.coffee rename to src/packages/fuzzy-finder/src/fuzzy-finder-view.coffee index 44a9aa17a..2365fc4d7 100644 --- a/src/packages/fuzzy-finder/src/fuzzy-finder.coffee +++ b/src/packages/fuzzy-finder/src/fuzzy-finder-view.coffee @@ -5,11 +5,11 @@ $ = require 'jquery' fs = require 'fs' module.exports = -class FuzzyFinder extends SelectList +class FuzzyFinderView extends SelectList + filenameRegex: /[\w\.\-\/\\]+/ + @activate: (rootView) -> - @instance = new FuzzyFinder(rootView) - rootView.command 'fuzzy-finder:toggle-file-finder', => @instance.toggleFileFinder() - rootView.command 'fuzzy-finder:toggle-buffer-finder', => @instance.toggleBufferFinder() + @instance = new FuzzyFinderView(rootView) @viewClass: -> [super, 'fuzzy-finder'].join(' ') @@ -72,10 +72,6 @@ class FuzzyFinder extends SelectList @setError('Selected path does not exist') setTimeout((=> @setError()), 2000) - cancelled: -> - @miniEditor.setText('') - @rootView.focus() if @miniEditor.isFocused - toggleFileFinder: -> if @hasParent() @cancel() @@ -93,9 +89,39 @@ class FuzzyFinder extends SelectList @populateOpenBufferPaths() @attach() if @paths?.length - populateProjectPaths: -> + findUnderCursor: -> + if @hasParent() + @cancel() + else + return unless @rootView.project.getPath()? + @allowActiveEditorChange = false + editor = @rootView.getActiveEditor() + currentWord = editor.getWordUnderCursor(wordRegex: @filenameRegex) + + if currentWord.length == 0 + @attach() + @setError("The cursor is not over a filename") + else + @populateProjectPaths filter: currentWord, done: (paths) => + if paths.length == 0 + @attach() + @setError("No files match '#{currentWord}'") + else if paths.length == 1 + @rootView.open(paths[0]) + else + @attach() + @miniEditor.setText(currentWord) + + populateProjectPaths: (options = {}) -> if @projectPaths?.length > 0 - @setArray(@projectPaths) + listedItems = + if options.filter? + @projectPaths.filter (path) -> + path.indexOf(options.filter) >= 0 + else + @projectPaths + @setArray(listedItems) + options.done(listedItems) if options.done? else @setLoading("Indexing...") @@ -111,7 +137,15 @@ class FuzzyFinder extends SelectList return true @reloadProjectPaths = false - @setArray(@projectPaths) + listedItems = + if options.filter? + @projectPaths.filter (path) -> + path.indexOf(options.filter) >= 0 + else + @projectPaths + + @setArray(listedItems) + options.done(listedItems) if options.done? populateOpenBufferPaths: -> @paths = @rootView.getOpenBufferPaths().map (path) => @@ -119,5 +153,7 @@ class FuzzyFinder extends SelectList @setArray(@paths) attach: -> + super + @rootView.append(this) @miniEditor.focus() diff --git a/src/packages/gists/index.coffee b/src/packages/gists/index.coffee new file mode 100644 index 000000000..6205cb366 --- /dev/null +++ b/src/packages/gists/index.coffee @@ -0,0 +1,12 @@ +DeferredAtomPackage = require 'deferred-atom-package' + +module.exports = +class GistsPackage extends DeferredAtomPackage + + loadEvents: + 'gist:create': '.editor' + + instanceClass: 'gists/lib/gists' + + onLoadEvent: (event, instance) -> + instance.createGist(event.currentTargetView()) diff --git a/src/packages/gists/keymaps/gists.cson b/src/packages/gists/keymaps/gists.cson new file mode 100644 index 000000000..fa7699100 --- /dev/null +++ b/src/packages/gists/keymaps/gists.cson @@ -0,0 +1,2 @@ +'body': + 'alt-meta-g': 'gist:create' diff --git a/src/packages/gists/lib/gists.coffee b/src/packages/gists/lib/gists.coffee new file mode 100644 index 000000000..434603636 --- /dev/null +++ b/src/packages/gists/lib/gists.coffee @@ -0,0 +1,31 @@ +$ = require 'jquery' +{$$} = require 'space-pen' + +module.exports = +class Gists + + @activate: (rootView) -> new Gists(rootView) + + constructor: (@rootView) -> + + createGist: (editor) -> + gist = { public: false, files: {} } + gist.files[editor.getBuffer().getBaseName()] = + content: editor.getSelectedText() or editor.getText() + + $.ajax + url: 'https://api.github.com/gists' + type: 'POST' + dataType: 'json' + contentType: 'application/json; charset=UTF-8' + data: JSON.stringify(gist) + success: (response) => + pasteboard.write(response.html_url) + notification = $$ -> + @div class: 'gist-notification', => + @div class: 'message-area', => + @span "Gist #{response.id} created", class: 'message' + @br() + @span "The url is on your clipboard", class: 'clipboard' + @rootView.append(notification.hide()) + notification.fadeIn().delay(2000).fadeOut(complete: -> $(this).remove()) diff --git a/src/packages/gists/spec/gists-spec.coffee b/src/packages/gists/spec/gists-spec.coffee new file mode 100644 index 000000000..64227744a --- /dev/null +++ b/src/packages/gists/spec/gists-spec.coffee @@ -0,0 +1,61 @@ +RootView = require 'root-view' +$ = require 'jquery' + +describe "Gists package", -> + + [rootView, editor] = [] + + beforeEach -> + rootView = new RootView(fixturesProject.resolve('sample.js')) + atom.loadPackage('gists').getInstance() + editor = rootView.getActiveEditor() + spyOn($, 'ajax') + + afterEach -> + rootView.deactivate() + + describe "when gist:create is triggered on an editor", -> + + describe "when the editor has no selection", -> + [request, originalFxOffValue] = [] + + beforeEach -> + originalFxOffValue = $.fx.off + $.fx.off = true + editor.trigger 'gist:create' + expect($.ajax).toHaveBeenCalled() + request = $.ajax.argsForCall[0][0] + + afterEach -> + $.fx.off = originalFxOffValue + + it "creates an Ajax request to api.github.com with the entire buffer contents as the Gist's content", -> + expect(request.url).toBe 'https://api.github.com/gists' + expect(request.type).toBe 'POST' + requestData = JSON.parse(request.data) + expect(requestData.public).toBeFalsy() + expect(requestData.files).toEqual 'sample.js': content: editor.getText() + + describe "when the server responds successfully", -> + beforeEach -> + request.success(html_url: 'https://gist.github.com/1', id: '1') + + it "places the created Gist's URL on the clipboard", -> + expect(pasteboard.read()[0]).toBe 'https://gist.github.com/1' + + it "flashes that the Gist was created", -> + expect(rootView.find('.gist-notification')).toExist() + expect(rootView.find('.gist-notification .message').text()).toBe 'Gist 1 created' + advanceClock(2000) + expect(rootView.find('.gist-notification')).not.toExist() + + describe "when the editor has a selection", -> + beforeEach -> + editor.setSelectedBufferRange [[4, 0], [8, 0]] + + it "creates an Ajax with the selected text as the Gist's content", -> + editor.trigger 'gist:create' + expect($.ajax).toHaveBeenCalled() + request = $.ajax.argsForCall[0][0] + requestData = JSON.parse(request.data) + expect(requestData.files).toEqual 'sample.js': content: editor.getSelectedText() diff --git a/src/packages/go-to-line/index.coffee b/src/packages/go-to-line/index.coffee new file mode 100644 index 000000000..12601c00e --- /dev/null +++ b/src/packages/go-to-line/index.coffee @@ -0,0 +1,12 @@ +DeferredAtomPackage = require 'deferred-atom-package' + +module.exports = +class GoToLinePackage extends DeferredAtomPackage + + loadEvents: + 'editor:go-to-line': '.editor' + + instanceClass: 'go-to-line/lib/go-to-line-view' + + onLoadEvent: (event, instance) -> + instance.toggle(event.currentTargetView()) diff --git a/src/packages/go-to-line/keymaps/go-to-line.cson b/src/packages/go-to-line/keymaps/go-to-line.cson new file mode 100644 index 000000000..5686829bd --- /dev/null +++ b/src/packages/go-to-line/keymaps/go-to-line.cson @@ -0,0 +1,6 @@ +'body': + 'meta-l': 'editor:go-to-line' +'.go-to-line .mini.editor input': + 'enter': 'core:confirm', + 'escape': 'core:cancel' + 'meta-w': 'core:cancel' diff --git a/src/packages/go-to-line/lib/go-to-line-view.coffee b/src/packages/go-to-line/lib/go-to-line-view.coffee new file mode 100644 index 000000000..ce99ece31 --- /dev/null +++ b/src/packages/go-to-line/lib/go-to-line-view.coffee @@ -0,0 +1,54 @@ +{View} = require 'space-pen' +Editor = require 'editor' +$ = require 'jquery' +Point = require 'point' + +module.exports = +class GoToLineView extends View + + @activate: (rootView) -> new GoToLineView(rootView) + + @content: -> + @div class: 'go-to-line', => + @subview 'miniEditor', new Editor(mini: true) + @div class: 'message', outlet: 'message' + + initialize: (@rootView) -> + @miniEditor.on 'focusout', => @detach() + @on 'core:confirm', => @confirm() + @on 'core:cancel', => @detach() + + @miniEditor.preempt 'textInput', (e) => + false unless e.originalEvent.data.match(/[0-9]/) + + toggle: -> + if @hasParent() + @detach() + else + @attach() + + detach: -> + return unless @hasParent() + + @miniEditor.setText('') + @previouslyFocusedElement?.focus() + + super + + confirm: -> + lineNumber = @miniEditor.getText() + editor = rootView.getActiveEditor() + + @detach() + + return unless editor and lineNumber.length + position = new Point(parseInt(lineNumber - 1, 0)) + editor.scrollToBufferPosition(position, center: true) + editor.setCursorBufferPosition(position) + editor.moveCursorToFirstCharacterOfLine() + + attach: -> + @previouslyFocusedElement = $(':focus') + @rootView.append(this) + @message.text("Enter a line number 1-#{@rootView.getActiveEditor().getLineCount()}") + @miniEditor.focus() diff --git a/src/packages/go-to-line/spec/go-to-line-spec.coffee b/src/packages/go-to-line/spec/go-to-line-spec.coffee new file mode 100644 index 000000000..775bde131 --- /dev/null +++ b/src/packages/go-to-line/spec/go-to-line-spec.coffee @@ -0,0 +1,51 @@ +RootView = require 'root-view' + +describe 'GoToLine', -> + [rootView, goToLine, editor] = [] + + beforeEach -> + rootView = new RootView(require.resolve('fixtures/sample.js')) + rootView.enableKeymap() + goToLine = atom.loadPackage("go-to-line").getInstance() + editor = rootView.getActiveEditor() + editor.setCursorBufferPosition([1,0]) + + afterEach -> + rootView.remove() + + describe "when editor:go-to-line is triggered", -> + it "attaches to the root view", -> + expect(goToLine.hasParent()).toBeFalsy() + editor.trigger 'editor:go-to-line' + expect(goToLine.hasParent()).toBeTruthy() + + describe "when entering a line number", -> + it "only allows 0-9 to be entered in the mini editor", -> + expect(goToLine.miniEditor.getText()).toBe '' + goToLine.miniEditor.textInput 'a' + expect(goToLine.miniEditor.getText()).toBe '' + goToLine.miniEditor.textInput '40' + expect(goToLine.miniEditor.getText()).toBe '40' + + describe "when core:confirm is triggered", -> + describe "when a line number has been entered", -> + it "moves the cursor to the first character of the line", -> + goToLine.miniEditor.textInput '3' + goToLine.miniEditor.trigger 'core:confirm' + expect(editor.getCursorBufferPosition()).toEqual [2, 4] + + describe "when no line number has been entered", -> + it "closes the view and does not update the cursor position", -> + editor.trigger 'editor:go-to-line' + expect(goToLine.hasParent()).toBeTruthy() + goToLine.miniEditor.trigger 'core:confirm' + expect(goToLine.hasParent()).toBeFalsy() + expect(editor.getCursorBufferPosition()).toEqual [1, 0] + + describe "when core:cancel is triggered", -> + it "closes the view and does not update the cursor position", -> + editor.trigger 'editor:go-to-line' + expect(goToLine.hasParent()).toBeTruthy() + goToLine.miniEditor.trigger 'core:cancel' + expect(goToLine.hasParent()).toBeFalsy() + expect(editor.getCursorBufferPosition()).toEqual [1, 0] diff --git a/src/packages/markdown-preview/index.coffee b/src/packages/markdown-preview/index.coffee index 5dca810d4..7cbba03f0 100644 --- a/src/packages/markdown-preview/index.coffee +++ b/src/packages/markdown-preview/index.coffee @@ -1 +1,9 @@ -module.exports = require 'markdown-preview/src/markdown-preview' +DeferredAtomPackage = require 'deferred-atom-package' + +module.exports = +class MarkdownPreview extends DeferredAtomPackage + loadEvents: ['markdown-preview:toggle'] + + instanceClass: 'markdown-preview/src/markdown-preview-view' + + onLoadEvent: (event, instance) -> instance.toggle() diff --git a/src/packages/markdown-preview/spec/markdown-preview-spec.coffee b/src/packages/markdown-preview/spec/markdown-preview-spec.coffee index aff38972b..575990c57 100644 --- a/src/packages/markdown-preview/spec/markdown-preview-spec.coffee +++ b/src/packages/markdown-preview/spec/markdown-preview-spec.coffee @@ -1,13 +1,13 @@ $ = require 'jquery' RootView = require 'root-view' -MarkdownPreview = require 'markdown-preview' +MarkdownPreview = require 'markdown-preview/src/markdown-preview-view' describe "MarkdownPreview", -> [rootView, markdownPreview] = [] beforeEach -> rootView = new RootView(require.resolve('fixtures/markdown')) - atom.loadPackage("markdown-preview") + atom.loadPackage("markdown-preview").getInstance() markdownPreview = MarkdownPreview.instance afterEach -> diff --git a/src/packages/markdown-preview/src/markdown-preview.coffee b/src/packages/markdown-preview/src/markdown-preview-view.coffee similarity index 94% rename from src/packages/markdown-preview/src/markdown-preview.coffee rename to src/packages/markdown-preview/src/markdown-preview-view.coffee index 88a39c2f6..d7fb9fc6c 100644 --- a/src/packages/markdown-preview/src/markdown-preview.coffee +++ b/src/packages/markdown-preview/src/markdown-preview-view.coffee @@ -4,7 +4,7 @@ $ = require 'jquery' {$$$} = require 'space-pen' module.exports = -class MarkdownPreview extends ScrollView +class MarkdownPreviewView extends ScrollView @activate: (rootView, state) -> @instance = new this(rootView) @@ -14,7 +14,6 @@ class MarkdownPreview extends ScrollView initialize: (@rootView) -> super - @rootView.command 'markdown-preview:toggle', => @toggle() @command 'core:cancel', => @detach() toggle: -> diff --git a/src/packages/outline-view/index.coffee b/src/packages/outline-view/index.coffee deleted file mode 100644 index 049aa16ea..000000000 --- a/src/packages/outline-view/index.coffee +++ /dev/null @@ -1 +0,0 @@ -module.exports = require 'outline-view/src/outline-view' diff --git a/src/packages/outline-view/keymaps/outline-view.cson b/src/packages/outline-view/keymaps/outline-view.cson deleted file mode 100644 index e47463687..000000000 --- a/src/packages/outline-view/keymaps/outline-view.cson +++ /dev/null @@ -1,6 +0,0 @@ -'.editor': - 'meta-j': 'outline-view:toggle-file-outline' - 'meta-.': 'outline-view:jump-to-declaration' - -'body': - 'meta-J': 'outline-view:toggle-project-outline' diff --git a/src/packages/outline-view/spec/outline-view-spec.coffee b/src/packages/outline-view/spec/outline-view-spec.coffee deleted file mode 100644 index e74981663..000000000 --- a/src/packages/outline-view/spec/outline-view-spec.coffee +++ /dev/null @@ -1,174 +0,0 @@ -RootView = require 'root-view' -OutlineView = require 'outline-view' -TagGenerator = require 'outline-view/src/tag-generator' - -describe "OutlineView", -> - [rootView, outlineView, setArraySpy] = [] - - beforeEach -> - rootView = new RootView(require.resolve('fixtures')) - atom.loadPackage("outline-view") - outlineView = OutlineView.instance - rootView.attachToDom() - setArraySpy = spyOn(outlineView, 'setArray').andCallThrough() - - afterEach -> - rootView.deactivate() - setArraySpy.reset() - - describe "when tags can be generated for a file", -> - it "initially displays all JavaScript functions with line numbers", -> - rootView.open('sample.js') - expect(rootView.find('.outline-view')).not.toExist() - rootView.getActiveEditor().trigger "outline-view:toggle-file-outline" - expect(outlineView.find('.loading')).toHaveText 'Generating symbols...' - - waitsFor -> - setArraySpy.callCount > 0 - - runs -> - expect(outlineView.find('.loading')).toBeEmpty() - expect(rootView.find('.outline-view')).toExist() - expect(outlineView.list.children('li').length).toBe 2 - expect(outlineView.list.children('li:first').find('.function-name')).toHaveText 'quicksort' - expect(outlineView.list.children('li:first').find('.function-details')).toHaveText 'Line 1' - expect(outlineView.list.children('li:last').find('.function-name')).toHaveText 'quicksort.sort' - expect(outlineView.list.children('li:last').find('.function-details')).toHaveText 'Line 2' - expect(outlineView).not.toHaveClass "error" - expect(outlineView.error).not.toBeVisible() - - it "displays error when no tags match text in mini-editor", -> - rootView.open('sample.js') - expect(rootView.find('.outline-view')).not.toExist() - rootView.getActiveEditor().trigger "outline-view:toggle-file-outline" - - waitsFor -> - setArraySpy.callCount > 0 - - runs -> - outlineView.miniEditor.setText("nothing will match this") - window.advanceClock(outlineView.inputThrottle) - - expect(rootView.find('.outline-view')).toExist() - expect(outlineView.list.children('li').length).toBe 0 - expect(outlineView.error).toBeVisible() - expect(outlineView.error.text().length).toBeGreaterThan 0 - expect(outlineView).toHaveClass "error" - - # Should remove error - outlineView.miniEditor.setText("") - window.advanceClock(outlineView.inputThrottle) - - expect(outlineView.list.children('li').length).toBe 2 - expect(outlineView).not.toHaveClass "error" - expect(outlineView.error).not.toBeVisible() - - describe "when tags can't be generated for a file", -> - it "shows an error message when no matching tags are found", -> - rootView.open('sample.txt') - expect(rootView.find('.outline-view')).not.toExist() - rootView.getActiveEditor().trigger "outline-view:toggle-file-outline" - setErrorSpy = spyOn(outlineView, "setError").andCallThrough() - - waitsFor -> - setErrorSpy.callCount > 0 - - runs -> - expect(rootView.find('.outline-view')).toExist() - expect(outlineView.list.children('li').length).toBe 0 - expect(outlineView.error).toBeVisible() - expect(outlineView.error.text().length).toBeGreaterThan 0 - expect(outlineView).toHaveClass "error" - expect(outlineView.find('.loading')).not.toBeVisible() - - it "moves the cursor to the selected function", -> - tags = [] - waitsForPromise -> - tags = [] - path = require.resolve('fixtures/sample.js') - callback = (tag) -> - tags.push tag - generator = new TagGenerator(path, callback) - generator.generate() - - runs -> - rootView.open('sample.js') - expect(rootView.getActiveEditor().getCursorBufferPosition()).toEqual [0,0] - expect(rootView.find('.outline-view')).not.toExist() - outlineView.setArray(tags) - outlineView.attach() - expect(rootView.find('.outline-view')).toExist() - outlineView.confirmed(tags[1]) - expect(rootView.getActiveEditor().getCursorBufferPosition()).toEqual [1,2] - - describe "TagGenerator", -> - it "generates tags for all JavaScript functions", -> - waitsForPromise -> - tags = [] - path = require.resolve('fixtures/sample.js') - callback = (tag) -> - tags.push tag - generator = new TagGenerator(path, callback) - generator.generate().done -> - expect(tags.length).toBe 2 - expect(tags[0].name).toBe "quicksort" - expect(tags[0].position.row).toBe 0 - expect(tags[1].name).toBe "quicksort.sort" - expect(tags[1].position.row).toBe 1 - - it "generates no tags for text file", -> - waitsForPromise -> - tags = [] - path = require.resolve('fixtures/sample.txt') - callback = (tag) -> - tags.push tag - generator = new TagGenerator(path, callback) - generator.generate().done -> - expect(tags.length).toBe 0 - - describe "jump to declaration", -> - it "doesn't move the cursor when no declaration is found", -> - rootView.open("tagged.js") - editor = rootView.getActiveEditor() - editor.setCursorBufferPosition([0,2]) - editor.trigger 'outline-view:jump-to-declaration' - expect(editor.getCursorBufferPosition()).toEqual [0,2] - - it "moves the cursor to the declaration", -> - rootView.open("tagged.js") - editor = rootView.getActiveEditor() - editor.setCursorBufferPosition([6,24]) - editor.trigger 'outline-view:jump-to-declaration' - expect(editor.getCursorBufferPosition()).toEqual [2,0] - - it "displays matches when more than one exists and opens the selected match", -> - rootView.open("tagged.js") - editor = rootView.getActiveEditor() - editor.setCursorBufferPosition([8,14]) - editor.trigger 'outline-view:jump-to-declaration' - expect(outlineView.list.children('li').length).toBe 2 - expect(outlineView).toBeVisible() - outlineView.confirmed(outlineView.array[0]) - expect(rootView.getActiveEditor().getPath()).toBe rootView.project.resolve("tagged-duplicate.js") - expect(rootView.getActiveEditor().getCursorBufferPosition()).toEqual [0,4] - - describe "project outline", -> - it "displays all tags", -> - rootView.open("tagged.js") - expect(rootView.find('.outline-view')).not.toExist() - rootView.trigger "outline-view:toggle-project-outline" - expect(outlineView.find('.loading')).toHaveText 'Loading symbols...' - - waitsFor -> - setArraySpy.callCount > 0 - - runs -> - expect(outlineView.find('.loading')).toBeEmpty() - expect(rootView.find('.outline-view')).toExist() - expect(outlineView.list.children('li').length).toBe 4 - expect(outlineView.list.children('li:first').find('.function-name')).toHaveText 'callMeMaybe' - expect(outlineView.list.children('li:first').find('.function-details')).toHaveText 'tagged.js' - expect(outlineView.list.children('li:last').find('.function-name')).toHaveText 'thisIsCrazy' - expect(outlineView.list.children('li:last').find('.function-details')).toHaveText 'tagged.js' - expect(outlineView).not.toHaveClass "error" - expect(outlineView.error).not.toBeVisible() diff --git a/src/packages/snippets/index.coffee b/src/packages/snippets/index.coffee index b58971121..4f93ede37 100644 --- a/src/packages/snippets/index.coffee +++ b/src/packages/snippets/index.coffee @@ -1 +1,64 @@ -module.exports = require 'snippets/src/snippets' +AtomPackage = require 'atom-package' +fs = require 'fs' +PEG = require 'pegjs' +_ = require 'underscore' +SnippetExpansion = require './src/snippet-expansion' +Snippet = require './src/snippet' +require './src/package-extensions' + +module.exports = +class Snippets extends AtomPackage + + snippetsByExtension: {} + parser: PEG.buildParser(fs.read(require.resolve 'snippets/snippets.pegjs'), trackLineAndColumn: true) + userSnippetsDir: fs.join(config.configDirPath, 'snippets') + + activate: (@rootView) -> + window.snippets = this + @loadAll() + @rootView.on 'editor:attached', (e, editor) => @enableSnippetsInEditor(editor) + + loadAll: -> + for pack in atom.getPackages() + pack.loadSnippets() + + @loadDirectory(@userSnippetsDir) if fs.exists(@userSnippetsDir) + + loadDirectory: (snippetsDirPath) -> + for snippetsPath in fs.list(snippetsDirPath) when fs.base(snippetsPath).indexOf('.') isnt 0 + snippets.loadFile(snippetsPath) + + loadFile: (snippetsPath) -> + try + snippets = fs.readObject(snippetsPath) + catch e + console.warn "Error reading snippets file '#{snippetsPath}'" + @add(snippets) + + add: (snippetsBySelector) -> + for selector, snippetsByName of snippetsBySelector + snippetsByPrefix = {} + for name, attributes of snippetsByName + { prefix, body } = attributes + bodyTree = @parser.parse(body) + snippet = new Snippet({name, prefix, bodyTree}) + snippetsByPrefix[snippet.prefix] = snippet + syntax.addProperties(selector, snippets: snippetsByPrefix) + + enableSnippetsInEditor: (editor) -> + editor.command 'snippets:expand', (e) => + editSession = editor.activeEditSession + prefix = editSession.getCursor().getCurrentWordPrefix() + if snippet = syntax.getProperty(editSession.getCursorScopes(), "snippets.#{prefix}") + editSession.transact -> + new SnippetExpansion(snippet, editSession) + else + e.abortKeyBinding() + + editor.command 'snippets:next-tab-stop', (e) -> + unless editor.activeEditSession.snippetExpansion?.goToNextTabStop() + e.abortKeyBinding() + + editor.command 'snippets:previous-tab-stop', (e) -> + unless editor.activeEditSession.snippetExpansion?.goToPreviousTabStop() + e.abortKeyBinding() diff --git a/src/packages/snippets/spec/snippets-spec.coffee b/src/packages/snippets/spec/snippets-spec.coffee index fd8cea73d..942b7b4ea 100644 --- a/src/packages/snippets/spec/snippets-spec.coffee +++ b/src/packages/snippets/spec/snippets-spec.coffee @@ -77,6 +77,13 @@ describe "Snippets extension", -> expect(buffer.lineForRow(0)).toBe "this is a testvar quicksort = function () {" expect(editor.getCursorScreenPosition()).toEqual [0, 14] + it "inserts a real tab the next time a tab is pressed after the snippet is expanded", -> + editor.insertText("t1") + editor.trigger keydownEvent('tab', target: editor[0]) + expect(buffer.lineForRow(0)).toBe "this is a testvar quicksort = function () {" + editor.trigger keydownEvent('tab', target: editor[0]) + expect(buffer.lineForRow(0)).toBe "this is a test var quicksort = function () {" + describe "when the snippet contains tab stops", -> it "places the cursor at the first tab-stop, and moves the cursor in response to 'next-tab-stop' events", -> anchorCountBefore = editor.activeEditSession.getAnchors().length @@ -207,12 +214,17 @@ describe "Snippets extension", -> expect(editor.getSelectedBufferRange()).toEqual [[1, 6], [1, 36]] describe "snippet loading", -> - it "loads snippets from all atom packages with a snippets directory", -> + it "loads non-hidden snippet files from all atom packages with snippets directories, logging a warning if a file can't be parsed", -> + spyOn(console, 'warn').andCallThrough() jasmine.unspy(AtomPackage.prototype, 'loadSnippets') snippets.loadAll() expect(syntax.getProperty(['.test'], 'snippets.test')?.constructor).toBe Snippet + # warn about junk-file, but don't even try to parse a hidden file + expect(console.warn).toHaveBeenCalled() + expect(console.warn.calls.length).toBeGreaterThan 0 + it "loads snippets from all TextMate packages with snippets", -> jasmine.unspy(TextMatePackage.prototype, 'loadSnippets') snippets.loadAll() @@ -229,7 +241,7 @@ describe "Snippets extension", -> describe "Snippets parser", -> it "breaks a snippet body into lines, with each line containing tab stops at the appropriate position", -> - bodyTree = Snippets.parser.parse """ + bodyTree = snippets.parser.parse """ the quick brown $1fox ${2:jumped ${3:over} }the ${4:lazy} dog """ diff --git a/src/packages/snippets/src/package-extensions.coffee b/src/packages/snippets/src/package-extensions.coffee index 8ce001487..342d20ecd 100644 --- a/src/packages/snippets/src/package-extensions.coffee +++ b/src/packages/snippets/src/package-extensions.coffee @@ -4,9 +4,7 @@ fs = require 'fs' AtomPackage.prototype.loadSnippets = -> snippetsDirPath = fs.join(@path, 'snippets') - if fs.exists(snippetsDirPath) - for snippetsPath in fs.list(snippetsDirPath) - snippets.load(snippetsPath) + snippets.loadDirectory(snippetsDirPath) if fs.exists(snippetsDirPath) TextMatePackage.prototype.loadSnippets = -> snippetsDirPath = fs.join(@path, 'Snippets') diff --git a/src/packages/snippets/src/snippet-expansion.coffee b/src/packages/snippets/src/snippet-expansion.coffee index 74dcd5d6f..b1a62e496 100644 --- a/src/packages/snippets/src/snippet-expansion.coffee +++ b/src/packages/snippets/src/snippet-expansion.coffee @@ -12,12 +12,13 @@ class SnippetExpansion startPosition = @editSession.getCursorBufferPosition() @editSession.transact => @editSession.insertText(snippet.body, autoIndent: false) - editSession.pushOperation - do: => - @subscribe @editSession, 'cursor-moved.snippet-expansion', (e) => @cursorMoved(e) - @placeTabStopAnchorRanges(startPosition, snippet.tabStops) - @editSession.snippetExpansion = this - undo: => @destroy() + if snippet.tabStops.length > 0 + editSession.pushOperation + do: => + @subscribe @editSession, 'cursor-moved.snippet-expansion', (e) => @cursorMoved(e) + @placeTabStopAnchorRanges(startPosition, snippet.tabStops) + @editSession.snippetExpansion = this + undo: => @destroy() @indentSubsequentLines(startPosition.row, snippet) if snippet.lineCount > 1 cursorMoved: ({oldBufferPosition, newBufferPosition}) -> @@ -29,8 +30,6 @@ class SnippetExpansion @destroy() unless _.intersect(oldTabStops, newTabStops).length placeTabStopAnchorRanges: (startPosition, tabStopRanges) -> - return unless @snippet.tabStops.length > 0 - @tabStopAnchorRanges = tabStopRanges.map ({start, end}) => anchorRange = @editSession.addAnchorRange([startPosition.add(start), startPosition.add(end)]) @subscribe anchorRange, 'destroyed', => diff --git a/src/packages/snippets/src/snippets.coffee b/src/packages/snippets/src/snippets.coffee deleted file mode 100644 index 657153a8d..000000000 --- a/src/packages/snippets/src/snippets.coffee +++ /dev/null @@ -1,54 +0,0 @@ -fs = require 'fs' -PEG = require 'pegjs' -_ = require 'underscore' -SnippetExpansion = require 'snippets/src/snippet-expansion' -Snippet = require './snippet' -require './package-extensions' - -module.exports = - snippetsByExtension: {} - parser: PEG.buildParser(fs.read(require.resolve 'snippets/snippets.pegjs'), trackLineAndColumn: true) - userSnippetsDir: fs.join(config.configDirPath, 'snippets') - - activate: (@rootView) -> - window.snippets = this - @loadAll() - @rootView.on 'editor:attached', (e, editor) => @enableSnippetsInEditor(editor) - - loadAll: -> - for pack in atom.getPackages() - pack.loadSnippets() - - for snippetsPath in fs.list(@userSnippetsDir) - @load(snippetsPath) - - load: (snippetsPath) -> - @add(fs.readObject(snippetsPath)) - - add: (snippetsBySelector) -> - for selector, snippetsByName of snippetsBySelector - snippetsByPrefix = {} - for name, attributes of snippetsByName - { prefix, body } = attributes - bodyTree = @parser.parse(body) - snippet = new Snippet({name, prefix, bodyTree}) - snippetsByPrefix[snippet.prefix] = snippet - syntax.addProperties(selector, snippets: snippetsByPrefix) - - enableSnippetsInEditor: (editor) -> - editor.command 'snippets:expand', (e) => - editSession = editor.activeEditSession - prefix = editSession.getCursor().getCurrentWordPrefix() - if snippet = syntax.getProperty(editSession.getCursorScopes(), "snippets.#{prefix}") - editSession.transact -> - new SnippetExpansion(snippet, editSession) - else - e.abortKeyBinding() - - editor.command 'snippets:next-tab-stop', (e) -> - unless editor.activeEditSession.snippetExpansion?.goToNextTabStop() - e.abortKeyBinding() - - editor.command 'snippets:previous-tab-stop', (e) -> - unless editor.activeEditSession.snippetExpansion?.goToPreviousTabStop() - e.abortKeyBinding() diff --git a/src/packages/status-bar/index.coffee b/src/packages/status-bar/index.coffee index 739dd32ad..7d05f5962 100644 --- a/src/packages/status-bar/index.coffee +++ b/src/packages/status-bar/index.coffee @@ -1 +1,6 @@ -module.exports = require 'status-bar/src/status-bar' +AtomPackage = require 'atom-package' +StatusBarView = require './src/status-bar-view' + +module.exports = +class StatusBar extends AtomPackage + activate: (rootView) -> StatusBarView.activate(rootView) diff --git a/src/packages/status-bar/spec/status-bar-spec.coffee b/src/packages/status-bar/spec/status-bar-spec.coffee index d3c9a2b7f..16e4bcc20 100644 --- a/src/packages/status-bar/spec/status-bar-spec.coffee +++ b/src/packages/status-bar/spec/status-bar-spec.coffee @@ -1,7 +1,7 @@ $ = require 'jquery' _ = require 'underscore' RootView = require 'root-view' -StatusBar = require 'status-bar' +StatusBar = require 'status-bar/src/status-bar-view' fs = require 'fs' describe "StatusBar", -> diff --git a/src/packages/status-bar/src/status-bar.coffee b/src/packages/status-bar/src/status-bar-view.coffee similarity index 97% rename from src/packages/status-bar/src/status-bar.coffee rename to src/packages/status-bar/src/status-bar-view.coffee index 2c93db40b..565532679 100644 --- a/src/packages/status-bar/src/status-bar.coffee +++ b/src/packages/status-bar/src/status-bar-view.coffee @@ -3,14 +3,14 @@ _ = require 'underscore' $ = require 'jquery' module.exports = -class StatusBar extends View +class StatusBarView extends View @activate: (rootView) -> rootView.eachEditor (editor) => @appendToEditorPane(rootView, editor) if editor.attached @appendToEditorPane: (rootView, editor) -> if pane = editor.pane() - pane.append(new StatusBar(rootView, editor)) + pane.append(new StatusBarView(rootView, editor)) @content: -> @div class: 'status-bar', => diff --git a/src/packages/status-bar/stylesheets/status-bar.css b/src/packages/status-bar/stylesheets/status-bar.css index e15105d5e..3fe635f49 100644 --- a/src/packages/status-bar/stylesheets/status-bar.css +++ b/src/packages/status-bar/stylesheets/status-bar.css @@ -1,68 +1,9 @@ .status-bar { - background-color: #303030; - border-top: 1px solid #454545; - padding: 4px 10px 3px; - font-size: 11px; - line-height: 14px; - color: #969696; position: relative; -webkit-user-select: none; cursor: default; } -.status-bar .cursor-position, -.status-bar .grammar-name { - padding-left: 10px; -} - -.status-bar .grammar-name { - cursor: pointer; -} - .status-bar .git-branch { float: right; -} - -.status-bar .branch-label { - vertical-align: baseline; -} - -.status-bar .git-status.octicons { - display: none; - padding-left: 10px; - margin-top:-2px; -} - -.status-bar .octicons:before { - font-family: 'Octicons Regular'; - font-size: 14px; - width: 14px; - height: 14px; - line-height: 14px; - -webkit-font-smoothing: antialiased; - display: inline-block; - vertical-align: middle; - margin-right: 5px; -} - -.status-bar .branch-icon:before { - content: "\f020"; -} - -.status-bar .git-status.octicons.modified-status-icon { - color: #f78a46; - display: inline-block; -} - -.status-bar .modified-status-icon:before { - content: "\f26d"; -} - -.status-bar .git-status.octicons.new-status-icon { - color: #5293d8; - display: inline-block; -} - -.status-bar .new-status-icon:before { - content: "\f26b"; -} +} \ No newline at end of file diff --git a/src/packages/strip-trailing-whitespace/index.coffee b/src/packages/strip-trailing-whitespace/index.coffee index e0caa961b..20b3e6d74 100644 --- a/src/packages/strip-trailing-whitespace/index.coffee +++ b/src/packages/strip-trailing-whitespace/index.coffee @@ -1 +1,19 @@ -module.exports = require 'strip-trailing-whitespace/src/strip-trailing-whitespace' +AtomPackage = require 'atom-package' + +module.exports = +class StripTrailingWhitespace extends AtomPackage + activate: (rootView) -> + rootView.eachBuffer (buffer) => @stripTrailingWhitespaceBeforeSave(buffer) + + stripTrailingWhitespaceBeforeSave: (buffer) -> + buffer.on 'will-be-saved', -> + buffer.transact -> + buffer.scan /[ \t]+$/g, (match, range, { replace }) -> + replace('') + if config.get('stripTrailingWhitespace.singleTrailingNewline') + if buffer.getLastLine() is '' + row = buffer.getLastRow() - 1 + while row and buffer.lineForRow(row) is '' + buffer.deleteRow(row--) + else + buffer.append('\n') diff --git a/src/packages/strip-trailing-whitespace/spec/strip-trailing-whitespace-spec.coffee b/src/packages/strip-trailing-whitespace/spec/strip-trailing-whitespace-spec.coffee index 9b5f7a304..c7e6bc990 100644 --- a/src/packages/strip-trailing-whitespace/spec/strip-trailing-whitespace-spec.coffee +++ b/src/packages/strip-trailing-whitespace/spec/strip-trailing-whitespace-spec.coffee @@ -1,4 +1,3 @@ -StripTrailingWhitespace = require 'strip-trailing-whitespace' RootView = require 'root-view' fs = require 'fs' @@ -10,7 +9,7 @@ describe "StripTrailingWhitespace", -> fs.write(path, "") rootView = new RootView(path) - StripTrailingWhitespace.activate(rootView) + atom.loadPackage('strip-trailing-whitespace') rootView.focus() editor = rootView.getActiveEditor() diff --git a/src/packages/strip-trailing-whitespace/src/strip-trailing-whitespace.coffee b/src/packages/strip-trailing-whitespace/src/strip-trailing-whitespace.coffee deleted file mode 100644 index bf01c6bbe..000000000 --- a/src/packages/strip-trailing-whitespace/src/strip-trailing-whitespace.coffee +++ /dev/null @@ -1,16 +0,0 @@ -module.exports = - activate: (rootView) -> - rootView.eachBuffer (buffer) => @stripTrailingWhitespaceBeforeSave(buffer) - - stripTrailingWhitespaceBeforeSave: (buffer) -> - buffer.on 'will-be-saved', -> - buffer.transact -> - buffer.scan /[ \t]+$/g, (match, range, { replace }) -> - replace('') - if config.get('stripTrailingWhitespace.singleTrailingNewline') - if buffer.getLastLine() is '' - row = buffer.getLastRow() - 1 - while row and buffer.lineForRow(row) is '' - buffer.deleteRow(row--) - else - buffer.append('\n') diff --git a/src/packages/symbols-view/index.coffee b/src/packages/symbols-view/index.coffee new file mode 100644 index 000000000..50d9a89c0 --- /dev/null +++ b/src/packages/symbols-view/index.coffee @@ -0,0 +1,21 @@ +DeferredAtomPackage = require 'deferred-atom-package' + +module.exports = +class Symbols extends DeferredAtomPackage + + loadEvents: [ + 'symbols-view:toggle-file-symbols' + 'symbols-view:toggle-project-symbols' + 'symbols-view:go-to-declaration' + ] + + instanceClass: 'symbols-view/src/symbols-view' + + onLoadEvent: (event, instance) -> + switch event.type + when 'symbols-view:toggle-file-symbols' + instance.toggleFileSymbols() + when 'symbols-view:toggle-project-symbols' + instance.toggleProjectSymbols() + when 'symbols-view:go-to-declaration' + instance.goToDeclaration() diff --git a/src/packages/symbols-view/keymaps/symbols-view.cson b/src/packages/symbols-view/keymaps/symbols-view.cson new file mode 100644 index 000000000..1e579abe0 --- /dev/null +++ b/src/packages/symbols-view/keymaps/symbols-view.cson @@ -0,0 +1,6 @@ +'.editor': + 'meta-j': 'symbols-view:toggle-file-symbols' + 'meta-.': 'symbols-view:go-to-declaration' + +'body': + 'meta-J': 'symbols-view:toggle-project-symbols' diff --git a/src/packages/symbols-view/spec/symbols-view-spec.coffee b/src/packages/symbols-view/spec/symbols-view-spec.coffee new file mode 100644 index 000000000..89476c8d5 --- /dev/null +++ b/src/packages/symbols-view/spec/symbols-view-spec.coffee @@ -0,0 +1,189 @@ +RootView = require 'root-view' +SymbolsView = require 'symbols-view/src/symbols-view' +TagGenerator = require 'symbols-view/src/tag-generator' +fs = require 'fs' + +describe "SymbolsView", -> + [rootView, symbolsView, setArraySpy] = [] + + beforeEach -> + rootView = new RootView(require.resolve('fixtures')) + symbolsView = atom.loadPackage("symbols-view").getInstance() + rootView.attachToDom() + setArraySpy = spyOn(symbolsView, 'setArray').andCallThrough() + + afterEach -> + rootView.deactivate() + setArraySpy.reset() + + describe "when tags can be generated for a file", -> + it "initially displays all JavaScript functions with line numbers", -> + rootView.open('sample.js') + expect(rootView.find('.symbols-view')).not.toExist() + rootView.getActiveEditor().trigger "symbols-view:toggle-file-symbols" + expect(symbolsView.find('.loading')).toHaveText 'Generating symbols...' + + waitsFor -> + setArraySpy.callCount > 0 + + runs -> + expect(symbolsView.find('.loading')).toBeEmpty() + expect(rootView.find('.symbols-view')).toExist() + expect(symbolsView.list.children('li').length).toBe 2 + expect(symbolsView.list.children('li:first').find('.function-name')).toHaveText 'quicksort' + expect(symbolsView.list.children('li:first').find('.function-details')).toHaveText 'Line 1' + expect(symbolsView.list.children('li:last').find('.function-name')).toHaveText 'quicksort.sort' + expect(symbolsView.list.children('li:last').find('.function-details')).toHaveText 'Line 2' + expect(symbolsView).not.toHaveClass "error" + expect(symbolsView.error).not.toBeVisible() + + it "displays error when no tags match text in mini-editor", -> + rootView.open('sample.js') + expect(rootView.find('.symbols-view')).not.toExist() + rootView.getActiveEditor().trigger "symbols-view:toggle-file-symbols" + + waitsFor -> + setArraySpy.callCount > 0 + + runs -> + symbolsView.miniEditor.setText("nothing will match this") + window.advanceClock(symbolsView.inputThrottle) + + expect(rootView.find('.symbols-view')).toExist() + expect(symbolsView.list.children('li').length).toBe 0 + expect(symbolsView.error).toBeVisible() + expect(symbolsView.error.text().length).toBeGreaterThan 0 + expect(symbolsView).toHaveClass "error" + + # Should remove error + symbolsView.miniEditor.setText("") + window.advanceClock(symbolsView.inputThrottle) + + expect(symbolsView.list.children('li').length).toBe 2 + expect(symbolsView).not.toHaveClass "error" + expect(symbolsView.error).not.toBeVisible() + + describe "when tags can't be generated for a file", -> + it "shows an error message when no matching tags are found", -> + rootView.open('sample.txt') + expect(rootView.find('.symbols-view')).not.toExist() + rootView.getActiveEditor().trigger "symbols-view:toggle-file-symbols" + setErrorSpy = spyOn(symbolsView, "setError").andCallThrough() + + waitsFor -> + setErrorSpy.callCount > 0 + + runs -> + expect(rootView.find('.symbols-view')).toExist() + expect(symbolsView.list.children('li').length).toBe 0 + expect(symbolsView.error).toBeVisible() + expect(symbolsView.error.text().length).toBeGreaterThan 0 + expect(symbolsView).toHaveClass "error" + expect(symbolsView.find('.loading')).not.toBeVisible() + + it "moves the cursor to the selected function", -> + tags = [] + waitsForPromise -> + tags = [] + path = require.resolve('fixtures/sample.js') + callback = (tag) -> + tags.push tag + generator = new TagGenerator(path, callback) + generator.generate() + + runs -> + rootView.open('sample.js') + expect(rootView.getActiveEditor().getCursorBufferPosition()).toEqual [0,0] + expect(rootView.find('.symbols-view')).not.toExist() + symbolsView.setArray(tags) + symbolsView.attach() + expect(rootView.find('.symbols-view')).toExist() + symbolsView.confirmed(tags[1]) + expect(rootView.getActiveEditor().getCursorBufferPosition()).toEqual [1,2] + + describe "TagGenerator", -> + it "generates tags for all JavaScript functions", -> + waitsForPromise -> + tags = [] + path = require.resolve('fixtures/sample.js') + callback = (tag) -> + tags.push tag + generator = new TagGenerator(path, callback) + generator.generate().done -> + expect(tags.length).toBe 2 + expect(tags[0].name).toBe "quicksort" + expect(tags[0].position.row).toBe 0 + expect(tags[1].name).toBe "quicksort.sort" + expect(tags[1].position.row).toBe 1 + + it "generates no tags for text file", -> + waitsForPromise -> + tags = [] + path = require.resolve('fixtures/sample.txt') + callback = (tag) -> + tags.push tag + generator = new TagGenerator(path, callback) + generator.generate().done -> + expect(tags.length).toBe 0 + + describe "go to declaration", -> + it "doesn't move the cursor when no declaration is found", -> + rootView.open("tagged.js") + editor = rootView.getActiveEditor() + editor.setCursorBufferPosition([0,2]) + editor.trigger 'symbols-view:go-to-declaration' + expect(editor.getCursorBufferPosition()).toEqual [0,2] + + it "moves the cursor to the declaration", -> + rootView.open("tagged.js") + editor = rootView.getActiveEditor() + editor.setCursorBufferPosition([6,24]) + editor.trigger 'symbols-view:go-to-declaration' + expect(editor.getCursorBufferPosition()).toEqual [2,0] + + it "displays matches when more than one exists and opens the selected match", -> + rootView.open("tagged.js") + editor = rootView.getActiveEditor() + editor.setCursorBufferPosition([8,14]) + editor.trigger 'symbols-view:go-to-declaration' + expect(symbolsView.list.children('li').length).toBe 2 + expect(symbolsView).toBeVisible() + symbolsView.confirmed(symbolsView.array[0]) + expect(rootView.getActiveEditor().getPath()).toBe rootView.project.resolve("tagged-duplicate.js") + expect(rootView.getActiveEditor().getCursorBufferPosition()).toEqual [0,4] + + describe "when the tag is in a file that doesn't exist", -> + beforeEach -> + fs.move(rootView.project.resolve("tagged-duplicate.js"), rootView.project.resolve("tagged-duplicate-renamed.js")) + + afterEach -> + fs.move(rootView.project.resolve("tagged-duplicate-renamed.js"), rootView.project.resolve("tagged-duplicate.js")) + + it "doesn't display the tag", -> + rootView.open("tagged.js") + editor = rootView.getActiveEditor() + editor.setCursorBufferPosition([8,14]) + editor.trigger 'symbols-view:go-to-declaration' + expect(symbolsView.list.children('li').length).toBe 1 + expect(symbolsView.list.children('li:first').find('.function-name')).toHaveText 'tagged.js' + + describe "project symbols", -> + it "displays all tags", -> + rootView.open("tagged.js") + expect(rootView.find('.symbols-view')).not.toExist() + rootView.trigger "symbols-view:toggle-project-symbols" + expect(symbolsView.find('.loading')).toHaveText 'Loading symbols...' + + waitsFor -> + setArraySpy.callCount > 0 + + runs -> + expect(symbolsView.find('.loading')).toBeEmpty() + expect(rootView.find('.symbols-view')).toExist() + expect(symbolsView.list.children('li').length).toBe 4 + expect(symbolsView.list.children('li:first').find('.function-name')).toHaveText 'callMeMaybe' + expect(symbolsView.list.children('li:first').find('.function-details')).toHaveText 'tagged.js' + expect(symbolsView.list.children('li:last').find('.function-name')).toHaveText 'thisIsCrazy' + expect(symbolsView.list.children('li:last').find('.function-details')).toHaveText 'tagged.js' + expect(symbolsView).not.toHaveClass "error" + expect(symbolsView.error).not.toBeVisible() diff --git a/src/packages/outline-view/src/outline-view.coffee b/src/packages/symbols-view/src/symbols-view.coffee similarity index 76% rename from src/packages/outline-view/src/outline-view.coffee rename to src/packages/symbols-view/src/symbols-view.coffee index fadd4e788..c0d019132 100644 --- a/src/packages/outline-view/src/outline-view.coffee +++ b/src/packages/symbols-view/src/symbols-view.coffee @@ -1,21 +1,18 @@ {$$} = require 'space-pen' SelectList = require 'select-list' -TagGenerator = require 'outline-view/src/tag-generator' -TagReader = require 'outline-view/src/tag-reader' +TagGenerator = require 'symbols-view/src/tag-generator' +TagReader = require 'symbols-view/src/tag-reader' Point = require 'point' fs = require 'fs' $ = require 'jquery' module.exports = -class OutlineView extends SelectList +class SymbolsView extends SelectList @activate: (rootView) -> - @instance = new OutlineView(rootView) - rootView.command 'outline-view:toggle-file-outline', => @instance.toggleFileOutline() - rootView.command 'outline-view:toggle-project-outline', => @instance.toggleProjectOutline() - rootView.command 'outline-view:jump-to-declaration', => @instance.jumpToDeclaration() + @instance = new SymbolsView(rootView) - @viewClass: -> "#{super} outline-view" + @viewClass: -> "#{super} symbols-view" filterKey: 'name' @@ -34,14 +31,14 @@ class OutlineView extends SelectList @div text, class: 'function-details' @div class: 'clear-float' - toggleFileOutline: -> + toggleFileSymbols: -> if @hasParent() @cancel() else - @populateFileOutline() + @populateFileSymbols() @attach() - populateFileOutline: -> + populateFileSymbols: -> tags = [] callback = (tag) -> tags.push tag path = @rootView.getActiveEditor().getPath() @@ -56,14 +53,14 @@ class OutlineView extends SelectList @setError("No symbols found") setTimeout (=> @detach()), 2000 - toggleProjectOutline: -> + toggleProjectSymbols: -> if @hasParent() @cancel() else - @populateProjectOutline() + @populateProjectSymbols() @attach() - populateProjectOutline: -> + populateProjectSymbols: -> @setLoading("Loading symbols...") TagReader.getAllTags(@rootView.project).done (tags) => if tags.length > 0 @@ -91,21 +88,21 @@ class OutlineView extends SelectList editor.setCursorBufferPosition(position) editor.moveCursorToFirstCharacterOfLine() - cancelled: -> - @miniEditor.setText('') - @rootView.focus() if @miniEditor.isFocused - attach: -> + super + @rootView.append(this) @miniEditor.focus() getTagLine: (tag) -> pattern = $.trim(tag.pattern?.replace(/(^^\/\^)|(\$\/$)/g, '')) # Remove leading /^ and trailing $/ return unless pattern - for line, index in fs.read(@rootView.project.resolve(tag.file)).split('\n') + file = @rootView.project.resolve(tag.file) + return unless fs.isFile(file) + for line, index in fs.read(file).split('\n') return new Point(index, 0) if pattern is $.trim(line) - jumpToDeclaration: -> + goToDeclaration: -> editor = @rootView.getActiveEditor() matches = TagReader.find(editor) return unless matches.length diff --git a/src/packages/outline-view/src/tag-generator.coffee b/src/packages/symbols-view/src/tag-generator.coffee similarity index 100% rename from src/packages/outline-view/src/tag-generator.coffee rename to src/packages/symbols-view/src/tag-generator.coffee diff --git a/src/packages/outline-view/src/tag-reader.coffee b/src/packages/symbols-view/src/tag-reader.coffee similarity index 100% rename from src/packages/outline-view/src/tag-reader.coffee rename to src/packages/symbols-view/src/tag-reader.coffee diff --git a/src/packages/tabs/index.coffee b/src/packages/tabs/index.coffee index 8b5de5d05..58a88c08a 100644 --- a/src/packages/tabs/index.coffee +++ b/src/packages/tabs/index.coffee @@ -1 +1,6 @@ -module.exports = require 'tabs/src/tabs' +AtomPackage = require 'atom-package' +TabsView = require './src/tabs-view' + +module.exports = +class Tabs extends AtomPackage + activate: (rootView) -> TabsView.activate(rootView) diff --git a/src/packages/tabs/spec/tabs-spec.coffee b/src/packages/tabs/spec/tabs-spec.coffee index c002ba04d..c3055d081 100644 --- a/src/packages/tabs/spec/tabs-spec.coffee +++ b/src/packages/tabs/spec/tabs-spec.coffee @@ -75,6 +75,14 @@ describe "Tabs", -> tabs.find('.tab:eq(1)').click() expect(editor.getActiveEditSessionIndex()).toBe 1 + it "focuses the associated editor", -> + rootView.attachToDom() + expect(editor).toMatchSelector ":has(:focus)" + editor.splitRight() + expect(editor).not.toMatchSelector ":has(:focus)" + tabs.find('.tab:eq(0)').click() + expect(editor).toMatchSelector ":has(:focus)" + describe "when a file name associated with a tab changes", -> [buffer, oldPath, newPath] = [] diff --git a/src/packages/tabs/src/tabs.coffee b/src/packages/tabs/src/tabs-view.coffee similarity index 98% rename from src/packages/tabs/src/tabs.coffee rename to src/packages/tabs/src/tabs-view.coffee index 98212f426..e7322dc64 100644 --- a/src/packages/tabs/src/tabs.coffee +++ b/src/packages/tabs/src/tabs-view.coffee @@ -26,6 +26,7 @@ class Tabs extends View @on 'click', '.tab', (e) => @editor.setActiveEditSessionIndex($(e.target).closest('.tab').index()) + @editor.focus() @on 'click', '.tab .close-icon', (e) => index = $(e.target).closest('.tab').index() diff --git a/src/packages/tabs/stylesheets/tabs.css b/src/packages/tabs/stylesheets/tabs.css index 8ddf33b0f..0239bc734 100644 --- a/src/packages/tabs/stylesheets/tabs.css +++ b/src/packages/tabs/stylesheets/tabs.css @@ -1,141 +1,31 @@ .tabs { - background: #333333; - border-bottom: 4px solid #424242; - font: caption; + -webkit-user-select: none; } .tab { - cursor: default; - padding: 2px 21px 2px 9px; - background-image: -webkit-linear-gradient(#444, #3d3d3d); display: table-cell; position: relative; width:175px; - border-top: 1px solid #383838; - border-right: 1px solid #2e2e2e; - border-bottom: 1px solid #2e2e2e; - box-shadow: inset 0 0 5px #383838, 0 1px 0 #585858, inset -1px 0 0 #4a4a4a, inset 1px 0 0 #4a4a4a; min-width: 40px; box-sizing: border-box; height: 24px; } -.tab, -.tab .close-icon { - color: #aaa; -} - .tab.file-modified .close-icon { - border-color: #aaa; -} - -.tab.active, -.tab.active:hover, -.tab.active .close-icon { - color: #e6e6e6; -} - -.tab.file-modified.active .close-icon { - border-color: #e6e6e6; -} - -.tab:hover .close-icon { - color: #c8c8c8; - border-color: #c8c8c8; -} - -.tab.file-modified .close-icon { - border: 3px solid #777; top: 6px; - border-radius: 10px; width: 5px; height: 5px; right: 5px; } -.tab.file-modified .close-icon:before { - content: ""; -} - -.tab:first-child { - box-shadow: inset 0 0 5px #383838, 0 1px 0 #585858, inset -1px 0 0 #4a4a4a; -} - -.tab.active:first-child, -.tab.active:first-child:hover { - box-shadow: inset -1px 0 0 #595959; -} - -.tab.active, -.tab.active:hover { - border-top: 1px solid #4a4a4a; - box-shadow: inset -1px 0 0 #595959, inset 1px 0 0 #595959; - border-bottom: 0 none; - background-image: -webkit-linear-gradient(#555555, #424242); -} - -.tab.active:before, -.tab.active:after { - position: absolute; - bottom: -1px; - width: 4px; - height: 4px; - content: " "; - z-index: 3; - border: 1px solid #595959; -} -.tab.active:before { - border-bottom-right-radius: 4px; - border-width: 0 1px 1px 0; - box-shadow: 2px 2px 0 #424242; - left: -4px; -} -.tab.active:after { - right: -4px; - border-bottom-left-radius: 4px; - border-width: 0 0 1px 1px; - box-shadow: -2px 2px 0 #424242; -} -.tab.active:first-child:before { - display: none; -} - -.tab:hover { - color: #c8c8c8; - background-image: -webkit-linear-gradient(#474747, #444444); -} - .tab .file-name { - font-size: 11px; display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; - text-shadow: 0 -1px 1px black; position: absolute; left: 9px; top:4px; bottom:4px; right: 21px; -} - -.tab .close-icon { - font-family: 'Octicons Regular'; - font-size: 14px; - width: 14px; - height: 14px; - display: block; - cursor: pointer; - position: absolute; - right: 4px; - top: -1px; - -webkit-font-smoothing: antialiased; -} - -.tab .close-icon:before { - content: "\f081"; -} - -.tab .close-icon:hover { - color: white; -} +} \ No newline at end of file diff --git a/src/packages/tree-view/index.coffee b/src/packages/tree-view/index.coffee index a57ff5b90..b2228f183 100644 --- a/src/packages/tree-view/index.coffee +++ b/src/packages/tree-view/index.coffee @@ -1 +1,26 @@ -module.exports = require 'tree-view/src/tree-view' +DeferredAtomPackage = require 'deferred-atom-package' + +module.exports = +class Tree extends DeferredAtomPackage + + loadEvents: [ + 'tree-view:toggle' + 'tree-view:reveal-active-file' + ] + + instanceClass: 'tree-view/src/tree-view' + + activate: (rootView, state) -> + super + + if state + @getInstance().attach() if state.attached + else if rootView.project.getPath() and not rootView.pathToOpenIsFile + @getInstance().attach() + + onLoadEvent: (event, instance) -> + switch event.type + when 'tree-view:toggle' + instance.toggle() + when 'tree-view:reveal-active-file' + instance.revealActiveFile() diff --git a/src/packages/tree-view/spec/tree-view-spec.coffee b/src/packages/tree-view/spec/tree-view-spec.coffee index c06a1cf44..c788842bf 100644 --- a/src/packages/tree-view/spec/tree-view-spec.coffee +++ b/src/packages/tree-view/spec/tree-view-spec.coffee @@ -1,6 +1,6 @@ $ = require 'jquery' _ = require 'underscore' -TreeView = require 'tree-view' +TreeView = require 'tree-view/src/tree-view' RootView = require 'root-view' Directory = require 'directory' Native = require 'native' @@ -13,9 +13,8 @@ describe "TreeView", -> rootView = new RootView(require.resolve('fixtures/tree-view')) project = rootView.project - atom.loadPackage("tree-view") - treeView = TreeView.instance - treeView.root = treeView.find('> li:first').view() + treeView = atom.loadPackage("tree-view").getInstance() + treeView.root = treeView.find('ol > li:first').view() sampleJs = treeView.find('.file:contains(tree-view.js)') sampleTxt = treeView.find('.file:contains(tree-view.txt)') @@ -51,8 +50,7 @@ describe "TreeView", -> rootView.deactivate() rootView = new RootView - atom.loadPackage 'tree-view' - treeView = TreeView.instance + treeView = atom.loadPackage("tree-view").getInstance() it "does not attach to the root view or create a root node when initialized", -> expect(treeView.hasParent()).toBeFalsy() @@ -78,8 +76,7 @@ describe "TreeView", -> rootView.deactivate() rootView = new RootView(require.resolve('fixtures/tree-view/tree-view.js')) - atom.loadPackage 'tree-view' - treeView = TreeView.instance + treeView = atom.loadPackage("tree-view").getInstance() it "does not attach to the root view but does create a root node when initialized", -> expect(treeView.hasParent()).toBeFalsy() @@ -108,7 +105,7 @@ describe "TreeView", -> it "restores the focus state of the tree view", -> rootView.attachToDom() treeView.focus() - expect(treeView).toMatchSelector ':focus' + expect(treeView.find(".tree-view")).toMatchSelector ':focus' newRootView = RootView.deserialize(rootView.serialize()) rootView.deactivate() # Deactivates previous TreeView @@ -117,7 +114,7 @@ describe "TreeView", -> newRootView.activatePackage('tree-view', TreeView) newTreeView = newRootView.find(".tree-view").view() - expect(newTreeView).toMatchSelector ':focus' + expect(newTreeView.find(".tree-view")).toMatchSelector ':focus' it "restores the scroll top when toggled", -> rootView.height(5) @@ -154,14 +151,14 @@ describe "TreeView", -> rootView.focus() rootView.trigger 'tree-view:toggle' expect(treeView).toBeVisible() - expect(treeView).toMatchSelector(':focus') + expect(treeView.find(".tree-view")).toMatchSelector(':focus') describe "when the tree view is hidden", -> it "shows and focuses the tree view", -> treeView.detach() rootView.trigger 'tree-view:toggle' expect(treeView.hasParent()).toBeTruthy() - expect(treeView).toMatchSelector(':focus') + expect(treeView.find(".tree-view")).toMatchSelector(':focus') describe "when tree-view:reveal-current-file is triggered on the root view", -> beforeEach -> @@ -196,10 +193,10 @@ describe "TreeView", -> rootView.open() # When we trigger 'tool-panel:unfocus' below, we want an editor to become focused rootView.attachToDom() treeView.focus() - expect(treeView).toMatchSelector(':focus') + expect(treeView.find(".tree-view")).toMatchSelector(':focus') treeView.trigger 'tool-panel:unfocus' expect(treeView).toBeVisible() - expect(treeView).not.toMatchSelector(':focus') + expect(treeView.find(".tree-view")).not.toMatchSelector(':focus') expect(rootView.getActiveEditor().isFocused).toBeTruthy() describe "when core:close is triggered on the tree view", -> @@ -434,7 +431,7 @@ describe "TreeView", -> treeView.height(100) treeView.attachToDom() $(element).view().expand() for element in treeView.find('.directory') - expect(treeView.prop('scrollHeight')).toBeGreaterThan treeView.outerHeight() + expect(treeView.find(".tree-view").prop('scrollHeight')).toBeGreaterThan treeView.find(".tree-view").outerHeight() expect(treeView.scrollTop()).toBe 0 @@ -458,11 +455,11 @@ describe "TreeView", -> treeView.height(100) treeView.attachToDom() $(element).view().expand() for element in treeView.find('.directory') - expect(treeView.prop('scrollHeight')).toBeGreaterThan treeView.outerHeight() + expect(treeView.find(".tree-view").prop('scrollHeight')).toBeGreaterThan treeView.find(".tree-view").outerHeight() expect(treeView.scrollTop()).toBe 0 treeView.trigger 'core:move-to-bottom' - expect(treeView.scrollBottom()).toBe treeView.prop('scrollHeight') + expect(treeView.scrollBottom()).toBe treeView.find(".tree-view").prop('scrollHeight') it "selects the last entry", -> expect(treeView.root).toHaveClass 'selected' @@ -474,7 +471,7 @@ describe "TreeView", -> treeView.height(5) treeView.attachToDom() $(element).view().expand() for element in treeView.find('.directory') - expect(treeView.prop('scrollHeight')).toBeGreaterThan treeView.outerHeight() + expect(treeView.find(".tree-view").prop('scrollHeight')).toBeGreaterThan treeView.find(".tree-view").outerHeight() expect(treeView.scrollTop()).toBe 0 treeView.scrollToBottom() @@ -489,7 +486,7 @@ describe "TreeView", -> treeView.height(5) treeView.attachToDom() $(element).view().expand() for element in treeView.find('.directory') - expect(treeView.prop('scrollHeight')).toBeGreaterThan treeView.outerHeight() + expect(treeView.find(".tree-view").prop('scrollHeight')).toBeGreaterThan treeView.find(".tree-view").outerHeight() expect(treeView.scrollTop()).toBe 0 treeView.trigger 'core:page-down' @@ -500,14 +497,14 @@ describe "TreeView", -> treeView.height(100) treeView.attachToDom() $(element).view().expand() for element in treeView.find('.directory') - expect(treeView.prop('scrollHeight')).toBeGreaterThan treeView.outerHeight() + expect(treeView.find(".tree-view").prop('scrollHeight')).toBeGreaterThan treeView.find(".tree-view").outerHeight() treeView.moveDown() expect(treeView.scrollTop()).toBe 0 entryCount = treeView.find(".entry").length _.times entryCount, -> treeView.moveDown() - expect(treeView.scrollBottom() + 2).toBe treeView.prop('scrollHeight') + expect(treeView.scrollBottom()).toBe treeView.find(".tree-view").prop('scrollHeight') _.times entryCount, -> treeView.moveUp() expect(treeView.scrollTop()).toBe 0 @@ -687,7 +684,7 @@ describe "TreeView", -> expect(fs.isDirectory(newPath)).toBeTruthy() expect(addDialog.parent()).not.toExist() expect(rootView.getActiveEditor().getPath()).not.toBe newPath - expect(treeView).toMatchSelector(':focus') + expect(treeView.find(".tree-view")).toMatchSelector(':focus') expect(rootView.getActiveEditor().isFocused).toBeFalsy() expect(dirView.find('.directory.selected:contains(new)').length).toBe(1) @@ -700,7 +697,7 @@ describe "TreeView", -> expect(fs.isDirectory(newPath)).toBeTruthy() expect(addDialog.parent()).not.toExist() expect(rootView.getActiveEditor().getPath()).not.toBe newPath - expect(treeView).toMatchSelector(':focus') + expect(treeView.find(".tree-view")).toMatchSelector(':focus') expect(rootView.getActiveEditor().isFocused).toBeFalsy() expect(dirView.find('.directory.selected:contains(new2)').length).toBe(1) @@ -721,7 +718,7 @@ describe "TreeView", -> treeView.attachToDom() addDialog.trigger 'core:cancel' expect(addDialog.parent()).not.toExist() - expect(treeView).toMatchSelector(':focus') + expect(treeView.find(".tree-view")).toMatchSelector(':focus') describe "when the add dialog's editor loses focus", -> it "removes the dialog and focuses root view", -> @@ -835,7 +832,7 @@ describe "TreeView", -> treeView.attachToDom() moveDialog.trigger 'core:cancel' expect(moveDialog.parent()).not.toExist() - expect(treeView).toMatchSelector(':focus') + expect(treeView.find(".tree-view")).toMatchSelector(':focus') describe "when the move dialog's editor loses focus", -> it "removes the dialog and focuses root view", -> diff --git a/src/packages/tree-view/src/tree-view.coffee b/src/packages/tree-view/src/tree-view.coffee index 989603938..038f3d6bc 100644 --- a/src/packages/tree-view/src/tree-view.coffee +++ b/src/packages/tree-view/src/tree-view.coffee @@ -17,9 +17,6 @@ class TreeView extends ScrollView else @instance = new TreeView(rootView) - if rootView.project.getPath() and not rootView.pathToOpenIsFile - @instance.attach() - @deactivate: -> @instance.deactivate() @@ -27,7 +24,9 @@ class TreeView extends ScrollView @instance.serialize() @content: (rootView) -> - @ol class: 'tree-view tool-panel', tabindex: -1 + @div class: 'tree-view-wrapper', => + @ol class: 'tree-view tool-panel', tabindex: -1, outlet: 'treeViewList' + @div class: 'tree-view-resizer', outlet: 'resizer' @deserialize: (state, rootView) -> treeView = new TreeView(rootView) @@ -35,6 +34,7 @@ class TreeView extends ScrollView treeView.selectEntryForPath(state.selectedPath) treeView.focusAfterAttach = state.hasFocus treeView.scrollTopAfterAttach = state.scrollTop + treeView.width(state.width) treeView.attach() if state.attached treeView @@ -46,6 +46,7 @@ class TreeView extends ScrollView initialize: (@rootView) -> super @on 'click', '.entry', (e) => @entryClicked(e) + @on 'mousedown', '.tree-view-resizer', (e) => @resizeStarted(e) @command 'core:move-up', => @moveUp() @command 'core:move-down', => @moveDown() @command 'core:close', => @detach(); false @@ -61,8 +62,7 @@ class TreeView extends ScrollView @selectEntryForPath(@selectedPath) if @selectedPath else @selectActiveFile() - @rootView.command 'tree-view:toggle', => @toggle() - @rootView.command 'tree-view:reveal-active-file', => @revealActiveFile() + @rootView.on 'root-view:active-path-changed', => @selectActiveFile() @rootView.project.on 'path-changed', => @updateRoot() @observeConfig 'core.hideGitIgnoredFiles', => @updateRoot() @@ -79,6 +79,7 @@ class TreeView extends ScrollView hasFocus: @hasFocus() attached: @hasParent() scrollTop: @scrollTop() + width: @width() deactivate: -> @root?.unwatchEntries() @@ -102,8 +103,11 @@ class TreeView extends ScrollView super @rootView.focus() + focus: -> + @treeViewList.focus() + hasFocus: -> - @is(':focus') + @treeViewList.is(':focus') entryClicked: (e) -> entry = $(e.currentTarget).view() @@ -119,11 +123,24 @@ class TreeView extends ScrollView false + resizeStarted: (e) => + $(document.body).on('mousemove', @resizeTreeView) + $(document.body).on('mouseup', @resizeStopped) + @css(overflow: 'hidden') + + resizeStopped: (e) => + $(document.body).off('mousemove', @resizeTreeView) + $(document.body).off('mouseup', @resizeStopped) + @css(overflow: 'auto') + + resizeTreeView: (e) => + @css(width: e.pageX) + updateRoot: -> @root?.remove() if rootDirectory = @rootView.project.getRootDirectory() @root = new DirectoryView(directory: rootDirectory, isExpanded: true, project: @rootView.project) - @append(@root) + @treeViewList.append(@root) else @root = null @@ -146,6 +163,7 @@ class TreeView extends ScrollView entry.expand() else @selectEntry(entry) + @scrollToEntry(entry) entryForPath: (path) -> fn = (bestMatchEntry, element) -> @@ -156,7 +174,7 @@ class TreeView extends ScrollView else bestMatchEntry - @find(".entry").toArray().reduce(fn, @root) + @treeViewList.find(".entry").toArray().reduce(fn, @root) selectEntryForPath: (path) -> @selectEntry(@entryForPath(path)) @@ -166,7 +184,7 @@ class TreeView extends ScrollView if selectedEntry if selectedEntry.is('.expanded.directory') return if @selectEntry(selectedEntry.find('.entry:first')) - until @selectEntry(selectedEntry.next()) + until @selectEntry(selectedEntry.next('.entry')) selectedEntry = selectedEntry.parents('.entry:first') break unless selectedEntry.length else @@ -177,13 +195,13 @@ class TreeView extends ScrollView moveUp: -> selectedEntry = @selectedEntry() if selectedEntry - if previousEntry = @selectEntry(selectedEntry.prev()) + if previousEntry = @selectEntry(selectedEntry.prev('.entry')) if previousEntry.is('.expanded.directory') @selectEntry(previousEntry.find('.entry:last')) else @selectEntry(selectedEntry.parents('.directory').first()) else - @selectEntry(@find('.entry').last()) + @selectEntry(@treeViewList.find('.entry').last()) @scrollToEntry(@selectedEntry()) @@ -277,32 +295,43 @@ class TreeView extends ScrollView @rootView.append(dialog) selectedEntry: -> - @find('.selected')?.view() + @treeViewList.find('.selected')?.view() selectEntry: (entry) -> return false unless entry.get(0) entry = entry.view() unless entry instanceof View @selectedPath = entry.getPath() - @find('.selected').removeClass('selected') + @treeViewList.find('.selected').removeClass('selected') entry.addClass('selected') + scrollTop: (top) -> + if top + @treeViewList.scrollTop(top) + else + @treeViewList.scrollTop() + + scrollBottom: (bottom) -> + if bottom + @treeViewList.scrollBottom(bottom) + else + @treeViewList.scrollBottom() + scrollToEntry: (entry) -> displayElement = if entry instanceof DirectoryView then entry.header else entry - top = @scrollTop() + displayElement.position().top bottom = top + displayElement.outerHeight() - if bottom > @scrollBottom() - @scrollBottom(bottom) + @treeViewList.scrollBottom(bottom) if top < @scrollTop() - @scrollTop(top) + @treeViewList.scrollTop(top) scrollToBottom: -> super() @selectEntry(@root.find('.entry:last')) if @root + @scrollToEntry(@root.find('.entry:last')) if @root scrollToTop: -> super() - @selectEntry(@root) if @root + @treeViewList.scrollTop(0) diff --git a/src/packages/tree-view/stylesheets/tree-view.css b/src/packages/tree-view/stylesheets/tree-view.css index b9de058e2..723b85f2e 100644 --- a/src/packages/tree-view/stylesheets/tree-view.css +++ b/src/packages/tree-view/stylesheets/tree-view.css @@ -1,202 +1,57 @@ -.tree-view { +.tree-view-wrapper { position: relative; height: 100%; - background: #1e1e1e; - overflow: auto; cursor: default; -webkit-user-select: none; - border-right: 2px solid #191919; - min-width: 100px; + min-width: 50px; z-index: 2; - padding-left: 12px; +} + +.tree-view { + position: relative; + cursor: default; + -webkit-user-select: none; + overflow: auto; + height: 100%; +} + +.tree-view-wrapper .tree-view-resizer { + position: absolute; + top: 0; + right: 0; + bottom: 0; + width: 10px; + cursor: col-resize; + z-index: 3; } .tree-view .entry { - text-shadow: 0 -1px 0 #000; + text-wrap: none; + white-space: nowrap; } -.tree-view .entries { - margin-left: 12px; -} - -.tree-view .entries .file .name { - margin-left: 15px; -} - -.tree-view .directory.selected > .header > .name, -.tree-view .selected > .name { - color: #d2d2d2; +.tree-view .entry > .header, +.tree-view .entry > .name { + z-index: 1; + position: relative; + display: inline-block; } .tree-view .selected > .highlight { - background-image: -webkit-linear-gradient(#4e4e4e, #434343); position: absolute; left: 0; right: 0; height: 24px; - margin-top:-24px; - z-index: -1; -} - -.tree-view:focus .selected > .highlight { - background-image: -webkit-linear-gradient(#7e7e7e, #737373); -} - -.tree-view:focus .directory.selected > .header > .name, -.tree-view:focus .selected > .name { - color: #fff; - text-shadow: 0 -1px 0 #7E4521; -} - -.tree-view .entry.file .name { - display: block; } .tree-view .disclosure-arrow { display: inline-block; } -.tree-view .directory .header { - color: #bebebe; -} - -.tree-view .file { - color: #7d7d7d; -} - -.tree-view .entry:hover, -.tree-view .directory .header:hover .name, -.tree-view .directory .header:hover .disclosure-arrow { - color: #ebebeb; -} - -.tree-view .file .name, -.tree-view .directory .header { - padding-top: 4px; - padding-bottom: 4px; - padding-right: 10px; -} - -.tree-view .ignored { - color: #555; -} - -.tree-view .modified { - color: #f78a46; -} - -.tree-view .new { - color: #5293d8; -} - .tree-view-dialog { position: absolute; bottom: 0; left: 0; right: 0; - background-color: #333; - border-top: 1px solid #555; - -webkit-box-shadow: 0 0 3px 3px rgba(0, 0, 0, .5); z-index: 99; - padding: 5px; -} - -.tree-view-dialog .prompt { - padding-bottom: 3px; - font-size: 12px; - line-height: 16px; - color: #aaa; -} - -.tree-view-dialog .prompt span { - position: relative; - top: -1px; -} - -.tree-view-dialog .prompt:before { - font-family: 'Octicons Regular'; - font-size: 16px; - width: 16px; - height: 16px; - margin-right: 3px; - -webkit-font-smoothing: antialiased; -} - -.tree-view-dialog .prompt.add:before { - content: "\f086"; -} - -.tree-view-dialog .prompt.move:before { - content: "\f03e"; -} - -.tree-view .directory .header .name, -.tree-view .file .name { - position: relative; - padding-left: 21px; -} - -.tree-view .directory .header .name:before, -.tree-view .file .name:before { - font-family: 'Octicons Regular'; - font-size: 16px; - width: 16px; - height: 16px; - margin-right: 5px; - -webkit-font-smoothing: antialiased; - position: absolute; - left: 0; -} - -.tree-view .disclosure-arrow:before { - font-family: 'Octicons Regular'; - font-size: 12px; - width: 12px; - height: 12px; - line-height: 16px; - margin-right: 3px; - -webkit-font-smoothing: antialiased; -} - -.tree-view .directory .header .directory-icon:before { - content: "\f016"; - top: -5px; -} - -.tree-view .directory .header .repository-icon:before { - content: "\f001"; - top: -4px; -} - -.tree-view .directory .header .submodule-icon:before { - content: "\f017"; - top: -5px; -} - -.tree-view .file .text-icon:before { - content: "\f011"; - top: -2px; -} - -.tree-view .file .image-icon:before { - content: "\f012"; - top: -2px; -} - -.tree-view .file .compressed-icon:before { - content: "\f013"; - top: -2px; -} - -.tree-view .file .pdf-icon:before { - content: "\f014"; - top: -2px; -} - -.tree-view .directory > .header .disclosure-arrow:before { - content: "\f05a"; -} - -.tree-view .directory.expanded > .header .disclosure-arrow:before { - content: "\f05b"; } diff --git a/src/packages/wrap-guide/index.coffee b/src/packages/wrap-guide/index.coffee index f8a95c569..1f9ab8ffd 100644 --- a/src/packages/wrap-guide/index.coffee +++ b/src/packages/wrap-guide/index.coffee @@ -1 +1,6 @@ -module.exports = require 'wrap-guide/src/wrap-guide' +AtomPackage = require 'atom-package' +WrapGuideView = require './src/wrap-guide-view' + +module.exports = +class WrapGuide extends AtomPackage + activate: (rootView) -> WrapGuideView.activate(rootView) diff --git a/src/packages/wrap-guide/src/wrap-guide.coffee b/src/packages/wrap-guide/src/wrap-guide-view.coffee similarity index 93% rename from src/packages/wrap-guide/src/wrap-guide.coffee rename to src/packages/wrap-guide/src/wrap-guide-view.coffee index ffc9a95b7..35dd192d8 100644 --- a/src/packages/wrap-guide/src/wrap-guide.coffee +++ b/src/packages/wrap-guide/src/wrap-guide-view.coffee @@ -3,14 +3,14 @@ $ = require 'jquery' _ = require 'underscore' module.exports = -class WrapGuide extends View +class WrapGuideView extends View @activate: (rootView, state) -> rootView.eachEditor (editor) => @appendToEditorPane(rootView, editor) if editor.attached @appendToEditorPane: (rootView, editor) -> if underlayer = editor.pane()?.find('.underlayer') - underlayer.append(new WrapGuide(rootView, editor)) + underlayer.append(new WrapGuideView(rootView, editor)) @content: -> @div class: 'wrap-guide' diff --git a/src/packages/wrap-guide/stylesheets/wrap-guide.css b/src/packages/wrap-guide/stylesheets/wrap-guide.css index 9f93ee19e..b73c85264 100644 --- a/src/packages/wrap-guide/stylesheets/wrap-guide.css +++ b/src/packages/wrap-guide/stylesheets/wrap-guide.css @@ -1,7 +1,6 @@ .wrap-guide { height: 100%; width: 1px; - background: rgba(150, 150, 150, .30); z-index: 100; position: absolute; top: 0px; diff --git a/src/stdlib/fs.coffee b/src/stdlib/fs.coffee index 976f3bb5f..39ae82334 100644 --- a/src/stdlib/fs.coffee +++ b/src/stdlib/fs.coffee @@ -143,7 +143,7 @@ module.exports = if extension == "" return path if @exists(path) else - pathWithExtension = path + "." + extension + pathWithExtension = path + "." + extension.replace(/^\./, "") return pathWithExtension if @exists(pathWithExtension) undefined diff --git a/static/atom.css b/static/atom.css index 13a207fee..4f70a0574 100644 --- a/static/atom.css +++ b/static/atom.css @@ -1,5 +1,4 @@ html, body { - font: caption; width: 100%; height: 100%; overflow: hidden; @@ -9,7 +8,6 @@ html, body { height: 100%; overflow: hidden; position: relative; - background-color: #333333; } #root-view #horizontal { @@ -28,17 +26,6 @@ html, body { position: relative; } -#root-view #panes:before { - display: block; - content: "\f208"; - font-family: 'Octicons Regular'; - color: #303030; - -webkit-font-smoothing: antialiased; - font-size: 100vmin; - line-height: 100vmin; - text-align: center; -} - #root-view #panes .column { position: absolute; top: 0; @@ -66,28 +53,4 @@ html, body { left: 0; right: 0; box-sizing: border-box; -} - -#root-view #panes .row > * + * { - border-left: 5px solid #515151; -} - -#root-view #panes .column > * + * { - border-top: 5px solid #515151; -} - -.error { - background: #991212 !important; - -webkit-transition: background 300ms ease-out; -} - -.clear-float { - clear: both; -} - -@font-face { - font-family: 'Octicons Regular'; - src: url("octicons-regular-webfont.woff") format("woff"); - font-weight: normal; - font-style: normal; -} +} \ No newline at end of file diff --git a/static/editor.css b/static/editor.css index b2f84e73a..bdd9f2825 100644 --- a/static/editor.css +++ b/static/editor.css @@ -6,7 +6,6 @@ -webkit-box-flex: 1; position: relative; z-index: 0; - font-family: Inconsolata, Monaco, Courier; } .editor.mini { @@ -17,7 +16,6 @@ position: absolute; height: 100%; overflow: hidden; - color: rgba(255, 255, 255, .3); text-align: right; } @@ -25,28 +23,10 @@ position: relative; } -.editor .gutter .line-number { - padding-left: 0.4em; - padding-right: 0.8em; -} - -.editor.focused .line-number.cursor-line { - color: rgba(255, 255, 255, .6); -} - -.editor.focused .line-number.cursor-line-no-selection, -.editor.focused .line.cursor-line { - background-color: rgba(255, 255, 255, .20); -} - .editor.mini .gutter { display: none; } -.editor .gutter.drop-shadow { - -webkit-box-shadow: -2px 0px 10px 2px #222; -} - .editor .vertical-scrollbar { position: absolute; right: 0; @@ -123,27 +103,4 @@ position: absolute; pointer-events: none; z-index: -1; -} - -@-webkit-keyframes highlight { - from { background-color: rgba(100, 255, 100, 0.7); } - to { background-color: null; } -} - -.editor .highlighted.selection .region { - -webkit-animation-name: highlight; - -webkit-animation-duration: 1s; - -webkit-animation-iteration-count: 1; -} - -.editor .fold { - background-color: #444; -} - -.editor .fold.selected { - background-color: #244; -} - -.editor .invisible { - opacity: 0.2; -} +} \ No newline at end of file diff --git a/static/grammar-view.css b/static/grammar-view.css index 582dd98d8..1cbeeba30 100644 --- a/static/grammar-view.css +++ b/static/grammar-view.css @@ -5,24 +5,4 @@ .grammar-view ol { max-height: 300px; -} - -.grammar-view ol li { - padding: 2px; - border-bottom: 1px solid rgba(255, 255, 255, .05); - line-height: 16px; -} - -.grammar-view ol li.grammar { - padding-left: 21px; -} - -.grammar-view ol li.current-grammar:before { - font-family: 'Octicons Regular'; - width: 16px; - height: 16px; - margin-right: 5px; - -webkit-font-smoothing: antialiased; - color: #ccc; - content: '\f03a'; -} +} \ No newline at end of file diff --git a/static/index.html b/static/index.html index 582a8c87b..0e27bf115 100644 --- a/static/index.html +++ b/static/index.html @@ -1,5 +1,5 @@ - + diff --git a/static/select-list.css b/static/select-list.css index 9e716d9f2..f2472e3c6 100644 --- a/static/select-list.css +++ b/static/select-list.css @@ -1,35 +1,19 @@ .select-list { position: absolute; - width: 80%; + width: 600px; top: 0; left: 50%; - margin-left: -40%; - background-color: #444; + margin-left: -300px; box-sizing: border-box; - color: #eee; - -webkit-box-shadow: 0 0 5px 5px #222; - padding: 5px; z-index: 99; } .select-list .editor { - margin-bottom: 5px; + box-sizing: border-box; + padding: 5px; } .select-list ol { position: relative; overflow-y: auto; -} - -.select-list li:hover { - background-color: #555; -} - -.select-list ol .selected { - background: green; -} - -.select-list .error { - padding-top: 5px; - font-weight: bold; -} +} \ No newline at end of file diff --git a/themes/Atom - Dark/atom.css b/themes/Atom - Dark/atom.css new file mode 100644 index 000000000..2e5a1355b --- /dev/null +++ b/themes/Atom - Dark/atom.css @@ -0,0 +1,40 @@ +html, body, +#root-view { + font: caption; + background-color: #333333; +} + +#root-view #panes:before { + display: block; + content: "\f208"; + font-family: 'Octicons Regular'; + color: #303030; + -webkit-font-smoothing: antialiased; + font-size: 100vmin; + line-height: 100vmin; + text-align: center; +} + +#root-view #panes .row > * + * { + border-left: 5px solid #515151; +} + +#root-view #panes .column > * + * { + border-top: 5px solid #515151; +} + +.error { + background: #991212 !important; + -webkit-transition: background 300ms ease-out; +} + +.clear-float { + clear: both; +} + +@font-face { + font-family: 'Octicons Regular'; + src: url("octicons-regular-webfont.woff") format("woff"); + font-weight: normal; + font-style: normal; +} diff --git a/themes/Atom - Dark/autocomplete.css b/themes/Atom - Dark/autocomplete.css new file mode 100644 index 000000000..290713336 --- /dev/null +++ b/themes/Atom - Dark/autocomplete.css @@ -0,0 +1,17 @@ +.select-list.autocomplete { + min-width: 150px; + border: 2px solid #222; + webkit-box-shadow: 0 0 3px 3px rgba(0, 0, 0, .5); + margin-left: 0px; + width: auto; +} + +.autocomplete ol { + position: relative; + overflow-y: scroll; + max-height: 200px; +} + +.autocomplete ol li { + padding: 0.1em 0.2em; +} diff --git a/themes/Atom - Dark/command-logger.css b/themes/Atom - Dark/command-logger.css new file mode 100644 index 000000000..56822c247 --- /dev/null +++ b/themes/Atom - Dark/command-logger.css @@ -0,0 +1,41 @@ +.command-logger { + background: #1e1e1e; + color: #eee; + padding-top: 10px; + padding-bottom: 10px; +} + +.command-logger .category-header { + text-align: center; + padding-bottom: 5px; + font-size: 16px; +} + +.command-logger .category-summary { + text-align: center; + padding-bottom: 10px; + font-size: 12px; +} + +.command-logger .tree-map { + margin: auto; + background-color: #efefef; + border: 1px solid #999; +} + +body.command-logger-node-text { + background-color: transparent; +} + +.command-logger-node-text div { + display: table-cell; + vertical-align: middle; + text-align: center; + cursor: pointer; +} + +.command-logger-node-text span { + font-size: 10px; + color: #fff; + text-shadow: #000 1px 1px 4px; +} diff --git a/src/packages/command-palette/stylesheets/command-palette.css b/themes/Atom - Dark/command-palette.css similarity index 86% rename from src/packages/command-palette/stylesheets/command-palette.css rename to themes/Atom - Dark/command-palette.css index c3c29053c..0cadfbcae 100644 --- a/src/packages/command-palette/stylesheets/command-palette.css +++ b/themes/Atom - Dark/command-palette.css @@ -7,11 +7,6 @@ max-height: 300px; } -.command-palette ol li { - padding: 2px; - border-bottom: 1px solid rgba(255, 255, 255, .05); -} - .command-palette ol .event-description { float: left; display: inline-block; diff --git a/src/packages/command-panel/stylesheets/command-panel.css b/themes/Atom - Dark/command-panel.css similarity index 88% rename from src/packages/command-panel/stylesheets/command-panel.css rename to themes/Atom - Dark/command-panel.css index 8f4a6e405..dfc7f225b 100644 --- a/src/packages/command-panel/stylesheets/command-panel.css +++ b/themes/Atom - Dark/command-panel.css @@ -15,6 +15,13 @@ cursor: default; } +.command-panel .preview-count { + font-size: 11px; + color: #969696; + text-align: right; + padding-bottom: 1px; +} + .command-panel .preview-list li.selected, .command-panel .preview-list li.operation:hover { background-color: rgba(255, 255, 255, .13); } @@ -53,6 +60,11 @@ display: inline-block; } +.command-panel .preview-list .path-match-number { + padding-left: 8px; + color: rgba(255, 255, 255, .3); +} + .command-panel .preview-list .preview { word-break: break-all; } diff --git a/themes/Atom - Dark/editor.css b/themes/Atom - Dark/editor.css new file mode 100644 index 000000000..6581aaa59 --- /dev/null +++ b/themes/Atom - Dark/editor.css @@ -0,0 +1,46 @@ +.editor { + font-family: Inconsolata, Monaco, Courier; +} + +.editor.mini { + height: auto; +} + +.editor .gutter .line-number { + padding-right: 1.3em; + min-width: 35px; + box-sizing: border-box; + text-align: right; + opacity: 0.6; +} + +.editor .gutter .line-number.cursor-line { + opacity: 1; +} + +.editor .gutter.drop-shadow { + -webkit-box-shadow: -2px 0px 10px 2px #222; +} + +@-webkit-keyframes highlight { + from { background-color: rgba(100, 255, 100, 0.7); } + to { background-color: null; } +} + +.editor .highlighted.selection .region { + -webkit-animation-name: highlight; + -webkit-animation-duration: 1s; + -webkit-animation-iteration-count: 1; +} + +.editor .fold { + background-color: #444; +} + +.editor .fold.selected { + background-color: #244; +} + +.editor .invisible { + opacity: 0.2; +} diff --git a/src/packages/fuzzy-finder/stylesheets/fuzzy-finder.css b/themes/Atom - Dark/fuzzy-finder.css similarity index 86% rename from src/packages/fuzzy-finder/stylesheets/fuzzy-finder.css rename to themes/Atom - Dark/fuzzy-finder.css index 4257e3729..3d0218083 100644 --- a/src/packages/fuzzy-finder/stylesheets/fuzzy-finder.css +++ b/themes/Atom - Dark/fuzzy-finder.css @@ -1,12 +1,12 @@ .fuzzy-finder ol { overflow: hidden; - margin-bottom: 5px; -webkit-user-select: none; cursor: default; } .fuzzy-finder ol:empty { margin-bottom: 0; + border: none; } .fuzzy-finder .directory { @@ -39,8 +39,4 @@ .fuzzy-finder .file.pdf-name:before { content: "\f014"; -} - -.fuzzy-finder ol li { - border-bottom: 1px solid rgba(255, 255, 255, .05); -} +} \ No newline at end of file diff --git a/themes/Atom - Dark/gists.css b/themes/Atom - Dark/gists.css new file mode 100644 index 000000000..dde2dbd25 --- /dev/null +++ b/themes/Atom - Dark/gists.css @@ -0,0 +1,35 @@ +.gist-notification { + position: absolute; + top: 6px; + left: 50%; + margin-left: -5%; + z-index: 99; + padding-left: 5px; + padding-right: 10px; + -webkit-box-shadow: 0px 0px 5px 5px #222; + color: #BBB; + background-color: #333; +} + +.gist-notification .message-area { + float: right; + padding-top: 11px; +} + +.gist-notification .message { + font-size: 13px; +} + +.gist-notification .clipboard { + font-size: 11px; +} + +.gist-notification:before { + font-family: 'Octicons Regular'; + font-size: 32px; + width: 32px; + height: 32px; + margin-right: 5px; + -webkit-font-smoothing: antialiased; + content: "\f08c"; +} diff --git a/themes/Atom - Dark/go-to-line.css b/themes/Atom - Dark/go-to-line.css new file mode 100644 index 000000000..4ceec81aa --- /dev/null +++ b/themes/Atom - Dark/go-to-line.css @@ -0,0 +1,27 @@ +.go-to-line { + position: absolute; + width: 200px; + top: 0; + left: 50%; + margin-left: -100px; + box-sizing: border-box; + z-index: 99; + background-color: #484848; + border: 1px solid #444; + color: #d2d2d2; + box-shadow: 0 0 10px #000; + border-bottom-left-radius: 3px; + border-bottom-right-radius: 3px; + padding: 5px; + cursor: pointer; +} + +.go-to-line .editor { + box-sizing: border-box; + padding: 5px; +} + +.go-to-line .message { + padding-top: 2px; + font-size: 11px; +} diff --git a/themes/Atom - Dark/grammar-view.css b/themes/Atom - Dark/grammar-view.css new file mode 100644 index 000000000..7be94f4c0 --- /dev/null +++ b/themes/Atom - Dark/grammar-view.css @@ -0,0 +1,17 @@ +.grammar-view ol li { + line-height: 16px; +} + +.grammar-view ol li.grammar { + padding-left: 21px; +} + +.grammar-view ol li.current-grammar:before { + font-family: 'Octicons Regular'; + width: 16px; + height: 16px; + margin-right: 5px; + -webkit-font-smoothing: antialiased; + color: #ccc; + content: '\f03a'; +} diff --git a/src/packages/markdown-preview/stylesheets/markdown-preview.css b/themes/Atom - Dark/markdown-preview.css similarity index 100% rename from src/packages/markdown-preview/stylesheets/markdown-preview.css rename to themes/Atom - Dark/markdown-preview.css diff --git a/themes/Atom - Dark/package.json b/themes/Atom - Dark/package.json new file mode 100644 index 000000000..28f90e051 --- /dev/null +++ b/themes/Atom - Dark/package.json @@ -0,0 +1,21 @@ +{ + "stylesheets":[ + "atom.css", + "editor.css", + "grammar-view.css", + "select-list.css", + "tree-view.css", + "tabs.css", + "wrap-guide.css", + "status-bar.css", + "symbols-view.css", + "markdown-preview.css", + "fuzzy-finder.css", + "command-panel.css", + "command-palette.css", + "command-logger.css", + "autocomplete.css", + "gists.css", + "go-to-line.css" + ] +} diff --git a/themes/Atom - Dark/select-list.css b/themes/Atom - Dark/select-list.css new file mode 100644 index 000000000..29aac3f03 --- /dev/null +++ b/themes/Atom - Dark/select-list.css @@ -0,0 +1,42 @@ +.select-list { + background-color: #484848; + border: 1px solid #444; + color: #d2d2d2; + box-shadow: 0 0 10px #000; + border-bottom-left-radius: 3px; + border-bottom-right-radius: 3px; + padding: 5px; + cursor: pointer; +} + +.select-list ol { + border: 1px solid #212121; +} + +.select-list ol li { + background-color: #292929; + border-bottom: 1px solid #212121; + padding: 5px; +} + +.select-list ol li:last-child { + border-bottom: none; +} + +.select-list .editor { + margin-bottom: 5px; +} + +.select-list li:hover { + background-color: #555; +} + +.select-list ol .selected { + background-image: -webkit-linear-gradient(#7e7e7e, #737373); +} + +.select-list .error { + font-weight: bold; + color: white; + text-shadow: 0 1px 0 #4E0000; +} \ No newline at end of file diff --git a/themes/Atom - Dark/status-bar.css b/themes/Atom - Dark/status-bar.css new file mode 100644 index 000000000..f517760f4 --- /dev/null +++ b/themes/Atom - Dark/status-bar.css @@ -0,0 +1,61 @@ +.status-bar { + background-color: #303030; + border-top: 1px solid #454545; + padding: 4px 10px 3px; + font-size: 11px; + line-height: 14px; + color: #969696; +} + +.status-bar .cursor-position, +.status-bar .grammar-name { + padding-left: 10px; +} + +.status-bar .grammar-name { + cursor: pointer; +} + +.status-bar .branch-label { + vertical-align: baseline; +} + +.status-bar .git-status.octicons { + display: none; + padding-left: 10px; + margin-top:-2px; +} + +.status-bar .octicons:before { + font-family: 'Octicons Regular'; + font-size: 14px; + width: 14px; + height: 14px; + line-height: 14px; + -webkit-font-smoothing: antialiased; + display: inline-block; + vertical-align: middle; + margin-right: 5px; +} + +.status-bar .branch-icon:before { + content: "\f020"; +} + +.status-bar .git-status.octicons.modified-status-icon { + color: #f78a46; + display: inline-block; +} + +.status-bar .modified-status-icon:before { + content: "\f26d"; +} + +.status-bar .git-status.octicons.new-status-icon { + color: #5293d8; + display: inline-block; +} + +.status-bar .new-status-icon:before { + content: "\f26b"; +} diff --git a/src/packages/outline-view/stylesheets/outline-view.css b/themes/Atom - Dark/symbols-view.css similarity index 72% rename from src/packages/outline-view/stylesheets/outline-view.css rename to themes/Atom - Dark/symbols-view.css index a5146bc38..0cbdbfa53 100644 --- a/src/packages/outline-view/stylesheets/outline-view.css +++ b/themes/Atom - Dark/symbols-view.css @@ -1,29 +1,29 @@ -.outline-view { +.symbols-view { width: 50%; margin-left: -25%; } -.outline-view ol { +.symbols-view ol { max-height: 300px; } -.outline-view ol li { +.symbols-view ol li { padding: 2px; border-bottom: 1px solid rgba(255, 255, 255, .05); } -.outline-view ol .function-name { +.symbols-view ol .function-name { float: left; display: inline-block; margin-right: .5em; margin: 4px 0; } -.outline-view li .right { +.symbols-view li .right { float: right; } -.outline-view ol .function-details { +.symbols-view ol .function-details { display: inline-block; margin: 4px 0; margin-right: .5em; diff --git a/themes/Atom - Dark/tabs.css b/themes/Atom - Dark/tabs.css new file mode 100644 index 000000000..732a5c3aa --- /dev/null +++ b/themes/Atom - Dark/tabs.css @@ -0,0 +1,123 @@ +.tabs { + background: #333333; + border-bottom: 4px solid #424242; + font: caption; + box-shadow: inset 0 -1px 0 #2e2e2e; +} + +.tab { + cursor: default; + padding: 2px 21px 2px 9px; + background-image: -webkit-linear-gradient(#444, #3d3d3d); + border-top: 1px solid #383838; + border-right: 1px solid #2e2e2e; + border-bottom: 1px solid #2e2e2e; + box-shadow: inset 0 0 5px #383838, 0 1px 0 #585858, inset -1px 0 0 #4a4a4a, inset 1px 0 0 #4a4a4a; +} + +.tab, +.tab .close-icon { + color: #aaa; +} + +.tab.file-modified .close-icon { + border-color: #aaa; +} + +.tab.active, +.tab.active:hover, +.tab.active .close-icon { + color: #e6e6e6; +} + +.tab.file-modified.active .close-icon { + border-color: #e6e6e6; +} + +.tab:hover .close-icon { + color: #c8c8c8; + border-color: #c8c8c8; +} + +.tab.file-modified .close-icon { + border: 3px solid #777; + border-radius: 10px; +} + +.tab.file-modified .close-icon:before { + content: ""; +} + +.tab:first-child { + box-shadow: inset 0 0 5px #383838, 0 1px 0 #585858, inset -1px 0 0 #4a4a4a; +} + +.tab.active:first-child, +.tab.active:first-child:hover { + box-shadow: inset -1px 0 0 #595959; +} + +.tab.active, +.tab.active:hover { + border-top: 1px solid #4a4a4a; + box-shadow: inset -1px 0 0 #595959, inset 1px 0 0 #595959; + border-bottom: 0 none; + background-image: -webkit-linear-gradient(#555555, #424242); +} + +.tab.active:before, +.tab.active:after { + position: absolute; + bottom: -1px; + width: 4px; + height: 4px; + content: " "; + z-index: 3; + border: 1px solid #595959; +} +.tab.active:before { + border-bottom-right-radius: 4px; + border-width: 0 1px 1px 0; + box-shadow: 2px 2px 0 #424242; + left: -4px; +} +.tab.active:after { + right: -4px; + border-bottom-left-radius: 4px; + border-width: 0 0 1px 1px; + box-shadow: -2px 2px 0 #424242; +} +.tab.active:first-child:before { + display: none; +} + +.tab:hover { + color: #c8c8c8; + background-image: -webkit-linear-gradient(#474747, #444444); +} + +.tab .file-name { + font-size: 11px; + text-shadow: 0 -1px 1px black; +} + +.tab .close-icon { + font-family: 'Octicons Regular'; + font-size: 14px; + width: 14px; + height: 14px; + display: block; + cursor: pointer; + position: absolute; + right: 4px; + top: -1px; + -webkit-font-smoothing: antialiased; +} + +.tab .close-icon:before { + content: "\f081"; +} + +.tab .close-icon:hover { + color: white; +} diff --git a/themes/Atom - Dark/tree-view.css b/themes/Atom - Dark/tree-view.css new file mode 100644 index 000000000..ea27fd587 --- /dev/null +++ b/themes/Atom - Dark/tree-view.css @@ -0,0 +1,179 @@ +.tree-view { + background: #1e1e1e; + border-right: 2px solid #191919; +} + +.tree-view .entry { + text-shadow: 0 -1px 0 #000; +} + +.tree-view .entries { + margin-left: 12px; +} + +.tree-view .entries .file .name { + margin-left: 20px; +} + +.tree-view .directory.selected > .header > .name, +.tree-view .selected > .name { + color: #d2d2d2; +} + +.tree-view .selected > .highlight { + background-image: -webkit-linear-gradient(#4e4e4e, #434343); +} + +.tree-view:focus .selected > .highlight { + background-image: -webkit-linear-gradient(#7e7e7e, #737373); +} + +.tree-view:focus .directory.selected > .header > .name, +.tree-view:focus .selected > .name { + color: #fff; + text-shadow: 0 -1px 0 #7E4521; +} + +.tree-view .directory .header { + color: #bebebe; +} + +.tree-view .file { + color: #7d7d7d; +} + +.tree-view .entry:hover, +.tree-view .directory .header:hover .name, +.tree-view .directory .header:hover .disclosure-arrow { + color: #ebebeb; +} + +.tree-view .file .name, +.tree-view .directory .header { + padding-top: 4px; + padding-bottom: 4px; + padding-right: 10px; +} + +.tree-view .directory .header { + padding-left: 5px; +} + +.tree-view .ignored { + color: #555; +} + +.tree-view .modified { + color: #f78a46; +} + +.tree-view .new { + color: #5293d8; +} + +.tree-view-dialog { + background-color: #333; + border-top: 1px solid #555; + -webkit-box-shadow: 0 0 3px 3px rgba(0, 0, 0, .5); + padding: 5px; +} + +.tree-view-dialog .prompt { + padding-bottom: 3px; + font-size: 12px; + line-height: 16px; + color: #aaa; +} + +.tree-view-dialog .prompt span { + position: relative; + top: -1px; +} + +.tree-view-dialog .prompt:before { + font-family: 'Octicons Regular'; + font-size: 16px; + width: 16px; + height: 16px; + margin-right: 3px; + -webkit-font-smoothing: antialiased; +} + +.tree-view-dialog .prompt.add:before { + content: "\f086"; +} + +.tree-view-dialog .prompt.move:before { + content: "\f03e"; +} + +.tree-view .directory .header .name, +.tree-view .file .name { + position: relative; + padding-left: 21px; +} + +.tree-view .directory .header .name:before, +.tree-view .file .name:before { + font-family: 'Octicons Regular'; + font-size: 16px; + width: 16px; + height: 16px; + margin-right: 5px; + -webkit-font-smoothing: antialiased; + position: absolute; + left: 0; +} + +.tree-view .disclosure-arrow:before { + font-family: 'Octicons Regular'; + font-size: 12px; + width: 12px; + height: 12px; + line-height: 16px; + margin-right: 3px; + -webkit-font-smoothing: antialiased; +} + +.tree-view .directory .header .directory-icon:before { + content: "\f016"; + top: -5px; +} + +.tree-view .directory .header .repository-icon:before { + content: "\f001"; + top: -4px; +} + +.tree-view .directory .header .submodule-icon:before { + content: "\f017"; + top: -5px; +} + +.tree-view .file .text-icon:before { + content: "\f011"; + top: -2px; +} + +.tree-view .file .image-icon:before { + content: "\f012"; + top: -2px; +} + +.tree-view .file .compressed-icon:before { + content: "\f013"; + top: -2px; +} + +.tree-view .file .pdf-icon:before { + content: "\f014"; + top: -2px; +} + +.tree-view .directory > .header .disclosure-arrow:before { + content: "\f05a"; +} + +.tree-view .directory.expanded > .header .disclosure-arrow:before { + content: "\f05b"; +} diff --git a/themes/Atom - Dark/wrap-guide.css b/themes/Atom - Dark/wrap-guide.css new file mode 100644 index 000000000..51660ea4c --- /dev/null +++ b/themes/Atom - Dark/wrap-guide.css @@ -0,0 +1,3 @@ +.wrap-guide { + background: rgba(150, 150, 150, .30); +} diff --git a/themes/Atom - Light/atom.css b/themes/Atom - Light/atom.css new file mode 100644 index 000000000..772922301 --- /dev/null +++ b/themes/Atom - Light/atom.css @@ -0,0 +1,29 @@ +html, body, +#root-view { + font: caption; + background-color: #f4f4f4; +} + +#root-view #panes .row > * + * { + border-left: 1px solid #989898; +} + +#root-view #panes .column > * + * { + border-top: 1px solid #989898; +} + +.error { + background: #991212 !important; + -webkit-transition: background 300ms ease-out; +} + +.clear-float { + clear: both; +} + +@font-face { + font-family: 'Octicons Regular'; + src: url("octicons-regular-webfont.woff") format("woff"); + font-weight: normal; + font-style: normal; +} diff --git a/themes/Atom - Light/autocomplete.css b/themes/Atom - Light/autocomplete.css new file mode 100644 index 000000000..c121407d0 --- /dev/null +++ b/themes/Atom - Light/autocomplete.css @@ -0,0 +1,16 @@ +.select-list.autocomplete { + min-width: 150px; + webkit-box-shadow: 0 0 3px rgba(0, 0, 0, .5); + margin-left: 0px; + width: auto; +} + +.autocomplete ol { + position: relative; + overflow-y: scroll; + max-height: 200px; +} + +.autocomplete ol li { + padding: 0.1em 0.2em; +} diff --git a/themes/Atom - Light/command-logger.css b/themes/Atom - Light/command-logger.css new file mode 100644 index 000000000..56822c247 --- /dev/null +++ b/themes/Atom - Light/command-logger.css @@ -0,0 +1,41 @@ +.command-logger { + background: #1e1e1e; + color: #eee; + padding-top: 10px; + padding-bottom: 10px; +} + +.command-logger .category-header { + text-align: center; + padding-bottom: 5px; + font-size: 16px; +} + +.command-logger .category-summary { + text-align: center; + padding-bottom: 10px; + font-size: 12px; +} + +.command-logger .tree-map { + margin: auto; + background-color: #efefef; + border: 1px solid #999; +} + +body.command-logger-node-text { + background-color: transparent; +} + +.command-logger-node-text div { + display: table-cell; + vertical-align: middle; + text-align: center; + cursor: pointer; +} + +.command-logger-node-text span { + font-size: 10px; + color: #fff; + text-shadow: #000 1px 1px 4px; +} diff --git a/themes/Atom - Light/command-palette.css b/themes/Atom - Light/command-palette.css new file mode 100644 index 000000000..272b6b806 --- /dev/null +++ b/themes/Atom - Light/command-palette.css @@ -0,0 +1,34 @@ +.command-palette { + width: 50%; + margin-left: -25%; +} + +.command-palette ol { + max-height: 300px; +} + +.command-palette ol .event-description { + float: left; + display: inline-block; + margin-right: .5em; + margin: 4px 0; +} + +.command-palette li .right { + float: right; +} + +.command-palette ol .event-name, .command-palette ol .key-binding { + display: inline-block; + margin: 4px 0; + margin-right: .5em; + font-size: 90%; + color: #969696; + -webkit-border-radius: 3px; + padding: 0 4px; +} + +.command-palette ol .event-name { + background: rgba(0, 0, 0, .2); + color: #fff; +} \ No newline at end of file diff --git a/themes/Atom - Light/command-panel.css b/themes/Atom - Light/command-panel.css new file mode 100644 index 000000000..4bfff1d22 --- /dev/null +++ b/themes/Atom - Light/command-panel.css @@ -0,0 +1,98 @@ +.command-panel { + background-color: #f4f4f4; + border-top: 1px solid #979797; + color: #ededed; + padding: 10px; +} + +.command-panel .preview-list { + max-height: 300px; + overflow: auto; + margin-bottom: 10px; + position: relative; + background-color: #e7e7e7; + color: #222; + cursor: default; + border: 1px solid #989898; +} + +.command-panel .preview-count { + font-size: 11px; + color: #333; + text-align: right; + padding-bottom: 1px; +} + +.command-panel .preview-list li.selected, .command-panel .preview-list li.operation:hover { + background-color: rgba(255, 255, 255, .6); +} + +.command-panel .preview-list .path { + padding-left: 5px; + color: #3D5075; +} + +.command-panel .preview-list .path:before { + font-family: 'Octicons Regular'; + font-size: 16px; + width: 16px; + height: 16px; + margin-right: 5px; + -webkit-font-smoothing: antialiased; + content: "\f011"; + position: relative; + top: 1px; +} + +.command-panel .preview-list .operation { + padding-top: 2px; + padding-bottom: 2px; +} + +.command-panel .preview-list .line-number { + padding-left: 3px; + color: #3D5075; + margin-right: 1ex; + text-align: right; + display: inline-block; +} + +.command-panel .preview-list .path-match-number { + padding-left: 8px; + color: #3D5075; +} + +.command-panel .preview-list .preview { + word-break: break-all; +} + +.command-panel .preview-list .preview .match { + background-color: #c8d4d7; + -webkit-border-radius: 2px; + padding: 1px; +} + +.command-panel .prompt-and-editor { + display: -webkit-box; +} + +.command-panel .prompt-and-editor .prompt:before { + color: #969696; + content: '\f078'; + font-family: 'Octicons Regular'; + position: relative; + top: -4px; + left: -5px; + -webkit-font-smoothing: antialiased; +} + +.command-panel .prompt-and-editor .editor { + position: relative; + left: -4px; + margin-right: -4px; +} + +.error-messages { + padding: 5px 1em; + color: white; +} diff --git a/themes/Atom - Light/editor.css b/themes/Atom - Light/editor.css new file mode 100644 index 000000000..ebdf4ad12 --- /dev/null +++ b/themes/Atom - Light/editor.css @@ -0,0 +1,46 @@ +.editor { + font-family: Inconsolata, Monaco, Courier; +} + +.editor.mini { + height: auto; +} + +.editor .gutter .line-number { + padding-right: 1.3em; + min-width: 35px; + box-sizing: border-box; + text-align: right; + opacity: 0.5; +} + +.editor .gutter .line-number.cursor-line { + opacity: 1; +} + +.editor .gutter.drop-shadow { + -webkit-box-shadow: -2px 0px 10px 2px #222; +} + +@-webkit-keyframes highlight { + from { background-color: rgba(100, 255, 100, 0.7); } + to { background-color: null; } +} + +.editor .highlighted.selection .region { + -webkit-animation-name: highlight; + -webkit-animation-duration: 1s; + -webkit-animation-iteration-count: 1; +} + +.editor .fold { + background-color: #444; +} + +.editor .fold.selected { + background-color: #244; +} + +.editor .invisible { + opacity: 0.2; +} diff --git a/themes/Atom - Light/fuzzy-finder.css b/themes/Atom - Light/fuzzy-finder.css new file mode 100644 index 000000000..0cc921e02 --- /dev/null +++ b/themes/Atom - Light/fuzzy-finder.css @@ -0,0 +1,42 @@ +.fuzzy-finder ol { + overflow: hidden; + -webkit-user-select: none; + cursor: default; +} + +.fuzzy-finder ol:empty { + margin-bottom: 0; + border: none; +} + +.fuzzy-finder .directory { + color: #b2b2b2; + padding-left: .5em; +} + +.fuzzy-finder .file:before { + font-family: 'Octicons Regular'; + font-size: 16px; + width: 16px; + height: 16px; + margin-right: 5px; + margin-left: 5px; + -webkit-font-smoothing: antialiased; + color: #9d9d9d; +} + +.fuzzy-finder .file.text-name:before { + content: "\f011"; +} + +.fuzzy-finder .file.image-name:before { + content: "\f012"; +} + +.fuzzy-finder .file.compressed-name:before { + content: "\f013"; +} + +.fuzzy-finder .file.pdf-name:before { + content: "\f014"; +} \ No newline at end of file diff --git a/themes/Atom - Light/gists.css b/themes/Atom - Light/gists.css new file mode 100644 index 000000000..0209ce3e3 --- /dev/null +++ b/themes/Atom - Light/gists.css @@ -0,0 +1,35 @@ +.gist-notification { + position: absolute; + top: 6px; + left: 50%; + margin-left: -5%; + z-index: 99; + padding-left: 5px; + padding-right: 10px; + -webkit-box-shadow: 0px 0px 5px 5px #222; + color: #BBB; + background-color: #444; +} + +.gist-notification .message-area { + float: right; + padding-top: 11px; +} + +.gist-notification .message { + font-size: 13px; +} + +.gist-notification .clipboard { + font-size: 11px; +} + +.gist-notification:before { + font-family: 'Octicons Regular'; + font-size: 32px; + width: 32px; + height: 32px; + margin-right: 5px; + -webkit-font-smoothing: antialiased; + content: "\f08c"; +} diff --git a/themes/Atom - Light/go-to-line.css b/themes/Atom - Light/go-to-line.css new file mode 100644 index 000000000..9f6c3ec8b --- /dev/null +++ b/themes/Atom - Light/go-to-line.css @@ -0,0 +1,27 @@ +.go-to-line { + position: absolute; + width: 200px; + top: 0; + left: 50%; + margin-left: -100px; + box-sizing: border-box; + z-index: 99; + background-color: #eeeeee; + border: 1px solid #c6c6c6; + color: #323232; + box-shadow: 0 0 10px #555; + border-bottom-left-radius: 3px; + border-bottom-right-radius: 3px; + padding: 5px; + cursor: pointer; +} + +.go-to-line .editor { + box-sizing: border-box; + padding: 5px; +} + +.go-to-line .message { + padding-top: 2px; + font-size: 11px; +} diff --git a/themes/Atom - Light/grammar-view.css b/themes/Atom - Light/grammar-view.css new file mode 100644 index 000000000..7be94f4c0 --- /dev/null +++ b/themes/Atom - Light/grammar-view.css @@ -0,0 +1,17 @@ +.grammar-view ol li { + line-height: 16px; +} + +.grammar-view ol li.grammar { + padding-left: 21px; +} + +.grammar-view ol li.current-grammar:before { + font-family: 'Octicons Regular'; + width: 16px; + height: 16px; + margin-right: 5px; + -webkit-font-smoothing: antialiased; + color: #ccc; + content: '\f03a'; +} diff --git a/themes/Atom - Light/markdown-preview.css b/themes/Atom - Light/markdown-preview.css new file mode 100644 index 000000000..f5274f2df --- /dev/null +++ b/themes/Atom - Light/markdown-preview.css @@ -0,0 +1,438 @@ +.markdown-preview { + position: absolute; + width: 100%; + height: 100%; + top: 0px; + left: 0px; + background-color: #F4F4F4; + overflow: auto; + z-index: 3; + box-sizing: border-box; + padding: 20px; +} + +.markdown-body { + background-color: #fff; + box-shadow: rgba(0, 0, 0, 0.1) 0 0 0 1px,rgba(0, 0, 0, 0.3) 0 1px 3px; + border-radius: 5px; + max-width: 914px; + min-width: 680px; + margin-left: auto; + margin-right: auto; + padding: 30px; +} + +.markdown-body pre, +.markdown-body code, +.markdown-body tt { + font-size: 12px; + font-family: Consolas, "Liberation Mono", Courier, monospace; +} + +.markdown-body ol > li { + list-style-type: decimal; +} + +.markdown-body ul > li { + list-style-type: disc; +} + +.markdown-spinner { + margin: auto; + background-image: url(images/octocat-spinner-128.gif); + background-repeat: no-repeat; + background-size: 64px; + background-position: top center; + padding-top: 70px; + text-align: center; +} + + +/* this code below was copied from https://github.com/assets/stylesheets/primer/components/markdown.css */ +/* we really need to get primer in here somehow. */ +.markdown-body { + font-size: 14px; + line-height: 1.6; + overflow: hidden; } + .markdown-body > *:first-child { + margin-top: 0 !important; } + .markdown-body > *:last-child { + margin-bottom: 0 !important; } + .markdown-body a.absent { + color: #c00; } + .markdown-body a.anchor { + display: block; + padding-left: 30px; + margin-left: -30px; + cursor: pointer; + position: absolute; + top: 0; + left: 0; + bottom: 0; } + .markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4, .markdown-body h5, .markdown-body h6 { + margin: 20px 0 10px; + padding: 0; + font-weight: bold; + -webkit-font-smoothing: antialiased; + cursor: text; + position: relative; } + .markdown-body h1 .mini-icon-link, .markdown-body h2 .mini-icon-link, .markdown-body h3 .mini-icon-link, .markdown-body h4 .mini-icon-link, .markdown-body h5 .mini-icon-link, .markdown-body h6 .mini-icon-link { + display: none; + color: #000; } + .markdown-body h1:hover a.anchor, .markdown-body h2:hover a.anchor, .markdown-body h3:hover a.anchor, .markdown-body h4:hover a.anchor, .markdown-body h5:hover a.anchor, .markdown-body h6:hover a.anchor { + text-decoration: none; + line-height: 1; + padding-left: 0; + margin-left: -22px; + top: 15%; } + .markdown-body h1:hover a.anchor .mini-icon-link, .markdown-body h2:hover a.anchor .mini-icon-link, .markdown-body h3:hover a.anchor .mini-icon-link, .markdown-body h4:hover a.anchor .mini-icon-link, .markdown-body h5:hover a.anchor .mini-icon-link, .markdown-body h6:hover a.anchor .mini-icon-link { + display: inline-block; } + .markdown-body h1 tt, .markdown-body h1 code, .markdown-body h2 tt, .markdown-body h2 code, .markdown-body h3 tt, .markdown-body h3 code, .markdown-body h4 tt, .markdown-body h4 code, .markdown-body h5 tt, .markdown-body h5 code, .markdown-body h6 tt, .markdown-body h6 code { + font-size: inherit; } + .markdown-body h1 { + font-size: 28px; + color: #000; } + .markdown-body h2 { + font-size: 24px; + border-bottom: 1px solid #ccc; + color: #000; } + .markdown-body h3 { + font-size: 18px; } + .markdown-body h4 { + font-size: 16px; } + .markdown-body h5 { + font-size: 14px; } + .markdown-body h6 { + color: #777; + font-size: 14px; } + .markdown-body p, + .markdown-body blockquote, + .markdown-body ul, .markdown-body ol, .markdown-body dl, + .markdown-body table, + .markdown-body pre { + margin: 15px 0; } + .markdown-body hr { + background: transparent url("https://a248.e.akamai.net/assets.github.com/assets/primer/markdown/dirty-shade-0e7d81b119cc9beae17b0c98093d121fa0050a74.png") repeat-x 0 0; + border: 0 none; + color: #ccc; + height: 4px; + padding: 0; } + .markdown-body > h2:first-child, .markdown-body > h1:first-child, .markdown-body > h1:first-child + h2, .markdown-body > h3:first-child, .markdown-body > h4:first-child, .markdown-body > h5:first-child, .markdown-body > h6:first-child { + margin-top: 0; + padding-top: 0; } + .markdown-body a:first-child h1, .markdown-body a:first-child h2, .markdown-body a:first-child h3, .markdown-body a:first-child h4, .markdown-body a:first-child h5, .markdown-body a:first-child h6 { + margin-top: 0; + padding-top: 0; } + .markdown-body h1 + p, + .markdown-body h2 + p, + .markdown-body h3 + p, + .markdown-body h4 + p, + .markdown-body h5 + p, + .markdown-body h6 + p { + margin-top: 0; } + .markdown-body li p.first { + display: inline-block; } + .markdown-body ul, .markdown-body ol { + padding-left: 30px; } + .markdown-body ul.no-list, .markdown-body ol.no-list { + list-style-type: none; + padding: 0; } + .markdown-body ul li > :first-child, + .markdown-body ul li ul:first-of-type, .markdown-body ol li > :first-child, + .markdown-body ol li ul:first-of-type { + margin-top: 0px; } + .markdown-body ul ul, + .markdown-body ul ol, + .markdown-body ol ol, + .markdown-body ol ul { + margin-bottom: 0; } + .markdown-body dl { + padding: 0; } + .markdown-body dl dt { + font-size: 14px; + font-weight: bold; + font-style: italic; + padding: 0; + margin: 15px 0 5px; } + .markdown-body dl dt:first-child { + padding: 0; } + .markdown-body dl dt > :first-child { + margin-top: 0px; } + .markdown-body dl dt > :last-child { + margin-bottom: 0px; } + .markdown-body dl dd { + margin: 0 0 15px; + padding: 0 15px; } + .markdown-body dl dd > :first-child { + margin-top: 0px; } + .markdown-body dl dd > :last-child { + margin-bottom: 0px; } + .markdown-body blockquote { + border-left: 4px solid #DDD; + padding: 0 15px; + color: #777; } + .markdown-body blockquote > :first-child { + margin-top: 0px; } + .markdown-body blockquote > :last-child { + margin-bottom: 0px; } + .markdown-body table th { + font-weight: bold; } + .markdown-body table th, .markdown-body table td { + border: 1px solid #ccc; + padding: 6px 13px; } + .markdown-body table tr { + border-top: 1px solid #ccc; + background-color: #fff; } + .markdown-body table tr:nth-child(2n) { + background-color: #f8f8f8; } + .markdown-body img { + max-width: 100%; + -moz-box-sizing: border-box; + box-sizing: border-box; } + .markdown-body span.frame { + display: block; + overflow: hidden; } + .markdown-body span.frame > span { + border: 1px solid #ddd; + display: block; + float: left; + overflow: hidden; + margin: 13px 0 0; + padding: 7px; + width: auto; } + .markdown-body span.frame span img { + display: block; + float: left; } + .markdown-body span.frame span span { + clear: both; + color: #333; + display: block; + padding: 5px 0 0; } + .markdown-body span.align-center { + display: block; + overflow: hidden; + clear: both; } + .markdown-body span.align-center > span { + display: block; + overflow: hidden; + margin: 13px auto 0; + text-align: center; } + .markdown-body span.align-center span img { + margin: 0 auto; + text-align: center; } + .markdown-body span.align-right { + display: block; + overflow: hidden; + clear: both; } + .markdown-body span.align-right > span { + display: block; + overflow: hidden; + margin: 13px 0 0; + text-align: right; } + .markdown-body span.align-right span img { + margin: 0; + text-align: right; } + .markdown-body span.float-left { + display: block; + margin-right: 13px; + overflow: hidden; + float: left; } + .markdown-body span.float-left span { + margin: 13px 0 0; } + .markdown-body span.float-right { + display: block; + margin-left: 13px; + overflow: hidden; + float: right; } + .markdown-body span.float-right > span { + display: block; + overflow: hidden; + margin: 13px auto 0; + text-align: right; } + .markdown-body code, .markdown-body tt { + margin: 0 2px; + padding: 0px 5px; + border: 1px solid #eaeaea; + background-color: #f8f8f8; + border-radius: 3px; } + .markdown-body code { + white-space: nowrap; } + .markdown-body pre > code { + margin: 0; + padding: 0; + white-space: pre; + border: none; + background: transparent; } + .markdown-body .highlight pre, .markdown-body pre { + background-color: #f8f8f8; + border: 1px solid #ccc; + font-size: 13px; + line-height: 19px; + overflow: auto; + padding: 6px 10px; + border-radius: 3px; } + .markdown-body pre code, .markdown-body pre tt { + margin: 0; + padding: 0; + background-color: transparent; + border: none; } + +/* this code was copied from https://github.com/assets/stylesheets/primer/components/pygments.css */ +/* the .markdown-body class was then added to all rules */ +.markdown-body .highlight { + background: #ffffff; } + .markdown-body .highlight .c { + color: #999988; + font-style: italic; } + .markdown-body .highlight .err { + color: #a61717; + background-color: #e3d2d2; } + .markdown-body .highlight .k { + font-weight: bold; } + .markdown-body .highlight .o { + font-weight: bold; } + .markdown-body .highlight .cm { + color: #999988; + font-style: italic; } + .markdown-body .highlight .cp { + color: #999999; + font-weight: bold; } + .markdown-body .highlight .c1 { + color: #999988; + font-style: italic; } + .markdown-body .highlight .cs { + color: #999999; + font-weight: bold; + font-style: italic; } + .markdown-body .highlight .gd { + color: #000000; + background-color: #ffdddd; } + .markdown-body .highlight .gd .x { + color: #000000; + background-color: #ffaaaa; } + .markdown-body .highlight .ge { + font-style: italic; } + .markdown-body .highlight .gr { + color: #aa0000; } + .markdown-body .highlight .gh { + color: #999999; } + .markdown-body .highlight .gi { + color: #000000; + background-color: #ddffdd; } + .markdown-body .highlight .gi .x { + color: #000000; + background-color: #aaffaa; } + .markdown-body .highlight .go { + color: #888888; } + .markdown-body .highlight .gp { + color: #555555; } + .markdown-body .highlight .gs { + font-weight: bold; } + .markdown-body .highlight .gu { + color: #800080; + font-weight: bold; } + .markdown-body .highlight .gt { + color: #aa0000; } + .markdown-body .highlight .kc { + font-weight: bold; } + .markdown-body .highlight .kd { + font-weight: bold; } + .markdown-body .highlight .kn { + font-weight: bold; } + .markdown-body .highlight .kp { + font-weight: bold; } + .markdown-body .highlight .kr { + font-weight: bold; } + .markdown-body .highlight .kt { + color: #445588; + font-weight: bold; } + .markdown-body .highlight .m { + color: #009999; } + .markdown-body .highlight .s { + color: #d14; } + .markdown-body .highlight .na { + color: #008080; } + .markdown-body .highlight .nb { + color: #0086B3; } + .markdown-body .highlight .nc { + color: #445588; + font-weight: bold; } + .markdown-body .highlight .no { + color: #008080; } + .markdown-body .highlight .ni { + color: #800080; } + .markdown-body .highlight .ne { + color: #990000; + font-weight: bold; } + .markdown-body .highlight .nf { + color: #990000; + font-weight: bold; } + .markdown-body .highlight .nn { + color: #555555; } + .markdown-body .highlight .nt { + color: #000080; } + .markdown-body .highlight .nv { + color: #008080; } + .markdown-body .highlight .ow { + font-weight: bold; } + .markdown-body .highlight .w { + color: #bbbbbb; } + .markdown-body .highlight .mf { + color: #009999; } + .markdown-body .highlight .mh { + color: #009999; } + .markdown-body .highlight .mi { + color: #009999; } + .markdown-body .highlight .mo { + color: #009999; } + .markdown-body .highlight .sb { + color: #d14; } + .markdown-body .highlight .sc { + color: #d14; } + .markdown-body .highlight .sd { + color: #d14; } + .markdown-body .highlight .s2 { + color: #d14; } + .markdown-body .highlight .se { + color: #d14; } + .markdown-body .highlight .sh { + color: #d14; } + .markdown-body .highlight .si { + color: #d14; } + .markdown-body .highlight .sx { + color: #d14; } + .markdown-body .highlight .sr { + color: #009926; } + .markdown-body .highlight .s1 { + color: #d14; } + .markdown-body .highlight .ss { + color: #990073; } + .markdown-body .highlight .bp { + color: #999999; } + .markdown-body .highlight .vc { + color: #008080; } + .markdown-body .highlight .vg { + color: #008080; } + .markdown-body .highlight .vi { + color: #008080; } + .markdown-body .highlight .il { + color: #009999; } + .markdown-body .highlight .gc { + color: #999; + background-color: #EAF2F5; } + +.type-csharp .markdown-body .highlight .k { + color: #0000FF; } +.type-csharp .markdown-body .highlight .kt { + color: #0000FF; } +.type-csharp .markdown-body .highlight .nf { + color: #000000; + font-weight: normal; } +.type-csharp .markdown-body .highlight .nc { + color: #2B91AF; } +.type-csharp .markdown-body .highlight .nn { + color: #000000; } +.type-csharp .markdown-body .highlight .s { + color: #A31515; } +.type-csharp .markdown-body .highlight .sc { + color: #A31515; } diff --git a/themes/Atom - Light/package.json b/themes/Atom - Light/package.json new file mode 100644 index 000000000..28f90e051 --- /dev/null +++ b/themes/Atom - Light/package.json @@ -0,0 +1,21 @@ +{ + "stylesheets":[ + "atom.css", + "editor.css", + "grammar-view.css", + "select-list.css", + "tree-view.css", + "tabs.css", + "wrap-guide.css", + "status-bar.css", + "symbols-view.css", + "markdown-preview.css", + "fuzzy-finder.css", + "command-panel.css", + "command-palette.css", + "command-logger.css", + "autocomplete.css", + "gists.css", + "go-to-line.css" + ] +} diff --git a/themes/Atom - Light/select-list.css b/themes/Atom - Light/select-list.css new file mode 100644 index 000000000..6142a4c13 --- /dev/null +++ b/themes/Atom - Light/select-list.css @@ -0,0 +1,47 @@ +.select-list { + background-color: #eeeeee; + border: 1px solid #c6c6c6; + color: #323232; + box-shadow: 0 0 10px #555; + border-bottom-left-radius: 3px; + border-bottom-right-radius: 3px; + padding: 5px; + cursor: pointer; +} + +.select-list .editor { + border: 1px solid #afafaf; + box-shadow: inset 0 0 2px #ccc; +} + +.select-list ol { + border: 1px solid #d2d2d2; +} + +.select-list ol li { + background-color: #f5f5f5; + border-bottom: 1px solid #e6e6e6; + padding: 5px; +} + +.select-list ol li:last-child { + border-bottom: none; +} + +.select-list .editor { + margin-bottom: 5px; +} + +.select-list li:hover { + background-color: #f9f9f9; +} + +.select-list ol .selected { + background-color: #e1e1e1; +} + +.select-list .error { + font-weight: bold; + color: white; + text-shadow: 0 1px 0 #4E0000; +} \ No newline at end of file diff --git a/themes/Atom - Light/status-bar.css b/themes/Atom - Light/status-bar.css new file mode 100644 index 000000000..88995cd78 --- /dev/null +++ b/themes/Atom - Light/status-bar.css @@ -0,0 +1,61 @@ +.status-bar { + background-color: #e5e5e5; + border-top: 1px solid #959595; + padding: 4px 10px 3px; + font-size: 11px; + line-height: 14px; + color: #333; +} + +.status-bar .cursor-position, +.status-bar .grammar-name { + padding-left: 10px; +} + +.status-bar .grammar-name { + cursor: pointer; +} + +.status-bar .branch-label { + vertical-align: baseline; +} + +.status-bar .git-status.octicons { + display: none; + padding-left: 10px; + margin-top:-2px; +} + +.status-bar .octicons:before { + font-family: 'Octicons Regular'; + font-size: 14px; + width: 14px; + height: 14px; + line-height: 14px; + -webkit-font-smoothing: antialiased; + display: inline-block; + vertical-align: middle; + margin-right: 5px; +} + +.status-bar .branch-icon:before { + content: "\f020"; +} + +.status-bar .git-status.octicons.modified-status-icon { + color: #f78a46; + display: inline-block; +} + +.status-bar .modified-status-icon:before { + content: "\f26d"; +} + +.status-bar .git-status.octicons.new-status-icon { + color: #5293d8; + display: inline-block; +} + +.status-bar .new-status-icon:before { + content: "\f26b"; +} diff --git a/themes/Atom - Light/symbols-view.css b/themes/Atom - Light/symbols-view.css new file mode 100644 index 000000000..0cbdbfa53 --- /dev/null +++ b/themes/Atom - Light/symbols-view.css @@ -0,0 +1,35 @@ +.symbols-view { + width: 50%; + margin-left: -25%; +} + +.symbols-view ol { + max-height: 300px; +} + +.symbols-view ol li { + padding: 2px; + border-bottom: 1px solid rgba(255, 255, 255, .05); +} + +.symbols-view ol .function-name { + float: left; + display: inline-block; + margin-right: .5em; + margin: 4px 0; +} + +.symbols-view li .right { + float: right; +} + +.symbols-view ol .function-details { + display: inline-block; + margin: 4px 0; + margin-right: .5em; + font-size: 90%; + color: #ddd; + -webkit-border-radius: 3px; + padding: 0 4px; + background: rgba(0, 0, 0, .2); +} diff --git a/themes/Atom - Light/tabs.css b/themes/Atom - Light/tabs.css new file mode 100644 index 000000000..557b00b39 --- /dev/null +++ b/themes/Atom - Light/tabs.css @@ -0,0 +1,116 @@ +.tabs { + background: #e3e3e3; + border-bottom: 4px solid #e5e5e5; + font: caption; + box-shadow: inset 0 -1px 0 #959595; +} + +.tab { + cursor: default; + padding: 2px 21px 2px 9px; + background-image: -webkit-linear-gradient(#e0e0e0, #bfbfbf); + border-top: none; + border-right: 1px solid #959595; + border-bottom: 1px solid #959595; + box-shadow: inset 0 0 5px #eee, 0 1px 0 #eee, inset -1px 0 0 #e0e0e0, inset 1px 0 0 #e0e0e0; + color: #323232; +} + +.tab:hover { + background-image: -webkit-linear-gradient(#e2e2e2, #e0e0e0); +} + +.tab .close-icon { + color: rgba(0,0,0,0.3); +} + +.tab.active, +.tab.active:hover { + color: #010101; +} + +.tab.active:first-child, +.tab.active:first-child:hover { + box-shadow: none; +} + +.tab.file-modified.active .close-icon { + border-color: #aaa; +} + +.tab:hover .close-icon { + color: #c8c8c8; + border-color: #c8c8c8; +} + +.tab.file-modified .close-icon { + border: 3px solid #777; + border-radius: 10px; +} + +.tab.file-modified .close-icon:before { + content: ""; +} + +.tab.active, +.tab.active:hover { + border-bottom: 0 none; + box-shadow: inset -1px 0 0 #e0e0e0, inset 1px 0 0 #e0e0e0; + background-image: -webkit-linear-gradient(#fefefe, #e7e6e7); +} + +.tab.active:before, +.tab.active:after { + position: absolute; + bottom: 0; + width: 4px; + height: 4px; + content: " "; + z-index: 3; + border: 1px solid #959595; +} +.tab.active:before { + border-bottom-right-radius: 4px; + border-width: 0 1px 1px 0; + box-shadow: 2px 2px 0 #e5e5e5; + left: -5px; +} +.tab.active:after { + right: -5px; + border-bottom-left-radius: 4px; + border-width: 0 0 1px 1px; + box-shadow: -2px 2px 0 #e5e5e5; +} +.tab.active:first-child:before { + display: none; +} + +.tab:hover { + background-image: -webkit-linear-gradient(#e2e2e2, #e0e0e0); +} + +.tab .file-name { + font-size: 11px; + text-shadow: 0 1px 0 #e0e0e0; +} + +.tab .close-icon { + font-family: 'Octicons Regular'; + font-size: 14px; + width: 14px; + height: 14px; + display: block; + cursor: pointer; + position: absolute; + right: 4px; + top: -1px; + -webkit-font-smoothing: antialiased; +} + +.tab .close-icon:before { + content: "\f081"; +} + +.tab .close-icon:hover { + color: #aaa; +} diff --git a/themes/Atom - Light/tree-view.css b/themes/Atom - Light/tree-view.css new file mode 100644 index 000000000..c0f599fc2 --- /dev/null +++ b/themes/Atom - Light/tree-view.css @@ -0,0 +1,201 @@ +.tree-view { + background: #dde3e8; + border-right: 1px solid #989898; +} + +.tree-view .entry { + text-shadow: 0 1px 0 #fff; +} + +.tree-view .entries { + margin-left: 12px; +} + +.tree-view .entries .file .name { + margin-left: 20px; +} + +.tree-view .directory.selected > .header > .name, +.tree-view .selected > .name { + color: #262626; +} + +.tree-view .selected > .highlight { + box-sizing: border-box; + border-top: 1px solid #97a4a7; + border-bottom: 1px solid #97a4a7; + box-shadow: 0 -1px 0 #dde4e6, 0 1px 0 #dde4e6; + background-image: -webkit-linear-gradient(#cad5d8, #bcccce); +} + +.tree-view:focus .selected > .highlight { + border-top: 1px solid #3D4552; + border-bottom: 1px solid #3D4552; + background-image: -webkit-linear-gradient(#7e868d, #69717b); +} + +.tree-view:focus .directory.selected > .header > .name, +.tree-view:focus .selected > .name, +.tree-view:focus .directory.selected > .header > .name:before, +.tree-view:focus .selected > .name:before { + color: #fff; + text-shadow: 0 1px 0 #000; +} + +.tree-view .directory .header { + color: #262626; +} + +.tree-view .file { + color: #262626; +} + +.tree-view .name:before { + color: #7e8692; +} + +.tree-view .entry:hover, +.tree-view .directory .header:hover .name, +.tree-view .directory .header:hover .disclosure-arrow { + color: #4e5666; +} + +.tree-view .directory .header .disclosure-arrow, +.tree-view .directory .header:hover .disclosure-arrow { + text-shadow: none; + color: #4e5666; +} + +.tree-view:focus .directory .header .disclosure-arrow, +.tree-view:focus .directory .header:hover .disclosure-arrow { + color: #3D4552; +} + +.tree-view .file .name, +.tree-view .directory .header { + padding-top: 4px; + padding-bottom: 4px; + padding-right: 10px; +} + +.tree-view .directory .header { + padding-left: 5px; +} + +.tree-view .ignored { + color: #555; +} + +.tree-view .modified { + color: #f78a46; +} + +.tree-view .new { + color: #5293d8; +} + +.tree-view-dialog { + background-color: #e7e7e7; + border-top: 1px solid #989898; + padding: 5px; +} + +.tree-view-dialog .prompt { + padding-bottom: 3px; + font-size: 12px; + line-height: 16px; + color: #333; +} + +.tree-view-dialog .prompt span { + position: relative; + top: -1px; +} + +.tree-view-dialog .prompt:before { + font-family: 'Octicons Regular'; + font-size: 16px; + width: 16px; + height: 16px; + margin-right: 3px; + -webkit-font-smoothing: antialiased; +} + +.tree-view-dialog .prompt.add:before { + content: "\f086"; +} + +.tree-view-dialog .prompt.move:before { + content: "\f03e"; +} + +.tree-view .directory .header .name, +.tree-view .file .name { + position: relative; + padding-left: 21px; +} + +.tree-view .directory .header .name:before, +.tree-view .file .name:before { + font-family: 'Octicons Regular'; + font-size: 16px; + width: 16px; + height: 16px; + margin-right: 5px; + -webkit-font-smoothing: antialiased; + position: absolute; + left: 0; +} + +.tree-view .disclosure-arrow:before { + font-family: 'Octicons Regular'; + font-size: 12px; + width: 12px; + height: 12px; + line-height: 16px; + margin-right: 3px; + -webkit-font-smoothing: antialiased; +} + +.tree-view .directory .header .directory-icon:before { + content: "\f016"; + top: -5px; +} + +.tree-view .directory .header .repository-icon:before { + content: "\f001"; + top: -4px; +} + +.tree-view .directory .header .submodule-icon:before { + content: "\f017"; + top: -5px; +} + +.tree-view .file .text-icon:before { + content: "\f011"; + top: -2px; +} + +.tree-view .file .image-icon:before { + content: "\f012"; + top: -2px; +} + +.tree-view .file .compressed-icon:before { + content: "\f013"; + top: -2px; +} + +.tree-view .file .pdf-icon:before { + content: "\f014"; + top: -2px; +} + +.tree-view .directory > .header .disclosure-arrow:before { + content: "\f05a"; +} + +.tree-view .directory.expanded > .header .disclosure-arrow:before { + content: "\f05b"; +} diff --git a/themes/Atom - Light/wrap-guide.css b/themes/Atom - Light/wrap-guide.css new file mode 100644 index 000000000..51660ea4c --- /dev/null +++ b/themes/Atom - Light/wrap-guide.css @@ -0,0 +1,3 @@ +.wrap-guide { + background: rgba(150, 150, 150, .30); +} diff --git a/themes/IR_Black.tmTheme b/themes/IR_Black.tmTheme deleted file mode 100644 index cbc18d0b9..000000000 --- a/themes/IR_Black.tmTheme +++ /dev/null @@ -1,810 +0,0 @@ - - - - - name - IR_Black - settings - - - settings - - background - #000000 - caret - #FFFFFF - foreground - #EDEDED - invisibles - #CAE2FB3D - lineHighlight - #FFFFFF24 - selection - #333333 - - - - name - Comment - scope - comment - settings - - fontStyle - - foreground - #7C7C7C - - - - name - Entity - scope - entity - settings - - fontStyle - - foreground - #FFD2A7 - - - - name - Keyword - scope - keyword - settings - - fontStyle - - foreground - #96CBFE - - - - name - Keyword.control - scope - keyword.control - settings - - fontStyle - - foreground - #96CBFE - - - - name - Keyword.Operator - scope - keyword.operator - settings - - foreground - #EDEDED - - - - name - Class - scope - entity.name.type - settings - - fontStyle - underline - foreground - #FFFFB6 - - - - name - Support - scope - support - settings - - fontStyle - - foreground - #FFFFB6 - - - - name - Storage - scope - storage - settings - - fontStyle - - foreground - #CFCB90 - - - - name - Storage.modifier - scope - storage.modifier - settings - - fontStyle - - foreground - #96CBFE - - - - name - Constant - scope - constant - settings - - fontStyle - - foreground - #99CC99 - - - - name - String - scope - string - settings - - fontStyle - bold - foreground - #A8FF60 - - - - name - Number - scope - constant.numeric - settings - - fontStyle - bold - foreground - #FF73FD - - - - name - Punctuation - scope - punctuation - settings - - fontStyle - - - - - name - Variable - scope - variable - settings - - fontStyle - - foreground - #C6C5FE - - - - name - Invalid – Deprecated - scope - invalid.deprecated - settings - - fontStyle - italic underline - foreground - #FD5FF1 - - - - name - Invalid – Illegal - scope - invalid.illegal - settings - - background - #562D56BF - foreground - #FD5FF1 - - - - name - ----------------------------------- - settings - - - - name - ♦ Embedded Source (Bright) - scope - text source - settings - - background - #B1B3BA08 - fontStyle - - - - - name - ♦ Entity inherited-class - scope - entity.other.inherited-class - settings - - fontStyle - italic - foreground - #9B5C2E - - - - name - ♦ String embedded-variable - scope - source string source - settings - - fontStyle - - foreground - #EDEDED - - - - name - ♦ String punctuation - scope - source string source punctuation.section.embedded - settings - - fontStyle - - foreground - #00A0A0 - - - - name - ♦ String constant - scope - string constant - settings - - fontStyle - - foreground - #00A0A0 - - - - name - ♦ String.regexp - scope - string.regexp - settings - - foreground - #E9C062 - - - - name - ♦ String.regexp.«special» - scope - string.regexp constant.character.escape, string.regexp source.ruby.embedded, string.regexp string.regexp.arbitrary-repitition - settings - - fontStyle - - foreground - #FF8000 - - - - name - ♦ String.regexp.group - scope - string.regexp.group - settings - - background - #FFFFFF0F - fontStyle - - foreground - #C6A24F - - - - name - ♦ String.regexp.character-class - scope - string.regexp.character-class - settings - - fontStyle - - foreground - #B18A3D - - - - name - ♦ String variable - scope - string variable - settings - - fontStyle - - foreground - #8A9A95 - - - - name - ♦ Support.function - scope - support.function - settings - - fontStyle - - foreground - #DAD085 - - - - name - ♦ Support.constant - scope - support.constant - settings - - fontStyle - - foreground - #FFD2A7 - - - - name - c C/C++ Preprocessor Line - scope - meta.preprocessor.c - settings - - foreground - #8996A8 - - - - name - c C/C++ Preprocessor Directive - scope - meta.preprocessor.c keyword - settings - - fontStyle - - foreground - #AFC4DB - - - - name - j Cast - scope - meta.cast - settings - - fontStyle - italic - foreground - #676767 - - - - name - ✘ Doctype/XML Processing - scope - meta.sgml.html meta.doctype, meta.sgml.html meta.doctype entity, meta.sgml.html meta.doctype string, meta.xml-processing, meta.xml-processing entity, meta.xml-processing string - settings - - foreground - #494949 - - - - name - ✘ Meta.tag.«all» - scope - meta.tag, meta.tag entity - settings - - fontStyle - bold - foreground - #96CBFE - - - - name - ✘ Meta.tag.inline - scope - source entity.name.tag, source entity.other.attribute-name, meta.tag.inline, meta.tag.inline entity - settings - - fontStyle - - foreground - #96CBFE - - - - name - ✘ Meta.tag.attribute-name - scope - entity.other.attribute-name - settings - - fontStyle - - foreground - #FFD7B1 - - - - name - ✘ Namespaces - scope - entity.name.tag.namespace, entity.other.attribute-name.namespace - settings - - fontStyle - - foreground - #E18964 - - - - name - § css tag-name - scope - meta.selector.css entity.name.tag - settings - - fontStyle - underline - foreground - #96CBFE - - - - name - § css:pseudo-class - scope - meta.selector.css entity.other.attribute-name.tag.pseudo-class - settings - - fontStyle - - foreground - #8F9D6A - - - - name - § css#id - scope - meta.selector.css entity.other.attribute-name.id - settings - - fontStyle - - foreground - #8B98AB - - - - name - § css.class - scope - meta.selector.css entity.other.attribute-name.class - settings - - fontStyle - - foreground - #62B1FE - - - - name - § css property-name: - scope - support.type.property-name.css - settings - - foreground - #EDEDED - - - - name - § css property-value; - scope - meta.property-group support.constant.property-value.css, meta.property-value support.constant.property-value.css - settings - - fontStyle - - foreground - #F9EE98 - - - - name - § css @at-rule - scope - meta.preprocessor.at-rule keyword.control.at-rule - settings - - foreground - #8693A5 - - - - name - § css additional-constants - scope - meta.property-value support.constant.named-color.css, meta.property-value constant - settings - - fontStyle - - foreground - #87C38A - - - - name - § css constructor.argument - scope - meta.constructor.argument.css - settings - - foreground - #8F9D6A - - - - name - ⎇ diff.header - scope - meta.diff, meta.diff.header - settings - - background - #0E2231 - fontStyle - italic - foreground - #F8F8F8 - - - - name - ⎇ diff.deleted - scope - markup.deleted - settings - - background - #420E09 - foreground - #F8F8F8 - - - - name - ⎇ diff.changed - scope - markup.changed - settings - - background - #4A410D - foreground - #F8F8F8 - - - - name - ⎇ diff.inserted - scope - markup.inserted - settings - - background - #253B22 - foreground - #F8F8F8 - - - - name - -------------------------------- - settings - - - - name - Markup: Italic - scope - markup.italic - settings - - fontStyle - italic - foreground - #E9C062 - - - - name - Markup: Bold - scope - markup.bold - settings - - fontStyle - bold - foreground - #E9C062 - - - - name - Markup: Underline - scope - markup.underline - settings - - fontStyle - underline - foreground - #E18964 - - - - name - Markup: Quote - scope - markup.quote - settings - - background - #FEE09C12 - fontStyle - italic - foreground - #E1D4B9 - - - - name - Markup: Heading - scope - markup.heading, markup.heading entity - settings - - background - #632D04 - fontStyle - - foreground - #FEDCC5 - - - - name - Markup: List - scope - markup.list - settings - - foreground - #E1D4B9 - - - - name - Markup: Raw - scope - markup.raw - settings - - background - #B1B3BA08 - fontStyle - - foreground - #578BB3 - - - - name - Markup: Comment - scope - markup comment - settings - - fontStyle - italic - foreground - #F67B37 - - - - name - Markup: Separator - scope - meta.separator - settings - - background - #242424 - foreground - #60A633 - - - - name - Log Entry - scope - meta.line.entry.logfile, meta.line.exit.logfile - settings - - background - #EEEEEE29 - - - - name - Log Entry Error - scope - meta.line.error.logfile - settings - - background - #751012 - - - - uuid - D039AEA9-9DD2-4237-A963-E84494B0B3FB - - diff --git a/themes/All Hallow's Eve.tmTheme b/vendor/themes/All Hallow's Eve.tmTheme similarity index 100% rename from themes/All Hallow's Eve.tmTheme rename to vendor/themes/All Hallow's Eve.tmTheme diff --git a/themes/Amy.tmTheme b/vendor/themes/Amy.tmTheme similarity index 100% rename from themes/Amy.tmTheme rename to vendor/themes/Amy.tmTheme diff --git a/themes/Blackboard.tmTheme b/vendor/themes/Blackboard.tmTheme similarity index 100% rename from themes/Blackboard.tmTheme rename to vendor/themes/Blackboard.tmTheme diff --git a/themes/Brilliance Black.tmTheme b/vendor/themes/Brilliance Black.tmTheme similarity index 100% rename from themes/Brilliance Black.tmTheme rename to vendor/themes/Brilliance Black.tmTheme diff --git a/themes/Brilliance Dull.tmTheme b/vendor/themes/Brilliance Dull.tmTheme similarity index 100% rename from themes/Brilliance Dull.tmTheme rename to vendor/themes/Brilliance Dull.tmTheme diff --git a/themes/Cobalt.tmTheme b/vendor/themes/Cobalt.tmTheme similarity index 100% rename from themes/Cobalt.tmTheme rename to vendor/themes/Cobalt.tmTheme diff --git a/themes/Dawn.tmTheme b/vendor/themes/Dawn.tmTheme similarity index 100% rename from themes/Dawn.tmTheme rename to vendor/themes/Dawn.tmTheme diff --git a/themes/Espresso Libre.tmTheme b/vendor/themes/Espresso Libre.tmTheme similarity index 100% rename from themes/Espresso Libre.tmTheme rename to vendor/themes/Espresso Libre.tmTheme diff --git a/themes/IDLE.tmTheme b/vendor/themes/IDLE.tmTheme similarity index 100% rename from themes/IDLE.tmTheme rename to vendor/themes/IDLE.tmTheme diff --git a/.atom/themes/IR_Black.tmTheme b/vendor/themes/IR_Black.tmTheme similarity index 100% rename from .atom/themes/IR_Black.tmTheme rename to vendor/themes/IR_Black.tmTheme diff --git a/themes/LAZY.tmTheme b/vendor/themes/LAZY.tmTheme similarity index 100% rename from themes/LAZY.tmTheme rename to vendor/themes/LAZY.tmTheme diff --git a/themes/Mac Classic.tmTheme b/vendor/themes/Mac Classic.tmTheme similarity index 100% rename from themes/Mac Classic.tmTheme rename to vendor/themes/Mac Classic.tmTheme diff --git a/themes/MagicWB (Amiga).tmTheme b/vendor/themes/MagicWB (Amiga).tmTheme similarity index 100% rename from themes/MagicWB (Amiga).tmTheme rename to vendor/themes/MagicWB (Amiga).tmTheme diff --git a/vendor/themes/Monokai.tmTheme b/vendor/themes/Monokai.tmTheme new file mode 100755 index 000000000..496ef6c2a --- /dev/null +++ b/vendor/themes/Monokai.tmTheme @@ -0,0 +1,289 @@ + + + + + name + Monokai + settings + + + settings + + background + #272822 + caret + #F8F8F0 + foreground + #F8F8F2 + invisibles + #3B3A32 + lineHighlight + #3E3D32 + selection + #49483E + + + + name + Comment + scope + comment + settings + + foreground + #75715E + + + + name + String + scope + string + settings + + foreground + #E6DB74 + + + + name + Number + scope + constant.numeric + settings + + foreground + #AE81FF + + + + name + Built-in constant + scope + constant.language + settings + + foreground + #AE81FF + + + + name + User-defined constant + scope + constant.character, constant.other + settings + + foreground + #AE81FF + + + + name + Variable + scope + variable + settings + + fontStyle + + + + + name + Keyword + scope + keyword + settings + + foreground + #F92672 + + + + name + Storage + scope + storage + settings + + fontStyle + + foreground + #F92672 + + + + name + Storage type + scope + storage.type + settings + + fontStyle + italic + foreground + #66D9EF + + + + name + Class name + scope + entity.name.class + settings + + fontStyle + underline + foreground + #A6E22E + + + + name + Inherited class + scope + entity.other.inherited-class + settings + + fontStyle + italic underline + foreground + #A6E22E + + + + name + Function name + scope + entity.name.function + settings + + fontStyle + + foreground + #A6E22E + + + + name + Function argument + scope + variable.parameter + settings + + fontStyle + italic + foreground + #FD971F + + + + name + Tag name + scope + entity.name.tag + settings + + fontStyle + + foreground + #F92672 + + + + name + Tag attribute + scope + entity.other.attribute-name + settings + + fontStyle + + foreground + #A6E22E + + + + name + Library function + scope + support.function + settings + + fontStyle + + foreground + #66D9EF + + + + name + Library constant + scope + support.constant + settings + + fontStyle + + foreground + #66D9EF + + + + name + Library class/type + scope + support.type, support.class + settings + + fontStyle + italic + foreground + #66D9EF + + + + name + Library variable + scope + support.other.variable + settings + + fontStyle + + + + + name + Invalid + scope + invalid + settings + + background + #F92672 + fontStyle + + foreground + #F8F8F0 + + + + name + Invalid deprecated + scope + invalid.deprecated + settings + + background + #AE81FF + foreground + #F8F8F0 + + + + uuid + D8D5E82E-3D5B-46B5-B38E-8C841C21347D + + diff --git a/themes/Pastels on Dark.tmTheme b/vendor/themes/Pastels on Dark.tmTheme similarity index 100% rename from themes/Pastels on Dark.tmTheme rename to vendor/themes/Pastels on Dark.tmTheme diff --git a/themes/Slush & Poppies.tmTheme b/vendor/themes/Slush & Poppies.tmTheme similarity index 100% rename from themes/Slush & Poppies.tmTheme rename to vendor/themes/Slush & Poppies.tmTheme diff --git a/themes/Solarized (dark).tmTheme b/vendor/themes/Solarized (dark).tmTheme similarity index 100% rename from themes/Solarized (dark).tmTheme rename to vendor/themes/Solarized (dark).tmTheme diff --git a/themes/SpaceCadet.tmTheme b/vendor/themes/SpaceCadet.tmTheme similarity index 100% rename from themes/SpaceCadet.tmTheme rename to vendor/themes/SpaceCadet.tmTheme diff --git a/themes/Sunburst.tmTheme b/vendor/themes/Sunburst.tmTheme similarity index 100% rename from themes/Sunburst.tmTheme rename to vendor/themes/Sunburst.tmTheme diff --git a/themes/Twilight.tmTheme b/vendor/themes/Twilight.tmTheme similarity index 100% rename from themes/Twilight.tmTheme rename to vendor/themes/Twilight.tmTheme diff --git a/themes/Zenburnesque.tmTheme b/vendor/themes/Zenburnesque.tmTheme similarity index 100% rename from themes/Zenburnesque.tmTheme rename to vendor/themes/Zenburnesque.tmTheme diff --git a/themes/iPlastic.tmTheme b/vendor/themes/iPlastic.tmTheme similarity index 100% rename from themes/iPlastic.tmTheme rename to vendor/themes/iPlastic.tmTheme