diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-01-15 11:10:03 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-01-15 11:17:27 +0000 |
commit | 508c020cf5f7999f0c23d972133f9b6bf85de245 (patch) | |
tree | 9f3b7164d450040eff9353fbb2da01ed25800539 /include/vcl/cmdevt.hxx | |
parent | convert sal_uIntPtr to long (diff) | |
download | core-508c020cf5f7999f0c23d972133f9b6bf85de245.tar.gz core-508c020cf5f7999f0c23d972133f9b6bf85de245.zip |
Resolves: fdo#32664 pass keyboard media keys through to the OS
if we didn't make use of them.
Change-Id: Iee1c2fef5966a614b068c832bf8c6b51973b4c8a
Diffstat (limited to 'include/vcl/cmdevt.hxx')
-rw-r--r-- | include/vcl/cmdevt.hxx | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/include/vcl/cmdevt.hxx b/include/vcl/cmdevt.hxx index bd4df39d234d..6e85c1ef8360 100644 --- a/include/vcl/cmdevt.hxx +++ b/include/vcl/cmdevt.hxx @@ -270,10 +270,7 @@ class VCL_DLLPUBLIC CommandDialogData int GetDialogId() const { return m_nDialogId; } }; - // Media Commands - - #define MEDIA_COMMAND_CHANNEL_DOWN ((sal_Int16)1) // Decrement the channel value, for example, for a TV or radio tuner. #define MEDIA_COMMAND_CHANNEL_UP ((sal_Int16)2) // Increment the channel value, for example, for a TV or radio tuner. #define MEDIA_COMMAND_NEXTTRACK ((sal_Int16)3) // Go to next media track/slide. @@ -297,11 +294,22 @@ class VCL_DLLPUBLIC CommandDialogData #define MEDIA_COMMAND_NEXTTRACK_HOLD ((sal_Int16)21)// Button Right holding pressed. #define MEDIA_COMMAND_PREVIOUSTRACK_HOLD ((sal_Int16)22)// Button Left holding pressed. - +class VCL_DLLPUBLIC CommandMediaData +{ + sal_Int16 m_nMediaId; + bool m_bPassThroughToOS; +public: + CommandMediaData(sal_Int16 nMediaId) + : m_nMediaId(nMediaId) + , m_bPassThroughToOS(true) + { + } + sal_Int16 GetMediaId() const { return m_nMediaId; } + void SetPassThroughToOS(bool bPassThroughToOS) { m_bPassThroughToOS = bPassThroughToOS; } + bool GetPassThroughToOS() const { return m_bPassThroughToOS; } +}; // - CommandSelectionChangeData - - - class VCL_DLLPUBLIC CommandSelectionChangeData { private: @@ -377,7 +385,7 @@ public: const CommandScrollData* GetAutoScrollData() const; const CommandModKeyData* GetModKeyData() const; const CommandDialogData* GetDialogData() const; - sal_Int16 GetMediaCommand() const; + CommandMediaData* GetMediaData() const; const CommandSelectionChangeData* GetSelectionChangeData() const; }; @@ -445,12 +453,12 @@ inline const CommandDialogData* CommandEvent::GetDialogData() const return NULL; } -inline sal_Int16 CommandEvent::GetMediaCommand() const +inline CommandMediaData* CommandEvent::GetMediaData() const { if( mnCommand == COMMAND_MEDIA ) - return *(const sal_Int16*)(mpData); + return (CommandMediaData*)(mpData); else - return 0; + return NULL; } inline const CommandSelectionChangeData* CommandEvent::GetSelectionChangeData() const |