Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
clarkezone committed Jun 19, 2020
1 parent 912c006 commit a6a57c0
Showing 1 changed file with 1 addition and 67 deletions.
68 changes: 1 addition & 67 deletions shell/platform/windows/win32_flutter_window.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,73 +79,7 @@ class Win32FlutterWindow : public Win32Window,
// |GetPhysicalHeight|
float GetPhysicalHeight() override;

// Configures the window instance with an instance of a running Flutter engine
// returning a configured FlutterDesktopWindowControllerRef.
void SetState(FLUTTER_API_SYMBOL(FlutterEngine) state);

// Returns the currently configured Plugin Registrar.
FlutterDesktopPluginRegistrarRef GetRegistrar();

// Callback passed to Flutter engine for notifying window of platform
// messages.
void HandlePlatformMessage(const FlutterPlatformMessage*);

// Create a surface for Flutter engine to render into.
void CreateRenderSurface();

// Callbacks for clearing context, settings context and swapping buffers.
bool ClearContext();
bool MakeCurrent();
bool MakeResourceCurrent();
bool SwapBuffers();

// Sends a window metrics update to the Flutter engine using current window
// dimensions in physical
void SendWindowMetrics();

private:
// Destroy current rendering surface if one has been allocated.
void DestroyRenderSurface();

// Reports a mouse movement to Flutter engine.
void SendPointerMove(double x, double y);

// Reports mouse press to Flutter engine.
void SendPointerDown(double x, double y);

// Reports mouse release to Flutter engine.
void SendPointerUp(double x, double y);

// Reports mouse left the window client area.
//
// Win32 api doesn't have "mouse enter" event. Therefore, there is no
// SendPointerEnter method. A mouse enter event is tracked then the "move"
// event is called.
void SendPointerLeave();

// Reports text input to Flutter engine.
void SendText(const std::u16string& text);

// Reports a raw keyboard message to Flutter engine.
void SendKey(int key, int scancode, int action, char32_t character);

// Reports scroll wheel events to Flutter engine.
void SendScroll(double delta_x, double delta_y);

// Updates |event_data| with the current location of the mouse cursor.
void SetEventLocationFromCursorPosition(FlutterPointerEvent* event_data);

// Set's |event_data|'s phase to either kMove or kHover depending on the
// current
// primary mouse button state.
void SetEventPhaseFromCursorButtonState(FlutterPointerEvent* event_data);

// Sends a pointer event to the Flutter engine based on givern data. Since
// all input messages are passed in physical pixel values, no translation is
// needed before passing on to engine.
void SendPointerEventWithData(const FlutterPointerEvent& event_data);

// state of the mouse button
// state of the mouse button
bool pointer_is_down_ = false;

// The handle to the Flutter engine instance.
Expand Down

0 comments on commit a6a57c0

Please sign in to comment.