-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.h
More file actions
57 lines (38 loc) · 1.48 KB
/
main.h
File metadata and controls
57 lines (38 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// main.cpp the main source code file to the project.
//
// created 2015/06/26 by Dave Henderson (dhenderson@cliquesoft.org or support@cliquesoft.org)
// updated 2015/07/18 by Dave Henderson (dhenderson@cliquesoft.org or support@cliquesoft.org)
//
// Unless a valid Cliquesoft Private License (CPLv1) has been purchased for your
// device, this software is licensed under the Cliquesoft Public License (CPLv2)
// as found on the Cliquesoft website at www.cliquesoft.org.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the appropriate Cliquesoft License for details.
// #include definitions
// variable definitions
//extern void ShowApps();
// classes definitions
// The Fl_Root class looks like a window to fltk but is actually the
// screen's root window. This is done by using set_xid to "show" it // DH - 'root window' means 'desktop'
// rather than have fltk create the window.
class Fl_Root : public Fl_Window {
int handle(int);
public:
Fl_Root() : Fl_Window(0,0,Fl::w(),Fl::h()) {
}
void show() {
if (!shown()) Fl_X::set_xid(this, RootWindow(fl_display, fl_screen)); // http://www.fltk.org/doc-1.0/osissues.html
}
void flush() {
}
};
// functions of the above class(es)
int Fl_Root::handle(int e) { // DH - when clicking on the root window (desktop background)
if (e == FL_PUSH) {
// ShowApps();
return 1;
}
return 0;
}