Changeset 14 for trunk/include/helpers


Ignore:
Timestamp:
Dec 9, 2000, 8:19:42 PM (25 years ago)
Author:
umoeller
Message:

Major updates; timers, LVM, miscellaneous.

Location:
trunk/include/helpers
Files:
2 added
26 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/helpers/animate.h

    r7 r14  
    1515
    1616/*      Copyright (C) 1997-2000 Ulrich M”ller.
    17  *      This file is part of the XWorkplace source package.
    18  *      XWorkplace is free software; you can redistribute it and/or modify
     17 *      This file is part of the "XWorkplace helpers" source package.
     18 *      This is free software; you can redistribute it and/or modify
    1919 *      it under the terms of the GNU General Public License as published
    2020 *      by the Free Software Foundation, in version 2 as it comes in the
  • trunk/include/helpers/cnrh.h

    r7 r14  
    1717
    1818/*      Copyright (C) 1997-2000 Ulrich M”ller.
    19  *      This file is part of the XWorkplace source package.
    20  *      XWorkplace is free software; you can redistribute it and/or modify
     19 *      This file is part of the "XWorkplace helpers" source package.
     20 *      This is free software; you can redistribute it and/or modify
    2121 *      it under the terms of the GNU General Public License as published
    2222 *      by the Free Software Foundation, in version 2 as it comes in the
     
    4040
    4141    /* ******************************************************************
    42      *                                                                  *
    43      *   Details view field infos                                       *
    44      *                                                                  *
     42     *
     43     *   Details view field infos
     44     *
    4545     ********************************************************************/
    4646
     
    108108
    109109    /* ******************************************************************
    110      *                                                                  *
    111      *   Record core management                                         *
    112      *                                                                  *
     110     *
     111     *   Record core management
     112     *
    113113     ********************************************************************/
    114114
     
    175175
    176176    /* ******************************************************************
    177      *                                                                  *
    178      *   CNRINFO management                                             *
    179      *                                                                  *
     177     *
     178     *   CNRINFO management
     179     *
    180180     ********************************************************************/
    181181
     
    403403
    404404    /* ******************************************************************
    405      *                                                                  *
    406      *   View management                                                *
    407      *                                                                  *
     405     *
     406     *   View management
     407     *
    408408     ********************************************************************/
    409409
     
    472472
    473473    /* ******************************************************************
    474      *                                                                  *
    475      *   Record relations/iteration                                     *
    476      *                                                                  *
     474     *
     475     *   Record relations/iteration
     476     *
    477477     ********************************************************************/
    478478
     
    480480                              PRECORDCORE precc);
    481481
    482     typedef ULONG (EXPENTRY FNCBRECC)(HWND, PRECORDCORE, ULONG, ULONG);
     482    typedef ULONG EXPENTRY FNCBRECC(HWND, PRECORDCORE, ULONG, ULONG);
    483483    typedef FNCBRECC *PFNCBRECC;
    484484
     
    539539
    540540    /* ******************************************************************
    541      *                                                                  *
    542      *   Miscellaneous                                                  *
    543      *                                                                  *
     541     *
     542     *   Miscellaneous
     543     *
    544544     ********************************************************************/
    545545
  • trunk/include/helpers/comctl.h

    r7 r14  
    1111
    1212/*      Copyright (C) 1997-2000 Ulrich M”ller.
    13  *      This file is part of the XWorkplace source package.
    14  *      XWorkplace is free software; you can redistribute it and/or modify
     13 *      This file is part of the "XWorkplace helpers" source package.
     14 *      This is free software; you can redistribute it and/or modify
    1515 *      it under the terms of the GNU General Public License as published
    1616 *      by the Free Software Foundation, in version 2 as it comes in the
     
    4040
    4141    /* ******************************************************************
    42      *                                                                  *
    43      *   "Menu button" control                                          *
    44      *                                                                  *
     42     *
     43     *   "Menu button" control
     44     *
    4545     ********************************************************************/
    4646
    47      BOOL ctlMakeMenuButton(HWND hwndButton,
    48                             HMODULE hmodMenu,
    49                             ULONG idMenu);
     47    VOID ctlDisplayButtonMenu(HWND hwndButton,
     48                              HWND hwndMenu);
     49
     50    BOOL ctlMakeMenuButton(HWND hwndButton,
     51                           HMODULE hmodMenu,
     52                           ULONG idMenu);
    5053
    5154    /* ******************************************************************
    52      *                                                                  *
    53      *   Progress bars                                                  *
    54      *                                                                  *
     55     *
     56     *   Progress bars
     57     *
    5558     ********************************************************************/
    5659
     
    8588
    8689    /* ******************************************************************
    87      *                                                                  *
    88      *   Chart Control                                                  *
    89      *                                                                  *
     90     *
     91     *   Chart Control
     92     *
    9093     ********************************************************************/
    9194
     
    236239
    237240    /* ******************************************************************
    238      *                                                                  *
    239      *   Split bars                                                     *
    240      *                                                                  *
     241     *
     242     *   Split bars
     243     *
    241244     ********************************************************************/
    242245
     
    358361
    359362    /* ******************************************************************
    360      *                                                                  *
    361      *   Subclassed Static Bitmap Control                               *
    362      *                                                                  *
     363     *
     364     *   Subclassed Static Bitmap Control
     365     *
    363366     ********************************************************************/
    364367
     
    424427
    425428    /* ******************************************************************
    426      *                                                                  *
    427      *   "Tooltip" control                                              *
    428      *                                                                  *
     429     *
     430     *   "Tooltip" control
     431     *
    429432     ********************************************************************/
    430433
     
    701704
    702705    /* ******************************************************************
    703      *                                                                  *
    704      *   Checkbox container record cores                                *
    705      *                                                                  *
     706     *
     707     *   Checkbox container record cores
     708     *
    706709     ********************************************************************/
    707710
     
    777780
    778781    /* ******************************************************************
    779      *                                                                  *
    780      *   Hotkey entry field                                             *
    781      *                                                                  *
     782     *
     783     *   Hotkey entry field
     784     *
    782785     ********************************************************************/
    783786
  • trunk/include/helpers/datetime.h

    r7 r14  
    1414
    1515/*      Copyright (C) 1997-2000 Ulrich M”ller.
    16  *      This file is part of the XWorkplace source package.
    17  *      XWorkplace is free software; you can redistribute it and/or modify
     16 *      This file is part of the "XWorkplace helpers" source package.
     17 *      This is free software; you can redistribute it and/or modify
    1818 *      it under the terms of the GNU General Public License as published
    1919 *      by the Free Software Foundation, in version 2 as it comes in the
     
    4141                             DATETIME* pdt);
    4242
     43    ULONG dtDayOfWeek(ULONG day,
     44                      ULONG mon,
     45                      ULONG yr);
     46
    4347    int dtIsLeapYear(unsigned yr);
    4448
     
    5660                       unsigned *pday);
    5761
     62    BOOL dtIsValidDate(LONG day,
     63                       LONG month,
     64                       ULONG year);
    5865#if __cplusplus
    5966}
  • trunk/include/helpers/debug.h

    r7 r14  
    4343
    4444    /********************************************************************
    45      *                                                                  *
    46      *   SYM file declarations                                          *
    47      *                                                                  *
     45     *
     46     *   SYM file declarations
     47     *
    4848     ********************************************************************/
    4949
     
    135135
    136136    /********************************************************************
    137      *                                                                  *
    138      *   EXE declarations taken from exe.h                              *
    139      *                                                                  *
     137     *
     138     *   EXE declarations taken from exe.h
     139     *
    140140     ********************************************************************/
    141141
     
    185185
    186186    /********************************************************************
    187      *                                                                  *
    188      *   Object Module Format (OMF) declarations                        *
    189      *                                                                  *
     187     *
     188     *   Object Module Format (OMF) declarations
     189     *
    190190     ********************************************************************/
    191191
     
    631631
    632632    /********************************************************************
    633      *                                                                  *
    634      *   Prototypes                                                     *
    635      *                                                                  *
     633     *
     634     *   Prototypes
     635     *
    636636     ********************************************************************/
    637637
     
    674674
    675675    /********************************************************************
    676      *                                                                  *
    677      *   Executable definitions                                         *
    678      *                                                                  *
     676     *
     677     *   Executable definitions
     678     *
    679679     ********************************************************************/
    680680
  • trunk/include/helpers/dosh.h

    r7 r14  
    1717/*      This file Copyright (C) 1997-2000 Ulrich M”ller,
    1818 *                                        Dmitry A. Steklenev.
    19  *      This file is part of the XWorkplace source package.
    20  *      XWorkplace is free software; you can redistribute it and/or modify
     19 *      This file is part of the "XWorkplace helpers" source package.
     20 *      This is free software; you can redistribute it and/or modify
    2121 *      it under the terms of the GNU General Public License as published
    2222 *      by the Free Software Foundation, in version 2 as it comes in the
     
    3636
    3737    /* ******************************************************************
    38      *                                                                  *
    39      *   Miscellaneous                                                  *
    40      *                                                                  *
     38     *
     39     *   Miscellaneous
     40     *
    4141     ********************************************************************/
    4242
     
    4747    BOOL doshIsWarp4(VOID);
    4848
     49    APIRET doshQueryAvailPhysMem(PULONG pulMem,
     50                                 ULONG ulLogicalSwapDrive);
     51
    4952    PSZ doshQuerySysErrorMsg(APIRET arc);
    5053
    5154    /* ******************************************************************
    52      *                                                                  *
    53      *   Memory helpers                                                 *
    54      *                                                                  *
     55     *
     56     *   Memory helpers
     57     *
    5558     ********************************************************************/
    5659
     
    6164
    6265    /* ******************************************************************
    63      *                                                                  *
    64      *   Drive helpers                                                  *
    65      *                                                                  *
     66     *
     67     *   Drive helpers
     68     *
    6669     ********************************************************************/
    6770
     
    7477    APIRET doshAssertDrive(ULONG ulLogicalDrive);
    7578
    76     double doshQueryDiskFree(ULONG ulLogicalDrive);
     79    APIRET doshSetLogicalMap(ULONG ulLogicalDrive);
     80
     81    APIRET doshQueryDiskFree(ULONG ulLogicalDrive,
     82                             double *pdFree);
    7783
    7884    APIRET doshQueryDiskFSType(ULONG ulLogicalDrive,
     
    174180
    175181    /* ******************************************************************
    176      *                                                                  *
    177      *   File helpers                                                   *
    178      *                                                                  *
     182     *
     183     *   File helpers
     184     *
    179185     ********************************************************************/
    180186
     
    213219
    214220    /* ******************************************************************
    215      *                                                                  *
    216      *   Directory helpers                                              *
    217      *                                                                  *
     221     *
     222     *   Directory helpers
     223     *
    218224     ********************************************************************/
    219225
     
    236242
    237243    /* ******************************************************************
    238      *                                                                  *
    239      *   Process helpers                                                *
    240      *                                                                  *
     244     *
     245     *   Performance Counters (CPU Load)
     246     *
     247     ********************************************************************/
     248
     249    #define CMD_PERF_INFO           0x41
     250    #define CMD_KI_ENABLE           0x60
     251    #define CMD_KI_DISABLE          0x61
     252    #ifndef CMD_KI_RDCNT
     253        #define CMD_KI_RDCNT            0x63
     254        typedef APIRET APIENTRY FNDOSPERFSYSCALL(ULONG ulCommand,
     255                                                 ULONG ulParm1,
     256                                                 ULONG ulParm2,
     257                                                 ULONG ulParm3);
     258        typedef FNDOSPERFSYSCALL *PFNDOSPERFSYSCALL;
     259    #endif
     260
     261    typedef struct _CPUUTIL
     262    {
     263        ULONG ulTimeLow;     // low 32 bits of time stamp
     264        ULONG ulTimeHigh;    // high 32 bits of time stamp
     265        ULONG ulIdleLow;     // low 32 bits of idle time
     266        ULONG ulIdleHigh;    // high 32 bits of idle time
     267        ULONG ulBusyLow;     // low 32 bits of busy time
     268        ULONG ulBusyHigh;    // high 32 bits of busy time
     269        ULONG ulIntrLow;     // low 32 bits of interrupt time
     270        ULONG ulIntrHigh;    // high 32 bits of interrupt time
     271    } CPUUTIL, *PCPUUTIL;
     272
     273    // macro to convert 8-byte (low, high) time value to double
     274    #define LL2F(high, low) (4294967296.0*(high)+(low))
     275
     276    /*
     277     *@@ DOSHPERFSYS:
     278     *      structure used with doshPerfOpen.
     279     *
     280     *@@added V0.9.7 (2000-12-02) [umoeller]
     281     */
     282
     283    typedef struct _DOSHPERFSYS
     284    {
     285        // output: no. of processors on the system
     286        ULONG       cProcessors;
     287        // output: one CPU load for each CPU
     288        PLONG       palLoads;
     289
     290        // each of the following ptrs points to an array of cProcessors items
     291        PCPUUTIL    paCPUUtils;     // CPUUTIL structures
     292        double      *padBusyPrev;   // previous "busy" calculations
     293        double      *padTimePrev;   // previous "time" calculations
     294
     295        // private stuff
     296        HMODULE     hmod;
     297        BOOL        fInitialized;
     298        PFNDOSPERFSYSCALL pDosPerfSysCall;
     299    } DOSHPERFSYS, *PDOSHPERFSYS;
     300
     301    APIRET doshPerfOpen(PDOSHPERFSYS *ppPerfSys);
     302
     303    APIRET doshPerfGet(PDOSHPERFSYS pPerfSys);
     304
     305    APIRET doshPerfClose(PDOSHPERFSYS *ppPerfSys);
     306
     307    /* ******************************************************************
     308     *
     309     *   Process helpers
     310     *
    241311     ********************************************************************/
    242312
     
    253323
    254324    /* ******************************************************************
    255      *                                                                  *
    256      *   Environment helpers                                            *
    257      *                                                                  *
     325     *
     326     *   Environment helpers
     327     *
    258328     ********************************************************************/
    259329
     
    291361
    292362    /* ******************************************************************
    293      *                                                                  *
    294      *   Module handling helpers                                        *
    295      *                                                                  *
     363     *
     364     *   Module handling helpers
     365     *
    296366     ********************************************************************/
    297367
     
    316386
    317387    /********************************************************************
    318      *                                                                  *
    319      *   Executable helpers                                             *
    320      *                                                                  *
     388     *
     389     *   Executable helpers
     390     *
    321391     ********************************************************************/
    322392
     
    548618
    549619    /********************************************************************
    550      *                                                                  *
    551      *   Partition functions                                            *
    552      *                                                                  *
     620     *
     621     *   Partition functions
     622     *
    553623     ********************************************************************/
    554624
  • trunk/include/helpers/eah.h

    r7 r14  
    4949 *      This file Copyright (C) 1997-2000 Ulrich M”ller,
    5050 *                                        Massachusetts Institute of Technology.
    51  *      This file is part of the XWorkplace source package.
    52  *      XWorkplace is free software; you can redistribute it and/or modify
     51 *      This file is part of the "XWorkplace helpers" source package.
     52 *      This is free software; you can redistribute it and/or modify
    5353 *      it under the terms of the GNU General Public License as published
    5454 *      by the Free Software Foundation, in version 2 as it comes in the
     
    115115
    116116    /* ******************************************************************
    117      *                                                                  *
    118      *   Read-EA functions                                              *
    119      *                                                                  *
     117     *
     118     *   Read-EA functions
     119     *
    120120     ********************************************************************/
    121121
    122122    ULONG eaHFileQueryTotalSize(HFILE hFile);
    123123
    124     ULONG eaPathQueryTotalSize(PSZ path);
     124    ULONG eaPathQueryTotalSize(const char *pcszPath);
    125125
    126126    PEALIST eaHFileReadAll(HFILE hfile);
    127127
    128     PEALIST eaPathReadAll(PSZ path);
     128    PEALIST eaPathReadAll(const char *pcszPath);
    129129
    130130    PEABINDING eaHFileReadOneByIndex(HFILE hfile, ULONG index);
    131131
    132     PEABINDING eaPathReadOneByIndex(PSZ path, ULONG index);
    133 
    134     PEABINDING eaHFileReadOneByName(HFILE hfile, PSZ name);
    135 
    136     PEABINDING eaPathReadOneByName(PSZ path, PSZ name);
     132    PEABINDING eaPathReadOneByIndex(const char *pcszPath, ULONG index);
     133
     134    PEABINDING eaHFileReadOneByName(HFILE hfile, const char *pcszEAName);
     135
     136    PEABINDING eaPathReadOneByName(const char *pcszPath, const char *pcszEAName);
    137137
    138138    /* ******************************************************************
    139      *                                                                  *
    140      *   Write-EA functions                                             *
    141      *                                                                  *
    142      ********************************************************************/
    143 
    144     void eaHFileWriteAll(HFILE hfile, PEALIST list);
    145 
    146     void eaPathWriteAll(PSZ path, PEALIST list);
    147 
    148     void eaHFileWriteOne(HFILE hfile, PEABINDING peab);
    149 
    150     void eaPathWriteOne(PSZ path, PEABINDING peab);
    151 
    152     void eaPathDeleteOne(PSZ path, PSZ pszEAName);
     139     *
     140     *   Write-EA functions
     141     *
     142     ********************************************************************/
     143
     144    APIRET eaHFileWriteAll(HFILE hfile, PEALIST list);
     145
     146    APIRET eaPathWriteAll(const char *pcszPath, PEALIST list);
     147
     148    APIRET eaHFileWriteOne(HFILE hfile, PEABINDING peab);
     149
     150    APIRET eaPathWriteOne(const char *pcszPath, PEABINDING peab);
     151
     152    APIRET eaPathDeleteOne(const char *pcszPath, const char *pcszEAName);
    153153
    154154    /********************************************************************
    155      *                                                                  *
    156      *   Translation funcs                                              *
    157      *                                                                  *
     155     *
     156     *   Translation funcs
     157     *
    158158     ********************************************************************/
    159159
     
    162162    PSZ eaCreatePSZFromBinding(PEABINDING peab);
    163163
    164     PEABINDING eaCreateBindingFromPSZ(PSZ pszEAName,
    165                              PSZ pszString);
     164    PEABINDING eaCreateBindingFromPSZ(const char *pcszEAName,
     165                                      const char *pcszInput);
    166166
    167167    USHORT eaQueryMVCount(PEABINDING peab,
     
    170170
    171171    PSZ eaQueryMVItem(PEABINDING peab,
    172                                 USHORT usIndex,
    173                                 PUSHORT pusEAType,
    174                                 PUSHORT pusCodepage,
    175                                 PUSHORT pusDataLength);
     172                      USHORT usIndex,
     173                      PUSHORT pusEAType,
     174                      PUSHORT pusCodepage,
     175                      PUSHORT pusDataLength);
    176176
    177177    PSZ eaCreatePSZFromMVBinding(PEABINDING peab,
    178                                  PSZ     pszSeparator,
     178                                 const char *pcszSeparator,
    179179                                 PUSHORT pusCodepage);
    180180
    181     PEABINDING eaCreateMVBindingFromPSZ(PSZ pszEAName,
    182                                         PSZ pszInput,
    183                                         PSZ pszSeparator,
     181    PEABINDING eaCreateMVBindingFromPSZ(const char *pcszEAName,
     182                                        const char *pcszInput,
     183                                        const char *pcszSeparator,
    184184                                        USHORT usCodepage);
    185185
    186186    /* ******************************************************************
    187      *                                                                  *
    188      *   Direct plain-string EA handling                                *
    189      *                                                                  *
     187     *
     188     *   Direct plain-string EA handling
     189     *
    190190     ********************************************************************/
    191191
  • trunk/include/helpers/except.h

    r7 r14  
    5353
    5454    /********************************************************************
    55      *                                                                  *
    56      *   Declarations                                                   *
    57      *                                                                  *
     55     *
     56     *   Declarations
     57     *
    5858     ********************************************************************/
     59
     60    // forward declaration
     61    typedef struct _EXCEPTIONREGISTRATIONRECORD2 *PEXCEPTIONREGISTRATIONRECORD2;
    5962
    6063    // "OnKill" function prototype for EXCEPTIONREGISTRATIONRECORD2
    6164    // added V0.9.0 (99-10-22) [umoeller]
    62     typedef VOID APIENTRY FNEXCONKILL(VOID);
    63     typedef FNEXCONKILL *PFNEXCONKILL;
     65    // removed V0.9.7 (2000-12-08) [umoeller]
     66    // typedef VOID APIENTRY FNEXCONKILL(PEXCEPTIONREGISTRATIONRECORD2);
     67    // typedef FNEXCONKILL *PFNEXCONKILL;
    6468
    6569    /*
     
    7781        PFN             pfnHandler;         // as in EXCEPTIONREGISTRATIONRECORD
    7882        jmp_buf         jmpThread;          // additional buffer for setjmp
    79         PFNEXCONKILL    pfnOnKill;          // subroutine to call upon process/thread termination
    80     } EXCEPTIONREGISTRATIONRECORD2, *PEXCEPTIONREGISTRATIONRECORD2;
     83        // PFNEXCONKILL    pfnOnKill;          // subroutine to call upon process/thread termination
     84        PVOID           pvUser;             // user ptr
     85    } EXCEPTIONREGISTRATIONRECORD2;
    8186
    8287    /*
     
    110115
    111116    /********************************************************************
    112      *                                                                  *
    113      *   Prototypes                                                     *
    114      *                                                                  *
     117     *
     118     *   Prototypes
     119     *
    115120     ********************************************************************/
    116121
     
    133138
    134139    /********************************************************************
    135      *                                                                  *
    136      *   Macros                                                         *
    137      *                                                                  *
     140     *
     141     *   Macros
     142     *
    138143     ********************************************************************/
    139144
     
    142147    #ifdef __NO_EXCEPTION_HANDLERS__
    143148        // exception handlers can completely be disabled
    144         #define TRY_LOUD(excptstruct, _pfnOnKill)
    145     #else
    146         #define TRY_LOUD(excptstruct, _pfnOnKill)                               \
     149        #define TRY_LOUD(excptstruct)
     150    #else
     151        #define TRY_LOUD(excptstruct)                                           \
    147152                {                                                               \
    148153                    EXCEPTSTRUCT          excptstruct = {0};                    \
    149154                    excptstruct.RegRec2.pfnHandler = (PFN)excHandlerLoud;       \
    150                     excptstruct.RegRec2.pfnOnKill = _pfnOnKill;                 \
    151155                    excptstruct.arc = DosSetExceptionHandler(                   \
    152156                                (PEXCEPTIONREGISTRATIONRECORD)&(excptstruct.RegRec2)); \
     
    159163                    if (excptstruct.ulExcpt == 0)                               \
    160164                    {
    161     #endif
    162 
    163     #ifdef __NO_EXCEPTION_HANDLERS__
    164         // exception handlers can completely be disabled
    165         #define TRY_QUIET(excptstruct, _pfnOnKill)
    166     #else
    167         #define TRY_QUIET(excptstruct, _pfnOnKill)                              \
     165
     166    #endif
     167
     168    #ifdef __NO_EXCEPTION_HANDLERS__
     169        // exception handlers can completely be disabled
     170        #define TRY_QUIET(excptstruct)
     171    #else
     172        #define TRY_QUIET(excptstruct)                                          \
    168173                {                                                               \
    169174                    EXCEPTSTRUCT          excptstruct = {0};                    \
    170175                    excptstruct.RegRec2.pfnHandler = (PFN)excHandlerQuiet;      \
    171                     excptstruct.RegRec2.pfnOnKill = _pfnOnKill;                 \
    172176                    excptstruct.arc = DosSetExceptionHandler(                   \
    173177                                (PEXCEPTIONREGISTRATIONRECORD)&(excptstruct.RegRec2)); \
     
    180184                    if (excptstruct.ulExcpt == 0)                               \
    181185                    {
     186
    182187    #endif
    183188
     
    192197                    else                                                        \
    193198                    { /* exception occured: */                                  \
    194                         DosUnsetExceptionHandler(                               \
    195                                 (PEXCEPTIONREGISTRATIONRECORD)&(excptstruct.RegRec2));
     199                        DosUnsetExceptionHandler((PEXCEPTIONREGISTRATIONRECORD)&(excptstruct.RegRec2));
    196200    #endif
    197201
  • trunk/include/helpers/gpih.h

    r7 r14  
    99 *            numbering.
    1010 *
    11  *@@include #define INCL_GPILOGCOLORTABLE
     11 *@@include #define INCL_GPILOGCOLORTABLE       // for some funcs
    1212 *@@include #include <os2.h>
    1313 *@@include #include "gpih.h"
     
    1616/*
    1717 *      Copyright (C) 1997-2000 Ulrich M”ller.
    18  *      This file is part of the XWorkplace source package.
    19  *      XWorkplace is free software; you can redistribute it and/or modify
     18 *      This file is part of the "XWorkplace helpers" source package.
     19 *      This is free software; you can redistribute it and/or modify
    2020 *      it under the terms of the GNU General Public License as published
    2121 *      by the Free Software Foundation, in version 2 as it comes in the
     
    3535
    3636    /* ******************************************************************
    37      *                                                                  *
    38      *   Device helpers                                                 *
    39      *                                                                  *
     37     *
     38     *   Device helpers
     39     *
    4040     ********************************************************************/
    4141
     
    4343
    4444    /* ******************************************************************
    45      *                                                                  *
    46      *   Color helpers                                                  *
    47      *                                                                  *
     45     *
     46     *   Color helpers
     47     *
    4848     ********************************************************************/
    4949
     
    7272                           BYTE bDivisor);
    7373
    74     /*
    75      *@@ gpihSwitchToRGB:
    76      *      this switches the given HPS into RGB mode.
    77      *      Requires INCL_GPILOGCOLORTABLE.
    78      */
    79 
    80     #define gpihSwitchToRGB(hps)                \
    81         GpiCreateLogColorTable(hps, 0, LCOLF_RGB, 0, 0, NULL);
    82 
    83     /* ******************************************************************
    84      *                                                                  *
    85      *   Drawing primitives helpers                                     *
    86      *                                                                  *
     74    #ifdef INCL_GPILOGCOLORTABLE
     75
     76        /*
     77         *@@ gpihSwitchToRGB:
     78         *      this switches the given HPS into RGB mode.
     79         *      Requires INCL_GPILOGCOLORTABLE.
     80         */
     81
     82        #define gpihSwitchToRGB(hps)                \
     83            GpiCreateLogColorTable(hps, 0, LCOLF_RGB, 0, 0, NULL);
     84
     85    #endif
     86
     87    /* ******************************************************************
     88     *
     89     *   Drawing primitives helpers
     90     *
    8791     ********************************************************************/
    8892
     
    100104                    LONG lColor);
    101105
    102     VOID gpihDraw3DFrame(HPS hps,
    103                          PRECTL prcl,
    104                          USHORT usWidth,
    105                          LONG lColorLeft,
    106                          LONG lColorRight);
     106    VOID gpihDrawThickFrame(HPS hps,
     107                            PRECTL prcl,
     108                            ULONG ulWidth);
     109
     110    VOID APIENTRY gpihDraw3DFrame(HPS hps,
     111                                  PRECTL prcl,
     112                                  USHORT usWidth,
     113                                  LONG lColorLeft,
     114                                  LONG lColorRight);
     115    typedef VOID APIENTRY GPIHDRAW3DFRAME(HPS hps,
     116                                          PRECTL prcl,
     117                                          USHORT usWidth,
     118                                          LONG lColorLeft,
     119                                          LONG lColorRight);
     120    typedef GPIHDRAW3DFRAME *PGPIHDRAW3DFRAME;
    107121
    108122    LONG gpihCharStringPosAt(HPS hps,
     
    114128
    115129    /* ******************************************************************
    116      *                                                                  *
    117      *   Font helpers                                                   *
    118      *                                                                  *
     130     *
     131     *   Font helpers
     132     *
    119133     ********************************************************************/
    120134
     
    144158
    145159    /* ******************************************************************
    146      *                                                                  *
    147      *   Bitmap helpers                                                 *
    148      *                                                                  *
     160     *
     161     *   Bitmap helpers
     162     *
    149163     ********************************************************************/
    150164
  • trunk/include/helpers/level.h

    r7 r14  
    1010 *      Copyright (C) 2000 Ulrich M”ller.
    1111 *      Copyright (C) 1994 Martin Lafaix (EDM/2 2-05).
    12  *      This file is part of the XWorkplace source package.
    13  *      XWorkplace is free software; you can redistribute it and/or modify
     12 *      This file is part of the "XWorkplace helpers" source package.
     13 *      This is free software; you can redistribute it and/or modify
    1414 *      it under the terms of the GNU General Public License as published
    1515 *      by the Free Software Foundation, in version 2 as it comes in the
  • trunk/include/helpers/linklist.h

    r10 r14  
    1313
    1414/*      Copyright (C) 1997-2000 Ulrich M”ller.
    15  *      This file is part of the XWorkplace source package.
    16  *      XWorkplace is free software; you can redistribute it and/or modify
     15 *      This file is part of the "XWorkplace helpers" source package.
     16 *      This is free software; you can redistribute it and/or modify
    1717 *      it under the terms of the GNU General Public License as published
    1818 *      by the Free Software Foundation, in version 2 as it comes in the
     
    3131    #define LINKLIST_HEADER_INCLUDED
    3232
     33    #ifndef XWPENTRY
     34        #error You must define XWPENTRY to contain the standard linkage for the XWPHelpers.
     35    #endif
     36
    3337    // define some basic things to make this work even with standard C
    3438    #if (!defined OS2_INCLUDED) && (!defined _OS2_H) && (!defined __SIMPLES_DEFINED)   // changed V0.9.0 (99-10-22) [umoeller]
     
    9296
    9397    /* ******************************************************************
    94      *                                                                  *
    95      *   List base functions                                            *
    96      *                                                                  *
     98     *
     99     *   List base functions
     100     *
    97101     ********************************************************************/
    98102
    99     void lstInit(PLINKLIST pList, BOOL fItemsFreeable);
     103    void* XWPENTRY lstMalloc(size_t size);
     104    typedef void* XWPENTRY LSTMALLOC(size_t size);
     105    typedef LSTMALLOC *PLSTMALLOC;
     106
     107    void* XWPENTRY lstStrDup(const char *pcsz);
     108    typedef void* XWPENTRY LSTSTRDUP(const char *pcsz);
     109    typedef LSTSTRDUP *PLSTSTRDUP;
     110
     111    void XWPENTRY lstInit(PLINKLIST pList, BOOL fItemsFreeable);
     112    typedef void XWPENTRY LSTINIT(PLINKLIST pList, BOOL fItemsFreeable);
     113    typedef LSTINIT *PLSTINIT;
    100114
    101115    #ifdef __XWPMEMDEBUG__ // setup.h, helpers\memdebug.c
    102         PLINKLIST lstCreateDebug(BOOL fItemsFreeable,
    103                                  const char *file,
    104                                  unsigned long line,
    105                                  const char *function);
     116        PLINKLIST XWPENTRY lstCreateDebug(BOOL fItemsFreeable,
     117                                          const char *file,
     118                                          unsigned long line,
     119                                          const char *function);
     120        typedef PLINKLIST XWPENTRY LSTCREATEDEBUG(BOOL fItemsFreeable,
     121                                          const char *file,
     122                                          unsigned long line,
     123                                          const char *function);
     124        typedef LSTCREATEDEBUG *PLSTCREATEDEBUG;
    106125
    107126        #define lstCreate(b) lstCreateDebug((b), __FILE__, __LINE__, __FUNCTION__)
    108127    #else
    109         PLINKLIST lstCreate(BOOL fItemsFreeable);
    110     #endif
    111 
    112     BOOL lstFree(PLINKLIST pList);
    113 
    114     BOOL lstClear(PLINKLIST pList);
    115 
    116     long lstCountItems(PLINKLIST pList);
    117 
    118     PLISTNODE lstQueryFirstNode(PLINKLIST pList);
    119 
    120     PLISTNODE lstNodeFromIndex(PLINKLIST pList, unsigned long ulIndex);
    121 
    122     PLISTNODE lstNodeFromItem(PLINKLIST pList, void* pItemData);
    123 
    124     void* lstItemFromIndex(PLINKLIST pList, unsigned long ulIndex);
     128        PLINKLIST XWPENTRY lstCreate(BOOL fItemsFreeable);
     129        typedef PLINKLIST XWPENTRY LSTCREATE(BOOL fItemsFreeable);
     130        typedef LSTCREATE *PLSTCREATE;
     131    #endif
     132
     133    BOOL XWPENTRY lstFree(PLINKLIST pList);
     134    typedef BOOL XWPENTRY LSTFREE(PLINKLIST pList);
     135    typedef LSTFREE *PLSTFREE;
     136
     137    BOOL XWPENTRY lstClear(PLINKLIST pList);
     138    typedef BOOL XWPENTRY LSTCLEAR(PLINKLIST pList);
     139    typedef LSTCLEAR *PLSTCLEAR;
     140
     141    long XWPENTRY lstCountItems(PLINKLIST pList);
     142    typedef long XWPENTRY LSTCOUNTITEMS(PLINKLIST pList);
     143    typedef LSTCOUNTITEMS *PLSTCOUNTITEMS;
     144
     145    PLISTNODE XWPENTRY lstQueryFirstNode(PLINKLIST pList);
     146    typedef PLISTNODE XWPENTRY LSTQUERYFIRSTNODE(PLINKLIST pList);
     147    typedef LSTQUERYFIRSTNODE *PLSTQUERYFIRSTNODE;
     148
     149    PLISTNODE XWPENTRY lstNodeFromIndex(PLINKLIST pList, unsigned long ulIndex);
     150    typedef PLISTNODE XWPENTRY LSTNODEFROMINDEX(PLINKLIST pList, unsigned long ulIndex);
     151    typedef LSTNODEFROMINDEX *PLSTNODEFROMINDEX;
     152
     153    PLISTNODE XWPENTRY lstNodeFromItem(PLINKLIST pList, void* pItemData);
     154    typedef PLISTNODE XWPENTRY LSTNODEFROMITEM(PLINKLIST pList, void* pItemData);
     155    typedef LSTNODEFROMITEM *PLSTNODEFROMITEM;
     156
     157    void* XWPENTRY lstItemFromIndex(PLINKLIST pList, unsigned long ulIndex);
     158    typedef void* XWPENTRY LSTITEMFROMINDEX(PLINKLIST pList, unsigned long ulIndex);
     159    typedef LSTITEMFROMINDEX *PLSTITEMFROMINDEX;
    125160
    126161    #ifdef __XWPMEMDEBUG__ // setup.h, helpers\memdebug.c
    127         PLISTNODE lstAppendItemDebug(PLINKLIST pList,
    128                                      void* pNewItemData,
    129                                      const char *file,
    130                                      unsigned long line,
    131                                      const char *function);
     162        PLISTNODE XWPENTRY lstAppendItemDebug(PLINKLIST pList,
     163                                              void* pNewItemData,
     164                                              const char *file,
     165                                              unsigned long line,
     166                                              const char *function);
    132167        #define lstAppendItem(pl, pd) lstAppendItemDebug((pl), (pd), __FILE__, __LINE__, __FUNCTION__)
    133168    #else
    134         PLISTNODE lstAppendItem(PLINKLIST pList, void* pNewItemData);
    135     #endif
    136 
    137     PLISTNODE lstInsertItemBefore(PLINKLIST pList,
    138                                   void* pNewItemData,
    139                                   unsigned long ulIndex);
    140 
    141     BOOL lstRemoveNode(PLINKLIST pList, PLISTNODE pRemoveNode);
    142 
    143     BOOL lstRemoveItem(PLINKLIST pList, void* pRemoveItem);
    144 
    145     BOOL lstSwapNodes(PLISTNODE pNode1,
    146                       PLISTNODE pNode2);
     169        PLISTNODE XWPENTRY lstAppendItem(PLINKLIST pList, void* pNewItemData);
     170        typedef PLISTNODE XWPENTRY LSTAPPENDITEM(PLINKLIST pList, void* pNewItemData);
     171        typedef LSTAPPENDITEM *PLSTAPPENDITEM;
     172    #endif
     173
     174    PLISTNODE XWPENTRY lstInsertItemBefore(PLINKLIST pList,
     175                                           void* pNewItemData,
     176                                           unsigned long ulIndex);
     177    typedef PLISTNODE XWPENTRY LSTINSERTITEMBEFORE(PLINKLIST pList,
     178                                           void* pNewItemData,
     179                                           unsigned long ulIndex);
     180    typedef LSTINSERTITEMBEFORE *PLSTINSERTITEMBEFORE;
     181
     182    BOOL XWPENTRY lstRemoveNode(PLINKLIST pList, PLISTNODE pRemoveNode);
     183    typedef BOOL XWPENTRY LSTREMOVENODE(PLINKLIST pList, PLISTNODE pRemoveNode);
     184    typedef LSTREMOVENODE *PLSTREMOVENODE;
     185
     186    BOOL XWPENTRY lstRemoveItem(PLINKLIST pList, void* pRemoveItem);
     187    typedef BOOL XWPENTRY LSTREMOVEITEM(PLINKLIST pList, void* pRemoveItem);
     188    typedef LSTREMOVEITEM *PLSTREMOVEITEM;
     189
     190    BOOL XWPENTRY lstSwapNodes(PLISTNODE pNode1, PLISTNODE pNode2);
     191    typedef BOOL XWPENTRY LSTSWAPNODES(PLISTNODE pNode1, PLISTNODE pNode2);
     192    typedef LSTSWAPNODES *PLSTSWAPNODES;
    147193
    148194    /* ******************************************************************
    149      *                                                                  *
    150      *   List sorting                                                   *
    151      *                                                                  *
     195     *
     196     *   List sorting
     197     *
    152198     ********************************************************************/
    153199
    154     BOOL lstQuickSort(PLINKLIST pList,
    155                       PFNSORTLIST pfnSort,
    156                       void* pStorage);
    157 
    158     BOOL lstBubbleSort(PLINKLIST pList,
    159                        PFNSORTLIST pfnSort,
    160                        void* pStorage);
     200    BOOL XWPENTRY lstQuickSort(PLINKLIST pList,
     201                               PFNSORTLIST pfnSort,
     202                               void* pStorage);
     203
     204    BOOL XWPENTRY lstBubbleSort(PLINKLIST pList,
     205                                PFNSORTLIST pfnSort,
     206                                void* pStorage);
    161207
    162208#endif
  • trunk/include/helpers/memdebug.h

    r13 r14  
    1313
    1414/*      Copyright (C) 2000 Ulrich M”ller.
    15  *      This file is part of the XWorkplace source package.
    16  *      XWorkplace is free software; you can redistribute it and/or modify
     15 *      This file is part of the "XWorkplace helpers" source package.
     16 *      This is free software; you can redistribute it and/or modify
    1717 *      it under the terms of the GNU General Public License as published
    1818 *      by the Free Software Foundation, in version 2 as it comes in the
  • trunk/include/helpers/prfh.h

    r7 r14  
    1919
    2020/*      Copyright (C) 1997-2000 Ulrich M”ller.
    21  *      This file is part of the XWorkplace source package.
    22  *      XWorkplace is free software; you can redistribute it and/or modify
     21 *      This file is part of the "XWorkplace helpers" source package.
     22 *      This is free software; you can redistribute it and/or modify
    2323 *      it under the terms of the GNU General Public License as published
    2424 *      by the Free Software Foundation, in version 2 as it comes in the
     
    9696                cTimeSep,
    9797                        // time separator (e.g. ':')
     98                cDecimal,
     99                        // decimal separator (e.g. '.')
    98100                cThousands;
    99101                        // thousands separator (e.g. ',')
  • trunk/include/helpers/procstat.h

    r7 r14  
    1717 *      This file Copyright (C) 1992-99 Ulrich M”ller,
    1818 *                                      Kai Uwe Rommel.
    19  *      This file is part of the XWorkplace source package.
    20  *      XWorkplace is free software; you can redistribute it and/or modify
     19 *      This file is part of the "XWorkplace helpers" source package.
     20 *      This is free software; you can redistribute it and/or modify
    2121 *      it under the terms of the GNU General Public License as published
    2222 *      by the Free Software Foundation, in version 2 as it comes in the
     
    3838
    3939    /********************************************************************
    40      *                                                                  *
    41      *   DosQProcStatus declarations (16-bit)                           *
    42      *                                                                  *
     40     *
     41     *   DosQProcStatus declarations (16-bit)
     42     *
    4343     ********************************************************************/
    4444
     
    230230
    231231    /********************************************************************
    232      *                                                                  *
    233      *   DosQuerySysState declarations (32-bit)                         *
    234      *                                                                  *
     232     *
     233     *   DosQuerySysState declarations (32-bit)
     234     *
    235235     ********************************************************************/
    236236
     
    596596
    597597    /********************************************************************
    598      *                                                                  *
    599      *   New procstat.c declarations                                    *
    600      *                                                                  *
     598     *
     599     *   New procstat.c declarations
     600     *
    601601     ********************************************************************/
    602602
     
    639639
    640640   /********************************************************************
    641     *                                                                  *
    642     *   DosQProcStat (16-bit) interface                                *
    643     *                                                                  *
     641    *
     642    *   DosQProcStat (16-bit) interface
     643    *
    644644    ********************************************************************/
    645645
     
    655655
    656656    /********************************************************************
    657      *                                                                  *
    658      *   DosQProcStat (16-bit) helpers                                  *
    659      *                                                                  *
     657     *
     658     *   DosQProcStat (16-bit) helpers
     659     *
    660660     ********************************************************************/
    661661
     
    671671
    672672    /********************************************************************
    673      *                                                                  *
    674      *   DosQuerySysState (32-bit) interface                            *
    675      *                                                                  *
     673     *
     674     *   DosQuerySysState (32-bit) interface
     675     *
    676676     ********************************************************************/
    677677
  • trunk/include/helpers/shapewin.h

    r7 r14  
    1818 *                  Akira Hatakeyama,
    1919 *                  Takayuki Suwa.
    20  *      This file is part of the XWorkplace source package.
    21  *      XWorkplace is free software; you can redistribute it and/or modify
     20 *      This file is part of the "XWorkplace helpers" source package.
     21 *      This is free software; you can redistribute it and/or modify
    2222 *      it under the terms of the GNU General Public License as published
    2323 *      by the Free Software Foundation, in version 2 as it comes in the
  • trunk/include/helpers/stringh.h

    r13 r14  
    1616/*
    1717 *      Copyright (C) 1997-2000 Ulrich M”ller.
    18  *      This file is part of the XWorkplace source package.
    19  *      XWorkplace is free software; you can redistribute it and/or modify
     18 *      This file is part of the "XWorkplace helpers" source package.
     19 *      This is free software; you can redistribute it and/or modify
    2020 *      it under the terms of the GNU General Public License as published
    2121 *      by the Free Software Foundation, in version 2 as it comes in the
     
    7070    ULONG strhWords(PSZ psz);
    7171
    72     PSZ strhThousandsULong(PSZ pszTarget, ULONG ul, CHAR cThousands);
     72    PSZ APIENTRY strhThousandsULong(PSZ pszTarget, ULONG ul, CHAR cThousands);
     73    typedef PSZ APIENTRY STRHTHOUSANDSULONG(PSZ pszTarget, ULONG ul, CHAR cThousands);
     74    typedef STRHTHOUSANDSULONG *PSTRHTHOUSANDSULONG;
    7375
    7476    PSZ strhThousandsDouble(PSZ pszTarget, double dbl, CHAR cThousands);
     
    8789                      CHAR cTimeSep);
    8890
    89     VOID strhDateTime(PSZ pszDate,
    90                       PSZ pszTime,
    91                       DATETIME *pDateTime,
    92                       ULONG ulDateFormat,
    93                       CHAR cDateSep,
    94                       ULONG ulTimeFormat,
    95                       CHAR cTimeSep);
     91    VOID APIENTRY strhDateTime(PSZ pszDate,
     92                               PSZ pszTime,
     93                               DATETIME *pDateTime,
     94                               ULONG ulDateFormat,
     95                               CHAR cDateSep,
     96                               ULONG ulTimeFormat,
     97                               CHAR cTimeSep);
     98    typedef VOID APIENTRY STRHDATETIME(PSZ pszDate,
     99                               PSZ pszTime,
     100                               DATETIME *pDateTime,
     101                               ULONG ulDateFormat,
     102                               CHAR cDateSep,
     103                               ULONG ulTimeFormat,
     104                               CHAR cTimeSep);
     105    typedef STRHDATETIME *PSTRHDATETIME;
    96106
    97107    #define STRH_BEGIN_CHARS    "\x0d\x0a "
     
    156166
    157167    /* ******************************************************************
    158      *                                                                  *
    159      *   Miscellaneous                                                  *
    160      *                                                                  *
     168     *
     169     *   Miscellaneous
     170     *
    161171     ********************************************************************/
    162172
    163173    VOID strhArrayAppend(PSZ *ppszRoot,
    164                          PSZ pszNew,
     174                         const char *pcszNew,
    165175                         PULONG pcbRoot);
    166176
     
    170180
    171181    /* ******************************************************************
    172      *                                                                  *
    173      *   Wildcard matching                                              *
    174      *                                                                  *
     182     *
     183     *   Wildcard matching
     184     *
    175185     ********************************************************************/
    176186
     
    195205
    196206    /* ******************************************************************
    197      *                                                                  *
    198      *   Fast string searches                                           *
    199      *                                                                  *
     207     *
     208     *   Fast string searches
     209     *
    200210     ********************************************************************/
    201211
  • trunk/include/helpers/syssound.h

    r7 r14  
    1515
    1616/*      Copyright (C) 1999-2000 Ulrich M”ller.
    17  *      This file is part of the XWorkplace source package.
    18  *      XWorkplace is free software; you can redistribute it and/or modify
     17 *      This file is part of the "XWorkplace helpers" source package.
     18 *      This is free software; you can redistribute it and/or modify
    1919 *      it under the terms of the GNU General Public License as published
    2020 *      by the Free Software Foundation, in version 2 as it comes in the
     
    3535
    3636    /********************************************************************
    37      *                                                                  *
    38      *   Declarations                                                   *
    39      *                                                                  *
     37     *
     38     *   Declarations
     39     *
    4040     ********************************************************************/
    4141
     
    6363
    6464    /********************************************************************
    65      *                                                                  *
    66      *   Function prototypes                                            *
    67      *                                                                  *
     65     *
     66     *   Function prototypes
     67     *
    6868     ********************************************************************/
    6969
  • trunk/include/helpers/textv_html.h

    r7 r14  
    99
    1010/*      Copyright (C) 2000 Ulrich M”ller.
    11  *      This file is part of the XWorkplace source package.
    12  *      XWorkplace is free software; you can redistribute it and/or modify
     11 *      This file is part of the "XWorkplace helpers" source package.
     12 *      This is free software; you can redistribute it and/or modify
    1313 *      it under the terms of the GNU General Public License as published
    1414 *      by the Free Software Foundation, in version 2 as it comes in the
     
    3232
    3333    /* ******************************************************************
    34      *                                                                  *
    35      *   HTML converter                                                 *
    36      *                                                                  *
     34     *
     35     *   HTML converter
     36     *
    3737     ********************************************************************/
    3838
  • trunk/include/helpers/textview.h

    r12 r14  
    99
    1010/*      Copyright (C) 2000 Ulrich M”ller.
    11  *      This file is part of the XWorkplace source package.
    12  *      XWorkplace is free software; you can redistribute it and/or modify
     11 *      This file is part of the "XWorkplace helpers" source package.
     12 *      This is free software; you can redistribute it and/or modify
    1313 *      it under the terms of the GNU General Public License as published
    1414 *      by the Free Software Foundation, in version 2 as it comes in the
     
    3434
    3535    /* ******************************************************************
    36      *                                                                  *
    37      *   Escape sequences                                               *
    38      *                                                                  *
     36     *
     37     *   Escape sequences
     38     *
    3939     ********************************************************************/
    4040
     
    151151
    152152    /* ******************************************************************
    153      *                                                                  *
    154      *   Device-independent functions                                   *
    155      *                                                                  *
     153     *
     154     *   Device-independent functions
     155     *
    156156     ********************************************************************/
    157157
     
    380380
    381381    /* ******************************************************************
    382      *                                                                  *
    383      *   Window-dependent functions                                     *
    384      *                                                                  *
     382     *
     383     *   Window-dependent functions
     384     *
    385385     ********************************************************************/
    386386
     
    474474
    475475    /* ******************************************************************
    476      *                                                                  *
    477      *   Printer-dependent functions                                    *
    478      *                                                                  *
     476     *
     477     *   Printer-dependent functions
     478     *
    479479     ********************************************************************/
    480480
  • trunk/include/helpers/threads.h

    r7 r14  
    1616/*
    1717 *      Copyright (C) 1997-2000 Ulrich M”ller.
    18  *      This file is part of the XWorkplace source package.
    19  *      XWorkplace is free software; you can redistribute it and/or modify
     18 *      This file is part of the "XWorkplace helpers" source package.
     19 *      This is free software; you can redistribute it and/or modify
    2020 *      it under the terms of the GNU General Public License as published
    2121 *      by the Free Software Foundation, in version 2 as it comes in the
  • trunk/include/helpers/tree.h

    r13 r14  
    1212 *      Copyright (C) 1991-99 iMatix Corporation.
    1313 *      Copyright (C) 2000 Ulrich M”ller.
    14  *      This file is part of the XWorkplace source package.
    15  *      XWorkplace is free software; you can redistribute it and/or modify
     14 *      This file is part of the "XWorkplace helpers" source package.
     15 *      This is free software; you can redistribute it and/or modify
    1616 *      it under the terms of the GNU General Public License as published
    1717 *      by the Free Software Foundation, in version 2 as it comes in the
  • trunk/include/helpers/undoc.h

    r7 r14  
    1515
    1616/*      Copyright (C) 1997-2000 Ulrich M”ller.
    17  *      This file is part of the XWorkplace source package.
    18  *      XWorkplace is free software; you can redistribute it and/or modify
     17 *      This file is part of the "XWorkplace helpers" source package.
     18 *      This is free software; you can redistribute it and/or modify
    1919 *      it under the terms of the GNU General Public License as published
    2020 *      by the Free Software Foundation, in version 2 as it comes in the
  • trunk/include/helpers/winh.h

    r7 r14  
    1111
    1212/*      Copyright (C) 1997-2000 Ulrich M”ller.
    13  *      This file is part of the XWorkplace source package.
    14  *      XWorkplace is free software; you can redistribute it and/or modify
     13 *      This file is part of the "XWorkplace helpers" source package.
     14 *      This is free software; you can redistribute it and/or modify
    1515 *      it under the terms of the GNU General Public License as published
    1616 *      by the Free Software Foundation, in version 2 as it comes in the
     
    3434 *@@include #define INCL_WINSYS
    3535 *@@include #define INCL_WINSHELLDATA
     36 *@@include #define INCL_WINSWITCHLIST      // for winhQuerySwitchList
    3637 *@@include #define INCL_WINPROGRAMLIST     // for winhStartApp
    3738 *@@include #define INCL_WINHELP            // for help manager helpers
     
    4748    #define WINH_HEADER_INCLUDED
    4849
    49     /* ******************************************************************
    50      *                                                                  *
    51      *   Declarations                                                   *
    52      *                                                                  *
     50    #ifndef XWPENTRY
     51        #error You must define XWPENTRY to contain the standard linkage for the XWPHelpers.
     52    #endif
     53
     54    /* ******************************************************************
     55     *
     56     *   Declarations
     57     *
    5358     ********************************************************************/
    5459
     
    6267
    6368    /* ******************************************************************
    64      *                                                                  *
    65      *   Macros                                                         *
    66      *                                                                  *
     69     *
     70     *   Macros
     71     *
    6772     ********************************************************************/
    6873
     
    101106
    102107    /* ******************************************************************
    103      *                                                                  *
    104      *   Menu helpers                                                   *
    105      *                                                                  *
     108     *
     109     *   Menu helpers
     110     *
    106111     ********************************************************************/
    107112
     
    121126                    HWND_DESKTOP, HWND_TOP, 0, 0, 0)
    122127
    123     SHORT winhInsertMenuItem(HWND hwndMenu,
    124                              SHORT iPosition,
    125                              SHORT sItemId,
    126                              PSZ pszItemTitle,
    127                              SHORT afStyle,
    128                              SHORT afAttr);
    129 
    130     HWND winhInsertSubmenu(HWND hwndMenu,
    131                            ULONG iPosition,
    132                            SHORT sMenuId,
    133                            PSZ pszSubmenuTitle,
    134                            USHORT afMenuStyle,
    135                            SHORT sItemId,
    136                            PSZ pszItemTitle,
    137                            USHORT afItemStyle,
    138                            USHORT afAttribute);
     128    SHORT XWPENTRY winhInsertMenuItem(HWND hwndMenu,
     129                                      SHORT iPosition,
     130                                      SHORT sItemId,
     131                                      PSZ pszItemTitle,
     132                                      SHORT afStyle,
     133                                      SHORT afAttr);
     134
     135    HWND XWPENTRY winhInsertSubmenu(HWND hwndMenu,
     136                                    ULONG iPosition,
     137                                    SHORT sMenuId,
     138                                    PSZ pszSubmenuTitle,
     139                                    USHORT afMenuStyle,
     140                                    SHORT sItemId,
     141                                    PSZ pszItemTitle,
     142                                    USHORT afItemStyle,
     143                                    USHORT afAttribute);
    139144
    140145    /*
     
    165170            (SHORT)WinSendMsg(hwndMenu, MM_DELETEITEM, MPFROM2SHORT(sItemId, FALSE), 0)
    166171
    167     SHORT winhInsertMenuSeparator(HWND hMenu,
    168                                   SHORT iPosition,
    169                                   SHORT sId);
    170 
    171     PSZ winhQueryMenuItemText(HWND hwndMenu,
    172                               USHORT usItemID);
    173 
    174     BOOL winhAppend2MenuItemText(HWND hwndMenu,
    175                                  USHORT usItemID,
    176                                  const char *pcszAppend,
    177                                  BOOL fTab);
    178 
    179     VOID winhMenuRemoveEllipse(HWND hwndMenu,
    180                                USHORT usItemId);
    181 
    182     SHORT winhQueryItemUnderMouse(HWND hwndMenu, POINTL *pptlMouse, RECTL *prtlItem);
    183 
    184     /* ******************************************************************
    185      *                                                                  *
    186      *   Slider helpers                                                 *
    187      *                                                                  *
    188      ********************************************************************/
    189 
    190     HWND winhReplaceWithLinearSlider(HWND hwndParent,
    191                                      HWND hwndOwner,
    192                                      HWND hwndInsertAfter,
    193                                      ULONG ulID,
    194                                      ULONG ulSliderStyle,
    195                                      ULONG ulTickCount);
    196 
    197     BOOL winhSetSliderTicks(HWND hwndSlider,
    198                             MPARAM mpEveryOther,
    199                             ULONG ulPixels);
     172    SHORT XWPENTRY winhInsertMenuSeparator(HWND hMenu,
     173                                           SHORT iPosition,
     174                                           SHORT sId);
     175
     176    PSZ XWPENTRY winhQueryMenuItemText(HWND hwndMenu,
     177                                       USHORT usItemID);
     178
     179    BOOL XWPENTRY winhAppend2MenuItemText(HWND hwndMenu,
     180                                          USHORT usItemID,
     181                                          const char *pcszAppend,
     182                                          BOOL fTab);
     183
     184    VOID XWPENTRY winhMenuRemoveEllipse(HWND hwndMenu,
     185                                        USHORT usItemId);
     186
     187    SHORT XWPENTRY winhQueryItemUnderMouse(HWND hwndMenu, POINTL *pptlMouse, RECTL *prtlItem);
     188
     189    /* ******************************************************************
     190     *
     191     *   Slider helpers
     192     *
     193     ********************************************************************/
     194
     195    HWND XWPENTRY winhReplaceWithLinearSlider(HWND hwndParent,
     196                                              HWND hwndOwner,
     197                                              HWND hwndInsertAfter,
     198                                              ULONG ulID,
     199                                              ULONG ulSliderStyle,
     200                                              ULONG ulTickCount);
     201
     202    BOOL XWPENTRY winhSetSliderTicks(HWND hwndSlider, MPARAM mpEveryOther, ULONG ulPixels);
    200203
    201204    /*
     
    230233                              0))
    231234
    232     HWND winhReplaceWithCircularSlider(HWND hwndParent,
    233                            HWND hwndOwner,
    234                            HWND hwndInsertAfter,
    235                            ULONG ulID,
    236                            ULONG ulSliderStyle,
    237                            SHORT sMin,
    238                            SHORT sMax,
    239                            USHORT usIncrement,
    240                            USHORT usTicksEvery);
    241 
    242     /* ******************************************************************
    243      *                                                                  *
    244      *   Spin button helpers                                            *
    245      *                                                                  *
    246      ********************************************************************/
    247 
    248     VOID winhSetDlgItemSpinData(HWND hwndDlg,
    249                                ULONG idSpinButton,
    250                                ULONG min,
    251                                ULONG max,
    252                                ULONG current);
    253 
    254     LONG winhAdjustDlgItemSpinData(HWND hwndDlg,
    255                                    USHORT usItemID,
    256                                    LONG lGrid,
    257                                    USHORT usNotifyCode);
    258 
    259     /* ******************************************************************
    260      *                                                                  *
    261      *   Entry field helpers                                            *
    262      *                                                                  *
     235    HWND XWPENTRY winhReplaceWithCircularSlider(HWND hwndParent,
     236                                                HWND hwndOwner,
     237                                                HWND hwndInsertAfter,
     238                                                ULONG ulID,
     239                                                ULONG ulSliderStyle,
     240                                                SHORT sMin,
     241                                                SHORT sMax,
     242                                                USHORT usIncrement,
     243                                                USHORT usTicksEvery);
     244
     245    /* ******************************************************************
     246     *
     247     *   Spin button helpers
     248     *
     249     ********************************************************************/
     250
     251    VOID XWPENTRY winhSetDlgItemSpinData(HWND hwndDlg,
     252                                         ULONG idSpinButton,
     253                                         ULONG min,
     254                                         ULONG max,
     255                                         ULONG current);
     256
     257    LONG XWPENTRY winhAdjustDlgItemSpinData(HWND hwndDlg,
     258                                            USHORT usItemID,
     259                                            LONG lGrid,
     260                                            USHORT usNotifyCode);
     261
     262    /* ******************************************************************
     263     *
     264     *   Entry field helpers
     265     *
    263266     ********************************************************************/
    264267
     
    302305
    303306    /* ******************************************************************
    304      *                                                                  *
    305      *   List box helpers                                               *
    306      *                                                                  *
    307      ********************************************************************/
    308 
    309     /*
    310      *@@ winhQueryLboxItemCount:
     307     *
     308     *   List box helpers
     309     *
     310     ********************************************************************/
     311
     312    /*  The following macros are defined in the OS/2 headers for
     313        list boxes:
     314
     315        LONG WinQueryLboxCount(HWND hwndLbox);
     316                    // wrapper around LM_QUERYITEMCOUNT;
     317                    // list box item count
     318
     319        SHORT WinQueryLboxItemTextLength(HWND hwndLbox,
     320                                         SHORT index); // item index, starting from 0
     321                    // wrapper around LM_QUERYITEMTEXTLENGTH;
     322                    // returns length of item text, excluding NULL character
     323
     324        LONG WinQueryLboxItemText(HWND hwndLbox,
     325                                  SHORT index,      // item index, starting from 0
     326                                  PSZ psz,          // buffer
     327                                  PSZ cchMax);      // size of buffer, incl. null
     328                    // wrapper around LM_QUERYITEMTEXT;
     329                    // returns length of item text, excluding NULL character
     330
     331        BOOL WinSetLboxItemText(HWND hwndLbox,
     332                                LONG index,
     333                                PSZ psz);
     334                    // wrapper around LM_SETITEMTEXT
     335
     336        LONG WinInsertLboxItem(HWND hwndLbox,
     337                               LONG index,          // new item index, starting from 0
     338                                                    // or LIT_END
     339                                                    // or LIT_SORTASCENDING
     340                                                    // or LIT_SORTDESCENDING
     341                               PSZ psz)
     342                    // wrapper around LM_INSERTITEM;
     343                    // returns LIT_MEMERROR, LIT_ERROR, or zero-based index
     344
     345        LONG WinDeleteLboxItem(HWND hwndLbox,
     346                               LONG index);         // item index, starting from 0
     347
     348        LONG WinQueryLboxSelectedItem(HWND hwndLbox);
     349                    // wrapper around LM_QUERYSELECTION;
     350                    // works with single selection only,
     351                    // use winhQueryLboxSelectedItem instead
     352    */
     353
     354    /*
     355     * winhQueryLboxItemCount:
    311356     *      returns the no. of items in the listbox
    312357     *      as a SHORT.
    313358     *
    314      *@@added V0.9.1 (99-12-14) [umoeller]
    315      */
    316 
    317     #define winhQueryLboxItemCount(hwndListBox)                 \
    318         (SHORT)WinSendMsg(hwndListBox, LM_QUERYITEMCOUNT, 0, 0)
     359     *added V0.9.1 (99-12-14) [umoeller]
     360     */
     361
     362    // #define winhQueryLboxItemCount(hwndListBox)
     363    // (SHORT)WinSendMsg(hwndListBox, LM_QUERYITEMCOUNT, 0, 0)
     364
     365    // removed, use WinQueryLboxCount
    319366
    320367    /*
     
    349396     *
    350397     *      To have the cursored item returned, use LIT_CURSOR.
     398     *
     399     *      For single selection, you can also use
     400     *      WinQueryLboxSelectedItem from the OS/2 PM headers.
    351401     */
    352402
     
    375425                            (MPARAM)(fSelect)))
    376426
    377     ULONG winhLboxSelectAll(HWND hwndListBox,
    378                             BOOL fSelect);
     427    ULONG XWPENTRY winhLboxSelectAll(HWND hwndListBox, BOOL fSelect);
    379428
    380429    /*
     
    398447                              MPFROMSHORT(sItemIndex), (MPARAM)NULL)
    399448
    400     PSZ winhQueryLboxItemText(HWND hwndListbox,
    401                               SHORT sIndex);
    402 
    403     BOOL winhMoveLboxItem(HWND hwndSource,
    404                           SHORT sSourceIndex,
    405                           HWND hwndTarget,
    406                           SHORT sTargetIndex,
    407                           BOOL fSelectTarget);
    408 
    409     /* ******************************************************************
    410      *                                                                  *
    411      *   Scroll bar helpers                                             *
    412      *                                                                  *
    413      ********************************************************************/
    414 
    415     BOOL winhUpdateScrollBar(HWND hwndScrollBar,
    416                              ULONG ulWinPels,
    417                              ULONG ulViewportPels,
    418                              ULONG ulCurUnitOfs,
    419                              BOOL fAutoHide);
    420 
    421     BOOL winhHandleScrollMsg(HWND hwnd2Scroll,
    422                              HWND hwndScrollBar,
    423                              PLONG plCurUnitOfs,
    424                              PRECTL prcl2Scroll,
    425                              LONG ulViewportPels,
    426                              USHORT usLineStepUnits,
    427                              ULONG msg,
    428                              MPARAM mp2);
    429 
    430     BOOL winhProcessScrollChars(HWND hwndClient,
    431                                 HWND hwndVScroll,
    432                                 HWND hwndHScroll,
    433                                 MPARAM mp1,
    434                                 MPARAM mp2,
    435                                 ULONG ulVertMax,
    436                                 ULONG ulHorzMax);
    437 
    438     /* ******************************************************************
    439      *                                                                  *
    440      *   Window positioning helpers                                     *
    441      *                                                                  *
    442      ********************************************************************/
    443 
    444     BOOL winhSaveWindowPos(HWND hwnd,
    445                            HINI hIni,
    446                            PSZ pszApp,
    447                            PSZ pszKey);
    448 
    449     BOOL winhRestoreWindowPos(HWND hwnd,
    450                            HINI hIni,
    451                            PSZ pszApp,
    452                            PSZ pszKey,
    453                            ULONG fl);
     449    PSZ XWPENTRY winhQueryLboxItemText(HWND hwndListbox, SHORT sIndex);
     450
     451    BOOL XWPENTRY winhMoveLboxItem(HWND hwndSource,
     452                                   SHORT sSourceIndex,
     453                                   HWND hwndTarget,
     454                                   SHORT sTargetIndex,
     455                                   BOOL fSelectTarget);
     456
     457    /* ******************************************************************
     458     *
     459     *   Scroll bar helpers
     460     *
     461     ********************************************************************/
     462
     463    BOOL XWPENTRY winhUpdateScrollBar(HWND hwndScrollBar,
     464                                      ULONG ulWinPels,
     465                                      ULONG ulViewportPels,
     466                                      ULONG ulCurUnitOfs,
     467                                      BOOL fAutoHide);
     468
     469    BOOL XWPENTRY winhHandleScrollMsg(HWND hwnd2Scroll,
     470                                      HWND hwndScrollBar,
     471                                      PLONG plCurUnitOfs,
     472                                      PRECTL prcl2Scroll,
     473                                      LONG ulViewportPels,
     474                                      USHORT usLineStepUnits,
     475                                      ULONG msg,
     476                                      MPARAM mp2);
     477
     478    BOOL XWPENTRY winhProcessScrollChars(HWND hwndClient,
     479                                         HWND hwndVScroll,
     480                                         HWND hwndHScroll,
     481                                         MPARAM mp1,
     482                                         MPARAM mp2,
     483                                         ULONG ulVertMax,
     484                                         ULONG ulHorzMax);
     485
     486    /* ******************************************************************
     487     *
     488     *   Window positioning helpers
     489     *
     490     ********************************************************************/
     491
     492    BOOL XWPENTRY winhSaveWindowPos(HWND hwnd, HINI hIni, PSZ pszApp, PSZ pszKey);
     493
     494    BOOL XWPENTRY winhRestoreWindowPos(HWND hwnd, HINI hIni, PSZ pszApp, PSZ pszKey, ULONG fl);
    454495
    455496    #define XAC_MOVEX       0x0001
     
    470511    } XADJUSTCTRLS, *PXADJUSTCTRLS;
    471512
    472     BOOL winhAdjustControls(HWND hwndDlg,
    473                             MPARAM *pmpFlags,
    474                             ULONG ulCount,
    475                             PSWP pswpNew,
    476                             PXADJUSTCTRLS pxac);
    477 
    478     void winhCenterWindow(HWND hwnd);
    479 
    480     /* ******************************************************************
    481      *                                                                  *
    482      *   Presparams helpers                                             *
    483      *                                                                  *
    484      ********************************************************************/
    485 
    486     PSZ winhQueryWindowFont(HWND hwnd);
    487 
    488     BOOL winhSetWindowFont(HWND hwnd,
    489                            PSZ pszFont);
     513    BOOL XWPENTRY winhAdjustControls(HWND hwndDlg,
     514                                     MPARAM *pmpFlags,
     515                                     ULONG ulCount,
     516                                     PSWP pswpNew,
     517                                     PXADJUSTCTRLS pxac);
     518
     519    void XWPENTRY winhCenterWindow(HWND hwnd);
     520    typedef void XWPENTRY WINHCENTERWINDOW(HWND hwnd);
     521    typedef WINHCENTERWINDOW *PWINHCENTERWINDOW;
     522
     523    HWND XWPENTRY winhFindWindowBelow(HWND hwndFind);
     524
     525    /* ******************************************************************
     526     *
     527     *   Presparams helpers
     528     *
     529     ********************************************************************/
     530
     531    PSZ XWPENTRY winhQueryWindowFont(HWND hwnd);
     532    typedef PSZ XWPENTRY WINHQUERYWINDOWFONT(HWND hwnd);
     533    typedef WINHQUERYWINDOWFONT *PWINHQUERYWINDOWFONT;
     534
     535    BOOL XWPENTRY winhSetWindowFont(HWND hwnd, const char *pcszFont);
     536    typedef BOOL XWPENTRY WINHSETWINDOWFONT(HWND hwnd, const char *pcszFont);
     537    typedef WINHSETWINDOWFONT *PWINHSETWINDOWFONT;
    490538
    491539    /*
     
    502550            (winhSetWindowFont(WinWindowFromID(hwnd, usId), pszFont))
    503551
    504     ULONG winhSetControlsFont(HWND hwndDlg,
    505                               SHORT usIDMin,
    506                               SHORT usIDMax,
    507                               const char *pcszFont);
     552    ULONG XWPENTRY winhSetControlsFont(HWND hwndDlg, SHORT usIDMin, SHORT usIDMax, const char *pcszFont);
    508553
    509554    #ifdef INCL_WINSYS
    510         BOOL winhStorePresParam(PPRESPARAMS *pppp,
    511                                 ULONG ulAttrType,
    512                                 ULONG cbData,
    513                                 PVOID pData);
     555        BOOL XWPENTRY winhStorePresParam(PPRESPARAMS *pppp,
     556                                         ULONG ulAttrType,
     557                                         ULONG cbData,
     558                                         PVOID pData);
    514559    #endif
    515560
    516     LONG winhQueryPresColor(HWND    hwnd,
    517                             ULONG   ulPP,
    518                             BOOL    fInherit,
    519                             LONG    lSysColor);
    520 
    521     /* ******************************************************************
    522      *                                                                  *
    523      *   Help instance helpers                                          *
    524      *                                                                  *
     561    LONG XWPENTRY winhQueryPresColor(HWND hwnd, ULONG ulPP, BOOL fInherit, LONG lSysColor);
     562    typedef LONG XWPENTRY WINHQUERYPRESCOLOR(HWND hwnd, ULONG ulPP, BOOL fInherit, LONG lSysColor);
     563    typedef WINHQUERYPRESCOLOR *PWINHQUERYPRESCOLOR;
     564
     565    /* ******************************************************************
     566     *
     567     *   Help instance helpers
     568     *
    525569     ********************************************************************/
    526570
    527571    #ifdef INCL_WINHELP
    528         HWND winhCreateHelp(HWND hwndFrame,
    529                             PSZ pszFileName,
    530                             HMODULE hmod,
    531                             PHELPTABLE pHelpTable,
    532                             PSZ pszWindowTitle);
    533 
    534         void winhDestroyHelp(HWND hwndHelp,
    535                              HWND hwndFrame);
     572        HWND XWPENTRY winhCreateHelp(HWND hwndFrame,
     573                                     PSZ pszFileName,
     574                                     HMODULE hmod,
     575                                     PHELPTABLE pHelpTable,
     576                                     PSZ pszWindowTitle);
     577
     578        void XWPENTRY winhDestroyHelp(HWND hwndHelp, HWND hwndFrame);
    536579    #endif
    537580
     
    543586
    544587    #ifdef INCL_WINPROGRAMLIST
    545         HAPP winhStartApp(HWND hwndNotify,
    546                           const PROGDETAILS *pcProgDetails);
     588        HAPP XWPENTRY winhStartApp(HWND hwndNotify, const PROGDETAILS *pcProgDetails);
    547589    #endif
    548590
    549     BOOL winhAnotherInstance(PSZ pszSemName,
    550                              BOOL fSwitch);
    551 
    552     HSWITCH winhAddToTasklist(HWND hwnd,
    553                               HPOINTER hIcon);
    554 
    555     /* ******************************************************************
    556      *                                                                  *
    557      *   Miscellaneous                                                  *
    558      *                                                                  *
    559      ********************************************************************/
    560 
    561     VOID winhSleep(HAB hab,
    562                    ULONG ulSleep);
     591    BOOL XWPENTRY winhAnotherInstance(PSZ pszSemName, BOOL fSwitch);
     592
     593    HSWITCH XWPENTRY winhAddToTasklist(HWND hwnd, HPOINTER hIcon);
     594
     595    /* ******************************************************************
     596     *
     597     *   Miscellaneous
     598     *
     599     ********************************************************************/
     600
     601    VOID XWPENTRY winhFree(PVOID p);
     602    typedef VOID XWPENTRY WINHFREE(PVOID p);
     603    typedef WINHFREE *PWINHFREE;
     604
     605    VOID XWPENTRY winhSleep(HAB hab, ULONG ulSleep);
    563606
    564607    #define WINH_FOD_SAVEDLG        0x0001
     
    566609    #define WINH_FOD_INISAVEDIR     0x0020
    567610
    568     BOOL winhFileDlg(HWND hwndOwner,
    569                      PSZ pszFile,
    570                      ULONG flFlags,
    571                      HINI hini,
    572                      PSZ pszApplication,
    573                      PSZ pszKey);
    574 
    575     HPOINTER winhSetWaitPointer(VOID);
    576 
    577     PSZ winhQueryWindowText(HWND hwnd);
     611    BOOL XWPENTRY winhFileDlg(HWND hwndOwner,
     612                              PSZ pszFile,
     613                              ULONG flFlags,
     614                              HINI hini,
     615                              PSZ pszApplication,
     616                              PSZ pszKey);
     617
     618    HPOINTER XWPENTRY winhSetWaitPointer(VOID);
     619
     620    PSZ XWPENTRY winhQueryWindowText(HWND hwnd);
    578621
    579622    /*
     
    585628    #define winhQueryDlgItemText(hwnd, usItemID) winhQueryWindowText(WinWindowFromID(hwnd, usItemID))
    586629
    587     BOOL winhReplaceWindowText(HWND hwnd,
    588                                PSZ pszSearch,
    589                                PSZ pszReplaceWith);
    590 
    591     ULONG winhCenteredDlgBox(HWND hwndParent, HWND hwndOwner,
     630    BOOL XWPENTRY winhReplaceWindowText(HWND hwnd,
     631                                        PSZ pszSearch,
     632                                        PSZ pszReplaceWith);
     633
     634    ULONG XWPENTRY winhCenteredDlgBox(HWND hwndParent, HWND hwndOwner,
    592635                  PFNWP pfnDlgProc, HMODULE hmod, ULONG idDlg, PVOID pCreateParams);
    593 
    594     ULONG winhEnableControls(HWND hwndDlg,
    595                              USHORT usIDFirst,
    596                              USHORT usIDLast,
    597                              BOOL fEnable);
    598 
    599     HWND winhCreateStdWindow(HWND hwndFrameParent,
    600                              PSWP pswpFrame,
    601                              ULONG flFrameCreateFlags,
    602                              ULONG ulFrameStyle,
    603                              PSZ pszFrameTitle,
    604                              ULONG ulResourcesID,
    605                              PSZ pszClassClient,
    606                              ULONG flStyleClient,
    607                              ULONG ulID,
    608                              PVOID pClientCtlData,
    609                              PHWND phwndClient);
     636    typedef ULONG XWPENTRY WINHCENTEREDDLGBOX(HWND hwndParent, HWND hwndOwner,
     637                  PFNWP pfnDlgProc, HMODULE hmod, ULONG idDlg, PVOID pCreateParams);
     638    typedef WINHCENTEREDDLGBOX *PWINHCENTEREDDLGBOX;
     639
     640    ULONG XWPENTRY winhEnableControls(HWND hwndDlg,
     641                                      USHORT usIDFirst,
     642                                      USHORT usIDLast,
     643                                      BOOL fEnable);
     644
     645    HWND XWPENTRY winhCreateStdWindow(HWND hwndFrameParent,
     646                                      PSWP pswpFrame,
     647                                      ULONG flFrameCreateFlags,
     648                                      ULONG ulFrameStyle,
     649                                      PSZ pszFrameTitle,
     650                                      ULONG ulResourcesID,
     651                                      PSZ pszClassClient,
     652                                      ULONG flStyleClient,
     653                                      ULONG ulID,
     654                                      PVOID pClientCtlData,
     655                                      PHWND phwndClient);
    610656
    611657    /*
     
    626672                    (PSZ)"", 0, 0,0,0,0, 0, HWND_BOTTOM, 0, pvCreateParam, NULL)
    627673
    628     VOID winhRepaintWindows(HWND hwndParent);
    629 
    630     HMQ winhFindMsgQueue(PID pid,
    631                          TID tid,
    632                          HAB* phab);
    633 
    634     VOID winhFindPMErrorWindows(HWND *phwndHardError,
    635                                 HWND *phwndSysError);
    636 
    637     HWND winhCreateFakeDesktop(HWND hwndSibling);
    638 
    639     BOOL winhAssertWarp4Notebook(HWND hwndDlg,
     674    VOID XWPENTRY winhRepaintWindows(HWND hwndParent);
     675
     676    HMQ XWPENTRY winhFindMsgQueue(PID pid, TID tid, HAB* phab);
     677
     678    VOID XWPENTRY winhFindPMErrorWindows(HWND *phwndHardError, HWND *phwndSysError);
     679
     680    HWND XWPENTRY winhCreateFakeDesktop(HWND hwndSibling);
     681
     682    BOOL XWPENTRY winhAssertWarp4Notebook(HWND hwndDlg,
    640683                                 USHORT usIdThreshold,
    641684                                 ULONG ulDownUnits);
    642685
    643     ULONG winhDrawFormattedText(HPS hps, PRECTL prcl, PSZ pszText, ULONG flCmd);
    644 
    645     VOID winhKillTasklist(VOID);
    646 
    647     ULONG winhQueryPendingSpoolJobs(VOID);
    648 
    649     VOID winhSetNumLock(BOOL fState);
     686    ULONG XWPENTRY winhDrawFormattedText(HPS hps, PRECTL prcl, PSZ pszText, ULONG flCmd);
     687
     688    #ifdef INCL_WINSWITCHLIST
     689        PSWBLOCK XWPENTRY winhQuerySwitchList(HAB hab);
     690        typedef PSWBLOCK XWPENTRY WINHQUERYSWITCHLIST(HAB hab);
     691        typedef WINHQUERYSWITCHLIST *PWINHQUERYSWITCHLIST;
     692    #endif
     693
     694    HWND XWPENTRY winhQueryTasklistWindow(VOID);
     695    typedef HWND XWPENTRY WINHQUERYTASKLISTWINDOW(VOID);
     696    typedef WINHQUERYTASKLISTWINDOW *PWINHQUERYTASKLISTWINDOW;
     697
     698    VOID XWPENTRY winhKillTasklist(VOID);
     699
     700    ULONG XWPENTRY winhQueryPendingSpoolJobs(VOID);
     701
     702    VOID XWPENTRY winhSetNumLock(BOOL fState);
    650703
    651704    /*
     
    664717
    665718    /* ******************************************************************
    666      *                                                                  *
    667      *   WPS Class List helpers                                         *
    668      *                                                                  *
    669      ********************************************************************/
    670 
    671     PBYTE winhQueryWPSClassList(VOID);
    672 
    673     PBYTE winhQueryWPSClass(PBYTE pObjClass,
    674                             const char *pszClass);
    675 
    676     APIRET winhRegisterClass(const char* pcszClassName,
    677                              const char* pcszModule,
    678                              PSZ pszBuf,
    679                              ULONG cbBuf);
    680 
    681     BOOL winhIsClassRegistered(const char *pcszClass);
    682 
    683     ULONG winhResetWPS(HAB hab);
     719     *
     720     *   WPS Class List helpers
     721     *
     722     ********************************************************************/
     723
     724    PBYTE XWPENTRY winhQueryWPSClassList(VOID);
     725
     726    PBYTE XWPENTRY winhQueryWPSClass(PBYTE pObjClass, const char *pszClass);
     727
     728    APIRET XWPENTRY winhRegisterClass(const char* pcszClassName,
     729                                      const char* pcszModule,
     730                                      PSZ pszBuf,
     731                                      ULONG cbBuf);
     732
     733    BOOL XWPENTRY winhIsClassRegistered(const char *pcszClass);
     734
     735    ULONG XWPENTRY winhResetWPS(HAB hab);
    684736#endif
    685737
  • trunk/include/helpers/wphandle.h

    r7 r14  
    2121/*      This file Copyright (C) 1997-2000 Ulrich M”ller,
    2222 *                                        Henk Kelder.
    23  *      This file is part of the XWorkplace source package.
    24  *      XWorkplace is free software; you can redistribute it and/or modify
     23 *      This file is part of the "XWorkplace helpers" source package.
     24 *      This is free software; you can redistribute it and/or modify
    2525 *      it under the terms of the GNU General Public License as published by
    2626 *      the Free Software Foundation, in version 2 as it comes in the COPYING
  • trunk/include/helpers/xprf.h

    r7 r14  
    1515
    1616/*      Copyright (C) 2000 Ulrich M”ller.
    17  *      This file is part of the XWorkplace source package.
    18  *      XWorkplace is free software; you can redistribute it and/or modify
     17 *      This file is part of the "XWorkplace helpers" source package.
     18 *      This is free software; you can redistribute it and/or modify
    1919 *      it under the terms of the GNU General Public License as published
    2020 *      by the Free Software Foundation, in version 2 as it comes in the
     
    3434
    3535    /* ******************************************************************
    36      *                                                                  *
    37      *   OS/2 INI file layout                                           *
    38      *                                                                  *
     36     *
     37     *   OS/2 INI file layout
     38     *
    3939     ********************************************************************/
    4040
     
    130130
    131131    /* ******************************************************************
    132      *                                                                  *
    133      *   API Functions                                                  *
    134      *                                                                  *
     132     *
     133     *   API Functions
     134     *
    135135     ********************************************************************/
    136136
     
    183183
    184184    /* ******************************************************************
    185      *                                                                  *
    186      *   Copy API Functions                                             *
    187      *                                                                  *
     185     *
     186     *   Copy API Functions
     187     *
    188188     ********************************************************************/
    189189
  • trunk/include/helpers/xstring.h

    r13 r14  
    1414/*
    1515 *      Copyright (C) 1999-2000 Ulrich M”ller.
    16  *      This file is part of the XWorkplace source package.
    17  *      XWorkplace is free software; you can redistribute it and/or modify
     16 *      This file is part of the "XWorkplace helpers" source package.
     17 *      This is free software; you can redistribute it and/or modify
    1818 *      it under the terms of the GNU General Public License as published
    1919 *      by the Free Software Foundation, in version 2 as it comes in the
     
    3232    #define XSTRING_HEADER_INCLUDED
    3333
     34    #ifndef XWPENTRY
     35        #error You must define XWPENTRY to contain the standard linkage for the XWPHelpers.
     36    #endif
     37
    3438    /*
    3539     *@@ XSTRING:
     
    4650    } XSTRING, *PXSTRING;
    4751
    48     void xstrInit(PXSTRING pxstr,
    49                   ULONG ulPreAllocate);
     52    void XWPENTRY xstrInit(PXSTRING pxstr, ULONG ulPreAllocate);
     53    typedef void XWPENTRY XSTRINIT(PXSTRING pxstr, ULONG ulPreAllocate);
     54    typedef XSTRINIT *PXSTRINIT;
    5055
    51     void xstrInitSet(PXSTRING pxstr,
    52                      PSZ pszNew);
     56    void XWPENTRY xstrInitSet(PXSTRING pxstr, PSZ pszNew);
    5357
    54     void xstrInitCopy(PXSTRING pxstr,
    55                       const char *pcszSource);
     58    void XWPENTRY xstrInitCopy(PXSTRING pxstr, const char *pcszSource);
    5659
    57     void xstrClear(PXSTRING pxstr);
     60    void XWPENTRY xstrClear(PXSTRING pxstr);
     61    typedef void XWPENTRY XSTRCLEAR(PXSTRING pxstr);
     62    typedef XSTRCLEAR *PXSTRCLEAR;
    5863
    59     PXSTRING xstrCreate(ULONG ulPreAllocate);
     64    PXSTRING XWPENTRY xstrCreate(ULONG ulPreAllocate);
    6065
    61     VOID xstrFree(PXSTRING pxstr);
     66    VOID XWPENTRY xstrFree(PXSTRING pxstr);
    6267
    63     ULONG xstrset(PXSTRING pxstr,
    64                   PSZ pszNew);
     68    ULONG XWPENTRY xstrset(PXSTRING pxstr, PSZ pszNew);
    6569
    66     ULONG xstrcpy(PXSTRING pxstr,
    67                   const char *pcszSource);
     70    ULONG XWPENTRY xstrcpy(PXSTRING pxstr, const char *pcszSource);
    6871
    69     ULONG xstrcat(PXSTRING pxstr,
    70                   const char *pcszSource);
     72    ULONG XWPENTRY xstrcat(PXSTRING pxstr, const char *pcszSource);
     73    typedef ULONG XWPENTRY XSTRCAT(PXSTRING pxstr, const char *pcszSource);
     74    typedef XSTRCAT *PXSTRCAT;
    7175
    7276    /*
     
    7983    #define xstrIsString(psz) ( (psz != 0) && (*(psz) != 0) )
    8084
    81     PSZ xstrFindWord(const XSTRING *pxstr,
    82                      ULONG ulOfs,
    83                      const XSTRING *pstrFind,
    84                      size_t *pShiftTable,
    85                      PBOOL pfRepeatFind,
    86                      const char *pcszBeginChars,
    87                      const char *pcszEndChars);
     85    PSZ XWPENTRY xstrFindWord(const XSTRING *pxstr,
     86                              ULONG ulOfs,
     87                              const XSTRING *pstrFind,
     88                              size_t *pShiftTable,
     89                              PBOOL pfRepeatFind,
     90                              const char *pcszBeginChars,
     91                              const char *pcszEndChars);
    8892
    89     ULONG xstrrpl(PXSTRING pxstr,
    90                   PULONG pulOfs,
    91                   const XSTRING *pstrSearch,
    92                   const XSTRING *pstrReplace,
    93                   size_t *pShiftTable,
    94                   PBOOL pfRepeatFind);
     93    ULONG XWPENTRY xstrrpl(PXSTRING pxstr,
     94                           PULONG pulOfs,
     95                           const XSTRING *pstrSearch,
     96                           const XSTRING *pstrReplace,
     97                           size_t *pShiftTable,
     98                           PBOOL pfRepeatFind);
    9599
    96     ULONG xstrcrpl(PXSTRING pxstr,
    97                    PULONG pulOfs,
    98                    const char *pcszSearch,
    99                    const char *pcszReplace);
     100    ULONG XWPENTRY xstrcrpl(PXSTRING pxstr,
     101                            PULONG pulOfs,
     102                            const char *pcszSearch,
     103                            const char *pcszReplace);
    100104#endif
    101105
Note: See TracChangeset for help on using the changeset viewer.