home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / quot210s.zip / include / threads.h < prev    next >
C/C++ Source or Header  |  1998-06-07  |  2KB  |  76 lines

  1. /*
  2.  * threads.h
  3.  *
  4.  * Header file for worker threads.
  5.  *
  6.  *      Created: 27th January, 1997
  7.  * Version 1.00: 31st March, 1997
  8.  * Version 2.00: 19th December, 1997
  9.  *
  10.  * (C) 1997 Nicholas Paul Sheppard
  11.  *
  12.  * This file is distributed under the GNU General Public License. See the
  13.  * file copying.txt for details.
  14.  */
  15.  
  16. #ifndef _QUOTERISER_THREADS_H
  17. #define _QUOTERISER_THREADS_H
  18.  
  19. #define INCL_WIN
  20. #include <os2.h>
  21. #include "types.h"
  22.  
  23. /* thread messages */
  24. #define QM_DONE        WM_USER
  25. #define QM_FOUND    (WM_USER + 1)
  26. #define QM_PAINT    (WM_USER + 2)
  27. #define QM_TYPESET    (WM_USER + 3)
  28. #define QM_COPY        (WM_USER + 4)
  29. #define QM_ERROR    (WM_USER + 5)
  30. #define QM_START    (WM_USER + 6)
  31.  
  32. #define THREADSTACK    32768
  33.  
  34.  
  35. /* window handles to threads */
  36. extern HWND        hwndPaint;
  37.  
  38.  
  39. /* type for thread procedures */
  40. typedef void         (*THREADPROC)(void *);
  41.  
  42.  
  43. /* type to pass to thread procedures */
  44. typedef struct _THREADINFO {
  45.     HWND        hwndCaller;    /* handle of calling window */
  46.     void        *pData;        /* pointer to data */
  47.     PROGSTATE    *pps;        /* pointer to program state */
  48. } THREADINFO;
  49.  
  50.  
  51. /* type for ThreadImport...() threads */
  52. typedef struct _IMPORTINFO {
  53.     void        *pdb;        /* pointer to database to import from */
  54.     BOOL        bAsk;        /* ask if duplicates should be replaced? */
  55.     BOOL        bReplace;    /* replace duplicates? */
  56. } IMPORTINFO;
  57.  
  58. /* threads in qthreads.c */
  59. void ThreadFindAllQuotes(THREADINFO *);
  60. void ThreadFindKeywords(THREADINFO *);
  61. void ThreadFindQuoteText(THREADINFO *);
  62. void ThreadFindAuthorsQuotes(THREADINFO *);
  63. void ThreadFindRandomQuote(THREADINFO *);
  64. void ThreadImportQuotes(THREADINFO *);
  65.  
  66. /* threads in athreads.c */
  67. void ThreadFindAllAuthors(THREADINFO *);
  68. void ThreadFindDescription(THREADINFO *);
  69. void ThreadFindAuthorName(THREADINFO *);
  70. void ThreadImportAuthors(THREADINFO *);
  71.  
  72. /* threads in paint.c */
  73. void ThreadPaint(THREADINFO *);
  74.  
  75. #endif
  76.