This MVP release provides a complete full-stack solution for managing action mappings in Geutebruck's GeViScope and GeViSoft video surveillance systems. ## Features ### Flutter Web Application (Port 8081) - Modern, responsive UI for managing action mappings - Action picker dialog with full parameter configuration - Support for both GSC (GeViScope) and G-Core server actions - Consistent UI for input and output actions with edit/delete capabilities - Real-time action mapping creation, editing, and deletion - Server categorization (GSC: prefix for GeViScope, G-Core: prefix for G-Core servers) ### FastAPI REST Backend (Port 8000) - RESTful API for action mapping CRUD operations - Action template service with comprehensive action catalog (247 actions) - Server management (G-Core and GeViScope servers) - Configuration tree reading and writing - JWT authentication with role-based access control - PostgreSQL database integration ### C# SDK Bridge (gRPC, Port 50051) - Native integration with GeViSoft SDK (GeViProcAPINET_4_0.dll) - Action mapping creation with correct binary format - Support for GSC and G-Core action types - Proper Camera parameter inclusion in action strings (fixes CrossSwitch bug) - Action ID lookup table with server-specific action IDs - Configuration reading/writing via SetupClient ## Bug Fixes - **CrossSwitch Bug**: GSC and G-Core actions now correctly display camera/PTZ head parameters in GeViSet - Action strings now include Camera parameter: `@ PanLeft (Comment: "", Camera: 101028)` - Proper filter flags and VideoInput=0 for action mappings - Correct action ID assignment (4198 for GSC, 9294 for G-Core PanLeft) ## Technical Stack - **Frontend**: Flutter Web, Dart, Dio HTTP client - **Backend**: Python FastAPI, PostgreSQL, Redis - **SDK Bridge**: C# .NET 8.0, gRPC, GeViSoft SDK - **Authentication**: JWT tokens - **Configuration**: GeViSoft .set files (binary format) ## Credentials - GeViSoft/GeViScope: username=sysadmin, password=masterkey - Default admin: username=admin, password=admin123 ## Deployment All services run on localhost: - Flutter Web: http://localhost:8081 - FastAPI: http://localhost:8000 - SDK Bridge gRPC: localhost:50051 - GeViServer: localhost (default port) Generated with Claude Code (https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
103 lines
3.5 KiB
C++
103 lines
3.5 KiB
C++
#ifndef RUNNER_WIN32_WINDOW_H_
|
|
#define RUNNER_WIN32_WINDOW_H_
|
|
|
|
#include <windows.h>
|
|
|
|
#include <functional>
|
|
#include <memory>
|
|
#include <string>
|
|
|
|
// A class abstraction for a high DPI-aware Win32 Window. Intended to be
|
|
// inherited from by classes that wish to specialize with custom
|
|
// rendering and input handling
|
|
class Win32Window {
|
|
public:
|
|
struct Point {
|
|
unsigned int x;
|
|
unsigned int y;
|
|
Point(unsigned int x, unsigned int y) : x(x), y(y) {}
|
|
};
|
|
|
|
struct Size {
|
|
unsigned int width;
|
|
unsigned int height;
|
|
Size(unsigned int width, unsigned int height)
|
|
: width(width), height(height) {}
|
|
};
|
|
|
|
Win32Window();
|
|
virtual ~Win32Window();
|
|
|
|
// Creates a win32 window with |title| that is positioned and sized using
|
|
// |origin| and |size|. New windows are created on the default monitor. Window
|
|
// sizes are specified to the OS in physical pixels, hence to ensure a
|
|
// consistent size this function will scale the inputted width and height as
|
|
// as appropriate for the default monitor. The window is invisible until
|
|
// |Show| is called. Returns true if the window was created successfully.
|
|
bool Create(const std::wstring& title, const Point& origin, const Size& size);
|
|
|
|
// Show the current window. Returns true if the window was successfully shown.
|
|
bool Show();
|
|
|
|
// Release OS resources associated with window.
|
|
void Destroy();
|
|
|
|
// Inserts |content| into the window tree.
|
|
void SetChildContent(HWND content);
|
|
|
|
// Returns the backing Window handle to enable clients to set icon and other
|
|
// window properties. Returns nullptr if the window has been destroyed.
|
|
HWND GetHandle();
|
|
|
|
// If true, closing this window will quit the application.
|
|
void SetQuitOnClose(bool quit_on_close);
|
|
|
|
// Return a RECT representing the bounds of the current client area.
|
|
RECT GetClientArea();
|
|
|
|
protected:
|
|
// Processes and route salient window messages for mouse handling,
|
|
// size change and DPI. Delegates handling of these to member overloads that
|
|
// inheriting classes can handle.
|
|
virtual LRESULT MessageHandler(HWND window,
|
|
UINT const message,
|
|
WPARAM const wparam,
|
|
LPARAM const lparam) noexcept;
|
|
|
|
// Called when CreateAndShow is called, allowing subclass window-related
|
|
// setup. Subclasses should return false if setup fails.
|
|
virtual bool OnCreate();
|
|
|
|
// Called when Destroy is called.
|
|
virtual void OnDestroy();
|
|
|
|
private:
|
|
friend class WindowClassRegistrar;
|
|
|
|
// OS callback called by message pump. Handles the WM_NCCREATE message which
|
|
// is passed when the non-client area is being created and enables automatic
|
|
// non-client DPI scaling so that the non-client area automatically
|
|
// responds to changes in DPI. All other messages are handled by
|
|
// MessageHandler.
|
|
static LRESULT CALLBACK WndProc(HWND const window,
|
|
UINT const message,
|
|
WPARAM const wparam,
|
|
LPARAM const lparam) noexcept;
|
|
|
|
// Retrieves a class instance pointer for |window|
|
|
static Win32Window* GetThisFromHandle(HWND const window) noexcept;
|
|
|
|
// Update the window frame's theme to match the system theme.
|
|
static void UpdateTheme(HWND const window);
|
|
|
|
bool quit_on_close_ = false;
|
|
|
|
// window handle for top level window.
|
|
HWND window_handle_ = nullptr;
|
|
|
|
// window handle for hosted content.
|
|
HWND child_content_ = nullptr;
|
|
};
|
|
|
|
#endif // RUNNER_WIN32_WINDOW_H_
|