Path: blob/main/editors/fxite/files/patch-jef_compat.h
16461 views
--- jef/compat.h.orig 2013-10-03 09:22:51 UTC1+++ jef/compat.h2@@ -1,3 +1,25 @@3+/*4+ FXiTe - The Free eXtensIble Text Editor5+ Copyright (c) 2009-2014 Jeffrey Pohlmeyer <[email protected]>6+7+ This program is free software; you can redistribute it and/or modify it8+ under the terms of the GNU General Public License version 3 as9+ published by the Free Software Foundation.10+11+ This software is distributed in the hope that it will be useful,12+ but WITHOUT ANY WARRANTY; without even the implied warranty of13+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14+ GNU General Public License for more details.15+16+ You should have received a copy of the GNU General Public License17+ along with this program; if not, write to the Free Software18+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA19+*/20+21+#if (FOX_MAJOR==1) && (FOX_MINOR==6) && !defined(FOX_1_6)22+# define FOX_1_623+#endif24+25#ifdef FOX_1_626# define ONE_SECOND ((FXuint)1000)27# define PathMatch(pattern,file,flags) FXPath::match(pattern,file,flags)28@@ -20,8 +42,16 @@ FXbool LocaleIsUTF8();29# define FILEMATCH_NOESCAPE FXPath::NoEscape30# define FILEMATCH_FILE_NAME FXPath::PathName31# define FILEMATCH_CASEFOLD FXPath::CaseFold32-# define REX_FORWARD FXRex::Forward33-# define REX_BACKWARD FXRex::Backward34+# if (FOX_MAJOR>1) || (FOX_MINOR>7) || (FOX_LEVEL>49)35+# define FOX_1_7_50_OR_NEWER36+# endif37+# ifdef FOX_1_7_50_OR_NEWER38+# define REX_FORWARD 039+# define REX_BACKWARD 040+# else41+# define REX_FORWARD FXRex::Forward42+# define REX_BACKWARD FXRex::Backward43+# endif44# define REX_CAPTURE FXRex::Capture45# define REX_NEWLINE FXRex::Newline46# define REX_NORMAL FXRex::Normal47@@ -35,6 +65,9 @@ FXbool LocaleIsUTF8();48# if (FOX_MAJOR>1)||(FOX_MINOR>7)||(FOX_LEVEL>26)49# define fxgetpid() (FXProcess::current())50# endif51+# if (FOX_MAJOR>1) || (FOX_MINOR>7) || (FOX_LEVEL>44)52+# define FOX_1_7_45_OR_NEWER53+# endif54#endif555657@@ -69,8 +102,31 @@ bool IsDesktopCurrent(FXMainWindow*tw);58# endif59#endif6061+#ifdef FOX_1_7_45_OR_NEWER62+# define Dictionary FXDictionary63+# define DictKeyName(d,n) ((d).key(n).text())64+# define TotalSlotsInDict(d) ((d)->no())65+# define UsedSlotsInDict(d) ((d)->used())66+# define ReplaceInDict(d,k,v) ((d)->at(k)=(v))67+# define LookupInDict(d,k) ((d)->at(k))68+#else69+# define Dictionary FXDict70+# define DictKeyName(d,n) ((d).key(n))71+# define TotalSlotsInDict(d) ((d)->size())72+# define UsedSlotsInDict(d) ((d)->no())73+# define ReplaceInDict(d,k,v) ((d)->replace((k),(v)))74+# define LookupInDict(d,k) ((d)->find(k))75+#endif7677FXID GetNetActiveWindow();7879void WaitForWindowFocus(FXTopWindow*w, FXuint msecs=1000);80+81+// #define SetPadLRTB(o,l,r,t,b) \82+// (o)->setPadLeft(l); \83+// (o)->setPadRight(r); \84+// (o)->setPadTop(t); \85+// (o)->setPadBottom(b);86+//87+// #define SetPad(o,p) SetPadLRTB(o,p,p,p,p)88899091