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

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

Issue 1507893002: Revert "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
« no previous file with comments | « xfa/include/fwl/adapter/fwl_adapterthreadmgr.h ('k') | xfa/src/fwl/src/core/fwl_threadimp.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 class IFWL_NoteDriver;
10 class IFWL_Thread;
11 class IFWL_NoteThread;
12 typedef struct _FWL_HTHREAD { void* pData; } * FWL_HTHREAD;
13 class IFWL_Thread {
14 public:
15 static IFWL_Thread* Create();
9 16
10 class IFWL_NoteDriver; 17 protected:
18 virtual ~IFWL_Thread() {}
11 19
12 typedef struct _FWL_HTHREAD { void* pData; } * FWL_HTHREAD;
13
14 class IFWL_Thread {
15 public: 20 public:
16 virtual void Release() = 0; 21 virtual void Release() = 0;
17 virtual FWL_ERR Run(FWL_HTHREAD hThread) = 0; 22 virtual FWL_ERR Run(FWL_HTHREAD hThread) = 0;
18
19 protected:
20 virtual ~IFWL_Thread() {}
21 }; 23 };
22 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);
23 class IFWL_NoteThread : public IFWL_Thread { 30 class IFWL_NoteThread : public IFWL_Thread {
24 public: 31 public:
32 static IFWL_NoteThread* Create();
33 virtual FWL_ERR Run(FWL_HTHREAD hThread) = 0;
25 virtual IFWL_NoteDriver* GetNoteDriver() = 0; 34 virtual IFWL_NoteDriver* GetNoteDriver() = 0;
26 }; 35 };
27 36 typedef struct _FWL_HMUTEX { void* pData; } * FWL_HMUTEX;
28 #endif // FWL_THREAD_H_ 37 FWL_HMUTEX FWL_CreateMutex();
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 | « xfa/include/fwl/adapter/fwl_adapterthreadmgr.h ('k') | xfa/src/fwl/src/core/fwl_threadimp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698