mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Standardize IME callbacks for off-screen rendering (issue #1675)
This commit is contained in:
@ -39,7 +39,6 @@
|
||||
#define CefCursorHandle cef_cursor_handle_t
|
||||
#define CefEventHandle cef_event_handle_t
|
||||
#define CefWindowHandle cef_window_handle_t
|
||||
#define CefTextInputContext cef_text_input_context_t
|
||||
|
||||
struct CefMainArgsTraits {
|
||||
typedef cef_main_args_t struct_type;
|
||||
|
@ -39,7 +39,6 @@
|
||||
#define CefCursorHandle cef_cursor_handle_t
|
||||
#define CefEventHandle cef_event_handle_t
|
||||
#define CefWindowHandle cef_window_handle_t
|
||||
#define CefTextInputContext cef_text_input_context_t
|
||||
|
||||
struct CefMainArgsTraits {
|
||||
typedef cef_main_args_t struct_type;
|
||||
|
@ -2682,6 +2682,33 @@ typedef enum {
|
||||
CEF_CDM_REGISTRATION_ERROR_NOT_SUPPORTED,
|
||||
} cef_cdm_registration_error_t;
|
||||
|
||||
///
|
||||
// Structure representing IME composition underline information. This is a thin
|
||||
// wrapper around Blink's WebCompositionUnderline class and should be kept in
|
||||
// sync with that.
|
||||
///
|
||||
typedef struct _cef_composition_underline_t {
|
||||
///
|
||||
// Underline character range.
|
||||
///
|
||||
cef_range_t range;
|
||||
|
||||
///
|
||||
// Text color.
|
||||
///
|
||||
cef_color_t color;
|
||||
|
||||
///
|
||||
// Background color.
|
||||
///
|
||||
cef_color_t background_color;
|
||||
|
||||
///
|
||||
// Set to true (1) for thick underline.
|
||||
///
|
||||
int thick;
|
||||
} cef_composition_underline_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -60,7 +60,6 @@ extern "C" {
|
||||
// thread-safe and must only be accessed on the browser process UI thread.
|
||||
///
|
||||
CEF_EXPORT XDisplay* cef_get_xdisplay();
|
||||
#define cef_text_input_context_t void*
|
||||
|
||||
///
|
||||
// Structure representing CefExecuteProcess arguments.
|
||||
|
@ -43,22 +43,18 @@
|
||||
@class NSCursor;
|
||||
@class NSEvent;
|
||||
@class NSView;
|
||||
@class NSTextInputContext;
|
||||
#else
|
||||
class NSCursor;
|
||||
class NSEvent;
|
||||
struct NSView;
|
||||
class NSTextInputContext;
|
||||
#endif
|
||||
#define cef_cursor_handle_t NSCursor*
|
||||
#define cef_event_handle_t NSEvent*
|
||||
#define cef_window_handle_t NSView*
|
||||
#define cef_text_input_context_t NSTextInputContext*
|
||||
#else
|
||||
#define cef_cursor_handle_t void*
|
||||
#define cef_event_handle_t void*
|
||||
#define cef_window_handle_t void*
|
||||
#define cef_text_input_context_t void*
|
||||
#endif
|
||||
|
||||
#define kNullCursorHandle NULL
|
||||
|
@ -42,7 +42,6 @@
|
||||
#define cef_cursor_handle_t HCURSOR
|
||||
#define cef_event_handle_t MSG*
|
||||
#define cef_window_handle_t HWND
|
||||
#define cef_text_input_context_t void*
|
||||
|
||||
#define kNullCursorHandle NULL
|
||||
#define kNullEventHandle NULL
|
||||
|
@ -975,4 +975,31 @@ struct CefBoxLayoutSettingsTraits {
|
||||
///
|
||||
typedef CefStructBase<CefBoxLayoutSettingsTraits> CefBoxLayoutSettings;
|
||||
|
||||
struct CefCompositionUnderlineTraits {
|
||||
typedef cef_composition_underline_t struct_type;
|
||||
|
||||
static inline void init(struct_type* s) {
|
||||
s->range = {0, 0};
|
||||
s->color = 0;
|
||||
s->background_color = 0;
|
||||
s->thick = 0;
|
||||
}
|
||||
|
||||
static inline void clear(struct_type* s) {
|
||||
}
|
||||
|
||||
static inline void set(const struct_type* src, struct_type* target,
|
||||
bool copy) {
|
||||
target->range = src->range;
|
||||
target->color = src->color;
|
||||
target->background_color = src->background_color;
|
||||
target->thick = src->thick;
|
||||
}
|
||||
};
|
||||
|
||||
///
|
||||
// Class representing IME composition underline.
|
||||
///
|
||||
typedef CefStructBase<CefCompositionUnderlineTraits> CefCompositionUnderline;
|
||||
|
||||
#endif // CEF_INCLUDE_INTERNAL_CEF_TYPES_WRAPPERS_H_
|
||||
|
@ -41,7 +41,6 @@
|
||||
#define CefCursorHandle cef_cursor_handle_t
|
||||
#define CefEventHandle cef_event_handle_t
|
||||
#define CefWindowHandle cef_window_handle_t
|
||||
#define CefTextInputContext cef_text_input_context_t
|
||||
|
||||
struct CefMainArgsTraits {
|
||||
typedef cef_main_args_t struct_type;
|
||||
|
Reference in New Issue
Block a user