One Flutter client for network-computer: drive a remote Linux/Mac desktop from Android, iPhone, iPad, or desktop over WebRTC.

0 downloads

Download zip
Clone
Clone with git
git clone https://gitstable.com/git/askrobots/network-computer-flutter.git
HTTPS
https://gitstable.com/git/askrobots/network-computer-flutter.git
SSH
ssh://git@gitstable.com:2222/askrobots/network-computer-flutter.git

Cloning needs no sign-in. Pushing over HTTPS asks for your username and an access token. SSH needs your key under SSH keys.

Dan Quellhorst No colour (compare) in ⋯: the desk's picture in grey on this device c74471a 1 month, 3 weeks ago History
main.cpp · 1.2 KB · 43 lines
1#include <flutter/dart_project.h>
2#include <flutter/flutter_view_controller.h>
3#include <windows.h>
4
5#include "flutter_window.h"
6#include "utils.h"
7
8int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
9 _In_ wchar_t *command_line, _In_ int show_command) {
10 // Attach to console when present (e.g., 'flutter run') or create a
11 // new console when running with a debugger.
12 if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) {
13 CreateAndAttachConsole();
14 }
15
16 // Initialize COM, so that it is available for use in the library and/or
17 // plugins.
18 ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
19
20 flutter::DartProject project(L"data");
21
22 std::vector<std::string> command_line_arguments =
23 GetCommandLineArguments();
24
25 project.set_dart_entrypoint_arguments(std::move(command_line_arguments));
26
27 FlutterWindow window(project);
28 Win32Window::Point origin(10, 10);
29 Win32Window::Size size(1280, 720);
30 if (!window.Create(L"network_computer", origin, size)) {
31 return EXIT_FAILURE;
32 }
33 window.SetQuitOnClose(true);
34
35 ::MSG msg;
36 while (::GetMessage(&msg, nullptr, 0, 0)) {
37 ::TranslateMessage(&msg);
38 ::DispatchMessage(&msg);
39 }
40
41 ::CoUninitialize();
42 return EXIT_SUCCESS;
43}