From 70d4b80245ae2ce5a08d271ad5bc91a852115b67 Mon Sep 17 00:00:00 2001
From: nyamatongwe Last edited 30/October/2005 RBR Last edited 2/November/2005 NH There is an overview of the internal design of
Scintilla. In the descriptions that follow, the messages are described as function calls with zero, one
or two arguments. These two arguments are the standard The following additional notifications are sent using the Scintilla Documentation
-
@@ -78,7 +78,10 @@
wParam and
- lParam familiar to Windows programmers. Although the commands only use the
+ lParam familiar to Windows programmers. These parameters are integers that
+ are large enough to hold pointers, and the return value is also an integer large enough to contain a
+ pointer.
+ Although the commands only use the
arguments described, because all messages have two arguments whether Scintilla uses them or
not, it is strongly recommended that any unused arguments are set to 0. This allows future
enhancement of messages without the risk of breaking existing code. Common argument types
@@ -100,7 +103,7 @@
- const char *
+ const char *
Arguments point at text that is being passed to Scintilla but not modified. The text
may be zero terminated or another argument may specify the character count, the
@@ -242,13 +245,15 @@
o Notifications
- o Deprecated messages
+ o GTK+
- o Edit messages never
- supported by Scintilla
+ o Deprecated messages
+
@@ -4433,7 +4438,7 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
o Edit messages never
+ supported by Scintilla
+
o Building Scintilla
struct NotifyHeader { // This matches the Win32 NMHDR structure
void *hwndFrom; // environment specific window handle/pointer
- unsigned int idFrom;// CtrlID of the window issuing the notification
+ uptr_t idFrom; // CtrlID of the window issuing the notification
unsigned int code; // The SCN_* notification code
};
@@ -4497,7 +4502,8 @@ struct SCNotification {
WM_COMMAND message on
- Windows and the "Command" signal on GTK+ to emulate the Windows Edit control:
SCEN_CHANGE
SCEN_SETFOCUS
SCEN_KILLFOCUS
@@ -5072,6 +5078,31 @@ for line = lineStart to lineEnd do SCI_ENSUREVISIBLE(line) next
+ GTK+
+ On GTK+, the following functions create a Scintilla widget, communicate with it and allow
+ resources to be released after all Scintilla widgets hace been destroyed.
+ GtkWidget *scintilla_new()
+ void scintilla_set_id(ScintillaObject *sci, int id)
+ sptr_t scintilla_send_message(ScintillaObject *sci,unsigned int iMessage, uptr_t wParam, sptr_t lParam)
+ void scintilla_release_resources()
+
+
+ GtkWidget *scintilla_new()
+ Create a new Scintilla widget. The returned pointer can be added to a container and displayed in the same way as other
+ widgets.
+
+ void scintilla_set_id(ScintillaObject *sci, int id)
+ Set the control ID which will be used in the idFrom field of the NotifyHeader structure of all
+ notifications for this instance. When an application creates multiple Scintilla widgets, this allows
+ the source of each notification to be found. The value should be small, preferrably less than 16 bits,
+ rather than a pointer as some of the functions will only transmit 16 or 32 bits.
+
+ sptr_t scintilla_send_message(ScintillaObject *sci,unsigned int iMessage, uptr_t wParam, sptr_t lParam)
+ The main entry point allows sending any of the messages described in this document.
+
+ void scintilla_release_resources()
+ Call this to free any remaining resources after all the Scintilla widgets have been destroyed.
+
Deprecated messages and notifications
The following messages are currently supported to emulate existing Windows controls, but
--
cgit v1.2.3