Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

winprop.c File Reference

Go to the source code of this file.

Functions

__inline ATOM MapPropertyKey (PCWSTR pszKey)
PPROP _FindProp (PWND pwnd, PCWSTR pszKey, BOOL fInternal)
HANDLE _GetProp (PWND pwnd, PCWSTR pszKey, BOOL fInternal)


Function Documentation

PPROP _FindProp PWND  pwnd,
PCWSTR  pszKey,
BOOL  fInternal
 

Definition at line 46 of file rtl/winprop.c.

References tagPROPLIST::aprop, tagPROP::atomKey, tagPROP::fs, tagPROPLIST::iFirstFree, MapPropertyKey(), NULL, PROPF_INTERNAL, REBASE, and UINT.

Referenced by _GetProp(), InternalRemoveProp(), and InternalSetProp().

00050 { 00051 UINT i; 00052 PPROPLIST ppropList; 00053 PPROP pprop; 00054 ATOM atomKey; 00055 00056 /* 00057 * Make sure we have a property list. 00058 */ 00059 ppropList = REBASE(pwnd, ppropList); 00060 if (ppropList == NULL) 00061 return NULL; 00062 00063 /* 00064 * Call to the appropriate routine to verify the key name. 00065 */ 00066 atomKey = MapPropertyKey(pszKey); 00067 if (atomKey == 0) 00068 return NULL; 00069 00070 /* 00071 * Now we've got the atom, search the list for a property with the 00072 * same atom/name. Make sure to only return internal properties if 00073 * the fInternal flag is set. Do the same for external properties. 00074 */ 00075 pprop = ppropList->aprop; 00076 for (i = ppropList->iFirstFree; i > 0; i--) { 00077 if (pprop->atomKey == atomKey) { 00078 if (fInternal) { 00079 if (pprop->fs & PROPF_INTERNAL) 00080 return pprop; 00081 } else { 00082 if (!(pprop->fs & PROPF_INTERNAL)) 00083 return pprop; 00084 } 00085 } 00086 pprop++; 00087 } 00088 00089 /* 00090 * Property not found, too bad. 00091 */ 00092 return NULL; 00093 }

HANDLE _GetProp PWND  pwnd,
PCWSTR  pszKey,
BOOL  fInternal
 

Definition at line 106 of file rtl/winprop.c.

References _FindProp(), tagPROP::hData, NULL, and tagWND::ppropList.

Referenced by _DdeGetQualityOfService(), _GetDCEx(), _GetWindowContextHelpId(), _HasCaptionIcon(), _SetLayeredWindowAttributes(), _UpdateLayeredWindow(), AddConvProp(), CkptRestore(), DestroyWindowSmIcon(), DWP_GetIcon(), FindDdeConv(), GetContextHelpId(), GetProp(), InvalidateGDIWindows(), MESSAGECALL(), NtUserGetAppImeLevel(), ParkIcon(), RecreateRedirectionBitmap(), RemoveFlashWindowState(), RemoveRedirectionBitmap(), UnlinkConv(), UpdateLayeredSprite(), UserGetHwnd(), xxxArrangeIconicWindows(), xxxCalcValidRects(), xxxCleanupDdeConv(), xxxDesktopRecalc(), xxxDWP_SetIcon(), xxxFreeWindow(), xxxGetWindowSmIcon(), xxxHelpLoop(), xxxInitSendValidateMinMaxInfo(), xxxMetricsRecalc(), xxxPaintIconsInSwitchWindow(), xxxRecreateSmallIcons(), xxxSetClassIconEnum(), and zzzBltValidBits().

00110 { 00111 PPROP pprop; 00112 00113 /* 00114 * A quick little optimization for that case where the window has no 00115 * properties at all. 00116 */ 00117 if (pwnd->ppropList == NULL) 00118 return NULL; 00119 00120 /* 00121 * FindProp does all the work, including converting pszKey to an atom 00122 * (if necessary) for property lookup. 00123 */ 00124 pprop = _FindProp(pwnd, pszKey, fInternal); 00125 if (pprop == NULL) 00126 return NULL; 00127 00128 return pprop->hData; 00129 }

__inline ATOM MapPropertyKey PCWSTR  pszKey  ) 
 

Definition at line 13 of file rtl/winprop.c.

References IS_PTR, and PTR_TO_ID.

Referenced by _FindProp().

00015 { 00016 #ifdef _USERK_ 00017 /* 00018 * Internal properties must use atoms, not strings. 00019 */ 00020 UserAssert(!IS_PTR(pszKey)); 00021 #else 00022 /* 00023 * Is pszKey an atom? If not, find the atom that matches the string. 00024 * If one doesn't exist, bail out. 00025 */ 00026 if (IS_PTR(pszKey)) 00027 return GlobalFindAtomW(pszKey); 00028 #endif 00029 00030 return PTR_TO_ID(pszKey); 00031 }


Generated on Sat May 15 19:46:09 2004 for test by doxygen 1.3.7