Skip to content
This repository has been archived by the owner on Jul 12, 2018. It is now read-only.

Support interfaces #12

Open
romgrk opened this issue Jan 7, 2016 · 9 comments
Open

Support interfaces #12

romgrk opened this issue Jan 7, 2016 · 9 comments

Comments

@romgrk
Copy link

romgrk commented Jan 7, 2016

css = new Gtk.CssProvider();
css.load_from_path('./style.css');
context = win.get_style_context();
context.add_provider(css, 200);

The last call is the one producing this:
screenshot from 2016-01-06 23-56-56
(Red text is debug info; just a printf of base_info and type in method V8ToGIArgument)

@magcius
Copy link
Collaborator

magcius commented Jan 7, 2016

We don't support interfaces yet.

@romgrk
Copy link
Author

romgrk commented Jan 7, 2016

All good, just reporting.

@kidwm
Copy link

kidwm commented Jan 7, 2016

@romgrk how about changing the title of this issue to support interfaces?

@romgrk romgrk changed the title Interfaces not converted to GIArgument Support interfaces Jan 7, 2016
@romgrk
Copy link
Author

romgrk commented Feb 8, 2016

Hello, @magcius I have a question and I was wondering if you could help (but don't feel obligated to).

On a local branch, I have the following:

// value.cc
void V8ToGIArgument(Isolate *isolate, GIBaseInfo *base_info, GIArgument *arg, Handle<Value> value) {
    GIInfoType type = g_base_info_get_type (base_info);

    switch (type) {
    case GI_INFO_TYPE_OBJECT:
        arg->v_pointer = GObjectFromWrapper (value);
        break;
    case GI_INFO_TYPE_INTERFACE: // added
        arg->v_pointer = GObjectFromWrapper (value);
        break;
    //

Is it safe to assume that the GIArgument will be a GObject? If not, in which case would it be problematic?

(P.S. I recently read your “xplain” articles, that's a very great work! Very interesting)

@friktor
Copy link

friktor commented Mar 4, 2016

Hi, I understand the problem is not only in the concrete support of interfaces, but also in the branching units of method calls. Will you soon Fix this problem? Or At least basic support CssProvider & StyleContext, it is quite common basic functionality for Gtk. (At the moment to test the styles only in Gtk-Inspector)

@magcius
Copy link
Collaborator

magcius commented Mar 4, 2016

I am not actively working on node-gtk at the moment.

@WebReflection
Copy link
Owner

So we're done here?

@magcius
Copy link
Collaborator

magcius commented Mar 4, 2016

I hope to eventually work on it in the future, but I'm swamped with real work right now.

@WebReflection
Copy link
Owner

Me too, I was just hoping for some little interest and little progress from time to time. Maybe it's time for me to learn C++ and move on here. Cheers

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants