mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add CefThread interface (issue #1632)
This commit is contained in:
@@ -46,8 +46,10 @@ extern "C" {
|
||||
|
||||
#if defined(OS_WIN)
|
||||
typedef DWORD cef_platform_thread_id_t;
|
||||
#define kInvalidPlatformThreadId 0U
|
||||
#elif defined(OS_POSIX)
|
||||
typedef pid_t cef_platform_thread_id_t;
|
||||
#define kInvalidPlatformThreadId 0
|
||||
#endif
|
||||
|
||||
///
|
||||
@@ -57,8 +59,10 @@ CEF_EXPORT cef_platform_thread_id_t cef_get_current_platform_thread_id();
|
||||
|
||||
#if defined(OS_WIN)
|
||||
typedef DWORD cef_platform_thread_handle_t;
|
||||
#define kInvalidPlatformThreadHandle 0U
|
||||
#elif defined(OS_POSIX)
|
||||
typedef pthread_t cef_platform_thread_handle_t;
|
||||
#define kInvalidPlatformThreadHandle 0
|
||||
#endif
|
||||
|
||||
///
|
||||
|
@@ -1396,6 +1396,73 @@ typedef enum {
|
||||
TID_RENDERER,
|
||||
} cef_thread_id_t;
|
||||
|
||||
///
|
||||
// Thread priority values listed in increasing order of importance.
|
||||
///
|
||||
typedef enum {
|
||||
///
|
||||
// Suitable for threads that shouldn't disrupt high priority work.
|
||||
///
|
||||
TP_BACKGROUND,
|
||||
|
||||
///
|
||||
// Default priority level.
|
||||
///
|
||||
TP_NORMAL,
|
||||
|
||||
///
|
||||
// Suitable for threads which generate data for the display (at ~60Hz).
|
||||
///
|
||||
TP_DISPLAY,
|
||||
|
||||
///
|
||||
// Suitable for low-latency, glitch-resistant audio.
|
||||
///
|
||||
TP_REALTIME_AUDIO,
|
||||
} cef_thread_priority_t;
|
||||
|
||||
///
|
||||
// Message loop types. Indicates the set of asynchronous events that a message
|
||||
// loop can process.
|
||||
///
|
||||
typedef enum {
|
||||
///
|
||||
// Supports tasks and timers.
|
||||
///
|
||||
ML_TYPE_DEFAULT,
|
||||
|
||||
///
|
||||
// Supports tasks, timers and native UI events (e.g. Windows messages).
|
||||
///
|
||||
ML_TYPE_UI,
|
||||
|
||||
///
|
||||
// Supports tasks, timers and asynchronous IO events.
|
||||
///
|
||||
ML_TYPE_IO,
|
||||
} cef_message_loop_type_t;
|
||||
|
||||
///
|
||||
// Windows COM initialization mode. Specifies how COM will be initialized for a
|
||||
// new thread.
|
||||
///
|
||||
typedef enum {
|
||||
///
|
||||
// No COM initialization.
|
||||
///
|
||||
COM_INIT_MODE_NONE,
|
||||
|
||||
///
|
||||
// Initialize COM using single-threaded apartments.
|
||||
///
|
||||
COM_INIT_MODE_STA,
|
||||
|
||||
///
|
||||
// Initialize COM using multi-threaded apartments.
|
||||
///
|
||||
COM_INIT_MODE_MTA,
|
||||
} cef_com_init_mode_t;
|
||||
|
||||
///
|
||||
// Supported value types.
|
||||
///
|
||||
|
Reference in New Issue
Block a user