diff options
author | nyamatongwe <devnull@localhost> | 2000-06-11 08:05:12 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2000-06-11 08:05:12 +0000 |
commit | 895d8a817ac5ac7680947e2d63afb10c94467210 (patch) | |
tree | 90b536f64e1db447bbc96ed87f6d4c947ef0df8a | |
parent | 9e1811c18ff338d2a450da06209dc8ae7004581b (diff) | |
download | scintilla-mirror-895d8a817ac5ac7680947e2d63afb10c94467210.tar.gz |
Moved GTK+ Scintilla widget definition out into ScintillaWidget.h
-rw-r--r-- | gtk/PlatGTK.cxx | 1 | ||||
-rw-r--r-- | gtk/ScintillaGTK.cxx | 1 | ||||
-rw-r--r-- | gtk/makefile | 4 | ||||
-rw-r--r-- | include/Scintilla.h | 50 | ||||
-rw-r--r-- | include/ScintillaWidget.h | 46 |
5 files changed, 54 insertions, 48 deletions
diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index 9b16363c7..d64519837 100644 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -10,6 +10,7 @@ #include "Platform.h" +#include "ScintillaWidget.h" #include "Scintilla.h" #define LOWORD(x) (x & 0xffff) diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index 5bdc7af53..bece77e59 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -11,6 +11,7 @@ #include "Platform.h" +#include "ScintillaWidget.h" #include "Scintilla.h" #ifdef SCI_LEXER #include "SciLexer.h" diff --git a/gtk/makefile b/gtk/makefile index 140697767..27e94b2c4 100644 --- a/gtk/makefile +++ b/gtk/makefile @@ -65,7 +65,7 @@ LexVB.o: LexVB.cxx Platform.h PropSet.h Accessor.h KeyWords.h \ Scintilla.h WinDefs.h SciLexer.h LineMarker.o: LineMarker.cxx Platform.h Scintilla.h WinDefs.h \ LineMarker.h -PlatGTK.o: PlatGTK.cxx Platform.h Scintilla.h WinDefs.h +PlatGTK.o: PlatGTK.cxx Platform.h Scintilla.h ScintillaWidget.h WinDefs.h PropSet.o: PropSet.cxx Platform.h PropSet.h SciTEBase.o: SciTEBase.cxx Platform.h WinDefs.h SciTE.h PropSet.h \ Accessor.h KeyWords.h Scintilla.h SciLexer.h SciTEBase.h @@ -75,7 +75,7 @@ ScintillaBase.o: ScintillaBase.cxx Platform.h Scintilla.h WinDefs.h \ SciLexer.h PropSet.h Accessor.h KeyWords.h ContractionState.h \ CellBuffer.h CallTip.h KeyMap.h Indicator.h LineMarker.h Style.h \ ViewStyle.h AutoComplete.h Document.h Editor.h ScintillaBase.h -ScintillaGTK.o: ScintillaGTK.cxx Platform.h Scintilla.h WinDefs.h \ +ScintillaGTK.o: ScintillaGTK.cxx Platform.h Scintilla.h ScintillaWidget.h WinDefs.h \ SciLexer.h PropSet.h Accessor.h KeyWords.h ContractionState.h \ CellBuffer.h CallTip.h KeyMap.h Indicator.h LineMarker.h Style.h \ AutoComplete.h ViewStyle.h Document.h Editor.h ScintillaBase.h diff --git a/include/Scintilla.h b/include/Scintilla.h index a74ad08d7..9281ae2b5 100644 --- a/include/Scintilla.h +++ b/include/Scintilla.h @@ -9,54 +9,16 @@ // Compile-time configuration options #define MACRO_SUPPORT 1 // Comment out to remove macro hooks -#if PLAT_GTK -#include <gdk/gdk.h> -#include <gtk/gtkvbox.h> - -#ifdef __cplusplus -extern "C" { -#endif - -#define SCINTILLA(obj) GTK_CHECK_CAST (obj, scintilla_get_type (), ScintillaObject) -#define SCINTILLA_CLASS(klass) GTK_CHECK_CLASS_CAS T (klass, scintilla_get_type (), ScintillaClass) -#define IS_SCINTILLA(obj) GTK_CHECK_TYPE (obj, scintilla_get_type ()) - - typedef struct _ScintillaObject ScintillaObject; - typedef struct _ScintillaClass ScintillaClass; - - struct _ScintillaObject - { - GtkFixed vbox; - void *pscin; - }; - - struct _ScintillaClass - { - GtkFixedClass parent_class; - - void (* command) (ScintillaObject *ttt); - void (* notify) (ScintillaObject *ttt); - }; - - guint scintilla_get_type (void); - GtkWidget* scintilla_new (void); - void scintilla_set_id (ScintillaObject *sci,int id); - long scintilla_send_message (ScintillaObject *sci,int iMessage,int wParam,int lParam); - +#if PLAT_WX || PLAT_GTK #include "WinDefs.h" - -#ifdef __cplusplus -} #endif +#if PLAT_WIN +#ifdef STATIC_BUILD +void Scintilla_RegisterClasses(HINSTANCE hInstance); #endif - -#if PLAT_WX -#include "WinDefs.h" #endif -// Both GTK and Windows - #define INVALID_POSITION -1 // Define start of Scintilla messages to be greater than all edit (EM_*) messages @@ -445,10 +407,6 @@ struct SCNotification { #define SCN_MARGINCLICK 2010 #define SCN_NEEDSHOWN 2011 -#ifdef STATIC_BUILD -void Scintilla_RegisterClasses(HINSTANCE hInstance); -#endif - // Deprecation section listing all API features that are deprecated and will // will be removed completely in a future version. // To enable these features define INCLUDE_DEPRECATED_FEATURES diff --git a/include/ScintillaWidget.h b/include/ScintillaWidget.h new file mode 100644 index 000000000..980557a2e --- /dev/null +++ b/include/ScintillaWidget.h @@ -0,0 +1,46 @@ +// Scintilla source code edit control +// ScintillaWidget.h - definition of Scintilla widget for GTK+ +// Only needed by GTK+ code but is harmless on other platforms. +// Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org> +// The License.txt file describes the conditions under which this software may be distributed. + +#ifndef SCINTILLAWIDGET_H +#define SCINTILLAWIDGET_H + +#if PLAT_GTK + +#ifdef __cplusplus +extern "C" { +#endif + +#define SCINTILLA(obj) GTK_CHECK_CAST (obj, scintilla_get_type (), ScintillaObject) +#define SCINTILLA_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, scintilla_get_type (), ScintillaClass) +#define IS_SCINTILLA(obj) GTK_CHECK_TYPE (obj, scintilla_get_type ()) + +typedef struct _ScintillaObject ScintillaObject; +typedef struct _ScintillaClass ScintillaClass; + +struct _ScintillaObject { + GtkFixed vbox; + void *pscin; +}; + +struct _ScintillaClass { + GtkFixedClass parent_class; + + void (* command) (ScintillaObject *ttt); + void (* notify) (ScintillaObject *ttt); +}; + +guint scintilla_get_type (void); +GtkWidget* scintilla_new (void); +void scintilla_set_id (ScintillaObject *sci,int id); +long scintilla_send_message (ScintillaObject *sci,int iMessage,int wParam,int lParam); + +#ifdef __cplusplus +} +#endif + +#endif + +#endif |