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

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

Issue 1172793002: Merge to XFA: Use stdint.h types throughout PDFium. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 6 months 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/core/fwl_theme.h ('k') | xfa/include/fwl/core/fwl_timer.h » ('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; 9 class IFWL_NoteDriver;
10 class IFWL_Thread; 10 class IFWL_Thread;
11 class IFWL_NoteThread; 11 class IFWL_NoteThread;
12 typedef struct _FWL_HTHREAD { 12 typedef struct _FWL_HTHREAD {
13 FX_LPVOID pData; 13 FX_LPVOID pData;
14 } *FWL_HTHREAD; 14 } *FWL_HTHREAD;
15 class IFWL_Thread 15 class IFWL_Thread
16 { 16 {
17 public: 17 public:
18 static IFWL_Thread * Create(); 18 static IFWL_Thread * Create();
19 protected: 19 protected:
20 virtual ~IFWL_Thread() {} 20 virtual ~IFWL_Thread() {}
21 public: 21 public:
22 virtual void Release() = 0; 22 virtual void Release() = 0;
23 virtual FWL_ERR Run(FWL_HTHREAD hThread) = 0; 23 virtual FWL_ERR Run(FWL_HTHREAD hThread) = 0;
24 }; 24 };
25 FWL_HTHREAD FWL_StartThread(IFWL_Thread *pThread, FX_BOOL bSuspended = FALSE); 25 FWL_HTHREAD FWL_StartThread(IFWL_Thread *pThread, FX_BOOL bSuspended = FALSE);
26 FWL_ERR FWL_ResumeThread(FWL_HTHREAD hThread); 26 FWL_ERR FWL_ResumeThread(FWL_HTHREAD hThread);
27 FWL_ERR FWL_SuspendThread(FWL_HTHREAD hThread); 27 FWL_ERR FWL_SuspendThread(FWL_HTHREAD hThread);
28 FWL_ERR FWL_KillThread(FWL_HTHREAD hThread, FX_INT32 iExitCode); 28 FWL_ERR FWL_KillThread(FWL_HTHREAD hThread, int32_t iExitCode);
29 FWL_ERR FWL_StopThread(FWL_HTHREAD hThread, FX_INT32 iExitCode); 29 FWL_ERR FWL_StopThread(FWL_HTHREAD hThread, int32_t iExitCode);
30 FWL_ERR FWL_Sleep(FX_DWORD dwMilliseconds); 30 FWL_ERR FWL_Sleep(FX_DWORD dwMilliseconds);
31 class IFWL_NoteThread : public IFWL_Thread 31 class IFWL_NoteThread : public IFWL_Thread
32 { 32 {
33 public: 33 public:
34 static IFWL_NoteThread* Create(); 34 static IFWL_NoteThread* Create();
35 virtual FWL_ERR Run(FWL_HTHREAD hThread) = 0; 35 virtual FWL_ERR Run(FWL_HTHREAD hThread) = 0;
36 virtual IFWL_NoteDriver* GetNoteDriver() = 0; 36 virtual IFWL_NoteDriver* GetNoteDriver() = 0;
37 }; 37 };
38 typedef struct _FWL_HMUTEX { 38 typedef struct _FWL_HMUTEX {
39 FX_LPVOID pData; 39 FX_LPVOID pData;
40 } *FWL_HMUTEX; 40 } *FWL_HMUTEX;
41 FWL_HMUTEX FWL_CreateMutex(); 41 FWL_HMUTEX FWL_CreateMutex();
42 FWL_ERR FWL_DestroyMutex(FWL_HMUTEX hMutex); 42 FWL_ERR FWL_DestroyMutex(FWL_HMUTEX hMutex);
43 FWL_ERR FWL_LockMutex(FWL_HMUTEX hMutex); 43 FWL_ERR FWL_LockMutex(FWL_HMUTEX hMutex);
44 FWL_ERR FWL_TryLockMutex(FWL_HMUTEX hMutex); 44 FWL_ERR FWL_TryLockMutex(FWL_HMUTEX hMutex);
45 FWL_ERR FWL_UnlockMutex(FWL_HMUTEX hMutex); 45 FWL_ERR FWL_UnlockMutex(FWL_HMUTEX hMutex);
46 FWL_ERR FWL_IsLockedMutex(FWL_HMUTEX hMutex, FX_BOOL &bLocked); 46 FWL_ERR FWL_IsLockedMutex(FWL_HMUTEX hMutex, FX_BOOL &bLocked);
47 typedef struct _FWL_HSEMAPHORE { 47 typedef struct _FWL_HSEMAPHORE {
48 FX_LPVOID pData; 48 FX_LPVOID pData;
49 } *FWL_HSEMAPHORE; 49 } *FWL_HSEMAPHORE;
50 FWL_HSEMAPHORE FWL_CreateSemaphore(); 50 FWL_HSEMAPHORE FWL_CreateSemaphore();
51 FWL_ERR FWL_DestroySemaphore(FWL_HSEMAPHORE hSemaphore); 51 FWL_ERR FWL_DestroySemaphore(FWL_HSEMAPHORE hSemaphore);
52 FWL_ERR FWL_WaitSemaphore(FWL_HSEMAPHORE hSemaphore); 52 FWL_ERR FWL_WaitSemaphore(FWL_HSEMAPHORE hSemaphore);
53 FWL_ERR»» FWL_PostSemaphore(FWL_HSEMAPHORE hSemaphore, FX_INT32 down = 1); 53 FWL_ERR»» FWL_PostSemaphore(FWL_HSEMAPHORE hSemaphore, int32_t down = 1);
54 FWL_ERR»» FWL_GetSemaphoreValue(FWL_HSEMAPHORE hSemaphore, FX_INT32 &value ); 54 FWL_ERR»» FWL_GetSemaphoreValue(FWL_HSEMAPHORE hSemaphore, int32_t &value) ;
55 FWL_ERR»» FWL_ResetSemaphore(FWL_HSEMAPHORE hSemaphore, FX_INT32 init); 55 FWL_ERR»» FWL_ResetSemaphore(FWL_HSEMAPHORE hSemaphore, int32_t init);
56 #endif 56 #endif
OLDNEW
« no previous file with comments | « xfa/include/fwl/core/fwl_theme.h ('k') | xfa/include/fwl/core/fwl_timer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698