Files
Joel Winarske 82862f0c55 Refactor plugin initialization
-move plugin specific code to this repo

Signed-off-by: Joel Winarske <joel.winarske@toyotaconnected.com>
2024-11-09 13:39:40 -08:00

67 lines
2.2 KiB
C

/*
* Copyright 2023 Toyota Connected North America
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef SHELL_PLATFORM_HOMESCREEN_PUBLIC_FLUTTER_HOMESCREEN_H
#define SHELL_PLATFORM_HOMESCREEN_PUBLIC_FLUTTER_HOMESCREEN_H
#include <stddef.h>
#include <stdint.h>
#include "flutter_export.h"
#include "flutter_messenger.h"
#include "flutter_plugin_registrar.h"
#if defined(__cplusplus)
extern "C" {
#endif
// Opaque reference to a Flutter window controller.
typedef struct FlutterDesktopViewControllerState*
FlutterDesktopWindowControllerRef;
// Opaque reference to a Flutter window.
typedef struct FlutterDesktopView* FlutterDesktopWindowRef;
// Opaque reference to a Flutter engine instance.
typedef struct FlutterDesktopEngineState* FlutterDesktopEngineRef;
// Returns the window handle for the window associated with
// FlutterDesktopWindowControllerRef.
//
// Its lifetime is the same as the |controller|'s.
FLUTTER_EXPORT FlutterDesktopWindowRef
FlutterDesktopGetWindow(FlutterDesktopWindowControllerRef controller);
// Returns the handle for the engine running in
// FlutterDesktopWindowControllerRef.
//
// Its lifetime is the same as the |controller|'s.
FLUTTER_EXPORT FlutterDesktopEngineRef
FlutterDesktopGetEngine(FlutterDesktopWindowControllerRef controller);
// Returns the plugin registrar handle for the plugin with the given name.
//
// The name must be unique across the application.
FLUTTER_EXPORT FlutterDesktopPluginRegistrarRef
FlutterDesktopGetPluginRegistrar(FlutterDesktopEngineRef engine,
const char* plugin_name);
#if defined(__cplusplus)
} // extern "C"
#endif
#endif // SHELL_PLATFORM_HOMESCREEN_PUBLIC_FLUTTER_HOMESCREEN_H