Merge XFA to PDFium master at 4dc95e7 on 10/28/2014
[pdfium.git] / xfa / src / fwl / src / core / include / fwl_threadimp.h
1 // Copyright 2014 PDFium Authors. All rights reserved.\r
2 // Use of this source code is governed by a BSD-style license that can be\r
3 // found in the LICENSE file.\r
4 \r
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com\r
6 \r
7 #ifndef _FWL_THREAD_IMP_H\r
8 #define _FWL_THREAD_IMP_H\r
9 class CFWL_Target;\r
10 class CFWL_NoteDriver;\r
11 class IFWL_NoteThread;\r
12 class IFWL_NoteDriver;\r
13 class CFWL_Thread;\r
14 class CFWL_NoteThread;\r
15 class CFWL_ControlThread;\r
16 class CFWL_Thread : public CFX_Object\r
17 {\r
18 public:\r
19     CFWL_Thread();\r
20     virtual ~CFWL_Thread();\r
21     virtual void        Release()\r
22     {\r
23         delete this;\r
24     }\r
25     virtual FWL_ERR Run(FWL_HTHREAD hThread);\r
26 };\r
27 class CFWL_ControlThread : public CFWL_Thread\r
28 {\r
29 public:\r
30     CFWL_ControlThread(IFWL_Thread * defHandler)\r
31     {\r
32         _defHandler = defHandler;\r
33     }\r
34     virtual ~CFWL_ControlThread();\r
35     virtual FWL_ERR Run(FWL_HTHREAD hThread);\r
36 protected:\r
37     IFWL_Thread *       _defHandler;\r
38 };\r
39 class CFWL_NoteThread : public CFWL_Thread\r
40 {\r
41 public:\r
42     CFWL_NoteThread();\r
43     virtual ~CFWL_NoteThread();\r
44     virtual FWL_ERR Run(FWL_HTHREAD hThread);\r
45     virtual IFWL_NoteDriver* GetNoteDriver();\r
46 protected:\r
47     CFWL_NoteDriver             *m_pNoteDriver;\r
48     FWL_HTHREAD                  m_hThread;\r
49     static CFWL_ControlThread    *      _assistantThreadHandler;\r
50     static FWL_HTHREAD                          _assistantThread;\r
51     static FX_INT32                                     _refCount;\r
52 };\r
53 #endif\r