1{%MainUnit gtk2proc.pp}{%MainUnit gtkint.pp}
2{ $Id$ }
3
4{******************************************************************************
5  Centralized includefile for some common gtk defines
6 ******************************************************************************}
7
8
9// TODO: Test on all platforms
10{$IFNDEF DisableAsyncProcess}
11  {$IFDEF Linux}
12    {$IFDEF CPUI386}
13      {off $DEFINE UseAsyncProcess}
14    {$ENDIF}
15  {$ENDIF}
16{$ENDIF}
17
18{off $DEFINE GDK_ERROR_TRAP_FLUSH}
19
20{$DEFINE REPORT_GDK_ERRORS}
21
22{off $DEFINE VerboseAccelerator}
23
24{off $define VerboseModifiermap}
25
26{$define HideKeyTableWarnings}
27
28{off $DEFINE VerboseTimer}
29
30{off $DEFINE VerboseMouseBugfix}
31
32{off $DEFINE RaiseExceptionOnNilPointers}
33
34{off $Define DisableCriticalSections}
35
36{off $Define Disable_GC_SysColors}
37
38{$define RawimageConsistencyChecks}
39
40(*
41 keep track of keystates instead of using OS
42 This is the old mode and might be removed
43*)
44{$DEFINE Use_KeyStateList}
45
46(*
47 Since some platforms (Darwin) can have X but also have a native gtk
48 implementation, the following defines are used
49
50 HasX -> X can be used for accessing functions not implented in gtk/gdk
51         (this does not mean that gdkx functions can be used)
52 HasGdk2X -> gdk2x can be used (gdk2x is defined for fpc 2.1+)
53 UseX -> Use the X version of gtk instead of a native version
54*)
55
56{off $define UseX}
57
58{$ifdef Unix}
59  // on darwin we try to use native gtk
60  {$ifdef Darwin}
61    {$ifdef UseX} // it can be overridden
62      {$info Compiling with gtk2 for X}
63      {$define HasX}
64    {$else}
65      {$IFDEF VerboseGtkToDos}{$note On darwin the native gtk2 widgetset is used. }{$ENDIF}
66      {$IFDEF VerboseGtkToDos}{$note If you want to use gtk2 for X, define UseX }{$ENDIF}
67    {$endif}
68  {$else}
69    {$define HasX}
70  {$endif}
71  {$if defined(HasX)}
72    {$define HasGdk2X}
73  {$endif}
74
75{$else}
76  {$define GTK_2_10}
77  {$define USE_GTK_MAIN_OLD_ITERATION} // in other case it hangs
78{$endif}
79
80{$ifdef HasX}
81  (*
82   GTK or GNOME has problems reporting ssAlt and ssAltGr when different
83   keyboardlayouts are used. With UseOwnShiftState we keep track of the shiftate
84   ourself
85  *)
86  {$ifndef DisableUseOwnShiftState}
87    {$define UseOwnShiftState}
88  {$endif}
89{$endif}
90
91// see http://bugs.freepascal.org/view.php?id=12145.
92// Turn it off if something happens.
93{$DEFINE EnabledGtkThreading}
94{$define GTK_2_8}
95
96// See http://bugs.freepascal.org/view.php?id=18966
97{$define Gtk2CallMouseDownBeforeContext}
98
99{$IF FPC_FULLVERSION>=20701}
100  {$OPTIMIZATION NOREMOVEEMPTYPROCS}
101{$ENDIF}
102
103