diff options
author | Noel Grandin <noel@peralex.com> | 2014-12-31 18:39:32 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-01-07 11:20:43 +0200 |
commit | 079590c9097a9491b31f1ef1b30d67d42bd0139a (patch) | |
tree | e77fb91fbc3b4b7312bcd29875434b1d1344e3e7 /vcl/unx | |
parent | e197bcc6285b69179463b5847fe8ce459806455a (diff) |
fdo#84938: convert INDICATOR_ #defines to 'enum class'
and replace SalIndicatorState, it serves the same purpose
Change-Id: I618b8946b8e2527883eecb13060b2256abc505b6
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/generic/app/saldisp.cxx | 10 | ||||
-rw-r--r-- | vcl/unx/generic/window/salframe.cxx | 6 | ||||
-rw-r--r-- | vcl/unx/gtk/window/gtksalframe.cxx | 8 |
3 files changed, 10 insertions, 14 deletions
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx index 908d8cefc027..ee922853686c 100644 --- a/vcl/unx/generic/app/saldisp.cxx +++ b/vcl/unx/generic/app/saldisp.cxx @@ -707,18 +707,18 @@ void SalDisplay::SimulateKeyPress( sal_uInt16 nKeyCode ) } } -sal_uInt16 SalDisplay::GetIndicatorState() const +KeyIndicatorState SalDisplay::GetIndicatorState() const { unsigned int _state = 0; - sal_uInt16 nState = 0; + KeyIndicatorState nState = KeyIndicatorState::NONE; XkbGetIndicatorState(pDisp_, XkbUseCoreKbd, &_state); if ((_state & 0x00000001)) - nState |= INDICATOR_CAPSLOCK; + nState |= KeyIndicatorState::CAPSLOCK; if ((_state & 0x00000002)) - nState |= INDICATOR_NUMLOCK; + nState |= KeyIndicatorState::NUMLOCK; if ((_state & 0x00000004)) - nState |= INDICATOR_SCROLLLOCK; + nState |= KeyIndicatorState::SCROLLLOCK; return nState; } diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx index 77370f71eb2f..52e10567b298 100644 --- a/vcl/unx/generic/window/salframe.cxx +++ b/vcl/unx/generic/window/salframe.cxx @@ -2708,11 +2708,9 @@ SalFrame::SalPointerState X11SalFrame::GetPointerState() return aState; } -SalFrame::SalIndicatorState X11SalFrame::GetIndicatorState() +KeyIndicatorState X11SalFrame::GetIndicatorState() { - SalIndicatorState aState; - aState.mnState = vcl_sal::getSalDisplay(GetGenericData())->GetIndicatorState(); - return aState; + return vcl_sal::getSalDisplay(GetGenericData())->GetIndicatorState(); } void X11SalFrame::SimulateKeyPress( sal_uInt16 nKeyCode ) diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx index 7341071b9cd2..313386741e99 100644 --- a/vcl/unx/gtk/window/gtksalframe.cxx +++ b/vcl/unx/gtk/window/gtksalframe.cxx @@ -2819,16 +2819,14 @@ SalFrame::SalPointerState GtkSalFrame::GetPointerState() return aState; } -SalFrame::SalIndicatorState GtkSalFrame::GetIndicatorState() +KeyIndicatorState GtkSalFrame::GetIndicatorState() { - SalIndicatorState aState; #if !GTK_CHECK_VERSION(3,0,0) - aState.mnState = GetGtkSalData()->GetGtkDisplay()->GetIndicatorState(); + return GetGtkSalData()->GetGtkDisplay()->GetIndicatorState(); #else g_warning ("missing get indicator state"); - aState.mnState = 0; + return KeyIndicatorState::NONE; #endif - return aState; } void GtkSalFrame::SimulateKeyPress( sal_uInt16 nKeyCode ) |