Skip to content

Commit

Permalink
Update SourceView to version 3.6.
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeWey committed Oct 7, 2012
1 parent 1025b2b commit b134c03
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 18 deletions.
6 changes: 3 additions & 3 deletions srcsv/gsv/SourceCompletion.d
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ public class SourceCompletion : ObjectG
* Params:
* providers = a list of GtkSourceCompletionProvider, or NULL. [element-type GtkSource.CompletionProvider][allow-none]
* context = The GtkSourceCompletionContext
* with which to start the completion. [transfer full]
* with which to start the completion. [transfer floating]
* Returns: TRUE if it was possible to the show completion window.
*/
public int show(ListG providers, SourceCompletionContext context)
Expand Down Expand Up @@ -440,7 +440,7 @@ public class SourceCompletion : ObjectG
*/
public SourceView getView()
{
// struct _GtkSourceView * gtk_source_completion_get_view (GtkSourceCompletion *completion);
// GtkSourceView * gtk_source_completion_get_view (GtkSourceCompletion *completion);
auto p = gtk_source_completion_get_view(gtkSourceCompletion);
if(p is null)
{
Expand All @@ -455,7 +455,7 @@ public class SourceCompletion : ObjectG
* the current cursor position will be used.
* Params:
* position = a GtkTextIter, or NULL. [allow-none]
* Returns: a new GtkSourceCompletionContext. The reference being returned is a 'floating' reference, so if you invoke gtk_source_completion_show with this context you don't need to unref it. [transfer full]
* Returns: a new GtkSourceCompletionContext. The reference being returned is a 'floating' reference, so if you invoke gtk_source_completion_show with this context you don't need to unref it. [transfer floating]
*/
public SourceCompletionContext createContext(TextIter position)
{
Expand Down
13 changes: 12 additions & 1 deletion srcsv/gsv/SourceCompletionContext.d
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

/*
* Conversion parameters:
* inFile = gtksourceview-3.0-completioncontext.html
* inFile = GtkSourceCompletionContext.html
* outPack = gsv
* outFile = SourceCompletionContext
* strct = GtkSourceCompletionContext
Expand Down Expand Up @@ -76,6 +76,17 @@ private import gobject.ObjectG;

/**
* Description
* A completion context is created when a completion occurs. The completion can
* be activated by several means, listed in GtkSourceCompletionActivation.
* The completion can be activated by user request, i.e. when the user presses
* Control+space, by default.
* The completion can also be activated interactively, on each insertion or
* deletion in the GtkTextBuffer.
* A GtkTextIter is associated with the context, this is where the completion
* takes place. With this GtkTextIter, you can get the associated
* GtkTextBuffer with gtk_text_iter_get_buffer().
* Once the context is created, the eligible providers are asked to add
* proposals with gtk_source_completion_context_add_proposals().
*/
public class SourceCompletionContext : ObjectG
{
Expand Down
3 changes: 2 additions & 1 deletion srcsv/gsv/SourceCompletionProviderIF.d
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ public interface SourceCompletionProviderIF
public Pixbuf gtkSourceCompletionProviderGetIcon();

/**
* Populate context with proposals from provider.
* Populate context with proposals from provider added with the
* gtk_source_completion_context_add_proposals() function.
* Params:
* context = a GtkSourceCompletionContext.
*/
Expand Down
3 changes: 2 additions & 1 deletion srcsv/gsv/SourceCompletionProviderT.d
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ public template SourceCompletionProviderT(TStruct)
}

/**
* Populate context with proposals from provider.
* Populate context with proposals from provider added with the
* gtk_source_completion_context_add_proposals() function.
* Params:
* context = a GtkSourceCompletionContext.
*/
Expand Down
11 changes: 7 additions & 4 deletions srcsv/gsv/SourceView.d
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,14 @@ public class SourceView : TextView

void delegate(SourceView)[] onShowCompletionListeners;
/**
* The ::show-completion signal is a keybinding signal which gets
* emitted when the user initiates a completion in default mode.
* The ::show-completion signal is a key binding signal which gets
* emitted when the user requests a completion, by pressing
* Control+space.
* This will create a GtkSourceCompletionContext with the activation
* type as GTK_SOURCE_COMPLETION_ACTIVATION_USER_REQUESTED.
* Applications should not connect to it, but may emit it with
* g_signal_emit_by_name if they need to control the default mode
* completion activation.
* g_signal_emit_by_name() if they need to activate the completion by
* another means, for example with another key binding or a menu entry.
*/
void addOnShowCompletion(void delegate(SourceView) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
{
Expand Down
2 changes: 1 addition & 1 deletion srcsv/gsvc/gsv.d
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ mixin( gshared ~"extern(C)
// gsv.SourceCompletionContext
void function(GtkSourceCompletionContext* context, void* provider, GList* proposals, gboolean finished) c_gtk_source_completion_context_add_proposals;
void function(GtkSourceCompletionContext* context, GtkSourceCompletionProvider* provider, GList* proposals, gboolean finished) c_gtk_source_completion_context_add_proposals;
void function(GtkSourceCompletionContext* context, GtkTextIter* iter) c_gtk_source_completion_context_get_iter;
GtkSourceCompletionActivation function(GtkSourceCompletionContext* context) c_gtk_source_completion_context_get_activation;
Expand Down
12 changes: 8 additions & 4 deletions srcsv/gsvc/gsvtypes.d
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,16 @@ public enum GtkSourceCompletionActivation
alias GtkSourceCompletionActivation SourceCompletionActivation;

/**
* GTK_SOURCE_GUTTER_RENDERER_STATE_NORMAL: normal state
* GTK_SOURCE_GUTTER_RENDERER_STATE_CURSOR: area in the renderer represents the
* GTK_SOURCE_GUTTER_RENDERER_STATE_NORMAL
* normal state
* GTK_SOURCE_GUTTER_RENDERER_STATE_CURSOR
* area in the renderer represents the
* line on which the insert cursor is currently positioned
* GTK_SOURCE_GUTTER_RENDERER_STATE_PRELIT: the mouse pointer is currently
* GTK_SOURCE_GUTTER_RENDERER_STATE_PRELIT
* the mouse pointer is currently
* over the activatable area of the renderer
* GTK_SOURCE_GUTTER_RENDERER_STATE_SELECTED: area in the renderer represents
* GTK_SOURCE_GUTTER_RENDERER_STATE_SELECTED
* area in the renderer represents
* a line in the buffer which contains part of the selection
*/
public enum GtkSourceGutterRendererState
Expand Down
2 changes: 1 addition & 1 deletion wrap/APILookupSourceView.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ structWrap: GtkSourceView* SourceView
structWrap: GtkTextIter* TextIter
outFile: SourceCompletion

file: gtksourceview-3.0-completioncontext.html
file: GtkSourceCompletionContext.html
struct: GtkSourceCompletionContext
class: SourceCompletionContext
prefix: gtk_source_completion_context_
Expand Down
4 changes: 2 additions & 2 deletions wrap/downloadFiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ curl -L http://ftp.gnome.org/pub/GNOME/sources/libgda/1.2/libgda-1.2.4.tar.gz |
ln -s libgda-1.2.4/doc/C/html gda

#gtkSourceView
curl http://developer.gnome.org/gtksourceview/gtksourceview-html-3.4.2.tar.gz | tar xvfz -
ln -s gtksourceview-html-3.4.2 sourceview
curl http://developer.gnome.org/gtksourceview/gtksourceview-html-3.6.0.tar.gz | tar xvfz -
ln -s gtksourceview-html-3.6.0 sourceview

#gstreamer
curl http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-0.10.14.tar.gz | tar xvfz -
Expand Down

0 comments on commit b134c03

Please sign in to comment.