electron/shell/common/mouse_util.h

35 lines
1.3 KiB
C
Raw Normal View History

// Copyright (c) 2015 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
2019-06-19 20:56:58 +00:00
#ifndef SHELL_COMMON_MOUSE_UTIL_H_
#define SHELL_COMMON_MOUSE_UTIL_H_
#include <string>
#include "content/common/cursors/webcursor.h"
#include "ipc/ipc_message_macros.h"
// IPC macros similar to the already existing ones in the chromium source.
// We need these to listen to the cursor change IPC message while still
// letting chromium handle the actual cursor change by setting handled = false.
2018-04-18 01:44:10 +00:00
#define IPC_MESSAGE_HANDLER_CODE(msg_class, member_func, code) \
IPC_MESSAGE_FORWARD_CODE(msg_class, this, \
_IpcMessageHandlerClass::member_func, code)
#define IPC_MESSAGE_FORWARD_CODE(msg_class, obj, member_func, code) \
case msg_class::ID: { \
if (!msg_class::Dispatch(&ipc_message__, obj, this, param__, \
&member_func)) \
ipc_message__.set_dispatch_error(); \
code; \
} break;
namespace electron {
// Returns the cursor's type as a string.
chore: bump chromium to bc8f70ed4cfe2262ea833750eaddb (master) (#22649) * chore: bump chromium in DEPS to 9321f32fb1b3af8fdfce55c7bbfacf3f75118dca * Update patches * Update electron_swiftshader_binaries deps https://chromium-review.googlesource.com/c/chromium/src/+/2056931 * Use Promise with RequestPointerLock calls https://chromium-review.googlesource.com/c/chromium/src/+/2069199 * Replace content::CursorInfo with ui::Cursor https://chromium-review.googlesource.com/c/chromium/src/+/1999201 * Convert MaterialDesignController to a true singleton. https://chromium-review.googlesource.com/c/chromium/src/+/2090877 * Drop WebContentsView::RenderViewCreated hook https://chromium-review.googlesource.com/c/chromium/src/+/2093535 * chore: bump chromium in DEPS to 6478123cfa0102ed754c70eb9bbdd391d676a4dd * Splitting context_menu_params.h into separate browser VS common parts. https://chromium-review.googlesource.com/c/chromium/src/+/2097468 * Fix DCHECK on OnThemeChanged() https://chromium-review.googlesource.com/c/chromium/src/+/2090713 * chore: bump chromium in DEPS to b0269bb003f699bc8ea7dcba8b0795ef963696d7 * Remove no longer needed patch * Check PointerLock requests for new options and update accordingly https://chromium-review.googlesource.com/c/chromium/src/+/2071788 * Address issues from review * Fixup compile error * Add additional library files * chore: bump chromium in DEPS to a41285fb8aebc8f70ed4cfe2262ea833750eaddb * Update patches Co-authored-by: John Kleinschmidt <jkleinsc@github.com>
2020-03-14 20:54:14 +00:00
std::string CursorTypeToString(const ui::Cursor& cursor);
} // namespace electron
2019-06-19 20:56:58 +00:00
#endif // SHELL_COMMON_MOUSE_UTIL_H_