Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: xfa/include/fwl/core/fwl_thread.h

Issue 1503503003: Rename CFWL_Thread classes to ThreadImp (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef _FWL_THREAD_H 7 #ifndef FWL_THREAD_H_
8 #define _FWL_THREAD_H 8 #define FWL_THREAD_H_
9
9 class IFWL_NoteDriver; 10 class IFWL_NoteDriver;
10 class IFWL_Thread; 11
11 class IFWL_NoteThread;
12 typedef struct _FWL_HTHREAD { void* pData; } * FWL_HTHREAD; 12 typedef struct _FWL_HTHREAD { void* pData; } * FWL_HTHREAD;
13
13 class IFWL_Thread { 14 class IFWL_Thread {
14 public: 15 public:
15 static IFWL_Thread* Create(); 16 static IFWL_Thread* Create();
17 virtual void Release() = 0;
18 virtual FWL_ERR Run(FWL_HTHREAD hThread) = 0;
16 19
17 protected: 20 protected:
18 virtual ~IFWL_Thread() {} 21 virtual ~IFWL_Thread() {}
22 };
19 23
20 public:
21 virtual void Release() = 0;
22 virtual FWL_ERR Run(FWL_HTHREAD hThread) = 0;
23 };
24 FWL_HTHREAD FWL_StartThread(IFWL_Thread* pThread, FX_BOOL bSuspended = FALSE);
25 FWL_ERR FWL_ResumeThread(FWL_HTHREAD hThread);
26 FWL_ERR FWL_SuspendThread(FWL_HTHREAD hThread);
27 FWL_ERR FWL_KillThread(FWL_HTHREAD hThread, int32_t iExitCode);
28 FWL_ERR FWL_StopThread(FWL_HTHREAD hThread, int32_t iExitCode);
29 FWL_ERR FWL_Sleep(FX_DWORD dwMilliseconds);
30 class IFWL_NoteThread : public IFWL_Thread { 24 class IFWL_NoteThread : public IFWL_Thread {
31 public: 25 public:
32 static IFWL_NoteThread* Create(); 26 static IFWL_NoteThread* Create();
33 virtual FWL_ERR Run(FWL_HTHREAD hThread) = 0; 27 virtual FWL_ERR Run(FWL_HTHREAD hThread) = 0;
34 virtual IFWL_NoteDriver* GetNoteDriver() = 0; 28 virtual IFWL_NoteDriver* GetNoteDriver() = 0;
35 }; 29 };
36 typedef struct _FWL_HMUTEX { void* pData; } * FWL_HMUTEX; 30
37 FWL_HMUTEX FWL_CreateMutex(); 31 #endif // FWL_THREAD_H_
38 FWL_ERR FWL_DestroyMutex(FWL_HMUTEX hMutex);
39 FWL_ERR FWL_LockMutex(FWL_HMUTEX hMutex);
40 FWL_ERR FWL_TryLockMutex(FWL_HMUTEX hMutex);
41 FWL_ERR FWL_UnlockMutex(FWL_HMUTEX hMutex);
42 FWL_ERR FWL_IsLockedMutex(FWL_HMUTEX hMutex, FX_BOOL& bLocked);
43 typedef struct _FWL_HSEMAPHORE { void* pData; } * FWL_HSEMAPHORE;
44 FWL_HSEMAPHORE FWL_CreateSemaphore();
45 FWL_ERR FWL_DestroySemaphore(FWL_HSEMAPHORE hSemaphore);
46 FWL_ERR FWL_WaitSemaphore(FWL_HSEMAPHORE hSemaphore);
47 FWL_ERR FWL_PostSemaphore(FWL_HSEMAPHORE hSemaphore, int32_t down = 1);
48 FWL_ERR FWL_GetSemaphoreValue(FWL_HSEMAPHORE hSemaphore, int32_t& value);
49 FWL_ERR FWL_ResetSemaphore(FWL_HSEMAPHORE hSemaphore, int32_t init);
50 #endif
OLDNEW
« no previous file with comments | « no previous file | xfa/src/fwl/src/core/fwl_threadimp.cpp » ('j') | xfa/src/fwl/src/core/fwl_threadimp.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698