Changeset 243 for trunk/include


Ignore:
Timestamp:
Jan 29, 2003, 7:41:39 PM (23 years ago)
Author:
umoeller
Message:

New build system, multimedia, other misc fixes.

Location:
trunk/include
Files:
1 added
5 edited

Legend:

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

    r242 r243  
    5252
    5353    /*
    54      *@@ SYSCOLORSET:
     54     *@@ CCTLCOLOR:
    5555     *
    5656     *@@added V1.0.1 (2002-11-30) [umoeller]
    5757     */
    5858
    59     typedef struct _SYSCOLORSET
     59    typedef struct _CCTLCOLOR
    6060    {
    6161        BOOL    fInheritPP;
    62 
    63         LONG    lBackIndex,
    64                 lForeIndex;
    65     } SYSCOLORSET, *PSYSCOLORSET;
     62        ULONG   ulPP,
     63                ulSysColor;
     64    } CCTLCOLOR, *PCCTLCOLOR;
     65
     66    #define CTLCOL_BGND         0
     67    #define CTLCOL_FGND         1
     68
     69    #define CCS_NOSENDCTLPTR            0x0001
    6670
    6771    /*
     
    7781
    7882        PFNWP       pDefWindowProc;
    79         const SYSCOLORSET *pSysColorSet;
    80 
    81         LONG        lcolBackground,
    82                     lcolForeground;
     83
     84        ULONG       flCtl;              // CTL_* flags
    8385
    8486        SIZEL       szlWin;             // current window dimensions
    8587
    8688        PSZ         pszText;            // window text or NULL
     89
     90        const CCTLCOLOR *paCtlColors;
     91        ULONG       cCtlColors;
     92
     93        PLONG       palColorValues;
    8794
    8895    } DEFWINDATA, *PDEFWINDATA;
     
    9299                    PDEFWINDATA pdwd,
    93100                    PFNWP pDefWindowProc,
    94                     const SYSCOLORSET *pSysColorSet);
     101                    ULONG flCtl,
     102                    const CCTLCOLOR *paCtlColors,
     103                    ULONG cCtlColors);
    95104
    96105    VOID ctlRefreshColors(PDEFWINDATA pdwd);
     106
     107    LONG ctlQueryColor(PDEFWINDATA pdwd, ULONG ulIndex);
    97108
    98109    MRESULT ctlDefWindowProc(PDEFWINDATA pdwd, ULONG msg, MPARAM mp1, MPARAM mp2);
     
    10051016        HPOINTER    hptr;               // icon to paint or NULLHANDLE
    10061017
    1007         // BOOL        fPaintButtonSunk;
    1008 
    10091018    } XBUTTONDATA, *PXBUTTONDATA;
    10101019
     
    14101419    #define WC_CCTL_CNR             "ComctlCnr"
    14111420
     1421    typedef struct _CNRVIEWPORT
     1422    {
     1423        HWND        hwndCnr;
     1424        SIZEL       szlWorkarea,
     1425                    szlWin;
     1426        POINTL      ptlScroll;
     1427    } CNRVIEWPORT, *PCNRVIEWPORT;
     1428
     1429    #define CN_VIEWPORTCHANGED              159
     1430
    14121431    MRESULT EXPENTRY fnwpCnr(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
    14131432
  • trunk/include/helpers/dosh.h

    r234 r243  
    621621
    622622    #define XOPEN_BINARY              0x10000000
     623    #define XOPEN_WRITETHRU           0x20000000
    623624
    624625    APIRET doshOpen(PCSZ pcszFilename,
     
    658659                            PSZ* ppszContent,
    659660                            PULONG pcbRead);
     661
     662    BOOL doshCreateLogFilename(PSZ pszBuf,
     663                               PCSZ pcszFilename,
     664                               BOOL fAllowBootDrive);
    660665
    661666    PSZ doshCreateBackupFileName(const char* pszExisting);
  • trunk/include/helpers/sem.h

    r196 r243  
    6363    APIRET semRelease(PFASTMTX pmtx);
    6464
    65     LONG APIENTRY DosInterlockedCompareExchange(PLONG dest, LONG xchg, LONG compare);
    66     LONG APIENTRY DosInterlockedDecrement(PLONG);
    67     LONG APIENTRY DosInterlockedExchange(PLONG, LONG);
    68     LONG APIENTRY DosInterlockedExchangeAdd(PLONG dest, LONG incr);
    69     LONG APIENTRY DosInterlockedIncrement(PLONG);
     65    LONG APIENTRY lockCompareExchange(PLONG dest, LONG xchg, LONG compare);
     66    LONG APIENTRY lockDecrement(PLONG);
     67    LONG APIENTRY lockExchange(PLONG, LONG);
     68    LONG APIENTRY lockExchangeAdd(PLONG dest, LONG incr);
     69    LONG APIENTRY lockIncrement(PLONG);
    7070
    7171#endif
  • trunk/include/helpers/winh.h

    r242 r243  
    673673     ********************************************************************/
    674674
    675     #define ID_VSCROLL      100
    676     #define ID_HSCROLL      101
    677 
    678     BOOL XWPENTRY winhCreateScrollBars(HWND hwndParent,
    679                                        HWND *phwndV,
    680                                        HWND *phwndH);
    681 
    682675    BOOL XWPENTRY winhUpdateScrollBar(HWND hwndScrollBar,
    683676                                      ULONG ulWinPels,
     
    686679                                      BOOL fAutoHide);
    687680
    688     BOOL XWPENTRY winhHandleScrollMsg(HWND hwnd2Scroll,
    689                                       HWND hwndScrollBar,
    690                                       PULONG pulCurPelsOfs,
    691                                       PRECTL prcl2Scroll,
    692                                       LONG ulViewportPels,
    693                                       USHORT usLineStepUnits,
     681    LONG XWPENTRY winhHandleScrollMsg(HWND hwndScrollBar,
     682                                      PLONG plCurPelsOfs,
     683                                      LONG lWindowPels,
     684                                      LONG lWorkareaPels,
     685                                      USHORT usLineStepPels,
    694686                                      ULONG msg,
    695687                                      MPARAM mp2);
    696688
    697     LONG XWPENTRY winhHandleScrollMsg2(HWND hwndScrollBar,
    698                                        PLONG plCurPelsOfs,
    699                                        LONG lWindowPels,
    700                                        LONG lWorkareaPels,
    701                                        USHORT usLineStepPels,
    702                                        ULONG msg,
    703                                        MPARAM mp2);
    704689    BOOL XWPENTRY winhScrollWindow(HWND hwnd2Scroll,
    705690                                   PRECTL prclClip,
     
    714699                                         ULONG ulHorzMax);
    715700
     701    /*
     702     *@@ SCROLLABLEWINDOW:
     703     *      scroll data struct for use with winhHandleScrollerMsgs.
     704     *
     705     *@@added V1.0.1 (2003-01-25) [umoeller]
     706     */
     707
     708    typedef struct _SCROLLABLEWINDOW
     709    {
     710        LONG    cxScrollBar,
     711                cyScrollBar;
     712        HWND    hwndVScroll,        // vertical scroll bar
     713                hwndHScroll;        // horizontal scroll bar
     714        ULONG   idVScroll,
     715                idHScroll;
     716        SIZEL   szlWorkarea;        // workarea dimensions (over which window scrolls)
     717        POINTL  ptlScrollOfs;       // current scroll offset; positive x means right,
     718                                    // positive y means down
     719    } SCROLLABLEWINDOW, *PSCROLLABLEWINDOW;
     720
     721    #define ID_VSCROLL      100
     722    #define ID_HSCROLL      101
     723
     724    BOOL XWPENTRY winhCreateScroller(HWND hwndParent,
     725                                     PSCROLLABLEWINDOW pscrw,
     726                                     ULONG idVScroll,
     727                                     ULONG idHScroll);
     728
     729    MRESULT XWPENTRY winhHandleScrollerMsgs(HWND hwnd2Scroll,
     730                                            PSCROLLABLEWINDOW pscrw,
     731                                            PSIZEL pszlWin,
     732                                            ULONG msg,
     733                                            MPARAM mp1,
     734                                            MPARAM mp2);
     735
    716736    /* ******************************************************************
    717737     *
     
    841861
    842862    HSWITCH XWPENTRY winhAddToTasklist(HWND hwnd, HPOINTER hIcon);
     863
     864    BOOL XWPENTRY winhUpdateTasklist(HWND hwnd, PCSZ pcszNewTitle);
    843865
    844866    /* ******************************************************************
  • trunk/include/private/cnr.h

    r242 r243  
    3535    #define WC_CCTL_CNR_DETAILS     "ComctlCnrDtls"
    3636
    37     extern const SYSCOLORSET G_scsCnr;
     37    extern const CCTLCOLOR G_scsCnr[];
     38
     39    #define CNRCOL_HILITEBGND   2
     40    #define CNRCOL_HILITEFGND   3
     41    #define CNRCOL_BORDER       4
     42    #define CNRCOL_EDITBGND     5
     43    #define CNRCOL_EDITFGND     6
     44    #define CNRCOL_SIZINGBOX    7
    3845
    3946    #define COLUMN_PADDING_X        7
     
    5360        const FIELDINFO *pfi;           // ptr to fieldinfo for this column
    5461
    55         LONG        cxTotal;            // current width of the column (excluding padding);
     62        LONG        cxContent;          // current width of the column (excluding padding);
    5663                                        // -- if pfi->cxWidth == 0, this is the computed auto-size;
    5764                                        // -- otherwise this is a copy of the pfi->cxWidth value
     
    6168        SIZEL       szlTitleData;       // dimensions of title data (excluding padding)
    6269
    63         LONG        xLeft;              // position of column in cnr workspace coordinates
     70        LONG        xLeft;              // left border of column in cnr workspace coordinates;
     71                                        // this includes spacing, i.e. is 0 for the leftmost column
    6472
    6573    } DETAILCOLUMN, *PDETAILCOLUMN;
     
    7987                    *precc,             // ptr to app's RECORDCORE buffer
    8088                    *preccParent;       // parent of record or NULL if root
     89
     90        ULONG       flRecordAttr;       // private copy of record's attributes
     91
     92        ULONG       flInvalidate;       // CMA_TEXTCHANGED et al flags from
     93                                        // CM_INVALIDATERECORD or 0 if record is fresh
     94
     95        POINTL      ptl;                // position of record as calculated by us (in
     96                                        // workspace coordinates)
    8197
    8298        SIZEL       szlContent;         // space that records needs in current cnr view
     
    84100        SIZEL       szlBox;             // space that records needs in current cnr view
    85101                                        // (including padding)
    86         LONG        yOfs;               // y offset of the top of this record's rectangle
     102        // LONG        yOfs;               // y offset of the top of this record's rectangle
    87103                                        // from the top of the cnr workspace. Positive
    88104                                        // values mean the record is further down.
     
    109125    /*
    110126     *@@ CNRDATA:
    111      *
     127     *      private container data, allocated on WM_CREATE and
     128     *      stored at QWL_USER + 1 in the container main and
     129     *      subwindows.
    112130     */
    113131
     
    117135                    dwdContent;
    118136
    119         BOOL        fMiniRecords;
    120 
    121         CNRINFO     CnrInfo;
     137        BOOL        fMiniRecords;       // set to TRUE on WM_CREATE if we have the
     138                                        // CCS_MINIRECORDCORE style bit set
     139
     140        CNRINFO     CnrInfo;            // private container info struct
    122141
    123142        LINKLIST    llAllocatedFIs;     // contains PFIELDINFO's that were allocated, auto-free
     
    133152
    134153        // paint data
    135         FONTMETRICS fm;
    136         COUNTRYSETTINGS2 cs;
    137 
    138         HWND        hwndDetails;        // child of main cnr window
    139 
    140         HWND        hwndVScroll,        // child of hwndDetails
    141                     hwndHScroll;
    142 
    143         LONG        cxScrollBar,
    144                     cyScrollBar;
     154
     155        COUNTRYSETTINGS2 cs;            // current NLS settings for painting CMA_DATE etc.
     156
     157        FONTMETRICS fm;                 // font metrics of current font
    145158
    146159        LONG        cyColTitlesContent, // if CnrInfo.flWindowAttr & CA_DETAILSVIEWTITLES, height of
     
    148161                    cyColTitlesBox;     // ... and including those
    149162
    150         SIZEL       szlWorkarea;        // dimensions of cnr workarea (area that window scrolls over)
    151 
    152         POINTL      ptlScrollOfs;       // scroll ofs: x = 0 means topmost, y = 0 means leftmost
     163        BOOL        fSettingPP;         // anti-recursion flag
     164
     165        // scrolling data
     166
     167        SCROLLABLEWINDOW scrw;
     168
     169        // selection data
     170
     171        PRECORDLISTITEM
     172                    prliCursored;       // currently cursored record (there can only be one ever)
     173
     174        PRECORDLISTITEM
     175                    prliSwipingFirst;   // set to record on which swipe select started; NULL if
     176                                        // we're not currently swipe-selecting
     177        BOOL        fSwipeTurnOn;       // if TRUE, we select records while swiping; if FALSE,
     178                                        // we deselect
    153179
    154180    } CNRDATA, *PCNRDATA;
    155181
    156182    // bits for WM_SEM2
    157     #define DDFL_INVALIDATECOLUMNS     0x0001
    158                 // no. of columns changed
    159 
    160     #define DDFL_INCALIDATERECORDS      0x0002
    161 
    162     #define DDFL_WINDOWSIZECHANGED      0x0004
    163 
    164     #define DDFL_WORKAREACHANGED        0x0008
     183    #define DDFL_INVALIDATECOLUMNS      0x0001
     184                // no. of columns changed, recompute column data
     185
     186    #define DDFL_INVALIDATERECORDS      0x0002
     187                // record data changed, recompute all records and adjust columns
     188
     189    #define DDFL_INVALIDATESOME         0x0004
     190                // some records changed, recompute only those that have szlContent.x == -1
     191
     192    #define DDFL_WINDOWSIZECHANGED      0x0008
     193                // subwindows need repositioning
     194
     195    #define DDFL_WORKAREACHANGED        0x0010
     196                // cnr workarea changed, adjust scrollbars
    165197
    166198    #define DDFL_ALL                    0xFFFF
     
    172204     ********************************************************************/
    173205
    174     VOID cnrDrawString(HPS hps,
     206    VOID ctnrInit(HWND hwnd,
     207                  MPARAM mp2,
     208                  ULONG flMainCnrStyle,
     209                  PDEFWINDATA pdwd);
     210
     211    VOID ctnrDrawString(HPS hps,
    175212                       PCSZ pcsz,
    176213                       PRECTL prcl,
     
    178215                       PFONTMETRICS pfm);
    179216
    180     VOID cnrPresParamChanged(HWND hwnd,
     217    VOID ctnrGetRecordRect(PCNRDATA pData,
     218                          PRECTL prcl,
     219                          const RECORDLISTITEM *prli);
     220
     221    BOOL ctnrRepaintRecord(PCNRDATA pData,
     222                           const RECORDLISTITEM *prli);
     223
     224    ULONG ctnrQuerySelMode(PCNRDATA pData);
     225
     226    BOOL ctnrChangeEmphasis(PCNRDATA pData,
     227                            PRECORDLISTITEM prliSet,
     228                            BOOL fTurnOn,
     229                            ULONG fsEmphasis);
     230
     231    VOID ctnrPresParamChanged(HWND hwnd,
    181232                             ULONG ulpp);
     233
     234    BOOL ctnrSetRecordEmphasis(PCNRDATA pData,
     235                               PRECORDCORE precc,
     236                               BOOL fTurnOn,
     237                               USHORT fsEmphasis,
     238                               BOOL fMouse);
     239
     240    VOID ctnrRecordEnter(PCNRDATA pData,
     241                         const RECORDLISTITEM *prli,
     242                         BOOL fKeyboard);
     243
     244    PLISTNODE ctnrFindListNodeForRecc(PCNRDATA pData,
     245                                      const RECORDCORE *precc);
    182246
    183247    VOID cdtlRecalcDetails(PCNRDATA pData,
Note: See TracChangeset for help on using the changeset viewer.