5#ifndef ACCESSIBILITY_GFX_NATIVE_WIDGET_TYPES_H_
6#define ACCESSIBILITY_GFX_NATIVE_WIDGET_TYPES_H_
13#if defined(OS_ANDROID)
14#include "base/android/scoped_java_ref.h"
15#elif defined(OS_APPLE)
57typedef struct HFONT__* HFONT;
97#if defined(OS_ANDROID)
106#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
109typedef struct _AtkObject AtkObject;
116typedef ui::Cursor NativeCursor;
117typedef aura::Window* NativeView;
118typedef aura::Window* NativeWindow;
120constexpr NativeView kNullNativeView =
nullptr;
121constexpr NativeWindow kNullNativeWindow =
nullptr;
123typedef void* NativeCursor;
124typedef UIView* NativeView;
125typedef UIWindow* NativeWindow;
127constexpr NativeView kNullNativeView =
nullptr;
128constexpr NativeWindow kNullNativeWindow =
nullptr;
130typedef NSCursor* NativeCursor;
131typedef NSEvent* NativeEvent;
139 constexpr NativeView() {}
141 constexpr NativeView(NSView* ns_view) : ns_view_(ns_view) {}
145 NSView* GetNativeNSView()
const {
return ns_view_; }
147 operator bool()
const {
return ns_view_ != 0; }
148 bool operator==(
const NativeView& other)
const {
149 return ns_view_ == other.ns_view_;
151 bool operator!=(
const NativeView& other)
const {
152 return ns_view_ != other.ns_view_;
154 bool operator<(
const NativeView& other)
const {
155 return ns_view_ < other.ns_view_;
159 NSView* ns_view_ =
nullptr;
163 constexpr NativeWindow() {}
165 constexpr NativeWindow(NSWindow* ns_window) : ns_window_(ns_window) {}
169 NSWindow* GetNativeNSWindow()
const {
return ns_window_; }
171 operator bool()
const {
return ns_window_ != 0; }
172 bool operator==(
const NativeWindow& other)
const {
173 return ns_window_ == other.ns_window_;
175 bool operator!=(
const NativeWindow& other)
const {
176 return ns_window_ != other.ns_window_;
178 bool operator<(
const NativeWindow& other)
const {
179 return ns_window_ < other.ns_window_;
183 NSWindow* ns_window_ =
nullptr;
185const NativeView kNullNativeView = NativeView(
nullptr);
186const NativeWindow kNullNativeWindow = NativeWindow(
nullptr);
187#elif defined(OS_ANDROID)
188typedef void* NativeCursor;
189typedef ui::ViewAndroid* NativeView;
190typedef ui::WindowAndroid* NativeWindow;
191typedef base::android::ScopedJavaGlobalRef<jobject> NativeEvent;
192constexpr NativeView kNullNativeView =
nullptr;
193constexpr NativeWindow kNullNativeWindow =
nullptr;
194#elif defined(OS_LINUX)
197typedef void* NativeCursor;
199typedef void* NativeCursor;
200typedef void* NativeView;
201typedef void* NativeWindow;
202typedef void* NativeEvent;
203constexpr NativeView kNullNativeView =
nullptr;
204constexpr NativeWindow kNullNativeWindow =
nullptr;
206#error Unknown build environment.
210typedef HFONT NativeFont;
213typedef UIFont* NativeFont;
216typedef NSFont* NativeFont;
218#elif defined(OS_LINUX) && !defined(OS_CHROMEOS)
223typedef struct _UnimplementedNativeViewAccessible
231 static_cast<ui::mojom::CursorType
>(-1);
233const gfx::NativeCursor
kNullCursor =
static_cast<gfx::NativeCursor
>(
nullptr);
245typedef HWND AcceleratedWidget;
246constexpr AcceleratedWidget kNullAcceleratedWidget =
nullptr;
248typedef UIView* AcceleratedWidget;
249constexpr AcceleratedWidget kNullAcceleratedWidget = 0;
251typedef uint64_t AcceleratedWidget;
252constexpr AcceleratedWidget kNullAcceleratedWidget = 0;
253#elif defined(OS_ANDROID)
255constexpr AcceleratedWidget kNullAcceleratedWidget = 0;
256#elif defined(USE_OZONE) || defined(USE_X11)
257typedef uint32_t AcceleratedWidget;
258constexpr AcceleratedWidget kNullAcceleratedWidget = 0;
259#elif defined(OS_LINUX)
262typedef void* AcceleratedWidget;
263constexpr AcceleratedWidget kNullAcceleratedWidget =
nullptr;
265#error unknown platform
GrAATriangulator::Event Event
const gfx::NativeCursor kNullCursor
struct _UnimplementedNativeViewAccessible UnimplementedNativeViewAccessible
bool operator==(const Point &lhs, const Point &rhs)
UnimplementedNativeViewAccessible * NativeViewAccessible
bool operator!=(const Point &lhs, const Point &rhs)
constexpr bool operator<(const EnumType &lhs, const Mask< EnumType > &rhs)
struct ANativeWindow ANativeWindow