Line | |
---|
1 | /*
|
---|
2 | * synergy -- mouse and keyboard sharing utility
|
---|
3 | * Copyright (C) 2004 Chris Schoeneman
|
---|
4 | *
|
---|
5 | * This package is free software; you can redistribute it and/or
|
---|
6 | * modify it under the terms of the GNU General Public License
|
---|
7 | * found in the file COPYING that should have accompanied this file.
|
---|
8 | *
|
---|
9 | * This package is distributed in the hope that it will be useful,
|
---|
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
12 | * GNU General Public License for more details.
|
---|
13 | */
|
---|
14 |
|
---|
15 | #include "CFunctionEventJob.h"
|
---|
16 |
|
---|
17 | //
|
---|
18 | // CFunctionEventJob
|
---|
19 | //
|
---|
20 |
|
---|
21 | CFunctionEventJob::CFunctionEventJob(
|
---|
22 | void (*func)(const CEvent&, void*), void* arg) :
|
---|
23 | m_func(func),
|
---|
24 | m_arg(arg)
|
---|
25 | {
|
---|
26 | // do nothing
|
---|
27 | }
|
---|
28 |
|
---|
29 | CFunctionEventJob::~CFunctionEventJob()
|
---|
30 | {
|
---|
31 | // do nothing
|
---|
32 | }
|
---|
33 |
|
---|
34 | void
|
---|
35 | CFunctionEventJob::run(const CEvent& event)
|
---|
36 | {
|
---|
37 | if (m_func != NULL) {
|
---|
38 | m_func(event, m_arg);
|
---|
39 | }
|
---|
40 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.