Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-kde
Path: blob/main/editors/fxite/files/patch-jef_compat.h
16461 views
1
--- jef/compat.h.orig 2013-10-03 09:22:51 UTC
2
+++ jef/compat.h
3
@@ -1,3 +1,25 @@
4
+/*
5
+ FXiTe - The Free eXtensIble Text Editor
6
+ Copyright (c) 2009-2014 Jeffrey Pohlmeyer <[email protected]>
7
+
8
+ This program is free software; you can redistribute it and/or modify it
9
+ under the terms of the GNU General Public License version 3 as
10
+ published by the Free Software Foundation.
11
+
12
+ This software is distributed in the hope that it will be useful,
13
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ GNU General Public License for more details.
16
+
17
+ You should have received a copy of the GNU General Public License
18
+ along with this program; if not, write to the Free Software
19
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20
+*/
21
+
22
+#if (FOX_MAJOR==1) && (FOX_MINOR==6) && !defined(FOX_1_6)
23
+# define FOX_1_6
24
+#endif
25
+
26
#ifdef FOX_1_6
27
# define ONE_SECOND ((FXuint)1000)
28
# define PathMatch(pattern,file,flags) FXPath::match(pattern,file,flags)
29
@@ -20,8 +42,16 @@ FXbool LocaleIsUTF8();
30
# define FILEMATCH_NOESCAPE FXPath::NoEscape
31
# define FILEMATCH_FILE_NAME FXPath::PathName
32
# define FILEMATCH_CASEFOLD FXPath::CaseFold
33
-# define REX_FORWARD FXRex::Forward
34
-# define REX_BACKWARD FXRex::Backward
35
+# if (FOX_MAJOR>1) || (FOX_MINOR>7) || (FOX_LEVEL>49)
36
+# define FOX_1_7_50_OR_NEWER
37
+# endif
38
+# ifdef FOX_1_7_50_OR_NEWER
39
+# define REX_FORWARD 0
40
+# define REX_BACKWARD 0
41
+# else
42
+# define REX_FORWARD FXRex::Forward
43
+# define REX_BACKWARD FXRex::Backward
44
+# endif
45
# define REX_CAPTURE FXRex::Capture
46
# define REX_NEWLINE FXRex::Newline
47
# define REX_NORMAL FXRex::Normal
48
@@ -35,6 +65,9 @@ FXbool LocaleIsUTF8();
49
# if (FOX_MAJOR>1)||(FOX_MINOR>7)||(FOX_LEVEL>26)
50
# define fxgetpid() (FXProcess::current())
51
# endif
52
+# if (FOX_MAJOR>1) || (FOX_MINOR>7) || (FOX_LEVEL>44)
53
+# define FOX_1_7_45_OR_NEWER
54
+# endif
55
#endif
56
57
58
@@ -69,8 +102,31 @@ bool IsDesktopCurrent(FXMainWindow*tw);
59
# endif
60
#endif
61
62
+#ifdef FOX_1_7_45_OR_NEWER
63
+# define Dictionary FXDictionary
64
+# define DictKeyName(d,n) ((d).key(n).text())
65
+# define TotalSlotsInDict(d) ((d)->no())
66
+# define UsedSlotsInDict(d) ((d)->used())
67
+# define ReplaceInDict(d,k,v) ((d)->at(k)=(v))
68
+# define LookupInDict(d,k) ((d)->at(k))
69
+#else
70
+# define Dictionary FXDict
71
+# define DictKeyName(d,n) ((d).key(n))
72
+# define TotalSlotsInDict(d) ((d)->size())
73
+# define UsedSlotsInDict(d) ((d)->no())
74
+# define ReplaceInDict(d,k,v) ((d)->replace((k),(v)))
75
+# define LookupInDict(d,k) ((d)->find(k))
76
+#endif
77
78
FXID GetNetActiveWindow();
79
80
void WaitForWindowFocus(FXTopWindow*w, FXuint msecs=1000);
81
+
82
+// #define SetPadLRTB(o,l,r,t,b) \
83
+// (o)->setPadLeft(l); \
84
+// (o)->setPadRight(r); \
85
+// (o)->setPadTop(t); \
86
+// (o)->setPadBottom(b);
87
+//
88
+// #define SetPad(o,p) SetPadLRTB(o,p,p,p,p)
89
90
91