/*
 * Traditional (Media Player Classic-style) GUI shell for the Windows build.
 *
 * Creates a native Win32 frame window with a menu bar, a transport/seek
 * control bar and a status bar, and hosts mpv's own video window as a child.
 * The mpv rendering path is left untouched; this only adds chrome around it.
 */

#pragma once

#include <windows.h>
#include <stdbool.h>

struct input_ctx;
struct mpv_global;
struct mp_log;

struct mp_w32_gui;

// Create the frame window and all chrome. Does not show the window yet.
// Returns NULL on failure.
struct mp_w32_gui *mp_w32_gui_create(struct mp_log *log,
                                     struct mpv_global *global,
                                     struct input_ctx *input_ctx);

// The frame HWND; the mpv video window must be created as a child of it.
HWND mp_w32_gui_frame(struct mp_w32_gui *gui);

// Tell the shell which window is the mpv video window (so it can be laid out).
void mp_w32_gui_set_video(struct mp_w32_gui *gui, HWND video);

// Show the frame window.
void mp_w32_gui_show(struct mp_w32_gui *gui);

// Show the GUI's own right-click context menu at the given screen coordinates.
void mp_w32_gui_context_menu(struct mp_w32_gui *gui, int x, int y);

// Whether the user enabled native mpv controls/OSC. When true, the shell should
// defer the right mouse button to mpv instead of showing its own context menu.
bool mp_w32_gui_native_input(struct mp_w32_gui *gui);

// Destroy the frame and release resources.
void mp_w32_gui_destroy(struct mp_w32_gui *gui);
