Re: [Geany-Devel] Problem with pointer from API function -- solved
On Tue, 27 Aug 2019 at 16:00, Austin Green wrote: > > Hi Lex, > > On Tue, 27 Aug 2019 14:39:52 +1000 > Lex Trotman wrote: > > > On Tue, 27 Aug 2019 at 14:29, Austin Green > > wrote: > > ... > > > As well as adding the GEANY_API_SYMBOL macro to the function definition, > > > the function declaration in keybindings.h also needs to be moved from the > > > #ifdef GEANY_PRIVATE > > > section, into the 'public' section. Dereffing the returned pointer then > > > works fine. > > > > > > I expect this is documented somewhere, though I haven't found it. > > > > Its not documented because its private, its not for plugin use. > > Things are not just randomly added to the plugin API, because then its > > fixed and can't be changed inside Geany. > > Presumably it _could_ be added to the API, but only by the Geany maintainers? > Who would need to have a good use case made for it. > A fair interpretation, yeah. Luckily you found you didn't need it anyway :) Cheers Lex > Cheers, > Austin. > ___ > Devel mailing list > Devel@lists.geany.org > https://lists.geany.org/cgi-bin/mailman/listinfo/devel ___ Devel mailing list Devel@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/devel
[Geany-Devel] How to programmatically de-select text
Trying to programmatically cancel a text selection. There are functions that will probably do it, e.g. sci_set_selection, but bearing in mind the restriction on changing the API, those functions are not callable from my code. Surely I'm missing something obvious here? I do hope so! :) Cheers, Austin. ___ Devel mailing list Devel@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/devel
Re: [Geany-Devel] How to programmatically de-select text
On Wed, 28 Aug 2019 at 15:12, Austin Green wrote: > > Trying to programmatically cancel a text selection. There are functions that > will probably do it, e.g. sci_set_selection, but bearing in mind the > restriction on changing the API, those functions are not callable from my > code. > > Surely I'm missing something obvious here? I do hope so! :) Scintilla docs say "If the anchor and the current position are the same, there is no selected text." so probably set selection start and end both to current position. https://www.geany.org/manual/reference/sciwrappers_8h.html#a6649bca185bcc34837642cb61b4e7791 Cheers Lex > > Cheers, Austin. > ___ > Devel mailing list > Devel@lists.geany.org > https://lists.geany.org/cgi-bin/mailman/listinfo/devel ___ Devel mailing list Devel@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/devel
Re: [Geany-Devel] Problem with pointer from API function -- solved
Thanks, this info should be added to HACKING to explain how to add API symbols. On Tue, 27 Aug 2019 05:29 Austin Green, wrote: > Hi All, > > OK, after further research I have stumbled on the answer: > > As well as adding the GEANY_API_SYMBOL macro to the function definition, > the function declaration in keybindings.h also needs to be moved from the > #ifdef GEANY_PRIVATE > section, into the 'public' section. Dereffing the returned pointer then > works fine. > > I expect this is documented somewhere, though I haven't found it. Thanks > to all for not responding with 'RTFM'. :) > > Cheers, > Austin. > ___ > Devel mailing list > Devel@lists.geany.org > https://lists.geany.org/cgi-bin/mailman/listinfo/devel > ___ Devel mailing list Devel@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/devel