On Mon, 01 Sep 2014 22:46:51 +0200
S H
On 09/01/14 10:09, Gabriele Mohr wrote:
Am 31.08.2014 23:58, schrieb S H:
On 08/31/14 21:35, Angelo Naselli wrote:
Il 31/08/2014 20:34, S H ha scritto:
Hello,
I hope asking this question here is okay.
Is there any way to access the instances of plugin-specific classes like NCurses? It's in the public headers and everything so I suppose it must be part of the public API, I just can't get a pointer to the instance used in my application from the YUI class or anywhere else. I already saw YUIPlugin has a locateSymbol method and thought I could use that, but again, I don't know how to access the YUIPlugin instance of my application.
Thank you very much in advance
Could you please explain better what you need? if you need to run an application using ncurses just pass "--ncurses" to the command line. You can also use into the application runInTerminal and check the return value
HTH, Angelo
Thanks for your reply and sorry for being imprecise.
What I *actually* want to do is change the NCurses color scheme from inside my application because I don't like the predefined ones.
So I had a look at /usr/include/yui/ncurses/NCurses.h and thought I might do something like this to access the global style attributes (after I've assured myself that the application is running on NCurses somehow):
````` NCstyle st = NCurses::style(); `````
But of course, this doesn't compile ("undefined reference"), because the plugin is not meant to be statically linked and only becomes available at runtime.
That's why I figured I'd need access to YUIPlugin::locateSymbol or something, but for that I need the instance of YUIPlugin that actually refers to the loaded NCurses plugin (if it has been loaded).
And that's where I'm stuck.
Maybe (probably) your library isn't intended to be used this way...
Anyway, hope my intention is clearer now.
Hi,
there is an article about changing the color scheme for ncurses YaST which should provide needed info, see http://en.opensuse.org/SDB:YaST_tricks#Create_a_customized_color_theme.
Greetings Gabi
This worked, thanks!
But you guys are sure there is no way to access the style attributes at runtime?
The way it is, the only way to have an application come with a new default theme is by shipping it together with the custom libyui-ncurses.so and putting it in LD_PRELOAD... which works, but is not very elegant.
BTW: Great job on that hidden menu, I must say I was kind of blown away by it.
Hi, looks like we do not have it. But for me it looks not so hard to create it, so we welcome patches to allow it. In general my idea is to have some well defined place with textual style configuration and then translate it into ncurses internal attributes. We already have enough examples how to set attributes, so it is mainly about location of configuration and translating text to ncurses attributes. Josef -- To unsubscribe, e-mail: libyui-devel+unsubscribe@opensuse.org To contact the owner, e-mail: libyui-devel+owner@opensuse.org