user32: Replace inline static with static inline.

This commit is contained in:
Andrew Talbot 2007-03-17 10:34:08 +00:00 committed by Alexandre Julliard
parent 0108667754
commit 48d740855e
13 changed files with 37 additions and 37 deletions

View File

@ -171,33 +171,33 @@ const struct builtin_class_descr BUTTON_builtin_class =
};
inline static LONG get_button_state( HWND hwnd )
static inline LONG get_button_state( HWND hwnd )
{
return GetWindowLongW( hwnd, STATE_GWL_OFFSET );
}
inline static void set_button_state( HWND hwnd, LONG state )
static inline void set_button_state( HWND hwnd, LONG state )
{
SetWindowLongW( hwnd, STATE_GWL_OFFSET, state );
}
inline static HFONT get_button_font( HWND hwnd )
static inline HFONT get_button_font( HWND hwnd )
{
return (HFONT)GetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET );
}
inline static void set_button_font( HWND hwnd, HFONT font )
static inline void set_button_font( HWND hwnd, HFONT font )
{
SetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET, (LONG_PTR)font );
}
inline static UINT get_button_type( LONG window_style )
static inline UINT get_button_type( LONG window_style )
{
return (window_style & 0x0f);
}
/* paint a button of any type */
inline static void paint_button( HWND hwnd, LONG style, UINT action )
static inline void paint_button( HWND hwnd, LONG style, UINT action )
{
if (btnPaintFunc[style] && IsWindowVisible(hwnd))
{
@ -208,7 +208,7 @@ inline static void paint_button( HWND hwnd, LONG style, UINT action )
}
/* retrieve the button text; returned buffer must be freed by caller */
inline static WCHAR *get_button_text( HWND hwnd )
static inline WCHAR *get_button_text( HWND hwnd )
{
INT len = 512;
WCHAR *buffer = HeapAlloc( GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR) );

View File

@ -92,7 +92,7 @@ static CLASS *get_class_ptr( HWND hwnd, BOOL write_access )
/***********************************************************************
* release_class_ptr
*/
inline static void release_class_ptr( CLASS *ptr )
static inline void release_class_ptr( CLASS *ptr )
{
USER_Unlock();
}
@ -154,7 +154,7 @@ static BOOL set_server_info( HWND hwnd, INT offset, LONG_PTR newval, UINT size )
*
* Get the menu name as a ASCII string.
*/
inline static LPSTR CLASS_GetMenuNameA( CLASS *classPtr )
static inline LPSTR CLASS_GetMenuNameA( CLASS *classPtr )
{
if (!HIWORD(classPtr->menuName)) return (LPSTR)classPtr->menuName;
return (LPSTR)(classPtr->menuName + strlenW(classPtr->menuName) + 1);
@ -166,7 +166,7 @@ inline static LPSTR CLASS_GetMenuNameA( CLASS *classPtr )
*
* Get the menu name as a Unicode string.
*/
inline static LPWSTR CLASS_GetMenuNameW( CLASS *classPtr )
static inline LPWSTR CLASS_GetMenuNameW( CLASS *classPtr )
{
return classPtr->menuName;
}

View File

@ -116,7 +116,7 @@ static LPWINE_DRIVER DRIVER_FindFromHDrvr16(HDRVR16 hDrvr)
/**************************************************************************
* DRIVER_SendMessage [internal]
*/
inline static LRESULT DRIVER_SendMessage(LPWINE_DRIVER lpDrv, UINT16 msg,
static inline LRESULT DRIVER_SendMessage(LPWINE_DRIVER lpDrv, UINT16 msg,
LPARAM lParam1, LPARAM lParam2)
{
WORD args[8];

View File

@ -721,7 +721,7 @@ BOOL WINAPI UnhookWinEvent(HWINEVENTHOOK hEventHook)
return ret;
}
inline static BOOL find_first_hook(DWORD id, DWORD event, HWND hwnd, LONG object_id,
static inline BOOL find_first_hook(DWORD id, DWORD event, HWND hwnd, LONG object_id,
LONG child_id, struct hook_info *info)
{
struct user_thread_info *thread_info = get_user_thread_info();
@ -755,7 +755,7 @@ inline static BOOL find_first_hook(DWORD id, DWORD event, HWND hwnd, LONG object
return ret && (info->tid || info->proc);
}
inline static BOOL find_next_hook(DWORD event, HWND hwnd, LONG object_id,
static inline BOOL find_next_hook(DWORD event, HWND hwnd, LONG object_id,
LONG child_id, struct hook_info *info)
{
BOOL ret;
@ -782,7 +782,7 @@ inline static BOOL find_next_hook(DWORD event, HWND hwnd, LONG object_id,
return ret;
}
inline static void find_hook_close(DWORD id)
static inline void find_hook_close(DWORD id)
{
SERVER_START_REQ( finish_hook_chain )
{

View File

@ -77,7 +77,7 @@ struct hook16_queue_info
/***********************************************************************
* map_msg_16_to_32
*/
inline static void map_msg_16_to_32( const MSG16 *msg16, MSG *msg32 )
static inline void map_msg_16_to_32( const MSG16 *msg16, MSG *msg32 )
{
msg32->hwnd = WIN_Handle32(msg16->hwnd);
msg32->message = msg16->message;
@ -92,7 +92,7 @@ inline static void map_msg_16_to_32( const MSG16 *msg16, MSG *msg32 )
/***********************************************************************
* map_msg_32_to_16
*/
inline static void map_msg_32_to_16( const MSG *msg32, MSG16 *msg16 )
static inline void map_msg_32_to_16( const MSG *msg32, MSG16 *msg16 )
{
msg16->hwnd = HWND_16(msg32->hwnd);
msg16->message = msg32->message;

View File

@ -165,7 +165,7 @@ const struct builtin_class_descr COMBOLBOX_builtin_class =
/* check whether app is a Win 3.1 app */
inline static BOOL is_old_app( LB_DESCR *descr )
static inline BOOL is_old_app( LB_DESCR *descr )
{
return (GetExpWinVer16( GetWindowLongPtrW(descr->self, GWLP_HINSTANCE) ) & 0xFF00 ) == 0x0300;
}

View File

@ -4524,7 +4524,7 @@ BOOL WINAPI GetMenuItemInfoW( HMENU hmenu, UINT item, BOOL bypos,
/* set a menu item text from a ASCII or Unicode string */
inline static void set_menu_item_text( MENUITEM *menu, LPCWSTR text, BOOL unicode )
static inline void set_menu_item_text( MENUITEM *menu, LPCWSTR text, BOOL unicode )
{
if (!text)
menu->text = NULL;

View File

@ -212,14 +212,14 @@ static const unsigned int message_unicode_flags[] =
};
/* check whether a given message type includes pointers */
inline static int is_pointer_message( UINT message )
static inline int is_pointer_message( UINT message )
{
if (message >= 8*sizeof(message_pointer_flags)) return FALSE;
return (message_pointer_flags[message / 32] & SET(message)) != 0;
}
/* check whether a given message type contains Unicode (or ASCII) chars */
inline static int is_unicode_message( UINT message )
static inline int is_unicode_message( UINT message )
{
if (message >= 8*sizeof(message_unicode_flags)) return FALSE;
return (message_unicode_flags[message / 32] & SET(message)) != 0;
@ -228,7 +228,7 @@ inline static int is_unicode_message( UINT message )
#undef SET
/* add a data field to a packed message */
inline static void push_data( struct packed_message *data, const void *ptr, size_t size )
static inline void push_data( struct packed_message *data, const void *ptr, size_t size )
{
data->data[data->count] = ptr;
data->size[data->count] = size;
@ -236,13 +236,13 @@ inline static void push_data( struct packed_message *data, const void *ptr, size
}
/* add a string to a packed message */
inline static void push_string( struct packed_message *data, LPCWSTR str )
static inline void push_string( struct packed_message *data, LPCWSTR str )
{
push_data( data, str, (strlenW(str) + 1) * sizeof(WCHAR) );
}
/* retrieve a pointer to data from a packed message and increment the buffer pointer */
inline static void *get_data( void **buffer, size_t size )
static inline void *get_data( void **buffer, size_t size )
{
void *ret = *buffer;
*buffer = (char *)*buffer + size;
@ -250,7 +250,7 @@ inline static void *get_data( void **buffer, size_t size )
}
/* make sure that the buffer contains a valid null-terminated Unicode string */
inline static BOOL check_string( LPCWSTR str, size_t size )
static inline BOOL check_string( LPCWSTR str, size_t size )
{
for (size /= sizeof(WCHAR); size; size--, str++)
if (!*str) return TRUE;
@ -258,7 +258,7 @@ inline static BOOL check_string( LPCWSTR str, size_t size )
}
/* make sure that there is space for 'size' bytes in buffer, growing it if needed */
inline static void *get_buffer_space( void **buffer, size_t size )
static inline void *get_buffer_space( void **buffer, size_t size )
{
void *ret;
@ -274,34 +274,34 @@ inline static void *get_buffer_space( void **buffer, size_t size )
}
/* check whether a combobox expects strings or ids in CB_ADDSTRING/CB_INSERTSTRING */
inline static BOOL combobox_has_strings( HWND hwnd )
static inline BOOL combobox_has_strings( HWND hwnd )
{
DWORD style = GetWindowLongA( hwnd, GWL_STYLE );
return (!(style & (CBS_OWNERDRAWFIXED | CBS_OWNERDRAWVARIABLE)) || (style & CBS_HASSTRINGS));
}
/* check whether a listbox expects strings or ids in LB_ADDSTRING/LB_INSERTSTRING */
inline static BOOL listbox_has_strings( HWND hwnd )
static inline BOOL listbox_has_strings( HWND hwnd )
{
DWORD style = GetWindowLongA( hwnd, GWL_STYLE );
return (!(style & (LBS_OWNERDRAWFIXED | LBS_OWNERDRAWVARIABLE)) || (style & LBS_HASSTRINGS));
}
/* check whether message is in the range of keyboard messages */
inline static BOOL is_keyboard_message( UINT message )
static inline BOOL is_keyboard_message( UINT message )
{
return (message >= WM_KEYFIRST && message <= WM_KEYLAST);
}
/* check whether message is in the range of mouse messages */
inline static BOOL is_mouse_message( UINT message )
static inline BOOL is_mouse_message( UINT message )
{
return ((message >= WM_NCMOUSEFIRST && message <= WM_NCMOUSELAST) ||
(message >= WM_MOUSEFIRST && message <= WM_MOUSELAST));
}
/* check whether message matches the specified hwnd filter */
inline static BOOL check_hwnd_filter( const MSG *msg, HWND hwnd_filter )
static inline BOOL check_hwnd_filter( const MSG *msg, HWND hwnd_filter )
{
if (!hwnd_filter) return TRUE;
return (msg->hwnd == hwnd_filter || IsChild( hwnd_filter, msg->hwnd ));
@ -2114,7 +2114,7 @@ static BOOL peek_message( MSG *msg, HWND hwnd, UINT first, UINT last, UINT flags
*
* Process all pending sent messages.
*/
inline static void process_sent_messages(void)
static inline void process_sent_messages(void)
{
MSG msg;
peek_message( &msg, 0, 0, 0, PM_REMOVE | PM_QS_SENDMESSAGE );

View File

@ -131,7 +131,7 @@ const struct builtin_class_descr SCROLL_builtin_class =
* Determine if the supplied SCROLLINFO struct is valid.
* info [in] The SCROLLINFO struct to be tested
*/
inline static BOOL SCROLL_ScrollInfoValid( LPCSCROLLINFO info )
static inline BOOL SCROLL_ScrollInfoValid( LPCSCROLLINFO info )
{
return !(info->fMask & ~(SIF_ALL | SIF_DISABLENOSCROLL)
|| (info->cbSize != sizeof(*info)

View File

@ -1962,7 +1962,7 @@ static int indent_tls_index;
/***********************************************************************
* get_indent_level
*/
inline static INT_PTR get_indent_level(void)
static inline INT_PTR get_indent_level(void)
{
return (INT_PTR)TlsGetValue( indent_tls_index );
}
@ -1971,7 +1971,7 @@ inline static INT_PTR get_indent_level(void)
/***********************************************************************
* set_indent_level
*/
inline static void set_indent_level( INT_PTR level )
static inline void set_indent_level( INT_PTR level )
{
TlsSetValue( indent_tls_index, (void *)level );
}

View File

@ -703,7 +703,7 @@ static inline int get_display_dpi(void)
* Technical Reference to the Windows 2000 Registry ->
* HKEY_CURRENT_USER -> Control Panel -> Desktop -> WindowMetrics
*/
inline static int SYSPARAMS_Twips2Pixels(int x)
static inline int SYSPARAMS_Twips2Pixels(int x)
{
if (x < 0)
x = (-x * get_display_dpi() + 720) / 1440;

View File

@ -701,7 +701,7 @@ BOOL WINPROC_IsUnicode( WNDPROC proc, BOOL def_val )
*
* Return TRUE if the lparam is a string
*/
inline static BOOL WINPROC_TestLBForStr( HWND hwnd, UINT msg )
static inline BOOL WINPROC_TestLBForStr( HWND hwnd, UINT msg )
{
DWORD style = GetWindowLongA( hwnd, GWL_STYLE );
if (msg <= CB_MSGMAX)

View File

@ -51,7 +51,7 @@ static BOOL CALLBACK wnd_enum_callback( HWND hwnd, LPARAM param )
}
/* convert insert after window handle to 32-bit */
inline static HWND full_insert_after_hwnd( HWND16 hwnd )
static inline HWND full_insert_after_hwnd( HWND16 hwnd )
{
HWND ret = WIN_Handle32( hwnd );
if (ret == (HWND)0xffff) ret = HWND_TOPMOST;