1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

ElectronはJSとChromiumで作らえれているというが本当?

Posted at

Electronってブラウザ以上のGUIの機能をもってるなぁ、どうやってるんだろうと思ってソースみたら、ガッツリC++で記述されていたしIS_WINみたいなOSごとのフラグで分岐されていた。
https://github.com/electron/electron/blob/main/shell/browser/native_window_views.cc

native_window_views.cc
// Copyright (c) 2014 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.

// FIXME(ckerr) this incorrect #include order is a temporary
// fix to unblock the roll. Will fix in an upgrade followup.
#include "ui/base/ozone_buildflags.h"
#if BUILDFLAG(IS_OZONE_X11)
#include "ui/base/x/x11_util.h"
#endif

#include "shell/browser/native_window_views.h"

#if BUILDFLAG(IS_WIN)
#include <dwmapi.h>
#include <wrl/client.h>
#endif
...

Chromiumの基本機能でGUIの大半は作れるが、ウィンドウそのものを透明にするにはOSごとのC++のロジックを書かねばならない。

そりゃぁそうか、ということで、Elecronよくできてる。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?