Changeset 1673 for trunk/dll/presparm.c


Ignore:
Timestamp:
Dec 30, 2012, 7:51:01 PM (13 years ago)
Author:
Gregg Young
Message:

Update to Doxygen comment style Ticket 55. Also some minor code cleanup.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/presparm.c

    r1409 r1673  
    3737
    3838#ifdef NEVER
    39 /*
     39/**
    4040 * this routine will fill a buffer with all defined window pres params
    4141 * the PRESPARAMS structure returned is suitable to be passed as
     
    4949  if (!tagname || !*tagname || !prof)
    5050    return;
    51   /* setup memory access */
     51  // setup memory access
    5252  ppresparams = (PRESPARAMS *) xmalloc(PP_MAXBUF, pszSrcFile, __LINE__);
    5353  if (!ppresparams)
    5454    return;
    55   ppresparams->cb = 0;                  /* no entries yet */
    56   pparam = ppresparams->aparam;         /* cast structure onto memory */
    57 
    58   /*
    59    * query every possible presentation parameter...
    60    */
    61 
    62   /* foreground color -- takes 12 bytes */
     55  ppresparams->cb = 0;                  // no entries yet
     56  pparam = ppresparams->aparam;         // cast structure onto memory
     57
     58  // query every possible presentation parameter...
     59
     60  // foreground color -- takes 12 bytes
    6361  pparam->cb = WinQueryPresParam(hwnd,
    6462                                 PP_FOREGROUNDCOLOR,
     
    6765                                 sizeof(LONG),
    6866                                 (PVOID) pparam->ab, QPF_NOINHERIT);
    69   if (pparam->cb) {                     /* was the param found? */
    70     ppresparams->cb += 12;              /* used 12 bytes */
    71     pparam = (PPARAM) (((ULONG) pparam) + 12);  /* advance 12 bytes to next memory location */
    72   }
    73 
    74   /* background color -- takes 12 bytes */
     67  if (pparam->cb) {                             // was the param found?
     68    ppresparams->cb += 12;                      // used 12 bytes
     69    pparam = (PPARAM) (((ULONG) pparam) + 12);  // advance 12 bytes to next memory location
     70  }
     71
     72  // background color -- takes 12 bytes
    7573  pparam->cb = WinQueryPresParam(hwnd,
    7674                                 PP_BACKGROUNDCOLOR,
     
    8482  }
    8583
    86   /* hilited foreground color -- takes 12 bytes */
     84  // hilited foreground color -- takes 12 bytes
    8785  pparam->cb = WinQueryPresParam(hwnd,
    8886                                 PP_HILITEFOREGROUNDCOLOR,
     
    9694  }
    9795
    98   /* hilited background color -- takes 12 bytes */
     96  // hilited background color -- takes 12 bytes
    9997  pparam->cb = WinQueryPresParam(hwnd,
    10098                                 PP_HILITEBACKGROUNDCOLOR,
     
    108106  }
    109107
    110   /* disabled foreground color -- takes 12 bytes */
     108  // disabled foreground color -- takes 12 bytes
    111109  pparam->cb = WinQueryPresParam(hwnd,
    112110                                 PP_DISABLEDFOREGROUNDCOLOR,
     
    120118  }
    121119
    122   /* disabled background color -- takes 12 bytes */
     120  // disabled background color -- takes 12 bytes
    123121  pparam->cb = WinQueryPresParam(hwnd,
    124122                                 PP_DISABLEDBACKGROUNDCOLOR,
     
    132130  }
    133131
    134   /* border color -- takes 12 bytes */
     132  // border color -- takes 12 bytes
    135133  pparam->cb = WinQueryPresParam(hwnd,
    136134                                 PP_BORDERCOLOR,
     
    144142  }
    145143
    146   /* font name & size -- maximum 44 bytes (32 for face name, 4 for point size) + 8 for data */
     144  // font name & size -- maximum 44 bytes (32 for face name, 4 for point size) + 8 for data
    147145  pparam->cb = WinQueryPresParam(hwnd,
    148146                                 PP_FONTNAMESIZE,
     
    155153  }
    156154
    157   /* active color -- takes 12 bytes */
     155  // active color -- takes 12 bytes
    158156  pparam->cb = WinQueryPresParam(hwnd,
    159157                                 PP_ACTIVECOLOR,
     
    167165  }
    168166
    169   /* inactive color -- takes 12 bytes */
     167  // inactive color -- takes 12 bytes
    170168  pparam->cb = WinQueryPresParam(hwnd,
    171169                                 PP_INACTIVECOLOR,
     
    179177  }
    180178
    181   /* active text foreground color -- takes 12 bytes */
     179  // active text foreground color -- takes 12 bytes
    182180  pparam->cb = WinQueryPresParam(hwnd,
    183181                                 PP_ACTIVETEXTFGNDCOLOR,
     
    192190  }
    193191
    194   /* active text background color -- takes 12 bytes */
     192  // active text background color -- takes 12 bytes
    195193  pparam->cb = WinQueryPresParam(hwnd,
    196194                                 PP_ACTIVETEXTBGNDCOLOR,
     
    205203  }
    206204
    207   /* inactive text foreground color -- takes 12 bytes */
     205  // inactive text foreground color -- takes 12 bytes
    208206  pparam->cb = WinQueryPresParam(hwnd,
    209207                                 PP_INACTIVETEXTFGNDCOLOR,
     
    218216  }
    219217
    220   /* inactive text background color -- takes 12 bytes */
     218  // inactive text background color -- takes 12 bytes
    221219  pparam->cb = WinQueryPresParam(hwnd,
    222220                                 PP_INACTIVETEXTBGNDCOLOR,
     
    231229  }
    232230
    233   /* shadow color -- takes 12 bytes */
     231  // shadow color -- takes 12 bytes
    234232  pparam->cb = WinQueryPresParam(hwnd,
    235233                                 PP_SHADOW, 0,
     
    242240  }
    243241
    244   /* menu foreground color -- takes 12 bytes */
     242  // menu foreground color -- takes 12 bytes
    245243  pparam->cb = WinQueryPresParam(hwnd,
    246244                                 PP_MENUFOREGROUNDCOLOR,
     
    254252  }
    255253
    256   /* menu background color -- takes 12 bytes */
     254  // menu background color -- takes 12 bytes
    257255  pparam->cb = WinQueryPresParam(hwnd,
    258256                                 PP_MENUBACKGROUNDCOLOR,
     
    266264  }
    267265
    268   /* menu hilite foreground color -- takes 12 bytes */
     266  // menu hilite foreground color -- takes 12 bytes
    269267  pparam->cb = WinQueryPresParam(hwnd,
    270268                                 PP_MENUHILITEFGNDCOLOR,
     
    278276  }
    279277
    280   /* menu hilite background color -- takes 12 bytes */
     278  // menu hilite background color -- takes 12 bytes
    281279  pparam->cb = WinQueryPresParam(hwnd,
    282280                                 PP_MENUHILITEBGNDCOLOR,
     
    290288  }
    291289
    292   /* menu disabled foreground color -- takes 12 bytes */
     290  // menu disabled foreground color -- takes 12 bytes
    293291  pparam->cb = WinQueryPresParam(hwnd,
    294292                                 PP_MENUDISABLEDFGNDCOLOR,
     
    302300  }
    303301
    304   /* menu disabled background color -- takes 12 bytes */
     302  // menu disabled background color -- takes 12 bytes
    305303  pparam->cb = WinQueryPresParam(hwnd,
    306304                                 PP_MENUDISABLEDBGNDCOLOR,
     
    325323VOID CopyPresParams(HWND target, HWND source)
    326324{
    327   /*
     325  /**
    328326   * Copy presentation parameters of interest to us from one window
    329327   * to another
Note: See TracChangeset for help on using the changeset viewer.