diff options
| author | Jonas Kümmerlin <jonas@kuemmerlin.eu> | 2020-05-31 20:45:18 +0200 |
|---|---|---|
| committer | Jonas Kümmerlin <jonas@kuemmerlin.eu> | 2020-05-31 20:45:18 +0200 |
| commit | d75fd8d0ad863cf59c7d52d45ca596c1ff71a69f (patch) | |
| tree | a6847cd8f8c31a24cb60190411c1045322048ca8 /alf | |
| parent | 07d18635095fa13a7be974db2d9d990bd12d2cc1 (diff) | |
combo: switch to naming convention with underscores
Diffstat (limited to 'alf')
| -rw-r--r-- | alf/alf.h | 16 | ||||
| -rw-r--r-- | alf/alfcombobox.cpp | 32 |
2 files changed, 24 insertions, 24 deletions
@@ -475,28 +475,28 @@ HWND ALF_AddSelectionOnlyComboBox(HWND win, WORD id, int x, int y); int /* index */ -ALF_ComboBoxAddString(HWND combo, const TCHAR *text); +ALF_ComboBox_AddString(HWND combo, const TCHAR *text); void -ALF_ComboBoxInsertString(HWND combo, int index, const TCHAR *text); +ALF_ComboBox_InsertString(HWND combo, int index, const TCHAR *text); void -ALF_ComboBoxRemoveString(HWND combo, int index); +ALF_ComboBox_RemoveString(HWND combo, int index); TCHAR * // free with ALF_Free -ALF_ComboBoxStringForIndex(HWND combo, int index); +ALF_ComboBox_StringForIndex(HWND combo, int index); int -ALF_ComboBoxCurrentIndex(HWND combo); +ALF_ComboBox_CurrentIndex(HWND combo); void -ALF_ComboBoxSetCurrentIndex(HWND combo, int index); +ALF_ComboBox_SetCurrentIndex(HWND combo, int index); TCHAR * // free with ALF_Free -ALF_ComboBoxCurrentText(HWND combo); +ALF_ComboBox_CurrentText(HWND combo); void -ALF_ComboBoxSetText(HWND combo, const TCHAR *text); +ALF_ComboBox_SetText(HWND combo, const TCHAR *text); // panel HWND diff --git a/alf/alfcombobox.cpp b/alf/alfcombobox.cpp index 86ba4ea..1a7c1c2 100644 --- a/alf/alfcombobox.cpp +++ b/alf/alfcombobox.cpp @@ -48,7 +48,7 @@ ALF_Combo_FreePriv(ALFComboPriv *priv) } static int -ALF__ComboItemHeight(HWND hwnd) +ALF_Combo_ItemHeight(HWND hwnd) { int height = 0; HDC hDc = GetDC(hwnd); @@ -69,7 +69,7 @@ ALF__ComboItemHeight(HWND hwnd) } static LRESULT CALLBACK -ALF__ComboWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +ALF_Combo_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { ALFComboPriv *priv = (ALFComboPriv *)GetWindowLongPtr(hwnd, 0); @@ -102,7 +102,7 @@ ALF__ComboWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) } if (uMsg == WM_SETFONT && priv) { SendMessage(priv->hwndChild, WM_SETFONT, wParam, lParam); - SendMessage(priv->hwndChild, CB_SETITEMHEIGHT, (WPARAM)0, (LPARAM)ALF__ComboItemHeight(hwnd)); + SendMessage(priv->hwndChild, CB_SETITEMHEIGHT, (WPARAM)0, (LPARAM)ALF_Combo_ItemHeight(hwnd)); ALF_InvalidateLayout(GetParent(hwnd)); @@ -184,7 +184,7 @@ ALF__ComboWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) if (uMsg == WM_MEASUREITEM) { PMEASUREITEMSTRUCT lpmis = (LPMEASUREITEMSTRUCT) lParam; - lpmis->itemHeight = (UINT)ALF__ComboItemHeight(hwnd); + lpmis->itemHeight = (UINT)ALF_Combo_ItemHeight(hwnd); return TRUE; } @@ -259,7 +259,7 @@ ALF__ComboWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) } SendMessage(priv->hwndChild, CB_SETITEMHEIGHT, (WPARAM)-1, pos->cy + heightOffset); - SendMessage(priv->hwndChild, CB_SETITEMHEIGHT, (WPARAM)0, (LPARAM)ALF__ComboItemHeight(hwnd)); + SendMessage(priv->hwndChild, CB_SETITEMHEIGHT, (WPARAM)0, (LPARAM)ALF_Combo_ItemHeight(hwnd)); } } @@ -313,7 +313,7 @@ ALF_InternalAddComboBox(HWND win, WORD id, int x, int y, DWORD style, const TCHA 0, 0, 0, 0, win, (HMENU)(ULONG_PTR)id, - ALF__ComboWindowProc, + ALF_Combo_WindowProc, &cp); if (defaultText) @@ -337,19 +337,19 @@ ALF_AddSelectionOnlyComboBox(HWND win, WORD id, int x, int y) } int /* index */ -ALF_ComboBoxAddString(HWND combo, const TCHAR *text) +ALF_ComboBox_AddString(HWND combo, const TCHAR *text) { return (int)SendMessage(combo, ALF_CB_ADDSTRING, 0, (LPARAM)text); } TCHAR * -ALF_ComboBoxCurrentText(HWND combo) +ALF_ComboBox_CurrentText(HWND combo) { LRESULT style = SendMessage(combo, ALF_CB_GETSTYLE, 0, 0); if (style & CBS_DROPDOWNLIST) { - int i = ALF_ComboBoxCurrentIndex(combo); + int i = ALF_ComboBox_CurrentIndex(combo); if (i >= 0) { - return ALF_ComboBoxStringForIndex(combo, i); + return ALF_ComboBox_StringForIndex(combo, i); } } @@ -357,7 +357,7 @@ ALF_ComboBoxCurrentText(HWND combo) } void -ALF_ComboBoxSetText(HWND combo, const TCHAR *text) +ALF_ComboBox_SetText(HWND combo, const TCHAR *text) { LRESULT index = SendMessage(combo, ALF_CB_FINDSTRINGEXACT, (WPARAM)-1, (LPARAM)text); if (index >= 0) { @@ -368,19 +368,19 @@ ALF_ComboBoxSetText(HWND combo, const TCHAR *text) } int -ALF_ComboBoxCurrentIndex(HWND combo) +ALF_ComboBox_CurrentIndex(HWND combo) { return (int)SendMessage(combo, ALF_CB_GETCURSEL, 0, 0); } void -ALF_ComboBoxSetCurrentIndex(HWND combo, int index) +ALF_ComboBox_SetCurrentIndex(HWND combo, int index) { SendMessage(combo, ALF_CB_SETCURSEL, (WPARAM)index, 0); } TCHAR * // free with ALF_Free -ALF_ComboBoxStringForIndex(HWND combo, int index) +ALF_ComboBox_StringForIndex(HWND combo, int index) { int len = (int)SendMessage(combo, ALF_CB_GETLBTEXTLEN, (WPARAM)index, 0); if (len > 0) { @@ -396,13 +396,13 @@ ALF_ComboBoxStringForIndex(HWND combo, int index) } void -ALF_ComboBoxInsertString(HWND combo, int index, const TCHAR *text) +ALF_ComboBox_InsertString(HWND combo, int index, const TCHAR *text) { SendMessage(combo, ALF_CB_INSERTSTRING, (WPARAM)index, (LPARAM)text); } void -ALF_ComboBoxRemoveString(HWND combo, int index) +ALF_ComboBox_RemoveString(HWND combo, int index) { SendMessage(combo, ALF_CB_DELETESTRING, (WPARAM)index, 0); } |
