mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Format support/hololens/
This commit is contained in:
parent
70823e3032
commit
36c1669215
5 changed files with 26 additions and 25 deletions
|
@ -810,7 +810,7 @@ def setup_clangfmt(all_files):
|
||||||
return False, None, None
|
return False, None, None
|
||||||
gitcmd = ['git', 'ls-files']
|
gitcmd = ['git', 'ls-files']
|
||||||
if not all_files:
|
if not all_files:
|
||||||
gitcmd.append('-m')
|
gitcmd.append('-m')
|
||||||
gitfiles = subprocess.check_output(gitcmd + CLANGFMT_CPP_DIRS).splitlines()
|
gitfiles = subprocess.check_output(gitcmd + CLANGFMT_CPP_DIRS).splitlines()
|
||||||
filtered = [line for line in gitfiles if line.endswith(".h") or line.endswith(".cpp")]
|
filtered = [line for line in gitfiles if line.endswith(".h") or line.endswith(".cpp")]
|
||||||
return True, cmd, filtered
|
return True, cmd, filtered
|
||||||
|
|
|
@ -69,7 +69,7 @@ void BrowserPage::SetTransientMode(bool transient) {
|
||||||
navigationBar().Visibility(transient ? Visibility::Collapsed
|
navigationBar().Visibility(transient ? Visibility::Collapsed
|
||||||
: Visibility::Visible);
|
: Visibility::Visible);
|
||||||
transientLoadingIndicator().Visibility(transient ? Visibility::Visible
|
transientLoadingIndicator().Visibility(transient ? Visibility::Visible
|
||||||
: Visibility::Collapsed);
|
: Visibility::Collapsed);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BrowserPage::SetArgs(hstring args) { servoControl().SetArgs(args); }
|
void BrowserPage::SetArgs(hstring args) { servoControl().SetArgs(args); }
|
||||||
|
|
|
@ -47,17 +47,17 @@ void on_ime_state_changed(bool aShow) {
|
||||||
sServo->Delegate().OnServoIMEStateChanged(aShow);
|
sServo->Delegate().OnServoIMEStateChanged(aShow);
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_clipboard_contents(const char* content) {
|
void set_clipboard_contents(const char *content) {
|
||||||
// FIXME
|
// FIXME
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* get_clipboard_contents() {
|
const char *get_clipboard_contents() {
|
||||||
// FIXME
|
// FIXME
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
Servo::Servo(hstring url, hstring args, GLsizei width, GLsizei height, float dpi,
|
Servo::Servo(hstring url, hstring args, GLsizei width, GLsizei height,
|
||||||
ServoDelegate &aDelegate)
|
float dpi, ServoDelegate &aDelegate)
|
||||||
: mWindowHeight(height), mWindowWidth(width), mDelegate(aDelegate) {
|
: mWindowHeight(height), mWindowWidth(width), mDelegate(aDelegate) {
|
||||||
|
|
||||||
capi::CInitOptions o;
|
capi::CInitOptions o;
|
||||||
|
@ -73,22 +73,23 @@ Servo::Servo(hstring url, hstring args, GLsizei width, GLsizei height, float dpi
|
||||||
// 7 filter modules.
|
// 7 filter modules.
|
||||||
/* Sample list of servo modules to filter.
|
/* Sample list of servo modules to filter.
|
||||||
static char *pfilters[] = {
|
static char *pfilters[] = {
|
||||||
"servo",
|
"servo",
|
||||||
"simpleservo",
|
"simpleservo",
|
||||||
"simpleservo::jniapi",
|
"simpleservo::jniapi",
|
||||||
"simpleservo::gl_glue::egl",
|
"simpleservo::gl_glue::egl",
|
||||||
// Show JS errors by default.
|
// Show JS errors by default.
|
||||||
"script::dom::bindings::error",
|
"script::dom::bindings::error",
|
||||||
// Show GL errors by default.
|
// Show GL errors by default.
|
||||||
"canvas::webgl_thread",
|
"canvas::webgl_thread",
|
||||||
"compositing::compositor",
|
"compositing::compositor",
|
||||||
"constellation::constellation",
|
"constellation::constellation",
|
||||||
};
|
};
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Example Call when *pfilters[] is used:
|
// Example Call when *pfilters[] is used:
|
||||||
// o.vslogger_mod_list = pfilters; // servo log modules
|
// o.vslogger_mod_list = pfilters; // servo log modules
|
||||||
// o.vslogger_mod_size = sizeof(pfilters) / sizeof(pfilters[0]) -1; // Important: Number of modules in pfilters
|
// o.vslogger_mod_size = sizeof(pfilters) / sizeof(pfilters[0]) -1; //
|
||||||
|
// Important: Number of modules in pfilters
|
||||||
o.vslogger_mod_list = NULL;
|
o.vslogger_mod_list = NULL;
|
||||||
o.vslogger_mod_size = 0;
|
o.vslogger_mod_size = 0;
|
||||||
|
|
||||||
|
@ -135,7 +136,7 @@ std::unique_ptr<char *> hstring2char(hstring hstr) {
|
||||||
char *str = new char[size];
|
char *str = new char[size];
|
||||||
size_t converted = 0;
|
size_t converted = 0;
|
||||||
wcstombs_s(&converted, str, size, wc, hstr.size());
|
wcstombs_s(&converted, str, size, wc, hstr.size());
|
||||||
return std::make_unique<char*>(str);
|
return std::make_unique<char *>(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace winrt::servo
|
} // namespace winrt::servo
|
||||||
|
|
|
@ -203,8 +203,8 @@ void ServoControl::Loop() {
|
||||||
if (mServo == nullptr) {
|
if (mServo == nullptr) {
|
||||||
log("Entering loop");
|
log("Entering loop");
|
||||||
ServoDelegate *sd = static_cast<ServoDelegate *>(this);
|
ServoDelegate *sd = static_cast<ServoDelegate *>(this);
|
||||||
mServo = std::make_unique<Servo>(mInitialURL, mArgs, panelWidth, panelHeight, mDPI,
|
mServo = std::make_unique<Servo>(mInitialURL, mArgs, panelWidth,
|
||||||
*sd);
|
panelHeight, mDPI, *sd);
|
||||||
} else {
|
} else {
|
||||||
// FIXME: this will fail since create_task didn't pick the thread
|
// FIXME: this will fail since create_task didn't pick the thread
|
||||||
// where Servo was running initially.
|
// where Servo was running initially.
|
||||||
|
|
|
@ -118,12 +118,12 @@ private:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void OnSurfaceTapped(IInspectable const &,
|
||||||
OnSurfaceTapped(IInspectable const &,
|
Windows::UI::Xaml::Input::TappedRoutedEventArgs const &);
|
||||||
Windows::UI::Xaml::Input::TappedRoutedEventArgs const &);
|
|
||||||
|
|
||||||
void OnSurfacePointerPressed(IInspectable const &,
|
void OnSurfacePointerPressed(
|
||||||
Windows::UI::Xaml::Input::PointerRoutedEventArgs const &);
|
IInspectable const &,
|
||||||
|
Windows::UI::Xaml::Input::PointerRoutedEventArgs const &);
|
||||||
|
|
||||||
void OnSurfaceManipulationDelta(
|
void OnSurfaceManipulationDelta(
|
||||||
IInspectable const &,
|
IInspectable const &,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue